nexus-agents 2.157.1 → 2.158.1

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 (124) hide show
  1. package/dist/{child-mcp-config-3YUKLM5F.js → child-mcp-config-ODAUXUWE.js} +2 -2
  2. package/dist/{chunk-PZDDA6IW.js → chunk-2O63LDYB.js} +3 -3
  3. package/dist/{chunk-BM26VPV5.js → chunk-42ZSRIEX.js} +2 -2
  4. package/dist/{chunk-5ULXLPVP.js → chunk-4IXC6V6O.js} +2 -2
  5. package/dist/{chunk-JZ4PCEEN.js → chunk-55ZDYUBT.js} +2 -2
  6. package/dist/{chunk-RHUKGSH7.js → chunk-5CMDYYNC.js} +7 -7
  7. package/dist/{chunk-YZQXCCEA.js → chunk-6B5VQ2SY.js} +5 -5
  8. package/dist/{chunk-5FH7QZIT.js → chunk-6MCSD37T.js} +2 -2
  9. package/dist/{chunk-NELFMLLR.js → chunk-7J3AAPH5.js} +2 -2
  10. package/dist/{chunk-EJ3MAR5M.js → chunk-CSHFTQA7.js} +3 -3
  11. package/dist/{chunk-6ZKQRTTQ.js → chunk-CTL5HUZZ.js} +10 -7
  12. package/dist/chunk-CTL5HUZZ.js.map +1 -0
  13. package/dist/{chunk-IILTUCFB.js → chunk-DSUFV2ZN.js} +2 -2
  14. package/dist/{chunk-SCJ2EB6Z.js → chunk-FWW5GCEH.js} +2 -2
  15. package/dist/{chunk-7YOJXOFN.js → chunk-GG7MGRQ6.js} +4 -4
  16. package/dist/{chunk-VEINXCXS.js → chunk-HANP6FHM.js} +34 -34
  17. package/dist/{chunk-ENPYELJM.js → chunk-HHNBKTII.js} +9 -8
  18. package/dist/{chunk-ENPYELJM.js.map → chunk-HHNBKTII.js.map} +1 -1
  19. package/dist/{chunk-TNRTP5FW.js → chunk-I32MYAT5.js} +2 -2
  20. package/dist/{chunk-47WFM6QH.js → chunk-J2JP35S3.js} +4 -4
  21. package/dist/{chunk-LZ2LHYDO.js → chunk-K6HJLOPA.js} +3 -3
  22. package/dist/{chunk-HUN7CEAU.js → chunk-KS622JST.js} +3 -3
  23. package/dist/{chunk-BGAK4N74.js → chunk-LSWGHIJK.js} +7 -7
  24. package/dist/{chunk-XGUZ2OQK.js → chunk-OOGGQ2NA.js} +3 -3
  25. package/dist/{chunk-RCSDD2QY.js → chunk-Q4JNYY2Y.js} +4 -4
  26. package/dist/{chunk-RCSDD2QY.js.map → chunk-Q4JNYY2Y.js.map} +1 -1
  27. package/dist/{chunk-JWCD3JCB.js → chunk-Q7TALELN.js} +11 -10
  28. package/dist/{chunk-JWCD3JCB.js.map → chunk-Q7TALELN.js.map} +1 -1
  29. package/dist/{chunk-O7VPOR5A.js → chunk-R76LLKT2.js} +5 -5
  30. package/dist/{chunk-YGYJUPVX.js → chunk-RI3BFANI.js} +2 -2
  31. package/dist/{chunk-UAGYCCHY.js → chunk-S3H4VWN5.js} +2 -2
  32. package/dist/{chunk-M532SJS6.js → chunk-S7PFS6PX.js} +7 -7
  33. package/dist/{chunk-MYSS22Q2.js → chunk-U5KSLUZ6.js} +2 -2
  34. package/dist/{chunk-3NT6NAXD.js → chunk-UQOJ2KGW.js} +13 -12
  35. package/dist/chunk-UQOJ2KGW.js.map +1 -0
  36. package/dist/{chunk-TKCXD36G.js → chunk-VKVJSPHJ.js} +4 -4
  37. package/dist/{chunk-3S2OPUGU.js → chunk-XLJCXM7L.js} +2 -2
  38. package/dist/{chunk-HWG437YQ.js → chunk-YH5U3XCP.js} +2 -2
  39. package/dist/{chunk-AEPCCXMK.js → chunk-YMMX6ELC.js} +3 -3
  40. package/dist/{chunk-GYWYCCJC.js → chunk-YQRP5NST.js} +2 -2
  41. package/dist/{cli-circuit-breaker-Q43YSBCB.js → cli-circuit-breaker-MLVJXLK6.js} +4 -4
  42. package/dist/cli.d.ts +1 -1
  43. package/dist/cli.js +41 -41
  44. package/dist/{composite-router-5UHJFOB3.js → composite-router-FTECAR4U.js} +2 -2
  45. package/dist/{consensus-vote-ZYZMDGT5.js → consensus-vote-MMZTCPL7.js} +15 -15
  46. package/dist/{consensus-vote-types-BNBMB415.d.ts → consensus-vote-types-DB3SmULO.d.ts} +16 -10
  47. package/dist/{context-retriever-33SGXV33.js → context-retriever-MPZ7T4VA.js} +8 -8
  48. package/dist/{doctor-deep-RAN4HGOH.js → doctor-deep-KUB4HPCS.js} +3 -3
  49. package/dist/{expert-bridge-RJP57L75.js → expert-bridge-EK362QGQ.js} +4 -4
  50. package/dist/{factory-C5PY7R6O.js → factory-GOO7MH5G.js} +8 -8
  51. package/dist/{factory-YOUM5MCV.js → factory-XBUQP3UB.js} +5 -5
  52. package/dist/{improvement-review-H5BQ2JXK.js → improvement-review-XXRDVOJT.js} +5 -5
  53. package/dist/index.d.ts +2 -2
  54. package/dist/index.js +30 -30
  55. package/dist/{init-opencode-KHODCXA6.js → init-opencode-RNSCHZIW.js} +6 -6
  56. package/dist/{issue-triage-OP3FDRKY.js → issue-triage-7TWTN6LI.js} +6 -6
  57. package/dist/{pr-reviewer-helpers-UF42XZB6.js → pr-reviewer-helpers-VT4DR5BC.js} +4 -4
  58. package/dist/{registry-command-EZ7735GC.js → registry-command-QVBYBBWR.js} +2 -2
  59. package/dist/{repo-security-plan-D62HB5PK.js → repo-security-plan-VSQWMONM.js} +3 -3
  60. package/dist/{research-helpers-synthesize-KUA53BAD.js → research-helpers-synthesize-VCUOMHPD.js} +4 -4
  61. package/dist/{routing-memory-FE4EQUXO.js → routing-memory-PP4UJVH4.js} +2 -2
  62. package/dist/{session-memory-RA7KE6CX.js → session-memory-TVV2IOGB.js} +3 -3
  63. package/dist/{setup-command-AX3B46CE.js → setup-command-D5PU6XXA.js} +11 -11
  64. package/dist/{setup-config-SHG2DMZJ.js → setup-config-HZHL4QMD.js} +3 -3
  65. package/dist/{setup-custom-api-NVS4EPBG.js → setup-custom-api-H6FJ5VWL.js} +3 -3
  66. package/dist/{tool-memory-UQH2FTAS.js → tool-memory-YLCJZVMV.js} +5 -5
  67. package/dist/{unified-registry-MMQXU622.js → unified-registry-ZUPTC7OR.js} +9 -9
  68. package/dist/{weather-report-HRQCJEU5.js → weather-report-XPDW6LGI.js} +2 -2
  69. package/package.json +1 -1
  70. package/dist/chunk-3NT6NAXD.js.map +0 -1
  71. package/dist/chunk-6ZKQRTTQ.js.map +0 -1
  72. /package/dist/{child-mcp-config-3YUKLM5F.js.map → child-mcp-config-ODAUXUWE.js.map} +0 -0
  73. /package/dist/{chunk-PZDDA6IW.js.map → chunk-2O63LDYB.js.map} +0 -0
  74. /package/dist/{chunk-BM26VPV5.js.map → chunk-42ZSRIEX.js.map} +0 -0
  75. /package/dist/{chunk-5ULXLPVP.js.map → chunk-4IXC6V6O.js.map} +0 -0
  76. /package/dist/{chunk-JZ4PCEEN.js.map → chunk-55ZDYUBT.js.map} +0 -0
  77. /package/dist/{chunk-RHUKGSH7.js.map → chunk-5CMDYYNC.js.map} +0 -0
  78. /package/dist/{chunk-YZQXCCEA.js.map → chunk-6B5VQ2SY.js.map} +0 -0
  79. /package/dist/{chunk-5FH7QZIT.js.map → chunk-6MCSD37T.js.map} +0 -0
  80. /package/dist/{chunk-NELFMLLR.js.map → chunk-7J3AAPH5.js.map} +0 -0
  81. /package/dist/{chunk-EJ3MAR5M.js.map → chunk-CSHFTQA7.js.map} +0 -0
  82. /package/dist/{chunk-IILTUCFB.js.map → chunk-DSUFV2ZN.js.map} +0 -0
  83. /package/dist/{chunk-SCJ2EB6Z.js.map → chunk-FWW5GCEH.js.map} +0 -0
  84. /package/dist/{chunk-7YOJXOFN.js.map → chunk-GG7MGRQ6.js.map} +0 -0
  85. /package/dist/{chunk-VEINXCXS.js.map → chunk-HANP6FHM.js.map} +0 -0
  86. /package/dist/{chunk-TNRTP5FW.js.map → chunk-I32MYAT5.js.map} +0 -0
  87. /package/dist/{chunk-47WFM6QH.js.map → chunk-J2JP35S3.js.map} +0 -0
  88. /package/dist/{chunk-LZ2LHYDO.js.map → chunk-K6HJLOPA.js.map} +0 -0
  89. /package/dist/{chunk-HUN7CEAU.js.map → chunk-KS622JST.js.map} +0 -0
  90. /package/dist/{chunk-BGAK4N74.js.map → chunk-LSWGHIJK.js.map} +0 -0
  91. /package/dist/{chunk-XGUZ2OQK.js.map → chunk-OOGGQ2NA.js.map} +0 -0
  92. /package/dist/{chunk-O7VPOR5A.js.map → chunk-R76LLKT2.js.map} +0 -0
  93. /package/dist/{chunk-YGYJUPVX.js.map → chunk-RI3BFANI.js.map} +0 -0
  94. /package/dist/{chunk-UAGYCCHY.js.map → chunk-S3H4VWN5.js.map} +0 -0
  95. /package/dist/{chunk-M532SJS6.js.map → chunk-S7PFS6PX.js.map} +0 -0
  96. /package/dist/{chunk-MYSS22Q2.js.map → chunk-U5KSLUZ6.js.map} +0 -0
  97. /package/dist/{chunk-TKCXD36G.js.map → chunk-VKVJSPHJ.js.map} +0 -0
  98. /package/dist/{chunk-3S2OPUGU.js.map → chunk-XLJCXM7L.js.map} +0 -0
  99. /package/dist/{chunk-HWG437YQ.js.map → chunk-YH5U3XCP.js.map} +0 -0
  100. /package/dist/{chunk-AEPCCXMK.js.map → chunk-YMMX6ELC.js.map} +0 -0
  101. /package/dist/{chunk-GYWYCCJC.js.map → chunk-YQRP5NST.js.map} +0 -0
  102. /package/dist/{cli-circuit-breaker-Q43YSBCB.js.map → cli-circuit-breaker-MLVJXLK6.js.map} +0 -0
  103. /package/dist/{composite-router-5UHJFOB3.js.map → composite-router-FTECAR4U.js.map} +0 -0
  104. /package/dist/{consensus-vote-ZYZMDGT5.js.map → consensus-vote-MMZTCPL7.js.map} +0 -0
  105. /package/dist/{context-retriever-33SGXV33.js.map → context-retriever-MPZ7T4VA.js.map} +0 -0
  106. /package/dist/{doctor-deep-RAN4HGOH.js.map → doctor-deep-KUB4HPCS.js.map} +0 -0
  107. /package/dist/{expert-bridge-RJP57L75.js.map → expert-bridge-EK362QGQ.js.map} +0 -0
  108. /package/dist/{factory-C5PY7R6O.js.map → factory-GOO7MH5G.js.map} +0 -0
  109. /package/dist/{factory-YOUM5MCV.js.map → factory-XBUQP3UB.js.map} +0 -0
  110. /package/dist/{improvement-review-H5BQ2JXK.js.map → improvement-review-XXRDVOJT.js.map} +0 -0
  111. /package/dist/{init-opencode-KHODCXA6.js.map → init-opencode-RNSCHZIW.js.map} +0 -0
  112. /package/dist/{issue-triage-OP3FDRKY.js.map → issue-triage-7TWTN6LI.js.map} +0 -0
  113. /package/dist/{pr-reviewer-helpers-UF42XZB6.js.map → pr-reviewer-helpers-VT4DR5BC.js.map} +0 -0
  114. /package/dist/{registry-command-EZ7735GC.js.map → registry-command-QVBYBBWR.js.map} +0 -0
  115. /package/dist/{repo-security-plan-D62HB5PK.js.map → repo-security-plan-VSQWMONM.js.map} +0 -0
  116. /package/dist/{research-helpers-synthesize-KUA53BAD.js.map → research-helpers-synthesize-VCUOMHPD.js.map} +0 -0
  117. /package/dist/{routing-memory-FE4EQUXO.js.map → routing-memory-PP4UJVH4.js.map} +0 -0
  118. /package/dist/{session-memory-RA7KE6CX.js.map → session-memory-TVV2IOGB.js.map} +0 -0
  119. /package/dist/{setup-command-AX3B46CE.js.map → setup-command-D5PU6XXA.js.map} +0 -0
  120. /package/dist/{setup-config-SHG2DMZJ.js.map → setup-config-HZHL4QMD.js.map} +0 -0
  121. /package/dist/{setup-custom-api-NVS4EPBG.js.map → setup-custom-api-H6FJ5VWL.js.map} +0 -0
  122. /package/dist/{tool-memory-UQH2FTAS.js.map → tool-memory-YLCJZVMV.js.map} +0 -0
  123. /package/dist/{unified-registry-MMQXU622.js.map → unified-registry-ZUPTC7OR.js.map} +0 -0
  124. /package/dist/{weather-report-HRQCJEU5.js.map → weather-report-XPDW6LGI.js.map} +0 -0
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  resolveToken
3
- } from "./chunk-3S2OPUGU.js";
3
+ } from "./chunk-XLJCXM7L.js";
4
4
  import {
5
5
  REGISTRY_PATH,
6
6
  getProjectRoot,
7
7
  loadPapersRegistry,
8
8
  loadTechniquesRegistry,
9
9
  savePapersRegistry
10
- } from "./chunk-HWG437YQ.js";
10
+ } from "./chunk-YH5U3XCP.js";
11
11
  import {
12
12
  resolveInsideRoot
13
13
  } from "./chunk-NUBSJGQZ.js";
