@ai-workbench/remote-agent 0.9.0-toolbridge.37-rc.5 → 0.9.0-toolbridge.38-rc.2

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 CHANGED
@@ -1,12 +1,12 @@
1
- # AI Workbench 远程助手 · @ai-workbench/remote-agent@0.9.0-toolbridge.37-rc.5 · 插件 → 添加插件
1
+ # AI Workbench 远程助手 · @ai-workbench/remote-agent@0.9.0-toolbridge.38-rc.2 · 插件 → 添加插件
2
2
 
3
- 本版为 0.3.8 配套的预发布验证版本,正式渠道仍为总包 0.3.7 / X.36。只有三版 DSH、真实模型、主机与独审门全部通过后才转正式。
3
+ 本版配套总包 0.3.9,固定 N0.4.11 / L0.7.46,主机仍使用 aw.17 / Codex 0.162.0。修复 0.3.8 回复仅显示文件名或代码路径、无法点击打开的问题。
4
4
 
5
- 本版撤除插件自行拼写的系统规则、位置说明和技能目录说明。模型接收员工输入、原工具描述、CLI 原生上下文,以及员工显式配置的自定义指令原文。DSH 系统规则不转送;同一 DSH 会话切换品牌时仍补带可见对话及角色结构。插件控制诊断留在技术详情,不混入模型回复或下一轮历史。I3 规则重注入、摘要回执与 v2 协商已整体删除。
5
+ 只逐字转送当前生效的 DSH 原生 `ui:deliverable-file-references` Shared guidance;不硬编码或改写原文,不附加插件自写文字,不恢复其他已撤除的 DSH 系统规则。原文作为独立 ACP 文本上下文块,每个新 prompt 发送一次;适用于新会话及既有原生线程接回,不改变员工输入、插话回执或工具桥等待步骤。它在 ACP 中是用户级上下文,不冒称已恢复 system 角色。生效作用域与完整提示词覆盖均按 DSH 原生组装结果处理。
6
6
 
7
- DSH 已公布目录的技能与资源同步到两端同一受控绝对路径,SKILL 正文使用同一作用域的官方 skills.get() 原文,原 frontmatter、资源文件字节与可执行位保留;项目 AGENTS.md/CLAUDE.md 原文镜像后由 CLI 原生读取。Claude 使用原生插件技能入口,Codex 使用原生 skills/extraRoots/set;新轮次与冷恢复均更新原生目录。实际文件和命令仍由员工执行器执行。纯正文虚拟技能保留官方正文;未提供可镜像出口的 URL/opaque 资源明确报既有上下文不可用;主机原有技能中写死的任意主机脚本路径尚未证明可在员工端使用。
7
+ DSH 已提供的 `present` 工具恢复首轮可见:Claude 使用原生 alwaysLoad 元数据,Codex 使用既有 employee 直接工具分组;其余 DSH 扩展工具仍按需发现。工具说明、参数与结果保持 DSH 原文;执行、权限和交付卡片均由 DSH 负责,不伪造文件卡片,不把实际文件改由 DSH 工具写入。
8
8
 
9
- Claude 原生 Agent/TaskStop 与 Codex 原生子代理首轮可用。Codex 只把技能、办公依赖必需桥工具置于 employee 首轮分组,DSH 子代理及其余工具在 dsh 分组按需发现。保留 B6 原生插话、冷恢复、防重放、U1 每次 prompt 用量和原生型号、推理档、权限设置。含桥主机需 2.2.2-aw.17(Codex 0.162.0);不含桥通道不变。没有新增设置项或自定义错误码。
9
+ 零插件自写提示词、原生技能镜像、原生子代理、B6 插话与冷恢复、U1 本轮用量、型号/推理/权限设置全部保留。技能原文、资源及项目说明仍由原生目录读取,文件和命令仍在员工所选目录执行。没有新增设置、限制或错误码。真实模型、三版 DSH 与 token 增量证据见 TESTS.md。
10
10
 
