@songsid/agend 2.3.5-alpha.4 → 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-change.d.ts +3 -1
- package/dist/agent-runtime-change.js +15 -3
- package/dist/agent-runtime-change.js.map +1 -1
- 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 +164 -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 +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-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 +78 -15
- 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 +359 -7
- package/dist/fleet-manager.js +1365 -90
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.d.ts +2 -1
- package/dist/fleet-windows-runtime.js +25 -7
- 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 +2 -2
- 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/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 +25 -7
- package/dist/runtime-api.js.map +1 -1
- package/dist/runtime-build-info.js +5 -3
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-bundle.d.ts +3 -0
- package/dist/runtime-bundle.js +3 -1
- package/dist/runtime-bundle.js.map +1 -1
- package/dist/runtime-cli.d.ts +8 -1
- package/dist/runtime-cli.js +127 -8
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client-store.d.ts +7 -0
- package/dist/runtime-client-store.js +30 -2
- package/dist/runtime-client-store.js.map +1 -1
- package/dist/runtime-client.d.ts +63 -1
- package/dist/runtime-client.js +295 -21
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-coordinator.d.ts +7 -0
- package/dist/runtime-coordinator.js +213 -35
- 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-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 +17 -2
- package/dist/runtime-protocol.js +12 -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 +97 -0
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.js +13 -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 +9 -8
- package/dist/ui/backend-signin.js +4 -1
- 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-pane-recovery.js +1 -1
- package/dist/ui/office-share-page.js +4 -2
- package/dist/ui/panel-chat.js +34 -48
- package/dist/ui/panel-details.js +1 -1
- package/dist/ui/panel-fleet.js +78 -10
- 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 +114 -23
- package/dist/ui/panel-settings.js +69 -80
- package/dist/ui/panel-windows-cli.js +12 -2
- 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-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 +28 -7
- 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 +8 -11
- package/dist/ui/settings-model.js +16 -2
- package/dist/ui/settings-outside.js +104 -38
- package/dist/ui/settings-registry.js +4 -1
- package/dist/ui/settings-shared-strings.js +143 -0
- package/dist/ui/settings-shared.js +345 -0
- package/dist/ui/settings-strings.js +10 -46
- package/dist/ui/settings-web-authority.js +5 -2
- 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 +64 -8
- package/dist/ui/shared/app.css +121 -30
- 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/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/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/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/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 +48 -2
- package/dist/web-api.js +276 -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 +1 -0
- package/dist/windows-agents.js +1 -0
- package/dist/windows-agents.js.map +1 -1
- package/dist/windows-cli-api.d.ts +12 -1
- package/dist/windows-cli-api.js +27 -1
- 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 +24 -0
- package/dist/windows-cli-worker.js +96 -5
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +10 -0
- package/dist/windows-cli.js +10 -1
- 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
|
@@ -29,8 +29,9 @@ export declare const AgentRuntimeChangeInput: z.ZodObject<{
|
|
|
29
29
|
pane: "pane";
|
|
30
30
|
}>>;
|
|
31
31
|
startNewConversation: z.ZodLiteral<true>;
|
|
32
|
+
credentialProfile: z.ZodOptional<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
|
|
32
33
|
}, z.core.$strict>;
|
|
33
|
-
export declare const GENERAL_USES_LOCATION_SWITCH = "General is moved from Settings \u2192
|
|
34
|
+
export declare const GENERAL_USES_LOCATION_SWITCH = "General is moved from Settings \u2192 Shared agent settings \u2192 General location, not from Runtime settings";
|
|
34
35
|
export type AgentRuntimeTarget = z.infer<typeof AgentRuntimeChangeInput>;
|
|
35
36
|
export interface PreparedAgentRuntime {
|
|
36
37
|
config: InstanceConfig;
|
|
@@ -69,6 +70,7 @@ export declare class AgentRuntimeChanges {
|
|
|
69
70
|
general: boolean;
|
|
70
71
|
adapter: "exec" | "pane";
|
|
71
72
|
sandbox: "read-only" | "workspace-write";
|
|
73
|
+
credentialProfile: string | undefined;
|
|
72
74
|
};
|
|
73
75
|
change(name: string, raw: unknown, authorized: () => boolean): Promise<unknown>;
|
|
74
76
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/** Administrator-only moves of one Fleet identity. Provider sessions never cross machines or providers. */
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { settingsFingerprint } from "./settings-transaction.js";
|
|
4
|
+
import { validCredentialProfileName } from "./runtime-credential-profiles.js";
|
|
5
|
+
import { isWindowsInstance, nativeCredentialProfile } from "./native-instance-registry.js";
|
|
4
6
|
export const AgentRuntimeChangeInput = z.object({
|
|
5
7
|
requestId: z.string().uuid(), expectedRevision: z.string().regex(/^[a-f0-9]{64}$/),
|
|
6
8
|
runtime: z.enum(["wsl", "windows"]), machineId: z.string().uuid().optional(),
|
|
@@ -8,13 +10,17 @@ export const AgentRuntimeChangeInput = z.object({
|
|
|
8
10
|
model: z.string().max(160).default(""), directory: z.string().max(1024).default(""),
|
|
9
11
|
sandbox: z.enum(["read-only", "workspace-write"]).default("read-only"),
|
|
10
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(),
|
|
11
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" });
|
|
12
18
|
if (value.runtime === "wsl" && (value.machineId || value.adapter !== "exec"))
|
|
13
19
|
ctx.addIssue({ code: "custom", message: "Choose the Fleet host for a WSL/Linux agent" });
|
|
14
20
|
if (value.runtime === "windows" && value.adapter === "pane" && !['codex', 'claude-code'].includes(value.backend))
|
|
15
21
|
ctx.addIssue({ code: "custom", message: "Persistent Windows terminals support Codex and Claude Code" });
|
|
16
22
|
});
|
|
17
|
-
export const GENERAL_USES_LOCATION_SWITCH = "General is moved from Settings →
|
|
23
|
+
export const GENERAL_USES_LOCATION_SWITCH = "General is moved from Settings → Shared agent settings → General location, not from Runtime settings";
|
|
18
24
|
export class AgentRuntimeChanges {
|
|
19
25
|
host;
|
|
20
26
|
attempts = new Map();
|
|
@@ -29,13 +35,19 @@ export class AgentRuntimeChanges {
|
|
|
29
35
|
const backend = config.backend || this.host.defaults()?.backend || "claude-code";
|
|
30
36
|
return { revision: settingsFingerprint([config, this.host.defaults(), this.host.generation(name), this.host.epoch(name)]),
|
|
31
37
|
runtime: config.runtime === "windows" ? "windows" : "wsl", machineId: config.machine_id, backend, backendState: this.host.backendState?.(name, backend),
|
|
32
|
-
directory: config.working_directory, model: config.model ?? "", general: this.isGeneral(name, config), adapter: config.native_adapter ?? "exec", sandbox: config.native_sandbox ?? "read-only"
|
|
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
|
+
} })() };
|
|
33
45
|
}
|
|
34
46
|
change(name, raw, authorized) {
|
|
35
47
|
const target = AgentRuntimeChangeInput.parse(raw), digest = settingsFingerprint(target), old = this.attempts.get(name);
|
|
36
48
|
if (!authorized())
|
|
37
49
|
throw Error("Runtime change requires a current dashboard administrator");
|
|
38
|
-
// General's location has its own journalled switch (
|
|
50
|
+
// General's location has its own journalled switch (Shared agent settings → General location, #3036): it holds deliveries,
|
|
39
51
|
// confirms the old host exited and clears the Linux-only fields. This path does none of that, so it is not offered.
|
|
40
52
|
if (this.isGeneral(name, this.host.config(name)))
|
|
41
53
|
throw Error(GENERAL_USES_LOCATION_SWITCH);
|
|
@@ -1 +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;
|
|
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,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,SAAS,EAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC;IAChF,OAAO,EAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAC,SAAS,CAAC,CAAC,EAAE,SAAS,EAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACzE,OAAO,EAAC,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAC,OA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AC,CAAC;gBACxF,IAAG,MAAM,CAAC,OAAO,KAAG,KAAK;oBAAC,WAAW,GAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;gBAC7E,IAAG,CAAC,OAAO,EAAE;oBAAC,MAAM,KAAK,CAAC,gDAAgD,CAAC,CAAC;gBAC5E,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAC,MAAM,EAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;gBAAA,KAAK,GAAC,IAAI,CAAC;gBACvD,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBACxB,OAAO,EAAC,EAAE,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,CAAC,OAAO,EAAC,SAAS,EAAC,MAAM,CAAC,SAAS,EAAC,OAAO,EAAC,MAAM,CAAC,OAAO,EAAC,OAAO,EAAC,KAAK,EAAC,gBAAgB,EAAC,IAAI,EAAC,CAAC;YACrI,CAAC;YAAA,OAAM,KAAK,EAAC,CAAC;gBACZ,IAAG,CAAC,KAAK,EAAC,CAAC;oBAAA,WAAW,EAAE,EAAE,CAAC;oBAAA,QAAQ,EAAE,OAAO,EAAE,CAAC;gBAAA,CAAC;gBAChD,MAAM,KAAK,CAAC;YACd,CAAC;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;
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #3153 P1: a read-only look at an agent's working directory, for the web's Files / Changes side panel.
|
|
3
|
+
*
|
|
4
|
+
* - **Scope:** only the agent's configured `working_directory` (realpath). Every path is resolved and must stay under
|
|
5
|
+
* it. A symlink is listed but never followed (its target is neither read nor described). `..`, absolute paths, NUL
|
|
6
|
+
* and device or FIFO files are refused. AgEnD's own state directory is never shown, even inside the folder.
|
|
7
|
+
* - **Secrets:** a fixed deny-list by name (`.env*`, keys, certificates, credential and secret files, `.git`, `.ssh`,
|
|
8
|
+
* …). Such a file is listed as hidden; its contents are never read or sent, and its diff is left out.
|
|
9
|
+
* - **Limits:**
|
|
10
|
+
* - a file over 1 MiB is not read;
|
|
11
|
+
* - the diff stops at 2 MiB or 500 files;
|
|
12
|
+
* - a directory lists at most 1,000 entries;
|
|
13
|
+
* - git runs with a timeout and a byte cap.
|
|
14
|
+
* Every cut is said, never silent.
|
|
15
|
+
* - **git:** only read-only commands (`status`, `diff`, `ls-files`, `check-ignore`, `rev-parse`), never a pager, with
|
|
16
|
+
* `GIT_OPTIONAL_LOCKS=0` (no index refresh), and with fsmonitor, external diff and textconv switched off. Nothing in
|
|
17
|
+
* the folder is executed by this module, and nothing is written.
|
|
18
|
+
*
|
|
19
|
+
* Callers (web-api.ts) decide who may ask: the fleet's local admin session only.
|
|
20
|
+
*/
|
|
21
|
+
import { execFile } from "./child-process.js";
|
|
22
|
+
import { constants as fsConstants } from "node:fs";
|
|
23
|
+
import { lstat, open, readdir, realpath } from "node:fs/promises";
|
|
24
|
+
import { basename, extname, isAbsolute, join, resolve, sep } from "node:path";
|
|
25
|
+
export const WORKSPACE_LIMITS = Object.freeze({
|
|
26
|
+
fileBytes: 1024 * 1024,
|
|
27
|
+
diffBytes: 2 * 1024 * 1024,
|
|
28
|
+
diffFiles: 500,
|
|
29
|
+
/** One file's share of the diff: a bigger one is listed as "too large to show" (the others still fit). */
|
|
30
|
+
fileDiffBytes: 256 * 1024,
|
|
31
|
+
dirEntries: 1000,
|
|
32
|
+
untrackedDiffFiles: 50,
|
|
33
|
+
gitTimeoutMs: 10_000,
|
|
34
|
+
});
|
|
35
|
+
const IMAGE_TYPES = { ".png": "image/png", ".jpg": "image/jpeg", ".jpeg": "image/jpeg", ".gif": "image/gif", ".webp": "image/webp" };
|
|
36
|
+
const EMPTY_TREE = "4b825dc642cb6eb9a060e54bf8d69288fbee4904";
|
|
37
|
+
/** Names whose contents never leave the machine through this view (fixed in P1, #3153). Lowercase compare. */
|
|
38
|
+
const HIDDEN_DIRS = new Set([".git", ".ssh", ".aws", ".gnupg", ".kube", ".docker", ".azure", ".config", ".agend", ".claude", ".codex", ".kiro"]);
|
|
39
|
+
const HIDDEN_FILES = new Set([".npmrc", ".netrc", ".pypirc", ".git-credentials", ".pgpass", "credentials", "credentials.json", "auth.json", "secrets.json",
|
|
40
|
+
"id_rsa", "id_dsa", "id_ecdsa", "id_ed25519", "known_hosts", "authorized_keys", ".htpasswd",
|
|
41
|
+
// Fable on #3158: tool credentials and shell histories (a history holds whatever was typed, tokens included).
|
|
42
|
+
".envrc", ".vault-token", ".s3cfg", ".boto", "kubeconfig", ".kubeconfig", "terraform.tfstate", "terraform.tfstate.backup"]);
|
|
43
|
+
/** Whether a path (relative, `/`-separated) is hidden: any part a hidden directory, or its name a secret-looking file. */
|
|
44
|
+
export function isHiddenPath(rel) {
|
|
45
|
+
const parts = rel.split("/").filter(Boolean);
|
|
46
|
+
for (const p of parts.slice(0, -1))
|
|
47
|
+
if (HIDDEN_DIRS.has(p.toLowerCase()))
|
|
48
|
+
return true;
|
|
49
|
+
const name = (parts[parts.length - 1] ?? "").toLowerCase();
|
|
50
|
+
if (HIDDEN_DIRS.has(name) || HIDDEN_FILES.has(name))
|
|
51
|
+
return true;
|
|
52
|
+
if (/^\.env(?:$|[.-])/.test(name) || /^id_(?:rsa|dsa|ecdsa|ed25519)/.test(name))
|
|
53
|
+
return true;
|
|
54
|
+
if (/\.(?:pem|key|p12|p8|pfx|jks|keystore|kdbx|asc|gpg|ppk|token|env|tfvars|tfstate)$/.test(name) || /\.tfstate\./.test(name))
|
|
55
|
+
return true;
|
|
56
|
+
if (/^service[-_]?account.*\.json$/.test(name) || /^\.[a-z0-9]*_?history$/.test(name) || /^\.?kubeconfig(?:[.-]|$)/.test(name))
|
|
57
|
+
return true;
|
|
58
|
+
if (/(?:^|[._-])(?:secret|secrets|credential|credentials|password|passwords|private[-_]?key)(?:[._-]|$)/.test(name))
|
|
59
|
+
return true;
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
export class WorkspaceError extends Error {
|
|
63
|
+
code;
|
|
64
|
+
constructor(code) {
|
|
65
|
+
super(code);
|
|
66
|
+
this.code = code;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const under = (path, root) => path === root || path.startsWith(root.endsWith(sep) ? root : root + sep);
|
|
70
|
+
/** The agent's folder (realpath) and AgEnD's state directory, when it is inside the folder. */
|
|
71
|
+
export async function workspaceRoot(workingDirectory, agendHome) {
|
|
72
|
+
if (typeof workingDirectory !== "string" || !isAbsolute(workingDirectory))
|
|
73
|
+
throw new WorkspaceError("not_a_directory");
|
|
74
|
+
let root;
|
|
75
|
+
try {
|
|
76
|
+
root = await realpath(workingDirectory);
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
throw new WorkspaceError("not_found");
|
|
80
|
+
}
|
|
81
|
+
const st = await lstat(root).catch(() => null);
|
|
82
|
+
if (!st || !st.isDirectory())
|
|
83
|
+
throw new WorkspaceError("not_a_directory");
|
|
84
|
+
let state = null;
|
|
85
|
+
try {
|
|
86
|
+
const s = await realpath(agendHome);
|
|
87
|
+
if (under(s, root))
|
|
88
|
+
state = s;
|
|
89
|
+
}
|
|
90
|
+
catch { /* no state directory */ }
|
|
91
|
+
return { root, state };
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* A request's relative path → its place under the root, refused when it is not plainly inside: no absolute path, no
|
|
95
|
+
* `..`, no NUL or control characters; and no part of it (or the place itself, via realpath) outside the root or in
|
|
96
|
+
* AgEnD's state. `allowRoot`: the empty path is the root itself (a directory listing).
|
|
97
|
+
*/
|
|
98
|
+
export async function placeOf(ws, rel, allowRoot = false) {
|
|
99
|
+
if (typeof rel !== "string" || rel.length > 4096 || /[\u0000-\u001f\u007f\\]/.test(rel))
|
|
100
|
+
throw new WorkspaceError("invalid");
|
|
101
|
+
if (rel === "" || rel === "/") {
|
|
102
|
+
if (allowRoot)
|
|
103
|
+
return { abs: ws.root, rel: "" };
|
|
104
|
+
throw new WorkspaceError("invalid");
|
|
105
|
+
}
|
|
106
|
+
if (isAbsolute(rel) || rel.startsWith("/"))
|
|
107
|
+
throw new WorkspaceError("outside");
|
|
108
|
+
const clean = rel.replace(/\/+$/g, "");
|
|
109
|
+
if (clean.split("/").some((p) => p === "" || p === "." || p === ".."))
|
|
110
|
+
throw new WorkspaceError("outside");
|
|
111
|
+
const abs = resolve(ws.root, clean);
|
|
112
|
+
if (!under(abs, ws.root))
|
|
113
|
+
throw new WorkspaceError("outside");
|
|
114
|
+
// Every parent must be a real directory under the root (a symlinked directory is never walked through).
|
|
115
|
+
let at = ws.root;
|
|
116
|
+
for (const part of clean.split("/").slice(0, -1)) {
|
|
117
|
+
at = join(at, part);
|
|
118
|
+
const st = await lstat(at).catch(() => null);
|
|
119
|
+
if (!st)
|
|
120
|
+
throw new WorkspaceError("not_found");
|
|
121
|
+
if (st.isSymbolicLink())
|
|
122
|
+
throw new WorkspaceError("symlink");
|
|
123
|
+
if (!st.isDirectory())
|
|
124
|
+
throw new WorkspaceError("not_a_directory");
|
|
125
|
+
}
|
|
126
|
+
if (ws.state && under(abs, ws.state))
|
|
127
|
+
throw new WorkspaceError("hidden");
|
|
128
|
+
return { abs, rel: clean };
|
|
129
|
+
}
|
|
130
|
+
// ── git ──
|
|
131
|
+
function git(root, args, maxBytes) {
|
|
132
|
+
return new Promise((done) => {
|
|
133
|
+
const child = execFile("git", ["-C", root, "-c", "core.fsmonitor=false", "-c", "core.untrackedCache=false", "-c", "core.pager=cat",
|
|
134
|
+
"-c", "diff.external=", "-c", "color.ui=false", ...args], { encoding: "buffer", timeout: WORKSPACE_LIMITS.gitTimeoutMs, maxBuffer: maxBytes, windowsHide: true,
|
|
135
|
+
env: { ...process.env, GIT_OPTIONAL_LOCKS: "0", GIT_PAGER: "cat", PAGER: "cat", GIT_TERMINAL_PROMPT: "0", GIT_CONFIG_NOSYSTEM: "1", LC_ALL: "C" } }, (err, stdout) => {
|
|
136
|
+
const out = Buffer.isBuffer(stdout) ? stdout : Buffer.alloc(0);
|
|
137
|
+
const e = err;
|
|
138
|
+
if (e && e.code === "ERR_CHILD_PROCESS_STDIO_MAXBUFFER") {
|
|
139
|
+
done({ ok: true, out, cut: true });
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
// `git diff --no-index` answers 1 when the files differ: that is its success.
|
|
143
|
+
done({ ok: !e || e.code === 1, out, cut: false });
|
|
144
|
+
});
|
|
145
|
+
child.stdin?.end();
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
async function isRepo(root) {
|
|
149
|
+
const r = await git(root, ["rev-parse", "--is-inside-work-tree"], 4096);
|
|
150
|
+
return r.ok && r.out.toString("utf8").trim() === "true";
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Changes: git status plus the diff of everything uncommitted against HEAD (staged and unstaged together, P1), and the
|
|
154
|
+
* untracked files git does not ignore, as additions. Hidden files are listed without their diff.
|
|
155
|
+
*/
|
|
156
|
+
export async function workspaceChanges(ws) {
|
|
157
|
+
if (!(await isRepo(ws.root)))
|
|
158
|
+
return { repo: false, branch: null, files: [], patch: "", cut: { files: false, bytes: false }, hiddenCount: 0 };
|
|
159
|
+
const branchR = await git(ws.root, ["rev-parse", "--abbrev-ref", "HEAD"], 4096);
|
|
160
|
+
const branch = branchR.ok ? branchR.out.toString("utf8").trim() || null : null;
|
|
161
|
+
const hasHead = (await git(ws.root, ["rev-parse", "--verify", "-q", "HEAD"], 4096)).out.length > 0;
|
|
162
|
+
const base = hasHead ? "HEAD" : EMPTY_TREE;
|
|
163
|
+
const status = await git(ws.root, ["status", "--porcelain=v1", "-z", "--untracked-files=all", "--no-renames"], 4 * 1024 * 1024);
|
|
164
|
+
const files = [];
|
|
165
|
+
const entries = status.out.toString("utf8").split("\u0000").filter(Boolean);
|
|
166
|
+
let cutFiles = false;
|
|
167
|
+
for (const e of entries) {
|
|
168
|
+
if (files.length >= WORKSPACE_LIMITS.diffFiles) {
|
|
169
|
+
cutFiles = true;
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
const code = e.slice(0, 2), path = e.slice(3);
|
|
173
|
+
if (!path || (ws.state && under(resolve(ws.root, path), ws.state)))
|
|
174
|
+
continue;
|
|
175
|
+
const untracked = code === "??";
|
|
176
|
+
files.push({ path, status: untracked ? "untracked" : code.includes("D") ? "deleted" : code.includes("A") ? "added" : "modified",
|
|
177
|
+
adds: null, dels: null, binary: false, hidden: isHiddenPath(path), untracked });
|
|
178
|
+
}
|
|
179
|
+
// Line counts for tracked changes (numstat: "-\t-" is binary).
|
|
180
|
+
const numstat = await git(ws.root, ["diff", base, "--numstat", "-z", "--no-renames", "--no-ext-diff", "--no-textconv"], 4 * 1024 * 1024);
|
|
181
|
+
const counts = new Map();
|
|
182
|
+
for (const row of numstat.out.toString("utf8").split("\u0000").filter(Boolean)) {
|
|
183
|
+
const m = /^(-|\d+)\t(-|\d+)\t(.*)$/s.exec(row);
|
|
184
|
+
if (m)
|
|
185
|
+
counts.set(m[3], { adds: m[1] === "-" ? null : Number(m[1]), dels: m[2] === "-" ? null : Number(m[2]), binary: m[1] === "-" });
|
|
186
|
+
}
|
|
187
|
+
for (const f of files) {
|
|
188
|
+
const c = counts.get(f.path);
|
|
189
|
+
if (c)
|
|
190
|
+
Object.assign(f, c);
|
|
191
|
+
}
|
|
192
|
+
// The patch: tracked changes (hidden paths excluded by pathspec), then untracked text files as additions.
|
|
193
|
+
const visibleTracked = files.filter((f) => !f.untracked && !f.hidden).map((f) => f.path);
|
|
194
|
+
// Each file's section is kept only within its own share and the whole budget: one huge file never starves the rest.
|
|
195
|
+
let patch = "", cutBytes = false;
|
|
196
|
+
const byPath = new Map(files.map((f) => [f.path, f]));
|
|
197
|
+
const take = (section, f) => {
|
|
198
|
+
const n = Buffer.byteLength(section);
|
|
199
|
+
if (n > WORKSPACE_LIMITS.fileDiffBytes) {
|
|
200
|
+
if (f)
|
|
201
|
+
f.tooLarge = true;
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (Buffer.byteLength(patch) + n > WORKSPACE_LIMITS.diffBytes) {
|
|
205
|
+
cutBytes = true;
|
|
206
|
+
if (f)
|
|
207
|
+
f.tooLarge = true;
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
patch += section;
|
|
211
|
+
};
|
|
212
|
+
if (visibleTracked.length) {
|
|
213
|
+
const r = await git(ws.root, ["diff", base, "--no-color", "--no-ext-diff", "--no-textconv", "--no-renames", "-U3", "--", ...visibleTracked.map((p) => `:(literal)${p}`)], 16 * 1024 * 1024);
|
|
214
|
+
if (r.cut)
|
|
215
|
+
cutBytes = true;
|
|
216
|
+
for (const section of r.out.toString("utf8").split(/(?=^diff --git )/m).filter(Boolean)) {
|
|
217
|
+
const m = /^diff --git a\/(.*?) b\//.exec(section);
|
|
218
|
+
take(section, m ? byPath.get(m[1]) : undefined);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
let untrackedShown = 0;
|
|
222
|
+
for (const f of files) {
|
|
223
|
+
if (!f.untracked || f.hidden)
|
|
224
|
+
continue;
|
|
225
|
+
if (untrackedShown >= WORKSPACE_LIMITS.untrackedDiffFiles) {
|
|
226
|
+
cutFiles = true;
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
const abs = resolve(ws.root, f.path);
|
|
230
|
+
const st = await lstat(abs).catch(() => null);
|
|
231
|
+
if (!st || !st.isFile())
|
|
232
|
+
continue; // a link or a special file: listed, no diff
|
|
233
|
+
if (st.size > WORKSPACE_LIMITS.fileDiffBytes) {
|
|
234
|
+
f.tooLarge = true;
|
|
235
|
+
continue;
|
|
236
|
+
}
|
|
237
|
+
const r = await git(ws.root, ["diff", "--no-index", "--no-color", "--no-ext-diff", "--no-textconv", "--", "/dev/null", f.path], WORKSPACE_LIMITS.fileDiffBytes * 2);
|
|
238
|
+
const text = r.out.toString("utf8");
|
|
239
|
+
if (/^Binary files /m.test(text)) {
|
|
240
|
+
f.binary = true;
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
f.adds = (text.match(/^\+(?!\+\+)/gm) ?? []).length;
|
|
244
|
+
f.dels = 0;
|
|
245
|
+
take(text, f);
|
|
246
|
+
untrackedShown++;
|
|
247
|
+
}
|
|
248
|
+
return { repo: true, branch, files, patch, cut: { files: cutFiles, bytes: cutBytes }, hiddenCount: files.filter((f) => f.hidden).length };
|
|
249
|
+
}
|
|
250
|
+
/** One directory's entries (directories first, then names), gitignored ones left out in a repository. */
|
|
251
|
+
export async function workspaceList(ws, rel) {
|
|
252
|
+
const place = await placeOf(ws, rel ?? "", true);
|
|
253
|
+
const st = await lstat(place.abs).catch(() => null);
|
|
254
|
+
if (!st)
|
|
255
|
+
throw new WorkspaceError("not_found");
|
|
256
|
+
if (st.isSymbolicLink())
|
|
257
|
+
throw new WorkspaceError("symlink");
|
|
258
|
+
if (!st.isDirectory())
|
|
259
|
+
throw new WorkspaceError("not_a_directory");
|
|
260
|
+
if (place.rel && isHiddenPath(place.rel))
|
|
261
|
+
throw new WorkspaceError("hidden");
|
|
262
|
+
const names = (await readdir(place.abs)).sort();
|
|
263
|
+
let ignored = new Set();
|
|
264
|
+
if (await isRepo(ws.root)) {
|
|
265
|
+
const candidates = names.map((n) => (place.rel ? `${place.rel}/${n}` : n));
|
|
266
|
+
if (candidates.length) {
|
|
267
|
+
const r = await new Promise((done) => {
|
|
268
|
+
const child = execFile("git", ["-C", ws.root, "-c", "core.fsmonitor=false", "check-ignore", "-z", "--stdin"], { encoding: "buffer", timeout: WORKSPACE_LIMITS.gitTimeoutMs, maxBuffer: 4 * 1024 * 1024, env: { ...process.env, GIT_OPTIONAL_LOCKS: "0", GIT_CONFIG_NOSYSTEM: "1", LC_ALL: "C" } }, (_err, out) => done(Buffer.isBuffer(out) ? out : Buffer.alloc(0)));
|
|
269
|
+
child.stdin?.end(candidates.join("\u0000") + "\u0000");
|
|
270
|
+
});
|
|
271
|
+
ignored = new Set(r.toString("utf8").split("\u0000").filter(Boolean));
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
const entries = [];
|
|
275
|
+
let cut = false;
|
|
276
|
+
for (const name of names) {
|
|
277
|
+
const childRel = place.rel ? `${place.rel}/${name}` : name;
|
|
278
|
+
if (ignored.has(childRel))
|
|
279
|
+
continue;
|
|
280
|
+
const abs = join(place.abs, name);
|
|
281
|
+
if (ws.state && under(abs, ws.state))
|
|
282
|
+
continue;
|
|
283
|
+
if (entries.length >= WORKSPACE_LIMITS.dirEntries) {
|
|
284
|
+
cut = true;
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
287
|
+
const s = await lstat(abs).catch(() => null);
|
|
288
|
+
if (!s)
|
|
289
|
+
continue;
|
|
290
|
+
const type = s.isSymbolicLink() ? "symlink" : s.isDirectory() ? "dir" : s.isFile() ? "file" : "other";
|
|
291
|
+
entries.push({ name, type, size: type === "file" ? s.size : null, hidden: isHiddenPath(childRel) });
|
|
292
|
+
}
|
|
293
|
+
entries.sort((a, b) => (a.type === "dir") === (b.type === "dir") ? (a.name < b.name ? -1 : a.name > b.name ? 1 : 0) : a.type === "dir" ? -1 : 1);
|
|
294
|
+
return { path: place.rel, entries, cut };
|
|
295
|
+
}
|
|
296
|
+
/** Open a regular file under the root without following a symlink (O_NOFOLLOW), never waiting on a FIFO (O_NONBLOCK). */
|
|
297
|
+
async function openPlain(ws, rel) {
|
|
298
|
+
const place = await placeOf(ws, rel);
|
|
299
|
+
if (isHiddenPath(place.rel))
|
|
300
|
+
throw new WorkspaceError("hidden");
|
|
301
|
+
const st = await lstat(place.abs).catch(() => null);
|
|
302
|
+
if (!st)
|
|
303
|
+
throw new WorkspaceError("not_found");
|
|
304
|
+
if (st.isSymbolicLink())
|
|
305
|
+
throw new WorkspaceError("symlink");
|
|
306
|
+
if (!st.isFile())
|
|
307
|
+
throw new WorkspaceError("not_a_file");
|
|
308
|
+
const fh = await open(place.abs, fsConstants.O_RDONLY | fsConstants.O_NOFOLLOW | fsConstants.O_NONBLOCK | fsConstants.O_NOCTTY).catch(() => { throw new WorkspaceError("not_a_file"); });
|
|
309
|
+
const fst = await fh.stat();
|
|
310
|
+
if (!fst.isFile() || fst.ino !== st.ino || fst.dev !== st.dev) {
|
|
311
|
+
await fh.close();
|
|
312
|
+
throw new WorkspaceError("not_a_file");
|
|
313
|
+
}
|
|
314
|
+
return { place, fh, size: fst.size };
|
|
315
|
+
}
|
|
316
|
+
/** A file as the viewer shows it: text (UTF-8, up to 1 MiB), an image (served raw by `workspaceImage`), or why not. */
|
|
317
|
+
export async function workspaceFile(ws, rel) {
|
|
318
|
+
const { place, fh, size } = await openPlain(ws, rel);
|
|
319
|
+
try {
|
|
320
|
+
const mime = IMAGE_TYPES[extname(place.rel).toLowerCase()];
|
|
321
|
+
if (mime)
|
|
322
|
+
return { kind: size > WORKSPACE_LIMITS.fileBytes * 8 ? "too_large" : "image", path: place.rel, size, ...(size > WORKSPACE_LIMITS.fileBytes * 8 ? {} : { mime }) };
|
|
323
|
+
if (size > WORKSPACE_LIMITS.fileBytes)
|
|
324
|
+
return { kind: "too_large", path: place.rel, size };
|
|
325
|
+
const buf = Buffer.alloc(size);
|
|
326
|
+
const { bytesRead } = await fh.read(buf, 0, size, 0);
|
|
327
|
+
const bytes = buf.subarray(0, bytesRead);
|
|
328
|
+
if (bytes.subarray(0, 8192).includes(0))
|
|
329
|
+
return { kind: "binary", path: place.rel, size };
|
|
330
|
+
const text = new TextDecoder("utf-8", { fatal: false }).decode(bytes);
|
|
331
|
+
return { kind: "text", path: place.rel, size, text };
|
|
332
|
+
}
|
|
333
|
+
finally {
|
|
334
|
+
await fh.close();
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
/** An image's bytes for the viewer's <img> (a known image extension only, at most 8 MiB). */
|
|
338
|
+
export async function workspaceImage(ws, rel) {
|
|
339
|
+
const { place, fh, size } = await openPlain(ws, rel);
|
|
340
|
+
try {
|
|
341
|
+
const mime = IMAGE_TYPES[extname(place.rel).toLowerCase()];
|
|
342
|
+
if (!mime || size > WORKSPACE_LIMITS.fileBytes * 8)
|
|
343
|
+
throw new WorkspaceError("not_a_file");
|
|
344
|
+
const buf = Buffer.alloc(size);
|
|
345
|
+
const { bytesRead } = await fh.read(buf, 0, size, 0);
|
|
346
|
+
return { mime, bytes: buf.subarray(0, bytesRead) };
|
|
347
|
+
}
|
|
348
|
+
finally {
|
|
349
|
+
await fh.close();
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
export const workspaceName = (rel) => basename(rel);
|
|
353
|
+
//# sourceMappingURL=agent-workspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-workspace.js","sourceRoot":"","sources":["../src/agent-workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAA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,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;QAC3D,IAAI,CAAC,IAAI,IAAI,IAAI,GAAG,gBAAgB,CAAC,SAAS,GAAG,CAAC;YAAE,MAAM,IAAI,cAAc,CAAC,YAAY,CAAC,CAAC;QAC3F,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC/B,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACrD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC;IACrD,CAAC;YAAS,CAAC;QAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC;IAAC,CAAC;AACjC,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC"}
|
package/dist/auth-api.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { type SessionRecord, type SessionTier, type WebSessionStore } from "./we
|
|
|
4
4
|
import { type WebPeer } from "./authority/web-authority.js";
|
|
5
5
|
import type { GuestLoginCodes, LoginCodeOwner, LoginCodeRecipient, WebLoginCodes } from "./web-login.js";
|
|
6
6
|
import { type ReturningDevice } from "./web-returning-device.js";
|
|
7
|
+
import { type DeviceLoginRequests } from "./web-device-login.js";
|
|
7
8
|
export declare const LOGIN_REFUSED_MESSAGE = "That code did not work \u2014 it may be wrong, expired or already used. Ask for a new one with /web.";
|
|
8
9
|
export declare const LOGIN_PAUSED_MESSAGE = "Too many wrong codes \u2014 sign-in is paused for a few minutes.";
|
|
9
10
|
export interface AuthApiContext {
|
|
@@ -101,6 +102,25 @@ export interface AuthApiContext {
|
|
|
101
102
|
} | {
|
|
102
103
|
kind: "refused";
|
|
103
104
|
}>;
|
|
105
|
+
/**
|
|
106
|
+
* Refs #3061 (P2a): the requests of device-code sign-in (web-device-login.ts). With `isWebOnlyFleet()`, what makes
|
|
107
|
+
* `/auth/device-login*` exist: a fleet with a chat connection, web authorization off, or the public link, answers 404 there.
|
|
108
|
+
*/
|
|
109
|
+
readonly webDeviceLogins?: DeviceLoginRequests | null;
|
|
110
|
+
/**
|
|
111
|
+
* Refs #3061: device-code sign-in is open right now — a web-only fleet with web authorization on (with it off no one
|
|
112
|
+
* can approve, so nothing is offered). Asked again after the body is read. Absent: not open.
|
|
113
|
+
*/
|
|
114
|
+
deviceLoginAvailable?(): boolean;
|
|
115
|
+
/** Refs #3061 (P2b): `web.login_qr` — the sign-in page may draw the QR code of the approve link beside the code. Absent: no. */
|
|
116
|
+
loginQrEnabled?(): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Refs #3061 (P2b): may this request's admin session end ANOTHER session (`DELETE /auth/sessions/<handle>` of someone
|
|
119
|
+
* else's, or `DELETE /auth/sessions`)? A web-only fleet answers yes only for its verified owner: a session a one-time
|
|
120
|
+
* code or a device approval made is not one, and could otherwise sign the owner out. Ending one's own is never asked.
|
|
121
|
+
* Absent: yes, as it always was (a fleet with a chat connection, and any caller that does not set it).
|
|
122
|
+
*/
|
|
123
|
+
mayEndOtherSessions?(req: IncomingMessage): boolean;
|
|
104
124
|
}
|
|
105
125
|
export declare const CODE_REQUEST_REFUSED_MESSAGE = "A new code could not be sent. Ask for one with /web.";
|
|
106
126
|
/** True for a name `/assets/` serves. The public link's manifest asks this too: one list, not two. */
|
|
@@ -127,6 +147,11 @@ export declare function bypassesWebGate(req: {
|
|
|
127
147
|
view_access?: string;
|
|
128
148
|
} | undefined;
|
|
129
149
|
} | null | undefined, isViewRead: (path: string) => boolean): boolean;
|
|
150
|
+
/**
|
|
151
|
+
* AgEnD Hub P1: one public, inert asset by its /assets/ name — what a Hub's own listener serves of the app's static
|
|
152
|
+
* closure. It reads no cookie, session or request header. Returns false when there is no such asset.
|
|
153
|
+
*/
|
|
154
|
+
export declare function servePublicAsset(res: ServerResponse, name: string): boolean;
|
|
130
155
|
/**
|
|
131
156
|
* The sign-in page. Also what a browser navigation gets from a gated page it has no cookie for. #2910 D5: on a web-only
|
|
132
157
|
* fleet (`webOnly`) its <body> says so, and the page's words lead with `agend web --code` (there is no /web to send).
|
|
@@ -134,6 +159,8 @@ export declare function bypassesWebGate(req: {
|
|
|
134
159
|
export declare function serveSigninPage(res: ServerResponse, status?: number, opts?: {
|
|
135
160
|
webOnly?: boolean;
|
|
136
161
|
outside?: boolean;
|
|
162
|
+
deviceLogin?: boolean;
|
|
163
|
+
loginQr?: boolean;
|
|
137
164
|
}): void;
|
|
138
165
|
/**
|
|
139
166
|
* What a guest's browser gets for a page it cannot open (#2399 smoke: the gate's bare JSON before): "members" for a page
|