14
14
  import {
15
15
  getToolMemory
16
- } from "./chunk-7YOJXOFN.js";
16
+ } from "./chunk-GG7MGRQ6.js";
17
17
  import {
18
18
  capitalizeWords
19
19
  } from "./chunk-6T3EPABN.js";
@@ -27,7 +27,7 @@ import {
27
27
  getOutcomeStore,
28
28
  getTimeProvider,
29
29
  registerPersistentDistillerFactory
30
- } from "./chunk-RCSDD2QY.js";
30
+ } from "./chunk-Q4JNYY2Y.js";
31
31
  import {
32
32
  ensureLearningDir,
33
33
  getRulesFile
@@ -2686,4 +2686,4 @@ export {
2686
2686
  summarizeContextForPrompt,
2687
2687
  getContextPromptPrefix
2688
2688
  };
2689
- //# sourceMappingURL=chunk-O7VPOR5A.js.map
2689
+ //# sourceMappingURL=chunk-R76LLKT2.js.map
@@ -3,7 +3,7 @@ import {
3
3
  MODEL_IDS,
4
4
  getTimeProvider,
5
5
  resolveModelIdentitySync
6
- } from "./chunk-RCSDD2QY.js";
6
+ } from "./chunk-Q4JNYY2Y.js";
7
7
 
