@downcity/plugins 1.0.253 → 1.0.280

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 (496) hide show
  1. package/bin/builtin/BuiltinPluginReadmes.d.ts +14 -0
  2. package/bin/builtin/BuiltinPluginReadmes.d.ts.map +1 -0
  3. package/bin/builtin/BuiltinPluginReadmes.js +58 -0
  4. package/bin/builtin/BuiltinPluginReadmes.js.map +1 -0
  5. package/bin/builtin/BuiltinPluginTypes.d.ts +48 -0
  6. package/bin/builtin/BuiltinPluginTypes.d.ts.map +1 -0
  7. package/bin/builtin/BuiltinPluginTypes.js +161 -0
  8. package/bin/builtin/BuiltinPluginTypes.js.map +1 -0
  9. package/bin/builtin/PluginSettingsDefinitions.d.ts +9 -0
  10. package/bin/builtin/PluginSettingsDefinitions.d.ts.map +1 -0
  11. package/bin/builtin/PluginSettingsDefinitions.js +41 -0
  12. package/bin/builtin/PluginSettingsDefinitions.js.map +1 -0
  13. package/bin/builtin/main/PluginSettingsMain.d.ts +6 -0
  14. package/bin/builtin/main/PluginSettingsMain.d.ts.map +1 -0
  15. package/bin/builtin/main/PluginSettingsMain.js +65 -0
  16. package/bin/builtin/main/PluginSettingsMain.js.map +1 -0
  17. package/bin/builtin/renderer/PluginSettingsRenderer.d.ts +6 -0
  18. package/bin/builtin/renderer/PluginSettingsRenderer.d.ts.map +1 -0
  19. package/bin/builtin/renderer/PluginSettingsRenderer.js +76 -0
  20. package/bin/builtin/renderer/PluginSettingsRenderer.js.map +1 -0
  21. package/bin/builtin/types/PluginSettings.d.ts +35 -0
  22. package/bin/builtin/types/PluginSettings.d.ts.map +1 -0
  23. package/bin/builtin/types/PluginSettings.js +3 -0
  24. package/bin/builtin/types/PluginSettings.js.map +1 -0
  25. package/bin/chat/ChatPlugin.d.ts +12 -28
  26. package/bin/chat/ChatPlugin.d.ts.map +1 -1
  27. package/bin/chat/ChatPlugin.js +97 -49
  28. package/bin/chat/ChatPlugin.js.map +1 -1
  29. package/bin/chat/access/ChatAccessRuntime.js +1 -1
  30. package/bin/chat/access/ChatAccessRuntime.js.map +1 -1
  31. package/bin/chat/access/ChatAccessSchema.d.ts +2 -2
  32. package/bin/chat/access/ChatAccessSchema.d.ts.map +1 -1
  33. package/bin/chat/access/ChatAccessSchema.js +3 -3
  34. package/bin/chat/access/ChatAccessSchema.js.map +1 -1
  35. package/bin/chat/access/ChatAccessService.d.ts +2 -2
  36. package/bin/chat/access/ChatAccessService.d.ts.map +1 -1
  37. package/bin/chat/access/ChatAccessService.js +4 -4
  38. package/bin/chat/access/ChatAccessService.js.map +1 -1
  39. package/bin/chat/access/ChatAccessStore.d.ts +3 -3
  40. package/bin/chat/access/ChatAccessStore.d.ts.map +1 -1
  41. package/bin/chat/access/ChatAccessStore.js +17 -8
  42. package/bin/chat/access/ChatAccessStore.js.map +1 -1
  43. package/bin/chat/channels/BaseChatChannel.d.ts +1 -0
  44. package/bin/chat/channels/BaseChatChannel.d.ts.map +1 -1
  45. package/bin/chat/channels/BaseChatChannel.js +2 -0
  46. package/bin/chat/channels/BaseChatChannel.js.map +1 -1
  47. package/bin/chat/channels/RuntimeChannel.d.ts +4 -4
  48. package/bin/chat/channels/RuntimeChannel.d.ts.map +1 -1
  49. package/bin/chat/channels/RuntimeChannel.js +8 -8
  50. package/bin/chat/channels/RuntimeChannel.js.map +1 -1
  51. package/bin/chat/channels/feishu/Feishu.js +1 -1
  52. package/bin/chat/channels/feishu/Feishu.js.map +1 -1
  53. package/bin/chat/channels/feishu/FeishuPlatformClient.d.ts +1 -0
  54. package/bin/chat/channels/feishu/FeishuPlatformClient.d.ts.map +1 -1
  55. package/bin/chat/channels/feishu/FeishuPlatformClient.js +3 -0
  56. package/bin/chat/channels/feishu/FeishuPlatformClient.js.map +1 -1
  57. package/bin/chat/channels/feishu/FeishuPlatformLookup.d.ts +2 -0
  58. package/bin/chat/channels/feishu/FeishuPlatformLookup.d.ts.map +1 -1
  59. package/bin/chat/channels/feishu/FeishuPlatformLookup.js +1 -1
  60. package/bin/chat/channels/feishu/FeishuPlatformLookup.js.map +1 -1
  61. package/bin/chat/channels/qq/QQ.d.ts.map +1 -1
  62. package/bin/chat/channels/qq/QQ.js +3 -2
  63. package/bin/chat/channels/qq/QQ.js.map +1 -1
  64. package/bin/chat/channels/qq/QQEventCapture.d.ts +1 -1
  65. package/bin/chat/channels/qq/QQEventCapture.d.ts.map +1 -1
  66. package/bin/chat/channels/qq/QQEventCapture.js +3 -3
  67. package/bin/chat/channels/qq/QQEventCapture.js.map +1 -1
  68. package/bin/chat/channels/qq/QQInboundDedupe.d.ts +1 -1
  69. package/bin/chat/channels/qq/QQInboundDedupe.d.ts.map +1 -1
  70. package/bin/chat/channels/qq/QQInboundDedupe.js +1 -1
  71. package/bin/chat/channels/qq/QQInboundDedupe.js.map +1 -1
  72. package/bin/chat/channels/qq/QQMessageHandler.d.ts +4 -0
  73. package/bin/chat/channels/qq/QQMessageHandler.d.ts.map +1 -1
  74. package/bin/chat/channels/qq/QQMessageHandler.js +2 -0
  75. package/bin/chat/channels/qq/QQMessageHandler.js.map +1 -1
  76. package/bin/chat/channels/qq/QQSupport.d.ts +4 -0
  77. package/bin/chat/channels/qq/QQSupport.d.ts.map +1 -1
  78. package/bin/chat/channels/qq/QQSupport.js +1 -0
  79. package/bin/chat/channels/qq/QQSupport.js.map +1 -1
  80. package/bin/chat/channels/qq/VoiceInput.d.ts +3 -0
  81. package/bin/chat/channels/qq/VoiceInput.d.ts.map +1 -1
  82. package/bin/chat/channels/qq/VoiceInput.js +1 -1
  83. package/bin/chat/channels/qq/VoiceInput.js.map +1 -1
  84. package/bin/chat/channels/telegram/ApiClient.d.ts +3 -1
  85. package/bin/chat/channels/telegram/ApiClient.d.ts.map +1 -1
  86. package/bin/chat/channels/telegram/ApiClient.js +4 -2
  87. package/bin/chat/channels/telegram/ApiClient.js.map +1 -1
  88. package/bin/chat/channels/telegram/StateStore.d.ts +1 -1
  89. package/bin/chat/channels/telegram/StateStore.d.ts.map +1 -1
  90. package/bin/chat/channels/telegram/StateStore.js +2 -2
  91. package/bin/chat/channels/telegram/StateStore.js.map +1 -1
  92. package/bin/chat/channels/telegram/TelegramPlatformClient.d.ts.map +1 -1
  93. package/bin/chat/channels/telegram/TelegramPlatformClient.js +2 -1
  94. package/bin/chat/channels/telegram/TelegramPlatformClient.js.map +1 -1
  95. package/bin/chat/main/ChatPluginMain.d.ts +4 -0
  96. package/bin/chat/main/ChatPluginMain.d.ts.map +1 -0
  97. package/bin/chat/main/ChatPluginMain.js +137 -0
  98. package/bin/chat/main/ChatPluginMain.js.map +1 -0
  99. package/bin/chat/renderer/ChatPluginRenderer.d.ts +4 -0
  100. package/bin/chat/renderer/ChatPluginRenderer.d.ts.map +1 -0
  101. package/bin/chat/renderer/ChatPluginRenderer.js +105 -0
  102. package/bin/chat/renderer/ChatPluginRenderer.js.map +1 -0
  103. package/bin/chat/runtime/ChannelContextStore.d.ts +2 -2
  104. package/bin/chat/runtime/ChannelContextStore.js +20 -20
  105. package/bin/chat/runtime/ChannelContextStore.js.map +1 -1
  106. package/bin/chat/runtime/ChatActionExecution.js +6 -6
  107. package/bin/chat/runtime/ChatActionExecution.js.map +1 -1
  108. package/bin/chat/runtime/ChatChannelConfig.d.ts.map +1 -1
  109. package/bin/chat/runtime/ChatChannelConfig.js +7 -12
  110. package/bin/chat/runtime/ChatChannelConfig.js.map +1 -1
  111. package/bin/chat/runtime/ChatChannelCore.d.ts +3 -3
  112. package/bin/chat/runtime/ChatChannelCore.d.ts.map +1 -1
  113. package/bin/chat/runtime/ChatChannelCore.js +5 -5
  114. package/bin/chat/runtime/ChatChannelCore.js.map +1 -1
  115. package/bin/chat/runtime/ChatHistoryStore.d.ts +1 -1
  116. package/bin/chat/runtime/ChatHistoryStore.js +7 -7
  117. package/bin/chat/runtime/ChatHistoryStore.js.map +1 -1
  118. package/bin/chat/runtime/ChatMetaStore.d.ts +1 -1
  119. package/bin/chat/runtime/ChatMetaStore.js +1 -1
  120. package/bin/chat/runtime/ChatPluginActionRegistry.d.ts +1 -1
  121. package/bin/chat/runtime/ChatPluginActionRegistry.d.ts.map +1 -1
  122. package/bin/chat/runtime/ChatPluginActionRegistry.js +9 -9
  123. package/bin/chat/runtime/ChatPluginActionRegistry.js.map +1 -1
  124. package/bin/chat/runtime/ChatQueue.d.ts +3 -38
  125. package/bin/chat/runtime/ChatQueue.d.ts.map +1 -1
  126. package/bin/chat/runtime/ChatQueue.js +3 -51
  127. package/bin/chat/runtime/ChatQueue.js.map +1 -1
  128. package/bin/chat/runtime/ChatQueueStore.d.ts +5 -16
  129. package/bin/chat/runtime/ChatQueueStore.d.ts.map +1 -1
  130. package/bin/chat/runtime/ChatQueueStore.js +8 -22
  131. package/bin/chat/runtime/ChatQueueStore.js.map +1 -1
  132. package/bin/chat/runtime/ChatQueueWorker.d.ts +1 -1
  133. package/bin/chat/runtime/ChatQueueWorker.d.ts.map +1 -1
  134. package/bin/chat/runtime/ChatQueueWorker.js +1 -2
  135. package/bin/chat/runtime/ChatQueueWorker.js.map +1 -1
  136. package/bin/chat/runtime/ChatSessionDelete.d.ts +3 -3
  137. package/bin/chat/runtime/ChatSessionDelete.js +4 -4
  138. package/bin/chat/runtime/ChatSessionDelete.js.map +1 -1
  139. package/bin/chat/runtime/ChatStorage.d.ts +7 -7
  140. package/bin/chat/runtime/ChatStorage.js +24 -24
  141. package/bin/chat/runtime/ChatStorage.js.map +1 -1
  142. package/bin/chat/types/ChatAccess.d.ts +2 -2
  143. package/bin/chat/types/ChatAccess.d.ts.map +1 -1
  144. package/bin/chat/types/ChatCommand.d.ts +1 -1
  145. package/bin/chat/types/ChatPluginChannelConfig.d.ts +57 -0
  146. package/bin/chat/types/ChatPluginChannelConfig.d.ts.map +1 -0
  147. package/bin/chat/types/ChatPluginChannelConfig.js +3 -0
  148. package/bin/chat/types/ChatPluginChannelConfig.js.map +1 -0
  149. package/bin/chat/types/ChatPluginConfig.d.ts +19 -0
  150. package/bin/chat/types/ChatPluginConfig.d.ts.map +1 -0
  151. package/bin/chat/types/ChatPluginConfig.js +3 -0
  152. package/bin/chat/types/ChatPluginConfig.js.map +1 -0
  153. package/bin/chat/types/ChatPluginOptions.d.ts +4 -4
  154. package/bin/chat/types/ChatPluginOptions.d.ts.map +1 -1
  155. package/bin/chat/types/ChatPluginOptions.js +1 -1
  156. package/bin/chat/types/ChatPluginProfile.d.ts +39 -0
  157. package/bin/chat/types/ChatPluginProfile.d.ts.map +1 -0
  158. package/bin/chat/types/ChatPluginProfile.js +3 -0
  159. package/bin/chat/types/ChatPluginProfile.js.map +1 -0
  160. package/bin/chat/types/ChatPluginRenderer.d.ts +17 -0
  161. package/bin/chat/types/ChatPluginRenderer.d.ts.map +1 -0
  162. package/bin/chat/types/ChatPluginRenderer.js +3 -0
  163. package/bin/chat/types/ChatPluginRenderer.js.map +1 -0
  164. package/bin/chat/types/ChatRuntime.d.ts +11 -0
  165. package/bin/chat/types/ChatRuntime.d.ts.map +1 -1
  166. package/bin/chat/types/ChatRuntimeAccount.d.ts +3 -3
  167. package/bin/chat/types/ChatRuntimeAccount.d.ts.map +1 -1
  168. package/bin/chat/types/ChatRuntimeAccount.js +2 -2
  169. package/bin/chat/types/ChatStorage.d.ts +2 -2
  170. package/bin/chat/types/ChatStorage.d.ts.map +1 -1
  171. package/bin/chat.d.ts +3 -4
  172. package/bin/chat.d.ts.map +1 -1
  173. package/bin/chat.js +1 -2
  174. package/bin/chat.js.map +1 -1
  175. package/bin/contact/Action.js +5 -5
  176. package/bin/contact/Action.js.map +1 -1
  177. package/bin/contact/ContactPlugin.js +15 -15
  178. package/bin/contact/ContactPlugin.js.map +1 -1
  179. package/bin/contact/runtime/ChatRuntime.js +3 -3
  180. package/bin/contact/runtime/ChatRuntime.js.map +1 -1
  181. package/bin/contact/runtime/ContactStore.d.ts +8 -8
  182. package/bin/contact/runtime/ContactStore.d.ts.map +1 -1
  183. package/bin/contact/runtime/ContactStore.js +20 -20
  184. package/bin/contact/runtime/ContactStore.js.map +1 -1
  185. package/bin/contact/runtime/EndpointNotice.js +2 -2
  186. package/bin/contact/runtime/EndpointNotice.js.map +1 -1
  187. package/bin/contact/runtime/InboxStore.d.ts +6 -6
  188. package/bin/contact/runtime/InboxStore.d.ts.map +1 -1
  189. package/bin/contact/runtime/InboxStore.js +16 -16
  190. package/bin/contact/runtime/InboxStore.js.map +1 -1
  191. package/bin/contact/runtime/LinkApproval.js +14 -14
  192. package/bin/contact/runtime/LinkApproval.js.map +1 -1
  193. package/bin/contact/runtime/LinkStore.d.ts +2 -2
  194. package/bin/contact/runtime/LinkStore.d.ts.map +1 -1
  195. package/bin/contact/runtime/LinkStore.js +5 -5
  196. package/bin/contact/runtime/LinkStore.js.map +1 -1
  197. package/bin/contact/runtime/Paths.d.ts +15 -15
  198. package/bin/contact/runtime/Paths.d.ts.map +1 -1
  199. package/bin/contact/runtime/Paths.js +29 -29
  200. package/bin/contact/runtime/Paths.js.map +1 -1
  201. package/bin/contact/runtime/ShareBundle.d.ts +1 -1
  202. package/bin/contact/runtime/ShareBundle.d.ts.map +1 -1
  203. package/bin/contact/runtime/ShareBundle.js +4 -4
  204. package/bin/contact/runtime/ShareBundle.js.map +1 -1
  205. package/bin/contact/types/ContactApproval.d.ts +2 -2
  206. package/bin/contact/types/ContactApproval.d.ts.map +1 -1
  207. package/bin/image/ImagePlugin.d.ts +1 -4
  208. package/bin/image/ImagePlugin.d.ts.map +1 -1
  209. package/bin/image/ImagePlugin.js +26 -34
  210. package/bin/image/ImagePlugin.js.map +1 -1
  211. package/bin/image/runtime/ImageResultStorage.d.ts +2 -2
  212. package/bin/image/runtime/ImageResultStorage.d.ts.map +1 -1
  213. package/bin/image/runtime/ImageResultStorage.js +15 -38
  214. package/bin/image/runtime/ImageResultStorage.js.map +1 -1
  215. package/bin/image/types/ImagePlugin.d.ts +23 -16
  216. package/bin/image/types/ImagePlugin.d.ts.map +1 -1
  217. package/bin/image/types/ImagePlugin.js +1 -1
  218. package/bin/image.d.ts +1 -1
  219. package/bin/image.d.ts.map +1 -1
  220. package/bin/index.d.ts +2 -0
  221. package/bin/index.d.ts.map +1 -1
  222. package/bin/index.js +1 -0
  223. package/bin/index.js.map +1 -1
  224. package/bin/memory/Action.d.ts +27 -36
  225. package/bin/memory/Action.d.ts.map +1 -1
  226. package/bin/memory/Action.js +71 -311
  227. package/bin/memory/Action.js.map +1 -1
  228. package/bin/memory/MemoryPlugin.d.ts +20 -37
  229. package/bin/memory/MemoryPlugin.d.ts.map +1 -1
  230. package/bin/memory/MemoryPlugin.js +241 -233
  231. package/bin/memory/MemoryPlugin.js.map +1 -1
  232. package/bin/memory/adapters/FileMemoryStorageAdapter.d.ts +43 -0
  233. package/bin/memory/adapters/FileMemoryStorageAdapter.d.ts.map +1 -0
  234. package/bin/memory/adapters/FileMemoryStorageAdapter.js +163 -0
  235. package/bin/memory/adapters/FileMemoryStorageAdapter.js.map +1 -0
  236. package/bin/memory/providers/BuiltinMemoryProvider.d.ts +63 -0
  237. package/bin/memory/providers/BuiltinMemoryProvider.d.ts.map +1 -0
  238. package/bin/memory/providers/BuiltinMemoryProvider.js +772 -0
  239. package/bin/memory/providers/BuiltinMemoryProvider.js.map +1 -0
  240. package/bin/memory/runtime/SystemProvider.d.ts +7 -12
  241. package/bin/memory/runtime/SystemProvider.d.ts.map +1 -1
  242. package/bin/memory/runtime/SystemProvider.js +30 -89
  243. package/bin/memory/runtime/SystemProvider.js.map +1 -1
  244. package/bin/memory/types/BuiltinMemoryProvider.d.ts +88 -0
  245. package/bin/memory/types/BuiltinMemoryProvider.d.ts.map +1 -0
  246. package/bin/memory/types/BuiltinMemoryProvider.js +9 -0
  247. package/bin/memory/types/BuiltinMemoryProvider.js.map +1 -0
  248. package/bin/memory/types/Memory.d.ts +255 -408
  249. package/bin/memory/types/Memory.d.ts.map +1 -1
  250. package/bin/memory/types/Memory.js +4 -4
  251. package/bin/memory/types/MemoryStorage.d.ts +35 -0
  252. package/bin/memory/types/MemoryStorage.d.ts.map +1 -0
  253. package/bin/memory/types/MemoryStorage.js +10 -0
  254. package/bin/memory/types/MemoryStorage.js.map +1 -0
  255. package/bin/memory.d.ts +6 -2
  256. package/bin/memory.d.ts.map +1 -1
  257. package/bin/memory.js +3 -1
  258. package/bin/memory.js.map +1 -1
  259. package/bin/renderers.d.ts +5 -0
  260. package/bin/renderers.d.ts.map +1 -0
  261. package/bin/renderers.js +12 -0
  262. package/bin/renderers.js.map +1 -0
  263. package/bin/sound/Plugin.d.ts +2 -5
  264. package/bin/sound/Plugin.d.ts.map +1 -1
  265. package/bin/sound/Plugin.js +27 -31
  266. package/bin/sound/Plugin.js.map +1 -1
  267. package/bin/sound/types/SoundPlugin.d.ts +22 -15
  268. package/bin/sound/types/SoundPlugin.d.ts.map +1 -1
  269. package/bin/sound/types/SoundPlugin.js +2 -2
  270. package/bin/sound.d.ts +1 -1
  271. package/bin/sound.d.ts.map +1 -1
  272. package/bin/task/Action.d.ts +6 -6
  273. package/bin/task/Action.d.ts.map +1 -1
  274. package/bin/task/Action.js +21 -21
  275. package/bin/task/Action.js.map +1 -1
  276. package/bin/task/PROMPT.d.ts +1 -1
  277. package/bin/task/PROMPT.d.ts.map +1 -1
  278. package/bin/task/PROMPT.js +1 -1
  279. package/bin/task/PROMPT.js.map +1 -1
  280. package/bin/task/Scheduler.js +8 -8
  281. package/bin/task/Scheduler.js.map +1 -1
  282. package/bin/task/TaskPlugin.d.ts +7 -14
  283. package/bin/task/TaskPlugin.d.ts.map +1 -1
  284. package/bin/task/TaskPlugin.js +54 -43
  285. package/bin/task/TaskPlugin.js.map +1 -1
  286. package/bin/task/runtime/Model.d.ts +1 -5
  287. package/bin/task/runtime/Model.d.ts.map +1 -1
  288. package/bin/task/runtime/Model.js +2 -13
  289. package/bin/task/runtime/Model.js.map +1 -1
  290. package/bin/task/runtime/Paths.d.ts +7 -7
  291. package/bin/task/runtime/Paths.d.ts.map +1 -1
  292. package/bin/task/runtime/Paths.js +11 -11
  293. package/bin/task/runtime/Paths.js.map +1 -1
  294. package/bin/task/runtime/Runner.d.ts +1 -1
  295. package/bin/task/runtime/Runner.d.ts.map +1 -1
  296. package/bin/task/runtime/Runner.js +4 -5
  297. package/bin/task/runtime/Runner.js.map +1 -1
  298. package/bin/task/runtime/Store.d.ts +9 -9
  299. package/bin/task/runtime/Store.d.ts.map +1 -1
  300. package/bin/task/runtime/Store.js +17 -17
  301. package/bin/task/runtime/Store.js.map +1 -1
  302. package/bin/task/runtime/TaskActionExecution.js +6 -6
  303. package/bin/task/runtime/TaskActionExecution.js.map +1 -1
  304. package/bin/task/runtime/TaskPluginActionRegistry.js +1 -1
  305. package/bin/task/runtime/TaskPluginActionRegistry.js.map +1 -1
  306. package/bin/task/runtime/TaskRunnerRound.d.ts +0 -1
  307. package/bin/task/runtime/TaskRunnerRound.d.ts.map +1 -1
  308. package/bin/task/runtime/TaskRunnerRound.js +8 -3
  309. package/bin/task/runtime/TaskRunnerRound.js.map +1 -1
  310. package/bin/task/runtime/TaskRunnerScript.d.ts +0 -4
  311. package/bin/task/runtime/TaskRunnerScript.d.ts.map +1 -1
  312. package/bin/task/runtime/TaskRunnerScript.js +0 -1
  313. package/bin/task/runtime/TaskRunnerScript.js.map +1 -1
  314. package/bin/task/runtime/TaskRunnerSession.d.ts +2 -3
  315. package/bin/task/runtime/TaskRunnerSession.d.ts.map +1 -1
  316. package/bin/task/runtime/TaskRunnerSession.js +2 -4
  317. package/bin/task/runtime/TaskRunnerSession.js.map +1 -1
  318. package/bin/task/types/TaskWorkspaceRuntime.d.ts +10 -0
  319. package/bin/task/types/TaskWorkspaceRuntime.d.ts.map +1 -0
  320. package/bin/task/types/TaskWorkspaceRuntime.js +3 -0
  321. package/bin/task/types/TaskWorkspaceRuntime.js.map +1 -0
  322. package/bin/web/Plugin.d.ts +2 -6
  323. package/bin/web/Plugin.d.ts.map +1 -1
  324. package/bin/web/Plugin.js +21 -17
  325. package/bin/web/Plugin.js.map +1 -1
  326. package/bin/web/providers/PlaywrightBrowserProvider.d.ts.map +1 -1
  327. package/bin/web/providers/PlaywrightBrowserProvider.js +59 -14
  328. package/bin/web/providers/PlaywrightBrowserProvider.js.map +1 -1
  329. package/bin/web/types/WebPlugin.d.ts +15 -9
  330. package/bin/web/types/WebPlugin.d.ts.map +1 -1
  331. package/bin/web.d.ts +1 -1
  332. package/bin/web.d.ts.map +1 -1
  333. package/bin/workboard/runtime/Collector.js +1 -1
  334. package/bin/workboard/runtime/Collector.js.map +1 -1
  335. package/package.json +29 -19
  336. package/scripts/chat-access.test.mjs +3 -2
  337. package/scripts/chat-channel-config.test.mjs +3 -3
  338. package/scripts/chat-storage.test.mjs +10 -14
  339. package/scripts/memory-plugin.test.mjs +204 -0
  340. package/scripts/playwright-browser-provider.test.mjs +260 -0
  341. package/scripts/plugin-main.test.mjs +101 -0
  342. package/scripts/plugin-subpaths.test.mjs +36 -0
  343. package/scripts/sound-plugin.test.mjs +21 -9
  344. package/scripts/unrestricted-sandbox-approval.test.mjs +1 -1
  345. package/scripts/web-plugin.test.mjs +43 -186
  346. package/src/builtin/BuiltinPluginReadmes.ts +58 -0
  347. package/src/builtin/BuiltinPluginTypes.ts +260 -0
  348. package/src/builtin/PluginSettingsDefinitions.ts +45 -0
  349. package/src/builtin/main/PluginSettingsMain.ts +75 -0
  350. package/src/builtin/renderer/PluginSettingsRenderer.tsx +110 -0
  351. package/src/builtin/types/PluginSettings.ts +46 -0
  352. package/src/chat/ChatPlugin.ts +99 -51
  353. package/src/chat/access/ChatAccessRuntime.ts +1 -1
  354. package/src/chat/access/ChatAccessSchema.ts +5 -5
  355. package/src/chat/access/ChatAccessService.ts +4 -4
  356. package/src/chat/access/ChatAccessStore.ts +17 -9
  357. package/src/chat/channels/BaseChatChannel.ts +2 -0
  358. package/src/chat/channels/RuntimeChannel.ts +9 -9
  359. package/src/chat/channels/feishu/Feishu.ts +1 -1
  360. package/src/chat/channels/feishu/FeishuPlatformClient.ts +3 -0
  361. package/src/chat/channels/feishu/FeishuPlatformLookup.ts +3 -1
  362. package/src/chat/channels/qq/QQ.ts +3 -2
  363. package/src/chat/channels/qq/QQEventCapture.ts +3 -3
  364. package/src/chat/channels/qq/QQInboundDedupe.ts +2 -3
  365. package/src/chat/channels/qq/QQMessageHandler.ts +6 -0
  366. package/src/chat/channels/qq/QQSupport.ts +5 -0
  367. package/src/chat/channels/qq/VoiceInput.ts +5 -1
  368. package/src/chat/channels/telegram/ApiClient.ts +10 -3
  369. package/src/chat/channels/telegram/StateStore.ts +2 -2
  370. package/src/chat/channels/telegram/TelegramPlatformClient.ts +2 -1
  371. package/src/chat/main/ChatPluginMain.ts +163 -0
  372. package/src/chat/renderer/ChatPluginRenderer.tsx +149 -0
  373. package/src/chat/runtime/ChannelContextStore.ts +20 -20
  374. package/src/chat/runtime/ChatActionExecution.ts +6 -6
  375. package/src/chat/runtime/ChatChannelConfig.ts +7 -14
  376. package/src/chat/runtime/ChatChannelCore.ts +9 -9
  377. package/src/chat/runtime/ChatHistoryStore.ts +7 -7
  378. package/src/chat/runtime/ChatMetaStore.ts +1 -1
  379. package/src/chat/runtime/ChatPluginActionRegistry.ts +10 -10
  380. package/src/chat/runtime/ChatQueue.ts +2 -69
  381. package/src/chat/runtime/ChatQueueStore.ts +10 -26
  382. package/src/chat/runtime/ChatQueueWorker.ts +2 -5
  383. package/src/chat/runtime/ChatSessionDelete.ts +4 -4
  384. package/src/chat/runtime/ChatStorage.ts +24 -24
  385. package/src/chat/types/ChatAccess.ts +2 -2
  386. package/src/chat/types/ChatCommand.ts +1 -1
  387. package/src/chat/types/ChatPluginChannelConfig.ts +63 -0
  388. package/src/chat/types/ChatPluginConfig.ts +21 -0
  389. package/src/chat/types/ChatPluginOptions.ts +4 -4
  390. package/src/chat/types/ChatPluginProfile.ts +52 -0
  391. package/src/chat/types/ChatPluginRenderer.ts +25 -0
  392. package/src/chat/types/ChatRuntime.ts +14 -0
  393. package/src/chat/types/ChatRuntimeAccount.ts +3 -3
  394. package/src/chat/types/ChatStorage.ts +2 -2
  395. package/src/chat.ts +6 -14
  396. package/src/contact/Action.ts +5 -5
  397. package/src/contact/ContactPlugin.ts +15 -15
  398. package/src/contact/runtime/ChatRuntime.ts +3 -3
  399. package/src/contact/runtime/ContactStore.ts +20 -20
  400. package/src/contact/runtime/EndpointNotice.ts +2 -2
  401. package/src/contact/runtime/InboxStore.ts +16 -16
  402. package/src/contact/runtime/LinkApproval.ts +16 -16
  403. package/src/contact/runtime/LinkStore.ts +5 -5
  404. package/src/contact/runtime/Paths.ts +29 -29
  405. package/src/contact/runtime/ShareBundle.ts +5 -5
  406. package/src/contact/types/ContactApproval.ts +2 -2
  407. package/src/image/ImagePlugin.ts +30 -33
  408. package/src/image/runtime/ImageResultStorage.ts +36 -62
  409. package/src/image/types/ImagePlugin.ts +25 -19
  410. package/src/image.ts +2 -0
  411. package/src/index.ts +8 -0
  412. package/src/memory/Action.ts +106 -377
  413. package/src/memory/MemoryPlugin.ts +266 -246
  414. package/src/memory/adapters/FileMemoryStorageAdapter.ts +197 -0
  415. package/src/memory/providers/BuiltinMemoryProvider.ts +905 -0
  416. package/src/memory/runtime/SystemProvider.ts +32 -95
  417. package/src/memory/types/BuiltinMemoryProvider.ts +121 -0
  418. package/src/memory/types/Memory.ts +329 -456
  419. package/src/memory/types/MemoryStorage.ts +44 -0
  420. package/src/memory.ts +49 -24
  421. package/src/renderers.ts +18 -0
  422. package/src/sound/Plugin.ts +34 -33
  423. package/src/sound/types/SoundPlugin.ts +24 -19
  424. package/src/sound.ts +2 -0
  425. package/src/task/Action.ts +27 -27
  426. package/src/task/PROMPT.ts +1 -1
  427. package/src/task/PROMPT.ts.txt +5 -6
  428. package/src/task/Scheduler.ts +8 -8
  429. package/src/task/TaskPlugin.ts +55 -46
  430. package/src/task/runtime/Model.ts +3 -13
  431. package/src/task/runtime/Paths.ts +11 -11
  432. package/src/task/runtime/Runner.ts +5 -6
  433. package/src/task/runtime/Store.ts +22 -22
  434. package/src/task/runtime/TaskActionExecution.ts +6 -6
  435. package/src/task/runtime/TaskPluginActionRegistry.ts +1 -1
  436. package/src/task/runtime/TaskRunnerRound.ts +13 -4
  437. package/src/task/runtime/TaskRunnerScript.ts +0 -5
  438. package/src/task/runtime/TaskRunnerSession.ts +10 -8
  439. package/src/task/types/TaskWorkspaceRuntime.ts +12 -0
  440. package/src/web/Plugin.ts +23 -22
  441. package/src/web/providers/PlaywrightBrowserProvider.ts +93 -17
  442. package/src/web/types/WebPlugin.ts +16 -13
  443. package/src/web.ts +1 -0
  444. package/src/workboard/runtime/Collector.ts +1 -1
  445. package/tsconfig.json +4 -1
  446. package/LICENSE +0 -183
  447. package/bin/chat/Index.d.ts +0 -15
  448. package/bin/chat/Index.d.ts.map +0 -1
  449. package/bin/chat/Index.js +0 -11
  450. package/bin/chat/Index.js.map +0 -1
  451. package/bin/chat/config/ChatPluginConfig.d.ts +0 -67
  452. package/bin/chat/config/ChatPluginConfig.d.ts.map +0 -1
  453. package/bin/chat/config/ChatPluginConfig.js +0 -237
  454. package/bin/chat/config/ChatPluginConfig.js.map +0 -1
  455. package/bin/chat/types/ChatPluginResource.d.ts +0 -68
  456. package/bin/chat/types/ChatPluginResource.d.ts.map +0 -1
  457. package/bin/chat/types/ChatPluginResource.js +0 -10
  458. package/bin/chat/types/ChatPluginResource.js.map +0 -1
  459. package/bin/contact/Index.d.ts +0 -8
  460. package/bin/contact/Index.d.ts.map +0 -1
  461. package/bin/contact/Index.js +0 -8
  462. package/bin/contact/Index.js.map +0 -1
  463. package/bin/memory/Index.d.ts +0 -9
  464. package/bin/memory/Index.d.ts.map +0 -1
  465. package/bin/memory/Index.js +0 -9
  466. package/bin/memory/Index.js.map +0 -1
  467. package/bin/memory/runtime/Search.d.ts +0 -19
  468. package/bin/memory/runtime/Search.d.ts.map +0 -1
  469. package/bin/memory/runtime/Search.js +0 -262
  470. package/bin/memory/runtime/Search.js.map +0 -1
  471. package/bin/memory/runtime/Store.d.ts +0 -42
  472. package/bin/memory/runtime/Store.d.ts.map +0 -1
  473. package/bin/memory/runtime/Store.js +0 -94
  474. package/bin/memory/runtime/Store.js.map +0 -1
  475. package/bin/memory/runtime/Writer.d.ts +0 -61
  476. package/bin/memory/runtime/Writer.d.ts.map +0 -1
  477. package/bin/memory/runtime/Writer.js +0 -274
  478. package/bin/memory/runtime/Writer.js.map +0 -1
  479. package/bin/skill/Command.d.ts +0 -29
  480. package/bin/skill/Command.d.ts.map +0 -1
  481. package/bin/skill/Command.js +0 -35
  482. package/bin/skill/Command.js.map +0 -1
  483. package/bin/task/Index.d.ts +0 -9
  484. package/bin/task/Index.d.ts.map +0 -1
  485. package/bin/task/Index.js +0 -9
  486. package/bin/task/Index.js.map +0 -1
  487. package/src/chat/Index.ts +0 -36
  488. package/src/chat/config/ChatPluginConfig.ts +0 -266
  489. package/src/chat/types/ChatPluginResource.ts +0 -95
  490. package/src/contact/Index.ts +0 -8
  491. package/src/memory/Index.ts +0 -9
  492. package/src/memory/runtime/Search.ts +0 -327
  493. package/src/memory/runtime/Store.ts +0 -158
  494. package/src/memory/runtime/Writer.ts +0 -351
  495. package/src/skill/Command.ts +0 -58
  496. package/src/task/Index.ts +0 -8
