wicked-crew 0.17.1 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -14
- package/adapters/web-source.lock +1314 -0
- package/dist/api/audit.d.ts +5 -0
- package/dist/api/audit.d.ts.map +1 -1
- package/dist/api/audit.js +20 -0
- package/dist/api/audit.js.map +1 -1
- package/dist/api/auth.d.ts.map +1 -1
- package/dist/api/auth.js +3 -0
- package/dist/api/auth.js.map +1 -1
- package/dist/api/chat-context.js +1 -1
- package/dist/api/chat-history.d.ts +3 -0
- package/dist/api/chat-history.d.ts.map +1 -1
- package/dist/api/chat-history.js +6 -1
- package/dist/api/chat-history.js.map +1 -1
- package/dist/api/chat-jobs.d.ts +30 -1
- package/dist/api/chat-jobs.d.ts.map +1 -1
- package/dist/api/chat-jobs.js +172 -10
- package/dist/api/chat-jobs.js.map +1 -1
- package/dist/api/chat-proposals.d.ts +178 -8
- package/dist/api/chat-proposals.d.ts.map +1 -1
- package/dist/api/chat-proposals.js +775 -54
- package/dist/api/chat-proposals.js.map +1 -1
- package/dist/api/chat-requirements.d.ts +54 -0
- package/dist/api/chat-requirements.d.ts.map +1 -0
- package/dist/api/chat-requirements.js +282 -0
- package/dist/api/chat-requirements.js.map +1 -0
- package/dist/api/chat-scope.d.ts +56 -0
- package/dist/api/chat-scope.d.ts.map +1 -1
- package/dist/api/chat-scope.js +175 -5
- package/dist/api/chat-scope.js.map +1 -1
- package/dist/api/chat-transcripts.d.ts +7 -0
- package/dist/api/chat-transcripts.d.ts.map +1 -1
- package/dist/api/chat-transcripts.js +17 -1
- package/dist/api/chat-transcripts.js.map +1 -1
- package/dist/api/delivery-index.d.ts +109 -5
- package/dist/api/delivery-index.d.ts.map +1 -1
- package/dist/api/delivery-index.js +199 -7
- package/dist/api/delivery-index.js.map +1 -1
- package/dist/api/mcp.d.ts +7 -2
- package/dist/api/mcp.d.ts.map +1 -1
- package/dist/api/mcp.js +1 -1
- package/dist/api/mcp.js.map +1 -1
- package/dist/api/needs.d.ts.map +1 -1
- package/dist/api/needs.js +19 -1
- package/dist/api/needs.js.map +1 -1
- package/dist/api/product.d.ts +9 -2
- package/dist/api/product.d.ts.map +1 -1
- package/dist/api/product.js +10 -2
- package/dist/api/product.js.map +1 -1
- package/dist/api/proposal-theme.d.ts +23 -0
- package/dist/api/proposal-theme.d.ts.map +1 -0
- package/dist/api/proposal-theme.js +30 -0
- package/dist/api/proposal-theme.js.map +1 -0
- package/dist/api/recording.d.ts +70 -10
- package/dist/api/recording.d.ts.map +1 -1
- package/dist/api/recording.js +278 -39
- package/dist/api/recording.js.map +1 -1
- package/dist/api/repo-input.d.ts +55 -0
- package/dist/api/repo-input.d.ts.map +1 -0
- package/dist/api/repo-input.js +113 -0
- package/dist/api/repo-input.js.map +1 -0
- package/dist/api/requirements.d.ts +75 -0
- package/dist/api/requirements.d.ts.map +1 -1
- package/dist/api/requirements.js +97 -9
- package/dist/api/requirements.js.map +1 -1
- package/dist/api/review-change.d.ts +64 -0
- package/dist/api/review-change.d.ts.map +1 -0
- package/dist/api/review-change.js +214 -0
- package/dist/api/review-change.js.map +1 -0
- package/dist/api/roster-standing.d.ts +4 -0
- package/dist/api/roster-standing.d.ts.map +1 -1
- package/dist/api/roster-standing.js +43 -10
- package/dist/api/roster-standing.js.map +1 -1
- package/dist/api/routes.d.ts +63 -6
- package/dist/api/routes.d.ts.map +1 -1
- package/dist/api/routes.js +818 -269
- package/dist/api/routes.js.map +1 -1
- package/dist/api/run-documents.d.ts +97 -0
- package/dist/api/run-documents.d.ts.map +1 -0
- package/dist/api/run-documents.js +458 -0
- package/dist/api/run-documents.js.map +1 -0
- package/dist/api/run-sources.d.ts +51 -0
- package/dist/api/run-sources.d.ts.map +1 -0
- package/dist/api/run-sources.js +133 -0
- package/dist/api/run-sources.js.map +1 -0
- package/dist/api/runtime-state.d.ts +41 -0
- package/dist/api/runtime-state.d.ts.map +1 -0
- package/dist/api/runtime-state.js +75 -0
- package/dist/api/runtime-state.js.map +1 -0
- package/dist/api/seat-container-login.d.ts +51 -0
- package/dist/api/seat-container-login.d.ts.map +1 -1
- package/dist/api/seat-container-login.js +317 -1
- package/dist/api/seat-container-login.js.map +1 -1
- package/dist/api/seat-images.d.ts.map +1 -1
- package/dist/api/seat-images.js +7 -0
- package/dist/api/seat-images.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 +204 -25
- package/dist/api/server.js.map +1 -1
- package/dist/api/skills.d.ts +8 -0
- package/dist/api/skills.d.ts.map +1 -1
- package/dist/api/skills.js +21 -0
- package/dist/api/skills.js.map +1 -1
- package/dist/api/system-snapshot.d.ts +3 -2
- package/dist/api/system-snapshot.d.ts.map +1 -1
- package/dist/api/system-snapshot.js +19 -6
- package/dist/api/system-snapshot.js.map +1 -1
- package/dist/api/testing.d.ts +3 -3
- package/dist/api/ui-text.d.ts +45 -0
- package/dist/api/ui-text.d.ts.map +1 -0
- package/dist/api/ui-text.js +188 -0
- package/dist/api/ui-text.js.map +1 -0
- package/dist/apps/actions/card.d.ts +62 -0
- package/dist/apps/actions/card.d.ts.map +1 -0
- package/dist/apps/actions/card.js +111 -0
- package/dist/apps/actions/card.js.map +1 -0
- package/dist/apps/actions/write-path.d.ts.map +1 -1
- package/dist/apps/actions/write-path.js +26 -77
- package/dist/apps/actions/write-path.js.map +1 -1
- package/dist/apps/exec/sources.d.ts.map +1 -1
- package/dist/apps/exec/sources.js +3 -0
- package/dist/apps/exec/sources.js.map +1 -1
- package/dist/apps/publish/artifacts.d.ts +18 -0
- package/dist/apps/publish/artifacts.d.ts.map +1 -0
- package/dist/apps/publish/artifacts.js +87 -0
- package/dist/apps/publish/artifacts.js.map +1 -0
- package/dist/apps/publish/check.d.ts +103 -0
- package/dist/apps/publish/check.d.ts.map +1 -0
- package/dist/apps/publish/check.js +235 -0
- package/dist/apps/publish/check.js.map +1 -0
- package/dist/apps/publish/image.d.ts +2 -0
- package/dist/apps/publish/image.d.ts.map +1 -1
- package/dist/apps/publish/image.js +2 -1
- package/dist/apps/publish/image.js.map +1 -1
- package/dist/apps/publish/render.d.ts +71 -0
- package/dist/apps/publish/render.d.ts.map +1 -0
- package/dist/apps/publish/render.js +122 -0
- package/dist/apps/publish/render.js.map +1 -0
- package/dist/apps/publish/run.d.ts +35 -0
- package/dist/apps/publish/run.d.ts.map +1 -0
- package/dist/apps/publish/run.js +127 -0
- package/dist/apps/publish/run.js.map +1 -0
- package/dist/apps/routes.d.ts +54 -2
- package/dist/apps/routes.d.ts.map +1 -1
- package/dist/apps/routes.js +124 -7
- package/dist/apps/routes.js.map +1 -1
- package/dist/apps/spec.d.ts +8 -8
- package/dist/apps/store.d.ts +84 -5
- package/dist/apps/store.d.ts.map +1 -1
- package/dist/apps/store.js +191 -4
- package/dist/apps/store.js.map +1 -1
- package/dist/apps/turns.d.ts +19 -1
- package/dist/apps/turns.d.ts.map +1 -1
- package/dist/apps/turns.js +60 -2
- package/dist/apps/turns.js.map +1 -1
- package/dist/apps/views.d.ts +5 -1
- package/dist/apps/views.d.ts.map +1 -1
- package/dist/apps/views.js +18 -7
- package/dist/apps/views.js.map +1 -1
- package/dist/apps-server/Dockerfile +25 -0
- package/dist/apps-server/runners/sqlite-runner.mjs +110 -0
- package/dist/apps-server/server/lib/bundle/server.mjs +92523 -0
- package/dist/apps-server/server/node_modules/@pgsql/types/LICENSE +22 -0
- package/dist/apps-server/server/node_modules/@pgsql/types/README.md +106 -0
- package/dist/apps-server/server/node_modules/@pgsql/types/enums.d.ts +76 -0
- package/dist/apps-server/server/node_modules/@pgsql/types/enums.js +2 -0
- package/dist/apps-server/server/node_modules/@pgsql/types/esm/enums.js +1 -0
- package/dist/apps-server/server/node_modules/@pgsql/types/esm/index.js +2 -0
- package/dist/apps-server/server/node_modules/@pgsql/types/esm/types.js +1 -0
- package/dist/apps-server/server/node_modules/@pgsql/types/index.d.ts +2 -0
- package/dist/apps-server/server/node_modules/@pgsql/types/index.js +18 -0
- package/dist/apps-server/server/node_modules/@pgsql/types/package.json +36 -0
- package/dist/apps-server/server/node_modules/@pgsql/types/types.d.ts +2488 -0
- package/dist/apps-server/server/node_modules/@pgsql/types/types.js +2 -0
- package/dist/apps-server/server/node_modules/libpg-query/LICENSE +22 -0
- package/dist/apps-server/server/node_modules/libpg-query/README.md +275 -0
- package/dist/apps-server/server/node_modules/libpg-query/package.json +58 -0
- package/dist/apps-server/server/node_modules/libpg-query/wasm/index.cjs +369 -0
- package/dist/apps-server/server/node_modules/libpg-query/wasm/index.d.ts +48 -0
- package/dist/apps-server/server/node_modules/libpg-query/wasm/index.js +344 -0
- package/dist/apps-server/server/node_modules/libpg-query/wasm/libpg-query.js +2 -0
- package/dist/apps-server/server/node_modules/libpg-query/wasm/libpg-query.wasm +0 -0
- package/dist/apps-server/server/shim/host.css +22 -0
- package/dist/apps-server/server/shim/host.js +1 -0
- package/dist/cli/apps-check.d.ts +18 -0
- package/dist/cli/apps-check.d.ts.map +1 -1
- package/dist/cli/apps-check.js +179 -5
- package/dist/cli/apps-check.js.map +1 -1
- package/dist/cli/apps-produce.d.ts +9 -0
- package/dist/cli/apps-produce.d.ts.map +1 -0
- package/dist/cli/apps-produce.js +27 -0
- package/dist/cli/apps-produce.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +15 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/insights-facts.d.ts +17 -0
- package/dist/cli/insights-facts.d.ts.map +1 -0
- package/dist/cli/insights-facts.js +56 -0
- package/dist/cli/insights-facts.js.map +1 -0
- package/dist/core/adapter.d.ts +74 -15
- package/dist/core/adapter.d.ts.map +1 -1
- package/dist/core/adapter.js +245 -53
- package/dist/core/adapter.js.map +1 -1
- package/dist/core/engine-roster.d.ts.map +1 -1
- package/dist/core/engine-roster.js +1 -0
- package/dist/core/engine-roster.js.map +1 -1
- package/dist/core/estate-mcp-client.d.ts +3 -2
- package/dist/core/estate-mcp-client.d.ts.map +1 -1
- package/dist/core/estate-mcp-client.js +3 -2
- package/dist/core/estate-mcp-client.js.map +1 -1
- 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/types.d.ts +5 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/editors/conformance-runtime.d.ts +107 -0
- package/dist/editors/conformance-runtime.d.ts.map +1 -1
- package/dist/editors/conformance-runtime.js +268 -13
- package/dist/editors/conformance-runtime.js.map +1 -1
- package/dist/editors/csp.d.ts +2 -2
- package/dist/editors/csp.d.ts.map +1 -1
- package/dist/editors/csp.js +4 -2
- package/dist/editors/csp.js.map +1 -1
- package/dist/editors/pack-install.d.ts +28 -13
- package/dist/editors/pack-install.d.ts.map +1 -1
- package/dist/editors/pack-install.js +96 -48
- package/dist/editors/pack-install.js.map +1 -1
- package/dist/editors/registry.d.ts +111 -8
- package/dist/editors/registry.d.ts.map +1 -1
- package/dist/editors/registry.js +183 -7
- package/dist/editors/registry.js.map +1 -1
- package/dist/editors/routes.d.ts +66 -13
- package/dist/editors/routes.d.ts.map +1 -1
- package/dist/editors/routes.js +277 -44
- package/dist/editors/routes.js.map +1 -1
- package/dist/evals/replay.d.ts +6 -0
- package/dist/evals/replay.d.ts.map +1 -1
- package/dist/evals/replay.js +24 -1
- package/dist/evals/replay.js.map +1 -1
- package/dist/evals/routes.d.ts.map +1 -1
- package/dist/evals/routes.js +17 -2
- package/dist/evals/routes.js.map +1 -1
- package/dist/evals/runner.d.ts.map +1 -1
- package/dist/evals/runner.js +5 -0
- package/dist/evals/runner.js.map +1 -1
- package/dist/evals/shape-corrections.d.ts +146 -0
- package/dist/evals/shape-corrections.d.ts.map +1 -0
- package/dist/evals/shape-corrections.js +394 -0
- package/dist/evals/shape-corrections.js.map +1 -0
- package/dist/evals/shape.d.ts +145 -0
- package/dist/evals/shape.d.ts.map +1 -0
- package/dist/evals/shape.js +376 -0
- package/dist/evals/shape.js.map +1 -0
- package/dist/evals/types.d.ts +2 -2
- package/dist/evals/types.d.ts.map +1 -1
- package/dist/evals/types.js +2 -1
- package/dist/evals/types.js.map +1 -1
- package/dist/insights/analyze.d.ts +14 -1
- package/dist/insights/analyze.d.ts.map +1 -1
- package/dist/insights/analyze.js +35 -8
- package/dist/insights/analyze.js.map +1 -1
- package/dist/insights/cost.d.ts +123 -0
- package/dist/insights/cost.d.ts.map +1 -0
- package/dist/insights/cost.js +221 -0
- package/dist/insights/cost.js.map +1 -0
- package/dist/insights/review-service.d.ts +20 -1
- package/dist/insights/review-service.d.ts.map +1 -1
- package/dist/insights/review-service.js +50 -25
- package/dist/insights/review-service.js.map +1 -1
- package/dist/insights/routes.d.ts +29 -0
- package/dist/insights/routes.d.ts.map +1 -1
- package/dist/insights/routes.js +62 -0
- package/dist/insights/routes.js.map +1 -1
- package/dist/insights/run-facts.d.ts +16 -0
- package/dist/insights/run-facts.d.ts.map +1 -1
- package/dist/insights/run-facts.js +26 -3
- package/dist/insights/run-facts.js.map +1 -1
- package/dist/interactive/bridge-pool.d.ts +11 -2
- package/dist/interactive/bridge-pool.d.ts.map +1 -1
- package/dist/interactive/bridge-pool.js +10 -1
- package/dist/interactive/bridge-pool.js.map +1 -1
- package/dist/interactive/chat-events.d.ts +74 -1
- package/dist/interactive/chat-events.d.ts.map +1 -1
- package/dist/interactive/chat-events.js +338 -6
- package/dist/interactive/chat-events.js.map +1 -1
- package/dist/interactive/doc-binding.d.ts +15 -0
- package/dist/interactive/doc-binding.d.ts.map +1 -1
- package/dist/interactive/doc-binding.js +4 -0
- package/dist/interactive/doc-binding.js.map +1 -1
- package/dist/interactive/doc-checks-routes.d.ts +34 -1
- package/dist/interactive/doc-checks-routes.d.ts.map +1 -1
- package/dist/interactive/doc-checks-routes.js +84 -0
- package/dist/interactive/doc-checks-routes.js.map +1 -1
- package/dist/interactive/draft-events.d.ts +7 -0
- package/dist/interactive/draft-events.d.ts.map +1 -1
- package/dist/interactive/draft-events.js +38 -6
- package/dist/interactive/draft-events.js.map +1 -1
- package/dist/interactive/draft-skill.d.ts +76 -6
- package/dist/interactive/draft-skill.d.ts.map +1 -1
- package/dist/interactive/draft-skill.js +219 -17
- package/dist/interactive/draft-skill.js.map +1 -1
- package/dist/interactive/edit-events.d.ts.map +1 -1
- package/dist/interactive/edit-events.js +4 -2
- package/dist/interactive/edit-events.js.map +1 -1
- package/dist/interactive/landing-guard.d.ts +47 -0
- package/dist/interactive/landing-guard.d.ts.map +1 -0
- package/dist/interactive/landing-guard.js +43 -0
- package/dist/interactive/landing-guard.js.map +1 -0
- package/dist/interactive/landing-record.d.ts +68 -0
- package/dist/interactive/landing-record.d.ts.map +1 -0
- package/dist/interactive/landing-record.js +154 -0
- package/dist/interactive/landing-record.js.map +1 -0
- package/dist/interactive/proposal-create.d.ts +3 -1
- package/dist/interactive/proposal-create.d.ts.map +1 -1
- package/dist/interactive/proposal-create.js +14 -2
- package/dist/interactive/proposal-create.js.map +1 -1
- package/dist/interactive/proposal-refine.d.ts +48 -0
- package/dist/interactive/proposal-refine.d.ts.map +1 -0
- package/dist/interactive/proposal-refine.js +99 -0
- package/dist/interactive/proposal-refine.js.map +1 -0
- package/dist/interactive/protected-edits.d.ts +67 -0
- package/dist/interactive/protected-edits.d.ts.map +1 -0
- package/dist/interactive/protected-edits.js +160 -0
- package/dist/interactive/protected-edits.js.map +1 -0
- package/dist/interactive/proxy-routes.js +2 -2
- package/dist/interactive/review-events.js +1 -1
- package/dist/interactive/run-units.d.ts +1 -1
- package/dist/interactive/run-units.d.ts.map +1 -1
- package/dist/interactive/run-units.js +8 -2
- package/dist/interactive/run-units.js.map +1 -1
- package/dist/interactive/source-packet.d.ts +66 -1
- package/dist/interactive/source-packet.d.ts.map +1 -1
- package/dist/interactive/source-packet.js +309 -60
- package/dist/interactive/source-packet.js.map +1 -1
- package/dist/interactive/theme-events.js +1 -1
- package/dist/knowledge/adapters/web/egress.d.ts +99 -0
- package/dist/knowledge/adapters/web/egress.d.ts.map +1 -0
- package/dist/knowledge/adapters/web/egress.js +330 -0
- package/dist/knowledge/adapters/web/egress.js.map +1 -0
- package/dist/knowledge/adapters/web/engine.d.ts +54 -0
- package/dist/knowledge/adapters/web/engine.d.ts.map +1 -0
- package/dist/knowledge/adapters/web/engine.js +101 -0
- package/dist/knowledge/adapters/web/engine.js.map +1 -0
- package/dist/knowledge/adapters/web/fetch.d.ts +131 -0
- package/dist/knowledge/adapters/web/fetch.d.ts.map +1 -0
- package/dist/knowledge/adapters/web/fetch.js +325 -0
- package/dist/knowledge/adapters/web/fetch.js.map +1 -0
- package/dist/knowledge/adapters/web/gate-web.d.ts +182 -0
- package/dist/knowledge/adapters/web/gate-web.d.ts.map +1 -0
- package/dist/knowledge/adapters/web/gate-web.js +496 -0
- package/dist/knowledge/adapters/web/gate-web.js.map +1 -0
- package/dist/knowledge/adapters/web/routes.d.ts +36 -0
- package/dist/knowledge/adapters/web/routes.d.ts.map +1 -0
- package/dist/knowledge/adapters/web/routes.js +99 -0
- package/dist/knowledge/adapters/web/routes.js.map +1 -0
- package/dist/knowledge/adapters/web/searxng.d.ts +89 -0
- package/dist/knowledge/adapters/web/searxng.d.ts.map +1 -0
- package/dist/knowledge/adapters/web/searxng.js +274 -0
- package/dist/knowledge/adapters/web/searxng.js.map +1 -0
- package/dist/knowledge/adapters/web/source.d.ts +65 -0
- package/dist/knowledge/adapters/web/source.d.ts.map +1 -0
- package/dist/knowledge/adapters/web/source.js +192 -0
- package/dist/knowledge/adapters/web/source.js.map +1 -0
- package/dist/knowledge/gate/gate.d.ts +22 -0
- package/dist/knowledge/gate/gate.d.ts.map +1 -1
- package/dist/knowledge/gate/gate.js +62 -1
- package/dist/knowledge/gate/gate.js.map +1 -1
- package/dist/knowledge/gate/sources.d.ts +2 -0
- package/dist/knowledge/gate/sources.d.ts.map +1 -1
- package/dist/knowledge/gate/sources.js +5 -2
- package/dist/knowledge/gate/sources.js.map +1 -1
- package/dist/knowledge/package.d.ts +7 -0
- package/dist/knowledge/package.d.ts.map +1 -1
- package/dist/knowledge/package.js +15 -1
- package/dist/knowledge/package.js.map +1 -1
- package/dist/knowledge/trackers/actions.js +1 -1
- package/dist/knowledge/trackers/actions.js.map +1 -1
- package/dist/knowledge/trackers/bindings.d.ts +3 -3
- package/dist/knowledge/trackers/bindings.d.ts.map +1 -1
- package/dist/knowledge/trackers/bindings.js +36 -23
- package/dist/knowledge/trackers/bindings.js.map +1 -1
- package/dist/knowledge/trackers/routes.js +1 -1
- package/dist/knowledge/trackers/routes.js.map +1 -1
- package/dist/learnings/service.d.ts.map +1 -1
- package/dist/learnings/service.js +2 -0
- package/dist/learnings/service.js.map +1 -1
- package/dist/mcp/broker.d.ts +8 -0
- package/dist/mcp/broker.d.ts.map +1 -1
- package/dist/mcp/broker.js +48 -3
- package/dist/mcp/broker.js.map +1 -1
- package/dist/mcp/estate-relay.d.ts +43 -1
- package/dist/mcp/estate-relay.d.ts.map +1 -1
- package/dist/mcp/estate-relay.js +38 -2
- package/dist/mcp/estate-relay.js.map +1 -1
- package/dist/mcp/registry.d.ts +6 -0
- package/dist/mcp/registry.d.ts.map +1 -1
- package/dist/mcp/registry.js +42 -3
- package/dist/mcp/registry.js.map +1 -1
- package/dist/mcp/run-fence.d.ts +57 -0
- package/dist/mcp/run-fence.d.ts.map +1 -0
- package/dist/mcp/run-fence.js +86 -0
- package/dist/mcp/run-fence.js.map +1 -0
- package/dist/mcp/tool-list.d.ts +5 -0
- package/dist/mcp/tool-list.d.ts.map +1 -1
- package/dist/mcp/tool-list.js +7 -3
- package/dist/mcp/tool-list.js.map +1 -1
- package/dist/presets/routes.d.ts.map +1 -1
- package/dist/presets/routes.js +6 -0
- package/dist/presets/routes.js.map +1 -1
- package/dist/projects/routes.d.ts +1 -1
- package/dist/projects/state-home-preflight.d.ts.map +1 -1
- package/dist/projects/state-home-preflight.js +2 -0
- package/dist/projects/state-home-preflight.js.map +1 -1
- package/dist/setup/tool-path.d.ts +16 -0
- package/dist/setup/tool-path.d.ts.map +1 -0
- package/dist/setup/tool-path.js +66 -0
- package/dist/setup/tool-path.js.map +1 -0
- package/dist/skills/plugin-source.d.ts +42 -88
- package/dist/skills/plugin-source.d.ts.map +1 -1
- package/dist/skills/plugin-source.js +140 -100
- package/dist/skills/plugin-source.js.map +1 -1
- package/dist/skills/runtime.d.ts.map +1 -1
- package/dist/skills/runtime.js +15 -7
- package/dist/skills/runtime.js.map +1 -1
- package/dist/skills/store.d.ts.map +1 -1
- package/dist/skills/store.js +25 -14
- package/dist/skills/store.js.map +1 -1
- package/dist/skills/usage.d.ts +238 -0
- package/dist/skills/usage.d.ts.map +1 -0
- package/dist/skills/usage.js +789 -0
- package/dist/skills/usage.js.map +1 -0
- package/dist/skills/venv.d.ts +18 -2
- package/dist/skills/venv.d.ts.map +1 -1
- package/dist/skills/venv.js +2 -2
- package/dist/skills/venv.js.map +1 -1
- package/dist/sources/routes.d.ts +3 -1
- package/dist/sources/routes.d.ts.map +1 -1
- package/dist/sources/routes.js +11 -0
- package/dist/sources/routes.js.map +1 -1
- package/dist/standing-orders/parse.d.ts +19 -0
- package/dist/standing-orders/parse.d.ts.map +1 -1
- package/dist/standing-orders/parse.js +61 -18
- package/dist/standing-orders/parse.js.map +1 -1
- package/dist/studio/apps-standalone/fixture.html +12 -0
- package/dist/studio/apps-standalone/fixture.js +10 -0
- package/dist/studio/apps-standalone/runtime.css +139 -0
- package/dist/studio/apps-standalone/runtime.js +1 -0
- package/dist/studio/assets/{KnowledgeGraph-Cpm46tEp.js → KnowledgeGraph-AtkRlS3c.js} +1 -1
- package/dist/studio/assets/index-CdbCAs7s.css +32 -0
- package/dist/studio/assets/index-DU_8o4uq.js +1104 -0
- package/dist/studio/editors/wicked-apps/editor.json +1 -1
- package/dist/studio/editors/wicked-apps/index.html +2 -2
- package/dist/studio/editors/wicked-deck/editor.json +1 -1
- package/dist/studio/editors/wicked-deck/index.html +14 -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 +10 -1
- package/dist/studio/editors/wicked-page/index.html +2 -2
- package/dist/studio/editors/wicked-video/editor.json +7 -2
- package/dist/studio/editors/wicked-video/index.html +14 -11
- package/dist/studio/index.html +2 -2
- package/dist/studio/testid-inventory.json +2069 -242
- package/dist/team/routes.d.ts +1 -1
- package/dist/workflow-catalog/build-v2.d.ts +6 -2
- package/dist/workflow-catalog/build-v2.d.ts.map +1 -1
- package/dist/workflow-catalog/build-v2.js +37 -13
- package/dist/workflow-catalog/build-v2.js.map +1 -1
- package/dist/workflow-catalog/catalog-data-v2.d.ts.map +1 -1
- package/dist/workflow-catalog/catalog-data-v2.js +310 -105
- package/dist/workflow-catalog/catalog-data-v2.js.map +1 -1
- package/dist/workflow-catalog/catalog-data.d.ts.map +1 -1
- package/dist/workflow-catalog/catalog-data.js +2 -20
- package/dist/workflow-catalog/catalog-data.js.map +1 -1
- package/dist/workflow-catalog/detect-service.d.ts +95 -0
- package/dist/workflow-catalog/detect-service.d.ts.map +1 -0
- package/dist/workflow-catalog/detect-service.js +239 -0
- package/dist/workflow-catalog/detect-service.js.map +1 -0
- package/dist/workflow-catalog/detect.d.ts +213 -0
- package/dist/workflow-catalog/detect.d.ts.map +1 -0
- package/dist/workflow-catalog/detect.js +653 -0
- package/dist/workflow-catalog/detect.js.map +1 -0
- package/dist/workflow-catalog/shape.d.ts +3 -1
- package/dist/workflow-catalog/shape.d.ts.map +1 -1
- package/dist/workflow-catalog/shape.js +7 -1
- package/dist/workflow-catalog/shape.js.map +1 -1
- package/dist/working-doc/bridge-backend.js +2 -2
- package/dist/working-doc/event-lines.d.ts +67 -2
- package/dist/working-doc/event-lines.d.ts.map +1 -1
- package/dist/working-doc/event-lines.js +155 -8
- package/dist/working-doc/event-lines.js.map +1 -1
- package/dist/working-doc/notes-index.d.ts +35 -0
- package/dist/working-doc/notes-index.d.ts.map +1 -0
- package/dist/working-doc/notes-index.js +82 -0
- package/dist/working-doc/notes-index.js.map +1 -0
- package/dist/working-doc/routes.js +4 -4
- package/dist/working-doc/sections.js +2 -2
- package/dist/working-doc/service.d.ts +260 -21
- package/dist/working-doc/service.d.ts.map +1 -1
- package/dist/working-doc/service.js +791 -90
- package/dist/working-doc/service.js.map +1 -1
- package/dist/working-doc/store.d.ts +50 -1
- package/dist/working-doc/store.d.ts.map +1 -1
- package/dist/working-doc/store.js +4 -1
- package/dist/working-doc/store.js.map +1 -1
- package/endpoint-manifest.json +187 -3
- package/evals/corpora/shape-corrections-v1.json +594 -0
- package/evals/corpora/shape-corrections-v1.seat-fixture.json +186 -0
- package/evals/corpora/shape-v1.json +2113 -0
- package/evals/corpora/shape-v1.seat-fixture.json +1800 -0
- package/package.json +11 -7
- package/scripts/apps-render.py +226 -0
- package/workflows/detect-shape.json +29 -0
- package/dist/studio/assets/index-BRBwWQMH.css +0 -32
- package/dist/studio/assets/index-CVrWDGRP.js +0 -1097
package/dist/api/server.js
CHANGED
|
@@ -7,6 +7,7 @@ import { join, resolve as resolvePath } from 'node:path';
|
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
8
|
import { DecisionLedger } from '../decisions/ledger.js';
|
|
9
9
|
import { requestOrigin, shellCsp } from '../editors/csp.js';
|
|
10
|
+
import { conformanceRuntimeRoot, exportEngineConformanceEnv, exportManagedChrome, managedChromium } from '../editors/conformance-runtime.js';
|
|
10
11
|
import { launchRosterNaming, registerRoutes } from './routes.js';
|
|
11
12
|
import { APPS_ACTIONS_STATE_FILENAME, AppActionStore } from '../apps/actions/store.js';
|
|
12
13
|
import { AppsSourceStage } from '../apps/exec/source-stage.js';
|
|
@@ -21,6 +22,8 @@ import { registerAuthHooks, resolveAuth } from './auth.js';
|
|
|
21
22
|
import { corsAllowed, refuseRequest } from './origin-guard.js';
|
|
22
23
|
import { guardUpgrades, registerFrameGuard } from './frame-guard.js';
|
|
23
24
|
import { registerServerErrorBody } from './server-error-body.js';
|
|
25
|
+
import { registerUiTextScrub } from './ui-text.js';
|
|
26
|
+
import { API_PREFIX } from './api-prefix.js';
|
|
24
27
|
import { AuditLog } from './audit.js';
|
|
25
28
|
import { defaultEvalStoreRoot, EvalRunStore } from './eval-store.js';
|
|
26
29
|
import { DefaultEvalStore } from '../evals/store.js';
|
|
@@ -29,6 +32,7 @@ import { GroupIndex } from './group-index.js';
|
|
|
29
32
|
import { RunTimingIndex, recordRunLaunched } from './run-timing-index.js';
|
|
30
33
|
import { OnboardingCaptureChain } from './onboarding-capture.js';
|
|
31
34
|
import { INSPECT_WORKFLOW, InspectService, defaultInspectionsDir, loadInspectWorkflow } from '../inspect/service.js';
|
|
35
|
+
import { DETECT_WORKFLOW, loadDetectWorkflow } from '../workflow-catalog/detect-service.js';
|
|
32
36
|
import { registerInspectRoutes } from '../inspect/routes.js';
|
|
33
37
|
import { DISTILL_WORKFLOW, RunLearningsService, defaultLearningsDir, loadDistillWorkflow, runLearningsMode } from '../learnings/service.js';
|
|
34
38
|
import { memoryContents, proposalRows, submitLearning } from '../learnings/estate.js';
|
|
@@ -39,7 +43,7 @@ import { PersonaStore } from '../persona/store.js';
|
|
|
39
43
|
import { registerSetupRoutes } from '../setup/routes.js';
|
|
40
44
|
import { voiceBlock } from '../persona/voice.js';
|
|
41
45
|
import { VoiceInjectInputs } from '../voice/inject-input.js';
|
|
42
|
-
import { registerInsightsRoutes } from '../insights/routes.js';
|
|
46
|
+
import { factsUnitResolver, registerInsightsRoutes } from '../insights/routes.js';
|
|
43
47
|
import { ReviewService } from '../insights/review-service.js';
|
|
44
48
|
import { InsightsStore } from '../insights/store.js';
|
|
45
49
|
import { ANALYZE_CLI, REVIEW_WORKFLOW, defaultReviewsDir, loadReviewWorkflow } from '../insights/workflow.js';
|
|
@@ -52,7 +56,7 @@ import { LearnScheduleStore } from '../learn/schedule-store.js';
|
|
|
52
56
|
import { GuidanceIndex } from './guidance-index.js';
|
|
53
57
|
import { ChatScopeIndex, reapStaleChatNamespaces } from './chat-scope.js';
|
|
54
58
|
import { chatCitationDeps, citationsFrame, verifyCitations, } from './chat-citations.js';
|
|
55
|
-
import { DeliveryIndex, DeliveryResolver, gitRunBranchIsEmpty, gitWorktreeIsClean, canDeliverResolver, deliverUnitOf, } from './delivery-index.js';
|
|
59
|
+
import { DeliveryIndex, DeliveryResolver, gitRunBranchIsEmpty, gitWorktreeIsClean, canDeliverResolver, deliverUnitOf, deliveredCommitFor, recordDelivery, } from './delivery-index.js';
|
|
56
60
|
import { CodebaseArchiveStore, archiveKey, deliverDispatchKey } from './codebase-archive.js';
|
|
57
61
|
import { DeliveryFreeze } from './delivery-freeze.js';
|
|
58
62
|
import { DeliveryDerivationCache } from './delivery-cache.js';
|
|
@@ -72,7 +76,8 @@ import { DocRunIndex } from '../interactive/doc-run-index.js';
|
|
|
72
76
|
import { TestSetIndex, registerTestSetForRun } from '../qe/test-sets.js';
|
|
73
77
|
import { DocGroundingStore } from '../interactive/doc-grounding.js';
|
|
74
78
|
import { ProjectSettingsStore } from '../projects/settings.js';
|
|
75
|
-
import { crewStateHome } from '../projects/state-home.js';
|
|
79
|
+
import { crewStateHome, isDefaultStateHome } from '../projects/state-home.js';
|
|
80
|
+
import { RunSourcePicks } from './run-sources.js';
|
|
76
81
|
import { coreUnitId } from './evidence.js';
|
|
77
82
|
import { homedir } from 'node:os';
|
|
78
83
|
import { discoverMcpServers } from '../mcp/discovery.js';
|
|
@@ -87,6 +92,7 @@ import { unitTrackerIds } from '../knowledge/trackers/visible.js';
|
|
|
87
92
|
import { McpCallRecordFile } from '../mcp/call-records.js';
|
|
88
93
|
import { emitOnBus } from '../core/bus.js';
|
|
89
94
|
import { McpRegistry } from '../mcp/registry.js';
|
|
95
|
+
import { daemonRunFence } from '../mcp/run-fence.js';
|
|
90
96
|
import { McpRegistryStore } from '../mcp/registry-store.js';
|
|
91
97
|
import { resolveSecret } from '../mcp/secrets.js';
|
|
92
98
|
import { DataGate } from '../knowledge/gate/gate.js';
|
|
@@ -107,7 +113,7 @@ import { STALL_DETECTED_ACTION, STALL_ESCALATED_ACTION, StallFrameIndex, stallFr
|
|
|
107
113
|
import { SeatHealthTracker } from './seat-health.js';
|
|
108
114
|
import { auditSeatBenchStore, readSeatBenchEntries } from './seat-bench-trail.js';
|
|
109
115
|
import { rosterWithStandingFactory } from './roster-standing.js';
|
|
110
|
-
import { SeatContainerStatus, seatLoginDepsFor } from './seat-container-login.js';
|
|
116
|
+
import { registerLoginCleanup, SeatContainerStatus, seatLoginDepsFor } from './seat-container-login.js';
|
|
111
117
|
import { ChatTurnIndex } from './chat-turns.js';
|
|
112
118
|
import { ChatTranscriptStore } from './chat-transcripts.js';
|
|
113
119
|
import { sweepDeliveredWorktree } from './worktree-sweep.js';
|
|
@@ -127,10 +133,12 @@ import { registerWatchRoutes } from './watch-routes.js';
|
|
|
127
133
|
import { callEstateTool } from '../core/estate-mcp-client.js';
|
|
128
134
|
import { seatParser } from '../standing-orders/parse.js';
|
|
129
135
|
import { registerGateHistoryRoute, runBand, runPreset, runProject } from '../standing-orders/history.js';
|
|
130
|
-
import { WorkingDocService } from '../working-doc/service.js';
|
|
136
|
+
import { WorkingDocService, workingDocStep } from '../working-doc/service.js';
|
|
137
|
+
import { PersonNotesIndex } from '../working-doc/notes-index.js';
|
|
131
138
|
import { WorkingDocStore } from '../working-doc/store.js';
|
|
132
139
|
import { isWorkingDoc as isWorkingDocAt } from '../interactive/chat-events.js';
|
|
133
140
|
import { DocBindingStore } from '../interactive/doc-binding.js';
|
|
141
|
+
import { LandingRecordStore } from '../interactive/landing-record.js';
|
|
134
142
|
import { docVersionsOf, reconcileBoundAttempts, recoveredLaunchDetail } from '../interactive/proposal-create.js';
|
|
135
143
|
import { bridgeBackend } from '../working-doc/bridge-backend.js';
|
|
136
144
|
import { registerWorkingDocRoutes } from '../working-doc/routes.js';
|
|
@@ -145,12 +153,14 @@ import { applyRequirementsGraphSettings } from '../core/requirements-graph-setti
|
|
|
145
153
|
import { builtinPresetSkillRefs, coreSkillRefs, registeredSkillRefs } from '../skills/core-closure.js';
|
|
146
154
|
import { assertSkillsRootFenced } from '../skills/root-fence.js';
|
|
147
155
|
import { SkillsRuntime, isPublishingPlaceholder } from '../skills/runtime.js';
|
|
156
|
+
import { SkillUsageRecorder } from '../skills/usage.js';
|
|
148
157
|
import { SKILLS_SNAPSHOT_ENGINE_ENV } from '../skills/engine-env.js';
|
|
149
158
|
import { assertWickedRootsOutsideStateHome, StateHomeWatch } from '../projects/state-home-preflight.js';
|
|
150
159
|
import { resolveSkillsRoot, SkillsStore } from '../skills/store.js';
|
|
151
160
|
import { uvSyncBaseline } from '../skills/venv.js';
|
|
152
161
|
import { DEFAULT_WORKER_STALL_ESCALATE_MINUTES, DEFAULT_WORKER_SILENT_TURN_MINUTES, DEFAULT_WORKER_STALL_MINUTES, } from '../core/types.js';
|
|
153
162
|
import { daemonSignalLog } from '../core/daemon-signal-log.js';
|
|
163
|
+
import { latestDraftRender } from '../interactive/draft-skill.js';
|
|
154
164
|
import { refreshProjectGraphsAfterOnboarding } from '../projects/auto-refresh.js';
|
|
155
165
|
/** The daemon's own actor on the audit trail (`run.delivered`, `run.ended`, the onboarding `run.launched`). */
|
|
156
166
|
const DAEMON_ACTOR = { id: 'daemon', kind: 'system', trust: 'admin' };
|
|
@@ -212,14 +222,19 @@ export async function createServer(adapter, options) {
|
|
|
212
222
|
stream: teeStreamWithErrorRing(errorRing),
|
|
213
223
|
},
|
|
214
224
|
// DES-CHAT-ARTIFACTS-001 A2: a proposal id is `<chat id>:<turn uuid>` and a chat id may be 128 characters, so a
|
|
215
|
-
// path parameter may be up to 165 (Fastify's default limit is 100). Generous, still bounded.
|
|
216
|
-
|
|
225
|
+
// path parameter may be up to 165 (Fastify's default limit is 100). Generous, still bounded. Under
|
|
226
|
+
// `routerOptions`: the top-level key printed Fastify's FSTDEP022 deprecation on every boot (first-run P9).
|
|
227
|
+
routerOptions: { maxParamLength: 256 },
|
|
217
228
|
});
|
|
218
229
|
// TH-11: accumulate the route table as it registers — the endpoint manifest's one source of
|
|
219
230
|
// truth. Installed FIRST because fastify only fires onRoute for routes added after the hook
|
|
220
231
|
// exists. Read via `app.endpointManifest` (scripts/generate-endpoint-manifest.ts + the drift
|
|
221
232
|
// test); costs one array push per route at boot, nothing per request.
|
|
222
233
|
app.decorate('endpointManifest', installEndpointManifestHook(app));
|
|
234
|
+
// FINDINGS B1/B2/C3a backstop: no home path leaves the read-only diagnostic routes, even one a new row forgets to scrub.
|
|
235
|
+
// NOT `/roster`: its rows are launch inputs (studio sends them back verbatim as `POST /runs` `clisJson`), so a seat's
|
|
236
|
+
// binary under the home dir must keep its real path there (macOS CI caught `~/…/node` failing to spawn).
|
|
237
|
+
registerUiTextScrub(app, [`${API_PREFIX}/health`, `${API_PREFIX}/diagnostics`, `${API_PREFIX}/system`]);
|
|
223
238
|
const gateCache = new GateCache(app.log);
|
|
224
239
|
// Standing orders (behaviour 10): armed once the routes (and so THE gate decision path) exist;
|
|
225
240
|
// the event relays above it read it late-bound.
|
|
@@ -257,6 +272,7 @@ export async function createServer(adapter, options) {
|
|
|
257
272
|
// the same dir the sign-in routes pass (agy crew-r1).
|
|
258
273
|
containerStatus: new SeatContainerStatus(seatLoginDepsFor(adapter.dbPath)),
|
|
259
274
|
});
|
|
275
|
+
registerLoginCleanup(app, seatLoginDepsFor(adapter.dbPath));
|
|
260
276
|
// Runtime-guarded, not typed away: the integration suites drive `createServer` over PARTIAL fake
|
|
261
277
|
// adapters (cast to `CoreAdapter`) that never grew this method — the real adapter always has it.
|
|
262
278
|
if (typeof adapter.setRosterProvider === 'function') {
|
|
@@ -410,6 +426,20 @@ export async function createServer(adapter, options) {
|
|
|
410
426
|
app.decorate('skillsBootSettled', () => skillsBoot ?? Promise.resolve());
|
|
411
427
|
// Exclusive peers (codex on #846): `venv` is the provisioner path's time, `skills` the rest of
|
|
412
428
|
// the seam (seed, validate, hash, stage, flip) — the stages sum, never double-count.
|
|
429
|
+
// Skill usage (operator 2026-11-08): the engine's `skillUsed` / `skillsSnapshotHanded` frames rolled up per skill
|
|
430
|
+
// and CLI beside the catalog (`daemon-skill-usage.json`), read by `GET /skills/usage`. Only with a skills seam:
|
|
431
|
+
// its snapshots are where a script is credited to the skills whose files name it.
|
|
432
|
+
const skillUsage = skillsStore !== undefined
|
|
433
|
+
? new SkillUsageRecorder({
|
|
434
|
+
snapshotsDir: () => (skillsStore === undefined ? null : join(skillsStore.root, 'snapshots')),
|
|
435
|
+
chatOf: (session) => askPaths.chatOf(session),
|
|
436
|
+
})
|
|
437
|
+
: undefined;
|
|
438
|
+
if (skillUsage !== undefined) {
|
|
439
|
+
app.addHook('onClose', async () => {
|
|
440
|
+
skillUsage.flush();
|
|
441
|
+
});
|
|
442
|
+
}
|
|
413
443
|
const skillsMs = bootClock.lap('skills');
|
|
414
444
|
const venvMs = skillsStore?.venvStage().ms ?? 0;
|
|
415
445
|
bootClock.set('skills', skillsMs - venvMs);
|
|
@@ -620,13 +650,15 @@ export async function createServer(adapter, options) {
|
|
|
620
650
|
// The durable record first, then the read-side index — the same write order as
|
|
621
651
|
// `guidance.set`, so the index can only LAG a crash (rehydrated at next boot), never
|
|
622
652
|
// hold a record the trail does not.
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
653
|
+
// CS11: the trail and the index get the same `commit` ({@link recordDelivery}, tested as is).
|
|
654
|
+
record: (runId, record) => recordDelivery(audit, deliveryIndex, DAEMON_ACTOR, runId, record),
|
|
655
|
+
// CS11 (DES-CATALOG-002 rev 8): record the delivered HEAD SHA from now on, over the registered
|
|
656
|
+
// repo root (the same `listRepos()` resolver this file uses for repo roots) + the engine's
|
|
657
|
+
// `run_branch` (else `wicked/<id>`). The body lives in `delivery-index.ts` ({@link
|
|
658
|
+
// deliveredCommitFor}) so tests exercise the production code, not a copy (cs11-b review
|
|
659
|
+
// P1/P2): it records NO commit when a later phase ran after the deliver unit (the pushed tip
|
|
660
|
+
// may have moved) and when the SHA cannot be read — the join then keeps the run (fail-closed).
|
|
661
|
+
deliveredCommit: (view) => deliveredCommitFor(view, async (repoRef) => (await adapter.listRepos()).find((r) => r.id === repoRef)?.root_path),
|
|
630
662
|
log: (m) => app.log.warn(m),
|
|
631
663
|
});
|
|
632
664
|
const resolveRunDelivery = (runId) => deliveryResolver.resolve(runId);
|
|
@@ -705,6 +737,15 @@ export async function createServer(adapter, options) {
|
|
|
705
737
|
// DES-CHAT-ARTIFACTS-001 §5.2 (A3): the durable binding of every chat-made document, under the registered `chats`
|
|
706
738
|
// state-home entry (core's fence refuses a new top-level entry, and no worker reads the state home).
|
|
707
739
|
const docBindings = new DocBindingStore(join(crewStateDir, 'chats', 'doc-bindings'));
|
|
740
|
+
// A6 / PLAN G12: per run, what crew checked on the file it announced (floor, page count, the writer's notes), under the
|
|
741
|
+
// same registered `chats` entry; the checks read serves it by the version interactive records each run on.
|
|
742
|
+
const docLandings = new LandingRecordStore(join(crewStateDir, 'chats', 'doc-landings'));
|
|
743
|
+
// G12: the floor prints the document with the operator's own renderer, else crew's provisioned Chromium when made.
|
|
744
|
+
const floorChrome = () => (process.env['WICKED_CHROME'] ?? '').trim() || managedChromium(conformanceRuntimeRoot());
|
|
745
|
+
// G12: the run's own engine `draft_render` record (its latest unit of that step, read fresh: the floor runs as the run
|
|
746
|
+
// ends), which the floor reuses when it measured these exact bytes with the floor's own print profile.
|
|
747
|
+
const floorEngineRender = async (runId) => latestDraftRender((await adapter.runView(runId, { fresh: true }))?.units);
|
|
748
|
+
const draftFloorIo = { chrome: floorChrome, engineRender: floorEngineRender };
|
|
708
749
|
/**
|
|
709
750
|
* A3 (§6.2): a proposal-bound attempt's outcome was recorded. A failure is said on the run (`run.landing_failed`, the
|
|
710
751
|
* DTO's `landing_failed` and a `landingFailed` frame), releases the chat and the document (their busy checks read the
|
|
@@ -724,14 +765,16 @@ export async function createServer(adapter, options) {
|
|
|
724
765
|
broadcast({ type: 'landingFailed', session: runId, artifact_ref: ref, reason: outcome.reason });
|
|
725
766
|
if (hit === null || chatProposals === null)
|
|
726
767
|
return;
|
|
727
|
-
|
|
768
|
+
// A5: a refine's retry card goes to the chat the refine was accepted in.
|
|
769
|
+
const chatOf = hit.attempt.chatId !== undefined ? { chatId: hit.attempt.chatId, chatInstance: hit.attempt.chatInstance ?? null } : hit.binding;
|
|
770
|
+
const chatNow = chatHistory.idOfInstance(chatOf.chatId, chatOf.chatInstance);
|
|
728
771
|
if (chatNow === null) {
|
|
729
772
|
app.log.warn(`[proposals] run ${runId} failed, and the chat it was made from is gone — no retry card`);
|
|
730
773
|
docBindings.markPublished(ref, runId);
|
|
731
774
|
return;
|
|
732
775
|
}
|
|
733
776
|
void chatProposals
|
|
734
|
-
.appendRetry(chatNow, hit.attempt.pid, runId, ref, outcome.reason,
|
|
777
|
+
.appendRetry(chatNow, hit.attempt.pid, runId, ref, outcome.reason, chatOf.chatInstance)
|
|
735
778
|
.then((pid) => {
|
|
736
779
|
if (pid !== null)
|
|
737
780
|
docBindings.setRetry(ref, runId, pid);
|
|
@@ -1119,6 +1162,16 @@ export async function createServer(adapter, options) {
|
|
|
1119
1162
|
app.log.warn(`[inspect] could not register the '${INSPECT_WORKFLOW}' workflow — checks answer with crew's own reading: ${err instanceof Error ? err.message : String(err)}`);
|
|
1120
1163
|
}
|
|
1121
1164
|
}
|
|
1165
|
+
// DES-CATALOG-002 §2.3: the hidden detect-shape turn (POST /workflows/catalog/detect). Without it, detection answers
|
|
1166
|
+
// from the words layer alone, never sure.
|
|
1167
|
+
if (typeof adapter.registerWorkflow === 'function') {
|
|
1168
|
+
try {
|
|
1169
|
+
await adapter.registerWorkflow(loadDetectWorkflow());
|
|
1170
|
+
}
|
|
1171
|
+
catch (err) {
|
|
1172
|
+
app.log.warn(`[detect] could not register the '${DETECT_WORKFLOW}' workflow — detection answers from the words alone: ${err instanceof Error ? err.message : String(err)}`);
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1122
1175
|
// A check a restart interrupted is stopped and answered now, so it never runs on unwatched past its bound.
|
|
1123
1176
|
void unitInspect.recover();
|
|
1124
1177
|
registerInspectRoutes(app, { service: unitInspect, audit });
|
|
@@ -1194,7 +1247,25 @@ export async function createServer(adapter, options) {
|
|
|
1194
1247
|
},
|
|
1195
1248
|
audit,
|
|
1196
1249
|
});
|
|
1197
|
-
registerInsightsRoutes(app, {
|
|
1250
|
+
registerInsightsRoutes(app, {
|
|
1251
|
+
store: insightsStore,
|
|
1252
|
+
service: reviewService,
|
|
1253
|
+
audit,
|
|
1254
|
+
// (DES-CATALOG-002 CS6) `POST /insights/facts`: the engine resolves the unit's token; crew reads which step it is.
|
|
1255
|
+
...(CoreAdapter.estateScopeResolver() !== null
|
|
1256
|
+
? {
|
|
1257
|
+
facts: {
|
|
1258
|
+
unitOf: factsUnitResolver((req) => {
|
|
1259
|
+
const resolve = CoreAdapter.estateScopeResolver();
|
|
1260
|
+
if (resolve === null)
|
|
1261
|
+
return Promise.reject(new Error('no resolver'));
|
|
1262
|
+
return resolve(req);
|
|
1263
|
+
}, () => adapter.sessionsDetail()),
|
|
1264
|
+
collect: (opts, nowMs) => reviewService.collect(opts, nowMs),
|
|
1265
|
+
},
|
|
1266
|
+
}
|
|
1267
|
+
: {}),
|
|
1268
|
+
});
|
|
1198
1269
|
if (options?.workflowSchedules?.enabled ?? !(process.env['VITEST'] !== undefined || process.env['NODE_ENV'] === 'test')) {
|
|
1199
1270
|
// Seeded (and so written to the state home) only by a daemon that runs the tick: a headless boot (the
|
|
1200
1271
|
// endpoint-manifest collector, a test) never plants a schedule file in whatever state home it resolves.
|
|
@@ -1283,6 +1354,8 @@ export async function createServer(adapter, options) {
|
|
|
1283
1354
|
bindings: docBindings,
|
|
1284
1355
|
onBoundDocCreated: (ref) => onBoundDocCreated(ref),
|
|
1285
1356
|
onBoundOutcome,
|
|
1357
|
+
landings: docLandings,
|
|
1358
|
+
draftFloorIo,
|
|
1286
1359
|
resolveDocsRoot: o.resolveDocsRoot ?? interactiveDocsRoot,
|
|
1287
1360
|
log: (m) => app.log.warn(m),
|
|
1288
1361
|
logError: (m) => app.log.error(m),
|
|
@@ -1424,6 +1497,12 @@ export async function createServer(adapter, options) {
|
|
|
1424
1497
|
isDocBusy: (documentId) => (draftSub?.inFlightDocs().includes(documentId) ?? false) ||
|
|
1425
1498
|
(editSub?.inFlightDocs().includes(documentId) ?? false),
|
|
1426
1499
|
onRunFiled: fileRun,
|
|
1500
|
+
// DES-CHAT-ARTIFACTS-001 §6 (A5): a proposal-bound refine's attempt, launch record, landing record and outcome.
|
|
1501
|
+
bindings: docBindings,
|
|
1502
|
+
onBoundOutcome,
|
|
1503
|
+
onRunLaunched: (runId, detail) => { recordRunLaunched(audit, runTimingIndex, DAEMON_ACTOR, runId, detail); },
|
|
1504
|
+
landings: docLandings,
|
|
1505
|
+
draftFloorIo,
|
|
1427
1506
|
log: (m) => app.log.warn(m),
|
|
1428
1507
|
logError: (m) => app.log.error(m),
|
|
1429
1508
|
});
|
|
@@ -1693,6 +1772,7 @@ export async function createServer(adapter, options) {
|
|
|
1693
1772
|
elicitationCache.ingest(event);
|
|
1694
1773
|
askServer.ingest(event);
|
|
1695
1774
|
seatHealth.ingest(event);
|
|
1775
|
+
skillUsage?.ingest(event);
|
|
1696
1776
|
// ASK-C2: a path run's unit + terminal frames become the chat's frames (re-entering this fold
|
|
1697
1777
|
// as chatDelta / chatReply, which the relay ignores — no recursion).
|
|
1698
1778
|
if (typeof event.session === 'string')
|
|
@@ -2047,6 +2127,12 @@ export async function createServer(adapter, options) {
|
|
|
2047
2127
|
// diagnostics reads the bundle's shipped version manifest from the same root the static
|
|
2048
2128
|
// handler serves. One resolution, two consumers.
|
|
2049
2129
|
const studioRoot = options?.studioRoot ?? defaultStudioRoot();
|
|
2130
|
+
// (DES-EDITOR-CONFORMANCE-HOST, e2e F18) The engine runs an editor-plugin run's conformance cases on this host: it
|
|
2131
|
+
// reads crew's conformance runtime and this studio dist from the daemon's environment.
|
|
2132
|
+
exportEngineConformanceEnv(studioRoot);
|
|
2133
|
+
// (PLAN G12) And the managed headless shell as the daemon's `WICKED_CHROME`, for the engine's `draft_render` step (an
|
|
2134
|
+
// operator's own value wins); the provisioner exports it again whenever it makes or finds the runtime.
|
|
2135
|
+
exportManagedChrome(conformanceRuntimeRoot());
|
|
2050
2136
|
// DES-MCP-TOOLS-001 S2: the registry over `<state home>/mcp` (created on the first save).
|
|
2051
2137
|
const mcpRegistryStore = new McpRegistryStore();
|
|
2052
2138
|
const mcpSecrets = platformSecretStore();
|
|
@@ -2133,8 +2219,24 @@ export async function createServer(adapter, options) {
|
|
|
2133
2219
|
const unitVisible = (scope) => projectVisible(scope.projectId, scope.repoId);
|
|
2134
2220
|
// DES-KNOWLEDGE-DATA-001 §9.1: an app's knowledge query sees what a unit in the APP'S project sees (the same set).
|
|
2135
2221
|
const appsKnowledgeVisible = (projectId) => projectVisible(projectId);
|
|
2222
|
+
// (DES-CATALOG-002 CS4/CS10) Each run's source pick: recorded at launch (POST /runs), read by the broker, the unit's
|
|
2223
|
+
// tool list and the estate relay, so a unit never reaches a registered source its job did not pick.
|
|
2224
|
+
const runSourcePicks = new RunSourcePicks(join(crewStateHome(), 'mcp', 'run-source-picks.json'));
|
|
2225
|
+
/** Every registered source and PM tracker id with its owning source's name: how the relay maps `source:<id>` to a pick. */
|
|
2226
|
+
const sourceOwnerNames = async () => {
|
|
2227
|
+
const out = (await dataGate.sources()).map((s) => ({ id: s.id, name: s.name }));
|
|
2228
|
+
for (const e of await dataGate.pm.entries()) {
|
|
2229
|
+
out.push({ id: e.id, name: e.name });
|
|
2230
|
+
for (const t of e.trackers)
|
|
2231
|
+
out.push({ id: t.id, name: e.name });
|
|
2232
|
+
}
|
|
2233
|
+
return out;
|
|
2234
|
+
};
|
|
2136
2235
|
const mcpBroker = new McpBroker({
|
|
2236
|
+
picks: runSourcePicks,
|
|
2137
2237
|
registry: mcpRegistry,
|
|
2238
|
+
// DES-CATALOG-002 §2.3: a `detect-shape` run reaches nothing (its fence is its identity).
|
|
2239
|
+
fence: daemonRunFence((runId) => adapter.launchedWorkflowOfRun(runId)),
|
|
2138
2240
|
engine: options?.mcpEngineGate ?? (() => CoreAdapter.mcpEngineGate()),
|
|
2139
2241
|
records: mcpCallRecords,
|
|
2140
2242
|
budgetPerUnit: budgetFromEnv(),
|
|
@@ -2145,6 +2247,8 @@ export async function createServer(adapter, options) {
|
|
|
2145
2247
|
estate: new EstateRelay({
|
|
2146
2248
|
resolver: () => CoreAdapter.estateScopeResolver(),
|
|
2147
2249
|
visible: unitVisible,
|
|
2250
|
+
picks: runSourcePicks,
|
|
2251
|
+
sourceNames: sourceOwnerNames,
|
|
2148
2252
|
onProposal: (p) => audit.record('estate.proposal.submitted', { id: `seat:${p.seat}`, kind: 'agent', trust: 'observer' }, {
|
|
2149
2253
|
runId: p.runId,
|
|
2150
2254
|
detail: { unit: p.ord, attempt: p.attempt, seat: p.seat, proposalId: p.proposalId, kindType: p.kindType, callId: p.callId },
|
|
@@ -2281,10 +2385,15 @@ export async function createServer(adapter, options) {
|
|
|
2281
2385
|
docGrounding,
|
|
2282
2386
|
// DES-CHAT-ARTIFACTS-001 §5.2 (A3): chat-made documents; `create` is real only when the draft seam is armed.
|
|
2283
2387
|
docBindings,
|
|
2388
|
+
docLandings,
|
|
2284
2389
|
...(draftSub !== null ? { launchBoundDraft: draftSub.launchBound, fenceBoundDraft: draftSub.fenceBound } : {}),
|
|
2390
|
+
// A5: a refine is real only when the chat seam is armed AND the draft seam is (its landing watch settles every
|
|
2391
|
+
// proposal-bound attempt on `version.created` / `draft.conflict`; codex A5 r1).
|
|
2392
|
+
...(chatSub !== null && draftSub !== null ? { launchBoundRefine: chatSub.launchBound } : {}),
|
|
2285
2393
|
// crew#899: a chat's checkouts are brought to their upstream (when clean) before it reads them.
|
|
2286
2394
|
freshenCheckout: (root) => freshenCheckout(root),
|
|
2287
2395
|
...(skillsRuntime !== undefined ? { skills: skillsRuntime } : {}),
|
|
2396
|
+
...(skillUsage !== undefined ? { skillUsage } : {}),
|
|
2288
2397
|
// DES-MCP-TOOLS-001 S2: the registry over `<state home>/mcp` (created on the first save).
|
|
2289
2398
|
// Route tests drive `registerMcpRoutes` over their own registry (tests/mcp-registry.test.ts).
|
|
2290
2399
|
mcp: mcpRegistry,
|
|
@@ -2306,6 +2415,10 @@ export async function createServer(adapter, options) {
|
|
|
2306
2415
|
mcpBroker,
|
|
2307
2416
|
// DES-KNOWLEDGE-DATA-001 §7: the data gate, its registry store and its read record.
|
|
2308
2417
|
dataGate,
|
|
2418
|
+
// (DES-CATALOG-002 CS4) Each run's source pick, in the registered `mcp` entry (CS10's fence reads it), and the
|
|
2419
|
+
// folder a run's documents are staged in, outside the state home.
|
|
2420
|
+
runSourcePicks,
|
|
2421
|
+
runDocumentsRoot: runDocumentsRootDir(),
|
|
2309
2422
|
mcpRegistryStore,
|
|
2310
2423
|
sourceReads,
|
|
2311
2424
|
trackerProjector,
|
|
@@ -2433,12 +2546,38 @@ export async function createServer(adapter, options) {
|
|
|
2433
2546
|
// Program DES-POWER-MODE §8.3/§9 (spike 3): the run's working document — a wicked-interactive document of kind
|
|
2434
2547
|
// `phase-report` — and the steering notes a person's edits of it become. Steering rides the engine's operator
|
|
2435
2548
|
// inject only; nothing here answers a gate.
|
|
2549
|
+
const workingDocNotes = new PersonNotesIndex();
|
|
2550
|
+
// The working documents read the run views (the engine's whole-store fold) at most once per 2 s between them: the
|
|
2551
|
+
// catch-up and a burst of syncs share one read instead of one each (crew#944: run reads must stay fast).
|
|
2552
|
+
let workingDocViewsRead = null;
|
|
2553
|
+
const workingDocViews = () => {
|
|
2554
|
+
if (workingDocViewsRead === null || Date.now() - workingDocViewsRead.at > 2_000) {
|
|
2555
|
+
const views = adapter.sessionsDetail();
|
|
2556
|
+
workingDocViewsRead = { at: Date.now(), views };
|
|
2557
|
+
views.catch(() => { if (workingDocViewsRead?.views === views)
|
|
2558
|
+
workingDocViewsRead = null; });
|
|
2559
|
+
}
|
|
2560
|
+
return workingDocViewsRead.views;
|
|
2561
|
+
};
|
|
2562
|
+
/** How long after start the working documents' catch-up begins (`WICKED_WORKING_DOC_CATCHUP_MS`, default 10 s). */
|
|
2563
|
+
const catchUpEnv = Number(process.env['WICKED_WORKING_DOC_CATCHUP_MS']);
|
|
2564
|
+
const WORKING_DOC_CATCH_UP_DELAY_MS = process.env['WICKED_WORKING_DOC_CATCHUP_MS'] !== undefined && Number.isFinite(catchUpEnv) && catchUpEnv >= 0 ? catchUpEnv : 10_000;
|
|
2565
|
+
// The start-up read of the trail for the person's answers; every document sync waits for it (never rejects).
|
|
2566
|
+
const workingDocNotesRead = audit.readAll().then((entries) => workingDocNotes.hydrate(entries), (err) => {
|
|
2567
|
+
app.log.warn(`[working-doc] the trail could not be read for the person's answers: ${String(err)}`);
|
|
2568
|
+
return workingDocNotes.hydrate([]);
|
|
2569
|
+
});
|
|
2436
2570
|
const workingDocs = new WorkingDocService({
|
|
2437
2571
|
store: new WorkingDocStore({ log: (m) => app.log.warn(m) }),
|
|
2438
2572
|
backend: bridgeBackend(interactiveBridges, (projectId) => workingDocRoot(adapter, projectSettings, projectId)),
|
|
2439
|
-
engine: {
|
|
2573
|
+
engine: {
|
|
2574
|
+
injectWorkerMessage: (runId, message, target) => adapter.injectWorkerMessage(runId, message, target),
|
|
2575
|
+
supportsRunContext: () => typeof adapter.supportsRunContext === 'function' && adapter.supportsRunContext(),
|
|
2576
|
+
// (context-doc-switch) The person's Goal, Approach and Constraints as the engine's context block.
|
|
2577
|
+
setRunContext: (runId, ctx) => adapter.setRunContext(runId, ctx),
|
|
2578
|
+
},
|
|
2440
2579
|
run: async (runId) => {
|
|
2441
|
-
const v = (await
|
|
2580
|
+
const v = (await workingDocViews()).find((x) => x.session.id === runId);
|
|
2442
2581
|
if (v === undefined)
|
|
2443
2582
|
return null;
|
|
2444
2583
|
return {
|
|
@@ -2446,12 +2585,19 @@ export async function createServer(adapter, options) {
|
|
|
2446
2585
|
problem: v.session.problem ?? '',
|
|
2447
2586
|
projectId: runProject(v, runId, (id) => membershipIndex.projectOf(id)) ?? WORKING_DOC_DEFAULT_PROJECT,
|
|
2448
2587
|
terminal: ['completed', 'cancelled', 'failed'].includes(v.session.status),
|
|
2449
|
-
stepOf: (ord) =>
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
},
|
|
2588
|
+
stepOf: (ord) => workingDocStep(v.units.find((x) => x.ord === ord)),
|
|
2589
|
+
power: v.session.power != null,
|
|
2590
|
+
// The run's current plan (the engine's unit list): what a phased run's Approach says once its plan settles.
|
|
2591
|
+
steps: v.units.map((u) => ({ ord: u.ord, name: workingDocStep(u), seat: u.assigned_cli ?? null })),
|
|
2453
2592
|
};
|
|
2454
2593
|
},
|
|
2594
|
+
// A person's answers with their words (crew's own trail: the engine's log does not say who, or why), from memory,
|
|
2595
|
+
// once the start-up read of the trail is in (so a line never lands ahead of an older one).
|
|
2596
|
+
notes: async (runId) => { await workingDocNotesRead; return workingDocNotes.of(runId); },
|
|
2597
|
+
// The launch time is crew's (the run-timing index, from `run.launched`); a run with none sorts oldest.
|
|
2598
|
+
liveRuns: async () => (await workingDocViews())
|
|
2599
|
+
.filter((v) => !['completed', 'cancelled', 'failed'].includes(v.session.status) && v.session.archived_at == null)
|
|
2600
|
+
.map((v) => ({ runId: v.session.id, createdAt: runTimingIndex.createdAtFor(v.session.id) ?? 0 })),
|
|
2455
2601
|
changed: (runId, head) => broadcast({ type: 'workingDocChanged', session: runId, head }),
|
|
2456
2602
|
audit: (action, actor, runId, detail) => audit.record(action, actor, { runId, detail }),
|
|
2457
2603
|
// The run's own log: crew writes the event-derived lines (Decisions, Open questions, Next) whether or not a tab
|
|
@@ -2460,8 +2606,28 @@ export async function createServer(adapter, options) {
|
|
|
2460
2606
|
log: (m) => app.log.warn(m),
|
|
2461
2607
|
});
|
|
2462
2608
|
workingDocTap = (e) => workingDocs.onEvent(e);
|
|
2463
|
-
//
|
|
2464
|
-
|
|
2609
|
+
// (context-doc-switch) The engine's context blocks are set at once (one cheap call per live document, serial), not
|
|
2610
|
+
// after the slower line catch-up below: a seat spawned meanwhile would miss a block the engine does not hold yet.
|
|
2611
|
+
void workingDocs.contextCatchUp();
|
|
2612
|
+
// A person's answer recorded in the trail (a gate note, a skip reason, guidance) brings the run's document up to date:
|
|
2613
|
+
// some come with no engine event at all (guidance), and a gate's is recorded after the engine's answer.
|
|
2614
|
+
audit.onRecord((entry) => { const runId = workingDocNotes.add(entry); if (runId !== null)
|
|
2615
|
+
workingDocs.nudge(runId); });
|
|
2616
|
+
// After a restart no further event may come for a run: once the person's answers are read from the trail, bring every
|
|
2617
|
+
// held document up to date and make the newest live runs' documents (bounded, one at a time; never rejects). Answers
|
|
2618
|
+
// recorded while the trail was read bring their run's document up to date too.
|
|
2619
|
+
// It starts a little after the daemon is up (a boot is busy enough), and never after it has closed.
|
|
2620
|
+
let workingDocCatchUp = setTimeout(() => {
|
|
2621
|
+
workingDocCatchUp = null;
|
|
2622
|
+
void workingDocNotesRead.then(async (touched) => {
|
|
2623
|
+
for (const runId of touched)
|
|
2624
|
+
workingDocs.nudge(runId);
|
|
2625
|
+
await workingDocs.catchUp();
|
|
2626
|
+
});
|
|
2627
|
+
}, WORKING_DOC_CATCH_UP_DELAY_MS);
|
|
2628
|
+
workingDocCatchUp.unref?.();
|
|
2629
|
+
app.addHook('onClose', async () => { if (workingDocCatchUp !== null)
|
|
2630
|
+
clearTimeout(workingDocCatchUp); });
|
|
2465
2631
|
registerWorkingDocRoutes(app, { service: workingDocs, exists: async (id) => (await adapter.sessions()).includes(id) });
|
|
2466
2632
|
registerStandingOrderRoutes(app, {
|
|
2467
2633
|
store: standingOrders,
|
|
@@ -2607,4 +2773,17 @@ export async function startServer(adapter, port = 7701, host = '127.0.0.1', opti
|
|
|
2607
2773
|
process.env['WICKED_CREW_URL'] = brokerUrlFor(boundHost, boundPort);
|
|
2608
2774
|
return { app, port: boundPort, host: boundHost, stages: clock.snapshot() };
|
|
2609
2775
|
}
|
|
2776
|
+
/**
|
|
2777
|
+
* (DES-CATALOG-002 CS4) Where a run's documents are staged: `WICKED_RUN_DOCS_DIR` when set; for the default state home
|
|
2778
|
+
* `~/.wicked/run-documents`; for any other `<state home>-run-documents`. Never inside the state home: core's Read fence
|
|
2779
|
+
* denies every state-home entry to workers, and an unregistered entry there refuses every launch (the demo-root rule,
|
|
2780
|
+
* `api/recording.ts` `demoRootDir`).
|
|
2781
|
+
*/
|
|
2782
|
+
export function runDocumentsRootDir() {
|
|
2783
|
+
if (process.env.WICKED_RUN_DOCS_DIR)
|
|
2784
|
+
return process.env.WICKED_RUN_DOCS_DIR;
|
|
2785
|
+
if (isDefaultStateHome())
|
|
2786
|
+
return join(process.env.HOME ?? process.env.USERPROFILE ?? '/tmp', '.wicked', 'run-documents');
|
|
2787
|
+
return `${crewStateHome()}-run-documents`;
|
|
2788
|
+
}
|
|
2610
2789
|
//# sourceMappingURL=server.js.map
|