@downcity/agent 1.1.207 → 1.1.210

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 (292) hide show
  1. package/bin/agent/local/Agent.d.ts +3 -3
  2. package/bin/agent/local/Agent.d.ts.map +1 -1
  3. package/bin/agent/local/Agent.js +0 -3
  4. package/bin/agent/local/Agent.js.map +1 -1
  5. package/bin/agent/local/AgentInstructions.d.ts +2 -1
  6. package/bin/agent/local/AgentInstructions.d.ts.map +1 -1
  7. package/bin/agent/local/AgentInstructions.js +10 -10
  8. package/bin/agent/local/AgentInstructions.js.map +1 -1
  9. package/bin/agent/local/services/AgentAssemblyService.d.ts +3 -8
  10. package/bin/agent/local/services/AgentAssemblyService.d.ts.map +1 -1
  11. package/bin/agent/local/services/AgentAssemblyService.js +0 -1
  12. package/bin/agent/local/services/AgentAssemblyService.js.map +1 -1
  13. package/bin/agent/local/services/AgentSessions.d.ts +5 -7
  14. package/bin/agent/local/services/AgentSessions.d.ts.map +1 -1
  15. package/bin/agent/local/services/AgentSessions.js +2 -3
  16. package/bin/agent/local/services/AgentSessions.js.map +1 -1
  17. package/bin/agent/remote/RemoteAgent.d.ts +3 -1
  18. package/bin/agent/remote/RemoteAgent.d.ts.map +1 -1
  19. package/bin/agent/remote/RemoteAgent.js.map +1 -1
  20. package/bin/agent/remote/RemoteSession.d.ts +10 -1
  21. package/bin/agent/remote/RemoteSession.d.ts.map +1 -1
  22. package/bin/agent/remote/RemoteSession.js +18 -0
  23. package/bin/agent/remote/RemoteSession.js.map +1 -1
  24. package/bin/agent/remote/RemoteTransport.d.ts +5 -1
  25. package/bin/agent/remote/RemoteTransport.d.ts.map +1 -1
  26. package/bin/agent/remote/transports/HttpRemoteAgentTransport.d.ts +4 -1
  27. package/bin/agent/remote/transports/HttpRemoteAgentTransport.d.ts.map +1 -1
  28. package/bin/agent/remote/transports/HttpRemoteAgentTransport.js +7 -0
  29. package/bin/agent/remote/transports/HttpRemoteAgentTransport.js.map +1 -1
  30. package/bin/agent/remote/transports/RpcRemoteAgentTransport.d.ts +4 -1
  31. package/bin/agent/remote/transports/RpcRemoteAgentTransport.d.ts.map +1 -1
  32. package/bin/agent/remote/transports/RpcRemoteAgentTransport.js +1 -0
  33. package/bin/agent/remote/transports/RpcRemoteAgentTransport.js.map +1 -1
  34. package/bin/executor/Executor.d.ts +0 -16
  35. package/bin/executor/Executor.d.ts.map +1 -1
  36. package/bin/executor/Executor.js +0 -16
  37. package/bin/executor/Executor.js.map +1 -1
  38. package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.d.ts +1 -3
  39. package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.d.ts.map +1 -1
  40. package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.js +1 -5
  41. package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.js.map +1 -1
  42. package/bin/executor/composer/history/SessionHistoryWriter.d.ts +0 -10
  43. package/bin/executor/composer/history/SessionHistoryWriter.d.ts.map +1 -1
  44. package/bin/executor/composer/history/SessionHistoryWriter.js +31 -61
  45. package/bin/executor/composer/history/SessionHistoryWriter.js.map +1 -1
  46. package/bin/executor/composer/system/default/StaticPromptCatalog.d.ts +4 -0
  47. package/bin/executor/composer/system/default/StaticPromptCatalog.d.ts.map +1 -1
  48. package/bin/executor/composer/system/default/StaticPromptCatalog.js +4 -0
  49. package/bin/executor/composer/system/default/StaticPromptCatalog.js.map +1 -1
  50. package/bin/executor/composer/system/default/SystemDomain.d.ts +1 -1
  51. package/bin/executor/composer/system/default/SystemDomain.d.ts.map +1 -1
  52. package/bin/executor/composer/system/default/SystemDomain.js +2 -7
  53. package/bin/executor/composer/system/default/SystemDomain.js.map +1 -1
  54. package/bin/executor/composer/system/default/SystemPromptAssets.d.ts +0 -4
  55. package/bin/executor/composer/system/default/SystemPromptAssets.d.ts.map +1 -1
  56. package/bin/executor/composer/system/default/SystemPromptAssets.js +0 -5
  57. package/bin/executor/composer/system/default/SystemPromptAssets.js.map +1 -1
  58. package/bin/executor/composer/system/default/assets/core.prompt.d.ts +1 -1
  59. package/bin/executor/composer/system/default/assets/core.prompt.d.ts.map +1 -1
  60. package/bin/executor/composer/system/default/assets/core.prompt.js +1 -1
  61. package/bin/executor/composer/system/default/assets/core.prompt.js.map +1 -1
  62. package/bin/executor/messages/AssistantFileResource.d.ts.map +1 -1
  63. package/bin/executor/messages/AssistantFileResource.js +58 -15
  64. package/bin/executor/messages/AssistantFileResource.js.map +1 -1
  65. package/bin/executor/services/ExecutorInflightService.d.ts +0 -5
  66. package/bin/executor/services/ExecutorInflightService.d.ts.map +1 -1
  67. package/bin/executor/services/ExecutorInflightService.js +0 -6
  68. package/bin/executor/services/ExecutorInflightService.js.map +1 -1
  69. package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.d.ts +4 -0
  70. package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.d.ts.map +1 -1
  71. package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.js +115 -3
  72. package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.js.map +1 -1
  73. package/bin/executor/types/SessionHistoryMeta.d.ts +6 -0
  74. package/bin/executor/types/SessionHistoryMeta.d.ts.map +1 -1
  75. package/bin/index.d.ts +38 -6
  76. package/bin/index.d.ts.map +1 -1
  77. package/bin/index.js +14 -1
  78. package/bin/index.js.map +1 -1
  79. package/bin/plugin/core/ActionScheduleExecutor.js +1 -1
  80. package/bin/plugin/core/ActionScheduleExecutor.js.map +1 -1
  81. package/bin/plugin/core/BasePlugin.d.ts +7 -9
  82. package/bin/plugin/core/BasePlugin.d.ts.map +1 -1
  83. package/bin/plugin/core/BasePlugin.js +1 -14
  84. package/bin/plugin/core/BasePlugin.js.map +1 -1
  85. package/bin/plugin/core/HookRegistry.d.ts +1 -1
  86. package/bin/plugin/core/HookRegistry.d.ts.map +1 -1
  87. package/bin/plugin/core/PluginActionFactory.d.ts +1 -5
  88. package/bin/plugin/core/PluginActionFactory.d.ts.map +1 -1
  89. package/bin/plugin/core/PluginActionFactory.js +0 -3
  90. package/bin/plugin/core/PluginActionFactory.js.map +1 -1
  91. package/bin/plugin/core/PluginActionRunner.d.ts +6 -4
  92. package/bin/plugin/core/PluginActionRunner.d.ts.map +1 -1
  93. package/bin/plugin/core/PluginActionRunner.js +2 -2
  94. package/bin/plugin/core/PluginActionRunner.js.map +1 -1
  95. package/bin/plugin/core/PluginCatalog.d.ts +2 -1
  96. package/bin/plugin/core/PluginCatalog.d.ts.map +1 -1
  97. package/bin/plugin/core/PluginCatalog.js.map +1 -1
  98. package/bin/plugin/core/PluginCommand.d.ts +1 -1
  99. package/bin/plugin/core/PluginCommand.d.ts.map +1 -1
  100. package/bin/plugin/core/PluginCommand.js.map +1 -1
  101. package/bin/plugin/core/PluginHttpRoutes.d.ts +1 -1
  102. package/bin/plugin/core/PluginHttpRoutes.d.ts.map +1 -1
  103. package/bin/plugin/core/PluginLocalExecution.d.ts +4 -1
  104. package/bin/plugin/core/PluginLocalExecution.d.ts.map +1 -1
  105. package/bin/plugin/core/PluginLocalExecution.js +0 -1
  106. package/bin/plugin/core/PluginLocalExecution.js.map +1 -1
  107. package/bin/plugin/core/PluginRegistry.d.ts +4 -2
  108. package/bin/plugin/core/PluginRegistry.d.ts.map +1 -1
  109. package/bin/plugin/core/PluginRegistry.js +7 -6
  110. package/bin/plugin/core/PluginRegistry.js.map +1 -1
  111. package/bin/plugin/core/PluginStateController.d.ts +7 -27
  112. package/bin/plugin/core/PluginStateController.d.ts.map +1 -1
  113. package/bin/plugin/core/PluginStateController.js +5 -39
  114. package/bin/plugin/core/PluginStateController.js.map +1 -1
  115. package/bin/plugin/types/PluginApi.d.ts +3 -79
  116. package/bin/plugin/types/PluginApi.d.ts.map +1 -1
  117. package/bin/rpc/Client.d.ts +11 -6
  118. package/bin/rpc/Client.d.ts.map +1 -1
  119. package/bin/rpc/Client.js +2 -0
  120. package/bin/rpc/Client.js.map +1 -1
  121. package/bin/session/Session.d.ts +2 -5
  122. package/bin/session/Session.d.ts.map +1 -1
  123. package/bin/session/Session.js +3 -16
  124. package/bin/session/Session.js.map +1 -1
  125. package/bin/session/SessionSystemBuilder.d.ts +1 -1
  126. package/bin/session/SessionSystemBuilder.d.ts.map +1 -1
  127. package/bin/session/browse/Browse.d.ts +4 -6
  128. package/bin/session/browse/Browse.d.ts.map +1 -1
  129. package/bin/session/browse/Browse.js +71 -71
  130. package/bin/session/browse/Browse.js.map +1 -1
  131. package/bin/session/preview/SessionMessagePreview.d.ts +13 -0
  132. package/bin/session/preview/SessionMessagePreview.d.ts.map +1 -0
  133. package/bin/session/preview/SessionMessagePreview.js +61 -0
  134. package/bin/session/preview/SessionMessagePreview.js.map +1 -0
  135. package/bin/session/services/SessionStateService.d.ts +1 -1
  136. package/bin/session/services/SessionStateService.d.ts.map +1 -1
  137. package/bin/session/services/SessionStateService.js +2 -2
  138. package/bin/session/services/SessionStateService.js.map +1 -1
  139. package/bin/session/services/SessionViewService.d.ts +2 -1
  140. package/bin/session/services/SessionViewService.d.ts.map +1 -1
  141. package/bin/session/services/SessionViewService.js +4 -1
  142. package/bin/session/services/SessionViewService.js.map +1 -1
  143. package/bin/session/storage/Metadata.d.ts.map +1 -1
  144. package/bin/session/storage/Metadata.js +23 -0
  145. package/bin/session/storage/Metadata.js.map +1 -1
  146. package/bin/session/storage/Persistence.d.ts +1 -1
  147. package/bin/session/storage/Persistence.d.ts.map +1 -1
  148. package/bin/session/storage/RuntimeSessionPort.d.ts +0 -12
  149. package/bin/session/storage/RuntimeSessionPort.d.ts.map +1 -1
  150. package/bin/session/storage/RuntimeSessionPort.js +0 -8
  151. package/bin/session/storage/RuntimeSessionPort.js.map +1 -1
  152. package/bin/types/plugin/PluginAction.d.ts +0 -10
  153. package/bin/types/plugin/PluginAction.d.ts.map +1 -1
  154. package/bin/types/plugin/PluginCommand.d.ts +2 -3
  155. package/bin/types/plugin/PluginCommand.d.ts.map +1 -1
  156. package/bin/types/plugin/PluginControl.d.ts +74 -0
  157. package/bin/types/plugin/PluginControl.d.ts.map +1 -0
  158. package/bin/types/plugin/PluginControl.js +9 -0
  159. package/bin/types/plugin/PluginControl.js.map +1 -0
  160. package/bin/types/plugin/PluginDefinition.d.ts +1 -1
  161. package/bin/types/plugin/PluginDefinition.d.ts.map +1 -1
  162. package/bin/types/plugin/PluginRuntime.d.ts +1 -3
  163. package/bin/types/plugin/PluginRuntime.d.ts.map +1 -1
  164. package/bin/types/plugin/PluginState.d.ts +3 -16
  165. package/bin/types/plugin/PluginState.d.ts.map +1 -1
  166. package/bin/types/rpc/RpcProtocol.d.ts +3 -3
  167. package/bin/types/rpc/RpcProtocol.d.ts.map +1 -1
  168. package/bin/types/runtime/agent/AgentContext.d.ts +1 -9
  169. package/bin/types/runtime/agent/AgentContext.d.ts.map +1 -1
  170. package/bin/types/runtime/agent/AgentContext.js.map +1 -1
  171. package/bin/types/session/SessionLocalState.d.ts +1 -1
  172. package/bin/types/session/SessionLocalState.d.ts.map +1 -1
  173. package/package.json +4 -7
  174. package/scripts/agent-ready.test.mjs +38 -0
  175. package/scripts/assistant-file-resource.test.mjs +39 -0
  176. package/scripts/city-model-tool-loop.test.mjs +18 -30
  177. package/scripts/image-plugin-job.test.mjs +13 -13
  178. package/scripts/plugin-tool-bridge.test.mjs +2 -3
  179. package/scripts/remote-session-reconnect.test.mjs +67 -0
  180. package/scripts/session-history-writer-error.test.mjs +57 -0
  181. package/scripts/session-list-title.test.mjs +114 -23
  182. package/scripts/session-system-blocks.test.mjs +73 -0
  183. package/src/agent/local/Agent.ts +4 -10
  184. package/src/agent/local/AgentInstructions.ts +11 -11
  185. package/src/agent/local/services/AgentAssemblyService.ts +3 -9
  186. package/src/agent/local/services/AgentSessions.ts +8 -15
  187. package/src/agent/remote/RemoteAgent.ts +5 -4
  188. package/src/agent/remote/RemoteSession.ts +21 -2
  189. package/src/agent/remote/RemoteTransport.ts +6 -2
  190. package/src/agent/remote/transports/HttpRemoteAgentTransport.ts +13 -3
  191. package/src/agent/remote/transports/RpcRemoteAgentTransport.ts +6 -2
  192. package/src/executor/Executor.ts +0 -23
  193. package/src/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.ts +2 -8
  194. package/src/executor/composer/history/SessionHistoryWriter.ts +33 -64
  195. package/src/executor/composer/system/default/StaticPromptCatalog.ts +4 -0
  196. package/src/executor/composer/system/default/SystemDomain.ts +1 -9
  197. package/src/executor/composer/system/default/SystemPromptAssets.ts +0 -6
  198. package/src/executor/composer/system/default/assets/core.prompt.ts +1 -1
  199. package/src/executor/composer/system/default/assets/core.prompt.ts.txt +37 -15
  200. package/src/executor/messages/AssistantFileResource.ts +61 -17
  201. package/src/executor/services/ExecutorInflightService.ts +0 -10
  202. package/src/executor/store/history/jsonl/JsonlSessionHistoryStore.ts +130 -4
  203. package/src/executor/types/SessionHistoryMeta.ts +6 -0
  204. package/src/index.ts +100 -29
  205. package/src/plugin/core/ActionScheduleExecutor.ts +1 -1
  206. package/src/plugin/core/BasePlugin.ts +8 -22
  207. package/src/plugin/core/HookRegistry.ts +1 -1
  208. package/src/plugin/core/PluginActionFactory.ts +1 -8
  209. package/src/plugin/core/PluginActionRunner.ts +8 -11
  210. package/src/plugin/core/PluginCatalog.ts +2 -5
  211. package/src/plugin/core/PluginCommand.ts +2 -1
  212. package/src/plugin/core/PluginHttpRoutes.ts +1 -1
  213. package/src/plugin/core/PluginLocalExecution.ts +4 -7
  214. package/src/plugin/core/PluginRegistry.ts +10 -10
  215. package/src/plugin/core/PluginStateController.ts +12 -60
  216. package/src/plugin/types/PluginApi.ts +6 -81
  217. package/src/rpc/Client.ts +22 -16
  218. package/src/session/Session.ts +5 -21
  219. package/src/session/SessionSystemBuilder.ts +1 -1
  220. package/src/session/browse/Browse.ts +103 -84
  221. package/src/session/preview/SessionMessagePreview.ts +75 -0
  222. package/src/session/services/SessionStateService.ts +3 -4
  223. package/src/session/services/SessionViewService.ts +6 -6
  224. package/src/session/storage/Metadata.ts +26 -0
  225. package/src/session/storage/Persistence.ts +1 -1
  226. package/src/session/storage/RuntimeSessionPort.ts +0 -20
  227. package/src/types/plugin/PluginAction.ts +0 -10
  228. package/src/types/plugin/PluginCommand.ts +2 -3
  229. package/src/types/plugin/PluginControl.ts +80 -0
  230. package/src/types/plugin/PluginDefinition.ts +1 -1
  231. package/src/types/plugin/PluginRuntime.ts +1 -3
  232. package/src/types/plugin/PluginState.ts +3 -20
  233. package/src/types/rpc/RpcProtocol.ts +4 -4
  234. package/src/types/runtime/agent/AgentContext.ts +1 -9
  235. package/src/types/session/SessionLocalState.ts +1 -1
  236. package/tsconfig.tsbuildinfo +1 -1
  237. package/bin/config/DowncitySchema.d.ts +0 -20
  238. package/bin/config/DowncitySchema.d.ts.map +0 -1
  239. package/bin/config/DowncitySchema.js +0 -160
  240. package/bin/config/DowncitySchema.js.map +0 -1
  241. package/bin/executor/composer/system/default/assets/plugin.prompt.d.ts +0 -7
  242. package/bin/executor/composer/system/default/assets/plugin.prompt.d.ts.map +0 -1
  243. package/bin/executor/composer/system/default/assets/plugin.prompt.js +0 -8
  244. package/bin/executor/composer/system/default/assets/plugin.prompt.js.map +0 -1
  245. package/bin/plugin/core/Activation.d.ts +0 -18
  246. package/bin/plugin/core/Activation.d.ts.map +0 -1
  247. package/bin/plugin/core/Activation.js +0 -21
  248. package/bin/plugin/core/Activation.js.map +0 -1
  249. package/bin/plugin/core/Manager.d.ts +0 -7
  250. package/bin/plugin/core/Manager.d.ts.map +0 -1
  251. package/bin/plugin/core/Manager.js +0 -6
  252. package/bin/plugin/core/Manager.js.map +0 -1
  253. package/bin/plugin/types/Plugin.d.ts +0 -15
  254. package/bin/plugin/types/Plugin.d.ts.map +0 -1
  255. package/bin/plugin/types/Plugin.js +0 -9
  256. package/bin/plugin/types/Plugin.js.map +0 -1
  257. package/bin/plugin/types/PluginLifecycle.d.ts +0 -34
  258. package/bin/plugin/types/PluginLifecycle.d.ts.map +0 -1
  259. package/bin/plugin/types/PluginLifecycle.js +0 -9
  260. package/bin/plugin/types/PluginLifecycle.js.map +0 -1
  261. package/bin/plugin/types/PluginState.d.ts +0 -5
  262. package/bin/plugin/types/PluginState.d.ts.map +0 -1
  263. package/bin/plugin/types/PluginState.js +0 -5
  264. package/bin/plugin/types/PluginState.js.map +0 -1
  265. package/bin/plugin/types/Plugins.d.ts +0 -61
  266. package/bin/plugin/types/Plugins.d.ts.map +0 -1
  267. package/bin/plugin/types/Plugins.js +0 -5
  268. package/bin/plugin/types/Plugins.js.map +0 -1
  269. package/bin/session/index.d.ts +0 -15
  270. package/bin/session/index.d.ts.map +0 -1
  271. package/bin/session/index.js +0 -15
  272. package/bin/session/index.js.map +0 -1
  273. package/bin/types/agent/AgentTypes.d.ts +0 -18
  274. package/bin/types/agent/AgentTypes.d.ts.map +0 -1
  275. package/bin/types/agent/AgentTypes.js +0 -10
  276. package/bin/types/agent/AgentTypes.js.map +0 -1
  277. package/bin/utils/logger/Format.d.ts +0 -11
  278. package/bin/utils/logger/Format.d.ts.map +0 -1
  279. package/bin/utils/logger/Format.js +0 -10
  280. package/bin/utils/logger/Format.js.map +0 -1
  281. package/src/config/DowncitySchema.ts +0 -175
  282. package/src/executor/composer/system/default/assets/plugin.prompt.ts +0 -9
  283. package/src/executor/composer/system/default/assets/plugin.prompt.ts.txt +0 -20
  284. package/src/plugin/core/Activation.ts +0 -26
  285. package/src/plugin/core/Manager.ts +0 -17
  286. package/src/plugin/types/Plugin.ts +0 -63
  287. package/src/plugin/types/PluginLifecycle.ts +0 -35
  288. package/src/plugin/types/PluginState.ts +0 -12
  289. package/src/plugin/types/Plugins.ts +0 -67
  290. package/src/session/index.ts +0 -57
  291. package/src/types/agent/AgentTypes.ts +0 -58
  292. package/src/utils/logger/Format.ts +0 -15
