nexus-agents 4.29.7 → 4.29.9

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-QOBQRH24.js → child-mcp-config-JYY5547P.js} +2 -2
  2. package/dist/{chunk-S4TJBGI2.js → chunk-242HKOIK.js} +2 -2
  3. package/dist/{chunk-JPTB4M6V.js → chunk-5OJ72ILB.js} +3 -3
  4. package/dist/{chunk-UPKYWLPL.js → chunk-5PZNLPWZ.js} +7 -7
  5. package/dist/{chunk-WIB7TIDY.js → chunk-6BCJEYQO.js} +5 -27
  6. package/dist/chunk-6BCJEYQO.js.map +1 -0
  7. package/dist/{chunk-FQUGR66Z.js → chunk-7FKY6N3Y.js} +2 -2
  8. package/dist/{chunk-46F3UEKW.js → chunk-BHSICVZ3.js} +35 -35
  9. package/dist/{chunk-KYTV2JFH.js → chunk-BS4TOLZI.js} +4 -4
  10. package/dist/{chunk-VOXVWYD4.js → chunk-DAP5XSGC.js} +8 -8
  11. package/dist/{chunk-WYKMINTU.js → chunk-DD2LBUZG.js} +4 -4
  12. package/dist/chunk-DUCHTS5S.js +7 -0
  13. package/dist/{chunk-GZUHLCRE.js → chunk-F5BLZ47N.js} +2 -2
  14. package/dist/{chunk-3IM3OPZH.js → chunk-G5EQQSBG.js} +2 -2
  15. package/dist/{chunk-ISA73Z6I.js → chunk-GHQ42PQQ.js} +2 -2
  16. package/dist/{chunk-SX2K66SG.js → chunk-GOZJVEAO.js} +2 -2
  17. package/dist/{chunk-GFNBH2PE.js → chunk-HIE6JMUY.js} +5 -5
  18. package/dist/{chunk-K77KZHXP.js → chunk-I65CVJSL.js} +2 -2
  19. package/dist/{chunk-WB54CVTG.js → chunk-I73VGSEE.js} +4 -4
  20. package/dist/{chunk-CQHUNYJN.js → chunk-KDYZKBUG.js} +2 -2
  21. package/dist/{chunk-WJ5TFKDF.js → chunk-L3DWHDKM.js} +39 -10
  22. package/dist/chunk-L3DWHDKM.js.map +1 -0
  23. package/dist/{chunk-ULZFVZFW.js → chunk-MMNLQCUA.js} +2 -2
  24. package/dist/{chunk-SFZ67DTA.js → chunk-NRDA7SCG.js} +2 -2
  25. package/dist/{chunk-Z22LKOBY.js → chunk-O6OMEKFM.js} +2 -2
  26. package/dist/{chunk-2DBVUHFA.js → chunk-OR5MZSGV.js} +2 -2
  27. package/dist/{chunk-FWRLD7W7.js → chunk-OV2CHBCD.js} +6 -6
  28. package/dist/{chunk-3RZJU5JS.js → chunk-P3233QIY.js} +5 -5
  29. package/dist/{chunk-XM7LFDFE.js → chunk-PK5F6EBP.js} +4 -4
  30. package/dist/{chunk-A4ISLEV6.js → chunk-PPDWDQK6.js} +7 -7
  31. package/dist/{chunk-ESNNN75Z.js → chunk-T7PV7OID.js} +3 -3
  32. package/dist/{chunk-XP5BAFPJ.js → chunk-V427P2E7.js} +3 -3
  33. package/dist/{chunk-KXNT76HR.js → chunk-V646HFLY.js} +2 -2
  34. package/dist/{chunk-GXZDUDSD.js → chunk-WKVBIB5Y.js} +2 -2
  35. package/dist/{chunk-WRKUNUCA.js → chunk-YDDZ3JTZ.js} +8 -8
  36. package/dist/{chunk-4ZDNZAGJ.js → chunk-ZUI7SW7X.js} +2 -2
  37. package/dist/{cli-circuit-breaker-PQ2FHTJA.js → cli-circuit-breaker-P4Y34CXQ.js} +3 -3
  38. package/dist/cli.js +41 -41
  39. package/dist/{composite-router-SN7T6PM4.js → composite-router-7O42FD3T.js} +2 -2
  40. package/dist/{consensus-vote-RJBBB25Z.js → consensus-vote-767MIGYT.js} +17 -17
  41. package/dist/{context-retriever-O7ULA6GX.js → context-retriever-LZV3NYP7.js} +8 -8
  42. package/dist/{doctor-deep-FC5IBSTN.js → doctor-deep-DCSQCJMJ.js} +3 -3
  43. package/dist/{doctor-live-EBBM5XGU.js → doctor-live-3EMCSRMX.js} +9 -9
  44. package/dist/{expert-bridge-IARKL3BV.js → expert-bridge-43HDZ2BV.js} +4 -4
  45. package/dist/{factory-P2G2A5RD.js → factory-B7XXW7H7.js} +9 -9
  46. package/dist/{factory-4EUZKQ3C.js → factory-X45ROXRB.js} +5 -5
  47. package/dist/{improvement-review-I26ZEHXQ.js → improvement-review-2FBFZ5BO.js} +6 -6
  48. package/dist/index.js +31 -31
  49. package/dist/{init-opencode-KWKRUK5D.js → init-opencode-RBJNEJ2O.js} +6 -6
  50. package/dist/issue-triage-WUXMKVKQ.js +17 -0
  51. package/dist/{pr-reviewer-helpers-RGCQ35FL.js → pr-reviewer-helpers-5J6KZIV2.js} +4 -4
  52. package/dist/{registry-command-EMN2WD4V.js → registry-command-I4D5YNX7.js} +2 -2
  53. package/dist/{repo-security-plan-WQCQRNPZ.js → repo-security-plan-EQPWLSZQ.js} +3 -3
  54. package/dist/{research-helpers-synthesize-UPDIAIQH.js → research-helpers-synthesize-56AHU7GL.js} +4 -4
  55. package/dist/{routing-memory-2XTCURFY.js → routing-memory-EDZ4PKXZ.js} +2 -2
  56. package/dist/{session-memory-6VZAC4FV.js → session-memory-2JCVXP7F.js} +3 -3
  57. package/dist/{setup-config-SMI2G6UE.js → setup-config-GE3YWYQC.js} +3 -3
  58. package/dist/{setup-custom-api-2AEMLGGD.js → setup-custom-api-KSGAP2C7.js} +4 -4
  59. package/dist/setup-data-dir-SVBZT3OZ.js +29 -0
  60. package/dist/{tool-memory-7BKRQ64B.js → tool-memory-VZ6NAWUQ.js} +5 -5
  61. package/dist/{unified-registry-6DVJR722.js → unified-registry-IL6K3B7P.js} +10 -10
  62. package/dist/{weather-report-UUPXHSXM.js → weather-report-QFHU4YOG.js} +2 -2
  63. package/package.json +1 -1
  64. package/dist/chunk-EE53G5Z4.js +0 -7
  65. package/dist/chunk-WIB7TIDY.js.map +0 -1
  66. package/dist/chunk-WJ5TFKDF.js.map +0 -1
  67. package/dist/issue-triage-SDH7RVQ6.js +0 -17
  68. package/dist/setup-data-dir-A6DPGVXF.js +0 -29
  69. /package/dist/{child-mcp-config-QOBQRH24.js.map → child-mcp-config-JYY5547P.js.map} +0 -0
  70. /package/dist/{chunk-S4TJBGI2.js.map → chunk-242HKOIK.js.map} +0 -0
  71. /package/dist/{chunk-JPTB4M6V.js.map → chunk-5OJ72ILB.js.map} +0 -0
  72. /package/dist/{chunk-UPKYWLPL.js.map → chunk-5PZNLPWZ.js.map} +0 -0
  73. /package/dist/{chunk-FQUGR66Z.js.map → chunk-7FKY6N3Y.js.map} +0 -0
  74. /package/dist/{chunk-46F3UEKW.js.map → chunk-BHSICVZ3.js.map} +0 -0
  75. /package/dist/{chunk-KYTV2JFH.js.map → chunk-BS4TOLZI.js.map} +0 -0
  76. /package/dist/{chunk-VOXVWYD4.js.map → chunk-DAP5XSGC.js.map} +0 -0
  77. /package/dist/{chunk-WYKMINTU.js.map → chunk-DD2LBUZG.js.map} +0 -0
  78. /package/dist/{chunk-EE53G5Z4.js.map → chunk-DUCHTS5S.js.map} +0 -0
  79. /package/dist/{chunk-GZUHLCRE.js.map → chunk-F5BLZ47N.js.map} +0 -0
  80. /package/dist/{chunk-3IM3OPZH.js.map → chunk-G5EQQSBG.js.map} +0 -0
  81. /package/dist/{chunk-ISA73Z6I.js.map → chunk-GHQ42PQQ.js.map} +0 -0
  82. /package/dist/{chunk-SX2K66SG.js.map → chunk-GOZJVEAO.js.map} +0 -0
  83. /package/dist/{chunk-GFNBH2PE.js.map → chunk-HIE6JMUY.js.map} +0 -0
  84. /package/dist/{chunk-K77KZHXP.js.map → chunk-I65CVJSL.js.map} +0 -0
  85. /package/dist/{chunk-WB54CVTG.js.map → chunk-I73VGSEE.js.map} +0 -0
  86. /package/dist/{chunk-CQHUNYJN.js.map → chunk-KDYZKBUG.js.map} +0 -0
  87. /package/dist/{chunk-ULZFVZFW.js.map → chunk-MMNLQCUA.js.map} +0 -0
  88. /package/dist/{chunk-SFZ67DTA.js.map → chunk-NRDA7SCG.js.map} +0 -0
  89. /package/dist/{chunk-Z22LKOBY.js.map → chunk-O6OMEKFM.js.map} +0 -0
  90. /package/dist/{chunk-2DBVUHFA.js.map → chunk-OR5MZSGV.js.map} +0 -0
  91. /package/dist/{chunk-FWRLD7W7.js.map → chunk-OV2CHBCD.js.map} +0 -0
  92. /package/dist/{chunk-3RZJU5JS.js.map → chunk-P3233QIY.js.map} +0 -0
  93. /package/dist/{chunk-XM7LFDFE.js.map → chunk-PK5F6EBP.js.map} +0 -0
  94. /package/dist/{chunk-A4ISLEV6.js.map → chunk-PPDWDQK6.js.map} +0 -0
  95. /package/dist/{chunk-ESNNN75Z.js.map → chunk-T7PV7OID.js.map} +0 -0
  96. /package/dist/{chunk-XP5BAFPJ.js.map → chunk-V427P2E7.js.map} +0 -0
  97. /package/dist/{chunk-KXNT76HR.js.map → chunk-V646HFLY.js.map} +0 -0
  98. /package/dist/{chunk-GXZDUDSD.js.map → chunk-WKVBIB5Y.js.map} +0 -0
  99. /package/dist/{chunk-WRKUNUCA.js.map → chunk-YDDZ3JTZ.js.map} +0 -0
  100. /package/dist/{chunk-4ZDNZAGJ.js.map → chunk-ZUI7SW7X.js.map} +0 -0
  101. /package/dist/{cli-circuit-breaker-PQ2FHTJA.js.map → cli-circuit-breaker-P4Y34CXQ.js.map} +0 -0
  102. /package/dist/{composite-router-SN7T6PM4.js.map → composite-router-7O42FD3T.js.map} +0 -0
  103. /package/dist/{consensus-vote-RJBBB25Z.js.map → consensus-vote-767MIGYT.js.map} +0 -0
  104. /package/dist/{context-retriever-O7ULA6GX.js.map → context-retriever-LZV3NYP7.js.map} +0 -0
  105. /package/dist/{doctor-deep-FC5IBSTN.js.map → doctor-deep-DCSQCJMJ.js.map} +0 -0
  106. /package/dist/{doctor-live-EBBM5XGU.js.map → doctor-live-3EMCSRMX.js.map} +0 -0
  107. /package/dist/{expert-bridge-IARKL3BV.js.map → expert-bridge-43HDZ2BV.js.map} +0 -0
  108. /package/dist/{factory-4EUZKQ3C.js.map → factory-B7XXW7H7.js.map} +0 -0
  109. /package/dist/{factory-P2G2A5RD.js.map → factory-X45ROXRB.js.map} +0 -0
  110. /package/dist/{improvement-review-I26ZEHXQ.js.map → improvement-review-2FBFZ5BO.js.map} +0 -0
  111. /package/dist/{init-opencode-KWKRUK5D.js.map → init-opencode-RBJNEJ2O.js.map} +0 -0
  112. /package/dist/{issue-triage-SDH7RVQ6.js.map → issue-triage-WUXMKVKQ.js.map} +0 -0
  113. /package/dist/{pr-reviewer-helpers-RGCQ35FL.js.map → pr-reviewer-helpers-5J6KZIV2.js.map} +0 -0
  114. /package/dist/{registry-command-EMN2WD4V.js.map → registry-command-I4D5YNX7.js.map} +0 -0
  115. /package/dist/{repo-security-plan-WQCQRNPZ.js.map → repo-security-plan-EQPWLSZQ.js.map} +0 -0
  116. /package/dist/{research-helpers-synthesize-UPDIAIQH.js.map → research-helpers-synthesize-56AHU7GL.js.map} +0 -0
  117. /package/dist/{routing-memory-2XTCURFY.js.map → routing-memory-EDZ4PKXZ.js.map} +0 -0
  118. /package/dist/{session-memory-6VZAC4FV.js.map → session-memory-2JCVXP7F.js.map} +0 -0
  119. /package/dist/{setup-config-SMI2G6UE.js.map → setup-config-GE3YWYQC.js.map} +0 -0
  120. /package/dist/{setup-custom-api-2AEMLGGD.js.map → setup-custom-api-KSGAP2C7.js.map} +0 -0
  121. /package/dist/{setup-data-dir-A6DPGVXF.js.map → setup-data-dir-SVBZT3OZ.js.map} +0 -0
  122. /package/dist/{tool-memory-7BKRQ64B.js.map → tool-memory-VZ6NAWUQ.js.map} +0 -0
  123. /package/dist/{unified-registry-6DVJR722.js.map → unified-registry-IL6K3B7P.js.map} +0 -0
  124. /package/dist/{weather-report-UUPXHSXM.js.map → weather-report-QFHU4YOG.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-4OW67KT2.js";
4
4
  import {
5
5
  createLogger
6
- } from "./chunk-WJ5TFKDF.js";
6
+ } from "./chunk-L3DWHDKM.js";
7
7
  import "./chunk-GBHJ37V3.js";
