@indigoai-us/hq-cli 5.275.0 → 5.277.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 +112 -0
- package/README.md +12 -0
- package/assets/bot-workers/setup/context/USER-GUIDE.md +4 -4
- package/assets/scaffold/core/scripts/hq-delegate-pickup.sh +99 -0
- package/assets/scaffold/core/scripts/hq-delegate-repo.sh +158 -0
- package/assets/scaffold/core/scripts/hq-delegate-resolve.sh +145 -0
- package/assets/scaffold/core/scripts/hq-delegate-secrets.sh +129 -0
- package/assets/scaffold/core/scripts/hq-delegate-transfer.sh +175 -0
- package/assets/scaffold/core/scripts/lib/secret-patterns.sh +58 -0
- package/dist/command-catalog.generated.d.ts +239 -1
- package/dist/command-catalog.generated.js +302 -1
- package/dist/commands/core-checkpoint.d.ts +4 -2
- package/dist/commands/core-checkpoint.js +34 -3
- package/dist/commands/core-command-catalog.d.ts +4 -2
- package/dist/commands/core-command-catalog.js +5 -2
- package/dist/commands/core-delegate.d.ts +6 -0
- package/dist/commands/core-delegate.js +987 -0
- package/dist/commands/core-ontology.js +3 -3
- package/dist/commands/core.js +11 -1
- package/dist/commands/daemon.d.ts +4 -0
- package/dist/commands/daemon.js +175 -2
- package/dist/commands/dm.d.ts +2 -0
- package/dist/commands/dm.js +11 -4
- package/dist/commands/feedback.d.ts +6 -0
- package/dist/commands/feedback.js +86 -37
- package/dist/commands/lanes-accounts.js +44 -2
- package/dist/commands/lanes-message.js +69 -12
- package/dist/commands/lanes-resume.js +2 -0
- package/dist/commands/lanes-shared.d.ts +3 -0
- package/dist/commands/lanes-shared.js +12 -2
- package/dist/commands/lanes.d.ts +5 -1
- package/dist/commands/lanes.js +402 -49
- package/dist/commands/run-feature-telemetry.d.ts +3 -0
- package/dist/commands/run-feature-telemetry.js +6 -0
- package/dist/commands/run.js +3 -2
- package/dist/commands/secrets.d.ts +16 -1
- package/dist/commands/secrets.js +80 -45
- package/dist/commands/sync-mode.d.ts +11 -0
- package/dist/commands/sync-mode.js +30 -0
- package/dist/commands/whoami.d.ts +4 -6
- package/dist/commands/whoami.js +39 -8
- package/dist/fast-core.d.ts +6 -7
- package/dist/fast-core.js +22 -8
- package/dist/fast-scaffold.d.ts +33 -7
- package/dist/fast-scaffold.js +104 -8
- package/dist/index.js +32 -1
- package/dist/lanes-drain-hook.js +154 -7
- package/dist/lib/agent-kit/run/inbox.js +3 -2
- package/dist/lib/billing/plan-lock.d.ts +3 -1
- package/dist/lib/billing/plan-lock.js +7 -1
- package/dist/lib/checkpoint-ontology/apply.d.ts +6 -0
- package/dist/lib/checkpoint-ontology/apply.js +60 -3
- package/dist/lib/checkpoint-ontology/company.d.ts +8 -4
- package/dist/lib/checkpoint-ontology/company.js +15 -7
- package/dist/lib/checkpoint-ontology/plan.d.ts +36 -0
- package/dist/lib/checkpoint-ontology/plan.js +66 -4
- package/dist/lib/checkpoint-ontology/queued-touches.d.ts +32 -0
- package/dist/lib/checkpoint-ontology/queued-touches.js +193 -0
- package/dist/lib/checkpoint-ontology/tree.d.ts +2 -0
- package/dist/lib/checkpoint-ontology/tree.js +34 -0
- package/dist/lib/core-utils/jq-json-serializer.d.ts +5 -0
- package/dist/lib/core-utils/jq-json-serializer.js +10 -0
- package/dist/lib/core-utils/secret-patterns.d.ts +41 -0
- package/dist/lib/core-utils/secret-patterns.js +33 -0
- package/dist/lib/core-utils/timeout-guard-native.d.ts +7 -0
- package/dist/lib/core-utils/timeout-guard-native.js +40 -0
- package/dist/lib/core-utils/timeout-guard.d.ts +3 -3
- package/dist/lib/core-utils/timeout-guard.js +28 -13
- package/dist/lib/daemon/catalog.d.ts +18 -2
- package/dist/lib/daemon/catalog.js +18 -2
- package/dist/lib/daemon/config.d.ts +6 -0
- package/dist/lib/daemon/config.js +15 -2
- package/dist/lib/daemon/requests.d.ts +4 -0
- package/dist/lib/daemon/requests.js +2 -0
- package/dist/lib/daemon/run.js +94 -8
- package/dist/lib/daemon/supervisor.d.ts +8 -0
- package/dist/lib/daemon/supervisor.js +101 -1
- package/dist/lib/daemon/sync-runner.d.ts +58 -0
- package/dist/lib/daemon/sync-runner.js +277 -0
- package/dist/lib/doctor/__testing__/run-doctor.d.ts +8 -0
- package/dist/lib/doctor/__testing__/run-doctor.js +52 -0
- package/dist/lib/flag-registry-worker-source.generated.d.ts +1 -1
- package/dist/lib/flag-registry-worker-source.generated.js +1 -1
- package/dist/lib/flag-registry.d.ts +12 -7
- package/dist/lib/flag-registry.js +66 -75
- package/dist/lib/flag-snapshot-file.d.ts +20 -0
- package/dist/lib/flag-snapshot-file.js +91 -0
- package/dist/lib/lanes/claude-balance.d.ts +6 -1
- package/dist/lib/lanes/claude-balance.js +46 -8
- package/dist/lib/lanes/config.js +15 -0
- package/dist/lib/lanes/hire-grant-dispatch.d.ts +2 -0
- package/dist/lib/lanes/hire-grant-dispatch.js +41 -0
- package/dist/lib/lanes/index.d.ts +1 -1
- package/dist/lib/lanes/keep-alive.d.ts +3 -0
- package/dist/lib/lanes/keep-alive.js +3 -0
- package/dist/lib/lanes/outpost-dispatch.d.ts +4 -0
- package/dist/lib/lanes/outpost-dispatch.js +11 -2
- package/dist/lib/lanes/reconcile.js +20 -4
- package/dist/lib/lanes/spawn.js +17 -10
- package/dist/lib/lanes/store.js +45 -1
- package/dist/lib/lanes/types.d.ts +30 -1
- package/dist/lib/lanes/types.js +2 -2
- package/dist/lib/lanes/watcher.js +3 -2
- package/dist/lib/process-flag-company-context.d.ts +8 -0
- package/dist/lib/process-flag-company-context.js +67 -0
- package/dist/main.js +3 -1
- package/dist/native-fast-route.d.ts +3 -0
- package/dist/native-fast-route.js +39 -0
- package/dist/secrets-env-fast-path.d.ts +5 -0
- package/dist/secrets-env-fast-path.js +16 -0
- package/dist/secrets-env-fast-route.d.ts +18 -0
- package/dist/secrets-env-fast-route.js +54 -0
- package/dist/utils/cli-telemetry.d.ts +26 -2
- package/dist/utils/cli-telemetry.js +178 -3
- package/dist/utils/hq-root-resolver.d.ts +13 -0
- package/dist/utils/hq-root-resolver.js +103 -0
- package/dist/utils/scaffold-fast-import-guard.js +6 -1
- package/dist/utils/vault-api.d.ts +8 -0
- package/dist/utils/vault-api.js +13 -1
- package/package.json +2 -2
|
@@ -6755,6 +6755,97 @@ export const COMMAND_CATALOG = [
|
|
|
6755
6755
|
],
|
|
6756
6756
|
"subcommands": []
|
|
6757
6757
|
},
|
|
6758
|
+
{
|
|
6759
|
+
"name": "delegate",
|
|
6760
|
+
"description": "Delegation handover helpers",
|
|
6761
|
+
"aliases": [],
|
|
6762
|
+
"hidden": false,
|
|
6763
|
+
"usage": "[options] [command]",
|
|
6764
|
+
"arguments": [],
|
|
6765
|
+
"options": [],
|
|
6766
|
+
"subcommands": [
|
|
6767
|
+
{
|
|
6768
|
+
"name": "resolve",
|
|
6769
|
+
"description": "Resolve a delegation recipient to a confirmed principal",
|
|
6770
|
+
"aliases": [],
|
|
6771
|
+
"hidden": false,
|
|
6772
|
+
"usage": "[args...]",
|
|
6773
|
+
"arguments": [
|
|
6774
|
+
{
|
|
6775
|
+
"name": "args",
|
|
6776
|
+
"required": false,
|
|
6777
|
+
"variadic": true
|
|
6778
|
+
}
|
|
6779
|
+
],
|
|
6780
|
+
"options": [],
|
|
6781
|
+
"subcommands": []
|
|
6782
|
+
},
|
|
6783
|
+
{
|
|
6784
|
+
"name": "pickup",
|
|
6785
|
+
"description": "Record or check evidence that a recipient picked up a delegation",
|
|
6786
|
+
"aliases": [],
|
|
6787
|
+
"hidden": false,
|
|
6788
|
+
"usage": "[args...]",
|
|
6789
|
+
"arguments": [
|
|
6790
|
+
{
|
|
6791
|
+
"name": "args",
|
|
6792
|
+
"required": false,
|
|
6793
|
+
"variadic": true
|
|
6794
|
+
}
|
|
6795
|
+
],
|
|
6796
|
+
"options": [],
|
|
6797
|
+
"subcommands": []
|
|
6798
|
+
},
|
|
6799
|
+
{
|
|
6800
|
+
"name": "repo",
|
|
6801
|
+
"description": "Prepare and record repository handover state",
|
|
6802
|
+
"aliases": [],
|
|
6803
|
+
"hidden": false,
|
|
6804
|
+
"usage": "[args...]",
|
|
6805
|
+
"arguments": [
|
|
6806
|
+
{
|
|
6807
|
+
"name": "args",
|
|
6808
|
+
"required": false,
|
|
6809
|
+
"variadic": true
|
|
6810
|
+
}
|
|
6811
|
+
],
|
|
6812
|
+
"options": [],
|
|
6813
|
+
"subcommands": []
|
|
6814
|
+
},
|
|
6815
|
+
{
|
|
6816
|
+
"name": "secrets",
|
|
6817
|
+
"description": "Grant a recipient access to declared secret names",
|
|
6818
|
+
"aliases": [],
|
|
6819
|
+
"hidden": false,
|
|
6820
|
+
"usage": "[args...]",
|
|
6821
|
+
"arguments": [
|
|
6822
|
+
{
|
|
6823
|
+
"name": "args",
|
|
6824
|
+
"required": false,
|
|
6825
|
+
"variadic": true
|
|
6826
|
+
}
|
|
6827
|
+
],
|
|
6828
|
+
"options": [],
|
|
6829
|
+
"subcommands": []
|
|
6830
|
+
},
|
|
6831
|
+
{
|
|
6832
|
+
"name": "transfer",
|
|
6833
|
+
"description": "Transfer local project ownership to a delegation recipient",
|
|
6834
|
+
"aliases": [],
|
|
6835
|
+
"hidden": false,
|
|
6836
|
+
"usage": "[args...]",
|
|
6837
|
+
"arguments": [
|
|
6838
|
+
{
|
|
6839
|
+
"name": "args",
|
|
6840
|
+
"required": false,
|
|
6841
|
+
"variadic": true
|
|
6842
|
+
}
|
|
6843
|
+
],
|
|
6844
|
+
"options": [],
|
|
6845
|
+
"subcommands": []
|
|
6846
|
+
}
|
|
6847
|
+
]
|
|
6848
|
+
},
|
|
6758
6849
|
{
|
|
6759
6850
|
"name": "generate-workers-registry",
|
|
6760
6851
|
"description": "Regenerate the derived workers registry",
|
|
@@ -9627,6 +9718,39 @@ export const COMMAND_CATALOG = [
|
|
|
9627
9718
|
],
|
|
9628
9719
|
"subcommands": []
|
|
9629
9720
|
},
|
|
9721
|
+
{
|
|
9722
|
+
"name": "set",
|
|
9723
|
+
"description": "Change the model or effort a lane uses from its next resume",
|
|
9724
|
+
"aliases": [],
|
|
9725
|
+
"hidden": false,
|
|
9726
|
+
"usage": "[options] <lane-id>",
|
|
9727
|
+
"arguments": [
|
|
9728
|
+
{
|
|
9729
|
+
"name": "lane-id",
|
|
9730
|
+
"required": true,
|
|
9731
|
+
"variadic": false
|
|
9732
|
+
}
|
|
9733
|
+
],
|
|
9734
|
+
"options": [
|
|
9735
|
+
{
|
|
9736
|
+
"flags": "--model <model>",
|
|
9737
|
+
"description": "Model for the lane's next and later turns"
|
|
9738
|
+
},
|
|
9739
|
+
{
|
|
9740
|
+
"flags": "--effort <level>",
|
|
9741
|
+
"description": "Effort for the lane's next and later turns"
|
|
9742
|
+
},
|
|
9743
|
+
{
|
|
9744
|
+
"flags": "--reason <text>",
|
|
9745
|
+
"description": "Why the settings changed; recorded in settings_history"
|
|
9746
|
+
},
|
|
9747
|
+
{
|
|
9748
|
+
"flags": "--json",
|
|
9749
|
+
"description": "Emit JSON on stdout (default)"
|
|
9750
|
+
}
|
|
9751
|
+
],
|
|
9752
|
+
"subcommands": []
|
|
9753
|
+
},
|
|
9630
9754
|
{
|
|
9631
9755
|
"name": "grant",
|
|
9632
9756
|
"description": "Set a lane's alive child-lane grant as its senior",
|
|
@@ -9707,6 +9831,14 @@ export const COMMAND_CATALOG = [
|
|
|
9707
9831
|
"flags": "--senior <ref>",
|
|
9708
9832
|
"description": "Filter by senior ref"
|
|
9709
9833
|
},
|
|
9834
|
+
{
|
|
9835
|
+
"flags": "--lane <id>",
|
|
9836
|
+
"description": "Filter by lane id (repeatable)"
|
|
9837
|
+
},
|
|
9838
|
+
{
|
|
9839
|
+
"flags": "--active",
|
|
9840
|
+
"description": "Include only lanes that are not terminal"
|
|
9841
|
+
},
|
|
9710
9842
|
{
|
|
9711
9843
|
"flags": "--json",
|
|
9712
9844
|
"description": "Emit JSON on stdout (default)"
|
|
@@ -10428,7 +10560,7 @@ export const COMMAND_CATALOG = [
|
|
|
10428
10560
|
},
|
|
10429
10561
|
{
|
|
10430
10562
|
"name": "stop",
|
|
10431
|
-
"description": "Cancel a queued lane or kill a running one",
|
|
10563
|
+
"description": "Cancel a queued lane or kill a running one (terminal; use interrupt to keep it resumable)",
|
|
10432
10564
|
"aliases": [],
|
|
10433
10565
|
"hidden": false,
|
|
10434
10566
|
"usage": "[options] <lane-id>",
|
|
@@ -10451,6 +10583,31 @@ export const COMMAND_CATALOG = [
|
|
|
10451
10583
|
],
|
|
10452
10584
|
"subcommands": []
|
|
10453
10585
|
},
|
|
10586
|
+
{
|
|
10587
|
+
"name": "interrupt",
|
|
10588
|
+
"description": "Stop a running lane's turn and keep it resumable with hq lanes resume",
|
|
10589
|
+
"aliases": [],
|
|
10590
|
+
"hidden": false,
|
|
10591
|
+
"usage": "[options] <lane-id>",
|
|
10592
|
+
"arguments": [
|
|
10593
|
+
{
|
|
10594
|
+
"name": "lane-id",
|
|
10595
|
+
"required": true,
|
|
10596
|
+
"variadic": false
|
|
10597
|
+
}
|
|
10598
|
+
],
|
|
10599
|
+
"options": [
|
|
10600
|
+
{
|
|
10601
|
+
"flags": "--reason <text>",
|
|
10602
|
+
"description": "Record the reason in the lane's stop history"
|
|
10603
|
+
},
|
|
10604
|
+
{
|
|
10605
|
+
"flags": "--json",
|
|
10606
|
+
"description": "JSON on stdout (always)"
|
|
10607
|
+
}
|
|
10608
|
+
],
|
|
10609
|
+
"subcommands": []
|
|
10610
|
+
},
|
|
10454
10611
|
{
|
|
10455
10612
|
"name": "approve",
|
|
10456
10613
|
"description": "Record senior approval for a registry worker checkpoint",
|
|
@@ -11291,6 +11448,150 @@ export const COMMAND_CATALOG = [
|
|
|
11291
11448
|
],
|
|
11292
11449
|
"subcommands": []
|
|
11293
11450
|
},
|
|
11451
|
+
{
|
|
11452
|
+
"name": "sync",
|
|
11453
|
+
"description": "Inspect and control the daemon's company sync runner",
|
|
11454
|
+
"aliases": [],
|
|
11455
|
+
"hidden": false,
|
|
11456
|
+
"usage": "[options] [command]",
|
|
11457
|
+
"arguments": [],
|
|
11458
|
+
"options": [],
|
|
11459
|
+
"subcommands": [
|
|
11460
|
+
{
|
|
11461
|
+
"name": "status",
|
|
11462
|
+
"description": "Show sync ownership, heartbeat, last pass and log path",
|
|
11463
|
+
"aliases": [],
|
|
11464
|
+
"hidden": false,
|
|
11465
|
+
"usage": "[options]",
|
|
11466
|
+
"arguments": [],
|
|
11467
|
+
"options": [
|
|
11468
|
+
{
|
|
11469
|
+
"flags": "--json",
|
|
11470
|
+
"description": "Print machine-readable JSON"
|
|
11471
|
+
}
|
|
11472
|
+
],
|
|
11473
|
+
"subcommands": []
|
|
11474
|
+
},
|
|
11475
|
+
{
|
|
11476
|
+
"name": "now",
|
|
11477
|
+
"description": "Start a fresh sync pass immediately",
|
|
11478
|
+
"aliases": [],
|
|
11479
|
+
"hidden": false,
|
|
11480
|
+
"usage": "[options]",
|
|
11481
|
+
"arguments": [],
|
|
11482
|
+
"options": [
|
|
11483
|
+
{
|
|
11484
|
+
"flags": "--json",
|
|
11485
|
+
"description": "Print machine-readable JSON"
|
|
11486
|
+
}
|
|
11487
|
+
],
|
|
11488
|
+
"subcommands": []
|
|
11489
|
+
},
|
|
11490
|
+
{
|
|
11491
|
+
"name": "pause",
|
|
11492
|
+
"description": "Pause daemon sync until resumed",
|
|
11493
|
+
"aliases": [],
|
|
11494
|
+
"hidden": false,
|
|
11495
|
+
"usage": "[options]",
|
|
11496
|
+
"arguments": [],
|
|
11497
|
+
"options": [
|
|
11498
|
+
{
|
|
11499
|
+
"flags": "--json",
|
|
11500
|
+
"description": "Print machine-readable JSON"
|
|
11501
|
+
}
|
|
11502
|
+
],
|
|
11503
|
+
"subcommands": []
|
|
11504
|
+
},
|
|
11505
|
+
{
|
|
11506
|
+
"name": "resume",
|
|
11507
|
+
"description": "Resume daemon sync after a pause",
|
|
11508
|
+
"aliases": [],
|
|
11509
|
+
"hidden": false,
|
|
11510
|
+
"usage": "[options]",
|
|
11511
|
+
"arguments": [],
|
|
11512
|
+
"options": [
|
|
11513
|
+
{
|
|
11514
|
+
"flags": "--json",
|
|
11515
|
+
"description": "Print machine-readable JSON"
|
|
11516
|
+
}
|
|
11517
|
+
],
|
|
11518
|
+
"subcommands": []
|
|
11519
|
+
},
|
|
11520
|
+
{
|
|
11521
|
+
"name": "take-ownership",
|
|
11522
|
+
"description": "Persist daemon ownership of desktop sync and reconcile",
|
|
11523
|
+
"aliases": [],
|
|
11524
|
+
"hidden": false,
|
|
11525
|
+
"usage": "[options]",
|
|
11526
|
+
"arguments": [],
|
|
11527
|
+
"options": [
|
|
11528
|
+
{
|
|
11529
|
+
"flags": "--json",
|
|
11530
|
+
"description": "Print machine-readable JSON"
|
|
11531
|
+
}
|
|
11532
|
+
],
|
|
11533
|
+
"subcommands": []
|
|
11534
|
+
},
|
|
11535
|
+
{
|
|
11536
|
+
"name": "mode",
|
|
11537
|
+
"description": "Read or change a company's sync footprint",
|
|
11538
|
+
"aliases": [],
|
|
11539
|
+
"hidden": false,
|
|
11540
|
+
"usage": "[options] [command]",
|
|
11541
|
+
"arguments": [],
|
|
11542
|
+
"options": [],
|
|
11543
|
+
"subcommands": [
|
|
11544
|
+
{
|
|
11545
|
+
"name": "get",
|
|
11546
|
+
"description": "Read a company's current all/shared sync mode",
|
|
11547
|
+
"aliases": [],
|
|
11548
|
+
"hidden": false,
|
|
11549
|
+
"usage": "[options] <company>",
|
|
11550
|
+
"arguments": [
|
|
11551
|
+
{
|
|
11552
|
+
"name": "company",
|
|
11553
|
+
"required": true,
|
|
11554
|
+
"variadic": false
|
|
11555
|
+
}
|
|
11556
|
+
],
|
|
11557
|
+
"options": [
|
|
11558
|
+
{
|
|
11559
|
+
"flags": "--json",
|
|
11560
|
+
"description": "Print machine-readable JSON"
|
|
11561
|
+
}
|
|
11562
|
+
],
|
|
11563
|
+
"subcommands": []
|
|
11564
|
+
},
|
|
11565
|
+
{
|
|
11566
|
+
"name": "set",
|
|
11567
|
+
"description": "Set a company's sync mode to all or shared",
|
|
11568
|
+
"aliases": [],
|
|
11569
|
+
"hidden": false,
|
|
11570
|
+
"usage": "[options] <company> <mode>",
|
|
11571
|
+
"arguments": [
|
|
11572
|
+
{
|
|
11573
|
+
"name": "company",
|
|
11574
|
+
"required": true,
|
|
11575
|
+
"variadic": false
|
|
11576
|
+
},
|
|
11577
|
+
{
|
|
11578
|
+
"name": "mode",
|
|
11579
|
+
"required": true,
|
|
11580
|
+
"variadic": false
|
|
11581
|
+
}
|
|
11582
|
+
],
|
|
11583
|
+
"options": [
|
|
11584
|
+
{
|
|
11585
|
+
"flags": "--json",
|
|
11586
|
+
"description": "Print machine-readable JSON"
|
|
11587
|
+
}
|
|
11588
|
+
],
|
|
11589
|
+
"subcommands": []
|
|
11590
|
+
}
|
|
11591
|
+
]
|
|
11592
|
+
}
|
|
11593
|
+
]
|
|
11594
|
+
},
|
|
11294
11595
|
{
|
|
11295
11596
|
"name": "logs",
|
|
11296
11597
|
"description": "Print the supervisor log, or one service's log",
|
|
@@ -45,8 +45,10 @@ export declare const SIBLING_PROMPT_TEMPLATE = "You are the HQ checkpoint siblin
|
|
|
45
45
|
* Rendered into the sibling prompt only when the payload names a company. The
|
|
46
46
|
* flag check happens inside `hq core ontology plan`, in the sibling, because
|
|
47
47
|
* the checkpoint parent performs no network I/O. Only this run's own payload
|
|
48
|
-
* gets the step
|
|
49
|
-
*
|
|
48
|
+
* gets the step. A queued payload's company files are recorded as queued
|
|
49
|
+
* touches when it is queued (CO-59), and a later plan for that company takes
|
|
50
|
+
* them while checkpoint.ontology.queued-touches is on; a run with no company
|
|
51
|
+
* of its own gets the step for the company whose touches waited longest.
|
|
50
52
|
*/
|
|
51
53
|
export declare const SIBLING_ONTOLOGY_STEP = "5b. ONTOLOGY (this run's own payload only; skip it for claimed queue payloads).\n Run: hq core ontology plan --run-dir \"<runDir>\" --hq-root \"<hqRoot>\"\n If it prints \"ontology: skipped\", do nothing more for this step. Otherwise\n read <runDir>/ontology-plan.json, follow its \"instructions\" exactly, and\n write <runDir>/ontology-candidates.json. Read only the files and line\n ranges the plan lists. Then run:\n hq core ontology apply --run-dir \"<runDir>\" --hq-root \"<hqRoot>\"\n Never write under the company's ontology/ folder yourself, and never edit\n payload.json or ontology-plan.json. Copy the command's one-line output into\n the report. If either command fails, record the error and continue.\n";
|
|
52
54
|
export declare function renderSiblingPrompt(runDir: string, payloadPath: string, options?: {
|
|
@@ -17,6 +17,7 @@ import { toHqStateWriteError } from "../utils/hq-state-write-error.js";
|
|
|
17
17
|
import { checkpointStampWriteErrorFor, isCheckpointStampWriteError, } from "../utils/checkpoint-stamp-write-error.js";
|
|
18
18
|
import { readBackendPreference } from "../lib/checkpoint-ontology/plan.js";
|
|
19
19
|
import { resolveOntologyCompany } from "../lib/checkpoint-ontology/company.js";
|
|
20
|
+
import { markBorrowed, oldestQueuedCompany, recordQueuedTouches } from "../lib/checkpoint-ontology/queued-touches.js";
|
|
20
21
|
import { describeCoreCommand } from "./core-command-catalog.js";
|
|
21
22
|
const DEFAULT_TRIGGER = "stop-gate";
|
|
22
23
|
const BACKENDS = new Set(["auto", "claude", "codex", "grok", "none"]);
|
|
@@ -189,8 +190,10 @@ report instead of guessing.
|
|
|
189
190
|
* Rendered into the sibling prompt only when the payload names a company. The
|
|
190
191
|
* flag check happens inside `hq core ontology plan`, in the sibling, because
|
|
191
192
|
* the checkpoint parent performs no network I/O. Only this run's own payload
|
|
192
|
-
* gets the step
|
|
193
|
-
*
|
|
193
|
+
* gets the step. A queued payload's company files are recorded as queued
|
|
194
|
+
* touches when it is queued (CO-59), and a later plan for that company takes
|
|
195
|
+
* them while checkpoint.ontology.queued-touches is on; a run with no company
|
|
196
|
+
* of its own gets the step for the company whose touches waited longest.
|
|
194
197
|
*/
|
|
195
198
|
export const SIBLING_ONTOLOGY_STEP = `5b. ONTOLOGY (this run's own payload only; skip it for claimed queue payloads).
|
|
196
199
|
Run: hq core ontology plan --run-dir "<runDir>" --hq-root "<hqRoot>"
|
|
@@ -1001,15 +1004,43 @@ function startSibling(liveRoot, input, threadPath, backend) {
|
|
|
1001
1004
|
fs.mkdirSync(siblingRoot, { recursive: true });
|
|
1002
1005
|
if (activePid !== null) {
|
|
1003
1006
|
const depth = appendPending(pendingPath, payload);
|
|
1007
|
+
try {
|
|
1008
|
+
recordQueuedTouches(liveRoot, payload.company, payload.files, new Date());
|
|
1009
|
+
}
|
|
1010
|
+
catch {
|
|
1011
|
+
// Queued touches only help a later ontology plan; they must never fail
|
|
1012
|
+
// the checkpoint itself.
|
|
1013
|
+
}
|
|
1004
1014
|
printResult(`checkpoint: sibling busy — payload queued (${depth} pending)`);
|
|
1005
1015
|
return;
|
|
1006
1016
|
}
|
|
1007
1017
|
const runDir = path.join(siblingRoot, `${formatTimestamp(new Date())}-${summarySlug(input.summary ?? "checkpoint")}`);
|
|
1008
1018
|
fs.mkdirSync(runDir, { recursive: true });
|
|
1009
1019
|
payload.pending_payloads = claimPending(pendingPath, path.join(runDir, "pending-claimed.jsonl"));
|
|
1020
|
+
if (!payload.company) {
|
|
1021
|
+
let queued;
|
|
1022
|
+
try {
|
|
1023
|
+
queued = oldestQueuedCompany(liveRoot);
|
|
1024
|
+
}
|
|
1025
|
+
catch {
|
|
1026
|
+
queued = null;
|
|
1027
|
+
}
|
|
1028
|
+
if (queued) {
|
|
1029
|
+
payload.ontology_company = queued;
|
|
1030
|
+
try {
|
|
1031
|
+
markBorrowed(liveRoot, queued, new Date());
|
|
1032
|
+
}
|
|
1033
|
+
catch {
|
|
1034
|
+
// A borrowed-company marker must never fail the checkpoint.
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1010
1038
|
const payloadPath = path.join(runDir, "payload.json");
|
|
1011
1039
|
fs.writeFileSync(payloadPath, `${JSON.stringify(payload, null, 2)}\n`);
|
|
1012
|
-
const prompt = renderSiblingPrompt(runDir, payloadPath, {
|
|
1040
|
+
const prompt = renderSiblingPrompt(runDir, payloadPath, {
|
|
1041
|
+
company: payload.company ?? payload.ontology_company ?? null,
|
|
1042
|
+
hqRoot: liveRoot,
|
|
1043
|
+
});
|
|
1013
1044
|
fs.writeFileSync(path.join(runDir, "prompt.md"), prompt);
|
|
1014
1045
|
const logPath = path.join(runDir, "run.log");
|
|
1015
1046
|
const logFd = fs.openSync(logPath, "a");
|
|
@@ -22,11 +22,13 @@ export declare function describeCoreCommand(command: Command, metadata: CoreComm
|
|
|
22
22
|
export declare function registeredCoreCommandListing(core: Command): CoreCommandListingEntry[];
|
|
23
23
|
export declare function fastScaffoldListingMismatches(listing: readonly CoreCommandListingEntry[], fastScripts: readonly {
|
|
24
24
|
name: string;
|
|
25
|
-
|
|
25
|
+
kind: "shell" | "native";
|
|
26
|
+
asset?: string;
|
|
26
27
|
}[]): string[];
|
|
27
28
|
export declare function assertFastScaffoldListingParity(listing: readonly CoreCommandListingEntry[], fastScripts: readonly {
|
|
28
29
|
name: string;
|
|
29
|
-
|
|
30
|
+
kind: "shell" | "native";
|
|
31
|
+
asset?: string;
|
|
30
32
|
}[]): void;
|
|
31
33
|
export {};
|
|
32
34
|
//# sourceMappingURL=core-command-catalog.d.ts.map
|
|
@@ -43,8 +43,11 @@ export function fastScaffoldListingMismatches(listing, fastScripts) {
|
|
|
43
43
|
if (!listed) {
|
|
44
44
|
mismatches.push(`${fast.name} is missing from hq core commands`);
|
|
45
45
|
}
|
|
46
|
-
else if (listed.asset !== fast.asset) {
|
|
47
|
-
mismatches.push(`${fast.name} lists ${listed.asset ?? "no asset"}, fast path uses ${fast.asset}`);
|
|
46
|
+
else if (fast.kind === "shell" && listed.asset !== fast.asset) {
|
|
47
|
+
mismatches.push(`${fast.name} lists ${listed.asset ?? "no asset"}, fast path uses ${fast.asset ?? "no asset"}`);
|
|
48
|
+
}
|
|
49
|
+
else if (fast.kind === "native" && (listed.execution !== "native" || listed.asset)) {
|
|
50
|
+
mismatches.push(`${fast.name} is native in the fast path but not in the command catalog`);
|
|
48
51
|
}
|
|
49
52
|
}
|
|
50
53
|
return mismatches;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Native implementations of the five `hq core delegate` shell companions. */
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
export declare const CORE_NATIVE_DELEGATE_FLAG = "core-native-delegate";
|
|
4
|
+
/** Register the Wave 1a delegate commands and preserve the shell rollback path. */
|
|
5
|
+
export declare function registerCoreDelegateCommand(core: Command): void;
|
|
6
|
+
//# sourceMappingURL=core-delegate.d.ts.map
|