@downcity/agent 1.1.287 → 1.1.310

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 (1045) hide show
  1. package/README.md +23 -16
  2. package/bin/agent/Agent.d.ts +35 -45
  3. package/bin/agent/Agent.d.ts.map +1 -1
  4. package/bin/agent/Agent.js +131 -107
  5. package/bin/agent/Agent.js.map +1 -1
  6. package/bin/agent/AgentInstructions.d.ts +2 -2
  7. package/bin/agent/AgentInstructions.d.ts.map +1 -1
  8. package/bin/agent/AgentInstructions.js +2 -2
  9. package/bin/agent/AgentInstructions.js.map +1 -1
  10. package/bin/agent/AgentModel.d.ts +2 -2
  11. package/bin/agent/AgentModel.d.ts.map +1 -1
  12. package/bin/agent/AgentModel.js +2 -2
  13. package/bin/agent/AgentModel.js.map +1 -1
  14. package/bin/agent/AgentSessions.d.ts +11 -7
  15. package/bin/agent/AgentSessions.d.ts.map +1 -1
  16. package/bin/agent/AgentSessions.js +39 -97
  17. package/bin/agent/AgentSessions.js.map +1 -1
  18. package/bin/agent/AgentState.d.ts +2 -21
  19. package/bin/agent/AgentState.d.ts.map +1 -1
  20. package/bin/agent/AgentState.js +6 -50
  21. package/bin/agent/AgentState.js.map +1 -1
  22. package/bin/executor/Executor.d.ts +25 -55
  23. package/bin/executor/Executor.d.ts.map +1 -1
  24. package/bin/executor/Executor.js +93 -178
  25. package/bin/executor/Executor.js.map +1 -1
  26. package/bin/executor/composer/system/SessionSystemComposer.d.ts +2 -2
  27. package/bin/executor/composer/system/SessionSystemComposer.d.ts.map +1 -1
  28. package/bin/executor/composer/system/default/DefaultSessionSystemComposer.d.ts +9 -9
  29. package/bin/executor/composer/system/default/DefaultSessionSystemComposer.d.ts.map +1 -1
  30. package/bin/executor/composer/system/default/DefaultSessionSystemComposer.js +19 -19
  31. package/bin/executor/composer/system/default/DefaultSessionSystemComposer.js.map +1 -1
  32. package/bin/executor/composer/system/default/PromptRenderer.d.ts +2 -2
  33. package/bin/executor/composer/system/default/PromptRenderer.d.ts.map +1 -1
  34. package/bin/executor/composer/system/default/PromptRenderer.js +3 -3
  35. package/bin/executor/composer/system/default/PromptRenderer.js.map +1 -1
  36. package/bin/executor/composer/system/default/SystemDomain.d.ts +27 -27
  37. package/bin/executor/composer/system/default/SystemDomain.d.ts.map +1 -1
  38. package/bin/executor/composer/system/default/SystemDomain.js +44 -44
  39. package/bin/executor/composer/system/default/SystemDomain.js.map +1 -1
  40. package/bin/executor/composer/system/default/assets/core.prompt.d.ts +1 -1
  41. package/bin/executor/composer/system/default/assets/core.prompt.d.ts.map +1 -1
  42. package/bin/executor/composer/system/default/assets/core.prompt.js +1 -1
  43. package/bin/executor/composer/system/default/assets/core.prompt.js.map +1 -1
  44. package/bin/executor/composer/system/default/variables/GeoContext.d.ts +1 -1
  45. package/bin/executor/composer/system/default/variables/GeoContext.d.ts.map +1 -1
  46. package/bin/executor/composer/system/default/variables/GeoContext.js +3 -3
  47. package/bin/executor/composer/system/default/variables/GeoContext.js.map +1 -1
  48. package/bin/executor/composer/system/default/variables/PromptTypes.d.ts +2 -2
  49. package/bin/executor/composer/system/default/variables/PromptTypes.d.ts.map +1 -1
  50. package/bin/executor/composer/system/default/variables/VariableReplacer.d.ts +4 -4
  51. package/bin/executor/composer/system/default/variables/VariableReplacer.d.ts.map +1 -1
  52. package/bin/executor/composer/system/default/variables/VariableReplacer.js +24 -24
  53. package/bin/executor/composer/system/default/variables/VariableReplacer.js.map +1 -1
  54. package/bin/executor/core-engine/CoreEngineError.d.ts +2 -2
  55. package/bin/executor/core-engine/CoreEngineError.d.ts.map +1 -1
  56. package/bin/executor/core-engine/CoreEngineError.js +2 -2
  57. package/bin/executor/core-engine/CoreEngineError.js.map +1 -1
  58. package/bin/executor/core-engine/CoreEngineLoopDecision.d.ts +2 -2
  59. package/bin/executor/core-engine/CoreEngineLoopDecision.d.ts.map +1 -1
  60. package/bin/executor/core-engine/CoreEngineLoopDecision.js +2 -2
  61. package/bin/executor/core-engine/CoreEngineLoopDecision.js.map +1 -1
  62. package/bin/executor/core-engine/CoreEngineMessageState.d.ts +2 -2
  63. package/bin/executor/core-engine/CoreEngineMessageState.d.ts.map +1 -1
  64. package/bin/executor/core-engine/CoreEngineMessageState.js +9 -9
  65. package/bin/executor/core-engine/CoreEngineMessageState.js.map +1 -1
  66. package/bin/executor/core-engine/CoreEngineRunner.d.ts +8 -8
  67. package/bin/executor/core-engine/CoreEngineRunner.d.ts.map +1 -1
  68. package/bin/executor/core-engine/CoreEngineRunner.js +94 -108
  69. package/bin/executor/core-engine/CoreEngineRunner.js.map +1 -1
  70. package/bin/executor/core-engine/CoreEngineSignals.d.ts +10 -10
  71. package/bin/executor/core-engine/CoreEngineSignals.d.ts.map +1 -1
  72. package/bin/executor/core-engine/CoreEngineSignals.js +19 -19
  73. package/bin/executor/core-engine/CoreEngineSignals.js.map +1 -1
  74. package/bin/executor/core-engine/CoreEngineUiStreamCollector.d.ts +6 -6
  75. package/bin/executor/core-engine/CoreEngineUiStreamCollector.d.ts.map +1 -1
  76. package/bin/executor/core-engine/CoreEngineUiStreamCollector.js +12 -12
  77. package/bin/executor/core-engine/CoreEngineUiStreamCollector.js.map +1 -1
  78. package/bin/executor/ids/resolveSessionId.d.ts +4 -4
  79. package/bin/executor/ids/resolveSessionId.d.ts.map +1 -1
  80. package/bin/executor/ids/resolveSessionId.js +4 -4
  81. package/bin/executor/ids/resolveSessionId.js.map +1 -1
  82. package/bin/executor/messages/ChatMessageMarkup.d.ts +10 -10
  83. package/bin/executor/messages/ChatMessageMarkup.d.ts.map +1 -1
  84. package/bin/executor/messages/ChatMessageMarkup.js +22 -22
  85. package/bin/executor/messages/ChatMessageMarkup.js.map +1 -1
  86. package/bin/executor/messages/ChatMessageMarkupTypes.d.ts +10 -10
  87. package/bin/executor/messages/ChatMessageMarkupTypes.d.ts.map +1 -1
  88. package/bin/executor/messages/SessionAttachmentMapper.d.ts +4 -4
  89. package/bin/executor/messages/SessionAttachmentMapper.d.ts.map +1 -1
  90. package/bin/executor/messages/SessionAttachmentMapper.js +12 -12
  91. package/bin/executor/messages/SessionAttachmentMapper.js.map +1 -1
  92. package/bin/executor/messages/SessionMessageCodec.d.ts +5 -5
  93. package/bin/executor/messages/SessionMessageCodec.d.ts.map +1 -1
  94. package/bin/executor/messages/SessionMessageCodec.js +12 -22
  95. package/bin/executor/messages/SessionMessageCodec.js.map +1 -1
  96. package/bin/executor/messages/SessionMessageLog.d.ts +2 -2
  97. package/bin/executor/messages/SessionMessageLog.d.ts.map +1 -1
  98. package/bin/executor/messages/SessionMessageLog.js +3 -3
  99. package/bin/executor/messages/SessionMessageLog.js.map +1 -1
  100. package/bin/executor/messages/SessionStepEventMapper.d.ts +4 -4
  101. package/bin/executor/messages/SessionStepEventMapper.d.ts.map +1 -1
  102. package/bin/executor/messages/SessionStepEventMapper.js +7 -7
  103. package/bin/executor/messages/SessionStepEventMapper.js.map +1 -1
  104. package/bin/executor/messages/UIMessageTransformer.d.ts +3 -3
  105. package/bin/executor/messages/UIMessageTransformer.d.ts.map +1 -1
  106. package/bin/executor/messages/UIMessageTransformer.js +6 -6
  107. package/bin/executor/messages/UIMessageTransformer.js.map +1 -1
  108. package/bin/executor/messages/UserVisibleText.d.ts +2 -2
  109. package/bin/executor/messages/UserVisibleText.d.ts.map +1 -1
  110. package/bin/executor/messages/UserVisibleText.js +5 -5
  111. package/bin/executor/messages/UserVisibleText.js.map +1 -1
  112. package/bin/executor/services/ExecutorRecoveryPolicy.d.ts +15 -15
  113. package/bin/executor/services/ExecutorRecoveryPolicy.d.ts.map +1 -1
  114. package/bin/executor/services/ExecutorRecoveryPolicy.js +13 -12
  115. package/bin/executor/services/ExecutorRecoveryPolicy.js.map +1 -1
  116. package/bin/executor/types/SessionHistoryMeta.d.ts +10 -10
  117. package/bin/executor/types/SessionHistoryMeta.d.ts.map +1 -1
  118. package/bin/executor/types/SessionHistoryMeta.js +1 -1
  119. package/bin/executor/types/SessionRecords.d.ts +9 -9
  120. package/bin/executor/types/SessionRecords.d.ts.map +1 -1
  121. package/bin/executor/types/SessionRecords.js +4 -4
  122. package/bin/executor/types/SessionRecords.js.map +1 -1
  123. package/bin/index.d.ts +41 -55
  124. package/bin/index.d.ts.map +1 -1
  125. package/bin/index.js +24 -31
  126. package/bin/index.js.map +1 -1
  127. package/bin/plugin/core/ActionScheduleExecutor.d.ts +4 -4
  128. package/bin/plugin/core/ActionScheduleExecutor.d.ts.map +1 -1
  129. package/bin/plugin/core/ActionScheduleExecutor.js +18 -20
  130. package/bin/plugin/core/ActionScheduleExecutor.js.map +1 -1
  131. package/bin/plugin/core/ActionScheduleRuntime.d.ts +2 -2
  132. package/bin/plugin/core/ActionScheduleRuntime.d.ts.map +1 -1
  133. package/bin/plugin/core/ActionScheduleRuntime.js +6 -6
  134. package/bin/plugin/core/ActionScheduleRuntime.js.map +1 -1
  135. package/bin/plugin/core/ActionScheduleStore.d.ts +23 -22
  136. package/bin/plugin/core/ActionScheduleStore.d.ts.map +1 -1
  137. package/bin/plugin/core/ActionScheduleStore.js +120 -117
  138. package/bin/plugin/core/ActionScheduleStore.js.map +1 -1
  139. package/bin/plugin/core/ActionScheduleTime.d.ts +5 -5
  140. package/bin/plugin/core/ActionScheduleTime.d.ts.map +1 -1
  141. package/bin/plugin/core/ActionScheduleTime.js +6 -6
  142. package/bin/plugin/core/ActionScheduleTime.js.map +1 -1
  143. package/bin/plugin/core/BasePlugin.d.ts +6 -20
  144. package/bin/plugin/core/BasePlugin.d.ts.map +1 -1
  145. package/bin/plugin/core/BasePlugin.js +0 -12
  146. package/bin/plugin/core/BasePlugin.js.map +1 -1
  147. package/bin/plugin/core/HookRegistry.d.ts +11 -11
  148. package/bin/plugin/core/HookRegistry.d.ts.map +1 -1
  149. package/bin/plugin/core/HookRegistry.js +45 -45
  150. package/bin/plugin/core/HookRegistry.js.map +1 -1
  151. package/bin/plugin/core/PluginActionFactory.d.ts +18 -26
  152. package/bin/plugin/core/PluginActionFactory.d.ts.map +1 -1
  153. package/bin/plugin/core/PluginActionFactory.js +5 -8
  154. package/bin/plugin/core/PluginActionFactory.js.map +1 -1
  155. package/bin/plugin/core/PluginActionRunner.d.ts +15 -33
  156. package/bin/plugin/core/PluginActionRunner.d.ts.map +1 -1
  157. package/bin/plugin/core/PluginActionRunner.js +11 -147
  158. package/bin/plugin/core/PluginActionRunner.js.map +1 -1
  159. package/bin/plugin/core/PluginCatalog.d.ts +12 -12
  160. package/bin/plugin/core/PluginCatalog.d.ts.map +1 -1
  161. package/bin/plugin/core/PluginCatalog.js +18 -18
  162. package/bin/plugin/core/PluginCatalog.js.map +1 -1
  163. package/bin/plugin/core/PluginContext.d.ts +32 -0
  164. package/bin/plugin/core/PluginContext.d.ts.map +1 -0
  165. package/bin/plugin/core/PluginContext.js +26 -0
  166. package/bin/plugin/core/PluginContext.js.map +1 -0
  167. package/bin/plugin/core/PluginHttpRoutes.d.ts +5 -5
  168. package/bin/plugin/core/PluginHttpRoutes.d.ts.map +1 -1
  169. package/bin/plugin/core/PluginHttpRoutes.js +5 -5
  170. package/bin/plugin/core/PluginHttpRoutes.js.map +1 -1
  171. package/bin/plugin/core/PluginRegistry.d.ts +35 -24
  172. package/bin/plugin/core/PluginRegistry.d.ts.map +1 -1
  173. package/bin/plugin/core/PluginRegistry.js +99 -71
  174. package/bin/plugin/core/PluginRegistry.js.map +1 -1
  175. package/bin/plugin/core/PluginStateController.d.ts +5 -13
  176. package/bin/plugin/core/PluginStateController.d.ts.map +1 -1
  177. package/bin/plugin/core/PluginStateController.js +2 -32
  178. package/bin/plugin/core/PluginStateController.js.map +1 -1
  179. package/bin/plugin/tool/PluginToolRuntime.d.ts +15 -0
  180. package/bin/plugin/tool/PluginToolRuntime.d.ts.map +1 -0
  181. package/bin/plugin/tool/PluginToolRuntime.js +105 -0
  182. package/bin/plugin/tool/PluginToolRuntime.js.map +1 -0
  183. package/bin/{executor/tools/plugin → plugin/tool}/PluginToolSchemas.d.ts +1 -1
  184. package/bin/plugin/tool/PluginToolSchemas.d.ts.map +1 -0
  185. package/bin/{executor/tools/plugin → plugin/tool}/PluginToolSchemas.js +1 -1
  186. package/bin/plugin/tool/PluginToolSchemas.js.map +1 -0
  187. package/bin/plugin/tool/PluginTools.d.ts +25 -0
  188. package/bin/plugin/tool/PluginTools.d.ts.map +1 -0
  189. package/bin/{executor/tools/plugin/PluginToolDefinition.js → plugin/tool/PluginTools.js} +19 -19
  190. package/bin/plugin/tool/PluginTools.js.map +1 -0
  191. package/bin/plugin/types/ActionSchedule.d.ts +10 -10
  192. package/bin/plugin/types/ActionSchedule.d.ts.map +1 -1
  193. package/bin/plugin/types/ActionSchedule.js +1 -1
  194. package/bin/plugin/types/PluginApi.d.ts +3 -3
  195. package/bin/plugin/types/PluginApi.d.ts.map +1 -1
  196. package/bin/remote/RemoteAgent.d.ts +1 -1
  197. package/bin/remote/RemoteAgent.d.ts.map +1 -1
  198. package/bin/remote/RemoteAgent.js +3 -3
  199. package/bin/remote/RemoteAgent.js.map +1 -1
  200. package/bin/remote/RemoteSession.d.ts +18 -12
  201. package/bin/remote/RemoteSession.d.ts.map +1 -1
  202. package/bin/remote/RemoteSession.js +87 -21
  203. package/bin/remote/RemoteSession.js.map +1 -1
  204. package/bin/remote/RemoteTransport.d.ts +13 -11
  205. package/bin/remote/RemoteTransport.d.ts.map +1 -1
  206. package/bin/remote/transports/HttpRemoteAgentTransport.d.ts +9 -7
  207. package/bin/remote/transports/HttpRemoteAgentTransport.d.ts.map +1 -1
  208. package/bin/remote/transports/HttpRemoteAgentTransport.js +36 -39
  209. package/bin/remote/transports/HttpRemoteAgentTransport.js.map +1 -1
  210. package/bin/remote/transports/RpcClient.d.ts +14 -31
  211. package/bin/remote/transports/RpcClient.d.ts.map +1 -1
  212. package/bin/remote/transports/RpcClient.js +40 -66
  213. package/bin/remote/transports/RpcClient.js.map +1 -1
  214. package/bin/remote/transports/RpcRemoteAgentTransport.d.ts +9 -7
  215. package/bin/remote/transports/RpcRemoteAgentTransport.d.ts.map +1 -1
  216. package/bin/remote/transports/RpcRemoteAgentTransport.js +10 -10
  217. package/bin/remote/transports/RpcRemoteAgentTransport.js.map +1 -1
  218. package/bin/session/DefaultSessionComposer.d.ts.map +1 -1
  219. package/bin/session/DefaultSessionComposer.js +2 -4
  220. package/bin/session/DefaultSessionComposer.js.map +1 -1
  221. package/bin/session/Session.d.ts +49 -31
  222. package/bin/session/Session.d.ts.map +1 -1
  223. package/bin/session/Session.js +303 -243
  224. package/bin/session/Session.js.map +1 -1
  225. package/bin/session/SessionCommand.d.ts +24 -0
  226. package/bin/session/SessionCommand.d.ts.map +1 -0
  227. package/bin/session/SessionCommand.js +35 -0
  228. package/bin/session/SessionCommand.js.map +1 -0
  229. package/bin/session/SessionLoop.d.ts +96 -0
  230. package/bin/session/SessionLoop.d.ts.map +1 -0
  231. package/bin/session/SessionLoop.js +554 -0
  232. package/bin/session/SessionLoop.js.map +1 -0
  233. package/bin/session/SessionMessages.d.ts +20 -16
  234. package/bin/session/SessionMessages.d.ts.map +1 -1
  235. package/bin/session/SessionMessages.js +102 -81
  236. package/bin/session/SessionMessages.js.map +1 -1
  237. package/bin/session/SessionQueue.d.ts +15 -25
  238. package/bin/session/SessionQueue.d.ts.map +1 -1
  239. package/bin/session/SessionQueue.js +31 -45
  240. package/bin/session/SessionQueue.js.map +1 -1
  241. package/bin/session/SessionState.d.ts +6 -6
  242. package/bin/session/SessionState.d.ts.map +1 -1
  243. package/bin/session/SessionState.js +45 -93
  244. package/bin/session/SessionState.js.map +1 -1
  245. package/bin/session/SessionSystem.js +7 -7
  246. package/bin/session/SessionSystem.js.map +1 -1
  247. package/bin/session/SessionTitle.d.ts +7 -12
  248. package/bin/session/SessionTitle.d.ts.map +1 -1
  249. package/bin/session/SessionTitle.js +15 -20
  250. package/bin/session/SessionTitle.js.map +1 -1
  251. package/bin/session/browse/Browse.d.ts +17 -26
  252. package/bin/session/browse/Browse.d.ts.map +1 -1
  253. package/bin/session/browse/Browse.js +106 -303
  254. package/bin/session/browse/Browse.js.map +1 -1
  255. package/bin/session/browse/SessionMessageTimeline.d.ts +13 -0
  256. package/bin/session/browse/SessionMessageTimeline.d.ts.map +1 -0
  257. package/bin/session/browse/SessionMessageTimeline.js +110 -0
  258. package/bin/session/browse/SessionMessageTimeline.js.map +1 -0
  259. package/bin/session/control/SessionInteractions.d.ts +39 -0
  260. package/bin/session/control/SessionInteractions.d.ts.map +1 -0
  261. package/bin/session/control/SessionInteractions.js +219 -0
  262. package/bin/session/control/SessionInteractions.js.map +1 -0
  263. package/bin/session/execution/SessionAssistantOutputAdapter.d.ts +49 -0
  264. package/bin/session/execution/SessionAssistantOutputAdapter.d.ts.map +1 -0
  265. package/bin/session/execution/SessionAssistantOutputAdapter.js +117 -0
  266. package/bin/session/execution/SessionAssistantOutputAdapter.js.map +1 -0
  267. package/bin/session/execution/tools/SessionShellApprovalAdapter.d.ts +28 -0
  268. package/bin/session/execution/tools/SessionShellApprovalAdapter.d.ts.map +1 -0
  269. package/bin/session/execution/tools/SessionShellApprovalAdapter.js +75 -0
  270. package/bin/session/execution/tools/SessionShellApprovalAdapter.js.map +1 -0
  271. package/bin/session/messages/SessionAssistantMessageWriter.d.ts +6 -4
  272. package/bin/session/messages/SessionAssistantMessageWriter.d.ts.map +1 -1
  273. package/bin/session/messages/SessionAssistantMessageWriter.js +34 -18
  274. package/bin/session/messages/SessionAssistantMessageWriter.js.map +1 -1
  275. package/bin/session/messages/SessionJsonValue.d.ts +2 -2
  276. package/bin/session/messages/SessionJsonValue.d.ts.map +1 -1
  277. package/bin/session/messages/SessionJsonValue.js.map +1 -1
  278. package/bin/session/messages/SessionMessageCodec.d.ts.map +1 -1
  279. package/bin/session/messages/SessionMessageCodec.js +30 -84
  280. package/bin/session/messages/SessionMessageCodec.js.map +1 -1
  281. package/bin/session/messages/SessionMessageCompaction.js +2 -2
  282. package/bin/session/messages/SessionMessageCompaction.js.map +1 -1
  283. package/bin/session/messages/SessionMessageInteractionWriter.d.ts +51 -0
  284. package/bin/session/messages/SessionMessageInteractionWriter.d.ts.map +1 -0
  285. package/bin/session/messages/SessionMessageInteractionWriter.js +177 -0
  286. package/bin/session/messages/SessionMessageInteractionWriter.js.map +1 -0
  287. package/bin/session/preview/SessionMessagePreview.js +2 -2
  288. package/bin/session/preview/SessionMessagePreview.js.map +1 -1
  289. package/bin/session/runtime/SessionCompactOperation.d.ts +29 -0
  290. package/bin/session/runtime/SessionCompactOperation.d.ts.map +1 -0
  291. package/bin/session/runtime/SessionCompactOperation.js +66 -0
  292. package/bin/session/runtime/SessionCompactOperation.js.map +1 -0
  293. package/bin/session/runtime/SessionHistoryCompaction.d.ts +22 -0
  294. package/bin/session/runtime/SessionHistoryCompaction.d.ts.map +1 -0
  295. package/bin/session/runtime/SessionHistoryCompaction.js +31 -0
  296. package/bin/session/runtime/SessionHistoryCompaction.js.map +1 -0
  297. package/bin/session/runtime/SessionTurnContext.d.ts +26 -0
  298. package/bin/session/runtime/SessionTurnContext.d.ts.map +1 -0
  299. package/bin/session/runtime/SessionTurnContext.js +181 -0
  300. package/bin/session/runtime/SessionTurnContext.js.map +1 -0
  301. package/bin/session/storage/Metadata.d.ts +13 -70
  302. package/bin/session/storage/Metadata.d.ts.map +1 -1
  303. package/bin/session/storage/Metadata.js +31 -116
  304. package/bin/session/storage/Metadata.js.map +1 -1
  305. package/bin/session/storage/RuntimeSessionPort.d.ts +7 -7
  306. package/bin/session/storage/RuntimeSessionPort.d.ts.map +1 -1
  307. package/bin/session/storage/RuntimeSessionPort.js +7 -7
  308. package/bin/session/storage/RuntimeSessionPort.js.map +1 -1
  309. package/bin/tools/ask/AskQuestionsTool.d.ts +39 -0
  310. package/bin/tools/ask/AskQuestionsTool.d.ts.map +1 -0
  311. package/bin/tools/ask/AskQuestionsTool.js +67 -0
  312. package/bin/tools/ask/AskQuestionsTool.js.map +1 -0
  313. package/bin/tools/ask/AskQuestionsToolSchemas.d.ts +29 -0
  314. package/bin/tools/ask/AskQuestionsToolSchemas.d.ts.map +1 -0
  315. package/bin/tools/ask/AskQuestionsToolSchemas.js +51 -0
  316. package/bin/tools/ask/AskQuestionsToolSchemas.js.map +1 -0
  317. package/bin/tools/index.d.ts +9 -0
  318. package/bin/tools/index.d.ts.map +1 -0
  319. package/bin/tools/index.js +8 -0
  320. package/bin/tools/index.js.map +1 -0
  321. package/bin/types/action/ActionResult.d.ts +26 -0
  322. package/bin/types/action/ActionResult.d.ts.map +1 -0
  323. package/bin/types/action/ActionResult.js +17 -0
  324. package/bin/types/action/ActionResult.js.map +1 -0
  325. package/bin/types/agent/AgentOptions.d.ts +13 -23
  326. package/bin/types/agent/AgentOptions.d.ts.map +1 -1
  327. package/bin/types/agent/AgentState.d.ts +4 -13
  328. package/bin/types/agent/AgentState.d.ts.map +1 -1
  329. package/bin/types/agent/AgentState.js +2 -2
  330. package/bin/types/agent/RemoteAgentPluginAction.d.ts +2 -2
  331. package/bin/types/agent/RemoteAgentPluginAction.d.ts.map +1 -1
  332. package/bin/types/agent/SessionActor.d.ts +16 -15
  333. package/bin/types/agent/SessionActor.d.ts.map +1 -1
  334. package/bin/types/agent/SessionTypes.d.ts +69 -91
  335. package/bin/types/agent/SessionTypes.d.ts.map +1 -1
  336. package/bin/types/executor/SessionAssistantOutput.d.ts +34 -0
  337. package/bin/types/executor/SessionAssistantOutput.d.ts.map +1 -0
  338. package/bin/types/executor/SessionAssistantOutput.js +8 -0
  339. package/bin/types/executor/SessionAssistantOutput.js.map +1 -0
  340. package/bin/types/executor/SessionToolExecutionContext.d.ts +5 -5
  341. package/bin/types/executor/SessionToolExecutionContext.d.ts.map +1 -1
  342. package/bin/types/executor/SessionToolExecutionContext.js +2 -2
  343. package/bin/types/executor/SessionTurnContext.d.ts +125 -0
  344. package/bin/types/executor/SessionTurnContext.d.ts.map +1 -0
  345. package/bin/types/executor/SessionTurnContext.js +10 -0
  346. package/bin/types/executor/SessionTurnContext.js.map +1 -0
  347. package/bin/types/plugin/PluginAction.d.ts +13 -10
  348. package/bin/types/plugin/PluginAction.d.ts.map +1 -1
  349. package/bin/types/plugin/PluginCommand.d.ts +8 -65
  350. package/bin/types/plugin/PluginCommand.d.ts.map +1 -1
  351. package/bin/types/plugin/PluginCommand.js +2 -4
  352. package/bin/types/plugin/PluginCommand.js.map +1 -1
  353. package/bin/types/plugin/PluginContext.d.ts +34 -0
  354. package/bin/types/plugin/PluginContext.d.ts.map +1 -0
  355. package/bin/types/plugin/PluginContext.js +9 -0
  356. package/bin/types/plugin/PluginContext.js.map +1 -0
  357. package/bin/types/plugin/PluginDefinition.d.ts +8 -28
  358. package/bin/types/plugin/PluginDefinition.d.ts.map +1 -1
  359. package/bin/types/plugin/PluginDefinition.js +1 -1
  360. package/bin/types/plugin/PluginExecutionContext.d.ts +29 -0
  361. package/bin/types/plugin/PluginExecutionContext.d.ts.map +1 -0
  362. package/bin/types/plugin/{PluginRunContext.js → PluginExecutionContext.js} +2 -2
  363. package/bin/types/plugin/PluginExecutionContext.js.map +1 -0
  364. package/bin/types/plugin/PluginHttp.d.ts +5 -5
  365. package/bin/types/plugin/PluginHttp.d.ts.map +1 -1
  366. package/bin/types/plugin/PluginRegistry.d.ts +21 -0
  367. package/bin/types/plugin/PluginRegistry.d.ts.map +1 -0
  368. package/bin/types/plugin/PluginRegistry.js +9 -0
  369. package/bin/types/plugin/PluginRegistry.js.map +1 -0
  370. package/bin/types/plugin/PluginRuntime.d.ts +28 -40
  371. package/bin/types/plugin/PluginRuntime.d.ts.map +1 -1
  372. package/bin/types/plugin/PluginState.d.ts +0 -15
  373. package/bin/types/plugin/PluginState.d.ts.map +1 -1
  374. package/bin/types/plugin/PluginTool.d.ts +90 -0
  375. package/bin/types/plugin/PluginTool.d.ts.map +1 -0
  376. package/bin/types/plugin/PluginTool.js.map +1 -0
  377. package/bin/types/rpc/RpcProtocol.d.ts +50 -72
  378. package/bin/types/rpc/RpcProtocol.d.ts.map +1 -1
  379. package/bin/types/sdk/AgentSessionCompact.d.ts +31 -0
  380. package/bin/types/sdk/AgentSessionCompact.d.ts.map +1 -0
  381. package/bin/types/sdk/AgentSessionCompact.js +8 -0
  382. package/bin/types/sdk/AgentSessionCompact.js.map +1 -0
  383. package/bin/types/sdk/AgentSessionPrompt.d.ts +1 -1
  384. package/bin/types/sdk/AgentSessionPrompt.d.ts.map +1 -1
  385. package/bin/types/sdk/AgentSessionPrompt.js +1 -1
  386. package/bin/types/sdk/AgentSessionPrompt.js.map +1 -1
  387. package/bin/types/sdk/AgentSessionStop.d.ts +2 -2
  388. package/bin/types/sdk/AgentSessionStop.d.ts.map +1 -1
  389. package/bin/types/sdk/AgentSessionTurn.d.ts +3 -13
  390. package/bin/types/sdk/AgentSessionTurn.d.ts.map +1 -1
  391. package/bin/types/session/SessionCommand.d.ts +26 -0
  392. package/bin/types/session/SessionCommand.d.ts.map +1 -0
  393. package/bin/types/session/SessionCommand.js +7 -0
  394. package/bin/types/session/SessionCommand.js.map +1 -0
  395. package/bin/types/session/SessionComposer.d.ts +8 -4
  396. package/bin/types/session/SessionComposer.d.ts.map +1 -1
  397. package/bin/{executor/types/SessionRun.d.ts → types/session/SessionExecution.d.ts} +37 -33
  398. package/bin/types/session/SessionExecution.d.ts.map +1 -0
  399. package/bin/types/session/SessionExecution.js +10 -0
  400. package/bin/types/session/SessionExecution.js.map +1 -0
  401. package/bin/types/session/SessionInteraction.d.ts +165 -0
  402. package/bin/types/session/SessionInteraction.d.ts.map +1 -0
  403. package/bin/types/session/SessionInteraction.js +8 -0
  404. package/bin/types/session/SessionInteraction.js.map +1 -0
  405. package/bin/types/session/SessionInteractions.d.ts +17 -0
  406. package/bin/types/session/SessionInteractions.d.ts.map +1 -0
  407. package/bin/types/session/SessionInteractions.js +8 -0
  408. package/bin/types/session/SessionInteractions.js.map +1 -0
  409. package/bin/types/session/SessionLocalState.d.ts +1 -1
  410. package/bin/types/session/SessionLoop.d.ts +63 -0
  411. package/bin/types/session/SessionLoop.d.ts.map +1 -0
  412. package/bin/types/session/{SessionTurn.js → SessionLoop.js} +2 -2
  413. package/bin/types/session/SessionLoop.js.map +1 -0
  414. package/bin/types/session/SessionMessage.d.ts +37 -28
  415. package/bin/types/session/SessionMessage.d.ts.map +1 -1
  416. package/bin/types/session/SessionMessages.d.ts +2 -4
  417. package/bin/types/session/SessionMessages.d.ts.map +1 -1
  418. package/bin/types/session/SessionMutation.d.ts +19 -1
  419. package/bin/types/session/SessionMutation.d.ts.map +1 -1
  420. package/bin/types/session/SessionMutation.js +1 -0
  421. package/bin/types/session/SessionMutation.js.map +1 -1
  422. package/bin/types/session/SessionOptions.d.ts +34 -20
  423. package/bin/types/session/SessionOptions.d.ts.map +1 -1
  424. package/bin/types/session/SessionPort.d.ts +6 -19
  425. package/bin/types/session/SessionPort.d.ts.map +1 -1
  426. package/bin/types/session/SessionState.d.ts +3 -13
  427. package/bin/types/session/SessionState.d.ts.map +1 -1
  428. package/bin/types/store/AgentStore.d.ts +31 -0
  429. package/bin/types/store/AgentStore.d.ts.map +1 -0
  430. package/bin/types/store/AgentStore.js +9 -0
  431. package/bin/types/store/AgentStore.js.map +1 -0
  432. package/bin/types/store/LocalStore.d.ts +36 -0
  433. package/bin/types/store/LocalStore.d.ts.map +1 -0
  434. package/bin/types/store/LocalStore.js +9 -0
  435. package/bin/types/store/LocalStore.js.map +1 -0
  436. package/bin/types/store/SessionStore.d.ts +82 -0
  437. package/bin/types/store/SessionStore.d.ts.map +1 -0
  438. package/bin/types/store/SessionStore.js +9 -0
  439. package/bin/types/store/SessionStore.js.map +1 -0
  440. package/bin/types/tools/ask/AskQuestionsTool.d.ts +22 -0
  441. package/bin/types/tools/ask/AskQuestionsTool.d.ts.map +1 -0
  442. package/bin/types/tools/ask/AskQuestionsTool.js +8 -0
  443. package/bin/types/tools/ask/AskQuestionsTool.js.map +1 -0
  444. package/bin/types/workspace/FileSystem.d.ts +55 -0
  445. package/bin/types/workspace/FileSystem.d.ts.map +1 -0
  446. package/bin/types/workspace/FileSystem.js +9 -0
  447. package/bin/types/workspace/FileSystem.js.map +1 -0
  448. package/bin/types/workspace/FileTool.d.ts +181 -0
  449. package/bin/types/workspace/FileTool.d.ts.map +1 -0
  450. package/bin/types/workspace/FileTool.js +10 -0
  451. package/bin/types/workspace/FileTool.js.map +1 -0
  452. package/bin/types/workspace/SearchTool.d.ts +131 -0
  453. package/bin/types/workspace/SearchTool.d.ts.map +1 -0
  454. package/bin/types/workspace/SearchTool.js +10 -0
  455. package/bin/types/workspace/SearchTool.js.map +1 -0
  456. package/bin/types/workspace/Workspace.d.ts +24 -0
  457. package/bin/types/workspace/Workspace.d.ts.map +1 -0
  458. package/bin/types/workspace/Workspace.js +9 -0
  459. package/bin/types/workspace/Workspace.js.map +1 -0
  460. package/bin/types/workspace/WorkspaceEnv.d.ts +16 -0
  461. package/bin/types/workspace/WorkspaceEnv.d.ts.map +1 -0
  462. package/bin/types/workspace/WorkspaceEnv.js +9 -0
  463. package/bin/types/workspace/WorkspaceEnv.js.map +1 -0
  464. package/bin/types/workspace/WorkspaceTools.d.ts +20 -0
  465. package/bin/types/workspace/WorkspaceTools.d.ts.map +1 -0
  466. package/bin/types/workspace/WorkspaceTools.js +9 -0
  467. package/bin/types/workspace/WorkspaceTools.js.map +1 -0
  468. package/bin/utils/Id.d.ts +1 -1
  469. package/bin/utils/Id.d.ts.map +1 -1
  470. package/bin/utils/Id.js +1 -1
  471. package/bin/utils/Id.js.map +1 -1
  472. package/bin/utils/Template.d.ts +1 -1
  473. package/bin/utils/Template.d.ts.map +1 -1
  474. package/bin/utils/Template.js +1 -1
  475. package/bin/utils/Template.js.map +1 -1
  476. package/bin/utils/Time.d.ts +5 -5
  477. package/bin/utils/Time.d.ts.map +1 -1
  478. package/bin/utils/Time.js +5 -5
  479. package/bin/utils/Time.js.map +1 -1
  480. package/bin/utils/cli/CliOutput.d.ts +1 -1
  481. package/bin/utils/cli/CliOutput.d.ts.map +1 -1
  482. package/bin/utils/cli/CliOutput.js +6 -6
  483. package/bin/utils/cli/CliOutput.js.map +1 -1
  484. package/bin/utils/cli/PrettyStatus.d.ts +3 -3
  485. package/bin/utils/cli/PrettyStatus.d.ts.map +1 -1
  486. package/bin/utils/cli/PrettyStatus.js +4 -4
  487. package/bin/utils/cli/PrettyStatus.js.map +1 -1
  488. package/bin/utils/logger/FormatRequest.d.ts +2 -2
  489. package/bin/utils/logger/FormatRequest.d.ts.map +1 -1
  490. package/bin/utils/logger/FormatRequest.js +49 -49
  491. package/bin/utils/logger/FormatRequest.js.map +1 -1
  492. package/bin/utils/logger/FormatResponse.d.ts +1 -1
  493. package/bin/utils/logger/FormatResponse.d.ts.map +1 -1
  494. package/bin/utils/logger/FormatResponse.js +36 -36
  495. package/bin/utils/logger/FormatResponse.js.map +1 -1
  496. package/bin/utils/logger/FormatShared.d.ts +16 -16
  497. package/bin/utils/logger/FormatShared.d.ts.map +1 -1
  498. package/bin/utils/logger/FormatShared.js +28 -28
  499. package/bin/utils/logger/FormatShared.js.map +1 -1
  500. package/bin/utils/logger/Logger.d.ts +15 -12
  501. package/bin/utils/logger/Logger.d.ts.map +1 -1
  502. package/bin/utils/logger/Logger.js +28 -26
  503. package/bin/utils/logger/Logger.js.map +1 -1
  504. package/bin/utils/object/DeepMerge.d.ts +1 -1
  505. package/bin/utils/object/DeepMerge.d.ts.map +1 -1
  506. package/bin/utils/object/DeepMerge.js +5 -5
  507. package/bin/utils/object/DeepMerge.js.map +1 -1
  508. package/bin/utils/object/ObjectGuards.d.ts +1 -1
  509. package/bin/utils/object/ObjectGuards.d.ts.map +1 -1
  510. package/bin/utils/object/ObjectGuards.js +1 -1
  511. package/bin/utils/object/ObjectGuards.js.map +1 -1
  512. package/bin/utils/path/AncestorFiles.d.ts +1 -1
  513. package/bin/utils/path/AncestorFiles.d.ts.map +1 -1
  514. package/bin/utils/path/AncestorFiles.js +2 -2
  515. package/bin/utils/path/AncestorFiles.js.map +1 -1
  516. package/bin/utils/storage/index.d.ts +2 -2
  517. package/bin/utils/storage/index.d.ts.map +1 -1
  518. package/bin/utils/storage/index.js +2 -2
  519. package/bin/utils/storage/index.js.map +1 -1
  520. package/bin/utils/string/EscapeRegExp.d.ts +1 -1
  521. package/bin/utils/string/EscapeRegExp.d.ts.map +1 -1
  522. package/bin/utils/string/EscapeRegExp.js +1 -1
  523. package/bin/utils/string/EscapeRegExp.js.map +1 -1
  524. package/bin/workspace/LocalFileSystem.d.ts +44 -0
  525. package/bin/workspace/LocalFileSystem.d.ts.map +1 -0
  526. package/bin/workspace/LocalFileSystem.js +153 -0
  527. package/bin/workspace/LocalFileSystem.js.map +1 -0
  528. package/bin/workspace/Workspace.d.ts +52 -0
  529. package/bin/workspace/Workspace.d.ts.map +1 -0
  530. package/bin/workspace/Workspace.js +153 -0
  531. package/bin/workspace/Workspace.js.map +1 -0
  532. package/bin/workspace/WorkspaceEnv.d.ts +19 -0
  533. package/bin/workspace/WorkspaceEnv.d.ts.map +1 -0
  534. package/bin/workspace/WorkspaceEnv.js +50 -0
  535. package/bin/workspace/WorkspaceEnv.js.map +1 -0
  536. package/bin/workspace/WorkspacePaths.d.ts +67 -0
  537. package/bin/workspace/WorkspacePaths.d.ts.map +1 -0
  538. package/bin/workspace/WorkspacePaths.js +102 -0
  539. package/bin/workspace/WorkspacePaths.js.map +1 -0
  540. package/bin/workspace/file/FileActionRuntime.d.ts +14 -0
  541. package/bin/workspace/file/FileActionRuntime.d.ts.map +1 -0
  542. package/bin/workspace/file/FileActionRuntime.js +386 -0
  543. package/bin/workspace/file/FileActionRuntime.js.map +1 -0
  544. package/bin/workspace/file/FileAtomicWriter.d.ts +20 -0
  545. package/bin/workspace/file/FileAtomicWriter.d.ts.map +1 -0
  546. package/bin/workspace/file/FileAtomicWriter.js +50 -0
  547. package/bin/workspace/file/FileAtomicWriter.js.map +1 -0
  548. package/bin/workspace/file/FileEncoding.d.ts +34 -0
  549. package/bin/workspace/file/FileEncoding.d.ts.map +1 -0
  550. package/bin/workspace/file/FileEncoding.js +152 -0
  551. package/bin/workspace/file/FileEncoding.js.map +1 -0
  552. package/bin/workspace/file/FilePathPolicy.d.ts +26 -0
  553. package/bin/workspace/file/FilePathPolicy.d.ts.map +1 -0
  554. package/bin/workspace/file/FilePathPolicy.js +134 -0
  555. package/bin/workspace/file/FilePathPolicy.js.map +1 -0
  556. package/bin/workspace/file/FileToolError.d.ts +30 -0
  557. package/bin/workspace/file/FileToolError.d.ts.map +1 -0
  558. package/bin/workspace/file/FileToolError.js +78 -0
  559. package/bin/workspace/file/FileToolError.js.map +1 -0
  560. package/bin/workspace/search/SearchActionRuntime.d.ts +14 -0
  561. package/bin/workspace/search/SearchActionRuntime.d.ts.map +1 -0
  562. package/bin/workspace/search/SearchActionRuntime.js +359 -0
  563. package/bin/workspace/search/SearchActionRuntime.js.map +1 -0
  564. package/bin/workspace/search/SearchToolError.d.ts +26 -0
  565. package/bin/workspace/search/SearchToolError.d.ts.map +1 -0
  566. package/bin/workspace/search/SearchToolError.js +76 -0
  567. package/bin/workspace/search/SearchToolError.js.map +1 -0
  568. package/bin/{session/messages → workspace/store}/JsonlSessionMessageStore.d.ts +4 -31
  569. package/bin/workspace/store/JsonlSessionMessageStore.d.ts.map +1 -0
  570. package/bin/{session/messages → workspace/store}/JsonlSessionMessageStore.js +28 -63
  571. package/bin/workspace/store/JsonlSessionMessageStore.js.map +1 -0
  572. package/bin/workspace/store/LocalAgentStore.d.ts +43 -0
  573. package/bin/workspace/store/LocalAgentStore.d.ts.map +1 -0
  574. package/bin/workspace/store/LocalAgentStore.js +135 -0
  575. package/bin/workspace/store/LocalAgentStore.js.map +1 -0
  576. package/bin/workspace/store/LocalSessionStore.d.ts +38 -0
  577. package/bin/workspace/store/LocalSessionStore.d.ts.map +1 -0
  578. package/bin/workspace/store/LocalSessionStore.js +70 -0
  579. package/bin/workspace/store/LocalSessionStore.js.map +1 -0
  580. package/bin/workspace/store/LocalStorePaths.d.ts +81 -0
  581. package/bin/workspace/store/LocalStorePaths.d.ts.map +1 -0
  582. package/bin/workspace/store/LocalStorePaths.js +112 -0
  583. package/bin/workspace/store/LocalStorePaths.js.map +1 -0
  584. package/bin/workspace/store/SessionMessageStoreFactory.d.ts +12 -0
  585. package/bin/workspace/store/SessionMessageStoreFactory.d.ts.map +1 -0
  586. package/bin/workspace/store/SessionMessageStoreFactory.js +13 -0
  587. package/bin/workspace/store/SessionMessageStoreFactory.js.map +1 -0
  588. package/bin/workspace/tool/FileToolSchemas.d.ts +35 -0
  589. package/bin/workspace/tool/FileToolSchemas.d.ts.map +1 -0
  590. package/bin/workspace/tool/FileToolSchemas.js +73 -0
  591. package/bin/workspace/tool/FileToolSchemas.js.map +1 -0
  592. package/bin/workspace/tool/FileTools.d.ts +11 -0
  593. package/bin/workspace/tool/FileTools.d.ts.map +1 -0
  594. package/bin/workspace/tool/FileTools.js +61 -0
  595. package/bin/workspace/tool/FileTools.js.map +1 -0
  596. package/bin/workspace/tool/SearchToolSchemas.d.ts +24 -0
  597. package/bin/workspace/tool/SearchToolSchemas.d.ts.map +1 -0
  598. package/bin/workspace/tool/SearchToolSchemas.js +60 -0
  599. package/bin/workspace/tool/SearchToolSchemas.js.map +1 -0
  600. package/bin/workspace/tool/SearchTools.d.ts +11 -0
  601. package/bin/workspace/tool/SearchTools.d.ts.map +1 -0
  602. package/bin/workspace/tool/SearchTools.js +38 -0
  603. package/bin/workspace/tool/SearchTools.js.map +1 -0
  604. package/bin/workspace/tool/WorkspaceTools.d.ts +11 -0
  605. package/bin/workspace/tool/WorkspaceTools.d.ts.map +1 -0
  606. package/bin/workspace/tool/WorkspaceTools.js +22 -0
  607. package/bin/workspace/tool/WorkspaceTools.js.map +1 -0
  608. package/package.json +11 -6
  609. package/scripts/action-schedule-store.test.mjs +101 -0
  610. package/scripts/agent-env-shell-sandbox.test.mjs +9 -19
  611. package/scripts/agent-env.test.mjs +10 -39
  612. package/scripts/agent-ready.test.mjs +16 -11
  613. package/scripts/agent-session-maintenance.test.mjs +9 -7
  614. package/scripts/agent-store.test.mjs +83 -0
  615. package/scripts/city-model-tool-loop.test.mjs +48 -22
  616. package/scripts/core-engine-context-compaction.test.mjs +29 -26
  617. package/scripts/core-engine-ui-stream-collector.test.mjs +4 -4
  618. package/scripts/executor-failure-result.test.mjs +36 -33
  619. package/scripts/file-tools.test.mjs +282 -0
  620. package/scripts/image-plugin-job.test.mjs +43 -34
  621. package/scripts/logger-isolation.test.mjs +6 -6
  622. package/scripts/multi-agent-plugin-isolation.test.mjs +8 -8
  623. package/scripts/{plugin-tool-bridge.test.mjs → plugin-tools.test.mjs} +106 -102
  624. package/scripts/public-api-naming.test.mjs +108 -0
  625. package/scripts/remote-session-reconnect.test.mjs +78 -9
  626. package/scripts/search-tools.test.mjs +188 -0
  627. package/scripts/session-ask-question.test.mjs +216 -0
  628. package/scripts/session-compact-handle.test.mjs +117 -0
  629. package/scripts/session-composer.test.mjs +7 -5
  630. package/scripts/session-config-turn-boundary.test.mjs +177 -43
  631. package/scripts/session-list-title.test.mjs +23 -23
  632. package/scripts/session-message-timeline.test.mjs +65 -0
  633. package/scripts/session-messages-error.test.mjs +0 -1
  634. package/scripts/session-messages.test.mjs +305 -68
  635. package/scripts/session-queue.test.mjs +75 -40
  636. package/scripts/session-shell-approval.test.mjs +25 -22
  637. package/scripts/session-system-blocks.test.mjs +3 -3
  638. package/scripts/session-title-event.test.mjs +7 -7
  639. package/scripts/session-turn-context.test.mjs +99 -0
  640. package/scripts/session-turn-failure.test.mjs +158 -38
  641. package/scripts/workspace.test.mjs +146 -0
  642. package/src/agent/Agent.ts +159 -109
  643. package/src/agent/AgentInstructions.ts +2 -2
  644. package/src/agent/AgentModel.ts +2 -2
  645. package/src/agent/AgentSessions.ts +50 -148
  646. package/src/agent/AgentState.ts +8 -63
  647. package/src/executor/Executor.ts +120 -226
  648. package/src/executor/README.md +13 -11
  649. package/src/executor/composer/system/SessionSystemComposer.ts +2 -2
  650. package/src/executor/composer/system/default/DefaultSessionSystemComposer.ts +24 -24
  651. package/src/executor/composer/system/default/PromptRenderer.ts +4 -4
  652. package/src/executor/composer/system/default/SystemDomain.ts +68 -68
  653. package/src/executor/composer/system/default/assets/core.prompt.ts +1 -1
  654. package/src/executor/composer/system/default/assets/core.prompt.ts.txt +1 -1
  655. package/src/executor/composer/system/default/variables/GeoContext.ts +4 -4
  656. package/src/executor/composer/system/default/variables/PromptTypes.ts +2 -2
  657. package/src/executor/composer/system/default/variables/VariableReplacer.ts +30 -30
  658. package/src/executor/core-engine/CoreEngineError.ts +2 -2
  659. package/src/executor/core-engine/CoreEngineLoopDecision.ts +2 -2
  660. package/src/executor/core-engine/CoreEngineMessageState.ts +16 -16
  661. package/src/executor/core-engine/CoreEngineRunner.ts +124 -134
  662. package/src/executor/core-engine/CoreEngineSignals.ts +24 -24
  663. package/src/executor/core-engine/CoreEngineUiStreamCollector.ts +18 -18
  664. package/src/executor/ids/resolveSessionId.ts +5 -5
  665. package/src/executor/messages/ChatMessageMarkup.ts +23 -23
  666. package/src/executor/messages/ChatMessageMarkupTypes.ts +10 -10
  667. package/src/executor/messages/SessionAttachmentMapper.ts +14 -14
  668. package/src/executor/messages/SessionMessageCodec.ts +17 -27
  669. package/src/executor/messages/SessionMessageLog.ts +3 -3
  670. package/src/executor/messages/SessionStepEventMapper.ts +9 -9
  671. package/src/executor/messages/UIMessageTransformer.ts +6 -6
  672. package/src/executor/messages/UserVisibleText.ts +6 -6
  673. package/src/executor/services/ExecutorRecoveryPolicy.ts +33 -32
  674. package/src/executor/types/SessionHistoryMeta.ts +10 -10
  675. package/src/executor/types/SessionRecords.ts +13 -13
  676. package/src/index.ts +108 -184
  677. package/src/plugin/core/ActionScheduleExecutor.ts +21 -23
  678. package/src/plugin/core/ActionScheduleRuntime.ts +8 -8
  679. package/src/plugin/core/ActionScheduleStore.ts +140 -128
  680. package/src/plugin/core/ActionScheduleTime.ts +6 -6
  681. package/src/plugin/core/BasePlugin.ts +6 -27
  682. package/src/plugin/core/HookRegistry.ts +56 -56
  683. package/src/plugin/core/PluginActionFactory.ts +20 -38
  684. package/src/plugin/core/PluginActionRunner.ts +21 -181
  685. package/src/plugin/core/PluginCatalog.ts +23 -23
  686. package/src/plugin/core/PluginContext.ts +52 -0
  687. package/src/plugin/core/PluginHttpRoutes.ts +8 -8
  688. package/src/plugin/core/PluginRegistry.ts +125 -88
  689. package/src/plugin/core/PluginStateController.ts +5 -47
  690. package/src/plugin/tool/PluginToolRuntime.ts +121 -0
  691. package/src/{executor/tools/plugin → plugin/tool}/PluginToolSchemas.ts +1 -1
  692. package/src/{executor/tools/plugin/PluginToolDefinition.ts → plugin/tool/PluginTools.ts} +25 -27
  693. package/src/plugin/types/ActionSchedule.ts +10 -10
  694. package/src/plugin/types/PluginApi.ts +3 -3
  695. package/src/remote/RemoteAgent.ts +3 -3
  696. package/src/remote/RemoteSession.ts +110 -28
  697. package/src/remote/RemoteTransport.ts +17 -20
  698. package/src/remote/transports/HttpRemoteAgentTransport.ts +59 -59
  699. package/src/remote/transports/RpcClient.ts +65 -106
  700. package/src/remote/transports/RpcRemoteAgentTransport.ts +21 -21
  701. package/src/session/DefaultSessionComposer.ts +2 -3
  702. package/src/session/Session.ts +352 -298
  703. package/src/session/SessionCommand.ts +42 -0
  704. package/src/session/SessionLoop.ts +661 -0
  705. package/src/session/SessionMessages.ts +141 -94
  706. package/src/session/SessionQueue.ts +31 -64
  707. package/src/session/SessionState.ts +48 -116
  708. package/src/session/SessionSystem.ts +7 -7
  709. package/src/session/SessionTitle.ts +24 -39
  710. package/src/session/browse/Browse.ts +160 -384
  711. package/src/session/browse/SessionMessageTimeline.ts +135 -0
  712. package/src/session/control/SessionInteractions.ts +290 -0
  713. package/src/session/execution/SessionAssistantOutputAdapter.ts +144 -0
  714. package/src/session/execution/tools/SessionShellApprovalAdapter.ts +94 -0
  715. package/src/session/messages/SessionAssistantMessageWriter.ts +33 -21
  716. package/src/session/messages/SessionJsonValue.ts +3 -3
  717. package/src/session/messages/SessionMessageCodec.ts +29 -84
  718. package/src/session/messages/SessionMessageCompaction.ts +2 -2
  719. package/src/session/messages/SessionMessageInteractionWriter.ts +277 -0
  720. package/src/session/preview/SessionMessagePreview.ts +2 -2
  721. package/src/session/runtime/SessionCompactOperation.ts +93 -0
  722. package/src/session/runtime/SessionHistoryCompaction.ts +45 -0
  723. package/src/session/runtime/SessionTurnContext.ts +222 -0
  724. package/src/session/storage/Metadata.ts +46 -195
  725. package/src/session/storage/RuntimeSessionPort.ts +13 -13
  726. package/src/tools/ask/AskQuestionsTool.ts +85 -0
  727. package/src/tools/ask/AskQuestionsToolSchemas.ts +55 -0
  728. package/src/tools/index.ts +12 -0
  729. package/src/types/action/ActionResult.ts +36 -0
  730. package/src/types/agent/AgentOptions.ts +13 -25
  731. package/src/types/agent/AgentState.ts +4 -15
  732. package/src/types/agent/RemoteAgentPluginAction.ts +2 -2
  733. package/src/types/agent/SessionActor.ts +21 -20
  734. package/src/types/agent/SessionTypes.ts +74 -94
  735. package/src/types/executor/SessionAssistantOutput.ts +35 -0
  736. package/src/types/executor/SessionToolExecutionContext.ts +5 -5
  737. package/src/types/executor/SessionTurnContext.ts +171 -0
  738. package/src/types/plugin/PluginAction.ts +13 -10
  739. package/src/types/plugin/PluginCommand.ts +8 -70
  740. package/src/types/plugin/PluginContext.ts +43 -0
  741. package/src/types/plugin/PluginDefinition.ts +8 -35
  742. package/src/types/plugin/PluginExecutionContext.ts +34 -0
  743. package/src/types/plugin/PluginHttp.ts +5 -5
  744. package/src/types/plugin/PluginRegistry.ts +25 -0
  745. package/src/types/plugin/PluginRuntime.ts +30 -43
  746. package/src/types/plugin/PluginState.ts +0 -17
  747. package/src/{executor/tools/plugin/types → types/plugin}/PluginTool.ts +42 -20
  748. package/src/types/rpc/RpcProtocol.ts +49 -74
  749. package/src/types/sdk/AgentSessionCompact.ts +36 -0
  750. package/src/types/sdk/AgentSessionPrompt.ts +1 -1
  751. package/src/types/sdk/AgentSessionStop.ts +2 -2
  752. package/src/types/sdk/AgentSessionTurn.ts +3 -15
  753. package/src/types/session/SessionCommand.ts +27 -0
  754. package/src/types/session/SessionComposer.ts +8 -4
  755. package/src/{executor/types/SessionRun.ts → types/session/SessionExecution.ts} +41 -34
  756. package/src/types/session/SessionInteraction.ts +209 -0
  757. package/src/types/session/SessionInteractions.ts +21 -0
  758. package/src/types/session/SessionLocalState.ts +1 -1
  759. package/src/types/session/SessionLoop.ts +72 -0
  760. package/src/types/session/SessionMessage.ts +43 -28
  761. package/src/types/session/SessionMessages.ts +2 -4
  762. package/src/types/session/SessionMutation.ts +21 -0
  763. package/src/types/session/SessionOptions.ts +38 -23
  764. package/src/types/session/SessionPort.ts +6 -24
  765. package/src/types/session/SessionState.ts +3 -16
  766. package/src/types/store/AgentStore.ts +52 -0
  767. package/src/types/store/LocalStore.ts +39 -0
  768. package/src/types/store/SessionStore.ts +105 -0
  769. package/src/types/tools/ask/AskQuestionsTool.ts +27 -0
  770. package/src/types/workspace/FileSystem.ts +76 -0
  771. package/src/types/workspace/FileTool.ts +225 -0
  772. package/src/types/workspace/SearchTool.ts +156 -0
  773. package/src/types/workspace/Workspace.ts +27 -0
  774. package/src/types/workspace/WorkspaceEnv.ts +19 -0
  775. package/src/types/workspace/WorkspaceTools.ts +23 -0
  776. package/src/utils/Id.ts +1 -1
  777. package/src/utils/Template.ts +1 -1
  778. package/src/utils/Time.ts +8 -8
  779. package/src/utils/cli/CliOutput.ts +7 -7
  780. package/src/utils/cli/PrettyStatus.ts +4 -4
  781. package/src/utils/logger/FormatRequest.ts +64 -64
  782. package/src/utils/logger/FormatResponse.ts +44 -44
  783. package/src/utils/logger/FormatShared.ts +28 -28
  784. package/src/utils/logger/Logger.ts +30 -26
  785. package/src/utils/object/DeepMerge.ts +5 -5
  786. package/src/utils/object/ObjectGuards.ts +1 -1
  787. package/src/utils/path/AncestorFiles.ts +3 -3
  788. package/src/utils/storage/index.ts +2 -2
  789. package/src/utils/string/EscapeRegExp.ts +1 -1
  790. package/src/workspace/LocalFileSystem.ts +209 -0
  791. package/src/workspace/Workspace.ts +180 -0
  792. package/src/workspace/WorkspaceEnv.ts +54 -0
  793. package/src/workspace/WorkspacePaths.ts +112 -0
  794. package/src/workspace/file/FileActionRuntime.ts +433 -0
  795. package/src/workspace/file/FileAtomicWriter.ts +61 -0
  796. package/src/workspace/file/FileEncoding.ts +175 -0
  797. package/src/workspace/file/FilePathPolicy.ts +162 -0
  798. package/src/workspace/file/FileToolError.ts +99 -0
  799. package/src/workspace/search/SearchActionRuntime.ts +438 -0
  800. package/src/workspace/search/SearchToolError.ts +94 -0
  801. package/src/{session/messages → workspace/store}/JsonlSessionMessageStore.ts +40 -91
  802. package/src/workspace/store/LocalAgentStore.ts +191 -0
  803. package/src/workspace/store/LocalSessionStore.ts +114 -0
  804. package/src/workspace/store/LocalStorePaths.ts +209 -0
  805. package/src/workspace/store/SessionMessageStoreFactory.ts +18 -0
  806. package/src/workspace/tool/FileToolSchemas.ts +77 -0
  807. package/src/workspace/tool/FileTools.ts +91 -0
  808. package/src/workspace/tool/SearchToolSchemas.ts +62 -0
  809. package/src/workspace/tool/SearchTools.ts +61 -0
  810. package/src/workspace/tool/WorkspaceTools.ts +31 -0
  811. package/tsconfig.tsbuildinfo +1 -1
  812. package/bin/agent/AgentContext.d.ts +0 -69
  813. package/bin/agent/AgentContext.d.ts.map +0 -1
  814. package/bin/agent/AgentContext.js +0 -56
  815. package/bin/agent/AgentContext.js.map +0 -1
  816. package/bin/config/AgentEnv.d.ts +0 -9
  817. package/bin/config/AgentEnv.d.ts.map +0 -1
  818. package/bin/config/AgentEnv.js +0 -48
  819. package/bin/config/AgentEnv.js.map +0 -1
  820. package/bin/config/AgentInitializer.d.ts +0 -31
  821. package/bin/config/AgentInitializer.d.ts.map +0 -1
  822. package/bin/config/AgentInitializer.js +0 -131
  823. package/bin/config/AgentInitializer.js.map +0 -1
  824. package/bin/config/EnvFile.d.ts +0 -31
  825. package/bin/config/EnvFile.d.ts.map +0 -1
  826. package/bin/config/EnvFile.js +0 -89
  827. package/bin/config/EnvFile.js.map +0 -1
  828. package/bin/config/ExecutionBinding.d.ts +0 -31
  829. package/bin/config/ExecutionBinding.d.ts.map +0 -1
  830. package/bin/config/ExecutionBinding.js +0 -46
  831. package/bin/config/ExecutionBinding.js.map +0 -1
  832. package/bin/config/Gitignore.d.ts +0 -21
  833. package/bin/config/Gitignore.d.ts.map +0 -1
  834. package/bin/config/Gitignore.js +0 -46
  835. package/bin/config/Gitignore.js.map +0 -1
  836. package/bin/config/Paths.d.ts +0 -122
  837. package/bin/config/Paths.d.ts.map +0 -1
  838. package/bin/config/Paths.js +0 -183
  839. package/bin/config/Paths.js.map +0 -1
  840. package/bin/config/PlatformPaths.d.ts +0 -31
  841. package/bin/config/PlatformPaths.d.ts.map +0 -1
  842. package/bin/config/PlatformPaths.js +0 -53
  843. package/bin/config/PlatformPaths.js.map +0 -1
  844. package/bin/config/ProjectSetup.d.ts +0 -11
  845. package/bin/config/ProjectSetup.d.ts.map +0 -1
  846. package/bin/config/ProjectSetup.js +0 -32
  847. package/bin/config/ProjectSetup.js.map +0 -1
  848. package/bin/executor/messages/AssistantFileResource.d.ts +0 -63
  849. package/bin/executor/messages/AssistantFileResource.d.ts.map +0 -1
  850. package/bin/executor/messages/AssistantFileResource.js +0 -352
  851. package/bin/executor/messages/AssistantFileResource.js.map +0 -1
  852. package/bin/executor/tools/file/ReadImageToolBridge.d.ts +0 -21
  853. package/bin/executor/tools/file/ReadImageToolBridge.d.ts.map +0 -1
  854. package/bin/executor/tools/file/ReadImageToolBridge.js +0 -69
  855. package/bin/executor/tools/file/ReadImageToolBridge.js.map +0 -1
  856. package/bin/executor/tools/plugin/PluginToolBridge.d.ts +0 -19
  857. package/bin/executor/tools/plugin/PluginToolBridge.d.ts.map +0 -1
  858. package/bin/executor/tools/plugin/PluginToolBridge.js +0 -181
  859. package/bin/executor/tools/plugin/PluginToolBridge.js.map +0 -1
  860. package/bin/executor/tools/plugin/PluginToolDefinition.d.ts +0 -25
  861. package/bin/executor/tools/plugin/PluginToolDefinition.d.ts.map +0 -1
  862. package/bin/executor/tools/plugin/PluginToolDefinition.js.map +0 -1
  863. package/bin/executor/tools/plugin/PluginToolSchemas.d.ts.map +0 -1
  864. package/bin/executor/tools/plugin/PluginToolSchemas.js.map +0 -1
  865. package/bin/executor/tools/plugin/types/PluginTool.d.ts +0 -76
  866. package/bin/executor/tools/plugin/types/PluginTool.d.ts.map +0 -1
  867. package/bin/executor/tools/plugin/types/PluginTool.js.map +0 -1
  868. package/bin/executor/types/SessionExecutor.d.ts +0 -26
  869. package/bin/executor/types/SessionExecutor.d.ts.map +0 -1
  870. package/bin/executor/types/SessionExecutor.js +0 -9
  871. package/bin/executor/types/SessionExecutor.js.map +0 -1
  872. package/bin/executor/types/SessionRun.d.ts.map +0 -1
  873. package/bin/executor/types/SessionRun.js +0 -10
  874. package/bin/executor/types/SessionRun.js.map +0 -1
  875. package/bin/plugin/core/PluginCommand.d.ts +0 -17
  876. package/bin/plugin/core/PluginCommand.d.ts.map +0 -1
  877. package/bin/plugin/core/PluginCommand.js +0 -189
  878. package/bin/plugin/core/PluginCommand.js.map +0 -1
  879. package/bin/plugin/core/PluginCommandRequest.d.ts +0 -36
  880. package/bin/plugin/core/PluginCommandRequest.d.ts.map +0 -1
  881. package/bin/plugin/core/PluginCommandRequest.js +0 -53
  882. package/bin/plugin/core/PluginCommandRequest.js.map +0 -1
  883. package/bin/plugin/core/PluginLocalExecution.d.ts +0 -45
  884. package/bin/plugin/core/PluginLocalExecution.d.ts.map +0 -1
  885. package/bin/plugin/core/PluginLocalExecution.js +0 -115
  886. package/bin/plugin/core/PluginLocalExecution.js.map +0 -1
  887. package/bin/session/SessionTurn.d.ts +0 -84
  888. package/bin/session/SessionTurn.d.ts.map +0 -1
  889. package/bin/session/SessionTurn.js +0 -579
  890. package/bin/session/SessionTurn.js.map +0 -1
  891. package/bin/session/approval/SessionApprovalBroker.d.ts +0 -48
  892. package/bin/session/approval/SessionApprovalBroker.d.ts.map +0 -1
  893. package/bin/session/approval/SessionApprovalBroker.js +0 -126
  894. package/bin/session/approval/SessionApprovalBroker.js.map +0 -1
  895. package/bin/session/messages/JsonlSessionMessageStore.d.ts.map +0 -1
  896. package/bin/session/messages/JsonlSessionMessageStore.js.map +0 -1
  897. package/bin/session/storage/Instruction.d.ts +0 -16
  898. package/bin/session/storage/Instruction.d.ts.map +0 -1
  899. package/bin/session/storage/Instruction.js +0 -48
  900. package/bin/session/storage/Instruction.js.map +0 -1
  901. package/bin/session/storage/Paths.d.ts +0 -81
  902. package/bin/session/storage/Paths.d.ts.map +0 -1
  903. package/bin/session/storage/Paths.js +0 -112
  904. package/bin/session/storage/Paths.js.map +0 -1
  905. package/bin/types/common/EnvFile.d.ts +0 -30
  906. package/bin/types/common/EnvFile.d.ts.map +0 -1
  907. package/bin/types/common/EnvFile.js +0 -10
  908. package/bin/types/common/EnvFile.js.map +0 -1
  909. package/bin/types/config/AgentProject.d.ts +0 -73
  910. package/bin/types/config/AgentProject.d.ts.map +0 -1
  911. package/bin/types/config/AgentProject.js +0 -9
  912. package/bin/types/config/AgentProject.js.map +0 -1
  913. package/bin/types/config/DowncityConfig.d.ts +0 -145
  914. package/bin/types/config/DowncityConfig.d.ts.map +0 -1
  915. package/bin/types/config/DowncityConfig.js +0 -2
  916. package/bin/types/config/DowncityConfig.js.map +0 -1
  917. package/bin/types/config/ExecutionBinding.d.ts +0 -26
  918. package/bin/types/config/ExecutionBinding.d.ts.map +0 -1
  919. package/bin/types/config/ExecutionBinding.js +0 -10
  920. package/bin/types/config/ExecutionBinding.js.map +0 -1
  921. package/bin/types/config/LlmConfig.d.ts +0 -100
  922. package/bin/types/config/LlmConfig.d.ts.map +0 -1
  923. package/bin/types/config/LlmConfig.js +0 -10
  924. package/bin/types/config/LlmConfig.js.map +0 -1
  925. package/bin/types/executor/SessionRunContext.d.ts +0 -155
  926. package/bin/types/executor/SessionRunContext.d.ts.map +0 -1
  927. package/bin/types/executor/SessionRunContext.js +0 -10
  928. package/bin/types/executor/SessionRunContext.js.map +0 -1
  929. package/bin/types/platform/Store.d.ts +0 -191
  930. package/bin/types/platform/Store.d.ts.map +0 -1
  931. package/bin/types/platform/Store.js +0 -9
  932. package/bin/types/platform/Store.js.map +0 -1
  933. package/bin/types/plugin/PluginConfig.d.ts +0 -12
  934. package/bin/types/plugin/PluginConfig.d.ts.map +0 -1
  935. package/bin/types/plugin/PluginConfig.js +0 -5
  936. package/bin/types/plugin/PluginConfig.js.map +0 -1
  937. package/bin/types/plugin/PluginControl.d.ts +0 -74
  938. package/bin/types/plugin/PluginControl.d.ts.map +0 -1
  939. package/bin/types/plugin/PluginControl.js +0 -9
  940. package/bin/types/plugin/PluginControl.js.map +0 -1
  941. package/bin/types/plugin/PluginRunContext.d.ts +0 -26
  942. package/bin/types/plugin/PluginRunContext.d.ts.map +0 -1
  943. package/bin/types/plugin/PluginRunContext.js.map +0 -1
  944. package/bin/types/plugin/PluginSetup.d.ts +0 -133
  945. package/bin/types/plugin/PluginSetup.d.ts.map +0 -1
  946. package/bin/types/plugin/PluginSetup.js +0 -9
  947. package/bin/types/plugin/PluginSetup.js.map +0 -1
  948. package/bin/types/plugin/PluginToolRuntime.d.ts +0 -86
  949. package/bin/types/plugin/PluginToolRuntime.d.ts.map +0 -1
  950. package/bin/types/plugin/PluginToolRuntime.js +0 -9
  951. package/bin/types/plugin/PluginToolRuntime.js.map +0 -1
  952. package/bin/types/runtime/auth/AuthPermission.d.ts +0 -49
  953. package/bin/types/runtime/auth/AuthPermission.d.ts.map +0 -1
  954. package/bin/types/runtime/auth/AuthPermission.js +0 -87
  955. package/bin/types/runtime/auth/AuthPermission.js.map +0 -1
  956. package/bin/types/runtime/auth/AuthRoute.d.ts +0 -29
  957. package/bin/types/runtime/auth/AuthRoute.d.ts.map +0 -1
  958. package/bin/types/runtime/auth/AuthRoute.js +0 -8
  959. package/bin/types/runtime/auth/AuthRoute.js.map +0 -1
  960. package/bin/types/runtime/auth/AuthToken.d.ts +0 -46
  961. package/bin/types/runtime/auth/AuthToken.d.ts.map +0 -1
  962. package/bin/types/runtime/auth/AuthToken.js +0 -9
  963. package/bin/types/runtime/auth/AuthToken.js.map +0 -1
  964. package/bin/types/runtime/auth/AuthTypes.d.ts +0 -227
  965. package/bin/types/runtime/auth/AuthTypes.d.ts.map +0 -1
  966. package/bin/types/runtime/auth/AuthTypes.js +0 -9
  967. package/bin/types/runtime/auth/AuthTypes.js.map +0 -1
  968. package/bin/types/runtime/http/InlineInstant.d.ts +0 -82
  969. package/bin/types/runtime/http/InlineInstant.d.ts.map +0 -1
  970. package/bin/types/runtime/http/InlineInstant.js +0 -10
  971. package/bin/types/runtime/http/InlineInstant.js.map +0 -1
  972. package/bin/types/runtime/platform/Platform.d.ts +0 -362
  973. package/bin/types/runtime/platform/Platform.d.ts.map +0 -1
  974. package/bin/types/runtime/platform/Platform.js +0 -10
  975. package/bin/types/runtime/platform/Platform.js.map +0 -1
  976. package/bin/types/runtime/platform/PlatformGateway.d.ts +0 -41
  977. package/bin/types/runtime/platform/PlatformGateway.d.ts.map +0 -1
  978. package/bin/types/runtime/platform/PlatformGateway.js +0 -2
  979. package/bin/types/runtime/platform/PlatformGateway.js.map +0 -1
  980. package/bin/types/session/SessionApproval.d.ts +0 -63
  981. package/bin/types/session/SessionApproval.d.ts.map +0 -1
  982. package/bin/types/session/SessionApproval.js +0 -7
  983. package/bin/types/session/SessionApproval.js.map +0 -1
  984. package/bin/types/session/SessionApprovalBroker.d.ts +0 -17
  985. package/bin/types/session/SessionApprovalBroker.d.ts.map +0 -1
  986. package/bin/types/session/SessionApprovalBroker.js +0 -7
  987. package/bin/types/session/SessionApprovalBroker.js.map +0 -1
  988. package/bin/types/session/SessionInstruction.d.ts +0 -22
  989. package/bin/types/session/SessionInstruction.d.ts.map +0 -1
  990. package/bin/types/session/SessionInstruction.js +0 -9
  991. package/bin/types/session/SessionInstruction.js.map +0 -1
  992. package/bin/types/session/SessionQueue.d.ts +0 -88
  993. package/bin/types/session/SessionQueue.d.ts.map +0 -1
  994. package/bin/types/session/SessionQueue.js +0 -7
  995. package/bin/types/session/SessionQueue.js.map +0 -1
  996. package/bin/types/session/SessionTurn.d.ts +0 -52
  997. package/bin/types/session/SessionTurn.d.ts.map +0 -1
  998. package/bin/types/session/SessionTurn.js.map +0 -1
  999. package/scripts/assistant-file-resource.test.mjs +0 -344
  1000. package/scripts/read-image-tool-bridge.test.mjs +0 -71
  1001. package/src/agent/AgentContext.ts +0 -98
  1002. package/src/config/AgentEnv.ts +0 -49
  1003. package/src/config/AgentInitializer.ts +0 -167
  1004. package/src/config/EnvFile.ts +0 -99
  1005. package/src/config/ExecutionBinding.ts +0 -50
  1006. package/src/config/Gitignore.ts +0 -52
  1007. package/src/config/Paths.ts +0 -241
  1008. package/src/config/PlatformPaths.ts +0 -57
  1009. package/src/config/ProjectSetup.ts +0 -44
  1010. package/src/executor/messages/AssistantFileResource.ts +0 -446
  1011. package/src/executor/tools/file/ReadImageToolBridge.ts +0 -79
  1012. package/src/executor/tools/plugin/PluginToolBridge.ts +0 -212
  1013. package/src/executor/types/SessionExecutor.ts +0 -34
  1014. package/src/plugin/core/PluginCommand.ts +0 -230
  1015. package/src/plugin/core/PluginCommandRequest.ts +0 -93
  1016. package/src/plugin/core/PluginLocalExecution.ts +0 -154
  1017. package/src/session/SessionTurn.ts +0 -669
  1018. package/src/session/approval/SessionApprovalBroker.ts +0 -164
  1019. package/src/session/storage/Instruction.ts +0 -72
  1020. package/src/session/storage/Paths.ts +0 -209
  1021. package/src/types/common/EnvFile.ts +0 -31
  1022. package/src/types/config/AgentProject.ts +0 -85
  1023. package/src/types/config/DowncityConfig.ts +0 -153
  1024. package/src/types/config/ExecutionBinding.ts +0 -27
  1025. package/src/types/config/LlmConfig.ts +0 -115
  1026. package/src/types/executor/SessionRunContext.ts +0 -191
  1027. package/src/types/platform/Store.ts +0 -197
  1028. package/src/types/plugin/PluginConfig.ts +0 -13
  1029. package/src/types/plugin/PluginControl.ts +0 -80
  1030. package/src/types/plugin/PluginRunContext.ts +0 -31
  1031. package/src/types/plugin/PluginSetup.ts +0 -138
  1032. package/src/types/plugin/PluginToolRuntime.ts +0 -98
  1033. package/src/types/runtime/auth/AuthPermission.ts +0 -120
  1034. package/src/types/runtime/auth/AuthRoute.ts +0 -31
  1035. package/src/types/runtime/auth/AuthToken.ts +0 -47
  1036. package/src/types/runtime/auth/AuthTypes.ts +0 -235
  1037. package/src/types/runtime/http/InlineInstant.ts +0 -96
  1038. package/src/types/runtime/platform/Platform.ts +0 -432
  1039. package/src/types/runtime/platform/PlatformGateway.ts +0 -46
  1040. package/src/types/session/SessionApproval.ts +0 -69
  1041. package/src/types/session/SessionApprovalBroker.ts +0 -18
  1042. package/src/types/session/SessionInstruction.ts +0 -24
  1043. package/src/types/session/SessionQueue.ts +0 -102
  1044. package/src/types/session/SessionTurn.ts +0 -56
  1045. /package/bin/{executor/tools/plugin/types → types/plugin}/PluginTool.js +0 -0
