halfcycle 0.5.3 → 0.7.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/.claude-plugin/plugin.json +1 -1
- package/bin/bin.bundle.mjs +3505 -2162
- package/bin/pre-tool-use-filter.sh +6 -2
- package/dist/bin.js +0 -0
- package/dist/check-criteria.d.ts +57 -0
- package/dist/check-criteria.d.ts.map +1 -0
- package/dist/check-report.d.ts +58 -0
- package/dist/check-report.d.ts.map +1 -0
- package/dist/check-tasks.d.ts +148 -5
- package/dist/check-tasks.d.ts.map +1 -1
- package/dist/cli-contract.d.ts +1 -1
- package/dist/cli-contract.d.ts.map +1 -1
- package/dist/cli.js +2321 -395
- package/dist/cli.js.map +3 -3
- package/dist/close-phase.d.ts +39 -1
- package/dist/close-phase.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +221 -25
- package/dist/index.js.map +3 -3
- package/dist/install.d.ts +7 -2
- package/dist/install.d.ts.map +1 -1
- package/dist/pace.d.ts +19 -4
- package/dist/pace.d.ts.map +1 -1
- package/dist/ready.d.ts +106 -0
- package/dist/ready.d.ts.map +1 -0
- package/dist/route.d.ts +95 -0
- package/dist/route.d.ts.map +1 -0
- package/package.json +11 -11
- package/dist/claude-plan.d.ts +0 -133
- package/dist/claude-plan.d.ts.map +0 -1
package/dist/close-phase.d.ts
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
* SHIPS TO CLIENT DISK inside the CLI: every string here is a sentence a person reads,
|
|
50
50
|
* and no comment sits beside an object member.
|
|
51
51
|
*/
|
|
52
|
-
import { unfinishedStepLine, type AcceptanceOutcome, type OwnerWaitDeclaration, type ObserveRunResult, type OpenReviewAnswer, type TimeRunResult, type TimeSummary, type WorkCall } from '@halfcycle/events';
|
|
52
|
+
import { PHASE_LIMIT_FILENAME, RELAYED_CHOICES_FILENAME, type PhaseExpected, type PhaseWork, unfinishedStepLine, type AcceptanceOutcome, type OwnerWaitDeclaration, type ObserveRunResult, type OpenReviewAnswer, type TimeRunResult, type TimeSummary, type WorkCall } from '@halfcycle/events';
|
|
53
53
|
import type { RepoCredential } from './open-phase.js';
|
|
54
54
|
/**
|
|
55
55
|
* Whether the commit this phase closed at could be read, and if so the full hash
|
|
@@ -395,4 +395,42 @@ export declare function wentAheadCloseLines(calls: readonly WorkCall[]): string[
|
|
|
395
395
|
* this line at all rather than guess at a count it could not read.
|
|
396
396
|
*/
|
|
397
397
|
export declare function callsListedLine(n: number): string;
|
|
398
|
+
/** The project's machine-level pacing folder's files the close reads. */
|
|
399
|
+
export { PHASE_LIMIT_FILENAME, RELAYED_CHOICES_FILENAME };
|
|
400
|
+
export declare const PHASE_MODELS_FILENAME = "phase-models.json";
|
|
401
|
+
/**
|
|
402
|
+
* What was expected of `phase`, from its limit file, or null when there is none, it
|
|
403
|
+
* cannot be read, or it is for another phase. Never throws.
|
|
404
|
+
*/
|
|
405
|
+
export declare function readPhaseExpected(engagementId: string, phase: string, home?: string): PhaseExpected | null;
|
|
406
|
+
/**
|
|
407
|
+
* C1, then each change to the limit as C2 or C3 in the order they happened, from the
|
|
408
|
+
* phase's limit file on this machine. "You" only where a person typed it; a raise taken
|
|
409
|
+
* from Codex as relayed is not here (CX1 lists it). No file is the none-case of C1; a
|
|
410
|
+
* file that cannot be read or is another phase's prints nothing. Nothing is sent.
|
|
411
|
+
*/
|
|
412
|
+
export declare function phaseLimitLines(engagementId: string, phase: string, home?: string): string[];
|
|
413
|
+
/**
|
|
414
|
+
* One CX1 for each choice Codex relayed that let the phase use more, in the order they
|
|
415
|
+
* happened, from the relayed list on this machine. It reads nothing of the limit file, so
|
|
416
|
+
* a phase with no limit still lists its relayed choices. A list that cannot be read or is
|
|
417
|
+
* another phase's prints nothing. Nothing is sent.
|
|
418
|
+
*/
|
|
419
|
+
export declare function relayedChoiceLines(engagementId: string, phase: string, home?: string): string[];
|
|
420
|
+
/**
|
|
421
|
+
* Each task's models as this computer's tally of the coding agent's records saw them,
|
|
422
|
+
* for `phase` (and, when the time summary could be read, for the opening it names),
|
|
423
|
+
* or null when there is no tally for it or it cannot be read. Never throws.
|
|
424
|
+
*/
|
|
425
|
+
export declare function readPhaseModels(engagementId: string, phase: string, openedAt: string | null, home?: string): Readonly<Record<string, Readonly<Record<string, number>>>> | null;
|
|
426
|
+
/**
|
|
427
|
+
* Z1, Z2 and each Z3, printed after the time totals and the usage limit's lines. Z1
|
|
428
|
+
* is the reviews' word, over the phase's work read; Z2 compares the limit file's
|
|
429
|
+
* expectation with the time summary; Z3, Halfcycle's own reading, names the models
|
|
430
|
+
* this computer's tally saw for each task that had an attempt on the cheaper tier.
|
|
431
|
+
* What cannot be read gives that line's none-case or nothing: an unreadable work read
|
|
432
|
+
* prints no Z1 and no Z3, a missing limit file the third Z2, an unreadable summary no
|
|
433
|
+
* Z2, and a missing tally no Z3. Nothing here stops the close.
|
|
434
|
+
*/
|
|
435
|
+
export declare function tierFigureLines(work: PhaseWork | null, expected: PhaseExpected | null, summary: TimeSummary | null, models: Readonly<Record<string, Readonly<Record<string, number>>>> | null): string[];
|
|
398
436
|
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"close-phase.d.ts","sourceRoot":"","sources":["../src/close-phase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAGH,OAAO,EAQL,oBAAoB,EACpB,wBAAwB,EAUxB,KAAK,aAAa,EAElB,KAAK,SAAS,EAYd,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAGzB,KAAK,gBA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AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAU/F;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,IAAI,CAAC,EAAE,MAAM,GACZ,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAWnE;AAOD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,SAAS,GAAG,IAAI,EACtB,QAAQ,EAAE,aAAa,GAAG,IAAI,EAC9B,OAAO,EAAE,WAAW,GAAG,IAAI,EAC3B,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,GACxE,MAAM,EAAE,CAeV"}
|
package/dist/index.d.ts
CHANGED
|
@@ -20,4 +20,5 @@ export { runBootstrapScan, scanLayers, mergeWithRecords, HALFCYCLE_STATE_FORMAT
|
|
|
20
20
|
export type { HalfcycleStateFile, ScannedLayerEntry, ScannedLayerValue } from './scan.js';
|
|
21
21
|
export * from './setup/index.js';
|
|
22
22
|
export * from './build-record/index.js';
|
|
23
|
+
export { readyRowsFromFiles } from './ready.js';
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,qBAAqB,EAAE,UAAU,EAAE,M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MAAM,wBAAwB,CAAC;AAyBhE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnG,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAI1F,cAAc,kBAAkB,CAAC;AAKjC,cAAc,yBAAyB,CAAC;AAKxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -298,13 +298,23 @@ var HOOK_REMEDY = `Run ${SIGN_IN_COMMAND} in the project folder to sign in.`;
|
|
|
298
298
|
|
|
299
299
|
// ../core/dist/task-plan.js
|
|
300
300
|
import { z as z2 } from "zod";
|
|
301
|
+
var TASK_PLAN_FILE = "docs/build-records/task-plan.json";
|
|
302
|
+
var TASK_LIST_FILE = "docs/build-records/build-tasks.json";
|
|
303
|
+
var AGENT_NAME_MAX = 32;
|
|
301
304
|
var TASK_PLAN_TASKS_MAX = 500;
|
|
302
305
|
var TASK_PLAN_ID_MAX = 64;
|
|
303
306
|
var TASK_PLAN_BUILDS_NONE = "none";
|
|
307
|
+
var TASK_PLAN_CRITERIA_NONE = "none";
|
|
308
|
+
var TASK_PLAN_SPECS_NONE = "none";
|
|
309
|
+
var CITATION = /^([a-z0-9][a-z0-9-]{0,63}) AC((?:0|[1-9][0-9]*)[a-z]?)$/;
|
|
310
|
+
function isCriterionCitation(text) {
|
|
311
|
+
return CITATION.test(text);
|
|
312
|
+
}
|
|
304
313
|
var TASK_PLAN_KINDS = ["build", "review", "spec", "walk", "check"];
|
|
305
314
|
var CONTROL_CHARACTER = /[\u0000-\u001f\u007f-\u009f]/;
|
|
306
315
|
var planText = z2.string().refine((text) => !CONTROL_CHARACTER.test(text), { message: "holds a control character" });
|
|
307
316
|
var taskIdSchema = z2.string().min(1).max(TASK_PLAN_ID_MAX).refine((text) => !CONTROL_CHARACTER.test(text), { message: "holds a control character" });
|
|
317
|
+
var agentNameText = z2.string().min(1).max(AGENT_NAME_MAX).refine((text) => !CONTROL_CHARACTER.test(text), { message: "holds a control character" });
|
|
308
318
|
var taskPlanTaskSchema = z2.object({
|
|
309
319
|
id: taskIdSchema,
|
|
310
320
|
kind: z2.enum(TASK_PLAN_KINDS),
|
|
@@ -317,8 +327,27 @@ var taskPlanTaskSchema = z2.object({
|
|
|
317
327
|
}).strict().optional(),
|
|
318
328
|
wholeProject: z2.literal(true).optional(),
|
|
319
329
|
ships: z2.enum(["deploy", "release"]).optional(),
|
|
320
|
-
builds: z2.union([z2.literal(TASK_PLAN_BUILDS_NONE), z2.array(planText)]).optional()
|
|
330
|
+
builds: z2.union([z2.literal(TASK_PLAN_BUILDS_NONE), z2.array(planText)]).optional(),
|
|
331
|
+
criteria: z2.union([z2.literal(TASK_PLAN_CRITERIA_NONE), z2.array(planText)]).optional(),
|
|
332
|
+
whyOutsidePlan: planText.optional(),
|
|
333
|
+
agent: agentNameText.optional(),
|
|
334
|
+
cheapFirst: z2.literal(true).optional(),
|
|
335
|
+
criteriaCheck: z2.literal(true).optional()
|
|
321
336
|
}).strict().superRefine((task, ctx) => {
|
|
337
|
+
if (task.criteriaCheck !== void 0 && (task.kind !== "check" || task.wholeProject !== void 0)) {
|
|
338
|
+
ctx.addIssue({
|
|
339
|
+
code: "custom",
|
|
340
|
+
path: ["criteriaCheck"],
|
|
341
|
+
message: "only a check task that is not a whole-project check is the check against the acceptance criteria"
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
if (task.agent !== void 0 && task.heldBy !== void 0) {
|
|
345
|
+
ctx.addIssue({
|
|
346
|
+
code: "custom",
|
|
347
|
+
path: ["agent"],
|
|
348
|
+
message: "a task a person holds names no crew member"
|
|
349
|
+
});
|
|
350
|
+
}
|
|
322
351
|
if (task.reviews !== void 0 && task.kind !== "review") {
|
|
323
352
|
ctx.addIssue({
|
|
324
353
|
code: "custom",
|
|
@@ -343,6 +372,7 @@ var taskPlanTaskSchema = z2.object({
|
|
|
343
372
|
});
|
|
344
373
|
var taskPlanSchema = z2.object({
|
|
345
374
|
phase: z2.string().min(1).refine((text) => !CONTROL_CHARACTER.test(text), { message: "holds a control character" }),
|
|
375
|
+
specs: z2.union([z2.literal(TASK_PLAN_SPECS_NONE), z2.array(planText)]).optional(),
|
|
346
376
|
tasks: z2.array(taskPlanTaskSchema).max(TASK_PLAN_TASKS_MAX)
|
|
347
377
|
}).strict();
|
|
348
378
|
var taskListRowSchema = z2.object({
|
|
@@ -451,6 +481,37 @@ var AGENT_PROFILES = {
|
|
|
451
481
|
};
|
|
452
482
|
var ALL_HOOK_COMMANDS = new Set(AGENT_IDS.flatMap((id) => [...AGENT_PROFILES[id].commands]));
|
|
453
483
|
|
|
484
|
+
// ../core/dist/worker-report.js
|
|
485
|
+
var WORKER_REPORT_STATUSES = Object.freeze([
|
|
486
|
+
"done",
|
|
487
|
+
"needs-human-verification",
|
|
488
|
+
"blocked-on-human",
|
|
489
|
+
"failed"
|
|
490
|
+
]);
|
|
491
|
+
var WORKER_REPORT_RULE_FIELDS = Object.freeze({
|
|
492
|
+
W1: "Worker report",
|
|
493
|
+
W2: "Status",
|
|
494
|
+
W3: "Head",
|
|
495
|
+
W4: "Head",
|
|
496
|
+
W5: "Verification",
|
|
497
|
+
W6: "Verification",
|
|
498
|
+
W7: "Verification",
|
|
499
|
+
W8: "Unverified"
|
|
500
|
+
});
|
|
501
|
+
var WORKER_REPORT_LINES = Object.freeze({
|
|
502
|
+
noBlock: () => 'There is no "## Worker report" block in this report.',
|
|
503
|
+
statusMissing: (statuses) => `The report has no Status line. Use one of: ${statuses.join(", ")}.`,
|
|
504
|
+
statusUnknown: (found, statuses) => `The report's Status is "${found}". Use one of: ${statuses.join(", ")}.`,
|
|
505
|
+
headMissing: () => "The report has no Head line. Give the full commit id the report is about.",
|
|
506
|
+
headMalformed: (found) => `The report's Head is "${found}", which is not a full commit id.`,
|
|
507
|
+
headDiffers: (found, head) => `The report is about commit ${found}, but the work's head is ${head}. Ask for a report on the current head.`,
|
|
508
|
+
noVerification: () => "The report does not say what was run. List each check under Verification with its exit code.",
|
|
509
|
+
noExitCode: (entry) => `"${entry}" under Verification does not give an exit code.`,
|
|
510
|
+
nonZeroOnDone: (entry) => `"${entry}" exited with a code other than 0, so the work is not done.`,
|
|
511
|
+
noUnverified: () => 'The report has no Unverified line. Say what was not checked, or "nothing".',
|
|
512
|
+
clear: () => "The report is complete and names the commit it is about."
|
|
513
|
+
});
|
|
514
|
+
|
|
454
515
|
// ../events/dist/result.js
|
|
455
516
|
import { z as z3 } from "zod";
|
|
456
517
|
var firedGuardSchema = z3.object({
|
|
@@ -519,8 +580,8 @@ import { z as z5 } from "zod";
|
|
|
519
580
|
// ../events/dist/human-agent.js
|
|
520
581
|
import { z as z4 } from "zod";
|
|
521
582
|
var HUMAN_AGENT = "Human";
|
|
522
|
-
var
|
|
523
|
-
var agentNameSchema = z4.string().min(1).max(
|
|
583
|
+
var AGENT_NAME_MAX2 = AGENT_NAME_MAX;
|
|
584
|
+
var agentNameSchema = z4.string().min(1).max(AGENT_NAME_MAX2);
|
|
524
585
|
|
|
525
586
|
// ../events/dist/state.js
|
|
526
587
|
var utcIso8601 = z5.string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/, "must be a UTC ISO-8601 timestamp ending in Z");
|
|
@@ -1927,9 +1988,54 @@ var workCallRecordSchema = z14.object({
|
|
|
1927
1988
|
message: "says how to undo it exactly when it can be undone",
|
|
1928
1989
|
path: ["how"]
|
|
1929
1990
|
});
|
|
1991
|
+
var WORK_CRITERIA_ROWS_MAX = 500;
|
|
1992
|
+
var workCriterionSchema = agentWorkText.refine((t) => isCriterionCitation(t), {
|
|
1993
|
+
message: "must name a criterion as its spec name, a space, then AC and its number, such as order-intake AC1"
|
|
1994
|
+
});
|
|
1995
|
+
var workCriteriaTestEvidenceSchema = z14.object({
|
|
1996
|
+
kind: z14.literal("test"),
|
|
1997
|
+
task: buildTaskIdSchema,
|
|
1998
|
+
label: agentWorkText,
|
|
1999
|
+
writtenIn: buildTaskIdSchema.optional()
|
|
2000
|
+
}).strict();
|
|
2001
|
+
var workCriteriaPathEvidenceSchema = z14.object({
|
|
2002
|
+
kind: z14.literal("path"),
|
|
2003
|
+
path: agentWorkText
|
|
2004
|
+
}).strict();
|
|
2005
|
+
var workCriteriaWalkEvidenceSchema = z14.object({
|
|
2006
|
+
kind: z14.literal("walk"),
|
|
2007
|
+
leg: agentWorkText
|
|
2008
|
+
}).strict();
|
|
2009
|
+
var workCriteriaEvidenceSchema = z14.discriminatedUnion("kind", [
|
|
2010
|
+
workCriteriaTestEvidenceSchema,
|
|
2011
|
+
workCriteriaPathEvidenceSchema,
|
|
2012
|
+
workCriteriaWalkEvidenceSchema
|
|
2013
|
+
]);
|
|
2014
|
+
var workCriteriaMetRowSchema = z14.object({
|
|
2015
|
+
criterion: workCriterionSchema,
|
|
2016
|
+
edge: z14.literal(true).optional(),
|
|
2017
|
+
status: z14.literal("met"),
|
|
2018
|
+
evidence: workCriteriaEvidenceSchema
|
|
2019
|
+
}).strict();
|
|
2020
|
+
var workCriteriaFixRowSchema = z14.object({
|
|
2021
|
+
criterion: workCriterionSchema,
|
|
2022
|
+
edge: z14.literal(true).optional(),
|
|
2023
|
+
status: z14.literal("fix"),
|
|
2024
|
+
gap: agentWorkText,
|
|
2025
|
+
task: buildTaskIdSchema
|
|
2026
|
+
}).strict();
|
|
2027
|
+
var workCriteriaRowSchema = z14.discriminatedUnion("status", [workCriteriaMetRowSchema, workCriteriaFixRowSchema]);
|
|
2028
|
+
var workCriteriaRecordSchema = z14.object({
|
|
2029
|
+
record: z14.literal("criteria"),
|
|
2030
|
+
subject: workPhaseSubjectSchema,
|
|
2031
|
+
check: buildTaskIdSchema,
|
|
2032
|
+
by: agentNameSchema,
|
|
2033
|
+
rows: z14.array(workCriteriaRowSchema).min(1, { message: "must carry at least one criterion" }).max(WORK_CRITERIA_ROWS_MAX, { message: `can carry at most ${WORK_CRITERIA_ROWS_MAX} criteria` })
|
|
2034
|
+
}).strict();
|
|
1930
2035
|
var workRecordSchema = z14.discriminatedUnion("record", [
|
|
1931
2036
|
workReviewRecordSchema,
|
|
1932
2037
|
workOutcomesRecordSchema,
|
|
2038
|
+
workCriteriaRecordSchema,
|
|
1933
2039
|
workClaimsRecordSchema,
|
|
1934
2040
|
workDiagnosisRecordSchema,
|
|
1935
2041
|
workCallRecordSchema
|
|
@@ -1976,7 +2082,8 @@ var WORK_REFUSAL_STATUS = Object.freeze({
|
|
|
1976
2082
|
held: 409,
|
|
1977
2083
|
"attempt-limit": 409,
|
|
1978
2084
|
"same-attempt": 409,
|
|
1979
|
-
"call-not-recorded": 409
|
|
2085
|
+
"call-not-recorded": 409,
|
|
2086
|
+
"other-version": 409
|
|
1980
2087
|
});
|
|
1981
2088
|
var WORK_REFUSALS = Object.freeze(Object.keys(WORK_REFUSAL_STATUS));
|
|
1982
2089
|
var workRefusalSchema = z14.enum(WORK_REFUSALS);
|
|
@@ -3375,6 +3482,25 @@ function recordedClaimLine(claim) {
|
|
|
3375
3482
|
}
|
|
3376
3483
|
var NO_UNCHECKED_CLAIMS_LINE = "No agent said a check passes that Halfcycle never ran.";
|
|
3377
3484
|
|
|
3485
|
+
// ../events/dist/tier-figures.js
|
|
3486
|
+
import { z as z26 } from "zod";
|
|
3487
|
+
function hasCheaperRole(member) {
|
|
3488
|
+
return member.role === "builder" && member.tier === "standard";
|
|
3489
|
+
}
|
|
3490
|
+
function cheaperRoleNameOf(callsign) {
|
|
3491
|
+
return `${callsign.toLowerCase()}fast`;
|
|
3492
|
+
}
|
|
3493
|
+
var routingRecordSchema = z26.object({
|
|
3494
|
+
phase: z26.string().min(1).max(200),
|
|
3495
|
+
cheapStarted: z26.array(z26.string().min(1).max(200)).max(2e3)
|
|
3496
|
+
}).strict();
|
|
3497
|
+
var PHASE_MODEL_NAME_MAX = 64;
|
|
3498
|
+
var phaseModelsFileSchema = z26.object({
|
|
3499
|
+
phase: z26.string().min(1).max(200),
|
|
3500
|
+
openedAt: z26.string().min(1).max(64),
|
|
3501
|
+
tasks: z26.record(z26.string().min(1).max(200), z26.record(z26.string().min(1).max(PHASE_MODEL_NAME_MAX), z26.number().int().min(0)))
|
|
3502
|
+
}).strict();
|
|
3503
|
+
|
|
3378
3504
|
// dist/engagement-credential.js
|
|
3379
3505
|
import { chmodSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3380
3506
|
import { platform as platform2 } from "node:os";
|
|
@@ -5008,8 +5134,9 @@ function crewProfileBody(role, group, tier) {
|
|
|
5008
5134
|
return `${lines.join("\n")}
|
|
5009
5135
|
`;
|
|
5010
5136
|
}
|
|
5011
|
-
function crewProfileDescription(member) {
|
|
5012
|
-
|
|
5137
|
+
function crewProfileDescription(member, cheaper = false) {
|
|
5138
|
+
const attempt = cheaper ? " (cheaper attempt)" : "";
|
|
5139
|
+
return `${member.callsign}, ${CREW_ROLE_WORDS[member.role]} (${member.discipline})${attempt}, a member of this project's build crew.`;
|
|
5013
5140
|
}
|
|
5014
5141
|
function plainYamlValue(value) {
|
|
5015
5142
|
if (/[\r\n]|: | #|^[-?:,[\]{}#&*!|>'"%@`\s]|\s$/.test(value)) {
|
|
@@ -5030,17 +5157,19 @@ function claudeCrewProfile(member) {
|
|
|
5030
5157
|
crewProfileBody(member.role, member.group, member.tier)
|
|
5031
5158
|
].join("\n");
|
|
5032
5159
|
}
|
|
5033
|
-
function codexCrewProfile(member) {
|
|
5034
|
-
const
|
|
5160
|
+
function codexCrewProfile(member, cheaper = false) {
|
|
5161
|
+
const tier = cheaper ? "fast" : member.tier;
|
|
5162
|
+
const { model, effort } = AGENT_PROFILES.codex.tierModels[tier];
|
|
5035
5163
|
if (effort === void 0)
|
|
5036
|
-
throw new Error(`[halfcycle] Codex's ${
|
|
5037
|
-
const body = crewProfileBody(member.role, member.group,
|
|
5164
|
+
throw new Error(`[halfcycle] Codex's ${tier} tier names no reasoning effort.`);
|
|
5165
|
+
const body = crewProfileBody(member.role, member.group, tier);
|
|
5038
5166
|
if (/[\\"]|[\u0000-\u0009\u000b-\u001f\u007f]/.test(body)) {
|
|
5039
5167
|
throw new Error("[halfcycle] a crew profile body holds a character a Codex role cannot carry as written.");
|
|
5040
5168
|
}
|
|
5169
|
+
const name = cheaper ? cheaperRoleNameOf(member.callsign) : member.callsign.toLowerCase();
|
|
5041
5170
|
return [
|
|
5042
|
-
`name = ${tomlBasicString(
|
|
5043
|
-
`description = ${tomlBasicString(crewProfileDescription(member))}`,
|
|
5171
|
+
`name = ${tomlBasicString(name)}`,
|
|
5172
|
+
`description = ${tomlBasicString(crewProfileDescription(member, cheaper))}`,
|
|
5044
5173
|
`model = ${tomlBasicString(model)}`,
|
|
5045
5174
|
`model_reasoning_effort = ${tomlBasicString(effort)}`,
|
|
5046
5175
|
`developer_instructions = """`,
|
|
@@ -5051,7 +5180,10 @@ function codexCrewProfile(member) {
|
|
|
5051
5180
|
function renderCrewProfiles(roster = CREW_ROSTER) {
|
|
5052
5181
|
return [
|
|
5053
5182
|
...roster.map((member) => ({ rel: crewProfileRel("claude-code", member.callsign), text: claudeCrewProfile(member) })),
|
|
5054
|
-
...roster.filter((member) => member.group !== "reviewer").
|
|
5183
|
+
...roster.filter((member) => member.group !== "reviewer").flatMap((member) => [
|
|
5184
|
+
{ rel: crewProfileRel("codex", member.callsign), text: codexCrewProfile(member) },
|
|
5185
|
+
...hasCheaperRole(member) ? [{ rel: crewProfileRel("codex", `${member.callsign}FAST`), text: codexCrewProfile(member, true) }] : []
|
|
5186
|
+
])
|
|
5055
5187
|
];
|
|
5056
5188
|
}
|
|
5057
5189
|
var __filename = fileURLToPath(import.meta.url);
|
|
@@ -5350,12 +5482,12 @@ function findNotShared(targetRepo, manifest, collidedPaths) {
|
|
|
5350
5482
|
if (ignored === null)
|
|
5351
5483
|
return null;
|
|
5352
5484
|
const sorted = [...ignored].sort((a, b) => a.path < b.path ? -1 : a.path > b.path ? 1 : 0);
|
|
5353
|
-
const
|
|
5485
|
+
const named2 = sorted.find((entry) => entry.path === SETTINGS_REL) ?? sorted[0];
|
|
5354
5486
|
return {
|
|
5355
|
-
path:
|
|
5356
|
-
pattern:
|
|
5357
|
-
source:
|
|
5358
|
-
line:
|
|
5487
|
+
path: named2.path,
|
|
5488
|
+
pattern: named2.pattern,
|
|
5489
|
+
source: named2.source,
|
|
5490
|
+
line: named2.line,
|
|
5359
5491
|
others: sorted.length - 1
|
|
5360
5492
|
};
|
|
5361
5493
|
}
|
|
@@ -5910,14 +6042,19 @@ ${GENERATED_USER_PROMPT_SCOPE_HEADER} the Halfcycle installer, now also for the
|
|
|
5910
6042
|
# <phase>/<part>", "question <phase>/<part>: <words>", "carry <phase>/<part>:
|
|
5911
6043
|
# <words>", "drop <phase>/<part>: <words>", "reject <phase>/<task>: <words>",
|
|
5912
6044
|
# "autonomy on" or "autonomy off". Also lets the person who is typing let one
|
|
5913
|
-
# step Halfcycle paused run once, by typing "allow" as the whole prompt
|
|
6045
|
+
# step Halfcycle paused run once, by typing "allow" as the whole prompt, and change
|
|
6046
|
+
# how a build is paced, by typing "faster", "run 5 agents", "keep 30% free" or
|
|
6047
|
+
# "use up to 70%" as the whole prompt, and answer a phase's usage limit by
|
|
6048
|
+
# typing "keep going", "stop", "limit it to 1.5 times" or "limit it to 300
|
|
6049
|
+
# million" as the whole prompt.
|
|
5914
6050
|
#
|
|
5915
6051
|
# AN ORDINARY PROMPT STARTS NOTHING. This script reads the hook input once and
|
|
5916
6052
|
# looks only at the start of the prompt's value. Unless the prompt begins, after
|
|
5917
6053
|
# any whitespace (typed, or escaped in the input), with "approve ", "send back ",
|
|
5918
6054
|
# "accept ", "question ", "carry ", "drop ", "reject " or "autonomy ", in any case,
|
|
5919
|
-
# or is "allow"
|
|
5920
|
-
#
|
|
6055
|
+
# or is "allow", one of the five pacing phrases or one of the usage-limit phrases
|
|
6056
|
+
# and nothing else but whitespace,
|
|
6057
|
+
# it exits 0 with no output, and Node never starts. A quote inside any other field arrives
|
|
5921
6058
|
# escaped, so no other field (the folder the session is in, for one) can read as
|
|
5922
6059
|
# the start of the prompt.
|
|
5923
6060
|
#
|
|
@@ -5943,7 +6080,7 @@ IFS= read -r -d '' HC_INPUT || true
|
|
|
5943
6080
|
# \\u escape, or as the UTF-8 bytes of a Unicode space. Compared byte for byte.
|
|
5944
6081
|
HC_LEAD='[[:space:]]|\\\\[nrtf]|\\\\u(000[9a-d]|0020|00a0|1680|200[0-9a]|202[89f]|205f|3000|feff)'
|
|
5945
6082
|
HC_LEAD="$HC_LEAD|"$'\\xc2\\xa0|\\xe1\\x9a\\x80|\\xe2\\x80[\\x80-\\x8a\\xa8\\xa9\\xaf]|\\xe2\\x81\\x9f|\\xe3\\x80\\x80|\\xef\\xbb\\xbf'
|
|
5946
|
-
if ! printf '%s' "$HC_INPUT" | LC_ALL=C grep -Eiq "\\"prompt\\"[[:space:]]*:[[:space:]]*\\"($HC_LEAD)*((approve|send back|accept|question|carry|drop|reject|autonomy) |allow($HC_LEAD)*\\")"; then
|
|
6083
|
+
if ! printf '%s' "$HC_INPUT" | LC_ALL=C grep -Eiq "\\"prompt\\"[[:space:]]*:[[:space:]]*\\"($HC_LEAD)*((approve|send back|accept|question|carry|drop|reject|autonomy|decline) |allow($HC_LEAD)*\\"|(faster|go faster|run [0-9]{1,3} agents?|keep [0-9]{1,3}% free|use up to [0-9]{1,3}%|keep going|stop|stop here|limit it to [0-9]{1,9}(\\.[0-9]{1,2})? (times|million|billion|million tokens|billion tokens))($HC_LEAD)*\\")"; then
|
|
5947
6084
|
exit 0
|
|
5948
6085
|
fi
|
|
5949
6086
|
|
|
@@ -8106,10 +8243,10 @@ function leftForYouLines(left, p) {
|
|
|
8106
8243
|
return lines;
|
|
8107
8244
|
}
|
|
8108
8245
|
function shownBy(steps) {
|
|
8109
|
-
const
|
|
8110
|
-
if (
|
|
8246
|
+
const named2 = steps.filter((s) => s.name !== void 0).length;
|
|
8247
|
+
if (named2 === 0)
|
|
8111
8248
|
return "Each is shown by the method's own label for it:";
|
|
8112
|
-
if (
|
|
8249
|
+
if (named2 === steps.length)
|
|
8113
8250
|
return "Each is shown by the method's own name for it:";
|
|
8114
8251
|
return "Each is shown by the method's own name for it, or by its label where the record holds no name:";
|
|
8115
8252
|
}
|
|
@@ -8652,6 +8789,64 @@ async function obtainBuildRecord(credential, repoRoot, phase, io = NODE_RECORD_P
|
|
|
8652
8789
|
function refetchCommand(phase) {
|
|
8653
8790
|
return `${HALFCYCLE_COMMAND} build-record ${quoteForShell(phase)}`;
|
|
8654
8791
|
}
|
|
8792
|
+
|
|
8793
|
+
// dist/check-tasks.js
|
|
8794
|
+
var CHECK_TASKS_USAGE = `${HALFCYCLE_COMMAND} check-tasks <phase> [--with-task-list] [--repo <root>]`;
|
|
8795
|
+
var MISSING_PLAN_LINE = `there is no ${TASK_PLAN_FILE} in this project yet. Run the task-graph step to write it, then run this again.`;
|
|
8796
|
+
var SPEC_FOLDER = LAYER_ARTEFACT_PATHS.l4[0];
|
|
8797
|
+
|
|
8798
|
+
// dist/ready.js
|
|
8799
|
+
var READY_USAGE = `${HALFCYCLE_COMMAND} ready <phase> [--cap <n>] [--repo <root>]`;
|
|
8800
|
+
var STATES_TEXT = buildTaskStateSchema.options.join(", ");
|
|
8801
|
+
var READY_LINES = {
|
|
8802
|
+
start: (id, title) => `Ready to start: ${named(id, title)}`,
|
|
8803
|
+
pastCap: (id, title) => `Ready, but past the number allowed now: ${named(id, title)}`,
|
|
8804
|
+
person: (id, title) => `Waiting on a person: ${named(id, title)}`,
|
|
8805
|
+
noCap: () => "No number was given, so every task that can start is listed.",
|
|
8806
|
+
nothing: () => "Nothing can start now.",
|
|
8807
|
+
noTaskList: () => `There is no task list at ${TASK_LIST_FILE}, so which tasks are done is not known. Write the task list for this phase, then run this again.`,
|
|
8808
|
+
otherPhase: (phase) => `The task list in ${TASK_LIST_FILE} is not for "${phase}", so which tasks are done is not known. Write the task list for this phase, then run this again.`,
|
|
8809
|
+
noState: (id) => `"${id}" in ${TASK_LIST_FILE} does not give its state as one of: ${STATES_TEXT}.`
|
|
8810
|
+
};
|
|
8811
|
+
function named(id, title) {
|
|
8812
|
+
return title === void 0 ? id : `${id}, ${title}`;
|
|
8813
|
+
}
|
|
8814
|
+
var PROGRESS = {
|
|
8815
|
+
pending: "pending",
|
|
8816
|
+
completed: "completed",
|
|
8817
|
+
"in-flight": "other",
|
|
8818
|
+
failed: "other",
|
|
8819
|
+
blocked: "other"
|
|
8820
|
+
};
|
|
8821
|
+
function readyRowsFromFiles(plan, taskList) {
|
|
8822
|
+
const listed = /* @__PURE__ */ new Map();
|
|
8823
|
+
for (const entry of taskList.tasks) {
|
|
8824
|
+
if (!listed.has(entry.id))
|
|
8825
|
+
listed.set(entry.id, entry);
|
|
8826
|
+
}
|
|
8827
|
+
const rows = [];
|
|
8828
|
+
const lines = [];
|
|
8829
|
+
plan.tasks.forEach((task, place) => {
|
|
8830
|
+
const entry = listed.get(task.id);
|
|
8831
|
+
const state = buildTaskStateSchema.safeParse(entry?.state);
|
|
8832
|
+
if (entry === void 0 || !state.success) {
|
|
8833
|
+
lines.push(READY_LINES.noState(task.id));
|
|
8834
|
+
return;
|
|
8835
|
+
}
|
|
8836
|
+
const title = typeof entry.title === "string" && entry.title !== "" ? entry.title : void 0;
|
|
8837
|
+
const minutes = typeof entry.budgetMinutes === "number" ? entry.budgetMinutes : void 0;
|
|
8838
|
+
rows.push({
|
|
8839
|
+
id: task.id,
|
|
8840
|
+
dependsOn: task.dependsOn,
|
|
8841
|
+
progress: PROGRESS[state.data],
|
|
8842
|
+
person: task.heldBy === "person" || entry.agent === HUMAN_AGENT,
|
|
8843
|
+
...minutes === void 0 ? {} : { minutes },
|
|
8844
|
+
tieRank: place,
|
|
8845
|
+
title
|
|
8846
|
+
});
|
|
8847
|
+
});
|
|
8848
|
+
return lines.length > 0 ? { ok: false, lines } : { ok: true, rows };
|
|
8849
|
+
}
|
|
8655
8850
|
export {
|
|
8656
8851
|
BUILD_RECORD_DIR,
|
|
8657
8852
|
CreateEngagementRefused,
|
|
@@ -8687,6 +8882,7 @@ export {
|
|
|
8687
8882
|
readBundlePin,
|
|
8688
8883
|
readRemote,
|
|
8689
8884
|
readRootCommit,
|
|
8885
|
+
readyRowsFromFiles,
|
|
8690
8886
|
refetchCommand,
|
|
8691
8887
|
renderAnchor,
|
|
8692
8888
|
renderBuildRecordV2Markdown,
|