@deepseek-ai/dsh-cordis-client-runner 0.1.5-rc.2 → 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 +8 -8
- package/README.zh.md +9 -9
- package/lib/client.js +836 -224
- package/lib/types/client/guard.d.ts +5 -5
- package/lib/types/client/runtime.d.ts +1 -1
- package/package.json +6 -6
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-client-runner/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: aa87e2919be899539bea8aff00d072553f339c38
|
|
6
|
+
README.zh.md: f4925e4bd52098884c6a25f2d9504ce9a9d667f0
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
`dsh-cordis-client-runner`
|
|
12
|
+
`dsh-cordis-client-runner` runs the browser half of process-local dynamic packages for programmatic callers and existing browser controls. It loads a definition after an approved request or explicit user gesture, and removes it when the Host retracts the run. Page refresh does not restore definitions. Creator UI plugins use installed Client modules through Plugin Manager.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
@@ -51,7 +51,7 @@ This section explains the design behind the browser half; the observable behavio
|
|
|
51
51
|
|
|
52
52
|
### Design philosophy
|
|
53
53
|
|
|
54
|
-
The browser half is built on one principle: a dynamic package must ride the same activation gating, fiber-effect cleanup, and status projection as a static one. The evaluated plugin is seated in the module table and mounted through `loader.create`; unload
|
|
54
|
+
The browser half is built on one principle: a dynamic package must ride the same activation gating, fiber-effect cleanup, and status projection as a static one. The evaluated plugin is seated in the module table and mounted through `loader.create`; unload removes the entry, waits for its fiber's cleanup, then invalidates its factory and removes its styles. The guard is a whitelist — lifecycle verbs plus declared services — that mirrors the host-side sandbox facade, so a package author meets one contract on both halves. One observer feeds two outlets: the slot registry's entry-error seam is watched only here, and a crash belonging to a package this runner seated goes upstream to the host for the model and onto this package's own `renderFailures` for the panel.
|
|
55
55
|
|
|
56
56
|
### Source map
|
|
57
57
|
|
|
@@ -80,7 +80,7 @@ A `cordis/request-run` event asks this page whether to run a definition. Whoever
|
|
|
80
80
|
Read these pages when the package-level contract is not enough. They move from the browser half to the host that asks it, the tools whose runs it answers, and the surface that renders it.
|
|
81
81
|
|
|
82
82
|
- [Host runner](../cordis-host-runner/README.md) — the registry and run round trip this package answers.
|
|
83
|
-
- [Tool package](../tool-cordis/README.md) —
|
|
83
|
+
- [Tool package](../tool-cordis/README.md) — read-only runtime API discovery.
|
|
84
84
|
- [UI package](../ui-cordis/README.md) — the panel and cards that operate this face.
|
|
85
85
|
- [Extensions subsystem](../../../docs/subsystems/extensions.md) — the generated `ctx.dynamicCordisRunner` API and `cordis/*` events.
|
|
86
86
|
- [Client shells and dynamic packages Agent Note](../../../.agents/notes/implemented/architecture/2026-08-15-client-shells-and-dynamic-packages.md) — package placement and build faces for the client halves.
|
|
@@ -90,25 +90,25 @@ Read these pages when the package-level contract is not enough. They move from t
|
|
|
90
90
|
<a id="model-experience"></a>
|
|
91
91
|
## Model Experience
|
|
92
92
|
|
|
93
|
-
### Run resolution
|
|
93
|
+
### Run resolution relayed by the Host
|
|
94
94
|
|
|
95
95
|
#### What the model sees
|
|
96
96
|
|
|
97
|
-
This package contributes no tool
|
|
97
|
+
This package contributes no tool or prompt. It resolves `cordis/request-run` with activation success, missing services, rejection, or Host/Client failures. The Host runner owns any message relayed to the session.
|
|
98
98
|
|
|
99
99
|
#### Token effect
|
|
100
100
|
|
|
101
|
-
Conditional and bounded: at most one resolution per run request, spent inside the
|
|
101
|
+
Conditional and bounded: at most one resolution per run request, spent inside the runner result the host already emits. The text is data-dependent (a definition's own error message) and this package retains nothing across requests — a page's later load failures are page-local diagnostics with no model-visible carrier.
|
|
102
102
|
|
|
103
103
|
#### KV Cache effect
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
Host steering appends to the session history; this package does not rewrite earlier messages.
|
|
106
106
|
|
|
107
107
|
### Render failure, after the run settled
|
|
108
108
|
|
|
109
109
|
#### What the model sees
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
React can fail after a successful load. The Client reports each owned entry failure with its slot, message, and whether the entry was removed. The Host retains the latest failure and steers the owning session; the page also displays its local failure.
|
|
112
112
|
|
|
113
113
|
#### Token effect
|
|
114
114
|
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
`dsh-cordis-client-runner`
|
|
12
|
+
`dsh-cordis-client-runner` 为程序调用方和现有浏览器控件运行进程内动态包的浏览器部分。它在请求获批或用户显式操作后加载定义,并在 Host 撤销运行时移除定义。页面刷新不会恢复定义。Creator UI 插件通过 Plugin Manager 使用已安装的 Client 模块。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -51,7 +51,7 @@ kind: "package-reference"
|
|
|
51
51
|
|
|
52
52
|
### 设计理念
|
|
53
53
|
|
|
54
|
-
浏览器半建立在一个原则之上:动态包必须与静态包共享同一套激活门控、fiber effect 清理与状态投影。求值后的插件被塞进模块表,并经 `loader.create`
|
|
54
|
+
浏览器半建立在一个原则之上:动态包必须与静态包共享同一套激活门控、fiber effect 清理与状态投影。求值后的插件被塞进模块表,并经 `loader.create` 挂载;卸载先移除 entry,等待其 fiber 清理完成,再使 factory 失效并撤下样式。guard 是一份白名单——生命周期动词加已声明服务——与 host 侧沙箱门面对称,因此包作者在两侧面对同一个约定。一个观察者供两个出口:只有这里监视槽位注册表的 entry-error seam,凡属于本 runner 落座过的包的崩溃,一路上行给 host(给模型),一路发布到本包自己的 `renderFailures`(给面板)。
|
|
55
55
|
|
|
56
56
|
### 源码地图
|
|
57
57
|
|
|
@@ -80,7 +80,7 @@ kind: "package-reference"
|
|
|
80
80
|
当包级约定不够用时阅读以下页面。它们从浏览器半逐步进入发问的 host、其运行被应答的工具,以及渲染它的界面。
|
|
81
81
|
|
|
82
82
|
- [Host runner](../cordis-host-runner/README.zh.md)——本包应答的注册表与运行往返。
|
|
83
|
-
- [工具包](../tool-cordis/README.zh.md)
|
|
83
|
+
- [工具包](../tool-cordis/README.zh.md)——只读运行时 API 发现。
|
|
84
84
|
- [UI 包](../ui-cordis/README.zh.md)——操作这个面的面板与卡片。
|
|
85
85
|
- [extensions 子系统](../../../docs/subsystems/extensions.zh.md)——生成的 `ctx.dynamicCordisRunner` API 与 `cordis/*` 事件。
|
|
86
86
|
- [客户端外壳与动态包 Agent Note](../../../.agents/notes/implemented/architecture/2026-08-15-client-shells-and-dynamic-packages.zh.md)——浏览器半的包归属与构建面。
|
|
@@ -90,25 +90,25 @@ kind: "package-reference"
|
|
|
90
90
|
<a id="model-experience"></a>
|
|
91
91
|
## 模型体验
|
|
92
92
|
|
|
93
|
-
###
|
|
93
|
+
### Host 转发的运行结果
|
|
94
94
|
|
|
95
95
|
#### 模型看到的内容
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
本包不提供工具或提示。它以激活成功、缺失服务、拒绝或 Host/Client 失败响应 `cordis/request-run`。发送给会话的任何消息由 Host runner 负责。
|
|
98
98
|
|
|
99
99
|
#### Token 影响
|
|
100
100
|
|
|
101
|
-
有条件且有界:每次 run 请求最多一个回答,花在 host 本来就会发出的那个 `
|
|
101
|
+
有条件且有界:每次 run 请求最多一个回答,花在 host 本来就会发出的那个 `run` 结果里。文本随数据而定(某个定义自己的错误消息),本包跨请求不留存任何东西——一页后续的装载失败是页面本地诊断,在模型侧没有任何承载物。
|
|
102
102
|
|
|
103
103
|
#### KV Cache 影响
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
Host steering 追加到会话历史;本包不改写更早的消息。
|
|
106
106
|
|
|
107
107
|
### run 落定之后的渲染期失败
|
|
108
108
|
|
|
109
109
|
#### 模型看到的内容
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
React 可能在加载成功后失败。Client 报告其拥有的每个 entry 失败,包括 slot、消息及 entry 是否已移除。Host 保留最新失败并向所属会话发送 steering;页面也显示本地失败。
|
|
112
112
|
|
|
113
113
|
#### Token 影响
|
|
114
114
|
|
|
@@ -140,4 +140,4 @@ kind: "package-reference"
|
|
|
140
140
|
|
|
141
141
|
</details>
|
|
142
142
|
|
|
143
|
-
**运行时不变式:**
|
|
143
|
+
**运行时不变式:** 不发布伴生入口。所属关系(一个 live Plugin 的 loader entry 仅在一个 Plugin Run ID 存活期间存在)是只能通过 Client 半服务访问的浏览器侧状态,Node 平面的伴生入口无法观察。该关系改由本包自己的装载与拆除测试直接断言。
|