8
8
  // src/config/model-availability.ts
9
9
  var DEFAULT_TTL_MS = 6e4;
@@ -150,4 +150,4 @@ export {
150
150
  resetAvailabilityCache,
151
151
  filterAvailableModels
152
152
  };
153
- //# sourceMappingURL=chunk-YGYJUPVX.js.map
153
+ //# sourceMappingURL=chunk-RI3BFANI.js.map
@@ -2,7 +2,7 @@ import {
2
2
  CACHE_TIMEOUTS,
3
3
  createLogger,
4
4
  getTimeProvider
5
- } from "./chunk-RCSDD2QY.js";
5
+ } from "./chunk-Q4JNYY2Y.js";
6
6
 
7
7
  // src/security/trust-types.ts
8
8
  import { z } from "zod";
@@ -560,4 +560,4 @@ export {
560
560
  resolveReputationGatingMode,
561
561
  gateWithReputation
562
562
  };
563
- //# sourceMappingURL=chunk-UAGYCCHY.js.map
563
+ //# sourceMappingURL=chunk-S3H4VWN5.js.map
@@ -5,24 +5,24 @@ import {
5
5
  planOptionalParams,
6
6
  requireApiKey,
7
7
  validateApiKeyPresence
8
- } from "./chunk-JZ4PCEEN.js";
8
+ } from "./chunk-55ZDYUBT.js";
9
9
  import {
10
10
  CUSTOM_API_BASE_URL_ENV,
11
11
  CUSTOM_API_DEFAULT_MODEL,
12
12
  PROVIDER_ENV_KEYS,
13
13
  assertCustomApiHostResolvesPublic,
14
14
  validateCustomApiBaseUrl
15
- } from "./chunk-TNRTP5FW.js";
15
+ } from "./chunk-I32MYAT5.js";
16
16
  import {
17
17
  CliCircuitBreaker,
18
18
  DEFAULT_CIRCUIT_BREAKER_CONFIG
19
- } from "./chunk-GYWYCCJC.js";
19
+ } from "./chunk-YQRP5NST.js";
20
20
  import {
21
21
  getAvailabilityCache
22
- } from "./chunk-YGYJUPVX.js";
22
+ } from "./chunk-RI3BFANI.js";
23
23
  import {
24
24
  generateHyphenId
25
- } from "./chunk-MYSS22Q2.js";
25
+ } from "./chunk-U5KSLUZ6.js";
26
26
  import {
27
27
  CLI_SUBPROCESS_TIMEOUTS,
28
28
  CLI_TIMEOUTS,
@@ -58,7 +58,7 @@ import {
58
58
  loadModelsDevSnapshot,
59
59
  ok,
60
60
  resolveCliAlias
61
- } from "./chunk-RCSDD2QY.js";
61
+ } from "./chunk-Q4JNYY2Y.js";
62
62
 
63
63
  // src/cli-adapters/cli-to-model-adapter.ts
64
64
  var CliToModelAdapter = class {
@@ -4867,4 +4867,4 @@ export {
4867
4867
  SdkAdapter,
4868
4868
  createAutoAdapter
4869
4869
  };
4870
- //# sourceMappingURL=chunk-M532SJS6.js.map
4870
+ //# sourceMappingURL=chunk-S7PFS6PX.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getRandomProvider,
3
3
  getTimeProvider
4
- } from "./chunk-RCSDD2QY.js";
4
+ } from "./chunk-Q4JNYY2Y.js";
5
5
 
6
6
  // src/utils/id-utils.ts
7
7
  import { randomUUID } from "crypto";
@@ -24,4 +24,4 @@ export {
24
24
  generateHyphenId,
25
25
  generateUUID
26
26
  };
27
- //# sourceMappingURL=chunk-MYSS22Q2.js.map
27
+ //# sourceMappingURL=chunk-U5KSLUZ6.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
- lookupInTreeCapability
3
- } from "./chunk-RCSDD2QY.js";
2
+ getDefaultRegistry
3
+ } from "./chunk-Q4JNYY2Y.js";
4
4
  import {
5
5
  getNexusDataDir
6
6
  } from "./chunk-DHVMSIT5.js";
