@intentius/chant 0.99.0 → 0.101.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/build.d.ts +6 -0
- package/dist/build.d.ts.map +1 -1
- package/dist/cli/build-options.d.ts +2 -0
- package/dist/cli/build-options.d.ts.map +1 -1
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/import.d.ts.map +1 -1
- package/dist/cli/handlers/fan-out.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/mcp/workspace-tools.d.ts +8 -0
- package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +22 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/config.d.ts +11 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/lexicon.d.ts +24 -1
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/plan-digest.d.ts +26 -5
- package/dist/lifecycle/plan-digest.d.ts.map +1 -1
- package/dist/lint/config.d.ts +4 -4
- package/dist/op/activities/activity-contracts.d.ts +1 -0
- package/dist/op/activities/activity-contracts.d.ts.map +1 -1
- package/dist/op/activities/propose-upgrade.d.ts +2 -0
- package/dist/op/activities/propose-upgrade.d.ts.map +1 -1
- package/dist/op/index.d.ts +1 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/serializer.d.ts +8 -0
- package/dist/serializer.d.ts.map +1 -1
- package/dist/telemetry-attribution.d.ts +77 -0
- package/dist/telemetry-attribution.d.ts.map +1 -0
- package/dist/workspace/agent-cli.d.ts +83 -0
- package/dist/workspace/agent-cli.d.ts.map +1 -0
- package/dist/workspace/changes-cli.d.ts.map +1 -1
- package/dist/workspace/changes.d.ts +8 -1
- package/dist/workspace/changes.d.ts.map +1 -1
- package/dist/workspace/checks/links.d.ts +1 -0
- package/dist/workspace/checks/links.d.ts.map +1 -1
- package/dist/workspace/checks/live.d.ts +40 -0
- package/dist/workspace/checks/live.d.ts.map +1 -0
- package/dist/workspace/checks.d.ts +21 -2
- package/dist/workspace/checks.d.ts.map +1 -1
- package/dist/workspace/compose-graph.d.ts +63 -0
- package/dist/workspace/compose-graph.d.ts.map +1 -1
- package/dist/workspace/decide.d.ts +1 -1
- package/dist/workspace/decide.d.ts.map +1 -1
- package/dist/workspace/declaration.d.ts +32 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.schema.json +138 -3
- package/dist/workspace/export-cli.d.ts +12 -0
- package/dist/workspace/export-cli.d.ts.map +1 -0
- package/dist/workspace/export.d.ts +145 -0
- package/dist/workspace/export.d.ts.map +1 -0
- package/dist/workspace/graph-cli.d.ts.map +1 -1
- package/dist/workspace/import.d.ts +73 -0
- package/dist/workspace/import.d.ts.map +1 -0
- package/dist/workspace/kinds.d.ts +6 -2
- package/dist/workspace/kinds.d.ts.map +1 -1
- package/dist/workspace/lineage-adopt-cli.d.ts +15 -0
- package/dist/workspace/lineage-adopt-cli.d.ts.map +1 -0
- package/dist/workspace/lineage-adopt.d.ts +106 -0
- package/dist/workspace/lineage-adopt.d.ts.map +1 -0
- package/dist/workspace/lineage-check.d.ts +9 -2
- package/dist/workspace/lineage-check.d.ts.map +1 -1
- package/dist/workspace/lineage-cli.d.ts +6 -1
- package/dist/workspace/lineage-cli.d.ts.map +1 -1
- package/dist/workspace/lineage-hash-index.d.ts +110 -0
- package/dist/workspace/lineage-hash-index.d.ts.map +1 -0
- package/dist/workspace/lineage-init.d.ts +10 -0
- package/dist/workspace/lineage-init.d.ts.map +1 -1
- package/dist/workspace/lineage-lock.d.ts +147 -0
- package/dist/workspace/lineage-lock.d.ts.map +1 -1
- package/dist/workspace/lineage-migrations.d.ts +15 -3
- package/dist/workspace/lineage-migrations.d.ts.map +1 -1
- package/dist/workspace/lineage-provenance.d.ts +18 -0
- package/dist/workspace/lineage-provenance.d.ts.map +1 -0
- package/dist/workspace/lineage-upgrade-cli.d.ts +2 -0
- package/dist/workspace/lineage-upgrade-cli.d.ts.map +1 -1
- package/dist/workspace/lineage-upgrade.d.ts +30 -1
- package/dist/workspace/lineage-upgrade.d.ts.map +1 -1
- package/dist/workspace/lineage-versions.d.ts +116 -0
- package/dist/workspace/lineage-versions.d.ts.map +1 -0
- package/dist/workspace/links.d.ts +31 -5
- package/dist/workspace/links.d.ts.map +1 -1
- package/dist/workspace/ls-generated.d.ts +37 -0
- package/dist/workspace/ls-generated.d.ts.map +1 -0
- package/dist/workspace/ls.d.ts +4 -0
- package/dist/workspace/ls.d.ts.map +1 -1
- package/dist/workspace/member-commands.d.ts.map +1 -1
- package/dist/workspace/nested-graph.d.ts +56 -0
- package/dist/workspace/nested-graph.d.ts.map +1 -0
- package/dist/workspace/nesting.d.ts +21 -0
- package/dist/workspace/nesting.d.ts.map +1 -0
- package/dist/workspace/pin-cli.d.ts +10 -0
- package/dist/workspace/pin-cli.d.ts.map +1 -0
- package/dist/workspace/pin-integrity.d.ts +51 -0
- package/dist/workspace/pin-integrity.d.ts.map +1 -0
- package/dist/workspace/reason-codes.d.ts +26 -2
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/record-sessions.d.ts +7 -11
- package/dist/workspace/record-sessions.d.ts.map +1 -1
- package/dist/workspace/records-cli.d.ts +30 -1
- package/dist/workspace/records-cli.d.ts.map +1 -1
- package/dist/workspace/records-close.d.ts +5 -2
- package/dist/workspace/records-close.d.ts.map +1 -1
- package/dist/workspace/records-write.d.ts +22 -4
- package/dist/workspace/records-write.d.ts.map +1 -1
- package/dist/workspace/records.d.ts +43 -5
- package/dist/workspace/records.d.ts.map +1 -1
- package/dist/workspace/returns.d.ts +129 -0
- package/dist/workspace/returns.d.ts.map +1 -0
- package/dist/workspace/status-gates.d.ts.map +1 -1
- package/dist/workspace/template-manifest.d.ts +11 -3
- package/dist/workspace/template-manifest.d.ts.map +1 -1
- package/dist/workspace/trust/attestor.d.ts +8 -0
- package/dist/workspace/trust/attestor.d.ts.map +1 -1
- package/dist/workspace/trust/dsse.d.ts +58 -0
- package/dist/workspace/trust/dsse.d.ts.map +1 -0
- package/dist/workspace/trust/evidence-cli.d.ts +66 -0
- package/dist/workspace/trust/evidence-cli.d.ts.map +1 -0
- package/dist/workspace/trust/evidence.d.ts +93 -0
- package/dist/workspace/trust/evidence.d.ts.map +1 -0
- package/dist/workspace/trust/policy.d.ts +54 -1
- package/dist/workspace/trust/policy.d.ts.map +1 -1
- package/dist/workspace/trust/provenance.d.ts +21 -1
- package/dist/workspace/trust/provenance.d.ts.map +1 -1
- package/dist/workspace/trust/rotation.d.ts +132 -0
- package/dist/workspace/trust/rotation.d.ts.map +1 -0
- package/dist/workspace/trust/seal.d.ts.map +1 -1
- package/dist/workspace/trust/signers-cli.d.ts +49 -0
- package/dist/workspace/trust/signers-cli.d.ts.map +1 -0
- package/dist/workspace/trust/ssh-commit.d.ts +12 -0
- package/dist/workspace/trust/ssh-commit.d.ts.map +1 -1
- package/dist/workspace/trust/test-repo.d.ts +13 -0
- package/dist/workspace/trust/test-repo.d.ts.map +1 -1
- package/dist/workspace/trust/verify.d.ts +15 -0
- package/dist/workspace/trust/verify.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/write-scope.d.ts +199 -0
- package/dist/workspace/write-scope.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/build.ts +8 -0
- package/src/cli/build-options.ts +4 -1
- package/src/cli/commands/build.ts +2 -0
- package/src/cli/commands/import-live.test.ts +69 -1
- package/src/cli/commands/import.ts +48 -22
- package/src/cli/handlers/fan-out.test.ts +6 -6
- package/src/cli/handlers/fan-out.ts +2 -1
- package/src/cli/handlers/graph.test.ts +42 -0
- package/src/cli/handlers/graph.ts +22 -0
- package/src/cli/handlers/operator.ts +1 -1
- package/src/cli/main.test.ts +32 -0
- package/src/cli/main.ts +103 -6
- package/src/cli/mcp/workspace-tools.test.ts +1 -1
- package/src/cli/mcp/workspace-tools.ts +33 -2
- package/src/cli/registry.ts +22 -0
- package/src/cli/serve-mcp-workspace.test.ts +1 -1
- package/src/codegen/release-wiring.test.ts +5 -1
- package/src/components/fan-out-output.test.ts +1 -1
- package/src/components/fan-out.test.ts +1 -1
- package/src/components/promote.test.ts +1 -1
- package/src/config.ts +12 -0
- package/src/content-digest.test.ts +2 -2
- package/src/lexicon.ts +25 -1
- package/src/lifecycle/gate-ledger.test.ts +14 -0
- package/src/lifecycle/gate-ledger.ts +2 -1
- package/src/lifecycle/plan-digest.test.ts +54 -3
- package/src/lifecycle/plan-digest.ts +38 -8
- package/src/op/activities/activity-contracts.ts +1 -0
- package/src/op/activities/propose-upgrade.ts +8 -5
- package/src/op/gate-approval.test.ts +17 -0
- package/src/op/gate.ts +3 -3
- package/src/op/index.ts +1 -1
- package/src/serializer.ts +9 -0
- package/src/telemetry-attribution.test.ts +91 -0
- package/src/telemetry-attribution.ts +145 -0
- package/src/workspace/agent-cli.ts +134 -0
- package/src/workspace/agent.schema.json +356 -0
- package/src/workspace/behold-kinds.test.ts +1 -1
- package/src/workspace/changes-cli.ts +5 -0
- package/src/workspace/changes.schema.json +179 -1
- package/src/workspace/changes.ts +58 -4
- package/src/workspace/check-live.test.ts +192 -0
- package/src/workspace/check.schema.json +64 -0
- package/src/workspace/checks/links.ts +23 -2
- package/src/workspace/checks/live.ts +113 -0
- package/src/workspace/checks.test.ts +2 -2
- package/src/workspace/checks.ts +20 -3
- package/src/workspace/compose-graph.test.ts +47 -0
- package/src/workspace/compose-graph.ts +120 -3
- package/src/workspace/conformance/__fixture__/decisions/decision.kind.mjs +7 -1
- package/src/workspace/conformance/__fixture__/decisions/decision.schema.json +5 -0
- package/src/workspace/declaration.schema.json +138 -3
- package/src/workspace/declaration.ts +106 -1
- package/src/workspace/declared-kinds.test.ts +33 -0
- package/src/workspace/evidence.schema.json +279 -0
- package/src/workspace/export-cli.ts +180 -0
- package/src/workspace/export-import.test.ts +282 -0
- package/src/workspace/export.ts +486 -0
- package/src/workspace/graph-cli.ts +47 -1
- package/src/workspace/graph-contract.test.ts +89 -4
- package/src/workspace/graph.schema.json +206 -1
- package/src/workspace/import.ts +325 -0
- package/src/workspace/kinds.test.ts +5 -5
- package/src/workspace/kinds.ts +25 -3
- package/src/workspace/lineage-adopt-cli.ts +103 -0
- package/src/workspace/lineage-adopt.test.ts +552 -0
- package/src/workspace/lineage-adopt.ts +452 -0
- package/src/workspace/lineage-check.ts +26 -5
- package/src/workspace/lineage-cli.ts +12 -2
- package/src/workspace/lineage-hash-index.ts +305 -0
- package/src/workspace/lineage-init.test.ts +9 -0
- package/src/workspace/lineage-init.ts +29 -9
- package/src/workspace/lineage-lock.ts +54 -0
- package/src/workspace/lineage-migrations.test.ts +27 -0
- package/src/workspace/lineage-migrations.ts +44 -14
- package/src/workspace/lineage-provenance.ts +40 -0
- package/src/workspace/lineage-upgrade-cli.ts +9 -5
- package/src/workspace/lineage-upgrade.test.ts +92 -1
- package/src/workspace/lineage-upgrade.ts +111 -16
- package/src/workspace/lineage-versions.ts +348 -0
- package/src/workspace/links.test.ts +121 -2
- package/src/workspace/links.ts +97 -6
- package/src/workspace/ls-contract.test.ts +84 -1
- package/src/workspace/ls-generated.ts +111 -0
- package/src/workspace/ls.schema.json +19 -0
- package/src/workspace/ls.ts +8 -1
- package/src/workspace/member-commands.ts +3 -1
- package/src/workspace/nested-graph.test.ts +176 -0
- package/src/workspace/nested-graph.ts +169 -0
- package/src/workspace/nesting.ts +37 -0
- package/src/workspace/pin-cli.test.ts +71 -0
- package/src/workspace/pin-cli.ts +57 -0
- package/src/workspace/pin-integrity.test.ts +121 -0
- package/src/workspace/pin-integrity.ts +104 -0
- package/src/workspace/points-write.schema.json +1 -0
- package/src/workspace/read-contract.test.ts +24 -0
- package/src/workspace/reason-codes.test.ts +10 -0
- package/src/workspace/reason-codes.ts +29 -2
- package/src/workspace/record-sessions.ts +12 -14
- package/src/workspace/records-amend.schema.json +4 -0
- package/src/workspace/records-cli.ts +93 -12
- package/src/workspace/records-close.schema.json +6 -2
- package/src/workspace/records-close.ts +10 -2
- package/src/workspace/records-formats.test.ts +13 -5
- package/src/workspace/records-new.schema.json +4 -0
- package/src/workspace/records-review.schema.json +4 -0
- package/src/workspace/records-sessions.test.ts +23 -6
- package/src/workspace/records-write.test.ts +65 -8
- package/src/workspace/records-write.ts +70 -6
- package/src/workspace/records.schema.json +55 -3
- package/src/workspace/records.ts +96 -5
- package/src/workspace/returns.ts +328 -0
- package/src/workspace/signers.schema.json +206 -0
- package/src/workspace/status-gates.ts +2 -1
- package/src/workspace/template-manifest.ts +22 -4
- package/src/workspace/trust/attestor.ts +15 -0
- package/src/workspace/trust/dsse.ts +134 -0
- package/src/workspace/trust/evidence-cli.ts +195 -0
- package/src/workspace/trust/evidence.test.ts +241 -0
- package/src/workspace/trust/evidence.ts +207 -0
- package/src/workspace/trust/policy.ts +110 -3
- package/src/workspace/trust/provenance.ts +41 -4
- package/src/workspace/trust/record-seal.test.ts +1 -1
- package/src/workspace/trust/rotation.test.ts +258 -0
- package/src/workspace/trust/rotation.ts +336 -0
- package/src/workspace/trust/seal.ts +11 -0
- package/src/workspace/trust/signers-cli.ts +178 -0
- package/src/workspace/trust/ssh-commit.ts +53 -4
- package/src/workspace/trust/test-repo.ts +18 -0
- package/src/workspace/trust/trust.test.ts +8 -2
- package/src/workspace/trust/verify-cli.ts +1 -0
- package/src/workspace/trust/verify.ts +22 -0
- package/src/workspace/work-evidence.schema.json +4 -0
- package/src/workspace/write-scope.test.ts +340 -0
- package/src/workspace/write-scope.ts +448 -0
|
@@ -65,7 +65,11 @@ export declare const spawnChant: ChantRunner;
|
|
|
65
65
|
export interface UpgradeOptions {
|
|
66
66
|
/** The directory holding `.chant/workspace.lock.json`. */
|
|
67
67
|
root: string;
|
|
68
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* The scope to upgrade: `"."`, a scope of the lock at `root` (a vendor
|
|
70
|
+
* scope's directory, or a member subtree recorded in it), or the name or
|
|
71
|
+
* directory of a declared member that keeps a lock of its own (#2550).
|
|
72
|
+
*/
|
|
69
73
|
scope?: string;
|
|
70
74
|
/**
|
|
71
75
|
* The target ref (git) or label (vendor). Defaults to the ref the scope is
|
|
@@ -76,6 +80,12 @@ export interface UpgradeOptions {
|
|
|
76
80
|
to?: string;
|
|
77
81
|
/** Run migrations whose body is code. */
|
|
78
82
|
allowCode?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* `<repo>[#<member>]`: move the scope to this template (#2551). The chain
|
|
85
|
+
* starts with the new template's bridge migration from the scope's current
|
|
86
|
+
* template. Needs `to`, and a git scope.
|
|
87
|
+
*/
|
|
88
|
+
source?: string;
|
|
79
89
|
/** Replaces the child-process build and lint. For tests. */
|
|
80
90
|
runChant?: ChantRunner;
|
|
81
91
|
}
|
|
@@ -88,8 +98,15 @@ export interface GovernanceChange {
|
|
|
88
98
|
rules: string;
|
|
89
99
|
}
|
|
90
100
|
export interface StagedUpgrade {
|
|
101
|
+
/** The scope in the lock that was upgraded: `"."` for a member with a lock of its own. */
|
|
91
102
|
scope: string;
|
|
103
|
+
/** The declared member whose own lock this upgraded, when the scope argument named one. */
|
|
104
|
+
member?: string;
|
|
105
|
+
/** What the gate and the proposal branch are named: the member, else the scope. */
|
|
106
|
+
gate: string;
|
|
92
107
|
template: string;
|
|
108
|
+
/** Set when the upgrade moves the scope to another template (`--source`, #2551): that template's id. */
|
|
109
|
+
switchedTo?: string;
|
|
93
110
|
kind: Lineage["kind"];
|
|
94
111
|
/** The pin before and after. */
|
|
95
112
|
from: string | null;
|
|
@@ -138,6 +155,18 @@ export interface StagedUpgrade {
|
|
|
138
155
|
}
|
|
139
156
|
/** Whether a repository path is a governance file: one that decides gates, pipelines or review. */
|
|
140
157
|
export declare function isGovernancePath(path: string): boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Resolve the scope argument against `root` (#2550). A scope the lock at
|
|
160
|
+
* `root` holds is used as it is. Otherwise a member the workspace
|
|
161
|
+
* declaration names (by name or directory) that keeps a lock of its own is
|
|
162
|
+
* upgraded from its directory, as the project it is, so its patch, gate and
|
|
163
|
+
* build stay inside it. A member without a lock was not made from a template.
|
|
164
|
+
*/
|
|
165
|
+
export declare function resolveUpgradeTarget(root: string, scopeArg: string | undefined): {
|
|
166
|
+
root: string;
|
|
167
|
+
scope: string;
|
|
168
|
+
member?: string;
|
|
169
|
+
};
|
|
141
170
|
/**
|
|
142
171
|
* Stage an upgrade: steps 1 to 5 and the digest of step 6. Nothing in the
|
|
143
172
|
* project's tree changes. The caller decides the gate, then applies the patch
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineage-upgrade.d.ts","sourceRoot":"","sources":["../../src/workspace/lineage-upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;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;
|
|
1
|
+
{"version":3,"file":"lineage-upgrade.d.ts","sourceRoot":"","sources":["../../src/workspace/lineage-upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;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,CA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C;IACb,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,+CAA+C;IAC/C,OAAO,IAAI,IAAI,CAAC;CACjB;AA+OD,mGAAmG;AACnG,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AA4ED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAyBjI;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CA6PlF;AAyBD,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAa9D;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAiBlG;AAED,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,EAAE,CAgC9D"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant workspace versions [<dir>] [--template <id>] [--json]` (#2551, D9,
|
|
3
|
+
* requirement T9).
|
|
4
|
+
*
|
|
5
|
+
* Reports, for a family of workspaces, which template version and which chant
|
|
6
|
+
* and lexicon versions each one is on. A family is the set of workspaces made
|
|
7
|
+
* from the same template: each lineage scope belongs to the family of its
|
|
8
|
+
* template id. The command finds every `.chant/workspace.lock.json` under
|
|
9
|
+
* `<dir>` (the working directory by default), so pointing it at a directory of
|
|
10
|
+
* checkouts compares them all. Without `--available` nothing is fetched and no
|
|
11
|
+
* code runs: it reads lock files and `package.json` files only.
|
|
12
|
+
*
|
|
13
|
+
* With `--available`, each family whose template is a git source also lists
|
|
14
|
+
* the template's version tags (`git ls-remote --tags`, catalogued in
|
|
15
|
+
* `test/egress-catalogue.ts`), and each member says how many are newer than
|
|
16
|
+
* the version its lock sits at. That is the list `chant workspace upgrade
|
|
17
|
+
* --to <tag>` chooses from.
|
|
18
|
+
*
|
|
19
|
+
* Per D9 the word "drift" keeps its existing meanings, so a workspace on an
|
|
20
|
+
* older version than the newest one in its family is reported as `behind`.
|
|
21
|
+
*/
|
|
22
|
+
import type { CommandContext } from "../cli/registry.js";
|
|
23
|
+
import { type LineageSource } from "./lineage-lock.js";
|
|
24
|
+
/** How deep under `<dir>` a lock is looked for. */
|
|
25
|
+
export declare const MAX_DEPTH = 8;
|
|
26
|
+
export interface ScopeVersion {
|
|
27
|
+
scope: string;
|
|
28
|
+
kind: "template" | "vendor";
|
|
29
|
+
template: string;
|
|
30
|
+
ref: string | null;
|
|
31
|
+
/** The version the ref names, or null when it names none (a branch, a commit). */
|
|
32
|
+
version: string | null;
|
|
33
|
+
commit: string | null;
|
|
34
|
+
migrations: number;
|
|
35
|
+
/** `files` or `lineage` when adopt-lineage recorded the lineage (#2551), otherwise null. */
|
|
36
|
+
adoption: "files" | "lineage" | null;
|
|
37
|
+
/** D5's level: `adopted` once the policy at base admits the adopted range, `unattested` otherwise. */
|
|
38
|
+
provenance: "adopted" | "unattested";
|
|
39
|
+
/** Where the template is fetched from: the source type, and for git the URL as the lock records it. */
|
|
40
|
+
source: {
|
|
41
|
+
type: LineageSource["type"];
|
|
42
|
+
url?: string;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export interface PluginVersion {
|
|
46
|
+
name: string;
|
|
47
|
+
/** The range `package.json` declares. */
|
|
48
|
+
declared: string;
|
|
49
|
+
/** The version installed where the workspace resolves it, or null when it is not installed. */
|
|
50
|
+
installed: string | null;
|
|
51
|
+
}
|
|
52
|
+
export interface WorkspaceVersions {
|
|
53
|
+
/** Relative to `<dir>`, `.` for `<dir>` itself. */
|
|
54
|
+
path: string;
|
|
55
|
+
scopes: ScopeVersion[];
|
|
56
|
+
plugins: PluginVersion[];
|
|
57
|
+
/** Set when the lock could not be read; the workspace then has no scopes. */
|
|
58
|
+
error?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface FamilyMember {
|
|
61
|
+
path: string;
|
|
62
|
+
scope: string;
|
|
63
|
+
ref: string | null;
|
|
64
|
+
version: string | null;
|
|
65
|
+
/** Older than the newest version in the family. */
|
|
66
|
+
behind: boolean;
|
|
67
|
+
/** With `--available`: how many of the template's version tags are newer than this member's version, or null when unknown. */
|
|
68
|
+
newer?: number | null;
|
|
69
|
+
}
|
|
70
|
+
export interface AvailableVersions {
|
|
71
|
+
/** The template's version tags, oldest first, narrowed by `--tags`. */
|
|
72
|
+
tags: string[];
|
|
73
|
+
/** The newest of them, or null when there are none. */
|
|
74
|
+
newest: string | null;
|
|
75
|
+
/** Why the tags could not be listed (not a git template, or the fetch failed). */
|
|
76
|
+
error?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface Family {
|
|
79
|
+
template: string;
|
|
80
|
+
/** The newest version any member is on, or null when no member's ref is a version. */
|
|
81
|
+
newest: string | null;
|
|
82
|
+
members: FamilyMember[];
|
|
83
|
+
/** With `--available`: the template's own version tags. */
|
|
84
|
+
available?: AvailableVersions;
|
|
85
|
+
}
|
|
86
|
+
export interface VersionsReport {
|
|
87
|
+
root: string;
|
|
88
|
+
workspaces: WorkspaceVersions[];
|
|
89
|
+
families: Family[];
|
|
90
|
+
/** chant and lexicon packages that members of one family have at different installed versions. */
|
|
91
|
+
pluginSpread: Array<{
|
|
92
|
+
template: string;
|
|
93
|
+
name: string;
|
|
94
|
+
versions: Record<string, string[]>;
|
|
95
|
+
}>;
|
|
96
|
+
}
|
|
97
|
+
/** Every directory under `dir` that holds a lineage lock, nearest first. */
|
|
98
|
+
export declare function findLocks(dir: string, depth?: number): string[];
|
|
99
|
+
/** chant and its lexicons, as the workspace's `package.json` declares them. */
|
|
100
|
+
export declare function pluginVersions(dir: string): PluginVersion[];
|
|
101
|
+
export interface VersionsOptions {
|
|
102
|
+
/** Only this template's family. */
|
|
103
|
+
template?: string;
|
|
104
|
+
/** List each git template's version tags. */
|
|
105
|
+
available?: boolean;
|
|
106
|
+
/** Narrow those tags with a glob, such as `kit-v*`. */
|
|
107
|
+
tags?: string;
|
|
108
|
+
/** Lists a template's version tags; replaced in tests. */
|
|
109
|
+
listTags?: (url: string, member: string | undefined, pattern?: string) => string[];
|
|
110
|
+
}
|
|
111
|
+
/** Build the report for every workspace under `dir`, narrowed to one template's family when `template` is given. */
|
|
112
|
+
export declare function workspaceVersions(dir: string, templateOrOptions?: string | VersionsOptions): VersionsReport;
|
|
113
|
+
/** The report as terminal lines. */
|
|
114
|
+
export declare function describeVersions(report: VersionsReport): string[];
|
|
115
|
+
export declare function runWorkspaceVersions(ctx: CommandContext): Promise<number>;
|
|
116
|
+
//# sourceMappingURL=lineage-versions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineage-versions.d.ts","sourceRoot":"","sources":["../../src/workspace/lineage-versions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAIpF,mDAAmD;AACnD,eAAO,MAAM,SAAS,IAAI,CAAC;AAI3B,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,GAAG,QAAQ,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,kFAAkF;IAClF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,MAA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Ac,GAAG,OAAO,CAAC,MAAM,CAAC,CAmB/E"}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* is promoted.
|
|
17
17
|
*
|
|
18
18
|
* Every row says how it was found (`declared` or `inferred:joinKey`), where it
|
|
19
|
-
* resolved (`source
|
|
19
|
+
* resolved (`source`, or `live` for the rows of `check --live`, #2549) and its status. A link that
|
|
20
20
|
* can't be resolved is kept, with the reason.
|
|
21
21
|
*
|
|
22
22
|
* {@link resolveLinks} takes the members' handles as plain data, so the same
|
|
@@ -28,9 +28,19 @@
|
|
|
28
28
|
import { type JoinLabel } from "../join-key.js";
|
|
29
29
|
import type { Declaration, LinkDeclaration, Member } from "./declaration.js";
|
|
30
30
|
import type { KindRegistry, MemberKind } from "./kinds.js";
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
import type { MemberCollector } from "./compose-graph.js";
|
|
32
|
+
/**
|
|
33
|
+
* The link kinds chant knows. Closed: a link of any other kind fails closed.
|
|
34
|
+
* `output` reads a named output of the producer. `telemetry` (#2558, D22)
|
|
35
|
+
* sends the consumer's telemetry to a pipeline or exporter of the producer's
|
|
36
|
+
* collector.
|
|
37
|
+
*/
|
|
38
|
+
export declare const LINK_KINDS: readonly ["output", "telemetry"];
|
|
33
39
|
export declare const DEFAULT_LINK_KIND = "output";
|
|
40
|
+
/** The kind a link has when it names a collector target (#2558). */
|
|
41
|
+
export declare const TELEMETRY_LINK_KIND = "telemetry";
|
|
42
|
+
/** The OTLP protocols a telemetry link may state, as `OTEL_EXPORTER_OTLP_PROTOCOL` names them. */
|
|
43
|
+
export declare const TELEMETRY_PROTOCOLS: readonly ["grpc", "http/protobuf", "http/json"];
|
|
34
44
|
/** How a row was found: written down, or inferred by the named rule. */
|
|
35
45
|
export type LinkOrigin = "declared" | "inferred:joinKey";
|
|
36
46
|
/** One output or parameter of a member, as a join sees it. */
|
|
@@ -59,7 +69,7 @@ interface RowBase {
|
|
|
59
69
|
consumer: string;
|
|
60
70
|
kind: string;
|
|
61
71
|
origin: LinkOrigin;
|
|
62
|
-
resolves: "source";
|
|
72
|
+
resolves: "source" | "live";
|
|
63
73
|
/** Why the row is not `resolved`, or null. */
|
|
64
74
|
reason: string | null;
|
|
65
75
|
}
|
|
@@ -77,6 +87,20 @@ export interface LinkRow extends RowBase {
|
|
|
77
87
|
to?: string;
|
|
78
88
|
/** The declared link's JSON Pointer in the declaration. */
|
|
79
89
|
pointer?: string;
|
|
90
|
+
/** A telemetry link: the OTLP protocol it states (#2558). */
|
|
91
|
+
protocol?: string;
|
|
92
|
+
/** A telemetry link that found its target: what `output` named, a `pipeline` or an `exporter` of the producer's collector. */
|
|
93
|
+
target?: "pipeline" | "exporter";
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* What a telemetry link reads from the producers (#2558): each composed
|
|
97
|
+
* member's collector, as `chant workspace graph` lists it, and which members
|
|
98
|
+
* were composed. `chant workspace check` reads source and runs no member, so
|
|
99
|
+
* it passes none and a telemetry link stays unresolved there.
|
|
100
|
+
*/
|
|
101
|
+
export interface TelemetryTargets {
|
|
102
|
+
collectors: ReadonlyMap<string, MemberCollector>;
|
|
103
|
+
composed: ReadonlySet<string>;
|
|
80
104
|
}
|
|
81
105
|
/** A parameter that joins outputs of two or more producers (or two outputs of one). */
|
|
82
106
|
export interface AmbiguousRow extends RowBase {
|
|
@@ -110,7 +134,7 @@ export declare function linkTargetProblem(declaration: Declaration, consumer: Me
|
|
|
110
134
|
* missing from it is unresolved. Declared rows come first, in declaration
|
|
111
135
|
* order; inferred and ambiguous rows follow, sorted by consumer and parameter.
|
|
112
136
|
*/
|
|
113
|
-
export declare function resolveLinks(declaration: Declaration, handles: ReadonlyMap<string, MemberHandles
|
|
137
|
+
export declare function resolveLinks(declaration: Declaration, handles: ReadonlyMap<string, MemberHandles>, telemetry?: TelemetryTargets): LinkTableRow[];
|
|
114
138
|
/**
|
|
115
139
|
* The handles of a member whose kind lists its outputs, or exposes none.
|
|
116
140
|
* Undefined for a kind whose outputs are read from the member (`chant`).
|
|
@@ -120,6 +144,8 @@ export declare function kindHandles(m: Member, kind: MemberKind): MemberHandles
|
|
|
120
144
|
export interface ComposedHandles {
|
|
121
145
|
/** Members whose IR was composed. */
|
|
122
146
|
composed: readonly string[];
|
|
147
|
+
/** The collectors those members report (#2558); a telemetry link resolves against them. */
|
|
148
|
+
collectors?: readonly MemberCollector[];
|
|
123
149
|
exports: readonly {
|
|
124
150
|
member: string;
|
|
125
151
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../src/workspace/links.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../src/workspace/links.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,kCAAmC,CAAC;AAC3D,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAE1C,oEAAoE;AACpE,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAE/C,kGAAkG;AAClG,eAAO,MAAM,mBAAmB,iDAAkD,CAAC;AAEnF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,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,2FAA2F;IAC3F,UAAU,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACxC,OAAO,EAAE,SAAS;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACpE,OAAO,EAAE,SAAS;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACpE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,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"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The generated files a member owns, and the CI job names inside them, for
|
|
3
|
+
* `chant workspace ls --json` (#3050; read by INTENTIUS/github-warden#62).
|
|
4
|
+
*
|
|
5
|
+
* Two sources feed the list. The member's declared `generated` entries (#2541)
|
|
6
|
+
* are relative to the member's directory. The interim record
|
|
7
|
+
* `.chant/generated.json` that `chant build --components --generate` and
|
|
8
|
+
* `chant run --generate` write (#2542) holds repository-relative paths, which is
|
|
9
|
+
* how a forge CI file outside the member's directory is named. A path in both
|
|
10
|
+
* lists once, with the declared entry's command.
|
|
11
|
+
*
|
|
12
|
+
* The job names are what a forge shows as the check name, so a reader can
|
|
13
|
+
* require them: for GitHub, Forgejo and Gitea the job's `name`, else its id;
|
|
14
|
+
* for GitLab the job's key. chant parses the file and runs nothing.
|
|
15
|
+
*/
|
|
16
|
+
import type { Member } from "./declaration.js";
|
|
17
|
+
import { type WorkspaceTree } from "./tree.js";
|
|
18
|
+
/** A generated file of a member, as `ls --json` lists it. */
|
|
19
|
+
export interface LsGenerated {
|
|
20
|
+
/** From the repository root, with / separators, as a forge reads CI files. */
|
|
21
|
+
path: string;
|
|
22
|
+
/** The command that regenerates it, run in the member's directory. */
|
|
23
|
+
command: string;
|
|
24
|
+
/** The environment a component pipeline deploys, or null. */
|
|
25
|
+
env: string | null;
|
|
26
|
+
/** The check names of a forge CI file, or null for any other file and for one that can't be read or parsed. */
|
|
27
|
+
jobs: string[] | null;
|
|
28
|
+
}
|
|
29
|
+
/** The check names in a forge CI file, or null when the file is no workflow or can't be parsed. */
|
|
30
|
+
export declare function jobNames(path: string, text: string): string[] | null;
|
|
31
|
+
/**
|
|
32
|
+
* The member's generated files. `prefix` is the workspace root relative to the
|
|
33
|
+
* repository root, `"."` when they are the same. Never throws for a record that
|
|
34
|
+
* is missing or malformed: that member lists what the declaration gives.
|
|
35
|
+
*/
|
|
36
|
+
export declare function memberGenerated(member: Member, tree: WorkspaceTree, prefix: string): LsGenerated[];
|
|
37
|
+
//# sourceMappingURL=ls-generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ls-generated.d.ts","sourceRoot":"","sources":["../../src/workspace/ls-generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEtD,6DAA6D;AAC7D,MAAM,WAAW,WAAW;IAC1B,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,+GAA+G;IAC/G,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CACvB;AAKD,mGAAmG;AACnG,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAoBpE;AAQD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,WAAW,EAAE,CAuClG"}
|
package/dist/workspace/ls.d.ts
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
import type { CommandContext } from "../cli/registry.js";
|
|
23
23
|
import { type Declaration, type DiagramDeclaration, type ErrorLocation, type Member, type WorkspaceErrorCode } from "./declaration.js";
|
|
24
|
+
import { type LsGenerated } from "./ls-generated.js";
|
|
24
25
|
import { type KindRegistry } from "./kinds.js";
|
|
25
26
|
import type { WorkspaceTree } from "./tree.js";
|
|
26
27
|
import type { DeclaredKindReasonCode } from "./declared-kinds.js";
|
|
@@ -57,6 +58,7 @@ export interface LsRecordKind {
|
|
|
57
58
|
*/
|
|
58
59
|
acceptance: LsAcceptance[] | null;
|
|
59
60
|
}
|
|
61
|
+
export type { LsGenerated } from "./ls-generated.js";
|
|
60
62
|
/** A work item's acceptance criteria, counted (#2772). */
|
|
61
63
|
export interface LsAcceptance {
|
|
62
64
|
item: string;
|
|
@@ -81,6 +83,8 @@ export interface LsMember {
|
|
|
81
83
|
} | null;
|
|
82
84
|
/** The record kinds the member declares, in file order (#2680). */
|
|
83
85
|
records: LsRecordKind[];
|
|
86
|
+
/** The files the member generates, and the job names inside its forge CI files (#3050). */
|
|
87
|
+
generated: LsGenerated[];
|
|
84
88
|
}
|
|
85
89
|
/**
|
|
86
90
|
* A diagram artifact the declaration names (#2764), flattened across the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ls.d.ts","sourceRoot":"","sources":["../../src/workspace/ls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,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M,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,cAAc,CAEzK;AAED,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CA+EnG"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read-only expansion of nested workspaces in `chant workspace graph`
|
|
3
|
+
* (#2551, #2524 D2, ws-007, ws-071).
|
|
4
|
+
*
|
|
5
|
+
* A member of kind `workspace` holds its own `chant.workspace.json`. The outer
|
|
6
|
+
* workspace never runs commands inside it and never writes there. It reads
|
|
7
|
+
* it the way it reads any member: through the nested workspace's own
|
|
8
|
+
* command, `chant workspace graph`, started in the nested root. That command
|
|
9
|
+
* hands itself to the nested workspace's own chant when it has one (ws-021),
|
|
10
|
+
* so the nested side is read under its own toolchain, and the answer is a
|
|
11
|
+
* document of the read contract the outer chant validates before using it.
|
|
12
|
+
*
|
|
13
|
+
* The nested document is folded into the outer one with every id prefixed by
|
|
14
|
+
* the outer member's name, so a node `delivery/web::Bucket` of the nested
|
|
15
|
+
* workspace becomes `reference-workspace/delivery/web::Bucket`: `outer/inner/id`.
|
|
16
|
+
* Each node keeps the nested member it came from in `nested`, and the outer
|
|
17
|
+
* member entry carries the nested workspace's own member list and links.
|
|
18
|
+
*
|
|
19
|
+
* Nothing here writes: the nested read is a read (its per-member cache lives
|
|
20
|
+
* in the user's cache directory, ws-059), and the outer side keeps nothing.
|
|
21
|
+
*/
|
|
22
|
+
import type { ParsedArgs } from "../cli/registry.js";
|
|
23
|
+
import type { ComposedMember, WorkspaceGraph } from "./compose-graph.js";
|
|
24
|
+
export type { NestedWorkspace } from "./compose-graph.js";
|
|
25
|
+
import { type Toolchain } from "./member-commands.js";
|
|
26
|
+
/** What reading one nested workspace gave. */
|
|
27
|
+
export type NestedRead = {
|
|
28
|
+
ok: true;
|
|
29
|
+
chant: string | null;
|
|
30
|
+
doc: WorkspaceGraph & {
|
|
31
|
+
contract: number;
|
|
32
|
+
chant?: string;
|
|
33
|
+
};
|
|
34
|
+
} | {
|
|
35
|
+
ok: false;
|
|
36
|
+
chant: string | null;
|
|
37
|
+
code: "command-failed" | "output-unreadable" | "ir-version-unsupported";
|
|
38
|
+
message: string;
|
|
39
|
+
};
|
|
40
|
+
/** The command line of the nested read: the outer command's own read flags, passed on. */
|
|
41
|
+
export declare function nestedArgv(dir: string, args: Partial<ParsedArgs>, at: string | null | undefined): string[];
|
|
42
|
+
/** Check a nested read's output against the read contract this chant knows. */
|
|
43
|
+
export declare function readNestedDocument(stdout: string, exitCode: number, stderr: string, schemaId: string, contract: number): NestedRead;
|
|
44
|
+
/** Run the nested workspace's own `chant workspace graph` in `abs`. */
|
|
45
|
+
export declare function readNested(abs: string, args: Partial<ParsedArgs>, at: string | null | undefined, schemaId: string, contract: number, toolchain?: Toolchain | undefined): Promise<NestedRead & {
|
|
46
|
+
stderr: string;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Fold a nested workspace's graph into the outer one, under the outer member
|
|
50
|
+
* `outer`, and fill that member's entry. The outer graph's other sections are
|
|
51
|
+
* left as they are, so links still resolve against the outer declaration.
|
|
52
|
+
*/
|
|
53
|
+
export declare function foldNested(graph: WorkspaceGraph, member: ComposedMember, inner: WorkspaceGraph & {
|
|
54
|
+
contract: number;
|
|
55
|
+
}): void;
|
|
56
|
+
//# sourceMappingURL=nested-graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nested-graph.d.ts","sourceRoot":"","sources":["../../src/workspace/nested-graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBA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G;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAG1C;AAYD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAmD5H"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The outer workspace never writes inside a nested one (#2524 D2, ws-007,
|
|
3
|
+
* #2551). A member of kind `workspace` upgrades itself with its own
|
|
4
|
+
* `chant workspace upgrade`; the outer side only reads it
|
|
5
|
+
* (./nested-graph.ts).
|
|
6
|
+
*/
|
|
7
|
+
/** The nested workspaces `dir` declares, as `{ name, dir }` with `dir` relative to `dir`. Empty without a readable declaration. */
|
|
8
|
+
export declare function nestedWorkspaces(dir: string): {
|
|
9
|
+
name: string;
|
|
10
|
+
dir: string;
|
|
11
|
+
}[];
|
|
12
|
+
/**
|
|
13
|
+
* The paths, of `paths` (relative to the repository root), that lie inside a
|
|
14
|
+
* nested workspace of the workspace at `dir`, whose own path from the
|
|
15
|
+
* repository root is `rel` ("" for the root).
|
|
16
|
+
*/
|
|
17
|
+
export declare function pathsInsideNested(dir: string, rel: string, paths: readonly string[]): {
|
|
18
|
+
member: string;
|
|
19
|
+
path: string;
|
|
20
|
+
}[];
|
|
21
|
+
//# sourceMappingURL=nesting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nesting.d.ts","sourceRoot":"","sources":["../../src/workspace/nesting.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,mIAAmI;AACnI,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,CAS7E;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,CASxH"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant workspace pin <path> [--json]` (#2547, ws-065): print the `integrity`
|
|
3
|
+
* value that pins the plugin at `path`, a directory or file inside the
|
|
4
|
+
* workspace. What the hash covers is in ./pin-integrity.ts. The command reads
|
|
5
|
+
* files only, and says whether a path pin the declaration already has for
|
|
6
|
+
* that path matches.
|
|
7
|
+
*/
|
|
8
|
+
import type { CommandContext } from "../cli/registry.js";
|
|
9
|
+
export declare function runWorkspacePin(ctx: CommandContext): Promise<number>;
|
|
10
|
+
//# sourceMappingURL=pin-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pin-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/pin-cli.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAOtD,wBAAsB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAuC1E"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content hashes for plugins a declaration loads by path (#2547, ws-065).
|
|
3
|
+
*
|
|
4
|
+
* A pin of `{ "path": "plugins/kinds", "integrity": "sha256-..." }` says the
|
|
5
|
+
* plugin directory must hash to that value before chant reads anything from
|
|
6
|
+
* it. `chant workspace pin <path>` prints the value to put there.
|
|
7
|
+
*
|
|
8
|
+
* `integrity` is a Subresource Integrity string: `sha256-`, `sha384-` or
|
|
9
|
+
* `sha512-`, then the base64 of the digest. A directory has no single byte
|
|
10
|
+
* stream to hash, so its digest is taken over a manifest that names every
|
|
11
|
+
* file by its path and its own digest, and a file path is hashed directly:
|
|
12
|
+
*
|
|
13
|
+
* - The files are every regular file under the directory, at any depth, except
|
|
14
|
+
* anything inside a `node_modules` or `.git` directory.
|
|
15
|
+
* - Each file's digest is the chosen algorithm over its bytes, as they are on
|
|
16
|
+
* disk: no line-ending change, so a checkout that rewrites line endings
|
|
17
|
+
* hashes differently from one that does not.
|
|
18
|
+
* - The manifest is one line per file, `<hex digest> <path>\n`, in order of
|
|
19
|
+
* the path's UTF-16 code units, with `/` as the separator and the path
|
|
20
|
+
* relative to the directory. The pin is the algorithm over those bytes.
|
|
21
|
+
* - A symbolic link anywhere in the directory is refused: it can point
|
|
22
|
+
* outside the plugin, and what it points at is not what was pinned.
|
|
23
|
+
*
|
|
24
|
+
* The hash covers the working tree. Build output and untracked files inside
|
|
25
|
+
* the directory change it, so pin a directory that holds only committed files.
|
|
26
|
+
*/
|
|
27
|
+
export type IntegrityAlgorithm = "sha256" | "sha384" | "sha512";
|
|
28
|
+
/** The algorithm and base64 digest of an `integrity` value, or undefined when it is not one. */
|
|
29
|
+
export declare function parseIntegrity(value: string): {
|
|
30
|
+
algorithm: IntegrityAlgorithm;
|
|
31
|
+
digest: string;
|
|
32
|
+
} | undefined;
|
|
33
|
+
/** Thrown when a path can't be hashed: it is missing, or holds a symbolic link. */
|
|
34
|
+
export declare class PinHashError extends Error {
|
|
35
|
+
}
|
|
36
|
+
/** The files a directory's hash covers, as paths relative to it, in hash order. */
|
|
37
|
+
export declare function pinnedFiles(dir: string): string[];
|
|
38
|
+
/** The `integrity` value for the plugin at `abs`: a directory by its manifest, a file by its bytes. */
|
|
39
|
+
export declare function integrityOf(abs: string, algorithm?: IntegrityAlgorithm): {
|
|
40
|
+
integrity: string;
|
|
41
|
+
files: number;
|
|
42
|
+
};
|
|
43
|
+
export type IntegrityCheck = {
|
|
44
|
+
ok: true;
|
|
45
|
+
} | {
|
|
46
|
+
ok: false;
|
|
47
|
+
message: string;
|
|
48
|
+
};
|
|
49
|
+
/** Compare the plugin at `abs` with the `integrity` a pin states. `label` names the plugin in the message. */
|
|
50
|
+
export declare function checkPinIntegrity(abs: string, integrity: string, label: string): IntegrityCheck;
|
|
51
|
+
//# sourceMappingURL=pin-integrity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pin-integrity.d.ts","sourceRoot":"","sources":["../../src/workspace/pin-integrity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAMH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAIhE,gGAAgG;AAChG,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,SAAS,EAAE,kBAAkB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAG3G;AAKD,mFAAmF;AACnF,qBAAa,YAAa,SAAQ,KAAK;CAAG;AAc1C,mFAAmF;AACnF,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAIjD;AAED,uGAAuG;AACvG,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,GAAE,kBAA6B,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAcvH;AAED,MAAM,MAAM,cAAc,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3E,8GAA8G;AAC9G,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,CAiB/F"}
|
|
@@ -58,7 +58,8 @@ export declare const REASONS: {
|
|
|
58
58
|
readonly "record-supersedes-conflict": "A second closed record supersedes a record another one already superseded.";
|
|
59
59
|
readonly "record-remediates-unknown": "A remediates link names an id no record has.";
|
|
60
60
|
readonly "record-remediates-not-closed": "A remediates link names a record that isn't closed; a record still open is amended instead.";
|
|
61
|
-
readonly "
|
|
61
|
+
readonly "record-seal-mismatch": "A closed record's seal is not the whole-file seal of its text now: the record changed after it closed.";
|
|
62
|
+
readonly "session-seal-mismatch": "A closed session's seal is not the whole-file seal of its text now: the session changed after it closed, or was sealed by the rule before #2546.";
|
|
62
63
|
readonly "session-verdict-unknown-record": "A session's verdict names a record that none of the session kind's subject records has.";
|
|
63
64
|
readonly "asset-drift": "A file the record pins by hash has changed: its bytes no longer hash to the pinned sha256.";
|
|
64
65
|
readonly "asset-missing": "A file the record pins by hash does not exist in the tree read.";
|
|
@@ -87,7 +88,7 @@ export declare const REASONS: {
|
|
|
87
88
|
readonly "seal-missing": "The verdict, or the record, carries no seal.";
|
|
88
89
|
readonly "seal-signer-unlisted": "The reviewer, or the record's author, has no key in the signers file at base, so the seal can't count.";
|
|
89
90
|
readonly "seal-signature-invalid": "The seal is malformed, names a signer other than the reviewer or author, or its signature does not verify over the verdict or record.";
|
|
90
|
-
readonly "seal-unverifiable": "Nothing here can say whose seal it is: there is no signers file at base,
|
|
91
|
+
readonly "seal-unverifiable": "Nothing here can say whose seal it is: there is no signers file at base, ssh-keygen is not installed, or the record came back in a return sealed by a signer no admission lists yet.";
|
|
91
92
|
readonly "record-unattested": "A signers file is active at base, and the record names an author whose seal does not verify: it has none, the author has no key in the file, or the signature fails.";
|
|
92
93
|
readonly "kind-unreadable": "The record kind file is missing or could not be imported.";
|
|
93
94
|
readonly "kind-invalid": "The record kind file exports no recordKind, or its shape is wrong.";
|
|
@@ -111,6 +112,9 @@ export declare const REASONS: {
|
|
|
111
112
|
readonly "source-harvest-not-proposed": "A harvested record (source.via harvest) was written in a state other than the kind's first: a harvest proposes, and a person decides.";
|
|
112
113
|
readonly "ratify-quorum-not-met": "The write puts a record in its kind's ratified state (reviews.ratified), and the record's quorum is not met: too few agreeing verdicts count.";
|
|
113
114
|
readonly "record-sign-failed": "--sign was given and no author seal could be made: the record names no author, the key can't be read or used, git names no ssh signing key, or ssh-keygen is not installed.";
|
|
115
|
+
readonly "write-scope-member": "The write is to a file, or to a record kind, of a member outside the writer's scope: an agent session writes only its own member, and writeScope.<class>.members leaves the member out.";
|
|
116
|
+
readonly "write-scope-kind": "The write is to a record kind writeScope.<class>.records does not list, with a verb it does not list for the kind, or deletes a record.";
|
|
117
|
+
readonly "agent-unknown": "CHANT_AGENT, or a commit's Chant-Agent trailer, names an agent session the declaration at base does not declare.";
|
|
114
118
|
readonly "session-unknown": "--session names no session of a session kind whose subjects are the record's kind.";
|
|
115
119
|
readonly "session-not-open": "--session names a session in a closed state, which takes no more verdicts.";
|
|
116
120
|
readonly "points-undeclared": "No record kind with an answers block is declared, or given with --kind, so there is no points file to ask.";
|
|
@@ -176,6 +180,26 @@ export declare const REASONS: {
|
|
|
176
180
|
readonly "lease-push-rejected": "The remote refused the lease push: another clone claimed the item first, or the remote could not be reached.";
|
|
177
181
|
readonly "box-isolation-collision": "Two boxes on one host resolve to the same port, state path or cookie name, or two ports in one box share an offset.";
|
|
178
182
|
readonly "box-isolation-literal": "A host's stateRoot or a box's state entry is a literal machine path instead of one derived from an environment reference and the box's name.";
|
|
183
|
+
readonly "signers-file-missing": "There is no signers file at the base revision, so there is no signer history to read.";
|
|
184
|
+
readonly "signers-removed": "The signers file was removed. Commits merged before the removal keep the set they were judged by; nothing after it verifies.";
|
|
185
|
+
readonly "rotation-unparseable": "The rotation file beside the signers file is not JSON.";
|
|
186
|
+
readonly "rotation-invalid": "The rotation file does not match its shape: schema 1, a version, the previous set's digest, a threshold and signatures.";
|
|
187
|
+
readonly "rotation-first-version": "The first signer set's rotation file names a version other than 1, or a previous digest.";
|
|
188
|
+
readonly "rotation-missing": "The signer set or its threshold changed and no rotation file signed by the set before it came with the change.";
|
|
189
|
+
readonly "rotation-version-skew": "The rotation names a version other than the one after the set it replaces, as a replayed or skipped rotation does.";
|
|
190
|
+
readonly "rotation-previous-mismatch": "The rotation names a previous digest other than the set it replaces, as a rollback to an older set does.";
|
|
191
|
+
readonly "rotation-threshold-unsatisfiable": "The new threshold is more than the number of distinct signers in the new set, so no later rotation could meet it.";
|
|
192
|
+
readonly "rotation-threshold-not-met": "Fewer distinct signers of the set before signed the rotation, in the chant-signers namespace, than that set's threshold.";
|
|
193
|
+
readonly "trust-policy-unreadable": "The trust policy at base can't be read, or its signer history is broken, so no runner key is trusted.";
|
|
194
|
+
readonly "envelope-unreadable": "The --envelope file can't be read, or is not JSON.";
|
|
195
|
+
readonly "envelope-invalid": "The file is not a DSSE envelope: payloadType, payload in canonical base64, and signatures with keyid and sig.";
|
|
196
|
+
readonly "envelope-untrusted": "No signature in the envelope verifies against a runner key the policy at base lists.";
|
|
197
|
+
readonly "evidence-payload-type": "The envelope's payload type is not application/vnd.in-toto+json.";
|
|
198
|
+
readonly "evidence-statement-invalid": "The payload is not an in-toto Statement v1 with chant's runner-evidence predicate, or has a field the predicate does not define.";
|
|
199
|
+
readonly "evidence-runner-mismatch": "The statement names a runner other than the one whose key signed it.";
|
|
200
|
+
readonly "runner-key-invalid": "The key given to evidence sign is not an Ed25519 private key in PEM.";
|
|
201
|
+
readonly "runner-key-is-signer": "The key given to evidence sign is a person's key in the signers file. Evidence is signed by a service or CI identity.";
|
|
202
|
+
readonly "runner-key-unlisted": "The policy at base lists no runner with the key given to evidence sign.";
|
|
179
203
|
readonly "lock-invalid": "The lineage lock can't be read.";
|
|
180
204
|
readonly "manual-step-open": "A scope in the lineage lock has an open manual step.";
|
|
181
205
|
};
|