@intentius/chant 0.93.0 → 0.95.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/cli/handlers/operator.d.ts.map +1 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/mcp/workspace-plugins.d.ts +6 -6
- package/dist/cli/registry.d.ts +2 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/op/builders.d.ts +14 -3
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/index.d.ts +6 -3
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/operator.d.ts +90 -0
- package/dist/op/operator.d.ts.map +1 -1
- package/dist/op/steward-beside.d.ts +84 -0
- package/dist/op/steward-beside.d.ts.map +1 -0
- package/dist/op/steward.d.ts +87 -2
- package/dist/op/steward.d.ts.map +1 -1
- package/dist/workspace/box-intent.d.ts +85 -0
- package/dist/workspace/box-intent.d.ts.map +1 -0
- package/dist/workspace/box-services.d.ts +31 -0
- package/dist/workspace/box-services.d.ts.map +1 -0
- package/dist/workspace/chant-migrations.d.ts +5 -0
- package/dist/workspace/chant-migrations.d.ts.map +1 -1
- package/dist/workspace/checks/boxes.d.ts +14 -1
- package/dist/workspace/checks/boxes.d.ts.map +1 -1
- package/dist/workspace/checks.d.ts +4 -0
- package/dist/workspace/checks.d.ts.map +1 -1
- package/dist/workspace/compose-graph.d.ts +11 -0
- package/dist/workspace/compose-graph.d.ts.map +1 -1
- package/dist/workspace/composites.d.ts +5 -1
- package/dist/workspace/composites.d.ts.map +1 -1
- package/dist/workspace/decision-points.schema.json +3 -3
- package/dist/workspace/declaration.d.ts +43 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.schema.json +62 -1
- package/dist/workspace/graph-cache.d.ts +168 -0
- package/dist/workspace/graph-cache.d.ts.map +1 -0
- package/dist/workspace/graph-cli.d.ts +11 -5
- package/dist/workspace/graph-cli.d.ts.map +1 -1
- package/dist/workspace/intent-joins.d.ts +5 -5
- package/dist/workspace/kind-readers.d.ts +39 -0
- package/dist/workspace/kind-readers.d.ts.map +1 -0
- package/dist/workspace/kinds.d.ts +29 -0
- package/dist/workspace/kinds.d.ts.map +1 -1
- package/dist/workspace/member-commands.d.ts +15 -1
- package/dist/workspace/member-commands.d.ts.map +1 -1
- package/dist/workspace/member-run.d.ts +2 -0
- package/dist/workspace/member-run.d.ts.map +1 -1
- package/dist/workspace/points-cli.d.ts +2 -0
- package/dist/workspace/points-cli.d.ts.map +1 -1
- package/dist/workspace/points.d.ts +3 -5
- package/dist/workspace/points.d.ts.map +1 -1
- package/dist/workspace/reason-codes.d.ts +5 -1
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/records-cli.d.ts +10 -1
- package/dist/workspace/records-cli.d.ts.map +1 -1
- package/dist/workspace/records-write.d.ts +4 -2
- package/dist/workspace/records-write.d.ts.map +1 -1
- package/dist/workspace/records.d.ts +8 -3
- package/dist/workspace/records.d.ts.map +1 -1
- package/dist/workspace/status-stewards.d.ts +31 -9
- package/dist/workspace/status-stewards.d.ts.map +1 -1
- package/dist/workspace/status.d.ts +20 -0
- package/dist/workspace/status.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/workspace-kinds.schema.json +26 -0
- package/package.json +1 -1
- package/src/cli/commands/carve-bridge.test.ts +7 -3
- package/src/cli/handlers/operator-steward-signal.e2e.test.ts +97 -0
- package/src/cli/handlers/operator.ts +53 -11
- package/src/cli/handlers/run.test.ts +71 -0
- package/src/cli/handlers/run.ts +65 -7
- package/src/cli/main.ts +21 -9
- package/src/cli/mcp/workspace-plugins.ts +6 -6
- package/src/cli/mcp/workspace-tools.ts +1 -1
- package/src/cli/registry.ts +2 -0
- package/src/cli/serve-mcp-workspace.test.ts +6 -6
- package/src/cli/static-config-read.test.ts +8 -2
- package/src/meta/source-is-text.test.ts +21 -3
- package/src/okf.test.ts +6 -1
- package/src/op/activities/decide.test.ts +8 -0
- package/src/op/builders.ts +14 -3
- package/src/op/index.ts +8 -2
- package/src/op/operator.ts +264 -16
- package/src/op/steward-beside.test.ts +267 -0
- package/src/op/steward-beside.ts +219 -0
- package/src/op/steward-points.test.ts +112 -1
- package/src/op/steward.ts +135 -3
- package/src/workspace/box-intent.test.ts +205 -0
- package/src/workspace/box-intent.ts +159 -0
- package/src/workspace/box-services.test.ts +129 -0
- package/src/workspace/box-services.ts +51 -0
- package/src/workspace/chant-migrations.ts +5 -0
- package/src/workspace/check.schema.json +7 -3
- package/src/workspace/checks/boxes.test.ts +3 -1
- package/src/workspace/checks/boxes.ts +66 -0
- package/src/workspace/checks.ts +12 -1
- package/src/workspace/compose-graph.test.ts +1 -0
- package/src/workspace/compose-graph.ts +11 -0
- package/src/workspace/composites.test.ts +1 -1
- package/src/workspace/composites.ts +12 -5
- package/src/workspace/conformance/__fixture__/decisions/decision.kind.mjs +4 -2
- package/src/workspace/decision-points.schema.json +3 -3
- package/src/workspace/declaration.schema.json +62 -1
- package/src/workspace/declaration.ts +112 -0
- package/src/workspace/declared-kinds.test.ts +26 -0
- package/src/workspace/graph-cache.test.ts +343 -0
- package/src/workspace/graph-cache.ts +409 -0
- package/src/workspace/graph-cli.ts +93 -26
- package/src/workspace/graph-contract.test.ts +129 -6
- package/src/workspace/graph.schema.json +21 -1
- package/src/workspace/intent-joins.test.ts +5 -5
- package/src/workspace/intent-joins.ts +5 -5
- package/src/workspace/kind-readers.e2e.test.ts +68 -0
- package/src/workspace/kind-readers.test.ts +134 -0
- package/src/workspace/kind-readers.ts +111 -0
- package/src/workspace/kinds.test.ts +49 -0
- package/src/workspace/kinds.ts +59 -2
- package/src/workspace/member-commands.test.ts +15 -0
- package/src/workspace/member-commands.ts +47 -7
- package/src/workspace/member-run.ts +10 -2
- package/src/workspace/points-cli.ts +3 -0
- package/src/workspace/points.schema.json +18 -0
- package/src/workspace/points.test.ts +15 -14
- package/src/workspace/points.ts +4 -16
- package/src/workspace/read-contract.test.ts +8 -0
- package/src/workspace/reason-codes.test.ts +7 -7
- package/src/workspace/reason-codes.ts +6 -1
- package/src/workspace/records-amend.schema.json +1 -0
- package/src/workspace/records-cli.ts +34 -13
- package/src/workspace/records-contract.test.ts +2 -1
- package/src/workspace/records-formats.test.ts +15 -15
- package/src/workspace/records-new.schema.json +1 -0
- package/src/workspace/records-quorum.test.ts +10 -3
- package/src/workspace/records-sessions-write.test.ts +2 -1
- package/src/workspace/records-since.test.ts +8 -7
- package/src/workspace/records-write.test.ts +101 -1
- package/src/workspace/records-write.ts +50 -6
- package/src/workspace/records.test.ts +1 -1
- package/src/workspace/records.ts +22 -5
- package/src/workspace/status-contract.test.ts +32 -1
- package/src/workspace/status-stewards.ts +88 -9
- package/src/workspace/status.schema.json +66 -4
- package/src/workspace/status.ts +32 -0
- package/src/workspace/trust/record-seal.test.ts +26 -2
- package/src/workspace/work-evidence.schema.json +1 -0
- package/src/workspace/{work-readiness-chud.test.ts → work-readiness.test.ts} +30 -32
- package/src/workspace/work.test.ts +17 -0
- package/src/workspace/workspace-kinds.schema.json +26 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The per-member cache behind `chant workspace graph` (#2876, ws-059).
|
|
3
|
+
*
|
|
4
|
+
* ws-018 made chant the composer for declared workspaces, and a viewer
|
|
5
|
+
* rereads the composed graph on every refresh. Without a cache every read
|
|
6
|
+
* starts every member's chant again, so this module keeps each member's
|
|
7
|
+
* source read on disk and serves it while nothing the read depends on has
|
|
8
|
+
* changed.
|
|
9
|
+
*
|
|
10
|
+
* An entry is served only when every part of its key still matches:
|
|
11
|
+
*
|
|
12
|
+
* 1. The read is a source read. A member command line holding `--live`,
|
|
13
|
+
* `--overlay` or `--traffic` observes an account, which changes with
|
|
14
|
+
* nothing on disk to notice, so it is never cached or even stamped.
|
|
15
|
+
* 2. The member's stamp ({@link memberStamp}) is unchanged. It covers the
|
|
16
|
+
* member's files and the install state its toolchain resolves through.
|
|
17
|
+
* With `--at` the tree is the commit's, which never changes, so the commit
|
|
18
|
+
* id stands in for the files.
|
|
19
|
+
* 3. The toolchain is unchanged: the real path of its `bin/chant` and its
|
|
20
|
+
* package version, plus its source files when it is a checkout rather
|
|
21
|
+
* than an install.
|
|
22
|
+
* 4. The member's command line and the ambient environment are unchanged,
|
|
23
|
+
* since `--env`, build parameters and `buildParams` env mappings all
|
|
24
|
+
* reach the answer. A few variables a shell changes on its own are left
|
|
25
|
+
* out ({@link VOLATILE_ENV}); any other difference is a miss.
|
|
26
|
+
*
|
|
27
|
+
* A stamp that can't be taken caches nothing. So does a stamp that moved
|
|
28
|
+
* between the start and the end of the read, a member whose read failed, and
|
|
29
|
+
* a working-tree read whose newest file is younger than
|
|
30
|
+
* {@link FRESH_WINDOW_MS}: some file systems keep mtimes to the second, so an
|
|
31
|
+
* edit in the same tick as the read could otherwise hide behind an equal
|
|
32
|
+
* stamp.
|
|
33
|
+
*
|
|
34
|
+
* Entries live outside the workspace, in the user's cache directory
|
|
35
|
+
* ({@link graphCacheDir}), because a read never changes the workspace it
|
|
36
|
+
* reads (the conformance kit checks exactly that, #2679). One JSON file per
|
|
37
|
+
* key, written to a temporary name and renamed into place so concurrent
|
|
38
|
+
* readers never see half an entry. Each workspace holds at most
|
|
39
|
+
* {@link MAX_ENTRIES} entries and {@link MAX_BYTES} bytes; the least recently
|
|
40
|
+
* used go first.
|
|
41
|
+
*
|
|
42
|
+
* The key never looks at how a member is read, only at what the read takes
|
|
43
|
+
* in, so a member read through a generated reader project caches by its own
|
|
44
|
+
* directory's stamp like any other.
|
|
45
|
+
*/
|
|
46
|
+
import type { ParsedArgs } from "../cli/registry.js";
|
|
47
|
+
import { type MemberPlan, type RunUnit, type Toolchain, type UnitResult } from "./member-commands.js";
|
|
48
|
+
/** The version of the entry format. An entry of any other version is a miss. */
|
|
49
|
+
export declare const CACHE_FORMAT = 1;
|
|
50
|
+
/** Overrides where chant keeps caches: `$CHANT_CACHE_DIR`, else `$XDG_CACHE_HOME/chant`, else `~/.cache/chant`. */
|
|
51
|
+
export declare const CACHE_DIR_ENV = "CHANT_CACHE_DIR";
|
|
52
|
+
export declare const MAX_ENTRIES = 512;
|
|
53
|
+
export declare const MAX_BYTES: number;
|
|
54
|
+
/** A working-tree read whose newest file is younger than this is not stored. */
|
|
55
|
+
export declare const FRESH_WINDOW_MS = 2000;
|
|
56
|
+
/** Member flags that make a read observe an account. Such a read is never cached. */
|
|
57
|
+
export declare const LIVE_FLAGS: readonly ["--live", "--overlay", "--traffic"];
|
|
58
|
+
/** Environment variables a shell or terminal changes on its own, left out of the key. */
|
|
59
|
+
export declare const VOLATILE_ENV: readonly (string | RegExp)[];
|
|
60
|
+
/** Whether a member command line is a source read, and so may be cached. */
|
|
61
|
+
export declare function isCacheableArgv(argv: readonly string[]): boolean;
|
|
62
|
+
export interface Stamp {
|
|
63
|
+
/** `sha256:<hex>`. */
|
|
64
|
+
value: string;
|
|
65
|
+
/** The newest mtime among the files stamped, in ms; 0 for a revision stamp. */
|
|
66
|
+
newest: number;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* A member's stamp: its files and the install state around it. `abs` is the
|
|
70
|
+
* member's directory on disk, `exclude` the directories inside it that are
|
|
71
|
+
* other members' (set for member `.`). With `at`, the commit id stands in for
|
|
72
|
+
* the files, since a commit's tree never changes. Returns `undefined` when the
|
|
73
|
+
* stamp can't be taken, and then nothing is cached.
|
|
74
|
+
*/
|
|
75
|
+
export declare function memberStamp(abs: string, exclude?: readonly string[], at?: {
|
|
76
|
+
commit: string;
|
|
77
|
+
dir: string;
|
|
78
|
+
}): Stamp | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* What distinguishes one chant from another for the key: the real path of its
|
|
81
|
+
* `bin/chant`, the version its package declares, and, for a chant that isn't
|
|
82
|
+
* installed under a `node_modules` directory (a source checkout), the stamp
|
|
83
|
+
* of its package's `src`, since a checkout changes without a version bump.
|
|
84
|
+
*/
|
|
85
|
+
export declare function toolchainStamp(toolchain: Toolchain): string;
|
|
86
|
+
/** What a kind's reader adds to the key: its graph block, and the installed version of the package supplying it. */
|
|
87
|
+
export declare function readerStamp(reader: {
|
|
88
|
+
lexicon: string;
|
|
89
|
+
config: unknown;
|
|
90
|
+
packageDir: string;
|
|
91
|
+
}): string;
|
|
92
|
+
/** The ambient environment, less {@link VOLATILE_ENV}, as one digest. */
|
|
93
|
+
export declare function environmentStamp(env?: NodeJS.ProcessEnv): string;
|
|
94
|
+
export interface KeyParts {
|
|
95
|
+
member: string;
|
|
96
|
+
dir: string;
|
|
97
|
+
stamp: string;
|
|
98
|
+
toolchain: string;
|
|
99
|
+
argv: readonly string[];
|
|
100
|
+
env: string;
|
|
101
|
+
}
|
|
102
|
+
export declare function cacheKey(parts: KeyParts): string;
|
|
103
|
+
/** One stored read. */
|
|
104
|
+
export interface CacheEntry {
|
|
105
|
+
format: number;
|
|
106
|
+
key: string;
|
|
107
|
+
member: string;
|
|
108
|
+
stamp: string;
|
|
109
|
+
/** The chant version the read reported, or null. */
|
|
110
|
+
chant: string | null;
|
|
111
|
+
/** The member's `chant graph --format ir` output. */
|
|
112
|
+
stdout: string;
|
|
113
|
+
}
|
|
114
|
+
export interface GraphCache {
|
|
115
|
+
dir: string;
|
|
116
|
+
get(key: string): CacheEntry | undefined;
|
|
117
|
+
put(entry: CacheEntry): void;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* The directory holding the cache of the workspace rooted at `root`:
|
|
121
|
+
* `<cache dir>/workspace-graph/<first 16 hex digits of sha256(real path of root)>`,
|
|
122
|
+
* where the cache dir is `$CHANT_CACHE_DIR`, else `$XDG_CACHE_HOME/chant`,
|
|
123
|
+
* else `~/.cache/chant`.
|
|
124
|
+
*/
|
|
125
|
+
export declare function graphCacheDir(root: string, env?: NodeJS.ProcessEnv): string;
|
|
126
|
+
/**
|
|
127
|
+
* The cache for the workspace rooted at `root` (absolute, on disk). Nothing is
|
|
128
|
+
* created until the first `put`. Every failure to read or write is a miss or
|
|
129
|
+
* a skipped store, never an error: the cache can only make a read faster.
|
|
130
|
+
*/
|
|
131
|
+
export declare function openGraphCache(root: string, env?: NodeJS.ProcessEnv): GraphCache;
|
|
132
|
+
/** A member read the cache answered, or one it will store once it has run. */
|
|
133
|
+
interface Pending {
|
|
134
|
+
key: string;
|
|
135
|
+
stamp: Stamp;
|
|
136
|
+
abs: string;
|
|
137
|
+
exclude: string[];
|
|
138
|
+
at?: {
|
|
139
|
+
commit: string;
|
|
140
|
+
dir: string;
|
|
141
|
+
};
|
|
142
|
+
member: string;
|
|
143
|
+
}
|
|
144
|
+
export interface CacheSplit {
|
|
145
|
+
/** The members the cache answered, as results a run would have produced. */
|
|
146
|
+
hits: UnitResult[];
|
|
147
|
+
/** Each member's stamp, by unit id: served or about to be read. */
|
|
148
|
+
stamps: Map<string, string>;
|
|
149
|
+
pending: Map<string, Pending>;
|
|
150
|
+
/** When the lookup started; a file younger than this less {@link FRESH_WINDOW_MS} keeps a read out of the cache. */
|
|
151
|
+
started: number;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Look every member of a `graph` plan up in the cache. `at` is the commit
|
|
155
|
+
* being read, or null for the working tree. Members with a cacheable command
|
|
156
|
+
* line whose stamp can be taken end up in `hits` or in `pending`.
|
|
157
|
+
*/
|
|
158
|
+
export declare function splitCached(plan: MemberPlan, args: ParsedArgs, cache: GraphCache, at: string | null, argvFor?: (unit: RunUnit) => string[]): CacheSplit;
|
|
159
|
+
/** The plan without the units in `ids`; a toolchain left with no units is dropped. */
|
|
160
|
+
export declare function withoutUnits(plan: MemberPlan, ids: ReadonlySet<string>): MemberPlan;
|
|
161
|
+
/**
|
|
162
|
+
* Store the reads that may be cached: the member exited 0, printed an IR, and
|
|
163
|
+
* its stamp is the same after the read as before it. A working-tree read of a
|
|
164
|
+
* file younger than the window is not stored.
|
|
165
|
+
*/
|
|
166
|
+
export declare function storeReads(split: CacheSplit, results: readonly UnitResult[], cache: GraphCache): void;
|
|
167
|
+
export {};
|
|
168
|
+
//# sourceMappingURL=graph-cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-cache.d.ts","sourceRoot":"","sources":["../../src/workspace/graph-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAMH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAc,KAAK,UAAU,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/G,gFAAgF;AAChF,eAAO,MAAM,YAAY,IAAI,CAAC;AAE9B,mHAAmH;AACnH,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAE/C,eAAO,MAAM,WAAW,MAAM,CAAC;AAC/B,eAAO,MAAM,SAAS,QAAoB,CAAC;AAE3C,gFAAgF;AAChF,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC,qFAAqF;AACrF,eAAO,MAAM,UAAU,+CAAgD,CAAC;AAExE,yFAAyF;AACzF,eAAO,MAAM,YAAY,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAiBpD,CAAC;AAgBF,4EAA4E;AAC5E,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAEhE;AAMD,MAAM,WAAW,KAAK;IACpB,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,MAAM,EAAE,MAAM,CAAC;CAChB;AAgDD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,SAAS,MAAM,EAAO,EAAE,EAAE,CAAC,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAA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|
import { type WorkspaceGraph } from "./compose-graph.js";
|
|
28
|
-
import { type ErrorLocation
|
|
28
|
+
import { type ErrorLocation } from "./declaration.js";
|
|
29
29
|
import { type MemberPlan, type Toolchain, type UnitResult } from "./member-commands.js";
|
|
30
30
|
import { type LocatedWorkspace } from "./which-chant.js";
|
|
31
31
|
/** The version of the `graph` document this chant writes. */
|
|
32
32
|
export declare const GRAPH_CONTRACT_VERSION = 1;
|
|
33
33
|
/** `$id` of the JSON Schema for the document, shipped beside this file. */
|
|
34
34
|
export declare const GRAPH_OUTPUT_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/graph/v1/graph.schema.json";
|
|
35
|
-
/**
|
|
36
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Why the graph couldn't be read at all: the declaration's codes, `--at`'s
|
|
37
|
+
* included, and `live-at-revision` for `--live` with `--at` (#2875).
|
|
38
|
+
*/
|
|
39
|
+
export declare const GRAPH_ERROR_CODES: readonly ["declaration-missing", "declaration-ambiguous", "declaration-unparseable", "declaration-invalid", "placement-invalid", "reader-too-old", "root-chant-required", "not-a-git-repository", "revision-unknown", "live-at-revision"];
|
|
40
|
+
export type GraphErrorCode = (typeof GRAPH_ERROR_CODES)[number];
|
|
37
41
|
interface Head {
|
|
38
42
|
$schema: string;
|
|
39
43
|
contract: number;
|
|
@@ -43,7 +47,7 @@ export type GraphDocument = (Head & {
|
|
|
43
47
|
at: string | null;
|
|
44
48
|
} & WorkspaceGraph) | (Head & {
|
|
45
49
|
error: {
|
|
46
|
-
code:
|
|
50
|
+
code: GraphErrorCode;
|
|
47
51
|
message: string;
|
|
48
52
|
location: ErrorLocation | null;
|
|
49
53
|
};
|
|
@@ -54,7 +58,7 @@ export interface GraphQuery {
|
|
|
54
58
|
at?: string;
|
|
55
59
|
/** Only these members. */
|
|
56
60
|
members?: string[];
|
|
57
|
-
/** The flags each member's `chant graph` gets (`--env`). */
|
|
61
|
+
/** The flags each member's `chant graph` gets (`--env`, and `--live`, `--overlay` and `--traffic`, #2875). */
|
|
58
62
|
args?: Partial<ParsedArgs>;
|
|
59
63
|
/** The chant for members with none of their own; the running chant by default. */
|
|
60
64
|
reader?: Toolchain;
|
|
@@ -83,6 +87,8 @@ export interface GraphQuery {
|
|
|
83
87
|
dir: string;
|
|
84
88
|
kind: string;
|
|
85
89
|
}[]) => Promise<void>;
|
|
90
|
+
/** Read every member, leaving the per-member cache unread and unwritten (`--no-cache`, #2876). */
|
|
91
|
+
noCache?: boolean;
|
|
86
92
|
}
|
|
87
93
|
export interface GraphResult {
|
|
88
94
|
doc: GraphDocument;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/graph-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,
|
|
1
|
+
{"version":3,"file":"graph-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/graph-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAA+E,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEnI,OAAO,EAA6E,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9H,OAAO,EAAgF,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAMnK,OAAO,EAAoC,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAExF,6DAA6D;AAC7D,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB,4EAA4E,CAAC;AAEhH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,2OAA0D,CAAC;AACzF,M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,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,aAAa,CAAC;IACnB,gFAAgF;IAChF,MAAM,EAAE,OAAO,CAAC;IAChB,4FAA4F;IAC5F,UAAU,CAAC,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED,sEAAsE;AACtE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,EAAE,CAEtE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,CAmCtF;AAgDD,wGAAwG;AACxG,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAKvD;AAED,qGAAqG;AACrG,wBAAsB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CAmE5E;AAED,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsE5E"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* The commit-join hook of the intent graph (#2651; #2650 C1 and C13).
|
|
3
3
|
*
|
|
4
4
|
* Commits, decisions and artifacts come from core. Units of work, contracts
|
|
5
|
-
* and evidence come from a plugin, such as
|
|
6
|
-
* core ships no model of them (#2555, "Core ships no decision
|
|
7
|
-
* file passed to `chant workspace graph --intent --kind <file>`
|
|
8
|
-
* through one export, `commitJoins`, in one of two forms:
|
|
5
|
+
* and evidence come from a plugin, such as a workspace's own development
|
|
6
|
+
* model, because core ships no model of them (#2555, "Core ships no decision
|
|
7
|
+
* kind"). A kind file passed to `chant workspace graph --intent --kind <file>`
|
|
8
|
+
* supplies them through one export, `commitJoins`, in one of two forms:
|
|
9
9
|
*
|
|
10
10
|
* - A function `commitJoins(commit, context)` that returns the unit, contract
|
|
11
11
|
* and evidence for one commit, or nothing. It is given the commit's sha,
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* `<name>` is the kind's name by default: its record kind's name, or the
|
|
37
37
|
* file's name without `.kind.mjs`. A kind file may name its findings itself
|
|
38
38
|
* with a sibling export, `commitJoinsName` (#2663), so joins that live beside
|
|
39
|
-
* a record kind called `decision` can still report `plugin:
|
|
39
|
+
* a record kind called `decision` can still report `plugin:acme:<code>`. It is
|
|
40
40
|
* a sibling export rather than a property because the data form is a closed
|
|
41
41
|
* object whose keys are all joins, and a function's `name` property is
|
|
42
42
|
* already its own name.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reader projects for members of a package's kind (#2874).
|
|
3
|
+
*
|
|
4
|
+
* `chant workspace graph` runs `chant graph` in each member. A `terraform` or
|
|
5
|
+
* `choudoufu` member is a directory of `.tf` files with no chant config, so
|
|
6
|
+
* there is nothing for it to run. The kind's `graph` block in the package's
|
|
7
|
+
* kinds file says how to read one instead: a lexicon and that lexicon's
|
|
8
|
+
* config namespace. For each such member chant writes a reader project of its
|
|
9
|
+
* own, outside the workspace, and the member runs there:
|
|
10
|
+
*
|
|
11
|
+
* - `chant.config.json` declares the lexicon, and puts the kind's config under
|
|
12
|
+
* the lexicon's key with `{member}`, `{dir}` and `{workspace}` substituted
|
|
13
|
+
* (`substituteGraphConfig`). The terraform lexicon's config names one root
|
|
14
|
+
* after the member, at the member's directory, with `moduleRoot` at the
|
|
15
|
+
* workspace root, so a member that calls `../modules/x` keeps its modules.
|
|
16
|
+
* - `node_modules` links to the `node_modules` directory holding the lexicon
|
|
17
|
+
* package, found from the workspace root as the kind's pin was. The lexicon
|
|
18
|
+
* chant loads is then the one the declaration pins.
|
|
19
|
+
*
|
|
20
|
+
* Nothing is written under the workspace, and the projects are removed when
|
|
21
|
+
* the read ends. A lexicon that can't be found where its pin says fails the
|
|
22
|
+
* member with `command-failed` and says what to install; the other members
|
|
23
|
+
* still run.
|
|
24
|
+
*/
|
|
25
|
+
import type { MemberPlan, SkippedEntry } from "./member-commands.js";
|
|
26
|
+
export interface PreparedReaders {
|
|
27
|
+
/** Members whose reader project couldn't be written, with the reason. They fail the run. */
|
|
28
|
+
failed: SkippedEntry[];
|
|
29
|
+
/** Remove every reader project. Safe to call more than once. */
|
|
30
|
+
cleanup(): void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Write a reader project for every unit of `plan` that has a `reader`, and
|
|
34
|
+
* point the unit's `abs` at it. Units that can't get one leave the plan and
|
|
35
|
+
* are returned in `failed`. `root` is the directory the plan was made from,
|
|
36
|
+
* the exported tree for `--at`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function prepareKindReaders(plan: MemberPlan, root: string): PreparedReaders;
|
|
39
|
+
//# sourceMappingURL=kind-readers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kind-readers.d.ts","sourceRoot":"","sources":["../../src/workspace/kind-readers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,OAAO,KAAK,EAAE,UAAU,EAAW,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE3E,MAAM,WAAW,eAAe;IAC9B,4FAA4F;IAC5F,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,gEAAgE;IAChE,OAAO,IAAI,IAAI,CAAC;CACjB;AAmCD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,eAAe,CAiClF"}
|
|
@@ -69,6 +69,15 @@ export type KindOutputs =
|
|
|
69
69
|
from: "declared";
|
|
70
70
|
names: string[];
|
|
71
71
|
};
|
|
72
|
+
/**
|
|
73
|
+
* How `chant workspace graph` reads a member of a package's kind (#2874): a
|
|
74
|
+
* lexicon, by name, and that lexicon's config namespace for a reader project
|
|
75
|
+
* chant writes itself. See {@link substituteGraphConfig} for the placeholders.
|
|
76
|
+
*/
|
|
77
|
+
export interface KindGraph {
|
|
78
|
+
lexicon: string;
|
|
79
|
+
config: Record<string, unknown>;
|
|
80
|
+
}
|
|
72
81
|
export interface MemberKind {
|
|
73
82
|
name: string;
|
|
74
83
|
/** One line for listings and error messages. */
|
|
@@ -86,6 +95,10 @@ export interface MemberKind {
|
|
|
86
95
|
outputs: KindOutputs;
|
|
87
96
|
/** Where the kind comes from: `builtin`, or the package that supplies it. */
|
|
88
97
|
source: string;
|
|
98
|
+
/** The supplying package's directory, absolute; unset for a built-in kind. */
|
|
99
|
+
packageDir?: string;
|
|
100
|
+
/** How `workspace graph` reads a member of this kind (#2874); unset, the member is `kind-not-run`. */
|
|
101
|
+
graph?: KindGraph;
|
|
89
102
|
}
|
|
90
103
|
export interface KindRegistry {
|
|
91
104
|
get(name: string): MemberKind | undefined;
|
|
@@ -152,6 +165,22 @@ export declare function kindsExportTarget(pkg: Record<string, unknown>): string
|
|
|
152
165
|
};
|
|
153
166
|
/** Read the kinds a package directory publishes. Reads files only; imports nothing. */
|
|
154
167
|
export declare function readPackageKinds(packageDir: string, source?: string): PackageKinds;
|
|
168
|
+
/** The package a lexicon name resolves to. */
|
|
169
|
+
export declare function lexiconPackageName(lexicon: string): string;
|
|
170
|
+
/** Where each placeholder in a kind's graph config points (#2874). */
|
|
171
|
+
export interface GraphPlaceholders {
|
|
172
|
+
/** The member's name. */
|
|
173
|
+
member: string;
|
|
174
|
+
/** The member's directory, absolute. */
|
|
175
|
+
dir: string;
|
|
176
|
+
/** The workspace root, absolute. */
|
|
177
|
+
workspace: string;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* A kind's graph config with `{member}`, `{dir}` and `{workspace}` replaced
|
|
181
|
+
* in every string key and value. Other braces are left as they are.
|
|
182
|
+
*/
|
|
183
|
+
export declare function substituteGraphConfig(config: Record<string, unknown>, at: GraphPlaceholders): Record<string, unknown>;
|
|
155
184
|
/**
|
|
156
185
|
* The directory of an installed package `name`, found the way Node finds a
|
|
157
186
|
* bare import: `node_modules/<name>` in `fromDir` and each directory above it.
|
|
@@ -1 +1 @@
|
|
|
1
|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,MAAM,GAAG,MAAM,GAAG,SAAS,CAUtF;AAED,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,mDAAmD;IACnD,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,OAAO,EAAE,EAAE,aAAa,EAAE,MAAM,GAAG,WAAW,CA8C7F;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAcxE"}
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
* Members of kind `other` are never read, and a nested `workspace` member
|
|
10
10
|
* runs its own workspace commands, so both are listed as skipped with the
|
|
11
11
|
* reason code `kind-not-run`.
|
|
12
|
+
* - For `graph` only, members of a pinned package's kind whose kinds file
|
|
13
|
+
* says how to read them (#2874, a `graph` block): each runs `chant graph`
|
|
14
|
+
* in a reader project chant writes for it (`kind-readers.ts`). Other
|
|
15
|
+
* package kinds are `kind-not-run`, as before.
|
|
12
16
|
* - For `build` and `lint` only, every project an example group matches
|
|
13
17
|
* (ws-051): groups are built and linted, and have no ledger, audit or place
|
|
14
18
|
* in the graph. On a large repository this is most of the run, so
|
|
@@ -30,7 +34,7 @@
|
|
|
30
34
|
import type { CommandContext, ParsedArgs } from "../cli/registry.js";
|
|
31
35
|
import type { ComposedMember, MemberReason } from "./compose-graph.js";
|
|
32
36
|
import { type MemberOutput } from "./compose-reports.js";
|
|
33
|
-
import { type KindRegistry } from "./kinds.js";
|
|
37
|
+
import { type KindGraph, type KindRegistry } from "./kinds.js";
|
|
34
38
|
import { type MemberRunLine } from "./member-run.js";
|
|
35
39
|
import { type WorkspaceTree } from "./tree.js";
|
|
36
40
|
export type WorkspaceVerb = "build" | "lint" | "audit" | "graph";
|
|
@@ -47,6 +51,14 @@ export interface RunUnit {
|
|
|
47
51
|
abs: string;
|
|
48
52
|
/** Directories (relative to `dir`) left out of discovery; set for member `.`. */
|
|
49
53
|
exclude: string[];
|
|
54
|
+
/**
|
|
55
|
+
* Set for a member read through its kind's `graph` block (#2874). `abs` is
|
|
56
|
+
* the member's directory until `kind-readers.ts` writes the reader project
|
|
57
|
+
* and points `abs` at it.
|
|
58
|
+
*/
|
|
59
|
+
reader?: KindGraph & {
|
|
60
|
+
packageDir: string;
|
|
61
|
+
};
|
|
50
62
|
}
|
|
51
63
|
export interface SkippedEntry {
|
|
52
64
|
name: string;
|
|
@@ -120,6 +132,8 @@ export interface UnitResult extends MemberOutput {
|
|
|
120
132
|
chant: string | null;
|
|
121
133
|
/** How the member ran: inside its toolchain's shared process, or in a level-0 process of its own. */
|
|
122
134
|
mode: "member-run" | "per-member";
|
|
135
|
+
/** When the member's command finished, as an ISO time (#2875). */
|
|
136
|
+
finishedAt?: string;
|
|
123
137
|
}
|
|
124
138
|
/** Parse a member-run answer. `undefined` when there is no header: the chant has no member-run. */
|
|
125
139
|
export declare function parseMemberRunOutput(stdout: string): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member-commands.d.ts","sourceRoot":"","sources":["../../src/workspace/member-commands.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"member-commands.d.ts","sourceRoot":"","sources":["../../src/workspace/member-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,KAAK,EAAE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E,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"}
|
|
@@ -50,6 +50,8 @@ export type MemberRunLine = {
|
|
|
50
50
|
exitCode: number;
|
|
51
51
|
stdout: string;
|
|
52
52
|
stderr: string;
|
|
53
|
+
/** When the member's command finished, as an ISO time (#2875). A member-run from before it leaves this out. */
|
|
54
|
+
finishedAt?: string;
|
|
53
55
|
};
|
|
54
56
|
/**
|
|
55
57
|
* Run `fn` with stdout, stderr and `process.exit` captured. Commands print
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member-run.d.ts","sourceRoot":"","sources":["../../src/workspace/member-run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,uFAAuF;AACvF,eAAO,MAAM,eAAe,0BAA0B,CAAC;AACvD,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,aAAa,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,yEAAyE;IACzE,GAAG,EAAE,MAAM,CAAC;IACZ,8EAA8E;IAC9E,IAAI,EAAE,MAAM,EAAE,CAAC;IACf;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK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AAE,gBAAgB,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAiBzH;AAED,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAa3H"}
|
|
@@ -37,6 +37,8 @@ export interface PointView {
|
|
|
37
37
|
questionType: string;
|
|
38
38
|
instructions: string;
|
|
39
39
|
candidates: (string | boolean)[];
|
|
40
|
+
/** What each candidate means, as the points file declares it: an object of strings for noul and choice, an array for score. */
|
|
41
|
+
criteria: Record<string, string> | string[];
|
|
40
42
|
/** Each input: its name, the read-contract output it names, and its description. */
|
|
41
43
|
inputs: {
|
|
42
44
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"points-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/points-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAA2E,KAAK,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAErJ,OAAO,EAAwH,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AACnK,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,0GAA0G;AAC1G,eAAO,MAAM,0BAA0B,iJASG,CAAC;AAC3C,KAAK,gBAAgB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAA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AAC,GAAG,MAAM,CAatF;AAED,8GAA8G;AAC9G,wBAAgB,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,CASvD;AA0BD,kEAAkE;AAClE,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsC7E"}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* runtime's decider or a test's stub supplies. Without one, a model decider is
|
|
21
21
|
* not asked and the chain moves on.
|
|
22
22
|
*
|
|
23
|
-
*
|
|
23
|
+
* Ported from chud's `packages/runtime/src/decide.mjs` at 43afcf1: the chain,
|
|
24
24
|
* the observation rule, the point version and the inputs hash. The records
|
|
25
25
|
* are chant records: `decide.ts` writes them, and {@link applyAnswers} warns
|
|
26
26
|
* about them on read.
|
|
@@ -97,7 +97,6 @@ export declare const POINT_INPUT_OUTPUT_NAMES: PointInputOutput[];
|
|
|
97
97
|
export declare function inputOutput(name: string): string;
|
|
98
98
|
export type QuestionType = "noul" | "choice" | "score";
|
|
99
99
|
export interface Question {
|
|
100
|
-
/** `boolean` in a points file is read as `noul`. */
|
|
101
100
|
type: QuestionType;
|
|
102
101
|
instructions: string;
|
|
103
102
|
criteria: Record<string, string> | string[];
|
|
@@ -155,9 +154,8 @@ export declare function candidates(question: Question): (string | boolean)[];
|
|
|
155
154
|
/** The schema's problems with `data`, as JSON paths. */
|
|
156
155
|
export declare function schemaProblems(data: unknown): PointProblem[];
|
|
157
156
|
/**
|
|
158
|
-
* Parse and validate a points file's text. Returns its points
|
|
159
|
-
*
|
|
160
|
-
* each field.
|
|
157
|
+
* Parse and validate a points file's text. Returns its points. Throws a
|
|
158
|
+
* {@link PointsError} naming the file and each field.
|
|
161
159
|
*/
|
|
162
160
|
export declare function parsePoints(text: string, file: string): Record<string, Point>;
|
|
163
161
|
/** One point by name, or undefined. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"points.d.ts","sourceRoot":"","sources":["../../src/workspace/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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,CAuDhI;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"}
|
|
@@ -33,13 +33,14 @@ export declare const REASONS: {
|
|
|
33
33
|
readonly "root-chant-required": "The declaration pins a chant version other than the reader's, and that chant is not installed at the workspace root.";
|
|
34
34
|
readonly "not-a-git-repository": "--at, or a ledger read, needs a git repository and there is none.";
|
|
35
35
|
readonly "revision-unknown": "--at names no commit.";
|
|
36
|
+
readonly "live-at-revision": "graph was given --live and --at: a live read is of the account now, not of a revision.";
|
|
36
37
|
readonly "environment-invalid": "An environment name that can't name a ledger directory.";
|
|
37
38
|
readonly "dir-missing": "The member's directory does not exist.";
|
|
38
39
|
readonly "unknown-kind": "No built-in kind or pinned package supplies the member's kind.";
|
|
39
40
|
readonly "kind-probe-failed": "The member's directory is not what its kind reads.";
|
|
40
41
|
readonly "no-matches": "An example group matches no directory holding a chant project.";
|
|
41
42
|
readonly "kind-not-run": "The member's kind is one the per-member commands don't run, such as other.";
|
|
42
|
-
readonly "command-failed": "The member's own command exited with a failure.";
|
|
43
|
+
readonly "command-failed": "The member's own command exited with a failure, or the lexicon that reads the member through its kind's graph block isn't installed where the workspace resolves its pin.";
|
|
43
44
|
readonly "output-unreadable": "The member's command printed something that isn't the document asked for.";
|
|
44
45
|
readonly "ir-version-unsupported": "The member's IR has a version this chant can't read.";
|
|
45
46
|
readonly "ledger-unreadable": "Reading the ledger failed, so nothing from it is listed.";
|
|
@@ -108,6 +109,7 @@ export declare const REASONS: {
|
|
|
108
109
|
readonly "review-sign-failed": "--sign was given and no seal could be made: the key can't be read or used, git names no ssh signing key, or ssh-keygen is not installed.";
|
|
109
110
|
readonly "record-state-not-initial": "A record written through chant serve mcp gives a state other than the kind's first: a new record opens proposed, and a person moves it on.";
|
|
110
111
|
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
|
+
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.";
|
|
111
113
|
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.";
|
|
112
114
|
readonly "session-unknown": "--session names no session of a session kind whose subjects are the record's kind.";
|
|
113
115
|
readonly "session-not-open": "--session names a session in a closed state, which takes no more verdicts.";
|
|
@@ -158,6 +160,8 @@ export declare const REASONS: {
|
|
|
158
160
|
readonly "box-credential-declared": "A file in a box member's directory carries a literal secret: a credential's shape, or a literal where a credential goes. A variable or secret-manager reference is not one.";
|
|
159
161
|
readonly "box-capability-unbrokered": "A capability in a member's box block names no broker, so the box would hold its credential.";
|
|
160
162
|
readonly "box-fountain-callback-undeclared": "A box member builds a fountain Box, whose persistent sandbox fountain gives a callback token scoped to its owner, and the member's box block does not declare the fountain-callback capability brokered by fountain with scope owner.";
|
|
163
|
+
readonly "box-intent-unknown": "A box block names an intent, and no record of a declared kind named decision has that id.";
|
|
164
|
+
readonly "box-intent-unconstrained": "The decision record a box names as its intent constrains no member or path of this workspace: no member: entry for a declared member and no path: entry at, above or inside one's directory.";
|
|
161
165
|
readonly "work-kind-missing": "No work kind to find the item in: --kind names a kind with no work block, or the declaration names no work kind.";
|
|
162
166
|
readonly "work-kind-ambiguous": "More than one declared work kind has a record with the id, so --kind must name one.";
|
|
163
167
|
readonly "work-item-unknown": "No work record has the id, so there is nothing to lease.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reason-codes.d.ts","sourceRoot":"","sources":["../../src/workspace/reason-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,sHAAsH;AACtH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,uHAAuH;AACvH,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAE5C,qFAAqF;AACrF,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"reason-codes.d.ts","sourceRoot":"","sources":["../../src/workspace/reason-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,sHAAsH;AACtH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,uHAAuH;AACvH,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAE5C,qFAAqF;AACrF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8LV,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,OAAO,CAAC;AAE9C,mDAAmD;AACnD,eAAO,MAAM,YAAY,EAA2B,UAAU,EAAE,CAAC;AAEjE,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE;AAED;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,MAAM,IAAI,MAAM,EAAE,CAAC;AAEtD,eAAO,MAAM,WAAW,QAAkD,CAAC;AAE3E,2HAA2H;AAC3H,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,IAAI,UAAU,CAI/E"}
|
|
@@ -19,11 +19,12 @@
|
|
|
19
19
|
import type { CommandContext } from "../cli/registry.js";
|
|
20
20
|
import { type RecordSource } from "./record-source.js";
|
|
21
21
|
import { type RecordKindDeclaration } from "./declaration.js";
|
|
22
|
-
import { type LoadedRecordKind, type Quorum, type ReadErrorCode, type ReadRecordsResult, type RecordEntry, type RecordFormat, type VerdictAttestation } from "./records.js";
|
|
22
|
+
import { type LoadedRecordKind, type Quorum, type QuorumOptions, type ReadErrorCode, type ReadRecordsResult, type RecordEntry, type RecordFormat, type VerdictAttestation } from "./records.js";
|
|
23
23
|
import { type WorkspaceTree } from "./tree.js";
|
|
24
24
|
import type { DecisionWork } from "./work.js";
|
|
25
25
|
import { type ProvenanceLevel } from "./trust/attestor.js";
|
|
26
26
|
import { type BaseSource, type RecordProvenance } from "./trust/provenance.js";
|
|
27
|
+
import type { TrustPolicy } from "./trust/policy.js";
|
|
27
28
|
/** The version of the `records` output this chant writes. */
|
|
28
29
|
export declare const RECORDS_CONTRACT_VERSION = 1;
|
|
29
30
|
/** `$id` of the JSON Schema for the `--json` output, shipped beside this file. */
|
|
@@ -162,6 +163,14 @@ export interface RecordsRead {
|
|
|
162
163
|
tree: WorkspaceTree;
|
|
163
164
|
result: ReadRecordsResult;
|
|
164
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* The options a kind's quorum is computed with, or undefined when the kind
|
|
168
|
+
* has no reviews list: the need from the declaration in the tree read, and
|
|
169
|
+
* the agents, whether verdicts need a seal, and the keys a seal verifies
|
|
170
|
+
* against, all from the policy at base (#2671, #2687). `records` and the
|
|
171
|
+
* ratified check of `records new` and `amend` (#2873) both use it.
|
|
172
|
+
*/
|
|
173
|
+
export declare function quorumOptionsFor(loaded: LoadedRecordKind, tree: WorkspaceTree, policy: TrustPolicy): Promise<QuorumOptions | undefined>;
|
|
165
174
|
/**
|
|
166
175
|
* Where a kind's pinned paths resolve: the workspace whose declaration sits
|
|
167
176
|
* nearest above the kind file, when it is inside the repository, or else the
|