@vybestack/llxprt-code 0.4.7 → 0.5.0-nightly.251102.f115237d

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 (301) hide show
  1. package/dist/package.json +7 -5
  2. package/dist/src/auth/__tests__/oauthManager.safety.test.d.ts +6 -0
  3. package/dist/src/auth/__tests__/oauthManager.safety.test.js +49 -0
  4. package/dist/src/auth/__tests__/oauthManager.safety.test.js.map +1 -0
  5. package/dist/src/auth/oauth-manager.d.ts +16 -0
  6. package/dist/src/auth/oauth-manager.js +81 -29
  7. package/dist/src/auth/oauth-manager.js.map +1 -1
  8. package/dist/src/auth/oauth-manager.spec.js +7 -2
  9. package/dist/src/auth/oauth-manager.spec.js.map +1 -1
  10. package/dist/src/commands/extensions.js +1 -1
  11. package/dist/src/commands/extensions.js.map +1 -1
  12. package/dist/src/config/__tests__/nonInteractiveTools.test.d.ts +6 -0
  13. package/dist/src/config/__tests__/nonInteractiveTools.test.js +13 -0
  14. package/dist/src/config/__tests__/nonInteractiveTools.test.js.map +1 -0
  15. package/dist/src/config/__tests__/profileBootstrap.test.d.ts +6 -0
  16. package/dist/src/config/__tests__/profileBootstrap.test.js +91 -0
  17. package/dist/src/config/__tests__/profileBootstrap.test.js.map +1 -0
  18. package/dist/src/config/config.d.ts +7 -2
  19. package/dist/src/config/config.js +225 -10
  20. package/dist/src/config/config.js.map +1 -1
  21. package/dist/src/config/config.loadMemory.test.js +1 -0
  22. package/dist/src/config/config.loadMemory.test.js.map +1 -1
  23. package/dist/src/config/profileBootstrap.d.ts +64 -0
  24. package/dist/src/config/profileBootstrap.js +140 -0
  25. package/dist/src/config/profileBootstrap.js.map +1 -0
  26. package/dist/src/config/settings.env.test.d.ts +6 -0
  27. package/dist/src/config/settings.env.test.js +38 -0
  28. package/dist/src/config/settings.env.test.js.map +1 -0
  29. package/dist/src/config/settings.js +2 -2
  30. package/dist/src/config/settings.js.map +1 -1
  31. package/dist/src/gemini.js +70 -25
  32. package/dist/src/gemini.js.map +1 -1
  33. package/dist/src/gemini.test.js +1 -2
  34. package/dist/src/gemini.test.js.map +1 -1
  35. package/dist/src/generated/git-commit.d.ts +1 -1
  36. package/dist/src/generated/git-commit.js +1 -1
  37. package/dist/src/integration-tests/base-url-behavior.integration.test.js +110 -450
  38. package/dist/src/integration-tests/base-url-behavior.integration.test.js.map +1 -1
  39. package/dist/src/integration-tests/model-params-isolation.integration.test.js +101 -539
  40. package/dist/src/integration-tests/model-params-isolation.integration.test.js.map +1 -1
  41. package/dist/src/integration-tests/modelParams.integration.test.js +86 -761
  42. package/dist/src/integration-tests/modelParams.integration.test.js.map +1 -1
  43. package/dist/src/integration-tests/provider-multi-runtime.integration.test.d.ts +6 -0
  44. package/dist/src/integration-tests/provider-multi-runtime.integration.test.js +198 -0
  45. package/dist/src/integration-tests/provider-multi-runtime.integration.test.js.map +1 -0
  46. package/dist/src/integration-tests/provider-switching.integration.test.js +97 -151
  47. package/dist/src/integration-tests/provider-switching.integration.test.js.map +1 -1
  48. package/dist/src/integration-tests/runtime-isolation.test.d.ts +13 -0
  49. package/dist/src/integration-tests/runtime-isolation.test.js +170 -0
  50. package/dist/src/integration-tests/runtime-isolation.test.js.map +1 -0
  51. package/dist/src/integration-tests/test-utils.js +19 -2
  52. package/dist/src/integration-tests/test-utils.js.map +1 -1
  53. package/dist/src/integration-tests/test-utils.test.js +9 -8
  54. package/dist/src/integration-tests/test-utils.test.js.map +1 -1
  55. package/dist/src/integration-tests/todo-continuation.integration.test.js +5 -2
  56. package/dist/src/integration-tests/todo-continuation.integration.test.js.map +1 -1
  57. package/dist/src/integration-tests/tools-governance.integration.test.d.ts +6 -0
  58. package/dist/src/integration-tests/tools-governance.integration.test.js +98 -0
  59. package/dist/src/integration-tests/tools-governance.integration.test.js.map +1 -0
  60. package/dist/src/nonInteractiveCli.js +36 -11
  61. package/dist/src/nonInteractiveCli.js.map +1 -1
  62. package/dist/src/providers/logging/git-stats.test.js +11 -1
  63. package/dist/src/providers/logging/git-stats.test.js.map +1 -1
  64. package/dist/src/providers/logging/multi-provider-logging.integration.test.js +1 -2
  65. package/dist/src/providers/logging/multi-provider-logging.integration.test.js.map +1 -1
  66. package/dist/src/providers/logging/performance.test.js +1 -1
  67. package/dist/src/providers/logging/performance.test.js.map +1 -1
  68. package/dist/src/providers/oauth-provider-registration.d.ts +2 -2
  69. package/dist/src/providers/oauth-provider-registration.js +25 -9
  70. package/dist/src/providers/oauth-provider-registration.js.map +1 -1
  71. package/dist/src/providers/provider-gemini-switching.test.js +67 -89
  72. package/dist/src/providers/provider-gemini-switching.test.js.map +1 -1
  73. package/dist/src/providers/provider-switching.integration.test.js +42 -98
  74. package/dist/src/providers/provider-switching.integration.test.js.map +1 -1
  75. package/dist/src/providers/providerConfigUtils.d.ts +12 -7
  76. package/dist/src/providers/providerConfigUtils.js +31 -99
  77. package/dist/src/providers/providerConfigUtils.js.map +1 -1
  78. package/dist/src/providers/providerManagerInstance.d.ts +17 -1
  79. package/dist/src/providers/providerManagerInstance.js +157 -175
  80. package/dist/src/providers/providerManagerInstance.js.map +1 -1
  81. package/dist/src/providers/providerManagerInstance.oauthRegistration.test.js +19 -15
  82. package/dist/src/providers/providerManagerInstance.oauthRegistration.test.js.map +1 -1
  83. package/dist/src/providers/providerManagerInstance.test.js +2 -5
  84. package/dist/src/providers/providerManagerInstance.test.js.map +1 -1
  85. package/dist/src/runtime/__tests__/profileApplication.test.d.ts +5 -0
  86. package/dist/src/runtime/__tests__/profileApplication.test.js +232 -0
  87. package/dist/src/runtime/__tests__/profileApplication.test.js.map +1 -0
  88. package/dist/src/runtime/__tests__/runtimeIsolation.test.d.ts +5 -0
  89. package/dist/src/runtime/__tests__/runtimeIsolation.test.js +376 -0
  90. package/dist/src/runtime/__tests__/runtimeIsolation.test.js.map +1 -0
  91. package/dist/src/runtime/agentRuntimeAdapter.d.ts +249 -0
  92. package/dist/src/runtime/agentRuntimeAdapter.js +506 -0
  93. package/dist/src/runtime/agentRuntimeAdapter.js.map +1 -0
  94. package/dist/src/runtime/agentRuntimeAdapter.spec.d.ts +6 -0
  95. package/dist/src/runtime/agentRuntimeAdapter.spec.js +866 -0
  96. package/dist/src/runtime/agentRuntimeAdapter.spec.js.map +1 -0
  97. package/dist/src/runtime/messages.d.ts +28 -0
  98. package/dist/src/runtime/messages.js +64 -0
  99. package/dist/src/runtime/messages.js.map +1 -0
  100. package/dist/src/runtime/profileApplication.d.ts +33 -0
  101. package/dist/src/runtime/profileApplication.js +191 -0
  102. package/dist/src/runtime/profileApplication.js.map +1 -0
  103. package/dist/src/runtime/providerConfigUtils.test.d.ts +1 -0
  104. package/dist/src/runtime/providerConfigUtils.test.js +68 -0
  105. package/dist/src/runtime/providerConfigUtils.test.js.map +1 -0
  106. package/dist/src/runtime/runtimeContextFactory.d.ts +102 -0
  107. package/dist/src/runtime/runtimeContextFactory.js +190 -0
  108. package/dist/src/runtime/runtimeContextFactory.js.map +1 -0
  109. package/dist/src/runtime/runtimeSettings.d.ts +217 -0
  110. package/dist/src/runtime/runtimeSettings.js +1094 -0
  111. package/dist/src/runtime/runtimeSettings.js.map +1 -0
  112. package/dist/src/runtime/runtimeSettings.test.d.ts +1 -0
  113. package/dist/src/runtime/runtimeSettings.test.js +320 -0
  114. package/dist/src/runtime/runtimeSettings.test.js.map +1 -0
  115. package/dist/src/services/BuiltinCommandLoader.d.ts +13 -4
  116. package/dist/src/services/BuiltinCommandLoader.js +17 -4
  117. package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
  118. package/dist/src/services/McpPromptLoader.js +34 -13
  119. package/dist/src/services/McpPromptLoader.js.map +1 -1
  120. package/dist/src/settings/ephemeralSettings.js +3 -2
  121. package/dist/src/settings/ephemeralSettings.js.map +1 -1
  122. package/dist/src/test-utils/mockCommandContext.js +5 -2
  123. package/dist/src/test-utils/mockCommandContext.js.map +1 -1
  124. package/dist/src/ui/App.js +29 -49
  125. package/dist/src/ui/App.js.map +1 -1
  126. package/dist/src/ui/commands/aboutCommand.js +29 -0
  127. package/dist/src/ui/commands/aboutCommand.js.map +1 -1
  128. package/dist/src/ui/commands/authCommand.js +15 -12
  129. package/dist/src/ui/commands/authCommand.js.map +1 -1
  130. package/dist/src/ui/commands/baseurlCommand.js +8 -44
  131. package/dist/src/ui/commands/baseurlCommand.js.map +1 -1
  132. package/dist/src/ui/commands/chatCommand.js +28 -12
  133. package/dist/src/ui/commands/chatCommand.js.map +1 -1
  134. package/dist/src/ui/commands/diagnosticsCommand.d.ts +0 -3
  135. package/dist/src/ui/commands/diagnosticsCommand.js +40 -191
  136. package/dist/src/ui/commands/diagnosticsCommand.js.map +1 -1
  137. package/dist/src/ui/commands/docsCommand.js +1 -1
  138. package/dist/src/ui/commands/docsCommand.js.map +1 -1
  139. package/dist/src/ui/commands/keyCommand.js +9 -58
  140. package/dist/src/ui/commands/keyCommand.js.map +1 -1
  141. package/dist/src/ui/commands/keyCommand.test.js +48 -102
  142. package/dist/src/ui/commands/keyCommand.test.js.map +1 -1
  143. package/dist/src/ui/commands/keyfileCommand.js +42 -93
  144. package/dist/src/ui/commands/keyfileCommand.js.map +1 -1
  145. package/dist/src/ui/commands/logoutCommand.js +2 -2
  146. package/dist/src/ui/commands/logoutCommand.js.map +1 -1
  147. package/dist/src/ui/commands/mcpCommand.js +29 -7
  148. package/dist/src/ui/commands/mcpCommand.js.map +1 -1
  149. package/dist/src/ui/commands/modelCommand.js +8 -59
  150. package/dist/src/ui/commands/modelCommand.js.map +1 -1
  151. package/dist/src/ui/commands/profileCommand.js +151 -267
  152. package/dist/src/ui/commands/profileCommand.js.map +1 -1
  153. package/dist/src/ui/commands/profileCommand.test.js +88 -344
  154. package/dist/src/ui/commands/profileCommand.test.js.map +1 -1
  155. package/dist/src/ui/commands/providerCommand.js +9 -3
  156. package/dist/src/ui/commands/providerCommand.js.map +1 -1
  157. package/dist/src/ui/commands/restoreCommand.js +38 -18
  158. package/dist/src/ui/commands/restoreCommand.js.map +1 -1
  159. package/dist/src/ui/commands/schema/argumentResolver.test.d.ts +6 -0
  160. package/dist/src/ui/commands/schema/argumentResolver.test.js +619 -0
  161. package/dist/src/ui/commands/schema/argumentResolver.test.js.map +1 -0
  162. package/dist/src/ui/commands/schema/index.d.ts +15 -0
  163. package/dist/src/ui/commands/schema/index.js +320 -0
  164. package/dist/src/ui/commands/schema/index.js.map +1 -0
  165. package/dist/src/ui/commands/schema/types.d.ts +61 -0
  166. package/dist/src/ui/commands/schema/types.js +12 -0
  167. package/dist/src/ui/commands/schema/types.js.map +1 -0
  168. package/dist/src/ui/commands/setCommand.js +641 -325
  169. package/dist/src/ui/commands/setCommand.js.map +1 -1
  170. package/dist/src/ui/commands/setCommand.test.js +92 -388
  171. package/dist/src/ui/commands/setCommand.test.js.map +1 -1
  172. package/dist/src/ui/commands/statusCommand.js +2 -2
  173. package/dist/src/ui/commands/statusCommand.js.map +1 -1
  174. package/dist/src/ui/commands/subagentCommand.d.ts +16 -0
  175. package/dist/src/ui/commands/subagentCommand.js +656 -0
  176. package/dist/src/ui/commands/subagentCommand.js.map +1 -0
  177. package/dist/src/ui/commands/test/setCommand.mutation.test.d.ts +6 -0
  178. package/dist/src/ui/commands/test/setCommand.mutation.test.js +132 -0
  179. package/dist/src/ui/commands/test/setCommand.mutation.test.js.map +1 -0
  180. package/dist/src/ui/commands/test/setCommand.phase09.test.d.ts +6 -0
  181. package/dist/src/ui/commands/test/setCommand.phase09.test.js +222 -0
  182. package/dist/src/ui/commands/test/setCommand.phase09.test.js.map +1 -0
  183. package/dist/src/ui/commands/test/subagentCommand.schema.test.d.ts +6 -0
  184. package/dist/src/ui/commands/test/subagentCommand.schema.test.js +125 -0
  185. package/dist/src/ui/commands/test/subagentCommand.schema.test.js.map +1 -0
  186. package/dist/src/ui/commands/test/subagentCommand.test.d.ts +1 -0
  187. package/dist/src/ui/commands/test/subagentCommand.test.js +589 -0
  188. package/dist/src/ui/commands/test/subagentCommand.test.js.map +1 -0
  189. package/dist/src/ui/commands/toolformatCommand.js +25 -98
  190. package/dist/src/ui/commands/toolformatCommand.js.map +1 -1
  191. package/dist/src/ui/commands/toolformatCommand.test.js +56 -102
  192. package/dist/src/ui/commands/toolformatCommand.test.js.map +1 -1
  193. package/dist/src/ui/commands/toolsCommand.js +187 -31
  194. package/dist/src/ui/commands/toolsCommand.js.map +1 -1
  195. package/dist/src/ui/commands/types.d.ts +11 -2
  196. package/dist/src/ui/commands/types.js.map +1 -1
  197. package/dist/src/ui/components/AboutBox.d.ts +4 -0
  198. package/dist/src/ui/components/AboutBox.js +1 -1
  199. package/dist/src/ui/components/AboutBox.js.map +1 -1
  200. package/dist/src/ui/components/AuthDialog.js +4 -3
  201. package/dist/src/ui/components/AuthDialog.js.map +1 -1
  202. package/dist/src/ui/components/AuthDialog.test.js +67 -1
  203. package/dist/src/ui/components/AuthDialog.test.js.map +1 -1
  204. package/dist/src/ui/components/Footer.js +4 -5
  205. package/dist/src/ui/components/Footer.js.map +1 -1
  206. package/dist/src/ui/components/HistoryItemDisplay.js +1 -1
  207. package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
  208. package/dist/src/ui/components/HistoryItemDisplay.test.js +2 -0
  209. package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
  210. package/dist/src/ui/components/InputPrompt.js +18 -6
  211. package/dist/src/ui/components/InputPrompt.js.map +1 -1
  212. package/dist/src/ui/components/SettingsDialog.js +1 -1
  213. package/dist/src/ui/components/SettingsDialog.js.map +1 -1
  214. package/dist/src/ui/components/StatsDisplay.js +6 -11
  215. package/dist/src/ui/components/StatsDisplay.js.map +1 -1
  216. package/dist/src/ui/components/SuggestionsDisplay.d.ts +13 -1
  217. package/dist/src/ui/components/SuggestionsDisplay.js +22 -3
  218. package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -1
  219. package/dist/src/ui/components/WorkspaceMigrationDialog.js +1 -1
  220. package/dist/src/ui/components/WorkspaceMigrationDialog.js.map +1 -1
  221. package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +1 -0
  222. package/dist/src/ui/components/messages/ToolGroupMessage.js +14 -14
  223. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
  224. package/dist/src/ui/components/messages/ToolGroupMessage.test.js +1 -0
  225. package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -1
  226. package/dist/src/ui/components/shared/text-buffer.js +4 -1
  227. package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
  228. package/dist/src/ui/containers/SessionController.js +61 -117
  229. package/dist/src/ui/containers/SessionController.js.map +1 -1
  230. package/dist/src/ui/contexts/RuntimeContext.d.ts +61 -0
  231. package/dist/src/ui/contexts/RuntimeContext.js +118 -0
  232. package/dist/src/ui/contexts/RuntimeContext.js.map +1 -0
  233. package/dist/src/ui/contexts/TodoProvider.d.ts +1 -0
  234. package/dist/src/ui/contexts/TodoProvider.js +10 -8
  235. package/dist/src/ui/contexts/TodoProvider.js.map +1 -1
  236. package/dist/src/ui/contexts/ToolCallProvider.d.ts +1 -0
  237. package/dist/src/ui/contexts/ToolCallProvider.js +10 -9
  238. package/dist/src/ui/contexts/ToolCallProvider.js.map +1 -1
  239. package/dist/src/ui/hooks/__tests__/useSlashCompletion.set.phase09.test.d.ts +6 -0
  240. package/dist/src/ui/hooks/__tests__/useSlashCompletion.set.phase09.test.js +39 -0
  241. package/dist/src/ui/hooks/__tests__/useSlashCompletion.set.phase09.test.js.map +1 -0
  242. package/dist/src/ui/hooks/atCommandProcessor.js +11 -3
  243. package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
  244. package/dist/src/ui/hooks/atCommandProcessor.test.js +3 -1
  245. package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
  246. package/dist/src/ui/hooks/shellCommandProcessor.js +4 -1
  247. package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -1
  248. package/dist/src/ui/hooks/shellCommandProcessor.test.js +1 -0
  249. package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -1
  250. package/dist/src/ui/hooks/slashCommandProcessor.js +29 -1
  251. package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
  252. package/dist/src/ui/hooks/useAuthCommand.js +11 -3
  253. package/dist/src/ui/hooks/useAuthCommand.js.map +1 -1
  254. package/dist/src/ui/hooks/useCommandCompletion.d.ts +1 -0
  255. package/dist/src/ui/hooks/useCommandCompletion.js +2 -0
  256. package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -1
  257. package/dist/src/ui/hooks/useGeminiStream.js +37 -11
  258. package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
  259. package/dist/src/ui/hooks/useGeminiStream.subagent.spec.d.ts +6 -0
  260. package/dist/src/ui/hooks/useGeminiStream.subagent.spec.js +232 -0
  261. package/dist/src/ui/hooks/useGeminiStream.subagent.spec.js.map +1 -0
  262. package/dist/src/ui/hooks/useLoadProfileDialog.d.ts +1 -1
  263. package/dist/src/ui/hooks/useLoadProfileDialog.js +18 -57
  264. package/dist/src/ui/hooks/useLoadProfileDialog.js.map +1 -1
  265. package/dist/src/ui/hooks/useOpenAIProviderInfo.d.ts +1 -1
  266. package/dist/src/ui/hooks/useOpenAIProviderInfo.js +12 -7
  267. package/dist/src/ui/hooks/useOpenAIProviderInfo.js.map +1 -1
  268. package/dist/src/ui/hooks/useProviderDialog.d.ts +1 -1
  269. package/dist/src/ui/hooks/useProviderDialog.js +17 -90
  270. package/dist/src/ui/hooks/useProviderDialog.js.map +1 -1
  271. package/dist/src/ui/hooks/useProviderModelDialog.d.ts +2 -2
  272. package/dist/src/ui/hooks/useProviderModelDialog.js +11 -12
  273. package/dist/src/ui/hooks/useProviderModelDialog.js.map +1 -1
  274. package/dist/src/ui/hooks/useReactToolScheduler.d.ts +3 -1
  275. package/dist/src/ui/hooks/useReactToolScheduler.js +144 -34
  276. package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
  277. package/dist/src/ui/hooks/useSlashCompletion.d.ts +32 -0
  278. package/dist/src/ui/hooks/useSlashCompletion.js +154 -77
  279. package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -1
  280. package/dist/src/ui/hooks/useSlashCompletion.test.js +39 -14
  281. package/dist/src/ui/hooks/useSlashCompletion.test.js.map +1 -1
  282. package/dist/src/ui/hooks/useToolScheduler.test.js +108 -79
  283. package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
  284. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +1 -1
  285. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -1
  286. package/dist/src/ui/types.d.ts +5 -0
  287. package/dist/src/ui/types.js.map +1 -1
  288. package/dist/src/ui/utils/MarkdownDisplay.test.js +16 -0
  289. package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -1
  290. package/dist/src/ui/utils/TableRenderer.js +213 -40
  291. package/dist/src/ui/utils/TableRenderer.js.map +1 -1
  292. package/dist/src/utils/sandbox.js +1 -1
  293. package/dist/src/utils/sandbox.js.map +1 -1
  294. package/dist/src/validateNonInterActiveAuth.js +4 -2
  295. package/dist/src/validateNonInterActiveAuth.js.map +1 -1
  296. package/dist/src/zed-integration/schema.d.ts +30 -30
  297. package/dist/src/zed-integration/zedIntegration.js +112 -39
  298. package/dist/src/zed-integration/zedIntegration.js.map +1 -1
  299. package/dist/tsconfig.build.tsbuildinfo +1 -0
  300. package/package.json +7 -5
  301. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,249 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Vybestack LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * @plan PLAN-20251027-STATELESS5.P08