@@ -8,16 +8,17 @@ import {
8
8
  // src/learning/usage-log.ts
9
9
  import { appendFileSync, existsSync, mkdirSync, readFileSync, readdirSync } from "fs";
10
10
  import { dirname, join } from "path";
11
- function computeCostUSD(modelId, inputTokens, outputTokens) {
12
- const cap = lookupInTreeCapability(modelId);
13
- if (cap === void 0) return 0;
14
- const inputPer1M = cap.pricing?.inputPer1M ?? 0;
15
- const outputPer1M = cap.pricing?.outputPer1M ?? 0;
11
+ function computeCostDetail(modelId, inputTokens, outputTokens) {
12
+ const entry = getDefaultRegistry().getEntry(modelId);
13
+ const resolvedId = entry.resolvedFrom ?? modelId;
14
+ const provenance = entry.matchedVia !== void 0 ? { matchedVia: entry.matchedVia } : {};
15
+ if (entry.pricing === void 0) {
16
+ return { costUsd: 0, priced: false, resolvedId, ...provenance };
17
+ }
16
18
  const microUsd = Math.round(
17
- inputTokens * inputPer1M + outputTokens * outputPer1M
18
- // micro-USD per million scaled
19
+ inputTokens * entry.pricing.inputPer1M + outputTokens * entry.pricing.outputPer1M
19
20
  );
20
- return microUsd / 1e6;
21
+ return { costUsd: microUsd / 1e6, priced: true, resolvedId, ...provenance };
21
22
  }
22
23
  function getUsageLogPath(date = /* @__PURE__ */ new Date()) {
23
24
  const year = date.getUTCFullYear();
@@ -118,9 +119,9 @@ function rollupByModel(events) {
118
119
  }
119
120
 
120
121
  export {
121
- computeCostUSD,
122
+ computeCostDetail,
122
123
  recordUsageEvent,
123
124
  loadUsageEvents,
124
125
  rollupByModel
125
126
  };
126
- //# sourceMappingURL=chunk-3NT6NAXD.js.map
127
+ //# sourceMappingURL=chunk-UQOJ2KGW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/learning/usage-log.ts"],"sourcesContent":["/**\n * usage-log — append-only per-call usage events with cost.\n *\n * Source: Issue #2469 (epic #2467 child).\n *\n * For operators running against metered API gateways, per-call cost +\n * tokens + latency is the data they need to manage spend. This module\n * provides three things:\n *\n * 1. `recordUsageEvent(event)` — append a per-call record to a JSONL\n * log under <NEXUS_DATA_DIR>/usage/usage-YYYY-MM.jsonl.\n * 2. `loadUsageEvents({...})` — read events for a window, filtered\n * by model / category.\n * 3. `computeCostDetail(modelId, inputTokens, outputTokens)` (and its\n * thin wrapper `computeCostUSD`) — compute cost from the FULL model\n * registry pricing chain (manifest > in-tree > models.dev > generated\n * LiteLLM catalog), including the #4164 normalized/identity resolution\n * tier for decorated gateway model ids. A model with no pricing\n * anywhere in the chain is reported as `priced: false` so consumers\n * can treat the missing cost as UNMEASURED (#3855), never a real $0.\n *\n * The `usage` CLI command (cli/usage-command.ts) consumes this for the\n * operator dashboard. Existing OutcomeStore is intentionally untouched\n * — its schema is for routing/learning signals, not billing.\n */\n\nimport { appendFileSync, existsSync, mkdirSync, readFileSync, readdirSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\n\nimport { getNexusDataDir } from '../config/nexus-data-dir.js';\n// NOTE: only the FUNCTION is imported here — `getDefaultRegistry()` must never\n// be CALLED at module scope (#3185 bootstrap hazard: first construction reads\n// the manifest overlay/snapshot from disk). All calls happen at invocation\n// time inside computeCostDetail.\nimport { getDefaultRegistry, type MatchedVia } from '../config/model-registry.js';\n\nexport interface UsageEvent {\n /** ISO 8601 timestamp of the call. */\n readonly timestamp: string;\n /** Model identifier (e.g., 'claude-sonnet-4', 'gpt-4o'). */\n readonly modelId: string;\n /** Provider/adapter (e.g., 'anthropic', 'openai', 'openai-compat'). */\n readonly providerId: string;\n /** Token counts. */\n readonly inputTokens: number;\n readonly outputTokens: number;\n /**\n * Cost in USD. Computed at write time from the full model-registry pricing\n * chain (see `computeCostDetail`). 0 with `priced: false` means the model\n * was UNPRICED (cost unknown), not a real $0 — check `priced` before\n * treating this as a measured figure.\n */\n readonly usdCost: number;\n /** Wall-clock latency in milliseconds. */\n readonly latencyMs: number;\n /** Whether the call succeeded. */\n readonly success: boolean;\n /**\n * Optional task category — populated when the call was made on behalf of\n * a routed task (so aggregation can roll up by category).\n */\n readonly category?: string;\n /** Optional failure code when success === false. */\n readonly errorCode?: string;\n /**\n * Whether pricing data existed for the model at write time (#4165), so\n * audit can distinguish a real $0 from an unpriced model. Absent on lines\n * written before this field existed.\n */\n readonly priced?: boolean;\n /**\n * Pricing provenance: the canonical registry id whose pricing was applied\n * (the entry's `resolvedFrom` when the #4164 fuzzy tier matched a decorated\n * id, else the caller's model id). Present only when `priced` is true.\n */\n readonly priceSource?: string;\n}\n\n/** Result of a pricing-aware cost computation (#4165). */\nexport interface CostDetail {\n /** Cost in USD. Always 0 when `priced` is false — an unknown, not a $0. */\n readonly costUsd: number;\n /** Whether the resolved registry entry carried pricing data. */\n readonly priced: boolean;\n /**\n * Canonical id the pricing/metadata came from: the entry's `resolvedFrom`\n * when the #4164 fuzzy tier matched a decorated id, else the caller's id.\n */\n readonly resolvedId: string;\n /** Fuzzy-resolution provenance (#4164), passed through from the entry. */\n readonly matchedVia?: MatchedVia;\n}\n\n/**\n * Compute cost in USD given a model and token counts, with pricing\n * provenance. Reads the FULL registry chain via\n * `getDefaultRegistry().getEntry()` — manifest > in-tree > models.dev >\n * generated LiteLLM catalog, plus the #4164 normalized/identity tier that\n * resolves decorated model names from OpenAI-compatible gateways to their\n * canonical entry's pricing.\n *\n * `priced: false` (with `costUsd: 0`) means NO pricing existed anywhere in\n * the chain — consumers must treat the cost as UNMEASURED (#3855), never a\n * real $0. Operators can add pricing for gateway-only models via the\n * models-manifest overlay.\n */\nexport function computeCostDetail(\n modelId: string,\n inputTokens: number,\n outputTokens: number\n): CostDetail {\n // Registry read happens at INVOCATION time, never module load — first\n // construction touches the filesystem (#3185 bootstrap hazard).\n const entry = getDefaultRegistry().getEntry(modelId);\n const resolvedId = entry.resolvedFrom ?? modelId;\n const provenance = entry.matchedVia !== undefined ? { matchedVia: entry.matchedVia } : {};\n if (entry.pricing === undefined) {\n return { costUsd: 0, priced: false, resolvedId, ...provenance };\n }\n // Multiply token counts by per-million rate then divide. Use Math.round\n // at micro-USD precision so JSONL files don't drift to floating-point\n // noise on small calls.\n const microUsd = Math.round(\n inputTokens * entry.pricing.inputPer1M + outputTokens * entry.pricing.outputPer1M\n );\n return { costUsd: microUsd / 1_000_000, priced: true, resolvedId, ...provenance };\n}\n\n/**\n * Thin wrapper over {@link computeCostDetail} returning only the USD figure.\n * Returns 0 both for a genuinely free model and for a model with no pricing\n * data — callers that must tell those apart (unpriced ⇒ UNMEASURED, #3855)\n * should use `computeCostDetail` and check `priced`.\n */\nexport function computeCostUSD(modelId: string, inputTokens: number, outputTokens: number): number {\n return computeCostDetail(modelId, inputTokens, outputTokens).costUsd;\n}\n\n/** Resolve the active usage log path for the current month. */\nexport function getUsageLogPath(date: Date = new Date()): string {\n const year = date.getUTCFullYear();\n const month = String(date.getUTCMonth() + 1).padStart(2, '0');\n return join(getNexusDataDir(), 'usage', `usage-${String(year)}-${month}.jsonl`);\n}\n\n/**\n * Append a usage event to the current month's log. Best-effort — failures\n * are silent (we don't want to fail a successful model call because we\n * couldn't write a log line).\n */\nexport function recordUsageEvent(event: UsageEvent): void {\n try {\n const path = getUsageLogPath(new Date(event.timestamp));\n mkdirSync(dirname(path), { recursive: true });\n appendFileSync(path, `${JSON.stringify(event)}\\n`, 'utf-8');\n } catch {\n // Intentionally silent — telemetry must not break user calls.\n }\n}\n\nexport interface LoadUsageOptions {\n /** Restrict to events at or after this ISO timestamp. */\n readonly sinceIso?: string;\n /** Restrict to events before this ISO timestamp. */\n readonly untilIso?: string;\n /** Only events for this model. */\n readonly modelId?: string;\n /** Only events for this category. */\n readonly category?: string;\n}\n\nfunction listUsageFiles(dir: string): readonly string[] {\n if (!existsSync(dir)) return [];\n try {\n return readdirSync(dir).filter((f) => f.startsWith('usage-') && f.endsWith('.jsonl'));\n } catch {\n return [];\n }\n}\n\ninterface LoadFilter {\n readonly sinceMs: number;\n readonly untilMs: number;\n readonly modelId: string | undefined;\n readonly category: string | undefined;\n}\n\nfunction eventMatches(parsed: UsageEvent, f: LoadFilter): boolean {\n const ts = Date.parse(parsed.timestamp);\n if (ts < f.sinceMs || ts >= f.untilMs) return false;\n if (f.modelId !== undefined && parsed.modelId !== f.modelId) return false;\n if (f.category !== undefined && parsed.category !== f.category) return false;\n return true;\n}\n\nfunction parseFileLines(filePath: string, filter: LoadFilter): readonly UsageEvent[] {\n let content: string;\n try {\n content = readFileSync(filePath, 'utf-8');\n } catch {\n return [];\n }\n const out: UsageEvent[] = [];\n for (const line of content.split('\\n')) {\n if (line.trim() === '') continue;\n try {\n const parsed = JSON.parse(line) as UsageEvent;\n if (eventMatches(parsed, filter)) out.push(parsed);\n } catch {\n // Skip malformed line; keep reading.\n continue;\n }\n }\n return out;\n}\n\n/**\n * Load all usage events from disk that match the filter. Reads every\n * monthly log file under the data dir; for sub-second filtering at scale\n * a future PR can index by month, but linear scan is fine at the\n * \"operator dashboard\" scale this command targets.\n */\nexport function loadUsageEvents(opts: LoadUsageOptions = {}): readonly UsageEvent[] {\n const dir = join(getNexusDataDir(), 'usage');\n const files = listUsageFiles(dir);\n if (files.length === 0) return [];\n const filter: LoadFilter = {\n sinceMs: opts.sinceIso !== undefined ? Date.parse(opts.sinceIso) : Number.NEGATIVE_INFINITY,\n untilMs: opts.untilIso !== undefined ? Date.parse(opts.untilIso) : Number.POSITIVE_INFINITY,\n modelId: opts.modelId,\n category: opts.category,\n };\n const events: UsageEvent[] = [];\n for (const f of files) {\n events.push(...parseFileLines(join(dir, f), filter));\n }\n return events;\n}\n\nexport interface ModelRollup {\n readonly modelId: string;\n readonly providerId: string;\n readonly callCount: number;\n readonly successCount: number;\n readonly successRate: number;\n readonly totalInputTokens: number;\n readonly totalOutputTokens: number;\n readonly totalUsdCost: number;\n readonly avgLatencyMs: number;\n readonly costPerSuccessUsd: number;\n}\n\n/**\n * Aggregate events into per-model rollups. Sorted by total cost descending\n * — the model burning the most money at top. Useful for \"where is my spend\n * going?\" investigations.\n */\nexport function rollupByModel(events: readonly UsageEvent[]): readonly ModelRollup[] {\n const groups = new Map<string, UsageEvent[]>();\n for (const e of events) {\n const arr = groups.get(e.modelId);\n if (arr === undefined) groups.set(e.modelId, [e]);\n else arr.push(e);\n }\n const rollups: ModelRollup[] = [];\n for (const [modelId, group] of groups) {\n const callCount = group.length;\n const successCount = group.filter((e) => e.success).length;\n const totalInputTokens = group.reduce((s, e) => s + e.inputTokens, 0);\n const totalOutputTokens = group.reduce((s, e) => s + e.outputTokens, 0);\n const totalUsdCost = group.reduce((s, e) => s + e.usdCost, 0);\n const totalLatency = group.reduce((s, e) => s + e.latencyMs, 0);\n const successRate = callCount === 0 ? 0 : successCount / callCount;\n const avgLatencyMs = callCount === 0 ? 0 : totalLatency / callCount;\n const costPerSuccessUsd = successCount === 0 ? totalUsdCost : totalUsdCost / successCount;\n rollups.push({\n modelId,\n providerId: group[0]?.providerId ?? 'unknown',\n callCount,\n successCount,\n successRate,\n totalInputTokens,\n totalOutputTokens,\n totalUsdCost,\n avgLatencyMs,\n costPerSuccessUsd,\n });\n }\n return rollups.sort((a, b) => b.totalUsdCost - a.totalUsdCost);\n}\n"],"mappings":"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","names":[]}
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createAutoAdapter
3
- } from "./chunk-M532SJS6.js";
3
+ } from "./chunk-S7PFS6PX.js";
4
4
  import {
5
5
  mapModelErrorToCategory
6
- } from "./chunk-GYWYCCJC.js";
6
+ } from "./chunk-YQRP5NST.js";
7
7
  import {
8
8
  CLI_NAMES,
9
9
  CircularBuffer,
@@ -24,7 +24,7 @@ import {
24
24
  ok,
25
25
  recordRateLimitEvent,
26
26
  toRateLimitError
27
- } from "./chunk-RCSDD2QY.js";
27
+ } from "./chunk-Q4JNYY2Y.js";
28
28
 
