@intentius/chant 0.101.0 → 0.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/checks.d.ts.map +1 -1
- package/dist/attrref.d.ts.map +1 -1
- package/dist/audit/discover.d.ts.map +1 -1
- package/dist/audit/nginx.d.ts.map +1 -1
- package/dist/audit/prior-art.d.ts +48 -0
- package/dist/audit/prior-art.d.ts.map +1 -1
- package/dist/behaviour-kinds.d.ts.map +1 -1
- package/dist/builder.d.ts.map +1 -1
- package/dist/cli/commands/carve-emit.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon.d.ts +16 -0
- package/dist/cli/commands/check-lexicon.d.ts.map +1 -1
- package/dist/cli/commands/import.d.ts +8 -0
- package/dist/cli/commands/import.d.ts.map +1 -1
- package/dist/cli/commands/init-lexicon.d.ts.map +1 -1
- package/dist/cli/commands/init.d.ts +19 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/onboard.d.ts +9 -0
- package/dist/cli/commands/onboard.d.ts.map +1 -1
- package/dist/cli/commands/pinned-upgrade.d.ts +19 -5
- package/dist/cli/commands/pinned-upgrade.d.ts.map +1 -1
- package/dist/cli/handlers/dev.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/misc.d.ts.map +1 -1
- package/dist/cli/handlers/operator.d.ts +9 -0
- package/dist/cli/handlers/operator.d.ts.map +1 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/lsp/server.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/mcp/server.d.ts.map +1 -1
- package/dist/cli/mcp/tools/build.d.ts.map +1 -1
- package/dist/cli/mcp/tools/composites.d.ts.map +1 -1
- package/dist/cli/mcp/tools/explain.d.ts.map +1 -1
- package/dist/cli/mcp/tools/import.d.ts.map +1 -1
- package/dist/cli/mcp/tools/lint.d.ts.map +1 -1
- package/dist/cli/mcp/tools/scaffold.d.ts.map +1 -1
- package/dist/cli/mcp/tools/search.d.ts.map +1 -1
- package/dist/cli/mcp/workspace-tools.d.ts +1 -1
- package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +11 -2
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/codegen/fetch.d.ts.map +1 -1
- package/dist/codegen/naming.d.ts.map +1 -1
- package/dist/codegen/pinned-upgrade.d.ts +67 -3
- package/dist/codegen/pinned-upgrade.d.ts.map +1 -1
- package/dist/codegen/registry.d.ts.map +1 -1
- package/dist/components/capability-plugin-loader.d.ts.map +1 -1
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/fan-out.d.ts.map +1 -1
- package/dist/components/starter-plugin.d.ts.map +1 -1
- package/dist/components/verbs/process-runner.d.ts.map +1 -1
- package/dist/components/verbs/r2-sync.d.ts.map +1 -1
- package/dist/components/verbs/run-agent.d.ts.map +1 -1
- package/dist/components/verbs/sbom-generator.d.ts.map +1 -1
- package/dist/components/verbs/sign.d.ts.map +1 -1
- package/dist/components/verbs/verify.d.ts.map +1 -1
- package/dist/components/verbs/vuln-gate.d.ts.map +1 -1
- package/dist/components/verbs/vuln-scan.d.ts.map +1 -1
- package/dist/components/verbs/wrangler.d.ts.map +1 -1
- package/dist/composite.d.ts.map +1 -1
- package/dist/config.d.ts +19 -7
- package/dist/config.d.ts.map +1 -1
- package/dist/declarable.d.ts +16 -0
- package/dist/declarable.d.ts.map +1 -1
- package/dist/discovery/cache.d.ts.map +1 -1
- package/dist/discovery/fold-import.d.ts +15 -5
- package/dist/discovery/fold-import.d.ts.map +1 -1
- package/dist/discovery/param-deps.d.ts +16 -0
- package/dist/discovery/param-deps.d.ts.map +1 -1
- package/dist/discovery/sandbox/policy-wire.d.ts.map +1 -1
- package/dist/discovery/specifier-resolve.d.ts +37 -0
- package/dist/discovery/specifier-resolve.d.ts.map +1 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/fold/fold.d.ts +3 -1
- package/dist/fold/fold.d.ts.map +1 -1
- package/dist/graph-detail.d.ts.map +1 -1
- package/dist/graph-ir.d.ts.map +1 -1
- package/dist/graph-layout.d.ts.map +1 -1
- package/dist/import/base-parser.d.ts.map +1 -1
- package/dist/import/embedded.d.ts +7 -0
- package/dist/import/embedded.d.ts.map +1 -1
- package/dist/import/parser-options.d.ts +14 -0
- package/dist/import/parser-options.d.ts.map +1 -0
- package/dist/import/parser.d.ts +17 -0
- package/dist/import/parser.d.ts.map +1 -1
- package/dist/kubectl-context.d.ts.map +1 -1
- package/dist/lexicon-output.d.ts.map +1 -1
- package/dist/lexicon-schema.d.ts +3 -3
- package/dist/lexicon.d.ts +55 -3
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/assert-live.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts +15 -0
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/member-ledger.d.ts.map +1 -1
- package/dist/lifecycle/observe.d.ts.map +1 -1
- package/dist/lifecycle/plan-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/scenario.d.ts.map +1 -1
- package/dist/lifecycle/status.d.ts.map +1 -1
- package/dist/lifecycle/work-lease.d.ts +61 -2
- package/dist/lifecycle/work-lease.d.ts.map +1 -1
- package/dist/lint/config.d.ts +8 -8
- package/dist/lint/engine.d.ts +6 -0
- package/dist/lint/engine.d.ts.map +1 -1
- package/dist/lsp/lexicon-providers.d.ts.map +1 -1
- package/dist/op/activities/activity-contracts.d.ts +11 -11
- package/dist/op/activities/apply.d.ts +79 -9
- package/dist/op/activities/apply.d.ts.map +1 -1
- package/dist/op/activities/decide.d.ts.map +1 -1
- package/dist/op/activities/index.d.ts +1 -1
- package/dist/op/activities/index.d.ts.map +1 -1
- package/dist/op/activities/lexicon-upgrade.d.ts +44 -12
- package/dist/op/activities/lexicon-upgrade.d.ts.map +1 -1
- package/dist/op/activity-contract.d.ts +1 -1
- package/dist/op/activity-failure.d.ts.map +1 -1
- package/dist/op/activity-profiles.d.ts.map +1 -1
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/composites/apply-op.d.ts +12 -5
- package/dist/op/composites/apply-op.d.ts.map +1 -1
- package/dist/op/composites/lexicon-upgrade-op.d.ts +22 -6
- package/dist/op/composites/lexicon-upgrade-op.d.ts.map +1 -1
- package/dist/op/decide-backend.d.ts.map +1 -1
- package/dist/op/decide-read-inputs.d.ts.map +1 -1
- package/dist/op/emulator-lifecycle.d.ts +21 -2
- package/dist/op/emulator-lifecycle.d.ts.map +1 -1
- package/dist/op/gate-approval.d.ts +5 -1
- package/dist/op/gate-approval.d.ts.map +1 -1
- package/dist/op/gate-wait.d.ts.map +1 -1
- package/dist/op/gate.d.ts +19 -3
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/index.d.ts +2 -0
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/local-executor.d.ts +6 -0
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/operator.d.ts.map +1 -1
- package/dist/op/run-context.d.ts +39 -0
- package/dist/op/run-context.d.ts.map +1 -0
- package/dist/op/run-live.d.ts.map +1 -1
- package/dist/op/runtimes/local.d.ts.map +1 -1
- package/dist/op/source-archive.d.ts.map +1 -1
- package/dist/op/steward-beside.d.ts.map +1 -1
- package/dist/op/steward-points.d.ts.map +1 -1
- package/dist/op/steward.d.ts.map +1 -1
- package/dist/op/types.d.ts +8 -3
- package/dist/op/types.d.ts.map +1 -1
- package/dist/op/work-lease-run.d.ts +24 -4
- package/dist/op/work-lease-run.d.ts.map +1 -1
- package/dist/project-root.d.ts.map +1 -1
- package/dist/provenance.d.ts +21 -0
- package/dist/provenance.d.ts.map +1 -1
- package/dist/pseudo-parameter.d.ts.map +1 -1
- package/dist/reconcile.d.ts.map +1 -1
- package/dist/secret-materialization.d.ts.map +1 -1
- package/dist/terraform/emit-source.d.ts.map +1 -1
- package/dist/terraform/parse.d.ts.map +1 -1
- package/dist/testing.d.ts.map +1 -1
- package/dist/workspace/__fixtures__/contract-repo.d.ts.map +1 -1
- package/dist/workspace/__fixtures__/decide-workspace.d.ts +1 -1
- package/dist/workspace/__fixtures__/decide-workspace.d.ts.map +1 -1
- package/dist/workspace/agent-cli.d.ts +5 -0
- package/dist/workspace/agent-cli.d.ts.map +1 -1
- package/dist/workspace/box-factory.d.ts +73 -0
- package/dist/workspace/box-factory.d.ts.map +1 -0
- package/dist/workspace/changes.d.ts.map +1 -1
- package/dist/workspace/chant-migrations/chud-lexicon-exit.d.ts.map +1 -1
- package/dist/workspace/checks/boxes.d.ts.map +1 -1
- package/dist/workspace/checks.d.ts +5 -0
- package/dist/workspace/checks.d.ts.map +1 -1
- package/dist/workspace/compose-graph.d.ts +10 -0
- package/dist/workspace/compose-graph.d.ts.map +1 -1
- package/dist/workspace/conformance/index.d.ts +67 -6
- package/dist/workspace/conformance/index.d.ts.map +1 -1
- package/dist/workspace/conformance/vitest.d.ts +12 -3
- package/dist/workspace/conformance/vitest.d.ts.map +1 -1
- package/dist/workspace/conformance/writer.d.ts +368 -0
- package/dist/workspace/conformance/writer.d.ts.map +1 -0
- package/dist/workspace/decide.d.ts +1 -1
- package/dist/workspace/decide.d.ts.map +1 -1
- package/dist/workspace/declaration.d.ts +91 -4
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.schema.json +234 -5
- package/dist/workspace/generated-files.d.ts.map +1 -1
- package/dist/workspace/graph-cache.d.ts.map +1 -1
- package/dist/workspace/graph-cli.d.ts +2 -0
- package/dist/workspace/graph-cli.d.ts.map +1 -1
- package/dist/workspace/identity.d.ts +111 -0
- package/dist/workspace/identity.d.ts.map +1 -0
- package/dist/workspace/intent-cli.d.ts +7 -4
- package/dist/workspace/intent-cli.d.ts.map +1 -1
- package/dist/workspace/intent-record.d.ts +8 -1
- package/dist/workspace/intent-record.d.ts.map +1 -1
- package/dist/workspace/intent.d.ts +149 -5
- package/dist/workspace/intent.d.ts.map +1 -1
- package/dist/workspace/kinds.d.ts +18 -4
- package/dist/workspace/kinds.d.ts.map +1 -1
- package/dist/workspace/lineage-hash-index.d.ts.map +1 -1
- package/dist/workspace/lineage-lock.d.ts +2 -2
- package/dist/workspace/lineage-lock.d.ts.map +1 -1
- package/dist/workspace/links.d.ts.map +1 -1
- package/dist/workspace/points.d.ts.map +1 -1
- package/dist/workspace/principal-classes.d.ts +114 -0
- package/dist/workspace/principal-classes.d.ts.map +1 -0
- package/dist/workspace/reason-codes.d.ts +21 -1
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/record-assets.d.ts.map +1 -1
- package/dist/workspace/records-checkout.d.ts +54 -0
- package/dist/workspace/records-checkout.d.ts.map +1 -0
- package/dist/workspace/records-cli.d.ts +27 -1
- package/dist/workspace/records-cli.d.ts.map +1 -1
- package/dist/workspace/records-close.d.ts +1 -1
- package/dist/workspace/records-close.d.ts.map +1 -1
- package/dist/workspace/records-since.d.ts.map +1 -1
- package/dist/workspace/records-write.d.ts +5 -4
- package/dist/workspace/records-write.d.ts.map +1 -1
- package/dist/workspace/records.d.ts +15 -0
- package/dist/workspace/records.d.ts.map +1 -1
- package/dist/workspace/runs-cli.d.ts +164 -0
- package/dist/workspace/runs-cli.d.ts.map +1 -0
- package/dist/workspace/runs.d.ts +423 -0
- package/dist/workspace/runs.d.ts.map +1 -0
- package/dist/workspace/source-block.d.ts +1 -1
- package/dist/workspace/source-block.d.ts.map +1 -1
- package/dist/workspace/status-gates.d.ts +15 -3
- package/dist/workspace/status-gates.d.ts.map +1 -1
- package/dist/workspace/status.d.ts +10 -0
- package/dist/workspace/status.d.ts.map +1 -1
- package/dist/workspace/symbols.d.ts +52 -0
- package/dist/workspace/symbols.d.ts.map +1 -0
- package/dist/workspace/trailer-joins.d.ts +46 -0
- package/dist/workspace/trailer-joins.d.ts.map +1 -0
- package/dist/workspace/trailers.d.ts +89 -0
- package/dist/workspace/trailers.d.ts.map +1 -0
- package/dist/workspace/trust/attestor.d.ts.map +1 -1
- package/dist/workspace/trust/rotation.d.ts.map +1 -1
- package/dist/workspace/trust/seal.d.ts +33 -0
- package/dist/workspace/trust/seal.d.ts.map +1 -1
- package/dist/workspace/trust/test-repo.d.ts.map +1 -1
- package/dist/workspace/work-cli.d.ts +39 -3
- package/dist/workspace/work-cli.d.ts.map +1 -1
- package/dist/workspace/work-evidence.d.ts +1 -1
- package/dist/workspace/work-evidence.d.ts.map +1 -1
- package/dist/workspace/work.d.ts +26 -1
- package/dist/workspace/work.d.ts.map +1 -1
- package/dist/workspace/workspace-principals.schema.json +60 -0
- package/dist/workspace/write-scope.d.ts +79 -19
- package/dist/workspace/write-scope.d.ts.map +1 -1
- package/dist/yaml.d.ts +21 -39
- package/dist/yaml.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/audit/prior-art.ts +15 -0
- package/src/cli/commands/__fixtures__/init-lexicon-output/package.json +1 -1
- package/src/cli/commands/carve-emit-state.test.ts +4 -0
- package/src/cli/commands/carve-emit.ts +5 -19
- package/src/cli/commands/check-lexicon.test.ts +62 -1
- package/src/cli/commands/check-lexicon.ts +36 -6
- package/src/cli/commands/import-live.test.ts +18 -0
- package/src/cli/commands/import-parser-options.test.ts +133 -0
- package/src/cli/commands/import.ts +21 -3
- package/src/cli/commands/init-lexicon/templates/project.ts +1 -1
- package/src/cli/commands/init.test.ts +8 -1
- package/src/cli/commands/init.ts +23 -8
- package/src/cli/commands/lint.test.ts +37 -0
- package/src/cli/commands/onboard.test.ts +53 -3
- package/src/cli/commands/onboard.ts +52 -4
- package/src/cli/commands/pinned-upgrade.ts +73 -33
- package/src/cli/handlers/__snapshots__/build-member.test.ts.snap +2 -2
- package/src/cli/handlers/components.ts +2 -2
- package/src/cli/handlers/dev.ts +8 -6
- package/src/cli/handlers/lifecycle.test.ts +67 -0
- package/src/cli/handlers/lifecycle.ts +6 -5
- package/src/cli/handlers/misc.ts +2 -0
- package/src/cli/handlers/operator.ts +87 -3
- package/src/cli/handlers/run.test.ts +111 -0
- package/src/cli/handlers/run.ts +85 -24
- package/src/cli/handlers/scenario.ts +2 -2
- package/src/cli/main.test.ts +1 -0
- package/src/cli/main.ts +65 -11
- package/src/cli/mcp/workspace-tools.test.ts +5 -2
- package/src/cli/mcp/workspace-tools.ts +29 -2
- package/src/cli/registry.ts +11 -2
- package/src/codegen/pinned-upgrade-multi.test.ts +157 -0
- package/src/codegen/pinned-upgrade-tags.test.ts +112 -0
- package/src/codegen/pinned-upgrade.test.ts +104 -0
- package/src/codegen/pinned-upgrade.ts +250 -56
- package/src/codegen/testdata/postgres-tags.json +242 -0
- package/src/config.test.ts +21 -0
- package/src/config.ts +15 -0
- package/src/declarable.test.ts +21 -0
- package/src/declarable.ts +19 -0
- package/src/discovery/fold-composite.test.ts +41 -5
- package/src/discovery/fold-import.test.ts +129 -0
- package/src/discovery/fold-import.ts +643 -131
- package/src/discovery/fold-package-composite.test.ts +264 -0
- package/src/discovery/fold-specifiers.test.ts +191 -0
- package/src/discovery/param-deps.test.ts +66 -1
- package/src/discovery/param-deps.ts +45 -0
- package/src/discovery/specifier-resolve.ts +344 -0
- package/src/fold/fold.test.ts +39 -1
- package/src/fold/fold.ts +83 -9
- package/src/fold-provenance.test.ts +140 -0
- package/src/graph-ir.test.ts +83 -0
- package/src/graph-ir.ts +29 -0
- package/src/import/embedded.test.ts +20 -0
- package/src/import/embedded.ts +13 -0
- package/src/import/parser-options.ts +46 -0
- package/src/import/parser.ts +20 -0
- package/src/lexicon.ts +55 -3
- package/src/lifecycle/gate-ledger.ts +16 -0
- package/src/lifecycle/observe.test.ts +18 -0
- package/src/lifecycle/observe.ts +6 -4
- package/src/lifecycle/snapshot.ts +2 -2
- package/src/lifecycle/work-lease.test.ts +1 -1
- package/src/lifecycle/work-lease.ts +93 -2
- package/src/lint/engine.test.ts +55 -0
- package/src/lint/engine.ts +30 -4
- package/src/lint/output-docs.test.ts +59 -56
- package/src/op/activities/apply.test.ts +189 -5
- package/src/op/activities/apply.ts +230 -8
- package/src/op/activities/index.ts +3 -0
- package/src/op/activities/lexicon-upgrade.test.ts +160 -6
- package/src/op/activities/lexicon-upgrade.ts +154 -51
- package/src/op/composites/apply-op.ts +12 -5
- package/src/op/composites/composites.test.ts +30 -3
- package/src/op/composites/lexicon-upgrade-op.test.ts +7 -2
- package/src/op/composites/lexicon-upgrade-op.ts +29 -8
- package/src/op/emulator-lifecycle.test.ts +23 -0
- package/src/op/emulator-lifecycle.ts +52 -14
- package/src/op/gate-approval.test.ts +74 -0
- package/src/op/gate-approval.ts +5 -1
- package/src/op/gate.ts +31 -5
- package/src/op/index.ts +2 -0
- package/src/op/local-executor.test.ts +15 -0
- package/src/op/local-executor.ts +40 -12
- package/src/op/local-output.ts +1 -1
- package/src/op/operator.ts +4 -0
- package/src/op/run-context.test.ts +141 -0
- package/src/op/run-context.ts +51 -0
- package/src/op/runtimes/local.test.ts +14 -0
- package/src/op/runtimes/local.ts +2 -0
- package/src/op/steward-beside.ts +2 -0
- package/src/op/types.ts +8 -3
- package/src/op/work-lease-run.test.ts +47 -0
- package/src/op/work-lease-run.ts +73 -11
- package/src/provenance.ts +35 -0
- package/src/workspace/__fixtures__/studio-template-84c8b21.json +1 -1
- package/src/workspace/agent-cli.ts +7 -3
- package/src/workspace/agent.schema.json +22 -0
- package/src/workspace/box-factory.test.ts +320 -0
- package/src/workspace/box-factory.ts +103 -0
- package/src/workspace/changes.schema.json +12 -20
- package/src/workspace/changes.ts +4 -1
- package/src/workspace/checks/boxes.test.ts +2 -0
- package/src/workspace/checks.ts +29 -5
- package/src/workspace/compose-graph.ts +7 -0
- package/src/workspace/conformance/__writer_fixture__/answers/answer.kind.mjs +27 -0
- package/src/workspace/conformance/__writer_fixture__/answers/answer.schema.json +95 -0
- package/src/workspace/conformance/__writer_fixture__/decisions/points.json +132 -0
- package/src/workspace/conformance/__writer_fixture__/sessions/session.kind.mjs +48 -0
- package/src/workspace/conformance/__writer_fixture__/sessions/session.schema.json +108 -0
- package/src/workspace/conformance/__writer_fixture__/work/W-001-the-writer-suite-works-this-item.md +25 -0
- package/src/workspace/conformance/__writer_fixture__/work/work.kind.mjs +60 -0
- package/src/workspace/conformance/__writer_fixture__/work/work.schema.json +578 -0
- package/src/workspace/conformance/conformance.e2e.test.ts +35 -3
- package/src/workspace/conformance/index.mjs +30 -3
- package/src/workspace/conformance/index.ts +103 -15
- package/src/workspace/conformance/vitest.ts +44 -2
- package/src/workspace/conformance/writer-conformance.e2e.test.ts +131 -0
- package/src/workspace/conformance/writer.test.ts +156 -0
- package/src/workspace/conformance/writer.ts +880 -0
- package/src/workspace/decide.ts +7 -1
- package/src/workspace/declaration.schema.json +234 -5
- package/src/workspace/declaration.ts +174 -10
- package/src/workspace/graph-cli.ts +5 -2
- package/src/workspace/graph.schema.json +247 -0
- package/src/workspace/identity.test.ts +196 -0
- package/src/workspace/identity.ts +186 -0
- package/src/workspace/intent-cli.ts +64 -10
- package/src/workspace/intent-record.schema.json +208 -0
- package/src/workspace/intent-record.ts +35 -1
- package/src/workspace/intent-why.test.ts +274 -0
- package/src/workspace/intent.schema.json +718 -7
- package/src/workspace/intent.test.ts +11 -2
- package/src/workspace/intent.ts +495 -32
- package/src/workspace/kinds.ts +44 -37
- package/src/workspace/points-write.schema.json +1 -0
- package/src/workspace/principal-classes.test.ts +175 -0
- package/src/workspace/principal-classes.ts +307 -0
- package/src/workspace/reason-codes.test.ts +11 -3
- package/src/workspace/reason-codes.ts +24 -1
- package/src/workspace/records-amend.schema.json +2 -0
- package/src/workspace/records-checkout.ts +106 -0
- package/src/workspace/records-cli.ts +103 -11
- package/src/workspace/records-close.schema.json +1 -0
- package/src/workspace/records-new.schema.json +2 -0
- package/src/workspace/records-review.schema.json +2 -0
- package/src/workspace/records-uncommitted.test.ts +171 -0
- package/src/workspace/records-write.ts +28 -6
- package/src/workspace/records.schema.json +72 -1
- package/src/workspace/records.ts +27 -0
- package/src/workspace/runs-cli.ts +381 -0
- package/src/workspace/runs-write.schema.json +583 -0
- package/src/workspace/runs.schema.json +810 -0
- package/src/workspace/runs.test.ts +242 -0
- package/src/workspace/runs.ts +709 -0
- package/src/workspace/status-contract.test.ts +5 -0
- package/src/workspace/status-gates.ts +22 -8
- package/src/workspace/status.schema.json +127 -2
- package/src/workspace/status.ts +21 -1
- package/src/workspace/symbols.ts +180 -0
- package/src/workspace/trailer-joins.test.ts +171 -0
- package/src/workspace/trailer-joins.ts +82 -0
- package/src/workspace/trailers.ts +148 -0
- package/src/workspace/trust/seal.ts +52 -1
- package/src/workspace/work-cli.e2e.test.ts +28 -1
- package/src/workspace/work-cli.ts +133 -8
- package/src/workspace/work-evidence.schema.json +2 -0
- package/src/workspace/work-history.schema.json +73 -1
- package/src/workspace/work-history.test.ts +48 -5
- package/src/workspace/work-kind-fields.test.ts +154 -0
- package/src/workspace/work-lease.schema.json +14 -1
- package/src/workspace/work.ts +82 -0
- package/src/workspace/workspace-principals.schema.json +60 -0
- package/src/workspace/write-scope.test.ts +128 -2
- package/src/workspace/write-scope.ts +170 -45
- package/src/yaml.test.ts +111 -1
- package/src/yaml.ts +141 -549
|
@@ -0,0 +1,578 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "urn:intentius:chant:work:1",
|
|
4
|
+
"title": "Work item front matter",
|
|
5
|
+
"description": "The front matter of one work item in work/ (#2683): a record in the workspace, with its dependencies inside it, that people and agents share as one queue. The Markdown body after the front matter is the description. Values stay within what YAML and JSON share.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"patternProperties": {
|
|
9
|
+
"^x-": {}
|
|
10
|
+
},
|
|
11
|
+
"required": [
|
|
12
|
+
"schema",
|
|
13
|
+
"id",
|
|
14
|
+
"title",
|
|
15
|
+
"state",
|
|
16
|
+
"implements",
|
|
17
|
+
"needs",
|
|
18
|
+
"constrains",
|
|
19
|
+
"evidence",
|
|
20
|
+
"opened_on",
|
|
21
|
+
"source",
|
|
22
|
+
"supersedes"
|
|
23
|
+
],
|
|
24
|
+
"properties": {
|
|
25
|
+
"schema": {
|
|
26
|
+
"description": "Format version of this file. Bumped only by a change to this schema.",
|
|
27
|
+
"const": 1
|
|
28
|
+
},
|
|
29
|
+
"id": {
|
|
30
|
+
"description": "Stable id: W, a dash and three or more digits. Never reused, never renumbered.",
|
|
31
|
+
"$ref": "#/definitions/workId"
|
|
32
|
+
},
|
|
33
|
+
"title": {
|
|
34
|
+
"description": "What the work is, in a few words.",
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1
|
|
37
|
+
},
|
|
38
|
+
"state": {
|
|
39
|
+
"description": "proposed: suggested, by an agent or a decision point's model decider, and not yet kept by a person. open: nobody has started it. in-progress: someone has. done: finished, with its proof in evidence. dropped: not going to happen. done and dropped are closed. A person keeps a proposed item by moving it to open, or drops it.",
|
|
40
|
+
"enum": [
|
|
41
|
+
"proposed",
|
|
42
|
+
"open",
|
|
43
|
+
"in-progress",
|
|
44
|
+
"done",
|
|
45
|
+
"dropped"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"implements": {
|
|
49
|
+
"description": "The decisions this work carries out, by id. May be empty. chant workspace records warns work-implements-undecided when one is still proposed.",
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": {
|
|
52
|
+
"$ref": "#/definitions/decisionId"
|
|
53
|
+
},
|
|
54
|
+
"uniqueItems": true
|
|
55
|
+
},
|
|
56
|
+
"needs": {
|
|
57
|
+
"description": "The work items that must be done before this one is ready, by id. May be empty.",
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": {
|
|
60
|
+
"$ref": "#/definitions/workId"
|
|
61
|
+
},
|
|
62
|
+
"uniqueItems": true
|
|
63
|
+
},
|
|
64
|
+
"constrains": {
|
|
65
|
+
"description": "What this work touches, in the grammar a decision's constrains uses: issues (owner/repo#n), decision ids, workspace members (member:<name>) or workspace paths (path:<path>). At least one entry.",
|
|
66
|
+
"type": "array",
|
|
67
|
+
"minItems": 1,
|
|
68
|
+
"items": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"pattern": "^([A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+#[0-9]+|[a-z][a-z0-9]{0,15}-[0-9]{3,}|member:[a-z0-9][a-z0-9-]{0,39}|path:(?!/)(?!(?:[^/]*/)*\\.{1,2}(?:/|$))(?!.*//)[^\\\\\\u0000-\\u001f]*[^/\\\\\\u0000-\\u001f])$"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"out_of_scope": {
|
|
74
|
+
"description": "Workspace paths this work puts out of scope (#2773): files or directories, from the workspace root, that the change doing the work must not touch. chant workspace check --changes --work <id> reports a change to one as change-out-of-scope, and the item does not cover it even where its constrains would. Optional.",
|
|
75
|
+
"type": "array",
|
|
76
|
+
"items": {
|
|
77
|
+
"$ref": "#/definitions/workspacePath"
|
|
78
|
+
},
|
|
79
|
+
"uniqueItems": true
|
|
80
|
+
},
|
|
81
|
+
"evidence": {
|
|
82
|
+
"description": "The proof of done: public links, or workspace files pinned by the hash of their bytes (chant workspace records pin <path>). May be empty while the work is open; a done item with none gets the warning work-done-unpinned. An entry that names a criterion from acceptance carries the verification it is and its result, and a manual verdict names who gave it in by (#2772).",
|
|
83
|
+
"type": "array",
|
|
84
|
+
"items": {
|
|
85
|
+
"oneOf": [
|
|
86
|
+
{
|
|
87
|
+
"$ref": "#/definitions/evidenceLink"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"$ref": "#/definitions/evidencePin"
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"proposed_by": {
|
|
96
|
+
"description": "Who proposed this work item: the name chant workspace records new --by or the MCP records-new tool's by wrote, for an item that opened proposed (#2756). Null or absent when nobody named a proposer, or the item opened straight into a later state. Never cleared when a person keeps or drops the item.",
|
|
97
|
+
"type": [
|
|
98
|
+
"string",
|
|
99
|
+
"null"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"acceptance": {
|
|
103
|
+
"description": "What done means for this item, stated up front (#2772): each criterion with an id, its text and the verification it expects. Optional; an item without it is read as before. A done item whose criterion has no evidence naming it, with result pass and the same verification, gets the warning work-acceptance-unmet, and chant workspace check fails on it (WSP117). A manual verdict counts only when its by is someone other than the owner.",
|
|
104
|
+
"type": "array",
|
|
105
|
+
"items": {
|
|
106
|
+
"$ref": "#/definitions/criterion"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"owner": {
|
|
110
|
+
"description": "Who has taken the work: a principal, such as a forge login or an agent's name. Null or absent while nobody has.",
|
|
111
|
+
"type": [
|
|
112
|
+
"string",
|
|
113
|
+
"null"
|
|
114
|
+
],
|
|
115
|
+
"minLength": 1
|
|
116
|
+
},
|
|
117
|
+
"contract": {
|
|
118
|
+
"description": "The contract record this item builds, by id (#3147). A kind whose work block names a contract kind reads its state into the record's contract, and warns work-contract-unknown or work-contract-undecided. Null or absent for work that builds no contract.",
|
|
119
|
+
"type": [
|
|
120
|
+
"string",
|
|
121
|
+
"null"
|
|
122
|
+
],
|
|
123
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,99}$"
|
|
124
|
+
},
|
|
125
|
+
"tier": {
|
|
126
|
+
"description": "The builder tier this item is built at, when it is fixed rather than asked of the slice-tier decision point (#3147). One of the tiers the kind's work.tier declares; another is warned work-tier-unknown. Null or absent to leave it to the point.",
|
|
127
|
+
"type": [
|
|
128
|
+
"string",
|
|
129
|
+
"null"
|
|
130
|
+
],
|
|
131
|
+
"pattern": "^[a-z][a-z0-9-]{0,31}$"
|
|
132
|
+
},
|
|
133
|
+
"max_attempts": {
|
|
134
|
+
"description": "How many failed attempts this item gets before a runner leaves it to people, overriding the kind's work.attempts.max (#3147). chant workspace work history counts them from the item's lease history. Null or absent for the kind's default.",
|
|
135
|
+
"type": [
|
|
136
|
+
"integer",
|
|
137
|
+
"null"
|
|
138
|
+
],
|
|
139
|
+
"minimum": 1
|
|
140
|
+
},
|
|
141
|
+
"result": {
|
|
142
|
+
"description": "What the last build of the item ran under (#3147): only the lease token, which joins the item to the run record and to the commits carrying it. Build provenance (agent, model, harness, session, cost) is the run record's, never the item's.",
|
|
143
|
+
"type": "object",
|
|
144
|
+
"additionalProperties": false,
|
|
145
|
+
"required": [
|
|
146
|
+
"lease"
|
|
147
|
+
],
|
|
148
|
+
"properties": {
|
|
149
|
+
"lease": {
|
|
150
|
+
"description": "The fencing token of the lease the build ran under.",
|
|
151
|
+
"type": "string",
|
|
152
|
+
"minLength": 1
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"opened_on": {
|
|
157
|
+
"description": "When the item was written, as YYYY-MM-DD. Quoted, so YAML reads it as a string.",
|
|
158
|
+
"type": "string",
|
|
159
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
|
|
160
|
+
},
|
|
161
|
+
"closed_on": {
|
|
162
|
+
"description": "When the item became done or dropped, as YYYY-MM-DD. chant workspace records warns work-closed-without-date when a closed item has none.",
|
|
163
|
+
"type": [
|
|
164
|
+
"string",
|
|
165
|
+
"null"
|
|
166
|
+
],
|
|
167
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
|
|
168
|
+
},
|
|
169
|
+
"source": {
|
|
170
|
+
"description": "Where the work came from: a gap the intent graph reported, an issue, the workspace itself, a person's ask, or the box's intent once a person decided it.",
|
|
171
|
+
"oneOf": [
|
|
172
|
+
{
|
|
173
|
+
"$ref": "#/definitions/sourceGap"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"$ref": "#/definitions/sourceIssue"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"$ref": "#/definitions/sourceWorkspace"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"$ref": "#/definitions/sourceAsk"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"$ref": "#/definitions/sourceIntent"
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
"supersedes": {
|
|
190
|
+
"description": "Earlier work items this one replaces. Takes effect once this item is done or dropped.",
|
|
191
|
+
"type": "array",
|
|
192
|
+
"items": {
|
|
193
|
+
"type": "object",
|
|
194
|
+
"additionalProperties": false,
|
|
195
|
+
"required": [
|
|
196
|
+
"work"
|
|
197
|
+
],
|
|
198
|
+
"properties": {
|
|
199
|
+
"work": {
|
|
200
|
+
"$ref": "#/definitions/workId"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"definitions": {
|
|
207
|
+
"workId": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"pattern": "^W-[0-9]{3,}$"
|
|
210
|
+
},
|
|
211
|
+
"decisionId": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"pattern": "^[a-z][a-z0-9]{0,15}-[0-9]{3,}$"
|
|
214
|
+
},
|
|
215
|
+
"issueRef": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+#[0-9]+$"
|
|
218
|
+
},
|
|
219
|
+
"workspacePath": {
|
|
220
|
+
"description": "A path from the workspace root, with / separators: no leading /, no . or .. segment, no empty segment, no backslash and no trailing /.",
|
|
221
|
+
"type": "string",
|
|
222
|
+
"pattern": "^(?!/)(?!(?:[^/]*/)*\\.{1,2}(?:/|$))(?!.*//)[^\\\\\\u0000-\\u001f]*[^/\\\\\\u0000-\\u001f]$"
|
|
223
|
+
},
|
|
224
|
+
"evidenceLink": {
|
|
225
|
+
"description": "A public link.",
|
|
226
|
+
"type": "object",
|
|
227
|
+
"additionalProperties": false,
|
|
228
|
+
"required": [
|
|
229
|
+
"title",
|
|
230
|
+
"url"
|
|
231
|
+
],
|
|
232
|
+
"properties": {
|
|
233
|
+
"title": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"minLength": 1
|
|
236
|
+
},
|
|
237
|
+
"url": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"pattern": "^https://"
|
|
240
|
+
},
|
|
241
|
+
"as_of": {
|
|
242
|
+
"description": "When the linked text was read, as an ISO 8601 timestamp. Lets a reader flag evidence that changed afterwards.",
|
|
243
|
+
"type": [
|
|
244
|
+
"string",
|
|
245
|
+
"null"
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
"sha256": {
|
|
249
|
+
"description": "Hex SHA-256 of the linked content, once evidence is pinned by hash (#2555). Null until then.",
|
|
250
|
+
"type": [
|
|
251
|
+
"string",
|
|
252
|
+
"null"
|
|
253
|
+
],
|
|
254
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
255
|
+
},
|
|
256
|
+
"criterion": {
|
|
257
|
+
"description": "The acceptance criterion this evidence is for, by id (#2772).",
|
|
258
|
+
"type": "string",
|
|
259
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
|
|
260
|
+
},
|
|
261
|
+
"verification": {
|
|
262
|
+
"$ref": "#/definitions/verification"
|
|
263
|
+
},
|
|
264
|
+
"result": {
|
|
265
|
+
"description": "Whether the evidence shows the criterion met.",
|
|
266
|
+
"enum": [
|
|
267
|
+
"pass",
|
|
268
|
+
"fail"
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
"by": {
|
|
272
|
+
"description": "Who produced the evidence: the lease holder for a steward's, the person for a manual verdict.",
|
|
273
|
+
"type": "string",
|
|
274
|
+
"minLength": 1
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"dependencies": {
|
|
278
|
+
"criterion": [
|
|
279
|
+
"verification",
|
|
280
|
+
"result"
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"evidencePin": {
|
|
285
|
+
"description": "A file in the workspace, pinned by the hash of its bytes. chant workspace records reports a file that changed or went missing since.",
|
|
286
|
+
"type": "object",
|
|
287
|
+
"additionalProperties": false,
|
|
288
|
+
"required": [
|
|
289
|
+
"title",
|
|
290
|
+
"path",
|
|
291
|
+
"sha256"
|
|
292
|
+
],
|
|
293
|
+
"properties": {
|
|
294
|
+
"title": {
|
|
295
|
+
"type": "string",
|
|
296
|
+
"minLength": 1
|
|
297
|
+
},
|
|
298
|
+
"path": {
|
|
299
|
+
"description": "The file, from the workspace root. It sits inside a member, such as design/screens/home.json.",
|
|
300
|
+
"$ref": "#/definitions/workspacePath"
|
|
301
|
+
},
|
|
302
|
+
"sha256": {
|
|
303
|
+
"description": "Hex SHA-256 of the file's bytes when the work was done. chant workspace records pin <path> prints it.",
|
|
304
|
+
"type": "string",
|
|
305
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
306
|
+
},
|
|
307
|
+
"as_of": {
|
|
308
|
+
"description": "When the file was read, as an ISO 8601 timestamp.",
|
|
309
|
+
"type": [
|
|
310
|
+
"string",
|
|
311
|
+
"null"
|
|
312
|
+
]
|
|
313
|
+
},
|
|
314
|
+
"criterion": {
|
|
315
|
+
"description": "The acceptance criterion this evidence is for, by id (#2772).",
|
|
316
|
+
"type": "string",
|
|
317
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
|
|
318
|
+
},
|
|
319
|
+
"verification": {
|
|
320
|
+
"$ref": "#/definitions/verification"
|
|
321
|
+
},
|
|
322
|
+
"result": {
|
|
323
|
+
"description": "Whether the evidence shows the criterion met.",
|
|
324
|
+
"enum": [
|
|
325
|
+
"pass",
|
|
326
|
+
"fail"
|
|
327
|
+
]
|
|
328
|
+
},
|
|
329
|
+
"by": {
|
|
330
|
+
"description": "Who produced the evidence: the lease holder for a steward's, the person for a manual verdict.",
|
|
331
|
+
"type": "string",
|
|
332
|
+
"minLength": 1
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
"dependencies": {
|
|
336
|
+
"criterion": [
|
|
337
|
+
"verification",
|
|
338
|
+
"result"
|
|
339
|
+
]
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
"sourceGap": {
|
|
343
|
+
"description": "The gap the work closes, as chant workspace graph --intent reported it (#2683). The honest way to finish the work is to make the finding stop firing on the region; graph --intent and records warn work-done-gap-open on a done item whose finding still fires.",
|
|
344
|
+
"type": "object",
|
|
345
|
+
"additionalProperties": false,
|
|
346
|
+
"required": [
|
|
347
|
+
"finding",
|
|
348
|
+
"region"
|
|
349
|
+
],
|
|
350
|
+
"properties": {
|
|
351
|
+
"finding": {
|
|
352
|
+
"description": "The finding's code: one of chant's intent finding codes, a change finding of chant workspace check --changes (#2773), or a plugin's plugin:<name>:<code>.",
|
|
353
|
+
"anyOf": [
|
|
354
|
+
{
|
|
355
|
+
"enum": [
|
|
356
|
+
"intent-commit-undecided",
|
|
357
|
+
"intent-commit-bare",
|
|
358
|
+
"intent-pin-drifted",
|
|
359
|
+
"intent-pin-missing",
|
|
360
|
+
"intent-pin-stale",
|
|
361
|
+
"intent-artifact-unpinned",
|
|
362
|
+
"intent-decision-superseded-live",
|
|
363
|
+
"intent-decision-provisional",
|
|
364
|
+
"intent-decision-contested",
|
|
365
|
+
"intent-constraint-coarse",
|
|
366
|
+
"intent-constraint-lost",
|
|
367
|
+
"intent-evidence-unpinned",
|
|
368
|
+
"intent-trailer-unverified",
|
|
369
|
+
"intent-region-unconstrained",
|
|
370
|
+
"intent-decision-unimplemented",
|
|
371
|
+
"intent-work-blocked",
|
|
372
|
+
"intent-work-open-decided-code",
|
|
373
|
+
"change-uncovered",
|
|
374
|
+
"change-out-of-scope"
|
|
375
|
+
]
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"type": "string",
|
|
379
|
+
"pattern": "^plugin:[^:\\s]+:[a-z0-9]+(-[a-z0-9]+)*$"
|
|
380
|
+
}
|
|
381
|
+
]
|
|
382
|
+
},
|
|
383
|
+
"region": {
|
|
384
|
+
"description": "The region the finding fired on, as graph --intent takes it: a workspace path, path:line or path:start-end, or . for the whole workspace.",
|
|
385
|
+
"type": "string",
|
|
386
|
+
"pattern": "^(\\.|(?!/)(?!(?:[^/]*/)*\\.{1,2}(?:/|:|$))(?!.*//)[^\\\\\\u0000-\\u001f:]*[^/\\\\\\u0000-\\u001f:](:[1-9][0-9]*(-[1-9][0-9]*)?)?)$"
|
|
387
|
+
},
|
|
388
|
+
"decision": {
|
|
389
|
+
"description": "The decision the finding concerned, when it concerned one.",
|
|
390
|
+
"$ref": "#/definitions/decisionId"
|
|
391
|
+
},
|
|
392
|
+
"artifact": {
|
|
393
|
+
"description": "The artifact the finding concerned, from the workspace root, when it concerned one.",
|
|
394
|
+
"$ref": "#/definitions/workspacePath"
|
|
395
|
+
},
|
|
396
|
+
"answer": {
|
|
397
|
+
"description": "The finding-triage answer that made the finding this work item, by record id (ws-058), when a decision point triaged it.",
|
|
398
|
+
"type": "string",
|
|
399
|
+
"pattern": "^finding-triage-[0-9a-f]{12}$"
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
"sourceIssue": {
|
|
404
|
+
"description": "An issue that asked for the work.",
|
|
405
|
+
"type": "object",
|
|
406
|
+
"additionalProperties": false,
|
|
407
|
+
"required": [
|
|
408
|
+
"issue"
|
|
409
|
+
],
|
|
410
|
+
"properties": {
|
|
411
|
+
"issue": {
|
|
412
|
+
"$ref": "#/definitions/issueRef"
|
|
413
|
+
},
|
|
414
|
+
"row": {
|
|
415
|
+
"description": "A row of the issue's table the work comes from, verbatim, when there is one.",
|
|
416
|
+
"type": "string"
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"sourceWorkspace": {
|
|
421
|
+
"description": "Work that came up in the workspace, such as in a member's own session, with no issue behind it.",
|
|
422
|
+
"type": "object",
|
|
423
|
+
"additionalProperties": false,
|
|
424
|
+
"required": [
|
|
425
|
+
"kind",
|
|
426
|
+
"member"
|
|
427
|
+
],
|
|
428
|
+
"properties": {
|
|
429
|
+
"kind": {
|
|
430
|
+
"const": "workspace"
|
|
431
|
+
},
|
|
432
|
+
"member": {
|
|
433
|
+
"description": "The workspace member the work came up in, by its name in the declaration.",
|
|
434
|
+
"type": "string",
|
|
435
|
+
"pattern": "^[a-z0-9][a-z0-9-]{0,39}$"
|
|
436
|
+
},
|
|
437
|
+
"session": {
|
|
438
|
+
"description": "The id of the session the work came up in, as the member names it. Null or absent when there was none.",
|
|
439
|
+
"type": [
|
|
440
|
+
"string",
|
|
441
|
+
"null"
|
|
442
|
+
],
|
|
443
|
+
"minLength": 1
|
|
444
|
+
},
|
|
445
|
+
"issue": {
|
|
446
|
+
"description": "An issue the work relates to, when there is one.",
|
|
447
|
+
"$ref": "#/definitions/issueRef"
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
"sourceAsk": {
|
|
452
|
+
"description": "A person's ask, taken up as work with no gap, issue or workspace session behind it (chaff#39, chant#2851): what they said and who said it, recorded so hud's sidebar and the kit's ask flow can read it as an ordinary work record.",
|
|
453
|
+
"type": "object",
|
|
454
|
+
"additionalProperties": false,
|
|
455
|
+
"required": [
|
|
456
|
+
"ask"
|
|
457
|
+
],
|
|
458
|
+
"properties": {
|
|
459
|
+
"ask": {
|
|
460
|
+
"type": "object",
|
|
461
|
+
"additionalProperties": false,
|
|
462
|
+
"required": [
|
|
463
|
+
"said",
|
|
464
|
+
"by"
|
|
465
|
+
],
|
|
466
|
+
"properties": {
|
|
467
|
+
"said": {
|
|
468
|
+
"description": "The person's words, verbatim.",
|
|
469
|
+
"type": "string",
|
|
470
|
+
"minLength": 1
|
|
471
|
+
},
|
|
472
|
+
"by": {
|
|
473
|
+
"description": "Who asked.",
|
|
474
|
+
"type": "string",
|
|
475
|
+
"minLength": 1
|
|
476
|
+
},
|
|
477
|
+
"at": {
|
|
478
|
+
"description": "When the ask was made, as an ISO 8601 timestamp.",
|
|
479
|
+
"type": "string"
|
|
480
|
+
},
|
|
481
|
+
"via": {
|
|
482
|
+
"description": "Where the ask came in: hud's sidebar, a shell command, or an MCP tool call.",
|
|
483
|
+
"enum": [
|
|
484
|
+
"hud",
|
|
485
|
+
"shell",
|
|
486
|
+
"mcp"
|
|
487
|
+
]
|
|
488
|
+
},
|
|
489
|
+
"session": {
|
|
490
|
+
"description": "The id of the session the ask came up in, as the client names it. Absent when there was none.",
|
|
491
|
+
"type": "string",
|
|
492
|
+
"minLength": 1
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
"sourceIntent": {
|
|
499
|
+
"description": "The first build of a box, opened from its intent (#3147; the box intent is #2850): the decision the box block names as its intent, once a person decided it, and their answer. Replaces studio's x-factory.intent and x-factory.question.",
|
|
500
|
+
"type": "object",
|
|
501
|
+
"additionalProperties": false,
|
|
502
|
+
"required": [
|
|
503
|
+
"intent"
|
|
504
|
+
],
|
|
505
|
+
"properties": {
|
|
506
|
+
"intent": {
|
|
507
|
+
"type": "object",
|
|
508
|
+
"additionalProperties": false,
|
|
509
|
+
"required": [
|
|
510
|
+
"decision",
|
|
511
|
+
"answer",
|
|
512
|
+
"by"
|
|
513
|
+
],
|
|
514
|
+
"properties": {
|
|
515
|
+
"decision": {
|
|
516
|
+
"description": "The intent's decision record, by id.",
|
|
517
|
+
"$ref": "#/definitions/decisionId"
|
|
518
|
+
},
|
|
519
|
+
"question": {
|
|
520
|
+
"description": "The question the intent asked, as its record words it.",
|
|
521
|
+
"type": "string",
|
|
522
|
+
"minLength": 1
|
|
523
|
+
},
|
|
524
|
+
"answer": {
|
|
525
|
+
"description": "The person's answer: the label of the option the decision chose, verbatim.",
|
|
526
|
+
"type": "string",
|
|
527
|
+
"minLength": 1
|
|
528
|
+
},
|
|
529
|
+
"by": {
|
|
530
|
+
"description": "Who decided it.",
|
|
531
|
+
"type": "string",
|
|
532
|
+
"minLength": 1
|
|
533
|
+
},
|
|
534
|
+
"at": {
|
|
535
|
+
"description": "When it was decided, as an ISO 8601 timestamp.",
|
|
536
|
+
"type": "string"
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
"criterion": {
|
|
543
|
+
"description": "One acceptance criterion.",
|
|
544
|
+
"type": "object",
|
|
545
|
+
"additionalProperties": false,
|
|
546
|
+
"required": [
|
|
547
|
+
"id",
|
|
548
|
+
"text",
|
|
549
|
+
"verification"
|
|
550
|
+
],
|
|
551
|
+
"properties": {
|
|
552
|
+
"id": {
|
|
553
|
+
"description": "Stable within the item, such as AC-1. Evidence names it in criterion.",
|
|
554
|
+
"type": "string",
|
|
555
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
|
|
556
|
+
},
|
|
557
|
+
"text": {
|
|
558
|
+
"description": "What must be true, in a sentence.",
|
|
559
|
+
"type": "string",
|
|
560
|
+
"minLength": 1
|
|
561
|
+
},
|
|
562
|
+
"verification": {
|
|
563
|
+
"$ref": "#/definitions/verification"
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
"verification": {
|
|
568
|
+
"description": "How a criterion is verified: unit, integration or e2e by a test of that level, runtime by the running system, manual by a person other than the implementer.",
|
|
569
|
+
"enum": [
|
|
570
|
+
"unit",
|
|
571
|
+
"integration",
|
|
572
|
+
"e2e",
|
|
573
|
+
"runtime",
|
|
574
|
+
"manual"
|
|
575
|
+
]
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* ships.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import { execFileSync } from "node:child_process";
|
|
8
9
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
9
10
|
import { join, resolve } from "node:path";
|
|
10
11
|
import { afterAll, beforeAll, describe, expect, test } from "vitest";
|
|
@@ -12,6 +13,7 @@ import {
|
|
|
12
13
|
checkReaderRead,
|
|
13
14
|
CONFORMANCE_FIXTURE_DIR,
|
|
14
15
|
createConformanceWorkspace,
|
|
16
|
+
UNCOMMITTED_DECISION,
|
|
15
17
|
READ_CONTRACT_COMMANDS,
|
|
16
18
|
REFERENCE_READS,
|
|
17
19
|
runWorkspaceReaderConformance,
|
|
@@ -32,8 +34,10 @@ const JSON_FLAG: Record<ReadContractCommand, string[]> = {
|
|
|
32
34
|
check: ["--format", "json"],
|
|
33
35
|
status: ["--json"],
|
|
34
36
|
records: ["--json"],
|
|
37
|
+
"records --uncommitted": ["--json"],
|
|
35
38
|
"graph --intent": ["--json"],
|
|
36
39
|
"graph --composites": ["--json"],
|
|
40
|
+
runs: ["--json"],
|
|
37
41
|
};
|
|
38
42
|
|
|
39
43
|
/** The smallest reader that conforms, with a hook to misbehave. */
|
|
@@ -48,7 +52,7 @@ function reader(twist: (doc: Record<string, unknown>, chant: ChantTransport) =>
|
|
|
48
52
|
|
|
49
53
|
let ws: ConformanceWorkspace;
|
|
50
54
|
beforeAll(() => {
|
|
51
|
-
ws = createConformanceWorkspace();
|
|
55
|
+
ws = createConformanceWorkspace({ uncommitted: true });
|
|
52
56
|
}, 300_000);
|
|
53
57
|
afterAll(() => ws?.dispose());
|
|
54
58
|
|
|
@@ -72,9 +76,37 @@ describe("the generated conformance workspace (#2679)", () => {
|
|
|
72
76
|
test("the decision record and the region the intent read names are in the workspace", async () => {
|
|
73
77
|
const docs: Record<string, unknown>[] = [];
|
|
74
78
|
await runWorkspaceReaderConformance(reader((doc) => (docs.push(doc), doc)), { workspaceDir: ws.dir, commands: ["records", "graph --intent"] });
|
|
75
|
-
expect((docs[0].records as { id: string }[]).map((r) => r.id)).toEqual([
|
|
79
|
+
expect((docs[0].records as { id: string; worktree: string }[]).map((r) => [r.id, r.worktree])).toEqual([
|
|
80
|
+
["fix-001", "committed"],
|
|
81
|
+
["fix-002", "new"],
|
|
82
|
+
]);
|
|
76
83
|
expect(docs[1].region).toBe(`region:${REFERENCE_READS["graph --intent"][0]}`);
|
|
77
84
|
}, 300_000);
|
|
85
|
+
|
|
86
|
+
test("records --uncommitted lists the decision the workspace leaves uncommitted, with the branch, head and base (#3160)", async () => {
|
|
87
|
+
const docs: Record<string, unknown>[] = [];
|
|
88
|
+
const report = await runWorkspaceReaderConformance(reader((doc) => (docs.push(doc), doc)), { workspaceDir: ws.dir, commands: ["records --uncommitted"] });
|
|
89
|
+
expect(report.problems).toEqual([]);
|
|
90
|
+
const head = execFileSync("git", ["rev-parse", "HEAD"], { cwd: ws.dir, encoding: "utf-8" }).trim();
|
|
91
|
+
expect(docs[0]).toMatchObject({
|
|
92
|
+
uncommitted: true,
|
|
93
|
+
checkout: { branch: "main", head, base: head, baseFrom: "main", deleted: [] },
|
|
94
|
+
records: [{ id: "fix-002", path: UNCOMMITTED_DECISION.path, worktree: "new", state: "proposed", valid: true }],
|
|
95
|
+
summary: { total: 1, valid: 1, invalid: 0 },
|
|
96
|
+
});
|
|
97
|
+
}, 300_000);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
describe("the generated workspace's agent run (#3033)", () => {
|
|
101
|
+
test("runs reads the run the workspace commit names, joined by its trailer and its record", async () => {
|
|
102
|
+
const docs: Record<string, unknown>[] = [];
|
|
103
|
+
const report = await runWorkspaceReaderConformance(reader((doc) => (docs.push(doc), doc)), { workspaceDir: ws.dir, commands: ["runs"] });
|
|
104
|
+
expect(report.problems).toEqual([]);
|
|
105
|
+
expect(docs[0]).toMatchObject({
|
|
106
|
+
runs: [{ id: "conformance-run", state: "ended", by: "conformance", cost: { amount: 0.01, currency: "USD" }, commits: [{ joinedBy: ["record", "trailer"] }] }],
|
|
107
|
+
totals: { all: { runs: 1, unpriced: [] } },
|
|
108
|
+
});
|
|
109
|
+
}, 300_000);
|
|
78
110
|
});
|
|
79
111
|
|
|
80
112
|
describe("commands (#2679)", () => {
|
|
@@ -87,7 +119,7 @@ describe("commands (#2679)", () => {
|
|
|
87
119
|
expect(report.problems).toEqual([]);
|
|
88
120
|
expect(read).toEqual(["ls", "status", "graph --composites"]);
|
|
89
121
|
expect(report.checked).toEqual(["ls", "status", "graph --composites"]);
|
|
90
|
-
expect(report.skipped).toEqual(["graph", "check", "records", "graph --intent"]);
|
|
122
|
+
expect(report.skipped).toEqual(["graph", "check", "records", "records --uncommitted", "graph --intent", "runs"]);
|
|
91
123
|
}, 300_000);
|
|
92
124
|
|
|
93
125
|
test("a name that is not a contract command, or an empty list, is refused", () => {
|