@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.
Files changed (48) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/assets/scaffold/core/scripts/hq-dm-bind.sh +1 -1
  3. package/assets/scaffold/core/scripts/hq-job-run.sh +8 -8
  4. package/assets/scaffold/core/scripts/ontology-audience-grant.sh +1 -1
  5. package/assets/scaffold/core/scripts/ontology-candidate.sh +1 -1
  6. package/assets/scaffold/core/scripts/resolve-company.sh +1 -1
  7. package/dist/command-catalog.generated.d.ts +3699 -3
  8. package/dist/command-catalog.generated.js +5462 -1759
  9. package/dist/command-help.d.ts +2 -0
  10. package/dist/command-help.js +13 -0
  11. package/dist/commands/install-global.d.ts +21 -0
  12. package/dist/commands/install-global.js +267 -32
  13. package/dist/commands/mcp-serve.js +1 -1
  14. package/dist/commands/mcp-status.js +58 -1
  15. package/dist/commands/pack-install.d.ts +3 -1
  16. package/dist/commands/pack-install.js +17 -4
  17. package/dist/commands/packs.js +17 -0
  18. package/dist/commands/pkg-install.js +13 -1
  19. package/dist/fast-scaffold.d.ts +2 -0
  20. package/dist/fast-scaffold.js +16 -0
  21. package/dist/index.js +19 -2
  22. package/dist/lazy-commands.d.ts +1 -0
  23. package/dist/lazy-commands.js +64 -4
  24. package/dist/lib/cli-flag-keys.d.ts +3 -0
  25. package/dist/lib/cli-flag-keys.js +3 -0
  26. package/dist/lib/daemon/ops/mcp.js +11 -10
  27. package/dist/lib/daemon/ops/policy.d.ts +3 -2
  28. package/dist/lib/daemon/ops/policy.js +12 -6
  29. package/dist/lib/daemon/server.d.ts +3 -1
  30. package/dist/lib/daemon/server.js +63 -7
  31. package/dist/lib/doctor/checks/anywhere.js +58 -4
  32. package/dist/lib/install/chatgpt-targets.d.ts +8 -0
  33. package/dist/lib/install/chatgpt-targets.js +15 -0
  34. package/dist/lib/install/codex-pack-contributions.d.ts +8 -0
  35. package/dist/lib/install/codex-pack-contributions.js +205 -0
  36. package/dist/lib/install/codex-targets.d.ts +1 -1
  37. package/dist/lib/install/codex-targets.js +2 -1
  38. package/dist/lib/install/grok-targets.d.ts +8 -0
  39. package/dist/lib/install/grok-targets.js +15 -0
  40. package/dist/lib/lanes/keep-alive-audit.d.ts +3 -2
  41. package/dist/lib/lanes/keep-alive-audit.js +36 -8
  42. package/dist/main.d.ts +2 -6
  43. package/dist/main.js +3 -41
  44. package/dist/node-network-compat-fast.js +4 -0
  45. package/dist/stream-error-boundary.d.ts +7 -0
  46. package/dist/stream-error-boundary.js +33 -0
  47. package/dist/utils/vault-api.js +16 -1
  48. package/package.json +1 -1
@@ -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 pre-existing best-effort peek behavior.
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigoai-us/hq-cli",
3
- "version": "5.327.0",
3
+ "version": "5.329.0",
4
4
  "description": "HQ by Indigo management CLI — modules and cloud sync",
5
5
  "main": "dist/index.js",
6
6
  "bin": {