@bluewombat/slot-kit 0.8.0 → 0.9.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.
package/README.md CHANGED
@@ -2,9 +2,8 @@
2
2
 
3
3
  What a slot needs to answer the Transformer that spawned it.
4
4
 
5
- A slot is an opaque command. Implementer spawns a Builder and its Gates,
6
- FeatureBreakdown spawns a Planner, and each one reads argv and writes **one JSON
7
- line on stdout**. That is the whole contract, and nothing here is required to
5
+ A slot is an opaque command. Implementer spawns a Builder and its Gates, and
6
+ each one reads argv and writes **one JSON line on stdout**. That is the whole contract, and nothing here is required to
8
7
  meet it: a shell script that prints the right line is a Gate. This package is
9
8
  the plumbing every slot written in Node would otherwise write again — and it is
10
9
  what keeps the shipped slots from each growing their own version of it.
@@ -12,7 +11,7 @@ what keeps the shipped slots from each growing their own version of it.
12
11
  The contract line must be written with `writeContract` (or an `emit*` that uses
13
12
  it). `process.stdout.write` followed by `process.exit` drops the tail of any
14
13
  payload larger than the pipe buffer — a finished Cursor/Claude stream-json run
15
- used to reach the role as "The agent command wrote no result." Diagnostics on
14
+ reaches the role as "The agent command wrote no result." Diagnostics on
16
15
  stderr use `writeDiagnostic` for the same reason.
17
16
 
18
17
  A slot is a **layer** in a chain it does not own: Implementer ends the chain
@@ -22,8 +21,7 @@ its own — a child that left it would outlive its ceiling. The rule and its
22
21
  check are in [`packages/README.md`](../../README.md).
23
22
 
24
23
  The behaviour a slot must have is specified where its caller is:
25
- [Implementer](../../kernel/implementer/SPECS.md) for Builders and Gates,
26
- [FeatureBreakdown](../../kernel/feature-breakdown/SPECS.md) for Planners.
24
+ [Implementer](../../kernel/implementer/SPECS.md) for Builders and Gates.
27
25
  Slots that use this kit: [`@bluewombat/slots`](../../plugins/slots/README.md).
28
26
 
29
27
  ## Install
@@ -53,25 +51,23 @@ first and the caller's flags appended, and it must not trip over the second set.
53
51
 
54
52
  | Area | Exports |
55
53
  | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
56
- | argv | `ownArgv`, `splitRunner`, `take`, `stageOf`, `GATE_FLAGS`, `BUILDER_FLAGS`, `PLANNER_FLAGS` |
54
+ | argv | `ownArgv`, `splitRunner`, `take`, `stageOf`, `GATE_FLAGS`, `BUILDER_FLAGS` |
57
55
  | options | `parseOptions` — a spec of flags, with choices, fallbacks and repeatable ones |
58
- | stdout | `emitVerdict`, `emitFailure`, `emitPlan`, `emitRefusal`, `writeContract`, `writeDiagnostic` — emits use `writeContract` so `process.exit` cannot truncate |
56
+ | stdout | `emitVerdict`, `emitFailure`, `writeContract`, `writeDiagnostic` — emits use `writeContract` so `process.exit` cannot truncate |
59
57
  | agent CLIs | `findExecutable`, `runAgent`, `readResult`, `serializeRun`, `extrasOf`, `finishRun`, `failureOf` — `serializeRun` always writes `skills` / `usage` / `tools` (`null` = unknown), and `plugins` (`AgentPlugin`) when the wrapper loaded any |
60
58
  | prompts | `renderPrompt`, `readTemplate`, `PROMPT_RULES` — fill is generic; each role owns its names |
61
59
  | roles | `parseRole`, `loadPrompt`, `loadRules`, `fillPrompt`, `spawnFilled`, `transcriptArgs`, `ROLE_OPTIONS` — a role fills its template and hands it to the agent after `--` |
