@pellux/goodvibes-sdk 0.37.2 → 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/communication.d.ts +21 -1
- package/dist/events/communication.d.ts.map +1 -1
- package/dist/events/surfaces.d.ts +25 -3
- package/dist/events/surfaces.d.ts.map +1 -1
- package/dist/events/surfaces.js +22 -1
- package/dist/events/workflows.d.ts +7 -6
- package/dist/events/workflows.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/platform/agents/archetypes.d.ts.map +1 -1
- package/dist/platform/agents/archetypes.js +7 -0
- package/dist/platform/agents/index.d.ts +1 -0
- package/dist/platform/agents/index.d.ts.map +1 -1
- package/dist/platform/agents/index.js +1 -0
- package/dist/platform/agents/message-bus-core.d.ts +7 -0
- package/dist/platform/agents/message-bus-core.d.ts.map +1 -1
- package/dist/platform/agents/message-bus-core.js +2 -1
- package/dist/platform/agents/orchestrator-runner.d.ts +50 -1
- package/dist/platform/agents/orchestrator-runner.d.ts.map +1 -1
- package/dist/platform/agents/orchestrator-runner.js +172 -7
- package/dist/platform/agents/orchestrator.d.ts +78 -6
- package/dist/platform/agents/orchestrator.d.ts.map +1 -1
- package/dist/platform/agents/orchestrator.js +95 -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 +192 -0
- package/dist/platform/agents/turn-knowledge-injection.d.ts.map +1 -0
- package/dist/platform/agents/turn-knowledge-injection.js +269 -0
- 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 +46 -0
- package/dist/platform/agents/wrfc-controller.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-controller.js +213 -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 +18 -0
- package/dist/platform/config/manager.d.ts.map +1 -1
- package/dist/platform/config/manager.js +36 -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/adaptive-planner.d.ts +50 -0
- package/dist/platform/core/adaptive-planner.d.ts.map +1 -1
- package/dist/platform/core/adaptive-planner.js +49 -0
- 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 +2 -0
- package/dist/platform/core/index.d.ts.map +1 -1
- package/dist/platform/core/index.js +2 -0
- package/dist/platform/core/orchestrator-runtime.d.ts +31 -0
- 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 +35 -1
- package/dist/platform/core/orchestrator-turn-loop.d.ts.map +1 -1
- package/dist/platform/core/orchestrator-turn-loop.js +121 -3
- package/dist/platform/core/orchestrator.d.ts +67 -0
- package/dist/platform/core/orchestrator.d.ts.map +1 -1
- package/dist/platform/core/orchestrator.js +89 -1
- 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 +204 -0
- package/dist/platform/core/plan-proposal.d.ts.map +1 -0
- package/dist/platform/core/plan-proposal.js +296 -0
- 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/knowledge-api.d.ts +26 -0
- package/dist/platform/knowledge/knowledge-api.d.ts.map +1 -1
- package/dist/platform/knowledge/knowledge-api.js +11 -0
- package/dist/platform/knowledge/project-planning/service.d.ts +14 -1
- package/dist/platform/knowledge/project-planning/service.d.ts.map +1 -1
- package/dist/platform/knowledge/project-planning/service.js +77 -0
- package/dist/platform/knowledge/project-planning/types.d.ts +32 -0
- package/dist/platform/knowledge/project-planning/types.d.ts.map +1 -1
- package/dist/platform/orchestration/bookkeeping.d.ts +12 -0
- package/dist/platform/orchestration/bookkeeping.d.ts.map +1 -0
- package/dist/platform/orchestration/bookkeeping.js +91 -0
- package/dist/platform/orchestration/budget.d.ts +22 -0
- package/dist/platform/orchestration/budget.d.ts.map +1 -0
- package/dist/platform/orchestration/budget.js +35 -0
- package/dist/platform/orchestration/cancellation.d.ts +31 -0
- package/dist/platform/orchestration/cancellation.d.ts.map +1 -0
- package/dist/platform/orchestration/cancellation.js +25 -0
- package/dist/platform/orchestration/controller-compat.d.ts +46 -0
- package/dist/platform/orchestration/controller-compat.d.ts.map +1 -0
- package/dist/platform/orchestration/controller-compat.js +27 -0
- package/dist/platform/orchestration/dirty-guard.d.ts +32 -0
- package/dist/platform/orchestration/dirty-guard.d.ts.map +1 -0
- package/dist/platform/orchestration/dirty-guard.js +147 -0
- package/dist/platform/orchestration/engine.d.ts +82 -0
- package/dist/platform/orchestration/engine.d.ts.map +1 -0
- package/dist/platform/orchestration/engine.js +623 -0
- package/dist/platform/orchestration/index.d.ts +20 -0
- package/dist/platform/orchestration/index.d.ts.map +1 -0
- package/dist/platform/orchestration/index.js +11 -0
- package/dist/platform/orchestration/persistence.d.ts +24 -0
- package/dist/platform/orchestration/persistence.d.ts.map +1 -0
- package/dist/platform/orchestration/persistence.js +179 -0
- package/dist/platform/orchestration/phase-runner.d.ts +114 -0
- package/dist/platform/orchestration/phase-runner.d.ts.map +1 -0
- package/dist/platform/orchestration/phase-runner.js +347 -0
- 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 +64 -0
- package/dist/platform/orchestration/scheduler.d.ts.map +1 -0
- package/dist/platform/orchestration/scheduler.js +73 -0
- package/dist/platform/orchestration/types.d.ts +535 -0
- package/dist/platform/orchestration/types.d.ts.map +1 -0
- package/dist/platform/orchestration/types.js +47 -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/communication.d.ts +11 -0
- package/dist/platform/runtime/emitters/communication.d.ts.map +1 -1
- package/dist/platform/runtime/emitters/communication.js +9 -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 +56 -1
- package/dist/platform/runtime/fleet/adapters/agent.d.ts +56 -0
- package/dist/platform/runtime/fleet/adapters/agent.d.ts.map +1 -0
- package/dist/platform/runtime/fleet/adapters/agent.js +143 -0
- package/dist/platform/runtime/fleet/adapters/automation.d.ts +30 -0
- package/dist/platform/runtime/fleet/adapters/automation.d.ts.map +1 -0
- package/dist/platform/runtime/fleet/adapters/automation.js +41 -0
- package/dist/platform/runtime/fleet/adapters/background-process.d.ts +12 -0
- package/dist/platform/runtime/fleet/adapters/background-process.d.ts.map +1 -0
- package/dist/platform/runtime/fleet/adapters/background-process.js +46 -0
- package/dist/platform/runtime/fleet/adapters/code-index.d.ts +21 -0
- package/dist/platform/runtime/fleet/adapters/code-index.d.ts.map +1 -0
- package/dist/platform/runtime/fleet/adapters/code-index.js +44 -0
- package/dist/platform/runtime/fleet/adapters/orchestration.d.ts +69 -0
- package/dist/platform/runtime/fleet/adapters/orchestration.d.ts.map +1 -0
- package/dist/platform/runtime/fleet/adapters/orchestration.js +329 -0
- package/dist/platform/runtime/fleet/adapters/schedule.d.ts +14 -0
- package/dist/platform/runtime/fleet/adapters/schedule.d.ts.map +1 -0
- package/dist/platform/runtime/fleet/adapters/schedule.js +28 -0
- package/dist/platform/runtime/fleet/adapters/trigger.d.ts +12 -0
- package/dist/platform/runtime/fleet/adapters/trigger.d.ts.map +1 -0
- package/dist/platform/runtime/fleet/adapters/trigger.js +22 -0
- package/dist/platform/runtime/fleet/adapters/watcher.d.ts +13 -0
- package/dist/platform/runtime/fleet/adapters/watcher.d.ts.map +1 -0
- package/dist/platform/runtime/fleet/adapters/watcher.js +47 -0
- package/dist/platform/runtime/fleet/adapters/workflow.d.ts +11 -0
- package/dist/platform/runtime/fleet/adapters/workflow.d.ts.map +1 -0
- package/dist/platform/runtime/fleet/adapters/workflow.js +34 -0
- package/dist/platform/runtime/fleet/adapters/wrfc.d.ts +35 -0
- package/dist/platform/runtime/fleet/adapters/wrfc.d.ts.map +1 -0
- package/dist/platform/runtime/fleet/adapters/wrfc.js +275 -0
- package/dist/platform/runtime/fleet/index.d.ts +10 -0
- package/dist/platform/runtime/fleet/index.d.ts.map +1 -0
- package/dist/platform/runtime/fleet/index.js +6 -0
- package/dist/platform/runtime/fleet/registry.d.ts +113 -0
- package/dist/platform/runtime/fleet/registry.d.ts.map +1 -0
- package/dist/platform/runtime/fleet/registry.js +664 -0
- package/dist/platform/runtime/fleet/types.d.ts +199 -0
- package/dist/platform/runtime/fleet/types.d.ts.map +1 -0
- package/dist/platform/runtime/fleet/types.js +2 -0
- package/dist/platform/runtime/operator-client.d.ts +20 -2
- package/dist/platform/runtime/operator-client.d.ts.map +1 -1
- package/dist/platform/runtime/operator-client.js +11 -1
- package/dist/platform/runtime/provider-accounts/registry.d.ts.map +1 -1
- package/dist/platform/runtime/provider-accounts/registry.js +11 -1
- package/dist/platform/runtime/runtime-knowledge-api.d.ts +1 -1
- package/dist/platform/runtime/runtime-knowledge-api.d.ts.map +1 -1
- package/dist/platform/runtime/runtime-knowledge-api.js +1 -0
- package/dist/platform/runtime/services.d.ts +48 -0
- package/dist/platform/runtime/services.d.ts.map +1 -1
- package/dist/platform/runtime/services.js +95 -2
- package/dist/platform/runtime/session-spine/client.d.ts +234 -0
- package/dist/platform/runtime/session-spine/client.d.ts.map +1 -0
- package/dist/platform/runtime/session-spine/client.js +449 -0
- package/dist/platform/runtime/session-spine/index.d.ts +12 -0
- package/dist/platform/runtime/session-spine/index.d.ts.map +1 -0
- package/dist/platform/runtime/session-spine/index.js +11 -0
- package/dist/platform/runtime/session-spine/union-cache.d.ts +225 -0
- package/dist/platform/runtime/session-spine/union-cache.d.ts.map +1 -0
- package/dist/platform/runtime/session-spine/union-cache.js +333 -0
- package/dist/platform/runtime/shell-command-ops.d.ts +3 -1
- package/dist/platform/runtime/shell-command-ops.d.ts.map +1 -1
- package/dist/platform/runtime/transports/daemon-http-client-validators.d.ts.map +1 -1
- package/dist/platform/runtime/transports/daemon-http-client-validators.js +22 -0
- package/dist/platform/runtime/transports/daemon-http-client.d.ts.map +1 -1
- package/dist/platform/runtime/transports/daemon-http-client.js +25 -2
- package/dist/platform/runtime/transports/http-types.d.ts +9 -2
- package/dist/platform/runtime/transports/http-types.d.ts.map +1 -1
- package/dist/platform/state/canonical-memory.d.ts +95 -0
- package/dist/platform/state/canonical-memory.d.ts.map +1 -0
- package/dist/platform/state/canonical-memory.js +155 -0
- package/dist/platform/state/code-index-chunking.d.ts +49 -0
- package/dist/platform/state/code-index-chunking.d.ts.map +1 -0
- package/dist/platform/state/code-index-chunking.js +111 -0
- package/dist/platform/state/code-index-db.d.ts +53 -0
- package/dist/platform/state/code-index-db.d.ts.map +1 -0
- package/dist/platform/state/code-index-db.js +101 -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 +175 -0
- package/dist/platform/state/code-index-store.d.ts.map +1 -0
- package/dist/platform/state/code-index-store.js +620 -0
- package/dist/platform/state/index.d.ts +12 -2
- package/dist/platform/state/index.d.ts.map +1 -1
- package/dist/platform/state/index.js +6 -1
- package/dist/platform/state/knowledge-injection.d.ts +23 -0
- package/dist/platform/state/knowledge-injection.d.ts.map +1 -1
- package/dist/platform/state/knowledge-injection.js +34 -19
- 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 +1 -13
- package/dist/platform/state/memory-vector-store.d.ts.map +1 -1
- package/dist/platform/state/memory-vector-store.js +18 -39
- package/dist/platform/state/sqlite-store.d.ts +2 -0
- package/dist/platform/state/sqlite-store.d.ts.map +1 -1
- package/dist/platform/state/sqlite-store.js +4 -0
- package/dist/platform/state/sqlite-vec-loader.d.ts +25 -0
- package/dist/platform/state/sqlite-vec-loader.d.ts.map +1 -0
- package/dist/platform/state/sqlite-vec-loader.js +43 -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 +140 -1
- package/dist/platform/tools/agent/manager.d.ts.map +1 -1
- package/dist/platform/tools/agent/manager.js +143 -1
- 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 +161 -49
- package/dist/platform/tools/exec/schema.d.ts +3 -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/fetch/runtime.d.ts +7 -0
- package/dist/platform/tools/fetch/runtime.d.ts.map +1 -1
- package/dist/platform/tools/fetch/runtime.js +8 -6
- package/dist/platform/tools/index.d.ts +2 -0
- package/dist/platform/tools/index.d.ts.map +1 -1
- package/dist/platform/tools/index.js +2 -0
- package/dist/platform/tools/registry.d.ts +9 -3
- package/dist/platform/tools/registry.d.ts.map +1 -1
- package/dist/platform/tools/registry.js +9 -3
- package/dist/platform/tools/state/index.d.ts +9 -0
- package/dist/platform/tools/state/index.d.ts.map +1 -1
- package/dist/platform/tools/state/index.js +60 -3
- package/dist/platform/types/foundation-contract.d.ts +1 -1
- package/dist/platform/types/foundation-contract.d.ts.map +1 -1
- package/dist/platform/types/index.d.ts +1 -1
- package/dist/platform/types/index.d.ts.map +1 -1
- package/dist/platform/types/tools.d.ts +14 -1
- package/dist/platform/types/tools.d.ts.map +1 -1
- package/dist/platform/version.js +1 -1
- package/package.json +29 -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
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
* POST /api/companion/chat/sessions
|
|
8
8
|
* GET /api/companion/chat/sessions/:sessionId
|
|
9
9
|
* PATCH /api/companion/chat/sessions/:sessionId
|
|
10
|
-
*
|
|
10
|
+
* POST /api/companion/chat/sessions/:sessionId/close (soft close — history preserved)
|
|
11
|
+
* DELETE /api/companion/chat/sessions/:sessionId (hard delete — record permanently removed)
|
|
11
12
|
* POST /api/companion/chat/sessions/:sessionId/messages
|
|
12
13
|
* GET /api/companion/chat/sessions/:sessionId/messages
|
|
13
14
|
* GET /api/companion/chat/sessions/:sessionId/events (SSE)
|
|
@@ -16,6 +17,7 @@
|
|
|
16
17
|
* caller — DaemonHttpRouter.handleRequest already validates auth before
|
|
17
18
|
* dispatching to API routes).
|
|
18
19
|
*/
|
|
20
|
+
import { SDKErrorCodes } from '@pellux/goodvibes-errors';
|
|
19
21
|
// ---------------------------------------------------------------------------
|
|
20
22
|
// Route dispatch — called from DaemonHttpRouter.dispatchApiRoutes
|
|
21
23
|
// ---------------------------------------------------------------------------
|
|
@@ -47,6 +49,10 @@ export async function dispatchCompanionChatRoutes(req, context) {
|
|
|
47
49
|
if (!sub && req.method === 'PATCH') {
|
|
48
50
|
return handleUpdateSession(req, sessionId, context);
|
|
49
51
|
}
|
|
52
|
+
// POST /api/companion/chat/sessions/:sessionId/close
|
|
53
|
+
if (sub === 'close' && req.method === 'POST') {
|
|
54
|
+
return handleCloseSession(sessionId, context);
|
|
55
|
+
}
|
|
50
56
|
// DELETE /api/companion/chat/sessions/:sessionId
|
|
51
57
|
if (!sub && req.method === 'DELETE') {
|
|
52
58
|
return handleDeleteSession(sessionId, context);
|
|
@@ -95,6 +101,10 @@ async function handleCreateSession(req, context) {
|
|
|
95
101
|
return Response.json({ error: 'No provider or model configured. Set a current model before creating a companion chat session.', code: 'NO_MODEL_CONFIGURED' }, { status: 400 });
|
|
96
102
|
}
|
|
97
103
|
const session = context.chatManager.createSession(input);
|
|
104
|
+
// Drain the best-effort broker mirror before responding so /api/sessions
|
|
105
|
+
// reflects this session synchronously, matching CompanionBrokerSync's
|
|
106
|
+
// documented contract (see companion-chat-broker-sync.ts).
|
|
107
|
+
await context.chatManager.flushBrokerSync();
|
|
98
108
|
return Response.json({ sessionId: session.id, createdAt: session.createdAt, session }, { status: 201 });
|
|
99
109
|
}
|
|
100
110
|
// ---------------------------------------------------------------------------
|
|
@@ -192,6 +202,9 @@ async function handleUpdateSession(req, sessionId, context) {
|
|
|
192
202
|
}
|
|
193
203
|
try {
|
|
194
204
|
const session = context.chatManager.updateSession(sessionId, input);
|
|
205
|
+
// Drain the best-effort broker mirror before responding — an update
|
|
206
|
+
// heartbeats the shared record (see CompanionBrokerSync.registerSession).
|
|
207
|
+
await context.chatManager.flushBrokerSync();
|
|
195
208
|
return Response.json({ session });
|
|
196
209
|
}
|
|
197
210
|
catch (err) {
|
|
@@ -201,15 +214,35 @@ async function handleUpdateSession(req, sessionId, context) {
|
|
|
201
214
|
}
|
|
202
215
|
}
|
|
203
216
|
// ---------------------------------------------------------------------------
|
|
204
|
-
//
|
|
217
|
+
// POST /api/companion/chat/sessions/:sessionId/close
|
|
205
218
|
// ---------------------------------------------------------------------------
|
|
206
|
-
async function
|
|
219
|
+
async function handleCloseSession(sessionId, context) {
|
|
207
220
|
const session = context.chatManager.closeSession(sessionId);
|
|
208
221
|
if (!session) {
|
|
209
222
|
return Response.json({ error: 'Session not found', code: 'SESSION_NOT_FOUND' }, { status: 404 });
|
|
210
223
|
}
|
|
224
|
+
// Drain the best-effort broker mirror before responding so /api/sessions
|
|
225
|
+
// reflects the close synchronously (matches CompanionBrokerSync's docs).
|
|
226
|
+
await context.chatManager.flushBrokerSync();
|
|
211
227
|
return Response.json({ sessionId: session.id, status: session.status });
|
|
212
228
|
}
|
|
229
|
+
// ---------------------------------------------------------------------------
|
|
230
|
+
// DELETE /api/companion/chat/sessions/:sessionId (W5-S1: a real hard delete)
|
|
231
|
+
// ---------------------------------------------------------------------------
|
|
232
|
+
async function handleDeleteSession(sessionId, context) {
|
|
233
|
+
try {
|
|
234
|
+
const result = await context.chatManager.deleteSession(sessionId);
|
|
235
|
+
// Drain the best-effort broker mirror before responding so /api/sessions
|
|
236
|
+
// no longer shows the session by the time this response returns.
|
|
237
|
+
await context.chatManager.flushBrokerSync();
|
|
238
|
+
return Response.json(result);
|
|
239
|
+
}
|
|
240
|
+
catch (err) {
|
|
241
|
+
const e = err;
|
|
242
|
+
const status = e.status ?? 500;
|
|
243
|
+
return Response.json({ error: e.message ?? 'Internal error', code: e.code ?? 'INTERNAL_ERROR' }, { status });
|
|
244
|
+
}
|
|
245
|
+
}
|
|
213
246
|
/**
|
|
214
247
|
* Read the message content from an incoming POST body.
|
|
215
248
|
* Returns empty string when neither field is present — the caller must
|
|
@@ -325,7 +358,7 @@ async function handleGetEvents(req, sessionId, context) {
|
|
|
325
358
|
return Response.json({ error: 'Session not found', code: 'SESSION_NOT_FOUND' }, { status: 404 });
|
|
326
359
|
}
|
|
327
360
|
if (session.status === 'closed') {
|
|
328
|
-
return Response.json({ error: 'Session is closed', code:
|
|
361
|
+
return Response.json({ error: 'Session is closed', code: SDKErrorCodes.SESSION_CLOSED }, { status: 410 });
|
|
329
362
|
}
|
|
330
363
|
// Delegate to the caller-provided SSE stream opener which wires up the
|
|
331
364
|
// gateway live-client registration and returns an SSE Response.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* credential-status.ts
|
|
3
|
+
*
|
|
4
|
+
* Promotes the internal SecretsManager to a secret-FREE status source for the
|
|
5
|
+
* daemon's `credentials.get` wire method (W6-C1 / E7 config sharing).
|
|
6
|
+
*
|
|
7
|
+
* The returned provider reports whether each credential in the shared store is
|
|
8
|
+
* configured and usable — it NEVER exposes the plaintext value. `usable` is a
|
|
9
|
+
* real in-process resolution attempt (env → store → secret-ref), reported only
|
|
10
|
+
* as a boolean, so a configured-but-unresolvable reference (e.g. a broken
|
|
11
|
+
* `op://` ref) is honestly `configured: true, usable: false`.
|
|
12
|
+
*
|
|
13
|
+
* Enumeration is over STORED keys only (SecretsManager.listDetailed filtered to
|
|
14
|
+
* non-env sources) — never a `process.env` dump — so it cannot leak the names of
|
|
15
|
+
* unrelated environment variables. A caller-named single-key probe (`get`) may
|
|
16
|
+
* consult env for that one named key only.
|
|
17
|
+
*/
|
|
18
|
+
import type { CredentialStatusProviderLike } from '@pellux/goodvibes-daemon-sdk';
|
|
19
|
+
import type { SecretsManager } from './secrets.js';
|
|
20
|
+
/** The SecretsManager surface this adapter needs (keeps callers free to inject a stub). */
|
|
21
|
+
type SecretsMetadataSource = Pick<SecretsManager, 'get' | 'list' | 'listDetailed'>;
|
|
22
|
+
/**
|
|
23
|
+
* Wrap a SecretsManager (the daemon's shared store) as a secret-free credential
|
|
24
|
+
* status provider suitable for the `credentials.get` route context.
|
|
25
|
+
*/
|
|
26
|
+
export declare function createCredentialStatusProvider(secrets: SecretsMetadataSource): CredentialStatusProviderLike;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=credential-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-status.d.ts","sourceRoot":"","sources":["../../../src/platform/config/credential-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,4BAA4B,EAE7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,2FAA2F;AAC3F,KAAK,qBAAqB,GAAG,IAAI,CAAC,cAAc,EAAE,KAAK,GAAG,MAAM,GAAG,cAAc,CAAC,CAAC;AAWnF;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,qBAAqB,GAC7B,4BAA4B,CA6C9B"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* credential-status.ts
|
|
3
|
+
*
|
|
4
|
+
* Promotes the internal SecretsManager to a secret-FREE status source for the
|
|
5
|
+
* daemon's `credentials.get` wire method (W6-C1 / E7 config sharing).
|
|
6
|
+
*
|
|
7
|
+
* The returned provider reports whether each credential in the shared store is
|
|
8
|
+
* configured and usable — it NEVER exposes the plaintext value. `usable` is a
|
|
9
|
+
* real in-process resolution attempt (env → store → secret-ref), reported only
|
|
10
|
+
* as a boolean, so a configured-but-unresolvable reference (e.g. a broken
|
|
11
|
+
* `op://` ref) is honestly `configured: true, usable: false`.
|
|
12
|
+
*
|
|
13
|
+
* Enumeration is over STORED keys only (SecretsManager.listDetailed filtered to
|
|
14
|
+
* non-env sources) — never a `process.env` dump — so it cannot leak the names of
|
|
15
|
+
* unrelated environment variables. A caller-named single-key probe (`get`) may
|
|
16
|
+
* consult env for that one named key only.
|
|
17
|
+
*/
|
|
18
|
+
async function resolveUsable(secrets, key) {
|
|
19
|
+
try {
|
|
20
|
+
const value = await secrets.get(key);
|
|
21
|
+
return value !== null && value.length > 0;
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Wrap a SecretsManager (the daemon's shared store) as a secret-free credential
|
|
29
|
+
* status provider suitable for the `credentials.get` route context.
|
|
30
|
+
*/
|
|
31
|
+
export function createCredentialStatusProvider(secrets) {
|
|
32
|
+
return {
|
|
33
|
+
async list() {
|
|
34
|
+
const detailed = await secrets.listDetailed();
|
|
35
|
+
// STORED keys only — filter out the bulk env enumeration so we never leak
|
|
36
|
+
// the names of unrelated environment variables over the wire.
|
|
37
|
+
const stored = detailed.filter((record) => record.source !== 'env');
|
|
38
|
+
const records = [];
|
|
39
|
+
for (const record of stored) {
|
|
40
|
+
records.push({
|
|
41
|
+
key: record.key,
|
|
42
|
+
configured: true,
|
|
43
|
+
usable: await resolveUsable(secrets, record.key),
|
|
44
|
+
source: record.source,
|
|
45
|
+
scope: record.scope,
|
|
46
|
+
secure: record.secure,
|
|
47
|
+
overriddenByEnv: record.overriddenByEnv,
|
|
48
|
+
...(record.refSource ? { refSource: record.refSource } : {}),
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return records;
|
|
52
|
+
},
|
|
53
|
+
async get(key) {
|
|
54
|
+
const detailed = await secrets.listDetailed();
|
|
55
|
+
// A named probe MAY consult env for this one caller-named key. Prefer a
|
|
56
|
+
// stored record; fall back to an env-backed record for the same name.
|
|
57
|
+
const match = detailed.find((record) => record.key === key && record.source !== 'env') ??
|
|
58
|
+
detailed.find((record) => record.key === key) ??
|
|
59
|
+
null;
|
|
60
|
+
if (!match) {
|
|
61
|
+
return { key, configured: false, usable: false, source: 'none', scope: 'none', secure: false, overriddenByEnv: false };
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
key: match.key,
|
|
65
|
+
configured: true,
|
|
66
|
+
usable: await resolveUsable(secrets, key),
|
|
67
|
+
source: match.source,
|
|
68
|
+
scope: match.scope,
|
|
69
|
+
secure: match.secure,
|
|
70
|
+
overriddenByEnv: match.overriddenByEnv,
|
|
71
|
+
...(match.refSource ? { refSource: match.refSource } : {}),
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
}
|
|
@@ -11,12 +11,36 @@ export type { GoodVibesConfig, ConfigKey, ConfigValue, ConfigSetting, Permission
|
|
|
11
11
|
export { DEFAULT_CONFIG, CONFIG_KEYS, CONFIG_SCHEMA, isValidConfigKey } from './schema.js';
|
|
12
12
|
export type { PersistedFlagState } from './schema-types.js';
|
|
13
13
|
export { ConfigError } from '../types/errors.js';
|
|
14
|
+
export { migrateDangerDaemonAlias } from './migrations.js';
|
|
15
|
+
export type { DangerDaemonMigrationResult } from './migrations.js';
|
|
14
16
|
import { ConfigManager } from './manager.js';
|
|
15
17
|
import type { GoodVibesConfig } from './schema.js';
|
|
16
18
|
export declare function getConfigSnapshot(configManager: Pick<ConfigManager, 'getRaw'>): Readonly<GoodVibesConfig>;
|
|
17
19
|
export declare function getConfiguredModelId(configManager: Pick<ConfigManager, 'get'>): string;
|
|
18
20
|
export declare function getConfiguredEmbeddingProviderId(configManager: Pick<ConfigManager, 'get'>): string;
|
|
19
21
|
export declare function isAutoApproveEnabled(configManager: Pick<ConfigManager, 'get'>): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Minimal reader shape for {@link resolveDaemonEnabled}. Any object exposing a
|
|
24
|
+
* `get(key)` that returns the relevant config value satisfies it, so both
|
|
25
|
+
* the full {@link ConfigManager} and the narrow `HostServicesConfig` used by
|
|
26
|
+
* bootstrap-services qualify without a circular import.
|
|
27
|
+
*/
|
|
28
|
+
export interface DaemonEnabledReader {
|
|
29
|
+
get(key: 'daemon.enabled'): boolean | string | number | undefined;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Resolve whether the local session daemon should run.
|
|
33
|
+
*
|
|
34
|
+
* `daemon.enabled` governs (default `true` — daemon on by default,
|
|
35
|
+
* loopback-bound). The deprecated `danger.daemon` alias that used to
|
|
36
|
+
* override this was removed in Wave 6 (its explicit-`false` off-switch is
|
|
37
|
+
* preserved for existing users by a one-time config migration onto
|
|
38
|
+
* `daemon.enabled`, applied at {@link ConfigManager.load} — see migrations.ts).
|
|
39
|
+
*
|
|
40
|
+
* This lives in the shared SDK config module (not TUI-local) so the standalone
|
|
41
|
+
* daemon CLI and the TUI's adopt-or-start path resolve the flag identically.
|
|
42
|
+
*/
|
|
43
|
+
export declare function resolveDaemonEnabled(config: DaemonEnabledReader): boolean;
|
|
20
44
|
export declare function getWorkingDirectory(configManager: Pick<ConfigManager, 'getWorkingDirectory'>): string | null;
|
|
21
45
|
export declare function getConfiguredSystemPrompt(configManager: Pick<ConfigManager, 'get'>): string | undefined;
|
|
22
46
|
export { getConfiguredApiKeys, resolveApiKeys } from './api-keys.js';
|
|
@@ -27,6 +51,7 @@ export type { HelperChatOptions, HelperModelDeps, HelperTask, HelperUsage, Resol
|
|
|
27
51
|
export { beginOpenAICodexLogin, exchangeOpenAICodexCode, refreshOpenAICodexToken, OPENAI_CODEX_AUTHORIZE_URL, OPENAI_CODEX_CLIENT_ID, OPENAI_CODEX_REDIRECT_URI, OPENAI_CODEX_TOKEN_URL, } from './openai-codex-auth.js';
|
|
28
52
|
export type { OpenAICodexLoginStart, OpenAICodexTokenResult } from './openai-codex-auth.js';
|
|
29
53
|
export * from './secret-refs.js';
|
|
54
|
+
export { createCredentialStatusProvider } from './credential-status.js';
|
|
30
55
|
export { SecretsManager } from './secrets.js';
|
|
31
56
|
export type { SecretDeleteOptions, SecretRecord, SecretScope, SecretSource, SecretStorageMedium, SecretStorageMode, SecretStorageReview, SecretWriteOptions, SecretsManagerOptions, } from './secrets.js';
|
|
32
57
|
export { ServiceRegistry } from './service-registry.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/platform/config/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACxK,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC3F,YAAY,EAA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jB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,mBAAmB,uBAAuB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,YAAY,EACV,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACjF,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,WAAW,GACZ,MAAM,eAAe,CAAC"}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
export { ConfigManager } from './manager.js';
|
|
9
9
|
export { DEFAULT_CONFIG, CONFIG_KEYS, CONFIG_SCHEMA, isValidConfigKey } from './schema.js';
|
|
10
10
|
export { ConfigError } from '../types/errors.js';
|
|
11
|
+
export { migrateDangerDaemonAlias } from './migrations.js';
|
|
11
12
|
import { readFileSync } from 'fs';
|
|
12
13
|
import { ConfigManager } from './manager.js';
|
|
13
14
|
export function getConfigSnapshot(configManager) {
|
|
@@ -22,6 +23,22 @@ export function getConfiguredEmbeddingProviderId(configManager) {
|
|
|
22
23
|
export function isAutoApproveEnabled(configManager) {
|
|
23
24
|
return configManager.get('behavior.autoApprove');
|
|
24
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Resolve whether the local session daemon should run.
|
|
28
|
+
*
|
|
29
|
+
* `daemon.enabled` governs (default `true` — daemon on by default,
|
|
30
|
+
* loopback-bound). The deprecated `danger.daemon` alias that used to
|
|
31
|
+
* override this was removed in Wave 6 (its explicit-`false` off-switch is
|
|
32
|
+
* preserved for existing users by a one-time config migration onto
|
|
33
|
+
* `daemon.enabled`, applied at {@link ConfigManager.load} — see migrations.ts).
|
|
34
|
+
*
|
|
35
|
+
* This lives in the shared SDK config module (not TUI-local) so the standalone
|
|
36
|
+
* daemon CLI and the TUI's adopt-or-start path resolve the flag identically.
|
|
37
|
+
*/
|
|
38
|
+
export function resolveDaemonEnabled(config) {
|
|
39
|
+
const enabled = config.get('daemon.enabled');
|
|
40
|
+
return typeof enabled === 'boolean' ? enabled : true;
|
|
41
|
+
}
|
|
25
42
|
export function getWorkingDirectory(configManager) {
|
|
26
43
|
return configManager.getWorkingDirectory();
|
|
27
44
|
}
|
|
@@ -36,6 +53,7 @@ export { createOAuthLocalListener } from './oauth-local-listener.js';
|
|
|
36
53
|
export { HelperModel, HelperModelUnavailableError, HelperRouter } from './helper-model.js';
|
|
37
54
|
export { beginOpenAICodexLogin, exchangeOpenAICodexCode, refreshOpenAICodexToken, OPENAI_CODEX_AUTHORIZE_URL, OPENAI_CODEX_CLIENT_ID, OPENAI_CODEX_REDIRECT_URI, OPENAI_CODEX_TOKEN_URL, } from './openai-codex-auth.js';
|
|
38
55
|
export * from './secret-refs.js';
|
|
56
|
+
export { createCredentialStatusProvider } from './credential-status.js';
|
|
39
57
|
export { SecretsManager } from './secrets.js';
|
|
40
58
|
export { ServiceRegistry } from './service-registry.js';
|
|
41
59
|
export { SubscriptionManager } from './subscriptions.js';
|
|
@@ -95,6 +95,15 @@ export declare class ConfigManager {
|
|
|
95
95
|
saveProject(): void;
|
|
96
96
|
/** Load config from disk: global then project (project wins). Deep-merges with defaults. */
|
|
97
97
|
load(): void;
|
|
98
|
+
/**
|
|
99
|
+
* Removal-of-`danger.daemon` migration (Wave 6): rewrite an explicit legacy
|
|
100
|
+
* `danger.daemon = false` onto `daemon.enabled = false` before the raw JSON
|
|
101
|
+
* is merged with defaults, so the removed alias's two-year off-switch is
|
|
102
|
+
* honored rather than silently flipped on. Reports honestly via the logger
|
|
103
|
+
* when it actually rewrites a value; a no-op migration (alias absent, or
|
|
104
|
+
* `= true`) stays silent. See migrations.ts for the full contract.
|
|
105
|
+
*/
|
|
106
|
+
private applyDangerDaemonMigration;
|
|
98
107
|
/**
|
|
99
108
|
* Merge a partial patch into a config category and auto-save.
|
|
100
109
|
*
|
|
@@ -103,6 +112,15 @@ export declare class ConfigManager {
|
|
|
103
112
|
* The patch is shallow-merged into the existing category value.
|
|
104
113
|
*/
|
|
105
114
|
mergeCategory<C extends keyof GoodVibesConfig>(category: C, patch: Partial<GoodVibesConfig[C]>): void;
|
|
115
|
+
/**
|
|
116
|
+
* Remove a key from an object-shaped category and auto-save.
|
|
117
|
+
*
|
|
118
|
+
* mergeCategory can only set keys (undefined patch values are skipped, and
|
|
119
|
+
* getCategory returns a clone, so delete-then-merge is a silent no-op) —
|
|
120
|
+
* clearing an override, e.g. a feature-flag entry back to its default,
|
|
121
|
+
* requires this explicit removal.
|
|
122
|
+
*/
|
|
123
|
+
removeCategoryKey<C extends keyof GoodVibesConfig>(category: C, key: string): void;
|
|
106
124
|
/**
|
|
107
125
|
* Reset a specific key to its default, or reset all config.
|
|
108
126
|
* Saves to disk after reset.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../src/platform/config/manager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAI1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../src/platform/config/manager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAI1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAQxD,wFAAwF;AACxF,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;IAC5B,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,C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AAC,SAAS,MAAM,eAAe,EAAE,QAAQ,EAAE,CAAC,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAIvF,+FAA+F;IAC/F,MAAM,IAAI,QAAQ,CAAC,eAAe,CAAC;IAInC,8BAA8B;IAC9B,SAAS,IAAI,aAAa,EAAE;IAI5B,0DAA0D;IAC1D,IAAI,IAAI,IAAI;IAKZ,yEAAyE;IACzE,WAAW,IAAI,IAAI;IAQnB,4FAA4F;IAC5F,IAAI,IAAI,IAAI;IA2BZ;;;;;;;OAOG;IACH,OAAO,CAAC,0BAA0B;IAWlC;;;;;;OAMG;IACH,aAAa,CAAC,CAAC,SAAS,MAAM,eAAe,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;IAWrG;;;;;;;OAOG;IACH,iBAAiB,CAAC,CAAC,SAAS,MAAM,eAAe,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAOlF;;;OAGG;IACH,KAAK,CAAC,GAAG,CAAC,EAAE,SAAS,GAAG,IAAI;CAY7B"}
|
|
@@ -7,6 +7,7 @@ import { getManagedSettingLock } from '../runtime/settings/control-plane.js';
|
|
|
7
7
|
import { requireSurfaceRoot, resolveSurfaceDirectory, resolveSurfaceSharedFile } from '../runtime/surface-root.js';
|
|
8
8
|
import { summarizeError } from '../utils/error-display.js';
|
|
9
9
|
import { toRecord } from '../utils/record-coerce.js';
|
|
10
|
+
import { migrateDangerDaemonAlias } from './migrations.js';
|
|
10
11
|
const DEFAULT_CONFIG_SNAPSHOT = structuredClone(DEFAULT_CONFIG);
|
|
11
12
|
const PERMISSION_TOOL_KEYS = new Set(Object.keys(DEFAULT_CONFIG.permissions.tools));
|
|
12
13
|
function cloneDefaultConfig() {
|
|
@@ -279,7 +280,8 @@ export class ConfigManager {
|
|
|
279
280
|
try {
|
|
280
281
|
const raw = readFileSync(this.configPath, 'utf-8');
|
|
281
282
|
const parsed = JSON.parse(raw);
|
|
282
|
-
|
|
283
|
+
const migrated = this.applyDangerDaemonMigration(parsed, this.configPath);
|
|
284
|
+
this.config = sanitizeConfigShape(deepMerge(cloneDefaultConfig(), migrated));
|
|
283
285
|
}
|
|
284
286
|
catch (err) {
|
|
285
287
|
throw new ConfigError(`Global config load failed for ${this.configPath}: ${summarizeError(err)}`);
|
|
@@ -290,13 +292,30 @@ export class ConfigManager {
|
|
|
290
292
|
try {
|
|
291
293
|
const raw = readFileSync(this.projectConfigPath, 'utf-8');
|
|
292
294
|
const parsed = JSON.parse(raw);
|
|
293
|
-
|
|
295
|
+
const migrated = this.applyDangerDaemonMigration(parsed, this.projectConfigPath);
|
|
296
|
+
this.config = sanitizeConfigShape(deepMerge(this.config, migrated));
|
|
294
297
|
}
|
|
295
298
|
catch (err) {
|
|
296
299
|
throw new ConfigError(`Project config load failed for ${this.projectConfigPath}: ${summarizeError(err)}`);
|
|
297
300
|
}
|
|
298
301
|
}
|
|
299
302
|
}
|
|
303
|
+
/**
|
|
304
|
+
* Removal-of-`danger.daemon` migration (Wave 6): rewrite an explicit legacy
|
|
305
|
+
* `danger.daemon = false` onto `daemon.enabled = false` before the raw JSON
|
|
306
|
+
* is merged with defaults, so the removed alias's two-year off-switch is
|
|
307
|
+
* honored rather than silently flipped on. Reports honestly via the logger
|
|
308
|
+
* when it actually rewrites a value; a no-op migration (alias absent, or
|
|
309
|
+
* `= true`) stays silent. See migrations.ts for the full contract.
|
|
310
|
+
*/
|
|
311
|
+
applyDangerDaemonMigration(parsed, sourcePath) {
|
|
312
|
+
const result = migrateDangerDaemonAlias(parsed);
|
|
313
|
+
if (result.rewroteDaemonEnabledFalse) {
|
|
314
|
+
logger.info(`Migrated deprecated 'danger.daemon: false' to 'daemon.enabled: false' (${sourcePath}). ` +
|
|
315
|
+
`The legacy off-switch is preserved; 'danger.daemon' is no longer read.`);
|
|
316
|
+
}
|
|
317
|
+
return result.config;
|
|
318
|
+
}
|
|
300
319
|
/**
|
|
301
320
|
* Merge a partial patch into a config category and auto-save.
|
|
302
321
|
*
|
|
@@ -314,6 +333,21 @@ export class ConfigManager {
|
|
|
314
333
|
}
|
|
315
334
|
this.save();
|
|
316
335
|
}
|
|
336
|
+
/**
|
|
337
|
+
* Remove a key from an object-shaped category and auto-save.
|
|
338
|
+
*
|
|
339
|
+
* mergeCategory can only set keys (undefined patch values are skipped, and
|
|
340
|
+
* getCategory returns a clone, so delete-then-merge is a silent no-op) —
|
|
341
|
+
* clearing an override, e.g. a feature-flag entry back to its default,
|
|
342
|
+
* requires this explicit removal.
|
|
343
|
+
*/
|
|
344
|
+
removeCategoryKey(category, key) {
|
|
345
|
+
const current = this.config[category];
|
|
346
|
+
if (!(key in current))
|
|
347
|
+
return;
|
|
348
|
+
delete current[key];
|
|
349
|
+
this.save();
|
|
350
|
+
}
|
|
317
351
|
/**
|
|
318
352
|
* Reset a specific key to its default, or reset all config.
|
|
319
353
|
* Saves to disk after reset.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One-shot config migrations applied to raw on-disk JSON before it is
|
|
3
|
+
* deep-merged with defaults in {@link ConfigManager.load}.
|
|
4
|
+
*
|
|
5
|
+
* Wave 6 removes the deprecated `danger.daemon` alias from the schema
|
|
6
|
+
* (see docs/decisions/2026-07-05-daemon-by-default.md). Once the key leaves
|
|
7
|
+
* `CONFIG_SCHEMA`/`ConfigKey`, a stray `danger.daemon` value in an existing
|
|
8
|
+
* settings.json would otherwise be silently ignored by the deep-merge (the
|
|
9
|
+
* default config's `danger` object no longer declares a `daemon` field to
|
|
10
|
+
* merge onto) — which would flip a user's explicit two-year off-switch
|
|
11
|
+
* (`danger.daemon = false`) back to daemon-ON the moment they upgrade. This
|
|
12
|
+
* migration closes that hazard by rewriting the explicit choice onto
|
|
13
|
+
* `daemon.enabled` BEFORE the merge, so the alias is honored exactly once
|
|
14
|
+
* and then retired.
|
|
15
|
+
*/
|
|
16
|
+
export interface DangerDaemonMigrationResult {
|
|
17
|
+
/** True if the raw config carried a `danger.daemon` key that this migration touched. */
|
|
18
|
+
readonly migrated: boolean;
|
|
19
|
+
/** The (possibly rewritten) raw config, safe to deep-merge with defaults. */
|
|
20
|
+
readonly config: Record<string, unknown>;
|
|
21
|
+
/**
|
|
22
|
+
* Present only when an explicit `danger.daemon = false` was rewritten onto
|
|
23
|
+
* `daemon.enabled = false` — the one case that changes resolved behavior.
|
|
24
|
+
* Callers can use this to report the migration honestly (e.g. a log line).
|
|
25
|
+
*/
|
|
26
|
+
readonly rewroteDaemonEnabledFalse: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Migrate a raw parsed settings object: `danger.daemon` (a deprecated alias
|
|
30
|
+
* for `daemon.enabled`, removal scheduled Wave 6) is removed, and if it was
|
|
31
|
+
* explicitly `false`, that choice is preserved onto `daemon.enabled = false`.
|
|
32
|
+
*
|
|
33
|
+
* Precedence mirrors the alias it replaces (see the removed
|
|
34
|
+
* `resolveDaemonEnabled` alias branch): an explicit `danger.daemon` value
|
|
35
|
+
* always wins over whatever `daemon.enabled` currently holds in the same
|
|
36
|
+
* file, because the alias historically took precedence.
|
|
37
|
+
*
|
|
38
|
+
* Idempotent: config that has already been migrated (or never had the alias)
|
|
39
|
+
* comes back unchanged — `migrated: false`, same reference.
|
|
40
|
+
*
|
|
41
|
+
* - `danger.daemon === false` -> `daemon.enabled = false` (rewritten), alias removed.
|
|
42
|
+
* - `danger.daemon === true` -> alias removed, no rewrite (daemon.enabled
|
|
43
|
+
* already defaults `true`; nothing to preserve).
|
|
44
|
+
* - non-boolean junk under the key -> alias removed, no rewrite.
|
|
45
|
+
* - absent / not an object -> unchanged.
|
|
46
|
+
*/
|
|
47
|
+
export declare function migrateDangerDaemonAlias(parsed: Record<string, unknown>): DangerDaemonMigrationResult;
|
|
48
|
+
//# sourceMappingURL=migrations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../src/platform/config/migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,MAAM,WAAW,2BAA2B;IAC1C,wFAAwF;IACxF,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,6EAA6E;IAC7E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC;;;;OAIG;IACH,QAAQ,CAAC,yBAAyB,EAAE,OAAO,CAAC;CAC7C;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,2BAA2B,CAmBrG"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One-shot config migrations applied to raw on-disk JSON before it is
|
|
3
|
+
* deep-merged with defaults in {@link ConfigManager.load}.
|
|
4
|
+
*
|
|
5
|
+
* Wave 6 removes the deprecated `danger.daemon` alias from the schema
|
|
6
|
+
* (see docs/decisions/2026-07-05-daemon-by-default.md). Once the key leaves
|
|
7
|
+
* `CONFIG_SCHEMA`/`ConfigKey`, a stray `danger.daemon` value in an existing
|
|
8
|
+
* settings.json would otherwise be silently ignored by the deep-merge (the
|
|
9
|
+
* default config's `danger` object no longer declares a `daemon` field to
|
|
10
|
+
* merge onto) — which would flip a user's explicit two-year off-switch
|
|
11
|
+
* (`danger.daemon = false`) back to daemon-ON the moment they upgrade. This
|
|
12
|
+
* migration closes that hazard by rewriting the explicit choice onto
|
|
13
|
+
* `daemon.enabled` BEFORE the merge, so the alias is honored exactly once
|
|
14
|
+
* and then retired.
|
|
15
|
+
*/
|
|
16
|
+
function isPlainObject(value) {
|
|
17
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Migrate a raw parsed settings object: `danger.daemon` (a deprecated alias
|
|
21
|
+
* for `daemon.enabled`, removal scheduled Wave 6) is removed, and if it was
|
|
22
|
+
* explicitly `false`, that choice is preserved onto `daemon.enabled = false`.
|
|
23
|
+
*
|
|
24
|
+
* Precedence mirrors the alias it replaces (see the removed
|
|
25
|
+
* `resolveDaemonEnabled` alias branch): an explicit `danger.daemon` value
|
|
26
|
+
* always wins over whatever `daemon.enabled` currently holds in the same
|
|
27
|
+
* file, because the alias historically took precedence.
|
|
28
|
+
*
|
|
29
|
+
* Idempotent: config that has already been migrated (or never had the alias)
|
|
30
|
+
* comes back unchanged — `migrated: false`, same reference.
|
|
31
|
+
*
|
|
32
|
+
* - `danger.daemon === false` -> `daemon.enabled = false` (rewritten), alias removed.
|
|
33
|
+
* - `danger.daemon === true` -> alias removed, no rewrite (daemon.enabled
|
|
34
|
+
* already defaults `true`; nothing to preserve).
|
|
35
|
+
* - non-boolean junk under the key -> alias removed, no rewrite.
|
|
36
|
+
* - absent / not an object -> unchanged.
|
|
37
|
+
*/
|
|
38
|
+
export function migrateDangerDaemonAlias(parsed) {
|
|
39
|
+
const danger = parsed['danger'];
|
|
40
|
+
if (!isPlainObject(danger) || !('daemon' in danger)) {
|
|
41
|
+
return { migrated: false, config: parsed, rewroteDaemonEnabledFalse: false };
|
|
42
|
+
}
|
|
43
|
+
const alias = danger['daemon'];
|
|
44
|
+
const { daemon: _removedAlias, ...restDanger } = danger;
|
|
45
|
+
const nextConfig = { ...parsed, danger: restDanger };
|
|
46
|
+
if (alias === false) {
|
|
47
|
+
const existingDaemon = isPlainObject(parsed['daemon']) ? parsed['daemon'] : {};
|
|
48
|
+
nextConfig['daemon'] = { ...existingDaemon, enabled: false };
|
|
49
|
+
return { migrated: true, config: nextConfig, rewroteDaemonEnabledFalse: true };
|
|
50
|
+
}
|
|
51
|
+
// alias === true, or non-boolean junk: nothing to preserve — daemon.enabled
|
|
52
|
+
// already defaults true, and a non-boolean value was never a valid override.
|
|
53
|
+
return { migrated: true, config: nextConfig, rewroteDaemonEnabledFalse: false };
|
|
54
|
+
}
|
|
@@ -57,6 +57,12 @@ export declare const coreConfigDefaults: {
|
|
|
57
57
|
maxActiveAgents: number;
|
|
58
58
|
maxDepth: number;
|
|
59
59
|
};
|
|
60
|
+
planner: {
|
|
61
|
+
decomposition: string;
|
|
62
|
+
maxTurns: number;
|
|
63
|
+
tokenCeiling: number;
|
|
64
|
+
wallTimeoutMs: number;
|
|
65
|
+
};
|
|
60
66
|
sandbox: {
|
|
61
67
|
replIsolation: string;
|
|
62
68
|
mcpIsolation: string;
|
|
@@ -88,8 +94,11 @@ export declare const coreConfigDefaults: {
|
|
|
88
94
|
release: {
|
|
89
95
|
channel: string;
|
|
90
96
|
};
|
|
97
|
+
daemon: {
|
|
98
|
+
enabled: boolean;
|
|
99
|
+
embedInProcess: boolean;
|
|
100
|
+
};
|
|
91
101
|
danger: {
|
|
92
|
-
daemon: boolean;
|
|
93
102
|
httpListener: boolean;
|
|
94
103
|
};
|
|
95
104
|
tools: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-domain-core.d.ts","sourceRoot":"","sources":["../../../src/platform/config/schema-domain-core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,uBAAuB,EAA4B,MAAM,oBAAoB,CAAC;AAE5F,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"schema-domain-core.d.ts","sourceRoot":"","sources":["../../../src/platform/config/schema-domain-core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,uBAAuB,EAA4B,MAAM,oBAAoB,CAAC;AAE5F,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2I9B,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,uBAAuB,EA0b3D,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,uBAAuB,EAmK3D,CAAC"}
|
|
@@ -57,6 +57,12 @@ export const coreConfigDefaults = {
|
|
|
57
57
|
maxActiveAgents: 8,
|
|
58
58
|
maxDepth: 0,
|
|
59
59
|
},
|
|
60
|
+
planner: {
|
|
61
|
+
decomposition: 'agent',
|
|
62
|
+
maxTurns: 6,
|
|
63
|
+
tokenCeiling: 120_000,
|
|
64
|
+
wallTimeoutMs: 120_000, // 60s starved reasoning models that think silently before emitting (live replay: planner hit the wall at Turn 3 and fell back)
|
|
65
|
+
},
|
|
60
66
|
sandbox: {
|
|
61
67
|
replIsolation: 'shared-vm',
|
|
62
68
|
mcpIsolation: 'disabled',
|
|
@@ -88,8 +94,11 @@ export const coreConfigDefaults = {
|
|
|
88
94
|
release: {
|
|
89
95
|
channel: 'stable',
|
|
90
96
|
},
|
|
97
|
+
daemon: {
|
|
98
|
+
enabled: true,
|
|
99
|
+
embedInProcess: false,
|
|
100
|
+
},
|
|
91
101
|
danger: {
|
|
92
|
-
daemon: false,
|
|
93
102
|
httpListener: false,
|
|
94
103
|
},
|
|
95
104
|
tools: {
|
|
@@ -396,6 +405,34 @@ export const coreHeadConfigSettings = [
|
|
|
396
405
|
description: 'Maximum recursive orchestration depth: 0=disabled, higher values allow deeper bounded recursion',
|
|
397
406
|
...numRange(0, 5),
|
|
398
407
|
},
|
|
408
|
+
{
|
|
409
|
+
key: 'planner.decomposition',
|
|
410
|
+
type: 'enum',
|
|
411
|
+
default: 'agent',
|
|
412
|
+
description: "How /workstream decomposes a goal into work items: 'agent' spawns a read-only planning agent (with automatic fallback to the heuristic path on any failure); 'heuristic' forces the deterministic single-item path and never spawns an agent",
|
|
413
|
+
enumValues: ['agent', 'heuristic'],
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
key: 'planner.maxTurns',
|
|
417
|
+
type: 'number',
|
|
418
|
+
default: 6,
|
|
419
|
+
description: 'Maximum turns the planning-decomposition agent may take before it is stopped and the heuristic path is used',
|
|
420
|
+
...numRange(1, 20),
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
key: 'planner.tokenCeiling',
|
|
424
|
+
type: 'number',
|
|
425
|
+
default: 120_000,
|
|
426
|
+
description: 'Total token budget for the planning-decomposition agent; exceeding it stops the agent and falls back to the heuristic path',
|
|
427
|
+
...numRange(1_000, 2_000_000),
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
key: 'planner.wallTimeoutMs',
|
|
431
|
+
type: 'number',
|
|
432
|
+
default: 120_000,
|
|
433
|
+
description: 'Wall-clock timeout (ms) for the planning-decomposition agent; exceeding it cancels the agent and falls back to the heuristic path',
|
|
434
|
+
...numRange(1_000, 600_000),
|
|
435
|
+
},
|
|
399
436
|
{
|
|
400
437
|
key: 'sandbox.replIsolation',
|
|
401
438
|
type: 'enum',
|
|
@@ -548,10 +585,16 @@ export const coreHeadConfigSettings = [
|
|
|
548
585
|
];
|
|
549
586
|
export const coreTailConfigSettings = [
|
|
550
587
|
{
|
|
551
|
-
key: '
|
|
588
|
+
key: 'daemon.enabled',
|
|
589
|
+
type: 'boolean',
|
|
590
|
+
default: true,
|
|
591
|
+
description: 'Run the local session daemon (background service that hosts the shared session broker and companion chat). Default on; binds loopback (127.0.0.1) only. Set false to run fully local with no background service.',
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
key: 'daemon.embedInProcess',
|
|
552
595
|
type: 'boolean',
|
|
553
596
|
default: false,
|
|
554
|
-
description: '
|
|
597
|
+
description: 'NOT RECOMMENDED. When true, and no daemon is already running, host the daemon INSIDE this surface process instead of spawning it as a detached background process. In-process embedding couples the daemon lifetime to this one surface: exiting the surface kills the daemon and every other surface sharing it (single point of failure). Default false — the surface spawns a detached, reboot-independent daemon (install it as a system service via POST /api/service/install on the daemon HTTP API).',
|
|
555
598
|
},
|
|
556
599
|
{
|
|
557
600
|
key: 'danger.httpListener',
|