halfcycle 0.4.12 → 0.4.14

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 (54) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/bin/bin.bundle.mjs +9366 -567
  3. package/bin/pre-tool-use-filter.sh +470 -0
  4. package/dist/bin.d.ts +1 -0
  5. package/dist/bin.d.ts.map +1 -1
  6. package/dist/build-record/pair-io.d.ts +49 -0
  7. package/dist/build-record/pair-io.d.ts.map +1 -0
  8. package/dist/build-record/render-change.d.ts +25 -0
  9. package/dist/build-record/render-change.d.ts.map +1 -0
  10. package/dist/build-record/render-v2.d.ts +10 -5
  11. package/dist/build-record/render-v2.d.ts.map +1 -1
  12. package/dist/build-record/write-change.d.ts +63 -0
  13. package/dist/build-record/write-change.d.ts.map +1 -0
  14. package/dist/build-record/write.d.ts +5 -15
  15. package/dist/build-record/write.d.ts.map +1 -1
  16. package/dist/change.d.ts +136 -0
  17. package/dist/change.d.ts.map +1 -0
  18. package/dist/check-tasks.d.ts +71 -0
  19. package/dist/check-tasks.d.ts.map +1 -0
  20. package/dist/claude-plan.d.ts +114 -0
  21. package/dist/claude-plan.d.ts.map +1 -0
  22. package/dist/cli-contract.d.ts +12 -1
  23. package/dist/cli-contract.d.ts.map +1 -1
  24. package/dist/cli.js +9017 -5228
  25. package/dist/cli.js.map +3 -3
  26. package/dist/close-phase.d.ts +113 -10
  27. package/dist/close-phase.d.ts.map +1 -1
  28. package/dist/halfcycle-monorepo.d.ts +26 -0
  29. package/dist/halfcycle-monorepo.d.ts.map +1 -0
  30. package/dist/index.js +1617 -845
  31. package/dist/index.js.map +3 -3
  32. package/dist/install-manifest.d.ts +18 -1
  33. package/dist/install-manifest.d.ts.map +1 -1
  34. package/dist/install.d.ts +225 -3
  35. package/dist/install.d.ts.map +1 -1
  36. package/dist/merge-settings.d.ts +25 -2
  37. package/dist/merge-settings.d.ts.map +1 -1
  38. package/dist/open-phase.d.ts +1 -1
  39. package/dist/open-phase.d.ts.map +1 -1
  40. package/dist/pace.d.ts +138 -0
  41. package/dist/pace.d.ts.map +1 -0
  42. package/dist/phase-work.d.ts +37 -0
  43. package/dist/phase-work.d.ts.map +1 -0
  44. package/dist/plan.d.ts +5 -2
  45. package/dist/plan.d.ts.map +1 -1
  46. package/dist/prove.d.ts +77 -0
  47. package/dist/prove.d.ts.map +1 -0
  48. package/dist/review.d.ts +19 -1
  49. package/dist/review.d.ts.map +1 -1
  50. package/dist/system-report.d.ts +4 -4
  51. package/dist/system-report.d.ts.map +1 -1
  52. package/dist/uninstall.d.ts +4 -1
  53. package/dist/uninstall.d.ts.map +1 -1
  54. package/package.json +1 -1
@@ -26,6 +26,10 @@
26
26
  * the runner's own configuration reader reads. Whatever the child answers, the
27
27
  * open goes ahead: a count that could not be sent is said once by the open
28
28
  * answer's `counted`, never by a line of this verb's own.
29
+ * 3a. What is left of this computer's time record is sent through the runner's
30
+ * `time` verb (`time-and-usage-record` AC4, the unthrottled sender), spawned the
31
+ * same way with the same credential, so a close reads every reply this computer
32
+ * saw. Whatever it answers, the open goes ahead, and nothing is printed about it.
29
33
  * 4. The open request is posted, and the answer is parsed through
