@downcity/agent 1.1.8 → 1.1.11

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 (2316) hide show
  1. package/README.md +612 -139
  2. package/bin/config/Config.d.ts +1 -1
  3. package/bin/config/Config.d.ts.map +1 -1
  4. package/bin/config/Config.js +4 -5
  5. package/bin/config/Config.js.map +1 -1
  6. package/bin/config/DowncityDefault.d.ts +3 -0
  7. package/bin/config/DowncityDefault.d.ts.map +1 -0
  8. package/bin/config/DowncityDefault.js.map +1 -0
  9. package/bin/config/DowncitySchema.d.ts +3 -0
  10. package/bin/config/DowncitySchema.d.ts.map +1 -0
  11. package/bin/config/DowncitySchema.js.map +1 -0
  12. package/bin/config/Paths.d.ts +1 -1
  13. package/bin/config/Paths.js +2 -2
  14. package/bin/host/daemon/Api.d.ts +2 -2
  15. package/bin/host/daemon/Api.js +1 -1
  16. package/bin/host/daemon/Client.js +2 -2
  17. package/bin/host/daemon/Client.js.map +1 -1
  18. package/bin/host/daemon/Paths.d.ts +20 -0
  19. package/bin/host/daemon/Paths.d.ts.map +1 -0
  20. package/bin/host/daemon/Paths.js +23 -0
  21. package/bin/host/daemon/Paths.js.map +1 -0
  22. package/bin/host/daemon/ProjectSetup.d.ts +1 -1
  23. package/bin/host/daemon/ProjectSetup.d.ts.map +1 -1
  24. package/bin/host/daemon/ProjectSetup.js +1 -1
  25. package/bin/host/daemon/ProjectSetup.js.map +1 -1
  26. package/bin/host/runtime/AgentHostRuntime.d.ts +1 -1
  27. package/bin/host/runtime/AgentHostRuntime.d.ts.map +1 -1
  28. package/bin/host/runtime/AgentHostRuntime.js +3 -3
  29. package/bin/host/runtime/AgentHostRuntime.js.map +1 -1
  30. package/bin/host/runtime/PluginRuntime.d.ts +1 -1
  31. package/bin/host/runtime/PluginRuntime.d.ts.map +1 -1
  32. package/bin/index.d.ts +64 -82
  33. package/bin/index.d.ts.map +1 -1
  34. package/bin/index.js +47 -87
  35. package/bin/index.js.map +1 -1
  36. package/bin/model/CreateModel.d.ts +2 -2
  37. package/bin/model/CreateModel.d.ts.map +1 -1
  38. package/bin/model/CreateModel.js +3 -3
  39. package/bin/model/CreateModel.js.map +1 -1
  40. package/bin/model/ModelManager.d.ts +1 -1
  41. package/bin/plugin/builtins/asr/Config.d.ts +43 -0
  42. package/bin/plugin/builtins/asr/Config.d.ts.map +1 -0
  43. package/bin/plugin/builtins/asr/Config.js +107 -0
  44. package/bin/plugin/builtins/asr/Config.js.map +1 -0
  45. package/bin/plugin/builtins/asr/Dependency.d.ts +77 -0
  46. package/bin/plugin/builtins/asr/Dependency.d.ts.map +1 -0
  47. package/bin/plugin/builtins/asr/Dependency.js +238 -0
  48. package/bin/plugin/builtins/asr/Dependency.js.map +1 -0
  49. package/bin/plugin/builtins/asr/InboundAugment.d.ts +17 -0
  50. package/bin/plugin/builtins/asr/InboundAugment.d.ts.map +1 -0
  51. package/bin/plugin/builtins/asr/InboundAugment.js +47 -0
  52. package/bin/plugin/builtins/asr/InboundAugment.js.map +1 -0
  53. package/bin/plugin/builtins/asr/ModelCatalog.d.ts.map +1 -0
  54. package/bin/plugin/builtins/asr/ModelCatalog.js +25 -0
  55. package/bin/plugin/builtins/asr/ModelCatalog.js.map +1 -0
  56. package/bin/plugin/builtins/asr/Plugin.d.ts +14 -0
  57. package/bin/plugin/builtins/asr/Plugin.d.ts.map +1 -0
  58. package/bin/plugin/builtins/asr/Plugin.js +462 -0
  59. package/bin/plugin/builtins/asr/Plugin.js.map +1 -0
  60. package/bin/plugin/builtins/auth/Plugin.d.ts +14 -0
  61. package/bin/plugin/builtins/auth/Plugin.d.ts.map +1 -0
  62. package/bin/plugin/builtins/auth/Plugin.js +181 -0
  63. package/bin/plugin/builtins/auth/Plugin.js.map +1 -0
  64. package/bin/plugin/builtins/auth/runtime/AuthorizationConfig.d.ts +41 -0
  65. package/bin/plugin/builtins/auth/runtime/AuthorizationConfig.d.ts.map +1 -0
  66. package/bin/plugin/builtins/auth/runtime/AuthorizationConfig.js +187 -0
  67. package/bin/plugin/builtins/auth/runtime/AuthorizationConfig.js.map +1 -0
  68. package/bin/plugin/builtins/auth/runtime/AuthorizationPolicy.d.ts +30 -0
  69. package/bin/plugin/builtins/auth/runtime/AuthorizationPolicy.d.ts.map +1 -0
  70. package/bin/plugin/builtins/auth/runtime/AuthorizationPolicy.js +123 -0
  71. package/bin/plugin/builtins/auth/runtime/AuthorizationPolicy.js.map +1 -0
  72. package/bin/plugin/builtins/auth/runtime/AuthorizationStore.d.ts +29 -0
  73. package/bin/plugin/builtins/auth/runtime/AuthorizationStore.d.ts.map +1 -0
  74. package/bin/plugin/builtins/auth/runtime/AuthorizationStore.js.map +1 -0
  75. package/bin/plugin/builtins/auth/types/AuthPlugin.d.ts +407 -0
  76. package/bin/plugin/builtins/auth/types/AuthPlugin.d.ts.map +1 -0
  77. package/bin/plugin/builtins/auth/types/AuthPlugin.js +115 -0
  78. package/bin/plugin/builtins/auth/types/AuthPlugin.js.map +1 -0
  79. package/bin/plugin/builtins/skill/Action.d.ts +34 -0
  80. package/bin/plugin/builtins/skill/Action.d.ts.map +1 -0
  81. package/bin/plugin/builtins/skill/Action.js +122 -0
  82. package/bin/plugin/builtins/skill/Action.js.map +1 -0
  83. package/bin/plugin/builtins/skill/Command.d.ts.map +1 -0
  84. package/bin/plugin/builtins/skill/Command.js +70 -0
  85. package/bin/plugin/builtins/skill/Command.js.map +1 -0
  86. package/bin/plugin/builtins/skill/Config.d.ts +18 -0
  87. package/bin/plugin/builtins/skill/Config.d.ts.map +1 -0
  88. package/bin/plugin/builtins/skill/Config.js.map +1 -0
  89. package/bin/plugin/builtins/skill/PROMPT.d.ts +7 -0
  90. package/bin/plugin/builtins/skill/PROMPT.d.ts.map +1 -0
  91. package/bin/plugin/builtins/skill/PROMPT.js +8 -0
  92. package/bin/plugin/builtins/skill/PROMPT.js.map +1 -0
  93. package/bin/plugin/builtins/skill/Plugin.d.ts +14 -0
  94. package/bin/plugin/builtins/skill/Plugin.d.ts.map +1 -0
  95. package/bin/plugin/builtins/skill/Plugin.js +301 -0
  96. package/bin/plugin/builtins/skill/Plugin.js.map +1 -0
  97. package/bin/plugin/builtins/skill/SkillPromptAssets.d.ts +12 -0
  98. package/bin/plugin/builtins/skill/SkillPromptAssets.d.ts.map +1 -0
  99. package/bin/plugin/builtins/skill/SkillPromptAssets.js +13 -0
  100. package/bin/plugin/builtins/skill/SkillPromptAssets.js.map +1 -0
  101. package/bin/plugin/builtins/skill/runtime/Discovery.d.ts +25 -0
  102. package/bin/plugin/builtins/skill/runtime/Discovery.d.ts.map +1 -0
  103. package/bin/plugin/builtins/skill/runtime/Discovery.js.map +1 -0
  104. package/bin/plugin/builtins/skill/runtime/Frontmatter.d.ts.map +1 -0
  105. package/bin/plugin/builtins/skill/runtime/Frontmatter.js.map +1 -0
  106. package/bin/plugin/builtins/skill/runtime/Paths.d.ts +16 -0
  107. package/bin/plugin/builtins/skill/runtime/Paths.d.ts.map +1 -0
  108. package/bin/plugin/builtins/skill/runtime/Paths.js.map +1 -0
  109. package/bin/plugin/builtins/skill/runtime/Prompt.d.ts +19 -0
  110. package/bin/plugin/builtins/skill/runtime/Prompt.d.ts.map +1 -0
  111. package/bin/plugin/builtins/skill/runtime/Prompt.js +54 -0
  112. package/bin/plugin/builtins/skill/runtime/Prompt.js.map +1 -0
  113. package/bin/plugin/builtins/skill/runtime/Store.d.ts +25 -0
  114. package/bin/plugin/builtins/skill/runtime/Store.d.ts.map +1 -0
  115. package/bin/plugin/builtins/skill/runtime/Store.js.map +1 -0
  116. package/bin/plugin/builtins/skill/runtime/SystemProvider.d.ts +24 -0
  117. package/bin/plugin/builtins/skill/runtime/SystemProvider.d.ts.map +1 -0
  118. package/bin/plugin/builtins/skill/runtime/SystemProvider.js +33 -0
  119. package/bin/plugin/builtins/skill/runtime/SystemProvider.js.map +1 -0
  120. package/bin/plugin/builtins/skill/runtime/Types.d.ts +21 -0
  121. package/bin/plugin/builtins/skill/runtime/Types.d.ts.map +1 -0
  122. package/bin/plugin/builtins/skill/runtime/Types.js.map +1 -0
  123. package/bin/plugin/builtins/skill/runtime/Utils.d.ts.map +1 -0
  124. package/bin/plugin/builtins/skill/runtime/Utils.js.map +1 -0
  125. package/bin/plugin/builtins/skill/types/ClaudeSkill.d.ts +63 -0
  126. package/bin/plugin/builtins/skill/types/ClaudeSkill.d.ts.map +1 -0
  127. package/bin/plugin/builtins/skill/types/ClaudeSkill.js.map +1 -0
  128. package/bin/plugin/builtins/skill/types/SkillCommand.d.ts.map +1 -0
  129. package/bin/plugin/builtins/skill/types/SkillCommand.js.map +1 -0
  130. package/bin/plugin/builtins/skill/types/SkillPlugin.d.ts.map +1 -0
  131. package/bin/plugin/builtins/skill/types/SkillPlugin.js.map +1 -0
  132. package/bin/plugin/builtins/skill/types/SkillRoot.d.ts.map +1 -0
  133. package/bin/plugin/builtins/skill/types/SkillRoot.js.map +1 -0
  134. package/bin/plugin/builtins/tts/Dependency.d.ts +90 -0
  135. package/bin/plugin/builtins/tts/Dependency.d.ts.map +1 -0
  136. package/bin/plugin/builtins/tts/Dependency.js +344 -0
  137. package/bin/plugin/builtins/tts/Dependency.js.map +1 -0
  138. package/bin/plugin/builtins/tts/Plugin.d.ts +13 -0
  139. package/bin/plugin/builtins/tts/Plugin.d.ts.map +1 -0
  140. package/bin/plugin/builtins/tts/Plugin.js +472 -0
  141. package/bin/plugin/builtins/tts/Plugin.js.map +1 -0
  142. package/bin/plugin/builtins/tts/PluginSupport.d.ts +25 -0
  143. package/bin/plugin/builtins/tts/PluginSupport.d.ts.map +1 -0
  144. package/bin/plugin/builtins/tts/PluginSupport.js +72 -0
  145. package/bin/plugin/builtins/tts/PluginSupport.js.map +1 -0
  146. package/bin/plugin/builtins/tts/runtime/Catalog.d.ts +21 -0
  147. package/bin/plugin/builtins/tts/runtime/Catalog.d.ts.map +1 -0
  148. package/bin/plugin/builtins/tts/runtime/Catalog.js.map +1 -0
  149. package/bin/plugin/builtins/tts/runtime/DependencyInstaller.d.ts +143 -0
  150. package/bin/plugin/builtins/tts/runtime/DependencyInstaller.d.ts.map +1 -0
  151. package/bin/plugin/builtins/tts/runtime/DependencyInstaller.js.map +1 -0
  152. package/bin/plugin/builtins/tts/runtime/Installer.d.ts +89 -0
  153. package/bin/plugin/builtins/tts/runtime/Installer.d.ts.map +1 -0
  154. package/bin/plugin/builtins/tts/runtime/Installer.js.map +1 -0
  155. package/bin/plugin/builtins/tts/runtime/Paths.d.ts.map +1 -0
  156. package/bin/plugin/builtins/tts/runtime/Paths.js.map +1 -0
  157. package/bin/plugin/builtins/tts/runtime/Synthesizer.d.ts +44 -0
  158. package/bin/plugin/builtins/tts/runtime/Synthesizer.d.ts.map +1 -0
  159. package/bin/plugin/builtins/tts/runtime/Synthesizer.js +363 -0
  160. package/bin/plugin/builtins/tts/runtime/Synthesizer.js.map +1 -0
  161. package/bin/plugin/builtins/tts/types/Tts.d.ts.map +1 -0
  162. package/bin/plugin/builtins/tts/types/Tts.js.map +1 -0
  163. package/bin/plugin/builtins/tts/types/TtsPlugin.d.ts +161 -0
  164. package/bin/plugin/builtins/tts/types/TtsPlugin.d.ts.map +1 -0
  165. package/bin/plugin/builtins/tts/types/TtsPlugin.js.map +1 -0
  166. package/bin/plugin/builtins/voice/Config.d.ts +43 -0
  167. package/bin/plugin/builtins/voice/Config.d.ts.map +1 -0
  168. package/bin/plugin/builtins/voice/Config.js +104 -0
  169. package/bin/plugin/builtins/voice/Config.js.map +1 -0
  170. package/bin/plugin/builtins/voice/Dependency.d.ts +77 -0
  171. package/bin/plugin/builtins/voice/Dependency.d.ts.map +1 -0
  172. package/bin/plugin/builtins/voice/Dependency.js +237 -0
  173. package/bin/plugin/builtins/voice/Dependency.js.map +1 -0
  174. package/bin/plugin/builtins/voice/InboundAugment.d.ts +17 -0
  175. package/bin/plugin/builtins/voice/InboundAugment.d.ts.map +1 -0
  176. package/bin/plugin/builtins/voice/InboundAugment.js +47 -0
  177. package/bin/plugin/builtins/voice/InboundAugment.js.map +1 -0
  178. package/bin/plugin/builtins/voice/ModelCatalog.d.ts.map +1 -0
  179. package/bin/plugin/builtins/voice/ModelCatalog.js +25 -0
  180. package/bin/plugin/builtins/voice/ModelCatalog.js.map +1 -0
  181. package/bin/plugin/builtins/voice/Plugin.d.ts +14 -0
  182. package/bin/plugin/builtins/voice/Plugin.d.ts.map +1 -0
  183. package/bin/plugin/builtins/voice/Plugin.js +426 -0
  184. package/bin/plugin/builtins/voice/Plugin.js.map +1 -0
  185. package/bin/plugin/builtins/voice/runtime/Catalog.d.ts +18 -0
  186. package/bin/plugin/builtins/voice/runtime/Catalog.d.ts.map +1 -0
  187. package/bin/plugin/builtins/voice/runtime/Catalog.js.map +1 -0
  188. package/bin/plugin/builtins/voice/runtime/DependencyInstaller.d.ts +145 -0
  189. package/bin/plugin/builtins/voice/runtime/DependencyInstaller.d.ts.map +1 -0
  190. package/bin/plugin/builtins/voice/runtime/DependencyInstaller.js.map +1 -0
  191. package/bin/plugin/builtins/voice/runtime/Installer.d.ts +94 -0
  192. package/bin/plugin/builtins/voice/runtime/Installer.d.ts.map +1 -0
  193. package/bin/plugin/builtins/voice/runtime/Installer.js.map +1 -0
  194. package/bin/plugin/builtins/voice/runtime/Paths.d.ts.map +1 -0
  195. package/bin/plugin/builtins/voice/runtime/Paths.js.map +1 -0
  196. package/bin/plugin/builtins/voice/runtime/Transcriber.d.ts +57 -0
  197. package/bin/plugin/builtins/voice/runtime/Transcriber.d.ts.map +1 -0
  198. package/bin/plugin/builtins/voice/runtime/Transcriber.js.map +1 -0
  199. package/bin/plugin/builtins/voice/types/Voice.d.ts.map +1 -0
  200. package/bin/plugin/builtins/voice/types/Voice.js.map +1 -0
  201. package/bin/plugin/builtins/voice/types/VoicePlugin.d.ts +190 -0
  202. package/bin/plugin/builtins/voice/types/VoicePlugin.d.ts.map +1 -0
  203. package/bin/plugin/builtins/voice/types/VoicePlugin.js.map +1 -0
  204. package/bin/plugin/builtins/web/Dependency.d.ts +10 -0
  205. package/bin/plugin/builtins/web/Dependency.d.ts.map +1 -0
  206. package/bin/plugin/builtins/web/Dependency.js +10 -0
  207. package/bin/plugin/builtins/web/Dependency.js.map +1 -0
  208. package/bin/plugin/builtins/web/PROMPT.agent-browser.d.ts +7 -0
  209. package/bin/plugin/builtins/web/PROMPT.agent-browser.d.ts.map +1 -0
  210. package/bin/plugin/builtins/web/PROMPT.agent-browser.js +8 -0
  211. package/bin/plugin/builtins/web/PROMPT.agent-browser.js.map +1 -0
  212. package/bin/plugin/builtins/web/PROMPT.d.ts +7 -0
  213. package/bin/plugin/builtins/web/PROMPT.d.ts.map +1 -0
  214. package/bin/plugin/builtins/web/PROMPT.js +8 -0
  215. package/bin/plugin/builtins/web/PROMPT.js.map +1 -0
  216. package/bin/plugin/builtins/web/PROMPT.web-access.d.ts +7 -0
  217. package/bin/plugin/builtins/web/PROMPT.web-access.d.ts.map +1 -0
  218. package/bin/plugin/builtins/web/PROMPT.web-access.js +8 -0
  219. package/bin/plugin/builtins/web/PROMPT.web-access.js.map +1 -0
  220. package/bin/plugin/builtins/web/Plugin.d.ts +13 -0
  221. package/bin/plugin/builtins/web/Plugin.d.ts.map +1 -0
  222. package/bin/plugin/builtins/web/Plugin.js +459 -0
  223. package/bin/plugin/builtins/web/Plugin.js.map +1 -0
  224. package/bin/plugin/builtins/web/WebPromptAssets.d.ts +20 -0
  225. package/bin/plugin/builtins/web/WebPromptAssets.d.ts.map +1 -0
  226. package/bin/plugin/builtins/web/WebPromptAssets.js +23 -0
  227. package/bin/plugin/builtins/web/WebPromptAssets.js.map +1 -0
  228. package/bin/plugin/builtins/web/runtime/Config.d.ts +21 -0
  229. package/bin/plugin/builtins/web/runtime/Config.d.ts.map +1 -0
  230. package/bin/plugin/builtins/web/runtime/Config.js +79 -0
  231. package/bin/plugin/builtins/web/runtime/Config.js.map +1 -0
  232. package/bin/plugin/builtins/web/runtime/Source.d.ts +29 -0
  233. package/bin/plugin/builtins/web/runtime/Source.d.ts.map +1 -0
  234. package/bin/plugin/builtins/web/runtime/Source.js +209 -0
  235. package/bin/plugin/builtins/web/runtime/Source.js.map +1 -0
  236. package/bin/plugin/builtins/web/types/WebPlugin.d.ts +133 -0
  237. package/bin/plugin/builtins/web/types/WebPlugin.d.ts.map +1 -0
  238. package/bin/plugin/builtins/web/types/WebPlugin.js.map +1 -0
  239. package/bin/plugin/builtins/workboard/Plugin.d.ts +13 -0
  240. package/bin/plugin/builtins/workboard/Plugin.d.ts.map +1 -0
  241. package/bin/plugin/builtins/workboard/Plugin.js +71 -0
  242. package/bin/plugin/builtins/workboard/Plugin.js.map +1 -0
  243. package/bin/plugin/builtins/workboard/runtime/Collector.d.ts +14 -0
  244. package/bin/plugin/builtins/workboard/runtime/Collector.d.ts.map +1 -0
  245. package/bin/plugin/builtins/workboard/runtime/Collector.js +62 -0
  246. package/bin/plugin/builtins/workboard/runtime/Collector.js.map +1 -0
  247. package/bin/plugin/builtins/workboard/runtime/Normalizer.d.ts +61 -0
  248. package/bin/plugin/builtins/workboard/runtime/Normalizer.d.ts.map +1 -0
  249. package/bin/plugin/builtins/workboard/runtime/Normalizer.js.map +1 -0
  250. package/bin/plugin/builtins/workboard/runtime/Store.d.ts +48 -0
  251. package/bin/plugin/builtins/workboard/runtime/Store.d.ts.map +1 -0
  252. package/bin/plugin/builtins/workboard/runtime/Store.js +84 -0
  253. package/bin/plugin/builtins/workboard/runtime/Store.js.map +1 -0
  254. package/bin/plugin/builtins/workboard/types/Workboard.d.ts.map +1 -0
  255. package/bin/plugin/builtins/workboard/types/Workboard.js.map +1 -0
  256. package/bin/plugin/core/Activation.d.ts +19 -0
  257. package/bin/plugin/core/Activation.d.ts.map +1 -0
  258. package/bin/plugin/core/Activation.js.map +1 -0
  259. package/bin/plugin/core/Catalog.d.ts +42 -0
  260. package/bin/plugin/core/Catalog.d.ts.map +1 -0
  261. package/bin/plugin/core/Catalog.js +92 -0
  262. package/bin/plugin/core/Catalog.js.map +1 -0
  263. package/bin/plugin/core/HookRegistry.d.ts +68 -0
  264. package/bin/plugin/core/HookRegistry.d.ts.map +1 -0
  265. package/bin/plugin/core/HookRegistry.js.map +1 -0
  266. package/bin/plugin/core/HttpRoutes.d.ts +22 -0
  267. package/bin/plugin/core/HttpRoutes.d.ts.map +1 -0
  268. package/bin/plugin/core/HttpRoutes.js +37 -0
  269. package/bin/plugin/core/HttpRoutes.js.map +1 -0
  270. package/bin/plugin/core/LocalExecution.d.ts +32 -0
  271. package/bin/plugin/core/LocalExecution.d.ts.map +1 -0
  272. package/bin/plugin/core/LocalExecution.js +148 -0
  273. package/bin/plugin/core/LocalExecution.js.map +1 -0
  274. package/bin/plugin/core/PluginCommand.d.ts.map +1 -0
  275. package/bin/plugin/core/PluginCommand.js +188 -0
  276. package/bin/plugin/core/PluginCommand.js.map +1 -0
  277. package/bin/plugin/core/PluginManager.d.ts +24 -0
  278. package/bin/plugin/core/PluginManager.d.ts.map +1 -0
  279. package/bin/plugin/core/PluginManager.js +62 -0
  280. package/bin/plugin/core/PluginManager.js.map +1 -0
  281. package/bin/plugin/core/PluginRegistry.d.ts +66 -0
  282. package/bin/plugin/core/PluginRegistry.d.ts.map +1 -0
  283. package/bin/plugin/core/PluginRegistry.js +184 -0
  284. package/bin/plugin/core/PluginRegistry.js.map +1 -0
  285. package/bin/plugin/core/Plugins.d.ts +20 -0
  286. package/bin/plugin/core/Plugins.d.ts.map +1 -0
  287. package/bin/plugin/core/Plugins.js +33 -0
  288. package/bin/plugin/core/Plugins.js.map +1 -0
  289. package/bin/plugin/core/ProjectConfigStore.d.ts +30 -0
  290. package/bin/plugin/core/ProjectConfigStore.d.ts.map +1 -0
  291. package/bin/plugin/core/ProjectConfigStore.js.map +1 -0
  292. package/bin/plugin/types/Plugin.d.ts +697 -0
  293. package/bin/plugin/types/Plugin.d.ts.map +1 -0
  294. package/bin/plugin/types/Plugin.js.map +1 -0
  295. package/bin/plugin/types/PluginApi.d.ts +155 -0
  296. package/bin/plugin/types/PluginApi.d.ts.map +1 -0
  297. package/bin/plugin/types/PluginApi.js.map +1 -0
  298. package/bin/plugin/types/PluginLifecycle.d.ts.map +1 -0
  299. package/bin/plugin/types/PluginLifecycle.js.map +1 -0
  300. package/bin/project/AgentInitializer.d.ts +39 -0
  301. package/bin/project/AgentInitializer.d.ts.map +1 -0
  302. package/bin/project/AgentInitializer.js +339 -0
  303. package/bin/project/AgentInitializer.js.map +1 -0
  304. package/bin/project/ProjectExecutionBinding.d.ts +27 -0
  305. package/bin/project/ProjectExecutionBinding.d.ts.map +1 -0
  306. package/bin/project/ProjectExecutionBinding.js.map +1 -0
  307. package/bin/project/types/AgentProject.d.ts +80 -0
  308. package/bin/project/types/AgentProject.d.ts.map +1 -0
  309. package/bin/project/types/AgentProject.js.map +1 -0
  310. package/bin/runtime/AgentContext.d.ts +23 -0
  311. package/bin/runtime/AgentContext.d.ts.map +1 -0
  312. package/bin/runtime/AgentContext.js +149 -0
  313. package/bin/runtime/AgentContext.js.map +1 -0
  314. package/bin/runtime/AgentContextTypes.d.ts +349 -0
  315. package/bin/runtime/AgentContextTypes.d.ts.map +1 -0
  316. package/bin/runtime/AgentContextTypes.js.map +1 -0
  317. package/bin/runtime/AgentRuntime.d.ts +37 -0
  318. package/bin/runtime/AgentRuntime.d.ts.map +1 -0
  319. package/bin/runtime/AgentRuntime.js +296 -0
  320. package/bin/runtime/AgentRuntime.js.map +1 -0
  321. package/bin/runtime/AgentRuntimeState.d.ts +42 -0
  322. package/bin/runtime/AgentRuntimeState.d.ts.map +1 -0
  323. package/bin/runtime/AgentRuntimeState.js.map +1 -0
  324. package/bin/runtime/AgentRuntimeTypes.d.ts +85 -0
  325. package/bin/runtime/AgentRuntimeTypes.d.ts.map +1 -0
  326. package/bin/runtime/AgentRuntimeTypes.js.map +1 -0
  327. package/bin/sandbox/MacOsSeatbeltSandbox.d.ts +1 -1
  328. package/bin/sandbox/SandboxConfigResolver.d.ts +2 -2
  329. package/bin/sandbox/SandboxConfigResolver.d.ts.map +1 -1
  330. package/bin/sandbox/SandboxRunner.d.ts +2 -2
  331. package/bin/sandbox/SandboxRunner.d.ts.map +1 -1
  332. package/bin/sandbox/types/Sandbox.d.ts +130 -0
  333. package/bin/sandbox/types/Sandbox.d.ts.map +1 -0
  334. package/bin/sandbox/types/Sandbox.js +10 -0
  335. package/bin/sandbox/types/Sandbox.js.map +1 -0
  336. package/bin/sandbox/types/SandboxRuntime.d.ts +318 -0
  337. package/bin/sandbox/types/SandboxRuntime.d.ts.map +1 -0
  338. package/bin/sandbox/types/SandboxRuntime.js.map +1 -0
  339. package/bin/sdk/Agent.d.ts +64 -0
  340. package/bin/sdk/Agent.d.ts.map +1 -0
  341. package/bin/sdk/Agent.js +377 -0
  342. package/bin/sdk/Agent.js.map +1 -0
  343. package/bin/sdk/AgentSdkTypes.d.ts +266 -0
  344. package/bin/sdk/AgentSdkTypes.d.ts.map +1 -0
  345. package/bin/sdk/AgentSdkTypes.js.map +1 -0
  346. package/bin/sdk/AsyncQueue.d.ts.map +1 -0
  347. package/bin/sdk/AsyncQueue.js.map +1 -0
  348. package/bin/sdk/HttpServer.d.ts +40 -0
  349. package/bin/sdk/HttpServer.d.ts.map +1 -0
  350. package/bin/sdk/HttpServer.js +189 -0
  351. package/bin/sdk/HttpServer.js.map +1 -0
  352. package/bin/sdk/Paths.d.ts.map +1 -0
  353. package/bin/sdk/Paths.js.map +1 -0
  354. package/bin/sdk/RemoteAgent.d.ts +58 -0
  355. package/bin/sdk/RemoteAgent.d.ts.map +1 -0
  356. package/bin/sdk/RemoteAgent.js +164 -0
  357. package/bin/sdk/RemoteAgent.js.map +1 -0
  358. package/bin/sdk/RpcServer.d.ts +31 -0
  359. package/bin/sdk/RpcServer.d.ts.map +1 -0
  360. package/bin/sdk/RpcServer.js +207 -0
  361. package/bin/sdk/RpcServer.js.map +1 -0
  362. package/bin/sdk/SdkSessionSystemComposer.d.ts +73 -0
  363. package/bin/sdk/SdkSessionSystemComposer.d.ts.map +1 -0
  364. package/bin/sdk/SdkSessionSystemComposer.js +96 -0
  365. package/bin/sdk/SdkSessionSystemComposer.js.map +1 -0
  366. package/bin/sdk/Session.d.ts +143 -0
  367. package/bin/sdk/Session.d.ts.map +1 -0
  368. package/bin/sdk/Session.js +358 -0
  369. package/bin/sdk/Session.js.map +1 -0
  370. package/bin/sdk/SessionMetadata.d.ts +51 -0
  371. package/bin/sdk/SessionMetadata.d.ts.map +1 -0
  372. package/bin/sdk/SessionMetadata.js +124 -0
  373. package/bin/sdk/SessionMetadata.js.map +1 -0
  374. package/bin/sdk/SessionPersistence.d.ts +63 -0
  375. package/bin/sdk/SessionPersistence.d.ts.map +1 -0
  376. package/bin/sdk/SessionPersistence.js +52 -0
  377. package/bin/sdk/SessionPersistence.js.map +1 -0
  378. package/bin/sdk/SessionServicePort.d.ts +34 -0
  379. package/bin/sdk/SessionServicePort.d.ts.map +1 -0
  380. package/bin/sdk/SessionServicePort.js +36 -0
  381. package/bin/sdk/SessionServicePort.js.map +1 -0
  382. package/bin/sdk/StreamEvents.d.ts +36 -0
  383. package/bin/sdk/StreamEvents.d.ts.map +1 -0
  384. package/bin/sdk/StreamEvents.js +116 -0
  385. package/bin/sdk/StreamEvents.js.map +1 -0
  386. package/bin/server/http/Server.d.ts.map +1 -0
  387. package/bin/server/http/Server.js +112 -0
  388. package/bin/server/http/Server.js.map +1 -0
  389. package/bin/server/http/auth/AuthEnv.d.ts.map +1 -0
  390. package/bin/server/http/auth/AuthEnv.js.map +1 -0
  391. package/bin/server/http/auth/AuthError.d.ts.map +1 -0
  392. package/bin/server/http/auth/AuthError.js.map +1 -0
  393. package/bin/server/http/auth/CliAuthStateStore.d.ts.map +1 -0
  394. package/bin/server/http/auth/CliAuthStateStore.js.map +1 -0
  395. package/bin/server/http/auth/PasswordHasher.d.ts.map +1 -0
  396. package/bin/server/http/auth/PasswordHasher.js.map +1 -0
  397. package/bin/server/http/auth/TokenService.d.ts.map +1 -0
  398. package/bin/server/http/auth/TokenService.js.map +1 -0
  399. package/bin/server/http/control/AuthControlService.d.ts +30 -0
  400. package/bin/server/http/control/AuthControlService.d.ts.map +1 -0
  401. package/bin/server/http/control/AuthControlService.js +120 -0
  402. package/bin/server/http/control/AuthControlService.js.map +1 -0
  403. package/bin/server/http/control/CommonHelpers.d.ts.map +1 -0
  404. package/bin/server/http/control/CommonHelpers.js.map +1 -0
  405. package/bin/server/http/control/ControlApiRoutes.d.ts +14 -0
  406. package/bin/server/http/control/ControlApiRoutes.d.ts.map +1 -0
  407. package/bin/server/http/control/ControlApiRoutes.js +27 -0
  408. package/bin/server/http/control/ControlApiRoutes.js.map +1 -0
  409. package/bin/server/http/control/ControlAuthorizationRoutes.d.ts +17 -0
  410. package/bin/server/http/control/ControlAuthorizationRoutes.d.ts.map +1 -0
  411. package/bin/server/http/control/ControlAuthorizationRoutes.js +85 -0
  412. package/bin/server/http/control/ControlAuthorizationRoutes.js.map +1 -0
  413. package/bin/server/http/control/ControlRouter.d.ts +19 -0
  414. package/bin/server/http/control/ControlRouter.d.ts.map +1 -0
  415. package/bin/server/http/control/ControlRouter.js +26 -0
  416. package/bin/server/http/control/ControlRouter.js.map +1 -0
  417. package/bin/server/http/control/ExecuteBySession.d.ts +39 -0
  418. package/bin/server/http/control/ExecuteBySession.d.ts.map +1 -0
  419. package/bin/server/http/control/ExecuteBySession.js +128 -0
  420. package/bin/server/http/control/ExecuteBySession.js.map +1 -0
  421. package/bin/server/http/control/ExecuteInput.d.ts +18 -0
  422. package/bin/server/http/control/ExecuteInput.d.ts.map +1 -0
  423. package/bin/server/http/control/ExecuteInput.js +201 -0
  424. package/bin/server/http/control/ExecuteInput.js.map +1 -0
  425. package/bin/server/http/control/Helpers.d.ts.map +1 -0
  426. package/bin/server/http/control/Helpers.js.map +1 -0
  427. package/bin/server/http/control/MessageTimeline.d.ts +22 -0
  428. package/bin/server/http/control/MessageTimeline.d.ts.map +1 -0
  429. package/bin/server/http/control/MessageTimeline.js +226 -0
  430. package/bin/server/http/control/MessageTimeline.js.map +1 -0
  431. package/bin/server/http/control/ModelRoutes.d.ts +13 -0
  432. package/bin/server/http/control/ModelRoutes.d.ts.map +1 -0
  433. package/bin/server/http/control/ModelRoutes.js +87 -0
  434. package/bin/server/http/control/ModelRoutes.js.map +1 -0
  435. package/bin/server/http/control/OverviewRoutes.d.ts +13 -0
  436. package/bin/server/http/control/OverviewRoutes.d.ts.map +1 -0
  437. package/bin/server/http/control/OverviewRoutes.js +93 -0
  438. package/bin/server/http/control/OverviewRoutes.js.map +1 -0
  439. package/bin/server/http/control/SessionRoutes.d.ts +14 -0
  440. package/bin/server/http/control/SessionRoutes.d.ts.map +1 -0
  441. package/bin/server/http/control/SessionRoutes.js +333 -0
  442. package/bin/server/http/control/SessionRoutes.js.map +1 -0
  443. package/bin/server/http/control/SessionSummaryStore.d.ts +19 -0
  444. package/bin/server/http/control/SessionSummaryStore.d.ts.map +1 -0
  445. package/bin/server/http/control/SessionSummaryStore.js +62 -0
  446. package/bin/server/http/control/SessionSummaryStore.js.map +1 -0
  447. package/bin/server/http/control/TaskRoutes.d.ts +13 -0
  448. package/bin/server/http/control/TaskRoutes.d.ts.map +1 -0
  449. package/bin/server/http/control/TaskRoutes.js +335 -0
  450. package/bin/server/http/control/TaskRoutes.js.map +1 -0
  451. package/bin/server/http/control/TaskStore.d.ts +33 -0
  452. package/bin/server/http/control/TaskStore.d.ts.map +1 -0
  453. package/bin/server/http/control/TaskStore.js +157 -0
  454. package/bin/server/http/control/TaskStore.js.map +1 -0
  455. package/bin/server/http/control/types/AuthControl.d.ts +30 -0
  456. package/bin/server/http/control/types/AuthControl.d.ts.map +1 -0
  457. package/bin/server/http/control/types/AuthControl.js.map +1 -0
  458. package/bin/server/http/control/types/ControlRoutes.d.ts +28 -0
  459. package/bin/server/http/control/types/ControlRoutes.d.ts.map +1 -0
  460. package/bin/server/http/control/types/ControlRoutes.js.map +1 -0
  461. package/bin/server/http/control/types/ControlSessionExecute.d.ts.map +1 -0
  462. package/bin/server/http/control/types/ControlSessionExecute.js.map +1 -0
  463. package/bin/server/http/control/types/ControlViewData.d.ts +320 -0
  464. package/bin/server/http/control/types/ControlViewData.d.ts.map +1 -0
  465. package/bin/server/http/control/types/ControlViewData.js.map +1 -0
  466. package/bin/server/http/execute/execute.d.ts.map +1 -0
  467. package/bin/server/http/execute/execute.js +90 -0
  468. package/bin/server/http/execute/execute.js.map +1 -0
  469. package/bin/server/http/health/health.d.ts.map +1 -0
  470. package/bin/server/http/health/health.js.map +1 -0
  471. package/bin/server/http/plugins/plugins.d.ts.map +1 -0
  472. package/bin/server/http/plugins/plugins.js +55 -0
  473. package/bin/server/http/plugins/plugins.js.map +1 -0
  474. package/bin/server/http/services/services.d.ts.map +1 -0
  475. package/bin/server/http/services/services.js +79 -0
  476. package/bin/server/http/services/services.js.map +1 -0
  477. package/bin/server/http/static/static.d.ts.map +1 -0
  478. package/bin/server/http/static/static.js +97 -0
  479. package/bin/server/http/static/static.js.map +1 -0
  480. package/bin/server/rpc/Server.d.ts +18 -0
  481. package/bin/server/rpc/Server.d.ts.map +1 -0
  482. package/bin/server/rpc/Server.js +307 -0
  483. package/bin/server/rpc/Server.js.map +1 -0
  484. package/bin/service/builtins/BaseService.d.ts +4 -4
  485. package/bin/service/builtins/BaseService.d.ts.map +1 -1
  486. package/bin/service/builtins/chat/Action.d.ts +1 -1
  487. package/bin/service/builtins/chat/Action.d.ts.map +1 -1
  488. package/bin/service/builtins/chat/ChatService.d.ts +6 -6
  489. package/bin/service/builtins/chat/ChatService.d.ts.map +1 -1
  490. package/bin/service/builtins/chat/ChatServiceTypes.d.ts +3 -3
  491. package/bin/service/builtins/chat/ChatServiceTypes.d.ts.map +1 -1
  492. package/bin/service/builtins/chat/PROMPT.direct.d.ts +7 -0
  493. package/bin/service/builtins/chat/PROMPT.direct.d.ts.map +1 -0
  494. package/bin/service/builtins/chat/PROMPT.direct.js +8 -0
  495. package/bin/service/builtins/chat/PROMPT.direct.js.map +1 -0
  496. package/bin/service/builtins/chat/accounts/ChannelAccountService.d.ts +1 -1
  497. package/bin/service/builtins/chat/accounts/ChannelAccountService.d.ts.map +1 -1
  498. package/bin/service/builtins/chat/channels/BaseChatChannel.d.ts +2 -2
  499. package/bin/service/builtins/chat/channels/BaseChatChannel.d.ts.map +1 -1
  500. package/bin/service/builtins/chat/channels/BaseChatChannelQueue.d.ts +1 -1
  501. package/bin/service/builtins/chat/channels/BaseChatChannelQueue.d.ts.map +1 -1
  502. package/bin/service/builtins/chat/channels/BaseChatChannelSupport.d.ts +3 -3
  503. package/bin/service/builtins/chat/channels/BaseChatChannelSupport.d.ts.map +1 -1
  504. package/bin/service/builtins/chat/channels/feishu/Feishu.d.ts +2 -2
  505. package/bin/service/builtins/chat/channels/feishu/Feishu.d.ts.map +1 -1
  506. package/bin/service/builtins/chat/channels/feishu/Feishu.js +39 -171
  507. package/bin/service/builtins/chat/channels/feishu/Feishu.js.map +1 -1
  508. package/bin/service/builtins/chat/channels/feishu/FeishuInbound.d.ts +1 -1
  509. package/bin/service/builtins/chat/channels/feishu/FeishuInbound.d.ts.map +1 -1
  510. package/bin/service/builtins/chat/channels/feishu/FeishuMessageHandler.d.ts +155 -0
  511. package/bin/service/builtins/chat/channels/feishu/FeishuMessageHandler.d.ts.map +1 -0
  512. package/bin/service/builtins/chat/channels/feishu/FeishuMessageHandler.js +247 -0
  513. package/bin/service/builtins/chat/channels/feishu/FeishuMessageHandler.js.map +1 -0
  514. package/bin/service/builtins/chat/channels/feishu/FeishuPlatformClient.d.ts +2 -2
  515. package/bin/service/builtins/chat/channels/feishu/FeishuPlatformClient.d.ts.map +1 -1
  516. package/bin/service/builtins/chat/channels/feishu/FeishuPlatformLookup.d.ts +2 -2
  517. package/bin/service/builtins/chat/channels/feishu/FeishuPlatformLookup.d.ts.map +1 -1
  518. package/bin/service/builtins/chat/channels/feishu/FeishuPlatformMessaging.d.ts +1 -1
  519. package/bin/service/builtins/chat/channels/feishu/FeishuPlatformMessaging.d.ts.map +1 -1
  520. package/bin/service/builtins/chat/channels/feishu/PROMPT.direct.d.ts +7 -0
  521. package/bin/service/builtins/chat/channels/feishu/PROMPT.direct.d.ts.map +1 -0
  522. package/bin/service/builtins/chat/channels/feishu/PROMPT.direct.js +8 -0
  523. package/bin/service/builtins/chat/channels/feishu/PROMPT.direct.js.map +1 -0
  524. package/bin/service/builtins/chat/channels/feishu/types/FeishuChannel.d.ts +127 -0
  525. package/bin/service/builtins/chat/channels/feishu/types/FeishuChannel.d.ts.map +1 -0
  526. package/bin/service/builtins/chat/channels/feishu/types/FeishuChannel.js +9 -0
  527. package/bin/service/builtins/chat/channels/feishu/types/FeishuChannel.js.map +1 -0
  528. package/bin/service/builtins/chat/channels/qq/PROMPT.direct.d.ts +7 -0
  529. package/bin/service/builtins/chat/channels/qq/PROMPT.direct.d.ts.map +1 -0
  530. package/bin/service/builtins/chat/channels/qq/PROMPT.direct.js +8 -0
  531. package/bin/service/builtins/chat/channels/qq/PROMPT.direct.js.map +1 -0
  532. package/bin/service/builtins/chat/channels/qq/QQ.d.ts +6 -6
  533. package/bin/service/builtins/chat/channels/qq/QQ.d.ts.map +1 -1
  534. package/bin/service/builtins/chat/channels/qq/QQ.js +34 -232
  535. package/bin/service/builtins/chat/channels/qq/QQ.js.map +1 -1
  536. package/bin/service/builtins/chat/channels/qq/QQEventCapture.d.ts +2 -2
  537. package/bin/service/builtins/chat/channels/qq/QQEventCapture.d.ts.map +1 -1
  538. package/bin/service/builtins/chat/channels/qq/QQGatewayAuth.d.ts +2 -2
  539. package/bin/service/builtins/chat/channels/qq/QQGatewayAuth.d.ts.map +1 -1
  540. package/bin/service/builtins/chat/channels/qq/QQGatewayClient.d.ts +2 -26
  541. package/bin/service/builtins/chat/channels/qq/QQGatewayClient.d.ts.map +1 -1
  542. package/bin/service/builtins/chat/channels/qq/QQGatewayClient.js +68 -227
  543. package/bin/service/builtins/chat/channels/qq/QQGatewayClient.js.map +1 -1
  544. package/bin/service/builtins/chat/channels/qq/QQGatewayConnection.d.ts +65 -0
  545. package/bin/service/builtins/chat/channels/qq/QQGatewayConnection.d.ts.map +1 -0
  546. package/bin/service/builtins/chat/channels/qq/QQGatewayConnection.js +110 -0
  547. package/bin/service/builtins/chat/channels/qq/QQGatewayConnection.js.map +1 -0
  548. package/bin/service/builtins/chat/channels/qq/QQGatewayHeartbeat.d.ts +59 -0
  549. package/bin/service/builtins/chat/channels/qq/QQGatewayHeartbeat.d.ts.map +1 -0
  550. package/bin/service/builtins/chat/channels/qq/QQGatewayHeartbeat.js +58 -0
  551. package/bin/service/builtins/chat/channels/qq/QQGatewayHeartbeat.js.map +1 -0
  552. package/bin/service/builtins/chat/channels/qq/QQGatewayProtocol.d.ts +86 -0
  553. package/bin/service/builtins/chat/channels/qq/QQGatewayProtocol.d.ts.map +1 -0
  554. package/bin/service/builtins/chat/channels/qq/QQGatewayProtocol.js +93 -0
  555. package/bin/service/builtins/chat/channels/qq/QQGatewayProtocol.js.map +1 -0
  556. package/bin/service/builtins/chat/channels/qq/QQGatewaySend.d.ts +2 -2
  557. package/bin/service/builtins/chat/channels/qq/QQGatewaySend.d.ts.map +1 -1
  558. package/bin/service/builtins/chat/channels/qq/QQGatewaySupport.d.ts +2 -2
  559. package/bin/service/builtins/chat/channels/qq/QQGatewaySupport.d.ts.map +1 -1
  560. package/bin/service/builtins/chat/channels/qq/QQInbound.d.ts +1 -1
  561. package/bin/service/builtins/chat/channels/qq/QQInbound.d.ts.map +1 -1
  562. package/bin/service/builtins/chat/channels/qq/QQInboundDedupe.d.ts +1 -1
  563. package/bin/service/builtins/chat/channels/qq/QQInboundDedupe.d.ts.map +1 -1
  564. package/bin/service/builtins/chat/channels/qq/QQMessageHandler.d.ts +129 -0
  565. package/bin/service/builtins/chat/channels/qq/QQMessageHandler.d.ts.map +1 -0
  566. package/bin/service/builtins/chat/channels/qq/QQMessageHandler.js +284 -0
  567. package/bin/service/builtins/chat/channels/qq/QQMessageHandler.js.map +1 -0
  568. package/bin/service/builtins/chat/channels/qq/QQSupport.d.ts +3 -3
  569. package/bin/service/builtins/chat/channels/qq/QQSupport.d.ts.map +1 -1
  570. package/bin/service/builtins/chat/channels/qq/types/QqChannel.d.ts +485 -0
  571. package/bin/service/builtins/chat/channels/qq/types/QqChannel.d.ts.map +1 -0
  572. package/bin/service/builtins/chat/channels/qq/types/QqChannel.js +42 -0
  573. package/bin/service/builtins/chat/channels/qq/types/QqChannel.js.map +1 -0
  574. package/bin/service/builtins/chat/channels/qq/types/QqGatewaySupport.d.ts.map +1 -0
  575. package/bin/service/builtins/chat/channels/qq/types/QqGatewaySupport.js.map +1 -0
  576. package/bin/service/builtins/chat/channels/telegram/ApiClient.d.ts +1 -1
  577. package/bin/service/builtins/chat/channels/telegram/ApiClient.d.ts.map +1 -1
  578. package/bin/service/builtins/chat/channels/telegram/Bot.d.ts +1 -1
  579. package/bin/service/builtins/chat/channels/telegram/Bot.d.ts.map +1 -1
  580. package/bin/service/builtins/chat/channels/telegram/Bot.js +35 -293
  581. package/bin/service/builtins/chat/channels/telegram/Bot.js.map +1 -1
  582. package/bin/service/builtins/chat/channels/telegram/Handlers.d.ts +1 -1
  583. package/bin/service/builtins/chat/channels/telegram/Handlers.d.ts.map +1 -1
  584. package/bin/service/builtins/chat/channels/telegram/PROMPT.direct.d.ts +7 -0
  585. package/bin/service/builtins/chat/channels/telegram/PROMPT.direct.d.ts.map +1 -0
  586. package/bin/service/builtins/chat/channels/telegram/PROMPT.direct.js +8 -0
  587. package/bin/service/builtins/chat/channels/telegram/PROMPT.direct.js.map +1 -0
  588. package/bin/service/builtins/chat/channels/telegram/TelegramMessageHandler.d.ts +142 -0
  589. package/bin/service/builtins/chat/channels/telegram/TelegramMessageHandler.d.ts.map +1 -0
  590. package/bin/service/builtins/chat/channels/telegram/TelegramMessageHandler.js +267 -0
  591. package/bin/service/builtins/chat/channels/telegram/TelegramMessageHandler.js.map +1 -0
  592. package/bin/service/builtins/chat/channels/telegram/TelegramPendingUpdates.d.ts +55 -0
  593. package/bin/service/builtins/chat/channels/telegram/TelegramPendingUpdates.d.ts.map +1 -0
  594. package/bin/service/builtins/chat/channels/telegram/TelegramPendingUpdates.js +125 -0
  595. package/bin/service/builtins/chat/channels/telegram/TelegramPendingUpdates.js.map +1 -0
  596. package/bin/service/builtins/chat/channels/telegram/TelegramPlatformClient.d.ts +1 -1
  597. package/bin/service/builtins/chat/channels/telegram/TelegramPlatformClient.d.ts.map +1 -1
  598. package/bin/service/builtins/chat/runtime/ChannelContextStore.d.ts +1 -1
  599. package/bin/service/builtins/chat/runtime/ChannelContextStore.d.ts.map +1 -1
  600. package/bin/service/builtins/chat/runtime/ChannelContextStore.js +1 -1
  601. package/bin/service/builtins/chat/runtime/ChannelContextStore.js.map +1 -1
  602. package/bin/service/builtins/chat/runtime/ChatActionExecution.d.ts +3 -3
  603. package/bin/service/builtins/chat/runtime/ChatActionExecution.d.ts.map +1 -1
  604. package/bin/service/builtins/chat/runtime/ChatActionInput.d.ts +4 -12
  605. package/bin/service/builtins/chat/runtime/ChatActionInput.d.ts.map +1 -1
  606. package/bin/service/builtins/chat/runtime/ChatActionInput.js +3 -232
  607. package/bin/service/builtins/chat/runtime/ChatActionInput.js.map +1 -1
  608. package/bin/service/builtins/chat/runtime/ChatActionInputSupport.d.ts +33 -0
  609. package/bin/service/builtins/chat/runtime/ChatActionInputSupport.d.ts.map +1 -0
  610. package/bin/service/builtins/chat/runtime/ChatActionInputSupport.js +66 -0
  611. package/bin/service/builtins/chat/runtime/ChatActionInputSupport.js.map +1 -0
  612. package/bin/service/builtins/chat/runtime/ChatChannelActions.d.ts +3 -3
  613. package/bin/service/builtins/chat/runtime/ChatChannelActions.d.ts.map +1 -1
  614. package/bin/service/builtins/chat/runtime/ChatChannelConfig.d.ts +4 -4
  615. package/bin/service/builtins/chat/runtime/ChatChannelConfig.d.ts.map +1 -1
  616. package/bin/service/builtins/chat/runtime/ChatChannelCore.d.ts +3 -3
  617. package/bin/service/builtins/chat/runtime/ChatChannelCore.d.ts.map +1 -1
  618. package/bin/service/builtins/chat/runtime/ChatChannelLifecycle.d.ts +2 -2
  619. package/bin/service/builtins/chat/runtime/ChatChannelLifecycle.d.ts.map +1 -1
  620. package/bin/service/builtins/chat/runtime/ChatHistoryStore.d.ts +2 -2
  621. package/bin/service/builtins/chat/runtime/ChatHistoryStore.d.ts.map +1 -1
  622. package/bin/service/builtins/chat/runtime/ChatHistoryStore.js +1 -1
  623. package/bin/service/builtins/chat/runtime/ChatHistoryStore.js.map +1 -1
  624. package/bin/service/builtins/chat/runtime/ChatIngressStore.d.ts +2 -2
  625. package/bin/service/builtins/chat/runtime/ChatIngressStore.d.ts.map +1 -1
  626. package/bin/service/builtins/chat/runtime/ChatMetaStore.d.ts +3 -3
  627. package/bin/service/builtins/chat/runtime/ChatMetaStore.d.ts.map +1 -1
  628. package/bin/service/builtins/chat/runtime/ChatMetaStore.js +2 -2
  629. package/bin/service/builtins/chat/runtime/ChatPromptAssets.d.ts +24 -0
  630. package/bin/service/builtins/chat/runtime/ChatPromptAssets.d.ts.map +1 -0
  631. package/bin/service/builtins/chat/runtime/ChatPromptAssets.js +28 -0
  632. package/bin/service/builtins/chat/runtime/ChatPromptAssets.js.map +1 -0
  633. package/bin/service/builtins/chat/runtime/ChatQueueReplyDispatch.d.ts +2 -2
  634. package/bin/service/builtins/chat/runtime/ChatQueueReplyDispatch.d.ts.map +1 -1
  635. package/bin/service/builtins/chat/runtime/ChatQueueSessionBridge.d.ts +4 -4
  636. package/bin/service/builtins/chat/runtime/ChatQueueSessionBridge.d.ts.map +1 -1
  637. package/bin/service/builtins/chat/runtime/ChatQueueStore.d.ts +1 -1
  638. package/bin/service/builtins/chat/runtime/ChatQueueStore.d.ts.map +1 -1
  639. package/bin/service/builtins/chat/runtime/ChatQueueWorker.d.ts +3 -3
  640. package/bin/service/builtins/chat/runtime/ChatQueueWorker.d.ts.map +1 -1
  641. package/bin/service/builtins/chat/runtime/ChatQueueWorkerSupport.d.ts +1 -1
  642. package/bin/service/builtins/chat/runtime/ChatQueueWorkerSupport.d.ts.map +1 -1
  643. package/bin/service/builtins/chat/runtime/ChatSendActionInput.d.ts +23 -0
  644. package/bin/service/builtins/chat/runtime/ChatSendActionInput.d.ts.map +1 -0
  645. package/bin/service/builtins/chat/runtime/ChatSendActionInput.js +205 -0
  646. package/bin/service/builtins/chat/runtime/ChatSendActionInput.js.map +1 -0
  647. package/bin/service/builtins/chat/runtime/ChatServiceActions.d.ts +2 -2
  648. package/bin/service/builtins/chat/runtime/ChatServiceActions.d.ts.map +1 -1
  649. package/bin/service/builtins/chat/runtime/ChatServiceSystem.d.ts +1 -1
  650. package/bin/service/builtins/chat/runtime/ChatServiceSystem.d.ts.map +1 -1
  651. package/bin/service/builtins/chat/runtime/ChatServiceSystem.js +4 -47
  652. package/bin/service/builtins/chat/runtime/ChatServiceSystem.js.map +1 -1
  653. package/bin/service/builtins/chat/runtime/ChatSession.d.ts +2 -2
  654. package/bin/service/builtins/chat/runtime/ChatSessionDelete.d.ts +1 -1
  655. package/bin/service/builtins/chat/runtime/ChatSessionDelete.d.ts.map +1 -1
  656. package/bin/service/builtins/chat/runtime/ChatSessionExecutionComposer.d.ts +2 -2
  657. package/bin/service/builtins/chat/runtime/ChatSessionTypes.d.ts +2 -2
  658. package/bin/service/builtins/chat/runtime/ChatkeySend.d.ts +2 -2
  659. package/bin/service/builtins/chat/runtime/ChatkeySend.d.ts.map +1 -1
  660. package/bin/service/builtins/chat/runtime/ChatkeySend.js +1 -1
  661. package/bin/service/builtins/chat/runtime/EnqueueDispatch.d.ts +2 -2
  662. package/bin/service/builtins/chat/runtime/EnqueueDispatch.d.ts.map +1 -1
  663. package/bin/service/builtins/chat/runtime/InboundAugment.d.ts +2 -2
  664. package/bin/service/builtins/chat/runtime/InboundAugment.d.ts.map +1 -1
  665. package/bin/service/builtins/chat/runtime/PluginDispatch.d.ts +2 -2
  666. package/bin/service/builtins/chat/runtime/PluginDispatch.d.ts.map +1 -1
  667. package/bin/service/builtins/chat/runtime/QueuedUserMessage.d.ts +1 -1
  668. package/bin/service/builtins/chat/runtime/QueuedUserMessage.d.ts.map +1 -1
  669. package/bin/service/builtins/chat/runtime/ReplyContextFormatter.d.ts +1 -1
  670. package/bin/service/builtins/chat/runtime/ReplyDispatch.d.ts +2 -2
  671. package/bin/service/builtins/chat/runtime/ReplyDispatch.d.ts.map +1 -1
  672. package/bin/service/builtins/chat/runtime/SystemPrompt.d.ts +2 -2
  673. package/bin/service/builtins/chat/runtime/SystemPrompt.d.ts.map +1 -1
  674. package/bin/service/builtins/chat/runtime/UIMessageTransformer.d.ts +2 -2
  675. package/bin/service/builtins/chat/runtime/UserVisibleText.d.ts +1 -1
  676. package/bin/service/builtins/chat/types/ChannelAccount.d.ts +1 -1
  677. package/bin/service/builtins/chat/types/ChannelAccount.d.ts.map +1 -1
  678. package/bin/service/builtins/chat/types/ChatHistory.d.ts +1 -1
  679. package/bin/service/builtins/chat/types/ChatMeta.d.ts +1 -1
  680. package/bin/service/builtins/chat/types/ChatMeta.js +1 -1
  681. package/bin/service/builtins/chat/types/ChatPlugin.d.ts +238 -0
  682. package/bin/service/builtins/chat/types/ChatPlugin.d.ts.map +1 -0
  683. package/bin/service/builtins/chat/types/ChatPlugin.js.map +1 -0
  684. package/bin/service/builtins/chat/types/ChatPromptContext.d.ts +125 -0
  685. package/bin/service/builtins/chat/types/ChatPromptContext.d.ts.map +1 -0
  686. package/bin/service/builtins/chat/types/ChatPromptContext.js.map +1 -0
  687. package/bin/service/builtins/chat/types/ChatQueue.d.ts +1 -1
  688. package/bin/service/builtins/chat/types/ChatQueueWorker.d.ts.map +1 -0
  689. package/bin/service/builtins/chat/types/ChatQueueWorker.js.map +1 -0
  690. package/bin/service/builtins/chat/types/ChatRuntime.d.ts +32 -0
  691. package/bin/service/builtins/chat/types/ChatRuntime.d.ts.map +1 -0
  692. package/bin/service/builtins/chat/types/ChatRuntime.js.map +1 -0
  693. package/bin/service/builtins/chat/types/ChatService.d.ts +145 -0
  694. package/bin/service/builtins/chat/types/ChatService.d.ts.map +1 -0
  695. package/bin/service/builtins/chat/types/ChatService.js.map +1 -0
  696. package/bin/service/builtins/contact/Action.d.ts +57 -4
  697. package/bin/service/builtins/contact/Action.d.ts.map +1 -1
  698. package/bin/service/builtins/contact/Action.js +272 -4
  699. package/bin/service/builtins/contact/Action.js.map +1 -1
  700. package/bin/service/builtins/contact/ContactService.d.ts +2 -2
  701. package/bin/service/builtins/contact/ContactService.d.ts.map +1 -1
  702. package/bin/service/builtins/contact/ContactService.js +19 -293
  703. package/bin/service/builtins/contact/ContactService.js.map +1 -1
  704. package/bin/service/builtins/contact/PROMPT.d.ts +7 -0
  705. package/bin/service/builtins/contact/PROMPT.d.ts.map +1 -0
  706. package/bin/service/builtins/contact/PROMPT.js +8 -0
  707. package/bin/service/builtins/contact/PROMPT.js.map +1 -0
  708. package/bin/service/builtins/contact/runtime/ChatRuntime.d.ts +1 -1
  709. package/bin/service/builtins/contact/runtime/ChatRuntime.d.ts.map +1 -1
  710. package/bin/service/builtins/contact/runtime/ContactPayload.d.ts +24 -0
  711. package/bin/service/builtins/contact/runtime/ContactPayload.d.ts.map +1 -0
  712. package/bin/service/builtins/contact/runtime/ContactPayload.js +32 -0
  713. package/bin/service/builtins/contact/runtime/ContactPayload.js.map +1 -0
  714. package/bin/service/builtins/contact/runtime/ContactPromptAssets.d.ts +12 -0
  715. package/bin/service/builtins/contact/runtime/ContactPromptAssets.d.ts.map +1 -0
  716. package/bin/service/builtins/contact/runtime/ContactPromptAssets.js +13 -0
  717. package/bin/service/builtins/contact/runtime/ContactPromptAssets.js.map +1 -0
  718. package/bin/service/builtins/contact/runtime/RemoteClient.d.ts +1 -1
  719. package/bin/service/builtins/contact/runtime/ShareBundle.d.ts +1 -1
  720. package/bin/service/builtins/contact/runtime/ShareBundle.d.ts.map +1 -1
  721. package/bin/service/builtins/contact/runtime/SystemProvider.d.ts +0 -7
  722. package/bin/service/builtins/contact/runtime/SystemProvider.d.ts.map +1 -1
  723. package/bin/service/builtins/contact/runtime/SystemProvider.js +3 -9
  724. package/bin/service/builtins/contact/runtime/SystemProvider.js.map +1 -1
  725. package/bin/service/builtins/memory/Action.d.ts +3 -3
  726. package/bin/service/builtins/memory/Action.d.ts.map +1 -1
  727. package/bin/service/builtins/memory/MemoryService.d.ts +2 -2
  728. package/bin/service/builtins/memory/MemoryService.d.ts.map +1 -1
  729. package/bin/service/builtins/memory/runtime/Flush.d.ts +1 -1
  730. package/bin/service/builtins/memory/runtime/Flush.d.ts.map +1 -1
  731. package/bin/service/builtins/memory/runtime/Search.d.ts +1 -1
  732. package/bin/service/builtins/memory/runtime/Search.d.ts.map +1 -1
  733. package/bin/service/builtins/memory/runtime/Store.d.ts +1 -1
  734. package/bin/service/builtins/memory/runtime/Store.d.ts.map +1 -1
  735. package/bin/service/builtins/memory/runtime/SystemProvider.d.ts +1 -1
  736. package/bin/service/builtins/memory/runtime/SystemProvider.d.ts.map +1 -1
  737. package/bin/service/builtins/memory/runtime/Writer.d.ts +1 -1
  738. package/bin/service/builtins/memory/runtime/Writer.d.ts.map +1 -1
  739. package/bin/service/builtins/memory/types/Memory.d.ts +1 -1
  740. package/bin/service/builtins/shell/ShellRuntimeTypes.d.ts +2 -2
  741. package/bin/service/builtins/shell/ShellRuntimeTypes.d.ts.map +1 -1
  742. package/bin/service/builtins/shell/ShellRuntimeTypes.js +1 -1
  743. package/bin/service/builtins/shell/ShellService.d.ts +3 -3
  744. package/bin/service/builtins/shell/ShellService.d.ts.map +1 -1
  745. package/bin/service/builtins/shell/runtime/ShellActionResponse.d.ts +52 -0
  746. package/bin/service/builtins/shell/runtime/ShellActionResponse.d.ts.map +1 -0
  747. package/bin/service/builtins/shell/runtime/ShellActionResponse.js +73 -0
  748. package/bin/service/builtins/shell/runtime/ShellActionResponse.js.map +1 -0
  749. package/bin/service/builtins/shell/runtime/ShellActionRuntime.d.ts +1 -1
  750. package/bin/service/builtins/shell/runtime/ShellActionRuntime.d.ts.map +1 -1
  751. package/bin/service/builtins/shell/runtime/ShellActionRuntime.js +4 -27
  752. package/bin/service/builtins/shell/runtime/ShellActionRuntime.js.map +1 -1
  753. package/bin/service/builtins/shell/runtime/ShellActionRuntimeSupport.d.ts +4 -32
  754. package/bin/service/builtins/shell/runtime/ShellActionRuntimeSupport.d.ts.map +1 -1
  755. package/bin/service/builtins/shell/runtime/ShellActionRuntimeSupport.js +3 -131
  756. package/bin/service/builtins/shell/runtime/ShellActionRuntimeSupport.js.map +1 -1
  757. package/bin/service/builtins/shell/runtime/ShellProcessEvents.d.ts +22 -0
  758. package/bin/service/builtins/shell/runtime/ShellProcessEvents.d.ts.map +1 -0
  759. package/bin/service/builtins/shell/runtime/ShellProcessEvents.js +41 -0
  760. package/bin/service/builtins/shell/runtime/ShellProcessEvents.js.map +1 -0
  761. package/bin/service/builtins/shell/runtime/ShellRuntimeEnvironment.d.ts +21 -0
  762. package/bin/service/builtins/shell/runtime/ShellRuntimeEnvironment.d.ts.map +1 -0
  763. package/bin/service/builtins/shell/runtime/ShellRuntimeEnvironment.js +75 -0
  764. package/bin/service/builtins/shell/runtime/ShellRuntimeEnvironment.js.map +1 -0
  765. package/bin/service/builtins/shell/types/Shell.d.ts.map +1 -0
  766. package/bin/service/builtins/shell/types/Shell.js.map +1 -0
  767. package/bin/service/builtins/task/Action.d.ts +1 -1
  768. package/bin/service/builtins/task/Action.d.ts.map +1 -1
  769. package/bin/service/builtins/task/PROMPT.d.ts +7 -0
  770. package/bin/service/builtins/task/PROMPT.d.ts.map +1 -0
  771. package/bin/service/builtins/task/PROMPT.js +8 -0
  772. package/bin/service/builtins/task/PROMPT.js.map +1 -0
  773. package/bin/service/builtins/task/Scheduler.d.ts +1 -1
  774. package/bin/service/builtins/task/Scheduler.d.ts.map +1 -1
  775. package/bin/service/builtins/task/Scheduler.js +1 -1
  776. package/bin/service/builtins/task/Scheduler.js.map +1 -1
  777. package/bin/service/builtins/task/TaskService.d.ts +4 -4
  778. package/bin/service/builtins/task/TaskService.d.ts.map +1 -1
  779. package/bin/service/builtins/task/runtime/CronRuntime.d.ts +1 -1
  780. package/bin/service/builtins/task/runtime/CronRuntime.d.ts.map +1 -1
  781. package/bin/service/builtins/task/runtime/Model.d.ts +1 -1
  782. package/bin/service/builtins/task/runtime/Paths.d.ts +1 -1
  783. package/bin/service/builtins/task/runtime/Paths.js +1 -1
  784. package/bin/service/builtins/task/runtime/Runner.d.ts +1 -1
  785. package/bin/service/builtins/task/runtime/Runner.d.ts.map +1 -1
  786. package/bin/service/builtins/task/runtime/Runner.js +17 -64
  787. package/bin/service/builtins/task/runtime/Runner.js.map +1 -1
  788. package/bin/service/builtins/task/runtime/TaskActionExecution.d.ts +3 -3
  789. package/bin/service/builtins/task/runtime/TaskActionExecution.d.ts.map +1 -1
  790. package/bin/service/builtins/task/runtime/TaskActionInput.d.ts +3 -3
  791. package/bin/service/builtins/task/runtime/TaskActionInput.d.ts.map +1 -1
  792. package/bin/service/builtins/task/runtime/TaskPromptAssets.d.ts +12 -0
  793. package/bin/service/builtins/task/runtime/TaskPromptAssets.d.ts.map +1 -0
  794. package/bin/service/builtins/task/runtime/TaskPromptAssets.js +13 -0
  795. package/bin/service/builtins/task/runtime/TaskPromptAssets.js.map +1 -0
  796. package/bin/service/builtins/task/runtime/TaskRunChatDispatch.d.ts +1 -1
  797. package/bin/service/builtins/task/runtime/TaskRunChatDispatch.d.ts.map +1 -1
  798. package/bin/service/builtins/task/runtime/TaskRunnerRound.d.ts +3 -3
  799. package/bin/service/builtins/task/runtime/TaskRunnerRound.d.ts.map +1 -1
  800. package/bin/service/builtins/task/runtime/TaskRunnerRound.js +1 -1
  801. package/bin/service/builtins/task/runtime/TaskRunnerRound.js.map +1 -1
  802. package/bin/service/builtins/task/runtime/TaskRunnerScript.d.ts +81 -0
  803. package/bin/service/builtins/task/runtime/TaskRunnerScript.d.ts.map +1 -0
  804. package/bin/service/builtins/task/runtime/TaskRunnerScript.js +96 -0
  805. package/bin/service/builtins/task/runtime/TaskRunnerScript.js.map +1 -0
  806. package/bin/service/builtins/task/runtime/TaskRunnerSession.d.ts +2 -2
  807. package/bin/service/builtins/task/runtime/TaskRunnerSession.d.ts.map +1 -1
  808. package/bin/service/builtins/task/runtime/TaskRunnerTypes.d.ts +1 -1
  809. package/bin/service/builtins/task/runtime/TaskServiceActions.d.ts +1 -1
  810. package/bin/service/builtins/task/runtime/TaskServiceActions.d.ts.map +1 -1
  811. package/bin/service/builtins/task/runtime/TaskServiceSystem.d.ts +2 -5
  812. package/bin/service/builtins/task/runtime/TaskServiceSystem.d.ts.map +1 -1
  813. package/bin/service/builtins/task/runtime/TaskServiceSystem.js +2 -19
  814. package/bin/service/builtins/task/runtime/TaskServiceSystem.js.map +1 -1
  815. package/bin/service/builtins/task/types/TaskService.d.ts +52 -0
  816. package/bin/service/builtins/task/types/TaskService.d.ts.map +1 -0
  817. package/bin/service/builtins/task/types/TaskService.js +9 -0
  818. package/bin/service/builtins/task/types/TaskService.js.map +1 -0
  819. package/bin/service/core/Manager.d.ts +4 -4
  820. package/bin/service/core/Manager.d.ts.map +1 -1
  821. package/bin/service/core/Manager.js +3 -3
  822. package/bin/service/core/ServiceActionApi.d.ts +1 -1
  823. package/bin/service/core/ServiceActionApi.d.ts.map +1 -1
  824. package/bin/service/core/ServiceActionRunner.d.ts +5 -5
  825. package/bin/service/core/ServiceActionRunner.d.ts.map +1 -1
  826. package/bin/service/core/ServiceClassRegistry.d.ts +2 -2
  827. package/bin/service/core/ServiceClassRegistry.d.ts.map +1 -1
  828. package/bin/service/core/ServiceManager.d.ts +3 -3
  829. package/bin/service/core/ServiceManager.d.ts.map +1 -1
  830. package/bin/service/core/ServiceManager.js +2 -2
  831. package/bin/service/core/ServiceStateController.d.ts +3 -3
  832. package/bin/service/core/ServiceStateController.d.ts.map +1 -1
  833. package/bin/service/core/ServiceStateController.js +1 -1
  834. package/bin/service/core/ServiceStateController.js.map +1 -1
  835. package/bin/service/core/ServiceSystemProviders.d.ts +1 -1
  836. package/bin/service/core/ServiceSystemProviders.d.ts.map +1 -1
  837. package/bin/service/core/Services.d.ts +1 -1
  838. package/bin/service/core/Services.d.ts.map +1 -1
  839. package/bin/service/schedule/Executor.d.ts +1 -1
  840. package/bin/service/schedule/Executor.d.ts.map +1 -1
  841. package/bin/service/schedule/Runtime.d.ts +1 -1
  842. package/bin/service/schedule/Runtime.d.ts.map +1 -1
  843. package/bin/service/schedule/Store.d.ts +1 -1
  844. package/bin/service/schedule/Store.d.ts.map +1 -1
  845. package/bin/service/schedule/Store.js +1 -1
  846. package/bin/service/schedule/Store.js.map +1 -1
  847. package/bin/service/types/Service.d.ts +205 -0
  848. package/bin/service/types/Service.d.ts.map +1 -0
  849. package/bin/service/types/Service.js +10 -0
  850. package/bin/service/types/Service.js.map +1 -0
  851. package/bin/service/types/ServiceSchedule.d.ts +114 -0
  852. package/bin/service/types/ServiceSchedule.d.ts.map +1 -0
  853. package/bin/service/types/ServiceSchedule.js.map +1 -0
  854. package/bin/service/types/ServiceState.d.ts +104 -0
  855. package/bin/service/types/ServiceState.d.ts.map +1 -0
  856. package/bin/service/types/ServiceState.js +9 -0
  857. package/bin/service/types/ServiceState.js.map +1 -0
  858. package/bin/service/types/Services.d.ts +94 -0
  859. package/bin/service/types/Services.d.ts.map +1 -0
  860. package/bin/service/types/Services.js.map +1 -0
  861. package/bin/session/Session.d.ts +4 -4
  862. package/bin/session/SessionRunScope.d.ts +2 -2
  863. package/bin/session/composer/compaction/jsonl/JsonlSessionCompactionExecutor.d.ts +2 -2
  864. package/bin/session/composer/compaction/jsonl/JsonlSessionCompactionExecutor.js +2 -2
  865. package/bin/session/composer/compaction/jsonl/JsonlSessionCompactionExecutor.js.map +1 -1
  866. package/bin/session/composer/execution/LocalSessionExecutionComposer.d.ts +2 -2
  867. package/bin/session/composer/execution/LocalSessionExecutionComposer.js +1 -1
  868. package/bin/session/composer/execution/LocalSessionExecutionComposer.js.map +1 -1
  869. package/bin/session/composer/execution/SessionExecutionComposer.d.ts +2 -2
  870. package/bin/session/composer/history/SessionHistoryComposer.d.ts +2 -2
  871. package/bin/session/composer/history/SessionHistoryWriter.d.ts +2 -2
  872. package/bin/session/composer/history/jsonl/JsonlSessionHistoryComposer.d.ts +2 -2
  873. package/bin/session/composer/history/jsonl/JsonlSessionHistoryComposer.js +2 -2
  874. package/bin/session/composer/history/jsonl/JsonlSessionHistoryComposer.js.map +1 -1
  875. package/bin/session/composer/system/default/DefaultSessionSystemComposer.d.ts +1 -1
  876. package/bin/session/composer/system/default/DefaultSessionSystemComposer.d.ts.map +1 -1
  877. package/bin/session/composer/system/default/InitPromptAssets.d.ts +16 -0
  878. package/bin/session/composer/system/default/InitPromptAssets.d.ts.map +1 -0
  879. package/bin/session/composer/system/default/InitPromptAssets.js +18 -0
  880. package/bin/session/composer/system/default/InitPromptAssets.js.map +1 -0
  881. package/bin/session/composer/system/default/InitPrompts.d.ts +2 -9
  882. package/bin/session/composer/system/default/InitPrompts.d.ts.map +1 -1
  883. package/bin/session/composer/system/default/InitPrompts.js +2 -28
  884. package/bin/session/composer/system/default/InitPrompts.js.map +1 -1
  885. package/bin/session/composer/system/default/StaticPromptCatalog.d.ts +1 -1
  886. package/bin/session/composer/system/default/StaticPromptCatalog.d.ts.map +1 -1
  887. package/bin/session/composer/system/default/SystemDomain.d.ts +1 -1
  888. package/bin/session/composer/system/default/SystemDomain.d.ts.map +1 -1
  889. package/bin/session/composer/system/default/SystemDomain.js +5 -21
  890. package/bin/session/composer/system/default/SystemDomain.js.map +1 -1
  891. package/bin/session/composer/system/default/SystemPromptAssets.d.ts +20 -0
  892. package/bin/session/composer/system/default/SystemPromptAssets.d.ts.map +1 -0
  893. package/bin/session/composer/system/default/SystemPromptAssets.js +23 -0
  894. package/bin/session/composer/system/default/SystemPromptAssets.js.map +1 -0
  895. package/bin/session/composer/system/default/assets/core.prompt.d.ts +7 -0
  896. package/bin/session/composer/system/default/assets/core.prompt.d.ts.map +1 -0
  897. package/bin/session/composer/system/default/assets/core.prompt.js +8 -0
  898. package/bin/session/composer/system/default/assets/core.prompt.js.map +1 -0
  899. package/bin/session/composer/system/default/assets/init/PROFILE.md.d.ts +7 -0
  900. package/bin/session/composer/system/default/assets/init/PROFILE.md.d.ts.map +1 -0
  901. package/bin/session/composer/system/default/assets/init/PROFILE.md.js +8 -0
  902. package/bin/session/composer/system/default/assets/init/PROFILE.md.js.map +1 -0
  903. package/bin/session/composer/system/default/assets/init/SOUL.md.d.ts +7 -0
  904. package/bin/session/composer/system/default/assets/init/SOUL.md.d.ts.map +1 -0
  905. package/bin/session/composer/system/default/assets/init/SOUL.md.js +8 -0
  906. package/bin/session/composer/system/default/assets/init/SOUL.md.js.map +1 -0
  907. package/bin/session/composer/system/default/assets/service.prompt.d.ts +7 -0
  908. package/bin/session/composer/system/default/assets/service.prompt.d.ts.map +1 -0
  909. package/bin/session/composer/system/default/assets/service.prompt.js +8 -0
  910. package/bin/session/composer/system/default/assets/service.prompt.js.map +1 -0
  911. package/bin/session/composer/system/default/assets/task.prompt.d.ts +7 -0
  912. package/bin/session/composer/system/default/assets/task.prompt.d.ts.map +1 -0
  913. package/bin/session/composer/system/default/assets/task.prompt.js +8 -0
  914. package/bin/session/composer/system/default/assets/task.prompt.js.map +1 -0
  915. package/bin/session/composer/system/default/variables/VariableReplacer.js +2 -2
  916. package/bin/session/composer/system/default/variables/VariableReplacer.js.map +1 -1
  917. package/bin/session/executors/local/LocalSessionCore.d.ts +3 -11
  918. package/bin/session/executors/local/LocalSessionCore.d.ts.map +1 -1
  919. package/bin/session/executors/local/LocalSessionCore.js +8 -392
  920. package/bin/session/executors/local/LocalSessionCore.js.map +1 -1
  921. package/bin/session/executors/local/LocalSessionExecutor.d.ts +2 -2
  922. package/bin/session/executors/local/LocalSessionExecutor.d.ts.map +1 -1
  923. package/bin/session/executors/local/SessionExecutionError.d.ts +26 -0
  924. package/bin/session/executors/local/SessionExecutionError.d.ts.map +1 -0
  925. package/bin/session/executors/local/SessionExecutionError.js +34 -0
  926. package/bin/session/executors/local/SessionExecutionError.js.map +1 -0
  927. package/bin/session/executors/local/SessionLoopDecision.d.ts +1 -1
  928. package/bin/session/executors/local/SessionModelMessageState.d.ts +63 -0
  929. package/bin/session/executors/local/SessionModelMessageState.d.ts.map +1 -0
  930. package/bin/session/executors/local/SessionModelMessageState.js +90 -0
  931. package/bin/session/executors/local/SessionModelMessageState.js.map +1 -0
  932. package/bin/session/executors/local/SessionSignals.d.ts +2 -2
  933. package/bin/session/executors/local/SessionToolLoopRunner.d.ts +44 -0
  934. package/bin/session/executors/local/SessionToolLoopRunner.d.ts.map +1 -0
  935. package/bin/session/executors/local/SessionToolLoopRunner.js +261 -0
  936. package/bin/session/executors/local/SessionToolLoopRunner.js.map +1 -0
  937. package/bin/session/executors/local/SessionUiStreamCollector.d.ts +33 -0
  938. package/bin/session/executors/local/SessionUiStreamCollector.d.ts.map +1 -0
  939. package/bin/session/executors/local/SessionUiStreamCollector.js +64 -0
  940. package/bin/session/executors/local/SessionUiStreamCollector.js.map +1 -0
  941. package/bin/session/messages/SessionAttachmentMapper.d.ts +1 -1
  942. package/bin/session/messages/SessionMessageCodec.d.ts +1 -1
  943. package/bin/session/messages/SessionMessageLog.d.ts +2 -2
  944. package/bin/session/messages/SessionMessageLog.d.ts.map +1 -1
  945. package/bin/session/messages/SessionStepEventMapper.d.ts +1 -1
  946. package/bin/session/messages/SessionStepEventMapper.js +1 -1
  947. package/bin/session/messages/SessionStepEventMapper.js.map +1 -1
  948. package/bin/session/tools/shell/ShellToolBridge.d.ts +2 -2
  949. package/bin/session/tools/shell/ShellToolBridge.d.ts.map +1 -1
  950. package/bin/session/tools/shell/ShellToolBridge.js +1 -1
  951. package/bin/session/tools/shell/ShellToolBridge.js.map +1 -1
  952. package/bin/session/tools/shell/ShellToolDefinition.d.ts +2 -2
  953. package/bin/session/tools/shell/ShellToolDefinition.d.ts.map +1 -1
  954. package/bin/session/tools/shell/ShellToolFormatting.js +1 -1
  955. package/bin/session/tools/shell/ShellToolFormatting.js.map +1 -1
  956. package/bin/session/types/SessionExecutor.d.ts +18 -0
  957. package/bin/session/types/SessionExecutor.d.ts.map +1 -0
  958. package/bin/session/types/SessionExecutor.js.map +1 -0
  959. package/bin/session/types/SessionHistoryMeta.d.ts.map +1 -0
  960. package/bin/session/types/SessionHistoryMeta.js.map +1 -0
  961. package/bin/session/types/SessionHistoryPaths.d.ts.map +1 -0
  962. package/bin/session/types/SessionHistoryPaths.js.map +1 -0
  963. package/bin/session/types/SessionLoop.d.ts.map +1 -0
  964. package/bin/session/types/SessionLoop.js.map +1 -0
  965. package/bin/session/types/SessionMessages.d.ts +83 -0
  966. package/bin/session/types/SessionMessages.d.ts.map +1 -0
  967. package/bin/session/types/SessionMessages.js.map +1 -0
  968. package/bin/session/types/SessionPrompts.d.ts.map +1 -0
  969. package/bin/session/types/SessionPrompts.js.map +1 -0
  970. package/bin/session/types/SessionRun.d.ts +112 -0
  971. package/bin/session/types/SessionRun.d.ts.map +1 -0
  972. package/bin/session/types/SessionRun.js.map +1 -0
  973. package/bin/transport/rpc/Client.d.ts.map +1 -0
  974. package/bin/transport/rpc/Client.js.map +1 -0
  975. package/bin/transport/rpc/Paths.d.ts.map +1 -0
  976. package/bin/transport/rpc/Paths.js +55 -0
  977. package/bin/transport/rpc/Paths.js.map +1 -0
  978. package/bin/transport/rpc/Transport.d.ts.map +1 -0
  979. package/bin/transport/rpc/Transport.js.map +1 -0
  980. package/bin/types/auth/AuthPermission.d.ts.map +1 -0
  981. package/bin/types/auth/AuthPermission.js.map +1 -0
  982. package/bin/types/auth/AuthRoute.d.ts.map +1 -0
  983. package/bin/types/auth/AuthRoute.js.map +1 -0
  984. package/bin/types/auth/AuthToken.d.ts.map +1 -0
  985. package/bin/types/auth/AuthToken.js.map +1 -0
  986. package/bin/types/auth/AuthTypes.d.ts.map +1 -0
  987. package/bin/types/auth/AuthTypes.js.map +1 -0
  988. package/bin/types/common/Json.d.ts.map +1 -0
  989. package/bin/types/common/Json.js.map +1 -0
  990. package/bin/types/common/Template.d.ts.map +1 -0
  991. package/bin/types/common/Template.js.map +1 -0
  992. package/bin/types/config/DowncityConfig.d.ts +214 -0
  993. package/bin/types/config/DowncityConfig.d.ts.map +1 -0
  994. package/bin/types/config/DowncityConfig.js.map +1 -0
  995. package/bin/types/config/ExecutionBinding.d.ts.map +1 -0
  996. package/bin/types/config/ExecutionBinding.js.map +1 -0
  997. package/bin/types/config/LlmConfig.d.ts.map +1 -0
  998. package/bin/types/config/LlmConfig.js.map +1 -0
  999. package/bin/types/config/ModelBinding.d.ts.map +1 -0
  1000. package/bin/types/config/ModelBinding.js.map +1 -0
  1001. package/bin/types/config/Start.d.ts.map +1 -0
  1002. package/bin/types/config/Start.js.map +1 -0
  1003. package/bin/types/daemon/Daemon.d.ts +46 -0
  1004. package/bin/types/daemon/Daemon.d.ts.map +1 -0
  1005. package/bin/types/daemon/Daemon.js +14 -0
  1006. package/bin/types/daemon/Daemon.js.map +1 -0
  1007. package/bin/types/host/AgentHost.d.ts +188 -0
  1008. package/bin/types/host/AgentHost.d.ts.map +1 -0
  1009. package/bin/types/host/AgentHost.js +10 -0
  1010. package/bin/types/host/AgentHost.js.map +1 -0
  1011. package/bin/types/host/Store.d.ts +408 -0
  1012. package/bin/types/host/Store.d.ts.map +1 -0
  1013. package/bin/types/host/Store.js.map +1 -0
  1014. package/bin/types/http/InlineInstant.d.ts.map +1 -0
  1015. package/bin/types/http/InlineInstant.js.map +1 -0
  1016. package/bin/types/platform/Platform.d.ts.map +1 -0
  1017. package/bin/types/platform/Platform.js.map +1 -0
  1018. package/bin/types/platform/PlatformGateway.d.ts.map +1 -0
  1019. package/bin/types/platform/PlatformGateway.js.map +1 -0
  1020. package/bin/types/rpc/LocalRpc.d.ts +69 -0
  1021. package/bin/types/rpc/LocalRpc.d.ts.map +1 -0
  1022. package/bin/types/rpc/LocalRpc.js.map +1 -0
  1023. package/bin/utils/Id.d.ts.map +1 -0
  1024. package/bin/utils/Id.js.map +1 -0
  1025. package/bin/utils/Template.d.ts +17 -0
  1026. package/bin/utils/Template.d.ts.map +1 -0
  1027. package/bin/utils/Template.js.map +1 -0
  1028. package/bin/utils/Time.d.ts.map +1 -0
  1029. package/bin/utils/Time.js.map +1 -0
  1030. package/bin/utils/cli/Checker.d.ts.map +1 -0
  1031. package/bin/utils/cli/Checker.js.map +1 -0
  1032. package/bin/utils/cli/CliOutput.d.ts.map +1 -0
  1033. package/bin/utils/cli/CliOutput.js +98 -0
  1034. package/bin/utils/cli/CliOutput.js.map +1 -0
  1035. package/bin/utils/cli/PrettyStatus.d.ts.map +1 -0
  1036. package/bin/utils/cli/PrettyStatus.js.map +1 -0
  1037. package/bin/utils/logger/Fetch.d.ts +14 -0
  1038. package/bin/utils/logger/Fetch.d.ts.map +1 -0
  1039. package/bin/utils/logger/Fetch.js.map +1 -0
  1040. package/bin/utils/logger/Format.d.ts.map +1 -0
  1041. package/bin/utils/logger/Format.js.map +1 -0
  1042. package/bin/utils/logger/FormatRequest.d.ts +29 -0
  1043. package/bin/utils/logger/FormatRequest.d.ts.map +1 -0
  1044. package/bin/utils/logger/FormatRequest.js +309 -0
  1045. package/bin/utils/logger/FormatRequest.js.map +1 -0
  1046. package/bin/utils/logger/FormatResponse.d.ts +46 -0
  1047. package/bin/utils/logger/FormatResponse.d.ts.map +1 -0
  1048. package/bin/utils/logger/FormatResponse.js.map +1 -0
  1049. package/bin/utils/logger/FormatShared.d.ts +33 -0
  1050. package/bin/utils/logger/FormatShared.d.ts.map +1 -0
  1051. package/bin/utils/logger/FormatShared.js.map +1 -0
  1052. package/bin/utils/logger/Logger.d.ts +101 -0
  1053. package/bin/utils/logger/Logger.d.ts.map +1 -0
  1054. package/bin/utils/logger/Logger.js +308 -0
  1055. package/bin/utils/logger/Logger.js.map +1 -0
  1056. package/bin/utils/storage/index.d.ts +5 -0
  1057. package/bin/utils/storage/index.d.ts.map +1 -0
  1058. package/bin/utils/storage/index.js.map +1 -0
  1059. package/package.json +4 -4
  1060. package/scripts/agent-compiler.mjs +253 -0
  1061. package/src/config/Config.ts +6 -7
  1062. package/src/config/DowncityDefault.ts +38 -0
  1063. package/src/config/DowncitySchema.ts +377 -0
  1064. package/src/config/Paths.ts +2 -2
  1065. package/src/host/daemon/Api.ts +2 -2
  1066. package/src/host/daemon/Client.ts +3 -3
  1067. package/src/host/daemon/Paths.ts +33 -0
  1068. package/src/host/daemon/ProjectSetup.ts +2 -2
  1069. package/src/host/runtime/AgentHostRuntime.ts +5 -5
  1070. package/src/host/runtime/PluginRuntime.ts +1 -1
  1071. package/src/index.ts +283 -166
  1072. package/src/model/CreateModel.ts +6 -6
  1073. package/src/model/ModelManager.ts +1 -1
  1074. package/src/plugin/builtins/asr/Config.ts +138 -0
  1075. package/src/plugin/builtins/asr/Dependency.ts +336 -0
  1076. package/src/plugin/builtins/asr/InboundAugment.ts +59 -0
  1077. package/src/plugin/builtins/asr/ModelCatalog.ts +43 -0
  1078. package/src/plugin/builtins/asr/Plugin.ts +488 -0
  1079. package/src/plugin/builtins/auth/Plugin.ts +209 -0
  1080. package/src/plugin/builtins/auth/runtime/AuthorizationConfig.ts +265 -0
  1081. package/src/plugin/builtins/auth/runtime/AuthorizationPolicy.ts +168 -0
  1082. package/src/plugin/builtins/auth/runtime/AuthorizationStore.ts +219 -0
  1083. package/src/plugin/builtins/skill/Action.ts +159 -0
  1084. package/src/plugin/builtins/skill/Command.ts +98 -0
  1085. package/src/plugin/builtins/skill/Config.ts +51 -0
  1086. package/src/plugin/builtins/skill/PROMPT.ts +9 -0
  1087. package/src/plugin/builtins/skill/Plugin.ts +334 -0
  1088. package/src/plugin/builtins/skill/SkillPromptAssets.ts +14 -0
  1089. package/src/plugin/builtins/skill/runtime/Discovery.ts +141 -0
  1090. package/src/plugin/builtins/skill/runtime/Paths.ts +130 -0
  1091. package/src/plugin/builtins/skill/runtime/Prompt.ts +67 -0
  1092. package/src/plugin/builtins/skill/runtime/Store.ts +95 -0
  1093. package/src/plugin/builtins/skill/runtime/SystemProvider.ts +52 -0
  1094. package/src/plugin/builtins/skill/runtime/Types.ts +22 -0
  1095. package/src/plugin/builtins/skill/types/ClaudeSkill.ts +64 -0
  1096. package/src/plugin/builtins/tts/Dependency.ts +473 -0
  1097. package/src/plugin/builtins/tts/Plugin.ts +496 -0
  1098. package/src/plugin/builtins/tts/PluginSupport.ts +85 -0
  1099. package/src/plugin/builtins/tts/runtime/Catalog.ts +97 -0
  1100. package/src/plugin/builtins/tts/runtime/DependencyInstaller.ts +436 -0
  1101. package/src/plugin/builtins/tts/runtime/Installer.ts +297 -0
  1102. package/src/plugin/builtins/tts/runtime/Synthesizer.ts +480 -0
  1103. package/src/plugin/builtins/tts/types/TtsPlugin.ts +164 -0
  1104. package/src/plugin/builtins/voice/Config.ts +135 -0
  1105. package/src/plugin/builtins/voice/Dependency.ts +329 -0
  1106. package/src/plugin/builtins/voice/InboundAugment.ts +59 -0
  1107. package/src/plugin/builtins/voice/ModelCatalog.ts +43 -0
  1108. package/src/plugin/builtins/voice/Plugin.ts +450 -0
  1109. package/src/plugin/builtins/voice/runtime/Catalog.ts +68 -0
  1110. package/src/plugin/builtins/voice/runtime/DependencyInstaller.ts +505 -0
  1111. package/src/plugin/builtins/voice/runtime/Installer.ts +324 -0
  1112. package/src/plugin/builtins/voice/runtime/Transcriber.ts +467 -0
  1113. package/src/plugin/builtins/voice/types/VoicePlugin.ts +194 -0
  1114. package/src/plugin/builtins/web/Dependency.ts +17 -0
  1115. package/src/plugin/builtins/web/PROMPT.agent-browser.ts +9 -0
  1116. package/src/plugin/builtins/web/PROMPT.ts +9 -0
  1117. package/src/plugin/builtins/web/PROMPT.web-access.ts +9 -0
  1118. package/src/plugin/builtins/web/Plugin.ts +501 -0
  1119. package/src/plugin/builtins/web/WebPromptAssets.ts +26 -0
  1120. package/src/plugin/builtins/web/runtime/Config.ts +105 -0
  1121. package/src/plugin/builtins/web/runtime/Source.ts +257 -0
  1122. package/src/plugin/builtins/web/types/WebPlugin.ts +141 -0
  1123. package/src/plugin/builtins/workboard/Plugin.ts +81 -0
  1124. package/src/plugin/builtins/workboard/runtime/Collector.ts +78 -0
  1125. package/src/plugin/builtins/workboard/runtime/Normalizer.ts +213 -0
  1126. package/src/plugin/builtins/workboard/runtime/Store.ts +110 -0
  1127. package/src/plugin/core/Activation.ts +26 -0
  1128. package/src/plugin/core/Catalog.ts +118 -0
  1129. package/src/plugin/core/HookRegistry.ts +249 -0
  1130. package/src/plugin/core/HttpRoutes.ts +50 -0
  1131. package/src/plugin/core/LocalExecution.ts +179 -0
  1132. package/src/plugin/core/PluginCommand.ts +219 -0
  1133. package/src/plugin/core/PluginManager.ts +66 -0
  1134. package/src/plugin/core/PluginRegistry.ts +244 -0
  1135. package/src/plugin/core/Plugins.ts +39 -0
  1136. package/src/plugin/core/ProjectConfigStore.ts +58 -0
  1137. package/src/plugin/types/Plugin.ts +748 -0
  1138. package/src/plugin/types/PluginApi.ts +161 -0
  1139. package/src/project/AgentInitializer.ts +427 -0
  1140. package/src/project/ProjectExecutionBinding.ts +53 -0
  1141. package/src/project/types/AgentProject.ts +92 -0
  1142. package/src/runtime/AgentContext.ts +182 -0
  1143. package/src/runtime/AgentContextTypes.ts +385 -0
  1144. package/src/runtime/AgentRuntime.ts +376 -0
  1145. package/src/runtime/AgentRuntimeState.ts +213 -0
  1146. package/src/runtime/AgentRuntimeTypes.ts +91 -0
  1147. package/src/sandbox/MacOsSeatbeltSandbox.ts +1 -1
  1148. package/src/sandbox/SandboxConfigResolver.ts +2 -2
  1149. package/src/sandbox/SandboxRunner.ts +2 -2
  1150. package/src/sandbox/types/Sandbox.ts +144 -0
  1151. package/src/sandbox/types/SandboxRuntime.ts +377 -0
  1152. package/src/sdk/Agent.ts +419 -0
  1153. package/src/sdk/AgentSdkTypes.ts +296 -0
  1154. package/src/sdk/HttpServer.ts +231 -0
  1155. package/src/sdk/RemoteAgent.ts +223 -0
  1156. package/src/sdk/RpcServer.ts +244 -0
  1157. package/src/sdk/SdkSessionSystemComposer.ts +173 -0
  1158. package/src/sdk/Session.ts +478 -0
  1159. package/src/sdk/SessionMetadata.ts +178 -0
  1160. package/src/sdk/SessionPersistence.ts +113 -0
  1161. package/src/sdk/SessionServicePort.ts +62 -0
  1162. package/src/sdk/StreamEvents.ts +138 -0
  1163. package/src/server/http/Server.ts +157 -0
  1164. package/src/server/http/control/AuthControlService.ts +161 -0
  1165. package/src/server/http/control/ControlApiRoutes.ts +31 -0
  1166. package/src/server/http/control/ControlAuthorizationRoutes.ts +108 -0
  1167. package/src/server/http/control/ControlRouter.ts +31 -0
  1168. package/src/server/http/control/ExecuteBySession.ts +151 -0
  1169. package/src/server/http/control/ExecuteInput.ts +236 -0
  1170. package/src/server/http/control/MessageTimeline.ts +269 -0
  1171. package/src/server/http/control/ModelRoutes.ts +101 -0
  1172. package/src/server/http/control/OverviewRoutes.ts +106 -0
  1173. package/src/server/http/control/SessionRoutes.ts +414 -0
  1174. package/src/server/http/control/SessionSummaryStore.ts +76 -0
  1175. package/src/server/http/control/TaskRoutes.ts +391 -0
  1176. package/src/server/http/control/TaskStore.ts +222 -0
  1177. package/src/server/http/control/types/AuthControl.ts +38 -0
  1178. package/src/server/http/control/types/ControlRoutes.ts +31 -0
  1179. package/src/server/http/control/types/ControlViewData.ts +392 -0
  1180. package/src/server/http/execute/execute.ts +120 -0
  1181. package/src/server/http/plugins/plugins.ts +67 -0
  1182. package/src/server/http/services/services.ts +94 -0
  1183. package/src/server/http/static/static.ts +104 -0
  1184. package/src/server/rpc/Server.ts +395 -0
  1185. package/src/service/builtins/BaseService.ts +4 -4
  1186. package/src/service/builtins/README.md +32 -11
  1187. package/src/service/builtins/chat/Action.ts +1 -1
  1188. package/src/service/builtins/chat/ChatService.ts +6 -6
  1189. package/src/service/builtins/chat/ChatServiceTypes.ts +3 -3
  1190. package/src/service/builtins/chat/PROMPT.direct.ts +9 -0
  1191. package/src/service/builtins/chat/accounts/ChannelAccountService.ts +2 -2
  1192. package/src/service/builtins/chat/channels/BaseChatChannel.ts +2 -2
  1193. package/src/service/builtins/chat/channels/BaseChatChannelQueue.ts +2 -2
  1194. package/src/service/builtins/chat/channels/BaseChatChannelSupport.ts +3 -3
  1195. package/src/service/builtins/chat/channels/feishu/Feishu.ts +66 -233
  1196. package/src/service/builtins/chat/channels/feishu/FeishuInbound.ts +1 -1
  1197. package/src/service/builtins/chat/channels/feishu/FeishuMessageHandler.ts +483 -0
  1198. package/src/service/builtins/chat/channels/feishu/FeishuPlatformClient.ts +2 -2
  1199. package/src/service/builtins/chat/channels/feishu/FeishuPlatformLookup.ts +2 -2
  1200. package/src/service/builtins/chat/channels/feishu/FeishuPlatformMessaging.ts +1 -1
  1201. package/src/service/builtins/chat/channels/feishu/PROMPT.direct.ts +9 -0
  1202. package/src/service/builtins/chat/channels/feishu/types/FeishuChannel.ts +131 -0
  1203. package/src/service/builtins/chat/channels/qq/PROMPT.direct.ts +9 -0
  1204. package/src/service/builtins/chat/channels/qq/QQ.ts +58 -293
  1205. package/src/service/builtins/chat/channels/qq/QQEventCapture.ts +2 -2
  1206. package/src/service/builtins/chat/channels/qq/QQGatewayAuth.ts +2 -2
  1207. package/src/service/builtins/chat/channels/qq/QQGatewayClient.ts +78 -252
  1208. package/src/service/builtins/chat/channels/qq/QQGatewayConnection.ts +175 -0
  1209. package/src/service/builtins/chat/channels/qq/QQGatewayHeartbeat.ts +114 -0
  1210. package/src/service/builtins/chat/channels/qq/QQGatewayProtocol.ts +176 -0
  1211. package/src/service/builtins/chat/channels/qq/QQGatewaySend.ts +2 -2
  1212. package/src/service/builtins/chat/channels/qq/QQGatewaySupport.ts +3 -3
  1213. package/src/service/builtins/chat/channels/qq/QQInbound.ts +2 -2
  1214. package/src/service/builtins/chat/channels/qq/QQInboundDedupe.ts +1 -1
  1215. package/src/service/builtins/chat/channels/qq/QQMessageHandler.ts +465 -0
  1216. package/src/service/builtins/chat/channels/qq/QQSendSupport.ts +1 -1
  1217. package/src/service/builtins/chat/channels/qq/QQSupport.ts +3 -3
  1218. package/src/service/builtins/chat/channels/qq/VoiceInput.ts +1 -1
  1219. package/src/service/builtins/chat/channels/qq/types/QqChannel.ts +501 -0
  1220. package/src/service/builtins/chat/channels/telegram/ApiClient.ts +1 -1
  1221. package/src/service/builtins/chat/channels/telegram/Bot.ts +57 -352
  1222. package/src/service/builtins/chat/channels/telegram/Handlers.ts +1 -1
  1223. package/src/service/builtins/chat/channels/telegram/PROMPT.direct.ts +9 -0
  1224. package/src/service/builtins/chat/channels/telegram/PROMPT.direct.ts.txt +2 -0
  1225. package/src/service/builtins/chat/channels/telegram/StateStore.ts +1 -1
  1226. package/src/service/builtins/chat/channels/telegram/TelegramMessageHandler.ts +485 -0
  1227. package/src/service/builtins/chat/channels/telegram/TelegramPendingUpdates.ts +204 -0
  1228. package/src/service/builtins/chat/channels/telegram/TelegramPlatformClient.ts +1 -1
  1229. package/src/service/builtins/chat/runtime/ChannelContextStore.ts +2 -2
  1230. package/src/service/builtins/chat/runtime/ChatActionExecution.ts +3 -3
  1231. package/src/service/builtins/chat/runtime/ChatActionInput.ts +16 -283
  1232. package/src/service/builtins/chat/runtime/ChatActionInputSupport.ts +85 -0
  1233. package/src/service/builtins/chat/runtime/ChatChannelActions.ts +3 -3
  1234. package/src/service/builtins/chat/runtime/ChatChannelConfig.ts +4 -4
  1235. package/src/service/builtins/chat/runtime/ChatChannelCore.ts +3 -3
  1236. package/src/service/builtins/chat/runtime/ChatChannelLifecycle.ts +2 -2
  1237. package/src/service/builtins/chat/runtime/ChatHistoryStore.ts +3 -3
  1238. package/src/service/builtins/chat/runtime/ChatIngressStore.ts +2 -2
  1239. package/src/service/builtins/chat/runtime/ChatMetaStore.ts +3 -3
  1240. package/src/service/builtins/chat/runtime/ChatPromptAssets.ts +32 -0
  1241. package/src/service/builtins/chat/runtime/ChatQueueReplyDispatch.ts +2 -2
  1242. package/src/service/builtins/chat/runtime/ChatQueueSessionBridge.ts +4 -4
  1243. package/src/service/builtins/chat/runtime/ChatQueueStore.ts +1 -1
  1244. package/src/service/builtins/chat/runtime/ChatQueueWorker.ts +6 -6
  1245. package/src/service/builtins/chat/runtime/ChatQueueWorkerSupport.ts +1 -1
  1246. package/src/service/builtins/chat/runtime/ChatSendActionInput.ts +255 -0
  1247. package/src/service/builtins/chat/runtime/ChatServiceActions.ts +4 -4
  1248. package/src/service/builtins/chat/runtime/ChatServiceSystem.ts +10 -59
  1249. package/src/service/builtins/chat/runtime/ChatSession.ts +3 -3
  1250. package/src/service/builtins/chat/runtime/ChatSessionDelete.ts +1 -1
  1251. package/src/service/builtins/chat/runtime/ChatSessionExecutionComposer.ts +2 -2
  1252. package/src/service/builtins/chat/runtime/ChatSessionTypes.ts +2 -2
  1253. package/src/service/builtins/chat/runtime/ChatkeySend.ts +2 -2
  1254. package/src/service/builtins/chat/runtime/EnqueueDispatch.ts +3 -3
  1255. package/src/service/builtins/chat/runtime/InboundAugment.ts +3 -3
  1256. package/src/service/builtins/chat/runtime/PluginDispatch.ts +3 -3
  1257. package/src/service/builtins/chat/runtime/QueuedUserMessage.ts +1 -1
  1258. package/src/service/builtins/chat/runtime/ReplyContextFormatter.ts +1 -1
  1259. package/src/service/builtins/chat/runtime/ReplyDispatch.ts +3 -3
  1260. package/src/service/builtins/chat/runtime/SystemPrompt.ts +2 -2
  1261. package/src/service/builtins/chat/runtime/UIMessageTransformer.ts +2 -2
  1262. package/src/service/builtins/chat/runtime/UserVisibleText.ts +1 -1
  1263. package/src/service/builtins/chat/types/ChannelAccount.ts +1 -1
  1264. package/src/service/builtins/chat/types/ChatHistory.ts +1 -1
  1265. package/src/service/builtins/chat/types/ChatMeta.ts +1 -1
  1266. package/src/service/builtins/chat/types/ChatPromptContext.ts +139 -0
  1267. package/src/service/builtins/chat/types/ChatQueue.ts +1 -1
  1268. package/src/service/builtins/chat/types/ChatService.ts +165 -0
  1269. package/src/service/builtins/contact/Action.ts +368 -4
  1270. package/src/service/builtins/contact/ContactService.ts +31 -325
  1271. package/src/service/builtins/contact/PROMPT.ts +9 -0
  1272. package/src/service/builtins/contact/runtime/ChatRuntime.ts +2 -2
  1273. package/src/service/builtins/contact/runtime/ContactPayload.ts +38 -0
  1274. package/src/service/builtins/contact/runtime/ContactPromptAssets.ts +14 -0
  1275. package/src/service/builtins/contact/runtime/RemoteClient.ts +1 -1
  1276. package/src/service/builtins/contact/runtime/ShareBundle.ts +1 -1
  1277. package/src/service/builtins/contact/runtime/SystemProvider.ts +3 -10
  1278. package/src/service/builtins/memory/Action.ts +3 -3
  1279. package/src/service/builtins/memory/MemoryService.ts +3 -3
  1280. package/src/service/builtins/memory/runtime/Flush.ts +1 -1
  1281. package/src/service/builtins/memory/runtime/Search.ts +1 -1
  1282. package/src/service/builtins/memory/runtime/Store.ts +1 -1
  1283. package/src/service/builtins/memory/runtime/SystemProvider.ts +1 -1
  1284. package/src/service/builtins/memory/runtime/Writer.ts +1 -1
  1285. package/src/service/builtins/memory/types/Memory.ts +1 -1
  1286. package/src/service/builtins/shell/ShellRuntimeTypes.ts +2 -2
  1287. package/src/service/builtins/shell/ShellService.ts +3 -3
  1288. package/src/service/builtins/shell/runtime/ShellActionResponse.ts +135 -0
  1289. package/src/service/builtins/shell/runtime/ShellActionRuntime.ts +4 -39
  1290. package/src/service/builtins/shell/runtime/ShellActionRuntimeSupport.ts +11 -165
  1291. package/src/service/builtins/shell/runtime/ShellProcessEvents.ts +65 -0
  1292. package/src/service/builtins/shell/runtime/ShellRuntimeEnvironment.ts +75 -0
  1293. package/src/service/builtins/task/Action.ts +2 -2
  1294. package/src/service/builtins/task/PROMPT.ts +9 -0
  1295. package/src/service/builtins/task/Scheduler.ts +2 -2
  1296. package/src/service/builtins/task/TaskService.ts +4 -4
  1297. package/src/service/builtins/task/runtime/CronRuntime.ts +1 -1
  1298. package/src/service/builtins/task/runtime/Model.ts +1 -1
  1299. package/src/service/builtins/task/runtime/Paths.ts +1 -1
  1300. package/src/service/builtins/task/runtime/Runner.ts +17 -63
  1301. package/src/service/builtins/task/runtime/TaskActionExecution.ts +3 -3
  1302. package/src/service/builtins/task/runtime/TaskActionInput.ts +3 -3
  1303. package/src/service/builtins/task/runtime/TaskPromptAssets.ts +14 -0
  1304. package/src/service/builtins/task/runtime/TaskRunChatDispatch.ts +1 -1
  1305. package/src/service/builtins/task/runtime/TaskRunnerRound.ts +4 -4
  1306. package/src/service/builtins/task/runtime/TaskRunnerScript.ts +175 -0
  1307. package/src/service/builtins/task/runtime/TaskRunnerSession.ts +3 -3
  1308. package/src/service/builtins/task/runtime/TaskRunnerTypes.ts +1 -1
  1309. package/src/service/builtins/task/runtime/TaskServiceActions.ts +2 -2
  1310. package/src/service/builtins/task/runtime/TaskServiceSystem.ts +2 -24
  1311. package/src/service/builtins/task/types/TaskService.ts +55 -0
  1312. package/src/service/core/Manager.ts +4 -4
  1313. package/src/service/core/ServiceActionApi.ts +4 -4
  1314. package/src/service/core/ServiceActionRunner.ts +5 -5
  1315. package/src/service/core/ServiceClassRegistry.ts +2 -2
  1316. package/src/service/core/ServiceManager.ts +3 -3
  1317. package/src/service/core/ServiceStateController.ts +4 -4
  1318. package/src/service/core/ServiceSystemProviders.ts +1 -1
  1319. package/src/service/core/Services.ts +1 -1
  1320. package/src/service/schedule/Executor.ts +1 -1
  1321. package/src/service/schedule/Runtime.ts +1 -1
  1322. package/src/service/schedule/Store.ts +3 -3
  1323. package/src/service/types/Service.ts +223 -0
  1324. package/src/service/types/ServiceSchedule.ts +134 -0
  1325. package/src/service/types/ServiceState.ts +112 -0
  1326. package/src/service/types/Services.ts +100 -0
  1327. package/src/session/Session.ts +4 -4
  1328. package/src/session/SessionRunScope.ts +2 -2
  1329. package/src/session/composer/compaction/jsonl/JsonlSessionCompactionExecutor.ts +4 -4
  1330. package/src/session/composer/execution/LocalSessionExecutionComposer.ts +3 -3
  1331. package/src/session/composer/execution/SessionExecutionComposer.ts +2 -2
  1332. package/src/session/composer/history/SessionHistoryComposer.ts +2 -2
  1333. package/src/session/composer/history/SessionHistoryWriter.ts +2 -2
  1334. package/src/session/composer/history/jsonl/JsonlSessionHistoryComposer.ts +6 -6
  1335. package/src/session/composer/system/default/DefaultSessionSystemComposer.ts +1 -1
  1336. package/src/session/composer/system/default/InitPromptAssets.ts +20 -0
  1337. package/src/session/composer/system/default/InitPrompts.ts +5 -46
  1338. package/src/session/composer/system/default/StaticPromptCatalog.ts +1 -1
  1339. package/src/session/composer/system/default/SystemDomain.ts +11 -44
  1340. package/src/session/composer/system/default/SystemPromptAssets.ts +26 -0
  1341. package/src/session/composer/system/default/assets/core.prompt.ts +9 -0
  1342. package/src/session/composer/system/default/assets/init/PROFILE.md.ts +9 -0
  1343. package/src/session/composer/system/default/assets/init/PROFILE.md.ts.txt +18 -0
  1344. package/src/session/composer/system/default/assets/init/SOUL.md.ts +9 -0
  1345. package/src/session/composer/system/default/assets/init/SOUL.md.ts.txt +89 -0
  1346. package/src/session/composer/system/default/assets/service.prompt.ts +9 -0
  1347. package/src/session/composer/system/default/assets/task.prompt.ts +9 -0
  1348. package/src/session/composer/system/default/variables/VariableReplacer.ts +2 -2
  1349. package/src/session/executors/local/LocalSessionCore.ts +12 -500
  1350. package/src/session/executors/local/LocalSessionExecutor.ts +2 -2
  1351. package/src/session/executors/local/SessionExecutionError.ts +47 -0
  1352. package/src/session/executors/local/SessionLoopDecision.ts +1 -1
  1353. package/src/session/executors/local/SessionModelMessageState.ts +133 -0
  1354. package/src/session/executors/local/SessionSignals.ts +2 -2
  1355. package/src/session/executors/local/SessionToolLoopRunner.ts +350 -0
  1356. package/src/session/executors/local/SessionUiStreamCollector.ts +96 -0
  1357. package/src/session/messages/SessionAttachmentMapper.ts +1 -1
  1358. package/src/session/messages/SessionMessageCodec.ts +1 -1
  1359. package/src/session/messages/SessionMessageLog.ts +2 -2
  1360. package/src/session/messages/SessionStepEventMapper.ts +3 -3
  1361. package/src/session/tools/shell/ShellToolBridge.ts +3 -3
  1362. package/src/session/tools/shell/ShellToolDefinition.ts +2 -2
  1363. package/src/session/tools/shell/ShellToolFormatting.ts +1 -1
  1364. package/src/session/types/SessionExecutor.ts +33 -0
  1365. package/src/session/types/SessionMessages.ts +90 -0
  1366. package/src/session/types/SessionRun.ts +132 -0
  1367. package/src/transport/rpc/Client.ts +113 -0
  1368. package/src/transport/rpc/Paths.ts +63 -0
  1369. package/src/types/config/DowncityConfig.ts +215 -0
  1370. package/src/types/daemon/Daemon.ts +53 -0
  1371. package/src/types/host/AgentHost.ts +208 -0
  1372. package/src/types/host/Store.ts +422 -0
  1373. package/src/types/rpc/LocalRpc.ts +72 -0
  1374. package/src/utils/Template.ts +28 -0
  1375. package/src/utils/cli/CliOutput.ts +128 -0
  1376. package/src/utils/logger/Fetch.ts +93 -0
  1377. package/src/utils/logger/FormatRequest.ts +455 -0
  1378. package/src/utils/logger/FormatResponse.ts +265 -0
  1379. package/src/utils/logger/FormatShared.ts +258 -0
  1380. package/src/utils/logger/Logger.ts +372 -0
  1381. package/src/utils/storage/index.ts +26 -0
  1382. package/tsconfig.json +1 -2
  1383. package/tsconfig.tsbuildinfo +1 -1
  1384. package/bin/agent/AgentContext.d.ts +0 -23
  1385. package/bin/agent/AgentContext.d.ts.map +0 -1
  1386. package/bin/agent/AgentContext.js +0 -149
  1387. package/bin/agent/AgentContext.js.map +0 -1
  1388. package/bin/agent/AgentContextTypes.d.ts +0 -349
  1389. package/bin/agent/AgentContextTypes.d.ts.map +0 -1
  1390. package/bin/agent/AgentContextTypes.js.map +0 -1
  1391. package/bin/agent/AgentRuntime.d.ts +0 -37
  1392. package/bin/agent/AgentRuntime.d.ts.map +0 -1
  1393. package/bin/agent/AgentRuntime.js +0 -296
  1394. package/bin/agent/AgentRuntime.js.map +0 -1
  1395. package/bin/agent/AgentRuntimeState.d.ts +0 -42
  1396. package/bin/agent/AgentRuntimeState.d.ts.map +0 -1
  1397. package/bin/agent/AgentRuntimeState.js.map +0 -1
  1398. package/bin/agent/AgentRuntimeTypes.d.ts +0 -85
  1399. package/bin/agent/AgentRuntimeTypes.d.ts.map +0 -1
  1400. package/bin/agent/AgentRuntimeTypes.js.map +0 -1
  1401. package/bin/agent/project/AgentInitializer.d.ts +0 -39
  1402. package/bin/agent/project/AgentInitializer.d.ts.map +0 -1
  1403. package/bin/agent/project/AgentInitializer.js +0 -298
  1404. package/bin/agent/project/AgentInitializer.js.map +0 -1
  1405. package/bin/agent/project/ProjectExecutionBinding.d.ts +0 -27
  1406. package/bin/agent/project/ProjectExecutionBinding.d.ts.map +0 -1
  1407. package/bin/agent/project/ProjectExecutionBinding.js.map +0 -1
  1408. package/bin/host/daemon/Manager.d.ts +0 -92
  1409. package/bin/host/daemon/Manager.d.ts.map +0 -1
  1410. package/bin/host/daemon/Manager.js +0 -287
  1411. package/bin/host/daemon/Manager.js.map +0 -1
  1412. package/bin/host/rpc/Client.d.ts.map +0 -1
  1413. package/bin/host/rpc/Client.js.map +0 -1
  1414. package/bin/host/rpc/Paths.d.ts.map +0 -1
  1415. package/bin/host/rpc/Paths.js +0 -36
  1416. package/bin/host/rpc/Paths.js.map +0 -1
  1417. package/bin/host/rpc/Server.d.ts +0 -18
  1418. package/bin/host/rpc/Server.d.ts.map +0 -1
  1419. package/bin/host/rpc/Server.js +0 -307
  1420. package/bin/host/rpc/Server.js.map +0 -1
  1421. package/bin/host/rpc/Transport.d.ts.map +0 -1
  1422. package/bin/host/rpc/Transport.js.map +0 -1
  1423. package/bin/host/runtime/CityPaths.d.ts +0 -50
  1424. package/bin/host/runtime/CityPaths.d.ts.map +0 -1
  1425. package/bin/host/runtime/CityPaths.js +0 -75
  1426. package/bin/host/runtime/CityPaths.js.map +0 -1
  1427. package/bin/host/runtime/CityRegistry.d.ts +0 -51
  1428. package/bin/host/runtime/CityRegistry.d.ts.map +0 -1
  1429. package/bin/host/runtime/CityRegistry.js +0 -217
  1430. package/bin/host/runtime/CityRegistry.js.map +0 -1
  1431. package/bin/host/runtime/CityRuntime.d.ts +0 -21
  1432. package/bin/host/runtime/CityRuntime.d.ts.map +0 -1
  1433. package/bin/host/runtime/CityRuntime.js +0 -45
  1434. package/bin/host/runtime/CityRuntime.js.map +0 -1
  1435. package/bin/host/runtime/ProcessSweep.d.ts +0 -76
  1436. package/bin/host/runtime/ProcessSweep.d.ts.map +0 -1
  1437. package/bin/host/runtime/ProcessSweep.js +0 -188
  1438. package/bin/host/runtime/ProcessSweep.js.map +0 -1
  1439. package/bin/host/sdk/Agent.d.ts +0 -64
  1440. package/bin/host/sdk/Agent.d.ts.map +0 -1
  1441. package/bin/host/sdk/Agent.js +0 -377
  1442. package/bin/host/sdk/Agent.js.map +0 -1
  1443. package/bin/host/sdk/AgentSdkTypes.d.ts +0 -266
  1444. package/bin/host/sdk/AgentSdkTypes.d.ts.map +0 -1
  1445. package/bin/host/sdk/AgentSdkTypes.js.map +0 -1
  1446. package/bin/host/sdk/AsyncQueue.d.ts.map +0 -1
  1447. package/bin/host/sdk/AsyncQueue.js.map +0 -1
  1448. package/bin/host/sdk/HttpServer.d.ts +0 -40
  1449. package/bin/host/sdk/HttpServer.d.ts.map +0 -1
  1450. package/bin/host/sdk/HttpServer.js +0 -181
  1451. package/bin/host/sdk/HttpServer.js.map +0 -1
  1452. package/bin/host/sdk/Paths.d.ts.map +0 -1
  1453. package/bin/host/sdk/Paths.js.map +0 -1
  1454. package/bin/host/sdk/RemoteAgent.d.ts +0 -54
  1455. package/bin/host/sdk/RemoteAgent.d.ts.map +0 -1
  1456. package/bin/host/sdk/RemoteAgent.js +0 -153
  1457. package/bin/host/sdk/RemoteAgent.js.map +0 -1
  1458. package/bin/host/sdk/RpcServer.d.ts +0 -31
  1459. package/bin/host/sdk/RpcServer.d.ts.map +0 -1
  1460. package/bin/host/sdk/RpcServer.js +0 -193
  1461. package/bin/host/sdk/RpcServer.js.map +0 -1
  1462. package/bin/host/sdk/SdkSessionSystemComposer.d.ts +0 -43
  1463. package/bin/host/sdk/SdkSessionSystemComposer.d.ts.map +0 -1
  1464. package/bin/host/sdk/SdkSessionSystemComposer.js +0 -71
  1465. package/bin/host/sdk/SdkSessionSystemComposer.js.map +0 -1
  1466. package/bin/host/sdk/Session.d.ts +0 -140
  1467. package/bin/host/sdk/Session.d.ts.map +0 -1
  1468. package/bin/host/sdk/Session.js +0 -459
  1469. package/bin/host/sdk/Session.js.map +0 -1
  1470. package/bin/host/sdk/SessionMetadata.d.ts +0 -51
  1471. package/bin/host/sdk/SessionMetadata.d.ts.map +0 -1
  1472. package/bin/host/sdk/SessionMetadata.js +0 -124
  1473. package/bin/host/sdk/SessionMetadata.js.map +0 -1
  1474. package/bin/host/sdk/StreamEvents.d.ts +0 -14
  1475. package/bin/host/sdk/StreamEvents.d.ts.map +0 -1
  1476. package/bin/host/sdk/StreamEvents.js +0 -89
  1477. package/bin/host/sdk/StreamEvents.js.map +0 -1
  1478. package/bin/http/Server.d.ts.map +0 -1
  1479. package/bin/http/Server.js +0 -112
  1480. package/bin/http/Server.js.map +0 -1
  1481. package/bin/http/auth/AuthEnv.d.ts.map +0 -1
  1482. package/bin/http/auth/AuthEnv.js.map +0 -1
  1483. package/bin/http/auth/AuthError.d.ts.map +0 -1
  1484. package/bin/http/auth/AuthError.js.map +0 -1
  1485. package/bin/http/auth/CliAuthStateStore.d.ts.map +0 -1
  1486. package/bin/http/auth/CliAuthStateStore.js.map +0 -1
  1487. package/bin/http/auth/PasswordHasher.d.ts.map +0 -1
  1488. package/bin/http/auth/PasswordHasher.js.map +0 -1
  1489. package/bin/http/auth/TokenService.d.ts.map +0 -1
  1490. package/bin/http/auth/TokenService.js.map +0 -1
  1491. package/bin/http/control/AuthControlService.d.ts +0 -30
  1492. package/bin/http/control/AuthControlService.d.ts.map +0 -1
  1493. package/bin/http/control/AuthControlService.js +0 -120
  1494. package/bin/http/control/AuthControlService.js.map +0 -1
  1495. package/bin/http/control/CommonHelpers.d.ts.map +0 -1
  1496. package/bin/http/control/CommonHelpers.js.map +0 -1
  1497. package/bin/http/control/ControlApiRoutes.d.ts +0 -14
  1498. package/bin/http/control/ControlApiRoutes.d.ts.map +0 -1
  1499. package/bin/http/control/ControlApiRoutes.js +0 -27
  1500. package/bin/http/control/ControlApiRoutes.js.map +0 -1
  1501. package/bin/http/control/ControlAuthorizationRoutes.d.ts +0 -17
  1502. package/bin/http/control/ControlAuthorizationRoutes.d.ts.map +0 -1
  1503. package/bin/http/control/ControlAuthorizationRoutes.js +0 -85
  1504. package/bin/http/control/ControlAuthorizationRoutes.js.map +0 -1
  1505. package/bin/http/control/ControlRouter.d.ts +0 -19
  1506. package/bin/http/control/ControlRouter.d.ts.map +0 -1
  1507. package/bin/http/control/ControlRouter.js +0 -26
  1508. package/bin/http/control/ControlRouter.js.map +0 -1
  1509. package/bin/http/control/ExecuteBySession.d.ts +0 -39
  1510. package/bin/http/control/ExecuteBySession.d.ts.map +0 -1
  1511. package/bin/http/control/ExecuteBySession.js +0 -128
  1512. package/bin/http/control/ExecuteBySession.js.map +0 -1
  1513. package/bin/http/control/ExecuteInput.d.ts +0 -18
  1514. package/bin/http/control/ExecuteInput.d.ts.map +0 -1
  1515. package/bin/http/control/ExecuteInput.js +0 -201
  1516. package/bin/http/control/ExecuteInput.js.map +0 -1
  1517. package/bin/http/control/Helpers.d.ts.map +0 -1
  1518. package/bin/http/control/Helpers.js.map +0 -1
  1519. package/bin/http/control/MessageTimeline.d.ts +0 -22
  1520. package/bin/http/control/MessageTimeline.d.ts.map +0 -1
  1521. package/bin/http/control/MessageTimeline.js +0 -226
  1522. package/bin/http/control/MessageTimeline.js.map +0 -1
  1523. package/bin/http/control/ModelRoutes.d.ts +0 -13
  1524. package/bin/http/control/ModelRoutes.d.ts.map +0 -1
  1525. package/bin/http/control/ModelRoutes.js +0 -87
  1526. package/bin/http/control/ModelRoutes.js.map +0 -1
  1527. package/bin/http/control/OverviewRoutes.d.ts +0 -13
  1528. package/bin/http/control/OverviewRoutes.d.ts.map +0 -1
  1529. package/bin/http/control/OverviewRoutes.js +0 -93
  1530. package/bin/http/control/OverviewRoutes.js.map +0 -1
  1531. package/bin/http/control/SessionRoutes.d.ts +0 -14
  1532. package/bin/http/control/SessionRoutes.d.ts.map +0 -1
  1533. package/bin/http/control/SessionRoutes.js +0 -333
  1534. package/bin/http/control/SessionRoutes.js.map +0 -1
  1535. package/bin/http/control/SessionSummaryStore.d.ts +0 -19
  1536. package/bin/http/control/SessionSummaryStore.d.ts.map +0 -1
  1537. package/bin/http/control/SessionSummaryStore.js +0 -62
  1538. package/bin/http/control/SessionSummaryStore.js.map +0 -1
  1539. package/bin/http/control/TaskRoutes.d.ts +0 -13
  1540. package/bin/http/control/TaskRoutes.d.ts.map +0 -1
  1541. package/bin/http/control/TaskRoutes.js +0 -335
  1542. package/bin/http/control/TaskRoutes.js.map +0 -1
  1543. package/bin/http/control/TaskStore.d.ts +0 -33
  1544. package/bin/http/control/TaskStore.d.ts.map +0 -1
  1545. package/bin/http/control/TaskStore.js +0 -157
  1546. package/bin/http/control/TaskStore.js.map +0 -1
  1547. package/bin/http/execute/execute.d.ts.map +0 -1
  1548. package/bin/http/execute/execute.js +0 -90
  1549. package/bin/http/execute/execute.js.map +0 -1
  1550. package/bin/http/health/health.d.ts.map +0 -1
  1551. package/bin/http/health/health.js.map +0 -1
  1552. package/bin/http/plugins/plugins.d.ts.map +0 -1
  1553. package/bin/http/plugins/plugins.js +0 -55
  1554. package/bin/http/plugins/plugins.js.map +0 -1
  1555. package/bin/http/services/services.d.ts.map +0 -1
  1556. package/bin/http/services/services.js +0 -79
  1557. package/bin/http/services/services.js.map +0 -1
  1558. package/bin/http/static/static.d.ts.map +0 -1
  1559. package/bin/http/static/static.js +0 -97
  1560. package/bin/http/static/static.js.map +0 -1
  1561. package/bin/plugin/Activation.d.ts +0 -19
  1562. package/bin/plugin/Activation.d.ts.map +0 -1
  1563. package/bin/plugin/Activation.js.map +0 -1
  1564. package/bin/plugin/Catalog.d.ts +0 -42
  1565. package/bin/plugin/Catalog.d.ts.map +0 -1
  1566. package/bin/plugin/Catalog.js +0 -92
  1567. package/bin/plugin/Catalog.js.map +0 -1
  1568. package/bin/plugin/HookRegistry.d.ts +0 -68
  1569. package/bin/plugin/HookRegistry.d.ts.map +0 -1
  1570. package/bin/plugin/HookRegistry.js.map +0 -1
  1571. package/bin/plugin/HttpRoutes.d.ts +0 -22
  1572. package/bin/plugin/HttpRoutes.d.ts.map +0 -1
  1573. package/bin/plugin/HttpRoutes.js +0 -37
  1574. package/bin/plugin/HttpRoutes.js.map +0 -1
  1575. package/bin/plugin/LocalExecution.d.ts +0 -32
  1576. package/bin/plugin/LocalExecution.d.ts.map +0 -1
  1577. package/bin/plugin/LocalExecution.js +0 -148
  1578. package/bin/plugin/LocalExecution.js.map +0 -1
  1579. package/bin/plugin/PluginCommand.d.ts.map +0 -1
  1580. package/bin/plugin/PluginCommand.js +0 -188
  1581. package/bin/plugin/PluginCommand.js.map +0 -1
  1582. package/bin/plugin/PluginManager.d.ts +0 -24
  1583. package/bin/plugin/PluginManager.d.ts.map +0 -1
  1584. package/bin/plugin/PluginManager.js +0 -62
  1585. package/bin/plugin/PluginManager.js.map +0 -1
  1586. package/bin/plugin/PluginRegistry.d.ts +0 -66
  1587. package/bin/plugin/PluginRegistry.d.ts.map +0 -1
  1588. package/bin/plugin/PluginRegistry.js +0 -184
  1589. package/bin/plugin/PluginRegistry.js.map +0 -1
  1590. package/bin/plugin/Plugins.d.ts +0 -20
  1591. package/bin/plugin/Plugins.d.ts.map +0 -1
  1592. package/bin/plugin/Plugins.js +0 -33
  1593. package/bin/plugin/Plugins.js.map +0 -1
  1594. package/bin/plugin/ProjectConfigStore.d.ts +0 -30
  1595. package/bin/plugin/ProjectConfigStore.d.ts.map +0 -1
  1596. package/bin/plugin/ProjectConfigStore.js.map +0 -1
  1597. package/bin/plugins/asr/Dependency.d.ts +0 -77
  1598. package/bin/plugins/asr/Dependency.d.ts.map +0 -1
  1599. package/bin/plugins/asr/Dependency.js +0 -238
  1600. package/bin/plugins/asr/Dependency.js.map +0 -1
  1601. package/bin/plugins/asr/ModelCatalog.d.ts.map +0 -1
  1602. package/bin/plugins/asr/ModelCatalog.js +0 -25
  1603. package/bin/plugins/asr/ModelCatalog.js.map +0 -1
  1604. package/bin/plugins/asr/Plugin.d.ts +0 -14
  1605. package/bin/plugins/asr/Plugin.d.ts.map +0 -1
  1606. package/bin/plugins/asr/Plugin.js +0 -585
  1607. package/bin/plugins/asr/Plugin.js.map +0 -1
  1608. package/bin/plugins/auth/Plugin.d.ts +0 -14
  1609. package/bin/plugins/auth/Plugin.d.ts.map +0 -1
  1610. package/bin/plugins/auth/Plugin.js +0 -181
  1611. package/bin/plugins/auth/Plugin.js.map +0 -1
  1612. package/bin/plugins/auth/runtime/AuthorizationConfig.d.ts +0 -41
  1613. package/bin/plugins/auth/runtime/AuthorizationConfig.d.ts.map +0 -1
  1614. package/bin/plugins/auth/runtime/AuthorizationConfig.js +0 -187
  1615. package/bin/plugins/auth/runtime/AuthorizationConfig.js.map +0 -1
  1616. package/bin/plugins/auth/runtime/AuthorizationPolicy.d.ts +0 -30
  1617. package/bin/plugins/auth/runtime/AuthorizationPolicy.d.ts.map +0 -1
  1618. package/bin/plugins/auth/runtime/AuthorizationPolicy.js +0 -123
  1619. package/bin/plugins/auth/runtime/AuthorizationPolicy.js.map +0 -1
  1620. package/bin/plugins/auth/runtime/AuthorizationStore.d.ts +0 -29
  1621. package/bin/plugins/auth/runtime/AuthorizationStore.d.ts.map +0 -1
  1622. package/bin/plugins/auth/runtime/AuthorizationStore.js.map +0 -1
  1623. package/bin/plugins/skill/Action.d.ts +0 -34
  1624. package/bin/plugins/skill/Action.d.ts.map +0 -1
  1625. package/bin/plugins/skill/Action.js +0 -122
  1626. package/bin/plugins/skill/Action.js.map +0 -1
  1627. package/bin/plugins/skill/Command.d.ts.map +0 -1
  1628. package/bin/plugins/skill/Command.js +0 -70
  1629. package/bin/plugins/skill/Command.js.map +0 -1
  1630. package/bin/plugins/skill/Config.d.ts +0 -18
  1631. package/bin/plugins/skill/Config.d.ts.map +0 -1
  1632. package/bin/plugins/skill/Config.js.map +0 -1
  1633. package/bin/plugins/skill/Plugin.d.ts +0 -14
  1634. package/bin/plugins/skill/Plugin.d.ts.map +0 -1
  1635. package/bin/plugins/skill/Plugin.js +0 -315
  1636. package/bin/plugins/skill/Plugin.js.map +0 -1
  1637. package/bin/plugins/skill/runtime/Discovery.d.ts +0 -25
  1638. package/bin/plugins/skill/runtime/Discovery.d.ts.map +0 -1
  1639. package/bin/plugins/skill/runtime/Discovery.js.map +0 -1
  1640. package/bin/plugins/skill/runtime/Frontmatter.d.ts.map +0 -1
  1641. package/bin/plugins/skill/runtime/Frontmatter.js.map +0 -1
  1642. package/bin/plugins/skill/runtime/Paths.d.ts +0 -16
  1643. package/bin/plugins/skill/runtime/Paths.d.ts.map +0 -1
  1644. package/bin/plugins/skill/runtime/Paths.js.map +0 -1
  1645. package/bin/plugins/skill/runtime/Prompt.d.ts +0 -19
  1646. package/bin/plugins/skill/runtime/Prompt.d.ts.map +0 -1
  1647. package/bin/plugins/skill/runtime/Prompt.js +0 -54
  1648. package/bin/plugins/skill/runtime/Prompt.js.map +0 -1
  1649. package/bin/plugins/skill/runtime/Store.d.ts +0 -25
  1650. package/bin/plugins/skill/runtime/Store.d.ts.map +0 -1
  1651. package/bin/plugins/skill/runtime/Store.js.map +0 -1
  1652. package/bin/plugins/skill/runtime/SystemProvider.d.ts +0 -24
  1653. package/bin/plugins/skill/runtime/SystemProvider.d.ts.map +0 -1
  1654. package/bin/plugins/skill/runtime/SystemProvider.js +0 -33
  1655. package/bin/plugins/skill/runtime/SystemProvider.js.map +0 -1
  1656. package/bin/plugins/skill/runtime/Types.d.ts +0 -21
  1657. package/bin/plugins/skill/runtime/Types.d.ts.map +0 -1
  1658. package/bin/plugins/skill/runtime/Types.js.map +0 -1
  1659. package/bin/plugins/skill/runtime/Utils.d.ts.map +0 -1
  1660. package/bin/plugins/skill/runtime/Utils.js.map +0 -1
  1661. package/bin/plugins/tts/Dependency.d.ts +0 -90
  1662. package/bin/plugins/tts/Dependency.d.ts.map +0 -1
  1663. package/bin/plugins/tts/Dependency.js +0 -344
  1664. package/bin/plugins/tts/Dependency.js.map +0 -1
  1665. package/bin/plugins/tts/Plugin.d.ts +0 -13
  1666. package/bin/plugins/tts/Plugin.d.ts.map +0 -1
  1667. package/bin/plugins/tts/Plugin.js +0 -523
  1668. package/bin/plugins/tts/Plugin.js.map +0 -1
  1669. package/bin/plugins/tts/runtime/Catalog.d.ts +0 -21
  1670. package/bin/plugins/tts/runtime/Catalog.d.ts.map +0 -1
  1671. package/bin/plugins/tts/runtime/Catalog.js.map +0 -1
  1672. package/bin/plugins/tts/runtime/DependencyInstaller.d.ts +0 -143
  1673. package/bin/plugins/tts/runtime/DependencyInstaller.d.ts.map +0 -1
  1674. package/bin/plugins/tts/runtime/DependencyInstaller.js.map +0 -1
  1675. package/bin/plugins/tts/runtime/Installer.d.ts +0 -89
  1676. package/bin/plugins/tts/runtime/Installer.d.ts.map +0 -1
  1677. package/bin/plugins/tts/runtime/Installer.js.map +0 -1
  1678. package/bin/plugins/tts/runtime/Paths.d.ts.map +0 -1
  1679. package/bin/plugins/tts/runtime/Paths.js.map +0 -1
  1680. package/bin/plugins/tts/runtime/Synthesizer.d.ts +0 -44
  1681. package/bin/plugins/tts/runtime/Synthesizer.d.ts.map +0 -1
  1682. package/bin/plugins/tts/runtime/Synthesizer.js +0 -363
  1683. package/bin/plugins/tts/runtime/Synthesizer.js.map +0 -1
  1684. package/bin/plugins/voice/Dependency.d.ts +0 -77
  1685. package/bin/plugins/voice/Dependency.d.ts.map +0 -1
  1686. package/bin/plugins/voice/Dependency.js +0 -237
  1687. package/bin/plugins/voice/Dependency.js.map +0 -1
  1688. package/bin/plugins/voice/ModelCatalog.d.ts.map +0 -1
  1689. package/bin/plugins/voice/ModelCatalog.js +0 -25
  1690. package/bin/plugins/voice/ModelCatalog.js.map +0 -1
  1691. package/bin/plugins/voice/Plugin.d.ts +0 -14
  1692. package/bin/plugins/voice/Plugin.d.ts.map +0 -1
  1693. package/bin/plugins/voice/Plugin.js +0 -546
  1694. package/bin/plugins/voice/Plugin.js.map +0 -1
  1695. package/bin/plugins/voice/runtime/Catalog.d.ts +0 -18
  1696. package/bin/plugins/voice/runtime/Catalog.d.ts.map +0 -1
  1697. package/bin/plugins/voice/runtime/Catalog.js.map +0 -1
  1698. package/bin/plugins/voice/runtime/DependencyInstaller.d.ts +0 -145
  1699. package/bin/plugins/voice/runtime/DependencyInstaller.d.ts.map +0 -1
  1700. package/bin/plugins/voice/runtime/DependencyInstaller.js.map +0 -1
  1701. package/bin/plugins/voice/runtime/Installer.d.ts +0 -94
  1702. package/bin/plugins/voice/runtime/Installer.d.ts.map +0 -1
  1703. package/bin/plugins/voice/runtime/Installer.js.map +0 -1
  1704. package/bin/plugins/voice/runtime/Paths.d.ts.map +0 -1
  1705. package/bin/plugins/voice/runtime/Paths.js.map +0 -1
  1706. package/bin/plugins/voice/runtime/Transcriber.d.ts +0 -57
  1707. package/bin/plugins/voice/runtime/Transcriber.d.ts.map +0 -1
  1708. package/bin/plugins/voice/runtime/Transcriber.js.map +0 -1
  1709. package/bin/plugins/web/Dependency.d.ts +0 -10
  1710. package/bin/plugins/web/Dependency.d.ts.map +0 -1
  1711. package/bin/plugins/web/Dependency.js +0 -10
  1712. package/bin/plugins/web/Dependency.js.map +0 -1
  1713. package/bin/plugins/web/Plugin.d.ts +0 -13
  1714. package/bin/plugins/web/Plugin.d.ts.map +0 -1
  1715. package/bin/plugins/web/Plugin.js +0 -481
  1716. package/bin/plugins/web/Plugin.js.map +0 -1
  1717. package/bin/plugins/web/runtime/Config.d.ts +0 -21
  1718. package/bin/plugins/web/runtime/Config.d.ts.map +0 -1
  1719. package/bin/plugins/web/runtime/Config.js +0 -79
  1720. package/bin/plugins/web/runtime/Config.js.map +0 -1
  1721. package/bin/plugins/web/runtime/Source.d.ts +0 -29
  1722. package/bin/plugins/web/runtime/Source.d.ts.map +0 -1
  1723. package/bin/plugins/web/runtime/Source.js +0 -215
  1724. package/bin/plugins/web/runtime/Source.js.map +0 -1
  1725. package/bin/plugins/workboard/Plugin.d.ts +0 -13
  1726. package/bin/plugins/workboard/Plugin.d.ts.map +0 -1
  1727. package/bin/plugins/workboard/Plugin.js +0 -71
  1728. package/bin/plugins/workboard/Plugin.js.map +0 -1
  1729. package/bin/plugins/workboard/runtime/Collector.d.ts +0 -14
  1730. package/bin/plugins/workboard/runtime/Collector.d.ts.map +0 -1
  1731. package/bin/plugins/workboard/runtime/Collector.js +0 -62
  1732. package/bin/plugins/workboard/runtime/Collector.js.map +0 -1
  1733. package/bin/plugins/workboard/runtime/Normalizer.d.ts +0 -61
  1734. package/bin/plugins/workboard/runtime/Normalizer.d.ts.map +0 -1
  1735. package/bin/plugins/workboard/runtime/Normalizer.js.map +0 -1
  1736. package/bin/plugins/workboard/runtime/Store.d.ts +0 -48
  1737. package/bin/plugins/workboard/runtime/Store.d.ts.map +0 -1
  1738. package/bin/plugins/workboard/runtime/Store.js +0 -84
  1739. package/bin/plugins/workboard/runtime/Store.js.map +0 -1
  1740. package/bin/plugins/workboard/types/Workboard.d.ts.map +0 -1
  1741. package/bin/plugins/workboard/types/Workboard.js.map +0 -1
  1742. package/bin/service/builtins/chat/channels/telegram/PROMPT.direct.txt +0 -1
  1743. package/bin/session/composer/system/default/assets/init/PROFILE.md.txt +0 -17
  1744. package/bin/session/composer/system/default/assets/init/SOUL.md.txt +0 -88
  1745. package/bin/shared/constants/DowncityDefault.d.ts +0 -3
  1746. package/bin/shared/constants/DowncityDefault.d.ts.map +0 -1
  1747. package/bin/shared/constants/DowncityDefault.js.map +0 -1
  1748. package/bin/shared/constants/DowncitySchema.d.ts +0 -3
  1749. package/bin/shared/constants/DowncitySchema.d.ts.map +0 -1
  1750. package/bin/shared/constants/DowncitySchema.js.map +0 -1
  1751. package/bin/shared/types/AgentHost.d.ts +0 -188
  1752. package/bin/shared/types/AgentHost.d.ts.map +0 -1
  1753. package/bin/shared/types/AgentHost.js +0 -10
  1754. package/bin/shared/types/AgentHost.js.map +0 -1
  1755. package/bin/shared/types/AgentProject.d.ts +0 -80
  1756. package/bin/shared/types/AgentProject.d.ts.map +0 -1
  1757. package/bin/shared/types/AgentProject.js.map +0 -1
  1758. package/bin/shared/types/AuthControl.d.ts +0 -30
  1759. package/bin/shared/types/AuthControl.d.ts.map +0 -1
  1760. package/bin/shared/types/AuthControl.js.map +0 -1
  1761. package/bin/shared/types/AuthPlugin.d.ts +0 -407
  1762. package/bin/shared/types/AuthPlugin.d.ts.map +0 -1
  1763. package/bin/shared/types/AuthPlugin.js +0 -115
  1764. package/bin/shared/types/AuthPlugin.js.map +0 -1
  1765. package/bin/shared/types/ChatPlugin.d.ts +0 -238
  1766. package/bin/shared/types/ChatPlugin.d.ts.map +0 -1
  1767. package/bin/shared/types/ChatPlugin.js.map +0 -1
  1768. package/bin/shared/types/ChatPromptContext.d.ts +0 -125
  1769. package/bin/shared/types/ChatPromptContext.d.ts.map +0 -1
  1770. package/bin/shared/types/ChatPromptContext.js.map +0 -1
  1771. package/bin/shared/types/ChatQueueWorker.d.ts.map +0 -1
  1772. package/bin/shared/types/ChatQueueWorker.js.map +0 -1
  1773. package/bin/shared/types/ChatRuntime.d.ts +0 -32
  1774. package/bin/shared/types/ChatRuntime.d.ts.map +0 -1
  1775. package/bin/shared/types/ChatRuntime.js.map +0 -1
  1776. package/bin/shared/types/ChatService.d.ts +0 -145
  1777. package/bin/shared/types/ChatService.d.ts.map +0 -1
  1778. package/bin/shared/types/ChatService.js.map +0 -1
  1779. package/bin/shared/types/ClaudeSkill.d.ts +0 -63
  1780. package/bin/shared/types/ClaudeSkill.d.ts.map +0 -1
  1781. package/bin/shared/types/ClaudeSkill.js.map +0 -1
  1782. package/bin/shared/types/ControlRoutes.d.ts +0 -28
  1783. package/bin/shared/types/ControlRoutes.d.ts.map +0 -1
  1784. package/bin/shared/types/ControlRoutes.js.map +0 -1
  1785. package/bin/shared/types/ControlSessionExecute.d.ts.map +0 -1
  1786. package/bin/shared/types/ControlSessionExecute.js.map +0 -1
  1787. package/bin/shared/types/ControlViewData.d.ts +0 -320
  1788. package/bin/shared/types/ControlViewData.d.ts.map +0 -1
  1789. package/bin/shared/types/ControlViewData.js.map +0 -1
  1790. package/bin/shared/types/Daemon.d.ts +0 -46
  1791. package/bin/shared/types/Daemon.d.ts.map +0 -1
  1792. package/bin/shared/types/Daemon.js +0 -14
  1793. package/bin/shared/types/Daemon.js.map +0 -1
  1794. package/bin/shared/types/DowncityConfig.d.ts +0 -214
  1795. package/bin/shared/types/DowncityConfig.d.ts.map +0 -1
  1796. package/bin/shared/types/DowncityConfig.js.map +0 -1
  1797. package/bin/shared/types/ExecutionBinding.d.ts.map +0 -1
  1798. package/bin/shared/types/ExecutionBinding.js.map +0 -1
  1799. package/bin/shared/types/FeishuChannel.d.ts +0 -127
  1800. package/bin/shared/types/FeishuChannel.d.ts.map +0 -1
  1801. package/bin/shared/types/FeishuChannel.js +0 -9
  1802. package/bin/shared/types/FeishuChannel.js.map +0 -1
  1803. package/bin/shared/types/InlineInstant.d.ts.map +0 -1
  1804. package/bin/shared/types/InlineInstant.js.map +0 -1
  1805. package/bin/shared/types/Json.d.ts.map +0 -1
  1806. package/bin/shared/types/Json.js.map +0 -1
  1807. package/bin/shared/types/LlmConfig.d.ts.map +0 -1
  1808. package/bin/shared/types/LlmConfig.js.map +0 -1
  1809. package/bin/shared/types/LocalRpc.d.ts +0 -69
  1810. package/bin/shared/types/LocalRpc.d.ts.map +0 -1
  1811. package/bin/shared/types/LocalRpc.js.map +0 -1
  1812. package/bin/shared/types/ModelBinding.d.ts.map +0 -1
  1813. package/bin/shared/types/ModelBinding.js.map +0 -1
  1814. package/bin/shared/types/Platform.d.ts.map +0 -1
  1815. package/bin/shared/types/Platform.js.map +0 -1
  1816. package/bin/shared/types/PlatformGateway.d.ts.map +0 -1
  1817. package/bin/shared/types/PlatformGateway.js.map +0 -1
  1818. package/bin/shared/types/Plugin.d.ts +0 -697
  1819. package/bin/shared/types/Plugin.d.ts.map +0 -1
  1820. package/bin/shared/types/Plugin.js.map +0 -1
  1821. package/bin/shared/types/PluginApi.d.ts +0 -155
  1822. package/bin/shared/types/PluginApi.d.ts.map +0 -1
  1823. package/bin/shared/types/PluginApi.js.map +0 -1
  1824. package/bin/shared/types/PluginLifecycle.d.ts.map +0 -1
  1825. package/bin/shared/types/PluginLifecycle.js.map +0 -1
  1826. package/bin/shared/types/QqChannel.d.ts +0 -485
  1827. package/bin/shared/types/QqChannel.d.ts.map +0 -1
  1828. package/bin/shared/types/QqChannel.js +0 -42
  1829. package/bin/shared/types/QqChannel.js.map +0 -1
  1830. package/bin/shared/types/QqGatewaySupport.d.ts.map +0 -1
  1831. package/bin/shared/types/QqGatewaySupport.js.map +0 -1
  1832. package/bin/shared/types/Sandbox.d.ts +0 -130
  1833. package/bin/shared/types/Sandbox.d.ts.map +0 -1
  1834. package/bin/shared/types/Sandbox.js +0 -10
  1835. package/bin/shared/types/Sandbox.js.map +0 -1
  1836. package/bin/shared/types/Service.d.ts +0 -205
  1837. package/bin/shared/types/Service.d.ts.map +0 -1
  1838. package/bin/shared/types/Service.js +0 -10
  1839. package/bin/shared/types/Service.js.map +0 -1
  1840. package/bin/shared/types/ServiceSchedule.d.ts +0 -114
  1841. package/bin/shared/types/ServiceSchedule.d.ts.map +0 -1
  1842. package/bin/shared/types/ServiceSchedule.js.map +0 -1
  1843. package/bin/shared/types/ServiceState.d.ts +0 -104
  1844. package/bin/shared/types/ServiceState.d.ts.map +0 -1
  1845. package/bin/shared/types/ServiceState.js +0 -9
  1846. package/bin/shared/types/ServiceState.js.map +0 -1
  1847. package/bin/shared/types/Services.d.ts +0 -94
  1848. package/bin/shared/types/Services.d.ts.map +0 -1
  1849. package/bin/shared/types/Services.js.map +0 -1
  1850. package/bin/shared/types/Shell.d.ts.map +0 -1
  1851. package/bin/shared/types/Shell.js.map +0 -1
  1852. package/bin/shared/types/SkillCommand.d.ts.map +0 -1
  1853. package/bin/shared/types/SkillCommand.js.map +0 -1
  1854. package/bin/shared/types/SkillPlugin.d.ts.map +0 -1
  1855. package/bin/shared/types/SkillPlugin.js.map +0 -1
  1856. package/bin/shared/types/SkillRoot.d.ts.map +0 -1
  1857. package/bin/shared/types/SkillRoot.js.map +0 -1
  1858. package/bin/shared/types/Start.d.ts.map +0 -1
  1859. package/bin/shared/types/Start.js.map +0 -1
  1860. package/bin/shared/types/Store.d.ts +0 -408
  1861. package/bin/shared/types/Store.d.ts.map +0 -1
  1862. package/bin/shared/types/Store.js.map +0 -1
  1863. package/bin/shared/types/TaskService.d.ts +0 -52
  1864. package/bin/shared/types/TaskService.d.ts.map +0 -1
  1865. package/bin/shared/types/TaskService.js +0 -9
  1866. package/bin/shared/types/TaskService.js.map +0 -1
  1867. package/bin/shared/types/Template.d.ts.map +0 -1
  1868. package/bin/shared/types/Template.js.map +0 -1
  1869. package/bin/shared/types/Tts.d.ts.map +0 -1
  1870. package/bin/shared/types/Tts.js.map +0 -1
  1871. package/bin/shared/types/TtsPlugin.d.ts +0 -161
  1872. package/bin/shared/types/TtsPlugin.d.ts.map +0 -1
  1873. package/bin/shared/types/TtsPlugin.js.map +0 -1
  1874. package/bin/shared/types/Voice.d.ts.map +0 -1
  1875. package/bin/shared/types/Voice.js.map +0 -1
  1876. package/bin/shared/types/VoicePlugin.d.ts +0 -190
  1877. package/bin/shared/types/VoicePlugin.d.ts.map +0 -1
  1878. package/bin/shared/types/VoicePlugin.js.map +0 -1
  1879. package/bin/shared/types/WebPlugin.d.ts +0 -133
  1880. package/bin/shared/types/WebPlugin.d.ts.map +0 -1
  1881. package/bin/shared/types/WebPlugin.js.map +0 -1
  1882. package/bin/shared/types/auth/AuthPermission.d.ts.map +0 -1
  1883. package/bin/shared/types/auth/AuthPermission.js.map +0 -1
  1884. package/bin/shared/types/auth/AuthRoute.d.ts.map +0 -1
  1885. package/bin/shared/types/auth/AuthRoute.js.map +0 -1
  1886. package/bin/shared/types/auth/AuthToken.d.ts.map +0 -1
  1887. package/bin/shared/types/auth/AuthToken.js.map +0 -1
  1888. package/bin/shared/types/auth/AuthTypes.d.ts.map +0 -1
  1889. package/bin/shared/types/auth/AuthTypes.js.map +0 -1
  1890. package/bin/shared/utils/Id.d.ts.map +0 -1
  1891. package/bin/shared/utils/Id.js.map +0 -1
  1892. package/bin/shared/utils/Template.d.ts +0 -17
  1893. package/bin/shared/utils/Template.d.ts.map +0 -1
  1894. package/bin/shared/utils/Template.js.map +0 -1
  1895. package/bin/shared/utils/Time.d.ts.map +0 -1
  1896. package/bin/shared/utils/Time.js.map +0 -1
  1897. package/bin/shared/utils/cli/Checker.d.ts.map +0 -1
  1898. package/bin/shared/utils/cli/Checker.js.map +0 -1
  1899. package/bin/shared/utils/cli/CliOutput.d.ts.map +0 -1
  1900. package/bin/shared/utils/cli/CliOutput.js +0 -98
  1901. package/bin/shared/utils/cli/CliOutput.js.map +0 -1
  1902. package/bin/shared/utils/cli/PrettyStatus.d.ts.map +0 -1
  1903. package/bin/shared/utils/cli/PrettyStatus.js.map +0 -1
  1904. package/bin/shared/utils/logger/Fetch.d.ts +0 -14
  1905. package/bin/shared/utils/logger/Fetch.d.ts.map +0 -1
  1906. package/bin/shared/utils/logger/Fetch.js.map +0 -1
  1907. package/bin/shared/utils/logger/Format.d.ts.map +0 -1
  1908. package/bin/shared/utils/logger/Format.js.map +0 -1
  1909. package/bin/shared/utils/logger/FormatRequest.d.ts +0 -29
  1910. package/bin/shared/utils/logger/FormatRequest.d.ts.map +0 -1
  1911. package/bin/shared/utils/logger/FormatRequest.js +0 -309
  1912. package/bin/shared/utils/logger/FormatRequest.js.map +0 -1
  1913. package/bin/shared/utils/logger/FormatResponse.d.ts +0 -46
  1914. package/bin/shared/utils/logger/FormatResponse.d.ts.map +0 -1
  1915. package/bin/shared/utils/logger/FormatResponse.js.map +0 -1
  1916. package/bin/shared/utils/logger/FormatShared.d.ts +0 -33
  1917. package/bin/shared/utils/logger/FormatShared.d.ts.map +0 -1
  1918. package/bin/shared/utils/logger/FormatShared.js.map +0 -1
  1919. package/bin/shared/utils/logger/Logger.d.ts +0 -101
  1920. package/bin/shared/utils/logger/Logger.d.ts.map +0 -1
  1921. package/bin/shared/utils/logger/Logger.js +0 -308
  1922. package/bin/shared/utils/logger/Logger.js.map +0 -1
  1923. package/bin/shared/utils/storage/index.d.ts +0 -5
  1924. package/bin/shared/utils/storage/index.d.ts.map +0 -1
  1925. package/bin/shared/utils/storage/index.js.map +0 -1
  1926. package/bin/types/sandbox/SandboxRuntime.d.ts +0 -318
  1927. package/bin/types/sandbox/SandboxRuntime.d.ts.map +0 -1
  1928. package/bin/types/sandbox/SandboxRuntime.js.map +0 -1
  1929. package/bin/types/session/SessionExecutor.d.ts +0 -18
  1930. package/bin/types/session/SessionExecutor.d.ts.map +0 -1
  1931. package/bin/types/session/SessionExecutor.js.map +0 -1
  1932. package/bin/types/session/SessionHistoryMeta.d.ts.map +0 -1
  1933. package/bin/types/session/SessionHistoryMeta.js.map +0 -1
  1934. package/bin/types/session/SessionHistoryPaths.d.ts.map +0 -1
  1935. package/bin/types/session/SessionHistoryPaths.js.map +0 -1
  1936. package/bin/types/session/SessionLoop.d.ts.map +0 -1
  1937. package/bin/types/session/SessionLoop.js.map +0 -1
  1938. package/bin/types/session/SessionMessages.d.ts +0 -83
  1939. package/bin/types/session/SessionMessages.d.ts.map +0 -1
  1940. package/bin/types/session/SessionMessages.js.map +0 -1
  1941. package/bin/types/session/SessionPrompts.d.ts.map +0 -1
  1942. package/bin/types/session/SessionPrompts.js.map +0 -1
  1943. package/bin/types/session/SessionRun.d.ts +0 -112
  1944. package/bin/types/session/SessionRun.d.ts.map +0 -1
  1945. package/bin/types/session/SessionRun.js.map +0 -1
  1946. package/scripts/copy-prompt-assets.mjs +0 -72
  1947. package/src/agent/AgentContext.ts +0 -182
  1948. package/src/agent/AgentContextTypes.ts +0 -385
  1949. package/src/agent/AgentRuntime.ts +0 -376
  1950. package/src/agent/AgentRuntimeState.ts +0 -213
  1951. package/src/agent/AgentRuntimeTypes.ts +0 -91
  1952. package/src/agent/project/AgentInitializer.ts +0 -380
  1953. package/src/agent/project/ProjectExecutionBinding.ts +0 -53
  1954. package/src/host/daemon/Manager.ts +0 -344
  1955. package/src/host/rpc/Client.ts +0 -113
  1956. package/src/host/rpc/Paths.ts +0 -43
  1957. package/src/host/rpc/Server.ts +0 -395
  1958. package/src/host/runtime/CityPaths.ts +0 -84
  1959. package/src/host/runtime/CityRegistry.ts +0 -256
  1960. package/src/host/runtime/CityRuntime.ts +0 -45
  1961. package/src/host/runtime/ProcessSweep.ts +0 -239
  1962. package/src/host/sdk/Agent.ts +0 -419
  1963. package/src/host/sdk/AgentSdkTypes.ts +0 -296
  1964. package/src/host/sdk/HttpServer.ts +0 -222
  1965. package/src/host/sdk/RemoteAgent.ts +0 -205
  1966. package/src/host/sdk/RpcServer.ts +0 -226
  1967. package/src/host/sdk/SdkSessionSystemComposer.ts +0 -113
  1968. package/src/host/sdk/Session.ts +0 -582
  1969. package/src/host/sdk/SessionMetadata.ts +0 -178
  1970. package/src/host/sdk/StreamEvents.ts +0 -95
  1971. package/src/http/Server.ts +0 -157
  1972. package/src/http/control/AuthControlService.ts +0 -161
  1973. package/src/http/control/ControlApiRoutes.ts +0 -31
  1974. package/src/http/control/ControlAuthorizationRoutes.ts +0 -108
  1975. package/src/http/control/ControlRouter.ts +0 -31
  1976. package/src/http/control/ExecuteBySession.ts +0 -151
  1977. package/src/http/control/ExecuteInput.ts +0 -236
  1978. package/src/http/control/MessageTimeline.ts +0 -269
  1979. package/src/http/control/ModelRoutes.ts +0 -101
  1980. package/src/http/control/OverviewRoutes.ts +0 -106
  1981. package/src/http/control/SessionRoutes.ts +0 -414
  1982. package/src/http/control/SessionSummaryStore.ts +0 -76
  1983. package/src/http/control/TaskRoutes.ts +0 -391
  1984. package/src/http/control/TaskStore.ts +0 -222
  1985. package/src/http/execute/execute.ts +0 -120
  1986. package/src/http/plugins/plugins.ts +0 -67
  1987. package/src/http/services/services.ts +0 -94
  1988. package/src/http/static/static.ts +0 -104
  1989. package/src/plugin/Activation.ts +0 -26
  1990. package/src/plugin/Catalog.ts +0 -118
  1991. package/src/plugin/HookRegistry.ts +0 -249
  1992. package/src/plugin/HttpRoutes.ts +0 -50
  1993. package/src/plugin/LocalExecution.ts +0 -179
  1994. package/src/plugin/PluginCommand.ts +0 -219
  1995. package/src/plugin/PluginManager.ts +0 -66
  1996. package/src/plugin/PluginRegistry.ts +0 -244
  1997. package/src/plugin/Plugins.ts +0 -39
  1998. package/src/plugin/ProjectConfigStore.ts +0 -58
  1999. package/src/plugins/asr/Dependency.ts +0 -336
  2000. package/src/plugins/asr/ModelCatalog.ts +0 -43
  2001. package/src/plugins/asr/Plugin.ts +0 -639
  2002. package/src/plugins/auth/Plugin.ts +0 -209
  2003. package/src/plugins/auth/runtime/AuthorizationConfig.ts +0 -265
  2004. package/src/plugins/auth/runtime/AuthorizationPolicy.ts +0 -168
  2005. package/src/plugins/auth/runtime/AuthorizationStore.ts +0 -219
  2006. package/src/plugins/skill/Action.ts +0 -159
  2007. package/src/plugins/skill/Command.ts +0 -98
  2008. package/src/plugins/skill/Config.ts +0 -51
  2009. package/src/plugins/skill/PROMPT.txt +0 -10
  2010. package/src/plugins/skill/Plugin.ts +0 -355
  2011. package/src/plugins/skill/runtime/Discovery.ts +0 -141
  2012. package/src/plugins/skill/runtime/Paths.ts +0 -130
  2013. package/src/plugins/skill/runtime/Prompt.ts +0 -67
  2014. package/src/plugins/skill/runtime/Store.ts +0 -95
  2015. package/src/plugins/skill/runtime/SystemProvider.ts +0 -52
  2016. package/src/plugins/skill/runtime/Types.ts +0 -22
  2017. package/src/plugins/tts/Dependency.ts +0 -473
  2018. package/src/plugins/tts/Plugin.ts +0 -553
  2019. package/src/plugins/tts/runtime/Catalog.ts +0 -97
  2020. package/src/plugins/tts/runtime/DependencyInstaller.ts +0 -436
  2021. package/src/plugins/tts/runtime/Installer.ts +0 -297
  2022. package/src/plugins/tts/runtime/Synthesizer.ts +0 -480
  2023. package/src/plugins/voice/Dependency.ts +0 -329
  2024. package/src/plugins/voice/ModelCatalog.ts +0 -43
  2025. package/src/plugins/voice/Plugin.ts +0 -599
  2026. package/src/plugins/voice/runtime/Catalog.ts +0 -68
  2027. package/src/plugins/voice/runtime/DependencyInstaller.ts +0 -505
  2028. package/src/plugins/voice/runtime/Installer.ts +0 -324
  2029. package/src/plugins/voice/runtime/Transcriber.ts +0 -467
  2030. package/src/plugins/web/Dependency.ts +0 -17
  2031. package/src/plugins/web/PROMPT.agent-browser.txt +0 -17
  2032. package/src/plugins/web/PROMPT.txt +0 -33
  2033. package/src/plugins/web/PROMPT.web-access.txt +0 -13
  2034. package/src/plugins/web/Plugin.ts +0 -515
  2035. package/src/plugins/web/runtime/Config.ts +0 -105
  2036. package/src/plugins/web/runtime/Source.ts +0 -263
  2037. package/src/plugins/workboard/Plugin.ts +0 -81
  2038. package/src/plugins/workboard/runtime/Collector.ts +0 -78
  2039. package/src/plugins/workboard/runtime/Normalizer.ts +0 -213
  2040. package/src/plugins/workboard/runtime/Store.ts +0 -110
  2041. package/src/service/builtins/chat/PROMPT.direct.txt +0 -55
  2042. package/src/service/builtins/chat/channels/feishu/PROMPT.direct.txt +0 -5
  2043. package/src/service/builtins/chat/channels/qq/PROMPT.direct.txt +0 -11
  2044. package/src/service/builtins/chat/channels/telegram/PROMPT.direct.txt +0 -1
  2045. package/src/service/builtins/contact/PROMPT.txt +0 -25
  2046. package/src/service/builtins/task/PROMPT.txt +0 -237
  2047. package/src/session/composer/system/default/assets/core.prompt.txt +0 -39
  2048. package/src/session/composer/system/default/assets/init/PROFILE.md.txt +0 -17
  2049. package/src/session/composer/system/default/assets/init/SOUL.md.txt +0 -88
  2050. package/src/session/composer/system/default/assets/service.prompt.txt +0 -29
  2051. package/src/session/composer/system/default/assets/task.prompt.txt +0 -33
  2052. package/src/shared/constants/DowncityDefault.ts +0 -38
  2053. package/src/shared/constants/DowncitySchema.ts +0 -377
  2054. package/src/shared/types/AgentHost.ts +0 -208
  2055. package/src/shared/types/AgentProject.ts +0 -92
  2056. package/src/shared/types/AuthControl.ts +0 -38
  2057. package/src/shared/types/ChatPromptContext.ts +0 -139
  2058. package/src/shared/types/ChatService.ts +0 -165
  2059. package/src/shared/types/ClaudeSkill.ts +0 -64
  2060. package/src/shared/types/ControlRoutes.ts +0 -31
  2061. package/src/shared/types/ControlViewData.ts +0 -392
  2062. package/src/shared/types/Daemon.ts +0 -53
  2063. package/src/shared/types/DowncityConfig.ts +0 -215
  2064. package/src/shared/types/FeishuChannel.ts +0 -131
  2065. package/src/shared/types/LocalRpc.ts +0 -72
  2066. package/src/shared/types/Plugin.ts +0 -748
  2067. package/src/shared/types/PluginApi.ts +0 -161
  2068. package/src/shared/types/QqChannel.ts +0 -501
  2069. package/src/shared/types/README.md +0 -56
  2070. package/src/shared/types/Sandbox.ts +0 -144
  2071. package/src/shared/types/Service.ts +0 -223
  2072. package/src/shared/types/ServiceSchedule.ts +0 -134
  2073. package/src/shared/types/ServiceState.ts +0 -112
  2074. package/src/shared/types/Services.ts +0 -100
  2075. package/src/shared/types/Store.ts +0 -422
  2076. package/src/shared/types/TaskService.ts +0 -55
  2077. package/src/shared/types/TtsPlugin.ts +0 -164
  2078. package/src/shared/types/VoicePlugin.ts +0 -194
  2079. package/src/shared/types/WebPlugin.ts +0 -141
  2080. package/src/shared/utils/README.md +0 -49
  2081. package/src/shared/utils/Template.ts +0 -28
  2082. package/src/shared/utils/cli/CliOutput.ts +0 -128
  2083. package/src/shared/utils/logger/Fetch.ts +0 -93
  2084. package/src/shared/utils/logger/FormatRequest.ts +0 -455
  2085. package/src/shared/utils/logger/FormatResponse.ts +0 -265
  2086. package/src/shared/utils/logger/FormatShared.ts +0 -258
  2087. package/src/shared/utils/logger/Logger.ts +0 -372
  2088. package/src/shared/utils/storage/index.ts +0 -26
  2089. package/src/types/sandbox/SandboxRuntime.ts +0 -377
  2090. package/src/types/session/SessionExecutor.ts +0 -33
  2091. package/src/types/session/SessionMessages.ts +0 -90
  2092. package/src/types/session/SessionRun.ts +0 -132
  2093. /package/bin/{shared/constants → config}/DowncityDefault.js +0 -0
  2094. /package/bin/{shared/constants → config}/DowncitySchema.js +0 -0
  2095. /package/bin/{plugins → plugin/builtins}/asr/ModelCatalog.d.ts +0 -0
  2096. /package/bin/{plugins → plugin/builtins}/auth/runtime/AuthorizationStore.js +0 -0
  2097. /package/bin/{plugins → plugin/builtins}/skill/Command.d.ts +0 -0
  2098. /package/bin/{plugins → plugin/builtins}/skill/Config.js +0 -0
  2099. /package/bin/{plugins → plugin/builtins}/skill/runtime/Discovery.js +0 -0
  2100. /package/bin/{plugins → plugin/builtins}/skill/runtime/Frontmatter.d.ts +0 -0
  2101. /package/bin/{plugins → plugin/builtins}/skill/runtime/Frontmatter.js +0 -0
  2102. /package/bin/{plugins → plugin/builtins}/skill/runtime/Paths.js +0 -0
  2103. /package/bin/{plugins → plugin/builtins}/skill/runtime/Store.js +0 -0
  2104. /package/bin/{plugins → plugin/builtins}/skill/runtime/Types.js +0 -0
  2105. /package/bin/{plugins → plugin/builtins}/skill/runtime/Utils.d.ts +0 -0
  2106. /package/bin/{plugins → plugin/builtins}/skill/runtime/Utils.js +0 -0
  2107. /package/bin/{shared → plugin/builtins/skill}/types/ClaudeSkill.js +0 -0
  2108. /package/bin/{shared → plugin/builtins/skill}/types/SkillCommand.d.ts +0 -0
  2109. /package/bin/{shared → plugin/builtins/skill}/types/SkillCommand.js +0 -0
  2110. /package/bin/{shared → plugin/builtins/skill}/types/SkillPlugin.d.ts +0 -0
  2111. /package/bin/{shared → plugin/builtins/skill}/types/SkillPlugin.js +0 -0
  2112. /package/bin/{shared → plugin/builtins/skill}/types/SkillRoot.d.ts +0 -0
  2113. /package/bin/{shared → plugin/builtins/skill}/types/SkillRoot.js +0 -0
  2114. /package/bin/{plugins → plugin/builtins}/tts/runtime/Catalog.js +0 -0
  2115. /package/bin/{plugins → plugin/builtins}/tts/runtime/DependencyInstaller.js +0 -0
  2116. /package/bin/{plugins → plugin/builtins}/tts/runtime/Installer.js +0 -0
  2117. /package/bin/{plugins → plugin/builtins}/tts/runtime/Paths.d.ts +0 -0
  2118. /package/bin/{plugins → plugin/builtins}/tts/runtime/Paths.js +0 -0
  2119. /package/bin/{shared → plugin/builtins/tts}/types/Tts.d.ts +0 -0
  2120. /package/bin/{shared → plugin/builtins/tts}/types/Tts.js +0 -0
  2121. /package/bin/{shared → plugin/builtins/tts}/types/TtsPlugin.js +0 -0
  2122. /package/bin/{plugins → plugin/builtins}/voice/ModelCatalog.d.ts +0 -0
  2123. /package/bin/{plugins → plugin/builtins}/voice/runtime/Catalog.js +0 -0
  2124. /package/bin/{plugins → plugin/builtins}/voice/runtime/DependencyInstaller.js +0 -0
  2125. /package/bin/{plugins → plugin/builtins}/voice/runtime/Installer.js +0 -0
  2126. /package/bin/{plugins → plugin/builtins}/voice/runtime/Paths.d.ts +0 -0
  2127. /package/bin/{plugins → plugin/builtins}/voice/runtime/Paths.js +0 -0
  2128. /package/bin/{plugins → plugin/builtins}/voice/runtime/Transcriber.js +0 -0
  2129. /package/bin/{shared → plugin/builtins/voice}/types/Voice.d.ts +0 -0
  2130. /package/bin/{shared → plugin/builtins/voice}/types/Voice.js +0 -0
  2131. /package/bin/{shared → plugin/builtins/voice}/types/VoicePlugin.js +0 -0
  2132. /package/bin/{shared → plugin/builtins/web}/types/WebPlugin.js +0 -0
  2133. /package/bin/{plugins → plugin/builtins}/workboard/runtime/Normalizer.js +0 -0
  2134. /package/bin/{plugins → plugin/builtins}/workboard/types/Workboard.d.ts +0 -0
  2135. /package/bin/{plugins → plugin/builtins}/workboard/types/Workboard.js +0 -0
  2136. /package/bin/plugin/{Activation.js → core/Activation.js} +0 -0
  2137. /package/bin/plugin/{HookRegistry.js → core/HookRegistry.js} +0 -0
  2138. /package/bin/plugin/{PluginCommand.d.ts → core/PluginCommand.d.ts} +0 -0
  2139. /package/bin/plugin/{ProjectConfigStore.js → core/ProjectConfigStore.js} +0 -0
  2140. /package/bin/{shared → plugin}/types/Plugin.js +0 -0
  2141. /package/bin/{shared → plugin}/types/PluginApi.js +0 -0
  2142. /package/bin/{shared → plugin}/types/PluginLifecycle.d.ts +0 -0
  2143. /package/bin/{shared → plugin}/types/PluginLifecycle.js +0 -0
  2144. /package/bin/{agent/project → project}/ProjectExecutionBinding.js +0 -0
  2145. /package/bin/{shared → project}/types/AgentProject.js +0 -0
  2146. /package/bin/{agent → runtime}/AgentContextTypes.js +0 -0
  2147. /package/bin/{agent → runtime}/AgentRuntimeState.js +0 -0
  2148. /package/bin/{agent → runtime}/AgentRuntimeTypes.js +0 -0
  2149. /package/bin/{types/sandbox → sandbox/types}/SandboxRuntime.js +0 -0
  2150. /package/bin/{host/sdk → sdk}/AgentSdkTypes.js +0 -0
  2151. /package/bin/{host/sdk → sdk}/AsyncQueue.d.ts +0 -0
  2152. /package/bin/{host/sdk → sdk}/AsyncQueue.js +0 -0
  2153. /package/bin/{host/sdk → sdk}/Paths.d.ts +0 -0
  2154. /package/bin/{host/sdk → sdk}/Paths.js +0 -0
  2155. /package/bin/{http → server/http}/Server.d.ts +0 -0
  2156. /package/bin/{http → server/http}/auth/AuthEnv.d.ts +0 -0
  2157. /package/bin/{http → server/http}/auth/AuthEnv.js +0 -0
  2158. /package/bin/{http → server/http}/auth/AuthError.d.ts +0 -0
  2159. /package/bin/{http → server/http}/auth/AuthError.js +0 -0
  2160. /package/bin/{http → server/http}/auth/CliAuthStateStore.d.ts +0 -0
  2161. /package/bin/{http → server/http}/auth/CliAuthStateStore.js +0 -0
  2162. /package/bin/{http → server/http}/auth/PasswordHasher.d.ts +0 -0
  2163. /package/bin/{http → server/http}/auth/PasswordHasher.js +0 -0
  2164. /package/bin/{http → server/http}/auth/TokenService.d.ts +0 -0
  2165. /package/bin/{http → server/http}/auth/TokenService.js +0 -0
  2166. /package/bin/{http → server/http}/control/CommonHelpers.d.ts +0 -0
  2167. /package/bin/{http → server/http}/control/CommonHelpers.js +0 -0
  2168. /package/bin/{http → server/http}/control/Helpers.d.ts +0 -0
  2169. /package/bin/{http → server/http}/control/Helpers.js +0 -0
  2170. /package/bin/{shared → server/http/control}/types/AuthControl.js +0 -0
  2171. /package/bin/{shared → server/http/control}/types/ControlRoutes.js +0 -0
  2172. /package/bin/{shared → server/http/control}/types/ControlSessionExecute.d.ts +0 -0
  2173. /package/bin/{shared → server/http/control}/types/ControlSessionExecute.js +0 -0
  2174. /package/bin/{shared → server/http/control}/types/ControlViewData.js +0 -0
  2175. /package/bin/{http → server/http}/execute/execute.d.ts +0 -0
  2176. /package/bin/{http → server/http}/health/health.d.ts +0 -0
  2177. /package/bin/{http → server/http}/health/health.js +0 -0
  2178. /package/bin/{http → server/http}/plugins/plugins.d.ts +0 -0
  2179. /package/bin/{http → server/http}/services/services.d.ts +0 -0
  2180. /package/bin/{http → server/http}/static/static.d.ts +0 -0
  2181. /package/bin/{shared → service/builtins/chat/channels/qq}/types/QqGatewaySupport.d.ts +0 -0
  2182. /package/bin/{shared → service/builtins/chat/channels/qq}/types/QqGatewaySupport.js +0 -0
  2183. /package/bin/{shared → service/builtins/chat}/types/ChatPlugin.js +0 -0
  2184. /package/bin/{shared → service/builtins/chat}/types/ChatPromptContext.js +0 -0
  2185. /package/bin/{shared → service/builtins/chat}/types/ChatQueueWorker.d.ts +0 -0
  2186. /package/bin/{shared → service/builtins/chat}/types/ChatQueueWorker.js +0 -0
  2187. /package/bin/{shared → service/builtins/chat}/types/ChatRuntime.js +0 -0
  2188. /package/bin/{shared → service/builtins/chat}/types/ChatService.js +0 -0
  2189. /package/bin/{shared → service/builtins/shell}/types/Shell.d.ts +0 -0
  2190. /package/bin/{shared → service/builtins/shell}/types/Shell.js +0 -0
  2191. /package/bin/{shared → service}/types/ServiceSchedule.js +0 -0
  2192. /package/bin/{shared → service}/types/Services.js +0 -0
  2193. /package/bin/{types/session → session/types}/SessionExecutor.js +0 -0
  2194. /package/bin/{types/session → session/types}/SessionHistoryMeta.d.ts +0 -0
  2195. /package/bin/{types/session → session/types}/SessionHistoryMeta.js +0 -0
  2196. /package/bin/{types/session → session/types}/SessionHistoryPaths.d.ts +0 -0
  2197. /package/bin/{types/session → session/types}/SessionHistoryPaths.js +0 -0
  2198. /package/bin/{types/session → session/types}/SessionLoop.d.ts +0 -0
  2199. /package/bin/{types/session → session/types}/SessionLoop.js +0 -0
  2200. /package/bin/{types/session → session/types}/SessionMessages.js +0 -0
  2201. /package/bin/{types/session → session/types}/SessionPrompts.d.ts +0 -0
  2202. /package/bin/{types/session → session/types}/SessionPrompts.js +0 -0
  2203. /package/bin/{types/session → session/types}/SessionRun.js +0 -0
  2204. /package/bin/{host → transport}/rpc/Client.d.ts +0 -0
  2205. /package/bin/{host → transport}/rpc/Client.js +0 -0
  2206. /package/bin/{host → transport}/rpc/Paths.d.ts +0 -0
  2207. /package/bin/{host → transport}/rpc/Transport.d.ts +0 -0
  2208. /package/bin/{host → transport}/rpc/Transport.js +0 -0
  2209. /package/bin/{shared/types → types}/auth/AuthPermission.d.ts +0 -0
  2210. /package/bin/{shared/types → types}/auth/AuthPermission.js +0 -0
  2211. /package/bin/{shared/types → types}/auth/AuthRoute.d.ts +0 -0
  2212. /package/bin/{shared/types → types}/auth/AuthRoute.js +0 -0
  2213. /package/bin/{shared/types → types}/auth/AuthToken.d.ts +0 -0
  2214. /package/bin/{shared/types → types}/auth/AuthToken.js +0 -0
  2215. /package/bin/{shared/types → types}/auth/AuthTypes.d.ts +0 -0
  2216. /package/bin/{shared/types → types}/auth/AuthTypes.js +0 -0
  2217. /package/bin/{shared/types → types/common}/Json.d.ts +0 -0
  2218. /package/bin/{shared/types → types/common}/Json.js +0 -0
  2219. /package/bin/{shared/types → types/common}/Template.d.ts +0 -0
  2220. /package/bin/{shared/types → types/common}/Template.js +0 -0
  2221. /package/bin/{shared/types → types/config}/DowncityConfig.js +0 -0
  2222. /package/bin/{shared/types → types/config}/ExecutionBinding.d.ts +0 -0
  2223. /package/bin/{shared/types → types/config}/ExecutionBinding.js +0 -0
  2224. /package/bin/{shared/types → types/config}/LlmConfig.d.ts +0 -0
  2225. /package/bin/{shared/types → types/config}/LlmConfig.js +0 -0
  2226. /package/bin/{shared/types → types/config}/ModelBinding.d.ts +0 -0
  2227. /package/bin/{shared/types → types/config}/ModelBinding.js +0 -0
  2228. /package/bin/{shared/types → types/config}/Start.d.ts +0 -0
  2229. /package/bin/{shared/types → types/config}/Start.js +0 -0
  2230. /package/bin/{shared/types → types/host}/Store.js +0 -0
  2231. /package/bin/{shared/types → types/http}/InlineInstant.d.ts +0 -0
  2232. /package/bin/{shared/types → types/http}/InlineInstant.js +0 -0
  2233. /package/bin/{shared/types → types/platform}/Platform.d.ts +0 -0
  2234. /package/bin/{shared/types → types/platform}/Platform.js +0 -0
  2235. /package/bin/{shared/types → types/platform}/PlatformGateway.d.ts +0 -0
  2236. /package/bin/{shared/types → types/platform}/PlatformGateway.js +0 -0
  2237. /package/bin/{shared/types → types/rpc}/LocalRpc.js +0 -0
  2238. /package/bin/{shared/utils → utils}/Id.d.ts +0 -0
  2239. /package/bin/{shared/utils → utils}/Id.js +0 -0
  2240. /package/bin/{shared/utils → utils}/Template.js +0 -0
  2241. /package/bin/{shared/utils → utils}/Time.d.ts +0 -0
  2242. /package/bin/{shared/utils → utils}/Time.js +0 -0
  2243. /package/bin/{shared/utils → utils}/cli/Checker.d.ts +0 -0
  2244. /package/bin/{shared/utils → utils}/cli/Checker.js +0 -0
  2245. /package/bin/{shared/utils → utils}/cli/CliOutput.d.ts +0 -0
  2246. /package/bin/{shared/utils → utils}/cli/PrettyStatus.d.ts +0 -0
  2247. /package/bin/{shared/utils → utils}/cli/PrettyStatus.js +0 -0
  2248. /package/bin/{shared/utils → utils}/logger/Fetch.js +0 -0
  2249. /package/bin/{shared/utils → utils}/logger/Format.d.ts +0 -0
  2250. /package/bin/{shared/utils → utils}/logger/Format.js +0 -0
  2251. /package/bin/{shared/utils → utils}/logger/FormatResponse.js +0 -0
  2252. /package/bin/{shared/utils → utils}/logger/FormatShared.js +0 -0
  2253. /package/bin/{shared/utils → utils}/storage/index.js +0 -0
  2254. /package/src/{shared → plugin/builtins/auth}/types/AuthPlugin.ts +0 -0
  2255. /package/{bin/plugins/skill/PROMPT.txt → src/plugin/builtins/skill/PROMPT.ts.txt} +0 -0
  2256. /package/src/{plugins → plugin/builtins}/skill/runtime/Frontmatter.ts +0 -0
  2257. /package/src/{plugins → plugin/builtins}/skill/runtime/Utils.ts +0 -0
  2258. /package/src/{shared → plugin/builtins/skill}/types/SkillCommand.ts +0 -0
  2259. /package/src/{shared → plugin/builtins/skill}/types/SkillPlugin.ts +0 -0
  2260. /package/src/{shared → plugin/builtins/skill}/types/SkillRoot.ts +0 -0
  2261. /package/src/{plugins → plugin/builtins}/tts/runtime/Paths.ts +0 -0
  2262. /package/src/{shared → plugin/builtins/tts}/types/Tts.ts +0 -0
  2263. /package/src/{plugins → plugin/builtins}/voice/runtime/Paths.ts +0 -0
  2264. /package/src/{shared → plugin/builtins/voice}/types/Voice.ts +0 -0
  2265. /package/{bin/plugins/web/PROMPT.agent-browser.txt → src/plugin/builtins/web/PROMPT.agent-browser.ts.txt} +0 -0
  2266. /package/{bin/plugins/web/PROMPT.txt → src/plugin/builtins/web/PROMPT.ts.txt} +0 -0
  2267. /package/{bin/plugins/web/PROMPT.web-access.txt → src/plugin/builtins/web/PROMPT.web-access.ts.txt} +0 -0
  2268. /package/src/{plugins → plugin/builtins}/workboard/types/Workboard.ts +0 -0
  2269. /package/src/{shared → plugin}/types/PluginLifecycle.ts +0 -0
  2270. /package/src/{host/sdk → sdk}/AsyncQueue.ts +0 -0
  2271. /package/src/{host/sdk → sdk}/Paths.ts +0 -0
  2272. /package/src/{http → server/http}/auth/AuthEnv.ts +0 -0
  2273. /package/src/{http → server/http}/auth/AuthError.ts +0 -0
  2274. /package/src/{http → server/http}/auth/CliAuthStateStore.ts +0 -0
  2275. /package/src/{http → server/http}/auth/PasswordHasher.ts +0 -0
  2276. /package/src/{http → server/http}/auth/TokenService.ts +0 -0
  2277. /package/src/{http → server/http}/control/CommonHelpers.ts +0 -0
  2278. /package/src/{http → server/http}/control/Helpers.ts +0 -0
  2279. /package/src/{shared → server/http/control}/types/ControlSessionExecute.ts +0 -0
  2280. /package/src/{http → server/http}/health/health.ts +0 -0
  2281. /package/{bin/service/builtins/chat/PROMPT.direct.txt → src/service/builtins/chat/PROMPT.direct.ts.txt} +0 -0
  2282. /package/{bin/service/builtins/chat/channels/feishu/PROMPT.direct.txt → src/service/builtins/chat/channels/feishu/PROMPT.direct.ts.txt} +0 -0
  2283. /package/{bin/service/builtins/chat/channels/qq/PROMPT.direct.txt → src/service/builtins/chat/channels/qq/PROMPT.direct.ts.txt} +0 -0
  2284. /package/src/{shared → service/builtins/chat/channels/qq}/types/QqGatewaySupport.ts +0 -0
  2285. /package/src/{shared → service/builtins/chat}/types/ChatPlugin.ts +0 -0
  2286. /package/src/{shared → service/builtins/chat}/types/ChatQueueWorker.ts +0 -0
  2287. /package/src/{shared → service/builtins/chat}/types/ChatRuntime.ts +0 -0
  2288. /package/{bin/service/builtins/contact/PROMPT.txt → src/service/builtins/contact/PROMPT.ts.txt} +0 -0
  2289. /package/src/{shared → service/builtins/shell}/types/Shell.ts +0 -0
  2290. /package/{bin/service/builtins/task/PROMPT.txt → src/service/builtins/task/PROMPT.ts.txt} +0 -0
  2291. /package/{bin/session/composer/system/default/assets/core.prompt.txt → src/session/composer/system/default/assets/core.prompt.ts.txt} +0 -0
  2292. /package/{bin/session/composer/system/default/assets/service.prompt.txt → src/session/composer/system/default/assets/service.prompt.ts.txt} +0 -0
  2293. /package/{bin/session/composer/system/default/assets/task.prompt.txt → src/session/composer/system/default/assets/task.prompt.ts.txt} +0 -0
  2294. /package/src/{types/session → session/types}/SessionHistoryMeta.ts +0 -0
  2295. /package/src/{types/session → session/types}/SessionHistoryPaths.ts +0 -0
  2296. /package/src/{types/session → session/types}/SessionLoop.ts +0 -0
  2297. /package/src/{types/session → session/types}/SessionPrompts.ts +0 -0
  2298. /package/src/{host → transport}/rpc/Transport.ts +0 -0
  2299. /package/src/{shared/types → types}/auth/AuthPermission.ts +0 -0
  2300. /package/src/{shared/types → types}/auth/AuthRoute.ts +0 -0
  2301. /package/src/{shared/types → types}/auth/AuthToken.ts +0 -0
  2302. /package/src/{shared/types → types}/auth/AuthTypes.ts +0 -0
  2303. /package/src/{shared/types → types/common}/Json.ts +0 -0
  2304. /package/src/{shared/types → types/common}/Template.ts +0 -0
  2305. /package/src/{shared/types → types/config}/ExecutionBinding.ts +0 -0
  2306. /package/src/{shared/types → types/config}/LlmConfig.ts +0 -0
  2307. /package/src/{shared/types → types/config}/ModelBinding.ts +0 -0
  2308. /package/src/{shared/types → types/config}/Start.ts +0 -0
  2309. /package/src/{shared/types → types/http}/InlineInstant.ts +0 -0
  2310. /package/src/{shared/types → types/platform}/Platform.ts +0 -0
  2311. /package/src/{shared/types → types/platform}/PlatformGateway.ts +0 -0
  2312. /package/src/{shared/utils → utils}/Id.ts +0 -0
  2313. /package/src/{shared/utils → utils}/Time.ts +0 -0
  2314. /package/src/{shared/utils → utils}/cli/Checker.ts +0 -0
  2315. /package/src/{shared/utils → utils}/cli/PrettyStatus.ts +0 -0
  2316. /package/src/{shared/utils → utils}/logger/Format.ts +0 -0
