@illuma-ai/agents 1.5.0 → 1.5.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 (404) hide show
  1. package/dist/cjs/agents/AgentContext.cjs +2 -2
  2. package/dist/cjs/agents/AgentContext.cjs.map +1 -1
  3. package/dist/cjs/common/enum.cjs +12 -12
  4. package/dist/cjs/common/enum.cjs.map +1 -1
  5. package/dist/cjs/graphs/Graph.cjs +5 -5
  6. package/dist/cjs/graphs/Graph.cjs.map +1 -1
  7. package/dist/cjs/graphs/MultiAgentGraph.cjs +1 -1
  8. package/dist/cjs/graphs/MultiAgentGraph.cjs.map +1 -1
  9. package/dist/cjs/graphs/phases/memoryFlushPhase.cjs +1 -1
  10. package/dist/cjs/graphs/phases/memoryFlushPhase.cjs.map +1 -1
  11. package/dist/cjs/hooks/HookRegistry.cjs +1 -1
  12. package/dist/cjs/hooks/HookRegistry.cjs.map +1 -1
  13. package/dist/cjs/hooks/matchers.cjs +2 -2
  14. package/dist/cjs/hooks/matchers.cjs.map +1 -1
  15. package/dist/cjs/hooks/types.cjs +1 -1
  16. package/dist/cjs/hooks/types.cjs.map +1 -1
  17. package/dist/cjs/llm/bedrock/cacheSupport.cjs +1 -1
  18. package/dist/cjs/llm/bedrock/cacheSupport.cjs.map +1 -1
  19. package/dist/cjs/llm/bedrock/index.cjs +2 -2
  20. package/dist/cjs/llm/bedrock/index.cjs.map +1 -1
  21. package/dist/cjs/llm/openai/index.cjs +1 -1
  22. package/dist/cjs/llm/openai/index.cjs.map +1 -1
  23. package/dist/cjs/llm/openai/utils/index.cjs +2 -2
  24. package/dist/cjs/llm/openai/utils/index.cjs.map +1 -1
  25. package/dist/cjs/memory/citations.cjs +4 -4
  26. package/dist/cjs/memory/citations.cjs.map +1 -1
  27. package/dist/cjs/memory/constants.cjs +17 -17
  28. package/dist/cjs/memory/constants.cjs.map +1 -1
  29. package/dist/cjs/memory/mmr.cjs +1 -1
  30. package/dist/cjs/memory/mmr.cjs.map +1 -1
  31. package/dist/cjs/memory/paths.cjs +1 -1
  32. package/dist/cjs/memory/paths.cjs.map +1 -1
  33. package/dist/cjs/memory/recallTracking.cjs +3 -3
  34. package/dist/cjs/memory/recallTracking.cjs.map +1 -1
  35. package/dist/cjs/memory/temporalDecay.cjs +2 -2
  36. package/dist/cjs/memory/temporalDecay.cjs.map +1 -1
  37. package/dist/cjs/messages/format.cjs +3 -3
  38. package/dist/cjs/messages/format.cjs.map +1 -1
  39. package/dist/cjs/tools/CodeExecutor.cjs +4 -3
  40. package/dist/cjs/tools/CodeExecutor.cjs.map +1 -1
  41. package/dist/cjs/tools/ToolNode.cjs +5 -5
  42. package/dist/cjs/tools/ToolNode.cjs.map +1 -1
  43. package/dist/cjs/tools/memory/memoryAppendTool.cjs +1 -1
  44. package/dist/cjs/tools/memory/memoryAppendTool.cjs.map +1 -1
  45. package/dist/cjs/tools/memory/memoryGetTool.cjs +2 -2
  46. package/dist/cjs/tools/memory/memoryGetTool.cjs.map +1 -1
  47. package/dist/cjs/tools/memory/memorySearchTool.cjs +3 -3
  48. package/dist/cjs/tools/memory/memorySearchTool.cjs.map +1 -1
  49. package/dist/cjs/tools/memory/shared.cjs +1 -1
  50. package/dist/cjs/tools/memory/shared.cjs.map +1 -1
  51. package/dist/cjs/types/agent-cache.cjs +6 -5
  52. package/dist/cjs/types/agent-cache.cjs.map +1 -1
  53. package/dist/cjs/types/graph.cjs.map +1 -1
  54. package/dist/esm/agents/AgentContext.mjs +2 -2
  55. package/dist/esm/agents/AgentContext.mjs.map +1 -1
  56. package/dist/esm/common/enum.mjs +12 -12
  57. package/dist/esm/common/enum.mjs.map +1 -1
  58. package/dist/esm/graphs/Graph.mjs +5 -5
  59. package/dist/esm/graphs/Graph.mjs.map +1 -1
  60. package/dist/esm/graphs/MultiAgentGraph.mjs +1 -1
  61. package/dist/esm/graphs/MultiAgentGraph.mjs.map +1 -1
  62. package/dist/esm/graphs/phases/memoryFlushPhase.mjs +1 -1
  63. package/dist/esm/graphs/phases/memoryFlushPhase.mjs.map +1 -1
  64. package/dist/esm/hooks/HookRegistry.mjs +1 -1
  65. package/dist/esm/hooks/HookRegistry.mjs.map +1 -1
  66. package/dist/esm/hooks/matchers.mjs +2 -2
  67. package/dist/esm/hooks/matchers.mjs.map +1 -1
  68. package/dist/esm/hooks/types.mjs +1 -1
  69. package/dist/esm/hooks/types.mjs.map +1 -1
  70. package/dist/esm/llm/bedrock/cacheSupport.mjs +1 -1
  71. package/dist/esm/llm/bedrock/cacheSupport.mjs.map +1 -1
  72. package/dist/esm/llm/bedrock/index.mjs +2 -2
  73. package/dist/esm/llm/bedrock/index.mjs.map +1 -1
  74. package/dist/esm/llm/openai/index.mjs +1 -1
  75. package/dist/esm/llm/openai/index.mjs.map +1 -1
  76. package/dist/esm/llm/openai/utils/index.mjs +2 -2
  77. package/dist/esm/llm/openai/utils/index.mjs.map +1 -1
  78. package/dist/esm/memory/citations.mjs +4 -4
  79. package/dist/esm/memory/citations.mjs.map +1 -1
  80. package/dist/esm/memory/constants.mjs +17 -17
  81. package/dist/esm/memory/constants.mjs.map +1 -1
  82. package/dist/esm/memory/mmr.mjs +1 -1
  83. package/dist/esm/memory/mmr.mjs.map +1 -1
  84. package/dist/esm/memory/paths.mjs +1 -1
  85. package/dist/esm/memory/paths.mjs.map +1 -1
  86. package/dist/esm/memory/recallTracking.mjs +3 -3
  87. package/dist/esm/memory/recallTracking.mjs.map +1 -1
  88. package/dist/esm/memory/temporalDecay.mjs +2 -2
  89. package/dist/esm/memory/temporalDecay.mjs.map +1 -1
  90. package/dist/esm/messages/format.mjs +3 -3
  91. package/dist/esm/messages/format.mjs.map +1 -1
  92. package/dist/esm/tools/CodeExecutor.mjs +4 -3
  93. package/dist/esm/tools/CodeExecutor.mjs.map +1 -1
  94. package/dist/esm/tools/ToolNode.mjs +5 -5
  95. package/dist/esm/tools/ToolNode.mjs.map +1 -1
  96. package/dist/esm/tools/memory/memoryAppendTool.mjs +1 -1
  97. package/dist/esm/tools/memory/memoryAppendTool.mjs.map +1 -1
  98. package/dist/esm/tools/memory/memoryGetTool.mjs +2 -2
  99. package/dist/esm/tools/memory/memoryGetTool.mjs.map +1 -1
  100. package/dist/esm/tools/memory/memorySearchTool.mjs +3 -3
  101. package/dist/esm/tools/memory/memorySearchTool.mjs.map +1 -1
  102. package/dist/esm/tools/memory/shared.mjs +1 -1
  103. package/dist/esm/tools/memory/shared.mjs.map +1 -1
  104. package/dist/esm/types/agent-cache.mjs +6 -5
  105. package/dist/esm/types/agent-cache.mjs.map +1 -1
  106. package/dist/esm/types/graph.mjs.map +1 -1
  107. package/dist/types/agents/AgentContext.d.ts +1 -1
  108. package/dist/types/common/enum.d.ts +12 -12
  109. package/dist/types/graphs/Graph.d.ts +2 -2
  110. package/dist/types/graphs/phases/memoryFlushPhase.d.ts +2 -2
  111. package/dist/types/hooks/HookRegistry.d.ts +1 -1
  112. package/dist/types/hooks/matchers.d.ts +2 -2
  113. package/dist/types/hooks/types.d.ts +1 -1
  114. package/dist/types/llm/bedrock/cacheSupport.d.ts +1 -1
  115. package/dist/types/llm/bedrock/index.d.ts +2 -2
  116. package/dist/types/llm/openai/index.d.ts +1 -1
  117. package/dist/types/memory/citations.d.ts +4 -4
  118. package/dist/types/memory/constants.d.ts +17 -17
  119. package/dist/types/memory/mmr.d.ts +3 -3
  120. package/dist/types/memory/paths.d.ts +1 -1
  121. package/dist/types/memory/temporalDecay.d.ts +2 -2
  122. package/dist/types/memory/types.d.ts +3 -3
  123. package/dist/types/messages/format.d.ts +1 -1
  124. package/dist/types/tools/ToolNode.d.ts +3 -3
  125. package/dist/types/tools/memory/shared.d.ts +1 -1
  126. package/dist/types/types/agent-cache.d.ts +6 -5
  127. package/dist/types/types/graph.d.ts +7 -6
  128. package/dist/types/types/messages.d.ts +1 -1
  129. package/dist/types/types/run.d.ts +1 -1
  130. package/dist/types/types/tools.d.ts +5 -5
  131. package/package.json +1 -1
  132. package/src/agents/AgentContext.ts +2 -2
  133. package/src/agents/__tests__/AgentContext.crossAgentTier1.live.test.ts +5 -3
  134. package/src/agents/__tests__/AgentContext.test.ts +1 -1
  135. package/src/common/__tests__/enum.test.ts +1 -1
  136. package/src/common/enum.ts +12 -12
  137. package/src/graphs/Graph.ts +5 -5
  138. package/src/graphs/MultiAgentGraph.ts +1 -1
  139. package/src/graphs/gapFeatures.test.ts +1 -1
  140. package/src/graphs/phases/__tests__/memoryFlushPhase.test.ts +1 -1
  141. package/src/graphs/phases/memoryFlushPhase.ts +2 -2
  142. package/src/hooks/HookRegistry.ts +1 -1
  143. package/src/hooks/index.ts +1 -1
  144. package/src/hooks/matchers.ts +2 -2
  145. package/src/hooks/types.ts +1 -1
  146. package/src/llm/anthropic/utils/server-tool-inputs.test.ts +7 -7
  147. package/src/llm/bedrock/__tests__/bedrock-caching.test.ts +2 -2
  148. package/src/llm/bedrock/cacheSupport.ts +1 -1
  149. package/src/llm/bedrock/index.ts +2 -2
  150. package/src/llm/openai/index.ts +2 -2
  151. package/src/llm/openai/utils/index.ts +2 -2
  152. package/src/memory/citations.ts +4 -4
  153. package/src/memory/constants.ts +17 -17
  154. package/src/memory/mmr.ts +3 -3
  155. package/src/memory/paths.ts +1 -1
  156. package/src/memory/recallTracking.ts +3 -3
  157. package/src/memory/temporalDecay.ts +2 -2
  158. package/src/memory/types.ts +3 -3
  159. package/src/messages/cache.test.ts +1 -1
  160. package/src/messages/ensureThinkingBlock.test.ts +1 -1
  161. package/src/messages/format.ts +4 -4
  162. package/src/messages/formatAgentMessages.test.ts +1 -1
  163. package/src/scripts/subagent-event-driven-debug.ts +2 -2
  164. package/src/specs/anthropic.simple.test.ts +1 -1
  165. package/src/specs/prune.orphans.test.ts +1 -1
  166. package/src/tools/CodeExecutor.ts +4 -3
  167. package/src/tools/ToolNode.ts +6 -6
  168. package/src/tools/__tests__/CodeExecutor.test.ts +3 -3
  169. package/src/tools/memory/memoryAppendTool.ts +1 -1
  170. package/src/tools/memory/memoryGetTool.ts +2 -2
  171. package/src/tools/memory/memorySearchTool.ts +3 -3
  172. package/src/tools/memory/shared.ts +1 -1
  173. package/src/types/agent-cache.ts +6 -5
  174. package/src/types/graph.ts +7 -6
  175. package/src/types/messages.ts +1 -1
  176. package/src/types/run.ts +1 -1
  177. package/src/types/tools.ts +5 -5
  178. package/dist/types/tools/search/test.d.ts +0 -1
  179. package/src/agents/AgentContext.js.map +0 -1
  180. package/src/agents/AgentContext.test.js.map +0 -1
  181. package/src/agents/__tests__/AgentContext.test.js.map +0 -1
  182. package/src/agents/__tests__/resolveStructuredOutputMode.test.js.map +0 -1
  183. package/src/common/enum.js.map +0 -1
  184. package/src/common/index.js.map +0 -1
  185. package/src/events.js.map +0 -1
  186. package/src/graphs/Graph.js.map +0 -1
  187. package/src/graphs/MultiAgentGraph.js.map +0 -1
  188. package/src/graphs/__tests__/structured-output.integration.test.js.map +0 -1
  189. package/src/graphs/__tests__/structured-output.test.js.map +0 -1
  190. package/src/graphs/contextManagement.e2e.test.js.map +0 -1
  191. package/src/graphs/contextManagement.test.js.map +0 -1
  192. package/src/graphs/handoffValidation.test.js.map +0 -1
  193. package/src/graphs/index.js.map +0 -1
  194. package/src/index.js.map +0 -1
  195. package/src/instrumentation.js.map +0 -1
  196. package/src/llm/anthropic/index.js.map +0 -1
  197. package/src/llm/anthropic/types.js.map +0 -1
  198. package/src/llm/anthropic/utils/message_inputs.js.map +0 -1
  199. package/src/llm/anthropic/utils/message_outputs.js.map +0 -1
  200. package/src/llm/anthropic/utils/output_parsers.js.map +0 -1
  201. package/src/llm/anthropic/utils/tools.js.map +0 -1
  202. package/src/llm/bedrock/__tests__/bedrock-caching.test.js.map +0 -1
  203. package/src/llm/bedrock/index.js.map +0 -1
  204. package/src/llm/bedrock/types.js.map +0 -1
  205. package/src/llm/bedrock/utils/index.js.map +0 -1
  206. package/src/llm/bedrock/utils/message_inputs.js.map +0 -1
  207. package/src/llm/bedrock/utils/message_outputs.js.map +0 -1
  208. package/src/llm/fake.js.map +0 -1
  209. package/src/llm/google/index.js.map +0 -1
  210. package/src/llm/google/types.js.map +0 -1
  211. package/src/llm/google/utils/common.js.map +0 -1
  212. package/src/llm/google/utils/tools.js.map +0 -1
  213. package/src/llm/google/utils/zod_to_genai_parameters.js.map +0 -1
  214. package/src/llm/openai/index.js.map +0 -1
  215. package/src/llm/openai/types.js.map +0 -1
  216. package/src/llm/openai/utils/index.js.map +0 -1
  217. package/src/llm/openai/utils/isReasoningModel.test.js.map +0 -1
  218. package/src/llm/openrouter/index.js.map +0 -1
  219. package/src/llm/openrouter/reasoning.test.js.map +0 -1
  220. package/src/llm/providers.js.map +0 -1
  221. package/src/llm/text.js.map +0 -1
  222. package/src/llm/vertexai/index.js.map +0 -1
  223. package/src/messages/__tests__/tools.test.js.map +0 -1
  224. package/src/messages/cache.js.map +0 -1
  225. package/src/messages/cache.test.js.map +0 -1
  226. package/src/messages/content.js.map +0 -1
  227. package/src/messages/content.test.js.map +0 -1
  228. package/src/messages/core.js.map +0 -1
  229. package/src/messages/ensureThinkingBlock.test.js.map +0 -1
  230. package/src/messages/format.js.map +0 -1
  231. package/src/messages/formatAgentMessages.test.js.map +0 -1
  232. package/src/messages/formatAgentMessages.tools.test.js.map +0 -1
  233. package/src/messages/formatMessage.test.js.map +0 -1
  234. package/src/messages/ids.js.map +0 -1
  235. package/src/messages/index.js.map +0 -1
  236. package/src/messages/labelContentByAgent.test.js.map +0 -1
  237. package/src/messages/prune.js.map +0 -1
  238. package/src/messages/reducer.js.map +0 -1
  239. package/src/messages/shiftIndexTokenCountMap.test.js.map +0 -1
  240. package/src/messages/summarize.js.map +0 -1
  241. package/src/messages/summarize.test.js.map +0 -1
  242. package/src/messages/tools.js.map +0 -1
  243. package/src/mockStream.js.map +0 -1
  244. package/src/prompts/collab.js.map +0 -1
  245. package/src/prompts/index.js.map +0 -1
  246. package/src/prompts/taskmanager.js.map +0 -1
  247. package/src/run.js.map +0 -1
  248. package/src/schemas/index.js.map +0 -1
  249. package/src/schemas/schema-preparation.test.js.map +0 -1
  250. package/src/schemas/validate.js.map +0 -1
  251. package/src/schemas/validate.test.js.map +0 -1
  252. package/src/scripts/abort.js.map +0 -1
  253. package/src/scripts/ant_web_search.js.map +0 -1
  254. package/src/scripts/ant_web_search_edge_case.js.map +0 -1
  255. package/src/scripts/ant_web_search_error_edge_case.js.map +0 -1
  256. package/src/scripts/args.js.map +0 -1
  257. package/src/scripts/bedrock-cache-debug.js.map +0 -1
  258. package/src/scripts/bedrock-content-aggregation-test.js.map +0 -1
  259. package/src/scripts/bedrock-merge-test.js.map +0 -1
  260. package/src/scripts/bedrock-parallel-tools-test.js.map +0 -1
  261. package/src/scripts/caching.js.map +0 -1
  262. package/src/scripts/cli.js.map +0 -1
  263. package/src/scripts/cli2.js.map +0 -1
  264. package/src/scripts/cli3.js.map +0 -1
  265. package/src/scripts/cli4.js.map +0 -1
  266. package/src/scripts/cli5.js.map +0 -1
  267. package/src/scripts/code_exec.js.map +0 -1
  268. package/src/scripts/code_exec_files.js.map +0 -1
  269. package/src/scripts/code_exec_multi_session.js.map +0 -1
  270. package/src/scripts/code_exec_ptc.js.map +0 -1
  271. package/src/scripts/code_exec_session.js.map +0 -1
  272. package/src/scripts/code_exec_simple.js.map +0 -1
  273. package/src/scripts/content.js.map +0 -1
  274. package/src/scripts/empty_input.js.map +0 -1
  275. package/src/scripts/handoff-test.js.map +0 -1
  276. package/src/scripts/image.js.map +0 -1
  277. package/src/scripts/memory.js.map +0 -1
  278. package/src/scripts/multi-agent-chain.js.map +0 -1
  279. package/src/scripts/multi-agent-conditional.js.map +0 -1
  280. package/src/scripts/multi-agent-document-review-chain.js.map +0 -1
  281. package/src/scripts/multi-agent-hybrid-flow.js.map +0 -1
  282. package/src/scripts/multi-agent-parallel-start.js.map +0 -1
  283. package/src/scripts/multi-agent-parallel.js.map +0 -1
  284. package/src/scripts/multi-agent-sequence.js.map +0 -1
  285. package/src/scripts/multi-agent-supervisor.js.map +0 -1
  286. package/src/scripts/multi-agent-test.js.map +0 -1
  287. package/src/scripts/parallel-asymmetric-tools-test.js.map +0 -1
  288. package/src/scripts/parallel-full-metadata-test.js.map +0 -1
  289. package/src/scripts/parallel-tools-test.js.map +0 -1
  290. package/src/scripts/programmatic_exec.js.map +0 -1
  291. package/src/scripts/programmatic_exec_agent.js.map +0 -1
  292. package/src/scripts/search.js.map +0 -1
  293. package/src/scripts/sequential-full-metadata-test.js.map +0 -1
  294. package/src/scripts/simple.js.map +0 -1
  295. package/src/scripts/single-agent-metadata-test.js.map +0 -1
  296. package/src/scripts/stream.js.map +0 -1
  297. package/src/scripts/test-custom-prompt-key.js.map +0 -1
  298. package/src/scripts/test-handoff-input.js.map +0 -1
  299. package/src/scripts/test-handoff-preamble.js.map +0 -1
  300. package/src/scripts/test-handoff-steering.js.map +0 -1
  301. package/src/scripts/test-multi-agent-list-handoff.js.map +0 -1
  302. package/src/scripts/test-parallel-agent-labeling.js.map +0 -1
  303. package/src/scripts/test-parallel-handoffs.js.map +0 -1
  304. package/src/scripts/test-thinking-handoff-bedrock.js.map +0 -1
  305. package/src/scripts/test-thinking-handoff.js.map +0 -1
  306. package/src/scripts/test-thinking-to-thinking-handoff-bedrock.js.map +0 -1
  307. package/src/scripts/test-tool-before-handoff-role-order.js.map +0 -1
  308. package/src/scripts/test-tools-before-handoff.js.map +0 -1
  309. package/src/scripts/test_code_api.js.map +0 -1
  310. package/src/scripts/thinking-bedrock.js.map +0 -1
  311. package/src/scripts/thinking-vertexai.js.map +0 -1
  312. package/src/scripts/thinking.js.map +0 -1
  313. package/src/scripts/tool_search.js.map +0 -1
  314. package/src/scripts/tools.js.map +0 -1
  315. package/src/specs/agent-handoffs-bedrock.integration.test.js.map +0 -1
  316. package/src/specs/agent-handoffs.test.js.map +0 -1
  317. package/src/specs/anthropic.simple.test.js.map +0 -1
  318. package/src/specs/azure.simple.test.js.map +0 -1
  319. package/src/specs/cache.simple.test.js.map +0 -1
  320. package/src/specs/custom-event-await.test.js.map +0 -1
  321. package/src/specs/deepseek.simple.test.js.map +0 -1
  322. package/src/specs/emergency-prune.test.js.map +0 -1
  323. package/src/specs/moonshot.simple.test.js.map +0 -1
  324. package/src/specs/observability.integration.test.js.map +0 -1
  325. package/src/specs/openai.simple.test.js.map +0 -1
  326. package/src/specs/openrouter.simple.test.js.map +0 -1
  327. package/src/specs/prune.test.js.map +0 -1
  328. package/src/specs/reasoning.test.js.map +0 -1
  329. package/src/specs/spec.utils.js.map +0 -1
  330. package/src/specs/thinking-handoff.test.js.map +0 -1
  331. package/src/specs/thinking-prune.test.js.map +0 -1
  332. package/src/specs/token-distribution-edge-case.test.js.map +0 -1
  333. package/src/specs/token-memoization.test.js.map +0 -1
  334. package/src/specs/tokens.test.js.map +0 -1
  335. package/src/specs/tool-error.test.js.map +0 -1
  336. package/src/splitStream.js.map +0 -1
  337. package/src/splitStream.test.js.map +0 -1
  338. package/src/stream.js.map +0 -1
  339. package/src/stream.test.js.map +0 -1
  340. package/src/test/mockTools.js.map +0 -1
  341. package/src/tools/BrowserTools.js.map +0 -1
  342. package/src/tools/Calculator.js.map +0 -1
  343. package/src/tools/Calculator.test.js.map +0 -1
  344. package/src/tools/CodeExecutor.js.map +0 -1
  345. package/src/tools/ProgrammaticToolCalling.js.map +0 -1
  346. package/src/tools/StreamingToolCallBuffer.js.map +0 -1
  347. package/src/tools/ToolNode.js.map +0 -1
  348. package/src/tools/ToolSearch.js.map +0 -1
  349. package/src/tools/__tests__/BrowserTools.test.js.map +0 -1
  350. package/src/tools/__tests__/ProgrammaticToolCalling.integration.test.js.map +0 -1
  351. package/src/tools/__tests__/ProgrammaticToolCalling.test.js.map +0 -1
  352. package/src/tools/__tests__/StreamingToolCallBuffer.test.js.map +0 -1
  353. package/src/tools/__tests__/ToolApproval.test.js.map +0 -1
  354. package/src/tools/__tests__/ToolNode.recovery.test.js.map +0 -1
  355. package/src/tools/__tests__/ToolNode.session.test.js.map +0 -1
  356. package/src/tools/__tests__/ToolSearch.integration.test.js.map +0 -1
  357. package/src/tools/__tests__/ToolSearch.test.js.map +0 -1
  358. package/src/tools/__tests__/handlers.test.js.map +0 -1
  359. package/src/tools/__tests__/truncation-recovery.integration.test.js.map +0 -1
  360. package/src/tools/handlers.js.map +0 -1
  361. package/src/tools/schema.js.map +0 -1
  362. package/src/tools/search/anthropic.js.map +0 -1
  363. package/src/tools/search/content.js.map +0 -1
  364. package/src/tools/search/content.test.js.map +0 -1
  365. package/src/tools/search/firecrawl.js.map +0 -1
  366. package/src/tools/search/format.js.map +0 -1
  367. package/src/tools/search/highlights.js.map +0 -1
  368. package/src/tools/search/index.js.map +0 -1
  369. package/src/tools/search/jina-reranker.test.js.map +0 -1
  370. package/src/tools/search/output.md +0 -2775
  371. package/src/tools/search/rerankers.js.map +0 -1
  372. package/src/tools/search/schema.js.map +0 -1
  373. package/src/tools/search/search.js.map +0 -1
  374. package/src/tools/search/serper-scraper.js.map +0 -1
  375. package/src/tools/search/test.html +0 -884
  376. package/src/tools/search/test.js.map +0 -1
  377. package/src/tools/search/test.md +0 -643
  378. package/src/tools/search/test.ts +0 -159
  379. package/src/tools/search/tool.js.map +0 -1
  380. package/src/tools/search/types.js.map +0 -1
  381. package/src/tools/search/utils.js.map +0 -1
  382. package/src/types/graph.js.map +0 -1
  383. package/src/types/graph.test.js.map +0 -1
  384. package/src/types/index.js.map +0 -1
  385. package/src/types/llm.js.map +0 -1
  386. package/src/types/messages.js.map +0 -1
  387. package/src/types/run.js.map +0 -1
  388. package/src/types/stream.js.map +0 -1
  389. package/src/types/tools.js.map +0 -1
  390. package/src/utils/contextAnalytics.js.map +0 -1
  391. package/src/utils/contextAnalytics.test.js.map +0 -1
  392. package/src/utils/events.js.map +0 -1
  393. package/src/utils/graph.js.map +0 -1
  394. package/src/utils/handlers.js.map +0 -1
  395. package/src/utils/index.js.map +0 -1
  396. package/src/utils/llm.js.map +0 -1
  397. package/src/utils/llmConfig.js.map +0 -1
  398. package/src/utils/logging.js.map +0 -1
  399. package/src/utils/misc.js.map +0 -1
  400. package/src/utils/run.js.map +0 -1
  401. package/src/utils/schema.js.map +0 -1
  402. package/src/utils/title.js.map +0 -1
  403. package/src/utils/tokens.js.map +0 -1
  404. package/src/utils/toonFormat.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Maximal Marginal Relevance (MMR) re-ranking — Phase 2.
