halfcycle 0.10.0 → 0.11.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 +1391 -867
- package/commands/agent-teams-orchestration.md +1 -1
- package/commands/consistency-check.md +1 -1
- package/commands/context-update.md +1 -1
- package/commands/halfcycle-design.md +1 -1
- package/commands/halfcycle-setup.md +1 -1
- package/commands/stack-assembly-worker.md +1 -1
- package/commands/task-execution.md +1 -1
- package/commands/task-graph.md +1 -1
- package/commands/write-spec.md +1 -1
- package/dist/bin.js +0 -0
- package/dist/build-record/render-v2.d.ts.map +1 -1
- package/dist/check-tasks.d.ts +28 -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 +2346 -1312
- package/dist/cli.js.map +3 -3
- package/dist/close-phase.d.ts +4 -4
- package/dist/close-phase.d.ts.map +1 -1
- package/dist/index.js +127 -68
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts.map +1 -1
- package/dist/local-allow.d.ts +108 -0
- package/dist/local-allow.d.ts.map +1 -0
- package/dist/open-phase.d.ts +8 -2
- package/dist/open-phase.d.ts.map +1 -1
- package/dist/pace.d.ts +11 -6
- package/dist/pace.d.ts.map +1 -1
- package/dist/review.d.ts +3 -2
- package/dist/review.d.ts.map +1 -1
- package/dist/size.d.ts +72 -0
- package/dist/size.d.ts.map +1 -0
- package/dist/uninstall.d.ts.map +1 -1
- package/package.json +11 -11
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 { 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';
|
|
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 TimeSummaryShare, 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
|
|
@@ -365,7 +365,7 @@ export declare function readCloseTimeSummary(credential: RepoCredential, phase:
|
|
|
365
365
|
* `title` (the field is declared-optional on the wire): that row prints the task id
|
|
366
366
|
* alone rather than a missing word.
|
|
367
367
|
*/
|
|
368
|
-
export declare function timeTotalsLines(summary: TimeSummary | null): string[];
|
|
368
|
+
export declare function timeTotalsLines(summary: TimeSummary | null, details?: boolean): string[];
|
|
369
369
|
/**
|
|
370
370
|
* The address of a phase's declarations, this cycle only: `close-phase`'s own read
|
|
371
371
|
* (`fixed-list-and-one-sitting`, Component design, *Control*), the engagement
|
|
@@ -417,7 +417,7 @@ export declare function readPhaseExpected(engagementId: string, phase: string, h
|
|
|
417
417
|
* from Codex as relayed is not here (CX1 lists it). No file is the none-case of C1; a
|
|
418
418
|
* file that cannot be read or is another phase's prints nothing. Nothing is sent.
|
|
419
419
|
*/
|
|
420
|
-
export declare function phaseLimitLines(engagementId: string, phase: string, home?: string): string[];
|
|
420
|
+
export declare function phaseLimitLines(engagementId: string, phase: string, home?: string, share?: TimeSummaryShare | null, details?: boolean): string[];
|
|
421
421
|
/**
|
|
422
422
|
* One CX1 for each choice Codex relayed that let the phase use more, in the order they
|
|
423
423
|
* happened, from the relayed list on this machine. It reads nothing of the limit file, so
|
|
@@ -440,5 +440,5 @@ export declare function readPhaseModels(engagementId: string, phase: string, ope
|
|
|
440
440
|
* prints no Z1 and no Z3, a missing limit file the third Z2, an unreadable summary no
|
|
441
441
|
* Z2, and a missing tally no Z3. Nothing here stops the close.
|
|
442
442
|
*/
|
|
443
|
-
export declare function tierFigureLines(work: PhaseWork | null, expected: PhaseExpected | null, summary: TimeSummary | null, models: Readonly<Record<string, Readonly<Record<string, number>>>> | null): string[];
|
|
443
|
+
export declare function tierFigureLines(work: PhaseWork | null, expected: PhaseExpected | null, summary: TimeSummary | null, models: Readonly<Record<string, Readonly<Record<string, number>>>> | null, details?: boolean): string[];
|
|
444
444
|
//# 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,EASL,oBAAoB,EACpB,wBAAwB,EAYxB,KAAK,aAAa,EAElB,KAAK,SAAS,EAYd,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAGzB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAmBlB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EAGrB,KAAK,QAAQ,EACd,MAAM,mBAAmB,CAAC;AAI3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAKtD;;;;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,C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,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,EACzE,OAAO,UAAQ,GACd,MAAM,EAAE,CAmBV"}
|
package/dist/index.js
CHANGED
|
@@ -2513,6 +2513,35 @@ var CREW_ROSTER = [
|
|
|
2513
2513
|
];
|
|
2514
2514
|
var CREW_ROSTER_SIZE = CREW_ROSTER.length;
|
|
2515
2515
|
var CREW_CALLSIGNS = CREW_ROSTER.map((member) => member.callsign);
|
|
2516
|
+
function crewMemberOf(callsign) {
|
|
2517
|
+
return CREW_ROSTER.find((member) => member.callsign === callsign);
|
|
2518
|
+
}
|
|
2519
|
+
var CREW_ROLE_SINGULAR = {
|
|
2520
|
+
"business-analyst": "business analyst",
|
|
2521
|
+
architect: "architect",
|
|
2522
|
+
"spec-writer": "spec writer",
|
|
2523
|
+
builder: "builder",
|
|
2524
|
+
"context-docs": "context and docs writer",
|
|
2525
|
+
"spec-reviewer": "spec reviewer",
|
|
2526
|
+
"code-test-reviewer": "code and test reviewer",
|
|
2527
|
+
"delivery-lead": "delivery lead",
|
|
2528
|
+
"quality-lead": "quality lead"
|
|
2529
|
+
};
|
|
2530
|
+
function crewNameWordsOf(name) {
|
|
2531
|
+
const member = crewMemberOf(name);
|
|
2532
|
+
return member === void 0 ? name : `${member.callsign}, ${CREW_ROLE_SINGULAR[member.role]}`;
|
|
2533
|
+
}
|
|
2534
|
+
var SMALL_CREW = Object.freeze([
|
|
2535
|
+
"SOFIA",
|
|
2536
|
+
"WREN",
|
|
2537
|
+
"ADA",
|
|
2538
|
+
"MILO",
|
|
2539
|
+
"IRIS",
|
|
2540
|
+
"LEX",
|
|
2541
|
+
"VERA",
|
|
2542
|
+
"CASS",
|
|
2543
|
+
"ATLAS"
|
|
2544
|
+
]);
|
|
2516
2545
|
var crewLayerSchema = methodLayerSchema.extract(["l0", "l1", "l2", "l3", "l4", "l5"]);
|
|
2517
2546
|
var crewRoleLayersSchema = z15.object({
|
|
2518
2547
|
leads: z15.array(crewLayerSchema),
|
|
@@ -3210,7 +3239,36 @@ var phaseRecordResponseSchema = z22.discriminatedUnion("outcome", [
|
|
|
3210
3239
|
]);
|
|
3211
3240
|
|
|
3212
3241
|
// ../events/dist/owner-waits.js
|
|
3242
|
+
import { z as z24 } from "zod";
|
|
3243
|
+
|
|
3244
|
+
// ../events/dist/owner-wait-answer.js
|
|
3213
3245
|
import { z as z23 } from "zod";
|
|
3246
|
+
var ownerWaitShortIdSchema = z23.string().regex(/^[0-9a-f]{8}$/);
|
|
3247
|
+
var OWNER_WAIT_ANSWER_ACTS = ["approve", "decline"];
|
|
3248
|
+
var ownerWaitAnswerActSchema = z23.enum(OWNER_WAIT_ANSWER_ACTS);
|
|
3249
|
+
var ownerWaitChatRequestSchema = z23.discriminatedUnion("act", [
|
|
3250
|
+
z23.object({ act: z23.literal("approve"), wait: ownerWaitShortIdSchema }).strict(),
|
|
3251
|
+
z23.object({ act: z23.literal("decline"), wait: ownerWaitShortIdSchema, note: scopeNoteWireSchema }).strict()
|
|
3252
|
+
]);
|
|
3253
|
+
function bareOutcome(outcome) {
|
|
3254
|
+
return z23.object({ outcome: z23.literal(outcome) }).strict();
|
|
3255
|
+
}
|
|
3256
|
+
var ownerWaitChatResultSchema = z23.discriminatedUnion("outcome", [
|
|
3257
|
+
z23.object({
|
|
3258
|
+
outcome: z23.literal("recorded"),
|
|
3259
|
+
act: ownerWaitAnswerActSchema,
|
|
3260
|
+
question: z23.string().min(1)
|
|
3261
|
+
}).strict(),
|
|
3262
|
+
z23.object({ outcome: z23.literal("refused"), problems: z23.array(systemDescriptionProblemSchema).min(1) }).strict(),
|
|
3263
|
+
bareOutcome("not-owner"),
|
|
3264
|
+
bareOutcome("no-owner"),
|
|
3265
|
+
bareOutcome("not-found"),
|
|
3266
|
+
bareOutcome("ambiguous"),
|
|
3267
|
+
bareOutcome("not-offered"),
|
|
3268
|
+
bareOutcome("unavailable")
|
|
3269
|
+
]);
|
|
3270
|
+
|
|
3271
|
+
// ../events/dist/owner-waits.js
|
|
3214
3272
|
var OWNER_WAIT_ITEMS = Object.freeze([
|
|
3215
3273
|
Object.freeze({ id: "delete-users-data", words: "Deleting or replacing data people already have." }),
|
|
3216
3274
|
Object.freeze({
|
|
@@ -3223,27 +3281,27 @@ var OWNER_WAIT_ITEMS = Object.freeze([
|
|
|
3223
3281
|
Object.freeze({ id: "change-standing-rule", words: "Changing a standing rule." })
|
|
3224
3282
|
]);
|
|
3225
3283
|
var OWNER_WAIT_ITEM_IDS = Object.freeze(OWNER_WAIT_ITEMS.map((item) => item.id));
|
|
3226
|
-
var ownerWaitItemIdSchema =
|
|
3284
|
+
var ownerWaitItemIdSchema = z24.enum(OWNER_WAIT_ITEM_IDS);
|
|
3227
3285
|
var OWNER_WAIT_FIXED_COUNT = OWNER_WAIT_ITEMS.length;
|
|
3228
3286
|
var OWNER_WAIT_ADDITIONS_MAX = 20;
|
|
3229
3287
|
var OWNER_WAIT_TEXT_MAX = 240;
|
|
3230
|
-
var ownerWaitItemRefSchema =
|
|
3231
|
-
|
|
3232
|
-
|
|
3288
|
+
var ownerWaitItemRefSchema = z24.union([
|
|
3289
|
+
z24.number().int().min(1),
|
|
3290
|
+
z24.string().uuid({ message: "must be a number from 1 to 6, or the id shown beside an added item" })
|
|
3233
3291
|
]);
|
|
3234
3292
|
var ownerWaitText = descriptionText(OWNER_WAIT_TEXT_MAX);
|
|
3235
|
-
var ownerWaitAddRequestSchema =
|
|
3236
|
-
engagementId:
|
|
3293
|
+
var ownerWaitAddRequestSchema = z24.object({
|
|
3294
|
+
engagementId: z24.string().min(1),
|
|
3237
3295
|
text: ownerWaitText,
|
|
3238
3296
|
reason: ownerWaitText
|
|
3239
3297
|
}).strict();
|
|
3240
|
-
var ownerWaitAddResultSchema =
|
|
3241
|
-
|
|
3242
|
-
|
|
3298
|
+
var ownerWaitAddResultSchema = z24.discriminatedUnion("outcome", [
|
|
3299
|
+
z24.object({ outcome: z24.literal("added"), id: z24.string().uuid(), addedAt: utcIso8601 }).strict(),
|
|
3300
|
+
z24.object({ outcome: z24.literal("refused"), reason: z24.literal("too-many") }).strict()
|
|
3243
3301
|
]);
|
|
3244
|
-
var ownerWaitUndoableSchema =
|
|
3245
|
-
var ownerWaitDeclareRequestSchema =
|
|
3246
|
-
engagementId:
|
|
3302
|
+
var ownerWaitUndoableSchema = z24.enum(["yes", "no"]);
|
|
3303
|
+
var ownerWaitDeclareRequestSchema = z24.object({
|
|
3304
|
+
engagementId: z24.string().min(1),
|
|
3247
3305
|
item: ownerWaitItemRefSchema,
|
|
3248
3306
|
question: ownerWaitText,
|
|
3249
3307
|
recommendation: ownerWaitText,
|
|
@@ -3256,68 +3314,49 @@ var ownerWaitDeclareRequestSchema = z23.object({
|
|
|
3256
3314
|
path: ["how"]
|
|
3257
3315
|
});
|
|
3258
3316
|
var OWNER_WAIT_DECLARE_REFUSALS = ["no-open-phase", "unknown-item", "say-if-undoable"];
|
|
3259
|
-
var ownerWaitDeclareResultSchema =
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
outcome:
|
|
3263
|
-
id:
|
|
3264
|
-
callId:
|
|
3265
|
-
say:
|
|
3317
|
+
var ownerWaitDeclareResultSchema = z24.discriminatedUnion("outcome", [
|
|
3318
|
+
z24.object({ outcome: z24.literal("recorded"), id: z24.string().uuid(), say: z24.string().min(1) }).strict(),
|
|
3319
|
+
z24.object({
|
|
3320
|
+
outcome: z24.literal("go-ahead"),
|
|
3321
|
+
id: z24.string().uuid(),
|
|
3322
|
+
callId: z24.number().int().positive(),
|
|
3323
|
+
say: z24.string().min(1)
|
|
3266
3324
|
}).strict(),
|
|
3267
|
-
|
|
3325
|
+
z24.object({ outcome: z24.literal("refused"), reason: z24.enum(OWNER_WAIT_DECLARE_REFUSALS) }).strict()
|
|
3268
3326
|
]);
|
|
3269
|
-
var ownerWaitAddedItemSchema =
|
|
3270
|
-
id:
|
|
3271
|
-
words:
|
|
3272
|
-
reason:
|
|
3327
|
+
var ownerWaitAddedItemSchema = z24.object({
|
|
3328
|
+
id: z24.string().uuid(),
|
|
3329
|
+
words: z24.string().min(1),
|
|
3330
|
+
reason: z24.string().min(1),
|
|
3273
3331
|
addedAt: utcIso8601
|
|
3274
3332
|
}).strict();
|
|
3275
|
-
var ownerWaitListSchema =
|
|
3276
|
-
fixed:
|
|
3277
|
-
added:
|
|
3333
|
+
var ownerWaitListSchema = z24.object({
|
|
3334
|
+
fixed: z24.array(z24.object({ id: ownerWaitItemIdSchema, words: z24.string().min(1) }).strict()).length(OWNER_WAIT_FIXED_COUNT),
|
|
3335
|
+
added: z24.array(ownerWaitAddedItemSchema).max(OWNER_WAIT_ADDITIONS_MAX)
|
|
3278
3336
|
}).strict();
|
|
3279
|
-
var ownerWaitDeclarationSchema =
|
|
3280
|
-
id:
|
|
3337
|
+
var ownerWaitDeclarationSchema = z24.object({
|
|
3338
|
+
id: z24.string().uuid(),
|
|
3281
3339
|
fixedItem: ownerWaitItemIdSchema.nullable(),
|
|
3282
|
-
addition:
|
|
3283
|
-
question:
|
|
3284
|
-
recommendation:
|
|
3340
|
+
addition: z24.object({ id: z24.string().uuid(), words: z24.string().min(1) }).strict().nullable(),
|
|
3341
|
+
question: z24.string().min(1),
|
|
3342
|
+
recommendation: z24.string().min(1),
|
|
3285
3343
|
task: buildTaskIdSchema.nullable(),
|
|
3286
3344
|
declaredAt: utcIso8601
|
|
3287
3345
|
}).strict().refine((d) => d.fixedItem === null !== (d.addition === null), {
|
|
3288
3346
|
message: "names exactly one item: a fixed one or an added one",
|
|
3289
3347
|
path: ["fixedItem"]
|
|
3290
3348
|
});
|
|
3291
|
-
var ownerWaitDeclarationsSchema =
|
|
3349
|
+
var ownerWaitDeclarationsSchema = z24.object({ declarations: z24.array(ownerWaitDeclarationSchema) }).strict();
|
|
3350
|
+
var ownerWaitOpenSchema = z24.object({
|
|
3351
|
+
wait: ownerWaitShortIdSchema,
|
|
3352
|
+
task: buildTaskIdSchema.nullable(),
|
|
3353
|
+
question: z24.string().min(1),
|
|
3354
|
+
recommendation: z24.string().min(1),
|
|
3355
|
+
declaredAt: utcIso8601
|
|
3356
|
+
}).strict();
|
|
3357
|
+
var ownerWaitsOpenSchema = z24.object({ waits: z24.array(ownerWaitOpenSchema) }).strict();
|
|
3292
3358
|
var OWNER_WAIT_TOO_MANY = `This project already has ${String(OWNER_WAIT_ADDITIONS_MAX)} things added to what waits for the owner. Ask the owner to take one off on their settings page in the console first; it cannot be done by typing in chat.`;
|
|
3293
3359
|
|
|
3294
|
-
// ../events/dist/owner-wait-answer.js
|
|
3295
|
-
import { z as z24 } from "zod";
|
|
3296
|
-
var ownerWaitShortIdSchema = z24.string().regex(/^[0-9a-f]{8}$/);
|
|
3297
|
-
var OWNER_WAIT_ANSWER_ACTS = ["approve", "decline"];
|
|
3298
|
-
var ownerWaitAnswerActSchema = z24.enum(OWNER_WAIT_ANSWER_ACTS);
|
|
3299
|
-
var ownerWaitChatRequestSchema = z24.discriminatedUnion("act", [
|
|
3300
|
-
z24.object({ act: z24.literal("approve"), wait: ownerWaitShortIdSchema }).strict(),
|
|
3301
|
-
z24.object({ act: z24.literal("decline"), wait: ownerWaitShortIdSchema, note: scopeNoteWireSchema }).strict()
|
|
3302
|
-
]);
|
|
3303
|
-
function bareOutcome(outcome) {
|
|
3304
|
-
return z24.object({ outcome: z24.literal(outcome) }).strict();
|
|
3305
|
-
}
|
|
3306
|
-
var ownerWaitChatResultSchema = z24.discriminatedUnion("outcome", [
|
|
3307
|
-
z24.object({
|
|
3308
|
-
outcome: z24.literal("recorded"),
|
|
3309
|
-
act: ownerWaitAnswerActSchema,
|
|
3310
|
-
question: z24.string().min(1)
|
|
3311
|
-
}).strict(),
|
|
3312
|
-
z24.object({ outcome: z24.literal("refused"), problems: z24.array(systemDescriptionProblemSchema).min(1) }).strict(),
|
|
3313
|
-
bareOutcome("not-owner"),
|
|
3314
|
-
bareOutcome("no-owner"),
|
|
3315
|
-
bareOutcome("not-found"),
|
|
3316
|
-
bareOutcome("ambiguous"),
|
|
3317
|
-
bareOutcome("not-offered"),
|
|
3318
|
-
bareOutcome("unavailable")
|
|
3319
|
-
]);
|
|
3320
|
-
|
|
3321
3360
|
// ../events/dist/autonomy.js
|
|
3322
3361
|
import { z as z25 } from "zod";
|
|
3323
3362
|
var AUTONOMY_CHANGED_IN = ["console", "chat"];
|
|
@@ -3490,10 +3529,17 @@ function autonomyC8(agent, question, chose) {
|
|
|
3490
3529
|
var CALLS_HEADING = "Calls made without asking you";
|
|
3491
3530
|
var CALLS_EXPLAINED = "These are the decisions the agents recorded taking on their own, each against a stated default. Halfcycle lists what they recorded; it cannot see a call an agent did not record.";
|
|
3492
3531
|
function callMadeLine(call) {
|
|
3493
|
-
return `${call.by} decided "${call.question}": chose "${call.chose}". The stated default was "${call.statedDefault}".`;
|
|
3532
|
+
return `${crewNameWordsOf(call.by)} decided "${call.question}": chose "${call.chose}". The stated default was "${call.statedDefault}".`;
|
|
3533
|
+
}
|
|
3534
|
+
function listedCallLine(call) {
|
|
3535
|
+
return autonomyC8(crewNameWordsOf(call.by), call.question, call.chose);
|
|
3536
|
+
}
|
|
3537
|
+
function callHeadLineOf(call) {
|
|
3538
|
+
return call.kind === "listed" ? listedCallLine(call) : callMadeLine(call);
|
|
3494
3539
|
}
|
|
3495
3540
|
function callUndoLine(call) {
|
|
3496
|
-
|
|
3541
|
+
const by = crewNameWordsOf(call.by);
|
|
3542
|
+
return call.undoable === "yes" ? `${by} says this can be undone: "${call.how ?? ""}"` : `${by} says this cannot be undone.`;
|
|
3497
3543
|
}
|
|
3498
3544
|
var NO_CALLS_LINE = "No agent recorded a call made without asking in this phase.";
|
|
3499
3545
|
var UNCHECKED_CLAIMS_HEADING = "Checks nobody ran";
|
|
@@ -6070,8 +6116,8 @@ ${GENERATED_USER_PROMPT_SCOPE_HEADER} the Halfcycle installer, now also for the
|
|
|
6070
6116
|
# number ("allow 2"), as the whole prompt, and change
|
|
6071
6117
|
# how a build is paced, by typing "faster", "run 5 agents", "keep 30% free" or
|
|
6072
6118
|
# "use up to 70%" as the whole prompt, and answer a phase's usage limit by
|
|
6073
|
-
# typing "keep going", "stop", "limit it to 1.5 times" or "limit it to
|
|
6074
|
-
#
|
|
6119
|
+
# typing "keep going", "stop", "limit it to 1.5 times" or "limit it to 10% of
|
|
6120
|
+
# the week" as the whole prompt.
|
|
6075
6121
|
#
|
|
6076
6122
|
# AN ORDINARY PROMPT STARTS NOTHING. This script reads the hook input once and
|
|
6077
6123
|
# looks only at the start of the prompt's value. Unless the prompt begins, after
|
|
@@ -6106,7 +6152,7 @@ IFS= read -r -d '' HC_INPUT || true
|
|
|
6106
6152
|
# \\u escape, or as the UTF-8 bytes of a Unicode space. Compared byte for byte.
|
|
6107
6153
|
HC_LEAD='[[:space:]]|\\\\[nrtf]|\\\\u(000[9a-d]|0020|00a0|1680|200[0-9a]|202[89f]|205f|3000|feff)'
|
|
6108
6154
|
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'
|
|
6109
|
-
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( +[0-9]{1,4})?($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
|
|
6155
|
+
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( +[0-9]{1,4})?($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)|limit it to [0-9]{1,3}% of the week)($HC_LEAD)*\\")"; then
|
|
6110
6156
|
exit 0
|
|
6111
6157
|
fi
|
|
6112
6158
|
|
|
@@ -6546,7 +6592,9 @@ var REQUIRED_GITIGNORE_ENTRIES = [
|
|
|
6546
6592
|
".halfcycle/state.json",
|
|
6547
6593
|
`${ZONE_B_DIR}/`,
|
|
6548
6594
|
".claude/worktrees/",
|
|
6549
|
-
".halfcycle/context-budget.json"
|
|
6595
|
+
".halfcycle/context-budget.json",
|
|
6596
|
+
".claude/settings.local.json",
|
|
6597
|
+
".halfcycle/local-allow.json"
|
|
6550
6598
|
];
|
|
6551
6599
|
var GITIGNORE_HEADER = "# Halfcycle \u2014 machine-local secrets/state and Zone-B (never push to client remote)";
|
|
6552
6600
|
function adoptBlockUnderHeader(before, header, claimable) {
|
|
@@ -8410,9 +8458,14 @@ function renderCalls(calls, p) {
|
|
|
8410
8458
|
if (calls.length === 0)
|
|
8411
8459
|
return [`## ${CALLS_HEADING}`, NO_CALLS_LINE];
|
|
8412
8460
|
const lines = calls.flatMap((c) => {
|
|
8413
|
-
const by = p.itemStart(c.by);
|
|
8414
8461
|
const undo = ` - ${callUndoLine({ by: p.text(c.by), undoable: c.undoable, how: c.how === null ? null : p.text(c.how) })}`;
|
|
8415
|
-
const head =
|
|
8462
|
+
const head = callHeadLineOf({
|
|
8463
|
+
kind: c.kind,
|
|
8464
|
+
by: p.itemStart(c.by),
|
|
8465
|
+
question: p.text(c.question),
|
|
8466
|
+
chose: p.text(c.chose),
|
|
8467
|
+
statedDefault: p.text(c.statedDefault)
|
|
8468
|
+
});
|
|
8416
8469
|
return [`- ${head}`, undo];
|
|
8417
8470
|
});
|
|
8418
8471
|
return [`## ${CALLS_HEADING}`, CALLS_EXPLAINED, lines.join("\n")];
|
|
@@ -8711,6 +8764,12 @@ var REVIEW_USAGE = `${HALFCYCLE_COMMAND} review <phase> (--show | --answer <part
|
|
|
8711
8764
|
var RV9_LINE = `halfcycle review: this project is not signed in on this computer. ${HOOK_REMEDY}`;
|
|
8712
8765
|
|
|
8713
8766
|
// dist/open-phase.js
|
|
8767
|
+
var OPEN_FROM_SIZE_REFUSALS = Object.freeze({
|
|
8768
|
+
"unknown-size": "That size id is not this project's. Use the id `size sort` printed. Nothing was opened.",
|
|
8769
|
+
"not-small": "Only a small project is opened from its size. Nothing was opened.",
|
|
8770
|
+
"size-used": "That size has already opened a phase. Nothing was opened.",
|
|
8771
|
+
"only-up": "A project never moves to a smaller size. Nothing was opened."
|
|
8772
|
+
});
|
|
8714
8773
|
function writePhaseStamp(engagementId, phase, home) {
|
|
8715
8774
|
if (!isEngagementId(engagementId)) {
|
|
8716
8775
|
return { path: "(none \u2014 no valid project id)", reason: new InvalidEngagementIdError(engagementId).message };
|