@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ControlPlaneRecentEvent, SharedApprovalRecord, SharedSessionInputRecord, SharedSessionMessage, SharedSessionRecord, SharedSessionSubmission, SteerSharedSessionMessageInput, SubmitSharedSessionMessageInput } from '../control-plane/index.js';
|
|
1
|
+
import type { ControlPlaneRecentEvent, RegisterSharedSessionInput, SharedApprovalRecord, SharedSessionInputRecord, SharedSessionMessage, SharedSessionRecord, SharedSessionRegisterResult, SharedSessionSubmission, SteerSharedSessionMessageInput, SubmitSharedSessionMessageInput } from '../control-plane/index.js';
|
|
2
2
|
import type { RequestSharedApprovalInput } from '../control-plane/index.js';
|
|
3
3
|
import type { PermissionPromptDecision } from '../permissions/prompt.js';
|
|
4
4
|
import { type AuthInspectionSnapshot } from './auth/inspection.js';
|
|
@@ -22,15 +22,30 @@ export interface OperatorSessionsClient {
|
|
|
22
22
|
list(limit?: number): readonly SharedSessionRecord[];
|
|
23
23
|
get(sessionId: string): SharedSessionRecord | null;
|
|
24
24
|
messages(sessionId: string, limit?: number): readonly SharedSessionMessage[];
|
|
25
|
-
inputs(sessionId: string, limit?: number
|
|
25
|
+
inputs(sessionId: string, limit?: number, options?: {
|
|
26
|
+
readonly state?: string | undefined;
|
|
27
|
+
readonly since?: number | undefined;
|
|
28
|
+
}): readonly SharedSessionInputRecord[];
|
|
26
29
|
ensureSession(input?: OperatorSessionEnsureInput): Promise<SharedSessionRecord>;
|
|
30
|
+
register(input: RegisterSharedSessionInput): Promise<SharedSessionRegisterResult>;
|
|
27
31
|
close(sessionId: string): Promise<SharedSessionRecord | null>;
|
|
28
32
|
reopen(sessionId: string): Promise<SharedSessionRecord | null>;
|
|
33
|
+
/** Detach a surface's participant/route from a session without closing it
|
|
34
|
+
* (detach != close != kill). Idempotent; see sessions.detach. */
|
|
35
|
+
detach(sessionId: string, surfaceId: string): Promise<SharedSessionRecord | null>;
|
|
36
|
+
/** Permanently remove a session (W5-S1: delete != close). Requires the
|
|
37
|
+
* session already closed — see sessions.delete. */
|
|
38
|
+
delete(sessionId: string): Promise<'deleted' | 'not-found' | 'active'>;
|
|
29
39
|
bindAgent(sessionId: string, agentId: string): Promise<SharedSessionRecord | null>;
|
|
30
40
|
submitMessage(input: SubmitSharedSessionMessageInput): Promise<SharedSessionSubmission>;
|
|
31
41
|
steerMessage(input: SteerSharedSessionMessageInput): Promise<SharedSessionSubmission>;
|
|
32
42
|
followUpMessage(input: SubmitSharedSessionMessageInput): Promise<SharedSessionSubmission>;
|
|
33
43
|
cancelInput(sessionId: string, inputId: string): Promise<SharedSessionInputRecord | null>;
|
|
44
|
+
/** A live surface marks a collected input delivered (`consumed:false`) or
|
|
45
|
+
* consumed/completed (`consumed:true`). See sessions.inputs.deliver. */
|
|
46
|
+
deliverInput(sessionId: string, inputId: string, options?: {
|
|
47
|
+
readonly consumed?: boolean | undefined;
|
|
48
|
+
}): Promise<SharedSessionInputRecord | null>;
|
|
34
49
|
}
|
|
35
50
|
export interface OperatorTasksClient {
|
|
36
51
|
snapshot(): UiTasksSnapshot;
|
|
@@ -49,6 +64,9 @@ export interface OperatorApprovalsClient {
|
|
|
49
64
|
readonly actor: string;
|
|
50
65
|
readonly actorSurface?: string | undefined;
|
|
51
66
|
readonly note?: string | undefined;
|
|
67
|
+
/** Optional per-hunk selection (edit-tool approvals) — the broker filters
|
|
68
|
+
* the approval's own edit list to these indices server-side. */
|
|
69
|
+
readonly selectedHunks?: readonly number[] | undefined;
|
|
52
70
|
}): Promise<SharedApprovalRecord | null>;
|
|
53
71
|
approve(approvalId: string, actor: string, actorSurface?: string, note?: string): Promise<SharedApprovalRecord | null>;
|
|
54
72
|
deny(approvalId: string, actor: string, actorSurface?: string, note?: string): Promise<SharedApprovalRecord | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator-client.d.ts","sourceRoot":"","sources":["../../../src/platform/runtime/operator-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,8BAA8B,EAC9B,+BAA+B,EAChC,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAC5E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eD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,sBAAsB,GAAG,cAAc,CA2HrF"}
|
|
@@ -18,15 +18,25 @@ export function createOperatorClient(services) {
|
|
|
18
18
|
list: (limit = 100) => services.sessionBroker.listSessions(normalizeLimit(limit)),
|
|
19
19
|
get: (sessionId) => services.sessionBroker.getSession(sessionId),
|
|
20
20
|
messages: (sessionId, limit = 100) => services.sessionBroker.getMessages(sessionId, normalizeLimit(limit)),
|
|
21
|
-
inputs: (sessionId, limit = 100) =>
|
|
21
|
+
inputs: (sessionId, limit = 100, options) => (options && (options.state !== undefined || options.since !== undefined))
|
|
22
|
+
? services.sessionBroker.getInputsSince(sessionId, {
|
|
23
|
+
...(options.state !== undefined ? { state: options.state } : {}),
|
|
24
|
+
...(options.since !== undefined ? { since: options.since } : {}),
|
|
25
|
+
limit: normalizeLimit(limit),
|
|
26
|
+
})
|
|
27
|
+
: services.sessionBroker.getInputs(sessionId, normalizeLimit(limit)),
|
|
22
28
|
ensureSession: (input = {}) => services.sessionBroker.ensureSession(input),
|
|
29
|
+
register: (input) => services.sessionBroker.register(input),
|
|
23
30
|
close: (sessionId) => services.sessionBroker.closeSession(sessionId),
|
|
24
31
|
reopen: (sessionId) => services.sessionBroker.reopenSession(sessionId),
|
|
32
|
+
detach: (sessionId, surfaceId) => services.sessionBroker.detachParticipant(sessionId, surfaceId),
|
|
33
|
+
delete: (sessionId) => services.sessionBroker.deleteSession(sessionId),
|
|
25
34
|
bindAgent: (sessionId, agentId) => services.sessionBroker.bindAgent(sessionId, agentId),
|
|
26
35
|
submitMessage: (input) => services.sessionBroker.submitMessage(input),
|
|
27
36
|
steerMessage: (input) => services.sessionBroker.steerMessage(input),
|
|
28
37
|
followUpMessage: (input) => services.sessionBroker.followUpMessage(input),
|
|
29
38
|
cancelInput: (sessionId, inputId) => services.sessionBroker.cancelInput(sessionId, inputId),
|
|
39
|
+
deliverInput: (sessionId, inputId, options = {}) => services.sessionBroker.markInputDelivered(sessionId, inputId, options),
|
|
30
40
|
};
|
|
31
41
|
const tasks = {
|
|
32
42
|
snapshot: () => services.readModels.tasks.getSnapshot(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/platform/runtime/provider-accounts/registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAGpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,cAAc,GAAG,eAAe,GAAG,cAAc,CAAC;AAC9F,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,cAAc,CAAC;AAEpG,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAC;IAC3D,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,qBAAqB,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC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AE,SAAS,qBAAqB,EAAE,CAAC;IACrD,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EAAE,YAAY,GAAG,iBAAiB,GAAG,eAAe,GAAG,iBAAiB,CAAC,CAAC;IAC1H,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAC;IACtE,QAAQ,CAAC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAAE,MAAM,GAAG,aAAa,GAAG,KAAK,GAAG,YAAY,CAAC,CAAC;IACvG,QAAQ,CAAC,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;CACtD;AAwCD,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,2BAA2B,GAChC,OAAO,CAAC,uBAAuB,CAAC,CAwOlC"}
|
|
@@ -43,7 +43,17 @@ function determineSubscriptionFreshness(expiresAt) {
|
|
|
43
43
|
export async function buildProviderAccountSnapshot(deps) {
|
|
44
44
|
const providerRegistry = deps.providerRegistry;
|
|
45
45
|
const allModels = providerRegistry.listModels();
|
|
46
|
-
|
|
46
|
+
// Read-only display path: an unresolved current model (e.g. a fresh isolated
|
|
47
|
+
// home whose pricing catalog has not hydrated, leaving the configured default
|
|
48
|
+
// with no materialized definition) must not turn this snapshot into a 500. Fall
|
|
49
|
+
// back to "no active provider" instead of letting getCurrentModel() throw.
|
|
50
|
+
let currentModel;
|
|
51
|
+
try {
|
|
52
|
+
currentModel = providerRegistry.getCurrentModel?.();
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
currentModel = undefined;
|
|
56
|
+
}
|
|
47
57
|
const apiKeys = await resolveApiKeys(deps.secretsManager);
|
|
48
58
|
const subscriptions = deps.subscriptionManager;
|
|
49
59
|
const builtinSubscriptionProviders = new Set(listBuiltinSubscriptionProviders().map((entry) => entry.provider));
|
|
@@ -23,6 +23,7 @@ import { WorkspaceCheckpointManager } from '../workspace/checkpoint/index.js';
|
|
|
23
23
|
import { MemoryRegistry } from '../state/memory-registry.js';
|
|
24
24
|
import { MemoryStore } from '../state/memory-store.js';
|
|
25
25
|
import { CodeIndexStore } from '../state/code-index-store.js';
|
|
26
|
+
import { CodeIndexReindexScheduler } from '../state/code-index-reindex.js';
|
|
26
27
|
import type { RuntimeEventBus } from './events/index.js';
|
|
27
28
|
import type { DomainDispatch, RuntimeStore } from './store/index.js';
|
|
28
29
|
import { DistributedRuntimeManager } from './remote/distributed-runtime-manager.js';
|
|
@@ -80,15 +81,14 @@ export interface RuntimeServicesOptions {
|
|
|
80
81
|
readonly panelManager?: PanelManagerLike | undefined;
|
|
81
82
|
readonly keybindingsManager?: KeybindingsManagerLike | undefined;
|
|
82
83
|
/**
|
|
83
|
-
* Opt-in: kick off the repo source-tree code index's initial build
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* many test fixtures that build RuntimeServices against a real directory)
|
|
88
|
-
* with an unrequested full source-tree walk. A real product entry point
|
|
89
|
-
* (an interactive session bootstrap) should pass `true`.
|
|
84
|
+
* Opt-in: kick off the repo source-tree code index's initial build (Wave-5
|
|
85
|
+
* wo802, W5.3 Stage A) right after construction. Fire-and-forget — never
|
|
86
|
+
* awaited, never blocks. Defaults off so building RuntimeServices never runs
|
|
87
|
+
* an unrequested source-tree walk. Real interactive entry points pass `true`.
|
|
90
88
|
*/
|
|
91
89
|
readonly autoStartCodeIndex?: boolean | undefined;
|
|
90
|
+
/** Override the broker store path (default: home-scoped durable store). */
|
|
91
|
+
readonly sessionStorePath?: string | undefined;
|
|
92
92
|
}
|
|
93
93
|
export interface RuntimeServices {
|
|
94
94
|
readonly workingDirectory: string;
|
|
@@ -130,6 +130,8 @@ export interface RuntimeServices {
|
|
|
130
130
|
* surprising for embedders that never asked for it.
|
|
131
131
|
*/
|
|
132
132
|
readonly codeIndexStore: CodeIndexStore;
|
|
133
|
+
/** Wave-5 Stage B tool-site incremental reindex scheduler (bound to codeIndexStore). */
|
|
134
|
+
readonly codeIndexReindexScheduler: CodeIndexReindexScheduler;
|
|
133
135
|
readonly serviceRegistry: ServiceRegistry;
|
|
134
136
|
readonly secretsManager: SecretsManager;
|
|
135
137
|
readonly subscriptionManager: SubscriptionManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../src/platform/runtime/services.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAwB,MAAM,wBAAwB,CAAC;AAC5G,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACzH,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../src/platform/runtime/services.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAwB,MAAM,wBAAwB,CAAC;AAC5G,OAAO,EAAE,q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YAAY,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpD;AAED,wBAAgB,gCAAgC,CAC9C,YAAY,EAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,WAAW,CAAC,EACjE,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE,YAAY,CAAC,GACvD,MAAM,IAAI,CAOZ;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,GAAG,eAAe,CAkkBtF"}
|
|
@@ -8,7 +8,7 @@ import { SubscriptionManager } from '../config/subscriptions.js';
|
|
|
8
8
|
import { AutomationDeliveryManager, AutomationManager, AutomationRouteStore } from '../automation/index.js';
|
|
9
9
|
import { ChannelPluginRegistry, ChannelPolicyManager, RouteBindingManager, SurfaceRegistry } from '../channels/index.js';
|
|
10
10
|
import { ChannelDeliveryRouter } from '../channels/delivery-router.js';
|
|
11
|
-
import { ApprovalBroker, GatewayMethodCatalog, SharedSessionBroker } from '../control-plane/index.js';
|
|
11
|
+
import { ApprovalBroker, GatewayMethodCatalog, SharedSessionBroker, registerW3S2GatewayMethods } from '../control-plane/index.js';
|
|
12
12
|
import { buildSharedSessionAgentSpawnRoutingInput } from '../control-plane/session-intents.js';
|
|
13
13
|
import { WatcherRegistry } from '../watchers/index.js';
|
|
14
14
|
import { ArtifactStore } from '../artifacts/index.js';
|
|
@@ -28,6 +28,7 @@ import { WorkspaceCheckpointManager } from '../workspace/checkpoint/index.js';
|
|
|
28
28
|
import { MemoryRegistry } from '../state/memory-registry.js';
|
|
29
29
|
import { MemoryStore } from '../state/memory-store.js';
|
|
30
30
|
import { CodeIndexStore } from '../state/code-index-store.js';
|
|
31
|
+
import { CodeIndexReindexScheduler } from '../state/code-index-reindex.js';
|
|
31
32
|
import { createDomainDispatch } from './store/index.js';
|
|
32
33
|
import { DistributedRuntimeManager } from './remote/distributed-runtime-manager.js';
|
|
33
34
|
import { RemoteRunnerRegistry, RemoteSupervisor } from './remote/index.js';
|
|
@@ -206,8 +207,9 @@ export function createRuntimeServices(options) {
|
|
|
206
207
|
const approvalBroker = new ApprovalBroker({
|
|
207
208
|
storePath: shellPaths.resolveProjectPath(surfaceRoot, 'control-plane', 'approvals.json'),
|
|
208
209
|
});
|
|
210
|
+
// ONE home-scoped durable session store; project is DATA on each record.
|
|
209
211
|
const sessionBroker = new SharedSessionBroker({
|
|
210
|
-
storePath: shellPaths.
|
|
212
|
+
storePath: options.sessionStorePath ?? shellPaths.resolveUserPath('control-plane', 'sessions.json'),
|
|
211
213
|
routeBindings,
|
|
212
214
|
agentStatusProvider: agentManager,
|
|
213
215
|
messageSender: agentMessageBus,
|
|
@@ -238,6 +240,15 @@ export function createRuntimeServices(options) {
|
|
|
238
240
|
if (options.autoStartCodeIndex) {
|
|
239
241
|
codeIndexStore.scheduleBuild();
|
|
240
242
|
}
|
|
243
|
+
// Wave-5 Stage B: tool-site incremental reindex. Gated on the SDK's autoStartCodeIndex opt-in
|
|
244
|
+
// (this library's storage.codeIndexEnabled analog) AND the built-state check inside the
|
|
245
|
+
// scheduler — an unbuilt index is a no-op either way.
|
|
246
|
+
const codeInjectionSettingEnabled = () => options.autoStartCodeIndex === true;
|
|
247
|
+
const codeIndexReindexScheduler = new CodeIndexReindexScheduler({
|
|
248
|
+
target: codeIndexStore,
|
|
249
|
+
workingDirectory,
|
|
250
|
+
isEnabled: codeInjectionSettingEnabled,
|
|
251
|
+
});
|
|
241
252
|
const deliveryManager = new AutomationDeliveryManager({
|
|
242
253
|
configManager,
|
|
243
254
|
secretsManager,
|
|
@@ -449,6 +460,9 @@ export function createRuntimeServices(options) {
|
|
|
449
460
|
remoteRunnerRegistry,
|
|
450
461
|
knowledgeService,
|
|
451
462
|
memoryRegistry,
|
|
463
|
+
codeIndex: codeIndexStore,
|
|
464
|
+
isCodeInjectionSettingEnabled: codeInjectionSettingEnabled,
|
|
465
|
+
codeIndexReindexScheduler,
|
|
452
466
|
archetypeLoader,
|
|
453
467
|
configManager,
|
|
454
468
|
providerRegistry,
|
|
@@ -477,8 +491,7 @@ export function createRuntimeServices(options) {
|
|
|
477
491
|
const pricing = providerRegistry.getCostFromCatalog(model);
|
|
478
492
|
return (usage.inputTokens * pricing.input + usage.outputTokens * pricing.output) / 1_000_000;
|
|
479
493
|
};
|
|
480
|
-
// Orchestration engine (Wave 4, wo701) — ships alongside wrfcController,
|
|
481
|
-
// untouched by this change. See the RuntimeServices interface comment.
|
|
494
|
+
// Orchestration engine (Wave 4, wo701) — ships alongside wrfcController, untouched by this change. See the RuntimeServices interface comment.
|
|
482
495
|
const orchestrationEngine = createOrchestrationEngine({
|
|
483
496
|
agentManager,
|
|
484
497
|
configManager,
|
|
@@ -506,6 +519,7 @@ export function createRuntimeServices(options) {
|
|
|
506
519
|
priceUsage,
|
|
507
520
|
codeIndexService: codeIndexStore,
|
|
508
521
|
});
|
|
522
|
+
registerW3S2GatewayMethods(gatewayMethods, { processRegistry, workspaceCheckpointManager, sessionBroker }); // W3-S2 (routes/register-w3-s2.ts)
|
|
509
523
|
return {
|
|
510
524
|
workingDirectory,
|
|
511
525
|
homeDirectory,
|
|
@@ -535,6 +549,7 @@ export function createRuntimeServices(options) {
|
|
|
535
549
|
memoryStore,
|
|
536
550
|
memoryRegistry,
|
|
537
551
|
codeIndexStore,
|
|
552
|
+
codeIndexReindexScheduler,
|
|
538
553
|
serviceRegistry,
|
|
539
554
|
secretsManager,
|
|
540
555
|
subscriptionManager,
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* client.ts — the SDK session-spine surface client.
|
|
3
|
+
*
|
|
4
|
+
* The in-process coordinator that mirrors a surface's OWN session identity
|
|
5
|
+
* (create / resume / heartbeat / close) into the daemon-hosted session spine.
|
|
6
|
+
* It sits NEXT TO a surface's local session truth, never replacing it: the local
|
|
7
|
+
* store stays the offline read-model; this client mirrors identity to the daemon
|
|
8
|
+
* and buffers ops when the daemon is unreachable.
|
|
9
|
+
*
|
|
10
|
+
* This is the ONE core extracted from two near-twin implementations — the TUI's
|
|
11
|
+
* typed-client version (`goodvibes-tui` src/runtime/session-spine-client.ts) and
|
|
12
|
+
* the agent's raw-REST version (`goodvibes-agent` src/runtime/session-spine-client.ts).
|
|
13
|
+
* The union of their behaviors is the spec; their differences are parameterized:
|
|
14
|
+
*
|
|
15
|
+
* - TRANSPORT is injected. The core builds a canonical
|
|
16
|
+
* {@link RegisterSharedSessionInput} and hands it to an injected
|
|
17
|
+
* {@link SpineTransport}; the adapter performs the real wire call (a typed SDK
|
|
18
|
+
* sessions client, or a hand-rolled version-tolerant REST mirror) and folds its
|
|
19
|
+
* result into a {@link SpineResult}. The core NEVER assumes a typed client
|
|
20
|
+
* exists — that is exactly why the agent, which compiles against a pinned npm
|
|
21
|
+
* SDK that may predate `sessions.register`, can still use this core.
|
|
22
|
+
* - ACTIVATION MODE is optional. Construct WITH a `transport` for
|
|
23
|
+
* live-immediately mode (the agent — live for the whole process lifetime), or
|
|
24
|
+
* WITHOUT one for dormant-until-`activate()` mode (the TUI — activated once its
|
|
25
|
+
* bootstrap adopts a compatible external daemon, deactivated when the mode is
|
|
26
|
+
* lost).
|
|
27
|
+
* - PARTICIPANT identity, origin `kind`, queue bound and heartbeat window are
|
|
28
|
+
* options with the verified defaults.
|
|
29
|
+
*
|
|
30
|
+
* Discipline (load-bearing for the interactive-latency budget):
|
|
31
|
+
* - Every public method (register / reopen / heartbeat / close /
|
|
32
|
+
* foldLegacyRecords) is fire-and-forget: it returns `void` SYNCHRONOUSLY and
|
|
33
|
+
* never throws into the caller, even when the wire call rejects. Session
|
|
34
|
+
* start/resume/heartbeat never block the render or turn path.
|
|
35
|
+
* - Before a transport is attached every op is queued, never dropped-on-the-floor
|
|
36
|
+
* and never attempted over a transport that does not exist. Attaching flushes
|
|
37
|
+
* the backlog.
|
|
38
|
+
* - Offline ops go into a bounded ring (drop-oldest); flush is idempotent because
|
|
39
|
+
* register is an upsert.
|
|
40
|
+
* - Heartbeat is debounced/coalesced to at most one wire call per window and omits
|
|
41
|
+
* the title so it never renames a titled session.
|
|
42
|
+
* - A timer-driven keepalive fires the heartbeat on a fixed cadence INDEPENDENT of
|
|
43
|
+
* render/turn activity, so a live-but-idle surface keeps its participant
|
|
44
|
+
* lastSeenAt fresh and never falls outside the daemon's freshness/reaper windows.
|
|
45
|
+
*/
|
|
46
|
+
import { logger } from '../../utils/logger.js';
|
|
47
|
+
import type { RegisterSharedSessionInput, SharedSessionKind, SharedSessionParticipant } from '../../control-plane/index.js';
|
|
48
|
+
/**
|
|
49
|
+
* The canonical TUI participant (TRANSPORT axis). Pass as the `participant` option
|
|
50
|
+
* when the surface is the operator terminal UI.
|
|
51
|
+
*/
|
|
52
|
+
export declare const TUI_SPINE_PARTICIPANT: Omit<SharedSessionParticipant, 'lastSeenAt'>;
|
|
53
|
+
/**
|
|
54
|
+
* The canonical agent participant (TRANSPORT axis). `surfaceKind` stays 'service';
|
|
55
|
+
* the record origin `kind` ('agent') is stamped by the REST mirror server-side, not
|
|
56
|
+
* here — so the agent leaves `recordKind` unset.
|
|
57
|
+
*/
|
|
58
|
+
export declare const AGENT_SPINE_PARTICIPANT: Omit<SharedSessionParticipant, 'lastSeenAt'>;
|
|
59
|
+
/** Honest reachability posture derived from this client's own wire attempts. */
|
|
60
|
+
export type SpineReachability = 'unknown' | 'online' | 'offline';
|
|
61
|
+
/**
|
|
62
|
+
* Outcome of a single injected-transport op, folding the two real backends' result
|
|
63
|
+
* vocabularies into one common core:
|
|
64
|
+
* - `'ok'` — the daemon applied it. Reachability → online; flush the queue.
|
|
65
|
+
* - `'offline'` — a transient connectivity fault (host unreachable). Reachability
|
|
66
|
+
* → offline; enqueue for idempotent replay on reconnect.
|
|
67
|
+
* - `'rejected'` — a DURABLE refusal (auth required / route missing / server error).
|
|
68
|
+
* NOT a connectivity fault: logged, NEVER enqueued (so it can't
|
|
69
|
+
* retry-forever), reachability left unchanged.
|
|
70
|
+
*/
|
|
71
|
+
export type SpineOutcome = 'ok' | 'offline' | 'rejected';
|
|
72
|
+
export interface SpineResult {
|
|
73
|
+
readonly outcome: SpineOutcome;
|
|
74
|
+
readonly error?: string | undefined;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The injected async transport. Structurally satisfied by a thin adapter over the
|
|
78
|
+
* SDK's typed HTTP sessions client (TUI) or over a hand-rolled REST mirror (agent).
|
|
79
|
+
* The core only ever calls these two methods and reads the folded {@link SpineResult}.
|
|
80
|
+
*/
|
|
81
|
+
export interface SpineTransport {
|
|
82
|
+
register(input: RegisterSharedSessionInput): Promise<SpineResult>;
|
|
83
|
+
close(sessionId: string): Promise<SpineResult>;
|
|
84
|
+
}
|
|
85
|
+
export interface SessionSpineRecord {
|
|
86
|
+
readonly sessionId: string;
|
|
87
|
+
readonly project: string;
|
|
88
|
+
readonly title?: string | undefined;
|
|
89
|
+
readonly userId?: string | undefined;
|
|
90
|
+
}
|
|
91
|
+
type SpineLogger = Pick<typeof logger, 'debug' | 'info'>;
|
|
92
|
+
export interface SessionSpineClientOptions {
|
|
93
|
+
/**
|
|
94
|
+
* The participant identity stamped onto every register/heartbeat (TRANSPORT axis).
|
|
95
|
+
* Required — each surface passes its own (e.g. {@link TUI_SPINE_PARTICIPANT} /
|
|
96
|
+
* {@link AGENT_SPINE_PARTICIPANT}).
|
|
97
|
+
*/
|
|
98
|
+
readonly participant: Omit<SharedSessionParticipant, 'lastSeenAt'>;
|
|
99
|
+
/**
|
|
100
|
+
* Attach the transport at construction for LIVE-IMMEDIATELY mode (the agent is
|
|
101
|
+
* live for the whole process lifetime). Omit for DORMANT-UNTIL-`activate()` mode
|
|
102
|
+
* (the TUI activates once its bootstrap adopts a compatible external daemon).
|
|
103
|
+
*/
|
|
104
|
+
readonly transport?: SpineTransport | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Origin record `kind` stamped into every built input. The TUI stamps `'tui'`;
|
|
107
|
+
* the agent leaves it unset (its REST mirror stamps `'agent'` server-side).
|
|
108
|
+
*/
|
|
109
|
+
readonly recordKind?: SharedSessionKind | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* Optional reachability probe backing {@link SessionSpineClient.probeReachability}
|
|
112
|
+
* (the agent's deferred-startup GET /status). Returns true when the host answered.
|
|
113
|
+
* Omitted for the TUI (whose reachability rides its wire calls). Runs OFF the
|
|
114
|
+
* interactive path.
|
|
115
|
+
*/
|
|
116
|
+
readonly probe?: (() => Promise<boolean>) | undefined;
|
|
117
|
+
readonly now?: () => number;
|
|
118
|
+
readonly queueLimit?: number;
|
|
119
|
+
readonly heartbeatMinIntervalMs?: number;
|
|
120
|
+
readonly log?: SpineLogger;
|
|
121
|
+
}
|
|
122
|
+
export declare class SessionSpineClient {
|
|
123
|
+
private readonly participant;
|
|
124
|
+
private readonly recordKind;
|
|
125
|
+
private readonly probeImpl;
|
|
126
|
+
private readonly now;
|
|
127
|
+
private readonly queueLimit;
|
|
128
|
+
private readonly heartbeatMinIntervalMs;
|
|
129
|
+
private readonly log;
|
|
130
|
+
private transport;
|
|
131
|
+
private reachability;
|
|
132
|
+
private readonly records;
|
|
133
|
+
private readonly queue;
|
|
134
|
+
private lastHeartbeatAt;
|
|
135
|
+
private heartbeatTimer;
|
|
136
|
+
private flushing;
|
|
137
|
+
/** The most recently registered/reopened session — the keepalive heartbeat target. */
|
|
138
|
+
private lastSessionId;
|
|
139
|
+
/**
|
|
140
|
+
* Timer-driven keepalive: fires the heartbeat on a fixed cadence INDEPENDENT of
|
|
141
|
+
* render/turn activity, so a live-but-render-silent surface keeps its participant
|
|
142
|
+
* lastSeenAt fresh. Each tick is just a heartbeat() call, so it rides the SAME
|
|
143
|
+
* bounded offline-queue/reconnect handling as every other op — no new retry loop,
|
|
144
|
+
* no faster-than-cadence attempts against a dead daemon.
|
|
145
|
+
*/
|
|
146
|
+
private keepaliveTimer;
|
|
147
|
+
constructor(options: SessionSpineClientOptions);
|
|
148
|
+
/** Honest reachability: 'unknown' until a wire call resolves, then online/offline. */
|
|
149
|
+
status(): SpineReachability;
|
|
150
|
+
/** Whether a transport is currently attached. */
|
|
151
|
+
get active(): boolean;
|
|
152
|
+
/** Current bounded offline-queue depth (for diagnostics / tests). */
|
|
153
|
+
get pendingOps(): number;
|
|
154
|
+
/** The session the keepalive heartbeat currently targets (diagnostics/tests). */
|
|
155
|
+
get keepaliveSessionId(): string | null;
|
|
156
|
+
/**
|
|
157
|
+
* The CANONICAL "which wire rows are mine" set: every sessionId this client
|
|
158
|
+
* has register()/reopen()'d and not yet close()'d, regardless of whatever id
|
|
159
|
+
* a caller's own local store separately uses for the same conceptual
|
|
160
|
+
* session. register()/reopen() send exactly the `sessionId` the caller
|
|
161
|
+
* passes in — this client never assumes that string also matches a local
|
|
162
|
+
* broker's own idea of the session's id. A cross-surface read facade (the
|
|
163
|
+
* SDK's SessionUnionCache) uses this to recognize its own wire mirror by
|
|
164
|
+
* the id ACTUALLY SENT, not by hoping a local reader's id happens to agree.
|
|
165
|
+
*/
|
|
166
|
+
get mirroredSessionIds(): ReadonlySet<string>;
|
|
167
|
+
/**
|
|
168
|
+
* DORMANT-MODE activation: attach the transport once a compatible external daemon
|
|
169
|
+
* has been adopted. Flushes anything queued while dormant, starts the keepalive.
|
|
170
|
+
* Reachability stays 'unknown' until the first wire call resolves.
|
|
171
|
+
*/
|
|
172
|
+
activate(transport: SpineTransport): void;
|
|
173
|
+
/**
|
|
174
|
+
* Detach the transport (daemon mode resolved to non-external, or was lost). Ops
|
|
175
|
+
* continue to be queued (bounded, drop-oldest) rather than dropped.
|
|
176
|
+
*/
|
|
177
|
+
deactivate(reason: string): void;
|
|
178
|
+
/** CREATE: fire-and-forget initial registration (title stamped once). */
|
|
179
|
+
register(record: SessionSpineRecord): void;
|
|
180
|
+
/** RESUME: fire-and-forget reopen (reopen:true, no title) — the only reopen path. */
|
|
181
|
+
reopen(record: SessionSpineRecord): void;
|
|
182
|
+
/**
|
|
183
|
+
* HEARTBEAT: debounced re-register, coalesced to one wire call per window, no title,
|
|
184
|
+
* no reopen. Safe to call on every turn/render tick — internally a no-op unless the
|
|
185
|
+
* window has elapsed.
|
|
186
|
+
*/
|
|
187
|
+
heartbeat(sessionId: string): void;
|
|
188
|
+
/** CLOSE: best-effort, fire-and-forget; tolerate a racing daemon stop. */
|
|
189
|
+
close(sessionId: string): void;
|
|
190
|
+
/**
|
|
191
|
+
* LEGACY FOLD: register each per-project record; a record whose id is in `closedIds`
|
|
192
|
+
* is registered then closed so a locally-closed session STAYS closed in the daemon
|
|
193
|
+
* (honest history). Idempotent — register is an upsert; closing an already-closed
|
|
194
|
+
* record is a no-op.
|
|
195
|
+
*/
|
|
196
|
+
foldLegacyRecords(records: readonly SessionSpineRecord[], closedIds: ReadonlySet<string>): void;
|
|
197
|
+
/** Reachability probe — runs OFF the interactive path (deferred startup). Flushes on
|
|
198
|
+
* success. A no-op returning the current status when no `probe` option was supplied. */
|
|
199
|
+
probeReachability(): Promise<SpineReachability>;
|
|
200
|
+
/** Clears the pending heartbeat + keepalive timers; call on shutdown. */
|
|
201
|
+
dispose(): void;
|
|
202
|
+
private startKeepalive;
|
|
203
|
+
private stopKeepalive;
|
|
204
|
+
private cacheHeartbeatRecord;
|
|
205
|
+
private buildInput;
|
|
206
|
+
private withFreshLastSeen;
|
|
207
|
+
private dispatchRegister;
|
|
208
|
+
private runRegister;
|
|
209
|
+
private runClose;
|
|
210
|
+
private enqueue;
|
|
211
|
+
private flush;
|
|
212
|
+
}
|
|
213
|
+
export interface FoldLegacySpineStoreOptions {
|
|
214
|
+
readonly storePath: string;
|
|
215
|
+
readonly markerPath: string;
|
|
216
|
+
readonly project: string;
|
|
217
|
+
readonly now?: () => number;
|
|
218
|
+
readonly log?: SpineLogger;
|
|
219
|
+
}
|
|
220
|
+
export interface FoldLegacySpineStoreResult {
|
|
221
|
+
readonly folded: number;
|
|
222
|
+
readonly skipped: boolean;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Reads a surface's OWN project-scoped control-plane sessions.json and folds each
|
|
226
|
+
* record into the daemon via the client (register upsert; closed records also
|
|
227
|
+
* closed). Writes a marker file so subsequent runs are a no-op. Register is
|
|
228
|
+
* idempotent, so even a marker-less re-run is safe. Only folds the store for the
|
|
229
|
+
* project it is invoked from — the per-project discovery scope is documented, not
|
|
230
|
+
* silently "complete" across every project a surface has ever run in.
|
|
231
|
+
*/
|
|
232
|
+
export declare function foldLegacySpineStore(client: Pick<SessionSpineClient, 'foldLegacyRecords'>, options: FoldLegacySpineStoreOptions): FoldLegacySpineStoreResult;
|
|
233
|
+
export {};
|
|
234
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/platform/runtime/session-spine/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,KAAK,EACV,0BAA0B,EAC1B,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,8BAA8B,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,IAAI,CAAC,wBAAwB,EAAE,YAAY,CAI9E,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,IAAI,CAAC,wBAAwB,EAAE,YAAY,CAIhF,CAAC;AAEF,gFAAgF;AAChF,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEjE;;;;;;;;;GASG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,SAAS,GAAG,UAAU,CAAC;AAEzD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,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