3
3
  *
4
- * Ported from upstream `extensions/memory-core/src/memory/mmr.ts` with
4
+ * Ported from a reference implementation `extensions/memory-core/src/memory/mmr.ts` with
5
5
  * minor adaptation for our `MemoryEntry` shape (content vs snippet, id vs
6
6
  * path+startLine). Behavior is identical: normalize scores, iteratively
7
7
  * pick the item that maximizes `λ * relevance - (1-λ) * max_similarity`
@@ -10,9 +10,9 @@
10
10
  * @see Carbonell & Goldstein, "The Use of MMR, Diversity-Based Reranking" (1998)
11
11
  */
12
12
  export interface MMRConfig {
13
- /** Opt-in. Upstream default is false. */
13
+ /** Opt-in. Default is false. */
14
14
  enabled: boolean;
15
- /** 0 = max diversity, 1 = max relevance. Upstream default 0.7. */
15
+ /** 0 = max diversity, 1 = max relevance. Default 0.7. */
16
16
  lambda: number;
17
17
  }
18
18
  export declare const DEFAULT_MMR_CONFIG: MMRConfig;
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * ## Why a whitelist?
10
10
  *
11
- * Earlier upstream-faithful designs used date-keyed files
11
+ * Earlier historical designs used date-keyed files
12
12
  * (`memory/YYYY-MM-DD.md`), which have three problems for a persistent
