@bluewombat/implementer 0.1.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 (55) hide show
  1. package/README.md +91 -0
  2. package/SPECS.md +349 -0
  3. package/dist/args/parse-args.d.ts +6 -0
  4. package/dist/args/parse-args.d.ts.map +1 -0
  5. package/dist/args/parse-args.js +330 -0
  6. package/dist/args/parse-args.js.map +1 -0
  7. package/dist/child/parse-child-output.d.ts +11 -0
  8. package/dist/child/parse-child-output.d.ts.map +1 -0
  9. package/dist/child/parse-child-output.js +49 -0
  10. package/dist/child/parse-child-output.js.map +1 -0
  11. package/dist/child/run-builder.d.ts +24 -0
  12. package/dist/child/run-builder.d.ts.map +1 -0
  13. package/dist/child/run-builder.js +92 -0
  14. package/dist/child/run-builder.js.map +1 -0
  15. package/dist/child/run-child.d.ts +36 -0
  16. package/dist/child/run-child.d.ts.map +1 -0
  17. package/dist/child/run-child.js +141 -0
  18. package/dist/child/run-child.js.map +1 -0
  19. package/dist/child/run-gate.d.ts +14 -0
  20. package/dist/child/run-gate.d.ts.map +1 -0
  21. package/dist/child/run-gate.js +72 -0
  22. package/dist/child/run-gate.js.map +1 -0
  23. package/dist/cli.d.ts +3 -0
  24. package/dist/cli.d.ts.map +1 -0
  25. package/dist/cli.js +44 -0
  26. package/dist/cli.js.map +1 -0
  27. package/dist/index.d.ts +12 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +9 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/loop/decide-after-attempt.d.ts +23 -0
  32. package/dist/loop/decide-after-attempt.d.ts.map +1 -0
  33. package/dist/loop/decide-after-attempt.js +26 -0
  34. package/dist/loop/decide-after-attempt.js.map +1 -0
  35. package/dist/progress/emit.d.ts +5 -0
  36. package/dist/progress/emit.d.ts.map +1 -0
  37. package/dist/progress/emit.js +24 -0
  38. package/dist/progress/emit.js.map +1 -0
  39. package/dist/run/run-implementer.d.ts +23 -0
  40. package/dist/run/run-implementer.d.ts.map +1 -0
  41. package/dist/run/run-implementer.js +274 -0
  42. package/dist/run/run-implementer.js.map +1 -0
  43. package/dist/status/announce.d.ts +14 -0
  44. package/dist/status/announce.d.ts.map +1 -0
  45. package/dist/status/announce.js +40 -0
  46. package/dist/status/announce.js.map +1 -0
  47. package/dist/status/make-status.d.ts +9 -0
  48. package/dist/status/make-status.d.ts.map +1 -0
  49. package/dist/status/make-status.js +38 -0
  50. package/dist/status/make-status.js.map +1 -0
  51. package/dist/types.d.ts +119 -0
  52. package/dist/types.d.ts.map +1 -0
  53. package/dist/types.js +3 -0
  54. package/dist/types.js.map +1 -0
  55. package/package.json +46 -0
