@downcity/agent 1.1.107 → 1.1.111
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.
- package/bin/executor/composer/system/default/assets/core.prompt.d.ts +1 -1
- package/bin/executor/composer/system/default/assets/core.prompt.d.ts.map +1 -1
- package/bin/executor/composer/system/default/assets/core.prompt.js +1 -1
- package/bin/executor/composer/system/default/assets/core.prompt.js.map +1 -1
- package/bin/executor/core-engine/CoreEngineUiStreamCollector.d.ts.map +1 -1
- package/bin/executor/core-engine/CoreEngineUiStreamCollector.js +14 -0
- package/bin/executor/core-engine/CoreEngineUiStreamCollector.js.map +1 -1
- package/bin/executor/tools/shell/ShellToolBridge.d.ts.map +1 -1
- package/bin/executor/tools/shell/ShellToolBridge.js +22 -4
- package/bin/executor/tools/shell/ShellToolBridge.js.map +1 -1
- package/bin/executor/tools/shell/ShellToolDefinition.d.ts.map +1 -1
- package/bin/executor/tools/shell/ShellToolDefinition.js +10 -2
- package/bin/executor/tools/shell/ShellToolDefinition.js.map +1 -1
- package/bin/executor/tools/shell/ShellToolSchemas.d.ts +10 -0
- package/bin/executor/tools/shell/ShellToolSchemas.d.ts.map +1 -1
- package/bin/executor/tools/shell/ShellToolSchemas.js +13 -0
- package/bin/executor/tools/shell/ShellToolSchemas.js.map +1 -1
- package/bin/executor/tools/shell/types/Shell.d.ts +12 -0
- package/bin/executor/tools/shell/types/Shell.d.ts.map +1 -1
- package/bin/executor/tools/shell/types/ShellPlugin.d.ts +28 -0
- package/bin/executor/tools/shell/types/ShellPlugin.d.ts.map +1 -1
- package/bin/sandbox/LinuxBubblewrapSandbox.d.ts.map +1 -1
- package/bin/sandbox/LinuxBubblewrapSandbox.js +1 -0
- package/bin/sandbox/LinuxBubblewrapSandbox.js.map +1 -1
- package/bin/sandbox/MacOsSeatbeltSandbox.d.ts.map +1 -1
- package/bin/sandbox/MacOsSeatbeltSandbox.js +1 -0
- package/bin/sandbox/MacOsSeatbeltSandbox.js.map +1 -1
- package/bin/sandbox/SandboxRunner.d.ts +2 -0
- package/bin/sandbox/SandboxRunner.d.ts.map +1 -1
- package/bin/sandbox/SandboxRunner.js +14 -0
- package/bin/sandbox/SandboxRunner.js.map +1 -1
- package/bin/sandbox/UnrestrictedSandbox.d.ts +16 -0
- package/bin/sandbox/UnrestrictedSandbox.d.ts.map +1 -0
- package/bin/sandbox/UnrestrictedSandbox.js +39 -0
- package/bin/sandbox/UnrestrictedSandbox.js.map +1 -0
- package/bin/sandbox/types/SandboxRuntime.d.ts +9 -1
- package/bin/sandbox/types/SandboxRuntime.d.ts.map +1 -1
- package/bin/session/Session.d.ts.map +1 -1
- package/bin/session/Session.js +3 -0
- package/bin/session/Session.js.map +1 -1
- package/bin/session/services/SessionTurnService.d.ts.map +1 -1
- package/bin/session/services/SessionTurnService.js +1 -0
- package/bin/session/services/SessionTurnService.js.map +1 -1
- package/bin/session/storage/RuntimeSessionPort.d.ts +5 -1
- package/bin/session/storage/RuntimeSessionPort.d.ts.map +1 -1
- package/bin/session/storage/RuntimeSessionPort.js +3 -0
- package/bin/session/storage/RuntimeSessionPort.js.map +1 -1
- package/bin/types/executor/SessionRunContext.d.ts +8 -0
- package/bin/types/executor/SessionRunContext.d.ts.map +1 -1
- package/bin/types/runtime/agent/AgentContext.d.ts +9 -1
- package/bin/types/runtime/agent/AgentContext.d.ts.map +1 -1
- package/bin/types/sdk/AgentSessionEvent.d.ts +75 -1
- package/bin/types/sdk/AgentSessionEvent.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/executor/composer/system/default/assets/core.prompt.ts +1 -1
- package/src/executor/composer/system/default/assets/core.prompt.ts.txt +4 -2
- package/src/executor/core-engine/CoreEngineUiStreamCollector.ts +13 -0
- package/src/executor/tools/shell/ShellToolBridge.ts +24 -4
- package/src/executor/tools/shell/ShellToolDefinition.ts +12 -0
- package/src/executor/tools/shell/ShellToolSchemas.ts +15 -0
- package/src/executor/tools/shell/types/Shell.ts +13 -0
- package/src/executor/tools/shell/types/ShellPlugin.ts +30 -0
- package/src/sandbox/LinuxBubblewrapSandbox.ts +1 -0
- package/src/sandbox/MacOsSeatbeltSandbox.ts +1 -0
- package/src/sandbox/SandboxRunner.ts +17 -0
- package/src/sandbox/UnrestrictedSandbox.ts +53 -0
- package/src/sandbox/types/SandboxRuntime.ts +11 -1
- package/src/session/Session.ts +3 -0
- package/src/session/services/SessionTurnService.ts +1 -0
- package/src/session/storage/RuntimeSessionPort.ts +8 -0
- package/src/types/executor/SessionRunContext.ts +9 -0
- package/src/types/runtime/agent/AgentContext.ts +9 -0
- package/src/types/sdk/AgentSessionEvent.ts +92 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -128,6 +128,96 @@ export interface AgentSessionToolResultEvent {
|
|
|
128
128
|
result: JsonValue;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
/**
|
|
132
|
+
* 工具审批请求事件。
|
|
133
|
+
*/
|
|
134
|
+
export interface AgentSessionToolApprovalRequestEvent {
|
|
135
|
+
/**
|
|
136
|
+
* 当前事件类型。
|
|
137
|
+
*/
|
|
138
|
+
type: "tool-approval-request";
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* 当前审批所属 turn。
|
|
142
|
+
*/
|
|
143
|
+
turnId: string;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* 当前工具调用唯一标识。
|
|
147
|
+
*/
|
|
148
|
+
toolCallId: string;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* 当前工具名称。
|
|
152
|
+
*/
|
|
153
|
+
toolName: string;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* 当前审批请求唯一标识。
|
|
157
|
+
*/
|
|
158
|
+
approvalId: string;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* 请求执行的 sandbox 模式。
|
|
162
|
+
*/
|
|
163
|
+
sandbox: "unrestricted";
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* 请求执行的命令文本。
|
|
167
|
+
*/
|
|
168
|
+
cmd: string;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* 命令执行目录。
|
|
172
|
+
*/
|
|
173
|
+
cwd: string;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Agent 给用户展示的申请原因。
|
|
177
|
+
*/
|
|
178
|
+
reason: string;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* 当前审批状态。
|
|
182
|
+
*/
|
|
183
|
+
status: "pending";
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* 工具审批结果事件。
|
|
188
|
+
*/
|
|
189
|
+
export interface AgentSessionToolApprovalResultEvent {
|
|
190
|
+
/**
|
|
191
|
+
* 当前事件类型。
|
|
192
|
+
*/
|
|
193
|
+
type: "tool-approval-result";
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* 当前审批所属 turn。
|
|
197
|
+
*/
|
|
198
|
+
turnId: string;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* 当前工具调用唯一标识。
|
|
202
|
+
*/
|
|
203
|
+
toolCallId: string;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* 当前工具名称。
|
|
207
|
+
*/
|
|
208
|
+
toolName: string;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* 当前审批请求唯一标识。
|
|
212
|
+
*/
|
|
213
|
+
approvalId: string;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* 用户最终决策。
|
|
217
|
+
*/
|
|
218
|
+
decision: "approved" | "denied" | "expired";
|
|
219
|
+
}
|
|
220
|
+
|
|
131
221
|
/**
|
|
132
222
|
* assistant step 完成事件。
|
|
133
223
|
*/
|
|
@@ -236,6 +326,8 @@ export type AgentSessionEvent =
|
|
|
236
326
|
| AgentSessionReasoningDeltaEvent
|
|
237
327
|
| AgentSessionToolCallEvent
|
|
238
328
|
| AgentSessionToolResultEvent
|
|
329
|
+
| AgentSessionToolApprovalRequestEvent
|
|
330
|
+
| AgentSessionToolApprovalResultEvent
|
|
239
331
|
| AgentSessionAssistantStepEvent
|
|
240
332
|
| AgentSessionTitleEvent
|
|
241
333
|
| AgentSessionTurnFinishEvent
|