@akagilnc/pi-workflow-roles 0.1.1751

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 (192) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +104 -0
  3. package/README.zh-CN.md +133 -0
  4. package/THIRD_PARTY_NOTICES.md +60 -0
  5. package/dist/activation-ledger-git.js +68 -0
  6. package/dist/activation-ledger-session.js +120 -0
  7. package/dist/activation-ledger-topology.js +239 -0
  8. package/dist/activation-reconciliation.js +61 -0
  9. package/dist/audit-escalation.js +108 -0
  10. package/dist/auditor-dossier-tool.js +35 -0
  11. package/dist/canonical-json.js +78 -0
  12. package/dist/compliance-transport.js +77 -0
  13. package/dist/doctor-contracts.js +172 -0
  14. package/dist/dossier-resolution.js +103 -0
  15. package/dist/evidence-child-executor.js +661 -0
  16. package/dist/exact-utf8.js +12 -0
  17. package/dist/git-object-id.js +7 -0
  18. package/dist/in-process-session.js +50 -0
  19. package/dist/merger-contracts.js +76 -0
  20. package/dist/navigator-attendance.js +995 -0
  21. package/dist/navigator-invocation-identity.js +220 -0
  22. package/dist/open-tool-schema.js +39 -0
  23. package/dist/package-contracts/collector-output.js +50 -0
  24. package/dist/package-contracts/fixer-output.js +72 -0
  25. package/dist/package-contracts/fixer-packet.js +77 -0
  26. package/dist/package-contracts/judge-output.js +17 -0
  27. package/dist/package-contracts/reviewer-output.js +82 -0
  28. package/dist/package-contracts/terminating-tools.js +173 -0
  29. package/dist/package-contracts/worker-output.js +13 -0
  30. package/dist/package-owned-tool-idle.js +104 -0
  31. package/dist/packaged-role-registry.js +34 -0
  32. package/dist/public-cli/main.js +23867 -0
  33. package/dist/public-command-renderer.js +20 -0
  34. package/dist/reviewer-agent.js +93 -0
  35. package/dist/reviewer-child-executor.js +23 -0
  36. package/dist/reviewer-construction.js +95 -0
  37. package/dist/reviewer-dispatch.js +77 -0
  38. package/dist/reviewer-execution-ledger.js +160 -0
  39. package/dist/reviewer-failure-diagnostic.js +17 -0
  40. package/dist/reviewer-git-snapshot.js +38 -0
  41. package/dist/reviewer-pinned-git.js +146 -0
  42. package/dist/reviewer-preflight-error.js +15 -0
  43. package/dist/reviewer-prompt-identity.js +10 -0
  44. package/dist/reviewer-scope-prompt.js +21 -0
  45. package/dist/reviewer-workspace.js +151 -0
  46. package/dist/sha256.js +5 -0
  47. package/dist/sitian-record-entry.js +33 -0
  48. package/dist/stderr-jsonl.js +26 -0
  49. package/dist/stream-idle-guard.js +75 -0
  50. package/dist/tool-execution-observation.js +141 -0
  51. package/dist/uuidv7.js +21 -0
  52. package/dist/work-subject-identity.js +53 -0
  53. package/extensions/role-runtime.ts +303 -0
  54. package/package.json +69 -0
  55. package/packets/fixer-prerequisites.json +6 -0
  56. package/packets/fixer-repair.md +5 -0
  57. package/packets/judge-apply.md +77 -0
  58. package/packets/judge-authority.md +64 -0
  59. package/packets/judge-plan.md +55 -0
  60. package/packets/judge-review.md +49 -0
  61. package/packets/judge-submission.md +34 -0
  62. package/resources/methods/code-review/SKILL.md +92 -0
  63. package/resources/methods/code-review/agents/openai.yaml +3 -0
  64. package/resources/methods/code-review/provenance.json +26 -0
  65. package/resources/methods/diagnosing-bugs/SKILL.md +134 -0
  66. package/resources/methods/diagnosing-bugs/agents/openai.yaml +3 -0
  67. package/resources/methods/diagnosing-bugs/provenance.json +31 -0
  68. package/resources/methods/diagnosing-bugs/scripts/hitl-loop.template.sh +41 -0
  69. package/resources/methods/resolving-merge-conflicts/SKILL.md +14 -0
  70. package/resources/methods/resolving-merge-conflicts/agents/openai.yaml +3 -0
  71. package/resources/methods/resolving-merge-conflicts/provenance.json +26 -0
  72. package/resources/methods/tdd/SKILL.md +38 -0
  73. package/resources/methods/tdd/agents/openai.yaml +3 -0
  74. package/resources/methods/tdd/mocking.md +59 -0
  75. package/resources/methods/tdd/provenance.json +36 -0
  76. package/resources/methods/tdd/tests.md +77 -0
  77. package/resources/navigator-route-playbook.md +32 -0
  78. package/schemas/tool-execution-observation.schema.json +107 -0
  79. package/scripts/build-package.mjs +65 -0
  80. package/scripts/generate-tool-execution-observation-schema.ts +7 -0
  81. package/souls/coder.md +10 -0
  82. package/souls/collector.md +11 -0
  83. package/souls/doctor-auditor.md +23 -0
  84. package/souls/doctor.md +8 -0
  85. package/souls/fixer-auditor.md +33 -0
  86. package/souls/fixer.md +13 -0
  87. package/souls/judge-auditor.md +33 -0
  88. package/souls/judge.md +74 -0
  89. package/souls/merger.md +5 -0
  90. package/souls/navigator.md +5 -0
  91. package/souls/reviewer-auditor.md +25 -0
  92. package/souls/reviewer.md +11 -0
  93. package/src/activation-ledger-git.ts +96 -0
  94. package/src/activation-ledger-session.ts +188 -0
  95. package/src/activation-ledger-topology.ts +301 -0
  96. package/src/activation-ledger.ts +240 -0
  97. package/src/activation-reconciliation.ts +163 -0
  98. package/src/activation-trace.ts +38 -0
  99. package/src/audit-escalation.ts +177 -0
  100. package/src/auditor-dossier-tool.ts +48 -0
  101. package/src/auditor-soul.ts +28 -0
  102. package/src/canonical-json.ts +74 -0
  103. package/src/canonical-skill-binding.ts +107 -0
  104. package/src/collector-config.ts +89 -0
  105. package/src/collector-evidence.ts +461 -0
  106. package/src/collector-github.ts +656 -0
  107. package/src/collector-identity.ts +161 -0
  108. package/src/collector-ledger.ts +827 -0
  109. package/src/collector-receipt.ts +87 -0
  110. package/src/collector-role.ts +592 -0
  111. package/src/collector-tool-schemas.ts +19 -0
  112. package/src/compliance-transport.ts +130 -0
  113. package/src/doctor-auditor.ts +53 -0
  114. package/src/doctor-contracts.ts +166 -0
  115. package/src/doctor-evidence.ts +47 -0
  116. package/src/doctor-role.ts +18 -0
  117. package/src/dossier-resolution.ts +137 -0
  118. package/src/evidence-child-executor.ts +775 -0
  119. package/src/exact-utf8.ts +9 -0
  120. package/src/factory-board.ts +1822 -0
  121. package/src/git-object-id.ts +11 -0
  122. package/src/human-format.ts +65 -0
  123. package/src/in-process-session.ts +78 -0
  124. package/src/judge-auditor.ts +55 -0
  125. package/src/judge-recording-anti-forge.ts +53 -0
  126. package/src/judge-role.ts +160 -0
  127. package/src/merger-contracts.ts +71 -0
  128. package/src/merger-git-state.ts +76 -0
  129. package/src/merger-role.ts +60 -0
  130. package/src/navigator-attendance.ts +1254 -0
  131. package/src/navigator-invocation-identity.ts +446 -0
  132. package/src/open-tool-schema.ts +46 -0
  133. package/src/package-contracts/collector-output.ts +109 -0
  134. package/src/package-contracts/fixer-output.ts +81 -0
  135. package/src/package-contracts/fixer-packet.ts +93 -0
  136. package/src/package-contracts/judge-output.ts +39 -0
  137. package/src/package-contracts/reviewer-output.ts +115 -0
  138. package/src/package-contracts/terminating-tools.ts +259 -0
  139. package/src/package-contracts/worker-output.ts +36 -0
  140. package/src/package-owned-tool-idle.ts +134 -0
  141. package/src/package-resources/method-skill-binding.ts +87 -0
  142. package/src/package-resources/method-skill.ts +358 -0
  143. package/src/packaged-role-registry.ts +36 -0
  144. package/src/public-cli/cli-errors.ts +11 -0
  145. package/src/public-cli/cli-io.ts +4 -0
  146. package/src/public-cli/cli.ts +912 -0
  147. package/src/public-cli/coder-run.ts +575 -0
  148. package/src/public-cli/collector-run.ts +375 -0
  149. package/src/public-cli/command-renderer.ts +8 -0
  150. package/src/public-cli/config.ts +346 -0
  151. package/src/public-cli/doctor-run.ts +355 -0
  152. package/src/public-cli/explicit-internal.ts +274 -0
  153. package/src/public-cli/fixer-run.ts +587 -0
  154. package/src/public-cli/host-pi-runtime.ts +112 -0
  155. package/src/public-cli/invocation.ts +1958 -0
  156. package/src/public-cli/judge-run.ts +507 -0
  157. package/src/public-cli/main.ts +15 -0
  158. package/src/public-cli/merger-run.ts +681 -0
  159. package/src/public-cli/public-run-credentials.ts +71 -0
  160. package/src/public-cli/registry.ts +153 -0
  161. package/src/public-cli/reviewer-run.ts +561 -0
  162. package/src/public-cli/run-lifecycle.ts +884 -0
  163. package/src/public-cli/settlement.ts +3765 -0
  164. package/src/public-cli/terminal.ts +325 -0
  165. package/src/public-command-renderer.ts +43 -0
  166. package/src/reviewer-agent.ts +94 -0
  167. package/src/reviewer-auditor.ts +53 -0
  168. package/src/reviewer-child-executor.ts +31 -0
  169. package/src/reviewer-construction.ts +137 -0
  170. package/src/reviewer-dispatch.ts +94 -0
  171. package/src/reviewer-execution-ledger.ts +206 -0
  172. package/src/reviewer-failure-diagnostic.ts +18 -0
  173. package/src/reviewer-git-snapshot.ts +53 -0
  174. package/src/reviewer-pinned-git.ts +144 -0
  175. package/src/reviewer-preflight-error.ts +14 -0
  176. package/src/reviewer-prompt-identity.ts +17 -0
  177. package/src/reviewer-role.ts +193 -0
  178. package/src/reviewer-scope-prompt.ts +24 -0
  179. package/src/reviewer-settlement.ts +63 -0
  180. package/src/reviewer-workspace.ts +111 -0
  181. package/src/role-runtime.ts +884 -0
  182. package/src/sha256.ts +6 -0
  183. package/src/sitian-record-entry.ts +57 -0
  184. package/src/stderr-jsonl.ts +28 -0
  185. package/src/stream-idle-guard.ts +98 -0
  186. package/src/ticket-snapshot.ts +662 -0
  187. package/src/ticket-trajectory.ts +1000 -0
  188. package/src/tool-execution-observation.ts +168 -0
  189. package/src/uuidv7.ts +1 -0
  190. package/src/work-subject-identity.ts +94 -0
  191. package/src/worker-role.ts +434 -0
  192. package/src/worker-submission-gates.ts +225 -0