29
29
  // src/agents/collaboration/event-bus-helpers.ts
30
30
  import { randomUUID } from "crypto";
@@ -1041,4 +1041,4 @@ export {
1041
1041
  getGlobalRegistry,
1042
1042
  resetGlobalRegistry
1043
1043
  };
1044
- //# sourceMappingURL=chunk-TKCXD36G.js.map
1044
+ //# sourceMappingURL=chunk-VKVJSPHJ.js.map
@@ -2,7 +2,7 @@ import {
2
2
  createLogger,
3
3
  err,
4
4
  ok
5
- } from "./chunk-RCSDD2QY.js";
5
+ } from "./chunk-Q4JNYY2Y.js";
6
6
 
7
7
  // src/scm/token-resolver.ts
8
8
  import { execFile } from "child_process";
@@ -87,4 +87,4 @@ export {
87
87
  hasToken,
88
88
  getTokenEnvVars
89
89
  };
90
- //# sourceMappingURL=chunk-3S2OPUGU.js.map
90
+ //# sourceMappingURL=chunk-XLJCXM7L.js.map
@@ -8,7 +8,7 @@ import {
8
8
  getErrorMessage,
9
9
  ok,
10
10
  parseBoolEnv
11
- } from "./chunk-RCSDD2QY.js";
11
+ } from "./chunk-Q4JNYY2Y.js";
12
12
 
