@songsid/agend 2.3.5-alpha.3 → 2.3.5-alpha.5
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/THIRD_PARTY_NOTICES.md +52 -0
- package/dist/accounts-view.d.ts +97 -0
- package/dist/accounts-view.js +116 -0
- package/dist/accounts-view.js.map +1 -0
- package/dist/agent-cli-instructions.md +1 -1
- package/dist/agent-credentials.d.ts +24 -0
- package/dist/agent-credentials.js +66 -0
- package/dist/agent-credentials.js.map +1 -0
- package/dist/agent-endpoint.d.ts +3 -1
- package/dist/agent-endpoint.js +13 -0
- 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-workspace.d.ts +93 -0
- package/dist/agent-workspace.js +353 -0
- package/dist/agent-workspace.js.map +1 -0
- package/dist/auth-api.d.ts +27 -0
- package/dist/auth-api.js +168 -3
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/session-authorizations.d.ts +28 -4
- package/dist/authority/session-authorizations.js +63 -17
- package/dist/authority/session-authorizations.js.map +1 -1
- package/dist/backend/antigravity.js +3 -1
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/codex-footer-hints.d.ts +7 -0
- package/dist/backend/codex-footer-hints.js +41 -0
- package/dist/backend/codex-footer-hints.js.map +1 -0
- package/dist/backend/codex-metadata.d.ts +14 -0
- package/dist/backend/codex-metadata.js +45 -0
- package/dist/backend/codex-metadata.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-speed.d.ts +14 -0
- package/dist/backend/codex-speed.js +35 -0
- package/dist/backend/codex-speed.js.map +1 -0
- package/dist/backend/codex.d.ts +7 -0
- package/dist/backend/codex.js +85 -24
- package/dist/backend/codex.js.map +1 -1
- 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 +30 -1
- package/dist/backend/grok.js +301 -54
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/kiro.d.ts +3 -0
- package/dist/backend/kiro.js +50 -2
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/muse.js +5 -3
- package/dist/backend/muse.js.map +1 -1
- package/dist/backend/native-pane.d.ts +3 -1
- package/dist/backend/native-pane.js +2 -2
- package/dist/backend/native-pane.js.map +1 -1
- package/dist/backend/types.d.ts +13 -1
- package/dist/backend/types.js +3 -0
- package/dist/backend/types.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/cache-ledger.d.ts +95 -0
- package/dist/cache-ledger.js +276 -4
- package/dist/cache-ledger.js.map +1 -1
- package/dist/cache-service.d.ts +5 -0
- package/dist/cache-service.js +16 -4
- package/dist/cache-service.js.map +1 -1
- package/dist/channel/adapters/discord.js +11 -3
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +51 -0
- package/dist/channel/adapters/telegram.js +235 -17
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/mcp-tools.js +3 -3
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/types.d.ts +2 -0
- package/dist/claude-auth-status.d.ts +48 -0
- package/dist/claude-auth-status.js +149 -0
- package/dist/claude-auth-status.js.map +1 -0
- package/dist/cli.js +138 -37
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.js +21 -1
- package/dist/config-validator.js.map +1 -1
- package/dist/cross-instance-notice.d.ts +10 -0
- package/dist/cross-instance-notice.js +67 -5
- package/dist/cross-instance-notice.js.map +1 -1
- package/dist/daemon.d.ts +70 -1
- package/dist/daemon.js +547 -25
- 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/delivery-consumed-watch.d.ts +23 -1
- package/dist/delivery-consumed-watch.js +30 -3
- package/dist/delivery-consumed-watch.js.map +1 -1
- package/dist/delivery-reconciliation.d.ts +1 -1
- package/dist/delivery-reconciliation.js +1 -1
- package/dist/delivery-reconciliation.js.map +1 -1
- package/dist/doctor.js +20 -9
- package/dist/doctor.js.map +1 -1
- package/dist/export-import.d.ts +7 -0
- package/dist/export-import.js +44 -10
- package/dist/export-import.js.map +1 -1
- package/dist/fleet-context.d.ts +2 -0
- package/dist/fleet-manager.d.ts +362 -7
- package/dist/fleet-manager.js +1522 -91
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.d.ts +8 -2
- package/dist/fleet-windows-runtime.js +93 -6
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +425 -0
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +5 -2
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +1 -0
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +2 -2
- package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +3 -1
- package/dist/general-knowledge/skills/kiro-engine-migration/SKILL.md +41 -4
- 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 +31 -15
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
- package/dist/general-role.d.ts +1 -1
- package/dist/general-role.js +1 -0
- package/dist/general-role.js.map +1 -1
- 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 +346 -0
- package/dist/hub/buttons.js.map +1 -0
- package/dist/hub/catalog.d.ts +74 -0
- package/dist/hub/catalog.js +195 -0
- package/dist/hub/catalog.js.map +1 -0
- package/dist/hub/client.d.ts +69 -0
- package/dist/hub/client.js +300 -0
- package/dist/hub/client.js.map +1 -0
- package/dist/hub/compose/member.d.ts +139 -0
- package/dist/hub/compose/member.js +450 -0
- package/dist/hub/compose/member.js.map +1 -0
- package/dist/hub/compose/server.d.ts +77 -0
- package/dist/hub/compose/server.js +349 -0
- package/dist/hub/compose/server.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 +56 -0
- package/dist/hub/db.js +188 -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 +18 -0
- package/dist/hub/directory/directory.js +320 -0
- package/dist/hub/directory/directory.js.map +1 -0
- package/dist/hub/directory/index.d.ts +7 -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 +71 -0
- package/dist/hub/directory/types.js +14 -0
- package/dist/hub/directory/types.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/http/compose.d.ts +20 -0
- package/dist/hub/http/compose.js +518 -0
- package/dist/hub/http/compose.js.map +1 -0
- package/dist/hub/http/core.d.ts +49 -0
- package/dist/hub/http/core.js +124 -0
- package/dist/hub/http/core.js.map +1 -0
- package/dist/hub/http/deps.d.ts +61 -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 +80 -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 +9 -0
- package/dist/hub/init/browser-certificate.js +78 -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 +222 -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 +24 -0
- package/dist/hub/init/initializer.js +385 -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 +114 -0
- package/dist/hub/init/types.js +9 -0
- package/dist/hub/init/types.js.map +1 -0
- package/dist/hub/init/wizard.d.ts +34 -0
- package/dist/hub/init/wizard.js +554 -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/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 +85 -0
- package/dist/hub/member/pairing-api.js +385 -0
- package/dist/hub/member/pairing-api.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 +39 -0
- package/dist/hub/mount.js +123 -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.d.ts +65 -0
- package/dist/hub/pairing.js +211 -0
- package/dist/hub/pairing.js.map +1 -0
- package/dist/hub/policy.d.ts +63 -0
- package/dist/hub/policy.js +147 -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 +779 -0
- package/dist/hub/protocol.js +93 -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/rooms.d.ts +120 -0
- package/dist/hub/rooms.js +535 -0
- package/dist/hub/rooms.js.map +1 -0
- package/dist/hub/runtime.d.ts +106 -0
- package/dist/hub/runtime.js +298 -0
- package/dist/hub/runtime.js.map +1 -0
- package/dist/hub/server.d.ts +56 -0
- package/dist/hub/server.js +202 -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/sessions.d.ts +53 -0
- package/dist/hub/sessions.js +196 -0
- package/dist/hub/sessions.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 +77 -0
- package/dist/hub/store.js +88 -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 +401 -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-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 +3 -0
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +17 -2
- package/dist/instance-lifecycle.js +58 -8
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instance-topic-delete.d.ts +77 -0
- package/dist/instance-topic-delete.js +123 -0
- package/dist/instance-topic-delete.js.map +1 -0
- package/dist/instructions.d.ts +1 -1
- package/dist/instructions.js +1 -1
- package/dist/instructions.js.map +1 -1
- package/dist/kiro-engine-status.d.ts +11 -0
- package/dist/kiro-engine-status.js +6 -0
- package/dist/kiro-engine-status.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/locale.js +125 -3
- package/dist/locale.js.map +1 -1
- package/dist/log-service.d.ts +28 -0
- package/dist/log-service.js +29 -0
- package/dist/log-service.js.map +1 -1
- package/dist/log-steps.d.ts +4 -3
- package/dist/log-steps.js +32 -7
- package/dist/log-steps.js.map +1 -1
- package/dist/logger.d.ts +16 -2
- package/dist/logger.js +346 -66
- package/dist/logger.js.map +1 -1
- package/dist/login-flows.d.ts +15 -7
- package/dist/login-flows.js +29 -3
- package/dist/login-flows.js.map +1 -1
- package/dist/login-manager.js +25 -4
- package/dist/login-manager.js.map +1 -1
- package/dist/ls-rows.js +3 -4
- package/dist/ls-rows.js.map +1 -1
- package/dist/missed-offline.d.ts +25 -0
- package/dist/missed-offline.js +79 -0
- package/dist/missed-offline.js.map +1 -0
- package/dist/native-instance-api.d.ts +0 -1
- package/dist/native-instance-api.js +15 -3
- package/dist/native-instance-api.js.map +1 -1
- package/dist/native-instance-input.d.ts +3 -0
- package/dist/native-instance-input.js +6 -1
- package/dist/native-instance-input.js.map +1 -1
- package/dist/native-instance-registry.d.ts +6 -0
- package/dist/native-instance-registry.js +24 -0
- package/dist/native-instance-registry.js.map +1 -1
- package/dist/native-mcp.d.ts +3 -0
- package/dist/native-mcp.js +15 -2
- package/dist/native-mcp.js.map +1 -1
- package/dist/native-pane-lifecycle.d.ts +8 -0
- package/dist/native-pane-lifecycle.js +13 -4
- package/dist/native-pane-lifecycle.js.map +1 -1
- package/dist/native-pane-manager.js +17 -9
- package/dist/native-pane-manager.js.map +1 -1
- package/dist/needs-you-hub.d.ts +9 -1
- package/dist/needs-you-hub.js +46 -8
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +47 -2
- package/dist/needs-you.js +31 -3
- package/dist/needs-you.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 +14 -0
- package/dist/outbound-handlers.js +49 -6
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +33 -1
- package/dist/outbound-schemas.js +29 -16
- package/dist/outbound-schemas.js.map +1 -1
- 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/public-web-gateway.js +7 -0
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +6 -0
- package/dist/public-web-link.js +9 -0
- package/dist/public-web-link.js.map +1 -1
- package/dist/queued-handoffs.d.ts +33 -0
- package/dist/queued-handoffs.js +75 -0
- package/dist/queued-handoffs.js.map +1 -0
- package/dist/quickstart.d.ts +13 -0
- package/dist/quickstart.js +81 -5
- package/dist/quickstart.js.map +1 -1
- 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.js +10 -6
- package/dist/reply-buttons-controller.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 +2 -0
- package/dist/runtime-api.js +106 -13
- package/dist/runtime-api.js.map +1 -1
- package/dist/runtime-build-info.d.ts +9 -0
- package/dist/runtime-build-info.js +59 -0
- package/dist/runtime-build-info.js.map +1 -0
- package/dist/runtime-bundle.d.ts +6 -1
- package/dist/runtime-bundle.js +17 -9
- package/dist/runtime-bundle.js.map +1 -1
- package/dist/runtime-cli.d.ts +13 -1
- package/dist/runtime-cli.js +173 -19
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client-store.d.ts +27 -1
- package/dist/runtime-client-store.js +86 -6
- package/dist/runtime-client-store.js.map +1 -1
- package/dist/runtime-client.d.ts +74 -0
- package/dist/runtime-client.js +336 -26
- package/dist/runtime-client.js.map +1 -1
- 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 +16 -0
- package/dist/runtime-coordinator.js +287 -62
- package/dist/runtime-coordinator.js.map +1 -1
- package/dist/runtime-credential-profiles.d.ts +78 -0
- package/dist/runtime-credential-profiles.js +280 -0
- package/dist/runtime-credential-profiles.js.map +1 -0
- package/dist/runtime-install.d.ts +50 -0
- package/dist/runtime-install.js +186 -0
- package/dist/runtime-install.js.map +1 -0
- package/dist/runtime-pane-assets.d.ts +1 -1
- package/dist/runtime-pane-assets.js +1 -1
- package/dist/runtime-pane-assets.js.map +1 -1
- package/dist/runtime-pane-boot.d.ts +7 -0
- package/dist/runtime-pane-boot.js +23 -0
- package/dist/runtime-pane-boot.js.map +1 -1
- package/dist/runtime-pane-codex-index.d.ts +10 -1
- package/dist/runtime-pane-codex-index.js +131 -27
- package/dist/runtime-pane-codex-index.js.map +1 -1
- package/dist/runtime-pane-host.d.ts +19 -0
- package/dist/runtime-pane-host.js +50 -7
- package/dist/runtime-pane-host.js.map +1 -1
- package/dist/runtime-pane-link.d.ts +7 -0
- package/dist/runtime-pane-link.js +93 -2
- package/dist/runtime-pane-link.js.map +1 -1
- package/dist/runtime-pane-mcp-relay.d.ts +1 -0
- package/dist/runtime-pane-mcp-relay.js +10 -0
- package/dist/runtime-pane-mcp-relay.js.map +1 -1
- package/dist/runtime-pane-mcp.d.ts +4 -0
- package/dist/runtime-pane-mcp.js +6 -3
- package/dist/runtime-pane-mcp.js.map +1 -1
- package/dist/runtime-pane-native.d.ts +32 -2
- package/dist/runtime-pane-native.js +55 -6
- package/dist/runtime-pane-native.js.map +1 -1
- package/dist/runtime-pane-port.d.ts +5 -0
- package/dist/runtime-pane-port.js +17 -1
- package/dist/runtime-pane-port.js.map +1 -1
- package/dist/runtime-pane-process.d.ts +1 -1
- package/dist/runtime-pane-process.js +11 -2
- package/dist/runtime-pane-process.js.map +1 -1
- package/dist/runtime-pane-protocol.d.ts +11 -1
- package/dist/runtime-pane-protocol.js +27 -5
- package/dist/runtime-pane-protocol.js.map +1 -1
- 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-service.d.ts +5 -0
- package/dist/runtime-pane-service.js +47 -12
- package/dist/runtime-pane-service.js.map +1 -1
- package/dist/runtime-pane-transcript.d.ts +5 -0
- package/dist/runtime-pane-transcript.js +66 -5
- package/dist/runtime-pane-transcript.js.map +1 -1
- package/dist/runtime-pane-worker.js +19 -6
- package/dist/runtime-pane-worker.js.map +1 -1
- package/dist/runtime-protocol.d.ts +30 -2
- package/dist/runtime-protocol.js +30 -0
- package/dist/runtime-protocol.js.map +1 -1
- 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-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-journal.d.ts +44 -0
- package/dist/runtime-update-journal.js +121 -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 +217 -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-windows-bridge.d.ts +2 -1
- package/dist/runtime-windows-bridge.js +11 -1
- package/dist/runtime-windows-bridge.js.map +1 -1
- package/dist/scheduler/db.d.ts +2 -1
- package/dist/scheduler/db.js +23 -9
- 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/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 +20 -0
- package/dist/settings-api.js +414 -4
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +6 -0
- package/dist/settings-baseline.js +3 -1
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-change.js +29 -6
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.d.ts +13 -0
- package/dist/settings-effect.js +98 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +3 -0
- package/dist/settings-http-confirmation.js +28 -1
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-instance-patch.js +27 -0
- package/dist/settings-instance-patch.js.map +1 -1
- package/dist/setup-wizard.js +6 -2
- package/dist/setup-wizard.js.map +1 -1
- 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/tmux-binary.d.ts +59 -0
- package/dist/tmux-binary.js +200 -0
- package/dist/tmux-binary.js.map +1 -0
- 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-manager.d.ts +1 -1
- package/dist/tmux-manager.js +45 -36
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tmux-read.js +4 -3
- package/dist/tmux-read.js.map +1 -1
- package/dist/tool-permissions.d.ts +5 -2
- package/dist/tool-permissions.js +6 -5
- package/dist/tool-permissions.js.map +1 -1
- package/dist/tool-progress.d.ts +2 -0
- package/dist/tool-progress.js +19 -3
- package/dist/tool-progress.js.map +1 -1
- package/dist/topic-commands.js +10 -5
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-monitor.d.ts +20 -0
- package/dist/transcript-monitor.js +47 -3
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/transcript-needles.d.ts +7 -0
- package/dist/transcript-needles.js +9 -1
- package/dist/transcript-needles.js.map +1 -1
- package/dist/transcript-records.d.ts +1 -1
- package/dist/transcript-records.js +2 -1
- package/dist/transcript-records.js.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/ui/account-identity.js +27 -0
- package/dist/ui/accounts-view.js +214 -0
- package/dist/ui/agent-runtime-settings.js +68 -0
- package/dist/ui/agent-runtime.js +20 -2
- package/dist/ui/backend-signin.js +39 -21
- package/dist/ui/chat-ambient.js +1 -1
- package/dist/ui/chat-md-strings.js +3 -0
- package/dist/ui/chat-render.js +3 -670
- package/dist/ui/chat-store.js +1 -1
- package/dist/ui/chat-strings.js +3 -333
- package/dist/ui/chat-thread.js +3 -919
- package/dist/ui/chat-time.js +3 -80
- package/dist/ui/chat-tour.js +1 -1
- package/dist/ui/credential-profile-select.js +54 -0
- package/dist/ui/fleet-office-dialogue.d.ts +30 -0
- package/dist/ui/fleet-office-dialogue.js +382 -0
- 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 +173 -6
- package/dist/ui/fleet-task-card.js +10 -6
- package/dist/ui/fleet-task-common.js +12 -2
- 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/fleet-usage.js +90 -27
- package/dist/ui/html-attachment.js +3 -40
- package/dist/ui/hub-agent-copy.js +23 -0
- package/dist/ui/hub-button-actions.js +65 -0
- package/dist/ui/hub-chat-store.js +158 -0
- package/dist/ui/hub-chat-strings.js +77 -0
- package/dist/ui/hub-client.js +329 -0
- package/dist/ui/hub-owner-strings.js +51 -0
- package/dist/ui/hub-provider-guidance.js +31 -0
- package/dist/ui/hub-quota.js +85 -0
- package/dist/ui/hub-strings.js +162 -0
- package/dist/ui/hub-switcher.js +27 -0
- package/dist/ui/native-instance-settings.js +5 -8
- package/dist/ui/native-pane-recovery.js +1 -1
- package/dist/ui/office-share-page.js +4 -2
- package/dist/ui/panel-chat.js +36 -49
- package/dist/ui/panel-details.js +1 -1
- package/dist/ui/panel-fleet.js +82 -12
- package/dist/ui/panel-hub.js +619 -0
- package/dist/ui/panel-log.js +2 -2
- package/dist/ui/panel-needs.js +24 -8
- package/dist/ui/panel-runtimes.js +239 -45
- package/dist/ui/panel-settings.js +266 -192
- package/dist/ui/panel-windows-cli.js +88 -42
- package/dist/ui/preview-pages.js +1 -1
- package/dist/ui/preview-panel.js +92 -6
- package/dist/ui/preview-versions.js +1 -1
- package/dist/ui/preview.js +3 -476
- package/dist/ui/runtime-commands.d.ts +4 -0
- package/dist/ui/runtime-commands.js +59 -0
- package/dist/ui/search-dialog.js +2 -0
- 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-build-version.js +35 -0
- package/dist/ui/settings-codex-copy.js +19 -0
- package/dist/ui/settings-devices.js +253 -0
- package/dist/ui/settings-dialogs.js +33 -12
- package/dist/ui/settings-guests.js +25 -11
- package/dist/ui/settings-hub-browser-certificate.js +74 -0
- package/dist/ui/settings-hub-membership.js +72 -0
- package/dist/ui/settings-hub-retention.js +52 -0
- package/dist/ui/settings-hub.js +196 -0
- package/dist/ui/settings-layout.js +242 -0
- package/dist/ui/settings-model.js +24 -2
- package/dist/ui/settings-outside.js +104 -38
- package/dist/ui/settings-registry.js +9 -4
- 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 +89 -32
- package/dist/ui/settings-web-authority.js +17 -11
- package/dist/ui/shared/accounts.css +15 -0
- package/dist/ui/shared/app-i18n.js +2 -2
- package/dist/ui/shared/app-needs.js +1 -1
- package/dist/ui/shared/app-route.js +6 -1
- package/dist/ui/shared/app-session.js +6 -2
- package/dist/ui/shared/app-shell.js +81 -15
- package/dist/ui/shared/app.css +1114 -13
- package/dist/ui/shared/app.js +12 -3
- 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/header-tools.js +3 -5
- package/dist/ui/shared/html-attachment.js +42 -0
- package/dist/ui/shared/hub-chat.css +85 -0
- package/dist/ui/shared/hub-owner.css +33 -0
- package/dist/ui/shared/hub-quota.css +8 -0
- package/dist/ui/shared/hub.css +71 -0
- package/dist/ui/shared/instance-nav.js +3 -2
- package/dist/ui/shared/machine-name.js +13 -0
- package/dist/ui/shared/page-head.js +8 -0
- package/dist/ui/shared/panel-view.js +77 -4
- package/dist/ui/shared/preview.js +476 -0
- package/dist/ui/shared/runtime-install.css +26 -0
- package/dist/ui/shared/settings-width.js +31 -0
- package/dist/ui/shared/side-rail.js +15 -0
- package/dist/ui/shared/signin.js +172 -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 +3 -3
- package/dist/ui/shared/usage-dialog.js +18 -1
- package/dist/ui/shared/view-history.css +17 -0
- package/dist/ui/shared/view-history.js +438 -0
- package/dist/ui/shared/view-strings.js +16 -0
- package/dist/ui/shared/workspace.css +20 -0
- package/dist/ui/signin.html +21 -0
- package/dist/ui/windows-cli-catalog.js +41 -12
- package/dist/ui/workspace-panel.js +189 -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/usage/capacity.d.ts +69 -0
- package/dist/usage/capacity.js +119 -0
- package/dist/usage/capacity.js.map +1 -0
- package/dist/usage/i18n-keys.d.ts +1 -1
- package/dist/usage/i18n-keys.js +3 -0
- package/dist/usage/i18n-keys.js.map +1 -1
- package/dist/usage/profile-timeline.d.ts +16 -0
- package/dist/usage/profile-timeline.js +58 -0
- package/dist/usage/profile-timeline.js.map +1 -0
- package/dist/usage/providers.js +2 -1
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/quota-history.d.ts +43 -0
- package/dist/usage/quota-history.js +168 -0
- package/dist/usage/quota-history.js.map +1 -0
- package/dist/usage/usage-api.d.ts +31 -0
- package/dist/usage/usage-api.js +80 -1
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/usage-report.d.ts +25 -1
- package/dist/usage-report.js +55 -4
- package/dist/usage-report.js.map +1 -1
- package/dist/usage-rollup.d.ts +6 -1
- package/dist/usage-rollup.js +16 -4
- package/dist/usage-rollup.js.map +1 -1
- package/dist/view-api.d.ts +16 -0
- package/dist/view-api.js +105 -23
- package/dist/view-api.js.map +1 -1
- package/dist/view-history.d.ts +84 -0
- package/dist/view-history.js +116 -0
- package/dist/view-history.js.map +1 -0
- package/dist/web-api.d.ts +49 -2
- package/dist/web-api.js +279 -8
- package/dist/web-api.js.map +1 -1
- package/dist/web-backend-login.d.ts +23 -1
- package/dist/web-backend-login.js +11 -17
- package/dist/web-backend-login.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-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-session-authorization.d.ts +13 -2
- package/dist/web-session-authorization.js +10 -3
- package/dist/web-session-authorization.js.map +1 -1
- package/dist/web-session.d.ts +35 -0
- package/dist/web-session.js +7 -0
- 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 +6 -0
- package/dist/web-shell-routes.js +7 -0
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-terminal.d.ts +4 -30
- package/dist/web-terminal.js +9 -6
- package/dist/web-terminal.js.map +1 -1
- package/dist/windows-agents.d.ts +4 -1
- package/dist/windows-agents.js +14 -10
- package/dist/windows-agents.js.map +1 -1
- package/dist/windows-cli-api.d.ts +12 -1
- package/dist/windows-cli-api.js +29 -2
- package/dist/windows-cli-api.js.map +1 -1
- package/dist/windows-cli-providers.d.ts +0 -9
- package/dist/windows-cli-providers.js +4 -9
- package/dist/windows-cli-providers.js.map +1 -1
- package/dist/windows-cli-worker.d.ts +25 -0
- package/dist/windows-cli-worker.js +98 -7
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +11 -0
- package/dist/windows-cli.js +17 -3
- package/dist/windows-cli.js.map +1 -1
- package/dist/yaml-shared-nodes.js +8 -3
- package/dist/yaml-shared-nodes.js.map +1 -1
- package/launcher/agend-install.cjs +8 -1
- package/launcher/launchd-session-type.cjs +14 -0
- package/launcher/postinstall.cjs +27 -2
- package/launcher/private-home.cjs +1 -1
- package/launcher/tmux-bundle.cjs +247 -0
- package/package.json +3 -2
- package/templates/launchd.plist.ejs +3 -1
- package/templates/runtime-install/install.ps1 +270 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { readBoundedWebBody } from "./web-body.js";
|
|
2
|
+
import { nativeCliAuthorization } from "./windows-cli-api.js";
|
|
3
|
+
function json(res, status, value) { if (!res.destroyed && !res.writableEnded) {
|
|
4
|
+
res.writeHead(status, { "Content-Type": "application/json", "Cache-Control": "no-store" });
|
|
5
|
+
res.end(JSON.stringify(value));
|
|
6
|
+
} }
|
|
7
|
+
/** Explicit dashboard-only runtime moves. Agent tool schemas do not offer this endpoint. */
|
|
8
|
+
export function handleAgentRuntimeChange(req, res, url, ctx) {
|
|
9
|
+
const match = /^\/ui\/instances\/([^/]+)\/runtime$/.exec(url.pathname);
|
|
10
|
+
if (!match)
|
|
11
|
+
return false;
|
|
12
|
+
const allowed = () => nativeCliAuthorization(req, url, ctx);
|
|
13
|
+
if (!allowed()) {
|
|
14
|
+
json(res, 403, { error: "Runtime changes require a dashboard administrator" });
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
let name;
|
|
18
|
+
try {
|
|
19
|
+
name = decodeURIComponent(match[1]);
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
json(res, 400, { error: "Invalid Agent name" });
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
if (!Object.hasOwn(ctx.fleetConfig?.instances ?? {}, name)) {
|
|
26
|
+
json(res, 404, { error: "Agent not found" });
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
if (!ctx.agentRuntimeChanges) {
|
|
30
|
+
json(res, 503, { error: "Runtime changes are unavailable on this host" });
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
if (req.method === "GET") {
|
|
34
|
+
json(res, 200, ctx.agentRuntimeChanges().describe(name));
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
if (req.method !== "POST") {
|
|
38
|
+
json(res, 405, { error: "Method not allowed" });
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
void (async () => {
|
|
42
|
+
try {
|
|
43
|
+
const raw = await readBoundedWebBody(req, 4096);
|
|
44
|
+
if (!allowed()) {
|
|
45
|
+
json(res, 403, { error: "Authorization expired" });
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (req.aborted || res.destroyed)
|
|
49
|
+
return;
|
|
50
|
+
const input = JSON.parse(raw.toString("utf8")), result = await ctx.agentRuntimeChanges().change(name, input, allowed);
|
|
51
|
+
json(res, 200, result);
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
json(res, allowed() ? 409 : 403, { error: allowed() ? (error instanceof Error ? error.message : "Could not change Runtime") : "Authorization expired" });
|
|
55
|
+
}
|
|
56
|
+
})();
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=agent-runtime-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-runtime-api.js","sourceRoot":"","sources":["../src/agent-runtime-api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AACjD,OAAO,EAAC,sBAAsB,EAAC,MAAM,sBAAsB,CAAC;AAC5D,SAAS,IAAI,CAAC,GAAkB,EAAC,MAAa,EAAC,KAAa,IAAE,IAAG,CAAC,GAAG,CAAC,SAAS,IAAE,CAAC,GAAG,CAAC,aAAa,EAAC,CAAC;IAAA,GAAG,CAAC,S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A,CAAC,CAAA,GAAG,EAAC,EAAC,KAAK,EAAC,OAAO,EAAE,CAAA,CAAC,CAAA,CAAC,KAAK,YAAY,KAAK,CAAA,CAAC,CAAA,KAAK,CAAC,OAAO,CAAA,CAAC,CAAA,0BAA0B,CAAC,CAAA,CAAC,CAAA,uBAAuB,EAAC,CAAC,CAAC;QAAA,CAAC;IACxJ,CAAC,CAAC,EAAE,CAAC;IAAA,OAAO,IAAI,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/** Administrator-only moves of one Fleet identity. Provider sessions never cross machines or providers. */
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import type { InstanceConfig } from "./types.js";
|
|
4
|
+
export declare const AgentRuntimeChangeInput: z.ZodObject<{
|
|
5
|
+
requestId: z.ZodString;
|
|
6
|
+
expectedRevision: z.ZodString;
|
|
7
|
+
runtime: z.ZodEnum<{
|
|
8
|
+
windows: "windows";
|
|
9
|
+
wsl: "wsl";
|
|
10
|
+
}>;
|
|
11
|
+
machineId: z.ZodOptional<z.ZodString>;
|
|
12
|
+
backend: z.ZodEnum<{
|
|
13
|
+
antigravity: "antigravity";
|
|
14
|
+
"claude-code": "claude-code";
|
|
15
|
+
codex: "codex";
|
|
16
|
+
grok: "grok";
|
|
17
|
+
"kiro-cli": "kiro-cli";
|
|
18
|
+
muse: "muse";
|
|
19
|
+
opencode: "opencode";
|
|
20
|
+
}>;
|
|
21
|
+
model: z.ZodDefault<z.ZodString>;
|
|
22
|
+
directory: z.ZodDefault<z.ZodString>;
|
|
23
|
+
sandbox: z.ZodDefault<z.ZodEnum<{
|
|
24
|
+
"read-only": "read-only";
|
|
25
|
+
"workspace-write": "workspace-write";
|
|
26
|
+
}>>;
|
|
27
|
+
adapter: z.ZodDefault<z.ZodEnum<{
|
|
28
|
+
exec: "exec";
|
|
29
|
+
pane: "pane";
|
|
30
|
+
}>>;
|
|
31
|
+
startNewConversation: z.ZodLiteral<true>;
|
|
32
|
+
credentialProfile: z.ZodOptional<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
33
|
+
}, z.core.$strict>;
|
|
34
|
+
export declare const GENERAL_USES_LOCATION_SWITCH = "General is moved from Settings \u2192 Shared agent settings \u2192 General location, not from Runtime settings";
|
|
35
|
+
export type AgentRuntimeTarget = z.infer<typeof AgentRuntimeChangeInput>;
|
|
36
|
+
export interface PreparedAgentRuntime {
|
|
37
|
+
config: InstanceConfig;
|
|
38
|
+
discard(): void;
|
|
39
|
+
current?(): boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface AgentRuntimeChangeHost {
|
|
42
|
+
config(name: string): InstanceConfig | undefined;
|
|
43
|
+
defaults(): unknown;
|
|
44
|
+
generation(name: string): unknown;
|
|
45
|
+
epoch(name: string): number;
|
|
46
|
+
backendState?(name: string, backend: string): string | undefined;
|
|
47
|
+
transition<T>(name: string, run: (stop: () => Promise<void>) => Promise<T>): Promise<T>;
|
|
48
|
+
/** Must reject busy, queued and unknown source work, including retained native owners. */
|
|
49
|
+
idle(name: string): boolean;
|
|
50
|
+
prepare(name: string, before: InstanceConfig, target: AgentRuntimeTarget, current: () => boolean): Promise<PreparedAgentRuntime>;
|
|
51
|
+
closed(name: string, before: InstanceConfig): Promise<boolean>;
|
|
52
|
+
/** Prepare fresh-session pointers without erasing provider history; returns a rollback for an unsaved change. */
|
|
53
|
+
fresh(name: string, requestId: string): () => void;
|
|
54
|
+
save(name: string, before: InstanceConfig, next: InstanceConfig): void;
|
|
55
|
+
changed(name: string): void;
|
|
56
|
+
}
|
|
57
|
+
export declare class AgentRuntimeChanges {
|
|
58
|
+
private readonly host;
|
|
59
|
+
private attempts;
|
|
60
|
+
constructor(host: AgentRuntimeChangeHost);
|
|
61
|
+
private isGeneral;
|
|
62
|
+
describe(name: string): {
|
|
63
|
+
revision: string;
|
|
64
|
+
runtime: string;
|
|
65
|
+
machineId: string | undefined;
|
|
66
|
+
backend: string;
|
|
67
|
+
backendState: string | undefined;
|
|
68
|
+
directory: string;
|
|
69
|
+
model: string;
|
|
70
|
+
general: boolean;
|
|
71
|
+
adapter: "exec" | "pane";
|
|
72
|
+
sandbox: "read-only" | "workspace-write";
|
|
73
|
+
credentialProfile: string | undefined;
|
|
74
|
+
};
|
|
75
|
+
change(name: string, raw: unknown, authorized: () => boolean): Promise<unknown>;
|
|
76
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/** Administrator-only moves of one Fleet identity. Provider sessions never cross machines or providers. */
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { settingsFingerprint } from "./settings-transaction.js";
|
|
4
|
+
import { validCredentialProfileName } from "./runtime-credential-profiles.js";
|
|
5
|
+
import { isWindowsInstance, nativeCredentialProfile } from "./native-instance-registry.js";
|
|
6
|
+
export const AgentRuntimeChangeInput = z.object({
|
|
7
|
+
requestId: z.string().uuid(), expectedRevision: z.string().regex(/^[a-f0-9]{64}$/),
|
|
8
|
+
runtime: z.enum(["wsl", "windows"]), machineId: z.string().uuid().optional(),
|
|
9
|
+
backend: z.enum(["claude-code", "codex", "opencode", "kiro-cli", "antigravity", "grok", "muse"]),
|
|
10
|
+
model: z.string().max(160).default(""), directory: z.string().max(1024).default(""),
|
|
11
|
+
sandbox: z.enum(["read-only", "workspace-write"]).default("read-only"),
|
|
12
|
+
adapter: z.enum(["exec", "pane"]).default("exec"), startNewConversation: z.literal(true),
|
|
13
|
+
/** A NAME only (a Claude sign-in kept on the chosen Runtime computer). Never a path: the Runtime maps it to its own folder. */
|
|
14
|
+
credentialProfile: z.string().max(64).refine(validCredentialProfileName, "Invalid credential profile name").optional(),
|
|
15
|
+
}).strict().superRefine((value, ctx) => {
|
|
16
|
+
if (value.credentialProfile && (value.runtime !== "windows" || !value.machineId || value.backend !== "claude-code"))
|
|
17
|
+
ctx.addIssue({ code: "custom", message: "A credential profile is a Claude Code sign-in kept on a paired Runtime computer" });
|
|
18
|
+
if (value.runtime === "wsl" && (value.machineId || value.adapter !== "exec"))
|
|
19
|
+
ctx.addIssue({ code: "custom", message: "Choose the Fleet host for a WSL/Linux agent" });
|
|
20
|
+
if (value.runtime === "windows" && value.adapter === "pane" && !['codex', 'claude-code'].includes(value.backend))
|
|
21
|
+
ctx.addIssue({ code: "custom", message: "Persistent Windows terminals support Codex and Claude Code" });
|
|
22
|
+
});
|
|
23
|
+
export const GENERAL_USES_LOCATION_SWITCH = "General is moved from Settings → Shared agent settings → General location, not from Runtime settings";
|
|
24
|
+
export class AgentRuntimeChanges {
|
|
25
|
+
host;
|
|
26
|
+
attempts = new Map();
|
|
27
|
+
constructor(host) {
|
|
28
|
+
this.host = host;
|
|
29
|
+
}
|
|
30
|
+
isGeneral(name, config) { return config?.general_topic === true || name === "general"; }
|
|
31
|
+
describe(name) {
|
|
32
|
+
const config = this.host.config(name);
|
|
33
|
+
if (!config)
|
|
34
|
+
throw Error("Agent not found");
|
|
35
|
+
const backend = config.backend || this.host.defaults()?.backend || "claude-code";
|
|
36
|
+
return { revision: settingsFingerprint([config, this.host.defaults(), this.host.generation(name), this.host.epoch(name)]),
|
|
37
|
+
runtime: config.runtime === "windows" ? "windows" : "wsl", machineId: config.machine_id, backend, backendState: this.host.backendState?.(name, backend),
|
|
38
|
+
directory: config.working_directory, model: config.model ?? "", general: this.isGeneral(name, config), adapter: config.native_adapter ?? "exec", sandbox: config.native_sandbox ?? "read-only",
|
|
39
|
+
credentialProfile: (() => { try {
|
|
40
|
+
return isWindowsInstance(config) ? nativeCredentialProfile(config) : undefined;
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
return undefined;
|
|
44
|
+
} })() };
|
|
45
|
+
}
|
|
46
|
+
change(name, raw, authorized) {
|
|
47
|
+
const target = AgentRuntimeChangeInput.parse(raw), digest = settingsFingerprint(target), old = this.attempts.get(name);
|
|
48
|
+
if (!authorized())
|
|
49
|
+
throw Error("Runtime change requires a current dashboard administrator");
|
|
50
|
+
// General's location has its own journalled switch (Shared agent settings → General location, #3036): it holds deliveries,
|
|
51
|
+
// confirms the old host exited and clears the Linux-only fields. This path does none of that, so it is not offered.
|
|
52
|
+
if (this.isGeneral(name, this.host.config(name)))
|
|
53
|
+
throw Error(GENERAL_USES_LOCATION_SWITCH);
|
|
54
|
+
if (old?.id === target.requestId) {
|
|
55
|
+
if (old.digest !== digest)
|
|
56
|
+
throw Error("Runtime request ID belongs to another change");
|
|
57
|
+
return old.result;
|
|
58
|
+
}
|
|
59
|
+
if (old?.pending)
|
|
60
|
+
throw Error("A Runtime change is already in progress for this Agent");
|
|
61
|
+
if (this.describe(name).revision !== target.expectedRevision)
|
|
62
|
+
throw Error("Agent settings changed; reopen Runtime settings before switching");
|
|
63
|
+
// One synchronous claim per Agent before preparation, transition queueing or workspace allocation.
|
|
64
|
+
const attempt = { id: target.requestId, digest, pending: true, result: null };
|
|
65
|
+
this.attempts.set(name, attempt);
|
|
66
|
+
attempt.result = Promise.resolve().then(() => this.host.transition(name, async (stop) => {
|
|
67
|
+
if (this.describe(name).revision !== target.expectedRevision)
|
|
68
|
+
throw Error("Agent settings changed while waiting to switch Runtime");
|
|
69
|
+
const before = this.host.config(name), baseline = settingsFingerprint([this.host.defaults(), this.host.generation(name)]);
|
|
70
|
+
let epoch = this.host.epoch(name), revoked = false, prepared;
|
|
71
|
+
const current = () => {
|
|
72
|
+
if (revoked)
|
|
73
|
+
return false;
|
|
74
|
+
if (!authorized() || this.host.config(name) !== before || this.host.epoch(name) !== epoch || settingsFingerprint([this.host.defaults(), this.host.generation(name)]) !== baseline || !this.host.idle(name) || prepared?.current?.() === false)
|
|
75
|
+
revoked = true;
|
|
76
|
+
return !revoked;
|
|
77
|
+
};
|
|
78
|
+
if (!current())
|
|
79
|
+
throw Error("Wait for this Agent and its queued work to finish before switching Runtime");
|
|
80
|
+
let undoSession, saved = false;
|
|
81
|
+
try {
|
|
82
|
+
prepared = await this.host.prepare(name, before, target, current);
|
|
83
|
+
if (!current())
|
|
84
|
+
throw Error("Runtime change was revoked or the Agent became busy during preparation");
|
|
85
|
+
// stop() owns exactly one epoch advance, even for the exec adapter. Any other advance permanently revokes us.
|
|
86
|
+
epoch++;
|
|
87
|
+
await stop();
|
|
88
|
+
if (!current())
|
|
89
|
+
throw Error("Runtime change lost its source owner while stopping the old CLI");
|
|
90
|
+
if (!await this.host.closed(name, before))
|
|
91
|
+
throw Error("The old CLI exit is unconfirmed; Runtime settings were not changed");
|
|
92
|
+
if (!current())
|
|
93
|
+
throw Error("Runtime change was revoked while checking the old CLI exit");
|
|
94
|
+
if (target.runtime === "wsl")
|
|
95
|
+
undoSession = this.host.fresh(name, target.requestId);
|
|
96
|
+
if (!current())
|
|
97
|
+
throw Error("Runtime change authority expired before saving");
|
|
98
|
+
this.host.save(name, before, prepared.config);
|
|
99
|
+
saved = true;
|
|
100
|
+
this.host.changed(name);
|
|
101
|
+
return { ok: true, name, runtime: target.runtime, machineId: target.machineId, backend: target.backend, started: false, historyPreserved: true };
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
if (!saved) {
|
|
105
|
+
undoSession?.();
|
|
106
|
+
prepared?.discard();
|
|
107
|
+
}
|
|
108
|
+
throw error;
|
|
109
|
+
}
|
|
110
|
+
})).finally(() => { attempt.pending = false; });
|
|
111
|
+
return attempt.result;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=agent-runtime-change.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-runtime-change.js","sourceRoot":"","sources":["../src/agent-runtime-change.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAE3F,MAAM,CAAC,MAAM,uBA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;QACH,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAE,EAAE,GAAC,OAAO,CAAC,OAAO,GAAC,KAAK,CAAC,CAAA,CAAC,CAAC,CAAC;QAC1C,OAAO,OAAO,CAAC,MAAM,CAAC;IACxB,CAAC;CACF"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export declare const WORKSPACE_LIMITS: Readonly<{
|
|
2
|
+
fileBytes: number;
|
|
3
|
+
diffBytes: number;
|
|
4
|
+
diffFiles: 500;
|
|
5
|
+
/** One file's share of the diff: a bigger one is listed as "too large to show" (the others still fit). */
|
|
6
|
+
fileDiffBytes: number;
|
|
7
|
+
dirEntries: 1000;
|
|
8
|
+
untrackedDiffFiles: 50;
|
|
9
|
+
gitTimeoutMs: 10000;
|
|
10
|
+
}>;
|
|
11
|
+
/** Whether a path (relative, `/`-separated) is hidden: any part a hidden directory, or its name a secret-looking file. */
|
|
12
|
+
export declare function isHiddenPath(rel: string): boolean;
|
|
13
|
+
export type WorkspaceRefusal = "not_found" | "not_a_directory" | "outside" | "hidden" | "symlink" | "not_a_file" | "invalid";
|
|
14
|
+
export declare class WorkspaceError extends Error {
|
|
15
|
+
readonly code: WorkspaceRefusal;
|
|
16
|
+
constructor(code: WorkspaceRefusal);
|
|
17
|
+
}
|
|
18
|
+
export interface WorkspaceRoot {
|
|
19
|
+
root: string;
|
|
20
|
+
state: string | null;
|
|
21
|
+
}
|
|
22
|
+
/** The agent's folder (realpath) and AgEnD's state directory, when it is inside the folder. */
|
|
23
|
+
export declare function workspaceRoot(workingDirectory: string, agendHome: string): Promise<WorkspaceRoot>;
|
|
24
|
+
/**
|
|
25
|
+
* A request's relative path → its place under the root, refused when it is not plainly inside: no absolute path, no
|
|
26
|
+
* `..`, no NUL or control characters; and no part of it (or the place itself, via realpath) outside the root or in
|
|
27
|
+
* AgEnD's state. `allowRoot`: the empty path is the root itself (a directory listing).
|
|
28
|
+
*/
|
|
29
|
+
export declare function placeOf(ws: WorkspaceRoot, rel: unknown, allowRoot?: boolean): Promise<{
|
|
30
|
+
abs: string;
|
|
31
|
+
rel: string;
|
|
32
|
+
}>;
|
|
33
|
+
export interface WorkspaceChange {
|
|
34
|
+
path: string;
|
|
35
|
+
status: string;
|
|
36
|
+
adds: number | null;
|
|
37
|
+
dels: number | null;
|
|
38
|
+
binary: boolean;
|
|
39
|
+
hidden: boolean;
|
|
40
|
+
untracked: boolean;
|
|
41
|
+
tooLarge?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface WorkspaceChanges {
|
|
44
|
+
repo: boolean;
|
|
45
|
+
branch: string | null;
|
|
46
|
+
files: WorkspaceChange[];
|
|
47
|
+
patch: string;
|
|
48
|
+
cut: {
|
|
49
|
+
files: boolean;
|
|
50
|
+
bytes: boolean;
|
|
51
|
+
};
|
|
52
|
+
hiddenCount: number;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Changes: git status plus the diff of everything uncommitted against HEAD (staged and unstaged together, P1), and the
|
|
56
|
+
* untracked files git does not ignore, as additions. Hidden files are listed without their diff.
|
|
57
|
+
*/
|
|
58
|
+
export declare function workspaceChanges(ws: WorkspaceRoot): Promise<WorkspaceChanges>;
|
|
59
|
+
export interface WorkspaceEntry {
|
|
60
|
+
name: string;
|
|
61
|
+
type: "dir" | "file" | "symlink" | "other";
|
|
62
|
+
size: number | null;
|
|
63
|
+
hidden: boolean;
|
|
64
|
+
}
|
|
65
|
+
/** One directory's entries (directories first, then names), gitignored ones left out in a repository. */
|
|
66
|
+
export declare function workspaceList(ws: WorkspaceRoot, rel: unknown): Promise<{
|
|
67
|
+
path: string;
|
|
68
|
+
entries: WorkspaceEntry[];
|
|
69
|
+
cut: boolean;
|
|
70
|
+
}>;
|
|
71
|
+
export type WorkspaceFile = {
|
|
72
|
+
kind: "text";
|
|
73
|
+
path: string;
|
|
74
|
+
size: number;
|
|
75
|
+
text: string;
|
|
76
|
+
} | {
|
|
77
|
+
kind: "image";
|
|
78
|
+
path: string;
|
|
79
|
+
size: number;
|
|
80
|
+
mime: string;
|
|
81
|
+
} | {
|
|
82
|
+
kind: "binary" | "too_large";
|
|
83
|
+
path: string;
|
|
84
|
+
size: number;
|
|
85
|
+
};
|
|
86
|
+
/** A file as the viewer shows it: text (UTF-8, up to 1 MiB), an image (served raw by `workspaceImage`), or why not. */
|
|
87
|
+
export declare function workspaceFile(ws: WorkspaceRoot, rel: unknown): Promise<WorkspaceFile>;
|
|
88
|
+
/** An image's bytes for the viewer's <img> (a known image extension only, at most 8 MiB). */
|
|
89
|
+
export declare function workspaceImage(ws: WorkspaceRoot, rel: unknown): Promise<{
|
|
90
|
+
mime: string;
|
|
91
|
+
bytes: Buffer;
|
|
92
|
+
}>;
|
|
93
|
+
export declare const workspaceName: (rel: string) => string;
|