@songsid/agend 2.4.0-beta.26 → 2.4.0-beta.28
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 +2 -1
- package/dist/agent-cli.js +6 -0
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.d.ts +1 -0
- package/dist/agent-endpoint.js +5 -0
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-whats-new.js +4 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/backend/kiro-auth-store.d.ts +15 -2
- package/dist/backend/kiro-auth-store.js +64 -0
- package/dist/backend/kiro-auth-store.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/adapters/discord.js +4 -4
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.js +3 -3
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/ipc-bridge.d.ts +7 -0
- package/dist/channel/ipc-bridge.js +45 -11
- package/dist/channel/ipc-bridge.js.map +1 -1
- package/dist/channel/mcp-server.js +3 -1
- package/dist/channel/mcp-server.js.map +1 -1
- package/dist/channel/mcp-tools.js +6 -4
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/claude-turn-boundaries.d.ts +15 -0
- package/dist/claude-turn-boundaries.js +88 -0
- package/dist/claude-turn-boundaries.js.map +1 -0
- package/dist/cli.js +35 -2
- package/dist/cli.js.map +1 -1
- package/dist/contact-auth-service.js +3 -0
- package/dist/contact-auth-service.js.map +1 -1
- package/dist/contact-auth-store.d.ts +16 -0
- package/dist/contact-auth-store.js +61 -1
- package/dist/contact-auth-store.js.map +1 -1
- package/dist/daemon.d.ts +76 -4
- package/dist/daemon.js +621 -115
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-outbox.d.ts +145 -7
- package/dist/delivery-outbox.js +373 -8
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/detached-fleet-stop.d.ts +40 -0
- package/dist/detached-fleet-stop.js +126 -0
- package/dist/detached-fleet-stop.js.map +1 -0
- package/dist/fleet-lock.d.ts +5 -0
- package/dist/fleet-lock.js +21 -2
- package/dist/fleet-lock.js.map +1 -1
- package/dist/fleet-manager.d.ts +499 -5
- package/dist/fleet-manager.js +2917 -217
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-windows-runtime.d.ts +39 -3
- package/dist/fleet-windows-runtime.js +208 -30
- package/dist/fleet-windows-runtime.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +5 -0
- package/dist/general-knowledge/skills/hub/SKILL.md +5 -1
- package/dist/general-knowledge/skills/task-board/SKILL.md +14 -0
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +96 -26
- package/dist/hub/admin-dashboard.js +1 -1
- package/dist/hub/admin-dashboard.js.map +1 -1
- package/dist/hub/agent-catalog.d.ts +1 -1
- package/dist/hub/agent-catalog.js +4 -3
- package/dist/hub/agent-catalog.js.map +1 -1
- package/dist/hub/agent-intro.d.ts +1 -1
- package/dist/hub/agent-intro.js +1 -1
- package/dist/hub/agent-intro.js.map +1 -1
- package/dist/hub/agent-pictures.d.ts +1 -1
- package/dist/hub/agent-pictures.js +4 -3
- package/dist/hub/agent-pictures.js.map +1 -1
- package/dist/hub/catalog.d.ts +2 -2
- package/dist/hub/catalog.js +16 -13
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/client.js +9 -2
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.js +8 -1
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.js +4 -2
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/fleet-updates.d.ts +2 -2
- package/dist/hub/fleet-updates.js +7 -5
- package/dist/hub/fleet-updates.js.map +1 -1
- package/dist/hub/fleet-versions.d.ts +1 -1
- package/dist/hub/fleet-versions.js +3 -2
- package/dist/hub/fleet-versions.js.map +1 -1
- package/dist/hub/http/compose.js +57 -30
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/http/schema.js +4 -1
- package/dist/hub/http/schema.js.map +1 -1
- package/dist/hub/join/service.d.ts +6 -0
- package/dist/hub/join/service.js +10 -0
- package/dist/hub/join/service.js.map +1 -1
- package/dist/hub/member/room-ask.js +2 -0
- package/dist/hub/member/room-ask.js.map +1 -1
- package/dist/hub/member/room-post.d.ts +4 -0
- package/dist/hub/member/room-post.js +26 -1
- package/dist/hub/member/room-post.js.map +1 -1
- package/dist/hub/protocol.d.ts +58 -0
- package/dist/hub/protocol.js +3 -2
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/quota.d.ts +2 -2
- package/dist/hub/quota.js +6 -4
- package/dist/hub/quota.js.map +1 -1
- package/dist/hub/read-statement.d.ts +6 -0
- package/dist/hub/read-statement.js +33 -0
- package/dist/hub/read-statement.js.map +1 -0
- package/dist/hub/recommendations.d.ts +1 -1
- package/dist/hub/recommendations.js +3 -2
- package/dist/hub/recommendations.js.map +1 -1
- package/dist/hub/representative.d.ts +2 -0
- package/dist/hub/representative.js +8 -4
- package/dist/hub/representative.js.map +1 -1
- package/dist/hub/roles/clock.d.ts +1 -1
- package/dist/hub/roles/clock.js +9 -7
- package/dist/hub/roles/clock.js.map +1 -1
- package/dist/hub/roles/read.d.ts +4 -0
- package/dist/hub/roles/read.js +37 -7
- package/dist/hub/roles/read.js.map +1 -1
- package/dist/hub/room-history-model.d.ts +87 -0
- package/dist/hub/room-history-model.js +14 -0
- package/dist/hub/room-history-model.js.map +1 -0
- package/dist/hub/rooms/agents.d.ts +1 -1
- package/dist/hub/rooms/agents.js +3 -2
- package/dist/hub/rooms/agents.js.map +1 -1
- package/dist/hub/rooms/history.d.ts +8 -0
- package/dist/hub/rooms/history.js +31 -0
- package/dist/hub/rooms/history.js.map +1 -0
- package/dist/hub/rooms/schema.d.ts +2 -0
- package/dist/hub/rooms/schema.js +4 -0
- package/dist/hub/rooms/schema.js.map +1 -1
- package/dist/hub/rooms/service.d.ts +35 -19
- package/dist/hub/rooms/service.js +105 -26
- package/dist/hub/rooms/service.js.map +1 -1
- package/dist/hub/server.js +10 -3
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/session-epoch.js +2 -1
- package/dist/hub/session-epoch.js.map +1 -1
- package/dist/hub/settings-directory-decision.js +14 -7
- package/dist/hub/settings-directory-decision.js.map +1 -1
- package/dist/hub/settings-member-address-decision.js +3 -2
- package/dist/hub/settings-member-address-decision.js.map +1 -1
- package/dist/hub/settings-web-address-decision.js +2 -1
- package/dist/hub/settings-web-address-decision.js.map +1 -1
- package/dist/hub/store.d.ts +5 -0
- package/dist/hub/store.js +28 -5
- package/dist/hub/store.js.map +1 -1
- package/dist/hub/types.d.ts +2 -2
- package/dist/hub-agent-incarnation-record.d.ts +24 -0
- package/dist/hub-agent-incarnation-record.js +46 -0
- package/dist/hub-agent-incarnation-record.js.map +1 -0
- package/dist/human-delivery-receipts.d.ts +16 -4
- package/dist/human-delivery-receipts.js +26 -5
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +9 -3
- package/dist/instance-lifecycle.js +27 -10
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/local-pane-endpoint.d.ts +14 -0
- package/dist/local-pane-endpoint.js +32 -0
- package/dist/local-pane-endpoint.js.map +1 -1
- package/dist/locale.js +68 -4
- package/dist/locale.js.map +1 -1
- package/dist/native-agent-admission.js +9 -0
- package/dist/native-agent-admission.js.map +1 -1
- package/dist/native-exec-context.d.ts +11 -0
- package/dist/native-exec-context.js +18 -0
- package/dist/native-exec-context.js.map +1 -0
- package/dist/native-exec-input.d.ts +56 -0
- package/dist/native-exec-input.js +89 -0
- package/dist/native-exec-input.js.map +1 -0
- package/dist/native-mcp.d.ts +9 -1
- package/dist/native-mcp.js +29 -7
- package/dist/native-mcp.js.map +1 -1
- package/dist/native-pane-lifecycle.d.ts +3 -0
- package/dist/native-pane-lifecycle.js +2 -0
- package/dist/native-pane-lifecycle.js.map +1 -1
- package/dist/native-pane-manager.d.ts +18 -0
- package/dist/native-pane-manager.js +85 -8
- package/dist/native-pane-manager.js.map +1 -1
- package/dist/needs-you.d.ts +2 -1
- package/dist/needs-you.js.map +1 -1
- package/dist/outbound-handlers.d.ts +1 -0
- package/dist/outbound-handlers.js +9 -3
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +8 -0
- package/dist/outbound-schemas.js +6 -2
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/public-web-gateway.js +3 -1
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/recover.cjs +1 -0
- package/dist/reply-buttons-controller.d.ts +1 -0
- package/dist/reply-buttons-controller.js +1 -1
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/request-contact-gate.d.ts +2 -0
- package/dist/request-contact-gate.js +8 -3
- package/dist/request-contact-gate.js.map +1 -1
- package/dist/request-context-activation.d.ts +29 -0
- package/dist/request-context-activation.js +85 -0
- package/dist/request-context-activation.js.map +1 -0
- package/dist/request-context-admission.d.ts +22 -0
- package/dist/request-context-admission.js +12 -0
- package/dist/request-context-admission.js.map +1 -0
- package/dist/request-context-boot.d.ts +35 -0
- package/dist/request-context-boot.js +97 -0
- package/dist/request-context-boot.js.map +1 -0
- package/dist/request-context-call.d.ts +3 -0
- package/dist/request-context-call.js.map +1 -1
- package/dist/request-context-compatibility.js +10 -2
- package/dist/request-context-compatibility.js.map +1 -1
- package/dist/request-context-continuation.d.ts +6 -0
- package/dist/request-context-continuation.js +24 -0
- package/dist/request-context-continuation.js.map +1 -0
- package/dist/request-context-control-api.d.ts +119 -0
- package/dist/request-context-control-api.js +179 -0
- package/dist/request-context-control-api.js.map +1 -0
- package/dist/request-context-control-copy.d.ts +3 -0
- package/dist/request-context-control-copy.js +7 -0
- package/dist/request-context-control-copy.js.map +1 -0
- package/dist/request-context-controller.d.ts +44 -0
- package/dist/request-context-controller.js +129 -0
- package/dist/request-context-controller.js.map +1 -0
- package/dist/request-context-delivery-resolver.d.ts +13 -0
- package/dist/request-context-delivery-resolver.js +30 -0
- package/dist/request-context-delivery-resolver.js.map +1 -0
- package/dist/request-context-drain-projection.d.ts +8 -0
- package/dist/request-context-drain-projection.js +40 -0
- package/dist/request-context-drain-projection.js.map +1 -0
- package/dist/request-context-drain.d.ts +22 -0
- package/dist/request-context-drain.js +139 -7
- package/dist/request-context-drain.js.map +1 -1
- package/dist/request-context-enable-offer.d.ts +13 -0
- package/dist/request-context-enable-offer.js +31 -0
- package/dist/request-context-enable-offer.js.map +1 -0
- package/dist/request-context-exec-owner.d.ts +39 -0
- package/dist/request-context-exec-owner.js +128 -0
- package/dist/request-context-exec-owner.js.map +1 -0
- package/dist/request-context-go-back-view.d.ts +1 -0
- package/dist/request-context-go-back-view.js +17 -0
- package/dist/request-context-go-back-view.js.map +1 -0
- package/dist/request-context-helper-readiness.d.ts +14 -0
- package/dist/request-context-helper-readiness.js +23 -0
- package/dist/request-context-helper-readiness.js.map +1 -0
- package/dist/request-context-helper.d.ts +20 -0
- package/dist/request-context-helper.js +41 -0
- package/dist/request-context-helper.js.map +1 -0
- package/dist/request-context-hub-resolver.d.ts +29 -0
- package/dist/request-context-hub-resolver.js +90 -0
- package/dist/request-context-hub-resolver.js.map +1 -0
- package/dist/request-context-human-resolver.d.ts +20 -0
- package/dist/request-context-human-resolver.js +77 -0
- package/dist/request-context-human-resolver.js.map +1 -0
- package/dist/request-context-human.d.ts +112 -0
- package/dist/request-context-human.js +176 -0
- package/dist/request-context-human.js.map +1 -0
- package/dist/request-context-inputs.d.ts +21 -0
- package/dist/request-context-inputs.js +63 -0
- package/dist/request-context-inputs.js.map +1 -0
- package/dist/request-context-installation.d.ts +117 -0
- package/dist/request-context-installation.js +328 -0
- package/dist/request-context-installation.js.map +1 -0
- package/dist/request-context-knowledge.d.ts +5 -0
- package/dist/request-context-knowledge.js +32 -0
- package/dist/request-context-knowledge.js.map +1 -0
- package/dist/request-context-migration.d.ts +11 -0
- package/dist/request-context-migration.js +16 -3
- package/dist/request-context-migration.js.map +1 -1
- package/dist/request-context-native-human.d.ts +20 -0
- package/dist/request-context-native-human.js +91 -0
- package/dist/request-context-native-human.js.map +1 -0
- package/dist/request-context-native-output.d.ts +15 -0
- package/dist/request-context-native-output.js +46 -0
- package/dist/request-context-native-output.js.map +1 -0
- package/dist/request-context-native-result.d.ts +15 -0
- package/dist/request-context-native-result.js +46 -0
- package/dist/request-context-native-result.js.map +1 -0
- package/dist/request-context-off.d.ts +22 -0
- package/dist/request-context-off.js +77 -0
- package/dist/request-context-off.js.map +1 -0
- package/dist/request-context-outside-label.d.ts +5 -0
- package/dist/request-context-outside-label.js +28 -0
- package/dist/request-context-outside-label.js.map +1 -0
- package/dist/request-context-pane.d.ts +8 -0
- package/dist/request-context-pane.js +19 -0
- package/dist/request-context-pane.js.map +1 -1
- package/dist/request-context-pending-work.d.ts +11 -0
- package/dist/request-context-pending-work.js +43 -0
- package/dist/request-context-pending-work.js.map +1 -0
- package/dist/request-context-policy.d.ts +17 -1
- package/dist/request-context-policy.js +84 -6
- package/dist/request-context-policy.js.map +1 -1
- package/dist/request-context-readiness.d.ts +49 -0
- package/dist/request-context-readiness.js +64 -0
- package/dist/request-context-readiness.js.map +1 -0
- package/dist/request-context-recovery.d.ts +6 -2
- package/dist/request-context-recovery.js +25 -0
- package/dist/request-context-recovery.js.map +1 -1
- package/dist/request-context-relay.d.ts +2 -2
- package/dist/request-context-relay.js +10 -10
- package/dist/request-context-relay.js.map +1 -1
- package/dist/request-context-reply-pending.d.ts +16 -0
- package/dist/request-context-reply-pending.js +77 -0
- package/dist/request-context-reply-pending.js.map +1 -0
- package/dist/request-context-resolution.d.ts +35 -0
- package/dist/request-context-resolution.js +86 -0
- package/dist/request-context-resolution.js.map +1 -0
- package/dist/request-context-retirement.d.ts +21 -0
- package/dist/request-context-retirement.js +16 -0
- package/dist/request-context-retirement.js.map +1 -0
- package/dist/request-context-start.d.ts +15 -0
- package/dist/request-context-start.js +2 -0
- package/dist/request-context-start.js.map +1 -0
- package/dist/request-context-turns.d.ts +1 -1
- package/dist/request-context-turns.js +3 -2
- package/dist/request-context-turns.js.map +1 -1
- package/dist/request-context-unproved-label.d.ts +4 -0
- package/dist/request-context-unproved-label.js +25 -0
- package/dist/request-context-unproved-label.js.map +1 -0
- package/dist/request-context-update-guard.d.ts +15 -0
- package/dist/request-context-update-guard.js +54 -0
- package/dist/request-context-update-guard.js.map +1 -0
- package/dist/request-context-work.d.ts +50 -0
- package/dist/request-context-work.js +178 -0
- package/dist/request-context-work.js.map +1 -0
- package/dist/request-hub-context.d.ts +1 -0
- package/dist/request-hub-output.d.ts +2 -0
- package/dist/request-hub-output.js +12 -0
- package/dist/request-hub-output.js.map +1 -1
- package/dist/retained-human-control.d.ts +11 -0
- package/dist/retained-human-control.js +11 -0
- package/dist/retained-human-control.js.map +1 -0
- package/dist/runtime-build-info.js +1 -1
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-cli.js +1 -1
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client-store.js +7 -1
- package/dist/runtime-client-store.js.map +1 -1
- package/dist/runtime-client.js +15 -3
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-coordinator.d.ts +23 -0
- package/dist/runtime-coordinator.js +103 -4
- package/dist/runtime-coordinator.js.map +1 -1
- package/dist/runtime-pane-mcp.d.ts +9 -0
- package/dist/runtime-pane-mcp.js +22 -2
- package/dist/runtime-pane-mcp.js.map +1 -1
- package/dist/runtime-protocol.d.ts +2 -0
- package/dist/runtime-protocol.js.map +1 -1
- package/dist/runtime-update-controller.js +1 -1
- package/dist/runtime-update-controller.js.map +1 -1
- package/dist/runtime-windows-bridge.d.ts +8 -0
- package/dist/runtime-windows-bridge.js +50 -3
- package/dist/runtime-windows-bridge.js.map +1 -1
- package/dist/scheduler/db.js +9 -0
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/task-board-text.d.ts +3 -6
- package/dist/scheduler/task-board-text.js +15 -10
- package/dist/scheduler/task-board-text.js.map +1 -1
- package/dist/scheduler/task-board-unread.d.ts +90 -0
- package/dist/scheduler/task-board-unread.js +192 -0
- package/dist/scheduler/task-board-unread.js.map +1 -0
- package/dist/scheduler/task-board.d.ts +324 -6
- package/dist/scheduler/task-board.js +786 -47
- package/dist/scheduler/task-board.js.map +1 -1
- package/dist/service-install-handover.d.ts +52 -0
- package/dist/service-install-handover.js +50 -0
- package/dist/service-install-handover.js.map +1 -0
- package/dist/service-installer.d.ts +12 -0
- package/dist/service-installer.js +24 -10
- package/dist/service-installer.js.map +1 -1
- package/dist/settings-api.d.ts +2 -0
- package/dist/settings-api.js +4 -0
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-baseline.d.ts +1 -0
- package/dist/settings-baseline.js +5 -4
- package/dist/settings-baseline.js.map +1 -1
- package/dist/settings-confirmation.d.ts +2 -0
- package/dist/settings-confirmation.js +6 -0
- package/dist/settings-confirmation.js.map +1 -1
- package/dist/settings-effect.d.ts +2 -0
- package/dist/settings-effect.js +59 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +3 -0
- package/dist/settings-http-confirmation.js +29 -0
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-route-lifetime.d.ts +3 -1
- package/dist/settings-route-lifetime.js +15 -5
- package/dist/settings-route-lifetime.js.map +1 -1
- package/dist/settings-transaction.d.ts +3 -2
- package/dist/settings-transaction.js.map +1 -1
- package/dist/task-board-tool.js +24 -3
- package/dist/task-board-tool.js.map +1 -1
- package/dist/task-board-waker.d.ts +53 -2
- package/dist/task-board-waker.js +183 -12
- package/dist/task-board-waker.js.map +1 -1
- package/dist/tips.js +1 -1
- package/dist/tips.js.map +1 -1
- package/dist/tool-permissions.js +3 -3
- package/dist/tool-permissions.js.map +1 -1
- package/dist/tool-receipt-output.d.ts +6 -6
- package/dist/transcript-monitor.d.ts +6 -1
- package/dist/transcript-monitor.js +59 -4
- package/dist/transcript-monitor.js.map +1 -1
- package/dist/transcript-turns.d.ts +3 -0
- package/dist/transcript-turns.js +5 -0
- package/dist/transcript-turns.js.map +1 -1
- package/dist/turn-reply-guard.d.ts +16 -1
- package/dist/turn-reply-guard.js +20 -2
- package/dist/turn-reply-guard.js.map +1 -1
- package/dist/ui/app.html +2 -2
- package/dist/ui/contact-auth-strings.js +6 -6
- package/dist/ui/contact-authorizations.js +19 -1
- package/dist/ui/contact-grant-editor.js +71 -11
- package/dist/ui/contact-needs.js +27 -8
- package/dist/ui/contact-permissions.js +25 -8
- package/dist/ui/contact-tool-groups.js +1 -1
- package/dist/ui/fleet-task-activity.js +164 -24
- package/dist/ui/fleet-task-card.js +77 -13
- package/dist/ui/fleet-task-common.js +14 -0
- package/dist/ui/fleet-task-flow.js +353 -0
- package/dist/ui/fleet-task-md.js +1 -1
- package/dist/ui/fleet-task-run.js +98 -22
- package/dist/ui/fleet-task-thread.js +245 -0
- package/dist/ui/fleet-task-unread.js +100 -0
- package/dist/ui/fleet-task-view.js +6 -5
- package/dist/ui/fleet-task-wake.js +140 -0
- package/dist/ui/fleet-tasks.js +13 -6
- package/dist/ui/hub-client.js +3 -0
- package/dist/ui/hub-room-members.js +4 -2
- package/dist/ui/hub-room-settings-strings.js +8 -0
- package/dist/ui/hub-room-settings.js +32 -0
- package/dist/ui/hub-room-thread.js +7 -1
- package/dist/ui/icons/hub-apple-touch-icon.png +0 -0
- package/dist/ui/icons/hub-favicon.ico +0 -0
- package/dist/ui/icons/hub-favicon.svg +10 -0
- package/dist/ui/icons/hub-icon-192.png +0 -0
- package/dist/ui/icons/hub-icon-512.png +0 -0
- package/dist/ui/icons/hub-icon-maskable-192.png +0 -0
- package/dist/ui/icons/hub-icon-maskable-512.png +0 -0
- package/dist/ui/icons/hub-maskable.svg +12 -0
- package/dist/ui/panel-hub.js +14 -3
- package/dist/ui/panel-needs.js +2 -1
- package/dist/ui/panel-settings.js +2 -1
- package/dist/ui/panel-windows-cli.js +2 -2
- package/dist/ui/request-contact-card.js +287 -0
- package/dist/ui/request-contact-client.js +83 -0
- package/dist/ui/request-contact-page.js +78 -0
- package/dist/ui/request-context-control.js +209 -0
- package/dist/ui/settings-registry.js +2 -0
- package/dist/ui/settings-update.js +3 -2
- package/dist/ui/shared/access-overview.css +1 -1
- package/dist/ui/shared/app-i18n.js +2 -2
- package/dist/ui/shared/app-install.js +2 -2
- package/dist/ui/shared/app-shell.js +17 -4
- package/dist/ui/shared/app-stream.js +4 -1
- package/dist/ui/shared/app-update.js +2 -1
- package/dist/ui/shared/app.css +101 -10
- package/dist/ui/shared/app.js +19 -2
- package/dist/ui/shared/task-board.css +164 -0
- package/dist/ui/shared/ui-icons.js +3 -0
- package/dist/ui/shared/ui-states.js +6 -0
- package/dist/ui/shared/update-card-ui.js +178 -11
- package/dist/ui/shared/view-strings.js +18 -0
- package/dist/ui/shared/web-authorize.js +1 -1
- package/dist/ui/task-unread.js +70 -0
- package/dist/ui/windows-cli-catalog.js +33 -6
- package/dist/update-card.d.ts +1 -1
- package/dist/update-card.js +7 -7
- package/dist/update-card.js.map +1 -1
- package/dist/update-fix.d.ts +66 -0
- package/dist/update-fix.js +67 -0
- package/dist/update-fix.js.map +1 -0
- package/dist/update-goback.js +15 -3
- package/dist/update-goback.js.map +1 -1
- package/dist/update-readiness.d.ts +2 -0
- package/dist/update-readiness.js +5 -1
- package/dist/update-readiness.js.map +1 -1
- package/dist/update-snapshot-scope.js +1 -0
- package/dist/update-snapshot-scope.js.map +1 -1
- package/dist/usage/i18n-keys.d.ts +1 -1
- package/dist/usage/i18n-keys.js +9 -0
- package/dist/usage/i18n-keys.js.map +1 -1
- package/dist/usage/providers.d.ts +3 -11
- package/dist/usage/providers.js +93 -131
- package/dist/usage/providers.js.map +1 -1
- package/dist/web-api.d.ts +49 -1
- package/dist/web-api.js +234 -13
- package/dist/web-api.js.map +1 -1
- package/dist/web-chat-history.d.ts +2 -0
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-icons.d.ts +9 -3
- package/dist/web-icons.js +62 -5
- package/dist/web-icons.js.map +1 -1
- package/dist/web-update.d.ts +9 -0
- package/dist/windows-agents.d.ts +24 -2
- package/dist/windows-agents.js +110 -4
- package/dist/windows-agents.js.map +1 -1
- package/dist/windows-cli-api.js +4 -2
- package/dist/windows-cli-api.js.map +1 -1
- package/dist/windows-cli-worker.js +9 -1
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +55 -1
- package/dist/windows-cli.js +147 -17
- package/dist/windows-cli.js.map +1 -1
- package/dist/windows-shortcuts.d.ts +3 -22
- package/dist/windows-shortcuts.js +5 -45
- package/dist/windows-shortcuts.js.map +1 -1
- package/dist/workflow-templates/default.md +3 -2
- package/dist/wsl-host.d.ts +52 -0
- package/dist/wsl-host.js +97 -0
- package/dist/wsl-host.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { type NativeExecContextReference } from "./native-exec-context.js";
|
|
2
|
+
import { type NativeExecInputClaim } from "./native-exec-input.js";
|
|
3
|
+
import type { RequestContextExecOwner, RequestContextExecInput } from "./request-context-exec-owner.js";
|
|
4
|
+
import { type RequestContextAdmissionPort, type RequestContextContinuation } from "./request-context-admission.js";
|
|
5
|
+
import { type RequestContextRegistrationGate } from "./request-context-fence.js";
|
|
1
6
|
import type { FleetConfig, InstanceConfig } from "./types.js";
|
|
2
7
|
import { type WindowsAgent, type WindowsAgents } from "./windows-agents.js";
|
|
3
8
|
import { type WindowsCliExecutor, type WindowsCliTask } from "./windows-cli.js";
|
|
4
|
-
import type { WebChatHistory } from "./web-chat-history.js";
|
|
9
|
+
import type { NativeHistoryMessage, WebChatHistory } from "./web-chat-history.js";
|
|
5
10
|
import type { SettingsExecution } from "./settings-transaction.js";
|
|
6
11
|
import type { NativeMcpLease } from "./native-mcp.js";
|
|
7
12
|
import type { AgentRuntimeTarget, PreparedAgentRuntime } from "./agent-runtime-change.js";
|
|
@@ -15,8 +20,12 @@ export interface FleetWindowsRuntimeHost {
|
|
|
15
20
|
save(): void;
|
|
16
21
|
emit(event: string, data: unknown): void;
|
|
17
22
|
stopping(): boolean;
|
|
23
|
+
requestContextAdmission?(): RequestContextAdmissionPort | undefined;
|
|
24
|
+
requestContextContinuation?(instance: string, inputId: string | null): RequestContextContinuation | undefined;
|
|
18
25
|
history?: Pick<WebChatHistory, "findByMessageId"> & Partial<Pick<WebChatHistory, "reconcileNativeMessages" | "findByNativeHistoryId">>;
|
|
19
|
-
openMcp?(instance: string, requestId: string, sandbox: WindowsAgent["sandbox"], stillCurrent: () => boolean, requestContext?: RequestContextCallLease): NativeMcpLease | null;
|
|
26
|
+
openMcp?(instance: string, requestId: string, sandbox: WindowsAgent["sandbox"], stillCurrent: () => boolean, requestContext?: RequestContextCallLease, inputReady?: () => Promise<boolean>): NativeMcpLease | null;
|
|
27
|
+
/** One projector for live completion and history import. No latest-chat or current-speaker fallback. */
|
|
28
|
+
projectRequestContextOutput?(instance: string, task: NativeExecutionResult, completion: ReturnType<FleetWindowsRuntime["requestContextCompletion"]>): Pick<NativeHistoryMessage, "replyTo" | "requestProvenance"> | null;
|
|
20
29
|
warn?(message: string, error: unknown): void;
|
|
21
30
|
removed?(name: string, config: InstanceConfig): void;
|
|
22
31
|
machineAvailable?(machineId: string): boolean;
|
|
@@ -46,15 +55,30 @@ export type NativeExecutionResult = WindowsCliTask & {
|
|
|
46
55
|
};
|
|
47
56
|
export declare class FleetWindowsRuntime {
|
|
48
57
|
private readonly host;
|
|
58
|
+
private retired;
|
|
59
|
+
private preparations;
|
|
60
|
+
private settling;
|
|
61
|
+
requestContextPhysicallyIdle(): boolean;
|
|
62
|
+
retireForRequestContext(): void;
|
|
63
|
+
private prepareFactory;
|
|
49
64
|
private hasClaimed;
|
|
50
65
|
private readonly requestContextRuns;
|
|
51
66
|
private requestContextLifecycle?;
|
|
52
67
|
/** Uninstalled in production until L. The lane owner is stable across exec claims, not the new run id. */
|
|
53
68
|
setRequestContextExecLifecycle(turns: RequestContextLocalTurns, owner: (instance: string) => RequestContextRuntimeOwner): void;
|
|
69
|
+
/** Whole-Fleet installation uses distinct C lanes per instance, all owned by the same drain registration. */
|
|
70
|
+
setRequestContextExecLifecycles(turnsOf: (instance: string) => RequestContextLocalTurns, owner: (instance: string) => RequestContextRuntimeOwner, registration: RequestContextRegistrationGate, prepare?: (instance: string, ...args: Parameters<RequestContextExecOwner["prepare"]>) => RequestContextExecInput): void;
|
|
54
71
|
requestContextCallsRequired(name: string): boolean;
|
|
72
|
+
/** Exact server-owned completion evidence remains readable after its C turn ended. */
|
|
73
|
+
requestContextCompletion(name: string, requestId: string, inputId?: string): Readonly<{
|
|
74
|
+
claim: Readonly<NativeExecInputClaim>;
|
|
75
|
+
owner: Readonly<RequestContextRuntimeOwner>;
|
|
76
|
+
reference: Readonly<NativeExecContextReference>;
|
|
77
|
+
current: () => boolean;
|
|
78
|
+
}>;
|
|
55
79
|
get drainRevision(): string;
|
|
56
80
|
drainView(rootId: string): {
|
|
57
|
-
registration:
|
|
81
|
+
registration: RequestContextRegistrationGate | null;
|
|
58
82
|
references: string[];
|
|
59
83
|
revision: string;
|
|
60
84
|
unknown: boolean;
|
|
@@ -85,6 +109,7 @@ export declare class FleetWindowsRuntime {
|
|
|
85
109
|
execution(name: string): "working" | "idle" | null;
|
|
86
110
|
/** Prepare a separate, pre-bound profile. The old conversation remains intact; startup cannot import an orphan. */
|
|
87
111
|
prepareRuntimeChange(name: string, before: InstanceConfig, target: AgentRuntimeTarget, current: () => boolean): Promise<PreparedAgentRuntime>;
|
|
112
|
+
private prepareRuntimeChangeOwned;
|
|
88
113
|
available(name: string): boolean;
|
|
89
114
|
create(input: Record<string, unknown>, authorized: () => boolean, transaction?: Pick<SettingsExecution, "mutate" | "complete">, binding?: {
|
|
90
115
|
native_adapter: "pane";
|
|
@@ -95,6 +120,7 @@ export declare class FleetWindowsRuntime {
|
|
|
95
120
|
runtime: "windows";
|
|
96
121
|
agent: WindowsAgent;
|
|
97
122
|
}>;
|
|
123
|
+
private createOwned;
|
|
98
124
|
previewUpdate(name: string, patch: Partial<NativeRuntimePatch>): WindowsAgent;
|
|
99
125
|
update(name: string, patch: Partial<NativeRuntimePatch>, authorized: () => boolean, transaction?: Pick<SettingsExecution, "mutate" | "complete">): {
|
|
100
126
|
name: string;
|
|
@@ -102,6 +128,12 @@ export declare class FleetWindowsRuntime {
|
|
|
102
128
|
};
|
|
103
129
|
remove(name: string, authorized: () => boolean, transaction?: Pick<SettingsExecution, "mutate" | "complete">): void;
|
|
104
130
|
setPaused(name: string, paused: boolean): void;
|
|
131
|
+
/** Captured, exact-root exec cancellations. A request to stop is never completion evidence. */
|
|
132
|
+
requestContextStops(rootId: string): ReadonlyArray<{
|
|
133
|
+
instance: string;
|
|
134
|
+
stop(current: () => boolean): void;
|
|
135
|
+
retired(): boolean;
|
|
136
|
+
}>;
|
|
105
137
|
cancel(name: string): WindowsCliTask | null;
|
|
106
138
|
recover(name: string, confirmedStopped: unknown): WindowsAgent & {
|
|
107
139
|
blocked: boolean;
|
|
@@ -109,9 +141,13 @@ export declare class FleetWindowsRuntime {
|
|
|
109
141
|
recoverAsync(name: string, confirmedStopped: unknown): Promise<WindowsAgent & {
|
|
110
142
|
blocked: boolean;
|
|
111
143
|
}>;
|
|
144
|
+
private recoverAsyncOwned;
|
|
145
|
+
private scopedOutput;
|
|
112
146
|
/** Idempotently bring existing native conversations into shared chat history and search. */
|
|
113
147
|
importHistory(instance?: string): void;
|
|
114
148
|
private claim;
|
|
115
149
|
deliver(name: string, payload: Record<string, unknown>, options?: NativeRuntimeDeliveryOptions): Promise<boolean>;
|
|
150
|
+
private deliverAdmitted;
|
|
116
151
|
execute(name: string, payload: Record<string, unknown>, options?: NativeRuntimeDeliveryOptions): Promise<NativeExecutionResult>;
|
|
152
|
+
private executeAdmitted;
|
|
117
153
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { nativeExecContextInputKey } from "./native-exec-context.js";
|
|
2
|
+
import { claimNativeExecInput, validateNativeExecInputProof } from "./native-exec-input.js";
|
|
3
|
+
import { runWithRequestContextAdmission } from "./request-context-admission.js";
|
|
1
4
|
import { RequestContextReferenceMap } from "./request-context-fence.js";
|
|
2
5
|
/** Windows execution adapter for the ordinary Fleet instance registry and delivery facade. */
|
|
3
6
|
import { OPERATIONS_MAX_CHARS } from "./instructions.js";
|
|
4
7
|
import { addsSecondGeneral } from "./web-only-fleet.js";
|
|
5
8
|
import { formatHumanInboundMessage } from "./human-delivery-receipts.js";
|
|
6
9
|
import { randomUUID } from "node:crypto";
|
|
7
|
-
import { windowsAgentsFor } from "./windows-agents.js";
|
|
10
|
+
import { windowsAgentExecutionTask, windowsAgentsFor } from "./windows-agents.js";
|
|
8
11
|
import { LOCAL_WINDOWS_CLI_OFF, windowsBridgeFor, windowsCliEnabled } from "./windows-cli.js";
|
|
9
12
|
import { localWindowsCliEnabled, remoteRuntimeEnabled } from "./runtime-switches.js";
|
|
10
13
|
/** M-2255: the switch for where this agent runs — this PC's Windows CLIs, or the other Windows computers. */
|
|
@@ -14,21 +17,76 @@ import { PROFILE_CLI_NAMES, assertCredentialProfileName, isCredentialProfileCli
|
|
|
14
17
|
import { validWindowsAgentId } from "./windows-cli-worker.js";
|
|
15
18
|
import { nativeProviderMcpSupported } from "./windows-cli-providers.js";
|
|
16
19
|
import { captureRequestContextCall } from "./request-context-call.js";
|
|
20
|
+
import { requestContextDigest } from "./request-context-store.js";
|
|
17
21
|
import { deliveryContentDigest } from "./delivery-outbox.js";
|
|
18
22
|
import { RequestContextInputDeferred } from "./request-context-turns.js";
|
|
19
23
|
export class FleetWindowsRuntime {
|
|
20
24
|
host;
|
|
25
|
+
retired = false;
|
|
26
|
+
preparations = 0;
|
|
27
|
+
settling = 0;
|
|
28
|
+
requestContextPhysicallyIdle() { return !this.preparations && !this.settling && !this.mcpLeases.size && !this.requestContextRuns.size && !this.store.requestContextActiveExecutions().length && this.bridge.idleForRequestContext?.() === true; }
|
|
29
|
+
retireForRequestContext() {
|
|
30
|
+
if (!this.requestContextPhysicallyIdle())
|
|
31
|
+
throw Error("Native conversations are not physically retired");
|
|
32
|
+
this.retired = true;
|
|
33
|
+
}
|
|
34
|
+
async prepareFactory(operation) {
|
|
35
|
+
this.enabled();
|
|
36
|
+
this.preparations++;
|
|
37
|
+
try {
|
|
38
|
+
return await operation();
|
|
39
|
+
}
|
|
40
|
+
finally {
|
|
41
|
+
this.preparations--;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
21
44
|
hasClaimed = false;
|
|
22
45
|
requestContextRuns = new RequestContextReferenceMap(run => run.rootContextId, run => `exec-run:${run.requestId}`);
|
|
23
46
|
requestContextLifecycle;
|
|
24
47
|
/** Uninstalled in production until L. The lane owner is stable across exec claims, not the new run id. */
|
|
25
48
|
setRequestContextExecLifecycle(turns, owner) {
|
|
26
|
-
if (this.requestContextLifecycle || this.hasClaimed || this.mcpLeases.size)
|
|
49
|
+
if (this.retired || this.requestContextLifecycle || this.hasClaimed || this.mcpLeases.size)
|
|
27
50
|
throw Error("Native request context must be installed before claims");
|
|
28
51
|
this.requestContextRuns.installRegistration(turns.registrationGate ?? undefined);
|
|
29
|
-
this.requestContextLifecycle = { turns, owner };
|
|
52
|
+
this.requestContextLifecycle = { turns: () => turns, owner };
|
|
53
|
+
}
|
|
54
|
+
/** Whole-Fleet installation uses distinct C lanes per instance, all owned by the same drain registration. */
|
|
55
|
+
setRequestContextExecLifecycles(turnsOf, owner, registration, prepare) {
|
|
56
|
+
if (this.retired || this.requestContextLifecycle || this.hasClaimed || this.mcpLeases.size)
|
|
57
|
+
throw Error("Native request context must be installed before claims");
|
|
58
|
+
this.requestContextRuns.installRegistration(registration);
|
|
59
|
+
const lanes = new Map();
|
|
60
|
+
this.requestContextLifecycle = { owner, ...(prepare ? { prepare } : {}), turns: instance => {
|
|
61
|
+
const turns = turnsOf(instance), previous = lanes.get(instance);
|
|
62
|
+
if (turns.registrationGate !== registration || previous && previous !== turns
|
|
63
|
+
|| [...lanes].some(([other, lane]) => other !== instance && lane === turns))
|
|
64
|
+
throw Error("Native request context lane differs");
|
|
65
|
+
lanes.set(instance, turns);
|
|
66
|
+
return turns;
|
|
67
|
+
} };
|
|
30
68
|
}
|
|
31
69
|
requestContextCallsRequired(name) { return !!this.requestContextLifecycle && isNativeExecInstance(this.config(name)); }
|
|
70
|
+
/** Exact server-owned completion evidence remains readable after its C turn ended. */
|
|
71
|
+
requestContextCompletion(name, requestId, inputId) {
|
|
72
|
+
const lifecycle = this.requestContextLifecycle;
|
|
73
|
+
if (this.retired || !lifecycle?.prepare || this.host.stopping() || !isNativeExecInstance(this.config(name)))
|
|
74
|
+
throw Error("Native scoped completion is unavailable");
|
|
75
|
+
const agentId = this.id(name), owner = Object.freeze(structuredClone(lifecycle.owner(name))), reference = this.store.requestExecContext(agentId, requestId);
|
|
76
|
+
if (!reference || reference.instance !== name || reference.incarnation !== owner.incarnation || inputId !== undefined && reference.inputId !== inputId)
|
|
77
|
+
throw Error("Native run belongs to another admitted input");
|
|
78
|
+
const inputKey = nativeExecContextInputKey(reference), claim = this.store.requestExecInput(agentId, requestId, inputKey);
|
|
79
|
+
if (!claim || owner.instance !== name)
|
|
80
|
+
throw Error("Native scoped completion is unavailable");
|
|
81
|
+
const image = requestContextDigest({ claim, owner, reference });
|
|
82
|
+
const current = () => { try {
|
|
83
|
+
return !this.host.stopping() && this.requestContextLifecycle === lifecycle && this.id(name) === agentId && requestContextDigest({ claim: this.store.requestExecInput(agentId, requestId, inputKey), owner: lifecycle.owner(name), reference: this.store.requestExecContext(agentId, requestId) }) === image;
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
return false;
|
|
87
|
+
} };
|
|
88
|
+
return Object.freeze({ claim, owner, reference, current });
|
|
89
|
+
}
|
|
32
90
|
get drainRevision() { return `${this.requestContextRuns.revision}:${this.store.requestContextDrainRevision}`; }
|
|
33
91
|
drainView(rootId) {
|
|
34
92
|
const view = this.requestContextRuns.view(rootId), runs = [...this.requestContextRuns.values()];
|
|
@@ -52,7 +110,8 @@ export class FleetWindowsRuntime {
|
|
|
52
110
|
throw new Error("Instance does not name a valid Windows runtime agent");
|
|
53
111
|
return id;
|
|
54
112
|
}
|
|
55
|
-
enabled() { if (
|
|
113
|
+
enabled() { if (this.retired)
|
|
114
|
+
throw Error("Native conversation factory is retired"); if (!windowsCliEnabled())
|
|
56
115
|
throw new Error("Windows runtime is disabled"); }
|
|
57
116
|
closeMcp(name) {
|
|
58
117
|
const active = this.mcpLeases.get(name);
|
|
@@ -67,6 +126,8 @@ export class FleetWindowsRuntime {
|
|
|
67
126
|
/** The host replaces this lightweight signal with the complete shared status frame. */
|
|
68
127
|
statusFrame() { return { runtimeChanged: true }; }
|
|
69
128
|
register() {
|
|
129
|
+
if (this.retired)
|
|
130
|
+
throw Error("Native conversation factory is retired");
|
|
70
131
|
const fleet = this.host.fleet();
|
|
71
132
|
return !!fleet && windowsCliEnabled() && registerWindowsProfiles(fleet, this.store, this.host.save);
|
|
72
133
|
}
|
|
@@ -82,6 +143,8 @@ export class FleetWindowsRuntime {
|
|
|
82
143
|
}
|
|
83
144
|
}
|
|
84
145
|
get(name) {
|
|
146
|
+
if (this.retired)
|
|
147
|
+
throw Error("Native conversation factory is retired");
|
|
85
148
|
const config = this.config(name);
|
|
86
149
|
if (!isWindowsInstance(config))
|
|
87
150
|
return null;
|
|
@@ -115,11 +178,12 @@ export class FleetWindowsRuntime {
|
|
|
115
178
|
return !agent || agent.paused || agent.blocked || !switchedOn(agent) ? null : agent.activeId ? "working" : "idle";
|
|
116
179
|
}
|
|
117
180
|
/** Prepare a separate, pre-bound profile. The old conversation remains intact; startup cannot import an orphan. */
|
|
118
|
-
|
|
181
|
+
prepareRuntimeChange(name, before, target, current) { return this.prepareFactory(() => this.prepareRuntimeChangeOwned(name, before, target, current)); }
|
|
182
|
+
async prepareRuntimeChangeOwned(name, before, target, current) {
|
|
119
183
|
const identity = target.machineId ? this.host.machineGeneration?.(target.machineId) : undefined;
|
|
120
184
|
let revoked = false;
|
|
121
185
|
const targetCurrent = () => {
|
|
122
|
-
if (revoked)
|
|
186
|
+
if (revoked || this.retired)
|
|
123
187
|
return false;
|
|
124
188
|
try {
|
|
125
189
|
if (target.machineId) {
|
|
@@ -202,7 +266,8 @@ export class FleetWindowsRuntime {
|
|
|
202
266
|
&& (!agent.machineId || this.host.machineAvailable?.(agent.machineId) === true)
|
|
203
267
|
&& !this.bridge.hasActiveTask(agent.machineId);
|
|
204
268
|
}
|
|
205
|
-
|
|
269
|
+
create(input, authorized, transaction, binding) { return this.prepareFactory(() => this.createOwned(input, () => !this.retired && authorized(), transaction, binding)); }
|
|
270
|
+
async createOwned(input, authorized, transaction, binding) {
|
|
206
271
|
this.enabled();
|
|
207
272
|
const fleet = this.host.fleet();
|
|
208
273
|
if (!fleet)
|
|
@@ -359,13 +424,35 @@ export class FleetWindowsRuntime {
|
|
|
359
424
|
}
|
|
360
425
|
this.changed(name);
|
|
361
426
|
}
|
|
362
|
-
|
|
427
|
+
/** Captured, exact-root exec cancellations. A request to stop is never completion evidence. */
|
|
428
|
+
requestContextStops(rootId) {
|
|
429
|
+
return [...this.requestContextRuns].filter(([, run]) => run.rootContextId === rootId).map(([name, run]) => {
|
|
430
|
+
const agentId = this.id(name), lifecycle = this.requestContextLifecycle;
|
|
431
|
+
const owned = () => !this.retired && this.requestContextLifecycle === lifecycle && this.id(name) === agentId;
|
|
432
|
+
return Object.freeze({ instance: name, stop: (current) => {
|
|
433
|
+
if (!owned() || current() !== true || this.requestContextRuns.get(name) !== run || this.store.get(agentId).activeId !== run.requestId)
|
|
434
|
+
throw Error("Native work changed before stop");
|
|
435
|
+
this.closeMcp(name);
|
|
436
|
+
this.store.cancel(agentId);
|
|
437
|
+
this.changed(name);
|
|
438
|
+
}, retired: () => {
|
|
439
|
+
if (!owned())
|
|
440
|
+
return false;
|
|
441
|
+
const agent = this.store.get(agentId);
|
|
442
|
+
this.retireRecoveredRequestContext(name, agent);
|
|
443
|
+
return this.requestContextRuns.get(name) !== run && agent.activeId !== run.requestId && !this.store.requestContextActiveExecutions().some(row => row.requestId === run.requestId);
|
|
444
|
+
} });
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
cancel(name) { this.enabled(); this.closeMcp(name); const result = this.store.cancel(this.id(name)); this.changed(name); return result; }
|
|
363
448
|
recover(name, confirmedStopped) {
|
|
449
|
+
this.enabled();
|
|
364
450
|
const result = this.store.recover(this.id(name), confirmedStopped);
|
|
365
451
|
this.changed(name);
|
|
366
452
|
return result;
|
|
367
453
|
}
|
|
368
|
-
|
|
454
|
+
recoverAsync(name, confirmedStopped) { return this.prepareFactory(() => this.recoverAsyncOwned(name, confirmedStopped)); }
|
|
455
|
+
async recoverAsyncOwned(name, confirmedStopped) {
|
|
369
456
|
const agent = this.get(name);
|
|
370
457
|
if (!agent?.machineId)
|
|
371
458
|
return this.recover(name, confirmedStopped);
|
|
@@ -379,9 +466,20 @@ export class FleetWindowsRuntime {
|
|
|
379
466
|
this.changed(name);
|
|
380
467
|
return result;
|
|
381
468
|
}
|
|
469
|
+
scopedOutput(name, agent, task) {
|
|
470
|
+
if (!task.finishedAt || task.outcomeConfirmed !== true || !task.execInputProof)
|
|
471
|
+
return null;
|
|
472
|
+
const completion = this.requestContextCompletion(name, task.id);
|
|
473
|
+
validateNativeExecInputProof(task.execInputProof, completion.claim);
|
|
474
|
+
const projection = this.host.projectRequestContextOutput?.(name, task, completion);
|
|
475
|
+
if (!projection || !completion.current())
|
|
476
|
+
return null;
|
|
477
|
+
return { messageId: `native:${task.id}:reply`, role: task.status === "completed" ? "agent" : "status", sender: this.config(name)?.display_name || agent.name,
|
|
478
|
+
text: task.status === "completed" ? task.output || "(No text output)" : [task.output, task.error || task.status].filter(Boolean).join("\n"), ts: new Date(task.finishedAt).toISOString(), ...projection };
|
|
479
|
+
}
|
|
382
480
|
/** Idempotently bring existing native conversations into shared chat history and search. */
|
|
383
481
|
importHistory(instance) {
|
|
384
|
-
if (!this.host.history)
|
|
482
|
+
if (this.retired || !this.host.history)
|
|
385
483
|
return;
|
|
386
484
|
for (const [name, config] of Object.entries(this.host.fleet()?.instances ?? {})) {
|
|
387
485
|
if (instance && name !== instance)
|
|
@@ -391,6 +489,17 @@ export class FleetWindowsRuntime {
|
|
|
391
489
|
const agent = this.store.get(this.id(name));
|
|
392
490
|
const expected = [];
|
|
393
491
|
for (const turn of agent.turns) {
|
|
492
|
+
if (this.store.requestExecInput(agent.id, turn.id)) {
|
|
493
|
+
try {
|
|
494
|
+
const task = this.store.requestExecCompletion(agent.id, turn.id) ?? this.bridge.get(turn.id), projected = task && this.scopedOutput(name, agent, task);
|
|
495
|
+
if (projected)
|
|
496
|
+
expected.push(projected);
|
|
497
|
+
}
|
|
498
|
+
catch (error) {
|
|
499
|
+
this.host.warn?.("Native scoped output remains unresolved", error);
|
|
500
|
+
}
|
|
501
|
+
continue; // Its accepted input already owns the original human/peer history row.
|
|
502
|
+
}
|
|
394
503
|
const userId = `native:${turn.id}:user`, replyId = `native:${turn.id}:reply`;
|
|
395
504
|
expected.push({ role: "user", sender: "You", text: turn.prompt, ts: new Date(turn.startedAt).toISOString(), messageId: userId });
|
|
396
505
|
if (turn.finishedAt)
|
|
@@ -404,6 +513,8 @@ export class FleetWindowsRuntime {
|
|
|
404
513
|
}
|
|
405
514
|
claim(name, payload, options, settled) {
|
|
406
515
|
this.enabled();
|
|
516
|
+
if (this.host.requestContextAdmission?.()?.available(this.host.requestContextContinuation?.(name, options.requestContextInputId ?? null)) === false)
|
|
517
|
+
throw new RequestContextInputDeferred();
|
|
407
518
|
this.hasClaimed = true;
|
|
408
519
|
if (this.host.stopping() || options.stillCurrent?.() === false)
|
|
409
520
|
throw new Error("Windows delivery is no longer current");
|
|
@@ -431,26 +542,63 @@ export class FleetWindowsRuntime {
|
|
|
431
542
|
const prompt = meta.source === "app" ? formatHumanInboundMessage(raw, { source: "app" }, "mcp") : raw;
|
|
432
543
|
const authority = options.authorityCurrent ?? options.stillCurrent;
|
|
433
544
|
const existing = agent.turns.some(turn => turn.id === requestId);
|
|
545
|
+
const contextText = [
|
|
546
|
+
`Your AgEnD instance is ${name}. AgEnD tools query Fleet agents, tasks and delivery receipts. ${agent.sandbox === "read-only" ? "This turn permits queries only; delegation and task changes are unavailable." : "Send/delegate tools enqueue work and return a receipt; do not wait for another Windows agent while holding this turn."}`,
|
|
547
|
+
...(typeof meta.from_instance === "string" ? [`Incoming Fleet context: ${JSON.stringify({ from_instance: meta.from_instance.slice(0, 128), correlation_id: typeof meta.correlation_id === "string" ? meta.correlation_id.slice(0, 256) : undefined, requires_reply: meta.requires_reply === "true" })}`] : []),
|
|
548
|
+
].join("\n");
|
|
549
|
+
const preparedLifecycle = this.requestContextLifecycle?.prepare;
|
|
550
|
+
let inputFrame, execInput, inputKey, contextReference;
|
|
551
|
+
if (preparedLifecycle) {
|
|
552
|
+
if (!nativeProviderMcpSupported(agent.cli) || !this.host.openMcp)
|
|
553
|
+
throw Error("Native request tools are unavailable");
|
|
554
|
+
inputKey = requestContextDigest([name, this.requestContextLifecycle.owner(name).incarnation, options.requestContextInputId ?? null]);
|
|
555
|
+
if (existing) {
|
|
556
|
+
contextReference = this.store.requestExecContext(agent.id, requestId) ?? undefined;
|
|
557
|
+
execInput = this.store.requestExecInput(agent.id, requestId, inputKey) ?? undefined;
|
|
558
|
+
if (!execInput)
|
|
559
|
+
throw Error("Native legacy turn cannot acquire request scope");
|
|
560
|
+
}
|
|
561
|
+
else {
|
|
562
|
+
if (agent.activeId)
|
|
563
|
+
throw new RequestContextInputDeferred();
|
|
564
|
+
const task = windowsAgentExecutionTask(agent, requestId, prompt), inputOptions = { context: contextText, resumeSessionId: agent.threadId };
|
|
565
|
+
execInput = claimNativeExecInput(task, inputOptions);
|
|
566
|
+
inputFrame = preparedLifecycle(name, options.requestContextInputId ?? null, task, inputOptions, execInput);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
434
569
|
let requestContext;
|
|
435
570
|
let retireContext = () => { };
|
|
436
571
|
if (!existing && this.requestContextLifecycle) {
|
|
437
572
|
// Even a valid return cannot replace a still-running exec grant. Queue it before touching C or the lease.
|
|
438
573
|
if (agent.activeId)
|
|
439
574
|
throw new RequestContextInputDeferred();
|
|
440
|
-
const {
|
|
575
|
+
const { owner: ownerOf } = this.requestContextLifecycle, owner = ownerOf(name), turns = this.requestContextLifecycle.turns(name);
|
|
441
576
|
if (owner.instance !== name)
|
|
442
577
|
throw Error("Native request context owner differs");
|
|
443
578
|
const previous = turns.current(owner);
|
|
444
579
|
// Resolve the admitted input with C's exact parent/actor/wire checks BEFORE retiring any old grant.
|
|
445
|
-
|
|
580
|
+
let snapshot;
|
|
581
|
+
try {
|
|
582
|
+
snapshot = turns.beforeWrite(inputFrame?.inputId ?? options.requestContextInputId ?? null, inputFrame?.wireSha256 ?? deliveryContentDigest(prompt), owner);
|
|
583
|
+
inputFrame?.bind(snapshot);
|
|
584
|
+
}
|
|
585
|
+
catch (error) {
|
|
586
|
+
if (snapshot && snapshot !== previous)
|
|
587
|
+
turns.ended(snapshot, owner);
|
|
588
|
+
inputFrame?.finish();
|
|
589
|
+
throw error;
|
|
590
|
+
}
|
|
591
|
+
if (inputFrame)
|
|
592
|
+
contextReference = Object.freeze({ version: 1, inputId: options.requestContextInputId ?? null, instance: name, incarnation: owner.incarnation, contextId: snapshot.context.ref.contextId, rootContextId: snapshot.context.ref.rootContextId });
|
|
446
593
|
retireContext = () => {
|
|
594
|
+
inputFrame?.finish();
|
|
447
595
|
if (snapshot !== previous)
|
|
448
596
|
turns.ended(snapshot, owner);
|
|
449
597
|
if (this.requestContextRuns.get(name)?.requestId === requestId)
|
|
450
598
|
this.requestContextRuns.delete(name);
|
|
451
599
|
};
|
|
452
|
-
this.requestContextRuns.set(name, { requestId, rootContextId: snapshot.context.ref.rootContextId, retire: retireContext });
|
|
453
600
|
try {
|
|
601
|
+
this.requestContextRuns.set(name, { requestId, rootContextId: snapshot.context.ref.rootContextId, retire: retireContext });
|
|
454
602
|
requestContext = captureRequestContextCall(snapshot, captured => turns.isCurrent(captured, ownerOf(name)));
|
|
455
603
|
}
|
|
456
604
|
catch (error) {
|
|
@@ -481,10 +629,12 @@ export class FleetWindowsRuntime {
|
|
|
481
629
|
return false;
|
|
482
630
|
}
|
|
483
631
|
};
|
|
484
|
-
lease = requestContext ? this.host.openMcp(name, requestId, agent.sandbox, current, requestContext)
|
|
632
|
+
lease = requestContext ? this.host.openMcp(name, requestId, agent.sandbox, current, requestContext, inputFrame?.inputReady)
|
|
485
633
|
: this.host.openMcp(name, requestId, agent.sandbox, current);
|
|
486
634
|
if (lease)
|
|
487
635
|
this.mcpLeases.set(name, { requestId, lease });
|
|
636
|
+
else if (inputFrame)
|
|
637
|
+
throw Error("Native request tools are unavailable");
|
|
488
638
|
}
|
|
489
639
|
}
|
|
490
640
|
catch (error) {
|
|
@@ -496,23 +646,39 @@ export class FleetWindowsRuntime {
|
|
|
496
646
|
if (this.mcpLeases.get(name)?.lease === lease)
|
|
497
647
|
this.mcpLeases.delete(name);
|
|
498
648
|
} };
|
|
499
|
-
const context = lease ?
|
|
500
|
-
`Your AgEnD instance is ${name}. AgEnD tools query Fleet agents, tasks and delivery receipts. ${agent.sandbox === "read-only" ? "This turn permits queries only; delegation and task changes are unavailable." : "Send/delegate tools enqueue work and return a receipt; do not wait for another Windows agent while holding this turn."}`,
|
|
501
|
-
...(typeof meta.from_instance === "string" ? [`Incoming Fleet context: ${JSON.stringify({ from_instance: meta.from_instance.slice(0, 128), correlation_id: typeof meta.correlation_id === "string" ? meta.correlation_id.slice(0, 256) : undefined, requires_reply: meta.requires_reply === "true" })}`] : []),
|
|
502
|
-
].join("\n") : undefined;
|
|
649
|
+
const context = lease ? contextText : existing && execInput ? contextText : undefined;
|
|
503
650
|
let task;
|
|
504
651
|
try {
|
|
505
|
-
task = this.store.send(agent.id, { requestId, prompt }, () => !this.host.stopping() && authority?.() !== false, { ...(lease ? { mcp: lease.connection, context } : {}), ...(credentialProfile ? { credentialProfile } : {}), onSettled: task => {
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
652
|
+
task = this.store.send(agent.id, { requestId, prompt }, () => !this.host.stopping() && authority?.() !== false, { ...(lease ? { mcp: lease.connection } : {}), ...(context ? { context } : {}), ...(credentialProfile ? { credentialProfile } : {}), ...(execInput ? { execInput, ...(inputKey ? { requestContextInputKey: inputKey } : {}), ...(contextReference ? { requestContextReference: contextReference } : {}), onInputWritten: inputFrame ? inputFrame.written : () => { throw Error("Retired native input cannot be written again"); } } : {}), onSettled: task => {
|
|
653
|
+
this.settling++;
|
|
654
|
+
try {
|
|
655
|
+
const reportedCorrelationIds = lease?.reportedCorrelations(typeof meta.from_instance === "string" ? meta.from_instance : undefined) ?? [];
|
|
656
|
+
closeLease();
|
|
657
|
+
inputFrame?.finish();
|
|
658
|
+
// A confirmed run end is terminal. An uncertain native outcome is not proof that work ended.
|
|
659
|
+
if (task.outcomeConfirmed)
|
|
660
|
+
retireContext();
|
|
661
|
+
const replyId = `native:${task.id}:reply`;
|
|
662
|
+
if (!this.host.history?.findByMessageId(name, replyId)) {
|
|
663
|
+
if (execInput) {
|
|
664
|
+
try {
|
|
665
|
+
const projected = this.scopedOutput(name, agent, task);
|
|
666
|
+
if (projected)
|
|
667
|
+
this.host.emit("message", { instance: name, ...projected });
|
|
668
|
+
}
|
|
669
|
+
catch (error) {
|
|
670
|
+
this.host.warn?.("Native scoped output remains unresolved", error);
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
else
|
|
674
|
+
this.host.emit("message", { instance: name, role: task.status === "completed" ? "agent" : "status", sender: this.config(name)?.display_name || agent.name, text: task.status === "completed" ? task.output || "(No text output)" : [task.output, task.error || task.status].filter(Boolean).join("\n"), ts: new Date(task.finishedAt ?? Date.now()).toISOString(), messageId: replyId });
|
|
675
|
+
}
|
|
676
|
+
this.changed(name);
|
|
677
|
+
settled({ ...task, reportedCorrelationIds });
|
|
678
|
+
}
|
|
679
|
+
finally {
|
|
680
|
+
this.settling--;
|
|
681
|
+
}
|
|
516
682
|
} });
|
|
517
683
|
}
|
|
518
684
|
catch (error) {
|
|
@@ -522,7 +688,7 @@ export class FleetWindowsRuntime {
|
|
|
522
688
|
}
|
|
523
689
|
if (task.finishedAt)
|
|
524
690
|
closeLease();
|
|
525
|
-
if (meta.source !== "web" && meta.source !== "app") {
|
|
691
|
+
if (!execInput && meta.source !== "web" && meta.source !== "app") {
|
|
526
692
|
const userId = `native:${requestId}:user`;
|
|
527
693
|
if (!this.host.history?.findByMessageId(name, userId))
|
|
528
694
|
this.host.emit("message", { instance: name, role: "user", sender: String(meta.from_instance || meta.user || "Fleet"), text: raw, ts: new Date().toISOString(), messageId: userId });
|
|
@@ -531,6 +697,12 @@ export class FleetWindowsRuntime {
|
|
|
531
697
|
return task;
|
|
532
698
|
}
|
|
533
699
|
async deliver(name, payload, options = {}) {
|
|
700
|
+
const port = this.host.requestContextAdmission?.();
|
|
701
|
+
if (port)
|
|
702
|
+
return runWithRequestContextAdmission(port, () => !this.host.stopping() && options.stillCurrent?.() !== false, () => this.deliverAdmitted(name, payload, options), this.host.requestContextContinuation?.(name, options.requestContextInputId ?? null));
|
|
703
|
+
return this.deliverAdmitted(name, payload, options);
|
|
704
|
+
}
|
|
705
|
+
async deliverAdmitted(name, payload, options) {
|
|
534
706
|
this.enabled();
|
|
535
707
|
if (this.host.stopping() || options.stillCurrent?.() === false)
|
|
536
708
|
throw new Error("Windows delivery is no longer current");
|
|
@@ -541,6 +713,12 @@ export class FleetWindowsRuntime {
|
|
|
541
713
|
return true;
|
|
542
714
|
}
|
|
543
715
|
execute(name, payload, options = {}) {
|
|
716
|
+
const port = this.host.requestContextAdmission?.();
|
|
717
|
+
if (port)
|
|
718
|
+
return runWithRequestContextAdmission(port, () => !this.host.stopping() && options.stillCurrent?.() !== false, () => this.executeAdmitted(name, payload, options), this.host.requestContextContinuation?.(name, options.requestContextInputId ?? null));
|
|
719
|
+
return this.executeAdmitted(name, payload, options);
|
|
720
|
+
}
|
|
721
|
+
executeAdmitted(name, payload, options) {
|
|
544
722
|
return new Promise((resolve, reject) => {
|
|
545
723
|
try {
|
|
546
724
|
const task = this.claim(name, payload, options, resolve);
|