nexus-agents 2.166.3 → 2.167.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 (128) hide show
  1. package/dist/{child-mcp-config-AUA4TFBG.js → child-mcp-config-X4YLQKGK.js} +2 -2
  2. package/dist/{chunk-P54BDACX.js → chunk-2NU774CB.js} +2 -2
  3. package/dist/{chunk-JBH4CU46.js → chunk-2S7T66IQ.js} +34 -34
  4. package/dist/{chunk-UO6C5J5D.js → chunk-3T6KLPGT.js} +5 -5
  5. package/dist/{chunk-FZV4YAYT.js → chunk-6KCZA3IO.js} +190 -4
  6. package/dist/chunk-6KCZA3IO.js.map +1 -0
  7. package/dist/{chunk-ORRKK563.js → chunk-7K5LSUEU.js} +3 -3
  8. package/dist/{chunk-GS3UPAUE.js → chunk-7USEQLMS.js} +2 -2
  9. package/dist/{chunk-K2IX6BEK.js → chunk-7YD3TRDX.js} +4 -4
  10. package/dist/{chunk-IF46G2LM.js → chunk-BB7KSLNA.js} +2 -2
  11. package/dist/{chunk-NEQJSYJH.js → chunk-COIZLMGV.js} +3 -3
  12. package/dist/{chunk-Z66EEQ4A.js → chunk-CURHM4TH.js} +3 -3
  13. package/dist/{chunk-PXTZ6RPP.js → chunk-EUQNHT7O.js} +26 -7
  14. package/dist/chunk-EUQNHT7O.js.map +1 -0
  15. package/dist/{chunk-BZFF3YWU.js → chunk-GGYQTV2Y.js} +4 -4
  16. package/dist/{chunk-HNAFWKJG.js → chunk-GRWHPG72.js} +7 -7
  17. package/dist/{chunk-AWPSFL5C.js → chunk-GVNY4ZB6.js} +2 -2
  18. package/dist/{chunk-YKTVN2TF.js → chunk-IFSIKGHI.js} +2 -2
  19. package/dist/{chunk-LRBEUBZ3.js → chunk-JKUX73VD.js} +3 -3
  20. package/dist/{chunk-I7OZP6FS.js → chunk-KM3YEIEN.js} +4 -4
  21. package/dist/{chunk-THI3VWHO.js → chunk-O6VL6LA4.js} +2 -2
  22. package/dist/{chunk-6LXTT6AK.js → chunk-PC4Y4VPX.js} +2 -2
  23. package/dist/{chunk-DMFMJFRY.js → chunk-QPSYBHK6.js} +2 -2
  24. package/dist/{chunk-BFDVV3Q3.js → chunk-QV52AXTF.js} +2 -2
  25. package/dist/chunk-QZUG667L.js +56 -0
  26. package/dist/chunk-QZUG667L.js.map +1 -0
  27. package/dist/{chunk-JYVPM37A.js → chunk-RKIPSMCN.js} +5 -5
  28. package/dist/{chunk-ZI4PO2A3.js → chunk-S6HCREYY.js} +12 -62
  29. package/dist/chunk-S6HCREYY.js.map +1 -0
  30. package/dist/{chunk-F2YZ3U6O.js → chunk-SRNAXDOT.js} +2 -2
  31. package/dist/{chunk-V5RPW2ZX.js → chunk-STMW5BSR.js} +3 -3
  32. package/dist/{chunk-FQNG6ZIW.js → chunk-TGAVZ2ZL.js} +8 -8
  33. package/dist/{chunk-UWRDWX6L.js → chunk-UNIDAVVR.js} +2 -2
  34. package/dist/{chunk-76Q6GTPU.js → chunk-VNVGGM73.js} +2 -2
  35. package/dist/{chunk-FKHQWC2L.js → chunk-XUMLVCFL.js} +2 -2
  36. package/dist/{chunk-WL4SGKAW.js → chunk-ZAPCPHGZ.js} +2 -2
  37. package/dist/{chunk-PRSGZQNB.js → chunk-ZIC6ZZFU.js} +3 -3
  38. package/dist/{chunk-WOY6TQCH.js → chunk-ZSUN7BHE.js} +439 -12
  39. package/dist/chunk-ZSUN7BHE.js.map +1 -0
  40. package/dist/{chunk-3LVB5OE2.js → chunk-ZTTUXPBQ.js} +2 -2
  41. package/dist/{cli-circuit-breaker-FSUDU7BV.js → cli-circuit-breaker-2AAHSCHR.js} +4 -4
  42. package/dist/cli.js +59 -45
  43. package/dist/cli.js.map +1 -1
  44. package/dist/{composite-router-HC4YLG5W.js → composite-router-WOVGICBS.js} +2 -2
  45. package/dist/{consensus-vote-KWPS6WNH.js → consensus-vote-322S65GQ.js} +16 -15
  46. package/dist/{context-retriever-YCKTCDGM.js → context-retriever-YMJY6YBJ.js} +9 -8
  47. package/dist/{doctor-deep-4UARVVSD.js → doctor-deep-DALT3OXC.js} +3 -3
  48. package/dist/{expert-bridge-EAR6XZJA.js → expert-bridge-WNV3ST2T.js} +4 -4
  49. package/dist/factory-33HQYVCK.js +23 -0
  50. package/dist/{factory-7SVW7XMV.js → factory-TLSTFONW.js} +5 -5
  51. package/dist/{improvement-review-AHSY5ZXD.js → improvement-review-2W6LKP74.js} +5 -5
  52. package/dist/index.js +43 -317
  53. package/dist/index.js.map +1 -1
  54. package/dist/{init-opencode-5BKE7UEB.js → init-opencode-XVTVJ6FN.js} +5 -6
  55. package/dist/{init-opencode-5BKE7UEB.js.map → init-opencode-XVTVJ6FN.js.map} +1 -1
  56. package/dist/{issue-triage-TNV4R33I.js → issue-triage-CVMVZ3IV.js} +6 -6
  57. package/dist/{pr-reviewer-helpers-ZC2I5ZYD.js → pr-reviewer-helpers-SAMOVLNJ.js} +4 -4
  58. package/dist/{registry-command-O2GLHG3G.js → registry-command-5D2DJT53.js} +2 -2
  59. package/dist/{repo-security-plan-CFRLHIMY.js → repo-security-plan-F7V5SHAQ.js} +3 -3
  60. package/dist/{research-helpers-synthesize-ONWBGXHO.js → research-helpers-synthesize-F4PV4B4B.js} +4 -4
  61. package/dist/{routing-memory-XHZKEPUH.js → routing-memory-G6YBK4WI.js} +2 -2
  62. package/dist/{session-memory-5QVKDE4U.js → session-memory-DAJHLPOY.js} +3 -3
  63. package/dist/{setup-command-G7OB4QQG.js → setup-command-NUNIRAFN.js} +14 -11
  64. package/dist/{setup-config-MMBOL5CW.js → setup-config-HKUWFV5N.js} +3 -3
  65. package/dist/{setup-custom-api-RQ3BUMJC.js → setup-custom-api-XRUPWEPF.js} +3 -3
  66. package/dist/{tool-memory-VK4IZLPN.js → tool-memory-XJ5VRMNQ.js} +5 -5
  67. package/dist/{unified-registry-ZOTGM4EY.js → unified-registry-ETKPTZBU.js} +10 -9
  68. package/dist/{weather-report-MPD66LKP.js → weather-report-TWBLIHPZ.js} +2 -2
  69. package/package.json +1 -1
  70. package/dist/chunk-FZV4YAYT.js.map +0 -1
  71. package/dist/chunk-OI6H3DL6.js +0 -197
  72. package/dist/chunk-OI6H3DL6.js.map +0 -1
  73. package/dist/chunk-PXTZ6RPP.js.map +0 -1
  74. package/dist/chunk-WOY6TQCH.js.map +0 -1
  75. package/dist/chunk-ZI4PO2A3.js.map +0 -1
  76. package/dist/factory-JYAUOFEN.js +0 -22
  77. /package/dist/{child-mcp-config-AUA4TFBG.js.map → child-mcp-config-X4YLQKGK.js.map} +0 -0
  78. /package/dist/{chunk-P54BDACX.js.map → chunk-2NU774CB.js.map} +0 -0
  79. /package/dist/{chunk-JBH4CU46.js.map → chunk-2S7T66IQ.js.map} +0 -0
  80. /package/dist/{chunk-UO6C5J5D.js.map → chunk-3T6KLPGT.js.map} +0 -0
  81. /package/dist/{chunk-ORRKK563.js.map → chunk-7K5LSUEU.js.map} +0 -0
  82. /package/dist/{chunk-GS3UPAUE.js.map → chunk-7USEQLMS.js.map} +0 -0
  83. /package/dist/{chunk-K2IX6BEK.js.map → chunk-7YD3TRDX.js.map} +0 -0
  84. /package/dist/{chunk-IF46G2LM.js.map → chunk-BB7KSLNA.js.map} +0 -0
  85. /package/dist/{chunk-NEQJSYJH.js.map → chunk-COIZLMGV.js.map} +0 -0
  86. /package/dist/{chunk-Z66EEQ4A.js.map → chunk-CURHM4TH.js.map} +0 -0
  87. /package/dist/{chunk-BZFF3YWU.js.map → chunk-GGYQTV2Y.js.map} +0 -0
  88. /package/dist/{chunk-HNAFWKJG.js.map → chunk-GRWHPG72.js.map} +0 -0
  89. /package/dist/{chunk-AWPSFL5C.js.map → chunk-GVNY4ZB6.js.map} +0 -0
  90. /package/dist/{chunk-YKTVN2TF.js.map → chunk-IFSIKGHI.js.map} +0 -0
  91. /package/dist/{chunk-LRBEUBZ3.js.map → chunk-JKUX73VD.js.map} +0 -0
  92. /package/dist/{chunk-I7OZP6FS.js.map → chunk-KM3YEIEN.js.map} +0 -0
  93. /package/dist/{chunk-THI3VWHO.js.map → chunk-O6VL6LA4.js.map} +0 -0
  94. /package/dist/{chunk-6LXTT6AK.js.map → chunk-PC4Y4VPX.js.map} +0 -0
  95. /package/dist/{chunk-DMFMJFRY.js.map → chunk-QPSYBHK6.js.map} +0 -0
  96. /package/dist/{chunk-BFDVV3Q3.js.map → chunk-QV52AXTF.js.map} +0 -0
  97. /package/dist/{chunk-JYVPM37A.js.map → chunk-RKIPSMCN.js.map} +0 -0
  98. /package/dist/{chunk-F2YZ3U6O.js.map → chunk-SRNAXDOT.js.map} +0 -0
  99. /package/dist/{chunk-V5RPW2ZX.js.map → chunk-STMW5BSR.js.map} +0 -0
  100. /package/dist/{chunk-FQNG6ZIW.js.map → chunk-TGAVZ2ZL.js.map} +0 -0
  101. /package/dist/{chunk-UWRDWX6L.js.map → chunk-UNIDAVVR.js.map} +0 -0
  102. /package/dist/{chunk-76Q6GTPU.js.map → chunk-VNVGGM73.js.map} +0 -0
  103. /package/dist/{chunk-FKHQWC2L.js.map → chunk-XUMLVCFL.js.map} +0 -0
  104. /package/dist/{chunk-WL4SGKAW.js.map → chunk-ZAPCPHGZ.js.map} +0 -0
  105. /package/dist/{chunk-PRSGZQNB.js.map → chunk-ZIC6ZZFU.js.map} +0 -0
  106. /package/dist/{chunk-3LVB5OE2.js.map → chunk-ZTTUXPBQ.js.map} +0 -0
  107. /package/dist/{cli-circuit-breaker-FSUDU7BV.js.map → cli-circuit-breaker-2AAHSCHR.js.map} +0 -0
  108. /package/dist/{composite-router-HC4YLG5W.js.map → composite-router-WOVGICBS.js.map} +0 -0
  109. /package/dist/{consensus-vote-KWPS6WNH.js.map → consensus-vote-322S65GQ.js.map} +0 -0
  110. /package/dist/{context-retriever-YCKTCDGM.js.map → context-retriever-YMJY6YBJ.js.map} +0 -0
  111. /package/dist/{doctor-deep-4UARVVSD.js.map → doctor-deep-DALT3OXC.js.map} +0 -0
  112. /package/dist/{expert-bridge-EAR6XZJA.js.map → expert-bridge-WNV3ST2T.js.map} +0 -0
  113. /package/dist/{factory-7SVW7XMV.js.map → factory-33HQYVCK.js.map} +0 -0
  114. /package/dist/{factory-JYAUOFEN.js.map → factory-TLSTFONW.js.map} +0 -0
  115. /package/dist/{improvement-review-AHSY5ZXD.js.map → improvement-review-2W6LKP74.js.map} +0 -0
  116. /package/dist/{issue-triage-TNV4R33I.js.map → issue-triage-CVMVZ3IV.js.map} +0 -0
  117. /package/dist/{pr-reviewer-helpers-ZC2I5ZYD.js.map → pr-reviewer-helpers-SAMOVLNJ.js.map} +0 -0
  118. /package/dist/{registry-command-O2GLHG3G.js.map → registry-command-5D2DJT53.js.map} +0 -0
  119. /package/dist/{repo-security-plan-CFRLHIMY.js.map → repo-security-plan-F7V5SHAQ.js.map} +0 -0
  120. /package/dist/{research-helpers-synthesize-ONWBGXHO.js.map → research-helpers-synthesize-F4PV4B4B.js.map} +0 -0
  121. /package/dist/{routing-memory-XHZKEPUH.js.map → routing-memory-G6YBK4WI.js.map} +0 -0
  122. /package/dist/{session-memory-5QVKDE4U.js.map → session-memory-DAJHLPOY.js.map} +0 -0
  123. /package/dist/{setup-command-G7OB4QQG.js.map → setup-command-NUNIRAFN.js.map} +0 -0
  124. /package/dist/{setup-config-MMBOL5CW.js.map → setup-config-HKUWFV5N.js.map} +0 -0
  125. /package/dist/{setup-custom-api-RQ3BUMJC.js.map → setup-custom-api-XRUPWEPF.js.map} +0 -0
  126. /package/dist/{tool-memory-VK4IZLPN.js.map → tool-memory-XJ5VRMNQ.js.map} +0 -0
  127. /package/dist/{unified-registry-ZOTGM4EY.js.map → unified-registry-ETKPTZBU.js.map} +0 -0
  128. /package/dist/{weather-report-MPD66LKP.js.map → weather-report-TWBLIHPZ.js.map} +0 -0
