@sublang/slc 0.5.0 → 0.6.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 (108) hide show
  1. package/README.md +4 -4
  2. package/dist/app.d.ts +20 -20
  3. package/dist/app.js +29 -29
  4. package/dist/app.js.map +1 -1
  5. package/dist/artifacts.d.ts +6 -6
  6. package/dist/artifacts.d.ts.map +1 -1
  7. package/dist/artifacts.js +9 -9
  8. package/dist/artifacts.js.map +1 -1
  9. package/dist/cli.js +3 -3
  10. package/dist/cligent-agent.d.ts +1 -1
  11. package/dist/cligent-agent.js +5 -5
  12. package/dist/compiled-executor.d.ts +14 -6
  13. package/dist/compiled-executor.d.ts.map +1 -1
  14. package/dist/compiled-executor.js +133 -31
  15. package/dist/compiled-executor.js.map +1 -1
  16. package/dist/config-file.d.ts +6 -6
  17. package/dist/config-file.js +5 -5
  18. package/dist/config.d.ts +17 -15
  19. package/dist/config.d.ts.map +1 -1
  20. package/dist/config.js +26 -16
  21. package/dist/config.js.map +1 -1
  22. package/dist/emitted-imports.d.ts +14 -0
  23. package/dist/emitted-imports.d.ts.map +1 -1
  24. package/dist/emitted-imports.js +63 -7
  25. package/dist/emitted-imports.js.map +1 -1
  26. package/dist/entry-module.d.ts +5 -3
  27. package/dist/entry-module.d.ts.map +1 -1
  28. package/dist/entry-module.js +41 -13
  29. package/dist/entry-module.js.map +1 -1
  30. package/dist/execution.d.ts +10 -10
  31. package/dist/execution.d.ts.map +1 -1
  32. package/dist/execution.js +13 -13
  33. package/dist/execution.js.map +1 -1
  34. package/dist/hash.js +2 -2
  35. package/dist/host-capabilities.d.ts +115 -0
  36. package/dist/host-capabilities.d.ts.map +1 -0
  37. package/dist/host-capabilities.js +507 -0
  38. package/dist/host-capabilities.js.map +1 -0
  39. package/dist/interpreter.d.ts +2 -2
  40. package/dist/interpreter.d.ts.map +1 -1
  41. package/dist/interpreter.js +7 -7
  42. package/dist/invocation.d.ts +6 -6
  43. package/dist/invocation.d.ts.map +1 -1
  44. package/dist/invocation.js +1 -1
  45. package/dist/link.d.ts +4 -4
  46. package/dist/link.d.ts.map +1 -1
  47. package/dist/link.js +11 -11
  48. package/dist/link.js.map +1 -1
  49. package/dist/phase-runner.d.ts +4 -4
  50. package/dist/phase-runner.js +9 -9
  51. package/dist/phase.d.ts +4 -4
  52. package/dist/phase.d.ts.map +1 -1
  53. package/dist/phase.js +7 -7
  54. package/dist/phase.js.map +1 -1
  55. package/dist/pin-closure.d.ts +35 -7
  56. package/dist/pin-closure.d.ts.map +1 -1
  57. package/dist/pin-closure.js +135 -21
  58. package/dist/pin-closure.js.map +1 -1
  59. package/dist/pin-currency.d.ts +9 -4
  60. package/dist/pin-currency.d.ts.map +1 -1
  61. package/dist/pin-currency.js +57 -20
  62. package/dist/pin-currency.js.map +1 -1
  63. package/dist/pin-generate.d.ts +7 -7
  64. package/dist/pin-generate.d.ts.map +1 -1
  65. package/dist/pin-generate.js +14 -8
  66. package/dist/pin-generate.js.map +1 -1
  67. package/dist/pin-inputs.d.ts +41 -0
  68. package/dist/pin-inputs.d.ts.map +1 -0
  69. package/dist/pin-inputs.js +179 -0
  70. package/dist/pin-inputs.js.map +1 -0
  71. package/dist/pin-paths.d.ts +1 -1
  72. package/dist/pin-paths.js +4 -4
  73. package/dist/pin-paths.js.map +1 -1
  74. package/dist/pins.d.ts +4 -4
  75. package/dist/pins.d.ts.map +1 -1
  76. package/dist/pins.js +5 -5
  77. package/dist/pins.js.map +1 -1
  78. package/dist/pipeline.d.ts +5 -5
  79. package/dist/pipeline.js +10 -10
  80. package/dist/playbook-contract.d.ts +53 -5
  81. package/dist/playbook-contract.d.ts.map +1 -1
  82. package/dist/playbook-contract.js +70 -21
  83. package/dist/playbook-contract.js.map +1 -1
  84. package/dist/playbook-ports.d.ts +9 -9
  85. package/dist/playbook-ports.d.ts.map +1 -1
  86. package/dist/playbook-ports.js +3 -3
  87. package/dist/playbook-ports.js.map +1 -1
  88. package/dist/progress.d.ts +8 -9
  89. package/dist/progress.d.ts.map +1 -1
  90. package/dist/progress.js +3 -3
  91. package/dist/progress.js.map +1 -1
  92. package/dist/resolver.d.ts +9 -9
  93. package/dist/resolver.d.ts.map +1 -1
  94. package/dist/resolver.js +12 -12
  95. package/dist/resolver.js.map +1 -1
  96. package/dist/runner.d.ts +1 -1
  97. package/dist/runner.d.ts.map +1 -1
  98. package/dist/runner.js +195 -80
  99. package/dist/runner.js.map +1 -1
  100. package/dist/verify-coverage.d.ts +4 -3
  101. package/dist/verify-coverage.d.ts.map +1 -1
  102. package/dist/verify-coverage.js +509 -71
  103. package/dist/verify-coverage.js.map +1 -1
  104. package/dist/verify.d.ts +111 -15
  105. package/dist/verify.d.ts.map +1 -1
  106. package/dist/verify.js +656 -59
  107. package/dist/verify.js.map +1 -1
  108. package/package.json +3 -3
