@deepseek-ai/dsh-cordis-host-runner 0.1.6-alpha.1 → 0.1.6-alpha.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.i18n.yaml +2 -2
- package/README.md +7 -7
- package/README.zh.md +7 -7
- package/lib/index.js +5 -5
- package/lib/typert.host.js +165 -115
- package/lib/typert.remote-client.js +165 -115
- package/lib/types/index.js +5 -8
- package/lib/types/lifecycle.js +2 -2
- package/package.json +17 -17
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/extensions/cordis-host-runner/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 67df264fe2b4a76df6587a726e72e6300c507912
|
|
6
|
+
README.zh.md: 0c8659078e3a78d3ce7284ac4d2e988902f89143
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
`dsh-cordis-host-runner`
|
|
12
|
+
`dsh-cordis-host-runner` exposes runtime inspection and keeps process-local dynamic definitions available to programmatic callers and browser controls. Host halves run in a `node:vm` realm; browser halves use the Client runner and approval UI. Definitions disappear on restart. Agents discover APIs through `tool-cordis` and install persistent bundles through Plugin Manager; no model tool creates dynamic definitions.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
@@ -25,7 +25,7 @@ English | [中文](README.zh.md)
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## Use this package
|
|
27
27
|
|
|
28
|
-
Mount this plugin
|
|
28
|
+
Mount this plugin for the inspection registry or programmatic dynamic-package lifecycle. Browser lifecycle consumers also require the Client runner and UI package. The shipped Creator workflow uses installed bundles instead of this definition registry.
|
|
29
29
|
|
|
30
30
|
### Minimal configuration
|
|
31
31
|
|
|
@@ -43,11 +43,11 @@ The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-a
|
|
|
43
43
|
|
|
44
44
|
### What a run does
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
Programmatic callers use `define`, `run`, `stop`, and `undefine`; the browser panel operates existing definitions. Host-only packages activate in this process. A package with a browser half waits for approval or cancellation, then loads Host before Client. `mode: "run"` starts the current version; `mode: "update"` replaces it. Stop disposes the live effects and retains the definition; undefine also forgets it.
|
|
47
47
|
|
|
48
48
|
### What happens to definitions
|
|
49
49
|
|
|
50
|
-
Definitions are session-scoped and process-local:
|
|
50
|
+
Definitions are session-scoped and process-local: other sessions read them as absent, and restart clears them. Historical logs retain tool arguments and receipts but do not restore the registry. Reloading a browser page requires another explicit run to load its Client half.
|
|
51
51
|
|
|
52
52
|
### Trust stance
|
|
53
53
|
|
|
@@ -92,7 +92,7 @@ The runner is built on two separations. **Registry and sandbox are one service.*
|
|
|
92
92
|
|
|
93
93
|
Read these pages when the package-level contract is not enough. They move from the runner to the tools that call it, the browser half that answers it, and the generated surface.
|
|
94
94
|
|
|
95
|
-
- [Tool package](../tool-cordis/README.md) — the
|
|
95
|
+
- [Tool package](../tool-cordis/README.md) — the read-only tools that use its inspection registry.
|
|
96
96
|
- [Client runner](../cordis-client-runner/README.md) — the browser half that answers run requests and loads browser-half code.
|
|
97
97
|
- [UI package](../ui-cordis/README.md) — the panel users approve and operate runs with.
|
|
98
98
|
- [Generated configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-cordis-host-runner) — every accepted config field.
|
|
@@ -108,7 +108,7 @@ Read these pages when the package-level contract is not enough. They move from t
|
|
|
108
108
|
|
|
109
109
|
#### What the model sees
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
This package registers no tool or prompt. Programmatic `run` calls and browser controls can steer the owning session with outcomes and diagnostics; stop and remove gestures inject a user message. Shipped model tools cannot create or update dynamic definitions.
|
|
112
112
|
|
|
113
113
|
#### Token effect
|
|
114
114
|
|
|
@@ -125,7 +125,7 @@ None of its own. A host half that registers tools changes the next request's too
|
|
|
125
125
|
|
|
126
126
|
These limits define when the runner needs special care. They are current package constraints, not a task backlog.
|
|
127
127
|
|
|
128
|
-
- **A successful run does not mean the UI rendered** —
|
|
128
|
+
- **A successful run does not mean the UI rendered** — React renders after the load receipt; failures reach the owning session through steering and appear in the browser panel.
|
|
129
129
|
- **A browser-half package suspends where no page is connected** — headless and ACP deployments hold the run until the asking turn is cancelled; host-only packages are unaffected.
|
|
130
130
|
- **A suspended run request has no timeout** — it waits for a person until the asking turn is cancelled, so unattended automation cannot use packages with a browser half.
|
|
131
131
|
- **`vmTimeoutMs` bounds only synchronous evaluation** — an async host-half body escapes it, matching the toolset's cooperative trust stance.
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
`dsh-cordis-host-runner`
|
|
12
|
+
`dsh-cordis-host-runner` 提供运行时检查,并为程序调用方和浏览器控件保留进程内动态定义。Host 部分在 `node:vm` 中运行;浏览器部分使用 Client runner 和审批 UI。定义在重启后消失。Agent 通过 `tool-cordis` 发现 API,通过 Plugin Manager 安装持久化 bundle;没有模型工具创建动态定义。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -25,7 +25,7 @@ kind: "package-reference"
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## 使用本包
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
需要检查注册表或程序侧动态包生命周期时挂载此插件。浏览器生命周期消费者还需要 Client runner 和 UI 包。内置 Creator 流程使用已安装 bundle,不使用此定义注册表。
|
|
29
29
|
|
|
30
30
|
### 最小配置
|
|
31
31
|
|
|
@@ -43,11 +43,11 @@ kind: "package-reference"
|
|
|
43
43
|
|
|
44
44
|
### run 会做什么
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
程序调用方使用 `define`、`run`、`stop` 和 `undefine`;浏览器面板操作已有定义。仅含 Host 的包在本进程激活。带浏览器部分的包等待审批或取消,批准后先加载 Host 再加载 Client。`mode: "run"` 启动当前版本,`mode: "update"` 替换版本。Stop 释放运行中的 effect 并保留定义;undefine 还会移除定义。
|
|
47
47
|
|
|
48
48
|
### 定义的去向
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
定义按会话隔离且仅在进程内存在:其他会话无法读取,重启会清空。历史日志保留工具参数和回执,但不会恢复注册表。浏览器页面重载后,需要再次显式运行才能加载 Client 部分。
|
|
51
51
|
|
|
52
52
|
### 信任立场
|
|
53
53
|
|
|
@@ -92,7 +92,7 @@ runner 基于两项职责划分。**注册表与沙箱是同一个服务。** `D
|
|
|
92
92
|
|
|
93
93
|
当包级约定不够用时阅读以下页面。它们从 runner 逐步进入调用它的工具、应答它的浏览器半与生成的表面。
|
|
94
94
|
|
|
95
|
-
- [工具包](../tool-cordis/README.zh.md)
|
|
95
|
+
- [工具包](../tool-cordis/README.zh.md)——使用其检查注册表的只读工具。
|
|
96
96
|
- [Client runner](../cordis-client-runner/README.zh.md)——应答运行请求并装载浏览器半代码的浏览器半。
|
|
97
97
|
- [UI 包](../ui-cordis/README.zh.md)——用户批准并操作运行的面板。
|
|
98
98
|
- [生成的配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-cordis-host-runner)——每个受支持配置字段。
|
|
@@ -108,7 +108,7 @@ runner 基于两项职责划分。**注册表与沙箱是同一个服务。** `D
|
|
|
108
108
|
|
|
109
109
|
#### 模型看到的内容
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
本包不注册工具或提示。程序侧 `run` 调用和浏览器控件可向所属会话发送结果与诊断;停止和移除操作注入用户消息。内置模型工具无法创建或更新动态定义。
|
|
112
112
|
|
|
113
113
|
#### Token 影响
|
|
114
114
|
|
|
@@ -125,7 +125,7 @@ runner 基于两项职责划分。**注册表与沙箱是同一个服务。** `D
|
|
|
125
125
|
|
|
126
126
|
这些限制说明 runner 何时需要特别小心。它们是当前包约束,不是任务积压。
|
|
127
127
|
|
|
128
|
-
-
|
|
128
|
+
- **运行成功不代表 UI 已渲染**——React 在加载回执之后渲染;失败通过 steering 发送到所属会话,并显示在浏览器面板中。
|
|
129
129
|
- **带浏览器半的包在没有页面连接的地方挂起**——headless 与 ACP(Agent Client Protocol)部署会把 run 一直挂到提问的轮次被取消;纯 host 包不受影响。
|
|
130
130
|
- **挂起的 run 请求没有超时**——它一直等人,直到提问的轮次被取消,因此无人值守的自动化用不了带浏览器半的包。
|
|
131
131
|
- **`vmTimeoutMs` 只约束同步求值**——async 的 host 半函数体会逃出该上限,这与工具集基于协作的信任立场一致。
|
package/lib/index.js
CHANGED
|
@@ -922,7 +922,7 @@ async function startHostHalf(group, plugin, reportGuardFailure) {
|
|
|
922
922
|
} catch (error) {
|
|
923
923
|
await fiber.dispose();
|
|
924
924
|
const message = error instanceof Error ? error.message : String(error);
|
|
925
|
-
if (message.includes("already registered")) throw new Error(`${message} — to REPLACE something an earlier dynamic package registered, first
|
|
925
|
+
if (message.includes("already registered")) throw new Error(`${message} — to REPLACE something an earlier dynamic package registered, first stop that package through its runner or the Cordis panel before running the new version.`);
|
|
926
926
|
throw error instanceof Error ? error : new Error(message);
|
|
927
927
|
}
|
|
928
928
|
return fiber;
|
|
@@ -2392,7 +2392,7 @@ let DynamicCordisRunnerService = (() => {
|
|
|
2392
2392
|
else if (settled.reason === "rejected") text = `The user rejected Cordis ${pending.mode} ${identity}. Do not request the same activation again unless the user asks.`;
|
|
2393
2393
|
else {
|
|
2394
2394
|
const returnedStatus = pending.requiresApproval ? "awaiting-approval" : "starting";
|
|
2395
|
-
text = `Cordis ${pending.mode} ${identity} failed after
|
|
2395
|
+
text = `Cordis ${pending.mode} ${identity} failed after the runner returned ${returnedStatus}: ${settled.reason}\n${formatErrorDetails(settled)}\ncurrentPackageId: ${plugin?.currentPackageId ?? "none"}\nnextPackageId: ${plugin?.nextPackageId ?? pending.packageId}\nReport the failure to the user; the definition can be managed through the Cordis panel.`;
|
|
2396
2396
|
}
|
|
2397
2397
|
agent.steer(createUserMessage({
|
|
2398
2398
|
content: [{
|
|
@@ -2409,7 +2409,7 @@ let DynamicCordisRunnerService = (() => {
|
|
|
2409
2409
|
agent.steer(createUserMessage({
|
|
2410
2410
|
content: [{
|
|
2411
2411
|
type: "text",
|
|
2412
|
-
text: `Cordis Client UI ${plugin.pluginId}/${definition.packageId} (${pluginRunId}) failed while rendering Slot "${failure.slot}" after activation.\n${formatErrorDetails(failure)}\nentryAbdicated: ${failure.abdicated}\
|
|
2412
|
+
text: `Cordis Client UI ${plugin.pluginId}/${definition.packageId} (${pluginRunId}) failed while rendering Slot "${failure.slot}" after activation.\n${formatErrorDetails(failure)}\nentryAbdicated: ${failure.abdicated}\nReport the Client render failure to the user; the definition can be stopped through the Cordis panel.`
|
|
2413
2413
|
}],
|
|
2414
2414
|
source: {
|
|
2415
2415
|
kind: "plugin",
|
|
@@ -2425,7 +2425,7 @@ let DynamicCordisRunnerService = (() => {
|
|
|
2425
2425
|
agent.steer(createUserMessage({
|
|
2426
2426
|
content: [{
|
|
2427
2427
|
type: "text",
|
|
2428
|
-
text: `Cordis Host handler ${plugin.pluginId}/${run.packageId} (${run.pluginRunId}) failed when the Client called host.call(${JSON.stringify(method)}).\n${formatErrorDetails(failure)}\nThe Plugin remains running.
|
|
2428
|
+
text: `Cordis Host handler ${plugin.pluginId}/${run.packageId} (${run.pluginRunId}) failed when the Client called host.call(${JSON.stringify(method)}).\n${formatErrorDetails(failure)}\nThe Plugin remains running. Report the Host handler failure to the user. If the handler needs a Service, either declare that Service in the returned Plugin inject list or read it with ctx.get(name) and handle undefined.`
|
|
2429
2429
|
}],
|
|
2430
2430
|
source: {
|
|
2431
2431
|
kind: "plugin",
|
|
@@ -2441,7 +2441,7 @@ let DynamicCordisRunnerService = (() => {
|
|
|
2441
2441
|
agent.steer(createUserMessage({
|
|
2442
2442
|
content: [{
|
|
2443
2443
|
type: "text",
|
|
2444
|
-
text: `Cordis ${platform} guard rejected runtime code in ${plugin.pluginId}/${run.packageId} (${run.pluginRunId}) after activation.\n${formatErrorDetails(failure)}\nThe Plugin remains running.
|
|
2444
|
+
text: `Cordis ${platform} guard rejected runtime code in ${plugin.pluginId}/${run.packageId} (${run.pluginRunId}) after activation.\n${formatErrorDetails(failure)}\nThe Plugin remains running. Report the guard rejection to the user; it can be stopped through the Cordis panel.`
|
|
2445
2445
|
}],
|
|
2446
2446
|
source: {
|
|
2447
2447
|
kind: "plugin",
|