8
8
  import "./chunk-OGHEKPLD.js";
9
9
  import "./chunk-ZPWHCABL.js";
@@ -62,4 +62,4 @@ export {
62
62
  generateMcpConfig,
63
63
  getDefaultAllowedTools
64
64
  };
65
- //# sourceMappingURL=child-mcp-config-QOBQRH24.js.map
65
+ //# sourceMappingURL=child-mcp-config-JYY5547P.js.map
@@ -4,7 +4,7 @@ import {
4
4
  getErrorMessage,
5
5
  getTimeProvider,
6
6
  ok
7
- } from "./chunk-WJ5TFKDF.js";
7
+ } from "./chunk-L3DWHDKM.js";
8
8
 
9
9
  // src/context/session-memory.ts
10
10
  import * as fs from "fs";
@@ -352,4 +352,4 @@ export {
352
352
  SessionMemory,
353
353
  createSessionMemory
354
354
  };
355
- //# sourceMappingURL=chunk-S4TJBGI2.js.map
355
+ //# sourceMappingURL=chunk-242HKOIK.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  loadPapersRegistry
3
- } from "./chunk-SFZ67DTA.js";
3
+ } from "./chunk-NRDA7SCG.js";
4
4
  import {
5
5
  getErrorMessage
6
- } from "./chunk-WJ5TFKDF.js";
6
+ } from "./chunk-L3DWHDKM.js";
7
7
 
