@sublang/slc 0.6.0 → 0.8.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 (79) hide show
  1. package/README.md +7 -2
  2. package/dist/app.d.ts.map +1 -1
  3. package/dist/app.js +15 -2
  4. package/dist/app.js.map +1 -1
  5. package/dist/cligent-agent.d.ts +8 -1
  6. package/dist/cligent-agent.d.ts.map +1 -1
  7. package/dist/cligent-agent.js +45 -4
  8. package/dist/cligent-agent.js.map +1 -1
  9. package/dist/compiled-execution.d.ts +44 -0
  10. package/dist/compiled-execution.d.ts.map +1 -0
  11. package/dist/compiled-execution.js +184 -0
  12. package/dist/compiled-execution.js.map +1 -0
  13. package/dist/compiled-executor.d.ts +9 -7
  14. package/dist/compiled-executor.d.ts.map +1 -1
  15. package/dist/compiled-executor.js +143 -44
  16. package/dist/compiled-executor.js.map +1 -1
  17. package/dist/config-file.d.ts +3 -0
  18. package/dist/config-file.d.ts.map +1 -1
  19. package/dist/config-file.js +22 -4
  20. package/dist/config-file.js.map +1 -1
  21. package/dist/config.d.ts +66 -15
  22. package/dist/config.d.ts.map +1 -1
  23. package/dist/config.js +115 -49
  24. package/dist/config.js.map +1 -1
  25. package/dist/entry-module.d.ts +0 -8
  26. package/dist/entry-module.d.ts.map +1 -1
  27. package/dist/entry-module.js +75 -77
  28. package/dist/entry-module.js.map +1 -1
  29. package/dist/execution.d.ts +19 -0
  30. package/dist/execution.d.ts.map +1 -1
  31. package/dist/execution.js.map +1 -1
  32. package/dist/interpreter.d.ts +18 -2
  33. package/dist/interpreter.d.ts.map +1 -1
  34. package/dist/interpreter.js +6 -0
  35. package/dist/interpreter.js.map +1 -1
  36. package/dist/link.d.ts +7 -0
  37. package/dist/link.d.ts.map +1 -1
  38. package/dist/link.js +4 -2
  39. package/dist/link.js.map +1 -1
  40. package/dist/phase-runner.d.ts +9 -2
  41. package/dist/phase-runner.d.ts.map +1 -1
  42. package/dist/phase-runner.js +3 -1
  43. package/dist/phase-runner.js.map +1 -1
  44. package/dist/pin-generate.d.ts.map +1 -1
  45. package/dist/pin-generate.js +10 -2
  46. package/dist/pin-generate.js.map +1 -1
  47. package/dist/playbook-contract.d.ts +18 -22
  48. package/dist/playbook-contract.d.ts.map +1 -1
  49. package/dist/playbook-contract.js.map +1 -1
  50. package/dist/playbook-ports.d.ts +11 -1
  51. package/dist/playbook-ports.d.ts.map +1 -1
  52. package/dist/playbook-ports.js +8 -1
  53. package/dist/playbook-ports.js.map +1 -1
  54. package/dist/reviewing-agent.d.ts +9 -2
  55. package/dist/reviewing-agent.d.ts.map +1 -1
  56. package/dist/reviewing-agent.js +232 -38
  57. package/dist/reviewing-agent.js.map +1 -1
  58. package/dist/runner.d.ts +1 -1
  59. package/dist/runner.d.ts.map +1 -1
  60. package/dist/runner.js +200 -39
  61. package/dist/runner.js.map +1 -1
  62. package/dist/runtime-contract.d.ts +17 -0
  63. package/dist/runtime-contract.d.ts.map +1 -0
  64. package/dist/runtime-contract.js +114 -0
  65. package/dist/runtime-contract.js.map +1 -0
  66. package/dist/slc.config.template.yaml +7 -2
  67. package/dist/verify-source.d.ts +61 -0
  68. package/dist/verify-source.d.ts.map +1 -0
  69. package/dist/verify-source.js +280 -0
  70. package/dist/verify-source.js.map +1 -0
  71. package/dist/verify.d.ts +70 -3
  72. package/dist/verify.d.ts.map +1 -1
  73. package/dist/verify.js +375 -86
  74. package/dist/verify.js.map +1 -1
  75. package/package.json +3 -3
  76. package/dist/host-capabilities.d.ts +0 -115
  77. package/dist/host-capabilities.d.ts.map +0 -1
  78. package/dist/host-capabilities.js +0 -507
  79. package/dist/host-capabilities.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAIvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAg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GAYG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,sBAAsB,CAAC,CA6BjC"}
