@songsid/agend 2.3.4 → 2.3.5-alpha.11
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 +2 -0
- package/README.zh-TW.md +2 -0
- package/THIRD_PARTY_NOTICES.md +67 -0
- package/dist/accounts-profiles.d.ts +102 -0
- package/dist/accounts-profiles.js +194 -0
- package/dist/accounts-profiles.js.map +1 -0
- package/dist/accounts-signout.d.ts +59 -0
- package/dist/accounts-signout.js +181 -0
- package/dist/accounts-signout.js.map +1 -0
- package/dist/accounts-view.d.ts +182 -0
- package/dist/accounts-view.js +204 -0
- package/dist/accounts-view.js.map +1 -0
- package/dist/agent-cli-instructions.md +3 -3
- package/dist/agent-cli.js +5 -2
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.d.ts +5 -1
- package/dist/agent-endpoint.js +12 -2
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-file-read.js +1 -1
- package/dist/agent-file-read.js.map +1 -1
- package/dist/agent-runtime-api.d.ts +4 -0
- package/dist/agent-runtime-api.js +59 -0
- package/dist/agent-runtime-api.js.map +1 -0
- package/dist/agent-runtime-change.d.ts +76 -0
- package/dist/agent-runtime-change.js +114 -0
- package/dist/agent-runtime-change.js.map +1 -0
- package/dist/agent-whats-new.js +5 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/agent-workspace.d.ts +104 -0
- package/dist/agent-workspace.js +381 -0
- package/dist/agent-workspace.js.map +1 -0
- package/dist/apply-job.d.ts +5 -0
- package/dist/apply-job.js +10 -3
- package/dist/apply-job.js.map +1 -1
- package/dist/auth-api.d.ts +81 -1
- package/dist/auth-api.js +365 -14
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/company-join.d.ts +16 -0
- package/dist/authority/company-join.js +37 -0
- package/dist/authority/company-join.js.map +1 -0
- package/dist/authority/hub-initialization.d.ts +13 -0
- package/dist/authority/hub-initialization.js +30 -0
- package/dist/authority/hub-initialization.js.map +1 -0
- package/dist/authority/session-authorizations.d.ts +2 -0
- package/dist/authority/session-authorizations.js +7 -1
- package/dist/authority/session-authorizations.js.map +1 -1
- package/dist/authority/settings-role.d.ts +56 -0
- package/dist/authority/settings-role.js +48 -0
- package/dist/authority/settings-role.js.map +1 -0
- package/dist/authority/web-authority.d.ts +25 -2
- package/dist/authority/web-authority.js +37 -4
- package/dist/authority/web-authority.js.map +1 -1
- package/dist/backend/claude-code.d.ts +18 -12
- package/dist/backend/claude-code.js +228 -145
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/cli-env-probe.js +6 -2
- package/dist/backend/cli-env-probe.js.map +1 -1
- package/dist/backend/codex-footer-hints.d.ts +3 -0
- package/dist/backend/codex-footer-hints.js +14 -0
- package/dist/backend/codex-footer-hints.js.map +1 -1
- package/dist/backend/codex-package.d.ts +5 -2
- package/dist/backend/codex-package.js +1 -5
- package/dist/backend/codex-package.js.map +1 -1
- package/dist/backend/codex-quota-history.d.ts +7 -0
- package/dist/backend/codex-quota-history.js +57 -0
- package/dist/backend/codex-quota-history.js.map +1 -0
- package/dist/backend/codex-session-lookup.d.ts +6 -0
- package/dist/backend/codex-session-lookup.js +1 -1
- package/dist/backend/codex-session-lookup.js.map +1 -1
- package/dist/backend/codex.d.ts +148 -116
- package/dist/backend/codex.js +1355 -1225
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/credential-profile.d.ts +2 -0
- package/dist/backend/credential-profile.js +4 -1
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/grok-model-cache.d.ts +7 -0
- package/dist/backend/grok-model-cache.js +65 -0
- package/dist/backend/grok-model-cache.js.map +1 -0
- package/dist/backend/grok-weekly-reset.d.ts +24 -0
- package/dist/backend/grok-weekly-reset.js +95 -0
- package/dist/backend/grok-weekly-reset.js.map +1 -0
- package/dist/backend/grok.d.ts +32 -1
- package/dist/backend/grok.js +323 -54
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/kiro.js +1 -1
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/native-pane.d.ts +11 -0
- package/dist/backend/native-pane.js +59 -0
- package/dist/backend/native-pane.js.map +1 -0
- package/dist/backend/types.d.ts +25 -1
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +15 -0
- package/dist/backend-availability.js +37 -1
- package/dist/backend-availability.js.map +1 -1
- package/dist/backend-signin-pending.d.ts +8 -2
- package/dist/backend-signin-pending.js +6 -2
- package/dist/backend-signin-pending.js.map +1 -1
- package/dist/browser-backend-signins.d.ts +2 -1
- package/dist/browser-backend-signins.js +1 -1
- package/dist/browser-backend-signins.js.map +1 -1
- package/dist/build-provenance-cli.d.ts +3 -0
- package/dist/build-provenance-cli.js +11 -0
- package/dist/build-provenance-cli.js.map +1 -0
- package/dist/build-provenance.d.ts +20 -0
- package/dist/build-provenance.js +67 -0
- package/dist/build-provenance.js.map +1 -0
- package/dist/build-provenance.json +1 -0
- package/dist/bundled-tmux-guard.d.ts +23 -0
- package/dist/bundled-tmux-guard.js +90 -0
- package/dist/bundled-tmux-guard.js.map +1 -0
- package/dist/cache-service.d.ts +6 -0
- package/dist/cache-service.js +105 -0
- package/dist/cache-service.js.map +1 -1
- package/dist/channel/access-manager.d.ts +1 -6
- package/dist/channel/access-manager.js +4 -94
- package/dist/channel/access-manager.js.map +1 -1
- package/dist/channel/adapters/discord.d.ts +0 -2
- package/dist/channel/adapters/discord.js +0 -8
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +0 -3
- package/dist/channel/adapters/telegram.js +1 -30
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/ipc-bridge.d.ts +2 -0
- package/dist/channel/mcp-tools.js +7 -7
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/types.d.ts +0 -2
- package/dist/classic-bindings.d.ts +13 -0
- package/dist/classic-bindings.js +28 -2
- package/dist/classic-bindings.js.map +1 -1
- package/dist/classic-channel-manager.d.ts +2 -0
- package/dist/classic-channel-manager.js +5 -1
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/claude-auth-status.d.ts +60 -0
- package/dist/claude-auth-status.js +165 -0
- package/dist/claude-auth-status.js.map +1 -0
- package/dist/claude-model-minimum.d.ts +7 -0
- package/dist/claude-model-minimum.js +16 -0
- package/dist/claude-model-minimum.js.map +1 -0
- package/dist/cli-audited.d.ts +60 -0
- package/dist/cli-audited.js +84 -0
- package/dist/cli-audited.js.map +1 -0
- package/dist/cli-capability.d.ts +217 -0
- package/dist/cli-capability.js +55 -0
- package/dist/cli-capability.js.map +1 -0
- package/dist/cli-caps-module.d.ts +33 -0
- package/dist/cli-caps-module.js +45 -0
- package/dist/cli-caps-module.js.map +1 -0
- package/dist/cli-registry-check.d.ts +28 -0
- package/dist/cli-registry-check.js +237 -0
- package/dist/cli-registry-check.js.map +1 -0
- package/dist/cli-registry.d.ts +578 -0
- package/dist/cli-registry.js +83 -0
- package/dist/cli-registry.js.map +1 -0
- package/dist/cli-spec-antigravity.d.ts +71 -0
- package/dist/cli-spec-antigravity.js +47 -0
- package/dist/cli-spec-antigravity.js.map +1 -0
- package/dist/cli-spec-claude-code.d.ts +93 -0
- package/dist/cli-spec-claude-code.js +37 -0
- package/dist/cli-spec-claude-code.js.map +1 -0
- package/dist/cli-spec-codex.d.ts +87 -0
- package/dist/cli-spec-codex.js +40 -0
- package/dist/cli-spec-codex.js.map +1 -0
- package/dist/cli-spec-grok.d.ts +64 -0
- package/dist/cli-spec-grok.js +40 -0
- package/dist/cli-spec-grok.js.map +1 -0
- package/dist/cli-spec-kiro-cli.d.ts +79 -0
- package/dist/cli-spec-kiro-cli.js +40 -0
- package/dist/cli-spec-kiro-cli.js.map +1 -0
- package/dist/cli-spec-muse.d.ts +54 -0
- package/dist/cli-spec-muse.js +40 -0
- package/dist/cli-spec-muse.js.map +1 -0
- package/dist/cli-spec-opencode.d.ts +60 -0
- package/dist/cli-spec-opencode.js +42 -0
- package/dist/cli-spec-opencode.js.map +1 -0
- package/dist/cli.js +286 -68
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.js +99 -2
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +19 -1
- package/dist/config.js.map +1 -1
- package/dist/daemon.d.ts +165 -7
- package/dist/daemon.js +1307 -307
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard-permissions.d.ts +8 -0
- package/dist/dashboard-permissions.js +16 -0
- package/dist/dashboard-permissions.js.map +1 -1
- package/dist/decision-list.d.ts +2 -0
- package/dist/decision-list.js +1 -1
- package/dist/decision-list.js.map +1 -1
- package/dist/delivery-consumed-watch.d.ts +15 -3
- package/dist/delivery-consumed-watch.js +23 -1
- package/dist/delivery-consumed-watch.js.map +1 -1
- package/dist/delivery-outbox.d.ts +5 -0
- package/dist/delivery-outbox.js +32 -4
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/delivery-reconciliation.d.ts +2 -42
- package/dist/delivery-reconciliation.js +2 -164
- package/dist/delivery-reconciliation.js.map +1 -1
- package/dist/doctor.js +19 -9
- package/dist/doctor.js.map +1 -1
- package/dist/e2e-isolation.js +5 -2
- package/dist/e2e-isolation.js.map +1 -1
- package/dist/fleet-context.d.ts +7 -3
- package/dist/fleet-control-audit.d.ts +1 -1
- package/dist/fleet-level-config.d.ts +1 -1
- package/dist/fleet-level-config.js +2 -0
- package/dist/fleet-level-config.js.map +1 -1
- package/dist/fleet-manager.d.ts +1108 -27
- package/dist/fleet-manager.js +5735 -462
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-process-handlers.d.ts +1 -1
- package/dist/fleet-process-handlers.js +3 -2
- package/dist/fleet-process-handlers.js.map +1 -1
- package/dist/fleet-windows-runtime.d.ts +98 -0
- package/dist/fleet-windows-runtime.js +467 -0
- package/dist/fleet-windows-runtime.js.map +1 -0
- package/dist/general-binding.d.ts +85 -0
- package/dist/general-binding.js +298 -0
- package/dist/general-binding.js.map +1 -0
- package/dist/general-host-owner.d.ts +8 -0
- package/dist/general-host-owner.js +26 -0
- package/dist/general-host-owner.js.map +1 -0
- package/dist/general-instance.d.ts +7 -0
- package/dist/general-instance.js +20 -3
- package/dist/general-instance.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +101 -39
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +23 -9
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +9 -1
- package/dist/general-knowledge/skills/delegation-playbook/SKILL.md +4 -1
- package/dist/general-knowledge/skills/fleet-config/SKILL.md +12 -0
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +3 -3
- package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +4 -0
- package/dist/general-knowledge/skills/session-management/SKILL.md +1 -1
- package/dist/general-knowledge/skills/tui-effort/SKILL.md +10 -10
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +51 -33
- package/dist/general-knowledge/steering/core-rules.md +7 -5
- package/dist/general-role.d.ts +5 -0
- package/dist/general-role.js +27 -0
- package/dist/general-role.js.map +1 -0
- package/dist/hub/admission.d.ts +28 -0
- package/dist/hub/admission.js +62 -0
- package/dist/hub/admission.js.map +1 -0
- package/dist/hub/attachments/limits.d.ts +20 -0
- package/dist/hub/attachments/limits.js +48 -0
- package/dist/hub/attachments/limits.js.map +1 -0
- package/dist/hub/attachments/store.d.ts +116 -0
- package/dist/hub/attachments/store.js +246 -0
- package/dist/hub/attachments/store.js.map +1 -0
- package/dist/hub/audit/index.d.ts +62 -0
- package/dist/hub/audit/index.js +344 -0
- package/dist/hub/audit/index.js.map +1 -0
- package/dist/hub/browser-certificate.d.ts +38 -0
- package/dist/hub/browser-certificate.js +247 -0
- package/dist/hub/browser-certificate.js.map +1 -0
- package/dist/hub/buttons-model.d.ts +9 -0
- package/dist/hub/buttons-model.js +42 -0
- package/dist/hub/buttons-model.js.map +1 -0
- package/dist/hub/buttons.d.ts +54 -0
- package/dist/hub/buttons.js +348 -0
- package/dist/hub/buttons.js.map +1 -0
- package/dist/hub/catalog.d.ts +74 -0
- package/dist/hub/catalog.js +380 -0
- package/dist/hub/catalog.js.map +1 -0
- package/dist/hub/client.d.ts +69 -0
- package/dist/hub/client.js +304 -0
- package/dist/hub/client.js.map +1 -0
- package/dist/hub/compose/member.d.ts +145 -0
- package/dist/hub/compose/member.js +458 -0
- package/dist/hub/compose/member.js.map +1 -0
- package/dist/hub/compose/server.d.ts +167 -0
- package/dist/hub/compose/server.js +477 -0
- package/dist/hub/compose/server.js.map +1 -0
- package/dist/hub/compose/storage.d.ts +5 -0
- package/dist/hub/compose/storage.js +28 -0
- package/dist/hub/compose/storage.js.map +1 -0
- package/dist/hub/compose/views.d.ts +12 -0
- package/dist/hub/compose/views.js +4 -0
- package/dist/hub/compose/views.js.map +1 -0
- package/dist/hub/db.d.ts +58 -0
- package/dist/hub/db.js +215 -0
- package/dist/hub/db.js.map +1 -0
- package/dist/hub/directory/config.d.ts +39 -0
- package/dist/hub/directory/config.js +108 -0
- package/dist/hub/directory/config.js.map +1 -0
- package/dist/hub/directory/directory.d.ts +25 -0
- package/dist/hub/directory/directory.js +526 -0
- package/dist/hub/directory/directory.js.map +1 -0
- package/dist/hub/directory/groups.d.ts +41 -0
- package/dist/hub/directory/groups.js +30 -0
- package/dist/hub/directory/groups.js.map +1 -0
- package/dist/hub/directory/index.d.ts +8 -0
- package/dist/hub/directory/index.js +4 -0
- package/dist/hub/directory/index.js.map +1 -0
- package/dist/hub/directory/profiles.d.ts +41 -0
- package/dist/hub/directory/profiles.js +90 -0
- package/dist/hub/directory/profiles.js.map +1 -0
- package/dist/hub/directory/types.d.ts +83 -0
- package/dist/hub/directory/types.js +14 -0
- package/dist/hub/directory/types.js.map +1 -0
- package/dist/hub/directory-response-owner.d.ts +38 -0
- package/dist/hub/directory-response-owner.js +191 -0
- package/dist/hub/directory-response-owner.js.map +1 -0
- package/dist/hub/enrollment-budget.d.ts +6 -0
- package/dist/hub/enrollment-budget.js +24 -0
- package/dist/hub/enrollment-budget.js.map +1 -0
- package/dist/hub/execution/cli-provider.d.ts +23 -0
- package/dist/hub/execution/cli-provider.js +341 -0
- package/dist/hub/execution/cli-provider.js.map +1 -0
- package/dist/hub/execution/index.d.ts +13 -0
- package/dist/hub/execution/index.js +8 -0
- package/dist/hub/execution/index.js.map +1 -0
- package/dist/hub/execution/model-broker.d.ts +24 -0
- package/dist/hub/execution/model-broker.js +208 -0
- package/dist/hub/execution/model-broker.js.map +1 -0
- package/dist/hub/execution/provider-setup.d.ts +11 -0
- package/dist/hub/execution/provider-setup.js +21 -0
- package/dist/hub/execution/provider-setup.js.map +1 -0
- package/dist/hub/execution/sandbox-runner.d.ts +1 -0
- package/dist/hub/execution/sandbox-runner.js +221 -0
- package/dist/hub/execution/sandbox-runner.js.map +1 -0
- package/dist/hub/execution/service.d.ts +136 -0
- package/dist/hub/execution/service.js +459 -0
- package/dist/hub/execution/service.js.map +1 -0
- package/dist/hub/execution/store.d.ts +61 -0
- package/dist/hub/execution/store.js +182 -0
- package/dist/hub/execution/store.js.map +1 -0
- package/dist/hub/execution/views.d.ts +20 -0
- package/dist/hub/execution/views.js +48 -0
- package/dist/hub/execution/views.js.map +1 -0
- package/dist/hub/group-policy/admin-api.d.ts +30 -0
- package/dist/hub/group-policy/admin-api.js +83 -0
- package/dist/hub/group-policy/admin-api.js.map +1 -0
- package/dist/hub/group-policy/admin-context.d.ts +23 -0
- package/dist/hub/group-policy/admin-context.js +52 -0
- package/dist/hub/group-policy/admin-context.js.map +1 -0
- package/dist/hub/group-policy/admin-control.d.ts +34 -0
- package/dist/hub/group-policy/admin-control.js +258 -0
- package/dist/hub/group-policy/admin-control.js.map +1 -0
- package/dist/hub/group-policy/admin-dto.d.ts +249 -0
- package/dist/hub/group-policy/admin-dto.js +55 -0
- package/dist/hub/group-policy/admin-dto.js.map +1 -0
- package/dist/hub/group-policy/admin-facts.d.ts +17 -0
- package/dist/hub/group-policy/admin-facts.js +33 -0
- package/dist/hub/group-policy/admin-facts.js.map +1 -0
- package/dist/hub/group-policy/admin-impact.d.ts +51 -0
- package/dist/hub/group-policy/admin-impact.js +88 -0
- package/dist/hub/group-policy/admin-impact.js.map +1 -0
- package/dist/hub/group-policy/admin-inventory.d.ts +24 -0
- package/dist/hub/group-policy/admin-inventory.js +72 -0
- package/dist/hub/group-policy/admin-inventory.js.map +1 -0
- package/dist/hub/group-policy/admin-read.d.ts +21 -0
- package/dist/hub/group-policy/admin-read.js +95 -0
- package/dist/hub/group-policy/admin-read.js.map +1 -0
- package/dist/hub/group-policy/authorization.d.ts +65 -0
- package/dist/hub/group-policy/authorization.js +315 -0
- package/dist/hub/group-policy/authorization.js.map +1 -0
- package/dist/hub/group-policy/impact-inventory.d.ts +21 -0
- package/dist/hub/group-policy/impact-inventory.js +75 -0
- package/dist/hub/group-policy/impact-inventory.js.map +1 -0
- package/dist/hub/group-policy/model.d.ts +56 -0
- package/dist/hub/group-policy/model.js +46 -0
- package/dist/hub/group-policy/model.js.map +1 -0
- package/dist/hub/group-policy/resources.d.ts +72 -0
- package/dist/hub/group-policy/resources.js +260 -0
- package/dist/hub/group-policy/resources.js.map +1 -0
- package/dist/hub/group-policy/store.d.ts +69 -0
- package/dist/hub/group-policy/store.js +210 -0
- package/dist/hub/group-policy/store.js.map +1 -0
- package/dist/hub/group-policy/welcome.d.ts +36 -0
- package/dist/hub/group-policy/welcome.js +55 -0
- package/dist/hub/group-policy/welcome.js.map +1 -0
- package/dist/hub/http/compose.d.ts +24 -0
- package/dist/hub/http/compose.js +739 -0
- package/dist/hub/http/compose.js.map +1 -0
- package/dist/hub/http/core.d.ts +71 -0
- package/dist/hub/http/core.js +266 -0
- package/dist/hub/http/core.js.map +1 -0
- package/dist/hub/http/deps.d.ts +79 -0
- package/dist/hub/http/deps.js +2 -0
- package/dist/hub/http/deps.js.map +1 -0
- package/dist/hub/http/schema.d.ts +14 -0
- package/dist/hub/http/schema.js +84 -0
- package/dist/hub/http/schema.js.map +1 -0
- package/dist/hub/identity.d.ts +32 -0
- package/dist/hub/identity.js +80 -0
- package/dist/hub/identity.js.map +1 -0
- package/dist/hub/init/browser-certificate.d.ts +14 -0
- package/dist/hub/init/browser-certificate.js +99 -0
- package/dist/hub/init/browser-certificate.js.map +1 -0
- package/dist/hub/init/browser-tls.d.ts +18 -0
- package/dist/hub/init/browser-tls.js +62 -0
- package/dist/hub/init/browser-tls.js.map +1 -0
- package/dist/hub/init/cli.d.ts +3 -0
- package/dist/hub/init/cli.js +83 -0
- package/dist/hub/init/cli.js.map +1 -0
- package/dist/hub/init/directory-certificate.d.ts +24 -0
- package/dist/hub/init/directory-certificate.js +229 -0
- package/dist/hub/init/directory-certificate.js.map +1 -0
- package/dist/hub/init/existing-fleet.d.ts +6 -0
- package/dist/hub/init/existing-fleet.js +58 -0
- package/dist/hub/init/existing-fleet.js.map +1 -0
- package/dist/hub/init/handoff.d.ts +8 -0
- package/dist/hub/init/handoff.js +36 -0
- package/dist/hub/init/handoff.js.map +1 -0
- package/dist/hub/init/identity.d.ts +5 -0
- package/dist/hub/init/identity.js +24 -0
- package/dist/hub/init/identity.js.map +1 -0
- package/dist/hub/init/initializer.d.ts +34 -0
- package/dist/hub/init/initializer.js +504 -0
- package/dist/hub/init/initializer.js.map +1 -0
- package/dist/hub/init/inventory.d.ts +17 -0
- package/dist/hub/init/inventory.js +33 -0
- package/dist/hub/init/inventory.js.map +1 -0
- package/dist/hub/init/layout.d.ts +32 -0
- package/dist/hub/init/layout.js +53 -0
- package/dist/hub/init/layout.js.map +1 -0
- package/dist/hub/init/network.d.ts +18 -0
- package/dist/hub/init/network.js +104 -0
- package/dist/hub/init/network.js.map +1 -0
- package/dist/hub/init/plan-digest.d.ts +5 -0
- package/dist/hub/init/plan-digest.js +47 -0
- package/dist/hub/init/plan-digest.js.map +1 -0
- package/dist/hub/init/prompt.d.ts +26 -0
- package/dist/hub/init/prompt.js +110 -0
- package/dist/hub/init/prompt.js.map +1 -0
- package/dist/hub/init/secret-file.d.ts +1 -0
- package/dist/hub/init/secret-file.js +59 -0
- package/dist/hub/init/secret-file.js.map +1 -0
- package/dist/hub/init/text.d.ts +127 -0
- package/dist/hub/init/text.js +247 -0
- package/dist/hub/init/text.js.map +1 -0
- package/dist/hub/init/types.d.ts +142 -0
- package/dist/hub/init/types.js +9 -0
- package/dist/hub/init/types.js.map +1 -0
- package/dist/hub/init/web-audit-import.d.ts +12 -0
- package/dist/hub/init/web-audit-import.js +39 -0
- package/dist/hub/init/web-audit-import.js.map +1 -0
- package/dist/hub/init/web-audit.d.ts +30 -0
- package/dist/hub/init/web-audit.js +42 -0
- package/dist/hub/init/web-audit.js.map +1 -0
- package/dist/hub/init/web-error.d.ts +6 -0
- package/dist/hub/init/web-error.js +8 -0
- package/dist/hub/init/web-error.js.map +1 -0
- package/dist/hub/init/web-http.d.ts +9 -0
- package/dist/hub/init/web-http.js +103 -0
- package/dist/hub/init/web-http.js.map +1 -0
- package/dist/hub/init/web.d.ts +118 -0
- package/dist/hub/init/web.js +428 -0
- package/dist/hub/init/web.js.map +1 -0
- package/dist/hub/init/wizard.d.ts +34 -0
- package/dist/hub/init/wizard.js +552 -0
- package/dist/hub/init/wizard.js.map +1 -0
- package/dist/hub/initialization.d.ts +23 -0
- package/dist/hub/initialization.js +28 -0
- package/dist/hub/initialization.js.map +1 -0
- package/dist/hub/join/client.d.ts +35 -0
- package/dist/hub/join/client.js +112 -0
- package/dist/hub/join/client.js.map +1 -0
- package/dist/hub/join/descriptor.d.ts +45 -0
- package/dist/hub/join/descriptor.js +52 -0
- package/dist/hub/join/descriptor.js.map +1 -0
- package/dist/hub/join/fleet-authority.d.ts +2 -0
- package/dist/hub/join/fleet-authority.js +3 -0
- package/dist/hub/join/fleet-authority.js.map +1 -0
- package/dist/hub/join/http.d.ts +8 -0
- package/dist/hub/join/http.js +112 -0
- package/dist/hub/join/http.js.map +1 -0
- package/dist/hub/join/invitation.d.ts +28 -0
- package/dist/hub/join/invitation.js +28 -0
- package/dist/hub/join/invitation.js.map +1 -0
- package/dist/hub/join/local-journal.d.ts +84 -0
- package/dist/hub/join/local-journal.js +65 -0
- package/dist/hub/join/local-journal.js.map +1 -0
- package/dist/hub/join/local.d.ts +116 -0
- package/dist/hub/join/local.js +419 -0
- package/dist/hub/join/local.js.map +1 -0
- package/dist/hub/join/private.d.ts +3 -0
- package/dist/hub/join/private.js +46 -0
- package/dist/hub/join/private.js.map +1 -0
- package/dist/hub/join/protocol.d.ts +69 -0
- package/dist/hub/join/protocol.js +96 -0
- package/dist/hub/join/protocol.js.map +1 -0
- package/dist/hub/join/receipt.d.ts +42 -0
- package/dist/hub/join/receipt.js +75 -0
- package/dist/hub/join/receipt.js.map +1 -0
- package/dist/hub/join/service.d.ts +177 -0
- package/dist/hub/join/service.js +564 -0
- package/dist/hub/join/service.js.map +1 -0
- package/dist/hub/join/store.d.ts +97 -0
- package/dist/hub/join/store.js +87 -0
- package/dist/hub/join/store.js.map +1 -0
- package/dist/hub/join/trust.d.ts +13 -0
- package/dist/hub/join/trust.js +68 -0
- package/dist/hub/join/trust.js.map +1 -0
- package/dist/hub/member/agent-mode.d.ts +6 -0
- package/dist/hub/member/agent-mode.js +23 -0
- package/dist/hub/member/agent-mode.js.map +1 -0
- package/dist/hub/member/attachments.d.ts +29 -0
- package/dist/hub/member/attachments.js +107 -0
- package/dist/hub/member/attachments.js.map +1 -0
- package/dist/hub/member/exposure-api.d.ts +87 -0
- package/dist/hub/member/exposure-api.js +64 -0
- package/dist/hub/member/exposure-api.js.map +1 -0
- package/dist/hub/member/exposures.d.ts +123 -0
- package/dist/hub/member/exposures.js +282 -0
- package/dist/hub/member/exposures.js.map +1 -0
- package/dist/hub/member/pairing-api.d.ts +87 -0
- package/dist/hub/member/pairing-api.js +391 -0
- package/dist/hub/member/pairing-api.js.map +1 -0
- package/dist/hub/member/pairing-notices.d.ts +18 -0
- package/dist/hub/member/pairing-notices.js +60 -0
- package/dist/hub/member/pairing-notices.js.map +1 -0
- package/dist/hub/member/quota.d.ts +20 -0
- package/dist/hub/member/quota.js +98 -0
- package/dist/hub/member/quota.js.map +1 -0
- package/dist/hub/member-journal.d.ts +104 -0
- package/dist/hub/member-journal.js +336 -0
- package/dist/hub/member-journal.js.map +1 -0
- package/dist/hub/member-reconciliation.d.ts +14 -0
- package/dist/hub/member-reconciliation.js +97 -0
- package/dist/hub/member-reconciliation.js.map +1 -0
- package/dist/hub/mount.d.ts +48 -0
- package/dist/hub/mount.js +146 -0
- package/dist/hub/mount.js.map +1 -0
- package/dist/hub/pairing-client.d.ts +17 -0
- package/dist/hub/pairing-client.js +108 -0
- package/dist/hub/pairing-client.js.map +1 -0
- package/dist/hub/pairing-notices.d.ts +47 -0
- package/dist/hub/pairing-notices.js +246 -0
- package/dist/hub/pairing-notices.js.map +1 -0
- package/dist/hub/pairing.d.ts +105 -0
- package/dist/hub/pairing.js +514 -0
- package/dist/hub/pairing.js.map +1 -0
- package/dist/hub/policy.d.ts +65 -0
- package/dist/hub/policy.js +154 -0
- package/dist/hub/policy.js.map +1 -0
- package/dist/hub/preview.d.ts +32 -0
- package/dist/hub/preview.js +64 -0
- package/dist/hub/preview.js.map +1 -0
- package/dist/hub/private-files.d.ts +5 -0
- package/dist/hub/private-files.js +44 -0
- package/dist/hub/private-files.js.map +1 -0
- package/dist/hub/profile.d.ts +59 -0
- package/dist/hub/profile.js +73 -0
- package/dist/hub/profile.js.map +1 -0
- package/dist/hub/protocol.d.ts +840 -0
- package/dist/hub/protocol.js +100 -0
- package/dist/hub/protocol.js.map +1 -0
- package/dist/hub/quota.d.ts +24 -0
- package/dist/hub/quota.js +112 -0
- package/dist/hub/quota.js.map +1 -0
- package/dist/hub/representative.d.ts +141 -0
- package/dist/hub/representative.js +528 -0
- package/dist/hub/representative.js.map +1 -0
- package/dist/hub/retention.d.ts +17 -0
- package/dist/hub/retention.js +45 -0
- package/dist/hub/retention.js.map +1 -0
- package/dist/hub/room-read-pacer.d.ts +14 -0
- package/dist/hub/room-read-pacer.js +51 -0
- package/dist/hub/room-read-pacer.js.map +1 -0
- package/dist/hub/rooms.d.ts +127 -0
- package/dist/hub/rooms.js +597 -0
- package/dist/hub/rooms.js.map +1 -0
- package/dist/hub/runtime.d.ts +155 -0
- package/dist/hub/runtime.js +651 -0
- package/dist/hub/runtime.js.map +1 -0
- package/dist/hub/server.d.ts +61 -0
- package/dist/hub/server.js +235 -0
- package/dist/hub/server.js.map +1 -0
- package/dist/hub/service-start.d.ts +17 -0
- package/dist/hub/service-start.js +109 -0
- package/dist/hub/service-start.js.map +1 -0
- package/dist/hub/session-directory-transition.d.ts +48 -0
- package/dist/hub/session-directory-transition.js +118 -0
- package/dist/hub/session-directory-transition.js.map +1 -0
- package/dist/hub/session-epoch.d.ts +16 -0
- package/dist/hub/session-epoch.js +50 -0
- package/dist/hub/session-epoch.js.map +1 -0
- package/dist/hub/sessions.d.ts +66 -0
- package/dist/hub/sessions.js +217 -0
- package/dist/hub/sessions.js.map +1 -0
- package/dist/hub/settings-api.d.ts +50 -0
- package/dist/hub/settings-api.js +92 -0
- package/dist/hub/settings-api.js.map +1 -0
- package/dist/hub/settings-commit.d.ts +102 -0
- package/dist/hub/settings-commit.js +522 -0
- package/dist/hub/settings-commit.js.map +1 -0
- package/dist/hub/settings-directory-ca.d.ts +31 -0
- package/dist/hub/settings-directory-ca.js +115 -0
- package/dist/hub/settings-directory-ca.js.map +1 -0
- package/dist/hub/settings-directory-control.d.ts +58 -0
- package/dist/hub/settings-directory-control.js +117 -0
- package/dist/hub/settings-directory-control.js.map +1 -0
- package/dist/hub/settings-directory-decision.d.ts +465 -0
- package/dist/hub/settings-directory-decision.js +322 -0
- package/dist/hub/settings-directory-decision.js.map +1 -0
- package/dist/hub/settings-directory-host-http.d.ts +9 -0
- package/dist/hub/settings-directory-host-http.js +75 -0
- package/dist/hub/settings-directory-host-http.js.map +1 -0
- package/dist/hub/settings-directory-host-notice-http.d.ts +9 -0
- package/dist/hub/settings-directory-host-notice-http.js +78 -0
- package/dist/hub/settings-directory-host-notice-http.js.map +1 -0
- package/dist/hub/settings-directory-host-notices.d.ts +11 -0
- package/dist/hub/settings-directory-host-notices.js +39 -0
- package/dist/hub/settings-directory-host-notices.js.map +1 -0
- package/dist/hub/settings-directory-http.d.ts +33 -0
- package/dist/hub/settings-directory-http.js +109 -0
- package/dist/hub/settings-directory-http.js.map +1 -0
- package/dist/hub/settings-directory-mount.d.ts +24 -0
- package/dist/hub/settings-directory-mount.js +77 -0
- package/dist/hub/settings-directory-mount.js.map +1 -0
- package/dist/hub/settings-directory-notices.d.ts +61 -0
- package/dist/hub/settings-directory-notices.js +132 -0
- package/dist/hub/settings-directory-notices.js.map +1 -0
- package/dist/hub/settings-directory-proof.d.ts +77 -0
- package/dist/hub/settings-directory-proof.js +313 -0
- package/dist/hub/settings-directory-proof.js.map +1 -0
- package/dist/hub/settings-directory-recovery-intent.d.ts +13 -0
- package/dist/hub/settings-directory-recovery-intent.js +29 -0
- package/dist/hub/settings-directory-recovery-intent.js.map +1 -0
- package/dist/hub/settings-directory-recovery.d.ts +37 -0
- package/dist/hub/settings-directory-recovery.js +173 -0
- package/dist/hub/settings-directory-recovery.js.map +1 -0
- package/dist/hub/settings-directory-runtime.d.ts +17 -0
- package/dist/hub/settings-directory-runtime.js +2 -0
- package/dist/hub/settings-directory-runtime.js.map +1 -0
- package/dist/hub/settings-directory-save.d.ts +37 -0
- package/dist/hub/settings-directory-save.js +175 -0
- package/dist/hub/settings-directory-save.js.map +1 -0
- package/dist/hub/socket.d.ts +24 -0
- package/dist/hub/socket.js +79 -0
- package/dist/hub/socket.js.map +1 -0
- package/dist/hub/store.d.ts +87 -0
- package/dist/hub/store.js +92 -0
- package/dist/hub/store.js.map +1 -0
- package/dist/hub/tls.d.ts +31 -0
- package/dist/hub/tls.js +135 -0
- package/dist/hub/tls.js.map +1 -0
- package/dist/hub/types.d.ts +416 -0
- package/dist/hub/types.js +2 -0
- package/dist/hub/types.js.map +1 -0
- package/dist/hub/validation.d.ts +33 -0
- package/dist/hub/validation.js +136 -0
- package/dist/hub/validation.js.map +1 -0
- package/dist/hub/version-floor.d.ts +10 -0
- package/dist/hub/version-floor.js +45 -0
- package/dist/hub/version-floor.js.map +1 -0
- package/dist/hub-browser-certificate-policy.d.ts +31 -0
- package/dist/hub-browser-certificate-policy.js +25 -0
- package/dist/hub-browser-certificate-policy.js.map +1 -0
- package/dist/hub-host-settings.d.ts +48 -0
- package/dist/hub-host-settings.js +85 -0
- package/dist/hub-host-settings.js.map +1 -0
- package/dist/hub-membership-settings.d.ts +6 -0
- package/dist/hub-membership-settings.js +21 -0
- package/dist/hub-membership-settings.js.map +1 -0
- package/dist/hub-mode.d.ts +15 -0
- package/dist/hub-mode.js +17 -0
- package/dist/hub-mode.js.map +1 -0
- package/dist/hub-pairing-summary.d.ts +48 -0
- package/dist/hub-pairing-summary.js +36 -0
- package/dist/hub-pairing-summary.js.map +1 -0
- package/dist/hub-report-target.d.ts +32 -0
- package/dist/hub-report-target.js +33 -0
- package/dist/hub-report-target.js.map +1 -0
- package/dist/hub-retention-policy.d.ts +14 -0
- package/dist/hub-retention-policy.js +15 -0
- package/dist/hub-retention-policy.js.map +1 -0
- package/dist/instance-config-impact.js +9 -3
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +52 -5
- package/dist/instance-lifecycle.js +493 -200
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +2 -0
- package/dist/instructions.js +35 -6
- package/dist/instructions.js.map +1 -1
- package/dist/kiro-history-scan.d.ts +26 -0
- package/dist/kiro-history-scan.js +141 -0
- package/dist/kiro-history-scan.js.map +1 -0
- package/dist/kiro-history-worker.d.ts +1 -0
- package/dist/kiro-history-worker.js +9 -0
- package/dist/kiro-history-worker.js.map +1 -0
- package/dist/kiro-history.d.ts +20 -0
- package/dist/kiro-history.js +96 -0
- package/dist/kiro-history.js.map +1 -0
- package/dist/kiro-usage-run.d.ts +2 -0
- package/dist/kiro-usage-run.js +4 -1
- package/dist/kiro-usage-run.js.map +1 -1
- package/dist/launchd-service-domain.d.ts +5 -0
- package/dist/launchd-service-domain.js +21 -0
- package/dist/launchd-service-domain.js.map +1 -0
- package/dist/local-pane-endpoint.d.ts +46 -0
- package/dist/local-pane-endpoint.js +189 -0
- package/dist/local-pane-endpoint.js.map +1 -0
- package/dist/local-pane-launcher.d.ts +2 -0
- package/dist/local-pane-launcher.js +38 -0
- package/dist/local-pane-launcher.js.map +1 -0
- package/dist/local-pane-stage.ps1 +101 -0
- package/dist/locale.js +345 -99
- package/dist/locale.js.map +1 -1
- package/dist/logger.d.ts +5 -3
- package/dist/logger.js +323 -85
- package/dist/logger.js.map +1 -1
- package/dist/login-controller.d.ts +14 -1
- package/dist/login-controller.js +31 -1
- package/dist/login-controller.js.map +1 -1
- package/dist/login-flows.d.ts +21 -8
- package/dist/login-flows.js +40 -18
- package/dist/login-flows.js.map +1 -1
- package/dist/login-manager.d.ts +2 -2
- package/dist/login-manager.js +28 -6
- package/dist/login-manager.js.map +1 -1
- package/dist/login-window-lock.d.ts +2 -1
- package/dist/login-window-lock.js.map +1 -1
- package/dist/ls-rows.d.ts +1 -1
- package/dist/ls-rows.js +3 -4
- package/dist/ls-rows.js.map +1 -1
- package/dist/machine-accounts.d.ts +110 -0
- package/dist/machine-accounts.js +229 -0
- package/dist/machine-accounts.js.map +1 -0
- package/dist/machine-signins.d.ts +89 -0
- package/dist/machine-signins.js +182 -0
- package/dist/machine-signins.js.map +1 -0
- package/dist/model-catalog-defaults.d.ts +14 -0
- package/dist/model-catalog-defaults.js +20 -0
- package/dist/model-catalog-defaults.js.map +1 -0
- package/dist/muse-usage-relay.d.ts +2 -0
- package/dist/muse-usage-relay.js +5 -3
- package/dist/muse-usage-relay.js.map +1 -1
- package/dist/native-agent-admission.d.ts +7 -0
- package/dist/native-agent-admission.js +26 -0
- package/dist/native-agent-admission.js.map +1 -0
- package/dist/native-daemon-client.d.ts +13 -0
- package/dist/native-daemon-client.js +28 -0
- package/dist/native-daemon-client.js.map +1 -0
- package/dist/native-instance-api.d.ts +13 -0
- package/dist/native-instance-api.js +217 -0
- package/dist/native-instance-api.js.map +1 -0
- package/dist/native-instance-input.d.ts +87 -0
- package/dist/native-instance-input.js +59 -0
- package/dist/native-instance-input.js.map +1 -0
- package/dist/native-instance-registry.d.ts +38 -0
- package/dist/native-instance-registry.js +129 -0
- package/dist/native-instance-registry.js.map +1 -0
- package/dist/native-mcp.d.ts +43 -0
- package/dist/native-mcp.js +291 -0
- package/dist/native-mcp.js.map +1 -0
- package/dist/native-model-catalog.d.ts +25 -0
- package/dist/native-model-catalog.js +181 -0
- package/dist/native-model-catalog.js.map +1 -0
- package/dist/native-pane-crash-budget.d.ts +20 -0
- package/dist/native-pane-crash-budget.js +60 -0
- package/dist/native-pane-crash-budget.js.map +1 -0
- package/dist/native-pane-create.d.ts +26 -0
- package/dist/native-pane-create.js +53 -0
- package/dist/native-pane-create.js.map +1 -0
- package/dist/native-pane-lifecycle.d.ts +73 -0
- package/dist/native-pane-lifecycle.js +239 -0
- package/dist/native-pane-lifecycle.js.map +1 -0
- package/dist/native-pane-manager.d.ts +59 -0
- package/dist/native-pane-manager.js +592 -0
- package/dist/native-pane-manager.js.map +1 -0
- package/dist/native-pane-output-log.d.ts +15 -0
- package/dist/native-pane-output-log.js +108 -0
- package/dist/native-pane-output-log.js.map +1 -0
- package/dist/native-pane-reconciliation.d.ts +4 -0
- package/dist/native-pane-reconciliation.js +40 -0
- package/dist/native-pane-reconciliation.js.map +1 -0
- package/dist/native-pane-recovery.d.ts +12 -0
- package/dist/native-pane-recovery.js +10 -0
- package/dist/native-pane-recovery.js.map +1 -0
- package/dist/native-pane-tools.d.ts +2 -0
- package/dist/native-pane-tools.js +14 -0
- package/dist/native-pane-tools.js.map +1 -0
- package/dist/needs-you-hub.d.ts +8 -0
- package/dist/needs-you-hub.js +29 -3
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +78 -2
- package/dist/needs-you.js +45 -2
- package/dist/needs-you.js.map +1 -1
- package/dist/office-levels.d.ts +4 -3
- package/dist/office-levels.js +3 -3
- package/dist/office-levels.js.map +1 -1
- package/dist/office-share-page.js +3 -3
- package/dist/office-share-page.js.map +1 -1
- package/dist/office-share.d.ts +11 -0
- package/dist/office-share.js +14 -0
- package/dist/office-share.js.map +1 -1
- package/dist/office-talk.d.ts +26 -0
- package/dist/office-talk.js +50 -0
- package/dist/office-talk.js.map +1 -0
- package/dist/outbound-handlers.d.ts +30 -2
- package/dist/outbound-handlers.js +156 -18
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +94 -1
- package/dist/outbound-schemas.js +44 -16
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/pane-port.d.ts +118 -0
- package/dist/pane-port.js +2 -0
- package/dist/pane-port.js.map +1 -0
- package/dist/pane-quota-history.d.ts +9 -0
- package/dist/pane-quota-history.js +67 -0
- package/dist/pane-quota-history.js.map +1 -0
- package/dist/pause-marker.d.ts +1 -1
- package/dist/pause-marker.js +1 -1
- package/dist/pause-marker.js.map +1 -1
- package/dist/platform-general.d.ts +46 -0
- package/dist/platform-general.js +91 -0
- package/dist/platform-general.js.map +1 -0
- package/dist/profile-signins.d.ts +107 -0
- package/dist/profile-signins.js +249 -0
- package/dist/profile-signins.js.map +1 -0
- package/dist/public-web-gateway.js +17 -1
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +11 -0
- package/dist/public-web-link.js +13 -0
- package/dist/public-web-link.js.map +1 -1
- package/dist/quickstart-api.js +11 -7
- package/dist/quickstart-api.js.map +1 -1
- package/dist/quickstart.d.ts +14 -0
- package/dist/quickstart.js +72 -4
- package/dist/quickstart.js.map +1 -1
- package/dist/quiet-run.d.ts +31 -0
- package/dist/quiet-run.js +50 -0
- package/dist/quiet-run.js.map +1 -0
- package/dist/quota-notice-config.d.ts +22 -0
- package/dist/quota-notice-config.js +41 -0
- package/dist/quota-notice-config.js.map +1 -0
- package/dist/quota-notice.d.ts +7 -0
- package/dist/quota-notice.js +40 -0
- package/dist/quota-notice.js.map +1 -1
- package/dist/reply-buttons-controller.d.ts +5 -1
- package/dist/reply-buttons-controller.js +18 -10
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/reply-buttons.d.ts +6 -2
- package/dist/reply-buttons.js +7 -3
- package/dist/reply-buttons.js.map +1 -1
- package/dist/reply-polls.d.ts +2 -2
- package/dist/reply-polls.js +3 -3
- package/dist/reply-polls.js.map +1 -1
- package/dist/runtime-api.d.ts +23 -0
- package/dist/runtime-api.js +413 -0
- package/dist/runtime-api.js.map +1 -0
- package/dist/runtime-assets/@xterm/addon-serialize/LICENSE +21 -0
- package/dist/runtime-assets/@xterm/addon-serialize/lib/addon-serialize.js +2 -0
- package/dist/runtime-assets/@xterm/addon-serialize/lib/addon-serialize.mjs +19 -0
- package/dist/runtime-assets/@xterm/addon-serialize/package.json +29 -0
- package/dist/runtime-assets/@xterm/headless/LICENSE +21 -0
- package/dist/runtime-assets/@xterm/headless/lib-headless/xterm-headless.js +2 -0
- package/dist/runtime-assets/@xterm/headless/lib-headless/xterm-headless.mjs +46 -0
- package/dist/runtime-assets/@xterm/headless/package.json +29 -0
- package/dist/runtime-assets/node-pty/CONPTY-LICENSE +21 -0
- package/dist/runtime-assets/node-pty/CONPTY-NOTICE.md +503 -0
- package/dist/runtime-assets/node-pty/LICENSE +69 -0
- package/dist/runtime-assets/node-pty/lib/conpty_console_list_agent.js +16 -0
- package/dist/runtime-assets/node-pty/lib/eventEmitter2.js +47 -0
- package/dist/runtime-assets/node-pty/lib/index.js +52 -0
- package/dist/runtime-assets/node-pty/lib/interfaces.js +7 -0
- package/dist/runtime-assets/node-pty/lib/shared/conout.js +11 -0
- package/dist/runtime-assets/node-pty/lib/terminal.js +190 -0
- package/dist/runtime-assets/node-pty/lib/types.js +7 -0
- package/dist/runtime-assets/node-pty/lib/unixTerminal.js +346 -0
- package/dist/runtime-assets/node-pty/lib/utils.js +39 -0
- package/dist/runtime-assets/node-pty/lib/windowsConoutConnection.js +125 -0
- package/dist/runtime-assets/node-pty/lib/windowsPtyAgent.js +320 -0
- package/dist/runtime-assets/node-pty/lib/windowsTerminal.js +199 -0
- package/dist/runtime-assets/node-pty/lib/worker/conoutSocketWorker.js +22 -0
- package/dist/runtime-assets/node-pty/package.json +64 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-x64/conpty.node +0 -0
- package/dist/runtime-assets/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
- package/dist/runtime-autostart.d.ts +61 -0
- package/dist/runtime-autostart.js +161 -0
- package/dist/runtime-autostart.js.map +1 -0
- package/dist/runtime-background.d.ts +200 -0
- package/dist/runtime-background.js +480 -0
- package/dist/runtime-background.js.map +1 -0
- package/dist/runtime-build-info.d.ts +10 -0
- package/dist/runtime-build-info.js +64 -0
- package/dist/runtime-build-info.js.map +1 -0
- package/dist/runtime-bundle.d.ts +22 -0
- package/dist/runtime-bundle.js +158 -0
- package/dist/runtime-bundle.js.map +1 -0
- package/dist/runtime-cli-background.d.ts +92 -0
- package/dist/runtime-cli-background.js +336 -0
- package/dist/runtime-cli-background.js.map +1 -0
- package/dist/runtime-cli-install.d.ts +295 -0
- package/dist/runtime-cli-install.js +869 -0
- package/dist/runtime-cli-install.js.map +1 -0
- package/dist/runtime-cli.d.ts +21 -0
- package/dist/runtime-cli.js +578 -0
- package/dist/runtime-cli.js.map +1 -0
- package/dist/runtime-client-store.d.ts +86 -0
- package/dist/runtime-client-store.js +387 -0
- package/dist/runtime-client-store.js.map +1 -0
- package/dist/runtime-client.d.ts +258 -0
- package/dist/runtime-client.js +1353 -0
- package/dist/runtime-client.js.map +1 -0
- package/dist/runtime-connection.d.ts +22 -0
- package/dist/runtime-connection.js +93 -0
- package/dist/runtime-connection.js.map +1 -0
- package/dist/runtime-coordinator.d.ts +201 -0
- package/dist/runtime-coordinator.js +1514 -0
- package/dist/runtime-coordinator.js.map +1 -0
- package/dist/runtime-credential-profiles.d.ts +89 -0
- package/dist/runtime-credential-profiles.js +304 -0
- package/dist/runtime-credential-profiles.js.map +1 -0
- package/dist/runtime-enroll-notice.d.ts +4 -0
- package/dist/runtime-enroll-notice.js +21 -0
- package/dist/runtime-enroll-notice.js.map +1 -0
- package/dist/runtime-enrollment.d.ts +21 -0
- package/dist/runtime-enrollment.js +52 -0
- package/dist/runtime-enrollment.js.map +1 -0
- package/dist/runtime-general-protocol.d.ts +22 -0
- package/dist/runtime-general-protocol.js +57 -0
- package/dist/runtime-general-protocol.js.map +1 -0
- package/dist/runtime-general-workspace.d.ts +17 -0
- package/dist/runtime-general-workspace.js +213 -0
- package/dist/runtime-general-workspace.js.map +1 -0
- package/dist/runtime-install.d.ts +50 -0
- package/dist/runtime-install.js +189 -0
- package/dist/runtime-install.js.map +1 -0
- package/dist/runtime-pane-assets.d.ts +17 -0
- package/dist/runtime-pane-assets.js +23 -0
- package/dist/runtime-pane-assets.js.map +1 -0
- package/dist/runtime-pane-boot.d.ts +9 -0
- package/dist/runtime-pane-boot.js +47 -0
- package/dist/runtime-pane-boot.js.map +1 -0
- package/dist/runtime-pane-codex-index.d.ts +10 -0
- package/dist/runtime-pane-codex-index.js +151 -0
- package/dist/runtime-pane-codex-index.js.map +1 -0
- package/dist/runtime-pane-config.d.ts +16 -0
- package/dist/runtime-pane-config.js +54 -0
- package/dist/runtime-pane-config.js.map +1 -0
- package/dist/runtime-pane-host.d.ts +63 -0
- package/dist/runtime-pane-host.js +467 -0
- package/dist/runtime-pane-host.js.map +1 -0
- package/dist/runtime-pane-job-owner.d.ts +1 -0
- package/dist/runtime-pane-job-owner.js +29 -0
- package/dist/runtime-pane-job-owner.js.map +1 -0
- package/dist/runtime-pane-job.ps1 +116 -0
- package/dist/runtime-pane-link.d.ts +47 -0
- package/dist/runtime-pane-link.js +338 -0
- package/dist/runtime-pane-link.js.map +1 -0
- package/dist/runtime-pane-mcp-protocol.d.ts +32 -0
- package/dist/runtime-pane-mcp-protocol.js +39 -0
- package/dist/runtime-pane-mcp-protocol.js.map +1 -0
- package/dist/runtime-pane-mcp-relay.d.ts +18 -0
- package/dist/runtime-pane-mcp-relay.js +80 -0
- package/dist/runtime-pane-mcp-relay.js.map +1 -0
- package/dist/runtime-pane-mcp.d.ts +55 -0
- package/dist/runtime-pane-mcp.js +153 -0
- package/dist/runtime-pane-mcp.js.map +1 -0
- package/dist/runtime-pane-native.d.ts +75 -0
- package/dist/runtime-pane-native.js +114 -0
- package/dist/runtime-pane-native.js.map +1 -0
- package/dist/runtime-pane-output.d.ts +19 -0
- package/dist/runtime-pane-output.js +53 -0
- package/dist/runtime-pane-output.js.map +1 -0
- package/dist/runtime-pane-port.d.ts +144 -0
- package/dist/runtime-pane-port.js +574 -0
- package/dist/runtime-pane-port.js.map +1 -0
- package/dist/runtime-pane-private.d.ts +14 -0
- package/dist/runtime-pane-private.js +51 -0
- package/dist/runtime-pane-private.js.map +1 -0
- package/dist/runtime-pane-private.ps1 +14 -0
- package/dist/runtime-pane-process.d.ts +4 -0
- package/dist/runtime-pane-process.js +117 -0
- package/dist/runtime-pane-process.js.map +1 -0
- package/dist/runtime-pane-protocol.d.ts +182 -0
- package/dist/runtime-pane-protocol.js +217 -0
- package/dist/runtime-pane-protocol.js.map +1 -0
- package/dist/runtime-pane-quota-history.d.ts +6 -0
- package/dist/runtime-pane-quota-history.js +44 -0
- package/dist/runtime-pane-quota-history.js.map +1 -0
- package/dist/runtime-pane-screen.d.ts +19 -0
- package/dist/runtime-pane-screen.js +76 -0
- package/dist/runtime-pane-screen.js.map +1 -0
- package/dist/runtime-pane-service.d.ts +16 -0
- package/dist/runtime-pane-service.js +256 -0
- package/dist/runtime-pane-service.js.map +1 -0
- package/dist/runtime-pane-stdio-protocol.d.ts +54 -0
- package/dist/runtime-pane-stdio-protocol.js +94 -0
- package/dist/runtime-pane-stdio-protocol.js.map +1 -0
- package/dist/runtime-pane-stdio.d.ts +3 -0
- package/dist/runtime-pane-stdio.js +123 -0
- package/dist/runtime-pane-stdio.js.map +1 -0
- package/dist/runtime-pane-store.d.ts +43 -0
- package/dist/runtime-pane-store.js +176 -0
- package/dist/runtime-pane-store.js.map +1 -0
- package/dist/runtime-pane-transcript-protocol.d.ts +43 -0
- package/dist/runtime-pane-transcript-protocol.js +58 -0
- package/dist/runtime-pane-transcript-protocol.js.map +1 -0
- package/dist/runtime-pane-transcript.d.ts +50 -0
- package/dist/runtime-pane-transcript.js +666 -0
- package/dist/runtime-pane-transcript.js.map +1 -0
- package/dist/runtime-pane-worker.d.ts +1 -0
- package/dist/runtime-pane-worker.js +167 -0
- package/dist/runtime-pane-worker.js.map +1 -0
- package/dist/runtime-profile-ownership.d.ts +66 -0
- package/dist/runtime-profile-ownership.js +391 -0
- package/dist/runtime-profile-ownership.js.map +1 -0
- package/dist/runtime-protocol.d.ts +340 -0
- package/dist/runtime-protocol.js +179 -0
- package/dist/runtime-protocol.js.map +1 -0
- package/dist/runtime-remote-accounts.d.ts +209 -0
- package/dist/runtime-remote-accounts.js +714 -0
- package/dist/runtime-remote-accounts.js.map +1 -0
- package/dist/runtime-remote-setup.d.ts +108 -0
- package/dist/runtime-remote-setup.js +532 -0
- package/dist/runtime-remote-setup.js.map +1 -0
- package/dist/runtime-signin-transport.d.ts +39 -0
- package/dist/runtime-signin-transport.js +111 -0
- package/dist/runtime-signin-transport.js.map +1 -0
- package/dist/runtime-signin.d.ts +132 -0
- package/dist/runtime-signin.js +290 -0
- package/dist/runtime-signin.js.map +1 -0
- package/dist/runtime-switches.d.ts +79 -0
- package/dist/runtime-switches.js +90 -0
- package/dist/runtime-switches.js.map +1 -0
- package/dist/runtime-transcript-delta-reader.d.ts +23 -0
- package/dist/runtime-transcript-delta-reader.js +74 -0
- package/dist/runtime-transcript-delta-reader.js.map +1 -0
- package/dist/runtime-transcript-source.d.ts +36 -0
- package/dist/runtime-transcript-source.js +189 -0
- package/dist/runtime-transcript-source.js.map +1 -0
- package/dist/runtime-update-activity.d.ts +21 -0
- package/dist/runtime-update-activity.js +51 -0
- package/dist/runtime-update-activity.js.map +1 -0
- package/dist/runtime-update-artifact.d.ts +31 -0
- package/dist/runtime-update-artifact.js +252 -0
- package/dist/runtime-update-artifact.js.map +1 -0
- package/dist/runtime-update-attention.d.ts +4 -0
- package/dist/runtime-update-attention.js +11 -0
- package/dist/runtime-update-attention.js.map +1 -0
- package/dist/runtime-update-controller.d.ts +86 -0
- package/dist/runtime-update-controller.js +743 -0
- package/dist/runtime-update-controller.js.map +1 -0
- package/dist/runtime-update-install.d.ts +31 -0
- package/dist/runtime-update-install.js +205 -0
- package/dist/runtime-update-install.js.map +1 -0
- package/dist/runtime-update-ipc.d.ts +42 -0
- package/dist/runtime-update-ipc.js +144 -0
- package/dist/runtime-update-ipc.js.map +1 -0
- package/dist/runtime-update-journal.d.ts +49 -0
- package/dist/runtime-update-journal.js +128 -0
- package/dist/runtime-update-journal.js.map +1 -0
- package/dist/runtime-update-lock.d.ts +48 -0
- package/dist/runtime-update-lock.js +232 -0
- package/dist/runtime-update-lock.js.map +1 -0
- package/dist/runtime-update-owners.d.ts +29 -0
- package/dist/runtime-update-owners.js +240 -0
- package/dist/runtime-update-owners.js.map +1 -0
- package/dist/runtime-update-protocol.d.ts +15 -0
- package/dist/runtime-update-protocol.js +13 -0
- package/dist/runtime-update-protocol.js.map +1 -0
- package/dist/runtime-update-status.d.ts +30 -0
- package/dist/runtime-update-status.js +31 -0
- package/dist/runtime-update-status.js.map +1 -0
- package/dist/runtime-windows-bridge.d.ts +42 -0
- package/dist/runtime-windows-bridge.js +167 -0
- package/dist/runtime-windows-bridge.js.map +1 -0
- package/dist/scheduler/db.d.ts +10 -0
- package/dist/scheduler/db.js +38 -11
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/task-board-text.js +1 -1
- package/dist/scheduler/task-board-text.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +13 -0
- package/dist/scheduler/task-board.js +28 -3
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/scheduler/types.d.ts +6 -1
- package/dist/service-drain.d.ts +19 -0
- package/dist/service-drain.js +64 -0
- package/dist/service-drain.js.map +1 -0
- package/dist/service-installer.d.ts +7 -2
- package/dist/service-installer.js +13 -10
- package/dist/service-installer.js.map +1 -1
- package/dist/settings-api.d.ts +36 -2
- package/dist/settings-api.js +734 -9
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +7 -0
- package/dist/settings-baseline.js +3 -1
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-change.d.ts +5 -3
- package/dist/settings-change.js +61 -1
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-confirmation.d.ts +44 -7
- package/dist/settings-confirmation.js +56 -14
- package/dist/settings-confirmation.js.map +1 -1
- package/dist/settings-effect.d.ts +22 -0
- package/dist/settings-effect.js +294 -4
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +35 -0
- package/dist/settings-http-confirmation.js +153 -13
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-instance-patch.js +1 -1
- package/dist/settings-instance-patch.js.map +1 -1
- package/dist/settings-request-capability.d.ts +14 -0
- package/dist/settings-request-capability.js +12 -1
- package/dist/settings-request-capability.js.map +1 -1
- package/dist/settings-route-lifetime.d.ts +14 -0
- package/dist/settings-route-lifetime.js +48 -0
- package/dist/settings-route-lifetime.js.map +1 -0
- package/dist/settings-transaction.d.ts +4 -0
- package/dist/settings-transaction.js +9 -0
- package/dist/settings-transaction.js.map +1 -1
- package/dist/setup-form.js +6 -3
- package/dist/setup-form.js.map +1 -1
- package/dist/setup-host.js +1 -1
- package/dist/setup-host.js.map +1 -1
- package/dist/setup-i18n.js +7 -4
- package/dist/setup-i18n.js.map +1 -1
- package/dist/setup-wizard.js +4 -2
- package/dist/setup-wizard.js.map +1 -1
- package/dist/signin-keepalive.d.ts +207 -0
- package/dist/signin-keepalive.js +682 -0
- package/dist/signin-keepalive.js.map +1 -0
- package/dist/structured-signin-transport.d.ts +20 -2
- package/dist/structured-signin-transport.js +57 -2
- package/dist/structured-signin-transport.js.map +1 -1
- package/dist/structured-signin.d.ts +11 -2
- package/dist/structured-signin.js +8 -8
- package/dist/structured-signin.js.map +1 -1
- package/dist/subagent-records.d.ts +45 -0
- package/dist/subagent-records.js +214 -0
- package/dist/subagent-records.js.map +1 -0
- package/dist/subagent-service.d.ts +27 -0
- package/dist/subagent-service.js +199 -0
- package/dist/subagent-service.js.map +1 -0
- package/dist/task-board-tool.d.ts +13 -1
- package/dist/task-board-tool.js +104 -4
- package/dist/task-board-tool.js.map +1 -1
- package/dist/task-board-waker.d.ts +6 -0
- package/dist/task-board-waker.js +4 -0
- package/dist/task-board-waker.js.map +1 -1
- package/dist/team-membership.d.ts +7 -0
- package/dist/team-membership.js +10 -0
- package/dist/team-membership.js.map +1 -0
- package/dist/tips.js +4 -4
- package/dist/tips.js.map +1 -1
- package/dist/tmux-binary.d.ts +59 -0
- package/dist/tmux-binary.js +189 -0
- package/dist/tmux-binary.js.map +1 -0
- package/dist/tmux-control.d.ts +2 -1
- package/dist/tmux-control.js +4 -4
- package/dist/tmux-control.js.map +1 -1
- package/dist/tmux-exec-helper.js +32 -1
- package/dist/tmux-exec-helper.js.map +1 -1
- package/dist/tmux-legacy.d.ts +94 -0
- package/dist/tmux-legacy.js +309 -0
- package/dist/tmux-legacy.js.map +1 -0
- package/dist/tmux-manager.d.ts +11 -4
- package/dist/tmux-manager.js +64 -40
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tmux-pane-host.d.ts +26 -0
- package/dist/tmux-pane-host.js +25 -0
- package/dist/tmux-pane-host.js.map +1 -0
- package/dist/tmux-read.js +4 -3
- package/dist/tmux-read.js.map +1 -1
- package/dist/tmux-rollback.d.ts +31 -0
- package/dist/tmux-rollback.js +72 -0
- package/dist/tmux-rollback.js.map +1 -0
- package/dist/tmux-server.d.ts +102 -0
- package/dist/tmux-server.js +248 -0
- package/dist/tmux-server.js.map +1 -0
- package/dist/tool-permissions.d.ts +2 -3
- package/dist/tool-permissions.js +5 -4
- package/dist/tool-permissions.js.map +1 -1
- package/dist/topic-commands.js +10 -6
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-delta-reader.d.ts +1 -1
- package/dist/transcript-delta-reader.js +1 -1
- package/dist/transcript-delta-reader.js.map +1 -1
- package/dist/transcript-monitor.d.ts +23 -0
- package/dist/transcript-monitor.js +107 -49
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/transcript-needles.d.ts +42 -0
- package/dist/transcript-needles.js +166 -0
- package/dist/transcript-needles.js.map +1 -0
- package/dist/transcript-records.d.ts +22 -0
- package/dist/transcript-records.js +144 -0
- package/dist/transcript-records.js.map +1 -0
- package/dist/transcript-sources.d.ts +5 -0
- package/dist/transcript-sources.js +11 -79
- package/dist/transcript-sources.js.map +1 -1
- package/dist/types.d.ts +34 -0
- package/dist/types.js.map +1 -1
- package/dist/ui/account-identity.js +29 -0
- package/dist/ui/accounts-keepalive.js +118 -0
- package/dist/ui/accounts-manage.js +256 -0
- package/dist/ui/accounts-view.js +460 -0
- package/dist/ui/agent-proposals.js +90 -0
- package/dist/ui/agent-runtime-settings.js +69 -0
- package/dist/ui/agent-runtime.js +124 -0
- package/dist/ui/app.html +8 -1
- package/dist/ui/backend-signin.js +169 -97
- package/dist/ui/chat-ambient.js +1 -1
- package/dist/ui/chat-commands.js +7 -0
- package/dist/ui/chat-md-strings.js +3 -9
- package/dist/ui/chat-msg-actions.js +50 -4
- package/dist/ui/chat-quote.js +256 -0
- package/dist/ui/chat-render.js +3 -670
- package/dist/ui/chat-store.js +23 -7
- package/dist/ui/chat-strings.js +3 -285
- package/dist/ui/chat-thread.js +3 -969
- package/dist/ui/chat-time.js +3 -80
- package/dist/ui/chat-tour.js +1 -1
- package/dist/ui/cli-caps.js +15 -0
- package/dist/ui/cli-picker.js +42 -0
- package/dist/ui/credential-profile-select.js +54 -0
- package/dist/ui/fleet-cache.js +3 -3
- package/dist/ui/fleet-canvas.js +2 -2
- package/dist/ui/fleet-office-dialogue.d.ts +30 -0
- package/dist/ui/fleet-office-dialogue.js +382 -0
- package/dist/ui/fleet-office-editor.js +1 -1
- package/dist/ui/fleet-office-pack.d.ts +9 -0
- package/dist/ui/fleet-office-pack.js +76 -4
- package/dist/ui/fleet-office-skin.js +23 -5
- package/dist/ui/fleet-office-store.js +5 -0
- package/dist/ui/fleet-office.js +174 -7
- package/dist/ui/fleet-org.js +2 -2
- package/dist/ui/fleet-task-card.js +11 -7
- package/dist/ui/fleet-task-common.js +18 -8
- package/dist/ui/fleet-task-menu.js +188 -0
- package/dist/ui/fleet-task-stats.js +124 -0
- package/dist/ui/fleet-task-view.js +340 -0
- package/dist/ui/fleet-tasks.js +131 -43
- package/dist/ui/general-location.js +85 -0
- package/dist/ui/host-install.js +290 -0
- package/dist/ui/html-attachment.js +3 -40
- package/dist/ui/hub-agent-copy.js +23 -0
- package/dist/ui/hub-attachments.js +90 -0
- package/dist/ui/hub-button-actions.js +65 -0
- package/dist/ui/hub-chat-store.js +168 -0
- package/dist/ui/hub-chat-strings.js +79 -0
- package/dist/ui/hub-client.js +410 -0
- package/dist/ui/hub-company-join-strings.js +77 -0
- package/dist/ui/hub-company-join.js +137 -0
- package/dist/ui/hub-directory-editor-strings.js +56 -0
- package/dist/ui/hub-directory-editor.js +163 -0
- package/dist/ui/hub-directory-notice-strings.js +28 -0
- package/dist/ui/hub-directory-notices.js +66 -0
- package/dist/ui/hub-grant-strings.js +13 -0
- package/dist/ui/hub-group-policy.js +183 -0
- package/dist/ui/hub-group-strings.js +110 -0
- package/dist/ui/hub-host-security-notices.js +28 -0
- package/dist/ui/hub-owner-strings.js +56 -0
- package/dist/ui/hub-pairing-progress-strings.js +15 -0
- package/dist/ui/hub-preview.js +101 -0
- package/dist/ui/hub-provider-guidance.js +31 -0
- package/dist/ui/hub-quick-pairing.js +209 -0
- package/dist/ui/hub-quick-strings.js +43 -0
- package/dist/ui/hub-quota.js +85 -0
- package/dist/ui/hub-read-strings.js +7 -0
- package/dist/ui/hub-strings.js +164 -0
- package/dist/ui/hub-switcher.js +27 -0
- package/dist/ui/hub-this-hub.js +113 -0
- package/dist/ui/hub-welcome.js +102 -0
- package/dist/ui/machine-signin.js +56 -0
- package/dist/ui/model-picker.js +68 -0
- package/dist/ui/native-instance-settings.js +44 -0
- package/dist/ui/native-pane-recovery.js +45 -0
- package/dist/ui/office-share-page.js +4 -2
- package/dist/ui/panel-chat.js +167 -87
- package/dist/ui/panel-details.js +3 -2
- package/dist/ui/panel-fleet.js +183 -32
- package/dist/ui/panel-hub.js +974 -0
- package/dist/ui/panel-log.js +4 -4
- package/dist/ui/panel-needs.js +179 -13
- package/dist/ui/panel-notices.js +4 -3
- package/dist/ui/panel-runtimes.js +645 -0
- package/dist/ui/panel-settings.js +292 -201
- package/dist/ui/panel-windows-agent.js +87 -0
- package/dist/ui/panel-windows-cli.js +189 -0
- package/dist/ui/preview-pages.js +3 -41
- package/dist/ui/preview-panel-actions.js +3 -161
- package/dist/ui/preview-panel.js +11 -548
- package/dist/ui/preview-versions.js +3 -155
- package/dist/ui/preview.js +3 -476
- package/dist/ui/provider-marks.js +83 -0
- package/dist/ui/runtime-catalog.js +55 -0
- package/dist/ui/runtime-cli-install.js +214 -0
- package/dist/ui/runtime-commands.d.ts +6 -0
- package/dist/ui/runtime-commands.js +92 -0
- package/dist/ui/runtime-update-commands.d.ts +2 -0
- package/dist/ui/runtime-update-commands.js +11 -0
- package/dist/ui/runtime-update-status.js +53 -0
- package/dist/ui/search-dialog.js +6 -2
- package/dist/ui/settings-access-strings.js +42 -0
- package/dist/ui/settings-agent-filters.js +94 -0
- package/dist/ui/settings-appearance.js +122 -23
- package/dist/ui/settings-apply.js +12 -5
- package/dist/ui/settings-build-version.js +35 -0
- package/dist/ui/settings-catalog.js +57 -13
- package/dist/ui/settings-confirm.js +108 -10
- package/dist/ui/settings-devices.js +283 -0
- package/dist/ui/settings-dialogs.js +72 -28
- package/dist/ui/settings-guests.js +29 -14
- package/dist/ui/settings-hub-browser-certificate.js +76 -0
- package/dist/ui/settings-hub-company-join.js +165 -0
- package/dist/ui/settings-hub-connection.js +121 -0
- package/dist/ui/settings-hub-directory.js +29 -0
- package/dist/ui/settings-hub-membership.js +93 -0
- package/dist/ui/settings-hub-preview.js +74 -0
- package/dist/ui/settings-hub-retention.js +54 -0
- package/dist/ui/settings-hub-run.js +61 -0
- package/dist/ui/settings-hub-section.js +63 -0
- package/dist/ui/settings-hub-setup-strings.js +70 -0
- package/dist/ui/settings-hub-setup.js +195 -0
- package/dist/ui/settings-hub.js +266 -0
- package/dist/ui/settings-layout.js +246 -0
- package/dist/ui/settings-model.js +10 -1
- package/dist/ui/settings-named-test.js +2 -2
- package/dist/ui/settings-outside.js +310 -0
- package/dist/ui/settings-quota-notice.js +102 -0
- package/dist/ui/settings-registry.js +26 -6
- package/dist/ui/settings-restart-strings.js +17 -0
- package/dist/ui/settings-revoke-strings.js +28 -0
- package/dist/ui/settings-shared-strings.js +143 -0
- package/dist/ui/settings-shared.js +345 -0
- package/dist/ui/settings-shortcuts.js +65 -0
- package/dist/ui/settings-strings.js +146 -71
- package/dist/ui/settings-update.js +69 -0
- package/dist/ui/settings-web-authority.js +29 -15
- package/dist/ui/shared/accounts-keepalive.css +12 -0
- package/dist/ui/shared/accounts.css +88 -0
- package/dist/ui/shared/agend-auth.js +8 -1
- package/dist/ui/shared/app-i18n.js +25 -18
- package/dist/ui/shared/app-route.js +12 -3
- package/dist/ui/shared/app-session.js +13 -12
- package/dist/ui/shared/app-shell.js +320 -48
- package/dist/ui/shared/app-store.js +3 -2
- package/dist/ui/shared/app-stream.js +3 -1
- package/dist/ui/shared/app-update.js +215 -0
- package/dist/ui/shared/app.css +1542 -8
- package/dist/ui/shared/app.js +18 -4
- package/dist/ui/shared/chat-composer.js +68 -0
- package/dist/ui/shared/chat-md-strings.js +9 -0
- package/dist/ui/shared/chat-render.js +682 -0
- package/dist/ui/shared/chat-strings.js +333 -0
- package/dist/ui/shared/chat-thread.js +969 -0
- package/dist/ui/shared/chat-time.js +80 -0
- package/dist/ui/shared/device-roles.js +27 -0
- package/dist/ui/shared/header-tools.js +9 -9
- package/dist/ui/shared/host-install.css +10 -0
- package/dist/ui/shared/html-attachment.js +42 -0
- package/dist/ui/shared/hub-chat.css +98 -0
- package/dist/ui/shared/hub-groups.css +28 -0
- package/dist/ui/shared/hub-owner.css +57 -0
- package/dist/ui/shared/hub-quota.css +8 -0
- package/dist/ui/shared/hub-signin.css +24 -0
- package/dist/ui/shared/hub.css +78 -0
- package/dist/ui/shared/instance-nav.js +35 -8
- package/dist/ui/shared/instance-switch.js +4 -3
- package/dist/ui/shared/loading.css +37 -0
- package/dist/ui/shared/machine-name.js +13 -0
- package/dist/ui/shared/model-picker.css +21 -0
- package/dist/ui/shared/page-head.js +8 -0
- package/dist/ui/shared/preview-pages.js +41 -0
- package/dist/ui/shared/preview-panel-actions.js +168 -0
- package/dist/ui/shared/preview-panel.js +565 -0
- package/dist/ui/shared/preview-versions.js +155 -0
- package/dist/ui/shared/preview.js +476 -0
- package/dist/ui/shared/qrcode.module.js +2237 -0
- package/dist/ui/shared/runtime-install.css +55 -0
- package/dist/ui/shared/settings-width.js +31 -0
- package/dist/ui/shared/setup-host-text.js +8 -5
- package/dist/ui/shared/side-rail.js +15 -0
- package/dist/ui/shared/signin-authenticator.js +60 -0
- package/dist/ui/shared/signin.js +315 -25
- package/dist/ui/shared/subagent-row.css +15 -0
- package/dist/ui/shared/task-board.css +95 -0
- package/dist/ui/shared/tokens.css +1 -0
- package/dist/ui/shared/ui-dialog.js +2 -2
- package/dist/ui/shared/ui-menu.js +30 -10
- package/dist/ui/shared/ui-states.js +14 -3
- package/dist/ui/shared/usage-dialog.js +4 -73
- package/dist/ui/shared/usage-meter.js +84 -0
- package/dist/ui/shared/vendor/qrcode-generator.LICENSE +27 -0
- package/dist/ui/shared/vendor/vendor.json +19 -2
- package/dist/ui/shared/view-strings.js +26 -18
- package/dist/ui/shared/web-authorize.js +55 -5
- package/dist/ui/shared/workspace-follow.css +19 -0
- package/dist/ui/shared/workspace.css +20 -0
- package/dist/ui/signin-authenticator.html +60 -0
- package/dist/ui/signin.html +27 -2
- package/dist/ui/structured-signin.js +89 -39
- package/dist/ui/subagent-row.js +72 -0
- package/dist/ui/web-terminal/terminal.js +9 -9
- package/dist/ui/windows-agents-nav.js +2 -0
- package/dist/ui/windows-cli-catalog.js +108 -0
- package/dist/ui/workspace-follow-strings.js +28 -0
- package/dist/ui/workspace-panel.js +378 -0
- package/dist/ui/workspace-strings.js +35 -0
- package/dist/unattended-install.d.ts +11 -2
- package/dist/unattended-install.js +41 -6
- package/dist/unattended-install.js.map +1 -1
- package/dist/update-dispatch.d.ts +32 -4
- package/dist/update-dispatch.js +146 -16
- package/dist/update-dispatch.js.map +1 -1
- package/dist/update-install.d.ts +7 -0
- package/dist/update-install.js +23 -0
- package/dist/update-install.js.map +1 -1
- package/dist/update-launch.d.ts +1 -1
- package/dist/update-launch.js +6 -3
- package/dist/update-launch.js.map +1 -1
- package/dist/update-marker.d.ts +4 -2
- package/dist/update-marker.js +4 -3
- package/dist/update-marker.js.map +1 -1
- package/dist/update-npm-env.d.ts +70 -0
- package/dist/update-npm-env.js +128 -0
- package/dist/update-npm-env.js.map +1 -0
- package/dist/usage/providers.d.ts +8 -0
- package/dist/usage/providers.js +36 -26
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/quota-notices.d.ts +38 -0
- package/dist/usage/quota-notices.js +160 -0
- package/dist/usage/quota-notices.js.map +1 -0
- package/dist/usage/usage-api.d.ts +2 -1
- package/dist/usage/usage-api.js +19 -10
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/usage-rollup.d.ts +3 -0
- package/dist/usage-rollup.js +2 -0
- package/dist/usage-rollup.js.map +1 -1
- package/dist/view-api.d.ts +2 -8
- package/dist/view-api.js +8 -16
- package/dist/view-api.js.map +1 -1
- package/dist/web-api.d.ts +163 -3
- package/dist/web-api.js +1391 -32
- package/dist/web-api.js.map +1 -1
- package/dist/web-auth.js +2 -1
- package/dist/web-auth.js.map +1 -1
- package/dist/web-backend-login.d.ts +39 -3
- package/dist/web-backend-login.js +25 -17
- package/dist/web-backend-login.js.map +1 -1
- package/dist/web-channel-echo.js +3 -1
- package/dist/web-channel-echo.js.map +1 -1
- package/dist/web-chat-history.d.ts +19 -2
- package/dist/web-chat-history.js +72 -3
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-commands.d.ts +9 -1
- package/dist/web-commands.js +7 -1
- package/dist/web-commands.js.map +1 -1
- package/dist/web-device-login.d.ts +153 -0
- package/dist/web-device-login.js +278 -0
- package/dist/web-device-login.js.map +1 -0
- package/dist/web-host-install.d.ts +127 -0
- package/dist/web-host-install.js +165 -0
- package/dist/web-host-install.js.map +1 -0
- package/dist/web-login.d.ts +35 -1
- package/dist/web-login.js +51 -5
- package/dist/web-login.js.map +1 -1
- package/dist/web-notices.d.ts +9 -0
- package/dist/web-notices.js +19 -0
- package/dist/web-notices.js.map +1 -1
- package/dist/web-office-skins.d.ts +9 -0
- package/dist/web-office-skins.js +16 -1
- package/dist/web-office-skins.js.map +1 -1
- package/dist/web-only-fleet.d.ts +20 -0
- package/dist/web-only-fleet.js +21 -0
- package/dist/web-only-fleet.js.map +1 -1
- package/dist/web-remote-access.d.ts +273 -0
- package/dist/web-remote-access.js +610 -0
- package/dist/web-remote-access.js.map +1 -0
- package/dist/web-session.d.ts +61 -0
- package/dist/web-session.js +47 -1
- package/dist/web-session.js.map +1 -1
- package/dist/web-settings-patch.d.ts +3 -1
- package/dist/web-settings-patch.js +4 -1
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/web-shell-routes.d.ts +10 -1
- package/dist/web-shell-routes.js +14 -2
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-signin-device.d.ts +16 -0
- package/dist/web-signin-device.js +81 -0
- package/dist/web-signin-device.js.map +1 -0
- package/dist/web-signin-link.d.ts +42 -0
- package/dist/web-signin-link.js +110 -0
- package/dist/web-signin-link.js.map +1 -0
- package/dist/web-terminal.d.ts +11 -30
- package/dist/web-terminal.js +23 -8
- package/dist/web-terminal.js.map +1 -1
- package/dist/web-update.d.ts +78 -0
- package/dist/web-update.js +106 -0
- package/dist/web-update.js.map +1 -0
- package/dist/windows-agents.d.ts +127 -0
- package/dist/windows-agents.js +491 -0
- package/dist/windows-agents.js.map +1 -0
- package/dist/windows-cli-api.d.ts +48 -0
- package/dist/windows-cli-api.js +207 -0
- package/dist/windows-cli-api.js.map +1 -0
- package/dist/windows-cli-providers.d.ts +109 -0
- package/dist/windows-cli-providers.js +396 -0
- package/dist/windows-cli-providers.js.map +1 -0
- package/dist/windows-cli-worker.d.ts +99 -0
- package/dist/windows-cli-worker.js +729 -0
- package/dist/windows-cli-worker.js.map +1 -0
- package/dist/windows-cli.d.ts +130 -0
- package/dist/windows-cli.js +424 -0
- package/dist/windows-cli.js.map +1 -0
- package/dist/windows-native-mcp.d.ts +19 -0
- package/dist/windows-native-mcp.js +143 -0
- package/dist/windows-native-mcp.js.map +1 -0
- package/dist/windows-pane-mcp.d.ts +26 -0
- package/dist/windows-pane-mcp.js +187 -0
- package/dist/windows-pane-mcp.js.map +1 -0
- package/dist/workspace-follow-parse.d.ts +36 -0
- package/dist/workspace-follow-parse.js +208 -0
- package/dist/workspace-follow-parse.js.map +1 -0
- package/dist/workspace-follow-records.d.ts +17 -0
- package/dist/workspace-follow-records.js +88 -0
- package/dist/workspace-follow-records.js.map +1 -0
- package/dist/workspace-follow.d.ts +41 -0
- package/dist/workspace-follow.js +143 -0
- package/dist/workspace-follow.js.map +1 -0
- package/dist/wsl-detect.d.ts +1 -0
- package/dist/wsl-detect.js +20 -0
- package/dist/wsl-detect.js.map +1 -0
- package/dist/yaml-shared-nodes.js +8 -3
- package/dist/yaml-shared-nodes.js.map +1 -1
- package/launcher/agend-install.cjs +24 -4
- package/launcher/launchd-session-type.cjs +14 -0
- package/launcher/postinstall.cjs +27 -2
- package/launcher/tmux-bundle.cjs +263 -0
- package/package.json +16 -4
- package/templates/launchd.plist.ejs +3 -1
- package/templates/runtime-assets/conpty-LICENSE +21 -0
- package/templates/runtime-assets/conpty-NOTICE.md +503 -0
- package/templates/runtime-assets/local-pane-stage.ps1 +101 -0
- package/templates/runtime-assets/runtime-pane-job.ps1 +116 -0
- package/templates/runtime-assets/runtime-pane-private.ps1 +14 -0
- package/templates/runtime-assets/xterm-LICENSE +21 -0
- package/templates/runtime-install/install.ps1 +618 -0
|
@@ -0,0 +1,618 @@
|
|
|
1
|
+
# AgEnD Runtime for Windows: installs the runner that lets this PC work for an AgEnD fleet.
|
|
2
|
+
#
|
|
3
|
+
# Do not type this file's address by hand. The AgEnD page (Settings -> Runtime -> Connect a computer) shows the command to
|
|
4
|
+
# copy, with your fleet's address and THIS file's SHA-256 filled in. The command downloads this file, checks the hash shown on
|
|
5
|
+
# the page and only then runs it, so what runs is exactly what the page vouches for, whatever the TLS trust decision was.
|
|
6
|
+
# The server address is the one the command put in $agend (the reviewed address, never the Host that happened to serve this
|
|
7
|
+
# file); nothing here is looked up from the network, and nothing here is a secret. $agend is used only as that address, after the
|
|
8
|
+
# origin check below, for the download, the receipt, agend-server.json and the connection. This file is the same bytes for everyone
|
|
9
|
+
# and for every request.
|
|
10
|
+
#
|
|
11
|
+
# It is run by the page's command (`iex` of the downloaded text), so it is kept safe for that: ASCII only (Windows
|
|
12
|
+
# PowerShell 5.1 may decode a download as the wrong code page), no param block, and no `exit` (under iex it would close the
|
|
13
|
+
# window). Windows PowerShell 5.1 and PowerShell 7 both run it. It needs no administrator rights and never changes your
|
|
14
|
+
# execution policy. Under Constrained Language Mode or AppLocker the page's command stops before this script is ever run (it cannot compute the hash there): use the ZIP from the same page instead.
|
|
15
|
+
#
|
|
16
|
+
# What it does, in order:
|
|
17
|
+
# 1. Checks that Node.js 22.14 or newer is installed (it never installs software for you).
|
|
18
|
+
# 2. Downloads the Runtime archive from $agend, checks its SHA-256 against the value pinned inside this script and, if it
|
|
19
|
+
# does not match, stops before anything is unpacked.
|
|
20
|
+
# 3. Unpacks it into %LOCALAPPDATA%\agend-runtime\<version>+<build>, NEXT TO any version already there (the folder names the build,
|
|
21
|
+
# the first 8 characters of the archive's SHA-256, because one version number can cover more than one build). An existing folder
|
|
22
|
+
# is never deleted or replaced: it may be the Runtime that is running right now.
|
|
23
|
+
# 4. Points agend-runtime at the new version: bin\agend-runtime.cmd never changes, and bin\current.txt (the version it
|
|
24
|
+
# starts) is swapped in with an atomic file replace. A Runtime that is already running keeps running its own version.
|
|
25
|
+
# 5. Adds the bin folder to YOUR user PATH (not the system PATH).
|
|
26
|
+
# 6. Leaves a reconnect entry for this AgEnD under <install folder>\connect\<server>: agend-server.json (only the public address, never
|
|
27
|
+
# a credential or a pairing code) and the same connect-agend.bat the ZIP has, so the next connection is a double-click.
|
|
28
|
+
# 7. Connects, in this same window, when - and only when - this is an interactive console (stdin and stdout are the console, not
|
|
29
|
+
# -NonInteractive, not the ISE, no usual CI variable such as CI or GITHUB_ACTIONS set) and $agendNoConnect is not set. It runs the Runtime's own `connect --connection-dir`, the logic
|
|
30
|
+
# connect-agend.bat uses: a new profile asks for the one-time pairing code, shows the fingerprint and waits for your approval in
|
|
31
|
+
# AgEnD; a profile already paired to this AgEnD just reconnects; one paired to another AgEnD gets its own profile and that pairing is
|
|
32
|
+
# left alone. The code is typed into the terminal by a person: the Runtime accepts it from nothing else, so this script never sees it.
|
|
33
|
+
# Once it is connected the Runtime moves to the background and `connect` ends, so closing this window does not disconnect it, and the
|
|
34
|
+
# command returns (an AI agent or CI does not wait for it). It also adds a Task Scheduler task for your own account that starts it when
|
|
35
|
+
# you sign in (no administrator rights, not a Windows service). `agend-runtime status`, `stop` and `logs` manage it. $agendForeground = 1
|
|
36
|
+
# keeps the Runtime in this window instead, as before.
|
|
37
|
+
# 7a. When this run switched `agend-runtime` to a different build than before, or is a repair run, a Runtime that runs in the background is
|
|
38
|
+
# stopped and started again so it uses the installed version (`agend-runtime restart --all`; a Runtime that runs in a window is never touched).
|
|
39
|
+
# Anywhere else (an AI agent, CI, a pipeline, $agendNoConnect) it only installs, prints the exact command to run next and ends with
|
|
40
|
+
# exit code 0. The Runtime is started after the install lock is released, because a running Runtime needs that lock for updates.
|
|
41
|
+
# 7b. With a ONE-TIME TOKEN ($agendEnroll and $agendFingerprint, set by the page's "install command") it connects in ANY window, interactive or
|
|
42
|
+
# not, with no pairing code and no approval step: the token is the authorisation, and it could only come from an administrator's signed-in
|
|
43
|
+
# AgEnD page. The token is checked for its shape before anything is installed, copied out of the variable (which is cleared at once), and
|
|
44
|
+
# handed to the Runtime on its standard input - never on the command line, never in an environment variable, never in a file. The Runtime
|
|
45
|
+
# first checks that the server is the AgEnD whose fingerprint $agendFingerprint names and sends the token only then; the token works once, for 15
|
|
46
|
+
# minutes, and can be revoked on the AgEnD page. A computer already connected to this AgEnD just reconnects and the token is not used.
|
|
47
|
+
# Without a token everything is exactly as in 7. $agendNoConnect (and a repair run) still win: with them nothing is connected and the token is not used.
|
|
48
|
+
#
|
|
49
|
+
# Optional, set in the same PowerShell window before running it:
|
|
50
|
+
# $agendNoConnect = 1 install only: do not connect, even in an interactive window (unset it with $null)
|
|
51
|
+
# $agendForeground = 1 connect, but keep the Runtime in this window (Ctrl+C stops it) instead of moving it to the background
|
|
52
|
+
# $agendEnroll = '<token>'; $agendFingerprint = '<64 hex>' the one-time token and server fingerprint from the page's install command (both are cleared by this script)
|
|
53
|
+
# $env:AGEND_RUNTIME_REPAIR = '1' keep PATH unchanged; print run with an existing profile, never pairing steps or a connection
|
|
54
|
+
# $env:AGEND_RUNTIME_NO_PATH = '1' leave PATH alone (the final message then shows the full path to run)
|
|
55
|
+
# $env:AGEND_RUNTIME_INSTALL_DIR = 'D:\agend' install somewhere other than %LOCALAPPDATA%\agend-runtime
|
|
56
|
+
# If it fails it says why, leaves what was installed before untouched, and sets $LASTEXITCODE to 1.
|
|
57
|
+
& {
|
|
58
|
+
$ErrorActionPreference = 'Stop'
|
|
59
|
+
|
|
60
|
+
# Pinned by the AgEnD server that serves this file: the version and the SHA-256 of the one archive it serves.
|
|
61
|
+
$pinnedVersion = '@@AGEND_RUNTIME_VERSION@@'
|
|
62
|
+
$pinnedSha256 = '@@AGEND_RUNTIME_SHA256@@'
|
|
63
|
+
$maxArchiveBytes = 16MB
|
|
64
|
+
|
|
65
|
+
function Write-Step([string]$text) { Write-Host ('AgEnD Runtime: ' + $text) }
|
|
66
|
+
function Write-Problem([string]$text) { Write-Host ('AgEnD Runtime: ' + $text) -ForegroundColor Red }
|
|
67
|
+
|
|
68
|
+
# Only an origin: https, or http for this computer itself (an SSH-forwarded port). No path, credentials, query or fragment.
|
|
69
|
+
function Resolve-AgendOrigin($value) {
|
|
70
|
+
if (-not ($value -is [string]) -or $value.Length -eq 0 -or $value.Length -gt 2048 -or $value -match '[\s\x00-\x1f\x7f]') { return '' }
|
|
71
|
+
$uri = $null
|
|
72
|
+
if (-not [Uri]::TryCreate($value, [UriKind]::Absolute, [ref]$uri)) { return '' }
|
|
73
|
+
$local = $uri.Host -in 'localhost', '127.0.0.1', '[::1]', '::1'
|
|
74
|
+
if (-not ($uri.Scheme -eq 'https' -or ($uri.Scheme -eq 'http' -and $local))) { return '' }
|
|
75
|
+
if ($uri.UserInfo -ne '' -or $uri.Query -ne '' -or $uri.Fragment -ne '' -or $uri.AbsolutePath -ne '/') { return '' }
|
|
76
|
+
return $uri.GetLeftPart([UriPartial]::Authority)
|
|
77
|
+
}
|
|
78
|
+
# `$agendNoConnect = 1`, set in the same window before the command, means "install only". Empty, 0, false, no and off mean "not set".
|
|
79
|
+
function Test-AgendSwitch($value) {
|
|
80
|
+
if ($null -eq $value) { return $false }
|
|
81
|
+
$text = ([string]$value).Trim()
|
|
82
|
+
return -not ($text -eq '' -or $text -in '0', 'false', 'no', 'off')
|
|
83
|
+
}
|
|
84
|
+
# The one-time install-command token ("agend_enroll_" and 43 URL-safe base64 characters) and the AgEnD server fingerprint (the SHA-256 of its enrollment
|
|
85
|
+
# key, 64 lower-case hex digits). Case-sensitive on purpose. A value that fails is refused before anything is installed, and is never echoed.
|
|
86
|
+
function Test-AgendEnrollToken($value) { return ($value -is [string]) -and ($value -cmatch '\Aagend_enroll_[A-Za-z0-9_-]{43}\z') }
|
|
87
|
+
function Test-AgendFingerprint($value) { return ($value -is [string]) -and ($value -cmatch '\A[a-f0-9]{64}\z') }
|
|
88
|
+
# True only at a real, interactive console. The pairing code is typed by a person and the Runtime reads it from nothing else, so a
|
|
89
|
+
# redirected stdin or stdout (an AI agent, CI, a pipeline), -NonInteractive (any abbreviation of it), the ISE (no console for a child
|
|
90
|
+
# process) and a CI environment variable (CI, GITHUB_ACTIONS, TF_BUILD, ...: an agent on a pseudo-terminal) are all "not interactive". When in
|
|
91
|
+
# doubt it answers false: the cost is one command to run by hand, never a hung window.
|
|
92
|
+
function Test-AgendInteractive {
|
|
93
|
+
try {
|
|
94
|
+
if ([Console]::IsInputRedirected -or [Console]::IsOutputRedirected) { return $false }
|
|
95
|
+
if ([string]$Host.Name -match 'ISE') { return $false }
|
|
96
|
+
foreach ($arg in [Environment]::GetCommandLineArgs()) { if ($arg -match '\A[-/]noni') { return $false } }
|
|
97
|
+
# An AI agent or CI step that gives PowerShell a pseudo-terminal looks interactive from in here, but nobody is there to type a pairing code. The usual
|
|
98
|
+
# CI variables say so: any of them set (and not 0, false, no or off, the same reading as $agendNoConnect) means "not interactive".
|
|
99
|
+
foreach ($name in 'CI', 'GITHUB_ACTIONS', 'TF_BUILD', 'BUILD_BUILDID', 'JENKINS_URL', 'GITLAB_CI', 'CIRCLECI', 'BUILDKITE', 'TEAMCITY_VERSION') {
|
|
100
|
+
if (Test-AgendSwitch ([Environment]::GetEnvironmentVariable($name))) { return $false }
|
|
101
|
+
}
|
|
102
|
+
return $true
|
|
103
|
+
} catch { return $false }
|
|
104
|
+
}
|
|
105
|
+
# What to do after the install, as one word: repair (never connect), switch ($agendNoConnect), enroll (a valid one-time token: connect with it in
|
|
106
|
+
# any window), noninteractive, noentry (the reconnect entry could not be written) or connect. The order is the order of precedence.
|
|
107
|
+
function Get-AgendConnectMode([bool]$Repair, [bool]$NoConnect, [bool]$Interactive, [bool]$HasEntry, [bool]$HasToken = $false) {
|
|
108
|
+
if ($Repair) { return 'repair' }
|
|
109
|
+
if ($NoConnect) { return 'switch' }
|
|
110
|
+
if ($HasToken) { if ($HasEntry) { return 'enroll' } else { return 'noentry' } }
|
|
111
|
+
if (-not $Interactive) { return 'noninteractive' }
|
|
112
|
+
if (-not $HasEntry) { return 'noentry' }
|
|
113
|
+
return 'connect'
|
|
114
|
+
}
|
|
115
|
+
# One folder per AgEnD address under <install>\connect, so two AgEnDs on one PC never overwrite each other's reconnect entry. The name is
|
|
116
|
+
# only a label (the Runtime picks the profile from the address inside agend-server.json): host, port and 8 hex characters of the address's hash.
|
|
117
|
+
function Get-AgendConnectName([string]$Origin) {
|
|
118
|
+
$uri = [Uri]$Origin
|
|
119
|
+
$sha = [Security.Cryptography.SHA256]::Create()
|
|
120
|
+
try { $hash = ([BitConverter]::ToString($sha.ComputeHash([Text.Encoding]::UTF8.GetBytes($Origin))) -replace '-', '').ToLowerInvariant() } finally { $sha.Dispose() }
|
|
121
|
+
return (([string]$uri.Host -replace '[^A-Za-z0-9.-]', '_').ToLowerInvariant() + '-' + $uri.Port + '-' + $hash.Substring(0, 8))
|
|
122
|
+
}
|
|
123
|
+
# Node.js satisfying the Runtime's engines: ^22.14.0 || ^23.6.0 || >=24.
|
|
124
|
+
function Test-NodeVersion([string]$text) {
|
|
125
|
+
$m = [regex]::Match($text, '\Av?(\d+)\.(\d+)\.(\d+)')
|
|
126
|
+
if (-not $m.Success) { return $false }
|
|
127
|
+
$major = [int]$m.Groups[1].Value; $minor = [int]$m.Groups[2].Value
|
|
128
|
+
return ($major -ge 24) -or ($major -eq 23 -and $minor -ge 6) -or ($major -eq 22 -and $minor -ge 14)
|
|
129
|
+
}
|
|
130
|
+
# One bounded download: no redirect is followed, and neither the wait nor the size can run on.
|
|
131
|
+
function Save-AgendArchive([string]$Uri, [string]$OutFile, [long]$MaxBytes) {
|
|
132
|
+
$request = [Net.HttpWebRequest]::Create($Uri)
|
|
133
|
+
$request.AllowAutoRedirect = $false; $request.Timeout = 120000; $request.ReadWriteTimeout = 60000; $request.UserAgent = 'agend-runtime-install'
|
|
134
|
+
$response = $null; $bodyStream = $null; $output = $null; $done = $false
|
|
135
|
+
try {
|
|
136
|
+
$response = $request.GetResponse()
|
|
137
|
+
if ([int]$response.StatusCode -ne 200) { throw ('The AgEnD server answered ' + [int]$response.StatusCode + ' for the Runtime archive.') }
|
|
138
|
+
if ($response.ContentLength -gt $MaxBytes) { throw 'The Runtime archive is larger than expected; refusing to download it.' }
|
|
139
|
+
$bodyStream = $response.GetResponseStream()
|
|
140
|
+
$output = [IO.File]::Open($OutFile, [IO.FileMode]::Create, [IO.FileAccess]::Write, [IO.FileShare]::None)
|
|
141
|
+
$buffer = New-Object byte[] 65536; $total = 0
|
|
142
|
+
while (($count = $bodyStream.Read($buffer, 0, $buffer.Length)) -gt 0) {
|
|
143
|
+
$total += $count
|
|
144
|
+
if ($total -gt $MaxBytes) { throw 'The Runtime archive is larger than expected; stopped downloading it.' }
|
|
145
|
+
$output.Write($buffer, 0, $count)
|
|
146
|
+
}
|
|
147
|
+
$done = $true
|
|
148
|
+
} finally {
|
|
149
|
+
if ($output) { $output.Dispose() }; if ($bodyStream) { $bodyStream.Dispose() }; if ($response) { $response.Close() }
|
|
150
|
+
if (-not $done) { Remove-Item -LiteralPath $OutFile -Force -ErrorAction SilentlyContinue }
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
# .NET directly, not Get-FileHash: a PowerShell started from another one can inherit a module path that hides that cmdlet.
|
|
154
|
+
function Get-AgendSha256([string]$Path) {
|
|
155
|
+
$stream = [IO.File]::OpenRead($Path)
|
|
156
|
+
try {
|
|
157
|
+
$sha = [Security.Cryptography.SHA256]::Create()
|
|
158
|
+
try { return ([BitConverter]::ToString($sha.ComputeHash($stream)) -replace '-', '').ToLowerInvariant() } finally { $sha.Dispose() }
|
|
159
|
+
} finally { $stream.Dispose() }
|
|
160
|
+
}
|
|
161
|
+
# Writes a small file by writing a sibling and swapping it in, so a reader (a shim that is starting right now) sees the old or the
|
|
162
|
+
# new content, never half of it. Nothing happens when the file already says this.
|
|
163
|
+
function Set-AgendFile([string]$Path, [string]$Text, [scriptblock]$BeforeRename = $null) {
|
|
164
|
+
if ((Test-Path -LiteralPath $Path) -and ([IO.File]::ReadAllText($Path) -ceq $Text)) { return }
|
|
165
|
+
$new = $Path + '.' + [Guid]::NewGuid().ToString('N') + '.new'
|
|
166
|
+
[IO.File]::WriteAllText($new, $Text, [Text.Encoding]::ASCII)
|
|
167
|
+
try {
|
|
168
|
+
if ($BeforeRename) { & $BeforeRename }
|
|
169
|
+
# [NullString]::Value, not $null: PowerShell turns $null into an empty string for a string parameter, and Replace refuses that.
|
|
170
|
+
if (Test-Path -LiteralPath $Path) { [IO.File]::Replace($new, $Path, [NullString]::Value) } else { [IO.File]::Move($new, $Path) }
|
|
171
|
+
} catch {
|
|
172
|
+
Remove-Item -LiteralPath $new -Force -ErrorAction SilentlyContinue
|
|
173
|
+
throw ('Could not update ' + $Path + ' (' + $_.Exception.Message + '). Close any agend-runtime window that is starting, then run the install command again.')
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function Assert-AgendDirectory([string]$Path) {
|
|
177
|
+
$entry = Get-Item -LiteralPath $Path -Force -ErrorAction Stop
|
|
178
|
+
if (-not $entry.PSIsContainer -or ($entry.Attributes -band [IO.FileAttributes]::ReparsePoint)) { throw 'The installation directory is unsafe or changed.' }
|
|
179
|
+
}
|
|
180
|
+
function Read-AgendSmallFile([string]$Path, [int]$Limit) {
|
|
181
|
+
try { $entry = Get-Item -LiteralPath $Path -Force -ErrorAction Stop }
|
|
182
|
+
catch [Management.Automation.ItemNotFoundException] { return $null }
|
|
183
|
+
if ($entry.PSIsContainer -or ($entry.Attributes -band [IO.FileAttributes]::ReparsePoint) -or [string]$entry.LinkType -ne '' -or $entry.Length -gt $Limit) { throw 'Installation metadata is unsafe or too large.' }
|
|
184
|
+
$stream = [IO.File]::Open($Path, [IO.FileMode]::Open, [IO.FileAccess]::Read, [IO.FileShare]::Read)
|
|
185
|
+
try {
|
|
186
|
+
$bytes = New-Object byte[] ($Limit + 1); $length = 0
|
|
187
|
+
while ($length -lt $bytes.Length) { $count = $stream.Read($bytes, $length, $bytes.Length - $length); if ($count -eq 0) { break }; $length += $count }
|
|
188
|
+
if ($length -gt $Limit) { throw 'Installation metadata grew beyond its bound.' }
|
|
189
|
+
return ([Text.UTF8Encoding]::new($false, $true)).GetString($bytes, 0, $length)
|
|
190
|
+
} finally { $stream.Dispose() }
|
|
191
|
+
}
|
|
192
|
+
function Get-AgendBootProof {
|
|
193
|
+
$ticks = [string](Get-CimInstance Win32_OperatingSystem -ErrorAction Stop).LastBootUpTime.ToUniversalTime().Ticks
|
|
194
|
+
if ($ticks -notmatch '\A\d{17,20}\z') { throw 'Windows process ownership could not be verified.' }
|
|
195
|
+
$sha = [Security.Cryptography.SHA256]::Create()
|
|
196
|
+
try { return ([BitConverter]::ToString($sha.ComputeHash([Text.Encoding]::UTF8.GetBytes('agend-windows-boot-v1:' + $ticks))) -replace '-', '').ToLowerInvariant() }
|
|
197
|
+
finally { $sha.Dispose() }
|
|
198
|
+
}
|
|
199
|
+
function Test-AgendOwnerRecord($Owner) {
|
|
200
|
+
$keys = @($Owner.PSObject.Properties.Name)
|
|
201
|
+
if ($keys.Count -ne 6 -or @($keys | Where-Object { $_ -cnotin 'version','type','nonce','pid','birth','boot' }).Count -ne 0 -or -not ($Owner.version -is [int] -or $Owner.version -is [long]) -or $Owner.version -ne 1 -or -not ($Owner.type -is [string]) -or -not ($Owner.nonce -is [string]) -or -not ($Owner.birth -is [string]) -or -not ($Owner.boot -is [string]) -or $Owner.type -cnotin 'installer','supervisor' -or
|
|
202
|
+
[string]$Owner.nonce -notmatch '\A[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\z' -or
|
|
203
|
+
-not ($Owner.pid -is [int] -or $Owner.pid -is [long]) -or $Owner.pid -lt 1 -or [string]$Owner.birth -notmatch '\A\d{17,20}\z' -or [string]$Owner.boot -notmatch '\A[a-f0-9]{64}\z') { throw 'The install lock owner is unconfirmed; use a fresh or separate installation.' }
|
|
204
|
+
}
|
|
205
|
+
function Get-AgendProcessMatch($Owner, [string]$Boot) {
|
|
206
|
+
try { $process = [Diagnostics.Process]::GetProcessById($Owner.pid) }
|
|
207
|
+
catch [ArgumentException] { return 'gone' }
|
|
208
|
+
catch { return 'unknown' }
|
|
209
|
+
try {
|
|
210
|
+
$birth = [string]$process.StartTime.ToUniversalTime().Ticks
|
|
211
|
+
if ($birth -cne [string]$Owner.birth -or $Boot -cne [string]$Owner.boot) { return 'gone' }
|
|
212
|
+
return 'alive'
|
|
213
|
+
} catch { return 'unknown' }
|
|
214
|
+
finally { $process.Dispose() }
|
|
215
|
+
}
|
|
216
|
+
function Read-AgendLock([string]$Path) {
|
|
217
|
+
Assert-AgendDirectory $Path
|
|
218
|
+
$raw = Read-AgendSmallFile (Join-Path $Path 'owner.json') 2048
|
|
219
|
+
if ($null -eq $raw) { throw 'The install lock is incomplete; use a fresh or separate installation.' }
|
|
220
|
+
$owner = $raw | ConvertFrom-Json; Test-AgendOwnerRecord $owner
|
|
221
|
+
return @{ path=$Path; raw=$raw; owner=$owner; birth=[string](Get-Item -LiteralPath $Path -Force).CreationTimeUtc.Ticks }
|
|
222
|
+
}
|
|
223
|
+
function Assert-AgendLock($Lock) {
|
|
224
|
+
$now = Read-AgendLock $Lock.path
|
|
225
|
+
if ($now.birth -cne $Lock.birth -or $now.raw -cne $Lock.raw) { throw 'Installation ownership changed; nothing was switched.' }
|
|
226
|
+
}
|
|
227
|
+
function Remove-AgendLock($Lock) {
|
|
228
|
+
Assert-AgendLock $Lock
|
|
229
|
+
if (@(Get-ChildItem -LiteralPath $Lock.path -Force | Where-Object { $_.Name -cne 'owner.json' }).Count -ne 0) { throw 'Installation cleanup is unconfirmed; its ownership was retained.' }
|
|
230
|
+
[IO.File]::Delete((Join-Path $Lock.path 'owner.json'))
|
|
231
|
+
try { [IO.Directory]::Delete($Lock.path) }
|
|
232
|
+
catch {
|
|
233
|
+
try {
|
|
234
|
+
Assert-AgendDirectory $Lock.path
|
|
235
|
+
if ([string](Get-Item -LiteralPath $Lock.path -Force).CreationTimeUtc.Ticks -ceq $Lock.birth -and $null -eq (Read-AgendSmallFile (Join-Path $Lock.path 'owner.json') 2048)) {
|
|
236
|
+
[IO.File]::WriteAllText((Join-Path $Lock.path 'owner.json'), $Lock.raw, [Text.UTF8Encoding]::new($false))
|
|
237
|
+
}
|
|
238
|
+
} catch { }
|
|
239
|
+
throw 'Installation cleanup is unconfirmed; inspect or retry this installation.'
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
function Enter-AgendInstallLock([string]$Root) {
|
|
243
|
+
Assert-AgendDirectory $Root
|
|
244
|
+
$boot = Get-AgendBootProof; $process = [Diagnostics.Process]::GetCurrentProcess()
|
|
245
|
+
try { $birth = [string]$process.StartTime.ToUniversalTime().Ticks } finally { $process.Dispose() }
|
|
246
|
+
$owner = [pscustomobject][ordered]@{version=1;type='installer';nonce=[Guid]::NewGuid().ToString();pid=[int]$PID;birth=$birth;boot=$boot}
|
|
247
|
+
$raw = $owner | ConvertTo-Json -Compress
|
|
248
|
+
$candidate = Join-Path $Root ('.agend-lock-' + [Guid]::NewGuid().ToString('N')); $null = [IO.Directory]::CreateDirectory($candidate)
|
|
249
|
+
[IO.File]::WriteAllText((Join-Path $candidate 'owner.json'), $raw, [Text.UTF8Encoding]::new($false))
|
|
250
|
+
$created = Read-AgendLock $candidate; $path = Join-Path $Root '.agend-runtime-install.lock'
|
|
251
|
+
try {
|
|
252
|
+
try { [IO.Directory]::Move($candidate, $path); return (Read-AgendLock $path) }
|
|
253
|
+
catch { if (-not [IO.Directory]::Exists($path)) { throw } }
|
|
254
|
+
$previous = Read-AgendLock $path
|
|
255
|
+
if ((Get-AgendProcessMatch $previous.owner $boot) -cne 'gone') { throw 'Another installer or Runtime owns this installation. Retry when it is finished.' }
|
|
256
|
+
# Move an owned empty directory into the election slot: unlike CreateDirectory, Move refuses an existing slot atomically.
|
|
257
|
+
$guard = Join-Path $Root ('.agend-reclaim-' + [Guid]::NewGuid().ToString('N')); $null = [IO.Directory]::CreateDirectory($guard)
|
|
258
|
+
$claim = [Guid]::NewGuid().ToString(); [IO.File]::WriteAllText((Join-Path $guard 'claim.json'), $claim, [Text.Encoding]::ASCII)
|
|
259
|
+
$election = Join-Path $path 'reclaim'; $elected = $false
|
|
260
|
+
try {
|
|
261
|
+
[IO.Directory]::Move($guard, $election); $elected = $true
|
|
262
|
+
Assert-AgendLock $previous
|
|
263
|
+
if (@(Get-ChildItem -LiteralPath $path -Force | Where-Object { $_.Name -cnotin 'owner.json','reclaim' }).Count -ne 0) { throw 'Uncertain installation work remains; ownership was retained.' }
|
|
264
|
+
[IO.File]::Delete((Join-Path $path 'owner.json'))
|
|
265
|
+
[IO.File]::Delete((Join-Path $election 'claim.json')); [IO.Directory]::Delete($election); $elected = $false
|
|
266
|
+
[IO.Directory]::Delete($path)
|
|
267
|
+
} finally {
|
|
268
|
+
$ownedGuard = if ($elected) { $election } else { $guard }
|
|
269
|
+
if ([IO.Directory]::Exists($ownedGuard) -and (Read-AgendSmallFile (Join-Path $ownedGuard 'claim.json') 128) -ceq $claim) {
|
|
270
|
+
[IO.File]::Delete((Join-Path $ownedGuard 'claim.json')); [IO.Directory]::Delete($ownedGuard)
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
[IO.Directory]::Move($candidate, $path); return (Read-AgendLock $path)
|
|
274
|
+
} finally { if ([IO.Directory]::Exists($candidate)) { Remove-AgendLock $created } }
|
|
275
|
+
}
|
|
276
|
+
function Register-AgendInstallOrigin([string]$Root, [string]$Origin, [bool]$Fresh, $Lock) {
|
|
277
|
+
Assert-AgendLock $Lock
|
|
278
|
+
$path = Join-Path $Root '.agend-runtime-install.json'; $raw = Read-AgendSmallFile $path 20000
|
|
279
|
+
if ($null -eq $raw) {
|
|
280
|
+
if (-not $Fresh) { return }
|
|
281
|
+
$receipt = [pscustomobject][ordered]@{version=1;id=[Guid]::NewGuid().ToString();createdAt=[long][Math]::Floor(([DateTime]::UtcNow - [DateTime]'1970-01-01T00:00:00Z').TotalMilliseconds);revision=1;origins=@($Origin);shared=$false}
|
|
282
|
+
} else {
|
|
283
|
+
$receipt = $raw | ConvertFrom-Json; $keys = @($receipt.PSObject.Properties.Name)
|
|
284
|
+
if ($keys.Count -ne 6 -or @($keys | Where-Object { $_ -cnotin 'version','id','createdAt','revision','origins','shared' }).Count -ne 0 -or -not ($receipt.version -is [int] -or $receipt.version -is [long]) -or $receipt.version -ne 1 -or -not ($receipt.id -is [string]) -or
|
|
285
|
+
[string]$receipt.id -notmatch '\A[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\z' -or
|
|
286
|
+
-not ($receipt.createdAt -is [int] -or $receipt.createdAt -is [long]) -or $receipt.createdAt -lt 1 -or $receipt.createdAt -gt 9007199254740991 -or
|
|
287
|
+
-not ($receipt.revision -is [int] -or $receipt.revision -is [long]) -or $receipt.revision -lt 1 -or $receipt.revision -ge 9007199254740991 -or
|
|
288
|
+
-not ($receipt.origins -is [Array]) -or $receipt.origins.Count -lt 1 -or $receipt.origins.Count -gt 8 -or -not ($receipt.shared -is [bool])) { throw 'The managed-install receipt is unconfirmed; use a fresh or separate installation.' }
|
|
289
|
+
$seen = @{}
|
|
290
|
+
foreach ($entry in $receipt.origins) {
|
|
291
|
+
if (-not ($entry -is [string]) -or (Resolve-AgendOrigin $entry) -cne $entry -or $seen.ContainsKey($entry)) { throw 'The managed-install origins are unconfirmed.' }
|
|
292
|
+
$seen[$entry] = $true
|
|
293
|
+
}
|
|
294
|
+
if ($receipt.origins.Count -gt 1 -and -not $receipt.shared) { throw 'The shared-install receipt is unconfirmed.' }
|
|
295
|
+
if ($receipt.origins -ccontains $Origin) { return }
|
|
296
|
+
if ($receipt.origins.Count -ge 8) { throw 'This installation has too many origins. Use a separate fresh install; pairing is kept.' }
|
|
297
|
+
$receipt.origins = @($receipt.origins) + @($Origin); $receipt.shared = $true; $receipt.revision++
|
|
298
|
+
}
|
|
299
|
+
Set-AgendFile $path ($receipt | ConvertTo-Json -Depth 4 -Compress) { Assert-AgendLock $Lock; if ((Read-AgendSmallFile $path 20000) -cne $raw) { throw 'The managed-install receipt changed; nothing was switched.' } }
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
# <root>\connect\<server>\agend-server.json (the public address and nothing else) and connect-agend.bat. Returns that folder.
|
|
303
|
+
# The batch file calls the shim (so it follows current.txt to the newest installed Runtime) and passes its own folder as --connection-dir;
|
|
304
|
+
# the Runtime reads the address from the json and picks the profile the way the ZIP's connect-agend.bat does. `call` re-reads % and ^ in a
|
|
305
|
+
# path, so a folder whose name holds one is refused here rather than written into a batch file that would misread it.
|
|
306
|
+
function Write-AgendConnectEntry([string]$Root, [string]$Origin) {
|
|
307
|
+
if ($Origin -notmatch '\A[A-Za-z0-9.:/\[\]-]+\z') { throw 'the AgEnD address has characters that agend-server.json does not carry' }
|
|
308
|
+
if ($Root -match '[%^]') { throw 'the install folder name contains % or ^, which a batch file cannot carry safely' }
|
|
309
|
+
$parent = Join-Path $Root 'connect'
|
|
310
|
+
$null = New-Item -ItemType Directory -Path $parent -Force; Assert-AgendDirectory $parent
|
|
311
|
+
$folder = Join-Path $parent (Get-AgendConnectName $Origin)
|
|
312
|
+
$null = New-Item -ItemType Directory -Path $folder -Force; Assert-AgendDirectory $folder
|
|
313
|
+
Set-AgendFile (Join-Path $folder 'agend-server.json') ('{' + "`n" + ' "server": "' + $Origin + '"' + "`n" + '}' + "`n")
|
|
314
|
+
Set-AgendFile (Join-Path $folder 'connect-agend.bat') $connectBatText
|
|
315
|
+
return $folder
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
# Adds a folder to the USER PATH in the registry, keeping its value kind: [Environment]::SetEnvironmentVariable would turn a
|
|
319
|
+
# REG_EXPAND_SZ PATH into plain REG_SZ and stop its %VARIABLES% entries expanding, and setx truncates at 1024 characters, so
|
|
320
|
+
# neither is used. An entry already there (written out or with %VARIABLES%) is not added again.
|
|
321
|
+
function Add-UserPathEntry([string]$Folder) {
|
|
322
|
+
$key = [Microsoft.Win32.Registry]::CurrentUser.OpenSubKey('Environment', $true)
|
|
323
|
+
try {
|
|
324
|
+
$raw = [string]$key.GetValue('Path', '', [Microsoft.Win32.RegistryValueOptions]::DoNotExpandEnvironmentNames)
|
|
325
|
+
$kind = [Microsoft.Win32.RegistryValueKind]::ExpandString
|
|
326
|
+
if ($key.GetValueNames() -contains 'Path') { $kind = $key.GetValueKind('Path') }
|
|
327
|
+
$want = $Folder.TrimEnd('\')
|
|
328
|
+
foreach ($entry in $raw.Split(';')) {
|
|
329
|
+
$e = $entry.Trim().TrimEnd('\')
|
|
330
|
+
if ($e -ieq $want -or [Environment]::ExpandEnvironmentVariables($e).TrimEnd('\') -ieq $want) { return $false }
|
|
331
|
+
}
|
|
332
|
+
$next = $Folder
|
|
333
|
+
if ($raw.Trim().Length -gt 0) { $next = $raw.TrimEnd(';') + ';' + $Folder }
|
|
334
|
+
$key.SetValue('Path', $next, $kind)
|
|
335
|
+
} finally { $key.Close() }
|
|
336
|
+
# Tell running programs the environment changed: setting and clearing a throwaway user variable makes Windows broadcast it. The PATH is
|
|
337
|
+
# already written, so a failure here is only a warning (open terminals learn of it later), never "install failed".
|
|
338
|
+
try {
|
|
339
|
+
[Environment]::SetEnvironmentVariable('AGEND_RUNTIME_ENV_REFRESH', '1', 'User')
|
|
340
|
+
[Environment]::SetEnvironmentVariable('AGEND_RUNTIME_ENV_REFRESH', $null, 'User')
|
|
341
|
+
} catch {
|
|
342
|
+
try { [Environment]::SetEnvironmentVariable('AGEND_RUNTIME_ENV_REFRESH', $null, 'User') } catch { }
|
|
343
|
+
Write-Host ('AgEnD Runtime: warning: your PATH was updated, but running programs could not be told (' + $_.Exception.Message + '). Open a new terminal to see the change.') -ForegroundColor Yellow
|
|
344
|
+
}
|
|
345
|
+
return $true
|
|
346
|
+
}
|
|
347
|
+
# The shim never changes from one version to the next, so replacing a version cannot disturb a batch file that is running.
|
|
348
|
+
# It starts the version named in current.txt, next to it; that one small file is what an install swaps.
|
|
349
|
+
# `setlocal DisableDelayedExpansion` comes before any line that expands a path or an argument: with cmd /V:ON (or the DelayedExpansion registry setting)
|
|
350
|
+
# an unmatched `!` in the install folder, which an accepted AGEND_RUNTIME_INSTALL_DIR can hold, would otherwise be eaten out of %~dp0 and the shim would
|
|
351
|
+
# look in another folder and report an incomplete install. (Changed once for that reason: see the change notice below.)
|
|
352
|
+
# DO NOT CHANGE $shimText unless a bug in it makes installs unusable. cmd.exe reads a batch file as it runs it, a piece at a time, not all at
|
|
353
|
+
# once, so rewriting the agend-runtime.cmd of a Runtime that is running (Set-AgendFile does that whenever this text differs from what is on
|
|
354
|
+
# disk) can make that Runtime's window misbehave when it ends. The text names no version for exactly that reason. If it must change, update the
|
|
355
|
+
# pinned hash in tests/runtime-install-script.test.ts in the same commit, and say in the docs and the changelog that running Runtimes should be
|
|
356
|
+
# stopped before the install command is run again.
|
|
357
|
+
$shimText = ('@echo off', 'setlocal DisableDelayedExpansion', 'set "AGEND_RT_VERSION="', 'if not exist "%~dp0current.txt" goto :agend_rt_missing', 'set /p AGEND_RT_VERSION=<"%~dp0current.txt"', 'if not defined AGEND_RT_VERSION goto :agend_rt_missing',
|
|
358
|
+
'if not exist "%~dp0..\%AGEND_RT_VERSION%\dist\runtime-cli.js" goto :agend_rt_missing', 'node.exe "%~dp0..\%AGEND_RT_VERSION%\dist\runtime-cli.js" %*',
|
|
359
|
+
'exit /b %errorlevel%', ':agend_rt_missing', 'echo AgEnD Runtime is not installed correctly. Run the install command shown in AgEnD Settings - Runtime - Connect a computer again.>&2',
|
|
360
|
+
'exit /b 1', '') -join "`r`n"
|
|
361
|
+
|
|
362
|
+
# connect-agend.bat for the reconnect entry: what the ZIP's connect-agend.bat does (connect, then say how it ended and pause), pointed at the
|
|
363
|
+
# installed shim. Like the shim, its text names no version and must not change without a reason: cmd.exe reads a batch file as it runs it, and
|
|
364
|
+
# Set-AgendFile rewrites this file whenever the text differs from what is on disk, which can disturb a window that is running it right now.
|
|
365
|
+
# If it must change, update the pinned hash in tests/runtime-install-script.test.ts in the same commit.
|
|
366
|
+
# (Changed once: connect now ends after moving the Runtime to the background, so the old "AgEnD Runtime stopped." line would have
|
|
367
|
+
# been wrong. A window that is still running the previous connect-agend.bat while this one is written should be closed first.)
|
|
368
|
+
$connectBatText = ('@echo off', 'setlocal DisableDelayedExpansion', 'if not exist "%~dp0..\..\bin\agend-runtime.cmd" (',
|
|
369
|
+
' echo AgEnD Runtime is not installed correctly. Run the install command shown in AgEnD Settings - Runtime - Connect a computer again.', ' pause', ' exit /b 1', ')',
|
|
370
|
+
'call "%~dp0..\..\bin\agend-runtime.cmd" connect --connection-dir "%~dp0."', 'set "AGEND_EXIT=%errorlevel%"', 'echo.',
|
|
371
|
+
'if not "%AGEND_EXIT%"=="0" (', ' echo AgEnD Runtime stopped or could not connect. Read the message above for what to do next.', ') else (', ' echo Done. Read the message above: a Runtime that was started keeps running in the background after this window closes.', ')',
|
|
372
|
+
'pause', '') -join "`r`n"
|
|
373
|
+
|
|
374
|
+
$tmp = $null; $installLock = $null
|
|
375
|
+
$doConnect = $false; $connectDir = $null; $cliJs = $null; $restartCli = $null
|
|
376
|
+
# Tracked apart: the restart below runs only after an installation that finished (the end of the try block was reached) and whose lock was released and confirmed.
|
|
377
|
+
$installFinished = $false; $lockReleased = $true
|
|
378
|
+
try {
|
|
379
|
+
try { [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor 3072 } catch { }
|
|
380
|
+
|
|
381
|
+
$origin = Resolve-AgendOrigin $agend
|
|
382
|
+
if ($origin -eq '') {
|
|
383
|
+
Write-Problem 'This installer needs $agend set to your AgEnD address (https, or http only for this computer).'
|
|
384
|
+
Write-Host 'Do not run this file by hand: copy the install command from AgEnD (Settings -> Runtime -> Connect a computer -> Windows (PowerShell)).'
|
|
385
|
+
Write-Host 'It sets $agend to your address and checks this installer''s SHA-256 against the one the page shows before it runs anything.'
|
|
386
|
+
$global:LASTEXITCODE = 1
|
|
387
|
+
return
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
# the one-time token and server fingerprint the page's command set. They are copied here and cleared from the caller's scope at
|
|
391
|
+
# once (the page's command clears them again afterwards), and checked for their shape before anything is installed: a malformed token is
|
|
392
|
+
# refused with the next step, without being printed. Nothing about the token goes into a file, a log or the command line.
|
|
393
|
+
$enrollToken = $null; $enrollFingerprint = $null
|
|
394
|
+
$rawToken = $agendEnroll; $rawFingerprint = $agendFingerprint
|
|
395
|
+
foreach ($scopeName in 1, 'Global') { foreach ($varName in 'agendEnroll', 'agendFingerprint') { try { Set-Variable -Name $varName -Value $null -Scope $scopeName -ErrorAction Stop } catch { } } }
|
|
396
|
+
# A variable that is not there, or is $null (what the page's command and this script leave behind), is "no token". One that holds anything else, an empty or
|
|
397
|
+
# blank string included, is a token that was meant to be there and is not valid: refused, never quietly turned into the pairing-code route.
|
|
398
|
+
if ($null -ne $rawToken) {
|
|
399
|
+
if (-not (Test-AgendEnrollToken $rawToken)) {
|
|
400
|
+
Write-Problem 'The one-time token in this install command is not valid (it may have been copied incompletely). Nothing was installed.'
|
|
401
|
+
Write-Host 'Open AgEnD Settings -> Runtime -> Connect a computer, generate a new install command there and run it again.'
|
|
402
|
+
$global:LASTEXITCODE = 1
|
|
403
|
+
return
|
|
404
|
+
}
|
|
405
|
+
if (-not (Test-AgendFingerprint $rawFingerprint)) {
|
|
406
|
+
Write-Problem 'The AgEnD server fingerprint in this install command is missing or not valid (it is 64 hexadecimal characters). Nothing was installed.'
|
|
407
|
+
Write-Host 'Open AgEnD Settings -> Runtime -> Connect a computer, generate a new install command there and run it again.'
|
|
408
|
+
$global:LASTEXITCODE = 1
|
|
409
|
+
return
|
|
410
|
+
}
|
|
411
|
+
$enrollToken = [string]$rawToken; $enrollFingerprint = [string]$rawFingerprint
|
|
412
|
+
}
|
|
413
|
+
$rawToken = $null
|
|
414
|
+
|
|
415
|
+
$nodeText = ''
|
|
416
|
+
$node = Get-Command node -ErrorAction SilentlyContinue
|
|
417
|
+
$nodeExe = $null
|
|
418
|
+
if ($node) { $nodeExe = $node.Source; try { $nodeText = ((& $node.Source -v) | Out-String).Trim() } catch { $nodeText = '' } }
|
|
419
|
+
if (-not (Test-NodeVersion $nodeText)) {
|
|
420
|
+
if ($nodeText) { Write-Problem ('Node.js ' + $nodeText + ' is too old. The AgEnD Runtime needs Node.js 22.14 or newer (22.14+, 23.6+ or 24+).') }
|
|
421
|
+
else { Write-Problem 'Node.js was not found. The AgEnD Runtime needs Node.js 22.14 or newer (22.14+, 23.6+ or 24+).' }
|
|
422
|
+
Write-Host 'This installer does not install software for you. Install Node.js yourself, open a new PowerShell window, set $agend and run the command again:'
|
|
423
|
+
Write-Host ' winget install OpenJS.NodeJS.LTS'
|
|
424
|
+
Write-Host 'or download it from https://nodejs.org/'
|
|
425
|
+
$global:LASTEXITCODE = 1
|
|
426
|
+
return
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
$root = [string]$env:AGEND_RUNTIME_INSTALL_DIR
|
|
430
|
+
if ($root -ne '') {
|
|
431
|
+
# A folder you chose: it must be a full path on a drive, never a relative, UNC or control-character path.
|
|
432
|
+
if ($root -notmatch '\A[A-Za-z]:[\\/]' -or $root -match '[\x00-\x1f\x7f]') { throw 'AGEND_RUNTIME_INSTALL_DIR must be a full path on a drive, for example D:\agend.' }
|
|
433
|
+
} else {
|
|
434
|
+
if (-not $env:LOCALAPPDATA) { throw 'LOCALAPPDATA is not set; set AGEND_RUNTIME_INSTALL_DIR to a folder for the Runtime.' }
|
|
435
|
+
$root = Join-Path $env:LOCALAPPDATA 'agend-runtime'
|
|
436
|
+
}
|
|
437
|
+
$root = [IO.Path]::GetFullPath($root).TrimEnd('\')
|
|
438
|
+
# The folder names the build as well as the version: one version number often covers more than one build, and a different build must land
|
|
439
|
+
# beside the old one, not on it. The same build finds its own folder again and only repoints agend-runtime.
|
|
440
|
+
$folder = $pinnedVersion + '+' + $pinnedSha256.Substring(0, 8)
|
|
441
|
+
$target = Join-Path $root $folder
|
|
442
|
+
$bin = Join-Path $root 'bin'
|
|
443
|
+
$marker = Join-Path $target '.agend-install-sha256'
|
|
444
|
+
$createdRoot = -not (Test-Path -LiteralPath $root)
|
|
445
|
+
$null = New-Item -ItemType Directory -Path $root -Force
|
|
446
|
+
$installLock = Enter-AgendInstallLock $root
|
|
447
|
+
$freshReceipt = $createdRoot -and @(Get-ChildItem -LiteralPath $root -Force | Where-Object { $_.Name -cne '.agend-runtime-install.lock' }).Count -eq 0
|
|
448
|
+
$current = Join-Path $bin 'current.txt'
|
|
449
|
+
$beforeCurrent = Read-AgendSmallFile $current 90
|
|
450
|
+
|
|
451
|
+
# An existing folder is never deleted or replaced: it may be the Runtime that is running right now. A folder with this build's own name that does
|
|
452
|
+
# not hold this build can only be one that was changed by hand or left incomplete, and is left alone too.
|
|
453
|
+
$installed = $false
|
|
454
|
+
if (Test-Path -LiteralPath $target) {
|
|
455
|
+
$existing = ''
|
|
456
|
+
if (Test-Path -LiteralPath $marker) { $existing = ([IO.File]::ReadAllText($marker)).Trim() }
|
|
457
|
+
if ($existing -eq $pinnedSha256 -and (Test-Path -LiteralPath (Join-Path $target 'dist\runtime-cli.js'))) { $installed = $true }
|
|
458
|
+
else { throw ('The folder ' + $target + ' exists but does not hold this build (it was changed or is incomplete). It was left untouched because it may be running. Close any agend-runtime window, move that folder away yourself, and run the install command again.') }
|
|
459
|
+
}
|
|
460
|
+
if ($installed) {
|
|
461
|
+
Write-Step ('version ' + $pinnedVersion + ' (build ' + $pinnedSha256.Substring(0, 8) + ') is already installed in ' + $target + '.')
|
|
462
|
+
} else {
|
|
463
|
+
$tmp = Join-Path $root ('.install-' + [Guid]::NewGuid().ToString('N'))
|
|
464
|
+
$null = New-Item -ItemType Directory -Path $tmp
|
|
465
|
+
$archive = Join-Path $tmp 'runtime.zip'
|
|
466
|
+
Write-Step ('downloading version ' + $pinnedVersion + ' (build ' + $pinnedSha256.Substring(0, 8) + ') from ' + $origin)
|
|
467
|
+
Save-AgendArchive ($origin + '/runtime/v1/bundle/windows.zip') $archive $maxArchiveBytes
|
|
468
|
+
$actual = Get-AgendSha256 $archive
|
|
469
|
+
if ($actual -ne $pinnedSha256) {
|
|
470
|
+
throw ('The downloaded Runtime does not match the checksum pinned in this installer, so nothing was unpacked. Expected ' + $pinnedSha256 + ' but received ' + $actual + '. If AgEnD was just updated, reload the AgEnD page and copy the install command again.')
|
|
471
|
+
}
|
|
472
|
+
Write-Step 'checksum verified; unpacking.'
|
|
473
|
+
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
|
474
|
+
$stage = Join-Path $tmp 'unpacked'
|
|
475
|
+
[IO.Compression.ZipFile]::ExtractToDirectory($archive, $stage)
|
|
476
|
+
$unpacked = Join-Path $stage 'agend-runtime'
|
|
477
|
+
if (-not (Test-Path -LiteralPath (Join-Path $unpacked 'dist\runtime-cli.js')) -or -not (Test-Path -LiteralPath (Join-Path $unpacked 'bundle-manifest.json'))) {
|
|
478
|
+
throw 'The Runtime archive does not contain the expected files, so nothing was installed.'
|
|
479
|
+
}
|
|
480
|
+
[IO.File]::WriteAllText((Join-Path $unpacked '.agend-install-sha256'), $pinnedSha256)
|
|
481
|
+
# A rename inside the install folder: the version folder appears whole or not at all, beside the versions already there.
|
|
482
|
+
Move-Item -LiteralPath $unpacked -Destination $target
|
|
483
|
+
Write-Step ('installed version ' + $pinnedVersion + ' (build ' + $pinnedSha256.Substring(0, 8) + ') in ' + $target + '.')
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
# Repoint agend-runtime. The shim file is written once and then left alone; current.txt is the atomic switch.
|
|
487
|
+
$null = New-Item -ItemType Directory -Path $bin -Force
|
|
488
|
+
$shim = Join-Path $bin 'agend-runtime.cmd'
|
|
489
|
+
$current = Join-Path $bin 'current.txt'
|
|
490
|
+
$was = ''
|
|
491
|
+
if (Test-Path -LiteralPath $current) { $was = ([IO.File]::ReadAllText($current)).Trim() }
|
|
492
|
+
Register-AgendInstallOrigin $root $origin $freshReceipt $installLock
|
|
493
|
+
Set-AgendFile $shim $shimText
|
|
494
|
+
Set-AgendFile $current $folder { Assert-AgendLock $installLock; if ((Read-AgendSmallFile $current 90) -cne $beforeCurrent) { throw 'The selected Runtime changed during installation; nothing was switched.' } }
|
|
495
|
+
if ($was -ne '' -and $was -ne $folder) {
|
|
496
|
+
Write-Step ('agend-runtime now starts ' + $folder + ' (it was ' + $was + '). A Runtime that runs in a window keeps its own version until you stop it with Ctrl+C and start it again; one that runs in the background is restarted below.')
|
|
497
|
+
}
|
|
498
|
+
# a Runtime that runs in the background was started from an older build; restart it after the lock is released so it uses this one.
|
|
499
|
+
if (([string]$env:AGEND_RUNTIME_REPAIR -eq '1') -or ($was -ne '' -and $was -ne $folder)) { $restartCli = Join-Path $target 'dist\runtime-cli.js' }
|
|
500
|
+
$others = @(Get-ChildItem -LiteralPath $root -Directory -ErrorAction SilentlyContinue | Where-Object { $_.Name -ne $folder -and $_.Name -match '\A\d+\.\d+\.\d+([-+][A-Za-z0-9.+-]+)?\z' } | ForEach-Object { $_.Name })
|
|
501
|
+
# Earlier folders are not removed here: one of them may be running. Cleaning them up comes with the update and uninstall commands (phase 2).
|
|
502
|
+
if ($others.Count -gt 0) { Write-Step ('earlier versions are kept where they are (' + ($others -join ', ') + '). This installer never removes a version; clearing old ones comes later, with the update and uninstall commands.') }
|
|
503
|
+
|
|
504
|
+
$onPath = $false
|
|
505
|
+
if ([string]$env:AGEND_RUNTIME_NO_PATH -eq '1' -or [string]$env:AGEND_RUNTIME_REPAIR -eq '1') {
|
|
506
|
+
Write-Step 'your PATH was not changed.'
|
|
507
|
+
} else {
|
|
508
|
+
if (Add-UserPathEntry $bin) { Write-Step ('added ' + $bin + ' to your user PATH.') } else { Write-Step ($bin + ' is already on your user PATH.') }
|
|
509
|
+
$sessionHas = $false
|
|
510
|
+
foreach ($entry in ([string]$env:Path).Split(';')) { if ($entry.Trim().TrimEnd('\') -ieq $bin) { $sessionHas = $true } }
|
|
511
|
+
if (-not $sessionHas) { $env:Path = ([string]$env:Path).TrimEnd(';') + ';' + $bin }
|
|
512
|
+
$onPath = $true
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
# The reconnect entry: this AgEnD's address and the same connect-agend.bat the ZIP has. A repair run is for a computer that is already
|
|
516
|
+
# paired and writes nothing new beside it. A failure here never fails the install; it only means no automatic connection.
|
|
517
|
+
$repair = [string]$env:AGEND_RUNTIME_REPAIR -eq '1'
|
|
518
|
+
if (-not $repair) {
|
|
519
|
+
try { $connectDir = Write-AgendConnectEntry $root $origin }
|
|
520
|
+
catch { Write-Host ('AgEnD Runtime: warning: the reconnect entry was not written (' + $_.Exception.Message + '). The Runtime is installed; connect with the command shown below.') -ForegroundColor Yellow }
|
|
521
|
+
}
|
|
522
|
+
$connectBat = $null
|
|
523
|
+
if ($connectDir) { $connectBat = Join-Path $connectDir 'connect-agend.bat' }
|
|
524
|
+
$noConnect = Test-AgendSwitch $agendNoConnect
|
|
525
|
+
$mode = Get-AgendConnectMode $repair $noConnect (Test-AgendInteractive) ([bool]$connectDir) ([bool]$enrollToken)
|
|
526
|
+
|
|
527
|
+
Write-Host ''
|
|
528
|
+
if ($mode -eq 'repair') {
|
|
529
|
+
Write-Host 'AgEnD Runtime is installed. Keep your existing profile and pairing; PATH was not changed.'
|
|
530
|
+
Write-Host 'A Runtime that runs in the background was restarted with this version (see below). Close any Runtime that runs in a window (Ctrl+C), then start it in the background with this exact new executable and the same existing profile folder, including any previous --profile or AGEND_RUNTIME_HOME:'
|
|
531
|
+
$literalShim = $shim.Replace("'", "''")
|
|
532
|
+
Write-Host (' $agendProfile = $null; $agendProfile = Read-Host ''Existing Runtime profile folder (same as before)''; if ($agendProfile) { & ''' + $literalShim + ''' start --profile $agendProfile } else { throw ''Existing Runtime profile folder is required'' }')
|
|
533
|
+
} elseif ($mode -eq 'connect' -or $mode -eq 'enroll') {
|
|
534
|
+
Write-Host 'AgEnD Runtime is installed.'
|
|
535
|
+
Write-Host ('Next time, double-click ' + $connectBat + ' to reconnect this computer.')
|
|
536
|
+
$cliJs = Join-Path $target 'dist\runtime-cli.js'
|
|
537
|
+
$doConnect = $true
|
|
538
|
+
} else {
|
|
539
|
+
Write-Host 'AgEnD Runtime is installed. This computer is not connected yet and nothing has been paired.'
|
|
540
|
+
if ($mode -eq 'noninteractive') { Write-Host 'This window is not an interactive console (a script, a pipeline, CI or an AI agent runs it), so it only installed and did not try to connect.' }
|
|
541
|
+
elseif ($mode -eq 'switch') { Write-Host 'The variable $agendNoConnect is set in this window, so it only installed and did not try to connect. To connect from here by itself next time, run $agendNoConnect = $null first.' }
|
|
542
|
+
else { Write-Host 'The reconnect entry could not be written (see above), so it did not connect by itself.' }
|
|
543
|
+
Write-Host 'Next, connect it from an interactive PowerShell window. Open Settings -> Runtime -> Connect a computer in AgEnD for the one-time pairing code, then run:'
|
|
544
|
+
Write-Host ''
|
|
545
|
+
if ($onPath) { Write-Host (' agend-runtime connect --server "' + $origin + '"') }
|
|
546
|
+
else { Write-Host (' & "' + $shim + '" connect --server "' + $origin + '"') }
|
|
547
|
+
Write-Host ''
|
|
548
|
+
Write-Host 'A person types the pairing code when asked, compares the fingerprint with the one AgEnD shows, then approves this computer in AgEnD. The code cannot be put in a command, a variable or a file, so an AI agent or script should stop here and give this command to the person.'
|
|
549
|
+
if ($connectBat) { Write-Host ('Or double-click ' + $connectBat + ' on that computer: it connects, and next time it reconnects without asking for the code.') }
|
|
550
|
+
if ($enrollToken) {
|
|
551
|
+
Write-Host 'The one-time token in this command was NOT used. It stays valid until it expires (15 minutes after it was made) or is revoked on the AgEnD page; running the same command again uses it.'
|
|
552
|
+
if ($mode -eq 'noentry') { $global:LASTEXITCODE = 1 }
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
$installFinished = $true
|
|
556
|
+
} catch {
|
|
557
|
+
Write-Problem ('install failed: ' + $_.Exception.Message)
|
|
558
|
+
$global:LASTEXITCODE = 1
|
|
559
|
+
$doConnect = $false
|
|
560
|
+
} finally {
|
|
561
|
+
if ($tmp -and (Test-Path -LiteralPath $tmp)) { Remove-Item -LiteralPath $tmp -Recurse -Force -ErrorAction SilentlyContinue }
|
|
562
|
+
if ($installLock) { try { Remove-AgendLock $installLock } catch { Write-Problem 'Installation cleanup is unconfirmed; ownership was retained.'; $global:LASTEXITCODE = 1; $doConnect = $false; $lockReleased = $false } }
|
|
563
|
+
# A run that installed nothing leaves nothing: the install folder this run created is removed again, but only while it is still empty.
|
|
564
|
+
if ($createdRoot -and $root -and (Test-Path -LiteralPath $root) -and -not (Get-ChildItem -LiteralPath $root -Force | Select-Object -First 1)) { Remove-Item -LiteralPath $root -Force -ErrorAction SilentlyContinue }
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
# restart Runtimes that run in the background (repair run, or a different build was just selected). After the install lock is gone: a
|
|
568
|
+
# Runtime takes that lock itself. Only background Runtimes are touched; one that runs in a window is reported and left alone. A failure is a
|
|
569
|
+
# warning, never "install failed": the install itself is complete. If the installation failed after the build was selected, or its lock could not be confirmed released,
|
|
570
|
+
# nothing is stopped or restarted and the failure status stays.
|
|
571
|
+
if ($restartCli -and $installFinished -and $lockReleased -and (Test-Path -LiteralPath $restartCli)) {
|
|
572
|
+
$previousPreference = $ErrorActionPreference; $statusBeforeRestart = $global:LASTEXITCODE
|
|
573
|
+
try {
|
|
574
|
+
$ErrorActionPreference = 'Continue'
|
|
575
|
+
Write-Step 'restarting any Runtime that runs in the background so it uses this version.'
|
|
576
|
+
& $nodeExe $restartCli restart --all
|
|
577
|
+
if ($LASTEXITCODE -ne 0) { Write-Host 'AgEnD Runtime: warning: a background Runtime could not be restarted (see above). Run agend-runtime restart --all, or agend-runtime stop and agend-runtime start, when it is idle.' -ForegroundColor Yellow }
|
|
578
|
+
} catch {
|
|
579
|
+
Write-Host ('AgEnD Runtime: warning: could not restart a background Runtime: ' + $_.Exception.Message) -ForegroundColor Yellow
|
|
580
|
+
} finally { $ErrorActionPreference = $previousPreference }
|
|
581
|
+
$global:LASTEXITCODE = $statusBeforeRestart # a restart that failed is the warning above; it never turns a finished install into a failure, or a success into one
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
# Connect in this window, after the install lock is gone (a running Runtime takes that lock to update itself). This is the Runtime's own
|
|
585
|
+
# `connect --connection-dir`, the logic of connect-agend.bat, run by the Node.js that was just checked, in the version that was just installed
|
|
586
|
+
# (the same file the shim starts). A path goes to node.exe as an argument, never through cmd.exe. The Runtime asks for the pairing code itself.
|
|
587
|
+
# Once connected it moves itself to the background and this command ends; $agendForeground = 1 keeps it in this window.
|
|
588
|
+
if ($doConnect) {
|
|
589
|
+
$previousPreference = $ErrorActionPreference
|
|
590
|
+
try {
|
|
591
|
+
$ErrorActionPreference = 'Continue'
|
|
592
|
+
$foreground = Test-AgendSwitch $agendForeground
|
|
593
|
+
$connectExtra = @(); if ($foreground) { $connectExtra = @('--foreground') }
|
|
594
|
+
Write-Host ''
|
|
595
|
+
if ($enrollToken) {
|
|
596
|
+
if ($foreground) { $stays = 'The Runtime stays running in this window until you press Ctrl+C ($agendForeground is set; an AI agent or script that must not wait for it should start this command as its own background process).' }
|
|
597
|
+
else { $stays = 'Once it is connected the Runtime keeps running in the background: this command ends and closing this window does not disconnect it.' }
|
|
598
|
+
Write-Step ('connecting this computer to ' + $origin + ' with the one-time token from the install command: no pairing code and no approval step. ' + $stays + ' A computer that is already connected to this AgEnD just reconnects, and the token is not used.')
|
|
599
|
+
# The token goes in on standard input, once: not as an argument (it would show in the process list), not in the environment, not in a file.
|
|
600
|
+
$enrollToken | & $nodeExe $cliJs connect --connection-dir $connectDir --enroll-stdin --server-fingerprint $enrollFingerprint @connectExtra
|
|
601
|
+
$enrollToken = $null
|
|
602
|
+
} else {
|
|
603
|
+
if ($foreground) { $stays = 'Ctrl+C stops it ($agendForeground is set, so the Runtime stays in this window).' } else { $stays = 'Once it is connected it keeps running in the background and closing this window does not disconnect it.' }
|
|
604
|
+
Write-Step ('connecting this computer to ' + $origin + '. If it asks for the one-time pairing code, type the one on the AgEnD page (Settings -> Runtime -> Connect a computer); a computer that is already paired just reconnects. ' + $stays)
|
|
605
|
+
& $nodeExe $cliJs connect --connection-dir $connectDir @connectExtra
|
|
606
|
+
}
|
|
607
|
+
$connectExit = $LASTEXITCODE
|
|
608
|
+
Write-Host ''
|
|
609
|
+
if ($connectExit -eq 0 -and $foreground) { Write-Step ('stopped. To reconnect, double-click ' + $connectBat) }
|
|
610
|
+
elseif ($connectExit -eq 0) { Write-Step ('done. To reconnect later, double-click ' + $connectBat + ' (only needed if the Runtime was stopped, or autostart is off and this computer was restarted).') }
|
|
611
|
+
else { Write-Problem ('stopped or could not connect (status ' + $connectExit + '). Read the message above for what to do next, then double-click ' + $connectBat + ' to try again.') }
|
|
612
|
+
} catch {
|
|
613
|
+
Write-Problem ('could not start the connection: ' + $_.Exception.Message)
|
|
614
|
+
Write-Host ('The Runtime is installed. Connect with: double-click ' + $connectBat)
|
|
615
|
+
$global:LASTEXITCODE = 1
|
|
616
|
+
} finally { $ErrorActionPreference = $previousPreference }
|
|
617
|
+
}
|
|
618
|
+
}
|