@jsonstudio/rcc 0.90.367 → 0.90.701

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 (1240) hide show
  1. package/config/providers/ali-coding-plan.json +5 -0
  2. package/dist/build-info.js +2 -2
  3. package/dist/cli/commands/codex.js +37 -35
  4. package/dist/cli/commands/codex.js.map +1 -1
  5. package/dist/cli/commands/heartbeat.d.ts +20 -0
  6. package/dist/cli/commands/heartbeat.js +322 -0
  7. package/dist/cli/commands/heartbeat.js.map +1 -0
  8. package/dist/cli/commands/launcher/types.d.ts +1 -1
  9. package/dist/cli/commands/launcher/utils.js +28 -2
  10. package/dist/cli/commands/launcher/utils.js.map +1 -1
  11. package/dist/cli/commands/launcher-kernel.js +226 -82
  12. package/dist/cli/commands/launcher-kernel.js.map +1 -1
  13. package/dist/cli/commands/start.js +5 -3
  14. package/dist/cli/commands/start.js.map +1 -1
  15. package/dist/cli/register/heartbeat-command.d.ts +3 -0
  16. package/dist/cli/register/heartbeat-command.js +5 -0
  17. package/dist/cli/register/heartbeat-command.js.map +1 -0
  18. package/dist/cli.js +12 -0
  19. package/dist/cli.js.map +1 -1
  20. package/dist/commands/validate.js +34 -13
  21. package/dist/commands/validate.js.map +1 -1
  22. package/dist/config/system-prompts/codex-cli.txt +1 -1
  23. package/dist/config/user-data-paths.d.ts +1 -0
  24. package/dist/config/user-data-paths.js +43 -3
  25. package/dist/config/user-data-paths.js.map +1 -1
  26. package/dist/index.js +31 -12
  27. package/dist/index.js.map +1 -1
  28. package/dist/manager/modules/quota/antigravity-quota-manager.js +50 -37
  29. package/dist/manager/modules/quota/antigravity-quota-manager.js.map +1 -1
  30. package/dist/manager/modules/quota/antigravity-quota-persistence.js +38 -21
  31. package/dist/manager/modules/quota/antigravity-quota-persistence.js.map +1 -1
  32. package/dist/manager/modules/quota/antigravity-quota-runtime.js +20 -11
  33. package/dist/manager/modules/quota/antigravity-quota-runtime.js.map +1 -1
  34. package/dist/manager/modules/quota/quota-adapter.js +28 -12
  35. package/dist/manager/modules/quota/quota-adapter.js.map +1 -1
  36. package/dist/manager/quota/provider-quota-store.js +32 -18
  37. package/dist/manager/quota/provider-quota-store.js.map +1 -1
  38. package/dist/manager/storage/file-store.js +15 -9
  39. package/dist/manager/storage/file-store.js.map +1 -1
  40. package/dist/modules/llmswitch/bridge/index.d.ts +2 -2
  41. package/dist/modules/llmswitch/bridge/index.js +2 -2
  42. package/dist/modules/llmswitch/bridge/index.js.map +1 -1
  43. package/dist/modules/llmswitch/bridge/module-loader.js +2 -2
  44. package/dist/modules/llmswitch/bridge/module-loader.js.map +1 -1
  45. package/dist/modules/llmswitch/bridge/quota-manager.js +1 -1
  46. package/dist/modules/llmswitch/bridge/quota-manager.js.map +1 -1
  47. package/dist/modules/llmswitch/bridge/runtime-integrations.d.ts +1 -1
  48. package/dist/modules/llmswitch/bridge/runtime-integrations.js +1 -1
  49. package/dist/modules/llmswitch/bridge/runtime-integrations.js.map +1 -1
  50. package/dist/modules/llmswitch/bridge/snapshot-recorder.d.ts +1 -0
  51. package/dist/modules/llmswitch/bridge/snapshot-recorder.js +227 -24
  52. package/dist/modules/llmswitch/bridge/snapshot-recorder.js.map +1 -1
  53. package/dist/modules/llmswitch/bridge/state-integrations.d.ts +46 -0
  54. package/dist/modules/llmswitch/bridge/state-integrations.js +171 -0
  55. package/dist/modules/llmswitch/bridge/state-integrations.js.map +1 -1
  56. package/dist/modules/llmswitch/bridge.d.ts +7 -7
  57. package/dist/modules/llmswitch/bridge.js +2 -2
  58. package/dist/modules/llmswitch/bridge.js.map +1 -1
  59. package/dist/modules/llmswitch/core-loader.js +24 -35
  60. package/dist/modules/llmswitch/core-loader.js.map +1 -1
  61. package/dist/providers/auth/apikey-auth.d.ts +1 -0
  62. package/dist/providers/auth/apikey-auth.js +7 -2
  63. package/dist/providers/auth/apikey-auth.js.map +1 -1
  64. package/dist/providers/auth/oauth-auth.js +5 -3
  65. package/dist/providers/auth/oauth-auth.js.map +1 -1
  66. package/dist/providers/auth/oauth-lifecycle.js +84 -34
  67. package/dist/providers/auth/oauth-lifecycle.js.map +1 -1
  68. package/dist/providers/auth/tokenfile-auth.js +22 -12
  69. package/dist/providers/auth/tokenfile-auth.js.map +1 -1
  70. package/dist/providers/core/api/provider-types.d.ts +16 -0
  71. package/dist/providers/core/runtime/provider-factory-helpers.js +25 -3
  72. package/dist/providers/core/runtime/provider-factory-helpers.js.map +1 -1
  73. package/dist/providers/core/runtime/transport/request-header-builder.d.ts +8 -0
  74. package/dist/providers/core/runtime/transport/request-header-builder.js +129 -9
  75. package/dist/providers/core/runtime/transport/request-header-builder.js.map +1 -1
  76. package/dist/providers/core/runtime/vercel-ai-sdk/openai-sdk-transport.d.ts +2 -1
  77. package/dist/providers/core/runtime/vercel-ai-sdk/openai-sdk-transport.js +28 -2
  78. package/dist/providers/core/runtime/vercel-ai-sdk/openai-sdk-transport.js.map +1 -1
  79. package/dist/providers/core/strategies/oauth-auth-code-flow.js +3 -1
  80. package/dist/providers/core/strategies/oauth-auth-code-flow.js.map +1 -1
  81. package/dist/providers/core/utils/snapshot-writer.js +36 -27
  82. package/dist/providers/core/utils/snapshot-writer.js.map +1 -1
  83. package/dist/providers/mock/mock-provider-runtime.js +1 -1
  84. package/dist/providers/mock/mock-provider-runtime.js.map +1 -1
  85. package/dist/server/handlers/handler-response-utils.js +155 -17
  86. package/dist/server/handlers/handler-response-utils.js.map +1 -1
  87. package/dist/server/handlers/handler-utils.js +18 -10
  88. package/dist/server/handlers/handler-utils.js.map +1 -1
  89. package/dist/server/handlers/types.d.ts +4 -0
  90. package/dist/server/runtime/http-server/clock-runtime-hooks.js +133 -37
  91. package/dist/server/runtime/http-server/clock-runtime-hooks.js.map +1 -1
  92. package/dist/server/runtime/http-server/daemon-admin/providers-handler-routing-utils.js +0 -30
  93. package/dist/server/runtime/http-server/daemon-admin/providers-handler-routing-utils.js.map +1 -1
  94. package/dist/server/runtime/http-server/daemon-admin/providers-handler.js +1 -113
  95. package/dist/server/runtime/http-server/daemon-admin/providers-handler.js.map +1 -1
  96. package/dist/server/runtime/http-server/daemon-admin/status-handler.js +11 -2
  97. package/dist/server/runtime/http-server/daemon-admin/status-handler.js.map +1 -1
  98. package/dist/server/runtime/http-server/executor/client-injection-flow.js +9 -8
  99. package/dist/server/runtime/http-server/executor/client-injection-flow.js.map +1 -1
  100. package/dist/server/runtime/http-server/executor/provider-response-converter.js +35 -140
  101. package/dist/server/runtime/http-server/executor/provider-response-converter.js.map +1 -1
  102. package/dist/server/runtime/http-server/executor/provider-runtime-resolver.js +11 -1
  103. package/dist/server/runtime/http-server/executor/provider-runtime-resolver.js.map +1 -1
  104. package/dist/server/runtime/http-server/executor-metadata.js +60 -6
  105. package/dist/server/runtime/http-server/executor-metadata.js.map +1 -1
  106. package/dist/server/runtime/http-server/executor-pipeline.js +24 -1
  107. package/dist/server/runtime/http-server/executor-pipeline.js.map +1 -1
  108. package/dist/server/runtime/http-server/executor-provider.js +1 -1
  109. package/dist/server/runtime/http-server/executor-provider.js.map +1 -1
  110. package/dist/server/runtime/http-server/executor-response.js +1 -62
  111. package/dist/server/runtime/http-server/executor-response.js.map +1 -1
  112. package/dist/server/runtime/http-server/heartbeat-runtime-hooks.d.ts +23 -0
  113. package/dist/server/runtime/http-server/heartbeat-runtime-hooks.js +248 -0
  114. package/dist/server/runtime/http-server/heartbeat-runtime-hooks.js.map +1 -0
  115. package/dist/server/runtime/http-server/http-server-legacy-pipeline.js +6 -2
  116. package/dist/server/runtime/http-server/http-server-legacy-pipeline.js.map +1 -1
  117. package/dist/server/runtime/http-server/http-server-lifecycle.js +18 -0
  118. package/dist/server/runtime/http-server/http-server-lifecycle.js.map +1 -1
  119. package/dist/server/runtime/http-server/http-server-runtime-providers.js +14 -0
  120. package/dist/server/runtime/http-server/http-server-runtime-providers.js.map +1 -1
  121. package/dist/server/runtime/http-server/http-server-runtime-setup.js +2 -0
  122. package/dist/server/runtime/http-server/http-server-runtime-setup.js.map +1 -1
  123. package/dist/server/runtime/http-server/http-server-session-daemon.d.ts +1 -0
  124. package/dist/server/runtime/http-server/http-server-session-daemon.js +34 -8
  125. package/dist/server/runtime/http-server/http-server-session-daemon.js.map +1 -1
  126. package/dist/server/runtime/http-server/index.d.ts +1 -0
  127. package/dist/server/runtime/http-server/index.js +38 -2
  128. package/dist/server/runtime/http-server/index.js.map +1 -1
  129. package/dist/server/runtime/http-server/request-activity-tracker.d.ts +7 -0
  130. package/dist/server/runtime/http-server/request-activity-tracker.js +58 -0
  131. package/dist/server/runtime/http-server/request-activity-tracker.js.map +1 -0
  132. package/dist/server/runtime/http-server/request-executor.d.ts +7 -0
  133. package/dist/server/runtime/http-server/request-executor.js +554 -472
  134. package/dist/server/runtime/http-server/request-executor.js.map +1 -1
  135. package/dist/server/runtime/http-server/session-client-reaper.js +9 -2
  136. package/dist/server/runtime/http-server/session-client-reaper.js.map +1 -1
  137. package/dist/server/runtime/http-server/session-client-registry-utils.d.ts +1 -0
  138. package/dist/server/runtime/http-server/session-client-registry-utils.js +10 -2
  139. package/dist/server/runtime/http-server/session-client-registry-utils.js.map +1 -1
  140. package/dist/server/runtime/http-server/session-client-registry.d.ts +3 -0
  141. package/dist/server/runtime/http-server/session-client-registry.js +32 -1
  142. package/dist/server/runtime/http-server/session-client-registry.js.map +1 -1
  143. package/dist/server/runtime/http-server/session-client-route-utils.js +5 -38
  144. package/dist/server/runtime/http-server/session-client-route-utils.js.map +1 -1
  145. package/dist/server/runtime/http-server/session-client-routes.js +154 -3
  146. package/dist/server/runtime/http-server/session-client-routes.js.map +1 -1
  147. package/dist/server/runtime/http-server/session-execution-state.d.ts +47 -0
  148. package/dist/server/runtime/http-server/session-execution-state.js +328 -0
  149. package/dist/server/runtime/http-server/session-execution-state.js.map +1 -0
  150. package/dist/server/runtime/http-server/session-scope-resolution.d.ts +2 -0
  151. package/dist/server/runtime/http-server/session-scope-resolution.js +98 -4
  152. package/dist/server/runtime/http-server/session-scope-resolution.js.map +1 -1
  153. package/dist/server/runtime/http-server/session-storage-cleanup.d.ts +19 -0
  154. package/dist/server/runtime/http-server/session-storage-cleanup.js +325 -0
  155. package/dist/server/runtime/http-server/session-storage-cleanup.js.map +1 -0
  156. package/dist/server/runtime/http-server/tmux-injection-history.d.ts +12 -0
  157. package/dist/server/runtime/http-server/tmux-injection-history.js +94 -0
  158. package/dist/server/runtime/http-server/tmux-injection-history.js.map +1 -0
  159. package/dist/server/runtime/http-server/tmux-injection-runtime-config.d.ts +42 -0
  160. package/dist/server/runtime/http-server/tmux-injection-runtime-config.js +245 -0
  161. package/dist/server/runtime/http-server/tmux-injection-runtime-config.js.map +1 -0
  162. package/dist/server/runtime/http-server/tmux-scope-cleanup-policy.d.ts +21 -0
  163. package/dist/server/runtime/http-server/tmux-scope-cleanup-policy.js +59 -0
  164. package/dist/server/runtime/http-server/tmux-scope-cleanup-policy.js.map +1 -0
  165. package/dist/server/runtime/http-server/tmux-session-probe.d.ts +2 -0
  166. package/dist/server/runtime/http-server/tmux-session-probe.js +112 -2
  167. package/dist/server/runtime/http-server/tmux-session-probe.js.map +1 -1
  168. package/dist/server/utils/request-id-manager.d.ts +8 -0
  169. package/dist/server/utils/request-id-manager.js +116 -27
  170. package/dist/server/utils/request-id-manager.js.map +1 -1
  171. package/dist/server/utils/request-log-color.d.ts +1 -0
  172. package/dist/server/utils/request-log-color.js +12 -1
  173. package/dist/server/utils/request-log-color.js.map +1 -1
  174. package/dist/server/utils/stage-logger.js +37 -3
  175. package/dist/server/utils/stage-logger.js.map +1 -1
  176. package/dist/server-lifecycle/port-utils.js +38 -7
  177. package/dist/server-lifecycle/port-utils.js.map +1 -1
  178. package/dist/tools/semantic-replay-snapshot-loader.js +2 -2
  179. package/dist/tools/semantic-replay-snapshot-loader.js.map +1 -1
  180. package/dist/utils/errorsamples.js +181 -1
  181. package/dist/utils/errorsamples.js.map +1 -1
  182. package/dist/utils/snapshot-writer.js +18 -12
  183. package/dist/utils/snapshot-writer.js.map +1 -1
  184. package/docs/ARCHITECTURE.md +8 -0
  185. package/docs/CLOCK.md +51 -0
  186. package/docs/INSTRUCTION_MARKUP.md +28 -2
  187. package/docs/design/heartbeat-session-execution-state.md +227 -0
  188. package/docs/reports/apply-patch-errorsamples-classification.md +144 -0
  189. package/docs/session-client-daemon-design.md +92 -0
  190. package/package.json +9 -7
  191. package/scripts/analyze-thinking-keywords.mjs +1 -1
  192. package/scripts/ci/repo-sanity.mjs +38 -32
  193. package/scripts/ensure-llmswitch-mode.mjs +63 -5
  194. package/scripts/install-global.sh +23 -0
  195. package/scripts/install-release.sh +55 -5
  196. package/scripts/install-verify.mjs +143 -18
  197. package/scripts/link-global-llms-local.mjs +108 -0
  198. package/scripts/link-llmswitch.mjs +56 -0
  199. package/scripts/pack-mode.mjs +39 -16
  200. package/scripts/pack-rcc.mjs +63 -4
  201. package/scripts/publish-rcc.mjs +59 -4
  202. package/scripts/snapshot-inspect.mjs +5 -24
  203. package/scripts/tests/blackbox-rcc-vs-routecodex-antigravity.mjs +2 -2
  204. package/scripts/vendor-core.mjs +9 -30
  205. package/vendor/llmswitch-core/README.md +0 -271
  206. package/vendor/llmswitch-core/dist/bridge/routecodex-adapter.d.ts +0 -74
  207. package/vendor/llmswitch-core/dist/bridge/routecodex-adapter.js +0 -229
  208. package/vendor/llmswitch-core/dist/config-unified/enhanced-path-resolver.d.ts +0 -5
  209. package/vendor/llmswitch-core/dist/config-unified/enhanced-path-resolver.js +0 -46
  210. package/vendor/llmswitch-core/dist/config-unified/unified-config.d.ts +0 -26
  211. package/vendor/llmswitch-core/dist/config-unified/unified-config.js +0 -231
  212. package/vendor/llmswitch-core/dist/conversion/args-mapping.d.ts +0 -18
  213. package/vendor/llmswitch-core/dist/conversion/args-mapping.js +0 -8
  214. package/vendor/llmswitch-core/dist/conversion/bridge-actions.d.ts +0 -39
  215. package/vendor/llmswitch-core/dist/conversion/bridge-actions.js +0 -82
  216. package/vendor/llmswitch-core/dist/conversion/bridge-id-utils.d.ts +0 -9
  217. package/vendor/llmswitch-core/dist/conversion/bridge-id-utils.js +0 -13
  218. package/vendor/llmswitch-core/dist/conversion/bridge-instructions.d.ts +0 -1
  219. package/vendor/llmswitch-core/dist/conversion/bridge-instructions.js +0 -17
  220. package/vendor/llmswitch-core/dist/conversion/bridge-message-utils.d.ts +0 -23
  221. package/vendor/llmswitch-core/dist/conversion/bridge-message-utils.js +0 -45
  222. package/vendor/llmswitch-core/dist/conversion/bridge-metadata.d.ts +0 -2
  223. package/vendor/llmswitch-core/dist/conversion/bridge-metadata.js +0 -5
  224. package/vendor/llmswitch-core/dist/conversion/bridge-policies.d.ts +0 -18
  225. package/vendor/llmswitch-core/dist/conversion/bridge-policies.js +0 -11
  226. package/vendor/llmswitch-core/dist/conversion/codec-registry.d.ts +0 -10
  227. package/vendor/llmswitch-core/dist/conversion/codec-registry.js +0 -37
  228. package/vendor/llmswitch-core/dist/conversion/codecs/anthropic-openai-codec.d.ts +0 -22
  229. package/vendor/llmswitch-core/dist/conversion/codecs/anthropic-openai-codec.js +0 -52
  230. package/vendor/llmswitch-core/dist/conversion/codecs/gemini-openai-codec.d.ts +0 -17
  231. package/vendor/llmswitch-core/dist/conversion/codecs/gemini-openai-codec.js +0 -85
  232. package/vendor/llmswitch-core/dist/conversion/codecs/openai-openai-codec.d.ts +0 -12
  233. package/vendor/llmswitch-core/dist/conversion/codecs/openai-openai-codec.js +0 -54
  234. package/vendor/llmswitch-core/dist/conversion/codecs/responses-openai-codec.d.ts +0 -12
  235. package/vendor/llmswitch-core/dist/conversion/codecs/responses-openai-codec.js +0 -66
  236. package/vendor/llmswitch-core/dist/conversion/compaction-detect.d.ts +0 -2
  237. package/vendor/llmswitch-core/dist/conversion/compaction-detect.js +0 -4
  238. package/vendor/llmswitch-core/dist/conversion/compat/actions/anthropic-claude-code-system-prompt.d.ts +0 -4
  239. package/vendor/llmswitch-core/dist/conversion/compat/actions/anthropic-claude-code-system-prompt.js +0 -42
  240. package/vendor/llmswitch-core/dist/conversion/compat/actions/anthropic-claude-code-user-id.d.ts +0 -3
  241. package/vendor/llmswitch-core/dist/conversion/compat/actions/anthropic-claude-code-user-id.js +0 -30
  242. package/vendor/llmswitch-core/dist/conversion/compat/actions/antigravity-thought-signature-cache.d.ts +0 -3
  243. package/vendor/llmswitch-core/dist/conversion/compat/actions/antigravity-thought-signature-cache.js +0 -8
  244. package/vendor/llmswitch-core/dist/conversion/compat/actions/antigravity-thought-signature-prepare.d.ts +0 -3
  245. package/vendor/llmswitch-core/dist/conversion/compat/actions/antigravity-thought-signature-prepare.js +0 -26
  246. package/vendor/llmswitch-core/dist/conversion/compat/actions/apply-patch-fixer.d.ts +0 -1
  247. package/vendor/llmswitch-core/dist/conversion/compat/actions/apply-patch-fixer.js +0 -30
  248. package/vendor/llmswitch-core/dist/conversion/compat/actions/auto-thinking.d.ts +0 -6
  249. package/vendor/llmswitch-core/dist/conversion/compat/actions/auto-thinking.js +0 -26
  250. package/vendor/llmswitch-core/dist/conversion/compat/actions/claude-thinking-tools.d.ts +0 -2
  251. package/vendor/llmswitch-core/dist/conversion/compat/actions/claude-thinking-tools.js +0 -4
  252. package/vendor/llmswitch-core/dist/conversion/compat/actions/deepseek-web-request.d.ts +0 -3
  253. package/vendor/llmswitch-core/dist/conversion/compat/actions/deepseek-web-request.js +0 -62
  254. package/vendor/llmswitch-core/dist/conversion/compat/actions/deepseek-web-response.d.ts +0 -12
  255. package/vendor/llmswitch-core/dist/conversion/compat/actions/deepseek-web-response.js +0 -114
  256. package/vendor/llmswitch-core/dist/conversion/compat/actions/field-mapping.d.ts +0 -14
  257. package/vendor/llmswitch-core/dist/conversion/compat/actions/field-mapping.js +0 -155
  258. package/vendor/llmswitch-core/dist/conversion/compat/actions/gemini-cli-request.d.ts +0 -5
  259. package/vendor/llmswitch-core/dist/conversion/compat/actions/gemini-cli-request.js +0 -27
  260. package/vendor/llmswitch-core/dist/conversion/compat/actions/gemini-web-search.d.ts +0 -3
  261. package/vendor/llmswitch-core/dist/conversion/compat/actions/gemini-web-search.js +0 -24
  262. package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-history-image-trim.d.ts +0 -2
  263. package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-history-image-trim.js +0 -54
  264. package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-image-content.d.ts +0 -2
  265. package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-image-content.js +0 -54
  266. package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-native-compat.d.ts +0 -6
  267. package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-native-compat.js +0 -34
  268. package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-tool-extraction.d.ts +0 -3
  269. package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-tool-extraction.js +0 -35
  270. package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-vision-prompt.d.ts +0 -11
  271. package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-vision-prompt.js +0 -104
  272. package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-web-search.d.ts +0 -2
  273. package/vendor/llmswitch-core/dist/conversion/compat/actions/glm-web-search.js +0 -30
  274. package/vendor/llmswitch-core/dist/conversion/compat/actions/harvest-tool-calls-from-text.d.ts +0 -15
  275. package/vendor/llmswitch-core/dist/conversion/compat/actions/harvest-tool-calls-from-text.js +0 -124
  276. package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-kimi-cli-defaults.d.ts +0 -10
  277. package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-kimi-cli-defaults.js +0 -31
  278. package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-kimi-history-media-placeholder.d.ts +0 -7
  279. package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-kimi-history-media-placeholder.js +0 -25
  280. package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-kimi-thinking-reasoning-fill.d.ts +0 -12
  281. package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-kimi-thinking-reasoning-fill.js +0 -46
  282. package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-native-compat.d.ts +0 -6
  283. package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-native-compat.js +0 -36
  284. package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-response-body-unwrap.d.ts +0 -9
  285. package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-response-body-unwrap.js +0 -25
  286. package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-tool-text-fallback.d.ts +0 -5
  287. package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-tool-text-fallback.js +0 -29
  288. package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-web-search.d.ts +0 -18
  289. package/vendor/llmswitch-core/dist/conversion/compat/actions/iflow-web-search.js +0 -49
  290. package/vendor/llmswitch-core/dist/conversion/compat/actions/index.d.ts +0 -2
  291. package/vendor/llmswitch-core/dist/conversion/compat/actions/index.js +0 -2
  292. package/vendor/llmswitch-core/dist/conversion/compat/actions/lmstudio-responses-fc-ids.d.ts +0 -2
  293. package/vendor/llmswitch-core/dist/conversion/compat/actions/lmstudio-responses-fc-ids.js +0 -4
  294. package/vendor/llmswitch-core/dist/conversion/compat/actions/lmstudio-responses-input-stringify.d.ts +0 -14
  295. package/vendor/llmswitch-core/dist/conversion/compat/actions/lmstudio-responses-input-stringify.js +0 -125
  296. package/vendor/llmswitch-core/dist/conversion/compat/actions/normalize-tool-call-ids.d.ts +0 -2
  297. package/vendor/llmswitch-core/dist/conversion/compat/actions/normalize-tool-call-ids.js +0 -10
  298. package/vendor/llmswitch-core/dist/conversion/compat/actions/qwen-transform.d.ts +0 -4
  299. package/vendor/llmswitch-core/dist/conversion/compat/actions/qwen-transform.js +0 -40
  300. package/vendor/llmswitch-core/dist/conversion/compat/actions/request-rules.d.ts +0 -24
  301. package/vendor/llmswitch-core/dist/conversion/compat/actions/request-rules.js +0 -4
  302. package/vendor/llmswitch-core/dist/conversion/compat/actions/response-blacklist.d.ts +0 -10
  303. package/vendor/llmswitch-core/dist/conversion/compat/actions/response-blacklist.js +0 -10
  304. package/vendor/llmswitch-core/dist/conversion/compat/actions/response-normalize.d.ts +0 -5
  305. package/vendor/llmswitch-core/dist/conversion/compat/actions/response-normalize.js +0 -4
  306. package/vendor/llmswitch-core/dist/conversion/compat/actions/response-validate.d.ts +0 -5
  307. package/vendor/llmswitch-core/dist/conversion/compat/actions/response-validate.js +0 -4
  308. package/vendor/llmswitch-core/dist/conversion/compat/actions/snapshot.d.ts +0 -8
  309. package/vendor/llmswitch-core/dist/conversion/compat/actions/snapshot.js +0 -21
  310. package/vendor/llmswitch-core/dist/conversion/compat/actions/strip-orphan-function-calls-tag.d.ts +0 -2
  311. package/vendor/llmswitch-core/dist/conversion/compat/actions/strip-orphan-function-calls-tag.js +0 -4
  312. package/vendor/llmswitch-core/dist/conversion/compat/actions/tool-schema.d.ts +0 -6
  313. package/vendor/llmswitch-core/dist/conversion/compat/actions/tool-schema.js +0 -91
  314. package/vendor/llmswitch-core/dist/conversion/compat/actions/tool-text-request-guidance.d.ts +0 -9
  315. package/vendor/llmswitch-core/dist/conversion/compat/actions/tool-text-request-guidance.js +0 -7
  316. package/vendor/llmswitch-core/dist/conversion/compat/actions/universal-shape-filter.d.ts +0 -57
  317. package/vendor/llmswitch-core/dist/conversion/compat/actions/universal-shape-filter.js +0 -14
  318. package/vendor/llmswitch-core/dist/conversion/compat/antigravity-session-signature.d.ts +0 -86
  319. package/vendor/llmswitch-core/dist/conversion/compat/antigravity-session-signature.js +0 -1143
  320. package/vendor/llmswitch-core/dist/conversion/compat/profiles/anthropic-claude-code.json +0 -17
  321. package/vendor/llmswitch-core/dist/conversion/compat/profiles/chat-claude-code.json +0 -18
  322. package/vendor/llmswitch-core/dist/conversion/compat/profiles/chat-deepseek-web.json +0 -47
  323. package/vendor/llmswitch-core/dist/conversion/compat/profiles/chat-gemini-cli.json +0 -23
  324. package/vendor/llmswitch-core/dist/conversion/compat/profiles/chat-gemini.json +0 -31
  325. package/vendor/llmswitch-core/dist/conversion/compat/profiles/chat-glm.json +0 -405
  326. package/vendor/llmswitch-core/dist/conversion/compat/profiles/chat-iflow.json +0 -353
  327. package/vendor/llmswitch-core/dist/conversion/compat/profiles/chat-lmstudio.json +0 -80
  328. package/vendor/llmswitch-core/dist/conversion/compat/profiles/chat-qwen.json +0 -22
  329. package/vendor/llmswitch-core/dist/conversion/compat/profiles/responses-c4m.json +0 -45
  330. package/vendor/llmswitch-core/dist/conversion/compat/profiles/responses-crs.json +0 -15
  331. package/vendor/llmswitch-core/dist/conversion/compat/profiles/responses-output2choices-test.json +0 -12
  332. package/vendor/llmswitch-core/dist/conversion/config/config-manager.d.ts +0 -212
  333. package/vendor/llmswitch-core/dist/conversion/config/config-manager.js +0 -310
  334. package/vendor/llmswitch-core/dist/conversion/config/sample-config.json +0 -314
  335. package/vendor/llmswitch-core/dist/conversion/config/version-switch.json +0 -150
  336. package/vendor/llmswitch-core/dist/conversion/hub/config/types.d.ts +0 -26
  337. package/vendor/llmswitch-core/dist/conversion/hub/config/types.js +0 -1
  338. package/vendor/llmswitch-core/dist/conversion/hub/core/detour-registry.d.ts +0 -11
  339. package/vendor/llmswitch-core/dist/conversion/hub/core/detour-registry.js +0 -23
  340. package/vendor/llmswitch-core/dist/conversion/hub/core/hub-context.d.ts +0 -23
  341. package/vendor/llmswitch-core/dist/conversion/hub/core/hub-context.js +0 -1
  342. package/vendor/llmswitch-core/dist/conversion/hub/core/index.d.ts +0 -4
  343. package/vendor/llmswitch-core/dist/conversion/hub/core/index.js +0 -3
  344. package/vendor/llmswitch-core/dist/conversion/hub/core/stage-driver.d.ts +0 -30
  345. package/vendor/llmswitch-core/dist/conversion/hub/core/stage-driver.js +0 -33
  346. package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/anthropic-format-adapter.d.ts +0 -16
  347. package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/anthropic-format-adapter.js +0 -42
  348. package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/chat-format-adapter.d.ts +0 -17
  349. package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/chat-format-adapter.js +0 -42
  350. package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/gemini-format-adapter.d.ts +0 -16
  351. package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/gemini-format-adapter.js +0 -42
  352. package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/index.d.ts +0 -21
  353. package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/index.js +0 -4
  354. package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/responses-format-adapter.d.ts +0 -19
  355. package/vendor/llmswitch-core/dist/conversion/hub/format-adapters/responses-format-adapter.js +0 -42
  356. package/vendor/llmswitch-core/dist/conversion/hub/hub-feature.d.ts +0 -1
  357. package/vendor/llmswitch-core/dist/conversion/hub/hub-feature.js +0 -26
  358. package/vendor/llmswitch-core/dist/conversion/hub/node-support.d.ts +0 -19
  359. package/vendor/llmswitch-core/dist/conversion/hub/node-support.js +0 -136
  360. package/vendor/llmswitch-core/dist/conversion/hub/operation-table/operation-table-runner.d.ts +0 -18
  361. package/vendor/llmswitch-core/dist/conversion/hub/operation-table/operation-table-runner.js +0 -162
  362. package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/anthropic-mapper.d.ts +0 -8
  363. package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/anthropic-mapper.js +0 -503
  364. package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/archive/chat-mapper.archive.d.ts +0 -8
  365. package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/archive/chat-mapper.archive.js +0 -409
  366. package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/chat-mapper.d.ts +0 -8
  367. package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/chat-mapper.js +0 -350
  368. package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/gemini-mapper.d.ts +0 -7
  369. package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/gemini-mapper.js +0 -1540
  370. package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/responses-mapper.d.ts +0 -21
  371. package/vendor/llmswitch-core/dist/conversion/hub/operation-table/semantic-mappers/responses-mapper.js +0 -491
  372. package/vendor/llmswitch-core/dist/conversion/hub/ops/operations.d.ts +0 -19
  373. package/vendor/llmswitch-core/dist/conversion/hub/ops/operations.js +0 -7
  374. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-engine.d.ts +0 -9
  375. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-engine.js +0 -13
  376. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-pipeline-executor.d.ts +0 -9
  377. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-pipeline-executor.js +0 -46
  378. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-profile-resolver.d.ts +0 -2
  379. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-profile-resolver.js +0 -14
  380. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-profile-store.d.ts +0 -2
  381. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-profile-store.js +0 -94
  382. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-types.d.ts +0 -175
  383. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/compat-types.js +0 -1
  384. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/native-adapter-context.d.ts +0 -3
  385. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/compat/native-adapter-context.js +0 -40
  386. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/hub-pipeline.d.ts +0 -111
  387. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/hub-pipeline.js +0 -1927
  388. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/hub-stage-timing.d.ts +0 -8
  389. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/hub-stage-timing.js +0 -211
  390. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/session-identifiers.d.ts +0 -9
  391. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/session-identifiers.js +0 -16
  392. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage1_format_parse/index.d.ts +0 -10
  393. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage1_format_parse/index.js +0 -236
  394. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage2_semantic_map/index.d.ts +0 -24
  395. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage2_semantic_map/index.js +0 -132
  396. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage2_semantic_map/semantic-lift.d.ts +0 -14
  397. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage2_semantic_map/semantic-lift.js +0 -24
  398. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/archive/shell-like-tool-call-normalization-fallback.d.ts +0 -2
  399. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/archive/shell-like-tool-call-normalization-fallback.js +0 -157
  400. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/context-capture-orchestration.d.ts +0 -16
  401. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/context-capture-orchestration.js +0 -29
  402. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/context-factories.d.ts +0 -5
  403. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/context-factories.js +0 -19
  404. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/index.d.ts +0 -6
  405. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/index.js +0 -22
  406. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/responses-context-snapshot.d.ts +0 -8
  407. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/responses-context-snapshot.js +0 -28
  408. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/tool-output-diagnostics.d.ts +0 -2
  409. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/tool-output-diagnostics.js +0 -4
  410. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/tool-output-snapshot.d.ts +0 -10
  411. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage3_context_capture/tool-output-snapshot.js +0 -12
  412. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage1_semantic_map/context-merge.d.ts +0 -3
  413. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage1_semantic_map/context-merge.js +0 -30
  414. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage1_semantic_map/index.d.ts +0 -18
  415. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage1_semantic_map/index.js +0 -84
  416. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage2_format_build/index.d.ts +0 -8
  417. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage2_format_build/index.js +0 -12
  418. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage3_compat/index.d.ts +0 -14
  419. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_outbound/req_outbound_stage3_compat/index.js +0 -45
  420. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_process/req_process_stage1_tool_governance/index.d.ts +0 -16
  421. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_process/req_process_stage1_tool_governance/index.js +0 -62
  422. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_process/req_process_stage2_route_select/index.d.ts +0 -17
  423. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/req_process/req_process_stage2_route_select/index.js +0 -35
  424. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_inbound/resp_inbound_stage1_sse_decode/index.d.ts +0 -17
  425. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_inbound/resp_inbound_stage1_sse_decode/index.js +0 -243
  426. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_inbound/resp_inbound_stage1_sse_decode/stream-json-sniffer.d.ts +0 -3
  427. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_inbound/resp_inbound_stage1_sse_decode/stream-json-sniffer.js +0 -81
  428. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_inbound/resp_inbound_stage2_format_parse/index.d.ts +0 -10
  429. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_inbound/resp_inbound_stage2_format_parse/index.js +0 -50
  430. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_inbound/resp_inbound_stage3_semantic_map/index.d.ts +0 -13
  431. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_inbound/resp_inbound_stage3_semantic_map/index.js +0 -25
  432. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_outbound/resp_outbound_stage1_client_remap/chat-process-semantics-bridge.d.ts +0 -6
  433. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_outbound/resp_outbound_stage1_client_remap/chat-process-semantics-bridge.js +0 -17
  434. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_outbound/resp_outbound_stage1_client_remap/client-remap-protocol-switch.d.ts +0 -9
  435. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_outbound/resp_outbound_stage1_client_remap/client-remap-protocol-switch.js +0 -103
  436. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_outbound/resp_outbound_stage1_client_remap/index.d.ts +0 -13
  437. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_outbound/resp_outbound_stage1_client_remap/index.js +0 -30
  438. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_outbound/resp_outbound_stage2_sse_stream/index.d.ts +0 -17
  439. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_outbound/resp_outbound_stage2_sse_stream/index.js +0 -35
  440. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_process/resp_process_stage1_tool_governance/index.d.ts +0 -16
  441. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_process/resp_process_stage1_tool_governance/index.js +0 -52
  442. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_process/resp_process_stage2_finalize/index.d.ts +0 -19
  443. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_process/resp_process_stage2_finalize/index.js +0 -40
  444. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_process/resp_process_stage3_servertool_orchestration/index.d.ts +0 -44
  445. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/resp_process/resp_process_stage3_servertool_orchestration/index.js +0 -88
  446. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/utils.d.ts +0 -2
  447. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/stages/utils.js +0 -27
  448. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/target-utils.d.ts +0 -5
  449. package/vendor/llmswitch-core/dist/conversion/hub/pipeline/target-utils.js +0 -26
  450. package/vendor/llmswitch-core/dist/conversion/hub/pipelines/inbound.d.ts +0 -22
  451. package/vendor/llmswitch-core/dist/conversion/hub/pipelines/inbound.js +0 -66
  452. package/vendor/llmswitch-core/dist/conversion/hub/pipelines/outbound.d.ts +0 -22
  453. package/vendor/llmswitch-core/dist/conversion/hub/pipelines/outbound.js +0 -59
  454. package/vendor/llmswitch-core/dist/conversion/hub/policy/policy-engine.d.ts +0 -48
  455. package/vendor/llmswitch-core/dist/conversion/hub/policy/policy-engine.js +0 -269
  456. package/vendor/llmswitch-core/dist/conversion/hub/policy/protocol-spec.d.ts +0 -75
  457. package/vendor/llmswitch-core/dist/conversion/hub/policy/protocol-spec.js +0 -27
  458. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-anthropic-alias.d.ts +0 -2
  459. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-anthropic-alias.js +0 -36
  460. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-directive-parser.d.ts +0 -5
  461. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-directive-parser.js +0 -56
  462. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-directives.d.ts +0 -24
  463. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-directives.js +0 -98
  464. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-directives.d.ts +0 -8
  465. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-directives.js +0 -42
  466. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-finalize.d.ts +0 -14
  467. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-finalize.js +0 -10
  468. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-messages.d.ts +0 -5
  469. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-messages.js +0 -10
  470. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-orchestration.d.ts +0 -30
  471. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-orchestration.js +0 -68
  472. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-time-tag.d.ts +0 -9
  473. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminder-time-tag.js +0 -18
  474. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminders.d.ts +0 -2
  475. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-reminders.js +0 -104
  476. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-tool-schemas.d.ts +0 -3
  477. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-tool-schemas.js +0 -280
  478. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-tools.d.ts +0 -6
  479. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-clock-tools.js +0 -41
  480. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-continue-execution.d.ts +0 -11
  481. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-continue-execution.js +0 -83
  482. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governance-context.d.ts +0 -15
  483. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governance-context.js +0 -7
  484. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governance-finalize.d.ts +0 -16
  485. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governance-finalize.js +0 -11
  486. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governance-orchestration.d.ts +0 -9
  487. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governance-orchestration.js +0 -49
  488. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governed-control-ops.d.ts +0 -8
  489. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governed-control-ops.js +0 -5
  490. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governed-filter-call.d.ts +0 -12
  491. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governed-filter-call.js +0 -18
  492. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governed-merge.d.ts +0 -8
  493. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-governed-merge.js +0 -11
  494. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-media.d.ts +0 -5
  495. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-media.js +0 -108
  496. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-node-result.d.ts +0 -23
  497. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-node-result.js +0 -24
  498. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-pending-tool-sync.d.ts +0 -14
  499. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-pending-tool-sync.js +0 -52
  500. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-post-governed-normalization.d.ts +0 -8
  501. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-post-governed-normalization.js +0 -16
  502. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-review.d.ts +0 -2
  503. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-review.js +0 -8
  504. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-servertool-orchestration.d.ts +0 -8
  505. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-servertool-orchestration.js +0 -22
  506. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-session-usage.d.ts +0 -7
  507. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-session-usage.js +0 -147
  508. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-tool-normalization.d.ts +0 -2
  509. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-tool-normalization.js +0 -4
  510. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-web-search-intent.d.ts +0 -12
  511. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-web-search-intent.js +0 -13
  512. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-web-search-tool-schema.d.ts +0 -3
  513. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-web-search-tool-schema.js +0 -4
  514. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-web-search.d.ts +0 -8
  515. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process-web-search.js +0 -26
  516. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process.d.ts +0 -15
  517. package/vendor/llmswitch-core/dist/conversion/hub/process/chat-process.js +0 -27
  518. package/vendor/llmswitch-core/dist/conversion/hub/process/client-inject-readiness.d.ts +0 -1
  519. package/vendor/llmswitch-core/dist/conversion/hub/process/client-inject-readiness.js +0 -4
  520. package/vendor/llmswitch-core/dist/conversion/hub/registry.d.ts +0 -28
  521. package/vendor/llmswitch-core/dist/conversion/hub/registry.js +0 -101
  522. package/vendor/llmswitch-core/dist/conversion/hub/response/chat-response-utils.d.ts +0 -6
  523. package/vendor/llmswitch-core/dist/conversion/hub/response/chat-response-utils.js +0 -8
  524. package/vendor/llmswitch-core/dist/conversion/hub/response/provider-response.d.ts +0 -51
  525. package/vendor/llmswitch-core/dist/conversion/hub/response/provider-response.js +0 -529
  526. package/vendor/llmswitch-core/dist/conversion/hub/response/response-mappers.d.ts +0 -24
  527. package/vendor/llmswitch-core/dist/conversion/hub/response/response-mappers.js +0 -73
  528. package/vendor/llmswitch-core/dist/conversion/hub/response/response-runtime.d.ts +0 -9
  529. package/vendor/llmswitch-core/dist/conversion/hub/response/response-runtime.js +0 -758
  530. package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/anthropic-mapper.d.ts +0 -2
  531. package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/anthropic-mapper.js +0 -2
  532. package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/chat-mapper.d.ts +0 -2
  533. package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/chat-mapper.js +0 -2
  534. package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/gemini-mapper.d.ts +0 -2
  535. package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/gemini-mapper.js +0 -2
  536. package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/index.d.ts +0 -4
  537. package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/index.js +0 -4
  538. package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/responses-mapper.d.ts +0 -2
  539. package/vendor/llmswitch-core/dist/conversion/hub/semantic-mappers/responses-mapper.js +0 -2
  540. package/vendor/llmswitch-core/dist/conversion/hub/snapshot-recorder.d.ts +0 -13
  541. package/vendor/llmswitch-core/dist/conversion/hub/snapshot-recorder.js +0 -38
  542. package/vendor/llmswitch-core/dist/conversion/hub/standardized-bridge.d.ts +0 -12
  543. package/vendor/llmswitch-core/dist/conversion/hub/standardized-bridge.js +0 -16
  544. package/vendor/llmswitch-core/dist/conversion/hub/tool-governance/engine.d.ts +0 -24
  545. package/vendor/llmswitch-core/dist/conversion/hub/tool-governance/engine.js +0 -118
  546. package/vendor/llmswitch-core/dist/conversion/hub/tool-governance/index.d.ts +0 -3
  547. package/vendor/llmswitch-core/dist/conversion/hub/tool-governance/index.js +0 -2
  548. package/vendor/llmswitch-core/dist/conversion/hub/tool-governance/rules.d.ts +0 -2
  549. package/vendor/llmswitch-core/dist/conversion/hub/tool-governance/rules.js +0 -80
  550. package/vendor/llmswitch-core/dist/conversion/hub/tool-governance/types.d.ts +0 -38
  551. package/vendor/llmswitch-core/dist/conversion/hub/tool-governance/types.js +0 -1
  552. package/vendor/llmswitch-core/dist/conversion/hub/tool-session-compat.d.ts +0 -26
  553. package/vendor/llmswitch-core/dist/conversion/hub/tool-session-compat.js +0 -86
  554. package/vendor/llmswitch-core/dist/conversion/hub/tool-surface/tool-surface-engine.d.ts +0 -18
  555. package/vendor/llmswitch-core/dist/conversion/hub/tool-surface/tool-surface-engine.js +0 -574
  556. package/vendor/llmswitch-core/dist/conversion/hub/types/chat-envelope.d.ts +0 -79
  557. package/vendor/llmswitch-core/dist/conversion/hub/types/chat-envelope.js +0 -1
  558. package/vendor/llmswitch-core/dist/conversion/hub/types/chat-schema.d.ts +0 -112
  559. package/vendor/llmswitch-core/dist/conversion/hub/types/chat-schema.js +0 -1
  560. package/vendor/llmswitch-core/dist/conversion/hub/types/errors.d.ts +0 -5
  561. package/vendor/llmswitch-core/dist/conversion/hub/types/errors.js +0 -13
  562. package/vendor/llmswitch-core/dist/conversion/hub/types/format-envelope.d.ts +0 -7
  563. package/vendor/llmswitch-core/dist/conversion/hub/types/format-envelope.js +0 -1
  564. package/vendor/llmswitch-core/dist/conversion/hub/types/index.d.ts +0 -6
  565. package/vendor/llmswitch-core/dist/conversion/hub/types/index.js +0 -6
  566. package/vendor/llmswitch-core/dist/conversion/hub/types/json.d.ts +0 -9
  567. package/vendor/llmswitch-core/dist/conversion/hub/types/json.js +0 -9
  568. package/vendor/llmswitch-core/dist/conversion/hub/types/node.d.ts +0 -31
  569. package/vendor/llmswitch-core/dist/conversion/hub/types/node.js +0 -1
  570. package/vendor/llmswitch-core/dist/conversion/hub/types/standardized.d.ts +0 -99
  571. package/vendor/llmswitch-core/dist/conversion/hub/types/standardized.js +0 -1
  572. package/vendor/llmswitch-core/dist/conversion/index.d.ts +0 -33
  573. package/vendor/llmswitch-core/dist/conversion/index.js +0 -33
  574. package/vendor/llmswitch-core/dist/conversion/jsonish.d.ts +0 -3
  575. package/vendor/llmswitch-core/dist/conversion/jsonish.js +0 -20
  576. package/vendor/llmswitch-core/dist/conversion/mcp-injection.d.ts +0 -2
  577. package/vendor/llmswitch-core/dist/conversion/mcp-injection.js +0 -7
  578. package/vendor/llmswitch-core/dist/conversion/media.d.ts +0 -1
  579. package/vendor/llmswitch-core/dist/conversion/media.js +0 -4
  580. package/vendor/llmswitch-core/dist/conversion/metadata-passthrough.d.ts +0 -11
  581. package/vendor/llmswitch-core/dist/conversion/metadata-passthrough.js +0 -20
  582. package/vendor/llmswitch-core/dist/conversion/payload-budget.d.ts +0 -13
  583. package/vendor/llmswitch-core/dist/conversion/payload-budget.js +0 -47
  584. package/vendor/llmswitch-core/dist/conversion/pipeline/codecs/v2/anthropic-openai-pipeline.d.ts +0 -11
  585. package/vendor/llmswitch-core/dist/conversion/pipeline/codecs/v2/anthropic-openai-pipeline.js +0 -104
  586. package/vendor/llmswitch-core/dist/conversion/pipeline/codecs/v2/openai-openai-pipeline.d.ts +0 -15
  587. package/vendor/llmswitch-core/dist/conversion/pipeline/codecs/v2/openai-openai-pipeline.js +0 -176
  588. package/vendor/llmswitch-core/dist/conversion/pipeline/codecs/v2/responses-openai-pipeline.d.ts +0 -12
  589. package/vendor/llmswitch-core/dist/conversion/pipeline/codecs/v2/responses-openai-pipeline.js +0 -212
  590. package/vendor/llmswitch-core/dist/conversion/pipeline/codecs/v2/shared/openai-chat-helpers.d.ts +0 -13
  591. package/vendor/llmswitch-core/dist/conversion/pipeline/codecs/v2/shared/openai-chat-helpers.js +0 -34
  592. package/vendor/llmswitch-core/dist/conversion/pipeline/hooks/adapter-context.d.ts +0 -7
  593. package/vendor/llmswitch-core/dist/conversion/pipeline/hooks/adapter-context.js +0 -18
  594. package/vendor/llmswitch-core/dist/conversion/pipeline/hooks/protocol-hooks.d.ts +0 -67
  595. package/vendor/llmswitch-core/dist/conversion/pipeline/hooks/protocol-hooks.js +0 -1
  596. package/vendor/llmswitch-core/dist/conversion/pipeline/index.d.ts +0 -35
  597. package/vendor/llmswitch-core/dist/conversion/pipeline/index.js +0 -103
  598. package/vendor/llmswitch-core/dist/conversion/pipeline/meta/meta-bag.d.ts +0 -20
  599. package/vendor/llmswitch-core/dist/conversion/pipeline/meta/meta-bag.js +0 -81
  600. package/vendor/llmswitch-core/dist/conversion/pipeline/schema/canonical-chat.d.ts +0 -18
  601. package/vendor/llmswitch-core/dist/conversion/pipeline/schema/canonical-chat.js +0 -1
  602. package/vendor/llmswitch-core/dist/conversion/pipeline/schema/index.d.ts +0 -1
  603. package/vendor/llmswitch-core/dist/conversion/pipeline/schema/index.js +0 -1
  604. package/vendor/llmswitch-core/dist/conversion/protocol-field-allowlists.d.ts +0 -7
  605. package/vendor/llmswitch-core/dist/conversion/protocol-field-allowlists.js +0 -9
  606. package/vendor/llmswitch-core/dist/conversion/protocol-state.d.ts +0 -4
  607. package/vendor/llmswitch-core/dist/conversion/protocol-state.js +0 -27
  608. package/vendor/llmswitch-core/dist/conversion/provider-protocol-error.d.ts +0 -17
  609. package/vendor/llmswitch-core/dist/conversion/provider-protocol-error.js +0 -25
  610. package/vendor/llmswitch-core/dist/conversion/responses/responses-host-policy.d.ts +0 -6
  611. package/vendor/llmswitch-core/dist/conversion/responses/responses-host-policy.js +0 -4
  612. package/vendor/llmswitch-core/dist/conversion/responses/responses-openai-bridge/response-payload.d.ts +0 -3
  613. package/vendor/llmswitch-core/dist/conversion/responses/responses-openai-bridge/response-payload.js +0 -190
  614. package/vendor/llmswitch-core/dist/conversion/responses/responses-openai-bridge/types.d.ts +0 -35
  615. package/vendor/llmswitch-core/dist/conversion/responses/responses-openai-bridge/types.js +0 -1
  616. package/vendor/llmswitch-core/dist/conversion/responses/responses-openai-bridge.d.ts +0 -15
  617. package/vendor/llmswitch-core/dist/conversion/responses/responses-openai-bridge.js +0 -475
  618. package/vendor/llmswitch-core/dist/conversion/runtime-metadata.d.ts +0 -7
  619. package/vendor/llmswitch-core/dist/conversion/runtime-metadata.js +0 -31
  620. package/vendor/llmswitch-core/dist/conversion/schema-validator.d.ts +0 -7
  621. package/vendor/llmswitch-core/dist/conversion/schema-validator.js +0 -67
  622. package/vendor/llmswitch-core/dist/conversion/shared/anthropic-message-utils.d.ts +0 -22
  623. package/vendor/llmswitch-core/dist/conversion/shared/anthropic-message-utils.js +0 -1416
  624. package/vendor/llmswitch-core/dist/conversion/shared/chat-envelope-validator.d.ts +0 -8
  625. package/vendor/llmswitch-core/dist/conversion/shared/chat-envelope-validator.js +0 -4
  626. package/vendor/llmswitch-core/dist/conversion/shared/chat-output-normalizer.d.ts +0 -4
  627. package/vendor/llmswitch-core/dist/conversion/shared/chat-output-normalizer.js +0 -10
  628. package/vendor/llmswitch-core/dist/conversion/shared/chat-request-filters.d.ts +0 -8
  629. package/vendor/llmswitch-core/dist/conversion/shared/chat-request-filters.js +0 -63
  630. package/vendor/llmswitch-core/dist/conversion/shared/gemini-tool-utils.d.ts +0 -7
  631. package/vendor/llmswitch-core/dist/conversion/shared/gemini-tool-utils.js +0 -20
  632. package/vendor/llmswitch-core/dist/conversion/shared/openai-finalizer.d.ts +0 -8
  633. package/vendor/llmswitch-core/dist/conversion/shared/openai-finalizer.js +0 -22
  634. package/vendor/llmswitch-core/dist/conversion/shared/openai-message-normalize.d.ts +0 -1
  635. package/vendor/llmswitch-core/dist/conversion/shared/openai-message-normalize.js +0 -151
  636. package/vendor/llmswitch-core/dist/conversion/shared/output-content-normalizer.d.ts +0 -12
  637. package/vendor/llmswitch-core/dist/conversion/shared/output-content-normalizer.js +0 -26
  638. package/vendor/llmswitch-core/dist/conversion/shared/reasoning-mapping.d.ts +0 -5
  639. package/vendor/llmswitch-core/dist/conversion/shared/reasoning-mapping.js +0 -7
  640. package/vendor/llmswitch-core/dist/conversion/shared/reasoning-normalizer.d.ts +0 -25
  641. package/vendor/llmswitch-core/dist/conversion/shared/reasoning-normalizer.js +0 -114
  642. package/vendor/llmswitch-core/dist/conversion/shared/reasoning-tool-normalizer.d.ts +0 -12
  643. package/vendor/llmswitch-core/dist/conversion/shared/reasoning-tool-normalizer.js +0 -22
  644. package/vendor/llmswitch-core/dist/conversion/shared/reasoning-tool-parser.d.ts +0 -10
  645. package/vendor/llmswitch-core/dist/conversion/shared/reasoning-tool-parser.js +0 -11
  646. package/vendor/llmswitch-core/dist/conversion/shared/reasoning-utils.d.ts +0 -2
  647. package/vendor/llmswitch-core/dist/conversion/shared/reasoning-utils.js +0 -19
  648. package/vendor/llmswitch-core/dist/conversion/shared/responses-conversation-store.d.ts +0 -35
  649. package/vendor/llmswitch-core/dist/conversion/shared/responses-conversation-store.js +0 -195
  650. package/vendor/llmswitch-core/dist/conversion/shared/responses-output-builder.d.ts +0 -13
  651. package/vendor/llmswitch-core/dist/conversion/shared/responses-output-builder.js +0 -32
  652. package/vendor/llmswitch-core/dist/conversion/shared/responses-reasoning-registry.d.ts +0 -24
  653. package/vendor/llmswitch-core/dist/conversion/shared/responses-reasoning-registry.js +0 -185
  654. package/vendor/llmswitch-core/dist/conversion/shared/responses-request-adapter.d.ts +0 -7
  655. package/vendor/llmswitch-core/dist/conversion/shared/responses-request-adapter.js +0 -14
  656. package/vendor/llmswitch-core/dist/conversion/shared/responses-response-utils.d.ts +0 -3
  657. package/vendor/llmswitch-core/dist/conversion/shared/responses-response-utils.js +0 -254
  658. package/vendor/llmswitch-core/dist/conversion/shared/responses-tool-utils.d.ts +0 -14
  659. package/vendor/llmswitch-core/dist/conversion/shared/responses-tool-utils.js +0 -102
  660. package/vendor/llmswitch-core/dist/conversion/shared/streaming-text-extractor.d.ts +0 -19
  661. package/vendor/llmswitch-core/dist/conversion/shared/streaming-text-extractor.js +0 -39
  662. package/vendor/llmswitch-core/dist/conversion/shared/text-markup-normalizer/normalize.d.ts +0 -2
  663. package/vendor/llmswitch-core/dist/conversion/shared/text-markup-normalizer/normalize.js +0 -116
  664. package/vendor/llmswitch-core/dist/conversion/shared/text-markup-normalizer.d.ts +0 -4
  665. package/vendor/llmswitch-core/dist/conversion/shared/text-markup-normalizer.js +0 -3
  666. package/vendor/llmswitch-core/dist/conversion/shared/thought-signature-validator.d.ts +0 -52
  667. package/vendor/llmswitch-core/dist/conversion/shared/thought-signature-validator.js +0 -58
  668. package/vendor/llmswitch-core/dist/conversion/shared/tool-argument-repairer.d.ts +0 -39
  669. package/vendor/llmswitch-core/dist/conversion/shared/tool-argument-repairer.js +0 -53
  670. package/vendor/llmswitch-core/dist/conversion/shared/tool-call-id-manager.d.ts +0 -109
  671. package/vendor/llmswitch-core/dist/conversion/shared/tool-call-id-manager.js +0 -202
  672. package/vendor/llmswitch-core/dist/conversion/shared/tool-call-utils.d.ts +0 -11
  673. package/vendor/llmswitch-core/dist/conversion/shared/tool-call-utils.js +0 -14
  674. package/vendor/llmswitch-core/dist/conversion/shared/tool-filter-pipeline.d.ts +0 -21
  675. package/vendor/llmswitch-core/dist/conversion/shared/tool-filter-pipeline.js +0 -171
  676. package/vendor/llmswitch-core/dist/conversion/shared/tool-governor.d.ts +0 -29
  677. package/vendor/llmswitch-core/dist/conversion/shared/tool-governor.js +0 -694
  678. package/vendor/llmswitch-core/dist/conversion/shared/tool-harvester.d.ts +0 -31
  679. package/vendor/llmswitch-core/dist/conversion/shared/tool-harvester.js +0 -23
  680. package/vendor/llmswitch-core/dist/conversion/shared/tool-mapping.d.ts +0 -19
  681. package/vendor/llmswitch-core/dist/conversion/shared/tool-mapping.js +0 -65
  682. package/vendor/llmswitch-core/dist/conversion/shared/tooling.d.ts +0 -29
  683. package/vendor/llmswitch-core/dist/conversion/shared/tooling.js +0 -57
  684. package/vendor/llmswitch-core/dist/conversion/snapshot-utils.d.ts +0 -31
  685. package/vendor/llmswitch-core/dist/conversion/snapshot-utils.js +0 -49
  686. package/vendor/llmswitch-core/dist/conversion/types/bridge-message-types.d.ts +0 -41
  687. package/vendor/llmswitch-core/dist/conversion/types/bridge-message-types.js +0 -1
  688. package/vendor/llmswitch-core/dist/conversion/types/text-markup-normalizer.d.ts +0 -13
  689. package/vendor/llmswitch-core/dist/conversion/types/text-markup-normalizer.js +0 -1
  690. package/vendor/llmswitch-core/dist/conversion/types.d.ts +0 -33
  691. package/vendor/llmswitch-core/dist/conversion/types.js +0 -1
  692. package/vendor/llmswitch-core/dist/filters/builtin/add-fields-filter.d.ts +0 -8
  693. package/vendor/llmswitch-core/dist/filters/builtin/add-fields-filter.js +0 -16
  694. package/vendor/llmswitch-core/dist/filters/builtin/blacklist-filter.d.ts +0 -8
  695. package/vendor/llmswitch-core/dist/filters/builtin/blacklist-filter.js +0 -19
  696. package/vendor/llmswitch-core/dist/filters/builtin/whitelist-filter.d.ts +0 -8
  697. package/vendor/llmswitch-core/dist/filters/builtin/whitelist-filter.js +0 -19
  698. package/vendor/llmswitch-core/dist/filters/config/openai-openai.fieldmap.json +0 -18
  699. package/vendor/llmswitch-core/dist/filters/engine.d.ts +0 -16
  700. package/vendor/llmswitch-core/dist/filters/engine.js +0 -167
  701. package/vendor/llmswitch-core/dist/filters/index.d.ts +0 -18
  702. package/vendor/llmswitch-core/dist/filters/index.js +0 -22
  703. package/vendor/llmswitch-core/dist/filters/special/request-tool-choice-policy.d.ts +0 -11
  704. package/vendor/llmswitch-core/dist/filters/special/request-tool-choice-policy.js +0 -29
  705. package/vendor/llmswitch-core/dist/filters/special/request-tool-list-filter.d.ts +0 -11
  706. package/vendor/llmswitch-core/dist/filters/special/request-tool-list-filter.js +0 -322
  707. package/vendor/llmswitch-core/dist/filters/special/request-toolcalls-stringify.d.ts +0 -13
  708. package/vendor/llmswitch-core/dist/filters/special/request-toolcalls-stringify.js +0 -94
  709. package/vendor/llmswitch-core/dist/filters/special/request-tools-normalize.d.ts +0 -11
  710. package/vendor/llmswitch-core/dist/filters/special/request-tools-normalize.js +0 -114
  711. package/vendor/llmswitch-core/dist/filters/special/response-finish-invariants.d.ts +0 -11
  712. package/vendor/llmswitch-core/dist/filters/special/response-finish-invariants.js +0 -30
  713. package/vendor/llmswitch-core/dist/filters/special/response-openai-to-responses-bridge.d.ts +0 -13
  714. package/vendor/llmswitch-core/dist/filters/special/response-openai-to-responses-bridge.js +0 -24
  715. package/vendor/llmswitch-core/dist/filters/special/response-tool-arguments-blacklist.d.ts +0 -12
  716. package/vendor/llmswitch-core/dist/filters/special/response-tool-arguments-blacklist.js +0 -63
  717. package/vendor/llmswitch-core/dist/filters/special/response-tool-arguments-schema-converge.d.ts +0 -13
  718. package/vendor/llmswitch-core/dist/filters/special/response-tool-arguments-schema-converge.js +0 -63
  719. package/vendor/llmswitch-core/dist/filters/special/response-tool-arguments-stringify.d.ts +0 -9
  720. package/vendor/llmswitch-core/dist/filters/special/response-tool-arguments-stringify.js +0 -132
  721. package/vendor/llmswitch-core/dist/filters/special/response-tool-arguments-whitelist.d.ts +0 -11
  722. package/vendor/llmswitch-core/dist/filters/special/response-tool-arguments-whitelist.js +0 -56
  723. package/vendor/llmswitch-core/dist/filters/special/response-tool-text-canonicalize.d.ts +0 -13
  724. package/vendor/llmswitch-core/dist/filters/special/response-tool-text-canonicalize.js +0 -16
  725. package/vendor/llmswitch-core/dist/filters/special/tool-filter-hooks.d.ts +0 -19
  726. package/vendor/llmswitch-core/dist/filters/special/tool-filter-hooks.js +0 -394
  727. package/vendor/llmswitch-core/dist/filters/special/tool-post-constraints.d.ts +0 -31
  728. package/vendor/llmswitch-core/dist/filters/special/tool-post-constraints.js +0 -120
  729. package/vendor/llmswitch-core/dist/filters/types.d.ts +0 -68
  730. package/vendor/llmswitch-core/dist/filters/types.js +0 -3
  731. package/vendor/llmswitch-core/dist/filters/utils/fieldmap-loader.d.ts +0 -2
  732. package/vendor/llmswitch-core/dist/filters/utils/fieldmap-loader.js +0 -16
  733. package/vendor/llmswitch-core/dist/filters/utils/snapshot-writer.d.ts +0 -10
  734. package/vendor/llmswitch-core/dist/filters/utils/snapshot-writer.js +0 -85
  735. package/vendor/llmswitch-core/dist/guidance/index.d.ts +0 -3
  736. package/vendor/llmswitch-core/dist/guidance/index.js +0 -299
  737. package/vendor/llmswitch-core/dist/http/sse-response.d.ts +0 -22
  738. package/vendor/llmswitch-core/dist/http/sse-response.js +0 -103
  739. package/vendor/llmswitch-core/dist/index.d.ts +0 -11
  740. package/vendor/llmswitch-core/dist/index.js +0 -11
  741. package/vendor/llmswitch-core/dist/native/router_hotpath_napi.node +0 -0
  742. package/vendor/llmswitch-core/dist/quota/apikey-reset.d.ts +0 -17
  743. package/vendor/llmswitch-core/dist/quota/apikey-reset.js +0 -43
  744. package/vendor/llmswitch-core/dist/quota/index.d.ts +0 -2
  745. package/vendor/llmswitch-core/dist/quota/index.js +0 -1
  746. package/vendor/llmswitch-core/dist/quota/quota-manager.d.ts +0 -44
  747. package/vendor/llmswitch-core/dist/quota/quota-manager.js +0 -463
  748. package/vendor/llmswitch-core/dist/quota/quota-state.d.ts +0 -6
  749. package/vendor/llmswitch-core/dist/quota/quota-state.js +0 -191
  750. package/vendor/llmswitch-core/dist/quota/types.d.ts +0 -62
  751. package/vendor/llmswitch-core/dist/quota/types.js +0 -1
  752. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/auth-utils.d.ts +0 -6
  753. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/auth-utils.js +0 -288
  754. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/claude-code-helpers.d.ts +0 -11
  755. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/claude-code-helpers.js +0 -18
  756. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/config-defaults.d.ts +0 -5
  757. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/config-defaults.js +0 -13
  758. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/config-normalizers.d.ts +0 -4
  759. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/config-normalizers.js +0 -106
  760. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/profile-builder.d.ts +0 -8
  761. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/profile-builder.js +0 -87
  762. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/provider-normalization.d.ts +0 -44
  763. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/provider-normalization.js +0 -272
  764. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/responses-helpers.d.ts +0 -15
  765. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/responses-helpers.js +0 -65
  766. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/routing-config.d.ts +0 -24
  767. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/routing-config.js +0 -346
  768. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/streaming-helpers.d.ts +0 -19
  769. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/streaming-helpers.js +0 -172
  770. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/utils.d.ts +0 -5
  771. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/utils.js +0 -41
  772. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/web-search-config.d.ts +0 -4
  773. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap/web-search-config.js +0 -156
  774. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap.d.ts +0 -2
  775. package/vendor/llmswitch-core/dist/router/virtual-router/bootstrap.js +0 -329
  776. package/vendor/llmswitch-core/dist/router/virtual-router/classifier.d.ts +0 -10
  777. package/vendor/llmswitch-core/dist/router/virtual-router/classifier.js +0 -187
  778. package/vendor/llmswitch-core/dist/router/virtual-router/context-advisor.d.ts +0 -23
  779. package/vendor/llmswitch-core/dist/router/virtual-router/context-advisor.js +0 -67
  780. package/vendor/llmswitch-core/dist/router/virtual-router/context-weighted.d.ts +0 -31
  781. package/vendor/llmswitch-core/dist/router/virtual-router/context-weighted.js +0 -54
  782. package/vendor/llmswitch-core/dist/router/virtual-router/default-thinking-keywords.d.ts +0 -1
  783. package/vendor/llmswitch-core/dist/router/virtual-router/default-thinking-keywords.js +0 -13
  784. package/vendor/llmswitch-core/dist/router/virtual-router/engine/antigravity/alias-lease.d.ts +0 -33
  785. package/vendor/llmswitch-core/dist/router/virtual-router/engine/antigravity/alias-lease.js +0 -257
  786. package/vendor/llmswitch-core/dist/router/virtual-router/engine/cooldown-manager.d.ts +0 -34
  787. package/vendor/llmswitch-core/dist/router/virtual-router/engine/cooldown-manager.js +0 -118
  788. package/vendor/llmswitch-core/dist/router/virtual-router/engine/health/index.d.ts +0 -23
  789. package/vendor/llmswitch-core/dist/router/virtual-router/engine/health/index.js +0 -724
  790. package/vendor/llmswitch-core/dist/router/virtual-router/engine/provider-key/parse.d.ts +0 -1
  791. package/vendor/llmswitch-core/dist/router/virtual-router/engine/provider-key/parse.js +0 -1
  792. package/vendor/llmswitch-core/dist/router/virtual-router/engine/route-analytics.d.ts +0 -28
  793. package/vendor/llmswitch-core/dist/router/virtual-router/engine/route-analytics.js +0 -44
  794. package/vendor/llmswitch-core/dist/router/virtual-router/engine/routing-pools/index.d.ts +0 -13
  795. package/vendor/llmswitch-core/dist/router/virtual-router/engine/routing-pools/index.js +0 -386
  796. package/vendor/llmswitch-core/dist/router/virtual-router/engine/routing-state/keys.d.ts +0 -3
  797. package/vendor/llmswitch-core/dist/router/virtual-router/engine/routing-state/keys.js +0 -30
  798. package/vendor/llmswitch-core/dist/router/virtual-router/engine/routing-state/metadata.d.ts +0 -6
  799. package/vendor/llmswitch-core/dist/router/virtual-router/engine/routing-state/metadata.js +0 -132
  800. package/vendor/llmswitch-core/dist/router/virtual-router/engine/routing-state/store.d.ts +0 -10
  801. package/vendor/llmswitch-core/dist/router/virtual-router/engine/routing-state/store.js +0 -156
  802. package/vendor/llmswitch-core/dist/router/virtual-router/engine/sticky-session-manager.d.ts +0 -29
  803. package/vendor/llmswitch-core/dist/router/virtual-router/engine/sticky-session-manager.js +0 -55
  804. package/vendor/llmswitch-core/dist/router/virtual-router/engine-health.d.ts +0 -1
  805. package/vendor/llmswitch-core/dist/router/virtual-router/engine-health.js +0 -1
  806. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/config.d.ts +0 -11
  807. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/config.js +0 -108
  808. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/direct-model.d.ts +0 -10
  809. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/direct-model.js +0 -38
  810. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/health.d.ts +0 -13
  811. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/health.js +0 -104
  812. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/helpers.d.ts +0 -16
  813. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/helpers.js +0 -226
  814. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/route-utils.d.ts +0 -19
  815. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/route-utils.js +0 -212
  816. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/selection-core.d.ts +0 -28
  817. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/selection-core.js +0 -112
  818. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/selection-state.d.ts +0 -16
  819. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/selection-state.js +0 -187
  820. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/state-accessors.d.ts +0 -21
  821. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy/state-accessors.js +0 -118
  822. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy.d.ts +0 -123
  823. package/vendor/llmswitch-core/dist/router/virtual-router/engine-legacy.js +0 -245
  824. package/vendor/llmswitch-core/dist/router/virtual-router/engine-logging.d.ts +0 -67
  825. package/vendor/llmswitch-core/dist/router/virtual-router/engine-logging.js +0 -356
  826. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/alias-selection.d.ts +0 -15
  827. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/alias-selection.js +0 -118
  828. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/context-weight-multipliers.d.ts +0 -11
  829. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/context-weight-multipliers.js +0 -23
  830. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/direct-provider-model.d.ts +0 -9
  831. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/direct-provider-model.js +0 -49
  832. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/instruction-target.d.ts +0 -6
  833. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/instruction-target.js +0 -54
  834. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/key-parsing.d.ts +0 -8
  835. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/key-parsing.js +0 -47
  836. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/multimodal-capability.d.ts +0 -3
  837. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/multimodal-capability.js +0 -26
  838. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-directive-parser.d.ts +0 -24
  839. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-directive-parser.js +0 -209
  840. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminder-directives.d.ts +0 -7
  841. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminder-directives.js +0 -121
  842. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminder-orchestration-semantics.d.ts +0 -10
  843. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminder-orchestration-semantics.js +0 -110
  844. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminder-semantics.d.ts +0 -8
  845. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminder-semantics.js +0 -281
  846. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminder-time-tag-semantics.d.ts +0 -1
  847. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminder-time-tag-semantics.js +0 -25
  848. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminders-semantics.d.ts +0 -4
  849. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-reminders-semantics.js +0 -44
  850. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-tool-schema-semantics.d.ts +0 -2
  851. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-clock-tool-schema-semantics.js +0 -62
  852. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-governance-semantics.d.ts +0 -49
  853. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-governance-semantics.js +0 -552
  854. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-governed-filter-semantics.d.ts +0 -9
  855. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-governed-filter-semantics.js +0 -64
  856. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-node-result-semantics.d.ts +0 -5
  857. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-node-result-semantics.js +0 -163
  858. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-post-governed-normalization-semantics.d.ts +0 -1
  859. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-post-governed-normalization-semantics.js +0 -49
  860. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-servertool-orchestration-semantics.d.ts +0 -30
  861. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-servertool-orchestration-semantics.js +0 -446
  862. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-web-search-intent-semantics.d.ts +0 -1
  863. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-process-web-search-intent-semantics.js +0 -49
  864. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-request-filter-semantics.d.ts +0 -1
  865. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-chat-request-filter-semantics.js +0 -54
  866. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-compat-action-semantics.d.ts +0 -22
  867. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-compat-action-semantics.js +0 -559
  868. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-deepseek-web-compat.d.ts +0 -17
  869. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-deepseek-web-compat.js +0 -26
  870. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-bridge-action-semantics.d.ts +0 -276
  871. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-bridge-action-semantics.js +0 -1291
  872. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-bridge-policy-semantics.d.ts +0 -72
  873. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-bridge-policy-semantics.js +0 -405
  874. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-edge-stage-semantics.d.ts +0 -18
  875. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-edge-stage-semantics.js +0 -333
  876. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-governance-semantics.d.ts +0 -30
  877. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-governance-semantics.js +0 -202
  878. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-inbound-outbound-semantics.d.ts +0 -22
  879. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-inbound-outbound-semantics.js +0 -426
  880. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-orchestration-semantics.d.ts +0 -57
  881. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-orchestration-semantics.js +0 -705
  882. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-req-inbound-semantics.d.ts +0 -53
  883. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-req-inbound-semantics.js +0 -598
  884. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-req-outbound-semantics.d.ts +0 -147
  885. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-req-outbound-semantics.js +0 -570
  886. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-req-process-semantics.d.ts +0 -26
  887. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-req-process-semantics.js +0 -148
  888. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-resp-semantics.d.ts +0 -46
  889. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-resp-semantics.js +0 -755
  890. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-semantic-mappers.d.ts +0 -2
  891. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-semantic-mappers.js +0 -83
  892. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-session-identifiers-semantics.d.ts +0 -11
  893. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-session-identifiers-semantics.js +0 -207
  894. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-target-semantics.d.ts +0 -3
  895. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-hub-pipeline-target-semantics.js +0 -128
  896. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath-analysis.d.ts +0 -57
  897. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath-analysis.js +0 -217
  898. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath-loader.d.ts +0 -5
  899. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath-loader.js +0 -464
  900. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath-policy.d.ts +0 -5
  901. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath-policy.js +0 -18
  902. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath-quota-buckets.d.ts +0 -25
  903. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath-quota-buckets.js +0 -85
  904. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath.d.ts +0 -59
  905. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-router-hotpath.js +0 -117
  906. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-shared-conversion-semantics.d.ts +0 -243
  907. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-shared-conversion-semantics.js +0 -2594
  908. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-snapshot-hooks.d.ts +0 -3
  909. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-snapshot-hooks.js +0 -109
  910. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-alias-selection-semantics.d.ts +0 -16
  911. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-alias-selection-semantics.js +0 -96
  912. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-engine-proxy.d.ts +0 -16
  913. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-engine-proxy.js +0 -14
  914. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-routing-instructions-semantics.d.ts +0 -3
  915. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-routing-instructions-semantics.js +0 -123
  916. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-stop-message-actions-semantics.d.ts +0 -6
  917. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-stop-message-actions-semantics.js +0 -85
  918. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-stop-message-semantics.d.ts +0 -9
  919. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-stop-message-semantics.js +0 -70
  920. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-stop-message-state-semantics.d.ts +0 -2
  921. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/native-virtual-router-stop-message-state-semantics.js +0 -76
  922. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/route-utils.d.ts +0 -15
  923. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/route-utils.js +0 -248
  924. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/routing-state-filter.d.ts +0 -4
  925. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/routing-state-filter.js +0 -50
  926. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/selection-deps.d.ts +0 -58
  927. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/selection-deps.js +0 -1
  928. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/sticky-pool.d.ts +0 -11
  929. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/sticky-pool.js +0 -109
  930. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-load-balancing.d.ts +0 -16
  931. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-load-balancing.js +0 -120
  932. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-priority.d.ts +0 -11
  933. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-priority.js +0 -55
  934. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection-antigravity-session-lease.d.ts +0 -10
  935. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection-antigravity-session-lease.js +0 -231
  936. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection-antigravity-target-split.d.ts +0 -4
  937. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection-antigravity-target-split.js +0 -43
  938. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection-quota-integration.d.ts +0 -29
  939. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection-quota-integration.js +0 -194
  940. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection-select.d.ts +0 -22
  941. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection-select.js +0 -352
  942. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection.d.ts +0 -3
  943. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection/tier-selection.js +0 -309
  944. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection.d.ts +0 -1
  945. package/vendor/llmswitch-core/dist/router/virtual-router/engine-selection.js +0 -1
  946. package/vendor/llmswitch-core/dist/router/virtual-router/engine.d.ts +0 -43
  947. package/vendor/llmswitch-core/dist/router/virtual-router/engine.js +0 -360
  948. package/vendor/llmswitch-core/dist/router/virtual-router/error-center.d.ts +0 -10
  949. package/vendor/llmswitch-core/dist/router/virtual-router/error-center.js +0 -39
  950. package/vendor/llmswitch-core/dist/router/virtual-router/features.d.ts +0 -3
  951. package/vendor/llmswitch-core/dist/router/virtual-router/features.js +0 -124
  952. package/vendor/llmswitch-core/dist/router/virtual-router/health-manager.d.ts +0 -23
  953. package/vendor/llmswitch-core/dist/router/virtual-router/health-manager.js +0 -107
  954. package/vendor/llmswitch-core/dist/router/virtual-router/health-weighted.d.ts +0 -25
  955. package/vendor/llmswitch-core/dist/router/virtual-router/health-weighted.js +0 -63
  956. package/vendor/llmswitch-core/dist/router/virtual-router/load-balancer.d.ts +0 -28
  957. package/vendor/llmswitch-core/dist/router/virtual-router/load-balancer.js +0 -160
  958. package/vendor/llmswitch-core/dist/router/virtual-router/message-utils.d.ts +0 -15
  959. package/vendor/llmswitch-core/dist/router/virtual-router/message-utils.js +0 -235
  960. package/vendor/llmswitch-core/dist/router/virtual-router/pre-command-file-resolver.d.ts +0 -2
  961. package/vendor/llmswitch-core/dist/router/virtual-router/pre-command-file-resolver.js +0 -117
  962. package/vendor/llmswitch-core/dist/router/virtual-router/provider-registry.d.ts +0 -17
  963. package/vendor/llmswitch-core/dist/router/virtual-router/provider-registry.js +0 -145
  964. package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions/clean.d.ts +0 -3
  965. package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions/clean.js +0 -34
  966. package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions/parse.d.ts +0 -6
  967. package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions/parse.js +0 -24
  968. package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions/state.d.ts +0 -4
  969. package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions/state.js +0 -284
  970. package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions/types.d.ts +0 -74
  971. package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions/types.js +0 -2
  972. package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions.d.ts +0 -5
  973. package/vendor/llmswitch-core/dist/router/virtual-router/routing-instructions.js +0 -4
  974. package/vendor/llmswitch-core/dist/router/virtual-router/routing-pre-command-actions.d.ts +0 -3
  975. package/vendor/llmswitch-core/dist/router/virtual-router/routing-pre-command-actions.js +0 -26
  976. package/vendor/llmswitch-core/dist/router/virtual-router/routing-pre-command-parser.d.ts +0 -2
  977. package/vendor/llmswitch-core/dist/router/virtual-router/routing-pre-command-parser.js +0 -85
  978. package/vendor/llmswitch-core/dist/router/virtual-router/routing-pre-command-state-codec.d.ts +0 -3
  979. package/vendor/llmswitch-core/dist/router/virtual-router/routing-pre-command-state-codec.js +0 -24
  980. package/vendor/llmswitch-core/dist/router/virtual-router/routing-stop-message-actions.d.ts +0 -2
  981. package/vendor/llmswitch-core/dist/router/virtual-router/routing-stop-message-actions.js +0 -99
  982. package/vendor/llmswitch-core/dist/router/virtual-router/routing-stop-message-parser.d.ts +0 -3
  983. package/vendor/llmswitch-core/dist/router/virtual-router/routing-stop-message-parser.js +0 -19
  984. package/vendor/llmswitch-core/dist/router/virtual-router/routing-stop-message-state-codec.d.ts +0 -7
  985. package/vendor/llmswitch-core/dist/router/virtual-router/routing-stop-message-state-codec.js +0 -121
  986. package/vendor/llmswitch-core/dist/router/virtual-router/sticky-session-store.d.ts +0 -8
  987. package/vendor/llmswitch-core/dist/router/virtual-router/sticky-session-store.js +0 -296
  988. package/vendor/llmswitch-core/dist/router/virtual-router/stop-message-file-resolver.d.ts +0 -2
  989. package/vendor/llmswitch-core/dist/router/virtual-router/stop-message-file-resolver.js +0 -76
  990. package/vendor/llmswitch-core/dist/router/virtual-router/stop-message-stage-template-files.d.ts +0 -12
  991. package/vendor/llmswitch-core/dist/router/virtual-router/stop-message-stage-template-files.js +0 -67
  992. package/vendor/llmswitch-core/dist/router/virtual-router/stop-message-state-sync.d.ts +0 -17
  993. package/vendor/llmswitch-core/dist/router/virtual-router/stop-message-state-sync.js +0 -82
  994. package/vendor/llmswitch-core/dist/router/virtual-router/success-center.d.ts +0 -10
  995. package/vendor/llmswitch-core/dist/router/virtual-router/success-center.js +0 -32
  996. package/vendor/llmswitch-core/dist/router/virtual-router/token-counter.d.ts +0 -2
  997. package/vendor/llmswitch-core/dist/router/virtual-router/token-counter.js +0 -148
  998. package/vendor/llmswitch-core/dist/router/virtual-router/token-estimator.d.ts +0 -2
  999. package/vendor/llmswitch-core/dist/router/virtual-router/token-estimator.js +0 -16
  1000. package/vendor/llmswitch-core/dist/router/virtual-router/token-file-scanner.d.ts +0 -24
  1001. package/vendor/llmswitch-core/dist/router/virtual-router/token-file-scanner.js +0 -117
  1002. package/vendor/llmswitch-core/dist/router/virtual-router/tool-signals.d.ts +0 -19
  1003. package/vendor/llmswitch-core/dist/router/virtual-router/tool-signals.js +0 -647
  1004. package/vendor/llmswitch-core/dist/router/virtual-router/types.d.ts +0 -681
  1005. package/vendor/llmswitch-core/dist/router/virtual-router/types.js +0 -34
  1006. package/vendor/llmswitch-core/dist/runtime/user-data-paths.d.ts +0 -5
  1007. package/vendor/llmswitch-core/dist/runtime/user-data-paths.js +0 -43
  1008. package/vendor/llmswitch-core/dist/servertool/clock/config.d.ts +0 -17
  1009. package/vendor/llmswitch-core/dist/servertool/clock/config.js +0 -48
  1010. package/vendor/llmswitch-core/dist/servertool/clock/daemon.d.ts +0 -24
  1011. package/vendor/llmswitch-core/dist/servertool/clock/daemon.js +0 -207
  1012. package/vendor/llmswitch-core/dist/servertool/clock/io.d.ts +0 -2
  1013. package/vendor/llmswitch-core/dist/servertool/clock/io.js +0 -14
  1014. package/vendor/llmswitch-core/dist/servertool/clock/log.d.ts +0 -3
  1015. package/vendor/llmswitch-core/dist/servertool/clock/log.js +0 -13
  1016. package/vendor/llmswitch-core/dist/servertool/clock/ntp.d.ts +0 -18
  1017. package/vendor/llmswitch-core/dist/servertool/clock/ntp.js +0 -318
  1018. package/vendor/llmswitch-core/dist/servertool/clock/paths.d.ts +0 -5
  1019. package/vendor/llmswitch-core/dist/servertool/clock/paths.js +0 -28
  1020. package/vendor/llmswitch-core/dist/servertool/clock/recurrence.d.ts +0 -7
  1021. package/vendor/llmswitch-core/dist/servertool/clock/recurrence.js +0 -248
  1022. package/vendor/llmswitch-core/dist/servertool/clock/session-scope.d.ts +0 -3
  1023. package/vendor/llmswitch-core/dist/servertool/clock/session-scope.js +0 -41
  1024. package/vendor/llmswitch-core/dist/servertool/clock/session-store.d.ts +0 -3
  1025. package/vendor/llmswitch-core/dist/servertool/clock/session-store.js +0 -63
  1026. package/vendor/llmswitch-core/dist/servertool/clock/state.d.ts +0 -9
  1027. package/vendor/llmswitch-core/dist/servertool/clock/state.js +0 -135
  1028. package/vendor/llmswitch-core/dist/servertool/clock/task-store.d.ts +0 -5
  1029. package/vendor/llmswitch-core/dist/servertool/clock/task-store.js +0 -4
  1030. package/vendor/llmswitch-core/dist/servertool/clock/tasks.d.ts +0 -24
  1031. package/vendor/llmswitch-core/dist/servertool/clock/tasks.js +0 -595
  1032. package/vendor/llmswitch-core/dist/servertool/clock/types.d.ts +0 -98
  1033. package/vendor/llmswitch-core/dist/servertool/clock/types.js +0 -1
  1034. package/vendor/llmswitch-core/dist/servertool/continue-execution/log.d.ts +0 -3
  1035. package/vendor/llmswitch-core/dist/servertool/continue-execution/log.js +0 -13
  1036. package/vendor/llmswitch-core/dist/servertool/engine.d.ts +0 -38
  1037. package/vendor/llmswitch-core/dist/servertool/engine.js +0 -1660
  1038. package/vendor/llmswitch-core/dist/servertool/followup-shadow.d.ts +0 -16
  1039. package/vendor/llmswitch-core/dist/servertool/followup-shadow.js +0 -145
  1040. package/vendor/llmswitch-core/dist/servertool/handlers/antigravity-thought-signature-bootstrap.d.ts +0 -1
  1041. package/vendor/llmswitch-core/dist/servertool/handlers/antigravity-thought-signature-bootstrap.js +0 -225
  1042. package/vendor/llmswitch-core/dist/servertool/handlers/apply-patch-guard.d.ts +0 -1
  1043. package/vendor/llmswitch-core/dist/servertool/handlers/apply-patch-guard.js +0 -5
  1044. package/vendor/llmswitch-core/dist/servertool/handlers/clock-auto.d.ts +0 -1
  1045. package/vendor/llmswitch-core/dist/servertool/handlers/clock-auto.js +0 -177
  1046. package/vendor/llmswitch-core/dist/servertool/handlers/clock.d.ts +0 -1
  1047. package/vendor/llmswitch-core/dist/servertool/handlers/clock.js +0 -544
  1048. package/vendor/llmswitch-core/dist/servertool/handlers/compaction-detect.d.ts +0 -1
  1049. package/vendor/llmswitch-core/dist/servertool/handlers/compaction-detect.js +0 -1
  1050. package/vendor/llmswitch-core/dist/servertool/handlers/continue-execution.d.ts +0 -1
  1051. package/vendor/llmswitch-core/dist/servertool/handlers/continue-execution.js +0 -110
  1052. package/vendor/llmswitch-core/dist/servertool/handlers/exec-command-guard.d.ts +0 -1
  1053. package/vendor/llmswitch-core/dist/servertool/handlers/exec-command-guard.js +0 -10
  1054. package/vendor/llmswitch-core/dist/servertool/handlers/followup-message-trimmer.d.ts +0 -16
  1055. package/vendor/llmswitch-core/dist/servertool/handlers/followup-message-trimmer.js +0 -198
  1056. package/vendor/llmswitch-core/dist/servertool/handlers/followup-request-builder.d.ts +0 -25
  1057. package/vendor/llmswitch-core/dist/servertool/handlers/followup-request-builder.js +0 -515
  1058. package/vendor/llmswitch-core/dist/servertool/handlers/followup-sanitize.d.ts +0 -2
  1059. package/vendor/llmswitch-core/dist/servertool/handlers/followup-sanitize.js +0 -7
  1060. package/vendor/llmswitch-core/dist/servertool/handlers/gemini-empty-reply-continue.d.ts +0 -1
  1061. package/vendor/llmswitch-core/dist/servertool/handlers/gemini-empty-reply-continue.js +0 -3
  1062. package/vendor/llmswitch-core/dist/servertool/handlers/iflow-model-error-retry.d.ts +0 -1
  1063. package/vendor/llmswitch-core/dist/servertool/handlers/iflow-model-error-retry.js +0 -92
  1064. package/vendor/llmswitch-core/dist/servertool/handlers/recursive-detection-guard.d.ts +0 -1
  1065. package/vendor/llmswitch-core/dist/servertool/handlers/recursive-detection-guard.js +0 -374
  1066. package/vendor/llmswitch-core/dist/servertool/handlers/review.d.ts +0 -1
  1067. package/vendor/llmswitch-core/dist/servertool/handlers/review.js +0 -181
  1068. package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto/blocked-report.d.ts +0 -16
  1069. package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto/blocked-report.js +0 -407
  1070. package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto/iflow-followup.d.ts +0 -44
  1071. package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto/iflow-followup.js +0 -816
  1072. package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto/routing-state.d.ts +0 -28
  1073. package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto/routing-state.js +0 -123
  1074. package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto/runtime-utils.d.ts +0 -81
  1075. package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto/runtime-utils.js +0 -355
  1076. package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto.d.ts +0 -1
  1077. package/vendor/llmswitch-core/dist/servertool/handlers/stop-message-auto.js +0 -553
  1078. package/vendor/llmswitch-core/dist/servertool/handlers/vision.d.ts +0 -7
  1079. package/vendor/llmswitch-core/dist/servertool/handlers/vision.js +0 -240
  1080. package/vendor/llmswitch-core/dist/servertool/handlers/web-search.d.ts +0 -7
  1081. package/vendor/llmswitch-core/dist/servertool/handlers/web-search.js +0 -926
  1082. package/vendor/llmswitch-core/dist/servertool/log/progress-file.d.ts +0 -14
  1083. package/vendor/llmswitch-core/dist/servertool/log/progress-file.js +0 -88
  1084. package/vendor/llmswitch-core/dist/servertool/pending-session.d.ts +0 -19
  1085. package/vendor/llmswitch-core/dist/servertool/pending-session.js +0 -99
  1086. package/vendor/llmswitch-core/dist/servertool/pre-command-hooks.d.ts +0 -17
  1087. package/vendor/llmswitch-core/dist/servertool/pre-command-hooks.js +0 -491
  1088. package/vendor/llmswitch-core/dist/servertool/reenter-backend.d.ts +0 -23
  1089. package/vendor/llmswitch-core/dist/servertool/reenter-backend.js +0 -20
  1090. package/vendor/llmswitch-core/dist/servertool/registry.d.ts +0 -35
  1091. package/vendor/llmswitch-core/dist/servertool/registry.js +0 -92
  1092. package/vendor/llmswitch-core/dist/servertool/server-side-tools.d.ts +0 -15
  1093. package/vendor/llmswitch-core/dist/servertool/server-side-tools.js +0 -898
  1094. package/vendor/llmswitch-core/dist/servertool/stop-gateway-context.d.ts +0 -14
  1095. package/vendor/llmswitch-core/dist/servertool/stop-gateway-context.js +0 -167
  1096. package/vendor/llmswitch-core/dist/servertool/stop-message-compare-context.d.ts +0 -24
  1097. package/vendor/llmswitch-core/dist/servertool/stop-message-compare-context.js +0 -133
  1098. package/vendor/llmswitch-core/dist/servertool/strip-servertool-calls.d.ts +0 -2
  1099. package/vendor/llmswitch-core/dist/servertool/strip-servertool-calls.js +0 -75
  1100. package/vendor/llmswitch-core/dist/servertool/types.d.ts +0 -235
  1101. package/vendor/llmswitch-core/dist/servertool/types.js +0 -1
  1102. package/vendor/llmswitch-core/dist/sse/index.d.ts +0 -176
  1103. package/vendor/llmswitch-core/dist/sse/index.js +0 -142
  1104. package/vendor/llmswitch-core/dist/sse/json-to-sse/anthropic-json-to-sse-converter.d.ts +0 -15
  1105. package/vendor/llmswitch-core/dist/sse/json-to-sse/anthropic-json-to-sse-converter.js +0 -112
  1106. package/vendor/llmswitch-core/dist/sse/json-to-sse/chat-json-to-sse-converter.d.ts +0 -80
  1107. package/vendor/llmswitch-core/dist/sse/json-to-sse/chat-json-to-sse-converter.js +0 -300
  1108. package/vendor/llmswitch-core/dist/sse/json-to-sse/event-generators/chat.d.ts +0 -55
  1109. package/vendor/llmswitch-core/dist/sse/json-to-sse/event-generators/chat.js +0 -233
  1110. package/vendor/llmswitch-core/dist/sse/json-to-sse/event-generators/responses.d.ts +0 -103
  1111. package/vendor/llmswitch-core/dist/sse/json-to-sse/event-generators/responses.js +0 -703
  1112. package/vendor/llmswitch-core/dist/sse/json-to-sse/gemini-json-to-sse-converter.d.ts +0 -15
  1113. package/vendor/llmswitch-core/dist/sse/json-to-sse/gemini-json-to-sse-converter.js +0 -99
  1114. package/vendor/llmswitch-core/dist/sse/json-to-sse/index.d.ts +0 -7
  1115. package/vendor/llmswitch-core/dist/sse/json-to-sse/index.js +0 -9
  1116. package/vendor/llmswitch-core/dist/sse/json-to-sse/responses-json-to-sse-converter.d.ts +0 -80
  1117. package/vendor/llmswitch-core/dist/sse/json-to-sse/responses-json-to-sse-converter.js +0 -322
  1118. package/vendor/llmswitch-core/dist/sse/json-to-sse/sequencers/anthropic-sequencer.d.ts +0 -13
  1119. package/vendor/llmswitch-core/dist/sse/json-to-sse/sequencers/anthropic-sequencer.js +0 -162
  1120. package/vendor/llmswitch-core/dist/sse/json-to-sse/sequencers/chat-sequencer.d.ts +0 -39
  1121. package/vendor/llmswitch-core/dist/sse/json-to-sse/sequencers/chat-sequencer.js +0 -264
  1122. package/vendor/llmswitch-core/dist/sse/json-to-sse/sequencers/gemini-sequencer.d.ts +0 -10
  1123. package/vendor/llmswitch-core/dist/sse/json-to-sse/sequencers/gemini-sequencer.js +0 -95
  1124. package/vendor/llmswitch-core/dist/sse/json-to-sse/sequencers/responses-sequencer.d.ts +0 -40
  1125. package/vendor/llmswitch-core/dist/sse/json-to-sse/sequencers/responses-sequencer.js +0 -293
  1126. package/vendor/llmswitch-core/dist/sse/registry/sse-codec-registry.d.ts +0 -32
  1127. package/vendor/llmswitch-core/dist/sse/registry/sse-codec-registry.js +0 -135
  1128. package/vendor/llmswitch-core/dist/sse/shared/chat-serializer.d.ts +0 -4
  1129. package/vendor/llmswitch-core/dist/sse/shared/chat-serializer.js +0 -40
  1130. package/vendor/llmswitch-core/dist/sse/shared/constants.d.ts +0 -272
  1131. package/vendor/llmswitch-core/dist/sse/shared/constants.js +0 -321
  1132. package/vendor/llmswitch-core/dist/sse/shared/reasoning-dispatcher.d.ts +0 -10
  1133. package/vendor/llmswitch-core/dist/sse/shared/reasoning-dispatcher.js +0 -25
  1134. package/vendor/llmswitch-core/dist/sse/shared/responses-output-normalizer.d.ts +0 -13
  1135. package/vendor/llmswitch-core/dist/sse/shared/responses-output-normalizer.js +0 -47
  1136. package/vendor/llmswitch-core/dist/sse/shared/serializers/anthropic-event-serializer.d.ts +0 -2
  1137. package/vendor/llmswitch-core/dist/sse/shared/serializers/anthropic-event-serializer.js +0 -9
  1138. package/vendor/llmswitch-core/dist/sse/shared/serializers/base-serializer.d.ts +0 -158
  1139. package/vendor/llmswitch-core/dist/sse/shared/serializers/base-serializer.js +0 -210
  1140. package/vendor/llmswitch-core/dist/sse/shared/serializers/chat-event-serializer.d.ts +0 -82
  1141. package/vendor/llmswitch-core/dist/sse/shared/serializers/chat-event-serializer.js +0 -275
  1142. package/vendor/llmswitch-core/dist/sse/shared/serializers/gemini-event-serializer.d.ts +0 -2
  1143. package/vendor/llmswitch-core/dist/sse/shared/serializers/gemini-event-serializer.js +0 -5
  1144. package/vendor/llmswitch-core/dist/sse/shared/serializers/index.d.ts +0 -42
  1145. package/vendor/llmswitch-core/dist/sse/shared/serializers/index.js +0 -56
  1146. package/vendor/llmswitch-core/dist/sse/shared/serializers/responses-event-serializer.d.ts +0 -131
  1147. package/vendor/llmswitch-core/dist/sse/shared/serializers/responses-event-serializer.js +0 -375
  1148. package/vendor/llmswitch-core/dist/sse/shared/serializers/types.d.ts +0 -51
  1149. package/vendor/llmswitch-core/dist/sse/shared/serializers/types.js +0 -4
  1150. package/vendor/llmswitch-core/dist/sse/shared/utils.d.ts +0 -254
  1151. package/vendor/llmswitch-core/dist/sse/shared/utils.js +0 -543
  1152. package/vendor/llmswitch-core/dist/sse/shared/writer.d.ts +0 -127
  1153. package/vendor/llmswitch-core/dist/sse/shared/writer.js +0 -321
  1154. package/vendor/llmswitch-core/dist/sse/sse-to-json/anthropic-sse-to-json-converter.d.ts +0 -20
  1155. package/vendor/llmswitch-core/dist/sse/sse-to-json/anthropic-sse-to-json-converter.js +0 -204
  1156. package/vendor/llmswitch-core/dist/sse/sse-to-json/builders/anthropic-response-builder.d.ts +0 -16
  1157. package/vendor/llmswitch-core/dist/sse/sse-to-json/builders/anthropic-response-builder.js +0 -258
  1158. package/vendor/llmswitch-core/dist/sse/sse-to-json/builders/response-builder.d.ts +0 -177
  1159. package/vendor/llmswitch-core/dist/sse/sse-to-json/builders/response-builder.js +0 -1135
  1160. package/vendor/llmswitch-core/dist/sse/sse-to-json/chat-sse-to-json-converter.d.ts +0 -119
  1161. package/vendor/llmswitch-core/dist/sse/sse-to-json/chat-sse-to-json-converter.js +0 -850
  1162. package/vendor/llmswitch-core/dist/sse/sse-to-json/gemini-sse-to-json-converter.d.ts +0 -14
  1163. package/vendor/llmswitch-core/dist/sse/sse-to-json/gemini-sse-to-json-converter.js +0 -186
  1164. package/vendor/llmswitch-core/dist/sse/sse-to-json/index.d.ts +0 -7
  1165. package/vendor/llmswitch-core/dist/sse/sse-to-json/index.js +0 -9
  1166. package/vendor/llmswitch-core/dist/sse/sse-to-json/parsers/sse-parser.d.ts +0 -73
  1167. package/vendor/llmswitch-core/dist/sse/sse-to-json/parsers/sse-parser.js +0 -434
  1168. package/vendor/llmswitch-core/dist/sse/sse-to-json/responses-sse-to-json-converter.d.ts +0 -61
  1169. package/vendor/llmswitch-core/dist/sse/sse-to-json/responses-sse-to-json-converter.js +0 -306
  1170. package/vendor/llmswitch-core/dist/sse/types/anthropic-types.d.ts +0 -194
  1171. package/vendor/llmswitch-core/dist/sse/types/anthropic-types.js +0 -8
  1172. package/vendor/llmswitch-core/dist/sse/types/chat-types.d.ts +0 -321
  1173. package/vendor/llmswitch-core/dist/sse/types/chat-types.js +0 -33
  1174. package/vendor/llmswitch-core/dist/sse/types/conversion-context.d.ts +0 -214
  1175. package/vendor/llmswitch-core/dist/sse/types/conversion-context.js +0 -20
  1176. package/vendor/llmswitch-core/dist/sse/types/core-interfaces.d.ts +0 -94
  1177. package/vendor/llmswitch-core/dist/sse/types/core-interfaces.js +0 -5
  1178. package/vendor/llmswitch-core/dist/sse/types/gemini-types.d.ts +0 -135
  1179. package/vendor/llmswitch-core/dist/sse/types/gemini-types.js +0 -5
  1180. package/vendor/llmswitch-core/dist/sse/types/index.d.ts +0 -17
  1181. package/vendor/llmswitch-core/dist/sse/types/index.js +0 -9
  1182. package/vendor/llmswitch-core/dist/sse/types/responses-types.d.ts +0 -334
  1183. package/vendor/llmswitch-core/dist/sse/types/responses-types.js +0 -38
  1184. package/vendor/llmswitch-core/dist/sse/types/sse-events.d.ts +0 -181
  1185. package/vendor/llmswitch-core/dist/sse/types/sse-events.js +0 -150
  1186. package/vendor/llmswitch-core/dist/sse/types/stream-state.d.ts +0 -199
  1187. package/vendor/llmswitch-core/dist/sse/types/stream-state.js +0 -44
  1188. package/vendor/llmswitch-core/dist/sse/types/utility-types.d.ts +0 -234
  1189. package/vendor/llmswitch-core/dist/sse/types/utility-types.js +0 -46
  1190. package/vendor/llmswitch-core/dist/telemetry/stats-center.d.ts +0 -82
  1191. package/vendor/llmswitch-core/dist/telemetry/stats-center.js +0 -308
  1192. package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/default-actions.d.ts +0 -2
  1193. package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/default-actions.js +0 -12
  1194. package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/extract-patch.d.ts +0 -2
  1195. package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/extract-patch.js +0 -15
  1196. package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/index.d.ts +0 -2
  1197. package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/index.js +0 -164
  1198. package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/structured-builders.d.ts +0 -7
  1199. package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/structured-builders.js +0 -85
  1200. package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/types.d.ts +0 -54
  1201. package/vendor/llmswitch-core/dist/tools/apply-patch/args-normalizer/types.js +0 -1
  1202. package/vendor/llmswitch-core/dist/tools/apply-patch/execution-capturer.d.ts +0 -13
  1203. package/vendor/llmswitch-core/dist/tools/apply-patch/execution-capturer.js +0 -181
  1204. package/vendor/llmswitch-core/dist/tools/apply-patch/json/parse-loose.d.ts +0 -3
  1205. package/vendor/llmswitch-core/dist/tools/apply-patch/json/parse-loose.js +0 -139
  1206. package/vendor/llmswitch-core/dist/tools/apply-patch/patch-text/context-diff.d.ts +0 -1
  1207. package/vendor/llmswitch-core/dist/tools/apply-patch/patch-text/context-diff.js +0 -173
  1208. package/vendor/llmswitch-core/dist/tools/apply-patch/patch-text/git-diff.d.ts +0 -1
  1209. package/vendor/llmswitch-core/dist/tools/apply-patch/patch-text/git-diff.js +0 -138
  1210. package/vendor/llmswitch-core/dist/tools/apply-patch/patch-text/looks-like-patch.d.ts +0 -1
  1211. package/vendor/llmswitch-core/dist/tools/apply-patch/patch-text/looks-like-patch.js +0 -11
  1212. package/vendor/llmswitch-core/dist/tools/apply-patch/patch-text/normalize.d.ts +0 -3
  1213. package/vendor/llmswitch-core/dist/tools/apply-patch/patch-text/normalize.js +0 -383
  1214. package/vendor/llmswitch-core/dist/tools/apply-patch/regression-capturer.d.ts +0 -13
  1215. package/vendor/llmswitch-core/dist/tools/apply-patch/regression-capturer.js +0 -113
  1216. package/vendor/llmswitch-core/dist/tools/apply-patch/structured/coercion.d.ts +0 -3
  1217. package/vendor/llmswitch-core/dist/tools/apply-patch/structured/coercion.js +0 -103
  1218. package/vendor/llmswitch-core/dist/tools/apply-patch/structured.d.ts +0 -20
  1219. package/vendor/llmswitch-core/dist/tools/apply-patch/structured.js +0 -537
  1220. package/vendor/llmswitch-core/dist/tools/apply-patch/validation/shared.d.ts +0 -3
  1221. package/vendor/llmswitch-core/dist/tools/apply-patch/validation/shared.js +0 -6
  1222. package/vendor/llmswitch-core/dist/tools/apply-patch/validator.d.ts +0 -8
  1223. package/vendor/llmswitch-core/dist/tools/apply-patch/validator.js +0 -21
  1224. package/vendor/llmswitch-core/dist/tools/apply-patch-structured.d.ts +0 -1
  1225. package/vendor/llmswitch-core/dist/tools/apply-patch-structured.js +0 -1
  1226. package/vendor/llmswitch-core/dist/tools/args-json.d.ts +0 -1
  1227. package/vendor/llmswitch-core/dist/tools/args-json.js +0 -204
  1228. package/vendor/llmswitch-core/dist/tools/exec-command/normalize.d.ts +0 -17
  1229. package/vendor/llmswitch-core/dist/tools/exec-command/normalize.js +0 -116
  1230. package/vendor/llmswitch-core/dist/tools/exec-command/regression-capturer.d.ts +0 -11
  1231. package/vendor/llmswitch-core/dist/tools/exec-command/regression-capturer.js +0 -144
  1232. package/vendor/llmswitch-core/dist/tools/exec-command/validator.d.ts +0 -10
  1233. package/vendor/llmswitch-core/dist/tools/exec-command/validator.js +0 -238
  1234. package/vendor/llmswitch-core/dist/tools/patch-regression-capturer.d.ts +0 -1
  1235. package/vendor/llmswitch-core/dist/tools/patch-regression-capturer.js +0 -1
  1236. package/vendor/llmswitch-core/dist/tools/tool-description-utils.d.ts +0 -5
  1237. package/vendor/llmswitch-core/dist/tools/tool-description-utils.js +0 -50
  1238. package/vendor/llmswitch-core/dist/tools/tool-registry.d.ts +0 -15
  1239. package/vendor/llmswitch-core/dist/tools/tool-registry.js +0 -253
  1240. package/vendor/llmswitch-core/package.json +0 -189