@@ -9,11 +9,11 @@ import {
9
9
  gateWithReputation,
10
10
  resolveReputationGatingMode,
11
11
  sanitizeInput
12
- } from "./chunk-F2YZ3U6O.js";
12
+ } from "./chunk-SRNAXDOT.js";
13
13
  import {
14
14
  createLogger,
15
15
  getTimeProvider
16
- } from "./chunk-Z66EEQ4A.js";
16
+ } from "./chunk-CURHM4TH.js";
17
17
 
18
18
  // src/dogfooding/pr-reviewer-helpers.ts
19
19
  import { randomUUID } from "crypto";
@@ -288,4 +288,4 @@ export {
288
288
  formatReviewComment,
289
289
  createFailedReview
290
290
  };
291
- //# sourceMappingURL=chunk-LRBEUBZ3.js.map
291
+ //# sourceMappingURL=chunk-JKUX73VD.js.map
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-6T3EPABN.js";
6
6
  import {
7
7
  SessionMemory
8
- } from "./chunk-DMFMJFRY.js";
8
+ } from "./chunk-QPSYBHK6.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-GS3UPAUE.js";
18
+ } from "./chunk-7USEQLMS.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-Z66EEQ4A.js";
31
+ } from "./chunk-CURHM4TH.js";
32
32
  import {
33
33
  nexusDataPath
34
34
  } from "./chunk-DHVMSIT5.js";
