@songsid/agend 2.4.0-beta.1 → 2.4.0-beta.10
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/agent-cli-instructions.md +4 -1
- package/dist/agent-cli.js +14 -2
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.d.ts +3 -1
- package/dist/agent-endpoint.js +15 -3
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-token-header.d.ts +1 -1
- package/dist/agent-token-header.js +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/auth-api.d.ts +8 -0
- package/dist/auth-api.js +39 -1
- 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.js +20 -5
- package/dist/backend/claude-code.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.d.ts +6 -4
- package/dist/backend/codex.js +26 -9
- 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 +1 -1
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/kiro.js +4 -4
- 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 +2 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +22 -0
- package/dist/backend-availability.js +71 -2
- package/dist/backend-availability.js.map +1 -1
- package/dist/backend-signin-guide.js +1 -1
- package/dist/backend-signin-guide.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 +3 -0
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/mcp-server.js +10 -1
- package/dist/channel/mcp-server.js.map +1 -1
- package/dist/channel/mcp-tools.js +9 -1
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/tool-router.js +9 -2
- package/dist/channel/tool-router.js.map +1 -1
- package/dist/channel/types.d.ts +10 -0
- package/dist/classic-channel-manager.d.ts +1 -1
- package/dist/classic-channel-manager.js +1 -1
- package/dist/cli-audited.js +14 -13
- 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/config-validator.js +18 -1
- package/dist/config-validator.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/daemon.d.ts +64 -2
- package/dist/daemon.js +397 -31
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-consumed-watch.d.ts +2 -0
- package/dist/delivery-consumed-watch.js +4 -1
- package/dist/delivery-consumed-watch.js.map +1 -1
- package/dist/dispatcher-liveness.d.ts +51 -1
- package/dist/dispatcher-liveness.js +92 -2
- package/dist/dispatcher-liveness.js.map +1 -1
- package/dist/event-log.d.ts +1 -1
- package/dist/event-log.js +1 -1
- package/dist/fleet-manager.d.ts +222 -6
- package/dist/fleet-manager.js +1271 -100
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.js +4 -2
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +11 -1
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +10 -0
- package/dist/general-knowledge/skills/fleet-health/SKILL.md +18 -0
- package/dist/general-knowledge/skills/hub/SKILL.md +290 -24
- package/dist/general-knowledge/skills/model-discovery/SKILL.md +4 -0
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +118 -26
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +2 -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/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 +2 -0
- package/dist/hub/audit/index.js +8 -0
- 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 +7 -4
- package/dist/hub/catalog.js +19 -10
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/client.d.ts +13 -0
- package/dist/hub/client.js +85 -11
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +22 -0
- package/dist/hub/compose/member.js +233 -18
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.d.ts +13 -0
- package/dist/hub/compose/server.js +107 -14
- package/dist/hub/compose/server.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 +1 -0
- package/dist/hub/execution/service.js +1 -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 +2 -0
- package/dist/hub/http/compose.js +385 -32
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/core.js +27 -0
- package/dist/hub/http/core.js.map +1 -1
- package/dist/hub/http/deps.d.ts +13 -0
- package/dist/hub/http/schema.js +21 -1
- package/dist/hub/http/schema.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/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 +176 -0
- package/dist/hub/mcp/tools.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 +6 -0
- package/dist/hub/member/exposure-api.js +13 -6
- package/dist/hub/member/exposure-api.js.map +1 -1
- package/dist/hub/member/exposures.d.ts +4 -0
- package/dist/hub/member/exposures.js +20 -0
- 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 +65 -5
- package/dist/hub/member/room-ask.js +269 -24
- package/dist/hub/member/room-ask.js.map +1 -1
- 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 +103 -0
- package/dist/hub/member/room-post.js +231 -0
- package/dist/hub/member/room-post.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/person-prefs.d.ts +22 -0
- package/dist/hub/person-prefs.js +34 -0
- package/dist/hub/person-prefs.js.map +1 -0
- package/dist/hub/personal/owner-host.d.ts +140 -0
- package/dist/hub/personal/owner-host.js +287 -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 +701 -1
- package/dist/hub/protocol.js +103 -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 +2 -0
- package/dist/hub/roles/cutover-inventory.js +8 -1
- package/dist/hub/roles/cutover-inventory.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-context-model.d.ts +43 -0
- package/dist/hub/room-context-model.js +12 -0
- package/dist/hub/room-context-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 +44 -10
- package/dist/hub/rooms/agents.js +277 -30
- 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/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 +6 -2
- package/dist/hub/rooms/direct-view.js +3 -3
- package/dist/hub/rooms/direct-view.js.map +1 -1
- 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/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/schema.d.ts +9 -0
- package/dist/hub/rooms/schema.js +43 -0
- package/dist/hub/rooms/schema.js.map +1 -1
- package/dist/hub/rooms/service.d.ts +163 -4
- package/dist/hub/rooms/service.js +795 -25
- package/dist/hub/rooms/service.js.map +1 -1
- package/dist/hub/rooms/types.d.ts +29 -3
- package/dist/hub/rooms.d.ts +12 -2
- package/dist/hub/rooms.js +88 -18
- 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 +93 -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.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 +159 -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-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-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 +3 -0
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instructions.js +3 -0
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +137 -24
- package/dist/locale.js.map +1 -1
- package/dist/login-controller.d.ts +19 -2
- package/dist/login-controller.js +26 -8
- package/dist/login-controller.js.map +1 -1
- package/dist/native-mcp.js +7 -5
- 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/office-share-page.js +1 -1
- package/dist/office-share-page.js.map +1 -1
- package/dist/outbound-handlers.d.ts +14 -4
- package/dist/outbound-handlers.js +54 -1
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +17 -0
- package/dist/outbound-schemas.js +14 -0
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/pane-port.d.ts +2 -0
- package/dist/public-web-gateway.js +152 -4
- package/dist/public-web-gateway.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/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/runtime-api.js +10 -2
- package/dist/runtime-api.js.map +1 -1
- package/dist/runtime-build-info.js +1 -0
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-cli-install.js +13 -10
- 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-native.js +3 -1
- 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/settings-api.d.ts +15 -0
- package/dist/settings-api.js +210 -76
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +32 -5
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.js +13 -2
- 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/setup-form.js +10 -0
- package/dist/setup-form.js.map +1 -1
- package/dist/setup-i18n.js +2 -2
- package/dist/setup-i18n.js.map +1 -1
- package/dist/subagent-records.js +53 -11
- package/dist/subagent-records.js.map +1 -1
- package/dist/subagent-service.js +3 -1
- package/dist/subagent-service.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/transcript-needles.d.ts +4 -2
- package/dist/transcript-needles.js +35 -4
- package/dist/transcript-needles.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 +12 -2
- package/dist/ui/backend-signin.js +91 -22
- package/dist/ui/chat-activity-groups.js +41 -8
- package/dist/ui/chat-activity.js +5 -3
- 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-store.js +143 -7
- package/dist/ui/chat-tour.js +1 -1
- package/dist/ui/chat-workspace.js +3 -3
- package/dist/ui/fleet-canvas.js +14 -5
- package/dist/ui/fleet-office-carousel.d.ts +14 -0
- package/dist/ui/fleet-office-carousel.js +95 -0
- package/dist/ui/fleet-office-editor.js +6 -1
- package/dist/ui/fleet-office-model.js +2 -1
- package/dist/ui/fleet-office-skin.js +1 -1
- package/dist/ui/fleet-office-store.js +14 -2
- package/dist/ui/fleet-office-zones.js +50 -9
- package/dist/ui/fleet-office.js +203 -24
- package/dist/ui/fleet-tasks.js +1 -1
- package/dist/ui/host-install.js +5 -2
- 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 +6 -2
- package/dist/ui/hub-ai-apps-strings.js +6 -0
- package/dist/ui/hub-ai-apps.js +83 -0
- package/dist/ui/hub-chat-strings.js +7 -0
- package/dist/ui/hub-client.js +76 -5
- 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 +3 -37
- package/dist/ui/hub-group-policy.js +26 -13
- package/dist/ui/hub-group-strings.js +26 -17
- package/dist/ui/hub-join-steps.js +27 -15
- package/dist/ui/hub-owner-strings.js +2 -2
- package/dist/ui/hub-personal-agent-strings.js +246 -0
- package/dist/ui/hub-personal-agent.js +117 -0
- package/dist/ui/hub-policy-subjects.js +35 -0
- package/dist/ui/hub-quick-pairing.js +7 -2
- 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 +439 -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 +19 -10
- package/dist/ui/hub-room-favorites.js +63 -5
- package/dist/ui/hub-room-list.js +4 -3
- package/dist/ui/hub-room-members-strings.js +2 -2
- package/dist/ui/hub-room-members.js +7 -4
- package/dist/ui/hub-room-notify.js +161 -0
- package/dist/ui/hub-room-search.js +126 -0
- package/dist/ui/hub-room-settings.js +6 -0
- package/dist/ui/hub-room-source-strings.js +17 -0
- package/dist/ui/hub-room-source.js +34 -0
- package/dist/ui/hub-room-strings.js +47 -1
- package/dist/ui/hub-room-thread.js +266 -41
- package/dist/ui/hub-room-unread.js +2 -1
- package/dist/ui/hub-strings.js +8 -0
- 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 +56 -28
- 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/model-picker.js +4 -1
- package/dist/ui/notice-hub-update.js +94 -0
- package/dist/ui/office-share-dialog.js +2 -2
- package/dist/ui/panel-chat.js +327 -28
- package/dist/ui/panel-details.js +3 -1
- package/dist/ui/panel-fleet.js +28 -7
- package/dist/ui/panel-hub.js +294 -99
- package/dist/ui/panel-log.js +4 -4
- package/dist/ui/panel-notices.js +3 -1
- package/dist/ui/panel-settings.js +45 -34
- package/dist/ui/preview-panel.js +3 -1
- package/dist/ui/reply-file-preview.js +64 -0
- package/dist/ui/runtime-commands.d.ts +2 -2
- package/dist/ui/runtime-commands.js +7 -4
- package/dist/ui/settings-access-overview.js +3 -3
- package/dist/ui/settings-appearance.js +7 -10
- package/dist/ui/settings-archive-files.js +109 -0
- package/dist/ui/settings-build-version.js +2 -2
- package/dist/ui/settings-catalog.js +22 -0
- package/dist/ui/settings-connector-strings.js +23 -0
- package/dist/ui/settings-connector.js +39 -0
- package/dist/ui/settings-guests-entries.js +16 -0
- package/dist/ui/settings-guests.js +57 -15
- package/dist/ui/settings-hub-connection.js +4 -5
- package/dist/ui/settings-hub-membership.js +6 -7
- 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 +30 -4
- package/dist/ui/settings-layout.js +10 -12
- package/dist/ui/settings-registry.js +18 -3
- package/dist/ui/settings-shared-strings.js +2 -0
- package/dist/ui/settings-strings.js +13 -2
- 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 +1 -1
- package/dist/ui/shared/agent-sheet.js +116 -0
- package/dist/ui/shared/agent-widget.js +1 -2
- package/dist/ui/shared/app-i18n.js +4 -0
- 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 +4 -2
- package/dist/ui/shared/app-shell.js +176 -21
- package/dist/ui/shared/app-store.js +1 -1
- package/dist/ui/shared/app-stream.js +6 -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 +469 -203
- package/dist/ui/shared/app.js +1 -1
- package/dist/ui/shared/chat-composer.js +29 -5
- package/dist/ui/shared/chat-msg-actions.js +231 -0
- package/dist/ui/shared/chat-strings.js +19 -4
- package/dist/ui/shared/chat-thread.js +120 -17
- package/dist/ui/shared/chat-work-bar.css +118 -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 +58 -4
- package/dist/ui/shared/hub-groups.css +19 -15
- 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 +34 -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 +415 -0
- package/dist/ui/shared/image-lightbox.js +218 -0
- package/dist/ui/shared/image-zoom.js +316 -0
- package/dist/ui/shared/instance-nav.js +120 -15
- package/dist/ui/shared/loading.css +1 -1
- package/dist/ui/shared/model-picker.css +32 -4
- 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 +6 -2
- 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 +2 -2
- package/dist/ui/shared/theme.js +52 -0
- package/dist/ui/shared/tokens.css +27 -10
- package/dist/ui/shared/ui-icons.js +2 -0
- package/dist/ui/shared/ui-toast.js +4 -4
- package/dist/ui/shared/usage-dialog.js +113 -17
- package/dist/ui/shared/view-strings.js +26 -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/web-terminal/terminal.css +1 -1
- package/dist/ui/workspace-panel.js +4 -3
- 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 +1 -1
- 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.js +6 -6
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/quota-history.d.ts +1 -1
- package/dist/view-api.js +1 -1
- package/dist/view-api.js.map +1 -1
- package/dist/web-api.d.ts +9 -0
- package/dist/web-api.js +434 -188
- package/dist/web-api.js.map +1 -1
- 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 +76 -0
- package/dist/web-chat-history.js +145 -1
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-commands.d.ts +4 -3
- package/dist/web-commands.js +3 -2
- package/dist/web-commands.js.map +1 -1
- package/dist/web-guest-access.d.ts +3 -0
- package/dist/web-guest-access.js +6 -2
- package/dist/web-guest-access.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 +3 -0
- package/dist/web-notices.js +17 -2
- package/dist/web-notices.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-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 +6 -4
- package/dist/web-session.js +5 -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 +1 -1
- package/dist/web-shell-routes.js +1 -1
- package/dist/web-shell-routes.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 +36 -0
- 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/package.json +1 -1
- package/templates/runtime-install/install.ps1 +24 -4
package/dist/daemon.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { HUB_REPORT_TARGET } from "./hub-report-target.js";
|
|
2
|
+
import { RoomConversationGeneration, roomContextInputMarker } from "./hub-room-conversation.js";
|
|
1
3
|
import { checkpointGrokDelivery } from "./grok-delivery-proof.js";
|
|
2
4
|
import { nativePaneToolRefusal } from "./native-pane-tools.js";
|
|
3
5
|
import { generalByName } from "./general-instance.js";
|
|
@@ -15,6 +17,7 @@ import { join, dirname, basename, resolve } from "node:path";
|
|
|
15
17
|
import { checkoutTarget, readCheckouts, releaseCandidate, reposRoot, verifyWorktree, writeCheckouts } from "./repo-worktree-guard.js";
|
|
16
18
|
import { mkdirSync, writeFileSync, readFileSync, readdirSync, existsSync, unlinkSync, rmSync, appendFileSync, statSync, renameSync } from "node:fs";
|
|
17
19
|
import { COMPACT_WATCH_TIMEOUT_MS, launchIdentity } from "./compact-watch.js";
|
|
20
|
+
import { TurnWatch } from "./dispatcher-liveness.js";
|
|
18
21
|
import { KIRO_COMPACT_PANE_LINES, KiroCompactPaneFollower } from "./kiro-compact-pane.js";
|
|
19
22
|
import { clearKiroSessionProof, proveKiroSessionId, recordKiroSessionProof } from "./kiro-session-proof.js";
|
|
20
23
|
import { fileURLToPath } from "node:url";
|
|
@@ -79,6 +82,8 @@ import { QUEUED_HANDOFF_MAX_REDELIVERIES, QueuedHandoffStore } from "./queued-ha
|
|
|
79
82
|
import { measureSyncWork, noteSyncWork } from "./sync-work-attribution.js";
|
|
80
83
|
import { TranscriptDeltaReader } from "./transcript-delta-reader.js";
|
|
81
84
|
import { checkpointCodexPane } from "./codex-pane-ownership.js";
|
|
85
|
+
import { codexAppliedFromRollout, codexRunningVersion, codexSupportsInlineModel, codexSwitchAnswerCount, codexSwitchFromPane, readFrom } from "./backend/codex-model-switch.js";
|
|
86
|
+
import { CLI_RUNTIME_SWITCH, cliRunningVersion, cliSwitchAllowed } from "./backend/cli-runtime-switch.js";
|
|
82
87
|
import { buildResumeContinuation, clearInFlightTurnMarker, consumeInFlightTurnMarker, decideTurnResume, normalizeResumeBackend, readResumeFingerprint, RESUME_BLOCKING_DELIVERY_STATES, writeInFlightTurnMarker, } from "./turn-resume.js";
|
|
83
88
|
import { codexLiveRowMatches } from "./backend/codex.js";
|
|
84
89
|
import { codexPackageProblemMessage } from "./backend/codex-package.js";
|
|
@@ -109,7 +114,7 @@ const WEB_THEME_IPC = Object.freeze({
|
|
|
109
114
|
});
|
|
110
115
|
/** The largest picture any slot may take (a card slot's ceiling; the fleet checks the limit in force): read no more. */
|
|
111
116
|
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"]);
|
|
117
|
+
const CROSS_INSTANCE_TOOLS = new Set(["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
118
|
const SCHEDULE_TOOLS = new Set(["create_schedule", "list_schedules", "update_schedule", "delete_schedule"]);
|
|
114
119
|
const DECISION_TOOLS = new Set(["post_decision", "list_decisions", "update_decision"]);
|
|
115
120
|
const TASK_TOOL = "task";
|
|
@@ -155,6 +160,10 @@ export const DEFAULT_STATE_IDLE_DEBOUNCE_MS = 2_000;
|
|
|
155
160
|
export const DEFAULT_STATE_SAFETY_SWEEP_MS = 60_000;
|
|
156
161
|
/** Coalesce one cosmetic-redraw burst before comparing the visible pane. */
|
|
157
162
|
export const PERIODIC_REDRAW_PROBE_MS = 25;
|
|
163
|
+
/** M-3239: a turn's progress reaches the fleet at most this often while it runs. */
|
|
164
|
+
const TURN_ACTIVITY_REPORT_MS = 30_000;
|
|
165
|
+
/** M-3239: after the idle edge, the transcript's last lines (the final answer) are read within this. */
|
|
166
|
+
const TURN_END_SETTLE_MS = 5_000;
|
|
158
167
|
/** Board 907c7899: how often a kiro /compact's pane is read (TUI V2's "too short" shows for about ten seconds). */
|
|
159
168
|
const KIRO_COMPACT_PANE_POLL_MS = 1_000;
|
|
160
169
|
/** Do not turn a streaming Codex turn into one capture-pane per burst. */
|
|
@@ -187,7 +196,7 @@ const HEALTH_ERROR_NOTIFY_INTERVAL_MS = 10 * 60_000;
|
|
|
187
196
|
* Whether two working directories belong to the same project, so a fleet-scoped
|
|
188
197
|
* decision recorded in one reaches the other. Covers the worktree/checkout
|
|
189
198
|
* layout AgEnD fleets actually use — `AgEnD`, `AgEnD-dev1`, `AgEnD-dev2`,
|
|
190
|
-
* `AgEnD-reviewer`, `AgEnD-main` are one project; `
|
|
199
|
+
* `AgEnD-reviewer`, `AgEnD-main` are one project; `GameServer` is not.
|
|
191
200
|
* Nesting counts too (a subdirectory of a project belongs to it).
|
|
192
201
|
*/
|
|
193
202
|
export function sameProjectFamily(a, b) {
|
|
@@ -563,6 +572,13 @@ const STARTUP_DIALOG_BUDGET_MS = 30_000;
|
|
|
563
572
|
export const OWN_SWITCH_WAIT_MS = 6_000;
|
|
564
573
|
/** #1690: after an answer to that dialog, how long it gets to go away. */
|
|
565
574
|
const OWN_SWITCH_SETTLE_MS = 3_000;
|
|
575
|
+
/** M-3175: how long a codex switch waits for the pane to be idle before it is not typed (the fleet then restarts instead). */
|
|
576
|
+
const CODEX_SWITCH_IDLE_MS = 60_000;
|
|
577
|
+
/** M-3175: how long codex gets to record the switch (rollout) or answer it (pane) after it is typed. */
|
|
578
|
+
const CODEX_SWITCH_VERIFY_MS = 10_000;
|
|
579
|
+
/** 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. */
|
|
580
|
+
const CODEX_SWITCH_HISTORY_LINES = 200;
|
|
581
|
+
const CODEX_SWITCH_ROLLOUT_READ = 4 * 1024 * 1024;
|
|
566
582
|
/** A blocking dialog still on screen this long after first being seen is reported for a human. */
|
|
567
583
|
const DIALOG_PARKED_NOTIFY_MS = 60_000;
|
|
568
584
|
/** #2675: a card a person can answer from the chat is posted once it has been on screen, unchanged, this long. */
|
|
@@ -676,6 +692,8 @@ const INPUT_RESIDUE_POLL_MS = 100;
|
|
|
676
692
|
const RECENT_PASTES_KEPT = 8;
|
|
677
693
|
/** Build a status holder from channel metadata, keeping chat and thread apart. */
|
|
678
694
|
export function channelStatus(meta) {
|
|
695
|
+
if (meta.source === "app")
|
|
696
|
+
return undefined; // no platform post exists to react to
|
|
679
697
|
const chatId = meta.chat_id;
|
|
680
698
|
const messageId = meta.message_id;
|
|
681
699
|
// A web chat message has no platform chat when the fleet has no channel, and still gets its reports:
|
|
@@ -2455,25 +2473,26 @@ export class Daemon extends EventEmitter {
|
|
|
2455
2473
|
if (!["claude-code", "codex"].includes(backend))
|
|
2456
2474
|
return;
|
|
2457
2475
|
const marker = durableAttempt ? `[agend-delivery-id:${durableAttempt.deliveryId}]`
|
|
2458
|
-
: humanVerificationId ? verdict.humanReceipt?.marker ?? `[agend-human-id:${humanVerificationId}]` :
|
|
2476
|
+
: humanVerificationId ? verdict.humanReceipt?.marker ?? `[agend-human-id:${humanVerificationId}]` : roomContextInputMarker(track.meta);
|
|
2459
2477
|
if (!marker || !formatted.startsWith(marker))
|
|
2460
2478
|
return;
|
|
2461
2479
|
let found = verdict.transcriptCheckpoint ?? null;
|
|
2462
2480
|
if (!found) {
|
|
2463
2481
|
try {
|
|
2464
|
-
|
|
2482
|
+
// M-2403: a native or remote pane checkpoints its runtime transcript (no local file); a local CLI, its file.
|
|
2483
|
+
const runtime = this.nativePaneLifecycle ? await this.transcriptMonitor?.reconciliationRuntimeCheckpoint() ?? null : null;
|
|
2484
|
+
found = runtime ? { runtime } : await this.transcriptMonitor?.reconciliationCheckpoint() ?? null;
|
|
2465
2485
|
}
|
|
2466
2486
|
catch (err) {
|
|
2467
2487
|
this.logger.debug({ err }, "Could not checkpoint the transcript before a queued hand-off");
|
|
2468
2488
|
}
|
|
2469
2489
|
}
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
const checkpoint = found && typeof found.path === "string" && typeof found.offset === "number" ? { path: found.path, offset: found.offset } : null;
|
|
2490
|
+
const checkpoint = found?.runtime ? { runtime: found.runtime }
|
|
2491
|
+
: found && typeof found.path === "string" && typeof found.offset === "number" ? { path: found.path, offset: found.offset } : null;
|
|
2473
2492
|
if (!checkpoint)
|
|
2474
2493
|
return; // nothing could judge it later: it runs as before (✅ at the hand-off)
|
|
2475
2494
|
const entry = {
|
|
2476
|
-
id: track.id ?? randomUUID(), marker, backend,
|
|
2495
|
+
id: track.id ?? randomUUID(), marker, backend, ...checkpoint,
|
|
2477
2496
|
content: track.content, meta: track.meta, wire: formatted, holder: this.handoffHolder(), createdAt: Date.now(),
|
|
2478
2497
|
redeliveries: track.redeliveries ?? 0,
|
|
2479
2498
|
};
|
|
@@ -2504,6 +2523,8 @@ export class Daemon extends EventEmitter {
|
|
|
2504
2523
|
this.dropQueuedHandoff(verdict);
|
|
2505
2524
|
return;
|
|
2506
2525
|
}
|
|
2526
|
+
if (sent && !verdict.roomInputQueued && meta.hub_room_context_generation)
|
|
2527
|
+
this.roomInputHandedOff(meta);
|
|
2507
2528
|
const id = meta.handoff_redelivery;
|
|
2508
2529
|
if (!id)
|
|
2509
2530
|
return;
|
|
@@ -2545,13 +2566,26 @@ export class Daemon extends EventEmitter {
|
|
|
2545
2566
|
*/
|
|
2546
2567
|
watchQueuedHandoff(entry) {
|
|
2547
2568
|
const spawn = this.spawnGeneration, fence = this.launchFenceEpoch, epoch = this.deliveryEpoch;
|
|
2569
|
+
// M-2403: a native or remote pane's record is read through its runner (the runtime reader), a local one from its file.
|
|
2570
|
+
let source;
|
|
2571
|
+
if (entry.runtime) {
|
|
2572
|
+
try {
|
|
2573
|
+
source = { reader: this.nativeTranscriptReader(entry.runtime, { marker: entry.marker, ...(entry.wire !== undefined ? { wire: entry.wire } : {}) }) };
|
|
2574
|
+
}
|
|
2575
|
+
catch (err) {
|
|
2576
|
+
this.logger.debug({ err, handoff: entry.id }, "Queued hand-off: its pane's transcript is not readable now");
|
|
2577
|
+
return this.settleQueuedHandoff(entry, "unverifiable", "transcript:unavailable");
|
|
2578
|
+
}
|
|
2579
|
+
}
|
|
2580
|
+
else
|
|
2581
|
+
source = { path: entry.path, offset: entry.offset };
|
|
2548
2582
|
const started = consumedWatches.start({
|
|
2549
2583
|
deliveryId: `handoff:${entry.id}`,
|
|
2550
2584
|
attemptNo: entry.redeliveries,
|
|
2551
2585
|
backend: entry.backend,
|
|
2552
|
-
|
|
2553
|
-
offset: entry.offset,
|
|
2586
|
+
...source,
|
|
2554
2587
|
marker: entry.marker,
|
|
2588
|
+
...(entry.wire !== undefined ? { wire: entry.wire } : {}),
|
|
2555
2589
|
// A cancel or stop moves the epoch: the watch ends quietly (a cancel cleared the record, a stop leaves it).
|
|
2556
2590
|
current: () => !this.deliveryWritesStopping && spawn === this.spawnGeneration && fence === this.launchFenceEpoch
|
|
2557
2591
|
&& epoch === this.deliveryEpoch,
|
|
@@ -2580,6 +2614,8 @@ export class Daemon extends EventEmitter {
|
|
|
2580
2614
|
const meta = entry.meta;
|
|
2581
2615
|
const status = channelStatus(meta);
|
|
2582
2616
|
if (outcome === "taken") {
|
|
2617
|
+
if (meta.hub_room_context_generation)
|
|
2618
|
+
this.roomInputHandedOff(meta);
|
|
2583
2619
|
this.logger.info({ handoff: entry.id, proof, redeliveries: entry.redeliveries }, "Queued hand-off taken by the CLI");
|
|
2584
2620
|
if (status)
|
|
2585
2621
|
this.emit("message_confirmed", status);
|
|
@@ -2627,9 +2663,21 @@ export class Daemon extends EventEmitter {
|
|
|
2627
2663
|
const spawn = this.spawnGeneration, fence = this.launchFenceEpoch, epoch = this.deliveryEpoch;
|
|
2628
2664
|
const fresh = () => spawn === this.spawnGeneration && fence === this.launchFenceEpoch && epoch === this.deliveryEpoch
|
|
2629
2665
|
&& !this.deliveryWritesStopping;
|
|
2630
|
-
let redelivered = 0, taken = 0, unverifiable = 0;
|
|
2666
|
+
let redelivered = 0, taken = 0, unverifiable = 0, watching = 0;
|
|
2631
2667
|
for (const entry of entries) {
|
|
2632
|
-
|
|
2668
|
+
if (entry.runtime) {
|
|
2669
|
+
const outcome = await this.reconcileRuntimeHandoff(entry, holder, fresh);
|
|
2670
|
+
if (outcome === "stale")
|
|
2671
|
+
return;
|
|
2672
|
+
if (outcome === "taken")
|
|
2673
|
+
taken++;
|
|
2674
|
+
else if (outcome === "unverifiable")
|
|
2675
|
+
unverifiable++;
|
|
2676
|
+
else if (outcome === "watching")
|
|
2677
|
+
watching++;
|
|
2678
|
+
continue;
|
|
2679
|
+
}
|
|
2680
|
+
const kind = await scanTranscriptForDeliveryMarker(entry.path, entry.offset, entry.backend, { marker: entry.marker, ...(entry.wire !== undefined ? { wire: entry.wire } : {}) });
|
|
2633
2681
|
// This CLI is gone already, or a cancel came: the next CLI settles them (a cancel cleared them).
|
|
2634
2682
|
if (!fresh())
|
|
2635
2683
|
return;
|
|
@@ -2668,7 +2716,71 @@ export class Daemon extends EventEmitter {
|
|
|
2668
2716
|
this.pushChannelMessage(entry.content, { ...meta, handoff_redelivery: entry.id,
|
|
2669
2717
|
handoff_redeliveries: String(next.redeliveries), handoff_holder: next.holder }, undefined, epoch);
|
|
2670
2718
|
}
|
|
2671
|
-
this.logger.info({ instance: this.name, redelivered, taken, unverifiable, proof: "transcript" }, "Queued hand-offs left by the previous CLI settled");
|
|
2719
|
+
this.logger.info({ instance: this.name, redelivered, taken, unverifiable, watching, proof: "transcript" }, "Queued hand-offs left by the previous CLI settled");
|
|
2720
|
+
}
|
|
2721
|
+
/**
|
|
2722
|
+
* M-2403: a native or remote pane's record, after this daemon came up. Its runner may have kept the CLI (and its queue)
|
|
2723
|
+
* across the coordinator's restart, so nothing here proves the queue is gone, and a runtime record is never
|
|
2724
|
+
* redelivered. Read through the runner from its checkpoint (bounded, as reconcileNativePaneTarget): taken → ✅; the
|
|
2725
|
+
* same launch still current with the marker not taken yet → watched again under this CLI; that launch gone, or its
|
|
2726
|
+
* transcript unreadable → unverifiable (reported, never pasted again).
|
|
2727
|
+
*/
|
|
2728
|
+
async reconcileRuntimeHandoff(entry, holder, fresh) {
|
|
2729
|
+
const still = () => {
|
|
2730
|
+
let current;
|
|
2731
|
+
try {
|
|
2732
|
+
current = this.handoffStore().get(entry.id);
|
|
2733
|
+
}
|
|
2734
|
+
catch {
|
|
2735
|
+
current = undefined;
|
|
2736
|
+
}
|
|
2737
|
+
return !!current && current.holder === entry.holder && current.redeliveries === entry.redeliveries;
|
|
2738
|
+
};
|
|
2739
|
+
const native = this.nativePaneLifecycle;
|
|
2740
|
+
let kind = null;
|
|
2741
|
+
if (native?.current(entry.runtime)) {
|
|
2742
|
+
let reader;
|
|
2743
|
+
try {
|
|
2744
|
+
reader = this.nativeTranscriptReader(entry.runtime, { marker: entry.marker, ...(entry.wire !== undefined ? { wire: entry.wire } : {}) });
|
|
2745
|
+
for (let n = 0; n < 8; n++) {
|
|
2746
|
+
const before = reader.readPosition, look = await reader.look();
|
|
2747
|
+
if (!fresh())
|
|
2748
|
+
return "stale";
|
|
2749
|
+
kind = look;
|
|
2750
|
+
if (markerConsumed(look) || look === "unavailable" || look === "pending" || reader.readPosition === before)
|
|
2751
|
+
break;
|
|
2752
|
+
}
|
|
2753
|
+
}
|
|
2754
|
+
catch {
|
|
2755
|
+
kind = "unavailable";
|
|
2756
|
+
}
|
|
2757
|
+
finally {
|
|
2758
|
+
reader?.close?.();
|
|
2759
|
+
}
|
|
2760
|
+
}
|
|
2761
|
+
if (!fresh())
|
|
2762
|
+
return "stale";
|
|
2763
|
+
if (!still())
|
|
2764
|
+
return "skipped";
|
|
2765
|
+
if (kind && markerConsumed(kind)) {
|
|
2766
|
+
this.settleQueuedHandoff(entry, "taken", `restart-transcript:${kind}`);
|
|
2767
|
+
return "taken";
|
|
2768
|
+
}
|
|
2769
|
+
if (kind === null || kind === "unavailable" || !native?.current(entry.runtime)) {
|
|
2770
|
+
this.settleQueuedHandoff(entry, "unverifiable", "restart-transcript:unavailable");
|
|
2771
|
+
return "unverifiable";
|
|
2772
|
+
}
|
|
2773
|
+
// The same launch still holds it in its queue: this CLI watches it from where the read stopped.
|
|
2774
|
+
const next = { ...entry, holder };
|
|
2775
|
+
try {
|
|
2776
|
+
this.handoffStore().put(next);
|
|
2777
|
+
}
|
|
2778
|
+
catch (err) {
|
|
2779
|
+
this.logger.warn({ err, handoff: entry.id }, "Could not update a queued hand-off record");
|
|
2780
|
+
return "skipped";
|
|
2781
|
+
}
|
|
2782
|
+
this.watchQueuedHandoff(next);
|
|
2783
|
+
return "watching";
|
|
2672
2784
|
}
|
|
2673
2785
|
finishDurableSubmission(delivery, verdict) {
|
|
2674
2786
|
// Legacy backends may accept a pane write without enough pane evidence to
|
|
@@ -3132,6 +3244,7 @@ export class Daemon extends EventEmitter {
|
|
|
3132
3244
|
}
|
|
3133
3245
|
if (nativeDisposition)
|
|
3134
3246
|
this.isNewSession = nativeDisposition === "fresh";
|
|
3247
|
+
this.resetRoomConversation(nativeDisposition === "reattached");
|
|
3135
3248
|
// #1209: conditional continuation for the turn interrupted by the last
|
|
3136
3249
|
// restart, if the gates allow. Detached; the gate
|
|
3137
3250
|
// consumes its one-shot marker first and never throws into boot.
|
|
@@ -5036,6 +5149,8 @@ export class Daemon extends EventEmitter {
|
|
|
5036
5149
|
return;
|
|
5037
5150
|
}
|
|
5038
5151
|
const verdict = { reached: false };
|
|
5152
|
+
let codexBefore = null;
|
|
5153
|
+
let cliBefore = null;
|
|
5039
5154
|
try {
|
|
5040
5155
|
await this.wake();
|
|
5041
5156
|
if (!this.isDeliveryEpochCurrent(deliveryEpoch)) {
|
|
@@ -5045,6 +5160,27 @@ export class Daemon extends EventEmitter {
|
|
|
5045
5160
|
tellWritten(false);
|
|
5046
5161
|
return;
|
|
5047
5162
|
}
|
|
5163
|
+
// 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.
|
|
5164
|
+
if (ownSwitch?.codex) {
|
|
5165
|
+
const gate = await this.codexSwitchGate();
|
|
5166
|
+
if ("blocked" in gate) {
|
|
5167
|
+
this.logger.info({ requested: ownSwitch.codex, reason: gate.blocked, version: gate.version }, "Codex runtime switch not typed");
|
|
5168
|
+
reportSwitch({ outcome: "not_sent", reason: gate.blocked, version: gate.version ?? null });
|
|
5169
|
+
tellWritten(false);
|
|
5170
|
+
return;
|
|
5171
|
+
}
|
|
5172
|
+
codexBefore = gate;
|
|
5173
|
+
}
|
|
5174
|
+
if (ownSwitch?.cli) {
|
|
5175
|
+
const gate = await this.cliSwitchGate(ownSwitch.cli);
|
|
5176
|
+
if ("blocked" in gate) {
|
|
5177
|
+
this.logger.info({ requested: ownSwitch.cli, reason: gate.blocked, version: gate.version }, "CLI runtime switch not typed");
|
|
5178
|
+
reportSwitch({ outcome: "not_sent", reason: gate.blocked, version: gate.version ?? null });
|
|
5179
|
+
tellWritten(false);
|
|
5180
|
+
return;
|
|
5181
|
+
}
|
|
5182
|
+
cliBefore = gate;
|
|
5183
|
+
}
|
|
5048
5184
|
// Board 907c7899: the pane just before this attempt's paste — after its readiness wait, last capture and fence,
|
|
5049
5185
|
// under the paste lock (no other input lands in between). Each attempt looks again.
|
|
5050
5186
|
const lookBefore = async () => {
|
|
@@ -5059,8 +5195,10 @@ export class Daemon extends EventEmitter {
|
|
|
5059
5195
|
preserveExactBytes: true,
|
|
5060
5196
|
// #1690: our own /model holds every other delivery from its write on — before the lock is released, so a steer
|
|
5061
5197
|
// or /btw waiting on it cannot type into the gap before claude paints "Switch model?" (default cursor: Yes).
|
|
5062
|
-
...(ownSwitch || notifyWritten || contextReset ? { onPaneWritten: () => { if (contextReset)
|
|
5063
|
-
this.resetInboundPresentation();
|
|
5198
|
+
...(ownSwitch || notifyWritten || contextReset ? { onPaneWritten: () => { if (contextReset) {
|
|
5199
|
+
this.resetInboundPresentation();
|
|
5200
|
+
this.resetRoomConversation();
|
|
5201
|
+
} if (ownSwitch) {
|
|
5064
5202
|
this.ownSwitch = ownSwitch;
|
|
5065
5203
|
if (currentModelOwner())
|
|
5066
5204
|
modelObserver?.ownIntent(ownSwitch.requested);
|
|
@@ -5114,7 +5252,7 @@ export class Daemon extends EventEmitter {
|
|
|
5114
5252
|
reportSwitch({ outcome: "not_sent" }); // its write never began
|
|
5115
5253
|
else {
|
|
5116
5254
|
try {
|
|
5117
|
-
reportSwitch(await this.answerOwnSwitchDialog(ownSwitch));
|
|
5255
|
+
reportSwitch(ownSwitch.codex ? await this.verifyCodexSwitch(ownSwitch.codex, codexBefore) : ownSwitch.cli ? await this.verifyCliSwitch(ownSwitch.cli, cliBefore) : await this.answerOwnSwitchDialog(ownSwitch));
|
|
5118
5256
|
}
|
|
5119
5257
|
catch (err) {
|
|
5120
5258
|
this.logger.warn({ err: err.message }, "Answering our own model switch failed");
|
|
@@ -5144,11 +5282,118 @@ export class Daemon extends EventEmitter {
|
|
|
5144
5282
|
return;
|
|
5145
5283
|
}
|
|
5146
5284
|
const sw = msg.runtime_switch;
|
|
5147
|
-
const
|
|
5148
|
-
|
|
5285
|
+
const codexPart = (v) => v === null ? null : typeof v === "string" && v ? v : undefined;
|
|
5286
|
+
const codex = sw?.codex && typeof sw.codex === "object" ? { model: codexPart(sw.codex.model), effort: codexPart(sw.codex.effort) } : undefined;
|
|
5287
|
+
// 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).
|
|
5288
|
+
const rawCli = sw?.cli;
|
|
5289
|
+
const cli = rawCli && typeof rawCli === "object" && typeof rawCli.backend === "string" && Object.hasOwn(CLI_RUNTIME_SWITCH, rawCli.backend)
|
|
5290
|
+
? { backend: rawCli.backend, model: codexPart(rawCli.model), effort: codexPart(rawCli.effort) } : rawCli === undefined ? undefined : null;
|
|
5291
|
+
const cliOk = !cli || (cli.model !== undefined && cli.effort !== undefined && (cli.model !== null || cli.effort !== null)
|
|
5292
|
+
&& CLI_RUNTIME_SWITCH[cli.backend].command({ model: cli.model, effort: cli.effort }) === msg.content);
|
|
5293
|
+
// A malformed switch must not downgrade into an ungated legacy raw paste.
|
|
5294
|
+
if (rawCli !== undefined && (cli === null || !cliOk || codex || !sw || typeof sw.id !== "string" || sw.kind !== "model" || typeof sw.requested !== "string")) {
|
|
5295
|
+
if (typeof sw?.id === "string")
|
|
5296
|
+
this.broadcastFleetMessage({ type: "runtime_switch_result", id: sw.id, outcome: "not_sent", reason: "command" });
|
|
5297
|
+
return;
|
|
5298
|
+
}
|
|
5299
|
+
const ownSwitch = sw && typeof sw.id === "string" && sw.kind === "model" && typeof sw.requested === "string" && cli !== null && cliOk && !(codex && cli)
|
|
5300
|
+
&& (!codex || (codex.model !== undefined && codex.effort !== undefined && (codex.model !== null || codex.effort !== null)))
|
|
5301
|
+
? { id: sw.id, kind: "model", requested: sw.requested,
|
|
5302
|
+
...(codex ? { codex: { model: codex.model, effort: codex.effort } } : {}),
|
|
5303
|
+
...(cli ? { cli: { backend: cli.backend, model: cli.model, effort: cli.effort } } : {}) } : undefined;
|
|
5149
5304
|
const notifyWritten = typeof msg.notify_written === "string" && /^[0-9a-f]{16}$/.test(msg.notify_written) ? msg.notify_written : undefined;
|
|
5150
5305
|
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);
|
|
5151
5306
|
}
|
|
5307
|
+
/**
|
|
5308
|
+
* M-3175: before typing a codex `/model … --reasoning=…`: the pane authoritatively idle (bounded), the RUNNING codex at a
|
|
5309
|
+
* version that has the inline form (an older one would send the line to the model as a prompt), and what the switch is
|
|
5310
|
+
* verified against afterwards — the rollout's end when the session has one, and the count of codex's answers on the pane.
|
|
5311
|
+
*/
|
|
5312
|
+
async codexSwitchGate() {
|
|
5313
|
+
const tmux = this.tmux;
|
|
5314
|
+
if (!tmux || !await this.waitForAuthoritativePaneIdle(CODEX_SWITCH_IDLE_MS, 500) || this.tmux !== tmux)
|
|
5315
|
+
return { blocked: "busy" };
|
|
5316
|
+
const pid = await tmux.getPanePid?.() ?? null;
|
|
5317
|
+
const version = pid ? await codexRunningVersion(pid) : null;
|
|
5318
|
+
if (!codexSupportsInlineModel(version))
|
|
5319
|
+
return { blocked: "version", version };
|
|
5320
|
+
const pane = await tmux.capturePaneWithHistory(CODEX_SWITCH_HISTORY_LINES).catch(() => "");
|
|
5321
|
+
let rollout = null;
|
|
5322
|
+
const session = this.backend?.readRawPasteSession?.(pane);
|
|
5323
|
+
if (session) {
|
|
5324
|
+
const file = await checkpointCodexPane(session.sessionsDir, session.sessionId, this.config.working_directory || process.cwd()).catch(() => null);
|
|
5325
|
+
if (file)
|
|
5326
|
+
rollout = { path: file.path, offset: file.offset };
|
|
5327
|
+
}
|
|
5328
|
+
return { rollout, answers: codexSwitchAnswerCount(pane), version };
|
|
5329
|
+
}
|
|
5330
|
+
/**
|
|
5331
|
+
* M-3180: before typing a CLI_RUNTIME_SWITCH step: the pane authoritatively idle (bounded), the RUNNING binary at the entry's minimum
|
|
5332
|
+
* for this step, and what the verdict compares against — the scrollback before the command and the entry's record checkpoint.
|
|
5333
|
+
*/
|
|
5334
|
+
async cliSwitchGate(step) {
|
|
5335
|
+
const tmux = this.tmux, entry = CLI_RUNTIME_SWITCH[step.backend];
|
|
5336
|
+
if (!entry || !tmux || !await this.waitForAuthoritativePaneIdle(CODEX_SWITCH_IDLE_MS, 500) || this.tmux !== tmux)
|
|
5337
|
+
return { blocked: "busy" };
|
|
5338
|
+
const pid = await tmux.getPanePid?.() ?? null;
|
|
5339
|
+
const version = pid ? await cliRunningVersion(pid, { backend: step.backend, matchExe: entry.matchExe, versionFromExe: entry.versionFromExe }) : null;
|
|
5340
|
+
if (!cliSwitchAllowed(entry, step, version))
|
|
5341
|
+
return { blocked: "version", version };
|
|
5342
|
+
const pane = await tmux.capturePaneWithHistory(CODEX_SWITCH_HISTORY_LINES).catch(() => "");
|
|
5343
|
+
const record = entry.checkpoint ? await entry.checkpoint(pane, this.config.working_directory || process.cwd(), pid).catch(() => undefined) : undefined;
|
|
5344
|
+
return { pane, ...(record !== undefined ? { record } : {}) };
|
|
5345
|
+
}
|
|
5346
|
+
/** M-3180: the entry's verdict on the scrollback after the step, against the one before it; nothing in time is not confirmed. */
|
|
5347
|
+
async verifyCliSwitch(step, before) {
|
|
5348
|
+
const tmux = this.tmux, entry = CLI_RUNTIME_SWITCH[step.backend];
|
|
5349
|
+
if (!tmux || !before || !entry)
|
|
5350
|
+
return { outcome: "not_confirmed" };
|
|
5351
|
+
const deadline = performance.now() + CODEX_SWITCH_VERIFY_MS;
|
|
5352
|
+
while (performance.now() < deadline && this.tmux === tmux) {
|
|
5353
|
+
const pane = await tmux.capturePaneWithHistory(CODEX_SWITCH_HISTORY_LINES).catch(() => "");
|
|
5354
|
+
const verdict = await entry.verify({ model: step.model, effort: step.effort }, before, { pane });
|
|
5355
|
+
if (verdict?.outcome === "switched")
|
|
5356
|
+
return { outcome: "switched", confirmed: true, shown: verdict.shown };
|
|
5357
|
+
if (verdict?.outcome === "mismatch")
|
|
5358
|
+
return { outcome: "mismatch", shown: verdict.shown, answered: true };
|
|
5359
|
+
await new Promise(resolve => setTimeout(resolve, 200));
|
|
5360
|
+
}
|
|
5361
|
+
return { outcome: "not_confirmed" };
|
|
5362
|
+
}
|
|
5363
|
+
/**
|
|
5364
|
+
* M-3175: what our codex switch came to. The rollout's `thread_settings_applied` written after our checkpoint is the proof
|
|
5365
|
+
* (codex writes it at once once the session has a rollout); a session with none yet has codex's own answer on the pane —
|
|
5366
|
+
* a NEW `• Model changed to … for this session only` (or `■` refusal) after the ones counted before the line was typed.
|
|
5367
|
+
* Anything that does not name what was asked is a mismatch; no answer in time is not confirmed. The fleet restarts on both.
|
|
5368
|
+
*/
|
|
5369
|
+
async verifyCodexSwitch(want, before) {
|
|
5370
|
+
const tmux = this.tmux;
|
|
5371
|
+
if (!tmux || !before)
|
|
5372
|
+
return { outcome: "not_confirmed" };
|
|
5373
|
+
const fits = (model, effort) => (want.model === null || model === want.model) && (want.effort === null || effort === want.effort);
|
|
5374
|
+
const deadline = performance.now() + CODEX_SWITCH_VERIFY_MS;
|
|
5375
|
+
while (performance.now() < deadline && this.tmux === tmux) {
|
|
5376
|
+
if (before.rollout) {
|
|
5377
|
+
const applied = codexAppliedFromRollout(await readFrom(before.rollout.path, before.rollout.offset, CODEX_SWITCH_ROLLOUT_READ));
|
|
5378
|
+
if (applied) {
|
|
5379
|
+
const shown = `${applied.model} ${applied.effort ?? "default"}`;
|
|
5380
|
+
return fits(applied.model, applied.effort) ? { outcome: "switched", confirmed: true, shown } : { outcome: "mismatch", shown, answered: true };
|
|
5381
|
+
}
|
|
5382
|
+
}
|
|
5383
|
+
const pane = await tmux.capturePaneWithHistory(CODEX_SWITCH_HISTORY_LINES).catch(() => "");
|
|
5384
|
+
if (codexSwitchAnswerCount(pane) > before.answers) {
|
|
5385
|
+
const answer = codexSwitchFromPane(pane);
|
|
5386
|
+
if (answer?.kind === "refused")
|
|
5387
|
+
return { outcome: "mismatch", shown: answer.text, answered: true };
|
|
5388
|
+
if (answer?.kind === "switched" && !before.rollout) {
|
|
5389
|
+
const shown = `${answer.model} ${answer.effort}`;
|
|
5390
|
+
return fits(answer.model, answer.effort) ? { outcome: "switched", confirmed: true, shown } : { outcome: "mismatch", shown, answered: true };
|
|
5391
|
+
}
|
|
5392
|
+
}
|
|
5393
|
+
await new Promise(resolve => setTimeout(resolve, 200));
|
|
5394
|
+
}
|
|
5395
|
+
return { outcome: "not_confirmed" };
|
|
5396
|
+
}
|
|
5152
5397
|
/**
|
|
5153
5398
|
* #1690 (the user's choice A): after AgEnD's own `/model <name>`, claude may ask "Switch model?" (a warm cache for
|
|
5154
5399
|
* another model). When the model it names is the one asked for, answer Yes; otherwise No (Escape — `Kept model as …`),
|
|
@@ -5909,6 +6154,10 @@ export class Daemon extends EventEmitter {
|
|
|
5909
6154
|
}
|
|
5910
6155
|
/** Shared Fleet inputs: socket and native transports retain the same wake, epoch and raw-paste semantics. */
|
|
5911
6156
|
handleFleetMessage(msg, send, current = () => true) {
|
|
6157
|
+
if (msg.type === "hub_room_tools_changed") {
|
|
6158
|
+
this.ipcServer?.broadcast({ type: "hub_room_tools_changed" });
|
|
6159
|
+
return true;
|
|
6160
|
+
}
|
|
5912
6161
|
if (msg.type === "query_sessions") {
|
|
5913
6162
|
send({ type: "query_sessions_response", sessions: [] });
|
|
5914
6163
|
}
|
|
@@ -6057,7 +6306,7 @@ export class Daemon extends EventEmitter {
|
|
|
6057
6306
|
this.pauseRequested = false;
|
|
6058
6307
|
return false;
|
|
6059
6308
|
}
|
|
6060
|
-
if (!ready() || admission && !admission.accepts(text) || this.backend?.backgroundWorkRunning?.(text)
|
|
6309
|
+
if (!ready() || admission && !admission.accepts(text) || this.backend?.isDraftIdlePane?.(text) === true || this.backend?.backgroundWorkRunning?.(text)
|
|
6061
6310
|
|| !allowStuck && !this.paneAuthoritativelyIdle(text)) {
|
|
6062
6311
|
this.pauseRequested = false;
|
|
6063
6312
|
return false;
|
|
@@ -6445,7 +6694,9 @@ export class Daemon extends EventEmitter {
|
|
|
6445
6694
|
this.logStateEdge(previous, snapshot);
|
|
6446
6695
|
this.publishWorkingState("execution");
|
|
6447
6696
|
this.emit("instance_state", { name: this.name, ...snapshot });
|
|
6448
|
-
this.broadcastFleetMessage({ type: "instance_state", instanceName: this.name, ...snapshot
|
|
6697
|
+
this.broadcastFleetMessage({ type: "instance_state", instanceName: this.name, ...snapshot,
|
|
6698
|
+
turnEvidence: this.turnEvidence(), turnActivityAt: this.turnWatch.activityAt });
|
|
6699
|
+
this.noteTurnEdge(snapshot.state);
|
|
6449
6700
|
if (snapshot.state === "stuck" && pane && this.instanceStateReadyPattern) {
|
|
6450
6701
|
this.handleStuckTransition(pane, snapshot, this.instanceStateReadyPattern);
|
|
6451
6702
|
}
|
|
@@ -6886,6 +7137,48 @@ export class Daemon extends EventEmitter {
|
|
|
6886
7137
|
* This launch's transcript monitor. #1510: its turn boundaries feed the reply guard's ledger, which starts empty
|
|
6887
7138
|
* with it — a new monitor re-baselines at the transcript's end, so nothing the old one read can be attributed.
|
|
6888
7139
|
*/
|
|
7140
|
+
/** M-3239: this launch's turn as its transcript tells it (dispatcher-liveness.ts). */
|
|
7141
|
+
turnWatch = new TurnWatch();
|
|
7142
|
+
turnActivitySentAt = 0;
|
|
7143
|
+
turnEndTimer = null;
|
|
7144
|
+
/** M-3239: Claude's and Codex's transcripts tell each tool call and answer; their pane's spinner alone is not a turn. */
|
|
7145
|
+
turnEvidence() {
|
|
7146
|
+
const bin = this.backend?.binaryName;
|
|
7147
|
+
return (bin === "claude" || bin === "codex") && this.transcriptMonitor?.following() === true;
|
|
7148
|
+
}
|
|
7149
|
+
/** M-3239: progress for the board's quiet clock, at most every 30 s while a turn runs (the idle edge carries the last). */
|
|
7150
|
+
reportTurnActivity() {
|
|
7151
|
+
const now = Date.now();
|
|
7152
|
+
if (now - this.turnActivitySentAt < TURN_ACTIVITY_REPORT_MS)
|
|
7153
|
+
return;
|
|
7154
|
+
this.turnActivitySentAt = now;
|
|
7155
|
+
this.broadcastFleetMessage({ type: "turn_activity", instanceName: this.name, at: now });
|
|
7156
|
+
}
|
|
7157
|
+
/**
|
|
7158
|
+
* M-3239: on the pane's idle edge, after a moment for the transcript's last lines: the turn's final text, when it
|
|
7159
|
+
* messaged no one — the fleet tells the dispatcher of a claimed card if that text asks a question.
|
|
7160
|
+
*/
|
|
7161
|
+
noteTurnEdge(state) {
|
|
7162
|
+
if (state !== "idle") {
|
|
7163
|
+
if (this.turnEndTimer) {
|
|
7164
|
+
clearTimeout(this.turnEndTimer);
|
|
7165
|
+
this.turnEndTimer = null;
|
|
7166
|
+
}
|
|
7167
|
+
if (state === "working")
|
|
7168
|
+
this.turnWatch.begin(Date.now());
|
|
7169
|
+
return;
|
|
7170
|
+
}
|
|
7171
|
+
if (this.turnEndTimer)
|
|
7172
|
+
return;
|
|
7173
|
+
this.turnEndTimer = setTimeout(() => {
|
|
7174
|
+
this.turnEndTimer = null; // a working edge before this cancels it: the turn went on
|
|
7175
|
+
const turn = this.turnWatch.end();
|
|
7176
|
+
if (!turn || turn.messaged || !turn.text.trim() || !this.turnEvidence())
|
|
7177
|
+
return;
|
|
7178
|
+
this.broadcastFleetMessage({ type: "turn_ended", instanceName: this.name, startedAt: turn.startedAt, text: turn.text.slice(-4000) });
|
|
7179
|
+
}, TURN_END_SETTLE_MS);
|
|
7180
|
+
this.turnEndTimer.unref?.();
|
|
7181
|
+
}
|
|
6889
7182
|
buildTranscriptMonitor(source) {
|
|
6890
7183
|
this.followLog.reset();
|
|
6891
7184
|
const modelLaunch = this.backend?.modelObservationLaunch?.();
|
|
@@ -6968,6 +7261,20 @@ export class Daemon extends EventEmitter {
|
|
|
6968
7261
|
});
|
|
6969
7262
|
for (const event of ["tool_use", "tool_result", "assistant_text"])
|
|
6970
7263
|
monitor.on(event, touch);
|
|
7264
|
+
// M-3239: the turn as the transcript tells it — progress for the board's quiet clock, and the question a turn ends on.
|
|
7265
|
+
const mine = () => this.transcriptMonitor === monitor;
|
|
7266
|
+
monitor.on("tool_use", (name, input) => { if (mine()) {
|
|
7267
|
+
this.turnWatch.tool(name, input, Date.now());
|
|
7268
|
+
this.reportTurnActivity();
|
|
7269
|
+
} });
|
|
7270
|
+
monitor.on("tool_result", () => { if (mine()) {
|
|
7271
|
+
this.turnWatch.result(Date.now());
|
|
7272
|
+
this.reportTurnActivity();
|
|
7273
|
+
} });
|
|
7274
|
+
monitor.on("assistant_text", (text) => { if (mine()) {
|
|
7275
|
+
this.turnWatch.text(text, Date.now());
|
|
7276
|
+
this.reportTurnActivity();
|
|
7277
|
+
} });
|
|
6971
7278
|
return monitor;
|
|
6972
7279
|
}
|
|
6973
7280
|
/**
|
|
@@ -7397,7 +7704,7 @@ export class Daemon extends EventEmitter {
|
|
|
7397
7704
|
// work cannot hide behind this: it changes the layout, the next
|
|
7398
7705
|
// output arms another probe, and the debounce capture still fires.
|
|
7399
7706
|
// #1641: never while the transcript shows a turn running — that idle-looking screen is mid-turn.
|
|
7400
|
-
if (this.instanceState === "idle" && this.
|
|
7707
|
+
if (this.instanceState === "idle" && this.executionIdleProof()?.(pane) === true
|
|
7401
7708
|
&& this.transcriptTurnState() !== "open")
|
|
7402
7709
|
return;
|
|
7403
7710
|
// A second burst overtook the probe. Do not bless its stale capture as
|
|
@@ -7434,7 +7741,7 @@ export class Daemon extends EventEmitter {
|
|
|
7434
7741
|
// observe twice, which silently disabled the "content moved" branch.
|
|
7435
7742
|
if (this.backend?.periodicRedrawFrom)
|
|
7436
7743
|
this.periodicRedrawLayout = this.backend.periodicRedrawFrom(pane);
|
|
7437
|
-
const structuredPeriodicIdle = this.
|
|
7744
|
+
const structuredPeriodicIdle = this.executionIdleProof();
|
|
7438
7745
|
// #1641: the transcript outranks the pane: while it shows the turn running, no reading of this pane is idle (codex
|
|
7439
7746
|
// hides its status row while streaming, leaving the idle composer and footer in view mid-turn).
|
|
7440
7747
|
const transcriptTurn = this.transcriptTurnState();
|
|
@@ -7664,6 +7971,13 @@ export class Daemon extends EventEmitter {
|
|
|
7664
7971
|
return undefined;
|
|
7665
7972
|
return proof;
|
|
7666
7973
|
}
|
|
7974
|
+
/** Draft text can be execution-idle, but must not become empty-composer proof for delivery, pause or nudges. */
|
|
7975
|
+
executionIdleProof() {
|
|
7976
|
+
const empty = this.periodicIdleProof(), draft = this.backend?.isDraftIdlePane;
|
|
7977
|
+
if (!empty && !draft)
|
|
7978
|
+
return undefined;
|
|
7979
|
+
return pane => empty?.call(this.backend, pane) === true || draft?.call(this.backend, pane) === true;
|
|
7980
|
+
}
|
|
7667
7981
|
bindInstanceStateOutputListener(windowId) {
|
|
7668
7982
|
if (!this.controlClient || !this.instanceStateMonitorActive)
|
|
7669
7983
|
return;
|
|
@@ -8497,7 +8811,9 @@ export class Daemon extends EventEmitter {
|
|
|
8497
8811
|
// byte for byte (its proof is the wire's hash), so the notice waits for the next delivery without one.
|
|
8498
8812
|
const whatsNew = this.pendingWhatsNew && !meta.human_receipt_id && !meta.handoff_redelivery
|
|
8499
8813
|
? this.currentWhatsNew(this.pendingWhatsNew) : null;
|
|
8500
|
-
const
|
|
8814
|
+
const body = whatsNew ? withWhatsNew(formatted, whatsNew.notice) : formatted;
|
|
8815
|
+
const roomMarker = roomContextInputMarker(meta);
|
|
8816
|
+
const pasted = roomMarker ? `${roomMarker}\n${body}` : body;
|
|
8501
8817
|
const status = channelStatus(meta);
|
|
8502
8818
|
// A fresh delivery begins a fresh turn — its bubble must not inherit
|
|
8503
8819
|
// the previous turn's tool list.
|
|
@@ -8515,6 +8831,10 @@ export class Daemon extends EventEmitter {
|
|
|
8515
8831
|
this.logger.info({ handoff: meta.handoff_redelivery }, "Queued hand-off redelivery dropped: its CLI was replaced before the write");
|
|
8516
8832
|
return;
|
|
8517
8833
|
}
|
|
8834
|
+
if (meta.hub_room_context_generation && meta.hub_room_context_generation !== this.roomConversationGeneration()) {
|
|
8835
|
+
this.reportCrossInstanceDeliveryFailure(meta, { reached: true, phase: "room-context", proof: "stale-generation" });
|
|
8836
|
+
return;
|
|
8837
|
+
}
|
|
8518
8838
|
const durableAttempt = this.durableDeliveryAttempt(meta, content);
|
|
8519
8839
|
if (durableAttempt === false) {
|
|
8520
8840
|
this.deferDurableDelivery(meta, "invalid durable delivery attempt metadata");
|
|
@@ -8526,6 +8846,7 @@ export class Daemon extends EventEmitter {
|
|
|
8526
8846
|
sent = await this.deliverMessage(pasted, status, {
|
|
8527
8847
|
deliveryEpoch,
|
|
8528
8848
|
submissionId: meta.message_id,
|
|
8849
|
+
...(meta.hub_room_context_generation ? { roomContextGeneration: meta.hub_room_context_generation } : {}),
|
|
8529
8850
|
...(meta.verification_id ? { humanVerificationId: meta.verification_id, humanMeta: meta } : {}),
|
|
8530
8851
|
verdict,
|
|
8531
8852
|
durableAttempt: durableAttempt || undefined,
|
|
@@ -8619,8 +8940,8 @@ export class Daemon extends EventEmitter {
|
|
|
8619
8940
|
const verdict = opts?.verdict ?? { reached: false };
|
|
8620
8941
|
if (opts?.durableAttempt)
|
|
8621
8942
|
verdict.durableAttempt = true;
|
|
8622
|
-
const cancelled = () => opts?.deliveryEpoch !== undefined
|
|
8623
|
-
&&
|
|
8943
|
+
const cancelled = () => (opts?.deliveryEpoch !== undefined && !this.isDeliveryEpochCurrent(opts.deliveryEpoch))
|
|
8944
|
+
|| (!!opts?.roomContextGeneration && opts.roomContextGeneration !== this.roomConversationGeneration());
|
|
8624
8945
|
if (cancelled() || this.stormWindow?.isStopped())
|
|
8625
8946
|
return false;
|
|
8626
8947
|
formatted = prepareDeliveryWire(formatted, opts?.preserveExactBytes);
|
|
@@ -10367,8 +10688,12 @@ export class Daemon extends EventEmitter {
|
|
|
10367
10688
|
return "busy";
|
|
10368
10689
|
if (!this.deliveryInputReadyPane(pane))
|
|
10369
10690
|
return "busy";
|
|
10370
|
-
if (strandedAgendMessageInInput(pane, prompt))
|
|
10691
|
+
if (strandedAgendMessageInInput(pane, prompt)) {
|
|
10692
|
+
// A cancelled human turn can restore its text here. Idle observation must not let a later delivery submit it.
|
|
10693
|
+
if (this.backend?.binaryName === "codex" && /\[user:/.test(inputAreaText(pane, prompt) ?? ""))
|
|
10694
|
+
return "busy";
|
|
10371
10695
|
return "stranded";
|
|
10696
|
+
}
|
|
10372
10697
|
// Kiro uses the bottom row; Codex's positive prompt/footer check above
|
|
10373
10698
|
// rules out a historical transcript echo or a transition/modal screen.
|
|
10374
10699
|
return !requireBottomReady || bottomRowIsReady(pane, prompt) ? "clear" : "busy";
|
|
@@ -10925,6 +11250,8 @@ export class Daemon extends EventEmitter {
|
|
|
10925
11250
|
catch {
|
|
10926
11251
|
return hold("check_failed");
|
|
10927
11252
|
}
|
|
11253
|
+
if (this.codexInputOccupied(screen))
|
|
11254
|
+
return hold("input_occupied");
|
|
10928
11255
|
if (!current())
|
|
10929
11256
|
return false;
|
|
10930
11257
|
if (performance.now() >= deadline)
|
|
@@ -10983,6 +11310,7 @@ export class Daemon extends EventEmitter {
|
|
|
10983
11310
|
signature.takenMarker = leadMarker;
|
|
10984
11311
|
const rawPaste = durableAttempt?.submissionMode === "raw_paste";
|
|
10985
11312
|
const humanAttempt = verdict.humanReceipt;
|
|
11313
|
+
verdict.roomInputQueued = handingOffToNativeQueue || steer;
|
|
10986
11314
|
const humanMode = rawPaste ? "raw_paste" : steer ? "steer"
|
|
10987
11315
|
: handingOffToNativeQueue ? "native_queue_handoff" : "idle_submit";
|
|
10988
11316
|
if (humanAttempt && signature.unique && signature.value === humanReceiptMarker(humanAttempt.verificationId, humanDialect).slice(1, -1)
|
|
@@ -11023,6 +11351,8 @@ export class Daemon extends EventEmitter {
|
|
|
11023
11351
|
verdict.fenced = !verdict.durableBeginCommitted;
|
|
11024
11352
|
return false;
|
|
11025
11353
|
}
|
|
11354
|
+
if (pasteBaseline?.unsubmittedAgendInput)
|
|
11355
|
+
return this.failDelivery(verdict, status, "input-residue", "occupied-codex-composer");
|
|
11026
11356
|
// M-2267: the pane went into a tmux mode after the readiness wait. Nothing begun or written: the caller waits for
|
|
11027
11357
|
// readiness (which holds while it lasts) and tries again — as for a dialog that appeared before the write.
|
|
11028
11358
|
if (!verdict.durableBeginCommitted && await this.paneInTmuxMode("paste"))
|
|
@@ -11348,6 +11678,7 @@ export class Daemon extends EventEmitter {
|
|
|
11348
11678
|
: after === "queue" ? "composer-empty-queue" : "composer-empty-idle");
|
|
11349
11679
|
verdict.phase = steer ? "steer-accepted" : "composer-accepted";
|
|
11350
11680
|
verdict.proof = `${steer ? "steer" : "handoff"}-composer-${after}`;
|
|
11681
|
+
verdict.roomInputQueued = after === "queue";
|
|
11351
11682
|
if (status)
|
|
11352
11683
|
this.emit("message_confirmed", status); // ✅ taken from the box
|
|
11353
11684
|
return true;
|
|
@@ -11423,6 +11754,7 @@ export class Daemon extends EventEmitter {
|
|
|
11423
11754
|
if (verdict.handoff && !verdict.trackHandoff?.id)
|
|
11424
11755
|
this.dropQueuedHandoff(verdict);
|
|
11425
11756
|
verdict.handoff = undefined;
|
|
11757
|
+
verdict.roomInputQueued = false;
|
|
11426
11758
|
if (windowId && this.controlClient && !(await this.controlClient.waitUntilIdle(windowId))) {
|
|
11427
11759
|
verdict.phase = "native-queue-idle-wait";
|
|
11428
11760
|
verdict.proof = "idle-wait-failed";
|
|
@@ -12100,6 +12432,11 @@ export class Daemon extends EventEmitter {
|
|
|
12100
12432
|
* paste and once after, so confirmSubmitted can require a NEW marker or a NEW
|
|
12101
12433
|
* echo rather than accepting whatever was already there.
|
|
12102
12434
|
*/
|
|
12435
|
+
codexInputOccupied(pane) {
|
|
12436
|
+
const backend = this.backend, prompt = backend?.getBottomReadyPattern?.();
|
|
12437
|
+
return backend?.binaryName === "codex" && backend.ownsComposerRows?.(pane) === true && !!prompt
|
|
12438
|
+
&& strandedAgendMessageInInput(pane, prompt);
|
|
12439
|
+
}
|
|
12103
12440
|
async capturePaneEvidence(signature) {
|
|
12104
12441
|
if (!this.tmux)
|
|
12105
12442
|
return null;
|
|
@@ -12110,6 +12447,8 @@ export class Daemon extends EventEmitter {
|
|
|
12110
12447
|
try {
|
|
12111
12448
|
const pane = await this.tmux.capturePane();
|
|
12112
12449
|
const evidence = this.paneEvidence(pane, signature);
|
|
12450
|
+
if (this.codexInputOccupied(pane))
|
|
12451
|
+
evidence.unsubmittedAgendInput = true;
|
|
12113
12452
|
if (owner === this.tmux && window === owner.getWindowId?.() && spawn === this.spawnGeneration && fence === this.launchFenceEpoch && launch === this.launchAttempt) {
|
|
12114
12453
|
const counts = this.paneQuotaPatterns().map(ep => ({ key: Daemon.errorPatternKey(ep), count: Daemon.countOccurrences(ep.pattern, pane) }));
|
|
12115
12454
|
if (counts.length)
|
|
@@ -12117,10 +12456,7 @@ export class Daemon extends EventEmitter {
|
|
|
12117
12456
|
}
|
|
12118
12457
|
const input = this.inputRegion(pane);
|
|
12119
12458
|
if (input && agendMessageInInput(input.text)) {
|
|
12120
|
-
|
|
12121
|
-
// a single message. Nothing here can undo that; saying so beats
|
|
12122
|
-
// letting two messages silently merge.
|
|
12123
|
-
this.logger.warn("An unsubmitted message is already in the input row — this delivery will be appended to it");
|
|
12459
|
+
this.logger.warn("An unsubmitted message is already in the input row");
|
|
12124
12460
|
}
|
|
12125
12461
|
return evidence;
|
|
12126
12462
|
}
|
|
@@ -12788,7 +13124,7 @@ export class Daemon extends EventEmitter {
|
|
|
12788
13124
|
type: "fleet_outbound",
|
|
12789
13125
|
tool,
|
|
12790
13126
|
args,
|
|
12791
|
-
...(operationId ? { operationId, sourceDaemonBootId: this.bootId } : {}),
|
|
13127
|
+
...((operationId || (tool.startsWith("hub_room_") || tool === "hub_people_search")) ? { ...(operationId ? { operationId } : {}), sourceDaemonBootId: this.bootId } : {}),
|
|
12792
13128
|
fleetRequestId: fleetReqId,
|
|
12793
13129
|
senderSessionName,
|
|
12794
13130
|
});
|
|
@@ -15040,11 +15376,40 @@ export class Daemon extends EventEmitter {
|
|
|
15040
15376
|
this.lastIdleSessionRefreshAt = now;
|
|
15041
15377
|
void refresh.call(this.backend).then(() => this.saveSessionId(), () => { });
|
|
15042
15378
|
}
|
|
15379
|
+
roomConversationState = null;
|
|
15380
|
+
roomConversationGeneration() {
|
|
15381
|
+
try {
|
|
15382
|
+
// Local non-Claude backends checkpoint their own session below; do not replace it with a Claude-only field.
|
|
15383
|
+
if (this.nativePaneLifecycle || (this.config.backend ?? "claude-code") === "claude-code")
|
|
15384
|
+
this.roomConversationState?.observeSession(this.ownedWorkingSession);
|
|
15385
|
+
}
|
|
15386
|
+
catch (err) {
|
|
15387
|
+
this.logger.warn({ err }, "Room conversation checkpoint failed");
|
|
15388
|
+
return null;
|
|
15389
|
+
}
|
|
15390
|
+
return this.roomConversationState?.current() ?? null;
|
|
15391
|
+
}
|
|
15392
|
+
resetRoomConversation(reattached = false) {
|
|
15393
|
+
this.roomConversationState ??= new RoomConversationGeneration(this.instanceDir);
|
|
15394
|
+
try {
|
|
15395
|
+
this.roomConversationState.start(reattached);
|
|
15396
|
+
}
|
|
15397
|
+
catch (err) {
|
|
15398
|
+
this.logger.warn({ err }, "Room conversation generation is unconfirmed");
|
|
15399
|
+
}
|
|
15400
|
+
}
|
|
15401
|
+
roomInputHandedOff(meta) {
|
|
15402
|
+
const generation = meta.hub_room_context_generation;
|
|
15403
|
+
if (meta.from_instance !== HUB_REPORT_TARGET || !generation || generation !== this.roomConversationGeneration())
|
|
15404
|
+
return;
|
|
15405
|
+
this.broadcastFleetMessage({ type: "hub_room_input", correlationId: meta.correlation_id, generation });
|
|
15406
|
+
}
|
|
15043
15407
|
saveSessionId() {
|
|
15044
15408
|
if (this.nativePaneLifecycle) {
|
|
15045
15409
|
try {
|
|
15046
15410
|
this.nativePaneLifecycle.checkpointSession();
|
|
15047
15411
|
this.ownedWorkingSession = this.backend?.getSessionId() ?? null;
|
|
15412
|
+
this.roomConversationState?.observeSession(this.ownedWorkingSession);
|
|
15048
15413
|
}
|
|
15049
15414
|
catch (err) {
|
|
15050
15415
|
this.logger.warn({ err }, "Native conversation checkpoint is unconfirmed");
|
|
@@ -15059,6 +15424,7 @@ export class Daemon extends EventEmitter {
|
|
|
15059
15424
|
const sid = this.backend?.getSessionId();
|
|
15060
15425
|
if (!sid)
|
|
15061
15426
|
return;
|
|
15427
|
+
this.roomConversationState?.observeSession(sid);
|
|
15062
15428
|
if ((this.config.backend ?? "claude-code") === "claude-code" && Buffer.byteLength(sid) <= 256
|
|
15063
15429
|
&& !/[\u0000-\u001f\u007f]/.test(sid) && this.ownedWorkingSession !== sid) {
|
|
15064
15430
|
this.ownedWorkingSession = sid;
|