@eir-labs/coltrane 0.10.0 → 0.11.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.
Files changed (138) hide show
  1. package/agents/bandleader.json +54 -0
  2. package/agents/bill.json +4 -2
  3. package/agents/change-verifier.json +2 -1
  4. package/agents/code-implementer.json +7 -4
  5. package/agents/john.json +5 -3
  6. package/agents/lineage-scout-external.json +19 -6
  7. package/agents/lineage-scribe.json +20 -9
  8. package/agents/lineage-weaver.json +26 -11
  9. package/agents/miles.json +2 -1
  10. package/agents/players/bandleader.md +70 -0
  11. package/agents/pr-publisher.json +4 -2
  12. package/agents/red-spec-drafter.json +12 -6
  13. package/agents/room-prober.json +29 -0
  14. package/agents/source-walker.json +1 -1
  15. package/charts/room-probe-chart-v1.json +14 -0
  16. package/charts/worker-contract-docker-v2.json +135 -0
  17. package/charts/worker-contract-v3.json +206 -0
  18. package/dist/src/boundary_check.d.ts +18 -0
  19. package/dist/src/boundary_check.js +70 -0
  20. package/dist/src/boundary_check.js.map +1 -0
  21. package/dist/src/boundary_scan.d.ts +62 -0
  22. package/dist/src/boundary_scan.js +93 -0
  23. package/dist/src/boundary_scan.js.map +1 -0
  24. package/dist/src/chart.js +34 -1
  25. package/dist/src/chart.js.map +1 -1
  26. package/dist/src/claude_invoker.d.ts +2 -1
  27. package/dist/src/claude_invoker.js +150 -17
  28. package/dist/src/claude_invoker.js.map +1 -1
  29. package/dist/src/cli.d.ts +1 -1
  30. package/dist/src/cli.js +61 -26
  31. package/dist/src/cli.js.map +1 -1
  32. package/dist/src/drain_preflight.d.ts +33 -0
  33. package/dist/src/drain_preflight.js +97 -0
  34. package/dist/src/drain_preflight.js.map +1 -0
  35. package/dist/src/genome_schema.d.ts +390 -9
  36. package/dist/src/genome_schema.js +163 -8
  37. package/dist/src/genome_schema.js.map +1 -1
  38. package/dist/src/genome_store.js +9 -0
  39. package/dist/src/genome_store.js.map +1 -1
  40. package/dist/src/genome_writer.d.ts +1 -1
  41. package/dist/src/genome_writer.js +10 -2
  42. package/dist/src/genome_writer.js.map +1 -1
  43. package/dist/src/gig_conformance.d.ts +66 -0
  44. package/dist/src/gig_conformance.js +153 -0
  45. package/dist/src/gig_conformance.js.map +1 -0
  46. package/dist/src/gig_tracker.js +8 -0
  47. package/dist/src/gig_tracker.js.map +1 -1
  48. package/dist/src/grounding.d.ts +44 -0
  49. package/dist/src/grounding.js +127 -0
  50. package/dist/src/grounding.js.map +1 -0
  51. package/dist/src/index.d.ts +1 -0
  52. package/dist/src/index.js +1 -0
  53. package/dist/src/index.js.map +1 -1
  54. package/dist/src/institution_loader.d.ts +29 -5
  55. package/dist/src/institution_loader.js +67 -6
  56. package/dist/src/institution_loader.js.map +1 -1
  57. package/dist/src/lineage_adoption.d.ts +82 -0
  58. package/dist/src/lineage_adoption.js +82 -0
  59. package/dist/src/lineage_adoption.js.map +1 -0
  60. package/dist/src/lineage_persist.d.ts +34 -0
  61. package/dist/src/lineage_persist.js +60 -0
  62. package/dist/src/lineage_persist.js.map +1 -0
  63. package/dist/src/loader.d.ts +13 -0
  64. package/dist/src/loader.js +43 -2
  65. package/dist/src/loader.js.map +1 -1
  66. package/dist/src/mcp.js +37 -4
  67. package/dist/src/mcp.js.map +1 -1
  68. package/dist/src/org_hire.d.ts +23 -0
  69. package/dist/src/org_hire.js +42 -0
  70. package/dist/src/org_hire.js.map +1 -0
  71. package/dist/src/outputs.d.ts +17 -0
  72. package/dist/src/outputs.js +86 -1
  73. package/dist/src/outputs.js.map +1 -1
  74. package/dist/src/player_to_claude_code.js +26 -2
  75. package/dist/src/player_to_claude_code.js.map +1 -1
  76. package/dist/src/registry.d.ts +3 -1
  77. package/dist/src/registry.js +43 -3
  78. package/dist/src/registry.js.map +1 -1
  79. package/dist/src/repo_index.d.ts +58 -0
  80. package/dist/src/repo_index.js +232 -0
  81. package/dist/src/repo_index.js.map +1 -0
  82. package/dist/src/reuse.d.ts +44 -4
  83. package/dist/src/reuse.js +0 -0
  84. package/dist/src/reuse.js.map +1 -1
  85. package/dist/src/runtime.d.ts +82 -0
  86. package/dist/src/runtime.js +254 -25
  87. package/dist/src/runtime.js.map +1 -1
  88. package/dist/src/server.d.ts +37 -0
  89. package/dist/src/server.js +422 -11
  90. package/dist/src/server.js.map +1 -1
  91. package/dist/src/server_relay.d.ts +40 -2
  92. package/dist/src/server_relay.js +186 -19
  93. package/dist/src/server_relay.js.map +1 -1
  94. package/dist/src/tool_providers.d.ts +27 -0
  95. package/dist/src/tool_providers.js +48 -0
  96. package/dist/src/tool_providers.js.map +1 -1
  97. package/dist/src/venue_credential.d.ts +41 -0
  98. package/dist/src/venue_credential.js +57 -0
  99. package/dist/src/venue_credential.js.map +1 -0
  100. package/dist/src/venue_realize.d.ts +23 -0
  101. package/dist/src/venue_realize.js +43 -3
  102. package/dist/src/venue_realize.js.map +1 -1
  103. package/dist/src/venue_realizer.d.ts +224 -0
  104. package/dist/src/venue_realizer.js +889 -0
  105. package/dist/src/venue_realizer.js.map +1 -0
  106. package/dist/src/version.d.ts +1 -1
  107. package/dist/src/version.js +1 -1
  108. package/dist/src/worker.d.ts +37 -0
  109. package/dist/src/worker.js +127 -24
  110. package/dist/src/worker.js.map +1 -1
  111. package/dist/src/worker_env.d.ts +79 -0
  112. package/dist/src/worker_env.js +322 -0
  113. package/dist/src/worker_env.js.map +1 -0
  114. package/dist/src/workspace.d.ts +12 -1
  115. package/dist/src/workspace.js +10 -3
  116. package/dist/src/workspace.js.map +1 -1
  117. package/domain_types/change-context.json +59 -13
  118. package/domain_types/lineage-adoption-target.json +22 -0
  119. package/domain_types/lineage-map.json +7 -2
  120. package/domain_types/lineage-record.json +55 -5
  121. package/domain_types/prior-art-hit.json +16 -1
  122. package/domain_types/red-spec.json +5 -3
  123. package/domain_types/woodshed-record.json +149 -0
  124. package/evals/gist-present.json +7 -0
  125. package/institutions/coltrane.json +178 -6
  126. package/package.json +6 -3
  127. package/skills/non-vacuity-probe/fixtures/fixture-001.json +17 -0
  128. package/skills/non-vacuity-probe/meta.json +12 -0
  129. package/skills/non-vacuity-probe/skill.md +27 -0
  130. package/skills/non-vacuity-probe/skill.mjs +81 -0
  131. package/standards/lineage-adopt-v0.json +37 -0
  132. package/standards/room-probe-v1.json +28 -0
  133. package/standards/software-change-pr-v1.json +15 -15
  134. package/standards/software-change-red-first-v0.json +183 -0
  135. package/standards/spec-review-and-sequence-v0.json +112 -0
  136. package/standards/studio-session-v0.json +101 -0
  137. package/tours/coltrane.json +72 -0
  138. package/venues/engine-room-v1.json +32 -0