@@ -5552,4 +5552,4 @@ export {
5552
5552
  reinitializeMemoryBackends,
5553
5553
  ToolMemoryManager
5554
5554
  };
5555
- //# sourceMappingURL=chunk-I7OZP6FS.js.map
5555
+ //# sourceMappingURL=chunk-KM3YEIEN.js.map
@@ -2,7 +2,7 @@ import {
2
2
  TASK_CATEGORIES,
3
3
  getAdaptiveBonus,
4
4
  getOutcomeStore
5
- } from "./chunk-Z66EEQ4A.js";
5
+ } from "./chunk-CURHM4TH.js";
6
6
 
7
7
  // src/cli/doctor-deep.ts
8
8
  var CLI_NAMES = ["claude", "gemini", "codex", "opencode"];
@@ -106,4 +106,4 @@ export {
106
106
  runDeepDiagnostics,
107
107
  formatDeepDiagnostics
108
108
  };
109
- //# sourceMappingURL=chunk-THI3VWHO.js.map
109
+ //# sourceMappingURL=chunk-O6VL6LA4.js.map
@@ -8,7 +8,7 @@ import {
8
8
  getErrorMessage,
9
9
  ok,
10
10
  parseBoolEnv
11
- } from "./chunk-Z66EEQ4A.js";
11
+ } from "./chunk-CURHM4TH.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-6LXTT6AK.js.map
149
+ //# sourceMappingURL=chunk-PC4Y4VPX.js.map
@@ -4,7 +4,7 @@ import {
4
4
  getErrorMessage,
5
5
  getTimeProvider,
6
6
  ok
7
- } from "./chunk-Z66EEQ4A.js";
7
+ } from "./chunk-CURHM4TH.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-DMFMJFRY.js.map
355
+ //# sourceMappingURL=chunk-QPSYBHK6.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getTimeProvider
3
- } from "./chunk-Z66EEQ4A.js";
3
+ } from "./chunk-CURHM4TH.js";
4
4
 
