@intentius/chant 0.101.0 → 0.104.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/core.d.ts +2 -0
- package/dist/audit/core.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/change-set.d.ts +232 -0
- package/dist/change-set.d.ts.map +1 -0
- package/dist/cli/commands/audit.d.ts +7 -0
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/build.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/build.d.ts.map +1 -1
- package/dist/cli/handlers/change-set.d.ts +11 -0
- package/dist/cli/handlers/change-set.d.ts.map +1 -0
- package/dist/cli/handlers/dev.d.ts.map +1 -1
- package/dist/cli/handlers/fan-out.d.ts +33 -0
- package/dist/cli/handlers/fan-out.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 +16 -0
- package/dist/cli/handlers/operator.d.ts.map +1 -1
- package/dist/cli/handlers/pr.d.ts +31 -0
- package/dist/cli/handlers/pr.d.ts.map +1 -0
- 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/op-tools.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 +4 -3
- package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +74 -3
- 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/auto-release.d.ts +16 -0
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/capability-plugin-loader.d.ts.map +1 -1
- package/dist/components/capability.d.ts +53 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/changed-files.d.ts +31 -0
- package/dist/components/changed-files.d.ts.map +1 -0
- package/dist/components/cli-support.d.ts +9 -1
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/component.d.ts +24 -0
- package/dist/components/component.d.ts.map +1 -1
- package/dist/components/deploy-units.d.ts.map +1 -1
- package/dist/components/driver.d.ts +13 -0
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/fan-out-output.d.ts +6 -0
- package/dist/components/fan-out-output.d.ts.map +1 -1
- package/dist/components/fan-out-record.d.ts +41 -0
- package/dist/components/fan-out-record.d.ts.map +1 -0
- package/dist/components/fan-out-run.d.ts +65 -0
- package/dist/components/fan-out-run.d.ts.map +1 -1
- package/dist/components/fan-out-support.d.ts +2 -0
- package/dist/components/fan-out-support.d.ts.map +1 -1
- package/dist/components/fan-out.d.ts +6 -0
- package/dist/components/fan-out.d.ts.map +1 -1
- package/dist/components/gated-wave-pipeline.d.ts +50 -0
- package/dist/components/gated-wave-pipeline.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/layers.d.ts +25 -0
- package/dist/components/layers.d.ts.map +1 -0
- package/dist/components/pr-pipeline.d.ts +61 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -0
- package/dist/components/pr-run.d.ts +119 -0
- package/dist/components/pr-run.d.ts.map +1 -0
- package/dist/components/promote.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/shell.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/components/wave-plan.d.ts +49 -0
- package/dist/components/wave-plan.d.ts.map +1 -0
- 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/gated-waves.d.ts +147 -0
- package/dist/gated-waves.d.ts.map +1 -0
- 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/index.d.ts +1 -0
- package/dist/index.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 +103 -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 +22 -0
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/git.d.ts +46 -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/lint/post-synth.d.ts +18 -0
- package/dist/lint/post-synth.d.ts.map +1 -1
- package/dist/lsp/lexicon-providers.d.ts.map +1 -1
- package/dist/op/activities/activity-contracts.d.ts +137 -11
- package/dist/op/activities/activity-contracts.d.ts.map +1 -1
- package/dist/op/activities/apply.d.ts +79 -9
- package/dist/op/activities/apply.d.ts.map +1 -1
- package/dist/op/activities/change-set.d.ts +62 -0
- package/dist/op/activities/change-set.d.ts.map +1 -0
- package/dist/op/activities/decide.d.ts +2 -0
- package/dist/op/activities/decide.d.ts.map +1 -1
- package/dist/op/activities/factory.d.ts +137 -0
- package/dist/op/activities/factory.d.ts.map +1 -0
- package/dist/op/activities/index.d.ts +5 -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-contract.d.ts.map +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 +11 -0
- 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 +5 -1
- package/dist/op/decide-backend.d.ts.map +1 -1
- package/dist/op/decide-read-inputs.d.ts +4 -2
- 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/factory.d.ts +83 -0
- package/dist/op/factory.d.ts.map +1 -0
- 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 +6 -1
- 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/op-ir.d.ts +2 -0
- package/dist/op/op-ir.d.ts.map +1 -1
- package/dist/op/op-verb-class.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 +16 -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/plan-summary.d.ts +207 -0
- package/dist/plan-summary.d.ts.map +1 -0
- package/dist/pr-forge.d.ts +105 -0
- package/dist/pr-forge.d.ts.map +1 -0
- package/dist/pr-loop.d.ts +178 -0
- package/dist/pr-loop.d.ts.map +1 -0
- 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/telemetry-attribution.d.ts +31 -0
- package/dist/telemetry-attribution.d.ts.map +1 -1
- package/dist/terraform/emit-source.d.ts.map +1 -1
- package/dist/terraform/hcl2json.d.ts +45 -0
- package/dist/terraform/hcl2json.d.ts.map +1 -0
- package/dist/terraform/parse.d.ts +4 -40
- 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-cli.d.ts +12 -0
- package/dist/workspace/box-cli.d.ts.map +1 -0
- package/dist/workspace/box-factory.d.ts +97 -0
- package/dist/workspace/box-factory.d.ts.map +1 -0
- package/dist/workspace/box-listing.d.ts +85 -0
- package/dist/workspace/box-listing.d.ts.map +1 -0
- package/dist/workspace/box-publish.d.ts +147 -0
- package/dist/workspace/box-publish.d.ts.map +1 -0
- package/dist/workspace/broker-protocol.d.ts +190 -0
- package/dist/workspace/broker-protocol.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/composites.d.ts +2 -2
- package/dist/workspace/composites.d.ts.map +1 -1
- package/dist/workspace/conformance/__fixtures__/reference-broker.d.ts +17 -0
- package/dist/workspace/conformance/__fixtures__/reference-broker.d.ts.map +1 -0
- package/dist/workspace/conformance/broker.d.ts +202 -0
- package/dist/workspace/conformance/broker.d.ts.map +1 -0
- package/dist/workspace/conformance/index.d.ts +68 -6
- package/dist/workspace/conformance/index.d.ts.map +1 -1
- package/dist/workspace/conformance/vitest.d.ts +19 -3
- package/dist/workspace/conformance/vitest.d.ts.map +1 -1
- package/dist/workspace/conformance/writer.d.ts +462 -0
- package/dist/workspace/conformance/writer.d.ts.map +1 -0
- package/dist/workspace/decide.d.ts +126 -12
- package/dist/workspace/decide.d.ts.map +1 -1
- package/dist/workspace/decision-points.schema.json +11 -4
- package/dist/workspace/declaration.d.ts +156 -4
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.schema.json +383 -5
- package/dist/workspace/environments.d.ts +36 -10
- package/dist/workspace/environments.d.ts.map +1 -1
- package/dist/workspace/factory-rules.d.ts +180 -0
- package/dist/workspace/factory-rules.d.ts.map +1 -0
- 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/init.d.ts +21 -0
- package/dist/workspace/init.d.ts.map +1 -1
- 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 +36 -2
- package/dist/workspace/intent-record.d.ts.map +1 -1
- package/dist/workspace/intent.d.ts +249 -8
- package/dist/workspace/intent.d.ts.map +1 -1
- package/dist/workspace/json-edit.d.ts +24 -0
- package/dist/workspace/json-edit.d.ts.map +1 -0
- package/dist/workspace/jsonc.d.ts +11 -0
- package/dist/workspace/jsonc.d.ts.map +1 -1
- package/dist/workspace/kinds.d.ts +66 -4
- package/dist/workspace/kinds.d.ts.map +1 -1
- package/dist/workspace/lexicon-symbols.d.ts +29 -0
- package/dist/workspace/lexicon-symbols.d.ts.map +1 -0
- 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/lineage-upgrade.d.ts +31 -2
- package/dist/workspace/lineage-upgrade.d.ts.map +1 -1
- package/dist/workspace/links.d.ts.map +1 -1
- package/dist/workspace/point-answer.schema.json +42 -2
- package/dist/workspace/points-cli.d.ts +10 -3
- package/dist/workspace/points-cli.d.ts.map +1 -1
- package/dist/workspace/points.d.ts +66 -5
- 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 +53 -4
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/record-assets.d.ts.map +1 -1
- package/dist/workspace/record-sessions.d.ts +5 -7
- package/dist/workspace/record-sessions.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 +34 -1
- package/dist/workspace/records-cli.d.ts.map +1 -1
- package/dist/workspace/records-close.d.ts +7 -3
- 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 +68 -7
- package/dist/workspace/records-write.d.ts.map +1 -1
- package/dist/workspace/records.d.ts +43 -9
- package/dist/workspace/records.d.ts.map +1 -1
- package/dist/workspace/runs-cli.d.ts +296 -0
- package/dist/workspace/runs-cli.d.ts.map +1 -0
- package/dist/workspace/runs.d.ts +544 -0
- package/dist/workspace/runs.d.ts.map +1 -0
- package/dist/workspace/session-kinds.d.ts +1 -1
- package/dist/workspace/session-kinds.d.ts.map +1 -1
- package/dist/workspace/source-block.d.ts +1 -1
- package/dist/workspace/source-block.d.ts.map +1 -1
- package/dist/workspace/squash.d.ts +80 -0
- package/dist/workspace/squash.d.ts.map +1 -0
- package/dist/workspace/status-gates.d.ts +17 -3
- package/dist/workspace/status-gates.d.ts.map +1 -1
- package/dist/workspace/status.d.ts +64 -0
- package/dist/workspace/status.d.ts.map +1 -1
- package/dist/workspace/symbols.d.ts +63 -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/run-commits.d.ts +46 -0
- package/dist/workspace/trust/run-commits.d.ts.map +1 -0
- package/dist/workspace/trust/run-statement.d.ts +128 -0
- package/dist/workspace/trust/run-statement.d.ts.map +1 -0
- package/dist/workspace/trust/seal.d.ts +38 -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/trust/verify-cli.d.ts +1 -1
- package/dist/workspace/trust/verify.d.ts +16 -2
- package/dist/workspace/trust/verify.d.ts.map +1 -1
- package/dist/workspace/wip-cli.d.ts +21 -0
- package/dist/workspace/wip-cli.d.ts.map +1 -0
- package/dist/workspace/wip.d.ts +268 -0
- package/dist/workspace/wip.d.ts.map +1 -0
- 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-size.d.ts +55 -0
- package/dist/workspace/work-size.d.ts.map +1 -0
- package/dist/workspace/work.d.ts +26 -1
- package/dist/workspace/work.d.ts.map +1 -1
- package/dist/workspace/workspace-kinds.schema.json +122 -0
- package/dist/workspace/workspace-principals.schema.json +60 -0
- package/dist/workspace/write-lock-cli.d.ts +60 -0
- package/dist/workspace/write-lock-cli.d.ts.map +1 -0
- package/dist/workspace/write-lock.d.ts +152 -0
- package/dist/workspace/write-lock.d.ts.map +1 -0
- package/dist/workspace/write-scope.d.ts +83 -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 +7 -2
- package/src/__fixtures__/change-set/lifecycle-plan.floci.json +59 -0
- package/src/__fixtures__/change-set/lifecycle-v1.ts.txt +4 -0
- package/src/__fixtures__/change-set/lifecycle-v2.ts.txt +4 -0
- package/src/__fixtures__/change-set/lifecycle.change-set.golden.json +95 -0
- package/src/__fixtures__/change-set/warden.change-set.golden.json +106 -0
- package/src/__fixtures__/change-set/warden.plan.json +44 -0
- package/src/__fixtures__/plan-summary/normalization-vectors.json +1593 -0
- package/src/__fixtures__/pr-loop/pr-apply-applied.note.golden.md +31 -0
- package/src/__fixtures__/pr-loop/pr-apply-refused.note.golden.md +31 -0
- package/src/__fixtures__/pr-loop/pr-plan.golden.json +127 -0
- package/src/__fixtures__/pr-loop/pr-plan.note.golden.md +37 -0
- package/src/audit/core.test.ts +15 -0
- package/src/audit/core.ts +8 -2
- package/src/audit/discover.test.ts +11 -0
- package/src/audit/discover.ts +7 -2
- package/src/audit/prior-art.ts +15 -0
- package/src/change-set-bundle.test.ts +57 -0
- package/src/change-set.test.ts +215 -0
- package/src/change-set.ts +445 -0
- package/src/cli/commands/__fixtures__/init-lexicon-output/package.json +1 -1
- package/src/cli/commands/audit-opt-in.test.ts +54 -0
- package/src/cli/commands/audit.ts +29 -2
- package/src/cli/commands/build.test.ts +19 -0
- package/src/cli/commands/build.ts +3 -2
- 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/build.ts +13 -1
- package/src/cli/handlers/change-set.test.ts +56 -0
- package/src/cli/handlers/change-set.ts +44 -0
- package/src/cli/handlers/components.ts +2 -2
- package/src/cli/handlers/dev.ts +8 -6
- package/src/cli/handlers/fan-out.test.ts +221 -2
- package/src/cli/handlers/fan-out.ts +165 -75
- package/src/cli/handlers/graph.ts +3 -0
- 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.test.ts +21 -0
- package/src/cli/handlers/operator.ts +121 -6
- package/src/cli/handlers/pr.ts +373 -0
- package/src/cli/handlers/run.test.ts +111 -0
- package/src/cli/handlers/run.ts +86 -24
- package/src/cli/handlers/scenario.ts +2 -2
- package/src/cli/main.test.ts +21 -0
- package/src/cli/main.ts +246 -30
- package/src/cli/mcp/never-over-mcp.test.ts +101 -0
- package/src/cli/mcp/op-tools.ts +24 -2
- package/src/cli/mcp/workspace-tools.test.ts +5 -2
- package/src/cli/mcp/workspace-tools.ts +62 -7
- package/src/cli/registry.ts +74 -3
- 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/components/auto-release.ts +1 -1
- package/src/components/capability.ts +55 -0
- package/src/components/changed-files.ts +66 -0
- package/src/components/cli-support.ts +28 -5
- package/src/components/component.schema.json +17 -0
- package/src/components/component.ts +25 -0
- package/src/components/deploy-units.ts +3 -0
- package/src/components/driver.test.ts +52 -0
- package/src/components/driver.ts +31 -13
- package/src/components/fan-out-output.ts +42 -1
- package/src/components/fan-out-record.ts +69 -0
- package/src/components/fan-out-run.test.ts +17 -0
- package/src/components/fan-out-run.ts +304 -1
- package/src/components/fan-out-support.ts +3 -0
- package/src/components/fan-out-waves.test.ts +375 -0
- package/src/components/fan-out.ts +18 -17
- package/src/components/gated-wave-pipeline.ts +82 -0
- package/src/components/index.ts +1 -0
- package/src/components/layers.ts +30 -0
- package/src/components/pr-pipeline.ts +91 -0
- package/src/components/pr-run.test.ts +205 -0
- package/src/components/pr-run.ts +280 -0
- package/src/components/promote.ts +5 -0
- package/src/components/verbs/shell.test.ts +11 -0
- package/src/components/verbs/shell.ts +7 -3
- package/src/components/wave-plan.ts +124 -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/sandbox/bundle.ts +1 -1
- 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/gated-waves-bundle.test.ts +62 -0
- package/src/gated-waves.test.ts +118 -0
- package/src/gated-waves.ts +240 -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/index.ts +1 -0
- package/src/lexicon.ts +106 -3
- package/src/lifecycle/gate-ledger.ts +23 -0
- package/src/lifecycle/git.ts +102 -16
- 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/lint/post-synth.test.ts +19 -0
- package/src/lint/post-synth.ts +19 -1
- package/src/meta/declared-imports.test.ts +1 -1
- package/src/op/activities/activity-contracts.ts +84 -0
- package/src/op/activities/apply.test.ts +189 -5
- package/src/op/activities/apply.ts +230 -8
- package/src/op/activities/change-set.ts +114 -0
- package/src/op/activities/decide.ts +3 -0
- package/src/op/activities/factory.ts +675 -0
- package/src/op/activities/index.ts +9 -0
- package/src/op/activities/lexicon-upgrade.test.ts +160 -6
- package/src/op/activities/lexicon-upgrade.ts +154 -51
- package/src/op/activity-contract.test.ts +21 -1
- package/src/op/activity-contract.ts +19 -9
- package/src/op/builders.ts +23 -0
- 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/decide-backend.ts +5 -1
- package/src/op/decide-read-inputs.ts +33 -5
- package/src/op/emulator-lifecycle.test.ts +23 -0
- package/src/op/emulator-lifecycle.ts +52 -14
- package/src/op/factory.e2e.test.ts +232 -0
- package/src/op/factory.ts +118 -0
- 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 +11 -1
- 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/op-ir.test.ts +9 -0
- package/src/op/op-ir.ts +4 -0
- package/src/op/op-verb-class.ts +3 -0
- 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 +16 -3
- package/src/op/work-lease-run.test.ts +47 -0
- package/src/op/work-lease-run.ts +76 -11
- package/src/plan-summary.test.ts +263 -0
- package/src/plan-summary.ts +845 -0
- package/src/pr-forge.test.ts +237 -0
- package/src/pr-forge.ts +332 -0
- package/src/pr-loop-bundle.test.ts +46 -0
- package/src/pr-loop.test.ts +171 -0
- package/src/pr-loop.ts +324 -0
- package/src/provenance.ts +35 -0
- package/src/telemetry-attribution.test.ts +23 -1
- package/src/telemetry-attribution.ts +51 -0
- package/src/terraform/hcl2json.test.ts +21 -0
- package/src/terraform/hcl2json.ts +81 -0
- package/src/terraform/parse.ts +11 -74
- package/src/workspace/agent-cli.ts +7 -3
- package/src/workspace/agent.schema.json +22 -0
- package/src/workspace/app-kind.test.ts +196 -0
- package/src/workspace/box-cli.ts +113 -0
- package/src/workspace/box-factory.test.ts +323 -0
- package/src/workspace/box-factory.ts +136 -0
- package/src/workspace/box-listing-write.schema.json +204 -0
- package/src/workspace/box-listing.test.ts +234 -0
- package/src/workspace/box-listing.ts +324 -0
- package/src/workspace/box-publish.schema.json +498 -0
- package/src/workspace/box-publish.test.ts +204 -0
- package/src/workspace/box-publish.ts +420 -0
- package/src/workspace/box-ship.test.ts +96 -0
- package/src/workspace/broker-protocol.schema.json +186 -0
- package/src/workspace/broker-protocol.test.ts +122 -0
- package/src/workspace/broker-protocol.ts +317 -0
- package/src/workspace/builder-tiers.test.ts +146 -0
- package/src/workspace/change-set.schema.json +460 -0
- package/src/workspace/changes.schema.json +12 -20
- package/src/workspace/changes.ts +4 -1
- package/src/workspace/chant-migrations.e2e.test.ts +17 -5
- package/src/workspace/checks/boxes.test.ts +5 -0
- package/src/workspace/checks.ts +39 -8
- package/src/workspace/component-environments.test.ts +105 -0
- package/src/workspace/compose-graph.ts +7 -0
- package/src/workspace/composites.schema.json +23 -4
- package/src/workspace/composites.test.ts +8 -8
- package/src/workspace/composites.ts +13 -2
- package/src/workspace/conformance/__fixture__/decisions/decision.schema.json +2 -2
- package/src/workspace/conformance/__fixtures__/reference-broker.ts +207 -0
- package/src/workspace/conformance/__writer_fixture__/answers/answer.kind.mjs +32 -0
- package/src/workspace/conformance/__writer_fixture__/answers/answer.schema.json +135 -0
- package/src/workspace/conformance/__writer_fixture__/contracts/contract.kind.mjs +37 -0
- package/src/workspace/conformance/__writer_fixture__/contracts/contract.schema.json +213 -0
- package/src/workspace/conformance/__writer_fixture__/decisions/points.json +228 -0
- package/src/workspace/conformance/__writer_fixture__/drivers/driver.kind.mjs +15 -0
- package/src/workspace/conformance/__writer_fixture__/drivers/driver.schema.json +38 -0
- package/src/workspace/conformance/__writer_fixture__/sessions/session.kind.mjs +54 -0
- package/src/workspace/conformance/__writer_fixture__/sessions/session.schema.json +289 -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 +603 -0
- package/src/workspace/conformance/broker.test.ts +122 -0
- package/src/workspace/conformance/broker.ts +792 -0
- package/src/workspace/conformance/conformance.e2e.test.ts +36 -3
- package/src/workspace/conformance/index.mjs +51 -3
- package/src/workspace/conformance/index.ts +107 -15
- package/src/workspace/conformance/vitest.ts +76 -2
- package/src/workspace/conformance/writer-conformance.e2e.test.ts +177 -0
- package/src/workspace/conformance/writer.test.ts +186 -0
- package/src/workspace/conformance/writer.ts +1191 -0
- package/src/workspace/decide.test.ts +208 -4
- package/src/workspace/decide.ts +433 -73
- package/src/workspace/decision-points.schema.json +11 -4
- package/src/workspace/declaration.schema.json +383 -5
- package/src/workspace/declaration.ts +315 -10
- package/src/workspace/environments.ts +66 -14
- package/src/workspace/factory-rules.test.ts +62 -0
- package/src/workspace/factory-rules.ts +218 -0
- package/src/workspace/graph-cli.ts +6 -3
- package/src/workspace/graph.schema.json +314 -0
- package/src/workspace/identity.test.ts +219 -0
- package/src/workspace/identity.ts +186 -0
- package/src/workspace/init.ts +82 -2
- package/src/workspace/intent-cli.ts +84 -13
- package/src/workspace/intent-patch-id.test.ts +162 -0
- package/src/workspace/intent-record.schema.json +336 -1
- package/src/workspace/intent-record.ts +96 -16
- package/src/workspace/intent-reviews.test.ts +76 -0
- package/src/workspace/intent-squash.test.ts +213 -0
- package/src/workspace/intent-why.test.ts +274 -0
- package/src/workspace/intent.schema.json +950 -9
- package/src/workspace/intent.test.ts +11 -2
- package/src/workspace/intent.ts +722 -65
- package/src/workspace/json-edit.test.ts +121 -0
- package/src/workspace/json-edit.ts +142 -0
- package/src/workspace/jsonc.ts +20 -0
- package/src/workspace/kinds.ts +201 -39
- package/src/workspace/lexicon-symbols.test.ts +148 -0
- package/src/workspace/lexicon-symbols.ts +125 -0
- package/src/workspace/lineage-upgrade.test.ts +63 -0
- package/src/workspace/lineage-upgrade.ts +146 -5
- package/src/workspace/plan-summary.schema.json +155 -0
- package/src/workspace/point-answer.schema.json +42 -2
- package/src/workspace/points-cli.ts +42 -16
- package/src/workspace/points-write.schema.json +163 -4
- package/src/workspace/points.schema.json +157 -2
- package/src/workspace/points.test.ts +13 -1
- package/src/workspace/points.ts +118 -12
- package/src/workspace/pr-report.schema.json +95 -0
- package/src/workspace/principal-classes.test.ts +175 -0
- package/src/workspace/principal-classes.ts +307 -0
- package/src/workspace/profiles.test.ts +159 -0
- package/src/workspace/read-contract.test.ts +2 -2
- package/src/workspace/reason-codes.test.ts +23 -3
- package/src/workspace/reason-codes.ts +61 -4
- package/src/workspace/record-sessions.ts +9 -8
- package/src/workspace/records-amend.schema.json +80 -0
- package/src/workspace/records-checkout.ts +106 -0
- package/src/workspace/records-cli.ts +123 -17
- package/src/workspace/records-close.schema.json +79 -0
- package/src/workspace/records-close.ts +31 -7
- package/src/workspace/records-concurrent.e2e.test.ts +135 -0
- package/src/workspace/records-concurrent.test.ts +145 -0
- package/src/workspace/records-formats.test.ts +46 -10
- package/src/workspace/records-new.schema.json +9 -0
- package/src/workspace/records-review.schema.json +80 -0
- package/src/workspace/records-sessions-write.test.ts +69 -0
- package/src/workspace/records-sessions.test.ts +22 -0
- package/src/workspace/records-uncommitted.test.ts +171 -0
- package/src/workspace/records-write.ts +219 -30
- package/src/workspace/records.schema.json +88 -1
- package/src/workspace/records.ts +76 -8
- package/src/workspace/reference-kinds/app/package.json +10 -0
- package/src/workspace/reference-kinds/app/workspace-kinds.json +45 -0
- package/src/workspace/run-statement.schema.json +622 -0
- package/src/workspace/runs-cli.ts +710 -0
- package/src/workspace/runs-statement.test.ts +239 -0
- package/src/workspace/runs-write.schema.json +994 -0
- package/src/workspace/runs.schema.json +1257 -0
- package/src/workspace/runs.test.ts +281 -0
- package/src/workspace/runs.ts +970 -0
- package/src/workspace/session-kinds.ts +3 -3
- package/src/workspace/squash.ts +198 -0
- package/src/workspace/status-contract.test.ts +10 -2
- package/src/workspace/status-gates.ts +25 -9
- package/src/workspace/status.schema.json +252 -4
- package/src/workspace/status.ts +110 -1
- package/src/workspace/symbols.ts +191 -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/run-commits.ts +115 -0
- package/src/workspace/trust/run-statement.ts +226 -0
- package/src/workspace/trust/seal.ts +58 -1
- package/src/workspace/trust/verify-cli.ts +6 -5
- package/src/workspace/trust/verify.ts +39 -6
- package/src/workspace/wip-cli.ts +97 -0
- package/src/workspace/wip-write.schema.json +504 -0
- package/src/workspace/wip.schema.json +334 -0
- package/src/workspace/wip.test.ts +294 -0
- package/src/workspace/wip.ts +753 -0
- package/src/workspace/work-cli.e2e.test.ts +28 -1
- package/src/workspace/work-cli.ts +136 -8
- package/src/workspace/work-evidence.schema.json +5 -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-size.test.ts +77 -0
- package/src/workspace/work-size.ts +93 -0
- package/src/workspace/work.ts +82 -0
- package/src/workspace/workspace-kinds.schema.json +122 -0
- package/src/workspace/workspace-principals.schema.json +60 -0
- package/src/workspace/write-lock-cli.ts +131 -0
- package/src/workspace/write-lock.schema.json +172 -0
- package/src/workspace/write-lock.test.ts +189 -0
- package/src/workspace/write-lock.ts +474 -0
- package/src/workspace/write-scope.test.ts +144 -3
- package/src/workspace/write-scope.ts +192 -45
- package/src/yaml.test.ts +111 -1
- package/src/yaml.ts +141 -549
|
@@ -188,8 +188,8 @@ declare const LineageSchema: z.ZodObject<{
|
|
|
188
188
|
migrations: z.ZodArray<z.ZodString>;
|
|
189
189
|
files: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
190
190
|
class: z.ZodEnum<{
|
|
191
|
-
owned: "owned";
|
|
192
191
|
generated: "generated";
|
|
192
|
+
owned: "owned";
|
|
193
193
|
seed: "seed";
|
|
194
194
|
}>;
|
|
195
195
|
sha256: z.ZodString;
|
|
@@ -298,8 +298,8 @@ declare const LockSchema: z.ZodObject<{
|
|
|
298
298
|
migrations: z.ZodArray<z.ZodString>;
|
|
299
299
|
files: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
300
300
|
class: z.ZodEnum<{
|
|
301
|
-
owned: "owned";
|
|
302
301
|
generated: "generated";
|
|
302
|
+
owned: "owned";
|
|
303
303
|
seed: "seed";
|
|
304
304
|
}>;
|
|
305
305
|
sha256: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineage-lock.d.ts","sourceRoot":"","sources":["../../src/workspace/lineage-lock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAKH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvF,yEAAyE;AACzE,eAAO,MAAM,SAAS,+BAA+B,CAAC;AAEtD,4EAA4E;AAC5E,eAAO,MAAM,YAAY,IAAI,CAAC;AAM9B;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"lineage-lock.d.ts","sourceRoot":"","sources":["../../src/worksp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;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa,GAAG;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAI/G;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAO7D;AAED,kHAAkH;AAClH,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAOlG;AAID,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,sFAAsF;IACtF,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,4DAA4D;IAC5D,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,wEAAwE;AACxE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,WAAW,CAetF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,GAAG,IAAI,CAoBjH"}
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
* 4. Merge per file (ws-005): an edited file takes the new version only when
|
|
22
22
|
* every hunk merges cleanly. Otherwise it stays as it was, with one manual
|
|
23
23
|
* step. The worktree never holds conflict markers.
|
|
24
|
+
* Then rebuild each CI workflow a chant member's package.json builds with
|
|
25
|
+
* `chant build ... -o <workflow>` (#3244), with the chant doing the
|
|
26
|
+
* upgrade, so the committed workflow follows that chant's composites.
|
|
24
27
|
* 5. Check the worktree: `chant build` and `chant lint` when the project is a
|
|
25
28
|
* chant project, and the lineage checks of `chant workspace check`.
|
|
26
29
|
* 6. Bind the gate to the digest of the resulting patch: the pending fact and
|
|
@@ -51,8 +54,12 @@ export interface UpgradeCheck {
|
|
|
51
54
|
/** The chant member `build` or `lint` ran in ("." for the scope root), when it is not the only one. */
|
|
52
55
|
member?: string;
|
|
53
56
|
}
|
|
54
|
-
/**
|
|
55
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Runs `chant build` or `chant lint` in a directory, with `args` after the
|
|
59
|
+
* command when given (a workflow rebuild's `ci --lexicon github -o <file>`,
|
|
60
|
+
* #3244).
|
|
61
|
+
*/
|
|
62
|
+
export type ChantRunner = (command: "build" | "lint", cwd: string, args?: readonly string[]) => Promise<{
|
|
56
63
|
exitCode: number;
|
|
57
64
|
output: string;
|
|
58
65
|
}>;
|
|
@@ -89,6 +96,26 @@ export interface UpgradeOptions {
|
|
|
89
96
|
/** Replaces the child-process build and lint. For tests. */
|
|
90
97
|
runChant?: ChantRunner;
|
|
91
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* A CI workflow a chant member's package.json builds, and what rebuilding it
|
|
101
|
+
* did (#3244). `rebuilt`: the workflow chant builds now differs from the one
|
|
102
|
+
* committed, and the patch carries the new one. `unchanged`: it is the same.
|
|
103
|
+
* `failed`: the build failed, the file is left as the merge left it, and the
|
|
104
|
+
* upgrade's `build` check fails with the output.
|
|
105
|
+
*/
|
|
106
|
+
export interface RebuiltWorkflow {
|
|
107
|
+
/** The chant member whose package.json script builds it. */
|
|
108
|
+
member: string;
|
|
109
|
+
/** The script's name, such as `ci:build`. */
|
|
110
|
+
script: string;
|
|
111
|
+
/** The workflow, relative to the repository root. */
|
|
112
|
+
path: string;
|
|
113
|
+
/** The command line, as the script has it. */
|
|
114
|
+
command: string;
|
|
115
|
+
status: "rebuilt" | "unchanged" | "failed";
|
|
116
|
+
/** The tail of the build's output, when it failed. */
|
|
117
|
+
detail?: string;
|
|
118
|
+
}
|
|
92
119
|
export interface GovernanceChange {
|
|
93
120
|
/** Changed governance paths, relative to the repository root. */
|
|
94
121
|
paths: string[];
|
|
@@ -118,6 +145,8 @@ export interface StagedUpgrade {
|
|
|
118
145
|
migrations: string[];
|
|
119
146
|
/** The migrations chant ships (./chant-migrations.ts) that found something to move, applied or not. */
|
|
120
147
|
chantMigrations: ChantMigrationReport[];
|
|
148
|
+
/** The CI workflows a chant member builds, rebuilt with this chant before the patch was taken (#3244). */
|
|
149
|
+
workflows: RebuiltWorkflow[];
|
|
121
150
|
written: string[];
|
|
122
151
|
merged: string[];
|
|
123
152
|
removed: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineage-upgrade.d.ts","sourceRoot":"","sources":["../../src/workspace/lineage-upgrade.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"lineage-upgrade.d.ts","sourceRoot":"","sources":["../../src/workspace/lineage-upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAOH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,EAEL,SAAS,EAOT,KAAK,OAAO,EAGZ,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAkC,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAG/F,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOpE,gGAAgG;AAChG,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAErD,kEAAkE;AAClE,eAAO,MAAM,WAAW,mBAAmB,CAAC;AAE5C,qBAAa,YAAa,SAAQ,SAAS;IAChC,IAAI,SAAkB;CAChC;AAID,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,iBAAiB,GAAG,WAAW,CAAC;IACzD,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IACxC,yEA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KAAK,EAAE,eAAe,GAAG,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAalF;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAkBjH"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "urn:intentius:chant:point-answer:1",
|
|
4
4
|
"title": "Decision point answer front matter",
|
|
5
|
-
"description": "The front matter of one answer to a decision point (ws-058, #2739), as `chant workspace points ask` and `points answer` write it into the records directory of a record kind with an `answers` block. One record per point, declaration and inputs: its id is the point's name and the first 12 hex digits of the inputs hash, so the same question is answered once. A table's answer is `answered`; a model's answer at or above its threshold is `proposed` until a person confirms it; a question no decider before the quorum answered is `escalated`, open for people. A workspace copies this file next to its answer kind, as reference-workspace/answers/ does. Values stay within what YAML and JSON share. Fields other than these must start with x-.",
|
|
5
|
+
"description": "The front matter of one answer to a decision point (ws-058, #2739), as `chant workspace points ask` and `points answer` write it into the records directory of a record kind with an `answers` block. One record per point, declaration and inputs: its id is the point's name and the first 12 hex digits of the inputs hash, so the same question is answered once. A table's answer is `answered`; a model's answer at or above its threshold is `proposed` until a person confirms it; a question no decider before the quorum answered is `escalated`, open for people. An answer never changes in place: `points retract` escalates the question to people again and moves the answer into `retractions` (#3351, ws-084). An ad-hoc point's answer keeps the question and candidates its ask gave as `asked`, and they are part of the inputs hash (#3403). A workspace copies this file next to its answer kind, as reference-workspace/answers/ does. Values stay within what YAML and JSON share. Fields other than these must start with x-.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"patternProperties": { "^x-": {} },
|
|
@@ -14,6 +14,21 @@
|
|
|
14
14
|
"point_version": { "$ref": "#/definitions/sha256", "description": "sha256 of the point's declaration when it was asked. Editing the question or any decider changes it." },
|
|
15
15
|
"question_type": { "enum": ["noul", "choice", "score"] },
|
|
16
16
|
"candidates": { "type": "array", "minItems": 2, "items": { "type": ["string", "boolean"] }, "description": "The answers the question allowed: true and false, a choice's options, or a score's levels." },
|
|
17
|
+
"asked": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"description": "An ad-hoc point's question as its ask gave it (`points ask --candidates`, #3403): its text, and its criteria in the point's question type's shape, from which candidates come. People's answer is one of them.",
|
|
20
|
+
"required": ["question", "criteria"],
|
|
21
|
+
"properties": {
|
|
22
|
+
"question": { "type": "string", "minLength": 1 },
|
|
23
|
+
"criteria": {
|
|
24
|
+
"oneOf": [
|
|
25
|
+
{ "type": "object", "minProperties": 2, "maxProperties": 255, "additionalProperties": { "type": "string" } },
|
|
26
|
+
{ "type": "array", "minItems": 2, "maxItems": 10, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"additionalProperties": false
|
|
31
|
+
},
|
|
17
32
|
"inputs": { "type": "object", "description": "The state the deciders saw, input name to value." },
|
|
18
33
|
"inputs_hash": { "$ref": "#/definitions/sha256", "description": "sha256 of the point, its version and its inputs. The same hash is answered once." },
|
|
19
34
|
"constrains": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "What the question is about, such as a work item's id." },
|
|
@@ -36,12 +51,20 @@
|
|
|
36
51
|
"probabilities": { "$ref": "#/definitions/probabilities" },
|
|
37
52
|
"confidence": { "$ref": "#/definitions/unit" },
|
|
38
53
|
"threshold": { "$ref": "#/definitions/unit" },
|
|
54
|
+
"reason": { "type": "string", "minLength": 1, "description": "model: the model's own explanation of its answer, when the backend gave one (#3345). Kept when a person confirms the proposal; moved into the escalations as model_reason when people answer otherwise." },
|
|
39
55
|
"escalations": {
|
|
40
56
|
"type": "array",
|
|
41
57
|
"description": "The deciders asked before the one that answered, or before the quorum, and why each did not answer.",
|
|
42
58
|
"items": { "$ref": "#/definitions/escalation" }
|
|
43
59
|
},
|
|
44
60
|
"answered_by": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "The people who answered or confirmed it." },
|
|
61
|
+
"note": { "type": "string", "minLength": 1, "description": "What the people who answered wrote with their answer (`points answer --note`, #3351). Moved into the retraction when the answer is retracted." },
|
|
62
|
+
"relayed_by": { "type": "string", "minLength": 1, "description": "Who carried the answer to chant for the people in answered_by (`points answer --relayed-by`, #3402), such as a follower relaying a person's answer through hud. It does not count toward the quorum. Moved into the retraction as answer_relayed_by when the answer is retracted." },
|
|
63
|
+
"retractions": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"description": "Answers people took back, oldest first (`points retract`, #3351): each answer as it was, and who retracted it, when and why. A retracted question is escalated to people again.",
|
|
66
|
+
"items": { "$ref": "#/definitions/retraction" }
|
|
67
|
+
},
|
|
45
68
|
"asked_on": { "$ref": "#/definitions/date" },
|
|
46
69
|
"answered_on": { "$ref": "#/definitions/date" },
|
|
47
70
|
"source": {
|
|
@@ -76,6 +99,22 @@
|
|
|
76
99
|
"unit": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
77
100
|
"date": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" },
|
|
78
101
|
"probabilities": { "type": "object", "additionalProperties": { "$ref": "#/definitions/unit" } },
|
|
102
|
+
"retraction": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"required": ["answer", "decider", "by", "on"],
|
|
105
|
+
"properties": {
|
|
106
|
+
"answer": { "type": ["string", "boolean"], "description": "The answer retracted." },
|
|
107
|
+
"decider": { "type": "object", "required": ["kind"], "properties": { "kind": { "enum": ["table", "model", "quorum"] } }, "description": "Who gave it: the record's decider as it was." },
|
|
108
|
+
"answered_by": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
109
|
+
"answered_on": { "$ref": "#/definitions/date" },
|
|
110
|
+
"answer_note": { "type": "string", "minLength": 1, "description": "The note the answer carried." },
|
|
111
|
+
"answer_relayed_by": { "type": "string", "minLength": 1, "description": "Who relayed the answer (#3402)." },
|
|
112
|
+
"by": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "description": "Who retracted it." },
|
|
113
|
+
"on": { "$ref": "#/definitions/date" },
|
|
114
|
+
"note": { "type": "string", "minLength": 1, "description": "Why it was retracted (`points retract --note`)." }
|
|
115
|
+
},
|
|
116
|
+
"additionalProperties": false
|
|
117
|
+
},
|
|
79
118
|
"escalation": {
|
|
80
119
|
"type": "object",
|
|
81
120
|
"required": ["kind", "reason"],
|
|
@@ -87,7 +126,8 @@
|
|
|
87
126
|
"answer": { "type": ["string", "boolean", "null"] },
|
|
88
127
|
"probabilities": { "$ref": "#/definitions/probabilities" },
|
|
89
128
|
"confidence": { "$ref": "#/definitions/unit" },
|
|
90
|
-
"threshold": { "$ref": "#/definitions/unit" }
|
|
129
|
+
"threshold": { "$ref": "#/definitions/unit" },
|
|
130
|
+
"model_reason": { "type": "string", "minLength": 1, "description": "model: the model's own explanation of the answer it gave, when the backend gave one (#3345). reason is why the decider did not answer." }
|
|
91
131
|
},
|
|
92
132
|
"additionalProperties": false
|
|
93
133
|
}
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
* can see it. With `--open`, only open questions are listed. It never writes
|
|
12
12
|
* and never calls a model.
|
|
13
13
|
*
|
|
14
|
-
* `points ask` and `points
|
|
14
|
+
* `points ask`, `points answer` and `points retract` are the writes, in
|
|
15
|
+
* `decide.ts`.
|
|
15
16
|
*/
|
|
16
17
|
import type { CommandContext } from "../cli/registry.js";
|
|
17
18
|
import { type ErrorLocation, type WorkspaceErrorCode } from "./declaration.js";
|
|
@@ -37,8 +38,14 @@ export interface PointView {
|
|
|
37
38
|
questionType: string;
|
|
38
39
|
instructions: string;
|
|
39
40
|
candidates: (string | boolean)[];
|
|
40
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* What each candidate means, as the points file declares it: an object of
|
|
43
|
+
* strings for noul and choice, an array for score. Empty for an ad-hoc point,
|
|
44
|
+
* whose candidates come with each ask (#3403).
|
|
45
|
+
*/
|
|
41
46
|
criteria: Record<string, string> | string[];
|
|
47
|
+
/** The question's text and candidates come with each ask (#3403): each question lists them as `asked`. */
|
|
48
|
+
adhoc: boolean;
|
|
42
49
|
/** Each input: its name, the read-contract output it names, and its description. */
|
|
43
50
|
inputs: {
|
|
44
51
|
name: string;
|
|
@@ -117,7 +124,7 @@ export declare function formatPoints(doc: Extract<PointsDocument, {
|
|
|
117
124
|
}>): string;
|
|
118
125
|
/** A POST /v1/systemone response the caller already has, as the model call: its answer to the point asked. */
|
|
119
126
|
export declare function responseAsk(response: unknown): ModelAsk;
|
|
120
|
-
/** `chant workspace points`, and its `ask` and `
|
|
127
|
+
/** `chant workspace points`, and its `ask`, `answer` and `retract` verbs. */
|
|
121
128
|
export declare function runWorkspacePoints(ctx: CommandContext): Promise<number>;
|
|
122
129
|
export {};
|
|
123
130
|
//# sourceMappingURL=points-cli.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"points-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/points-cli.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"points-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/points-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAA2E,KAAK,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAErJ,OAAO,EAA6J,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AACxM,OAAO,EAAoF,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAmB,MAAM,UAAU,CAAC;AAQ1J,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,uBAAuB,8EAA8E,CAAC;AAEnH,yCAAyC;AACzC,eAAO,MAAM,kBAAkB,uNAUW,CAAC;AAE3C,0GA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CAA0C;AAC1C,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,cAAc,EAAE;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC,GAAG,MAAM,CAatF;AAED,8GAA8G;AAC9G,wBAAgB,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,CASvD;AA+BD,6EAA6E;AAC7E,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAmD7E"}
|
|
@@ -15,6 +15,12 @@
|
|
|
15
15
|
* proposal a person confirms; below it, the next decider is asked.
|
|
16
16
|
* quorum people. Always last: the question escalates to them.
|
|
17
17
|
*
|
|
18
|
+
* A point declared `adhoc` (#3403) has no candidates of its own: its
|
|
19
|
+
* question's text and candidates come with each ask, as an agent's question
|
|
20
|
+
* to the room does, and the answer record keeps them as `asked`, so people's
|
|
21
|
+
* answer is checked against the candidates the question was asked with. Only
|
|
22
|
+
* people decide it: its chain is one quorum.
|
|
23
|
+
*
|
|
18
24
|
* chant never calls a model (ws-052). {@link runChain} takes the model call
|
|
19
25
|
* as a function, {@link ModelAsk}, which the decide Op activity (#2740), a
|
|
20
26
|
* runtime's decider or a test's stub supplies. Without one, a model decider is
|
|
@@ -65,6 +71,16 @@ export declare const POINT_INPUT_OUTPUTS: {
|
|
|
65
71
|
readonly def: "commit";
|
|
66
72
|
readonly description: "a commit in an intent graph's window";
|
|
67
73
|
};
|
|
74
|
+
readonly node: {
|
|
75
|
+
readonly schema: "intent";
|
|
76
|
+
readonly def: "node";
|
|
77
|
+
readonly description: "any node of an intent graph, by its id and kind: a commit, decision, unit, artifact or the region itself, as an intent walk asks of it (#3351)";
|
|
78
|
+
};
|
|
79
|
+
readonly ask: {
|
|
80
|
+
readonly schema: "points";
|
|
81
|
+
readonly def: "question";
|
|
82
|
+
readonly description: "an ad-hoc question as its asker knows it (#3403): the asker's own id for the ask, such as hud's request id for an agent's question, and who asked";
|
|
83
|
+
};
|
|
68
84
|
readonly member: {
|
|
69
85
|
readonly schema: "ls";
|
|
70
86
|
readonly def: "member";
|
|
@@ -99,7 +115,8 @@ export type QuestionType = "noul" | "choice" | "score";
|
|
|
99
115
|
export interface Question {
|
|
100
116
|
type: QuestionType;
|
|
101
117
|
instructions: string;
|
|
102
|
-
|
|
118
|
+
/** The candidates and what each means. Absent only from an ad-hoc point's declaration, whose candidates come with each ask (#3403). */
|
|
119
|
+
criteria?: Record<string, string> | string[];
|
|
103
120
|
}
|
|
104
121
|
export type Scalar = string | number | boolean | null;
|
|
105
122
|
export type Condition = Scalar | {
|
|
@@ -135,6 +152,8 @@ export type Decider = {
|
|
|
135
152
|
};
|
|
136
153
|
export interface Point {
|
|
137
154
|
title: string;
|
|
155
|
+
/** The question's text and candidates come with each ask, not the declaration (#3403). */
|
|
156
|
+
adhoc?: boolean;
|
|
138
157
|
question: Question;
|
|
139
158
|
inputs: Record<string, string>;
|
|
140
159
|
deciders: Decider[];
|
|
@@ -164,8 +183,32 @@ export declare function pointOf(points: Record<string, Point>, name: string): Po
|
|
|
164
183
|
export declare function canonical(value: unknown): string;
|
|
165
184
|
/** The version of a point: the sha256 of its declaration. Editing the question or any decider changes it. */
|
|
166
185
|
export declare const pointVersion: (point: Point) => string;
|
|
167
|
-
/**
|
|
168
|
-
|
|
186
|
+
/**
|
|
187
|
+
* What is answered once: the point, its version and the inputs, and for an
|
|
188
|
+
* ad-hoc point the question and candidates it was asked with (#3403).
|
|
189
|
+
*/
|
|
190
|
+
export declare const inputsHash: (name: string, version: string, inputs: Record<string, unknown>, asked?: Asked) => string;
|
|
191
|
+
/** An ad-hoc point's question as one ask gave it: its text and its candidates, in the point's question type's shape. */
|
|
192
|
+
export interface Asked {
|
|
193
|
+
question: string;
|
|
194
|
+
criteria: Record<string, string> | string[];
|
|
195
|
+
}
|
|
196
|
+
/** The question an answer asks: the point's own, or for an ad-hoc point the one the ask gave. */
|
|
197
|
+
export declare function askedQuestion(point: Point, asked: Asked | undefined): Question;
|
|
198
|
+
/**
|
|
199
|
+
* An ad-hoc ask's question and candidates (`points ask --candidates`), checked
|
|
200
|
+
* against the point's question type as a declaration's criteria are: noul
|
|
201
|
+
* describes true and false, choice gives 2 to 255 options, each with what it
|
|
202
|
+
* means, and score 2 to 10 distinct ordered levels. Returns the problems, or
|
|
203
|
+
* the question.
|
|
204
|
+
*/
|
|
205
|
+
export declare function parseAsked(point: Point, value: unknown): {
|
|
206
|
+
asked: Asked;
|
|
207
|
+
} | {
|
|
208
|
+
problems: string[];
|
|
209
|
+
};
|
|
210
|
+
/** An answer record's `asked`, when it has one. */
|
|
211
|
+
export declare function askedOf(data: Record<string, unknown>): Asked | undefined;
|
|
169
212
|
/** The id of the answer to `name` for inputs hashing to `hash`: the name and the hash's first 12 hex digits. */
|
|
170
213
|
export declare const answerId: (name: string, hash: string) => string;
|
|
171
214
|
/** The quorum a point ends in. */
|
|
@@ -181,24 +224,34 @@ export interface WireQuestion {
|
|
|
181
224
|
instructions: string;
|
|
182
225
|
criteria: Record<string, string> | string[];
|
|
183
226
|
}
|
|
184
|
-
/**
|
|
227
|
+
/**
|
|
228
|
+
* One answer in the wire format's shape. `reason` is the model's own
|
|
229
|
+
* explanation of its answer, when the backend gives one (#3345): kept in the
|
|
230
|
+
* answer record beside a proposal, or in the escalation entry of an answer
|
|
231
|
+
* below the threshold, so a person sees why the model chose.
|
|
232
|
+
*/
|
|
185
233
|
export type WireAnswer = {
|
|
186
234
|
type: "noul";
|
|
187
235
|
noul: number;
|
|
236
|
+
reason?: string;
|
|
188
237
|
} | {
|
|
189
238
|
type: "choice";
|
|
190
239
|
choice: string;
|
|
191
240
|
probabilities?: Record<string, number>;
|
|
192
241
|
confidence?: number;
|
|
242
|
+
reason?: string;
|
|
193
243
|
} | {
|
|
194
244
|
type: "score";
|
|
195
245
|
score?: number;
|
|
196
246
|
legend?: unknown;
|
|
197
247
|
probabilities?: Record<string, number>;
|
|
198
248
|
confidence?: number;
|
|
249
|
+
reason?: string;
|
|
199
250
|
} | {
|
|
200
251
|
type: "unsupported";
|
|
201
252
|
};
|
|
253
|
+
/** A wire answer's reason, trimmed, or undefined when it gives none (or not a string). */
|
|
254
|
+
export declare function answerReason(answer: WireAnswer | undefined): string | undefined;
|
|
202
255
|
export declare function wireQuestion(question: Question): WireQuestion;
|
|
203
256
|
/** What a model decider is asked. */
|
|
204
257
|
export interface ModelRequest {
|
|
@@ -245,7 +298,12 @@ export type Observation = {
|
|
|
245
298
|
* An answer outside the candidates, or an unsupported question, is not observed.
|
|
246
299
|
*/
|
|
247
300
|
export declare function observe(question: Question, answer: WireAnswer | undefined, threshold: number): Observation;
|
|
248
|
-
/**
|
|
301
|
+
/**
|
|
302
|
+
* A decider that was asked and did not answer, and why: `reason` is chant's
|
|
303
|
+
* account of why it did not answer. `model_reason` is the model's own
|
|
304
|
+
* explanation of the answer it gave (#3345), when it gave one; it is not named
|
|
305
|
+
* `reason` because that field already says why the decider escalated.
|
|
306
|
+
*/
|
|
249
307
|
export interface Escalation {
|
|
250
308
|
kind: "table" | "model";
|
|
251
309
|
reason: string;
|
|
@@ -255,6 +313,7 @@ export interface Escalation {
|
|
|
255
313
|
probabilities?: Record<string, number>;
|
|
256
314
|
confidence?: number;
|
|
257
315
|
threshold?: number;
|
|
316
|
+
model_reason?: string;
|
|
258
317
|
}
|
|
259
318
|
export type ChainResult = {
|
|
260
319
|
status: "answered";
|
|
@@ -276,6 +335,8 @@ export type ChainResult = {
|
|
|
276
335
|
probabilities: Record<string, number>;
|
|
277
336
|
confidence: number;
|
|
278
337
|
threshold: number;
|
|
338
|
+
/** The model's explanation of its answer, when the backend gave one (#3345). */
|
|
339
|
+
reason?: string;
|
|
279
340
|
escalations: Escalation[];
|
|
280
341
|
} | {
|
|
281
342
|
status: "escalated";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"points.d.ts","sourceRoot":"","sources":["../../src/workspace/points.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"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AA;KAAE,CAAC;IAAC,WAAW,EAAE,UAAU,EAAE,CAAA;CAAE,CAAC;AAErH,gHAAgH;AAChH,qBAAa,aAAc,SAAQ,KAAK;IACtC,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAED;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CA0DhI;AAID,qFAAqF;AACrF,eAAO,MAAM,oBAAoB,uFAOS,CAAC;AAC3C,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,2EAA2E;AAC3E,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAG3E;AAED,yGAAyG;AACzG,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,YAAY,EAAE,CAAA;CAAE,CAkBrJ;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAoBhH"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Principal classes (#2524 D5; #3080, ws-079).
|
|
3
|
+
*
|
|
4
|
+
* A principal class names a set of principals so the declaration can scope
|
|
5
|
+
* what they write. Four are core: `agent`, `runner` and `service`, each the
|
|
6
|
+
* holders of the role of that name in the trust policy at base, and `human`,
|
|
7
|
+
* everyone else. A plugin adds domain classes as data, the way it adds member
|
|
8
|
+
* kinds: a JSON file at its `./workspace-principals` subpath, read through
|
|
9
|
+
* the package's `package.json` and never imported. Each class it supplies
|
|
10
|
+
* names the role whose grant puts a principal in it.
|
|
11
|
+
*
|
|
12
|
+
* A principal's classes are read only from role grants at base, through
|
|
13
|
+
* {@link classesOf}. Core classes are tried first, then the domain classes
|
|
14
|
+
* in pin order and file order; the first that holds is the class write scope
|
|
15
|
+
* judges the principal as, and `human` is the rest. A gate or a record that
|
|
16
|
+
* asks whether a principal is in a class (#3163) asks {@link classesOf},
|
|
17
|
+
* which lists every class the principal's grants put it in.
|
|
18
|
+
*
|
|
19
|
+
* A path-pinned plugin's classes are read from the base revision when the
|
|
20
|
+
* caller has it (write scope does), so a change can't remap a class by
|
|
21
|
+
* editing its own copy of the plugin. A package pin is read from the
|
|
22
|
+
* installed package, which must be at the version the base pins.
|
|
23
|
+
*/
|
|
24
|
+
import { type KindLoadProblem, type PinLike } from "./kinds.js";
|
|
25
|
+
import type { TrustPolicy } from "./trust/policy.js";
|
|
26
|
+
import { type WorkspaceTree } from "./tree.js";
|
|
27
|
+
export declare const PRINCIPALS_SCHEMA_ID: string;
|
|
28
|
+
/** The subpath a package publishes its principal classes at. */
|
|
29
|
+
export declare const PRINCIPALS_SUBPATH = "./workspace-principals";
|
|
30
|
+
/** The core classes, in the order a principal's roles are tried; `human` holds no role and is the rest. */
|
|
31
|
+
export declare const CORE_PRINCIPAL_CLASSES: readonly ["human", "agent", "runner", "service"];
|
|
32
|
+
export type CorePrincipalClass = (typeof CORE_PRINCIPAL_CLASSES)[number];
|
|
33
|
+
/** A class name: a core class, or a domain class a pinned package supplies. */
|
|
34
|
+
export type PrincipalClassName = string;
|
|
35
|
+
/** The grammar of a class name, as `workspace-principals.schema.json` and the declaration's writeScope keys say it. */
|
|
36
|
+
export declare const CLASS_NAME: RegExp;
|
|
37
|
+
export interface PrincipalClass {
|
|
38
|
+
name: string;
|
|
39
|
+
/** One line saying who is in the class. */
|
|
40
|
+
description: string;
|
|
41
|
+
/** The role whose grant at base puts a principal in the class, or null for `human`, the rest. */
|
|
42
|
+
role: string | null;
|
|
43
|
+
/** `core`, or the pin (package name or path) that supplies the class. */
|
|
44
|
+
source: string;
|
|
45
|
+
}
|
|
46
|
+
export declare const CORE_CLASSES: readonly PrincipalClass[];
|
|
47
|
+
export interface ClassRegistry {
|
|
48
|
+
get(name: string): PrincipalClass | undefined;
|
|
49
|
+
/** Every class name, core first, for "unknown class" messages. */
|
|
50
|
+
names(): string[];
|
|
51
|
+
/** Every class, core first, then the domain classes in pin order and file order. */
|
|
52
|
+
all(): readonly PrincipalClass[];
|
|
53
|
+
}
|
|
54
|
+
export declare function createClassRegistry(extra?: readonly PrincipalClass[]): ClassRegistry;
|
|
55
|
+
/** The four core classes and nothing else: what a workspace whose pins supply no class has. */
|
|
56
|
+
export declare function coreClassRegistry(): ClassRegistry;
|
|
57
|
+
/**
|
|
58
|
+
* The role grants a class is read from. Every read of roles for a class goes
|
|
59
|
+
* through here, so where the grants live (`.chant/trust.json` today,
|
|
60
|
+
* possibly the declaration, #2547) is decided in one place: the policy.
|
|
61
|
+
*/
|
|
62
|
+
export declare function roleGrants(policy: TrustPolicy): Record<string, string[]>;
|
|
63
|
+
/**
|
|
64
|
+
* Every class `principal`'s role grants at base put it in, in registry order
|
|
65
|
+
* (core first). Empty for a principal in no class but `human`, and for null.
|
|
66
|
+
* Names compare as {@link normalisePrincipal} folds them.
|
|
67
|
+
*/
|
|
68
|
+
export declare function classesOf(classes: ClassRegistry, policy: TrustPolicy, principal: string | null): string[];
|
|
69
|
+
/** The class write scope judges `principal` as: the first class its grants put it in, or `human`. */
|
|
70
|
+
export declare function principalClass(policy: TrustPolicy, principal: string | null, classes?: ClassRegistry): string;
|
|
71
|
+
export interface ClassData {
|
|
72
|
+
classes: PrincipalClass[];
|
|
73
|
+
/** Why some of the data can't be used, one line each. Empty when all of it can. */
|
|
74
|
+
problems: string[];
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Check the text of a principals file against
|
|
78
|
+
* `workspace-principals.schema.json` and the rules the schema can't say: no
|
|
79
|
+
* core name or core role, and no name or role twice. `source` names the pin
|
|
80
|
+
* in the classes and in the messages.
|
|
81
|
+
*/
|
|
82
|
+
export declare function parseClassData(text: string, source: string): ClassData;
|
|
83
|
+
/** A package's files, by a `/`-separated path inside it, or undefined when one is not there. */
|
|
84
|
+
export type PackageFiles = (path: string) => string | undefined;
|
|
85
|
+
/** A package directory on disk. */
|
|
86
|
+
export declare function diskFiles(dir: string): PackageFiles;
|
|
87
|
+
/** A package directory at `dir` in `tree`, such as the workspace at the base revision. */
|
|
88
|
+
export declare function treeFiles(tree: WorkspaceTree, dir: string): PackageFiles;
|
|
89
|
+
/** Read the classes a package publishes at `./workspace-principals`. Reads files only; imports nothing. A package that publishes none supplies none. */
|
|
90
|
+
export declare function readPackageClasses(files: PackageFiles, source: string): ClassData;
|
|
91
|
+
export interface LoadedClasses {
|
|
92
|
+
registry: ClassRegistry;
|
|
93
|
+
problems: KindLoadProblem[];
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The classes a workspace knows: the core four plus every class its pins
|
|
97
|
+
* supply. A package pin is read from the installed package, looked up from
|
|
98
|
+
* `workspaceRoot`, and must be at the pinned version. A path pin is read
|
|
99
|
+
* through `tree` when given (the base revision, for write scope), else from
|
|
100
|
+
* `workspaceRoot` on disk, checked against its integrity digest. A class
|
|
101
|
+
* name, or a role, two pins both supply is a problem, and every class
|
|
102
|
+
* involved is left out, so a writeScope entry for it reads as unknown and
|
|
103
|
+
* fails closed. Never throws.
|
|
104
|
+
*/
|
|
105
|
+
export declare function loadClassRegistry(pins: readonly PinLike[], workspaceRoot: string, opts?: {
|
|
106
|
+
tree?: WorkspaceTree;
|
|
107
|
+
}): LoadedClasses;
|
|
108
|
+
/**
|
|
109
|
+
* The writeScope keys no class in `classes` has, in file order. A writer
|
|
110
|
+
* judged `human` may be in such a class, since nothing says which role puts
|
|
111
|
+
* a principal in it, so write scope refuses that writer (fail closed).
|
|
112
|
+
*/
|
|
113
|
+
export declare function unknownScopeClasses(writeScope: Record<string, unknown> | null, classes: ClassRegistry): string[];
|
|
114
|
+
//# sourceMappingURL=principal-classes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"principal-classes.d.ts","sourceRoot":"","sources":["../../src/workspace/principal-classes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAKH,OAAO,EAAuC,KAAK,eAAe,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEtD,eAAO,MAAM,oBAAoB,QAAa,CAAC;AAE/C,gEAAgE;AAChE,eAAO,MAAM,kBAAkB,2BAA2B,CAAC;AAE3D,2GAA2G;AAC3G,eAAO,MAAM,sBAAsB,YAAI,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AACvF,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,+EAA+E;AAC/E,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAExC,uHAAuH;AACvH,eAAO,MAAM,UAAU,QAAiC,CAAC;AAEzD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,iGAAiG;IACjG,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,YAAY,EAAE,SAAS,cAAc,EAKjD,CAAC;AAIF,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,IAAI,EAAE,MAAM,G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