neoagent 2.3.1-beta.75 → 2.3.1-beta.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
b471096a858adac09a31cca397b869ca
|
|
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"42d3d75a56efe1a2e9902f52dc8006099c45d9
|
|
|
37
37
|
|
|
38
38
|
_flutter.loader.load({
|
|
39
39
|
serviceWorkerSettings: {
|
|
40
|
-
serviceWorkerVersion: "
|
|
40
|
+
serviceWorkerVersion: "2213681945" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
|
|
41
41
|
}
|
|
42
42
|
});
|
|
@@ -127331,7 +127331,7 @@ r===$&&A.b()
|
|
|
127331
127331
|
o.push(A.id(p,A.iS(!1,new A.a3(B.tF,A.e_(new A.cU(B.h8,new A.a5o(r,p),p),p,p),p),!1,B.I,!0),p,p,0,0,0,p))}r=!1
|
|
127332
127332
|
if(!s.ay)if(!s.ch){r=s.e
|
|
127333
127333
|
r===$&&A.b()
|
|
127334
|
-
r=B.b.A("
|
|
127334
|
+
r=B.b.A("mp2fqebp-34b0386").length!==0&&r.b}if(r){r=s.d
|
|
127335
127335
|
r===$&&A.b()
|
|
127336
127336
|
r=r.V&&!r.a0?84:0
|
|
127337
127337
|
q=s.e
|
|
@@ -131991,7 +131991,7 @@ $S:324}
|
|
|
131991
131991
|
A.Y_.prototype={}
|
|
131992
131992
|
A.R_.prototype={
|
|
131993
131993
|
mJ(a){var s=this
|
|
131994
|
-
if(B.b.A("
|
|
131994
|
+
if(B.b.A("mp2fqebp-34b0386").length===0||s.a!=null)return
|
|
131995
131995
|
s.zY()
|
|
131996
131996
|
s.a=A.pN(B.Pq,new A.b3i(s))},
|
|
131997
131997
|
zY(){var s=0,r=A.l(t.H),q,p=2,o=[],n=this,m,l,k,j,i,h,g,f
|
|
@@ -132009,7 +132009,7 @@ if(!t.f.b(k)){s=1
|
|
|
132009
132009
|
break}i=J.Z(k,"buildId")
|
|
132010
132010
|
h=i==null?null:B.b.A(J.r(i))
|
|
132011
132011
|
j=h==null?"":h
|
|
132012
|
-
if(J.bi(j)===0||J.c(j,"
|
|
132012
|
+
if(J.bi(j)===0||J.c(j,"mp2fqebp-34b0386")){s=1
|
|
132013
132013
|
break}n.b=!0
|
|
132014
132014
|
n.J()
|
|
132015
132015
|
p=2
|
|
@@ -132026,7 +132026,7 @@ case 2:return A.i(o.at(-1),r)}})
|
|
|
132026
132026
|
return A.k($async$zY,r)},
|
|
132027
132027
|
v0(){var s=0,r=A.l(t.H),q,p=2,o=[],n=this,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1
|
|
132028
132028
|
var $async$v0=A.h(function(a2,a3){if(a2===1){o.push(a3)
|
|
132029
|
-
s=p}for(;;)switch(s){case 0:if(B.b.A("
|
|
132029
|
+
s=p}for(;;)switch(s){case 0:if(B.b.A("mp2fqebp-34b0386").length===0||n.c){s=1
|
|
132030
132030
|
break}n.c=!0
|
|
132031
132031
|
n.J()
|
|
132032
132032
|
p=4
|
|
@@ -26,7 +26,7 @@ function createCloudInitScript({
|
|
|
26
26
|
|
|
27
27
|
return [
|
|
28
28
|
'#!/usr/bin/env bash',
|
|
29
|
-
'set -
|
|
29
|
+
'set -uo pipefail', // Removed -e to handle non-critical failures gracefully
|
|
30
30
|
'',
|
|
31
31
|
'export DEBIAN_FRONTEND=noninteractive',
|
|
32
32
|
`HOST_SHARE_MOUNT=${JSON.stringify(hostShareMount)}`,
|
|
@@ -48,48 +48,46 @@ function createCloudInitScript({
|
|
|
48
48
|
' echo "neoagent-data ${HOST_DATA_MOUNT} 9p trans=virtio,version=9p2000.L,msize=104857600,rw 0 0" >> /etc/fstab',
|
|
49
49
|
'fi',
|
|
50
50
|
'',
|
|
51
|
-
'mount
|
|
52
|
-
'mount "$
|
|
51
|
+
'mount -a >/dev/null 2>&1 || true',
|
|
52
|
+
'mount "$HOST_SHARE_MOUNT" >/dev/null 2>&1 || true',
|
|
53
|
+
'mount "$HOST_DATA_MOUNT" >/dev/null 2>&1 || true',
|
|
53
54
|
'',
|
|
54
|
-
'# Redirect logs to
|
|
55
|
+
'# Redirect logs to both host-writable share and console',
|
|
55
56
|
'LOG_FILE="${HOST_DATA_MOUNT}/bootstrap.log"',
|
|
56
|
-
'exec >"$LOG_FILE" 2>&1',
|
|
57
|
-
'echo "NeoAgent guest bootstrap starting
|
|
57
|
+
'exec > >(tee -a "$LOG_FILE" >/dev/console) 2>&1',
|
|
58
|
+
'echo "NeoAgent guest bootstrap starting..."',
|
|
58
59
|
'',
|
|
59
|
-
'
|
|
60
|
-
'
|
|
61
|
-
'
|
|
62
|
-
'
|
|
63
|
-
'
|
|
64
|
-
'
|
|
65
|
-
'
|
|
66
|
-
'
|
|
67
|
-
'
|
|
68
|
-
'
|
|
69
|
-
'
|
|
70
|
-
'
|
|
71
|
-
'
|
|
72
|
-
'
|
|
73
|
-
'
|
|
74
|
-
'
|
|
75
|
-
'
|
|
76
|
-
'
|
|
77
|
-
'
|
|
78
|
-
'
|
|
79
|
-
'
|
|
80
|
-
'
|
|
81
|
-
'
|
|
82
|
-
'
|
|
83
|
-
'
|
|
84
|
-
'
|
|
85
|
-
' libdbus-1-3 \\',
|
|
86
|
-
' libpango-1.0-0
|
|
87
|
-
' libpangocairo-1.0-0 \\',
|
|
88
|
-
' libxshmfence1',
|
|
89
|
-
'apt-get clean >/dev/null 2>&1 || true',
|
|
90
|
-
'rm -rf /var/lib/apt/lists/*',
|
|
60
|
+
'function retry_cmd() {',
|
|
61
|
+
' local n=1',
|
|
62
|
+
' local max=3',
|
|
63
|
+
' local delay=5',
|
|
64
|
+
' while true; do',
|
|
65
|
+
' "$@" && break || {',
|
|
66
|
+
' if [[ $n -lt $max ]]; then',
|
|
67
|
+
' ((n++))',
|
|
68
|
+
' echo "Command failed. Attempt $n/$max in ${delay}s..."',
|
|
69
|
+
' sleep $delay',
|
|
70
|
+
' else',
|
|
71
|
+
' echo "The command has failed after $n attempts." >&2',
|
|
72
|
+
' return 1',
|
|
73
|
+
' fi',
|
|
74
|
+
' }',
|
|
75
|
+
' done',
|
|
76
|
+
'}',
|
|
77
|
+
'',
|
|
78
|
+
'echo "Updating package lists..."',
|
|
79
|
+
'retry_cmd apt-get update || echo "Warning: apt-get update failed, proceeding with cached lists."',
|
|
80
|
+
'',
|
|
81
|
+
'echo "Installing dependencies..."',
|
|
82
|
+
'retry_cmd apt-get install -y --no-install-recommends \\',
|
|
83
|
+
' curl ca-certificates gnupg openjdk-17-jre-headless git rsync build-essential \\',
|
|
84
|
+
' python3 unzip libatk1.0-0 libatk-bridge2.0-0 libatspi2.0-0 libcups2 \\',
|
|
85
|
+
' libx11-xcb1 libgtk-3-0 libnss3 libnspr4 libxcomposite1 libxdamage1 \\',
|
|
86
|
+
' libxrandr2 libxkbcommon0 libasound2t64 libgbm1 libdrm2 libdbus-1-3 \\',
|
|
87
|
+
' libpango-1.0-0 libpangocairo-1.0-0 libxshmfence1 || echo "Warning: Some dependencies failed to install."',
|
|
91
88
|
'',
|
|
92
89
|
'if [ -d "$HOST_SHARE_MOUNT" ]; then',
|
|
90
|
+
' echo "Syncing guest agent sources..."',
|
|
93
91
|
' SYNC_PATHS=(',
|
|
94
92
|
' server/guest-agent.package.json:package.json',
|
|
95
93
|
' runtime/env.js',
|
|
@@ -100,36 +98,31 @@ function createCloudInitScript({
|
|
|
100
98
|
' server/services/android',
|
|
101
99
|
' )',
|
|
102
100
|
' for relPath in "${SYNC_PATHS[@]}"; do',
|
|
103
|
-
' sourceRelPath="$relPath"',
|
|
104
|
-
' targetRelPath="$relPath"',
|
|
105
|
-
' if [[ "$relPath" == *:* ]]; then',
|
|
106
|
-
' sourceRelPath="${relPath%%:*}"',
|
|
107
|
-
' targetRelPath="${relPath##*:}"',
|
|
108
|
-
' fi',
|
|
101
|
+
' sourceRelPath="${relPath%%:*}"',
|
|
102
|
+
' targetRelPath="${relPath##*:}"',
|
|
109
103
|
' sourcePath="$HOST_SHARE_MOUNT/$sourceRelPath"',
|
|
110
104
|
' targetPath="$APP_DIR/$targetRelPath"',
|
|
111
|
-
' if [
|
|
112
|
-
'
|
|
113
|
-
'
|
|
114
|
-
'
|
|
115
|
-
'
|
|
116
|
-
'
|
|
117
|
-
'
|
|
118
|
-
'
|
|
105
|
+
' if [ -e "$sourcePath" ]; then',
|
|
106
|
+
' mkdir -p "$(dirname "$targetPath")"',
|
|
107
|
+
' if [ -d "$sourcePath" ]; then',
|
|
108
|
+
' mkdir -p "$targetPath"',
|
|
109
|
+
' rsync -a --delete "$sourcePath"/ "$targetPath"/',
|
|
110
|
+
' else',
|
|
111
|
+
' rsync -a "$sourcePath" "$targetPath"',
|
|
112
|
+
' fi',
|
|
119
113
|
' else',
|
|
120
|
-
'
|
|
114
|
+
' echo "Warning: Optional source path missing: $relPath"',
|
|
121
115
|
' fi',
|
|
122
116
|
' done',
|
|
123
117
|
'else',
|
|
124
|
-
' echo "Host repo share is not available." >&2',
|
|
118
|
+
' echo "Error: Host repo share is not available. Bootstrap cannot continue." >&2',
|
|
125
119
|
' exit 1',
|
|
126
120
|
'fi',
|
|
127
121
|
'',
|
|
128
122
|
'if ! command -v node >/dev/null 2>&1 || ! node -e "process.exit(Number(process.versions.node.split(\'.\')[0]) >= 20 ? 0 : 1)"; then',
|
|
129
|
-
'
|
|
130
|
-
'
|
|
131
|
-
' apt-get
|
|
132
|
-
' rm -rf /var/lib/apt/lists/*',
|
|
123
|
+
' echo "Installing Node.js..."',
|
|
124
|
+
' curl -fsSL ' + JSON.stringify(nodeSourceSetupUrl) + ' | bash - || true',
|
|
125
|
+
' retry_cmd apt-get install -y --no-install-recommends nodejs || { echo "Error: Failed to install Node.js" >&2; exit 1; }',
|
|
133
126
|
'fi',
|
|
134
127
|
'',
|
|
135
128
|
`printf '%s\n' ${JSON.stringify(`NEOAGENT_VM_GUEST_TOKEN_B64=${guestTokenB64}`)} > "$ENV_FILE"`,
|
|
@@ -138,26 +131,27 @@ function createCloudInitScript({
|
|
|
138
131
|
'',
|
|
139
132
|
'cd "$APP_DIR"',
|
|
140
133
|
'if [ ! -d node_modules ] || [ ! -f node_modules/.neoagent-bootstrap-stamp ] || [ package.json -nt node_modules/.neoagent-bootstrap-stamp ]; then',
|
|
134
|
+
' echo "Installing npm dependencies..."',
|
|
141
135
|
' export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1',
|
|
142
|
-
' npm install --omit=dev --no-audit --no-fund',
|
|
136
|
+
' retry_cmd npm install --omit=dev --no-audit --no-fund || echo "Warning: npm install failed."',
|
|
143
137
|
' mkdir -p node_modules',
|
|
144
138
|
' date > node_modules/.neoagent-bootstrap-stamp',
|
|
145
139
|
'fi',
|
|
146
140
|
'',
|
|
147
|
-
'# Install Playwright browser binaries
|
|
141
|
+
'# Install Playwright browser binaries',
|
|
148
142
|
'PLAYWRIGHT_BROWSERS_PATH="$APP_DIR/.playwright-browsers"',
|
|
149
143
|
'PLAYWRIGHT_STAMP="$PLAYWRIGHT_BROWSERS_PATH/.chromium-installed"',
|
|
150
144
|
'if [ ! -f "$PLAYWRIGHT_STAMP" ]; then',
|
|
145
|
+
' echo "Installing Playwright browsers..."',
|
|
151
146
|
' mkdir -p "$PLAYWRIGHT_BROWSERS_PATH"',
|
|
152
147
|
' PLAYWRIGHT_BROWSERS_PATH="$PLAYWRIGHT_BROWSERS_PATH" npx playwright install chromium --with-deps || \\',
|
|
153
148
|
' PLAYWRIGHT_BROWSERS_PATH="$PLAYWRIGHT_BROWSERS_PATH" node ./node_modules/playwright-chromium/install.js || true',
|
|
154
149
|
' date > "$PLAYWRIGHT_STAMP"',
|
|
155
150
|
'fi',
|
|
156
|
-
'export PLAYWRIGHT_BROWSERS_PATH',
|
|
157
151
|
'',
|
|
158
152
|
'systemctl daemon-reload',
|
|
159
|
-
'systemctl enable neoagent-guest-agent.service',
|
|
160
|
-
'systemctl restart neoagent-guest-agent.service',
|
|
153
|
+
'systemctl enable neoagent-guest-agent.service || true',
|
|
154
|
+
'systemctl restart neoagent-guest-agent.service || true',
|
|
161
155
|
'touch "$BOOTSTRAP_MARKER"',
|
|
162
156
|
'echo "NeoAgent guest bootstrap completed."',
|
|
163
157
|
'',
|