@ai-workbench/remote-agent 0.9.0-toolbridge.35 → 0.9.0-toolbridge.37-rc.4
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/README.md +13 -7
- package/dist/acp.d.ts +4 -3
- package/dist/acp.js +6 -8
- package/dist/claude-local.d.ts +0 -3
- package/dist/claude-local.js +5 -56
- package/dist/cold-protocol.d.ts +1 -0
- package/dist/cold-protocol.js +14 -7
- package/dist/cold-recovery.d.ts +1 -0
- package/dist/cold-recovery.js +2 -2
- package/dist/cold-store.d.ts +0 -1
- package/dist/custom-instructions.d.ts +6 -0
- package/dist/custom-instructions.js +21 -0
- package/dist/employee-mcp.js +3 -5
- package/dist/employee-native.d.ts +2 -2
- package/dist/employee-native.js +1 -1
- package/dist/employee-provider.js +2 -2
- package/dist/employee-relay.js +1 -1
- package/dist/employee-tools.js +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +34 -74
- package/dist/input.d.ts +2 -9
- package/dist/input.js +13 -62
- package/dist/native-content-transport.d.ts +42 -0
- package/dist/native-content-transport.js +83 -0
- package/dist/native-content.d.ts +67 -0
- package/dist/native-content.js +294 -0
- package/dist/preflight-payload.js +1 -1
- package/dist/presentation.js +0 -2
- package/dist/provider.d.ts +5 -7
- package/dist/provider.js +0 -3
- package/dist/toolbridge-loop.js +1 -1
- package/dist/toolbridge-table.d.ts +5 -3
- package/dist/toolbridge-table.js +6 -15
- package/dist/toolbridge.js +21 -32
- package/dist/workspace-source.d.ts +1 -1
- package/package.json +7 -5
- package/dist/local-user-turn.d.ts +0 -24
- package/dist/local-user-turn.js +0 -103
package/README.md
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
# AI Workbench 远程助手 · @ai-workbench/remote-agent@0.9.0-toolbridge.
|
|
1
|
+
# AI Workbench 远程助手 · @ai-workbench/remote-agent@0.9.0-toolbridge.37-rc.4 · 插件 → 添加插件
|
|
2
|
+
|
|
3
|
+
本版为 0.3.8 配套的预发布验证版本,正式渠道仍为总包 0.3.7 / X.36。只有三版 DSH、真实模型、主机与独审门全部通过后才转正式。
|
|
4
|
+
|
|
5
|
+
本版撤除插件自行拼写的系统规则、位置说明和技能目录说明。模型接收员工输入、原工具描述、CLI 原生上下文,以及员工显式配置的自定义指令原文。DSH 系统规则不转送;同一 DSH 会话切换品牌时仍补带可见对话及角色结构。插件控制诊断留在技术详情,不混入模型回复或下一轮历史。I3 规则重注入、摘要回执与 v2 协商已整体删除。
|
|
6
|
+
|
|
7
|
+
DSH 已公布目录的技能与资源同步到两端同一受控绝对路径,SKILL 正文使用同一作用域的官方 skills.get() 原文,原 frontmatter、资源文件字节与可执行位保留;项目 AGENTS.md/CLAUDE.md 原文镜像后由 CLI 原生读取。Claude 使用原生插件技能入口,Codex 使用原生 skills/extraRoots/set;新轮次与冷恢复均更新原生目录。实际文件和命令仍由员工执行器执行。纯正文虚拟技能保留官方正文;未提供可镜像出口的 URL/opaque 资源明确报既有上下文不可用;主机原有技能中写死的任意主机脚本路径尚未证明可在员工端使用。
|
|
8
|
+
|
|
9
|
+
Claude 原生 Agent/TaskStop 与 Codex 原生子代理首轮可用。Codex 只把技能、办公依赖必需桥工具置于 employee 首轮分组,DSH 子代理及其余工具在 dsh 分组按需发现。保留 B6 原生插话、冷恢复、防重放、U1 每次 prompt 用量和原生型号、推理档、权限设置。含桥主机需 2.2.2-aw.17(Codex 0.162.0);不含桥通道不变。没有新增设置项或自定义错误码。
|
|
2
10
|
|
|
3
11
|
## 办公依赖与开工计时(O1,2026-11-15)
|
|
4
12
|
|
|
@@ -10,7 +18,7 @@
|
|
|
10
18
|
|
|
11
19
|
## 含工具桥预发布线
|
|
12
20
|
|
|
13
|
-
本包为 `0.9.0-toolbridge.
|
|
21
|
+
本包为 `0.9.0-toolbridge.37-rc.4`,从 `v0.9.0-toolbridge.14` 派生,使用 `host-toolbridge` 发布渠道。员工安装由连接组件提供的「AI 写作工作台(含工具桥)」总包 `@ai-workbench/workbench-toolbridge@0.3.7`;0.3.8 尚未转正式,与不含工具桥的版本二选一。
|
|
14
22
|
|
|
15
23
|
本轮增加两家运行中插话(DSH 原生 nextStep),保留官方队列和原话;明确 followup 仍排下一轮。Codex 含桥组件需 `2.2.2-aw.12`,Claude 仍为官方 `0.94.0`。插件确定消息未发出时保留排队资格;送达未确认时明确报错且不重放。已注入旧正文不能撤回,编辑版下一步骤交付。
|
|
16
24
|
|
|
@@ -37,7 +45,7 @@ Codex 需要 S 后续安装的独立受保护命令 `/usr/local/aw-host/bin/code
|
|
|
37
45
|
|
|
38
46
|
Claude 员工MCP的stdio通道保持在当前原生客户端上。底层员工SSH/Unix流断开时,在途工具只返回结果未知,不重放;连接恢复后下一次新工具调用串行重新连接并初始化。同一DSH会话无需新建;若连接/绑定已撤销或DSH桥工具在途结束本轮,网络恢复后在原会话发新消息,沿原生编号续接。只使用原已核验的设备/账户/绑定,不跨代偷接。
|
|
39
47
|
|
|
40
|
-
DSH技能工具仅使用DSH公布的目录,主机原生技能按各自原生指令加载;本机文件夹下主机 Claude 的主会话和子代理都能用原生 Skill 加载主机账户的用户级技能(0.9.0-toolbridge.20 起),技能里的 `!` 内联命令需要原生 Bash,原生 Bash
|
|
48
|
+
DSH技能工具仅使用DSH公布的目录,主机原生技能按各自原生指令加载;本机文件夹下主机 Claude 的主会话和子代理都能用原生 Skill 加载主机账户的用户级技能(0.9.0-toolbridge.20 起),技能里的 `!` 内联命令需要原生 Bash,原生 Bash 仍关闭,所以不会在主机执行,该技能加载失败并明确报错;桥接工具描述仅使用 DSH 原文;同步后的原生技能入口提供资源路径。
|
|
41
49
|
|
|
42
50
|
Claude 本机 Bash 会单独消费员工桥代理的控制诊断,不把它交给模型当作命令输出;真实传输中断仍提示结果未知。命令自身的标准输出、标准错误与退出码照常返回。非UTF-8流不拒绝,按原始字节base64返回并增加对应stdoutEncoding/stderrEncoding标记;有效UTF-8格式不变。没有新增原始字节上限,编码后的消息沿既有512MB容量核验。
|
|
43
51
|
|
|
@@ -87,11 +95,9 @@ Codex 员工端只使用随包提供的原生组件,通道等待本次组件
|
|
|
87
95
|
|
|
88
96
|
模型目录在官方启动读取时获取,并在连接变为 connected 时经官方注册刷新;官方菜单打开或重试读取缓存是 DSH 官方限制,本插件不改官方菜单或核心。真正不支持的推理档位由 DSH 预检,其英文提示保留为观察项。
|
|
89
97
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
T3(0.9.0-toolbridge.35):Claude开放原生ToolSearch;六个员工文件/命令工具与DSH的skill、load_workspace_dependencies入口首轮可见,其余扩展工具按CLI原生搜索策略加载。工具集合、参数、审批和员工目录执行保持。Codex同题延期试验出现多次发现且依赖桥未到,按本次决定继续首轮全量,主机保持aw.16。本人本机同题Claude实际调用办公技能、依赖及重算,44个公式都有计算缓存;首输入23,047(直接CLI29,165),Sonnet主模型输入170,720(直接CLI170,730);另有Haiku辅助型号元数据2,049,按可见型号元数据合计输入输出176,557(直接CLI175,231,约+0.76%),辅助型号未取得逐API正文。这是单次本机样本,工具流程和输出不同,不能把差额全部归因于代码或推算一般费用。
|
|
98
|
+
U1(本版保留):Codex 和 Claude 的 ACP 用量按本次 prompt 逐轮全额结算一次,不减历史基线。冷接回只减同一 prompt 已在 DSH 落盘的部分;可靠终态先持久化,原 broker 回收后仍可补记未落盘用量。订阅额度卡读取官方额度窗口,不由 token 数推算百分比。旧 I3 系统规则传递机制已删除。
|
|
93
99
|
|
|
94
|
-
T3(0.9.0-toolbridge.33):在已连接、当前员工目录已接纳的 Codex 路径,同轮登录核验与端点准备重叠;两项均成功并再次核对目标、连接代次与物理目录后才开工,每轮核验与正常完成后结束 broker 的做法保留。当前输入已完整列出同一技能目录时,skill 工具省去重复名字数组;目录不完整或只有历史目录时保留原快照。未改变首轮工具可见性,没有新增设置、限制或错误码。本机受控时延与工具字节测量不代表远机实测速率或实际 API token 节省;DSH
|
|
100
|
+
T3(0.9.0-toolbridge.33):在已连接、当前员工目录已接纳的 Codex 路径,同轮登录核验与端点准备重叠;两项均成功并再次核对目标、连接代次与物理目录后才开工,每轮核验与正常完成后结束 broker 的做法保留。当前输入已完整列出同一技能目录时,skill 工具省去重复名字数组;目录不完整或只有历史目录时保留原快照。未改变首轮工具可见性,没有新增设置、限制或错误码。本机受控时延与工具字节测量不代表远机实测速率或实际 API token 节省;DSH 原生本轮因缺独立登录未测。
|
|
95
101
|
|
|
96
102
|
B6(0.9.0-toolbridge.30,本版继承):Codex 员工执行环境接纳原生 turn/steer,含桥主机组件需 aw.16;冷恢复承接 DSH 准备阶段已固定的当前模型与推理档,不再在后置请求钩子用失败轮配置改档;历史专用元数据保留原轮模型和 native 关联。原失败冷轮可落定并按原 native 会话继续,原输入不重放。U1 的本次 prompt 用量修复来自 X.28,本版继续保留。
|
|
97
103
|
|
package/dist/acp.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { NativeSessionContent } from './native-content-transport.ts';
|
|
1
2
|
import type { StartupTiming } from './startup-timing.ts';
|
|
2
3
|
import { CloseDiagnostics, type CloseCause } from './close-diagnostics.ts';
|
|
3
4
|
import * as stable from '@agentclientprotocol/sdk';
|
|
@@ -40,10 +41,10 @@ export interface EmployeeExecutionMeta {
|
|
|
40
41
|
acpMaxMessageBytes: number;
|
|
41
42
|
}
|
|
42
43
|
export interface AcpStartContext {
|
|
44
|
+
nativeContent?: NativeSessionContent;
|
|
43
45
|
initialModel?: string;
|
|
44
46
|
toolBridgeServers?: EmployeeRouting['mcpServers'];
|
|
45
|
-
|
|
46
|
-
systemPromptChanged?: boolean;
|
|
47
|
+
customInstructions?: string;
|
|
47
48
|
codexNewSessionOnly?: true;
|
|
48
49
|
employeeExecution?: EmployeeExecutionMeta;
|
|
49
50
|
employeeRouting?: EmployeeRouting;
|
|
@@ -129,7 +130,7 @@ export declare class AcpSession {
|
|
|
129
130
|
setHooks(hooks: AcpHooks): void;
|
|
130
131
|
get closed(): Promise<void>;
|
|
131
132
|
start(cwd: string, resumeId?: string, signal?: AbortSignal, context?: AcpStartContext, prompt?: acp.ContentBlock[]): Promise<string>;
|
|
132
|
-
/**
|
|
133
|
+
/** 续接保留原生线程,不向既有历史注入插件规则。 */
|
|
133
134
|
prompt(input: string | acp.ContentBlock[], signal?: AbortSignal): Promise<acp.StopReason>;
|
|
134
135
|
steer(prompt: acp.ContentBlock[], signal?: AbortSignal, isCurrent?: () => boolean, maxBytes?: number): Promise<'injected' | 'promptRequired'>;
|
|
135
136
|
close(cause?: CloseCause, error?: Error): void;
|
package/dist/acp.js
CHANGED
|
@@ -556,22 +556,20 @@ export class AcpSession {
|
|
|
556
556
|
this.steeringSupported = steering?.supported === true && (!context?.codexNewSessionOnly || steering.idleBehavior === 'promptRequired');
|
|
557
557
|
if (this.employeeMeta) {
|
|
558
558
|
const policy = record(hello._meta?.awEmployeeExecution);
|
|
559
|
-
if (!this.hooks.employeeExecution || !policy || Object.keys(policy).length !== (context?.toolBridgeServers ? 6 : 5) || context?.toolBridgeServers && policy.mcpBridge !== 1 || policy.version !== 1 || policy.nativeCliVersion !== '0.
|
|
559
|
+
if (!this.hooks.employeeExecution || !policy || Object.keys(policy).length !== (context?.toolBridgeServers ? 6 : 5) || context?.toolBridgeServers && policy.mcpBridge !== 1 || policy.version !== 1 || policy.nativeCliVersion !== '0.162.0' || policy.native !== true || policy.perRpcGate !== true || policy.noHostFallback !== true)
|
|
560
560
|
throw new NeedError('EMPLOYEE_EXECUTION_UNSUPPORTED', '当前主机尚不支持在你的电脑执行Codex原生工具,本轮没有执行。', 'Codex员工端原生执行适配器与明确能力声明');
|
|
561
561
|
this.employeeNegotiated = true;
|
|
562
|
-
this.detail({ kind: 'session', severity: 'info', code: 'EMPLOYEE_EXECUTION_SELECTED', summary: '文件和命令在员工电脑的选定目录执行;订阅凭据留在主机,本机扩展的忽略详情单独记录。', payload: { bindingId: this.employeeMeta.bindingId, workspaceId: this.employeeMeta.workspaceId, cwd: this.employeeMeta.cwd, nativeCliVersion: '0.
|
|
562
|
+
this.detail({ kind: 'session', severity: 'info', code: 'EMPLOYEE_EXECUTION_SELECTED', summary: '文件和命令在员工电脑的选定目录执行;订阅凭据留在主机,本机扩展的忽略详情单独记录。', payload: { bindingId: this.employeeMeta.bindingId, workspaceId: this.employeeMeta.workspaceId, cwd: this.employeeMeta.cwd, nativeCliVersion: '0.162.0', noHostFallback: true, agentConfigSource: 'host CODEX_HOME', unsupportedLocalFeatures: ['http-mcp-execution', 'hooks', 'plugins', 'cold-resume', 'slash-commands', 'host-file-reports'] } });
|
|
563
563
|
}
|
|
564
|
-
const systemPrompt = context?.systemPrompt;
|
|
565
|
-
const resumePolicy = record(this.negotiated._meta?.aiWorkbenchSystemPrompt);
|
|
566
|
-
const nativeContext = !!resumeId && !!context?.codexNewSessionOnly && resumePolicy?.version === 2;
|
|
567
564
|
const initialPolicy = record(this.negotiated._meta?.aiWorkbenchInitialModel);
|
|
568
565
|
const initialModel = !resumeId && context?.codexNewSessionOnly && initialPolicy?.version === 1 && initialPolicy?.scope === 'new-session' ? context.initialModel : undefined;
|
|
569
566
|
this.codexNewSessionOnly = !!context?.codexNewSessionOnly;
|
|
570
567
|
if (prompt)
|
|
571
568
|
this.validatePrompt(prompt);
|
|
572
569
|
const routing = context?.employeeRouting ? structuredClone(context.employeeRouting) : undefined;
|
|
573
|
-
const
|
|
574
|
-
const
|
|
570
|
+
const plugins = context?.nativeContent ? [{ type: 'local', path: context.nativeContent.claudePluginRoot }] : undefined;
|
|
571
|
+
const claudeCode = routing ? { options: { ...employeeClaudeOptions(routing), ...(plugins ? { plugins } : {}) } } : this.codexNewSessionOnly ? undefined : { options: { settings: claudeSettings(), ...(plugins ? { plugins } : {}) } };
|
|
572
|
+
const params = { cwd, mcpServers: context?.toolBridgeServers ? structuredClone(context.toolBridgeServers) : routing ? structuredClone(routing.mcpServers) : [], ...((claudeCode || this.employeeMeta || initialModel || context?.customInstructions !== undefined || context?.nativeContent) ? { _meta: { ...(this.codexNewSessionOnly && context?.nativeContent ? { awNativeSkills: { root: context.nativeContent.codexSkillsRoot } } : {}), ...(context?.customInstructions === undefined ? {} : { jetbrains: { air: { customInstructions: context.customInstructions } } }), ...(initialModel ? { awInitialModel: { version: 1, model: initialModel } } : {}), ...(this.employeeMeta ? { awEmployeeExecution: this.employeeMeta } : {}), ...(claudeCode ? { claudeCode } : {}) } } : {}) };
|
|
575
573
|
const configRevision = this.resetConfiguration();
|
|
576
574
|
const restore = async (operation) => {
|
|
577
575
|
try {
|
|
@@ -637,7 +635,7 @@ export class AcpSession {
|
|
|
637
635
|
signal?.removeEventListener('abort', abort);
|
|
638
636
|
}
|
|
639
637
|
}
|
|
640
|
-
/**
|
|
638
|
+
/** 续接保留原生线程,不向既有历史注入插件规则。 */
|
|
641
639
|
async prompt(input, signal) {
|
|
642
640
|
if (!this.ready || !this.sessionId)
|
|
643
641
|
throw new NeedError('SESSION_REQUIRED', '我需要先建立远端会话', 'ACP 会话');
|
package/dist/claude-local.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import { createEmployeeShell, type EmployeeShell } from './employee-shell.ts';
|
|
|
5
5
|
import type { EmployeeRouting } from './employee-relay.ts';
|
|
6
6
|
import { type ConnectApi, type ConnectTarget, type Project, type Runtime, type RuntimeRequest, type LocalRuntimeProvider, type ConnectionState } from './provider.ts';
|
|
7
7
|
import type { DetailChannel } from './remote-details.ts';
|
|
8
|
-
import type { LocalTurnProof } from './local-user-turn.ts';
|
|
9
8
|
import type { DetailObservation } from './conversation-details.ts';
|
|
10
9
|
interface Configuration {
|
|
11
10
|
acpMaxMessageBytes?: number;
|
|
@@ -17,8 +16,6 @@ interface Options {
|
|
|
17
16
|
getNetwork: () => EmployeeNetworkApi | undefined;
|
|
18
17
|
readWorkspace: (sessionId: string) => Promise<EmployeeWorkspace>;
|
|
19
18
|
configuration: () => Configuration;
|
|
20
|
-
readUserTurn: (request: RuntimeRequest) => Promise<LocalTurnProof>;
|
|
21
|
-
reportAdmissionFailure: (request: RuntimeRequest, code: string) => Promise<void>;
|
|
22
19
|
recordUnscoped: (request: RuntimeRequest, event: DetailObservation) => Promise<void>;
|
|
23
20
|
details: (request: RuntimeRequest, api: ConnectApi, connection: ConnectionState, target: ConnectTarget) => Promise<DetailChannel>;
|
|
24
21
|
open: (target: ConnectTarget, project: Project, request: RuntimeRequest) => Promise<Runtime>;
|
package/dist/claude-local.js
CHANGED
|
@@ -8,61 +8,15 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
|
|
|
8
8
|
};
|
|
9
9
|
import { EMPLOYEE_EXECUTION_NOTICE as NOTICE } from "./employee-presentation.js";
|
|
10
10
|
import { CloseDiagnostics, closeCode } from "./close-diagnostics.js";
|
|
11
|
-
import { isDeepStrictEqual } from 'node:util';
|
|
12
11
|
import { openEmployeeLease } from "./employee-endpoint.js";
|
|
13
12
|
import { openEmployeeMcp } from "./employee-mcp.js";
|
|
14
13
|
import { createEmployeeShell } from "./employee-shell.js";
|
|
15
|
-
import { unwrap } from "./provider.js";
|
|
16
14
|
import { sshIo } from "./broker.js";
|
|
17
15
|
import { NeedError, shellQuote } from "./remote.js";
|
|
18
|
-
import { awaitL } from "./provider.js";
|
|
19
16
|
const failure = (code) => new NeedError(code, '当前本机执行上下文无法确认,本轮已停止;没有改在主机执行。', 'L当前本地绑定、N员工端点与S同代桥');
|
|
20
17
|
/** Local source only. Host source remains with the host provider. */
|
|
21
18
|
export function createClaudeLocalProvider(options) {
|
|
22
19
|
const entries = new Map();
|
|
23
|
-
const admitted = new WeakMap();
|
|
24
|
-
const admit = async (request, api, connection, target) => {
|
|
25
|
-
if (admitted.has(request))
|
|
26
|
-
return;
|
|
27
|
-
try {
|
|
28
|
-
if (api.getContractInfo?.().workspaceLocations !== 1)
|
|
29
|
-
return;
|
|
30
|
-
const local = api;
|
|
31
|
-
if (typeof local.getWorkspaceLocationState !== 'function')
|
|
32
|
-
throw failure('EMPLOYEE_CONTEXT_UNAVAILABLE');
|
|
33
|
-
const workspace = await options.readWorkspace(request.sessionId), state = local.getWorkspaceLocationState(), matches = state.items.filter(row => row.workspaceId === workspace.workspaceId);
|
|
34
|
-
if (matches.length === 1 && matches[0].source === 'host')
|
|
35
|
-
return; // Host state/Need belongs to the host resolver, before local admission.
|
|
36
|
-
if (matches.length !== 1 || state.phase !== 'ready' || state.instanceId !== connection.instanceId || state.epoch !== connection.epoch)
|
|
37
|
-
throw failure('EMPLOYEE_CONTEXT_CHANGED');
|
|
38
|
-
const item = matches[0];
|
|
39
|
-
if (item.source !== 'local')
|
|
40
|
-
return;
|
|
41
|
-
if (item.status !== 'selected' || !item.bindingId || api.getContractInfo?.().localWorkspaceContext !== 1 || typeof local.getLocalWorkspaceContext !== 'function')
|
|
42
|
-
throw failure('EMPLOYEE_CONTEXT_UNAVAILABLE');
|
|
43
|
-
const context = unwrap(await awaitL(() => local.getLocalWorkspaceContext({ instanceId: connection.instanceId, epoch: connection.epoch, workspaceId: workspace.workspaceId, expectedBindingId: item.bindingId }), request.signal));
|
|
44
|
-
if (context.instanceId !== connection.instanceId || context.epoch !== connection.epoch || context.workspaceId !== workspace.workspaceId || context.bindingId !== item.bindingId || context.source !== 'local' || !isDeepStrictEqual(context.directory, workspace.directory))
|
|
45
|
-
throw failure('EMPLOYEE_CONTEXT_CHANGED');
|
|
46
|
-
const proof = await options.readUserTurn(request);
|
|
47
|
-
proof.assertCurrent();
|
|
48
|
-
request.signal?.throwIfAborted();
|
|
49
|
-
const now = api.getConnectionState();
|
|
50
|
-
if (options.getConnect() !== api || now.phase !== 'connected' || now.instanceId !== connection.instanceId || now.epoch !== connection.epoch)
|
|
51
|
-
throw failure('CONNECTION_LOST');
|
|
52
|
-
request.detailChannel = await options.details(request, api, connection, target);
|
|
53
|
-
admitted.set(request, { api, workspace: structuredClone(workspace), bindingId: item.bindingId, connection: structuredClone(connection) });
|
|
54
|
-
}
|
|
55
|
-
catch (error) {
|
|
56
|
-
const code = error instanceof NeedError ? error.code : 'LOCAL_ADMISSION_FAILED';
|
|
57
|
-
try {
|
|
58
|
-
await options.reportAdmissionFailure(request, code);
|
|
59
|
-
}
|
|
60
|
-
catch {
|
|
61
|
-
throw new NeedError(code, '本轮输入无法核对,已停止本次处理;诊断保存也未完成。', '原原因 ' + code + ';私有诊断 REMOTE_DETAIL_STORAGE_FAILED');
|
|
62
|
-
}
|
|
63
|
-
throw error;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
20
|
const resolve = async (request, api, connection, target) => {
|
|
67
21
|
if (api.getContractInfo?.().workspaceLocations !== 1)
|
|
68
22
|
return;
|
|
@@ -75,12 +29,7 @@ export function createClaudeLocalProvider(options) {
|
|
|
75
29
|
const item = matches[0];
|
|
76
30
|
if (item.source !== 'local')
|
|
77
31
|
return;
|
|
78
|
-
if (!
|
|
79
|
-
await admit(request, api, connection, target);
|
|
80
|
-
const acceptance = admitted.get(request);
|
|
81
|
-
if (!acceptance || acceptance.api !== api || acceptance.bindingId !== item.bindingId || acceptance.connection.instanceId !== connection.instanceId || acceptance.connection.epoch !== connection.epoch || !isDeepStrictEqual(acceptance.workspace, workspace))
|
|
82
|
-
throw failure('EMPLOYEE_CONTEXT_CHANGED');
|
|
83
|
-
if (item.status !== 'selected' || !item.bindingId || local.getContractInfo().localWorkspaceContext !== 1)
|
|
32
|
+
if (item.status !== 'selected' || !item.bindingId)
|
|
84
33
|
throw failure('EMPLOYEE_CONTEXT_UNAVAILABLE');
|
|
85
34
|
if (request.cwd && request.cwd !== workspace.directory.path || request.bindingId && request.bindingId !== item.bindingId || request.workspaceId && request.workspaceId !== workspace.workspaceId)
|
|
86
35
|
throw failure('SESSION_CONTEXT_MISMATCH');
|
|
@@ -94,12 +43,13 @@ export function createClaudeLocalProvider(options) {
|
|
|
94
43
|
void entry.runtime.dispose?.({ layer: 'runtime', initiator: 'claude.next-round', reason: 'NEXT_ROUND', action: 'dispose' }).catch(() => console.warn('CLAUDE_CLEANUP_FAILED'));
|
|
95
44
|
entry = undefined;
|
|
96
45
|
}
|
|
97
|
-
const details = request
|
|
46
|
+
const details = await options.details(request, api, connection, target);
|
|
47
|
+
request.detailChannel = details;
|
|
98
48
|
const closeDiagnostics = new CloseDiagnostics(event => details.record(event));
|
|
99
49
|
closeDiagnostics.bind(event => details.record(event));
|
|
100
50
|
request.closeDiagnostics = closeDiagnostics;
|
|
101
51
|
details.record({ kind: 'session', severity: 'info', code: 'CLAUDE_EMPLOYEE_VALIDATION_POLICY', summary: '本机执行不可改到主机:每轮开始从L读取一次本机工作区上下文,核验所选物理目录、N端点与主机目标,并新建本轮工具通道。之后不逐消息、审批或工具重复核验;既有连接、位置、网络事件和通道关闭只终止本轮,下一轮重新核验。' });
|
|
102
|
-
const openRequest = () => ({ ...request, detailChannel: details, bindingId: item.bindingId, workspaceId: workspace.workspaceId, bindingRevision: state.revision });
|
|
52
|
+
const openRequest = () => ({ ...request, detailChannel: details, bindingId: item.bindingId, workspaceId: workspace.workspaceId, nativeEmployeeCwd: workspace.directory.path, bindingRevision: state.revision });
|
|
103
53
|
let io;
|
|
104
54
|
const transport = async () => { if (!io) {
|
|
105
55
|
const name = '@ai-workbench/connect';
|
|
@@ -155,7 +105,7 @@ export function createClaudeLocalProvider(options) {
|
|
|
155
105
|
});
|
|
156
106
|
};
|
|
157
107
|
const executionSignal = modelLifetime.signal;
|
|
158
|
-
row.runtime = { ...underlying, localDirectory: { ...workspace.directory }, closeDiagnostics, cwd: workspace.directory.path, details, connection: { ...connection }, binding: { bindingId: item.bindingId, workspaceId: workspace.workspaceId, revision: state.revision }, execution: { hostCwd: target.session.root, routing: mcp.routing, notice: NOTICE, signal: executionSignal, scope: { source: 'local', cwd: workspace.directory.path, hostCwd: target.session.root, uid: lease.target.endpoint.remoteUid, claudeAcpVersion: '0.94.0', sdkVersion: '0.3.303', unsupported: ['internal-direct-calls', 'binary-read', 'background-shell'] }, validate: async (signal) => { signal?.throwIfAborted(); lease.signal.throwIfAborted(); executionSignal.throwIfAborted(); }, beginTurn: async (signal) => { signal?.throwIfAborted(); lease.signal.throwIfAborted(); executionSignal.throwIfAborted(); if (row.closing || row.active)
|
|
108
|
+
row.runtime = { ...underlying, localDirectory: { ...workspace.directory }, closeDiagnostics, cwd: workspace.directory.path, details, connection: { ...connection }, binding: { bindingId: item.bindingId, workspaceId: workspace.workspaceId, revision: state.revision }, execution: { hostCwd: base.nativeContent?.hostCwd ?? target.session.root, routing: mcp.routing, notice: NOTICE, signal: executionSignal, scope: { source: 'local', cwd: workspace.directory.path, hostCwd: base.nativeContent?.hostCwd ?? target.session.root, uid: lease.target.endpoint.remoteUid, claudeAcpVersion: '0.94.0', sdkVersion: '0.3.303', unsupported: ['internal-direct-calls', 'binary-read', 'background-shell'] }, validate: async (signal) => { signal?.throwIfAborted(); lease.signal.throwIfAborted(); executionSignal.throwIfAborted(); }, beginTurn: async (signal) => { signal?.throwIfAborted(); lease.signal.throwIfAborted(); executionSignal.throwIfAborted(); if (row.closing || row.active)
|
|
159
109
|
throw failure('TURN_BUSY'); row.active = { signal, details: row.details }; }, endTurn: () => { row.active = undefined; } }, dispose: cause => close(false, cause), detach: cause => close(true, cause) };
|
|
160
110
|
entries.set(request.sessionId, row);
|
|
161
111
|
const endpointAborted = () => {
|
|
@@ -189,6 +139,5 @@ export function createClaudeLocalProvider(options) {
|
|
|
189
139
|
throw error;
|
|
190
140
|
}
|
|
191
141
|
};
|
|
192
|
-
resolve.admit = admit;
|
|
193
142
|
return resolve;
|
|
194
143
|
}
|
package/dist/cold-protocol.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare function recoverColdProtocol(record: ColdRound, store: ColdStore,
|
|
|
11
11
|
maxMessageBytes: number;
|
|
12
12
|
signal?: AbortSignal;
|
|
13
13
|
markerId?: string;
|
|
14
|
+
notice?: (text: string) => void;
|
|
14
15
|
cancelOnly?: boolean;
|
|
15
16
|
}): AsyncGenerator<StreamChunk>;
|
|
16
17
|
/** 本地未派发取消的证明来自写前记录或S消息回执,不伪造原生RPC终态。 */
|
package/dist/cold-protocol.js
CHANGED
|
@@ -63,7 +63,7 @@ const LOGIN_ENDED = '\n上一轮因主机会话的登录已失效没有完成,
|
|
|
63
63
|
/** The checkpoint that commits the original round and lets the next round resume its native thread. */
|
|
64
64
|
function coldPointer(record, outputAfter) {
|
|
65
65
|
const snapshot = record.meta;
|
|
66
|
-
return { ...(snapshot.hostSource ? { hostSource: snapshot.hostSource } : {}), ...(snapshot.modelConfiguration ? { modelConfiguration: snapshot.modelConfiguration } : {}), version: 2, agent: record.provider,
|
|
66
|
+
return { ...(snapshot.hostSource ? { hostSource: snapshot.hostSource } : {}), ...(snapshot.modelConfiguration ? { modelConfiguration: snapshot.modelConfiguration } : {}), version: 2, agent: record.provider, dshSessionId: record.sessionId, identity: snapshot.identity, cwd: snapshot.cwd, sessionId: record.nativeId, ...(snapshot.binding ? { bindingId: snapshot.binding.bindingId, workspaceId: snapshot.binding.workspaceId } : {}), coldRoundId: record.id, coldPromptId: record.promptId, coldRoundTerminal: true, coldOutputAfter: outputAfter };
|
|
67
67
|
}
|
|
68
68
|
export async function* recoverColdProtocol(record, store, prefix, options) {
|
|
69
69
|
options.signal?.throwIfAborted();
|
|
@@ -91,7 +91,7 @@ export async function* recoverColdProtocol(record, store, prefix, options) {
|
|
|
91
91
|
for (const chunk of ended.acpResponse(record.terminal.value))
|
|
92
92
|
if (chunk.type === 'usage')
|
|
93
93
|
yield* remainingUsage(chunk.usage, prefix.usage);
|
|
94
|
-
|
|
94
|
+
options.notice?.(HOST_ROUND_ENDED);
|
|
95
95
|
yield* ended.flush();
|
|
96
96
|
yield { type: 'finish', reason: { kind: 'stop' }, replayState: { response: coldPointer(record, record.terminalAfter ?? record.outputStart ?? record.outputAfter) } };
|
|
97
97
|
return;
|
|
@@ -272,13 +272,20 @@ export async function* recoverColdProtocol(record, store, prefix, options) {
|
|
|
272
272
|
})();
|
|
273
273
|
// Keep the reader alive independently while outgoing controls await a new replay barrier.
|
|
274
274
|
activePump = pump;
|
|
275
|
-
|
|
276
|
-
|
|
275
|
+
if (record.meta.prelude) {
|
|
276
|
+
trim.take('text', record.meta.prelude);
|
|
277
|
+
options.notice?.(record.meta.prelude);
|
|
278
|
+
}
|
|
277
279
|
mapper.flush();
|
|
278
280
|
let nativeUpdates = 0, noticeIndex = 0;
|
|
279
281
|
const notices = function* () { while (record.localNotices?.[noticeIndex]?.beforeUpdate === nativeUpdates) {
|
|
280
282
|
const notice = record.localNotices[noticeIndex++];
|
|
281
|
-
|
|
283
|
+
if (notice.kind === undefined) {
|
|
284
|
+
trim.take('text', notice.text);
|
|
285
|
+
options.notice?.(notice.text);
|
|
286
|
+
}
|
|
287
|
+
else
|
|
288
|
+
yield* projection(mapper.text(notice.text, notice.kind === 'reasoning'));
|
|
282
289
|
} };
|
|
283
290
|
yield* notices();
|
|
284
291
|
for (;;) {
|
|
@@ -337,7 +344,7 @@ export async function* recoverColdProtocol(record, store, prefix, options) {
|
|
|
337
344
|
if (options.markerId && acpNeed(new acp.RequestError(m.error.code, m.error.message, m.error.data)).code === 'LOGIN_REQUIRED') {
|
|
338
345
|
await options.io.run(command(['kill', record.brokerId, '--if-instance', record.instanceId]), options.signal).catch(() => { options.signal?.throwIfAborted(); console.warn('[remote-agent] 旧主机会话暂未清理,将由主机自动回收'); });
|
|
339
346
|
yield* output.flush();
|
|
340
|
-
|
|
347
|
+
options.notice?.(LOGIN_ENDED);
|
|
341
348
|
yield* output.flush();
|
|
342
349
|
yield { type: 'finish', reason: { kind: 'stop' }, replayState: { response: coldPointer(record, broker.lastSequence) } };
|
|
343
350
|
return;
|
|
@@ -360,7 +367,7 @@ export async function* recoverColdProtocol(record, store, prefix, options) {
|
|
|
360
367
|
throw new LlmError(message, 'ABORTED');
|
|
361
368
|
}
|
|
362
369
|
if (m.result.stopReason === 'refusal')
|
|
363
|
-
|
|
370
|
+
options.notice?.('远端拒绝此请求,未执行。');
|
|
364
371
|
trim.finish();
|
|
365
372
|
yield* output.flush();
|
|
366
373
|
delivered = true;
|
package/dist/cold-recovery.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export declare class ColdRecovery {
|
|
|
33
33
|
brokerControlMaxBytes?: number;
|
|
34
34
|
}, provided?: {
|
|
35
35
|
store?: ColdStore;
|
|
36
|
+
notice?: (row: ColdRound, text: string) => Promise<void>;
|
|
36
37
|
readSource?: (id: string) => Promise<unknown>;
|
|
37
38
|
io?: (r: ColdRound) => BrokerIo;
|
|
38
39
|
argv?: SshArgv;
|
package/dist/cold-recovery.js
CHANGED
|
@@ -351,7 +351,7 @@ export class ColdRecovery {
|
|
|
351
351
|
const m = row.meta;
|
|
352
352
|
if (!row.nativeId)
|
|
353
353
|
return { index, pointer: undefined };
|
|
354
|
-
return { index, pointer: { version: 2, agent: row.provider, dshSessionId: row.sessionId, identity: m.identity, cwd: m.cwd, sessionId: row.nativeId,
|
|
354
|
+
return { index, pointer: { version: 2, agent: row.provider, dshSessionId: row.sessionId, identity: m.identity, cwd: m.cwd, sessionId: row.nativeId, ...(m.binding ? { bindingId: m.binding.bindingId, workspaceId: m.binding.workspaceId } : {}), ...(m.hostSource ? { hostSource: m.hostSource } : {}), ...(m.modelConfiguration ? { modelConfiguration: m.modelConfiguration } : {}) } };
|
|
355
355
|
}
|
|
356
356
|
release(sessionId, id) { if (this.live.get(sessionId) === id)
|
|
357
357
|
this.live.delete(sessionId); }
|
|
@@ -578,7 +578,7 @@ export class ColdRecovery {
|
|
|
578
578
|
revoke();
|
|
579
579
|
signal.throwIfAborted();
|
|
580
580
|
this.live.set(row.sessionId, row.id);
|
|
581
|
-
yield* recoverColdProtocol(row, this.store, { blocks, usage }, { io, maxFrameBytes: this.config().brokerMaxFrameBytes, maxMessageBytes: this.config().acpMaxMessageBytes, signal, markerId: selected.markerId });
|
|
581
|
+
yield* recoverColdProtocol(row, this.store, { blocks, usage }, { io, maxFrameBytes: this.config().brokerMaxFrameBytes, maxMessageBytes: this.config().acpMaxMessageBytes, signal, markerId: selected.markerId, notice: text => { void this.provided?.notice?.(row, text).catch(() => console.warn('[remote-agent] 恢复诊断未保存')); } });
|
|
582
582
|
if (revoked)
|
|
583
583
|
throw revoked;
|
|
584
584
|
}
|
package/dist/cold-store.d.ts
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { symbols } from '@deepseek-ai/cordis';
|
|
2
|
+
import { scopeOf, scopeChainOf } from '@deepseek-ai/dsh-scope';
|
|
3
|
+
/** Only active official instruction plugins' explicit raw profile overrides. */
|
|
4
|
+
export function readCustomInstructions(context, scope) {
|
|
5
|
+
const editor = context.get('configEditor');
|
|
6
|
+
if (typeof editor?.configuration !== 'function')
|
|
7
|
+
return;
|
|
8
|
+
const chain = scope?.ctx ? scopeChainOf(scopeOf(scope.ctx)) : [];
|
|
9
|
+
const rows = editor.configuration().filter(({ entry }) => !entry.disabled && !!entry.fiber);
|
|
10
|
+
const personas = rows.filter(({ entry }) => entry.options.name === '@deepseek-ai/dsh-persona' && entry.context && chain.includes(scopeOf(entry.context)));
|
|
11
|
+
personas.sort((a, b) => chain.indexOf(scopeOf(a.entry.context)) - chain.indexOf(scopeOf(b.entry.context)));
|
|
12
|
+
const original = (value) => value && typeof value === 'object' ? value[symbols.original] ?? value : value;
|
|
13
|
+
const registry = original(context.get('systemPrompt'));
|
|
14
|
+
const globals = rows.filter(({ entry }) => entry.options.name === '@deepseek-ai/dsh-system-prompt' && (!entry.context || original(entry.context.get('systemPrompt')) === registry));
|
|
15
|
+
const selected = personas[0] ?? globals[0];
|
|
16
|
+
if (!selected)
|
|
17
|
+
return;
|
|
18
|
+
const keys = selected.entry.options.name === '@deepseek-ai/dsh-persona' ? ['prefix', 'suffix'] : ['personaPrefix', 'personaSuffix'];
|
|
19
|
+
const parts = keys.filter(key => Object.hasOwn(selected.override, key) && typeof selected.override[key] === 'string').map(key => selected.override[key]);
|
|
20
|
+
return parts.length ? parts.join('') : undefined;
|
|
21
|
+
}
|
package/dist/employee-mcp.js
CHANGED
|
@@ -8,7 +8,7 @@ import { createEmployeeTools } from "./employee-tools.js";
|
|
|
8
8
|
import { employeeRouting } from "./employee-relay.js";
|
|
9
9
|
import { NeedError } from "./remote.js";
|
|
10
10
|
const string = { type: 'string' }, integer = { type: 'integer' }, boolean = { type: 'boolean' };
|
|
11
|
-
function schema(name, properties, required) { return { name, _meta: { 'anthropic/alwaysLoad': true },
|
|
11
|
+
function schema(name, properties, required) { return { name, _meta: { 'anthropic/alwaysLoad': true }, inputSchema: { type: 'object', properties, required, additionalProperties: false } }; }
|
|
12
12
|
export const EMPLOYEE_MCP_TOOLS = [
|
|
13
13
|
schema('Read', { file_path: string, offset: integer, limit: integer, pages: string }, ['file_path']),
|
|
14
14
|
schema('Write', { file_path: string, content: string }, ['file_path', 'content']),
|
|
@@ -136,13 +136,11 @@ export async function openEmployeeMcp(options) {
|
|
|
136
136
|
const mcp = new Server({ name: 'ai-workbench-employee', version: '0.8.14' }, { capabilities: { tools: {} } }), transport = new EmployeeSocketTransport(socket, options.maxBytes, observeConnection);
|
|
137
137
|
clients.add(mcp);
|
|
138
138
|
transports.add(transport);
|
|
139
|
-
mcp.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [...EMPLOYEE_MCP_TOOLS, ...
|
|
140
|
-
// 员工执行与办公入口直接可调用;其余DSH扩展工具仍交原生搜索发现。
|
|
141
|
-
schema.name === 'skill' || schema.name === 'load_workspace_dependencies' ? { ...wire, _meta: { ...wire._meta, 'anthropic/alwaysLoad': true } } : wire)] }));
|
|
139
|
+
mcp.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [...EMPLOYEE_MCP_TOOLS, ...options.bridge?.tools ?? []] }));
|
|
142
140
|
mcp.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
|
|
143
141
|
const active = options.activeSignal();
|
|
144
142
|
if (!active || active.aborted)
|
|
145
|
-
return { isError: true, content: [{ type: 'text', text: 'EMPLOYEE_NO_ACTIVE_TURN
|
|
143
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify({ code: 'EMPLOYEE_NO_ACTIVE_TURN' }) }] };
|
|
146
144
|
const signal = AbortSignal.any([active, extra.signal, transport.signal, options.lease.signal]);
|
|
147
145
|
if (options.bridge?.isBridge(request.params.name))
|
|
148
146
|
return options.bridge.call(request.params.name, request.params.arguments ?? {}, signal);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const EMPLOYEE_NATIVE: Readonly<{
|
|
2
|
-
version: "0.
|
|
2
|
+
version: "0.162.0";
|
|
3
3
|
platform: "darwin";
|
|
4
4
|
arch: "arm64";
|
|
5
5
|
package: "@openai/codex-darwin-arm64";
|
|
6
|
-
packageVersion: "0.
|
|
6
|
+
packageVersion: "0.162.0-darwin-arm64";
|
|
7
7
|
triple: "aarch64-apple-darwin";
|
|
8
8
|
}>;
|
|
9
9
|
/** Resolve the installed executable; no per-turn hash or version probe. */
|
package/dist/employee-native.js
CHANGED
|
@@ -3,7 +3,7 @@ import { dirname, join } from 'node:path';
|
|
|
3
3
|
import { NeedError } from "./remote.js";
|
|
4
4
|
const require = createRequire(import.meta.url);
|
|
5
5
|
let installedPath;
|
|
6
|
-
export const EMPLOYEE_NATIVE = Object.freeze({ version: '0.
|
|
6
|
+
export const EMPLOYEE_NATIVE = Object.freeze({ version: '0.162.0', platform: 'darwin', arch: 'arm64', package: '@openai/codex-darwin-arm64', packageVersion: '0.162.0-darwin-arm64', triple: 'aarch64-apple-darwin' });
|
|
7
7
|
/** Resolve the installed executable; no per-turn hash or version probe. */
|
|
8
8
|
export async function resolveEmployeeNative(ports = {}) {
|
|
9
9
|
if ((ports.platform ?? process.platform) !== EMPLOYEE_NATIVE.platform || (ports.arch ?? process.arch) !== EMPLOYEE_NATIVE.arch)
|
|
@@ -101,7 +101,7 @@ export function createEmployeeProvider(get, options, agent) {
|
|
|
101
101
|
try {
|
|
102
102
|
const context = request.localContext;
|
|
103
103
|
if (!context || context.instanceId !== connection.instanceId || context.epoch !== connection.epoch || context.workspaceId !== workspace.id || context.bindingId !== row.bindingId)
|
|
104
|
-
throw fail('
|
|
104
|
+
throw fail('EMPLOYEE_CONTEXT_CHANGED');
|
|
105
105
|
if (typeof api.onWorkspaceLocationState !== 'function' || typeof api.onConnectionState !== 'function')
|
|
106
106
|
throw fail('DEPENDENCY_REQUIRED');
|
|
107
107
|
const network = employee.getNetwork();
|
|
@@ -185,7 +185,7 @@ export function createEmployeeProvider(get, options, agent) {
|
|
|
185
185
|
if (!options.open)
|
|
186
186
|
throw fail('RUNTIME_REQUIRED');
|
|
187
187
|
// Host cwd is only the protected agent bootstrap/config directory. Native tools use admitted.cwd.
|
|
188
|
-
const openHost = () => options.open(target, { name: 'employee', path: target.projectRoot }, { ...request, signal: roundSignal, agent, employeeScope: scope, bindingId: admitted.bindingId, workspaceId: admitted.workspaceId, bindingRevision: state.revision, closeDiagnostics, detailChannel: details, resumeSessionId: request.resumeSessionId });
|
|
188
|
+
const openHost = () => options.open(target, { name: 'employee', path: target.projectRoot }, { ...request, signal: roundSignal, agent, employeeScope: scope, nativeEmployeeCwd: admitted.cwd, bindingId: admitted.bindingId, workspaceId: admitted.workspaceId, bindingRevision: state.revision, closeDiagnostics, detailChannel: details, resumeSessionId: request.resumeSessionId });
|
|
189
189
|
const host = opening = await (request.startupTiming?.run('broker-open', openHost) ?? openHost());
|
|
190
190
|
roundSignal.throwIfAborted();
|
|
191
191
|
// The old per-RPC identity check belongs once at the end of this round's opening.
|
package/dist/employee-relay.js
CHANGED
|
@@ -156,7 +156,7 @@ export const EMPLOYEE_RELAY_PYTHON = EMPLOYEE_TARGET_PYTHON + String.raw `
|
|
|
156
156
|
reply={"jsonrpc":"2.0","result":self.initialized} if method=="initialize" else await self.request(process,message)
|
|
157
157
|
await self.emit({**reply,"id":front})
|
|
158
158
|
except (OSError,Disconnected):
|
|
159
|
-
text="
|
|
159
|
+
text=json.dumps({"code":-32603,"data":{"result":"unknown","replayed":False}},separators=(",",":"))
|
|
160
160
|
reply={"result":{"isError":True,"content":[{"type":"text","text":text}]}} if method=="tools/call" else {"error":{"code":-32603,"message":text}}
|
|
161
161
|
await self.emit({"jsonrpc":"2.0","id":front,**reply})
|
|
162
162
|
async def relay():
|
package/dist/employee-tools.js
CHANGED
|
@@ -283,7 +283,7 @@ export function createEmployeeTools(options) {
|
|
|
283
283
|
catch (error) {
|
|
284
284
|
const code = error instanceof NeedError ? error.code : signal.aborted ? 'EMPLOYEE_CANCELLED_UNKNOWN' : typeof error?.code === 'string' ? 'EMPLOYEE_IO_' + error.code : 'EMPLOYEE_OPERATION_FAILED';
|
|
285
285
|
detail(submitted && signal.aborted ? 'unknown' : 'failed', code);
|
|
286
|
-
return { isError: true, content: [{ type: 'text', text: code
|
|
286
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify({ code }) }] };
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
return {
|
package/dist/index.d.ts
CHANGED
|
@@ -70,8 +70,6 @@ export declare class CodexRemoteAdapter extends LlmAdapter {
|
|
|
70
70
|
private shuttingDown;
|
|
71
71
|
private detached;
|
|
72
72
|
private modelPresentation;
|
|
73
|
-
private employeeNoticeSessions;
|
|
74
|
-
private pendingEmployeeNotices;
|
|
75
73
|
constructor(config: PluginConfig | (() => PluginConfig), resolveRuntime: RuntimeProvider, approve?: InvocationApproval | undefined, providerName?: () => string, agent?: AgentDefinition, readImage?: ImageReader | undefined, reportLoginFailure?: LoginFailureReporter | undefined, directory?: ModelDirectory | undefined, preflightDiagnostics?: PreflightDiagnostics | undefined, permissions?: PermissionSource | undefined, bridgeStopped?: (sessionId: string, notice: string) => void, steeringReceipts?: SteeringReceipts | undefined, coldRecovery?: ColdRecovery | undefined);
|
|
76
74
|
providerInfo(provider: string): {
|
|
77
75
|
id: string;
|