@songsid/agend 2.1.12 → 2.2.0-alpha.2
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/README.md +4 -2
- package/README.zh-TW.md +4 -2
- package/dist/agent-cli.js +6 -1
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.js +68 -12
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-token-header.d.ts +13 -0
- package/dist/agent-token-header.js +16 -0
- package/dist/agent-token-header.js.map +1 -0
- package/dist/auth/one-time-code.d.ts +19 -0
- package/dist/auth/one-time-code.js +49 -0
- package/dist/auth/one-time-code.js.map +1 -0
- package/dist/auth-api.d.ts +52 -0
- package/dist/auth-api.js +346 -0
- package/dist/auth-api.js.map +1 -0
- package/dist/backend/antigravity.js +4 -3
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-code.d.ts +4 -0
- package/dist/backend/claude-code.js +97 -0
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/codex.js +59 -30
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/grok.js +1 -1
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/kiro-agent.d.ts +66 -0
- package/dist/backend/kiro-agent.js +302 -0
- package/dist/backend/kiro-agent.js.map +1 -0
- package/dist/backend/kiro-identity.d.ts +80 -0
- package/dist/backend/kiro-identity.js +537 -0
- package/dist/backend/kiro-identity.js.map +1 -0
- package/dist/backend/kiro-v2-store-worker.d.ts +1 -0
- package/dist/backend/kiro-v2-store-worker.js +87 -0
- package/dist/backend/kiro-v2-store-worker.js.map +1 -0
- package/dist/backend/kiro-v2-store.d.ts +54 -0
- package/dist/backend/kiro-v2-store.js +131 -0
- package/dist/backend/kiro-v2-store.js.map +1 -0
- package/dist/backend/kiro-v3-identity.d.ts +5 -0
- package/dist/backend/kiro-v3-identity.js +22 -0
- package/dist/backend/kiro-v3-identity.js.map +1 -1
- package/dist/backend/kiro.d.ts +90 -7
- package/dist/backend/kiro.js +500 -124
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/muse.js +1 -1
- package/dist/backend/muse.js.map +1 -1
- package/dist/backend/types.d.ts +51 -3
- package/dist/backend/types.js.map +1 -1
- package/dist/cache-analysis.d.ts +92 -0
- package/dist/cache-analysis.js +147 -0
- package/dist/cache-analysis.js.map +1 -0
- package/dist/cache-ledger.d.ts +108 -0
- package/dist/cache-ledger.js +230 -0
- package/dist/cache-ledger.js.map +1 -0
- package/dist/cache-prices.d.ts +32 -0
- package/dist/cache-prices.js +73 -0
- package/dist/cache-prices.js.map +1 -0
- package/dist/cache-scan.d.ts +39 -0
- package/dist/cache-scan.js +115 -0
- package/dist/cache-scan.js.map +1 -0
- package/dist/cache-service.d.ts +115 -0
- package/dist/cache-service.js +417 -0
- package/dist/cache-service.js.map +1 -0
- package/dist/channel/adapters/discord.d.ts +1 -0
- package/dist/channel/adapters/discord.js +29 -10
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +1 -0
- package/dist/channel/adapters/telegram.js +13 -1
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/types.d.ts +9 -1
- package/dist/classic-channel-manager.d.ts +18 -10
- package/dist/classic-channel-manager.js +45 -18
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/cli-entry.d.ts +19 -0
- package/dist/cli-entry.js +36 -0
- package/dist/cli-entry.js.map +1 -0
- package/dist/cli.js +471 -146
- package/dist/cli.js.map +1 -1
- package/dist/command-table.d.ts +5 -3
- package/dist/command-table.js +29 -27
- package/dist/command-table.js.map +1 -1
- package/dist/config-validator.js +46 -0
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +12 -0
- package/dist/config.js.map +1 -1
- package/dist/connection-secrets.d.ts +6 -0
- package/dist/connection-secrets.js +4 -0
- package/dist/connection-secrets.js.map +1 -1
- package/dist/daemon.d.ts +95 -4
- package/dist/daemon.js +748 -111
- package/dist/daemon.js.map +1 -1
- package/dist/darwin-memory.d.ts +6 -1
- package/dist/darwin-memory.js +17 -6
- package/dist/darwin-memory.js.map +1 -1
- package/dist/delivery-consumed-watch.d.ts +85 -0
- package/dist/delivery-consumed-watch.js +244 -0
- package/dist/delivery-consumed-watch.js.map +1 -0
- package/dist/delivery-outbox.d.ts +61 -0
- package/dist/delivery-outbox.js +120 -2
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/delivery-reconciliation.d.ts +14 -5
- package/dist/delivery-reconciliation.js +27 -4
- package/dist/delivery-reconciliation.js.map +1 -1
- package/dist/delivery-reconciliation.test.js +35 -1
- package/dist/delivery-reconciliation.test.js.map +1 -1
- package/dist/event-log.d.ts +4 -1
- package/dist/event-log.js +6 -3
- package/dist/event-log.js.map +1 -1
- package/dist/event-loop-watch.d.ts +28 -0
- package/dist/event-loop-watch.js +75 -3
- package/dist/event-loop-watch.js.map +1 -1
- package/dist/fleet-context.d.ts +22 -2
- package/dist/fleet-control-audit.d.ts +5 -0
- package/dist/fleet-control-audit.js +7 -0
- package/dist/fleet-control-audit.js.map +1 -1
- package/dist/fleet-level-config.d.ts +2 -2
- package/dist/fleet-level-config.js +28 -1
- package/dist/fleet-level-config.js.map +1 -1
- package/dist/fleet-manager.d.ts +339 -12
- package/dist/fleet-manager.js +2623 -461
- package/dist/fleet-manager.js.map +1 -1
- package/dist/full-restart.js +2 -3
- package/dist/full-restart.js.map +1 -1
- package/dist/general-knowledge/skills/persona-emoji/SKILL.md +3 -1
- package/dist/host-memory.d.ts +4 -0
- package/dist/host-memory.js.map +1 -1
- package/dist/install-lock.d.ts +49 -0
- package/dist/install-lock.js +200 -0
- package/dist/install-lock.js.map +1 -0
- package/dist/instance-config-impact.js +8 -2
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +10 -5
- package/dist/instance-lifecycle.js +162 -53
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/locale.js +164 -16
- package/dist/locale.js.map +1 -1
- package/dist/login-controller.d.ts +2 -0
- package/dist/login-controller.js +17 -5
- package/dist/login-controller.js.map +1 -1
- package/dist/memory-pressure.d.ts +7 -8
- package/dist/memory-pressure.js +76 -15
- package/dist/memory-pressure.js.map +1 -1
- package/dist/monotonic-budget.d.ts +2 -0
- package/dist/monotonic-budget.js +28 -0
- package/dist/monotonic-budget.js.map +1 -0
- package/dist/needs-you-hub.d.ts +114 -0
- package/dist/needs-you-hub.js +370 -0
- package/dist/needs-you-hub.js.map +1 -0
- package/dist/needs-you-live.d.ts +116 -0
- package/dist/needs-you-live.js +228 -0
- package/dist/needs-you-live.js.map +1 -0
- package/dist/needs-you.d.ts +132 -0
- package/dist/needs-you.js +164 -0
- package/dist/needs-you.js.map +1 -0
- package/dist/node-version-guard.d.ts +30 -0
- package/dist/node-version-guard.js +50 -0
- package/dist/node-version-guard.js.map +1 -0
- package/dist/operator-control-paths.d.ts +4 -0
- package/dist/operator-control-paths.js +24 -0
- package/dist/operator-control-paths.js.map +1 -0
- package/dist/outbound-handlers.d.ts +2 -0
- package/dist/outbound-handlers.js +9 -2
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +5 -5
- package/dist/outbound-schemas.js +1 -1
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/package-preimage.d.ts +26 -0
- package/dist/package-preimage.js +96 -0
- package/dist/package-preimage.js.map +1 -0
- package/dist/profile-control.js +4 -20
- package/dist/profile-control.js.map +1 -1
- package/dist/public-web-gateway.d.ts +18 -0
- package/dist/public-web-gateway.js +141 -0
- package/dist/public-web-gateway.js.map +1 -0
- package/dist/public-web-link.d.ts +53 -0
- package/dist/public-web-link.js +175 -0
- package/dist/public-web-link.js.map +1 -0
- package/dist/quickstart-api.d.ts +8 -1
- package/dist/quickstart-api.js +86 -48
- package/dist/quickstart-api.js.map +1 -1
- package/dist/quickstart.d.ts +1 -0
- package/dist/quickstart.js +16 -6
- package/dist/quickstart.js.map +1 -1
- package/dist/restart-guard.d.ts +52 -0
- package/dist/restart-guard.js +109 -0
- package/dist/restart-guard.js.map +1 -0
- package/dist/scheduler/db.d.ts +7 -1
- package/dist/scheduler/db.js +44 -2
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/index.d.ts +1 -1
- package/dist/scheduler/retry-label.d.ts +11 -0
- package/dist/scheduler/retry-label.js +24 -0
- package/dist/scheduler/retry-label.js.map +1 -0
- package/dist/scheduler/scheduler.d.ts +55 -2
- package/dist/scheduler/scheduler.js +220 -8
- package/dist/scheduler/scheduler.js.map +1 -1
- package/dist/scheduler/types.d.ts +22 -0
- package/dist/scheduler/types.js.map +1 -1
- package/dist/secret-store.d.ts +5 -0
- package/dist/secret-store.js +20 -0
- package/dist/secret-store.js.map +1 -1
- package/dist/service-activation.d.ts +152 -0
- package/dist/service-activation.js +407 -0
- package/dist/service-activation.js.map +1 -0
- package/dist/service-installer.d.ts +63 -1
- package/dist/service-installer.js +141 -16
- package/dist/service-installer.js.map +1 -1
- package/dist/service-plan.d.ts +65 -0
- package/dist/service-plan.js +108 -0
- package/dist/service-plan.js.map +1 -0
- package/dist/service-restart-selection.d.ts +6 -5
- package/dist/service-restart-selection.js +6 -5
- package/dist/service-restart-selection.js.map +1 -1
- package/dist/settings-api.d.ts +10 -2
- package/dist/settings-api.js +216 -72
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +20 -0
- package/dist/settings-baseline.js +104 -0
- package/dist/settings-baseline.js.map +1 -0
- package/dist/settings-change.d.ts +21 -0
- package/dist/settings-change.js +161 -0
- package/dist/settings-change.js.map +1 -0
- package/dist/settings-confirmation.d.ts +105 -0
- package/dist/settings-confirmation.js +232 -0
- package/dist/settings-confirmation.js.map +1 -0
- package/dist/settings-control.d.ts +41 -0
- package/dist/settings-control.js +294 -0
- package/dist/settings-control.js.map +1 -0
- package/dist/settings-effect.d.ts +24 -0
- package/dist/settings-effect.js +169 -0
- package/dist/settings-effect.js.map +1 -0
- package/dist/settings-http-confirmation.d.ts +29 -0
- package/dist/settings-http-confirmation.js +123 -0
- package/dist/settings-http-confirmation.js.map +1 -0
- package/dist/settings-instance-patch.d.ts +4 -0
- package/dist/settings-instance-patch.js +26 -0
- package/dist/settings-instance-patch.js.map +1 -0
- package/dist/settings-request-capability.d.ts +16 -0
- package/dist/settings-request-capability.js +32 -0
- package/dist/settings-request-capability.js.map +1 -0
- package/dist/settings-transaction.d.ts +65 -0
- package/dist/settings-transaction.js +223 -0
- package/dist/settings-transaction.js.map +1 -0
- package/dist/setup-auth.d.ts +10 -18
- package/dist/setup-auth.js +14 -38
- package/dist/setup-auth.js.map +1 -1
- package/dist/setup-form.d.ts +1 -1
- package/dist/setup-form.js +75 -18
- package/dist/setup-form.js.map +1 -1
- package/dist/setup-guide.d.ts +13 -0
- package/dist/setup-guide.js +25 -0
- package/dist/setup-guide.js.map +1 -0
- package/dist/setup-host.d.ts +16 -0
- package/dist/setup-host.js +199 -35
- package/dist/setup-host.js.map +1 -1
- package/dist/setup-wizard.js +5 -1
- package/dist/setup-wizard.js.map +1 -1
- package/dist/slash-authz.d.ts +17 -3
- package/dist/slash-authz.js +5 -0
- package/dist/slash-authz.js.map +1 -1
- package/dist/spawn-gate.js +3 -3
- package/dist/spawn-gate.js.map +1 -1
- package/dist/sqlite-open-errors.d.ts +12 -0
- package/dist/sqlite-open-errors.js +13 -0
- package/dist/sqlite-open-errors.js.map +1 -0
- package/dist/statusline-watcher.d.ts +5 -0
- package/dist/statusline-watcher.js +2 -0
- package/dist/statusline-watcher.js.map +1 -1
- package/dist/steer-capability.d.ts +6 -0
- package/dist/steer-capability.js +8 -0
- package/dist/steer-capability.js.map +1 -1
- package/dist/sync-work-attribution.d.ts +14 -0
- package/dist/sync-work-attribution.js +43 -8
- package/dist/sync-work-attribution.js.map +1 -1
- package/dist/tips.js +10 -5
- package/dist/tips.js.map +1 -1
- package/dist/tmux-control.d.ts +57 -5
- package/dist/tmux-control.js +379 -61
- package/dist/tmux-control.js.map +1 -1
- package/dist/tmux-manager.d.ts +20 -6
- package/dist/tmux-manager.js +90 -47
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tmux-read.d.ts +59 -0
- package/dist/tmux-read.js +213 -0
- package/dist/tmux-read.js.map +1 -0
- package/dist/topic-commands.d.ts +21 -10
- package/dist/topic-commands.js +205 -63
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-delta-reader.js +2 -1
- package/dist/transcript-delta-reader.js.map +1 -1
- package/dist/tunnel/cloudflared-install.d.ts +2 -0
- package/dist/tunnel/cloudflared-install.js +1 -1
- package/dist/tunnel/cloudflared-install.js.map +1 -1
- package/dist/tunnel/purpose-lane.d.ts +14 -0
- package/dist/tunnel/purpose-lane.js +43 -0
- package/dist/tunnel/purpose-lane.js.map +1 -0
- package/dist/turn-reply-guard.d.ts +2 -0
- package/dist/turn-reply-guard.js +10 -1
- package/dist/turn-reply-guard.js.map +1 -1
- package/dist/types.d.ts +33 -0
- package/dist/ui/app.html +18 -0
- package/dist/ui/chat-commands.js +43 -0
- package/dist/ui/chat-render.js +478 -0
- package/dist/ui/chat-store.js +318 -0
- package/dist/ui/chat-strings.js +89 -0
- package/dist/ui/chat-thread.js +246 -0
- package/dist/ui/chat-tour.js +116 -0
- package/dist/ui/fleet-cache.js +168 -0
- package/dist/ui/fleet-org.js +142 -0
- package/dist/ui/panel-chat.js +504 -0
- package/dist/ui/panel-fleet.js +427 -0
- package/dist/ui/panel-needs.js +202 -0
- package/dist/ui/panel-settings.js +754 -0
- package/dist/ui/preview-panel.js +202 -0
- package/dist/ui/preview.js +270 -0
- package/dist/ui/settings-apply.js +239 -0
- package/dist/ui/settings-confirm.js +186 -0
- package/dist/ui/settings-dialogs.js +546 -0
- package/dist/ui/settings-model.js +277 -0
- package/dist/ui/settings-strings.js +654 -0
- package/dist/ui/settings-wizard.js +140 -0
- package/dist/ui/shared/agend-auth.js +93 -0
- package/dist/ui/shared/app-ctx.js +80 -0
- package/dist/ui/shared/app-html.js +9 -0
- package/dist/ui/shared/app-i18n.js +95 -0
- package/dist/ui/shared/app-nav.js +73 -0
- package/dist/ui/shared/app-needs.js +114 -0
- package/dist/ui/shared/app-route.js +73 -0
- package/dist/ui/shared/app-session.js +66 -0
- package/dist/ui/shared/app-shell.js +346 -0
- package/dist/ui/shared/app-store.js +51 -0
- package/dist/ui/shared/app-stream.js +201 -0
- package/dist/ui/shared/app.css +820 -0
- package/dist/ui/shared/app.js +88 -0
- package/dist/ui/shared/fonts/OFL.txt +92 -0
- package/dist/ui/shared/fonts/README.md +21 -0
- package/dist/ui/shared/fonts/inter.woff2 +0 -0
- package/dist/ui/shared/htm.module.js +1 -0
- package/dist/ui/shared/panel-view.js +655 -0
- package/dist/ui/shared/preact-hooks.module.js +2 -0
- package/dist/ui/shared/preact.module.js +2 -0
- package/dist/ui/shared/signin.js +142 -0
- package/dist/ui/shared/theme.js +29 -0
- package/dist/ui/shared/tokens.css +153 -0
- package/dist/ui/shared/ui-confirm.js +43 -0
- package/dist/ui/shared/ui-dialog.js +45 -0
- package/dist/ui/shared/ui-icons.js +63 -0
- package/dist/ui/shared/ui-menu.js +39 -0
- package/dist/ui/shared/ui-states.js +20 -0
- package/dist/ui/shared/ui-toast.js +18 -0
- package/dist/ui/shared/vendor/htm.LICENSE +202 -0
- package/dist/ui/shared/vendor/preact.LICENSE +21 -0
- package/dist/ui/shared/vendor/vendor.json +39 -0
- package/dist/ui/shared/view-strings.js +309 -0
- package/dist/ui/signin.html +52 -0
- package/dist/update-check.d.ts +6 -2
- package/dist/update-check.js +12 -3
- package/dist/update-check.js.map +1 -1
- package/dist/update-dispatch.d.ts +28 -0
- package/dist/update-dispatch.js +73 -0
- package/dist/update-dispatch.js.map +1 -0
- package/dist/update-install.d.ts +129 -0
- package/dist/update-install.js +262 -0
- package/dist/update-install.js.map +1 -0
- package/dist/upgrade-notices.d.ts +17 -0
- package/dist/upgrade-notices.js +93 -0
- package/dist/upgrade-notices.js.map +1 -0
- package/dist/usage/statusline-usage.d.ts +2 -0
- package/dist/usage/statusline-usage.js +14 -10
- package/dist/usage/statusline-usage.js.map +1 -1
- package/dist/view-api.d.ts +6 -1
- package/dist/view-api.js +62 -51
- package/dist/view-api.js.map +1 -1
- package/dist/web-api.d.ts +85 -14
- package/dist/web-api.js +557 -77
- package/dist/web-api.js.map +1 -1
- package/dist/web-auth.d.ts +71 -27
- package/dist/web-auth.js +169 -69
- package/dist/web-auth.js.map +1 -1
- package/dist/web-body.d.ts +3 -0
- package/dist/web-body.js +55 -0
- package/dist/web-body.js.map +1 -0
- package/dist/web-channel-echo.d.ts +9 -0
- package/dist/web-channel-echo.js +55 -0
- package/dist/web-channel-echo.js.map +1 -0
- package/dist/web-chat-history.d.ts +125 -0
- package/dist/web-chat-history.js +184 -0
- package/dist/web-chat-history.js.map +1 -0
- package/dist/web-commands.d.ts +77 -0
- package/dist/web-commands.js +81 -0
- package/dist/web-commands.js.map +1 -0
- package/dist/web-continuation.d.ts +7 -0
- package/dist/web-continuation.js +22 -0
- package/dist/web-continuation.js.map +1 -0
- package/dist/web-host-guard.d.ts +34 -0
- package/dist/web-host-guard.js +57 -1
- package/dist/web-host-guard.js.map +1 -1
- package/dist/web-login.d.ts +72 -0
- package/dist/web-login.js +132 -0
- package/dist/web-login.js.map +1 -0
- package/dist/web-org.d.ts +55 -0
- package/dist/web-org.js +67 -0
- package/dist/web-org.js.map +1 -0
- package/dist/web-preview.d.ts +77 -0
- package/dist/web-preview.js +240 -0
- package/dist/web-preview.js.map +1 -0
- package/dist/web-request-context.d.ts +10 -0
- package/dist/web-request-context.js +13 -0
- package/dist/web-request-context.js.map +1 -0
- package/dist/web-session.d.ts +167 -0
- package/dist/web-session.js +389 -0
- package/dist/web-session.js.map +1 -0
- package/dist/web-shell-routes.d.ts +59 -0
- package/dist/web-shell-routes.js +96 -0
- package/dist/web-shell-routes.js.map +1 -0
- package/dist/web-upload.d.ts +183 -0
- package/dist/web-upload.js +468 -0
- package/dist/web-upload.js.map +1 -0
- package/dist/website-tips-renderer.d.ts +2 -2
- package/dist/website-tips-renderer.js +3 -3
- package/dist/website-tips-renderer.js.map +1 -1
- package/launcher/agend +110 -0
- package/launcher/agend-agent +110 -0
- package/launcher/agend-agent.cjs +4 -0
- package/launcher/agend.cjs +4 -0
- package/launcher/install-admission.cjs +105 -0
- package/launcher/launch.cjs +64 -0
- package/launcher/postinstall.cjs +114 -0
- package/launcher/run-in-process.cjs +13 -0
- package/launcher/runtime-platform.cjs +86 -0
- package/launcher/runtime-select.cjs +217 -0
- package/package.json +18 -7
- package/scripts/preinstall-guard.cjs +55 -0
- package/templates/launchd.plist.ejs +2 -2
- package/templates/systemd.service.ejs +1 -1
- package/dist/ui/dashboard.html +0 -774
- package/dist/ui/settings.html +0 -2165
- package/dist/ui/view.html +0 -1139
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// #1450 C2: one verified interpreter-selection protocol, shared by the launchers, the postinstall and the updater's
|
|
3
|
+
// probe of a target package. Same syntax constraints as runtime-platform.cjs. It never touches the network and does
|
|
4
|
+
// at most one bounded probe.
|
|
5
|
+
var fs = require("fs");
|
|
6
|
+
var path = require("path");
|
|
7
|
+
var childProcess = require("child_process");
|
|
8
|
+
var platform = require("./runtime-platform.cjs");
|
|
9
|
+
|
|
10
|
+
var RECEIPT = ".agend-runtime.json";
|
|
11
|
+
var KEY = ".agend-runtime.key";
|
|
12
|
+
var MIN_NAPI = 10;
|
|
13
|
+
|
|
14
|
+
function readJson(file) {
|
|
15
|
+
try { return JSON.parse(fs.readFileSync(file, "utf8")); } catch (e) { return null; }
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Physically absent (lstat: ENOENT/ENOTDIR)? A dangling symlink, or a path that cannot be inspected, is PRESENT. */
|
|
19
|
+
function absent(file) {
|
|
20
|
+
try { fs.lstatSync(file); return false; } catch (e) { return e.code === "ENOENT" || e.code === "ENOTDIR"; }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* THE RECEIPT CONTRACT (#1460 review), shared word for word with the sh bins (launcher/agend), which check it before
|
|
25
|
+
* they exec anything: the receipt is exactly `JSON.stringify(receipt, null, 2) + "\n"` of these keys in this order —
|
|
26
|
+
* strings plain (no `"`, `\` or control characters), numbers non-negative integers, `libc` "glibc" or null. Anything
|
|
27
|
+
* else — unreadable, not JSON, valid JSON in another shape or layout — is "invalid". `mtime` is whole seconds (what
|
|
28
|
+
* `stat` gives a shell, and what survives a copy that preserves timestamps).
|
|
29
|
+
*/
|
|
30
|
+
var RECEIPT_KEYS = ["receipt", "pinnedVersion", "nodePath", "size", "mtime", "sha256", "napi", "platform", "arch", "libc", "verifiedAt"];
|
|
31
|
+
var PLAIN = /^[^"\\\u0000-\u001f]*$/;
|
|
32
|
+
function receiptText(r) {
|
|
33
|
+
var ordered = {};
|
|
34
|
+
RECEIPT_KEYS.forEach(function (k) { ordered[k] = r[k]; });
|
|
35
|
+
return JSON.stringify(ordered, null, 2) + "\n";
|
|
36
|
+
}
|
|
37
|
+
function receiptShapeOk(r) {
|
|
38
|
+
var int = function (n) { return typeof n === "number" && Number.isSafeInteger(n) && n >= 0; };
|
|
39
|
+
var str = function (s) { return typeof s === "string" && PLAIN.test(s); };
|
|
40
|
+
return r.receipt === 2 && str(r.pinnedVersion) && /^\d+\.\d+\.\d+(-agend\.\d+)?$/.test(r.pinnedVersion)
|
|
41
|
+
&& str(r.nodePath) && r.nodePath.charAt(0) === "/" && int(r.size) && int(r.mtime) && typeof r.sha256 === "string" && /^[0-9a-f]{64}$/.test(r.sha256)
|
|
42
|
+
&& int(r.napi) && str(r.platform) && r.platform !== "" && str(r.arch) && r.arch !== "" && (r.libc === "glibc" || r.libc === null) && str(r.verifiedAt) && r.verifiedAt !== "";
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** The receipt, by state: "absent" only when no file is there; "valid" only in the contract's exact form; else "invalid". */
|
|
46
|
+
function readReceipt(file) {
|
|
47
|
+
if (absent(file)) return { state: "absent" };
|
|
48
|
+
var text, value;
|
|
49
|
+
try { text = fs.readFileSync(file, "utf8"); value = JSON.parse(text); } catch (e) { return { state: "invalid" }; }
|
|
50
|
+
if (!value || typeof value !== "object" || Array.isArray(value) || Object.keys(value).join(",") !== RECEIPT_KEYS.join(",")) return { state: "invalid" };
|
|
51
|
+
return receiptShapeOk(value) && text === receiptText(value) ? { state: "valid", value: value } : { state: "invalid" };
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function realpath(file) {
|
|
55
|
+
try { return fs.realpathSync(file); } catch (e) { return null; }
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** The package that contains this launcher: realpath(launcher/..), and it must be @songsid/agend. */
|
|
59
|
+
function packageDir(launcherDir) {
|
|
60
|
+
var dir = realpath(path.join(launcherDir, ".."));
|
|
61
|
+
var manifest = dir && readJson(path.join(dir, "package.json"));
|
|
62
|
+
return manifest && manifest.name === "@songsid/agend" ? { dir: dir, manifest: manifest } : null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** This release's runtime package name and exact pinned version, or null when none is pinned yet. */
|
|
66
|
+
function pinnedRuntime(manifest, host) {
|
|
67
|
+
var name = "@songsid/agend-node-" + host.id;
|
|
68
|
+
var version = manifest.optionalDependencies && manifest.optionalDependencies[name];
|
|
69
|
+
return typeof version === "string" && /^\d+\.\d+\.\d+(-agend\.\d+)?$/.test(version) ? { name: name, version: version } : null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** The candidate is exactly <pkgDir>/node_modules/<name> — never require.resolve, which can walk up to an ancestor. */
|
|
73
|
+
function runtimeCandidate(pkgDir, pin) {
|
|
74
|
+
var dir = path.join(pkgDir, "node_modules", pin.name);
|
|
75
|
+
var exists = !absent(dir);
|
|
76
|
+
var manifest = exists ? readJson(path.join(dir, "package.json")) : null;
|
|
77
|
+
return { dir: dir, exists: exists, manifest: manifest, node: path.join(dir, "bin", "node") };
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Run `node` once, bounded, to read its version and N-API level. */
|
|
81
|
+
function probeNode(node, timeoutMs) {
|
|
82
|
+
try {
|
|
83
|
+
var r = childProcess.spawnSync(node, ["-p", "JSON.stringify({ node: process.versions.node, napi: Number(process.versions.napi) })"], { encoding: "utf8", timeout: timeoutMs || 1000, stdio: ["ignore", "pipe", "ignore"] });
|
|
84
|
+
if (r.status !== 0) return null;
|
|
85
|
+
var v = JSON.parse(String(r.stdout).trim());
|
|
86
|
+
return typeof v.node === "string" && typeof v.napi === "number" ? v : null;
|
|
87
|
+
} catch (e) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function qualifies(versions, engines) {
|
|
93
|
+
return versions && platform.satisfiesEngines(versions.node, engines) && Number(versions.napi) >= MIN_NAPI;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** POSIX `cksum`: CRC-32 (0x04C11DB7, MSB first), then the byte length (LSB first), complemented; "<crc> <length>". */
|
|
97
|
+
var CRC_TABLE = (function () {
|
|
98
|
+
var t = [];
|
|
99
|
+
for (var i = 0; i < 256; i++) { var c = i << 24; for (var j = 0; j < 8; j++) c = c & 0x80000000 ? (c << 1) ^ 0x04C11DB7 : c << 1; t.push(c >>> 0); }
|
|
100
|
+
return t;
|
|
101
|
+
})();
|
|
102
|
+
function cksum(buf) {
|
|
103
|
+
var crc = 0;
|
|
104
|
+
var step = function (b) { crc = ((crc << 8) ^ CRC_TABLE[((crc >>> 24) ^ b) & 0xff]) >>> 0; };
|
|
105
|
+
for (var i = 0; i < buf.length; i++) step(buf[i]);
|
|
106
|
+
for (var n = buf.length; n > 0; n = Math.floor(n / 256)) step(n & 0xff);
|
|
107
|
+
return ((~crc) >>> 0) + " " + buf.length;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* THE ADMISSION KEY (#1460 r3), the one thing the sh bins check before they exec the bundled Node — byte for byte, by
|
|
112
|
+
* rebuilding it from their own measurements (launcher/agend) — and that this selection requires as well. One fact per
|
|
113
|
+
* line: the host's os and cpu, the Node's realpath, size and mtime (whole seconds), and the POSIX `cksum` of both
|
|
114
|
+
* manifests and of the receipt. NO host VERSION (glibc, Darwin kernel): an OS update must never lock AgEnD out of
|
|
115
|
+
* the Node it verified (#1450 leader review) — whether the host can still run it is runtimeSupport()'s minimums, judged
|
|
116
|
+
* fresh on every start, and the libc family is fixed by the package's own `libc` field at install. The postinstall writes it LAST, after everything it binds is
|
|
117
|
+
* final and verified; any later change to a manifest or the receipt changes its CRC, any change to the binary its
|
|
118
|
+
* size or mtime — and then neither side runs it. null when a bound file cannot be read.
|
|
119
|
+
*/
|
|
120
|
+
function runtimeKey(pkgDir, candidate, host) {
|
|
121
|
+
try {
|
|
122
|
+
// Bytes, never decoded text: a path is whatever bytes the filesystem has (#1460 r4), exactly as the shell prints it.
|
|
123
|
+
var real = fs.realpathSync(candidate.node, { encoding: "buffer" });
|
|
124
|
+
var st = fs.lstatSync(real);
|
|
125
|
+
if (!st.isFile()) return null;
|
|
126
|
+
var line = function (text) { return Buffer.from(text + "\n", "utf8"); };
|
|
127
|
+
return Buffer.concat([
|
|
128
|
+
line("agend-runtime-key 2"),
|
|
129
|
+
line("os " + host.platform),
|
|
130
|
+
line("cpu " + host.arch),
|
|
131
|
+
Buffer.from("node ", "utf8"), real, Buffer.from("\n", "utf8"),
|
|
132
|
+
line("size " + st.size),
|
|
133
|
+
line("mtime " + Math.floor(st.mtimeMs / 1000)),
|
|
134
|
+
line("package " + cksum(fs.readFileSync(path.join(pkgDir, "package.json")))),
|
|
135
|
+
line("runtime " + cksum(fs.readFileSync(path.join(candidate.dir, "package.json")))),
|
|
136
|
+
line("receipt " + cksum(fs.readFileSync(path.join(pkgDir, RECEIPT)))),
|
|
137
|
+
]);
|
|
138
|
+
} catch (e) {
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function keyMatches(pkgDir, candidate, host) {
|
|
143
|
+
var want = runtimeKey(pkgDir, candidate, host);
|
|
144
|
+
var have;
|
|
145
|
+
try { have = fs.readFileSync(path.join(pkgDir, KEY)); } catch (e) { return false; }
|
|
146
|
+
return want !== null && Buffer.compare(have, want) === 0;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/** Does the receipt the postinstall wrote still describe this exact binary? (cheap: no hashing at run time) */
|
|
150
|
+
function receiptMatches(receipt, candidate, pin) {
|
|
151
|
+
if (!receipt || receipt.pinnedVersion !== pin.version) return false;
|
|
152
|
+
var real = realpath(candidate.node);
|
|
153
|
+
if (!real || real !== receipt.nodePath) return false;
|
|
154
|
+
try {
|
|
155
|
+
var st = fs.lstatSync(real);
|
|
156
|
+
return st.isFile() && st.size === receipt.size && Math.floor(st.mtimeMs / 1000) === receipt.mtime;
|
|
157
|
+
} catch (e) {
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Choose the Node that runs AgEnD. Result:
|
|
164
|
+
* { ok: true, node, source: "override"|"runtime"|"system", pkgDir, warning? }
|
|
165
|
+
* { ok: false, reason, recovery }
|
|
166
|
+
* deps (injectable for tests): env, execPath, versions ({node, napi}), host (hostPlatform() result), probe(node).
|
|
167
|
+
*/
|
|
168
|
+
function selectRuntime(launcherDir, deps) {
|
|
169
|
+
var d = deps || {};
|
|
170
|
+
var env = d.env || process.env;
|
|
171
|
+
var execPath = d.execPath || process.execPath;
|
|
172
|
+
var running = d.versions || { node: process.versions.node, napi: Number(process.versions.napi) };
|
|
173
|
+
var host = d.host || platform.hostPlatform();
|
|
174
|
+
var probe = d.probe || probeNode;
|
|
175
|
+
var pkg = packageDir(launcherDir);
|
|
176
|
+
if (!pkg) return { ok: false, reason: "this launcher is not inside an @songsid/agend package", recovery: "npm install -g @songsid/agend" };
|
|
177
|
+
var engines = (pkg.manifest.engines && pkg.manifest.engines.node) || ">=22.14.0";
|
|
178
|
+
var recovery = "npm install -g @songsid/agend@" + pkg.manifest.version;
|
|
179
|
+
|
|
180
|
+
// 1. An explicit override: absolute, executable, and passes the probe — or a clear failure, never a fallback.
|
|
181
|
+
if (env.AGEND_NODE) {
|
|
182
|
+
var override = env.AGEND_NODE;
|
|
183
|
+
if (!path.isAbsolute(override)) return { ok: false, reason: "AGEND_NODE must be an absolute path (got " + JSON.stringify(override) + ")", recovery: "unset AGEND_NODE, or point it at a Node " + engines };
|
|
184
|
+
try { fs.accessSync(override, fs.constants.X_OK); } catch (e) { return { ok: false, reason: "AGEND_NODE (" + override + ") is not an executable file", recovery: "unset AGEND_NODE, or point it at a Node " + engines }; }
|
|
185
|
+
var seen = probe(override, 1000);
|
|
186
|
+
if (!qualifies(seen, engines)) return { ok: false, reason: "AGEND_NODE (" + override + ") is Node " + (seen ? seen.node + " with N-API " + seen.napi : "that did not answer") + "; AgEnD needs " + engines + " with N-API " + MIN_NAPI, recovery: "unset AGEND_NODE, or point it at a Node " + engines };
|
|
187
|
+
return { ok: true, node: realpath(override) || override, source: "override", pkgDir: pkg.dir };
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
var pin = pinnedRuntime(pkg.manifest, host);
|
|
191
|
+
var support = platform.runtimeSupport(host);
|
|
192
|
+
if (pin && support.supported) {
|
|
193
|
+
var candidate = runtimeCandidate(pkg.dir, pin);
|
|
194
|
+
var receipt = readReceipt(path.join(pkg.dir, RECEIPT));
|
|
195
|
+
// 2. The verified runtime of this release — and its admission key, exactly what the sh bins check (see above).
|
|
196
|
+
if (candidate.exists && candidate.manifest && candidate.manifest.name === pin.name && candidate.manifest.version === pin.version && receipt.state === "valid" && receiptMatches(receipt.value, candidate, pin) && keyMatches(pkg.dir, candidate, host)) {
|
|
197
|
+
return { ok: true, node: realpath(candidate.node), source: "runtime", pkgDir: pkg.dir }; // the binary checked, never a path the receipt names
|
|
198
|
+
}
|
|
199
|
+
// 3. Supported platform, runtime missing/partial/corrupt: refuse — never a silent fallback. The one exception is
|
|
200
|
+
// an install where the runtime was skipped altogether — PHYSICALLY nothing there, no directory (not even a
|
|
201
|
+
// dangling link) and no receipt file (--ignore-scripts or --omit=optional) — which may use a qualifying system
|
|
202
|
+
// Node, with a warning.
|
|
203
|
+
if (candidate.exists || receipt.state !== "absent" || !absent(path.join(pkg.dir, KEY))) {
|
|
204
|
+
return { ok: false, reason: "the bundled Node (" + pin.name + "@" + pin.version + ") is missing, incomplete or changed since it was verified", recovery: recovery };
|
|
205
|
+
}
|
|
206
|
+
if (qualifies(running, engines)) {
|
|
207
|
+
return { ok: true, node: realpath(execPath) || execPath, source: "system", pkgDir: pkg.dir, warning: "the bundled Node was not installed (--ignore-scripts or --omit=optional?); using this Node " + running.node };
|
|
208
|
+
}
|
|
209
|
+
return { ok: false, reason: "the bundled Node was not installed, and this Node " + running.node + " is older than AgEnD needs (" + engines + ")", recovery: recovery };
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// 4. No runtime for this host (unsupported, or none pinned in this release): the running Node, if it qualifies.
|
|
213
|
+
if (qualifies(running, engines)) return { ok: true, node: realpath(execPath) || execPath, source: "system", pkgDir: pkg.dir };
|
|
214
|
+
return { ok: false, reason: (pin ? support.reason : "this release bundles no Node") + "; this Node " + running.node + " is older than AgEnD needs (" + engines + ")", recovery: "install Node " + engines + ", then " + recovery };
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
module.exports = { KEY: KEY, cksum: cksum, runtimeKey: runtimeKey, keyMatches: keyMatches, RECEIPT: RECEIPT, MIN_NAPI: MIN_NAPI, selectRuntime: selectRuntime, packageDir: packageDir, pinnedRuntime: pinnedRuntime, runtimeCandidate: runtimeCandidate, probeNode: probeNode, qualifies: qualifies, receiptMatches: receiptMatches, readReceipt: readReceipt, absent: absent, receiptText: receiptText, RECEIPT_KEYS: RECEIPT_KEYS, PLAIN: PLAIN };
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@songsid/agend",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0-alpha.2",
|
|
4
4
|
"description": "Multi-agent fleet daemon — run any coding CLI (Claude, Gemini, Codex, OpenCode) from Telegram",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"agend": "./
|
|
8
|
-
"agend-agent": "./
|
|
7
|
+
"agend": "./launcher/agend",
|
|
8
|
+
"agend-agent": "./launcher/agend-agent"
|
|
9
9
|
},
|
|
10
10
|
"exports": {
|
|
11
11
|
".": "./dist/cli.js",
|
|
@@ -21,14 +21,17 @@
|
|
|
21
21
|
"dev": "tsx src/cli.ts",
|
|
22
22
|
"test": "vitest run",
|
|
23
23
|
"test:integration": "vitest run --config vitest.config.integration.ts && node scripts/check-integration-config.mjs",
|
|
24
|
+
"test:codex-e2e": "vitest run --config vitest.config.codex-e2e.ts",
|
|
24
25
|
"test:watch": "vitest",
|
|
25
26
|
"test:e2e": "vitest run --config e2e/vitest.config.e2e.ts",
|
|
26
27
|
"typecheck": "tsc --noEmit",
|
|
27
28
|
"typecheck:tests": "tsc --noEmit -p tsconfig.test.json",
|
|
28
|
-
"prepublishOnly": "npm run build"
|
|
29
|
+
"prepublishOnly": "npm run build",
|
|
30
|
+
"preinstall": "node scripts/preinstall-guard.cjs",
|
|
31
|
+
"postinstall": "node launcher/postinstall.cjs"
|
|
29
32
|
},
|
|
30
33
|
"engines": {
|
|
31
|
-
"node": ">=
|
|
34
|
+
"node": "^22.14.0 || ^23.6.0 || >=24"
|
|
32
35
|
},
|
|
33
36
|
"license": "MIT",
|
|
34
37
|
"repository": {
|
|
@@ -51,11 +54,13 @@
|
|
|
51
54
|
"dist/",
|
|
52
55
|
"templates/",
|
|
53
56
|
"README.md",
|
|
54
|
-
"README.zh-TW.md"
|
|
57
|
+
"README.zh-TW.md",
|
|
58
|
+
"launcher/",
|
|
59
|
+
"scripts/preinstall-guard.cjs"
|
|
55
60
|
],
|
|
56
61
|
"dependencies": {
|
|
57
62
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
58
|
-
"better-sqlite3": "^
|
|
63
|
+
"better-sqlite3": "^13.0.3",
|
|
59
64
|
"commander": "^14.0.3",
|
|
60
65
|
"croner": "^10.0.1",
|
|
61
66
|
"discord.js": "^14.25.1",
|
|
@@ -69,6 +74,12 @@
|
|
|
69
74
|
"yaml": "^2.9.0",
|
|
70
75
|
"zod": "^4.3.6"
|
|
71
76
|
},
|
|
77
|
+
"optionalDependencies": {
|
|
78
|
+
"@songsid/agend-node-darwin-arm64": "22.23.3",
|
|
79
|
+
"@songsid/agend-node-darwin-x64": "22.23.3",
|
|
80
|
+
"@songsid/agend-node-linux-arm64": "22.23.3",
|
|
81
|
+
"@songsid/agend-node-linux-x64": "22.23.3"
|
|
82
|
+
},
|
|
72
83
|
"devDependencies": {
|
|
73
84
|
"@types/better-sqlite3": "^7.6.13",
|
|
74
85
|
"@types/ejs": "^3.1.5",
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// preinstall-guard.cjs — runs as npm's `preinstall` lifecycle hook.
|
|
3
|
+
// No dependencies: only built-in Node.js APIs and the package's own launcher/ helpers.
|
|
4
|
+
//
|
|
5
|
+
// better-sqlite3 v13 requires Node-API 10, available from:
|
|
6
|
+
// Node 22.14.0 LTS (released 2025-02-06)
|
|
7
|
+
// Node 23.6.0 (released 2025-01-13)
|
|
8
|
+
// Node 24+
|
|
9
|
+
//
|
|
10
|
+
// #1450: where this release pins a bundled Node for a supported host (Linux glibc >= 2.28 or macOS 11+, x64/arm64),
|
|
11
|
+
// the system Node's version is NEVER a reason to refuse — 20, 18, 16, any Node whose npm can run the install: AgEnD
|
|
12
|
+
// will not run on it. preinstall cannot verify the bundled Node (it is not on disk yet); launcher/postinstall.cjs
|
|
13
|
+
// proves it inside the same npm transaction and refuses (npm rolls back, the previous install stays) if it cannot.
|
|
14
|
+
// The one refusal here: a host no bundled Node covers (musl, 32-bit, another OS, older glibc/macOS, or a release that
|
|
15
|
+
// pins none) AND a system Node older than ENGINES — AgEnD would install and then not start.
|
|
16
|
+
// Old syntax only (var, no ?. ??, no trailing call commas): this runs under whatever Node runs npm.
|
|
17
|
+
//
|
|
18
|
+
// Exiting 1 aborts the install and keeps the previously installed version intact.
|
|
19
|
+
// --ignore-scripts bypasses this check; see Upgrade Notes in the changelog.
|
|
20
|
+
|
|
21
|
+
"use strict";
|
|
22
|
+
|
|
23
|
+
var path = require("path");
|
|
24
|
+
var fs = require("fs");
|
|
25
|
+
var platform = require(path.join(__dirname, "..", "launcher", "runtime-platform.cjs"));
|
|
26
|
+
|
|
27
|
+
var ENGINES = "^22.14.0 || ^23.6.0 || >=24";
|
|
28
|
+
var running = process.versions.node;
|
|
29
|
+
var napi = Number(process.versions.napi);
|
|
30
|
+
|
|
31
|
+
if (platform.satisfiesEngines(running, ENGINES) && napi >= 10) process.exit(0);
|
|
32
|
+
|
|
33
|
+
var manifest = {};
|
|
34
|
+
try { manifest = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf8")); } catch (e) { /* none */ }
|
|
35
|
+
var host = platform.hostPlatform();
|
|
36
|
+
var pinned = manifest.optionalDependencies && manifest.optionalDependencies["@songsid/agend-node-" + host.id];
|
|
37
|
+
var support = platform.runtimeSupport(host);
|
|
38
|
+
if (pinned && support.supported) {
|
|
39
|
+
// The bundled Node is pinned and fits this host: postinstall verifies it before the install can complete.
|
|
40
|
+
process.exit(0);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
process.stderr.write(
|
|
44
|
+
"\n" +
|
|
45
|
+
" AgEnD 2.2 needs Node >=22.14; npm is aborting this install.\n" +
|
|
46
|
+
"\n" +
|
|
47
|
+
" Running: Node " + running + "\n" +
|
|
48
|
+
" Required: " + ENGINES + "\n" +
|
|
49
|
+
(pinned ? " " + support.reason + ", so AgEnD's bundled Node cannot be used here either.\n" : "") +
|
|
50
|
+
"\n" +
|
|
51
|
+
" Update Node to a compatible version, then retry:\n" +
|
|
52
|
+
" npm install -g @songsid/agend\n" +
|
|
53
|
+
"\n"
|
|
54
|
+
);
|
|
55
|
+
process.exit(1);
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<string><%= label %></string>
|
|
7
7
|
<key>ProgramArguments</key>
|
|
8
8
|
<array>
|
|
9
|
-
<string><%=
|
|
10
|
-
<string>fleet</string>
|
|
9
|
+
<% for (const word of program) { %> <string><%= word %></string>
|
|
10
|
+
<% } %> <string>fleet</string>
|
|
11
11
|
<string>start</string>
|
|
12
12
|
</array>
|
|
13
13
|
<key>EnvironmentVariables</key>
|
|
@@ -22,7 +22,7 @@ NotifyAccess=all
|
|
|
22
22
|
# Bounded so a start that hangs before READY is noticed (#1113).
|
|
23
23
|
TimeoutStartSec=15min
|
|
24
24
|
WatchdogSec=60
|
|
25
|
-
ExecStart
|
|
25
|
+
ExecStart=<%- program.map(systemdQuote).join(" ") %> fleet start
|
|
26
26
|
Environment=PATH=<%= path %>
|
|
27
27
|
Environment=TERM=xterm-256color
|
|
28
28
|
<% if (isRoot) { %>Environment=IS_SANDBOX=1
|