11
11
  上一轮正常结束仍异步清理,不延迟已完成回复。下一次同一可信主机、DSH会话、品牌、原生线程及连接代次打开前,只等待本插件已经发出的那一次释放操作;取消等待不取消释放,失败仍走原有归属校验,不增加模型重试或重复发送任务。
12
12
 
@@ -18,9 +18,9 @@ Claude 原生 Agent/TaskStop 与 Codex 原生子代理首轮可用。Codex 只
18
18
 
19
19
  新增设置、限制、错误码均为 0。已有会话的历史说明不会被改写;避免初始模型切换冗余的效果从新会话开始。
20
20
 
21
- ## 含工具桥预发布线
21
+ ## 含工具桥发布线
22
22
 
23
- 本包为 `0.9.0-toolbridge.37-rc.5`,从 `v0.9.0-toolbridge.14` 派生,使用 `host-toolbridge` 发布渠道。员工安装由连接组件提供的「AI 写作工作台(含工具桥)」总包 `@ai-workbench/workbench-toolbridge@0.3.7`;0.3.8 尚未转正式,与不含工具桥的版本二选一。
23
+ 本包为 `0.9.0-toolbridge.37`,从 `v0.9.0-toolbridge.14` 派生,使用 `host-toolbridge` 发布渠道。员工安装由连接组件提供的「AI 写作工作台(含工具桥)」总包 `@ai-workbench/workbench-toolbridge@0.3.8`,与不含工具桥的版本二选一。
24
24
 
25
25
  本轮增加两家运行中插话(DSH 原生 nextStep),保留官方队列和原话;明确 followup 仍排下一轮。Codex 含桥组件需 `2.2.2-aw.12`,Claude 仍为官方 `0.94.0`。插件确定消息未发出时保留排队资格;送达未确认时明确报错且不重放。已注入旧正文不能撤回,编辑版下一步骤交付。
26
26
 
@@ -37,7 +37,7 @@ host `0.8.11` 的新 broker 支持同一客户端/SDK 在切网后按输出游
37
37
 
38
38
  工具表按每次主机连接生成快照,新增/移除在下一次连接生效;不承诺 Codex 当前 MCP 会话热刷新。审批期间的插话等当前主机 prompt 结束后再发,停泊中切换助手会停止原轮次并明确提示。工具主动结束DSH轮次时,已提交结果仍交回原agent;确认原生工具收到后结束原prompt,下一条沿原线程继续,不在已关闭步骤追加模型回复。取消和主机结束等待后的结果不重放;工具已执行的副作用不能因取消而撤销,请按说明核对。图片结果由官方附件组件读取后交回。
39
39
 
40
- Codex 需要 S 后续安装的独立受保护命令 `/usr/local/aw-host/bin/codex-acp-toolbridge`(aw.8),不会替换原 codex-acp/aw.6;Claude命令不变。指定桥接 server 的等待为 owner 确认的 **1800 秒**、审批交 DSH;不改其他server的调用时限,不新增插件设置项。含桥的本机Codex会话按原生规则等各扩展现有启动时限结算后再捕获工具;启动失败会明确说明,文件和命令仍按原方式执行,本轮不自动重试。N0.4.9、L0.7.37沿既有公开合同;真实界面/员工验收由编排安排。完整合同和本轮启动修复证据见 `docs/contracts/codex-toolbridge.md`、`docs/evidence/2026-10-27-toolbridge-startup/REPORT.md`。
40
+ Codex 使用独立受保护命令 `/usr/local/aw-host/bin/codex-acp-toolbridge`(本版 aw.17,组件自带固定 Node24.13.1),不会替换原 codex-acp/aw.6;Claude命令不变。指定桥接 server 的等待为 owner 确认的 **1800 秒**、审批交 DSH;不改其他server的调用时限,不新增插件设置项。含桥的本机Codex会话按原生规则等各扩展现有启动时限结算后再捕获工具;启动失败会明确说明,文件和命令仍按原方式执行,本轮不自动重试。N0.4.9、L0.7.37沿既有公开合同;真实界面/员工验收由编排安排。完整合同和本轮启动修复证据见 `docs/contracts/codex-toolbridge.md`、`docs/evidence/2026-10-27-toolbridge-startup/REPORT.md`。
41
41
 