13
13
  * multi-user agent:
14
14
  *
@@ -1,14 +1,14 @@
1
1
  /**
2
2
  * Temporal decay — Phase 2.
3
3
  *
4
- * Ported from upstream `extensions/memory-core/src/memory/temporal-decay.ts`.
4
+ * Ported from a reference implementation `extensions/memory-core/src/memory/temporal-decay.ts`.
5
5
  * Ages dated memory files (`memory/YYYY-MM-DD.md`) using exponential decay
6
6
  * `multiplier = exp(-ln(2) / halfLifeDays * ageInDays)`. At half-life, the
7
7
  * score is exactly halved.
8
8
  *
9
9
  * Evergreen files (MEMORY.md, memory/topics.md, any non-dated file inside
10
10
  * memory/) do NOT decay — they represent durable knowledge and should stay
11
- * hot regardless of age. This mirrors upstream's `isEvergreenMemoryPath`.
11
+ * hot regardless of age. This mirrors the standard `isEvergreenMemoryPath`.
12
12
  *
13
13
  * Since our pgvector rows carry `createdAt`, we don't need filesystem stat
14
14
  * fallback — the row timestamp is authoritative for any file without a
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Autonomous memory — core types.
3
3
  *
4
- * Ported from upstream's memory-core pattern, adapted for Postgres + pgvector
4
+ * Ported from the reference implementation's memory-core pattern, adapted for Postgres + pgvector
5
5
  * and shaped so a future graph-backend layer (Graphiti, Neo4j agent-memory, etc.)
6
6
  * can be added alongside the vector store without changing the tool contracts.
7
7
  *
@@ -75,7 +75,7 @@ export interface MemorySearchOptions {
75
75
  minScore?: number;
76
76
  /**
77
77
  * Phase 2 toggles — when the backend supports them. Each is independently
78
- * opt-in; all false = upstream Phase 1 behavior.
78
+ * opt-in; all false = Phase 1 behavior.
79
79
  */