8
8
  // src/cli/research-helpers-synthesize.ts
9
9
  import { z } from "zod";
@@ -886,4 +886,4 @@ export {
886
886
  AttributedInsightSchema,
887
887
  synthesizeResearch
888
888
  };
889
- //# sourceMappingURL=chunk-JPTB4M6V.js.map
889
+ //# sourceMappingURL=chunk-5OJ72ILB.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  resolveCliSlot
3
- } from "./chunk-SX2K66SG.js";
3
+ } from "./chunk-GOZJVEAO.js";
4
4
  import {
5
5
  createLogger,
6
6
  getTimeProvider,
7
7
  isRateLimitText
8
- } from "./chunk-WJ5TFKDF.js";
8
+ } from "./chunk-L3DWHDKM.js";
9
9
 
10
10
  // src/pipeline/expert-bridge.ts
11
11
  function resolveCliFromModelString(model) {
@@ -21,7 +21,7 @@ async function getMcpConfigPath() {
21
21
  if (cachedMcpConfigPath !== null) return cachedMcpConfigPath;
22
22
  mcpConfigInitPromise ??= (async () => {
23
23
  try {
24
- const { generateMcpConfig } = await import("./child-mcp-config-QOBQRH24.js");
24
+ const { generateMcpConfig } = await import("./child-mcp-config-JYY5547P.js");
25
25
  const config = await generateMcpConfig();
26
26
  cachedMcpConfigPath = config.configPath;
27
27
  cachedMcpConfigCleanup = config.cleanup;
@@ -93,8 +93,8 @@ var routerInitPromise = null;
93
93
  async function getRouter() {
94
94
  if (cachedRouter !== null) return cachedRouter;
95
95
  routerInitPromise ??= (async () => {
96
- const { createAllAdapters } = await import("./factory-P2G2A5RD.js");
97
- const { createCompositeRouter } = await import("./composite-router-SN7T6PM4.js");
96
+ const { createAllAdapters } = await import("./factory-B7XXW7H7.js");
97
+ const { createCompositeRouter } = await import("./composite-router-7O42FD3T.js");
98
98
  const adapters = createAllAdapters();
99
99
  if (adapters.size === 0) {
100
100
  routerInitPromise = null;
@@ -102,7 +102,7 @@ async function getRouter() {
102
102
  }
103
103
  cachedRouter = adaptCompositeRouter(createCompositeRouter(adapters));
104
104
  try {
105
- const { createCliCircuitBreakerIntegration } = await import("./cli-circuit-breaker-PQ2FHTJA.js");
105
+ const { createCliCircuitBreakerIntegration } = await import("./cli-circuit-breaker-P4Y34CXQ.js");
106
106
  cachedCircuitBreaker = createCliCircuitBreakerIntegration([...adapters.values()]);
107
107
  } catch (error) {
108
108
  const msg = error instanceof Error ? error.message : String(error);
@@ -213,4 +213,4 @@ export {
213
213
  tokenSplitFromUsage,
214
214
  executeExpert
215
215
  };
216
- //# sourceMappingURL=chunk-UPKYWLPL.js.map
216
+ //# sourceMappingURL=chunk-5PZNLPWZ.js.map
@@ -1,36 +1,14 @@
1
1
  import {
2
- getDefaultRegistry
3
- } from "./chunk-WJ5TFKDF.js";
2
+ computeTokenCost,
3
+ getDefaultRegistry,
4
+ roundToMicroUsd
5
+ } from "./chunk-L3DWHDKM.js";
4
6
  import {
5
7
  getNexusDataDir
6
8
  } from "./chunk-OGHEKPLD.js";
7
9
 
8
10
  // src/learning/usage-log.ts
9
11
  import { appendFileSync, existsSync, mkdirSync, readFileSync, readdirSync } from "fs";
10
-
11
- // src/learning/token-cost-core.ts
12
- function componentCost(tokens, perMillion) {
13
- return tokens * perMillion / 1e6;
14
- }
15
- function computeTokenCost(tokens, rates) {
16
- const unpriced = [];
17
- let costUsd = componentCost(tokens.input, rates.inputPer1M);
18
- costUsd += componentCost(tokens.output, rates.outputPer1M);
19
- if (tokens.cacheRead !== void 0 && tokens.cacheRead > 0) {
20
- if (rates.cacheReadPer1M === void 0) unpriced.push("cacheRead");
21
- else costUsd += componentCost(tokens.cacheRead, rates.cacheReadPer1M);
22
- }
23
- if (tokens.cacheWrite !== void 0 && tokens.cacheWrite > 0) {
24
- if (rates.cacheWritePer1M === void 0) unpriced.push("cacheWrite");
25
- else costUsd += componentCost(tokens.cacheWrite, rates.cacheWritePer1M);
26
- }
27
- return { costUsd, unpricedComponents: unpriced, complete: unpriced.length === 0 };
28
- }
29
- function roundToMicroUsd(costUsd) {
30
- return Math.round(costUsd * 1e6) / 1e6;
31
- }
32
-
33
- // src/learning/usage-log.ts
34
12
  import { dirname, join } from "path";
35
13
  function computeCostDetail(modelId, inputTokens, outputTokens) {
36
14
  const entry = getDefaultRegistry().getEntry(modelId);
@@ -153,4 +131,4 @@ export {
153
131
  loadUsageEvents,
154
132
  rollupByModel
155
133
  };
156
- //# sourceMappingURL=chunk-WIB7TIDY.js.map
134
+ //# sourceMappingURL=chunk-6BCJEYQO.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 { computeTokenCost, roundToMicroUsd } from './token-cost-core.js';\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';\nimport type { PriceBasis } from '../core/price-basis.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 // The arithmetic lives in the shared core (#5122); this function is the\n // REGISTRY-BACKED, LEDGER-ROUNDED wrapper over it. Rounding to micro-USD\n // stays here rather than in the core: it exists so this log's JSONL does not\n // drift into floating-point noise across many small calls, which is a ledger\n // requirement, not a property of cost.\n const { costUsd } = computeTokenCost(\n { input: inputTokens, output: outputTokens },\n { inputPer1M: entry.pricing.inputPer1M, outputPer1M: entry.pricing.outputPer1M }\n );\n return { costUsd: roundToMicroUsd(costUsd), priced: true, resolvedId, ...provenance };\n}\n\n/**\n * The {@link PriceBasis} the cost in a {@link CostDetail} rests on (#4406).\n *\n * DELIBERATELY derived rather than stored, because `CostDetail.priced` already\n * carries the only distinction the current two-member union can express: the\n * chain resolved a rate, or it did not. A `priceBasis` property beside `priced`\n * would be a second spelling of the same boolean.\n *\n * WHAT THE `'list'` VALUE ASSERTS. Only that a rate was resolved, and that it\n * should be read as an assumed published rate. It is NOT a guarantee that the\n * number is a vendor's advertised public rate — at least two paths put\n * something else behind the label, and one puts a real published rate behind\n * `'unknown'`:\n *\n * - The operator manifest overlay is the highest-precedence tier and passes\n * `pricing` through; overriding pricing is its purpose. A negotiated rate\n * entered there reports `'list'`, and the caveat then warns the reader their\n * contract may differ over the contract rate.\n * - The normalized/fuzzy identity tier lets a decorated gateway id inherit a\n * DIFFERENT canonical entry's rate.\n * - `config/models-generated-loader.ts` discards a published $0/$0 rate unless\n * the id ends `:free`, so `'unknown'` does not mean no price exists.\n *\n * The derivation is therefore an assumption about the chain, not a fact about\n * it — conservative in the right direction (it invites a caveat rather than\n * suppressing one), and honest only if described this way. Narrowing it needs a\n * per-entry label the registry does not carry today; see {@link PriceBasis}.\n *\n * `priceSource`, the other provenance field, answers a different question: WHICH\n * registry entry supplied the number, not what KIND of rate it is. It does not\n * encode the basis, which is why the basis has to travel separately into records\n * (the decision-cost store) that persist neither field.\n */\nexport function priceBasisOf(detail: CostDetail): PriceBasis {\n return detail.priced ? 'list' : 'unknown';\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,6 +1,6 @@
1
1
  import {
2
2
  getErrorMessage
3
- } from "./chunk-WJ5TFKDF.js";
3
+ } from "./chunk-L3DWHDKM.js";
4
4
 
5
5
  // src/cli/setup-config.ts
6
6
  import { copyFileSync, existsSync, mkdirSync, writeFileSync } from "fs";
@@ -77,4 +77,4 @@ function ensureBackup(outputPath) {
77
77
  export {
78
78
  runConfigInitSync
79
79
  };
80
- //# sourceMappingURL=chunk-FQUGR66Z.js.map
80
+ //# sourceMappingURL=chunk-7FKY6N3Y.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  generateSecurityPlan
3
- } from "./chunk-GZUHLCRE.js";
3
+ } from "./chunk-F5BLZ47N.js";
4
4
  import {
5
5
  analyzeGitHubRepo
6
6
  } from "./chunk-HFOQKCD2.js";
@@ -21,10 +21,10 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-A4ISLEV6.js";
24
+ } from "./chunk-PPDWDQK6.js";
25
25
  import {
26
26
  executeExpert
27
- } from "./chunk-UPKYWLPL.js";
27
+ } from "./chunk-5PZNLPWZ.js";
28
28
  import {
29
29
  JobStatusSchema,
30
30
  VOTER_ROLES,
@@ -47,24 +47,24 @@ import {
47
47
  simulationDeniedResult,
48
48
  toJobSummary,
49
49
  writeJobCancelled
50
- } from "./chunk-WRKUNUCA.js";
50
+ } from "./chunk-YDDZ3JTZ.js";
51
51
  import {
52
52
  allOf
53
53
  } from "./chunk-OQB3XC5O.js";
54
54
  import {
55
55
  normalizeTopicToCanonical,
56
56
  synthesizeResearch
57
- } from "./chunk-JPTB4M6V.js";
57
+ } from "./chunk-5OJ72ILB.js";
58
58
  import {
59
59
  IssueTriage
60
- } from "./chunk-FWRLD7W7.js";
60
+ } from "./chunk-OV2CHBCD.js";
61
61
  import {
62
62
  resolveEnvMode,
63
63
  sanitizeInput
64
- } from "./chunk-3IM3OPZH.js";
64
+ } from "./chunk-G5EQQSBG.js";
65
65
  import {
66
66
  withPrerequisite
67
- } from "./chunk-XP5BAFPJ.js";
67
+ } from "./chunk-V427P2E7.js";
68
68
  import {
69
69
  NOOP_NOTIFIER,
70
70
  RateLimiter,
@@ -88,18 +88,18 @@ import {
88
88
  withAuditTrail,
89
89
  withProgressHeartbeat,
90
90
  wrapToolWithTimeout
91
- } from "./chunk-WB54CVTG.js";
91
+ } from "./chunk-I73VGSEE.js";
92
92
  import {
93
93
  createAuditTrail,
94
94
  createGraphAuditBridge,
95
95
  emitPipelinePolicyEvent
96
- } from "./chunk-ULZFVZFW.js";
96
+ } from "./chunk-MMNLQCUA.js";
97
97
  import {
98
98
  EventTopics,
99
99
  createEvent,
100
100
  getGlobalEventBus,
101
101
  getGlobalRegistry
102
- } from "./chunk-KYTV2JFH.js";
102
+ } from "./chunk-BS4TOLZI.js";
103
103
  import {
104
104
  IDENTIFIER_RE,
105
105
  LANG_VALUES,
@@ -132,29 +132,29 @@ import {
132
132
  parseRegistry,
133
133
  sourceExistsInRegistry,
134
134
  summarizeContextForPrompt
135
- } from "./chunk-3RZJU5JS.js";
135
+ } from "./chunk-P3233QIY.js";
136
136
  import {
137
137
  loadPapersRegistry,
138
138
  loadTechniquesRegistry,
139
139
  resolveInsideRoot
140
- } from "./chunk-SFZ67DTA.js";
140
+ } from "./chunk-NRDA7SCG.js";
141
141
  import {
142
142
  getTokenEnvVars,
143
143
  resolveToken
144
- } from "./chunk-KXNT76HR.js";
144
+ } from "./chunk-V646HFLY.js";
145
145
  import {
146
146
  DEFAULT_RELEVANCE_CONFIG,
147
147
  MemoryImportance,
148
148
  calculateTextJaccardSimilarity,
149
149
  getToolMemory
150
- } from "./chunk-WYKMINTU.js";
150
+ } from "./chunk-DD2LBUZG.js";
151
151
  import {
152
152
  STOPWORDS,
153
153
  truncateWithInfo
154
154
  } from "./chunk-6T3EPABN.js";