@@ -1,20 +0,0 @@
1
- /**
2
- * `downcity.json` Schema 定义模块。
3
- *
4
- * 职责说明(中文)
5
- * - 提供旧版 `downcity.json` 的 JSON Schema 常量。
6
- * - 保留给迁移场景与编辑器辅助,不再作为新 Agent 项目的默认配置入口。
7
- *
8
- * 边界说明(中文)
9
- * - 这里是静态 schema 常量,不负责运行时配置装配或业务校验逻辑。
10
- * - 当 schema 与运行时实现存在差异时,应同时更新配置解析与用户文档。
11
- */
12
- import type { JsonObject } from "../types/common/Json.js";
13
- /**
14
- * `downcity.json` 的本地 Schema 常量。
15
- *
16
- * 关键点(中文)
17
- * - 该结构主要面向 legacy 文件的 IDE 校验与用户编辑体验,不替代运行时断言。
18
- */
19
- export declare const DOWNCITY_JSON_SCHEMA: JsonObject;
20
- //# sourceMappingURL=DowncitySchema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DowncitySchema.d.ts","sourceRoot":"","sources":["../../src/config/DowncitySchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,UA2JlC,CAAC"}
@@ -1,160 +0,0 @@
1
- /**
2
- * `downcity.json` 的本地 Schema 常量。
3
- *
4
- * 关键点(中文)
5
- * - 该结构主要面向 legacy 文件的 IDE 校验与用户编辑体验,不替代运行时断言。
6
- */
7
- export const DOWNCITY_JSON_SCHEMA = {
8
- $schema: "https://json-schema.org/draft/2020-12/schema",
9
- $id: "https://downcity.ai/schemas/downcity.schema.json",
10
- title: "Downcity downcity.json",
11
- type: "object",
12
- additionalProperties: true,
13
- properties: {
14
- $schema: {
15
- type: "string",
16
- description: "JSON Schema reference for editor/IDE validation (e.g. ./.downcity/schema/downcity.schema.json).",
17
- },
18
- id: { type: "string" },
19
- version: { type: "string" },
20
- start: {
21
- type: "object",
22
- additionalProperties: true,
23
- properties: {
24
- port: { type: "integer", minimum: 1, maximum: 65535 },
25
- host: { type: "string" },
26
- },
27
- },
28
- execution: {
29
- type: "object",
30
- additionalProperties: true,
31
- properties: {
32
- type: {
33
- type: "string",
34
- enum: ["api"],
35
- },
36
- modelId: {
37
- type: "string",
38
- description: "API 执行模式下绑定的 City AIService 模型 ID。",
39
- },
40
- },
41
- required: ["type", "modelId"],
42
- },
43
- plugins: {
44
- type: "object",
45
- additionalProperties: true,
46
- properties: {
47
- chat: {
48
- type: "object",
49
- additionalProperties: true,
50
- properties: {
51
- queue: {
52
- type: "object",
53
- additionalProperties: true,
54
- properties: {
55
- maxConcurrency: { type: "integer", minimum: 1, maximum: 32 },
56
- mergeDebounceMs: { type: "integer", minimum: 0, maximum: 60000 },
57
- mergeMaxWaitMs: { type: "integer", minimum: 0, maximum: 120000 },
58
- },
59
- },
60
- egress: {
61
- type: "object",
62
- additionalProperties: true,
63
- properties: {
64
- chatSendMaxCallsPerRun: { type: "integer", minimum: 1, maximum: 500 },
65
- chatSendIdempotency: { type: "boolean" },
66
- },
67
- },
68
- channels: {
69
- type: "object",
70
- additionalProperties: true,
71
- description: "Chat platform channels (Telegram / Feishu / QQ...).",
72
- properties: {
73
- telegram: {
74
- type: "object",
75
- additionalProperties: true,
76
- properties: {
77
- enabled: { type: "boolean" },
78
- channelAccountId: { type: "string" },
79
- },
80
- },
81
- feishu: {
82
- type: "object",
83
- additionalProperties: true,
84
- properties: {
85
- enabled: { type: "boolean" },
86
- channelAccountId: { type: "string" },
87
- },
88
- },
89
- qq: {
90
- type: "object",
91
- additionalProperties: true,
92
- properties: {
93
- enabled: { type: "boolean" },
94
- channelAccountId: { type: "string" },
95
- },
96
- },
97
- },
98
- },
99
- },
100
- },
101
- },
102
- },
103
- llm: {
104
- type: "object",
105
- additionalProperties: true,
106
- properties: {
107
- providers: {
108
- type: "object",
109
- additionalProperties: {
110
- type: "object",
111
- additionalProperties: true,
112
- properties: {
113
- type: {
114
- type: "string",
115
- enum: [
116
- "anthropic",
117
- "openai",
118
- "deepseek",
119
- "gemini",
120
- "open-compatible",
121
- "open-responses",
122
- "moonshot-cn",
123
- "moonshot-ai",
124
- "kimi-code",
125
- "xai",
126
- "huggingface",
127
- "openrouter",
128
- ],
129
- },
130
- baseUrl: { type: "string" },
131
- apiKey: { type: "string" },
132
- },
133
- required: ["type"],
134
- },
135
- },
136
- models: {
137
- type: "object",
138
- additionalProperties: {
139
- type: "object",
140
- additionalProperties: true,
141
- properties: {
142
- provider: { type: "string" },
143
- name: { type: "string" },
144
- temperature: { type: "number" },
145
- maxTokens: { type: "number" },
146
- topP: { type: "number" },
147
- frequencyPenalty: { type: "number" },
148
- presencePenalty: { type: "number" },
149
- anthropicVersion: { type: "string" },
150
- },
151
- required: ["provider", "name"],
152
- },
153
- },
154
- logMessages: { type: "boolean" },
155
- },
156
- required: ["providers", "models"],
157
- },
158
- },
159
- };
160
- //# sourceMappingURL=DowncitySchema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DowncitySchema.js","sourceRoot":"","sources":["../../src/config/DowncitySchema.ts"],"names":[],"mappings":"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"}
@@ -1,7 +0,0 @@
1
- /**
2
- * 自动生成文件,请勿手改。
3
- * 源文件:由同路径 `*.ts.txt` 生成。
4
- */
5
- declare const TEXT_MODULE_CONTENT = "# Plugin State\n\nYou are working in a plugin-based execution environment.\n\n## Plugin Call Rules\n\n- When you need plugin capabilities, prefer invoking the plugin action through the available tools.\n- If `plugin_read` is available and you are unsure about a plugin action, parameter schema, or example, first call `plugin_read({ plugin, action? })` to read metadata.\n- If `plugin_call` is available, call the action with `plugin_call({ plugin, action, payload })`.\n- `plugin_call.plugin` is the plugin name, for example `skill`, `task`, `memory`, or `contact`.\n- `plugin_call.action` is the action name, for example `list`, `lookup`, `create`, or `run`.\n- `plugin_call.payload` is a structured JSON payload. Pass `{}` when there are no parameters. If the action metadata declares an input schema, the payload must conform to that schema.\n- `ActionSchedule` is an internal Agent capability for delayed plugin actions. It is not a standalone plugin.\n\n## Available Plugin Overview\n\n- Current built-in managed plugins: `shell` / `chat` / `task` / `memory` / `contact`.\n- Current built-in local plugins: `auth` / `skill`.\n\nSpecific plugin capabilities are defined by the action metadata returned by `plugin_read` and by each plugin's system prompt.\n";
6
- export default TEXT_MODULE_CONTENT;
7
- //# sourceMappingURL=plugin.prompt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.prompt.d.ts","sourceRoot":"","sources":["../../../../../../src/executor/composer/system/default/assets/plugin.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,QAAA,MAAM,mBAAmB,kvCAAkvC,CAAC;AAE5wC,eAAe,mBAAmB,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * 自动生成文件,请勿手改。
3
- * 源文件:由同路径 `*.ts.txt` 生成。
4
- */
5
- // Source: src/executor/composer/system/default/assets/plugin.prompt.ts.txt
6
- const TEXT_MODULE_CONTENT = "# Plugin State\n\nYou are working in a plugin-based execution environment.\n\n## Plugin Call Rules\n\n- When you need plugin capabilities, prefer invoking the plugin action through the available tools.\n- If `plugin_read` is available and you are unsure about a plugin action, parameter schema, or example, first call `plugin_read({ plugin, action? })` to read metadata.\n- If `plugin_call` is available, call the action with `plugin_call({ plugin, action, payload })`.\n- `plugin_call.plugin` is the plugin name, for example `skill`, `task`, `memory`, or `contact`.\n- `plugin_call.action` is the action name, for example `list`, `lookup`, `create`, or `run`.\n- `plugin_call.payload` is a structured JSON payload. Pass `{}` when there are no parameters. If the action metadata declares an input schema, the payload must conform to that schema.\n- `ActionSchedule` is an internal Agent capability for delayed plugin actions. It is not a standalone plugin.\n\n## Available Plugin Overview\n\n- Current built-in managed plugins: `shell` / `chat` / `task` / `memory` / `contact`.\n- Current built-in local plugins: `auth` / `skill`.\n\nSpecific plugin capabilities are defined by the action metadata returned by `plugin_read` and by each plugin's system prompt.\n";
7
- export default TEXT_MODULE_CONTENT;
8
- //# sourceMappingURL=plugin.prompt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.prompt.js","sourceRoot":"","sources":["../../../../../../src/executor/composer/system/default/assets/plugin.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,2EAA2E;AAC3E,MAAM,mBAAmB,GAAG,+uCAA+uC,CAAC;AAE5wC,eAAe,mBAAmB,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * Plugin 激活兼容工具。
3
- *
4
- * 关键点(中文)
5
- * - 新模型不再读取 `downcity.json.plugins.<name>.enabled`。
6
- * - 传入 plugin 本身就表示调用方希望它可见;Agent runtime 以注册表作为真实边界。
7
- * - 该函数仅为旧内部集成保留,后续应优先使用 `context.plugins.has/status`。
8
- */
9
- import type { Plugin } from "../../plugin/types/Plugin.js";
10
- import type { AgentContext } from "../../types/runtime/agent/AgentContext.js";
11
- /**
12
- * 判断当前 plugin 是否可被视为启用。
13
- */
14
- export declare function isPluginEnabled(params: {
15
- plugin: Plugin;
16
- context?: Pick<AgentContext, "plugins">;
17
- }): boolean;
18
- //# sourceMappingURL=Activation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Activation.d.ts","sourceRoot":"","sources":["../../../src/plugin/core/Activation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAE1E;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;CACzC,GAAG,OAAO,CAOV"}
@@ -1,21 +0,0 @@
1
- /**
2
- * Plugin 激活兼容工具。
3
- *
4
- * 关键点(中文)
5
- * - 新模型不再读取 `downcity.json.plugins.<name>.enabled`。
6
- * - 传入 plugin 本身就表示调用方希望它可见;Agent runtime 以注册表作为真实边界。
7
- * - 该函数仅为旧内部集成保留,后续应优先使用 `context.plugins.has/status`。
8
- */
9
- /**
10
- * 判断当前 plugin 是否可被视为启用。
11
- */
12
- export function isPluginEnabled(params) {
13
- const pluginName = String(params.plugin.name || "").trim();
14
- if (!pluginName)
15
- return false;
16
- if (params.context?.plugins) {
17
- return params.context.plugins.status(pluginName)?.status === "ready";
18
- }
19
- return true;
20
- }
21
- //# sourceMappingURL=Activation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Activation.js","sourceRoot":"","sources":["../../../src/plugin/core/Activation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,MAG/B;IACC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,IAAI,CAAC,UAAU;QAAE,OAAO,KAAK,CAAC;IAC9B,IAAI,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC;QAC5B,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC;IACvE,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Plugin Manager 门面模块。
3
- */
4
- export type { PluginStateControlAction, PluginStateControlResult, PluginStateSnapshot, } from "../../plugin/types/Plugin.js";
5
- export { controlPluginState, isPluginRunning, listPluginStates, } from "../../plugin/core/PluginStateController.js";
6
- export { runPluginCommand, } from "../../plugin/core/PluginActionRunner.js";
7
- //# sourceMappingURL=Manager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Manager.d.ts","sourceRoot":"","sources":["../../../src/plugin/core/Manager.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EACV,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,gBAAgB,GACjB,MAAM,qCAAqC,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Plugin Manager 门面模块。
3
- */
4
- export { controlPluginState, isPluginRunning, listPluginStates, } from "../../plugin/core/PluginStateController.js";
5
- export { runPluginCommand, } from "../../plugin/core/PluginActionRunner.js";
6
- //# sourceMappingURL=Manager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Manager.js","sourceRoot":"","sources":["../../../src/plugin/core/Manager.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,gBAAgB,GACjB,MAAM,qCAAqC,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * Plugin 类型 facade。
3
- *
4
- * 关键点(中文)
5
- * - 保留旧的 `@/plugin/types/Plugin.js` 导入路径。
6
- * - 真实类型按职责拆到 `src/types/plugin/*`,避免单文件继续膨胀。
7
- */
8
- export type { PluginState, PluginStateControlAction, PluginStateControlResult, PluginRuntimeRecord, PluginSnapshot, PluginStateSnapshot, } from "../../types/plugin/PluginState.js";
9
- export type { PluginCommandContext, PluginCommandParams, PluginCommandResult, PluginLifecycle, } from "../../types/plugin/PluginCommand.js";
10
- export type { PluginAction, PluginActionApi, PluginActionCommand, PluginActionCommandInput, PluginActionExample, PluginActionInvokeParams, PluginActionInvokePort, PluginActionInvokeResult, PluginActionInputSchema, PluginActionMetadata, PluginActionResult, PluginActions, } from "../../types/plugin/PluginAction.js";
11
- export type { PluginAvailability, PluginConfigDefinition, PluginEffectHook, PluginGuardHook, PluginHooks, PluginPipelineHook, AgentPlugins, PluginActionReadView, PluginResolveHook, PluginResolves, PluginReadView, PluginView, } from "../../types/plugin/PluginRuntime.js";
12
- export type { PluginSetupDefinition, PluginSetupField, PluginSetupFieldOption, PluginUsageDefinition, PluginUsageField, PluginUsageFieldOption, } from "../../types/plugin/PluginSetup.js";
13
- export type { PluginHttpDefinition, PluginHttpRegistration, } from "../../types/plugin/PluginHttp.js";
14
- export type { Plugin } from "../../types/plugin/PluginDefinition.js";
15
- //# sourceMappingURL=Plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../../src/plugin/types/Plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACV,WAAW,EACX,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,EACnB,cAAc,EACd,mBAAmB,GACpB,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,GAChB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EACV,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,GACd,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,UAAU,GACX,MAAM,iCAAiC,CAAC;AACzC,YAAY,EACV,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * Plugin 类型 facade。
3
- *
4
- * 关键点(中文)
5
- * - 保留旧的 `@/plugin/types/Plugin.js` 导入路径。
6
- * - 真实类型按职责拆到 `src/types/plugin/*`,避免单文件继续膨胀。
7
- */
8
- export {};
9
- //# sourceMappingURL=Plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../../src/plugin/types/Plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -1,34 +0,0 @@
1
- /**
2
- * Plugin 生命周期配置类型定义。
3
- *
4
- * 关键点(中文)
5
- * - Plugin 是否启用属于 city 级全局状态,不属于单个 agent 项目。
6
- * - 该文件只描述 city 级 lifecycle 数据,不承载 agent 局部参数。
7
- */
8
- /**
9
- * 单个 plugin 的 city 级生命周期配置。
10
- */
11
- export interface CityPluginLifecycleItem {
12
- /**
13
- * 当前 plugin 是否在 city 级被启用。
14
- */
15
- enabled: boolean;
16
- /**
17
- * 最近更新时间(ISO 字符串)。
18
- */
19
- updatedAt: string;
20
- }
21
- /**
22
- * city 级 plugin 生命周期配置映射。
23
- */
24
- export interface CityPluginLifecycleConfig {
25
- /**
26
- * 插件生命周期配置对象映射。
27
- *
28
- * 说明(中文)
29
- * - key 为 plugin 稳定名称。
30
- * - value 为该 plugin 的 city 级启用状态快照。
31
- */
32
- [pluginName: string]: CityPluginLifecycleItem | undefined;
33
- }
34
- //# sourceMappingURL=PluginLifecycle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PluginLifecycle.d.ts","sourceRoot":"","sources":["../../../src/plugin/types/PluginLifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;;;OAMG;IACH,CAAC,UAAU,EAAE,MAAM,GAAG,uBAAuB,GAAG,SAAS,CAAC;CAC3D"}
@@ -1,9 +0,0 @@
1
- /**
2
- * Plugin 生命周期配置类型定义。
3
- *
4
- * 关键点(中文)
5
- * - Plugin 是否启用属于 city 级全局状态,不属于单个 agent 项目。
6
- * - 该文件只描述 city 级 lifecycle 数据,不承载 agent 局部参数。
7
- */
8
- export {};
9
- //# sourceMappingURL=PluginLifecycle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PluginLifecycle.js","sourceRoot":"","sources":["../../../src/plugin/types/PluginLifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -1,5 +0,0 @@
1
- /**
2
- * PluginState:plugin 运行状态相关共享类型导出。
3
- */
4
- export type { PluginState, PluginStateControlAction, PluginStateControlResult, PluginRuntimeRecord, PluginSnapshot, PluginStateSnapshot, } from "../../types/plugin/PluginState.js";
5
- //# sourceMappingURL=PluginState.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PluginState.d.ts","sourceRoot":"","sources":["../../../src/plugin/types/PluginState.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EACV,WAAW,EACX,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,EACnB,cAAc,EACd,mBAAmB,GACpB,MAAM,+BAA+B,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * PluginState:plugin 运行状态相关共享类型导出。
3
- */
4
- export {};
5
- //# sourceMappingURL=PluginState.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PluginState.js","sourceRoot":"","sources":["../../../src/plugin/types/PluginState.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -1,61 +0,0 @@
1
- /**
2
- * plugin 管理命令类型。
3
- */
4
- import type { JsonValue } from "../../types/common/Json.js";
5
- export type PluginControlAction = "status" | "unregister";
6
- /**
7
- * 单个 plugin 的对外状态视图。
8
- */
9
- export type PluginStateView = {
10
- /** plugin 稳定名称。 */
11
- name: string;
12
- /** 当前注册状态。 */
13
- state: "ready" | "error";
14
- /** 当前注册状态。 */
15
- status: "ready" | "error";
16
- /** 注册时间(毫秒时间戳)。 */
17
- registered_at: number;
18
- /** 最近更新时间(毫秒时间戳)。 */
19
- updated_at: number;
20
- /** 兼容旧字段的最近一次状态更新时间。 */
21
- updatedAt: number;
22
- /** 最近一次错误信息。 */
23
- lastError?: string;
24
- /** 最近一次错误信息。 */
25
- last_error?: string;
26
- };
27
- /**
28
- * plugin 状态列表响应。
29
- */
30
- export type PluginStateListResponse = {
31
- success: boolean;
32
- plugins?: PluginStateView[];
33
- error?: string;
34
- };
35
- /**
36
- * plugin 生命周期控制响应。
37
- */
38
- export type PluginControlResponse = {
39
- success: boolean;
40
- plugin?: PluginStateView;
41
- error?: string;
42
- };
43
- /**
44
- * plugin command/action 执行响应。
45
- */
46
- export type PluginCommandResponse = {
47
- success: boolean;
48
- plugin?: PluginStateView;
49
- message?: string;
50
- data?: JsonValue;
51
- error?: string;
52
- };
53
- export type PluginCliBaseOptions = {
54
- path?: string;
55
- agent?: string;
56
- host?: string;
57
- port?: number;
58
- token?: string;
59
- json?: boolean;
60
- };
61
- //# sourceMappingURL=Plugins.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Plugins.d.ts","sourceRoot":"","sources":["../../../src/plugin/types/Plugins.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc;IACd,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,cAAc;IACd,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC;IAC1B,mBAAmB;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,qBAAqB;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,wBAAwB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * plugin 管理命令类型。
3
- */
4
- export {};
5
- //# sourceMappingURL=Plugins.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Plugins.js","sourceRoot":"","sources":["../../../src/plugin/types/Plugins.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -1,15 +0,0 @@
1
- /**
2
- * Session 模块聚合入口。
3
- *
4
- * 职责说明(中文)
5
- * - 统一暴露 `session/` 目录下的本地 Session 实现与相关辅助能力。
6
- * - 让 `Session` 相关代码收敛在一个目录树中,避免实现散落在 Agent 入口模块里。
7
- */
8
- export { Session } from "./Session.js";
9
- export { getSdkAgentDirPath, getSdkAgentArchivedSessionDirPath, getSdkAgentArchivedSessionMessagesDirPath, getSdkAgentArchivedSessionMessagesPath, getSdkAgentArchivedSessionMetaPath, getSdkAgentArchivedSessionsDirPath, getSdkAgentSessionArchiveDirPath, getSdkAgentSessionArchiveFilePath, getSdkAgentSessionDirPath, getSdkAgentSessionInflightPath, getSdkAgentSessionMessagesDirPath, getSdkAgentSessionMessagesPath, getSdkAgentSessionMetaPath, getSdkAgentSessionsRootDirPath, getSdkAgentsRootDirPath, getSdkDowncityDirPath, } from "./storage/Paths.js";
10
- export { inferModelLabel, normalizeSessionTitle, patchSessionModelLabel, readSessionMetadata, readSessionMetadataFromPath, resolveSystemTimezone, writeSessionMetadata, } from "./storage/Metadata.js";
11
- export { ensureSessionTitle, } from "./SessionTitle.js";
12
- export { persistSdkAssistantResult, touchSessionMetadata, } from "./storage/Persistence.js";
13
- export { createRuntimeSessionPort, } from "./storage/RuntimeSessionPort.js";
14
- export { buildSessionRecordsPage, buildSessionInfo, listArchivedAgentSessionSummaryPage, listAgentSessionSummaryPage, loadSessionArchiveMessagesFromPath, loadSessionMessagesFromPath, resolveSessionMessagePreview, toSessionTimelineEvents, } from "./browse/Browse.js";
15
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EACL,kBAAkB,EAClB,iCAAiC,EACjC,yCAAyC,EACzC,sCAAsC,EACtC,kCAAkC,EAClC,kCAAkC,EAClC,gCAAgC,EAChC,iCAAiC,EACjC,yBAAyB,EACzB,8BAA8B,EAC9B,iCAAiC,EACjC,8BAA8B,EAC9B,0BAA0B,EAC1B,8BAA8B,EAC9B,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,2BAA2B,EAC3B,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,mCAAmC,EACnC,2BAA2B,EAC3B,kCAAkC,EAClC,2BAA2B,EAC3B,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,oBAAoB,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * Session 模块聚合入口。
3
- *
4
- * 职责说明(中文)
5
- * - 统一暴露 `session/` 目录下的本地 Session 实现与相关辅助能力。
6
- * - 让 `Session` 相关代码收敛在一个目录树中,避免实现散落在 Agent 入口模块里。
7
- */
8
- export { Session } from "./Session.js";
9
- export { getSdkAgentDirPath, getSdkAgentArchivedSessionDirPath, getSdkAgentArchivedSessionMessagesDirPath, getSdkAgentArchivedSessionMessagesPath, getSdkAgentArchivedSessionMetaPath, getSdkAgentArchivedSessionsDirPath, getSdkAgentSessionArchiveDirPath, getSdkAgentSessionArchiveFilePath, getSdkAgentSessionDirPath, getSdkAgentSessionInflightPath, getSdkAgentSessionMessagesDirPath, getSdkAgentSessionMessagesPath, getSdkAgentSessionMetaPath, getSdkAgentSessionsRootDirPath, getSdkAgentsRootDirPath, getSdkDowncityDirPath, } from "./storage/Paths.js";
10
- export { inferModelLabel, normalizeSessionTitle, patchSessionModelLabel, readSessionMetadata, readSessionMetadataFromPath, resolveSystemTimezone, writeSessionMetadata, } from "./storage/Metadata.js";
11
- export { ensureSessionTitle, } from "./SessionTitle.js";
12
- export { persistSdkAssistantResult, touchSessionMetadata, } from "./storage/Persistence.js";
13
- export { createRuntimeSessionPort, } from "./storage/RuntimeSessionPort.js";
14
- export { buildSessionRecordsPage, buildSessionInfo, listArchivedAgentSessionSummaryPage, listAgentSessionSummaryPage, loadSessionArchiveMessagesFromPath, loadSessionMessagesFromPath, resolveSessionMessagePreview, toSessionTimelineEvents, } from "./browse/Browse.js";
15
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EACL,kBAAkB,EAClB,iCAAiC,EACjC,yCAAyC,EACzC,sCAAsC,EACtC,kCAAkC,EAClC,kCAAkC,EAClC,gCAAgC,EAChC,iCAAiC,EACjC,yBAAyB,EACzB,8BAA8B,EAC9B,iCAAiC,EACjC,8BAA8B,EAC9B,0BAA0B,EAC1B,8BAA8B,EAC9B,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,2BAA2B,EAC3B,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,mCAAmC,EACnC,2BAA2B,EAC3B,kCAAkC,EAClC,2BAA2B,EAC3B,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,oBAAoB,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * Agent 对外类型 facade。
3
- *
4
- * 关键点(中文)
5
- * - 保留旧的 `@/types/agent/AgentTypes.js` 导入路径。
6
- * - 真实类型按职责拆到 AgentOptions / RemoteAgentOptions / SessionTypes / SessionActor。
7
- * - 这里不承载具体字段定义,避免单文件继续膨胀。
8
- */
9
- export type { AgentModel } from "../../model/CityModelAdapter.js";
10
- export type { SessionComposerFactoryContext, SessionComposerInput, SessionComposerOptions, } from "../../types/session/SessionComposerOptions.js";
11
- export type { AgentManagedSession, SessionOptions, } from "../../types/session/SessionOptions.js";
12
- export type { AgentOptions, AgentSessionConstructor, } from "../../types/agent/AgentOptions.js";
13
- export type { RemoteAgentOptions } from "../../types/agent/RemoteAgentOptions.js";
14
- export type { RemoteAgentPluginActionInput, RemoteAgentPluginActionResult, } from "../../types/agent/RemoteAgentPluginAction.js";
15
- export type { AgentArchiveSessionInput, AgentArchiveSessionsInput, AgentArchiveSessionResult, AgentArchiveSessionsResult, AgentCleanArchiveResult, AgentCreateSessionInput, AgentListSessionsInput, AgentSessionConfigSnapshot, AgentSessionForkInput, AgentSessionRecordsInput, AgentSessionRecordsPage, AgentSessionRecordsView, AgentSessionInfo, AgentSessionSetInput, AgentSessionSummary, AgentSessionSummaryPage, AgentSessionSystemBlock, AgentSessionSystemBlockSource, AgentSessionSystemSessionInfo, AgentSessionSystemSnapshot, AgentSessionTimelineEvent, } from "../../types/agent/SessionTypes.js";
16
- export type { AgentSessionStopResult } from "../../types/sdk/AgentSessionStop.js";
17
- export type { AgentSession, AgentSessionActor, AgentSessions, RemoteAgentSession, } from "../../types/agent/SessionActor.js";
18
- //# sourceMappingURL=AgentTypes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgentTypes.d.ts","sourceRoot":"","sources":["../../../src/types/agent/AgentTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,YAAY,EACV,6BAA6B,EAC7B,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,2CAA2C,CAAC;AACnD,YAAY,EACV,mBAAmB,EACnB,cAAc,GACf,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EACV,YAAY,EACZ,uBAAuB,GACxB,MAAM,+BAA+B,CAAC;AACvC,YAAY,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,YAAY,EACV,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,0CAA0C,CAAC;AAClD,YAAY,EACV,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,+BAA+B,CAAC;AACvC,YAAY,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,kBAAkB,GACnB,MAAM,+BAA+B,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Agent 对外类型 facade。
3
- *
4
- * 关键点(中文)
5
- * - 保留旧的 `@/types/agent/AgentTypes.js` 导入路径。
6
- * - 真实类型按职责拆到 AgentOptions / RemoteAgentOptions / SessionTypes / SessionActor。
7
- * - 这里不承载具体字段定义,避免单文件继续膨胀。
8
- */
9
- export {};
10
- //# sourceMappingURL=AgentTypes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgentTypes.js","sourceRoot":"","sources":["../../../src/types/agent/AgentTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
@@ -1,11 +0,0 @@
1
- /**
2
- * LLM 请求/响应日志格式化公共入口。
3
- *
4
- * 关键点(中文)
5
- * - 外部模块只从这里导入,内部拆分对调用方透明。
6
- * - `ProviderFetch` 仍然保留在 facade,避免影响 `Fetch.ts` 的类型入口。
7
- */
8
- export { parseFetchRequestForLog } from "./FormatRequest.js";
9
- export { parseFetchResponseForLog } from "./FormatResponse.js";
10
- export type ProviderFetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
11
- //# sourceMappingURL=Format.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Format.d.ts","sourceRoot":"","sources":["../../../src/utils/logger/Format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,MAAM,MAAM,aAAa,GAAG,CAC1B,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAC7B,IAAI,CAAC,EAAE,WAAW,KACf,OAAO,CAAC,QAAQ,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * LLM 请求/响应日志格式化公共入口。
3
- *
4
- * 关键点(中文)
5
- * - 外部模块只从这里导入,内部拆分对调用方透明。
6
- * - `ProviderFetch` 仍然保留在 facade,避免影响 `Fetch.ts` 的类型入口。
7
- */
8
- export { parseFetchRequestForLog } from "./FormatRequest.js";
9
- export { parseFetchResponseForLog } from "./FormatResponse.js";
10
- //# sourceMappingURL=Format.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Format.js","sourceRoot":"","sources":["../../../src/utils/logger/Format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC"}