@steerable/agent-shell 0.6.50 → 0.6.51
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.
|
@@ -5,6 +5,12 @@ export declare function isProductApprovalEnabled(): boolean;
|
|
|
5
5
|
export declare function resolveTurnApproval(storePath?: string): ReturnType<typeof buildHostApproval>;
|
|
6
6
|
export declare function assertHostIpcAllowed(channel: string): void;
|
|
7
7
|
export declare function resolveTurnChatMode(requested: unknown): ChatModeId;
|
|
8
|
+
/** 解析当前产品是否启用多智能体编排六件套(STEERABLE_ORCHESTRATION 环境变量与回合 payload 优先)。 */
|
|
9
|
+
export declare function resolveTurnOrchestration(payload?: Record<string, unknown>): {
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
maxDepth: number;
|
|
12
|
+
maxParallel: number;
|
|
13
|
+
} | undefined;
|
|
8
14
|
export declare function isProductLlmLocked(): boolean;
|
|
9
15
|
/** 设置页开着走已存/出厂默认;关掉则钉死 product.json 的 llm。 */
|
|
10
16
|
export declare function resolveRuntimeLlmSettings(persisted: LlmSettings | null): LlmSettings;
|
|
@@ -32,6 +32,42 @@ export function assertHostIpcAllowed(channel) {
|
|
|
32
32
|
export function resolveTurnChatMode(requested) {
|
|
33
33
|
return clampChatMode(requested, resolveChatModes(getProductConfig().chatModes));
|
|
34
34
|
}
|
|
35
|
+
/** 解析当前产品是否启用多智能体编排六件套(STEERABLE_ORCHESTRATION 环境变量与回合 payload 优先)。 */
|
|
36
|
+
export function resolveTurnOrchestration(payload) {
|
|
37
|
+
if (process.env.STEERABLE_ORCHESTRATION === '0')
|
|
38
|
+
return undefined;
|
|
39
|
+
if (process.env.STEERABLE_ORCHESTRATION === '1') {
|
|
40
|
+
return { enabled: true, maxDepth: 1, maxParallel: 4 };
|
|
41
|
+
}
|
|
42
|
+
// 回合请求体优先(用户在前端设置中打开/关闭,随 metadata/payload 透传)
|
|
43
|
+
if (payload) {
|
|
44
|
+
if (payload.orchestration === false)
|
|
45
|
+
return undefined;
|
|
46
|
+
if (payload.orchestration === true) {
|
|
47
|
+
return { enabled: true, maxDepth: 1, maxParallel: 4 };
|
|
48
|
+
}
|
|
49
|
+
const meta = payload.metadata;
|
|
50
|
+
if (meta && typeof meta === 'object') {
|
|
51
|
+
if (meta.orchestration === false)
|
|
52
|
+
return undefined;
|
|
53
|
+
if (meta.orchestration === true) {
|
|
54
|
+
return { enabled: true, maxDepth: 1, maxParallel: 4 };
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const config = getProductConfig().orchestration;
|
|
59
|
+
if (config === true) {
|
|
60
|
+
return { enabled: true, maxDepth: 1, maxParallel: 4 };
|
|
61
|
+
}
|
|
62
|
+
if (typeof config === 'object' && config !== null && config.enabled !== false) {
|
|
63
|
+
return {
|
|
64
|
+
enabled: true,
|
|
65
|
+
maxDepth: typeof config.maxDepth === 'number' ? config.maxDepth : 1,
|
|
66
|
+
maxParallel: typeof config.maxParallel === 'number' ? config.maxParallel : 4,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
35
71
|
export function isProductLlmLocked() {
|
|
36
72
|
return !resolveSettingsChrome(getProductConfig().settings).llm;
|
|
37
73
|
}
|
|
@@ -23,7 +23,7 @@ import { setDefaultExecTimeoutMs } from '../local-executor.js';
|
|
|
23
23
|
import { allowEgressForBaseUrl, getActiveEgressBroker, getEgressPosture } from '../sidecar/egress-proxy.js';
|
|
24
24
|
import { buildExecSandbox, parseExecPolicy } from '../sidecar/exec-sandbox.js';
|
|
25
25
|
import { clampExecPolicy } from '../host-tools.js';
|
|
26
|
-
import { getResolvedHostTools, isProductLlmLocked, resolveRuntimeLlmSettings, resolveTurnApproval, resolveTurnChatMode, } from '../host-tools-runtime.js';
|
|
26
|
+
import { getResolvedHostTools, isProductLlmLocked, resolveRuntimeLlmSettings, resolveTurnApproval, resolveTurnChatMode, resolveTurnOrchestration, } from '../host-tools-runtime.js';
|
|
27
27
|
import { SidecarSupervisor } from '../sidecar/index.js';
|
|
28
28
|
import { diagnoseLlmConnection } from './llm-diagnose.js';
|
|
29
29
|
import { brandSkillVars, buildSystemPrompt, buildForcedSkillMessage, conditionsFromTools, } from './prompt-builder.js';
|
|
@@ -3085,10 +3085,10 @@ export class LocalBackendRouter {
|
|
|
3085
3085
|
// 子运行执行,生命周期经 onChildEvent → SSE 进 UI 编排卡片。
|
|
3086
3086
|
subagent,
|
|
3087
3087
|
// 六件套(agent_spawn/send/wait/close/list/interrupt)收缩为
|
|
3088
|
-
// opt-in 高级模式:STEERABLE_ORCHESTRATION
|
|
3089
|
-
// delegate 共享同一 AgentPool(同一 maxParallel 预算)。
|
|
3090
|
-
...(
|
|
3091
|
-
? { orchestration:
|
|
3088
|
+
// opt-in 高级模式:STEERABLE_ORCHESTRATION 环境变量、回合 payload 或 product.json.orchestration 开启;
|
|
3089
|
+
// 开启后与 delegate 共享同一 AgentPool(同一 maxParallel 预算)。
|
|
3090
|
+
...(resolveTurnOrchestration(payload)
|
|
3091
|
+
? { orchestration: resolveTurnOrchestration(payload) }
|
|
3092
3092
|
: {}),
|
|
3093
3093
|
signal,
|
|
3094
3094
|
onText: (delta) => {
|
package/dist/product-config.d.ts
CHANGED
|
@@ -106,6 +106,16 @@ export interface ProductConfig {
|
|
|
106
106
|
cwd?: string;
|
|
107
107
|
enabled?: boolean;
|
|
108
108
|
}>;
|
|
109
|
+
/**
|
|
110
|
+
* P3.1 多智能体编排六件套 (agent_spawn / agent_wait / agent_send / agent_interrupt / agent_close / agent_list)。
|
|
111
|
+
* 缺省关(仅开 delegate_subagent);设为 true 或配置对象时在回合中启用。
|
|
112
|
+
* STEERABLE_ORCHESTRATION 环境变量('1' 开启,'0' 显式关闭)优先级更高。
|
|
113
|
+
*/
|
|
114
|
+
orchestration?: boolean | {
|
|
115
|
+
enabled?: boolean;
|
|
116
|
+
maxDepth?: number;
|
|
117
|
+
maxParallel?: number;
|
|
118
|
+
};
|
|
109
119
|
}
|
|
110
120
|
/** shell 内置智能体:只有产品显式 `true` 才开。 */
|
|
111
121
|
export declare function isShellBuiltinAgentEnabled(id: 'local-assistant' | 'all-round-assistant', config?: ProductConfig): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steerable/agent-shell",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.51",
|
|
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/",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"he": "^1.2.0",
|
|
56
56
|
"node-pty": "^1.1.0",
|
|
57
57
|
"semver": "^7.8.0",
|
|
58
|
-
"@steerable/agent-harness": "0.6.
|
|
59
|
-
"@steerable/
|
|
60
|
-
"@steerable/
|
|
58
|
+
"@steerable/agent-harness": "0.6.51",
|
|
59
|
+
"@steerable/agent-protocol": "0.6.51",
|
|
60
|
+
"@steerable/pack-sdk": "0.6.51"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/better-sqlite3": "^7.6.13",
|