hub-launch 1.16.0 → 1.18.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 +14 -0
- package/README.md +102 -2
- package/dist/commands/init.d.ts +61 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +125 -114
- 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 +22 -1
- 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 +206 -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 +91 -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-help/SKILL.md +117 -0
- 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 +32 -33
- 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 +102 -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
|
@@ -18,7 +18,7 @@ Your job is to:
|
|
|
18
18
|
4. **Parse the plan** to extract acceptance criteria and implementation steps
|
|
19
19
|
5. **Analyze PR changes** (files, tests, documentation)
|
|
20
20
|
6. **Compare plan vs. implementation** and generate verification checklist
|
|
21
|
-
7. **Display report in chat**
|
|
21
|
+
7. **Display report in chat** and post it to the PR automatically (unless `--no-post` was passed)
|
|
22
22
|
|
|
23
23
|
## Input Format
|
|
24
24
|
|
|
@@ -72,7 +72,7 @@ Stop execution here. Do not proceed.
|
|
|
72
72
|
Run the gather script — it fetches issue details, finds the linked PR, and downloads file changes and diff in one terminal approval:
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
|
-
|
|
75
|
+
hula script verify-gather -- <issue-number>
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
The script outputs JSON with `status`, `issueTitle`, `issueState`, `issueUrl`, `prNumber`, `prTitle`, `prUrl`, `prState`, `prBranch`, `prIsDraft`, `diffFile`, `filesChanged`, and `lines`.
|
|
@@ -277,25 +277,18 @@ Create a detailed markdown report with the following sections:
|
|
|
277
277
|
---
|
|
278
278
|
```
|
|
279
279
|
|
|
280
|
-
### Step 6: Display Report and
|
|
280
|
+
### Step 6: Display Report and Post to PR
|
|
281
281
|
|
|
282
282
|
Display the complete verification report in the chat.
|
|
283
283
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
Wait for user response.
|
|
292
|
-
|
|
293
|
-
**If user says yes (y)**:
|
|
294
|
-
|
|
295
|
-
Save the verification report to a temporary file, then run the post script (one terminal approval):
|
|
284
|
+
**If `--no-post` was NOT passed** (default): save the verification report to
|
|
285
|
+
`.hublaunch/tmp/hula-verify-report-<pr-number>.md` (repo-local and gitignored —
|
|
286
|
+
the directory was already created by the gather script back in Step 2, so this
|
|
287
|
+
write never needs a permission prompt), then run the post script immediately,
|
|
288
|
+
with no confirmation question (one terminal approval):
|
|
296
289
|
|
|
297
290
|
```bash
|
|
298
|
-
|
|
291
|
+
hula script verify-post -- <pr-number> .hublaunch/tmp/hula-verify-report-<pr-number>.md
|
|
299
292
|
```
|
|
300
293
|
|
|
301
294
|
The script outputs JSON with `status`, `prNumber`, and `commentUrl`.
|
|
@@ -309,6 +302,17 @@ Parse the JSON output:
|
|
|
309
302
|
If gaps were found, run `/hula-fix <issue-number>` to address them.
|
|
310
303
|
```
|
|
311
304
|
|
|
305
|
+
**If `--no-post` was passed**, ask instead:
|
|
306
|
+
```
|
|
307
|
+
📝 Post this verification to PR as a comment? If issues found, use `/hula-fix` to address them. (y/n)
|
|
308
|
+
|
|
309
|
+
This will add the report as a comment on PR #<pr-number>.
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
Wait for user response.
|
|
313
|
+
|
|
314
|
+
**If user says yes (y)**: save and post exactly as in the default flow above.
|
|
315
|
+
|
|
312
316
|
**If user says no (n)**:
|
|
313
317
|
```
|
|
314
318
|
ℹ️ Verification complete. Report displayed in chat only.
|
|
@@ -325,14 +329,14 @@ If user provides a plan file path:
|
|
|
325
329
|
|
|
326
330
|
Read the plan from the specified file instead of the issue body.
|
|
327
331
|
|
|
328
|
-
### Skip
|
|
332
|
+
### Skip Automatic Posting
|
|
329
333
|
|
|
330
|
-
If user wants
|
|
334
|
+
If user wants the old confirm-before-posting behavior instead of the new default (auto-post):
|
|
331
335
|
```
|
|
332
|
-
/hula-verify 42 --post
|
|
336
|
+
/hula-verify 42 --no-post
|
|
333
337
|
```
|
|
334
338
|
|
|
335
|
-
|
|
339
|
+
Ask "post to PR?" before posting, instead of posting automatically.
|
|
336
340
|
|
|
337
341
|
### Basic Verification Mode
|
|
338
342
|
|
|
@@ -496,15 +500,6 @@ Lines: +457 -23
|
|
|
496
500
|
|
|
497
501
|
---
|
|
498
502
|
|
|
499
|
-
📝 Post this verification to PR as a comment? If issues found, use `/hula-fix` to address them. (y/n)
|
|
500
|
-
|
|
501
|
-
This will add the report as a comment on PR #123.
|
|
502
|
-
```
|
|
503
|
-
|
|
504
|
-
**User**: `y`
|
|
505
|
-
|
|
506
|
-
**You**:
|
|
507
|
-
```
|
|
508
503
|
✅ Verification report posted to PR #123
|
|
509
504
|
|
|
510
505
|
If gaps were found, run `/hula-fix 42` to address them.
|
|
@@ -585,9 +580,11 @@ Lines: +45 -12
|
|
|
585
580
|
|
|
586
581
|
---
|
|
587
582
|
|
|
588
|
-
|
|
583
|
+
✅ Verification report posted to PR #124
|
|
584
|
+
|
|
585
|
+
If gaps were found, run `/hula-fix 42` to address them.
|
|
589
586
|
|
|
590
|
-
|
|
587
|
+
PR comment: <github-pr-comment-url>
|
|
591
588
|
```
|
|
592
589
|
|
|
593
590
|
## Example Interaction 3: No Plan Found
|
|
@@ -684,7 +681,9 @@ Lines: +15 -15
|
|
|
684
681
|
|
|
685
682
|
---
|
|
686
683
|
|
|
687
|
-
|
|
684
|
+
✅ Verification report posted to PR #126
|
|
685
|
+
|
|
686
|
+
PR comment: <github-pr-comment-url>
|
|
688
687
|
```
|
|
689
688
|
|
|
690
689
|
## Important Notes
|
|
@@ -748,6 +747,6 @@ When posting to PR, ensure:
|
|
|
748
747
|
- ✅ Acceptance criteria mapped to evidence
|
|
749
748
|
- ✅ Comprehensive verification report generated
|
|
750
749
|
- ✅ Report displayed in chat with clear formatting
|
|
751
|
-
- ✅
|
|
750
|
+
- ✅ Verification report posted to PR as a comment by default (suggesting `/hula-fix` for any gaps); `--no-post` restores a confirm-before-posting prompt
|
|
752
751
|
- ✅ Graceful error handling for all failure scenarios
|
|
753
752
|
- ✅ Clear, actionable recommendations provided
|
|
@@ -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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C"}
|
|
@@ -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,EAAE,QAAQ,CAAC,CAAC;SAChD,OAAO,CAAC,QAAQ,CAAC;IACpB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,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;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.18.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,102 @@
|
|
|
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
|
+
'hula-help',
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
function main() {
|
|
50
|
+
// Opt-out escape hatch for CI / sandboxed installs.
|
|
51
|
+
if (process.env.HULA_SKIP_CLAUDE_COMMANDS === '1') {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
56
|
+
const packageRoot = join(here, '..');
|
|
57
|
+
|
|
58
|
+
// Prefer the built templates (shipped in the published package); fall back to
|
|
59
|
+
// source (local dev install before `npm run build`).
|
|
60
|
+
const candidateSkillDirs = [
|
|
61
|
+
join(packageRoot, 'dist', 'templates', 'skills'),
|
|
62
|
+
join(packageRoot, 'src', 'templates', 'skills'),
|
|
63
|
+
];
|
|
64
|
+
const skillsDir = candidateSkillDirs.find((d) => existsSync(d));
|
|
65
|
+
if (!skillsDir) {
|
|
66
|
+
// Nothing to install yet (e.g. pre-build). Silent no-op; a later build/run
|
|
67
|
+
// will regenerate. Not an error.
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const commandsDir = join(homedir(), '.claude', 'commands');
|
|
72
|
+
mkdirSync(commandsDir, { recursive: true });
|
|
73
|
+
|
|
74
|
+
let written = 0;
|
|
75
|
+
for (const name of SKILL_NAMES) {
|
|
76
|
+
const src = join(skillsDir, name, 'SKILL.md');
|
|
77
|
+
if (!existsSync(src)) continue;
|
|
78
|
+
try {
|
|
79
|
+
const body = readFileSync(src, 'utf8');
|
|
80
|
+
writeFileSync(join(commandsDir, `${name}.md`), body, 'utf8');
|
|
81
|
+
written += 1;
|
|
82
|
+
} catch {
|
|
83
|
+
// Skip this one; keep going with the rest.
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (written > 0) {
|
|
88
|
+
console.log(
|
|
89
|
+
`hula: installed ${written} Claude Code command(s) to ~/.claude/commands/ (use /hula-plan, /hula-fix, …)`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
try {
|
|
95
|
+
main();
|
|
96
|
+
} catch (err) {
|
|
97
|
+
// Never fail the install.
|
|
98
|
+
console.warn(
|
|
99
|
+
`hula: could not install global Claude Code commands (${err && err.message ? err.message : err}). ` +
|
|
100
|
+
'Run `hula init --with-claude-commands` for repo-local commands instead.',
|
|
101
|
+
);
|
|
102
|
+
}
|