@@ -10,29 +10,29 @@ import type { PluginContext } from "@downcity/agent";
10
10
  import type { PluginExecutionContext } from "@downcity/agent";
11
11
  import type { TaskCreateRequest, TaskCreateResponse, TaskDeleteRequest, TaskDeleteResponse, TaskListResponse, TaskRunRequest, TaskRunResponse, TaskUpdateRequest, TaskUpdateResponse, TaskSetStatusRequest, TaskSetStatusResponse } from "./types/TaskCommand.js";
12
12
  export declare function listTaskDefinitions(params: {
13
- project_root: string;
13
+ data_path: string;
14
14
  status?: ShipTaskStatus;
15
15
  }): Promise<TaskListResponse>;
16
16
  export declare function createTaskDefinition(params: {
17
- project_root: string;
17
+ data_path: string;
18
18
  request: TaskCreateRequest;
19
19
  }): Promise<TaskCreateResponse>;
20
20
  export declare function updateTaskDefinition(params: {
21
- project_root: string;
21
+ data_path: string;
22
22
  request: TaskUpdateRequest;
23
23
  }): Promise<TaskUpdateResponse>;
24
24
  export declare function runTaskDefinition(params: {
25
25
  context: PluginContext;
26
- project_root: string;
26
+ data_path: string;
27
27
  request: TaskRunRequest;
28
28
  execution_context?: PluginExecutionContext;
29
29
  }): Promise<TaskRunResponse>;
