@indigoai-us/hq-cli 5.327.0 → 5.329.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/assets/scaffold/core/scripts/hq-dm-bind.sh +1 -1
- package/assets/scaffold/core/scripts/hq-job-run.sh +8 -8
- package/assets/scaffold/core/scripts/ontology-audience-grant.sh +1 -1
- package/assets/scaffold/core/scripts/ontology-candidate.sh +1 -1
- package/assets/scaffold/core/scripts/resolve-company.sh +1 -1
- package/dist/command-catalog.generated.d.ts +3699 -3
- package/dist/command-catalog.generated.js +5462 -1759
- package/dist/command-help.d.ts +2 -0
- package/dist/command-help.js +13 -0
- package/dist/commands/install-global.d.ts +21 -0
- package/dist/commands/install-global.js +267 -32
- package/dist/commands/mcp-serve.js +1 -1
- package/dist/commands/mcp-status.js +58 -1
- package/dist/commands/pack-install.d.ts +3 -1
- package/dist/commands/pack-install.js +17 -4
- package/dist/commands/packs.js +17 -0
- package/dist/commands/pkg-install.js +13 -1
- package/dist/fast-scaffold.d.ts +2 -0
- package/dist/fast-scaffold.js +16 -0
- package/dist/index.js +19 -2
- package/dist/lazy-commands.d.ts +1 -0
- package/dist/lazy-commands.js +64 -4
- package/dist/lib/cli-flag-keys.d.ts +3 -0
- package/dist/lib/cli-flag-keys.js +3 -0
- package/dist/lib/daemon/ops/mcp.js +11 -10
- package/dist/lib/daemon/ops/policy.d.ts +3 -2
- package/dist/lib/daemon/ops/policy.js +12 -6
- package/dist/lib/daemon/server.d.ts +3 -1
- package/dist/lib/daemon/server.js +63 -7
- package/dist/lib/doctor/checks/anywhere.js +58 -4
- package/dist/lib/install/chatgpt-targets.d.ts +8 -0
- package/dist/lib/install/chatgpt-targets.js +15 -0
- package/dist/lib/install/codex-pack-contributions.d.ts +8 -0
- package/dist/lib/install/codex-pack-contributions.js +205 -0
- package/dist/lib/install/codex-targets.d.ts +1 -1
- package/dist/lib/install/codex-targets.js +2 -1
- package/dist/lib/install/grok-targets.d.ts +8 -0
- package/dist/lib/install/grok-targets.js +15 -0
- package/dist/lib/lanes/keep-alive-audit.d.ts +3 -2
- package/dist/lib/lanes/keep-alive-audit.js +36 -8
- package/dist/main.d.ts +2 -6
- package/dist/main.js +3 -41
- package/dist/node-network-compat-fast.js +4 -0
- package/dist/stream-error-boundary.d.ts +7 -0
- package/dist/stream-error-boundary.js +33 -0
- package/dist/utils/vault-api.js +16 -1
- package/package.json +1 -1
package/dist/utils/vault-api.js
CHANGED
|
@@ -111,14 +111,20 @@ function identityLookupTimeoutMs() {
|
|
|
111
111
|
* exits on Linux CI. Reading once + re-wrapping fully drains the stream.
|
|
112
112
|
*/
|
|
113
113
|
async function peekPlanLimitStatus(response, options = {}) {
|
|
114
|
+
let bufferedBody;
|
|
114
115
|
try {
|
|
115
116
|
if (!response.ok)
|
|
116
117
|
return response;
|
|
118
|
+
// Fetch forbids bodies on these statuses. Leave the original response
|
|
119
|
+
// untouched instead of consuming it and trying to reconstruct it later.
|
|
120
|
+
if ([101, 103, 204, 205, 304].includes(response.status))
|
|
121
|
+
return response;
|
|
117
122
|
const ct = response.headers.get('content-type') ?? '';
|
|
118
123
|
if (!ct.includes('application/json') && !ct.includes('+json')) {
|
|
119
124
|
return response;
|
|
120
125
|
}
|
|
121
126
|
const buf = await response.arrayBuffer();
|
|
127
|
+
bufferedBody = buf;
|
|
122
128
|
try {
|
|
123
129
|
const text = new TextDecoder().decode(buf);
|
|
124
130
|
try {
|
|
@@ -141,7 +147,16 @@ async function peekPlanLimitStatus(response, options = {}) {
|
|
|
141
147
|
}
|
|
142
148
|
catch (err) {
|
|
143
149
|
// Only secret-load callers need the body-read error for offline fallback.
|
|
144
|
-
// Other endpoints retain the
|
|
150
|
+
// Other endpoints retain the best-effort peek behavior only while the
|
|
151
|
+
// original body is still readable.
|
|
152
|
+
if (bufferedBody !== undefined) {
|
|
153
|
+
// Retry with safe metadata: statusText can itself make Response
|
|
154
|
+
// construction throw after the original stream has already been drained.
|
|
155
|
+
return new Response(bufferedBody, {
|
|
156
|
+
status: response.status,
|
|
157
|
+
headers: response.headers,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
145
160
|
if (options.throwOnBodyReadError)
|
|
146
161
|
throw err;
|
|
147
162
|
return response;
|