62
60
  | transcript | `openTranscript`, `transcriptFor`, `TRANSCRIPT_PARTS`, `skillsLabel`, `usageLabel`, `toolsFacts`, `pluginsLabel` — optional extras on `write` |
63
- | plans | `checkPlan` |
64
61
  | paths | `pathMatchesGlob` |
65
62
 
66
63
  Each `emit*` takes an optional `write`, which is how they are tested without a
67
64
  process. Everything else is a plain function over its arguments; `finishRun` is
68
65
  the one exception, and ends the process on purpose.
69
66
 
70
- ## The three roles
67
+ ## The two roles
71
68
 
72
69
  | Role | Spawned by | Answers |
73
70
  | ------- | ---------------- | ----------------------------------------------------------------------------- |
74
- | Planner | FeatureBreakdown | `{"subtasks":[…]}`, or `{"outcome":"refused",…}` for an unsplittable one |
75
71
  | Builder | Implementer | Nothing on a pass — the workspace is the answer. `{"outcome":…}` on a failure |
76
72
  | Gate | Implementer | `{"verdict":"pass"}`, or `fail-retryable` / `fail-blocking` with a `report` |
77
73
 
@@ -106,6 +102,5 @@ src/
106
102
  prompt.ts generic fill, rules, agent prompt (already rendered)
107
103
  role.ts parse a role, fill its template, spawn the agent after `--`
108
104
  transcript.ts one file per turn, when a Project asks for one
109
- plan.ts whether a Plan can be acted on
110
105
  glob.ts path globs
