wicked-crew 0.16.13 → 0.17.1
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/README.md +27 -9
- package/dist/api/audit-view.d.ts +24 -0
- package/dist/api/audit-view.d.ts.map +1 -0
- package/dist/api/audit-view.js +70 -0
- package/dist/api/audit-view.js.map +1 -0
- package/dist/api/auth.d.ts +42 -2
- package/dist/api/auth.d.ts.map +1 -1
- package/dist/api/auth.js +157 -18
- package/dist/api/auth.js.map +1 -1
- package/dist/api/capture.d.ts +12 -59
- package/dist/api/capture.d.ts.map +1 -1
- package/dist/api/capture.js +9 -17
- package/dist/api/capture.js.map +1 -1
- package/dist/api/chat-context.d.ts +6 -62
- package/dist/api/chat-context.d.ts.map +1 -1
- package/dist/api/chat-context.js +6 -12
- package/dist/api/chat-context.js.map +1 -1
- package/dist/api/chat-jobs.d.ts +163 -0
- package/dist/api/chat-jobs.d.ts.map +1 -0
- package/dist/api/chat-jobs.js +767 -0
- package/dist/api/chat-jobs.js.map +1 -0
- package/dist/api/chat-mcp.d.ts +37 -0
- package/dist/api/chat-mcp.d.ts.map +1 -1
- package/dist/api/chat-mcp.js +118 -2
- package/dist/api/chat-mcp.js.map +1 -1
- package/dist/api/chat-proposals.d.ts +170 -152
- package/dist/api/chat-proposals.d.ts.map +1 -1
- package/dist/api/chat-proposals.js +833 -15
- package/dist/api/chat-proposals.js.map +1 -1
- package/dist/api/delivery-assurance.d.ts +3 -1
- package/dist/api/delivery-assurance.d.ts.map +1 -1
- package/dist/api/delivery-assurance.js +20 -0
- package/dist/api/delivery-assurance.js.map +1 -1
- package/dist/api/delivery-freeze.d.ts +2 -8
- package/dist/api/delivery-freeze.d.ts.map +1 -1
- package/dist/api/delivery-freeze.js +2 -4
- package/dist/api/delivery-freeze.js.map +1 -1
- package/dist/api/eval-sample.d.ts +18 -114
- package/dist/api/eval-sample.d.ts.map +1 -1
- package/dist/api/eval-sample.js +7 -13
- package/dist/api/eval-sample.js.map +1 -1
- package/dist/api/governance-steering.d.ts +27 -71
- package/dist/api/governance-steering.d.ts.map +1 -1
- package/dist/api/governance-steering.js +11 -19
- package/dist/api/governance-steering.js.map +1 -1
- package/dist/api/mcp.d.ts +159 -199
- package/dist/api/mcp.d.ts.map +1 -1
- package/dist/api/mcp.js +433 -68
- package/dist/api/mcp.js.map +1 -1
- package/dist/api/needs.d.ts +10 -0
- package/dist/api/needs.d.ts.map +1 -1
- package/dist/api/needs.js +77 -0
- package/dist/api/needs.js.map +1 -1
- package/dist/api/open-path.d.ts +10 -0
- package/dist/api/open-path.d.ts.map +1 -1
- package/dist/api/open-path.js +58 -1
- package/dist/api/open-path.js.map +1 -1
- package/dist/api/plan-schema.d.ts +8 -51
- package/dist/api/plan-schema.d.ts.map +1 -1
- package/dist/api/plan-schema.js +6 -6
- package/dist/api/plan-schema.js.map +1 -1
- package/dist/api/product.d.ts +81 -23
- package/dist/api/product.d.ts.map +1 -1
- package/dist/api/product.js +149 -72
- package/dist/api/product.js.map +1 -1
- package/dist/api/project-aggregates.d.ts +12 -20
- package/dist/api/project-aggregates.d.ts.map +1 -1
- package/dist/api/project-aggregates.js +3 -3
- package/dist/api/project-aggregates.js.map +1 -1
- package/dist/api/recording.d.ts +69 -39
- package/dist/api/recording.d.ts.map +1 -1
- package/dist/api/recording.js +60 -49
- package/dist/api/recording.js.map +1 -1
- package/dist/api/routes.d.ts +229 -1506
- package/dist/api/routes.d.ts.map +1 -1
- package/dist/api/routes.js +1226 -169
- package/dist/api/routes.js.map +1 -1
- package/dist/api/run-timing-index.d.ts +12 -1
- package/dist/api/run-timing-index.d.ts.map +1 -1
- package/dist/api/run-timing-index.js +35 -0
- package/dist/api/run-timing-index.js.map +1 -1
- package/dist/api/seat-images.d.ts +10 -0
- package/dist/api/seat-images.d.ts.map +1 -1
- package/dist/api/seat-images.js +16 -3
- package/dist/api/seat-images.js.map +1 -1
- package/dist/api/server-error-body.d.ts +44 -0
- package/dist/api/server-error-body.d.ts.map +1 -0
- package/dist/api/server-error-body.js +206 -0
- package/dist/api/server-error-body.js.map +1 -0
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +179 -4
- package/dist/api/server.js.map +1 -1
- package/dist/api/skills.d.ts +12 -36
- package/dist/api/skills.d.ts.map +1 -1
- package/dist/api/skills.js +12 -15
- package/dist/api/skills.js.map +1 -1
- package/dist/api/system-snapshot.d.ts +1 -5
- package/dist/api/system-snapshot.d.ts.map +1 -1
- package/dist/api/system-snapshot.js +7 -15
- package/dist/api/system-snapshot.js.map +1 -1
- package/dist/api/testing.d.ts +29 -50
- package/dist/api/testing.d.ts.map +1 -1
- package/dist/api/testing.js +7 -13
- package/dist/api/testing.js.map +1 -1
- package/dist/apps/actions/api-action.d.ts +47 -0
- package/dist/apps/actions/api-action.d.ts.map +1 -0
- package/dist/apps/actions/api-action.js +135 -0
- package/dist/apps/actions/api-action.js.map +1 -0
- package/dist/apps/actions/pg-fit.d.ts +27 -0
- package/dist/apps/actions/pg-fit.d.ts.map +1 -0
- package/dist/apps/actions/pg-fit.js +35 -0
- package/dist/apps/actions/pg-fit.js.map +1 -0
- package/dist/apps/actions/pg-write.d.ts +84 -0
- package/dist/apps/actions/pg-write.d.ts.map +1 -0
- package/dist/apps/actions/pg-write.js +161 -0
- package/dist/apps/actions/pg-write.js.map +1 -0
- package/dist/apps/actions/store.d.ts +109 -0
- package/dist/apps/actions/store.d.ts.map +1 -0
- package/dist/apps/actions/store.js +182 -0
- package/dist/apps/actions/store.js.map +1 -0
- package/dist/apps/actions/values.d.ts +59 -0
- package/dist/apps/actions/values.d.ts.map +1 -0
- package/dist/apps/actions/values.js +315 -0
- package/dist/apps/actions/values.js.map +1 -0
- package/dist/apps/actions/write-path.d.ts +103 -0
- package/dist/apps/actions/write-path.d.ts.map +1 -0
- package/dist/apps/actions/write-path.js +576 -0
- package/dist/apps/actions/write-path.js.map +1 -0
- package/dist/apps/check.d.ts +112 -0
- package/dist/apps/check.d.ts.map +1 -0
- package/dist/apps/check.js +358 -0
- package/dist/apps/check.js.map +1 -0
- package/dist/apps/exec/arg-types.d.ts +56 -0
- package/dist/apps/exec/arg-types.d.ts.map +1 -0
- package/dist/apps/exec/arg-types.js +234 -0
- package/dist/apps/exec/arg-types.js.map +1 -0
- package/dist/apps/exec/cache.d.ts +46 -0
- package/dist/apps/exec/cache.d.ts.map +1 -0
- package/dist/apps/exec/cache.js +93 -0
- package/dist/apps/exec/cache.js.map +1 -0
- package/dist/apps/exec/contract.d.ts +83 -0
- package/dist/apps/exec/contract.d.ts.map +1 -0
- package/dist/apps/exec/contract.js +220 -0
- package/dist/apps/exec/contract.js.map +1 -0
- package/dist/apps/exec/executor.d.ts +122 -0
- package/dist/apps/exec/executor.d.ts.map +1 -0
- package/dist/apps/exec/executor.js +455 -0
- package/dist/apps/exec/executor.js.map +1 -0
- package/dist/apps/exec/limits.d.ts +25 -0
- package/dist/apps/exec/limits.d.ts.map +1 -0
- package/dist/apps/exec/limits.js +71 -0
- package/dist/apps/exec/limits.js.map +1 -0
- package/dist/apps/exec/params.d.ts +34 -0
- package/dist/apps/exec/params.d.ts.map +1 -0
- package/dist/apps/exec/params.js +97 -0
- package/dist/apps/exec/params.js.map +1 -0
- package/dist/apps/exec/project.d.ts +67 -0
- package/dist/apps/exec/project.d.ts.map +1 -0
- package/dist/apps/exec/project.js +299 -0
- package/dist/apps/exec/project.js.map +1 -0
- package/dist/apps/exec/recall.d.ts +88 -0
- package/dist/apps/exec/recall.d.ts.map +1 -0
- package/dist/apps/exec/recall.js +301 -0
- package/dist/apps/exec/recall.js.map +1 -0
- package/dist/apps/exec/source-stage.d.ts +61 -0
- package/dist/apps/exec/source-stage.d.ts.map +1 -0
- package/dist/apps/exec/source-stage.js +540 -0
- package/dist/apps/exec/source-stage.js.map +1 -0
- package/dist/apps/exec/sources.d.ts +65 -0
- package/dist/apps/exec/sources.d.ts.map +1 -0
- package/dist/apps/exec/sources.js +77 -0
- package/dist/apps/exec/sources.js.map +1 -0
- package/dist/apps/exec/texts.d.ts +140 -0
- package/dist/apps/exec/texts.d.ts.map +1 -0
- package/dist/apps/exec/texts.js +76 -0
- package/dist/apps/exec/texts.js.map +1 -0
- package/dist/apps/exec/viewer.d.ts +11 -0
- package/dist/apps/exec/viewer.d.ts.map +1 -0
- package/dist/apps/exec/viewer.js +26 -0
- package/dist/apps/exec/viewer.js.map +1 -0
- package/dist/apps/git.d.ts +109 -0
- package/dist/apps/git.d.ts.map +1 -0
- package/dist/apps/git.js +361 -0
- package/dist/apps/git.js.map +1 -0
- package/dist/apps/publish/image.d.ts +25 -0
- package/dist/apps/publish/image.d.ts.map +1 -0
- package/dist/apps/publish/image.js +86 -0
- package/dist/apps/publish/image.js.map +1 -0
- package/dist/apps/publish/layout.d.ts +41 -0
- package/dist/apps/publish/layout.d.ts.map +1 -0
- package/dist/apps/publish/layout.js +31 -0
- package/dist/apps/publish/layout.js.map +1 -0
- package/dist/apps/publish/manifest.d.ts +64 -0
- package/dist/apps/publish/manifest.d.ts.map +1 -0
- package/dist/apps/publish/manifest.js +282 -0
- package/dist/apps/publish/manifest.js.map +1 -0
- package/dist/apps/publish/pack.d.ts +40 -0
- package/dist/apps/publish/pack.d.ts.map +1 -0
- package/dist/apps/publish/pack.js +78 -0
- package/dist/apps/publish/pack.js.map +1 -0
- package/dist/apps/routes.d.ts +103 -0
- package/dist/apps/routes.d.ts.map +1 -0
- package/dist/apps/routes.js +440 -0
- package/dist/apps/routes.js.map +1 -0
- package/dist/apps/spec.d.ts +322 -2640
- package/dist/apps/spec.d.ts.map +1 -1
- package/dist/apps/spec.js +89 -120
- package/dist/apps/spec.js.map +1 -1
- package/dist/apps/store.d.ts +341 -0
- package/dist/apps/store.d.ts.map +1 -0
- package/dist/apps/store.js +905 -0
- package/dist/apps/store.js.map +1 -0
- package/dist/apps/turns.d.ts +169 -0
- package/dist/apps/turns.d.ts.map +1 -0
- package/dist/apps/turns.js +556 -0
- package/dist/apps/turns.js.map +1 -0
- package/dist/apps/views.d.ts +44 -0
- package/dist/apps/views.d.ts.map +1 -0
- package/dist/apps/views.js +53 -0
- package/dist/apps/views.js.map +1 -0
- package/dist/campaigns/routes.d.ts +22 -94
- package/dist/campaigns/routes.d.ts.map +1 -1
- package/dist/campaigns/routes.js +8 -14
- package/dist/campaigns/routes.js.map +1 -1
- package/dist/cli/apps-check.d.ts +43 -0
- package/dist/cli/apps-check.d.ts.map +1 -0
- package/dist/cli/apps-check.js +166 -0
- package/dist/cli/apps-check.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +6 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/mcp.js +2 -2
- package/dist/cli/mcp.js.map +1 -1
- package/dist/core/adapter.d.ts +34 -1
- package/dist/core/adapter.d.ts.map +1 -1
- package/dist/core/adapter.js +78 -2
- package/dist/core/adapter.js.map +1 -1
- package/dist/core/builtin-catalog.d.ts.map +1 -1
- package/dist/core/builtin-catalog.js +2 -0
- package/dist/core/builtin-catalog.js.map +1 -1
- package/dist/core/deliver-text.d.ts +62 -1
- package/dist/core/deliver-text.d.ts.map +1 -1
- package/dist/core/deliver-text.js +244 -22
- package/dist/core/deliver-text.js.map +1 -1
- package/dist/core/deliver.d.ts.map +1 -1
- package/dist/core/deliver.js +30 -3
- package/dist/core/deliver.js.map +1 -1
- package/dist/core/estate-mcp-client.d.ts +9 -0
- package/dist/core/estate-mcp-client.d.ts.map +1 -1
- package/dist/core/estate-mcp-client.js +31 -3
- package/dist/core/estate-mcp-client.js.map +1 -1
- package/dist/core/linked-issues.d.ts +51 -3
- package/dist/core/linked-issues.d.ts.map +1 -1
- package/dist/core/linked-issues.js +59 -14
- package/dist/core/linked-issues.js.map +1 -1
- package/dist/core/qe-acceptance-setting.d.ts.map +1 -1
- package/dist/core/qe-acceptance-setting.js +6 -0
- package/dist/core/qe-acceptance-setting.js.map +1 -1
- package/dist/decisions/chat-recorder.js +1 -1
- package/dist/decisions/chat-recorder.js.map +1 -1
- package/dist/decisions/routes.d.ts.map +1 -1
- package/dist/decisions/routes.js +5 -9
- package/dist/decisions/routes.js.map +1 -1
- package/dist/decisions/rules-brief.d.ts +76 -0
- package/dist/decisions/rules-brief.d.ts.map +1 -0
- package/dist/decisions/rules-brief.js +179 -0
- package/dist/decisions/rules-brief.js.map +1 -0
- package/dist/editors/registry.d.ts +97 -258
- package/dist/editors/registry.d.ts.map +1 -1
- package/dist/editors/registry.js +11 -11
- package/dist/editors/registry.js.map +1 -1
- package/dist/editors/routes.js +3 -3
- package/dist/editors/routes.js.map +1 -1
- package/dist/evals/routes.d.ts.map +1 -1
- package/dist/evals/routes.js +3 -5
- package/dist/evals/routes.js.map +1 -1
- package/dist/insights/routes.js +2 -2
- package/dist/insights/routes.js.map +1 -1
- package/dist/interactive/proxy-routes.d.ts.map +1 -1
- package/dist/interactive/proxy-routes.js +76 -7
- package/dist/interactive/proxy-routes.js.map +1 -1
- package/dist/interactive/ws-relay.d.ts +3 -9
- package/dist/interactive/ws-relay.d.ts.map +1 -1
- package/dist/interactive/ws-relay.js +4 -6
- package/dist/interactive/ws-relay.js.map +1 -1
- package/dist/knowledge/adapters/native.d.ts +44 -0
- package/dist/knowledge/adapters/native.d.ts.map +1 -0
- package/dist/knowledge/adapters/native.js +60 -0
- package/dist/knowledge/adapters/native.js.map +1 -0
- package/dist/knowledge/adapters/toolbox/binary.d.ts +48 -0
- package/dist/knowledge/adapters/toolbox/binary.d.ts.map +1 -0
- package/dist/knowledge/adapters/toolbox/binary.js +145 -0
- package/dist/knowledge/adapters/toolbox/binary.js.map +1 -0
- package/dist/knowledge/adapters/toolbox/catalog.d.ts +22 -0
- package/dist/knowledge/adapters/toolbox/catalog.d.ts.map +1 -0
- package/dist/knowledge/adapters/toolbox/catalog.js +87 -0
- package/dist/knowledge/adapters/toolbox/catalog.js.map +1 -0
- package/dist/knowledge/adapters/toolbox/document.d.ts +71 -0
- package/dist/knowledge/adapters/toolbox/document.d.ts.map +1 -0
- package/dist/knowledge/adapters/toolbox/document.js +165 -0
- package/dist/knowledge/adapters/toolbox/document.js.map +1 -0
- package/dist/knowledge/adapters/toolbox/supervisor.d.ts +142 -0
- package/dist/knowledge/adapters/toolbox/supervisor.d.ts.map +1 -0
- package/dist/knowledge/adapters/toolbox/supervisor.js +438 -0
- package/dist/knowledge/adapters/toolbox/supervisor.js.map +1 -0
- package/dist/knowledge/gate/access.d.ts +36 -0
- package/dist/knowledge/gate/access.d.ts.map +1 -0
- package/dist/knowledge/gate/access.js +46 -0
- package/dist/knowledge/gate/access.js.map +1 -0
- package/dist/knowledge/gate/envelope.d.ts +67 -0
- package/dist/knowledge/gate/envelope.d.ts.map +1 -0
- package/dist/knowledge/gate/envelope.js +96 -0
- package/dist/knowledge/gate/envelope.js.map +1 -0
- package/dist/knowledge/gate/gate.d.ts +238 -0
- package/dist/knowledge/gate/gate.d.ts.map +1 -0
- package/dist/knowledge/gate/gate.js +782 -0
- package/dist/knowledge/gate/gate.js.map +1 -0
- package/dist/knowledge/gate/pg.d.ts +57 -0
- package/dist/knowledge/gate/pg.d.ts.map +1 -0
- package/dist/knowledge/gate/pg.js +94 -0
- package/dist/knowledge/gate/pg.js.map +1 -0
- package/dist/knowledge/gate/record.d.ts +77 -0
- package/dist/knowledge/gate/record.d.ts.map +1 -0
- package/dist/knowledge/gate/record.js +205 -0
- package/dist/knowledge/gate/record.js.map +1 -0
- package/dist/knowledge/gate/routes.d.ts +38 -0
- package/dist/knowledge/gate/routes.d.ts.map +1 -0
- package/dist/knowledge/gate/routes.js +102 -0
- package/dist/knowledge/gate/routes.js.map +1 -0
- package/dist/knowledge/gate/scheduler.d.ts +90 -0
- package/dist/knowledge/gate/scheduler.d.ts.map +1 -0
- package/dist/knowledge/gate/scheduler.js +224 -0
- package/dist/knowledge/gate/scheduler.js.map +1 -0
- package/dist/knowledge/gate/sources.d.ts +69 -0
- package/dist/knowledge/gate/sources.d.ts.map +1 -0
- package/dist/knowledge/gate/sources.js +135 -0
- package/dist/knowledge/gate/sources.js.map +1 -0
- package/dist/knowledge/package.d.ts +136 -0
- package/dist/knowledge/package.d.ts.map +1 -0
- package/dist/knowledge/package.js +148 -0
- package/dist/knowledge/package.js.map +1 -0
- package/dist/knowledge/projector.d.ts +144 -0
- package/dist/knowledge/projector.d.ts.map +1 -0
- package/dist/knowledge/projector.js +287 -0
- package/dist/knowledge/projector.js.map +1 -0
- package/dist/knowledge/registry/entry.d.ts +177 -0
- package/dist/knowledge/registry/entry.d.ts.map +1 -0
- package/dist/knowledge/registry/entry.js +126 -0
- package/dist/knowledge/registry/entry.js.map +1 -0
- package/dist/knowledge/registry/policy.d.ts +79 -0
- package/dist/knowledge/registry/policy.d.ts.map +1 -0
- package/dist/knowledge/registry/policy.js +139 -0
- package/dist/knowledge/registry/policy.js.map +1 -0
- package/dist/knowledge/shapes/code-search.d.ts +55 -0
- package/dist/knowledge/shapes/code-search.d.ts.map +1 -0
- package/dist/knowledge/shapes/code-search.js +88 -0
- package/dist/knowledge/shapes/code-search.js.map +1 -0
- package/dist/knowledge/shapes/map.d.ts +25 -0
- package/dist/knowledge/shapes/map.d.ts.map +1 -0
- package/dist/knowledge/shapes/map.js +187 -0
- package/dist/knowledge/shapes/map.js.map +1 -0
- package/dist/knowledge/shapes/profile.d.ts +117 -0
- package/dist/knowledge/shapes/profile.d.ts.map +1 -0
- package/dist/knowledge/shapes/profile.js +264 -0
- package/dist/knowledge/shapes/profile.js.map +1 -0
- package/dist/knowledge/shapes/routes.d.ts +69 -0
- package/dist/knowledge/shapes/routes.d.ts.map +1 -0
- package/dist/knowledge/shapes/routes.js +270 -0
- package/dist/knowledge/shapes/routes.js.map +1 -0
- package/dist/knowledge/shapes/shapes.d.ts +144 -0
- package/dist/knowledge/shapes/shapes.d.ts.map +1 -0
- package/dist/knowledge/shapes/shapes.js +280 -0
- package/dist/knowledge/shapes/shapes.js.map +1 -0
- package/dist/knowledge/shapes/verified.d.ts +36 -0
- package/dist/knowledge/shapes/verified.d.ts.map +1 -0
- package/dist/knowledge/shapes/verified.js +73 -0
- package/dist/knowledge/shapes/verified.js.map +1 -0
- package/dist/knowledge/summary.d.ts +45 -0
- package/dist/knowledge/summary.d.ts.map +1 -0
- package/dist/knowledge/summary.js +119 -0
- package/dist/knowledge/summary.js.map +1 -0
- package/dist/knowledge/trackers/actions.d.ts +55 -0
- package/dist/knowledge/trackers/actions.d.ts.map +1 -0
- package/dist/knowledge/trackers/actions.js +327 -0
- package/dist/knowledge/trackers/actions.js.map +1 -0
- package/dist/knowledge/trackers/addresses.d.ts +45 -0
- package/dist/knowledge/trackers/addresses.d.ts.map +1 -0
- package/dist/knowledge/trackers/addresses.js +59 -0
- package/dist/knowledge/trackers/addresses.js.map +1 -0
- package/dist/knowledge/trackers/bindings.d.ts +190 -0
- package/dist/knowledge/trackers/bindings.d.ts.map +1 -0
- package/dist/knowledge/trackers/bindings.js +970 -0
- package/dist/knowledge/trackers/bindings.js.map +1 -0
- package/dist/knowledge/trackers/gate-pm.d.ts +160 -0
- package/dist/knowledge/trackers/gate-pm.d.ts.map +1 -0
- package/dist/knowledge/trackers/gate-pm.js +427 -0
- package/dist/knowledge/trackers/gate-pm.js.map +1 -0
- package/dist/knowledge/trackers/issues.d.ts +69 -0
- package/dist/knowledge/trackers/issues.d.ts.map +1 -0
- package/dist/knowledge/trackers/issues.js +193 -0
- package/dist/knowledge/trackers/issues.js.map +1 -0
- package/dist/knowledge/trackers/map.d.ts +23 -0
- package/dist/knowledge/trackers/map.d.ts.map +1 -0
- package/dist/knowledge/trackers/map.js +130 -0
- package/dist/knowledge/trackers/map.js.map +1 -0
- package/dist/knowledge/trackers/projector.d.ts +113 -0
- package/dist/knowledge/trackers/projector.d.ts.map +1 -0
- package/dist/knowledge/trackers/projector.js +274 -0
- package/dist/knowledge/trackers/projector.js.map +1 -0
- package/dist/knowledge/trackers/routes.d.ts +107 -0
- package/dist/knowledge/trackers/routes.d.ts.map +1 -0
- package/dist/knowledge/trackers/routes.js +563 -0
- package/dist/knowledge/trackers/routes.js.map +1 -0
- package/dist/knowledge/trackers/set.d.ts +61 -0
- package/dist/knowledge/trackers/set.d.ts.map +1 -0
- package/dist/knowledge/trackers/set.js +77 -0
- package/dist/knowledge/trackers/set.js.map +1 -0
- package/dist/knowledge/trackers/view.d.ts +22 -0
- package/dist/knowledge/trackers/view.d.ts.map +1 -0
- package/dist/knowledge/trackers/view.js +31 -0
- package/dist/knowledge/trackers/view.js.map +1 -0
- package/dist/knowledge/trackers/visible.d.ts +9 -0
- package/dist/knowledge/trackers/visible.d.ts.map +1 -0
- package/dist/knowledge/trackers/visible.js +10 -0
- package/dist/knowledge/trackers/visible.js.map +1 -0
- package/dist/learn/routes.d.ts +3 -17
- package/dist/learn/routes.d.ts.map +1 -1
- package/dist/learn/routes.js +4 -6
- package/dist/learn/routes.js.map +1 -1
- package/dist/mcp/ask-server.d.ts +6 -0
- package/dist/mcp/ask-server.d.ts.map +1 -1
- package/dist/mcp/ask-server.js +15 -9
- package/dist/mcp/ask-server.js.map +1 -1
- package/dist/mcp/broker.d.ts +16 -0
- package/dist/mcp/broker.d.ts.map +1 -1
- package/dist/mcp/broker.js +137 -3
- package/dist/mcp/broker.js.map +1 -1
- package/dist/mcp/estate-relay.d.ts +50 -2
- package/dist/mcp/estate-relay.d.ts.map +1 -1
- package/dist/mcp/estate-relay.js +126 -4
- package/dist/mcp/estate-relay.js.map +1 -1
- package/dist/mcp/invoke.d.ts +12 -1
- package/dist/mcp/invoke.d.ts.map +1 -1
- package/dist/mcp/invoke.js +5 -2
- package/dist/mcp/invoke.js.map +1 -1
- package/dist/mcp/probe.d.ts +34 -2
- package/dist/mcp/probe.d.ts.map +1 -1
- package/dist/mcp/probe.js +51 -9
- package/dist/mcp/probe.js.map +1 -1
- package/dist/mcp/registry-store.d.ts +91 -0
- package/dist/mcp/registry-store.d.ts.map +1 -1
- package/dist/mcp/registry-store.js +116 -9
- package/dist/mcp/registry-store.js.map +1 -1
- package/dist/mcp/registry.d.ts +249 -6
- package/dist/mcp/registry.d.ts.map +1 -1
- package/dist/mcp/registry.js +735 -35
- package/dist/mcp/registry.js.map +1 -1
- package/dist/mcp/rest.d.ts +36 -10
- package/dist/mcp/rest.d.ts.map +1 -1
- package/dist/mcp/rest.js +71 -73
- package/dist/mcp/rest.js.map +1 -1
- package/dist/mcp/tool-list.d.ts +7 -0
- package/dist/mcp/tool-list.d.ts.map +1 -1
- package/dist/mcp/tool-list.js +32 -4
- package/dist/mcp/tool-list.js.map +1 -1
- package/dist/mcp-inspect/routes.d.ts +3 -0
- package/dist/mcp-inspect/routes.d.ts.map +1 -1
- package/dist/mcp-inspect/routes.js +31 -18
- package/dist/mcp-inspect/routes.js.map +1 -1
- package/dist/persona/routes.d.ts +14 -69
- package/dist/persona/routes.d.ts.map +1 -1
- package/dist/persona/routes.js +2 -2
- package/dist/persona/routes.js.map +1 -1
- package/dist/persona/store.d.ts +13 -40
- package/dist/persona/store.d.ts.map +1 -1
- package/dist/persona/store.js +9 -11
- package/dist/persona/store.js.map +1 -1
- package/dist/presets/routes.d.ts +3 -21
- package/dist/presets/routes.d.ts.map +1 -1
- package/dist/presets/routes.js +5 -7
- package/dist/presets/routes.js.map +1 -1
- package/dist/projects/repo-guard.d.ts +32 -0
- package/dist/projects/repo-guard.d.ts.map +1 -0
- package/dist/projects/repo-guard.js +46 -0
- package/dist/projects/repo-guard.js.map +1 -0
- package/dist/projects/routes.d.ts +16 -44
- package/dist/projects/routes.d.ts.map +1 -1
- package/dist/projects/routes.js +15 -18
- package/dist/projects/routes.js.map +1 -1
- package/dist/schedules/routes.d.ts +4 -18
- package/dist/schedules/routes.d.ts.map +1 -1
- package/dist/schedules/routes.js +4 -6
- package/dist/schedules/routes.js.map +1 -1
- package/dist/skills/plugin-source.d.ts +6 -5
- package/dist/skills/plugin-source.d.ts.map +1 -1
- package/dist/skills/plugin-source.js +6 -5
- package/dist/skills/plugin-source.js.map +1 -1
- package/dist/sources/ask.d.ts +108 -0
- package/dist/sources/ask.d.ts.map +1 -0
- package/dist/sources/ask.js +251 -0
- package/dist/sources/ask.js.map +1 -0
- package/dist/sources/catalog/mysql.d.ts +9 -0
- package/dist/sources/catalog/mysql.d.ts.map +1 -0
- package/dist/sources/catalog/mysql.js +77 -0
- package/dist/sources/catalog/mysql.js.map +1 -0
- package/dist/sources/catalog/postgres.d.ts +68 -0
- package/dist/sources/catalog/postgres.d.ts.map +1 -0
- package/dist/sources/catalog/postgres.js +164 -0
- package/dist/sources/catalog/postgres.js.map +1 -0
- package/dist/sources/catalog/types.d.ts +53 -0
- package/dist/sources/catalog/types.d.ts.map +1 -0
- package/dist/sources/catalog/types.js +30 -0
- package/dist/sources/catalog/types.js.map +1 -0
- package/dist/sources/connection-test.d.ts +37 -0
- package/dist/sources/connection-test.d.ts.map +1 -0
- package/dist/sources/connection-test.js +101 -0
- package/dist/sources/connection-test.js.map +1 -0
- package/dist/sources/crew-source.d.ts +31 -0
- package/dist/sources/crew-source.d.ts.map +1 -0
- package/dist/sources/crew-source.js +48 -0
- package/dist/sources/crew-source.js.map +1 -0
- package/dist/sources/dialer.d.ts +169 -0
- package/dist/sources/dialer.d.ts.map +1 -0
- package/dist/sources/dialer.js +761 -0
- package/dist/sources/dialer.js.map +1 -0
- package/dist/sources/drivers/mysql.d.ts +52 -0
- package/dist/sources/drivers/mysql.d.ts.map +1 -0
- package/dist/sources/drivers/mysql.js +348 -0
- package/dist/sources/drivers/mysql.js.map +1 -0
- package/dist/sources/drivers/postgres.d.ts +84 -0
- package/dist/sources/drivers/postgres.d.ts.map +1 -0
- package/dist/sources/drivers/postgres.js +381 -0
- package/dist/sources/drivers/postgres.js.map +1 -0
- package/dist/sources/drivers/sqlite.d.ts +47 -0
- package/dist/sources/drivers/sqlite.d.ts.map +1 -0
- package/dist/sources/drivers/sqlite.js +156 -0
- package/dist/sources/drivers/sqlite.js.map +1 -0
- package/dist/sources/drivers/types.d.ts +79 -0
- package/dist/sources/drivers/types.d.ts.map +1 -0
- package/dist/sources/drivers/types.js +31 -0
- package/dist/sources/drivers/types.js.map +1 -0
- package/dist/sources/graphql.d.ts +85 -0
- package/dist/sources/graphql.d.ts.map +1 -0
- package/dist/sources/graphql.js +155 -0
- package/dist/sources/graphql.js.map +1 -0
- package/dist/sources/kinds.d.ts +79 -0
- package/dist/sources/kinds.d.ts.map +1 -0
- package/dist/sources/kinds.js +145 -0
- package/dist/sources/kinds.js.map +1 -0
- package/dist/sources/policy/allowlists.d.ts +30 -0
- package/dist/sources/policy/allowlists.d.ts.map +1 -0
- package/dist/sources/policy/allowlists.js +104 -0
- package/dist/sources/policy/allowlists.js.map +1 -0
- package/dist/sources/policy/index.d.ts +20 -0
- package/dist/sources/policy/index.d.ts.map +1 -0
- package/dist/sources/policy/index.js +34 -0
- package/dist/sources/policy/index.js.map +1 -0
- package/dist/sources/policy/mysql.d.ts +21 -0
- package/dist/sources/policy/mysql.d.ts.map +1 -0
- package/dist/sources/policy/mysql.js +834 -0
- package/dist/sources/policy/mysql.js.map +1 -0
- package/dist/sources/policy/pg.d.ts +37 -0
- package/dist/sources/policy/pg.d.ts.map +1 -0
- package/dist/sources/policy/pg.js +572 -0
- package/dist/sources/policy/pg.js.map +1 -0
- package/dist/sources/policy/sqlite.d.ts +37 -0
- package/dist/sources/policy/sqlite.d.ts.map +1 -0
- package/dist/sources/policy/sqlite.js +94 -0
- package/dist/sources/policy/sqlite.js.map +1 -0
- package/dist/sources/policy/types.d.ts +46 -0
- package/dist/sources/policy/types.d.ts.map +1 -0
- package/dist/sources/policy/types.js +13 -0
- package/dist/sources/policy/types.js.map +1 -0
- package/dist/sources/routes.d.ts +154 -0
- package/dist/sources/routes.d.ts.map +1 -0
- package/dist/sources/routes.js +745 -0
- package/dist/sources/routes.js.map +1 -0
- package/dist/sources/safety/postgres.d.ts +87 -0
- package/dist/sources/safety/postgres.d.ts.map +1 -0
- package/dist/sources/safety/postgres.js +349 -0
- package/dist/sources/safety/postgres.js.map +1 -0
- package/dist/sources/sql.d.ts +51 -0
- package/dist/sources/sql.d.ts.map +1 -0
- package/dist/sources/sql.js +89 -0
- package/dist/sources/sql.js.map +1 -0
- package/dist/sources/store.d.ts +25 -0
- package/dist/sources/store.d.ts.map +1 -0
- package/dist/sources/store.js +59 -0
- package/dist/sources/store.js.map +1 -0
- package/dist/sources/uploads.d.ts +70 -0
- package/dist/sources/uploads.d.ts.map +1 -0
- package/dist/sources/uploads.js +636 -0
- package/dist/sources/uploads.js.map +1 -0
- package/dist/standing-orders/parse.d.ts +38 -0
- package/dist/standing-orders/parse.d.ts.map +1 -1
- package/dist/standing-orders/parse.js +104 -43
- package/dist/standing-orders/parse.js.map +1 -1
- package/dist/standing-orders/routes.d.ts +25 -126
- package/dist/standing-orders/routes.d.ts.map +1 -1
- package/dist/standing-orders/routes.js +4 -6
- package/dist/standing-orders/routes.js.map +1 -1
- package/dist/standing-orders/store.d.ts +22 -73
- package/dist/standing-orders/store.d.ts.map +1 -1
- package/dist/standing-orders/store.js +8 -12
- package/dist/standing-orders/store.js.map +1 -1
- package/dist/studio/assets/KnowledgeGraph-Cpm46tEp.js +1 -0
- package/dist/studio/assets/WickedSansA-Regular-CGPJLyb8.woff2 +0 -0
- package/dist/studio/assets/WickedSansA-SemiBold-Bk9KXUaV.woff2 +0 -0
- package/dist/studio/assets/favicon-BJA6hF2f.svg +1 -0
- package/dist/studio/assets/index-BRBwWQMH.css +32 -0
- package/dist/studio/assets/index-CVrWDGRP.js +1097 -0
- package/dist/studio/assets/wicked-studio-lettering-small-CBwSGqop.svg +2 -0
- package/dist/studio/assets/wicked-studio-wordmark-small-gF5xn6IC.svg +2 -0
- package/dist/studio/editors/wicked-apps/editor.json +45 -0
- package/dist/studio/editors/wicked-apps/icon.svg +1 -0
- package/dist/studio/editors/wicked-apps/index.html +151 -0
- package/dist/studio/editors/wicked-deck/editor.json +1 -1
- package/dist/studio/editors/wicked-deck/index.html +12 -8
- package/dist/studio/editors/wicked-doc/editor.json +1 -1
- package/dist/studio/editors/wicked-doc/index.html +12 -8
- 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 +12 -8
- package/dist/studio/editors/wicked-video/editor.json +1 -1
- package/dist/studio/editors/wicked-video/index.html +1 -1
- package/dist/studio/fonts/LICENSE-WickedSans.txt +97 -0
- package/dist/studio/index.html +3 -2
- package/dist/studio/testid-inventory.json +10850 -6700
- package/dist/team/routes.d.ts +31 -172
- package/dist/team/routes.d.ts.map +1 -1
- package/dist/team/routes.js +31 -8
- package/dist/team/routes.js.map +1 -1
- package/dist/voice/dashboard.d.ts +35 -313
- package/dist/voice/dashboard.d.ts.map +1 -1
- package/dist/voice/dashboard.js +10 -10
- package/dist/voice/dashboard.js.map +1 -1
- package/dist/voice/routes.d.ts +2 -6
- package/dist/voice/routes.d.ts.map +1 -1
- package/dist/voice/routes.js +2 -2
- package/dist/voice/routes.js.map +1 -1
- package/dist/watch/checks/check-failed.d.ts +4 -10
- package/dist/watch/checks/check-failed.d.ts.map +1 -1
- package/dist/watch/checks/check-failed.js +6 -8
- package/dist/watch/checks/check-failed.js.map +1 -1
- package/dist/watch/checks/claim-vs-evidence.js +3 -3
- package/dist/watch/checks/claim-vs-evidence.js.map +1 -1
- package/dist/watch/checks/deliver-audit.js +3 -3
- package/dist/watch/checks/deliver-audit.js.map +1 -1
- package/dist/watch/checks/discovery.d.ts.map +1 -1
- package/dist/watch/checks/discovery.js +5 -7
- package/dist/watch/checks/discovery.js.map +1 -1
- package/dist/watch/checks/lag.d.ts +4 -10
- package/dist/watch/checks/lag.d.ts.map +1 -1
- package/dist/watch/checks/lag.js +6 -8
- package/dist/watch/checks/lag.js.map +1 -1
- package/dist/watch/checks/quiet-after-claim.js +3 -3
- package/dist/watch/checks/quiet-after-claim.js.map +1 -1
- package/dist/watch/checks/scope-drift.js +3 -3
- package/dist/watch/checks/scope-drift.js.map +1 -1
- package/dist/watch/checks/team-path.js +2 -2
- package/dist/watch/checks/team-path.js.map +1 -1
- package/dist/watch/checks/ungated.js +3 -3
- package/dist/watch/checks/ungated.js.map +1 -1
- package/dist/watch/checks/warned-rule.js +3 -3
- package/dist/watch/checks/warned-rule.js.map +1 -1
- package/dist/watch/loader.d.ts.map +1 -1
- package/dist/watch/loader.js +12 -16
- package/dist/watch/loader.js.map +1 -1
- package/dist/workflow-catalog/build-v2.d.ts +90 -0
- package/dist/workflow-catalog/build-v2.d.ts.map +1 -0
- package/dist/workflow-catalog/build-v2.js +527 -0
- package/dist/workflow-catalog/build-v2.js.map +1 -0
- package/dist/workflow-catalog/build.d.ts +2 -0
- package/dist/workflow-catalog/build.d.ts.map +1 -1
- package/dist/workflow-catalog/build.js +8 -4
- package/dist/workflow-catalog/build.js.map +1 -1
- package/dist/workflow-catalog/catalog-data-v2.d.ts +12 -0
- package/dist/workflow-catalog/catalog-data-v2.d.ts.map +1 -0
- package/dist/workflow-catalog/catalog-data-v2.js +2582 -0
- package/dist/workflow-catalog/catalog-data-v2.js.map +1 -0
- package/dist/workflow-catalog/catalog-data.d.ts +7 -1
- package/dist/workflow-catalog/catalog-data.d.ts.map +1 -1
- package/dist/workflow-catalog/catalog-data.js +36 -7
- package/dist/workflow-catalog/catalog-data.js.map +1 -1
- package/dist/workflow-catalog/seeds-v2.d.ts +91 -0
- package/dist/workflow-catalog/seeds-v2.d.ts.map +1 -0
- package/dist/workflow-catalog/seeds-v2.js +2 -0
- package/dist/workflow-catalog/seeds-v2.js.map +1 -0
- package/dist/workflow-catalog/shape.d.ts +97 -0
- package/dist/workflow-catalog/shape.d.ts.map +1 -0
- package/dist/workflow-catalog/shape.js +97 -0
- package/dist/workflow-catalog/shape.js.map +1 -0
- package/dist/working-doc/service.d.ts.map +1 -1
- package/dist/working-doc/service.js +2 -1
- package/dist/working-doc/service.js.map +1 -1
- package/dist/zod.d.ts +39 -0
- package/dist/zod.d.ts.map +1 -0
- package/dist/zod.js +197 -0
- package/dist/zod.js.map +1 -0
- package/endpoint-manifest.json +651 -11
- package/package.json +31 -7
- package/runners/sqlite-runner.mjs +110 -0
- package/dist/studio/assets/WickedSans-Regular-fb698rcD.woff2 +0 -0
- package/dist/studio/assets/WickedSans-SemiBold-CD53n1AC.woff2 +0 -0
- package/dist/studio/assets/index-BUZ_-Syk.css +0 -32
- package/dist/studio/assets/index-u4O_7N-b.js +0 -986
package/README.md
CHANGED
|
@@ -2,9 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
**The harness for your agent harnesses** — run the coding-agent CLIs you already use as governed
|
|
4
4
|
workers through durable, multi-agent workflows. Intent in, gated work out: gates are
|
|
5
|
-
deny-dominates, "done" is re-derived from evidence instead of asserted, and review goes to
|
|
6
|
-
other than the
|
|
7
|
-
|
|
5
|
+
deny-dominates, "done" is re-derived from evidence instead of asserted, and by default review goes to
|
|
6
|
+
an agent other than the one that built the work. When none can review it, the run stops unless you
|
|
7
|
+
launch it as "reduced assurance", which is labelled on the run, every gate and the delivery; crew never
|
|
8
|
+
turns that on for you.
|
|
9
|
+
|
|
10
|
+
Apps and data, through one gate: register your databases, files, APIs and issue trackers (GitHub
|
|
11
|
+
Issues, Jira), build dashboards over them by chat, and let agents read your databases only where you
|
|
12
|
+
allow it. An agent's read of a database is one checked, read-only query with a 10 s deadline and at
|
|
13
|
+
most 200 rows, marked as untrusted data and cited.
|
|
8
14
|
|
|
9
15
|
Local-first: loopback only, no accounts, no billing, no model reselling. Crew drives the agents
|
|
10
16
|
*you* already pay for, on *your* auth and *your* plan.
|
|
@@ -13,16 +19,17 @@ Local-first: loopback only, no accounts, no billing, no model reselling. Crew dr
|
|
|
13
19
|
|
|
14
20
|
Before you start, you need:
|
|
15
21
|
|
|
16
|
-
- **Node.js ≥ 22
|
|
22
|
+
- **Node.js ≥ 22** (uploading a file or a SQLite database as a data source needs 24.12, 25.1 or later).
|
|
17
23
|
- **A container runtime** (Rancher Desktop, Docker, Podman, Colima or OrbStack), running. Governed
|
|
18
24
|
agents work in a hardened seat container, and you sign each one in from studio's Agents tab in a
|
|
19
25
|
login container. `WICKED_SEAT_FLOOR=host` keeps the labelled interim host floor instead.
|
|
20
26
|
- **At least one coding-agent CLI** you can sign in (Claude Code, Codex, GitHub Copilot, OpenCode or Pi).
|
|
21
|
-
- **wicked-garden ≥ 12.
|
|
22
|
-
without it every launch is refused:
|
|
23
|
-
`wicked-crew serve`.
|
|
24
|
-
- Optional: **wicked-estate** (`wicked-estate-mcp` on PATH) for code graphs and memory
|
|
25
|
-
|
|
27
|
+
- **wicked-garden ≥ 12.64.0**, the skills every governed worker follows (including the Apps skill an
|
|
28
|
+
app's chat builds with). crew does not vendor it, and without it every launch is refused:
|
|
29
|
+
`npx wicked-installer install wicked-garden`, then restart `wicked-crew serve`.
|
|
30
|
+
- Optional: **wicked-estate** (`wicked-estate-mcp` on PATH) for code graphs and memory, and, from
|
|
31
|
+
wicked-estate 0.32.0, the knowledge store that holds your data sources' structure (never their
|
|
32
|
+
values) so agents can recall it. It installs with cargo today, so it needs a Rust toolchain.
|
|
26
33
|
|
|
27
34
|
```bash
|
|
28
35
|
npm install -g wicked-crew
|
|
@@ -100,6 +107,17 @@ The engine underneath is [wicked-core](https://github.com/mikeparcewski/wicked-c
|
|
|
100
107
|
single-writer), embedded via the `wicked-core-ts` napi bridge — the daemon is a thin REST+WS
|
|
101
108
|
layer over it.
|
|
102
109
|
|
|
110
|
+
## Apps and data sources
|
|
111
|
+
|
|
112
|
+
Data sources are Postgres, MySQL, uploads (CSV, XLSX, `.sqlite`), GraphQL, REST and MCP servers, issue
|
|
113
|
+
trackers and crew itself, in one registry with Test connection, and "Ask a question of this data" for
|
|
114
|
+
SQL sources. An app is a dashboard built by chat: each message is one governed job whose change lands
|
|
115
|
+
only after a different agent reviews it. Agents read a database only through the data gate, under three
|
|
116
|
+
switches a person sets on the source (see its structure, query its rows, which projects); rows are
|
|
117
|
+
Postgres-only in this release. A REST or MCP server's tools reach agents as MCP tools, under your MCP
|
|
118
|
+
approvals and policies. Trackers (GitHub Issues, Jira) link to projects and repositories, and a job sees only the
|
|
119
|
+
trackers of its project and repositories. Details: [data sources](https://github.com/mikeparcewski/wicked-crew/blob/main/docs/data-sources.md).
|
|
120
|
+
|
|
103
121
|
## The acceptance gate
|
|
104
122
|
|
|
105
123
|
`GET /api/v1/runs/:id/acceptance` answers "does the QE evidence ledger accept this run's work?" —
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (DES-KNOWLEDGE-DATA-001 §5.2, crew#1317) The audit trail as a non-human reader may see it.
|
|
3
|
+
*
|
|
4
|
+
* `GET /audit` is an observer read. The MCP, source and app-action lines carry connection data in their
|
|
5
|
+
* `detail`: a saved server's secret reference (`authRef`), the confirmed address ranges, a REST server's
|
|
6
|
+
* origin, base path, resolved address and its spec's servers, a test call's URL, a query's relations, an
|
|
7
|
+
* action run's operation (`UPDATE support.tickets`) and its reason. A human actor
|
|
8
|
+
* reads every line whole. Any other actor ({@link viewOf} `agent`) reads those lines with their `detail`
|
|
9
|
+
* reduced to the keys allowed below, the way `GET /mcp/servers` answers it the agent-safe view. The trail
|
|
10
|
+
* on disk is unchanged, and so is every in-process reader (`readAll`).
|
|
11
|
+
*
|
|
12
|
+
* An ALLOWLIST, per action: a key added to one of these lines later stays out of the agent view until it
|
|
13
|
+
* is allowed here. An action of these families that is not listed keeps only {@link IDENTITY}.
|
|
14
|
+
*/
|
|
15
|
+
import type { Actor, AuditEntry } from '../core/types.js';
|
|
16
|
+
/** Each action's allowlist (exported for the guard test, which checks no entry admits a connection-data key). */
|
|
17
|
+
export declare const ALLOWED: Readonly<Record<string, readonly string[]>>;
|
|
18
|
+
/** The keys of `action`'s detail a non-human reader keeps; `null` = the line is not a source line (kept whole). */
|
|
19
|
+
export declare function agentAuditKeys(action: string): readonly string[] | null;
|
|
20
|
+
/** One entry as `actor` may read it. */
|
|
21
|
+
export declare function auditEntryFor(actor: Actor | null | undefined, entry: AuditEntry): AuditEntry;
|
|
22
|
+
/** `GET /audit`'s entries as `actor` may read them. */
|
|
23
|
+
export declare function auditFor(actor: Actor | null | undefined, entries: readonly AuditEntry[]): AuditEntry[];
|
|
24
|
+
//# sourceMappingURL=audit-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-view.d.ts","sourceRoot":"","sources":["../../src/api/audit-view.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAS1D,iHAAiH;AACjH,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAyB/D,CAAC;AAEF,mHAAmH;AACnH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,IAAI,CAGvE;AAED,wCAAwC;AACxC,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,EAAE,KAAK,EAAE,UAAU,GAAG,UAAU,CAO5F;AAED,uDAAuD;AACvD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG,UAAU,EAAE,CAEtG"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (DES-KNOWLEDGE-DATA-001 §5.2, crew#1317) The audit trail as a non-human reader may see it.
|
|
3
|
+
*
|
|
4
|
+
* `GET /audit` is an observer read. The MCP, source and app-action lines carry connection data in their
|
|
5
|
+
* `detail`: a saved server's secret reference (`authRef`), the confirmed address ranges, a REST server's
|
|
6
|
+
* origin, base path, resolved address and its spec's servers, a test call's URL, a query's relations, an
|
|
7
|
+
* action run's operation (`UPDATE support.tickets`) and its reason. A human actor
|
|
8
|
+
* reads every line whole. Any other actor ({@link viewOf} `agent`) reads those lines with their `detail`
|
|
9
|
+
* reduced to the keys allowed below, the way `GET /mcp/servers` answers it the agent-safe view. The trail
|
|
10
|
+
* on disk is unchanged, and so is every in-process reader (`readAll`).
|
|
11
|
+
*
|
|
12
|
+
* An ALLOWLIST, per action: a key added to one of these lines later stays out of the agent view until it
|
|
13
|
+
* is allowed here. An action of these families that is not listed keeps only {@link IDENTITY}.
|
|
14
|
+
*/
|
|
15
|
+
import { viewOf } from './auth.js';
|
|
16
|
+
/** The action families whose `detail` can hold a source's connection data. */
|
|
17
|
+
const FAMILIES = ['mcp.', 'apps.source.', 'apps.action.', 'knowledge.source.'];
|
|
18
|
+
/** What any line of those families keeps: which server, source, tool, app or action it is about. */
|
|
19
|
+
const IDENTITY = ['name', 'source', 'subject', 'subjects', 'app', 'action'];
|
|
20
|
+
/** Each action's allowlist (exported for the guard test, which checks no entry admits a connection-data key). */
|
|
21
|
+
export const ALLOWED = {
|
|
22
|
+
'mcp.server.saved': ['name', 'kind', 'tools', 'disabledWrites'],
|
|
23
|
+
'mcp.server.address_confirmed': ['name', 'kind'],
|
|
24
|
+
'mcp.server.egress_confirmed': ['name'],
|
|
25
|
+
'mcp.server.enabled': ['name'],
|
|
26
|
+
'mcp.server.disabled': ['name'],
|
|
27
|
+
'mcp.server.removed': ['name'],
|
|
28
|
+
'mcp.secret.set': ['name'],
|
|
29
|
+
'mcp.tool.updated': ['subject', 'enabled', 'classOverride', 'disclosure'],
|
|
30
|
+
'mcp.tool.write_granted': ['subject', 'class', 'via'],
|
|
31
|
+
'mcp.tool.disclosure_reviewed': ['subject', 'disclosure', 'via'],
|
|
32
|
+
'mcp.approval.granted': ['subject', 'rules'],
|
|
33
|
+
'mcp.approval.revoked': ['subject', 'rules'],
|
|
34
|
+
'mcp.approval.withdrawn': ['subjects', 'rules', 'why'],
|
|
35
|
+
'mcp.approval.partial': ['subjects', 'rules'],
|
|
36
|
+
'mcp.registry.restored': ['restored', 'generation', 'servers', 'disabled', 'queryReset', 'writesReset', 'withdrawnApprovals'],
|
|
37
|
+
'apps.source.writes_allowed': ['source', 'refused', 'withdrawFailed', 'withdrawnStaleGrants'],
|
|
38
|
+
'apps.source.writes_disallowed': ['source', 'withdrawnGrants', 'withdrawFailed'],
|
|
39
|
+
'apps.source.test_call': ['source', 'ok', 'status', 'failed'],
|
|
40
|
+
'apps.source.asked': ['source', 'seat', 'drafted', 'failed', 'check'],
|
|
41
|
+
'apps.source.queried': ['source', 'ok', 'rows', 'truncated', 'ms', 'errorClass', 'sqlstate', 'refused', 'failed'],
|
|
42
|
+
'apps.source.uploaded': ['source', 'kind', 'digest', 'bytes'],
|
|
43
|
+
'apps.action.granted': ['app', 'action', 'kind', 'source', 'actionHash', 'contractHash', 'descriptorHash'],
|
|
44
|
+
'apps.action.revoked': ['app', 'action'],
|
|
45
|
+
'apps.action.ran': ['app', 'action', 'record', 'outcome', 'recovered', 'recordNotSaved', 'ms'],
|
|
46
|
+
};
|
|
47
|
+
/** The keys of `action`'s detail a non-human reader keeps; `null` = the line is not a source line (kept whole). */
|
|
48
|
+
export function agentAuditKeys(action) {
|
|
49
|
+
if (Object.hasOwn(ALLOWED, action))
|
|
50
|
+
return ALLOWED[action];
|
|
51
|
+
return FAMILIES.some((f) => action.startsWith(f)) ? IDENTITY : null;
|
|
52
|
+
}
|
|
53
|
+
/** One entry as `actor` may read it. */
|
|
54
|
+
export function auditEntryFor(actor, entry) {
|
|
55
|
+
if (viewOf(actor) === 'full' || entry.detail === undefined)
|
|
56
|
+
return entry;
|
|
57
|
+
const keys = agentAuditKeys(entry.action);
|
|
58
|
+
if (keys === null)
|
|
59
|
+
return entry;
|
|
60
|
+
const detail = {};
|
|
61
|
+
for (const k of keys)
|
|
62
|
+
if (Object.hasOwn(entry.detail, k))
|
|
63
|
+
detail[k] = entry.detail[k];
|
|
64
|
+
return { ...entry, detail };
|
|
65
|
+
}
|
|
66
|
+
/** `GET /audit`'s entries as `actor` may read them. */
|
|
67
|
+
export function auditFor(actor, entries) {
|
|
68
|
+
return entries.map((e) => auditEntryFor(actor, e));
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=audit-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-view.js","sourceRoot":"","sources":["../../src/api/audit-view.ts"],"names":[],"mappings":"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"}
|
package/dist/api/auth.d.ts
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
*/
|
|
25
25
|
import type { FastifyInstance, FastifyRequest } from 'fastify';
|
|
26
26
|
import type { Actor, TrustLevel } from '../core/types.js';
|
|
27
|
+
import { type AddressPolicy, type DialOptions } from '../sources/dialer.js';
|
|
27
28
|
declare module 'fastify' {
|
|
28
29
|
interface FastifyRequest {
|
|
29
30
|
/**
|
|
@@ -106,6 +107,13 @@ export interface OidcConfig {
|
|
|
106
107
|
audience: string;
|
|
107
108
|
/** Explicit JWKS URI; omit to use the discovery document's `jwks_uri`. */
|
|
108
109
|
jwksUri?: string;
|
|
110
|
+
/**
|
|
111
|
+
* (DES-APPS-001 §5.2) Loopback/private CIDR ranges the issuer and its keys may be reached at, when
|
|
112
|
+
* the IdP is named by a host NAME on a private network. An issuer (or `jwksUri`) written as a
|
|
113
|
+
* loopback/private IP literal, or as `localhost`, is confirmed by itself; anything else is global
|
|
114
|
+
* unicast only. A discovery document's `jwks_uri` never widens this.
|
|
115
|
+
*/
|
|
116
|
+
allowRanges?: string[];
|
|
109
117
|
/**
|
|
110
118
|
* Claim mapping. `id` defaults to `sub`; `trust` names a claim whose value is
|
|
111
119
|
* a {@link TrustLevel} (defaults to the `defaultTrust` below when absent).
|
|
@@ -120,12 +128,31 @@ export interface OidcConfig {
|
|
|
120
128
|
}
|
|
121
129
|
/** Where the auth config (OIDC seam) lives unless overridden. */
|
|
122
130
|
export declare function defaultAuthConfigPath(env?: NodeJS.ProcessEnv): string;
|
|
131
|
+
/**
|
|
132
|
+
* (DES-APPS-001 §5.2) Where the daemon may reach its IdP: the ranges its own configuration names
|
|
133
|
+
* (`allowRanges`), and the exact loopback/private address an issuer or `jwksUri` written as an IP
|
|
134
|
+
* literal (or `localhost`) names. One policy for discovery AND keys: a discovery document cannot
|
|
135
|
+
* add a destination the operator did not configure.
|
|
136
|
+
*/
|
|
137
|
+
export declare function oidcAddressPolicy(config: Pick<OidcConfig, 'issuer' | 'jwksUri' | 'allowRanges'>): AddressPolicy;
|
|
138
|
+
/**
|
|
139
|
+
* (DES-APPS-001 §8.2) Verify a JWT exactly as the daemon's OIDC verifier does (the issuer's keys
|
|
140
|
+
* through the dialer; signature, `iss`, `aud`, `exp`, `nbf`) and answer its claims as they are. The
|
|
141
|
+
* daemon flattens a token to `{id, kind, trust}`; the app server keeps `email`, `email_verified`,
|
|
142
|
+
* `groups`, `tid`, `oid`, `upn`, `roles` and `scp` for its audience rules. Throws a descriptive error
|
|
143
|
+
* on any failure; the token itself is never in the message.
|
|
144
|
+
*/
|
|
145
|
+
export declare function verifyOidcClaims(token: string, config: OidcConfig, deps?: {
|
|
146
|
+
dial?: DialOptions;
|
|
147
|
+
}): Promise<Readonly<Record<string, unknown>>>;
|
|
123
148
|
/**
|
|
124
149
|
* Create an OIDC verifier that validates JWTs against the issuer's JWKS.
|
|
125
150
|
* Supports RS256/384/512, ES256/384/512, PS256/384/512. JWKS keys are cached
|
|
126
151
|
* per issuer with a 5-minute TTL and auto-refreshed on unknown kid.
|
|
127
152
|
*/
|
|
128
|
-
export declare function createOidcVerifier(config: OidcConfig
|
|
153
|
+
export declare function createOidcVerifier(config: OidcConfig, deps?: {
|
|
154
|
+
dial?: DialOptions;
|
|
155
|
+
}): TokenVerifier;
|
|
129
156
|
/** `createServer`'s auth options — everything defaults to env/file resolution. */
|
|
130
157
|
export interface AuthOptions {
|
|
131
158
|
/** Override mode resolution (tests / embedders). Default: {@link resolveAuthMode}. */
|
|
@@ -156,13 +183,26 @@ export interface ResolvedAuth {
|
|
|
156
183
|
}
|
|
157
184
|
/** Resolve mode + verifier chain. Reads files ONLY in required mode. */
|
|
158
185
|
export declare function resolveAuth(options: AuthOptions | undefined, warn: (msg: string) => void): ResolvedAuth;
|
|
186
|
+
/**
|
|
187
|
+
* Whether a request is a human actor's only (403 `human_only` for any other actor; see {@link SOURCE_MANAGEMENT_READ}).
|
|
188
|
+
* Judged on the route the router MATCHED (`routeUrl`, the registered pattern), so another spelling of the same path
|
|
189
|
+
* (percent-encoding the router decodes) cannot slip past, and on the raw path as well.
|
|
190
|
+
*/
|
|
191
|
+
export declare function humanOnlyRoute(routeUrl: string | undefined, path: string): boolean;
|
|
192
|
+
/**
|
|
193
|
+
* (DES-KNOWLEDGE-DATA-001 §5.2) Which view of a source's connection data an actor gets. The FULL view is a human
|
|
194
|
+
* actor's; every other actor (agent, plugin, system) gets the agent-safe projection: no host, port, database,
|
|
195
|
+
* login, URL, path, secret reference or descriptor. The one rule behind `GET /mcp/servers`, the preview,
|
|
196
|
+
* `GET /audit` (crew#1317) and the Apps detail (crew#1317).
|
|
197
|
+
*/
|
|
198
|
+
export declare function viewOf(actor: Actor | null | undefined): 'full' | 'agent';
|
|
159
199
|
/**
|
|
160
200
|
* Minimum trust for a request. Minimal by design (the task's rule: no
|
|
161
201
|
* deny-by-default registry over unknown routes):
|
|
162
202
|
*
|
|
163
203
|
* - `/ws/terminals` and any sub-path → `operator` (write-capable WS channel;
|
|
164
204
|
* inbound frames are raw PTY stdin regardless of the GET upgrade method)
|
|
165
|
-
* - reads (GET/HEAD)
|
|
205
|
+
* - reads (GET/HEAD), the main `/ws` stream and `POST /apps/:app/query` (a named read) → `observer`
|
|
166
206
|
* - governance writes, settings writes, project archive/restore → `admin`
|
|
167
207
|
* - every other mutation (launch, gate, cancel, chats, terminals, repos,
|
|
168
208
|
* workflows, project CRUD/membership) → `operator`
|
package/dist/api/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/api/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAgB,cAAc,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,KAAK,EAAE,KAAK,EAAa,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/api/auth.ts"],"names":[],"mappings":"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"}
|
package/dist/api/auth.js
CHANGED
|
@@ -26,6 +26,7 @@ import { readFileSync, statSync } from 'node:fs';
|
|
|
26
26
|
import { homedir } from 'node:os';
|
|
27
27
|
import { join } from 'node:path';
|
|
28
28
|
import { constants, createHash, createPublicKey, verify as cryptoVerify } from 'node:crypto';
|
|
29
|
+
import { dialFetch, exactRangesFor, validateAllowRanges } from '../sources/dialer.js';
|
|
29
30
|
import { API_PREFIX } from './api-prefix.js';
|
|
30
31
|
/**
|
|
31
32
|
* The implicit full-trust local operator. `admin` is the ladder's top rung —
|
|
@@ -173,18 +174,71 @@ export function defaultAuthConfigPath(env = process.env) {
|
|
|
173
174
|
/** Per-issuer JWKS cache: keys indexed by kid (or by alg when kid is absent). */
|
|
174
175
|
const JWKS_CACHE = new Map();
|
|
175
176
|
const JWKS_TTL_MS = 5 * 60 * 1000; // 5-min TTL; synchronous re-fetch on stale or unknown kid
|
|
177
|
+
/** An unknown kid re-fetches the keys at most this often (a rotated key is picked up within it). */
|
|
178
|
+
const JWKS_REFETCH_MIN_MS = 30 * 1000;
|
|
179
|
+
/**
|
|
180
|
+
* How long keys already fetched keep verifying when the issuer cannot be reached to refresh them (stale while
|
|
181
|
+
* revalidating): a refresh that fails, or is still running, never signs out a viewer whose key is known.
|
|
182
|
+
*/
|
|
183
|
+
const JWKS_STALE_MAX_MS = 24 * 60 * 60 * 1000;
|
|
184
|
+
/**
|
|
185
|
+
* Per issuer: the one key refresh in flight (concurrent requests wait on it), and when the last refresh STARTED
|
|
186
|
+
* (stamped before any I/O, so a failing issuer is not asked again on every request either).
|
|
187
|
+
*/
|
|
188
|
+
const JWKS_INFLIGHT = new Map();
|
|
189
|
+
const JWKS_ATTEMPT = new Map();
|
|
176
190
|
function base64urlDecode(s) {
|
|
177
191
|
const pad = (4 - (s.length % 4)) % 4;
|
|
178
192
|
return Buffer.from(s.replace(/-/g, '+').replace(/_/g, '/') + '='.repeat(pad), 'base64');
|
|
179
193
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
194
|
+
/** The largest discovery or JWKS document crew reads. */
|
|
195
|
+
const OIDC_DOC_MAX_BYTES = 1024 * 1024;
|
|
196
|
+
/**
|
|
197
|
+
* (DES-APPS-001 §5.2, S10) OIDC discovery and keys go through the ONE dialer: resolved once, every
|
|
198
|
+
* address checked and pinned, redirects refused. The issuer is the operator's own configuration, so
|
|
199
|
+
* only the ranges it names are allowed ({@link oidcAddressPolicy}); metadata, link-local and the
|
|
200
|
+
* other always-refused ranges never are, even when a discovery document names them as `jwks_uri`.
|
|
201
|
+
*/
|
|
202
|
+
async function fetchJson(url, policy, dial = {}) {
|
|
203
|
+
const res = await dialFetch(url, { signal: AbortSignal.timeout(10_000), headers: { accept: 'application/json' } }, policy, dial);
|
|
204
|
+
if (!res.ok) {
|
|
205
|
+
await res.body?.cancel().catch(() => undefined);
|
|
183
206
|
throw new Error(`HTTP ${res.status} fetching ${url}`);
|
|
184
|
-
|
|
207
|
+
}
|
|
208
|
+
const reader = res.body?.getReader();
|
|
209
|
+
const chunks = [];
|
|
210
|
+
let size = 0;
|
|
211
|
+
for (;;) {
|
|
212
|
+
if (reader === undefined)
|
|
213
|
+
break;
|
|
214
|
+
const { done, value } = await reader.read();
|
|
215
|
+
if (done)
|
|
216
|
+
break;
|
|
217
|
+
size += value.byteLength;
|
|
218
|
+
if (size > OIDC_DOC_MAX_BYTES) {
|
|
219
|
+
await reader.cancel().catch(() => undefined);
|
|
220
|
+
throw new Error(`the document at ${url} is larger than ${OIDC_DOC_MAX_BYTES} bytes`);
|
|
221
|
+
}
|
|
222
|
+
chunks.push(value);
|
|
223
|
+
}
|
|
224
|
+
const text = Buffer.concat(chunks).toString('utf8');
|
|
225
|
+
if (text.trim() === '')
|
|
226
|
+
throw new Error(`the document at ${url} is empty`);
|
|
227
|
+
return JSON.parse(text);
|
|
185
228
|
}
|
|
186
|
-
|
|
187
|
-
|
|
229
|
+
/**
|
|
230
|
+
* (DES-APPS-001 §5.2) Where the daemon may reach its IdP: the ranges its own configuration names
|
|
231
|
+
* (`allowRanges`), and the exact loopback/private address an issuer or `jwksUri` written as an IP
|
|
232
|
+
* literal (or `localhost`) names. One policy for discovery AND keys: a discovery document cannot
|
|
233
|
+
* add a destination the operator did not configure.
|
|
234
|
+
*/
|
|
235
|
+
export function oidcAddressPolicy(config) {
|
|
236
|
+
return { allow: [...(config.allowRanges ?? []), ...exactRangesFor(config.issuer), ...exactRangesFor(config.jwksUri)], plaintext: false };
|
|
237
|
+
}
|
|
238
|
+
/** A test seam: how a verifier's IdP connections resolve and trust (resolver, CA). Production passes none. */
|
|
239
|
+
const OIDC_DIAL = new WeakMap();
|
|
240
|
+
async function fetchJwks(jwksUri, policy, dial) {
|
|
241
|
+
const doc = await fetchJson(jwksUri, policy, dial);
|
|
188
242
|
const map = new Map();
|
|
189
243
|
for (const key of doc.keys ?? []) {
|
|
190
244
|
if (key.use !== undefined && key.use !== 'sig')
|
|
@@ -198,23 +252,48 @@ async function fetchJwks(jwksUri) {
|
|
|
198
252
|
async function resolveJwksUri(config) {
|
|
199
253
|
if (config.jwksUri)
|
|
200
254
|
return config.jwksUri;
|
|
201
|
-
const discovery = await fetchJson(`${config.issuer.replace(/\/$/, '')}/.well-known/openid-configuration
|
|
255
|
+
const discovery = await fetchJson(`${config.issuer.replace(/\/$/, '')}/.well-known/openid-configuration`, oidcAddressPolicy(config), OIDC_DIAL.get(config) ?? {});
|
|
202
256
|
return discovery.jwks_uri;
|
|
203
257
|
}
|
|
204
258
|
async function getJwk(config, kid, allowRefresh) {
|
|
205
|
-
const
|
|
259
|
+
const iss = config.issuer;
|
|
260
|
+
const cached = JWKS_CACHE.get(iss);
|
|
206
261
|
const stale = !cached || Date.now() - cached.fetchedAt > JWKS_TTL_MS;
|
|
262
|
+
const last = JWKS_ATTEMPT.get(iss);
|
|
263
|
+
// A refresh at most once per JWKS_REFETCH_MIN_MS per issuer, counted from when it STARTED, success or not: a
|
|
264
|
+
// token carrying a made-up kid, or an issuer that is down, never makes the verifier fetch the issuer's keys on
|
|
265
|
+
// every request (DES-APPS-001 §8.2: the app server faces the internet).
|
|
266
|
+
const cooling = last !== undefined && Date.now() - last < JWKS_REFETCH_MIN_MS && !JWKS_INFLIGHT.has(iss);
|
|
267
|
+
const known = cached?.keys.get(kid);
|
|
207
268
|
if (cached && !stale) {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
if (!allowRefresh)
|
|
269
|
+
if (known)
|
|
270
|
+
return known;
|
|
271
|
+
if (!allowRefresh || cooling)
|
|
212
272
|
return null;
|
|
213
273
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
274
|
+
else if (cooling) {
|
|
275
|
+
// Stale (or never fetched) and a refresh just ran: the keys we have, until the next one may start.
|
|
276
|
+
return known !== undefined && Date.now() - cached.fetchedAt <= JWKS_STALE_MAX_MS ? known : null;
|
|
277
|
+
}
|
|
278
|
+
const startRefresh = () => {
|
|
279
|
+
const running = JWKS_INFLIGHT.get(iss);
|
|
280
|
+
if (running !== undefined)
|
|
281
|
+
return running;
|
|
282
|
+
JWKS_ATTEMPT.set(iss, Date.now());
|
|
283
|
+
const refresh = (async () => fetchJwks(await resolveJwksUri(config), oidcAddressPolicy(config), OIDC_DIAL.get(config) ?? {}))();
|
|
284
|
+
JWKS_INFLIGHT.set(iss, refresh);
|
|
285
|
+
void refresh.then((keys) => {
|
|
286
|
+
JWKS_CACHE.set(iss, { keys, fetchedAt: Date.now() });
|
|
287
|
+
JWKS_INFLIGHT.delete(iss);
|
|
288
|
+
}, () => JWKS_INFLIGHT.delete(iss));
|
|
289
|
+
return refresh;
|
|
290
|
+
};
|
|
291
|
+
// A known kid in a stale cache verifies at once while the keys refresh behind it (bounded by JWKS_STALE_MAX_MS).
|
|
292
|
+
if (known !== undefined && cached !== undefined && Date.now() - cached.fetchedAt <= JWKS_STALE_MAX_MS) {
|
|
293
|
+
void startRefresh().catch(() => undefined);
|
|
294
|
+
return known;
|
|
295
|
+
}
|
|
296
|
+
const keys = await startRefresh();
|
|
218
297
|
return keys.get(kid) ?? null;
|
|
219
298
|
}
|
|
220
299
|
// Supported algorithm → hash algorithm pairs.
|
|
@@ -290,6 +369,23 @@ async function verifyJwt(token, config) {
|
|
|
290
369
|
}
|
|
291
370
|
return payload;
|
|
292
371
|
}
|
|
372
|
+
/**
|
|
373
|
+
* (DES-APPS-001 §8.2) Verify a JWT exactly as the daemon's OIDC verifier does (the issuer's keys
|
|
374
|
+
* through the dialer; signature, `iss`, `aud`, `exp`, `nbf`) and answer its claims as they are. The
|
|
375
|
+
* daemon flattens a token to `{id, kind, trust}`; the app server keeps `email`, `email_verified`,
|
|
376
|
+
* `groups`, `tid`, `oid`, `upn`, `roles` and `scp` for its audience rules. Throws a descriptive error
|
|
377
|
+
* on any failure; the token itself is never in the message.
|
|
378
|
+
*/
|
|
379
|
+
export async function verifyOidcClaims(token, config, deps = {}) {
|
|
380
|
+
if (!config.issuer || !config.issuer.startsWith('https://')) {
|
|
381
|
+
throw new Error(`[auth] OIDC config: 'issuer' must be an https:// URL (got ${JSON.stringify(config.issuer)})`);
|
|
382
|
+
}
|
|
383
|
+
if (!config.audience)
|
|
384
|
+
throw new Error(`[auth] OIDC config: 'audience' is required`);
|
|
385
|
+
if (deps.dial !== undefined)
|
|
386
|
+
OIDC_DIAL.set(config, deps.dial);
|
|
387
|
+
return Object.freeze(await verifyJwt(token, config));
|
|
388
|
+
}
|
|
293
389
|
function mapOidcActor(payload, config) {
|
|
294
390
|
const idClaim = config.claims?.id ?? 'sub';
|
|
295
391
|
const rawId = payload[idClaim];
|
|
@@ -308,7 +404,9 @@ function mapOidcActor(payload, config) {
|
|
|
308
404
|
* Supports RS256/384/512, ES256/384/512, PS256/384/512. JWKS keys are cached
|
|
309
405
|
* per issuer with a 5-minute TTL and auto-refreshed on unknown kid.
|
|
310
406
|
*/
|
|
311
|
-
export function createOidcVerifier(config) {
|
|
407
|
+
export function createOidcVerifier(config, deps = {}) {
|
|
408
|
+
if (deps.dial !== undefined)
|
|
409
|
+
OIDC_DIAL.set(config, deps.dial);
|
|
312
410
|
// Validate config at creation time — a misconfigured issuer URL is caught
|
|
313
411
|
// immediately at boot rather than silently during the first verification.
|
|
314
412
|
if (!config.issuer || !config.issuer.startsWith('https://')) {
|
|
@@ -320,6 +418,11 @@ export function createOidcVerifier(config) {
|
|
|
320
418
|
if (!config.audience) {
|
|
321
419
|
throw new Error(`[auth] OIDC config: 'audience' is required`);
|
|
322
420
|
}
|
|
421
|
+
if (config.allowRanges !== undefined) {
|
|
422
|
+
const problem = Array.isArray(config.allowRanges) && config.allowRanges.every((r) => typeof r === 'string') ? validateAllowRanges(config.allowRanges) : 'it must be a list of CIDR strings';
|
|
423
|
+
if (problem !== null)
|
|
424
|
+
throw new Error(`[auth] OIDC config: 'allowRanges': ${problem}`);
|
|
425
|
+
}
|
|
323
426
|
return {
|
|
324
427
|
name: 'oidc',
|
|
325
428
|
async verify(token) {
|
|
@@ -393,15 +496,42 @@ export function resolveAuth(options, warn) {
|
|
|
393
496
|
// ── The trust ladder over routes ─────────────────────────────────────────────
|
|
394
497
|
/** `POST /runs/:id/working-doc/versions`: the one write a plugin actor may make (its own lines, checked by the route). */
|
|
395
498
|
const WORKING_DOC_VERSIONS_PATH = new RegExp(`^${API_PREFIX}/runs/[^/]+/working-doc/versions$`);
|
|
499
|
+
/** `POST /apps/:app/query` (DES-APPS-001 §7.2): a read of live data, so an observer may make it. */
|
|
500
|
+
const APP_QUERY_PATH = new RegExp(`^${API_PREFIX}/apps/[^/]+/query$`);
|
|
396
501
|
/** `PATCH /projects/:id` (exactly one segment after /projects) — see {@link requiredTrust}. */
|
|
397
502
|
const PROJECT_DETAIL_PATH = new RegExp(`^${API_PREFIX}/projects/[^/]+$`);
|
|
503
|
+
/**
|
|
504
|
+
* (DES-KNOWLEDGE-DATA-001 §5.2, crew#1310) A source's MANAGEMENT READS: its catalog, a describe, its privilege
|
|
505
|
+
* report, a query check, the table safety check and Test connection. They answer a source's structure or what its
|
|
506
|
+
* login can do, so they are a HUMAN actor's only, whatever another actor's trust: agents get structure only through
|
|
507
|
+
* estate and the gate. (`test-call`, `ask`, `query` and `allow-writes` are human-only in their routes already.)
|
|
508
|
+
*/
|
|
509
|
+
const SOURCE_MANAGEMENT_READ = new RegExp(`^${API_PREFIX}/sources/[^/]+/(?:catalog|describe|privileges|check|safety|test)$`);
|
|
510
|
+
const SOURCE_MANAGEMENT_ROUTES = new Set(['catalog', 'describe', 'privileges', 'check', 'safety', 'test'].map((r) => `${API_PREFIX}/sources/:name/${r}`));
|
|
511
|
+
/**
|
|
512
|
+
* Whether a request is a human actor's only (403 `human_only` for any other actor; see {@link SOURCE_MANAGEMENT_READ}).
|
|
513
|
+
* Judged on the route the router MATCHED (`routeUrl`, the registered pattern), so another spelling of the same path
|
|
514
|
+
* (percent-encoding the router decodes) cannot slip past, and on the raw path as well.
|
|
515
|
+
*/
|
|
516
|
+
export function humanOnlyRoute(routeUrl, path) {
|
|
517
|
+
return (routeUrl !== undefined && SOURCE_MANAGEMENT_ROUTES.has(routeUrl)) || SOURCE_MANAGEMENT_READ.test(path);
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* (DES-KNOWLEDGE-DATA-001 §5.2) Which view of a source's connection data an actor gets. The FULL view is a human
|
|
521
|
+
* actor's; every other actor (agent, plugin, system) gets the agent-safe projection: no host, port, database,
|
|
522
|
+
* login, URL, path, secret reference or descriptor. The one rule behind `GET /mcp/servers`, the preview,
|
|
523
|
+
* `GET /audit` (crew#1317) and the Apps detail (crew#1317).
|
|
524
|
+
*/
|
|
525
|
+
export function viewOf(actor) {
|
|
526
|
+
return actor?.kind === 'human' ? 'full' : 'agent';
|
|
527
|
+
}
|
|
398
528
|
/**
|
|
399
529
|
* Minimum trust for a request. Minimal by design (the task's rule: no
|
|
400
530
|
* deny-by-default registry over unknown routes):
|
|
401
531
|
*
|
|
402
532
|
* - `/ws/terminals` and any sub-path → `operator` (write-capable WS channel;
|
|
403
533
|
* inbound frames are raw PTY stdin regardless of the GET upgrade method)
|
|
404
|
-
* - reads (GET/HEAD)
|
|
534
|
+
* - reads (GET/HEAD), the main `/ws` stream and `POST /apps/:app/query` (a named read) → `observer`
|
|
405
535
|
* - governance writes, settings writes, project archive/restore → `admin`
|
|
406
536
|
* - every other mutation (launch, gate, cancel, chats, terminals, repos,
|
|
407
537
|
* workflows, project CRUD/membership) → `operator`
|
|
@@ -418,6 +548,9 @@ export function requiredTrust(method, path, body) {
|
|
|
418
548
|
return 'operator';
|
|
419
549
|
if (method === 'GET' || method === 'HEAD')
|
|
420
550
|
return 'observer';
|
|
551
|
+
// A named query of an accepted app version is a read: the route itself checks the receipt.
|
|
552
|
+
if (method === 'POST' && APP_QUERY_PATH.test(path))
|
|
553
|
+
return 'observer';
|
|
421
554
|
if (path.startsWith(`${API_PREFIX}/governance/`))
|
|
422
555
|
return 'admin';
|
|
423
556
|
if (path === `${API_PREFIX}/settings`)
|
|
@@ -458,6 +591,8 @@ const UNIT_TOKEN_ROUTES = new Set([
|
|
|
458
591
|
`POST ${API_PREFIX}/mcp/ask`,
|
|
459
592
|
`GET ${API_PREFIX}/mcp/ask`,
|
|
460
593
|
`DELETE ${API_PREFIX}/mcp/ask`,
|
|
594
|
+
// DES-APPS-001 §9.2: the `apps_check` Tool's route; the body's unit token is its credential (verified there).
|
|
595
|
+
`POST ${API_PREFIX}/apps/check`,
|
|
461
596
|
]);
|
|
462
597
|
/** True for exactly the unit-token routes above (method and path both exact). */
|
|
463
598
|
export function isUnitTokenRoute(method, path) {
|
|
@@ -539,6 +674,10 @@ export function registerAuthHooks(app, auth) {
|
|
|
539
674
|
// as itself and only its own section. Nothing else a plugin sends passes this boundary.
|
|
540
675
|
if (req.actor?.kind === 'plugin' && req.method === 'POST' && WORKING_DOC_VERSIONS_PATH.test(path))
|
|
541
676
|
return;
|
|
677
|
+
// (DES-KNOWLEDGE-DATA-001 §5.2) A management read of a source is a human's, at any trust.
|
|
678
|
+
if (humanOnlyRoute(req.routeOptions?.url, path) && req.actor?.kind !== 'human') {
|
|
679
|
+
return reply.code(403).send({ error: `a source's management reads are a human operator's only; you are ${req.actor?.kind ?? 'unknown'}/${req.actor?.trust ?? 'none'}`, code: 'human_only' });
|
|
680
|
+
}
|
|
542
681
|
const need = requiredTrust(req.method, path, req.body);
|
|
543
682
|
if (!trustAtLeast(req.actor, need)) {
|
|
544
683
|
// RETURN the reply — the idiomatic guarantee that the lifecycle stops
|