@steerable/agent-shell 0.6.68 → 0.6.70
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.
|
@@ -247,7 +247,10 @@ export function createBsServer(deps) {
|
|
|
247
247
|
sendJson(res, 200, { ok: false, reason: 'no_active_coreloop_turn' });
|
|
248
248
|
return;
|
|
249
249
|
}
|
|
250
|
-
const
|
|
250
|
+
const execPolicy = body.execPolicy === 'full' || body.execPolicy === 'workspace'
|
|
251
|
+
? body.execPolicy
|
|
252
|
+
: undefined;
|
|
253
|
+
const ok = await supervisor.steerChat(streamId, content, execPolicy);
|
|
251
254
|
// 与 main.ts 同理:接受即落库,重开对话能看到这条注入的用户消息。
|
|
252
255
|
if (ok)
|
|
253
256
|
await deps.store.addMessage(chatId, 'user', content);
|
|
@@ -152,7 +152,7 @@ export declare class SidecarSupervisor extends EventEmitter {
|
|
|
152
152
|
* Soft-fails (`{ ok: false }`) when the turn already ended — the caller
|
|
153
153
|
* should then send the message as a normal new turn instead.
|
|
154
154
|
*/
|
|
155
|
-
steerChat(streamId: string, content: string): Promise<boolean>;
|
|
155
|
+
steerChat(streamId: string, content: string, execPolicy?: 'workspace' | 'full'): Promise<boolean>;
|
|
156
156
|
/**
|
|
157
157
|
* Register a host-side handler for a reverse (sidecar -> host) request.
|
|
158
158
|
*
|
|
@@ -310,9 +310,13 @@ export class SidecarSupervisor extends EventEmitter {
|
|
|
310
310
|
* Soft-fails (`{ ok: false }`) when the turn already ended — the caller
|
|
311
311
|
* should then send the message as a normal new turn instead.
|
|
312
312
|
*/
|
|
313
|
-
async steerChat(streamId, content) {
|
|
313
|
+
async steerChat(streamId, content, execPolicy) {
|
|
314
314
|
try {
|
|
315
|
-
const result = await this.call('agent.chat.steer', {
|
|
315
|
+
const result = await this.call('agent.chat.steer', {
|
|
316
|
+
streamId,
|
|
317
|
+
content,
|
|
318
|
+
...(execPolicy ? { execPolicy } : {}),
|
|
319
|
+
}, { timeoutMs: 2_000 });
|
|
316
320
|
return result.ok === true;
|
|
317
321
|
}
|
|
318
322
|
catch {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steerable/agent-shell",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.70",
|
|
4
4
|
"description": "Steerable framework — product-neutral Node HostRuntime and headless HTTP server shared by Tauri desktop and browser deployments; scenario packs extend it through @steerable/pack-sdk.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://steerableframework.com/",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"jpeg-js": "^0.4.4",
|
|
54
54
|
"node-pty": "^1.1.0",
|
|
55
55
|
"pngjs": "^7.0.0",
|
|
56
|
-
"@steerable/agent-harness": "0.6.
|
|
57
|
-
"@steerable/agent-protocol": "0.6.
|
|
58
|
-
"@steerable/pack-sdk": "0.6.
|
|
56
|
+
"@steerable/agent-harness": "0.6.70",
|
|
57
|
+
"@steerable/agent-protocol": "0.6.70",
|
|
58
|
+
"@steerable/pack-sdk": "0.6.70"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/better-sqlite3": "^7.6.13",
|