@pellux/goodvibes-sdk 0.38.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/contracts/artifacts/operator-contract.json +4468 -916
- package/dist/daemon.d.ts +2 -0
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +4 -0
- package/dist/events/communication.d.ts +1 -1
- package/dist/events/surfaces.d.ts +25 -3
- package/dist/events/surfaces.d.ts.map +1 -1
- package/dist/events/surfaces.js +22 -1
- package/dist/events/workflows.d.ts +7 -6
- package/dist/events/workflows.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/platform/agents/archetypes.d.ts.map +1 -1
- package/dist/platform/agents/archetypes.js +7 -0
- package/dist/platform/agents/index.d.ts +1 -0
- package/dist/platform/agents/index.d.ts.map +1 -1
- package/dist/platform/agents/index.js +1 -0
- package/dist/platform/agents/orchestrator-runner.d.ts +16 -3
- package/dist/platform/agents/orchestrator-runner.d.ts.map +1 -1
- package/dist/platform/agents/orchestrator-runner.js +20 -6
- package/dist/platform/agents/orchestrator.d.ts +42 -10
- package/dist/platform/agents/orchestrator.d.ts.map +1 -1
- package/dist/platform/agents/orchestrator.js +68 -20
- package/dist/platform/agents/planner-decomposition-runner.d.ts +38 -0
- package/dist/platform/agents/planner-decomposition-runner.d.ts.map +1 -0
- package/dist/platform/agents/planner-decomposition-runner.js +113 -0
- package/dist/platform/agents/turn-knowledge-injection.d.ts +88 -3
- package/dist/platform/agents/turn-knowledge-injection.d.ts.map +1 -1
- package/dist/platform/agents/turn-knowledge-injection.js +147 -30
- package/dist/platform/agents/worktree.d.ts +126 -8
- package/dist/platform/agents/worktree.d.ts.map +1 -1
- package/dist/platform/agents/worktree.js +240 -19
- package/dist/platform/agents/wrfc-controller.d.ts +24 -1
- package/dist/platform/agents/wrfc-controller.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-controller.js +161 -35
- package/dist/platform/agents/wrfc-gate-runtime.d.ts +9 -0
- package/dist/platform/agents/wrfc-gate-runtime.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-gate-runtime.js +7 -3
- package/dist/platform/agents/wrfc-gates.d.ts +1 -1
- package/dist/platform/agents/wrfc-gates.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-gates.js +7 -1
- package/dist/platform/agents/wrfc-types.d.ts +23 -3
- package/dist/platform/agents/wrfc-types.d.ts.map +1 -1
- package/dist/platform/automation/types.d.ts +9 -1
- package/dist/platform/automation/types.d.ts.map +1 -1
- package/dist/platform/calendar/calendar-api-shared.d.ts +25 -0
- package/dist/platform/calendar/calendar-api-shared.d.ts.map +1 -0
- package/dist/platform/calendar/calendar-api-shared.js +100 -0
- package/dist/platform/calendar/calendar-connector.d.ts +79 -0
- package/dist/platform/calendar/calendar-connector.d.ts.map +1 -0
- package/dist/platform/calendar/calendar-connector.js +155 -0
- package/dist/platform/calendar/google-calendar-api.d.ts +25 -0
- package/dist/platform/calendar/google-calendar-api.d.ts.map +1 -0
- package/dist/platform/calendar/google-calendar-api.js +89 -0
- package/dist/platform/calendar/http-fetch-adapter.d.ts +25 -0
- package/dist/platform/calendar/http-fetch-adapter.d.ts.map +1 -0
- package/dist/platform/calendar/http-fetch-adapter.js +25 -0
- package/dist/platform/calendar/ics-parser.d.ts +35 -0
- package/dist/platform/calendar/ics-parser.d.ts.map +1 -0
- package/dist/platform/calendar/ics-parser.js +236 -0
- package/dist/platform/calendar/index.d.ts +41 -0
- package/dist/platform/calendar/index.d.ts.map +1 -0
- package/dist/platform/calendar/index.js +49 -0
- package/dist/platform/calendar/merged-calendar-model.d.ts +67 -0
- package/dist/platform/calendar/merged-calendar-model.d.ts.map +1 -0
- package/dist/platform/calendar/merged-calendar-model.js +181 -0
- package/dist/platform/calendar/microsoft-graph-api.d.ts +25 -0
- package/dist/platform/calendar/microsoft-graph-api.d.ts.map +1 -0
- package/dist/platform/calendar/microsoft-graph-api.js +95 -0
- package/dist/platform/calendar/oauth-flow.d.ts +62 -0
- package/dist/platform/calendar/oauth-flow.d.ts.map +1 -0
- package/dist/platform/calendar/oauth-flow.js +305 -0
- package/dist/platform/calendar/oauth-providers.d.ts +43 -0
- package/dist/platform/calendar/oauth-providers.d.ts.map +1 -0
- package/dist/platform/calendar/oauth-providers.js +120 -0
- package/dist/platform/calendar/oauth-token-store.d.ts +72 -0
- package/dist/platform/calendar/oauth-token-store.d.ts.map +1 -0
- package/dist/platform/calendar/oauth-token-store.js +189 -0
- package/dist/platform/calendar/oauth-types.d.ts +274 -0
- package/dist/platform/calendar/oauth-types.d.ts.map +1 -0
- package/dist/platform/calendar/oauth-types.js +22 -0
- package/dist/platform/calendar/rrule.d.ts +39 -0
- package/dist/platform/calendar/rrule.d.ts.map +1 -0
- package/dist/platform/calendar/rrule.js +261 -0
- package/dist/platform/calendar/subscription-store.d.ts +118 -0
- package/dist/platform/calendar/subscription-store.d.ts.map +1 -0
- package/dist/platform/calendar/subscription-store.js +293 -0
- package/dist/platform/calendar/types.d.ts +170 -0
- package/dist/platform/calendar/types.d.ts.map +1 -0
- package/dist/platform/calendar/types.js +21 -0
- package/dist/platform/companion/companion-chat-attachments.d.ts +29 -0
- package/dist/platform/companion/companion-chat-attachments.d.ts.map +1 -0
- package/dist/platform/companion/companion-chat-attachments.js +121 -0
- package/dist/platform/companion/companion-chat-branching.d.ts +66 -0
- package/dist/platform/companion/companion-chat-branching.d.ts.map +1 -0
- package/dist/platform/companion/companion-chat-branching.js +142 -0
- package/dist/platform/companion/companion-chat-broker-bridge.d.ts +40 -0
- package/dist/platform/companion/companion-chat-broker-bridge.d.ts.map +1 -0
- package/dist/platform/companion/companion-chat-broker-bridge.js +14 -0
- package/dist/platform/companion/companion-chat-broker-sync.d.ts +38 -0
- package/dist/platform/companion/companion-chat-broker-sync.d.ts.map +1 -0
- package/dist/platform/companion/companion-chat-broker-sync.js +80 -0
- package/dist/platform/companion/companion-chat-gc.d.ts +63 -0
- package/dist/platform/companion/companion-chat-gc.d.ts.map +1 -0
- package/dist/platform/companion/companion-chat-gc.js +38 -0
- package/dist/platform/companion/companion-chat-manager.d.ts +91 -23
- package/dist/platform/companion/companion-chat-manager.d.ts.map +1 -1
- package/dist/platform/companion/companion-chat-manager.js +195 -223
- package/dist/platform/companion/companion-chat-persistence.d.ts +9 -1
- package/dist/platform/companion/companion-chat-persistence.d.ts.map +1 -1
- package/dist/platform/companion/companion-chat-persistence.js +10 -2
- package/dist/platform/companion/companion-chat-routes.d.ts +2 -1
- package/dist/platform/companion/companion-chat-routes.d.ts.map +1 -1
- package/dist/platform/companion/companion-chat-routes.js +113 -4
- package/dist/platform/companion/companion-chat-turn-execution.d.ts +61 -0
- package/dist/platform/companion/companion-chat-turn-execution.d.ts.map +1 -0
- package/dist/platform/companion/companion-chat-turn-execution.js +107 -0
- package/dist/platform/companion/companion-chat-types.d.ts +67 -0
- package/dist/platform/companion/companion-chat-types.d.ts.map +1 -1
- package/dist/platform/config/credential-status.d.ts +28 -0
- package/dist/platform/config/credential-status.d.ts.map +1 -0
- package/dist/platform/config/credential-status.js +75 -0
- package/dist/platform/config/index.d.ts +25 -0
- package/dist/platform/config/index.d.ts.map +1 -1
- package/dist/platform/config/index.js +18 -0
- package/dist/platform/config/manager.d.ts +9 -0
- package/dist/platform/config/manager.d.ts.map +1 -1
- package/dist/platform/config/manager.js +21 -2
- package/dist/platform/config/migrations.d.ts +48 -0
- package/dist/platform/config/migrations.d.ts.map +1 -0
- package/dist/platform/config/migrations.js +54 -0
- package/dist/platform/config/schema-domain-core.d.ts +10 -1
- package/dist/platform/config/schema-domain-core.d.ts.map +1 -1
- package/dist/platform/config/schema-domain-core.js +46 -3
- package/dist/platform/config/schema-domain-runtime.d.ts +8 -0
- package/dist/platform/config/schema-domain-runtime.d.ts.map +1 -1
- package/dist/platform/config/schema-domain-runtime.js +32 -0
- package/dist/platform/config/schema-types.d.ts +21 -7
- package/dist/platform/config/schema-types.d.ts.map +1 -1
- package/dist/platform/config/schema.d.ts.map +1 -1
- package/dist/platform/config/schema.js +2 -0
- package/dist/platform/control-plane/approval-broker.d.ts +11 -0
- package/dist/platform/control-plane/approval-broker.d.ts.map +1 -1
- package/dist/platform/control-plane/approval-broker.js +17 -1
- package/dist/platform/control-plane/approval-hunk-apply.d.ts +77 -0
- package/dist/platform/control-plane/approval-hunk-apply.d.ts.map +1 -0
- package/dist/platform/control-plane/approval-hunk-apply.js +80 -0
- package/dist/platform/control-plane/gateway-disabled-response.d.ts +20 -0
- package/dist/platform/control-plane/gateway-disabled-response.d.ts.map +1 -0
- package/dist/platform/control-plane/gateway-disabled-response.js +24 -0
- package/dist/platform/control-plane/gateway-scope-enforcement.d.ts +68 -0
- package/dist/platform/control-plane/gateway-scope-enforcement.d.ts.map +1 -0
- package/dist/platform/control-plane/gateway-scope-enforcement.js +91 -0
- package/dist/platform/control-plane/gateway-utils.d.ts +17 -0
- package/dist/platform/control-plane/gateway-utils.d.ts.map +1 -1
- package/dist/platform/control-plane/gateway-utils.js +30 -0
- package/dist/platform/control-plane/gateway.d.ts +12 -2
- package/dist/platform/control-plane/gateway.d.ts.map +1 -1
- package/dist/platform/control-plane/gateway.js +27 -31
- package/dist/platform/control-plane/index.d.ts +8 -1
- package/dist/platform/control-plane/index.d.ts.map +1 -1
- package/dist/platform/control-plane/index.js +8 -0
- package/dist/platform/control-plane/invoke-input-validation.d.ts +56 -0
- package/dist/platform/control-plane/invoke-input-validation.d.ts.map +1 -0
- package/dist/platform/control-plane/invoke-input-validation.js +163 -0
- package/dist/platform/control-plane/method-catalog-admin.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-admin.js +12 -1
- package/dist/platform/control-plane/method-catalog-calendar.d.ts +16 -0
- package/dist/platform/control-plane/method-catalog-calendar.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-calendar.js +21 -0
- package/dist/platform/control-plane/method-catalog-channels.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-channels.js +32 -3
- package/dist/platform/control-plane/method-catalog-control-automation.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-control-automation.js +19 -34
- package/dist/platform/control-plane/method-catalog-control-companion.d.ts +15 -0
- package/dist/platform/control-plane/method-catalog-control-companion.d.ts.map +1 -0
- package/dist/platform/control-plane/method-catalog-control-companion.js +176 -0
- package/dist/platform/control-plane/method-catalog-control-core.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-control-core.js +104 -122
- package/dist/platform/control-plane/method-catalog-control.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-control.js +4 -0
- package/dist/platform/control-plane/method-catalog-email.d.ts +17 -0
- package/dist/platform/control-plane/method-catalog-email.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-email.js +21 -0
- package/dist/platform/control-plane/method-catalog-events.d.ts +28 -0
- package/dist/platform/control-plane/method-catalog-events.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-events.js +74 -1
- package/dist/platform/control-plane/method-catalog-fleet.d.ts +24 -0
- package/dist/platform/control-plane/method-catalog-fleet.d.ts.map +1 -0
- package/dist/platform/control-plane/method-catalog-fleet.js +65 -0
- package/dist/platform/control-plane/method-catalog-push.d.ts +30 -0
- package/dist/platform/control-plane/method-catalog-push.d.ts.map +1 -0
- package/dist/platform/control-plane/method-catalog-push.js +80 -0
- package/dist/platform/control-plane/method-catalog-route-reconcile.d.ts +84 -0
- package/dist/platform/control-plane/method-catalog-route-reconcile.d.ts.map +1 -0
- package/dist/platform/control-plane/method-catalog-route-reconcile.js +103 -0
- package/dist/platform/control-plane/method-catalog-runtime.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-runtime.js +83 -1
- package/dist/platform/control-plane/method-catalog-shared.d.ts +29 -0
- package/dist/platform/control-plane/method-catalog-shared.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog.d.ts +9 -0
- package/dist/platform/control-plane/method-catalog.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog.js +34 -3
- package/dist/platform/control-plane/operator-contract-schemas-admin.d.ts +8 -0
- package/dist/platform/control-plane/operator-contract-schemas-admin.d.ts.map +1 -1
- package/dist/platform/control-plane/operator-contract-schemas-admin.js +22 -1
- package/dist/platform/control-plane/operator-contract-schemas-fleet.d.ts +18 -0
- package/dist/platform/control-plane/operator-contract-schemas-fleet.d.ts.map +1 -0
- package/dist/platform/control-plane/operator-contract-schemas-fleet.js +182 -0
- package/dist/platform/control-plane/operator-contract-schemas-permissions.d.ts.map +1 -1
- package/dist/platform/control-plane/operator-contract-schemas-permissions.js +5 -0
- package/dist/platform/control-plane/operator-contract-schemas-runtime.d.ts +37 -0
- package/dist/platform/control-plane/operator-contract-schemas-runtime.d.ts.map +1 -1
- package/dist/platform/control-plane/operator-contract-schemas-runtime.js +100 -3
- package/dist/platform/control-plane/operator-contract-schemas.d.ts +1 -0
- package/dist/platform/control-plane/operator-contract-schemas.d.ts.map +1 -1
- package/dist/platform/control-plane/operator-contract-schemas.js +1 -0
- package/dist/platform/control-plane/operator-contract.d.ts.map +1 -1
- package/dist/platform/control-plane/operator-contract.js +8 -0
- package/dist/platform/control-plane/routes/checkpoints.d.ts +39 -0
- package/dist/platform/control-plane/routes/checkpoints.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/checkpoints.js +166 -0
- package/dist/platform/control-plane/routes/fleet.d.ts +53 -0
- package/dist/platform/control-plane/routes/fleet.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/fleet.js +153 -0
- package/dist/platform/control-plane/routes/gateway-verb-error.d.ts +30 -0
- package/dist/platform/control-plane/routes/gateway-verb-error.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/gateway-verb-error.js +36 -0
- package/dist/platform/control-plane/routes/index.d.ts +0 -6
- package/dist/platform/control-plane/routes/index.d.ts.map +1 -1
- package/dist/platform/control-plane/routes/index.js +5 -5
- package/dist/platform/control-plane/routes/invocation-params.d.ts +23 -0
- package/dist/platform/control-plane/routes/invocation-params.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/invocation-params.js +9 -0
- package/dist/platform/control-plane/routes/push.d.ts +26 -0
- package/dist/platform/control-plane/routes/push.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/push.js +104 -0
- package/dist/platform/control-plane/routes/register-gateway-verb-groups.d.ts +31 -0
- package/dist/platform/control-plane/routes/register-gateway-verb-groups.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/register-gateway-verb-groups.js +16 -0
- package/dist/platform/control-plane/routes/register-w3-s2.d.ts +26 -0
- package/dist/platform/control-plane/routes/register-w3-s2.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/register-w3-s2.js +8 -0
- package/dist/platform/control-plane/routes/session-search.d.ts +37 -0
- package/dist/platform/control-plane/routes/session-search.d.ts.map +1 -0
- package/dist/platform/control-plane/routes/session-search.js +113 -0
- package/dist/platform/control-plane/session-broker-gc.d.ts +16 -0
- package/dist/platform/control-plane/session-broker-gc.d.ts.map +1 -1
- package/dist/platform/control-plane/session-broker-gc.js +23 -6
- package/dist/platform/control-plane/session-broker-helpers.d.ts +3 -3
- package/dist/platform/control-plane/session-broker-helpers.d.ts.map +1 -1
- package/dist/platform/control-plane/session-broker-inputs.d.ts +18 -0
- package/dist/platform/control-plane/session-broker-inputs.d.ts.map +1 -1
- package/dist/platform/control-plane/session-broker-inputs.js +34 -0
- package/dist/platform/control-plane/session-broker-sessions.d.ts +102 -3
- package/dist/platform/control-plane/session-broker-sessions.d.ts.map +1 -1
- package/dist/platform/control-plane/session-broker-sessions.js +179 -5
- package/dist/platform/control-plane/session-broker-state.d.ts +20 -1
- package/dist/platform/control-plane/session-broker-state.d.ts.map +1 -1
- package/dist/platform/control-plane/session-broker-state.js +67 -5
- package/dist/platform/control-plane/session-broker.d.ts +51 -38
- package/dist/platform/control-plane/session-broker.d.ts.map +1 -1
- package/dist/platform/control-plane/session-broker.js +183 -75
- package/dist/platform/control-plane/session-store-importer.d.ts +57 -0
- package/dist/platform/control-plane/session-store-importer.d.ts.map +1 -0
- package/dist/platform/control-plane/session-store-importer.js +227 -0
- package/dist/platform/control-plane/session-types.d.ts +142 -7
- package/dist/platform/control-plane/session-types.d.ts.map +1 -1
- package/dist/platform/core/execution-plan.d.ts +43 -1
- package/dist/platform/core/execution-plan.d.ts.map +1 -1
- package/dist/platform/core/execution-plan.js +46 -10
- package/dist/platform/core/index.d.ts +1 -0
- package/dist/platform/core/index.d.ts.map +1 -1
- package/dist/platform/core/index.js +1 -0
- package/dist/platform/core/orchestrator-runtime.d.ts +23 -3
- package/dist/platform/core/orchestrator-runtime.d.ts.map +1 -1
- package/dist/platform/core/orchestrator-tool-runtime.d.ts +7 -0
- package/dist/platform/core/orchestrator-tool-runtime.d.ts.map +1 -1
- package/dist/platform/core/orchestrator-tool-runtime.js +10 -0
- package/dist/platform/core/orchestrator-turn-loop.d.ts +13 -6
- package/dist/platform/core/orchestrator-turn-loop.d.ts.map +1 -1
- package/dist/platform/core/orchestrator-turn-loop.js +29 -22
- package/dist/platform/core/orchestrator.d.ts +16 -10
- package/dist/platform/core/orchestrator.d.ts.map +1 -1
- package/dist/platform/core/orchestrator.js +23 -8
- package/dist/platform/core/plan-decomposition.d.ts +196 -0
- package/dist/platform/core/plan-decomposition.d.ts.map +1 -0
- package/dist/platform/core/plan-decomposition.js +417 -0
- package/dist/platform/core/plan-proposal.d.ts +39 -0
- package/dist/platform/core/plan-proposal.d.ts.map +1 -1
- package/dist/platform/core/wrfc-routing.d.ts +1 -0
- package/dist/platform/core/wrfc-routing.d.ts.map +1 -1
- package/dist/platform/core/wrfc-routing.js +51 -1
- package/dist/platform/daemon/boot.d.ts +69 -0
- package/dist/platform/daemon/boot.d.ts.map +1 -0
- package/dist/platform/daemon/boot.js +61 -0
- package/dist/platform/daemon/cli.js +2 -1
- package/dist/platform/daemon/control-plane.d.ts.map +1 -1
- package/dist/platform/daemon/control-plane.js +50 -1
- package/dist/platform/daemon/facade-composition.d.ts.map +1 -1
- package/dist/platform/daemon/facade-composition.js +6 -0
- package/dist/platform/daemon/facade.d.ts +15 -6
- package/dist/platform/daemon/facade.d.ts.map +1 -1
- package/dist/platform/daemon/facade.js +48 -43
- package/dist/platform/daemon/http/router-route-contexts.d.ts +1 -0
- package/dist/platform/daemon/http/router-route-contexts.d.ts.map +1 -1
- package/dist/platform/daemon/http/router-route-contexts.js +1 -0
- package/dist/platform/daemon/http/router-session-broker-adapter.d.ts +13 -0
- package/dist/platform/daemon/http/router-session-broker-adapter.d.ts.map +1 -0
- package/dist/platform/daemon/http/router-session-broker-adapter.js +27 -0
- package/dist/platform/daemon/http/router.d.ts +2 -1
- package/dist/platform/daemon/http/router.d.ts.map +1 -1
- package/dist/platform/daemon/http/router.js +42 -40
- package/dist/platform/daemon/http/runtime-route-types.d.ts +42 -4
- package/dist/platform/daemon/http/runtime-route-types.d.ts.map +1 -1
- package/dist/platform/daemon/http/webui-serving.d.ts +68 -0
- package/dist/platform/daemon/http/webui-serving.d.ts.map +1 -0
- package/dist/platform/daemon/http/webui-serving.js +230 -0
- package/dist/platform/daemon/index.d.ts +2 -0
- package/dist/platform/daemon/index.d.ts.map +1 -1
- package/dist/platform/daemon/index.js +1 -0
- package/dist/platform/daemon/service-manager.d.ts +16 -0
- package/dist/platform/daemon/service-manager.d.ts.map +1 -1
- package/dist/platform/daemon/service-manager.js +79 -15
- package/dist/platform/intelligence/tree-sitter/service.d.ts.map +1 -1
- package/dist/platform/intelligence/tree-sitter/service.js +16 -2
- package/dist/platform/knowledge/browser-history/readers.d.ts.map +1 -1
- package/dist/platform/knowledge/browser-history/readers.js +15 -5
- package/dist/platform/knowledge/knowledge-api.d.ts +1 -1
- package/dist/platform/knowledge/project-planning/service.d.ts +14 -1
- package/dist/platform/knowledge/project-planning/service.d.ts.map +1 -1
- package/dist/platform/knowledge/project-planning/service.js +77 -0
- package/dist/platform/knowledge/project-planning/types.d.ts +32 -0
- package/dist/platform/knowledge/project-planning/types.d.ts.map +1 -1
- package/dist/platform/orchestration/bookkeeping.d.ts +12 -0
- package/dist/platform/orchestration/bookkeeping.d.ts.map +1 -0
- package/dist/platform/orchestration/bookkeeping.js +91 -0
- package/dist/platform/orchestration/budget.d.ts +2 -2
- package/dist/platform/orchestration/cancellation.d.ts +2 -2
- package/dist/platform/orchestration/controller-compat.d.ts +16 -3
- package/dist/platform/orchestration/controller-compat.d.ts.map +1 -1
- package/dist/platform/orchestration/controller-compat.js +18 -4
- package/dist/platform/orchestration/dirty-guard.js +1 -1
- package/dist/platform/orchestration/engine.d.ts +26 -1
- package/dist/platform/orchestration/engine.d.ts.map +1 -1
- package/dist/platform/orchestration/engine.js +229 -25
- package/dist/platform/orchestration/index.d.ts +6 -4
- package/dist/platform/orchestration/index.d.ts.map +1 -1
- package/dist/platform/orchestration/index.js +3 -2
- package/dist/platform/orchestration/persistence.d.ts.map +1 -1
- package/dist/platform/orchestration/persistence.js +6 -3
- package/dist/platform/orchestration/phase-runner.d.ts +33 -6
- package/dist/platform/orchestration/phase-runner.d.ts.map +1 -1
- package/dist/platform/orchestration/phase-runner.js +98 -25
- package/dist/platform/orchestration/proposal-workstream.d.ts +56 -0
- package/dist/platform/orchestration/proposal-workstream.d.ts.map +1 -0
- package/dist/platform/orchestration/proposal-workstream.js +76 -0
- package/dist/platform/orchestration/scheduler.d.ts +20 -1
- package/dist/platform/orchestration/scheduler.d.ts.map +1 -1
- package/dist/platform/orchestration/scheduler.js +16 -0
- package/dist/platform/orchestration/types.d.ts +289 -4
- package/dist/platform/orchestration/types.d.ts.map +1 -1
- package/dist/platform/orchestration/types.js +32 -0
- package/dist/platform/orchestration/worktree-isolation.d.ts +33 -0
- package/dist/platform/orchestration/worktree-isolation.d.ts.map +1 -0
- package/dist/platform/orchestration/worktree-isolation.js +248 -0
- package/dist/platform/presentation/glyphs.d.ts +91 -0
- package/dist/platform/presentation/glyphs.d.ts.map +1 -0
- package/dist/platform/presentation/glyphs.js +93 -0
- package/dist/platform/presentation/index.d.ts +28 -0
- package/dist/platform/presentation/index.d.ts.map +1 -0
- package/dist/platform/presentation/index.js +27 -0
- package/dist/platform/presentation/thinking-phrases.d.ts +12 -0
- package/dist/platform/presentation/thinking-phrases.d.ts.map +1 -0
- package/dist/platform/presentation/thinking-phrases.js +32 -0
- package/dist/platform/presentation/tones.d.ts +121 -0
- package/dist/platform/presentation/tones.d.ts.map +1 -0
- package/dist/platform/presentation/tones.js +145 -0
- package/dist/platform/presentation/waiting-wording.d.ts +54 -0
- package/dist/platform/presentation/waiting-wording.d.ts.map +1 -0
- package/dist/platform/presentation/waiting-wording.js +51 -0
- package/dist/platform/providers/runtime-snapshot.d.ts.map +1 -1
- package/dist/platform/providers/runtime-snapshot.js +12 -2
- package/dist/platform/push/delivery.d.ts +48 -0
- package/dist/platform/push/delivery.d.ts.map +1 -0
- package/dist/platform/push/delivery.js +117 -0
- package/dist/platform/push/encryption.d.ts +41 -0
- package/dist/platform/push/encryption.d.ts.map +1 -0
- package/dist/platform/push/encryption.js +82 -0
- package/dist/platform/push/index.d.ts +17 -0
- package/dist/platform/push/index.d.ts.map +1 -0
- package/dist/platform/push/index.js +10 -0
- package/dist/platform/push/service.d.ts +75 -0
- package/dist/platform/push/service.d.ts.map +1 -0
- package/dist/platform/push/service.js +95 -0
- package/dist/platform/push/subscription-store.d.ts +50 -0
- package/dist/platform/push/subscription-store.d.ts.map +1 -0
- package/dist/platform/push/subscription-store.js +123 -0
- package/dist/platform/push/types.d.ts +68 -0
- package/dist/platform/push/types.d.ts.map +1 -0
- package/dist/platform/push/types.js +13 -0
- package/dist/platform/push/vapid.d.ts +54 -0
- package/dist/platform/push/vapid.d.ts.map +1 -0
- package/dist/platform/push/vapid.js +113 -0
- package/dist/platform/runtime/bootstrap-services.d.ts +62 -2
- package/dist/platform/runtime/bootstrap-services.d.ts.map +1 -1
- package/dist/platform/runtime/bootstrap-services.js +217 -50
- package/dist/platform/runtime/daemon-version-compat.d.ts +39 -0
- package/dist/platform/runtime/daemon-version-compat.d.ts.map +1 -0
- package/dist/platform/runtime/daemon-version-compat.js +75 -0
- package/dist/platform/runtime/detached-daemon-runtime.d.ts +26 -0
- package/dist/platform/runtime/detached-daemon-runtime.d.ts.map +1 -0
- package/dist/platform/runtime/detached-daemon-runtime.js +49 -0
- package/dist/platform/runtime/emitters/workflows.d.ts +1 -1
- package/dist/platform/runtime/emitters/workflows.d.ts.map +1 -1
- package/dist/platform/runtime/events/index.d.ts +13 -0
- package/dist/platform/runtime/events/index.d.ts.map +1 -1
- package/dist/platform/runtime/events/index.js +13 -0
- package/dist/platform/runtime/feature-flags/flags.d.ts.map +1 -1
- package/dist/platform/runtime/feature-flags/flags.js +39 -1
- package/dist/platform/runtime/fleet/adapters/agent.d.ts +2 -2
- package/dist/platform/runtime/fleet/adapters/agent.d.ts.map +1 -1
- package/dist/platform/runtime/fleet/adapters/agent.js +4 -4
- package/dist/platform/runtime/fleet/adapters/automation.d.ts +1 -1
- package/dist/platform/runtime/fleet/adapters/automation.js +1 -1
- package/dist/platform/runtime/fleet/adapters/code-index.d.ts +1 -1
- package/dist/platform/runtime/fleet/adapters/code-index.js +1 -1
- package/dist/platform/runtime/fleet/adapters/orchestration.d.ts +40 -18
- package/dist/platform/runtime/fleet/adapters/orchestration.d.ts.map +1 -1
- package/dist/platform/runtime/fleet/adapters/orchestration.js +138 -34
- package/dist/platform/runtime/fleet/adapters/schedule.d.ts +4 -4
- package/dist/platform/runtime/fleet/adapters/schedule.js +4 -4
- package/dist/platform/runtime/fleet/adapters/trigger.d.ts +3 -4
- package/dist/platform/runtime/fleet/adapters/trigger.d.ts.map +1 -1
- package/dist/platform/runtime/fleet/adapters/trigger.js +3 -4
- package/dist/platform/runtime/fleet/adapters/wrfc.d.ts +13 -0
- package/dist/platform/runtime/fleet/adapters/wrfc.d.ts.map +1 -1
- package/dist/platform/runtime/fleet/adapters/wrfc.js +49 -2
- package/dist/platform/runtime/fleet/registry.d.ts +7 -7
- package/dist/platform/runtime/fleet/registry.d.ts.map +1 -1
- package/dist/platform/runtime/fleet/registry.js +41 -7
- package/dist/platform/runtime/fleet/types.d.ts +9 -9
- package/dist/platform/runtime/fleet/types.d.ts.map +1 -1
- package/dist/platform/runtime/memory-spine/client.d.ts +127 -0
- package/dist/platform/runtime/memory-spine/client.d.ts.map +1 -0
- package/dist/platform/runtime/memory-spine/client.js +113 -0
- package/dist/platform/runtime/memory-spine/index.d.ts +11 -0
- package/dist/platform/runtime/memory-spine/index.d.ts.map +1 -0
- package/dist/platform/runtime/memory-spine/index.js +10 -0
- package/dist/platform/runtime/operator-client.d.ts +20 -2
- package/dist/platform/runtime/operator-client.d.ts.map +1 -1
- package/dist/platform/runtime/operator-client.js +11 -1
- package/dist/platform/runtime/provider-accounts/registry.d.ts.map +1 -1
- package/dist/platform/runtime/provider-accounts/registry.js +11 -1
- package/dist/platform/runtime/services.d.ts +11 -9
- package/dist/platform/runtime/services.d.ts.map +1 -1
- package/dist/platform/runtime/services.js +24 -9
- package/dist/platform/runtime/session-spine/client.d.ts +234 -0
- package/dist/platform/runtime/session-spine/client.d.ts.map +1 -0
- package/dist/platform/runtime/session-spine/client.js +449 -0
- package/dist/platform/runtime/session-spine/index.d.ts +12 -0
- package/dist/platform/runtime/session-spine/index.d.ts.map +1 -0
- package/dist/platform/runtime/session-spine/index.js +11 -0
- package/dist/platform/runtime/session-spine/union-cache.d.ts +225 -0
- package/dist/platform/runtime/session-spine/union-cache.d.ts.map +1 -0
- package/dist/platform/runtime/session-spine/union-cache.js +333 -0
- package/dist/platform/runtime/shell-command-ops.d.ts +3 -1
- package/dist/platform/runtime/shell-command-ops.d.ts.map +1 -1
- package/dist/platform/runtime/transports/daemon-http-client-validators.d.ts.map +1 -1
- package/dist/platform/runtime/transports/daemon-http-client-validators.js +22 -0
- package/dist/platform/runtime/transports/daemon-http-client.d.ts.map +1 -1
- package/dist/platform/runtime/transports/daemon-http-client.js +25 -2
- package/dist/platform/runtime/transports/http-types.d.ts +9 -2
- package/dist/platform/runtime/transports/http-types.d.ts.map +1 -1
- package/dist/platform/state/canonical-memory.d.ts +95 -0
- package/dist/platform/state/canonical-memory.d.ts.map +1 -0
- package/dist/platform/state/canonical-memory.js +155 -0
- package/dist/platform/state/code-index-chunking.js +1 -1
- package/dist/platform/state/code-index-db.d.ts +1 -1
- package/dist/platform/state/code-index-reindex.d.ts +73 -0
- package/dist/platform/state/code-index-reindex.d.ts.map +1 -0
- package/dist/platform/state/code-index-reindex.js +156 -0
- package/dist/platform/state/code-index-store.d.ts.map +1 -1
- package/dist/platform/state/code-index-store.js +11 -3
- package/dist/platform/state/index.d.ts +8 -0
- package/dist/platform/state/index.d.ts.map +1 -1
- package/dist/platform/state/index.js +4 -0
- package/dist/platform/state/memory-recall-contract.d.ts +118 -0
- package/dist/platform/state/memory-recall-contract.d.ts.map +1 -0
- package/dist/platform/state/memory-recall-contract.js +170 -0
- package/dist/platform/state/memory-registry.d.ts +8 -0
- package/dist/platform/state/memory-registry.d.ts.map +1 -1
- package/dist/platform/state/memory-registry.js +10 -0
- package/dist/platform/state/memory-store.d.ts +2 -0
- package/dist/platform/state/memory-store.d.ts.map +1 -1
- package/dist/platform/state/memory-store.js +4 -0
- package/dist/platform/state/memory-vector-store.d.ts.map +1 -1
- package/dist/platform/state/memory-vector-store.js +14 -3
- package/dist/platform/state/sqlite-store.d.ts +2 -0
- package/dist/platform/state/sqlite-store.d.ts.map +1 -1
- package/dist/platform/state/sqlite-store.js +4 -0
- package/dist/platform/state/sqlite-vec-loader.d.ts +1 -1
- package/dist/platform/state/sqlite-vec-loader.js +1 -1
- package/dist/platform/state/vibe-projection.d.ts +67 -0
- package/dist/platform/state/vibe-projection.d.ts.map +1 -0
- package/dist/platform/state/vibe-projection.js +115 -0
- package/dist/platform/tools/agent/index.d.ts.map +1 -1
- package/dist/platform/tools/agent/index.js +8 -0
- package/dist/platform/tools/agent/manager.d.ts +22 -10
- package/dist/platform/tools/agent/manager.d.ts.map +1 -1
- package/dist/platform/tools/agent/manager.js +13 -7
- package/dist/platform/tools/agent/schema.d.ts +26 -0
- package/dist/platform/tools/agent/schema.d.ts.map +1 -1
- package/dist/platform/tools/agent/schema.js +2 -2
- package/dist/platform/tools/agent/wrfc-batch-policy.d.ts +13 -0
- package/dist/platform/tools/agent/wrfc-batch-policy.d.ts.map +1 -1
- package/dist/platform/tools/agent/wrfc-batch-policy.js +60 -0
- package/dist/platform/tools/exec/runtime.d.ts +10 -0
- package/dist/platform/tools/exec/runtime.d.ts.map +1 -1
- package/dist/platform/tools/exec/runtime.js +27 -10
- package/dist/platform/tools/exec/schema.d.ts +2 -2
- package/dist/platform/tools/exec/schema.d.ts.map +1 -1
- package/dist/platform/tools/exec/schema.js +2 -1
- package/dist/platform/tools/fetch/runtime.d.ts +1 -1
- package/dist/platform/tools/index.d.ts +2 -0
- package/dist/platform/tools/index.d.ts.map +1 -1
- package/dist/platform/tools/index.js +2 -0
- package/dist/platform/tools/registry.d.ts +1 -1
- package/dist/platform/tools/registry.js +1 -1
- package/dist/platform/tools/state/index.d.ts +9 -0
- package/dist/platform/tools/state/index.d.ts.map +1 -1
- package/dist/platform/tools/state/index.js +60 -3
- package/dist/platform/types/foundation-contract.d.ts +1 -1
- package/dist/platform/types/foundation-contract.d.ts.map +1 -1
- package/dist/platform/types/index.d.ts +1 -1
- package/dist/platform/types/index.d.ts.map +1 -1
- package/dist/platform/types/tools.d.ts +1 -1
- package/dist/platform/utils/request-body.d.ts.map +1 -1
- package/dist/platform/utils/request-body.js +50 -5
- package/dist/platform/version.js +1 -1
- package/package.json +25 -9
- package/dist/platform/control-plane/routes/automation.d.ts +0 -3
- package/dist/platform/control-plane/routes/automation.d.ts.map +0 -1
- package/dist/platform/control-plane/routes/automation.js +0 -63
- package/dist/platform/control-plane/routes/context.d.ts +0 -2
- package/dist/platform/control-plane/routes/context.d.ts.map +0 -1
- package/dist/platform/control-plane/routes/context.js +0 -1
- package/dist/platform/control-plane/routes/operator.d.ts +0 -8
- package/dist/platform/control-plane/routes/operator.d.ts.map +0 -1
- package/dist/platform/control-plane/routes/operator.js +0 -415
- package/dist/platform/control-plane/routes/remote.d.ts +0 -3
- package/dist/platform/control-plane/routes/remote.d.ts.map +0 -1
- package/dist/platform/control-plane/routes/remote.js +0 -35
- package/dist/platform/control-plane/routes/sessions.d.ts +0 -3
- package/dist/platform/control-plane/routes/sessions.d.ts.map +0 -1
- package/dist/platform/control-plane/routes/sessions.js +0 -43
- package/dist/platform/control-plane/routes/tasks.d.ts +0 -3
- package/dist/platform/control-plane/routes/tasks.d.ts.map +0 -1
- package/dist/platform/control-plane/routes/tasks.js +0 -22
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { EMPTY_OBJECT_SCHEMA, methodDescriptor } from './method-catalog-shared.js';
|
|
2
|
+
import { CHECKPOINTS_CREATE_INPUT_SCHEMA, CHECKPOINTS_CREATE_OUTPUT_SCHEMA, CHECKPOINTS_DIFF_INPUT_SCHEMA, CHECKPOINTS_DIFF_OUTPUT_SCHEMA, CHECKPOINTS_LIST_INPUT_SCHEMA, CHECKPOINTS_LIST_OUTPUT_SCHEMA, CHECKPOINTS_RESTORE_INPUT_SCHEMA, CHECKPOINTS_RESTORE_OUTPUT_SCHEMA, FLEET_LIST_INPUT_SCHEMA, FLEET_LIST_OUTPUT_SCHEMA, FLEET_SNAPSHOT_OUTPUT_SCHEMA, } from './operator-contract-schemas.js';
|
|
3
|
+
export const builtinGatewayFleetMethodDescriptors = [
|
|
4
|
+
methodDescriptor({
|
|
5
|
+
id: 'fleet.snapshot',
|
|
6
|
+
title: 'Fleet Snapshot',
|
|
7
|
+
description: 'Return a point-in-time capture of every live/completed runtime process (agents, WRFC chains/subtasks, workflow FSMs/triggers/schedules, watchers, background processes) as a flat, parentId-linked node list. Capped at 2000 nodes (truncated:true + totalCount when the live fleet exceeds the cap) — use fleet.list to page through a larger fleet.',
|
|
8
|
+
category: 'fleet',
|
|
9
|
+
scopes: ['read:fleet'],
|
|
10
|
+
transport: ['ws'],
|
|
11
|
+
inputSchema: EMPTY_OBJECT_SCHEMA,
|
|
12
|
+
outputSchema: FLEET_SNAPSHOT_OUTPUT_SCHEMA,
|
|
13
|
+
}),
|
|
14
|
+
methodDescriptor({
|
|
15
|
+
id: 'fleet.list',
|
|
16
|
+
title: 'List Fleet Processes',
|
|
17
|
+
description: 'Paginated, filtered (kinds/states) query over the live process registry. Cursor pagination returns disjoint pages that union to the full matching set at query time.',
|
|
18
|
+
category: 'fleet',
|
|
19
|
+
scopes: ['read:fleet'],
|
|
20
|
+
transport: ['ws'],
|
|
21
|
+
inputSchema: FLEET_LIST_INPUT_SCHEMA,
|
|
22
|
+
outputSchema: FLEET_LIST_OUTPUT_SCHEMA,
|
|
23
|
+
}),
|
|
24
|
+
methodDescriptor({
|
|
25
|
+
id: 'checkpoints.list',
|
|
26
|
+
title: 'List Workspace Checkpoints',
|
|
27
|
+
description: 'Return workspace checkpoints (whole-workspace filesystem snapshots), newest first, optionally filtered by kind/since and capped by limit.',
|
|
28
|
+
category: 'checkpoints',
|
|
29
|
+
scopes: ['read:checkpoints'],
|
|
30
|
+
transport: ['ws'],
|
|
31
|
+
inputSchema: CHECKPOINTS_LIST_INPUT_SCHEMA,
|
|
32
|
+
outputSchema: CHECKPOINTS_LIST_OUTPUT_SCHEMA,
|
|
33
|
+
}),
|
|
34
|
+
methodDescriptor({
|
|
35
|
+
id: 'checkpoints.create',
|
|
36
|
+
title: 'Create Workspace Checkpoint',
|
|
37
|
+
description: 'Create a new workspace checkpoint. Returns checkpoint:null, noop:true (not an error) when the workspace tree is identical to the most recent checkpoint — no commit, ref, or manifest entry is created in that case.',
|
|
38
|
+
category: 'checkpoints',
|
|
39
|
+
scopes: ['write:checkpoints'],
|
|
40
|
+
transport: ['ws'],
|
|
41
|
+
inputSchema: CHECKPOINTS_CREATE_INPUT_SCHEMA,
|
|
42
|
+
outputSchema: CHECKPOINTS_CREATE_OUTPUT_SCHEMA,
|
|
43
|
+
}),
|
|
44
|
+
methodDescriptor({
|
|
45
|
+
id: 'checkpoints.diff',
|
|
46
|
+
title: 'Diff Workspace Checkpoints',
|
|
47
|
+
description: 'Diff two checkpoints, or one checkpoint against the live working tree when `b` is omitted. An unknown/gc\'d checkpoint id is an honest 404, not a silent empty diff.',
|
|
48
|
+
category: 'checkpoints',
|
|
49
|
+
scopes: ['read:checkpoints'],
|
|
50
|
+
transport: ['ws'],
|
|
51
|
+
inputSchema: CHECKPOINTS_DIFF_INPUT_SCHEMA,
|
|
52
|
+
outputSchema: CHECKPOINTS_DIFF_OUTPUT_SCHEMA,
|
|
53
|
+
}),
|
|
54
|
+
methodDescriptor({
|
|
55
|
+
id: 'checkpoints.restore',
|
|
56
|
+
title: 'Restore Workspace Checkpoint',
|
|
57
|
+
description: 'DESTRUCTIVE: restore the workspace to the state captured by a checkpoint (git-backed workspace rewrite). Executes immediately with NO server-side confirmation — the calling surface (TUI/webui) owns the confirm UX before invoking this verb. An unknown/gc\'d checkpoint id is an honest 404, not a silent no-op.',
|
|
58
|
+
category: 'checkpoints',
|
|
59
|
+
scopes: ['write:checkpoints'],
|
|
60
|
+
dangerous: true,
|
|
61
|
+
transport: ['ws'],
|
|
62
|
+
inputSchema: CHECKPOINTS_RESTORE_INPUT_SCHEMA,
|
|
63
|
+
outputSchema: CHECKPOINTS_RESTORE_OUTPUT_SCHEMA,
|
|
64
|
+
}),
|
|
65
|
+
];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* method-catalog-push.ts
|
|
3
|
+
*
|
|
4
|
+
* Browser-push (Web Push) verb descriptors: the VAPID public-key read, and the
|
|
5
|
+
* subscription lifecycle (register / list / delete / verify) a PWA uses to
|
|
6
|
+
* receive approvals and completions as notifications.
|
|
7
|
+
*
|
|
8
|
+
* These are pure descriptors so `buildOperatorContract` / the generated catalog
|
|
9
|
+
* / api docs see them; the handlers are attached at RuntimeServices construction
|
|
10
|
+
* time in routes/push.ts (the same `catalog.register(descriptor, handler)`
|
|
11
|
+
* pattern fleet.* uses), reached over HTTP through the generic
|
|
12
|
+
* `/api/control-plane/methods/{id}/invoke` endpoint.
|
|
13
|
+
*
|
|
14
|
+
* Verb tails follow docs/decisions/2026-07-06-core-verb-spec.md: register is
|
|
15
|
+
* `create`, unregister is `delete`, the collection read is `list`, the public
|
|
16
|
+
* key read is `get`. `verify` (send a live test push to prove the round trip)
|
|
17
|
+
* is not a generic CRUD word — it is documented in the `push-delivery` exempt
|
|
18
|
+
* category in packages/contracts/src/core-verbs.ts.
|
|
19
|
+
*
|
|
20
|
+
* Like the other handler-registered verb groups (fleet.*, checkpoints.*,
|
|
21
|
+
* sessions.search) these declare `transport: ['ws']` and carry NO dedicated
|
|
22
|
+
* REST `http` binding: they are served by the registered in-process handler
|
|
23
|
+
* through the generic `/api/control-plane/methods/{id}/invoke` endpoint, not by
|
|
24
|
+
* a path route in the external daemon-sdk package. Advertising an `http` path
|
|
25
|
+
* that no route serves would trip the capability-advertisement honesty gate
|
|
26
|
+
* (method-catalog-route-reconcile.ts), so it is deliberately omitted.
|
|
27
|
+
*/
|
|
28
|
+
import type { GatewayMethodDescriptor } from './method-catalog-shared.js';
|
|
29
|
+
export declare const builtinGatewayPushMethodDescriptors: readonly GatewayMethodDescriptor[];
|
|
30
|
+
//# sourceMappingURL=method-catalog-push.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"method-catalog-push.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog-push.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAkC1E,eAAO,MAAM,mCAAmC,EAAE,SAAS,uBAAuB,EAyDjF,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { BOOLEAN_SCHEMA, NUMBER_SCHEMA, STRING_SCHEMA, arraySchema, methodDescriptor, objectSchema, } from './method-catalog-shared.js';
|
|
2
|
+
const PUSH_SUBSCRIPTION_KEYS_SCHEMA = objectSchema({
|
|
3
|
+
p256dh: STRING_SCHEMA,
|
|
4
|
+
auth: STRING_SCHEMA,
|
|
5
|
+
}, ['p256dh', 'auth']);
|
|
6
|
+
/** The wire-safe (redacted) subscription view — no capability URL, no key material. */
|
|
7
|
+
const PUBLIC_PUSH_SUBSCRIPTION_SCHEMA = objectSchema({
|
|
8
|
+
id: STRING_SCHEMA,
|
|
9
|
+
principalId: STRING_SCHEMA,
|
|
10
|
+
endpointOrigin: STRING_SCHEMA,
|
|
11
|
+
endpointHash: STRING_SCHEMA,
|
|
12
|
+
createdAt: NUMBER_SCHEMA,
|
|
13
|
+
lastDeliveryAt: NUMBER_SCHEMA,
|
|
14
|
+
lastOutcome: STRING_SCHEMA,
|
|
15
|
+
}, ['id', 'principalId', 'endpointOrigin', 'endpointHash', 'createdAt']);
|
|
16
|
+
const PUSH_DELIVERY_RECEIPT_SCHEMA = objectSchema({
|
|
17
|
+
subscriptionId: STRING_SCHEMA,
|
|
18
|
+
endpointOrigin: STRING_SCHEMA,
|
|
19
|
+
outcome: STRING_SCHEMA,
|
|
20
|
+
httpStatus: NUMBER_SCHEMA,
|
|
21
|
+
detail: STRING_SCHEMA,
|
|
22
|
+
}, ['subscriptionId', 'endpointOrigin', 'outcome']);
|
|
23
|
+
export const builtinGatewayPushMethodDescriptors = [
|
|
24
|
+
methodDescriptor({
|
|
25
|
+
id: 'push.vapid.get',
|
|
26
|
+
title: 'Get Web Push Public Key',
|
|
27
|
+
description: 'Return the daemon\'s public VAPID key (base64url application-server key) that a browser client passes to pushManager.subscribe(). The matching private key never leaves the daemon and is never returned by any verb.',
|
|
28
|
+
category: 'push',
|
|
29
|
+
scopes: ['read:push'],
|
|
30
|
+
transport: ['ws'],
|
|
31
|
+
outputSchema: objectSchema({ publicKey: STRING_SCHEMA }, ['publicKey']),
|
|
32
|
+
}),
|
|
33
|
+
methodDescriptor({
|
|
34
|
+
id: 'push.subscriptions.create',
|
|
35
|
+
title: 'Register Web Push Subscription',
|
|
36
|
+
description: 'Store a browser Push subscription (endpoint capability URL + p256dh/auth keys) for the authenticated operator so the daemon can deliver notifications to that device. Re-registering the same endpoint updates its keys in place rather than duplicating it. The stored endpoint and keys are never returned over the wire; the response is the redacted subscription view.',
|
|
37
|
+
category: 'push',
|
|
38
|
+
scopes: ['write:push'],
|
|
39
|
+
transport: ['ws'],
|
|
40
|
+
inputSchema: objectSchema({
|
|
41
|
+
endpoint: STRING_SCHEMA,
|
|
42
|
+
keys: PUSH_SUBSCRIPTION_KEYS_SCHEMA,
|
|
43
|
+
}, ['endpoint', 'keys']),
|
|
44
|
+
outputSchema: objectSchema({ subscription: PUBLIC_PUSH_SUBSCRIPTION_SCHEMA }, ['subscription']),
|
|
45
|
+
}),
|
|
46
|
+
methodDescriptor({
|
|
47
|
+
id: 'push.subscriptions.list',
|
|
48
|
+
title: 'List Web Push Subscriptions',
|
|
49
|
+
description: 'List the authenticated operator\'s registered push devices as redacted subscription views (id, endpoint origin + hash, timestamps, last delivery outcome). The capability URL and key material are never included.',
|
|
50
|
+
category: 'push',
|
|
51
|
+
scopes: ['read:push'],
|
|
52
|
+
transport: ['ws'],
|
|
53
|
+
outputSchema: objectSchema({
|
|
54
|
+
subscriptions: arraySchema(PUBLIC_PUSH_SUBSCRIPTION_SCHEMA),
|
|
55
|
+
}, ['subscriptions']),
|
|
56
|
+
}),
|
|
57
|
+
methodDescriptor({
|
|
58
|
+
id: 'push.subscriptions.delete',
|
|
59
|
+
title: 'Delete Web Push Subscription',
|
|
60
|
+
description: 'Permanently remove one of the authenticated operator\'s push subscriptions: the stored record (endpoint + keys) is dropped and cannot be listed afterward. An unknown id, or one owned by another principal, is a 404 SUBSCRIPTION_NOT_FOUND, never a 200-noop.',
|
|
61
|
+
category: 'push',
|
|
62
|
+
scopes: ['write:push'],
|
|
63
|
+
transport: ['ws'],
|
|
64
|
+
inputSchema: objectSchema({ subscriptionId: STRING_SCHEMA }, ['subscriptionId']),
|
|
65
|
+
outputSchema: objectSchema({
|
|
66
|
+
subscriptionId: STRING_SCHEMA,
|
|
67
|
+
deleted: BOOLEAN_SCHEMA,
|
|
68
|
+
}, ['subscriptionId', 'deleted']),
|
|
69
|
+
}),
|
|
70
|
+
methodDescriptor({
|
|
71
|
+
id: 'push.subscriptions.verify',
|
|
72
|
+
title: 'Send Test Web Push',
|
|
73
|
+
description: 'Send a live test notification to one of the authenticated operator\'s subscriptions and return an honest delivery receipt (delivered / pruned / failed). A subscription whose endpoint reports 404/410 gone is pruned as part of the attempt and the receipt says so. An unknown id, or one owned by another principal, is a 404 SUBSCRIPTION_NOT_FOUND.',
|
|
74
|
+
category: 'push',
|
|
75
|
+
scopes: ['write:push'],
|
|
76
|
+
transport: ['ws'],
|
|
77
|
+
inputSchema: objectSchema({ subscriptionId: STRING_SCHEMA }, ['subscriptionId']),
|
|
78
|
+
outputSchema: objectSchema({ receipt: PUSH_DELIVERY_RECEIPT_SCHEMA }, ['receipt']),
|
|
79
|
+
}),
|
|
80
|
+
];
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { GatewayMethodDescriptor } from './method-catalog-shared.js';
|
|
2
|
+
/**
|
|
3
|
+
* method-catalog-route-reconcile.ts
|
|
4
|
+
*
|
|
5
|
+
* Advertisement-vs-route reconciliation. Every method descriptor that
|
|
6
|
+
* carries an `http` binding is a promise to a caller: "this daemon actually
|
|
7
|
+
* serves this endpoint." Nothing previously checked that promise against
|
|
8
|
+
* the real dispatch table. method-catalog-email.ts's four email.* methods
|
|
9
|
+
* advertised /api/email/* paths that no route handler anywhere has ever
|
|
10
|
+
* served, so a caller invoking one through the generic method-dispatch
|
|
11
|
+
* endpoint (control-plane.ts's invokeGatewayMethodCall, which synthesizes a
|
|
12
|
+
* request from `http.path` and feeds it back into the real router) got a
|
|
13
|
+
* plain 404 instead of an honest "this capability isn't wired up." The ad
|
|
14
|
+
* lied; only a caller's own skepticism about the 404 stood between it and
|
|
15
|
+
* treating the capability as real.
|
|
16
|
+
*
|
|
17
|
+
* This module answers, for a batch of descriptors, whether each one's http
|
|
18
|
+
* binding actually resolves against the real dispatch pipeline:
|
|
19
|
+
* `dispatchDaemonApiRoutes` from @pellux/goodvibes-daemon-sdk, the function
|
|
20
|
+
* DaemonHttpRouter.dispatchApiRoutes (packages/sdk/src/platform/daemon/http/
|
|
21
|
+
* router.ts — read as this reconcile's route authority, never edited by it)
|
|
22
|
+
* ultimately delegates to for every method-catalog family except a short
|
|
23
|
+
* list of specialized sub-routers wired directly in router.ts ahead of that
|
|
24
|
+
* delegation (see SPECIALIZED_SUB_ROUTER_PREFIXES). The probe dispatches a
|
|
25
|
+
* synthetic Request against handler stubs that only ever return a fixed
|
|
26
|
+
* marker Response — no real service, manager, or handler body ever runs, so
|
|
27
|
+
* probing stays side-effect free even for `dangerous: true` write methods
|
|
28
|
+
* (email.send, automation job mutation, etc.).
|
|
29
|
+
*
|
|
30
|
+
* Scope note (read before extending): dispatchDaemonApiRoutes covers the
|
|
31
|
+
* operator / automation / remote / session / task route families, which is
|
|
32
|
+
* most of the catalog (control-core, media, channels, remote, runtime,
|
|
33
|
+
* knowledge). A handful of catalogs point at specialized sub-routers that
|
|
34
|
+
* router.ts special-cases before it ever reaches dispatchDaemonApiRoutes
|
|
35
|
+
* (MCP config, batch, Cloudflare, Home Assistant, model routes, companion
|
|
36
|
+
* chat, project planning). This module has no evidence either way for
|
|
37
|
+
* those paths, so it marks them 'unchecked' rather than guessing — a false
|
|
38
|
+
* "unavailable" verdict would just be a different flavor of the same
|
|
39
|
+
* dishonesty this module exists to catch.
|
|
40
|
+
*/
|
|
41
|
+
export type RouteReconcileStatus = 'live' | 'unavailable' | 'unchecked';
|
|
42
|
+
export interface RouteReconcileResult {
|
|
43
|
+
readonly methodId: string;
|
|
44
|
+
readonly status: RouteReconcileStatus;
|
|
45
|
+
readonly http: {
|
|
46
|
+
readonly method: string;
|
|
47
|
+
readonly path: string;
|
|
48
|
+
} | null;
|
|
49
|
+
readonly reason: string;
|
|
50
|
+
}
|
|
51
|
+
export type RouteProbe = (method: string, path: string) => boolean | Promise<boolean>;
|
|
52
|
+
/**
|
|
53
|
+
* Path prefixes served by a specialized sub-router that router.ts dispatches
|
|
54
|
+
* to BEFORE falling through to dispatchDaemonApiRoutes. Kept as an explicit,
|
|
55
|
+
* short allowlist (not inferred) so growth here is a deliberate, reviewed
|
|
56
|
+
* decision rather than silent scope creep.
|
|
57
|
+
*/
|
|
58
|
+
export declare const SPECIALIZED_SUB_ROUTER_PREFIXES: readonly string[];
|
|
59
|
+
/**
|
|
60
|
+
* Builds a dispatchDaemonApiRoutes-backed probe: does *any* route in the
|
|
61
|
+
* operator/automation/remote/session/task dispatch chain match this
|
|
62
|
+
* method+path? Every handler in the stub is inert — a Proxy that returns a
|
|
63
|
+
* single marker function for any property access, so it never needs
|
|
64
|
+
* updating when DaemonApiRouteHandlers gains a field (the exact kind of
|
|
65
|
+
* drift this reconcile exists to avoid reintroducing elsewhere).
|
|
66
|
+
*/
|
|
67
|
+
export declare function createDaemonSdkRouteProbe(): RouteProbe;
|
|
68
|
+
/** Reconciles a single descriptor's http binding (if any) against a probe. */
|
|
69
|
+
export declare function reconcileHttpDescriptor(descriptor: GatewayMethodDescriptor, probe: RouteProbe): Promise<RouteReconcileResult>;
|
|
70
|
+
/** Reconciles a full descriptor list against a probe, in catalog order. */
|
|
71
|
+
export declare function reconcileCatalogRoutes(descriptors: readonly GatewayMethodDescriptor[], probe: RouteProbe): Promise<RouteReconcileResult[]>;
|
|
72
|
+
/**
|
|
73
|
+
* The regression gate. Every descriptor whose http binding was actually
|
|
74
|
+
* checked (status !== 'unchecked') and resolved to no live route must
|
|
75
|
+
* already be marked `invokable: false` at the source — i.e. the
|
|
76
|
+
* advertisement itself must already say "don't call this" instead of
|
|
77
|
+
* silently 404ing a caller who trusted it. Returns the ids that violate
|
|
78
|
+
* that rule. A non-empty result means some descriptor is advertised as
|
|
79
|
+
* live but isn't backed by a route, and isn't marked unavailable either —
|
|
80
|
+
* an email.inbox.list-shaped regression. Wire this into a test (or a boot
|
|
81
|
+
* self-check, once one exists) and fail loudly on a non-empty result.
|
|
82
|
+
*/
|
|
83
|
+
export declare function findUnreconciledAdvertisements(descriptors: readonly GatewayMethodDescriptor[], results: readonly RouteReconcileResult[]): string[];
|
|
84
|
+
//# sourceMappingURL=method-catalog-route-reconcile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"method-catalog-route-reconcile.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog-route-reconcile.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,aAAa,GAAG,WAAW,CAAC;AAExE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACzE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtF;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,EAAE,SAAS,MAAM,EAQ5D,CAAC;AAkBF;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,IAAI,UAAU,CAYtD;AAED,8EAA8E;AAC9E,wBAAsB,uBAAuB,CAC3C,UAAU,EAAE,uBAAuB,EACnC,KAAK,EAAE,UAAU,GAChB,OAAO,CAAC,oBAAoB,CAAC,CAuB/B;AAED,2EAA2E;AAC3E,wBAAsB,sBAAsB,CAC1C,WAAW,EAAE,SAAS,uBAAuB,EAAE,EAC/C,KAAK,EAAE,UAAU,GAChB,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAMjC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,8BAA8B,CAC5C,WAAW,EAAE,SAAS,uBAAuB,EAAE,EAC/C,OAAO,EAAE,SAAS,oBAAoB,EAAE,GACvC,MAAM,EAAE,CAWV"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { dispatchDaemonApiRoutes } from '@pellux/goodvibes-daemon-sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Path prefixes served by a specialized sub-router that router.ts dispatches
|
|
4
|
+
* to BEFORE falling through to dispatchDaemonApiRoutes. Kept as an explicit,
|
|
5
|
+
* short allowlist (not inferred) so growth here is a deliberate, reviewed
|
|
6
|
+
* decision rather than silent scope creep.
|
|
7
|
+
*/
|
|
8
|
+
export const SPECIALIZED_SUB_ROUTER_PREFIXES = [
|
|
9
|
+
'/api/mcp',
|
|
10
|
+
'/api/batch',
|
|
11
|
+
'/api/cloudflare',
|
|
12
|
+
'/api/homeassistant',
|
|
13
|
+
'/api/models',
|
|
14
|
+
'/api/companion/chat',
|
|
15
|
+
'/api/projects/planning',
|
|
16
|
+
];
|
|
17
|
+
const RECONCILE_PROBE_MARKER = { reconcileProbeMarker: true };
|
|
18
|
+
function isSpecializedSubRouterPath(path) {
|
|
19
|
+
return SPECIALIZED_SUB_ROUTER_PREFIXES.some((prefix) => path === prefix || path.startsWith(`${prefix}/`));
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Replaces every `{param}` template segment with an opaque single-segment
|
|
23
|
+
* placeholder. Every path-matching regex in the dispatch chain matches "one
|
|
24
|
+
* non-slash segment" for a param slot, so a placeholder resolves the same
|
|
25
|
+
* way a real id would without needing one.
|
|
26
|
+
*/
|
|
27
|
+
function resolveTemplatePath(template) {
|
|
28
|
+
return template.replace(/\{[^/}]+\}/g, 'reconcile-probe-placeholder');
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Builds a dispatchDaemonApiRoutes-backed probe: does *any* route in the
|
|
32
|
+
* operator/automation/remote/session/task dispatch chain match this
|
|
33
|
+
* method+path? Every handler in the stub is inert — a Proxy that returns a
|
|
34
|
+
* single marker function for any property access, so it never needs
|
|
35
|
+
* updating when DaemonApiRouteHandlers gains a field (the exact kind of
|
|
36
|
+
* drift this reconcile exists to avoid reintroducing elsewhere).
|
|
37
|
+
*/
|
|
38
|
+
export function createDaemonSdkRouteProbe() {
|
|
39
|
+
const marker = () => Response.json(RECONCILE_PROBE_MARKER);
|
|
40
|
+
const inertHandlers = new Proxy({}, { get: () => marker });
|
|
41
|
+
return async (method, path) => {
|
|
42
|
+
const request = new Request(`http://reconcile-probe.invalid${path}`, { method });
|
|
43
|
+
const response = await dispatchDaemonApiRoutes(request, inertHandlers);
|
|
44
|
+
return response !== null;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/** Reconciles a single descriptor's http binding (if any) against a probe. */
|
|
48
|
+
export async function reconcileHttpDescriptor(descriptor, probe) {
|
|
49
|
+
if (!descriptor.http) {
|
|
50
|
+
return { methodId: descriptor.id, status: 'unchecked', http: null, reason: 'no http binding to reconcile' };
|
|
51
|
+
}
|
|
52
|
+
const http = { method: descriptor.http.method, path: descriptor.http.path };
|
|
53
|
+
if (isSpecializedSubRouterPath(descriptor.http.path)) {
|
|
54
|
+
return {
|
|
55
|
+
methodId: descriptor.id,
|
|
56
|
+
status: 'unchecked',
|
|
57
|
+
http,
|
|
58
|
+
reason: `path is served by a specialized sub-router outside this reconcile's checked scope: ${descriptor.http.path}`,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const probePath = resolveTemplatePath(descriptor.http.path);
|
|
62
|
+
const resolved = await probe(descriptor.http.method, probePath);
|
|
63
|
+
return resolved
|
|
64
|
+
? { methodId: descriptor.id, status: 'live', http, reason: 'route resolved via dispatchDaemonApiRoutes' }
|
|
65
|
+
: {
|
|
66
|
+
methodId: descriptor.id,
|
|
67
|
+
status: 'unavailable',
|
|
68
|
+
http,
|
|
69
|
+
reason: `no registered route serves ${descriptor.http.method} ${descriptor.http.path}`,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
/** Reconciles a full descriptor list against a probe, in catalog order. */
|
|
73
|
+
export async function reconcileCatalogRoutes(descriptors, probe) {
|
|
74
|
+
const results = [];
|
|
75
|
+
for (const descriptor of descriptors) {
|
|
76
|
+
results.push(await reconcileHttpDescriptor(descriptor, probe));
|
|
77
|
+
}
|
|
78
|
+
return results;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The regression gate. Every descriptor whose http binding was actually
|
|
82
|
+
* checked (status !== 'unchecked') and resolved to no live route must
|
|
83
|
+
* already be marked `invokable: false` at the source — i.e. the
|
|
84
|
+
* advertisement itself must already say "don't call this" instead of
|
|
85
|
+
* silently 404ing a caller who trusted it. Returns the ids that violate
|
|
86
|
+
* that rule. A non-empty result means some descriptor is advertised as
|
|
87
|
+
* live but isn't backed by a route, and isn't marked unavailable either —
|
|
88
|
+
* an email.inbox.list-shaped regression. Wire this into a test (or a boot
|
|
89
|
+
* self-check, once one exists) and fail loudly on a non-empty result.
|
|
90
|
+
*/
|
|
91
|
+
export function findUnreconciledAdvertisements(descriptors, results) {
|
|
92
|
+
const descriptorsById = new Map(descriptors.map((descriptor) => [descriptor.id, descriptor]));
|
|
93
|
+
const violations = [];
|
|
94
|
+
for (const result of results) {
|
|
95
|
+
if (result.status !== 'unavailable')
|
|
96
|
+
continue;
|
|
97
|
+
const descriptor = descriptorsById.get(result.methodId);
|
|
98
|
+
if (descriptor && descriptor.invokable !== false) {
|
|
99
|
+
violations.push(result.methodId);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return violations;
|
|
103
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method-catalog-runtime.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"method-catalog-runtime.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AA6H1E,eAAO,MAAM,sCAAsC,EAAE,SAAS,uBAAuB,EA2cpF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EMPTY_OBJECT_SCHEMA, BOOLEAN_SCHEMA, STRING_SCHEMA, NUMBER_SCHEMA, objectSchema, listOutputSchema, entityOutputSchema, bodyEnvelopeSchema, methodDescriptor, runtimeEventId, arraySchema, } from './method-catalog-shared.js';
|
|
2
2
|
import { enumSchema, nullableSchema } from './operator-contract-schemas-shared.js';
|
|
3
|
-
import { CONTINUITY_SNAPSHOT_SCHEMA, DISTRIBUTED_NODE_HOST_CONTRACT_SCHEMA, HEALTH_SNAPSHOT_SCHEMA, INTELLIGENCE_SNAPSHOT_SCHEMA, MEMORY_DOCTOR_REPORT_SCHEMA, MEMORY_VECTOR_STATS_SCHEMA, PROVIDER_ACCOUNT_SNAPSHOT_SCHEMA, PROVIDER_RUNTIME_SNAPSHOT_SCHEMA, PROVIDER_USAGE_SNAPSHOT_SCHEMA, REMOTE_PAIR_APPROVAL_OUTPUT_SCHEMA, REMOTE_PAIR_REQUEST_OUTPUT_SCHEMA, REMOTE_PAIR_REQUESTS_OUTPUT_SCHEMA, REMOTE_PEERS_OUTPUT_SCHEMA, REMOTE_PAIR_REQUEST_ACTION_INPUT_SCHEMA, REMOTE_PEER_DISCONNECT_INPUT_SCHEMA, REMOTE_PEER_INVOKE_INPUT_SCHEMA, REMOTE_PEER_INVOKE_OUTPUT_SCHEMA, REMOTE_PEER_OUTPUT_SCHEMA, REMOTE_PEER_TOKEN_REVOKE_INPUT_SCHEMA, REMOTE_PEER_TOKEN_ROTATE_INPUT_SCHEMA, REMOTE_PEER_TOKEN_ROTATE_OUTPUT_SCHEMA, REMOTE_SNAPSHOT_SCHEMA, REMOTE_WORK_LIST_OUTPUT_SCHEMA, REMOTE_WORK_CANCEL_INPUT_SCHEMA, REMOTE_WORK_OUTPUT_SCHEMA, SECURITY_SETTINGS_REPORT_SCHEMA, SETTINGS_SNAPSHOT_SCHEMA, WORKTREE_SNAPSHOT_SCHEMA, } from './operator-contract-schemas.js';
|
|
3
|
+
import { CONTINUITY_SNAPSHOT_SCHEMA, DISTRIBUTED_NODE_HOST_CONTRACT_SCHEMA, HEALTH_SNAPSHOT_SCHEMA, INTELLIGENCE_SNAPSHOT_SCHEMA, MEMORY_DOCTOR_REPORT_SCHEMA, MEMORY_VECTOR_STATS_SCHEMA, MEMORY_CLASS_SCHEMA, MEMORY_SCOPE_SCHEMA, MEMORY_REVIEW_STATE_SCHEMA, MEMORY_PROVENANCE_KIND_SCHEMA, MEMORY_PROVENANCE_LINK_SCHEMA, MEMORY_RECORD_SCHEMA, MEMORY_RECORD_SEARCH_OUTPUT_SCHEMA, MEMORY_RECORD_DELETE_OUTPUT_SCHEMA, PROVIDER_ACCOUNT_SNAPSHOT_SCHEMA, PROVIDER_RUNTIME_SNAPSHOT_SCHEMA, PROVIDER_USAGE_SNAPSHOT_SCHEMA, REMOTE_PAIR_APPROVAL_OUTPUT_SCHEMA, REMOTE_PAIR_REQUEST_OUTPUT_SCHEMA, REMOTE_PAIR_REQUESTS_OUTPUT_SCHEMA, REMOTE_PEERS_OUTPUT_SCHEMA, REMOTE_PAIR_REQUEST_ACTION_INPUT_SCHEMA, REMOTE_PEER_DISCONNECT_INPUT_SCHEMA, REMOTE_PEER_INVOKE_INPUT_SCHEMA, REMOTE_PEER_INVOKE_OUTPUT_SCHEMA, REMOTE_PEER_OUTPUT_SCHEMA, REMOTE_PEER_TOKEN_REVOKE_INPUT_SCHEMA, REMOTE_PEER_TOKEN_ROTATE_INPUT_SCHEMA, REMOTE_PEER_TOKEN_ROTATE_OUTPUT_SCHEMA, REMOTE_SNAPSHOT_SCHEMA, REMOTE_WORK_LIST_OUTPUT_SCHEMA, REMOTE_WORK_CANCEL_INPUT_SCHEMA, REMOTE_WORK_OUTPUT_SCHEMA, SECURITY_SETTINGS_REPORT_SCHEMA, SETTINGS_SNAPSHOT_SCHEMA, WORKTREE_SNAPSHOT_SCHEMA, } from './operator-contract-schemas.js';
|
|
4
4
|
const MCP_SCOPE_SCHEMA = enumSchema(['project', 'global']);
|
|
5
5
|
const MCP_SERVER_CONFIG_SCHEMA = objectSchema({
|
|
6
6
|
name: STRING_SCHEMA,
|
|
@@ -433,6 +433,88 @@ export const builtinGatewayRuntimeMethodDescriptors = [
|
|
|
433
433
|
}),
|
|
434
434
|
outputSchema: objectSchema({ records: arraySchema(objectSchema({}, [], { additionalProperties: true })) }, ['records']),
|
|
435
435
|
}),
|
|
436
|
+
methodDescriptor({
|
|
437
|
+
id: 'memory.records.add',
|
|
438
|
+
title: 'Add Memory Record',
|
|
439
|
+
description: 'Add a memory record to the daemon-owned canonical store. The daemon is the single writer for its store; a client surface routes its writes here instead of opening the store file, so two processes never write the same sql.js file. New records default to confidence 60 (the recall floor) and reviewState fresh unless the review block overrides them.',
|
|
440
|
+
category: 'memory',
|
|
441
|
+
scopes: ['write:memory'],
|
|
442
|
+
http: { method: 'POST', path: '/api/memory/records' },
|
|
443
|
+
inputSchema: bodyEnvelopeSchema({
|
|
444
|
+
cls: MEMORY_CLASS_SCHEMA,
|
|
445
|
+
summary: STRING_SCHEMA,
|
|
446
|
+
scope: MEMORY_SCOPE_SCHEMA,
|
|
447
|
+
detail: STRING_SCHEMA,
|
|
448
|
+
tags: arraySchema(STRING_SCHEMA),
|
|
449
|
+
provenance: arraySchema(MEMORY_PROVENANCE_LINK_SCHEMA),
|
|
450
|
+
review: objectSchema({
|
|
451
|
+
state: MEMORY_REVIEW_STATE_SCHEMA,
|
|
452
|
+
confidence: NUMBER_SCHEMA,
|
|
453
|
+
reviewedBy: STRING_SCHEMA,
|
|
454
|
+
staleReason: STRING_SCHEMA,
|
|
455
|
+
}),
|
|
456
|
+
}, ['cls', 'summary']),
|
|
457
|
+
outputSchema: entityOutputSchema('record', MEMORY_RECORD_SCHEMA),
|
|
458
|
+
}),
|
|
459
|
+
methodDescriptor({
|
|
460
|
+
id: 'memory.records.search',
|
|
461
|
+
title: 'Search Memory Records',
|
|
462
|
+
description: 'Search the canonical store, literal or semantic. When semantic is requested but the semantic index cannot be consulted, the search falls back to a literal scan and states the reason in indexUnavailableReason rather than returning a silent empty result that reads as "nothing was ever stored". With recall=true the cross-surface recall-honesty contract is applied: flagged (stale/contradicted) records are excluded outright and records below the 60% confidence floor are dropped, each exclusion counted honestly.',
|
|
463
|
+
category: 'memory',
|
|
464
|
+
scopes: ['read:memory'],
|
|
465
|
+
http: { method: 'POST', path: '/api/memory/records/search' },
|
|
466
|
+
inputSchema: bodyEnvelopeSchema({
|
|
467
|
+
scope: MEMORY_SCOPE_SCHEMA,
|
|
468
|
+
cls: MEMORY_CLASS_SCHEMA,
|
|
469
|
+
tags: arraySchema(STRING_SCHEMA),
|
|
470
|
+
query: STRING_SCHEMA,
|
|
471
|
+
semantic: BOOLEAN_SCHEMA,
|
|
472
|
+
since: NUMBER_SCHEMA,
|
|
473
|
+
reviewState: arraySchema(MEMORY_REVIEW_STATE_SCHEMA),
|
|
474
|
+
minConfidence: NUMBER_SCHEMA,
|
|
475
|
+
provenanceKinds: arraySchema(MEMORY_PROVENANCE_KIND_SCHEMA),
|
|
476
|
+
staleOnly: BOOLEAN_SCHEMA,
|
|
477
|
+
limit: NUMBER_SCHEMA,
|
|
478
|
+
recall: BOOLEAN_SCHEMA,
|
|
479
|
+
}),
|
|
480
|
+
outputSchema: MEMORY_RECORD_SEARCH_OUTPUT_SCHEMA,
|
|
481
|
+
}),
|
|
482
|
+
methodDescriptor({
|
|
483
|
+
id: 'memory.records.get',
|
|
484
|
+
title: 'Get Memory Record',
|
|
485
|
+
description: 'Return a single memory record by id from the canonical store, or 404 when no record with that id exists.',
|
|
486
|
+
category: 'memory',
|
|
487
|
+
scopes: ['read:memory'],
|
|
488
|
+
http: { method: 'GET', path: '/api/memory/records/{id}' },
|
|
489
|
+
inputSchema: objectSchema({ id: STRING_SCHEMA }, ['id']),
|
|
490
|
+
outputSchema: entityOutputSchema('record', MEMORY_RECORD_SCHEMA),
|
|
491
|
+
}),
|
|
492
|
+
methodDescriptor({
|
|
493
|
+
id: 'memory.records.update-review',
|
|
494
|
+
title: 'Update Memory Record Review',
|
|
495
|
+
description: 'Update a record\'s review signal (reviewState, confidence, reviewer, staleReason) in the canonical store. Marking a record stale or contradicted flags it so the recall-honesty contract will never inject it into a prompt again regardless of confidence. Returns 404 when no record with that id exists.',
|
|
496
|
+
category: 'memory',
|
|
497
|
+
scopes: ['write:memory'],
|
|
498
|
+
http: { method: 'POST', path: '/api/memory/records/{id}/review' },
|
|
499
|
+
inputSchema: bodyEnvelopeSchema({
|
|
500
|
+
id: STRING_SCHEMA,
|
|
501
|
+
state: MEMORY_REVIEW_STATE_SCHEMA,
|
|
502
|
+
confidence: NUMBER_SCHEMA,
|
|
503
|
+
reviewedBy: STRING_SCHEMA,
|
|
504
|
+
staleReason: STRING_SCHEMA,
|
|
505
|
+
}, ['id']),
|
|
506
|
+
outputSchema: entityOutputSchema('record', MEMORY_RECORD_SCHEMA),
|
|
507
|
+
}),
|
|
508
|
+
methodDescriptor({
|
|
509
|
+
id: 'memory.records.delete',
|
|
510
|
+
title: 'Delete Memory Record',
|
|
511
|
+
description: 'Permanently delete a memory record and its links from the canonical store. Delete means delete: the record is removed from the store and the semantic index, not merely flagged. Returns { deleted: false } when no record with that id existed — an honest boolean, never a 200 that pretends a phantom row was removed.',
|
|
512
|
+
category: 'memory',
|
|
513
|
+
scopes: ['write:memory'],
|
|
514
|
+
http: { method: 'DELETE', path: '/api/memory/records/{id}' },
|
|
515
|
+
inputSchema: objectSchema({ id: STRING_SCHEMA }, ['id']),
|
|
516
|
+
outputSchema: MEMORY_RECORD_DELETE_OUTPUT_SCHEMA,
|
|
517
|
+
}),
|
|
436
518
|
methodDescriptor({
|
|
437
519
|
id: 'scheduler.capacity',
|
|
438
520
|
title: 'Scheduler Capacity',
|
|
@@ -22,6 +22,35 @@ export interface GatewayMethodDescriptor {
|
|
|
22
22
|
readonly outputSchema?: Record<string, unknown> | undefined;
|
|
23
23
|
readonly pluginId?: string | undefined;
|
|
24
24
|
readonly dangerous?: boolean | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Defaults to `true`. When explicitly `false`, this method is NOT dispatchable
|
|
27
|
+
* through the generic HTTP/WS method-invocation surface
|
|
28
|
+
* (`invokeGatewayMethodCall`/`invokeWebSocketControlPlaneCall` in
|
|
29
|
+
* `../daemon/control-plane.ts`, guarded by `validateGatewayInvocation`, which
|
|
30
|
+
* rejects it with an honest 400 `NOT_INVOKABLE` before any handler or route is
|
|
31
|
+
* even considered) — nothing more, nothing less.
|
|
32
|
+
*
|
|
33
|
+
* This is a statement about ONE dispatch path, not a claim that the method can
|
|
34
|
+
* never run anywhere. Two independent reasons a descriptor carries
|
|
35
|
+
* `invokable: false`:
|
|
36
|
+
* - No route or internal handler exists at all for this build (e.g. `email.*`,
|
|
37
|
+
* `calendar.*` — cataloged so the contract is honest about the capability's
|
|
38
|
+
* shape, but genuinely unavailable everywhere).
|
|
39
|
+
* - A real route DOES exist and IS served (e.g. `voice.tts.stream`,
|
|
40
|
+
* `control.events.stream`, `artifacts.content.get`), just not through the
|
|
41
|
+
* generic JSON-envelope invoke path — the response is binary/streaming/HTML
|
|
42
|
+
* (see `metadata.responseKind`) and callers must use the direct HTTP path
|
|
43
|
+
* instead.
|
|
44
|
+
*
|
|
45
|
+
* A runtime that registers a real in-process handler for this method id (via
|
|
46
|
+
* `GatewayMethodCatalog.register(descriptor, handler)`) and calls
|
|
47
|
+
* `GatewayMethodCatalog.invoke()` DIRECTLY (bypassing `validateGatewayInvocation`)
|
|
48
|
+
* still serves it — `invoke()` itself does not consult this flag, by design: a
|
|
49
|
+
* consuming runtime that has wired up a genuine handler is authoritative over
|
|
50
|
+
* whether the method actually works, this descriptor is not. `invoke()` only
|
|
51
|
+
* refuses when BOTH `invokable === false` AND no handler is registered — see
|
|
52
|
+
* `method-catalog.ts`'s `invoke()`.
|
|
53
|
+
*/
|
|
25
54
|
readonly invokable?: boolean | undefined;
|
|
26
55
|
readonly metadata?: Record<string, unknown> | undefined;
|
|
27
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method-catalog-shared.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog-shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,IAAI,GAAG,UAAU,CAAC;AAChE,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,QAAQ,CAAC;AACvD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,eAAe,GAAG,OAAO,GAAG,aAAa,CAAC;AACvF,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,IAAI,GAAG,UAAU,CAAC;AAE9D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IACrD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,QAA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O,CAAC,CAEzB;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACpC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzB;AAED,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACpC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAIzB;AAED,wBAAgB,kBAAkB,CAChC,UAAU,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM,EACxD,QAAQ,GAAE,SAAS,MAAM,EAAO,GAC/B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAIzB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,uBAAuB,EAAE,QAAQ,GAAG,WAAW,GAAG,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,QAAQ,GAAG,WAAW,GAAG,QAAQ,CAAC,CAAC,GAAG,uBAAuB,CAO7M;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC,GAAG,sBAAsB,CAKvJ;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAEjE;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,GAAG,sBAAsB,CAY1G"}
|
|
@@ -24,6 +24,15 @@ export declare class GatewayMethodCatalog {
|
|
|
24
24
|
getAllScopes(options?: {
|
|
25
25
|
readonly includeWrite?: boolean;
|
|
26
26
|
}): string[];
|
|
27
|
+
/**
|
|
28
|
+
* Run a method's registered internal handler directly. Note this does NOT consult
|
|
29
|
+
* `descriptor.invokable` for a method that HAS a handler — see the field's doc
|
|
30
|
+
* comment in method-catalog-shared.ts: a runtime that registered a real handler is
|
|
31
|
+
* authoritative over whether the method works, the descriptor's `invokable` flag
|
|
32
|
+
* is not. `invokeGatewayMethodCall` (../daemon/control-plane.ts) is what enforces
|
|
33
|
+
* `invokable` for the generic HTTP/WS dispatch surface, via
|
|
34
|
+
* `validateGatewayInvocation`, BEFORE ever reaching here.
|
|
35
|
+
*/
|
|
27
36
|
invoke(id: string, invocation: GatewayMethodInvocation): Promise<unknown>;
|
|
28
37
|
}
|
|
29
38
|
//# sourceMappingURL=method-catalog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method-catalog.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"method-catalog.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AAOpC,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,8BAA8B,EAC9B,wBAAwB,EACxB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AA8DpC,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA8C;IACtE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6C;gBAExD,OAAO,GAAE;QAAE,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAA;KAAO;IAWhE,QAAQ,CACN,UAAU,EAAE,uBAAuB,EACnC,OAAO,CAAC,EAAE,oBAAoB,EAC9B,OAAO,GAAE;QAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAO,GAC3C,MAAM,IAAI;IAcb,aAAa,CACX,UAAU,EAAE,sBAAsB,EAClC,OAAO,GAAE;QAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAO,GAC3C,MAAM,IAAI;IAcb,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAI/B,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIpC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAa1C,IAAI,CAAC,OAAO,GAAE,wBAA6B,GAAG,uBAAuB,EAAE;IASvE,UAAU,CAAC,OAAO,GAAE,uBAA4B,GAAG,sBAAsB,EAAE;IAU3E,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,uBAAuB,GAAG,IAAI;IAI/C,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,sBAAsB,GAAG,IAAI;IAInD,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAI/B,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,uBAAuB,GAAG,IAAI;IAUnF,YAAY,CAAC,OAAO,GAAE;QAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAO,GAAG,MAAM,EAAE;IAiBzE;;;;;;;;OAQG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,uBAAuB,GAAG,OAAO,CAAC,OAAO,CAAC;CA8BhF"}
|
|
@@ -6,7 +6,10 @@ import { builtinGatewayCalendarMethodDescriptors, } from './method-catalog-calen
|
|
|
6
6
|
import { builtinGatewayEventDescriptors, } from './method-catalog-events.js';
|
|
7
7
|
import { builtinGatewayKnowledgeMethodDescriptors, } from './method-catalog-knowledge.js';
|
|
8
8
|
import { builtinGatewayMediaMethodDescriptors, } from './method-catalog-media.js';
|
|
9
|
+
import { builtinGatewayPushMethodDescriptors, } from './method-catalog-push.js';
|
|
9
10
|
import { builtinGatewayRuntimeMethodDescriptors, } from './method-catalog-runtime.js';
|
|
11
|
+
import { GatewayVerbError } from './routes/gateway-verb-error.js';
|
|
12
|
+
import { SDKErrorCodes } from '@pellux/goodvibes-errors';
|
|
10
13
|
const BUILTIN_GATEWAY_EVENTS = builtinGatewayEventDescriptors;
|
|
11
14
|
const BUILTIN_GATEWAY_METHODS = [
|
|
12
15
|
...builtinGatewayControlMethodDescriptors,
|
|
@@ -17,6 +20,7 @@ const BUILTIN_GATEWAY_METHODS = [
|
|
|
17
20
|
...builtinGatewayKnowledgeMethodDescriptors,
|
|
18
21
|
...builtinGatewayMediaMethodDescriptors,
|
|
19
22
|
...builtinGatewayAdminMethodDescriptors,
|
|
23
|
+
...builtinGatewayPushMethodDescriptors,
|
|
20
24
|
];
|
|
21
25
|
function normalizeDescriptor(descriptor) {
|
|
22
26
|
const id = descriptor.id.trim();
|
|
@@ -168,12 +172,39 @@ export class GatewayMethodCatalog {
|
|
|
168
172
|
}
|
|
169
173
|
return [...scopes].sort();
|
|
170
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* Run a method's registered internal handler directly. Note this does NOT consult
|
|
177
|
+
* `descriptor.invokable` for a method that HAS a handler — see the field's doc
|
|
178
|
+
* comment in method-catalog-shared.ts: a runtime that registered a real handler is
|
|
179
|
+
* authoritative over whether the method works, the descriptor's `invokable` flag
|
|
180
|
+
* is not. `invokeGatewayMethodCall` (../daemon/control-plane.ts) is what enforces
|
|
181
|
+
* `invokable` for the generic HTTP/WS dispatch surface, via
|
|
182
|
+
* `validateGatewayInvocation`, BEFORE ever reaching here.
|
|
183
|
+
*/
|
|
171
184
|
async invoke(id, invocation) {
|
|
172
185
|
const entry = this.methods.get(id);
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
186
|
+
// Uncataloged id — a real machine code (METHOD_NOT_FOUND), not a prose Error, so
|
|
187
|
+
// any direct caller of invoke() (bypassing the HTTP dispatch's own 404 below) gets
|
|
188
|
+
// the same code-driven signal as invokeGatewayMethod/getGatewayMethod
|
|
189
|
+
// (daemon-sdk/control-routes.ts) and invokeGatewayMethodCall (../daemon/control-
|
|
190
|
+
// plane.ts) — distinct from NOT_INVOKABLE (cataloged but not invokable), which is
|
|
191
|
+
// the id existing but refusing dispatch, not the id being unknown outright.
|
|
192
|
+
if (!entry) {
|
|
193
|
+
throw new GatewayVerbError(`Unknown gateway method: ${id}`, SDKErrorCodes.METHOD_NOT_FOUND, 404);
|
|
194
|
+
}
|
|
195
|
+
if (!entry.handler) {
|
|
196
|
+
// A method explicitly marked invokable:false with no registered handler is
|
|
197
|
+
// honestly "not invokable anywhere" (see the field's doc comment) — distinct
|
|
198
|
+
// from a method that a caller expected to have a handler here but doesn't (a
|
|
199
|
+
// real bug in that caller's wiring). A GatewayVerbError flows straight through
|
|
200
|
+
// invokeGatewayMethodCall's existing catch into an honest 400/NOT_INVOKABLE
|
|
201
|
+
// instead of a generic 500 — and gives any OTHER caller of `invoke()` directly
|
|
202
|
+
// (bypassing the HTTP gate) the same honest, typed signal.
|
|
203
|
+
if (entry.descriptor.invokable === false) {
|
|
204
|
+
throw new GatewayVerbError(`Gateway method is not invokable and has no registered handler: ${id}`, 'NOT_INVOKABLE', 400);
|
|
205
|
+
}
|
|
176
206
|
throw new Error(`Gateway method has no internal handler: ${id}`);
|
|
207
|
+
}
|
|
177
208
|
return entry.handler(invocation);
|
|
178
209
|
}
|
|
179
210
|
}
|