wicked-crew 0.18.20 → 0.18.22
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/api/audit.d.ts +28 -1
- package/dist/api/audit.d.ts.map +1 -1
- package/dist/api/audit.js +90 -9
- package/dist/api/audit.js.map +1 -1
- package/dist/api/auth.d.ts +7 -0
- package/dist/api/auth.d.ts.map +1 -1
- package/dist/api/auth.js +53 -10
- package/dist/api/auth.js.map +1 -1
- package/dist/api/capture.d.ts +16 -4
- package/dist/api/capture.d.ts.map +1 -1
- package/dist/api/capture.js +20 -12
- package/dist/api/capture.js.map +1 -1
- package/dist/api/chat-context.d.ts +17 -0
- package/dist/api/chat-context.d.ts.map +1 -1
- package/dist/api/chat-context.js +94 -5
- package/dist/api/chat-context.js.map +1 -1
- package/dist/api/chat-freshness.js +2 -2
- package/dist/api/chat-freshness.js.map +1 -1
- package/dist/api/chat-jobs.d.ts +54 -0
- package/dist/api/chat-jobs.d.ts.map +1 -1
- package/dist/api/chat-jobs.js +199 -7
- package/dist/api/chat-jobs.js.map +1 -1
- package/dist/api/chat-proposals.d.ts +62 -12
- package/dist/api/chat-proposals.d.ts.map +1 -1
- package/dist/api/chat-proposals.js +257 -52
- package/dist/api/chat-proposals.js.map +1 -1
- package/dist/api/chat-requirements.d.ts.map +1 -1
- package/dist/api/chat-requirements.js +4 -1
- package/dist/api/chat-requirements.js.map +1 -1
- package/dist/api/chat-scope.d.ts +12 -0
- package/dist/api/chat-scope.d.ts.map +1 -1
- package/dist/api/chat-scope.js +35 -5
- package/dist/api/chat-scope.js.map +1 -1
- package/dist/api/cluster-status.d.ts +41 -12
- package/dist/api/cluster-status.d.ts.map +1 -1
- package/dist/api/cluster-status.js +148 -3
- package/dist/api/cluster-status.js.map +1 -1
- package/dist/api/codebase-archive.js +2 -2
- package/dist/api/codebase-archive.js.map +1 -1
- package/dist/api/compose-facts.d.ts +35 -0
- package/dist/api/compose-facts.d.ts.map +1 -0
- package/dist/api/compose-facts.js +46 -0
- package/dist/api/compose-facts.js.map +1 -0
- package/dist/api/cut-read.d.ts +62 -0
- package/dist/api/cut-read.d.ts.map +1 -0
- package/dist/api/cut-read.js +101 -0
- package/dist/api/cut-read.js.map +1 -0
- package/dist/api/delivery-cache.d.ts +2 -0
- package/dist/api/delivery-cache.d.ts.map +1 -1
- package/dist/api/delivery-cache.js +1 -2
- package/dist/api/delivery-cache.js.map +1 -1
- package/dist/api/delivery-index.d.ts +2 -2
- package/dist/api/delivery-index.d.ts.map +1 -1
- package/dist/api/delivery-index.js +1 -2
- package/dist/api/delivery-index.js.map +1 -1
- package/dist/api/desk-snoozes.d.ts +54 -0
- package/dist/api/desk-snoozes.d.ts.map +1 -0
- package/dist/api/desk-snoozes.js +174 -0
- package/dist/api/desk-snoozes.js.map +1 -0
- package/dist/api/diagnostics.d.ts +4 -0
- package/dist/api/diagnostics.d.ts.map +1 -1
- package/dist/api/diagnostics.js +15 -7
- package/dist/api/diagnostics.js.map +1 -1
- package/dist/api/disk-stores.d.ts +66 -0
- package/dist/api/disk-stores.d.ts.map +1 -0
- package/dist/api/disk-stores.js +206 -0
- package/dist/api/disk-stores.js.map +1 -0
- package/dist/api/eval-compare.d.ts +1 -1
- package/dist/api/eval-compare.js +1 -1
- package/dist/api/eval-sample.d.ts +7 -0
- package/dist/api/eval-sample.d.ts.map +1 -1
- package/dist/api/eval-sample.js +20 -0
- package/dist/api/eval-sample.js.map +1 -1
- package/dist/api/gate-cache.d.ts +8 -0
- package/dist/api/gate-cache.d.ts.map +1 -1
- package/dist/api/gate-cache.js +8 -1
- package/dist/api/gate-cache.js.map +1 -1
- package/dist/api/governance-steering.d.ts +13 -0
- package/dist/api/governance-steering.d.ts.map +1 -1
- package/dist/api/governance-steering.js +56 -7
- package/dist/api/governance-steering.js.map +1 -1
- package/dist/api/mcp.d.ts +19 -1
- package/dist/api/mcp.d.ts.map +1 -1
- package/dist/api/mcp.js +123 -3
- package/dist/api/mcp.js.map +1 -1
- package/dist/api/needs.d.ts +23 -0
- package/dist/api/needs.d.ts.map +1 -1
- package/dist/api/needs.js +124 -19
- package/dist/api/needs.js.map +1 -1
- package/dist/api/onboarding-capture.d.ts +21 -1
- package/dist/api/onboarding-capture.d.ts.map +1 -1
- package/dist/api/onboarding-capture.js +112 -8
- package/dist/api/onboarding-capture.js.map +1 -1
- package/dist/api/policy-landing.d.ts +36 -0
- package/dist/api/policy-landing.d.ts.map +1 -1
- package/dist/api/policy-landing.js +123 -4
- package/dist/api/policy-landing.js.map +1 -1
- package/dist/api/post-hoc-deliver.d.ts +7 -0
- package/dist/api/post-hoc-deliver.d.ts.map +1 -1
- package/dist/api/post-hoc-deliver.js +17 -5
- package/dist/api/post-hoc-deliver.js.map +1 -1
- package/dist/api/product-publish.d.ts +242 -0
- package/dist/api/product-publish.d.ts.map +1 -0
- package/dist/api/product-publish.js +902 -0
- package/dist/api/product-publish.js.map +1 -0
- package/dist/api/product.d.ts +5 -6
- package/dist/api/product.d.ts.map +1 -1
- package/dist/api/product.js +4 -4
- package/dist/api/product.js.map +1 -1
- package/dist/api/proposal-cut.d.ts +95 -0
- package/dist/api/proposal-cut.d.ts.map +1 -0
- package/dist/api/proposal-cut.js +231 -0
- package/dist/api/proposal-cut.js.map +1 -0
- package/dist/api/proposal-decisions.d.ts +44 -0
- package/dist/api/proposal-decisions.d.ts.map +1 -0
- package/dist/api/proposal-decisions.js +85 -0
- package/dist/api/proposal-decisions.js.map +1 -0
- package/dist/api/proposal-onboard.d.ts +29 -0
- package/dist/api/proposal-onboard.d.ts.map +1 -1
- package/dist/api/proposal-onboard.js +162 -11
- package/dist/api/proposal-onboard.js.map +1 -1
- package/dist/api/recording.d.ts.map +1 -1
- package/dist/api/recording.js +4 -5
- package/dist/api/recording.js.map +1 -1
- package/dist/api/redeliver.d.ts.map +1 -1
- package/dist/api/redeliver.js +11 -7
- package/dist/api/redeliver.js.map +1 -1
- package/dist/api/repo-input.d.ts.map +1 -1
- package/dist/api/repo-input.js +5 -2
- package/dist/api/repo-input.js.map +1 -1
- package/dist/api/repo-origins.d.ts +24 -0
- package/dist/api/repo-origins.d.ts.map +1 -0
- package/dist/api/repo-origins.js +71 -0
- package/dist/api/repo-origins.js.map +1 -0
- package/dist/api/requirements.d.ts +39 -4
- package/dist/api/requirements.d.ts.map +1 -1
- package/dist/api/requirements.js +76 -5
- package/dist/api/requirements.js.map +1 -1
- package/dist/api/review-change.d.ts +5 -6
- package/dist/api/review-change.d.ts.map +1 -1
- package/dist/api/review-change.js +45 -8
- package/dist/api/review-change.js.map +1 -1
- package/dist/api/routes.d.ts +48 -4
- package/dist/api/routes.d.ts.map +1 -1
- package/dist/api/routes.js +926 -268
- package/dist/api/routes.js.map +1 -1
- package/dist/api/run-liveness.d.ts.map +1 -1
- package/dist/api/run-liveness.js +3 -1
- package/dist/api/run-liveness.js.map +1 -1
- package/dist/api/run-sources.d.ts +11 -1
- package/dist/api/run-sources.d.ts.map +1 -1
- package/dist/api/run-sources.js +26 -3
- package/dist/api/run-sources.js.map +1 -1
- package/dist/api/run-timing-index.d.ts +56 -1
- package/dist/api/run-timing-index.d.ts.map +1 -1
- package/dist/api/run-timing-index.js +164 -10
- package/dist/api/run-timing-index.js.map +1 -1
- package/dist/api/runtime-state.d.ts +6 -0
- package/dist/api/runtime-state.d.ts.map +1 -1
- package/dist/api/runtime-state.js +14 -3
- package/dist/api/runtime-state.js.map +1 -1
- package/dist/api/seat-agents.d.ts.map +1 -1
- package/dist/api/seat-agents.js +3 -3
- package/dist/api/seat-agents.js.map +1 -1
- package/dist/api/seat-container-login.d.ts +17 -19
- package/dist/api/seat-container-login.d.ts.map +1 -1
- package/dist/api/seat-container-login.js +51 -76
- package/dist/api/seat-container-login.js.map +1 -1
- package/dist/api/seat-governance.d.ts +3 -2
- package/dist/api/seat-governance.d.ts.map +1 -1
- package/dist/api/seat-governance.js +31 -9
- package/dist/api/seat-governance.js.map +1 -1
- package/dist/api/seat-standing.d.ts +8 -0
- package/dist/api/seat-standing.d.ts.map +1 -1
- package/dist/api/seat-standing.js +26 -1
- package/dist/api/seat-standing.js.map +1 -1
- package/dist/api/server.d.ts +7 -0
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +93 -39
- package/dist/api/server.js.map +1 -1
- package/dist/api/start-on-login.d.ts +4 -0
- package/dist/api/start-on-login.d.ts.map +1 -0
- package/dist/api/start-on-login.js +35 -0
- package/dist/api/start-on-login.js.map +1 -0
- package/dist/api/steering-landing.d.ts +33 -8
- package/dist/api/steering-landing.d.ts.map +1 -1
- package/dist/api/steering-landing.js +235 -51
- package/dist/api/steering-landing.js.map +1 -1
- package/dist/api/system-snapshot.d.ts +2 -1
- package/dist/api/system-snapshot.d.ts.map +1 -1
- package/dist/api/system-snapshot.js +22 -9
- package/dist/api/system-snapshot.js.map +1 -1
- package/dist/api/ui-text.d.ts.map +1 -1
- package/dist/api/ui-text.js +3 -1
- package/dist/api/ui-text.js.map +1 -1
- package/dist/api/worktree-sweep.d.ts +7 -3
- package/dist/api/worktree-sweep.d.ts.map +1 -1
- package/dist/api/worktree-sweep.js +10 -6
- package/dist/api/worktree-sweep.js.map +1 -1
- package/dist/apps/exec/recall.d.ts.map +1 -1
- package/dist/apps/exec/recall.js +4 -4
- package/dist/apps/exec/recall.js.map +1 -1
- package/dist/apps/git.js +2 -2
- package/dist/apps/git.js.map +1 -1
- package/dist/apps/publish/manifest.d.ts +2 -0
- package/dist/apps/publish/manifest.d.ts.map +1 -1
- package/dist/apps/publish/manifest.js +8 -3
- package/dist/apps/publish/manifest.js.map +1 -1
- package/dist/apps/publish/run.d.ts +11 -1
- package/dist/apps/publish/run.d.ts.map +1 -1
- package/dist/apps/publish/run.js +97 -17
- package/dist/apps/publish/run.js.map +1 -1
- package/dist/apps/routes.d.ts +2 -0
- package/dist/apps/routes.d.ts.map +1 -1
- package/dist/apps/routes.js +45 -2
- package/dist/apps/routes.js.map +1 -1
- package/dist/apps/store.d.ts +35 -3
- package/dist/apps/store.d.ts.map +1 -1
- package/dist/apps/store.js +73 -9
- package/dist/apps/store.js.map +1 -1
- package/dist/apps/turns.d.ts +25 -2
- package/dist/apps/turns.d.ts.map +1 -1
- package/dist/apps/turns.js +276 -11
- package/dist/apps/turns.js.map +1 -1
- package/dist/apps-server/runners/sqlite-runner.mjs +39 -1
- package/dist/apps-server/server/lib/bundle/server.mjs +124 -14
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +27 -52
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/start-stand-ins.d.ts +13 -0
- package/dist/cli/start-stand-ins.d.ts.map +1 -0
- package/dist/cli/start-stand-ins.js +30 -0
- package/dist/cli/start-stand-ins.js.map +1 -0
- package/dist/core/adapter.d.ts +66 -14
- package/dist/core/adapter.d.ts.map +1 -1
- package/dist/core/adapter.js +228 -56
- package/dist/core/adapter.js.map +1 -1
- package/dist/core/ado-deliver-helper.d.ts +2 -1
- package/dist/core/ado-deliver-helper.d.ts.map +1 -1
- package/dist/core/ado-deliver-helper.js +26 -1
- package/dist/core/ado-deliver-helper.js.map +1 -1
- package/dist/core/ado-env.d.ts +17 -0
- package/dist/core/ado-env.d.ts.map +1 -0
- package/dist/core/ado-env.js +34 -0
- package/dist/core/ado-env.js.map +1 -0
- package/dist/core/assurance.d.ts +10 -0
- package/dist/core/assurance.d.ts.map +1 -1
- package/dist/core/assurance.js +23 -0
- package/dist/core/assurance.js.map +1 -1
- package/dist/core/deliver-text.d.ts +19 -0
- package/dist/core/deliver-text.d.ts.map +1 -1
- package/dist/core/deliver-text.js +77 -1
- package/dist/core/deliver-text.js.map +1 -1
- package/dist/core/deliver.d.ts +49 -1
- package/dist/core/deliver.d.ts.map +1 -1
- package/dist/core/deliver.js +142 -6
- package/dist/core/deliver.js.map +1 -1
- package/dist/core/estate-mcp-client.d.ts.map +1 -1
- package/dist/core/estate-mcp-client.js +4 -8
- package/dist/core/estate-mcp-client.js.map +1 -1
- package/dist/core/exec.d.ts +16 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +32 -2
- package/dist/core/exec.js.map +1 -1
- package/dist/core/governance-store.d.ts +3 -1
- package/dist/core/governance-store.d.ts.map +1 -1
- package/dist/core/governance-store.js +7 -2
- package/dist/core/governance-store.js.map +1 -1
- package/dist/core/linked-issues.d.ts +13 -2
- package/dist/core/linked-issues.d.ts.map +1 -1
- package/dist/core/linked-issues.js +135 -4
- package/dist/core/linked-issues.js.map +1 -1
- package/dist/core/redeliver.js +2 -2
- package/dist/core/redeliver.js.map +1 -1
- package/dist/core/repo-clone.d.ts +64 -0
- package/dist/core/repo-clone.d.ts.map +1 -0
- package/dist/core/repo-clone.js +307 -0
- package/dist/core/repo-clone.js.map +1 -0
- package/dist/core/run-identity.d.ts.map +1 -1
- package/dist/core/run-identity.js +3 -0
- package/dist/core/run-identity.js.map +1 -1
- package/dist/core/run-log-facts.d.ts +56 -0
- package/dist/core/run-log-facts.d.ts.map +1 -0
- package/dist/core/run-log-facts.js +230 -0
- package/dist/core/run-log-facts.js.map +1 -0
- package/dist/core/run-read-lane.d.ts +30 -0
- package/dist/core/run-read-lane.d.ts.map +1 -0
- package/dist/core/run-read-lane.js +103 -0
- package/dist/core/run-read-lane.js.map +1 -0
- package/dist/core/shutdown.d.ts +27 -0
- package/dist/core/shutdown.d.ts.map +1 -1
- package/dist/core/shutdown.js +72 -0
- package/dist/core/shutdown.js.map +1 -1
- package/dist/core/stand-in.d.ts +40 -0
- package/dist/core/stand-in.d.ts.map +1 -0
- package/dist/core/stand-in.js +118 -0
- package/dist/core/stand-in.js.map +1 -0
- package/dist/core/types.d.ts +27 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/core/walkthrough-root.d.ts.map +1 -1
- package/dist/core/walkthrough-root.js +3 -5
- package/dist/core/walkthrough-root.js.map +1 -1
- package/dist/core/wicked-home.d.ts +9 -0
- package/dist/core/wicked-home.d.ts.map +1 -0
- package/dist/core/wicked-home.js +25 -0
- package/dist/core/wicked-home.js.map +1 -0
- package/dist/decisions/consider.d.ts +2 -1
- package/dist/decisions/consider.d.ts.map +1 -1
- package/dist/decisions/consider.js +2 -2
- package/dist/decisions/consider.js.map +1 -1
- package/dist/decisions/land.d.ts +2 -0
- package/dist/decisions/land.d.ts.map +1 -1
- package/dist/decisions/land.js +16 -3
- package/dist/decisions/land.js.map +1 -1
- package/dist/decisions/rules-brief.d.ts +2 -1
- package/dist/decisions/rules-brief.d.ts.map +1 -1
- package/dist/decisions/rules-brief.js +3 -2
- package/dist/decisions/rules-brief.js.map +1 -1
- package/dist/editors/conformance-runtime.d.ts +0 -2
- package/dist/editors/conformance-runtime.d.ts.map +1 -1
- package/dist/editors/conformance-runtime.js +0 -4
- package/dist/editors/conformance-runtime.js.map +1 -1
- package/dist/editors/pack-extras.d.ts +162 -0
- package/dist/editors/pack-extras.d.ts.map +1 -0
- package/dist/editors/pack-extras.js +596 -0
- package/dist/editors/pack-extras.js.map +1 -0
- package/dist/editors/pack-install.d.ts +26 -22
- package/dist/editors/pack-install.d.ts.map +1 -1
- package/dist/editors/pack-install.js +187 -80
- package/dist/editors/pack-install.js.map +1 -1
- package/dist/editors/registry.d.ts +66 -13
- package/dist/editors/registry.d.ts.map +1 -1
- package/dist/editors/registry.js +147 -24
- package/dist/editors/registry.js.map +1 -1
- package/dist/editors/routes.d.ts +10 -5
- package/dist/editors/routes.d.ts.map +1 -1
- package/dist/editors/routes.js +45 -11
- package/dist/editors/routes.js.map +1 -1
- package/dist/editors/visuals.d.ts +4 -3
- package/dist/editors/visuals.d.ts.map +1 -1
- package/dist/editors/visuals.js +17 -7
- package/dist/editors/visuals.js.map +1 -1
- package/dist/evals/runner.js +1 -1
- package/dist/evals/runner.js.map +1 -1
- package/dist/evals/shape.d.ts +7 -1
- package/dist/evals/shape.d.ts.map +1 -1
- package/dist/evals/shape.js +26 -6
- package/dist/evals/shape.js.map +1 -1
- package/dist/evals/workflow.d.ts +16 -3
- package/dist/evals/workflow.d.ts.map +1 -1
- package/dist/evals/workflow.js +31 -6
- package/dist/evals/workflow.js.map +1 -1
- package/dist/insights/review-service.d.ts +24 -3
- package/dist/insights/review-service.d.ts.map +1 -1
- package/dist/insights/review-service.js +75 -12
- package/dist/insights/review-service.js.map +1 -1
- package/dist/insights/routes.d.ts +2 -1
- package/dist/insights/routes.d.ts.map +1 -1
- package/dist/insights/routes.js +19 -4
- package/dist/insights/routes.js.map +1 -1
- package/dist/insights/run-facts.d.ts +5 -0
- package/dist/insights/run-facts.d.ts.map +1 -1
- package/dist/insights/run-facts.js +15 -0
- package/dist/insights/run-facts.js.map +1 -1
- package/dist/insights/workflow.d.ts +2 -1
- package/dist/insights/workflow.d.ts.map +1 -1
- package/dist/insights/workflow.js +4 -4
- package/dist/insights/workflow.js.map +1 -1
- package/dist/inspect/service.d.ts +3 -2
- package/dist/inspect/service.d.ts.map +1 -1
- package/dist/inspect/service.js +4 -4
- package/dist/inspect/service.js.map +1 -1
- package/dist/interactive/bridge-pool.d.ts +5 -2
- package/dist/interactive/bridge-pool.d.ts.map +1 -1
- package/dist/interactive/bridge-pool.js +10 -5
- package/dist/interactive/bridge-pool.js.map +1 -1
- package/dist/interactive/chat-events.d.ts.map +1 -1
- package/dist/interactive/chat-events.js +7 -1
- package/dist/interactive/chat-events.js.map +1 -1
- package/dist/interactive/draft-events.d.ts +3 -0
- package/dist/interactive/draft-events.d.ts.map +1 -1
- package/dist/interactive/draft-events.js +5 -8
- package/dist/interactive/draft-events.js.map +1 -1
- package/dist/interactive/draft-skill.d.ts +56 -3
- package/dist/interactive/draft-skill.d.ts.map +1 -1
- package/dist/interactive/draft-skill.js +129 -20
- package/dist/interactive/draft-skill.js.map +1 -1
- package/dist/interactive/landing-guard.d.ts +30 -5
- package/dist/interactive/landing-guard.d.ts.map +1 -1
- package/dist/interactive/landing-guard.js +196 -6
- package/dist/interactive/landing-guard.js.map +1 -1
- package/dist/interactive/proposal-create.d.ts.map +1 -1
- package/dist/interactive/proposal-create.js +1 -0
- package/dist/interactive/proposal-create.js.map +1 -1
- package/dist/interactive/proposal-refine.d.ts.map +1 -1
- package/dist/interactive/proposal-refine.js +16 -1
- package/dist/interactive/proposal-refine.js.map +1 -1
- package/dist/interactive/review-events.js +1 -1
- package/dist/interactive/review-events.js.map +1 -1
- package/dist/interactive/run-units.d.ts.map +1 -1
- package/dist/interactive/run-units.js +3 -2
- package/dist/interactive/run-units.js.map +1 -1
- package/dist/interactive/source-packet.d.ts +8 -0
- package/dist/interactive/source-packet.d.ts.map +1 -1
- package/dist/interactive/source-packet.js +47 -6
- package/dist/interactive/source-packet.js.map +1 -1
- package/dist/knowledge/adapters/toolbox/memory.d.ts.map +1 -1
- package/dist/knowledge/adapters/toolbox/memory.js +3 -2
- package/dist/knowledge/adapters/toolbox/memory.js.map +1 -1
- package/dist/knowledge/adapters/toolbox/supervisor.d.ts +21 -1
- package/dist/knowledge/adapters/toolbox/supervisor.d.ts.map +1 -1
- package/dist/knowledge/adapters/toolbox/supervisor.js +76 -26
- package/dist/knowledge/adapters/toolbox/supervisor.js.map +1 -1
- package/dist/knowledge/estate-write.d.ts +5 -0
- package/dist/knowledge/estate-write.d.ts.map +1 -1
- package/dist/knowledge/estate-write.js +7 -0
- package/dist/knowledge/estate-write.js.map +1 -1
- package/dist/knowledge/projector.d.ts +60 -5
- package/dist/knowledge/projector.d.ts.map +1 -1
- package/dist/knowledge/projector.js +264 -21
- package/dist/knowledge/projector.js.map +1 -1
- package/dist/knowledge/shapes/map.d.ts.map +1 -1
- package/dist/knowledge/shapes/map.js +12 -2
- package/dist/knowledge/shapes/map.js.map +1 -1
- package/dist/knowledge/shapes/routes.d.ts +1 -1
- package/dist/knowledge/shapes/routes.d.ts.map +1 -1
- package/dist/knowledge/shapes/routes.js +42 -16
- package/dist/knowledge/shapes/routes.js.map +1 -1
- package/dist/knowledge/shapes/shapes.d.ts +60 -13
- package/dist/knowledge/shapes/shapes.d.ts.map +1 -1
- package/dist/knowledge/shapes/shapes.js +199 -31
- package/dist/knowledge/shapes/shapes.js.map +1 -1
- package/dist/knowledge/shapes/verified.d.ts.map +1 -1
- package/dist/knowledge/shapes/verified.js +3 -2
- package/dist/knowledge/shapes/verified.js.map +1 -1
- package/dist/knowledge/trackers/addresses.d.ts +27 -3
- package/dist/knowledge/trackers/addresses.d.ts.map +1 -1
- package/dist/knowledge/trackers/addresses.js +33 -5
- package/dist/knowledge/trackers/addresses.js.map +1 -1
- package/dist/knowledge/trackers/gate-pm.d.ts.map +1 -1
- package/dist/knowledge/trackers/gate-pm.js +4 -2
- package/dist/knowledge/trackers/gate-pm.js.map +1 -1
- package/dist/knowledge/trackers/projector.d.ts +3 -1
- package/dist/knowledge/trackers/projector.d.ts.map +1 -1
- package/dist/knowledge/trackers/projector.js +59 -8
- package/dist/knowledge/trackers/projector.js.map +1 -1
- package/dist/knowledge/trackers/set.d.ts +28 -0
- package/dist/knowledge/trackers/set.d.ts.map +1 -1
- package/dist/knowledge/trackers/set.js +26 -0
- package/dist/knowledge/trackers/set.js.map +1 -1
- package/dist/learn/scheduler.d.ts.map +1 -1
- package/dist/learn/scheduler.js +11 -2
- package/dist/learn/scheduler.js.map +1 -1
- package/dist/learnings/extract.d.ts +9 -3
- package/dist/learnings/extract.d.ts.map +1 -1
- package/dist/learnings/extract.js +62 -4
- package/dist/learnings/extract.js.map +1 -1
- package/dist/learnings/replacement-lineage.d.ts +3 -2
- package/dist/learnings/replacement-lineage.d.ts.map +1 -1
- package/dist/learnings/replacement-lineage.js +7 -6
- package/dist/learnings/replacement-lineage.js.map +1 -1
- package/dist/learnings/service.d.ts +12 -2
- package/dist/learnings/service.d.ts.map +1 -1
- package/dist/learnings/service.js +30 -5
- package/dist/learnings/service.js.map +1 -1
- package/dist/mcp/broker.d.ts.map +1 -1
- package/dist/mcp/broker.js +18 -4
- package/dist/mcp/broker.js.map +1 -1
- package/dist/mcp/estate-relay.d.ts +3 -0
- package/dist/mcp/estate-relay.d.ts.map +1 -1
- package/dist/mcp/estate-relay.js +5 -2
- package/dist/mcp/estate-relay.js.map +1 -1
- package/dist/mcp/invoke.js +2 -2
- package/dist/mcp/invoke.js.map +1 -1
- package/dist/mcp/policies.d.ts +35 -0
- package/dist/mcp/policies.d.ts.map +1 -1
- package/dist/mcp/policies.js +138 -1
- package/dist/mcp/policies.js.map +1 -1
- package/dist/mcp/redact.d.ts +1 -1
- package/dist/mcp/redact.d.ts.map +1 -1
- package/dist/mcp/redact.js +61 -4
- package/dist/mcp/redact.js.map +1 -1
- package/dist/mcp/registry-store.d.ts +35 -0
- package/dist/mcp/registry-store.d.ts.map +1 -1
- package/dist/mcp/registry-store.js +33 -0
- package/dist/mcp/registry-store.js.map +1 -1
- package/dist/mcp/registry.d.ts +65 -4
- package/dist/mcp/registry.d.ts.map +1 -1
- package/dist/mcp/registry.js +295 -21
- package/dist/mcp/registry.js.map +1 -1
- package/dist/mcp/rest.js +3 -3
- package/dist/mcp/rest.js.map +1 -1
- package/dist/mcp/run-fence.d.ts +2 -0
- package/dist/mcp/run-fence.d.ts.map +1 -1
- package/dist/mcp/run-fence.js +9 -0
- package/dist/mcp/run-fence.js.map +1 -1
- package/dist/mcp/trigger-names.d.ts +32 -0
- package/dist/mcp/trigger-names.d.ts.map +1 -0
- package/dist/mcp/trigger-names.js +529 -0
- package/dist/mcp/trigger-names.js.map +1 -0
- package/dist/mcp/upstream-error.d.ts +5 -1
- package/dist/mcp/upstream-error.d.ts.map +1 -1
- package/dist/mcp/upstream-error.js +5 -1
- package/dist/mcp/upstream-error.js.map +1 -1
- package/dist/projects/graph.d.ts +6 -4
- package/dist/projects/graph.d.ts.map +1 -1
- package/dist/projects/graph.js +173 -25
- package/dist/projects/graph.js.map +1 -1
- package/dist/projects/routes.d.ts +7 -1
- package/dist/projects/routes.d.ts.map +1 -1
- package/dist/projects/routes.js +13 -5
- package/dist/projects/routes.js.map +1 -1
- package/dist/projects/state-home-preflight.d.ts +5 -0
- package/dist/projects/state-home-preflight.d.ts.map +1 -1
- package/dist/projects/state-home-preflight.js +48 -8
- package/dist/projects/state-home-preflight.js.map +1 -1
- package/dist/projects/state-home-registry.d.ts.map +1 -1
- package/dist/projects/state-home-registry.js +6 -0
- package/dist/projects/state-home-registry.js.map +1 -1
- package/dist/projects/state-home.d.ts +6 -2
- package/dist/projects/state-home.d.ts.map +1 -1
- package/dist/projects/state-home.js +8 -5
- package/dist/projects/state-home.js.map +1 -1
- package/dist/qe/test-sets.d.ts +1 -1
- package/dist/qe/test-sets.d.ts.map +1 -1
- package/dist/qe/test-sets.js +2 -2
- package/dist/qe/test-sets.js.map +1 -1
- package/dist/schedules/routes.d.ts +5 -0
- package/dist/schedules/routes.d.ts.map +1 -1
- package/dist/schedules/routes.js +32 -5
- package/dist/schedules/routes.js.map +1 -1
- package/dist/schedules/scheduler.d.ts +8 -1
- package/dist/schedules/scheduler.d.ts.map +1 -1
- package/dist/schedules/scheduler.js +10 -1
- package/dist/schedules/scheduler.js.map +1 -1
- package/dist/schedules/store.d.ts +7 -0
- package/dist/schedules/store.d.ts.map +1 -1
- package/dist/schedules/store.js +19 -4
- package/dist/schedules/store.js.map +1 -1
- package/dist/skills/plugin-source.js +4 -4
- package/dist/skills/plugin-source.js.map +1 -1
- package/dist/skills/store.d.ts +11 -1
- package/dist/skills/store.d.ts.map +1 -1
- package/dist/skills/store.js +37 -3
- package/dist/skills/store.js.map +1 -1
- package/dist/sources/drivers/sqlite.d.ts +13 -0
- package/dist/sources/drivers/sqlite.d.ts.map +1 -1
- package/dist/sources/drivers/sqlite.js +11 -0
- package/dist/sources/drivers/sqlite.js.map +1 -1
- package/dist/sources/routes.d.ts.map +1 -1
- package/dist/sources/routes.js +1 -0
- package/dist/sources/routes.js.map +1 -1
- package/dist/sources/uploads.d.ts +22 -2
- package/dist/sources/uploads.d.ts.map +1 -1
- package/dist/sources/uploads.js +108 -10
- package/dist/sources/uploads.js.map +1 -1
- package/dist/standing-orders/parse.d.ts +8 -0
- package/dist/standing-orders/parse.d.ts.map +1 -1
- package/dist/standing-orders/parse.js +52 -5
- package/dist/standing-orders/parse.js.map +1 -1
- package/dist/studio/apps-standalone/fixture.js +3 -3
- package/dist/studio/assets/{KnowledgeGraph-dfq7Flyj.js → KnowledgeGraph-D6RRLDnV.js} +1 -1
- package/dist/studio/assets/index-BLo9vFQI.js +1128 -0
- package/dist/studio/assets/index-xW21Gkam.css +32 -0
- package/dist/studio/editors/wicked-apps/editor.json +1 -1
- package/dist/studio/editors/wicked-apps/index.html +1 -1
- package/dist/studio/editors/wicked-deck/editor.json +1 -1
- package/dist/studio/editors/wicked-deck/index.html +1 -1
- package/dist/studio/editors/wicked-doc/editor.json +1 -1
- package/dist/studio/editors/wicked-doc/index.html +1 -1
- package/dist/studio/editors/wicked-insights/editor.json +1 -1
- package/dist/studio/editors/wicked-insights/index.html +1 -1
- package/dist/studio/editors/wicked-page/editor.json +1 -1
- package/dist/studio/editors/wicked-page/index.html +1 -1
- package/dist/studio/editors/wicked-video/editor.json +1 -1
- package/dist/studio/editors/wicked-video/index.html +1 -1
- package/dist/studio/index.html +2 -2
- package/dist/studio/testid-inventory.json +1687 -236
- package/dist/team/routes.d.ts +4 -1
- package/dist/team/routes.d.ts.map +1 -1
- package/dist/team/routes.js +3 -2
- package/dist/team/routes.js.map +1 -1
- package/dist/voice/tts.d.ts +18 -0
- package/dist/voice/tts.d.ts.map +1 -1
- package/dist/voice/tts.js +134 -29
- package/dist/voice/tts.js.map +1 -1
- package/dist/workflow-catalog/build-v2.d.ts +34 -0
- package/dist/workflow-catalog/build-v2.d.ts.map +1 -1
- package/dist/workflow-catalog/build-v2.js +131 -10
- package/dist/workflow-catalog/build-v2.js.map +1 -1
- package/dist/workflow-catalog/catalog-data.d.ts.map +1 -1
- package/dist/workflow-catalog/catalog-data.js +0 -2
- package/dist/workflow-catalog/catalog-data.js.map +1 -1
- package/dist/workflow-catalog/detect.d.ts +18 -3
- package/dist/workflow-catalog/detect.d.ts.map +1 -1
- package/dist/workflow-catalog/detect.js +43 -8
- package/dist/workflow-catalog/detect.js.map +1 -1
- package/dist/working-doc/event-lines.d.ts +5 -2
- package/dist/working-doc/event-lines.d.ts.map +1 -1
- package/dist/working-doc/event-lines.js +38 -7
- package/dist/working-doc/event-lines.js.map +1 -1
- package/dist/working-doc/sections.d.ts +3 -0
- package/dist/working-doc/sections.d.ts.map +1 -1
- package/dist/working-doc/sections.js +5 -0
- package/dist/working-doc/sections.js.map +1 -1
- package/dist/working-doc/service.d.ts +23 -3
- package/dist/working-doc/service.d.ts.map +1 -1
- package/dist/working-doc/service.js +93 -54
- package/dist/working-doc/service.js.map +1 -1
- package/endpoint-manifest.json +144 -8
- package/evals/corpora/shape-v1.json +25 -1
- package/evals/corpora/shape-v1.seat-fixture.json +25 -1
- package/package.json +4 -4
- package/runners/sqlite-runner.mjs +39 -1
- package/voice-locks/darwin-arm64-cp310.txt +12 -0
- package/voice-locks/darwin-arm64-cp311.txt +8 -0
- package/voice-locks/darwin-arm64-cp312.txt +8 -0
- package/voice-locks/darwin-arm64-cp313.txt +8 -0
- package/voice-locks/darwin-arm64-cp314.txt +8 -0
- package/voice-locks/darwin-arm64-cp39.txt +12 -0
- package/voice-locks/darwin-x64-cp310.txt +12 -0
- package/voice-locks/darwin-x64-cp311.txt +12 -0
- package/voice-locks/darwin-x64-cp312.txt +12 -0
- package/voice-locks/darwin-x64-cp313.txt +12 -0
- package/voice-locks/darwin-x64-cp39.txt +12 -0
- package/voice-locks/linux-arm64-cp310.txt +12 -0
- package/voice-locks/linux-arm64-cp311.txt +8 -0
- package/voice-locks/linux-arm64-cp312.txt +8 -0
- package/voice-locks/linux-arm64-cp313.txt +8 -0
- package/voice-locks/linux-arm64-cp314.txt +8 -0
- package/voice-locks/linux-arm64-cp39.txt +12 -0
- package/voice-locks/linux-x64-cp310.txt +12 -0
- package/voice-locks/linux-x64-cp311.txt +8 -0
- package/voice-locks/linux-x64-cp312.txt +8 -0
- package/voice-locks/linux-x64-cp313.txt +8 -0
- package/voice-locks/linux-x64-cp314.txt +8 -0
- package/voice-locks/linux-x64-cp39.txt +12 -0
- package/dist/studio/assets/index-Bame65hj.js +0 -1108
- package/dist/studio/assets/index-CtB1BJRI.css +0 -32
package/dist/mcp/registry.js
CHANGED
|
@@ -45,7 +45,6 @@ export const PREVIEW_TTL_MS = 15 * 60 * 1000;
|
|
|
45
45
|
const PREVIEW_CACHE_MAX = 64;
|
|
46
46
|
/** Consecutive failed probes before a server's health reads `failing`. */
|
|
47
47
|
export const HEALTH_FAILING_AFTER = 3;
|
|
48
|
-
/** A refusal the routes map to a status code. */
|
|
49
48
|
export class McpRegistryError extends Error {
|
|
50
49
|
status;
|
|
51
50
|
code;
|
|
@@ -82,6 +81,11 @@ export class McpRegistry {
|
|
|
82
81
|
trackerProjection = PROJECTION_UNKNOWN;
|
|
83
82
|
/** (DES-PM-001 §3.4) Called once a restore has landed (the daemon points it at the tracker projector). */
|
|
84
83
|
onRestored;
|
|
84
|
+
/**
|
|
85
|
+
* (crew#1328, crew#1354) Called once a removal or a restore that dropped records has landed, with the estate source
|
|
86
|
+
* ids it tombstoned ({@link estateSourceIds}); the daemon has their writers erase them. Never throws in.
|
|
87
|
+
*/
|
|
88
|
+
onTombstoned;
|
|
85
89
|
constructor(deps) {
|
|
86
90
|
this.deps = deps;
|
|
87
91
|
this.now = deps.now ?? Date.now;
|
|
@@ -134,6 +138,11 @@ export class McpRegistry {
|
|
|
134
138
|
if ((config.kind === 'sql' || config.kind === 'graphql' || config.kind === 'toolbox-source') && config.name === CREW_SOURCE) {
|
|
135
139
|
throw new McpRegistryError(400, 'reserved_name', `"${CREW_SOURCE}" is the built-in crew source; choose another name`);
|
|
136
140
|
}
|
|
141
|
+
// (crew#1514) A name a live entry was renamed away from is retired: refused here, and again inside the save.
|
|
142
|
+
const registered = (await this.readFile()).servers;
|
|
143
|
+
const retiring = retiredBy(registered, config.name);
|
|
144
|
+
if (retiring !== undefined)
|
|
145
|
+
throw retiredName(config.name, retiring);
|
|
137
146
|
// (DES-KNOWLEDGE-DATA-001 §5.1) A database source is saved as its Toolbox document, checked against the
|
|
138
147
|
// deployment policy here (the preview) and again when the write lands.
|
|
139
148
|
config = this.forSave(config);
|
|
@@ -144,8 +153,11 @@ export class McpRegistry {
|
|
|
144
153
|
if (!this.deps.secrets.available) {
|
|
145
154
|
throw new McpRegistryError(501, 'secret_store_unavailable', 'this platform has no OS secret store; reference a daemon env variable instead (auth.ref "env:<NAME>")');
|
|
146
155
|
}
|
|
147
|
-
|
|
148
|
-
|
|
156
|
+
// (crew#1514) A renamed entry's own entry keeps the account it was saved under (`keychainAccount`).
|
|
157
|
+
const own = registered.find((x) => x.name === config.name);
|
|
158
|
+
const account = own !== undefined ? ownAccount(own) : config.name;
|
|
159
|
+
if (config.auth === null || config.auth.ref !== keychainRef(account)) {
|
|
160
|
+
throw new McpRegistryError(400, 'secret_not_staged_here', `a staged secret is stored as this server's own keychain entry, so auth.ref must be ${keychainRef(account)}`);
|
|
149
161
|
}
|
|
150
162
|
// The reference is answered back and audited, so a value it contains would be echoed there.
|
|
151
163
|
if (config.auth.ref.includes(stagedSecret)) {
|
|
@@ -263,16 +275,29 @@ export class McpRegistry {
|
|
|
263
275
|
// orphan this was written to prevent. `null` = no prior value, and then the rollback deletes.
|
|
264
276
|
// (DES-PM-001 §3) A save that would drop or change a PM source's marker is refused BEFORE any credential is
|
|
265
277
|
// written (the mutation refuses it again, under the store's chain, for a marker set meanwhile).
|
|
266
|
-
const
|
|
278
|
+
const current = (await this.readFile()).servers;
|
|
279
|
+
const existing = current.find((s) => s.name === held.config.name);
|
|
280
|
+
// (crew#1514) Judged BEFORE any credential is written: a preview held across a rename can't save over the retired
|
|
281
|
+
// name, nor write the keychain account the renamed entry still uses.
|
|
282
|
+
const retiring = retiredBy(current, held.config.name);
|
|
283
|
+
if (retiring !== undefined)
|
|
284
|
+
throw retiredName(held.config.name, retiring);
|
|
285
|
+
const account = held.secret === null ? held.config.name : stagedAccount(held.config, existing);
|
|
267
286
|
const existingPm = existing === undefined ? null : pmOf(existing);
|
|
268
287
|
if (existingPm !== null && (held.config.pm == null || held.config.pm.system !== existingPm.system)) {
|
|
269
288
|
throw new McpRegistryError(409, 'pm_marker_fixed', `${held.config.name} is registered as a ${existingPm.system} project-management source; save it with pm.system "${existingPm.system}", or remove it and register it again`);
|
|
270
289
|
}
|
|
271
|
-
const prior = held.secret === null ? null : await this.deps.secrets.get(
|
|
290
|
+
const prior = held.secret === null ? null : await this.deps.secrets.get(account);
|
|
272
291
|
if (held.secret !== null)
|
|
273
|
-
await this.deps.secrets.set(
|
|
274
|
-
|
|
292
|
+
await this.deps.secrets.set(account, held.secret);
|
|
293
|
+
// (crew#1328 item 3) A save that changes a source's allowed views with no new description changes its projection key
|
|
294
|
+
// with no catalog written: it is named once the write lands, so its structure is projected again now.
|
|
295
|
+
let viewsChanged = false;
|
|
296
|
+
const saved = await this.restoreSecretOnFailure(account, held.secret !== null, prior, () => this.mutate(async (file) => {
|
|
275
297
|
const prior = file.servers.find((s) => s.name === held.config.name);
|
|
298
|
+
const retiredNow = retiredBy(file.servers, held.config.name);
|
|
299
|
+
if (retiredNow !== undefined)
|
|
300
|
+
throw retiredName(held.config.name, retiredNow);
|
|
276
301
|
// (DES-PM-001 §3) A PM entry stays the PM system it was registered as: a re-save that drops the marker, or
|
|
277
302
|
// names another system, would hand its tools to the plain path (or its links to another vendor).
|
|
278
303
|
const priorPm = prior === undefined ? null : pmOf(prior);
|
|
@@ -335,6 +360,10 @@ export class McpRegistry {
|
|
|
335
360
|
registeredAt: prior?.registeredAt ?? stamp,
|
|
336
361
|
updatedAt: stamp,
|
|
337
362
|
tools,
|
|
363
|
+
// (crew#1514) A re-save keeps the names it retired and its keychain account (its own account for as long as it
|
|
364
|
+
// lives, whatever its reference names now: a re-save back to keychain:wicked-mcp/<account> owns it again).
|
|
365
|
+
...(prior?.formerNames !== undefined && prior.formerNames.length > 0 ? { formerNames: [...prior.formerNames] } : {}),
|
|
366
|
+
...(prior?.keychainAccount !== undefined ? { keychainAccount: prior.keychainAccount } : {}),
|
|
338
367
|
};
|
|
339
368
|
// (DES-APPS-001 §7.4, DES-KNOWLEDGE-DATA-001 §5.4) Allow writes is off on every new Postgres source, and
|
|
340
369
|
// "query" on every new source. A re-save keeps each only while the descriptor is unchanged, and a K1
|
|
@@ -364,10 +393,24 @@ export class McpRegistry {
|
|
|
364
393
|
// record and its description can never be paired with another save's.
|
|
365
394
|
if (held.source !== null)
|
|
366
395
|
await this.catalogs.write(record.name, { ...held.source, descriptorHash: sourceDescriptorHash(configOf(record)) });
|
|
396
|
+
const viewsOf = (r) => JSON.stringify([...new Set(r?.viewsAllowed ?? [])].sort());
|
|
397
|
+
viewsChanged = held.source === null && prior !== undefined && isSourceRecord(record) && viewsOf(prior) !== viewsOf(record);
|
|
367
398
|
return record;
|
|
368
399
|
}));
|
|
400
|
+
if (viewsChanged)
|
|
401
|
+
this.sourceChanged(saved.name);
|
|
369
402
|
return this.view(saved);
|
|
370
403
|
}
|
|
404
|
+
tombstoned(targets) {
|
|
405
|
+
if (targets.length === 0)
|
|
406
|
+
return;
|
|
407
|
+
try {
|
|
408
|
+
this.onTombstoned?.(targets);
|
|
409
|
+
}
|
|
410
|
+
catch {
|
|
411
|
+
// the listener's own failure; the tombstones are in the registry and the next reconcile sends them
|
|
412
|
+
}
|
|
413
|
+
}
|
|
371
414
|
sourceChanged(name) {
|
|
372
415
|
try {
|
|
373
416
|
this.onSourceChanged?.(name);
|
|
@@ -521,26 +564,113 @@ export class McpRegistry {
|
|
|
521
564
|
});
|
|
522
565
|
return this.view(rec);
|
|
523
566
|
}
|
|
524
|
-
/**
|
|
567
|
+
/**
|
|
568
|
+
* (crew#1514) What {@link rename} would refuse now (the names, the entry, the new name taken or retired by another
|
|
569
|
+
* entry), checked before the caller moves any rule: a refused rename never lends another entry's rules to a live
|
|
570
|
+
* destination, even for a moment. {@link rename} checks again inside its write.
|
|
571
|
+
*/
|
|
572
|
+
async checkRename(from, to) {
|
|
573
|
+
renameNameRefusal(from, to);
|
|
574
|
+
this.renameRefusal((await this.readFile()).servers, from, to);
|
|
575
|
+
}
|
|
576
|
+
/** The entry `from` names, or the refusal: crew's web source, `to` taken, or `to` retired by another entry. */
|
|
577
|
+
renameRefusal(servers, from, to) {
|
|
578
|
+
const s = this.find(servers, from);
|
|
579
|
+
if (s.kind === 'web')
|
|
580
|
+
throw new McpRegistryError(409, 'not_renamable', `${from} is crew's built-in web source: its name is fixed`);
|
|
581
|
+
const taken = servers.find((x) => x.name === to);
|
|
582
|
+
if (taken !== undefined)
|
|
583
|
+
throw new McpRegistryError(409, 'name_taken', `${to} is already a registered ${taken.kind} server; choose another name`);
|
|
584
|
+
const retiring = retiredBy(servers, to);
|
|
585
|
+
if (retiring !== undefined && retiring !== s)
|
|
586
|
+
throw retiredName(to, retiring);
|
|
587
|
+
return s;
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* (crew#1514) Rename an entry, keeping everything bound to it: its id, its secret reference (an owned keychain entry
|
|
591
|
+
* stays under the account it was saved as: `keychainAccount`), its tools, switches, grants, agents and links. `from`
|
|
592
|
+
* becomes one of its RETIRED names (`formerNames`): no other entry may take it while this one lives. Its stored
|
|
593
|
+
* description moves with it: copied inside the write, the old file removed once the write has landed (a failed write
|
|
594
|
+
* leaves no copy behind). Held previews of either name are dropped, so none saves over the renamed entry or under
|
|
595
|
+
* the retired name. The caller holds both names' policy locks and moves the rules (`McpPolicies`).
|
|
596
|
+
*/
|
|
597
|
+
async rename(from, to) {
|
|
598
|
+
renameNameRefusal(from, to);
|
|
599
|
+
const stamp = new Date(this.now()).toISOString();
|
|
600
|
+
let copied = false;
|
|
601
|
+
let renamed;
|
|
602
|
+
try {
|
|
603
|
+
renamed = await this.mutate(async (file) => {
|
|
604
|
+
const s = this.renameRefusal(file.servers, from, to);
|
|
605
|
+
// The secret is never moved: `auth.ref` is part of the descriptor every grant and lock binds to. The entry's own
|
|
606
|
+
// account stays the name it had (retired with it), so no other entry can ever write it.
|
|
607
|
+
if (s.keychainAccount === undefined)
|
|
608
|
+
s.keychainAccount = s.name;
|
|
609
|
+
if (s.keychainAccount === to)
|
|
610
|
+
delete s.keychainAccount;
|
|
611
|
+
const former = [...new Set([...(s.formerNames ?? []).filter((n) => n !== to), from])];
|
|
612
|
+
s.formerNames = former;
|
|
613
|
+
s.name = to;
|
|
614
|
+
s.updatedAt = stamp;
|
|
615
|
+
if (isSourceRecord(s)) {
|
|
616
|
+
const d = await this.catalogs.read(from);
|
|
617
|
+
if (d !== null) {
|
|
618
|
+
await this.catalogs.write(to, d);
|
|
619
|
+
copied = true;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
return s;
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
catch (err) {
|
|
626
|
+
if (copied)
|
|
627
|
+
await this.catalogs.remove(to).catch(() => undefined);
|
|
628
|
+
throw err;
|
|
629
|
+
}
|
|
630
|
+
if (copied)
|
|
631
|
+
await this.catalogs.remove(from).catch(() => undefined);
|
|
632
|
+
for (const [hash, held] of this.previews)
|
|
633
|
+
if (held.config.name === from || held.config.name === to)
|
|
634
|
+
this.previews.delete(hash);
|
|
635
|
+
if (isSourceRecord(renamed))
|
|
636
|
+
this.sourceChanged(to);
|
|
637
|
+
try {
|
|
638
|
+
return await this.view(renamed);
|
|
639
|
+
}
|
|
640
|
+
catch (err) {
|
|
641
|
+
// The rename has landed: the caller must not undo anything bound to it because its answer could not be built.
|
|
642
|
+
throw new McpRenameCommitted(from, to, err);
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
/** Remove a server, and the keychain secret it owns (`keychain:wicked-mcp/<name>`, or its `keychainAccount`). */
|
|
525
646
|
async remove(name) {
|
|
526
|
-
const removed = await this.mutate(async (file) => {
|
|
647
|
+
const { removed, tombstoned } = await this.mutate(async (file) => {
|
|
527
648
|
const s = this.find(file.servers, name);
|
|
528
649
|
file.servers = file.servers.filter((x) => x.name !== name);
|
|
529
650
|
// Inside the mutation, serialized with every save and upload: a source saved under this name
|
|
530
651
|
// next writes its catalog after this deletion, never before it.
|
|
531
652
|
if (isSourceRecord(s))
|
|
532
653
|
await this.catalogs.remove(name);
|
|
533
|
-
|
|
654
|
+
// (crew#1328, crew#1354) What estate holds of it is erased, in this same write, so a restart never forgets it.
|
|
655
|
+
const ids = estateSourceIds(s);
|
|
656
|
+
addEstateTombstones(file, ids, new Date(this.now()).toISOString());
|
|
657
|
+
return { removed: s, tombstoned: ids };
|
|
534
658
|
});
|
|
535
|
-
|
|
659
|
+
this.tombstoned(tombstoned);
|
|
660
|
+
const account = ownAccount(removed);
|
|
661
|
+
// (crew#1514) A renamed entry owns its account for its whole life, whatever its reference names now (re-saved with
|
|
662
|
+
// an env secret, say): the secret under that account goes with it, when there is one.
|
|
663
|
+
const owned = removed.auth?.ref === keychainRef(account)
|
|
664
|
+
|| (removed.keychainAccount !== undefined && this.deps.secrets.available && (await this.deps.secrets.has(account).catch(() => false)));
|
|
665
|
+
if (owned && this.deps.secrets.available) {
|
|
536
666
|
try {
|
|
537
|
-
await this.deps.secrets.delete(
|
|
667
|
+
await this.deps.secrets.delete(account);
|
|
538
668
|
}
|
|
539
669
|
catch (err) {
|
|
540
670
|
// (crew#719) The row is already gone, so the secret is now unreachable by any route. Say
|
|
541
671
|
// so — the alternative is a silent orphan in the operator's keychain.
|
|
542
672
|
const why = err instanceof Error ? err.message : String(err);
|
|
543
|
-
throw new McpRegistryError(500, 'secret_orphaned', `${name} was removed but its secret could not be deleted (${why}); remove the "${KEYCHAIN_SERVICE}" keychain entry for account "${
|
|
673
|
+
throw new McpRegistryError(500, 'secret_orphaned', `${name} was removed but its secret could not be deleted (${why}); remove the "${KEYCHAIN_SERVICE}" keychain entry for account "${account}" by hand`);
|
|
544
674
|
}
|
|
545
675
|
}
|
|
546
676
|
}
|
|
@@ -562,6 +692,10 @@ export class McpRegistry {
|
|
|
562
692
|
const t = s.tools.find((x) => x.name === parts.tool);
|
|
563
693
|
if (t === undefined)
|
|
564
694
|
throw new McpRegistryError(404, 'unknown_tool', `no tool ${subject}`);
|
|
695
|
+
// crew#1788: the patch was made against the schema the person saw; another save in between changed it.
|
|
696
|
+
if (patch.expectedSchemaHash !== undefined && t.schemaHash !== patch.expectedSchemaHash) {
|
|
697
|
+
throw new McpRegistryError(409, 'schema_changed', `${subject}'s saved schema changed since it was shown: read the tool again and review the new schema`);
|
|
698
|
+
}
|
|
565
699
|
// (DES-KNOWLEDGE-DATA-001 §5.1) A disclosure class is reviewed by a human operator, against the schema the
|
|
566
700
|
// operator saved; clearing one (the tool is offered to no agent) needs no review.
|
|
567
701
|
if (patch.disclosure != null) {
|
|
@@ -657,20 +791,27 @@ export class McpRegistry {
|
|
|
657
791
|
if (!this.deps.secrets.available) {
|
|
658
792
|
throw new McpRegistryError(501, 'secret_store_unavailable', 'this platform has no OS secret store; reference a daemon env variable instead (auth.ref "env:<NAME>")');
|
|
659
793
|
}
|
|
660
|
-
const ref = keychainRef(name);
|
|
661
|
-
// The route answers and audits the reference, so a value it contains would be echoed there.
|
|
662
|
-
if (ref.includes(value))
|
|
663
|
-
throw new McpRegistryError(400, 'secret_in_ref', 'the secret must not appear in its own reference; choose a different value');
|
|
664
794
|
// (crew#719) RE-KEY ONLY. A secret written for a name no registered server references is an
|
|
665
795
|
// orphan nothing can find again — a keychain service's entries cannot be enumerated — and it
|
|
666
796
|
// was the first half of the non-atomic add: secret, then save, with a window between them.
|
|
667
797
|
// A NEW server's secret is staged with its preview and committed by `save`.
|
|
798
|
+
// The route answers and audits the reference, so a value it contains would be echoed there (checked before the
|
|
799
|
+
// lookup, as ever, and again for a renamed entry's own account below).
|
|
800
|
+
const inRef = (r) => {
|
|
801
|
+
if (r.includes(value))
|
|
802
|
+
throw new McpRegistryError(400, 'secret_in_ref', 'the secret must not appear in its own reference; choose a different value');
|
|
803
|
+
};
|
|
804
|
+
inRef(keychainRef(name));
|
|
668
805
|
const server = this.find((await this.readFile()).servers, name);
|
|
806
|
+
// (crew#1514) A renamed entry keeps the account it was saved under.
|
|
807
|
+
const account = ownAccount(server);
|
|
808
|
+
const ref = keychainRef(account);
|
|
809
|
+
inRef(ref);
|
|
669
810
|
if (server.auth?.ref !== ref) {
|
|
670
811
|
// The stored reference is a connection field: it is not echoed (an agent-kind caller reads errors too).
|
|
671
812
|
throw new McpRegistryError(400, 'secret_not_referenced', `${name} does not reference ${ref}, so a secret stored there would be unreachable; stage it with the preview instead`);
|
|
672
813
|
}
|
|
673
|
-
await this.deps.secrets.set(
|
|
814
|
+
await this.deps.secrets.set(account, value);
|
|
674
815
|
return ref;
|
|
675
816
|
}
|
|
676
817
|
/**
|
|
@@ -827,6 +968,9 @@ export class McpRegistry {
|
|
|
827
968
|
const stamp = new Date(this.now()).toISOString();
|
|
828
969
|
const rec = await this.mutate(async (file) => {
|
|
829
970
|
const prior = file.servers.find((s) => s.name === name);
|
|
971
|
+
const retiring = retiredBy(file.servers, name);
|
|
972
|
+
if (retiring !== undefined)
|
|
973
|
+
throw retiredName(name, retiring);
|
|
830
974
|
if (prior !== undefined && !(prior.kind === 'sql' && prior.sql?.driver === 'sqlite')) {
|
|
831
975
|
throw new McpRegistryError(409, 'name_taken', `${name} is already a registered ${prior.kind} server; choose another name`);
|
|
832
976
|
}
|
|
@@ -845,6 +989,9 @@ export class McpRegistry {
|
|
|
845
989
|
registeredAt: prior?.registeredAt ?? stamp,
|
|
846
990
|
updatedAt: stamp,
|
|
847
991
|
tools: [],
|
|
992
|
+
// (crew#1514) A new upload of a renamed source keeps the names it retired.
|
|
993
|
+
...(prior?.formerNames !== undefined && prior.formerNames.length > 0 ? { formerNames: [...prior.formerNames] } : {}),
|
|
994
|
+
...(prior?.keychainAccount !== undefined ? { keychainAccount: prior.keychainAccount } : {}),
|
|
848
995
|
// (DES-KNOWLEDGE-DATA-001 §7.1) A new upload of the same name keeps the person's agent switches; "query"
|
|
849
996
|
// only when it is the same snapshot (a new digest is a new descriptor).
|
|
850
997
|
...(prior?.agents !== undefined ? { agents: { ...agentAccessOf(prior), query: agentAccessOf(prior).query && prior.sql?.snapshot === digest } } : {}),
|
|
@@ -864,6 +1011,9 @@ export class McpRegistry {
|
|
|
864
1011
|
const stamp = new Date(this.now()).toISOString();
|
|
865
1012
|
const rec = await this.mutate(async (file) => {
|
|
866
1013
|
const prior = file.servers.find((s) => s.name === name);
|
|
1014
|
+
const retiring = retiredBy(file.servers, name);
|
|
1015
|
+
if (retiring !== undefined)
|
|
1016
|
+
throw retiredName(name, retiring);
|
|
867
1017
|
if (prior !== undefined && prior.kind !== 'web')
|
|
868
1018
|
throw new McpRegistryError(409, 'name_taken', `${name} is already a registered ${prior.kind} server; rename or remove it first`);
|
|
869
1019
|
const other = file.servers.find((s) => s.kind === 'web' && s.name !== name);
|
|
@@ -927,6 +1077,9 @@ export class McpRegistry {
|
|
|
927
1077
|
const why = err instanceof Error ? err.message : String(err);
|
|
928
1078
|
throw new McpRegistryError(409, 'generation_unreadable', `generation ${generation} is not a registry crew can read: ${why}`);
|
|
929
1079
|
}
|
|
1080
|
+
// (crew#1514) An entry the generation holds under another name than the live one was renamed since: the rules,
|
|
1081
|
+
// picks and keychain account follow the live name, so the restore is refused until it is renamed back.
|
|
1082
|
+
crossesRename(generation, servers, (await this.readFile()).servers);
|
|
930
1083
|
for (const s of servers) {
|
|
931
1084
|
if (s.kind !== 'toolbox-source')
|
|
932
1085
|
continue;
|
|
@@ -977,15 +1130,25 @@ export class McpRegistry {
|
|
|
977
1130
|
s.health = { ...s.health, checkedAt: stamp, lastError: `secret_missing: ${s.auth.ref} resolves to no secret; set it, then switch ${s.name} on` };
|
|
978
1131
|
s.updatedAt = stamp;
|
|
979
1132
|
}
|
|
980
|
-
const current = await this.mutate((file) => {
|
|
1133
|
+
const { current, tombstoned } = await this.mutate((file) => {
|
|
1134
|
+
// (crew#1514) Again inside the write: a rename that landed after the plan was made is not undone by it.
|
|
1135
|
+
crossesRename(plan.generation, servers, file.servers);
|
|
981
1136
|
if (expected !== undefined) {
|
|
982
1137
|
const late = file.servers.map((s) => s.name).filter((n) => !expected.includes(n));
|
|
983
1138
|
if (late.length > 0)
|
|
984
1139
|
throw new McpRegistryError(409, 'registry_busy', `${late.join(', ')} was registered while the restore ran; nothing was restored: try again`);
|
|
985
1140
|
}
|
|
1141
|
+
// (crew#1328, crew#1354) A source or tracker the restored generation does not hold is erased from estate too; one
|
|
1142
|
+
// it brings back is not (its own projection replaces what estate holds).
|
|
1143
|
+
const kept = servers.flatMap(estateSourceIds);
|
|
1144
|
+
const dropped = file.servers.flatMap(estateSourceIds).filter((t) => !kept.some((k) => k.id === t.id && k.kind === t.kind));
|
|
1145
|
+
for (const kind of ['source', 'tracker'])
|
|
1146
|
+
dropEstateTombstones(file, kind, new Set(kept.filter((k) => k.kind === kind).map((k) => k.id)));
|
|
1147
|
+
addEstateTombstones(file, dropped, stamp);
|
|
986
1148
|
file.servers = servers;
|
|
987
|
-
return file.generation ?? 0;
|
|
1149
|
+
return { current: file.generation ?? 0, tombstoned: dropped };
|
|
988
1150
|
});
|
|
1151
|
+
this.tombstoned(tombstoned);
|
|
989
1152
|
for (const s of servers)
|
|
990
1153
|
if (isSourceRecord(s))
|
|
991
1154
|
this.sourceChanged(s.name);
|
|
@@ -1142,6 +1305,8 @@ export class McpRegistry {
|
|
|
1142
1305
|
...(isPostgresRecord(s) ? { allowWrites: s.allowWrites === true } : {}),
|
|
1143
1306
|
...(isSource ? { descriptorHash: sourceDescriptorHash(configOf(s)), agents: agentAccessOf(s) } : {}),
|
|
1144
1307
|
...(pm !== null ? { agents: agentAccessOf(s), trackers: this.trackerLinksOf(s) } : {}),
|
|
1308
|
+
...(s.formerNames !== undefined && s.formerNames.length > 0 ? { formerNames: [...s.formerNames] } : {}),
|
|
1309
|
+
...(s.keychainAccount !== undefined ? { keychainAccount: s.keychainAccount } : {}),
|
|
1145
1310
|
authState: await this.authState(s.auth),
|
|
1146
1311
|
enabled: s.enabled,
|
|
1147
1312
|
health: s.health,
|
|
@@ -1346,7 +1511,48 @@ export function diffTools(registered, probed) {
|
|
|
1346
1511
|
diff.removed.push(t.name);
|
|
1347
1512
|
return diff;
|
|
1348
1513
|
}
|
|
1349
|
-
|
|
1514
|
+
/**
|
|
1515
|
+
* (crew#1328, crew#1354) The estate source ids a record's structure lives under: a data source's entry id (its
|
|
1516
|
+
* projected catalog), and a PM entry's trackers, retired ones included.
|
|
1517
|
+
*/
|
|
1518
|
+
export function estateSourceIds(s) {
|
|
1519
|
+
const out = [];
|
|
1520
|
+
if (isSourceRecord(s))
|
|
1521
|
+
out.push({ id: entryId(s), kind: 'source' });
|
|
1522
|
+
if (pmOf(s) !== null) {
|
|
1523
|
+
for (const t of trackersOf(s))
|
|
1524
|
+
out.push({ id: t.id, kind: 'tracker' });
|
|
1525
|
+
for (const r of s.retired ?? [])
|
|
1526
|
+
out.push({ id: r.id, kind: 'tracker' });
|
|
1527
|
+
}
|
|
1528
|
+
return out;
|
|
1529
|
+
}
|
|
1530
|
+
/**
|
|
1531
|
+
* Add `targets` to the registry's tombstones. An id already waiting keeps its tombstone (its writer erases by id, after
|
|
1532
|
+
* reading the registry, so one is enough); nothing is ever evicted (codex on #1735: a dropped one is never erased).
|
|
1533
|
+
*/
|
|
1534
|
+
export function addEstateTombstones(file, targets, at) {
|
|
1535
|
+
const list = file.estateTombstones ?? [];
|
|
1536
|
+
for (const t of targets)
|
|
1537
|
+
if (!list.some((x) => x.id === t.id && x.kind === t.kind))
|
|
1538
|
+
list.push({ id: t.id, kind: t.kind, at });
|
|
1539
|
+
if (list.length > 0)
|
|
1540
|
+
file.estateTombstones = list;
|
|
1541
|
+
}
|
|
1542
|
+
/**
|
|
1543
|
+
* Drop the tombstones of `kind` whose id `settled` names (their writer erased them, or the id is live again). Answers
|
|
1544
|
+
* whether any was dropped (crew#1740: a writer that drops none writes nothing).
|
|
1545
|
+
*/
|
|
1546
|
+
export function dropEstateTombstones(file, kind, settled) {
|
|
1547
|
+
if (file.estateTombstones === undefined)
|
|
1548
|
+
return false;
|
|
1549
|
+
const before = file.estateTombstones.length;
|
|
1550
|
+
file.estateTombstones = file.estateTombstones.filter((t) => t.kind !== kind || !settled.has(t.id));
|
|
1551
|
+
const changed = file.estateTombstones.length !== before;
|
|
1552
|
+
if (file.estateTombstones.length === 0)
|
|
1553
|
+
delete file.estateTombstones;
|
|
1554
|
+
return changed;
|
|
1555
|
+
}
|
|
1350
1556
|
/** A data source of any form: K1 `sql`/`graphql`, or a Toolbox-form database source. */
|
|
1351
1557
|
export function isSourceRecord(s) {
|
|
1352
1558
|
return s.kind === 'sql' || s.kind === 'graphql' || s.kind === 'toolbox-source';
|
|
@@ -1373,6 +1579,74 @@ export function isPostgresRecord(s) {
|
|
|
1373
1579
|
return s.toolbox?.type === 'postgres';
|
|
1374
1580
|
return s.kind === 'sql' && s.sql?.driver === 'postgres';
|
|
1375
1581
|
}
|
|
1582
|
+
/** (crew#1514) A rename committed, but its answer could not be built (the record is read again by the caller). */
|
|
1583
|
+
export class McpRenameCommitted extends Error {
|
|
1584
|
+
from;
|
|
1585
|
+
to;
|
|
1586
|
+
cause;
|
|
1587
|
+
constructor(from, to, cause) {
|
|
1588
|
+
super(`${from} was renamed to ${to}, but its record could not be read back: ${cause instanceof Error ? cause.message : String(cause)}`);
|
|
1589
|
+
this.from = from;
|
|
1590
|
+
this.to = to;
|
|
1591
|
+
this.cause = cause;
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
/**
|
|
1595
|
+
* (crew#1514) Refuse a restore that would undo a rename (409 `restore_crosses_rename`): an entry the generation holds
|
|
1596
|
+
* under another name, or with other retired names or another keychain account, than the live one; or an entry whose
|
|
1597
|
+
* name a live entry has retired. The rules, picks and keychain account follow the live names.
|
|
1598
|
+
*/
|
|
1599
|
+
function crossesRename(generation, kept, live) {
|
|
1600
|
+
const names = (l) => [...new Set(l ?? [])].sort().join(',');
|
|
1601
|
+
const crossed = [];
|
|
1602
|
+
for (const s of kept) {
|
|
1603
|
+
const l = live.find((x) => entryId(x) === entryId(s));
|
|
1604
|
+
if (l !== undefined && (l.name !== s.name || names(l.formerNames) !== names(s.formerNames) || l.keychainAccount !== s.keychainAccount)) {
|
|
1605
|
+
crossed.push(l.name !== s.name ? `${l.name} (was ${s.name})` : `${l.name} (renamed since)`);
|
|
1606
|
+
continue;
|
|
1607
|
+
}
|
|
1608
|
+
const by = live.find((x) => entryId(x) !== entryId(s) && (x.formerNames ?? []).includes(s.name));
|
|
1609
|
+
if (by !== undefined)
|
|
1610
|
+
crossed.push(`${s.name} (a name ${by.name} retired)`);
|
|
1611
|
+
}
|
|
1612
|
+
if (crossed.length > 0) {
|
|
1613
|
+
throw new McpRegistryError(409, 'restore_crosses_rename', `generation ${generation} would undo a rename: ${crossed.join(', ')}. A restore keeps every entry's current name, retired names and keychain account, so pick a generation saved since the rename`);
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
/** (crew#1514) The new name's own refusals: its form, crew's reserved names, and no change. */
|
|
1617
|
+
function renameNameRefusal(from, to) {
|
|
1618
|
+
if (!MCP_SERVER_NAME_RE.test(to))
|
|
1619
|
+
throw new McpRegistryError(400, 'bad_name', 'a name is 1-63 of a-z 0-9 _ -, starting with a letter or digit');
|
|
1620
|
+
if (to === APPS_SERVER || to === ESTATE_SERVER || to === CREW_SOURCE || to === 'web') {
|
|
1621
|
+
throw new McpRegistryError(409, 'reserved_name', `"${to}" is reserved for crew's own ${to === 'web' ? 'web source' : to === CREW_SOURCE ? 'crew source' : `${to} server`}; choose another name`);
|
|
1622
|
+
}
|
|
1623
|
+
if (from === to)
|
|
1624
|
+
throw new McpRegistryError(409, 'name_unchanged', `${from} already has that name`);
|
|
1625
|
+
}
|
|
1626
|
+
/** (crew#1514) The keychain account a record's own secret lives under: the name it was saved as. */
|
|
1627
|
+
export function ownAccount(s) {
|
|
1628
|
+
return s.keychainAccount ?? s.name;
|
|
1629
|
+
}
|
|
1630
|
+
/** (crew#1514) The live entry that retired `name` (was renamed away from it), or `undefined`. */
|
|
1631
|
+
export function retiredBy(servers, name) {
|
|
1632
|
+
return servers.find((s) => s.name !== name && (s.formerNames ?? []).includes(name));
|
|
1633
|
+
}
|
|
1634
|
+
function retiredName(name, by) {
|
|
1635
|
+
return new McpRegistryError(409, 'name_retired', `${name} was renamed to ${by.name}, so the name stays retired while ${by.name} exists; choose another name, or rename ${by.name} back to ${name}`);
|
|
1636
|
+
}
|
|
1637
|
+
/**
|
|
1638
|
+
* (crew#1514) The keychain account a held preview's staged secret goes to: the one its reference names, which the
|
|
1639
|
+
* preview checked was the server's own. Re-judged at the save against the entry as it is now.
|
|
1640
|
+
*/
|
|
1641
|
+
function stagedAccount(config, existing) {
|
|
1642
|
+
const parsed = config.auth === null ? null : parseSecretRef(config.auth.ref);
|
|
1643
|
+
const account = parsed?.kind === 'keychain' ? parsed.account : null;
|
|
1644
|
+
const own = existing !== undefined ? ownAccount(existing) : config.name;
|
|
1645
|
+
if (account === null || account !== own) {
|
|
1646
|
+
throw new McpRegistryError(409, 'server_changed', `${config.name} changed since it was previewed (its keychain entry is now "${own}"): preview it again, then save`);
|
|
1647
|
+
}
|
|
1648
|
+
return account;
|
|
1649
|
+
}
|
|
1376
1650
|
/** A record's id; one read through {@link normalizeRegistryFile} always has it. */
|
|
1377
1651
|
export function entryId(s) {
|
|
1378
1652
|
return s.id ?? legacyEntryId(s.name, s.registeredAt);
|