155
155
  import {
156
156
  createSessionMemory
157
- } from "./chunk-S4TJBGI2.js";
157
+ } from "./chunk-242HKOIK.js";
158
158
  import {
159
159
  BUILT_IN_EXPERTS,
160
160
  BuiltInExpertTypeSchema,
@@ -172,25 +172,25 @@ import {
172
172
  getAvailableClis,
173
173
  sleep,
174
174
  withTimeout
175
- } from "./chunk-VOXVWYD4.js";
175
+ } from "./chunk-DAP5XSGC.js";
176
176
  import {
177
177
  BaseAdapter,
178
178
  createStream,
179
179
  requireApiKey,
180
180
  validateApiKeyPresence
181
- } from "./chunk-CQHUNYJN.js";
181
+ } from "./chunk-KDYZKBUG.js";
182
182
  import {
183
183
  DEFAULTS
184
- } from "./chunk-Z22LKOBY.js";
184
+ } from "./chunk-O6OMEKFM.js";
185
185
  import {
186
186
  getAvailabilityCache,
187
187
  getCliForModelId,
188
188
  resolveFallback
189
- } from "./chunk-SX2K66SG.js";
189
+ } from "./chunk-GOZJVEAO.js";
190
190
  import {
191
191
  generateHyphenId,
192
192
  generateUUID
193
- } from "./chunk-ISA73Z6I.js";
193
+ } from "./chunk-GHQ42PQQ.js";
194
194
  import {
195
195
  AGENT_ROUTER_TIMEOUTS,
196
196
  API_TIMEOUTS,
@@ -294,7 +294,7 @@ import {
294
294
  selectStrategyByManifest,
295
295
  toExpertTaskAnalysisResult,
296
296
  withStep
297
- } from "./chunk-WJ5TFKDF.js";
297
+ } from "./chunk-L3DWHDKM.js";
298
298
  import {
299
299
  ensureLearningDir,
300
300
  getMetaOutcomesFile,
@@ -29698,7 +29698,7 @@ function execIdFields(executionId) {
29698
29698
  async function populateUnifiedContextOnState(state, options) {
29699
29699
  const taskCandidate = state["task"];
29700
29700
  if (typeof taskCandidate !== "string" || taskCandidate === "") return;
29701
- const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-O7ULA6GX.js");
29701
+ const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-LZV3NYP7.js");
29702
29702
  const category = inferTaskCategory2(taskCandidate);
29703
29703
  const executionId = options?.executionId;
29704
29704
  const execFields = execIdFields(executionId);
@@ -45495,7 +45495,7 @@ async function tryIssueTriage(task) {
45495
45495
  try {
45496
45496
  const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
45497
45497
  if (issueMatch === null) return null;
45498
- const { createIssueTriage } = await import("./issue-triage-SDH7RVQ6.js");
45498
+ const { createIssueTriage } = await import("./issue-triage-WUXMKVKQ.js");
45499
45499
  const triage = createIssueTriage();
45500
45500
  const owner = issueMatch[1] ?? "";
45501
45501
  const num = issueMatch[2] ?? "";
@@ -45523,7 +45523,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
45523
45523
  ]);
45524
45524
  async function classifyWithLLM(task) {
45525
45525
  try {
45526
- const { executeExpert: executeExpert2 } = await import("./expert-bridge-IARKL3BV.js");
45526
+ const { executeExpert: executeExpert2 } = await import("./expert-bridge-43HDZ2BV.js");
45527
45527
  const prompt = [
45528
45528
  "Classify this task into exactly one pipeline template.",
45529
45529
  "Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
@@ -47304,7 +47304,7 @@ var memoryInitPromise = null;
47304
47304
  async function initPipelineMemory() {
47305
47305
  if (cachedMemory !== null) return cachedMemory;
47306
47306
  try {
47307
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-6VZAC4FV.js");
47307
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-2JCVXP7F.js");
47308
47308
  const { getLearningDir } = await import("./learning-persistence-7O5QYDM7.js");
47309
47309
  const mem = createSessionMemory2(getLearningDir());
47310
47310
  mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
@@ -47366,7 +47366,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
47366
47366
  callRecord(routingMemoryCache);
47367
47367
  return;
47368
47368
  }
47369
- routingMemoryInitPromise ??= import("./routing-memory-2XTCURFY.js").then(({ createRoutingMemory }) => {
47369
+ routingMemoryInitPromise ??= import("./routing-memory-EDZ4PKXZ.js").then(({ createRoutingMemory }) => {
47370
47370
  routingMemoryCache ??= createRoutingMemory();
47371
47371
  return routingMemoryCache;
47372
47372
  }).catch((error) => {
@@ -47400,7 +47400,7 @@ ${text}` : "";
47400
47400
  }
47401
47401
  async function getWeatherContext() {
47402
47402
  try {
47403
- const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-UUPXHSXM.js");
47403
+ const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-QFHU4YOG.js");
47404
47404
  const report = generateWeatherReport2({ includeAdaptive: true });
47405
47405
  const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
47406
47406
  if (!Array.isArray(mappings) || mappings.length === 0) return "";
@@ -47418,7 +47418,7 @@ ${lines}
47418
47418
  }
47419
47419
  async function getMemoryContext(task) {
47420
47420
  try {
47421
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-6VZAC4FV.js");
47421
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-2JCVXP7F.js");
47422
47422
  const { getLearningDir } = await import("./learning-persistence-7O5QYDM7.js");
47423
47423
  const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
47424
47424
  const learnings = memory.searchLearnings(task.slice(0, 200));
@@ -47537,7 +47537,7 @@ ${contextBlock}`;
47537
47537
  const strategy = config.votingStrategy ?? "higher_order";
47538
47538
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47539
47539
  try {
47540
- const { executeVoting } = await import("./consensus-vote-RJBBB25Z.js");
47540
+ const { executeVoting } = await import("./consensus-vote-767MIGYT.js");
47541
47541
  const votingResult = await executeVoting(
47542
47542
  {
47543
47543
  proposal: buildVoteProposal(plan, research),
@@ -47976,7 +47976,7 @@ async function searchCodebaseForTask(task) {
47976
47976
  }
47977
47977
  async function queryResearchRegistry(task) {
47978
47978
  try {
47979
- const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-UPDIAIQH.js");
47979
+ const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-56AHU7GL.js");
47980
47980
  const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
47981
47981
  if (topic === void 0) return null;
47982
47982
  const result = await synthesizeResearch2(topic.slice(0, 50));
@@ -48047,7 +48047,7 @@ function createScanStageWrapper() {
48047
48047
  try {
48048
48048
  const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
48049
48049
  if (slug !== void 0) {
48050
- const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-WQCQRNPZ.js");
48050
+ const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-EQPWLSZQ.js");
48051
48051
  const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
48052
48052
  const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
48053
48053
  return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
@@ -51178,7 +51178,7 @@ var GitHubTaskTracker = class {
51178
51178
  cachedProvider = null;
51179
51179
  async getProvider() {
51180
51180
  if (this.cachedProvider !== null) return this.cachedProvider;
51181
- const { createScmProvider } = await import("./factory-4EUZKQ3C.js");
51181
+ const { createScmProvider } = await import("./factory-X45ROXRB.js");
51182
51182
  const result = await createScmProvider({ repo: this.config.repo ?? "" });
51183
51183
  if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
51184
51184
  this.cachedProvider = result.value;
@@ -52093,7 +52093,7 @@ async function probeSource(source, includeModelIds) {
52093
52093
  }
52094
52094
  }
52095
52095
  async function defaultSources(includeOpenRouter) {
52096
- const { createAllAdapters: createAllAdapters2 } = await import("./factory-P2G2A5RD.js");
52096
+ const { createAllAdapters: createAllAdapters2 } = await import("./factory-B7XXW7H7.js");
52097
52097
  const adapters = createAllAdapters2();
52098
52098
  return buildDefaultModelSources(adapters, { includeOpenRouter });
52099
52099
  }
@@ -56165,4 +56165,4 @@ export {
56165
56165
  shutdownFeedbackSubscriber,
56166
56166
  createEventBusBridge
56167
56167
  };
56168
- //# sourceMappingURL=chunk-46F3UEKW.js.map
56168
+ //# sourceMappingURL=chunk-BHSICVZ3.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createAutoAdapter
3
- } from "./chunk-VOXVWYD4.js";
3
+ } from "./chunk-DAP5XSGC.js";
4
4
  import {
5
5
  getDefaultCliCircuitBreakerRegistry,
6
6
  mapModelErrorToCategory
7
- } from "./chunk-4ZDNZAGJ.js";
7
+ } from "./chunk-ZUI7SW7X.js";
8
8
  import {
9
9
  CLI_NAMES,
10
10
  CircularBuffer,
@@ -23,7 +23,7 @@ import {
23
23
  recordRateLimitEvent,
24
24
  resolveModelIdentitySync,
25
25
  toRateLimitError
26
- } from "./chunk-WJ5TFKDF.js";
26
+ } from "./chunk-L3DWHDKM.js";
27
27
 
28
28
  // src/config/model-equivalence.ts
29
29
  function canonicalModelKey(modelId) {
@@ -895,4 +895,4 @@ export {
895
895
  getGlobalRegistry,
896
896
  resetGlobalRegistry
897
897
  };
898
- //# sourceMappingURL=chunk-KYTV2JFH.js.map
898
+ //# sourceMappingURL=chunk-BS4TOLZI.js.map
@@ -5,34 +5,34 @@ import {
5
5
  planOptionalParams,
6
6
  requireApiKey,
7
7
  validateApiKeyPresence
8
- } from "./chunk-CQHUNYJN.js";
8
+ } from "./chunk-KDYZKBUG.js";
9
9
  import {
10
10
  CUSTOM_API_DEFAULT_MODEL
11
- } from "./chunk-Z22LKOBY.js";
11
+ } from "./chunk-O6OMEKFM.js";
12
12
  import {
13
13
  CUSTOM_API_BASE_URL_ENV,
14
14
  PROVIDER_ENV_KEYS,
15
15
  assertCustomApiHostResolvesPublic,
16
16
  validateCustomApiBaseUrl
17
- } from "./chunk-GXZDUDSD.js";
17
+ } from "./chunk-WKVBIB5Y.js";
18
18
  import {
19
19
  nexusMkdtempSync
20
20
  } from "./chunk-4OW67KT2.js";
21
21
  import {
22
22
  getAvailabilityCache
23
- } from "./chunk-SX2K66SG.js";
23
+ } from "./chunk-GOZJVEAO.js";
24
24
  import {
25
25
  extractSystemPrompt
26
26
  } from "./chunk-QZUG667L.js";
27
27
  import {
28
28
  generateHyphenId
29
- } from "./chunk-ISA73Z6I.js";
29
+ } from "./chunk-GHQ42PQQ.js";
30
30
  import {
31
31
  CliCircuitBreaker,
32
32
  DEFAULT_CIRCUIT_BREAKER_CONFIG,
33
33
  getCliCircuitBreakerSnapshot,
34
34
  getDefaultCliCircuitBreakerRegistry
35
- } from "./chunk-4ZDNZAGJ.js";
35
+ } from "./chunk-ZUI7SW7X.js";
36
36
  import {
37
37
  CLI_SUBPROCESS_TIMEOUTS,
38
38
  CLI_TIMEOUTS,
@@ -72,7 +72,7 @@ import {
72
72
  resolveCliAlias,
73
73
  resolveRetryAfterMs,
74
74
  retryAfterMsFromContext
75
- } from "./chunk-WJ5TFKDF.js";
75
+ } from "./chunk-L3DWHDKM.js";
76
76
 
77
77
  // src/cli-adapters/cli-to-model-adapter.ts
78
78
  var CliToModelAdapter = class {
@@ -4903,4 +4903,4 @@ export {
4903
4903
  SdkAdapter,
4904
4904
  createAutoAdapter
4905
4905
  };
4906
- //# sourceMappingURL=chunk-VOXVWYD4.js.map
4906
+ //# sourceMappingURL=chunk-DAP5XSGC.js.map
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-6T3EPABN.js";
6
6
  import {
7
7
  SessionMemory
8
- } from "./chunk-S4TJBGI2.js";
8
+ } from "./chunk-242HKOIK.js";
9
9
  import {
10
10
  StatsOnlyAdapter,
11
11
  ensureSharedMemoryRegistry
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-KSQSWEFH.js";
16
16
  import {
17
17
  generateId
18
- } from "./chunk-ISA73Z6I.js";
18
+ } from "./chunk-GHQ42PQQ.js";
19
19
  import {
20
20
  ErrorCode,
21
21
  NexusError,
@@ -28,7 +28,7 @@ import {
28
28
  getTimeProvider,
29
29
  ok,
30
30
  setSharedMobiMemDbPathResolver
31
- } from "./chunk-WJ5TFKDF.js";
31
+ } from "./chunk-L3DWHDKM.js";
32
32
  import {
33
33
  nexusDataPath
34
34
  } from "./chunk-OGHEKPLD.js";
@@ -5608,4 +5608,4 @@ export {
5608
5608
  reinitializeMemoryBackends,
5609
5609
  ToolMemoryManager
5610
5610
  };
5611
- //# sourceMappingURL=chunk-WYKMINTU.js.map
5611
+ //# sourceMappingURL=chunk-DD2LBUZG.js.map
@@ -0,0 +1,7 @@
1
+ // src/version.ts
2
+ var VERSION = true ? "4.29.9" : "dev";
3
+
4
+ export {
5
+ VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-DUCHTS5S.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  createLogger,
6
6
  getTimeProvider
7
- } from "./chunk-WJ5TFKDF.js";
7
+ } from "./chunk-L3DWHDKM.js";
8
8
 
9
9
  // src/mcp/tools/scanner-registry-fetcher.ts
10
10
  import { z } from "zod";
@@ -721,4 +721,4 @@ export {
721
721
  generateSecurityPlan,
722
722
  buildPlanFromAnalysis
723
723
  };
724
- //# sourceMappingURL=chunk-GZUHLCRE.js.map
724
+ //# sourceMappingURL=chunk-F5BLZ47N.js.map
@@ -2,7 +2,7 @@ import {
2
2
  CACHE_TIMEOUTS,
3
3
  createLogger,
4
4
  getTimeProvider
5
- } from "./chunk-WJ5TFKDF.js";
5
+ } from "./chunk-L3DWHDKM.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-3IM3OPZH.js.map
563
+ //# sourceMappingURL=chunk-G5EQQSBG.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getRandomProvider,
3
3
  getTimeProvider
4
- } from "./chunk-WJ5TFKDF.js";
4
+ } from "./chunk-L3DWHDKM.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-ISA73Z6I.js.map
27
+ //# sourceMappingURL=chunk-GHQ42PQQ.js.map
@@ -3,7 +3,7 @@ import {
3
3
  MODEL_IDS,
4
4
  getTimeProvider,
5
5
  resolveModelIdentitySync
6
- } from "./chunk-WJ5TFKDF.js";
6
+ } from "./chunk-L3DWHDKM.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-SX2K66SG.js.map
153
+ //# sourceMappingURL=chunk-GOZJVEAO.js.map