13
13
  // src/cli/research-helpers-io.ts
14
14
  import * as fs2 from "fs/promises";
@@ -146,4 +146,4 @@ export {
146
146
  loadPapersRegistry,
147
147
  savePapersRegistry
148
148
  };
149
- //# sourceMappingURL=chunk-HWG437YQ.js.map
149
+ //# sourceMappingURL=chunk-YH5U3XCP.js.map
@@ -2,14 +2,14 @@ import {
2
2
  CircuitBreakerRegistry,
3
3
  CircuitError,
4
4
  mapCliErrorToCategory
5
- } from "./chunk-GYWYCCJC.js";
5
+ } from "./chunk-YQRP5NST.js";
6
6
  import {
7
7
  createLogger,
8
8
  err,
9
9
  getFallbackChainForCategory,
10
10
  getTimeProvider,
11
11
  ok
12
- } from "./chunk-RCSDD2QY.js";
12
+ } from "./chunk-Q4JNYY2Y.js";
13
13
 
14
14
  // src/cli-adapters/cli-circuit-breaker.ts
15
15
  var CATEGORY_TO_FALLBACK = {
@@ -152,4 +152,4 @@ export {
152
152
  CliCircuitBreakerIntegration,
153
153
  createCliCircuitBreakerIntegration
154
154
  };
155
- //# sourceMappingURL=chunk-AEPCCXMK.js.map
155
+ //# sourceMappingURL=chunk-YMMX6ELC.js.map
@@ -5,7 +5,7 @@ import {
5
5
  getErrorMessage,
6
6
  getTimeProvider,
7
7
  ok
8
- } from "./chunk-RCSDD2QY.js";
8
+ } from "./chunk-Q4JNYY2Y.js";
9
9
 
10
10
  // src/cli-adapters/circuit-breaker-types.ts
11
11
  var CircuitErrorCode = {
@@ -375,4 +375,4 @@ export {
375
375
  mapCliErrorToCategory,
376
376
  mapModelErrorToCategory
377
377
  };
378
- //# sourceMappingURL=chunk-GYWYCCJC.js.map
378
+ //# sourceMappingURL=chunk-YQRP5NST.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  CliCircuitBreakerIntegration,
3
3
  createCliCircuitBreakerIntegration
4
- } from "./chunk-AEPCCXMK.js";
5
- import "./chunk-GYWYCCJC.js";
6
- import "./chunk-RCSDD2QY.js";
4
+ } from "./chunk-YMMX6ELC.js";
5
+ import "./chunk-YQRP5NST.js";
6
+ import "./chunk-Q4JNYY2Y.js";
7
7
  import "./chunk-NL7SZQPW.js";
8
8
  import "./chunk-DHVMSIT5.js";
9
9
  import "./chunk-ZPWHCABL.js";
@@ -11,4 +11,4 @@ export {
11
11
  CliCircuitBreakerIntegration,
12
12
  createCliCircuitBreakerIntegration
13
13
  };
14
- //# sourceMappingURL=cli-circuit-breaker-Q43YSBCB.js.map
14
+ //# sourceMappingURL=cli-circuit-breaker-MLVJXLK6.js.map
package/dist/cli.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { C as CliNameLiteral, K as VoteThreshold, E as ErrorPolicy, N as NoQuorumPolicy } from './consensus-vote-types-BNBMB415.js';
2
+ import { C as CliNameLiteral, K as VoteThreshold, E as ErrorPolicy, N as NoQuorumPolicy } from './consensus-vote-types-DB3SmULO.js';
3
3
  import 'zod';
4
4
 