30
34
  * `openReviewAnswerSchema`. Each outcome prints its own sentence (CL1–CL6, CL12,
31
35
  * and the typed review's H1), written out below exactly as the spec words them.
@@ -45,7 +49,7 @@
45
49
  * SHIPS TO CLIENT DISK inside the CLI: every string here is a sentence a person reads,
46
50
  * and no comment sits beside an object member.
47
51
  */
48
- import { unfinishedStepLine, type AcceptanceOutcome, type ObserveRunResult, type OpenReviewAnswer } from '@halfcycle/events';
52
+ import { unfinishedStepLine, type AcceptanceOutcome, type OwnerWaitDeclaration, type ObserveRunResult, type OpenReviewAnswer, type TimeRunResult, type TimeSummary } from '@halfcycle/events';
49
53
  import type { RepoCredential } from './open-phase.js';
50
54
  /**
51
55
  * Whether the commit this phase closed at could be read, and if so the full hash
@@ -157,13 +161,46 @@ export declare function observeChildEnv(credential: RepoCredential): NodeJS.Proc
157
161
  */
158
162
  export declare function readObserveLine(stdout: string): ObserveRunResult;
159
163
  /**
160
- * Send a fresh count by running the runner binary this package ships, as a child
161
- * process, in the named repository: `node <binary> observe`. Never throws, never
162
- * prints: a binary that cannot be found (`binary` is the error that said so), a child
163
- * that cannot start, runs past `OBSERVE_CHILD_DEADLINE_MS` or prints no result line
164
- * all read `unreachable`, and the open goes ahead.
164
+ * Run one verb of the runner binary this package ships, as a child process, in the
165
+ * named repository: `node <binary> <args…>`, with `observeChildEnv`. `change done`
166
+ * spawns `observe --change <id>` through it too. Never throws,
167
+ * never prints: a binary that cannot be found (`binary` is the error that said so), a
168
+ * child that cannot start, runs past `OBSERVE_CHILD_DEADLINE_MS` or prints no result
169
+ * line all read `fallback`.
170
+ */
171
+ export declare function runRunnerChild<T>(binary: string | Error, args: readonly string[], credential: RepoCredential, repoRoot: string, readLine: (stdout: string) => T, fallback: T): Promise<T>;
172
+ /**
173
+ * Send a fresh count through the runner's `observe` verb (`runRunnerChild`). Anything
174
+ * but a result line reads `unreachable`, and the open goes ahead.
165
175
  */
166
176
  export declare function runObserveChild(binary: string | Error, credential: RepoCredential, repoRoot: string): Promise<ObserveRunResult>;
177
+ /**
178
+ * The one line the `time` child printed, read through `timeRunResultSchema`, or
179
+ * `unreachable` when stdout holds no such line.
180
+ */
181
+ export declare function readTimeLine(stdout: string): TimeRunResult;
182
+ /**
183
+ * Send what is left of this computer's time record before the close, through the
184
+ * runner's `time` verb (feature `time-and-usage-record` AC4, the unthrottled sender),
185
+ * spawned the way `observe` is and with the same credential. Whatever the child
186
+ * answers, the open goes ahead; nothing is printed about it.
187
+ */
188
+ export declare function runTimeChild(binary: string | Error, credential: RepoCredential, repoRoot: string): Promise<TimeRunResult>;
189
+ /**
190
+ * Send whatever this computer still has queued from earlier `prove` runs,
191
+ * through the runner's own `prove --send-queued` — spawned the way `observe`
192
+ * and `time` are, with the same credential. That sub-verb prints nothing and
193
+ * always exits 0, so there is no line to read here: this call is for its SIDE
194
+ * EFFECT alone, and its result is discarded on purpose.
195
+ *
196
+ * Run before the close's own count and open go out, so a check a worker proved
197
+ * just before closing the phase is not left stranded behind the close. Whatever
198
+ * happens — no vendored binary, the child killed at its own deadline, the
199
+ * service unreachable — the close goes ahead unchanged: a run still unsent
200
+ * stays queued for the next `prove` or close on this computer, exactly as
201
+ * `prove` itself leaves it.
202
+ */
203
+ export declare function runProveQueueChild(binary: string | Error, credential: RepoCredential, repoRoot: string): Promise<void>;
167
204
  /**
168
205
  * A close step refused on this machine, before anything was sent: the request failed
169
206
  * the shared request schema. The CLI prints the message and exits as a usage error.
@@ -194,9 +231,13 @@ export type ReviewOpenAnswer = {
194
231
  kind: 'unreachable';
195
232
  why: string;
196
233
  };
197
- /** What one run of the close step did: the count it sent, the commit it read, the answer. */
234
+ /**
235
+ * What one run of the close step did: the count it sent, what the time record's send
236
+ * answered, the commit it read, the answer.
237
+ */
198
238
  export interface ReviewOpenAttempt {
199
239
  observe: ObserveRunResult;
240
+ time: TimeRunResult;
200
241
  closeCommit: CloseCommitOutcome;
201
242
  open: ReviewOpenAnswer;
202
243
  }
@@ -210,7 +251,8 @@ export interface CloseStepRequest {
210
251
  export declare function reviewOpenUrl(credential: RepoCredential, phase: string): string;
211
252
  /**
212
253
  * Run the close step: check the request, read HEAD, send a fresh count through
213
- * `observe`, then ask the service to open the review of `phase`.
254
+ * `observe`, send what is left of the time record through `sendTime`, then ask the
255
+ * service to open the review of `phase`.
214
256
  *
215
257
  * @param observe the fresh count, run after the request is checked and before the open
216
258
  * is sent. The CLI passes `runObserveChild` over the shipped runner
@@ -219,12 +261,15 @@ export declare function reviewOpenUrl(credential: RepoCredential, phase: string)
219
261
  * @param repoRoot the repository whose HEAD the statements carry. Optional so a caller
220
262
  * with no repository in hand sends no commit rather than resolving the
221
263
  * process's working directory, which would send a stranger's HEAD.
264
+ * @param sendTime what is left of this computer's time record, sent after the count and
265
+ * before the open, so the figures the close reads hold this computer's
266
+ * last reply. The CLI passes `runTimeChild`; absent, nothing is sent.
222
267
  *
223
- * @throws CloseRequestInvalid before anything is sent — no count and no open — when the
268
+ * @throws CloseRequestInvalid before anything is sent — no count, no time and no open — when the
224
269
  * request fails the shared schema or the phase is not a phase name (the one
225
270
  * rule, `phaseNameSchema`); nothing else is thrown — every answer is an outcome.
226
271
  */
227
- export declare function openPhaseReview(credential: RepoCredential, phase: string, request: CloseStepRequest, observe: () => Promise<ObserveRunResult>, repoRoot?: string): Promise<ReviewOpenAttempt>;
272
+ export declare function openPhaseReview(credential: RepoCredential, phase: string, request: CloseStepRequest, observe: () => Promise<ObserveRunResult>, repoRoot?: string, sendTime?: () => Promise<TimeRunResult>): Promise<ReviewOpenAttempt>;
228
273
  /** CL1 — the review is open. */
229
274
  export declare function reviewOpenedLine(phase: string): string;
230
275
  /** CL2 — Halfcycle could not count what the phase changed. */
@@ -269,4 +314,62 @@ export interface CloseStepReport {
269
314
  * its own sentence and exits 1.
270
315
  */
271
316
  export declare function closeStepReport(phase: string, attempt: ReviewOpenAttempt, engagementId: string): CloseStepReport;
317
+ /**
318
+ * The address of a phase's time summary: the phase is one path segment, encoded once,
319
+ * the same route control registers beside the time
320
+ * record's own two (`time-and-usage-record` AC4).
321
+ */
322
+ export declare function readTimeTotalsUrl(credential: RepoCredential, phase: string): string;
323
+ /**
324
+ * Ask the service where `phase`'s time went, AFTER the close step's own unthrottled send
325
+ * (`runTimeChild`, above) already ran — the one read AC3 names. Never throws and never
326
+ * changes `close-phase`'s own outcome: any way this can fail to answer with a readable
327
+ * `timeSummarySchema` — the service unreachable, a non-success status, or a body this
328
+ * version of the CLI cannot parse — reads `null`, same as a phase with no window (404
329
+ * `no-phase-start`), and `timeTotalsLines` prints the spec's own T6 sentence in that
330
+ * one case rather than treating a network hiccup as "nothing was ever recorded".
331
+ */
332
+ export declare function readCloseTimeSummary(credential: RepoCredential, phase: string): Promise<TimeSummary | null>;
333
+ /**
334
+ * T1–T4 and U1–U4 for the phase, then one line per task in graph order, then T5 last
335
+ * when the time tied to no task has anything to show (`timeUntiedHasFigures`, the same
336
+ * gate the console applies) — or, with nothing to read (`summary` is `null`, or
337
+ * `timeSummaryIsEmpty`), T1 then T6, exactly as the console shows the same case.
338
+ *
339
+ * Each task row prints `{task id} {title}` (coordinator ruling on issue #2061):
340
+ * `title` is attached by control's `readTimeSummary`, from the SAME stored graph the
341
+ * board's titles come from (control's `withTaskTitles`) —
342
+ * never a second source. A task no longer in the phase's stored graph carries no
343
+ * `title` (the field is declared-optional on the wire): that row prints the task id
344
+ * alone rather than a missing word.
345
+ */
346
+ export declare function timeTotalsLines(summary: TimeSummary | null): string[];
347
+ /**
348
+ * The address of a phase's declarations, this cycle only: `close-phase`'s own read
349
+ * (`fixed-list-and-one-sitting`, Component design, *Control*), the engagement
350
+ * credential's.
351
+ */
352
+ export declare function closeOwnerWaitDeclarationsUrl(credential: RepoCredential, phase: string): string;
353
+ /**
354
+ * Read the declarations made in this phase's current cycle. Never throws: anything
355
+ * that is not a 200 with a body `ownerWaitDeclarationsSchema` accepts — unreachable, a
356
+ * bad status, a body this CLI cannot read — is `null`, which `ownerWaitCloseLines`
357
+ * reads as a failed read (its own sentence), never as "none were made".
358
+ */
359
+ export declare function readCloseOwnerWaitDeclarations(credential: RepoCredential, phase: string): Promise<readonly OwnerWaitDeclaration[] | null>;
360
+ /**
361
+ * One line per declaration made in the phase, oldest first, after the time totals
362
+ * (`fixed-list-and-one-sitting` AC3's *At close*): `Waited for you: {item} — the agent
363
+ * asked: "{question}"`. A read that failed prints the one sentence that says so and
364
+ * stops there; with no declarations, and nothing failed, this prints nothing — a close
365
+ * with none of them carries on silently, exactly as the spec says.
366
+ */
367
+ export declare function ownerWaitCloseLines(declarations: readonly OwnerWaitDeclaration[] | null): string[];
368
+ /**
369
+ * C6, printed once the review has opened, only when it lists one or more calls — the
370
+ * phase's work read (`phase-work.ts`'s `readPhaseWork`) is the one count, never
371
+ * recomputed here. A failed read of it prints nothing: `bin.ts`'s caller never prints
372
+ * this line at all rather than guess at a count it could not read.
373
+ */
374
+ export declare function callsListedLine(n: number): string;
272
375
  //# sourceMappingURL=close-phase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"close-phase.d.ts","sourceRoot":"","sources":["../src/close-phase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAGH,OAAO,EASL,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAElG;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,4EAA4E;AAC5E,eAAO,MAAM,aAAa,EAAE,gBAAkE,CAAC;AAE/F;;;;;;;;;;GAUG;AACH,MAAM,MAAM,eAAe,GAAG,eAAe,GAAG,WAAW,GAAG,YAAY,CAAC;AAE3E,qFAAqF;AACrF,MAAM,MAAM,iBAAiB,GACzB;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,eAAe,GAAG,WAAW,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE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GAAG,MAAM,EAAE,CAGlG;AAID;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEjD"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Is `dir` the Halfcycle monorepo — the product's own source tree?
3
+ *
4
+ * ONE DEFINITION, TWO READERS. The install arm in `bin.ts` refuses every install form
5
+ * here except the one self-build form (`self-build-install` AC1), and the uninstaller
6
+ * narrows to the self-build write set here (AC8). Both must agree on which folder this
7
+ * is, so the test lives in this one module and neither reader carries a copy.
8
+ *
9
+ * Why it exists at all: a walk ran the bare form intending to print the verb list and
10
+ * installed into the platform repo itself, mutating tracked files and creating
11
+ * `.halfcycle/`, `test/` and two command stubs. It was restored by hand. The bare form
12
+ * installing into the cwd is deliberate and stays, so this does not gate installs in
13
+ * general — a client repo installs exactly as before.
14
+ *
15
+ * Keyed on the root `package.json` name, not on a path — a path check would miss a
16
+ * clone under any other directory name, which is most of them.
17
+ */
18
+ export declare function isHalfcycleMonorepo(dir: string): boolean;
19
+ /**
20
+ * The one install form accepted in the monorepo (`self-build-install` AC1, AC2): an
21
+ * explicit project id AND the word `self-build`. `install <repo> self-build` with no
22
+ * id reads `self-build` as the id and leaves the type to its `client` default, so it
23
+ * is not this form and is refused like every other.
24
+ */
25
+ export declare function isSelfBuildInstallForm(engagementIdArg: string | undefined, engagementTypeArg: string | undefined): boolean;
26
+ //# sourceMappingURL=halfcycle-monorepo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"halfcycle-monorepo.d.ts","sourceRoot":"","sources":["../src/halfcycle-monorepo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAQH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CASxD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,EAAE,iBAAiB,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAE1H"}