@pellux/goodvibes-sdk 0.38.0 → 1.0.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 +3171 -929
- package/dist/daemon.d.ts +2 -0
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +4 -0
- 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 +13 -0
- package/dist/platform/agents/orchestrator-runner.d.ts.map +1 -1
- package/dist/platform/agents/orchestrator-runner.js +14 -0
- package/dist/platform/agents/orchestrator.d.ts +38 -6
- package/dist/platform/agents/orchestrator.d.ts.map +1 -1
- package/dist/platform/agents/orchestrator.js +66 -18
- 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 +23 -0
- package/dist/platform/agents/wrfc-controller.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-controller.js +158 -32
- 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-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 +67 -20
- package/dist/platform/companion/companion-chat-manager.d.ts.map +1 -1
- package/dist/platform/companion/companion-chat-manager.js +130 -144
- 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 +37 -4
- 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-types.d.ts +13 -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 +6 -1
- package/dist/platform/control-plane/index.d.ts.map +1 -1
- package/dist/platform/control-plane/index.js +4 -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 +133 -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-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-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 +32 -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 +29 -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 +57 -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/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 +21 -1
- 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 +8 -1
- package/dist/platform/core/orchestrator-turn-loop.d.ts.map +1 -1
- package/dist/platform/core/orchestrator-turn-loop.js +6 -0
- package/dist/platform/core/orchestrator.d.ts +6 -0
- package/dist/platform/core/orchestrator.d.ts.map +1 -1
- package/dist/platform/core/orchestrator.js +15 -0
- 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 +63 -0
- package/dist/platform/daemon/boot.d.ts.map +1 -0
- package/dist/platform/daemon/boot.js +60 -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 +18 -6
- package/dist/platform/daemon/facade.d.ts.map +1 -1
- package/dist/platform/daemon/facade.js +50 -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 +1 -1
- package/dist/platform/daemon/http/router.d.ts.map +1 -1
- package/dist/platform/daemon/http/router.js +7 -22
- 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/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/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/controller-compat.d.ts +14 -0
- package/dist/platform/orchestration/controller-compat.d.ts.map +1 -1
- package/dist/platform/orchestration/controller-compat.js +18 -4
- 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 +226 -21
- 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 +4 -1
- package/dist/platform/orchestration/phase-runner.d.ts +29 -2
- 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 +19 -0
- 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 +286 -1
- 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/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/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/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 +48 -1
- package/dist/platform/runtime/fleet/registry.d.ts.map +1 -1
- package/dist/platform/runtime/fleet/registry.js +38 -4
- 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 +9 -7
- package/dist/platform/runtime/services.d.ts.map +1 -1
- package/dist/platform/runtime/services.js +19 -4
- 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-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 +10 -2
- 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 +63 -0
- package/dist/platform/state/memory-recall-contract.d.ts.map +1 -0
- package/dist/platform/state/memory-recall-contract.js +94 -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 +13 -2
- 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/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 +12 -0
- package/dist/platform/tools/agent/manager.d.ts.map +1 -1
- package/dist/platform/tools/agent/manager.js +6 -0
- 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 +22 -5
- package/dist/platform/tools/exec/schema.d.ts +1 -1
- package/dist/platform/tools/exec/schema.d.ts.map +1 -1
- package/dist/platform/tools/exec/schema.js +2 -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/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/version.js +1 -1
- package/package.json +21 -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
|
@@ -73,7 +73,25 @@ export type WorkItemState = 'pending' | 'awaiting-capacity'
|
|
|
73
73
|
* carries the human-readable reason for as long as the item stays blocked
|
|
74
74
|
* (cleared the moment it reclaims a slot).
|
|
75
75
|
*/
|
|
76
|
-
| 'blocked-budget'
|
|
76
|
+
| 'blocked-budget'
|
|
77
|
+
/**
|
|
78
|
+
* Recoverable, not terminal — the item cannot be claimed yet because at
|
|
79
|
+
* least one of its `dependsOn` items has not reached 'passed'. This is a
|
|
80
|
+
* REFUSE-not-kill gate (BIG-3 item 2): the item sits here, out of the
|
|
81
|
+
* claimable waiting set (computeClaims excludes it), until the engine's
|
|
82
|
+
* per-tick dependency pre-pass (applyDependencyGates, engine.ts) finds every
|
|
83
|
+
* dependency passed and flips it back to 'pending'. `blockedReason` is
|
|
84
|
+
* recomputed every tick so it stays honest as dependencies change:
|
|
85
|
+
* - `waiting on: <titles>` while dependencies are still pending/running,
|
|
86
|
+
* - `dependency failed: <titles>` once a dependency has terminally failed.
|
|
87
|
+
* A FAILED dependency does NOT terminally fail the dependent — it stays here,
|
|
88
|
+
* recoverable: if that dependency is later retried (engine.retryItem) and
|
|
89
|
+
* passes, the next tick clears this block and the item proceeds. Only ever
|
|
90
|
+
* set on an item that has not started yet (no phase has run); once an item's
|
|
91
|
+
* dependencies are all passed at its first claim they stay passed (passed is
|
|
92
|
+
* terminal), so a mid-pipeline item is never re-gated.
|
|
93
|
+
*/
|
|
94
|
+
| 'blocked-dependency';
|
|
77
95
|
/** Token/cost usage rolled up across every agent this work-item has ever spawned. */
|
|
78
96
|
export interface WorkItemUsage {
|
|
79
97
|
readonly inputTokens: number;
|
|
@@ -88,6 +106,22 @@ export interface WorkItemUsage {
|
|
|
88
106
|
readonly costState: 'priced' | 'unpriced' | 'estimated';
|
|
89
107
|
}
|
|
90
108
|
export declare function emptyWorkItemUsage(): WorkItemUsage;
|
|
109
|
+
/**
|
|
110
|
+
* Combine two usage rollups into one running total. The SINGLE canonical merge
|
|
111
|
+
* used everywhere a WorkItemUsage is accumulated — the phase-runner (folding a
|
|
112
|
+
* completed phase into an item), the engine (same, at the phase boundary), and
|
|
113
|
+
* the fleet rollup adapters (overlaying live in-flight usage onto committed
|
|
114
|
+
* totals). Keeping one implementation is what makes the rollup MONOTONE in
|
|
115
|
+
* presence: every count is summed (counts only grow) and a cost is retained
|
|
116
|
+
* via `??` whenever either operand carries one, so once a real token or cost
|
|
117
|
+
* value has appeared the merged result can never regress to absent/`null`
|
|
118
|
+
* (DEBT-4 item 2 — "updating" is a state, never a data wipe).
|
|
119
|
+
*
|
|
120
|
+
* Cost state stays honest rather than optimistic: 'priced' only when BOTH
|
|
121
|
+
* operands are priced; 'unpriced' only when NEITHER carries a cost; any mix is
|
|
122
|
+
* 'estimated' — a real partial sum, explicitly flagged as incomplete.
|
|
123
|
+
*/
|
|
124
|
+
export declare function mergeWorkItemUsage(a: WorkItemUsage, b: WorkItemUsage): WorkItemUsage;
|
|
91
125
|
/**
|
|
92
126
|
* One unit of pipeline work. `visits` bounds re-review cycles the same way
|
|
93
127
|
* WrfcController.retryTransportFailure/evaluateConstraints cap fix attempts —
|
|
@@ -97,6 +131,18 @@ export interface WorkItem {
|
|
|
97
131
|
readonly id: string;
|
|
98
132
|
title: string;
|
|
99
133
|
readonly task: string;
|
|
134
|
+
/**
|
|
135
|
+
* IDs of the sibling work items this item depends on (BIG-3 item 2). The
|
|
136
|
+
* item is not claimable until EVERY id here refers to an item that has
|
|
137
|
+
* reached 'passed'; until then it sits in 'blocked-dependency' with an
|
|
138
|
+
* honest `blockedReason`. Empty (the common case) ⇒ no dependency gate, the
|
|
139
|
+
* item is claimable as soon as capacity and budget allow. Populated from a
|
|
140
|
+
* PlanProposal's resolved `dependsOn` by `fromPlanProposal`
|
|
141
|
+
* (proposal-workstream.ts); the assembly asserts these reference real items
|
|
142
|
+
* and form no cycle. JSON-safe (a plain string[]), so it serializes with the
|
|
143
|
+
* work item unchanged.
|
|
144
|
+
*/
|
|
145
|
+
dependsOn: string[];
|
|
100
146
|
/** The phase this item is currently queued for or running in; null once terminal. */
|
|
101
147
|
currentPhaseId: string | null;
|
|
102
148
|
state: WorkItemState;
|
|
@@ -117,16 +163,102 @@ export interface WorkItem {
|
|
|
117
163
|
failureReason?: string | undefined;
|
|
118
164
|
/** Set only while state === 'blocked-budget'; cleared the instant the item reclaims a slot. See the 'blocked-budget' state doc for recovery semantics. */
|
|
119
165
|
blockedReason?: string | undefined;
|
|
166
|
+
/**
|
|
167
|
+
* Non-fatal bookkeeping notes accrued while the item PASSED its phases — e.g.
|
|
168
|
+
* a scoped commit that could not complete (DEBT-4 item 1). Warnings NEVER
|
|
169
|
+
* change the item's terminal status (that derives only from phase outcomes
|
|
170
|
+
* plus the explicit negating set, see bookkeeping.ts); they make a
|
|
171
|
+
* passed-with-caveats outcome legible instead of hiding it — or, worse,
|
|
172
|
+
* misreporting a genuinely-passed item as failed.
|
|
173
|
+
*/
|
|
174
|
+
warnings?: string[] | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* Absolute path to this item's isolated git worktree (worktree mode only).
|
|
177
|
+
* Set at first claim, cleared once the worktree is removed. Retained on a
|
|
178
|
+
* KEPT worktree (merge conflict, or a dirty tree after fail/kill) so the
|
|
179
|
+
* terminal summary and events can name exactly where the unmerged work lives.
|
|
180
|
+
*/
|
|
181
|
+
worktreePath?: string | undefined;
|
|
182
|
+
/** The item's branch name inside its worktree (worktree mode only), e.g. `ws/<wsShort>/<itemShort>`. */
|
|
183
|
+
worktreeBranch?: string | undefined;
|
|
184
|
+
/**
|
|
185
|
+
* Integration state of the item branch relative to the base branch (worktree
|
|
186
|
+
* mode). `'pending'` from the moment the passed item enters the integration
|
|
187
|
+
* lane until its merge resolves; `'merged'` (with {@link mergeHash} set) on a
|
|
188
|
+
* clean merge; `'conflict'` when the lane could not merge it — the worktree is
|
|
189
|
+
* then KEPT and `blockedReason` carries `merge-conflict: <files>`.
|
|
190
|
+
*/
|
|
191
|
+
mergeState?: ItemMergeState | undefined;
|
|
192
|
+
/** The merge commit hash recorded on a clean integration (mergeState === 'merged'). */
|
|
193
|
+
mergeHash?: string | undefined;
|
|
194
|
+
/**
|
|
195
|
+
* True when this item's worktree was deliberately KEPT rather than removed —
|
|
196
|
+
* a merge conflict, or a dirty tree left after fail/kill (data safety, rule
|
|
197
|
+
* 4). A kept worktree still lives at {@link worktreePath} for inspection.
|
|
198
|
+
*/
|
|
199
|
+
worktreeKept?: boolean | undefined;
|
|
120
200
|
}
|
|
121
201
|
export interface WorkItemSpec {
|
|
122
202
|
readonly id?: string | undefined;
|
|
123
203
|
readonly title: string;
|
|
124
204
|
readonly task: string;
|
|
205
|
+
/**
|
|
206
|
+
* IDs of other items in the SAME workstream this item depends on (BIG-3
|
|
207
|
+
* item 2). Omitted/empty ⇒ no dependency gate. Every id must match another
|
|
208
|
+
* item's id in the same CreateWorkstreamInput; `fromPlanProposal` asserts
|
|
209
|
+
* this (and acyclicity) at assembly, and the engine gates the claim path on
|
|
210
|
+
* it (see the 'blocked-dependency' state doc).
|
|
211
|
+
*/
|
|
212
|
+
readonly dependsOn?: readonly string[] | undefined;
|
|
125
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* Where a workstream's item phases run their file changes.
|
|
216
|
+
*
|
|
217
|
+
* - `shared` (DEFAULT): every item's phases run their agents in the ONE shared
|
|
218
|
+
* `projectRoot` working tree and scoped-commit straight onto its branch, as
|
|
219
|
+
* the engine has always behaved. Two items editing the same file serialize
|
|
220
|
+
* only by luck of scheduling — full behavioral back-compat, every pre-existing
|
|
221
|
+
* test passes untouched.
|
|
222
|
+
* - `worktree`: at first claim each item gets its own git worktree branched
|
|
223
|
+
* from the base branch (see IsolatedWorktree, worktree.ts). Its phases commit
|
|
224
|
+
* onto the item branch INSIDE that worktree, so concurrent items never touch
|
|
225
|
+
* each other's working tree. When an item terminates passed its branch is
|
|
226
|
+
* merged back into the base branch through a single sequential integration
|
|
227
|
+
* lane (completion order). See the engine's WorktreeIsolationManager.
|
|
228
|
+
*/
|
|
229
|
+
export type WorkstreamIsolation = 'shared' | 'worktree';
|
|
230
|
+
/**
|
|
231
|
+
* The integration state of an item's isolated worktree branch relative to the
|
|
232
|
+
* base branch (worktree mode only; absent/`'n-a'` in shared mode). Distinct
|
|
233
|
+
* from WorkItemState (the pipeline state): an item can be terminally `passed`
|
|
234
|
+
* while its merge is still `pending` in the integration lane, or `conflict`
|
|
235
|
+
* after the lane hit an unmergeable branch.
|
|
236
|
+
*/
|
|
237
|
+
export type ItemMergeState = 'n-a' | 'pending' | 'merged' | 'conflict';
|
|
126
238
|
export interface BudgetCeiling {
|
|
127
239
|
readonly maxTokens?: number | undefined;
|
|
128
240
|
readonly maxCostUsd?: number | undefined;
|
|
129
241
|
}
|
|
242
|
+
/**
|
|
243
|
+
* Workstream-level provenance (BIG-3 item 1) — honest, machine-readable record
|
|
244
|
+
* of where a workstream's items came from when it was assembled from an
|
|
245
|
+
* approved PlanProposal by `fromPlanProposal` (proposal-workstream.ts). Absent
|
|
246
|
+
* on workstreams built the compat way (`fromChainSpec`) or authored directly.
|
|
247
|
+
* Carried through serialization and surfaced in status/fleet so a resumed or
|
|
248
|
+
* observed workstream reports its origin without guessing.
|
|
249
|
+
*/
|
|
250
|
+
export interface WorkstreamProvenance {
|
|
251
|
+
/** Whether a read-only planning agent decomposed the goal, or the heuristic single-item path did. Mirrors PlanProposal.decomposedBy. */
|
|
252
|
+
readonly decomposedBy?: 'agent' | 'heuristic' | undefined;
|
|
253
|
+
/** The id of the PlanProposal this workstream was assembled from. */
|
|
254
|
+
readonly proposalId?: string | undefined;
|
|
255
|
+
/** The proposal's execution strategy label (e.g. 'parallel', 'sequential'), for display. */
|
|
256
|
+
readonly strategy?: string | undefined;
|
|
257
|
+
/** Estimated dollar cost of the planning-agent decomposition run, when priced. */
|
|
258
|
+
readonly agentCostUsd?: number | undefined;
|
|
259
|
+
/** Wall-clock time the planning agent ran, in ms (when the agent path ran). */
|
|
260
|
+
readonly elapsedMs?: number | undefined;
|
|
261
|
+
}
|
|
130
262
|
export interface Workstream {
|
|
131
263
|
readonly id: string;
|
|
132
264
|
title: string;
|
|
@@ -141,6 +273,20 @@ export interface Workstream {
|
|
|
141
273
|
* an unrelated sibling to complete first.
|
|
142
274
|
*/
|
|
143
275
|
budget?: BudgetCeiling | undefined;
|
|
276
|
+
/**
|
|
277
|
+
* Where item phases run their file changes (see {@link WorkstreamIsolation}).
|
|
278
|
+
* Absent is treated as `'shared'` everywhere — the default that preserves
|
|
279
|
+
* full behavioral back-compat. Persisted with the workstream and surfaced in
|
|
280
|
+
* events, so a resumed or observed workstream reports its isolation honestly.
|
|
281
|
+
*/
|
|
282
|
+
readonly isolation?: WorkstreamIsolation | undefined;
|
|
283
|
+
/**
|
|
284
|
+
* Where this workstream's items came from (BIG-3 item 1). Set only when the
|
|
285
|
+
* workstream was assembled from an approved PlanProposal via
|
|
286
|
+
* `fromPlanProposal`; absent for compat/`fromChainSpec` or hand-authored
|
|
287
|
+
* workstreams. Persisted and surfaced for honest origin reporting.
|
|
288
|
+
*/
|
|
289
|
+
readonly provenance?: WorkstreamProvenance | undefined;
|
|
144
290
|
readonly createdAt: number;
|
|
145
291
|
}
|
|
146
292
|
/** Outcome of running a phase's configured gates for one item. */
|
|
@@ -161,6 +307,31 @@ export interface CommitExclusion {
|
|
|
161
307
|
readonly excludedPaths: readonly string[];
|
|
162
308
|
readonly skipped: boolean;
|
|
163
309
|
}
|
|
310
|
+
/**
|
|
311
|
+
* Honest record of the scoped-commit bookkeeping step that runs AFTER a
|
|
312
|
+
* phase's gate has already passed (see phase-runner.ts commitPhaseWork). The
|
|
313
|
+
* commit is a POST-gate step: its outcome never decides whether the phase
|
|
314
|
+
* passed — the gate already did that — it only reports what happened to the
|
|
315
|
+
* working tree afterward, so the fleet and transcript can state "committed
|
|
316
|
+
* <hash>" or "commit skipped/failed" without ever contradicting the phase
|
|
317
|
+
* verdict (DEBT-4 item 1). Present on a PhaseResult only when the gate passed
|
|
318
|
+
* and a commit was therefore attempted or deliberately skipped.
|
|
319
|
+
*/
|
|
320
|
+
export interface PhaseCommitOutcome {
|
|
321
|
+
readonly status: 'committed' | 'skipped' | 'failed';
|
|
322
|
+
/** The landed commit hash, present only for status 'committed'. */
|
|
323
|
+
readonly hash?: string | undefined;
|
|
324
|
+
/** Human-readable detail for 'skipped'/'failed', plus any gitignored-path note on 'committed'. */
|
|
325
|
+
readonly reason?: string | undefined;
|
|
326
|
+
/**
|
|
327
|
+
* True ONLY for a 'failed' commit whose failure belongs to the NEGATING SET —
|
|
328
|
+
* a bookkeeping failure (workspace/index corruption) that genuinely
|
|
329
|
+
* invalidates the phase's passed work. A negating commit failure is the one
|
|
330
|
+
* post-gate condition that DOES fail the item; every other commit failure is
|
|
331
|
+
* a non-fatal warning on a passed item. See bookkeeping.ts for the set.
|
|
332
|
+
*/
|
|
333
|
+
readonly negating?: boolean | undefined;
|
|
334
|
+
}
|
|
164
335
|
/**
|
|
165
336
|
* The resume-cache unit, keyed (itemId,phaseId). On resume, every
|
|
166
337
|
* (itemId,phaseId) present in a snapshot's completedResults is hydrated
|
|
@@ -177,6 +348,12 @@ export interface PhaseResult {
|
|
|
177
348
|
readonly usage: WorkItemUsage;
|
|
178
349
|
/** Present only when a scoped commit excluded launch-dirty residue (see CommitExclusion). */
|
|
179
350
|
readonly commitExclusion?: CommitExclusion | undefined;
|
|
351
|
+
/**
|
|
352
|
+
* Outcome of the post-gate scoped-commit step (DEBT-4 item 1). Present only
|
|
353
|
+
* when this phase's gate passed and a commit was attempted or deliberately
|
|
354
|
+
* skipped; absent for a failed/cancelled phase (no commit is reached).
|
|
355
|
+
*/
|
|
356
|
+
readonly commit?: PhaseCommitOutcome | undefined;
|
|
180
357
|
}
|
|
181
358
|
/** Snapshot shape written to .goodvibes/orchestration/<workstreamId>.json. */
|
|
182
359
|
export interface WorkstreamSnapshot {
|
|
@@ -219,12 +396,41 @@ export type OrchestrationEvent = {
|
|
|
219
396
|
readonly type: 'item-passed';
|
|
220
397
|
readonly workstreamId: string;
|
|
221
398
|
readonly itemId: string;
|
|
399
|
+
readonly warnings?: readonly string[] | undefined;
|
|
222
400
|
} | {
|
|
223
401
|
readonly type: 'item-failed';
|
|
224
402
|
readonly workstreamId: string;
|
|
225
403
|
readonly itemId: string;
|
|
226
404
|
readonly reason: string;
|
|
227
405
|
}
|
|
406
|
+
/**
|
|
407
|
+
* Dependency-gating lifecycle (BIG-3 item 2). `item-blocked-dependency`
|
|
408
|
+
* fires once per NEW block (not every idle tick), naming the unmet
|
|
409
|
+
* dependencies by id in `deps` and carrying the current human-readable
|
|
410
|
+
* `reason` ('waiting on: …' or 'dependency failed: …'). `item-dependency-cleared`
|
|
411
|
+
* fires when a previously-blocked item's dependencies all reach passed and it
|
|
412
|
+
* is released back to the claimable set. `item-retried` fires when a
|
|
413
|
+
* terminally-failed item is deliberately reset to re-run via engine.retryItem
|
|
414
|
+
* — the documented recovery path that lets a failed dependency (and its
|
|
415
|
+
* stuck dependents) recover.
|
|
416
|
+
*/
|
|
417
|
+
| {
|
|
418
|
+
readonly type: 'item-blocked-dependency';
|
|
419
|
+
readonly workstreamId: string;
|
|
420
|
+
readonly itemId: string;
|
|
421
|
+
readonly phaseId: string;
|
|
422
|
+
readonly reason: string;
|
|
423
|
+
readonly deps: readonly string[];
|
|
424
|
+
} | {
|
|
425
|
+
readonly type: 'item-dependency-cleared';
|
|
426
|
+
readonly workstreamId: string;
|
|
427
|
+
readonly itemId: string;
|
|
428
|
+
} | {
|
|
429
|
+
readonly type: 'item-retried';
|
|
430
|
+
readonly workstreamId: string;
|
|
431
|
+
readonly itemId: string;
|
|
432
|
+
readonly reason: string;
|
|
433
|
+
}
|
|
228
434
|
/** Emitted once per item on `importWorkstream` for every item reconciled from a crash-artifact 'in-phase' snapshot back to 'pending' — see the 'in-phase' state doc. */
|
|
229
435
|
| {
|
|
230
436
|
readonly type: 'item-requeued';
|
|
@@ -235,6 +441,85 @@ export type OrchestrationEvent = {
|
|
|
235
441
|
readonly type: 'workstream-persisted';
|
|
236
442
|
readonly workstreamId: string;
|
|
237
443
|
}
|
|
444
|
+
/**
|
|
445
|
+
* Worktree-isolation lifecycle events (worktree mode only). Each names the
|
|
446
|
+
* item and, where relevant, the on-disk worktree path and branch so an
|
|
447
|
+
* observer (TUI, transcript) can report isolation + merge state honestly and
|
|
448
|
+
* point at KEPT worktrees for inspection. None of these ever fire in shared
|
|
449
|
+
* mode.
|
|
450
|
+
*/
|
|
451
|
+
| {
|
|
452
|
+
readonly type: 'item-worktree-created';
|
|
453
|
+
readonly workstreamId: string;
|
|
454
|
+
readonly itemId: string;
|
|
455
|
+
readonly path: string;
|
|
456
|
+
readonly branch: string;
|
|
457
|
+
}
|
|
458
|
+
/** A passed item's branch merged cleanly into the base branch through the integration lane. */
|
|
459
|
+
| {
|
|
460
|
+
readonly type: 'item-merged';
|
|
461
|
+
readonly workstreamId: string;
|
|
462
|
+
readonly itemId: string;
|
|
463
|
+
readonly branch: string;
|
|
464
|
+
readonly hash: string;
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* The integration lane could not merge a passed item's branch — the base
|
|
468
|
+
* merge conflicted. The worktree + branch are KEPT (never auto-resolved,
|
|
469
|
+
* never silently dropped); the lane continues with the next item.
|
|
470
|
+
*/
|
|
471
|
+
| {
|
|
472
|
+
readonly type: 'item-merge-conflict';
|
|
473
|
+
readonly workstreamId: string;
|
|
474
|
+
readonly itemId: string;
|
|
475
|
+
readonly branch: string;
|
|
476
|
+
readonly path: string;
|
|
477
|
+
readonly files: readonly string[];
|
|
478
|
+
}
|
|
479
|
+
/** An item's worktree + branch were removed (merged item, or a clean tree after fail/kill). */
|
|
480
|
+
| {
|
|
481
|
+
readonly type: 'item-worktree-removed';
|
|
482
|
+
readonly workstreamId: string;
|
|
483
|
+
readonly itemId: string;
|
|
484
|
+
readonly path: string;
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* An item's worktree was deliberately KEPT rather than removed — a merge
|
|
488
|
+
* conflict, or a dirty tree left behind by a failed/killed item (data
|
|
489
|
+
* safety). `reason` states which; `path` is where the work still lives.
|
|
490
|
+
*/
|
|
491
|
+
| {
|
|
492
|
+
readonly type: 'item-worktree-kept';
|
|
493
|
+
readonly workstreamId: string;
|
|
494
|
+
readonly itemId: string;
|
|
495
|
+
readonly path: string;
|
|
496
|
+
readonly reason: string;
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* A KEPT worktree was evicted (removed) to stay under the kept-worktree cap —
|
|
500
|
+
* oldest-first, and always announced (never a silent sweep). `path` is what
|
|
501
|
+
* was removed.
|
|
502
|
+
*/
|
|
503
|
+
| {
|
|
504
|
+
readonly type: 'item-worktree-evicted';
|
|
505
|
+
readonly workstreamId: string;
|
|
506
|
+
readonly itemId: string;
|
|
507
|
+
readonly path: string;
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* Reconciliation of an orphaned `ws/*` worktree found at import (a crash
|
|
511
|
+
* artifact from a prior process). `disposition` is `'adopted'` when the
|
|
512
|
+
* engine re-attached it to a re-queued item, or `'reported'` when it belongs
|
|
513
|
+
* to no known item and was left in place for the operator (NEVER deleted on
|
|
514
|
+
* sight).
|
|
515
|
+
*/
|
|
516
|
+
| {
|
|
517
|
+
readonly type: 'orphan-worktree-reconciled';
|
|
518
|
+
readonly workstreamId: string;
|
|
519
|
+
readonly path: string;
|
|
520
|
+
readonly branch: string;
|
|
521
|
+
readonly disposition: 'adopted' | 'reported';
|
|
522
|
+
}
|
|
238
523
|
/**
|
|
239
524
|
* Emitted once per engine instance (Wave 6, wo-F item 4), right after the
|
|
240
525
|
* launch-time dirty-tree snapshot resolves, ONLY when it is non-empty.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/platform/orchestration/types.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAE1F,2EAA2E;AAC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kItemUsage() {
|
|
|
12
12
|
costState: 'unpriced',
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Combine two usage rollups into one running total. The SINGLE canonical merge
|
|
17
|
+
* used everywhere a WorkItemUsage is accumulated — the phase-runner (folding a
|
|
18
|
+
* completed phase into an item), the engine (same, at the phase boundary), and
|
|
19
|
+
* the fleet rollup adapters (overlaying live in-flight usage onto committed
|
|
20
|
+
* totals). Keeping one implementation is what makes the rollup MONOTONE in
|
|
21
|
+
* presence: every count is summed (counts only grow) and a cost is retained
|
|
22
|
+
* via `??` whenever either operand carries one, so once a real token or cost
|
|
23
|
+
* value has appeared the merged result can never regress to absent/`null`
|
|
24
|
+
* (DEBT-4 item 2 — "updating" is a state, never a data wipe).
|
|
25
|
+
*
|
|
26
|
+
* Cost state stays honest rather than optimistic: 'priced' only when BOTH
|
|
27
|
+
* operands are priced; 'unpriced' only when NEITHER carries a cost; any mix is
|
|
28
|
+
* 'estimated' — a real partial sum, explicitly flagged as incomplete.
|
|
29
|
+
*/
|
|
30
|
+
export function mergeWorkItemUsage(a, b) {
|
|
31
|
+
const sawReasoning = a.reasoningTokens !== undefined || b.reasoningTokens !== undefined;
|
|
32
|
+
const bothPriced = a.costState === 'priced' && b.costState === 'priced';
|
|
33
|
+
const neitherPriced = a.costUsd === null && b.costUsd === null;
|
|
34
|
+
return {
|
|
35
|
+
inputTokens: a.inputTokens + b.inputTokens,
|
|
36
|
+
outputTokens: a.outputTokens + b.outputTokens,
|
|
37
|
+
cacheReadTokens: a.cacheReadTokens + b.cacheReadTokens,
|
|
38
|
+
cacheWriteTokens: a.cacheWriteTokens + b.cacheWriteTokens,
|
|
39
|
+
reasoningTokens: sawReasoning ? (a.reasoningTokens ?? 0) + (b.reasoningTokens ?? 0) : undefined,
|
|
40
|
+
llmCallCount: a.llmCallCount + b.llmCallCount,
|
|
41
|
+
turnCount: a.turnCount + b.turnCount,
|
|
42
|
+
toolCallCount: a.toolCallCount + b.toolCallCount,
|
|
43
|
+
costUsd: a.costUsd !== null && b.costUsd !== null ? a.costUsd + b.costUsd : (a.costUsd ?? b.costUsd),
|
|
44
|
+
costState: bothPriced ? 'priced' : neitherPriced ? 'unpriced' : 'estimated',
|
|
45
|
+
};
|
|
46
|
+
}
|
|
15
47
|
export const CURRENT_WORKSTREAM_SCHEMA_VERSION = 1;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */
|
|
2
|
+
import { type CommitWorkingTreeResult } from '../agents/worktree.js';
|
|
3
|
+
import type { OrchestrationEvent, WorkItem, Workstream } from './types.js';
|
|
4
|
+
export interface WorktreeIsolationManagerDeps {
|
|
5
|
+
readonly projectRoot: string;
|
|
6
|
+
readonly emit: (event: OrchestrationEvent) => void;
|
|
7
|
+
readonly now?: (() => number) | undefined;
|
|
8
|
+
/** Bounds how many KEPT (conflict/dirty) worktrees are retained before oldest-first eviction. Default 20. */
|
|
9
|
+
readonly keptWorktreeCap?: number | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface ItemWorktreeHandle {
|
|
12
|
+
readonly path: string;
|
|
13
|
+
commit(message: string, paths?: string[]): Promise<CommitWorkingTreeResult>;
|
|
14
|
+
}
|
|
15
|
+
export interface WorktreeIsolationManager {
|
|
16
|
+
/** Ensure this item has a dedicated worktree (idempotent — created once, at first claim). Only meaningful when workstream.isolation === 'worktree'. */
|
|
17
|
+
ensureWorktree(workstream: Workstream, item: WorkItem): Promise<ItemWorktreeHandle>;
|
|
18
|
+
/**
|
|
19
|
+
* Enqueue a just-passed item's branch onto the sequential integration lane.
|
|
20
|
+
* Resolves once THIS item's attempt (merged/conflict/empty) and any
|
|
21
|
+
* resulting cleanup has settled. Callers that don't need to wait may let
|
|
22
|
+
* the returned promise run fire-and-forget (errors are caught internally —
|
|
23
|
+
* this never rejects).
|
|
24
|
+
*/
|
|
25
|
+
enqueueIntegration(workstream: Workstream, item: WorkItem): Promise<void>;
|
|
26
|
+
/** Fail/kill cleanup rule: remove the item's worktree if clean, else KEEP it (data safety). No-op if the item never got a worktree. Never throws. */
|
|
27
|
+
cleanupTerminated(workstream: Workstream, item: WorkItem): Promise<void>;
|
|
28
|
+
/** Synchronous orphan scan — see the module doc. Call once, right after registering an imported workstream, before start()/tick(). */
|
|
29
|
+
reconcileOrphans(workstream: Workstream): void;
|
|
30
|
+
}
|
|
31
|
+
export declare function itemWorktreeBranch(workstreamId: string, itemId: string): string;
|
|
32
|
+
export declare function createWorktreeIsolationManager(deps: WorktreeIsolationManagerDeps): WorktreeIsolationManager;
|
|
33
|
+
//# sourceMappingURL=worktree-isolation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worktree-isolation.d.ts","sourceRoot":"","sources":["../../../src/platform/orchestration/worktree-isolation.ts"],"names":[],"mappings":"AAAA,qFAAqF;AA+CrF,OAAO,EAAoB,KAAK,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAGvF,OAAO,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE3E,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACnD,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,MAAM,CAAC,GAAG,SAAS,CAAC;IAC1C,6GAA6G;IAC7G,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/C;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;CAC7E;AAED,MAAM,WAAW,wBAAwB;IACvC,uJ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