@@ -0,0 +1,58 @@
1
+ /** One import edge: `from` imports `symbol`, which is a real export of `to`. */
2
+ export interface ImporterEdge {
3
+ from: string;
4
+ to: string;
5
+ symbol: string;
6
+ }
7
+ /** One module-to-test link: `test` references `module`. */
8
+ export interface ModuleTest {
9
+ module: string;
10
+ test: string;
11
+ }
12
+ /** One entry point: `symbol` is an export of `module` that no other module imports. */
13
+ export interface EntryPoint {
14
+ module: string;
15
+ symbol: string;
16
+ }
17
+ /**
18
+ * The compiled index -- MECHANICAL structure only. There is deliberately no `claims` / `unknowns`
19
+ * / `frame` field: judgment is not the compiler's to produce (I12). The absence is a compile-time
20
+ * property of this type, not a runtime filter -- nothing can put a judgment field here.
21
+ */
22
+ export interface RepositoryIndex {
23
+ source_revision: string;
24
+ files_to_exports: Record<string, string[]>;
25
+ file_importers: ImporterEdge[];
26
+ module_tests: ModuleTest[];
27
+ entry_points: EntryPoint[];
28
+ conventions_observed: string[];
29
+ boundary: string[];
30
+ }
31
+ /** A file in the input set: its repo-relative path and its raw source text. */
32
+ export type RepoFile = {
33
+ path: string;
34
+ content: string;
35
+ };
36
+ /**
37
+ * The compiler refuses rather than emitting a partial index. Thrown when a relative import
38
+ * specifier resolves to no file in the input set -- a dangling edge is not representable, so the
39
+ * whole index is withheld (I18, fail-closed).
40
+ */
41
+ export declare class RepoIndexError extends Error {
42
+ constructor(message?: string);
43
+ }
44
+ /**
45
+ * Compile a repository index from source. Deterministic: the returned index is byte-identical
46
+ * under any permutation of `files`. Fails closed: a relative import that resolves to no file in
47
+ * the set throws RepoIndexError rather than yielding a partial, dangling index.
48
+ */
49
+ export declare function compileRepositoryIndex(files: RepoFile[], opts: {
50
+ source_revision: string;
51
+ }): RepositoryIndex;
52
+ /**
53
+ * Reconcile a compiled index against a model's claimed reading of the SAME mechanical fields. The
54
+ * compiler is authoritative: on any divergence the compiled value wins, so a model-hallucinated
55
+ * edge is dropped (I15). The model reading is offered for comparison only -- it never adds to the
56
+ * mechanical structure.
57
+ */
58
+ export declare function reconcileMechanical(compiled: RepositoryIndex, _modelReading: Pick<RepositoryIndex, "file_importers">): RepositoryIndex;
@@ -0,0 +1,232 @@
1
+ // The deterministic producer for a change-context's MECHANICAL fields.
2
+ //
3
+ // The reading seat (agent john, software-change-pr-v1) spends most of a 24 tool-call cap
4
+ // RE-DERIVING repository structure every run -- the import graph, the module-to-tests index, the
5
+ // exported symbols and their entry points. This module COMPILES those facts from source, so the
6
+ // mechanical half of a reading is a build artifact rather than a thing a model re-establishes by
7
+ // hand (and mis-establishes: three hand-rolled structural sweeps this week each needed correction,
8
+ // and a guessed invocation surface once survived into sealed tests).
9
+ //
10
+ // The prohibition that gives it its shape (#424 I12/I13): this compiler emits STRUCTURE ONLY. It
11
+ // never populates `claims`, `unknowns` or `frame` -- noticing is the reader's office, not the
12
+ // index's. The absence is enforced structurally: `RepositoryIndex` has no field for any of the
13
+ // three, so a compiled index carrying one would not type-check. A fast index that notices nothing
14
+ // is the POINT: it buys the reader's turns back for the judgment half a model is actually needed
15
+ // for.
16
+ //
17
+ // Everything here is pure and deterministic: the same file set in any order compiles to a
18
+ // byte-identical index (every field is canonicalised -- keys and arrays sorted -- before return).
19
+ // The compiler fails CLOSED: an import that resolves to no file in the input set refuses with a
20
+ // RepoIndexError rather than emitting a partial, dangling index.
21
+ /**
22
+ * The compiler refuses rather than emitting a partial index. Thrown when a relative import
23
+ * specifier resolves to no file in the input set -- a dangling edge is not representable, so the
24
+ * whole index is withheld (I18, fail-closed).
25
+ */
26
+ export class RepoIndexError extends Error {
27
+ constructor(message) {
28
+ super(message);
29
+ this.name = "RepoIndexError";
30
+ // Restore the prototype chain under ES5-target transpilation so `instanceof` holds.
31
+ Object.setPrototypeOf(this, RepoIndexError.prototype);
32
+ }
33
+ }
34
+ // -- source classification -----------------------------------------------------------------------
35
+ const TEST_FILE = /\.test\.[cm]?[jt]sx?$/;
36
+ const isTestFile = (path) => TEST_FILE.test(path);
37
+ // -- a small POSIX path resolver (the tree is described in POSIX paths, no fs access) ------------
38
+ /** Resolve a relative specifier against the importing file's directory, POSIX-style. */
39
+ function resolveRelative(fromPath, spec) {
40
+ const slash = fromPath.lastIndexOf("/");
41
+ const fromDir = slash >= 0 ? fromPath.slice(0, slash) : "";
42
+ const parts = (fromDir ? fromDir.split("/") : []).concat(spec.split("/"));
43
+ const stack = [];
44
+ for (const p of parts) {
45
+ if (p === "" || p === ".")
46
+ continue;
47
+ if (p === "..") {
48
+ stack.pop();
49
+ continue;
50
+ }
51
+ stack.push(p);
52
+ }
53
+ return stack.join("/");
54
+ }
55
+ /**
56
+ * Map a resolved `.js`-style specifier target to the real source file in the set (the ESM/bundler
57
+ * convention: source is `.ts`, the specifier names the emitted `.js`). Returns the matched path,
58
+ * or undefined when nothing in the set answers it.
59
+ */
60
+ function resolveModule(resolvedTarget, fileSet) {
61
+ const base = resolvedTarget.replace(/\.[cm]?jsx?$/, "");
62
+ const candidates = [
63
+ base + ".ts",
64
+ base + ".tsx",
65
+ base + ".mts",
66
+ base + ".cts",
67
+ resolvedTarget,
68
+ base + "/index.ts",
69
+ base + "/index.tsx",
70
+ ];
71
+ for (const c of candidates) {
72
+ if (fileSet.has(c))
73
+ return c;
74
+ }
75
+ return undefined;
76
+ }
77
+ /**
78
+ * Extract the named-import bindings and their module specifier from a source text. Only named
79
+ * imports carry the symbols an importer edge names; `import Default from` and `import * as ns`
80
+ * bring in no named export and are recorded with an empty symbol list (so resolution/fail-closed
81
+ * still runs on their specifier). Bare (non-relative) specifiers are left to the caller to skip.
82
+ */
83
+ function parseImports(content) {
84
+ const out = [];
85
+ // `import [type] [ ... ] from "spec"` -- the binding clause is optional (side-effect imports).
86
+ const re = /import\s+(?:type\s+)?([^;'"]*?\s+from\s+)?["']([^"']+)["']/g;
87
+ let m;
88
+ while ((m = re.exec(content)) !== null) {
89
+ const clause = m[1] ?? "";
90
+ const spec = m[2];
91
+ const braces = /\{([^}]*)\}/.exec(clause);
92
+ const symbols = [];
93
+ if (braces) {
94
+ for (const raw of braces[1].split(",")) {
95
+ const name = raw.trim().split(/\s+as\s+/)[0]?.trim();
96
+ // The edge names the target's EXPORTED symbol -- the left side of `orig as local`.
97
+ if (name && /^[A-Za-z_$][\w$]*$/.test(name))
98
+ symbols.push(name);
99
+ }
100
+ }
101
+ out.push({ spec, symbols });
102
+ }
103
+ return out;
104
+ }
105
+ /** Extract the exported symbol names declared in a source text. */
106
+ function parseExports(content) {
107
+ const names = new Set();
108
+ const push = (re) => {
109
+ let m;
110
+ const g = new RegExp(re.source, "g");
111
+ while ((m = g.exec(content)) !== null)
112
+ if (m[1])
113
+ names.add(m[1]);
114
+ };
115
+ // export [async] function NAME / export [abstract] class NAME / export const|let|var NAME /
116
+ // export type|interface|enum NAME
117
+ push(/export\s+(?:async\s+)?function\s*\*?\s*([A-Za-z_$][\w$]*)/);
118
+ push(/export\s+(?:abstract\s+)?class\s+([A-Za-z_$][\w$]*)/);
119
+ push(/export\s+(?:const|let|var)\s+([A-Za-z_$][\w$]*)/);
120
+ push(/export\s+(?:type|interface|enum)\s+([A-Za-z_$][\w$]*)/);
121
+ // export { a, b as c } -- the exported name is the right side of `as`, else the bare name.
122
+ let mm;
123
+ const named = /export\s*(?:type\s*)?\{([^}]*)\}(?!\s*from)/g;
124
+ while ((mm = named.exec(content)) !== null) {
125
+ for (const raw of mm[1].split(",")) {
126
+ const parts = raw.trim().split(/\s+as\s+/);
127
+ const name = (parts[1] ?? parts[0])?.trim();
128
+ if (name && /^[A-Za-z_$][\w$]*$/.test(name))
129
+ names.add(name);
130
+ }
131
+ }
132
+ return [...names];
133
+ }
134
+ const isRelative = (spec) => spec.startsWith("./") || spec.startsWith("../");
135
+ const edgeKey = (e) => `${e.from} ${e.to} ${e.symbol}`;
136
+ const mtKey = (m) => `${m.module} ${m.test}`;
137
+ const epKey = (e) => `${e.module} ${e.symbol}`;
138
+ /**
139
+ * Compile a repository index from source. Deterministic: the returned index is byte-identical
140
+ * under any permutation of `files`. Fails closed: a relative import that resolves to no file in
141
+ * the set throws RepoIndexError rather than yielding a partial, dangling index.
142
+ */
143
+ export function compileRepositoryIndex(files, opts) {
144
+ const fileSet = new Set(files.map((f) => f.path));
145
+ // Resolve a relative specifier or FAIL CLOSED -- every endpoint of every edge must be a real file.
146
+ const resolveOrThrow = (fromPath, spec) => {
147
+ const target = resolveModule(resolveRelative(fromPath, spec), fileSet);
148
+ if (target === undefined) {
149
+ throw new RepoIndexError(`unresolvable import in ${fromPath}: "${spec}" resolves to no file in the input set -- refusing a partial, dangling index`);
150
+ }
151
+ return target;
152
+ };
153
+ const filesToExports = {};
154
+ const edges = new Map();
155
+ const moduleTests = new Map();
156
+ const jsExtImport = { seen: false };
157
+ const colocatedTests = { seen: false };
158
+ for (const f of files) {
159
+ const imports = parseImports(f.content);
160
+ for (const imp of imports) {
161
+ if (!isRelative(imp.spec))
162
+ continue; // external/bare specifier -- not an in-tree edge
163
+ if (/\.[cm]?jsx?$/.test(imp.spec))
164
+ jsExtImport.seen = true;
165
+ const target = resolveOrThrow(f.path, imp.spec);
166
+ if (isTestFile(f.path)) {
167
+ // A test file's imports feed the module-to-tests index, never the importer graph.
168
+ if (!isTestFile(target)) {
169
+ const mt = { module: target, test: f.path };
170
+ moduleTests.set(mtKey(mt), mt);
171
+ colocatedTests.seen = true;
172
+ }
173
+ }
174
+ else {
175
+ // A source file's named imports are importer edges -- one per named symbol.
176
+ for (const symbol of imp.symbols) {
177
+ const e = { from: f.path, to: target, symbol };
178
+ edges.set(edgeKey(e), e);
179
+ }
180
+ }
181
+ }
182
+ if (!isTestFile(f.path)) {
183
+ filesToExports[f.path] = parseExports(f.content);
184
+ }
185
+ }
186
+ // entry_points = exported symbols no OTHER module imports (roots of symbol consumption). A
187
+ // symbol reached only from a test file still counts as an entry point -- tests are not consumers
188
+ // in the import graph.
189
+ const importedSymbols = new Set();
190
+ for (const e of edges.values())
191
+ importedSymbols.add(`${e.to} ${e.symbol}`);
192
+ const entryPoints = [];
193
+ for (const [module, exports] of Object.entries(filesToExports)) {
194
+ for (const symbol of exports) {
195
+ if (!importedSymbols.has(`${module} ${symbol}`))
196
+ entryPoints.push({ module, symbol });
197
+ }
198
+ }
199
+ const conventions = [];
200
+ if (jsExtImport.seen)
201
+ conventions.push("esm-js-extension-import-specifiers");
202
+ if (colocatedTests.seen)
203
+ conventions.push("tests-reference-source-by-relative-import");
204
+ // -- canonicalise every field: sorted keys, sorted arrays -- so JSON.stringify is order-stable --
205
+ const canonExports = {};
206
+ for (const path of Object.keys(filesToExports).sort()) {
207
+ canonExports[path] = [...filesToExports[path]].sort();
208
+ }
209
+ return {
210
+ source_revision: opts.source_revision,
211
+ files_to_exports: canonExports,
212
+ file_importers: [...edges.values()].sort((a, b) => edgeKey(a).localeCompare(edgeKey(b))),
213
+ module_tests: [...moduleTests.values()].sort((a, b) => mtKey(a).localeCompare(mtKey(b))),
214
+ entry_points: entryPoints.sort((a, b) => epKey(a).localeCompare(epKey(b))),
215
+ conventions_observed: conventions.sort(),
216
+ boundary: [...fileSet].sort(),
217
+ };
218
+ }
219
+ /**
220
+ * Reconcile a compiled index against a model's claimed reading of the SAME mechanical fields. The
221
+ * compiler is authoritative: on any divergence the compiled value wins, so a model-hallucinated
222
+ * edge is dropped (I15). The model reading is offered for comparison only -- it never adds to the
223
+ * mechanical structure.
224
+ */
225
+ export function reconcileMechanical(compiled, _modelReading) {
226
+ void _modelReading; // authoritative-compiler contract: the model's mechanical claims do not win
227
+ return {
228
+ ...compiled,
229
+ file_importers: [...compiled.file_importers],
230
+ };
231
+ }
232
+ //# sourceMappingURL=repo_index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repo_index.js","sourceRoot":"","sources":["../../src/repo_index.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,EAAE;AACF,yFAAyF;AACzF,iGAAiG;AACjG,gGAAgG;AAChG,iGAAiG;AACjG,mGAAmG;AACnG,qEAAqE;AACrE,EAAE;AACF,iGAAiG;AACjG,8FAA8F;AAC9F,+FAA+F;AAC/F,kGAAkG;AAClG,iGAAiG;AACjG,OAAO;AACP,EAAE;AACF,0FAA0F;AAC1F,kGAAkG;AAClG,gGAAgG;AAChG,iEAAiE;AAuCjE;;;;GAIG;AACH,MAAM,OAAO,cAAe,SAAQ,KAAK;IACvC,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,oFAAoF;QACpF,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACxD,CAAC;CACF;AAED,mGAAmG;AACnG,MAAM,SAAS,GAAG,uBAAuB,CAAC;AAC1C,MAAM,UAAU,GAAG,CAAC,IAAY,EAAW,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEnE,mGAAmG;AACnG,wFAAwF;AACxF,SAAS,eAAe,CAAC,QAAgB,EAAE,IAAY;IACrD,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACxC,MAAM,OAAO,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3D,MAAM,KAAK,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CA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C,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACxF,YAAY,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,oBAAoB,EAAE,WAAW,CAAC,IAAI,EAAE;QACxC,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,EAAE;KAC9B,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CACjC,QAAyB,EACzB,aAAsD;IAEtD,KAAK,aAAa,CAAC,CAAC,4EAA4E;IAChG,OAAO;QACL,GAAG,QAAQ;QACX,cAAc,EAAE,CAAC,GAAG,QAAQ,CAAC,cAAc,CAAC;KAC7C,CAAC;AACJ,CAAC"}
@@ -37,8 +37,14 @@ export declare function typeShapeFingerprint(def: {
37
37
  * agent's type surface, so a resume across an edited pipeline cannot happen. The rest close
38
38
  * the holes genome_hash does not cover:
39
39
  *
40
- * - `gig_input_sha` — the dispatch payload. Phases 1..4 derived from payload A followed by
41
- * phase 5 consuming payload B is the same splice as a genome change, one layer down.
40
+ * - `gig_input_sha` — the sha256 of the CANONICAL dispatch payload, and ONLY that hash: the
41
+ * payload itself is NEVER stored in a checkpoint (nor in the ledger). A later reader must not
42
+ * try to "recover the input from the checkpoint" — there is nothing to recover; the hash is a
43
+ * fingerprint, not a copy. Phases 1..4 derived from payload A followed by phase 5 consuming
44
+ * payload B is the same splice as a genome change, one layer down. (#20: because the payload is
45
+ * absent, a resume that OMITS --input cannot re-derive it; when every remaining chair is human
46
+ * the resume gate INHERITS this recorded hash instead — see the runtime resume gate and the
47
+ * inheritance-vs-waiver note on `runIdentityMismatch` below.)
42
48
  * - `model_version` — a run whose first half was produced by one model and second half by
43
49
  * another gets ONE `run_fingerprint`, carrying only the final model. That fingerprint then
44
50
  * misdescribes the outputs it covers. Cheap to check; usually "unknown" on both sides, so
@@ -91,7 +97,32 @@ export declare function producersSha(input: {
91
97
  code_hash: string;
92
98
  }>;
93
99
  }): string;
94
- export declare function runIdentityMismatch(a: RunIdentity, b: RunIdentity): string[];
100
+ /**
101
+ * `waiveProducers` skips ONLY the `producers_sha` comparison; every other field still compares
102
+ * and still enters the returned set. It defaults OFF, so an unadorned call is byte-for-byte the
103
+ * old behaviour. The one caller that sets it (the resume gate) has first proven that every chair
104
+ * left to run is human — and a producing agent's definition cannot change what a person is being
105
+ * asked to decide about work that is already sealed and hashed. That is the sole justification;
106
+ * genome_hash, gig_input_sha, model_version, depth and canonical_form_version are NEVER waived,
107
+ * because they can still describe something the remaining human chair is being asked to approve.
108
+ *
109
+ * That NEVER-WAIVED rule is about a STATED mismatch, and neither #19 nor #20 touches it. Waiving
110
+ * skips a comparison that WOULD have failed; INHERITING substitutes the checkpoint's own recorded
111
+ * value for a field the operator left unstated, so the comparison a resume runs is between the
112
+ * checkpoint and a value it does not contradict. Two fields inherit, at the runtime resume-gate
113
+ * call site, never here:
114
+ * - depth (#19): a resume that omits --depth compares against the depth the CHECKPOINT recorded.
115
+ * - gig_input_sha (#20): a resume whose every remaining chair is human and that omits --input
116
+ * compares against the gig_input_sha the CHECKPOINT recorded — because the payload is never
117
+ * stored (see RunIdentity.gig_input_sha) and the remaining human chairs consume no payload.
118
+ * Both stay never-waived: an EXPLICIT --depth or --input that disagrees still drives a refusal, and
119
+ * gig_input_sha keeps gating in full the moment any remaining chair is a model chair. Inheriting a
120
+ * value nobody contradicted is a different act from skipping a comparison that would have failed,
121
+ * so reading #19 or #20 as a hole in this rule is a mistake.
122
+ */
123
+ export declare function runIdentityMismatch(a: RunIdentity, b: RunIdentity, opts?: {
124
+ waiveProducers?: boolean;
125
+ }): string[];
95
126
  /**
96
127
  * The composite identity of one checkpointed seat: `(chart_slug, movement_id, role)`.
97
128
  *
@@ -142,6 +173,13 @@ export interface CheckpointRole {
142
173
  export interface GigCheckpoint {
143
174
  schema_version: number;
144
175
  gig_id: string;
176
+ /**
177
+ * The run identity a resume must match. NOTE what this does NOT contain: the dispatch payload.
178
+ * `identity.gig_input_sha` is a sha256 of the canonical payload and nothing else — the checkpoint
179
+ * stores the HASH, never the bytes. A later reader must not attempt to "recover the input from
180
+ * the checkpoint"; that recovery is structurally impossible. On a human-only resume that omits
181
+ * --input, the gate inherits this hash rather than reconstructing a payload it never kept (#20).
182
+ */
145
183
  identity: RunIdentity;
146
184
  /**
147
185
  * The engine build (COLTRANE_VERSION) that WROTE this checkpoint.
@@ -151,7 +189,9 @@ export interface GigCheckpoint {
151
189
  * producers_sha) legitimately drifts between two builds that both write `schema_version` 1.
152
190
  * When a resume then refuses on that drift, the raw before/after hashes alone do not tell an
153
191
  * operator WHICH build would have matched — they have to guess the producing version. Recording
154
- * it here turns "these two 64-hex strings disagree" into "resume from a <version> build".
192
+ * it here lets the refusal, when the versions genuinely DIFFER, turn "these two 64-hex strings
193
+ * disagree" into "resume from a <version> build". When this version equals the current one the
194
+ * refusal names the drifted fields instead, since the version is not what moved.
155
195
  *
156
196
  * Optional for BACK-COMPAT: a checkpoint written before this field existed has none, and a
157
197
  * resume of it refuses/succeeds exactly as before, naming "(engine version unrecorded)" in
package/dist/src/reuse.js CHANGED
Binary file
@@ -1 +1 @@
1
- {"version":3,"file":"reuse.js","sourceRoot":"","sources":["../../src/reuse.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,EAAE;AACF,0FAA0F;AAC1F,6FAA6F;AAC7F,wFAAwF;AACxF,2FAA2F;AAC3F,yFAAyF;AACzF,4FAA4F;AAC5F,gCAAgC;AAChC,EAAE;AACF,6FAA6F;AAC7F,2FAA2F;AAC3F,wFAAwF;AACxF,6FAA6F;AAC7F,2FAA2F;AAC3F,0FAA0F;AAC1F,6DAA6D;AAC7D,EAAE;AACF,oFAAoF;AACpF,2FAA2F;AAC3F,0FAA0F;AAC1F,kDAAkD;AAClD,EAAE;AACF,yFAAyF;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./tool_providers.js";
3
3
  import { type Realization } from "./venue_realize.js";
4
+ import type { VenueRealizer, CredentialResolver } from "./venue_realizer.js";
4
5
  import type { Venue } from "./chart.js";
5
6
  export declare const CORE_TO_PRIMITIVE: Record<string, Agent["primitives"][number]>;
6
7
  import { type CheckpointStore, type ReuseStore, type PriorBudgetState } from "./reuse.js";
7
8
  import type { OutputStore, OutputRecord } from "./outputs.js";
9
+ import { type GigConformanceResult } from "./gig_conformance.js";
8
10
  import { type Ledger, type GigUsage } from "./ledger.js";
9
11
  import type { Depth } from "./pricing.js";
10
12
  import type { SkillRecord, EvalRecord } from "./loader.js";
@@ -22,6 +24,11 @@ export interface AgentInvocationContext {
22
24
  depth?: Depth | undefined;
23
25
  realization?: Realization | undefined;
24
26
  venue?: Venue | undefined;
27
+ substrateMcpConfigs?: Readonly<Record<string, unknown>> | undefined;
28
+ seatExec?: {
29
+ container: string;
30
+ workspace: string;
31
+ } | undefined;
25
32
  turn_budget?: number | undefined;
26
33
  turn_reserve?: number | undefined;
27
34
  }
@@ -67,6 +74,19 @@ export type GigProgressEvent = {
67
74
  role: string;
68
75
  agent: string;
69
76
  missing: string[];
77
+ } | {
78
+ type: "lineage_adoption";
79
+ phase: string;
80
+ role: string;
81
+ /** true only when the verdict passed, was signed, and named a record. */
82
+ adopt: boolean;
83
+ /** content_sha of the lineage-record the institution would be grounded in. */
84
+ record_ref?: string;
85
+ /** WHICH institution it grounds. Absent on a refusal. */
86
+ institution_slug?: string;
87
+ approved_by?: string;
88
+ /** every applicable refusal, not just the first — see lineageAdoption. */
89
+ refusals?: string[];
70
90
  } | {
71
91
  type: "agent_event";
72
92
  phase: string;
@@ -230,6 +250,19 @@ export interface RunDeps {
230
250
  * away; noticing a silent $6 is not.
231
251
  */
232
252
  resume_from?: string | undefined;
253
+ /**
254
+ * #20 — the caller supplied NO --input on this (resume) dispatch. Default-false semantics:
255
+ * absent or false means "a value WAS supplied" (even an explicit `{}`); true means "the caller
256
+ * stated no payload at all". It exists for the same reason `depth?: Depth | undefined` does —
257
+ * an omitted value must be distinguishable from a stated one. The dispatch payload is never
258
+ * carried in a checkpoint (only its hash is; see src/reuse.ts RunIdentity.gig_input_sha), so an
259
+ * omitted --input cannot be reconstructed. Instead, on a resume whose every remaining chair is
260
+ * human, the gate INHERITS the checkpoint's recorded gig_input_sha rather than refusing on the
261
+ * drift to sha256('{}'). A SUPPLIED value is never inherited, so a disagreeing --input still
262
+ * gates; and while any remaining chair is a MODEL chair the gate is unchanged. worker.ts passes
263
+ * the real claim input and never sets this, so the gate stays fully active for worker runs.
264
+ */
265
+ gig_input_omitted?: boolean | undefined;
233
266
  /**
234
267
  * The chair-level reuse cache. Presence IS the opt-in — the runtime never constructs one —
235
268
  * and it enables BOTH reads and writes.
@@ -277,6 +310,44 @@ export interface RunDeps {
277
310
  * any class present but NOT declared by the venue's `credential_surface` is a breach that fails
278
311
  * the gig closed. Absent = none present (deny-by-default: an empty surface admits nothing). */
279
312
  credentialsPresent?: string[] | undefined;
313
+ /**
314
+ * The SUBSTRATE seam (substrate → dispatch wiring). When supplied AND the resolved venue declares
315
+ * `mcp_servers`, runGig realizes the substrate (a real room) alongside the policy `realization`:
316
+ * it calls `venueRealizer.realize(venue, credentialResolver, { gigId })`, threads the returned
317
+ * handle's `mcpServerConfigs` onto every chair's `AgentInvocationContext.substrateMcpConfigs` so
318
+ * the spawn reaches the servers running inside the room, and tears the handle down in the same
319
+ * finally block that tears down the policy realization.
320
+ *
321
+ * ABSENT = the substrate is skipped entirely: a venue-named gig still runs the policy gauntlet and
322
+ * confines its chairs by construction, exactly as before this wire existed — the room is opt-in on
323
+ * the deployment supplying an implementation, never mandatory. The engine ships the interface
324
+ * (src/venue_realizer.ts); the deployment supplies `dockerComposeRealizer()`/`localProcessRealizer()`
325
+ * and tests supply the daemon-free substitute (a realizer with an injected `run` seam).
326
+ */
327
+ venueRealizer?: VenueRealizer | undefined;
328
+ /**
329
+ * How the substrate realizer binds credentials into the room. Passed as the required positional
330
+ * `credentialResolver` argument to `venueRealizer.realize()`. Absent → `async () => ({})`, an empty
331
+ * resolver: the interface is satisfied without a new mandatory field, and a class the resolver does
332
+ * not supply reaches the room as an empty secret that fails at the service that reads it — the
333
+ * direction a missing credential should fail. The deployment supplies the real resolver.
334
+ */
335
+ credentialResolver?: CredentialResolver | undefined;
336
+ /**
337
+ * The repository this RUN operates on — the SUBJECT of work, named by the RUN and NEVER by the
338
+ * venue. A venue is one AT-REST room and is one-to-MANY against repositories: one room serves many
339
+ * repositories, so pinning the repository on the venue would mint a venue per repository. When
340
+ * supplied AND the resolved venue has a realizer, it is threaded into the substrate realizer as
341
+ * `RealizeOpts.repoUrl`, so the realized room's workspace is populated (through src/workspace.ts
342
+ * `prepareWorkspace`, the SAME mechanism the drain uses) with a clone of THIS repository — and two
343
+ * concurrent code-editing gigs against the same room get DISJOINT trees.
344
+ *
345
+ * The source is EXPLICIT: a dispatch field on the server path, the claim's governed `repo_url`
346
+ * column on the drain path. It is never process.cwd() and never an ambient host path — inferring the
347
+ * operator's own checkout is exactly the isolation failure an explicit source forecloses. ABSENT =
348
+ * the room declines to populate (an empty read-only workspace) and no git credential is minted.
349
+ */
350
+ repoUrl?: string | undefined;
280
351
  }
281
352
  /**
282
353
  * Per-gig cost-budget input. Honors budget-state.json schema (PR #56). Only
@@ -472,6 +543,17 @@ export interface GigResult {
472
543
  movement_id?: string;
473
544
  genome_hash: string;
474
545
  run_fingerprint: string;
546
+ /**
547
+ * The gig-close CONFORMANCE classification — does this sealed run fit its own construction? A
548
+ * pure, deterministic verdict over (the standard, the sealed set) along two axes, FIT (every
549
+ * chair's declared output_contract is satisfied) and TIMING (every record's engine-stamped
550
+ * input_shas respect the declared edges). It is a CLASSIFIER that routes review, not a gate:
551
+ * present as a PROPERTY of the run beside `run_fingerprint`, deliberately NOT folded into it (a
552
+ * run containing its own grade would be self-referential) and never sealed as an output INSIDE
553
+ * the gig it grades. Present only on the completion path — an `awaiting_approval` return is a
554
+ * distinct shape whose INCOMPLETE verdict is the classifier's job to state when it is called.
555
+ */
556
+ conformance?: GigConformanceResult;
475
557
  /**
476
558
  * Records this run CONSUMED but did not produce — an earlier movement's sealed outputs, carried
477
559
  * in over a chart edge. Present only when seeds were actually read, so its absence is the claim