8
+ * @requirement REQ-STAT5-002
9
+ * @pseudocode cli-runtime-adapter.md lines 44-688
10
+ *
11
+ * CLI Runtime Adapter - bridges CLI commands and AgentRuntimeState abstraction.
12
+ * Phase 08: GREEN implementation to make all TDD tests pass.
13
+ */
14
+ import type { Config, AgentRuntimeState, RuntimeStateParams, RuntimeStateSnapshot } from '@vybestack/llxprt-code-core';
15
+ import { AuthType } from '@vybestack/llxprt-code-core';
16
+ /**
17
+ * @plan PLAN-20251027-STATELESS5.P08
18
+ * @requirement REQ-STAT5-002.1
19
+ * @pseudocode cli-runtime-adapter.md lines 51-88
20
+ *
21
+ * AgentRuntimeAdapter manages the foreground agent runtime state and provides
22
+ * a stable API for CLI commands and helpers. It bridges AgentRuntimeState with
23
+ * legacy Config for UI compatibility during the migration.
24
+ */
25
+ export declare class AgentRuntimeAdapter {
26
+ /**
27
+ * @plan PLAN-20251027-STATELESS5.P08
28
+ * @requirement REQ-STAT5-002.1
29
+ * @pseudocode cli-runtime-adapter.md lines 52-54
30
+ */
31
+ private runtimeState;
32
+ private legacyConfig;
33
+ private runtimeId;
34
+ private unsubscribe;
35
+ /**
36
+ * @plan PLAN-20251027-STATELESS5.P08
37
+ * @requirement REQ-STAT5-002.1
38
+ * @pseudocode cli-runtime-adapter.md lines 56-75
39
+ *
40
+ * Creates a new adapter instance.
41
+ */
42
+ constructor(initialState: AgentRuntimeState, legacyConfig: Config);
43
+ /**
44
+ * @plan PLAN-20251027-STATELESS5.P08
45
+ * @requirement REQ-STAT5-002.3
46
+ * @pseudocode cli-runtime-adapter.md lines 76-87
47
+ *
48
+ * Handles runtime state change events.
49
+ */
50
+ private handleStateChange;
51
+ /**
52
+ * @plan PLAN-20251027-STATELESS5.P08
53
+ * @requirement REQ-STAT5-002.1
54
+ * @pseudocode cli-runtime-adapter.md lines 199-203
55
+ *
56
+ * Returns the current provider name.
57
+ */
58
+ getProvider(): string;
59
+ /**
60
+ * @plan PLAN-20251027-STATELESS5.P08
61
+ * @requirement REQ-STAT5-002.1
62
+ * @pseudocode cli-runtime-adapter.md lines 205-206
63
+ *
64
+ * Returns the current model name.
65
+ */
66
+ getModel(): string;
67
+ /**
68
+ * @plan PLAN-20251027-STATELESS5.P08
69
+ * @requirement REQ-STAT5-002.1
70
+ * @pseudocode cli-runtime-adapter.md lines 208-209
71
+ *
72
+ * Returns the current auth type.
73
+ */
74
+ getAuthType(): AuthType;
75
+ /**
76
+ * @plan PLAN-20251027-STATELESS5.P08
77
+ * @requirement REQ-STAT5-002.1
78
+ * @pseudocode cli-runtime-adapter.md lines 211-212
79
+ *
80
+ * Returns the current session ID.
81
+ */
82
+ getSessionId(): string;
83
+ /**
84
+ * @plan PLAN-20251027-STATELESS5.P08
85
+ * @requirement REQ-STAT5-002.1
86
+ * @pseudocode cli-runtime-adapter.md lines 214-215
87
+ *
88
+ * Returns the current base URL.
89
+ */
90
+ getBaseUrl(): string | undefined;
91
+ /**
92
+ * @plan PLAN-20251027-STATELESS5.P08
93
+ * @requirement REQ-STAT5-002.1
94
+ * @pseudocode cli-runtime-adapter.md lines 217-218
95
+ *
96
+ * Returns the current runtime state.
97
+ */
98
+ getRuntimeState(): AgentRuntimeState;
99
+ /**
100
+ * @plan PLAN-20251027-STATELESS5.P08
101
+ * @requirement REQ-STAT5-001.3
102
+ * @pseudocode cli-runtime-adapter.md lines 220-221
103
+ *
104
+ * Returns a sanitized snapshot for diagnostics.
105
+ */
106
+ getSnapshot(): RuntimeStateSnapshot;
107
+ /**
108
+ * @plan PLAN-20251027-STATELESS5.P08
109
+ * @requirement REQ-STAT5-002.1
110
+ * @requirement REQ-STAT5-002.3
111
+ * @pseudocode cli-runtime-adapter.md lines 227-249
112
+ *
113
+ * Sets the provider and updates default model.
114
+ */
115
+ setProvider(providerName: string): void;
116
+ /**
117
+ * @plan PLAN-20251027-STATELESS5.P08
118
+ * @requirement REQ-STAT5-002.1
119
+ * @requirement REQ-STAT5-002.3
120
+ * @pseudocode cli-runtime-adapter.md lines 250-256
121
+ *
122
+ * Sets the model name.
123
+ */
124
+ setModel(modelName: string): void;
125
+ /**
126
+ * @plan PLAN-20251027-STATELESS5.P08
127
+ * @requirement REQ-STAT5-002.1
128
+ * @requirement REQ-STAT5-002.3
129
+ * @pseudocode cli-runtime-adapter.md lines 258-264
130
+ *
131
+ * Sets the auth type.
132
+ */
133
+ setAuthType(authType: AuthType): void;
134
+ /**
135
+ * @plan PLAN-20251027-STATELESS5.P08
136
+ * @requirement REQ-STAT5-002.1
137
+ * @requirement REQ-STAT5-002.3
138
+ * @pseudocode cli-runtime-adapter.md lines 266-272
139
+ *
140
+ * Sets the base URL.
141
+ */
142
+ setBaseUrl(baseUrl: string): void;
143
+ /**
144
+ * @plan PLAN-20251027-STATELESS5.P08
145
+ * @requirement REQ-STAT5-002.1
146
+ * @requirement REQ-STAT5-002.3
147
+ * @pseudocode cli-runtime-adapter.md lines 280-316
148
+ *
149
+ * Atomically switches provider with optional model and settings.
150
+ */
151
+ switchProvider(providerName: string, options?: {
152
+ model?: string;
153
+ clearSettings?: boolean;
154
+ }): void;
155
+ /**
156
+ * @plan PLAN-20251027-STATELESS5.P08
157
+ * @requirement REQ-STAT5-002.3
158
+ * @pseudocode cli-runtime-adapter.md lines 329-351
159
+ *
160
+ * Mirrors runtime state to legacy Config for UI compatibility.
161
+ */
162
+ private mirrorStateToConfig;
163
+ /**
164
+ * @plan PLAN-20251027-STATELESS5.P08
165
+ * @requirement REQ-STAT5-002.1
166
+ * @pseudocode cli-runtime-adapter.md lines 597-609
167
+ *
168
+ * Cleans up adapter resources and unsubscribes from events.
169
+ */
170
+ dispose(): void;
171
+ }
172
+ /**
173
+ * @plan PLAN-20251027-STATELESS5.P08
174
+ * @requirement REQ-STAT5-002.1
175
+ * @pseudocode cli-runtime-adapter.md lines 366-376
176
+ *
177
+ * Sets the global runtime adapter (called during CLI bootstrap).
178
+ */
179
+ export declare function setRuntimeAdapter(adapter: AgentRuntimeAdapter): void;
180
+ /**
181
+ * @plan PLAN-20251027-STATELESS5.P08
182
+ * @requirement REQ-STAT5-002.1
183
+ * @pseudocode cli-runtime-adapter.md lines 366-376
184
+ *
185
+ * Gets the global runtime adapter (used by CLI helpers).
186
+ */
187
+ export declare function getRuntimeAdapter(): AgentRuntimeAdapter;
188
+ /**
189
+ * @plan PLAN-20251027-STATELESS5.P08
190
+ * @requirement REQ-STAT5-002.1
191
+ *
192
+ * Resets the global runtime adapter (for testing).
193
+ */
194
+ export declare function resetRuntimeAdapter(): void;
195
+ /**
196
+ * @plan PLAN-20251027-STATELESS5.P08
197
+ * @requirement REQ-STAT5-002.2
198
+ * @pseudocode cli-runtime-adapter.md lines 101-132
199
+ *
200
+ * CLI flags for runtime state initialization.
201
+ */
202
+ export interface CliFlags {
203
+ provider?: string;
204
+ model?: string;
205
+ key?: string;
206
+ keyfile?: string;
207
+ set?: Array<[string, string]>;
208
+ profileLoad?: string;
209
+ [key: string]: unknown;
210
+ }
211
+ /**
212
+ * @plan PLAN-20251027-STATELESS5.P08
213
+ * @requirement REQ-STAT5-002.2
214
+ * @pseudocode cli-runtime-adapter.md lines 138-186
215
+ *
216
+ * Resolves runtime state parameters from CLI flags and config.
217
+ */
218
+ export declare function resolveRuntimeStateFromFlags(flags: CliFlags, config: Config): RuntimeStateParams;
219
+ /**
220
+ * @plan PLAN-20251027-STATELESS5.P08
221
+ * @requirement REQ-STAT5-002.2
222
+ * @pseudocode cli-runtime-adapter.md lines 101-132
223
+ *
224
+ * Bootstrap result containing adapter and client.
225
+ */
226
+ export interface BootstrapResult {
227
+ adapter: AgentRuntimeAdapter;
228
+ client: unknown;
229
+ }
230
+ /**
231
+ * @plan PLAN-20251027-STATELESS5.P08
232
+ * @requirement REQ-STAT5-002.2
233
+ * @pseudocode cli-runtime-adapter.md lines 101-132
234
+ *
235
+ * Bootstraps the foreground agent runtime from CLI flags.
236
+ */
237
+ export declare function bootstrapForegroundAgent(cliFlags: CliFlags, config: Config): Promise<BootstrapResult>;
238
+ /**
239
+ * @plan PLAN-20251027-STATELESS5.P08
240
+ * @requirement REQ-STAT5-002.1
241
+ * @pseudocode cli-runtime-adapter.md lines 378-398
242
+ *
243
+ * Legacy helper functions that delegate to the global adapter.
244
+ */
245
+ export declare function setRuntimeProvider(providerName: string): void;
246
+ export declare function getRuntimeProvider(): string;
247
+ export declare function setRuntimeModel(modelName: string): void;
248
+ export declare function getRuntimeModel(): string;
249
+ export declare function switchRuntimeProvider(providerName: string, model?: string): void;