@indigoai-us/hq-cli 5.345.251 → 5.345.253
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 +153 -0
- package/assets/scaffold/core/scripts/hq-session.sh +9 -0
- package/contracts/host-canary-release.json +9 -3
- package/dist/command-catalog.generated.d.ts +269 -1
- package/dist/command-catalog.generated.js +330 -1
- package/dist/command-registration-plan.d.ts +6 -0
- package/dist/command-registration-plan.js +1 -0
- package/dist/commands/bot.js +7 -2
- package/dist/commands/ci-intake.d.ts +15 -0
- package/dist/commands/ci-intake.js +252 -0
- package/dist/commands/ci-metrics.d.ts +8 -0
- package/dist/commands/ci-metrics.js +55 -0
- package/dist/commands/ci.d.ts +13 -0
- package/dist/commands/ci.js +10 -0
- package/dist/commands/core-bucket-c-work-mesh-offer-native.js +1 -1
- package/dist/commands/core-hq-session-binding.d.ts +140 -0
- package/dist/commands/core-hq-session-binding.js +363 -0
- package/dist/commands/core-hq-session-native.d.ts +23 -0
- package/dist/commands/core-hq-session-native.js +59 -9
- package/dist/commands/core-stop-autosave.js +1 -1
- package/dist/commands/core.js +10 -0
- package/dist/commands/doctor.d.ts +5 -1
- package/dist/commands/doctor.js +42 -5
- package/dist/commands/files.d.ts +62 -0
- package/dist/commands/files.js +250 -9
- package/dist/commands/install-global.js +4 -2
- package/dist/commands/logout.js +4 -0
- package/dist/commands/ontology-graph.d.ts +2 -0
- package/dist/commands/ontology-graph.js +33 -0
- package/dist/commands/report.js +35 -2
- package/dist/commands/storage-gate.js +1 -1
- package/dist/commands/vault-retention-flag.js +2 -1
- package/dist/commands/whoami.js +1 -1
- package/dist/hq-cloud-sync-runner/bin/sync-runner.js +238 -221
- package/dist/hq-cloud-sync-runner/package.json +1 -1
- package/dist/index.js +3 -1
- package/dist/lib/agent-kit/inbox-poll-backoff-flag.js +1 -1
- package/dist/lib/agent-kit/mcp/tools.js +48 -0
- package/dist/lib/bot/fleet-bots-update-pass.js +1 -1
- package/dist/lib/bot/fleet-cron.d.ts +50 -0
- package/dist/lib/bot/fleet-cron.js +173 -32
- package/dist/lib/bot/fleet-local.d.ts +18 -0
- package/dist/lib/bot/fleet-local.js +51 -5
- package/dist/lib/bot/inbox-poll-backoff-flag.js +1 -1
- package/dist/lib/bot/signals-engine-flag.d.ts +1 -1
- package/dist/lib/bot/signals-engine-flag.js +1 -1
- package/dist/lib/cli-invite-nudge.js +1 -1
- package/dist/lib/client-version.d.ts +2 -0
- package/dist/lib/client-version.js +24 -0
- package/dist/lib/company-flag-gate.d.ts +30 -0
- package/dist/lib/company-flag-gate.js +104 -0
- package/dist/lib/core-utils/hook-timeout-debug-context-flag.js +1 -1
- package/dist/lib/daemon/flag.js +2 -1
- package/dist/lib/daemon/legacy-journal-gate.js +3 -1
- package/dist/lib/daemon/run.js +4 -3
- package/dist/lib/daemon/shared-flag-reads.js +1 -1
- package/dist/lib/delivery/migrations.d.ts +32 -1
- package/dist/lib/delivery/migrations.js +69 -8
- package/dist/lib/doctor/checks/host-core.js +22 -4
- package/dist/lib/doctor/checks/jq.d.ts +27 -6
- package/dist/lib/doctor/checks/jq.js +46 -8
- package/dist/lib/doctor/client-health-reason-codes-flag.js +1 -1
- package/dist/lib/doctor/fix/refresh-sync-handoff.d.ts +1 -1
- package/dist/lib/doctor/fix/refresh-sync-handoff.js +1 -1
- package/dist/lib/flag-client-gate-headers.d.ts +38 -0
- package/dist/lib/flag-client-gate-headers.js +62 -0
- package/dist/lib/flag-client-headers.d.ts +15 -0
- package/dist/lib/flag-client-headers.js +25 -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-worker.js +35 -0
- package/dist/lib/flag-registry.d.ts +1 -20
- package/dist/lib/flag-registry.js +5 -81
- package/dist/lib/hook-engine/adapter-core-pin.d.ts +30 -0
- package/dist/lib/hook-engine/adapter-core-pin.js +30 -0
- package/dist/lib/hook-engine/coverage.d.ts +65 -1
- package/dist/lib/hook-engine/coverage.js +173 -8
- package/dist/lib/hook-engine/reconcile.js +3 -2
- package/dist/lib/hot-channels/prompts/signals-pass.md +20 -0
- package/dist/lib/hot-channels/signal-changes.d.ts +228 -0
- package/dist/lib/hot-channels/signal-changes.js +683 -0
- package/dist/lib/hot-channels/signals-pass.d.ts +24 -0
- package/dist/lib/hot-channels/signals-pass.js +232 -12
- package/dist/lib/lanes/outpost-worktree-pruner-flag.d.ts +1 -1
- package/dist/lib/lanes/outpost-worktree-pruner-flag.js +1 -1
- package/dist/lib/lanes/registry-flag.js +2 -1
- package/dist/lib/lanes/spawn.js +11 -1
- package/dist/lib/mesh/live/binding-intent.d.ts +61 -0
- package/dist/lib/mesh/live/binding-intent.js +201 -0
- package/dist/lib/mesh/live/binding-receipt.d.ts +157 -0
- package/dist/lib/mesh/live/binding-receipt.js +365 -0
- package/dist/lib/mesh/live/company-flag-refresh.js +1 -1
- package/dist/lib/mesh/live/daemon/doctor-telemetry.d.ts +39 -0
- package/dist/lib/mesh/live/daemon/doctor-telemetry.js +58 -0
- package/dist/lib/mesh/live/daemon/install.js +2 -1
- package/dist/lib/mesh/live/daemon/presence.js +9 -0
- package/dist/lib/mesh/live/daemon/run.d.ts +3 -0
- package/dist/lib/mesh/live/daemon/run.js +33 -1
- package/dist/lib/ontology-graph/lineage/index.d.ts +401 -0
- package/dist/lib/ontology-graph/lineage/index.js +1027 -0
- package/dist/lib/ontology-graph/model/index.d.ts +54 -0
- package/dist/lib/ontology-graph/model/index.js +112 -0
- package/dist/lib/ontology-graph/model/pass-tasks.d.ts +75 -0
- package/dist/lib/ontology-graph/model/pass-tasks.js +166 -0
- package/dist/lib/ontology-graph/model/pass.d.ts +6 -0
- package/dist/lib/ontology-graph/model/pass.js +9 -2
- package/dist/lib/ontology-graph/model/pending-items.d.ts +8 -0
- package/dist/lib/ontology-graph/model/pending-items.js +24 -1
- package/dist/lib/ontology-graph/model/step.d.ts +1 -1
- package/dist/lib/ontology-graph/model/tasks.d.ts +11 -3
- package/dist/lib/ontology-graph/model/tasks.js +20 -7
- package/dist/lib/ontology-graph/read/brief.js +41 -6
- package/dist/lib/ontology-graph/read/index.d.ts +4 -0
- package/dist/lib/ontology-graph/read/index.js +173 -29
- package/dist/lib/ontology-graph/read/lineage.d.ts +101 -0
- package/dist/lib/ontology-graph/read/lineage.js +262 -0
- package/dist/lib/ontology-graph/replay/buffered-store.js +17 -0
- package/dist/lib/ontology-graph/replay/engine.d.ts +32 -1
- package/dist/lib/ontology-graph/replay/engine.js +213 -8
- package/dist/lib/ontology-graph/replay/extractors.d.ts +26 -0
- package/dist/lib/ontology-graph/replay/extractors.js +25 -1
- package/dist/lib/ontology-graph/replay/index.d.ts +2 -0
- package/dist/lib/ontology-graph/replay/index.js +9 -3
- package/dist/lib/ontology-graph/replay/signal-changes.d.ts +118 -0
- package/dist/lib/ontology-graph/replay/signal-changes.js +687 -0
- package/dist/lib/ontology-graph/schema/decision-status.d.ts +18 -0
- package/dist/lib/ontology-graph/schema/decision-status.js +20 -0
- package/dist/lib/ontology-graph/schema/index.d.ts +1 -0
- package/dist/lib/ontology-graph/schema/index.js +1 -0
- package/dist/lib/ontology-graph/setup/index.js +13 -3
- package/dist/lib/search-index/index.d.ts +33 -1
- package/dist/lib/search-index/index.js +180 -25
- package/dist/lib/search-index/qmd-exit-diagnostics.d.ts +7 -0
- package/dist/lib/search-index/qmd-exit-diagnostics.js +25 -1
- package/dist/lib/signals/adapters-catalog.js +1 -1
- package/dist/lib/smart-ci/cost.d.ts +72 -0
- package/dist/lib/smart-ci/cost.js +120 -0
- package/dist/lib/smart-ci/github.d.ts +112 -0
- package/dist/lib/smart-ci/github.js +267 -0
- package/dist/lib/smart-ci/intake.d.ts +288 -0
- package/dist/lib/smart-ci/intake.js +1078 -0
- package/dist/lib/smart-ci/ledger.d.ts +218 -0
- package/dist/lib/smart-ci/ledger.js +527 -0
- package/dist/lib/smart-ci/metrics.d.ts +137 -0
- package/dist/lib/smart-ci/metrics.js +249 -0
- package/dist/lib/smart-ci/records.d.ts +265 -0
- package/dist/lib/smart-ci/records.js +281 -0
- package/dist/lib/smart-ci/reducer.d.ts +67 -0
- package/dist/lib/smart-ci/reducer.js +261 -0
- package/dist/lib/sync-core/engine-holds.d.ts +15 -0
- package/dist/lib/sync-core/engine-holds.js +104 -11
- package/dist/lib/sync-core/engine-home.d.ts +3 -0
- package/dist/lib/sync-core/engine-home.js +41 -1
- package/dist/lib/sync-core/flag.js +2 -1
- package/dist/lib/sync-core/hand-back.d.ts +1 -0
- package/dist/lib/sync-core/hand-back.js +7 -2
- package/dist/lib/sync-core/legacy-journal-export-child.js +5 -3
- package/dist/lib/sync-core/legacy-journal-export.d.ts +23 -4
- package/dist/lib/sync-core/legacy-journal-export.js +120 -55
- package/dist/lib/sync-core/reconcile.d.ts +2 -1
- package/dist/lib/sync-core/reconcile.js +40 -7
- package/dist/lib/sync-invalid-entity-warning.js +2 -1
- package/dist/lib/windows/install-followup.d.ts +41 -0
- package/dist/lib/windows/install-followup.js +87 -0
- package/dist/lib/windows/jq.d.ts +59 -0
- package/dist/lib/windows/jq.js +154 -3
- package/dist/lib/windows/user-path.d.ts +5 -0
- package/dist/lib/windows/user-path.js +1 -1
- package/dist/lib/work-context/auto-bind.d.ts +12 -0
- package/dist/lib/work-context/auto-bind.js +49 -3
- package/dist/lib/work-context/organize.d.ts +4 -2
- package/dist/lib/work-context/organize.js +18 -8
- package/dist/lib/work-context/reconcile.js +16 -1
- package/dist/main.js +12 -1
- package/dist/utils/client-health-contract.d.ts +30 -0
- package/dist/utils/client-health-contract.js +111 -0
- package/dist/utils/client-health.d.ts +5 -2
- package/dist/utils/client-health.js +74 -5
- package/dist/utils/exclusive-lock.d.ts +5 -1
- package/dist/utils/exclusive-lock.js +9 -2
- package/dist/utils/host-registration.d.ts +7 -0
- package/dist/utils/host-registration.js +10 -1
- package/dist/utils/pid.d.ts +31 -0
- package/dist/utils/pid.js +65 -0
- package/dist/utils/resident-package-preload.js +12 -4
- package/dist/utils/sentry-fingerprint.js +3 -0
- package/package.json +10 -8
- package/scripts/install-hook-engine.mjs +5 -3
|
@@ -3901,6 +3901,11 @@ export const COMMAND_CATALOG = [
|
|
|
3901
3901
|
"flags": "-y, --yes",
|
|
3902
3902
|
"description": "Skip the confirmation prompt (for scripts); not above 1000 objects",
|
|
3903
3903
|
"hidden": false
|
|
3904
|
+
},
|
|
3905
|
+
{
|
|
3906
|
+
"flags": "--confirmation <token>",
|
|
3907
|
+
"description": "Send an hqdc_ delete confirmation token with a real company-vault delete; asks you to type the confirmation in a terminal first (not with --dry-run or --personal)",
|
|
3908
|
+
"hidden": false
|
|
3904
3909
|
}
|
|
3905
3910
|
],
|
|
3906
3911
|
"subcommands": []
|
|
@@ -7304,6 +7309,153 @@ export const COMMAND_CATALOG = [
|
|
|
7304
7309
|
],
|
|
7305
7310
|
"subcommands": []
|
|
7306
7311
|
},
|
|
7312
|
+
{
|
|
7313
|
+
"name": "lineage",
|
|
7314
|
+
"description": "Decision lineage: which decision replaced an earlier one",
|
|
7315
|
+
"aliases": [],
|
|
7316
|
+
"hidden": false,
|
|
7317
|
+
"helpOption": true,
|
|
7318
|
+
"helpCommand": true,
|
|
7319
|
+
"usage": "[options] [command]",
|
|
7320
|
+
"helpText": [],
|
|
7321
|
+
"arguments": [],
|
|
7322
|
+
"options": [],
|
|
7323
|
+
"subcommands": [
|
|
7324
|
+
{
|
|
7325
|
+
"name": "backfill",
|
|
7326
|
+
"description": "Ask the model, day by day from the oldest, whether each decision with no stated change replaces or reverses an earlier open one, and write a link for each that holds (model authority, no status row; each written link is listed in .state/lineage-backfill.jsonl, and `hq ontology lineage undo` removes exactly those). A day with a decision that got no usable reply is not written: the next run sends it again, and after 3 runs it is recorded as unanswered. Exit code 2 when the walk stopped early, 3 when it finished with a decision unanswered in this run. Runs whenever it is invoked, whatever model_tasks says",
|
|
7327
|
+
"aliases": [],
|
|
7328
|
+
"hidden": false,
|
|
7329
|
+
"helpOption": true,
|
|
7330
|
+
"helpCommand": false,
|
|
7331
|
+
"usage": "[options]",
|
|
7332
|
+
"helpText": [],
|
|
7333
|
+
"arguments": [],
|
|
7334
|
+
"options": [
|
|
7335
|
+
{
|
|
7336
|
+
"flags": "--company <slug>",
|
|
7337
|
+
"description": "company whose graph to use",
|
|
7338
|
+
"hidden": false
|
|
7339
|
+
},
|
|
7340
|
+
{
|
|
7341
|
+
"flags": "--hq-root <path>",
|
|
7342
|
+
"description": "HQ installation to operate on",
|
|
7343
|
+
"hidden": false
|
|
7344
|
+
},
|
|
7345
|
+
{
|
|
7346
|
+
"flags": "--graph-root <path>",
|
|
7347
|
+
"description": "graph folder to use instead of companies/<slug>/.hq/ontology-graph (env HQ_ONTOLOGY_GRAPH_ROOT)",
|
|
7348
|
+
"hidden": false
|
|
7349
|
+
},
|
|
7350
|
+
{
|
|
7351
|
+
"flags": "--member <person uid>",
|
|
7352
|
+
"description": "member the graph is built or read for (env HQ_ONTOLOGY_MEMBER)",
|
|
7353
|
+
"hidden": false
|
|
7354
|
+
},
|
|
7355
|
+
{
|
|
7356
|
+
"flags": "--audience-key <key>",
|
|
7357
|
+
"description": "audience key the member holds; repeat for more (env HQ_ONTOLOGY_AUDIENCE_KEYS, comma-separated)",
|
|
7358
|
+
"hidden": false
|
|
7359
|
+
},
|
|
7360
|
+
{
|
|
7361
|
+
"flags": "--json",
|
|
7362
|
+
"description": "print JSON",
|
|
7363
|
+
"hidden": false
|
|
7364
|
+
},
|
|
7365
|
+
{
|
|
7366
|
+
"flags": "--from <date>",
|
|
7367
|
+
"description": "first decision day to ask about (YYYY-MM-DD)",
|
|
7368
|
+
"hidden": false
|
|
7369
|
+
},
|
|
7370
|
+
{
|
|
7371
|
+
"flags": "--to <date>",
|
|
7372
|
+
"description": "last decision day to ask about (YYYY-MM-DD)",
|
|
7373
|
+
"hidden": false
|
|
7374
|
+
},
|
|
7375
|
+
{
|
|
7376
|
+
"flags": "--restart",
|
|
7377
|
+
"description": "forget what earlier runs settled, their attempt counts and their unanswered decisions, and walk from the first day; answers already given cost nothing",
|
|
7378
|
+
"hidden": false
|
|
7379
|
+
},
|
|
7380
|
+
{
|
|
7381
|
+
"flags": "--retry-unanswered",
|
|
7382
|
+
"description": "send the decisions earlier runs recorded as unanswered again",
|
|
7383
|
+
"hidden": false
|
|
7384
|
+
},
|
|
7385
|
+
{
|
|
7386
|
+
"flags": "--allow-unanswered",
|
|
7387
|
+
"description": "record a decision with no usable reply as unanswered at once instead of holding its day for the next run, and do not exit non-zero for it",
|
|
7388
|
+
"hidden": false
|
|
7389
|
+
},
|
|
7390
|
+
{
|
|
7391
|
+
"flags": "--max-input-tokens <n>",
|
|
7392
|
+
"description": "model input tokens allowed per day for this run, counting the day's earlier runs (default 150000)",
|
|
7393
|
+
"hidden": false
|
|
7394
|
+
},
|
|
7395
|
+
{
|
|
7396
|
+
"flags": "--max-output-tokens <n>",
|
|
7397
|
+
"description": "model output tokens allowed per day for this run (default 20000)",
|
|
7398
|
+
"hidden": false
|
|
7399
|
+
},
|
|
7400
|
+
{
|
|
7401
|
+
"flags": "--dry-run",
|
|
7402
|
+
"description": "count the decisions and batches and estimate the tokens and the list-price cost as ranges, with the flags that let the estimate through the daily cap; call no model and write nothing",
|
|
7403
|
+
"hidden": false
|
|
7404
|
+
}
|
|
7405
|
+
],
|
|
7406
|
+
"subcommands": []
|
|
7407
|
+
},
|
|
7408
|
+
{
|
|
7409
|
+
"name": "undo",
|
|
7410
|
+
"description": "Take back what `hq ontology lineage backfill` wrote: remove the rows .state/lineage-backfill.jsonl lists (each link's edge and its inverse) and clear the walk's state, so a later backfill starts from the first day. A row is removed only when the graph still holds it as the backfill wrote it; a row changed since is left and counted. No other row is touched, and no model is called",
|
|
7411
|
+
"aliases": [],
|
|
7412
|
+
"hidden": false,
|
|
7413
|
+
"helpOption": true,
|
|
7414
|
+
"helpCommand": false,
|
|
7415
|
+
"usage": "[options]",
|
|
7416
|
+
"helpText": [],
|
|
7417
|
+
"arguments": [],
|
|
7418
|
+
"options": [
|
|
7419
|
+
{
|
|
7420
|
+
"flags": "--company <slug>",
|
|
7421
|
+
"description": "company whose graph to use",
|
|
7422
|
+
"hidden": false
|
|
7423
|
+
},
|
|
7424
|
+
{
|
|
7425
|
+
"flags": "--hq-root <path>",
|
|
7426
|
+
"description": "HQ installation to operate on",
|
|
7427
|
+
"hidden": false
|
|
7428
|
+
},
|
|
7429
|
+
{
|
|
7430
|
+
"flags": "--graph-root <path>",
|
|
7431
|
+
"description": "graph folder to use instead of companies/<slug>/.hq/ontology-graph (env HQ_ONTOLOGY_GRAPH_ROOT)",
|
|
7432
|
+
"hidden": false
|
|
7433
|
+
},
|
|
7434
|
+
{
|
|
7435
|
+
"flags": "--member <person uid>",
|
|
7436
|
+
"description": "member the graph is built or read for (env HQ_ONTOLOGY_MEMBER)",
|
|
7437
|
+
"hidden": false
|
|
7438
|
+
},
|
|
7439
|
+
{
|
|
7440
|
+
"flags": "--audience-key <key>",
|
|
7441
|
+
"description": "audience key the member holds; repeat for more (env HQ_ONTOLOGY_AUDIENCE_KEYS, comma-separated)",
|
|
7442
|
+
"hidden": false
|
|
7443
|
+
},
|
|
7444
|
+
{
|
|
7445
|
+
"flags": "--json",
|
|
7446
|
+
"description": "print JSON",
|
|
7447
|
+
"hidden": false
|
|
7448
|
+
},
|
|
7449
|
+
{
|
|
7450
|
+
"flags": "--dry-run",
|
|
7451
|
+
"description": "count what would be removed and left; write nothing",
|
|
7452
|
+
"hidden": false
|
|
7453
|
+
}
|
|
7454
|
+
],
|
|
7455
|
+
"subcommands": []
|
|
7456
|
+
}
|
|
7457
|
+
]
|
|
7458
|
+
},
|
|
7307
7459
|
{
|
|
7308
7460
|
"name": "lookup",
|
|
7309
7461
|
"description": "Find an entity by name and print its facts, each with a source and date",
|
|
@@ -17322,6 +17474,183 @@ export const COMMAND_CATALOG = [
|
|
|
17322
17474
|
}
|
|
17323
17475
|
]
|
|
17324
17476
|
},
|
|
17477
|
+
{
|
|
17478
|
+
"name": "ci",
|
|
17479
|
+
"description": "Smart CI: record and measure what CI does (watch-only)",
|
|
17480
|
+
"aliases": [],
|
|
17481
|
+
"hidden": false,
|
|
17482
|
+
"helpOption": true,
|
|
17483
|
+
"helpCommand": true,
|
|
17484
|
+
"usage": "[options] [command]",
|
|
17485
|
+
"helpText": [],
|
|
17486
|
+
"arguments": [],
|
|
17487
|
+
"options": [],
|
|
17488
|
+
"subcommands": [
|
|
17489
|
+
{
|
|
17490
|
+
"name": "intake",
|
|
17491
|
+
"description": "Record CI jobs, checks, pull requests, pushes and runner pool state into the run ledger (read-only towards GitHub)",
|
|
17492
|
+
"aliases": [],
|
|
17493
|
+
"hidden": false,
|
|
17494
|
+
"helpOption": true,
|
|
17495
|
+
"helpCommand": false,
|
|
17496
|
+
"usage": "[options]",
|
|
17497
|
+
"helpText": [],
|
|
17498
|
+
"arguments": [],
|
|
17499
|
+
"options": [
|
|
17500
|
+
{
|
|
17501
|
+
"flags": "--repo <owner/name>",
|
|
17502
|
+
"description": "repository to record; repeat for more (default: indigoai-us/hq-cli and indigoai-us/hq-pro)",
|
|
17503
|
+
"hidden": false
|
|
17504
|
+
},
|
|
17505
|
+
{
|
|
17506
|
+
"flags": "--runner-org <org>",
|
|
17507
|
+
"description": "org whose runner pools are sampled (default: indigoai-us)",
|
|
17508
|
+
"hidden": false
|
|
17509
|
+
},
|
|
17510
|
+
{
|
|
17511
|
+
"flags": "--no-runners",
|
|
17512
|
+
"description": "do not sample runner pools",
|
|
17513
|
+
"hidden": false
|
|
17514
|
+
},
|
|
17515
|
+
{
|
|
17516
|
+
"flags": "--no-check-runs",
|
|
17517
|
+
"description": "do not read check runs",
|
|
17518
|
+
"hidden": false
|
|
17519
|
+
},
|
|
17520
|
+
{
|
|
17521
|
+
"flags": "--store-dir <path>",
|
|
17522
|
+
"description": "ledger directory (default: HQ_SMART_CI_STORE_DIR, else ~/.hq/delivery/ledger)",
|
|
17523
|
+
"hidden": false
|
|
17524
|
+
},
|
|
17525
|
+
{
|
|
17526
|
+
"flags": "--once",
|
|
17527
|
+
"description": "run one cycle and stop",
|
|
17528
|
+
"hidden": false
|
|
17529
|
+
},
|
|
17530
|
+
{
|
|
17531
|
+
"flags": "--duration-minutes <n>",
|
|
17532
|
+
"description": "stop after this many minutes (default: run until stopped)",
|
|
17533
|
+
"hidden": false
|
|
17534
|
+
},
|
|
17535
|
+
{
|
|
17536
|
+
"flags": "--interval-seconds <n>",
|
|
17537
|
+
"description": "seconds between cycles (default: 60)",
|
|
17538
|
+
"hidden": false
|
|
17539
|
+
},
|
|
17540
|
+
{
|
|
17541
|
+
"flags": "--lookback-minutes <n>",
|
|
17542
|
+
"description": "on a first start, also record runs created this many minutes back (default: 0)",
|
|
17543
|
+
"hidden": false
|
|
17544
|
+
},
|
|
17545
|
+
{
|
|
17546
|
+
"flags": "--hourly-budget <n>",
|
|
17547
|
+
"description": "charged GitHub requests an hour the intake allows itself, counted across restarts (default: 1500)",
|
|
17548
|
+
"hidden": false
|
|
17549
|
+
},
|
|
17550
|
+
{
|
|
17551
|
+
"flags": "--rate-floor <n>",
|
|
17552
|
+
"description": "make no request while the gh login has this many or fewer requests left this hour (default: 500)",
|
|
17553
|
+
"hidden": false
|
|
17554
|
+
},
|
|
17555
|
+
{
|
|
17556
|
+
"flags": "--active-window-minutes <n>",
|
|
17557
|
+
"description": "closed records older than this move to dated archive files; 0 keeps one file (default: 120)",
|
|
17558
|
+
"hidden": false
|
|
17559
|
+
},
|
|
17560
|
+
{
|
|
17561
|
+
"flags": "--audit-log <path>",
|
|
17562
|
+
"description": "where to write one line per GitHub request (default: smart-ci-github-audit.jsonl in the ledger directory)",
|
|
17563
|
+
"hidden": false
|
|
17564
|
+
},
|
|
17565
|
+
{
|
|
17566
|
+
"flags": "--replay-fixture <path>",
|
|
17567
|
+
"description": "record a fixture file instead of polling GitHub",
|
|
17568
|
+
"hidden": false
|
|
17569
|
+
},
|
|
17570
|
+
{
|
|
17571
|
+
"flags": "--batch-size <n>",
|
|
17572
|
+
"description": "observations per commit when replaying (default: 200)",
|
|
17573
|
+
"hidden": false
|
|
17574
|
+
},
|
|
17575
|
+
{
|
|
17576
|
+
"flags": "--record-fixture <path>",
|
|
17577
|
+
"description": "read a past window from GitHub and write it as a fixture; needs one --repo, --from and --to",
|
|
17578
|
+
"hidden": false
|
|
17579
|
+
},
|
|
17580
|
+
{
|
|
17581
|
+
"flags": "--from <iso>",
|
|
17582
|
+
"description": "start of the window to record (inclusive)",
|
|
17583
|
+
"hidden": false
|
|
17584
|
+
},
|
|
17585
|
+
{
|
|
17586
|
+
"flags": "--to <iso>",
|
|
17587
|
+
"description": "end of the window to record (exclusive)",
|
|
17588
|
+
"hidden": false
|
|
17589
|
+
},
|
|
17590
|
+
{
|
|
17591
|
+
"flags": "--json",
|
|
17592
|
+
"description": "print the final summary as JSON",
|
|
17593
|
+
"hidden": false
|
|
17594
|
+
}
|
|
17595
|
+
],
|
|
17596
|
+
"subcommands": []
|
|
17597
|
+
},
|
|
17598
|
+
{
|
|
17599
|
+
"name": "metrics",
|
|
17600
|
+
"description": "Print CI waits, waste and cost per merge for a repo from the run ledger",
|
|
17601
|
+
"aliases": [],
|
|
17602
|
+
"hidden": false,
|
|
17603
|
+
"helpOption": true,
|
|
17604
|
+
"helpCommand": false,
|
|
17605
|
+
"usage": "[options]",
|
|
17606
|
+
"helpText": [],
|
|
17607
|
+
"arguments": [],
|
|
17608
|
+
"options": [
|
|
17609
|
+
{
|
|
17610
|
+
"flags": "--repo <owner/name>",
|
|
17611
|
+
"description": "repository to report on",
|
|
17612
|
+
"hidden": false
|
|
17613
|
+
},
|
|
17614
|
+
{
|
|
17615
|
+
"flags": "--since <date>",
|
|
17616
|
+
"description": "start of the window, a date (2026-11-21) or an ISO time, UTC",
|
|
17617
|
+
"hidden": false
|
|
17618
|
+
},
|
|
17619
|
+
{
|
|
17620
|
+
"flags": "--until <date>",
|
|
17621
|
+
"description": "end of the window, exclusive (default: now)",
|
|
17622
|
+
"hidden": false
|
|
17623
|
+
},
|
|
17624
|
+
{
|
|
17625
|
+
"flags": "--store-dir <path>",
|
|
17626
|
+
"description": "ledger directory (default: HQ_SMART_CI_STORE_DIR, else ~/.hq/delivery/ledger)",
|
|
17627
|
+
"hidden": false
|
|
17628
|
+
},
|
|
17629
|
+
{
|
|
17630
|
+
"flags": "--deploy-workflow <name>",
|
|
17631
|
+
"description": "workflow that deploys to production on merge (default: known per repo)",
|
|
17632
|
+
"hidden": false
|
|
17633
|
+
},
|
|
17634
|
+
{
|
|
17635
|
+
"flags": "--github-billed-usd <amount>",
|
|
17636
|
+
"description": "billed GitHub amount for this repo and window, to use in place of the estimate",
|
|
17637
|
+
"hidden": false
|
|
17638
|
+
},
|
|
17639
|
+
{
|
|
17640
|
+
"flags": "--aws-fleet-usd <amount>",
|
|
17641
|
+
"description": "AWS runner fleet amount for this window, to use in place of the estimate",
|
|
17642
|
+
"hidden": false
|
|
17643
|
+
},
|
|
17644
|
+
{
|
|
17645
|
+
"flags": "--json",
|
|
17646
|
+
"description": "print the numbers as JSON",
|
|
17647
|
+
"hidden": false
|
|
17648
|
+
}
|
|
17649
|
+
],
|
|
17650
|
+
"subcommands": []
|
|
17651
|
+
}
|
|
17652
|
+
]
|
|
17653
|
+
},
|
|
17325
17654
|
{
|
|
17326
17655
|
"name": "env",
|
|
17327
17656
|
"description": "Environment profiles: the places that can do work (hq-environment-profile.v1)",
|
|
@@ -17533,7 +17862,7 @@ export const COMMAND_CATALOG = [
|
|
|
17533
17862
|
},
|
|
17534
17863
|
{
|
|
17535
17864
|
"flags": "--fix-jq",
|
|
17536
|
-
"description": "Install the verified jq required by HQ hooks on Windows.",
|
|
17865
|
+
"description": "Install the verified jq required by HQ hooks on Windows, add it to your PATH, and check it.",
|
|
17537
17866
|
"hidden": false
|
|
17538
17867
|
},
|
|
17539
17868
|
{
|
|
@@ -490,6 +490,12 @@ export declare const REGISTRATION_PLAN: readonly [{
|
|
|
490
490
|
readonly parent: "program";
|
|
491
491
|
readonly module: "./commands/capacity.js";
|
|
492
492
|
readonly exportName: "registerCapacityCommand";
|
|
493
|
+
}, {
|
|
494
|
+
readonly type: "registrar";
|
|
495
|
+
readonly root: "ci";
|
|
496
|
+
readonly parent: "program";
|
|
497
|
+
readonly module: "./commands/ci.js";
|
|
498
|
+
readonly exportName: "registerCiCommand";
|
|
493
499
|
}, {
|
|
494
500
|
readonly type: "registrar";
|
|
495
501
|
readonly root: "env";
|
|
@@ -84,6 +84,7 @@ export const REGISTRATION_PLAN = [
|
|
|
84
84
|
{ type: "registrar", root: "library", parent: "program", module: "./commands/library.js", exportName: "registerLibraryCommand" },
|
|
85
85
|
{ type: "registrar", root: "index", parent: "program", module: "./commands/index-cmd.js", exportName: "registerIndexCommand" },
|
|
86
86
|
{ type: "registrar", root: "capacity", parent: "program", module: "./commands/capacity.js", exportName: "registerCapacityCommand" },
|
|
87
|
+
{ type: "registrar", root: "ci", parent: "program", module: "./commands/ci.js", exportName: "registerCiCommand" },
|
|
87
88
|
{ type: "registrar", root: "env", parent: "program", module: "./commands/env.js", exportName: "registerEnvCommand" },
|
|
88
89
|
{ type: "registrar", root: "work-env", parent: "program", module: "./commands/work-env.js", exportName: "registerWorkEnvCommand" },
|
|
89
90
|
{ type: "registrar", root: "doctor", parent: "program", module: "./commands/doctor.js", exportName: "registerDoctorCommand" },
|
package/dist/commands/bot.js
CHANGED
|
@@ -95,6 +95,7 @@ import { gatedInteractiveLogin } from "../utils/interactive-caller.js";
|
|
|
95
95
|
import { brainSignInStatus, fleetInstallProgressReporter, fleetRuntimeStatus, runBotAuthStatus, runBotRuntimeInstall, runBotRuntimeStatus, runBotSignIn } from "./bot-runtime.js";
|
|
96
96
|
import { ensureFleetRuntimeInstalled } from "../lib/bot/fleet-local.js";
|
|
97
97
|
import { installFleetRuntimeSources, installOptionalFleetRuntimeSources } from "../lib/bot/fleet-runtime-sources.js";
|
|
98
|
+
import { signalPid } from "../utils/pid.js";
|
|
98
99
|
function collectRepeated(value, previous) {
|
|
99
100
|
return [...previous, value];
|
|
100
101
|
}
|
|
@@ -259,11 +260,15 @@ async function syncFleetRuntimeJobs(name, dir, config) {
|
|
|
259
260
|
if (migrated) {
|
|
260
261
|
const movedCount = migrated.imported;
|
|
261
262
|
const moved = `moved ${movedCount} scheduled job${movedCount === 1 ? "" : "s"} into the HQ Fleet Runtime${migrated.alreadyPresent ? ` (${migrated.alreadyPresent} already there)` : ""}`;
|
|
263
|
+
for (const { jobId, note } of migrated.notes ?? [])
|
|
264
|
+
log("info", `scheduled job ${jobId}: ${note}`);
|
|
262
265
|
if (migrated.skipped.length === 0) {
|
|
263
266
|
log("info", `${moved}; the old list is kept at ${migrated.renamedTo}`);
|
|
264
267
|
}
|
|
265
268
|
else {
|
|
266
|
-
const
|
|
269
|
+
const reasons = new Map((migrated.skippedReasons ?? []).map((entry) => [entry.jobId, entry.reason]));
|
|
270
|
+
const each = migrated.skipped.map((jobId) => `${jobId} (${reasons.get(jobId) ?? "the HQ Fleet Runtime cannot run its schedule"})`).join("; ");
|
|
271
|
+
const message = `${moved}, but could not move ${migrated.skipped.length} scheduled job(s): ${each}. They are left unchanged in ${path.join(dir, "jobs.json")}, which was not renamed, and they will not run until you add them again with hq bot jobs --add using a schedule the runtime supports.`;
|
|
267
272
|
log("warn", message);
|
|
268
273
|
console.warn(`Warning: ${name}: ${message}`);
|
|
269
274
|
}
|
|
@@ -1433,7 +1438,7 @@ async function stopBot(name, dir, config, output) {
|
|
|
1433
1438
|
const s = readBotStatus(dir);
|
|
1434
1439
|
if (s) {
|
|
1435
1440
|
try {
|
|
1436
|
-
|
|
1441
|
+
signalPid(s.pid, "SIGKILL");
|
|
1437
1442
|
}
|
|
1438
1443
|
catch {
|
|
1439
1444
|
/* ignore */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
export declare const DEFAULT_REPOS: readonly string[];
|
|
3
|
+
export declare const DEFAULT_RUNNER_ORG = "indigoai-us";
|
|
4
|
+
export type TokenCommand = (file: string, args: string[], env: NodeJS.ProcessEnv) => Promise<string>;
|
|
5
|
+
/**
|
|
6
|
+
* The GitHub token of this machine's signed-in `gh` login, and nothing else.
|
|
7
|
+
* A token in GH_TOKEN or GITHUB_TOKEN is never used: under an Actions or App
|
|
8
|
+
* installation token the intake would spend the allowance CI itself runs on.
|
|
9
|
+
* Those variables are also taken out of the environment `gh` is asked in, so
|
|
10
|
+
* `gh auth token` cannot hand one back. With no signed-in login the intake
|
|
11
|
+
* refuses to start. The token is held in memory and never printed or logged.
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveGitHubToken(env?: NodeJS.ProcessEnv, run?: TokenCommand): Promise<string>;
|
|
14
|
+
export declare function registerCiIntakeCommand(ci: Command): void;
|
|
15
|
+
//# sourceMappingURL=ci-intake.d.ts.map
|