42
42
  通过官方 DSH 插件入口使用 Claude(远程主机)与 Codex(远程主机)。登录和工作区来源由“远程主机连接”组件提供;员工在原生工作区和模型菜单中选择文件夹与型号。
43
43
 
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { syncNativeSessionContent } from "./native-content-transport.js";
2
2
  import { readCustomInstructions } from "./custom-instructions.js";
3
+ import { readSharedFileGuidance } from "./shared-file-guidance.js";
3
4
  import { StartupTiming } from "./startup-timing.js";
4
5
  import { ColdRecovery } from "./cold-recovery.js";
5
6
  import { createSteeringReceipts, installLiveSteering, steeringMessageDigest } from "./live-steering.js";
@@ -439,8 +440,13 @@ export class CodexRemoteAdapter extends LlmAdapter {
439
440
  }
440
441
  if (previous && !runtime.hostSource && (previous.identity !== runtime.identity || previous.cwd !== runtime.cwd || previous.bindingId && previous.bindingId !== runtime.binding?.bindingId || previous.workspaceId && previous.workspaceId !== runtime.binding?.workspaceId))
441
442
  throw new NeedError('SESSION_CONTEXT_MISMATCH', '原会话的员工主机或工作区已改变,请新建会话', '原会话的可信目标和工作区');
443
+ // The source is DSH's effective Shared guidance. Keep its exact bytes in a
444
+ // separate context block so existing native threads receive it as well.
445
+ // Do not change user delivery receipts, steering, or parked bridge steps.
446
+ if (runtime.sharedFileGuidance)
447
+ input = { ...input, prompt: [...input.prompt, { type: 'text', text: runtime.sharedFileGuidance }] };
442
448
  input = await prepareContinuation({ ...options, messages: projected.messages.slice(checkpointIndex + 1) }, input, this.readImage, { maxBytes: config.acpMaxMessageBytes, host: runtime.hostWorkspace });
443
- if (runtime.hostWorkspace && Buffer.byteLength(JSON.stringify({ prompt: input.prompt }), 'utf8') > config.acpMaxMessageBytes)
449
+ if (Buffer.byteLength(JSON.stringify({ prompt: input.prompt }), 'utf8') > config.acpMaxMessageBytes)
444
450
  throw new NeedError('ACP_MESSAGE_TOO_LARGE', '本轮输入超过已设置的会话消息容量,未截断或发送', '管理员调整acpMaxMessageBytes');
445
451
  const details = runtime.details ?? await createRemoteDetails({ warn: line => console.warn(line) }).open({ sessionId: options.sessionId ?? 'unscoped', provider: this.agent.loginProvider, identity: runtime.identity, connection: runtime.connection });
446
452
  startupTiming.bind(event => details.record(event));