@@ -1,13 +1,10 @@
1
1
  /**
2
- * Session Message 的 Active + Segment JSONL 存储。
2
+ * Workspace Session Message 的 Active + Segment JSONL 存储。
3
3
  *
4
4
  * Active 保存上次 Compact 后产生的真实 Message;Compact 把 Active 前缀写入按
5
5
  * sequence 范围命名的不可变 Segment,并在 Segment 末尾追加累计 Summary footer。
6
6
  */
7
- import fs from "fs-extra";
8
- import { open, readFile, stat } from "node:fs/promises";
9
7
  import path from "node:path";
10
- import { generateId } from "../../utils/Id.js";
11
8
  const SEGMENT_FILE_PATTERN = /^(\d+)-(\d+)\.jsonl$/;
12
9
  const SEQUENCE_FILE_WIDTH = 12;
13
10
  /** Active + Segment JSONL 存储。 */
@@ -17,7 +14,9 @@ export class JsonlSessionMessageStore {
17
14
  assistant_message_file_path;
18
15
  segments_dir_path;
19
16
  lock_file_path;
17
+ files;
20
18
  constructor(options) {
19
+ this.files = options.files;
21
20
  this.session_id = String(options.session_id || "").trim();
22
21
  this.active_file_path = path.resolve(options.file_path);
23
22
  this.assistant_message_file_path = path.resolve(options.assistant_message_file_path ||
@@ -54,7 +53,7 @@ export class JsonlSessionMessageStore {
54
53
  finalized?.type === "assistant" &&
55
54
  finalized.revision >= draft.revision &&
56
55
  finalized.status !== "streaming") {
57
- await fs.remove(this.assistant_message_file_path);
56
+ await this.files.remove_path(this.assistant_message_file_path);
58
57
  }
59
58
  });
60
59
  }
