@ai-workbench/remote-agent 0.8.30 → 0.8.31

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,4 +1,4 @@
1
- # AI Workbench 远程助手 · @ai-workbench/remote-agent@0.8.30 · 插件 → 添加插件
1
+ # AI Workbench 远程助手 · @ai-workbench/remote-agent@0.8.31 · 插件 → 添加插件
2
2
 
3
3
  通过官方 DSH 插件入口使用 Claude(远程主机)与 Codex(远程主机)。登录和工作区来源由“远程主机连接”组件提供;员工在原生工作区和模型菜单中选择文件夹与型号。
4
4
 
@@ -17,6 +17,8 @@ export interface HostModel {
17
17
  defaultKnown: boolean;
18
18
  };
19
19
  source: unknown;
20
+ /** Host-sourced token capacity. Absent means unknown: X declares nothing and DSH reports it. */
21
+ contextWindow?: number;
20
22
  }
21
23
  export interface CatalogLease {
22
24
  readonly target: ModelCatalogTarget;
@@ -61,6 +61,10 @@ export function parseHostCatalog(input, provider, username) {
61
61
  reject('具体型号与发送模型值不一致');
62
62
  continue;
63
63
  }
64
+ if (model.contextWindow !== undefined && (!Number.isSafeInteger(model.contextWindow) || model.contextWindow < 1)) {
65
+ reject('上下文窗口不是正整数', 'MODEL_CONTEXT_WINDOW_INVALID');
66
+ continue;
67
+ }
64
68
  const r = model.reasoning;
65
69
  if (!Array.isArray(r.options) || typeof r.defaultKnown !== 'boolean' || (r.defaultValue !== null && !text(r.defaultValue)) || (!r.defaultKnown && r.defaultValue !== null)) {
66
70
  reject('推理档位或默认档位资料无效', 'MODEL_REASONING_INVALID');
@@ -161,5 +165,5 @@ export class ModelCatalog {
161
165
  }
162
166
  export function modelInfo(provider, model) {
163
167
  // Official rc.2 represents no reasoning levels by absence, and rejects an empty efforts array.
164
- return { provider, id: model.id, name: model.name, inputModalities: ['text', 'image'], ...(model.reasoning.options.length ? { reasoning: { efforts: model.reasoning.options.map(option => ({ id: ReasoningEffortId(option.value), name: option.name })), ...(model.reasoning.defaultKnown && model.reasoning.defaultValue !== null ? { defaultEffort: ReasoningEffortId(model.reasoning.defaultValue) } : {}) } } : {}), catalog: model };
168
+ return { provider, id: model.id, name: model.name, inputModalities: ['text', 'image'], ...(model.contextWindow === undefined ? {} : { context: { contextWindow: model.contextWindow } }), ...(model.reasoning.options.length ? { reasoning: { efforts: model.reasoning.options.map(option => ({ id: ReasoningEffortId(option.value), name: option.name })), ...(model.reasoning.defaultKnown && model.reasoning.defaultValue !== null ? { defaultEffort: ReasoningEffortId(model.reasoning.defaultValue) } : {}) } } : {}), catalog: model };
165
169
  }
@@ -54,6 +54,7 @@ export function employeeFailure(code, brand = 'codex', promptDispatched = true)
54
54
  PROMPT_CONTENT_UNSUPPORTED: '远端没有声明这类输入能力,本轮未发送;请使用受支持的内容或联系管理员。',
55
55
  ATTACHMENT_REQUIRED: '我需要官方附件组件读取这张图片,请联系管理员检查组件。',
56
56
  ATTACHMENT_INVALID: '图片附件没有返回匹配的已核验内容,本轮未发送;请重新添加图片或联系管理员。',
57
+ PURPOSE_UNSUPPORTED: '这段对话太长,需要先整理上下文,但远程模型不支持整理;这句话未发送,需要重新输入。请新建会话继续,或换回原来的模型',
57
58
  ACP_MESSAGE_TOO_LARGE: '本轮输入超过会话消息容量,未截断或发送;请联系管理员调整acpMaxMessageBytes。',
58
59
  };
59
60
  if (messages[code])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-workbench/remote-agent",
3
- "version": "0.8.30",
3
+ "version": "0.8.31",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -51,8 +51,10 @@
51
51
  "@deepseek-ai/dsh-client-connection": "0.2.0-rc.2",
52
52
  "@deepseek-ai/dsh-client-store": "0.2.0-rc.2",
53
53
  "@deepseek-ai/dsh-client-ui-settings": "0.2.0-rc.2",
54
+ "@deepseek-ai/dsh-compaction-basic": "0.2.0-rc.2",
54
55
  "@deepseek-ai/dsh-llm": "0.2.0-rc.2",
55
56
  "@deepseek-ai/dsh-session": "0.2.0-rc.2",
57
+ "@deepseek-ai/dsh-token-meter": "0.2.0-rc.2",
56
58
  "@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.2",
57
59
  "@deepseek-ai/dsh-typert-registry": "0.2.0-rc.2",
58
60
  "@deepseek-ai/dsh-user-approval": "0.2.0-rc.2",