package/dist/config.js CHANGED
@@ -20,11 +20,13 @@ import { ClaudeCodeAdapter } from '@sublang/cligent/adapters/claude-code';
20
20
  import { CodexAdapter } from '@sublang/cligent/adapters/codex';
21
21
  import { GeminiAdapter } from '@sublang/cligent/adapters/gemini';
22
22
  import { OpenCodeAdapter } from '@sublang/cligent/adapters/opencode';
23
- import { isEffortSupported, supportedEffortValues } from '@sublang/cligent';
23
+ import { assertFastModeSupported, isEffortSupported, supportedEffortValues, } from '@sublang/cligent';
24
24
  import { createCligentAgent } from './cligent-agent.js';
25
25
  import { createCompiledExecutor } from './compiled-executor.js';
26
+ import { messageOf } from './errors.js';
26
27
  import { createInterpretedExecutor } from './interpreter.js';
27
28
  import { createReviewingAgent } from './reviewing-agent.js';
29
+ import { declaresComposedV3, describeRuntimeDeclaration, PLAYBOOK_PACKAGE, readPlaybookRuntimeDeclaration, } from './runtime-contract.js';
28
30
  /** Agent CLI ids the executable registers (cli-7). */
29
31
  export const SUPPORTED_AGENTS = [
30
32
  'claude-code',
@@ -61,23 +63,31 @@ export function isSupportedAgent(agent) {
61
63
  /**
62
64
  * Resolves the Coder and optional Reviewer selections from environment configuration
63
65
  * (cli-7, cli-12): `SLC_AGENT` names a registered agent CLI, `SLC_MODEL`
64
- * optionally names a model, and `SLC_EFFORT` optionally selects an
66
+ * optionally names a model, `SLC_EFFORT` optionally selects an
65
67
  * adapter-scoped reasoning effort validated against Cligent's support
66
- * metadata.
68
+ * metadata, and `SLC_FAST_MODE` — exactly `true` or `false` — optionally
69
+ * requests adapter-scoped fast mode, accepted or refused by Cligent's
70
+ * fast-mode capability contract before any agent call.
67
71
  *
68
72
  * @throws {ConfigError} when `SLC_AGENT` is unset/blank (`agent-unset`) or
69
- * outside the registered set (`agent-unsupported`), or when `SLC_EFFORT`
73
+ * outside the registered set (`agent-unsupported`), when `SLC_EFFORT`
70
74
  * names a value the selected agent does not support
71
- * (`effort-unsupported`); no implicit default agent is applied.
75
+ * (`effort-unsupported`), when `SLC_FAST_MODE` is neither `true` nor
76
+ * `false` (`fast-mode-invalid`), or when it is set for an agent Cligent
77
+ * reports without fast-mode request support (`fast-mode-unsupported`); no
78
+ * implicit default agent is applied.
72
79
  */
73
80
  export function resolveAgentSelection(env) {
74
81
  const selection = resolveOneSelection(env, {
75
82
  agent: 'SLC_AGENT',
76
83
  model: 'SLC_MODEL',
77
84
  effort: 'SLC_EFFORT',
85
+ fastMode: 'SLC_FAST_MODE',
78
86
  unsetCode: 'agent-unset',
79
87
  unsupportedCode: 'agent-unsupported',
80
88
  effortCode: 'effort-unsupported',
89
+ fastModeInvalidCode: 'fast-mode-invalid',
90
+ fastModeCode: 'fast-mode-unsupported',
81
91
  required: true,
82
92
  });
83
93
  if (selection === undefined) {
@@ -87,9 +97,12 @@ export function resolveAgentSelection(env) {
87
97
  agent: 'SLC_REVIEWER_AGENT',
88
98
  model: 'SLC_REVIEWER_MODEL',
89
99
  effort: 'SLC_REVIEWER_EFFORT',
100
+ fastMode: 'SLC_REVIEWER_FAST_MODE',
90
101
  unsetCode: 'reviewer-agent-unset',
91
102
  unsupportedCode: 'reviewer-agent-unsupported',
92
103
  effortCode: 'reviewer-effort-unsupported',
104
+ fastModeInvalidCode: 'reviewer-fast-mode-invalid',
105
+ fastModeCode: 'reviewer-fast-mode-unsupported',
93
106
  required: false,
94
107
  });
95
108
  return reviewer === undefined ? selection : { ...selection, reviewer };
@@ -98,12 +111,14 @@ function resolveOneSelection(env, names) {
98
111
  const agent = (env[names.agent] ?? '').trim();
99
112
  const model = (env[names.model] ?? '').trim();
100
113
  const effort = (env[names.effort] ?? '').trim();
114
+ const fastMode = (env[names.fastMode] ?? '').trim();
101
115
  if (agent === '') {
102
- if (!names.required && model === '' && effort === '')
116
+ if (!names.required && model === '' && effort === '' && fastMode === '') {
103
117
  return undefined;
118
+ }
104
119
  throw new ConfigError(names.unsetCode, names.required
105
120
  ? `${names.agent} is not set; set it to one of: ${SUPPORTED_AGENTS.join(', ')}`
106
- : `${names.agent} is not set; ${names.model} and ${names.effort} require a reviewer agent; set ${names.agent} to one of: ${SUPPORTED_AGENTS.join(', ')}`);
121
+ : `${names.agent} is not set; ${names.model}, ${names.effort}, and ${names.fastMode} require a reviewer agent; set ${names.agent} to one of: ${SUPPORTED_AGENTS.join(', ')}`);
107
122
  }
108
123
  if (!isSupportedAgent(agent)) {
109
124
  throw new ConfigError(names.unsupportedCode, `${names.agent} "${agent}" is not a supported agent CLI; choose one of: ${SUPPORTED_AGENTS.join(', ')}`);
@@ -111,10 +126,24 @@ function resolveOneSelection(env, names) {
111
126
  if (effort !== '' && !isEffortSupported(agent, effort)) {
112
127
  throw new ConfigError(names.effortCode, `${names.effort} "${effort}" is not supported by ${agent}; choose one of: ${(supportedEffortValues(agent) ?? []).join(', ')}`);
113
128
  }
129
+ if (fastMode !== '' && fastMode !== 'true' && fastMode !== 'false') {
130
+ throw new ConfigError(names.fastModeInvalidCode, `${names.fastMode} "${fastMode}" must be exactly true or false`);
131
+ }
132
+ if (fastMode !== '') {
133
+ // Cligent owns adapter capability: a literal request — `false` included —
134
+ // is accepted or refused by its contract, naming the adapter (cli-7).
135
+ try {
136
+ assertFastModeSupported(agent, names.fastMode);
137
+ }
138
+ catch (error) {
139
+ throw new ConfigError(names.fastModeCode, messageOf(error));
140
+ }
141
+ }
114
142
  return {
115
143
  agent,
116
144
  model: model === '' ? undefined : model,
117
145
  effort: effort === '' ? undefined : effort,
146
+ fastMode: fastMode === '' ? undefined : fastMode === 'true',
118
147
  };
119
148
  }
120
149
  /**
@@ -146,35 +175,42 @@ export function createConfiguredAgentClient(selection, opts = {}) {
146
175
  maxTurns: opts.maxTurns,
147
176
  permissions: opts.permissions,
148
177
  effort: selection.effort,
178
+ fastMode: selection.fastMode,
149
179
  stallTimeoutMs: opts.stallTimeoutMs,
150
180
  });
151
181
  }
152
182
  /**
153
183
  * Builds the compiled-execution factory the bin injects as `SlcDeps.compiled`
154
- * (cli-8, phase-execution-27): for a current pinned phase it drives the pinned `playbook`
155
- * artifact — resolved against its pipeline directory — through the compiled
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; 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).
184
+ * (cli-8, phase-execution-27): for a current pinned phase it selects the
185
+ * runtime contract profile ({@link runtimeContractForPin}) and drives the
186
+ * pinned `playbook` artifact — resolved against its pipeline directory —
187
+ * through the compiled executor, backing the runtime's player ports with one
188
+ * agent transport per player id and its Captain/judge ports with one shared
189
+ * transport; the roleless composed-v3 path rejects its player port before that
190
+ * lazy player transport is constructed (phase-execution-25). The factory
191
+ * applies the selected model as the default per-player model
192
+ * (phase-execution-13). A rejected selection rejects the returned promise
193
+ * before any artifact loads or transport is built (phase-execution-30).
161
194
  */
162
195
  export function createConfiguredCompiledFactory(selection, opts = {}) {
163
196
  const client = () => {
164
197
  const coder = createConfiguredAgentClient(selection, opts);
165
198
  return configuredReviewingClient(selection, coder, opts);
166
199
  };
167
- return (choice) => createCompiledExecutor({
168
- artifactPath: resolve(choice.pipelineDir, choice.record.artifact.path),
169
- runRoot: opts.cwd ?? process.cwd(),
170
- playbookId: choice.phase,
171
- runtimeContract: runtimeContractForPin(choice),
172
- player: () => client(),
173
- judge: client(),
174
- defaultModel: selection.model,
175
- cwd: opts.cwd,
176
- onStatus: opts.onStatus,
177
- });
200
+ return async (choice) => {
201
+ const runtimeContract = await runtimeContractForPin(choice);
202
+ return createCompiledExecutor({
203
+ artifactPath: resolve(choice.pipelineDir, choice.record.artifact.path),
204
+ runRoot: opts.cwd ?? process.cwd(),
205
+ playbookId: choice.phase,
206
+ runtimeContract,
207
+ player: () => client(),
208
+ judge: client(),
209
+ defaultModel: selection.model,
210
+ cwd: opts.cwd,
211
+ onStatus: opts.onStatus,
212
+ });
213
+ };
178
214
  }
179
215
  function configuredReviewingClient(selection, coder, opts) {
180
216
  const reviewer = selection.reviewer;
@@ -195,30 +231,26 @@ function configuredReviewingClient(selection, coder, opts) {
195
231
  reviewerModel: reviewer.model,
196
232
  });
197
233
  }
198
- function runtimeContractForPin(choice) {
199
- const provenance = choice.record.linkTarget.provenance;
234
+ /**
235
+ * The exact historical provenance maps, retained as recorded (DR-028):
236
+ * absent or Playbook 0.9.0 provenance is the `legacy` contract, and the
237
+ * reviewed six-port generation is `composed-v2`. Every other provenance is
238
+ * decided by the installed engine's declaration instead.
239
+ *
240
+ * Playbook 0.10 ships the composed six-port contract (DR-011); 1.0.0 is the
241
+ * published release of that same generation — 0.10.0 was cut locally and
242
+ * superseded before it reached the registry. 2.0.0 keeps the six-port
243
+ * boundary and structured results while moving Captain host failures onto
244
+ * the resolved `failed` path and emitting thin linked modules (DR-017).
245
+ * 3.1.0 ships runtime.ts byte-identical to 2.0.0 and only adds the additive
246
+ * DR-022 compat self-report (DR-018), and 4.0.0 keeps runtime.ts and the
247
+ * engine byte-identical to 3.1.0's — its major marks the SDK-topology break,
248
+ * not a contract change (DR-020) — so all five select `composed-v2`.
249
+ */
250
+ export function historicalRuntimeContract(provenance) {
200
251
  if (provenance === undefined || provenance === '@sublang/playbook@0.9.0') {
201
252
  return 'legacy';
202
253
  }
203
- // Playbook 0.10 ships the composed six-port contract (DR-011); artifacts
204
- // linked against it run through the composed session profile. 1.0.0 is the
205
- // published release of that same contract generation — 0.10.0 was cut
206
- // locally and superseded before it ever reached the registry. 2.0.0 keeps
207
- // the six-port boundary and structured results while moving Captain host
208
- // failures onto the resolved `failed` path and emitting thin linked
209
- // modules (DR-017), so all three provenances select the composed profile.
210
- // 3.1.0 ships runtime.ts byte-identical to 2.0.0 and only adds the
211
- // additive DR-022 compat self-report on the shared engine, so it selects
212
- // the same profile (DR-018). 4.0.0 keeps runtime.ts and the engine
213
- // byte-identical to 3.1.0's — its major marks the SDK-topology break,
214
- // with cligent owning runtime versions, not a contract change — so it
215
- // selects the same profile (DR-020). 1.3.0 and 3.0.0 were never
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.
222
254
  if (provenance === '@sublang/playbook@0.10.0' ||
223
255
  provenance === '@sublang/playbook@1.0.0' ||
224
256
  provenance === '@sublang/playbook@2.0.0' ||
@@ -226,9 +258,43 @@ function runtimeContractForPin(choice) {
226
258
  provenance === '@sublang/playbook@4.0.0') {
227
259
  return 'composed-v2';
228
260
  }
229
- if (provenance === '@sublang/playbook@10.0.0') {
230
- return 'composed-v3';
261
+ return undefined;
262
+ }
263
+ /**
264
+ * Selects the runtime contract profile a current pin runs under
265
+ * (phase-execution-30; DR-010, DR-028). The historical exact maps decide
266
+ * `legacy` and `composed-v2`; every other provenance selects `composed-v3`
267
+ * exactly when the pin's link target resolves inside an installed
268
+ * `@sublang/playbook` whose engine declares `RUNTIME_ABI` `1` and
269
+ * `SUPPORTED_ARTIFACT_SCHEMAS` containing `3`, whatever its release version.
270
+ *
271
+ * @throws naming the declaration — or its absence — when the link target
272
+ * lies outside such a package, its engine cannot be read, or it declares
273
+ * another ABI or no schema 3; no profile is inferred from callable members
274
+ * and no other profile is retried.
275
+ */
276
+ export async function runtimeContractForPin(choice) {
277
+ const provenance = choice.record.linkTarget.provenance;
278
+ const historical = historicalRuntimeContract(provenance);
279
+ if (historical !== undefined)
280
+ return historical;
281
+ const locator = choice.record.linkTarget.locator;
282
+ const reject = (reason) => {
283
+ throw new Error(`unsupported pinned Playbook runtime contract: ${provenance} (${reason})`);
284
+ };
285
+ let declaration;
286
+ try {
287
+ declaration = await readPlaybookRuntimeDeclaration(resolve(choice.pipelineDir, locator));
288
+ }
289
+ catch (error) {
290
+ return reject(messageOf(error));
291
+ }
292
+ if (declaration === undefined) {
293
+ return reject(`link target ${locator} is not inside an installed ${PLAYBOOK_PACKAGE} package`);
294
+ }
295
+ if (!declaresComposedV3(declaration)) {
296
+ return reject(`${describeRuntimeDeclaration(declaration)}; composed-v3 requires RUNTIME_ABI 1 and artifact schema 3`);
231
297
  }
232
- throw new Error(`unsupported pinned Playbook runtime contract: ${provenance}`);
298
+ return 'composed-v3';
233
299
  }
234
300
  //# 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,CAAC;AAQX,mFAAmF;AACnF,MAAM,CAAC,MAAM,qBAAqB,GAAmB,CAAC,KAAK,EAAE,EAAE;IAC7D,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,a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S,CAAC;AACnB,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,MAAyB;IAEzB,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC;IACvD,MAAM,UAAU,GAAG,yBAAyB,CAAC,UAAU,CAAC,CAAC;IACzD,IAAI,UAAU,KAAK,SAAS;QAAE,OAAO,UAAU,CAAC;IAChD,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC;IACjD,MAAM,MAAM,GAAG,CAAC,MAAc,EAAS,EAAE;QACvC,MAAM,IAAI,KAAK,CACb,iDAAiD,UAAU,KAAK,MAAM,GAAG,CAC1E,CAAC;IACJ,CAAC,CAAC;IACF,IAAI,WAAW,CAAC;IAChB,IAAI,CAAC;QACH,WAAW,GAAG,MAAM,8BAA8B,CAChD,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CACrC,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAClC,CAAC;IACD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO,MAAM,CACX,eAAe,OAAO,+BAA+B,gBAAgB,UAAU,CAChF,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,CAAC;QACrC,OAAO,MAAM,CACX,GAAG,0BAA0B,CAAC,WAAW,CAAC,4DAA4D,CACvG,CAAC;IACJ,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC"}
@@ -13,12 +13,4 @@ export interface EmitEntryModuleOptions {
13
13
  }
14
14
  /** Emits the entry module and returns its path. */
15
15
  export declare function emitEntryModule(opts: EmitEntryModuleOptions): Promise<string>;
16
- /**
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.
22
- */
23
- export declare function declaredPlayers(gears: string): string[];
24
16
  //# 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,CAwCjB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAwBvD"}
1
+ {"version":3,"file":"entry-module.d.ts","sourceRoot":"","sources":["../src/entry-module.ts"],"names":[],"mappings":"AA6BA,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,CA4CjB"}
@@ -1,19 +1,24 @@
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, self-hosting-15).
4
+ * Deterministic entry-module emission (DR-014, DR-017, DR-024,
5
+ * self-hosting-15).
5
6
  *
6
7
  * After a successful full-link of the `playbook` pipeline, {@link
7
8
  * emitEntryModule} writes `<cwd>/<basename>.ts`: an erasable-TypeScript module
8
9
  * default-exporting a Playbook registry entry derived entirely from the
9
10
  * compiled bundle — `id`/`command` from the basename, `requiredRoleIds` from
10
- * the gears `Players:` declaration, `intent` from the normalized source's
11
- * title and lead line, an option allowlist carrying `cwd` exactly when the
12
- * source compiled a script item, and `createRuntime` wiring the linked default
13
- * factory behind the DR-017 role-binding boundary, which maps the linked
14
- * runtime's lowercased player ids back to the declared role ids at the
15
- * session's `callPlayer` port. `playbook run ./<basename>.ts "<task>"`
16
- * consumes it unchanged (self-hosting-14). See specs/packages/self-hosting.md.
11
+ * the gears `Roles:`/`Players:` declaration, `intent` from the normalized
12
+ * source's title and lead line, an option allowlist carrying `cwd` exactly
13
+ * when the source compiled a script item, and `createRuntime` wiring the
14
+ * linked default factory. A current `Roles:` source declares the canonical
15
+ * lowercase local role ids its compiled machine's delegated states name, so
16
+ * the host binds exactly those ids and the session's `callPlayer` port needs
17
+ * no translation (DR-024); a historical `Players:` source keeps its verbatim
18
+ * declared names behind the DR-017 role-binding boundary, which maps the
19
+ * linked runtime's lowercased player ids back to them. Its generation's host
20
+ * consumes the module unchanged (self-hosting-14). See
21
+ * specs/packages/self-hosting.md.
17
22
  */
18
23
  import { readFile, writeFile } from 'node:fs/promises';
19
24
  import { join } from 'node:path';
@@ -22,29 +27,33 @@ import { inspectGearsRoleContract, parseGearsItems } from './verify.js';
22
27
  export async function emitEntryModule(opts) {
23
28
  const gears = await readFile(opts.gearsPath, 'utf8');
24
29
  const text = await readFile(opts.textPath, 'utf8');
25
- const players = declaredPlayers(gears);
26
- // The role-binding boundary keys declared ids by their lowercased form; a
27
- // case-insensitive collision would make the binding ambiguous (DR-017).
28
- const byLowered = new Map();
29
- for (const player of players) {
30
- const existing = byLowered.get(player.toLowerCase());
31
- if (existing !== undefined && existing !== player) {
32
- throw new Error(`entry emission failed: declared players "${existing}" and "${player}" collide case-insensitively`);
30
+ // One derivation serves both generations: the declared names, verbatim in
31
+ // source order, and the canonical lowercase local role ids the compiled
32
+ // machine's delegated states carry. A `Roles:` source compiles to a schema-3
33
+ // artifact whose linked factory takes configured options plus live host
34
+ // capabilities; a `Players:` source keeps the schema-1 entry contract
35
+ // (DR-024).
36
+ const roleContract = inspectGearsRoleContract(gears);
37
+ const schema3 = roleContract.generation === 'schema-3';
38
+ // Two declared names differing only by case derive one canonical role id, so
39
+ // neither the schema-3 host binding nor the schema-1 role-binding boundary
40
+ // could tell them apart (DR-017, DR-024).
41
+ const byRoleId = new Map();
42
+ roleContract.names.forEach((name, index) => {
43
+ const roleId = roleContract.roleIds[index];
44
+ const existing = byRoleId.get(roleId);
45
+ if (existing !== undefined && existing !== name) {
46
+ throw new Error(`entry emission failed: declared players "${existing}" and "${name}" collide case-insensitively`);
33
47
  }
34
- byLowered.set(player.toLowerCase(), player);
35
- }
48
+ byRoleId.set(roleId, name);
49
+ });
36
50
  const hasScript = parseGearsItems(gears).some((item) => item.actor === 'script');
37
51
  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';
43
52
  const path = join(opts.cwd, `${opts.basename}.ts`);
44
53
  await writeFile(path, renderEntryModule({
45
54
  basename: opts.basename,
46
55
  bundleLeaf: `${opts.basename}.${opts.pipeline}`,
47
- players,
56
+ roleIds: schema3 ? roleContract.roleIds : roleContract.names,
48
57
  hasScript,
49
58
  intent,
50
59
  schema3,
@@ -52,40 +61,6 @@ export async function emitEntryModule(opts) {
52
61
  }), 'utf8');
53
62
  return path;
54
63
  }
55
- /**
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.
61
- */
62
- export function declaredPlayers(gears) {
63
- const players = [];
64
- let inBlock = false;
65
- for (const line of gears.split('\n')) {
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())) {
69
- inBlock = true;
70
- continue;
71
- }
72
- if (!inBlock)
73
- continue;
74
- const bullet = /^-\s+(.*)$/.exec(line.trim());
75
- if (bullet === null) {
76
- if (line.trim() === '')
77
- continue;
78
- break;
79
- }
80
- const declaration = bullet[1];
81
- if (declaration.includes('='))
82
- continue;
83
- const name = /^[`"“]?([^`"”]+?)[`"”]?\s*$/.exec(declaration.trim());
84
- if (name !== null && name[1].length > 0)
85
- players.push(name[1]);
86
- }
87
- return players;
88
- }
89
64
  /** Title and lead line of the normalized source, joined as the intent. */
90
65
  function deriveIntent(text) {
91
66
  let title;
@@ -133,26 +108,24 @@ function renderEntryModule(spec) {
133
108
  const factoryArgument = spec.schema3
134
109
  ? `{\n configuredOptions: ${cwdWiring},\n hostCapabilities,\n }`
135
110
  : cwdWiring;
111
+ // The manifest's `runtimeProfile` is the host's implementation declaration,
112
+ // not slc's internal contract marker: a shared-factory artifact declares
113
+ // `{ kind: 'shared-factory', compat }` whose `compat` is the very immutable
114
+ // record the linked factory captured from its validated `spec.compat` — the
115
+ // artifact's own `{ artifactSchema, runtimeAbi }` declaration — so the host
116
+ // reads the emitted module's compatibility rather than a marker string it
117
+ // cannot interpret (DR-024, DR-028).
136
118
  const schemaMembers = spec.schema3
137
- ? `\n artifactSchema: 3,\n runtimeProfile: 'composed-v3',\n concurrentRoleSets: ${JSON.stringify(spec.concurrentRoleSets)} as readonly (readonly string[])[],`
119
+ ? `\n artifactSchema: 3,\n runtimeProfile: Object.freeze({\n kind: 'shared-factory',\n compat: createPlaybookRuntime.compat,\n }),\n concurrentRoleSets: ${JSON.stringify(spec.concurrentRoleSets)} as readonly (readonly string[])[],`
138
120
  : '';
139
- return `// SPDX-License-Identifier: Apache-2.0
140
- // SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai>
141
- //
142
- // Generated by slc (DR-014): the registry entry exposing the compiled
143
- // playbook to \`playbook run\`. Derived deterministically from the compiled
144
- // bundle; recompiling regenerates it. The role-binding boundary (DR-017)
145
- // hands the host's \`callPlayer\` port only declared role ids.
146
-
147
- import createPlaybookRuntime from './${spec.bundleLeaf}/${spec.basename}.playbook.ts';
148
-
149
- type FactoryInput = NonNullable<Parameters<typeof createPlaybookRuntime>[0]>;
150
- ${runtimeOptionsAlias}
151
-
152
- const ALLOWED_OPTION_KEYS: readonly string[] = ${allowed};
153
-
154
- const REQUIRED_ROLE_IDS: readonly string[] = [${spec.players.map(sourceString).join(', ')}];
155
-
121
+ // A schema-3 entry declares the very ids the machine's delegated states
122
+ // name, so the host's `callPlayer` port needs no translation and the entry
123
+ // returns the linked factory's runtime directly (DR-024). Only a historical
124
+ // schema-1 entry keeps the DR-017 role-binding boundary, which maps the
125
+ // runtime's lowercased player ids back to the verbatim declared names.
126
+ const roleBinding = spec.schema3
127
+ ? ''
128
+ : `
156
129
  const ROLE_ID_BY_RESOLVED: ReadonlyMap<string, string> = new Map(
157
130
  REQUIRED_ROLE_IDS.map((id): [string, string] => [id.toLowerCase(), id]),
158
131
  );
@@ -198,7 +171,32 @@ function withRoleBinding<T extends object>(runtime: T): T {
198
171
  },
199
172
  });
200
173
  }
174
+ `;
175
+ const runtimeExpression = spec.schema3
176
+ ? `createPlaybookRuntime(${factoryArgument})`
177
+ : `withRoleBinding(createPlaybookRuntime(${factoryArgument}))`;
178
+ const roleNote = spec.schema3
179
+ ? `// bundle; recompiling regenerates it. \`requiredRoleIds\` are the canonical
180
+ // lowercase local role ids the compiled machine's delegated states name
181
+ // (DR-024).`
182
+ : `// bundle; recompiling regenerates it. The role-binding boundary (DR-017)
183
+ // hands the host's \`callPlayer\` port only declared role ids.`;
184
+ return `// SPDX-License-Identifier: Apache-2.0
185
+ // SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai>
186
+ //
187
+ // Generated by slc (DR-014): the registry entry exposing the compiled
188
+ // playbook to \`playbook run\`. Derived deterministically from the compiled
189
+ ${roleNote}
190
+
191
+ import createPlaybookRuntime from './${spec.bundleLeaf}/${spec.basename}.playbook.ts';
192
+
193
+ type FactoryInput = NonNullable<Parameters<typeof createPlaybookRuntime>[0]>;
194
+ ${runtimeOptionsAlias}
195
+
196
+ const ALLOWED_OPTION_KEYS: readonly string[] = ${allowed};
201
197
 
198
+ const REQUIRED_ROLE_IDS: readonly string[] = [${spec.roleIds.map(sourceString).join(', ')}];
199
+ ${roleBinding}
202
200
  function validateOptions(value: unknown): RuntimeOptions {
203
201
  if (value === undefined) return {};
204
202
  if (typeof value !== 'object' || value === null || Array.isArray(value)) {
@@ -227,7 +225,7 @@ const entry = {
227
225
  validateOptions,
228
226
  createRuntime(options: { captainOptions?: unknown }${schema3Param}) {
229
227
  const validated = validateOptions(options.captainOptions);
230
- return withRoleBinding(createPlaybookRuntime(${factoryArgument}));
228
+ return ${runtimeExpression};
231
229
  },
232
230
  };
233
231
 
@@ -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,E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CAAC,IAAI,CAAC,IAAI,CAAC;EACvF,WAAW;;;;;;;;;;;;;;;;;;;;;;QAsBL,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC;aACtB,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC5B,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,aAAa;;;uDAGC,YAAY;;aAEtD,iBAAiB;;;;;CAK7B,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"}
@@ -25,6 +25,13 @@ export interface UpdateContext {
25
25
  * compiled performing prompts (incremental-compilation-16).
26
26
  */
27
27
  export declare function updateContextLines(update: UpdateContext, target: string): string[];
28
+ /**
29
+ * A host-owned deterministic review of the work a performing agent just did,
30
+ * returning one finding per violation and the empty array when it conserves its
31
+ * input (phase-execution-51). The host reads the live artifact itself, so the
32
+ * hook is re-run before each Reviewer call rather than snapshotted.
33
+ */
34
+ export type MechanicalReview = () => Promise<readonly string[]>;
28
35
  /** What a phase execution is asked to produce: a compile target or a linked artifact. */
29
36
  export type ExecuteRequest = {
30
37
  kind: 'compile';
@@ -32,6 +39,12 @@ export type ExecuteRequest = {
32
39
  definitionPath: string;
33
40
  source: string;
34
41
  target: string;
42
+ /**
43
+ * Deterministic gate on the produced target, supplied by the host for the
44
+ * compile phases that have one — currently text-to-GEARS (DR-029,
45
+ * phase-execution-51). Absent for every other compile phase.
46
+ */
47
+ mechanicalReview?: MechanicalReview;
35
48
  /**
36
49
  * Read-only reference documents the definition tells the executor to
37
50
  * consult — e.g. the entry-phase definition a generic normalize step
@@ -48,6 +61,12 @@ export type ExecuteRequest = {
48
61
  linkTarget: string;
49
62
  options: LinkOptionPair[];
50
63
  linked: string;
64
+ /**
65
+ * Deterministic gate on the produced linked module, supplied by the host
66
+ * for a `playbook` link over an FSM object (DR-030,
67
+ * phase-execution-53). Absent for every other link.
68
+ */
69
+ mechanicalReview?: MechanicalReview;
51
70
  };
52
71
  /** Terminal status an executor reports for a phase run. */
53
72
  export type ExecutorStatus = 'ok' | 'blocked' | 'error';
@@ -1 +1 @@
1
- {"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../src/execution.ts"],"names":[],"mappings":"AA+CA,mGAAmG;AACnG,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,sFAAsF;IACtF,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,4FAA4F;IAC5F,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,0FAA0F;IAC1F,cAAc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