package/dist/config.js CHANGED
@@ -1,19 +1,19 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  // SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai>
3
3
  /**
4
- * Agent/model configuration and executor construction for the `slc` bin (CLI-7,
5
- * CLI-8, CLI-12, DR-004, DR-005).
4
+ * Agent/model configuration and executor construction for the `slc` bin (cli-7,
5
+ * cli-8, cli-12, DR-004, DR-005).
6
6
  *
7
7
  * `resolveAgentSelection` reads the Coder and optional Reviewer selections from
8
- * the environment and refuses unset or unsupported required values (CLI-12,
8
+ * the environment and refuses unset or unsupported required values (cli-12,
9
9
  * DR-022).
10
10
  * `createConfiguredExecutor` builds the interpreted executor and
11
11
  * `createConfiguredCompiledFactory` the compiled-execution factory pinned phases
12
12
  * select, both over Cligent-backed transports for the selected agent, binding
13
- * the optional model as configuration — not phase semantics (PHEXEC-13);
13
+ * the optional model as configuration — not phase semantics (phase-execution-13);
14
14
  * credentials are left for the agent CLI to read from the inherited process
15
15
  * environment. The adapter factory is injectable so tests can fake adapter
16
- * construction. See specs/dev/cli.md.
16
+ * construction. See specs/packages/cli.md.
17
17
  */
18
18
  import { resolve } from 'node:path';
19
19
  import { ClaudeCodeAdapter } from '@sublang/cligent/adapters/claude-code';
@@ -25,14 +25,14 @@ import { createCligentAgent } from './cligent-agent.js';
25
25
  import { createCompiledExecutor } from './compiled-executor.js';
26
26
  import { createInterpretedExecutor } from './interpreter.js';
27
27
  import { createReviewingAgent } from './reviewing-agent.js';
28
- /** Agent CLI ids the executable registers (CLI-7). */
28
+ /** Agent CLI ids the executable registers (cli-7). */
29
29
  export const SUPPORTED_AGENTS = [
30
30
  'claude-code',
31
31
  'codex',
32
32
  'gemini',
33
33
  'opencode',
34
34
  ];
35
- /** Default factory: Cligent's built-in adapters, constructed on demand (CLI-7). */
35
+ /** Default factory: Cligent's built-in adapters, constructed on demand (cli-7). */
36
36
  export const defaultAdapterFactory = (agent) => {
37
37
  switch (agent) {
38
38
  case 'claude-code':
@@ -54,13 +54,13 @@ export class ConfigError extends Error {
54
54
  this.code = code;
55
55
  }
56
56
  }
57
- /** Reports whether `agent` is one of the registered ids (CLI-7). */
57
+ /** Reports whether `agent` is one of the registered ids (cli-7). */
58
58
  export function isSupportedAgent(agent) {
59
59
  return SUPPORTED_AGENTS.includes(agent);
60
60
  }
61
61
  /**
62
62
  * Resolves the Coder and optional Reviewer selections from environment configuration
63
- * (CLI-7, CLI-12): `SLC_AGENT` names a registered agent CLI, `SLC_MODEL`
63
+ * (cli-7, cli-12): `SLC_AGENT` names a registered agent CLI, `SLC_MODEL`
64
64
  * optionally names a model, and `SLC_EFFORT` optionally selects an
65
65
  * adapter-scoped reasoning effort validated against Cligent's support
66
66
  * metadata.
@@ -118,10 +118,10 @@ function resolveOneSelection(env, names) {
118
118
  };
119
119
  }
120
120
  /**
121
- * Builds the interpreted {@link PhaseExecutor} for a selection (CLI-7, CLI-8):
121
+ * Builds the interpreted {@link PhaseExecutor} for a selection (cli-7, cli-8):
122
122
  * constructs the agent CLI's adapter, wraps it as a Cligent-backed transport,
123
123
  * and binds the optional model as configuration, not phase semantics
124
- * (PHEXEC-13). The adapter factory is injectable so tests can fake adapter
124
+ * (phase-execution-13). The adapter factory is injectable so tests can fake adapter
125
125
  * construction; `permissions` is where a host configures the DR-003 write-scope
126
126
  * sandbox.
127
127
  */
@@ -134,7 +134,7 @@ export function createConfiguredExecutor(selection, opts = {}) {
134
134
  });
135
135
  }