@@ -107,7 +106,7 @@ export class JsonlSessionMessageStore {
107
106
  (latest_range ? (await this.read_segment(latest_range)).messages.at(-1) : null) ||
108
107
  null;
109
108
  const paths = [this.active_file_path, ...ranges.map((range) => range.file_path)];
110
- const sizes = await Promise.all(paths.map(async (file_path) => await stat(file_path).then((value) => value.size).catch(() => 0)));
109
+ const sizes = await Promise.all(paths.map(async (file_path) => await this.files.file_size(file_path).catch(() => 0)));
111
110
  const latest_sequence = Math.max(latest_range?.end_sequence || 0, active_messages.reduce((max, message) => Math.max(max, message.sequence), 0));
112
111
  return {
113
112
  message_count: latest_sequence,
@@ -131,7 +130,7 @@ export class JsonlSessionMessageStore {
131
130
  /** 读取当前运行中的 Assistant 草稿。 */
132
131
  async read_assistant_message() {
133
132
  try {
134
- const value = await fs.readJson(this.assistant_message_file_path);
133
+ const value = JSON.parse((await this.files.read_file(this.assistant_message_file_path)).toString("utf8"));
135
134
  this.validate_message(value);
136
135
  return value.type === "assistant" && value.status === "streaming" ? value : null;
137
136
  }
@@ -191,7 +190,7 @@ export class JsonlSessionMessageStore {
191
190
  messages: current_messages,
192
191
  });
193
192
  this.validate_message(message);
194
- await fs.appendFile(this.active_file_path, `${JSON.stringify(message)}\n`, "utf8");
193
+ await this.files.append_file(this.active_file_path, `${JSON.stringify(message)}\n`);
195
194
  return message;
196
195
  });
197
196
  }