@@ -0,0 +1,135 @@
1
+ /**
2
+ * Shell action 返回结构辅助。
3
+ *
4
+ * 关键点(中文)
5
+ * - 集中处理输出游标、token 近似裁剪与标准 action response。
6
+ * - 这里不读取文件、不修改 session,只基于传入文本构造返回对象。
7
+ */
8
+
9
+ import type { AgentContext } from "@/runtime/AgentContextTypes.js";
10
+ import type {
11
+ ShellActionResponse,
12
+ ShellOutputChunk,
13
+ ShellSessionSnapshot,
14
+ } from "@/service/builtins/shell/types/ShellService.js";
15
+
16
+ const DEFAULT_MAX_OUTPUT_CHARS = 12_000;
17
+ const DEFAULT_MAX_OUTPUT_LINES = 200;
18
+ const APPROX_CHARS_PER_TOKEN = 4;
19
+
20
+ function resolveOutputLimits(params: {
21
+ context: AgentContext;
22
+ maxOutputTokens?: number;
23
+ }): {
24
+ maxChars: number;
25
+ maxLines: number;
26
+ } {
27
+ const byTokens =
28
+ typeof params.maxOutputTokens === "number" &&
29
+ Number.isFinite(params.maxOutputTokens) &&
30
+ params.maxOutputTokens > 0
31
+ ? Math.max(200, Math.floor(params.maxOutputTokens * APPROX_CHARS_PER_TOKEN))
32
+ : null;
33
+ return {
34
+ maxChars:
35
+ byTokens == null
36
+ ? DEFAULT_MAX_OUTPUT_CHARS
37
+ : Math.min(DEFAULT_MAX_OUTPUT_CHARS, byTokens),
38
+ maxLines: DEFAULT_MAX_OUTPUT_LINES,
39
+ };
40
+ }
41
+
42
+ function splitOutputByLimits(
43
+ text: string,
44
+ maxChars: number,
45
+ maxLines: number,
46
+ ): { head: string; tail: string } {
47
+ const limitedByChars = text.slice(0, Math.min(text.length, maxChars));
48
+ let head = limitedByChars;
49
+ if (maxLines > 0) {
50
+ const lines = limitedByChars.split("\n");
51
+ if (lines.length > maxLines) {
52
+ head = lines.slice(0, maxLines).join("\n");
53
+ }
54
+ }
55
+ return {
56
+ head,
57
+ tail: text.slice(head.length),
58
+ };
59
+ }
60
+
61
+ /**
62
+ * 根据游标与 token 限制构造输出块。
63
+ */
64
+ export function createOutputChunk(params: {
65
+ /**
66
+ * 当前 shell session 标识。
67
+ */
68
+ shellId: string;
69
+ /**
70
+ * 当前完整输出文本。
71
+ */
72
+ outputText: string;
73
+ /**
74
+ * 本次读取起始游标。
75
+ */
76
+ fromCursor?: number;
77
+ /**
78
+ * 当前 Agent 执行上下文。
79
+ */
80
+ context: AgentContext;
81
+ /**
82
+ * 输出 token 近似上限。
83
+ */
84
+ maxOutputTokens?: number;
85
+ }): ShellOutputChunk {
86
+ const fromCursor =
87
+ typeof params.fromCursor === "number" && params.fromCursor >= 0
88
+ ? Math.floor(params.fromCursor)
89
+ : 0;
90
+ const available = params.outputText.slice(fromCursor);
91
+ const originalChars = available.length;
92
+ const originalLines = available ? available.split("\n").length : 0;
93
+ const limits = resolveOutputLimits({
94
+ context: params.context,
95
+ maxOutputTokens: params.maxOutputTokens,
96
+ });
97
+ const { head, tail } = splitOutputByLimits(
98
+ available,
99
+ limits.maxChars,
100
+ limits.maxLines,
101
+ );
102
+ return {
103
+ shellId: params.shellId,
104
+ output: head,
105
+ startCursor: fromCursor,
106
+ endCursor: fromCursor + head.length,
107
+ originalChars,
108
+ originalLines,
109
+ hasMoreOutput: tail.length > 0,
110
+ };
111
+ }
112
+
113
+ /**
114
+ * 构造 shell action 标准返回。
115
+ */
116
+ export function buildActionResponse(params: {
117
+ /**
118
+ * 当前 shell 快照。
119
+ */
120
+ shell: ShellSessionSnapshot;
121
+ /**
122
+ * 可选输出块。
123
+ */
124
+ chunk?: ShellOutputChunk;
125
+ /**
126
+ * 可选人类可读提示。
127
+ */
128
+ note?: string;
129
+ }): ShellActionResponse {
130
+ return {
131
+ shell: params.shell,
132
+ ...(params.chunk ? { chunk: params.chunk } : {}),
133
+ ...(params.note ? { note: params.note } : {}),
134
+ };
135
+ }
@@ -8,14 +8,14 @@
8
8
  */
