@songsid/agend 2.4.0-beta.2 → 2.4.0-beta.20
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/dist/accounts-profiles.d.ts +1 -1
- package/dist/accounts-view.d.ts +32 -0
- package/dist/accounts-view.js +2 -14
- package/dist/accounts-view.js.map +1 -1
- package/dist/agent-cli-instructions.md +17 -7
- package/dist/agent-cli.js +163 -51
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.d.ts +4 -1
- package/dist/agent-endpoint.js +47 -11
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-export.d.ts +3 -1
- package/dist/agent-export.js +18 -1
- package/dist/agent-export.js.map +1 -1
- package/dist/agent-token-header.d.ts +1 -1
- package/dist/agent-token-header.js +1 -1
- package/dist/agent-whats-new.js +15 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/app-message-origin.d.ts +2 -0
- package/dist/app-message-origin.js +3 -0
- package/dist/app-message-origin.js.map +1 -0
- package/dist/apply-job.d.ts +2 -2
- package/dist/auth-api.d.ts +10 -0
- package/dist/auth-api.js +81 -4
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/authority-state.d.ts +7 -0
- package/dist/authority/authority-state.js +17 -2
- package/dist/authority/authority-state.js.map +1 -1
- package/dist/authority/web-authority.d.ts +11 -1
- package/dist/authority/web-authority.js +11 -1
- package/dist/authority/web-authority.js.map +1 -1
- package/dist/backend/agy-model-switch.d.ts +22 -0
- package/dist/backend/agy-model-switch.js +62 -0
- package/dist/backend/agy-model-switch.js.map +1 -0
- package/dist/backend/antigravity.d.ts +9 -2
- package/dist/backend/antigravity.js +84 -9
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-code.d.ts +24 -7
- package/dist/backend/claude-code.js +206 -29
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/claude-transcript-errors.d.ts +4 -0
- package/dist/backend/claude-transcript-errors.js +5 -1
- package/dist/backend/claude-transcript-errors.js.map +1 -1
- package/dist/backend/cli-env-probe.js +1 -1
- package/dist/backend/cli-env-probe.js.map +1 -1
- package/dist/backend/cli-runtime-switch.d.ts +90 -0
- package/dist/backend/cli-runtime-switch.js +273 -0
- package/dist/backend/cli-runtime-switch.js.map +1 -0
- package/dist/backend/codex-footer-hints.d.ts +1 -0
- package/dist/backend/codex-footer-hints.js +15 -0
- package/dist/backend/codex-footer-hints.js.map +1 -1
- package/dist/backend/codex-model-switch.d.ts +41 -0
- package/dist/backend/codex-model-switch.js +170 -0
- package/dist/backend/codex-model-switch.js.map +1 -0
- package/dist/backend/codex-precaution.d.ts +7 -0
- package/dist/backend/codex-precaution.js +103 -0
- package/dist/backend/codex-precaution.js.map +1 -0
- package/dist/backend/codex.d.ts +7 -4
- package/dist/backend/codex.js +56 -10
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/credential-profile.js +1 -1
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/grok-model-switch.d.ts +16 -0
- package/dist/backend/grok-model-switch.js +45 -0
- package/dist/backend/grok-model-switch.js.map +1 -0
- package/dist/backend/grok.js +33 -7
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/kiro.js +10 -5
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/muse.d.ts +2 -0
- package/dist/backend/muse.js +7 -3
- package/dist/backend/muse.js.map +1 -1
- package/dist/backend/native-pane.js +1 -1
- package/dist/backend/native-pane.js.map +1 -1
- package/dist/backend/types.d.ts +29 -2
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +23 -16
- package/dist/backend-availability.js +73 -93
- package/dist/backend-availability.js.map +1 -1
- package/dist/backend-command.d.ts +4 -2
- package/dist/backend-command.js +3 -0
- package/dist/backend-command.js.map +1 -1
- package/dist/backend-signin-guide.js +1 -1
- package/dist/backend-signin-guide.js.map +1 -1
- package/dist/backend-version-static.d.ts +15 -0
- package/dist/backend-version-static.js +95 -0
- package/dist/backend-version-static.js.map +1 -0
- package/dist/browser-backend-signins.d.ts +1 -0
- package/dist/browser-backend-signins.js +3 -1
- package/dist/browser-backend-signins.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/adapters/discord.d.ts +10 -0
- package/dist/channel/adapters/discord.js +35 -0
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +2 -0
- package/dist/channel/adapters/telegram.js +6 -1
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/mcp-server.js +36 -4
- package/dist/channel/mcp-server.js.map +1 -1
- package/dist/channel/mcp-tools.d.ts +27 -1
- package/dist/channel/mcp-tools.js +88 -7
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/tool-router.d.ts +4 -0
- package/dist/channel/tool-router.js +50 -19
- package/dist/channel/tool-router.js.map +1 -1
- package/dist/channel/types.d.ts +10 -0
- package/dist/chat-task-refs.d.ts +61 -0
- package/dist/chat-task-refs.js +112 -0
- package/dist/chat-task-refs.js.map +1 -0
- package/dist/classic-channel-manager.d.ts +6 -2
- package/dist/classic-channel-manager.js +29 -4
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/classic-cli-guard.d.ts +66 -0
- package/dist/classic-cli-guard.js +209 -0
- package/dist/classic-cli-guard.js.map +1 -0
- package/dist/claude-credential-change.d.ts +22 -0
- package/dist/claude-credential-change.js +47 -0
- package/dist/claude-credential-change.js.map +1 -0
- package/dist/claude-credential-launch.d.ts +69 -0
- package/dist/claude-credential-launch.js +328 -0
- package/dist/claude-credential-launch.js.map +1 -0
- package/dist/claude-credential-runner.d.ts +1 -0
- package/dist/claude-credential-runner.js +58 -0
- package/dist/claude-credential-runner.js.map +1 -0
- package/dist/claude-credential-vault.d.ts +57 -0
- package/dist/claude-credential-vault.js +277 -0
- package/dist/claude-credential-vault.js.map +1 -0
- package/dist/claude-install-kind.d.ts +19 -0
- package/dist/claude-install-kind.js +54 -0
- package/dist/claude-install-kind.js.map +1 -0
- package/dist/claude-request-observation.d.ts +7 -0
- package/dist/claude-request-observation.js +26 -0
- package/dist/claude-request-observation.js.map +1 -0
- package/dist/claude-setup-token-transport.d.ts +9 -0
- package/dist/claude-setup-token-transport.js +104 -0
- package/dist/claude-setup-token-transport.js.map +1 -0
- package/dist/claude-setup-token.d.ts +51 -0
- package/dist/claude-setup-token.js +83 -0
- package/dist/claude-setup-token.js.map +1 -0
- package/dist/cli-audited.js +24 -17
- package/dist/cli-audited.js.map +1 -1
- package/dist/cli-capability.d.ts +3 -0
- package/dist/cli-capability.js.map +1 -1
- package/dist/cli-registry-check.js +1 -1
- package/dist/cli-registry-check.js.map +1 -1
- package/dist/cli-registry.d.ts +1 -0
- package/dist/cli-spec-antigravity.d.ts +1 -0
- package/dist/cli-spec-antigravity.js +3 -1
- package/dist/cli-spec-antigravity.js.map +1 -1
- package/dist/cli.js +8 -0
- package/dist/cli.js.map +1 -1
- package/dist/command-report.d.ts +11 -0
- package/dist/command-report.js +2 -0
- package/dist/command-report.js.map +1 -0
- package/dist/composite-tools.d.ts +11 -0
- package/dist/composite-tools.js +29 -0
- package/dist/composite-tools.js.map +1 -0
- package/dist/config-validator.js +52 -2
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +15 -2
- package/dist/config.js.map +1 -1
- package/dist/connect/control.d.ts +20 -0
- package/dist/connect/control.js +236 -0
- package/dist/connect/control.js.map +1 -0
- package/dist/connect/install.d.ts +13 -0
- package/dist/connect/install.js +12 -0
- package/dist/connect/install.js.map +1 -0
- package/dist/connect/mcp.d.ts +9 -0
- package/dist/connect/mcp.js +10 -0
- package/dist/connect/mcp.js.map +1 -0
- package/dist/connect/protocol.d.ts +38 -0
- package/dist/connect/protocol.js +36 -0
- package/dist/connect/protocol.js.map +1 -0
- package/dist/connect/service.d.ts +19 -0
- package/dist/connect/service.js +79 -0
- package/dist/connect/service.js.map +1 -0
- package/dist/connect/stdio-entry.d.ts +1 -0
- package/dist/connect/stdio-entry.js +6 -0
- package/dist/connect/stdio-entry.js.map +1 -0
- package/dist/connect/stdio.d.ts +5 -0
- package/dist/connect/stdio.js +33 -0
- package/dist/connect/stdio.js.map +1 -0
- package/dist/contact-auth-api.d.ts +17 -0
- package/dist/contact-auth-api.js +88 -0
- package/dist/contact-auth-api.js.map +1 -0
- package/dist/contact-auth-files.d.ts +6 -0
- package/dist/contact-auth-files.js +29 -0
- package/dist/contact-auth-files.js.map +1 -0
- package/dist/contact-auth-policy.d.ts +81 -0
- package/dist/contact-auth-policy.js +26 -0
- package/dist/contact-auth-policy.js.map +1 -0
- package/dist/contact-auth-service.d.ts +32 -0
- package/dist/contact-auth-service.js +101 -0
- package/dist/contact-auth-service.js.map +1 -0
- package/dist/contact-auth-store.d.ts +86 -0
- package/dist/contact-auth-store.js +372 -0
- package/dist/contact-auth-store.js.map +1 -0
- package/dist/contact-auth-types.d.ts +198 -0
- package/dist/contact-auth-types.js +7 -0
- package/dist/contact-auth-types.js.map +1 -0
- package/dist/daemon.d.ts +98 -3
- package/dist/daemon.js +673 -59
- package/dist/daemon.js.map +1 -1
- package/dist/darwin-memory.js +2 -1
- package/dist/darwin-memory.js.map +1 -1
- package/dist/dashboard-permissions.d.ts +15 -8
- package/dist/dashboard-permissions.js +25 -10
- package/dist/dashboard-permissions.js.map +1 -1
- package/dist/delivery-consumed-watch.js +3 -0
- package/dist/delivery-consumed-watch.js.map +1 -1
- package/dist/delivery-outbox.d.ts +6 -6
- package/dist/delivery-outbox.js +19 -25
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/delivery-outbox.test.js +132 -96
- package/dist/delivery-outbox.test.js.map +1 -1
- package/dist/dispatcher-liveness.d.ts +51 -1
- package/dist/dispatcher-liveness.js +94 -4
- package/dist/dispatcher-liveness.js.map +1 -1
- package/dist/event-log.d.ts +13 -1
- package/dist/event-log.js +41 -1
- package/dist/event-log.js.map +1 -1
- package/dist/fleet-context.d.ts +1 -0
- package/dist/fleet-level-config.d.ts +1 -1
- package/dist/fleet-level-config.js +1 -0
- package/dist/fleet-level-config.js.map +1 -1
- package/dist/fleet-manager.d.ts +505 -13
- package/dist/fleet-manager.js +3157 -263
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.d.ts +2 -2
- package/dist/fleet-windows-runtime.js +13 -4
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/fleet-yaml-stringify.d.ts +3 -0
- package/dist/fleet-yaml-stringify.js +132 -0
- package/dist/fleet-yaml-stringify.js.map +1 -0
- package/dist/general-knowledge/skills/concepts/SKILL.md +71 -4
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +23 -1
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +52 -0
- package/dist/general-knowledge/skills/fleet-config/SKILL.md +21 -1
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +18 -0
- package/dist/general-knowledge/skills/hub/SKILL.md +332 -27
- package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +5 -1
- package/dist/general-knowledge/skills/model-discovery/SKILL.md +7 -2
- package/dist/general-knowledge/skills/persona-emoji/SKILL.md +3 -0
- package/dist/general-knowledge/skills/task-board/SKILL.md +63 -0
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +29 -3
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +211 -40
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +6 -0
- package/dist/general-knowledge/steering/core-rules.md +15 -78
- package/dist/general-role-block.d.ts +19 -0
- package/dist/general-role-block.js +56 -0
- package/dist/general-role-block.js.map +1 -0
- 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/host-memory.d.ts +3 -0
- package/dist/host-memory.js.map +1 -1
- package/dist/host-monitoring/darwin/collector.d.ts +18 -0
- package/dist/host-monitoring/darwin/collector.js +65 -0
- package/dist/host-monitoring/darwin/collector.js.map +1 -0
- package/dist/host-monitoring/darwin/defaults.d.ts +2 -0
- package/dist/host-monitoring/darwin/defaults.js +9 -0
- package/dist/host-monitoring/darwin/defaults.js.map +1 -0
- package/dist/host-monitoring/darwin/interpretation.d.ts +20 -0
- package/dist/host-monitoring/darwin/interpretation.js +73 -0
- package/dist/host-monitoring/darwin/interpretation.js.map +1 -0
- package/dist/host-monitoring/linux/collector.d.ts +17 -0
- package/dist/host-monitoring/linux/collector.js +55 -0
- package/dist/host-monitoring/linux/collector.js.map +1 -0
- package/dist/host-monitoring/linux/defaults.d.ts +2 -0
- package/dist/host-monitoring/linux/defaults.js +9 -0
- package/dist/host-monitoring/linux/defaults.js.map +1 -0
- package/dist/host-monitoring/linux/interpretation.d.ts +22 -0
- package/dist/host-monitoring/linux/interpretation.js +76 -0
- package/dist/host-monitoring/linux/interpretation.js.map +1 -0
- package/dist/host-monitoring/transport.d.ts +42 -0
- package/dist/host-monitoring/transport.js +101 -0
- package/dist/host-monitoring/transport.js.map +1 -0
- package/dist/host-monitoring/wsl/collector.d.ts +19 -0
- package/dist/host-monitoring/wsl/collector.js +72 -0
- package/dist/host-monitoring/wsl/collector.js.map +1 -0
- package/dist/host-monitoring/wsl/defaults.d.ts +2 -0
- package/dist/host-monitoring/wsl/defaults.js +9 -0
- package/dist/host-monitoring/wsl/defaults.js.map +1 -0
- package/dist/host-monitoring/wsl/interpretation.d.ts +22 -0
- package/dist/host-monitoring/wsl/interpretation.js +77 -0
- package/dist/host-monitoring/wsl/interpretation.js.map +1 -0
- package/dist/host-monitoring-alert-policy.d.ts +73 -0
- package/dist/host-monitoring-alert-policy.js +152 -0
- package/dist/host-monitoring-alert-policy.js.map +1 -0
- package/dist/host-monitoring-alert-resources.d.ts +11 -0
- package/dist/host-monitoring-alert-resources.js +16 -0
- package/dist/host-monitoring-alert-resources.js.map +1 -0
- package/dist/host-monitoring-alert-settings.d.ts +16 -0
- package/dist/host-monitoring-alert-settings.js +68 -0
- package/dist/host-monitoring-alert-settings.js.map +1 -0
- package/dist/host-monitoring-alert-store.d.ts +49 -0
- package/dist/host-monitoring-alert-store.js +228 -0
- package/dist/host-monitoring-alert-store.js.map +1 -0
- package/dist/host-monitoring-alert-text.d.ts +7 -0
- package/dist/host-monitoring-alert-text.js +10 -0
- package/dist/host-monitoring-alert-text.js.map +1 -0
- package/dist/host-monitoring-alerts.d.ts +79 -0
- package/dist/host-monitoring-alerts.js +276 -0
- package/dist/host-monitoring-alerts.js.map +1 -0
- package/dist/host-monitoring-config.d.ts +15 -0
- package/dist/host-monitoring-config.js +36 -0
- package/dist/host-monitoring-config.js.map +1 -0
- package/dist/host-monitoring-defaults.d.ts +19 -0
- package/dist/host-monitoring-defaults.js +10 -0
- package/dist/host-monitoring-defaults.js.map +1 -0
- package/dist/host-monitoring-footprint-policy.d.ts +45 -0
- package/dist/host-monitoring-footprint-policy.js +150 -0
- package/dist/host-monitoring-footprint-policy.js.map +1 -0
- package/dist/host-monitoring-footprint.d.ts +42 -0
- package/dist/host-monitoring-footprint.js +169 -0
- package/dist/host-monitoring-footprint.js.map +1 -0
- package/dist/host-monitoring-history-files.d.ts +2 -0
- package/dist/host-monitoring-history-files.js +16 -0
- package/dist/host-monitoring-history-files.js.map +1 -0
- package/dist/host-monitoring-history-policy.d.ts +57 -0
- package/dist/host-monitoring-history-policy.js +107 -0
- package/dist/host-monitoring-history-policy.js.map +1 -0
- package/dist/host-monitoring-history-store.d.ts +52 -0
- package/dist/host-monitoring-history-store.js +178 -0
- package/dist/host-monitoring-history-store.js.map +1 -0
- package/dist/host-monitoring-history-worker.d.ts +1 -0
- package/dist/host-monitoring-history-worker.js +66 -0
- package/dist/host-monitoring-history-worker.js.map +1 -0
- package/dist/host-monitoring-history.d.ts +80 -0
- package/dist/host-monitoring-history.js +301 -0
- package/dist/host-monitoring-history.js.map +1 -0
- package/dist/host-monitoring-platform.d.ts +21 -0
- package/dist/host-monitoring-platform.js +18 -0
- package/dist/host-monitoring-platform.js.map +1 -0
- package/dist/host-monitoring-process-identity.d.ts +8 -0
- package/dist/host-monitoring-process-identity.js +81 -0
- package/dist/host-monitoring-process-identity.js.map +1 -0
- package/dist/host-monitoring-runtime.d.ts +42 -0
- package/dist/host-monitoring-runtime.js +95 -0
- package/dist/host-monitoring-runtime.js.map +1 -0
- package/dist/host-monitoring-settings-store.d.ts +5 -0
- package/dist/host-monitoring-settings-store.js +49 -0
- package/dist/host-monitoring-settings-store.js.map +1 -0
- package/dist/host-monitoring.d.ts +121 -0
- package/dist/host-monitoring.js +157 -0
- package/dist/host-monitoring.js.map +1 -0
- package/dist/hub/admin-dashboard.d.ts +85 -0
- package/dist/hub/admin-dashboard.js +177 -0
- package/dist/hub/admin-dashboard.js.map +1 -0
- package/dist/hub/agent-catalog-model.d.ts +297 -0
- package/dist/hub/agent-catalog-model.js +57 -0
- package/dist/hub/agent-catalog-model.js.map +1 -0
- package/dist/hub/agent-catalog.d.ts +140 -0
- package/dist/hub/agent-catalog.js +129 -0
- package/dist/hub/agent-catalog.js.map +1 -0
- package/dist/hub/agent-intro-model.d.ts +38 -0
- package/dist/hub/agent-intro-model.js +14 -0
- package/dist/hub/agent-intro-model.js.map +1 -0
- package/dist/hub/agent-intro-tool.d.ts +35 -0
- package/dist/hub/agent-intro-tool.js +83 -0
- package/dist/hub/agent-intro-tool.js.map +1 -0
- package/dist/hub/agent-intro.d.ts +31 -0
- package/dist/hub/agent-intro.js +51 -0
- package/dist/hub/agent-intro.js.map +1 -0
- package/dist/hub/attachments/store.d.ts +2 -0
- package/dist/hub/attachments/store.js +6 -0
- package/dist/hub/attachments/store.js.map +1 -1
- package/dist/hub/audit/index.d.ts +5 -1
- package/dist/hub/audit/index.js +43 -3
- package/dist/hub/audit/index.js.map +1 -1
- package/dist/hub/buttons.js +3 -1
- package/dist/hub/buttons.js.map +1 -1
- package/dist/hub/catalog.d.ts +19 -6
- package/dist/hub/catalog.js +89 -17
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/client.d.ts +16 -0
- package/dist/hub/client.js +135 -12
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +46 -5
- package/dist/hub/compose/member.js +344 -28
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +23 -0
- package/dist/hub/compose/server.js +128 -16
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/directory/directory.js +5 -2
- package/dist/hub/directory/directory.js.map +1 -1
- package/dist/hub/directory/types.d.ts +5 -1
- package/dist/hub/directory/types.js.map +1 -1
- package/dist/hub/display-name.d.ts +10 -0
- package/dist/hub/display-name.js +35 -0
- package/dist/hub/display-name.js.map +1 -0
- package/dist/hub/execution/service.d.ts +2 -1
- package/dist/hub/execution/service.js +2 -1
- package/dist/hub/execution/service.js.map +1 -1
- package/dist/hub/fleet-info.d.ts +12 -0
- package/dist/hub/fleet-info.js +14 -0
- package/dist/hub/fleet-info.js.map +1 -0
- package/dist/hub/fleet-update-model.d.ts +100 -0
- package/dist/hub/fleet-update-model.js +15 -0
- package/dist/hub/fleet-update-model.js.map +1 -0
- package/dist/hub/fleet-updates.d.ts +46 -0
- package/dist/hub/fleet-updates.js +282 -0
- package/dist/hub/fleet-updates.js.map +1 -0
- package/dist/hub/fleet-versions.d.ts +28 -0
- package/dist/hub/fleet-versions.js +80 -0
- package/dist/hub/fleet-versions.js.map +1 -0
- package/dist/hub/group-policy/admin-api.d.ts +1 -0
- package/dist/hub/group-policy/admin-api.js +10 -1
- package/dist/hub/group-policy/admin-api.js.map +1 -1
- package/dist/hub/group-policy/admin-control.d.ts +1 -0
- package/dist/hub/group-policy/admin-control.js +13 -4
- package/dist/hub/group-policy/admin-control.js.map +1 -1
- package/dist/hub/group-policy/admin-dto.d.ts +39 -1
- package/dist/hub/group-policy/admin-dto.js.map +1 -1
- package/dist/hub/group-policy/admin-facts.d.ts +4 -2
- package/dist/hub/group-policy/admin-facts.js +17 -2
- package/dist/hub/group-policy/admin-facts.js.map +1 -1
- package/dist/hub/group-policy/admin-impact.d.ts +36 -6
- package/dist/hub/group-policy/admin-impact.js +21 -7
- package/dist/hub/group-policy/admin-impact.js.map +1 -1
- package/dist/hub/group-policy/admin-inventory.d.ts +2 -0
- package/dist/hub/group-policy/admin-inventory.js +13 -4
- package/dist/hub/group-policy/admin-inventory.js.map +1 -1
- package/dist/hub/group-policy/admin-search.d.ts +2 -1
- package/dist/hub/group-policy/admin-search.js +56 -7
- package/dist/hub/group-policy/admin-search.js.map +1 -1
- package/dist/hub/group-policy/authorization.d.ts +2 -0
- package/dist/hub/group-policy/authorization.js +7 -2
- package/dist/hub/group-policy/authorization.js.map +1 -1
- package/dist/hub/group-policy/impact-inventory.d.ts +4 -1
- package/dist/hub/group-policy/impact-inventory.js +23 -2
- package/dist/hub/group-policy/impact-inventory.js.map +1 -1
- package/dist/hub/group-policy/model.d.ts +52 -1
- package/dist/hub/group-policy/model.js +20 -7
- package/dist/hub/group-policy/model.js.map +1 -1
- package/dist/hub/group-policy/resources.d.ts +2 -0
- package/dist/hub/group-policy/resources.js +12 -1
- package/dist/hub/group-policy/resources.js.map +1 -1
- package/dist/hub/group-policy/store.js +22 -3
- package/dist/hub/group-policy/store.js.map +1 -1
- package/dist/hub/group-policy/team-subjects.d.ts +16 -0
- package/dist/hub/group-policy/team-subjects.js +32 -0
- package/dist/hub/group-policy/team-subjects.js.map +1 -0
- package/dist/hub/http/compose.d.ts +12 -0
- package/dist/hub/http/compose.js +633 -45
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/core.js +32 -2
- package/dist/hub/http/core.js.map +1 -1
- package/dist/hub/http/deps.d.ts +19 -0
- package/dist/hub/http/schema.js +44 -1
- package/dist/hub/http/schema.js.map +1 -1
- package/dist/hub/invitations.js +15 -7
- package/dist/hub/invitations.js.map +1 -1
- package/dist/hub/join/client.js +75 -42
- package/dist/hub/join/client.js.map +1 -1
- package/dist/hub/join/service.d.ts +1 -1
- package/dist/hub/join/service.js.map +1 -1
- package/dist/hub/lapse-carry.d.ts +45 -0
- package/dist/hub/lapse-carry.js +62 -0
- package/dist/hub/lapse-carry.js.map +1 -0
- package/dist/hub/mcp/auth-schema.d.ts +7 -0
- package/dist/hub/mcp/auth-schema.js +31 -0
- package/dist/hub/mcp/auth-schema.js.map +1 -0
- package/dist/hub/mcp/auth.d.ts +89 -0
- package/dist/hub/mcp/auth.js +374 -0
- package/dist/hub/mcp/auth.js.map +1 -0
- package/dist/hub/mcp/catalog.d.ts +44 -0
- package/dist/hub/mcp/catalog.js +31 -0
- package/dist/hub/mcp/catalog.js.map +1 -0
- package/dist/hub/mcp/door-schema.d.ts +7 -0
- package/dist/hub/mcp/door-schema.js +20 -0
- package/dist/hub/mcp/door-schema.js.map +1 -0
- package/dist/hub/mcp/http.d.ts +25 -0
- package/dist/hub/mcp/http.js +259 -0
- package/dist/hub/mcp/http.js.map +1 -0
- package/dist/hub/mcp/policy.d.ts +65 -0
- package/dist/hub/mcp/policy.js +153 -0
- package/dist/hub/mcp/policy.js.map +1 -0
- package/dist/hub/mcp/server.d.ts +3 -0
- package/dist/hub/mcp/server.js +32 -0
- package/dist/hub/mcp/server.js.map +1 -0
- package/dist/hub/mcp/tools.d.ts +31 -0
- package/dist/hub/mcp/tools.js +177 -0
- package/dist/hub/mcp/tools.js.map +1 -0
- package/dist/hub/member/agent-catalog.d.ts +31 -0
- package/dist/hub/member/agent-catalog.js +91 -0
- package/dist/hub/member/agent-catalog.js.map +1 -0
- package/dist/hub/member/agent-intro.d.ts +29 -0
- package/dist/hub/member/agent-intro.js +73 -0
- package/dist/hub/member/agent-intro.js.map +1 -0
- package/dist/hub/member/display-name.d.ts +9 -0
- package/dist/hub/member/display-name.js +71 -0
- package/dist/hub/member/display-name.js.map +1 -0
- package/dist/hub/member/exposure-api.d.ts +11 -3
- package/dist/hub/member/exposure-api.js +24 -10
- package/dist/hub/member/exposure-api.js.map +1 -1
- package/dist/hub/member/exposures.d.ts +16 -4
- package/dist/hub/member/exposures.js +47 -13
- package/dist/hub/member/exposures.js.map +1 -1
- package/dist/hub/member/pairing-api.js +3 -2
- package/dist/hub/member/pairing-api.js.map +1 -1
- package/dist/hub/member/recommendations.d.ts +37 -0
- package/dist/hub/member/recommendations.js +129 -0
- package/dist/hub/member/recommendations.js.map +1 -0
- package/dist/hub/member/room-ask.d.ts +78 -5
- package/dist/hub/member/room-ask.js +337 -26
- package/dist/hub/member/room-ask.js.map +1 -1
- package/dist/hub/member/room-context-budget.d.ts +5 -0
- package/dist/hub/member/room-context-budget.js +34 -0
- package/dist/hub/member/room-context-budget.js.map +1 -0
- package/dist/hub/member/room-mention-feedback.d.ts +44 -0
- package/dist/hub/member/room-mention-feedback.js +121 -0
- package/dist/hub/member/room-mention-feedback.js.map +1 -0
- package/dist/hub/member/room-notification.d.ts +9 -0
- package/dist/hub/member/room-notification.js +2 -0
- package/dist/hub/member/room-notification.js.map +1 -0
- package/dist/hub/member/room-post-answers.d.ts +46 -0
- package/dist/hub/member/room-post-answers.js +152 -0
- package/dist/hub/member/room-post-answers.js.map +1 -0
- package/dist/hub/member/room-post-receipt.d.ts +21 -0
- package/dist/hub/member/room-post-receipt.js +49 -0
- package/dist/hub/member/room-post-receipt.js.map +1 -0
- package/dist/hub/member/room-post.d.ts +134 -0
- package/dist/hub/member/room-post.js +267 -0
- package/dist/hub/member/room-post.js.map +1 -0
- package/dist/hub/member/sharing-journal.d.ts +252 -0
- package/dist/hub/member/sharing-journal.js +212 -0
- package/dist/hub/member/sharing-journal.js.map +1 -0
- package/dist/hub/member/sharing-link.d.ts +25 -0
- package/dist/hub/member/sharing-link.js +68 -0
- package/dist/hub/member/sharing-link.js.map +1 -0
- package/dist/hub/member/sharing-result.d.ts +6 -0
- package/dist/hub/member/sharing-result.js +46 -0
- package/dist/hub/member/sharing-result.js.map +1 -0
- package/dist/hub/member/sharing.d.ts +39 -0
- package/dist/hub/member/sharing.js +188 -0
- package/dist/hub/member/sharing.js.map +1 -0
- package/dist/hub/member/updates.d.ts +92 -0
- package/dist/hub/member/updates.js +316 -0
- package/dist/hub/member/updates.js.map +1 -0
- package/dist/hub/pairing.d.ts +15 -1
- package/dist/hub/pairing.js +33 -2
- package/dist/hub/pairing.js.map +1 -1
- package/dist/hub/personal/owner-host.d.ts +146 -0
- package/dist/hub/personal/owner-host.js +289 -0
- package/dist/hub/personal/owner-host.js.map +1 -0
- package/dist/hub/personal/refusals.d.ts +11 -0
- package/dist/hub/personal/refusals.js +33 -0
- package/dist/hub/personal/refusals.js.map +1 -0
- package/dist/hub/personal/runtime-host.d.ts +26 -0
- package/dist/hub/personal/runtime-host.js +51 -0
- package/dist/hub/personal/runtime-host.js.map +1 -0
- package/dist/hub/personal/schema.d.ts +4 -0
- package/dist/hub/personal/schema.js +54 -0
- package/dist/hub/personal/schema.js.map +1 -0
- package/dist/hub/personal/turns.d.ts +39 -0
- package/dist/hub/personal/turns.js +221 -0
- package/dist/hub/personal/turns.js.map +1 -0
- package/dist/hub/personal/types.d.ts +42 -0
- package/dist/hub/personal/types.js +2 -0
- package/dist/hub/personal/types.js.map +1 -0
- package/dist/hub/policy.d.ts +1 -1
- package/dist/hub/policy.js +2 -0
- package/dist/hub/policy.js.map +1 -1
- package/dist/hub/protocol.d.ts +1101 -5
- package/dist/hub/protocol.js +111 -14
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/published-version.d.ts +3 -0
- package/dist/hub/published-version.js +35 -0
- package/dist/hub/published-version.js.map +1 -0
- package/dist/hub/quota.js +3 -1
- package/dist/hub/quota.js.map +1 -1
- package/dist/hub/recommendation-model.d.ts +36 -0
- package/dist/hub/recommendation-model.js +9 -0
- package/dist/hub/recommendation-model.js.map +1 -0
- package/dist/hub/recommendations.d.ts +58 -0
- package/dist/hub/recommendations.js +211 -0
- package/dist/hub/recommendations.js.map +1 -0
- package/dist/hub/representative.d.ts +5 -0
- package/dist/hub/representative.js +6 -1
- package/dist/hub/representative.js.map +1 -1
- package/dist/hub/roles/admin-control.d.ts +29 -0
- package/dist/hub/roles/admin-control.js +187 -0
- package/dist/hub/roles/admin-control.js.map +1 -0
- package/dist/hub/roles/admin-types.d.ts +72 -0
- package/dist/hub/roles/admin-types.js +2 -0
- package/dist/hub/roles/admin-types.js.map +1 -0
- package/dist/hub/roles/allowed-list-control.d.ts +34 -0
- package/dist/hub/roles/allowed-list-control.js +179 -0
- package/dist/hub/roles/allowed-list-control.js.map +1 -0
- package/dist/hub/roles/allowed-list.d.ts +8 -0
- package/dist/hub/roles/allowed-list.js +49 -0
- package/dist/hub/roles/allowed-list.js.map +1 -0
- package/dist/hub/roles/audit-details.d.ts +144 -0
- package/dist/hub/roles/audit-details.js +26 -0
- package/dist/hub/roles/audit-details.js.map +1 -0
- package/dist/hub/roles/authority.d.ts +12 -0
- package/dist/hub/roles/authority.js +39 -3
- package/dist/hub/roles/authority.js.map +1 -1
- package/dist/hub/roles/change.d.ts +3 -1
- package/dist/hub/roles/change.js +7 -2
- package/dist/hub/roles/change.js.map +1 -1
- package/dist/hub/roles/clock.d.ts +3 -0
- package/dist/hub/roles/clock.js +1 -1
- package/dist/hub/roles/clock.js.map +1 -1
- package/dist/hub/roles/convert.js +1 -1
- package/dist/hub/roles/convert.js.map +1 -1
- package/dist/hub/roles/cutover-inventory.d.ts +5 -0
- package/dist/hub/roles/cutover-inventory.js +27 -4
- package/dist/hub/roles/cutover-inventory.js.map +1 -1
- package/dist/hub/roles/cutover-marker.d.ts +18 -2
- package/dist/hub/roles/cutover-marker.js +6 -2
- package/dist/hub/roles/cutover-marker.js.map +1 -1
- package/dist/hub/roles/cutover.d.ts +2 -2
- package/dist/hub/roles/cutover.js +3 -4
- package/dist/hub/roles/cutover.js.map +1 -1
- package/dist/hub/roles/delegation.d.ts +4 -1
- package/dist/hub/roles/delegation.js +7 -2
- package/dist/hub/roles/delegation.js.map +1 -1
- package/dist/hub/roles/evaluate.d.ts +2 -1
- package/dist/hub/roles/evaluate.js +14 -0
- package/dist/hub/roles/evaluate.js.map +1 -1
- package/dist/hub/roles/expiry-effects.d.ts +8 -0
- package/dist/hub/roles/expiry-effects.js +50 -0
- package/dist/hub/roles/expiry-effects.js.map +1 -0
- package/dist/hub/roles/migrations.d.ts +7 -0
- package/dist/hub/roles/migrations.js +44 -0
- package/dist/hub/roles/migrations.js.map +1 -0
- package/dist/hub/roles/model.d.ts +25 -0
- package/dist/hub/roles/model.js +9 -3
- package/dist/hub/roles/model.js.map +1 -1
- package/dist/hub/roles/overview.d.ts +8 -0
- package/dist/hub/roles/overview.js +15 -0
- package/dist/hub/roles/overview.js.map +1 -0
- package/dist/hub/roles/resource-effects.d.ts +17 -0
- package/dist/hub/roles/resource-effects.js +62 -0
- package/dist/hub/roles/resource-effects.js.map +1 -0
- package/dist/hub/roles/review.d.ts +16 -0
- package/dist/hub/roles/review.js +42 -0
- package/dist/hub/roles/review.js.map +1 -0
- package/dist/hub/roles/writer.d.ts +14 -3
- package/dist/hub/roles/writer.js +64 -16
- package/dist/hub/roles/writer.js.map +1 -1
- package/dist/hub/room-agent-discovery-model.d.ts +29 -0
- package/dist/hub/room-agent-discovery-model.js +33 -0
- package/dist/hub/room-agent-discovery-model.js.map +1 -0
- package/dist/hub/room-agent-discovery.d.ts +14 -0
- package/dist/hub/room-agent-discovery.js +65 -0
- package/dist/hub/room-agent-discovery.js.map +1 -0
- package/dist/hub/room-agent-requests.d.ts +71 -0
- package/dist/hub/room-agent-requests.js +377 -0
- package/dist/hub/room-agent-requests.js.map +1 -0
- package/dist/hub/room-answer-status-model.d.ts +3 -0
- package/dist/hub/room-answer-status-model.js +4 -0
- package/dist/hub/room-answer-status-model.js.map +1 -0
- package/dist/hub/room-brief-model.d.ts +30 -0
- package/dist/hub/room-brief-model.js +38 -0
- package/dist/hub/room-brief-model.js.map +1 -0
- package/dist/hub/room-context-model.d.ts +45 -0
- package/dist/hub/room-context-model.js +12 -0
- package/dist/hub/room-context-model.js.map +1 -0
- package/dist/hub/room-members-model.d.ts +63 -0
- package/dist/hub/room-members-model.js +7 -0
- package/dist/hub/room-members-model.js.map +1 -0
- package/dist/hub/room-mention-feedback-model.d.ts +12 -0
- package/dist/hub/room-mention-feedback-model.js +12 -0
- package/dist/hub/room-mention-feedback-model.js.map +1 -0
- package/dist/hub/rooms/agents.d.ts +47 -10
- package/dist/hub/rooms/agents.js +344 -32
- package/dist/hub/rooms/agents.js.map +1 -1
- package/dist/hub/rooms/assistant.d.ts +1 -6
- package/dist/hub/rooms/assistant.js +7 -2
- package/dist/hub/rooms/assistant.js.map +1 -1
- package/dist/hub/rooms/automation.d.ts +24 -0
- package/dist/hub/rooms/automation.js +66 -0
- package/dist/hub/rooms/automation.js.map +1 -0
- package/dist/hub/rooms/brief.d.ts +18 -0
- package/dist/hub/rooms/brief.js +39 -0
- package/dist/hub/rooms/brief.js.map +1 -0
- package/dist/hub/rooms/buttons.d.ts +85 -0
- package/dist/hub/rooms/buttons.js +62 -0
- package/dist/hub/rooms/buttons.js.map +1 -0
- package/dist/hub/rooms/context-cursor.d.ts +18 -0
- package/dist/hub/rooms/context-cursor.js +61 -0
- package/dist/hub/rooms/context-cursor.js.map +1 -0
- package/dist/hub/rooms/context.d.ts +1 -1
- package/dist/hub/rooms/context.js +4 -4
- package/dist/hub/rooms/context.js.map +1 -1
- package/dist/hub/rooms/direct-view.d.ts +10 -2
- package/dist/hub/rooms/direct-view.js +4 -4
- package/dist/hub/rooms/direct-view.js.map +1 -1
- package/dist/hub/rooms/directory.d.ts +13 -0
- package/dist/hub/rooms/directory.js +12 -3
- package/dist/hub/rooms/directory.js.map +1 -1
- package/dist/hub/rooms/members-page.d.ts +33 -0
- package/dist/hub/rooms/members-page.js +37 -0
- package/dist/hub/rooms/members-page.js.map +1 -0
- package/dist/hub/rooms/mentions.d.ts +15 -0
- package/dist/hub/rooms/mentions.js +43 -0
- package/dist/hub/rooms/mentions.js.map +1 -0
- package/dist/hub/rooms/office.d.ts +114 -0
- package/dist/hub/rooms/office.js +71 -0
- package/dist/hub/rooms/office.js.map +1 -0
- package/dist/hub/rooms/post-replies.d.ts +23 -0
- package/dist/hub/rooms/post-replies.js +114 -0
- package/dist/hub/rooms/post-replies.js.map +1 -0
- package/dist/hub/rooms/purpose.d.ts +7 -0
- package/dist/hub/rooms/purpose.js +14 -0
- package/dist/hub/rooms/purpose.js.map +1 -0
- package/dist/hub/rooms/schema.d.ts +14 -0
- package/dist/hub/rooms/schema.js +52 -0
- package/dist/hub/rooms/schema.js.map +1 -1
- package/dist/hub/rooms/service.d.ts +341 -6
- package/dist/hub/rooms/service.js +1022 -47
- package/dist/hub/rooms/service.js.map +1 -1
- package/dist/hub/rooms/types.d.ts +43 -4
- package/dist/hub/rooms.d.ts +13 -2
- package/dist/hub/rooms.js +97 -22
- package/dist/hub/rooms.js.map +1 -1
- package/dist/hub/runtime.d.ts +1 -1
- package/dist/hub/runtime.js +17 -4
- package/dist/hub/runtime.js.map +1 -1
- package/dist/hub/server.d.ts +8 -1
- package/dist/hub/server.js +148 -7
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/session-directory-transition.d.ts +2 -1
- package/dist/hub/session-directory-transition.js +10 -3
- package/dist/hub/session-directory-transition.js.map +1 -1
- package/dist/hub/sessions.d.ts +1 -1
- package/dist/hub/sessions.js +26 -4
- package/dist/hub/sessions.js.map +1 -1
- package/dist/hub/settings-commit.d.ts +32 -1
- package/dist/hub/settings-commit.js +11 -4
- package/dist/hub/settings-commit.js.map +1 -1
- package/dist/hub/settings-directory-ca.js +1 -1
- package/dist/hub/settings-directory-ca.js.map +1 -1
- package/dist/hub/settings-directory-control.js +7 -7
- package/dist/hub/settings-directory-control.js.map +1 -1
- package/dist/hub/settings-directory-http.d.ts +2 -0
- package/dist/hub/settings-directory-http.js +21 -6
- package/dist/hub/settings-directory-http.js.map +1 -1
- package/dist/hub/settings-directory-proof.d.ts +5 -1
- package/dist/hub/settings-directory-proof.js +49 -10
- package/dist/hub/settings-directory-proof.js.map +1 -1
- package/dist/hub/settings-directory-recovery.js +2 -1
- package/dist/hub/settings-directory-recovery.js.map +1 -1
- package/dist/hub/settings-directory-save.d.ts +2 -0
- package/dist/hub/settings-directory-save.js +9 -6
- package/dist/hub/settings-directory-save.js.map +1 -1
- package/dist/hub/sharing-previous-access.d.ts +22 -0
- package/dist/hub/sharing-previous-access.js +93 -0
- package/dist/hub/sharing-previous-access.js.map +1 -0
- package/dist/hub/sharing-requests.d.ts +174 -0
- package/dist/hub/sharing-requests.js +326 -0
- package/dist/hub/sharing-requests.js.map +1 -0
- package/dist/hub/sharing-retention.d.ts +47 -0
- package/dist/hub/sharing-retention.js +83 -0
- package/dist/hub/sharing-retention.js.map +1 -0
- package/dist/hub/sharing-withdrawal.d.ts +14 -0
- package/dist/hub/sharing-withdrawal.js +28 -0
- package/dist/hub/sharing-withdrawal.js.map +1 -0
- package/dist/hub/sharing.js +2 -2
- package/dist/hub/sharing.js.map +1 -1
- package/dist/hub/socket.d.ts +1 -0
- package/dist/hub/socket.js +39 -2
- package/dist/hub/socket.js.map +1 -1
- package/dist/hub/teams/index.d.ts +8 -3
- package/dist/hub/teams/index.js +106 -31
- package/dist/hub/teams/index.js.map +1 -1
- package/dist/hub/teams/store.d.ts +5 -1
- package/dist/hub/teams/store.js +25 -2
- package/dist/hub/teams/store.js.map +1 -1
- package/dist/hub/teams/types.d.ts +19 -2
- package/dist/hub/types.d.ts +167 -5
- package/dist/hub-classic-private.d.ts +19 -0
- package/dist/hub-classic-private.js +64 -0
- package/dist/hub-classic-private.js.map +1 -0
- package/dist/hub-contact-windows.d.ts +11 -0
- package/dist/hub-contact-windows.js +56 -0
- package/dist/hub-contact-windows.js.map +1 -0
- package/dist/hub-page-sharing-settings.d.ts +6 -0
- package/dist/hub-page-sharing-settings.js +19 -0
- package/dist/hub-page-sharing-settings.js.map +1 -0
- package/dist/hub-pairing-summary.d.ts +1 -1
- package/dist/hub-room-conversation.d.ts +14 -0
- package/dist/hub-room-conversation.js +60 -0
- package/dist/hub-room-conversation.js.map +1 -0
- package/dist/hub-room-reply-warning.d.ts +2 -0
- package/dist/hub-room-reply-warning.js +16 -0
- package/dist/hub-room-reply-warning.js.map +1 -0
- package/dist/hub-sharing-notice.d.ts +43 -0
- package/dist/hub-sharing-notice.js +34 -0
- package/dist/hub-sharing-notice.js.map +1 -0
- package/dist/hub-update-notice.d.ts +12 -0
- package/dist/hub-update-notice.js +35 -0
- package/dist/hub-update-notice.js.map +1 -0
- package/dist/human-delivery-receipts.js +8 -0
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/instance-config-impact.js +5 -2
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +21 -1
- package/dist/instance-lifecycle.js +55 -14
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instruction-file-sizes.d.ts +46 -0
- package/dist/instruction-file-sizes.js +115 -0
- package/dist/instruction-file-sizes.js.map +1 -0
- package/dist/instructions.d.ts +35 -1
- package/dist/instructions.js +63 -33
- package/dist/instructions.js.map +1 -1
- package/dist/locale.d.ts +2 -0
- package/dist/locale.js +283 -32
- package/dist/locale.js.map +1 -1
- package/dist/log-steps.d.ts +5 -0
- package/dist/log-steps.js +6 -2
- package/dist/log-steps.js.map +1 -1
- package/dist/login-controller.d.ts +45 -2
- package/dist/login-controller.js +98 -10
- package/dist/login-controller.js.map +1 -1
- package/dist/login-flows.js +1 -1
- package/dist/login-flows.js.map +1 -1
- package/dist/memory-guidance.d.ts +5 -0
- package/dist/memory-guidance.js +14 -0
- package/dist/memory-guidance.js.map +1 -0
- package/dist/model-defaults.d.ts +5 -0
- package/dist/model-defaults.js +6 -0
- package/dist/model-defaults.js.map +1 -0
- package/dist/native-mcp.d.ts +2 -0
- package/dist/native-mcp.js +23 -11
- package/dist/native-mcp.js.map +1 -1
- package/dist/native-model-catalog.d.ts +15 -0
- package/dist/native-model-catalog.js +43 -3
- package/dist/native-model-catalog.js.map +1 -1
- package/dist/native-pane-lifecycle.js +3 -2
- package/dist/native-pane-lifecycle.js.map +1 -1
- package/dist/native-pane-tools.js +3 -0
- package/dist/native-pane-tools.js.map +1 -1
- package/dist/needs-you-hub.d.ts +4 -0
- package/dist/needs-you-hub.js +17 -2
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +36 -2
- package/dist/needs-you.js +16 -0
- package/dist/needs-you.js.map +1 -1
- package/dist/office-share-page.js +4 -4
- package/dist/office-share-page.js.map +1 -1
- package/dist/outbound-handlers.d.ts +24 -4
- package/dist/outbound-handlers.js +115 -11
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +30 -0
- package/dist/outbound-schemas.js +42 -25
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/pane-port.d.ts +2 -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/profile-signins.d.ts +1 -0
- package/dist/profile-signins.js +3 -1
- package/dist/profile-signins.js.map +1 -1
- package/dist/public-web-gateway.d.ts +20 -0
- package/dist/public-web-gateway.js +232 -9
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +21 -2
- package/dist/public-web-link.js +22 -2
- package/dist/public-web-link.js.map +1 -1
- package/dist/queued-handoffs.d.ts +16 -4
- package/dist/queued-handoffs.js +18 -1
- package/dist/queued-handoffs.js.map +1 -1
- package/dist/quickstart-api.d.ts +0 -1
- package/dist/quickstart-api.js +8 -1
- package/dist/quickstart-api.js.map +1 -1
- package/dist/quickstart.d.ts +1 -1
- package/dist/quickstart.js +2 -3
- package/dist/quickstart.js.map +1 -1
- package/dist/remote-card-answer.d.ts +1 -1
- package/dist/remote-card-answer.js +8 -1
- package/dist/remote-card-answer.js.map +1 -1
- package/dist/remote-card-prompt.d.ts +1 -0
- package/dist/remote-card-prompt.js +2 -2
- package/dist/remote-card-prompt.js.map +1 -1
- package/dist/reply-dedup.js +3 -1
- package/dist/reply-dedup.js.map +1 -1
- package/dist/reply-preview-files.d.ts +38 -0
- package/dist/reply-preview-files.js +142 -0
- package/dist/reply-preview-files.js.map +1 -0
- package/dist/reply-preview-spec.d.ts +18 -0
- package/dist/reply-preview-spec.js +27 -0
- package/dist/reply-preview-spec.js.map +1 -0
- package/dist/restart-progress.d.ts +6 -0
- package/dist/restart-progress.js +5 -0
- package/dist/restart-progress.js.map +1 -1
- package/dist/runtime-api.js +10 -2
- package/dist/runtime-api.js.map +1 -1
- package/dist/runtime-build-info.js +2 -1
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-cli-install.js +18 -14
- package/dist/runtime-cli-install.js.map +1 -1
- package/dist/runtime-cli.js +31 -5
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client-store.d.ts +5 -0
- package/dist/runtime-client-store.js +28 -0
- package/dist/runtime-client-store.js.map +1 -1
- package/dist/runtime-client.d.ts +4 -0
- package/dist/runtime-client.js +33 -10
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-coordinator.d.ts +4 -2
- package/dist/runtime-coordinator.js +33 -6
- package/dist/runtime-coordinator.js.map +1 -1
- package/dist/runtime-install.d.ts +6 -1
- package/dist/runtime-install.js +12 -4
- package/dist/runtime-install.js.map +1 -1
- package/dist/runtime-pane-mcp.js +7 -3
- package/dist/runtime-pane-mcp.js.map +1 -1
- package/dist/runtime-pane-native.js +5 -2
- package/dist/runtime-pane-native.js.map +1 -1
- package/dist/runtime-personal-answer-only-probe.d.ts +3 -0
- package/dist/runtime-personal-answer-only-probe.js +134 -0
- package/dist/runtime-personal-answer-only-probe.js.map +1 -0
- package/dist/runtime-personal-answer-only.d.ts +16 -0
- package/dist/runtime-personal-answer-only.js +54 -0
- package/dist/runtime-personal-answer-only.js.map +1 -0
- package/dist/runtime-personal-answer.d.ts +30 -0
- package/dist/runtime-personal-answer.js +124 -0
- package/dist/runtime-personal-answer.js.map +1 -0
- package/dist/runtime-personal-preflight.d.ts +8 -0
- package/dist/runtime-personal-preflight.js +103 -0
- package/dist/runtime-personal-preflight.js.map +1 -0
- package/dist/runtime-personal-profile.d.ts +40 -0
- package/dist/runtime-personal-profile.js +81 -0
- package/dist/runtime-personal-profile.js.map +1 -0
- package/dist/runtime-personal-protocol.d.ts +10 -0
- package/dist/runtime-personal-protocol.js +15 -0
- package/dist/runtime-personal-protocol.js.map +1 -0
- package/dist/runtime-personal-stage.d.ts +37 -0
- package/dist/runtime-personal-stage.js +167 -0
- package/dist/runtime-personal-stage.js.map +1 -0
- package/dist/runtime-protocol.d.ts +2 -0
- package/dist/scheduler/db.js +2 -0
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/task-board-mentions.d.ts +32 -0
- package/dist/scheduler/task-board-mentions.js +97 -0
- package/dist/scheduler/task-board-mentions.js.map +1 -0
- package/dist/scheduler/task-board-text.js +3 -0
- package/dist/scheduler/task-board-text.js.map +1 -1
- package/dist/scheduler/task-board.d.ts +199 -3
- package/dist/scheduler/task-board.js +492 -7
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/settings-api.d.ts +36 -1
- package/dist/settings-api.js +525 -96
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +4 -0
- package/dist/settings-baseline.js +7 -5
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-change.js +47 -7
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.d.ts +7 -0
- package/dist/settings-effect.js +80 -5
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.js +18 -44
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-instance-patch.js +3 -1
- package/dist/settings-instance-patch.js.map +1 -1
- package/dist/setup-form.js +10 -0
- package/dist/setup-form.js.map +1 -1
- package/dist/setup-host.d.ts +2 -3
- package/dist/setup-host.js +3 -5
- package/dist/setup-host.js.map +1 -1
- package/dist/setup-i18n.js +2 -2
- package/dist/setup-i18n.js.map +1 -1
- package/dist/setup-wizard.js +0 -2
- package/dist/setup-wizard.js.map +1 -1
- package/dist/shared-default-adoption.d.ts +24 -0
- package/dist/shared-default-adoption.js +73 -0
- package/dist/shared-default-adoption.js.map +1 -0
- package/dist/subagent-records.d.ts +2 -0
- package/dist/subagent-records.js +64 -12
- package/dist/subagent-records.js.map +1 -1
- package/dist/subagent-service.d.ts +3 -0
- package/dist/subagent-service.js +27 -5
- package/dist/subagent-service.js.map +1 -1
- package/dist/task-board-tool.d.ts +31 -0
- package/dist/task-board-tool.js +31 -0
- package/dist/task-board-tool.js.map +1 -1
- package/dist/task-board-waker.d.ts +23 -30
- package/dist/task-board-waker.js +136 -97
- package/dist/task-board-waker.js.map +1 -1
- package/dist/tmux-manager.d.ts +2 -0
- package/dist/tmux-manager.js +2 -0
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tool-permissions.js +3 -0
- package/dist/tool-permissions.js.map +1 -1
- package/dist/tool-progress.d.ts +9 -0
- package/dist/tool-progress.js +141 -32
- package/dist/tool-progress.js.map +1 -1
- package/dist/topic-commands.d.ts +7 -1
- package/dist/topic-commands.js +103 -91
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-monitor.d.ts +1 -0
- package/dist/transcript-monitor.js +18 -0
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/tunnel/lease.d.ts +14 -0
- package/dist/tunnel/lease.js +23 -0
- package/dist/tunnel/lease.js.map +1 -1
- package/dist/turn-reply-guard.d.ts +2 -2
- package/dist/turn-reply-guard.js +3 -3
- package/dist/turn-reply-guard.js.map +1 -1
- package/dist/types.d.ts +37 -2
- package/dist/ui/accounts-keepalive.js +2 -1
- package/dist/ui/accounts-view.js +18 -9
- package/dist/ui/agent-details-settings.js +9 -7
- package/dist/ui/agent-export-dialog.js +4 -3
- package/dist/ui/agent-export-strings.js +4 -4
- package/dist/ui/agent-page-strings.js +18 -0
- package/dist/ui/backend-signin.js +94 -23
- package/dist/ui/chat-activity-groups.js +42 -9
- package/dist/ui/chat-activity.js +22 -3
- package/dist/ui/chat-commands.js +2 -0
- package/dist/ui/chat-mentions.js +13 -0
- package/dist/ui/chat-msg-actions.js +3 -222
- package/dist/ui/chat-pins.js +106 -0
- package/dist/ui/chat-popout-header.js +2 -2
- package/dist/ui/chat-popout-transport.js +49 -19
- package/dist/ui/chat-popout.js +15 -1
- package/dist/ui/chat-quote.js +3 -261
- package/dist/ui/chat-store.js +178 -16
- package/dist/ui/chat-task-ref-strings.js +24 -0
- package/dist/ui/chat-task-refs.js +131 -0
- package/dist/ui/chat-tour.js +1 -1
- package/dist/ui/chat-workspace.js +3 -3
- package/dist/ui/claude-credentials.js +123 -0
- package/dist/ui/claude-setup-token.js +36 -0
- package/dist/ui/contact-auth-client.js +55 -0
- package/dist/ui/contact-auth-strings.js +256 -0
- package/dist/ui/contact-authorizations.js +139 -0
- package/dist/ui/contact-grant-editor.js +50 -0
- package/dist/ui/contact-needs.js +100 -0
- package/dist/ui/contact-permissions.js +251 -0
- package/dist/ui/contact-ticket-badge.js +54 -0
- package/dist/ui/contact-tool-groups.js +39 -0
- package/dist/ui/fleet-canvas.js +19 -7
- package/dist/ui/fleet-office-card.js +431 -41
- package/dist/ui/fleet-office-carousel.d.ts +14 -0
- package/dist/ui/fleet-office-carousel.js +95 -0
- package/dist/ui/fleet-office-dialogue.js +3 -3
- package/dist/ui/fleet-office-editor.js +6 -1
- package/dist/ui/fleet-office-model.js +2 -1
- package/dist/ui/fleet-office-pack.d.ts +68 -1
- package/dist/ui/fleet-office-pack.js +418 -20
- package/dist/ui/fleet-office-play.js +491 -0
- package/dist/ui/fleet-office-skin.js +249 -33
- package/dist/ui/fleet-office-store.js +78 -2
- package/dist/ui/fleet-office-zones.js +132 -27
- package/dist/ui/fleet-office.js +993 -130
- package/dist/ui/fleet-route.js +44 -6
- package/dist/ui/fleet-task-activity.js +362 -0
- package/dist/ui/fleet-task-card.js +317 -314
- package/dist/ui/fleet-task-common.js +99 -9
- package/dist/ui/fleet-task-create.js +67 -0
- package/dist/ui/fleet-task-edit.js +204 -0
- package/dist/ui/fleet-task-follow.js +123 -0
- package/dist/ui/fleet-task-menu.js +1 -1
- package/dist/ui/fleet-task-owner.js +252 -0
- package/dist/ui/fleet-task-run.js +257 -0
- package/dist/ui/fleet-task-view.js +180 -40
- package/dist/ui/fleet-task-work.js +2 -2
- package/dist/ui/fleet-tasks.js +258 -130
- package/dist/ui/host-alerts.js +23 -0
- package/dist/ui/host-footprint.js +17 -0
- package/dist/ui/host-health-model.js +42 -0
- package/dist/ui/host-health.js +82 -0
- package/dist/ui/host-install.js +87 -7
- package/dist/ui/host-monitoring-darwin.js +6 -0
- package/dist/ui/host-monitoring-help.js +7 -0
- package/dist/ui/host-monitoring-linux.js +6 -0
- package/dist/ui/host-monitoring-wsl.js +6 -0
- package/dist/ui/host-time.js +5 -0
- package/dist/ui/hub-admin-overview.js +189 -0
- package/dist/ui/hub-admin-rooms.js +1 -1
- package/dist/ui/hub-agent-copy.js +8 -2
- package/dist/ui/hub-agent-intro.js +35 -0
- package/dist/ui/hub-ai-apps-strings.js +6 -0
- package/dist/ui/hub-ai-apps.js +84 -0
- package/dist/ui/hub-attachments.js +81 -3
- package/dist/ui/hub-chat-strings.js +11 -3
- package/dist/ui/hub-client.js +120 -12
- package/dist/ui/hub-directory-editor-strings.js +2 -2
- package/dist/ui/hub-directory-editor.js +1 -0
- package/dist/ui/hub-fleet-versions.js +393 -0
- package/dist/ui/hub-grant-picker.js +28 -47
- package/dist/ui/hub-group-policy.js +26 -13
- package/dist/ui/hub-group-strings.js +28 -18
- package/dist/ui/hub-intro-notice.js +16 -0
- package/dist/ui/hub-invitations.js +5 -1
- package/dist/ui/hub-join-steps.js +27 -15
- package/dist/ui/hub-my-agents-model.js +42 -0
- package/dist/ui/hub-my-agents-strings.js +20 -0
- package/dist/ui/hub-my-agents.js +166 -0
- package/dist/ui/hub-owner-strings.js +9 -8
- package/dist/ui/hub-personal-agent-strings.js +246 -0
- package/dist/ui/hub-personal-agent.js +119 -0
- package/dist/ui/hub-policy-subjects.js +35 -0
- package/dist/ui/hub-quick-pairing.js +7 -2
- package/dist/ui/hub-quota.js +2 -1
- package/dist/ui/hub-role-audit.js +39 -0
- package/dist/ui/hub-role-forms.js +99 -0
- package/dist/ui/hub-role-notices.js +11 -0
- package/dist/ui/hub-role-view.js +86 -0
- package/dist/ui/hub-roles-strings.js +440 -0
- package/dist/ui/hub-roles.js +83 -0
- package/dist/ui/hub-room-agent-strings.js +28 -0
- package/dist/ui/hub-room-composer.js +161 -18
- package/dist/ui/hub-room-list.js +6 -4
- package/dist/ui/hub-room-members-strings.js +11 -4
- package/dist/ui/hub-room-members.js +127 -17
- package/dist/ui/hub-room-new-strings.js +2 -1
- package/dist/ui/hub-room-new.js +17 -7
- package/dist/ui/hub-room-notify.js +161 -0
- package/dist/ui/hub-room-office.js +202 -0
- package/dist/ui/hub-room-owner-requests-strings.js +114 -0
- package/dist/ui/hub-room-owner-requests.js +264 -0
- package/dist/ui/hub-room-pins.js +43 -0
- package/dist/ui/hub-room-presence.js +5 -2
- package/dist/ui/hub-room-purpose.js +35 -0
- package/dist/ui/hub-room-search.js +126 -0
- package/dist/ui/hub-room-settings.js +79 -4
- package/dist/ui/hub-room-source-strings.js +17 -0
- package/dist/ui/hub-room-source.js +37 -0
- package/dist/ui/hub-room-strings.js +86 -7
- package/dist/ui/hub-room-thread.js +436 -60
- package/dist/ui/hub-room-unread.js +2 -1
- package/dist/ui/hub-strings.js +19 -10
- package/dist/ui/hub-subject-picker.js +58 -0
- package/dist/ui/hub-switcher.js +2 -2
- package/dist/ui/hub-teams-strings.js +10 -6
- package/dist/ui/hub-teams.js +58 -29
- package/dist/ui/hub-this-hub.js +2 -2
- package/dist/ui/hub-welcome.js +122 -75
- package/dist/ui/image-annotate.js +2 -283
- package/dist/ui/image-lightbox.js +2 -176
- package/dist/ui/image-zoom.js +2 -242
- package/dist/ui/log-row.js +7 -5
- package/dist/ui/model-picker.js +7 -3
- package/dist/ui/native-instance-settings.js +4 -2
- package/dist/ui/notice-hub-sharing.js +81 -0
- package/dist/ui/notice-hub-update.js +94 -0
- package/dist/ui/office-share-dialog.js +2 -2
- package/dist/ui/office-share-page.js +5 -1
- package/dist/ui/panel-chat.js +578 -78
- package/dist/ui/panel-details.js +22 -1
- package/dist/ui/panel-fleet.js +49 -14
- package/dist/ui/panel-hub.js +418 -123
- package/dist/ui/panel-log.js +4 -4
- package/dist/ui/panel-needs.js +50 -22
- package/dist/ui/panel-notices.js +4 -1
- package/dist/ui/panel-runtimes.js +2 -1
- package/dist/ui/panel-settings.js +111 -51
- package/dist/ui/preview-panel.js +3 -1
- package/dist/ui/preview-popout.js +134 -0
- package/dist/ui/reply-file-preview.js +65 -0
- package/dist/ui/runtime-commands.d.ts +2 -2
- package/dist/ui/runtime-commands.js +7 -4
- package/dist/ui/search-dialog.js +8 -1
- package/dist/ui/settings-access-overview.js +5 -4
- package/dist/ui/settings-appearance.js +13 -11
- package/dist/ui/settings-apply.js +8 -3
- package/dist/ui/settings-archive-files.js +109 -0
- package/dist/ui/settings-build-version.js +2 -2
- package/dist/ui/settings-capabilities.js +2 -0
- package/dist/ui/settings-catalog.js +22 -0
- package/dist/ui/settings-connector-strings.js +23 -0
- package/dist/ui/settings-connector.js +40 -0
- package/dist/ui/settings-default-model-scope.js +40 -0
- package/dist/ui/settings-default-model-strings.js +43 -0
- package/dist/ui/settings-dialogs.js +9 -5
- package/dist/ui/settings-guests-entries.js +16 -0
- package/dist/ui/settings-guests.js +57 -15
- package/dist/ui/settings-host-alerts.js +23 -0
- package/dist/ui/settings-host-monitoring.js +71 -0
- package/dist/ui/settings-hub-connection.js +6 -7
- package/dist/ui/settings-hub-membership.js +6 -7
- package/dist/ui/settings-hub-page-sharing.js +52 -0
- package/dist/ui/settings-hub-section.js +2 -4
- package/dist/ui/settings-hub-setup.js +2 -1
- package/dist/ui/settings-hub-updates.js +67 -0
- package/dist/ui/settings-hub.js +35 -7
- package/dist/ui/settings-layout.js +17 -14
- package/dist/ui/settings-model.js +9 -5
- package/dist/ui/settings-quota-notice.js +3 -3
- package/dist/ui/settings-registry.js +27 -5
- package/dist/ui/settings-shared-strings.js +24 -0
- package/dist/ui/settings-shared.js +62 -14
- package/dist/ui/settings-strings.js +15 -6
- package/dist/ui/settings-update.js +11 -5
- package/dist/ui/settings-web-authority.js +7 -5
- package/dist/ui/shared/access-overview.css +1 -1
- package/dist/ui/shared/accounts-keepalive.css +1 -1
- package/dist/ui/shared/accounts.css +9 -5
- package/dist/ui/shared/agent-sheet.js +120 -0
- package/dist/ui/shared/agent-widget.js +1 -2
- package/dist/ui/shared/app-i18n.js +10 -2
- package/dist/ui/shared/app-nav.js +9 -5
- package/dist/ui/shared/app-prefs.js +9 -3
- package/dist/ui/shared/app-route.js +5 -3
- package/dist/ui/shared/app-shell.js +202 -34
- package/dist/ui/shared/app-store.js +7 -3
- package/dist/ui/shared/app-stream.js +8 -2
- package/dist/ui/shared/app-swipe.js +3 -1
- package/dist/ui/shared/app-themes.js +3 -5
- package/dist/ui/shared/app-update.js +90 -8
- package/dist/ui/shared/app.css +1005 -259
- package/dist/ui/shared/app.js +12 -3
- package/dist/ui/shared/asset-url.d.ts +2 -0
- package/dist/ui/shared/asset-url.js +20 -0
- package/dist/ui/shared/chat-composer.js +36 -11
- package/dist/ui/shared/chat-msg-actions.js +233 -0
- package/dist/ui/shared/chat-quote.js +285 -0
- package/dist/ui/shared/chat-render.js +63 -10
- package/dist/ui/shared/chat-strings.js +31 -10
- package/dist/ui/shared/chat-table-select.js +175 -0
- package/dist/ui/shared/chat-thread.js +175 -29
- package/dist/ui/shared/chat-work-bar.css +118 -0
- package/dist/ui/shared/composer-focus.js +21 -0
- package/dist/ui/shared/connector-prompt.d.ts +3 -0
- package/dist/ui/shared/connector-prompt.js +20 -0
- package/dist/ui/shared/hub-ai-apps.css +12 -0
- package/dist/ui/shared/hub-chat.css +117 -4
- package/dist/ui/shared/hub-groups.css +19 -15
- package/dist/ui/shared/hub-my-agents.css +41 -0
- package/dist/ui/shared/hub-owner.css +118 -3
- package/dist/ui/shared/hub-roles.css +99 -0
- package/dist/ui/shared/hub-rooms-u2.css +95 -0
- package/dist/ui/shared/hub.css +23 -5
- package/dist/ui/shared/image-annotate.css +22 -3
- package/dist/ui/shared/image-annotate.js +416 -0
- package/dist/ui/shared/image-lightbox.js +218 -0
- package/dist/ui/shared/image-zoom.js +316 -0
- package/dist/ui/shared/info-tip.js +64 -0
- package/dist/ui/shared/instance-nav.js +166 -19
- package/dist/ui/shared/jump-idle.js +36 -0
- package/dist/ui/shared/loading.css +1 -1
- package/dist/ui/shared/model-picker.css +32 -4
- package/dist/ui/shared/module-warm.d.ts +3 -0
- package/dist/ui/shared/module-warm.js +39 -0
- package/dist/ui/shared/office-dialogue.css +12 -0
- package/dist/ui/shared/owner-css.js +1 -1
- package/dist/ui/shared/panel-view.js +7 -1
- package/dist/ui/shared/preview-panel-actions.js +1 -1
- package/dist/ui/shared/preview-panel.js +50 -20
- package/dist/ui/shared/preview-popout.css +11 -0
- package/dist/ui/shared/reply-previews.css +4 -0
- package/dist/ui/shared/runtime-install.css +5 -0
- package/dist/ui/shared/settings-connector.css +7 -0
- package/dist/ui/shared/signin.js +27 -12
- package/dist/ui/shared/task-board.css +408 -10
- package/dist/ui/shared/text-undo.js +17 -3
- package/dist/ui/shared/theme-picker.js +46 -0
- package/dist/ui/shared/theme.js +101 -2
- package/dist/ui/shared/tokens.css +300 -10
- package/dist/ui/shared/ui-confirm.js +5 -2
- package/dist/ui/shared/ui-icons.js +2 -0
- package/dist/ui/shared/ui-menu.js +17 -11
- package/dist/ui/shared/ui-states.js +3 -2
- package/dist/ui/shared/ui-toast.js +4 -4
- package/dist/ui/shared/usage-dialog.js +88 -17
- package/dist/ui/shared/view-history.js +2 -1
- package/dist/ui/shared/view-strings.js +28 -4
- package/dist/ui/shared/web-authorize.js +3 -3
- package/dist/ui/signin.html +4 -2
- package/dist/ui/structured-signin.js +64 -12
- package/dist/ui/subagent-row.js +3 -2
- package/dist/ui/trigger-complete.js +71 -0
- package/dist/ui/usage-pool.js +2 -1
- package/dist/ui/web-terminal/terminal.css +1 -1
- package/dist/ui/workspace-panel.js +6 -4
- package/dist/update-dispatch.d.ts +8 -1
- package/dist/update-dispatch.js +16 -1
- package/dist/update-dispatch.js.map +1 -1
- package/dist/update-idle.d.ts +65 -0
- package/dist/update-idle.js +190 -0
- package/dist/update-idle.js.map +1 -0
- package/dist/update-launch.d.ts +1 -1
- package/dist/update-launch.js +9 -2
- package/dist/update-launch.js.map +1 -1
- package/dist/usage/i18n-keys.d.ts +1 -1
- package/dist/usage/i18n-keys.js +2 -2
- package/dist/usage/i18n-keys.js.map +1 -1
- package/dist/usage/profile-timeline.d.ts +2 -0
- package/dist/usage/profile-timeline.js +4 -0
- package/dist/usage/profile-timeline.js.map +1 -1
- package/dist/usage/providers.d.ts +1 -0
- package/dist/usage/providers.js +20 -7
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/quota-history.d.ts +1 -1
- package/dist/usage/usage-api.js +5 -2
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/view-api.js +1 -1
- package/dist/view-api.js.map +1 -1
- package/dist/wake-coordinator.js +3 -2
- package/dist/wake-coordinator.js.map +1 -1
- package/dist/web-api.d.ts +57 -6
- package/dist/web-api.js +1021 -212
- package/dist/web-api.js.map +1 -1
- package/dist/web-asset-version.d.ts +65 -0
- package/dist/web-asset-version.js +259 -0
- package/dist/web-asset-version.js.map +1 -0
- package/dist/web-backend-login.d.ts +5 -1
- package/dist/web-backend-login.js +8 -2
- package/dist/web-backend-login.js.map +1 -1
- package/dist/web-chat-archive.d.ts +147 -0
- package/dist/web-chat-archive.js +530 -0
- package/dist/web-chat-archive.js.map +1 -0
- package/dist/web-chat-history.d.ts +128 -2
- package/dist/web-chat-history.js +320 -12
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-claude-credentials.d.ts +31 -0
- package/dist/web-claude-credentials.js +138 -0
- package/dist/web-claude-credentials.js.map +1 -0
- package/dist/web-commands.d.ts +9 -5
- package/dist/web-commands.js +7 -4
- package/dist/web-commands.js.map +1 -1
- package/dist/web-guest-access.d.ts +3 -0
- package/dist/web-guest-access.js +8 -4
- package/dist/web-guest-access.js.map +1 -1
- package/dist/web-host-guard.js +3 -1
- package/dist/web-host-guard.js.map +1 -1
- package/dist/web-host-install.d.ts +30 -3
- package/dist/web-host-install.js +50 -4
- package/dist/web-host-install.js.map +1 -1
- package/dist/web-icons.js +3 -3
- package/dist/web-icons.js.map +1 -1
- package/dist/web-login.d.ts +7 -0
- package/dist/web-login.js +8 -1
- package/dist/web-login.js.map +1 -1
- package/dist/web-mentions.d.ts +2 -0
- package/dist/web-mentions.js +20 -0
- package/dist/web-mentions.js.map +1 -1
- package/dist/web-notices.d.ts +20 -0
- package/dist/web-notices.js +64 -8
- package/dist/web-notices.js.map +1 -1
- package/dist/web-office-skins.d.ts +7 -2
- package/dist/web-office-skins.js +42 -16
- package/dist/web-office-skins.js.map +1 -1
- package/dist/web-office-store.d.ts +2 -0
- package/dist/web-office-store.js +15 -3
- package/dist/web-office-store.js.map +1 -1
- package/dist/web-pin-store.d.ts +58 -0
- package/dist/web-pin-store.js +170 -0
- package/dist/web-pin-store.js.map +1 -0
- package/dist/web-prefs.js +5 -1
- package/dist/web-prefs.js.map +1 -1
- package/dist/web-reply-files.d.ts +1 -0
- package/dist/web-reply-files.js +2 -0
- package/dist/web-reply-files.js.map +1 -1
- package/dist/web-session-authorization.d.ts +24 -0
- package/dist/web-session-authorization.js +32 -0
- package/dist/web-session-authorization.js.map +1 -1
- package/dist/web-session.d.ts +26 -5
- package/dist/web-session.js +32 -3
- package/dist/web-session.js.map +1 -1
- package/dist/web-settings-patch.d.ts +24 -3
- package/dist/web-settings-patch.js +57 -1
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/web-shell-routes.d.ts +2 -2
- package/dist/web-shell-routes.js +3 -2
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-terminal.d.ts +9 -0
- package/dist/web-terminal.js +27 -1
- package/dist/web-terminal.js.map +1 -1
- package/dist/web-theme.js +2 -2
- package/dist/web-update.d.ts +15 -1
- package/dist/web-upload.d.ts +37 -1
- package/dist/web-upload.js +105 -5
- package/dist/web-upload.js.map +1 -1
- package/dist/windows-cli-api.d.ts +10 -7
- package/dist/windows-cli-api.js +13 -12
- package/dist/windows-cli-api.js.map +1 -1
- package/dist/windows-cli-worker.d.ts +10 -0
- package/dist/windows-cli-worker.js +109 -14
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +10 -1
- package/dist/windows-cli.js +47 -13
- package/dist/windows-cli.js.map +1 -1
- package/dist/windows-native-mcp.js +5 -2
- package/dist/windows-native-mcp.js.map +1 -1
- package/dist/workflow-templates/default.md +4 -6
- package/launcher/agend-install.cjs +48 -7
- package/package.json +1 -1
- package/templates/runtime-install/install.ps1 +24 -4
package/dist/daemon.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import { managedClaudeBinding } from "./claude-credential-launch.js";
|
|
2
|
+
import { HUB_REPORT_TARGET } from "./hub-report-target.js";
|
|
3
|
+
import { RoomConversationGeneration, roomContextInputMarker } from "./hub-room-conversation.js";
|
|
1
4
|
import { checkpointGrokDelivery } from "./grok-delivery-proof.js";
|
|
2
5
|
import { nativePaneToolRefusal } from "./native-pane-tools.js";
|
|
6
|
+
import { classicGuardInventory, classicPlanDigest, invalidateClassicGuard } from "./classic-cli-guard.js";
|
|
7
|
+
import { CLASSIC_RESTRICTED_TOOLS } from "./contact-auth-types.js";
|
|
3
8
|
import { generalByName } from "./general-instance.js";
|
|
4
9
|
import { ClaudeModelObserver, normalizeClaudeModel } from "./claude-model-observation.js";
|
|
5
10
|
import { codexMetadataHomes } from "./backend/codex-metadata.js";
|
|
@@ -15,6 +20,7 @@ import { join, dirname, basename, resolve } from "node:path";
|
|
|
15
20
|
import { checkoutTarget, readCheckouts, releaseCandidate, reposRoot, verifyWorktree, writeCheckouts } from "./repo-worktree-guard.js";
|
|
16
21
|
import { mkdirSync, writeFileSync, readFileSync, readdirSync, existsSync, unlinkSync, rmSync, appendFileSync, statSync, renameSync } from "node:fs";
|
|
17
22
|
import { COMPACT_WATCH_TIMEOUT_MS, launchIdentity } from "./compact-watch.js";
|
|
23
|
+
import { TurnWatch } from "./dispatcher-liveness.js";
|
|
18
24
|
import { KIRO_COMPACT_PANE_LINES, KiroCompactPaneFollower } from "./kiro-compact-pane.js";
|
|
19
25
|
import { clearKiroSessionProof, proveKiroSessionId, recordKiroSessionProof } from "./kiro-session-proof.js";
|
|
20
26
|
import { fileURLToPath } from "node:url";
|
|
@@ -79,6 +85,8 @@ import { QUEUED_HANDOFF_MAX_REDELIVERIES, QueuedHandoffStore } from "./queued-ha
|
|
|
79
85
|
import { measureSyncWork, noteSyncWork } from "./sync-work-attribution.js";
|
|
80
86
|
import { TranscriptDeltaReader } from "./transcript-delta-reader.js";
|
|
81
87
|
import { checkpointCodexPane } from "./codex-pane-ownership.js";
|
|
88
|
+
import { codexAppliedFromRollout, codexRunningVersion, codexSupportsInlineModel, codexSwitchAnswerCount, codexSwitchFromPane, readFrom } from "./backend/codex-model-switch.js";
|
|
89
|
+
import { CLI_RUNTIME_SWITCH, cliRunningVersion, cliSwitchAllowed } from "./backend/cli-runtime-switch.js";
|
|
82
90
|
import { buildResumeContinuation, clearInFlightTurnMarker, consumeInFlightTurnMarker, decideTurnResume, normalizeResumeBackend, readResumeFingerprint, RESUME_BLOCKING_DELIVERY_STATES, writeInFlightTurnMarker, } from "./turn-resume.js";
|
|
83
91
|
import { codexLiveRowMatches } from "./backend/codex.js";
|
|
84
92
|
import { codexPackageProblemMessage } from "./backend/codex-package.js";
|
|
@@ -109,7 +117,7 @@ const WEB_THEME_IPC = Object.freeze({
|
|
|
109
117
|
});
|
|
110
118
|
/** The largest picture any slot may take (a card slot's ceiling; the fleet checks the limit in force): read no more. */
|
|
111
119
|
const WEB_THEME_ASSET_MAX_BYTES = ASSET_UPLOAD_MAX_BYTES;
|
|
112
|
-
const CROSS_INSTANCE_TOOLS = new Set(["send_to_instance", "broadcast", "list_instances", "start_instance", "restart_instance", "create_instance", "delete_instance", "replace_instance", "request_information", "delegate_task", "report_result", "delivery_status", "describe_instance"]);
|
|
120
|
+
const CROSS_INSTANCE_TOOLS = new Set(["hub_set_intro", "hub_room_status", "hub_room_list", "hub_room_post", "hub_room_members", "hub_people_search", "send_to_instance", "broadcast", "list_instances", "start_instance", "restart_instance", "create_instance", "delete_instance", "replace_instance", "request_information", "delegate_task", "report_result", "delivery_status", "describe_instance"]);
|
|
113
121
|
const SCHEDULE_TOOLS = new Set(["create_schedule", "list_schedules", "update_schedule", "delete_schedule"]);
|
|
114
122
|
const DECISION_TOOLS = new Set(["post_decision", "list_decisions", "update_decision"]);
|
|
115
123
|
const TASK_TOOL = "task";
|
|
@@ -155,6 +163,10 @@ export const DEFAULT_STATE_IDLE_DEBOUNCE_MS = 2_000;
|
|
|
155
163
|
export const DEFAULT_STATE_SAFETY_SWEEP_MS = 60_000;
|
|
156
164
|
/** Coalesce one cosmetic-redraw burst before comparing the visible pane. */
|
|
157
165
|
export const PERIODIC_REDRAW_PROBE_MS = 25;
|
|
166
|
+
/** M-3239: a turn's progress reaches the fleet at most this often while it runs. */
|
|
167
|
+
const TURN_ACTIVITY_REPORT_MS = 30_000;
|
|
168
|
+
/** M-3239: after the idle edge, the transcript's last lines (the final answer) are read within this. */
|
|
169
|
+
const TURN_END_SETTLE_MS = 5_000;
|
|
158
170
|
/** Board 907c7899: how often a kiro /compact's pane is read (TUI V2's "too short" shows for about ten seconds). */
|
|
159
171
|
const KIRO_COMPACT_PANE_POLL_MS = 1_000;
|
|
160
172
|
/** Do not turn a streaming Codex turn into one capture-pane per burst. */
|
|
@@ -187,7 +199,7 @@ const HEALTH_ERROR_NOTIFY_INTERVAL_MS = 10 * 60_000;
|
|
|
187
199
|
* Whether two working directories belong to the same project, so a fleet-scoped
|
|
188
200
|
* decision recorded in one reaches the other. Covers the worktree/checkout
|
|
189
201
|
* layout AgEnD fleets actually use — `AgEnD`, `AgEnD-dev1`, `AgEnD-dev2`,
|
|
190
|
-
* `AgEnD-reviewer`, `AgEnD-main` are one project; `
|
|
202
|
+
* `AgEnD-reviewer`, `AgEnD-main` are one project; `GameServer` is not.
|
|
191
203
|
* Nesting counts too (a subdirectory of a project belongs to it).
|
|
192
204
|
*/
|
|
193
205
|
export function sameProjectFamily(a, b) {
|
|
@@ -563,6 +575,13 @@ const STARTUP_DIALOG_BUDGET_MS = 30_000;
|
|
|
563
575
|
export const OWN_SWITCH_WAIT_MS = 6_000;
|
|
564
576
|
/** #1690: after an answer to that dialog, how long it gets to go away. */
|
|
565
577
|
const OWN_SWITCH_SETTLE_MS = 3_000;
|
|
578
|
+
/** M-3175: how long a codex switch waits for the pane to be idle before it is not typed (the fleet then restarts instead). */
|
|
579
|
+
const CODEX_SWITCH_IDLE_MS = 60_000;
|
|
580
|
+
/** M-3175: how long codex gets to record the switch (rollout) or answer it (pane) after it is typed. */
|
|
581
|
+
const CODEX_SWITCH_VERIFY_MS = 10_000;
|
|
582
|
+
/** M-3175: the scrollback read around a codex switch (codex's answer rows are counted in it) and the most of a rollout delta read. */
|
|
583
|
+
const CODEX_SWITCH_HISTORY_LINES = 200;
|
|
584
|
+
const CODEX_SWITCH_ROLLOUT_READ = 4 * 1024 * 1024;
|
|
566
585
|
/** A blocking dialog still on screen this long after first being seen is reported for a human. */
|
|
567
586
|
const DIALOG_PARKED_NOTIFY_MS = 60_000;
|
|
568
587
|
/** #2675: a card a person can answer from the chat is posted once it has been on screen, unchanged, this long. */
|
|
@@ -660,7 +679,7 @@ const INPUT_TRANSIENT_STALL_MS = 30_000;
|
|
|
660
679
|
*/
|
|
661
680
|
const INPUT_TRANSIENT_WAIT_MS = 10 * 60_000;
|
|
662
681
|
const INPUT_TRANSIENT_POLL_MS = 250;
|
|
663
|
-
/** Max
|
|
682
|
+
/** Max actual stranded-text recovery Enters per delivery; a busy observation spends none. */
|
|
664
683
|
const STRANDED_INPUT_MAX_ROUNDS = 3;
|
|
665
684
|
/** The Claude phrasing every backend was judged by before #1217; still the default for a backend that names none. */
|
|
666
685
|
const LEGACY_NO_CONVERSATION = /no conversation found|no conversation to (continue|resume)|no previous (session|conversation)/i;
|
|
@@ -676,6 +695,8 @@ const INPUT_RESIDUE_POLL_MS = 100;
|
|
|
676
695
|
const RECENT_PASTES_KEPT = 8;
|
|
677
696
|
/** Build a status holder from channel metadata, keeping chat and thread apart. */
|
|
678
697
|
export function channelStatus(meta) {
|
|
698
|
+
if (meta.source === "app")
|
|
699
|
+
return undefined; // no platform post exists to react to
|
|
679
700
|
const chatId = meta.chat_id;
|
|
680
701
|
const messageId = meta.message_id;
|
|
681
702
|
// A web chat message has no platform chat when the fleet has no channel, and still gets its reports:
|
|
@@ -1550,6 +1571,8 @@ export class Daemon extends EventEmitter {
|
|
|
1550
1571
|
* instance is still auth-broken and must not resume raising alarms.
|
|
1551
1572
|
*/
|
|
1552
1573
|
authFailureUnresolved = false;
|
|
1574
|
+
/** A process-local login failure cannot be repaired by a valid auth file or idle chrome. */
|
|
1575
|
+
staleAuth = null;
|
|
1553
1576
|
/** One login-screen auth report per spawn — the screen persists across polls. */
|
|
1554
1577
|
loginScreenReported = false;
|
|
1555
1578
|
/** #2795: the auth pattern match the token-free check is still to judge; it arms nothing until confirmAuthFailure(). */
|
|
@@ -1843,7 +1866,7 @@ export class Daemon extends EventEmitter {
|
|
|
1843
1866
|
if (!["codex", "grok"].includes(this.backend?.binaryName ?? ""))
|
|
1844
1867
|
return [];
|
|
1845
1868
|
const patterns = this.backend?.getErrorPatterns?.() ?? [];
|
|
1846
|
-
return this.backend?.binaryName === "codex" ? patterns.filter(ep => Daemon.isCodexUsageLimitPause(ep)) : patterns.filter(ep => ep.type === "quota");
|
|
1869
|
+
return this.backend?.binaryName === "codex" ? patterns.filter(ep => Daemon.isCodexUsageLimitPause(ep) || ep.type === "stale_auth") : patterns.filter(ep => ep.type === "quota");
|
|
1847
1870
|
}
|
|
1848
1871
|
async prepareQuotaReplayHistory(reuseWindow) {
|
|
1849
1872
|
this.quotaReplay = null;
|
|
@@ -1867,7 +1890,20 @@ export class Daemon extends EventEmitter {
|
|
|
1867
1890
|
if (!current())
|
|
1868
1891
|
return;
|
|
1869
1892
|
const patterns = this.paneQuotaPatterns();
|
|
1870
|
-
|
|
1893
|
+
// A quota frame can span several wrapped rows. Keep the complete rows
|
|
1894
|
+
// each actual match covered, rather than testing the rows independently.
|
|
1895
|
+
// Exact spans dedupe overlapping rules without collapsing repeated hits.
|
|
1896
|
+
const spans = new Map();
|
|
1897
|
+
for (const ep of patterns) {
|
|
1898
|
+
const flags = ep.pattern.flags.includes("g") ? ep.pattern.flags : ep.pattern.flags + "g";
|
|
1899
|
+
for (const match of oldPane.matchAll(new RegExp(ep.pattern.source, flags))) {
|
|
1900
|
+
const start = oldPane.lastIndexOf("\n", match.index) + 1;
|
|
1901
|
+
const newline = oldPane.indexOf("\n", match.index + match[0].length);
|
|
1902
|
+
const end = newline < 0 ? oldPane.length : newline;
|
|
1903
|
+
spans.set(`${start}:${end}`, oldPane.slice(start, end));
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
const messages = [...spans.values()];
|
|
1871
1907
|
this.quotaReplay = { messages, current: () => true, spawn, fence, attempt };
|
|
1872
1908
|
}
|
|
1873
1909
|
}
|
|
@@ -1883,7 +1919,13 @@ export class Daemon extends EventEmitter {
|
|
|
1883
1919
|
this.quotaReplay = null;
|
|
1884
1920
|
if (history.spawn !== this.spawnGeneration || history.fence !== this.launchFenceEpoch || history.attempt !== this.launchAttempt || !history.current())
|
|
1885
1921
|
return;
|
|
1886
|
-
|
|
1922
|
+
const patterns = this.paneQuotaPatterns();
|
|
1923
|
+
// Grok's old quota frame can also contain a 401. That same proven frame
|
|
1924
|
+
// must not arm the auth gate after its quota was absorbed as history.
|
|
1925
|
+
if (this.backend?.binaryName === "grok") {
|
|
1926
|
+
patterns.push(...(this.backend.getErrorPatterns?.() ?? []).filter(ep => ep.type === "auth_error"));
|
|
1927
|
+
}
|
|
1928
|
+
for (const ep of patterns) {
|
|
1887
1929
|
const count = Math.min(Daemon.countOccurrences(ep.pattern, pane), quotaHistoryCount(pane, ep.pattern, history.messages));
|
|
1888
1930
|
if (!count)
|
|
1889
1931
|
continue;
|
|
@@ -1905,7 +1947,7 @@ export class Daemon extends EventEmitter {
|
|
|
1905
1947
|
this.quotaInput = history.marker && history.occurrences === 0 ? { history, reported: new Map() } : null;
|
|
1906
1948
|
}
|
|
1907
1949
|
quotaOccurrencesAfterInput(pane, ep) {
|
|
1908
|
-
if (!(this.backend?.binaryName === "codex" && Daemon.isCodexUsageLimitPause(ep)
|
|
1950
|
+
if (!(this.backend?.binaryName === "codex" && (Daemon.isCodexUsageLimitPause(ep) || ep.type === "stale_auth")
|
|
1909
1951
|
|| this.backend?.binaryName === "grok" && ep.type === "quota"))
|
|
1910
1952
|
return null;
|
|
1911
1953
|
const input = this.quotaInput, history = input?.history;
|
|
@@ -2069,6 +2111,10 @@ export class Daemon extends EventEmitter {
|
|
|
2069
2111
|
}
|
|
2070
2112
|
return super.emit(event, ...args);
|
|
2071
2113
|
}
|
|
2114
|
+
/** Attention remains active for General/busy agents too, until a new launch takes ownership. */
|
|
2115
|
+
staleAuthIssue() {
|
|
2116
|
+
return this.staleAuth?.generation === this.spawnGeneration ? { since: this.staleAuth.since } : null;
|
|
2117
|
+
}
|
|
2072
2118
|
/**
|
|
2073
2119
|
* Undo an auth suspicion once the backend's token-free probe has said the credentials are fine. Since #2795 a pane
|
|
2074
2120
|
* pattern match arms nothing before that probe (its pending match is just dropped); what is left to undo is a
|
|
@@ -2077,6 +2123,8 @@ export class Daemon extends EventEmitter {
|
|
|
2077
2123
|
* is still live and stays.
|
|
2078
2124
|
*/
|
|
2079
2125
|
clearSuspectedAuthFailure() {
|
|
2126
|
+
if (this.staleAuthIssue())
|
|
2127
|
+
return false;
|
|
2080
2128
|
this.unverifiedAuthMatch = null;
|
|
2081
2129
|
if (!this.authFailureUnresolved && !this.loginScreenReported)
|
|
2082
2130
|
return false;
|
|
@@ -2194,6 +2242,63 @@ export class Daemon extends EventEmitter {
|
|
|
2194
2242
|
fleetTransportAvailable() {
|
|
2195
2243
|
return this.nativePaneLifecycle ? !!this.nativeFleetBridge?.current() && !this.runtimeMonitorsFrozen : !!this.ipcServer;
|
|
2196
2244
|
}
|
|
2245
|
+
classicRestriction;
|
|
2246
|
+
classicRestrictionFailed = false;
|
|
2247
|
+
classicRestrictionNeedsRestart = false;
|
|
2248
|
+
setClassicRestriction(input) {
|
|
2249
|
+
if (this.runtimeIdentity?.kind !== "classic") {
|
|
2250
|
+
if (input?.mode === "legacy")
|
|
2251
|
+
return; // The optional adapter also sees existing/default-kind starts.
|
|
2252
|
+
throw Error("Classic restriction requires a Classic room");
|
|
2253
|
+
}
|
|
2254
|
+
try {
|
|
2255
|
+
if (!input || !["legacy", "restricted"].includes(input.mode))
|
|
2256
|
+
throw Error("invalid-policy");
|
|
2257
|
+
const next = input.mode === "restricted" ? { roomKey: this.name, policyRevision: input.policyRevision ?? 0,
|
|
2258
|
+
publicRead: input.roomTools.publicRead, allowedMcpTools: structuredClone(input.roomTools.allowedMcpTools),
|
|
2259
|
+
allowedAgendTools: [...CLASSIC_RESTRICTED_TOOLS] } : undefined;
|
|
2260
|
+
// A1's revision also changes for contact grants and approvers. Validate it,
|
|
2261
|
+
// but preserve the frozen launch when the native tool policy is unchanged.
|
|
2262
|
+
if (next)
|
|
2263
|
+
classicPlanDigest(next);
|
|
2264
|
+
const before = this.classicRestriction ? classicPlanDigest({ ...this.classicRestriction, policyRevision: 0 }) : null;
|
|
2265
|
+
const after = next ? classicPlanDigest({ ...next, policyRevision: 0 }) : null;
|
|
2266
|
+
if (before !== after) {
|
|
2267
|
+
invalidateClassicGuard(this.instanceDir);
|
|
2268
|
+
if (this.classicRestriction && !next && this.processStatus === "running")
|
|
2269
|
+
this.classicRestrictionNeedsRestart = true;
|
|
2270
|
+
this.classicRestriction = next;
|
|
2271
|
+
}
|
|
2272
|
+
this.classicRestrictionFailed = false;
|
|
2273
|
+
}
|
|
2274
|
+
catch {
|
|
2275
|
+
this.classicRestrictionFailed = true;
|
|
2276
|
+
try {
|
|
2277
|
+
invalidateClassicGuard(this.instanceDir);
|
|
2278
|
+
}
|
|
2279
|
+
catch { /* failed remains visible and refuses the next launch */ }
|
|
2280
|
+
}
|
|
2281
|
+
}
|
|
2282
|
+
assertClassicRestrictionLaunch(expected) {
|
|
2283
|
+
const current = this.classicRestriction ? classicPlanDigest(this.classicRestriction) : null;
|
|
2284
|
+
if (this.classicRestrictionFailed || current !== expected)
|
|
2285
|
+
throw Error("Restricted room policy changed while CLI launch was being prepared");
|
|
2286
|
+
}
|
|
2287
|
+
classicNativeGuard() {
|
|
2288
|
+
const backend = this.config.backend ?? this.backend?.binaryName ?? "unknown";
|
|
2289
|
+
if (this.classicRestrictionFailed)
|
|
2290
|
+
return classicGuardInventory({ state: "failed", backend, reason: "guard-unavailable" });
|
|
2291
|
+
if (!this.classicRestriction)
|
|
2292
|
+
return classicGuardInventory(this.classicRestrictionNeedsRestart
|
|
2293
|
+
? { state: "restart-required", backend, reason: "stale-policy" }
|
|
2294
|
+
: { state: "not-covered", backend, reason: "legacy-mode" });
|
|
2295
|
+
if (this.nativePaneLifecycle)
|
|
2296
|
+
return classicGuardInventory({ state: "not-covered", backend, reason: "unsupported-platform" });
|
|
2297
|
+
const status = this.backend?.classicNativeGuard?.(this.classicRestriction)
|
|
2298
|
+
?? { state: "not-covered", backend, reason: "unsupported-backend" };
|
|
2299
|
+
return classicGuardInventory(status.state === "ready" && this.processStatus !== "running"
|
|
2300
|
+
? { state: "restart-required", backend, reason: "not-running" } : status);
|
|
2301
|
+
}
|
|
2197
2302
|
/** Internal lifecycle injection, before start. Native paths and provider files stay on their runner. */
|
|
2198
2303
|
setNativePaneLifecycle(native) {
|
|
2199
2304
|
if (this.tmux || this.ipcServer || this.nativePaneLifecycle)
|
|
@@ -2279,6 +2384,58 @@ export class Daemon extends EventEmitter {
|
|
|
2279
2384
|
setStatusEmojiAvoidList(list) {
|
|
2280
2385
|
this.statusEmojiAvoidList = list;
|
|
2281
2386
|
}
|
|
2387
|
+
credentialChangeIncarnation = null;
|
|
2388
|
+
/** Claim an idle local Claude pane for an account change; queued input cannot race the final capture. */
|
|
2389
|
+
async quiesceClaudeCredential() {
|
|
2390
|
+
const spawn = this.spawnGeneration, fence = this.launchFenceEpoch;
|
|
2391
|
+
return this.paneWriteLock.run(async () => {
|
|
2392
|
+
const turn = this.turnReplyGuard.snapshot(), deliveryEpoch = this.deliveryEpoch;
|
|
2393
|
+
if (turn && !turn.cancelledByUser && !turn.completionDelivered)
|
|
2394
|
+
return false;
|
|
2395
|
+
if (this.backend?.binaryName !== "claude" || this.usesNativePane() || this.spawning || this.healthCheckPaused || this.deliveryWritesStopping || this.startupAborted || this.isPaused)
|
|
2396
|
+
return false;
|
|
2397
|
+
if (!await this.isPaneAuthoritativelyIdle())
|
|
2398
|
+
return false;
|
|
2399
|
+
const windowId = this.tmux?.getWindowId();
|
|
2400
|
+
if (!windowId)
|
|
2401
|
+
return false;
|
|
2402
|
+
let pid = null;
|
|
2403
|
+
try {
|
|
2404
|
+
pid = await this.paneHost.getPanePid(this.tmuxSessionName, windowId);
|
|
2405
|
+
}
|
|
2406
|
+
catch {
|
|
2407
|
+
return false;
|
|
2408
|
+
}
|
|
2409
|
+
if (pid === null || !Number.isSafeInteger(pid) || pid <= 1 || windowId !== this.tmux?.getWindowId())
|
|
2410
|
+
return false;
|
|
2411
|
+
// A tool pause can look idle. Re-read the owned logical turn after both
|
|
2412
|
+
// pane awaits; new input or another turn must not inherit this idle proof.
|
|
2413
|
+
const currentTurn = this.turnReplyGuard.snapshot();
|
|
2414
|
+
if ((currentTurn && !currentTurn.cancelledByUser && !currentTurn.completionDelivered) || currentTurn?.generation !== turn?.generation || deliveryEpoch !== this.deliveryEpoch)
|
|
2415
|
+
return false;
|
|
2416
|
+
if (spawn !== this.spawnGeneration || fence !== this.launchFenceEpoch || this.spawning || this.healthCheckPaused || this.deliveryWritesStopping || this.startupAborted || this.isPaused)
|
|
2417
|
+
return false;
|
|
2418
|
+
this.credentialChangeIncarnation = { windowId, pid };
|
|
2419
|
+
this.fenceDeliveryWritesForStop();
|
|
2420
|
+
return true;
|
|
2421
|
+
});
|
|
2422
|
+
}
|
|
2423
|
+
/** Read-only proof for the exact pane captured above; never kill a replacement window. */
|
|
2424
|
+
async claudeCredentialRetired() {
|
|
2425
|
+
const inc = this.credentialChangeIncarnation;
|
|
2426
|
+
if (!inc)
|
|
2427
|
+
return false;
|
|
2428
|
+
try {
|
|
2429
|
+
const windows = await TmuxManager.listWindowsStrict(this.tmuxSessionName);
|
|
2430
|
+
if (!windows.some(window => window.id === inc.windowId))
|
|
2431
|
+
return true;
|
|
2432
|
+
const pid = await this.paneHost.getPanePid(this.tmuxSessionName, inc.windowId);
|
|
2433
|
+
return pid !== null && pid !== inc.pid;
|
|
2434
|
+
}
|
|
2435
|
+
catch {
|
|
2436
|
+
return false;
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
2282
2439
|
/** Fence pane writers before lifecycle captures pre-kill reconciliation evidence. */
|
|
2283
2440
|
fenceDeliveryWritesForStop() {
|
|
2284
2441
|
if (this.deliveryWritesStopping)
|
|
@@ -2455,25 +2612,26 @@ export class Daemon extends EventEmitter {
|
|
|
2455
2612
|
if (!["claude-code", "codex"].includes(backend))
|
|
2456
2613
|
return;
|
|
2457
2614
|
const marker = durableAttempt ? `[agend-delivery-id:${durableAttempt.deliveryId}]`
|
|
2458
|
-
: humanVerificationId ? verdict.humanReceipt?.marker ?? `[agend-human-id:${humanVerificationId}]` :
|
|
2615
|
+
: humanVerificationId ? verdict.humanReceipt?.marker ?? `[agend-human-id:${humanVerificationId}]` : roomContextInputMarker(track.meta);
|
|
2459
2616
|
if (!marker || !formatted.startsWith(marker))
|
|
2460
2617
|
return;
|
|
2461
2618
|
let found = verdict.transcriptCheckpoint ?? null;
|
|
2462
2619
|
if (!found) {
|
|
2463
2620
|
try {
|
|
2464
|
-
|
|
2621
|
+
// M-2403: a native or remote pane checkpoints its runtime transcript (no local file); a local CLI, its file.
|
|
2622
|
+
const runtime = this.nativePaneLifecycle ? await this.transcriptMonitor?.reconciliationRuntimeCheckpoint() ?? null : null;
|
|
2623
|
+
found = runtime ? { runtime } : await this.transcriptMonitor?.reconciliationCheckpoint() ?? null;
|
|
2465
2624
|
}
|
|
2466
2625
|
catch (err) {
|
|
2467
2626
|
this.logger.debug({ err }, "Could not checkpoint the transcript before a queued hand-off");
|
|
2468
2627
|
}
|
|
2469
2628
|
}
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
const checkpoint = found && typeof found.path === "string" && typeof found.offset === "number" ? { path: found.path, offset: found.offset } : null;
|
|
2629
|
+
const checkpoint = found?.runtime ? { runtime: found.runtime }
|
|
2630
|
+
: found && typeof found.path === "string" && typeof found.offset === "number" ? { path: found.path, offset: found.offset } : null;
|
|
2473
2631
|
if (!checkpoint)
|
|
2474
2632
|
return; // nothing could judge it later: it runs as before (✅ at the hand-off)
|
|
2475
2633
|
const entry = {
|
|
2476
|
-
id: track.id ?? randomUUID(), marker, backend,
|
|
2634
|
+
id: track.id ?? randomUUID(), marker, backend, ...checkpoint,
|
|
2477
2635
|
content: track.content, meta: track.meta, wire: formatted, holder: this.handoffHolder(), createdAt: Date.now(),
|
|
2478
2636
|
redeliveries: track.redeliveries ?? 0,
|
|
2479
2637
|
};
|
|
@@ -2504,6 +2662,8 @@ export class Daemon extends EventEmitter {
|
|
|
2504
2662
|
this.dropQueuedHandoff(verdict);
|
|
2505
2663
|
return;
|
|
2506
2664
|
}
|
|
2665
|
+
if (sent && !verdict.roomInputQueued && meta.hub_room_context_generation)
|
|
2666
|
+
this.roomInputHandedOff(meta);
|
|
2507
2667
|
const id = meta.handoff_redelivery;
|
|
2508
2668
|
if (!id)
|
|
2509
2669
|
return;
|
|
@@ -2545,12 +2705,24 @@ export class Daemon extends EventEmitter {
|
|
|
2545
2705
|
*/
|
|
2546
2706
|
watchQueuedHandoff(entry) {
|
|
2547
2707
|
const spawn = this.spawnGeneration, fence = this.launchFenceEpoch, epoch = this.deliveryEpoch;
|
|
2708
|
+
// M-2403: a native or remote pane's record is read through its runner (the runtime reader), a local one from its file.
|
|
2709
|
+
let source;
|
|
2710
|
+
if (entry.runtime) {
|
|
2711
|
+
try {
|
|
2712
|
+
source = { reader: this.nativeTranscriptReader(entry.runtime, { marker: entry.marker, ...(entry.wire !== undefined ? { wire: entry.wire } : {}) }) };
|
|
2713
|
+
}
|
|
2714
|
+
catch (err) {
|
|
2715
|
+
this.logger.debug({ err, handoff: entry.id }, "Queued hand-off: its pane's transcript is not readable now");
|
|
2716
|
+
return this.settleQueuedHandoff(entry, "unverifiable", "transcript:unavailable");
|
|
2717
|
+
}
|
|
2718
|
+
}
|
|
2719
|
+
else
|
|
2720
|
+
source = { path: entry.path, offset: entry.offset };
|
|
2548
2721
|
const started = consumedWatches.start({
|
|
2549
2722
|
deliveryId: `handoff:${entry.id}`,
|
|
2550
2723
|
attemptNo: entry.redeliveries,
|
|
2551
2724
|
backend: entry.backend,
|
|
2552
|
-
|
|
2553
|
-
offset: entry.offset,
|
|
2725
|
+
...source,
|
|
2554
2726
|
marker: entry.marker,
|
|
2555
2727
|
...(entry.wire !== undefined ? { wire: entry.wire } : {}),
|
|
2556
2728
|
// A cancel or stop moves the epoch: the watch ends quietly (a cancel cleared the record, a stop leaves it).
|
|
@@ -2581,6 +2753,8 @@ export class Daemon extends EventEmitter {
|
|
|
2581
2753
|
const meta = entry.meta;
|
|
2582
2754
|
const status = channelStatus(meta);
|
|
2583
2755
|
if (outcome === "taken") {
|
|
2756
|
+
if (meta.hub_room_context_generation)
|
|
2757
|
+
this.roomInputHandedOff(meta);
|
|
2584
2758
|
this.logger.info({ handoff: entry.id, proof, redeliveries: entry.redeliveries }, "Queued hand-off taken by the CLI");
|
|
2585
2759
|
if (status)
|
|
2586
2760
|
this.emit("message_confirmed", status);
|
|
@@ -2628,8 +2802,20 @@ export class Daemon extends EventEmitter {
|
|
|
2628
2802
|
const spawn = this.spawnGeneration, fence = this.launchFenceEpoch, epoch = this.deliveryEpoch;
|
|
2629
2803
|
const fresh = () => spawn === this.spawnGeneration && fence === this.launchFenceEpoch && epoch === this.deliveryEpoch
|
|
2630
2804
|
&& !this.deliveryWritesStopping;
|
|
2631
|
-
let redelivered = 0, taken = 0, unverifiable = 0;
|
|
2805
|
+
let redelivered = 0, taken = 0, unverifiable = 0, watching = 0;
|
|
2632
2806
|
for (const entry of entries) {
|
|
2807
|
+
if (entry.runtime) {
|
|
2808
|
+
const outcome = await this.reconcileRuntimeHandoff(entry, holder, fresh);
|
|
2809
|
+
if (outcome === "stale")
|
|
2810
|
+
return;
|
|
2811
|
+
if (outcome === "taken")
|
|
2812
|
+
taken++;
|
|
2813
|
+
else if (outcome === "unverifiable")
|
|
2814
|
+
unverifiable++;
|
|
2815
|
+
else if (outcome === "watching")
|
|
2816
|
+
watching++;
|
|
2817
|
+
continue;
|
|
2818
|
+
}
|
|
2633
2819
|
const kind = await scanTranscriptForDeliveryMarker(entry.path, entry.offset, entry.backend, { marker: entry.marker, ...(entry.wire !== undefined ? { wire: entry.wire } : {}) });
|
|
2634
2820
|
// This CLI is gone already, or a cancel came: the next CLI settles them (a cancel cleared them).
|
|
2635
2821
|
if (!fresh())
|
|
@@ -2669,7 +2855,71 @@ export class Daemon extends EventEmitter {
|
|
|
2669
2855
|
this.pushChannelMessage(entry.content, { ...meta, handoff_redelivery: entry.id,
|
|
2670
2856
|
handoff_redeliveries: String(next.redeliveries), handoff_holder: next.holder }, undefined, epoch);
|
|
2671
2857
|
}
|
|
2672
|
-
this.logger.info({ instance: this.name, redelivered, taken, unverifiable, proof: "transcript" }, "Queued hand-offs left by the previous CLI settled");
|
|
2858
|
+
this.logger.info({ instance: this.name, redelivered, taken, unverifiable, watching, proof: "transcript" }, "Queued hand-offs left by the previous CLI settled");
|
|
2859
|
+
}
|
|
2860
|
+
/**
|
|
2861
|
+
* M-2403: a native or remote pane's record, after this daemon came up. Its runner may have kept the CLI (and its queue)
|
|
2862
|
+
* across the coordinator's restart, so nothing here proves the queue is gone, and a runtime record is never
|
|
2863
|
+
* redelivered. Read through the runner from its checkpoint (bounded, as reconcileNativePaneTarget): taken → ✅; the
|
|
2864
|
+
* same launch still current with the marker not taken yet → watched again under this CLI; that launch gone, or its
|
|
2865
|
+
* transcript unreadable → unverifiable (reported, never pasted again).
|
|
2866
|
+
*/
|
|
2867
|
+
async reconcileRuntimeHandoff(entry, holder, fresh) {
|
|
2868
|
+
const still = () => {
|
|
2869
|
+
let current;
|
|
2870
|
+
try {
|
|
2871
|
+
current = this.handoffStore().get(entry.id);
|
|
2872
|
+
}
|
|
2873
|
+
catch {
|
|
2874
|
+
current = undefined;
|
|
2875
|
+
}
|
|
2876
|
+
return !!current && current.holder === entry.holder && current.redeliveries === entry.redeliveries;
|
|
2877
|
+
};
|
|
2878
|
+
const native = this.nativePaneLifecycle;
|
|
2879
|
+
let kind = null;
|
|
2880
|
+
if (native?.current(entry.runtime)) {
|
|
2881
|
+
let reader;
|
|
2882
|
+
try {
|
|
2883
|
+
reader = this.nativeTranscriptReader(entry.runtime, { marker: entry.marker, ...(entry.wire !== undefined ? { wire: entry.wire } : {}) });
|
|
2884
|
+
for (let n = 0; n < 8; n++) {
|
|
2885
|
+
const before = reader.readPosition, look = await reader.look();
|
|
2886
|
+
if (!fresh())
|
|
2887
|
+
return "stale";
|
|
2888
|
+
kind = look;
|
|
2889
|
+
if (markerConsumed(look) || look === "unavailable" || look === "pending" || reader.readPosition === before)
|
|
2890
|
+
break;
|
|
2891
|
+
}
|
|
2892
|
+
}
|
|
2893
|
+
catch {
|
|
2894
|
+
kind = "unavailable";
|
|
2895
|
+
}
|
|
2896
|
+
finally {
|
|
2897
|
+
reader?.close?.();
|
|
2898
|
+
}
|
|
2899
|
+
}
|
|
2900
|
+
if (!fresh())
|
|
2901
|
+
return "stale";
|
|
2902
|
+
if (!still())
|
|
2903
|
+
return "skipped";
|
|
2904
|
+
if (kind && markerConsumed(kind)) {
|
|
2905
|
+
this.settleQueuedHandoff(entry, "taken", `restart-transcript:${kind}`);
|
|
2906
|
+
return "taken";
|
|
2907
|
+
}
|
|
2908
|
+
if (kind === null || kind === "unavailable" || !native?.current(entry.runtime)) {
|
|
2909
|
+
this.settleQueuedHandoff(entry, "unverifiable", "restart-transcript:unavailable");
|
|
2910
|
+
return "unverifiable";
|
|
2911
|
+
}
|
|
2912
|
+
// The same launch still holds it in its queue: this CLI watches it from where the read stopped.
|
|
2913
|
+
const next = { ...entry, holder };
|
|
2914
|
+
try {
|
|
2915
|
+
this.handoffStore().put(next);
|
|
2916
|
+
}
|
|
2917
|
+
catch (err) {
|
|
2918
|
+
this.logger.warn({ err, handoff: entry.id }, "Could not update a queued hand-off record");
|
|
2919
|
+
return "skipped";
|
|
2920
|
+
}
|
|
2921
|
+
this.watchQueuedHandoff(next);
|
|
2922
|
+
return "watching";
|
|
2673
2923
|
}
|
|
2674
2924
|
finishDurableSubmission(delivery, verdict) {
|
|
2675
2925
|
// Legacy backends may accept a pane write without enough pane evidence to
|
|
@@ -2859,6 +3109,8 @@ export class Daemon extends EventEmitter {
|
|
|
2859
3109
|
const oomStop = readSessionOomStop(this.instanceDir);
|
|
2860
3110
|
if (oomStop.blocked)
|
|
2861
3111
|
return sessionOomStopHint(oomStop);
|
|
3112
|
+
if (this.staleAuthIssue())
|
|
3113
|
+
return t("inst.codex_stale_auth");
|
|
2862
3114
|
if (this.pauseWakeState !== "active")
|
|
2863
3115
|
return t("delivery.hold_state", this.pauseWakeState);
|
|
2864
3116
|
if (this.inputBlockedDialogKey !== null)
|
|
@@ -3133,6 +3385,7 @@ export class Daemon extends EventEmitter {
|
|
|
3133
3385
|
}
|
|
3134
3386
|
if (nativeDisposition)
|
|
3135
3387
|
this.isNewSession = nativeDisposition === "fresh";
|
|
3388
|
+
this.resetRoomConversation(nativeDisposition === "reattached");
|
|
3136
3389
|
// #1209: conditional continuation for the turn interrupted by the last
|
|
3137
3390
|
// restart, if the gates allow. Detached; the gate
|
|
3138
3391
|
// consumes its one-shot marker first and never throws into boot.
|
|
@@ -3712,9 +3965,12 @@ export class Daemon extends EventEmitter {
|
|
|
3712
3965
|
return;
|
|
3713
3966
|
}
|
|
3714
3967
|
const native = this.nativePaneLifecycle, pane = this.tmux;
|
|
3968
|
+
const footprintObservedAt = this.footprintEnabled ? Date.now() : 0, footprintOwner = this.footprintEnabled ? JSON.stringify(this.interactionOwner()) : null;
|
|
3715
3969
|
const status = await pane?.getPaneStatus();
|
|
3716
3970
|
if (this.runtimeMonitorsFrozen || native !== this.nativePaneLifecycle || pane !== this.tmux)
|
|
3717
3971
|
return;
|
|
3972
|
+
if (this.footprintEnabled && status?.alive && status.pid && footprintOwner === JSON.stringify(this.interactionOwner()))
|
|
3973
|
+
this.footprintPane = { pid: status.pid, owner: footprintOwner, observedAt: footprintObservedAt, pane };
|
|
3718
3974
|
const snapshot = native.snapshot?.();
|
|
3719
3975
|
if (status?.alive === false && snapshot?.state === "exited") {
|
|
3720
3976
|
this.healthCheckPaused = true;
|
|
@@ -3755,12 +4011,15 @@ export class Daemon extends EventEmitter {
|
|
|
3755
4011
|
scheduleNext();
|
|
3756
4012
|
return true;
|
|
3757
4013
|
};
|
|
4014
|
+
const footprintObservedAt = this.footprintEnabled ? Date.now() : 0;
|
|
3758
4015
|
let paneStatus = await healthTmux.getPaneStatus();
|
|
3759
4016
|
// Auto-pause intentionally exits the pane process. A health tick that
|
|
3760
4017
|
// began just before pause must not classify that exit as a crash.
|
|
3761
4018
|
if (discardStaleHealth())
|
|
3762
4019
|
return;
|
|
3763
4020
|
if (paneStatus?.alive) {
|
|
4021
|
+
if (this.footprintEnabled && footprintObservedAt > 0 && paneStatus.pid)
|
|
4022
|
+
this.footprintPane = { pid: paneStatus.pid, owner: JSON.stringify(healthOwner), observedAt: footprintObservedAt, pane: healthTmux };
|
|
3764
4023
|
// A CLI shutdown also closes its MCP children. Revive tools only for
|
|
3765
4024
|
// a positively live pane, never while its exit is being classified.
|
|
3766
4025
|
measureSyncWork("daemon.healthCheck", () => this.checkMcpServerAlive());
|
|
@@ -4367,7 +4626,7 @@ export class Daemon extends EventEmitter {
|
|
|
4367
4626
|
const loginFlow = LOGIN_FLOWS[this.config.backend ?? "claude-code"];
|
|
4368
4627
|
if (loginFlow?.loginScreenActive && this.reportLoginScreen(pane))
|
|
4369
4628
|
return;
|
|
4370
|
-
const interactivePrompt = this.interactivePromptDetector.observe(pane, Date.now(), this.instanceStateLastOutputAt);
|
|
4629
|
+
const interactivePrompt = dialogs.some(d => d.humanOnly && Daemon.dialogMatches(d, pane)) ? null : this.interactivePromptDetector.observe(pane, Date.now(), this.instanceStateLastOutputAt);
|
|
4371
4630
|
if (interactivePrompt) {
|
|
4372
4631
|
this.logger.warn(interactivePrompt, "Interactive terminal prompt is waiting for human input");
|
|
4373
4632
|
// M-2269: the prompt as it was on screen, from this capture, for the Log.
|
|
@@ -4602,6 +4861,8 @@ export class Daemon extends EventEmitter {
|
|
|
4602
4861
|
}
|
|
4603
4862
|
/** Evaluate one pane snapshot. Kept synchronous so state-machine edges are unit-testable. */
|
|
4604
4863
|
evaluateErrorPatterns(pane, patterns, readyPattern, now = Date.now(), busyPattern = null) {
|
|
4864
|
+
if (this.staleAuthIssue())
|
|
4865
|
+
return; // Ready chrome and recovery deadlines cannot repair this process.
|
|
4605
4866
|
// Count occurrences across the WHOLE pane (not just text after the last
|
|
4606
4867
|
// ready prompt). One shared counter (the static below): arm requires
|
|
4607
4868
|
// count > baseline, so a drifted clone here would silently gate nudges.
|
|
@@ -4712,7 +4973,7 @@ export class Daemon extends EventEmitter {
|
|
|
4712
4973
|
// composer to establish its baseline; later appended occurrences remain eligible.
|
|
4713
4974
|
if ((ep.type === "rate_limit" && ep.action === "nudge_continue") || ep.historyUntilLiveComposer) {
|
|
4714
4975
|
const baseline = this.nudgeBaselines?.get(key);
|
|
4715
|
-
if (baseline === undefined || count <= baseline) {
|
|
4976
|
+
if ((baseline === undefined || count <= baseline) && !(ep.type === "stale_auth" && newQuotaAfterInput)) {
|
|
4716
4977
|
if (baseline !== undefined)
|
|
4717
4978
|
this.lastErrorCount.set(key, count);
|
|
4718
4979
|
continue;
|
|
@@ -4810,6 +5071,10 @@ export class Daemon extends EventEmitter {
|
|
|
4810
5071
|
});
|
|
4811
5072
|
return;
|
|
4812
5073
|
}
|
|
5074
|
+
if (ep.type === "stale_auth") {
|
|
5075
|
+
this.staleAuth = { generation: this.spawnGeneration, since: now };
|
|
5076
|
+
this.authFailureUnresolved = true;
|
|
5077
|
+
}
|
|
4813
5078
|
// #2795: auth text on the pane proves nothing about the credentials (22 of 22 such matches on the main host were
|
|
4814
5079
|
// conversation text). It arms nothing here; it only asks the lifecycle's token-free check, and a failing check
|
|
4815
5080
|
// arms the auth state through confirmAuthFailure().
|
|
@@ -5037,6 +5302,8 @@ export class Daemon extends EventEmitter {
|
|
|
5037
5302
|
return;
|
|
5038
5303
|
}
|
|
5039
5304
|
const verdict = { reached: false };
|
|
5305
|
+
let codexBefore = null;
|
|
5306
|
+
let cliBefore = null;
|
|
5040
5307
|
try {
|
|
5041
5308
|
await this.wake();
|
|
5042
5309
|
if (!this.isDeliveryEpochCurrent(deliveryEpoch)) {
|
|
@@ -5046,6 +5313,27 @@ export class Daemon extends EventEmitter {
|
|
|
5046
5313
|
tellWritten(false);
|
|
5047
5314
|
return;
|
|
5048
5315
|
}
|
|
5316
|
+
// M-3175: a codex switch is typed only into an idle pane of a codex known to take it, with the rollout's end taken first.
|
|
5317
|
+
if (ownSwitch?.codex) {
|
|
5318
|
+
const gate = await this.codexSwitchGate();
|
|
5319
|
+
if ("blocked" in gate) {
|
|
5320
|
+
this.logger.info({ requested: ownSwitch.codex, reason: gate.blocked, version: gate.version }, "Codex runtime switch not typed");
|
|
5321
|
+
reportSwitch({ outcome: "not_sent", reason: gate.blocked, version: gate.version ?? null });
|
|
5322
|
+
tellWritten(false);
|
|
5323
|
+
return;
|
|
5324
|
+
}
|
|
5325
|
+
codexBefore = gate;
|
|
5326
|
+
}
|
|
5327
|
+
if (ownSwitch?.cli) {
|
|
5328
|
+
const gate = await this.cliSwitchGate(ownSwitch.cli);
|
|
5329
|
+
if ("blocked" in gate) {
|
|
5330
|
+
this.logger.info({ requested: ownSwitch.cli, reason: gate.blocked, version: gate.version }, "CLI runtime switch not typed");
|
|
5331
|
+
reportSwitch({ outcome: "not_sent", reason: gate.blocked, version: gate.version ?? null });
|
|
5332
|
+
tellWritten(false);
|
|
5333
|
+
return;
|
|
5334
|
+
}
|
|
5335
|
+
cliBefore = gate;
|
|
5336
|
+
}
|
|
5049
5337
|
// Board 907c7899: the pane just before this attempt's paste — after its readiness wait, last capture and fence,
|
|
5050
5338
|
// under the paste lock (no other input lands in between). Each attempt looks again.
|
|
5051
5339
|
const lookBefore = async () => {
|
|
@@ -5060,8 +5348,10 @@ export class Daemon extends EventEmitter {
|
|
|
5060
5348
|
preserveExactBytes: true,
|
|
5061
5349
|
// #1690: our own /model holds every other delivery from its write on — before the lock is released, so a steer
|
|
5062
5350
|
// or /btw waiting on it cannot type into the gap before claude paints "Switch model?" (default cursor: Yes).
|
|
5063
|
-
...(ownSwitch || notifyWritten || contextReset ? { onPaneWritten: () => { if (contextReset)
|
|
5064
|
-
this.resetInboundPresentation();
|
|
5351
|
+
...(ownSwitch || notifyWritten || contextReset ? { onPaneWritten: () => { if (contextReset) {
|
|
5352
|
+
this.resetInboundPresentation();
|
|
5353
|
+
this.resetRoomConversation();
|
|
5354
|
+
} if (ownSwitch) {
|
|
5065
5355
|
this.ownSwitch = ownSwitch;
|
|
5066
5356
|
if (currentModelOwner())
|
|
5067
5357
|
modelObserver?.ownIntent(ownSwitch.requested);
|
|
@@ -5115,7 +5405,7 @@ export class Daemon extends EventEmitter {
|
|
|
5115
5405
|
reportSwitch({ outcome: "not_sent" }); // its write never began
|
|
5116
5406
|
else {
|
|
5117
5407
|
try {
|
|
5118
|
-
reportSwitch(await this.answerOwnSwitchDialog(ownSwitch));
|
|
5408
|
+
reportSwitch(ownSwitch.codex ? await this.verifyCodexSwitch(ownSwitch.codex, codexBefore) : ownSwitch.cli ? await this.verifyCliSwitch(ownSwitch.cli, cliBefore) : await this.answerOwnSwitchDialog(ownSwitch));
|
|
5119
5409
|
}
|
|
5120
5410
|
catch (err) {
|
|
5121
5411
|
this.logger.warn({ err: err.message }, "Answering our own model switch failed");
|
|
@@ -5145,11 +5435,118 @@ export class Daemon extends EventEmitter {
|
|
|
5145
5435
|
return;
|
|
5146
5436
|
}
|
|
5147
5437
|
const sw = msg.runtime_switch;
|
|
5148
|
-
const
|
|
5149
|
-
|
|
5438
|
+
const codexPart = (v) => v === null ? null : typeof v === "string" && v ? v : undefined;
|
|
5439
|
+
const codex = sw?.codex && typeof sw.codex === "object" ? { model: codexPart(sw.codex.model), effort: codexPart(sw.codex.effort) } : undefined;
|
|
5440
|
+
// M-3180: one generic spec for the CLIs of CLI_RUNTIME_SWITCH — a known backend and one command (which may carry both model and effort).
|
|
5441
|
+
const rawCli = sw?.cli;
|
|
5442
|
+
const cli = rawCli && typeof rawCli === "object" && typeof rawCli.backend === "string" && Object.hasOwn(CLI_RUNTIME_SWITCH, rawCli.backend)
|
|
5443
|
+
? { backend: rawCli.backend, model: codexPart(rawCli.model), effort: codexPart(rawCli.effort) } : rawCli === undefined ? undefined : null;
|
|
5444
|
+
const cliOk = !cli || (cli.model !== undefined && cli.effort !== undefined && (cli.model !== null || cli.effort !== null)
|
|
5445
|
+
&& CLI_RUNTIME_SWITCH[cli.backend].command({ model: cli.model, effort: cli.effort }) === msg.content);
|
|
5446
|
+
// A malformed switch must not downgrade into an ungated legacy raw paste.
|
|
5447
|
+
if (rawCli !== undefined && (cli === null || !cliOk || codex || !sw || typeof sw.id !== "string" || sw.kind !== "model" || typeof sw.requested !== "string")) {
|
|
5448
|
+
if (typeof sw?.id === "string")
|
|
5449
|
+
this.broadcastFleetMessage({ type: "runtime_switch_result", id: sw.id, outcome: "not_sent", reason: "command" });
|
|
5450
|
+
return;
|
|
5451
|
+
}
|
|
5452
|
+
const ownSwitch = sw && typeof sw.id === "string" && sw.kind === "model" && typeof sw.requested === "string" && cli !== null && cliOk && !(codex && cli)
|
|
5453
|
+
&& (!codex || (codex.model !== undefined && codex.effort !== undefined && (codex.model !== null || codex.effort !== null)))
|
|
5454
|
+
? { id: sw.id, kind: "model", requested: sw.requested,
|
|
5455
|
+
...(codex ? { codex: { model: codex.model, effort: codex.effort } } : {}),
|
|
5456
|
+
...(cli ? { cli: { backend: cli.backend, model: cli.model, effort: cli.effort } } : {}) } : undefined;
|
|
5150
5457
|
const notifyWritten = typeof msg.notify_written === "string" && /^[0-9a-f]{16}$/.test(msg.notify_written) ? msg.notify_written : undefined;
|
|
5151
5458
|
this.queueRawPaste(msg.content, this.captureDeliveryEpoch(msg.delivery_epoch), msg.confirm_clear === true, durableAttempt ? { ...durableAttempt, submissionMode: "raw_paste", silentSchedule: msg.silent_schedule === true } : undefined, ownSwitch, notifyWritten, msg.context_reset === "clear" || msg.context_reset === "compact" ? msg.context_reset : undefined);
|
|
5152
5459
|
}
|
|
5460
|
+
/**
|
|
5461
|
+
* M-3175: before typing a codex `/model … --reasoning=…`: the pane authoritatively idle (bounded), the RUNNING codex at a
|
|
5462
|
+
* version that has the inline form (an older one would send the line to the model as a prompt), and what the switch is
|
|
5463
|
+
* verified against afterwards — the rollout's end when the session has one, and the count of codex's answers on the pane.
|
|
5464
|
+
*/
|
|
5465
|
+
async codexSwitchGate() {
|
|
5466
|
+
const tmux = this.tmux;
|
|
5467
|
+
if (!tmux || !await this.waitForAuthoritativePaneIdle(CODEX_SWITCH_IDLE_MS, 500) || this.tmux !== tmux)
|
|
5468
|
+
return { blocked: "busy" };
|
|
5469
|
+
const pid = await tmux.getPanePid?.() ?? null;
|
|
5470
|
+
const version = pid ? await codexRunningVersion(pid) : null;
|
|
5471
|
+
if (!codexSupportsInlineModel(version))
|
|
5472
|
+
return { blocked: "version", version };
|
|
5473
|
+
const pane = await tmux.capturePaneWithHistory(CODEX_SWITCH_HISTORY_LINES).catch(() => "");
|
|
5474
|
+
let rollout = null;
|
|
5475
|
+
const session = this.backend?.readRawPasteSession?.(pane);
|
|
5476
|
+
if (session) {
|
|
5477
|
+
const file = await checkpointCodexPane(session.sessionsDir, session.sessionId, this.config.working_directory || process.cwd()).catch(() => null);
|
|
5478
|
+
if (file)
|
|
5479
|
+
rollout = { path: file.path, offset: file.offset };
|
|
5480
|
+
}
|
|
5481
|
+
return { rollout, answers: codexSwitchAnswerCount(pane), version };
|
|
5482
|
+
}
|
|
5483
|
+
/**
|
|
5484
|
+
* M-3180: before typing a CLI_RUNTIME_SWITCH step: the pane authoritatively idle (bounded), the RUNNING binary at the entry's minimum
|
|
5485
|
+
* for this step, and what the verdict compares against — the scrollback before the command and the entry's record checkpoint.
|
|
5486
|
+
*/
|
|
5487
|
+
async cliSwitchGate(step) {
|
|
5488
|
+
const tmux = this.tmux, entry = CLI_RUNTIME_SWITCH[step.backend];
|
|
5489
|
+
if (!entry || !tmux || !await this.waitForAuthoritativePaneIdle(CODEX_SWITCH_IDLE_MS, 500) || this.tmux !== tmux)
|
|
5490
|
+
return { blocked: "busy" };
|
|
5491
|
+
const pid = await tmux.getPanePid?.() ?? null;
|
|
5492
|
+
const version = pid ? await cliRunningVersion(pid, { backend: step.backend, matchExe: entry.matchExe, versionFromExe: entry.versionFromExe }) : null;
|
|
5493
|
+
if (!cliSwitchAllowed(entry, step, version))
|
|
5494
|
+
return { blocked: "version", version };
|
|
5495
|
+
const pane = await tmux.capturePaneWithHistory(CODEX_SWITCH_HISTORY_LINES).catch(() => "");
|
|
5496
|
+
const record = entry.checkpoint ? await entry.checkpoint(pane, this.config.working_directory || process.cwd(), pid).catch(() => undefined) : undefined;
|
|
5497
|
+
return { pane, ...(record !== undefined ? { record } : {}) };
|
|
5498
|
+
}
|
|
5499
|
+
/** M-3180: the entry's verdict on the scrollback after the step, against the one before it; nothing in time is not confirmed. */
|
|
5500
|
+
async verifyCliSwitch(step, before) {
|
|
5501
|
+
const tmux = this.tmux, entry = CLI_RUNTIME_SWITCH[step.backend];
|
|
5502
|
+
if (!tmux || !before || !entry)
|
|
5503
|
+
return { outcome: "not_confirmed" };
|
|
5504
|
+
const deadline = performance.now() + CODEX_SWITCH_VERIFY_MS;
|
|
5505
|
+
while (performance.now() < deadline && this.tmux === tmux) {
|
|
5506
|
+
const pane = await tmux.capturePaneWithHistory(CODEX_SWITCH_HISTORY_LINES).catch(() => "");
|
|
5507
|
+
const verdict = await entry.verify({ model: step.model, effort: step.effort }, before, { pane });
|
|
5508
|
+
if (verdict?.outcome === "switched")
|
|
5509
|
+
return { outcome: "switched", confirmed: true, shown: verdict.shown };
|
|
5510
|
+
if (verdict?.outcome === "mismatch")
|
|
5511
|
+
return { outcome: "mismatch", shown: verdict.shown, answered: true };
|
|
5512
|
+
await new Promise(resolve => setTimeout(resolve, 200));
|
|
5513
|
+
}
|
|
5514
|
+
return { outcome: "not_confirmed" };
|
|
5515
|
+
}
|
|
5516
|
+
/**
|
|
5517
|
+
* M-3175: what our codex switch came to. The rollout's `thread_settings_applied` written after our checkpoint is the proof
|
|
5518
|
+
* (codex writes it at once once the session has a rollout); a session with none yet has codex's own answer on the pane —
|
|
5519
|
+
* a NEW `• Model changed to … for this session only` (or `■` refusal) after the ones counted before the line was typed.
|
|
5520
|
+
* Anything that does not name what was asked is a mismatch; no answer in time is not confirmed. The fleet restarts on both.
|
|
5521
|
+
*/
|
|
5522
|
+
async verifyCodexSwitch(want, before) {
|
|
5523
|
+
const tmux = this.tmux;
|
|
5524
|
+
if (!tmux || !before)
|
|
5525
|
+
return { outcome: "not_confirmed" };
|
|
5526
|
+
const fits = (model, effort) => (want.model === null || model === want.model) && (want.effort === null || effort === want.effort);
|
|
5527
|
+
const deadline = performance.now() + CODEX_SWITCH_VERIFY_MS;
|
|
5528
|
+
while (performance.now() < deadline && this.tmux === tmux) {
|
|
5529
|
+
if (before.rollout) {
|
|
5530
|
+
const applied = codexAppliedFromRollout(await readFrom(before.rollout.path, before.rollout.offset, CODEX_SWITCH_ROLLOUT_READ));
|
|
5531
|
+
if (applied) {
|
|
5532
|
+
const shown = `${applied.model} ${applied.effort ?? "default"}`;
|
|
5533
|
+
return fits(applied.model, applied.effort) ? { outcome: "switched", confirmed: true, shown } : { outcome: "mismatch", shown, answered: true };
|
|
5534
|
+
}
|
|
5535
|
+
}
|
|
5536
|
+
const pane = await tmux.capturePaneWithHistory(CODEX_SWITCH_HISTORY_LINES).catch(() => "");
|
|
5537
|
+
if (codexSwitchAnswerCount(pane) > before.answers) {
|
|
5538
|
+
const answer = codexSwitchFromPane(pane);
|
|
5539
|
+
if (answer?.kind === "refused")
|
|
5540
|
+
return { outcome: "mismatch", shown: answer.text, answered: true };
|
|
5541
|
+
if (answer?.kind === "switched" && !before.rollout) {
|
|
5542
|
+
const shown = `${answer.model} ${answer.effort}`;
|
|
5543
|
+
return fits(answer.model, answer.effort) ? { outcome: "switched", confirmed: true, shown } : { outcome: "mismatch", shown, answered: true };
|
|
5544
|
+
}
|
|
5545
|
+
}
|
|
5546
|
+
await new Promise(resolve => setTimeout(resolve, 200));
|
|
5547
|
+
}
|
|
5548
|
+
return { outcome: "not_confirmed" };
|
|
5549
|
+
}
|
|
5153
5550
|
/**
|
|
5154
5551
|
* #1690 (the user's choice A): after AgEnD's own `/model <name>`, claude may ask "Switch model?" (a warm cache for
|
|
5155
5552
|
* another model). When the model it names is the one asked for, answer Yes; otherwise No (Escape — `Kept model as …`),
|
|
@@ -5607,7 +6004,7 @@ export class Daemon extends EventEmitter {
|
|
|
5607
6004
|
await this.ipcServer?.close();
|
|
5608
6005
|
// Clean up backend config files
|
|
5609
6006
|
if (this.backend?.cleanup) {
|
|
5610
|
-
this.backend.cleanup(this.buildBackendConfig());
|
|
6007
|
+
this.backend.cleanup(this.buildBackendConfig(false));
|
|
5611
6008
|
}
|
|
5612
6009
|
// Clean up checked-out repos
|
|
5613
6010
|
try {
|
|
@@ -5660,6 +6057,16 @@ export class Daemon extends EventEmitter {
|
|
|
5660
6057
|
}
|
|
5661
6058
|
return { ...snapshot, interaction: this.getInteractionSnapshot() };
|
|
5662
6059
|
}
|
|
6060
|
+
footprintEnabled = false;
|
|
6061
|
+
footprintPane = null;
|
|
6062
|
+
setHostFootprintEnabled(enabled) { this.footprintEnabled = enabled; if (!enabled)
|
|
6063
|
+
this.footprintPane = null; }
|
|
6064
|
+
hostFootprintRoot() {
|
|
6065
|
+
const cached = this.footprintPane;
|
|
6066
|
+
if (!this.footprintEnabled || !cached || cached.pane !== this.tmux || cached.owner !== JSON.stringify(this.interactionOwner()) || this.isPaused || this.spawning || this.healthCheckPaused || this.runtimeMonitorsFrozen || Date.now() - cached.observedAt > 120000)
|
|
6067
|
+
return null;
|
|
6068
|
+
return { pid: cached.pid, owner: cached.owner, observedAt: cached.observedAt };
|
|
6069
|
+
}
|
|
5663
6070
|
interactionOwner() {
|
|
5664
6071
|
return { bootId: this.bootId, spawnGeneration: this.spawnGeneration,
|
|
5665
6072
|
launchAttempt: this.launchAttempt, launchFenceEpoch: this.launchFenceEpoch };
|
|
@@ -5910,6 +6317,10 @@ export class Daemon extends EventEmitter {
|
|
|
5910
6317
|
}
|
|
5911
6318
|
/** Shared Fleet inputs: socket and native transports retain the same wake, epoch and raw-paste semantics. */
|
|
5912
6319
|
handleFleetMessage(msg, send, current = () => true) {
|
|
6320
|
+
if (msg.type === "hub_room_tools_changed") {
|
|
6321
|
+
this.ipcServer?.broadcast({ type: "hub_room_tools_changed" });
|
|
6322
|
+
return true;
|
|
6323
|
+
}
|
|
5913
6324
|
if (msg.type === "query_sessions") {
|
|
5914
6325
|
send({ type: "query_sessions_response", sessions: [] });
|
|
5915
6326
|
}
|
|
@@ -6058,7 +6469,7 @@ export class Daemon extends EventEmitter {
|
|
|
6058
6469
|
this.pauseRequested = false;
|
|
6059
6470
|
return false;
|
|
6060
6471
|
}
|
|
6061
|
-
if (!ready() || admission && !admission.accepts(text) || this.backend?.backgroundWorkRunning?.(text)
|
|
6472
|
+
if (!ready() || admission && !admission.accepts(text) || this.backend?.isDraftIdlePane?.(text) === true || this.backend?.backgroundWorkRunning?.(text)
|
|
6062
6473
|
|| !allowStuck && !this.paneAuthoritativelyIdle(text)) {
|
|
6063
6474
|
this.pauseRequested = false;
|
|
6064
6475
|
return false;
|
|
@@ -6216,7 +6627,8 @@ export class Daemon extends EventEmitter {
|
|
|
6216
6627
|
// auth pause — otherwise the instance would pause again the moment it idles.
|
|
6217
6628
|
this.pausePending = false;
|
|
6218
6629
|
this.pauseReconfirmAuth = false;
|
|
6219
|
-
this.
|
|
6630
|
+
if (!this.staleAuthIssue())
|
|
6631
|
+
this.authFailureUnresolved = false;
|
|
6220
6632
|
this.unverifiedAuthMatch = null;
|
|
6221
6633
|
this.loginScreenReported = false;
|
|
6222
6634
|
this.fatalStartupReported = false;
|
|
@@ -6446,7 +6858,9 @@ export class Daemon extends EventEmitter {
|
|
|
6446
6858
|
this.logStateEdge(previous, snapshot);
|
|
6447
6859
|
this.publishWorkingState("execution");
|
|
6448
6860
|
this.emit("instance_state", { name: this.name, ...snapshot });
|
|
6449
|
-
this.broadcastFleetMessage({ type: "instance_state", instanceName: this.name, ...snapshot
|
|
6861
|
+
this.broadcastFleetMessage({ type: "instance_state", instanceName: this.name, ...snapshot,
|
|
6862
|
+
turnEvidence: this.turnEvidence(), turnActivityAt: this.turnWatch.activityAt });
|
|
6863
|
+
this.noteTurnEdge(snapshot.state);
|
|
6450
6864
|
if (snapshot.state === "stuck" && pane && this.instanceStateReadyPattern) {
|
|
6451
6865
|
this.handleStuckTransition(pane, snapshot, this.instanceStateReadyPattern);
|
|
6452
6866
|
}
|
|
@@ -6887,6 +7301,62 @@ export class Daemon extends EventEmitter {
|
|
|
6887
7301
|
* This launch's transcript monitor. #1510: its turn boundaries feed the reply guard's ledger, which starts empty
|
|
6888
7302
|
* with it — a new monitor re-baselines at the transcript's end, so nothing the old one read can be attributed.
|
|
6889
7303
|
*/
|
|
7304
|
+
/** M-3239: this launch's turn as its transcript tells it (dispatcher-liveness.ts). */
|
|
7305
|
+
turnWatch = new TurnWatch();
|
|
7306
|
+
turnActivitySentAt = 0;
|
|
7307
|
+
hubRoomInputEpoch = 0;
|
|
7308
|
+
hubRoomTranscriptActivity = 0;
|
|
7309
|
+
hubRoomTurnActivityStart = null;
|
|
7310
|
+
hubRoomTurnBoot = randomUUID();
|
|
7311
|
+
hubRoomTurnSequence = 0;
|
|
7312
|
+
turnEndTimer = null;
|
|
7313
|
+
/** M-3239: Claude's and Codex's transcripts tell each tool call and answer; their pane's spinner alone is not a turn. */
|
|
7314
|
+
turnEvidence() {
|
|
7315
|
+
const bin = this.backend?.binaryName;
|
|
7316
|
+
return (bin === "claude" || bin === "codex") && this.transcriptMonitor?.following() === true;
|
|
7317
|
+
}
|
|
7318
|
+
/** M-3239: progress for the board's quiet clock, at most every 30 s while a turn runs (the idle edge carries the last). */
|
|
7319
|
+
reportTurnActivity() {
|
|
7320
|
+
const now = Date.now();
|
|
7321
|
+
if (now - this.turnActivitySentAt < TURN_ACTIVITY_REPORT_MS)
|
|
7322
|
+
return;
|
|
7323
|
+
this.turnActivitySentAt = now;
|
|
7324
|
+
this.broadcastFleetMessage({ type: "turn_activity", instanceName: this.name, at: now });
|
|
7325
|
+
}
|
|
7326
|
+
/**
|
|
7327
|
+
* M-3239: on the pane's idle edge, after a moment for the transcript's last lines: the turn's final text, when it
|
|
7328
|
+
* messaged no one — the fleet tells the dispatcher of a claimed card if that text asks a question.
|
|
7329
|
+
*/
|
|
7330
|
+
noteTurnEdge(state) {
|
|
7331
|
+
if (state !== "idle") {
|
|
7332
|
+
if (this.turnEndTimer) {
|
|
7333
|
+
clearTimeout(this.turnEndTimer);
|
|
7334
|
+
this.turnEndTimer = null;
|
|
7335
|
+
}
|
|
7336
|
+
if (state === "working") {
|
|
7337
|
+
this.turnWatch.begin(Date.now());
|
|
7338
|
+
this.hubRoomTurnActivityStart ??= this.hubRoomTranscriptActivity;
|
|
7339
|
+
}
|
|
7340
|
+
return;
|
|
7341
|
+
}
|
|
7342
|
+
if (this.turnEndTimer)
|
|
7343
|
+
return;
|
|
7344
|
+
const roomGeneration = this.roomConversationState ? this.roomConversationGeneration() : null, roomInputEpoch = this.hubRoomInputEpoch;
|
|
7345
|
+
this.turnEndTimer = setTimeout(() => {
|
|
7346
|
+
this.turnEndTimer = null; // a working edge before this cancels it: the turn went on
|
|
7347
|
+
const turn = this.turnWatch.end();
|
|
7348
|
+
// A Claude/Codex compaction spinner is not a completed model turn. Require fresh tool/text evidence.
|
|
7349
|
+
const bin = this.backend?.binaryName, needsTranscript = bin === "claude" || bin === "codex";
|
|
7350
|
+
const realWork = !needsTranscript || this.hubRoomTurnActivityStart !== null && this.hubRoomTranscriptActivity > this.hubRoomTurnActivityStart;
|
|
7351
|
+
this.hubRoomTurnActivityStart = null;
|
|
7352
|
+
if (turn && realWork && roomGeneration && roomGeneration === this.roomConversationGeneration() && roomInputEpoch === this.hubRoomInputEpoch)
|
|
7353
|
+
this.broadcastFleetMessage({ type: "hub_room_turn_ended", generation: roomGeneration, turn: `${this.hubRoomTurnBoot}:${++this.hubRoomTurnSequence}` });
|
|
7354
|
+
if (!turn || turn.messaged || !turn.text.trim() || !this.turnEvidence())
|
|
7355
|
+
return;
|
|
7356
|
+
this.broadcastFleetMessage({ type: "turn_ended", instanceName: this.name, startedAt: turn.startedAt, text: turn.text.slice(-4000) });
|
|
7357
|
+
}, TURN_END_SETTLE_MS);
|
|
7358
|
+
this.turnEndTimer.unref?.();
|
|
7359
|
+
}
|
|
6890
7360
|
buildTranscriptMonitor(source) {
|
|
6891
7361
|
this.followLog.reset();
|
|
6892
7362
|
const modelLaunch = this.backend?.modelObservationLaunch?.();
|
|
@@ -6905,6 +7375,12 @@ export class Daemon extends EventEmitter {
|
|
|
6905
7375
|
this.claudeModelObserver = modelObserver;
|
|
6906
7376
|
this.modelObservationBound = false;
|
|
6907
7377
|
const owner = launchIdentity(this.interactionOwner());
|
|
7378
|
+
const credentialLaunch = source || !this.isClaudeCodeBackend() ? null : this.backend?.credentialObservationLaunch?.();
|
|
7379
|
+
monitor.on("claude_request", (record, launchId) => {
|
|
7380
|
+
if (!credentialLaunch || credentialLaunch.binding.kind === "subscription" || this.transcriptMonitor !== monitor || owner !== launchIdentity(this.interactionOwner()) || this.deliveryWritesStopping || this.startupAborted || launchId !== credentialLaunch.launch.id || this.backend?.credentialObservationLaunch?.()?.launch.id !== launchId || record.at < credentialLaunch.launch.startedAt || !credentialLaunch.sourceCurrent())
|
|
7381
|
+
return;
|
|
7382
|
+
this.emit("claude_credential_request", { binding: credentialLaunch.binding, record, owner: this.interactionOwner() });
|
|
7383
|
+
});
|
|
6908
7384
|
let reminderSession = modelObserver?.checkpoint().sessionId ?? null;
|
|
6909
7385
|
const observeReminderBoundary = (sessionId, before, after) => {
|
|
6910
7386
|
const selected = (s) => normalizeClaudeModel(s.session ?? s.launch);
|
|
@@ -6969,6 +7445,23 @@ export class Daemon extends EventEmitter {
|
|
|
6969
7445
|
});
|
|
6970
7446
|
for (const event of ["tool_use", "tool_result", "assistant_text"])
|
|
6971
7447
|
monitor.on(event, touch);
|
|
7448
|
+
// M-3239: the turn as the transcript tells it — progress for the board's quiet clock, and the question a turn ends on.
|
|
7449
|
+
const mine = () => this.transcriptMonitor === monitor;
|
|
7450
|
+
monitor.on("tool_use", (name, input) => { if (mine()) {
|
|
7451
|
+
this.hubRoomTranscriptActivity++;
|
|
7452
|
+
this.turnWatch.tool(name, input, Date.now());
|
|
7453
|
+
this.reportTurnActivity();
|
|
7454
|
+
} });
|
|
7455
|
+
monitor.on("tool_result", () => { if (mine()) {
|
|
7456
|
+
this.hubRoomTranscriptActivity++;
|
|
7457
|
+
this.turnWatch.result(Date.now());
|
|
7458
|
+
this.reportTurnActivity();
|
|
7459
|
+
} });
|
|
7460
|
+
monitor.on("assistant_text", (text) => { if (mine()) {
|
|
7461
|
+
this.hubRoomTranscriptActivity++;
|
|
7462
|
+
this.turnWatch.text(text, Date.now());
|
|
7463
|
+
this.reportTurnActivity();
|
|
7464
|
+
} });
|
|
6972
7465
|
return monitor;
|
|
6973
7466
|
}
|
|
6974
7467
|
/**
|
|
@@ -7398,7 +7891,7 @@ export class Daemon extends EventEmitter {
|
|
|
7398
7891
|
// work cannot hide behind this: it changes the layout, the next
|
|
7399
7892
|
// output arms another probe, and the debounce capture still fires.
|
|
7400
7893
|
// #1641: never while the transcript shows a turn running — that idle-looking screen is mid-turn.
|
|
7401
|
-
if (this.instanceState === "idle" && this.
|
|
7894
|
+
if (this.instanceState === "idle" && this.executionIdleProof()?.(pane) === true
|
|
7402
7895
|
&& this.transcriptTurnState() !== "open")
|
|
7403
7896
|
return;
|
|
7404
7897
|
// A second burst overtook the probe. Do not bless its stale capture as
|
|
@@ -7435,7 +7928,7 @@ export class Daemon extends EventEmitter {
|
|
|
7435
7928
|
// observe twice, which silently disabled the "content moved" branch.
|
|
7436
7929
|
if (this.backend?.periodicRedrawFrom)
|
|
7437
7930
|
this.periodicRedrawLayout = this.backend.periodicRedrawFrom(pane);
|
|
7438
|
-
const structuredPeriodicIdle = this.
|
|
7931
|
+
const structuredPeriodicIdle = this.executionIdleProof();
|
|
7439
7932
|
// #1641: the transcript outranks the pane: while it shows the turn running, no reading of this pane is idle (codex
|
|
7440
7933
|
// hides its status row while streaming, leaving the idle composer and footer in view mid-turn).
|
|
7441
7934
|
const transcriptTurn = this.transcriptTurnState();
|
|
@@ -7665,6 +8158,13 @@ export class Daemon extends EventEmitter {
|
|
|
7665
8158
|
return undefined;
|
|
7666
8159
|
return proof;
|
|
7667
8160
|
}
|
|
8161
|
+
/** Draft text can be execution-idle, but must not become empty-composer proof for delivery, pause or nudges. */
|
|
8162
|
+
executionIdleProof() {
|
|
8163
|
+
const empty = this.periodicIdleProof(), draft = this.backend?.isDraftIdlePane;
|
|
8164
|
+
if (!empty && !draft)
|
|
8165
|
+
return undefined;
|
|
8166
|
+
return pane => empty?.call(this.backend, pane) === true || draft?.call(this.backend, pane) === true;
|
|
8167
|
+
}
|
|
7668
8168
|
bindInstanceStateOutputListener(windowId) {
|
|
7669
8169
|
if (!this.controlClient || !this.instanceStateMonitorActive)
|
|
7670
8170
|
return;
|
|
@@ -8235,7 +8735,7 @@ export class Daemon extends EventEmitter {
|
|
|
8235
8735
|
// terminal state is announced by the outbox only after its retry/TTL policy
|
|
8236
8736
|
// is exhausted; emitting ❌ here would expose a transient gate timeout.
|
|
8237
8737
|
if (status && !verdict.durableAttempt)
|
|
8238
|
-
this.emit("message_failed", status); // ❌
|
|
8738
|
+
this.emit("message_failed", { ...status, phase, proof }); // ❌
|
|
8239
8739
|
return false;
|
|
8240
8740
|
}
|
|
8241
8741
|
/** Tell the fleet when an already-accepted cross-instance pane write failed. */
|
|
@@ -8498,7 +8998,9 @@ export class Daemon extends EventEmitter {
|
|
|
8498
8998
|
// byte for byte (its proof is the wire's hash), so the notice waits for the next delivery without one.
|
|
8499
8999
|
const whatsNew = this.pendingWhatsNew && !meta.human_receipt_id && !meta.handoff_redelivery
|
|
8500
9000
|
? this.currentWhatsNew(this.pendingWhatsNew) : null;
|
|
8501
|
-
const
|
|
9001
|
+
const body = whatsNew ? withWhatsNew(formatted, whatsNew.notice) : formatted;
|
|
9002
|
+
const roomMarker = roomContextInputMarker(meta);
|
|
9003
|
+
const pasted = roomMarker ? `${roomMarker}\n${body}` : body;
|
|
8502
9004
|
const status = channelStatus(meta);
|
|
8503
9005
|
// A fresh delivery begins a fresh turn — its bubble must not inherit
|
|
8504
9006
|
// the previous turn's tool list.
|
|
@@ -8516,6 +9018,10 @@ export class Daemon extends EventEmitter {
|
|
|
8516
9018
|
this.logger.info({ handoff: meta.handoff_redelivery }, "Queued hand-off redelivery dropped: its CLI was replaced before the write");
|
|
8517
9019
|
return;
|
|
8518
9020
|
}
|
|
9021
|
+
if (meta.hub_room_context_generation && meta.hub_room_context_generation !== this.roomConversationGeneration()) {
|
|
9022
|
+
this.reportCrossInstanceDeliveryFailure(meta, { reached: true, phase: "room-context", proof: "stale-generation" });
|
|
9023
|
+
return;
|
|
9024
|
+
}
|
|
8519
9025
|
const durableAttempt = this.durableDeliveryAttempt(meta, content);
|
|
8520
9026
|
if (durableAttempt === false) {
|
|
8521
9027
|
this.deferDurableDelivery(meta, "invalid durable delivery attempt metadata");
|
|
@@ -8527,6 +9033,7 @@ export class Daemon extends EventEmitter {
|
|
|
8527
9033
|
sent = await this.deliverMessage(pasted, status, {
|
|
8528
9034
|
deliveryEpoch,
|
|
8529
9035
|
submissionId: meta.message_id,
|
|
9036
|
+
...(meta.hub_room_context_generation ? { roomContextGeneration: meta.hub_room_context_generation } : {}),
|
|
8530
9037
|
...(meta.verification_id ? { humanVerificationId: meta.verification_id, humanMeta: meta } : {}),
|
|
8531
9038
|
verdict,
|
|
8532
9039
|
durableAttempt: durableAttempt || undefined,
|
|
@@ -8620,8 +9127,8 @@ export class Daemon extends EventEmitter {
|
|
|
8620
9127
|
const verdict = opts?.verdict ?? { reached: false };
|
|
8621
9128
|
if (opts?.durableAttempt)
|
|
8622
9129
|
verdict.durableAttempt = true;
|
|
8623
|
-
const cancelled = () => opts?.deliveryEpoch !== undefined
|
|
8624
|
-
&&
|
|
9130
|
+
const cancelled = () => (opts?.deliveryEpoch !== undefined && !this.isDeliveryEpochCurrent(opts.deliveryEpoch))
|
|
9131
|
+
|| (!!opts?.roomContextGeneration && opts.roomContextGeneration !== this.roomConversationGeneration());
|
|
8625
9132
|
if (cancelled() || this.stormWindow?.isStopped())
|
|
8626
9133
|
return false;
|
|
8627
9134
|
formatted = prepareDeliveryWire(formatted, opts?.preserveExactBytes);
|
|
@@ -8648,7 +9155,7 @@ export class Daemon extends EventEmitter {
|
|
|
8648
9155
|
const settleFence = this.launchFenceEpoch;
|
|
8649
9156
|
if (cancelled())
|
|
8650
9157
|
return false;
|
|
8651
|
-
if (this.
|
|
9158
|
+
if (this.refuseBlockedDelivery(verdict, status))
|
|
8652
9159
|
return false;
|
|
8653
9160
|
let windowId = this.getWindowId();
|
|
8654
9161
|
const supportsQueuedInput = this.backend?.supportsQueuedInput?.() === true;
|
|
@@ -8731,29 +9238,50 @@ export class Daemon extends EventEmitter {
|
|
|
8731
9238
|
// must come back AND the check runs again — the stranded text may still
|
|
8732
9239
|
// be there. "failed" (the Enter could not be sent) fails the delivery:
|
|
8733
9240
|
// pasting now would submit both messages as one.
|
|
8734
|
-
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
return
|
|
9241
|
+
const inputDeadline = Date.now() + 30 * 60_000;
|
|
9242
|
+
let submissions = 0;
|
|
9243
|
+
let unavailableProbes = 0;
|
|
9244
|
+
for (;;) {
|
|
9245
|
+
if (cancelled())
|
|
9246
|
+
return false;
|
|
9247
|
+
if (Date.now() >= inputDeadline) {
|
|
9248
|
+
this.logger.error("Input row stayed unavailable until the delivery deadline");
|
|
9249
|
+
return this.failDelivery(verdict, status, "stranded-input", "input-not-clear-timeout");
|
|
8740
9250
|
}
|
|
8741
|
-
|
|
9251
|
+
// Only actual recovery Enters spend the submission budget. A live pane's
|
|
9252
|
+
// unreadable/changing composer may need time, not three synchronous probes.
|
|
9253
|
+
const stranded = await this.submitStrandedInputIfAny(windowId, submissions < STRANDED_INPUT_MAX_ROUNDS);
|
|
8742
9254
|
if (cancelled())
|
|
8743
9255
|
return false;
|
|
8744
9256
|
if (stranded === "idle")
|
|
8745
9257
|
break;
|
|
9258
|
+
if (stranded === "exhausted") {
|
|
9259
|
+
this.logger.error({ submissions }, "Input row still not clear after the stranded-text recovery budget — reporting delivery failure");
|
|
9260
|
+
return this.failDelivery(verdict, status, "stranded-input", "retry-budget-exhausted");
|
|
9261
|
+
}
|
|
8746
9262
|
if (stranded === "failed") {
|
|
8747
|
-
this.logger.error({
|
|
9263
|
+
this.logger.error({ submissions }, "Could not submit the stranded text — reporting delivery failure");
|
|
8748
9264
|
return this.failDelivery(verdict, status, "stranded-input", "enter-failed");
|
|
8749
9265
|
}
|
|
8750
|
-
|
|
9266
|
+
if (stranded === "submitted")
|
|
9267
|
+
submissions++;
|
|
9268
|
+
// Only the proven empty unknown-footer candidate needs the timed
|
|
9269
|
+
// fallback. Preserve the existing bounded refusal for other unsafe
|
|
9270
|
+
// input (including a stranded draft whose footer cannot be proved).
|
|
9271
|
+
if (stranded === "busy" && this.footerFallbackPaneKey === null && ++unavailableProbes >= STRANDED_INPUT_MAX_ROUNDS) {
|
|
9272
|
+
return this.failDelivery(verdict, status, "stranded-input", "input-not-clear");
|
|
9273
|
+
}
|
|
9274
|
+
const readyAgain = await this.waitForPaneReadyForDelivery(windowId, inputDeadline - Date.now());
|
|
8751
9275
|
if (cancelled())
|
|
8752
9276
|
return false;
|
|
8753
9277
|
if (!readyAgain) {
|
|
8754
|
-
this.logger.error("Pane never returned to its prompt after
|
|
9278
|
+
this.logger.error("Pane never returned to its prompt after checking stranded input — reporting delivery failure");
|
|
8755
9279
|
return this.failDelivery(verdict, status, "stranded-input", "prompt-timeout");
|
|
8756
9280
|
}
|
|
9281
|
+
// After startup, the general idle gate can pass while the stricter input
|
|
9282
|
+
// proof is still collecting a stable composer. Yield before re-reading it.
|
|
9283
|
+
if (stranded === "busy")
|
|
9284
|
+
await new Promise(resolve => setTimeout(resolve, BOTTOM_READY_POLL_MS));
|
|
8757
9285
|
}
|
|
8758
9286
|
}
|
|
8759
9287
|
// Everything above is *waiting*; everything below owns the write lock.
|
|
@@ -8773,7 +9301,7 @@ export class Daemon extends EventEmitter {
|
|
|
8773
9301
|
// delivery from the top, where the settle wait runs again outside it.
|
|
8774
9302
|
if (!settledClean || settleGeneration !== this.spawnGeneration || this.spawning)
|
|
8775
9303
|
return "spawn-started";
|
|
8776
|
-
if (this.
|
|
9304
|
+
if (this.refuseBlockedDelivery(verdict, status))
|
|
8777
9305
|
return false;
|
|
8778
9306
|
// A passive startup phase may paint after the outer readiness probe.
|
|
8779
9307
|
// It clears without input, so waiting under the pane lock cannot starve
|
|
@@ -8807,6 +9335,7 @@ export class Daemon extends EventEmitter {
|
|
|
8807
9335
|
// same process, a pause/stop/respawn is not (launchFenceEpoch moves even
|
|
8808
9336
|
// when a failed pause resumes the monitors).
|
|
8809
9337
|
const writeCurrent = () => !cancelled()
|
|
9338
|
+
&& !this.staleAuthIssue()
|
|
8810
9339
|
&& !this.deliveryWritesStopping
|
|
8811
9340
|
&& !this.runtimeMonitorsFrozen
|
|
8812
9341
|
&& !this.spawning
|
|
@@ -9666,7 +10195,7 @@ export class Daemon extends EventEmitter {
|
|
|
9666
10195
|
locked: fn => this.paneWriteLock.run(fn),
|
|
9667
10196
|
// An unreadable screen (a failed capture, another spawn's pane) is unknown — never "the card closed".
|
|
9668
10197
|
read: async () => answerScreen = this.tmux === tmux ? await tmux.capturePane().catch(() => null) : null,
|
|
9669
|
-
key: key => this.tmux !== tmux || answerScreen === null ? Promise.resolve(false) : key === "Space" ? (this.nativePaneLifecycle ? tmux.sendKeys(" ", { kind: "dialog", screen: answerScreen }) : tmux.sendKeys(" ")) : (this.nativePaneLifecycle ? tmux.sendSpecialKey(key, undefined, { kind: "dialog", screen: answerScreen }) : tmux.sendSpecialKey(key)),
|
|
10198
|
+
key: key => this.tmux !== tmux || answerScreen === null ? Promise.resolve(false) : (key === "Space" || key === "q") ? (this.nativePaneLifecycle ? tmux.sendKeys(key === "q" ? "q" : " ", { kind: "dialog", screen: answerScreen }) : tmux.sendKeys(key === "q" ? "q" : " ")) : (this.nativePaneLifecycle ? tmux.sendSpecialKey(key, undefined, { kind: "dialog", screen: answerScreen }) : tmux.sendSpecialKey(key)),
|
|
9670
10199
|
paste: text => this.tmux !== tmux || answerScreen === null ? Promise.resolve(false) : this.nativePaneLifecycle ? tmux.pasteBuffer(text, { proof: { kind: "dialog", screen: answerScreen } }) : tmux.pasteBuffer(text),
|
|
9671
10200
|
sleep: ms => new Promise(resolve => setTimeout(resolve, ms)),
|
|
9672
10201
|
now: () => performance.now(),
|
|
@@ -10041,6 +10570,10 @@ export class Daemon extends EventEmitter {
|
|
|
10041
10570
|
* pane proves nothing. The silence gate comes first and costs no capture.
|
|
10042
10571
|
*/
|
|
10043
10572
|
async paneReadinessForDelivery(windowId) {
|
|
10573
|
+
if (this.staleAuthIssue()) {
|
|
10574
|
+
this.resetFooterFallback();
|
|
10575
|
+
return "dialog";
|
|
10576
|
+
}
|
|
10044
10577
|
// Each early return below is the pane seen outside the footer-fallback
|
|
10045
10578
|
// candidate state, and never reaches deliveryInputReadyPane: reset here.
|
|
10046
10579
|
if (!this.isPaneIdleForDelivery(windowId)) {
|
|
@@ -10313,7 +10846,7 @@ export class Daemon extends EventEmitter {
|
|
|
10313
10846
|
this.logger.error({ rows: rows.length }, "The input box did not empty — not writing this delivery onto it");
|
|
10314
10847
|
return "not-cleared";
|
|
10315
10848
|
}
|
|
10316
|
-
async submitStrandedInputIfAny(windowId) {
|
|
10849
|
+
async submitStrandedInputIfAny(windowId, allowSubmit = true) {
|
|
10317
10850
|
if (!this.tmux || !this.backend)
|
|
10318
10851
|
return "idle";
|
|
10319
10852
|
const prompt = this.backend.getBottomReadyPattern?.();
|
|
@@ -10344,6 +10877,8 @@ export class Daemon extends EventEmitter {
|
|
|
10344
10877
|
return "idle";
|
|
10345
10878
|
if (state !== "stranded")
|
|
10346
10879
|
return "busy"; // busy, or unreadable: no evidence the prompt is free
|
|
10880
|
+
if (!allowSubmit)
|
|
10881
|
+
return "exhausted"; // a final clear check is allowed, a fourth recovery Enter is not
|
|
10347
10882
|
const sent = await this.sendDeliveryEnter("stranded-input-submit");
|
|
10348
10883
|
return sent ? "submitted" : "failed";
|
|
10349
10884
|
});
|
|
@@ -10366,10 +10901,24 @@ export class Daemon extends EventEmitter {
|
|
|
10366
10901
|
return "busy";
|
|
10367
10902
|
if (this.backend?.getBusyPattern?.()?.test(pane))
|
|
10368
10903
|
return "busy";
|
|
10904
|
+
// The timed footer fallback is valid only in a live raw TUI, even
|
|
10905
|
+
// after the startup guard has retired. Historical shell scrollback is not
|
|
10906
|
+
// evidence that a composer still owns the terminal.
|
|
10907
|
+
const known = this.backend?.isDeliveryInputReadyPane?.(pane);
|
|
10908
|
+
if (known === false && this.backend?.isStableUnknownLayoutIdlePane?.(pane)) {
|
|
10909
|
+
if (this.nativePaneLifecycle || await this.tmux?.getPaneInputMode?.() !== "raw") {
|
|
10910
|
+
this.resetFooterFallback();
|
|
10911
|
+
return "busy";
|
|
10912
|
+
}
|
|
10913
|
+
}
|
|
10369
10914
|
if (!this.deliveryInputReadyPane(pane))
|
|
10370
10915
|
return "busy";
|
|
10371
|
-
if (strandedAgendMessageInInput(pane, prompt))
|
|
10916
|
+
if (strandedAgendMessageInInput(pane, prompt)) {
|
|
10917
|
+
// A cancelled human turn can restore its text here. Idle observation must not let a later delivery submit it.
|
|
10918
|
+
if (this.backend?.binaryName === "codex" && /\[user:/.test(inputAreaText(pane, prompt) ?? ""))
|
|
10919
|
+
return "busy";
|
|
10372
10920
|
return "stranded";
|
|
10921
|
+
}
|
|
10373
10922
|
// Kiro uses the bottom row; Codex's positive prompt/footer check above
|
|
10374
10923
|
// rules out a historical transcript echo or a transition/modal screen.
|
|
10375
10924
|
return !requireBottomReady || bottomRowIsReady(pane, prompt) ? "clear" : "busy";
|
|
@@ -10561,6 +11110,7 @@ export class Daemon extends EventEmitter {
|
|
|
10561
11110
|
}
|
|
10562
11111
|
}
|
|
10563
11112
|
/**
|
|
11113
|
+
* A stale process login refuses delivery before any write; durable attempts stay retryable.
|
|
10564
11114
|
* While the CLI is parked on a fatal startup screen (see fatalStartupBlocked),
|
|
10565
11115
|
* no pane write may happen: paste+Enter into the corrupt-config modal would
|
|
10566
11116
|
* confirm "Exit and fix manually" and exit the CLI. The message is failed (❌)
|
|
@@ -10568,7 +11118,11 @@ export class Daemon extends EventEmitter {
|
|
|
10568
11118
|
* what to fix, and holding would only build a queue that floods the pane the
|
|
10569
11119
|
* moment the flag clears.
|
|
10570
11120
|
*/
|
|
10571
|
-
|
|
11121
|
+
refuseBlockedDelivery(verdict, status) {
|
|
11122
|
+
if (this.staleAuthIssue()) {
|
|
11123
|
+
this.failDelivery(verdict, status, "pre-write", "stale-auth");
|
|
11124
|
+
return true;
|
|
11125
|
+
}
|
|
10572
11126
|
if (!this.fatalStartupBlocked && !this.modelMinimumBlocked)
|
|
10573
11127
|
return false;
|
|
10574
11128
|
this.logger.error("Delivery refused — CLI startup or model-version repair is held");
|
|
@@ -10926,6 +11480,8 @@ export class Daemon extends EventEmitter {
|
|
|
10926
11480
|
catch {
|
|
10927
11481
|
return hold("check_failed");
|
|
10928
11482
|
}
|
|
11483
|
+
if (this.codexInputOccupied(screen))
|
|
11484
|
+
return hold("input_occupied");
|
|
10929
11485
|
if (!current())
|
|
10930
11486
|
return false;
|
|
10931
11487
|
if (performance.now() >= deadline)
|
|
@@ -10984,6 +11540,7 @@ export class Daemon extends EventEmitter {
|
|
|
10984
11540
|
signature.takenMarker = leadMarker;
|
|
10985
11541
|
const rawPaste = durableAttempt?.submissionMode === "raw_paste";
|
|
10986
11542
|
const humanAttempt = verdict.humanReceipt;
|
|
11543
|
+
verdict.roomInputQueued = handingOffToNativeQueue || steer;
|
|
10987
11544
|
const humanMode = rawPaste ? "raw_paste" : steer ? "steer"
|
|
10988
11545
|
: handingOffToNativeQueue ? "native_queue_handoff" : "idle_submit";
|
|
10989
11546
|
if (humanAttempt && signature.unique && signature.value === humanReceiptMarker(humanAttempt.verificationId, humanDialect).slice(1, -1)
|
|
@@ -11024,6 +11581,8 @@ export class Daemon extends EventEmitter {
|
|
|
11024
11581
|
verdict.fenced = !verdict.durableBeginCommitted;
|
|
11025
11582
|
return false;
|
|
11026
11583
|
}
|
|
11584
|
+
if (pasteBaseline?.unsubmittedAgendInput)
|
|
11585
|
+
return this.failDelivery(verdict, status, "input-residue", "occupied-codex-composer");
|
|
11027
11586
|
// M-2267: the pane went into a tmux mode after the readiness wait. Nothing begun or written: the caller waits for
|
|
11028
11587
|
// readiness (which holds while it lasts) and tries again — as for a dialog that appeared before the write.
|
|
11029
11588
|
if (!verdict.durableBeginCommitted && await this.paneInTmuxMode("paste"))
|
|
@@ -11349,6 +11908,7 @@ export class Daemon extends EventEmitter {
|
|
|
11349
11908
|
: after === "queue" ? "composer-empty-queue" : "composer-empty-idle");
|
|
11350
11909
|
verdict.phase = steer ? "steer-accepted" : "composer-accepted";
|
|
11351
11910
|
verdict.proof = `${steer ? "steer" : "handoff"}-composer-${after}`;
|
|
11911
|
+
verdict.roomInputQueued = after === "queue";
|
|
11352
11912
|
if (status)
|
|
11353
11913
|
this.emit("message_confirmed", status); // ✅ taken from the box
|
|
11354
11914
|
return true;
|
|
@@ -11424,6 +11984,7 @@ export class Daemon extends EventEmitter {
|
|
|
11424
11984
|
if (verdict.handoff && !verdict.trackHandoff?.id)
|
|
11425
11985
|
this.dropQueuedHandoff(verdict);
|
|
11426
11986
|
verdict.handoff = undefined;
|
|
11987
|
+
verdict.roomInputQueued = false;
|
|
11427
11988
|
if (windowId && this.controlClient && !(await this.controlClient.waitUntilIdle(windowId))) {
|
|
11428
11989
|
verdict.phase = "native-queue-idle-wait";
|
|
11429
11990
|
verdict.proof = "idle-wait-failed";
|
|
@@ -12101,6 +12662,11 @@ export class Daemon extends EventEmitter {
|
|
|
12101
12662
|
* paste and once after, so confirmSubmitted can require a NEW marker or a NEW
|
|
12102
12663
|
* echo rather than accepting whatever was already there.
|
|
12103
12664
|
*/
|
|
12665
|
+
codexInputOccupied(pane) {
|
|
12666
|
+
const backend = this.backend, prompt = backend?.getBottomReadyPattern?.();
|
|
12667
|
+
return backend?.binaryName === "codex" && backend.ownsComposerRows?.(pane) === true && !!prompt
|
|
12668
|
+
&& strandedAgendMessageInInput(pane, prompt);
|
|
12669
|
+
}
|
|
12104
12670
|
async capturePaneEvidence(signature) {
|
|
12105
12671
|
if (!this.tmux)
|
|
12106
12672
|
return null;
|
|
@@ -12111,6 +12677,8 @@ export class Daemon extends EventEmitter {
|
|
|
12111
12677
|
try {
|
|
12112
12678
|
const pane = await this.tmux.capturePane();
|
|
12113
12679
|
const evidence = this.paneEvidence(pane, signature);
|
|
12680
|
+
if (this.codexInputOccupied(pane))
|
|
12681
|
+
evidence.unsubmittedAgendInput = true;
|
|
12114
12682
|
if (owner === this.tmux && window === owner.getWindowId?.() && spawn === this.spawnGeneration && fence === this.launchFenceEpoch && launch === this.launchAttempt) {
|
|
12115
12683
|
const counts = this.paneQuotaPatterns().map(ep => ({ key: Daemon.errorPatternKey(ep), count: Daemon.countOccurrences(ep.pattern, pane) }));
|
|
12116
12684
|
if (counts.length)
|
|
@@ -12118,10 +12686,7 @@ export class Daemon extends EventEmitter {
|
|
|
12118
12686
|
}
|
|
12119
12687
|
const input = this.inputRegion(pane);
|
|
12120
12688
|
if (input && agendMessageInInput(input.text)) {
|
|
12121
|
-
|
|
12122
|
-
// a single message. Nothing here can undo that; saying so beats
|
|
12123
|
-
// letting two messages silently merge.
|
|
12124
|
-
this.logger.warn("An unsubmitted message is already in the input row — this delivery will be appended to it");
|
|
12689
|
+
this.logger.warn("An unsubmitted message is already in the input row");
|
|
12125
12690
|
}
|
|
12126
12691
|
return evidence;
|
|
12127
12692
|
}
|
|
@@ -12789,7 +13354,7 @@ export class Daemon extends EventEmitter {
|
|
|
12789
13354
|
type: "fleet_outbound",
|
|
12790
13355
|
tool,
|
|
12791
13356
|
args,
|
|
12792
|
-
...(operationId ? { operationId, sourceDaemonBootId: this.bootId } : {}),
|
|
13357
|
+
...((operationId || (tool.startsWith("hub_room_") || tool === "hub_people_search")) ? { ...(operationId ? { operationId } : {}), sourceDaemonBootId: this.bootId } : {}),
|
|
12793
13358
|
fleetRequestId: fleetReqId,
|
|
12794
13359
|
senderSessionName,
|
|
12795
13360
|
});
|
|
@@ -12909,7 +13474,7 @@ export class Daemon extends EventEmitter {
|
|
|
12909
13474
|
};
|
|
12910
13475
|
}
|
|
12911
13476
|
/** Build config object for the CLI backend */
|
|
12912
|
-
buildBackendConfig() {
|
|
13477
|
+
buildBackendConfig(forLaunch = true) {
|
|
12913
13478
|
// Antigravity 1.1.17 has no per-workspace MCP config, but its global MCP
|
|
12914
13479
|
// children inherit the CLI process environment. The backend installs one
|
|
12915
13480
|
// environment-selecting launcher, so MCP is now the safe default here too.
|
|
@@ -12988,6 +13553,8 @@ export class Daemon extends EventEmitter {
|
|
|
12988
13553
|
? resolveToolSet(this.config, this.name, "general")
|
|
12989
13554
|
: resolveToolSet(this.config, this.name);
|
|
12990
13555
|
mcpEnv.AGEND_TOOL_SET = toolSet;
|
|
13556
|
+
if (this.classicRestriction)
|
|
13557
|
+
mcpEnv.AGEND_CLASSIC_ALLOWED_TOOLS = JSON.stringify(this.classicRestriction.allowedAgendTools);
|
|
12991
13558
|
// The dashboard features the person switched off: out of the tool menu from this start (the fleet refuses them
|
|
12992
13559
|
// at once, whatever the menu still shows).
|
|
12993
13560
|
const dashboardOff = dashboardFeaturesOff(dashboardAccessOf(this.config));
|
|
@@ -13028,9 +13595,11 @@ export class Daemon extends EventEmitter {
|
|
|
13028
13595
|
taskBoard: !dashboardOff.includes("task_board"),
|
|
13029
13596
|
workingDirectory: this.config.working_directory,
|
|
13030
13597
|
runtimeIdentity: this.runtimeIdentity,
|
|
13598
|
+
restrictedClassic: !!this.classicRestriction,
|
|
13031
13599
|
displayName: this.config.display_name,
|
|
13032
13600
|
description: this.config.description,
|
|
13033
13601
|
customPrompt: resolvedCustomPrompt,
|
|
13602
|
+
operations: this.config.operations,
|
|
13034
13603
|
workflow: resolvedWorkflow,
|
|
13035
13604
|
decisions,
|
|
13036
13605
|
statusEmojis,
|
|
@@ -13043,9 +13612,11 @@ export class Daemon extends EventEmitter {
|
|
|
13043
13612
|
taskBoard: !dashboardOff.includes("task_board"),
|
|
13044
13613
|
workingDirectory: this.config.working_directory,
|
|
13045
13614
|
runtimeIdentity: this.runtimeIdentity,
|
|
13615
|
+
restrictedClassic: !!this.classicRestriction,
|
|
13046
13616
|
displayName: this.config.display_name,
|
|
13047
13617
|
description: this.config.description,
|
|
13048
13618
|
customPrompt: resolvedCustomPrompt,
|
|
13619
|
+
operations: this.config.operations,
|
|
13049
13620
|
workflow: resolvedWorkflow,
|
|
13050
13621
|
decisions,
|
|
13051
13622
|
statusEmojis,
|
|
@@ -13054,7 +13625,11 @@ export class Daemon extends EventEmitter {
|
|
|
13054
13625
|
const agentPort = parseInt(process.env.AGEND_PORT ?? "19280", 10);
|
|
13055
13626
|
const backendName = this.config.backend ?? "claude-code";
|
|
13056
13627
|
const backendOptions = this.config.backend_options?.[backendName];
|
|
13628
|
+
const managedClaudeCredential = forLaunch && backendName === "claude-code"
|
|
13629
|
+
? managedClaudeBinding(resolve(this.instanceDir, "..", ".."), resolveCredentialProfile(backendOptions)) : null;
|
|
13057
13630
|
return {
|
|
13631
|
+
...(managedClaudeCredential ? { managedClaudeCredential } : {}),
|
|
13632
|
+
...(this.classicRestriction ? { classicRestriction: this.classicRestriction } : {}),
|
|
13058
13633
|
workingDirectory: this.config.working_directory,
|
|
13059
13634
|
instanceDir: this.instanceDir,
|
|
13060
13635
|
instanceName: this.name,
|
|
@@ -14432,12 +15007,19 @@ export class Daemon extends EventEmitter {
|
|
|
14432
15007
|
if (this.nativePaneLifecycle)
|
|
14433
15008
|
throw Error("Native relaunch requires its owned exit and a new lifecycle reservation");
|
|
14434
15009
|
let expectedAttempt = this.launchAttempt;
|
|
14435
|
-
const
|
|
14436
|
-
|
|
15010
|
+
const restrictionStamp = this.classicRestriction ? classicPlanDigest(this.classicRestriction) : null;
|
|
15011
|
+
const admit = () => {
|
|
15012
|
+
this.startupAdmission?.();
|
|
15013
|
+
this.assertClassicRestrictionLaunch(restrictionStamp);
|
|
15014
|
+
if (repairAdmission && !repairAdmission(expectedAttempt))
|
|
15015
|
+
throw new Error("CLI repair superseded by another launch, pause or stop");
|
|
15016
|
+
};
|
|
14437
15017
|
this.assertSessionOomAdmission();
|
|
14438
15018
|
admit();
|
|
14439
15019
|
const launchFence = this.launchFenceEpoch;
|
|
14440
|
-
const backendConfig = this.buildBackendConfig();
|
|
15020
|
+
const backendConfig = this.buildBackendConfig(true);
|
|
15021
|
+
if (this.classicRestrictionFailed)
|
|
15022
|
+
throw Error("Restricted room policy is unavailable");
|
|
14441
15023
|
// A compatibility refusal is not a failed resume: no configuration, pin, history or pane may change.
|
|
14442
15024
|
if (this.backend?.assertLaunchSupported) {
|
|
14443
15025
|
this.backend.assertLaunchSupported(backendConfig);
|
|
@@ -14467,6 +15049,7 @@ export class Daemon extends EventEmitter {
|
|
|
14467
15049
|
if (launchFence !== this.launchFenceEpoch)
|
|
14468
15050
|
throw new Error("Launch cancelled: the instance was stopped or paused while the launch was being prepared");
|
|
14469
15051
|
this.backend.writeConfig(backendConfig);
|
|
15052
|
+
this.classicRestrictionNeedsRestart = false;
|
|
14470
15053
|
if (freshInboundInstructions)
|
|
14471
15054
|
this.installCompactInboundInstructions();
|
|
14472
15055
|
else {
|
|
@@ -15041,11 +15624,41 @@ export class Daemon extends EventEmitter {
|
|
|
15041
15624
|
this.lastIdleSessionRefreshAt = now;
|
|
15042
15625
|
void refresh.call(this.backend).then(() => this.saveSessionId(), () => { });
|
|
15043
15626
|
}
|
|
15627
|
+
roomConversationState = null;
|
|
15628
|
+
roomConversationGeneration() {
|
|
15629
|
+
try {
|
|
15630
|
+
// Local non-Claude backends checkpoint their own session below; do not replace it with a Claude-only field.
|
|
15631
|
+
if (this.nativePaneLifecycle || (this.config.backend ?? "claude-code") === "claude-code")
|
|
15632
|
+
this.roomConversationState?.observeSession(this.ownedWorkingSession);
|
|
15633
|
+
}
|
|
15634
|
+
catch (err) {
|
|
15635
|
+
this.logger.warn({ err }, "Room conversation checkpoint failed");
|
|
15636
|
+
return null;
|
|
15637
|
+
}
|
|
15638
|
+
return this.roomConversationState?.current() ?? null;
|
|
15639
|
+
}
|
|
15640
|
+
resetRoomConversation(reattached = false) {
|
|
15641
|
+
this.roomConversationState ??= new RoomConversationGeneration(this.instanceDir);
|
|
15642
|
+
try {
|
|
15643
|
+
this.roomConversationState.start(reattached);
|
|
15644
|
+
}
|
|
15645
|
+
catch (err) {
|
|
15646
|
+
this.logger.warn({ err }, "Room conversation generation is unconfirmed");
|
|
15647
|
+
}
|
|
15648
|
+
}
|
|
15649
|
+
roomInputHandedOff(meta) {
|
|
15650
|
+
const generation = meta.hub_room_context_generation;
|
|
15651
|
+
if (meta.from_instance !== HUB_REPORT_TARGET || !generation || generation !== this.roomConversationGeneration())
|
|
15652
|
+
return;
|
|
15653
|
+
this.hubRoomInputEpoch++;
|
|
15654
|
+
this.broadcastFleetMessage({ type: "hub_room_input", correlationId: meta.correlation_id, generation });
|
|
15655
|
+
}
|
|
15044
15656
|
saveSessionId() {
|
|
15045
15657
|
if (this.nativePaneLifecycle) {
|
|
15046
15658
|
try {
|
|
15047
15659
|
this.nativePaneLifecycle.checkpointSession();
|
|
15048
15660
|
this.ownedWorkingSession = this.backend?.getSessionId() ?? null;
|
|
15661
|
+
this.roomConversationState?.observeSession(this.ownedWorkingSession);
|
|
15049
15662
|
}
|
|
15050
15663
|
catch (err) {
|
|
15051
15664
|
this.logger.warn({ err }, "Native conversation checkpoint is unconfirmed");
|
|
@@ -15060,6 +15673,7 @@ export class Daemon extends EventEmitter {
|
|
|
15060
15673
|
const sid = this.backend?.getSessionId();
|
|
15061
15674
|
if (!sid)
|
|
15062
15675
|
return;
|
|
15676
|
+
this.roomConversationState?.observeSession(sid);
|
|
15063
15677
|
if ((this.config.backend ?? "claude-code") === "claude-code" && Buffer.byteLength(sid) <= 256
|
|
15064
15678
|
&& !/[\u0000-\u001f\u007f]/.test(sid) && this.ownedWorkingSession !== sid) {
|
|
15065
15679
|
this.ownedWorkingSession = sid;
|