@xneog/dsh-client-ui-cordis 0.1.0 → 0.1.3-alpha.1
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 +110 -16
- package/README.zh.md +112 -18
- package/lib/client.js +79 -77
- package/lib/types/client/dynamic-port.d.ts +1 -1
- package/lib/types/client/index.d.ts +1 -1
- package/lib/types/client/locales.d.ts +2 -0
- package/lib/types/client/run-card-index.d.ts +1 -1
- package/lib/types/client/slots.d.ts +1 -1
- package/package.json +18 -33
- package/lib/invariant.js +0 -26
- package/lib/types/invariant.d.ts +0 -16
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/ui-cordis/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: e5380e458cfc082c2d725f1445e678d2a3e2f084
|
|
6
|
+
README.zh.md: 1c1f2a7b5e3c218ba6561fb17025daec5fbc593b
|
package/README.md
CHANGED
|
@@ -1,24 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Cordis dynamic-plugin browser surfaces for users and maintainers choosing, composing, or debugging the panel, tool cards, and @pluginId input."
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# @xneog/dsh-client-ui-cordis
|
|
2
7
|
|
|
3
8
|
English | [中文](README.zh.md)
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
`dsh-client-ui-cordis` gives a web client the browser surfaces for dynamic Cordis packages: a frame-wide panel that operates every definition the host holds, tool cards that render `cordis_define`, `cordis_run`, `cordis_stop`, and `cordis_undefine` calls in the conversation, and an `@pluginId` input source that completes the session's defined plugins. The panel is global on purpose — a model-driven run blocks on a person's approval, and that approval must be reachable no matter which session is in view. The package authors nothing the model sees: everything it operates comes from the browser runner and the host's inventory, and the cards render call and result content the conversation already logged.
|
|
13
|
+
|
|
14
|
+
## Table of Contents
|
|
15
|
+
|
|
16
|
+
- [Use this package](#use-this-package)
|
|
17
|
+
- [Understand the implementation](#understand-the-implementation)
|
|
18
|
+
- [Further Exploration](#further-exploration)
|
|
19
|
+
- [Model Experience](#model-experience)
|
|
20
|
+
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
|
21
|
+
- [Dev Note](#dev-note)
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## Use this package
|
|
27
|
+
|
|
28
|
+
Compose this package in a web client that also mounts the browser runner and the host runner, and it adds the panel, the tool cards, and the `@` completion. A person then has everything needed to run the lifecycle: approve or decline a model's run request, run, stop, or remove any definition, and watch a package's live state change on the same rows.
|
|
29
|
+
|
|
30
|
+
### What the panel shows
|
|
31
|
+
|
|
32
|
+
A `sidebar.footer.action` seat shows a badge counting what runs plus what waits; opening it lists every definition with its run controls. The list is never filtered by session: the current session's rows group first, everyone else's stay listed below. Rows come from the host's current inventory and update whenever an announcement changes what exists. A pending run request whose definition the last read does not cover still gets a row, rendered from the request's own session, label, purpose, and identity. Each row shows two independent facts — what the host runs and what this page has loaded — so a reloaded page offers "load back into this page" before the global stop, while a host-only definition reads plainly running and offers the stop alone. The row also carries this page's last render failure inline, in the same place as a load failure: one is "it never loaded", the other "it loaded and then threw".
|
|
33
|
+
|
|
34
|
+
### What the tool cards show
|
|
35
|
+
|
|
36
|
+
The `cordis_define` card is a record: the name and purpose the model wrote, the source it wrote, and whether the definition is running — no switch, no approval, and a pointer to the panel. The `cordis_run` card shows the mode, the plugin, package, and run ids, the outcome, and offers the package's own business view through the `tool.view.cordis` slot when the package registered one. `cordis_stop` and `cordis_undefine` render compact action rows. All cards render from the recorded call and result, so replay shows the same card.
|
|
37
|
+
|
|
38
|
+
### The @pluginId input source
|
|
39
|
+
|
|
40
|
+
Typing `@` in the input offers the current session's defined plugins; picking one emits `@pluginId`, which the tool package turns into a pinned reference context for the model.
|
|
41
|
+
|
|
42
|
+
### Boundaries to plan around
|
|
43
|
+
|
|
44
|
+
Definitions are process-local: a reloaded page holds nothing until someone runs a package again, and the panel re-reads the inventory on every announcement. Approvals are frame-wide by design, so a person in one tab can approve a run the model asked for while another tab shows the defining session; the first answer wins and the rest converge.
|
|
45
|
+
|
|
46
|
+
-----
|
|
47
|
+
|
|
48
|
+
<a id="understand-the-implementation"></a>
|
|
49
|
+
## Understand the implementation
|
|
6
50
|
|
|
7
|
-
|
|
51
|
+
<details>
|
|
52
|
+
<summary>Implementation internals — click to expand</summary>
|
|
8
53
|
|
|
9
|
-
|
|
54
|
+
This section explains the design behind the surfaces; the observable behavior is fully covered in [Use this package](#use-this-package).
|
|
10
55
|
|
|
11
|
-
|
|
56
|
+
### Design philosophy
|
|
12
57
|
|
|
13
|
-
|
|
58
|
+
The surfaces are built on one rule: neither keeps run state in component state, because settling a define call moves its card in the chat flow and remounts it. Facts live in observables owned by whoever can close them — the browser runner owns open requests, orchestration outcomes, this page's live set and its render failures, while this package owns the inventory it read and the announcements it folded. The panel is global because a run request blocks the model and can name a definition belonging to a session nobody is looking at; an approval reachable only inside that session's transcript would be unreachable exactly when it blocks the model.
|
|
14
59
|
|
|
15
|
-
|
|
60
|
+
### Source map
|
|
16
61
|
|
|
17
|
-
|
|
62
|
+
| File | Role |
|
|
63
|
+
|---|---|
|
|
64
|
+
| [`src/client/index.ts`](src/client/index.ts) | Plugin entry: slot registrations, inventory wiring, `@pluginId` source |
|
|
65
|
+
| [`src/client/CordisPanel.tsx`](src/client/CordisPanel.tsx) | The frame-wide panel and its run controls |
|
|
66
|
+
| [`src/client/CordisDefineRow.tsx`](src/client/CordisDefineRow.tsx) | The read-only `cordis_define` card |
|
|
67
|
+
| [`src/client/CordisRunRow.tsx`](src/client/CordisRunRow.tsx) | The `cordis_run` card and its business-view seat |
|
|
68
|
+
| [`src/client/CordisActionRow.tsx`](src/client/CordisActionRow.tsx) | The `cordis_stop` / `cordis_undefine` rows |
|
|
69
|
+
| [`src/client/card-model.ts`](src/client/card-model.ts) | Replay-stable view models derived from frozen call/result slices |
|
|
70
|
+
| [`src/client/inventory.ts`](src/client/inventory.ts) | The single-flight inventory read and its reconnect handling |
|
|
71
|
+
| [`src/client/status.ts`](src/client/status.ts) | The visible status readings over inventory and the page's live set |
|
|
72
|
+
| [`src/client/slots.ts`](src/client/slots.ts) | Injected faces and the package-owned `tool.view.cordis` slot declaration |
|
|
73
|
+
| [`src/client/run-card-index.ts`](src/client/run-card-index.ts) | Per-session index of the latest eligible `cordis_run` card |
|
|
18
74
|
|
|
75
|
+
### How the panel stays current
|
|
76
|
+
|
|
77
|
+
Announcements (`cordis/dynamic-package`, `cordis/dynamic-retract`, `cordis/request-run`, `cordis/request-run-resolved`) trigger an inventory re-read instead of a patch-in-place update, because they carry no labels and a definition can appear or disappear between them. Reads are single-flight so several announcements settling at once cannot multiply the call; a connection reset both discards the in-flight read and frees the slot for a fresh one, so a reconnect never publishes the old host's rows.
|
|
78
|
+
|
|
79
|
+
</details>
|
|
80
|
+
|
|
81
|
+
-----
|
|
82
|
+
|
|
83
|
+
<a id="further-exploration"></a>
|
|
84
|
+
## Further Exploration
|
|
85
|
+
|
|
86
|
+
Read these pages when the package-level contract is not enough. They move from the surfaces to the face they operate and the tools whose calls they render.
|
|
87
|
+
|
|
88
|
+
- [Client runner](../cordis-client-runner/README.md) — the browser face the panel reads and calls.
|
|
89
|
+
- [Host runner](../cordis-host-runner/README.md) — the inventory and lifecycle verbs behind the panel.
|
|
90
|
+
- [Tool package](../tool-cordis/README.md) — the model-facing tools whose calls these cards render.
|
|
91
|
+
- [Extensions subsystem](../../../docs/subsystems/extensions.md) — the generated `ctx.dynamicCordisRunner` API and forwarded `cordis/*` events.
|
|
92
|
+
- [Dynamic client render and attachment ownership Agent Note](../../../.agents/notes/implemented/architecture/2026-08-17-dynamic-client-render-and-attachment-ownership.md) — how slot-registered browser UI is owned by its package.
|
|
93
|
+
|
|
94
|
+
-----
|
|
95
|
+
|
|
96
|
+
<a id="model-experience"></a>
|
|
19
97
|
## Model Experience
|
|
20
98
|
|
|
21
|
-
Indirectly, through the run and stop verbs these surfaces drive — the browser-side runner's orchestration for a run, and
|
|
99
|
+
Indirectly, through the run and stop verbs these surfaces drive — the browser-side runner's orchestration for a run, and the host's stop and remove verbs, the same host verbs the model's `cordis_run` and `cordis_stop` tools reach — so whatever a running definition then contributes is the runner's effect, while nothing model-visible originates in this package, which renders logged call and result slices and a host inventory read, adds no prompt content, writes no session event, and deliberately leaves no session-log trace of a person approving, declining, running, or stopping anything.
|
|
22
100
|
|
|
23
101
|
#### KV Cache effect
|
|
24
102
|
|
|
@@ -26,11 +104,27 @@ None: no prompt input originates here, and answering a run request neither exten
|
|
|
26
104
|
|
|
27
105
|
## Known Limitations and Deferred Work
|
|
28
106
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- **
|
|
35
|
-
- **A
|
|
36
|
-
- **
|
|
107
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
These limits define where the surfaces need special care. They are current package constraints, not a task backlog.
|
|
111
|
+
|
|
112
|
+
- **An open panel does not see registry changes that announce nothing** — `cordis_define`, and an undefine of a definition that was not running, change the registry without a dispatch announcement, so a panel left open across one of them keeps its rows until it is closed and opened again. A run request is the exception: it blocks the model, so it both renders its own row and triggers a read.
|
|
113
|
+
- **A request-only row is answerable but not operable** — it offers approve and decline only, because the run and stop controls need the registry row the read has yet to deliver.
|
|
114
|
+
- **A row can disappear for the width of one read** — the activity's orchestrating arm carries the session but deliberately no label, so an approved request whose registry read has not landed leaves no row until it does; in practice the read is triggered when the request arrives.
|
|
115
|
+
- **A render failure is this page's own reading, and it arrives too late for the run receipt** — the panel shows the last crash the runner saw here, so a package that renders fine in this tab shows nothing even while it crashes in another, and the model learns about it by asking (`cordis_inspect_self`) rather than from the call it already made.
|
|
116
|
+
- **A second page's load failure is invisible to the others** — the host settles a dispatch on the first load report, so a page whose browser half failed after another page acknowledged keeps reading as running on the other pages.
|
|
117
|
+
- **Any page may answer any request** — approvals are frame-wide by design, so a person in one tab can approve a run the model asked for while another tab is in front of the defining session; narrowing who may answer is deferred.
|
|
118
|
+
- **A card whose call head left the event window loses its labels** — the define card derives name and purpose from the call arguments, so a session long enough to truncate them leaves the card naming its call id; the panel is unaffected because the host inventory carries the labels.
|
|
119
|
+
|
|
120
|
+
<a id="dev-note"></a>
|
|
121
|
+
### Dev Note
|
|
122
|
+
|
|
123
|
+
<details>
|
|
124
|
+
<summary>Working context for maintainers — click to expand</summary>
|
|
125
|
+
|
|
126
|
+
None.
|
|
127
|
+
|
|
128
|
+
</details>
|
|
129
|
+
|
|
130
|
+
**Runtime invariant:** No companion is published. A single keyed toolview registration whose disposal is proven by the HMR-safety spec. The one mutable relation this package owns — the per-definition run-state observable — lives in the browser process, out of reach of the host invariant service, and the node half emits no cordis events and holds no cross-plugin state.
|
package/README.zh.md
CHANGED
|
@@ -1,36 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Cordis 动态插件浏览器面说明,供选择、组合或排查面板、工具卡片与 @pluginId 输入的用户与维护者阅读。"
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# @xneog/dsh-client-ui-cordis
|
|
2
7
|
|
|
3
8
|
[English](README.md) | 中文
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
## 概述
|
|
11
|
+
|
|
12
|
+
`dsh-client-ui-cordis` 给 web 客户端提供动态 Cordis 包的浏览器面:一个覆盖整个框架的面板,操作 host 持有的全部定义;会话里渲染 `cordis_define`、`cordis_run`、`cordis_stop` 与 `cordis_undefine` 调用的工具卡片;以及一个补全本会话已定义插件的 `@pluginId` 输入源。面板做成全局是刻意的——模型驱动的 run 阻塞在人的审批上,而无论当前在看哪个会话,这个审批都必须可达。本包不撰写任何模型可见的内容:它所操作的一切都来自浏览器 runner 与 host 的清单,卡片渲染的是会话已经记录下的 call 与 result 内容。
|
|
13
|
+
|
|
14
|
+
## 目录
|
|
15
|
+
|
|
16
|
+
- [使用本包](#use-this-package)
|
|
17
|
+
- [理解实现](#understand-the-implementation)
|
|
18
|
+
- [进一步探索](#further-exploration)
|
|
19
|
+
- [模型体验](#model-experience)
|
|
20
|
+
- [已知限制与延期工作](#known-limitations-and-deferred-work)
|
|
21
|
+
- [开发备注](#dev-note)
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## 使用本包
|
|
27
|
+
|
|
28
|
+
在同时挂载了浏览器 runner 与 host runner 的 web 客户端中组合本包,它会加上面板、工具卡片与 `@` 补全。人便拥有执行完整生命周期所需的一切:批准或拒绝模型的 run 请求、运行、停止或移除任意定义,并在同一行上看到包的实时状态变化。
|
|
29
|
+
|
|
30
|
+
### 面板显示什么
|
|
31
|
+
|
|
32
|
+
一个 `sidebar.footer.action` 席位显示角标,计数在跑数加待确认数;点开后列出每个定义及其运行控件。列表从不按会话过滤:当前会话的行置顶成组,其他会话的行仍在下方列出。行来自 host 的当前清单,并在公告改变「有哪些定义」时更新。上一次读取覆盖不到的待审批 run 请求仍然有行,直接用请求自带的会话、标签、用途与标识渲染。每一行显示两个独立事实——host 在跑什么与本页装载了什么——因此刷新后的页面会先给「装回本页」、再给全局 stop,而纯 host 定义的行如实读作运行中、只给 stop。该行还会把本页最后一次渲染失败就地显示,与装载失败共用同一个位置:一个是「它从来没装上」,另一个是「它装上了、然后抛了」。
|
|
33
|
+
|
|
34
|
+
### 工具卡片显示什么
|
|
35
|
+
|
|
36
|
+
`cordis_define` 卡片是一份记录:模型写下的 name 与 purpose、它写的源码,以及该定义是否在跑——没有开关、没有审批,只有一句指向面板的指引。`cordis_run` 卡片显示模式、插件、包与运行标识、结果,并在包注册了业务视图时经 `tool.view.cordis` 槽位提供它。`cordis_stop` 与 `cordis_undefine` 渲染紧凑的动作行。所有卡片都渲染会话记录下的 call 与 result,因此 replay 显示同一张卡。
|
|
37
|
+
|
|
38
|
+
### @pluginId 输入源
|
|
39
|
+
|
|
40
|
+
在输入框里键入 `@` 会给出当前会话已定义的插件;选中一个会输出 `@pluginId`,工具包把它变成一条钉住的引用上下文给模型。
|
|
41
|
+
|
|
42
|
+
### 需要规划的边界
|
|
43
|
+
|
|
44
|
+
定义以进程为本:刷新后的页面手上什么都没有,直到有人再次运行某个包;面板在每次公告时重读清单。审批按设计是框架级的,所以某个标签页里的人可以批准模型为另一个标签页正在看的会话所发起的 run;首个应答生效,其余收敛。
|
|
45
|
+
|
|
46
|
+
-----
|
|
47
|
+
|
|
48
|
+
<a id="understand-the-implementation"></a>
|
|
49
|
+
## 理解实现
|
|
6
50
|
|
|
7
|
-
|
|
51
|
+
<details>
|
|
52
|
+
<summary>实现细节——点击展开</summary>
|
|
8
53
|
|
|
9
|
-
|
|
54
|
+
本节解释这些界面背后的设计;可观察行为已在[使用本包](#use-this-package)中完整说明。
|
|
10
55
|
|
|
11
|
-
|
|
56
|
+
### 设计理念
|
|
12
57
|
|
|
13
|
-
|
|
58
|
+
这些界面建立在一个规则之上:两者都不把运行态放进组件 state,因为 define 调用结算时卡片会在聊天流里换位置并重挂。事实活在「谁能关闭它、就归谁」的观察量里——浏览器 runner 拥有开放请求、编排结果、本页的 live set 及其渲染失败,而本包拥有自己读来的清单与折叠过的公告。面板做成全局,是因为 run 请求会阻塞模型、且可能点名一个当前没人在看的会话里的定义;审批入口若只存在于那个会话的对话流里,就会在它正阻塞模型的时候恰好不可达。
|
|
14
59
|
|
|
15
|
-
|
|
60
|
+
### 源码地图
|
|
16
61
|
|
|
17
|
-
|
|
62
|
+
| 文件 | 职责 |
|
|
63
|
+
|---|---|
|
|
64
|
+
| [`src/client/index.ts`](src/client/index.ts) | 插件入口:槽位注册、清单接线、`@pluginId` 输入源 |
|
|
65
|
+
| [`src/client/CordisPanel.tsx`](src/client/CordisPanel.tsx) | 全局面板及其运行控件 |
|
|
66
|
+
| [`src/client/CordisDefineRow.tsx`](src/client/CordisDefineRow.tsx) | 只读的 `cordis_define` 卡片 |
|
|
67
|
+
| [`src/client/CordisRunRow.tsx`](src/client/CordisRunRow.tsx) | `cordis_run` 卡片及其业务视图席位 |
|
|
68
|
+
| [`src/client/CordisActionRow.tsx`](src/client/CordisActionRow.tsx) | `cordis_stop`/`cordis_undefine` 行 |
|
|
69
|
+
| [`src/client/card-model.ts`](src/client/card-model.ts) | 从冻结 call/result 切片派生的可回放视图模型 |
|
|
70
|
+
| [`src/client/inventory.ts`](src/client/inventory.ts) | 单飞清单读取及其重连处理 |
|
|
71
|
+
| [`src/client/status.ts`](src/client/status.ts) | 基于清单与本页 live set 的可见状态读数 |
|
|
72
|
+
| [`src/client/slots.ts`](src/client/slots.ts) | 注入面与包自有的 `tool.view.cordis` 槽位声明 |
|
|
73
|
+
| [`src/client/run-card-index.ts`](src/client/run-card-index.ts) | 每会话「最新合格 `cordis_run` 卡片」索引 |
|
|
18
74
|
|
|
75
|
+
### 面板如何保持最新
|
|
76
|
+
|
|
77
|
+
公告(`cordis/dynamic-package`、`cordis/dynamic-retract`、`cordis/request-run`、`cordis/request-run-resolved`)触发清单重读,而不是就地打补丁——因为公告不携带标签,而定义可能在两次公告之间出现或消失。读取是单飞的,因此多条公告同时结算不会放大调用次数;连接重置既丢弃在途读取、又为新读取腾出位置,所以重连绝不会发布旧 host 的行。
|
|
78
|
+
|
|
79
|
+
</details>
|
|
80
|
+
|
|
81
|
+
-----
|
|
82
|
+
|
|
83
|
+
<a id="further-exploration"></a>
|
|
84
|
+
## 进一步探索
|
|
85
|
+
|
|
86
|
+
当包级约定不够用时阅读以下页面。它们从这些界面逐步进入它们所操作的面,以及其调用被渲染成卡片的工具。
|
|
87
|
+
|
|
88
|
+
- [Client runner](../cordis-client-runner/README.zh.md)——面板读取并调用的浏览器面。
|
|
89
|
+
- [Host runner](../cordis-host-runner/README.zh.md)——面板背后的清单与生命周期动词。
|
|
90
|
+
- [工具包](../tool-cordis/README.zh.md)——调用被这些卡片渲染的模型侧工具。
|
|
91
|
+
- [extensions 子系统](../../../docs/subsystems/extensions.zh.md)——生成的 `ctx.dynamicCordisRunner` API 与转发的 `cordis/*` 事件。
|
|
92
|
+
- [动态客户端渲染与附件归属 Agent Note](../../../.agents/notes/implemented/architecture/2026-08-17-dynamic-client-render-and-attachment-ownership.zh.md)——槽位注册的浏览器 UI 如何归其包所有。
|
|
93
|
+
|
|
94
|
+
-----
|
|
95
|
+
|
|
96
|
+
<a id="model-experience"></a>
|
|
19
97
|
## 模型体验
|
|
20
98
|
|
|
21
|
-
|
|
99
|
+
间接影响,经由这些界面驱动的 run 与 stop 动词——run 走浏览器侧 runner 的编排,stop 与 remove 走 host 的动词,与模型的 `cordis_run` / `cordis_stop` 工具是同一批 host 动词。因此正在运行的定义随后贡献了什么是 runner 的效果,而本包不产生任何模型可见输入:它只渲染已落日志的 call 与 result 切片和一次 host 清单读取,不加 prompt 内容、不写会话事件,并刻意不为「有人批准 / 拒绝 / 运行 / 停止」留下会话日志痕迹。
|
|
22
100
|
|
|
23
|
-
#### KV
|
|
101
|
+
#### KV Cache 影响
|
|
24
102
|
|
|
25
103
|
无:没有任何 prompt 输入源自这里,应答一次 run 请求既不延长也不改写历史尾部。
|
|
26
104
|
|
|
27
|
-
##
|
|
105
|
+
## 已知限制与延期工作
|
|
106
|
+
|
|
107
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
这些限制说明这些界面何时需要特别小心。它们是当前包约束,不是任务积压。
|
|
111
|
+
|
|
112
|
+
- **已展开的面板看不到「不广播任何东西」的注册表变化**——`cordis_define`,以及对一个并未在运行的定义执行 undefine,都会改变注册表却不发出下发公告;因此跨过这类变化时,已展开的面板会保留旧行,直到收起再展开。run 请求是例外:它阻塞模型,所以它既自己渲染出行,也触发一次读取。
|
|
113
|
+
- **只有请求、没有清单的行可应答但不可操作**——它只提供批准与拒绝,因为 run/stop 控件需要那次读取尚未送达的注册表行。
|
|
114
|
+
- **行可能消失一次读取的时长**——活动的 orchestrating 臂带会话但刻意不带标签,因此一个已批准、但注册表读取尚未落地的请求,在读取落地前没有行;实践中读取在请求到达时即已触发。
|
|
115
|
+
- **渲染失败是本页自己的读数,而且它来得太晚、赶不上 run 的回执**——面板显示的是 runner 在本页看到的最后一次崩溃,所以一个在本标签页渲染正常的包,即使正在另一个标签页里崩溃,这里也什么都不显示;模型只能靠主动去问(`cordis_inspect_self`)才知道,而不是从它已经发出的那次调用里得知。
|
|
116
|
+
- **某一页的装载失败对其他页不可见**——host 以首个装载回报结算一次 dispatch,因此在另一页确认之后浏览器半才失败的页面,在其他页上仍会读作运行中。
|
|
117
|
+
- **任何页面都可以应答任何请求**——审批按设计是框架级的,所以某个标签页里的人可以批准模型为另一个标签页正在看的会话所发起的 run;收窄「谁有权应答」延后。
|
|
118
|
+
- **call head 掉出事件窗的卡片会丢掉标签**——define 卡片的 name 与 purpose 取自调用参数,因此会话长到把它们截断时,卡片只能以自己的 call id 自称;面板不受影响,因为 host 清单携带标签。
|
|
119
|
+
|
|
120
|
+
<a id="dev-note"></a>
|
|
121
|
+
### 开发备注
|
|
122
|
+
|
|
123
|
+
<details>
|
|
124
|
+
<summary>维护者的工作上下文——点击展开</summary>
|
|
125
|
+
|
|
126
|
+
无。
|
|
127
|
+
|
|
128
|
+
</details>
|
|
28
129
|
|
|
29
|
-
|
|
30
|
-
- **只有请求、没有清单的行可应答但不可操作** —— 它只提供允许/拒绝,因为 run/stop 开关需要那次读取尚未送达的注册表行。归组与文案不受影响(ask 自带会话、标题与用途)。
|
|
31
|
-
- **若编排跑在读取之前,该行会消失一次读取的时长** —— 活动的 orchestrating 臂带会话但**刻意不带标题**:用户自发的 run 根本不存在可取标题的 ask,而拿 id 当名字比短暂缺行更难看。所以一个已批准、但注册表读取尚未落地的请求,在读取落地前没有行。实践中这次读取在请求**到达时**就已触发,所以等到有人应答时它几乎总已落地。
|
|
32
|
-
- **渲染失败是本页自己的读数,而且它来得太晚、赶不上 run 的回执** —— 面板显示的是 runner 在**本页**看到的最后一次崩溃,所以一个在本标签页渲染正常的包,即使正在另一个标签页里崩溃,这里也什么都不显示。它同样不可能出现在 `cordis_run` 的答复里:渲染发生在 run 结算之后,所以模型只能靠主动去问(`cordis_inspect what:"temporary"`)才知道,而不是从它已经发出的那次调用里得知。
|
|
33
|
-
- **某一页的装载失败对其他页不可见** —— host 以首个装载回报结算一次 dispatch,更晚的回报只记录不动作;因此在另一页确认之后浏览器半才失败的页面,仍会读作运行中。那一页能在自己的行上看到原因(runner 会报),其他页看不到。
|
|
34
|
-
- **任何页面都可以应答任何请求** —— 审批按设计是框架级的,所以某个标签页里的人可以批准模型为另一个标签页正在看的会话所发起的 run。首个应答生效、其余收敛;收窄「谁有权应答」延后。
|
|
35
|
-
- **call head 掉出事件窗的卡片会丢掉标签** —— 卡片的 name 与 purpose 取自调用参数,会话长到把它们截断时,卡片只能以自己的 call id 自称。面板不受影响:host 清单携带标签。
|
|
36
|
-
- **窗口截断会降级「已卸载」这个读数** —— 卡片凭本会话日志里成功的 `cordis_undefine` 判定已卸载;会话长到把那条结果挤出窗口时,该定义只会显示为未运行。
|
|
130
|
+
**运行时不变式:** 不发布伴生入口。插件只注册一个 keyed toolview,HMR 测试覆盖释放;per-definition run-state 只存在于浏览器进程,Host 不变式无法观察。
|
package/lib/client.js
CHANGED
|
@@ -112,8 +112,8 @@ window.__ModuleLoader__.load({
|
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
114
|
//#endregion
|
|
115
|
-
//#region \0dsh-css:/
|
|
116
|
-
const css$2 = ".
|
|
115
|
+
//#region \0dsh-css:/Users/leandrosilvagomes/Documents/xneog-harness/packages/extensions/ui-cordis/src/client/CordisRunRow.module.css.mjs
|
|
116
|
+
const css$2 = ".LoROSq_card{flex-direction:column;gap:8px;display:flex}.LoROSq_row{align-items:center;min-height:32px;display:flex}.LoROSq_icon{color:var(--dsw-alias-state-business-primary);flex:none;margin-right:8px;display:inline-flex}.LoROSq_title{color:var(--dsw-alias-state-business-primary);flex:none;font-size:14px;font-weight:500;line-height:24px}.LoROSq_separator{corner-shape:round;background:var(--dsw-alias-state-business-primary);border-radius:50%;flex:none;width:2px;height:2px;margin:0 8px}.LoROSq_summary,.LoROSq_error{min-width:0;color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:13px;line-height:24px;overflow:hidden}.LoROSq_error{color:var(--dsw-alias-state-error-primary)}.LoROSq_status{color:var(--dsw-alias-label-caption);flex:none;margin-left:8px;font-size:12px;line-height:24px}.LoROSq_card[data-cordis-status=awaiting-approval] .LoROSq_status,.LoROSq_card[data-cordis-status=client-pending] .LoROSq_status{color:var(--dsw-alias-state-warn-label)}.LoROSq_card[data-cordis-status=running] .LoROSq_status{color:var(--dsw-alias-state-success-primary)}.LoROSq_card[data-cordis-status=failed] .LoROSq_status{color:var(--dsw-alias-state-error-primary)}.LoROSq_inspect{corner-shape:round;width:24px;height:24px;color:var(--dsw-alias-label-tertiary);cursor:pointer;opacity:0;background:0 0;border:none;border-radius:999px;justify-content:center;align-items:center;margin-left:4px;padding:0;display:inline-flex}.LoROSq_card:hover .LoROSq_inspect,.LoROSq_inspect:focus-visible{opacity:1}.LoROSq_inspect:hover{background:var(--dsw-alias-interactive-bg-hover)}.LoROSq_message{background:var(--dsw-alias-button-ghost-active-fill);color:var(--dsw-alias-label-tertiary);border-radius:8px;padding:8px 12px;font-size:12px;line-height:18px}.LoROSq_business{border:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-bg-base);border-radius:12px;min-width:0;overflow:hidden}.LoROSq_output{border:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-markdown-code-block);color:var(--dsw-alias-label-secondary);font:var(--dsw-font-markdown-code-block-small);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:8px;margin:0;padding:10px 12px;overflow:auto}.LoROSq_business .LoROSq_output{border:none;border-radius:0}";
|
|
117
117
|
const tagId$2 = "@xneog/dsh-client-ui-cordis/CordisRunRow.module.css";
|
|
118
118
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
119
119
|
const tag = document.createElement("style");
|
|
@@ -123,18 +123,18 @@ window.__ModuleLoader__.load({
|
|
|
123
123
|
document.head.appendChild(tag);
|
|
124
124
|
}
|
|
125
125
|
var CordisRunRow_module_css_default = {
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
126
|
+
"business": "LoROSq_business",
|
|
127
|
+
"card": "LoROSq_card",
|
|
128
|
+
"error": "LoROSq_error",
|
|
129
|
+
"icon": "LoROSq_icon",
|
|
130
|
+
"inspect": "LoROSq_inspect",
|
|
131
|
+
"message": "LoROSq_message",
|
|
132
|
+
"output": "LoROSq_output",
|
|
133
|
+
"row": "LoROSq_row",
|
|
134
|
+
"separator": "LoROSq_separator",
|
|
135
|
+
"status": "LoROSq_status",
|
|
136
|
+
"summary": "LoROSq_summary",
|
|
137
|
+
"title": "LoROSq_title"
|
|
138
138
|
};
|
|
139
139
|
//#endregion
|
|
140
140
|
//#region lib/types/client/CordisActionRow.js
|
|
@@ -170,7 +170,7 @@ window.__ModuleLoader__.load({
|
|
|
170
170
|
inspect !== void 0 && (0, react_jsx_runtime.jsx)("button", {
|
|
171
171
|
type: "button",
|
|
172
172
|
className: CordisRunRow_module_css_default.inspect,
|
|
173
|
-
"aria-label": "
|
|
173
|
+
"aria-label": t("action.inspect"),
|
|
174
174
|
onClick: inspect,
|
|
175
175
|
children: (0, react_jsx_runtime.jsx)(_xneog_dsh_client_ui_primitives.IconInspectOutline12, {})
|
|
176
176
|
})
|
|
@@ -207,8 +207,8 @@ window.__ModuleLoader__.load({
|
|
|
207
207
|
return loaded.some((live) => live.pluginId === row.pluginId && live.packageId === packageId && live.pluginRunId === run.pluginRunId) ? "running" : "client-pending";
|
|
208
208
|
}
|
|
209
209
|
//#endregion
|
|
210
|
-
//#region \0dsh-css:/
|
|
211
|
-
const css$1 = ".
|
|
210
|
+
//#region \0dsh-css:/Users/leandrosilvagomes/Documents/xneog-harness/packages/extensions/ui-cordis/src/client/CordisDefineRow.module.css.mjs
|
|
211
|
+
const css$1 = ".WJXhda_card{flex-direction:column;display:flex}.WJXhda_card .WJXhda_title,.WJXhda_card .WJXhda_chevron{color:var(--dsw-alias-state-business-primary)}.WJXhda_title{flex:none;font-size:14px;font-weight:500;line-height:24px}.WJXhda_row{gap:0}.WJXhda_separator{background:var(--dsw-alias-state-business-primary);border-radius:1px;flex:none;width:2px;height:2px;margin:0 8px}.WJXhda_name{text-overflow:ellipsis;white-space:nowrap;max-width:40%;color:var(--dsw-alias-label-secondary);flex:none;font-size:14px;line-height:24px;overflow:hidden}.WJXhda_purpose{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-tertiary);flex:auto;margin-left:8px;font-size:13px;line-height:24px;overflow:hidden}.WJXhda_errorSummary{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-state-error-primary);flex:auto;font-size:14px;line-height:24px;overflow:hidden}.WJXhda_requestError{text-overflow:ellipsis;white-space:nowrap;max-width:40%;color:var(--dsw-alias-state-error-primary);flex:none;margin-left:8px;font-size:12px;line-height:24px;overflow:hidden}.WJXhda_readout{flex:none;align-items:center;margin-left:8px;display:inline-flex}.WJXhda_panelHint{color:var(--dsw-alias-label-caption);margin:4px 0 2px 4px;font-size:11px;line-height:16px}.WJXhda_statusLabel{color:var(--dsw-alias-label-caption);font-size:12px;line-height:24px}.WJXhda_approvalPrompt{text-overflow:ellipsis;white-space:nowrap;max-width:40%;color:var(--dsw-alias-label-secondary);flex:none;margin-left:8px;font-size:12px;line-height:24px;overflow:hidden}.WJXhda_notice{text-overflow:ellipsis;white-space:nowrap;max-width:40%;color:var(--dsw-alias-label-caption);flex:none;margin-left:8px;font-size:12px;line-height:24px;overflow:hidden}.WJXhda_switch{height:22px;padding:0 8px;font-size:12px}.WJXhda_card[data-terminal] .WJXhda_title,.WJXhda_card[data-terminal] .WJXhda_name,.WJXhda_card[data-terminal] .WJXhda_purpose,.WJXhda_card[data-terminal] .WJXhda_statusLabel{color:var(--dsw-alias-label-caption)}.WJXhda_card[data-terminal] .WJXhda_separator{background:var(--dsw-alias-label-caption)}.WJXhda_bodyWrap{flex-direction:column;display:flex}.WJXhda_sourceCard{flex-direction:column;margin:4px 0 4px 4px;display:flex}.WJXhda_sourceTabs{border-bottom:.5px solid var(--dsw-alias-border-l2);height:32px;display:flex}.WJXhda_sourceTab{color:var(--dsw-alias-label-tertiary);cursor:pointer;font:var(--dsw-font-xs-13);background:0 0;border:0;padding:0 10px;position:relative}.WJXhda_sourceTab:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.WJXhda_sourceTab:disabled{cursor:default;opacity:.4}.WJXhda_sourceTabActive{color:var(--dsw-alias-state-business-primary)}.WJXhda_sourceTabActive:after{background:var(--dsw-alias-state-business-primary);content:\"\";border-radius:1px 1px 0 0;height:2px;position:absolute;bottom:0;left:10px;right:10px}.WJXhda_sourceTab:focus-visible{outline:1px solid var(--dsw-alias-state-business-primary);outline-offset:-1px}.WJXhda_sourcePanel{max-height:260px;overflow:auto}.WJXhda_sourceCode{margin:0}.WJXhda_codeSection{flex-direction:column;max-height:260px;margin:4px 0 4px 4px;display:flex;overflow:auto}.WJXhda_sectionLabel{color:var(--dsw-alias-label-caption);text-transform:uppercase;letter-spacing:.04em;flex:none;padding:2px 0;font-size:11px;font-weight:500;line-height:16px}.WJXhda_output{border:.5px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-markdown-code-block);white-space:pre-wrap;overflow-wrap:anywhere;font:var(--dsw-font-markdown-code-block-small);color:var(--dsw-alias-label-secondary);border-radius:8px;margin:0;padding:8px 10px}.WJXhda_output[data-error]{color:var(--dsw-alias-state-error-primary)}.WJXhda_inspectButton{border:.5px solid var(--dsw-alias-border-l4);corner-shape:round;background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-secondary);cursor:pointer;opacity:0;border-radius:999px;align-self:flex-start;align-items:center;gap:4px;margin:4px 0 2px 4px;padding:2px 8px;font-size:11px;line-height:16px;transition:opacity .1s;display:inline-flex}.WJXhda_card:hover .WJXhda_inspectButton,.WJXhda_inspectButton:focus-visible{opacity:1}.WJXhda_inspectButton:hover{background:var(--dsw-alias-interactive-bg-hover-solid);color:var(--dsw-alias-label-primary)}.WJXhda_visuallyHidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}@media (prefers-reduced-motion:reduce){.WJXhda_inspectButton{transition:none}}";
|
|
212
212
|
const tagId$1 = "@xneog/dsh-client-ui-cordis/CordisDefineRow.module.css";
|
|
213
213
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
214
214
|
const tag = document.createElement("style");
|
|
@@ -218,33 +218,33 @@ window.__ModuleLoader__.load({
|
|
|
218
218
|
document.head.appendChild(tag);
|
|
219
219
|
}
|
|
220
220
|
var CordisDefineRow_module_css_default = {
|
|
221
|
-
"
|
|
222
|
-
"
|
|
223
|
-
"
|
|
224
|
-
"
|
|
225
|
-
"
|
|
226
|
-
"
|
|
227
|
-
"
|
|
228
|
-
"
|
|
229
|
-
"
|
|
230
|
-
"
|
|
231
|
-
"
|
|
232
|
-
"
|
|
233
|
-
"
|
|
234
|
-
"
|
|
235
|
-
"
|
|
236
|
-
"
|
|
237
|
-
"
|
|
238
|
-
"
|
|
239
|
-
"
|
|
240
|
-
"
|
|
241
|
-
"
|
|
242
|
-
"
|
|
243
|
-
"
|
|
244
|
-
"statusLabel": "
|
|
245
|
-
"
|
|
246
|
-
"
|
|
247
|
-
"
|
|
221
|
+
"approvalPrompt": "WJXhda_approvalPrompt",
|
|
222
|
+
"bodyWrap": "WJXhda_bodyWrap",
|
|
223
|
+
"card": "WJXhda_card",
|
|
224
|
+
"chevron": "WJXhda_chevron",
|
|
225
|
+
"codeSection": "WJXhda_codeSection",
|
|
226
|
+
"errorSummary": "WJXhda_errorSummary",
|
|
227
|
+
"inspectButton": "WJXhda_inspectButton",
|
|
228
|
+
"name": "WJXhda_name",
|
|
229
|
+
"notice": "WJXhda_notice",
|
|
230
|
+
"output": "WJXhda_output",
|
|
231
|
+
"panelHint": "WJXhda_panelHint",
|
|
232
|
+
"purpose": "WJXhda_purpose",
|
|
233
|
+
"readout": "WJXhda_readout",
|
|
234
|
+
"requestError": "WJXhda_requestError",
|
|
235
|
+
"row": "WJXhda_row",
|
|
236
|
+
"sectionLabel": "WJXhda_sectionLabel",
|
|
237
|
+
"separator": "WJXhda_separator",
|
|
238
|
+
"sourceCard": "WJXhda_sourceCard",
|
|
239
|
+
"sourceCode": "WJXhda_sourceCode",
|
|
240
|
+
"sourcePanel": "WJXhda_sourcePanel",
|
|
241
|
+
"sourceTab": "WJXhda_sourceTab",
|
|
242
|
+
"sourceTabActive": "WJXhda_sourceTabActive",
|
|
243
|
+
"sourceTabs": "WJXhda_sourceTabs",
|
|
244
|
+
"statusLabel": "WJXhda_statusLabel",
|
|
245
|
+
"switch": "WJXhda_switch",
|
|
246
|
+
"title": "WJXhda_title",
|
|
247
|
+
"visuallyHidden": "WJXhda_visuallyHidden"
|
|
248
248
|
};
|
|
249
249
|
//#endregion
|
|
250
250
|
//#region lib/types/client/CordisDefineRow.js
|
|
@@ -390,7 +390,7 @@ window.__ModuleLoader__.load({
|
|
|
390
390
|
type: "button",
|
|
391
391
|
className: CordisDefineRow_module_css_default.inspectButton,
|
|
392
392
|
onClick: inspect,
|
|
393
|
-
children: [(0, react_jsx_runtime.jsx)(_xneog_dsh_client_ui_primitives.IconInspectOutline12, {}), "
|
|
393
|
+
children: [(0, react_jsx_runtime.jsx)(_xneog_dsh_client_ui_primitives.IconInspectOutline12, {}), t("action.inspect")]
|
|
394
394
|
})
|
|
395
395
|
]
|
|
396
396
|
})
|
|
@@ -527,7 +527,7 @@ window.__ModuleLoader__.load({
|
|
|
527
527
|
inspect !== void 0 && (0, react_jsx_runtime.jsx)("button", {
|
|
528
528
|
type: "button",
|
|
529
529
|
className: CordisRunRow_module_css_default.inspect,
|
|
530
|
-
"aria-label": "
|
|
530
|
+
"aria-label": t("action.inspect"),
|
|
531
531
|
onClick: inspect,
|
|
532
532
|
children: (0, react_jsx_runtime.jsx)(_xneog_dsh_client_ui_primitives.IconInspectOutline12, {})
|
|
533
533
|
})
|
|
@@ -568,8 +568,8 @@ window.__ModuleLoader__.load({
|
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
570
|
//#endregion
|
|
571
|
-
//#region \0dsh-css:/
|
|
572
|
-
const css = ".
|
|
571
|
+
//#region \0dsh-css:/Users/leandrosilvagomes/Documents/xneog-harness/packages/extensions/ui-cordis/src/client/CordisPanel.module.css.mjs
|
|
572
|
+
const css = ".kFA0kG_layer{flex:none;align-items:center;width:100%;height:42px;margin:8px 0 0;display:flex;position:relative}.kFA0kG_footerButtons{align-items:center;width:100%;display:flex}.kFA0kG_badge{width:calc(100% + 4px);height:42px;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;border-radius:12px;align-items:center;gap:8px;margin:0 -2px;padding:0 10px 0 8px;font-family:inherit;font-size:14px;display:inline-flex;overflow:hidden}.kFA0kG_badge:hover,.kFA0kG_badge[data-active]{background:var(--dsw-alias-interactive-bg-hover)}.kFA0kG_badgeLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.kFA0kG_badgeCount{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;margin-left:auto;font-size:12px;line-height:16px}.kFA0kG_layer.kFA0kG_rail{width:36px;height:36px;margin:0}.kFA0kG_rail .kFA0kG_badge{corner-shape:round;border-radius:50%;justify-content:center;gap:0;width:36px;height:36px;padding:0}.kFA0kG_rail .kFA0kG_footerButtons{flex-direction:column;gap:2px}.kFA0kG_panel{z-index:30;background:var(--dsw-specific-menu);--dsw-elevation-stroke-color:var(--dsw-alias-border-l1);width:420px;max-width:calc(100vw - 24px);max-height:60vh;box-shadow:var(--dsw-elevation-prominent);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border:0;border-radius:12px;flex-direction:column;display:flex;position:fixed;overflow:hidden}.kFA0kG_header{box-sizing:border-box;flex:none;justify-content:space-between;align-items:center;min-height:44px;padding:10px 12px;display:flex}.kFA0kG_body{flex:1;min-height:0;padding:0 12px 12px;overflow-y:auto}.kFA0kG_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500;line-height:20px}.kFA0kG_note,.kFA0kG_readError{color:var(--dsw-alias-label-tertiary);margin:4px 0;font-size:12px;line-height:18px}.kFA0kG_readError{color:var(--dsw-alias-state-error-primary)}.kFA0kG_group{color:var(--dsw-alias-label-caption);text-transform:uppercase;letter-spacing:.04em;margin:8px 0;font-size:11px;font-weight:500;line-height:16px}.kFA0kG_rows{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.kFA0kG_row{border:.5px solid var(--dsw-alias-border-l4);border-radius:12px;flex-direction:column;gap:8px;padding:14px 12px 10px;display:flex}.kFA0kG_row[data-cordis-awaiting]{border-color:var(--dsw-alias-state-business-primary)}.kFA0kG_rowHead{align-items:center;gap:8px;display:flex}.kFA0kG_rowId{color:var(--dsw-alias-label-tertiary);font-family:var(--dsh-font-mono,monospace);flex:none;font-size:11px;line-height:20px}.kFA0kG_rowName{min-width:0;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.kFA0kG_rowStatus{background:var(--dsw-alias-button-ghost-active-fill);height:20px;color:var(--dsw-alias-label-caption);border-radius:10px;flex:none;align-items:center;padding:0 6px;font-size:11px;line-height:20px;display:inline-flex}.kFA0kG_row[data-cordis-status=idle] .kFA0kG_rowStatus{background:var(--dsw-alias-button-ghost-active-fill);color:var(--dsw-alias-label-caption)}.kFA0kG_row[data-cordis-status=awaiting-approval] .kFA0kG_rowStatus,.kFA0kG_row[data-cordis-status=client-pending] .kFA0kG_rowStatus{background:var(--dsw-alias-state-warn-tertiary);color:var(--dsw-alias-state-warn-label)}.kFA0kG_row[data-cordis-status=failed] .kFA0kG_rowStatus{background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary)}.kFA0kG_row[data-cordis-status=running] .kFA0kG_rowStatus{background:var(--dsw-alias-state-success-tertiary);color:var(--dsw-alias-state-success-primary)}.kFA0kG_rowDetail{align-items:center;gap:8px;min-height:28px;display:flex}.kFA0kG_versionPicker{color:var(--dsw-alias-label-caption);align-items:center;gap:8px;font-size:11px;line-height:18px;display:flex}.kFA0kG_versionPicker select{border:.5px solid var(--dsw-alias-border-l3);min-width:0;height:26px;color:var(--dsw-alias-label-secondary);font:inherit;background:0 0;border-radius:7px;flex:1;padding:0 8px}.kFA0kG_rowPurpose{min-width:0;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:12px;line-height:18px;overflow:hidden}.kFA0kG_rowError{color:var(--dsw-alias-state-error-primary);font-size:12px;line-height:18px}.kFA0kG_rowActions{flex:none;align-items:center;gap:10px;display:flex}.kFA0kG_transition{min-width:0;color:var(--dsw-alias-label-caption);align-items:center;gap:8px;font-size:11px;line-height:18px;display:flex}.kFA0kG_transitionActions{gap:6px;margin-left:auto;display:flex}.kFA0kG_transitionActions button{border:.5px solid var(--dsw-alias-border-l3);corner-shape:round;color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;background:0 0;border-radius:999px;padding:2px 8px}.kFA0kG_transitionActions button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.kFA0kG_transitionActions button:disabled{opacity:.4;cursor:default}.kFA0kG_activeVersion{color:var(--dsw-alias-label-caption);font-size:11px;line-height:16px}.kFA0kG_actionButton{corner-shape:round;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:999px;justify-content:center;align-items:center;padding:0;display:inline-flex}.kFA0kG_actionButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.kFA0kG_actionButton:disabled{opacity:.4;cursor:default}.kFA0kG_doubleCheck{width:17px;height:14px;display:inline-block;position:relative}.kFA0kG_doubleCheck svg{position:absolute;top:1px}.kFA0kG_doubleCheck svg:first-child{opacity:.7;left:0}.kFA0kG_doubleCheck svg:last-child{left:5px}";
|
|
573
573
|
const tagId = "@xneog/dsh-client-ui-cordis/CordisPanel.module.css";
|
|
574
574
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
575
575
|
const tag = document.createElement("style");
|
|
@@ -579,35 +579,35 @@ window.__ModuleLoader__.load({
|
|
|
579
579
|
document.head.appendChild(tag);
|
|
580
580
|
}
|
|
581
581
|
var CordisPanel_module_css_default = {
|
|
582
|
-
"
|
|
583
|
-
"
|
|
584
|
-
"
|
|
585
|
-
"
|
|
586
|
-
"
|
|
587
|
-
"
|
|
588
|
-
"
|
|
589
|
-
"
|
|
590
|
-
"
|
|
591
|
-
"
|
|
592
|
-
"
|
|
593
|
-
"
|
|
594
|
-
"
|
|
595
|
-
"
|
|
596
|
-
"
|
|
597
|
-
"
|
|
598
|
-
"
|
|
599
|
-
"
|
|
600
|
-
"
|
|
601
|
-
"
|
|
602
|
-
"
|
|
603
|
-
"
|
|
604
|
-
"
|
|
605
|
-
"
|
|
606
|
-
"
|
|
607
|
-
"
|
|
608
|
-
"
|
|
609
|
-
"
|
|
610
|
-
"
|
|
582
|
+
"actionButton": "kFA0kG_actionButton",
|
|
583
|
+
"activeVersion": "kFA0kG_activeVersion",
|
|
584
|
+
"badge": "kFA0kG_badge",
|
|
585
|
+
"badgeCount": "kFA0kG_badgeCount",
|
|
586
|
+
"badgeLabel": "kFA0kG_badgeLabel",
|
|
587
|
+
"body": "kFA0kG_body",
|
|
588
|
+
"doubleCheck": "kFA0kG_doubleCheck",
|
|
589
|
+
"footerButtons": "kFA0kG_footerButtons",
|
|
590
|
+
"group": "kFA0kG_group",
|
|
591
|
+
"header": "kFA0kG_header",
|
|
592
|
+
"layer": "kFA0kG_layer",
|
|
593
|
+
"note": "kFA0kG_note",
|
|
594
|
+
"panel": "kFA0kG_panel",
|
|
595
|
+
"rail": "kFA0kG_rail",
|
|
596
|
+
"readError": "kFA0kG_readError",
|
|
597
|
+
"row": "kFA0kG_row",
|
|
598
|
+
"rowActions": "kFA0kG_rowActions",
|
|
599
|
+
"rowDetail": "kFA0kG_rowDetail",
|
|
600
|
+
"rowError": "kFA0kG_rowError",
|
|
601
|
+
"rowHead": "kFA0kG_rowHead",
|
|
602
|
+
"rowId": "kFA0kG_rowId",
|
|
603
|
+
"rowName": "kFA0kG_rowName",
|
|
604
|
+
"rowPurpose": "kFA0kG_rowPurpose",
|
|
605
|
+
"rowStatus": "kFA0kG_rowStatus",
|
|
606
|
+
"rows": "kFA0kG_rows",
|
|
607
|
+
"title": "kFA0kG_title",
|
|
608
|
+
"transition": "kFA0kG_transition",
|
|
609
|
+
"transitionActions": "kFA0kG_transitionActions",
|
|
610
|
+
"versionPicker": "kFA0kG_versionPicker"
|
|
611
611
|
};
|
|
612
612
|
//#endregion
|
|
613
613
|
//#region lib/types/client/CordisPanel.js
|
|
@@ -1193,6 +1193,7 @@ window.__ModuleLoader__.load({
|
|
|
1193
1193
|
"action.remove": "移除",
|
|
1194
1194
|
"action.retry": "重试",
|
|
1195
1195
|
"action.rollback": "回退",
|
|
1196
|
+
"action.inspect": "查看",
|
|
1196
1197
|
"render.failedAbdicated": "{slot} 渲染失败,已恢复默认界面:",
|
|
1197
1198
|
"render.failedHeld": "{slot} 渲染失败:",
|
|
1198
1199
|
"a11y.defining": "正在定义插件",
|
|
@@ -1245,6 +1246,7 @@ window.__ModuleLoader__.load({
|
|
|
1245
1246
|
"action.remove": "Remove",
|
|
1246
1247
|
"action.retry": "Retry",
|
|
1247
1248
|
"action.rollback": "Roll back",
|
|
1249
|
+
"action.inspect": "Inspect",
|
|
1248
1250
|
"render.failedAbdicated": "Rendering failed in {slot}; the default UI was restored:",
|
|
1249
1251
|
"render.failedHeld": "Rendering failed in {slot}:",
|
|
1250
1252
|
"a11y.defining": "Defining the plugin",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Host operations used directly by the frame-wide Cordis panel. */
|
|
2
|
-
import type { SessionId } from '@xneog/dsh-
|
|
2
|
+
import type { SessionId } from '@xneog/dsh-api-remotes/client';
|
|
3
3
|
import type { CordisDynamicPluginId, DynamicCordisInventoryRow } from './events.ts';
|
|
4
4
|
/** Result of a panel lifecycle gesture. */
|
|
5
5
|
export type CordisActionResult = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Cordis dynamic-plugin cards, inventory panel, business-view host, and `@pluginId` source. */
|
|
2
|
-
import type { ClientContext } from '@xneog/
|
|
2
|
+
import type { Context as ClientContext } from '@xneog/cordis';
|
|
3
3
|
export type { CordisCardFace, CordisPanelFace, CordisRunCardFace, CordisToolViewOwnerProps } from './slots.ts';
|
|
4
4
|
export type { CordisActionResult, CordisDynamicPort, CordisInventoryRow } from './dynamic-port.ts';
|
|
5
5
|
export type { CordisDefineRowProps } from './CordisDefineRow.tsx';
|
|
@@ -40,6 +40,7 @@ export declare const zh: {
|
|
|
40
40
|
'action.remove': string;
|
|
41
41
|
'action.retry': string;
|
|
42
42
|
'action.rollback': string;
|
|
43
|
+
'action.inspect': string;
|
|
43
44
|
'render.failedAbdicated': string;
|
|
44
45
|
'render.failedHeld': string;
|
|
45
46
|
'a11y.defining': string;
|
|
@@ -100,6 +101,7 @@ export declare const en: {
|
|
|
100
101
|
'action.remove': string;
|
|
101
102
|
'action.retry': string;
|
|
102
103
|
'action.rollback': string;
|
|
104
|
+
'action.inspect': string;
|
|
103
105
|
'render.failedAbdicated': string;
|
|
104
106
|
'render.failedHeld': string;
|
|
105
107
|
'a11y.defining': string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Session-local ownership index for Package business views on `cordis_run` cards. */
|
|
2
|
-
import type { SessionId } from '@xneog/dsh-
|
|
2
|
+
import type { SessionId } from '@xneog/dsh-api-remotes/client';
|
|
3
3
|
import type { HostObservable } from '@xneog/dsh-client-ui-slots';
|
|
4
4
|
import type { CordisDynamicPackageId, CordisDynamicPluginId, CordisDynamicPluginRunId } from './events.ts';
|
|
5
5
|
/** Stable keyed-slot identity of one Package-owned business view. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Injected faces and the Package-owned `tool.view.cordis` slot declaration. */
|
|
2
|
-
import type { SessionId } from '@xneog/dsh-
|
|
2
|
+
import type { SessionId } from '@xneog/dsh-api-remotes/client';
|
|
3
3
|
import type { HostObservable } from '@xneog/dsh-client-ui-slots';
|
|
4
4
|
import type { CordisRunActivity, CordisRunFailure, CordisUserRunRequest, DynamicCordisLivePackage, DynamicCordisRenderFailure } from '@xneog/dsh-cordis-client-runner/client';
|
|
5
5
|
import type { CordisActionResult } from './dynamic-port.ts';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xneog/dsh-client-ui-cordis",
|
|
3
3
|
"description": "Cordis dynamic-plugin definition card: the keyed cordis_define tool row with its run/stop switch",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.3-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -18,10 +18,6 @@
|
|
|
18
18
|
"types": "./lib/types/index.d.ts",
|
|
19
19
|
"default": "./lib/index.js"
|
|
20
20
|
},
|
|
21
|
-
"./invariant": {
|
|
22
|
-
"types": "./lib/types/invariant.d.ts",
|
|
23
|
-
"default": "./lib/invariant.js"
|
|
24
|
-
},
|
|
25
21
|
"./client": {
|
|
26
22
|
"types": "./lib/types/client/index.d.ts",
|
|
27
23
|
"default": "./lib/client.js"
|
|
@@ -32,12 +28,13 @@
|
|
|
32
28
|
"dsh": {
|
|
33
29
|
"client": {
|
|
34
30
|
"inject": [
|
|
35
|
-
"@xneog/dsh-client-runtime",
|
|
36
31
|
"@xneog/dsh-client-connection",
|
|
37
32
|
"@xneog/dsh-cordis-client-runner",
|
|
38
33
|
"@xneog/dsh-api-remotes",
|
|
39
34
|
"@xneog/dsh-client-locale",
|
|
40
35
|
"@xneog/dsh-client-ui-input-trigger",
|
|
36
|
+
"@xneog/dsh-client-ui-renderer",
|
|
37
|
+
"@xneog/dsh-client-ui-session",
|
|
41
38
|
"@xneog/dsh-client-ui-tool",
|
|
42
39
|
"@xneog/dsh-client-ui-sidebar"
|
|
43
40
|
],
|
|
@@ -46,39 +43,27 @@
|
|
|
46
43
|
},
|
|
47
44
|
"license": "MIT",
|
|
48
45
|
"peerDependencies": {
|
|
49
|
-
"@xneog/
|
|
50
|
-
"@xneog/dsh-client-connection": "0.1.0",
|
|
51
|
-
"@xneog/dsh-cordis-client-runner": "0.1.0",
|
|
52
|
-
"@xneog/dsh-client-locale": "0.1.0",
|
|
53
|
-
"@xneog/dsh-client-runtime": "0.1.0",
|
|
54
|
-
"@xneog/dsh-client-ui-primitives": "0.1.0",
|
|
55
|
-
"@xneog/dsh-client-ui-sidebar": "0.1.0",
|
|
56
|
-
"@xneog/dsh-client-ui-input-trigger": "0.1.0",
|
|
57
|
-
"@xneog/dsh-client-ui-slots": "0.1.0",
|
|
58
|
-
"@xneog/dsh-client-ui-tool": "0.1.0",
|
|
59
|
-
"@xneog/dsh-invariants": "0.1.0",
|
|
60
|
-
"@xneog/cordis": "0.1.0",
|
|
61
|
-
"react": "^18.2.0"
|
|
46
|
+
"@xneog/cordis": "^4.0.2"
|
|
62
47
|
},
|
|
63
48
|
"devDependencies": {
|
|
64
|
-
"@xneog/dsh-api-remotes": "0.1.0",
|
|
65
|
-
"@xneog/dsh-client-connection": "0.1.0",
|
|
66
|
-
"@xneog/dsh-cordis-client-runner": "0.1.0",
|
|
67
|
-
"@xneog/dsh-client-locale": "0.1.0",
|
|
68
|
-
"@xneog/dsh-client-runtime": "0.1.0",
|
|
69
|
-
"@xneog/dsh-client-ui-primitives": "0.1.0",
|
|
70
|
-
"@xneog/dsh-client-ui-sidebar": "0.1.0",
|
|
71
|
-
"@xneog/dsh-client-ui-input-trigger": "0.1.0",
|
|
72
|
-
"@xneog/dsh-client-ui-slots": "0.1.0",
|
|
73
|
-
"@xneog/dsh-client-ui-tool": "0.1.0",
|
|
74
|
-
"@xneog/dsh-invariants": "0.1.0",
|
|
75
49
|
"@types/react": "~18.3.1",
|
|
76
|
-
"
|
|
77
|
-
"
|
|
50
|
+
"react": "^18.2.0",
|
|
51
|
+
"@xneog/dsh-api-remotes": "^0.1.3-alpha.1",
|
|
52
|
+
"@xneog/dsh-client-connection": "^0.1.3-alpha.1",
|
|
53
|
+
"@xneog/dsh-cordis-client-runner": "^0.1.3-alpha.1",
|
|
54
|
+
"@xneog/dsh-session": "^0.1.3-alpha.1",
|
|
55
|
+
"@xneog/dsh-client-ui-sidebar": "^0.1.3-alpha.1",
|
|
56
|
+
"@xneog/dsh-client-ui-session": "^0.1.3-alpha.1",
|
|
57
|
+
"@xneog/dsh-client-ui-slots": "^0.1.3-alpha.1",
|
|
58
|
+
"@xneog/cordis": "^4.0.2",
|
|
59
|
+
"@xneog/dsh-client-ui-tool": "^0.1.3-alpha.1",
|
|
60
|
+
"@xneog/dsh-client-ui-input-trigger": "^0.1.3-alpha.1",
|
|
61
|
+
"@xneog/dsh-client-ui-renderer": "^0.1.3-alpha.1",
|
|
62
|
+
"@xneog/dsh-client-locale": "^0.1.3-alpha.1",
|
|
63
|
+
"@xneog/dsh-client-ui-primitives": "^0.1.3-alpha.1"
|
|
78
64
|
},
|
|
79
65
|
"files": [
|
|
80
66
|
"lib/index.js",
|
|
81
|
-
"lib/invariant.js",
|
|
82
67
|
"lib/client.js",
|
|
83
68
|
"lib/types/**/*.d.ts"
|
|
84
69
|
],
|
package/lib/invariant.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
//#region lib/types/invariant.js
|
|
2
|
-
/**
|
|
3
|
-
* Package-owned invariant companion for `@xneog/dsh-client-ui-cordis`.
|
|
4
|
-
* @module @xneog/dsh-client-ui-cordis/invariant
|
|
5
|
-
*/
|
|
6
|
-
const PACKAGE_NAME = "@xneog/dsh-client-ui-cordis";
|
|
7
|
-
/** Cordis companion plugin name. */
|
|
8
|
-
const name = "client-ui-cordis-invariant";
|
|
9
|
-
/** Service required before the companion can reserve package ownership. */
|
|
10
|
-
const inject = ["invariants"];
|
|
11
|
-
/**
|
|
12
|
-
* No runtime invariant: a single keyed toolview registration whose disposal is
|
|
13
|
-
* proven by the HMR-safety spec. The one mutable relation this package owns —
|
|
14
|
-
* the per-definition run-state observable — lives in the browser process, out
|
|
15
|
-
* of reach of the host invariant service, and the node half emits no cordis
|
|
16
|
-
* events and holds no cross-plugin state.
|
|
17
|
-
*/
|
|
18
|
-
const install = () => {};
|
|
19
|
-
/**
|
|
20
|
-
* Register this package's invariant companion.
|
|
21
|
-
* @param ctx - Cordis context carrying the invariant service.
|
|
22
|
-
* @returns the installed registration's disposer after setup succeeds.
|
|
23
|
-
*/
|
|
24
|
-
const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
|
|
25
|
-
//#endregion
|
|
26
|
-
export { apply, inject, name };
|
package/lib/types/invariant.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Package-owned invariant companion for `@xneog/dsh-client-ui-cordis`.
|
|
3
|
-
* @module @xneog/dsh-client-ui-cordis/invariant
|
|
4
|
-
*/
|
|
5
|
-
import type { Context } from '@xneog/cordis';
|
|
6
|
-
/** Cordis companion plugin name. */
|
|
7
|
-
export declare const name = "client-ui-cordis-invariant";
|
|
8
|
-
/** Service required before the companion can reserve package ownership. */
|
|
9
|
-
export declare const inject: string[];
|
|
10
|
-
/**
|
|
11
|
-
* Register this package's invariant companion.
|
|
12
|
-
* @param ctx - Cordis context carrying the invariant service.
|
|
13
|
-
* @returns the installed registration's disposer after setup succeeds.
|
|
14
|
-
*/
|
|
15
|
-
export declare const apply: (ctx: Context) => Promise<() => void>;
|
|
16
|
-
//# sourceMappingURL=invariant.d.ts.map
|