@@ -0,0 +1,274 @@
1
+ import { runBuilder } from "../child/run-builder.js";
2
+ import { runGate } from "../child/run-gate.js";
3
+ import { decideAfterAttempt } from "../loop/decide-after-attempt.js";
4
+ import { announceStatus } from "../status/announce.js";
5
+ import { makeStatus } from "../status/make-status.js";
6
+ function exitCodeFor(outcome) {
7
+ switch (outcome) {
8
+ case "validated":
9
+ return 0;
10
+ case "escalated":
11
+ return 1;
12
+ case "invalid-invocation":
13
+ return 2;
14
+ case "interrupted":
15
+ return 130;
16
+ }
17
+ }
18
+ /**
19
+ * The producer for this pass, and how long it may run.
20
+ *
21
+ * A pass with something to resolve is a different job from a first one, and a
22
+ * Project may hand it to a different agent. The choice is on the report, not on
23
+ * the Attempt number: a Task run again because an outside judge sent its result
24
+ * back carries a report from its very first Attempt.
25
+ */
26
+ function producerFor(invocation, hasReport) {
27
+ if (invocation.builderArgv === undefined) {
28
+ return undefined;
29
+ }
30
+ if (hasReport && invocation.repairArgv !== undefined) {
31
+ return {
32
+ argv: invocation.repairArgv,
33
+ timeoutMs: invocation.repairTimeoutMs ?? invocation.builderTimeoutMs,
34
+ };
35
+ }
36
+ return { argv: invocation.builderArgv, timeoutMs: invocation.builderTimeoutMs };
37
+ }
38
+ /**
39
+ * Run one Implementer invocation to a run outcome.
40
+ */
41
+ export async function runImplementer(options) {
42
+ const { invocation } = options;
43
+ const write = options.write ?? (() => { });
44
+ const interruptState = options.interruptFlag ?? { interrupted: false };
45
+ const shouldInterrupt = () => interruptState.interrupted;
46
+ return await runLoop({ invocation, write, shouldInterrupt, cwd: options.cwd });
47
+ }
48
+ async function runLoop(input) {
49
+ const { invocation, write, shouldInterrupt } = input;
50
+ const traces = [];
51
+ let previousReport = invocation.report;
52
+ let previousRefusedBy = invocation.reportFrom;
53
+ for (let attempt = 1; attempt <= invocation.maxAttempts; attempt += 1) {
54
+ if (shouldInterrupt()) {
55
+ return finishInterrupted({
56
+ cwd: input.cwd,
57
+ invocation,
58
+ write,
59
+ attempt,
60
+ traces,
61
+ // interrupted before Builder spawn of this Attempt — if no prior Attempt, still interrupted
62
+ });
63
+ }
64
+ const builderInput = {
65
+ intention: invocation.intention,
66
+ definition_of_done: invocation.definitionOfDone,
67
+ };
68
+ if (previousReport !== undefined) {
69
+ builderInput.report = previousReport;
70
+ }
71
+ if (invocation.builderArgv !== undefined) {
72
+ await announceStatus({
73
+ cwd: input.cwd,
74
+ invocation,
75
+ status: makeStatus({
76
+ phase: "building",
77
+ attempt,
78
+ maxAttempts: invocation.maxAttempts,
79
+ }),
80
+ write,
81
+ shouldInterrupt,
82
+ });
83
+ }
84
+ write({
85
+ event: "attempt-started",
86
+ task_id: invocation.id,
87
+ attempt,
88
+ });
89
+ // A Task with no producer is its Gate sequence alone: nothing is made, and
90
+ // the Attempt is the judgement.
91
+ const producer = producerFor(invocation, previousReport !== undefined);
92
+ const builderRun = producer === undefined
93
+ ? {
94
+ result: { kind: "skipped" },
95
+ attemptEnded: undefined,
96
+ reportForRetry: undefined,
97
+ }
98
+ : await runBuilder({
99
+ invocation,
100
+ producerArgv: producer.argv,
101
+ attempt,
102
+ previousReport,
103
+ previousRefusedBy,
104
+ timeoutMs: producer.timeoutMs,
105
+ shouldInterrupt,
106
+ });
107
+ if (invocation.builderArgv !== undefined) {
108
+ write({
109
+ event: "builder-finished",
110
+ task_id: invocation.id,
111
+ attempt,
112
+ result: builderRun.result,
113
+ });
114
+ }
115
+ const gateEntries = [];
116
+ let ended;
117
+ if (builderRun.attemptEnded !== undefined) {
118
+ ended = builderRun.attemptEnded;
119
+ if (ended === "fail-retryable" || ended === "fail-blocking") {
120
+ previousReport = builderRun.reportForRetry;
121
+ // The producer failed on its own; no Gate refused it.
122
+ previousRefusedBy = undefined;
123
+ }
124
+ }
125
+ else {
126
+ // Builder completed — run Gates (may be empty → validated).
127
+ let gateStop;
128
+ for (const gate of invocation.gates) {
129
+ if (shouldInterrupt()) {
130
+ gateStop = "interrupted";
131
+ break;
132
+ }
133
+ await announceStatus({
134
+ cwd: input.cwd,
135
+ invocation,
136
+ status: makeStatus({
137
+ phase: "gating",
138
+ attempt,
139
+ maxAttempts: invocation.maxAttempts,
140
+ gateId: gate.id,
141
+ }),
142
+ write,
143
+ shouldInterrupt,
144
+ });
145
+ const gateRun = await runGate({
146
+ invocation,
147
+ attempt,
148
+ gate,
149
+ timeoutMs: gate.timeoutMs,
150
+ shouldInterrupt,
151
+ });
152
+ gateEntries.push(gateRun.entry);
153
+ write({
154
+ event: "gate-finished",
155
+ task_id: invocation.id,
156
+ attempt,
157
+ gate_id: gate.id,
158
+ verdict: gateRun.entry.verdict,
159
+ report: gateRun.entry.report,
160
+ });
161
+ if (gateRun.stop !== undefined) {
162
+ gateStop = gateRun.stop;
163
+ if (gateRun.stop === "fail-retryable" || gateRun.stop === "fail-blocking") {
164
+ previousReport = gateRun.entry.report;
165
+ previousRefusedBy = gate.id;
166
+ }
167
+ break;
168
+ }
169
+ }
170
+ ended = gateStop ?? "validated";
171
+ }
172
+ if (shouldInterrupt() && ended !== "interrupted") {
173
+ // Stop signal raced after child finished: prefer interrupted for in-flight semantics
174
+ // only when we were killed mid-child — already handled. If interrupt arrived between
175
+ // children, treat as interrupted for the Attempt when not already validated.
176
+ if (ended !== "validated") {
177
+ ended = "interrupted";
178
+ }
179
+ }
180
+ const trace = {
181
+ task_id: invocation.id,
182
+ attempt,
183
+ builder: {
184
+ input: builderInput,
185
+ result: builderRun.result,
186
+ },
187
+ gates: gateEntries,
188
+ ended,
189
+ };
190
+ traces.push(trace);
191
+ write({
192
+ event: "attempt-finished",
193
+ task_id: invocation.id,
194
+ attempt,
195
+ ended,
196
+ trace,
197
+ });
198
+ const decision = decideAfterAttempt({
199
+ ended,
200
+ attemptsStarted: attempt,
201
+ maxAttempts: invocation.maxAttempts,
202
+ });
203
+ if (decision.action === "finish") {
204
+ return finishRun({
205
+ cwd: input.cwd,
206
+ invocation,
207
+ write,
208
+ attempt,
209
+ outcome: decision.outcome,
210
+ traces,
211
+ });
212
+ }
213
+ // retry: clear nothing; Gates restart from first; Builder gets --report
214
+ }
215
+ // Exhausted without finish (should be unreachable — last Attempt always decides).
216
+ return finishRun({
217
+ cwd: input.cwd,
218
+ invocation,
219
+ write,
220
+ attempt: invocation.maxAttempts,
221
+ outcome: "escalated",
222
+ traces,
223
+ });
224
+ }
225
+ async function finishRun(input) {
226
+ const { invocation, write, attempt, outcome, traces } = input;
227
+ await announceStatus({
228
+ invocation,
229
+ status: makeStatus({
230
+ phase: outcome,
231
+ attempt,
232
+ maxAttempts: invocation.maxAttempts,
233
+ }),
234
+ write,
235
+ shouldInterrupt: () => false,
236
+ cwd: input.cwd,
237
+ });
238
+ write({
239
+ event: "run-finished",
240
+ task_id: invocation.id,
241
+ outcome,
242
+ traces,
243
+ });
244
+ return { outcome, traces, exitCode: exitCodeFor(outcome) };
245
+ }
246
+ async function finishInterrupted(input) {
247
+ return finishRun({
248
+ ...input,
249
+ outcome: "interrupted",
250
+ });
251
+ }
252
+ export function invalidInvocationResult(invocationId, write, reason) {
253
+ const status = makeStatus({ phase: "invalid" });
254
+ write({
255
+ event: "status",
256
+ task_id: invocationId ?? "",
257
+ phase: status.phase,
258
+ label: status.label,
259
+ reason,
260
+ });
261
+ write({
262
+ event: "run-finished",
263
+ task_id: invocationId ?? "",
264
+ outcome: "invalid-invocation",
265
+ reason,
266
+ traces: [],
267
+ });
268
+ return {
269
+ outcome: "invalid-invocation",
270
+ traces: [],
271
+ exitCode: exitCodeFor("invalid-invocation"),
272
+ };
273
+ }
274
+ //# sourceMappingURL=run-implementer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-implementer.js","sourceRoot":"","sources":["../../src/run/run-implementer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAkBtD,SAAS,WAAW,CAAC,OAAmB;IACtC,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,WAAW;YACd,OAAO,CAAC,CAAC;QACX,KAAK,WAAW;YACd,OAAO,CAAC,CAAC;QACX,KAAK,oBAAoB;YACvB,OAAO,CAAC,CAAC;QACX,KAAK,aAAa;YAChB,OAAO,GAAG,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,WAAW,CAClB,UAAsB,EACtB,SAAkB;IAElB,IAAI,UAAU,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QACzC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,SAAS,IAAI,UAAU,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QACrD,OAAO;YACL,IAAI,EAAE,UAAU,CAAC,UAAU;YAC3B,SAAS,EAAE,UAAU,CAAC,eAAe,IAAI,UAAU,CAAC,gBAAgB;SACrE,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,WAAW,EAAE,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,CAAC;AAClF,CAAC;AAED;;GAEG;AACH,MAAM,CAA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AAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM;KACP,CAAC,CAAC;IACH,KAAK,CAAC;QACJ,KAAK,EAAE,cAAc;QACrB,OAAO,EAAE,YAAY,IAAI,EAAE;QAC3B,OAAO,EAAE,oBAAoB;QAC7B,MAAM;QACN,MAAM,EAAE,EAAE;KACX,CAAC,CAAC;IACH,OAAO;QACL,OAAO,EAAE,oBAAoB;QAC7B,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,WAAW,CAAC,oBAAoB,CAAC;KAC5C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { ProgressWriter } from "../progress/emit.js";
2
+ import type { Invocation, Status } from "../types.js";
3
+ /**
4
+ * Announce Status on stdout (and optionally via --on-status).
5
+ * --on-status never affects the run outcome.
6
+ */
7
+ export declare function announceStatus(input: {
8
+ invocation: Invocation;
9
+ status: Status;
10
+ write: ProgressWriter;
11
+ shouldInterrupt: () => boolean;
12
+ cwd: string | undefined;
13
+ }): Promise<void>;
14
+ //# sourceMappingURL=announce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"announce.d.ts","sourceRoot":"","sources":["../../src/status/announce.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEtD;;;GAGG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE;IAC1C,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,cAAc,CAAC;IACtB,eAAe,EAAE,MAAM,OAAO,CAAC;IAC/B,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CACzB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmChB"}
@@ -0,0 +1,40 @@
1
+ import { runChild } from "../child/run-child.js";
2
+ import { emitStatusEvent } from "../progress/emit.js";
3
+ /**
4
+ * Announce Status on stdout (and optionally via --on-status).
5
+ * --on-status never affects the run outcome.
6
+ */
7
+ export async function announceStatus(input) {
8
+ const { invocation, status, write, shouldInterrupt, cwd } = input;
9
+ emitStatusEvent(write, invocation.id, status);
10
+ const onStatus = invocation.onStatusArgv;
11
+ if (onStatus === undefined) {
12
+ return;
13
+ }
14
+ const argv = [
15
+ ...onStatus,
16
+ "--id",
17
+ invocation.id,
18
+ "--label",
19
+ status.label,
20
+ "--phase",
21
+ status.phase,
22
+ ];
23
+ if (status.attempt !== undefined) {
24
+ argv.push("--attempt", String(status.attempt));
25
+ }
26
+ if (status.max_attempts !== undefined) {
27
+ argv.push("--max-attempts", String(status.max_attempts));
28
+ }
29
+ if (status.gate_id !== undefined) {
30
+ argv.push("--gate-id", status.gate_id);
31
+ }
32
+ // Soft cap only: a hang or non-zero exit must not change the run outcome.
33
+ await runChild({
34
+ argv,
35
+ cwd,
36
+ timeoutMs: 5_000,
37
+ shouldInterrupt,
38
+ });
39
+ }
40
+ //# sourceMappingURL=announce.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"announce.js","sourceRoot":"","sources":["../../src/status/announce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,KAMpC;IACC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;IAClE,eAAe,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAE9C,MAAM,QAAQ,GAAG,UAAU,CAAC,YAAY,CAAC;IACzC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO;IACT,CAAC;IAED,MAAM,IAAI,GAAG;QACX,GAAG,QAAQ;QACX,MAAM;QACN,UAAU,CAAC,EAAE;QACb,SAAS;QACT,MAAM,CAAC,KAAK;QACZ,SAAS;QACT,MAAM,CAAC,KAAK;KACb,CAAC;IACF,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QACjC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACjD,CAAC;IACD,IAAI,MAAM,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QACtC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;IAC3D,CAAC;IACD,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QACjC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAED,0EAA0E;IAC1E,MAAM,QAAQ,CAAC;QACb,IAAI;QACJ,GAAG;QACH,SAAS,EAAE,KAAK;QAChB,eAAe;KAChB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { Status, StatusPhase } from "../types.js";
2
+ export declare function buildStatusLabel(phase: StatusPhase, attempt: number | undefined, maxAttempts: number | undefined, gateId: string | undefined): string;
3
+ export declare function makeStatus(input: {
4
+ phase: StatusPhase;
5
+ attempt?: number;
6
+ maxAttempts?: number;
7
+ gateId?: string;
8
+ }): Status;
9
+ //# sourceMappingURL=make-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"make-status.d.ts","sourceRoot":"","sources":["../../src/status/make-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,MAAM,EAAE,MAAM,GAAG,SAAS,GACzB,MAAM,CAiBR;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE;IAChC,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,MAAM,CAkBT"}
@@ -0,0 +1,38 @@
1
+ export function buildStatusLabel(phase, attempt, maxAttempts, gateId) {
2
+ if (phase === "invalid") {
3
+ return "invalid";
4
+ }
5
+ if (attempt === undefined || maxAttempts === undefined) {
6
+ throw new Error(`Status phase "${phase}" requires attempt and max_attempts.`);
7
+ }
8
+ if (phase === "building") {
9
+ return `building:attempt-${attempt}:${maxAttempts}`;
10
+ }
11
+ if (phase === "gating") {
12
+ if (gateId === undefined) {
13
+ throw new Error('Status phase "gating" requires gate_id.');
14
+ }
15
+ return `gating:${gateId}:attempt-${attempt}:${maxAttempts}`;
16
+ }
17
+ return `${phase}:attempt-${attempt}:${maxAttempts}`;
18
+ }
19
+ export function makeStatus(input) {
20
+ const { phase, attempt, maxAttempts, gateId } = input;
21
+ const label = buildStatusLabel(phase, attempt, maxAttempts, gateId);
22
+ const status = { phase, label };
23
+ if (phase !== "invalid") {
24
+ if (attempt === undefined || maxAttempts === undefined) {
25
+ throw new Error(`Status phase "${phase}" requires attempt and max_attempts.`);
26
+ }
27
+ status.attempt = attempt;
28
+ status.max_attempts = maxAttempts;
29
+ }
30
+ if (phase === "gating") {
31
+ if (gateId === undefined) {
32
+ throw new Error('Status phase "gating" requires gate_id.');
33
+ }
34
+ status.gate_id = gateId;
35
+ }
36
+ return status;
37
+ }
38
+ //# sourceMappingURL=make-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"make-status.js","sourceRoot":"","sources":["../../src/status/make-status.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,gBAAgB,CAC9B,KAAkB,EAClB,OAA2B,EAC3B,WAA+B,EAC/B,MAA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KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;QAC7D,CAAC;QACD,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC;IAC1B,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,119 @@
1
+ /** Domain types owned by Implementer. Names match the Transformer perimeter only. */
2
+ export type RunOutcome = "invalid-invocation" | "validated" | "escalated" | "interrupted";
3
+ export type AttemptEnded = "validated" | "fail-retryable" | "fail-blocking" | "interrupted";
4
+ export type GateVerdict = "pass" | "fail-retryable" | "fail-blocking";
5
+ export type BuilderResultKind = "completed" | "failed" | "timed_out" | "interrupted" | "refused"
6
+ /** There was no producer to run: the Attempt is its Gate sequence alone. */
7
+ | "skipped";
8
+ export type StatusPhase = "building" | "gating" | "validated" | "escalated" | "interrupted" | "invalid";
9
+ export type Status = {
10
+ phase: StatusPhase;
11
+ attempt?: number;
12
+ max_attempts?: number;
13
+ gate_id?: string;
14
+ label: string;
15
+ };
16
+ export type BuilderInput = {
17
+ intention: string;
18
+ definition_of_done: string;
19
+ report?: string;
20
+ };
21
+ export type BuilderResult = {
22
+ kind: BuilderResultKind;
23
+ /** fail-retryable or fail-blocking when kind is failed / refused / timed_out */
24
+ outcome?: "fail-retryable" | "fail-blocking";
25
+ detail?: string;
26
+ };
27
+ export type GateTraceEntry = {
28
+ id: string;
29
+ verdict: GateVerdict;
30
+ report: string;
31
+ };
32
+ export type Trace = {
33
+ task_id: string;
34
+ attempt: number;
35
+ builder: {
36
+ input: BuilderInput;
37
+ result: BuilderResult;
38
+ };
39
+ gates: GateTraceEntry[];
40
+ ended: AttemptEnded;
41
+ };
42
+ export type GateSpec = {
43
+ id: string;
44
+ argv: string[];
45
+ /**
46
+ * How long this Gate may take, at most. Required.
47
+ *
48
+ * Every child of an Attempt carries its own ceiling, and none is ever derived
49
+ * from what another child left behind. A Gate that waits on something outside
50
+ * — a check, a person — is then the only one paying for that wait.
51
+ */
52
+ timeoutMs: number;
53
+ };
54
+ export type Invocation = {
55
+ id: string;
56
+ intention: string;
57
+ definitionOfDone: string;
58
+ workspace: string;
59
+ /**
60
+ * The producer. Absent: an Attempt is its Gate sequence alone.
61
+ *
62
+ * Some Tasks only need judging — a stage whose work is already done, or one
63
+ * whose answer comes from outside. Making one produce so that it can be
64
+ * judged is how a correct result gets rewritten for no reason.
65
+ */
66
+ builderArgv?: string[];
67
+ /**
68
+ * The producer for a pass that has something to resolve, instead of `builderArgv`.
69
+ *
70
+ * Making from a specification and repairing what a check refused are not the
71
+ * same job, and they are not always best done by the same agent or the same
72
+ * prompt. Absent: `builderArgv` does both.
73
+ *
74
+ * Chosen on the presence of a report, not on the Attempt number: a Task run
75
+ * again because something outside judged its result carries one from its very
76
+ * first Attempt.
77
+ */
78
+ repairArgv?: string[];
79
+ gates: GateSpec[];
80
+ /**
81
+ * What a pass before this invocation left unresolved.
82
+ *
83
+ * Attempt 1 usually has nothing to say to the Builder. When the Task is run
84
+ * again because something outside judged the last result, that judgement is
85
+ * the report, and the Builder reads it exactly as it reads a Gate's.
86
+ */
87
+ report?: string;
88
+ /** Which Gate produced `report`, when a Gate did. */
89
+ reportFrom?: string;
90
+ /**
91
+ * One piece of work, or the whole that pieces assemble into.
92
+ *
93
+ * A check written for one can be wrong for the other, so each is told which
94
+ * it is looking at rather than left to guess. Absent: a piece of work.
95
+ */
96
+ stage?: "unit" | "assembly";
97
+ /**
98
+ * What this Task belongs to, passed to the producer and used for nothing else.
99
+ *
100
+ * A Task's own id says which unit of work it is, not which larger piece of
101
+ * work that unit serves. A producer keeping a record of its turn needs the
102
+ * second to file it somewhere a person can find it again.
103
+ */
104
+ context?: string;
105
+ maxAttempts: number;
106
+ /** How long the producer may run, at most. Required: nothing else bounds it. */
107
+ builderTimeoutMs: number;
108
+ /** The same, for `repairArgv`. Absent: `builderTimeoutMs`. */
109
+ repairTimeoutMs?: number;
110
+ onStatusArgv?: string[];
111
+ };
112
+ export type ParseResult = {
113
+ ok: true;
114
+ invocation: Invocation;
115
+ } | {
116
+ ok: false;
117
+ reason: string;
118
+ };
119
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF,MAAM,MAAM,UAAU,GAAG,oBAAoB,GAAG,WAAW,GAAG,WAAW,GAAG,aAAa,CAAC;AAE1F,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,gBAAgB,GAAG,eAAe,GAAG,aAAa,CAAC;AAE5F,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,gBAAgB,GAAG,eAAe,CAAC;AAEtE,MAAM,MAAM,iBAAiB,GACzB,WAAW,GACX,QAAQ,GACR,WAAW,GACX,aAAa,GACb,SAAS;AACX,4EAA4E;GAC1E,SAAS,CAAC;AAEd,MAAM,MAAM,WAAW,GACnB,UAAU,GACV,QAAQ,GACR,WAAW,GACX,WAAW,GACX,aAAa,GACb,SAAS,CAAC;AAEd,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,iBAAiB,CAAC;IACxB,gFAAgF;IAChF,OAAO,CAAC,EAAE,gBAAgB,GAAG,eAAe,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,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;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,UAAU,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,3 @@
1
+ /** Domain types owned by Implementer. Names match the Transformer perimeter only. */
2
+ export {};
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,qFAAqF"}
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@bluewombat/implementer",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "Transformer: runs one Task — Builder, then Gates — until validated, escalated, or interrupted.",
6
+ "keywords": [
7
+ "mason",
8
+ "bluewombat"
9
+ ],
10
+ "license": "MIT",
11
+ "homepage": "https://github.com/tilap/bluewombat/tree/main/packages/kernel/implementer#readme",
12
+ "bugs": "https://github.com/tilap/bluewombat/issues",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/tilap/bluewombat.git",
16
+ "directory": "packages/kernel/implementer"
17
+ },
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/index.js"
22
+ }
23
+ },
24
+ "types": "./dist/index.d.ts",
25
+ "bin": {
26
+ "implementer": "./dist/cli.js"
27
+ },
28
+ "files": [
29
+ "dist",
30
+ "README.md",
31
+ "SPECS.md"
32
+ ],
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
36
+ "engines": {
37
+ "node": ">=24.20.0"
38
+ },
39
+ "scripts": {
40
+ "lint": "biome check .",
41
+ "format": "biome check --write .",
42
+ "tsc": "tsc --noEmit",
43
+ "test": "tsx --test $(find src -name '*.test.ts')",
44
+ "build": "tsc -p tsconfig.build.json"
45
+ }
46
+ }