9
9
 
10
10
  import fs from "fs-extra";
11
- import type { AgentContext } from "@/agent/AgentContextTypes.js";
11
+ import type { AgentContext } from "@/runtime/AgentContextTypes.js";
12
12
  import { spawnShellProcess } from "@/sandbox/SandboxRunner.js";
13
13
  import type {
14
14
  ShellServiceState,
15
15
  ShellSessionRuntimeState,
16
16
  ShellSessionWaiter,
17
17
  } from "@/service/builtins/shell/ShellRuntimeTypes.js";
18
- import { generateId } from "@shared/utils/Id.js";
18
+ import { generateId } from "@/utils/Id.js";
19
19
  import type {
20
20
  ShellActionResponse,
21
21
  ShellCloseRequest,
@@ -28,7 +28,6 @@ import type {
28
28
  } from "@/service/builtins/shell/types/ShellService.js";
29
29
  import { getShellDir, getShellOutputPath, getShellSnapshotPath } from "./Paths.js";
30
30
  import {
31
- appendSessionOutput,
32
31
  buildActionResponse,
33
32
  buildShellEnv,
34
33
  clampWaitMs,
@@ -38,7 +37,6 @@ import {
38
37
  DEFAULT_INLINE_WAIT_MS,
39
38
  DEFAULT_WAIT_TIMEOUT_MS,
40
39
  ensureCapacity,
41
- finalizeExit,
42
40
  isInMemorySession,
43
41
  isTerminalStatus,
44
42
  nowMs,
@@ -49,6 +47,7 @@ import {
49
47
  scheduleCleanup,
50
48
  updateSessionSnapshot,
51
49
  } from "./ShellActionRuntimeSupport.js";
50
+ import { attachShellProcessEventHandlers } from "./ShellProcessEvents.js";
52
51
 
53
52
  export { createShellServiceState } from "./ShellActionRuntimeSupport.js";
54
53
 
@@ -90,22 +89,6 @@ export async function closeAllShellSessions(
90
89
  await Promise.all(closing);
91
90
  }
92
91
 
93
- async function finalizeExitAfterOutputDrain(
94
- state: ShellServiceState,
95
- session: ShellSessionRuntimeState,
96
- exitCode: number,
97
- ): Promise<void> {
98
- // 关键点(中文)
99
- // - `close` 事件到达时,stdout / stderr 的异步 append 链可能刚刚开始收尾。
100
- // - 这里先让出一个事件循环 tick,再等待当前 writeChain,可显著降低“终态已到但尾部输出尚未可读”的竞态。
101
- await new Promise<void>((resolve) => {
102
- const timer = setImmediate(resolve);
103
- if (typeof timer.unref === "function") timer.unref();
104
- });
105
- await session.writeChain.catch(() => undefined);
106
- await finalizeExit(state, session, exitCode);
107
- }
108
-
109
92
  /**
110
93
  * 启动一个 shell session。
111
94
  */
@@ -192,25 +175,7 @@ export async function startShellSession(
192
175
  // - 监听器必须在任何 `await` 之前挂上。
193
176
  // - 对于 `printf` 这类瞬时命令,进程可能在持久化 snapshot 期间就已经退出。
194
177
  // - 如果先 `await persistSnapshot()` 再注册 `close`,会错过退出事件,导致 session 永远停在 running。
195
- child.stdout.on("data", (chunk: string | Buffer) => {
196
- void appendSessionOutput(session, String(chunk ?? "")).catch(() => undefined);
197
- });
198
- child.stderr.on("data", (chunk: string | Buffer) => {
199
- void appendSessionOutput(session, String(chunk ?? "")).catch(() => undefined);
200
- });
201
- child.on("error", (error: Error) => {
202
- void appendSessionOutput(session, `\n[process error] ${String(error)}\n`).catch(
203
- () => undefined,
204
- );
205
- void finalizeExitAfterOutputDrain(state, session, -1).catch(() => undefined);
206
- });
207
- child.on("close", (code: number | null) => {
208
- void finalizeExitAfterOutputDrain(
209
- state,
210
- session,
211
- typeof code === "number" ? code : -1,
212
- ).catch(() => undefined);
213
- });
178
+ attachShellProcessEventHandlers({ state, session });
214
179
  await persistSnapshot(session);
215
180
 
216
181
  const inlineWaitMs = clampWaitMs(request.inlineWaitMs, DEFAULT_INLINE_WAIT_MS);
@@ -8,31 +8,33 @@
8
8
 
9
9
  import path from "node:path";
10
10
  import fs from "fs-extra";
11
- import type { AgentContext } from "@/agent/AgentContextTypes.js";
12
- import { stripInvocationAuthEnv } from "@/http/auth/AuthEnv.js";
11
+ import type { AgentContext } from "@/runtime/AgentContextTypes.js";
13
12
  import type {
14
13
  ShellServiceState,
15
14
  ShellSessionRuntimeState,
16
- ShellSessionWaiter,
17
15
  } from "@/service/builtins/shell/ShellRuntimeTypes.js";
18
- import { getSessionRunScope } from "@session/SessionRunScope.js";
19
16
  import type {
20
- ShellActionResponse,
21
- ShellOutputChunk,
22
17
  ShellQueryRequest,
23
18
  ShellSessionSnapshot,
24
19
  ShellSessionStatus,
25
20
  } from "@/service/builtins/shell/types/ShellService.js";
26
21
  import { getShellOutputPath, getShellSnapshotPath } from "./Paths.js";
22
+ import { resolveOwnerContextId } from "./ShellRuntimeEnvironment.js";
23
+ export {
24
+ buildShellEnv,
25
+ resolveOwnerContextId,
26
+ resolveShellCwd,
27
+ } from "./ShellRuntimeEnvironment.js";
28
+ export {
29
+ buildActionResponse,
30
+ createOutputChunk,
31
+ } from "./ShellActionResponse.js";
27
32
 
28
33
  const MAX_ACTIVE_SHELLS = 64;
29
34
  const SESSION_CLEANUP_DELAY_MS = 10 * 60 * 1000;
30
35
  const MAX_IN_MEMORY_OUTPUT_CHARS = 1_000_000;
31
36
  const MIN_WAIT_MS = 50;
32
37
  const MAX_WAIT_MS = 30_000;
33
- const DEFAULT_MAX_OUTPUT_CHARS = 12_000;
34
- const DEFAULT_MAX_OUTPUT_LINES = 200;
35
- const APPROX_CHARS_PER_TOKEN = 4;
36
38
  const OUTPUT_PREVIEW_CHARS = 280;
37
39
 
38
40
  /**
@@ -85,110 +87,6 @@ function normalizeOutputChunk(raw: string): string {
85
87
  .replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g, "");
86
88
  }
87
89
 
88
- function resolveOutputLimits(params: {
89
- context: AgentContext;
90
- maxOutputTokens?: number;
91
- }): {
92
- maxChars: number;
93
- maxLines: number;
94
- } {
95
- const byTokens =
96
- typeof params.maxOutputTokens === "number" &&
97
- Number.isFinite(params.maxOutputTokens) &&
98
- params.maxOutputTokens > 0
99
- ? Math.max(200, Math.floor(params.maxOutputTokens * APPROX_CHARS_PER_TOKEN))
100
- : null;
101
- return {
102
- maxChars:
103
- byTokens == null
104
- ? DEFAULT_MAX_OUTPUT_CHARS
105
- : Math.min(DEFAULT_MAX_OUTPUT_CHARS, byTokens),
106
- maxLines: DEFAULT_MAX_OUTPUT_LINES,
107
- };
108
- }
109
-
110
- function splitOutputByLimits(
111
- text: string,
112
- maxChars: number,
113
- maxLines: number,
114
- ): { head: string; tail: string } {
115
- const limitedByChars = text.slice(0, Math.min(text.length, maxChars));
116
- let head = limitedByChars;
117
- if (maxLines > 0) {
118
- const lines = limitedByChars.split("\n");
119
- if (lines.length > maxLines) {
120
- head = lines.slice(0, maxLines).join("\n");
121
- }
122
- }
123
- return {
124
- head,
125
- tail: text.slice(head.length),
126
- };
127
- }
128
-
129
- /**
130
- * 构造 shell 子进程环境变量。
131
- */
132
- export function buildShellEnv(context: AgentContext): NodeJS.ProcessEnv {
133
- const env: NodeJS.ProcessEnv = { ...process.env };
134
-
135
- // 关键点(中文)
136
- // - shell 子进程需要继承平台级 global env。
137
- // - 这里显式从 store 读取,避免把 AgentContext.env 语义扩大成“全局+agent 混合态”。
138
- // - 冲突时仍由后续 agent 私有 env 覆盖,保持文档声明的优先级。
139
- for (const [key, value] of Object.entries(context.globalEnv || {})) {
140
- const normalizedKey = String(key || "").trim();
141
- const normalizedValue = String(value || "").trim();
142
- if (!normalizedKey || !normalizedValue) continue;
143
- env[normalizedKey] = normalizedValue;
144
- }
145
-
146
- for (const [key, value] of Object.entries(context.env || {})) {
147
- const normalizedKey = String(key || "").trim();
148
- const normalizedValue = String(value || "").trim();
149
- if (!normalizedKey || !normalizedValue) continue;
150
- env[normalizedKey] = normalizedValue;
151
- }
152
-
153
- const request = getSessionRunScope();
154
- const sessionId = String(request?.sessionId || "").trim();
155
- const agentPath = String(context.rootPath || "").trim();
156
- const configuredAgentName = String(context.config?.name || "").trim();
157
- const agentName = configuredAgentName || (agentPath ? path.basename(agentPath) : "");
158
-
159
- // 关键点(中文)
160
- // - agent 自己在 shell 里执行 `city <service> ...` 时,也需要显式知道“当前 agent 是谁”。
161
- // - 否则 service CLI 会退回到当前终端 cwd / registry 猜测,在多 agent 或外部工作目录下
162
- // 很容易把请求发到错误项目,最终误报 “Agent server 没启动”。
163
- if (agentPath) env.DC_AGENT_PATH = agentPath;
164
- if (agentName) env.DC_AGENT_NAME = agentName;
165
- if (sessionId) env.DC_SESSION_ID = sessionId;
166
- if (process.env.DC_SERVER_HOST) env.DC_CTX_SERVER_HOST = process.env.DC_SERVER_HOST;
167
- if (process.env.DC_SERVER_PORT) env.DC_CTX_SERVER_PORT = process.env.DC_SERVER_PORT;
168
- stripInvocationAuthEnv(env);
169
-
170
- return env;
171
- }
172
-
173
- /**
174
- * 解析 shell 执行目录。
175
- */
176
- export function resolveShellCwd(context: AgentContext, cwd?: string): string {
177
- const raw = String(cwd || "").trim();
178
- if (!raw) return context.rootPath;
179
- return path.isAbsolute(raw) ? raw : path.resolve(context.rootPath, raw);
180
- }
181
-
182
- /**
183
- * 推断 shell 所属的 owner context。
184
- */
185
- export function resolveOwnerContextId(explicit?: string): string | undefined {
186
- const fromInput = String(explicit || "").trim();
187
- if (fromInput) return fromInput;
188
- const fromRequest = String(getSessionRunScope()?.sessionId || "").trim();
189
- return fromRequest || undefined;
190
- }
191
-
192
90
  function deriveExitStatus(exitCode: number | undefined): ShellSessionStatus {
193
91
  if (exitCode === -9 || exitCode === 137) return "killed";
194
92
  if (typeof exitCode === "number" && exitCode === 0) return "completed";
@@ -462,58 +360,6 @@ export async function resolveSession(
462
360
  return matched[0] || null;
463
361
  }
464
362
 
465
- /**
466
- * 根据游标与 token 限制构造输出块。
467
- */
468
- export function createOutputChunk(params: {
469
- shellId: string;
470
- outputText: string;
471
- fromCursor?: number;
472
- context: AgentContext;
473
- maxOutputTokens?: number;
474
- }): ShellOutputChunk {
475
- const fromCursor =
476
- typeof params.fromCursor === "number" && params.fromCursor >= 0
477
- ? Math.floor(params.fromCursor)
478
- : 0;
479
- const available = params.outputText.slice(fromCursor);
480
- const originalChars = available.length;
481
- const originalLines = available ? available.split("\n").length : 0;
482
- const limits = resolveOutputLimits({
483
- context: params.context,
484
- maxOutputTokens: params.maxOutputTokens,
485
- });
486
- const { head, tail } = splitOutputByLimits(
487
- available,
488
- limits.maxChars,
489
- limits.maxLines,
490
- );
491
- return {
492
- shellId: params.shellId,
493
- output: head,
494
- startCursor: fromCursor,
495
- endCursor: fromCursor + head.length,
496
- originalChars,
497
- originalLines,
498
- hasMoreOutput: tail.length > 0,
499
- };
500
- }
501
-
502
- /**
503
- * 构造 shell action 标准返回。
504
- */
505
- export function buildActionResponse(params: {
506
- shell: ShellSessionSnapshot;
507
- chunk?: ShellOutputChunk;
508
- note?: string;
509
- }): ShellActionResponse {
510
- return {
511
- shell: params.shell,
512
- ...(params.chunk ? { chunk: params.chunk } : {}),
513
- ...(params.note ? { note: params.note } : {}),
514
- };
515
- }
516
-
517
363
  /**
518
364
  * 判断解析出的 session 是否仍在内存中活动。
519
365
  */
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Shell 子进程事件绑定辅助。
3
+ *
4
+ * 关键点(中文)
5
+ * - 集中处理 stdout/stderr 追加、process error 与 close 事件。
6
+ * - close 到达时先等待输出写入链 drain,再统一进入终态收口,避免尾部输出丢读。
7
+ */
8
+
9
+ import type { ShellServiceState, ShellSessionRuntimeState } from "@/service/builtins/shell/ShellRuntimeTypes.js";
10
+ import {
11
+ appendSessionOutput,
12
+ finalizeExit,
13
+ } from "./ShellActionRuntimeSupport.js";
14
+
15
+ async function finalizeExitAfterOutputDrain(
16
+ state: ShellServiceState,
17
+ session: ShellSessionRuntimeState,
18
+ exitCode: number,
19
+ ): Promise<void> {
20
+ // 关键点(中文)
21
+ // - `close` 事件到达时,stdout / stderr 的异步 append 链可能刚刚开始收尾。
22
+ // - 这里先让出一个事件循环 tick,再等待当前 writeChain,可显著降低“终态已到但尾部输出尚未可读”的竞态。
23
+ await new Promise<void>((resolve) => {
24
+ const timer = setImmediate(resolve);
25
+ if (typeof timer.unref === "function") timer.unref();
26
+ });
27
+ await session.writeChain.catch(() => undefined);
28
+ await finalizeExit(state, session, exitCode);
29
+ }
30
+
31
+ /**
32
+ * 绑定 shell 子进程事件。
33
+ */
34
+ export function attachShellProcessEventHandlers(params: {
35
+ /**
36
+ * 当前 shell service 状态。
37
+ */
38
+ state: ShellServiceState;
39
+ /**
40
+ * 当前 shell runtime session。
41
+ */
42
+ session: ShellSessionRuntimeState;
43
+ }): void {
44
+ const { state, session } = params;
45
+ const { child } = session;
46
+ child.stdout.on("data", (chunk: string | Buffer) => {
47
+ void appendSessionOutput(session, String(chunk ?? "")).catch(() => undefined);
48
+ });
49
+ child.stderr.on("data", (chunk: string | Buffer) => {
50
+ void appendSessionOutput(session, String(chunk ?? "")).catch(() => undefined);
51
+ });
52
+ child.on("error", (error: Error) => {
53
+ void appendSessionOutput(session, `\n[process error] ${String(error)}\n`).catch(
54
+ () => undefined,
55
+ );
56
+ void finalizeExitAfterOutputDrain(state, session, -1).catch(() => undefined);
57
+ });
58
+ child.on("close", (code: number | null) => {
59
+ void finalizeExitAfterOutputDrain(
60
+ state,
61
+ session,
62
+ typeof code === "number" ? code : -1,
63
+ ).catch(() => undefined);
64
+ });
65
+ }
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Shell action 运行环境解析辅助。
3
+ *
4
+ * 关键点(中文)
5
+ * - 集中处理 shell 子进程 cwd、env 与 owner context 的解析。
6
+ * - 这里只做输入归一化,不持有 shell session 状态。
7
+ */
8
+
9
+ import path from "node:path";
10
+ import type { AgentContext } from "@/runtime/AgentContextTypes.js";
11
+ import { stripInvocationAuthEnv } from "@/server/http/auth/AuthEnv.js";
12
+ import { getSessionRunScope } from "@session/SessionRunScope.js";
13
+
14
+ /**
15
+ * 构造 shell 子进程环境变量。
16
+ */
17
+ export function buildShellEnv(context: AgentContext): NodeJS.ProcessEnv {
18
+ const env: NodeJS.ProcessEnv = { ...process.env };
19
+
20
+ // 关键点(中文)
21
+ // - shell 子进程需要继承平台级 global env。
22
+ // - 这里显式从 store 读取,避免把 AgentContext.env 语义扩大成“全局+agent 混合态”。
23
+ // - 冲突时仍由后续 agent 私有 env 覆盖,保持文档声明的优先级。
24
+ for (const [key, value] of Object.entries(context.globalEnv || {})) {
25
+ const normalizedKey = String(key || "").trim();
26
+ const normalizedValue = String(value || "").trim();
27
+ if (!normalizedKey || !normalizedValue) continue;
28
+ env[normalizedKey] = normalizedValue;
29
+ }
30
+
31
+ for (const [key, value] of Object.entries(context.env || {})) {
32
+ const normalizedKey = String(key || "").trim();
33
+ const normalizedValue = String(value || "").trim();
34
+ if (!normalizedKey || !normalizedValue) continue;
35
+ env[normalizedKey] = normalizedValue;
36
+ }
37
+
38
+ const request = getSessionRunScope();
39
+ const sessionId = String(request?.sessionId || "").trim();
40
+ const agentPath = String(context.rootPath || "").trim();
41
+ const configuredAgentName = String(context.config?.name || "").trim();
42
+ const agentName = configuredAgentName || (agentPath ? path.basename(agentPath) : "");
43
+
44
+ // 关键点(中文)
45
+ // - agent 自己在 shell 里执行 `city <service> ...` 时,也需要显式知道“当前 agent 是谁”。
46
+ // - 否则 service CLI 会退回到当前终端 cwd / registry 猜测,在多 agent 或外部工作目录下
47
+ // 很容易把请求发到错误项目,最终误报 “Agent server 没启动”。
48
+ if (agentPath) env.DC_AGENT_PATH = agentPath;
49
+ if (agentName) env.DC_AGENT_NAME = agentName;
50
+ if (sessionId) env.DC_SESSION_ID = sessionId;
51
+ if (process.env.DC_SERVER_HOST) env.DC_CTX_SERVER_HOST = process.env.DC_SERVER_HOST;
52
+ if (process.env.DC_SERVER_PORT) env.DC_CTX_SERVER_PORT = process.env.DC_SERVER_PORT;
53
+ stripInvocationAuthEnv(env);
54
+
55
+ return env;
56
+ }
57
+
58
+ /**
59
+ * 解析 shell 执行目录。
60
+ */
61
+ export function resolveShellCwd(context: AgentContext, cwd?: string): string {
62
+ const raw = String(cwd || "").trim();
63
+ if (!raw) return context.rootPath;
64
+ return path.isAbsolute(raw) ? raw : path.resolve(context.rootPath, raw);
65
+ }
66
+
67
+ /**
68
+ * 推断 shell 所属的 owner context。
69
+ */
70
+ export function resolveOwnerContextId(explicit?: string): string | undefined {
71
+ const fromInput = String(explicit || "").trim();
72
+ if (fromInput) return fromInput;
73
+ const fromRequest = String(getSessionRunScope()?.sessionId || "").trim();
74
+ return fromRequest || undefined;
75
+ }
@@ -8,8 +8,8 @@
8
8
 
9
9
  import path from "node:path";
10
10
  import type { ShipTaskStatus } from "./types/Task.js";
11
- import type { AgentContext } from "@/agent/AgentContextTypes.js";
12
- import type { JsonValue } from "@/shared/types/Json.js";
11
+ import type { AgentContext } from "@/runtime/AgentContextTypes.js";
12
+ import type { JsonValue } from "@/types/common/Json.js";
13
13
  import {
14
14
  deriveTaskIdFromTitle,
15
15
  normalizeTaskId,
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 自动生成文件,请勿手改。
3
+ * 源文件:由同路径 `*.ts.txt` 生成。
4
+ */
5
+
6
+ // Source: src/service/builtins/task/PROMPT.ts.txt
7
+ const TEXT_MODULE_CONTENT = "# Task Service\n\n你可以通过 `task` service 管理任务定义、执行、调度与状态控制。\n\n## 任务模型\n\n每个任务定义在 `./.downcity/task/<title>/task.md`,包含:\n- frontmatter(结构化字段)\n- body(任务正文)\n\nfrontmatter 核心字段:\n- `title`:任务唯一标识(唯一)\n- `description`:任务描述\n- `when`:触发条件,支持:`@manual` / cron / `time:<ISO8601-with-timezone>`\n- `sessionId`:任务执行会话\n- `status`:`enabled|paused|disabled`\n- `kind`:`agent|script`(默认 `agent`)\n\n执行时会产生 run 目录:\n- `./.downcity/task/<title>/<timestamp>/`\n\n常见产物:\n- `input.md`\n- `output.md`(本次任务的最终输出正文)\n- `result.md`(执行摘要)\n- `run.json`\n- `run-progress.json`\n- `dialogue.md` / `dialogue.json`(agent 多轮)\n- `error.md`(失败时)\n\n## 执行类型(kind)\n\n1. `kind=agent`\n- 将正文交给 agent 执行\n- 默认单轮完成;仅当 frontmatter 显式设置 `review: true` 时启用模拟用户多轮复核\n- 适合研究、分析、报告生成\n\n2. `kind=script`\n- 将正文当作 shell 脚本执行\n- 正文不能为空,必须是可执行脚本\n\n## 可用 action\n\n- `list`\n- `create`\n- `run`\n- `delete`\n- `update`\n- `status`\n- `enable`\n- `disable`\n\n## CLI 示例\n\n- `city task list [--status enabled|paused|disabled]`\n- `city task create --title '...' --description '...' --session-id <sessionId> [--when '@manual'] [--kind agent|script] [--status ...|--activate]`\n- `city task run <title> [--reason '...']`\n- `city task update <title> [--title ...] [--description ...] [--when ...] [--status ...|--activate] [--session-id ...]`\n- `city task delete <title>`\n\n## 关键约束\n\n- `title` 唯一;create 去重仅按 `title` 精确匹配。\n- `when=time:...` 触发后会自动置为 `paused`,并回退为 `when=@manual`。\n- `run` 为异步受理:立即返回 `accepted=true`、`message`、`executionId`;调用方应把它视为“任务已进入后台执行,结果会自动通过 chat service 发送,当前流程无需阻塞等待”。\n- 如果 `run` 返回 `accepted=true`:\n - 不要手动把 task 产出再转发给用户。\n - 不要主动读取 run 目录、`run-progress.json`、`output.md` 做轮询。\n - 只有当用户明确要求排查、查看产物或确认执行细节时,才进入 run 目录检查。\n- agent 任务默认只要求产生有效输出;仅当任务正文明确要求外发时,才应发送到外部 channel。\n\n## 如何设计 task 正文\n\n### agent task 推荐结构\n\n建议正文至少包含这些标题:\n\n```md\n# 任务目标\n\n- 这次任务要交付什么最终结果\n\n# 背景与输入\n\n- 数据来源、范围、约束、参考材料\n\n# 执行步骤\n\n1. 先做什么\n2. 再做什么\n3. 关键中间产物落在哪里\n\n# 输出要求\n\n- 最终结果用什么格式返回\n- 是否需要表格 / JSON / Markdown\n- 不要包含什么内容\n\n# 触发与状态建议\n\n- 这个任务为什么适合 `@manual` / cron / `time:...`\n- 当前应该是 `paused` 还是 `enabled`\n\n# 注意事项\n\n- 风险、边界、不要做什么\n```\n\n### agent task 正文编写约束\n\n- task 正文必须像一份“交付合同”,让另一个执行器拿到后可以直接执行,不依赖当前聊天语境补全含义。\n- `# 任务目标` 必须写清楚最终要交付什么,不要只写“看一下”“研究一下”“处理一下”这类模糊目标。\n- `# 背景与输入` 必须写清来源、范围、对象、时间、限制条件;不要假设执行器还能看到原始聊天上下文。\n- `# 执行步骤` 应描述任务流程,不应描述 task 管理动作;不要写“先检查有没有同名任务”“再创建任务”“然后触发任务”。\n- `# 输出要求` 必须清楚声明最终成品的格式、结构、语气、长度,以及“不要输出什么”。\n- 要明确写出:**最后一条 assistant 返回会被直接写入 `output.md` 并发送给用户**;因此最终回答必须直接等于成品内容。\n- 内容生成类任务(如日报、提醒、晨读、摘要、报告)必须明确要求“最终输出直接是成品正文”,不要让执行器输出过程说明。\n- 如果任务要把结果发给用户,正文应要求“输出可直接发送的正文内容”,而不是要求执行器解释自己已经发送了什么。\n- 除非确有需要,不要在正文中要求执行器复述 task title、sessionId、执行时间、状态等元信息。\n- 正文中的约束要可执行、可判断,尽量避免“适当”“尽量”“看情况”这类弱约束词。\n- 不要把创建 task、更新 task、查看 task 状态、确认 task 是否存在等管理动作写进正文;这些属于 task service 的职责,不属于 task 正文交付物。\n\n### agent task 正文禁止写法\n\n- 不要把正文写成聊天回复口吻,例如:\n - “我来为你……”\n - “首先让我……”\n - “我先检查一下……”\n - “我看到已经有一个同名任务……”\n- 不要把正文写成任务管理说明,例如:\n - “如果任务已存在则更新,否则创建”\n - “先 list 再 run”\n - “完成后告诉用户任务已启动”\n- 不要把正文写成状态汇报模板,例如:\n - “任务状态总结”\n - “已发送 / 已完成 / 已更新”\n - “当前任务配置如下”\n- 不要只描述动作,不描述成品,例如:\n - “去搜集一些资料”\n - “生成一个内容看看”\n - “做完后反馈结果”\n- 不要把正文写成依赖当前上下文的指代,例如:\n - “按上面说的做”\n - “继续刚才那个”\n - “把这个发出去”\n\n### 如何判断正文写得对不对\n\n- 如果把 task 正文单独复制出来给另一个 agent,它仍然能理解任务目标、输入、步骤和交付物,说明正文合格。\n- 如果最终输出章节删掉后,正文只剩“去做一下”式描述,说明正文不合格。\n- 如果正文更像“创建/更新任务的操作说明”,而不是“任务执行说明”,说明分层错了,必须重写。\n- 如果正文天然会诱导执行器输出过程汇报,而不是最终成品,说明 `# 输出要求` 写得不够强,必须补充禁止项。\n\n### script task 推荐结构\n\n- 正文必须是纯 shell 脚本,不要混入解释性自然语言。\n- 开头尽量写注释说明脚本目的、输入依赖、失败条件。\n- 输出保持稳定,便于直接作为最终结果发送给用户。\n- 如需生成文件,写到 run 目录或明确的项目路径。\n\n### 输出设计原则\n\n- task 完成后,系统会自动把**最终结果正文**通过 chat service `send` 发回 `sessionId` 绑定的 chat。\n- 当前实现采用最简规则:**最后一条 assistant 返回**会被直接视为最终结果正文,并写入 `output.md`。\n- 因此正文里的“输出要求”要面向最终用户阅读,不要只写给开发者看。\n- 对于面向用户的 agent task,正文应要求“最后一条 assistant 返回直接输出最终交付物本身”,不要让执行器在最后回答里输出自己如何创建、检查、更新、触发或发送任务。\n- 如果任务是内容生成类(例如日报、提醒、晨读、摘要),最后输出应直接是那段内容本身,不要附带“我来为你处理”“任务已发送”“任务状态总结”等过程汇报。\n- 默认不要在正文里再次要求执行器调用 `city chat send`。\n- 只有在“跨会话发送”“额外抄送”“多渠道通知”这类场景下,才显式要求 `city chat send`。\n\n### `when` / `status` 怎么选\n\n- task 创建默认就是 `status=enabled`;如果还在试任务、容易失败、需要人工确认,再显式切到 `paused`。\n- 已经验证稳定、需要自动运行:直接使用 cron + `status=enabled`。\n- 明确只执行一次:使用 `time:<带时区 ISO 时间>`;执行后系统会自动回退到 `@manual` + `paused`。\n- 如果用户只是“先存起来以后再跑”,不要直接启用调度。\n\n## 正文模板\n\n### agent 模板\n\n```md\n# 任务目标\n\n- 产出一份可直接发给用户的最终结果。\n\n# 背景与输入\n\n- 在这里补充上下文、文件、链接、范围和假设。\n\n# 执行步骤\n\n1. 理解任务目标与完成标准。\n2. 收集必要信息并执行任务。\n3. 把关键中间产物写入 run 目录。\n4. 输出最终结果正文。\n\n# 输出要求\n\n- 最后一条 assistant 返回直接作为最终结果,不要附带冗长日志。\n- 最后一条 assistant 返回直接输出交付物本身,不要输出任务管理过程、发送过程或状态汇报。\n- 不要使用“我来为你…… / 首先让我…… / 已发送……”这类元话术。\n- 默认不要再次调用 `city chat send`。\n\n# 触发与状态建议\n\n- 默认创建后立即启用;如果只是先保存草稿或等待人工确认,再改成 `paused`。\n\n# 注意事项\n\n- 仅在明确需要跨会话或额外通知时,才调用 `city chat send`。\n```\n\n### script 模板\n\n```bash\n# 任务目标:一句话说明脚本要做什么\n# 输入依赖:列出环境变量、文件、命令依赖\n# 失败条件:列出应该 exit 1 的情况\n\nset -euo pipefail\n\n# 1. 准备输入\n\n# 2. 执行主逻辑\n\n# 3. 输出最终结果(这段输出会被直接发送给用户)\n```\n\n## 建议\n\n- 先 `list`,再 `create`/`update`。\n- 简单内容生成任务优先保持默认单轮;只有确实需要“先生成、再复核、再修订”时再设置 `review: true`。\n- script 任务正文保持纯脚本,不要混入冗余自然语言。\n- 如果用户只是先存起来以后再跑,创建后显式设成 `paused`;否则保持默认启用。\n- task 正文要写“最终结果长什么样”,不要只写“去做一下看看”。\n- 对内容生成任务,要明确写“最后一条 assistant 返回只能是成品正文”,避免执行器把过程说明误当成最终结果。\n";
8
+
9
+ export default TEXT_MODULE_CONTENT;
@@ -6,7 +6,7 @@
6
6
  * - cron 调度执行器由 server 注入,service 不依赖具体实现。
7
7
  */
8
8
 
9
- import type { AgentContext } from "@/agent/AgentContextTypes.js";
9
+ import type { AgentContext } from "@/runtime/AgentContextTypes.js";
10
10
  import {
11
11
  isTaskWhenManual,
12
12
  resolveTaskWhenCronExpression,
@@ -15,7 +15,7 @@ import {
15
15
  import { listTasks, readTask, writeTask } from "./runtime/Store.js";
16
16
  import { runTaskNow } from "./runtime/Runner.js";
17
17
  import { ServiceCronEngine } from "./types/Cron.js";
18
- import { resolveRuntimeTimezone } from "@/shared/utils/Time.js";
18
+ import { resolveRuntimeTimezone } from "@/utils/Time.js";
19
19
 
20
20
  const TASK_LOG_PREFIX = "[TASK]";
21
21
 
@@ -7,14 +7,14 @@
7
7
  * - 当前文件只保留实例骨架与 lifecycle,不再依赖旧的模块级 `taskService` 单例。
8
8
  */
9
9
 
10
- import type { AgentRuntime } from "@/agent/AgentRuntimeTypes.js";
10
+ import type { AgentRuntime } from "@/runtime/AgentRuntimeTypes.js";
11
11
  import { BaseService } from "@/service/builtins/BaseService.js";
12
- import type { ServiceActions } from "@/shared/types/Service.js";
13
- import type { AgentContext } from "@/agent/AgentContextTypes.js";
12
+ import type { ServiceActions } from "@/service/types/Service.js";
13
+ import type { AgentContext } from "@/runtime/AgentContextTypes.js";
14
14
  import type {
15
15
  TaskCronRegisterResult,
16
16
  TaskSchedulerReloadResult,
17
- } from "@/shared/types/TaskService.js";
17
+ } from "@/service/builtins/task/types/TaskService.js";
18
18
  import { TaskCronTriggerEngine } from "@/service/builtins/task/runtime/CronTrigger.js";
19
19
  import { registerTaskCronJobs } from "@/service/builtins/task/Scheduler.js";
20
20
  import {
@@ -6,7 +6,7 @@
6
6
  * - 该模块是 task service 内部实现细节,core 只通过 service lifecycle 间接调用。
7
7
  */
8
8
 
9
- import type { AgentContext } from "@/agent/AgentContextTypes.js";
9
+ import type { AgentContext } from "@/runtime/AgentContextTypes.js";
10
10
  import { registerTaskCronJobs } from "@/service/builtins/task/Scheduler.js";
11
11
  import { TaskCronTriggerEngine } from "./CronTrigger.js";
12
12
 
@@ -17,7 +17,7 @@ import type {
17
17
  ShipTaskKind,
18
18
  ShipTaskStatus,
19
19
  } from "@/service/builtins/task/types/Task.js";
20
- import type { JsonObject, JsonValue } from "@/shared/types/Json.js";
20
+ import type { JsonObject, JsonValue } from "@/types/common/Json.js";
21
21
 
22
22
  /**
23
23
  * 必填 frontmatter 字段清单。