5
5
  /**
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  buildOpenAICompatAdapters,
4
4
  readOpenAICompatEnv
5
- } from "./chunk-6ZKQRTTQ.js";
5
+ } from "./chunk-CTL5HUZZ.js";
6
6
  import {
7
7
  calculateConsensus,
8
8
  countByCategory,
@@ -17,13 +17,13 @@ import {
17
17
  generateSummary,
18
18
  parseFindings,
19
19
  sumFindings
20
- } from "./chunk-HUN7CEAU.js";
21
- import "./chunk-SCJ2EB6Z.js";
20
+ } from "./chunk-KS622JST.js";
21
+ import "./chunk-FWW5GCEH.js";
22
22
  import {
23
23
  setupCommandAsync,
24
24
  verifyCommand
25
- } from "./chunk-ENPYELJM.js";
26
- import "./chunk-5ULXLPVP.js";
25
+ } from "./chunk-HHNBKTII.js";
26
+ import "./chunk-4IXC6V6O.js";
27
27
  import {
28
28
  AuthHandler,
29
29
  DEFAULT_EXPERTS,
@@ -142,9 +142,9 @@ import {
142
142
  validateCommand,
143
143
  validateWorkflow,
144
144
  wrapInMarkdownFence
145
- } from "./chunk-VEINXCXS.js";
146
- import "./chunk-EJ3MAR5M.js";
147
- import "./chunk-5FH7QZIT.js";
145
+ } from "./chunk-HANP6FHM.js";
146
+ import "./chunk-CSHFTQA7.js";
147
+ import "./chunk-6MCSD37T.js";
148
148
  import "./chunk-HFOQKCD2.js";
149
149
  import "./chunk-3ACDP4E6.js";
150
150
  import {
@@ -170,11 +170,11 @@ import {
170
170
  loadConfig,
171
171
  runDoctor,
172
172
  validateNexusEnv
173
- } from "./chunk-RHUKGSH7.js";
174
- import "./chunk-AEPCCXMK.js";
173
+ } from "./chunk-5CMDYYNC.js";
174
+ import "./chunk-YMMX6ELC.js";
175
175
  import {
176
176
  shutdownExpertBridge
177
- } from "./chunk-BGAK4N74.js";
177
+ } from "./chunk-LSWGHIJK.js";
178
178
  import {
179
179
  ConsensusVoteInputSchema,
180
180
  DEFAULT_VOTE_TIMEOUT_MS,
@@ -184,25 +184,25 @@ import {
184
184
  executeVoting,
185
185
  mapOutcomeToDecision,
186
186
  registerConsensusVoteTool
187
- } from "./chunk-JWCD3JCB.js";
187
+ } from "./chunk-Q7TALELN.js";
188
188
  import {
189
189
  loadUsageEvents,
190
190
  rollupByModel
191
- } from "./chunk-3NT6NAXD.js";
191
+ } from "./chunk-UQOJ2KGW.js";
192
192
  import {
193
193
  synthesizeResearch
194
- } from "./chunk-XGUZ2OQK.js";
194
+ } from "./chunk-OOGGQ2NA.js";
195
195
  import {
196
196
  classifyTrust,
197
197
  createFullGitHubProvider,
198
198
  evaluatePolicy,
199
199
  parsePRUrl
200
- } from "./chunk-YZQXCCEA.js";
201
- import "./chunk-NELFMLLR.js";
200
+ } from "./chunk-6B5VQ2SY.js";
201
+ import "./chunk-7J3AAPH5.js";
202
202
  import {
203
203
  ReputationCache,
204
204
  sanitizeInput
205
- } from "./chunk-UAGYCCHY.js";
205
+ } from "./chunk-S3H4VWN5.js";
206
206
  import {
207
207
  ImprovementReviewInputSchema,
208
208
  calculateFitnessScore,
@@ -216,11 +216,11 @@ import {
216
216
  registerImprovementReviewTool,
217
217
  runImprovementReview,
218
218
  scanForSecrets
219
- } from "./chunk-LZ2LHYDO.js";
219
+ } from "./chunk-K6HJLOPA.js";
220
220
  import {
221
221
  createDefaultPolicyFirewall
222
- } from "./chunk-PZDDA6IW.js";
223
- import "./chunk-BM26VPV5.js";
222
+ } from "./chunk-2O63LDYB.js";
223
+ import "./chunk-42ZSRIEX.js";
224
224
  import {
225
225
  PaperStatusSchema,
226
226
  createResearchIssue,
@@ -243,32 +243,32 @@ import {
243
243
  loadSourcesRegistry,
244
244
  rankDiscoveredItems,
245
245
  saveSourcesRegistry
246
- } from "./chunk-O7VPOR5A.js";
246
+ } from "./chunk-R76LLKT2.js";
247
247
  import {
248
248
  resolveToken
249
- } from "./chunk-3S2OPUGU.js";
249
+ } from "./chunk-XLJCXM7L.js";
250
250
  import {
251
251
  loadPapersRegistry,
252
252
  loadTechniquesRegistry,
253
253
  savePapersRegistry
254
- } from "./chunk-HWG437YQ.js";
254
+ } from "./chunk-YH5U3XCP.js";
255
255
  import "./chunk-NUBSJGQZ.js";
256
256
  import {
257
257
  MemoryError,
258
258
  shutdownToolMemory
259
- } from "./chunk-7YOJXOFN.js";
259
+ } from "./chunk-GG7MGRQ6.js";
260
260
  import {
261
261
  capitalize,
262
262
  capitalizeKebab,
263
263
  truncateSentence
264
264
  } from "./chunk-6T3EPABN.js";
265
- import "./chunk-IILTUCFB.js";
265
+ import "./chunk-DSUFV2ZN.js";
266
266
  import "./chunk-ZM4O442V.js";
267
267
  import "./chunk-PINS44XA.js";
268
268
  import "./chunk-KSQSWEFH.js";
269
269
  import {
270
270
  createUnifiedRegistry
271
- } from "./chunk-TKCXD36G.js";
271
+ } from "./chunk-VKVJSPHJ.js";
272
272
  import {
273
273
  NEXUS_SUBPROCESS_DEPTH_ENV,
274
274
  createAllAdapters,
@@ -276,14 +276,14 @@ import {
276
276
  isRecord,
277
277
  probeAllClis,
278
278
  readSubprocessDepth
279
- } from "./chunk-M532SJS6.js";
280
- import "./chunk-JZ4PCEEN.js";
279
+ } from "./chunk-S7PFS6PX.js";
280
+ import "./chunk-55ZDYUBT.js";
281
281
  import {
282
282
  DEFAULTS
283
- } from "./chunk-TNRTP5FW.js";
284
- import "./chunk-GYWYCCJC.js";
285
- import "./chunk-YGYJUPVX.js";
286
- import "./chunk-MYSS22Q2.js";
283
+ } from "./chunk-I32MYAT5.js";
284
+ import "./chunk-YQRP5NST.js";
285
+ import "./chunk-RI3BFANI.js";
286
+ import "./chunk-U5KSLUZ6.js";
287
287
  import {
288
288
  API_TIMEOUTS,
289
289
  AgentCapability,
@@ -357,7 +357,7 @@ import {
357
357
  validateTimeout,
358
358
  writeEmptyLine,
359
359
  writeLine
360
- } from "./chunk-RCSDD2QY.js";
360
+ } from "./chunk-Q4JNYY2Y.js";
361
361
  import "./chunk-NL7SZQPW.js";
362
362
  import {
363
363
  applyPortableMode,
@@ -4035,7 +4035,7 @@ ${file.patch}
4035
4035
  violations: policyResult.violations
4036
4036
  });
4037
4037
  }
4038
- const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-UF42XZB6.js");
4038
+ const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-VT4DR5BC.js");
4039
4039
  const body = formatReviewComment2(result);
4040
4040
  const postResult = await provider.createReview(pr.prNumber, body, result.decision);
4041
4041
  if (!postResult.ok) {
@@ -17859,7 +17859,7 @@ function startImprovementReviewScheduler(options) {
17859
17859
  let running = false;
17860
17860
  const runOnce = async () => {
17861
17861
  try {
17862
- const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-H5BQ2JXK.js");
17862
+ const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-XXRDVOJT.js");
17863
17863
  const input = ImprovementReviewInputSchema2.parse({ fileIssues });
17864
17864
  const result = await runImprovementReview2(input, { logger: logger19 });
17865
17865
  logger19.info("Scheduled improvement_review complete", {
@@ -19898,7 +19898,7 @@ function adaptConfigToLibrary(config) {
19898
19898
  }
19899
19899
  function createBeliefPromoter() {
19900
19900
  return async (event) => {
19901
- const { getToolMemory } = await import("./tool-memory-UQH2FTAS.js");
19901
+ const { getToolMemory } = await import("./tool-memory-YLCJZVMV.js");
19902
19902
  const tm = getToolMemory();
19903
19903
  await tm.recordBelief(
19904
19904
  `skill:${event.name}`,
@@ -21010,7 +21010,7 @@ async function handleResearchCommand(args) {
21010
21010
  }
21011
21011
  }
21012
21012
  async function handleRegistryCommand(args) {
21013
- const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-EZ7735GC.js");
21013
+ const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-QVBYBBWR.js");
21014
21014
  const subcommand = args.subcommand;
21015
21015
  if (!isValidRegistrySubcommand(subcommand)) {
21016
21016
  process.stdout.write(`${formatRegistryUsage()}
@@ -21058,7 +21058,7 @@ async function handleVerifyCommand(args) {
21058
21058
  async function handleDoctorCommand(args) {
21059
21059
  const exitCode = await doctorCommand({ fix: args.options.fix });
21060
21060
  if (args.options.deep) {
21061
- const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-RAN4HGOH.js");
21061
+ const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-KUB4HPCS.js");
21062
21062
  const diag = runDeepDiagnostics2();
21063
21063
  process.stdout.write(formatDeepDiagnostics2(diag) + "\n");
21064
21064
  }
@@ -21108,7 +21108,7 @@ async function runInitPortableFlow(args) {
21108
21108
  return cliExit(result.success ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
21109
21109
  }
21110
21110
  async function runInitOpencodeFlow(args) {
21111
- const { runInitOpencode } = await import("./init-opencode-KHODCXA6.js");
21111
+ const { runInitOpencode } = await import("./init-opencode-RNSCHZIW.js");
21112
21112
  const opencodePath = args.options.opencode;
21113
21113
  if (opencodePath === void 0 || opencodePath === "") {
21114
21114
  process.stderr.write("Error: --opencode requires a path argument.\n");
@@ -21134,7 +21134,7 @@ async function runInitOpencodeFlow(args) {
21134
21134
  return cliExit(EXIT_CODES.SUCCESS);
21135
21135
  }
21136
21136
  async function renderOpencodeValidate(opencodePath) {
21137
- const { runOpencodeValidate } = await import("./init-opencode-KHODCXA6.js");
21137
+ const { runOpencodeValidate } = await import("./init-opencode-RNSCHZIW.js");
21138
21138
  const result = await runOpencodeValidate(opencodePath);
21139
21139
  if (!result.ok) {
21140
21140
  process.stderr.write(`init --opencode --validate: ${result.reason ?? "failed"}
@@ -21173,7 +21173,7 @@ async function handleSetupCommandAsync(args) {
21173
21173
  return cliExitFromStatus(exitCode);
21174
21174
  }
21175
21175
  async function runCustomApiSetup(args) {
21176
- const { configureCustomApi } = await import("./setup-custom-api-NVS4EPBG.js");
21176
+ const { configureCustomApi } = await import("./setup-custom-api-H6FJ5VWL.js");
21177
21177
  const baseUrl = args.options.customApi;
21178
21178
  if (baseUrl === void 0) return EXIT_CODES.SERVER_START_FAILED;
21179
21179
  const input = {
@@ -4,7 +4,7 @@ import {
4
4
  CompositeRoutingError,
5
5
  DEFAULT_COMPOSITE_CONFIG,
6
6
  createCompositeRouter
7
- } from "./chunk-RCSDD2QY.js";
7
+ } from "./chunk-Q4JNYY2Y.js";
8
8
  import "./chunk-NL7SZQPW.js";
9
9
  import "./chunk-DHVMSIT5.js";
10
10
  import "./chunk-ZPWHCABL.js";
@@ -15,4 +15,4 @@ export {
15
15
  DEFAULT_COMPOSITE_CONFIG,
16
16
  createCompositeRouter
17
17
  };
18
- //# sourceMappingURL=composite-router-5UHJFOB3.js.map
18
+ //# sourceMappingURL=composite-router-FTECAR4U.js.map
@@ -8,23 +8,23 @@ import {
8
8
  registerConsensusVoteTool,
9
9
  resetCorrelationTracker,
10
10
  runConsensusForGoal
11
- } from "./chunk-JWCD3JCB.js";
12
- import "./chunk-3NT6NAXD.js";
13
- import "./chunk-PZDDA6IW.js";
14
- import "./chunk-BM26VPV5.js";
15
- import "./chunk-7YOJXOFN.js";
11
+ } from "./chunk-Q7TALELN.js";
12
+ import "./chunk-UQOJ2KGW.js";
13
+ import "./chunk-2O63LDYB.js";
14
+ import "./chunk-42ZSRIEX.js";
15
+ import "./chunk-GG7MGRQ6.js";
16
16
  import "./chunk-6T3EPABN.js";
17
- import "./chunk-IILTUCFB.js";
17
+ import "./chunk-DSUFV2ZN.js";
18
18
  import "./chunk-PINS44XA.js";
19
19
  import "./chunk-KSQSWEFH.js";
20
- import "./chunk-TKCXD36G.js";
21
- import "./chunk-M532SJS6.js";
22
- import "./chunk-JZ4PCEEN.js";
23
- import "./chunk-TNRTP5FW.js";
24
- import "./chunk-GYWYCCJC.js";
25
- import "./chunk-YGYJUPVX.js";
26
- import "./chunk-MYSS22Q2.js";
27
- import "./chunk-RCSDD2QY.js";
20
+ import "./chunk-VKVJSPHJ.js";
21
+ import "./chunk-S7PFS6PX.js";
22
+ import "./chunk-55ZDYUBT.js";
23
+ import "./chunk-I32MYAT5.js";
24
+ import "./chunk-YQRP5NST.js";
25
+ import "./chunk-RI3BFANI.js";
26
+ import "./chunk-U5KSLUZ6.js";
27
+ import "./chunk-Q4JNYY2Y.js";
28
28
  import "./chunk-NL7SZQPW.js";
29
29
  import "./chunk-DHVMSIT5.js";
30
30
  import "./chunk-ZPWHCABL.js";
@@ -39,4 +39,4 @@ export {
39
39
  resetCorrelationTracker,
40
40
  runConsensusForGoal
41
41
  };
42
- //# sourceMappingURL=consensus-vote-ZYZMDGT5.js.map
42
+ //# sourceMappingURL=consensus-vote-MMZTCPL7.js.map