@@ -0,0 +1,375 @@
1
+ /**
2
+ * Public Collector Role run: admit a structured PR target → explicit Internal activate
3
+ * → settle Terminal result (#112). One-shot; no resume path (Collector rejects
4
+ * session resume/fork/reload). Failure settlement reuses the #107 shared owner.
5
+ */
6
+ import { writeFile } from "node:fs/promises";
7
+ import { join } from "node:path";
8
+
9
+ import {
10
+ runExplicitInternalActivation,
11
+ type ExplicitInternalKnownFailure,
12
+ type ExplicitInternalPiRunner,
13
+ type ExplicitInternalPiResult,
14
+ } from "./explicit-internal.ts";
15
+ import { CliUsageError } from "./cli-errors.ts";
16
+ import {
17
+ admitCollectorInvocation,
18
+ buildCollectorTransportPrompt,
19
+ type AdmittedCollectorInvocation,
20
+ type ParseCollectorArgvResult,
21
+ } from "./invocation.ts";
22
+ import {
23
+ type CredentialProviders,
24
+ type SeatModelConfig,
25
+ } from "./config.ts";
26
+ import {
27
+ missingCredentialPreDispatchFailure,
28
+ postRunMissingCredentialFailure,
29
+ } from "./public-run-credentials.ts";
30
+ import {
31
+ acquireRunWriterLease,
32
+ clearTypedProviderHttpObservation,
33
+ markRunAdmitted,
34
+ markRunRunning,
35
+ markRunTerminal,
36
+ RunWriterLeaseHeldError,
37
+ type RunWriterLease,
38
+ } from "./run-lifecycle.ts";
39
+ import {
40
+ classifyPostAdmissionFailure,
41
+ exitCodeForTerminalOutcome,
42
+ formatTerminalResult,
43
+ inspectJudgeSession,
44
+ presentFailureTerminal,
45
+ presentStructuralRejection,
46
+ explicitInternalKnownFailureClassificationInput,
47
+ readCollectorInfrastructureFailure,
48
+ resolveAuditedRunnerKnownFailure,
49
+ settleFailureTerminalResult,
50
+ trySettleCollectorTerminalResult,
51
+ } from "./settlement.ts";
52
+ import type { CliIo } from "./cli-io.ts";
53
+ import type {
54
+ ControlledFailureCause,
55
+ TerminalResult,
56
+ } from "./terminal.ts";
57
+
58
+ export type CollectorRunEnv = {
59
+ home: string;
60
+ agentDir: string;
61
+ packageRoot: string;
62
+ cwd: string;
63
+ correlationId?: string;
64
+ piRunner?: ExplicitInternalPiRunner;
65
+ model?: SeatModelConfig;
66
+ credentials?: CredentialProviders;
67
+ createRunId?: () => string;
68
+ extraPiArgs?: readonly string[];
69
+ timeoutMs?: number;
70
+ };
71
+
72
+ function buildModelArgs(model: SeatModelConfig | undefined): string[] {
73
+ if (model === undefined) return [];
74
+ return [
75
+ "--provider",
76
+ model.provider,
77
+ "--model",
78
+ model.model,
79
+ "--thinking",
80
+ model.thinking,
81
+ ];
82
+ }
83
+
84
+ /**
85
+ * Build Internal activation extra-args for an admitted Collector run.
86
+ * Always --no-skills (Collector forbids every Skill). Session under #78 book.
87
+ */
88
+ export function buildCollectorActivationExtraArgs(
89
+ admitted: AdmittedCollectorInvocation,
90
+ options: {
91
+ model?: SeatModelConfig;
92
+ extraPiArgs?: readonly string[];
93
+ } = {},
94
+ ): string[] {
95
+ const prompt = buildCollectorTransportPrompt(admitted);
96
+ return [
97
+ "--no-skills",
98
+ "--no-prompt-templates",
99
+ "--no-themes",
100
+ "--no-context-files",
101
+ "--session",
102
+ admitted.sessionFile,
103
+ "--session-dir",
104
+ admitted.sessionDirectory,
105
+ ...(options.extraPiArgs ?? []),
106
+ "--ak-role",
107
+ "collector",
108
+ "--ak-collector-repo",
109
+ admitted.repository.display,
110
+ "--ak-collector-pr",
111
+ String(admitted.prNumber),
112
+ ...(admitted.requestManifestPath === undefined
113
+ ? []
114
+ : ["--ak-collector-request-manifest", admitted.requestManifestPath]),
115
+ "--mode",
116
+ "json",
117
+ ...buildModelArgs(options.model),
118
+ prompt,
119
+ ];
120
+ }
121
+
122
+ async function presentControlledFailure(
123
+ admitted: AdmittedCollectorInvocation,
124
+ failureInput: {
125
+ timedOut: boolean;
126
+ code: number | null;
127
+ stderr: string;
128
+ thrown?: unknown;
129
+ knownFailure?: ExplicitInternalKnownFailure;
130
+ knownCause?: ControlledFailureCause;
131
+ knownIdentity?: {
132
+ readonly name?: string;
133
+ readonly code?: string | number;
134
+ };
135
+ knownDiagnostic?: string;
136
+ },
137
+ io: CliIo,
138
+ ): Promise<{
139
+ exitCode: number;
140
+ admitted: AdmittedCollectorInvocation;
141
+ terminal: TerminalResult;
142
+ }> {
143
+ const hasThrown = Object.hasOwn(failureInput, "thrown");
144
+ const session =
145
+ !hasThrown &&
146
+ !failureInput.timedOut &&
147
+ failureInput.knownFailure === undefined &&
148
+ failureInput.knownCause === undefined
149
+ ? await inspectJudgeSession(admitted.sessionFile)
150
+ : undefined;
151
+ const failure = classifyPostAdmissionFailure({
152
+ timedOut: failureInput.timedOut,
153
+ code: failureInput.code,
154
+ stderr: failureInput.stderr,
155
+ ...(hasThrown ? { thrown: failureInput.thrown } : {}),
156
+ ...explicitInternalKnownFailureClassificationInput(failureInput.knownFailure),
157
+ ...(failureInput.knownCause === undefined
158
+ ? {}
159
+ : { knownCause: failureInput.knownCause }),
160
+ ...(failureInput.knownIdentity === undefined
161
+ ? {}
162
+ : { knownIdentity: failureInput.knownIdentity }),
163
+ ...(failureInput.knownDiagnostic === undefined
164
+ ? {}
165
+ : { knownDiagnostic: failureInput.knownDiagnostic }),
166
+ ...(session === undefined ? {} : { session }),
167
+ });
168
+
169
+ // Collector does not support resume/fork/reload — always terminal.
170
+ await markRunTerminal(admitted.runDirectory).catch(() => undefined);
171
+
172
+ const terminal = await settleFailureTerminalResult(admitted, failure);
173
+ presentFailureTerminal(terminal, io);
174
+ return {
175
+ exitCode: exitCodeForTerminalOutcome(terminal.roleOutcome),
176
+ admitted,
177
+ terminal,
178
+ };
179
+ }
180
+
181
+ async function dispatchAdmittedCollector(input: {
182
+ admitted: AdmittedCollectorInvocation;
183
+ env: CollectorRunEnv;
184
+ io: CliIo;
185
+ extraArgs: string[];
186
+ lease: RunWriterLease;
187
+ }): Promise<{
188
+ exitCode: number;
189
+ admitted: AdmittedCollectorInvocation;
190
+ terminal?: TerminalResult;
191
+ }> {
192
+ const { admitted, env, io, extraArgs, lease } = input;
193
+ try {
194
+ const missingCredential = missingCredentialPreDispatchFailure(
195
+ env.model,
196
+ env.credentials,
197
+ );
198
+ if (missingCredential !== undefined) {
199
+ return await presentControlledFailure(
200
+ admitted,
201
+ missingCredential,
202
+ io,
203
+ );
204
+ }
205
+ await markRunRunning(admitted.runDirectory);
206
+ await clearTypedProviderHttpObservation(admitted.runDirectory);
207
+
208
+ const childEnv: NodeJS.ProcessEnv = {
209
+ ...process.env,
210
+ HOME: env.home,
211
+ PI_CODING_AGENT_DIR: env.agentDir,
212
+ AK_ROLE_RUN_DIR: admitted.runDirectory,
213
+ };
214
+ if (env.correlationId !== undefined && env.correlationId.trim() !== "") {
215
+ childEnv.AK_CORRELATION_ID = env.correlationId;
216
+ }
217
+
218
+ let result: ExplicitInternalPiResult;
219
+ try {
220
+ result = await runExplicitInternalActivation({
221
+ packageRoot: env.packageRoot,
222
+ extraArgs,
223
+ cwd: admitted.projectRoot,
224
+ home: env.home,
225
+ agentDir: env.agentDir,
226
+ env: childEnv,
227
+ timeoutMs: env.timeoutMs,
228
+ ...(env.piRunner === undefined ? {} : { runner: env.piRunner }),
229
+ });
230
+ } catch (error) {
231
+ return await presentControlledFailure(
232
+ admitted,
233
+ {
234
+ timedOut: false,
235
+ code: null,
236
+ stderr: "",
237
+ thrown: error,
238
+ },
239
+ io,
240
+ );
241
+ }
242
+
243
+ try {
244
+ await writeFile(
245
+ join(admitted.runDirectory, "stderr.log"),
246
+ result.stderr,
247
+ "utf8",
248
+ );
249
+ } catch {
250
+ // continue to lawful / controlled-failure settlement
251
+ }
252
+
253
+ let lawful: TerminalResult | undefined;
254
+ try {
255
+ lawful = await trySettleCollectorTerminalResult(admitted);
256
+ } catch (error) {
257
+ return await presentControlledFailure(
258
+ admitted,
259
+ {
260
+ timedOut: false,
261
+ code: result.code,
262
+ stderr: result.stderr,
263
+ thrown: error,
264
+ },
265
+ io,
266
+ );
267
+ }
268
+ if (lawful !== undefined) {
269
+ await markRunTerminal(admitted.runDirectory).catch(() => undefined);
270
+ io.stdout(formatTerminalResult(lawful));
271
+ return {
272
+ exitCode: exitCodeForTerminalOutcome(lawful.roleOutcome),
273
+ admitted,
274
+ terminal: lawful,
275
+ };
276
+ }
277
+
278
+ // Prefer Collector infrastructure tool failure already on the session principal
279
+ // (e.g. observe HTTP 404) over a later secondary provider-stop after abort.
280
+ const infrastructureFailure = await readCollectorInfrastructureFailure(
281
+ admitted.sessionFile,
282
+ );
283
+ const credentialFailure = postRunMissingCredentialFailure(
284
+ result,
285
+ env.model,
286
+ env.credentials,
287
+ );
288
+ const knownFailure = await resolveAuditedRunnerKnownFailure({
289
+ runner:
290
+ result.knownFailure ??
291
+ (infrastructureFailure === undefined
292
+ ? undefined
293
+ : {
294
+ cause: infrastructureFailure.cause,
295
+ diagnostic: infrastructureFailure.diagnostic,
296
+ ...(infrastructureFailure.identity === undefined
297
+ ? {}
298
+ : { identity: infrastructureFailure.identity }),
299
+ }),
300
+ sessionFile: admitted.sessionFile,
301
+ credential: credentialFailure,
302
+ });
303
+ return await presentControlledFailure(
304
+ admitted,
305
+ {
306
+ timedOut: result.timedOut,
307
+ code: result.code,
308
+ stderr: result.stderr,
309
+ ...(knownFailure === undefined ? {} : { knownFailure }),
310
+ },
311
+ io,
312
+ );
313
+ } finally {
314
+ await lease.release();
315
+ }
316
+ }
317
+
318
+ export async function runPublicCollector(
319
+ argv: readonly string[],
320
+ env: CollectorRunEnv,
321
+ io: CliIo,
322
+ parseCollectorArgv: (args: readonly string[]) => ParseCollectorArgvResult,
323
+ ): Promise<{
324
+ exitCode: number;
325
+ admitted?: AdmittedCollectorInvocation;
326
+ terminal?: TerminalResult;
327
+ }> {
328
+ let admitted: AdmittedCollectorInvocation;
329
+ try {
330
+ const parsed = parseCollectorArgv(argv);
331
+ admitted = await admitCollectorInvocation({
332
+ home: env.home,
333
+ cwd: env.cwd,
334
+ prNumber: parsed.prNumber,
335
+ instruction: parsed.instruction,
336
+ attachmentPaths: parsed.attachmentPaths,
337
+ ...(parsed.project === undefined ? {} : { project: parsed.project }),
338
+ ...(parsed.repo === undefined ? {} : { repo: parsed.repo }),
339
+ ...(parsed.requestManifestPath === undefined ? {} : { requestManifestPath: parsed.requestManifestPath }),
340
+ ...(env.createRunId === undefined ? {} : { createRunId: env.createRunId }),
341
+ });
342
+ } catch (error) {
343
+ if (error instanceof CliUsageError) {
344
+ presentStructuralRejection(error, io);
345
+ return { exitCode: 2 };
346
+ }
347
+ throw error;
348
+ }
349
+
350
+ await markRunAdmitted(admitted);
351
+
352
+ let lease: RunWriterLease;
353
+ try {
354
+ lease = await acquireRunWriterLease(admitted.runDirectory);
355
+ } catch (error) {
356
+ if (error instanceof RunWriterLeaseHeldError) {
357
+ presentStructuralRejection(error, io);
358
+ return { exitCode: 2 };
359
+ }
360
+ throw error;
361
+ }
362
+
363
+ const extraArgs = buildCollectorActivationExtraArgs(admitted, {
364
+ ...(env.model === undefined ? {} : { model: env.model }),
365
+ ...(env.extraPiArgs === undefined ? {} : { extraPiArgs: env.extraPiArgs }),
366
+ });
367
+
368
+ return await dispatchAdmittedCollector({
369
+ admitted,
370
+ env,
371
+ io,
372
+ extraArgs,
373
+ lease,
374
+ });
375
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Public CLI re-export of the shared registry-owned command renderer.
3
+ * Single implementation lives in src/public-command-renderer.ts.
4
+ */
5
+ export {
6
+ renderPublicAkRoleCommand,
7
+ type PublicCommandTarget,
8
+ } from "../public-command-renderer.ts";