@@ -824,10 +830,12 @@ export function apply(ctx, live) {
824
830
  const services = ctx;
825
831
  const scope = request.sessionId ? ctx.get('agents')?.get(SessionId(request.sessionId)) : undefined;
826
832
  const nativeContent = await syncNativeSessionContent({ target, request, employeeCwd: request.nativeEmployeeCwd, scope, skills: services.get('skills') });
833
+ const sharedFileGuidance = await readSharedFileGuidance(services, scope, request.signal);
827
834
  const actualProject = agent.loginProvider === 'claude' && request.nativeEmployeeCwd && nativeContent ? { ...project, path: nativeContent.hostCwd } : project;
828
835
  const runtime = await openByAgent.get(agent.id)(target, actualProject, request);
829
836
  runtime.nativeContent = nativeContent;
830
837
  runtime.customInstructions = readCustomInstructions(services, scope);
838
+ runtime.sharedFileGuidance = sharedFileGuidance;
831
839
  runtime.detailContext = () => {
832
840
  const events = args[2].sessionId ? ctx.get('agents')?.get(SessionId(args[2].sessionId))?.session.snapshotEvents() : undefined;
833
841
  let turn = null, step = null;
@@ -32,6 +32,7 @@ export interface EmployeeExecution {
32
32
  export interface Runtime {
33
33
  nativeContent?: NativeSessionContent;
34
34
  customInstructions?: string;
35
+ sharedFileGuidance?: string;
35
36
  localDirectory?: {
36
37
  path: string;
37
38
  device: number;
@@ -0,0 +1,5 @@
1
+ import { type Agent } from '@deepseek-ai/dsh-agent';
2
+ /** Read the effective official section, including scoped suppression; never reconstruct its prose. */
3
+ export declare function readSharedFileGuidance(services: {
4
+ get(name: string): unknown;
5
+ }, agent?: Agent, signal?: AbortSignal): Promise<string | undefined>;
@@ -0,0 +1,12 @@
1
+ import { assembleContextFor } from '@deepseek-ai/dsh-agent';
2
+ /** Read the effective official section, including scoped suppression; never reconstruct its prose. */
3
+ export async function readSharedFileGuidance(services, agent, signal) {
4
+ const prompt = services.get('systemPrompt');
5
+ if (typeof prompt?.assemble !== 'function')
6
+ return;
7
+ signal?.throwIfAborted();
8
+ const assembly = await prompt.assemble(agent ? assembleContextFor(agent, signal) : { ...(signal ? { signal } : {}) });
9
+ signal?.throwIfAborted();
10
+ const section = assembly.sections.find(row => row.name === 'ui:deliverable-file-references');
11
+ return section?.text || undefined;
12
+ }
@@ -9,5 +9,5 @@ export interface BridgeTool {
9
9
  }
10
10
  export declare function bridgeTable(tools?: readonly ToolSchema[]): ReadonlyMap<string, BridgeTool>;
11
11
  /** Essential bridge entry points have a separate native namespace from deferred tools. */
12
- export declare const TOOLBRIDGE_ESSENTIAL: readonly ["skill", "load_workspace_dependencies"];
12
+ export declare const TOOLBRIDGE_ESSENTIAL: readonly ["skill", "load_workspace_dependencies", "present"];
13
13
  export declare function essentialBridgeTool(name: string): boolean;
@@ -18,10 +18,10 @@ export function bridgeTable(tools = []) {
18
18
  if (table.has(alias))
19
19
  throw new NeedError('TOOLBRIDGE_NAME_COLLISION', '工具桥名称冲突,未执行。', '唯一工具桥名称');
20
20
  const schema = structuredClone(tool);
21
- table.set(alias, { alias, schema, wire: { name: alias, description: schema.description, inputSchema: structuredClone(schema.parameters) } });
21
+ table.set(alias, { alias, schema, wire: { name: alias, description: schema.description, inputSchema: structuredClone(schema.parameters), ...(schema.name === 'present' ? { _meta: { 'anthropic/alwaysLoad': true } } : {}) } });
22
22
  }
23
23
  return table;
24
24
  }
25
25
  /** Essential bridge entry points have a separate native namespace from deferred tools. */
26
- export const TOOLBRIDGE_ESSENTIAL = Object.freeze(['skill', 'load_workspace_dependencies']);
26
+ export const TOOLBRIDGE_ESSENTIAL = Object.freeze(['skill', 'load_workspace_dependencies', 'present']);
27
27
  export function essentialBridgeTool(name) { return TOOLBRIDGE_ESSENTIAL.includes(name.replace(/^dsh__/, '')); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-workbench/remote-agent",
3
- "version": "0.9.0-toolbridge.37-rc.5",
3
+ "version": "0.9.0-toolbridge.38-rc.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",