halfcycle 0.4.13 → 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.
- package/.claude-plugin/plugin.json +1 -1
- package/bin/bin.bundle.mjs +4105 -369
- package/bin/pre-tool-use-filter.sh +93 -1
- package/dist/bin.d.ts +1 -0
- package/dist/bin.d.ts.map +1 -1
- package/dist/bin.js +0 -0
- package/dist/build-record/pair-io.d.ts +49 -0
- package/dist/build-record/pair-io.d.ts.map +1 -0
- package/dist/build-record/render-change.d.ts +25 -0
- package/dist/build-record/render-change.d.ts.map +1 -0
- package/dist/build-record/render-v2.d.ts +10 -5
- package/dist/build-record/render-v2.d.ts.map +1 -1
- package/dist/build-record/write-change.d.ts +63 -0
- package/dist/build-record/write-change.d.ts.map +1 -0
- package/dist/build-record/write.d.ts +5 -15
- package/dist/build-record/write.d.ts.map +1 -1
- package/dist/change.d.ts +136 -0
- package/dist/change.d.ts.map +1 -0
- package/dist/check-tasks.d.ts +71 -0
- package/dist/check-tasks.d.ts.map +1 -0
- package/dist/claude-plan.d.ts +114 -0
- package/dist/claude-plan.d.ts.map +1 -0
- package/dist/cli-contract.d.ts +12 -1
- package/dist/cli-contract.d.ts.map +1 -1
- package/dist/cli.js +5192 -2132
- package/dist/cli.js.map +3 -3
- package/dist/close-phase.d.ts +53 -1
- package/dist/close-phase.d.ts.map +1 -1
- package/dist/index.js +1529 -911
- package/dist/index.js.map +3 -3
- package/dist/install-manifest.d.ts +11 -1
- package/dist/install-manifest.d.ts.map +1 -1
- package/dist/install.d.ts +58 -1
- package/dist/install.d.ts.map +1 -1
- package/dist/merge-settings.d.ts +21 -2
- package/dist/merge-settings.d.ts.map +1 -1
- package/dist/open-phase.d.ts +1 -1
- package/dist/open-phase.d.ts.map +1 -1
- package/dist/pace.d.ts +138 -0
- package/dist/pace.d.ts.map +1 -0
- package/dist/phase-work.d.ts +37 -0
- package/dist/phase-work.d.ts.map +1 -0
- package/dist/plan.d.ts +5 -2
- package/dist/plan.d.ts.map +1 -1
- package/dist/prove.d.ts +77 -0
- package/dist/prove.d.ts.map +1 -0
- package/dist/review.d.ts +19 -1
- package/dist/review.d.ts.map +1 -1
- package/dist/system-report.d.ts +1 -1
- package/dist/system-report.d.ts.map +1 -1
- package/dist/uninstall.d.ts.map +1 -1
- package/package.json +11 -11
|
@@ -40,7 +40,13 @@ export type ManifestFile = {
|
|
|
40
40
|
* What the installer did to `.claude/settings.json`. `schemaBefore` is present only
|
|
41
41
|
* when an install changed `$schema`, holding the earlier value, or `null` when there
|
|
42
42
|
* was none. The three `*Created` flags say whether an install created the `hooks`,
|
|
43
|
-
* `permissions` and `permissions.deny` keys.
|
|
43
|
+
* `permissions` and `permissions.deny` keys. `statusLineSha256` is the canonical
|
|
44
|
+
* hash (`canonicalSha256`) of the `statusLine` setting as an install last wrote it,
|
|
45
|
+
* or found it still holding what it writes; absent when no run has written one
|
|
46
|
+
* (`builds-paced-to-plan` AC7). Uninstall takes a `statusLine` out only while its
|
|
47
|
+
* hash is still this one, so a status line the person edited, or set themselves,
|
|
48
|
+
* stays. OPTIONAL, like `mcp.entrySha256`: a record an earlier version wrote has no
|
|
49
|
+
* such key, and it must still parse.
|
|
44
50
|
*/
|
|
45
51
|
export interface SettingsRecord {
|
|
46
52
|
readonly created: boolean;
|
|
@@ -52,6 +58,7 @@ export interface SettingsRecord {
|
|
|
52
58
|
readonly hooksCreated: boolean;
|
|
53
59
|
readonly permissionsCreated: boolean;
|
|
54
60
|
readonly denyCreated: boolean;
|
|
61
|
+
readonly statusLineSha256?: string;
|
|
55
62
|
}
|
|
56
63
|
/** What the installer did to `.mcp.json`. `entrySha256` is the canonical hash of the
|
|
57
64
|
* `halfcycle` server entry as last written; absent when no run has written one. */
|
|
@@ -196,6 +203,9 @@ export declare function recordCreatedDir(draft: ManifestDraft, path: string): vo
|
|
|
196
203
|
* What this run observed about `.claude/settings.json`, merged into the record by the
|
|
197
204
|
* carry-forward rules: the three lists are unions, and `created`, `adopted`,
|
|
198
205
|
* `schemaBefore` and each keys-created flag keep the first value recorded.
|
|
206
|
+
* `statusLineSha256` is replaced by a run that wrote the status line (or found its
|
|
207
|
+
* own there), and kept by one that did not, the rule `recordMcp` applies to
|
|
208
|
+
* `entrySha256`.
|
|
199
209
|
*/
|
|
200
210
|
export declare function recordSettings(draft: ManifestDraft, observed: SettingsRecord): void;
|
|
201
211
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-manifest.d.ts","sourceRoot":"","sources":["../src/install-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH,+CAA+C;AAC/C,eAAO,MAAM,oBAAoB,qCAAqC,CAAC;AAEvE,8DAA8D;AAC9D,eAAO,MAAM,uBAAuB,kCAAkC,CAAC;AAEvE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAA;CAAE,CAAC;AAEzD
|
|
1
|
+
{"version":3,"file":"install-manifest.d.ts","sourceRoot":"","sources":["../src/install-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH,+CAA+C;AAC/C,eAAO,MAAM,oBAAoB,qCAAqC,CAAC;AAEvE,8DAA8D;AAC9D,eAAO,MAAM,uBAAuB,kCAAkC,CAAC;AAEvE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAA;CAA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AAG,IAAI,CAazE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAEzG;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAG7G;AAeD,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,eAAe,CAsBpE"}
|
package/dist/install.d.ts
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import { BUNDLE_PIN_REL, MCP_REGISTRATION_REL, MCP_SERVER_KEY, SETTINGS_REL, WRITE_CAPABLE_TOOLS } from '@halfcycle/core';
|
|
25
25
|
import { lineKey, type ManifestFile } from './install-manifest.js';
|
|
26
|
-
import { type ClaudeSettings } from './merge-settings.js';
|
|
26
|
+
import { type ClaudeSettings, type StatusLineSetting } from './merge-settings.js';
|
|
27
27
|
export type EngagementType = 'self-build' | 'client';
|
|
28
28
|
export interface BundlePin {
|
|
29
29
|
version: string;
|
|
@@ -209,6 +209,13 @@ export interface InstallOptions {
|
|
|
209
209
|
* for the same reason.
|
|
210
210
|
*/
|
|
211
211
|
home?: string;
|
|
212
|
+
/**
|
|
213
|
+
* The environment the installer runs in, read for `CLAUDE_CONFIG_DIR` alone: the
|
|
214
|
+
* fourth place a person's own status line may be set (`statusLineSetElsewhere`).
|
|
215
|
+
* Defaults to `process.env`; a test names its own so the machine running it does
|
|
216
|
+
* not decide what the test sees.
|
|
217
|
+
*/
|
|
218
|
+
env?: NodeJS.ProcessEnv;
|
|
212
219
|
/**
|
|
213
220
|
* The account that created the project, for the pin (W-8, #812; E1, #1598). `bin.ts`
|
|
214
221
|
* supplies it on the CREATE arm only, from `confirmActingIdentity`'s answer; every
|
|
@@ -399,6 +406,8 @@ export interface ClosedWriteSet {
|
|
|
399
406
|
readonly gitattributesLines: ReadonlySet<string>;
|
|
400
407
|
/** Path to the SHA-256 of the bytes this version writes there, for every member outside `.halfcycle/` whose bytes do not depend on the project. */
|
|
401
408
|
readonly generatedSha256: ReadonlyMap<string, string>;
|
|
409
|
+
/** The canonical hash of every `statusLine` setting the installer writes (`HALFCYCLE_STATUS_LINE`). */
|
|
410
|
+
readonly statusLineSha256: ReadonlySet<string>;
|
|
402
411
|
}
|
|
403
412
|
/**
|
|
404
413
|
* Deny rules an earlier version generated and this one no longer does. Retiring
|
|
@@ -582,6 +591,54 @@ export declare function settingsParseRefusal(targetRepo: string, err: unknown):
|
|
|
582
591
|
* the developer set after install is theirs and stays.
|
|
583
592
|
*/
|
|
584
593
|
export declare const SETTINGS_SCHEMA = "https://json.schemastore.org/claude-code-settings.json";
|
|
594
|
+
/**
|
|
595
|
+
* THE STATUS LINE THE INSTALLER WRITES (`builds-paced-to-plan` AC7): the runner's
|
|
596
|
+
* `statusline` verb, through the same wrapper and in the same
|
|
597
|
+
* `bash "$CLAUDE_PROJECT_DIR"/<script> <verb>` form as every hook command
|
|
598
|
+
* (`@halfcycle/core`'s `hookCommand`). The verb saves the share of the usage
|
|
599
|
+
* window Claude Code reports to it, and prints the person's own status line in
|
|
600
|
+
* place of Halfcycle's when their settings name one.
|
|
601
|
+
*
|
|
602
|
+
* `"$CLAUDE_PROJECT_DIR"` AND NOT `${CLAUDE_PROJECT_DIR:-.}`: the spec's fallback
|
|
603
|
+
* form was for a status line command run without that variable, and the capture
|
|
604
|
+
* shows it set for one on both machines (`G-11`, premise 1;
|
|
605
|
+
* `packages/runner/test/fixtures/usage-limit/premises.md`).
|
|
606
|
+
*
|
|
607
|
+
* WRITTEN ONLY WHERE NONE IS SET (`statusLineSetElsewhere`, `mergeSettings`), and
|
|
608
|
+
* recorded by its canonical hash, so uninstall takes it out only while it is still
|
|
609
|
+
* exactly this (`uninstall.ts`, `unmergeSettings`). Changing this value is a
|
|
610
|
+
* retirement: the old value's hash stays in `closedWriteSet`'s `statusLineSha256`.
|
|
611
|
+
*/
|
|
612
|
+
export declare const HALFCYCLE_STATUS_LINE: StatusLineSetting;
|
|
613
|
+
/**
|
|
614
|
+
* WHETHER THE PERSON ALREADY HAS A STATUS LINE SOMEWHERE THE INSTALLER DOES NOT WRITE
|
|
615
|
+
* (`builds-paced-to-plan` AC7). Three of the four places the spec names; the fourth,
|
|
616
|
+
* the project's own `.claude/settings.json`, is the file the merge is given, and
|
|
617
|
+
* `mergeSettings` checks it itself:
|
|
618
|
+
*
|
|
619
|
+
* 1. the project's `.claude/settings.local.json`;
|
|
620
|
+
* 2. `~/.claude/settings.json` (`home` stands in for `~`);
|
|
621
|
+
* 3. `$CLAUDE_CONFIG_DIR/settings.json`, only when that variable is set where the
|
|
622
|
+
* installer runs. A leading `~` is the home folder and a relative value is
|
|
623
|
+
* taken from the working folder; symbolic links are followed as the file read
|
|
624
|
+
* follows them, which reads the same file Claude Code would.
|
|
625
|
+
*
|
|
626
|
+
* "SET" IS A `statusLine` KEY, WHATEVER ITS VALUE. And A FILE THAT EXISTS BUT CANNOT
|
|
627
|
+
* BE READ AS A JSON OBJECT COUNTS AS SET: the installer cannot tell whether it names
|
|
628
|
+
* a status line, and writing one over a line the person may have is the direction
|
|
629
|
+
* that hides their own. A missing file is not set.
|
|
630
|
+
*
|
|
631
|
+
* READ ONLY. Nothing here writes, creates or touches any of these files; the
|
|
632
|
+
* installer's only settings write is the project's `.claude/settings.json`.
|
|
633
|
+
*
|
|
634
|
+
* WHAT IT CANNOT SEE: a status line set after install in any of these places, and a
|
|
635
|
+
* `CLAUDE_CONFIG_DIR` folder used only inside Claude Code. The runner's verb covers
|
|
636
|
+
* those at every render by running the person's own line in place of Halfcycle's
|
|
637
|
+
* (AC7, *A person's own status line is never hidden*), except one set later in the
|
|
638
|
+
* project's `settings.local.json`, which Claude Code reads first, so Halfcycle's
|
|
639
|
+
* verb never runs there.
|
|
640
|
+
*/
|
|
641
|
+
export declare function statusLineSetElsewhere(targetRepo: string, home?: string, env?: NodeJS.ProcessEnv): boolean;
|
|
585
642
|
/**
|
|
586
643
|
* Generate the .claude/settings.json hook entries + permissions for the target
|
|
587
644
|
* repo.
|
package/dist/install.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAQH,OAAO,EACL,cAAc,EAGd,oBAAoB,EACpB,cAAc,EAGd,YAAY,EAEZ,mBAAmB,EAEpB,MAAM,iBAAiB,CAAC;AAmBzB,OAAO,EAKL,OAAO,EAiBP,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAGL,KAAK,cAAc,EAEnB,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAO7B,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,QAAQ,CAAC;AAErD,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,cAAc,CAAC;IAC/B;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;;;;;;;OAiBG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;;;OAaG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,gBAAgB;IAC/B;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IACrD,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAUD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,sBAAsB,CA0DzF"}
|
package/dist/merge-settings.d.ts
CHANGED
|
@@ -65,6 +65,16 @@ export interface ClaudePermissions {
|
|
|
65
65
|
ask?: string[];
|
|
66
66
|
[key: string]: unknown;
|
|
67
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* A `statusLine` setting as Claude Code's settings schema records it: a command
|
|
70
|
+
* whose output is the line shown under the prompt. The installer writes one only
|
|
71
|
+
* where the person has none (`builds-paced-to-plan` AC7, `install.ts`'s
|
|
72
|
+
* `HALFCYCLE_STATUS_LINE`).
|
|
73
|
+
*/
|
|
74
|
+
export interface StatusLineSetting {
|
|
75
|
+
type: 'command';
|
|
76
|
+
command: string;
|
|
77
|
+
}
|
|
68
78
|
/** The subset of `.claude/settings.json` this merge reasons about. */
|
|
69
79
|
export interface ClaudeSettings {
|
|
70
80
|
$schema?: string;
|
|
@@ -101,7 +111,8 @@ export declare function withoutHalfcycleCommands<E extends {
|
|
|
101
111
|
hooks: readonly unknown[];
|
|
102
112
|
}>(entry: E, halfcycleCommands: ReadonlySet<string>): E | null;
|
|
103
113
|
/**
|
|
104
|
-
* Merge Halfcycle's generated hook entries into an existing settings object
|
|
114
|
+
* Merge Halfcycle's generated hook entries into an existing settings object, and
|
|
115
|
+
* add Halfcycle's status line where the person has none.
|
|
105
116
|
*
|
|
106
117
|
* @param existing the developer's parsed `.claude/settings.json` (may be `{}`).
|
|
107
118
|
* @param generated Halfcycle's fresh settings object (from `generateSettingsJson`).
|
|
@@ -114,6 +125,14 @@ export declare function withoutHalfcycleCommands<E extends {
|
|
|
114
125
|
* added by Halfcycle (`retiredRulesThisInstallAdded`, install.ts). Each is
|
|
115
126
|
* taken out of the developer's deny list once; see `mergePermissions`.
|
|
116
127
|
* Required, so no caller can forget the retirement by leaving it out.
|
|
128
|
+
* @param statusLine the status line to add (`builds-paced-to-plan` AC7), given
|
|
129
|
+
* only when the caller found none set in any of the person's OTHER
|
|
130
|
+
* settings files (`install.ts`, `statusLineSetElsewhere`). It is added
|
|
131
|
+
* only when `existing` has no `statusLine` key either; a `statusLine` the
|
|
132
|
+
* file already holds, ours or the person's, is kept exactly as it is, by
|
|
133
|
+
* the same shallow copy that keeps every other key of theirs. Leaving it
|
|
134
|
+
* out writes none, which is the safe direction: this merge never adds a
|
|
135
|
+
* status line nobody asked it to.
|
|
117
136
|
*/
|
|
118
|
-
export declare function mergeSettings(existing: ClaudeSettings, generated: ClaudeSettings, retiredOurs: readonly string[]): ClaudeSettings;
|
|
137
|
+
export declare function mergeSettings(existing: ClaudeSettings, generated: ClaudeSettings, retiredOurs: readonly string[], statusLine?: StatusLineSetting): ClaudeSettings;
|
|
119
138
|
//# sourceMappingURL=merge-settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-settings.d.ts","sourceRoot":"","sources":["../src/merge-settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAIH,yEAAyE;AACzE,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,6DAA6D;AAC7D,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED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export declare function writePhaseStamp(engagementId: string, phase: string | nu
|
|
|
213
213
|
* warns without being able to say why.
|
|
214
214
|
* @throws Error on transport failure or a body that is not the expected shape.
|
|
215
215
|
*/
|
|
216
|
-
export declare function openPhase(credential: RepoCredential, phase: string | null, entry: PhaseEntryDecision, home?: string, repoRoot?: string): Promise<OpenedPhase>;
|
|
216
|
+
export declare function openPhase(credential: RepoCredential, phase: string | null, entry: PhaseEntryDecision, home?: string, repoRoot?: string, sortingId?: string): Promise<OpenedPhase>;
|
|
217
217
|
//# sourceMappingURL=open-phase.d.ts.map
|
package/dist/open-phase.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-phase.d.ts","sourceRoot":"","sources":["../src/open-phase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,EAML,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAW3B,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1E;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,sFAAsF;AACtF,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,qDAAqD;IACrD,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;;;OAIG;IACH,YAAY,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACvC,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,aAAa,EAAE,MAAM,CAAC;QACtB,yEAAyE;QACzE,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;QAC/B,SAAS,EAAE,MA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EAAE,MAAM,GACZ,iBAAiB,GAAG,IAAI,CAmB1B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,SAAS,CAC7B,UAAU,EAAE,cAAc,EAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,KAAK,EAAE,kBAAkB,EACzB,IAAI,CAAC,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,WAAW,CAAC,CAkGtB"}
|
package/dist/pace.d.ts
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `npx halfcycle@latest pace [--start <phase> [--agents <n>]] [--repo <root>]`
|
|
3
|
+
* (Safe, lean, fast · E2, feature `builds-paced-to-plan` AC3).
|
|
4
|
+
*
|
|
5
|
+
* A THIN VERB OVER THE RUNNER'S ONE-LINE ANSWER. Every rule about plans, windows,
|
|
6
|
+
* ceilings and the suggested number lives in `packages/runner/src/pace-verb.ts`
|
|
7
|
+
* (`builds-paced-to-plan` AC3, AC4), which this package may not import (INV-001).
|
|
8
|
+
* This file's one job is: spawn `halfcycle-runner pace […]` as a child process, the
|
|
9
|
+
* way `close-phase` spawns `observe` (`runRunnerChild`, `close-phase.ts`), read its
|
|
10
|
+
* one JSON line (`paceRunResultSchema`), and print the sentences
|
|
11
|
+
* `@halfcycle/events`' `pacing.ts` composes from it — never a sentence of its own,
|
|
12
|
+
* because that is the one home every reader of a pace answer shares.
|
|
13
|
+
*
|
|
14
|
+
* ONE DIFFERENCE FROM `runRunnerChild`. That helper captures the child's standard
|
|
15
|
+
* error and discards it, which is right for `observe` and `time` — a send with
|
|
16
|
+
* nothing for a person to read while it runs. `pace --start` is not: the runner
|
|
17
|
+
* writes its first-read notice (`PACE_FIRST_READ`) to standard error the MOMENT a
|
|
18
|
+
* read of this computer's usage records is due, before that read — which can take
|
|
19
|
+
* minutes on a large records folder — completes. A captured-then-replayed line
|
|
20
|
+
* would print "Reading…" only once the reading was already done. So
|
|
21
|
+
* `runPaceChild` pipes the child's standard error too, but FORWARDS each chunk
|
|
22
|
+
* to this process's own the moment it arrives (`prove.ts`'s own command spawn
|
|
23
|
+
* forwards a person's command output the same way), rather than buffering it
|
|
24
|
+
* for a reply built once the child exits. The same live forwarding carries the
|
|
25
|
+
* runner's own usage line or `PACE_AGENTS_TOO_MANY` line straight to the person
|
|
26
|
+
* when the child exits 2 — this file adds nothing on top of either.
|
|
27
|
+
*
|
|
28
|
+
* NOT-PACED IS NOT A FAILURE (`best-effort-not-guarantees`, the owner 2026-10-28):
|
|
29
|
+
* the runner itself answers `not-paced` with exit 0, and this verb keeps that —
|
|
30
|
+
* one plain line naming why pacing is not shown right now, exit 0, never a
|
|
31
|
+
* developer-facing stack of internal words.
|
|
32
|
+
*
|
|
33
|
+
* `pace` ALONE HAS NO "AGENTS ALREADY WORKING" FIGURE TO READ. The runner's
|
|
34
|
+
* one-line answer for a bare `pace` carries `allowedNow` (the pace's allowance
|
|
35
|
+
* less the agents this computer has already seen start, clamped to zero) and
|
|
36
|
+
* `number` (the build's stored target, unadjusted by the pace). Neither is the
|
|
37
|
+
* raw ceiling S1 and S2 are written for (`decision.allowance`, internal to the
|
|
38
|
+
* runner and never serialised). `allowedNow` equals that ceiling exactly when no
|
|
39
|
+
* agent is yet running — the common case, checking before a start — and
|
|
40
|
+
* understates it otherwise; this file uses it as S1's `k` rather than invent a
|
|
41
|
+
* second figure the schema does not carry, and S2's `paceS2Of` already omits its
|
|
42
|
+
* second sentence at `k === 0` rather than assert a wrong count of agents
|
|
43
|
+
* "already working" — so this never prints something false, only sometimes less
|
|
44
|
+
* than the whole truth. `pace --start`'s P1–P7 carry no such gap: `suggestion`
|
|
45
|
+
* is built for exactly that answer and this file reads it whole.
|
|
46
|
+
*
|
|
47
|
+
* SHIPS TO CLIENT DISK inside the CLI (INV-001: Node builtins, `@halfcycle/core`,
|
|
48
|
+
* `@halfcycle/events` only — no network of its own; the one request pacing makes
|
|
49
|
+
* is the runner's, over the credential this verb reads and hands the child's
|
|
50
|
+
* environment). Every string here is a sentence a person reads in their own
|
|
51
|
+
* terminal, so none names an internal register, route or setting; no comment
|
|
52
|
+
* sits beside an object member.
|
|
53
|
+
*/
|
|
54
|
+
import type { RepoCredential } from './open-phase.js';
|
|
55
|
+
/** The usage line, printed for an extra argument or an unknown flag. */
|
|
56
|
+
export declare const PACE_USAGE = "npx halfcycle@latest pace [--start <phase> [--agents <n>]] [--repo <root>]";
|
|
57
|
+
/** What `--start <phase> [--agents <n>]` asked for, or `null` for a bare `pace`. */
|
|
58
|
+
export interface PaceStart {
|
|
59
|
+
readonly phase: string;
|
|
60
|
+
/** The raw token after `--agents`, forwarded to the runner unparsed; it alone
|
|
61
|
+
* owns the rule for what a valid count is (`builds-paced-to-plan` AC6). */
|
|
62
|
+
readonly agents: string | null;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* What the arguments after `pace` came to. At most one `--start <phase>`, at most
|
|
66
|
+
* one `--agents <n>` (only alongside `--start`), and at most one `--repo <root>`;
|
|
67
|
+
* anything else is usage.
|
|
68
|
+
*/
|
|
69
|
+
export type PaceArgs = {
|
|
70
|
+
ok: true;
|
|
71
|
+
start: PaceStart | null;
|
|
72
|
+
repoRoot: string | undefined;
|
|
73
|
+
} | {
|
|
74
|
+
ok: false;
|
|
75
|
+
};
|
|
76
|
+
export declare function parsePaceArgs(argv: readonly string[]): PaceArgs;
|
|
77
|
+
/**
|
|
78
|
+
* The pace child's own deadline. The runner's first read of this computer's usage
|
|
79
|
+
* records can wait up to ten minutes for a scan already running
|
|
80
|
+
* (`pace-verb.ts`'s `PACE_FIRST_READ_WAIT_MS`, which this package cannot import,
|
|
81
|
+
* INV-001) before it answers either way, and a first scan it runs itself can take
|
|
82
|
+
* about as long on a large records folder — so this spawn's own deadline is set
|
|
83
|
+
* well past that, unlike `close-phase.ts`'s `OBSERVE_CHILD_DEADLINE_MS`, which
|
|
84
|
+
* times a send with no such wait.
|
|
85
|
+
*/
|
|
86
|
+
export declare const PACE_CHILD_DEADLINE_MS: number;
|
|
87
|
+
/** What the pace child printed and how it exited. */
|
|
88
|
+
export interface PaceChildOutput {
|
|
89
|
+
readonly code: number;
|
|
90
|
+
readonly stdout: string;
|
|
91
|
+
}
|
|
92
|
+
/** The pieces `runPaceChild` reaches outside itself through; replaced in tests. */
|
|
93
|
+
export interface PaceChildDeps {
|
|
94
|
+
/** Where the child's standard error is forwarded, live, as it arrives. */
|
|
95
|
+
readonly stderr?: {
|
|
96
|
+
write: (chunk: Buffer) => void;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Spawn `halfcycle-runner pace […]`, the way `close-phase` spawns `observe`
|
|
101
|
+
* (same credential environment, same working directory), reading standard output
|
|
102
|
+
* whole (it carries exactly the one line this file parses) while forwarding
|
|
103
|
+
* standard error LIVE, chunk by chunk, as the child writes it — the way
|
|
104
|
+
* `packages/runner/src/prove.ts`'s own command spawn forwards a person's command
|
|
105
|
+
* output, and for the same reason: the module docblock's first-read notice is
|
|
106
|
+
* written before a read that can take minutes, and a captured-then-replayed line
|
|
107
|
+
* would arrive only once the child had already exited. Never throws: a binary
|
|
108
|
+
* that cannot be found, or a child that cannot start, reads as exit 1 with no
|
|
109
|
+
* output — the same shape an answer with no parsable line reads as.
|
|
110
|
+
*/
|
|
111
|
+
export declare function runPaceChild(binary: string | Error, credential: RepoCredential, repoRoot: string, args: readonly string[], deps?: PaceChildDeps): Promise<PaceChildOutput>;
|
|
112
|
+
/** This project is not signed in on this machine — the one line every such refusal prints. */
|
|
113
|
+
export declare const PACE_NOT_CONNECTED_LINE = "halfcycle pace: this project is not signed in on this computer. Run \"npx halfcycle\" in the project folder to sign in.";
|
|
114
|
+
/** The pieces `runPace` reaches outside itself through; replaced in tests. */
|
|
115
|
+
export interface PaceDeps {
|
|
116
|
+
readonly readCredential: (repoRoot: string) => RepoCredential;
|
|
117
|
+
readonly spawnPace: (credential: RepoCredential, repoRoot: string, args: readonly string[]) => Promise<PaceChildOutput>;
|
|
118
|
+
readonly now: () => Date;
|
|
119
|
+
}
|
|
120
|
+
/** What `pace` prints and the exit code it ends with. */
|
|
121
|
+
export interface PaceRun {
|
|
122
|
+
readonly stdout: string;
|
|
123
|
+
readonly stderr: string;
|
|
124
|
+
readonly exitCode: number;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The whole verb. A phase that is not a phase name is usage and exit 1, before
|
|
128
|
+
* anything is read. This machine's credential is read once, handed to the
|
|
129
|
+
* spawned child's environment, and never read twice; a project not signed in on
|
|
130
|
+
* this machine prints `PACE_NOT_CONNECTED_LINE` and exits 1, nothing spawned. The
|
|
131
|
+
* runner's own usage or too-many-agents refusal (exit 2, its line already on the
|
|
132
|
+
* inherited stream) is passed on as-is. A `not-paced` answer, or one with no
|
|
133
|
+
* line this file can parse, is this build's best effort failing softly: one line,
|
|
134
|
+
* exit 0. Otherwise: P1–P7 (`--start`) or the allowed-now line, plus S1 or S2
|
|
135
|
+
* when the answer is slowing or holding (module docblock on their one gap).
|
|
136
|
+
*/
|
|
137
|
+
export declare function runPace(repoRoot: string, start: PaceStart | null, deps: PaceDeps): Promise<PaceRun>;
|
|
138
|
+
//# sourceMappingURL=pace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pace.d.ts","sourceRoot":"","sources":["../src/pace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAgBH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,wEAAwE;AACxE,eAAO,MAAM,UAAU,+EAA+E,CAAC;AAEvG,oFAAoF;AACpF,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;gFAC4E;IAC5E,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,C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,CAAC,GAAG,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,yDAAyD;AACzD,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,CAoCzG"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading one phase's work record from the client (`two-stage-review` AC6;
|
|
3
|
+
* `calls-made-without-asking` AC4; `harness-proven-tests` AC7; safe-lean-fast E23,
|
|
4
|
+
* T-40).
|
|
5
|
+
*
|
|
6
|
+
* ONE READ, TWO CALLERS. `close-phase` reads it once more, after its own open, to say
|
|
7
|
+
* how many calls the review now lists (C6, `close-phase.ts`); `review --show` reads it
|
|
8
|
+
* to print the calls and the checks nobody ran (C1–C5, P12–P13, `review.ts`). This
|
|
9
|
+
* module only fetches and parses `GET …/phases/:phase/work` (the engagement
|
|
10
|
+
* credential; the route's shape is `phaseWorkSchema`'s); the sentences
|
|
11
|
+
* belong to each caller (`work-record.ts`'s own docblock: "each surface owns its own
|
|
12
|
+
* lines"), never to this one.
|
|
13
|
+
*
|
|
14
|
+
* INV-001: this file imports the global `fetch`, Node builtins and `@halfcycle/events`
|
|
15
|
+
* only. SHIPS TO CLIENT DISK inside the CLI.
|
|
16
|
+
*/
|
|
17
|
+
import { type PhaseWork } from '@halfcycle/events';
|
|
18
|
+
import type { RepoCredential } from './open-phase.js';
|
|
19
|
+
/** What reading one phase's work came to. */
|
|
20
|
+
export type PhaseWorkRead = {
|
|
21
|
+
kind: 'work';
|
|
22
|
+
work: PhaseWork;
|
|
23
|
+
} | {
|
|
24
|
+
kind: 'not-signed-in';
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'unreachable';
|
|
27
|
+
};
|
|
28
|
+
/** The address of one phase's work: the engagement credential's own read. */
|
|
29
|
+
export declare function phaseWorkUrl(credential: RepoCredential, phase: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Read one phase's work. Never throws. A body that parses under `phaseWorkSchema` on a
|
|
32
|
+
* 200 is the work; a 401 is not signed in; anything else (no answer, another status, a
|
|
33
|
+
* body this version of the CLI cannot read) is `unreachable`, the same best-effort
|
|
34
|
+
* shape `review.ts`'s `readReview` already gives its own read.
|
|
35
|
+
*/
|
|
36
|
+
export declare function readPhaseWork(credential: RepoCredential, phase: string): Promise<PhaseWorkRead>;
|
|
37
|
+
//# sourceMappingURL=phase-work.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phase-work.d.ts","sourceRoot":"","sources":["../src/phase-work.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,6CAA6C;AAC7C,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,GACzB;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,CAAC;AAI5B,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAK9E;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAsBrG"}
|
package/dist/plan.d.ts
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
* reads, so none names an internal register, route or setting; no comment sits beside
|
|
62
62
|
* an object member.
|
|
63
63
|
*/
|
|
64
|
-
import { type CarriedFromEntry, type PhasePlan, type PhasePlanChange, type PhasePlanProblem, type PlannedScopeState, type RemovalOwedPart, type SystemDescription } from '@halfcycle/events';
|
|
64
|
+
import { type CarriedFromEntry, type PhasePlan, type PhasePlanChange, type PhasePlanProblem, type PlannedScopeState, type PlanMovedUp, type RemovalOwedPart, type SystemDescription } from '@halfcycle/events';
|
|
65
65
|
import { type ShownPlanEntry } from '@halfcycle/core';
|
|
66
66
|
import type { RepoCredential } from './open-phase.js';
|
|
67
67
|
import { type DescriptionVerb, type SystemDeps, type SystemRun } from './system-report.js';
|
|
@@ -131,6 +131,7 @@ export type PlanOutcome = {
|
|
|
131
131
|
changedParts: readonly string[];
|
|
132
132
|
typedApprovalOffered: boolean;
|
|
133
133
|
carriedFrom?: readonly CarriedFromEntry[];
|
|
134
|
+
movedUp?: PlanMovedUp;
|
|
134
135
|
} | {
|
|
135
136
|
kind: 'refused';
|
|
136
137
|
problems: PhasePlanProblem[];
|
|
@@ -190,7 +191,7 @@ export declare function planRefusedLines(verb: DescriptionVerb, phase: string, p
|
|
|
190
191
|
* The line for a phase name `isValidPhaseIdentity` refuses, prefixed by the verb that
|
|
191
192
|
* is running. Nothing has been sent when it is printed.
|
|
192
193
|
*/
|
|
193
|
-
export declare function notAPhaseNameLine(verb: DescriptionVerb | 'review', phase: string): string;
|
|
194
|
+
export declare function notAPhaseNameLine(verb: DescriptionVerb | 'review' | 'pace', phase: string): string;
|
|
194
195
|
/**
|
|
195
196
|
* CL11 — one line per part `docs/system.json` must lose before a new plan is taken
|
|
196
197
|
* (`close-review-and-carry-drop` AC7), prefixed by the verb that is running. Names the
|
|
@@ -214,6 +215,8 @@ export interface PlanDeps extends SystemDeps {
|
|
|
214
215
|
readonly recordShown: (engagementId: string, entry: ShownPlanEntry) => ShownWrite;
|
|
215
216
|
readonly now: () => Date;
|
|
216
217
|
}
|
|
218
|
+
/** A plan's move up to a full phase: its sentence, then what to say next. */
|
|
219
|
+
export declare function movedUpLines(movedUp: PlanMovedUp): string;
|
|
217
220
|
/** The sentence for the phase's state after the plan was recorded. */
|
|
218
221
|
export declare function planStateSentence(state: PlannedScopeState): string;
|
|
219
222
|
/**
|
package/dist/plan.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../src/plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAIH,OAAO,EASL,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,gBAAgB,EAErB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoC,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../src/plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAIH,OAAO,EASL,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,gBAAgB,EAErB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAoC,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAMxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,oBAAoB,CAAC;AAE5B,kFAAkF;AAClF,eAAO,MAAM,UAAU,+D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AChC,YAAY,EAAE,MAAM,GACnB,MAAM,CAcR;AAED;;;GAGG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,SAAS,EACf,WAAW,EAAE,iBAAiB,EAC9B,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,WAAW,GAAE,SAAS,gBAAgB,EAAO,GAC5C,MAAM,CAgBR;AAED;;;;;GAKG;AACH,wBAAsB,OAAO,CAC3B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,QAAQ,GACb,OAAO,CAAC,SAAS,CAAC,CAwFpB"}
|
package/dist/prove.d.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `npx halfcycle@latest prove <phase> <task> --label "<label>" --before -- <test command>`
|
|
3
|
+
* (feature `harness-proven-tests` AC1, the BUNDLE half).
|
|
4
|
+
*
|
|
5
|
+
* THIS FILE DOES NOT CHECK A SINGLE WORD OF THE INVOCATION. Every rule about the
|
|
6
|
+
* words after `prove` — the phase/task or `--change <id>`, `--label`,
|
|
7
|
+
* `--before`/`--after`, `--reason`, the test command itself, the before-action
|
|
8
|
+
* check on that command, the git reads, the counting, the local queue and the
|
|
9
|
+
* send to the control service — belongs to the runner's own `prove` verb
|
|
10
|
+
* (`packages/runner/src/prove.ts`), which this package ships but never imports
|
|
11
|
+
* (INV-001: a bundled binary, reached only as a child process). This module's
|
|
12
|
+
* whole job is the three things only the CLI that is actually ON the person's
|
|
13
|
+
* machine can do:
|
|
14
|
+
*
|
|
15
|
+
* 1. find the vendored runner binary this package shipped
|
|
16
|
+
* (`resolveVendoredBinary`, the way `close-phase` finds it for `observe`
|
|
17
|
+
* and `time`);
|
|
18
|
+
* 2. give the child this project's credential under the names the runner's
|
|
19
|
+
* configuration reader takes it from (`observeChildEnv`, close-phase.ts),
|
|
20
|
+
* so it counts and sends for the same project `close-phase` opens and
|
|
21
|
+
* closes against;
|
|
22
|
+
* 3. pass the child's output — the test command's own stdout and stderr, and
|
|
23
|
+
* the runner's one line about what it did — straight through AS IT COMES,
|
|
24
|
+
* never captured and reprinted, so a long test suite's progress is seen
|
|
25
|
+
* while it runs.
|
|
26
|
+
*
|
|
27
|
+
* `--repo <root>` is this CLI's own convention (every other verb takes it the
|
|
28
|
+
* same way), read and removed from the words BEFORE the `--` that starts the
|
|
29
|
+
* test command — a word spelled `--repo` after that point belongs to the
|
|
30
|
+
* command being proven, not to this CLI, and must never be touched.
|
|
31
|
+
*
|
|
32
|
+
* SHIPS TO CLIENT DISK (INV-001: Node builtins and this package's own modules
|
|
33
|
+
* only — no `@halfcycle/events`, no `fetch`, nothing of the runner's imported).
|
|
34
|
+
* No comment here sits beside an object member.
|
|
35
|
+
*/
|
|
36
|
+
import { Buffer } from 'node:buffer';
|
|
37
|
+
import type { RepoCredential } from './open-phase.js';
|
|
38
|
+
/** The usage lines, printed for a word the runner itself could not read. */
|
|
39
|
+
export declare const PROVE_USAGE: string;
|
|
40
|
+
/**
|
|
41
|
+
* This CLI's own `--repo <root>`, pulled out of the words before the `--` that
|
|
42
|
+
* starts the test command, and the remainder — unchanged, in the order given —
|
|
43
|
+
* to hand the runner's own `prove` verb.
|
|
44
|
+
*
|
|
45
|
+
* Only the part BEFORE the first bare `--` is searched: the words after it are
|
|
46
|
+
* the test command, as the person wrote it, and a command that happens to
|
|
47
|
+
* contain the word `--repo` (as one of its own arguments) must reach the
|
|
48
|
+
* runner exactly as typed.
|
|
49
|
+
*/
|
|
50
|
+
export declare function splitProveInvocation(words: readonly string[]): {
|
|
51
|
+
readonly repoRoot: string | undefined;
|
|
52
|
+
readonly forwarded: readonly string[];
|
|
53
|
+
};
|
|
54
|
+
/** Something a child's output stream can be written to, as `process.stdout` is. */
|
|
55
|
+
export interface ProveChildOutput {
|
|
56
|
+
write(chunk: string | Buffer): unknown;
|
|
57
|
+
}
|
|
58
|
+
/** The seams a test replaces. Production passes neither, and gets the real streams. */
|
|
59
|
+
export interface ProveChildDeps {
|
|
60
|
+
readonly stdout?: ProveChildOutput;
|
|
61
|
+
readonly stderr?: ProveChildOutput;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Spawn the runner binary this package shipped, as `node <binary> prove <words…>`,
|
|
65
|
+
* in `repoRoot`, with the credential under the runner's own environment names
|
|
66
|
+
* (`observeChildEnv`). Every chunk the child writes to its own stdout or stderr
|
|
67
|
+
* is written to `deps.stdout`/`deps.stderr` the moment it arrives — nothing is
|
|
68
|
+
* buffered here — so output streams through live exactly as the real `prove`
|
|
69
|
+
* binary would show it directly.
|
|
70
|
+
*
|
|
71
|
+
* Resolves to the child's own exit code: 0 when the command the runner ran did
|
|
72
|
+
* (whatever it did), 2 when the runner's before-action check refused the
|
|
73
|
+
* command before anything ran, 1 when the child could not be started or ended
|
|
74
|
+
* with no code (killed by a signal).
|
|
75
|
+
*/
|
|
76
|
+
export declare function runProveChild(binary: string, credential: RepoCredential, repoRoot: string, words: readonly string[], deps?: ProveChildDeps): Promise<number>;
|
|
77
|
+
//# sourceMappingURL=prove.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prove.d.ts","sourceRoot":"","sources":["../src/prove.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,4EAA4E;AAC5E,eAAO,MAAM,WAAW,QAGmF,CAAC;AAE5G;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,SAAS,MAAM,EAAE,GACvB;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAelF;AAED,mFAAmF;AACnF,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CACxC;AAED,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IACnC,QAAQ,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAC;CACpC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,cAAc,EAC1B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,IAAI,GAAE,cAAmB,GACxB,OAAO,CAAC,MAAM,CAAC,CA2BjB"}
|
package/dist/review.d.ts
CHANGED
|
@@ -50,8 +50,9 @@
|
|
|
50
50
|
* an object member.
|
|
51
51
|
*/
|
|
52
52
|
import { type ShownReviewEntry } from '@halfcycle/core';
|
|
53
|
-
import { type PhaseReviewView, type ReviewViewPart } from '@halfcycle/events';
|
|
53
|
+
import { type PhaseReviewView, type ReviewViewPart, type PhaseWork } from '@halfcycle/events';
|
|
54
54
|
import type { RepoCredential } from './open-phase.js';
|
|
55
|
+
import type { PhaseWorkRead } from './phase-work.js';
|
|
55
56
|
import type { SystemRun } from './system-report.js';
|
|
56
57
|
/** The usage line, printed for no phase, an extra argument, an unknown flag, or neither mode. */
|
|
57
58
|
export declare const REVIEW_USAGE = "npx halfcycle@latest review <phase> (--show | --answer <part> \"<answer>\") [--repo <root>]";
|
|
@@ -99,6 +100,22 @@ export declare function partStatus(part: ReviewViewPart, round: number): string;
|
|
|
99
100
|
* count, RV1b one line each, then per part RV2–RV6 with RV4a and RV4b, then RV7.
|
|
100
101
|
*/
|
|
101
102
|
export declare function reviewListingLines(view: ReviewedView): string[];
|
|
103
|
+
/** C1, the heading. */
|
|
104
|
+
export declare const CALLS_HEADING = "Calls made without asking you";
|
|
105
|
+
/** C2, straight under C1. Never left out where a call is listed (C3). */
|
|
106
|
+
export declare const CALLS_SUBHEADING: string;
|
|
107
|
+
/** C5, printed in place of a list with nothing in it. */
|
|
108
|
+
export declare const NO_CALLS_LINE = "No agent recorded a call made without asking in this phase.";
|
|
109
|
+
/** P12, the heading. */
|
|
110
|
+
export declare const CHECKS_HEADING = "Checks nobody ran";
|
|
111
|
+
/** P13, straight under P12. */
|
|
112
|
+
export declare const CHECKS_SUBHEADING = "An agent says these pass and Halfcycle never ran them. Accept or reject each one before this phase can close.";
|
|
113
|
+
/**
|
|
114
|
+
* The work section `review --show` prints after the parts: C1–C5, then P12, P13 and
|
|
115
|
+
* each unchecked claim (T-40). `null` when the phase's work could not be read — a
|
|
116
|
+
* best-effort section, never a reason to fail the rest of the listing.
|
|
117
|
+
*/
|
|
118
|
+
export declare function workSectionLines(work: PhaseWork | null, engagementId: string): string[];
|
|
102
119
|
/** RV8: the refusal for a view with no open review, by its state. */
|
|
103
120
|
export declare function rv8Line(view: NoReviewView | Extract<PhaseReviewView, {
|
|
104
121
|
state: 'closed';
|
|
@@ -182,6 +199,7 @@ export declare function sendReviewAnswer(credential: RepoCredential, phase: stri
|
|
|
182
199
|
export interface ReviewDeps {
|
|
183
200
|
readonly readCredential: (repoRoot: string) => RepoCredential;
|
|
184
201
|
readonly readReview: (credential: RepoCredential, phase: string) => Promise<ReviewRead>;
|
|
202
|
+
readonly readWork: (credential: RepoCredential, phase: string) => Promise<PhaseWorkRead>;
|
|
185
203
|
readonly sendAnswer: (credential: RepoCredential, phase: string, body: {
|
|
186
204
|
part: string;
|
|
187
205
|
answer: string;
|