136
136
  /**
137
- * Builds one Cligent-backed {@link AgentClient} for a selection (CLI-7): a fresh
137
+ * Builds one Cligent-backed {@link AgentClient} for a selection (cli-7): a fresh
138
138
  * adapter wrapped as a transport. Each client is a single-flight Cligent
139
139
  * instance that resumes its own agent session across calls, so callers wanting
140
140
  * isolated sessions construct one client per role or player.
@@ -151,11 +151,13 @@ export function createConfiguredAgentClient(selection, opts = {}) {
151
151
  }
152
152
  /**
153
153
  * Builds the compiled-execution factory the bin injects as `SlcDeps.compiled`
154
- * (CLI-8, PHEXEC-27): for a current pinned phase it drives the pinned `playbook`
154
+ * (cli-8, phase-execution-27): for a current pinned phase it drives the pinned `playbook`
155
155
  * artifact — resolved against its pipeline directory — through the compiled
156
156
  * executor, backing the runtime's player ports with one agent transport per
157
- * player id and its Captain/judge ports with one shared transport (PHEXEC-25),
158
- * and applying the selected model as the default per-player model (PHEXEC-13).
157
+ * player id and its Captain/judge ports with one shared transport; the dormant
158
+ * roleless composed-v3 path rejects its player port before that lazy player
159
+ * transport is constructed (phase-execution-25). The factory applies the
160
+ * selected model as the default per-player model (phase-execution-13).
159
161
  */
