wicked-crew 0.18.20 → 0.18.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/audit.d.ts +28 -1
- package/dist/api/audit.d.ts.map +1 -1
- package/dist/api/audit.js +90 -9
- package/dist/api/audit.js.map +1 -1
- package/dist/api/auth.d.ts +7 -0
- package/dist/api/auth.d.ts.map +1 -1
- package/dist/api/auth.js +53 -10
- package/dist/api/auth.js.map +1 -1
- package/dist/api/capture.d.ts +16 -4
- package/dist/api/capture.d.ts.map +1 -1
- package/dist/api/capture.js +20 -12
- package/dist/api/capture.js.map +1 -1
- package/dist/api/chat-context.d.ts +17 -0
- package/dist/api/chat-context.d.ts.map +1 -1
- package/dist/api/chat-context.js +94 -5
- package/dist/api/chat-context.js.map +1 -1
- package/dist/api/chat-freshness.js +2 -2
- package/dist/api/chat-freshness.js.map +1 -1
- package/dist/api/chat-jobs.d.ts +54 -0
- package/dist/api/chat-jobs.d.ts.map +1 -1
- package/dist/api/chat-jobs.js +199 -7
- package/dist/api/chat-jobs.js.map +1 -1
- package/dist/api/chat-proposals.d.ts +62 -12
- package/dist/api/chat-proposals.d.ts.map +1 -1
- package/dist/api/chat-proposals.js +257 -52
- package/dist/api/chat-proposals.js.map +1 -1
- package/dist/api/chat-requirements.d.ts.map +1 -1
- package/dist/api/chat-requirements.js +4 -1
- package/dist/api/chat-requirements.js.map +1 -1
- package/dist/api/chat-scope.d.ts +12 -0
- package/dist/api/chat-scope.d.ts.map +1 -1
- package/dist/api/chat-scope.js +35 -5
- package/dist/api/chat-scope.js.map +1 -1
- package/dist/api/cluster-status.d.ts +41 -12
- package/dist/api/cluster-status.d.ts.map +1 -1
- package/dist/api/cluster-status.js +148 -3
- package/dist/api/cluster-status.js.map +1 -1
- package/dist/api/codebase-archive.js +2 -2
- package/dist/api/codebase-archive.js.map +1 -1
- package/dist/api/compose-facts.d.ts +35 -0
- package/dist/api/compose-facts.d.ts.map +1 -0
- package/dist/api/compose-facts.js +46 -0
- package/dist/api/compose-facts.js.map +1 -0
- package/dist/api/cut-read.d.ts +62 -0
- package/dist/api/cut-read.d.ts.map +1 -0
- package/dist/api/cut-read.js +101 -0
- package/dist/api/cut-read.js.map +1 -0
- package/dist/api/delivery-cache.d.ts +2 -0
- package/dist/api/delivery-cache.d.ts.map +1 -1
- package/dist/api/delivery-cache.js +1 -2
- package/dist/api/delivery-cache.js.map +1 -1
- package/dist/api/delivery-index.d.ts +2 -2
- package/dist/api/delivery-index.d.ts.map +1 -1
- package/dist/api/delivery-index.js +1 -2
- package/dist/api/delivery-index.js.map +1 -1
- package/dist/api/desk-snoozes.d.ts +54 -0
- package/dist/api/desk-snoozes.d.ts.map +1 -0
- package/dist/api/desk-snoozes.js +174 -0
- package/dist/api/desk-snoozes.js.map +1 -0
- package/dist/api/diagnostics.d.ts +4 -0
- package/dist/api/diagnostics.d.ts.map +1 -1
- package/dist/api/diagnostics.js +15 -7
- package/dist/api/diagnostics.js.map +1 -1
- package/dist/api/disk-stores.d.ts +66 -0
- package/dist/api/disk-stores.d.ts.map +1 -0
- package/dist/api/disk-stores.js +206 -0
- package/dist/api/disk-stores.js.map +1 -0
- package/dist/api/eval-compare.d.ts +1 -1
- package/dist/api/eval-compare.js +1 -1
- package/dist/api/eval-sample.d.ts +7 -0
- package/dist/api/eval-sample.d.ts.map +1 -1
- package/dist/api/eval-sample.js +20 -0
- package/dist/api/eval-sample.js.map +1 -1
- package/dist/api/gate-cache.d.ts +8 -0
- package/dist/api/gate-cache.d.ts.map +1 -1
- package/dist/api/gate-cache.js +8 -1
- package/dist/api/gate-cache.js.map +1 -1
- package/dist/api/governance-steering.d.ts +13 -0
- package/dist/api/governance-steering.d.ts.map +1 -1
- package/dist/api/governance-steering.js +56 -7
- package/dist/api/governance-steering.js.map +1 -1
- package/dist/api/mcp.d.ts +19 -1
- package/dist/api/mcp.d.ts.map +1 -1
- package/dist/api/mcp.js +123 -3
- package/dist/api/mcp.js.map +1 -1
- package/dist/api/needs.d.ts +23 -0
- package/dist/api/needs.d.ts.map +1 -1
- package/dist/api/needs.js +124 -19
- package/dist/api/needs.js.map +1 -1
- package/dist/api/onboarding-capture.d.ts +21 -1
- package/dist/api/onboarding-capture.d.ts.map +1 -1
- package/dist/api/onboarding-capture.js +112 -8
- package/dist/api/onboarding-capture.js.map +1 -1
- package/dist/api/policy-landing.d.ts +36 -0
- package/dist/api/policy-landing.d.ts.map +1 -1
- package/dist/api/policy-landing.js +123 -4
- package/dist/api/policy-landing.js.map +1 -1
- package/dist/api/post-hoc-deliver.d.ts +7 -0
- package/dist/api/post-hoc-deliver.d.ts.map +1 -1
- package/dist/api/post-hoc-deliver.js +17 -5
- package/dist/api/post-hoc-deliver.js.map +1 -1
- package/dist/api/product-publish.d.ts +242 -0
- package/dist/api/product-publish.d.ts.map +1 -0
- package/dist/api/product-publish.js +902 -0
- package/dist/api/product-publish.js.map +1 -0
- package/dist/api/product.d.ts +5 -6
- package/dist/api/product.d.ts.map +1 -1
- package/dist/api/product.js +4 -4
- package/dist/api/product.js.map +1 -1
- package/dist/api/proposal-cut.d.ts +95 -0
- package/dist/api/proposal-cut.d.ts.map +1 -0
- package/dist/api/proposal-cut.js +231 -0
- package/dist/api/proposal-cut.js.map +1 -0
- package/dist/api/proposal-decisions.d.ts +44 -0
- package/dist/api/proposal-decisions.d.ts.map +1 -0
- package/dist/api/proposal-decisions.js +85 -0
- package/dist/api/proposal-decisions.js.map +1 -0
- package/dist/api/proposal-onboard.d.ts +29 -0
- package/dist/api/proposal-onboard.d.ts.map +1 -1
- package/dist/api/proposal-onboard.js +162 -11
- package/dist/api/proposal-onboard.js.map +1 -1
- package/dist/api/recording.d.ts.map +1 -1
- package/dist/api/recording.js +4 -5
- package/dist/api/recording.js.map +1 -1
- package/dist/api/redeliver.d.ts.map +1 -1
- package/dist/api/redeliver.js +11 -7
- package/dist/api/redeliver.js.map +1 -1
- package/dist/api/repo-input.d.ts.map +1 -1
- package/dist/api/repo-input.js +5 -2
- package/dist/api/repo-input.js.map +1 -1
- package/dist/api/repo-origins.d.ts +24 -0
- package/dist/api/repo-origins.d.ts.map +1 -0
- package/dist/api/repo-origins.js +71 -0
- package/dist/api/repo-origins.js.map +1 -0
- package/dist/api/requirements.d.ts +39 -4
- package/dist/api/requirements.d.ts.map +1 -1
- package/dist/api/requirements.js +76 -5
- package/dist/api/requirements.js.map +1 -1
- package/dist/api/review-change.d.ts +5 -6
- package/dist/api/review-change.d.ts.map +1 -1
- package/dist/api/review-change.js +45 -8
- package/dist/api/review-change.js.map +1 -1
- package/dist/api/routes.d.ts +48 -4
- package/dist/api/routes.d.ts.map +1 -1
- package/dist/api/routes.js +926 -268
- package/dist/api/routes.js.map +1 -1
- package/dist/api/run-liveness.d.ts.map +1 -1
- package/dist/api/run-liveness.js +3 -1
- package/dist/api/run-liveness.js.map +1 -1
- package/dist/api/run-sources.d.ts +11 -1
- package/dist/api/run-sources.d.ts.map +1 -1
- package/dist/api/run-sources.js +26 -3
- package/dist/api/run-sources.js.map +1 -1
- package/dist/api/run-timing-index.d.ts +56 -1
- package/dist/api/run-timing-index.d.ts.map +1 -1
- package/dist/api/run-timing-index.js +164 -10
- package/dist/api/run-timing-index.js.map +1 -1
- package/dist/api/runtime-state.d.ts +6 -0
- package/dist/api/runtime-state.d.ts.map +1 -1
- package/dist/api/runtime-state.js +14 -3
- package/dist/api/runtime-state.js.map +1 -1
- package/dist/api/seat-agents.d.ts.map +1 -1
- package/dist/api/seat-agents.js +3 -3
- package/dist/api/seat-agents.js.map +1 -1
- package/dist/api/seat-container-login.d.ts +17 -19
- package/dist/api/seat-container-login.d.ts.map +1 -1
- package/dist/api/seat-container-login.js +51 -76
- package/dist/api/seat-container-login.js.map +1 -1
- package/dist/api/seat-governance.d.ts +3 -2
- package/dist/api/seat-governance.d.ts.map +1 -1
- package/dist/api/seat-governance.js +31 -9
- package/dist/api/seat-governance.js.map +1 -1
- package/dist/api/seat-standing.d.ts +8 -0
- package/dist/api/seat-standing.d.ts.map +1 -1
- package/dist/api/seat-standing.js +26 -1
- package/dist/api/seat-standing.js.map +1 -1
- package/dist/api/server.d.ts +7 -0
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +93 -39
- package/dist/api/server.js.map +1 -1
- package/dist/api/start-on-login.d.ts +4 -0
- package/dist/api/start-on-login.d.ts.map +1 -0
- package/dist/api/start-on-login.js +35 -0
- package/dist/api/start-on-login.js.map +1 -0
- package/dist/api/steering-landing.d.ts +33 -8
- package/dist/api/steering-landing.d.ts.map +1 -1
- package/dist/api/steering-landing.js +235 -51
- package/dist/api/steering-landing.js.map +1 -1
- package/dist/api/system-snapshot.d.ts +2 -1
- package/dist/api/system-snapshot.d.ts.map +1 -1
- package/dist/api/system-snapshot.js +22 -9
- package/dist/api/system-snapshot.js.map +1 -1
- package/dist/api/ui-text.d.ts.map +1 -1
- package/dist/api/ui-text.js +3 -1
- package/dist/api/ui-text.js.map +1 -1
- package/dist/api/worktree-sweep.d.ts +7 -3
- package/dist/api/worktree-sweep.d.ts.map +1 -1
- package/dist/api/worktree-sweep.js +10 -6
- package/dist/api/worktree-sweep.js.map +1 -1
- package/dist/apps/exec/recall.d.ts.map +1 -1
- package/dist/apps/exec/recall.js +4 -4
- package/dist/apps/exec/recall.js.map +1 -1
- package/dist/apps/git.js +2 -2
- package/dist/apps/git.js.map +1 -1
- package/dist/apps/publish/manifest.d.ts +2 -0
- package/dist/apps/publish/manifest.d.ts.map +1 -1
- package/dist/apps/publish/manifest.js +8 -3
- package/dist/apps/publish/manifest.js.map +1 -1
- package/dist/apps/publish/run.d.ts +11 -1
- package/dist/apps/publish/run.d.ts.map +1 -1
- package/dist/apps/publish/run.js +97 -17
- package/dist/apps/publish/run.js.map +1 -1
- package/dist/apps/routes.d.ts +2 -0
- package/dist/apps/routes.d.ts.map +1 -1
- package/dist/apps/routes.js +45 -2
- package/dist/apps/routes.js.map +1 -1
- package/dist/apps/store.d.ts +35 -3
- package/dist/apps/store.d.ts.map +1 -1
- package/dist/apps/store.js +73 -9
- package/dist/apps/store.js.map +1 -1
- package/dist/apps/turns.d.ts +25 -2
- package/dist/apps/turns.d.ts.map +1 -1
- package/dist/apps/turns.js +276 -11
- package/dist/apps/turns.js.map +1 -1
- package/dist/apps-server/runners/sqlite-runner.mjs +39 -1
- package/dist/apps-server/server/lib/bundle/server.mjs +124 -14
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +27 -52
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/start-stand-ins.d.ts +13 -0
- package/dist/cli/start-stand-ins.d.ts.map +1 -0
- package/dist/cli/start-stand-ins.js +30 -0
- package/dist/cli/start-stand-ins.js.map +1 -0
- package/dist/core/adapter.d.ts +66 -14
- package/dist/core/adapter.d.ts.map +1 -1
- package/dist/core/adapter.js +228 -56
- package/dist/core/adapter.js.map +1 -1
- package/dist/core/ado-deliver-helper.d.ts +2 -1
- package/dist/core/ado-deliver-helper.d.ts.map +1 -1
- package/dist/core/ado-deliver-helper.js +26 -1
- package/dist/core/ado-deliver-helper.js.map +1 -1
- package/dist/core/ado-env.d.ts +17 -0
- package/dist/core/ado-env.d.ts.map +1 -0
- package/dist/core/ado-env.js +34 -0
- package/dist/core/ado-env.js.map +1 -0
- package/dist/core/assurance.d.ts +10 -0
- package/dist/core/assurance.d.ts.map +1 -1
- package/dist/core/assurance.js +23 -0
- package/dist/core/assurance.js.map +1 -1
- package/dist/core/deliver-text.d.ts +19 -0
- package/dist/core/deliver-text.d.ts.map +1 -1
- package/dist/core/deliver-text.js +77 -1
- package/dist/core/deliver-text.js.map +1 -1
- package/dist/core/deliver.d.ts +49 -1
- package/dist/core/deliver.d.ts.map +1 -1
- package/dist/core/deliver.js +142 -6
- package/dist/core/deliver.js.map +1 -1
- package/dist/core/estate-mcp-client.d.ts.map +1 -1
- package/dist/core/estate-mcp-client.js +4 -8
- package/dist/core/estate-mcp-client.js.map +1 -1
- package/dist/core/exec.d.ts +16 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +32 -2
- package/dist/core/exec.js.map +1 -1
- package/dist/core/governance-store.d.ts +3 -1
- package/dist/core/governance-store.d.ts.map +1 -1
- package/dist/core/governance-store.js +7 -2
- package/dist/core/governance-store.js.map +1 -1
- package/dist/core/linked-issues.d.ts +13 -2
- package/dist/core/linked-issues.d.ts.map +1 -1
- package/dist/core/linked-issues.js +135 -4
- package/dist/core/linked-issues.js.map +1 -1
- package/dist/core/redeliver.js +2 -2
- package/dist/core/redeliver.js.map +1 -1
- package/dist/core/repo-clone.d.ts +64 -0
- package/dist/core/repo-clone.d.ts.map +1 -0
- package/dist/core/repo-clone.js +307 -0
- package/dist/core/repo-clone.js.map +1 -0
- package/dist/core/run-identity.d.ts.map +1 -1
- package/dist/core/run-identity.js +3 -0
- package/dist/core/run-identity.js.map +1 -1
- package/dist/core/run-log-facts.d.ts +56 -0
- package/dist/core/run-log-facts.d.ts.map +1 -0
- package/dist/core/run-log-facts.js +230 -0
- package/dist/core/run-log-facts.js.map +1 -0
- package/dist/core/run-read-lane.d.ts +30 -0
- package/dist/core/run-read-lane.d.ts.map +1 -0
- package/dist/core/run-read-lane.js +103 -0
- package/dist/core/run-read-lane.js.map +1 -0
- package/dist/core/shutdown.d.ts +27 -0
- package/dist/core/shutdown.d.ts.map +1 -1
- package/dist/core/shutdown.js +72 -0
- package/dist/core/shutdown.js.map +1 -1
- package/dist/core/stand-in.d.ts +40 -0
- package/dist/core/stand-in.d.ts.map +1 -0
- package/dist/core/stand-in.js +118 -0
- package/dist/core/stand-in.js.map +1 -0
- package/dist/core/types.d.ts +27 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/core/walkthrough-root.d.ts.map +1 -1
- package/dist/core/walkthrough-root.js +3 -5
- package/dist/core/walkthrough-root.js.map +1 -1
- package/dist/core/wicked-home.d.ts +9 -0
- package/dist/core/wicked-home.d.ts.map +1 -0
- package/dist/core/wicked-home.js +25 -0
- package/dist/core/wicked-home.js.map +1 -0
- package/dist/decisions/consider.d.ts +2 -1
- package/dist/decisions/consider.d.ts.map +1 -1
- package/dist/decisions/consider.js +2 -2
- package/dist/decisions/consider.js.map +1 -1
- package/dist/decisions/land.d.ts +2 -0
- package/dist/decisions/land.d.ts.map +1 -1
- package/dist/decisions/land.js +16 -3
- package/dist/decisions/land.js.map +1 -1
- package/dist/decisions/rules-brief.d.ts +2 -1
- package/dist/decisions/rules-brief.d.ts.map +1 -1
- package/dist/decisions/rules-brief.js +3 -2
- package/dist/decisions/rules-brief.js.map +1 -1
- package/dist/editors/conformance-runtime.d.ts +0 -2
- package/dist/editors/conformance-runtime.d.ts.map +1 -1
- package/dist/editors/conformance-runtime.js +0 -4
- package/dist/editors/conformance-runtime.js.map +1 -1
- package/dist/editors/pack-extras.d.ts +162 -0
- package/dist/editors/pack-extras.d.ts.map +1 -0
- package/dist/editors/pack-extras.js +596 -0
- package/dist/editors/pack-extras.js.map +1 -0
- package/dist/editors/pack-install.d.ts +26 -22
- package/dist/editors/pack-install.d.ts.map +1 -1
- package/dist/editors/pack-install.js +187 -80
- package/dist/editors/pack-install.js.map +1 -1
- package/dist/editors/registry.d.ts +66 -13
- package/dist/editors/registry.d.ts.map +1 -1
- package/dist/editors/registry.js +147 -24
- package/dist/editors/registry.js.map +1 -1
- package/dist/editors/routes.d.ts +10 -5
- package/dist/editors/routes.d.ts.map +1 -1
- package/dist/editors/routes.js +45 -11
- package/dist/editors/routes.js.map +1 -1
- package/dist/editors/visuals.d.ts +4 -3
- package/dist/editors/visuals.d.ts.map +1 -1
- package/dist/editors/visuals.js +17 -7
- package/dist/editors/visuals.js.map +1 -1
- package/dist/evals/runner.js +1 -1
- package/dist/evals/runner.js.map +1 -1
- package/dist/evals/shape.d.ts +7 -1
- package/dist/evals/shape.d.ts.map +1 -1
- package/dist/evals/shape.js +26 -6
- package/dist/evals/shape.js.map +1 -1
- package/dist/evals/workflow.d.ts +16 -3
- package/dist/evals/workflow.d.ts.map +1 -1
- package/dist/evals/workflow.js +31 -6
- package/dist/evals/workflow.js.map +1 -1
- package/dist/insights/review-service.d.ts +24 -3
- package/dist/insights/review-service.d.ts.map +1 -1
- package/dist/insights/review-service.js +75 -12
- package/dist/insights/review-service.js.map +1 -1
- package/dist/insights/routes.d.ts +2 -1
- package/dist/insights/routes.d.ts.map +1 -1
- package/dist/insights/routes.js +19 -4
- package/dist/insights/routes.js.map +1 -1
- package/dist/insights/run-facts.d.ts +5 -0
- package/dist/insights/run-facts.d.ts.map +1 -1
- package/dist/insights/run-facts.js +15 -0
- package/dist/insights/run-facts.js.map +1 -1
- package/dist/insights/workflow.d.ts +2 -1
- package/dist/insights/workflow.d.ts.map +1 -1
- package/dist/insights/workflow.js +4 -4
- package/dist/insights/workflow.js.map +1 -1
- package/dist/inspect/service.d.ts +3 -2
- package/dist/inspect/service.d.ts.map +1 -1
- package/dist/inspect/service.js +4 -4
- package/dist/inspect/service.js.map +1 -1
- package/dist/interactive/bridge-pool.d.ts +5 -2
- package/dist/interactive/bridge-pool.d.ts.map +1 -1
- package/dist/interactive/bridge-pool.js +10 -5
- package/dist/interactive/bridge-pool.js.map +1 -1
- package/dist/interactive/chat-events.d.ts.map +1 -1
- package/dist/interactive/chat-events.js +7 -1
- package/dist/interactive/chat-events.js.map +1 -1
- package/dist/interactive/draft-events.d.ts +3 -0
- package/dist/interactive/draft-events.d.ts.map +1 -1
- package/dist/interactive/draft-events.js +5 -8
- package/dist/interactive/draft-events.js.map +1 -1
- package/dist/interactive/draft-skill.d.ts +56 -3
- package/dist/interactive/draft-skill.d.ts.map +1 -1
- package/dist/interactive/draft-skill.js +129 -20
- package/dist/interactive/draft-skill.js.map +1 -1
- package/dist/interactive/landing-guard.d.ts +30 -5
- package/dist/interactive/landing-guard.d.ts.map +1 -1
- package/dist/interactive/landing-guard.js +196 -6
- package/dist/interactive/landing-guard.js.map +1 -1
- package/dist/interactive/proposal-create.d.ts.map +1 -1
- package/dist/interactive/proposal-create.js +1 -0
- package/dist/interactive/proposal-create.js.map +1 -1
- package/dist/interactive/proposal-refine.d.ts.map +1 -1
- package/dist/interactive/proposal-refine.js +16 -1
- package/dist/interactive/proposal-refine.js.map +1 -1
- package/dist/interactive/review-events.js +1 -1
- package/dist/interactive/review-events.js.map +1 -1
- package/dist/interactive/run-units.d.ts.map +1 -1
- package/dist/interactive/run-units.js +3 -2
- package/dist/interactive/run-units.js.map +1 -1
- package/dist/interactive/source-packet.d.ts +8 -0
- package/dist/interactive/source-packet.d.ts.map +1 -1
- package/dist/interactive/source-packet.js +47 -6
- package/dist/interactive/source-packet.js.map +1 -1
- package/dist/knowledge/adapters/toolbox/memory.d.ts.map +1 -1
- package/dist/knowledge/adapters/toolbox/memory.js +3 -2
- package/dist/knowledge/adapters/toolbox/memory.js.map +1 -1
- package/dist/knowledge/adapters/toolbox/supervisor.d.ts +21 -1
- package/dist/knowledge/adapters/toolbox/supervisor.d.ts.map +1 -1
- package/dist/knowledge/adapters/toolbox/supervisor.js +76 -26
- package/dist/knowledge/adapters/toolbox/supervisor.js.map +1 -1
- package/dist/knowledge/estate-write.d.ts +5 -0
- package/dist/knowledge/estate-write.d.ts.map +1 -1
- package/dist/knowledge/estate-write.js +7 -0
- package/dist/knowledge/estate-write.js.map +1 -1
- package/dist/knowledge/projector.d.ts +60 -5
- package/dist/knowledge/projector.d.ts.map +1 -1
- package/dist/knowledge/projector.js +264 -21
- package/dist/knowledge/projector.js.map +1 -1
- package/dist/knowledge/shapes/map.d.ts.map +1 -1
- package/dist/knowledge/shapes/map.js +12 -2
- package/dist/knowledge/shapes/map.js.map +1 -1
- package/dist/knowledge/shapes/routes.d.ts +1 -1
- package/dist/knowledge/shapes/routes.d.ts.map +1 -1
- package/dist/knowledge/shapes/routes.js +42 -16
- package/dist/knowledge/shapes/routes.js.map +1 -1
- package/dist/knowledge/shapes/shapes.d.ts +60 -13
- package/dist/knowledge/shapes/shapes.d.ts.map +1 -1
- package/dist/knowledge/shapes/shapes.js +199 -31
- package/dist/knowledge/shapes/shapes.js.map +1 -1
- package/dist/knowledge/shapes/verified.d.ts.map +1 -1
- package/dist/knowledge/shapes/verified.js +3 -2
- package/dist/knowledge/shapes/verified.js.map +1 -1
- package/dist/knowledge/trackers/addresses.d.ts +27 -3
- package/dist/knowledge/trackers/addresses.d.ts.map +1 -1
- package/dist/knowledge/trackers/addresses.js +33 -5
- package/dist/knowledge/trackers/addresses.js.map +1 -1
- package/dist/knowledge/trackers/gate-pm.d.ts.map +1 -1
- package/dist/knowledge/trackers/gate-pm.js +4 -2
- package/dist/knowledge/trackers/gate-pm.js.map +1 -1
- package/dist/knowledge/trackers/projector.d.ts +3 -1
- package/dist/knowledge/trackers/projector.d.ts.map +1 -1
- package/dist/knowledge/trackers/projector.js +59 -8
- package/dist/knowledge/trackers/projector.js.map +1 -1
- package/dist/knowledge/trackers/set.d.ts +28 -0
- package/dist/knowledge/trackers/set.d.ts.map +1 -1
- package/dist/knowledge/trackers/set.js +26 -0
- package/dist/knowledge/trackers/set.js.map +1 -1
- package/dist/learn/scheduler.d.ts.map +1 -1
- package/dist/learn/scheduler.js +11 -2
- package/dist/learn/scheduler.js.map +1 -1
- package/dist/learnings/extract.d.ts +9 -3
- package/dist/learnings/extract.d.ts.map +1 -1
- package/dist/learnings/extract.js +62 -4
- package/dist/learnings/extract.js.map +1 -1
- package/dist/learnings/replacement-lineage.d.ts +3 -2
- package/dist/learnings/replacement-lineage.d.ts.map +1 -1
- package/dist/learnings/replacement-lineage.js +7 -6
- package/dist/learnings/replacement-lineage.js.map +1 -1
- package/dist/learnings/service.d.ts +12 -2
- package/dist/learnings/service.d.ts.map +1 -1
- package/dist/learnings/service.js +30 -5
- package/dist/learnings/service.js.map +1 -1
- package/dist/mcp/broker.d.ts.map +1 -1
- package/dist/mcp/broker.js +18 -4
- package/dist/mcp/broker.js.map +1 -1
- package/dist/mcp/estate-relay.d.ts +3 -0
- package/dist/mcp/estate-relay.d.ts.map +1 -1
- package/dist/mcp/estate-relay.js +5 -2
- package/dist/mcp/estate-relay.js.map +1 -1
- package/dist/mcp/invoke.js +2 -2
- package/dist/mcp/invoke.js.map +1 -1
- package/dist/mcp/policies.d.ts +35 -0
- package/dist/mcp/policies.d.ts.map +1 -1
- package/dist/mcp/policies.js +138 -1
- package/dist/mcp/policies.js.map +1 -1
- package/dist/mcp/redact.d.ts +1 -1
- package/dist/mcp/redact.d.ts.map +1 -1
- package/dist/mcp/redact.js +61 -4
- package/dist/mcp/redact.js.map +1 -1
- package/dist/mcp/registry-store.d.ts +35 -0
- package/dist/mcp/registry-store.d.ts.map +1 -1
- package/dist/mcp/registry-store.js +33 -0
- package/dist/mcp/registry-store.js.map +1 -1
- package/dist/mcp/registry.d.ts +65 -4
- package/dist/mcp/registry.d.ts.map +1 -1
- package/dist/mcp/registry.js +295 -21
- package/dist/mcp/registry.js.map +1 -1
- package/dist/mcp/rest.js +3 -3
- package/dist/mcp/rest.js.map +1 -1
- package/dist/mcp/run-fence.d.ts +2 -0
- package/dist/mcp/run-fence.d.ts.map +1 -1
- package/dist/mcp/run-fence.js +9 -0
- package/dist/mcp/run-fence.js.map +1 -1
- package/dist/mcp/trigger-names.d.ts +32 -0
- package/dist/mcp/trigger-names.d.ts.map +1 -0
- package/dist/mcp/trigger-names.js +529 -0
- package/dist/mcp/trigger-names.js.map +1 -0
- package/dist/mcp/upstream-error.d.ts +5 -1
- package/dist/mcp/upstream-error.d.ts.map +1 -1
- package/dist/mcp/upstream-error.js +5 -1
- package/dist/mcp/upstream-error.js.map +1 -1
- package/dist/projects/graph.d.ts +6 -4
- package/dist/projects/graph.d.ts.map +1 -1
- package/dist/projects/graph.js +173 -25
- package/dist/projects/graph.js.map +1 -1
- package/dist/projects/routes.d.ts +7 -1
- package/dist/projects/routes.d.ts.map +1 -1
- package/dist/projects/routes.js +13 -5
- package/dist/projects/routes.js.map +1 -1
- package/dist/projects/state-home-preflight.d.ts +5 -0
- package/dist/projects/state-home-preflight.d.ts.map +1 -1
- package/dist/projects/state-home-preflight.js +48 -8
- package/dist/projects/state-home-preflight.js.map +1 -1
- package/dist/projects/state-home-registry.d.ts.map +1 -1
- package/dist/projects/state-home-registry.js +6 -0
- package/dist/projects/state-home-registry.js.map +1 -1
- package/dist/projects/state-home.d.ts +6 -2
- package/dist/projects/state-home.d.ts.map +1 -1
- package/dist/projects/state-home.js +8 -5
- package/dist/projects/state-home.js.map +1 -1
- package/dist/qe/test-sets.d.ts +1 -1
- package/dist/qe/test-sets.d.ts.map +1 -1
- package/dist/qe/test-sets.js +2 -2
- package/dist/qe/test-sets.js.map +1 -1
- package/dist/schedules/routes.d.ts +5 -0
- package/dist/schedules/routes.d.ts.map +1 -1
- package/dist/schedules/routes.js +32 -5
- package/dist/schedules/routes.js.map +1 -1
- package/dist/schedules/scheduler.d.ts +8 -1
- package/dist/schedules/scheduler.d.ts.map +1 -1
- package/dist/schedules/scheduler.js +10 -1
- package/dist/schedules/scheduler.js.map +1 -1
- package/dist/schedules/store.d.ts +7 -0
- package/dist/schedules/store.d.ts.map +1 -1
- package/dist/schedules/store.js +19 -4
- package/dist/schedules/store.js.map +1 -1
- package/dist/skills/plugin-source.js +4 -4
- package/dist/skills/plugin-source.js.map +1 -1
- package/dist/skills/store.d.ts +11 -1
- package/dist/skills/store.d.ts.map +1 -1
- package/dist/skills/store.js +37 -3
- package/dist/skills/store.js.map +1 -1
- package/dist/sources/drivers/sqlite.d.ts +13 -0
- package/dist/sources/drivers/sqlite.d.ts.map +1 -1
- package/dist/sources/drivers/sqlite.js +11 -0
- package/dist/sources/drivers/sqlite.js.map +1 -1
- package/dist/sources/routes.d.ts.map +1 -1
- package/dist/sources/routes.js +1 -0
- package/dist/sources/routes.js.map +1 -1
- package/dist/sources/uploads.d.ts +22 -2
- package/dist/sources/uploads.d.ts.map +1 -1
- package/dist/sources/uploads.js +108 -10
- package/dist/sources/uploads.js.map +1 -1
- package/dist/standing-orders/parse.d.ts +8 -0
- package/dist/standing-orders/parse.d.ts.map +1 -1
- package/dist/standing-orders/parse.js +52 -5
- package/dist/standing-orders/parse.js.map +1 -1
- package/dist/studio/apps-standalone/fixture.js +3 -3
- package/dist/studio/assets/{KnowledgeGraph-dfq7Flyj.js → KnowledgeGraph-D6RRLDnV.js} +1 -1
- package/dist/studio/assets/index-BLo9vFQI.js +1128 -0
- package/dist/studio/assets/index-xW21Gkam.css +32 -0
- package/dist/studio/editors/wicked-apps/editor.json +1 -1
- package/dist/studio/editors/wicked-apps/index.html +1 -1
- package/dist/studio/editors/wicked-deck/editor.json +1 -1
- package/dist/studio/editors/wicked-deck/index.html +1 -1
- package/dist/studio/editors/wicked-doc/editor.json +1 -1
- package/dist/studio/editors/wicked-doc/index.html +1 -1
- package/dist/studio/editors/wicked-insights/editor.json +1 -1
- package/dist/studio/editors/wicked-insights/index.html +1 -1
- package/dist/studio/editors/wicked-page/editor.json +1 -1
- package/dist/studio/editors/wicked-page/index.html +1 -1
- package/dist/studio/editors/wicked-video/editor.json +1 -1
- package/dist/studio/editors/wicked-video/index.html +1 -1
- package/dist/studio/index.html +2 -2
- package/dist/studio/testid-inventory.json +1687 -236
- package/dist/team/routes.d.ts +4 -1
- package/dist/team/routes.d.ts.map +1 -1
- package/dist/team/routes.js +3 -2
- package/dist/team/routes.js.map +1 -1
- package/dist/voice/tts.d.ts +18 -0
- package/dist/voice/tts.d.ts.map +1 -1
- package/dist/voice/tts.js +134 -29
- package/dist/voice/tts.js.map +1 -1
- package/dist/workflow-catalog/build-v2.d.ts +34 -0
- package/dist/workflow-catalog/build-v2.d.ts.map +1 -1
- package/dist/workflow-catalog/build-v2.js +131 -10
- package/dist/workflow-catalog/build-v2.js.map +1 -1
- package/dist/workflow-catalog/catalog-data.d.ts.map +1 -1
- package/dist/workflow-catalog/catalog-data.js +0 -2
- package/dist/workflow-catalog/catalog-data.js.map +1 -1
- package/dist/workflow-catalog/detect.d.ts +18 -3
- package/dist/workflow-catalog/detect.d.ts.map +1 -1
- package/dist/workflow-catalog/detect.js +43 -8
- package/dist/workflow-catalog/detect.js.map +1 -1
- package/dist/working-doc/event-lines.d.ts +5 -2
- package/dist/working-doc/event-lines.d.ts.map +1 -1
- package/dist/working-doc/event-lines.js +38 -7
- package/dist/working-doc/event-lines.js.map +1 -1
- package/dist/working-doc/sections.d.ts +3 -0
- package/dist/working-doc/sections.d.ts.map +1 -1
- package/dist/working-doc/sections.js +5 -0
- package/dist/working-doc/sections.js.map +1 -1
- package/dist/working-doc/service.d.ts +23 -3
- package/dist/working-doc/service.d.ts.map +1 -1
- package/dist/working-doc/service.js +93 -54
- package/dist/working-doc/service.js.map +1 -1
- package/endpoint-manifest.json +144 -8
- package/evals/corpora/shape-v1.json +25 -1
- package/evals/corpora/shape-v1.seat-fixture.json +25 -1
- package/package.json +4 -4
- package/runners/sqlite-runner.mjs +39 -1
- package/voice-locks/darwin-arm64-cp310.txt +12 -0
- package/voice-locks/darwin-arm64-cp311.txt +8 -0
- package/voice-locks/darwin-arm64-cp312.txt +8 -0
- package/voice-locks/darwin-arm64-cp313.txt +8 -0
- package/voice-locks/darwin-arm64-cp314.txt +8 -0
- package/voice-locks/darwin-arm64-cp39.txt +12 -0
- package/voice-locks/darwin-x64-cp310.txt +12 -0
- package/voice-locks/darwin-x64-cp311.txt +12 -0
- package/voice-locks/darwin-x64-cp312.txt +12 -0
- package/voice-locks/darwin-x64-cp313.txt +12 -0
- package/voice-locks/darwin-x64-cp39.txt +12 -0
- package/voice-locks/linux-arm64-cp310.txt +12 -0
- package/voice-locks/linux-arm64-cp311.txt +8 -0
- package/voice-locks/linux-arm64-cp312.txt +8 -0
- package/voice-locks/linux-arm64-cp313.txt +8 -0
- package/voice-locks/linux-arm64-cp314.txt +8 -0
- package/voice-locks/linux-arm64-cp39.txt +12 -0
- package/voice-locks/linux-x64-cp310.txt +12 -0
- package/voice-locks/linux-x64-cp311.txt +8 -0
- package/voice-locks/linux-x64-cp312.txt +8 -0
- package/voice-locks/linux-x64-cp313.txt +8 -0
- package/voice-locks/linux-x64-cp314.txt +8 -0
- package/voice-locks/linux-x64-cp39.txt +12 -0
- package/dist/studio/assets/index-Bame65hj.js +0 -1108
- package/dist/studio/assets/index-CtB1BJRI.css +0 -32
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
* install-time conformance run (garden `scripts/editor/conformance.py`, run by crew against its
|
|
14
14
|
* own conformance host page, §12.1 / EP-C8) both pass (`pack-install.ts`). The registry records
|
|
15
15
|
* the pack directory and each editor's pinned entry hash; it never writes into the pack. A pack
|
|
16
|
-
* that also ships skills or blocks
|
|
16
|
+
* that also ships skills or blocks installs them after the person approves them in the same consent (§3.2
|
|
17
|
+
* "Add these", crew#1703, `pack-extras.ts`); the registry keeps which skills and presets each pack added. A pack editor's description and card images are read like a first-party editor's.
|
|
17
18
|
*
|
|
18
19
|
* Persisted state is ONE file, `<state home>/daemon-editors.json`: the enable/disable flags the
|
|
19
20
|
* operator sets in Settings (§6.4, human-only) and the installed packs. It sits under the `daemon-`
|
|
@@ -247,6 +248,14 @@ export interface InstalledPack {
|
|
|
247
248
|
at: string;
|
|
248
249
|
cases: string[];
|
|
249
250
|
};
|
|
251
|
+
/** (crew#1703) The pack's skills this install added to the daemon skills root: the pack's own name and the key it
|
|
252
|
+
* was installed under (`wicked-garden-<dir>`). Absent for a pack with none. */
|
|
253
|
+
skills?: Array<{
|
|
254
|
+
name: string;
|
|
255
|
+
key: string;
|
|
256
|
+
}>;
|
|
257
|
+
/** (crew#1703) The presets this install wrote for the pack's blocks (named by block id). Absent for none. */
|
|
258
|
+
presets?: string[];
|
|
250
259
|
}
|
|
251
260
|
/** An install the registry refuses: the id is taken, or the pack did not read back. */
|
|
252
261
|
export declare class EditorInstallConflict extends Error {
|
|
@@ -255,7 +264,9 @@ export declare class EditorInstallConflict extends Error {
|
|
|
255
264
|
export declare function sha256Of(buf: Buffer): string;
|
|
256
265
|
/**
|
|
257
266
|
* Read a file holding at most `cap` bytes, never allocating more than `cap + 1` (codex r1 on X3: a
|
|
258
|
-
* file swapped for a huge one is refused before it is read whole).
|
|
267
|
+
* file swapped for a huge one is refused before it is read whole). The open never waits (O_NONBLOCK): a FIFO
|
|
268
|
+
* swapped in for a checked file would otherwise block the daemon until something writes to it (crew#1702 review).
|
|
269
|
+
* `null` = over the cap, or not a regular file.
|
|
259
270
|
*/
|
|
260
271
|
export declare function readCapped(path: string, cap: number): Buffer | null;
|
|
261
272
|
/** The digest of a pack editor's admitted manifest entry: a manifest edited after install is a new install. */
|
|
@@ -274,25 +285,23 @@ export declare function externalReferences(html: string): string[];
|
|
|
274
285
|
* served half-right.
|
|
275
286
|
*/
|
|
276
287
|
export declare function discoverStudioEditors(studioRoot: string, log?: (msg: string) => void): Array<Omit<EditorRecord, 'enabled'>>;
|
|
277
|
-
/**
|
|
278
|
-
|
|
279
|
-
*
|
|
280
|
-
*
|
|
288
|
+
/**
|
|
289
|
+
* A pack editor's manifest entry: the shared shape plus its pinned hash and a pack-relative entry. Its `description`
|
|
290
|
+
* and `visuals` (garden's pack gate accepts both, warn-only, and install.py stages the declared images at their
|
|
291
|
+
* manifest paths) are fail-open as for a studio-bundle editor; the images are read with {@link resolveVisuals}
|
|
292
|
+
* against the installed pack's root (crew#1702).
|
|
293
|
+
*/
|
|
281
294
|
export declare const PackEditorSchema: z.ZodObject<{
|
|
295
|
+
id: z.ZodString;
|
|
282
296
|
title: z.ZodString;
|
|
283
297
|
version: z.ZodString;
|
|
284
|
-
id: z.ZodString;
|
|
285
298
|
protocol: z.ZodArray<z.ZodInt>;
|
|
299
|
+
kinds: z.ZodArray<z.ZodString>;
|
|
286
300
|
sizes: z.ZodArray<z.ZodEnum<{
|
|
287
301
|
full: "full";
|
|
288
302
|
inline: "inline";
|
|
289
303
|
pane: "pane";
|
|
290
304
|
}>>;
|
|
291
|
-
limits: z.ZodOptional<z.ZodObject<{
|
|
292
|
-
bundleBytes: z.ZodInt;
|
|
293
|
-
}, z.core.$strip>>;
|
|
294
|
-
surfaces: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("wicked-crew-api-types").EditorSurfaces | undefined, unknown>>>;
|
|
295
|
-
kinds: z.ZodArray<z.ZodString>;
|
|
296
305
|
panels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
297
306
|
checks: "checks";
|
|
298
307
|
}>>>;
|
|
@@ -314,9 +323,22 @@ export declare const PackEditorSchema: z.ZodObject<{
|
|
|
314
323
|
}>;
|
|
315
324
|
why: z.ZodString;
|
|
316
325
|
}, z.core.$strip>>;
|
|
326
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
327
|
+
bundleBytes: z.ZodInt;
|
|
328
|
+
}, z.core.$strip>>;
|
|
329
|
+
surfaces: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("wicked-crew-api-types").EditorSurfaces | undefined, unknown>>>;
|
|
330
|
+
description: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
331
|
+
visuals: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./visuals.js").DeclaredVisuals | undefined, unknown>>>;
|
|
317
332
|
entry: z.ZodString;
|
|
318
333
|
sha256: z.ZodString;
|
|
319
334
|
}, z.core.$strip>;
|
|
335
|
+
export type PackEditorManifest = z.infer<typeof PackEditorSchema>;
|
|
336
|
+
/**
|
|
337
|
+
* The digest a pack editor is installed and read back under: {@link editorEntryDigest} of its admitted entry WITHOUT
|
|
338
|
+
* `description` and `visuals`. They are cosmetic: a new line or icon is not a new build needing consent, and an
|
|
339
|
+
* editor installed before crew read them keeps the digest it was recorded with.
|
|
340
|
+
*/
|
|
341
|
+
export declare function packEditorDigest(entry: PackEditorManifest): string;
|
|
320
342
|
/**
|
|
321
343
|
* Read one pack editor at serve-time quality: the manifest entry for `id` in `<root>/wicked-pack.json`,
|
|
322
344
|
* its entry a real file inside the pack, within its caps, loading nothing from outside, and hashing to
|
|
@@ -333,6 +355,14 @@ export declare function readPackEditor(pack: InstalledPack, id: string, log?: (m
|
|
|
333
355
|
export declare function readPackPlugin(pack: InstalledPack, id: string, log?: (msg: string) => void): Omit<PluginRecord, 'enabled'> | null;
|
|
334
356
|
/** Read one installed pack artifact back from disk — a run plugin or an artifact editor, by its recorded `kind`. */
|
|
335
357
|
export declare function readPackArtifact(pack: InstalledPack, id: string, log?: (msg: string) => void): Omit<RegisteredRecord, 'enabled'> | null;
|
|
358
|
+
/** (crew#1703) What one pack added to the skills root and the preset store. */
|
|
359
|
+
export interface PackExtrasOwned {
|
|
360
|
+
skills: Array<{
|
|
361
|
+
name: string;
|
|
362
|
+
key: string;
|
|
363
|
+
}>;
|
|
364
|
+
presets: string[];
|
|
365
|
+
}
|
|
336
366
|
export declare class EditorRegistry {
|
|
337
367
|
private readonly records;
|
|
338
368
|
private readonly stateFile;
|
|
@@ -346,6 +376,8 @@ export declare class EditorRegistry {
|
|
|
346
376
|
private readonly installed;
|
|
347
377
|
/** The flags as read at boot: kept for an installed editor skipped at boot, so a write never drops its "off". */
|
|
348
378
|
private persistedFlags;
|
|
379
|
+
/** (crew#1703) Each pack's skills and presets, by pack name: outlives the pack's editor rows. */
|
|
380
|
+
private readonly extras;
|
|
349
381
|
private readState;
|
|
350
382
|
private writeState;
|
|
351
383
|
/** Where the flags live (diagnostics / tests). */
|
|
@@ -369,14 +401,35 @@ export declare class EditorRegistry {
|
|
|
369
401
|
* an earlier consent, especially when the new pack came from a different directory. Use the
|
|
370
402
|
* installed map so an entry skipped at boot is removed too, including its persisted switch.
|
|
371
403
|
*/
|
|
404
|
+
/** (crew#1703) Every pack install this daemon has persisted, a record skipped at boot included. */
|
|
405
|
+
installedPacks(): InstalledPack[];
|
|
406
|
+
/** (crew#1703) The skills and presets the pack `name` added: its records' and the kept map's, so they stay its own
|
|
407
|
+
* after its last editor is removed. */
|
|
408
|
+
packExtrasOwned(name: string): PackExtrasOwned;
|
|
409
|
+
/** (crew#1703) The checks {@link installPack} runs before it commits, committing nothing: a pack install runs them
|
|
410
|
+
* before it writes the pack's presets and skills, so an id conflict or an unreadable editor writes nothing. */
|
|
411
|
+
preflight(packs: Array<{
|
|
412
|
+
id: string;
|
|
413
|
+
pack: InstalledPack;
|
|
414
|
+
}>): void;
|
|
415
|
+
private readIncoming;
|
|
372
416
|
installPack(packs: Array<{
|
|
373
417
|
id: string;
|
|
374
418
|
pack: InstalledPack;
|
|
375
|
-
}>, enabled: boolean | undefined): {
|
|
419
|
+
}>, enabled: boolean | undefined, owned?: PackExtrasOwned): {
|
|
376
420
|
records: RegisteredRecord[];
|
|
377
421
|
updated: boolean;
|
|
378
422
|
removed: string[];
|
|
379
423
|
};
|
|
424
|
+
/**
|
|
425
|
+
* (crew#1703) Name the pack's skills and presets on each of its rows (`current`, what the skills root and the preset
|
|
426
|
+
* store hold now), and keep `owned` (everything the pack added, a withdrawn skill included) as its own.
|
|
427
|
+
*/
|
|
428
|
+
setPackExtras(name: string, current: PackExtrasOwned, owned: PackExtrasOwned): void;
|
|
429
|
+
/** (crew#1703) The pack an installed editor or plugin came from, or `null`. */
|
|
430
|
+
packNameOf(id: string): string | null;
|
|
431
|
+
/** (crew#1703) Whether any installed editor or plugin still comes from the pack `name` (`except`: leaving that id out). */
|
|
432
|
+
hasPack(name: string, except?: string): boolean;
|
|
380
433
|
/** Remove an installed pack editor (the pack's files are the installer's to delete). `false` when it is not one. */
|
|
381
434
|
removeInstalled(id: string): boolean;
|
|
382
435
|
/** Whether `id` is an installed pack editor (served or skipped at boot). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/editors/registry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/editors/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAKH,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAC;AAE9B,OAAO,KAAK,EAAoB,UAAU,EAAE,aAAa,EA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MAAM,GAAG,OAAO;IAI/C,oHAAoH;IACpH,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAYpC,4EAA4E;IAC5E,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIhC;;0GAEsG;IACtG,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,gBAAgB,GAAG,UAAU;CA8C7C"}
|
package/dist/editors/registry.js
CHANGED
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
* install-time conformance run (garden `scripts/editor/conformance.py`, run by crew against its
|
|
14
14
|
* own conformance host page, §12.1 / EP-C8) both pass (`pack-install.ts`). The registry records
|
|
15
15
|
* the pack directory and each editor's pinned entry hash; it never writes into the pack. A pack
|
|
16
|
-
* that also ships skills or blocks
|
|
16
|
+
* that also ships skills or blocks installs them after the person approves them in the same consent (§3.2
|
|
17
|
+
* "Add these", crew#1703, `pack-extras.ts`); the registry keeps which skills and presets each pack added. A pack editor's description and card images are read like a first-party editor's.
|
|
17
18
|
*
|
|
18
19
|
* Persisted state is ONE file, `<state home>/daemon-editors.json`: the enable/disable flags the
|
|
19
20
|
* operator sets in Settings (§6.4, human-only) and the installed packs. It sits under the `daemon-`
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
* refused, never served.
|
|
25
26
|
*/
|
|
26
27
|
import { createHash } from 'node:crypto';
|
|
27
|
-
import { closeSync, existsSync, fstatSync, lstatSync, mkdirSync, openSync, readdirSync, readFileSync, readSync, renameSync, writeFileSync } from 'node:fs';
|
|
28
|
+
import { closeSync, constants, existsSync, fstatSync, lstatSync, mkdirSync, openSync, readdirSync, readFileSync, readSync, renameSync, writeFileSync } from 'node:fs';
|
|
28
29
|
import { isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
29
30
|
import { z } from '../zod.js';
|
|
30
31
|
import { parseSurfaces } from './surfaces.js';
|
|
@@ -166,12 +167,19 @@ export const PluginManifestSchema = z.strictObject({
|
|
|
166
167
|
if (new Set(ids).size !== ids.length)
|
|
167
168
|
ctx.addIssue({ code: 'custom', message: 'panel ids must be unique' });
|
|
168
169
|
}),
|
|
169
|
-
// Accepted (CS7 C1) but not surfaced yet
|
|
170
|
-
//
|
|
170
|
+
// Accepted (CS7 C1) but not surfaced yet for a run plugin (pack editors' are, crew#1702), and samples/limits do
|
|
171
|
+
// not reach the wire view.
|
|
171
172
|
visuals: z.object({ color: z.string().regex(/^#[0-9a-fA-F]{6}$/u).optional(), icon: z.string().optional() }).optional(),
|
|
172
173
|
samples: z.string().optional(),
|
|
173
174
|
limits: z.object({ bundleBytes: z.int().min(1).max(HOST_BUNDLE_CAP_BYTES) }).optional(),
|
|
174
175
|
});
|
|
176
|
+
/** (crew#1703) The skills and block presets a pack install added, as an editor or run-plugin row shows them. */
|
|
177
|
+
function packExtrasView(pack) {
|
|
178
|
+
return {
|
|
179
|
+
...(pack?.skills !== undefined && pack.skills.length > 0 ? { packSkills: pack.skills.map((k) => ({ ...k })) } : {}),
|
|
180
|
+
...(pack?.presets !== undefined && pack.presets.length > 0 ? { packBlocks: [...pack.presets] } : {}),
|
|
181
|
+
};
|
|
182
|
+
}
|
|
175
183
|
/** An install the registry refuses: the id is taken, or the pack did not read back. */
|
|
176
184
|
export class EditorInstallConflict extends Error {
|
|
177
185
|
constructor(message) {
|
|
@@ -184,12 +192,15 @@ export function sha256Of(buf) {
|
|
|
184
192
|
}
|
|
185
193
|
/**
|
|
186
194
|
* Read a file holding at most `cap` bytes, never allocating more than `cap + 1` (codex r1 on X3: a
|
|
187
|
-
* file swapped for a huge one is refused before it is read whole).
|
|
195
|
+
* file swapped for a huge one is refused before it is read whole). The open never waits (O_NONBLOCK): a FIFO
|
|
196
|
+
* swapped in for a checked file would otherwise block the daemon until something writes to it (crew#1702 review).
|
|
197
|
+
* `null` = over the cap, or not a regular file.
|
|
188
198
|
*/
|
|
189
199
|
export function readCapped(path, cap) {
|
|
190
|
-
const fd = openSync(path,
|
|
200
|
+
const fd = openSync(path, constants.O_RDONLY | (constants.O_NONBLOCK ?? 0));
|
|
191
201
|
try {
|
|
192
|
-
|
|
202
|
+
const st = fstatSync(fd);
|
|
203
|
+
if (!st.isFile() || st.size > cap)
|
|
193
204
|
return null;
|
|
194
205
|
const buf = Buffer.alloc(cap + 1);
|
|
195
206
|
let n = 0;
|
|
@@ -321,14 +332,27 @@ export function discoverStudioEditors(studioRoot, log) {
|
|
|
321
332
|
}
|
|
322
333
|
return out;
|
|
323
334
|
}
|
|
324
|
-
/**
|
|
325
|
-
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
|
|
335
|
+
/**
|
|
336
|
+
* A pack editor's manifest entry: the shared shape plus its pinned hash and a pack-relative entry. Its `description`
|
|
337
|
+
* and `visuals` (garden's pack gate accepts both, warn-only, and install.py stages the declared images at their
|
|
338
|
+
* manifest paths) are fail-open as for a studio-bundle editor; the images are read with {@link resolveVisuals}
|
|
339
|
+
* against the installed pack's root (crew#1702).
|
|
340
|
+
*/
|
|
341
|
+
export const PackEditorSchema = EditorManifestFields.extend({
|
|
329
342
|
entry: z.string().regex(/\.html$/u),
|
|
330
343
|
sha256: z.string().regex(/^[0-9a-f]{64}$/u),
|
|
331
344
|
}).superRefine(surfacesMatchProtocol);
|
|
345
|
+
/**
|
|
346
|
+
* The digest a pack editor is installed and read back under: {@link editorEntryDigest} of its admitted entry WITHOUT
|
|
347
|
+
* `description` and `visuals`. They are cosmetic: a new line or icon is not a new build needing consent, and an
|
|
348
|
+
* editor installed before crew read them keeps the digest it was recorded with.
|
|
349
|
+
*/
|
|
350
|
+
export function packEditorDigest(entry) {
|
|
351
|
+
const rest = { ...entry };
|
|
352
|
+
delete rest.description;
|
|
353
|
+
delete rest.visuals;
|
|
354
|
+
return editorEntryDigest(rest);
|
|
355
|
+
}
|
|
332
356
|
/**
|
|
333
357
|
* Read one pack editor at serve-time quality: the manifest entry for `id` in `<root>/wicked-pack.json`,
|
|
334
358
|
* its entry a real file inside the pack, within its caps, loading nothing from outside, and hashing to
|
|
@@ -362,7 +386,7 @@ export function readPackEditor(pack, id, log) {
|
|
|
362
386
|
const m = parsed.data;
|
|
363
387
|
if (FIRST_PARTY_ID.test(m.id) || m.id === 'wicked')
|
|
364
388
|
return why('a pack may not declare a wicked-* editor');
|
|
365
|
-
if (
|
|
389
|
+
if (packEditorDigest(m) !== pack.manifestSha256)
|
|
366
390
|
return why('its manifest entry changed since it was installed');
|
|
367
391
|
if (m.entry !== pack.entry)
|
|
368
392
|
return why(`its entry moved (${pack.entry} → ${m.entry})`);
|
|
@@ -397,8 +421,11 @@ export function readPackEditor(pack, id, log) {
|
|
|
397
421
|
const sha = sha256Of(buf);
|
|
398
422
|
if (sha !== m.sha256 || sha !== pack.sha256)
|
|
399
423
|
return why('its entry no longer matches the hash it was installed with');
|
|
400
|
-
const manifest = { id: m.id, title: m.title, version: m.version, protocol: m.protocol, kinds: m.kinds, entry: m.entry, sizes: m.sizes, permissions: m.permissions, ...(m.panels !== undefined ? { panels: m.panels } : {}), ...(m.limits !== undefined ? { limits: m.limits } : {}), ...(m.surfaces !== undefined ? { surfaces: m.surfaces } : {}) };
|
|
401
|
-
|
|
424
|
+
const manifest = { id: m.id, title: m.title, version: m.version, protocol: m.protocol, kinds: m.kinds, entry: m.entry, sizes: m.sizes, permissions: m.permissions, ...(m.panels !== undefined ? { panels: m.panels } : {}), ...(m.limits !== undefined ? { limits: m.limits } : {}), ...(m.surfaces !== undefined ? { surfaces: m.surfaces } : {}), ...(m.description !== undefined ? { description: m.description } : {}), ...(m.visuals !== undefined ? { visuals: m.visuals } : {}) };
|
|
425
|
+
// Image paths are pack-root relative (garden install.py stages them there); the same anchored, no-follow, capped
|
|
426
|
+
// reads as a studio-bundle editor's. A bad image is left out with its reason; the editor still serves.
|
|
427
|
+
const visuals = resolveVisuals(pack.root, m.visuals, (msg) => log?.(`[editors] ${id} (pack ${pack.name}): visual ${msg}; left out`));
|
|
428
|
+
return { kind: 'editor', manifest, sha256: sha, bytes: buf.byteLength, entryPath, firstParty: false, source: 'pack', pack, ...(visuals !== undefined ? { visuals } : {}) };
|
|
402
429
|
}
|
|
403
430
|
/**
|
|
404
431
|
* Read one pack RUN PLUGIN (CS7) at serve-time quality — the same fences {@link readPackEditor} applies: the entry
|
|
@@ -481,11 +508,17 @@ const InstalledPackSchema = z.object({
|
|
|
481
508
|
manifestSha256: z.string().regex(/^[0-9a-f]{64}$/u),
|
|
482
509
|
installedAt: z.string(),
|
|
483
510
|
conformance: z.object({ ok: z.literal(true), at: z.string(), cases: z.array(z.string()) }),
|
|
511
|
+
skills: z.array(z.object({ name: z.string(), key: z.string() })).optional(),
|
|
512
|
+
presets: z.array(z.string()).optional(),
|
|
484
513
|
});
|
|
485
514
|
/** An operator flag by editor id: own properties only (an id like `constructor` is not an inherited key, codex r5). */
|
|
486
515
|
function flagOf(flags, id) {
|
|
487
516
|
return Object.hasOwn(flags, id) && typeof flags[id] === 'boolean' ? flags[id] : undefined;
|
|
488
517
|
}
|
|
518
|
+
const PackExtrasOwnedSchema = z.object({
|
|
519
|
+
skills: z.array(z.object({ name: z.string(), key: z.string() })),
|
|
520
|
+
presets: z.array(z.string()),
|
|
521
|
+
});
|
|
489
522
|
export class EditorRegistry {
|
|
490
523
|
records = new Map();
|
|
491
524
|
stateFile;
|
|
@@ -495,6 +528,8 @@ export class EditorRegistry {
|
|
|
495
528
|
this.log = opts.log ?? (() => undefined);
|
|
496
529
|
const state = this.readState();
|
|
497
530
|
this.persistedFlags = state.enabled;
|
|
531
|
+
for (const [name, owned] of Object.entries(state.extras ?? {}))
|
|
532
|
+
this.extras.set(name, owned);
|
|
498
533
|
if (opts.studioRoot !== undefined) {
|
|
499
534
|
for (const r of discoverStudioEditors(opts.studioRoot, this.log)) {
|
|
500
535
|
this.records.set(r.manifest.id, { ...r, enabled: flagOf(state.enabled, r.manifest.id) ?? true });
|
|
@@ -515,6 +550,8 @@ export class EditorRegistry {
|
|
|
515
550
|
installed = new Map();
|
|
516
551
|
/** The flags as read at boot: kept for an installed editor skipped at boot, so a write never drops its "off". */
|
|
517
552
|
persistedFlags = {};
|
|
553
|
+
/** (crew#1703) Each pack's skills and presets, by pack name: outlives the pack's editor rows. */
|
|
554
|
+
extras = new Map();
|
|
518
555
|
readState() {
|
|
519
556
|
try {
|
|
520
557
|
const raw = JSON.parse(readFileSync(this.stateFile, 'utf8'));
|
|
@@ -528,13 +565,24 @@ export class EditorRegistry {
|
|
|
528
565
|
// `kind` is absent in files written before run plugins existed: drop an undefined so the record stays
|
|
529
566
|
// exactly shaped (exactOptionalPropertyTypes) — an absent kind reads back as an editor.
|
|
530
567
|
if (EDITOR_ID.test(k) && parsed.success) {
|
|
531
|
-
const { kind, ...rest } = parsed.data;
|
|
532
|
-
installed[k] =
|
|
568
|
+
const { kind, skills, presets, ...rest } = parsed.data;
|
|
569
|
+
installed[k] = {
|
|
570
|
+
...(kind === undefined ? {} : { kind }),
|
|
571
|
+
...rest,
|
|
572
|
+
...(skills === undefined ? {} : { skills }),
|
|
573
|
+
...(presets === undefined ? {} : { presets }),
|
|
574
|
+
};
|
|
533
575
|
}
|
|
534
576
|
else
|
|
535
577
|
this.log(`[editors] ${k}: its install record in ${EDITORS_STATE_FILENAME} is malformed; ignored`);
|
|
536
578
|
}
|
|
537
|
-
|
|
579
|
+
const extras = {};
|
|
580
|
+
for (const [k, v] of Object.entries(raw.extras ?? {})) {
|
|
581
|
+
const parsed = PackExtrasOwnedSchema.safeParse(v);
|
|
582
|
+
if (EDITOR_ID.test(k) && parsed.success)
|
|
583
|
+
extras[k] = parsed.data;
|
|
584
|
+
}
|
|
585
|
+
return { v: 1, enabled, installed, extras };
|
|
538
586
|
}
|
|
539
587
|
catch {
|
|
540
588
|
return { v: 1, enabled: {} };
|
|
@@ -551,6 +599,8 @@ export class EditorRegistry {
|
|
|
551
599
|
const state = { v: 1, enabled };
|
|
552
600
|
if (this.installed.size > 0)
|
|
553
601
|
state.installed = Object.fromEntries([...this.installed].sort(([a], [b]) => a.localeCompare(b)));
|
|
602
|
+
if (this.extras.size > 0)
|
|
603
|
+
state.extras = Object.fromEntries([...this.extras].sort(([a], [b]) => a.localeCompare(b)));
|
|
554
604
|
mkdirSync(join(this.stateFile, '..'), { recursive: true });
|
|
555
605
|
const tmp = `${this.stateFile}.${process.pid}.tmp`;
|
|
556
606
|
writeFileSync(tmp, `${JSON.stringify(state, null, 2)}\n`, { mode: 0o600 });
|
|
@@ -582,6 +632,7 @@ export class EditorRegistry {
|
|
|
582
632
|
commit(change) {
|
|
583
633
|
const records = new Map(this.records);
|
|
584
634
|
const installed = new Map(this.installed);
|
|
635
|
+
const extras = new Map(this.extras);
|
|
585
636
|
const flags = { ...this.persistedFlags };
|
|
586
637
|
change();
|
|
587
638
|
try {
|
|
@@ -594,6 +645,9 @@ export class EditorRegistry {
|
|
|
594
645
|
this.installed.clear();
|
|
595
646
|
for (const [k, v] of installed)
|
|
596
647
|
this.installed.set(k, v);
|
|
648
|
+
this.extras.clear();
|
|
649
|
+
for (const [k, v] of extras)
|
|
650
|
+
this.extras.set(k, v);
|
|
597
651
|
this.persistedFlags = flags;
|
|
598
652
|
throw err;
|
|
599
653
|
}
|
|
@@ -608,12 +662,27 @@ export class EditorRegistry {
|
|
|
608
662
|
* an earlier consent, especially when the new pack came from a different directory. Use the
|
|
609
663
|
* installed map so an entry skipped at boot is removed too, including its persisted switch.
|
|
610
664
|
*/
|
|
611
|
-
|
|
665
|
+
/** (crew#1703) Every pack install this daemon has persisted, a record skipped at boot included. */
|
|
666
|
+
installedPacks() {
|
|
667
|
+
return [...this.installed.values()];
|
|
668
|
+
}
|
|
669
|
+
/** (crew#1703) The skills and presets the pack `name` added: its records' and the kept map's, so they stay its own
|
|
670
|
+
* after its last editor is removed. */
|
|
671
|
+
packExtrasOwned(name) {
|
|
672
|
+
const rows = [...this.installed.values()].filter((p) => p.name === name);
|
|
673
|
+
const kept = this.extras.get(name);
|
|
674
|
+
const skills = [...rows.flatMap((p) => p.skills ?? []), ...(kept?.skills ?? [])].filter((k, i, a) => a.findIndex((x) => x.key === k.key) === i);
|
|
675
|
+
const presets = [...new Set([...rows.flatMap((p) => p.presets ?? []), ...(kept?.presets ?? [])])];
|
|
676
|
+
return { skills, presets };
|
|
677
|
+
}
|
|
678
|
+
/** (crew#1703) The checks {@link installPack} runs before it commits, committing nothing: a pack install runs them
|
|
679
|
+
* before it writes the pack's presets and skills, so an id conflict or an unreadable editor writes nothing. */
|
|
680
|
+
preflight(packs) {
|
|
681
|
+
this.readIncoming(packs);
|
|
682
|
+
}
|
|
683
|
+
readIncoming(packs) {
|
|
612
684
|
const read = [];
|
|
613
|
-
|
|
614
|
-
const incoming = new Set(packs.map(({ id }) => id));
|
|
615
|
-
const dropped = [...this.installed].filter(([id, pack]) => pack.name === name && !incoming.has(id)).map(([id]) => id).sort();
|
|
616
|
-
let updated = dropped.length > 0;
|
|
685
|
+
let anyHeld = false;
|
|
617
686
|
for (const { id, pack } of packs) {
|
|
618
687
|
const existing = this.records.get(id);
|
|
619
688
|
if (existing?.firstParty === true)
|
|
@@ -622,12 +691,20 @@ export class EditorRegistry {
|
|
|
622
691
|
if (held !== undefined && held.name !== pack.name)
|
|
623
692
|
throw new EditorInstallConflict(`${id} is already installed from the pack ${held.name}; remove it first`);
|
|
624
693
|
if (held !== undefined)
|
|
625
|
-
|
|
694
|
+
anyHeld = true;
|
|
626
695
|
const r = readPackArtifact(pack, id, this.log);
|
|
627
696
|
if (r === null)
|
|
628
697
|
throw new EditorInstallConflict(`${id} did not read back from ${pack.root} (see the daemon log)`);
|
|
629
698
|
read.push(r);
|
|
630
699
|
}
|
|
700
|
+
return { read, held: anyHeld };
|
|
701
|
+
}
|
|
702
|
+
installPack(packs, enabled, owned) {
|
|
703
|
+
const name = packs[0]?.pack.name;
|
|
704
|
+
const incoming = new Set(packs.map(({ id }) => id));
|
|
705
|
+
const dropped = [...this.installed].filter(([id, pack]) => pack.name === name && !incoming.has(id)).map(([id]) => id).sort();
|
|
706
|
+
const { read, held } = this.readIncoming(packs);
|
|
707
|
+
const updated = dropped.length > 0 || held;
|
|
631
708
|
const out = read.map((r) => {
|
|
632
709
|
const id = r.manifest.id;
|
|
633
710
|
// An update keeps the operator's switch: the live record's, else the one persisted for a record
|
|
@@ -646,9 +723,53 @@ export class EditorRegistry {
|
|
|
646
723
|
this.records.set(r.manifest.id, r);
|
|
647
724
|
this.installed.set(r.manifest.id, r.pack);
|
|
648
725
|
}
|
|
726
|
+
// crew#1703: the pack's skills and presets, kept by name beyond its editor rows.
|
|
727
|
+
const first = packs[0]?.pack;
|
|
728
|
+
const keep = owned ?? (first !== undefined ? { skills: first.skills ?? [], presets: first.presets ?? [] } : undefined);
|
|
729
|
+
if (name !== undefined && keep !== undefined) {
|
|
730
|
+
if (keep.skills.length > 0 || keep.presets.length > 0)
|
|
731
|
+
this.extras.set(name, { skills: [...keep.skills], presets: [...keep.presets] });
|
|
732
|
+
else
|
|
733
|
+
this.extras.delete(name);
|
|
734
|
+
}
|
|
649
735
|
});
|
|
650
736
|
return { records: out, updated, removed: dropped };
|
|
651
737
|
}
|
|
738
|
+
/**
|
|
739
|
+
* (crew#1703) Name the pack's skills and presets on each of its rows (`current`, what the skills root and the preset
|
|
740
|
+
* store hold now), and keep `owned` (everything the pack added, a withdrawn skill included) as its own.
|
|
741
|
+
*/
|
|
742
|
+
setPackExtras(name, current, owned) {
|
|
743
|
+
this.commit(() => {
|
|
744
|
+
for (const [id, p] of this.installed) {
|
|
745
|
+
if (p.name !== name)
|
|
746
|
+
continue;
|
|
747
|
+
const next = { ...p };
|
|
748
|
+
delete next.skills;
|
|
749
|
+
delete next.presets;
|
|
750
|
+
if (current.skills.length > 0)
|
|
751
|
+
next.skills = [...current.skills];
|
|
752
|
+
if (current.presets.length > 0)
|
|
753
|
+
next.presets = [...current.presets];
|
|
754
|
+
this.installed.set(id, next);
|
|
755
|
+
const r = this.records.get(id);
|
|
756
|
+
if (r !== undefined && r.pack !== undefined)
|
|
757
|
+
this.records.set(id, { ...r, pack: next });
|
|
758
|
+
}
|
|
759
|
+
if (owned.skills.length > 0 || owned.presets.length > 0)
|
|
760
|
+
this.extras.set(name, { skills: [...owned.skills], presets: [...owned.presets] });
|
|
761
|
+
else
|
|
762
|
+
this.extras.delete(name);
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
/** (crew#1703) The pack an installed editor or plugin came from, or `null`. */
|
|
766
|
+
packNameOf(id) {
|
|
767
|
+
return this.installed.get(id)?.name ?? null;
|
|
768
|
+
}
|
|
769
|
+
/** (crew#1703) Whether any installed editor or plugin still comes from the pack `name` (`except`: leaving that id out). */
|
|
770
|
+
hasPack(name, except) {
|
|
771
|
+
return [...this.installed].some(([id, p]) => p.name === name && id !== except);
|
|
772
|
+
}
|
|
652
773
|
/** Remove an installed pack editor (the pack's files are the installer's to delete). `false` when it is not one. */
|
|
653
774
|
removeInstalled(id) {
|
|
654
775
|
if (!this.installed.has(id))
|
|
@@ -691,6 +812,7 @@ export class EditorRegistry {
|
|
|
691
812
|
source: 'pack',
|
|
692
813
|
entry_url: `/api/v1/editors/${encodeURIComponent(m.id)}/${encodeURIComponent(m.version)}/entry`,
|
|
693
814
|
...(m.description !== undefined ? { description: m.description } : {}),
|
|
815
|
+
...packExtrasView(r.pack),
|
|
694
816
|
};
|
|
695
817
|
}
|
|
696
818
|
const m = r.manifest;
|
|
@@ -712,6 +834,7 @@ export class EditorRegistry {
|
|
|
712
834
|
entry_url: `/api/v1/editors/${encodeURIComponent(m.id)}/${encodeURIComponent(m.version)}/entry`,
|
|
713
835
|
...(m.description !== undefined ? { description: m.description } : {}),
|
|
714
836
|
...(r.visuals !== undefined ? { visuals: structuredClone(r.visuals) } : {}),
|
|
837
|
+
...packExtrasView(r.pack),
|
|
715
838
|
};
|
|
716
839
|
}
|
|
717
840
|
}
|