30
30
  export declare function setTaskStatus(params: {
31
- project_root: string;
31
+ data_path: string;
32
32
  request: TaskSetStatusRequest;
33
33
  }): Promise<TaskSetStatusResponse>;
34
34
  export declare function deleteTaskDefinition(params: {
35
- project_root: string;
35
+ data_path: string;
36
36
  request: TaskDeleteRequest;
37
37
  }): Promise<TaskDeleteResponse>;
38
38
  //# sourceMappingURL=Action.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../src/task/Action.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAmB9D,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAsDhC,wBAAsB,mBAAmB,CAAC,MAAM,EAAE;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA0B5B;AAED,wBAAsB,oBAAoB,CAAC,MAAM,EAAE;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,iBAAiB,CAAC;CAC5B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA2E9B;AAED,wBAAsB,oBAAoB,CAAC,MAAM,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AgB,CAAC,CA0B5B;AAED,wBAAsB,oBAAoB,CAAC,MAAM,EAAE;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,iBAAiB,CAAC;CAC5B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA2E9B;AAED,wBAAsB,oBAAoB,CAAC,MAAM,EAAE;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,iBAAiB,CAAC;CAC5B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA6G9B;AAED,wBAAsB,iBAAiB,CAAC,MAAM,EAAE;IAC9C,OAAO,EAAE,aAAa,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC;IACxB,iBAAiB,CAAC,EAAE,sBAAsB,CAAC;CAC5C,GAAG,OAAO,CAAC,eAAe,CAAC,CA0F3B;AAED,wBAAsB,aAAa,CAAC,MAAM,EAAE;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,oBAAoB,CAAC;CAC/B,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA8CjC;AAED,wBAAsB,oBAAoB,CAAC,MAAM,EAAE;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,iBAAiB,CAAC;CAC5B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA0B9B"}