111
106
  ```
package/dist/agent.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * What every slot that drives an agent CLI needs, and nothing about any one of
3
- * them. A Builder and a Planner answer different contracts; finding a binary,
3
+ * them. A Builder and a Describer answer different contracts; finding a binary,
4
4
  * running it and reading its result is the same work twice.
5
5
  */
6
6
  /**
package/dist/agent.js CHANGED
@@ -3,7 +3,7 @@ import { accessSync, constants } from "node:fs";
3
3
  import { delimiter, join } from "node:path";
4
4
  /**
5
5
  * What every slot that drives an agent CLI needs, and nothing about any one of
6
- * them. A Builder and a Planner answer different contracts; finding a binary,
6
+ * them. A Builder and a Describer answer different contracts; finding a binary,
7
7
  * running it and reading its result is the same work twice.
8
8
  */
9
9
  /**
package/dist/argv.d.ts CHANGED
@@ -8,8 +8,6 @@
8
8
  export declare const GATE_FLAGS: ReadonlySet<string>;
9
9
  /** Flags Implementer appends after a Builder's own argv. */
10
10
  export declare const BUILDER_FLAGS: ReadonlySet<string>;
11
- /** Flags FeatureBreakdown appends after a Planner's own argv. */
12
- export declare const PLANNER_FLAGS: ReadonlySet<string>;
13
11
  export declare const PUBLISHER_FLAGS: ReadonlySet<string>;
14
12
  export declare const REFRESHER_FLAGS: ReadonlySet<string>;
15
13
  /** Flags Host appends after a Describer's own argv. */
@@ -18,8 +16,7 @@ export declare const MESSAGE_FLAGS: ReadonlySet<string>;
18
16
  * Argv tokens that belong to the slot, not to the Transformer that spawned it.
19
17
  *
20
18
  * `caller` is that Transformer's flag set — `GATE_FLAGS`, `BUILDER_FLAGS`,
21
- * `PLANNER_FLAGS`, `PUBLISHER_FLAGS` or
22
- * `REFRESHER_FLAGS`. Each of them takes a value, so a match consumes two tokens.
19
+ * `PUBLISHER_FLAGS` or `REFRESHER_FLAGS`. Each of them takes a value, so a match consumes two tokens.
23
20
  */
24
21
  export declare function ownArgv(argv: readonly string[], caller: ReadonlySet<string>): string[];
25
22
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"argv.d.ts","sourceRoot":"","sources":["../src/argv.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,yDAAyD;AACzD,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,MAAM,CAQzC,CAAC;AAEH,4DAA4D;AAC5D,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,MAAM,CAS5C,CAAC;AAEH,iEAAiE;AACjE,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,MAAM,CAK5C,CAAC;AAEH,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,CAA0C,CAAC;AAE3F,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,CAAyB,CAAC;AAE1E,uDAAuD;AACvD,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,MAAM,CAK5C,CAAC;AAEH;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CActF;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,SAAS,MAAM,EAAE,GACxB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,GAAG,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,CAU/D;AAED,0EAA0E;AAC1E,wBAAgB,IAAI,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAG9E;AAED,2EAA2E;AAC3E,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAGvD"}
1
+ {"version":3,"file":"argv.d.ts","sourceRoot":"","sources":["../src/argv.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,yDAAyD;AACzD,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,MAAM,CAOzC,CAAC;AAEH,4DAA4D;AAC5D,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,MAAM,CAQ5C,CAAC;AAEH,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,CAA0C,CAAC;AAE3F,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,CAAyB,CAAC;AAE1E,uDAAuD;AACvD,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,MAAM,CAK5C,CAAC;AAEH;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CActF;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,SAAS,MAAM,EAAE,GACxB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,GAAG,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,CAU/D;AAED,0EAA0E;AAC1E,wBAAgB,IAAI,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAG9E;AAED,2EAA2E;AAC3E,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAGvD"}
package/dist/argv.js CHANGED
@@ -10,7 +10,6 @@ export const GATE_FLAGS = new Set([
10
10
  "--attempt",
11
11
  "--gate-id",
12
12
  "--intention",
13
- "--definition-of-done",
14
13
  "--timeout-ms",
15
14
  "--stage",
16
15
  ]);
@@ -19,19 +18,11 @@ export const BUILDER_FLAGS = new Set([
19
18
  "--id",
20
19
  "--attempt",
21
20
  "--intention",
22
- "--definition-of-done",
23
21
  "--report",
24
22
  "--report-from",
25
23
  "--history",
26
24
  "--context",
27
25
  ]);
28
- /** Flags FeatureBreakdown appends after a Planner's own argv. */
29
- export const PLANNER_FLAGS = new Set([
30
- "--key",
31
- "--intention",
32
- "--max-units",
33
- "--title",
34
- ]);
35
26
  export const PUBLISHER_FLAGS = new Set(["--id", "--ref", "--target"]);
36
27
  export const REFRESHER_FLAGS = new Set(["--target"]);
37
28
  /** Flags Host appends after a Describer's own argv. */
@@ -45,8 +36,7 @@ export const MESSAGE_FLAGS = new Set([
45
36
  * Argv tokens that belong to the slot, not to the Transformer that spawned it.
46
37
  *
47
38
  * `caller` is that Transformer's flag set — `GATE_FLAGS`, `BUILDER_FLAGS`,
48
- * `PLANNER_FLAGS`, `PUBLISHER_FLAGS` or
49
- * `REFRESHER_FLAGS`. Each of them takes a value, so a match consumes two tokens.
39
+ * `PUBLISHER_FLAGS` or `REFRESHER_FLAGS`. Each of them takes a value, so a match consumes two tokens.
50
40
  */
51
41
  export function ownArgv(argv, caller) {
52
42
  const out = [];
package/dist/argv.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"argv.js","sourceRoot":"","sources":["../src/argv.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,yDAAyD;AACzD,MAAM,CAAC,MAAM,UAAU,GAAwB,IAAI,GAAG,CAAC;IACrD,MAAM;IACN,WAAW;IACX,WAAW;IACX,aAAa;IACb,sBAAsB;IACtB,cAAc;IACd,SAAS;CACV,CAAC,CAAC;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,aAAa,GAAwB,IAAI,GAAG,CAAC;IACxD,MAAM;IACN,WAAW;IACX,aAAa;IACb,sBAAsB;IACtB,UAAU;IACV,eAAe;IACf,WAAW;IACX,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AC;QACxB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;IACvB,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;AACxD,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,IAAI,CAAC,IAAuB,EAAE,IAAY;IACxD,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;AACjD,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,OAAO,CAAC,IAAuB;IAC7C,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACnC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC;AACpD,CAAC"}
package/dist/emit.d.ts CHANGED
@@ -16,7 +16,7 @@ export type Write = (line: string) => void;
16
16
  * Uses `writeSync` so an immediate `process.exit` cannot drop the tail of a
17
17
  * large JSON line. `process.stdout.write` only fills a userspace buffer that
18
18
  * `process.exit` abandons before the kernel drain finishes — that is how a
19
- * finished agent run used to reach the role as "wrote no result".
19
+ * finished agent run reaches the role as "wrote no result".
20
20
  */
21
21
  export declare function writeContract(line: string): void;
22
22
  /**
@@ -28,8 +28,6 @@ export declare function writeDiagnostic(text: string): void;
28
28
  export declare function emitVerdict(verdict: Verdict, report?: string, write?: Write): void;
29
29
  /** A Builder's failure. A pass says nothing: the workspace is the answer. */
30
30
  export declare function emitFailure(outcome: Failure, report: string, write?: Write): void;
31
- /** A Plan on stdout, and nothing else on it. */
32
- export declare function emitPlan(subtasks: unknown, write?: Write): void;
33
31
  /**
34
32
  * Where the work now is, for the Authority to read.
35
33
  *
@@ -53,7 +51,7 @@ export declare function emitPublishRefusal(reason: string, write?: Write): void;
53
51
  */
54
52
  export declare function emitMessage(subject: string, body?: string, write?: Write): void;
55
53
  /**
56
- * The work line copy now holds what the Authority holds.
54
+ * The work line copy holds what the Authority holds.
57
55
  *
58
56
  * Nothing to bring back is a success, not a special case: a Refresher that
59
57
  * found the copy already up to date answers the same way.
@@ -66,10 +64,4 @@ export declare function emitRefreshed(write?: Write): void;
66
64
  * exists, so this refusal stops the pass rather than letting it run.
67
65
  */
68
66
  export declare function emitRefreshRefusal(reason: string, write?: Write): void;
69
- /**
70
- * The FeatureStandard cannot be split. This is a verdict on the intention, not
71
- * a failure of the slot: a slot that could not answer must exit non-zero and
72
- * say why on stderr, so the Breakdown is retried rather than the feature buried.
73
- */
74
- export declare function emitRefusal(reason: string, write?: Write): void;
75
67
  //# sourceMappingURL=emit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"emit.d.ts","sourceRoot":"","sources":["../src/emit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,kDAAkD;AAClD,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,gBAAgB,GAAG,eAAe,CAAC;AAElE,6DAA6D;AAC7D,MAAM,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAE/C,MAAM,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAE3C;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAElD;AAID,mEAAmE;AACnE,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAK,EAAE,KAAK,GAAE,KAAgB,GAAG,IAAI,CAExF;AA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,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAElD;AAID,mEAAmE;AACnE,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAK,EAAE,KAAK,GAAE,KAAgB,GAAG,IAAI,CAExF;AAED,6EAA6E;AAC7E,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,GAAE,KAAgB,GAAG,IAAI,CAE3F;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,KAAgB,GAAG,IAAI,CAE1E;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,GAAE,KAAgB,GAAG,IAAI,CAEhF;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,GAAE,KAAgB,GAAG,IAAI,CAEzF;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,GAAE,KAAgB,GAAG,IAAI,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,GAAE,KAAgB,GAAG,IAAI,CAEhF"}
package/dist/emit.js CHANGED
@@ -12,7 +12,7 @@ import { writeSync } from "node:fs";
12
12
  * Uses `writeSync` so an immediate `process.exit` cannot drop the tail of a
13
13
  * large JSON line. `process.stdout.write` only fills a userspace buffer that
14
14
  * `process.exit` abandons before the kernel drain finishes — that is how a
15
- * finished agent run used to reach the role as "wrote no result".
15
+ * finished agent run reaches the role as "wrote no result".
16
16
  */
17
17
  export function writeContract(line) {
18
18
  writeSync(1, line);
@@ -33,10 +33,6 @@ export function emitVerdict(verdict, report = "", write = toStdout) {
33
33
  export function emitFailure(outcome, report, write = toStdout) {
34
34
  write(`${JSON.stringify({ outcome, report })}\n`);
35
35
  }
36
- /** A Plan on stdout, and nothing else on it. */
37
- export function emitPlan(subtasks, write = toStdout) {
38
- write(`${JSON.stringify({ subtasks })}\n`);
39
- }
40
36
  /**
41
37
  * Where the work now is, for the Authority to read.
42
38
  *
@@ -66,7 +62,7 @@ export function emitMessage(subject, body, write = toStdout) {
66
62
  write(`${JSON.stringify(body === undefined ? { subject } : { subject, body })}\n`);
67
63
  }
68
64
  /**
69
- * The work line copy now holds what the Authority holds.
65
+ * The work line copy holds what the Authority holds.
70
66
  *
71
67
  * Nothing to bring back is a success, not a special case: a Refresher that
72
68
  * found the copy already up to date answers the same way.
@@ -83,12 +79,4 @@ export function emitRefreshed(write = toStdout) {
83
79
  export function emitRefreshRefusal(reason, write = toStdout) {
84
80
  write(`${JSON.stringify({ outcome: "refused", reason })}\n`);
85
81
  }
86
- /**
87
- * The FeatureStandard cannot be split. This is a verdict on the intention, not
88
- * a failure of the slot: a slot that could not answer must exit non-zero and
89
- * say why on stderr, so the Breakdown is retried rather than the feature buried.
90
- */
91
- export function emitRefusal(reason, write = toStdout) {
92
- write(`${JSON.stringify({ outcome: "refused", code: "not-specifiable", reason })}\n`);
93
- }
94
82
  //# sourceMappingURL=emit.js.map
package/dist/emit.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"emit.js","sourceRoot":"","sources":["../src/emit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAUpC;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;AACrB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;AACrB,CAAC;AAED,MAAM,QAAQ,GAAU,aAA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
2
  * What a slot needs to answer the Transformer that spawned it.
3
3
  *
4
- * A slot is an opaque command: Implementer spawns a Builder and its Gates,
5
- * FeatureBreakdown spawns a Planner, and each one reads argv and writes one
6
- * JSON line on stdout. Nothing here is required to fill a slot — a shell script
4
+ * A slot is an opaque command: Implementer spawns a Builder and its Gates, and
5
+ * each one reads argv and writes one JSON line on stdout. Nothing here is required to fill a slot — a shell script
7
6
  * that prints the right line is a Gate. This is the plumbing that every slot
8
7
  * written in Node would otherwise write again.
9
8
  */
10
9
  export type { AgentExtras, AgentInvocation, AgentPlugin, AgentRun, AgentTools, AgentUsage, SerializeAbout, SerializedRun, } from "./agent.js";
11
10
  export { deserializeRun, extrasOf, findExecutable, readResult, runAgent, serializeRun, } from "./agent.js";
12
- export { BUILDER_FLAGS, GATE_FLAGS, MESSAGE_FLAGS, ownArgv, PLANNER_FLAGS, PUBLISHER_FLAGS, REFRESHER_FLAGS, splitRunner, stageOf, take, } from "./argv.js";
11
+ export { BUILDER_FLAGS, GATE_FLAGS, MESSAGE_FLAGS, ownArgv, PUBLISHER_FLAGS, REFRESHER_FLAGS, splitRunner, stageOf, take, } from "./argv.js";
13
12
  export type { Failure, Verdict, Write } from "./emit.js";
14
- export { emitFailure, emitMessage, emitPlan, emitPublication, emitPublishRefusal, emitRefreshed, emitRefreshRefusal, emitRefusal, emitVerdict, writeContract, writeDiagnostic, } from "./emit.js";
13
+ export { emitFailure, emitMessage, emitPublication, emitPublishRefusal, emitRefreshed, emitRefreshRefusal, emitVerdict, writeContract, writeDiagnostic, } from "./emit.js";
15
14
  export type { FinishedRun, RunJudgement } from "./finish.js";
16
15
  export { blockedReason, failureOf, finishRun, judgeRun } from "./finish.js";
17
16
  export { pathMatchesGlob } from "./glob.js";
18
17
  export type { OptionRule, OptionSpec, OptionValues, ParsedOptions } from "./options.js";
19
18
  export { listOption, parseOptions, textOption } from "./options.js";
20
- export type { CheckedPlan, PlanSubtask } from "./plan.js";
21
- export { checkPlan } from "./plan.js";
22
19
  export type { ReadTemplate, Rendered, TranscriptSubject } from "./prompt.js";
23
20
  export { AGENT_OPTIONS, PROMPT_RULES, readAgentPrompt, readTemplate, renderPrompt, transcriptFor, } from "./prompt.js";
24
21
  export type { AgentAbout, ParsedRole, SpawnedAgent, TranscriptExtras } from "./role.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EACV,WAAW,EACX,eAAe,EACf,WAAW,EACX,QAAQ,EACR,UAAU,EACV,UAAU,EACV,cAAc,EACd,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,cAAc,EACd,QAAQ,EACR,cAAc,EACd,UAAU,EACV,QAAQ,EACR,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,aAAa,EACb,UAAU,EACV,aAAa,EACb,OAAO,EACP,aAAa,EACb,eAAe,EACf,eAAe,EACf,WAAW,EACX,OAAO,EACP,IAAI,GACL,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EACL,WAAW,EACX,WAAW,EACX,QAAQ,EACR,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,aAAa,EACb,eAAe,GAChB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACpE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EACL,aAAa,EACb,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACxF,OAAO,EACL,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,YAAY,EACZ,WAAW,EACX,cAAc,GACf,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EACL,cAAc,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,UAAU,GACX,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,EACV,WAAW,EACX,eAAe,EACf,WAAW,EACX,QAAQ,EACR,UAAU,EACV,UAAU,EACV,cAAc,EACd,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,cAAc,EACd,QAAQ,EACR,cAAc,EACd,UAAU,EACV,QAAQ,EACR,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,aAAa,EACb,UAAU,EACV,aAAa,EACb,OAAO,EACP,eAAe,EACf,eAAe,EACf,WAAW,EACX,OAAO,EACP,IAAI,GACL,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EACL,WAAW,EACX,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,eAAe,GAChB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACpE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EACL,aAAa,EACb,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACxF,OAAO,EACL,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,YAAY,EACZ,WAAW,EACX,cAAc,GACf,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EACL,cAAc,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,UAAU,GACX,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -1,19 +1,17 @@
1
1
  /**
2
2
  * What a slot needs to answer the Transformer that spawned it.
3
3
  *
4
- * A slot is an opaque command: Implementer spawns a Builder and its Gates,
5
- * FeatureBreakdown spawns a Planner, and each one reads argv and writes one
6
- * JSON line on stdout. Nothing here is required to fill a slot — a shell script
4
+ * A slot is an opaque command: Implementer spawns a Builder and its Gates, and
5
+ * each one reads argv and writes one JSON line on stdout. Nothing here is required to fill a slot — a shell script
7
6
  * that prints the right line is a Gate. This is the plumbing that every slot
8
7
  * written in Node would otherwise write again.
9
8
  */
10
9
  export { deserializeRun, extrasOf, findExecutable, readResult, runAgent, serializeRun, } from "./agent.js";
11
- export { BUILDER_FLAGS, GATE_FLAGS, MESSAGE_FLAGS, ownArgv, PLANNER_FLAGS, PUBLISHER_FLAGS, REFRESHER_FLAGS, splitRunner, stageOf, take, } from "./argv.js";
12
- export { emitFailure, emitMessage, emitPlan, emitPublication, emitPublishRefusal, emitRefreshed, emitRefreshRefusal, emitRefusal, emitVerdict, writeContract, writeDiagnostic, } from "./emit.js";
10
+ export { BUILDER_FLAGS, GATE_FLAGS, MESSAGE_FLAGS, ownArgv, PUBLISHER_FLAGS, REFRESHER_FLAGS, splitRunner, stageOf, take, } from "./argv.js";
11
+ export { emitFailure, emitMessage, emitPublication, emitPublishRefusal, emitRefreshed, emitRefreshRefusal, emitVerdict, writeContract, writeDiagnostic, } from "./emit.js";
13
12
  export { blockedReason, failureOf, finishRun, judgeRun } from "./finish.js";
14
13
  export { pathMatchesGlob } from "./glob.js";
15
14
  export { listOption, parseOptions, textOption } from "./options.js";
16
- export { checkPlan } from "./plan.js";
17
15
  export { AGENT_OPTIONS, PROMPT_RULES, readAgentPrompt, readTemplate, renderPrompt, transcriptFor, } from "./prompt.js";
18
16
  export { fillPrompt, loadPrompt, loadRules, parseRole, ROLE_OPTIONS, spawnFilled, transcriptArgs, } from "./role.js";
19
17
  export { openTranscript, pluginsLabel, skillsLabel, TRANSCRIPT_PARTS, toolsFacts, usageLabel, } from "./transcript.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAYH,OAAO,EACL,cAAc,EACd,QAAQ,EACR,cAAc,EACd,UAAU,EACV,QAAQ,EACR,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,aAAa,EACb,UAAU,EACV,aAAa,EACb,OAAO,EACP,aAAa,EACb,eAAe,EACf,eAAe,EACf,WAAW,EACX,OAAO,EACP,IAAI,GACL,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,WAAW,EACX,WAAW,EACX,QAAQ,EACR,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,aAAa,EACb,eAAe,GAChB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EACL,aAAa,EACb,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,aAAa,GACd,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,YAAY,EACZ,WAAW,EACX,cAAc,GACf,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,cAAc,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,UAAU,GACX,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAYH,OAAO,EACL,cAAc,EACd,QAAQ,EACR,cAAc,EACd,UAAU,EACV,QAAQ,EACR,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,aAAa,EACb,UAAU,EACV,aAAa,EACb,OAAO,EACP,eAAe,EACf,eAAe,EACf,WAAW,EACX,OAAO,EACP,IAAI,GACL,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,WAAW,EACX,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,eAAe,GAChB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,EACL,aAAa,EACb,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,aAAa,GACd,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,YAAY,EACZ,WAAW,EACX,cAAc,GACf,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,cAAc,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,UAAU,GACX,MAAM,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@bluewombat/slot-kit",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
- "description": "What a Planner, Builder, or Gate written in Node needs to answer the Transformer that spawned it.",
5
+ "description": "What a Builder or Gate written in Node needs to answer the Transformer that spawned it.",
6
6
  "keywords": [
7
7
  "mason",
8
8
  "bluewombat",
package/dist/plan.d.ts DELETED
@@ -1,23 +0,0 @@
1
- export type PlanSubtask = {
2
- id: string;
3
- intention: string;
4
- definition_of_done: string;
5
- depends_on: string[];
6
- };
7
- export type CheckedPlan = {
8
- ok: true;
9
- subtasks: PlanSubtask[];
10
- } | {
11
- ok: false;
12
- reason: string;
13
- };
14
- /**
15
- * Whether this is a Plan the rest of the system can act on — and, when it is,
16
- * the subtasks typed as one.
17
- *
18
- * Checked here rather than trusted, because a Planner that hands back a broken
19
- * graph has failed at its one job, and the failure should read as this slot's,
20
- * not as a refusal of the feature.
21
- */
22
- export declare function checkPlan(subtasks: unknown, maxUnits?: number): CheckedPlan;
23
- //# sourceMappingURL=plan.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../src/plan.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,WAAW,EAAE,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW,CAkD3E"}
package/dist/plan.js DELETED
@@ -1,94 +0,0 @@
1
- /**
2
- * Whether this is a Plan the rest of the system can act on — and, when it is,
3
- * the subtasks typed as one.
4
- *
5
- * Checked here rather than trusted, because a Planner that hands back a broken
6
- * graph has failed at its one job, and the failure should read as this slot's,
7
- * not as a refusal of the feature.
8
- */
9
- export function checkPlan(subtasks, maxUnits) {
10
- if (!Array.isArray(subtasks) || subtasks.length === 0) {
11
- return { ok: false, reason: "The plan has no subtasks." };
12
- }
13
- if (maxUnits !== undefined && Number.isInteger(maxUnits) && subtasks.length > maxUnits) {
14
- return {
15
- ok: false,
16
- reason: `The plan has ${subtasks.length} subtasks, over the ${maxUnits} allowed.`,
17
- };
18
- }
19
- const ids = new Set();
20
- for (const subtask of subtasks) {
21
- if (subtask === null || typeof subtask !== "object") {
22
- return { ok: false, reason: "A subtask is not an object." };
23
- }
24
- const record = subtask;
25
- for (const field of ["id", "intention", "definition_of_done"]) {
26
- const value = record[field];
27
- if (typeof value !== "string" || value.trim().length === 0) {
28
- return { ok: false, reason: `A subtask has no "${field}".` };
29
- }
30
- }
31
- const id = record.id;
32
- if (ids.has(id)) {
33
- return { ok: false, reason: `Two subtasks share the id "${id}".` };
34
- }
35
- ids.add(id);
36
- if (!Array.isArray(record.depends_on)) {
37
- return { ok: false, reason: `Subtask "${id}" has no depends_on list.` };
38
- }
39
- }
40
- const plan = subtasks;
41
- for (const subtask of plan) {
42
- for (const dependency of subtask.depends_on) {
43
- if (dependency === subtask.id) {
44
- return { ok: false, reason: `Subtask "${subtask.id}" depends on itself.` };
45
- }
46
- if (!ids.has(dependency)) {
47
- return {
48
- ok: false,
49
- reason: `Subtask "${subtask.id}" depends on "${dependency}", which is not in the plan.`,
50
- };
51
- }
52
- }
53
- }
54
- const cycle = findCycle(plan);
55
- if (cycle !== undefined) {
56
- return { ok: false, reason: `The plan has a cycle: ${cycle.join(" → ")}.` };
57
- }
58
- return { ok: true, subtasks: plan };
59
- }
60
- /** Depth-first, so the answer names the loop rather than only reporting one. */
61
- function findCycle(subtasks) {
62
- const edges = new Map(subtasks.map((subtask) => [subtask.id, subtask.depends_on]));
63
- const done = new Set();
64
- const path = [];
65
- const open = new Set();
66
- const walk = (id) => {
67
- if (done.has(id)) {
68
- return undefined;
69
- }
70
- if (open.has(id)) {
71
- return [...path.slice(path.indexOf(id)), id];
72
- }
73
- open.add(id);
74
- path.push(id);
75
- for (const next of edges.get(id) ?? []) {
76
- const found = walk(next);
77
- if (found !== undefined) {
78
- return found;
79
- }
80
- }
81
- path.pop();
82
- open.delete(id);
83
- done.add(id);
84
- return undefined;
85
- };
86
- for (const subtask of subtasks) {
87
- const found = walk(subtask.id);
88
- if (found !== undefined) {
89
- return found;
90
- }
91
- }
92
- return undefined;
93
- }
94
- //# sourceMappingURL=plan.js.map
package/dist/plan.js.map DELETED
@@ -1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