5
5
  // src/security/audit-trail.ts
6
6
  var MAX_EVENTS = 1e4;
@@ -205,4 +205,4 @@ export {
205
205
  createGraphAuditBridge,
206
206
  createAuditTrail
207
207
  };
208
- //# sourceMappingURL=chunk-BFDVV3Q3.js.map
208
+ //# sourceMappingURL=chunk-QV52AXTF.js.map
@@ -0,0 +1,56 @@
1
+ // src/context/token-counter-helpers.ts
2
+ import "@anthropic-ai/sdk";
3
+ function generateCacheKey(content, provider, model) {
4
+ const contentStr = typeof content === "string" ? content : JSON.stringify(content);
5
+ return `${provider}:${model ?? "default"}:${contentStr}`;
6
+ }
7
+ function messagesToAnthropicFormat(messages) {
8
+ return messages.filter((m) => m.role !== "system").map((m) => {
9
+ const role = m.role === "user" ? "user" : "assistant";
10
+ if (typeof m.content === "string") {
11
+ return { role, content: m.content };
12
+ }
13
+ const content = m.content.map((block) => {
14
+ if (block.type === "text") {
15
+ return { type: "text", text: block.text };
16
+ }
17
+ if (block.type === "tool_use") {
18
+ return {
19
+ type: "tool_use",
20
+ id: block.id,
21
+ name: block.name,
22
+ input: block.input
23
+ };
24
+ }
25
+ if (block.type === "tool_result") {
26
+ return {
27
+ type: "tool_result",
28
+ tool_use_id: block.tool_use_id,
29
+ content: block.content
30
+ };
31
+ }
32
+ return {
33
+ type: "image",
34
+ source: block.source
35
+ };
36
+ });
37
+ return { role, content };
38
+ });
39
+ }
40
+ function extractSystemPrompt(messages) {
41
+ const systemMsg = messages.find((m) => m.role === "system");
42
+ if (systemMsg === void 0) {
43
+ return void 0;
44
+ }
45
+ if (typeof systemMsg.content === "string") {
46
+ return systemMsg.content;
47
+ }
48
+ return systemMsg.content.filter((b) => b.type === "text").map((b) => b.text).join("\n");
49
+ }
50
+
51
+ export {
52
+ generateCacheKey,
53
+ messagesToAnthropicFormat,
54
+ extractSystemPrompt
55
+ };
56
+ //# sourceMappingURL=chunk-QZUG667L.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/context/token-counter-helpers.ts"],"sourcesContent":["/**\n * nexus-agents/context - Token Counter Helpers\n *\n * Internal helper functions for token counting.\n *\n * @module context/token-counter-helpers\n */\n\nimport Anthropic from '@anthropic-ai/sdk';\nimport type { Message } from '../core/index.js';\nimport type { TokenCounterProvider } from './token-counter-types.js';\n\n/**\n * Generates a cache key from content.\n */\nexport function generateCacheKey(\n content: string | Message[],\n provider: TokenCounterProvider | 'estimate',\n model?: string\n): string {\n const contentStr = typeof content === 'string' ? content : JSON.stringify(content);\n return `${provider}:${model ?? 'default'}:${contentStr}`;\n}\n\n/**\n * Converts Message[] to Anthropic MessageParam[] format.\n */\nexport function messagesToAnthropicFormat(messages: Message[]): Anthropic.MessageParam[] {\n return messages\n .filter((m) => m.role !== 'system')\n .map((m) => {\n const role = m.role === 'user' ? 'user' : 'assistant';\n if (typeof m.content === 'string') {\n return { role, content: m.content };\n }\n // Map content blocks\n const content = m.content.map((block) => {\n if (block.type === 'text') {\n return { type: 'text' as const, text: block.text };\n }\n if (block.type === 'tool_use') {\n return {\n type: 'tool_use' as const,\n id: block.id,\n name: block.name,\n input: block.input,\n };\n }\n if (block.type === 'tool_result') {\n return {\n type: 'tool_result' as const,\n tool_use_id: block.tool_use_id,\n content: block.content,\n };\n }\n // Image type - handle source type properly\n return {\n type: 'image' as const,\n source: block.source as Anthropic.ImageBlockParam['source'],\n };\n });\n return { role, content };\n });\n}\n\n/**\n * Extracts system prompt from messages if present.\n */\nexport function extractSystemPrompt(messages: Message[]): string | undefined {\n const systemMsg = messages.find((m) => m.role === 'system');\n if (systemMsg === undefined) {\n return undefined;\n }\n if (typeof systemMsg.content === 'string') {\n return systemMsg.content;\n }\n return systemMsg.content\n .filter((b): b is { type: 'text'; text: string } => b.type === 'text')\n .map((b) => b.text)\n .join('\\n');\n}\n"],"mappings":";AAQA,OAAsB;AAOf,SAAS,iBACd,SACA,UACA,OACQ;AACR,QAAM,aAAa,OAAO,YAAY,WAAW,UAAU,KAAK,UAAU,OAAO;AACjF,SAAO,GAAG,QAAQ,IAAI,SAAS,SAAS,IAAI,UAAU;AACxD;AAKO,SAAS,0BAA0B,UAA+C;AACvF,SAAO,SACJ,OAAO,CAAC,MAAM,EAAE,SAAS,QAAQ,EACjC,IAAI,CAAC,MAAM;AACV,UAAM,OAAO,EAAE,SAAS,SAAS,SAAS;AAC1C,QAAI,OAAO,EAAE,YAAY,UAAU;AACjC,aAAO,EAAE,MAAM,SAAS,EAAE,QAAQ;AAAA,IACpC;AAEA,UAAM,UAAU,EAAE,QAAQ,IAAI,CAAC,UAAU;AACvC,UAAI,MAAM,SAAS,QAAQ;AACzB,eAAO,EAAE,MAAM,QAAiB,MAAM,MAAM,KAAK;AAAA,MACnD;AACA,UAAI,MAAM,SAAS,YAAY;AAC7B,eAAO;AAAA,UACL,MAAM;AAAA,UACN,IAAI,MAAM;AAAA,UACV,MAAM,MAAM;AAAA,UACZ,OAAO,MAAM;AAAA,QACf;AAAA,MACF;AACA,UAAI,MAAM,SAAS,eAAe;AAChC,eAAO;AAAA,UACL,MAAM;AAAA,UACN,aAAa,MAAM;AAAA,UACnB,SAAS,MAAM;AAAA,QACjB;AAAA,MACF;AAEA,aAAO;AAAA,QACL,MAAM;AAAA,QACN,QAAQ,MAAM;AAAA,MAChB;AAAA,IACF,CAAC;AACD,WAAO,EAAE,MAAM,QAAQ;AAAA,EACzB,CAAC;AACL;AAKO,SAAS,oBAAoB,UAAyC;AAC3E,QAAM,YAAY,SAAS,KAAK,CAAC,MAAM,EAAE,SAAS,QAAQ;AAC1D,MAAI,cAAc,QAAW;AAC3B,WAAO;AAAA,EACT;AACA,MAAI,OAAO,UAAU,YAAY,UAAU;AACzC,WAAO,UAAU;AAAA,EACnB;AACA,SAAO,UAAU,QACd,OAAO,CAAC,MAA2C,EAAE,SAAS,MAAM,EACpE,IAAI,CAAC,MAAM,EAAE,IAAI,EACjB,KAAK,IAAI;AACd;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  GitHubProvider,
3
3
  ScmError
