@ai-workbench/remote-agent 0.9.0-toolbridge.37 → 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 +5 -5
- package/dist/index.js +9 -1
- package/dist/provider.d.ts +1 -0
- package/dist/shared-file-guidance.d.ts +5 -0
- package/dist/shared-file-guidance.js +12 -0
- package/dist/toolbridge-table.d.ts +1 -1
- package/dist/toolbridge-table.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# AI Workbench 远程助手 · @ai-workbench/remote-agent@0.9.0-toolbridge.
|
|
1
|
+
# AI Workbench 远程助手 · @ai-workbench/remote-agent@0.9.0-toolbridge.38-rc.2 · 插件 → 添加插件
|
|
2
2
|
|
|
3
|
-
本版配套总包 0.3.
|
|
3
|
+
本版配套总包 0.3.9,固定 N0.4.11 / L0.7.46,主机仍使用 aw.17 / Codex 0.162.0。修复 0.3.8 回复仅显示文件名或代码路径、无法点击打开的问题。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
只逐字转送当前生效的 DSH 原生 `ui:deliverable-file-references` Shared guidance;不硬编码或改写原文,不附加插件自写文字,不恢复其他已撤除的 DSH 系统规则。原文作为独立 ACP 文本上下文块,每个新 prompt 发送一次;适用于新会话及既有原生线程接回,不改变员工输入、插话回执或工具桥等待步骤。它在 ACP 中是用户级上下文,不冒称已恢复 system 角色。生效作用域与完整提示词覆盖均按 DSH 原生组装结果处理。
|
|
6
6
|
|
|
7
|
-
DSH
|
|
7
|
+
DSH 已提供的 `present` 工具恢复首轮可见:Claude 使用原生 alwaysLoad 元数据,Codex 使用既有 employee 直接工具分组;其余 DSH 扩展工具仍按需发现。工具说明、参数与结果保持 DSH 原文;执行、权限和交付卡片均由 DSH 负责,不伪造文件卡片,不把实际文件改由 DSH 工具写入。
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
零插件自写提示词、原生技能镜像、原生子代理、B6 插话与冷恢复、U1 本轮用量、型号/推理/权限设置全部保留。技能原文、资源及项目说明仍由原生目录读取,文件和命令仍在员工所选目录执行。没有新增设置、限制或错误码。真实模型、三版 DSH 与 token 增量证据见 TESTS.md。
|
|
10
10
|
|
|
11
11
|
上一轮正常结束仍异步清理,不延迟已完成回复。下一次同一可信主机、DSH会话、品牌、原生线程及连接代次打开前,只等待本插件已经发出的那一次释放操作;取消等待不取消释放,失败仍走原有归属校验,不增加模型重试或重复发送任务。
|
|
12
12
|
|
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 (
|
|
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;
|
package/dist/provider.d.ts
CHANGED
|
@@ -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;
|
package/dist/toolbridge-table.js
CHANGED
|
@@ -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__/, '')); }
|