@try-works/dsh-recursive-mode 0.4.5 → 0.4.7
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 +15 -4
- package/lib/client/contract.d.ts +10 -0
- package/lib/client/doc-viewer.d.ts +50 -0
- package/lib/client/spec-sheet-view.d.ts +237 -0
- package/lib/client/spec-sheet.d.ts +103 -0
- package/lib/client/use-live.d.ts +17 -1
- package/lib/client.js +988 -14
- package/lib/errors.d.ts +47 -1
- package/lib/index.js +483 -48
- package/lib/recursive_ask.tool.d.ts +93 -16
- package/lib/recursive_closeout.tool.d.ts +10 -0
- package/lib/recursive_init.tool.d.ts +8 -0
- package/lib/recursive_phase.tool.d.ts +8 -0
- package/lib/recursive_scratch.tool.d.ts +10 -0
- package/lib/recursive_worktree.tool.d.ts +16 -0
- package/lib/run-id.d.ts +62 -0
- package/lib/run-spec.d.ts +78 -0
- package/lib/run-start.d.ts +27 -0
- package/package.json +1 -1
- package/src/client/contract.ts +10 -0
- package/src/client/doc-viewer.tsx +131 -12
- package/src/client/slots.ts +12 -0
- package/src/client/spec-sheet-view.ts +325 -0
- package/src/client/spec-sheet.tsx +409 -0
- package/src/client/styles.ts +298 -1
- package/src/client/use-live.ts +23 -2
- package/src/errors.ts +48 -2
- package/src/recursive_ask.tool.ts +217 -41
- package/src/recursive_closeout.tool.ts +53 -35
- package/src/recursive_init.tool.ts +20 -4
- package/src/recursive_phase.tool.ts +22 -2
- package/src/recursive_scratch.tool.ts +17 -1
- package/src/recursive_worktree.tool.ts +27 -2
- package/src/run-id.ts +100 -0
- package/src/run-spec.ts +148 -0
- package/src/run-start.ts +68 -3
package/lib/errors.d.ts
CHANGED
|
@@ -61,12 +61,30 @@ export declare const TOOL_ERRORS: {
|
|
|
61
61
|
readonly problem: "this gate has no default artifact, so one must be named";
|
|
62
62
|
readonly next: "pass artifact: <file> so the answer has somewhere durable to land";
|
|
63
63
|
};
|
|
64
|
+
readonly RELAY_ONLY_FOR_RUN_START: {
|
|
65
|
+
readonly code: "RM1150";
|
|
66
|
+
readonly klass: "input";
|
|
67
|
+
readonly problem: "relay applies only to the run-start gate, which is the only gate that asks the user-questions channel";
|
|
68
|
+
readonly next: "drop relay for this gate and answer it with one of its own labels, or call recursive_ask with gate: run-start when the decision is whether to start the run";
|
|
69
|
+
};
|
|
64
70
|
readonly MISSING_RUN_ID: {
|
|
65
71
|
readonly code: "RM1101";
|
|
66
72
|
readonly klass: "input";
|
|
67
73
|
readonly problem: "runId is required";
|
|
68
74
|
readonly next: "call recursive_status with no runId to see the latest run id in this workspace";
|
|
69
75
|
};
|
|
76
|
+
/**
|
|
77
|
+
* A run id is the NAME of the run directory and is joined onto the run layer
|
|
78
|
+
* as one path segment, so a path-shaped id is refused before any directory is
|
|
79
|
+
* created. See `run-id.ts` for the rule and for why it is not the runtime that
|
|
80
|
+
* learns to accept a path.
|
|
81
|
+
*/
|
|
82
|
+
readonly BAD_RUN_ID: {
|
|
83
|
+
readonly code: "RM1107";
|
|
84
|
+
readonly klass: "input";
|
|
85
|
+
readonly problem: "runId is not a single directory name";
|
|
86
|
+
readonly next: "pass the run directory name such as 03-something, then call recursive_init again";
|
|
87
|
+
};
|
|
70
88
|
readonly MISSING_ARTIFACT: {
|
|
71
89
|
readonly code: "RM1102";
|
|
72
90
|
readonly klass: "input";
|
|
@@ -133,18 +151,46 @@ export declare const TOOL_ERRORS: {
|
|
|
133
151
|
readonly problem: "the run has unresolved delegated work, so this phase cannot lock yet";
|
|
134
152
|
readonly next: "call recursive_status to see the pending delegation, have the child write its reply.md, then lock again";
|
|
135
153
|
};
|
|
154
|
+
/**
|
|
155
|
+
* THE ORDERING DEFECT, AS A CODE. `recursive_ask gate=run-start` used to raise "start this run or hold?"
|
|
156
|
+
* over a Phase 0 document that was still the scaffold `recursive_init` wrote — placeholder requirements,
|
|
157
|
+
* unchecked lists, `FAIL` gates — and nothing put that document in front of the person either. The owner:
|
|
158
|
+
* *"i was never shown the spec before that so how could i approve if i havent seen it"*. Approving an
|
|
159
|
+
* unfilled template is not a decision about a spec, so the gate refuses to be raised until there is one.
|
|
160
|
+
*/
|
|
161
|
+
readonly RUN_START_SPEC_UNFILLED: {
|
|
162
|
+
readonly code: "RM4404";
|
|
163
|
+
readonly klass: "state";
|
|
164
|
+
readonly problem: "the Phase 0 requirements document is still the unfilled template, so there is no run spec for a person to approve";
|
|
165
|
+
readonly next: "fill the requirements document in (define the requirement ids and their acceptance criteria, and complete the TODO list) and then call recursive_ask with gate: run-start again";
|
|
166
|
+
};
|
|
136
167
|
readonly RUN_START_NO_CHANNEL: {
|
|
137
168
|
readonly code: "RM5502";
|
|
138
169
|
readonly klass: "runtime";
|
|
139
170
|
readonly problem: "the run-start gate needs an answer, and this composition mounts no user-questions channel to ask one directly";
|
|
140
171
|
readonly next: string;
|
|
141
172
|
};
|
|
173
|
+
/**
|
|
174
|
+
* ⚠ RM5503 USED TO LIE. Its text asserted "so no person was asked" for EVERY cause, because the caller
|
|
175
|
+
* that produced it had already thrown the cause away — and a live session showed the cost: the gate
|
|
176
|
+
* failed 22.9 s into the call with a reason nobody could see, and its `Next:` clause prescribed the very
|
|
177
|
+
* call that had just failed, so no route to start a run remained. The problem statement now claims only
|
|
178
|
+
* what the gate knows (no decision came back), and the cause travels in the `detail` the caller
|
|
179
|
+
* supplies. `RUN_START_ANSWER_UNUSABLE` carries the one case this entry must NOT cover: a person was
|
|
180
|
+
* reached and their answer was not an approval.
|
|
181
|
+
*/
|
|
142
182
|
readonly RUN_START_UNANSWERED: {
|
|
143
183
|
readonly code: "RM5503";
|
|
144
184
|
readonly klass: "runtime";
|
|
145
|
-
readonly problem: "the
|
|
185
|
+
readonly problem: "the run-start question reached no decision: the mounted user-questions channel failed before a person answered it";
|
|
146
186
|
readonly next: string;
|
|
147
187
|
};
|
|
188
|
+
readonly RUN_START_ANSWER_UNUSABLE: {
|
|
189
|
+
readonly code: "RM5504";
|
|
190
|
+
readonly klass: "runtime";
|
|
191
|
+
readonly problem: "a person was asked to start this run and their answer was not one of the labels the run-start gate offered";
|
|
192
|
+
readonly next: "call recursive_ask again and have the person choose exactly \"Start run\" or \"Hold\"; a skipped or custom answer is not an approval, and no relayed answer can replace a decision the person made";
|
|
193
|
+
};
|
|
148
194
|
readonly RUNTIME_REFUSED: {
|
|
149
195
|
readonly code: "RM5501";
|
|
150
196
|
readonly klass: "runtime";
|