80
80
  mmr?: {
81
81
  enabled?: boolean;
@@ -144,7 +144,7 @@ export interface MemoryConfig {
144
144
  search?: {
145
145
  maxResults?: number;
146
146
  maxInjectedChars?: number;
147
- /** Phase 2 — enable MMR reranking (upstream-aligned defaults when true). */
147
+ /** Phase 2 — enable MMR reranking (defaults when true). */
148
148
  mmr?: {
149
149
  enabled?: boolean;
150
150
  lambda?: number;
@@ -110,7 +110,7 @@ export declare const labelContentByAgent: (contentParts: MessageContentComplex[]
110
110
  * When SkillTool is invoked, the body is injected as a HumanMessage into LangGraph state
111
111
  * but NOT persisted to conversation history. On follow-up runs the skill body is lost.
112
112
  * Pass `skills` to reconstruct the HumanMessage at the right position after each skill
113
- * ToolMessage. Upstream PRs #96 / #97.
113
+ * ToolMessage. PRs #96 / #97.
114
114
  * @returns - Object containing formatted messages and updated indexTokenCountMap if provided.
115
115
  */
116
116
  export declare const formatAgentMessages: (payload: TPayload, indexTokenCountMap?: Record<number, number | undefined>, tools?: Set<string>, skills?: Map<string, string>, options?: FormatAgentMessagesOptions) => {
@@ -9,7 +9,7 @@ import type { ResolvedArgsByCallId } from '@/tools/toolOutputReferences';
9
9
  /**
10
10
  * Per-call batch context for `runTool`. Bundles every optional batch-scoped
11
11
  * value the method needs so the signature stays at three positional params
12
- * even as new context fields are added. Upstream-aligned (PR #117).
12
+ * even as new context fields are added. (PR #117).
13
13
  */
14
14
  type RunToolBatchContext = {
15
15
  /** Position of this call within the parent ToolNode batch. */
@@ -51,7 +51,7 @@ export declare class ToolNode<T = any> extends RunnableCallable<T, T> {
51
51
  private hookRegistry?;
52
52
  /**
53
53
  * Tool output reference registry threaded down from Run / Graph
54
- * (upstream PR #114). When set, dispatchToolEvents resolves
54
+ * (PR #114). When set, dispatchToolEvents resolves
55
55
  * `{{tool<i>turn<n>}}` placeholders in args before invoking each tool
56
56
  * and stores successful outputs under their stable reference keys for
57
57
  * subsequent calls in the same run to pipe through.
@@ -112,7 +112,7 @@ export declare class ToolNode<T = any> extends RunnableCallable<T, T> {
112
112
  /**
113
113
  * Runs a single tool call with error handling.
114
114
  *
115
- * @param batchContext Optional per-batch context (upstream PR #117).
115
+ * @param batchContext Optional per-batch context (PR #117).
116
116
  * Threaded from `run()` for tool output reference annotation. The
117
117
  * `batchScopeId` field carries an anonymous synthetic scope when the
118
118
  * caller has no `run_id`, so concurrent batches don't collide on the
@@ -67,7 +67,7 @@ export interface MemoryGetToolResult {
67
67
  export declare function buildMemorySearchUnavailableResult(error: string | undefined): MemorySearchToolResult;
68
68
  /**
69
69
  * Clamp a ranked result list to a total character budget.
70
- * Ported from upstream `tools.citations.ts::clampResultsByInjectedChars`.
70
+ * Ported from a reference implementation `tools.citations.ts::clampResultsByInjectedChars`.
71
71
  */
72
72
  export declare function clampResultsByInjectedChars<T extends {
73
73
  content: string;
@@ -9,13 +9,14 @@
9
9
  * for the active provider; consumers decide what content to put in each
10
10
  * block.
11
11
  *
12
- * Why this is generic rather than ranger-specific
12
+ * Why this is generic rather than tier-named
13
13
  * ------------------------------------------------
14
14
  * Earlier iterations exposed `platform_instructions` and `cache_ttl:
15
- * { platform, agent }` — vocabulary borrowed from a multi-tenant chat
16
- * platform's mental model. That leaked a specific consumer's domain into
17
- * the library and made it confusing for other consumers (CLI tools,
18
- * desktop apps, gateways) which have no notion of "platforms" or "agents".
15
+ * { platform, agent }` — vocabulary borrowed from a specific consumer's
16
+ * multi-tenant chat-platform mental model. That leaked one consumer's
17
+ * domain into the library and made it confusing for other consumers
18
+ * (CLI tools, desktop apps, gateways) which have no notion of
19
+ * "platforms" or "agents".
19
20
  *
20
21
  * The current shape lets every consumer define their own cache-tier
21
22
  * organization without the library knowing or caring.
@@ -264,10 +264,11 @@ export type GraphEdge = {
264
264
  /**
265
265
  * EdgeType.HANDOFF — one-way routing: parent emits an `lc_transfer_to_*`
266
266
  * tool call and exits, child takes over and responds directly to the
267
- * user. Aligns with upstream's handoff semantics.
267
+ * user. Aligns with the standard handoff semantics.
268
268
  * EdgeType.DIRECT — fixed graph edges for automatic sequential / parallel
269
- * transitions. Ranger preserves its enriched wiring (fan-in with prompt,
270
- * parallel groups, ApprovalGateNode, excludeResults / agentMessages).
269
+ * transitions. Downstream consumers may layer additional wiring on top
270
+ * (fan-in with prompt, parallel groups, approval-gate nodes,
271
+ * excludeResults / agentMessages).
271
272
  */
272
273
  edgeType?: import('@/common').EdgeType;
273
274
  /**
@@ -458,7 +459,7 @@ export interface SummarizationConfig {
458
459
  */
459
460
  initialSummary?: string;
460
461
  /**
461
- * Upstream-aligned optional fields. When the host wants the summarization
462
+ * optional fields. When the host wants the summarization
462
463
  * pass to run on a different LLM than the agent's own (e.g. a cheaper
463
464
  * model for compaction), these provider/model overrides flow through to
464
465
  * the summarize callback.
@@ -622,9 +623,9 @@ export interface AgentInputs {
622
623
  tokenCount: number;
623
624
  };
624
625
  /**
625
- * Upstream-aligned opt-in for summarization. When false, the agent never
626
+ * opt-in for summarization. When false, the agent never
626
627
  * invokes the summarize callback regardless of context utilization.
627
- * Defaults to undefined (treated as enabled in Ranger to preserve prior
628
+ * Defaults to undefined (treated as enabled by default to preserve prior
628
629
  * behaviour); hosts that want strict opt-in semantics should set it
629
630
  * explicitly.
630
631
  */
@@ -4,7 +4,7 @@ export type AnthropicMessages = Array<AnthropicMessage | BaseMessage>;
4
4
  export type AnthropicMessage = Anthropic.MessageParam;
5
5
  /**
6
6
  * Per-message ref metadata stamped onto a `ToolMessage` at execution time
7
- * (upstream PR #117). Read by `annotateMessagesForLLM` to apply transient
7
+ * (PR #117). Read by `annotateMessagesForLLM` to apply transient
8
8
  * annotation to a copy of the message right before it goes on the wire to
9
9
  * the provider. Never read after the run-scoped registry has been cleared.
10
10
  *
@@ -121,7 +121,7 @@ export type RunConfig = {
121
121
  */
122
122
  hooks?: HookRegistry;
123
123
  /**
124
- * Tool output reference configuration (upstream PRs #114 / #117).
124
+ * Tool output reference configuration (PRs #114 / #117).
125
125
  * When `enabled` is true, the Run constructs a single
126
126
  * ToolOutputReferenceRegistry and threads it to every ToolNode built by
127
127
  * the graph so `{{tool<i>turn<n>}}` placeholders resolve across agents.
@@ -60,13 +60,13 @@ export type ToolNodeOptions = {
60
60
  /**
61
61
  * Maximum characters for a single tool result (head+tail truncation).
62
62
  * When omitted, derived from the agent's `maxContextTokens` (30%
63
- * heuristic), capped at HARD_MAX_TOOL_RESULT_CHARS. Upstream-aligned
64
- * Ranger's truncation today is driven by other knobs, but accepting
65
- * this option keeps the test surface portable.
63
+ * heuristic), capped at HARD_MAX_TOOL_RESULT_CHARS. —
64
+ * downstream consumers may drive truncation through other knobs;
65
+ * accepting this option keeps the test surface portable.
66
66
  */
67
67
  maxToolResultChars?: number;
68
68
  /**
69
- * Run-scoped tool output reference configuration (upstream PR #114).
69
+ * Run-scoped tool output reference configuration (PR #114).
70
70
  * When `enabled` is true, ToolNode registers successful outputs and
71
71
  * substitutes `{{tool<i>turn<n>}}` placeholders found in string args.
72
72
  * Ignored when `toolOutputRegistry` is also provided (the host-supplied
@@ -255,7 +255,7 @@ export type ToolExecuteResult = {
255
255
  /** Map of tool names to tool definitions */
256
256
  export type LCToolRegistry = Map<string, LCTool>;
257
257
  /**
258
- * Configuration for the tool output reference feature (upstream PR #114).
258
+ * Configuration for the tool output reference feature (PR #114).
259
259
  *
260
260
  * When `enabled: true`, ToolNode stores each successful tool output under
261
261
  * a stable key `tool<idx>turn<turn>` and the LLM can pipe a previous output
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@illuma-ai/agents",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "main": "./dist/cjs/main.cjs",
5
5
  "module": "./dist/esm/main.mjs",
6
6
  "types": "./dist/types/index.d.ts",
@@ -108,7 +108,7 @@ export class AgentContext {
108
108
  });
109
109
 
110
110
  /**
111
- * Track upstream-aligned subagent inputs on the context. `_sourceInputs`
111
+ * Track subagent inputs on the context. `_sourceInputs`
112
112
  * preserves the original AgentInputs so SubagentExecutor can self-spawn
113
113
  * (`SubagentConfig.self === true`) without separate config; the other
114
114
  * two flow straight from agentConfig.
@@ -1004,7 +1004,7 @@ export class AgentContext {
1004
1004
  * appended unfiltered; outside event-driven mode they pass through
1005
1005
  * `filterToolsForBinding`. Centralizing the decision here prevents the
1006
1006
  * accounting/binding paths from drifting apart, which was the root
1007
- * cause of the original miscount (Fixes upstream #121).
1007
+ * cause of the original miscount (Fixes #121).
1008
1008
  */
1009
1009
  private getEffectiveInstanceTools(): t.GraphTools | undefined {
1010
1010
  if (!this.tools) {
@@ -11,8 +11,9 @@
11
11
  * traffic).
12
12
  *
13
13
  * What it does NOT prove (out of scope here):
14
- * - That ranger's actual `client.js` system block split is correct.
15
- * That's verified by Phase 3 ranger-side tests.
14
+ * - That a downstream consumer's actual system-block-assembly logic
15
+ * produces a byte-identical Tier 1. That's the consumer's
16
+ * responsibility (and its own tests).
16
17
  *
17
18
  * Run:
18
19
  * BEDROCK_AWS_REGION=us-east-1 \
@@ -52,7 +53,8 @@ const describeFn = haveBedrock ? describe : describe.skip;
52
53
 
53
54
  /**
54
55
  * Tier 1 — platform-wide content. Same string for every "agent" in this
55
- * test, mimicking ranger's branding + tool routing + common tool docs.
56
+ * test, mimicking a multi-tenant platform's shared branding + tool-routing
57
+ * + common-tool documentation block.
56
58
  * Padded above 1024 tokens so Bedrock will write/read the cache (1024-token
57
59
  * minimum cache write threshold).
58
60
  */
@@ -377,7 +377,7 @@ describe('AgentContext', () => {
377
377
  });
378
378
 
379
379
  it('excludes deferred-undiscovered instance tools from token accounting', async () => {
380
- /* Regression for upstream #122 / #121.
380
+ /* Regression for #122 / #121.
381
381
  * `calculateInstructionTokens` previously summed every entry in
382
382
  * `this.tools` regardless of whether `getToolsForBinding` would
383
383
  * actually emit it. That over-reported tokens and triggered
@@ -22,7 +22,7 @@ describe('EdgeType enum', () => {
22
22
  expect(EdgeType.HANDOFF).toBe('handoff');
23
23
  });
24
24
 
25
- it('has correct DIRECT value (fixed graph edges with Ranger fan-in / parallel / approval-gate logic)', () => {
25
+ it('has correct DIRECT value (fixed graph edges, consumers may layer fan-in / parallel / approval-gate logic)', () => {
26
26
  expect(EdgeType.DIRECT).toBe('direct');
27
27
  });
28
28
 
@@ -103,19 +103,19 @@ export enum Providers {
103
103
 
104
104
  export enum EdgeType {
105
105
  /**
106
- * Upstream-aligned handoff: one-way routing where the parent agent exits
106
+ * handoff: one-way routing where the parent agent exits
107
107
  * via a `lc_transfer_to_<destination>` tool call, the child takes over,
108
108
  * and the child responds directly to the user. Replaces what used to be
109
- * called "TRANSFER" in earlier Ranger versions; the parent-calls-child
109
+ * called "TRANSFER" in older versions; the parent-calls-child
110
110
  * supervisor pattern (formerly `EdgeType.HANDOFF`) is gone — use the
111
111
  * Subagent primitive (Tier 5) for deep delegation instead.
112
112
  */
113
113
  HANDOFF = 'handoff',
114
114
  /**
115
- * Fixed graph edges for automatic transitions. Naming matches upstream.
116
- * Ranger keeps its enriched wiring on top of this edge type:
117
- * fan-in with prompt + {results}, parallel groups, ApprovalGateNode
118
- * insertion, and the `excludeResults` agentMessages channel.
115
+ * Fixed graph edges for automatic transitions. Standard naming.
116
+ * Downstream consumers may layer additional wiring on top of this edge
117
+ * type: fan-in with prompt + {results}, parallel groups, approval-gate
118
+ * node insertion, and the `excludeResults` agentMessages channel.
119
119
  */
120
120
  DIRECT = 'direct',
121
121
  }
@@ -195,15 +195,15 @@ export enum Callback {
195
195
  export enum Constants {
196
196
  OFFICIAL_CODE_BASEURL = 'https://api.illuma.ai/v1',
197
197
  EXECUTE_CODE = 'execute_code',
198
- /** Tool name for the bash execution primitive (upstream Tier 3). */
198
+ /** Tool name for the bash execution primitive (Tier 3). */
199
199
  BASH_TOOL = 'execute_bash',
200
- /** Tool name for the bash programmatic-tool-calling variant (upstream Tier 3). */
200
+ /** Tool name for the bash programmatic-tool-calling variant (Tier 3). */
201
201
  BASH_PROGRAMMATIC_TOOL_CALLING = 'run_tools_with_bash',
202
- /** Tool name for the read-file primitive (upstream Tier 3). */
202
+ /** Tool name for the read-file primitive (Tier 3). */
203
203
  READ_FILE = 'read_file',
204
- /** Tool name for the SkillTool primitive (upstream Tier 2). */
204
+ /** Tool name for the SkillTool primitive (Tier 2). */
205
205
  SKILL_TOOL = 'skill',
206
- /** Tool name for the Subagent primitive (upstream Tier 5). */
206
+ /** Tool name for the Subagent primitive (Tier 5). */
207
207
  SUBAGENT = 'subagent',
208
208
  TOOL_SEARCH = 'tool_search',
209
209
  PROGRAMMATIC_TOOL_CALLING = 'run_tools_with_code',
@@ -270,7 +270,7 @@ export enum MessageTypes {
270
270
  /**
271
271
  * Tool names that use the code execution environment (shared session, file
272
272
  * tracking). Used by ToolNode to inject session context + file refs into
273
- * `invokeParams` before tool execution. Upstream-aligned constant.
273
+ * `invokeParams` before tool execution. constant.
274
274
  */
275
275
  export const CODE_EXECUTION_TOOLS: ReadonlySet<string> = new Set([
276
276
  Constants.EXECUTE_CODE,
@@ -187,7 +187,7 @@ export abstract class Graph<
187
187
  hookRegistry?: import('@/hooks').HookRegistry;
188
188
  /**
189
189
  * Optional tool-output reference registry threaded down from Run
190
- * (upstream PR #114). When set, every ToolNode built by this graph
190
+ * (PR #114). When set, every ToolNode built by this graph
191
191
  * stores successful outputs here and resolves `{{tool<i>turn<n>}}`
192
192
  * placeholders in args before invoking the tool.
193
193
  *
@@ -198,7 +198,7 @@ export abstract class Graph<
198
198
  */
199
199
  toolOutputRegistry?: import('@/tools/toolOutputReferences').ToolOutputReferenceRegistry;
200
200
  /**
201
- * Run-scoped tool output reference configuration (upstream PR #117).
201
+ * Run-scoped tool output reference configuration (PR #117).
202
202
  * When `enabled` is true, the graph lazily allocates a single
203
203
  * `ToolOutputReferenceRegistry` on first `getOrCreateToolOutputRegistry()`
204
204
  * call and shares it with every ToolNode the graph compiles, so
@@ -1109,7 +1109,7 @@ export class StandardGraph extends Graph<t.BaseGraphState, t.GraphNode> {
1109
1109
  }
1110
1110
 
1111
1111
  /**
1112
- * Lazy tool-output reference annotation (upstream PR #117). Right
1112
+ * Lazy tool-output reference annotation (PR #117). Right
1113
1113
  * before the message array hits the provider, walk it and apply
1114
1114
  * `[ref: tool<i>turn<n>]` prefixes / `_ref` JSON fields to a
1115
1115
  * transient copy. The persisted ToolMessages stay clean — only what
@@ -1720,7 +1720,7 @@ export class StandardGraph extends Graph<t.BaseGraphState, t.GraphNode> {
1720
1720
  * Fire PreCompact (#103) before the LLM call. Observational —
1721
1721
  * hosts may use the input to schedule auxiliary work, but a
1722
1722
  * deny/ask decision does NOT block compaction here because
1723
- * Ranger's summarizer runs in the background and a refusal
1723
+ * the summarizer runs in the background and a refusal
1724
1724
  * has nowhere to go: pruning still needs to happen at 100%
1725
1725
  * regardless. Errors are swallowed so a hook bug cannot
1726
1726
  * masquerade as a context-overflow failure.
@@ -2716,7 +2716,7 @@ If I seem to be missing something we discussed earlier, just give me a quick rem
2716
2716
  }
2717
2717
 
2718
2718
  /**
2719
- * Subagent injection (upstream Tier 5): when the agent has SubagentConfig
2719
+ * Subagent injection (Tier 5): when the agent has SubagentConfig
2720
2720
  * entries and depth budget remaining, inject a `subagent` DynamicStructuredTool
2721
2721
  * into graphTools. The tool's executor receives this graph's hookRegistry and
2722
2722
  * a lazy handler-registry getter (Run wires handlerRegistry AFTER createWorkflow,
@@ -1006,7 +1006,7 @@ export class MultiAgentGraph extends StandardGraph {
1006
1006
 
1007
1007
  /**
1008
1008
  * Add approval-gate nodes for sequence edges that declare an approvalGate
1009
- * config (Ranger-only feature, not present upstream). Gates fire
1009
+ * config (consumer extension, not part of the standard interface). Gates fire
1010
1010
  * regardless of ExecutionContext and sit between source and destination.
1011
1011
  */
1012
1012
  const gatedEdges = new Set<t.GraphEdge>();
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * gapFeatures.test.ts
3
3
  *
4
- * Integration tests for the four LibreChat gap features:
4
+ * Integration tests for the four gap features:
5
5
  * 1. Tool Discovery Caching
6
6
  * 2. SummarizationConfig (trigger types, initialSummary)
7
7
  * 3. EMA Pruning Calibration
@@ -1,7 +1,7 @@
1
1
  import { shouldFlushMemory } from '../memoryFlushPhase';
2
2
 
3
3
  describe('shouldFlushMemory', () => {
4
- // Use upstream-aligned defaults: soft=4000, reserve=20000 means a 200k
4
+ // Use defaults: soft=4000, reserve=20000 means a 200k
5
5
  // window fires at 176k. Explicit numbers here keep the test independent
6
6
  // from the constants file.
7
7
  const base = {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Memory flush phase — trigger logic + reflection invocation.
3
3
  *
4
- * Ported from upstream's post-turn flush handler. The agent is re-invoked
4
+ * Ported from the reference implementation's post-turn flush handler. The agent is re-invoked
5
5
  * with a reflection system prompt and the `memory_append` tool unlocked;
6
6
  * it writes notes to its future self, then the graph returns to normal.
7
7
  *
@@ -45,7 +45,7 @@ export interface ShouldFlushInput {
45
45
  /**
46
46
  * Pure trigger function: fires when the current context is within
47
47
  * `softThreshold + reserveFloor` tokens of the model window. Matches
48
- * upstream's formula.
48
+ * the standard formula.
49
49
  */
50
50
  export function shouldFlushMemory(input: ShouldFlushInput): boolean {
51
51
  if (
@@ -24,7 +24,7 @@ type MatcherBucket = Partial<Record<HookEvent, HookMatcher<HookEvent>[]>>;
24
24
  *
25
25
  * ## Why `Map<sessionId, MatcherBucket>` and not `Record`
26
26
  *
27
- * LibreChat runs thousands of parallel sessions in one Node process, and
27
+ * Real consumers run thousands of parallel sessions in one Node process, and
28
28
  * hook registration happens inside hot paths (tool loading, agent spawning).
29
29
  * A `Record<sessionId, ...>` has to be spread on every insertion, which is
30
30
  * O(n) per call and O(n²) total for a batch of parallel registrations. A
@@ -1,6 +1,6 @@
1
1
  // src/hooks/index.ts
2
2
  //
3
- // Hook lifecycle system for `@librechat/agents`. Re-exported from
3
+ // Hook lifecycle system for `@illuma-ai/agents`. Re-exported from
4
4
  // `src/index.ts` and consumed by `Run.processStream` (RunStart,
5
5
  // UserPromptSubmit, Stop, StopFailure), `ToolNode.dispatchToolEvents`
6
6
  // (PreToolUse, PostToolUse, PostToolUseFailure, PermissionDenied),
@@ -129,7 +129,7 @@ function skipGroupSyntaxPrefix(pattern: string, start: number): number {
129
129
  * This catches the common forms but not all. Ambiguous-alternation ReDoS
130
130
  * like `(a|a)+` is not detected. Pathologically long patterns are also
131
131
  * caught by {@link MAX_PATTERN_LENGTH}. Hosts that accept user-supplied
132
- * patterns must still validate upstream.
132
+ * patterns must still validate standard.
133
133
  */
134
134
  export function hasNestedQuantifier(pattern: string): boolean {
135
135
  const stack: QuantifierFrame[] = [];
@@ -248,7 +248,7 @@ function compile(pattern: string): RegExp | null {
248
248
  * never re-enter the regex compiler.
249
249
  *
250
250
  * These are a floor, not a ceiling. Hosts that accept user-supplied
251
- * patterns should still validate upstream. The design report §3.8 routes
251
+ * patterns should still validate standard. The design report §3.8 routes
252
252
  * persistable hooks through a host-side compiler before they reach this
253
253
  * module.
254
254
  */
@@ -7,7 +7,7 @@ import type { BaseMessage } from '@langchain/core/messages';
7
7
  * These mirror the subset of Claude Code's event surface that makes sense
8
8
  * for a library context (no filesystem/CLI-specific events). See
9
9
  * `docs/hooks-design-report.md` §3.2 for the mapping to existing
10
- * `@librechat/agents` emission points.
10
+ * `@illuma-ai/agents` emission points.
11
11
  */
12
12
  export const HOOK_EVENTS = [
13
13
  'RunStart',
@@ -4,11 +4,11 @@ import type { BaseMessage } from '@langchain/core/messages';
4
4
  import { _convertMessagesToAnthropicPayload } from './message_inputs';
5
5
 
6
6
  describe('_convertMessagesToAnthropicPayload — server tool use (web search) multi-turn', () => {
7
- /* Skipped: ranger intentionally diverged from upstream's
7
+ /* Skipped: this fork intentionally diverged from the reference implementation's
8
8
  * `_convertLangChainToolCallToAnthropic` — local always emits
9
9
  * `tool_use` regardless of `srvtoolu_` ID prefix (see message_inputs.ts
10
- * line ~144). These tests assert upstream's server_tool_use emission
11
- * which ranger does not implement. The text→server_tool_use correction
10
+ * line ~144). These tests assert the standard server_tool_use emission
11
+ * which this fork does not implement. The text→server_tool_use correction
12
12
  * test (next, "corrects text-typed server tool blocks") still passes
13
13
  * because that path lives in `_formatContent`. */
14
14
  it.skip('corrects tool_use blocks with srvtoolu_ IDs to server_tool_use', () => {
@@ -161,7 +161,7 @@ describe('_convertMessagesToAnthropicPayload — server tool use (web search) mu
161
161
  });
162
162
  });
163
163
 
164
- /* Skipped: depends on upstream's server_tool_use emission, see header. */
164
+ /* Skipped: depends on the standard server_tool_use emission, see header. */
165
165
  it.skip('filters server tool calls when content is a string', () => {
166
166
  const messageHistory: BaseMessage[] = [
167
167
  new HumanMessage('search for X'),
@@ -204,7 +204,7 @@ describe('_convertMessagesToAnthropicPayload — server tool use (web search) mu
204
204
  expect(serverToolBlocks).toHaveLength(0);
205
205
  });
206
206
 
207
- /* Skipped: depends on upstream's server_tool_use emission, see header. */
207
+ /* Skipped: depends on the standard server_tool_use emission, see header. */
208
208
  it.skip('handles empty string content with only server tool calls', () => {
209
209
  const messageHistory: BaseMessage[] = [
210
210
  new HumanMessage('search for X'),
@@ -229,7 +229,7 @@ describe('_convertMessagesToAnthropicPayload — server tool use (web search) mu
229
229
  expect(assistantContent[0].text).toBe(' ');
230
230
  });
231
231
 
232
- /* Skipped: depends on upstream's server_tool_use emission, see header. */
232
+ /* Skipped: depends on the standard server_tool_use emission, see header. */
233
233
  it.skip('preserves regular tool_use blocks alongside corrected server tool blocks', () => {
234
234
  const messageHistory: BaseMessage[] = [
235
235
  new HumanMessage('search for X and calculate 2+2'),
@@ -358,7 +358,7 @@ describe('_convertMessagesToAnthropicPayload — server tool use (web search) mu
358
358
  });
359
359
 
360
360
  /**
361
- * Regression for LibreChat discussion #12806.
361
+ * Regression for discussion #12806.
362
362
  *
363
363
  * Anthropic web_search responses can include text blocks whose text is
364
364
  * whitespace-only (e.g. ' ', '\n', '\t') alongside server_tool_use and
@@ -361,7 +361,7 @@ describe('Bedrock Prompt Caching', () => {
361
361
  };
362
362
 
363
363
  describe('Bedrock system message with promptCache: true', () => {
364
- /* Updated contract (2026-05-01, upstream PR #128 alignment): Bedrock
364
+ /* Updated contract (2026-05-01, PR #128 alignment): Bedrock
365
365
  * system message gets a `cachePoint` block inline so the system
366
366
  * prefix is cached at the AWS account level (cross-user). Previously
367
367
  * cachePoint was only added at the tool level, leaving the system
@@ -487,7 +487,7 @@ describe('Bedrock Prompt Caching', () => {
487
487
 
488
488
  // Bedrock system messages now carry an inline cachePoint so the
489
489
  // system prefix gets cached at the AWS account level (matching
490
- // upstream PR #128). Tool-level cachePoint from
490
+ // PR #128). Tool-level cachePoint from
491
491
  // IllumaBedrockConverse.invocationParams() runs independently.
492
492
  expect(Array.isArray(content)).toBe(true);
493
493
  expect(content.some((c) => 'cachePoint' in c)).toBe(true);
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * Consumers can extend the allowlist with `bedrockCacheModelPatterns` in
12
12
  * `clientOptions` for proprietary or pre-release model IDs not yet in
13
- * the upstream library.
13
+ * the reference library.
14
14
  */
15
15
 
16
16
  /**
@@ -77,8 +77,8 @@ export type ToolGroupSelector = (toolName: string) => string;
77
77
  /**
78
78
  * Default group selector — puts all tools in a single group named 'core'.
79
79
  * Equivalent to 'single' strategy but explicit. Consumers override this
80
- * to enable per-source grouping (e.g. ranger uses `_mcp_` substring to
81
- * separate core from MCP tools).
80
+ * to enable per-source grouping (e.g. by inspecting tool-name substrings
81
+ * to separate stable framework tools from volatile MCP-sourced tools).
82
82
  */
83
83
  export const DEFAULT_TOOL_GROUP_SELECTOR: ToolGroupSelector = () => 'core';
84
84
 
@@ -896,8 +896,8 @@ export interface XAIUsageMetadata
896
896
  }
897
897
 
898
898
  export class ChatMoonshot extends ChatOpenAI {
899
- static lc_name(): 'LibreChatMoonshot' {
900
- return 'LibreChatMoonshot';
899
+ static lc_name(): 'IllumaMoonshot' {
900
+ return 'IllumaMoonshot';
901
901
  }
902
902
 
903
903
  protected _convertMessages(messages: BaseMessage[]): OpenAICompletionParam[] {
@@ -302,7 +302,7 @@ export function _convertMessagesToOpenAIParams(
302
302
  model?: string,
303
303
  options?: ConvertMessagesOptions
304
304
  ): OpenAICompletionParam[] {
305
- /* DeepSeek reasoning roundtrip (upstream PR #136): reasoning_content on
305
+ /* DeepSeek reasoning roundtrip (PR #136): reasoning_content on
306
306
  * an AI message must be re-sent only when the message participates in a
307
307
  * tool-call exchange. Track context across the message flat-map. */
308
308
  let hasReasoningToolCallContext = false;
@@ -454,7 +454,7 @@ export function _convertMessagesToOpenAIParams(
454
454
  }
455
455
  }
456
456
 
457
- /* DeepSeek reasoning roundtrip (upstream PR #136): emit
457
+ /* DeepSeek reasoning roundtrip (PR #136): emit
458
458
  * reasoning_content only when the message is part of a tool-call
459
459
  * exchange — either the message itself has tool_calls, or a previous
460
460
  * AI/tool message established the context. Skipping the gate causes