@@ -208,8 +207,8 @@ export class JsonlSessionMessageStore {
208
207
  if (message.revision !== current.revision + 1) {
209
208
  throw new Error(`Invalid final Assistant revision: ${message.message_id}`);
210
209
  }
211
- await fs.appendFile(this.active_file_path, `${JSON.stringify(message)}\n`, "utf8");
212
- await fs.remove(this.assistant_message_file_path);
210
+ await this.files.append_file(this.active_file_path, `${JSON.stringify(message)}\n`);
211
+ await this.files.remove_path(this.assistant_message_file_path);
213
212
  });
214
213
  }
215
214
  /** 把 Active 前缀与累计 Summary 提交为不可变 Segment。 */
@@ -236,7 +235,7 @@ export class JsonlSessionMessageStore {
236
235
  end_sequence,
237
236
  file_path: this.segment_file_path(start_sequence, end_sequence),
238
237
  };
239
- if (await fs.pathExists(range.file_path)) {
238
+ if (await this.files.path_exists(range.file_path)) {
240
239
  throw new Error(`Session Segment already exists: ${range.file_path}`);
241
240
  }
242
241
  await this.write_segment_unsafe(range, segment_messages, input.summary);
@@ -250,10 +249,10 @@ export class JsonlSessionMessageStore {
250
249
  /** 扫描 Segment 文件名并返回 sequence 升序索引。 */
251
250
  async list_segment_ranges() {
252
251
  await this.ensure_layout();
253
- const entries = await fs.readdir(this.segments_dir_path, { withFileTypes: true });
252
+ const entries = await this.files.read_directory(this.segments_dir_path);
254
253
  const ranges = entries
255
254
  .flatMap((entry) => {
256
- if (!entry.isFile())
255
+ if (!entry.is_file)
257
256
  return [];
258
257
  const match = SEGMENT_FILE_PATTERN.exec(entry.name);
259
258
  if (!match)
@@ -286,7 +285,7 @@ export class JsonlSessionMessageStore {
286
285
  }
287
286
  /** 读取并验证一个不可变 Segment。 */
288
287
  async read_segment(range) {
289
- const raw = await fs.readFile(range.file_path, "utf8");
288
+ const raw = (await this.files.read_file(range.file_path)).toString("utf8");
290
289
  const lines = raw.split("\n").map((line) => line.trim()).filter(Boolean);
291
290
  const summary_value = JSON.parse(lines.pop() || "null");
292
291
  this.validate_summary(summary_value, range.end_sequence);
@@ -313,7 +312,9 @@ export class JsonlSessionMessageStore {
313
312
  }
314
313
  /** 读取 Active 原始行,并按 Message ID 保留最高 revision。 */
315
314
  async read_folded_active_messages_unsafe() {
316
- const raw = await fs.readFile(this.active_file_path, "utf8").catch(() => "");
315
+ const raw = await this.files.read_file(this.active_file_path)
316
+ .then((value) => value.toString("utf8"))
317
+ .catch(() => "");
317
318
  const by_id = new Map();
318
319
  for (const line of raw.split("\n")) {
319
320
  if (!line.trim())
@@ -333,28 +334,25 @@ export class JsonlSessionMessageStore {
333
334
  }
334
335
  /** 原子覆盖 Assistant 草稿。 */
335
336
  async write_assistant_message_unsafe(message) {
336
- const temporary_path = `${this.assistant_message_file_path}.${process.pid}.${Date.now()}.tmp`;
337
- await fs.writeJson(temporary_path, message, { spaces: 2 });
338
- await fs.move(temporary_path, this.assistant_message_file_path, { overwrite: true });
337
+ await this.files.write_file_atomically(this.assistant_message_file_path, `${JSON.stringify(message, null, 2)}\n`);
339
338
  }
340
339
  /** 原子覆盖 Active,只写入每个 Message 的最终 revision。 */
341
340
  async write_active_messages_unsafe(messages) {
342
- const temporary_path = `${this.active_file_path}.${process.pid}.${Date.now()}.tmp`;
343
341
  const content = messages.length > 0
344
342
  ? `${messages.map((message) => JSON.stringify(message)).join("\n")}\n`
345
343
  : "";
346
- await fs.writeFile(temporary_path, content, "utf8");
347
- await fs.move(temporary_path, this.active_file_path, { overwrite: true });
344
+ await this.files.write_file_atomically(this.active_file_path, content);
348
345
  }
349
346
  /** 原子创建一个带累计 Summary footer 的 Segment。 */
350
347
  async write_segment_unsafe(range, messages, summary) {
351
- const temporary_path = `${range.file_path}.${process.pid}.${Date.now()}.tmp`;
352
348
  const content = `${[
353
349
  ...messages.map((message) => JSON.stringify(message)),
354
350
  JSON.stringify(summary),
355
351
  ].join("\n")}\n`;
356
- await fs.writeFile(temporary_path, content, "utf8");
357
- await fs.move(temporary_path, range.file_path, { overwrite: false });
352
+ if (await this.files.path_exists(range.file_path)) {
353
+ throw new Error(`Session Segment already exists: ${range.file_path}`);
354
+ }
355
+ await this.files.write_file_atomically(range.file_path, content);
358
356
  }
359
357
  /** 生成稳定的 Segment sequence 范围文件名。 */
360
358
  segment_file_path(start_sequence, end_sequence) {
@@ -402,49 +400,16 @@ export class JsonlSessionMessageStore {
402
400
  }
403
401
  /** 创建 Active、Segment 与锁所需目录。 */
404
402
  async ensure_layout() {
405
- await fs.ensureDir(path.dirname(this.active_file_path));
406
- await fs.ensureDir(this.segments_dir_path);
407
- await fs.ensureFile(this.active_file_path);
403
+ await this.files.ensure_directory(path.dirname(this.active_file_path));
404
+ await this.files.ensure_directory(this.segments_dir_path);
405
+ if (!(await this.files.path_exists(this.active_file_path))) {
406
+ await this.files.write_file_atomically(this.active_file_path, "");
407
+ }
408
408
  }
409
409
  /** 使用同目录锁串行化 Active、草稿与 Segment 写入。 */
410
410
  async with_write_lock(callback) {
411
411
  await this.ensure_layout();
412
- const token = `${process.pid}:${Date.now()}:${generateId()}`;
413
- const stale_ms = 30_000;
414
- const started_at = Date.now();
415
- while (true) {
416
- try {
417
- const file = await open(this.lock_file_path, "wx");
418
- await file.writeFile(token, "utf8");
419
- await file.close();
420
- break;
421
- }
422
- catch (error) {
423
- if (error.code !== "EEXIST")
424
- throw error;
425
- try {
426
- const lock_stat = await stat(this.lock_file_path);
427
- if (Date.now() - lock_stat.mtimeMs > stale_ms)
428
- await fs.remove(this.lock_file_path);
429
- }
430
- catch { /* 锁文件可能刚被释放。 */ }
431
- if (Date.now() - started_at > stale_ms * 2) {
432
- throw new Error(`Session message lock timeout: ${this.lock_file_path}`);
433
- }
434
- await new Promise((resolve) => setTimeout(resolve, 40));
435
- }
436
- }
437
- try {
438
- return await callback();
439
- }
440
- finally {
441
- try {
442
- if ((await readFile(this.lock_file_path, "utf8")).trim() === token) {
443
- await fs.remove(this.lock_file_path);
444
- }
445
- }
446
- catch { /* 锁已被清理。 */ }
447
- }
412
+ return await this.files.with_file_lock(this.lock_file_path, callback);
448
413
  }
449
414
  }
450
415
  /** 按全局 Message sequence 升序排序。 */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JsonlSessionMessageStore.js","sourceRoot":"","sources":["../../../src/workspace/store/JsonlSessionMessageStore.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAgB7B,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAC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AAC,IAAI,CACvB,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,KAAK,kBAAkB,GAAG,KAAK,GAAG,CAAC,CACxE,EAAE,CAAC;YACF,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACnF,CAAC;IACH,CAAC;IAED,gCAAgC;IACxB,KAAK,CAAC,aAAa;QACzB,MAAM,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;QACvE,MAAM,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC1D,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC;YAC3D,MAAM,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;QACpE,CAAC;IACH,CAAC;IAED,uCAAuC;IAC/B,KAAK,CAAC,eAAe,CAAI,QAA0B;QACzD,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QAC3B,OAAO,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IACxE,CAAC;CACF;AAED,iCAAiC;AACjC,SAAS,wBAAwB,CAAC,IAAoB,EAAE,KAAqB;IAC3E,OAAO,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;AACxC,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * LocalAgentStore:Workspace 内本地 Agent 领域数据入口。
3
+ *
4
+ * 职责说明(中文)
5
+ * - 统一管理 Session 创建判断、删除、列表、归档与清理。
6
+ * - 缓存稳定的 LocalSessionStore,避免同一 Session 重复创建 Message Store。
7
+ * - 当前阶段沿用既有本地目录布局;调用方和 Session 不感知该约定。
8
+ */
9
+ import type { AgentArchiveSessionResult, AgentArchiveSessionsInput, AgentArchiveSessionsResult, AgentCleanArchiveResult, AgentListSessionsInput, AgentSessionSummaryPage } from "../../types/agent/SessionTypes.js";
10
+ import type { AgentStore } from "../../types/store/AgentStore.js";
11
+ import type { SessionStore } from "../../types/store/SessionStore.js";
12
+ import type { LocalAgentStoreOptions } from "../../types/store/LocalStore.js";
13
+ /** 默认本地 Agent Store。 */
14
+ export declare class LocalAgentStore implements AgentStore {
15
+ /** 当前 Store 与 WorkspaceTools 共用的 Workspace 文件能力。 */
16
+ private readonly files;
17
+ /** 当前 Agent 的稳定标识。 */
18
+ private readonly agent_id;
19
+ /** 已创建的 Session Store 缓存。 */
20
+ private readonly sessions;
21
+ constructor(options: LocalAgentStoreOptions);
22
+ /** 返回指定 Session 的稳定持久化视图。 */
23
+ session(session_id: string): SessionStore;
24
+ /** 判断活动 Session 是否存在。 */
25
+ has_session(session_id: string): Promise<boolean>;
26
+ /** 永久删除活动 Session。 */
27
+ remove_session(session_id: string): Promise<boolean>;
28
+ /** 清空活动 Session Message 数据。 */
29
+ clear_session_messages(session_id: string): Promise<boolean>;
30
+ /** 返回活动 Session 摘要页。 */
31
+ list_sessions(input: AgentListSessionsInput | undefined, executing_session_ids: ReadonlySet<string>): Promise<AgentSessionSummaryPage>;
32
+ /** 将活动 Session 迁入归档区。 */
33
+ archive_session(session_id: string): Promise<AgentArchiveSessionResult>;
34
+ /** 返回归档 Session 摘要页。 */
35
+ list_archived_sessions(input?: AgentArchiveSessionsInput): Promise<AgentArchiveSessionsResult>;
36
+ /** 永久删除全部归档 Session。 */
37
+ clean_archive(): Promise<AgentCleanArchiveResult>;
38
+ /** 本地 JSONL Store 当前没有常驻句柄。 */
39
+ dispose(): Promise<void>;
40
+ /** 返回活动 Session 物理目录,仅供本地实现内部使用。 */
41
+ private session_path;
42
+ }
43
+ //# sourceMappingURL=LocalAgentStore.d.ts.map
@@ -0,0 +1 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;IAClB,sBAAsB,CAC1B,KAAK,CAAC,EAAE,yBAAyB,GAChC,OAAO,CAAC,0BAA0B,CAAC;IAStC,wBAAwB;IAClB,aAAa,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAwBvD,+BAA+B;IACzB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAE9B,oCAAoC;IACpC,OAAO,CAAC,YAAY;CAOrB"}
@@ -0,0 +1,135 @@
1
+ /**
2
+ * LocalAgentStore:Workspace 内本地 Agent 领域数据入口。
3
+ *
4
+ * 职责说明(中文)
5
+ * - 统一管理 Session 创建判断、删除、列表、归档与清理。
6
+ * - 缓存稳定的 LocalSessionStore,避免同一 Session 重复创建 Message Store。
7
+ * - 当前阶段沿用既有本地目录布局;调用方和 Session 不感知该约定。
8
+ */
9
+ import { LocalSessionStore } from "../../workspace/store/LocalSessionStore.js";
10
+ import { get_sdk_agent_archived_session_dir_path, get_sdk_agent_archived_sessions_dir_path, get_sdk_agent_session_dir_path, get_sdk_agent_session_messages_dir_path, } from "../../workspace/store/LocalStorePaths.js";
11
+ import { list_archived_agent_session_summary_page, list_agent_session_summary_page, } from "../../session/browse/Browse.js";
12
+ /** 解码目录中经过 URL 编码的 Session 标识。 */
13
+ function decode_session_id(input) {
14
+ try {
15
+ return decodeURIComponent(input);
16
+ }
17
+ catch {
18
+ return input;
19
+ }
20
+ }
21
+ /** 默认本地 Agent Store。 */
22
+ export class LocalAgentStore {
23
+ /** 当前 Store 与 WorkspaceTools 共用的 Workspace 文件能力。 */
24
+ files;
25
+ /** 当前 Agent 的稳定标识。 */
26
+ agent_id;
27
+ /** 已创建的 Session Store 缓存。 */
28
+ sessions = new Map();
29
+ constructor(options) {
30
+ this.files = options.files;
31
+ this.agent_id = options.agent_id;
32
+ }
33
+ /** 返回指定 Session 的稳定持久化视图。 */
34
+ session(session_id) {
35
+ const resolved_session_id = String(session_id || "").trim();
36
+ if (!resolved_session_id) {
37
+ throw new Error("AgentStore.session requires a non-empty session_id");
38
+ }
39
+ const cached = this.sessions.get(resolved_session_id);
40
+ if (cached)
41
+ return cached;
42
+ const created = new LocalSessionStore({
43
+ files: this.files,
44
+ agent_id: this.agent_id,
45
+ session_id: resolved_session_id,
46
+ });
47
+ this.sessions.set(resolved_session_id, created);
48
+ return created;
49
+ }
50
+ /** 判断活动 Session 是否存在。 */
51
+ async has_session(session_id) {
52
+ return await this.files.path_exists(this.session_path(session_id));
53
+ }
54
+ /** 永久删除活动 Session。 */
55
+ async remove_session(session_id) {
56
+ const session_path = this.session_path(session_id);
57
+ const existed = await this.files.path_exists(session_path);
58
+ if (existed)
59
+ await this.files.remove_path(session_path);
60
+ this.sessions.delete(session_id);
61
+ return existed;
62
+ }
63
+ /** 清空活动 Session Message 数据。 */
64
+ async clear_session_messages(session_id) {
65
+ const messages_path = get_sdk_agent_session_messages_dir_path(this.files.root_path, this.agent_id, session_id);
66
+ const existed = await this.files.path_exists(messages_path);
67
+ if (existed)
68
+ await this.files.remove_path(messages_path);
69
+ this.sessions.delete(session_id);
70
+ return existed;
71
+ }
72
+ /** 返回活动 Session 摘要页。 */
73
+ async list_sessions(input, executing_session_ids) {
74
+ return await list_agent_session_summary_page({
75
+ project_root: this.files.root_path,
76
+ agent_id: this.agent_id,
77
+ input,
78
+ executingSessionIds: new Set(executing_session_ids),
79
+ files: this.files,
80
+ });
81
+ }
82
+ /** 将活动 Session 迁入归档区。 */
83
+ async archive_session(session_id) {
84
+ const source_path = this.session_path(session_id);
85
+ if (!(await this.files.path_exists(source_path))) {
86
+ throw new Error(`Session "${session_id}" not found`);
87
+ }
88
+ const target_path = get_sdk_agent_archived_session_dir_path(this.files.root_path, this.agent_id, session_id);
89
+ if (await this.files.path_exists(target_path)) {
90
+ throw new Error(`Archived session "${session_id}" already exists`);
91
+ }
92
+ await this.files.ensure_directory(get_sdk_agent_archived_sessions_dir_path(this.files.root_path, this.agent_id));
93
+ await this.files.move_path(source_path, target_path);
94
+ this.sessions.delete(session_id);
95
+ return {
96
+ session_id: session_id,
97
+ archived_at: Date.now(),
98
+ };
99
+ }
100
+ /** 返回归档 Session 摘要页。 */
101
+ async list_archived_sessions(input) {
102
+ return await list_archived_agent_session_summary_page({
103
+ project_root: this.files.root_path,
104
+ agent_id: this.agent_id,
105
+ input,
106
+ files: this.files,
107
+ });
108
+ }
109
+ /** 永久删除全部归档 Session。 */
110
+ async clean_archive() {
111
+ const archive_path = get_sdk_agent_archived_sessions_dir_path(this.files.root_path, this.agent_id);
112
+ if (!(await this.files.path_exists(archive_path))) {
113
+ return { removed_session_ids: [] };
114
+ }
115
+ const entries = await this.files.read_directory(archive_path);
116
+ const removed_session_ids = [];
117
+ for (const entry of entries) {
118
+ if (!entry.is_directory)
119
+ continue;
120
+ const session_id = decode_session_id(entry.name);
121
+ if (!session_id)
122
+ continue;
123
+ await this.files.remove_path(get_sdk_agent_archived_session_dir_path(this.files.root_path, this.agent_id, session_id));
124
+ removed_session_ids.push(session_id);
125
+ }
126
+ return { removed_session_ids: removed_session_ids };
127
+ }
128
+ /** 本地 JSONL Store 当前没有常驻句柄。 */
129
+ async dispose() { }
130
+ /** 返回活动 Session 物理目录,仅供本地实现内部使用。 */
131
+ session_path(session_id) {
132
+ return get_sdk_agent_session_dir_path(this.files.root_path, this.agent_id, session_id);
133
+ }
134
+ }
135
+ //# sourceMappingURL=LocalAgentStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalAgentStore.js","sourceRoot":"","sources":["../../../src/workspace/store/LocalAgentStore.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAYH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EACL,uCAAuC,EACvC,wCAAwC,EACxC,8BAA8B,EAC9B,uCAAuC,GACxC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,wCAAwC,EACxC,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AAIpC,kCAAkC;AAClC,SAAS,iBAAiB,CAAC,KAAa;IACtC,I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AI,CAAC,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC;YAClD,OAAO,EAAE,mBAAmB,EAAE,EAAE,EAAE,CAAC;QACrC,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;QAC9D,MAAM,mBAAmB,GAAa,EAAE,CAAC;QACzC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,IAAI,CAAC,KAAK,CAAC,YAAY;gBAAE,SAAS;YAClC,MAAM,UAAU,GAAG,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACjD,IAAI,CAAC,UAAU;gBAAE,SAAS;YAC1B,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,uCAAuC,CAClE,IAAI,CAAC,KAAK,CAAC,SAAS,EACpB,IAAI,CAAC,QAAQ,EACb,UAAU,CACX,CAAC,CAAC;YACH,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;IACtD,CAAC;IAED,+BAA+B;IAC/B,KAAK,CAAC,OAAO,KAAmB,CAAC;IAEjC,oCAAoC;IAC5B,YAAY,CAAC,UAAkB;QACrC,OAAO,8BAA8B,CACnC,IAAI,CAAC,KAAK,CAAC,SAAS,EACpB,IAAI,CAAC,QAAQ,EACb,UAAU,CACX,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * LocalSessionStore:Workspace 内单个 Session 的 JSONL 持久化视图。
3
+ *
4
+ * 职责说明(中文)
5
+ * - 集中创建 Message Store,并封装 Metadata 与 Instruction 的物理路径。
6
+ * - Session 领域只持有本对象,不再自行拼接任何存储路径。
7
+ */
8
+ import { JsonlSessionMessageStore } from "../../workspace/store/JsonlSessionMessageStore.js";
9
+ import type { SessionHistoryMetaV1 } from "../../executor/types/SessionHistoryMeta.js";
10
+ import type { SessionStore } from "../../types/store/SessionStore.js";
11
+ import type { LocalSessionStoreOptions } from "../../types/store/LocalStore.js";
12
+ /** 本地 Session Store。 */
13
+ export declare class LocalSessionStore implements SessionStore {
14
+ /** 当前 Session 的稳定标识。 */
15
+ readonly session_id: string;
16
+ /** 当前 Session 的 JSONL Message Store。 */
17
+ readonly messages: JsonlSessionMessageStore;
18
+ /** 当前 Store 与 WorkspaceTools 共用的 Workspace 文件能力。 */
19
+ private readonly files;
20
+ /** 当前 Agent 的稳定标识。 */
21
+ private readonly agent_id;
22
+ constructor(options: LocalSessionStoreOptions);
23
+ /** 读取规范化 Session Metadata。 */
24
+ read_metadata(): Promise<SessionHistoryMetaV1>;
25
+ /** 写入完整 Session Metadata。 */
26
+ write_metadata(metadata: SessionHistoryMetaV1): Promise<void>;
27
+ /** 判断显式 system 快照是否存在。 */
28
+ has_instruction(): Promise<boolean>;
29
+ /** 读取显式 system 快照。 */
30
+ read_instruction(): Promise<string | null>;
31
+ /** 写入显式 system 快照。 */
32
+ write_instruction(instruction: string): Promise<void>;
33
+ /** 返回当前 Session instruction.md 的 Workspace 路径。 */
34
+ private instruction_path;
35
+ /** 返回当前 Session meta.json 的 Workspace 路径。 */
36
+ private metadata_path;
37
+ }
38
+ //# sourceMappingURL=LocalSessionStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalSessionStore.d.ts","sourceRoot":"","sources":["../../../src/workspace/store/LocalSessionStore.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;AAQzF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAE5E,wBAAwB;AACxB,qBAAa,iBAAkB,YAAW,YAAY;IACpD,wBAAwB;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,wCAAwC;IACxC,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;IAE5C,oDAAoD;IACpD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAa;IAEnC,sBAAsB;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;gBAEtB,OAAO,EAAE,wBAAwB;IAoB7C,8BAA8B;IACxB,aAAa,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAWpD,6BAA6B;IACvB,cAAc,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAOnE,0BAA0B;IACpB,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC;IAIzC,sBAAsB;IAChB,gBAAgB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAKhD,sBAAsB;IAChB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAS3D,kDAAkD;IAClD,OAAO,CAAC,gBAAgB;IAQxB,6CAA6C;IAC7C,OAAO,CAAC,aAAa;CAOtB"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * LocalSessionStore:Workspace 内单个 Session 的 JSONL 持久化视图。
3
+ *
4
+ * 职责说明(中文)
5
+ * - 集中创建 Message Store,并封装 Metadata 与 Instruction 的物理路径。
6
+ * - Session 领域只持有本对象,不再自行拼接任何存储路径。
7
+ */
8
+ import { JsonlSessionMessageStore } from "../../workspace/store/JsonlSessionMessageStore.js";
9
+ import { get_sdk_agent_session_instruction_path, get_sdk_agent_session_meta_path, get_sdk_agent_session_assistant_message_path, get_sdk_agent_session_messages_path, } from "../../workspace/store/LocalStorePaths.js";
10
+ import { normalize_session_metadata } from "../../session/storage/Metadata.js";
11
+ /** 本地 Session Store。 */
12
+ export class LocalSessionStore {
13
+ /** 当前 Session 的稳定标识。 */
14
+ session_id;
15
+ /** 当前 Session 的 JSONL Message Store。 */
16
+ messages;
17
+ /** 当前 Store 与 WorkspaceTools 共用的 Workspace 文件能力。 */
18
+ files;
19
+ /** 当前 Agent 的稳定标识。 */
20
+ agent_id;
21
+ constructor(options) {
22
+ this.files = options.files;
23
+ this.agent_id = options.agent_id;
24
+ this.session_id = options.session_id;
25
+ this.messages = new JsonlSessionMessageStore({
26
+ files: this.files,
27
+ session_id: this.session_id,
28
+ file_path: get_sdk_agent_session_messages_path(this.files.root_path, this.agent_id, this.session_id),
29
+ assistant_message_file_path: get_sdk_agent_session_assistant_message_path(this.files.root_path, this.agent_id, this.session_id),
30
+ });
31
+ }
32
+ /** 读取规范化 Session Metadata。 */
33
+ async read_metadata() {
34
+ try {
35
+ const raw = JSON.parse((await this.files.read_file(this.metadata_path())).toString("utf8"));
36
+ return normalize_session_metadata(raw, this.session_id, this.agent_id);
37
+ }
38
+ catch {
39
+ return normalize_session_metadata({}, this.session_id, this.agent_id);
40
+ }
41
+ }
42
+ /** 写入完整 Session Metadata。 */
43
+ async write_metadata(metadata) {
44
+ await this.files.write_file_atomically(this.metadata_path(), `${JSON.stringify(metadata, null, 2)}\n`);
45
+ }
46
+ /** 判断显式 system 快照是否存在。 */
47
+ async has_instruction() {
48
+ return await this.files.path_exists(this.instruction_path());
49
+ }
50
+ /** 读取显式 system 快照。 */
51
+ async read_instruction() {
52
+ if (!(await this.has_instruction()))
53
+ return null;
54
+ return (await this.files.read_file(this.instruction_path())).toString("utf8");
55
+ }
56
+ /** 写入显式 system 快照。 */
57
+ async write_instruction(instruction) {
58
+ const instruction_path = get_sdk_agent_session_instruction_path(this.files.root_path, this.agent_id, this.session_id);
59
+ await this.files.write_file_atomically(instruction_path, instruction);
60
+ }
61
+ /** 返回当前 Session instruction.md 的 Workspace 路径。 */
62
+ instruction_path() {
63
+ return get_sdk_agent_session_instruction_path(this.files.root_path, this.agent_id, this.session_id);
64
+ }
65
+ /** 返回当前 Session meta.json 的 Workspace 路径。 */
66
+ metadata_path() {
67
+ return get_sdk_agent_session_meta_path(this.files.root_path, this.agent_id, this.session_id);
68
+ }
69
+ }
70
+ //# sourceMappingURL=LocalSessionStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalSessionStore.js","sourceRoot":"","sources":["../../../src/workspace/store/LocalSessionStore.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;AACzF,OAAO,EACL,sCAAsC,EACtC,+BAA+B,EAC/B,4CAA4C,EAC5C,mCAAmC,GACpC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAM3E,wBAAwB;AACxB,MAAM,OAAO,iBAAiB;IAC5B,wBAAwB;IACf,UAAU,CAAS;IAE5B,wCAAwC;IAC/B,QAAQ,CAA2B;IAE5C,oDAAoD;IACnC,KAAK,CAAa;IAEnC,sBAAsB;IACL,QAAQ,CAAS;IAElC,YAAY,OAAiC;QAC3C,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,IAAI,wBAAwB,CAAC;YAC3C,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,SAAS,EAAE,mCAAmC,CAC5C,IAAI,CAAC,KAAK,CAAC,SAAS,EACpB,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,UAAU,CAChB;YACD,2BAA2B,EAAE,4CAA4C,CACvE,IAAI,CAAC,KAAK,CAAC,SAAS,EACpB,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,UAAU,CAChB;SACF,CAAC,CAAC;IACL,CAAC;IAED,8BAA8B;IAC9B,KAAK,CAAC,a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,EACb,IAAI,CAAC,UAAU,CAChB,CAAC;QACF,MAAM,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;IACxE,CAAC;IAED,kDAAkD;IAC1C,gBAAgB;QACtB,OAAO,sCAAsC,CAC3C,IAAI,CAAC,KAAK,CAAC,SAAS,EACpB,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,UAAU,CAChB,CAAC;IACJ,CAAC;IAED,6CAA6C;IACrC,aAAa;QACnB,OAAO,+BAA+B,CACpC,IAAI,CAAC,KAAK,CAAC,SAAS,EACpB,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,UAAU,CAChB,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Workspace LocalAgentStore 的 Session 路径规则。
3
+ *
4
+ * 关键点(中文)
5
+ * - 所有 agent session 统一落盘到 `.downcity/agents/<agent_id>/sessions/<session_id>/...`。
6
+ * - `agent_id` 是唯一隔离维度,不再保留第二套旧 session 根目录。
7
+ */
8
+ /**
9
+ * `.downcity` 根目录路径。
10
+ */
11
+ export declare function get_sdk_downcity_dir_path(workspace_path: string): string;
12
+ /**
13
+ * SDK agents 根目录路径。
14
+ */
15
+ export declare function get_sdk_agents_root_dir_path(workspace_path: string): string;
16
+ /**
17
+ * 单个 agent 根目录路径。
18
+ */
19
+ export declare function get_sdk_agent_dir_path(workspace_path: string, agent_id: string): string;
20
+ /**
21
+ * 单个 agent 的 sessions 根目录路径。
22
+ */
23
+ export declare function get_sdk_agent_sessions_root_dir_path(workspace_path: string, agent_id: string): string;
24
+ /**
25
+ * 单个 agent 的已归档 sessions 根目录路径。
26
+ *
27
+ * 关键点(中文)
28
+ * - `archive_session` 会把整个 session 目录从 `sessions/<session_id>` 移动到此处。
29
+ * - `clean_archive` 会永久删除该目录下的全部内容。
30
+ */
31
+ export declare function get_sdk_agent_archived_sessions_dir_path(workspace_path: string, agent_id: string): string;
32
+ /**
33
+ * 单个已归档 session 的根目录路径。
34
+ */
35
+ export declare function get_sdk_agent_archived_session_dir_path(workspace_path: string, agent_id: string, session_id: string): string;
36
+ /**
37
+ * 单个已归档 session 的消息目录路径。
38
+ */
39
+ export declare function get_sdk_agent_archived_session_messages_dir_path(workspace_path: string, agent_id: string, session_id: string): string;
40
+ /**
41
+ * 单个已归档 session 的 Active JSONL 文件路径。
42
+ */
43
+ export declare function get_sdk_agent_archived_session_messages_path(workspace_path: string, agent_id: string, session_id: string): string;
44
+ /**
45
+ * 单个已归档 session 的 meta.json 路径。
46
+ */
47
+ export declare function get_sdk_agent_archived_session_meta_path(workspace_path: string, agent_id: string, session_id: string): string;
48
+ /**
49
+ * 单个 session 根目录路径。
50
+ */
51
+ export declare function get_sdk_agent_session_dir_path(workspace_path: string, agent_id: string, session_id: string): string;
52
+ /**
53
+ * 单个 session 显式固化完整 system 的 instruction.md 路径。
54
+ *
55
+ * 关键点(中文)
56
+ * - 文件不存在表示 Session 恢复时继续采用 Agent 当前 instruction。
57
+ * - 空文件表示调用方显式固化了空 system。
58
+ */
59
+ export declare function get_sdk_agent_session_instruction_path(workspace_path: string, agent_id: string, session_id: string): string;
60
+ /**
61
+ * 单个 session 的消息目录路径。
62
+ */
63
+ export declare function get_sdk_agent_session_messages_dir_path(workspace_path: string, agent_id: string, session_id: string): string;
64
+ /**
65
+ * 单个 session 的 Active JSONL 文件路径。
66
+ */
67
+ export declare function get_sdk_agent_session_messages_path(workspace_path: string, agent_id: string, session_id: string): string;
68
+ /**
69
+ * 单个 session 的 meta.json 路径。
70
+ */
71
+ export declare function get_sdk_agent_session_meta_path(workspace_path: string, agent_id: string, session_id: string): string;
72
+ /**
73
+ * 单个 session 的 inflight assistant 路径。
74
+ *
75
+ * 关键点(中文)
76
+ * - 运行中的 assistant 只保留一份增量快照。
77
+ * - step / tool 过程会持续重写这个文件,避免中途中断后过程完全丢失。
78
+ * - 完成后再把最终 assistant 合并进 `active.jsonl`,并清理该文件。
79
+ */
80
+ export declare function get_sdk_agent_session_assistant_message_path(workspace_path: string, agent_id: string, session_id: string): string;
81
+ //# sourceMappingURL=LocalStorePaths.d.ts.map