@@ -1,1143 +0,0 @@
1
- import { createHash } from 'node:crypto';
2
- import fs from 'node:fs';
3
- import path from 'node:path';
4
- import { cacheAntigravitySessionSignatureWithNative, getAntigravityRequestSessionMetaWithNative, resetAntigravitySignatureCachesWithNative } from '../../router/virtual-router/engine-selection/native-router-hotpath.js';
5
- const DUMMY_THOUGHT_SIGNATURE_SENTINEL = 'skip_thought_signature_validator';
6
- // Antigravity-Manager alignment:
7
- // - session_id has no time limit (continuity across long conversations / restarts)
8
- // - signature cache is bounded by size, not by time
9
- // Time-based expiry is disabled when SIGNATURE_TTL_MS <= 0.
10
- const SIGNATURE_TTL_MS = 0;
11
- // Still "touch" active sessions to refresh persisted timestamps / LRU ordering,
12
- // but avoid excessive disk churn.
13
- const SIGNATURE_TOUCH_INTERVAL_MS = 5 * 60 * 1000;
14
- const MIN_SIGNATURE_LENGTH = 50;
15
- const SESSION_CACHE_LIMIT = 1000;
16
- // Keep rewind guard finite to avoid reusing stale signatures after a rewind.
17
- const REWIND_BLOCK_MS = 2 * 60 * 60 * 1000;
18
- const GLOBAL_PERSISTENCE_KEY = '__LLMSWITCH_ANTIGRAVITY_SESSION_SIGNATURE_PERSISTENCE__';
19
- function getPersistenceState() {
20
- const g = globalThis;
21
- const existing = g[GLOBAL_PERSISTENCE_KEY];
22
- if (existing && typeof existing === 'object') {
23
- return existing;
24
- }
25
- return null;
26
- }
27
- function setPersistenceState(state) {
28
- const g = globalThis;
29
- if (!state) {
30
- delete g[GLOBAL_PERSISTENCE_KEY];
31
- return;
32
- }
33
- g[GLOBAL_PERSISTENCE_KEY] = state;
34
- }
35
- export function configureAntigravitySessionSignaturePersistence(input) {
36
- if (!input) {
37
- const prior = getPersistenceState();
38
- if (prior?.flushTimer) {
39
- clearTimeout(prior.flushTimer);
40
- }
41
- setPersistenceState(null);
42
- try {
43
- delete process.env.ROUTECODEX_ANTIGRAVITY_SIGNATURE_STATE_DIR;
44
- delete process.env.ROUTECODEX_ANTIGRAVITY_SIGNATURE_FILE;
45
- }
46
- catch {
47
- // best-effort only
48
- }
49
- return;
50
- }
51
- const stateDir = typeof input.stateDir === 'string' ? input.stateDir.trim() : '';
52
- if (!stateDir) {
53
- setPersistenceState(null);
54
- return;
55
- }
56
- const fileName = typeof input.fileName === 'string' && input.fileName.trim() ? input.fileName.trim() : 'antigravity-session-signatures.json';
57
- const prior = getPersistenceState();
58
- if (prior?.flushTimer) {
59
- clearTimeout(prior.flushTimer);
60
- }
61
- setPersistenceState({
62
- config: { stateDir, fileName },
63
- loadedMtimeMs: null,
64
- loadedOnce: false,
65
- flushTimer: null
66
- });
67
- try {
68
- process.env.ROUTECODEX_ANTIGRAVITY_SIGNATURE_STATE_DIR = stateDir;
69
- process.env.ROUTECODEX_ANTIGRAVITY_SIGNATURE_FILE = fileName;
70
- }
71
- catch {
72
- // best-effort only
73
- }
74
- // Ensure we hydrate immediately so a short-lived process (or a server restart)
75
- // never flushes an empty in-memory cache over an existing persisted file.
76
- try {
77
- hydrateSignaturesFromDiskIfNeeded(true);
78
- }
79
- catch {
80
- // best-effort only
81
- }
82
- }
83
- export function flushAntigravitySessionSignaturePersistenceSync() {
84
- const state = getPersistenceState();
85
- if (!state) {
86
- return;
87
- }
88
- if (state.flushTimer) {
89
- clearTimeout(state.flushTimer);
90
- state.flushTimer = null;
91
- }
92
- flushPersistedSignaturesSync(state);
93
- }
94
- const GLOBAL_SIGNATURE_CACHE_KEY = '__LLMSWITCH_ANTIGRAVITY_SESSION_SIGNATURE_CACHE__';
95
- const GLOBAL_REQUEST_SESSION_CACHE_KEY = '__LLMSWITCH_ANTIGRAVITY_REQUEST_SESSION_ID_CACHE__';
96
- const GLOBAL_PINNED_ALIAS_BY_SESSION_KEY = '__LLMSWITCH_ANTIGRAVITY_PINNED_ALIAS_BY_SESSION__';
97
- const GLOBAL_PINNED_SESSION_BY_ALIAS_KEY = '__LLMSWITCH_ANTIGRAVITY_PINNED_SESSION_BY_ALIAS__';
98
- function getGlobalSignatureCache() {
99
- const g = globalThis;
100
- const existing = g[GLOBAL_SIGNATURE_CACHE_KEY];
101
- if (existing instanceof Map) {
102
- return existing;
103
- }
104
- const created = new Map();
105
- g[GLOBAL_SIGNATURE_CACHE_KEY] = created;
106
- return created;
107
- }
108
- const sessionSignatures = getGlobalSignatureCache();
109
- function getGlobalRequestSessionCache() {
110
- const g = globalThis;
111
- const existing = g[GLOBAL_REQUEST_SESSION_CACHE_KEY];
112
- if (existing instanceof Map) {
113
- return existing;
114
- }
115
- const created = new Map();
116
- g[GLOBAL_REQUEST_SESSION_CACHE_KEY] = created;
117
- return created;
118
- }
119
- const requestSessionIds = getGlobalRequestSessionCache();
120
- const GLOBAL_REWIND_BLOCK_CACHE_KEY = '__LLMSWITCH_ANTIGRAVITY_SIGNATURE_REWIND_BLOCK_CACHE__';
121
- function getGlobalRewindBlockCache() {
122
- const g = globalThis;
123
- const existing = g[GLOBAL_REWIND_BLOCK_CACHE_KEY];
124
- if (existing instanceof Map) {
125
- return existing;
126
- }
127
- const created = new Map();
128
- g[GLOBAL_REWIND_BLOCK_CACHE_KEY] = created;
129
- return created;
130
- }
131
- const rewindBlocks = getGlobalRewindBlockCache();
132
- const GLOBAL_LATEST_SIGNATURE_BY_ALIAS_KEY = '__LLMSWITCH_ANTIGRAVITY_LATEST_SIGNATURE_BY_ALIAS__';
133
- // Antigravity-Manager alignment: global thoughtSignature store (v2).
134
- // - Shared across all Antigravity/GeminiCLI accounts for the SAME derived sessionId.
135
- // - Still keyed by sessionId to avoid cross-session leakage.
136
- export const ANTIGRAVITY_GLOBAL_ALIAS_KEY = 'antigravity.global';
137
- function normalizeAliasKey(value) {
138
- if (typeof value !== 'string') {
139
- return 'antigravity.unknown';
140
- }
141
- const trimmed = value.trim();
142
- if (!trimmed.length) {
143
- return 'antigravity.unknown';
144
- }
145
- const lowered = trimmed.toLowerCase();
146
- if (lowered === 'antigravity') {
147
- return 'antigravity.unknown';
148
- }
149
- return lowered;
150
- }
151
- function normalizeSessionId(value) {
152
- if (typeof value !== 'string') {
153
- return '';
154
- }
155
- return value.trim();
156
- }
157
- function buildSignatureCacheKey(aliasKey, sessionId) {
158
- const alias = normalizeAliasKey(aliasKey);
159
- const sid = normalizeSessionId(sessionId);
160
- if (!sid) {
161
- return '';
162
- }
163
- return `${alias}|${sid}`;
164
- }
165
- function getLatestSignatureMap() {
166
- const g = globalThis;
167
- const existing = g[GLOBAL_LATEST_SIGNATURE_BY_ALIAS_KEY];
168
- if (existing instanceof Map) {
169
- return existing;
170
- }
171
- const created = new Map();
172
- g[GLOBAL_LATEST_SIGNATURE_BY_ALIAS_KEY] = created;
173
- return created;
174
- }
175
- const latestSignaturesByAlias = getLatestSignatureMap();
176
- function getPinnedAliasBySessionMap() {
177
- const g = globalThis;
178
- const existing = g[GLOBAL_PINNED_ALIAS_BY_SESSION_KEY];
179
- if (existing instanceof Map) {
180
- return existing;
181
- }
182
- const created = new Map();
183
- g[GLOBAL_PINNED_ALIAS_BY_SESSION_KEY] = created;
184
- return created;
185
- }
186
- function getPinnedSessionByAliasMap() {
187
- const g = globalThis;
188
- const existing = g[GLOBAL_PINNED_SESSION_BY_ALIAS_KEY];
189
- if (existing instanceof Map) {
190
- return existing;
191
- }
192
- const created = new Map();
193
- g[GLOBAL_PINNED_SESSION_BY_ALIAS_KEY] = created;
194
- return created;
195
- }
196
- const pinnedAliasBySession = getPinnedAliasBySessionMap();
197
- const pinnedSessionByAlias = getPinnedSessionByAliasMap();
198
- export function getAntigravityThoughtSignatureSentinel() {
199
- return DUMMY_THOUGHT_SIGNATURE_SENTINEL;
200
- }
201
- function shouldAllowAliasLatestFallback(aliasKey) {
202
- const normalized = normalizeAliasKey(aliasKey);
203
- // Never fall back when alias is unknown: avoids cross-alias mixing and enforces isolation.
204
- return normalized !== 'antigravity.unknown';
205
- }
206
- function getLatestSignatureEntry(aliasKey) {
207
- const key = normalizeAliasKey(aliasKey);
208
- const existing = latestSignaturesByAlias.get(key);
209
- if (existing && typeof existing === 'object') {
210
- const signature = typeof existing.signature === 'string' ? existing.signature : '';
211
- const messageCount = typeof existing.messageCount === 'number' ? existing.messageCount : 1;
212
- const timestamp = typeof existing.timestamp === 'number' ? existing.timestamp : 0;
213
- const sessionId = typeof existing.sessionId === 'string'
214
- ? String(existing.sessionId)
215
- : '';
216
- if (signature && timestamp > 0) {
217
- return { signature, messageCount, timestamp, ...(sessionId.trim().length ? { sessionId: sessionId.trim() } : {}) };
218
- }
219
- }
220
- return null;
221
- }
222
- function setLatestSignatureEntry(aliasKey, entry) {
223
- const key = normalizeAliasKey(aliasKey);
224
- if (!entry) {
225
- latestSignaturesByAlias.delete(key);
226
- return;
227
- }
228
- latestSignaturesByAlias.set(key, entry);
229
- }
230
- function nowMs() {
231
- return Date.now();
232
- }
233
- function isTimeExpiryEnabled() {
234
- return typeof SIGNATURE_TTL_MS === 'number' && Number.isFinite(SIGNATURE_TTL_MS) && SIGNATURE_TTL_MS > 0;
235
- }
236
- export function getAntigravityLatestSignatureSessionIdForAlias(aliasKeyInput, options) {
237
- const allowHydrate = options?.hydrate !== false;
238
- const aliasKey = normalizeAliasKey(aliasKeyInput);
239
- if (!shouldAllowAliasLatestFallback(aliasKey)) {
240
- return undefined;
241
- }
242
- if (allowHydrate) {
243
- hydrateSignaturesFromDiskIfNeeded(true);
244
- }
245
- const latest = getLatestSignatureEntry(aliasKey);
246
- if (!latest) {
247
- return undefined;
248
- }
249
- if (isTimeExpiryEnabled()) {
250
- const ts = nowMs();
251
- if (ts - latest.timestamp > SIGNATURE_TTL_MS) {
252
- return undefined;
253
- }
254
- }
255
- const sessionId = typeof latest.sessionId === 'string' ? latest.sessionId.trim() : '';
256
- return sessionId || undefined;
257
- }
258
- function extractSessionIdFromCacheKey(key) {
259
- if (typeof key !== 'string' || !key)
260
- return '';
261
- const idx = key.indexOf('|');
262
- if (idx < 0)
263
- return '';
264
- return key.slice(idx + 1).trim();
265
- }
266
- function isRecord(value) {
267
- return typeof value === 'object' && value !== null && !Array.isArray(value);
268
- }
269
- function stableStringify(value) {
270
- if (value === null || value === undefined) {
271
- return String(value);
272
- }
273
- if (typeof value !== 'object') {
274
- return JSON.stringify(value);
275
- }
276
- if (Array.isArray(value)) {
277
- return `[${value.map((entry) => stableStringify(entry)).join(',')}]`;
278
- }
279
- const record = value;
280
- const keys = Object.keys(record).sort();
281
- const entries = keys.map((key) => `${JSON.stringify(key)}:${stableStringify(record[key])}`);
282
- return `{${entries.join(',')}}`;
283
- }
284
- function jsonStringifyFallback(value) {
285
- // Antigravity-Manager uses `serde_json::Value::to_string()` for the fallback seed.
286
- // In JS, JSON.stringify preserves insertion order and is the closest equivalent.
287
- try {
288
- return JSON.stringify(value ?? null) ?? 'null';
289
- }
290
- catch {
291
- return stableStringify(value);
292
- }
293
- }
294
- function sha256Hex(value) {
295
- return createHash('sha256').update(value).digest('hex');
296
- }
297
- function isExpired(entry, ts) {
298
- if (!isTimeExpiryEnabled()) {
299
- return false;
300
- }
301
- return ts - entry.timestamp > SIGNATURE_TTL_MS;
302
- }
303
- function isPinnedExpired(entry, ts) {
304
- if (!isTimeExpiryEnabled()) {
305
- return false;
306
- }
307
- return ts - entry.timestamp > SIGNATURE_TTL_MS;
308
- }
309
- function isRequestSessionExpired(entry, ts) {
310
- if (!isTimeExpiryEnabled()) {
311
- return false;
312
- }
313
- return ts - entry.timestamp > SIGNATURE_TTL_MS;
314
- }
315
- function touchSessionSignature(aliasKey, cacheKey, entry, ts) {
316
- if (ts - entry.timestamp < SIGNATURE_TOUCH_INTERVAL_MS) {
317
- return;
318
- }
319
- sessionSignatures.set(cacheKey, { signature: entry.signature, messageCount: entry.messageCount, timestamp: ts });
320
- const latest = getLatestSignatureEntry(aliasKey);
321
- if (!latest || ts >= latest.timestamp) {
322
- const sessionId = extractSessionIdFromCacheKey(cacheKey);
323
- setLatestSignatureEntry(aliasKey, {
324
- signature: entry.signature,
325
- messageCount: entry.messageCount,
326
- timestamp: ts,
327
- ...(sessionId ? { sessionId } : {})
328
- });
329
- }
330
- schedulePersistenceFlush();
331
- }
332
- function pruneExpired() {
333
- if (!isTimeExpiryEnabled()) {
334
- return;
335
- }
336
- const ts = nowMs();
337
- for (const [key, entry] of sessionSignatures.entries()) {
338
- if (isExpired(entry, ts)) {
339
- sessionSignatures.delete(key);
340
- }
341
- }
342
- for (const [sessionId, entry] of pinnedAliasBySession.entries()) {
343
- if (isPinnedExpired(entry, ts)) {
344
- pinnedAliasBySession.delete(sessionId);
345
- const aliasKey = typeof entry.aliasKey === 'string' ? entry.aliasKey : '';
346
- if (aliasKey) {
347
- const backref = pinnedSessionByAlias.get(aliasKey);
348
- if (backref?.sessionId === sessionId) {
349
- pinnedSessionByAlias.delete(aliasKey);
350
- }
351
- }
352
- }
353
- }
354
- for (const [aliasKey, entry] of pinnedSessionByAlias.entries()) {
355
- if (isPinnedExpired(entry, ts)) {
356
- pinnedSessionByAlias.delete(aliasKey);
357
- const sid = typeof entry.sessionId === 'string' ? entry.sessionId : '';
358
- if (sid) {
359
- const backref = pinnedAliasBySession.get(sid);
360
- if (backref?.aliasKey === aliasKey) {
361
- pinnedAliasBySession.delete(sid);
362
- }
363
- }
364
- }
365
- }
366
- }
367
- function ensureCacheLimit() {
368
- if (sessionSignatures.size <= SESSION_CACHE_LIMIT) {
369
- return;
370
- }
371
- pruneExpired();
372
- if (sessionSignatures.size <= SESSION_CACHE_LIMIT) {
373
- return;
374
- }
375
- // Best-effort: remove the oldest entries until within limit.
376
- const entries = Array.from(sessionSignatures.entries()).sort((a, b) => a[1].timestamp - b[1].timestamp);
377
- const overflow = sessionSignatures.size - SESSION_CACHE_LIMIT;
378
- for (let i = 0; i < overflow; i++) {
379
- const key = entries[i]?.[0];
380
- if (key) {
381
- sessionSignatures.delete(key);
382
- }
383
- }
384
- }
385
- function resolvePersistFilePath(config) {
386
- return path.join(config.stateDir, config.fileName);
387
- }
388
- function isValidPersistedEntry(value) {
389
- if (!isRecord(value))
390
- return false;
391
- const sig = typeof value.signature === 'string' ? value.signature.trim() : '';
392
- if (!sig || sig.length < MIN_SIGNATURE_LENGTH)
393
- return false;
394
- if (sig === DUMMY_THOUGHT_SIGNATURE_SENTINEL)
395
- return false;
396
- const messageCount = typeof value.messageCount === 'number' && Number.isFinite(value.messageCount) && value.messageCount > 0
397
- ? Math.floor(value.messageCount)
398
- : 1;
399
- const timestamp = typeof value.timestamp === 'number' && Number.isFinite(value.timestamp) && value.timestamp > 0
400
- ? Math.floor(value.timestamp)
401
- : 0;
402
- if (!timestamp)
403
- return false;
404
- value.signature = sig;
405
- value.messageCount = messageCount;
406
- value.timestamp = timestamp;
407
- return true;
408
- }
409
- function hydrateSignaturesFromDiskIfNeeded(force = false) {
410
- const state = getPersistenceState();
411
- if (!state) {
412
- return;
413
- }
414
- const filePath = resolvePersistFilePath(state.config);
415
- let stat = null;
416
- try {
417
- stat = fs.statSync(filePath);
418
- }
419
- catch {
420
- state.loadedOnce = true;
421
- state.loadedMtimeMs = null;
422
- return;
423
- }
424
- const mtimeMs = typeof stat.mtimeMs === 'number' && Number.isFinite(stat.mtimeMs) ? stat.mtimeMs : stat.mtime.getTime();
425
- if (!force && state.loadedOnce && state.loadedMtimeMs === mtimeMs) {
426
- return;
427
- }
428
- let parsed;
429
- try {
430
- parsed = JSON.parse(fs.readFileSync(filePath, 'utf8'));
431
- }
432
- catch {
433
- state.loadedOnce = true;
434
- state.loadedMtimeMs = mtimeMs;
435
- return;
436
- }
437
- const latestRaw = isRecord(parsed) ? parsed.latest : undefined;
438
- const latestPersisted = isValidPersistedEntry(latestRaw)
439
- ? { ...latestRaw }
440
- : null;
441
- const latestByAliasRaw = isRecord(parsed) ? parsed.latestByAlias : undefined;
442
- const latestByAlias = isRecord(latestByAliasRaw) ? latestByAliasRaw : undefined;
443
- const sessionsRaw = isRecord(parsed) ? parsed.sessions : undefined;
444
- const sessions = isRecord(sessionsRaw) ? sessionsRaw : undefined;
445
- if (!sessions) {
446
- state.loadedOnce = true;
447
- state.loadedMtimeMs = mtimeMs;
448
- return;
449
- }
450
- const tsNow = nowMs();
451
- const pinnedBySessionRaw = isRecord(parsed) ? parsed.pinnedBySession : undefined;
452
- const pinnedBySession = isRecord(pinnedBySessionRaw) ? pinnedBySessionRaw : undefined;
453
- if (pinnedBySession) {
454
- for (const [sessionIdRaw, entryRaw] of Object.entries(pinnedBySession)) {
455
- const sessionId = typeof sessionIdRaw === 'string' ? sessionIdRaw.trim() : '';
456
- if (!sessionId)
457
- continue;
458
- if (!isRecord(entryRaw))
459
- continue;
460
- const aliasKeyRaw = entryRaw.aliasKey;
461
- const aliasKey = typeof aliasKeyRaw === 'string' ? aliasKeyRaw.trim() : '';
462
- const timestampRaw = entryRaw.timestamp;
463
- const timestamp = typeof timestampRaw === 'number' && Number.isFinite(timestampRaw) ? Math.floor(timestampRaw) : 0;
464
- if (!aliasKey || !timestamp)
465
- continue;
466
- if (isPinnedExpired({ timestamp }, tsNow))
467
- continue;
468
- const normalizedAlias = normalizeAliasKey(aliasKey);
469
- const existing = pinnedAliasBySession.get(sessionId);
470
- if (existing && !isPinnedExpired(existing, tsNow) && existing.timestamp >= timestamp) {
471
- continue;
472
- }
473
- pinnedAliasBySession.set(sessionId, { aliasKey: normalizedAlias, timestamp });
474
- }
475
- }
476
- const pinnedByAliasRaw = isRecord(parsed) ? parsed.pinnedByAlias : undefined;
477
- const pinnedByAlias = isRecord(pinnedByAliasRaw) ? pinnedByAliasRaw : undefined;
478
- if (pinnedByAlias) {
479
- for (const [aliasKeyRaw, entryRaw] of Object.entries(pinnedByAlias)) {
480
- const aliasKey = typeof aliasKeyRaw === 'string' ? aliasKeyRaw.trim() : '';
481
- if (!aliasKey)
482
- continue;
483
- if (!isRecord(entryRaw))
484
- continue;
485
- const sessionIdRaw = entryRaw.sessionId;
486
- const sessionId = typeof sessionIdRaw === 'string' ? sessionIdRaw.trim() : '';
487
- const timestampRaw = entryRaw.timestamp;
488
- const timestamp = typeof timestampRaw === 'number' && Number.isFinite(timestampRaw) ? Math.floor(timestampRaw) : 0;
489
- if (!sessionId || !timestamp)
490
- continue;
491
- if (isPinnedExpired({ timestamp }, tsNow))
492
- continue;
493
- const normalizedAlias = normalizeAliasKey(aliasKey);
494
- const existing = pinnedSessionByAlias.get(normalizedAlias);
495
- if (existing && !isPinnedExpired(existing, tsNow) && existing.timestamp >= timestamp) {
496
- continue;
497
- }
498
- pinnedSessionByAlias.set(normalizedAlias, { sessionId, timestamp });
499
- }
500
- }
501
- const syncNativeSignature = (cacheKey, entry) => {
502
- const aliasKey = cacheKey.split('|')[0]?.trim() ?? '';
503
- const sessionId = extractSessionIdFromCacheKey(cacheKey);
504
- if (!aliasKey || !sessionId) {
505
- return;
506
- }
507
- if (aliasKey === 'antigravity.unknown' || aliasKey === ANTIGRAVITY_GLOBAL_ALIAS_KEY) {
508
- return;
509
- }
510
- try {
511
- cacheAntigravitySessionSignatureWithNative({
512
- aliasKey,
513
- sessionId,
514
- signature: entry.signature,
515
- messageCount: entry.messageCount
516
- });
517
- }
518
- catch {
519
- // best-effort native sync; JS cache remains source of truth for persistence
520
- }
521
- };
522
- for (const [persistedKey, entry] of Object.entries(sessions)) {
523
- if (typeof persistedKey !== 'string' || !persistedKey.trim())
524
- continue;
525
- if (!isValidPersistedEntry(entry))
526
- continue;
527
- if (isExpired(entry, tsNow))
528
- continue;
529
- const keyTrimmed = persistedKey.trim();
530
- const isScopedKey = keyTrimmed.includes('|');
531
- const normalizedKeys = isScopedKey
532
- ? [keyTrimmed]
533
- : [
534
- // Legacy v1 persistence stored signatures keyed only by sid-*.
535
- // Treat them as session-global so they can be used for any alias (v2 global store).
536
- buildSignatureCacheKey(ANTIGRAVITY_GLOBAL_ALIAS_KEY, keyTrimmed),
537
- buildSignatureCacheKey('antigravity.unknown', keyTrimmed)
538
- ].filter(Boolean);
539
- for (const normalizedKey of normalizedKeys) {
540
- if (!normalizedKey)
541
- continue;
542
- const existing = sessionSignatures.get(normalizedKey);
543
- if (existing && !isExpired(existing, tsNow) && existing.timestamp >= entry.timestamp) {
544
- continue;
545
- }
546
- sessionSignatures.set(normalizedKey, entry);
547
- syncNativeSignature(normalizedKey, entry);
548
- }
549
- }
550
- latestSignaturesByAlias.clear();
551
- if (latestByAlias) {
552
- for (const [aliasKeyRaw, entryRaw] of Object.entries(latestByAlias)) {
553
- if (typeof aliasKeyRaw !== 'string' || !aliasKeyRaw.trim())
554
- continue;
555
- if (!isValidPersistedEntry(entryRaw))
556
- continue;
557
- if (isExpired(entryRaw, tsNow))
558
- continue;
559
- const sessionIdCandidate = isRecord(entryRaw) && typeof entryRaw.sessionId === 'string'
560
- ? String(entryRaw.sessionId).trim()
561
- : '';
562
- setLatestSignatureEntry(aliasKeyRaw, {
563
- signature: entryRaw.signature,
564
- messageCount: entryRaw.messageCount,
565
- timestamp: entryRaw.timestamp,
566
- ...(sessionIdCandidate ? { sessionId: sessionIdCandidate } : {})
567
- });
568
- }
569
- }
570
- // Legacy v1 persistence ("latest" without alias) is kept only under "unknown" to avoid cross-alias mixing.
571
- if (latestSignaturesByAlias.size === 0 && latestPersisted && !isExpired(latestPersisted, tsNow)) {
572
- setLatestSignatureEntry('antigravity.unknown', {
573
- signature: latestPersisted.signature,
574
- messageCount: latestPersisted.messageCount,
575
- timestamp: latestPersisted.timestamp
576
- });
577
- }
578
- // Recompute per-alias latest values from session cache as a final best-effort pass.
579
- for (const [key, entry] of sessionSignatures.entries()) {
580
- if (isExpired(entry, tsNow))
581
- continue;
582
- const alias = key.split('|')[0] ?? 'unknown';
583
- const existing = getLatestSignatureEntry(alias);
584
- if (!existing || entry.timestamp > existing.timestamp) {
585
- const sessionId = extractSessionIdFromCacheKey(key);
586
- setLatestSignatureEntry(alias, {
587
- signature: entry.signature,
588
- messageCount: entry.messageCount,
589
- timestamp: entry.timestamp,
590
- ...(sessionId ? { sessionId } : {})
591
- });
592
- }
593
- }
594
- ensureCacheLimit();
595
- state.loadedOnce = true;
596
- state.loadedMtimeMs = mtimeMs;
597
- }
598
- function flushPersistedSignaturesSync(state) {
599
- const filePath = resolvePersistFilePath(state.config);
600
- // Avoid wiping existing persisted signatures when this process hasn't cached anything yet.
601
- // Always re-hydrate before writing.
602
- hydrateSignaturesFromDiskIfNeeded(true);
603
- const tsNow = nowMs();
604
- pruneExpired();
605
- ensureCacheLimit();
606
- const sessions = {};
607
- for (const [sid, entry] of sessionSignatures.entries()) {
608
- if (isExpired(entry, tsNow))
609
- continue;
610
- if (!entry.signature || entry.signature.trim().length < MIN_SIGNATURE_LENGTH)
611
- continue;
612
- if (entry.signature.trim() === DUMMY_THOUGHT_SIGNATURE_SENTINEL)
613
- continue;
614
- sessions[sid] = entry;
615
- }
616
- const latestByAliasPersist = {};
617
- for (const [aliasKey, entry] of latestSignaturesByAlias.entries()) {
618
- if (!entry.signature || entry.signature.trim().length < MIN_SIGNATURE_LENGTH)
619
- continue;
620
- if (entry.signature.trim() === DUMMY_THOUGHT_SIGNATURE_SENTINEL)
621
- continue;
622
- latestByAliasPersist[aliasKey] = entry;
623
- }
624
- const pinnedBySessionPersist = {};
625
- for (const [sessionId, entry] of pinnedAliasBySession.entries()) {
626
- const sid = typeof sessionId === 'string' ? sessionId.trim() : '';
627
- if (!sid)
628
- continue;
629
- const aliasKey = typeof entry?.aliasKey === 'string' ? entry.aliasKey.trim() : '';
630
- const timestamp = typeof entry?.timestamp === 'number' && Number.isFinite(entry.timestamp) ? Math.floor(entry.timestamp) : 0;
631
- if (!aliasKey || !timestamp)
632
- continue;
633
- if (isPinnedExpired({ timestamp }, tsNow))
634
- continue;
635
- pinnedBySessionPersist[sid] = { aliasKey, timestamp };
636
- }
637
- const pinnedByAliasPersist = {};
638
- for (const [aliasKey, entry] of pinnedSessionByAlias.entries()) {
639
- const a = typeof aliasKey === 'string' ? aliasKey.trim() : '';
640
- if (!a)
641
- continue;
642
- const sessionId = typeof entry?.sessionId === 'string' ? entry.sessionId.trim() : '';
643
- const timestamp = typeof entry?.timestamp === 'number' && Number.isFinite(entry.timestamp) ? Math.floor(entry.timestamp) : 0;
644
- if (!sessionId || !timestamp)
645
- continue;
646
- if (isPinnedExpired({ timestamp }, tsNow))
647
- continue;
648
- pinnedByAliasPersist[a] = { sessionId, timestamp };
649
- }
650
- try {
651
- fs.mkdirSync(path.dirname(filePath), { recursive: true });
652
- const tmpPath = `${filePath}.tmp.${process.pid}.${tsNow}`;
653
- fs.writeFileSync(tmpPath, JSON.stringify({
654
- version: 3,
655
- updatedAt: tsNow,
656
- sessions,
657
- ...(Object.keys(latestByAliasPersist).length ? { latestByAlias: latestByAliasPersist } : {}),
658
- ...(Object.keys(pinnedBySessionPersist).length ? { pinnedBySession: pinnedBySessionPersist } : {}),
659
- ...(Object.keys(pinnedByAliasPersist).length ? { pinnedByAlias: pinnedByAliasPersist } : {})
660
- }, null, 2), 'utf8');
661
- fs.renameSync(tmpPath, filePath);
662
- try {
663
- const stat = fs.statSync(filePath);
664
- const mtimeMs = typeof stat.mtimeMs === 'number' && Number.isFinite(stat.mtimeMs) ? stat.mtimeMs : stat.mtime.getTime();
665
- state.loadedOnce = true;
666
- state.loadedMtimeMs = mtimeMs;
667
- }
668
- catch {
669
- // ignore
670
- }
671
- }
672
- catch {
673
- // best-effort persistence: must not affect runtime
674
- }
675
- }
676
- function schedulePersistenceFlush() {
677
- const state = getPersistenceState();
678
- if (!state) {
679
- return;
680
- }
681
- if (state.flushTimer) {
682
- return;
683
- }
684
- state.flushTimer = setTimeout(() => {
685
- state.flushTimer = null;
686
- flushPersistedSignaturesSync(state);
687
- }, 250);
688
- state.flushTimer.unref?.();
689
- }
690
- export function cacheAntigravityRequestSessionId(requestId, a, b) {
691
- if (typeof b === 'string') {
692
- cacheAntigravityRequestSessionMeta(requestId, { aliasKey: a, sessionId: b });
693
- return;
694
- }
695
- cacheAntigravityRequestSessionMeta(requestId, { sessionId: a });
696
- }
697
- export function cacheAntigravityRequestSessionMeta(requestId, meta) {
698
- const rid = typeof requestId === 'string' ? requestId.trim() : '';
699
- const sid = typeof meta?.sessionId === 'string' ? meta.sessionId.trim() : '';
700
- if (!rid || !sid) {
701
- return;
702
- }
703
- const aliasKey = normalizeAliasKey(meta?.aliasKey);
704
- const messageCount = typeof meta?.messageCount === 'number' && Number.isFinite(meta.messageCount) && meta.messageCount > 0
705
- ? Math.floor(meta.messageCount)
706
- : 1;
707
- const ts = nowMs();
708
- requestSessionIds.set(rid, { aliasKey, sessionId: sid, messageCount, timestamp: ts });
709
- if (requestSessionIds.size <= SESSION_CACHE_LIMIT) {
710
- return;
711
- }
712
- // Best-effort cleanup to avoid unbounded growth.
713
- const entries = Array.from(requestSessionIds.entries()).sort((a, b) => a[1].timestamp - b[1].timestamp);
714
- const overflow = requestSessionIds.size - SESSION_CACHE_LIMIT;
715
- for (let i = 0; i < overflow; i++) {
716
- const key = entries[i]?.[0];
717
- if (key) {
718
- requestSessionIds.delete(key);
719
- }
720
- }
721
- }
722
- export function getAntigravityRequestSessionId(requestId) {
723
- const meta = getAntigravityRequestSessionMeta(requestId);
724
- return meta?.sessionId;
725
- }
726
- export function getAntigravityRequestSessionMeta(requestId) {
727
- const rid = typeof requestId === 'string' ? requestId.trim() : '';
728
- if (!rid) {
729
- return undefined;
730
- }
731
- const entry = requestSessionIds.get(rid);
732
- if (!entry) {
733
- try {
734
- const nativeMeta = getAntigravityRequestSessionMetaWithNative(rid);
735
- const sid = typeof nativeMeta.sessionId === 'string' ? nativeMeta.sessionId.trim() : '';
736
- if (!sid) {
737
- return undefined;
738
- }
739
- const alias = normalizeAliasKey(nativeMeta.aliasKey);
740
- const messageCount = typeof nativeMeta.messageCount === 'number' && Number.isFinite(nativeMeta.messageCount) && nativeMeta.messageCount > 0
741
- ? Math.floor(nativeMeta.messageCount)
742
- : 1;
743
- const ts = nowMs();
744
- requestSessionIds.set(rid, { aliasKey: alias, sessionId: sid, messageCount, timestamp: ts });
745
- return { aliasKey: alias, sessionId: sid, messageCount };
746
- }
747
- catch {
748
- return undefined;
749
- }
750
- }
751
- const ts = nowMs();
752
- if (isRequestSessionExpired(entry, ts)) {
753
- requestSessionIds.delete(rid);
754
- return undefined;
755
- }
756
- return { aliasKey: entry.aliasKey, sessionId: entry.sessionId, messageCount: entry.messageCount };
757
- }
758
- function findGeminiContentsNode(payload) {
759
- if (!isRecord(payload)) {
760
- return undefined;
761
- }
762
- if (Array.isArray(payload.contents)) {
763
- return payload;
764
- }
765
- const nested = payload.request;
766
- if (isRecord(nested) && Array.isArray(nested.contents)) {
767
- return nested;
768
- }
769
- const data = payload.data;
770
- if (isRecord(data)) {
771
- return findGeminiContentsNode(data);
772
- }
773
- return payload;
774
- }
775
- /**
776
- * Antigravity-Manager alignment: derive a stable session fingerprint for Gemini native requests.
777
- * - sha256(first user text parts joined), if non-empty and no "<system-reminder>"
778
- * - else sha256(JSON body)
779
- * - sid = "sid-" + first 16 hex chars
780
- */
781
- export function extractAntigravityGeminiSessionId(payload) {
782
- const node = findGeminiContentsNode(payload) ?? {};
783
- let seed;
784
- const contentsRaw = node.contents;
785
- const contents = Array.isArray(contentsRaw) ? contentsRaw : [];
786
- for (const content of contents) {
787
- if (!isRecord(content))
788
- continue;
789
- if (typeof content.role !== 'string' || content.role !== 'user')
790
- continue;
791
- const partsRaw = content.parts;
792
- const parts = Array.isArray(partsRaw) ? partsRaw : [];
793
- const texts = [];
794
- for (const part of parts) {
795
- if (!isRecord(part))
796
- continue;
797
- const text = typeof part.text === 'string' ? part.text : '';
798
- if (text) {
799
- texts.push(text);
800
- }
801
- }
802
- const combined = texts.join(' ').trim();
803
- // RouteCodex signature persistence alignment:
804
- // - Prefer the first user message text as the stable session anchor, even when short.
805
- // - Skip system-reminder carrier messages (common in tool followups).
806
- if (combined.length > 0 && !combined.includes('<system-reminder>')) {
807
- seed = combined;
808
- break;
809
- }
810
- }
811
- if (!seed) {
812
- seed = jsonStringifyFallback(node);
813
- }
814
- const hash = sha256Hex(seed);
815
- return `sid-${hash.slice(0, 16)}`;
816
- }
817
- export function cacheAntigravitySessionSignature(a, b, c, d = 1) {
818
- const isNewSignature = typeof c === 'string';
819
- const aliasKey = isNewSignature ? a : 'antigravity.unknown';
820
- const sessionId = isNewSignature ? b : a;
821
- const signature = isNewSignature ? c : b;
822
- const messageCount = typeof c === 'number' ? c : typeof d === 'number' ? d : 1;
823
- const key = buildSignatureCacheKey(aliasKey, sessionId);
824
- if (!key) {
825
- return;
826
- }
827
- if (typeof signature !== 'string') {
828
- return;
829
- }
830
- const trimmedSignature = signature.trim();
831
- if (trimmedSignature.length < MIN_SIGNATURE_LENGTH || trimmedSignature === DUMMY_THOUGHT_SIGNATURE_SENTINEL) {
832
- return;
833
- }
834
- const ts = nowMs();
835
- const existing = sessionSignatures.get(key);
836
- let shouldStore = false;
837
- if (!existing) {
838
- shouldStore = true;
839
- }
840
- else if (isExpired(existing, ts)) {
841
- shouldStore = true;
842
- }
843
- else if (messageCount < existing.messageCount) {
844
- // Rewind detected: allow overwrite.
845
- shouldStore = true;
846
- }
847
- else if (messageCount === existing.messageCount) {
848
- shouldStore = signature.length > existing.signature.length;
849
- }
850
- else {
851
- shouldStore = true;
852
- }
853
- if (!shouldStore) {
854
- return;
855
- }
856
- sessionSignatures.set(key, { signature: trimmedSignature, messageCount, timestamp: ts });
857
- rewindBlocks.delete(key);
858
- const latest = getLatestSignatureEntry(aliasKey);
859
- if (!latest || ts >= latest.timestamp) {
860
- setLatestSignatureEntry(aliasKey, { signature: trimmedSignature, messageCount, timestamp: ts, sessionId });
861
- }
862
- maybePinAntigravitySessionToAlias(aliasKey, sessionId, ts);
863
- ensureCacheLimit();
864
- schedulePersistenceFlush();
865
- try {
866
- cacheAntigravitySessionSignatureWithNative({
867
- aliasKey,
868
- sessionId,
869
- signature: trimmedSignature,
870
- messageCount
871
- });
872
- }
873
- catch {
874
- // best-effort native sync; TS cache remains source for persistence semantics
875
- }
876
- }
877
- function maybePinAntigravitySessionToAlias(aliasKeyInput, sessionIdInput, ts) {
878
- const aliasKey = normalizeAliasKey(aliasKeyInput);
879
- const sessionId = normalizeSessionId(sessionIdInput);
880
- if (!sessionId) {
881
- return;
882
- }
883
- if (aliasKey === 'antigravity.unknown' || aliasKey === ANTIGRAVITY_GLOBAL_ALIAS_KEY) {
884
- return;
885
- }
886
- const existing = pinnedAliasBySession.get(sessionId);
887
- if (existing && !isPinnedExpired(existing, ts)) {
888
- if (existing.aliasKey === aliasKey && ts - existing.timestamp >= SIGNATURE_TOUCH_INTERVAL_MS) {
889
- pinnedAliasBySession.set(sessionId, { aliasKey, timestamp: ts });
890
- pinnedSessionByAlias.set(aliasKey, { sessionId, timestamp: ts });
891
- schedulePersistenceFlush();
892
- }
893
- return;
894
- }
895
- const existingForAlias = pinnedSessionByAlias.get(aliasKey);
896
- if (existingForAlias && !isPinnedExpired(existingForAlias, ts) && existingForAlias.sessionId !== sessionId) {
897
- return;
898
- }
899
- pinnedAliasBySession.set(sessionId, { aliasKey, timestamp: ts });
900
- pinnedSessionByAlias.set(aliasKey, { sessionId, timestamp: ts });
901
- schedulePersistenceFlush();
902
- }
903
- export function lookupAntigravityPinnedAliasForSessionId(sessionIdInput, options) {
904
- const sessionId = normalizeSessionId(sessionIdInput);
905
- if (!sessionId) {
906
- return undefined;
907
- }
908
- const allowHydrate = options?.hydrate !== false;
909
- if (allowHydrate) {
910
- hydrateSignaturesFromDiskIfNeeded(true);
911
- }
912
- const entry = pinnedAliasBySession.get(sessionId);
913
- if (!entry) {
914
- return undefined;
915
- }
916
- const ts = nowMs();
917
- if (isPinnedExpired(entry, ts)) {
918
- pinnedAliasBySession.delete(sessionId);
919
- return undefined;
920
- }
921
- if (ts - entry.timestamp >= SIGNATURE_TOUCH_INTERVAL_MS) {
922
- pinnedAliasBySession.set(sessionId, { aliasKey: entry.aliasKey, timestamp: ts });
923
- pinnedSessionByAlias.set(entry.aliasKey, { sessionId, timestamp: ts });
924
- schedulePersistenceFlush();
925
- }
926
- return entry.aliasKey;
927
- }
928
- export function unpinAntigravitySessionAliasForSessionId(sessionIdInput) {
929
- const sessionId = normalizeSessionId(sessionIdInput);
930
- if (!sessionId) {
931
- return;
932
- }
933
- hydrateSignaturesFromDiskIfNeeded(true);
934
- const existing = pinnedAliasBySession.get(sessionId);
935
- if (!existing) {
936
- return;
937
- }
938
- pinnedAliasBySession.delete(sessionId);
939
- const aliasKey = typeof existing.aliasKey === 'string' ? existing.aliasKey : '';
940
- if (aliasKey) {
941
- const backref = pinnedSessionByAlias.get(aliasKey);
942
- if (backref?.sessionId === sessionId) {
943
- pinnedSessionByAlias.delete(aliasKey);
944
- }
945
- }
946
- schedulePersistenceFlush();
947
- }
948
- export function clearAntigravitySessionAliasPins(options) {
949
- const allowHydrate = options?.hydrate !== false;
950
- if (allowHydrate) {
951
- hydrateSignaturesFromDiskIfNeeded(true);
952
- }
953
- const clearedBySession = pinnedAliasBySession.size;
954
- const clearedByAlias = pinnedSessionByAlias.size;
955
- if (clearedBySession === 0 && clearedByAlias === 0) {
956
- return { clearedBySession: 0, clearedByAlias: 0 };
957
- }
958
- pinnedAliasBySession.clear();
959
- pinnedSessionByAlias.clear();
960
- schedulePersistenceFlush();
961
- return { clearedBySession, clearedByAlias };
962
- }
963
- export function getAntigravitySessionSignature(a, b) {
964
- return getAntigravitySessionSignatureEntry(a, b)?.signature;
965
- }
966
- export function lookupAntigravitySessionSignatureEntry(aliasKeyInput, sessionIdInput, options) {
967
- const allowHydrate = options?.hydrate !== false;
968
- const aliasKey = normalizeAliasKey(aliasKeyInput);
969
- const sessionId = normalizeSessionId(sessionIdInput);
970
- const cacheKey = buildSignatureCacheKey(aliasKey, sessionId);
971
- if (!cacheKey) {
972
- return { aliasKey, sessionId, cacheKey, source: 'miss' };
973
- }
974
- let entry = sessionSignatures.get(cacheKey);
975
- if (!entry && allowHydrate) {
976
- hydrateSignaturesFromDiskIfNeeded(true);
977
- entry = sessionSignatures.get(cacheKey);
978
- }
979
- if (entry) {
980
- const ts = nowMs();
981
- if (isExpired(entry, ts)) {
982
- sessionSignatures.delete(cacheKey);
983
- return { aliasKey, sessionId, cacheKey, source: 'expired' };
984
- }
985
- touchSessionSignature(aliasKey, cacheKey, entry, ts);
986
- return {
987
- aliasKey,
988
- sessionId,
989
- cacheKey,
990
- source: 'session_cache',
991
- signature: entry.signature,
992
- messageCount: entry.messageCount,
993
- sourceSessionId: sessionId,
994
- sourceTimestamp: entry.timestamp
995
- };
996
- }
997
- if (!shouldAllowAliasLatestFallback(aliasKey)) {
998
- return { aliasKey, sessionId, cacheKey, source: 'blocked_unknown_alias' };
999
- }
1000
- const ts = nowMs();
1001
- const rewind = rewindBlocks.get(cacheKey);
1002
- if (rewind && ts < rewind.until) {
1003
- return { aliasKey, sessionId, cacheKey, source: 'blocked_rewind' };
1004
- }
1005
- // Antigravity-Manager alignment: do NOT reuse signatures across sessions.
1006
- // If we miss the session cache, the caller must omit thoughtSignature and wait for upstream to provide a real one.
1007
- // (Persistence is still used to restore the same session across restarts, not to "heal" unrelated sessions.)
1008
- if (allowHydrate) {
1009
- hydrateSignaturesFromDiskIfNeeded(true);
1010
- const hydrated = sessionSignatures.get(cacheKey);
1011
- if (hydrated && !isExpired(hydrated, ts)) {
1012
- touchSessionSignature(aliasKey, cacheKey, hydrated, ts);
1013
- return {
1014
- aliasKey,
1015
- sessionId,
1016
- cacheKey,
1017
- source: 'session_cache',
1018
- signature: hydrated.signature,
1019
- messageCount: hydrated.messageCount,
1020
- sourceSessionId: sessionId,
1021
- sourceTimestamp: hydrated.timestamp
1022
- };
1023
- }
1024
- }
1025
- return { aliasKey, sessionId, cacheKey, source: 'miss' };
1026
- }
1027
- export function getAntigravitySessionSignatureEntry(a, b, c) {
1028
- const hasAlias = typeof b === 'string';
1029
- const options = (hasAlias ? c : b);
1030
- const aliasKey = normalizeAliasKey(hasAlias ? a : 'antigravity.unknown');
1031
- const sessionId = hasAlias ? b : a;
1032
- const lookup = lookupAntigravitySessionSignatureEntry(aliasKey, sessionId, options);
1033
- if (lookup.signature && typeof lookup.messageCount === 'number') {
1034
- return { signature: lookup.signature, messageCount: lookup.messageCount };
1035
- }
1036
- return undefined;
1037
- }
1038
- export function clearAntigravitySessionSignature(a, b) {
1039
- const hasAlias = typeof b === 'string';
1040
- const aliasKey = hasAlias ? a : 'antigravity.unknown';
1041
- const sessionId = hasAlias ? b : a;
1042
- const key = buildSignatureCacheKey(aliasKey, sessionId);
1043
- if (!key) {
1044
- return;
1045
- }
1046
- sessionSignatures.delete(key);
1047
- // Keep latest-by-alias coherent so leasing doesn't keep pointing at a cleared signature.
1048
- if (hasAlias) {
1049
- const latest = getLatestSignatureEntry(aliasKey);
1050
- if (latest?.sessionId && latest.sessionId.trim() === normalizeSessionId(sessionId)) {
1051
- setLatestSignatureEntry(aliasKey, null);
1052
- }
1053
- }
1054
- schedulePersistenceFlush();
1055
- }
1056
- export function markAntigravitySessionSignatureRewind(aliasKey, sessionId, messageCount = 1) {
1057
- const key = buildSignatureCacheKey(aliasKey, sessionId);
1058
- if (!key) {
1059
- return;
1060
- }
1061
- const ts = nowMs();
1062
- const mc = typeof messageCount === 'number' && Number.isFinite(messageCount) && messageCount > 0 ? Math.floor(messageCount) : 1;
1063
- rewindBlocks.set(key, { timestamp: ts, until: ts + REWIND_BLOCK_MS, messageCount: mc });
1064
- // Best-effort bound on memory usage.
1065
- if (rewindBlocks.size > SESSION_CACHE_LIMIT) {
1066
- const entries = Array.from(rewindBlocks.entries()).sort((a, b) => a[1].timestamp - b[1].timestamp);
1067
- const overflow = rewindBlocks.size - SESSION_CACHE_LIMIT;
1068
- for (let i = 0; i < overflow; i++) {
1069
- const k = entries[i]?.[0];
1070
- if (k)
1071
- rewindBlocks.delete(k);
1072
- }
1073
- }
1074
- }
1075
- /**
1076
- * Clear thoughtSignature caches + pins for a specific (aliasKey, sessionId).
1077
- *
1078
- * Used for "Invalid signature / Corrupted thought signature / thinking.signature" style upstream errors,
1079
- * where keeping a persisted signature would cause repeated 400s after restart.
1080
- */
1081
- export function invalidateAntigravitySessionSignature(aliasKeyInput, sessionIdInput) {
1082
- const aliasKey = normalizeAliasKey(aliasKeyInput);
1083
- const sessionId = normalizeSessionId(sessionIdInput);
1084
- if (!sessionId) {
1085
- return;
1086
- }
1087
- hydrateSignaturesFromDiskIfNeeded(true);
1088
- const keys = [
1089
- buildSignatureCacheKey(aliasKey, sessionId),
1090
- buildSignatureCacheKey(ANTIGRAVITY_GLOBAL_ALIAS_KEY, sessionId)
1091
- ].filter((k) => typeof k === 'string' && k.trim().length > 0);
1092
- keys.forEach((k) => sessionSignatures.delete(k));
1093
- const latest = getLatestSignatureEntry(aliasKey);
1094
- if (latest?.sessionId && latest.sessionId.trim() === sessionId) {
1095
- setLatestSignatureEntry(aliasKey, null);
1096
- }
1097
- const globalLatest = getLatestSignatureEntry(ANTIGRAVITY_GLOBAL_ALIAS_KEY);
1098
- if (globalLatest?.sessionId && globalLatest.sessionId.trim() === sessionId) {
1099
- setLatestSignatureEntry(ANTIGRAVITY_GLOBAL_ALIAS_KEY, null);
1100
- }
1101
- // Release any pins so routing can rotate away from a broken tool loop.
1102
- const pinnedAlias = pinnedAliasBySession.get(sessionId);
1103
- if (pinnedAlias) {
1104
- pinnedAliasBySession.delete(sessionId);
1105
- if (typeof pinnedAlias.aliasKey === 'string' && pinnedAlias.aliasKey.trim()) {
1106
- const backref = pinnedSessionByAlias.get(pinnedAlias.aliasKey);
1107
- if (backref?.sessionId === sessionId) {
1108
- pinnedSessionByAlias.delete(pinnedAlias.aliasKey);
1109
- }
1110
- }
1111
- }
1112
- const pinnedSession = pinnedSessionByAlias.get(aliasKey);
1113
- if (pinnedSession?.sessionId === sessionId) {
1114
- pinnedSessionByAlias.delete(aliasKey);
1115
- }
1116
- schedulePersistenceFlush();
1117
- }
1118
- export function resetAntigravitySessionSignatureCachesForTests() {
1119
- sessionSignatures.clear();
1120
- requestSessionIds.clear();
1121
- latestSignaturesByAlias.clear();
1122
- pinnedAliasBySession.clear();
1123
- pinnedSessionByAlias.clear();
1124
- rewindBlocks.clear();
1125
- const persistence = getPersistenceState();
1126
- if (persistence) {
1127
- persistence.loadedOnce = false;
1128
- persistence.loadedMtimeMs = null;
1129
- }
1130
- try {
1131
- resetAntigravitySignatureCachesWithNative();
1132
- }
1133
- catch {
1134
- // best-effort
1135
- }
1136
- }
1137
- export function shouldTreatAsMissingThoughtSignature(value) {
1138
- if (typeof value !== 'string') {
1139
- return true;
1140
- }
1141
- const trimmed = value.trim();
1142
- return trimmed.length === 0 || trimmed === DUMMY_THOUGHT_SIGNATURE_SENTINEL;
1143
- }