4
- } from "./chunk-IF46G2LM.js";
4
+ } from "./chunk-BB7KSLNA.js";
5
5
  import {
6
6
  ROLE_DEFAULT_TRUST,
7
7
  ReputationCache,
@@ -11,17 +11,17 @@ import {
11
11
  gateWithReputation,
12
12
  resolveReputationGatingMode,
13
13
  sanitizeInput
14
- } from "./chunk-F2YZ3U6O.js";
14
+ } from "./chunk-SRNAXDOT.js";
15
15
  import {
16
16
  emitPolicyEvent
17
- } from "./chunk-BFDVV3Q3.js";
17
+ } from "./chunk-QV52AXTF.js";
18
18
  import {
19
19
  CLI_SUBPROCESS_TIMEOUTS,
20
20
  createLogger,
21
21
  err,
22
22
  getTimeProvider,
23
23
  ok
24
- } from "./chunk-Z66EEQ4A.js";
24
+ } from "./chunk-CURHM4TH.js";
25
25
 
26
26
  // src/security/trust-classifier.ts
27
27
  function mapAuthorAssociation(association) {
@@ -1211,4 +1211,4 @@ export {
1211
1211
  IssueTriage,
1212
1212
  createIssueTriage
1213
1213
  };
1214
- //# sourceMappingURL=chunk-JYVPM37A.js.map
1214
+ //# sourceMappingURL=chunk-RKIPSMCN.js.map
@@ -5,24 +5,27 @@ import {
5
5
  planOptionalParams,
6
6
  requireApiKey,
7
7
  validateApiKeyPresence
8
- } from "./chunk-YKTVN2TF.js";
8
+ } from "./chunk-IFSIKGHI.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-P54BDACX.js";
15
+ } from "./chunk-2NU774CB.js";
16
16
  import {
17
17
  CliCircuitBreaker,
18
18
  DEFAULT_CIRCUIT_BREAKER_CONFIG
19
- } from "./chunk-AWPSFL5C.js";
19
+ } from "./chunk-GVNY4ZB6.js";
20
20
  import {
21
21
  getAvailabilityCache
22
- } from "./chunk-3LVB5OE2.js";
22
+ } from "./chunk-ZTTUXPBQ.js";
23
+ import {
24
+ extractSystemPrompt
25
+ } from "./chunk-QZUG667L.js";
23
26
  import {
24
27
  generateHyphenId
25
- } from "./chunk-GS3UPAUE.js";
28
+ } from "./chunk-7USEQLMS.js";
26
29
  import {
27
30
  CLI_SUBPROCESS_TIMEOUTS,
28
31
  CLI_TIMEOUTS,
@@ -58,7 +61,7 @@ import {
58
61
  loadModelsDevSnapshot,
59
62
  ok,
60
63
  resolveCliAlias
61
- } from "./chunk-Z66EEQ4A.js";
64
+ } from "./chunk-CURHM4TH.js";
62
65
 