@@ -23,7 +23,7 @@ function buildDefaultTaskBody() {
23
23
  "# 任务目标",
24
24
  "",
25
25
  "- 明确这次任务最终要交付什么结果,最终回复会由系统自动发送到任务绑定的 chat。",
26
- "- 如果需要额外文件,请写入本次 run 目录,便于审计和排查。",
26
+ "- 如果需要向用户交付额外文件,请写入明确的项目路径。",
27
27
  "",
28
28
  "# 背景与输入",
29
29
  "",
@@ -34,7 +34,7 @@ function buildDefaultTaskBody() {
34
34
  "",
35
35
  "1. 先理解任务目标与完成标准。",
36
36
  "2. 按需要收集信息、执行分析或运行命令。",
37
- "3. 把关键中间产物写入 run 目录。",
37
+ "3. 需要文件交付时,把产物写入明确的项目路径。",
38
38
  "4. 整理出面向用户可直接阅读的最终结果。",
39
39
  "",
40
40
  "# 输出要求",
@@ -52,13 +52,13 @@ function buildDefaultTaskBody() {
52
52
  "# 注意事项",
53
53
  "",
54
54
  "- 当前是独立 task 上下文,不要假设仍处在原始聊天回合里。",
55
- "- 尽量使用可审计的方式:关键中间产物写入 `./.downcity/task/<title>/<timestamp>/` 下的 markdown 文件。",
55
+ "- 任务运行记录由系统保存在当前 Agent 的私有目录;需要交付给用户的文件应明确写入项目目录。",
56
56
  "- 如果任务明确要求跨会话、跨平台或发送额外通知,再显式调用 chat plugin 的发送 action。",
57
57
  "",
58
58
  ].join("\n");
59
59
  }
60
60
  export async function listTaskDefinitions(params) {
61
- const root = path.resolve(params.project_root);
61
+ const root = path.resolve(params.data_path);
62
62
  const normalizedStatus = normalizeTaskStatus(params.status);
63
63
  const tasks = await listTasks(root);
64
64
  const filtered = normalizedStatus
@@ -83,7 +83,7 @@ export async function listTaskDefinitions(params) {
83
83
  };
84
84
  }
85
85
  export async function createTaskDefinition(params) {
86
- const root = path.resolve(params.project_root);
86
+ const root = path.resolve(params.data_path);
87
87
  const req = params.request;
88
88
  const title = String(req.title || "").trim();
89
89
  const description = String(req.description || "").trim();
@@ -132,7 +132,7 @@ export async function createTaskDefinition(params) {
132
132
  try {
133
133
  const written = await writeTask({
134
134
  taskId: targetTaskId,
135
- project_root: root,
135
+ data_path: root,
136
136
  overwrite: Boolean(req.overwrite) || Boolean(duplicated),
137
137
  frontmatter: {
138
138
  title,
@@ -159,12 +159,12 @@ export async function createTaskDefinition(params) {
159
159
  }
160
160
  }
161
161
  export async function updateTaskDefinition(params) {
162
- const root = path.resolve(params.project_root);
162
+ const root = path.resolve(params.data_path);
163
163
  const req = params.request;
164
164
  const title = String(req.title || "").trim();
165
165
  let taskId = "";
166
166
  try {
167
- taskId = await resolveTaskIdByTitle({ project_root: root, title });
167
+ taskId = await resolveTaskIdByTitle({ data_path: root, title });
168
168
  }
169
169
  catch (error) {
170
170
  return { success: false, error: String(error) };
@@ -178,7 +178,7 @@ export async function updateTaskDefinition(params) {
178
178
  }
179
179
  try {
180
180
  const current = await readTask({
181
- project_root: root,
181
+ data_path: root,
182
182
  taskId,
183
183
  });
184
184
  const nextTitle = typeof req.titleNext === "string"
@@ -230,7 +230,7 @@ export async function updateTaskDefinition(params) {
230
230
  ? req.body.trim()
231
231
  : current.body;
232
232
  const written = await writeTask({
233
- project_root: root,
233
+ data_path: root,
234
234
  taskId,
235
235
  overwrite: true,
236
236
  frontmatter: {
@@ -258,11 +258,11 @@ export async function updateTaskDefinition(params) {
258
258
  }
259
259
  }
260
260
  export async function runTaskDefinition(params) {
261
- const root = path.resolve(params.project_root);
261
+ const root = path.resolve(params.data_path);
262
262
  const title = String(params.request.title || "").trim();
263
263
  let taskId = "";
264
264
  try {
265
- taskId = await resolveTaskIdByTitle({ project_root: root, title });
265
+ taskId = await resolveTaskIdByTitle({ data_path: root, title });
266
266
  }
267
267
  catch (error) {
268
268
  return { success: false, error: String(error) };
@@ -276,7 +276,7 @@ export async function runTaskDefinition(params) {
276
276
  // 关键点(中文):run 改为“异步受理”,先做存在性校验,再后台执行。
277
277
  await readTask({
278
278
  taskId,
279
- project_root: root,
279
+ data_path: root,
280
280
  });
281
281
  params.context.logger.info(formatTaskLogMessage("Manual task run accepted"), {
282
282
  taskId,
@@ -286,7 +286,7 @@ export async function runTaskDefinition(params) {
286
286
  const executionId = `${taskId}:${Date.now()}`;
287
287
  void runTaskNow({
288
288
  context: params.context,
289
- project_root: root,
289
+ data_path: root,
290
290
  taskId,
291
291
  trigger,
292
292
  executionId,
@@ -338,11 +338,11 @@ export async function runTaskDefinition(params) {
338
338
  }
339
339
  }
340
340
  export async function setTaskStatus(params) {
341
- const root = path.resolve(params.project_root);
341
+ const root = path.resolve(params.data_path);
342
342
  const title = String(params.request.title || "").trim();
343
343
  let taskId = "";
344
344
  try {
345
- taskId = await resolveTaskIdByTitle({ project_root: root, title });
345
+ taskId = await resolveTaskIdByTitle({ data_path: root, title });
346
346
  }
347
347
  catch (error) {
348
348
  return { success: false, error: String(error) };
@@ -356,11 +356,11 @@ export async function setTaskStatus(params) {
356
356
  }
357
357
  try {
358
358
  const task = await readTask({
359
- project_root: root,
359
+ data_path: root,
360
360
  taskId,
361
361
  });
362
362
  await writeTask({
363
- project_root: root,
363
+ data_path: root,
364
364
  taskId,
365
365
  overwrite: true,
366
366
  frontmatter: {
@@ -383,18 +383,18 @@ export async function setTaskStatus(params) {
383
383
  }
384
384
  }
385
385
  export async function deleteTaskDefinition(params) {
386
- const root = path.resolve(params.project_root);
386
+ const root = path.resolve(params.data_path);
387
387
  const title = String(params.request.title || "").trim();
388
388
  let taskId = "";
389
389
  try {
390
- taskId = await resolveTaskIdByTitle({ project_root: root, title });
390
+ taskId = await resolveTaskIdByTitle({ data_path: root, title });
391
391
  }
392
392
  catch (error) {
393
393
  return { success: false, error: String(error) };
394
394
  }
395
395
  try {
396
396
  const deleted = await deleteTask({
397
- project_root: root,
397
+ data_path: root,
398
398
  taskId,
399
399
  });
400
400
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"Action.js","sourceRoot":"","sources":["../../src/task/Action.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAK7B,OAAO,EACL,qBAAqB,EACrB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,UAAU,EACV,SAAS,EACT,QAAQ,EACR,oBAAoB,EACpB,SAAS,GACV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAejD,SAAS,iBAAiB,CAAC,KAA4B,EAAE,QAAwB;IAC/E,MAAM,UAAU,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC9C,O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E,CAAC;QACf,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC;SACrB,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,MAG1C;IACC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACxD,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,CAAC;QACH,MAAM,GAAG,MAAM,oBAAoB,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAClE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IAClD,CAAC;IAED,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,UAAU,CAAC;YAC/B,SAAS,EAAE,IAAI;YACf,MAAM;SACP,CAAC,CAAC;QACH,OAAO;YACL,OAAO,EAAE,IAAI;YACb,KAAK;YACL,WAAW,EAAE,OAAO,CAAC,WAAW;SACjC,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC;SACrB,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -2,6 +2,6 @@
2
2
  * 自动生成文件,请勿手改。
3
3
  * 源文件:由同路径 `*.ts.txt` 生成。
4
4
  */
5
- declare const TEXT_MODULE_CONTENT = "# Task Plugin\n\nYou can use the `task` plugin to manage task definitions, execution, scheduling, and status control.\n\n## Task Model\n\nEach task is defined in `./.downcity/task/<title>/task.md` and contains:\n- frontmatter for structured fields\n- body for the task instructions\n\nCore frontmatter fields:\n- `title`: unique task identifier\n- `description`: task description\n- `when`: trigger condition, supporting `@manual`, cron, or `time:<ISO8601-with-timezone>`\n- `session_id`: task execution session\n- `status`: `enabled|paused|disabled`\n- `kind`: `agent|script`, defaulting to `agent`\n\nEach execution creates a run directory:\n- `./.downcity/task/<title>/<timestamp>/`\n\nCommon artifacts:\n- `input.md`\n- `output.md`: final output body for this run\n- `result.md`: execution summary\n- `run.json`\n- `run-progress.json`\n- `dialogue.md` / `dialogue.json`: multi-turn agent dialogue\n- `error.md`: failure details\n\n## Execution Kinds\n\n1. `kind=agent`\n- Sends the task body to an agent for execution.\n- Completes in a single turn by default. Simulated multi-turn review is enabled only when frontmatter explicitly sets `review: true`.\n- Suitable for research, analysis, and report generation.\n\n2. `kind=script`\n- Treats the body as a shell script.\n- The body must be non-empty and executable as a script.\n\n## Available Actions\n\n- `list`\n- `create`\n- `run`\n- `delete`\n- `update`\n- `status`\n- `enable`\n- `disable`\n\n## Action Examples\n\n- `plugin_call({ plugin: \"task\", action: \"list\", payload: { status } })`\n- `plugin_call({ plugin: \"task\", action: \"create\", payload: { title, description, session_id, when, kind, status } })`\n- `plugin_call({ plugin: \"task\", action: \"run\", payload: { title, reason } })`\n- `plugin_call({ plugin: \"task\", action: \"update\", payload: { title, description, when, status, session_id } })`\n- `plugin_call({ plugin: \"task\", action: \"delete\", payload: { title } })`\n\n## Key Constraints\n\n- `title` is unique. `create` deduplicates only by exact `title`.\n- After `when=time:...` triggers, the task is automatically set to `paused` and falls back to `when=@manual`.\n- `run` is accepted asynchronously. It returns `accepted=true`, `message`, and `executionId` immediately. Treat this as \"the task has entered background execution; the result will be sent automatically through the chat plugin runtime, and the current flow does not need to block.\"\n- If `run` returns `accepted=true`:\n - Do not manually forward task output to the user again.\n - Do not actively poll the run directory, `run-progress.json`, or `output.md`.\n - Inspect the run directory only when the user explicitly asks to debug, view artifacts, or confirm execution details.\n- Agent tasks only need to produce valid output by default. They should send to an external channel only when the task body explicitly requires it.\n\n## Designing The Task Body\n\n### Recommended Agent Task Structure\n\nThe body should include at least these headings:\n\n```md\n# Task Goal\n\n- What final result this task must deliver.\n\n# Background And Input\n\n- Data sources, scope, constraints, and reference materials.\n\n# Execution Steps\n\n1. What to do first.\n2. What to do next.\n3. Where key intermediate artifacts should be written.\n\n# Output Requirements\n\n- What format the final result must use.\n- Whether a table, JSON, or Markdown is required.\n- What content must not be included.\n\n# Trigger And Status Recommendation\n\n- Why this task is suitable for `@manual`, cron, or `time:...`.\n- Whether it should currently be `paused` or `enabled`.\n\n# Notes\n\n- Risks, boundaries, and things not to do.\n```\n\n### Agent Task Body Writing Constraints\n\n- The task body must read like a delivery contract, so another executor can run it directly without relying on the current chat context.\n- `# Task Goal` must clearly state the final deliverable. Do not write vague goals such as \"take a look\", \"research this\", or \"handle this\".\n- `# Background And Input` must specify sources, scope, objects, time range, and constraints. Do not assume the executor can see the original chat context.\n- `# Execution Steps` should describe the task workflow, not task-management actions. Do not write \"first check whether a task with the same name exists\", \"then create a task\", or \"then trigger the task\".\n- `# Output Requirements` must clearly specify the final artifact's format, structure, tone, length, and excluded content.\n- Explicitly state that the final assistant message will be written directly to `output.md` and sent to the user. Therefore, the final answer must be exactly the deliverable content.\n- Content-generation tasks such as daily reports, reminders, morning briefings, summaries, and reports must explicitly require \"the final output is the deliverable body itself\". Do not let the executor output process notes.\n- If the task result should be sent to the user, the body should require \"output send-ready message content\" instead of asking the executor to explain what it has sent.\n- Unless truly needed, do not ask the executor to repeat the task title, session_id, execution time, status, or other metadata in the body.\n- Constraints in the body must be executable and checkable. Avoid weak phrases such as \"appropriately\", \"as much as possible\", or \"depending on the situation\".\n- Do not put task creation, task update, task status lookup, or same-title existence checks into the body. Those belong to the task plugin, not to the task deliverable.\n\n### Forbidden Agent Task Body Patterns\n\n- Do not write the body in chat-reply style, for example:\n - \"I will help you...\"\n - \"First, let me...\"\n - \"I will check first...\"\n - \"I see there is already a task with the same name...\"\n- Do not write the body as task-management instructions, for example:\n - \"If the task exists, update it; otherwise create it.\"\n - \"First list, then run.\"\n - \"Tell the user that the task has started when done.\"\n- Do not write the body as a status-report template, for example:\n - \"Task status summary\"\n - \"Sent / completed / updated\"\n - \"Current task configuration\"\n- Do not describe only actions without describing the deliverable, for example:\n - \"Go collect some materials.\"\n - \"Generate some content and see.\"\n - \"Report back after finishing.\"\n- Do not use references that depend on the current context, for example:\n - \"Do what was said above.\"\n - \"Continue the previous one.\"\n - \"Send this out.\"\n\n### How To Judge Whether The Body Is Good\n\n- If you can copy the task body alone to another agent and it can still understand the goal, input, steps, and deliverable, the body is valid.\n- If deleting the output section leaves only \"go do something\" style instructions, the body is invalid.\n- If the body looks more like instructions for creating or updating a task than instructions for executing the task, the layering is wrong and the body must be rewritten.\n- If the body naturally encourages the executor to output process notes instead of the final artifact, the `# Output Requirements` section is not strong enough and must add explicit prohibitions.\n\n### Recommended Script Task Structure\n\n- The body must be a pure shell script. Do not mix in explanatory natural language.\n- Start with comments that describe the script's purpose, input dependencies, and failure conditions when possible.\n- Keep output stable so it can be sent directly as the final result.\n- If files need to be generated, write them to the run directory or to an explicit project path.\n\n### Output Design Principles\n\n- When a task completes, the system automatically sends the final result body back to the chat bound to `session_id` through the chat plugin runtime's `send`.\n- The current implementation uses the simplest rule: the final assistant message is treated directly as the final result body and written to `output.md`.\n- Therefore, the \"Output Requirements\" section must be written for the final user, not only for developers.\n- For user-facing agent tasks, the body should require \"the final assistant message directly outputs the deliverable itself\". Do not let the executor explain how it created, checked, updated, triggered, or sent the task.\n- For content-generation tasks such as daily reports, reminders, morning briefings, and summaries, the final output should be exactly that content. It should not include process language such as \"I will handle this\", \"task sent\", or \"task status summary\".\n- By default, do not ask the executor to call chat plugin send actions again. The system handles final-result delivery.\n- Explicitly require chat plugin actions only for cross-conversation sending, additional CCs, multi-channel notifications, or similar cases.\n\n### Choosing `when` And `status`\n\n- A task is created as `status=enabled` by default. Set `paused` explicitly only when it is still a draft, likely to fail, or needs human confirmation.\n- For verified stable tasks that need automatic execution, use cron with `status=enabled`.\n- For a clear one-time execution, use `time:<ISO time with timezone>`. After execution, the system automatically falls back to `@manual` and `paused`.\n- If the user only wants to save it for later, do not enable scheduling directly.\n\n## Body Templates\n\n### Agent Template\n\n```md\n# Task Goal\n\n- Produce a final result that can be sent directly to the user.\n\n# Background And Input\n\n- Add context, files, links, scope, and assumptions here.\n\n# Execution Steps\n\n1. Understand the task goal and completion criteria.\n2. Collect necessary information and execute the task.\n3. Write key intermediate artifacts to the run directory.\n4. Output the final result body.\n\n# Output Requirements\n\n- The final assistant message is the final result. Do not include long logs.\n- The final assistant message must output the deliverable itself. Do not output task-management process, sending process, or status reports.\n- Do not use meta language such as \"I will help you...\", \"First, let me...\", or \"sent\".\n- By default, do not call the chat plugin send action again.\n\n# Trigger And Status Recommendation\n\n- Enable by default after creation. If this is only a draft or waiting for human confirmation, set it to `paused`.\n\n# Notes\n\n- Call chat plugin send actions only when cross-conversation or additional notifications are explicitly needed.\n```\n\n### Script Template\n\n```bash\n# Task goal: state in one sentence what the script should do\n# Input dependencies: list environment variables, files, and command dependencies\n# Failure conditions: list cases that should exit 1\n\nset -euo pipefail\n\n# 1. Prepare input\n\n# 2. Execute main logic\n\n# 3. Output final result. This output will be sent directly to the user.\n```\n\n## Recommendations\n\n- Run `list` before `create` or `update`.\n- Keep simple content-generation tasks single-turn by default. Set `review: true` only when you truly need \"draft, review, revise\".\n- Keep script task bodies as pure scripts, without redundant natural-language explanation.\n- If the user only wants to save something for later, create it as `paused`; otherwise keep the default enabled state.\n- The task body must describe what the final result should look like, not only say \"go do this and see\".\n- For content-generation tasks, explicitly require \"the final assistant message can only be the finished content body\" so the executor does not mistake process notes for the final result.\n";
5
+ declare const TEXT_MODULE_CONTENT = "# Task Plugin\n\nYou can use the `task` plugin to manage task definitions, execution, scheduling, and status control.\n\n## Task Model\n\nEach task is defined in the current Agent private runtime directory private `task/<title>/task.md` and contains:\n- frontmatter for structured fields\n- body for the task instructions\n\nCore frontmatter fields:\n- `title`: unique task identifier\n- `description`: task description\n- `when`: trigger condition, supporting `@manual`, cron, or `time:<ISO8601-with-timezone>`\n- `session_id`: task execution session\n- `status`: `enabled|paused|disabled`\n- `kind`: `agent|script`, defaulting to `agent`\n\nEach execution creates a private run record managed by Downcity under the current Agent private runtime directory.\n\nCommon artifacts:\n- `input.md`\n- `output.md`: final output body for this run\n- `result.md`: execution summary\n- `run.json`\n- `run-progress.json`\n- `dialogue.md` / `dialogue.json`: multi-turn agent dialogue\n- `error.md`: failure details\n\n## Execution Kinds\n\n1. `kind=agent`\n- Sends the task body to an agent for execution.\n- Completes in a single turn by default. Simulated multi-turn review is enabled only when frontmatter explicitly sets `review: true`.\n- Suitable for research, analysis, and report generation.\n\n2. `kind=script`\n- Treats the body as a shell script.\n- The body must be non-empty and executable as a script.\n\n## Available Actions\n\n- `list`\n- `create`\n- `run`\n- `delete`\n- `update`\n- `status`\n- `enable`\n- `disable`\n\n## Action Examples\n\n- `plugin_call({ plugin: \"task\", action: \"list\", payload: { status } })`\n- `plugin_call({ plugin: \"task\", action: \"create\", payload: { title, description, session_id, when, kind, status } })`\n- `plugin_call({ plugin: \"task\", action: \"run\", payload: { title, reason } })`\n- `plugin_call({ plugin: \"task\", action: \"update\", payload: { title, description, when, status, session_id } })`\n- `plugin_call({ plugin: \"task\", action: \"delete\", payload: { title } })`\n\n## Key Constraints\n\n- `title` is unique. `create` deduplicates only by exact `title`.\n- After `when=time:...` triggers, the task is automatically set to `paused` and falls back to `when=@manual`.\n- `run` is accepted asynchronously. It returns `accepted=true`, `message`, and `executionId` immediately. Treat this as \"the task has entered background execution; the result will be sent automatically through the chat plugin runtime, and the current flow does not need to block.\"\n- If `run` returns `accepted=true`:\n - Do not manually forward task output to the user again.\n - Do not actively poll the run directory, `run-progress.json`, or `output.md`.\n - Inspect run details through the task/control API only when the user explicitly asks to debug, view artifacts, or confirm execution details.\n- Agent tasks only need to produce valid output by default. They should send to an external channel only when the task body explicitly requires it.\n\n## Designing The Task Body\n\n### Recommended Agent Task Structure\n\nThe body should include at least these headings:\n\n```md\n# Task Goal\n\n- What final result this task must deliver.\n\n# Background And Input\n\n- Data sources, scope, constraints, and reference materials.\n\n# Execution Steps\n\n1. What to do first.\n2. What to do next.\n3. Where key intermediate artifacts should be written.\n\n# Output Requirements\n\n- What format the final result must use.\n- Whether a table, JSON, or Markdown is required.\n- What content must not be included.\n\n# Trigger And Status Recommendation\n\n- Why this task is suitable for `@manual`, cron, or `time:...`.\n- Whether it should currently be `paused` or `enabled`.\n\n# Notes\n\n- Risks, boundaries, and things not to do.\n```\n\n### Agent Task Body Writing Constraints\n\n- The task body must read like a delivery contract, so another executor can run it directly without relying on the current chat context.\n- `# Task Goal` must clearly state the final deliverable. Do not write vague goals such as \"take a look\", \"research this\", or \"handle this\".\n- `# Background And Input` must specify sources, scope, objects, time range, and constraints. Do not assume the executor can see the original chat context.\n- `# Execution Steps` should describe the task workflow, not task-management actions. Do not write \"first check whether a task with the same name exists\", \"then create a task\", or \"then trigger the task\".\n- `# Output Requirements` must clearly specify the final artifact's format, structure, tone, length, and excluded content.\n- Explicitly state that the final assistant message will be written directly to `output.md` and sent to the user. Therefore, the final answer must be exactly the deliverable content.\n- Content-generation tasks such as daily reports, reminders, morning briefings, summaries, and reports must explicitly require \"the final output is the deliverable body itself\". Do not let the executor output process notes.\n- If the task result should be sent to the user, the body should require \"output send-ready message content\" instead of asking the executor to explain what it has sent.\n- Unless truly needed, do not ask the executor to repeat the task title, session_id, execution time, status, or other metadata in the body.\n- Constraints in the body must be executable and checkable. Avoid weak phrases such as \"appropriately\", \"as much as possible\", or \"depending on the situation\".\n- Do not put task creation, task update, task status lookup, or same-title existence checks into the body. Those belong to the task plugin, not to the task deliverable.\n\n### Forbidden Agent Task Body Patterns\n\n- Do not write the body in chat-reply style, for example:\n - \"I will help you...\"\n - \"First, let me...\"\n - \"I will check first...\"\n - \"I see there is already a task with the same name...\"\n- Do not write the body as task-management instructions, for example:\n - \"If the task exists, update it; otherwise create it.\"\n - \"First list, then run.\"\n - \"Tell the user that the task has started when done.\"\n- Do not write the body as a status-report template, for example:\n - \"Task status summary\"\n - \"Sent / completed / updated\"\n - \"Current task configuration\"\n- Do not describe only actions without describing the deliverable, for example:\n - \"Go collect some materials.\"\n - \"Generate some content and see.\"\n - \"Report back after finishing.\"\n- Do not use references that depend on the current context, for example:\n - \"Do what was said above.\"\n - \"Continue the previous one.\"\n - \"Send this out.\"\n\n### How To Judge Whether The Body Is Good\n\n- If you can copy the task body alone to another agent and it can still understand the goal, input, steps, and deliverable, the body is valid.\n- If deleting the output section leaves only \"go do something\" style instructions, the body is invalid.\n- If the body looks more like instructions for creating or updating a task than instructions for executing the task, the layering is wrong and the body must be rewritten.\n- If the body naturally encourages the executor to output process notes instead of the final artifact, the `# Output Requirements` section is not strong enough and must add explicit prohibitions.\n\n### Recommended Script Task Structure\n\n- The body must be a pure shell script. Do not mix in explanatory natural language.\n- Start with comments that describe the script's purpose, input dependencies, and failure conditions when possible.\n- Keep output stable so it can be sent directly as the final result.\n- If files need to be delivered to the user, write them to an explicit project path.\n\n### Output Design Principles\n\n- When a task completes, the system automatically sends the final result body back to the chat bound to `session_id` through the chat plugin runtime's `send`.\n- The current implementation uses the simplest rule: the final assistant message is treated directly as the final result body and written to `output.md`.\n- Therefore, the \"Output Requirements\" section must be written for the final user, not only for developers.\n- For user-facing agent tasks, the body should require \"the final assistant message directly outputs the deliverable itself\". Do not let the executor explain how it created, checked, updated, triggered, or sent the task.\n- For content-generation tasks such as daily reports, reminders, morning briefings, and summaries, the final output should be exactly that content. It should not include process language such as \"I will handle this\", \"task sent\", or \"task status summary\".\n- By default, do not ask the executor to call chat plugin send actions again. The system handles final-result delivery.\n- Explicitly require chat plugin actions only for cross-conversation sending, additional CCs, multi-channel notifications, or similar cases.\n\n### Choosing `when` And `status`\n\n- A task is created as `status=enabled` by default. Set `paused` explicitly only when it is still a draft, likely to fail, or needs human confirmation.\n- For verified stable tasks that need automatic execution, use cron with `status=enabled`.\n- For a clear one-time execution, use `time:<ISO time with timezone>`. After execution, the system automatically falls back to `@manual` and `paused`.\n- If the user only wants to save it for later, do not enable scheduling directly.\n\n## Body Templates\n\n### Agent Template\n\n```md\n# Task Goal\n\n- Produce a final result that can be sent directly to the user.\n\n# Background And Input\n\n- Add context, files, links, scope, and assumptions here.\n\n# Execution Steps\n\n1. Understand the task goal and completion criteria.\n2. Collect necessary information and execute the task.\n3. Write user-visible artifacts to an explicit project path when needed.\n4. Output the final result body.\n\n# Output Requirements\n\n- The final assistant message is the final result. Do not include long logs.\n- The final assistant message must output the deliverable itself. Do not output task-management process, sending process, or status reports.\n- Do not use meta language such as \"I will help you...\", \"First, let me...\", or \"sent\".\n- By default, do not call the chat plugin send action again.\n\n# Trigger And Status Recommendation\n\n- Enable by default after creation. If this is only a draft or waiting for human confirmation, set it to `paused`.\n\n# Notes\n\n- Call chat plugin send actions only when cross-conversation or additional notifications are explicitly needed.\n```\n\n### Script Template\n\n```bash\n# Task goal: state in one sentence what the script should do\n# Input dependencies: list environment variables, files, and command dependencies\n# Failure conditions: list cases that should exit 1\n\nset -euo pipefail\n\n# 1. Prepare input\n\n# 2. Execute main logic\n\n# 3. Output final result. This output will be sent directly to the user.\n```\n\n## Recommendations\n\n- Run `list` before `create` or `update`.\n- Keep simple content-generation tasks single-turn by default. Set `review: true` only when you truly need \"draft, review, revise\".\n- Keep script task bodies as pure scripts, without redundant natural-language explanation.\n- If the user only wants to save something for later, create it as `paused`; otherwise keep the default enabled state.\n- The task body must describe what the final result should look like, not only say \"go do this and see\".\n- For content-generation tasks, explicitly require \"the final assistant message can only be the finished content body\" so the executor does not mistake process notes for the final result.\n";
6
6
  export default TEXT_MODULE_CONTENT;
7
7
  //# sourceMappingURL=PROMPT.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PROMPT.d.ts","sourceRoot":"","sources":["../../src/task/PROMPT.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,QAAA,MAAM,mBAAmB,81WAA81W,CAAC;AAEx3W,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"PROMPT.d.ts","sourceRoot":"","sources":["../../src/task/PROMPT.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,QAAA,MAAM,mBAAmB,g8WAAg8W,CAAC;AAE19W,eAAe,mBAAmB,CAAC"}
@@ -3,6 +3,6 @@
3
3
  * 源文件:由同路径 `*.ts.txt` 生成。
4
4
  */
5
5
  // Source: src/task/PROMPT.ts.txt
6
- const TEXT_MODULE_CONTENT = "# Task Plugin\n\nYou can use the `task` plugin to manage task definitions, execution, scheduling, and status control.\n\n## Task Model\n\nEach task is defined in `./.downcity/task/<title>/task.md` and contains:\n- frontmatter for structured fields\n- body for the task instructions\n\nCore frontmatter fields:\n- `title`: unique task identifier\n- `description`: task description\n- `when`: trigger condition, supporting `@manual`, cron, or `time:<ISO8601-with-timezone>`\n- `session_id`: task execution session\n- `status`: `enabled|paused|disabled`\n- `kind`: `agent|script`, defaulting to `agent`\n\nEach execution creates a run directory:\n- `./.downcity/task/<title>/<timestamp>/`\n\nCommon artifacts:\n- `input.md`\n- `output.md`: final output body for this run\n- `result.md`: execution summary\n- `run.json`\n- `run-progress.json`\n- `dialogue.md` / `dialogue.json`: multi-turn agent dialogue\n- `error.md`: failure details\n\n## Execution Kinds\n\n1. `kind=agent`\n- Sends the task body to an agent for execution.\n- Completes in a single turn by default. Simulated multi-turn review is enabled only when frontmatter explicitly sets `review: true`.\n- Suitable for research, analysis, and report generation.\n\n2. `kind=script`\n- Treats the body as a shell script.\n- The body must be non-empty and executable as a script.\n\n## Available Actions\n\n- `list`\n- `create`\n- `run`\n- `delete`\n- `update`\n- `status`\n- `enable`\n- `disable`\n\n## Action Examples\n\n- `plugin_call({ plugin: \"task\", action: \"list\", payload: { status } })`\n- `plugin_call({ plugin: \"task\", action: \"create\", payload: { title, description, session_id, when, kind, status } })`\n- `plugin_call({ plugin: \"task\", action: \"run\", payload: { title, reason } })`\n- `plugin_call({ plugin: \"task\", action: \"update\", payload: { title, description, when, status, session_id } })`\n- `plugin_call({ plugin: \"task\", action: \"delete\", payload: { title } })`\n\n## Key Constraints\n\n- `title` is unique. `create` deduplicates only by exact `title`.\n- After `when=time:...` triggers, the task is automatically set to `paused` and falls back to `when=@manual`.\n- `run` is accepted asynchronously. It returns `accepted=true`, `message`, and `executionId` immediately. Treat this as \"the task has entered background execution; the result will be sent automatically through the chat plugin runtime, and the current flow does not need to block.\"\n- If `run` returns `accepted=true`:\n - Do not manually forward task output to the user again.\n - Do not actively poll the run directory, `run-progress.json`, or `output.md`.\n - Inspect the run directory only when the user explicitly asks to debug, view artifacts, or confirm execution details.\n- Agent tasks only need to produce valid output by default. They should send to an external channel only when the task body explicitly requires it.\n\n## Designing The Task Body\n\n### Recommended Agent Task Structure\n\nThe body should include at least these headings:\n\n```md\n# Task Goal\n\n- What final result this task must deliver.\n\n# Background And Input\n\n- Data sources, scope, constraints, and reference materials.\n\n# Execution Steps\n\n1. What to do first.\n2. What to do next.\n3. Where key intermediate artifacts should be written.\n\n# Output Requirements\n\n- What format the final result must use.\n- Whether a table, JSON, or Markdown is required.\n- What content must not be included.\n\n# Trigger And Status Recommendation\n\n- Why this task is suitable for `@manual`, cron, or `time:...`.\n- Whether it should currently be `paused` or `enabled`.\n\n# Notes\n\n- Risks, boundaries, and things not to do.\n```\n\n### Agent Task Body Writing Constraints\n\n- The task body must read like a delivery contract, so another executor can run it directly without relying on the current chat context.\n- `# Task Goal` must clearly state the final deliverable. Do not write vague goals such as \"take a look\", \"research this\", or \"handle this\".\n- `# Background And Input` must specify sources, scope, objects, time range, and constraints. Do not assume the executor can see the original chat context.\n- `# Execution Steps` should describe the task workflow, not task-management actions. Do not write \"first check whether a task with the same name exists\", \"then create a task\", or \"then trigger the task\".\n- `# Output Requirements` must clearly specify the final artifact's format, structure, tone, length, and excluded content.\n- Explicitly state that the final assistant message will be written directly to `output.md` and sent to the user. Therefore, the final answer must be exactly the deliverable content.\n- Content-generation tasks such as daily reports, reminders, morning briefings, summaries, and reports must explicitly require \"the final output is the deliverable body itself\". Do not let the executor output process notes.\n- If the task result should be sent to the user, the body should require \"output send-ready message content\" instead of asking the executor to explain what it has sent.\n- Unless truly needed, do not ask the executor to repeat the task title, session_id, execution time, status, or other metadata in the body.\n- Constraints in the body must be executable and checkable. Avoid weak phrases such as \"appropriately\", \"as much as possible\", or \"depending on the situation\".\n- Do not put task creation, task update, task status lookup, or same-title existence checks into the body. Those belong to the task plugin, not to the task deliverable.\n\n### Forbidden Agent Task Body Patterns\n\n- Do not write the body in chat-reply style, for example:\n - \"I will help you...\"\n - \"First, let me...\"\n - \"I will check first...\"\n - \"I see there is already a task with the same name...\"\n- Do not write the body as task-management instructions, for example:\n - \"If the task exists, update it; otherwise create it.\"\n - \"First list, then run.\"\n - \"Tell the user that the task has started when done.\"\n- Do not write the body as a status-report template, for example:\n - \"Task status summary\"\n - \"Sent / completed / updated\"\n - \"Current task configuration\"\n- Do not describe only actions without describing the deliverable, for example:\n - \"Go collect some materials.\"\n - \"Generate some content and see.\"\n - \"Report back after finishing.\"\n- Do not use references that depend on the current context, for example:\n - \"Do what was said above.\"\n - \"Continue the previous one.\"\n - \"Send this out.\"\n\n### How To Judge Whether The Body Is Good\n\n- If you can copy the task body alone to another agent and it can still understand the goal, input, steps, and deliverable, the body is valid.\n- If deleting the output section leaves only \"go do something\" style instructions, the body is invalid.\n- If the body looks more like instructions for creating or updating a task than instructions for executing the task, the layering is wrong and the body must be rewritten.\n- If the body naturally encourages the executor to output process notes instead of the final artifact, the `# Output Requirements` section is not strong enough and must add explicit prohibitions.\n\n### Recommended Script Task Structure\n\n- The body must be a pure shell script. Do not mix in explanatory natural language.\n- Start with comments that describe the script's purpose, input dependencies, and failure conditions when possible.\n- Keep output stable so it can be sent directly as the final result.\n- If files need to be generated, write them to the run directory or to an explicit project path.\n\n### Output Design Principles\n\n- When a task completes, the system automatically sends the final result body back to the chat bound to `session_id` through the chat plugin runtime's `send`.\n- The current implementation uses the simplest rule: the final assistant message is treated directly as the final result body and written to `output.md`.\n- Therefore, the \"Output Requirements\" section must be written for the final user, not only for developers.\n- For user-facing agent tasks, the body should require \"the final assistant message directly outputs the deliverable itself\". Do not let the executor explain how it created, checked, updated, triggered, or sent the task.\n- For content-generation tasks such as daily reports, reminders, morning briefings, and summaries, the final output should be exactly that content. It should not include process language such as \"I will handle this\", \"task sent\", or \"task status summary\".\n- By default, do not ask the executor to call chat plugin send actions again. The system handles final-result delivery.\n- Explicitly require chat plugin actions only for cross-conversation sending, additional CCs, multi-channel notifications, or similar cases.\n\n### Choosing `when` And `status`\n\n- A task is created as `status=enabled` by default. Set `paused` explicitly only when it is still a draft, likely to fail, or needs human confirmation.\n- For verified stable tasks that need automatic execution, use cron with `status=enabled`.\n- For a clear one-time execution, use `time:<ISO time with timezone>`. After execution, the system automatically falls back to `@manual` and `paused`.\n- If the user only wants to save it for later, do not enable scheduling directly.\n\n## Body Templates\n\n### Agent Template\n\n```md\n# Task Goal\n\n- Produce a final result that can be sent directly to the user.\n\n# Background And Input\n\n- Add context, files, links, scope, and assumptions here.\n\n# Execution Steps\n\n1. Understand the task goal and completion criteria.\n2. Collect necessary information and execute the task.\n3. Write key intermediate artifacts to the run directory.\n4. Output the final result body.\n\n# Output Requirements\n\n- The final assistant message is the final result. Do not include long logs.\n- The final assistant message must output the deliverable itself. Do not output task-management process, sending process, or status reports.\n- Do not use meta language such as \"I will help you...\", \"First, let me...\", or \"sent\".\n- By default, do not call the chat plugin send action again.\n\n# Trigger And Status Recommendation\n\n- Enable by default after creation. If this is only a draft or waiting for human confirmation, set it to `paused`.\n\n# Notes\n\n- Call chat plugin send actions only when cross-conversation or additional notifications are explicitly needed.\n```\n\n### Script Template\n\n```bash\n# Task goal: state in one sentence what the script should do\n# Input dependencies: list environment variables, files, and command dependencies\n# Failure conditions: list cases that should exit 1\n\nset -euo pipefail\n\n# 1. Prepare input\n\n# 2. Execute main logic\n\n# 3. Output final result. This output will be sent directly to the user.\n```\n\n## Recommendations\n\n- Run `list` before `create` or `update`.\n- Keep simple content-generation tasks single-turn by default. Set `review: true` only when you truly need \"draft, review, revise\".\n- Keep script task bodies as pure scripts, without redundant natural-language explanation.\n- If the user only wants to save something for later, create it as `paused`; otherwise keep the default enabled state.\n- The task body must describe what the final result should look like, not only say \"go do this and see\".\n- For content-generation tasks, explicitly require \"the final assistant message can only be the finished content body\" so the executor does not mistake process notes for the final result.\n";
6
+ const TEXT_MODULE_CONTENT = "# Task Plugin\n\nYou can use the `task` plugin to manage task definitions, execution, scheduling, and status control.\n\n## Task Model\n\nEach task is defined in the current Agent private runtime directory private `task/<title>/task.md` and contains:\n- frontmatter for structured fields\n- body for the task instructions\n\nCore frontmatter fields:\n- `title`: unique task identifier\n- `description`: task description\n- `when`: trigger condition, supporting `@manual`, cron, or `time:<ISO8601-with-timezone>`\n- `session_id`: task execution session\n- `status`: `enabled|paused|disabled`\n- `kind`: `agent|script`, defaulting to `agent`\n\nEach execution creates a private run record managed by Downcity under the current Agent private runtime directory.\n\nCommon artifacts:\n- `input.md`\n- `output.md`: final output body for this run\n- `result.md`: execution summary\n- `run.json`\n- `run-progress.json`\n- `dialogue.md` / `dialogue.json`: multi-turn agent dialogue\n- `error.md`: failure details\n\n## Execution Kinds\n\n1. `kind=agent`\n- Sends the task body to an agent for execution.\n- Completes in a single turn by default. Simulated multi-turn review is enabled only when frontmatter explicitly sets `review: true`.\n- Suitable for research, analysis, and report generation.\n\n2. `kind=script`\n- Treats the body as a shell script.\n- The body must be non-empty and executable as a script.\n\n## Available Actions\n\n- `list`\n- `create`\n- `run`\n- `delete`\n- `update`\n- `status`\n- `enable`\n- `disable`\n\n## Action Examples\n\n- `plugin_call({ plugin: \"task\", action: \"list\", payload: { status } })`\n- `plugin_call({ plugin: \"task\", action: \"create\", payload: { title, description, session_id, when, kind, status } })`\n- `plugin_call({ plugin: \"task\", action: \"run\", payload: { title, reason } })`\n- `plugin_call({ plugin: \"task\", action: \"update\", payload: { title, description, when, status, session_id } })`\n- `plugin_call({ plugin: \"task\", action: \"delete\", payload: { title } })`\n\n## Key Constraints\n\n- `title` is unique. `create` deduplicates only by exact `title`.\n- After `when=time:...` triggers, the task is automatically set to `paused` and falls back to `when=@manual`.\n- `run` is accepted asynchronously. It returns `accepted=true`, `message`, and `executionId` immediately. Treat this as \"the task has entered background execution; the result will be sent automatically through the chat plugin runtime, and the current flow does not need to block.\"\n- If `run` returns `accepted=true`:\n - Do not manually forward task output to the user again.\n - Do not actively poll the run directory, `run-progress.json`, or `output.md`.\n - Inspect run details through the task/control API only when the user explicitly asks to debug, view artifacts, or confirm execution details.\n- Agent tasks only need to produce valid output by default. They should send to an external channel only when the task body explicitly requires it.\n\n## Designing The Task Body\n\n### Recommended Agent Task Structure\n\nThe body should include at least these headings:\n\n```md\n# Task Goal\n\n- What final result this task must deliver.\n\n# Background And Input\n\n- Data sources, scope, constraints, and reference materials.\n\n# Execution Steps\n\n1. What to do first.\n2. What to do next.\n3. Where key intermediate artifacts should be written.\n\n# Output Requirements\n\n- What format the final result must use.\n- Whether a table, JSON, or Markdown is required.\n- What content must not be included.\n\n# Trigger And Status Recommendation\n\n- Why this task is suitable for `@manual`, cron, or `time:...`.\n- Whether it should currently be `paused` or `enabled`.\n\n# Notes\n\n- Risks, boundaries, and things not to do.\n```\n\n### Agent Task Body Writing Constraints\n\n- The task body must read like a delivery contract, so another executor can run it directly without relying on the current chat context.\n- `# Task Goal` must clearly state the final deliverable. Do not write vague goals such as \"take a look\", \"research this\", or \"handle this\".\n- `# Background And Input` must specify sources, scope, objects, time range, and constraints. Do not assume the executor can see the original chat context.\n- `# Execution Steps` should describe the task workflow, not task-management actions. Do not write \"first check whether a task with the same name exists\", \"then create a task\", or \"then trigger the task\".\n- `# Output Requirements` must clearly specify the final artifact's format, structure, tone, length, and excluded content.\n- Explicitly state that the final assistant message will be written directly to `output.md` and sent to the user. Therefore, the final answer must be exactly the deliverable content.\n- Content-generation tasks such as daily reports, reminders, morning briefings, summaries, and reports must explicitly require \"the final output is the deliverable body itself\". Do not let the executor output process notes.\n- If the task result should be sent to the user, the body should require \"output send-ready message content\" instead of asking the executor to explain what it has sent.\n- Unless truly needed, do not ask the executor to repeat the task title, session_id, execution time, status, or other metadata in the body.\n- Constraints in the body must be executable and checkable. Avoid weak phrases such as \"appropriately\", \"as much as possible\", or \"depending on the situation\".\n- Do not put task creation, task update, task status lookup, or same-title existence checks into the body. Those belong to the task plugin, not to the task deliverable.\n\n### Forbidden Agent Task Body Patterns\n\n- Do not write the body in chat-reply style, for example:\n - \"I will help you...\"\n - \"First, let me...\"\n - \"I will check first...\"\n - \"I see there is already a task with the same name...\"\n- Do not write the body as task-management instructions, for example:\n - \"If the task exists, update it; otherwise create it.\"\n - \"First list, then run.\"\n - \"Tell the user that the task has started when done.\"\n- Do not write the body as a status-report template, for example:\n - \"Task status summary\"\n - \"Sent / completed / updated\"\n - \"Current task configuration\"\n- Do not describe only actions without describing the deliverable, for example:\n - \"Go collect some materials.\"\n - \"Generate some content and see.\"\n - \"Report back after finishing.\"\n- Do not use references that depend on the current context, for example:\n - \"Do what was said above.\"\n - \"Continue the previous one.\"\n - \"Send this out.\"\n\n### How To Judge Whether The Body Is Good\n\n- If you can copy the task body alone to another agent and it can still understand the goal, input, steps, and deliverable, the body is valid.\n- If deleting the output section leaves only \"go do something\" style instructions, the body is invalid.\n- If the body looks more like instructions for creating or updating a task than instructions for executing the task, the layering is wrong and the body must be rewritten.\n- If the body naturally encourages the executor to output process notes instead of the final artifact, the `# Output Requirements` section is not strong enough and must add explicit prohibitions.\n\n### Recommended Script Task Structure\n\n- The body must be a pure shell script. Do not mix in explanatory natural language.\n- Start with comments that describe the script's purpose, input dependencies, and failure conditions when possible.\n- Keep output stable so it can be sent directly as the final result.\n- If files need to be delivered to the user, write them to an explicit project path.\n\n### Output Design Principles\n\n- When a task completes, the system automatically sends the final result body back to the chat bound to `session_id` through the chat plugin runtime's `send`.\n- The current implementation uses the simplest rule: the final assistant message is treated directly as the final result body and written to `output.md`.\n- Therefore, the \"Output Requirements\" section must be written for the final user, not only for developers.\n- For user-facing agent tasks, the body should require \"the final assistant message directly outputs the deliverable itself\". Do not let the executor explain how it created, checked, updated, triggered, or sent the task.\n- For content-generation tasks such as daily reports, reminders, morning briefings, and summaries, the final output should be exactly that content. It should not include process language such as \"I will handle this\", \"task sent\", or \"task status summary\".\n- By default, do not ask the executor to call chat plugin send actions again. The system handles final-result delivery.\n- Explicitly require chat plugin actions only for cross-conversation sending, additional CCs, multi-channel notifications, or similar cases.\n\n### Choosing `when` And `status`\n\n- A task is created as `status=enabled` by default. Set `paused` explicitly only when it is still a draft, likely to fail, or needs human confirmation.\n- For verified stable tasks that need automatic execution, use cron with `status=enabled`.\n- For a clear one-time execution, use `time:<ISO time with timezone>`. After execution, the system automatically falls back to `@manual` and `paused`.\n- If the user only wants to save it for later, do not enable scheduling directly.\n\n## Body Templates\n\n### Agent Template\n\n```md\n# Task Goal\n\n- Produce a final result that can be sent directly to the user.\n\n# Background And Input\n\n- Add context, files, links, scope, and assumptions here.\n\n# Execution Steps\n\n1. Understand the task goal and completion criteria.\n2. Collect necessary information and execute the task.\n3. Write user-visible artifacts to an explicit project path when needed.\n4. Output the final result body.\n\n# Output Requirements\n\n- The final assistant message is the final result. Do not include long logs.\n- The final assistant message must output the deliverable itself. Do not output task-management process, sending process, or status reports.\n- Do not use meta language such as \"I will help you...\", \"First, let me...\", or \"sent\".\n- By default, do not call the chat plugin send action again.\n\n# Trigger And Status Recommendation\n\n- Enable by default after creation. If this is only a draft or waiting for human confirmation, set it to `paused`.\n\n# Notes\n\n- Call chat plugin send actions only when cross-conversation or additional notifications are explicitly needed.\n```\n\n### Script Template\n\n```bash\n# Task goal: state in one sentence what the script should do\n# Input dependencies: list environment variables, files, and command dependencies\n# Failure conditions: list cases that should exit 1\n\nset -euo pipefail\n\n# 1. Prepare input\n\n# 2. Execute main logic\n\n# 3. Output final result. This output will be sent directly to the user.\n```\n\n## Recommendations\n\n- Run `list` before `create` or `update`.\n- Keep simple content-generation tasks single-turn by default. Set `review: true` only when you truly need \"draft, review, revise\".\n- Keep script task bodies as pure scripts, without redundant natural-language explanation.\n- If the user only wants to save something for later, create it as `paused`; otherwise keep the default enabled state.\n- The task body must describe what the final result should look like, not only say \"go do this and see\".\n- For content-generation tasks, explicitly require \"the final assistant message can only be the finished content body\" so the executor does not mistake process notes for the final result.\n";
7
7
  export default TEXT_MODULE_CONTENT;
8
8
  //# sourceMappingURL=PROMPT.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PROMPT.js","sourceRoot":"","sources":["../../src/task/PROMPT.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,iCAAiC;AACjC,MAAM,mBAAmB,GAAG,21WAA21W,CAAC;AAEx3W,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"PROMPT.js","sourceRoot":"","sources":["../../src/task/PROMPT.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,iCAAiC;AACjC,MAAM,mBAAmB,GAAG,67WAA67W,CAAC;AAE19W,eAAe,mBAAmB,CAAC"}
@@ -15,7 +15,7 @@ function formatTaskLogMessage(message) {
15
15
  export async function registerTaskCronJobs(params) {
16
16
  const context = params.context;
17
17
  const logger = context.logger;
18
- const tasks = await listTasks(context.workspace_path);
18
+ const tasks = await listTasks(context.data_path);
19
19
  const runtimeTimezone = params.timezone;
20
20
  let jobsScheduled = 0;
21
21
  for (const item of tasks) {
@@ -26,7 +26,7 @@ export async function registerTaskCronJobs(params) {
26
26
  try {
27
27
  const task = await readTask({
28
28
  taskId: item.taskId,
29
- project_root: context.workspace_path,
29
+ data_path: context.data_path,
30
30
  });
31
31
  latestWhen = task.frontmatter.when;
32
32
  }
@@ -54,7 +54,7 @@ export async function registerTaskCronJobs(params) {
54
54
  // 关键点(中文):触发瞬间复查最新 task.md,避免 status/when 变更后仍沿用旧注册状态。
55
55
  const latest = await readTask({
56
56
  taskId,
57
- project_root: context.workspace_path,
57
+ data_path: context.data_path,
58
58
  });
59
59
  if (String(latest.frontmatter.status).toLowerCase() !== "enabled") {
60
60
  return;
@@ -66,7 +66,7 @@ export async function registerTaskCronJobs(params) {
66
66
  const result = await runTaskNow({
67
67
  context,
68
68
  taskId,
69
- project_root: context.workspace_path,
69
+ data_path: context.data_path,
70
70
  trigger: { type: "cron" },
71
71
  });
72
72
  void logger.log("info", formatTaskLogMessage("Task run finished"), {
@@ -140,7 +140,7 @@ export async function registerTaskCronJobs(params) {
140
140
  try {
141
141
  const latest = await readTask({
142
142
  taskId,
143
- project_root: context.workspace_path,
143
+ data_path: context.data_path,
144
144
  });
145
145
  if (String(latest.frontmatter.status).toLowerCase() !== "enabled")
146
146
  return;
@@ -153,7 +153,7 @@ export async function registerTaskCronJobs(params) {
153
153
  const result = await runTaskNow({
154
154
  context,
155
155
  taskId,
156
- project_root: context.workspace_path,
156
+ data_path: context.data_path,
157
157
  trigger: { type: "time" },
158
158
  });
159
159
  void logger.log("info", formatTaskLogMessage("Task run finished"), {
@@ -183,10 +183,10 @@ export async function registerTaskCronJobs(params) {
183
183
  try {
184
184
  const latest = await readTask({
185
185
  taskId,
186
- project_root: context.workspace_path,
186
+ data_path: context.data_path,
187
187
  });
188
188
  await writeTask({
189
- project_root: context.workspace_path,
189
+ data_path: context.data_path,
190
190
  taskId,
191
191
  overwrite: true,
192
192
  frontmatter: {
@@ -1 +1 @@
1
- {"version":3,"file":"Scheduler.js","sourceRoot":"","sources":["../../src/task/Scheduler.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,gBAAgB,EAChB,6BAA6B,EAC7B,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEjC,SAA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;YAEH,aAAa,IAAI,CAAC,CAAC;QACrB,CAAC;QAAC,MAAM,CAAC;YACP,KAAK,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,wCAAwC,CAAC,EAAE;gBACtF,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,IAAI,EAAE,UAAU;aACjB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO;QACL,UAAU,EAAE,KAAK,CAAC,MAAM;QACxB,aAAa;KACd,CAAC;AACJ,CAAC"}
@@ -11,7 +11,6 @@ import type { PluginActions } from "@downcity/agent";
11
11
  import type { PluginContext } from "@downcity/agent";
12
12
  import type { TaskCronRegisterResult } from "../task/types/TaskPluginTypes.js";
13
13
  import type { TaskPluginOptions } from "../task/types/TaskPluginOptions.js";
14
- import { TaskCronTriggerEngine } from "../task/runtime/CronTrigger.js";
15
14
  /**
16
15
  * task plugin 类实现。
17
16
  */
@@ -23,7 +22,7 @@ export declare class TaskPlugin extends BasePlugin {
23
22
  /**
24
23
  * task plugin 的 system 文本提供器。
25
24
  */
26
- readonly system: () => string;
25
+ readonly system: (context: PluginContext) => Promise<string>;
27
26
  /**
28
27
  * task plugin 的 action 定义表。
29
28
  */
@@ -39,28 +38,22 @@ export declare class TaskPlugin extends BasePlugin {
39
38
  * - 这是 per-plugin-instance 的长期运行态。
40
39
  * - 不再复用 module-global 单例。
41
40
  */
42
- cronEngine: TaskCronTriggerEngine | null;
43
- /**
44
- * 当前实例持有的运行中 task 锁。
45
- *
46
- * 关键点(中文)
47
- * - scheduler reload 会替换 cron engine。
48
- * - 锁必须挂在 plugin 实例上,避免 reload 后同一 task 被新旧调度器并发触发。
49
- */
50
- private readonly runningTaskIds;
41
+ private readonly runtimes_by_workspace;
42
+ /** 各 Workspace 当前唯一的 cron 启动流程。 */
43
+ private readonly starts_by_workspace;
51
44
  constructor(options?: TaskPluginOptions);
52
45
  /**
53
46
  * 启动当前实例的 cron runtime。
54
47
  */
55
- startCronRuntime(context: PluginContext): Promise<TaskCronRegisterResult | null>;
48
+ start_cron_runtime(context: PluginContext): Promise<TaskCronRegisterResult | null>;
56
49
  /**
57
50
  * 停止当前实例的 cron runtime。
58
51
  */
59
- stopCronRuntime(): Promise<boolean>;
52
+ stop_cron_runtime(workspace_id: string): Promise<boolean>;
60
53
  /**
61
54
  * 重启当前实例的 cron runtime。
62
55
  */
63
- restartCronRuntime(context: PluginContext): Promise<TaskCronRegisterResult>;
56
+ restart_cron_runtime(context: PluginContext): Promise<TaskCronRegisterResult>;
64
57
  /**
65
58
  * 任务定义变更后重载 scheduler。
66
59
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TaskPlugin.d.ts","sourceRoot":"","sources":["../../src/task/TaskPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAiB,MAAM,iBAAiB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EACV,sBAAsB,EAEvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAiBtE;;GAEG;AACH,qBAAa,UAAW,SAAQ,UAAU;IACxC;;OAEG;IACH,QAAQ,CAAC,IAAI,UAAU;IAEvB;;OAEG;IACH,QAAQ,CAAC,MAAM,QAAO,MAAM,CAAuB;IAEnD;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAEhC;;OAEG;IACH,SAAgB,OAAO,EAAE,iBAAiB,CAAC;IAE3C;;;;;;OAMG;IACI,UAAU,EAAE,qBAAqB,GAAG,IAAI,CAAQ;IAEvD;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAqB;gBAExC,OAAO,CAA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