hub-launch 1.16.0 → 1.17.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/CHANGELOG.md +6 -0
- package/README.md +101 -2
- package/dist/commands/init.d.ts +55 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +93 -103
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/instructions.d.ts +17 -0
- package/dist/commands/instructions.d.ts.map +1 -0
- package/dist/commands/instructions.js +51 -0
- package/dist/commands/instructions.js.map +1 -0
- package/dist/commands/launch.d.ts +21 -0
- package/dist/commands/launch.d.ts.map +1 -1
- package/dist/commands/launch.js +61 -0
- package/dist/commands/launch.js.map +1 -1
- package/dist/commands/script.d.ts +28 -0
- package/dist/commands/script.d.ts.map +1 -0
- package/dist/commands/script.js +69 -0
- package/dist/commands/script.js.map +1 -0
- package/dist/commands/session-hook.d.ts +26 -0
- package/dist/commands/session-hook.d.ts.map +1 -0
- package/dist/commands/session-hook.js +146 -0
- package/dist/commands/session-hook.js.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/dist/scripts/fix-commit.d.ts +2 -0
- package/dist/scripts/fix-commit.d.ts.map +1 -0
- package/dist/scripts/fix-commit.js +125 -0
- package/dist/scripts/fix-commit.js.map +1 -0
- package/dist/scripts/fix-setup.d.ts +2 -0
- package/dist/scripts/fix-setup.d.ts.map +1 -0
- package/dist/scripts/fix-setup.js +161 -0
- package/dist/scripts/fix-setup.js.map +1 -0
- package/dist/scripts/launch-run.d.ts +14 -0
- package/dist/scripts/launch-run.d.ts.map +1 -0
- package/dist/scripts/launch-run.js +117 -0
- package/dist/scripts/launch-run.js.map +1 -0
- package/dist/scripts/lib/exec.d.ts +48 -0
- package/dist/scripts/lib/exec.d.ts.map +1 -0
- package/dist/scripts/lib/exec.js +61 -0
- package/dist/scripts/lib/exec.js.map +1 -0
- package/dist/scripts/lib/io.d.ts +48 -0
- package/dist/scripts/lib/io.d.ts.map +1 -0
- package/dist/scripts/lib/io.js +72 -0
- package/dist/scripts/lib/io.js.map +1 -0
- package/dist/scripts/lib/read-config.d.ts +26 -0
- package/dist/scripts/lib/read-config.d.ts.map +1 -0
- package/dist/scripts/lib/read-config.js +65 -0
- package/dist/scripts/lib/read-config.js.map +1 -0
- package/dist/scripts/merge-local.d.ts +2 -0
- package/dist/scripts/merge-local.d.ts.map +1 -0
- package/dist/scripts/merge-local.js +146 -0
- package/dist/scripts/merge-local.js.map +1 -0
- package/dist/scripts/merge-remote.d.ts +12 -0
- package/dist/scripts/merge-remote.d.ts.map +1 -0
- package/dist/scripts/merge-remote.js +71 -0
- package/dist/scripts/merge-remote.js.map +1 -0
- package/dist/scripts/schedule-manage.d.ts +2 -0
- package/dist/scripts/schedule-manage.d.ts.map +1 -0
- package/dist/scripts/schedule-manage.js +151 -0
- package/dist/scripts/schedule-manage.js.map +1 -0
- package/dist/scripts/schedule-run.d.ts +2 -0
- package/dist/scripts/schedule-run.d.ts.map +1 -0
- package/dist/scripts/schedule-run.js +146 -0
- package/dist/scripts/schedule-run.js.map +1 -0
- package/dist/scripts/verify-gather.d.ts +2 -0
- package/dist/scripts/verify-gather.d.ts.map +1 -0
- package/dist/scripts/verify-gather.js +210 -0
- package/dist/scripts/verify-gather.js.map +1 -0
- package/dist/scripts/verify-post.d.ts +12 -0
- package/dist/scripts/verify-post.d.ts.map +1 -0
- package/dist/scripts/verify-post.js +72 -0
- package/dist/scripts/verify-post.js.map +1 -0
- package/dist/templates/planning-instructions.md +7 -7
- package/dist/templates/skill-creation-instructions.md +2 -2
- package/dist/templates/skills/hula-confirm/SKILL.md +3 -3
- package/dist/templates/skills/hula-fix/SKILL.md +3 -3
- package/dist/templates/skills/hula-launch/SKILL.md +14 -8
- package/dist/templates/skills/hula-merge/SKILL.md +2 -2
- package/dist/templates/skills/hula-plan/SKILL.md +5 -5
- package/dist/templates/skills/hula-schedule/SKILL.md +16 -16
- package/dist/templates/skills/hula-verify/SKILL.md +2 -2
- package/dist/types/config.schema.d.ts +235 -0
- package/dist/types/config.schema.d.ts.map +1 -1
- package/dist/types/config.schema.js +66 -0
- package/dist/types/config.schema.js.map +1 -1
- package/dist/utils/client-session.d.ts +2 -2
- package/dist/utils/client-session.js +2 -2
- package/package.json +6 -5
- package/scripts/postinstall.mjs +101 -0
- package/dist/templates/scripts/hula-fix-commit.sh +0 -114
- package/dist/templates/scripts/hula-fix-setup.sh +0 -152
- package/dist/templates/scripts/hula-launch-run.sh +0 -140
- package/dist/templates/scripts/hula-merge-local.sh +0 -138
- package/dist/templates/scripts/hula-merge-remote.sh +0 -94
- package/dist/templates/scripts/hula-read-config.sh +0 -38
- package/dist/templates/scripts/hula-schedule-manage.sh +0 -159
- package/dist/templates/scripts/hula-schedule-run.sh +0 -148
- package/dist/templates/scripts/hula-session-hook.sh +0 -68
- package/dist/templates/scripts/hula-verify-gather.sh +0 -135
- package/dist/templates/scripts/hula-verify-post.sh +0 -84
|
@@ -298,6 +298,167 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
298
298
|
browserHeadless: z.ZodDefault<z.ZodEnum<["auto", "always", "never"]>>;
|
|
299
299
|
worktreeBasePath: z.ZodDefault<z.ZodString>;
|
|
300
300
|
envVars: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodLiteral<"all">]>>;
|
|
301
|
+
steps: z.ZodOptional<z.ZodObject<{
|
|
302
|
+
implementation: z.ZodOptional<z.ZodObject<{
|
|
303
|
+
model: z.ZodOptional<z.ZodString>;
|
|
304
|
+
}, "strip", z.ZodTypeAny, {
|
|
305
|
+
model?: string | undefined;
|
|
306
|
+
}, {
|
|
307
|
+
model?: string | undefined;
|
|
308
|
+
}>>;
|
|
309
|
+
findBugs: z.ZodOptional<z.ZodObject<{
|
|
310
|
+
model: z.ZodOptional<z.ZodString>;
|
|
311
|
+
maxIterations: z.ZodOptional<z.ZodNumber>;
|
|
312
|
+
diffMaxLines: z.ZodOptional<z.ZodNumber>;
|
|
313
|
+
excludeRegex: z.ZodOptional<z.ZodString>;
|
|
314
|
+
}, "strip", z.ZodTypeAny, {
|
|
315
|
+
model?: string | undefined;
|
|
316
|
+
maxIterations?: number | undefined;
|
|
317
|
+
diffMaxLines?: number | undefined;
|
|
318
|
+
excludeRegex?: string | undefined;
|
|
319
|
+
}, {
|
|
320
|
+
model?: string | undefined;
|
|
321
|
+
maxIterations?: number | undefined;
|
|
322
|
+
diffMaxLines?: number | undefined;
|
|
323
|
+
excludeRegex?: string | undefined;
|
|
324
|
+
}>>;
|
|
325
|
+
bugfix: z.ZodOptional<z.ZodObject<{
|
|
326
|
+
model: z.ZodOptional<z.ZodString>;
|
|
327
|
+
}, "strip", z.ZodTypeAny, {
|
|
328
|
+
model?: string | undefined;
|
|
329
|
+
}, {
|
|
330
|
+
model?: string | undefined;
|
|
331
|
+
}>>;
|
|
332
|
+
lintfix: z.ZodOptional<z.ZodObject<{
|
|
333
|
+
model: z.ZodOptional<z.ZodString>;
|
|
334
|
+
maxIterations: z.ZodOptional<z.ZodNumber>;
|
|
335
|
+
}, "strip", z.ZodTypeAny, {
|
|
336
|
+
model?: string | undefined;
|
|
337
|
+
maxIterations?: number | undefined;
|
|
338
|
+
}, {
|
|
339
|
+
model?: string | undefined;
|
|
340
|
+
maxIterations?: number | undefined;
|
|
341
|
+
}>>;
|
|
342
|
+
build: z.ZodOptional<z.ZodObject<{
|
|
343
|
+
model: z.ZodOptional<z.ZodString>;
|
|
344
|
+
maxIterations: z.ZodOptional<z.ZodNumber>;
|
|
345
|
+
}, "strip", z.ZodTypeAny, {
|
|
346
|
+
model?: string | undefined;
|
|
347
|
+
maxIterations?: number | undefined;
|
|
348
|
+
}, {
|
|
349
|
+
model?: string | undefined;
|
|
350
|
+
maxIterations?: number | undefined;
|
|
351
|
+
}>>;
|
|
352
|
+
regression: z.ZodOptional<z.ZodObject<{
|
|
353
|
+
skip: z.ZodOptional<z.ZodBoolean>;
|
|
354
|
+
}, "strip", z.ZodTypeAny, {
|
|
355
|
+
skip?: boolean | undefined;
|
|
356
|
+
}, {
|
|
357
|
+
skip?: boolean | undefined;
|
|
358
|
+
}>>;
|
|
359
|
+
mergeConflict: z.ZodOptional<z.ZodObject<{
|
|
360
|
+
model: z.ZodOptional<z.ZodString>;
|
|
361
|
+
}, "strip", z.ZodTypeAny, {
|
|
362
|
+
model?: string | undefined;
|
|
363
|
+
}, {
|
|
364
|
+
model?: string | undefined;
|
|
365
|
+
}>>;
|
|
366
|
+
summary: z.ZodOptional<z.ZodObject<{
|
|
367
|
+
model: z.ZodOptional<z.ZodString>;
|
|
368
|
+
maxIterations: z.ZodOptional<z.ZodNumber>;
|
|
369
|
+
}, "strip", z.ZodTypeAny, {
|
|
370
|
+
model?: string | undefined;
|
|
371
|
+
maxIterations?: number | undefined;
|
|
372
|
+
}, {
|
|
373
|
+
model?: string | undefined;
|
|
374
|
+
maxIterations?: number | undefined;
|
|
375
|
+
}>>;
|
|
376
|
+
verify: z.ZodOptional<z.ZodObject<{
|
|
377
|
+
model: z.ZodOptional<z.ZodString>;
|
|
378
|
+
maxIterations: z.ZodOptional<z.ZodNumber>;
|
|
379
|
+
skip: z.ZodOptional<z.ZodBoolean>;
|
|
380
|
+
}, "strip", z.ZodTypeAny, {
|
|
381
|
+
model?: string | undefined;
|
|
382
|
+
maxIterations?: number | undefined;
|
|
383
|
+
skip?: boolean | undefined;
|
|
384
|
+
}, {
|
|
385
|
+
model?: string | undefined;
|
|
386
|
+
maxIterations?: number | undefined;
|
|
387
|
+
skip?: boolean | undefined;
|
|
388
|
+
}>>;
|
|
389
|
+
}, "strip", z.ZodTypeAny, {
|
|
390
|
+
implementation?: {
|
|
391
|
+
model?: string | undefined;
|
|
392
|
+
} | undefined;
|
|
393
|
+
findBugs?: {
|
|
394
|
+
model?: string | undefined;
|
|
395
|
+
maxIterations?: number | undefined;
|
|
396
|
+
diffMaxLines?: number | undefined;
|
|
397
|
+
excludeRegex?: string | undefined;
|
|
398
|
+
} | undefined;
|
|
399
|
+
bugfix?: {
|
|
400
|
+
model?: string | undefined;
|
|
401
|
+
} | undefined;
|
|
402
|
+
lintfix?: {
|
|
403
|
+
model?: string | undefined;
|
|
404
|
+
maxIterations?: number | undefined;
|
|
405
|
+
} | undefined;
|
|
406
|
+
build?: {
|
|
407
|
+
model?: string | undefined;
|
|
408
|
+
maxIterations?: number | undefined;
|
|
409
|
+
} | undefined;
|
|
410
|
+
regression?: {
|
|
411
|
+
skip?: boolean | undefined;
|
|
412
|
+
} | undefined;
|
|
413
|
+
mergeConflict?: {
|
|
414
|
+
model?: string | undefined;
|
|
415
|
+
} | undefined;
|
|
416
|
+
summary?: {
|
|
417
|
+
model?: string | undefined;
|
|
418
|
+
maxIterations?: number | undefined;
|
|
419
|
+
} | undefined;
|
|
420
|
+
verify?: {
|
|
421
|
+
model?: string | undefined;
|
|
422
|
+
maxIterations?: number | undefined;
|
|
423
|
+
skip?: boolean | undefined;
|
|
424
|
+
} | undefined;
|
|
425
|
+
}, {
|
|
426
|
+
implementation?: {
|
|
427
|
+
model?: string | undefined;
|
|
428
|
+
} | undefined;
|
|
429
|
+
findBugs?: {
|
|
430
|
+
model?: string | undefined;
|
|
431
|
+
maxIterations?: number | undefined;
|
|
432
|
+
diffMaxLines?: number | undefined;
|
|
433
|
+
excludeRegex?: string | undefined;
|
|
434
|
+
} | undefined;
|
|
435
|
+
bugfix?: {
|
|
436
|
+
model?: string | undefined;
|
|
437
|
+
} | undefined;
|
|
438
|
+
lintfix?: {
|
|
439
|
+
model?: string | undefined;
|
|
440
|
+
maxIterations?: number | undefined;
|
|
441
|
+
} | undefined;
|
|
442
|
+
build?: {
|
|
443
|
+
model?: string | undefined;
|
|
444
|
+
maxIterations?: number | undefined;
|
|
445
|
+
} | undefined;
|
|
446
|
+
regression?: {
|
|
447
|
+
skip?: boolean | undefined;
|
|
448
|
+
} | undefined;
|
|
449
|
+
mergeConflict?: {
|
|
450
|
+
model?: string | undefined;
|
|
451
|
+
} | undefined;
|
|
452
|
+
summary?: {
|
|
453
|
+
model?: string | undefined;
|
|
454
|
+
maxIterations?: number | undefined;
|
|
455
|
+
} | undefined;
|
|
456
|
+
verify?: {
|
|
457
|
+
model?: string | undefined;
|
|
458
|
+
maxIterations?: number | undefined;
|
|
459
|
+
skip?: boolean | undefined;
|
|
460
|
+
} | undefined;
|
|
461
|
+
}>>;
|
|
301
462
|
}, "strip", z.ZodTypeAny, {
|
|
302
463
|
planPath: string;
|
|
303
464
|
editorCommand: "cursor" | "vsCode" | "other";
|
|
@@ -373,6 +534,43 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
373
534
|
} | undefined;
|
|
374
535
|
} | undefined;
|
|
375
536
|
envVars?: string[] | "all" | undefined;
|
|
537
|
+
steps?: {
|
|
538
|
+
implementation?: {
|
|
539
|
+
model?: string | undefined;
|
|
540
|
+
} | undefined;
|
|
541
|
+
findBugs?: {
|
|
542
|
+
model?: string | undefined;
|
|
543
|
+
maxIterations?: number | undefined;
|
|
544
|
+
diffMaxLines?: number | undefined;
|
|
545
|
+
excludeRegex?: string | undefined;
|
|
546
|
+
} | undefined;
|
|
547
|
+
bugfix?: {
|
|
548
|
+
model?: string | undefined;
|
|
549
|
+
} | undefined;
|
|
550
|
+
lintfix?: {
|
|
551
|
+
model?: string | undefined;
|
|
552
|
+
maxIterations?: number | undefined;
|
|
553
|
+
} | undefined;
|
|
554
|
+
build?: {
|
|
555
|
+
model?: string | undefined;
|
|
556
|
+
maxIterations?: number | undefined;
|
|
557
|
+
} | undefined;
|
|
558
|
+
regression?: {
|
|
559
|
+
skip?: boolean | undefined;
|
|
560
|
+
} | undefined;
|
|
561
|
+
mergeConflict?: {
|
|
562
|
+
model?: string | undefined;
|
|
563
|
+
} | undefined;
|
|
564
|
+
summary?: {
|
|
565
|
+
model?: string | undefined;
|
|
566
|
+
maxIterations?: number | undefined;
|
|
567
|
+
} | undefined;
|
|
568
|
+
verify?: {
|
|
569
|
+
model?: string | undefined;
|
|
570
|
+
maxIterations?: number | undefined;
|
|
571
|
+
skip?: boolean | undefined;
|
|
572
|
+
} | undefined;
|
|
573
|
+
} | undefined;
|
|
376
574
|
}, {
|
|
377
575
|
planPath?: string | undefined;
|
|
378
576
|
projectOwner?: string | undefined;
|
|
@@ -448,6 +646,43 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
448
646
|
browserHeadless?: "never" | "auto" | "always" | undefined;
|
|
449
647
|
worktreeBasePath?: string | undefined;
|
|
450
648
|
envVars?: string[] | "all" | undefined;
|
|
649
|
+
steps?: {
|
|
650
|
+
implementation?: {
|
|
651
|
+
model?: string | undefined;
|
|
652
|
+
} | undefined;
|
|
653
|
+
findBugs?: {
|
|
654
|
+
model?: string | undefined;
|
|
655
|
+
maxIterations?: number | undefined;
|
|
656
|
+
diffMaxLines?: number | undefined;
|
|
657
|
+
excludeRegex?: string | undefined;
|
|
658
|
+
} | undefined;
|
|
659
|
+
bugfix?: {
|
|
660
|
+
model?: string | undefined;
|
|
661
|
+
} | undefined;
|
|
662
|
+
lintfix?: {
|
|
663
|
+
model?: string | undefined;
|
|
664
|
+
maxIterations?: number | undefined;
|
|
665
|
+
} | undefined;
|
|
666
|
+
build?: {
|
|
667
|
+
model?: string | undefined;
|
|
668
|
+
maxIterations?: number | undefined;
|
|
669
|
+
} | undefined;
|
|
670
|
+
regression?: {
|
|
671
|
+
skip?: boolean | undefined;
|
|
672
|
+
} | undefined;
|
|
673
|
+
mergeConflict?: {
|
|
674
|
+
model?: string | undefined;
|
|
675
|
+
} | undefined;
|
|
676
|
+
summary?: {
|
|
677
|
+
model?: string | undefined;
|
|
678
|
+
maxIterations?: number | undefined;
|
|
679
|
+
} | undefined;
|
|
680
|
+
verify?: {
|
|
681
|
+
model?: string | undefined;
|
|
682
|
+
maxIterations?: number | undefined;
|
|
683
|
+
skip?: boolean | undefined;
|
|
684
|
+
} | undefined;
|
|
685
|
+
} | undefined;
|
|
451
686
|
}>;
|
|
452
687
|
export type Config = z.infer<typeof ConfigSchema>;
|
|
453
688
|
export declare const DEFAULT_CONFIG: Config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.schema.d.ts","sourceRoot":"","sources":["../../src/types/config.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,QAAA,MAAM,uBAAuB;;;;;;;;;EAK3B,CAAC;AAEH,QAAA,MAAM,iBAAiB;;;;;;;;;EAGrB,CAAC;AAEH,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGlB,CAAC;AAEH,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;EAOf,CAAC;AAGH,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYrB,CAAC;AAGH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC9E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC5D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACtD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAGlE,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"config.schema.d.ts","sourceRoot":"","sources":["../../src/types/config.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,QAAA,MAAM,uBAAuB;;;;;;;;;EAK3B,CAAC;AAEH,QAAA,MAAM,iBAAiB;;;;;;;;;EAGrB,CAAC;AAEH,QAAA,MAAM,cAAc;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsKvB,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAGlD,eAAO,MAAM,cAAc,EAAE,MAe5B,CAAC"}
|
|
@@ -120,6 +120,72 @@ export const ConfigSchema = z.object({
|
|
|
120
120
|
envVars: z
|
|
121
121
|
.union([z.array(z.string()), z.literal('all')])
|
|
122
122
|
.optional(),
|
|
123
|
+
// Per-pipeline-step overrides forwarded to the server's ralph-run request
|
|
124
|
+
// (hula-server PR #442). Each of the 9 keys mirrors a stage of the ralph
|
|
125
|
+
// pipeline and lets you override the AI model, the loop-iteration cap, and/or
|
|
126
|
+
// skip behavior for that stage instead of using the server's hardcoded
|
|
127
|
+
// defaults: implementation, findBugs, bugfix, lintfix, build, regression,
|
|
128
|
+
// mergeConflict, summary, verify. Config-file only (plus the --skip-regression
|
|
129
|
+
// launch flag). Absent entirely = nothing sent (backwards compatible). Full
|
|
130
|
+
// field table + the two cross-field conflict rules:
|
|
131
|
+
// https://github.com/NoStackApp/hub-launch#configuring-per-step-model--iteration-overrides
|
|
132
|
+
steps: z
|
|
133
|
+
.object({
|
|
134
|
+
implementation: z
|
|
135
|
+
.object({
|
|
136
|
+
model: z.string().min(1).optional(),
|
|
137
|
+
})
|
|
138
|
+
.optional(),
|
|
139
|
+
findBugs: z
|
|
140
|
+
.object({
|
|
141
|
+
model: z.string().min(1).optional(),
|
|
142
|
+
maxIterations: z.number().int().min(1).max(20).optional(),
|
|
143
|
+
diffMaxLines: z.number().int().min(1).optional(),
|
|
144
|
+
excludeRegex: z.string().min(1).optional(),
|
|
145
|
+
})
|
|
146
|
+
.optional(),
|
|
147
|
+
bugfix: z
|
|
148
|
+
.object({
|
|
149
|
+
model: z.string().min(1).optional(),
|
|
150
|
+
})
|
|
151
|
+
.optional(),
|
|
152
|
+
lintfix: z
|
|
153
|
+
.object({
|
|
154
|
+
model: z.string().min(1).optional(),
|
|
155
|
+
maxIterations: z.number().int().min(1).max(20).optional(),
|
|
156
|
+
})
|
|
157
|
+
.optional(),
|
|
158
|
+
build: z
|
|
159
|
+
.object({
|
|
160
|
+
model: z.string().min(1).optional(),
|
|
161
|
+
maxIterations: z.number().int().min(1).max(20).optional(),
|
|
162
|
+
})
|
|
163
|
+
.optional(),
|
|
164
|
+
regression: z
|
|
165
|
+
.object({
|
|
166
|
+
skip: z.boolean().optional(),
|
|
167
|
+
})
|
|
168
|
+
.optional(),
|
|
169
|
+
mergeConflict: z
|
|
170
|
+
.object({
|
|
171
|
+
model: z.string().min(1).optional(),
|
|
172
|
+
})
|
|
173
|
+
.optional(),
|
|
174
|
+
summary: z
|
|
175
|
+
.object({
|
|
176
|
+
model: z.string().min(1).optional(),
|
|
177
|
+
maxIterations: z.number().int().min(1).max(20).optional(),
|
|
178
|
+
})
|
|
179
|
+
.optional(),
|
|
180
|
+
verify: z
|
|
181
|
+
.object({
|
|
182
|
+
model: z.string().min(1).optional(),
|
|
183
|
+
maxIterations: z.number().int().min(1).max(20).optional(),
|
|
184
|
+
skip: z.boolean().optional(),
|
|
185
|
+
})
|
|
186
|
+
.optional(),
|
|
187
|
+
})
|
|
188
|
+
.optional(),
|
|
123
189
|
});
|
|
124
190
|
// Default configuration
|
|
125
191
|
export const DEFAULT_CONFIG = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.schema.js","sourceRoot":"","sources":["../../src/types/config.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,6BAA6B,EAC7B,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAE5B,2BAA2B;AAC3B,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,QAAQ,EAAE,CAAC;SACR,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS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CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;SAC7B,CAAC;aACD,QAAQ,EAAE;KACd,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC;AAGH,wBAAwB;AACxB,MAAM,CAAC,MAAM,cAAc,GAAW;IACpC,aAAa,EAAE,QAAQ;IACvB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,kBAAkB;IAC5B,YAAY,EAAE,8BAA8B;IAC5C,sBAAsB,EAAE,kBAAkB;IAC1C,WAAW,EAAE,CAAC;IACd,mBAAmB,EAAE,KAAK;IAC1B,YAAY,EAAE,MAAM;IACpB,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,6BAA6B;IAClD,eAAe,EAAE,aAAa;IAC9B,eAAe,EAAE,MAAM;IACvB,gBAAgB,EAAE,iBAAiB;IACnC,WAAW,EAAE,CAAC;CACf,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* client-session.ts — read the Claude Code session id captured by the
|
|
3
|
-
* hula
|
|
3
|
+
* hula session-hook (see src/commands/session-hook.ts).
|
|
4
4
|
*
|
|
5
5
|
* The hook is a Claude Code PreToolUse hook: when a chat session runs
|
|
6
|
-
* /hula-launch (i.e. Bash invokes hula
|
|
6
|
+
* /hula-launch (i.e. Bash invokes `hula script launch-run`), it writes
|
|
7
7
|
* $HOME/.hublaunch-sessions/<repo-dir-name>/<branch>.json
|
|
8
8
|
* moments before the hula CLI itself runs. `hula launch` reads it here and
|
|
9
9
|
* forwards it to hula-server as `clientSessionId` (server PR #419) so client
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* client-session.ts — read the Claude Code session id captured by the
|
|
3
|
-
* hula
|
|
3
|
+
* hula session-hook (see src/commands/session-hook.ts).
|
|
4
4
|
*
|
|
5
5
|
* The hook is a Claude Code PreToolUse hook: when a chat session runs
|
|
6
|
-
* /hula-launch (i.e. Bash invokes hula
|
|
6
|
+
* /hula-launch (i.e. Bash invokes `hula script launch-run`), it writes
|
|
7
7
|
* $HOME/.hublaunch-sessions/<repo-dir-name>/<branch>.json
|
|
8
8
|
* moments before the hula CLI itself runs. `hula launch` reads it here and
|
|
9
9
|
* forwards it to hula-server as `clientSessionId` (server PR #419) so client
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hub-launch",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "GitHub Issue and PR automation CLI tool with plugin/hook system for project-specific customizations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,15 +19,16 @@
|
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "tsc && shx chmod +x dist/index.js && npm run copy-templates",
|
|
22
|
-
"
|
|
22
|
+
"postbuild": "node scripts/postinstall.mjs",
|
|
23
|
+
"postinstall": "node scripts/postinstall.mjs",
|
|
24
|
+
"copy-templates": "shx mkdir -p dist/templates && shx cp src/templates/*.md dist/templates/ && shx mkdir -p dist/templates/skills && shx cp -r src/templates/skills/* dist/templates/skills/",
|
|
23
25
|
"watch": "tsc --watch",
|
|
24
26
|
"dev": "tsx src/index.ts",
|
|
25
27
|
"debug": "tsx --inspect-brk src/index.ts",
|
|
26
28
|
"typecheck": "tsc --noEmit",
|
|
27
29
|
"test": "vitest run",
|
|
28
30
|
"test:watch": "vitest",
|
|
29
|
-
"
|
|
30
|
-
"regression": "tsc --noEmit && tsc && shx chmod +x dist/index.js && npm run copy-templates",
|
|
31
|
+
"regression": "tsc --noEmit && tsc && shx chmod +x dist/index.js && npm run copy-templates && vitest run",
|
|
31
32
|
"clean": "shx rm -rf dist",
|
|
32
33
|
"install:global": "npm run build && pnpm link --global && pnpm setup",
|
|
33
34
|
"i:hula": "pnpm install && npm run install:global",
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
"files": [
|
|
47
48
|
"dist/",
|
|
48
49
|
"bin/",
|
|
50
|
+
"scripts/postinstall.mjs",
|
|
49
51
|
"README.md",
|
|
50
52
|
"CHANGELOG.md"
|
|
51
53
|
],
|
|
@@ -65,7 +67,6 @@
|
|
|
65
67
|
"devDependencies": {
|
|
66
68
|
"@types/inquirer": "^9.0.9",
|
|
67
69
|
"@types/node": "^20.10.0",
|
|
68
|
-
"bats": "^1.11.0",
|
|
69
70
|
"shx": "^0.4.0",
|
|
70
71
|
"tsx": "^4.20.6",
|
|
71
72
|
"typescript": "^5.3.3",
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* postinstall: generate global Claude Code slash commands for hula.
|
|
4
|
+
*
|
|
5
|
+
* Writes ~/.claude/commands/<skill>.md for each hula Agent Skill, sourcing the
|
|
6
|
+
* command body from the package's bundled SKILL.md files. This makes /hula-plan,
|
|
7
|
+
* /hula-fix, etc. available in EVERY project's Claude Code session with zero
|
|
8
|
+
* per-project footprint — the "install hula → skills appear" model, no
|
|
9
|
+
* marketplace/plugin required.
|
|
10
|
+
*
|
|
11
|
+
* Design constraints:
|
|
12
|
+
* - Self-contained (no imports from dist/) so it works even when this runs
|
|
13
|
+
* before the TypeScript build (e.g. `pnpm install` in the repo).
|
|
14
|
+
* - Never throws: a postinstall failure must not break `npm install`. Any error
|
|
15
|
+
* is logged and swallowed with exit 0.
|
|
16
|
+
* - Idempotent: re-running (e.g. on `hula` upgrade) overwrites the same files,
|
|
17
|
+
* refreshing them to the installed version.
|
|
18
|
+
*
|
|
19
|
+
* Source of truth for the skill set: the AGENT_SKILLS list in
|
|
20
|
+
* src/commands/init.ts. Keep SKILL_NAMES below in sync with it.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import { homedir } from 'node:os';
|
|
24
|
+
import {
|
|
25
|
+
existsSync,
|
|
26
|
+
mkdirSync,
|
|
27
|
+
readFileSync,
|
|
28
|
+
writeFileSync,
|
|
29
|
+
} from 'node:fs';
|
|
30
|
+
import { dirname, join } from 'node:path';
|
|
31
|
+
import { fileURLToPath } from 'node:url';
|
|
32
|
+
|
|
33
|
+
/** Skill directories that become global Claude Code slash commands.
|
|
34
|
+
* Mirrors AGENT_SKILLS in src/commands/init.ts. */
|
|
35
|
+
const SKILL_NAMES = [
|
|
36
|
+
'hula-plan',
|
|
37
|
+
'hula-confirm',
|
|
38
|
+
'hula-fix',
|
|
39
|
+
'hula-create',
|
|
40
|
+
'hula-verify',
|
|
41
|
+
'hula-merge',
|
|
42
|
+
'hula-launch',
|
|
43
|
+
'hula-schedule',
|
|
44
|
+
'hula-upload',
|
|
45
|
+
'hula-info',
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
function main() {
|
|
49
|
+
// Opt-out escape hatch for CI / sandboxed installs.
|
|
50
|
+
if (process.env.HULA_SKIP_CLAUDE_COMMANDS === '1') {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
55
|
+
const packageRoot = join(here, '..');
|
|
56
|
+
|
|
57
|
+
// Prefer the built templates (shipped in the published package); fall back to
|
|
58
|
+
// source (local dev install before `npm run build`).
|
|
59
|
+
const candidateSkillDirs = [
|
|
60
|
+
join(packageRoot, 'dist', 'templates', 'skills'),
|
|
61
|
+
join(packageRoot, 'src', 'templates', 'skills'),
|
|
62
|
+
];
|
|
63
|
+
const skillsDir = candidateSkillDirs.find((d) => existsSync(d));
|
|
64
|
+
if (!skillsDir) {
|
|
65
|
+
// Nothing to install yet (e.g. pre-build). Silent no-op; a later build/run
|
|
66
|
+
// will regenerate. Not an error.
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const commandsDir = join(homedir(), '.claude', 'commands');
|
|
71
|
+
mkdirSync(commandsDir, { recursive: true });
|
|
72
|
+
|
|
73
|
+
let written = 0;
|
|
74
|
+
for (const name of SKILL_NAMES) {
|
|
75
|
+
const src = join(skillsDir, name, 'SKILL.md');
|
|
76
|
+
if (!existsSync(src)) continue;
|
|
77
|
+
try {
|
|
78
|
+
const body = readFileSync(src, 'utf8');
|
|
79
|
+
writeFileSync(join(commandsDir, `${name}.md`), body, 'utf8');
|
|
80
|
+
written += 1;
|
|
81
|
+
} catch {
|
|
82
|
+
// Skip this one; keep going with the rest.
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (written > 0) {
|
|
87
|
+
console.log(
|
|
88
|
+
`hula: installed ${written} Claude Code command(s) to ~/.claude/commands/ (use /hula-plan, /hula-fix, …)`,
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
try {
|
|
94
|
+
main();
|
|
95
|
+
} catch (err) {
|
|
96
|
+
// Never fail the install.
|
|
97
|
+
console.warn(
|
|
98
|
+
`hula: could not install global Claude Code commands (${err && err.message ? err.message : err}). ` +
|
|
99
|
+
'Run `hula init --with-claude-commands` for repo-local commands instead.',
|
|
100
|
+
);
|
|
101
|
+
}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# hula-fix-commit.sh — Step 9 of the hula.fix workflow
|
|
3
|
-
# Usage: bash .github/scripts/hula-fix-commit.sh <issue-number> <commit-message> [--worktree-path <path>]
|
|
4
|
-
#
|
|
5
|
-
# Performs: git add -A → git commit → git push from within the fix worktree
|
|
6
|
-
# Outputs structured JSON to stdout; all other output goes to stderr
|
|
7
|
-
# Exit codes: 0=success, 1=user error, 2=tool error
|
|
8
|
-
|
|
9
|
-
set -euo pipefail
|
|
10
|
-
|
|
11
|
-
# ── helpers ────────────────────────────────────────────────────────────────────
|
|
12
|
-
|
|
13
|
-
json_escape() {
|
|
14
|
-
printf '%s' "$1" | sed 's/\\/\\\\/g; s/"/\\"/g; s/$/\\n/g' | tr -d '\n' | sed 's/\\n$//'
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
die() {
|
|
18
|
-
local code="$1"; shift
|
|
19
|
-
local safe_msg
|
|
20
|
-
safe_msg=$(json_escape "$*")
|
|
21
|
-
printf '{"status":"error","code":%d,"message":"%s"}\n' "$code" "$safe_msg" >&1
|
|
22
|
-
exit "$code"
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
# ── argument parsing ────────────────────────────────────────────────────────────
|
|
26
|
-
|
|
27
|
-
ISSUE_NUMBER=''
|
|
28
|
-
COMMIT_MSG=''
|
|
29
|
-
WORKTREE_PATH=''
|
|
30
|
-
|
|
31
|
-
while [[ $# -gt 0 ]]; do
|
|
32
|
-
case "$1" in
|
|
33
|
-
--worktree-path)
|
|
34
|
-
WORKTREE_PATH="$2"; shift 2 ;;
|
|
35
|
-
--worktree-path=*)
|
|
36
|
-
WORKTREE_PATH="${1#--worktree-path=}"; shift ;;
|
|
37
|
-
*)
|
|
38
|
-
if [[ -z "$ISSUE_NUMBER" ]]; then
|
|
39
|
-
ISSUE_NUMBER="$1"
|
|
40
|
-
elif [[ -z "$COMMIT_MSG" ]]; then
|
|
41
|
-
COMMIT_MSG="$1"
|
|
42
|
-
else
|
|
43
|
-
die 1 "Unexpected argument: $1"
|
|
44
|
-
fi
|
|
45
|
-
shift ;;
|
|
46
|
-
esac
|
|
47
|
-
done
|
|
48
|
-
|
|
49
|
-
if [[ -z "$ISSUE_NUMBER" ]]; then
|
|
50
|
-
die 1 "Usage: bash .github/scripts/hula-fix-commit.sh <issue-number> <commit-message> [--worktree-path <path>]"
|
|
51
|
-
fi
|
|
52
|
-
|
|
53
|
-
if [[ -z "$COMMIT_MSG" ]]; then
|
|
54
|
-
die 1 "Commit message is required."
|
|
55
|
-
fi
|
|
56
|
-
|
|
57
|
-
# ── Resolve worktree path ─────────────────────────────────────────────────────
|
|
58
|
-
|
|
59
|
-
if [[ -z "$WORKTREE_PATH" ]]; then
|
|
60
|
-
# Try to read from session file (use absolute path so it works from any CWD)
|
|
61
|
-
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null) || REPO_ROOT="$(pwd)"
|
|
62
|
-
SESSION_FILE="${REPO_ROOT}/.hublaunch/.fix-sessions/issue-${ISSUE_NUMBER}.json"
|
|
63
|
-
if [[ -f "$SESSION_FILE" ]]; then
|
|
64
|
-
# Extract worktreePath from JSON (handles both compact and pretty-printed formats).
|
|
65
|
-
# Pattern .*"worktreePath" *: *"\([^"]*\)".* tolerates optional whitespace, matching:
|
|
66
|
-
# - Compact: "worktreePath":"..."
|
|
67
|
-
# - Pretty: "worktreePath": "..."
|
|
68
|
-
WORKTREE_PATH=$(grep '"worktreePath"' "$SESSION_FILE" | sed 's/.*"worktreePath" *: *"\([^"]*\)".*/\1/')
|
|
69
|
-
fi
|
|
70
|
-
fi
|
|
71
|
-
|
|
72
|
-
if [[ -z "$WORKTREE_PATH" ]]; then
|
|
73
|
-
# Last resort: infer from repo name using config
|
|
74
|
-
REPO_NAME=$(gh repo view --json name -q '.name' 2>/dev/null) || die 2 "Failed to determine repo name."
|
|
75
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
76
|
-
source "${SCRIPT_DIR}/hula-read-config.sh"
|
|
77
|
-
WORKTREE_PATH="${HULA_WORKTREE_BASE_PATH}/hula/${REPO_NAME}/fix-${ISSUE_NUMBER}"
|
|
78
|
-
fi
|
|
79
|
-
|
|
80
|
-
if [[ ! -d "$WORKTREE_PATH" ]]; then
|
|
81
|
-
die 1 "Worktree not found at ${WORKTREE_PATH}. Run hula-fix-setup.sh first."
|
|
82
|
-
fi
|
|
83
|
-
|
|
84
|
-
# ── Check for changes ─────────────────────────────────────────────────────────
|
|
85
|
-
|
|
86
|
-
cd "$WORKTREE_PATH"
|
|
87
|
-
|
|
88
|
-
PORCELAIN=$(git status --porcelain 2>/dev/null)
|
|
89
|
-
|
|
90
|
-
if [[ -z "$PORCELAIN" ]]; then
|
|
91
|
-
printf '{"status":"success","message":"Nothing to commit","filesChanged":0,"worktreePath":"%s"}\n' \
|
|
92
|
-
"$(json_escape "$WORKTREE_PATH")"
|
|
93
|
-
exit 0
|
|
94
|
-
fi
|
|
95
|
-
|
|
96
|
-
FILES_CHANGED=$(printf '%s' "$PORCELAIN" | grep -c '' || true)
|
|
97
|
-
|
|
98
|
-
# ── Stage, commit, push ───────────────────────────────────────────────────────
|
|
99
|
-
|
|
100
|
-
git add -A >&2 2>&1 || die 2 "git add failed"
|
|
101
|
-
|
|
102
|
-
git commit -m "$COMMIT_MSG" >&2 2>&1 \
|
|
103
|
-
|| die 2 "Failed to commit changes. Ensure git user.name and user.email are configured."
|
|
104
|
-
|
|
105
|
-
git push >&2 2>&1 \
|
|
106
|
-
|| die 2 "Push failed. Try: cd ${WORKTREE_PATH} && git push"
|
|
107
|
-
|
|
108
|
-
# ── Output result ─────────────────────────────────────────────────────────────
|
|
109
|
-
|
|
110
|
-
SAFE_MSG=$(json_escape "$COMMIT_MSG")
|
|
111
|
-
SAFE_PATH=$(json_escape "$WORKTREE_PATH")
|
|
112
|
-
|
|
113
|
-
printf '{"status":"success","commitMessage":"%s","filesChanged":%d,"worktreePath":"%s"}\n' \
|
|
114
|
-
"$SAFE_MSG" "$FILES_CHANGED" "$SAFE_PATH"
|