63
66
  // src/cli-adapters/cli-to-model-adapter.ts
64
67
  var CliToModelAdapter = class {
@@ -329,7 +332,7 @@ function createModelToCliAdapter(modelAdapter, config) {
329
332
  }
330
333
 
331
334
  // src/adapters/claude-adapter.ts
332
- import Anthropic3 from "@anthropic-ai/sdk";
335
+ import Anthropic2 from "@anthropic-ai/sdk";
333
336
 
334
337
  // src/adapters/claude-adapter-types.ts
335
338
  var CLAUDE_MODELS = {
@@ -459,56 +462,6 @@ function getModelCapabilities(modelId) {
459
462
  return capabilities;
460
463
  }
461
464
 
462
- // src/context/token-counter-helpers.ts
463
- import "@anthropic-ai/sdk";
464
- function generateCacheKey(content, provider, model) {
465
- const contentStr = typeof content === "string" ? content : JSON.stringify(content);
466
- return `${provider}:${model ?? "default"}:${contentStr}`;
467
- }
468
- function messagesToAnthropicFormat(messages) {
469
- return messages.filter((m) => m.role !== "system").map((m) => {
470
- const role = m.role === "user" ? "user" : "assistant";
471
- if (typeof m.content === "string") {
472
- return { role, content: m.content };
473
- }
474
- const content = m.content.map((block) => {
475
- if (block.type === "text") {
476
- return { type: "text", text: block.text };
477
- }
478
- if (block.type === "tool_use") {
479
- return {
480
- type: "tool_use",
481
- id: block.id,
482
- name: block.name,
483
- input: block.input
484
- };
485
- }
486
- if (block.type === "tool_result") {
487
- return {
488
- type: "tool_result",
489
- tool_use_id: block.tool_use_id,
490
- content: block.content
491
- };
492
- }
493
- return {
494
- type: "image",
495
- source: block.source
496
- };
497
- });
498
- return { role, content };
499
- });
500
- }
501
- function extractSystemPrompt(messages) {
502
- const systemMsg = messages.find((m) => m.role === "system");
503
- if (systemMsg === void 0) {
504
- return void 0;
505
- }
506
- if (typeof systemMsg.content === "string") {
507
- return systemMsg.content;
508
- }
509
- return systemMsg.content.filter((b) => b.type === "text").map((b) => b.text).join("\n");
510
- }
511
-
512
465
  // src/adapters/prompt-utils.ts
513
466
  function extractRequestSystemPrompt(request) {
514
467
  if (request.systemPrompt !== void 0 && request.systemPrompt !== "") {
@@ -547,7 +500,7 @@ var ClaudeAdapter = class extends BaseAdapter {
547
500
  super(baseConfig);
548
501
  this.resolvedModelId = resolvedModelId;
549
502
  requireApiKey(config.apiKey, "Anthropic", config.modelId);
550
- this.client = new Anthropic3({
503
+ this.client = new Anthropic2({
551
504
  apiKey: config.apiKey,
552
505
  baseURL: config.baseUrl,
553
506
  timeout: config.timeout,
@@ -4858,13 +4811,10 @@ export {
4858
4811
  getAvailableClis,
4859
4812
  CLAUDE_MODELS,
4860
4813
  CLAUDE_MODEL_ALIASES,
4861
- generateCacheKey,
4862
- messagesToAnthropicFormat,
4863
- extractSystemPrompt,
4864
4814
  extractRequestSystemPrompt,
4865
4815
  ClaudeAdapter,
4866
4816
  createClaudeAdapter,
4867
4817
  SdkAdapter,
4868
4818
  createAutoAdapter
4869
4819
  };
4870
- //# sourceMappingURL=chunk-ZI4PO2A3.js.map
4820
+ //# sourceMappingURL=chunk-S6HCREYY.js.map