@indigoai-us/hq-cli 5.345.142 → 5.345.144
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 +74 -0
- package/dist/command-catalog.generated.d.ts +278 -6
- package/dist/command-catalog.generated.js +341 -6
- package/dist/command-registration-plan.d.ts +6 -0
- package/dist/command-registration-plan.js +1 -0
- package/dist/commands/agent-enroll.d.ts +1 -0
- package/dist/commands/agent-enroll.js +7 -0
- package/dist/commands/agents.d.ts +25 -3
- package/dist/commands/agents.js +57 -4
- package/dist/commands/api-keys.js +66 -8
- package/dist/commands/billing-sponsor.d.ts +4 -0
- package/dist/commands/billing-sponsor.js +48 -5
- package/dist/commands/billing-usage.d.ts +59 -0
- package/dist/commands/billing-usage.js +162 -0
- package/dist/commands/billing.d.ts +9 -0
- package/dist/commands/billing.js +29 -2
- package/dist/commands/core-policy.js +76 -13
- package/dist/commands/library-add.d.ts +120 -0
- package/dist/commands/library-add.js +434 -0
- package/dist/commands/library-caption.d.ts +112 -0
- package/dist/commands/library-caption.js +393 -0
- package/dist/commands/library-link.d.ts +32 -0
- package/dist/commands/library-link.js +95 -0
- package/dist/commands/library.d.ts +72 -0
- package/dist/commands/library.js +527 -0
- package/dist/commands/meetings.d.ts +8 -0
- package/dist/commands/meetings.js +25 -2
- package/dist/commands/storage-offload.d.ts +16 -2
- package/dist/commands/storage-offload.js +55 -4
- package/dist/commands/storage.d.ts +8 -1
- package/dist/commands/storage.js +6 -2
- package/dist/hq-cloud-sync-runner/bin/sync-runner.js +2410 -2063
- package/dist/hq-cloud-sync-runner/package.json +1 -1
- package/dist/lib/billing/plan-lock.d.ts +15 -1
- package/dist/lib/billing/plan-lock.js +45 -5
- package/dist/lib/billing/usage-card.d.ts +82 -0
- package/dist/lib/billing/usage-card.js +198 -0
- package/dist/lib/billing/usage-cost.d.ts +214 -0
- package/dist/lib/billing/usage-cost.js +440 -0
- package/dist/lib/billing/usage-only.d.ts +87 -0
- package/dist/lib/billing/usage-only.js +262 -0
- package/dist/lib/billing/usage-rate-card.d.ts +51 -0
- package/dist/lib/billing/usage-rate-card.js +62 -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/plan-limit-nag.d.ts +4 -6
- package/dist/lib/plan-limit-nag.js +19 -1
- package/dist/lib/provider-launcher.d.ts +22 -0
- package/dist/lib/provider-launcher.js +65 -0
- package/dist/lib/search-index/index.d.ts +2 -0
- package/dist/lib/search-index/index.js +34 -0
- package/dist/lib/search-index/max-doc-bytes.d.ts +2 -1
- package/dist/lib/search-index/max-doc-bytes.js +2 -1
- package/dist/main.d.ts +9 -0
- package/dist/main.js +20 -3
- package/dist/utils/billing-gate.d.ts +19 -4
- package/dist/utils/billing-gate.js +25 -4
- package/dist/utils/plan-gate-error.d.ts +10 -0
- package/dist/utils/plan-gate-error.js +54 -0
- package/dist/utils/vault-api.js +4 -1
- package/package.json +2 -2
|
@@ -2902,6 +2902,16 @@ export const COMMAND_CATALOG = [
|
|
|
2902
2902
|
"flags": "--expires <ISO8601>",
|
|
2903
2903
|
"description": "Optional ISO-8601 expiry timestamp",
|
|
2904
2904
|
"hidden": false
|
|
2905
|
+
},
|
|
2906
|
+
{
|
|
2907
|
+
"flags": "--preset <name>",
|
|
2908
|
+
"description": "Grant a fixed capability bundle: library-agent (library-agent = search:query, files:read)",
|
|
2909
|
+
"hidden": false
|
|
2910
|
+
},
|
|
2911
|
+
{
|
|
2912
|
+
"flags": "--allow-upload",
|
|
2913
|
+
"description": "With --preset library-agent, also grant files:write (hq library add)",
|
|
2914
|
+
"hidden": false
|
|
2905
2915
|
}
|
|
2906
2916
|
],
|
|
2907
2917
|
"subcommands": []
|
|
@@ -7811,7 +7821,7 @@ export const COMMAND_CATALOG = [
|
|
|
7811
7821
|
},
|
|
7812
7822
|
{
|
|
7813
7823
|
"flags": "--size <size>",
|
|
7814
|
-
"description": "Agent box size: basic | power | dev (omitted keeps the current default
|
|
7824
|
+
"description": "Agent box size: small | medium | large | xlarge, or basic | power | dev (on usage pricing these map to small | medium | large); omitted keeps the current default",
|
|
7815
7825
|
"hidden": false
|
|
7816
7826
|
},
|
|
7817
7827
|
{
|
|
@@ -9008,7 +9018,7 @@ export const COMMAND_CATALOG = [
|
|
|
9008
9018
|
},
|
|
9009
9019
|
{
|
|
9010
9020
|
"flags": "--cron <expr>",
|
|
9011
|
-
"description": "Recurring schedule, such as
|
|
9021
|
+
"description": "Recurring schedule: rate(N minutes|hours|days), a five-field cron with * for day of month and month (such as \"*/15 * * * *\"; translated to the AWS form), or cron(MIN HOUR ? * DOW *)",
|
|
9012
9022
|
"hidden": false
|
|
9013
9023
|
},
|
|
9014
9024
|
{
|
|
@@ -9265,6 +9275,11 @@ export const COMMAND_CATALOG = [
|
|
|
9265
9275
|
"description": "Outpost id (defaults to your primary box)",
|
|
9266
9276
|
"hidden": false
|
|
9267
9277
|
},
|
|
9278
|
+
{
|
|
9279
|
+
"flags": "--company <slug>",
|
|
9280
|
+
"description": "Request a new sign-in link for the company's Outpost (owner or admin)",
|
|
9281
|
+
"hidden": false
|
|
9282
|
+
},
|
|
9268
9283
|
{
|
|
9269
9284
|
"flags": "--json",
|
|
9270
9285
|
"description": "Emit raw JSON",
|
|
@@ -9296,6 +9311,11 @@ export const COMMAND_CATALOG = [
|
|
|
9296
9311
|
"description": "Outpost id (defaults to your primary box)",
|
|
9297
9312
|
"hidden": false
|
|
9298
9313
|
},
|
|
9314
|
+
{
|
|
9315
|
+
"flags": "--company <slug>",
|
|
9316
|
+
"description": "Sign in the company's Outpost (owner or admin)",
|
|
9317
|
+
"hidden": false
|
|
9318
|
+
},
|
|
9299
9319
|
{
|
|
9300
9320
|
"flags": "--json",
|
|
9301
9321
|
"description": "Emit raw JSON",
|
|
@@ -9403,7 +9423,7 @@ export const COMMAND_CATALOG = [
|
|
|
9403
9423
|
},
|
|
9404
9424
|
{
|
|
9405
9425
|
"name": "upgrade",
|
|
9406
|
-
"description": "Open Stripe Checkout to upgrade
|
|
9426
|
+
"description": "Open Stripe Checkout to upgrade a company on an earlier plan (usage-pricing companies have no plan to upgrade)",
|
|
9407
9427
|
"aliases": [],
|
|
9408
9428
|
"hidden": false,
|
|
9409
9429
|
"helpOption": true,
|
|
@@ -9432,7 +9452,7 @@ export const COMMAND_CATALOG = [
|
|
|
9432
9452
|
},
|
|
9433
9453
|
{
|
|
9434
9454
|
"name": "sponsor",
|
|
9435
|
-
"description": "Ask a company to cover your
|
|
9455
|
+
"description": "Ask a company to cover your personal HQ plan, or answer a request",
|
|
9436
9456
|
"aliases": [],
|
|
9437
9457
|
"hidden": false,
|
|
9438
9458
|
"helpOption": true,
|
|
@@ -9444,7 +9464,7 @@ export const COMMAND_CATALOG = [
|
|
|
9444
9464
|
"subcommands": [
|
|
9445
9465
|
{
|
|
9446
9466
|
"name": "request",
|
|
9447
|
-
"description": "Ask a company to cover your
|
|
9467
|
+
"description": "Ask a company to cover your personal HQ plan",
|
|
9448
9468
|
"aliases": [],
|
|
9449
9469
|
"hidden": false,
|
|
9450
9470
|
"helpOption": true,
|
|
@@ -9494,7 +9514,7 @@ export const COMMAND_CATALOG = [
|
|
|
9494
9514
|
},
|
|
9495
9515
|
{
|
|
9496
9516
|
"name": "approve",
|
|
9497
|
-
"description": "Say yes — put someone's
|
|
9517
|
+
"description": "Say yes — put someone's personal plan on the company bill",
|
|
9498
9518
|
"aliases": [],
|
|
9499
9519
|
"hidden": false,
|
|
9500
9520
|
"helpOption": true,
|
|
@@ -9597,6 +9617,50 @@ export const COMMAND_CATALOG = [
|
|
|
9597
9617
|
"subcommands": []
|
|
9598
9618
|
}
|
|
9599
9619
|
]
|
|
9620
|
+
},
|
|
9621
|
+
{
|
|
9622
|
+
"name": "usage",
|
|
9623
|
+
"description": "Show this month's usage, projected bill, included usage left and what drives it (read-only)",
|
|
9624
|
+
"aliases": [],
|
|
9625
|
+
"hidden": false,
|
|
9626
|
+
"helpOption": true,
|
|
9627
|
+
"helpCommand": false,
|
|
9628
|
+
"usage": "[options]",
|
|
9629
|
+
"helpText": [],
|
|
9630
|
+
"arguments": [],
|
|
9631
|
+
"options": [
|
|
9632
|
+
{
|
|
9633
|
+
"flags": "--company <slug>",
|
|
9634
|
+
"description": "One of your companies (default: your only company)",
|
|
9635
|
+
"hidden": false
|
|
9636
|
+
},
|
|
9637
|
+
{
|
|
9638
|
+
"flags": "--personal",
|
|
9639
|
+
"description": "Your personal HQ instead of a company",
|
|
9640
|
+
"hidden": false
|
|
9641
|
+
},
|
|
9642
|
+
{
|
|
9643
|
+
"flags": "--no-storage-scan",
|
|
9644
|
+
"description": "Skip listing cloud file versions (faster; no old-versions split)",
|
|
9645
|
+
"hidden": false
|
|
9646
|
+
},
|
|
9647
|
+
{
|
|
9648
|
+
"flags": "--fresh",
|
|
9649
|
+
"description": "List cloud file versions live instead of using figures from the last 15 minutes",
|
|
9650
|
+
"hidden": false
|
|
9651
|
+
},
|
|
9652
|
+
{
|
|
9653
|
+
"flags": "--card",
|
|
9654
|
+
"description": "Print the usage price card (meters, included usage, trial, boxes, domains) and exit",
|
|
9655
|
+
"hidden": false
|
|
9656
|
+
},
|
|
9657
|
+
{
|
|
9658
|
+
"flags": "--json",
|
|
9659
|
+
"description": "Print JSON",
|
|
9660
|
+
"hidden": false
|
|
9661
|
+
}
|
|
9662
|
+
],
|
|
9663
|
+
"subcommands": []
|
|
9600
9664
|
}
|
|
9601
9665
|
]
|
|
9602
9666
|
},
|
|
@@ -12013,6 +12077,277 @@ export const COMMAND_CATALOG = [
|
|
|
12013
12077
|
}
|
|
12014
12078
|
]
|
|
12015
12079
|
},
|
|
12080
|
+
{
|
|
12081
|
+
"name": "library",
|
|
12082
|
+
"description": "Company media library (.hqcloud asset placeholders)",
|
|
12083
|
+
"aliases": [],
|
|
12084
|
+
"hidden": false,
|
|
12085
|
+
"helpOption": true,
|
|
12086
|
+
"helpCommand": true,
|
|
12087
|
+
"usage": "[options] [command]",
|
|
12088
|
+
"helpText": [],
|
|
12089
|
+
"arguments": [],
|
|
12090
|
+
"options": [],
|
|
12091
|
+
"subcommands": [
|
|
12092
|
+
{
|
|
12093
|
+
"name": "search",
|
|
12094
|
+
"description": "Search library assets in the cloud, falling back to the local index when offline",
|
|
12095
|
+
"aliases": [],
|
|
12096
|
+
"hidden": false,
|
|
12097
|
+
"helpOption": true,
|
|
12098
|
+
"helpCommand": false,
|
|
12099
|
+
"usage": "[options] [query...]",
|
|
12100
|
+
"helpText": [],
|
|
12101
|
+
"arguments": [
|
|
12102
|
+
{
|
|
12103
|
+
"name": "query",
|
|
12104
|
+
"required": false,
|
|
12105
|
+
"variadic": true,
|
|
12106
|
+
"description": "Query terms (joined with spaces)"
|
|
12107
|
+
}
|
|
12108
|
+
],
|
|
12109
|
+
"options": [
|
|
12110
|
+
{
|
|
12111
|
+
"flags": "--tag <tag>",
|
|
12112
|
+
"description": "Require a tag (repeatable or comma-separated)",
|
|
12113
|
+
"hidden": false,
|
|
12114
|
+
"defaultValue": []
|
|
12115
|
+
},
|
|
12116
|
+
{
|
|
12117
|
+
"flags": "--company <slug>",
|
|
12118
|
+
"description": "Restrict to one company",
|
|
12119
|
+
"hidden": false
|
|
12120
|
+
},
|
|
12121
|
+
{
|
|
12122
|
+
"flags": "-n, --count <count>",
|
|
12123
|
+
"description": "Maximum result count",
|
|
12124
|
+
"hidden": false
|
|
12125
|
+
},
|
|
12126
|
+
{
|
|
12127
|
+
"flags": "--json",
|
|
12128
|
+
"description": "Print machine-readable JSON",
|
|
12129
|
+
"hidden": false
|
|
12130
|
+
}
|
|
12131
|
+
],
|
|
12132
|
+
"subcommands": []
|
|
12133
|
+
},
|
|
12134
|
+
{
|
|
12135
|
+
"name": "add",
|
|
12136
|
+
"description": "Upload files or URLs to the company vault and add .hqcloud placeholders to the library",
|
|
12137
|
+
"aliases": [],
|
|
12138
|
+
"hidden": false,
|
|
12139
|
+
"helpOption": true,
|
|
12140
|
+
"helpCommand": false,
|
|
12141
|
+
"usage": "[options] <sources...>",
|
|
12142
|
+
"helpText": [],
|
|
12143
|
+
"arguments": [
|
|
12144
|
+
{
|
|
12145
|
+
"name": "sources",
|
|
12146
|
+
"required": true,
|
|
12147
|
+
"variadic": true,
|
|
12148
|
+
"description": "Local files or http(s) URLs"
|
|
12149
|
+
}
|
|
12150
|
+
],
|
|
12151
|
+
"options": [
|
|
12152
|
+
{
|
|
12153
|
+
"flags": "--to <dir>",
|
|
12154
|
+
"description": "Library folder inside companies/<co>/ (default companies/<co>/library)",
|
|
12155
|
+
"hidden": false
|
|
12156
|
+
},
|
|
12157
|
+
{
|
|
12158
|
+
"flags": "--tags <tags>",
|
|
12159
|
+
"description": "Tags (comma-separated, repeatable)",
|
|
12160
|
+
"hidden": false,
|
|
12161
|
+
"defaultValue": []
|
|
12162
|
+
},
|
|
12163
|
+
{
|
|
12164
|
+
"flags": "--title <title>",
|
|
12165
|
+
"description": "Asset title (default: the file name)",
|
|
12166
|
+
"hidden": false
|
|
12167
|
+
},
|
|
12168
|
+
{
|
|
12169
|
+
"flags": "--note <text>",
|
|
12170
|
+
"description": "Asset description",
|
|
12171
|
+
"hidden": false
|
|
12172
|
+
},
|
|
12173
|
+
{
|
|
12174
|
+
"flags": "--company <slug>",
|
|
12175
|
+
"description": "Company whose vault receives the files",
|
|
12176
|
+
"hidden": false
|
|
12177
|
+
},
|
|
12178
|
+
{
|
|
12179
|
+
"flags": "--no-caption",
|
|
12180
|
+
"description": "Skip the AI description and suggested tags for images and videos",
|
|
12181
|
+
"hidden": false
|
|
12182
|
+
},
|
|
12183
|
+
{
|
|
12184
|
+
"flags": "--json",
|
|
12185
|
+
"description": "Print machine-readable JSON",
|
|
12186
|
+
"hidden": false
|
|
12187
|
+
}
|
|
12188
|
+
],
|
|
12189
|
+
"subcommands": []
|
|
12190
|
+
},
|
|
12191
|
+
{
|
|
12192
|
+
"name": "tag",
|
|
12193
|
+
"description": "Add or remove tags on a library placeholder",
|
|
12194
|
+
"aliases": [],
|
|
12195
|
+
"hidden": false,
|
|
12196
|
+
"helpOption": true,
|
|
12197
|
+
"helpCommand": false,
|
|
12198
|
+
"usage": "[options] <placeholder>",
|
|
12199
|
+
"helpText": [],
|
|
12200
|
+
"arguments": [
|
|
12201
|
+
{
|
|
12202
|
+
"name": "placeholder",
|
|
12203
|
+
"required": true,
|
|
12204
|
+
"variadic": false,
|
|
12205
|
+
"description": "A .hqcloud placeholder (or the original path)"
|
|
12206
|
+
}
|
|
12207
|
+
],
|
|
12208
|
+
"options": [
|
|
12209
|
+
{
|
|
12210
|
+
"flags": "--add <tags>",
|
|
12211
|
+
"description": "Tags to add (comma-separated, repeatable)",
|
|
12212
|
+
"hidden": false,
|
|
12213
|
+
"defaultValue": []
|
|
12214
|
+
},
|
|
12215
|
+
{
|
|
12216
|
+
"flags": "--remove <tags>",
|
|
12217
|
+
"description": "Tags to remove (comma-separated, repeatable)",
|
|
12218
|
+
"hidden": false,
|
|
12219
|
+
"defaultValue": []
|
|
12220
|
+
},
|
|
12221
|
+
{
|
|
12222
|
+
"flags": "--json",
|
|
12223
|
+
"description": "Print machine-readable JSON",
|
|
12224
|
+
"hidden": false
|
|
12225
|
+
}
|
|
12226
|
+
],
|
|
12227
|
+
"subcommands": []
|
|
12228
|
+
},
|
|
12229
|
+
{
|
|
12230
|
+
"name": "ls",
|
|
12231
|
+
"description": "List library placeholders in a folder (default: companies/)",
|
|
12232
|
+
"aliases": [],
|
|
12233
|
+
"hidden": false,
|
|
12234
|
+
"helpOption": true,
|
|
12235
|
+
"helpCommand": false,
|
|
12236
|
+
"usage": "[options] [dir]",
|
|
12237
|
+
"helpText": [],
|
|
12238
|
+
"arguments": [
|
|
12239
|
+
{
|
|
12240
|
+
"name": "dir",
|
|
12241
|
+
"required": false,
|
|
12242
|
+
"variadic": false,
|
|
12243
|
+
"description": "Folder to list, relative to HQ"
|
|
12244
|
+
}
|
|
12245
|
+
],
|
|
12246
|
+
"options": [
|
|
12247
|
+
{
|
|
12248
|
+
"flags": "--tag <tag>",
|
|
12249
|
+
"description": "Require a tag (repeatable or comma-separated)",
|
|
12250
|
+
"hidden": false,
|
|
12251
|
+
"defaultValue": []
|
|
12252
|
+
},
|
|
12253
|
+
{
|
|
12254
|
+
"flags": "--json",
|
|
12255
|
+
"description": "Print machine-readable JSON",
|
|
12256
|
+
"hidden": false
|
|
12257
|
+
}
|
|
12258
|
+
],
|
|
12259
|
+
"subcommands": []
|
|
12260
|
+
},
|
|
12261
|
+
{
|
|
12262
|
+
"name": "describe",
|
|
12263
|
+
"description": "Re-run the AI description and suggested tags for a library image or video",
|
|
12264
|
+
"aliases": [],
|
|
12265
|
+
"hidden": false,
|
|
12266
|
+
"helpOption": true,
|
|
12267
|
+
"helpCommand": false,
|
|
12268
|
+
"usage": "[options] <placeholder>",
|
|
12269
|
+
"helpText": [],
|
|
12270
|
+
"arguments": [
|
|
12271
|
+
{
|
|
12272
|
+
"name": "placeholder",
|
|
12273
|
+
"required": true,
|
|
12274
|
+
"variadic": false,
|
|
12275
|
+
"description": "A .hqcloud placeholder (or the original path)"
|
|
12276
|
+
}
|
|
12277
|
+
],
|
|
12278
|
+
"options": [
|
|
12279
|
+
{
|
|
12280
|
+
"flags": "--json",
|
|
12281
|
+
"description": "Print machine-readable JSON",
|
|
12282
|
+
"hidden": false
|
|
12283
|
+
}
|
|
12284
|
+
],
|
|
12285
|
+
"subcommands": []
|
|
12286
|
+
},
|
|
12287
|
+
{
|
|
12288
|
+
"name": "fetch",
|
|
12289
|
+
"description": "Download a library asset next to its placeholder (wraps hq storage fetch)",
|
|
12290
|
+
"aliases": [],
|
|
12291
|
+
"hidden": false,
|
|
12292
|
+
"helpOption": true,
|
|
12293
|
+
"helpCommand": false,
|
|
12294
|
+
"usage": "[options] <placeholder>",
|
|
12295
|
+
"helpText": [],
|
|
12296
|
+
"arguments": [
|
|
12297
|
+
{
|
|
12298
|
+
"name": "placeholder",
|
|
12299
|
+
"required": true,
|
|
12300
|
+
"variadic": false,
|
|
12301
|
+
"description": "A .hqcloud placeholder (or the original path)"
|
|
12302
|
+
}
|
|
12303
|
+
],
|
|
12304
|
+
"options": [
|
|
12305
|
+
{
|
|
12306
|
+
"flags": "--json",
|
|
12307
|
+
"description": "Print machine-readable JSON",
|
|
12308
|
+
"hidden": false
|
|
12309
|
+
}
|
|
12310
|
+
],
|
|
12311
|
+
"subcommands": []
|
|
12312
|
+
},
|
|
12313
|
+
{
|
|
12314
|
+
"name": "link",
|
|
12315
|
+
"description": "Mint a short-lived download URL for a library asset (needs files:read)",
|
|
12316
|
+
"aliases": [],
|
|
12317
|
+
"hidden": false,
|
|
12318
|
+
"helpOption": true,
|
|
12319
|
+
"helpCommand": false,
|
|
12320
|
+
"usage": "[options] <target>",
|
|
12321
|
+
"helpText": [],
|
|
12322
|
+
"arguments": [
|
|
12323
|
+
{
|
|
12324
|
+
"name": "target",
|
|
12325
|
+
"required": true,
|
|
12326
|
+
"variadic": false,
|
|
12327
|
+
"description": "A .hqcloud placeholder, its original path, or a vault key (.hq-offload/…)"
|
|
12328
|
+
}
|
|
12329
|
+
],
|
|
12330
|
+
"options": [
|
|
12331
|
+
{
|
|
12332
|
+
"flags": "--company <company>",
|
|
12333
|
+
"description": "Company uid (cmp_…), or a slug on a session; default: the placeholder's company or the key's",
|
|
12334
|
+
"hidden": false
|
|
12335
|
+
},
|
|
12336
|
+
{
|
|
12337
|
+
"flags": "--expires <minutes>",
|
|
12338
|
+
"description": "Link lifetime in minutes, 1-60 (default 15)",
|
|
12339
|
+
"hidden": false
|
|
12340
|
+
},
|
|
12341
|
+
{
|
|
12342
|
+
"flags": "--json",
|
|
12343
|
+
"description": "Print machine-readable JSON",
|
|
12344
|
+
"hidden": false
|
|
12345
|
+
}
|
|
12346
|
+
],
|
|
12347
|
+
"subcommands": []
|
|
12348
|
+
}
|
|
12349
|
+
]
|
|
12350
|
+
},
|
|
12016
12351
|
{
|
|
12017
12352
|
"name": "index",
|
|
12018
12353
|
"description": "Manage the local HQ search index",
|
|
@@ -448,6 +448,12 @@ export declare const REGISTRATION_PLAN: readonly [{
|
|
|
448
448
|
readonly parent: "program";
|
|
449
449
|
readonly module: "./commands/search.js";
|
|
450
450
|
readonly exportName: "registerSearchCommand";
|
|
451
|
+
}, {
|
|
452
|
+
readonly type: "registrar";
|
|
453
|
+
readonly root: "library";
|
|
454
|
+
readonly parent: "program";
|
|
455
|
+
readonly module: "./commands/library.js";
|
|
456
|
+
readonly exportName: "registerLibraryCommand";
|
|
451
457
|
}, {
|
|
452
458
|
readonly type: "registrar";
|
|
453
459
|
readonly root: "index";
|
|
@@ -77,6 +77,7 @@ export const REGISTRATION_PLAN = [
|
|
|
77
77
|
{ type: "registrar", root: "vault", parent: "program", module: "./commands/vault-retention.js", exportName: "registerVaultRetentionCommand" },
|
|
78
78
|
{ type: "registrar", root: "core", parent: "program", module: "./commands/core.js", exportName: "registerCoreCommands" },
|
|
79
79
|
{ type: "registrar", root: "search", parent: "program", module: "./commands/search.js", exportName: "registerSearchCommand" },
|
|
80
|
+
{ type: "registrar", root: "library", parent: "program", module: "./commands/library.js", exportName: "registerLibraryCommand" },
|
|
80
81
|
{ type: "registrar", root: "index", parent: "program", module: "./commands/index-cmd.js", exportName: "registerIndexCommand" },
|
|
81
82
|
{ type: "registrar", root: "capacity", parent: "program", module: "./commands/capacity.js", exportName: "registerCapacityCommand" },
|
|
82
83
|
{ type: "registrar", root: "doctor", parent: "program", module: "./commands/doctor.js", exportName: "registerDoctorCommand" },
|
|
@@ -20,6 +20,7 @@ import * as os from "node:os";
|
|
|
20
20
|
import { CLI_VERSION } from "../cli-version.js";
|
|
21
21
|
import { DEFAULT_VAULT_API_URL, personTokenCacheFile, } from "../utils/cognito-session.js";
|
|
22
22
|
import { HQ_CLIENT_NAME } from "../utils/vault-api.js";
|
|
23
|
+
import { isUsageOnly, pricingPlanFromBody, usageOnlyCardRequiredLines, } from "../lib/billing/usage-only.js";
|
|
23
24
|
import { queueCliLimitNoticeEngagement, queueCliLimitNoticeExposure, } from "../utils/cli-telemetry.js";
|
|
24
25
|
import { networkTransportErrorCode } from "../utils/network-transport-error.js";
|
|
25
26
|
import { canOfferTeamUpgrade, formatUpgradeRefusal, isPlanGateError, offerUpgradeLink, planGateErrorFromPayload, } from "../utils/plan-gate-error.js";
|
|
@@ -135,6 +136,12 @@ export function mapEnrollFailure(status, body, headers) {
|
|
|
135
136
|
return new EnrollError(`This agent was revoked; its enrollment code no longer works. An admin must ` +
|
|
136
137
|
`create a new external agent or rotate this one.${suffix}`, status, code);
|
|
137
138
|
}
|
|
139
|
+
if ((status === 402 || code === "billing_required") &&
|
|
140
|
+
isUsageOnly(pricingPlanFromBody(body))) {
|
|
141
|
+
// Usage pricing (US-012): no paid plan to upgrade to. A company admin adds
|
|
142
|
+
// a card; the agent then bills per use.
|
|
143
|
+
return new EnrollError(usageOnlyCardRequiredLines("An external agent").join(" ") + suffix, status, code);
|
|
144
|
+
}
|
|
138
145
|
if (status === 402 || code === "billing_required") {
|
|
139
146
|
return new EnrollError(`External agents are available on paid HQ plans only. A company admin must ` +
|
|
140
147
|
`upgrade the plan (\`hq billing\` or the console billing page) before enrolling.${suffix}`, status, code, typeof body.upgradeUrl === "string" ? body.upgradeUrl : undefined);
|
|
@@ -31,6 +31,8 @@ import { Command } from "commander";
|
|
|
31
31
|
import { type ResidentCommandLeaseOptions } from "../utils/resident-package-preload.js";
|
|
32
32
|
import { type TerminalSessionPayload } from "@indigoai-us/hq-cloud/outposts/node";
|
|
33
33
|
import { type AgentModelProvider, type AgentModelCatalog } from "../lib/agents/model-catalog.js";
|
|
34
|
+
import { type PricingPlan } from "../lib/billing/usage-only.js";
|
|
35
|
+
import { type UsageCard } from "../lib/billing/usage-card.js";
|
|
34
36
|
import { type BillingErrorPayload } from "../utils/billing-gate.js";
|
|
35
37
|
/** Reasoning-effort values hq-pro accepts on `runtime-config`. */
|
|
36
38
|
export declare const VALID_EFFORTS: Set<string>;
|
|
@@ -40,7 +42,14 @@ export declare const VALID_TIERS: Set<string>;
|
|
|
40
42
|
export declare const VALID_PROVIDERS: Set<string>;
|
|
41
43
|
/** Auth modes hq-pro accepts on `POST /v1/agents` (`CodexAuthMode`). */
|
|
42
44
|
export declare const VALID_AUTH_MODES: Set<string>;
|
|
43
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Customer-facing agent size keys served by hq-pro's authoritative catalog.
|
|
47
|
+
* basic / power / dev are the legacy ladder; small / medium / large / xlarge
|
|
48
|
+
* are the usage-pricing ladder (US-012). hq-pro returns the ladder that
|
|
49
|
+
* applies to the company, and a key it does not quote is refused with
|
|
50
|
+
* "did not return a quote".
|
|
51
|
+
*/
|
|
52
|
+
export type AgentSizeKey = "basic" | "power" | "dev" | "small" | "medium" | "large" | "xlarge";
|
|
44
53
|
export declare const VALID_AGENT_SIZE_KEYS: Set<string>;
|
|
45
54
|
/**
|
|
46
55
|
* `hq agents create` exits with this distinct status when payment is required.
|
|
@@ -64,6 +73,8 @@ export declare function agentCreatePlanLimitFromPayload(status: number, body: un
|
|
|
64
73
|
export declare function surfaceAgentCreatePlanLimit(planLimit: AgentCreatePlanLimit, opts?: {
|
|
65
74
|
json?: boolean;
|
|
66
75
|
companyUid?: string;
|
|
76
|
+
pricingPlan?: PricingPlan | null;
|
|
77
|
+
usageCard?: UsageCard;
|
|
67
78
|
}): Promise<void>;
|
|
68
79
|
/**
|
|
69
80
|
* Resolve a closed-set option value, or exit(1) with a message naming the
|
|
@@ -223,7 +234,7 @@ export declare function resolveProvisionSlackTokens(options: ProvisionSlackToken
|
|
|
223
234
|
export declare const CLI_AGENT_CREATE_SURFACE: "cli_agents_create";
|
|
224
235
|
export type AgentCreateSurface = typeof CLI_AGENT_CREATE_SURFACE;
|
|
225
236
|
export interface AgentCreateSizeOption {
|
|
226
|
-
key:
|
|
237
|
+
key: AgentSizeKey;
|
|
227
238
|
productName: string;
|
|
228
239
|
instanceType: string;
|
|
229
240
|
listCents: number;
|
|
@@ -247,8 +258,19 @@ export type QuotedAgentCreateSizeOption = AgentCreateSizeOption & {
|
|
|
247
258
|
};
|
|
248
259
|
/** Read hq-pro's company-specific creation prices and capacities. */
|
|
249
260
|
export declare function getAgentCreateOptions(token: string, companyUid: string, idempotencyKey?: string): Promise<AgentCreateOptionsView>;
|
|
261
|
+
/**
|
|
262
|
+
* Legacy size names on the usage-pricing (v2) box ladder, owner decision
|
|
263
|
+
* 2026-10-16: basic -> small, power -> medium, dev -> large.
|
|
264
|
+
*/
|
|
265
|
+
export declare const LEGACY_TO_V2_AGENT_SIZE: Readonly<Record<string, AgentSizeKey>>;
|
|
266
|
+
/**
|
|
267
|
+
* The size key to look up in the server's options. A key the server offers is
|
|
268
|
+
* used as is. A legacy key (basic, power, dev) against a v2 catalog maps to its
|
|
269
|
+
* v2 size. Anything else is returned unchanged and refused by the caller.
|
|
270
|
+
*/
|
|
271
|
+
export declare function resolveAgentSizeKey(view: AgentCreateOptionsView, sizeKey: string): string;
|
|
250
272
|
/** Resolve a requested size from the server response, never from local prices. */
|
|
251
|
-
export declare function requireQuotedCreateSize(view: AgentCreateOptionsView,
|
|
273
|
+
export declare function requireQuotedCreateSize(view: AgentCreateOptionsView, requestedKey: string): QuotedAgentCreateSizeOption;
|
|
252
274
|
/** Resolve hq-pro's default quote while leaving the POST default implicit. */
|
|
253
275
|
export declare function requireDefaultAgentCreateSize(view: AgentCreateOptionsView): QuotedAgentCreateSizeOption;
|
|
254
276
|
/** Human-facing quote summary sourced entirely from hq-pro. */
|
package/dist/commands/agents.js
CHANGED
|
@@ -44,6 +44,8 @@ import { peekIdToken } from "../utils/id-token.js";
|
|
|
44
44
|
import { canOfferTeamUpgrade, formatUpgradeRefusal, isPlanGateError, offerUpgradeLink, } from "../utils/plan-gate-error.js";
|
|
45
45
|
import { AGENT_UID_PATTERN, isAgentUid } from "../lib/notify-recipient.js";
|
|
46
46
|
import { AGENT_MODEL_PROVIDERS, modelSelectionErrorMessage, readAgentModelCatalog, validateAgentModelSelection, } from "../lib/agents/model-catalog.js";
|
|
47
|
+
import { fetchCompanyPricingPlan, isUsageOnly, usageOnlyBoxSentence, usageOnlyCardRequiredLines, } from "../lib/billing/usage-only.js";
|
|
48
|
+
import { BUNDLED_USAGE_CARD, fetchUsageCard, } from "../lib/billing/usage-card.js";
|
|
47
49
|
import { confirmChargeOrExit, formatUsd, parseBillingPayload, surfaceBillingBlocked, } from "../utils/billing-gate.js";
|
|
48
50
|
/** Reasoning-effort values hq-pro accepts on `runtime-config`. */
|
|
49
51
|
export const VALID_EFFORTS = new Set([
|
|
@@ -59,8 +61,15 @@ export const VALID_TIERS = new Set(["default", "priority"]);
|
|
|
59
61
|
export const VALID_PROVIDERS = new Set(["codex", "grok", "claude", "agents-v2"]);
|
|
60
62
|
/** Auth modes hq-pro accepts on `POST /v1/agents` (`CodexAuthMode`). */
|
|
61
63
|
export const VALID_AUTH_MODES = new Set(["subscription", "apiKey"]);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
export const VALID_AGENT_SIZE_KEYS = new Set([
|
|
65
|
+
"basic",
|
|
66
|
+
"power",
|
|
67
|
+
"dev",
|
|
68
|
+
"small",
|
|
69
|
+
"medium",
|
|
70
|
+
"large",
|
|
71
|
+
"xlarge",
|
|
72
|
+
]);
|
|
64
73
|
// Keep cloud agent create slugs aligned with hq-pro-agents POST /v1/agents.
|
|
65
74
|
const AGENT_SLUG_PATTERN = /^[a-z0-9][a-z0-9-]{0,62}$/;
|
|
66
75
|
const CLAUDE_PROVISION_COMMAND = "hq agents provision <name> --provider agents-v2 --model <model-id>";
|
|
@@ -146,6 +155,17 @@ async function offerAgentCheckout(url) {
|
|
|
146
155
|
}
|
|
147
156
|
/** Print a server-priced plan block without minting or rewriting its URL. */
|
|
148
157
|
export async function surfaceAgentCreatePlanLimit(planLimit, opts = {}) {
|
|
158
|
+
if (isUsageOnly(opts.pricingPlan)) {
|
|
159
|
+
// Usage pricing (US-012): no Workforce plan to buy. The company adds a
|
|
160
|
+
// card and each agent box bills by size from the usage card.
|
|
161
|
+
const card = opts.usageCard ?? BUNDLED_USAGE_CARD;
|
|
162
|
+
for (const line of usageOnlyCardRequiredLines("An agent box", card)) {
|
|
163
|
+
console.error(line);
|
|
164
|
+
}
|
|
165
|
+
console.error(usageOnlyBoxSentence(card));
|
|
166
|
+
queueCliLimitNoticeExposure("agents", "refusal", opts.companyUid);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
149
169
|
const price = `${formatServerPrice(planLimit.amountMinor, planLimit.currency)}/month`;
|
|
150
170
|
const reason = `HQ Workforce plan required to create an agent (${price}).`;
|
|
151
171
|
const argv = opts.json ? [...process.argv, "--json"] : process.argv;
|
|
@@ -351,8 +371,31 @@ export async function getAgentCreateOptions(token, companyUid, idempotencyKey) {
|
|
|
351
371
|
}
|
|
352
372
|
return view;
|
|
353
373
|
}
|
|
374
|
+
/**
|
|
375
|
+
* Legacy size names on the usage-pricing (v2) box ladder, owner decision
|
|
376
|
+
* 2026-10-16: basic -> small, power -> medium, dev -> large.
|
|
377
|
+
*/
|
|
378
|
+
export const LEGACY_TO_V2_AGENT_SIZE = {
|
|
379
|
+
basic: "small",
|
|
380
|
+
power: "medium",
|
|
381
|
+
dev: "large",
|
|
382
|
+
};
|
|
383
|
+
/**
|
|
384
|
+
* The size key to look up in the server's options. A key the server offers is
|
|
385
|
+
* used as is. A legacy key (basic, power, dev) against a v2 catalog maps to its
|
|
386
|
+
* v2 size. Anything else is returned unchanged and refused by the caller.
|
|
387
|
+
*/
|
|
388
|
+
export function resolveAgentSizeKey(view, sizeKey) {
|
|
389
|
+
if (view.options.some((candidate) => candidate.key === sizeKey))
|
|
390
|
+
return sizeKey;
|
|
391
|
+
const v2 = LEGACY_TO_V2_AGENT_SIZE[sizeKey];
|
|
392
|
+
if (v2 && view.options.some((candidate) => candidate.key === v2))
|
|
393
|
+
return v2;
|
|
394
|
+
return sizeKey;
|
|
395
|
+
}
|
|
354
396
|
/** Resolve a requested size from the server response, never from local prices. */
|
|
355
|
-
export function requireQuotedCreateSize(view,
|
|
397
|
+
export function requireQuotedCreateSize(view, requestedKey) {
|
|
398
|
+
const sizeKey = resolveAgentSizeKey(view, requestedKey);
|
|
356
399
|
const option = view.options.find((candidate) => candidate.key === sizeKey);
|
|
357
400
|
if (!option) {
|
|
358
401
|
throw new Error(`HQ Pro did not return a quote for agent size ${sizeKey}.`);
|
|
@@ -1460,7 +1503,7 @@ export function registerAgentsCommand(program) {
|
|
|
1460
1503
|
.option("--slack-tokens-stdin", "Read the bot token and optional app token from one or two stdin lines")
|
|
1461
1504
|
.option("--title <title>", "Org-chart job title")
|
|
1462
1505
|
.option("--description <text>", "Short description / bio")
|
|
1463
|
-
.option("--size <size>", "Agent box size: basic | power | dev (omitted keeps the current default
|
|
1506
|
+
.option("--size <size>", "Agent box size: small | medium | large | xlarge, or basic | power | dev (on usage pricing these map to small | medium | large); omitted keeps the current default")
|
|
1464
1507
|
.option("--yes", "Confirm the quoted monthly cost and provision the agent")
|
|
1465
1508
|
.option("--json", "Emit machine-readable output and never open a browser")
|
|
1466
1509
|
.addHelpText("after", `\n${claudeProvisionGuidance()}\n`)
|
|
@@ -1626,9 +1669,19 @@ export function registerAgentsCommand(program) {
|
|
|
1626
1669
|
if (!err.agentCreatePlanLimit) {
|
|
1627
1670
|
throw new Error("HQ Pro returned an unrecognized agent payment-required response.");
|
|
1628
1671
|
}
|
|
1672
|
+
// Bounded: an unreachable API leaves the plan unknown (legacy copy)
|
|
1673
|
+
// within 3 s instead of holding the refusal.
|
|
1674
|
+
const pricingPlan = await fetchCompanyPricingPlan(token, companyUid, {
|
|
1675
|
+
timeoutMs: 2000,
|
|
1676
|
+
deadlineMs: 3000,
|
|
1677
|
+
}).catch(() => null);
|
|
1629
1678
|
await surfaceAgentCreatePlanLimit(err.agentCreatePlanLimit, {
|
|
1630
1679
|
...opts,
|
|
1631
1680
|
companyUid,
|
|
1681
|
+
pricingPlan,
|
|
1682
|
+
...(isUsageOnly(pricingPlan)
|
|
1683
|
+
? { usageCard: (await fetchUsageCard()).card }
|
|
1684
|
+
: {}),
|
|
1632
1685
|
});
|
|
1633
1686
|
// Keep the payment-required status through normal CLI teardown.
|
|
1634
1687
|
// Unlike process.exit(), this is testable and cannot be caught by
|