@downcity/agent 1.1.111 → 1.1.113

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 (57) hide show
  1. package/bin/agent/remote/RemoteAgent.d.ts +9 -1
  2. package/bin/agent/remote/RemoteAgent.d.ts.map +1 -1
  3. package/bin/agent/remote/RemoteAgent.js +22 -0
  4. package/bin/agent/remote/RemoteAgent.js.map +1 -1
  5. package/bin/agent/remote/RemoteTransport.d.ts +3 -1
  6. package/bin/agent/remote/RemoteTransport.d.ts.map +1 -1
  7. package/bin/agent/remote/transports/HttpRemoteAgentTransport.d.ts +2 -1
  8. package/bin/agent/remote/transports/HttpRemoteAgentTransport.d.ts.map +1 -1
  9. package/bin/agent/remote/transports/HttpRemoteAgentTransport.js +26 -0
  10. package/bin/agent/remote/transports/HttpRemoteAgentTransport.js.map +1 -1
  11. package/bin/agent/remote/transports/RpcRemoteAgentTransport.d.ts +2 -1
  12. package/bin/agent/remote/transports/RpcRemoteAgentTransport.d.ts.map +1 -1
  13. package/bin/agent/remote/transports/RpcRemoteAgentTransport.js +7 -0
  14. package/bin/agent/remote/transports/RpcRemoteAgentTransport.js.map +1 -1
  15. package/bin/executor/composer/system/default/assets/core.prompt.d.ts +1 -1
  16. package/bin/executor/composer/system/default/assets/core.prompt.d.ts.map +1 -1
  17. package/bin/executor/composer/system/default/assets/core.prompt.js +1 -1
  18. package/bin/executor/composer/system/default/assets/core.prompt.js.map +1 -1
  19. package/bin/executor/tools/shell/ShellToolDefinition.d.ts +2 -0
  20. package/bin/executor/tools/shell/ShellToolDefinition.d.ts.map +1 -1
  21. package/bin/executor/tools/shell/ShellToolDefinition.js +4 -2
  22. package/bin/executor/tools/shell/ShellToolDefinition.js.map +1 -1
  23. package/bin/executor/tools/shell/ShellToolSchemas.d.ts +1 -0
  24. package/bin/executor/tools/shell/ShellToolSchemas.d.ts.map +1 -1
  25. package/bin/executor/tools/shell/ShellToolSchemas.js +4 -0
  26. package/bin/executor/tools/shell/ShellToolSchemas.js.map +1 -1
  27. package/bin/executor/tools/shell/types/Shell.d.ts +6 -0
  28. package/bin/executor/tools/shell/types/Shell.d.ts.map +1 -1
  29. package/bin/executor/tools/shell/types/ShellPlugin.d.ts +7 -1
  30. package/bin/executor/tools/shell/types/ShellPlugin.d.ts.map +1 -1
  31. package/bin/index.d.ts +1 -1
  32. package/bin/index.d.ts.map +1 -1
  33. package/bin/index.js.map +1 -1
  34. package/bin/types/agent/AgentTypes.d.ts +1 -0
  35. package/bin/types/agent/AgentTypes.d.ts.map +1 -1
  36. package/bin/types/agent/RemoteAgentPluginAction.d.ts +46 -0
  37. package/bin/types/agent/RemoteAgentPluginAction.d.ts.map +1 -0
  38. package/bin/types/agent/RemoteAgentPluginAction.js +9 -0
  39. package/bin/types/agent/RemoteAgentPluginAction.js.map +1 -0
  40. package/bin/types/sdk/AgentSessionEvent.d.ts +24 -4
  41. package/bin/types/sdk/AgentSessionEvent.d.ts.map +1 -1
  42. package/package.json +2 -2
  43. package/src/agent/remote/RemoteAgent.ts +27 -0
  44. package/src/agent/remote/RemoteTransport.ts +6 -0
  45. package/src/agent/remote/transports/HttpRemoteAgentTransport.ts +38 -0
  46. package/src/agent/remote/transports/RpcRemoteAgentTransport.ts +12 -0
  47. package/src/executor/composer/system/default/assets/core.prompt.ts +1 -1
  48. package/src/executor/composer/system/default/assets/core.prompt.ts.txt +1 -0
  49. package/src/executor/tools/shell/ShellToolDefinition.ts +5 -2
  50. package/src/executor/tools/shell/ShellToolSchemas.ts +4 -0
  51. package/src/executor/tools/shell/types/Shell.ts +7 -0
  52. package/src/executor/tools/shell/types/ShellPlugin.ts +8 -1
  53. package/src/index.ts +2 -0
  54. package/src/types/agent/AgentTypes.ts +4 -0
  55. package/src/types/agent/RemoteAgentPluginAction.ts +52 -0
  56. package/src/types/sdk/AgentSessionEvent.ts +28 -4
  57. package/tsconfig.tsbuildinfo +1 -1
@@ -90,7 +90,7 @@ export interface AgentSessionToolCallEvent {
90
90
  /**
91
91
  * 当前工具名称。
92
92
  */
93
- toolName: string;
93
+ toolName: "shell_exec" | "shell_start" | "shell_write" | string;
94
94
 
95
95
  /**
96
96
  * 当前工具输入参数。
@@ -120,7 +120,7 @@ export interface AgentSessionToolResultEvent {
120
120
  /**
121
121
  * 当前工具名称。
122
122
  */
123
- toolName: string;
123
+ toolName: "shell_exec" | "shell_start" | "shell_write" | string;
124
124
 
125
125
  /**
126
126
  * 当前工具输出结果。
@@ -150,7 +150,7 @@ export interface AgentSessionToolApprovalRequestEvent {
150
150
  /**
151
151
  * 当前工具名称。
152
152
  */
153
- toolName: string;
153
+ toolName: "shell_exec" | "shell_start" | "shell_write" | string;
154
154
 
155
155
  /**
156
156
  * 当前审批请求唯一标识。
@@ -164,9 +164,33 @@ export interface AgentSessionToolApprovalRequestEvent {
164
164
 
165
165
  /**
166
166
  * 请求执行的命令文本。
167
+ *
168
+ * 说明(中文)
169
+ * - `shell_exec` / `shell_start` 中是命令文本。
170
+ * - `shell_write` 中是 stdin 写入内容,用于兼容旧 UI 展示。
167
171
  */
168
172
  cmd: string;
169
173
 
174
+ /**
175
+ * 当前审批动作类型。
176
+ */
177
+ operation?: "exec" | "start" | "write";
178
+
179
+ /**
180
+ * 关联 shell_id;`shell_write` 审批时用于标识目标会话。
181
+ */
182
+ shellId?: string;
183
+
184
+ /**
185
+ * stdin 写入内容预览;仅 `shell_write` 审批存在。
186
+ */
187
+ inputPreview?: string;
188
+
189
+ /**
190
+ * stdin 写入字符数;仅 `shell_write` 审批存在。
191
+ */
192
+ inputChars?: number;
193
+
170
194
  /**
171
195
  * 命令执行目录。
172
196
  */
@@ -205,7 +229,7 @@ export interface AgentSessionToolApprovalResultEvent {
205
229
  /**
206
230
  * 当前工具名称。
207
231
  */
208
- toolName: string;
232
+ toolName: "shell_exec" | "shell_start" | "shell_write" | string;
209
233
 
210
234
  /**
211
235
  * 当前审批请求唯一标识。