@indigoai-us/hq-cli 5.345.214 → 5.345.215
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 +93 -0
- package/assets/scaffold/core/scripts/hq-delegate-verify.sh +5 -2
- package/dist/command-catalog.generated.d.ts +180 -13
- package/dist/command-catalog.generated.js +221 -13
- package/dist/commands/agents.d.ts +51 -1
- package/dist/commands/agents.js +154 -2
- package/dist/commands/bot-jobs.d.ts +2 -15
- package/dist/commands/bot-jobs.js +2 -94
- package/dist/commands/bot-runtime.d.ts +46 -5
- package/dist/commands/bot-runtime.js +228 -18
- package/dist/commands/bot.d.ts +16 -9
- package/dist/commands/bot.js +231 -55
- package/dist/commands/capacity.d.ts +4 -1
- package/dist/commands/capacity.js +46 -10
- package/dist/commands/cloud.d.ts +66 -13
- package/dist/commands/cloud.js +121 -40
- package/dist/commands/company-restore.d.ts +23 -0
- package/dist/commands/company-restore.js +128 -0
- package/dist/commands/company.js +2 -0
- package/dist/commands/core-delegate-w1b.js +15 -1
- package/dist/commands/core-policy.js +67 -8
- package/dist/commands/daemon.js +5 -0
- package/dist/commands/files-browse.d.ts +11 -4
- package/dist/commands/files-browse.js +21 -4
- package/dist/commands/files.d.ts +1 -1
- package/dist/commands/files.js +25 -11
- package/dist/commands/integrations-auth-rules.d.ts +27 -0
- package/dist/commands/integrations-auth-rules.js +79 -0
- package/dist/commands/integrations-connect.d.ts +10 -3
- package/dist/commands/integrations-connect.js +87 -13
- package/dist/commands/integrations-import.js +124 -12
- package/dist/commands/lanes.js +28 -11
- package/dist/commands/mesh.d.ts +2 -0
- package/dist/commands/mesh.js +60 -35
- package/dist/commands/sources.js +6 -0
- package/dist/commands/storage-offload.d.ts +12 -0
- package/dist/commands/storage-offload.js +41 -3
- package/dist/commands/sync-held.js +5 -2
- package/dist/commands/sync-mode.js +5 -0
- package/dist/commands/whoami.js +4 -0
- package/dist/lazy-commands.js +3 -5
- package/dist/lib/bot/config.d.ts +1 -0
- package/dist/lib/bot/config.js +10 -0
- package/dist/lib/bot/eventbridge-cron.d.ts +22 -0
- package/dist/lib/bot/eventbridge-cron.js +104 -0
- package/dist/lib/bot/fleet-cron.d.ts +8 -0
- package/dist/lib/bot/fleet-cron.js +35 -3
- package/dist/lib/bot/fleet-daemon.d.ts +46 -0
- package/dist/lib/bot/fleet-daemon.js +99 -1
- package/dist/lib/bot/fleet-local.d.ts +33 -1
- package/dist/lib/bot/fleet-local.js +215 -31
- package/dist/lib/bot/fleet-python.d.ts +3 -0
- package/dist/lib/bot/fleet-python.js +34 -4
- package/dist/lib/bot/fleet-runtime-sources.d.ts +15 -0
- package/dist/lib/bot/fleet-runtime-sources.js +30 -0
- package/dist/lib/bot/legacy-provider-login.d.ts +8 -0
- package/dist/lib/bot/legacy-provider-login.js +19 -2
- package/dist/lib/bot/probe.js +7 -1
- package/dist/lib/bot/prompt.js +1 -1
- package/dist/lib/bot/readiness.d.ts +8 -0
- package/dist/lib/bot/readiness.js +17 -3
- package/dist/lib/bot/run.js +20 -1
- package/dist/lib/bot/runtime/codex.js +1 -1
- package/dist/lib/bot/runtime/grok-acp.d.ts +5 -1
- package/dist/lib/bot/runtime/grok-acp.js +6 -3
- package/dist/lib/bot/runtime/index.js +19 -9
- package/dist/lib/bot/runtime/messages-stream.js +2 -2
- package/dist/lib/bot/runtime/types.d.ts +15 -0
- package/dist/lib/bot/runtime/types.js +9 -0
- package/dist/lib/bot/runtime-auth.d.ts +30 -0
- package/dist/lib/bot/runtime-auth.js +94 -3
- package/dist/lib/bot/runtime-failure.d.ts +23 -0
- package/dist/lib/bot/runtime-failure.js +43 -1
- package/dist/lib/bot/status.d.ts +2 -0
- package/dist/lib/capacity/accounts.d.ts +8 -0
- package/dist/lib/capacity/accounts.js +19 -0
- package/dist/lib/capacity/available.d.ts +154 -0
- package/dist/lib/capacity/available.js +905 -0
- package/dist/lib/capacity/codex-availability.d.ts +14 -1
- package/dist/lib/capacity/codex-availability.js +26 -1
- package/dist/lib/capacity/collectors/claude-oauth.d.ts +29 -2
- package/dist/lib/capacity/collectors/claude-oauth.js +104 -7
- package/dist/lib/capacity/collectors/codex.js +10 -7
- package/dist/lib/capacity/collectors/grok-refresh.d.ts +80 -0
- package/dist/lib/capacity/collectors/grok-refresh.js +189 -0
- package/dist/lib/capacity/collectors/grok.d.ts +5 -0
- package/dist/lib/capacity/collectors/grok.js +56 -5
- package/dist/lib/capacity/ledger.d.ts +37 -1
- package/dist/lib/capacity/ledger.js +207 -30
- package/dist/lib/capacity/project.d.ts +26 -0
- package/dist/lib/capacity/project.js +137 -8
- package/dist/lib/capacity/refusal-rows.d.ts +31 -0
- package/dist/lib/capacity/refusal-rows.js +61 -0
- package/dist/lib/capacity/refusal.d.ts +53 -2
- package/dist/lib/capacity/refusal.js +284 -65
- package/dist/lib/capacity/route.js +46 -11
- package/dist/lib/capacity/widget.d.ts +12 -1
- package/dist/lib/capacity/widget.js +91 -3
- package/dist/lib/daemon/catalog.js +11 -1
- package/dist/lib/daemon/resolver.d.ts +2 -0
- package/dist/lib/daemon/resolver.js +3 -0
- package/dist/lib/daemon/run.d.ts +9 -0
- package/dist/lib/daemon/run.js +54 -1
- package/dist/lib/daemon/server.d.ts +2 -0
- package/dist/lib/daemon/server.js +10 -1
- package/dist/lib/daemon/tcc-eperm.d.ts +153 -0
- package/dist/lib/daemon/tcc-eperm.js +310 -0
- package/dist/lib/db/sqlite-binding.d.ts +1 -0
- package/dist/lib/db/sqlite-binding.js +1 -1
- package/dist/lib/delivery/admission.d.ts +86 -0
- package/dist/lib/delivery/admission.js +148 -0
- package/dist/lib/delivery/artifacts.d.ts +105 -0
- package/dist/lib/delivery/artifacts.js +567 -0
- package/dist/lib/delivery/attempt-id.d.ts +13 -0
- package/dist/lib/delivery/attempt-id.js +16 -0
- package/dist/lib/delivery/backup.d.ts +78 -0
- package/dist/lib/delivery/backup.js +343 -0
- package/dist/lib/delivery/cache.d.ts +29 -0
- package/dist/lib/delivery/cache.js +33 -0
- package/dist/lib/delivery/contracts.d.ts +142 -0
- package/dist/lib/delivery/contracts.js +289 -0
- package/dist/lib/delivery/credentials.d.ts +54 -0
- package/dist/lib/delivery/credentials.js +119 -0
- package/dist/lib/delivery/disposable-target.d.ts +42 -0
- package/dist/lib/delivery/disposable-target.js +111 -0
- package/dist/lib/delivery/effects.d.ts +136 -0
- package/dist/lib/delivery/effects.js +541 -0
- package/dist/lib/delivery/enrollment.d.ts +146 -0
- package/dist/lib/delivery/enrollment.js +460 -0
- package/dist/lib/delivery/escalations.d.ts +51 -0
- package/dist/lib/delivery/escalations.js +60 -0
- package/dist/lib/delivery/identity.d.ts +25 -0
- package/dist/lib/delivery/identity.js +82 -0
- package/dist/lib/delivery/inbox.d.ts +116 -0
- package/dist/lib/delivery/inbox.js +260 -0
- package/dist/lib/delivery/lease.d.ts +80 -0
- package/dist/lib/delivery/lease.js +134 -0
- package/dist/lib/delivery/migrations.d.ts +255 -0
- package/dist/lib/delivery/migrations.js +823 -0
- package/dist/lib/delivery/mqtt-adapter.d.ts +50 -0
- package/dist/lib/delivery/mqtt-adapter.js +242 -0
- package/dist/lib/delivery/mqtt.d.ts +63 -0
- package/dist/lib/delivery/mqtt.js +119 -0
- package/dist/lib/delivery/outbox.d.ts +95 -0
- package/dist/lib/delivery/outbox.js +187 -0
- package/dist/lib/delivery/provenance.d.ts +129 -0
- package/dist/lib/delivery/provenance.js +93 -0
- package/dist/lib/delivery/reconciler.d.ts +215 -0
- package/dist/lib/delivery/reconciler.js +703 -0
- package/dist/lib/delivery/restore.d.ts +35 -0
- package/dist/lib/delivery/restore.js +134 -0
- package/dist/lib/delivery/rpc/client.d.ts +22 -0
- package/dist/lib/delivery/rpc/client.js +159 -0
- package/dist/lib/delivery/rpc/port.d.ts +40 -0
- package/dist/lib/delivery/rpc/port.js +16 -0
- package/dist/lib/delivery/rpc/server.d.ts +30 -0
- package/dist/lib/delivery/rpc/server.js +205 -0
- package/dist/lib/delivery/rpc/wire.d.ts +85 -0
- package/dist/lib/delivery/rpc/wire.js +143 -0
- package/dist/lib/delivery/store.d.ts +163 -0
- package/dist/lib/delivery/store.js +944 -0
- package/dist/lib/delivery/windows-service-install.d.ts +262 -0
- package/dist/lib/delivery/windows-service-install.js +892 -0
- package/dist/lib/delivery/workers/macos-job-helper.d.ts +103 -0
- package/dist/lib/delivery/workers/macos-job-helper.js +927 -0
- package/dist/lib/delivery/workers/macos.d.ts +191 -0
- package/dist/lib/delivery/workers/macos.js +943 -0
- package/dist/lib/delivery/workers/windows-job-helper.d.ts +35 -0
- package/dist/lib/delivery/workers/windows-job-helper.js +264 -0
- package/dist/lib/delivery/workers/windows-service-live.d.ts +121 -0
- package/dist/lib/delivery/workers/windows-service-live.js +711 -0
- package/dist/lib/delivery/workers/windows-service-runner.d.ts +33 -0
- package/dist/lib/delivery/workers/windows-service-runner.js +82 -0
- package/dist/lib/delivery/workers/windows-service.d.ts +140 -0
- package/dist/lib/delivery/workers/windows-service.js +584 -0
- package/dist/lib/delivery/workers/windows.d.ts +251 -0
- package/dist/lib/delivery/workers/windows.js +594 -0
- package/dist/lib/hot-channels/adapters/meetings.d.ts +15 -0
- package/dist/lib/hot-channels/adapters/meetings.js +36 -3
- package/dist/lib/hot-channels/signals-pass.d.ts +10 -0
- package/dist/lib/hot-channels/signals-pass.js +71 -2
- package/dist/lib/hot-channels/signals-redo.js +10 -2
- package/dist/lib/install/provider-wrappers.d.ts +2 -0
- package/dist/lib/install/provider-wrappers.js +68 -3
- package/dist/lib/lanes/watcher.js +35 -0
- package/dist/lib/signals/steps/extract.js +40 -4
- package/dist/schemas/hq-available-ai.v1.schema.json +76 -0
- package/dist/utils/catalog-runtime-paths.d.ts +34 -0
- package/dist/utils/catalog-runtime-paths.js +53 -0
- package/dist/utils/cognito-callback-port.d.ts +14 -0
- package/dist/utils/cognito-callback-port.js +24 -0
- package/dist/utils/cognito-session.js +3 -3
- package/dist/utils/deleted-company-notice.d.ts +59 -0
- package/dist/utils/deleted-company-notice.js +156 -0
- package/dist/utils/files-browse-acl.js +1 -1
- package/dist/utils/login-browser.d.ts +1 -1
- package/dist/utils/login-browser.js +7 -5
- package/dist/utils/resident-package-preload.js +30 -15
- package/dist/utils/vault-api.js +7 -0
- package/package.json +7 -7
|
@@ -1187,6 +1187,16 @@ export const COMMAND_CATALOG = [
|
|
|
1187
1187
|
"flags": "--company <slug>",
|
|
1188
1188
|
"description": "Show only this company's journal (company slug)",
|
|
1189
1189
|
"hidden": false
|
|
1190
|
+
},
|
|
1191
|
+
{
|
|
1192
|
+
"flags": "--all",
|
|
1193
|
+
"description": "List every local-only file instead of the first 20 per company",
|
|
1194
|
+
"hidden": false
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
"flags": "--json",
|
|
1198
|
+
"description": "Print the full status as JSON (every list uncapped) instead of text",
|
|
1199
|
+
"hidden": false
|
|
1190
1200
|
}
|
|
1191
1201
|
],
|
|
1192
1202
|
"subcommands": []
|
|
@@ -1435,7 +1445,7 @@ export const COMMAND_CATALOG = [
|
|
|
1435
1445
|
},
|
|
1436
1446
|
{
|
|
1437
1447
|
"name": "held",
|
|
1438
|
-
"description": "Show uploads held
|
|
1448
|
+
"description": "Show uploads held until you confirm they belong to the signed-in account",
|
|
1439
1449
|
"aliases": [],
|
|
1440
1450
|
"hidden": false,
|
|
1441
1451
|
"helpOption": true,
|
|
@@ -8891,6 +8901,32 @@ export const COMMAND_CATALOG = [
|
|
|
8891
8901
|
"options": [],
|
|
8892
8902
|
"subcommands": []
|
|
8893
8903
|
},
|
|
8904
|
+
{
|
|
8905
|
+
"name": "restore",
|
|
8906
|
+
"description": "Restore a company you deleted in the last 30 days (name, slug or company ID)",
|
|
8907
|
+
"aliases": [],
|
|
8908
|
+
"hidden": false,
|
|
8909
|
+
"helpOption": true,
|
|
8910
|
+
"helpCommand": false,
|
|
8911
|
+
"usage": "[options] <company>",
|
|
8912
|
+
"helpText": [],
|
|
8913
|
+
"arguments": [
|
|
8914
|
+
{
|
|
8915
|
+
"name": "company",
|
|
8916
|
+
"required": true,
|
|
8917
|
+
"variadic": false,
|
|
8918
|
+
"description": ""
|
|
8919
|
+
}
|
|
8920
|
+
],
|
|
8921
|
+
"options": [
|
|
8922
|
+
{
|
|
8923
|
+
"flags": "--json",
|
|
8924
|
+
"description": "Print the result as JSON",
|
|
8925
|
+
"hidden": false
|
|
8926
|
+
}
|
|
8927
|
+
],
|
|
8928
|
+
"subcommands": []
|
|
8929
|
+
},
|
|
8894
8930
|
{
|
|
8895
8931
|
"name": "settings",
|
|
8896
8932
|
"description": "Per-company settings (owner-only)",
|
|
@@ -9654,7 +9690,7 @@ export const COMMAND_CATALOG = [
|
|
|
9654
9690
|
},
|
|
9655
9691
|
{
|
|
9656
9692
|
"name": "jobs",
|
|
9657
|
-
"description": "List, pause, resume, or
|
|
9693
|
+
"description": "List, edit, pause, resume, or delete an agent's scheduled jobs",
|
|
9658
9694
|
"aliases": [],
|
|
9659
9695
|
"hidden": false,
|
|
9660
9696
|
"helpOption": true,
|
|
@@ -9759,10 +9795,101 @@ export const COMMAND_CATALOG = [
|
|
|
9759
9795
|
],
|
|
9760
9796
|
"subcommands": []
|
|
9761
9797
|
},
|
|
9798
|
+
{
|
|
9799
|
+
"name": "update",
|
|
9800
|
+
"description": "Edit a job in place (instructions, schedule, name). Only the options you pass change; the job keeps its id and status, and the change applies from the next run.",
|
|
9801
|
+
"aliases": [
|
|
9802
|
+
"edit"
|
|
9803
|
+
],
|
|
9804
|
+
"hidden": false,
|
|
9805
|
+
"helpOption": true,
|
|
9806
|
+
"helpCommand": false,
|
|
9807
|
+
"usage": "[options] <agentUid> <jobId>",
|
|
9808
|
+
"helpText": [],
|
|
9809
|
+
"arguments": [
|
|
9810
|
+
{
|
|
9811
|
+
"name": "agentUid",
|
|
9812
|
+
"required": true,
|
|
9813
|
+
"variadic": false,
|
|
9814
|
+
"description": ""
|
|
9815
|
+
},
|
|
9816
|
+
{
|
|
9817
|
+
"name": "jobId",
|
|
9818
|
+
"required": true,
|
|
9819
|
+
"variadic": false,
|
|
9820
|
+
"description": ""
|
|
9821
|
+
}
|
|
9822
|
+
],
|
|
9823
|
+
"options": [
|
|
9824
|
+
{
|
|
9825
|
+
"flags": "--company <slug>",
|
|
9826
|
+
"description": "Company slug (to resolve an agent by name/slug)",
|
|
9827
|
+
"hidden": false
|
|
9828
|
+
},
|
|
9829
|
+
{
|
|
9830
|
+
"flags": "--prompt <text>",
|
|
9831
|
+
"description": "New instructions",
|
|
9832
|
+
"hidden": false
|
|
9833
|
+
},
|
|
9834
|
+
{
|
|
9835
|
+
"flags": "--prompt-file <path>",
|
|
9836
|
+
"description": "Read the new instructions from a file",
|
|
9837
|
+
"hidden": false
|
|
9838
|
+
},
|
|
9839
|
+
{
|
|
9840
|
+
"flags": "--name <label>",
|
|
9841
|
+
"description": "Short label for the job",
|
|
9842
|
+
"hidden": false
|
|
9843
|
+
},
|
|
9844
|
+
{
|
|
9845
|
+
"flags": "--cron <expr>",
|
|
9846
|
+
"description": "New recurring schedule: \"0 9 * * 1-5\" or cron(...)/rate(...)",
|
|
9847
|
+
"hidden": false
|
|
9848
|
+
},
|
|
9849
|
+
{
|
|
9850
|
+
"flags": "--at <iso8601>",
|
|
9851
|
+
"description": "New one-time run instant",
|
|
9852
|
+
"hidden": false
|
|
9853
|
+
},
|
|
9854
|
+
{
|
|
9855
|
+
"flags": "--tz <IANA>",
|
|
9856
|
+
"description": "Timezone for --cron/--at (required with them)",
|
|
9857
|
+
"hidden": false
|
|
9858
|
+
},
|
|
9859
|
+
{
|
|
9860
|
+
"flags": "--context <json>",
|
|
9861
|
+
"description": "Replace the JSON context handed to the agent at run time",
|
|
9862
|
+
"hidden": false
|
|
9863
|
+
},
|
|
9864
|
+
{
|
|
9865
|
+
"flags": "--clear-context",
|
|
9866
|
+
"description": "Remove the job's context",
|
|
9867
|
+
"hidden": false
|
|
9868
|
+
},
|
|
9869
|
+
{
|
|
9870
|
+
"flags": "--script-file <path>",
|
|
9871
|
+
"description": "Replace the precondition script with this file",
|
|
9872
|
+
"hidden": false
|
|
9873
|
+
},
|
|
9874
|
+
{
|
|
9875
|
+
"flags": "--clear-script",
|
|
9876
|
+
"description": "Remove the job's precondition script",
|
|
9877
|
+
"hidden": false
|
|
9878
|
+
},
|
|
9879
|
+
{
|
|
9880
|
+
"flags": "--json",
|
|
9881
|
+
"description": "Emit raw JSON",
|
|
9882
|
+
"hidden": false
|
|
9883
|
+
}
|
|
9884
|
+
],
|
|
9885
|
+
"subcommands": []
|
|
9886
|
+
},
|
|
9762
9887
|
{
|
|
9763
9888
|
"name": "cancel",
|
|
9764
|
-
"description": "
|
|
9765
|
-
"aliases": [
|
|
9889
|
+
"description": "Delete a job for good (active or paused) and its schedule",
|
|
9890
|
+
"aliases": [
|
|
9891
|
+
"delete"
|
|
9892
|
+
],
|
|
9766
9893
|
"hidden": false,
|
|
9767
9894
|
"helpOption": true,
|
|
9768
9895
|
"helpCommand": false,
|
|
@@ -14498,6 +14625,48 @@ export const COMMAND_CATALOG = [
|
|
|
14498
14625
|
],
|
|
14499
14626
|
"subcommands": []
|
|
14500
14627
|
},
|
|
14628
|
+
{
|
|
14629
|
+
"name": "available",
|
|
14630
|
+
"description": "What AI can run now, as one token-free hq-available-ai.v1 document (read-only; a stale view starts one background read)",
|
|
14631
|
+
"aliases": [],
|
|
14632
|
+
"hidden": false,
|
|
14633
|
+
"helpOption": true,
|
|
14634
|
+
"helpCommand": false,
|
|
14635
|
+
"usage": "[options]",
|
|
14636
|
+
"helpText": [],
|
|
14637
|
+
"arguments": [],
|
|
14638
|
+
"options": [
|
|
14639
|
+
{
|
|
14640
|
+
"flags": "--json",
|
|
14641
|
+
"description": "Print the document as JSON",
|
|
14642
|
+
"hidden": false
|
|
14643
|
+
},
|
|
14644
|
+
{
|
|
14645
|
+
"flags": "--fresh",
|
|
14646
|
+
"description": "Start a read and wait for it, at most 3 seconds",
|
|
14647
|
+
"hidden": false
|
|
14648
|
+
},
|
|
14649
|
+
{
|
|
14650
|
+
"flags": "--include-other",
|
|
14651
|
+
"description": "Also list capacity-only accounts, each with its organization",
|
|
14652
|
+
"hidden": false
|
|
14653
|
+
}
|
|
14654
|
+
],
|
|
14655
|
+
"subcommands": []
|
|
14656
|
+
},
|
|
14657
|
+
{
|
|
14658
|
+
"name": "collect-once",
|
|
14659
|
+
"description": "One capacity read, started in the background by hq capacity available",
|
|
14660
|
+
"aliases": [],
|
|
14661
|
+
"hidden": true,
|
|
14662
|
+
"helpOption": true,
|
|
14663
|
+
"helpCommand": false,
|
|
14664
|
+
"usage": "[options]",
|
|
14665
|
+
"helpText": [],
|
|
14666
|
+
"arguments": [],
|
|
14667
|
+
"options": [],
|
|
14668
|
+
"subcommands": []
|
|
14669
|
+
},
|
|
14501
14670
|
{
|
|
14502
14671
|
"name": "route",
|
|
14503
14672
|
"description": "Pick the account with the most capacity for a new lane (read-only; port of boss-route)",
|
|
@@ -14603,7 +14772,7 @@ export const COMMAND_CATALOG = [
|
|
|
14603
14772
|
},
|
|
14604
14773
|
{
|
|
14605
14774
|
"name": "refusal",
|
|
14606
|
-
"description": "Record a classified provider
|
|
14775
|
+
"description": "Record a classified provider refusal as a hold on one named account",
|
|
14607
14776
|
"aliases": [],
|
|
14608
14777
|
"hidden": false,
|
|
14609
14778
|
"helpOption": true,
|
|
@@ -14612,7 +14781,7 @@ export const COMMAND_CATALOG = [
|
|
|
14612
14781
|
"helpText": [
|
|
14613
14782
|
{
|
|
14614
14783
|
"position": "after",
|
|
14615
|
-
"text": "\
|
|
14784
|
+
"text": "\nA model-CLI bot's turn, hq bot probe and the lane failure path record their\nown refusals. Run this by hand only for a provider failure that was classified\nas a rate-limit refusal (policy\nindigo-provider-failures-classified-not-masked-as-timeout), never for a\ntimeout that was not:\n\n hq capacity ingest refusal --provider <claude|codex|grok> --account <hash> [--limit-id <id>] [--resets-at <iso|epoch>]\n\n--account is required unless --limit-id names a limit that exactly one account\nhas. A limit id that several accounts share, or neither flag, is a usage error:\nnothing is recorded against a guess, even when the provider has one account.\nThe refusal is a hold beside the account's readings, and never replaces one.\n--limit-id names the limit it is about; without it the refusal claims no\nwindow. The hold ends at --resets-at, at that limit's own reset, or after a\nshort default, or sooner when a newer reading of that limit is below 100%.\n"
|
|
14616
14785
|
}
|
|
14617
14786
|
],
|
|
14618
14787
|
"arguments": [],
|
|
@@ -14624,17 +14793,17 @@ export const COMMAND_CATALOG = [
|
|
|
14624
14793
|
},
|
|
14625
14794
|
{
|
|
14626
14795
|
"flags": "--limit-id <id>",
|
|
14627
|
-
"description": "
|
|
14796
|
+
"description": "The account's limit this refusal is about; without it the refusal claims no window",
|
|
14628
14797
|
"hidden": false
|
|
14629
14798
|
},
|
|
14630
14799
|
{
|
|
14631
14800
|
"flags": "--resets-at <when>",
|
|
14632
|
-
"description": "UTC timestamp or epoch when
|
|
14801
|
+
"description": "UTC timestamp or epoch when the hold ends",
|
|
14633
14802
|
"hidden": false
|
|
14634
14803
|
},
|
|
14635
14804
|
{
|
|
14636
14805
|
"flags": "--account <hash>",
|
|
14637
|
-
"description": "Hashed account id
|
|
14806
|
+
"description": "Hashed account id of the account that refused. Required unless --limit-id names a limit exactly one account has",
|
|
14638
14807
|
"hidden": false
|
|
14639
14808
|
},
|
|
14640
14809
|
{
|
|
@@ -15198,6 +15367,11 @@ export const COMMAND_CATALOG = [
|
|
|
15198
15367
|
"description": "Take the story even when someone else holds it",
|
|
15199
15368
|
"hidden": false
|
|
15200
15369
|
},
|
|
15370
|
+
{
|
|
15371
|
+
"flags": "--no-ensure",
|
|
15372
|
+
"description": "Do not register the project from its local prd.json when the story is not on the Board",
|
|
15373
|
+
"hidden": false
|
|
15374
|
+
},
|
|
15201
15375
|
{
|
|
15202
15376
|
"flags": "--company <slug|uid>",
|
|
15203
15377
|
"description": "Company slug or cloud uid",
|
|
@@ -23871,7 +24045,7 @@ export const COMMAND_CATALOG = [
|
|
|
23871
24045
|
},
|
|
23872
24046
|
{
|
|
23873
24047
|
"flags": "--provider <provider>",
|
|
23874
|
-
"description": "HQ Fleet provider: claude|codex|grok (default claude)",
|
|
24048
|
+
"description": "HQ Fleet provider: claude|codex|grok, or chatgpt for codex (default claude)",
|
|
23875
24049
|
"hidden": false
|
|
23876
24050
|
},
|
|
23877
24051
|
{
|
|
@@ -24276,7 +24450,7 @@ export const COMMAND_CATALOG = [
|
|
|
24276
24450
|
},
|
|
24277
24451
|
{
|
|
24278
24452
|
"name": "auth-status",
|
|
24279
|
-
"description": "Say whether a
|
|
24453
|
+
"description": "Say whether a bot created now with this brain starts without a sign-in step, reusing a login already on this computer",
|
|
24280
24454
|
"aliases": [],
|
|
24281
24455
|
"hidden": false,
|
|
24282
24456
|
"helpOption": true,
|
|
@@ -24287,12 +24461,41 @@ export const COMMAND_CATALOG = [
|
|
|
24287
24461
|
"options": [
|
|
24288
24462
|
{
|
|
24289
24463
|
"flags": "--provider <provider>",
|
|
24290
|
-
"description": "
|
|
24464
|
+
"description": "Brain: claude, codex (or chatgpt) or grok",
|
|
24291
24465
|
"hidden": false
|
|
24292
24466
|
},
|
|
24293
24467
|
{
|
|
24294
24468
|
"flags": "--json",
|
|
24295
|
-
"description": "Print machine-readable JSON: { signedIn }",
|
|
24469
|
+
"description": "Print machine-readable JSON: { provider, signedIn, source }",
|
|
24470
|
+
"hidden": false
|
|
24471
|
+
}
|
|
24472
|
+
],
|
|
24473
|
+
"subcommands": []
|
|
24474
|
+
},
|
|
24475
|
+
{
|
|
24476
|
+
"name": "sign-in",
|
|
24477
|
+
"description": "Sign this computer in to ChatGPT or Grok through its own CLI, so new bots with that brain start without a sign-in step",
|
|
24478
|
+
"aliases": [],
|
|
24479
|
+
"hidden": false,
|
|
24480
|
+
"helpOption": true,
|
|
24481
|
+
"helpCommand": false,
|
|
24482
|
+
"usage": "[options]",
|
|
24483
|
+
"helpText": [],
|
|
24484
|
+
"arguments": [],
|
|
24485
|
+
"options": [
|
|
24486
|
+
{
|
|
24487
|
+
"flags": "--provider <provider>",
|
|
24488
|
+
"description": "Brain: codex (or chatgpt) or grok",
|
|
24489
|
+
"hidden": false
|
|
24490
|
+
},
|
|
24491
|
+
{
|
|
24492
|
+
"flags": "--json",
|
|
24493
|
+
"description": "Print one JSON line per event (device code, messages) and a final result",
|
|
24494
|
+
"hidden": false
|
|
24495
|
+
},
|
|
24496
|
+
{
|
|
24497
|
+
"flags": "--no-browser",
|
|
24498
|
+
"description": "Use the CLI's device-code login instead of its browser login",
|
|
24296
24499
|
"hidden": false
|
|
24297
24500
|
}
|
|
24298
24501
|
],
|
|
@@ -24460,6 +24663,11 @@ export const COMMAND_CATALOG = [
|
|
|
24460
24663
|
"description": "claude|codex|grok",
|
|
24461
24664
|
"hidden": false
|
|
24462
24665
|
},
|
|
24666
|
+
{
|
|
24667
|
+
"flags": "--sign-in",
|
|
24668
|
+
"description": "Sign the bot in with a login of its own first (claude, codex): a browser sign-in for this bot only; your own sign-in is not touched",
|
|
24669
|
+
"hidden": false
|
|
24670
|
+
},
|
|
24463
24671
|
{
|
|
24464
24672
|
"flags": "--json",
|
|
24465
24673
|
"description": "Print machine-readable JSON",
|
|
@@ -369,6 +369,56 @@ export declare function listAgentJobs(token: string, agentUid: string): Promise<
|
|
|
369
369
|
export declare function pauseAgentJob(token: string, agentUid: string, jobId: string): Promise<PauseJobResult>;
|
|
370
370
|
export declare function resumeAgentJob(token: string, agentUid: string, jobId: string): Promise<ResumeJobResult>;
|
|
371
371
|
export declare function cancelAgentJob(token: string, agentUid: string, jobId: string): Promise<CancelJobResult>;
|
|
372
|
+
/** In-place edit body for `POST /v1/agents/{uid}/jobs/{jobId}/update`. */
|
|
373
|
+
export interface JobUpdateBody {
|
|
374
|
+
name?: string;
|
|
375
|
+
prompt?: string;
|
|
376
|
+
context?: Record<string, unknown> | null;
|
|
377
|
+
script?: string | null;
|
|
378
|
+
schedule?: {
|
|
379
|
+
kind: "recurring";
|
|
380
|
+
cron: string;
|
|
381
|
+
timezone: string;
|
|
382
|
+
} | {
|
|
383
|
+
kind: "once";
|
|
384
|
+
at: string;
|
|
385
|
+
timezone: string;
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
export interface UpdateJobResult {
|
|
389
|
+
job: {
|
|
390
|
+
jobId: string;
|
|
391
|
+
} & Record<string, unknown>;
|
|
392
|
+
changed: string[];
|
|
393
|
+
appliesFrom?: string;
|
|
394
|
+
/** Set when the edit saved but the new schedule has not reached the scheduler yet. */
|
|
395
|
+
warning?: string;
|
|
396
|
+
}
|
|
397
|
+
export declare function updateAgentJob(token: string, agentUid: string, jobId: string, body: JobUpdateBody): Promise<UpdateJobResult>;
|
|
398
|
+
export interface JobUpdateOptions {
|
|
399
|
+
name?: string;
|
|
400
|
+
prompt?: string;
|
|
401
|
+
cron?: string;
|
|
402
|
+
at?: string;
|
|
403
|
+
tz?: string;
|
|
404
|
+
context?: string;
|
|
405
|
+
clearContext?: boolean;
|
|
406
|
+
script?: string;
|
|
407
|
+
clearScript?: boolean;
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Build the edit body from `hq agents jobs update` flags. Pure: file reads
|
|
411
|
+
* (`--prompt-file`, `--script-file`) happen before this is called. Throws a
|
|
412
|
+
* plain Error with operator copy on a bad combination.
|
|
413
|
+
*
|
|
414
|
+
* `--cron` takes the stored six-field `cron(...)`/`rate(...)` form verbatim
|
|
415
|
+
* or a standard five-field expression, translated with the same rules local
|
|
416
|
+
* bot jobs use. A schedule change needs an explicit `--tz`: defaulting to
|
|
417
|
+
* the operator's machine zone would silently move a job that runs in another
|
|
418
|
+
* zone. `--tz` on its own is refused.
|
|
419
|
+
*/
|
|
420
|
+
export declare function buildJobUpdateBody(opts: JobUpdateOptions, translateCron: (expr: string) => string): JobUpdateBody;
|
|
421
|
+
export declare function formatUpdateResult(result: UpdateJobResult): string;
|
|
372
422
|
/**
|
|
373
423
|
* Map a jobs-control HTTP error to a single operator-facing line. Pure so the
|
|
374
424
|
* status/code → copy mapping is unit-tested without a process exit.
|
|
@@ -378,7 +428,7 @@ export declare function cancelAgentJob(token: string, agentUid: string, jobId: s
|
|
|
378
428
|
* the agent is cross-company) must print a clear message and exit non-zero,
|
|
379
429
|
* never throw a stack trace.
|
|
380
430
|
*/
|
|
381
|
-
export declare function formatJobsHttpError(err: AgentsHttpError, jobId?: string, action?: "resume"): string;
|
|
431
|
+
export declare function formatJobsHttpError(err: AgentsHttpError, jobId?: string, action?: "resume" | "update"): string;
|
|
382
432
|
/** Stable padEnd table: jobId, scheduleState, rate, lastRunOutcome, status. */
|
|
383
433
|
export declare function formatJobsTable(jobs: AgentJobView[]): string;
|
|
384
434
|
export declare function formatPauseResult(result: PauseJobResult): string;
|
package/dist/commands/agents.js
CHANGED
|
@@ -31,6 +31,7 @@ import { runResidentCommandWithPackageLease, } from "../utils/resident-package-p
|
|
|
31
31
|
import { waitForAgentTerminalSession } from "../lib/agents/terminal-wait.js";
|
|
32
32
|
import chalk from "chalk";
|
|
33
33
|
import { randomUUID } from "node:crypto";
|
|
34
|
+
import { readFileSync } from "node:fs";
|
|
34
35
|
import * as readline from "node:readline";
|
|
35
36
|
import { resolveVaultCredential } from "../utils/resolve-vault-credential.js";
|
|
36
37
|
import { maxLength } from "../utils/table-width.js";
|
|
@@ -39,6 +40,7 @@ import { gateApiKeyCapabilities } from "../utils/api-key-command-gate.js";
|
|
|
39
40
|
import { queueCliLimitNoticeEngagement, queueCliLimitNoticeExposure, } from "../utils/cli-telemetry.js";
|
|
40
41
|
import { vaultApiFetch, getCompanyUid } from "../utils/vault-api.js";
|
|
41
42
|
import { consoleOrigin } from "./integrations-connect.js";
|
|
43
|
+
import { toEventBridgeCron } from "../lib/bot/eventbridge-cron.js";
|
|
42
44
|
import { launchSessionManagerPlugin, SessionManagerPluginLaunchError, TerminalSessionTimeoutError, } from "@indigoai-us/hq-cloud/outposts/node";
|
|
43
45
|
import { peekIdToken } from "../utils/id-token.js";
|
|
44
46
|
import { canOfferTeamUpgrade, formatUpgradeRefusal, isPlanGateError, offerUpgradeLink, } from "../utils/plan-gate-error.js";
|
|
@@ -909,6 +911,94 @@ export async function cancelAgentJob(token, agentUid, jobId) {
|
|
|
909
911
|
method: "POST",
|
|
910
912
|
});
|
|
911
913
|
}
|
|
914
|
+
export async function updateAgentJob(token, agentUid, jobId, body) {
|
|
915
|
+
return agentsRequest({
|
|
916
|
+
token,
|
|
917
|
+
path: `/v1/agents/${encodeURIComponent(agentUid)}/jobs/${encodeURIComponent(jobId)}/update`,
|
|
918
|
+
method: "POST",
|
|
919
|
+
body: { ...body },
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* Build the edit body from `hq agents jobs update` flags. Pure: file reads
|
|
924
|
+
* (`--prompt-file`, `--script-file`) happen before this is called. Throws a
|
|
925
|
+
* plain Error with operator copy on a bad combination.
|
|
926
|
+
*
|
|
927
|
+
* `--cron` takes the stored six-field `cron(...)`/`rate(...)` form verbatim
|
|
928
|
+
* or a standard five-field expression, translated with the same rules local
|
|
929
|
+
* bot jobs use. A schedule change needs an explicit `--tz`: defaulting to
|
|
930
|
+
* the operator's machine zone would silently move a job that runs in another
|
|
931
|
+
* zone. `--tz` on its own is refused.
|
|
932
|
+
*/
|
|
933
|
+
export function buildJobUpdateBody(opts, translateCron) {
|
|
934
|
+
const body = {};
|
|
935
|
+
if (opts.name !== undefined)
|
|
936
|
+
body.name = opts.name;
|
|
937
|
+
if (opts.prompt !== undefined) {
|
|
938
|
+
if (!opts.prompt.trim())
|
|
939
|
+
throw new Error("--prompt cannot be empty.");
|
|
940
|
+
body.prompt = opts.prompt;
|
|
941
|
+
}
|
|
942
|
+
if (opts.cron !== undefined && opts.at !== undefined) {
|
|
943
|
+
throw new Error("Pass --cron or --at, not both.");
|
|
944
|
+
}
|
|
945
|
+
if (opts.tz !== undefined && opts.cron === undefined && opts.at === undefined) {
|
|
946
|
+
throw new Error("--tz changes the schedule, so pass --cron or --at with it.");
|
|
947
|
+
}
|
|
948
|
+
const timezone = opts.tz?.trim() ?? "";
|
|
949
|
+
if ((opts.cron !== undefined || opts.at !== undefined) && !timezone) {
|
|
950
|
+
throw new Error("Pass --tz <IANA timezone> with --cron or --at (for example --tz America/New_York), so the job's zone never changes by accident.");
|
|
951
|
+
}
|
|
952
|
+
if (opts.cron !== undefined) {
|
|
953
|
+
body.schedule = { kind: "recurring", cron: translateCron(opts.cron), timezone };
|
|
954
|
+
}
|
|
955
|
+
else if (opts.at !== undefined) {
|
|
956
|
+
const at = new Date(opts.at);
|
|
957
|
+
if (Number.isNaN(at.getTime())) {
|
|
958
|
+
throw new Error(`--at "${opts.at}" is not a date and time (use ISO-8601, e.g. 2026-12-01T09:00:00Z).`);
|
|
959
|
+
}
|
|
960
|
+
body.schedule = { kind: "once", at: at.toISOString(), timezone };
|
|
961
|
+
}
|
|
962
|
+
if (opts.context !== undefined && opts.clearContext) {
|
|
963
|
+
throw new Error("Pass --context or --clear-context, not both.");
|
|
964
|
+
}
|
|
965
|
+
if (opts.context !== undefined) {
|
|
966
|
+
let parsed;
|
|
967
|
+
try {
|
|
968
|
+
parsed = JSON.parse(opts.context);
|
|
969
|
+
}
|
|
970
|
+
catch {
|
|
971
|
+
throw new Error("--context must be a JSON object.");
|
|
972
|
+
}
|
|
973
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
974
|
+
throw new Error("--context must be a JSON object.");
|
|
975
|
+
}
|
|
976
|
+
body.context = parsed;
|
|
977
|
+
}
|
|
978
|
+
else if (opts.clearContext) {
|
|
979
|
+
body.context = null;
|
|
980
|
+
}
|
|
981
|
+
if (opts.script !== undefined && opts.clearScript) {
|
|
982
|
+
throw new Error("Pass --script-file or --clear-script, not both.");
|
|
983
|
+
}
|
|
984
|
+
if (opts.script !== undefined) {
|
|
985
|
+
if (!opts.script.trim())
|
|
986
|
+
throw new Error("The --script-file is empty.");
|
|
987
|
+
body.script = opts.script;
|
|
988
|
+
}
|
|
989
|
+
else if (opts.clearScript) {
|
|
990
|
+
body.script = null;
|
|
991
|
+
}
|
|
992
|
+
if (Object.keys(body).length === 0) {
|
|
993
|
+
throw new Error("Nothing to change. Pass --prompt, --prompt-file, --name, --cron, --at, --context or --script-file.");
|
|
994
|
+
}
|
|
995
|
+
return body;
|
|
996
|
+
}
|
|
997
|
+
export function formatUpdateResult(result) {
|
|
998
|
+
if (result.changed.length === 0)
|
|
999
|
+
return `${result.job.jobId} already matches; nothing changed.`;
|
|
1000
|
+
return `Updated ${result.job.jobId} (${result.changed.join(", ")}). Applies from the next run.`;
|
|
1001
|
+
}
|
|
912
1002
|
/**
|
|
913
1003
|
* Map a jobs-control HTTP error to a single operator-facing line. Pure so the
|
|
914
1004
|
* status/code → copy mapping is unit-tested without a process exit.
|
|
@@ -943,8 +1033,14 @@ export function formatJobsHttpError(err, jobId, action) {
|
|
|
943
1033
|
const id = jobId ?? extractQuotedJobId(err.message) ?? "unknown";
|
|
944
1034
|
return `Job '${id}' not found.`;
|
|
945
1035
|
}
|
|
1036
|
+
if (action === "update" && err.status === 404) {
|
|
1037
|
+
return "Agent not found or not accessible, or this HQ server cannot edit jobs yet.";
|
|
1038
|
+
}
|
|
946
1039
|
if (err.status === 404)
|
|
947
1040
|
return "Agent not found or not accessible.";
|
|
1041
|
+
if (err.code === "JOB_EDIT_BOX_CRON" || err.code === "JOB_EDIT_CONFLICT") {
|
|
1042
|
+
return err.message;
|
|
1043
|
+
}
|
|
948
1044
|
if (err.code === "JOBS_SCHEDULER_UNAVAILABLE" ||
|
|
949
1045
|
err.code === "SCHEDULE_DELETE_FAILED") {
|
|
950
1046
|
return `${err.code}: ${err.message}`;
|
|
@@ -2090,7 +2186,7 @@ export function registerAgentsCommand(program) {
|
|
|
2090
2186
|
// this file; keyed HQ_API_KEY rewrites /v1/agents → /v1/keys/agents.
|
|
2091
2187
|
const jobs = agents
|
|
2092
2188
|
.command("jobs")
|
|
2093
|
-
.description("List, pause, resume, or
|
|
2189
|
+
.description("List, edit, pause, resume, or delete an agent's scheduled jobs");
|
|
2094
2190
|
jobs
|
|
2095
2191
|
.command("list <agentUid>")
|
|
2096
2192
|
.description("List an agent's scheduled jobs")
|
|
@@ -2142,9 +2238,65 @@ export function registerAgentsCommand(program) {
|
|
|
2142
2238
|
failJobs(err, jobId, "resume");
|
|
2143
2239
|
}
|
|
2144
2240
|
});
|
|
2241
|
+
jobs
|
|
2242
|
+
.command("update <agentUid> <jobId>")
|
|
2243
|
+
.alias("edit")
|
|
2244
|
+
.description("Edit a job in place (instructions, schedule, name). Only the options you pass change; the job keeps its id and status, and the change applies from the next run.")
|
|
2245
|
+
.option("--company <slug>", "Company slug (to resolve an agent by name/slug)")
|
|
2246
|
+
.option("--prompt <text>", "New instructions")
|
|
2247
|
+
.option("--prompt-file <path>", "Read the new instructions from a file")
|
|
2248
|
+
.option("--name <label>", "Short label for the job")
|
|
2249
|
+
.option("--cron <expr>", 'New recurring schedule: "0 9 * * 1-5" or cron(...)/rate(...)')
|
|
2250
|
+
.option("--at <iso8601>", "New one-time run instant")
|
|
2251
|
+
.option("--tz <IANA>", "Timezone for --cron/--at (required with them)")
|
|
2252
|
+
.option("--context <json>", "Replace the JSON context handed to the agent at run time")
|
|
2253
|
+
.option("--clear-context", "Remove the job's context")
|
|
2254
|
+
.option("--script-file <path>", "Replace the precondition script with this file")
|
|
2255
|
+
.option("--clear-script", "Remove the job's precondition script")
|
|
2256
|
+
.option("--json", "Emit raw JSON")
|
|
2257
|
+
.action(async function (agentUid, jobId, opts) {
|
|
2258
|
+
let body;
|
|
2259
|
+
try {
|
|
2260
|
+
if (opts.prompt !== undefined && opts.promptFile !== undefined) {
|
|
2261
|
+
throw new Error("Pass --prompt or --prompt-file, not both.");
|
|
2262
|
+
}
|
|
2263
|
+
const prompt = opts.promptFile !== undefined ? readFileSync(opts.promptFile, "utf8") : opts.prompt;
|
|
2264
|
+
const script = opts.scriptFile !== undefined ? readFileSync(opts.scriptFile, "utf8") : undefined;
|
|
2265
|
+
body = buildJobUpdateBody({
|
|
2266
|
+
...(prompt !== undefined ? { prompt } : {}),
|
|
2267
|
+
...(opts.name !== undefined ? { name: opts.name } : {}),
|
|
2268
|
+
...(opts.cron !== undefined ? { cron: opts.cron } : {}),
|
|
2269
|
+
...(opts.at !== undefined ? { at: opts.at } : {}),
|
|
2270
|
+
...(opts.tz !== undefined ? { tz: opts.tz } : {}),
|
|
2271
|
+
...(opts.context !== undefined ? { context: opts.context } : {}),
|
|
2272
|
+
...(opts.clearContext ? { clearContext: true } : {}),
|
|
2273
|
+
...(script !== undefined ? { script } : {}),
|
|
2274
|
+
...(opts.clearScript ? { clearScript: true } : {}),
|
|
2275
|
+
}, toEventBridgeCron);
|
|
2276
|
+
}
|
|
2277
|
+
catch (err) {
|
|
2278
|
+
console.error(chalk.red(err instanceof Error ? err.message : String(err)));
|
|
2279
|
+
process.exit(1);
|
|
2280
|
+
}
|
|
2281
|
+
const { token, targetUid } = await resolveJobsTargetOrExit(agentUid, companyOf(this));
|
|
2282
|
+
try {
|
|
2283
|
+
const result = await updateAgentJob(token, targetUid, jobId, body);
|
|
2284
|
+
if (opts.json) {
|
|
2285
|
+
process.stdout.write(JSON.stringify(result, null, 2) + "\n");
|
|
2286
|
+
return;
|
|
2287
|
+
}
|
|
2288
|
+
console.log(chalk.green(formatUpdateResult(result)));
|
|
2289
|
+
if (result.warning)
|
|
2290
|
+
console.error(chalk.yellow(result.warning));
|
|
2291
|
+
}
|
|
2292
|
+
catch (err) {
|
|
2293
|
+
failJobs(err, jobId, "update");
|
|
2294
|
+
}
|
|
2295
|
+
});
|
|
2145
2296
|
jobs
|
|
2146
2297
|
.command("cancel <agentUid> <jobId>")
|
|
2147
|
-
.
|
|
2298
|
+
.alias("delete")
|
|
2299
|
+
.description("Delete a job for good (active or paused) and its schedule")
|
|
2148
2300
|
.option("--company <slug>", "Company slug (to resolve an agent by name/slug)")
|
|
2149
2301
|
.action(async function (agentUid, jobId) {
|
|
2150
2302
|
const { token, targetUid } = await resolveJobsTargetOrExit(agentUid, companyOf(this));
|
|
@@ -20,29 +20,16 @@ import { type LocalJobsApi } from "../lib/bot/local-jobs.js";
|
|
|
20
20
|
import { type BotJobRecord, type CreateJobInput } from "../lib/bot/api.js";
|
|
21
21
|
import { type BotConfig, type BotKind } from "../lib/bot/config.js";
|
|
22
22
|
import { type FleetCronJob, type FleetCronOps } from "../lib/bot/fleet-cron.js";
|
|
23
|
+
import { BotJobsError, toEventBridgeCron } from "../lib/bot/eventbridge-cron.js";
|
|
24
|
+
export { BotJobsError, toEventBridgeCron };
|
|
23
25
|
/** Mirrors hq-pro-agents `MIN_RECURRING_INTERVAL_SECONDS`. */
|
|
24
26
|
export declare const MIN_RECURRING_INTERVAL_SECONDS: number;
|
|
25
27
|
/** Mirrors hq-pro-agents `DEFAULT_MAX_ACTIVE_JOBS_PER_AGENT`. */
|
|
26
28
|
export declare const MAX_ACTIVE_JOBS_PER_AGENT = 25;
|
|
27
29
|
/** Mirrors hq-pro-agents `MAX_PROMPT_BYTES`. */
|
|
28
30
|
export declare const MAX_PROMPT_BYTES: number;
|
|
29
|
-
export declare class BotJobsError extends Error {
|
|
30
|
-
readonly expected: true;
|
|
31
|
-
}
|
|
32
31
|
/** The machine's own IANA zone, so "9am" means 9am where the owner lives. */
|
|
33
32
|
export declare function machineTimezone(): string;
|
|
34
|
-
/**
|
|
35
|
-
* Standard 5-field cron → the six-field `cron(...)` string a job is stored as.
|
|
36
|
-
*
|
|
37
|
-
* The stored form (the six-field cron syntax hosted agent jobs also use, so
|
|
38
|
-
* local and hosted jobs share one format; the function keeps its historical
|
|
39
|
-
* name) has SIX fields (a trailing year), numbers its days of week
|
|
40
|
-
* 1–7 with SUNDAY = 1 (standard cron uses 0–6 with SUNDAY = 0), and refuses
|
|
41
|
-
* `*` in BOTH the day-of-month and day-of-week fields — exactly one must be
|
|
42
|
-
* `?`. An expression that is already `cron(...)` or `rate(...)` is passed
|
|
43
|
-
* through untouched.
|
|
44
|
-
*/
|
|
45
|
-
export declare function toEventBridgeCron(expr: string): string;
|
|
46
33
|
/**
|
|
47
34
|
* The smallest gap a recurring expression can produce, in seconds, or null
|
|
48
35
|
* when it is not a recognised rate()/cron() form. Mirrors hq-pro-agents
|