1- // Get detailed info for a single Multipass instance
1+ // Get detailed VM info for a single Multipass instance
2+ // NOTE: This only returns machine-level info. App-specific status
3+ // (node, openclaw, provisioning) comes from the agent app's status script.
24var instanceId = clawset . env ( "INSTANCE_ID" ) ;
35var result = clawset . shell ( "multipass" , [ "info" , instanceId , "--format" , "json" ] ) ;
46
@@ -47,37 +49,6 @@ if (info.ipv4 && info.ipv4.length > 0) {
4749 ip = info . ipv4 [ 0 ] ;
4850}
4951
50- // Check node/openclaw/provisioning status inside the VM
51- var innerResult = clawset . shell ( "multipass" , [
52- "exec" , instanceId , "--" , "bash" , "-ic" ,
53- "source ~/.bashrc; echo '===NODE==='; node -v || echo 'NOT_FOUND'; echo '===OPENCLAW_VER==='; openclaw --version || echo 'NOT_FOUND'; echo '===PROVISIONING==='; if [ -f /tmp/provisioning ]; then echo 'YES'; else echo 'NO'; fi"
54- ] ) ;
55-
56- var nodeInstalled = null ;
57- var openclawInstalled = false ;
58- var isProvisioning = false ;
59-
60- if ( innerResult . exitCode === 0 ) {
61- var lines = innerResult . stdout . split ( "\n" ) ;
62- var section = "" ;
63- for ( var i = 0 ; i < lines . length ; i ++ ) {
64- var line = lines [ i ] . trim ( ) ;
65- if ( line === "===NODE===" ) { section = "node" ; continue ; }
66- if ( line === "===OPENCLAW_VER===" ) { section = "openclaw" ; continue ; }
67- if ( line === "===PROVISIONING===" ) { section = "provisioning" ; continue ; }
68-
69- if ( section === "node" && line !== "NOT_FOUND" && line !== "" ) {
70- nodeInstalled = line ;
71- }
72- if ( section === "openclaw" && line !== "NOT_FOUND" && line !== "" ) {
73- openclawInstalled = true ;
74- }
75- if ( section === "provisioning" ) {
76- isProvisioning = ( line === "YES" ) ;
77- }
78- }
79- }
80-
8152return {
8253 id : instanceId ,
8354 name : instanceId ,
@@ -92,8 +63,5 @@ return {
9263 memory : memory ,
9364 storage : storage
9465 } ,
95- mounts : mounts ,
96- node_installed : nodeInstalled ,
97- openclaw_installed : openclawInstalled ,
98- is_provisioning : isProvisioning
66+ mounts : mounts
9967} ;
0 commit comments