wicked-crew 0.17.1 → 0.18.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 +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 +206 -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 +7 -2
- package/dist/api/system-snapshot.d.ts.map +1 -1
- package/dist/api/system-snapshot.js +31 -7
- 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 +46 -88
- package/dist/skills/plugin-source.d.ts.map +1 -1
- package/dist/skills/plugin-source.js +144 -100
- package/dist/skills/plugin-source.js.map +1 -1
- package/dist/skills/runtime.d.ts +47 -0
- package/dist/skills/runtime.d.ts.map +1 -1
- package/dist/skills/runtime.js +110 -14
- package/dist/skills/runtime.js.map +1 -1
- package/dist/skills/store.d.ts +2 -0
- package/dist/skills/store.d.ts.map +1 -1
- package/dist/skills/store.js +29 -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-BT5Y-B8b.js} +1 -1
- package/dist/studio/assets/index-B_JwrHVF.css +32 -0
- package/dist/studio/assets/index-Bl9m8ldl.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 +2073 -240
- 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') {
|
|
@@ -395,6 +411,8 @@ export async function createServer(adapter, options) {
|
|
|
395
411
|
else {
|
|
396
412
|
await skillsRuntime.apply();
|
|
397
413
|
await skillsRuntime.autoRefreshOnBoot();
|
|
414
|
+
// crew#1447: a published generation below the garden floor holds launches at the engine input.
|
|
415
|
+
skillsRuntime.holdBelowGardenFloor();
|
|
398
416
|
}
|
|
399
417
|
}
|
|
400
418
|
if (skillsBoot !== null) {
|
|
@@ -410,6 +428,20 @@ export async function createServer(adapter, options) {
|
|
|
410
428
|
app.decorate('skillsBootSettled', () => skillsBoot ?? Promise.resolve());
|
|
411
429
|
// Exclusive peers (codex on #846): `venv` is the provisioner path's time, `skills` the rest of
|
|
412
430
|
// the seam (seed, validate, hash, stage, flip) — the stages sum, never double-count.
|
|
431
|
+
// Skill usage (operator 2026-11-08): the engine's `skillUsed` / `skillsSnapshotHanded` frames rolled up per skill
|
|
432
|
+
// and CLI beside the catalog (`daemon-skill-usage.json`), read by `GET /skills/usage`. Only with a skills seam:
|
|
433
|
+
// its snapshots are where a script is credited to the skills whose files name it.
|
|
434
|
+
const skillUsage = skillsStore !== undefined
|
|
435
|
+
? new SkillUsageRecorder({
|
|
436
|
+
snapshotsDir: () => (skillsStore === undefined ? null : join(skillsStore.root, 'snapshots')),
|
|
437
|
+
chatOf: (session) => askPaths.chatOf(session),
|
|
438
|
+
})
|
|
439
|
+
: undefined;
|
|
440
|
+
if (skillUsage !== undefined) {
|
|
441
|
+
app.addHook('onClose', async () => {
|
|
442
|
+
skillUsage.flush();
|
|
443
|
+
});
|
|
444
|
+
}
|
|
413
445
|
const skillsMs = bootClock.lap('skills');
|
|
414
446
|
const venvMs = skillsStore?.venvStage().ms ?? 0;
|
|
415
447
|
bootClock.set('skills', skillsMs - venvMs);
|
|
@@ -620,13 +652,15 @@ export async function createServer(adapter, options) {
|
|
|
620
652
|
// The durable record first, then the read-side index — the same write order as
|
|
621
653
|
// `guidance.set`, so the index can only LAG a crash (rehydrated at next boot), never
|
|
622
654
|
// hold a record the trail does not.
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
655
|
+
// CS11: the trail and the index get the same `commit` ({@link recordDelivery}, tested as is).
|
|
656
|
+
record: (runId, record) => recordDelivery(audit, deliveryIndex, DAEMON_ACTOR, runId, record),
|
|
657
|
+
// CS11 (DES-CATALOG-002 rev 8): record the delivered HEAD SHA from now on, over the registered
|
|
658
|
+
// repo root (the same `listRepos()` resolver this file uses for repo roots) + the engine's
|
|
659
|
+
// `run_branch` (else `wicked/<id>`). The body lives in `delivery-index.ts` ({@link
|
|
660
|
+
// deliveredCommitFor}) so tests exercise the production code, not a copy (cs11-b review
|
|
661
|
+
// P1/P2): it records NO commit when a later phase ran after the deliver unit (the pushed tip
|
|
662
|
+
// may have moved) and when the SHA cannot be read — the join then keeps the run (fail-closed).
|
|
663
|
+
deliveredCommit: (view) => deliveredCommitFor(view, async (repoRef) => (await adapter.listRepos()).find((r) => r.id === repoRef)?.root_path),
|
|
630
664
|
log: (m) => app.log.warn(m),
|
|
631
665
|
});
|
|
632
666
|
const resolveRunDelivery = (runId) => deliveryResolver.resolve(runId);
|
|
@@ -705,6 +739,15 @@ export async function createServer(adapter, options) {
|
|
|
705
739
|
// DES-CHAT-ARTIFACTS-001 §5.2 (A3): the durable binding of every chat-made document, under the registered `chats`
|
|
706
740
|
// state-home entry (core's fence refuses a new top-level entry, and no worker reads the state home).
|
|
707
741
|
const docBindings = new DocBindingStore(join(crewStateDir, 'chats', 'doc-bindings'));
|
|
742
|
+
// A6 / PLAN G12: per run, what crew checked on the file it announced (floor, page count, the writer's notes), under the
|
|
743
|
+
// same registered `chats` entry; the checks read serves it by the version interactive records each run on.
|
|
744
|
+
const docLandings = new LandingRecordStore(join(crewStateDir, 'chats', 'doc-landings'));
|
|
745
|
+
// G12: the floor prints the document with the operator's own renderer, else crew's provisioned Chromium when made.
|
|
746
|
+
const floorChrome = () => (process.env['WICKED_CHROME'] ?? '').trim() || managedChromium(conformanceRuntimeRoot());
|
|
747
|
+
// G12: the run's own engine `draft_render` record (its latest unit of that step, read fresh: the floor runs as the run
|
|
748
|
+
// ends), which the floor reuses when it measured these exact bytes with the floor's own print profile.
|
|
749
|
+
const floorEngineRender = async (runId) => latestDraftRender((await adapter.runView(runId, { fresh: true }))?.units);
|
|
750
|
+
const draftFloorIo = { chrome: floorChrome, engineRender: floorEngineRender };
|
|
708
751
|
/**
|
|
709
752
|
* A3 (§6.2): a proposal-bound attempt's outcome was recorded. A failure is said on the run (`run.landing_failed`, the
|
|
710
753
|
* DTO's `landing_failed` and a `landingFailed` frame), releases the chat and the document (their busy checks read the
|
|
@@ -724,14 +767,16 @@ export async function createServer(adapter, options) {
|
|
|
724
767
|
broadcast({ type: 'landingFailed', session: runId, artifact_ref: ref, reason: outcome.reason });
|
|
725
768
|
if (hit === null || chatProposals === null)
|
|
726
769
|
return;
|
|
727
|
-
|
|
770
|
+
// A5: a refine's retry card goes to the chat the refine was accepted in.
|
|
771
|
+
const chatOf = hit.attempt.chatId !== undefined ? { chatId: hit.attempt.chatId, chatInstance: hit.attempt.chatInstance ?? null } : hit.binding;
|
|
772
|
+
const chatNow = chatHistory.idOfInstance(chatOf.chatId, chatOf.chatInstance);
|
|
728
773
|
if (chatNow === null) {
|
|
729
774
|
app.log.warn(`[proposals] run ${runId} failed, and the chat it was made from is gone — no retry card`);
|
|
730
775
|
docBindings.markPublished(ref, runId);
|
|
731
776
|
return;
|
|
732
777
|
}
|
|
733
778
|
void chatProposals
|
|
734
|
-
.appendRetry(chatNow, hit.attempt.pid, runId, ref, outcome.reason,
|
|
779
|
+
.appendRetry(chatNow, hit.attempt.pid, runId, ref, outcome.reason, chatOf.chatInstance)
|
|
735
780
|
.then((pid) => {
|
|
736
781
|
if (pid !== null)
|
|
737
782
|
docBindings.setRetry(ref, runId, pid);
|
|
@@ -1119,6 +1164,16 @@ export async function createServer(adapter, options) {
|
|
|
1119
1164
|
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
1165
|
}
|
|
1121
1166
|
}
|
|
1167
|
+
// DES-CATALOG-002 §2.3: the hidden detect-shape turn (POST /workflows/catalog/detect). Without it, detection answers
|
|
1168
|
+
// from the words layer alone, never sure.
|
|
1169
|
+
if (typeof adapter.registerWorkflow === 'function') {
|
|
1170
|
+
try {
|
|
1171
|
+
await adapter.registerWorkflow(loadDetectWorkflow());
|
|
1172
|
+
}
|
|
1173
|
+
catch (err) {
|
|
1174
|
+
app.log.warn(`[detect] could not register the '${DETECT_WORKFLOW}' workflow — detection answers from the words alone: ${err instanceof Error ? err.message : String(err)}`);
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1122
1177
|
// A check a restart interrupted is stopped and answered now, so it never runs on unwatched past its bound.
|
|
1123
1178
|
void unitInspect.recover();
|
|
1124
1179
|
registerInspectRoutes(app, { service: unitInspect, audit });
|
|
@@ -1194,7 +1249,25 @@ export async function createServer(adapter, options) {
|
|
|
1194
1249
|
},
|
|
1195
1250
|
audit,
|
|
1196
1251
|
});
|
|
1197
|
-
registerInsightsRoutes(app, {
|
|
1252
|
+
registerInsightsRoutes(app, {
|
|
1253
|
+
store: insightsStore,
|
|
1254
|
+
service: reviewService,
|
|
1255
|
+
audit,
|
|
1256
|
+
// (DES-CATALOG-002 CS6) `POST /insights/facts`: the engine resolves the unit's token; crew reads which step it is.
|
|
1257
|
+
...(CoreAdapter.estateScopeResolver() !== null
|
|
1258
|
+
? {
|
|
1259
|
+
facts: {
|
|
1260
|
+
unitOf: factsUnitResolver((req) => {
|
|
1261
|
+
const resolve = CoreAdapter.estateScopeResolver();
|
|
1262
|
+
if (resolve === null)
|
|
1263
|
+
return Promise.reject(new Error('no resolver'));
|
|
1264
|
+
return resolve(req);
|
|
1265
|
+
}, () => adapter.sessionsDetail()),
|
|
1266
|
+
collect: (opts, nowMs) => reviewService.collect(opts, nowMs),
|
|
1267
|
+
},
|
|
1268
|
+
}
|
|
1269
|
+
: {}),
|
|
1270
|
+
});
|
|
1198
1271
|
if (options?.workflowSchedules?.enabled ?? !(process.env['VITEST'] !== undefined || process.env['NODE_ENV'] === 'test')) {
|
|
1199
1272
|
// Seeded (and so written to the state home) only by a daemon that runs the tick: a headless boot (the
|
|
1200
1273
|
// endpoint-manifest collector, a test) never plants a schedule file in whatever state home it resolves.
|
|
@@ -1283,6 +1356,8 @@ export async function createServer(adapter, options) {
|
|
|
1283
1356
|
bindings: docBindings,
|
|
1284
1357
|
onBoundDocCreated: (ref) => onBoundDocCreated(ref),
|
|
1285
1358
|
onBoundOutcome,
|
|
1359
|
+
landings: docLandings,
|
|
1360
|
+
draftFloorIo,
|
|
1286
1361
|
resolveDocsRoot: o.resolveDocsRoot ?? interactiveDocsRoot,
|
|
1287
1362
|
log: (m) => app.log.warn(m),
|
|
1288
1363
|
logError: (m) => app.log.error(m),
|
|
@@ -1424,6 +1499,12 @@ export async function createServer(adapter, options) {
|
|
|
1424
1499
|
isDocBusy: (documentId) => (draftSub?.inFlightDocs().includes(documentId) ?? false) ||
|
|
1425
1500
|
(editSub?.inFlightDocs().includes(documentId) ?? false),
|
|
1426
1501
|
onRunFiled: fileRun,
|
|
1502
|
+
// DES-CHAT-ARTIFACTS-001 §6 (A5): a proposal-bound refine's attempt, launch record, landing record and outcome.
|
|
1503
|
+
bindings: docBindings,
|
|
1504
|
+
onBoundOutcome,
|
|
1505
|
+
onRunLaunched: (runId, detail) => { recordRunLaunched(audit, runTimingIndex, DAEMON_ACTOR, runId, detail); },
|
|
1506
|
+
landings: docLandings,
|
|
1507
|
+
draftFloorIo,
|
|
1427
1508
|
log: (m) => app.log.warn(m),
|
|
1428
1509
|
logError: (m) => app.log.error(m),
|
|
1429
1510
|
});
|
|
@@ -1693,6 +1774,7 @@ export async function createServer(adapter, options) {
|
|
|
1693
1774
|
elicitationCache.ingest(event);
|
|
1694
1775
|
askServer.ingest(event);
|
|
1695
1776
|
seatHealth.ingest(event);
|
|
1777
|
+
skillUsage?.ingest(event);
|
|
1696
1778
|
// ASK-C2: a path run's unit + terminal frames become the chat's frames (re-entering this fold
|
|
1697
1779
|
// as chatDelta / chatReply, which the relay ignores — no recursion).
|
|
1698
1780
|
if (typeof event.session === 'string')
|
|
@@ -2047,6 +2129,12 @@ export async function createServer(adapter, options) {
|
|
|
2047
2129
|
// diagnostics reads the bundle's shipped version manifest from the same root the static
|
|
2048
2130
|
// handler serves. One resolution, two consumers.
|
|
2049
2131
|
const studioRoot = options?.studioRoot ?? defaultStudioRoot();
|
|
2132
|
+
// (DES-EDITOR-CONFORMANCE-HOST, e2e F18) The engine runs an editor-plugin run's conformance cases on this host: it
|
|
2133
|
+
// reads crew's conformance runtime and this studio dist from the daemon's environment.
|
|
2134
|
+
exportEngineConformanceEnv(studioRoot);
|
|
2135
|
+
// (PLAN G12) And the managed headless shell as the daemon's `WICKED_CHROME`, for the engine's `draft_render` step (an
|
|
2136
|
+
// operator's own value wins); the provisioner exports it again whenever it makes or finds the runtime.
|
|
2137
|
+
exportManagedChrome(conformanceRuntimeRoot());
|
|
2050
2138
|
// DES-MCP-TOOLS-001 S2: the registry over `<state home>/mcp` (created on the first save).
|
|
2051
2139
|
const mcpRegistryStore = new McpRegistryStore();
|
|
2052
2140
|
const mcpSecrets = platformSecretStore();
|
|
@@ -2133,8 +2221,24 @@ export async function createServer(adapter, options) {
|
|
|
2133
2221
|
const unitVisible = (scope) => projectVisible(scope.projectId, scope.repoId);
|
|
2134
2222
|
// 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
2223
|
const appsKnowledgeVisible = (projectId) => projectVisible(projectId);
|
|
2224
|
+
// (DES-CATALOG-002 CS4/CS10) Each run's source pick: recorded at launch (POST /runs), read by the broker, the unit's
|
|
2225
|
+
// tool list and the estate relay, so a unit never reaches a registered source its job did not pick.
|
|
2226
|
+
const runSourcePicks = new RunSourcePicks(join(crewStateHome(), 'mcp', 'run-source-picks.json'));
|
|
2227
|
+
/** Every registered source and PM tracker id with its owning source's name: how the relay maps `source:<id>` to a pick. */
|
|
2228
|
+
const sourceOwnerNames = async () => {
|
|
2229
|
+
const out = (await dataGate.sources()).map((s) => ({ id: s.id, name: s.name }));
|
|
2230
|
+
for (const e of await dataGate.pm.entries()) {
|
|
2231
|
+
out.push({ id: e.id, name: e.name });
|
|
2232
|
+
for (const t of e.trackers)
|
|
2233
|
+
out.push({ id: t.id, name: e.name });
|
|
2234
|
+
}
|
|
2235
|
+
return out;
|
|
2236
|
+
};
|
|
2136
2237
|
const mcpBroker = new McpBroker({
|
|
2238
|
+
picks: runSourcePicks,
|
|
2137
2239
|
registry: mcpRegistry,
|
|
2240
|
+
// DES-CATALOG-002 §2.3: a `detect-shape` run reaches nothing (its fence is its identity).
|
|
2241
|
+
fence: daemonRunFence((runId) => adapter.launchedWorkflowOfRun(runId)),
|
|
2138
2242
|
engine: options?.mcpEngineGate ?? (() => CoreAdapter.mcpEngineGate()),
|
|
2139
2243
|
records: mcpCallRecords,
|
|
2140
2244
|
budgetPerUnit: budgetFromEnv(),
|
|
@@ -2145,6 +2249,8 @@ export async function createServer(adapter, options) {
|
|
|
2145
2249
|
estate: new EstateRelay({
|
|
2146
2250
|
resolver: () => CoreAdapter.estateScopeResolver(),
|
|
2147
2251
|
visible: unitVisible,
|
|
2252
|
+
picks: runSourcePicks,
|
|
2253
|
+
sourceNames: sourceOwnerNames,
|
|
2148
2254
|
onProposal: (p) => audit.record('estate.proposal.submitted', { id: `seat:${p.seat}`, kind: 'agent', trust: 'observer' }, {
|
|
2149
2255
|
runId: p.runId,
|
|
2150
2256
|
detail: { unit: p.ord, attempt: p.attempt, seat: p.seat, proposalId: p.proposalId, kindType: p.kindType, callId: p.callId },
|
|
@@ -2281,10 +2387,15 @@ export async function createServer(adapter, options) {
|
|
|
2281
2387
|
docGrounding,
|
|
2282
2388
|
// DES-CHAT-ARTIFACTS-001 §5.2 (A3): chat-made documents; `create` is real only when the draft seam is armed.
|
|
2283
2389
|
docBindings,
|
|
2390
|
+
docLandings,
|
|
2284
2391
|
...(draftSub !== null ? { launchBoundDraft: draftSub.launchBound, fenceBoundDraft: draftSub.fenceBound } : {}),
|
|
2392
|
+
// A5: a refine is real only when the chat seam is armed AND the draft seam is (its landing watch settles every
|
|
2393
|
+
// proposal-bound attempt on `version.created` / `draft.conflict`; codex A5 r1).
|
|
2394
|
+
...(chatSub !== null && draftSub !== null ? { launchBoundRefine: chatSub.launchBound } : {}),
|
|
2285
2395
|
// crew#899: a chat's checkouts are brought to their upstream (when clean) before it reads them.
|
|
2286
2396
|
freshenCheckout: (root) => freshenCheckout(root),
|
|
2287
2397
|
...(skillsRuntime !== undefined ? { skills: skillsRuntime } : {}),
|
|
2398
|
+
...(skillUsage !== undefined ? { skillUsage } : {}),
|
|
2288
2399
|
// DES-MCP-TOOLS-001 S2: the registry over `<state home>/mcp` (created on the first save).
|
|
2289
2400
|
// Route tests drive `registerMcpRoutes` over their own registry (tests/mcp-registry.test.ts).
|
|
2290
2401
|
mcp: mcpRegistry,
|
|
@@ -2306,6 +2417,10 @@ export async function createServer(adapter, options) {
|
|
|
2306
2417
|
mcpBroker,
|
|
2307
2418
|
// DES-KNOWLEDGE-DATA-001 §7: the data gate, its registry store and its read record.
|
|
2308
2419
|
dataGate,
|
|
2420
|
+
// (DES-CATALOG-002 CS4) Each run's source pick, in the registered `mcp` entry (CS10's fence reads it), and the
|
|
2421
|
+
// folder a run's documents are staged in, outside the state home.
|
|
2422
|
+
runSourcePicks,
|
|
2423
|
+
runDocumentsRoot: runDocumentsRootDir(),
|
|
2309
2424
|
mcpRegistryStore,
|
|
2310
2425
|
sourceReads,
|
|
2311
2426
|
trackerProjector,
|
|
@@ -2433,12 +2548,38 @@ export async function createServer(adapter, options) {
|
|
|
2433
2548
|
// Program DES-POWER-MODE §8.3/§9 (spike 3): the run's working document — a wicked-interactive document of kind
|
|
2434
2549
|
// `phase-report` — and the steering notes a person's edits of it become. Steering rides the engine's operator
|
|
2435
2550
|
// inject only; nothing here answers a gate.
|
|
2551
|
+
const workingDocNotes = new PersonNotesIndex();
|
|
2552
|
+
// The working documents read the run views (the engine's whole-store fold) at most once per 2 s between them: the
|
|
2553
|
+
// catch-up and a burst of syncs share one read instead of one each (crew#944: run reads must stay fast).
|
|
2554
|
+
let workingDocViewsRead = null;
|
|
2555
|
+
const workingDocViews = () => {
|
|
2556
|
+
if (workingDocViewsRead === null || Date.now() - workingDocViewsRead.at > 2_000) {
|
|
2557
|
+
const views = adapter.sessionsDetail();
|
|
2558
|
+
workingDocViewsRead = { at: Date.now(), views };
|
|
2559
|
+
views.catch(() => { if (workingDocViewsRead?.views === views)
|
|
2560
|
+
workingDocViewsRead = null; });
|
|
2561
|
+
}
|
|
2562
|
+
return workingDocViewsRead.views;
|
|
2563
|
+
};
|
|
2564
|
+
/** How long after start the working documents' catch-up begins (`WICKED_WORKING_DOC_CATCHUP_MS`, default 10 s). */
|
|
2565
|
+
const catchUpEnv = Number(process.env['WICKED_WORKING_DOC_CATCHUP_MS']);
|
|
2566
|
+
const WORKING_DOC_CATCH_UP_DELAY_MS = process.env['WICKED_WORKING_DOC_CATCHUP_MS'] !== undefined && Number.isFinite(catchUpEnv) && catchUpEnv >= 0 ? catchUpEnv : 10_000;
|
|
2567
|
+
// The start-up read of the trail for the person's answers; every document sync waits for it (never rejects).
|
|
2568
|
+
const workingDocNotesRead = audit.readAll().then((entries) => workingDocNotes.hydrate(entries), (err) => {
|
|
2569
|
+
app.log.warn(`[working-doc] the trail could not be read for the person's answers: ${String(err)}`);
|
|
2570
|
+
return workingDocNotes.hydrate([]);
|
|
2571
|
+
});
|
|
2436
2572
|
const workingDocs = new WorkingDocService({
|
|
2437
2573
|
store: new WorkingDocStore({ log: (m) => app.log.warn(m) }),
|
|
2438
2574
|
backend: bridgeBackend(interactiveBridges, (projectId) => workingDocRoot(adapter, projectSettings, projectId)),
|
|
2439
|
-
engine: {
|
|
2575
|
+
engine: {
|
|
2576
|
+
injectWorkerMessage: (runId, message, target) => adapter.injectWorkerMessage(runId, message, target),
|
|
2577
|
+
supportsRunContext: () => typeof adapter.supportsRunContext === 'function' && adapter.supportsRunContext(),
|
|
2578
|
+
// (context-doc-switch) The person's Goal, Approach and Constraints as the engine's context block.
|
|
2579
|
+
setRunContext: (runId, ctx) => adapter.setRunContext(runId, ctx),
|
|
2580
|
+
},
|
|
2440
2581
|
run: async (runId) => {
|
|
2441
|
-
const v = (await
|
|
2582
|
+
const v = (await workingDocViews()).find((x) => x.session.id === runId);
|
|
2442
2583
|
if (v === undefined)
|
|
2443
2584
|
return null;
|
|
2444
2585
|
return {
|
|
@@ -2446,12 +2587,19 @@ export async function createServer(adapter, options) {
|
|
|
2446
2587
|
problem: v.session.problem ?? '',
|
|
2447
2588
|
projectId: runProject(v, runId, (id) => membershipIndex.projectOf(id)) ?? WORKING_DOC_DEFAULT_PROJECT,
|
|
2448
2589
|
terminal: ['completed', 'cancelled', 'failed'].includes(v.session.status),
|
|
2449
|
-
stepOf: (ord) =>
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
},
|
|
2590
|
+
stepOf: (ord) => workingDocStep(v.units.find((x) => x.ord === ord)),
|
|
2591
|
+
power: v.session.power != null,
|
|
2592
|
+
// The run's current plan (the engine's unit list): what a phased run's Approach says once its plan settles.
|
|
2593
|
+
steps: v.units.map((u) => ({ ord: u.ord, name: workingDocStep(u), seat: u.assigned_cli ?? null })),
|
|
2453
2594
|
};
|
|
2454
2595
|
},
|
|
2596
|
+
// A person's answers with their words (crew's own trail: the engine's log does not say who, or why), from memory,
|
|
2597
|
+
// once the start-up read of the trail is in (so a line never lands ahead of an older one).
|
|
2598
|
+
notes: async (runId) => { await workingDocNotesRead; return workingDocNotes.of(runId); },
|
|
2599
|
+
// The launch time is crew's (the run-timing index, from `run.launched`); a run with none sorts oldest.
|
|
2600
|
+
liveRuns: async () => (await workingDocViews())
|
|
2601
|
+
.filter((v) => !['completed', 'cancelled', 'failed'].includes(v.session.status) && v.session.archived_at == null)
|
|
2602
|
+
.map((v) => ({ runId: v.session.id, createdAt: runTimingIndex.createdAtFor(v.session.id) ?? 0 })),
|
|
2455
2603
|
changed: (runId, head) => broadcast({ type: 'workingDocChanged', session: runId, head }),
|
|
2456
2604
|
audit: (action, actor, runId, detail) => audit.record(action, actor, { runId, detail }),
|
|
2457
2605
|
// The run's own log: crew writes the event-derived lines (Decisions, Open questions, Next) whether or not a tab
|
|
@@ -2460,8 +2608,28 @@ export async function createServer(adapter, options) {
|
|
|
2460
2608
|
log: (m) => app.log.warn(m),
|
|
2461
2609
|
});
|
|
2462
2610
|
workingDocTap = (e) => workingDocs.onEvent(e);
|
|
2463
|
-
//
|
|
2464
|
-
|
|
2611
|
+
// (context-doc-switch) The engine's context blocks are set at once (one cheap call per live document, serial), not
|
|
2612
|
+
// after the slower line catch-up below: a seat spawned meanwhile would miss a block the engine does not hold yet.
|
|
2613
|
+
void workingDocs.contextCatchUp();
|
|
2614
|
+
// A person's answer recorded in the trail (a gate note, a skip reason, guidance) brings the run's document up to date:
|
|
2615
|
+
// some come with no engine event at all (guidance), and a gate's is recorded after the engine's answer.
|
|
2616
|
+
audit.onRecord((entry) => { const runId = workingDocNotes.add(entry); if (runId !== null)
|
|
2617
|
+
workingDocs.nudge(runId); });
|
|
2618
|
+
// After a restart no further event may come for a run: once the person's answers are read from the trail, bring every
|
|
2619
|
+
// held document up to date and make the newest live runs' documents (bounded, one at a time; never rejects). Answers
|
|
2620
|
+
// recorded while the trail was read bring their run's document up to date too.
|
|
2621
|
+
// It starts a little after the daemon is up (a boot is busy enough), and never after it has closed.
|
|
2622
|
+
let workingDocCatchUp = setTimeout(() => {
|
|
2623
|
+
workingDocCatchUp = null;
|
|
2624
|
+
void workingDocNotesRead.then(async (touched) => {
|
|
2625
|
+
for (const runId of touched)
|
|
2626
|
+
workingDocs.nudge(runId);
|
|
2627
|
+
await workingDocs.catchUp();
|
|
2628
|
+
});
|
|
2629
|
+
}, WORKING_DOC_CATCH_UP_DELAY_MS);
|
|
2630
|
+
workingDocCatchUp.unref?.();
|
|
2631
|
+
app.addHook('onClose', async () => { if (workingDocCatchUp !== null)
|
|
2632
|
+
clearTimeout(workingDocCatchUp); });
|
|
2465
2633
|
registerWorkingDocRoutes(app, { service: workingDocs, exists: async (id) => (await adapter.sessions()).includes(id) });
|
|
2466
2634
|
registerStandingOrderRoutes(app, {
|
|
2467
2635
|
store: standingOrders,
|
|
@@ -2607,4 +2775,17 @@ export async function startServer(adapter, port = 7701, host = '127.0.0.1', opti
|
|
|
2607
2775
|
process.env['WICKED_CREW_URL'] = brokerUrlFor(boundHost, boundPort);
|
|
2608
2776
|
return { app, port: boundPort, host: boundHost, stages: clock.snapshot() };
|
|
2609
2777
|
}
|
|
2778
|
+
/**
|
|
2779
|
+
* (DES-CATALOG-002 CS4) Where a run's documents are staged: `WICKED_RUN_DOCS_DIR` when set; for the default state home
|
|
2780
|
+
* `~/.wicked/run-documents`; for any other `<state home>-run-documents`. Never inside the state home: core's Read fence
|
|
2781
|
+
* denies every state-home entry to workers, and an unregistered entry there refuses every launch (the demo-root rule,
|
|
2782
|
+
* `api/recording.ts` `demoRootDir`).
|
|
2783
|
+
*/
|
|
2784
|
+
export function runDocumentsRootDir() {
|
|
2785
|
+
if (process.env.WICKED_RUN_DOCS_DIR)
|
|
2786
|
+
return process.env.WICKED_RUN_DOCS_DIR;
|
|
2787
|
+
if (isDefaultStateHome())
|
|
2788
|
+
return join(process.env.HOME ?? process.env.USERPROFILE ?? '/tmp', '.wicked', 'run-documents');
|
|
2789
|
+
return `${crewStateHome()}-run-documents`;
|
|
2790
|
+
}
|
|
2610
2791
|
//# sourceMappingURL=server.js.map
|