@pellux/goodvibes-sdk 0.38.0 → 1.1.0
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/contracts/artifacts/operator-contract.json +4468 -916
- package/dist/daemon.d.ts +2 -0
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +4 -0
- package/dist/events/communication.d.ts +1 -1
- package/dist/events/surfaces.d.ts +25 -3
- package/dist/events/surfaces.d.ts.map +1 -1
- package/dist/events/surfaces.js +22 -1
- package/dist/events/workflows.d.ts +7 -6
- package/dist/events/workflows.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/platform/agents/archetypes.d.ts.map +1 -1
- package/dist/platform/agents/archetypes.js +7 -0
- package/dist/platform/agents/index.d.ts +1 -0
- package/dist/platform/agents/index.d.ts.map +1 -1
- package/dist/platform/agents/index.js +1 -0
- package/dist/platform/agents/orchestrator-runner.d.ts +16 -3
- package/dist/platform/agents/orchestrator-runner.d.ts.map +1 -1
- package/dist/platform/agents/orchestrator-runner.js +20 -6
- package/dist/platform/agents/orchestrator.d.ts +42 -10
- package/dist/platform/agents/orchestrator.d.ts.map +1 -1
- package/dist/platform/agents/orchestrator.js +68 -20
- package/dist/platform/agents/planner-decomposition-runner.d.ts +38 -0
- package/dist/platform/agents/planner-decomposition-runner.d.ts.map +1 -0
- package/dist/platform/agents/planner-decomposition-runner.js +113 -0
- package/dist/platform/agents/turn-knowledge-injection.d.ts +88 -3
- package/dist/platform/agents/turn-knowledge-injection.d.ts.map +1 -1
- package/dist/platform/agents/turn-knowledge-injection.js +147 -30
- package/dist/platform/agents/worktree.d.ts +126 -8
- package/dist/platform/agents/worktree.d.ts.map +1 -1
- package/dist/platform/agents/worktree.js +240 -19
- package/dist/platform/agents/wrfc-controller.d.ts +24 -1
- package/dist/platform/agents/wrfc-controller.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-controller.js +161 -35
- package/dist/platform/agents/wrfc-gate-runtime.d.ts +9 -0
- package/dist/platform/agents/wrfc-gate-runtime.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-gate-runtime.js +7 -3
- package/dist/platform/agents/wrfc-gates.d.ts +1 -1
- package/dist/platform/agents/wrfc-gates.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-gates.js +7 -1
- package/dist/platform/agents/wrfc-types.d.ts +23 -3
- package/dist/platform/agents/wrfc-types.d.ts.map +1 -1
- package/dist/platform/automation/types.d.ts +9 -1
- package/dist/platform/automation/types.d.ts.map +1 -1
- package/dist/platform/calendar/calendar-api-shared.d.ts +25 -0
- package/dist/platform/calendar/calendar-api-shared.d.ts.map +1 -0
- package/dist/platform/calendar/calendar-api-shared.js +100 -0
- package/dist/platform/calendar/calendar-connector.d.ts +79 -0
- package/dist/platform/calendar/calendar-connector.d.ts.map +1 -0
- package/dist/platform/calendar/calendar-connector.js +155 -0
- package/dist/platform/calendar/google-calendar-api.d.ts +25 -0
- package/dist/platform/calendar/google-calendar-api.d.ts.map +1 -0
- package/dist/platform/calendar/google-calendar-api.js +89 -0
- package/dist/platform/calendar/http-fetch-adapter.d.ts +25 -0
- package/dist/platform/calendar/http-fetch-adapter.d.ts.map +1 -0
- package/dist/platform/calendar/http-fetch-adapter.js +25 -0
- package/dist/platform/calendar/ics-parser.d.ts +35 -0
- package/dist/platform/calendar/ics-parser.d.ts.map +1 -0
- package/dist/platform/calendar/ics-parser.js +236 -0
- package/dist/platform/calendar/index.d.ts +41 -0
- package/dist/platform/calendar/index.d.ts.map +1 -0
- package/dist/platform/calendar/index.js +49 -0
- package/dist/platform/calendar/merged-calendar-model.d.ts +67 -0
- package/dist/platform/calendar/merged-calendar-model.d.ts.map +1 -0
- package/dist/platform/calendar/merged-calendar-model.js +181 -0
- package/dist/platform/calendar/microsoft-graph-api.d.ts +25 -0
- package/dist/platform/calendar/microsoft-graph-api.d.ts.map +1 -0
- package/dist/platform/calendar/microsoft-graph-api.js +95 -0
- package/dist/platform/calendar/oauth-flow.d.ts +62 -0
- package/dist/platform/calendar/oauth-flow.d.ts.map +1 -0
- package/dist/platform/calendar/oauth-flow.js +305 -0
- package/dist/platform/calendar/oauth-providers.d.ts +43 -0
- package/dist/platform/calendar/oauth-providers.d.ts.map +1 -0
- package/dist/platform/calendar/oauth-providers.js +120 -0
- package/dist/platform/calendar/oauth-token-store.d.ts +72 -0
- package/dist/platform/calendar/oauth-token-store.d.ts.map +1 -0
- package/dist/platform/calendar/oauth-token-store.js +189 -0
- package/dist/platform/calendar/oauth-types.d.ts +274 -0
- package/dist/platform/calendar/oauth-types.d.ts.map +1 -0
- package/dist/platform/calendar/oauth-types.js +22 -0
- package/dist/platform/calendar/rrule.d.ts +39 -0
- package/dist/platform/calendar/rrule.d.ts.map +1 -0
- package/dist/platform/calendar/rrule.js +261 -0
- package/dist/platform/calendar/subscription-store.d.ts +118 -0
- package/dist/platform/calendar/subscription-store.d.ts.map +1 -0
- package/dist/platform/calendar/subscription-store.js +293 -0
- package/dist/platform/calendar/types.d.ts +170 -0
- package/dist/platform/calendar/types.d.ts.map +1 -0
- package/dist/platform/calendar/types.js +21 -0
- package/dist/platform/companion/companion-chat-attachments.d.ts +29 -0
- package/dist/platform/companion/companion-chat-attachments.d.ts.map +1 -0
- package/dist/platform/companion/companion-chat-attachments.js +121 -0
- package/dist/platform/companion/companion-chat-branching.d.ts +66 -0
- package/dist/platform/companion/companion-chat-branching.d.ts.map +1 -0
- package/dist/platform/companion/companion-chat-branching.js +142 -0
- package/dist/platform/companion/companion-chat-broker-bridge.d.ts +40 -0
- package/dist/platform/companion/companion-chat-broker-bridge.d.ts.map +1 -0
- package/dist/platform/companion/companion-chat-broker-bridge.js +14 -0
- package/dist/platform/companion/companion-chat-broker-sync.d.ts +38 -0
- package/dist/platform/companion/companion-chat-broker-sync.d.ts.map +1 -0
- package/dist/platform/companion/companion-chat-broker-sync.js +80 -0
- package/dist/platform/companion/companion-chat-gc.d.ts +63 -0
- package/dist/platform/companion/companion-chat-gc.d.ts.map +1 -0
- package/dist/platform/companion/companion-chat-gc.js +38 -0
- package/dist/platform/companion/companion-chat-manager.d.ts +91 -23
- package/dist/platform/companion/companion-chat-manager.d.ts.map +1 -1
- package/dist/platform/companion/companion-chat-manager.js +195 -223
- package/dist/platform/companion/companion-chat-persistence.d.ts +9 -1
- package/dist/platform/companion/companion-chat-persistence.d.ts.map +1 -1
- package/dist/platform/companion/companion-chat-persistence.js +10 -2
- package/dist/platform/companion/companion-chat-routes.d.ts +2 -1
- package/dist/platform/companion/companion-chat-routes.d.ts.map +1 -1
- package/dist/platform/companion/companion-chat-routes.js +113 -4
- package/dist/platform/companion/companion-chat-turn-execution.d.ts +61 -0
- package/dist/platform/companion/companion-chat-turn-execution.d.ts.map +1 -0
- package/dist/platform/companion/companion-chat-turn-execution.js +107 -0
- package/dist/platform/companion/companion-chat-types.d.ts +67 -0
- package/dist/platform/companion/companion-chat-types.d.ts.map +1 -1
- package/dist/platform/config/credential-status.d.ts +28 -0
- package/dist/platform/config/credential-status.d.ts.map +1 -0
- package/dist/platform/config/credential-status.js +75 -0
- package/dist/platform/config/index.d.ts +25 -0
- package/dist/platform/config/index.d.ts.map +1 -1
- package/dist/platform/config/index.js +18 -0
- package/dist/platform/config/manager.d.ts +9 -0
- package/dist/platform/config/manager.d.ts.map +1 -1
- package/dist/platform/config/manager.js +21 -2
- package/dist/platform/config/migrations.d.ts +48 -0
- package/dist/platform/config/migrations.d.ts.map +1 -0
- package/dist/platform/config/migrations.js +54 -0
- package/dist/platform/config/schema-domain-core.d.ts +10 -1
- package/dist/platform/config/schema-domain-core.d.ts.map +1 -1
- package/dist/platform/config/schema-domain-core.js +46 -3
- package/dist/platform/config/schema-domain-runtime.d.ts +8 -0
- package/dist/platform/config/schema-domain-runtime.d.ts.map +1 -1
- package/dist/platform/config/schema-domain-runtime.js +32 -0
- package/dist/platform/config/schema-types.d.ts +21 -7
- package/dist/platform/config/schema-types.d.ts.map +1 -1
- package/dist/platform/config/schema.d.ts.map +1 -1
- package/dist/platform/config/schema.js +2 -0
- package/dist/platform/control-plane/approval-broker.d.ts +11 -0
- package/dist/platform/control-plane/approval-broker.d.ts.map +1 -1
- package/dist/platform/control-plane/approval-broker.js +17 -1
- package/dist/platform/control-plane/approval-hunk-apply.d.ts +77 -0
- package/dist/platform/control-plane/approval-hunk-apply.d.ts.map +1 -0
- package/dist/platform/control-plane/approval-hunk-apply.js +80 -0
- package/dist/platform/control-plane/gateway-disabled-response.d.ts +20 -0
- package/dist/platform/control-plane/gateway-disabled-response.d.ts.map +1 -0
- package/dist/platform/control-plane/gateway-disabled-response.js +24 -0
- package/dist/platform/control-plane/gateway-scope-enforcement.d.ts +68 -0
- package/dist/platform/control-plane/gateway-scope-enforcement.d.ts.map +1 -0
- package/dist/platform/control-plane/gateway-scope-enforcement.js +91 -0
- package/dist/platform/control-plane/gateway-utils.d.ts +17 -0
- package/dist/platform/control-plane/gateway-utils.d.ts.map +1 -1
- package/dist/platform/control-plane/gateway-utils.js +30 -0
- package/dist/platform/control-plane/gateway.d.ts +12 -2
- package/dist/platform/control-plane/gateway.d.ts.map +1 -1
- package/dist/platform/control-plane/gateway.js +27 -31
- package/dist/platform/control-plane/index.d.ts +8 -1
- package/dist/platform/control-plane/index.d.ts.map +1 -1
- package/dist/platform/control-plane/index.js +8 -0
- package/dist/platform/control-plane/invoke-input-validation.d.ts +56 -0
- package/dist/platform/control-plane/invoke-input-validation.d.ts.map +1 -0
- package/dist/platform/control-plane/invoke-input-validation.js +163 -0
- package/dist/platform/control-plane/method-catalog-admin.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-admin.js +12 -1
- package/dist/platform/control-plane/method-catalog-calendar.d.ts +16 -0
- package/dist/platform/control-plane/method-catalog-calendar.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-calendar.js +21 -0
- package/dist/platform/control-plane/method-catalog-channels.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-channels.js +32 -3
- package/dist/platform/control-plane/method-catalog-control-automation.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-control-automation.js +19 -34
- package/dist/platform/control-plane/method-catalog-control-companion.d.ts +15 -0
- package/dist/platform/control-plane/method-catalog-control-companion.d.ts.map +1 -0
- package/dist/platform/control-plane/method-catalog-control-companion.js +176 -0
- package/dist/platform/control-plane/method-catalog-control-core.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-control-core.js +104 -122
- package/dist/platform/control-plane/method-catalog-control.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-control.js +4 -0
- package/dist/platform/control-plane/method-catalog-email.d.ts +17 -0
- package/dist/platform/control-plane/method-catalog-email.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-email.js +21 -0
- package/dist/platform/control-plane/method-catalog-events.d.ts +28 -0
- package/dist/platform/control-plane/method-catalog-events.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-events.js +74 -1
- package/dist/platform/control-plane/method-catalog-fleet.d.ts +24 -0
- package/dist/platform/control-plane/method-catalog-fleet.d.ts.map +1 -0
- package/dist/platform/control-plane/method-catalog-fleet.js +65 -0
- package/dist/platform/control-plane/method-catalog-push.d.ts +30 -0
- package/dist/platform/control-plane/method-catalog-push.d.ts.map +1 -0
- package/dist/platform/control-plane/method-catalog-push.js +80 -0
- package/dist/platform/control-plane/method-catalog-route-reconcile.d.ts +84 -0
- package/dist/platform/control-plane/method-catalog-route-reconcile.d.ts.map +1 -0
- package/dist/platform/control-plane/method-catalog-route-reconcile.js +103 -0
- package/dist/platform/control-plane/method-catalog-runtime.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-runtime.js +83 -1
- package/dist/platform/control-plane/method-catalog-shared.d.ts +29 -0
- package/dist/platform/control-plane/method-catalog-shared.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog.d.ts +9 -0
- package/dist/platform/control-plane/method-catalog.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog.js +34 -3
- package/dist/platform/control-plane/operator-contract-schemas-admin.d.ts +8 -0
- package/dist/platform/control-plane/operator-contract-schemas-admin.d.ts.map +1 -1
- package/dist/platform/control-plane/operator-contract-schemas-admin.js +22 -1
- package/dist/platform/control-plane/operator-contract-schemas-fleet.d.ts +18 -0
- package/dist/platform/control-plane/operator-contract-schemas-fleet.d.ts.map +1 -0
- package/dist/platform/control-plane/operator-contract-schemas-fleet.js +182 -0
- package/dist/platform/control-plane/operator-contract-schemas-permissions.d.ts.map +1 -1
- package/dist/platform/control-plane/operator-contract-schemas-permissions.js +5 -0
- package/dist/platform/control-plane/operator-contract-schemas-runtime.d.ts +37 -0
- package/dist/platform/control-plane/operator-contract-schemas-runtime.d.ts.map +1 -1
- package/dist/platform/control-plane/operator-contract-schemas-runtime.js +100 -3
- package/dist/platform/control-plane/operator-contract-schemas.d.ts +1 -0
- package/dist/platform/control-plane/operator-contract-schemas.d.ts.map +1 -1
- package/dist/platform/control-plane/operator-contract-schemas.js +1 -0
- package/dist/platform/control-plane/operator-contract.d.ts.map +1 -1
- package/dist/platform/control-plane/operator-contract.js +8 -0
- package/dist/platform/control-plane/routes/checkpoints.d.ts +39 -0
- package/dist/platform/control-plane/routes/checkpoints.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/checkpoints.js +166 -0
- package/dist/platform/control-plane/routes/fleet.d.ts +53 -0
- package/dist/platform/control-plane/routes/fleet.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/fleet.js +153 -0
- package/dist/platform/control-plane/routes/gateway-verb-error.d.ts +30 -0
- package/dist/platform/control-plane/routes/gateway-verb-error.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/gateway-verb-error.js +36 -0
- package/dist/platform/control-plane/routes/index.d.ts +0 -6
- package/dist/platform/control-plane/routes/index.d.ts.map +1 -1
- package/dist/platform/control-plane/routes/index.js +5 -5
- package/dist/platform/control-plane/routes/invocation-params.d.ts +23 -0
- package/dist/platform/control-plane/routes/invocation-params.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/invocation-params.js +9 -0
- package/dist/platform/control-plane/routes/push.d.ts +26 -0
- package/dist/platform/control-plane/routes/push.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/push.js +104 -0
- package/dist/platform/control-plane/routes/register-gateway-verb-groups.d.ts +31 -0
- package/dist/platform/control-plane/routes/register-gateway-verb-groups.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/register-gateway-verb-groups.js +16 -0
- package/dist/platform/control-plane/routes/register-w3-s2.d.ts +26 -0
- package/dist/platform/control-plane/routes/register-w3-s2.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/register-w3-s2.js +8 -0
- package/dist/platform/control-plane/routes/session-search.d.ts +37 -0
- package/dist/platform/control-plane/routes/session-search.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/session-search.js +113 -0
- package/dist/platform/control-plane/session-broker-gc.d.ts +16 -0
- package/dist/platform/control-plane/session-broker-gc.d.ts.map +1 -1
- package/dist/platform/control-plane/session-broker-gc.js +23 -6
- package/dist/platform/control-plane/session-broker-helpers.d.ts +3 -3
- package/dist/platform/control-plane/session-broker-helpers.d.ts.map +1 -1
- package/dist/platform/control-plane/session-broker-inputs.d.ts +18 -0
- package/dist/platform/control-plane/session-broker-inputs.d.ts.map +1 -1
- package/dist/platform/control-plane/session-broker-inputs.js +34 -0
- package/dist/platform/control-plane/session-broker-sessions.d.ts +102 -3
- package/dist/platform/control-plane/session-broker-sessions.d.ts.map +1 -1
- package/dist/platform/control-plane/session-broker-sessions.js +179 -5
- package/dist/platform/control-plane/session-broker-state.d.ts +20 -1
- package/dist/platform/control-plane/session-broker-state.d.ts.map +1 -1
- package/dist/platform/control-plane/session-broker-state.js +67 -5
- package/dist/platform/control-plane/session-broker.d.ts +51 -38
- package/dist/platform/control-plane/session-broker.d.ts.map +1 -1
- package/dist/platform/control-plane/session-broker.js +183 -75
- package/dist/platform/control-plane/session-store-importer.d.ts +57 -0
- package/dist/platform/control-plane/session-store-importer.d.ts.map +1 -0
- package/dist/platform/control-plane/session-store-importer.js +227 -0
- package/dist/platform/control-plane/session-types.d.ts +142 -7
- package/dist/platform/control-plane/session-types.d.ts.map +1 -1
- package/dist/platform/core/execution-plan.d.ts +43 -1
- package/dist/platform/core/execution-plan.d.ts.map +1 -1
- package/dist/platform/core/execution-plan.js +46 -10
- package/dist/platform/core/index.d.ts +1 -0
- package/dist/platform/core/index.d.ts.map +1 -1
- package/dist/platform/core/index.js +1 -0
- package/dist/platform/core/orchestrator-runtime.d.ts +23 -3
- package/dist/platform/core/orchestrator-runtime.d.ts.map +1 -1
- package/dist/platform/core/orchestrator-tool-runtime.d.ts +7 -0
- package/dist/platform/core/orchestrator-tool-runtime.d.ts.map +1 -1
- package/dist/platform/core/orchestrator-tool-runtime.js +10 -0
- package/dist/platform/core/orchestrator-turn-loop.d.ts +13 -6
- package/dist/platform/core/orchestrator-turn-loop.d.ts.map +1 -1
- package/dist/platform/core/orchestrator-turn-loop.js +29 -22
- package/dist/platform/core/orchestrator.d.ts +16 -10
- package/dist/platform/core/orchestrator.d.ts.map +1 -1
- package/dist/platform/core/orchestrator.js +23 -8
- package/dist/platform/core/plan-decomposition.d.ts +196 -0
- package/dist/platform/core/plan-decomposition.d.ts.map +1 -0
- package/dist/platform/core/plan-decomposition.js +417 -0
- package/dist/platform/core/plan-proposal.d.ts +39 -0
- package/dist/platform/core/plan-proposal.d.ts.map +1 -1
- package/dist/platform/core/wrfc-routing.d.ts +1 -0
- package/dist/platform/core/wrfc-routing.d.ts.map +1 -1
- package/dist/platform/core/wrfc-routing.js +51 -1
- package/dist/platform/daemon/boot.d.ts +69 -0
- package/dist/platform/daemon/boot.d.ts.map +1 -0
- package/dist/platform/daemon/boot.js +61 -0
- package/dist/platform/daemon/cli.js +2 -1
- package/dist/platform/daemon/control-plane.d.ts.map +1 -1
- package/dist/platform/daemon/control-plane.js +50 -1
- package/dist/platform/daemon/facade-composition.d.ts.map +1 -1
- package/dist/platform/daemon/facade-composition.js +6 -0
- package/dist/platform/daemon/facade.d.ts +15 -6
- package/dist/platform/daemon/facade.d.ts.map +1 -1
- package/dist/platform/daemon/facade.js +48 -43
- package/dist/platform/daemon/http/router-route-contexts.d.ts +1 -0
- package/dist/platform/daemon/http/router-route-contexts.d.ts.map +1 -1
- package/dist/platform/daemon/http/router-route-contexts.js +1 -0
- package/dist/platform/daemon/http/router-session-broker-adapter.d.ts +13 -0
- package/dist/platform/daemon/http/router-session-broker-adapter.d.ts.map +1 -0
- package/dist/platform/daemon/http/router-session-broker-adapter.js +27 -0
- package/dist/platform/daemon/http/router.d.ts +2 -1
- package/dist/platform/daemon/http/router.d.ts.map +1 -1
- package/dist/platform/daemon/http/router.js +42 -40
- package/dist/platform/daemon/http/runtime-route-types.d.ts +42 -4
- package/dist/platform/daemon/http/runtime-route-types.d.ts.map +1 -1
- package/dist/platform/daemon/http/webui-serving.d.ts +68 -0
- package/dist/platform/daemon/http/webui-serving.d.ts.map +1 -0
- package/dist/platform/daemon/http/webui-serving.js +230 -0
- package/dist/platform/daemon/index.d.ts +2 -0
- package/dist/platform/daemon/index.d.ts.map +1 -1
- package/dist/platform/daemon/index.js +1 -0
- package/dist/platform/daemon/service-manager.d.ts +16 -0
- package/dist/platform/daemon/service-manager.d.ts.map +1 -1
- package/dist/platform/daemon/service-manager.js +79 -15
- package/dist/platform/intelligence/tree-sitter/service.d.ts.map +1 -1
- package/dist/platform/intelligence/tree-sitter/service.js +16 -2
- package/dist/platform/knowledge/browser-history/readers.d.ts.map +1 -1
- package/dist/platform/knowledge/browser-history/readers.js +15 -5
- package/dist/platform/knowledge/knowledge-api.d.ts +1 -1
- package/dist/platform/knowledge/project-planning/service.d.ts +14 -1
- package/dist/platform/knowledge/project-planning/service.d.ts.map +1 -1
- package/dist/platform/knowledge/project-planning/service.js +77 -0
- package/dist/platform/knowledge/project-planning/types.d.ts +32 -0
- package/dist/platform/knowledge/project-planning/types.d.ts.map +1 -1
- package/dist/platform/orchestration/bookkeeping.d.ts +12 -0
- package/dist/platform/orchestration/bookkeeping.d.ts.map +1 -0
- package/dist/platform/orchestration/bookkeeping.js +91 -0
- package/dist/platform/orchestration/budget.d.ts +2 -2
- package/dist/platform/orchestration/cancellation.d.ts +2 -2
- package/dist/platform/orchestration/controller-compat.d.ts +16 -3
- package/dist/platform/orchestration/controller-compat.d.ts.map +1 -1
- package/dist/platform/orchestration/controller-compat.js +18 -4
- package/dist/platform/orchestration/dirty-guard.js +1 -1
- package/dist/platform/orchestration/engine.d.ts +26 -1
- package/dist/platform/orchestration/engine.d.ts.map +1 -1
- package/dist/platform/orchestration/engine.js +229 -25
- package/dist/platform/orchestration/index.d.ts +6 -4
- package/dist/platform/orchestration/index.d.ts.map +1 -1
- package/dist/platform/orchestration/index.js +3 -2
- package/dist/platform/orchestration/persistence.d.ts.map +1 -1
- package/dist/platform/orchestration/persistence.js +6 -3
- package/dist/platform/orchestration/phase-runner.d.ts +33 -6
- package/dist/platform/orchestration/phase-runner.d.ts.map +1 -1
- package/dist/platform/orchestration/phase-runner.js +98 -25
- package/dist/platform/orchestration/proposal-workstream.d.ts +56 -0
- package/dist/platform/orchestration/proposal-workstream.d.ts.map +1 -0
- package/dist/platform/orchestration/proposal-workstream.js +76 -0
- package/dist/platform/orchestration/scheduler.d.ts +20 -1
- package/dist/platform/orchestration/scheduler.d.ts.map +1 -1
- package/dist/platform/orchestration/scheduler.js +16 -0
- package/dist/platform/orchestration/types.d.ts +289 -4
- package/dist/platform/orchestration/types.d.ts.map +1 -1
- package/dist/platform/orchestration/types.js +32 -0
- package/dist/platform/orchestration/worktree-isolation.d.ts +33 -0
- package/dist/platform/orchestration/worktree-isolation.d.ts.map +1 -0
- package/dist/platform/orchestration/worktree-isolation.js +248 -0
- package/dist/platform/presentation/glyphs.d.ts +91 -0
- package/dist/platform/presentation/glyphs.d.ts.map +1 -0
- package/dist/platform/presentation/glyphs.js +93 -0
- package/dist/platform/presentation/index.d.ts +28 -0
- package/dist/platform/presentation/index.d.ts.map +1 -0
- package/dist/platform/presentation/index.js +27 -0
- package/dist/platform/presentation/thinking-phrases.d.ts +12 -0
- package/dist/platform/presentation/thinking-phrases.d.ts.map +1 -0
- package/dist/platform/presentation/thinking-phrases.js +32 -0
- package/dist/platform/presentation/tones.d.ts +121 -0
- package/dist/platform/presentation/tones.d.ts.map +1 -0
- package/dist/platform/presentation/tones.js +145 -0
- package/dist/platform/presentation/waiting-wording.d.ts +54 -0
- package/dist/platform/presentation/waiting-wording.d.ts.map +1 -0
- package/dist/platform/presentation/waiting-wording.js +51 -0
- package/dist/platform/providers/runtime-snapshot.d.ts.map +1 -1
- package/dist/platform/providers/runtime-snapshot.js +12 -2
- package/dist/platform/push/delivery.d.ts +48 -0
- package/dist/platform/push/delivery.d.ts.map +1 -0
- package/dist/platform/push/delivery.js +117 -0
- package/dist/platform/push/encryption.d.ts +41 -0
- package/dist/platform/push/encryption.d.ts.map +1 -0
- package/dist/platform/push/encryption.js +82 -0
- package/dist/platform/push/index.d.ts +17 -0
- package/dist/platform/push/index.d.ts.map +1 -0
- package/dist/platform/push/index.js +10 -0
- package/dist/platform/push/service.d.ts +75 -0
- package/dist/platform/push/service.d.ts.map +1 -0
- package/dist/platform/push/service.js +95 -0
- package/dist/platform/push/subscription-store.d.ts +50 -0
- package/dist/platform/push/subscription-store.d.ts.map +1 -0
- package/dist/platform/push/subscription-store.js +123 -0
- package/dist/platform/push/types.d.ts +68 -0
- package/dist/platform/push/types.d.ts.map +1 -0
- package/dist/platform/push/types.js +13 -0
- package/dist/platform/push/vapid.d.ts +54 -0
- package/dist/platform/push/vapid.d.ts.map +1 -0
- package/dist/platform/push/vapid.js +113 -0
- package/dist/platform/runtime/bootstrap-services.d.ts +62 -2
- package/dist/platform/runtime/bootstrap-services.d.ts.map +1 -1
- package/dist/platform/runtime/bootstrap-services.js +217 -50
- package/dist/platform/runtime/daemon-version-compat.d.ts +39 -0
- package/dist/platform/runtime/daemon-version-compat.d.ts.map +1 -0
- package/dist/platform/runtime/daemon-version-compat.js +75 -0
- package/dist/platform/runtime/detached-daemon-runtime.d.ts +26 -0
- package/dist/platform/runtime/detached-daemon-runtime.d.ts.map +1 -0
- package/dist/platform/runtime/detached-daemon-runtime.js +49 -0
- package/dist/platform/runtime/emitters/workflows.d.ts +1 -1
- package/dist/platform/runtime/emitters/workflows.d.ts.map +1 -1
- package/dist/platform/runtime/events/index.d.ts +13 -0
- package/dist/platform/runtime/events/index.d.ts.map +1 -1
- package/dist/platform/runtime/events/index.js +13 -0
- package/dist/platform/runtime/feature-flags/flags.d.ts.map +1 -1
- package/dist/platform/runtime/feature-flags/flags.js +39 -1
- package/dist/platform/runtime/fleet/adapters/agent.d.ts +2 -2
- package/dist/platform/runtime/fleet/adapters/agent.d.ts.map +1 -1
- package/dist/platform/runtime/fleet/adapters/agent.js +4 -4
- package/dist/platform/runtime/fleet/adapters/automation.d.ts +1 -1
- package/dist/platform/runtime/fleet/adapters/automation.js +1 -1
- package/dist/platform/runtime/fleet/adapters/code-index.d.ts +1 -1
- package/dist/platform/runtime/fleet/adapters/code-index.js +1 -1
- package/dist/platform/runtime/fleet/adapters/orchestration.d.ts +40 -18
- package/dist/platform/runtime/fleet/adapters/orchestration.d.ts.map +1 -1
- package/dist/platform/runtime/fleet/adapters/orchestration.js +138 -34
- package/dist/platform/runtime/fleet/adapters/schedule.d.ts +4 -4
- package/dist/platform/runtime/fleet/adapters/schedule.js +4 -4
- package/dist/platform/runtime/fleet/adapters/trigger.d.ts +3 -4
- package/dist/platform/runtime/fleet/adapters/trigger.d.ts.map +1 -1
- package/dist/platform/runtime/fleet/adapters/trigger.js +3 -4
- package/dist/platform/runtime/fleet/adapters/wrfc.d.ts +13 -0
- package/dist/platform/runtime/fleet/adapters/wrfc.d.ts.map +1 -1
- package/dist/platform/runtime/fleet/adapters/wrfc.js +49 -2
- package/dist/platform/runtime/fleet/registry.d.ts +7 -7
- package/dist/platform/runtime/fleet/registry.d.ts.map +1 -1
- package/dist/platform/runtime/fleet/registry.js +41 -7
- package/dist/platform/runtime/fleet/types.d.ts +9 -9
- package/dist/platform/runtime/fleet/types.d.ts.map +1 -1
- package/dist/platform/runtime/memory-spine/client.d.ts +127 -0
- package/dist/platform/runtime/memory-spine/client.d.ts.map +1 -0
- package/dist/platform/runtime/memory-spine/client.js +113 -0
- package/dist/platform/runtime/memory-spine/index.d.ts +11 -0
- package/dist/platform/runtime/memory-spine/index.d.ts.map +1 -0
- package/dist/platform/runtime/memory-spine/index.js +10 -0
- package/dist/platform/runtime/operator-client.d.ts +20 -2
- package/dist/platform/runtime/operator-client.d.ts.map +1 -1
- package/dist/platform/runtime/operator-client.js +11 -1
- package/dist/platform/runtime/provider-accounts/registry.d.ts.map +1 -1
- package/dist/platform/runtime/provider-accounts/registry.js +11 -1
- package/dist/platform/runtime/services.d.ts +11 -9
- package/dist/platform/runtime/services.d.ts.map +1 -1
- package/dist/platform/runtime/services.js +24 -9
- package/dist/platform/runtime/session-spine/client.d.ts +234 -0
- package/dist/platform/runtime/session-spine/client.d.ts.map +1 -0
- package/dist/platform/runtime/session-spine/client.js +449 -0
- package/dist/platform/runtime/session-spine/index.d.ts +12 -0
- package/dist/platform/runtime/session-spine/index.d.ts.map +1 -0
- package/dist/platform/runtime/session-spine/index.js +11 -0
- package/dist/platform/runtime/session-spine/union-cache.d.ts +225 -0
- package/dist/platform/runtime/session-spine/union-cache.d.ts.map +1 -0
- package/dist/platform/runtime/session-spine/union-cache.js +333 -0
- package/dist/platform/runtime/shell-command-ops.d.ts +3 -1
- package/dist/platform/runtime/shell-command-ops.d.ts.map +1 -1
- package/dist/platform/runtime/transports/daemon-http-client-validators.d.ts.map +1 -1
- package/dist/platform/runtime/transports/daemon-http-client-validators.js +22 -0
- package/dist/platform/runtime/transports/daemon-http-client.d.ts.map +1 -1
- package/dist/platform/runtime/transports/daemon-http-client.js +25 -2
- package/dist/platform/runtime/transports/http-types.d.ts +9 -2
- package/dist/platform/runtime/transports/http-types.d.ts.map +1 -1
- package/dist/platform/state/canonical-memory.d.ts +95 -0
- package/dist/platform/state/canonical-memory.d.ts.map +1 -0
- package/dist/platform/state/canonical-memory.js +155 -0
- package/dist/platform/state/code-index-chunking.js +1 -1
- package/dist/platform/state/code-index-db.d.ts +1 -1
- package/dist/platform/state/code-index-reindex.d.ts +73 -0
- package/dist/platform/state/code-index-reindex.d.ts.map +1 -0
- package/dist/platform/state/code-index-reindex.js +156 -0
- package/dist/platform/state/code-index-store.d.ts.map +1 -1
- package/dist/platform/state/code-index-store.js +11 -3
- package/dist/platform/state/index.d.ts +8 -0
- package/dist/platform/state/index.d.ts.map +1 -1
- package/dist/platform/state/index.js +4 -0
- package/dist/platform/state/memory-recall-contract.d.ts +118 -0
- package/dist/platform/state/memory-recall-contract.d.ts.map +1 -0
- package/dist/platform/state/memory-recall-contract.js +170 -0
- package/dist/platform/state/memory-registry.d.ts +8 -0
- package/dist/platform/state/memory-registry.d.ts.map +1 -1
- package/dist/platform/state/memory-registry.js +10 -0
- package/dist/platform/state/memory-store.d.ts +2 -0
- package/dist/platform/state/memory-store.d.ts.map +1 -1
- package/dist/platform/state/memory-store.js +4 -0
- package/dist/platform/state/memory-vector-store.d.ts.map +1 -1
- package/dist/platform/state/memory-vector-store.js +14 -3
- package/dist/platform/state/sqlite-store.d.ts +2 -0
- package/dist/platform/state/sqlite-store.d.ts.map +1 -1
- package/dist/platform/state/sqlite-store.js +4 -0
- package/dist/platform/state/sqlite-vec-loader.d.ts +1 -1
- package/dist/platform/state/sqlite-vec-loader.js +1 -1
- package/dist/platform/state/vibe-projection.d.ts +67 -0
- package/dist/platform/state/vibe-projection.d.ts.map +1 -0
- package/dist/platform/state/vibe-projection.js +115 -0
- package/dist/platform/tools/agent/index.d.ts.map +1 -1
- package/dist/platform/tools/agent/index.js +8 -0
- package/dist/platform/tools/agent/manager.d.ts +22 -10
- package/dist/platform/tools/agent/manager.d.ts.map +1 -1
- package/dist/platform/tools/agent/manager.js +13 -7
- package/dist/platform/tools/agent/schema.d.ts +26 -0
- package/dist/platform/tools/agent/schema.d.ts.map +1 -1
- package/dist/platform/tools/agent/schema.js +2 -2
- package/dist/platform/tools/agent/wrfc-batch-policy.d.ts +13 -0
- package/dist/platform/tools/agent/wrfc-batch-policy.d.ts.map +1 -1
- package/dist/platform/tools/agent/wrfc-batch-policy.js +60 -0
- package/dist/platform/tools/exec/runtime.d.ts +10 -0
- package/dist/platform/tools/exec/runtime.d.ts.map +1 -1
- package/dist/platform/tools/exec/runtime.js +27 -10
- package/dist/platform/tools/exec/schema.d.ts +2 -2
- package/dist/platform/tools/exec/schema.d.ts.map +1 -1
- package/dist/platform/tools/exec/schema.js +2 -1
- package/dist/platform/tools/fetch/runtime.d.ts +1 -1
- package/dist/platform/tools/index.d.ts +2 -0
- package/dist/platform/tools/index.d.ts.map +1 -1
- package/dist/platform/tools/index.js +2 -0
- package/dist/platform/tools/registry.d.ts +1 -1
- package/dist/platform/tools/registry.js +1 -1
- package/dist/platform/tools/state/index.d.ts +9 -0
- package/dist/platform/tools/state/index.d.ts.map +1 -1
- package/dist/platform/tools/state/index.js +60 -3
- package/dist/platform/types/foundation-contract.d.ts +1 -1
- package/dist/platform/types/foundation-contract.d.ts.map +1 -1
- package/dist/platform/types/index.d.ts +1 -1
- package/dist/platform/types/index.d.ts.map +1 -1
- package/dist/platform/types/tools.d.ts +1 -1
- package/dist/platform/utils/request-body.d.ts.map +1 -1
- package/dist/platform/utils/request-body.js +50 -5
- package/dist/platform/version.js +1 -1
- package/package.json +25 -9
- package/dist/platform/control-plane/routes/automation.d.ts +0 -3
- package/dist/platform/control-plane/routes/automation.d.ts.map +0 -1
- package/dist/platform/control-plane/routes/automation.js +0 -63
- package/dist/platform/control-plane/routes/context.d.ts +0 -2
- package/dist/platform/control-plane/routes/context.d.ts.map +0 -1
- package/dist/platform/control-plane/routes/context.js +0 -1
- package/dist/platform/control-plane/routes/operator.d.ts +0 -8
- package/dist/platform/control-plane/routes/operator.d.ts.map +0 -1
- package/dist/platform/control-plane/routes/operator.js +0 -415
- package/dist/platform/control-plane/routes/remote.d.ts +0 -3
- package/dist/platform/control-plane/routes/remote.d.ts.map +0 -1
- package/dist/platform/control-plane/routes/remote.js +0 -35
- package/dist/platform/control-plane/routes/sessions.d.ts +0 -3
- package/dist/platform/control-plane/routes/sessions.d.ts.map +0 -1
- package/dist/platform/control-plane/routes/sessions.js +0 -43
- package/dist/platform/control-plane/routes/tasks.d.ts +0 -3
- package/dist/platform/control-plane/routes/tasks.d.ts.map +0 -1
- package/dist/platform/control-plane/routes/tasks.js +0 -22
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* daemon-version-compat.ts
|
|
3
|
+
*
|
|
4
|
+
* The adopt-or-start path (bootstrap-services.ts) verifies that a daemon found
|
|
5
|
+
* on the configured port is a GoodVibes daemon via its `/status` identity probe,
|
|
6
|
+
* which reports the daemon's SDK `version`. Verifying identity is NOT the same as
|
|
7
|
+
* verifying that the daemon speaks the SAME wire shape this surface expects:
|
|
8
|
+
* adopting a daemon built from an incompatible SDK band produces silent
|
|
9
|
+
* wire-shape failures (a session method the surface calls that the daemon does
|
|
10
|
+
* not serve, a payload field that moved). This module answers the one question
|
|
11
|
+
* the probe leaves open — "may this surface safely adopt a daemon reporting
|
|
12
|
+
* version X?" — so the adopt path can refuse an incompatible occupant honestly
|
|
13
|
+
* instead of adopting it and failing later, and without ever starting a second
|
|
14
|
+
* competing daemon on an occupied port.
|
|
15
|
+
*
|
|
16
|
+
* Compatibility band policy (semver, https://semver.org/#spec-item-4):
|
|
17
|
+
* - `0.y.z` releases treat the MINOR position as the breaking axis, so two
|
|
18
|
+
* `0.y` versions are compatible only when `y` matches (0.38.x adopts 0.38.*
|
|
19
|
+
* but not 0.37.*).
|
|
20
|
+
* - `>=1.0.0` releases treat MAJOR as the breaking axis, so major must match
|
|
21
|
+
* (1.4.x adopts any 1.*.* but not 2.*.*).
|
|
22
|
+
* - A version string that cannot be parsed is treated as INCOMPATIBLE — the
|
|
23
|
+
* conservative, honest default. An empty/absent remote version is likewise
|
|
24
|
+
* incompatible: the surface must not adopt something it cannot band-check.
|
|
25
|
+
* Prerelease and build metadata (`-rc.1`, `+sha`) are ignored for banding.
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Parse the leading `major.minor` of a semver string, ignoring patch,
|
|
29
|
+
* prerelease, and build metadata. Returns null when the leading two numeric
|
|
30
|
+
* positions cannot be read.
|
|
31
|
+
*/
|
|
32
|
+
function parseVersionBand(version) {
|
|
33
|
+
if (typeof version !== 'string')
|
|
34
|
+
return null;
|
|
35
|
+
const trimmed = version.trim();
|
|
36
|
+
if (!trimmed)
|
|
37
|
+
return null;
|
|
38
|
+
// Strip a leading `v`, then take the core before any `-` (prerelease) or `+` (build).
|
|
39
|
+
const core = trimmed.replace(/^v/i, '').split(/[-+]/, 1)[0] ?? '';
|
|
40
|
+
const parts = core.split('.');
|
|
41
|
+
if (parts.length < 2)
|
|
42
|
+
return null;
|
|
43
|
+
const major = Number(parts[0]);
|
|
44
|
+
const minor = Number(parts[1]);
|
|
45
|
+
if (!Number.isInteger(major) || !Number.isInteger(minor) || major < 0 || minor < 0)
|
|
46
|
+
return null;
|
|
47
|
+
return { major, minor };
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* True when a surface reporting `localVersion` may safely adopt a daemon
|
|
51
|
+
* reporting `remoteVersion` — see the band policy in the file header.
|
|
52
|
+
* Unparseable or absent versions are never compatible.
|
|
53
|
+
*/
|
|
54
|
+
export function isDaemonVersionCompatible(localVersion, remoteVersion) {
|
|
55
|
+
const local = parseVersionBand(localVersion);
|
|
56
|
+
const remote = parseVersionBand(remoteVersion);
|
|
57
|
+
if (local === null || remote === null)
|
|
58
|
+
return false;
|
|
59
|
+
if (local.major !== remote.major)
|
|
60
|
+
return false;
|
|
61
|
+
// For the 0.y band the minor position is the breaking axis; for >=1 it is not.
|
|
62
|
+
if (local.major === 0)
|
|
63
|
+
return local.minor === remote.minor;
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Human-readable reason string for an incompatible adoption refusal, naming
|
|
68
|
+
* both the occupied endpoint's version and this surface's version so the
|
|
69
|
+
* operator can see the skew without guessing.
|
|
70
|
+
*/
|
|
71
|
+
export function describeVersionIncompatibility(host, port, localVersion, remoteVersion) {
|
|
72
|
+
const found = (typeof remoteVersion === 'string' && remoteVersion.trim()) ? remoteVersion.trim() : 'unknown';
|
|
73
|
+
const mine = (typeof localVersion === 'string' && localVersion.trim()) ? localVersion.trim() : 'unknown';
|
|
74
|
+
return `A GoodVibes daemon (version ${found}) is running on ${host}:${port}, but this surface (version ${mine}) speaks an incompatible wire version — not adopting, and not starting a second daemon on the occupied port.`;
|
|
75
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* D7a Layer 2 — pid/port discovery for the detached daemon.
|
|
3
|
+
*
|
|
4
|
+
* When a surface spawns the daemon as a detached, standalone process, it records
|
|
5
|
+
* the pid/host/port to a small JSON file under the daemon home so a later surface
|
|
6
|
+
* (or a `GET /api/service/status` call against the daemon HTTP API) can discover and adopt it without a fresh
|
|
7
|
+
* spawn. This is deliberately a plain record — not a lock — since the daemon's own
|
|
8
|
+
* identity probe is the source of truth for "is it actually alive and mine".
|
|
9
|
+
*/
|
|
10
|
+
/** File name of the detached-daemon runtime record within the daemon home dir. */
|
|
11
|
+
export declare const DETACHED_DAEMON_RUNTIME_FILE = "detached-daemon.json";
|
|
12
|
+
export interface DetachedDaemonRuntimeRecord {
|
|
13
|
+
readonly pid: number | undefined;
|
|
14
|
+
readonly host: string;
|
|
15
|
+
readonly port: number;
|
|
16
|
+
readonly command: string;
|
|
17
|
+
readonly startedAt: string;
|
|
18
|
+
readonly logFilePath?: string | undefined;
|
|
19
|
+
}
|
|
20
|
+
/** Absolute path of the runtime record file for a given daemon runtime dir. */
|
|
21
|
+
export declare function detachedDaemonRuntimePath(runtimeDir: string): string;
|
|
22
|
+
/** Write (or overwrite) the detached-daemon runtime record. Best-effort; never throws. */
|
|
23
|
+
export declare function recordDetachedDaemonRuntime(runtimeDir: string, record: DetachedDaemonRuntimeRecord): string | null;
|
|
24
|
+
/** Read the detached-daemon runtime record, or null if missing/unparseable. */
|
|
25
|
+
export declare function readDetachedDaemonRuntime(runtimeDir: string): DetachedDaemonRuntimeRecord | null;
|
|
26
|
+
//# sourceMappingURL=detached-daemon-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detached-daemon-runtime.d.ts","sourceRoot":"","sources":["../../../src/platform/runtime/detached-daemon-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,kFAAkF;AAClF,eAAO,MAAM,4BAA4B,yBAAyB,CAAC;AAEnE,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C;AAED,+EAA+E;AAC/E,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED,0FAA0F;AAC1F,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,2BAA2B,GAClC,MAAM,GAAG,IAAI,CASf;AAED,+EAA+E;AAC/E,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,2BAA2B,GAAG,IAAI,CAgBhG"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* D7a Layer 2 — pid/port discovery for the detached daemon.
|
|
3
|
+
*
|
|
4
|
+
* When a surface spawns the daemon as a detached, standalone process, it records
|
|
5
|
+
* the pid/host/port to a small JSON file under the daemon home so a later surface
|
|
6
|
+
* (or a `GET /api/service/status` call against the daemon HTTP API) can discover and adopt it without a fresh
|
|
7
|
+
* spawn. This is deliberately a plain record — not a lock — since the daemon's own
|
|
8
|
+
* identity probe is the source of truth for "is it actually alive and mine".
|
|
9
|
+
*/
|
|
10
|
+
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
11
|
+
import { dirname, join } from 'node:path';
|
|
12
|
+
/** File name of the detached-daemon runtime record within the daemon home dir. */
|
|
13
|
+
export const DETACHED_DAEMON_RUNTIME_FILE = 'detached-daemon.json';
|
|
14
|
+
/** Absolute path of the runtime record file for a given daemon runtime dir. */
|
|
15
|
+
export function detachedDaemonRuntimePath(runtimeDir) {
|
|
16
|
+
return join(runtimeDir, DETACHED_DAEMON_RUNTIME_FILE);
|
|
17
|
+
}
|
|
18
|
+
/** Write (or overwrite) the detached-daemon runtime record. Best-effort; never throws. */
|
|
19
|
+
export function recordDetachedDaemonRuntime(runtimeDir, record) {
|
|
20
|
+
const path = detachedDaemonRuntimePath(runtimeDir);
|
|
21
|
+
try {
|
|
22
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
23
|
+
writeFileSync(path, `${JSON.stringify(record, null, 2)}\n`, 'utf-8');
|
|
24
|
+
return path;
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/** Read the detached-daemon runtime record, or null if missing/unparseable. */
|
|
31
|
+
export function readDetachedDaemonRuntime(runtimeDir) {
|
|
32
|
+
try {
|
|
33
|
+
const raw = readFileSync(detachedDaemonRuntimePath(runtimeDir), 'utf-8');
|
|
34
|
+
const parsed = JSON.parse(raw);
|
|
35
|
+
if (typeof parsed.port !== 'number' || typeof parsed.host !== 'string')
|
|
36
|
+
return null;
|
|
37
|
+
return {
|
|
38
|
+
pid: typeof parsed.pid === 'number' ? parsed.pid : undefined,
|
|
39
|
+
host: parsed.host,
|
|
40
|
+
port: parsed.port,
|
|
41
|
+
command: typeof parsed.command === 'string' ? parsed.command : '',
|
|
42
|
+
startedAt: typeof parsed.startedAt === 'string' ? parsed.startedAt : '',
|
|
43
|
+
logFilePath: typeof parsed.logFilePath === 'string' ? parsed.logFilePath : undefined,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -36,7 +36,7 @@ export declare function emitWorkflowChainPassed(bus: RuntimeEventBus, ctx: Emitt
|
|
|
36
36
|
export declare function emitWorkflowChainFailed(bus: RuntimeEventBus, ctx: EmitterContext, data: {
|
|
37
37
|
chainId: string;
|
|
38
38
|
reason: string;
|
|
39
|
-
failureKind?: 'transport' | 'other' | undefined;
|
|
39
|
+
failureKind?: 'transport' | 'other' | 'cancelled' | undefined;
|
|
40
40
|
}): void;
|
|
41
41
|
export declare function emitWorkflowAutoCommitted(bus: RuntimeEventBus, ctx: EmitterContext, data: {
|
|
42
42
|
chainId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../../../src/platform/runtime/emitters/workflows.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACtC,IAAI,CAEN;AAED,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,eAAe,EACpB,G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CAAC;IAAC,WAAW,EAAE,UAAU,EAAE,CAAA;CAAE,GACnD,IAAI,CAEN;AAED,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACxC,IAAI,CAEN"}
|
|
@@ -69,6 +69,19 @@ export interface RuntimeEventBusOptions {
|
|
|
69
69
|
* sessionId, timestamps, and source context.
|
|
70
70
|
*
|
|
71
71
|
* This is the authoritative event transport for runtime domain signaling.
|
|
72
|
+
*
|
|
73
|
+
* DISPATCH ORDERING GUARANTEE (contract — pinned by
|
|
74
|
+
* test/runtime-event-bus-dispatch-contract.test.ts): {@link emit} NEVER invokes
|
|
75
|
+
* a subscriber synchronously. Each matching handler is deferred to its own
|
|
76
|
+
* `queueMicrotask`, so emit() always returns to its caller — and the caller's
|
|
77
|
+
* remaining synchronous statements run — BEFORE any listener fires. A component
|
|
78
|
+
* may therefore emit an event from the MIDDLE of a state mutation without risk
|
|
79
|
+
* that a subscriber observes the half-applied state: by the time a listener
|
|
80
|
+
* runs, the mutating call has already completed and the state has settled. This
|
|
81
|
+
* asynchronous-dispatch ordering is load-bearing for event-ordering safety
|
|
82
|
+
* across the runtime (e.g. the orchestration zombie-reap path relies on
|
|
83
|
+
* listeners never seeing a mutation mid-flight) — do NOT replace queueMicrotask
|
|
84
|
+
* with synchronous invocation.
|
|
72
85
|
*/
|
|
73
86
|
export declare class RuntimeEventBus {
|
|
74
87
|
/** Per-event-type listener sets. Keyed by the exact event type string. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/platform/runtime/events/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,cAAc,EAAE,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nC;AASD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,eAAe;IAC1B,0EAA0E;IAC1E,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA6D;IACxF,6DAA6D;IAC7D,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAwD;IACzF,gDAAgD;IAChD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,sEAAsE;IACtE,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAA2C;IAChF,yFAAyF;IACzF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,0BAA0B,CAAK;gBAE3C,IAAI,CAAC,EAAE,sBAAsB;IAIzC;;;;;;OAMG;IACI,EAAE,CAAC,CAAC,SAAS,eAAe,EACjC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,EACpB,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAC5B,MAAM,IAAI;IAwBb;;;;;;OAMG;IACI,QAAQ,CAAC,CAAC,SAAS,kBAAkB,EAC1C,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,GAC5C,MAAM,IAAI;IAwBb;;;;;;;;;;;;;;;;;OAiBG;IACI,IAAI,CAAC,CAAC,SAAS,kBAAkB,EACtC,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,oBAAoB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,GAC3E,IAAI;IA6CP;;;;;;;;OAQG;IACH,OAAO,CAAC,oBAAoB;IA4B5B;;;;;;OAMG;IACH,OAAO,CAAC,wBAAwB;IA0ChC,OAAO,CAAC,IAAI;IAMZ,OAAO,CAAC,UAAU;CAKnB"}
|
|
@@ -46,6 +46,19 @@ function extractErrorMessage(err) {
|
|
|
46
46
|
* sessionId, timestamps, and source context.
|
|
47
47
|
*
|
|
48
48
|
* This is the authoritative event transport for runtime domain signaling.
|
|
49
|
+
*
|
|
50
|
+
* DISPATCH ORDERING GUARANTEE (contract — pinned by
|
|
51
|
+
* test/runtime-event-bus-dispatch-contract.test.ts): {@link emit} NEVER invokes
|
|
52
|
+
* a subscriber synchronously. Each matching handler is deferred to its own
|
|
53
|
+
* `queueMicrotask`, so emit() always returns to its caller — and the caller's
|
|
54
|
+
* remaining synchronous statements run — BEFORE any listener fires. A component
|
|
55
|
+
* may therefore emit an event from the MIDDLE of a state mutation without risk
|
|
56
|
+
* that a subscriber observes the half-applied state: by the time a listener
|
|
57
|
+
* runs, the mutating call has already completed and the state has settled. This
|
|
58
|
+
* asynchronous-dispatch ordering is load-bearing for event-ordering safety
|
|
59
|
+
* across the runtime (e.g. the orchestration zombie-reap path relies on
|
|
60
|
+
* listeners never seeing a mutation mid-flight) — do NOT replace queueMicrotask
|
|
61
|
+
* with synchronous invocation.
|
|
49
62
|
*/
|
|
50
63
|
export class RuntimeEventBus {
|
|
51
64
|
/** Per-event-type listener sets. Keyed by the exact event type string. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../../../../src/platform/runtime/feature-flags/flags.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../../../../src/platform/runtime/feature-flags/flags.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,WAAW,EAogBtC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAE7D,CAAC"}
|
|
@@ -207,6 +207,26 @@ export const FEATURE_FLAGS = [
|
|
|
207
207
|
tier: 9,
|
|
208
208
|
runtimeToggleable: true,
|
|
209
209
|
},
|
|
210
|
+
{
|
|
211
|
+
id: 'agent-passive-code-injection',
|
|
212
|
+
name: 'Agent Passive Code Injection',
|
|
213
|
+
description: 'Enables per-turn passive retrieval from the repo SOURCE-TREE CODE INDEX (CodeIndexStore) '
|
|
214
|
+
+ 'alongside project-memory knowledge, sharing the SAME token budget and relevance floor. '
|
|
215
|
+
+ 'When the query would benefit and the index is built, similarity-ranked code chunks are '
|
|
216
|
+
+ 'injected as untrusted reference pointers, each recorded on the turn injection record with '
|
|
217
|
+
+ 'source=code-index and its honest match label (semantic/lexical). Never injects from an '
|
|
218
|
+
+ 'empty or provider-mismatched index, or from a hashed-only (no real semantic) provider — '
|
|
219
|
+
+ 'the store exposes each of those and the turn record states which. '
|
|
220
|
+
+ 'DEFAULT OFF (unlike agent-passive-knowledge-injection, which defaults on): code injection '
|
|
221
|
+
+ 'is a newer, higher-variance signal than reviewed project memory — code chunks carry no '
|
|
222
|
+
+ 'review/trust provenance and a weak similarity match can pull in a plausibly-worded but '
|
|
223
|
+
+ 'wrong chunk — so this first landing is opt-in, earned on by the same hard-budget + '
|
|
224
|
+
+ 'honest-record discipline before it becomes a default. Also respects the embedder’s '
|
|
225
|
+
+ 'storage.codeIndexEnabled setting; disable either to revert to memory-only injection.',
|
|
226
|
+
defaultState: 'disabled',
|
|
227
|
+
tier: 9,
|
|
228
|
+
runtimeToggleable: true,
|
|
229
|
+
},
|
|
210
230
|
{
|
|
211
231
|
id: 'output-schema-fingerprint',
|
|
212
232
|
name: 'Output Schema Fingerprints',
|
|
@@ -323,11 +343,29 @@ export const FEATURE_FLAGS = [
|
|
|
323
343
|
runtimeToggleable: true,
|
|
324
344
|
},
|
|
325
345
|
{
|
|
346
|
+
// NOTE: control-plane-gateway is the ONE tier-10 flag that defaults ON (One-Platform).
|
|
347
|
+
// A stock daemon (no config) must be able to stream companion chat over SSE;
|
|
348
|
+
// leaving this OFF made a fresh daemon return 503 on the live-stream path (the
|
|
349
|
+
// "stock daemon is dead" bug).
|
|
350
|
+
//
|
|
351
|
+
// HONEST SURFACE STATEMENT: flipping this default ON DOES expose surface — just not
|
|
352
|
+
// an UNAUTHENTICATED one. Concretely it turns on: (1) the auth-gated streaming surface
|
|
353
|
+
// — SSE `/api/control-plane/events`, the companion-chat `.../events` stream, and the WS
|
|
354
|
+
// control channel — every one of which returns 401 before any principal is resolved
|
|
355
|
+
// (daemon-sdk/control-routes.ts), and per-channel scopes are enforced on the fan-out
|
|
356
|
+
// (e.g. read:sessions on session-update); and (2) the inert pre-auth login shell — the
|
|
357
|
+
// handful of unauthenticated bootstrap endpoints that carry NO session/runtime data and
|
|
358
|
+
// exist only to establish auth. The default bind stays loopback and the 60/min + 5/min
|
|
359
|
+
// rate limiters are unchanged. It remains runtimeToggleable, so an operator who wants a
|
|
360
|
+
// request/response-only daemon can turn it back off via config
|
|
361
|
+
// (`flags: { 'control-plane-gateway': 'disabled' }`), which the manager honours over
|
|
362
|
+
// this default. Do NOT generalise this to the other tier-10 siblings (slack/discord/web
|
|
363
|
+
// surfaces, delivery-engine, etc.) — they stay OFF until individually validated.
|
|
326
364
|
id: 'control-plane-gateway',
|
|
327
365
|
name: 'Control-Plane Gateway',
|
|
328
366
|
description: 'Enables the shared gateway/control-plane host that serves state snapshots, live streams, '
|
|
329
367
|
+ 'and authenticated automation control APIs to terminal hosts and remote clients.',
|
|
330
|
-
defaultState: '
|
|
368
|
+
defaultState: 'enabled',
|
|
331
369
|
tier: 10,
|
|
332
370
|
runtimeToggleable: true,
|
|
333
371
|
},
|
|
@@ -5,7 +5,7 @@ import type { ProcessActivity, ProcessNode, ProcessState, ProcessUsage } from '.
|
|
|
5
5
|
export declare function chainNodeId(chainId: string): string;
|
|
6
6
|
/** Subtask node ids are namespaced to avoid colliding with agent/process ids. */
|
|
7
7
|
export declare function subtaskNodeId(subtaskId: string): string;
|
|
8
|
-
/** Work-item node ids are namespaced to avoid colliding with agent/process ids
|
|
8
|
+
/** Work-item node ids are namespaced to avoid colliding with agent/process ids. */
|
|
9
9
|
export declare function workItemNodeId(workItemId: string): string;
|
|
10
10
|
/**
|
|
11
11
|
* One activity side-table entry. Registry-owned; populated from the EXISTING
|
|
@@ -35,7 +35,7 @@ export interface AgentAdapterContext {
|
|
|
35
35
|
readonly chainIds: ReadonlySet<string>;
|
|
36
36
|
/** Raw WrfcSubtask ids present in this snapshot. */
|
|
37
37
|
readonly subtaskIds: ReadonlySet<string>;
|
|
38
|
-
/** Raw orchestration-engine WorkItem ids present in this snapshot
|
|
38
|
+
/** Raw orchestration-engine WorkItem ids present in this snapshot. */
|
|
39
39
|
readonly workItemIds: ReadonlySet<string>;
|
|
40
40
|
/** orchestrationNodeId → owning agentId, for parentNodeId edge resolution. */
|
|
41
41
|
readonly agentIdByOrchestrationNodeId: ReadonlyMap<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../../../src/platform/runtime/fleet/adapters/agent.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,YAAY,EACZ,YAAY,EACb,MAAM,aAAa,CAAC;AAErB,+EAA+E;AAC/E,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../../../src/platform/runtime/fleet/adapters/agent.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,YAAY,EACZ,YAAY,E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,CAAC,MAAM,CAAC,CAAC;IACzC,sEAAsE;IACtE,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1C,8EAA8E;IAC9E,QAAQ,CAAC,4BAA4B,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnE,8CAA8C;IAC9C,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACvC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,YAAY,KAAK,MAAM,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;IACtG;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;CACrC;AAED,wDAAwD;AACxD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY,GAAG,SAAS,CAYlF;AA8ED,iCAAiC;AACjC,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,mBAAmB,GAAG,WAAW,CA6CrF"}
|
|
@@ -7,7 +7,7 @@ export function chainNodeId(chainId) {
|
|
|
7
7
|
export function subtaskNodeId(subtaskId) {
|
|
8
8
|
return `subtask:${subtaskId}`;
|
|
9
9
|
}
|
|
10
|
-
/** Work-item node ids are namespaced to avoid colliding with agent/process ids
|
|
10
|
+
/** Work-item node ids are namespaced to avoid colliding with agent/process ids. */
|
|
11
11
|
export function workItemNodeId(workItemId) {
|
|
12
12
|
return `work-item:${workItemId}`;
|
|
13
13
|
}
|
|
@@ -27,9 +27,9 @@ export function usageFromAgentRecord(record) {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* parentId precedence (brief-mandated,
|
|
30
|
+
* parentId precedence (brief-mandated, stable):
|
|
31
31
|
* wrfcSubtaskId → `subtask:<id>` else wrfcId → `chain:<id>` else
|
|
32
|
-
* workItemId → `work-item:<id>` (
|
|
32
|
+
* workItemId → `work-item:<id>` (orchestration-engine phase
|
|
33
33
|
* agents, a separate track from WRFC so the two systems' agents are never
|
|
34
34
|
* conflated) else orchestrationNodeId/parentNodeId (resolved to the owning
|
|
35
35
|
* agent) else parentAgentId. Every step falls through when the referenced
|
|
@@ -64,7 +64,7 @@ function deriveAgentState(record, entry, sessionId, ctx) {
|
|
|
64
64
|
return 'failed';
|
|
65
65
|
case 'cancelled':
|
|
66
66
|
// terminationKind distinguishes a graceful interrupt request from a hard
|
|
67
|
-
// kill for display purposes
|
|
67
|
+
// kill for display purposes. Records
|
|
68
68
|
// persisted before this field existed have no terminationKind and
|
|
69
69
|
// default to 'killed' — the historical behavior.
|
|
70
70
|
return record.terminationKind === 'interrupt' ? 'interrupted' : 'killed';
|
|
@@ -17,7 +17,7 @@ export interface AutomationJobRaw {
|
|
|
17
17
|
/** Type guard for AutomationJobRaw, used by registry.ts to distinguish an automation-job 'schedule' node's `raw` from a workflow-tool ScheduleEntry's `raw` — both share the 'schedule' kind. */
|
|
18
18
|
export declare function isAutomationJobRaw(raw: unknown): raw is AutomationJobRaw;
|
|
19
19
|
/**
|
|
20
|
-
* AutomationJob → ProcessNode
|
|
20
|
+
* AutomationJob → ProcessNode. Reuses the 'schedule'
|
|
21
21
|
* kind rather than inventing a new one — a job created via `/schedule` IS a
|
|
22
22
|
* schedule from the user's viewpoint, even though it lives in a completely
|
|
23
23
|
* separate subsystem (platform/automation) from the workflow-tool's
|
|
@@ -14,7 +14,7 @@ export function isAutomationJobRaw(raw) {
|
|
|
14
14
|
return raw !== null && typeof raw === 'object' && raw.source === 'automation-manager';
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* AutomationJob → ProcessNode
|
|
17
|
+
* AutomationJob → ProcessNode. Reuses the 'schedule'
|
|
18
18
|
* kind rather than inventing a new one — a job created via `/schedule` IS a
|
|
19
19
|
* schedule from the user's viewpoint, even though it lives in a completely
|
|
20
20
|
* separate subsystem (platform/automation) from the workflow-tool's
|
|
@@ -15,7 +15,7 @@ export declare function codeIndexNodeId(): string;
|
|
|
15
15
|
* background-process): liveness rides the registry tick. An index build has
|
|
16
16
|
* no pid, so it is NOT a 'background-process' node (ProcessManager is
|
|
17
17
|
* shell/OS-process-only) — it gets its own ProcessKind, mirroring the
|
|
18
|
-
*
|
|
18
|
+
* orchestrationEngine-dep precedent.
|
|
19
19
|
*/
|
|
20
20
|
export declare function adaptCodeIndex(service: CodeIndexProcessSource, now: number): ProcessNode;
|
|
21
21
|
//# sourceMappingURL=code-index.d.ts.map
|
|
@@ -8,7 +8,7 @@ export function codeIndexNodeId() {
|
|
|
8
8
|
* background-process): liveness rides the registry tick. An index build has
|
|
9
9
|
* no pid, so it is NOT a 'background-process' node (ProcessManager is
|
|
10
10
|
* shell/OS-process-only) — it gets its own ProcessKind, mirroring the
|
|
11
|
-
*
|
|
11
|
+
* orchestrationEngine-dep precedent.
|
|
12
12
|
*/
|
|
13
13
|
export function adaptCodeIndex(service, now) {
|
|
14
14
|
const building = service.isBuilding();
|
|
@@ -1,19 +1,30 @@
|
|
|
1
1
|
/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */
|
|
2
|
+
import type { Phase, WorkItem, WorkItemUsage, Workstream } from '../../../orchestration/types.js';
|
|
3
|
+
import type { ProcessCostState, ProcessNode, ProcessUsage } from '../types.js';
|
|
4
|
+
import { workItemNodeId } from './agent.js';
|
|
2
5
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* spawned, same shape as adaptChain/cancelAgents), a phase is a pure grouping
|
|
8
|
-
* node (no lifecycle, no usage — same "report nothing" choice adaptSubtask
|
|
9
|
-
* makes, since attributing a work-item's CUMULATIVE usage to whichever phase
|
|
10
|
-
* it currently sits in would double-count across phases), and a work-item is
|
|
11
|
-
* the WRFC-subtask analogue: it delegates interrupt/kill/steer to its
|
|
12
|
-
* current live agent when it has one.
|
|
6
|
+
* Live in-flight usage of a work-item's currently-active agent, read from that
|
|
7
|
+
* agent's fleet node at snapshot time (DEBT-4 item 2). Overlaid onto the
|
|
8
|
+
* item's phase-boundary-committed `item.usage` so a RUNNING phase shows real,
|
|
9
|
+
* growing numbers instead of n/a until it completes.
|
|
13
10
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
export interface LiveItemUsage {
|
|
12
|
+
readonly usage?: ProcessUsage | undefined;
|
|
13
|
+
readonly costUsd?: number | null | undefined;
|
|
14
|
+
readonly costState?: ProcessCostState | undefined;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The usage the fleet DISPLAYS for a work-item: its committed phase-boundary
|
|
18
|
+
* total, plus — only while it is actively 'in-phase' — the live in-flight
|
|
19
|
+
* usage of its current agent. The overlay is applied ONLY for an 'in-phase'
|
|
20
|
+
* item, which is exactly the window in which `item.usage` does NOT yet include
|
|
21
|
+
* the running phase (the engine folds that in at completion — see
|
|
22
|
+
* runItemPhase), so committed + live never double-counts and the two hand off
|
|
23
|
+
* atomically at the phase boundary. Because both operands only ever grow and
|
|
24
|
+
* merge through {@link mergeWorkItemUsage}, presence is MONOTONE: once usage
|
|
25
|
+
* has appeared for an item it never blinks back to n/a (DEBT-4 item 2).
|
|
26
|
+
*/
|
|
27
|
+
export declare function displayWorkItemUsage(item: WorkItem, live: LiveItemUsage | undefined): WorkItemUsage;
|
|
17
28
|
/** Workstream node ids are namespaced to avoid colliding with agent/process ids. */
|
|
18
29
|
export declare function workstreamNodeId(workstreamId: string): string;
|
|
19
30
|
/**
|
|
@@ -25,9 +36,16 @@ export declare function phaseNodeId(workstreamId: string, phaseId: string): stri
|
|
|
25
36
|
export { workItemNodeId };
|
|
26
37
|
/** The work-item's currently-active agent, i.e. the one driving its live phase run. Undefined once terminal or between phases. */
|
|
27
38
|
export declare function activeWorkItemAgentId(item: WorkItem): string | undefined;
|
|
28
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* WorkItem -> ProcessNode. Delegates interruptible/killable/steerable to its
|
|
41
|
+
* currently-active agent, mirroring adaptSubtask. `opts.live` supplies the
|
|
42
|
+
* currently-active agent's in-flight usage so a running phase shows real,
|
|
43
|
+
* growing numbers instead of n/a until it completes (DEBT-4 item 2); omit it
|
|
44
|
+
* (or pass undefined) for the committed-only view.
|
|
45
|
+
*/
|
|
29
46
|
export declare function adaptWorkItem(item: WorkItem, workstreamId: string, parentId: string, opts: {
|
|
30
47
|
steerable: boolean;
|
|
48
|
+
live?: LiveItemUsage | undefined;
|
|
31
49
|
}): ProcessNode;
|
|
32
50
|
/**
|
|
33
51
|
* Phase -> ProcessNode. Deliberately reports NO usage/cost (mirrors
|
|
@@ -39,9 +57,13 @@ export declare function adaptWorkItem(item: WorkItem, workstreamId: string, pare
|
|
|
39
57
|
*/
|
|
40
58
|
export declare function adaptPhase(phase: Phase, workstream: Workstream): ProcessNode;
|
|
41
59
|
/**
|
|
42
|
-
* Workstream -> ProcessNode. Root node (no parentId). Sums every item's
|
|
43
|
-
* usage/cost
|
|
44
|
-
*
|
|
60
|
+
* Workstream -> ProcessNode. Root node (no parentId). Sums every item's DISPLAY
|
|
61
|
+
* usage/cost (committed total + any live in-flight overlay, resolved once per
|
|
62
|
+
* item) exactly once — never through an intermediate phase bucket (see
|
|
63
|
+
* adaptPhase) — so this total can never double-count and never shows n/a while
|
|
64
|
+
* an item is actively producing usage (DEBT-4 item 2). `liveByItemId` supplies
|
|
65
|
+
* the active agents' in-flight usage keyed by item id; omit it for the
|
|
66
|
+
* committed-only view.
|
|
45
67
|
*/
|
|
46
|
-
export declare function adaptWorkstream(workstream: Workstream, now: number): ProcessNode;
|
|
68
|
+
export declare function adaptWorkstream(workstream: Workstream, now: number, liveByItemId?: ReadonlyMap<string, LiveItemUsage>): ProcessNode;
|
|
47
69
|
//# sourceMappingURL=orchestration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration.d.ts","sourceRoot":"","sources":["../../../../../src/platform/runtime/fleet/adapters/orchestration.ts"],"names":[],"mappings":"AAAA,qFAAqF;
|
|
1
|
+
{"version":3,"file":"orchestration.d.ts","sourceRoot":"","sources":["../../../../../src/platform/runtime/fleet/adapters/orchestration.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAerF,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClG,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAgB,YAAY,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7C,QAAQ,CAAC,SAAS,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;CACnD;AA2CD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,aAAa,GAAG,SAAS,GAAG,aAAa,CAOnG;AAED,oFAAoF;AACpF,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED,OAAO,EAAE,cAAc,EAAE,CAAC;AAI1B,kIAAkI;AAClI,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAExE;AA0GD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE;IAAE,SAAS,EAA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