160
162
  export function createConfiguredCompiledFactory(selection, opts = {}) {
161
163
  const client = () => {
@@ -211,7 +213,12 @@ function runtimeContractForPin(choice) {
211
213
  // byte-identical to 3.1.0's — its major marks the SDK-topology break,
212
214
  // with cligent owning runtime versions, not a contract change — so it
213
215
  // selects the same profile (DR-020). 1.3.0 and 3.0.0 were never
214
- // installed or reviewed here and stay fail-closed.
216
+ // installed or reviewed here and stay fail-closed. Exact Playbook 10.0.0
217
+ // ships schema-3 linked artifacts whose Captain-hosted factory takes
218
+ // configured options plus live host capabilities, so it selects the
219
+ // composed-v3 profile (DR-024). 5.0.0 through 9.0.0 were never reviewed
220
+ // here and stay fail-closed: reviewing 10.0.0 establishes no contract
221
+ // identity for an intermediate release.
215
222
  if (provenance === '@sublang/playbook@0.10.0' ||
216
223
  provenance === '@sublang/playbook@1.0.0' ||
217
224
  provenance === '@sublang/playbook@2.0.0' ||
@@ -219,6 +226,9 @@ function runtimeContractForPin(choice) {
219
226
  provenance === '@sublang/playbook@4.0.0') {
220
227
  return 'composed-v2';
221
228
  }
229
+ if (provenance === '@sublang/playbook@10.0.0') {
230
+ return 'composed-v3';
231
+ }
222
232
  throw new Error(`unsupported pinned Playbook runtime contract: ${provenance}`);
223
233
  }
224
234
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,0EAA0E;AAE1E;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAG5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAGhE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG5D,sDAAsD;AACtD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,aAAa;IACb,OAAO;IACP,QAAQ;IACR,UAAU;CACF,CAA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;IACzE,qEAAqE;IACrE,oEAAoE;IACpE,wEAAwE;IACxE,sEAAsE;IACtE,wCAAwC;IACxC,IACE,UAAU,KAAK,0BAA0B;QACzC,UAAU,KAAK,yBAAyB;QACxC,UAAU,KAAK,yBAAyB;QACxC,UAAU,KAAK,yBAAyB;QACxC,UAAU,KAAK,yBAAyB,EACxC,CAAC;QACD,OAAO,aAAa,CAAC;IACvB,CAAC;IACD,IAAI,UAAU,KAAK,0BAA0B,EAAE,CAAC;QAC9C,OAAO,aAAa,CAAC;IACvB,CAAC;IACD,MAAM,IAAI,KAAK,CACb,iDAAiD,UAAU,EAAE,CAC9D,CAAC;AACJ,CAAC"}
@@ -1,3 +1,17 @@
1
+ /** One deterministic extension correction applied to an emitted import. */
2
+ export interface ImportSpecifierRewrite {
3
+ from: string;
4
+ to: string;
5
+ }
6
+ /**
7
+ * Settles relative `.js`/`.ts` imports of the link's object artifacts from the
8
+ * files that actually exist beside an emitted module. A materialized
9
+ * JavaScript sibling wins; otherwise the declared TypeScript object's sibling
10
+ * is used when present. Unrelated imports and object specifiers with neither
11
+ * sibling are left for
12
+ * {@link unresolvableRelativeImports} to reject.
13
+ */
14
+ export declare function reconcileLinkObjectImportSpecifiers(modulePath: string, objectPaths: readonly string[]): Promise<ImportSpecifierRewrite[]>;
1
15
  /**
2
16
  * The relative import specifiers of a `.ts`/`.js` module that do not resolve
3
17
  * to an existing file from the module's own directory, in source order.
@@ -1 +1 @@
1
- {"version":3,"file":"emitted-imports.d.ts","sourceRoot":"","sources":["../src/emitted-imports.ts"],"names":[],"mappings":"AAqBA;;;GAGG;AACH,wBAAsB,2BAA2B,CAC/C,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,EAAE,CAAC,CAWnB"}
1
+ {"version":3,"file":"emitted-imports.d.ts","sourceRoot":"","sources":["../src/emitted-imports.ts"],"names":[],"mappings":"AAuBA,2EAA2E;AAC3E,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAKD;;;;;;;GAOG;AACH,wBAAsB,mCAAmC,CACvD,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,SAAS,MAAM,EAAE,GAC7B,OAAO,CAAC,sBAAsB,EAAE,CAAC,CA8CnC;AAED;;;GAGG;AACH,wBAAsB,2BAA2B,CAC/C,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,EAAE,CAAC,CAWnB"}
@@ -1,19 +1,75 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  // SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai>
3
3
  /**
4
- * Deterministic load-integrity check for emitted modules (VERIFY-18).
4
+ * Deterministic link-object import settlement and load-integrity checks for
5
+ * emitted modules (pipeline-40, verification-18).
5
6
  *
6
7
  * A linked artifact is code whose relative imports Node resolves with exact
7
8
  * specifiers — `./workflow.fsm.js` does not find `workflow.fsm.ts`. An
8
- * agent-performed link can emit the wrong extension, and a compile that
9
- * reports success for a module that cannot load defers the failure to the
10
- * first `playbook run`. This check reads the emitted module and requires
11
- * every relative specifier to name an existing file beside it.
9
+ * agent-performed link can emit the wrong extension for its object import. The
10
+ * host settles that exact edge mechanically against a `.js` or `.ts` sibling
11
+ * that currently exists, then requires every relative specifier to name an
12
+ * existing file beside it. A genuinely unloadable module still fails before
13
+ * the first `playbook run`.
12
14
  */
13
- import { existsSync } from 'node:fs';
14
- import { readFile } from 'node:fs/promises';
15
+ import { existsSync, statSync } from 'node:fs';
16
+ import { readFile, writeFile } from 'node:fs/promises';
15
17
  import { dirname, resolve } from 'node:path';
16
18
  const IMPORT_SPECIFIER = /\bfrom\s+(['"])([^'"\n]+)\1|\bimport\s*\(\s*(['"])([^'"\n]+)\3\s*\)|\bimport\s+(['"])([^'"\n]+)\5/g;
19
+ const isRegularFile = (path) => statSync(path, { throwIfNoEntry: false })?.isFile() ?? false;
20
+ /**
21
+ * Settles relative `.js`/`.ts` imports of the link's object artifacts from the
22
+ * files that actually exist beside an emitted module. A materialized
23
+ * JavaScript sibling wins; otherwise the declared TypeScript object's sibling
24
+ * is used when present. Unrelated imports and object specifiers with neither
25
+ * sibling are left for
26
+ * {@link unresolvableRelativeImports} to reject.
27
+ */
28
+ export async function reconcileLinkObjectImportSpecifiers(modulePath, objectPaths) {
29
+ const source = await readFile(modulePath, 'utf8');
30
+ const dir = dirname(modulePath);
31
+ const emittedPath = resolve(modulePath);
32
+ const objectStems = new Set(objectPaths
33
+ .map((path) => resolve(path))
34
+ .filter((path) => path.endsWith('.js') || path.endsWith('.ts'))
35
+ .map((path) => path.slice(0, -3)));
36
+ const rewrites = [];
37
+ let cursor = 0;
38
+ let reconciled = '';
39
+ for (const match of source.matchAll(IMPORT_SPECIFIER)) {
40
+ const specifier = match[2] ?? match[4] ?? match[6];
41
+ if (specifier === undefined || match.index === undefined)
42
+ continue;
43
+ if (!specifier.startsWith('./') && !specifier.startsWith('../'))
44
+ continue;
45
+ if (!specifier.endsWith('.js') && !specifier.endsWith('.ts'))
46
+ continue;
47
+ const stem = specifier.slice(0, -3);
48
+ if (!objectStems.has(resolve(dir, stem)))
49
+ continue;
50
+ const jsSpecifier = `${stem}.js`;
51
+ const tsSpecifier = `${stem}.ts`;
52
+ const jsPath = resolve(dir, jsSpecifier);
53
+ const tsPath = resolve(dir, tsSpecifier);
54
+ const preferred = jsPath !== emittedPath && isRegularFile(jsPath)
55
+ ? jsSpecifier
56
+ : tsPath !== emittedPath && isRegularFile(tsPath)
57
+ ? tsSpecifier
58
+ : specifier;
59
+ if (preferred === specifier)
60
+ continue;
61
+ const specifierIndex = match[0].indexOf(specifier);
62
+ const start = match.index + specifierIndex;
63
+ reconciled += source.slice(cursor, start) + preferred;
64
+ cursor = start + specifier.length;
65
+ rewrites.push({ from: specifier, to: preferred });
66
+ }
67
+ if (rewrites.length > 0) {
68
+ reconciled += source.slice(cursor);
69
+ await writeFile(modulePath, reconciled, 'utf8');
70
+ }
71
+ return rewrites;
72
+ }
17
73
  /**
18
74
  * The relative import specifiers of a `.ts`/`.js` module that do not resolve
19
75
  * to an existing file from the module's own directory, in source order.
@@ -1 +1 @@
1
- {"version":3,"file":"emitted-imports.js","sourceRoot":"","sources":["../src/emitted-imports.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,0EAA0E;AAE1E;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,gBAAgB,GACpB,oGAAoG,CAAC;AAEvG;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,UAAkB;IAElB,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAClD,MAAM,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAChC,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACtD,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;QACnD,IAAI,SAAS,KAAK,SAAS;YAAE,SAAS;QACtC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC;YAAE,SAAS;QAC1E,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;YAAE,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
1
+ {"version":3,"file":"emitted-imports.js","sourceRoot":"","sources":["../src/emitted-imports.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AAC,SAAS,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -14,9 +14,11 @@ export interface EmitEntryModuleOptions {
14
14
  /** Emits the entry module and returns its path. */
15
15
  export declare function emitEntryModule(opts: EmitEntryModuleOptions): Promise<string>;
16
16
  /**
17
- * The gears `Players:` declaration, verbatim in source order (SELFHOST-15).
18
- * Alias declarations (`` `A` = `B` | `C` ``) are launcher options, not
19
- * required roles, and are excluded.
17
+ * The gears role declaration, verbatim in source order (self-hosting-15).
18
+ * Playbook 10 renames the section `Players:` to `Roles:` and removes aliasing;
19
+ * both headings are read so schema-1 and schema-3 sources emit the same way.
20
+ * A schema-1 alias declaration (`` `A` = `B` | `C` ``) is a launcher option,
21
+ * not a required role, and is excluded.
20
22
  */
21
23
  export declare function declaredPlayers(gears: string): string[];
22
24
  //# sourceMappingURL=entry-module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"entry-module.d.ts","sourceRoot":"","sources":["../src/entry-module.ts"],"names":[],"mappings":"AAwBA,2CAA2C;AAC3C,MAAM,WAAW,sBAAsB;IACrC,wEAAwE;IACxE,GAAG,EAAE,MAAM,CAAC;IACZ,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,QAAQ,EAAE,MAAM,CAAC;IACjB,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,mDAAmD;AACnD,wBAAsB,eAAe,CACnC,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAiCjB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAsBvD"}
1
+ {"version":3,"file":"entry-module.d.ts","sourceRoot":"","sources":["../src/entry-module.ts"],"names":[],"mappings":"AAwBA,2CAA2C;AAC3C,MAAM,WAAW,sBAAsB;IACrC,wEAAwE;IACxE,GAAG,EAAE,MAAM,CAAC;IACZ,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,QAAQ,EAAE,MAAM,CAAC;IACjB,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,mDAAmD;AACnD,wBAAsB,eAAe,CACnC,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAwCjB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAwBvD"}
@@ -1,7 +1,7 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  // SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai>
3
3
  /**
4
- * Deterministic entry-module emission (DR-014, DR-017, SELFHOST-15).
4
+ * Deterministic entry-module emission (DR-014, DR-017, self-hosting-15).
5
5
  *
6
6
  * After a successful full-link of the `playbook` pipeline, {@link
7
7
  * emitEntryModule} writes `<cwd>/<basename>.ts`: an erasable-TypeScript module
@@ -13,11 +13,11 @@
13
13
  * factory behind the DR-017 role-binding boundary, which maps the linked
14
14
  * runtime's lowercased player ids back to the declared role ids at the
15
15
  * session's `callPlayer` port. `playbook run ./<basename>.ts "<task>"`
16
- * consumes it unchanged (SELFHOST-14). See specs/dev/self-hosting.md.
16
+ * consumes it unchanged (self-hosting-14). See specs/packages/self-hosting.md.
17
17
  */
18
18
  import { readFile, writeFile } from 'node:fs/promises';
19
19
  import { join } from 'node:path';
20
- import { parseGearsItems } from './verify.js';
20
+ import { inspectGearsRoleContract, parseGearsItems } from './verify.js';
21
21
  /** Emits the entry module and returns its path. */
22
22
  export async function emitEntryModule(opts) {
23
23
  const gears = await readFile(opts.gearsPath, 'utf8');
@@ -35,6 +35,11 @@ export async function emitEntryModule(opts) {
35
35
  }
36
36
  const hasScript = parseGearsItems(gears).some((item) => item.actor === 'script');
37
37
  const intent = deriveIntent(text) ?? opts.basename;
38
+ // A `Roles:` source compiles to a schema-3 artifact whose linked factory
39
+ // takes configured options plus live host capabilities; a `Players:` source
40
+ // keeps the schema-1 entry contract (DR-024).
41
+ const roleContract = inspectGearsRoleContract(gears);
42
+ const schema3 = roleContract.generation === 'schema-3';
38
43
  const path = join(opts.cwd, `${opts.basename}.ts`);
39
44
  await writeFile(path, renderEntryModule({
40
45
  basename: opts.basename,
@@ -42,21 +47,25 @@ export async function emitEntryModule(opts) {
42
47
  players,
43
48
  hasScript,
44
49
  intent,
50
+ schema3,
51
+ concurrentRoleSets: schema3 ? roleContract.concurrentRoleSets : [],
45
52
  }), 'utf8');
46
53
  return path;
47
54
  }
48
55
  /**
49
- * The gears `Players:` declaration, verbatim in source order (SELFHOST-15).
50
- * Alias declarations (`` `A` = `B` | `C` ``) are launcher options, not
51
- * required roles, and are excluded.
56
+ * The gears role declaration, verbatim in source order (self-hosting-15).
57
+ * Playbook 10 renames the section `Players:` to `Roles:` and removes aliasing;
58
+ * both headings are read so schema-1 and schema-3 sources emit the same way.
59
+ * A schema-1 alias declaration (`` `A` = `B` | `C` ``) is a launcher option,
60
+ * not a required role, and is excluded.
52
61
  */
53
62
  export function declaredPlayers(gears) {
54
63
  const players = [];
55
64
  let inBlock = false;
56
65
  for (const line of gears.split('\n')) {
57
- // Gears render the declaration either as a `Players:` line or as a
58
- // markdown `Players` heading; both carry the same source declaration.
59
- if (/^(?:#{1,6}\s+Players|Players:)\s*$/.test(line.trim())) {
66
+ // Gears render the declaration either as a `Players:`/`Roles:` line or as
67
+ // the matching markdown heading; all carry the same source declaration.
68
+ if (/^(?:#{1,6}\s+(?:Players|Roles)|(?:Players|Roles):)\s*$/.test(line.trim())) {
60
69
  inBlock = true;
61
70
  continue;
62
71
  }
@@ -109,6 +118,24 @@ function renderEntryModule(spec) {
109
118
  const cwdWiring = spec.hasScript
110
119
  ? `{\n ...validated,\n cwd: validated.cwd ?? process.cwd(),\n }`
111
120
  : `validated`;
121
+ // A schema-3 linked factory takes exactly `configuredOptions` and live
122
+ // `hostCapabilities`; a schema-1 factory keeps its single options argument
123
+ // under its own historical dependency closure (DR-024).
124
+ // Both aliases come from the artifact's own factory signature, so the entry
125
+ // imports no host-owned type: a schema-3 input carries `configuredOptions`
126
+ // and `hostCapabilities`, a schema-1 input is the options object itself.
127
+ const runtimeOptionsAlias = spec.schema3
128
+ ? `type RuntimeOptions = FactoryInput['configuredOptions'];\ntype HostCapabilities = FactoryInput['hostCapabilities'];`
129
+ : `type RuntimeOptions = FactoryInput;`;
130
+ const schema3Param = spec.schema3
131
+ ? `,\n hostCapabilities: HostCapabilities`
132
+ : '';
133
+ const factoryArgument = spec.schema3
134
+ ? `{\n configuredOptions: ${cwdWiring},\n hostCapabilities,\n }`
135
+ : cwdWiring;
136
+ const schemaMembers = spec.schema3
137
+ ? `\n artifactSchema: 3,\n runtimeProfile: 'composed-v3',\n concurrentRoleSets: ${JSON.stringify(spec.concurrentRoleSets)} as readonly (readonly string[])[],`
138
+ : '';
112
139
  return `// SPDX-License-Identifier: Apache-2.0
113
140
  // SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai>
114
141
  //
@@ -119,7 +146,8 @@ function renderEntryModule(spec) {
119
146
 
120
147
  import createPlaybookRuntime from './${spec.bundleLeaf}/${spec.basename}.playbook.ts';
121
148
 
122
- type RuntimeOptions = NonNullable<Parameters<typeof createPlaybookRuntime>[0]>;
149
+ type FactoryInput = NonNullable<Parameters<typeof createPlaybookRuntime>[0]>;
150
+ ${runtimeOptionsAlias}
123
151
 
124
152
  const ALLOWED_OPTION_KEYS: readonly string[] = ${allowed};
125
153
 
@@ -194,12 +222,12 @@ function validateOptions(value: unknown): RuntimeOptions {
194
222
  const entry = {
195
223
  id: ${sourceString(spec.basename)},
196
224
  command: ${sourceString(spec.basename)},
197
- intent: ${sourceString(spec.intent)},
225
+ intent: ${sourceString(spec.intent)},${schemaMembers}
198
226
  requiredRoleIds: [...REQUIRED_ROLE_IDS],
199
227
  validateOptions,
200
- createRuntime(options: { captainOptions?: unknown }) {
228
+ createRuntime(options: { captainOptions?: unknown }${schema3Param}) {
201
229
  const validated = validateOptions(options.captainOptions);
202
- return withRoleBinding(createPlaybookRuntime(${cwdWiring}));
230
+ return withRoleBinding(createPlaybookRuntime(${factoryArgument}));
203
231
  },
204
232
  };
205
233
 
@@ -1 +1 @@
1
- {"version":3,"file":"entry-module.js","sourceRoot":"","sources":["../src/entry-module.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,0EAA0E;AAE1E;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAgB9C,mDAAmD;AACnD,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,IAA4B;IAE5B,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACrD,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IACvC,0EAA0E;IAC1E,wEAAwE;IACxE,MAAM,SAAS,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC5C,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;QACrD,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,MAAM,EAAE,CAAC;YAClD,MAAM,IAAI,KAAK,CACb,4CAA4C,QAAQ,UAAU,MAAM,8BAA8B,CACnG,CAAC;QACJ,CAAC;QACD,SAAS,CAAC,GAAG,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qEjF,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC;aACtB,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC5B,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,aAAa;;;uDAGC,YAAY;;mDAEhB,eAAe;;;;;CAKjE,CAAC;AACF,CAAC;AAED,SAAS,YAAY,CAAC,KAAa;IACjC,0EAA0E;IAC1E,kDAAkD;IAClD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;SAC/B,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC;SAC7B,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACjC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC1E,OAAO,IAAI,KAAK,GAAG,CAAC;AACtB,CAAC"}
@@ -1,10 +1,10 @@
1
- /** An opaque link option pair (PIPE-14), structurally compatible with the CLI's LinkOption. */
1
+ /** An opaque link option pair (pipeline-14), structurally compatible with the CLI's LinkOption. */
2
2
  export interface LinkOptionPair {
3
3
  name: string;
4
4
  value: string;
5
5
  }
6
6
  /**
7
- * Host-supplied update-mode context for a compile step (DR-021, INCR-15).
7
+ * Host-supplied update-mode context for a compile step (DR-021, incremental-compilation-15).
8
8
  *
9
9
  * The existing target file is the previously accepted output; the executor is
10
10
  * asked to update it rather than regenerate from scratch. Purely an
@@ -22,13 +22,13 @@ export interface UpdateContext {
22
22
  }
23
23
  /**
24
24
  * Renders the host-owned update instruction shared by interpreted prompts and
25
- * compiled performing prompts (INCR-16).
25
+ * compiled performing prompts (incremental-compilation-16).
26
26
  */
27
27
  export declare function updateContextLines(update: UpdateContext, target: string): string[];
28
28
  /** What a phase execution is asked to produce: a compile target or a linked artifact. */
29
29
  export type ExecuteRequest = {
30
30
  kind: 'compile';
31
- /** Path to the phase definition, the semantic source of truth (PHEXEC-2). */
31
+ /** Path to the phase definition, the semantic source of truth (phase-execution-2). */
32
32
  definitionPath: string;
33
33
  source: string;
34
34
  target: string;
@@ -38,11 +38,11 @@ export type ExecuteRequest = {
38
38
  * rewrites the source toward (DR-013). Protected like definitions.
39
39
  */
40
40
  references?: readonly string[];
41
- /** Update-mode context; absent for a fresh compile (DR-021, INCR-15). */
41
+ /** Update-mode context; absent for a fresh compile (DR-021, incremental-compilation-15). */
42
42
  update?: UpdateContext;
43
43
  } | {
44
44
  kind: 'link';
45
- /** Path to the `link.md` definition, the semantic source of truth (PHEXEC-2). */
45
+ /** Path to the `link.md` definition, the semantic source of truth (phase-execution-2). */
46
46
  definitionPath: string;
47
47
  objects: string[];
48
48
  linkTarget: string;
@@ -60,7 +60,7 @@ export interface ExecutorResult {
60
60
  export interface PhaseExecutor {
61
61
  run(request: ExecuteRequest, signal: AbortSignal): Promise<ExecutorResult>;
62
62
  }
63
- /** A failure naming the phase, target path, and reasons (PHEXEC-9). */
63
+ /** A failure naming the phase, target path, and reasons (phase-execution-9). */
64
64
  export interface FailureReport {
65
65
  phase: string;
66
66
  target: string;
@@ -89,7 +89,7 @@ export declare function assertSafeTarget(target: string, protectedPaths: readonl
89
89
  export declare function pathsAlias(left: string, right: string): Promise<boolean>;
90
90
  /**
91
91
  * Runs a single phase through the execution boundary: generic mechanics only,
92
- * plus the DR-003 generic checks and blocked protocol (PHEXEC-1, PHEXEC-4..9).
92
+ * plus the DR-003 generic checks and blocked protocol (phase-execution-1, phase-execution-4..9).
93
93
  */
94
94
  export declare function runPhase(opts: {
95
95
  request: ExecuteRequest;
@@ -104,10 +104,10 @@ export declare function runPhase(opts: {
104
104
  aliasInputs?: readonly string[];
105
105
  /** Host state transition that must succeed immediately before executor work. */
106
106
  beforeExecute?: () => void | Promise<void>;
107
- /** Re-checks that the pipeline chain still infers; throws when it no longer does (PHEXEC-5). */
107
+ /** Re-checks that the pipeline chain still infers; throws when it no longer does (phase-execution-5). */
108
108
  revalidate?: () => void | Promise<void>;
109
109
  signal?: AbortSignal;
110
110
  }): Promise<PhaseResult>;
111
- /** Renders a failure report as a multi-line diagnostic string (PHEXEC-9). */
111
+ /** Renders a failure report as a multi-line diagnostic string (phase-execution-9). */
112
112
  export declare function formatFailureReport(report: FailureReport): string;
113
113
  //# sourceMappingURL=execution.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../src/execution.ts"],"names":[],"mappings":"AA+CA,+FAA+F;AAC/F,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,2EAA2E;IAC3E,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,MAAM,GACb,MAAM,EAAE,CAwBV;AAED,yFAAyF;AACzF,MAAM,MAAM,cAAc,GACtB;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,6EAA6E;IAC7E,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,yEAAyE;IACzE,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEN,2DAA2D;AA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B,UAAU,CAC9B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,OAAO,CAAC,CAWlB;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE;IACnC,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,aAAa,CAAC;IACxB,0FAA0F;IAC1F,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,sFAAsF;IACtF,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,wFAAwF;IACxF,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,gFAAgF;IAChF,aAAa,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,yGAAyG;IACzG,UAAU,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,GAAG,OAAO,CAAC,WAAW,CAAC,CA4FvB;AAED,sFAAsF;AACtF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAMjE"}
package/dist/execution.js CHANGED
@@ -3,22 +3,22 @@
3
3
  /**
4
4
  * Execution boundary orchestrator and generic checks (DR-003).
5
5
  *
6
- * `runPhase` performs only generic mechanics (PHEXEC-1): it snapshots the
7
- * protected inputs, runs an injected {@link PhaseExecutor} (interpreted in
8
- * IR-001 Task 9, compiled later), then applies the generic checks — the target
9
- * exists and its extension matches the declared one (PHEXEC-4); the source,
6
+ * `runPhase` performs only generic mechanics (phase-execution-1): it snapshots the
7
+ * protected inputs, runs an injected {@link PhaseExecutor} (interpreted or
8
+ * compiled), then applies the generic checks — the target
9
+ * exists and its extension matches the declared one (phase-execution-4); the source,
10
10
  * objects, link target, and the chain's definition files are unchanged; and an
11
11
  * optional `revalidate` hook confirms the pipeline chain still infers, catching
12
- * added/removed phase files (PHEXEC-5). Input-mutating write-scope violations
13
- * are caught after any executor outcome (PHEXEC-3, PHEXEC-6). A `blocked` or
12
+ * added/removed phase files (phase-execution-5). Input-mutating write-scope violations
13
+ * are caught after any executor outcome (phase-execution-3, phase-execution-6). A `blocked` or
14
14
  * `error` result, a thrown executor, or any failed check becomes a failure
15
- * report naming the phase, target, and reasons (PHEXEC-7, PHEXEC-9).
15
+ * report naming the phase, target, and reasons (phase-execution-7, phase-execution-9).
16
16
  *
17
- * The executor honors PHEXEC-2 by treating the passed definition as the
17
+ * The executor honors phase-execution-2 by treating the passed definition as the
18
18
  * semantic source of truth. The host refuses target/input aliases and verifies
19
19
  * protected inputs afterward; sandboxing arbitrary unrelated writes remains a
20
20
  * host capability outside this boundary.
21
- * See specs/dev/phase-execution.md.
21
+ * See specs/packages/phase-execution.md.
22
22
  */
23
23
  import { createHash } from 'node:crypto';
24
24
  import { lstat, readFile, readdir, readlink, realpath, stat, } from 'node:fs/promises';
@@ -26,7 +26,7 @@ import { basename, dirname, extname, isAbsolute, join, relative, resolve, sep, }
26
26
  import { errorCode, isAbsentPathError, messageOf } from './errors.js';
27
27
  /**
28
28
  * Renders the host-owned update instruction shared by interpreted prompts and
29
- * compiled performing prompts (INCR-16).
29
+ * compiled performing prompts (incremental-compilation-16).
30
30
  */
31
31
  export function updateContextLines(update, target) {
32
32
  const diff = update.diff === null
@@ -77,7 +77,7 @@ export async function pathsAlias(left, right) {
77
77
  }
78
78
  /**
79
79
  * Runs a single phase through the execution boundary: generic mechanics only,
80
- * plus the DR-003 generic checks and blocked protocol (PHEXEC-1, PHEXEC-4..9).
80
+ * plus the DR-003 generic checks and blocked protocol (phase-execution-1, phase-execution-4..9).
81
81
  */
82
82
  export async function runPhase(opts) {
83
83
  const { request, phase, targetExt, executor } = opts;
@@ -145,7 +145,7 @@ export async function runPhase(opts) {
145
145
  }
146
146
  // Protected inputs and chain definitions are re-checked after any outcome, so
147
147
  // a mutation is caught even when the executor blocks, errors, or throws
148
- // (PHEXEC-5, PHEXEC-6).
148
+ // (phase-execution-5, phase-execution-6).
149
149
  const after = await snapshot(protectedPaths);
150
150
  for (const path of protectedPaths) {
151
151
  if (before.get(path) !== after.get(path)) {
@@ -165,7 +165,7 @@ export async function runPhase(opts) {
165
165
  }
166
166
  return { ok: true, target, diagnostics: result?.diagnostics ?? [] };
167
167
  }
168
- /** Renders a failure report as a multi-line diagnostic string (PHEXEC-9). */
168
+ /** Renders a failure report as a multi-line diagnostic string (phase-execution-9). */
169
169
  export function formatFailureReport(report) {
170
170
  const lines = [`slc: phase "${report.phase}" failed at "${report.target}"`];
171
171
  for (const reason of report.reasons) {