better-dsh 0.2.3-c → 0.2.3-e
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/docs/50_test-reports/2026-09-11-control-prompt-into-eval-description/345/256/236/346/265/213/346/212/245/345/221/212.md +222 -0
- package/docs/50_test-reports/2026-09-12-fs-scheme-resolution-/345/256/236/346/265/213/346/212/245/345/221/212.md +81 -0
- package/docs/50_test-reports/2026-09-12-url-schemes-grammar-matrix/344/270/216catalog-centralize-/345/256/236/346/265/213/346/212/245/345/221/212.md +234 -0
- package/docs/50_test-reports/2026-09-12-url-schemes-recallable-context-design/351/252/214/350/257/201/346/212/245/345/221/212.md +160 -0
- package/docs/50_test-reports/2026-09-12-url-schemes-recallable-context-/345/256/236/346/265/213/345/211/247/346/234/254.md +44 -0
- package/docs/50_test-reports/2026-09-12-url-schemes-recallable-context-/345/256/236/346/265/213/346/212/245/345/221/212.md +89 -0
- package/docs/50_test-reports/2026-09-12-url-schemes-/345/205/255scheme/345/206/222/347/203/237/344/270/216/350/276/271/347/225/214/345/256/236/346/265/213/346/212/245/345/221/212.md +198 -0
- package/docs/50_test-reports/2026-09-13-hashline-off/344/270/213scheme/345/217/257/350/276/276/346/200/247/345/267/245/345/205/267/351/235/242/344/270/215/345/257/271/347/247/260-/345/256/236/346/265/213/346/212/245/345/221/212.md +246 -0
- package/docs/50_test-reports/2026-09-13-preact-ui-shell/345/256/236/346/265/213/346/212/245/345/221/212.md +50 -0
- package/docs/50_test-reports/v0.2.3c-mobile-wave/345/256/236/346/265/213/346/212/245/345/221/212.md +47 -0
- package/eval-description.md +33 -0
- package/lib/client/index.js +1 -1
- package/lib/fs-aware/sandbox-plugin.d.ts +71 -0
- package/lib/fs-aware/sandbox-plugin.js +249 -0
- package/lib/index.d.ts +11 -18
- package/lib/index.js +555 -757
- package/lib/py-sdk-Chvy92MB.js +178 -0
- package/lib/py-sdk.d.ts +19 -2
- package/lib/py-sdk.js +2 -2
- package/lib/wrap-DC8O3SYz.js +721 -0
- package/package.json +7 -2
- package/url-schemes-instruction.md +22 -0
- package/control-prompt.md +0 -37
- package/lib/py-sdk-BCaOGYz7.d.ts +0 -125
- package/lib/py-sdk-CbgYiX8O.js +0 -691
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# hashline:false 配置下 URL scheme 可达性的**工具面不对称** — 实测报告
|
|
2
|
+
|
|
3
|
+
- 日期:2026-09-13
|
|
4
|
+
- 被测对象:`dashr/src/url-schemes/` 七类 URL scheme(`skill://`、`agent://`、`dsh://`、`ctx://`、`dvc://`、`http(s)://`)在**当前活体配置**下的 `read`/`grep`/`glob`/`write` 行为。
|
|
5
|
+
- 被测运行时:**本 agent 自己所在的活体实例** —— `dsh web` @ `http://127.0.0.1:4999`,`DSH_HOME=/home/u1/workspaces/dashr/.dsh-test`,`DSH_SESSION_ID=session-1ae1181e-abb7-4d59-939e-f5e0400a4258`,cwd `/home/u1/workspaces/dashr`。
|
|
6
|
+
- 方法:**第一人称实测**。全部调用由本 agent 在真实 runtime 中发出(`read`/`grep`/`glob`/`write` 工具),无静态推断。被观测返回值原文摘录于 §3。
|
|
7
|
+
- change:无(系统冒烟,非某 change 的验收)。
|
|
8
|
+
- 关联:`2026-09-12-fs-scheme-resolution-实测报告.md`、`2026-09-12-url-schemes-六scheme冒烟与边界实测报告.md`(差异见 §5)。
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 0. 结论速览
|
|
13
|
+
|
|
14
|
+
| 判定项 | 结果 |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `dsh://` / `dvc://` / `http://` 在 `read` 上可达 | ✅ |
|
|
17
|
+
| `skill://` 在 `read` 上 | ✅ **已收口(2026-09-13 user 裁决后返工)**:不再查 registry——`isSessionLayerScheme` 在 `wrap.ts` 与 `sandbox-plugin.ts` 双处纳入 `skill://`,直接抛结构化 `CTX_SESSION_LAYER` 边界错误,文案可执行(指 `skill` 工具 / `grep`,`glob path=skill://…`);活的假 "unknown" 消失,`sessionCwd`/`scopedAwareSkills`/`URL_SKILL_NOT_INVOCABLE_SCOPE` 死代码在 src/副本/活体 bundle 全 0 命中(user 第二轮亲自复验) |
|
|
18
|
+
| `https://` 在 `read` 上可达 | ✅ 已修(`HTTP_SCHEMES` 循环登记)并两轮复验存活 |
|
|
19
|
+
| 同一批 scheme 在 `grep`/`glob` 上可达 | ✅ `ctx://`、`agent://`、`skill://`、`https://` 全部可达(§2、§3) |
|
|
20
|
+
| 根因 | **`hashline:false` 使 DASHR 的 `read` 包装不安装 → `read` 退化为平台原生工具 → 只剩 FS 层 resolver;`grep`/`glob`/`write` 包装仅由 `urlSchemes` 门控,仍在场 → 走工具层 resolver** |
|
|
21
|
+
|
|
22
|
+
**一句话**:不是 scheme 坏了,是**同一实例里 `read` 与 `grep`/`glob`/`write` 分属两套 resolver**。`hashline:false` 配置下,会话型(`ctx://`/`agent://`)只经 `grep`/`glob` 抵达,`read` 是死的;`https://` 更因 FS 层只登记了 `http` 而整条断掉。
|
|
23
|
+
|
|
24
|
+
> **2026-09-13 收口更新(user 第二轮复验确认)**:`https://` 已修(两轮活体存活);`skill://` 按业务逻辑归属裁决重分类为会话型边界(§4 P1-skill 处置块),行为收窄(全局技能亦不在 FS 层解析)但文案已指替代路径,`grep`/`glob` 回退复验通过。
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 1. 环境与配置锚定
|
|
28
|
+
|
|
29
|
+
### 1.1 配置来源(profile 层唯一)
|
|
30
|
+
|
|
31
|
+
`.dsh-test/profiles/web/cordis.patch.yml`(0.1.5-rc.2 无 home patch 层,故 `.dsh-test/cordis.patch.yml` 空):
|
|
32
|
+
|
|
33
|
+
```yaml
|
|
34
|
+
- id: dashr-repl
|
|
35
|
+
config:
|
|
36
|
+
python: !!js process.env.DASHR_KERNEL_PYTHON ?? 'python3'
|
|
37
|
+
snapshotDir: /home/u1/workspaces/dashr/.dsh-test/snapshots
|
|
38
|
+
hashline: false # ← 关键
|
|
39
|
+
urlSchemes: true
|
|
40
|
+
|
|
41
|
+
- id: fs-sandbox
|
|
42
|
+
name: './node_modules/better-dsh/lib/fs-aware/sandbox-plugin.js'
|
|
43
|
+
config:
|
|
44
|
+
urlSchemes: true
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 1.2 活体日志佐证
|
|
48
|
+
|
|
49
|
+
`.scratch/dsh-4999.log`(每个 session-start 一行):
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
DEBUG-INSTALL gates: {"urlSchemes":true,"hashline":false}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 1.3 工具面身份判定(决定性)
|
|
56
|
+
|
|
57
|
+
当前 `read` 工具**不是** DASHR 的 URL-aware read:
|
|
58
|
+
|
|
59
|
+
| 证据 | 值 |
|
|
60
|
+
|---|---|
|
|
61
|
+
| 工具入参名 | `file_path`(DASHR 包装用 `path`,见 `url-schemes/tools/read.ts:92`) |
|
|
62
|
+
| 输出形态 | 行号前缀 `N: content`(DASHR 包装 scheme 分支返回原文、文件分支返回 `HASH│content`) |
|
|
63
|
+
| 包装注册门 | `url-schemes/index.ts:188` `if (gates.hashline) { …register(createReadTool…) }` → `hashline:false` 即不注册 |
|
|
64
|
+
| 注释自证 | `index.ts:158-159`:**"`hashline: false` → read wrapper 不安装(captured 原生 read 独立站立,scheme 解析由挂载的 FS 后端承担)"** |
|
|
65
|
+
|
|
66
|
+
`grep`/`glob`/`write` 的注册门是 `urlSchemes`(`index.ts:197`、`266-268`),故**仍在场**,走工具层 resolver。实测 `write dsh://config` 报的是 `url-schemes/tools/write.ts:130` 的文案、`write dvc://ast_grep` 成功派发,均可交叉印证工具层包装在场。
|
|
67
|
+
|
|
68
|
+
### 1.4 两套 resolver 的登记差异(根因表)
|
|
69
|
+
|
|
70
|
+
| resolver | 构造点 | 登记 schemes | 环境字段 |
|
|
71
|
+
|---|---|---|---|
|
|
72
|
+
| **工具层**(read/grep/glob/write 包装消费) | `url-schemes/index.ts:283-328` | `skill`、`agent`、`dsh`、`dvc`、`ctx`、**`HTTP_SCHEMES = ['http','https']`** | `{ agent, cwd, rawUrl }`(`tools/read.ts:119-121`、`tools/grep.ts:69`) |
|
|
73
|
+
| **FS 层**(原生 read/grep/glob 经 `ctx.fs` 消费) | `fs-aware/wrap.ts:49-59` | `skill`、`dsh`、`dvc`、**仅字面 `http`** | 仅 `{ fs, rawUrl }`(`wrap.ts:81`,**无 agent/cwd**) |
|
|
74
|
+
| **FS 层会话型守卫** | `wrap.ts:37-46`、`99-115` | `ctx://`/`agent://` → 结构化 `CTX_SESSION_LAYER` | — |
|
|
75
|
+
|
|
76
|
+
两处差异直接产生全部四个失败:`https` 未登记、`ctx`/`agent` 被守卫、`skill` 缺 `cwd`+`scope`。
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 2. scheme × 工具 可达性矩阵
|
|
81
|
+
|
|
82
|
+
(✅ 实测可达;❌ 实测失败;`—` 本轮未测)
|
|
83
|
+
|
|
84
|
+
| scheme | `read`(原生 / FS 层) | `grep`(工具层) | `glob`(工具层) | `write`(工具层) |
|
|
85
|
+
|---|---|---|---|---|
|
|
86
|
+
| `dsh://` | ✅ 列表/配置/选择器 | ✅(`path: dsh://docs` 命中 4 行) | ✅(`dsh://docs/subsystems` → 116 文件) | ❌ 只读(`tools/write.ts:130`) |
|
|
87
|
+
| `dvc://` | ✅ roster + 各设备文档 | — | — | ✅ 三设备真派发(`ast_grep`/`ast_edit`/`browser`) |
|
|
88
|
+
| `http://` | ✅(`example.com` 抓回) | — | — | ❌ 只读 |
|
|
89
|
+
| `https://` | ❌ **未登记** | ✅(`example.com` 命中) | — | — |
|
|
90
|
+
| `skill://` | ❌ **unknown** | ✅(`book-to-skill` 命中 560 行/约 130 文件) | ✅(全部文件路径列出) | ❌ 只读 |
|
|
91
|
+
| `ctx://` | ❌ **边界错误** | ✅(`user_prompts[0]` 命中本轮首条 prompt) | — | — |
|
|
92
|
+
| `agent://` | ❌ **边界错误** | — | ✅(物化到 `/dev/shm`) | — |
|
|
93
|
+
|
|
94
|
+
`dsh://` 选择器四形态在 `read` 上全通:`:N-M`、`:raw`(与 `:raw:N-M` 等价)、`:path/agent-loop`、`?q=`。
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 3. 原始观测(判定依据,原文摘录)
|
|
99
|
+
|
|
100
|
+
### 3.1 `read` 侧四个失败
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
read dsh://docs → ✅ 251 条文档索引
|
|
104
|
+
read dsh://config:path/agent-loop → ✅ {"maxParallelToolCalls":10}
|
|
105
|
+
read dsh://docs/tool-catalog.md?q=ui-deliverables → ✅ 过滤命中 1 行
|
|
106
|
+
|
|
107
|
+
read skill://book-to-skill → ❌ skill "book-to-skill" is unknown or no longer available
|
|
108
|
+
read skill://book-to-skill/SKILL.md → ❌ 同上(子路径无效,仍是 registry 查无此名)
|
|
109
|
+
read ctx://session/transcript:1-8 → ❌ CTX_SESSION_LAYER: session-layer scheme — read it through the read tool (…)
|
|
110
|
+
read ctx://session/compactions → ❌ 同上
|
|
111
|
+
read agent:// → ❌ 同上
|
|
112
|
+
read https://example.com → ❌ no handler registered for scheme "https" (registered: dsh, dvc, http, skill)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
后者的 `registered: dsh, dvc, http, skill` 是 **FS 层 resolver 的登记表**,直接坐实 `read` 走的是 FS 层。
|
|
116
|
+
|
|
117
|
+
### 3.2 `grep`/`glob` 侧全通(反证)
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
grep path=skill://book-to-skill pattern=^# → ✅ 560 matches(真实落到 .agents/skills/book-to-skill/*)
|
|
121
|
+
glob path=skill://book-to-skill pattern=* → ✅ 约 130 条文件路径
|
|
122
|
+
grep path=ctx://session/user_prompts[0] pattern="test your tools"
|
|
123
|
+
→ ✅ 1 match:/dev/shm/dashr-url-UTBpHR/content.txt:2
|
|
124
|
+
grep path=https://example.com pattern="Example Domain"
|
|
125
|
+
→ ✅ 1 match:/dev/shm/dashr-url-NqMEfC/content.txt:3
|
|
126
|
+
glob path=agent:// pattern=* → ✅ /dev/shm/dashr-url-6h2V9Y/content.txt
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
并可见 `ctx://` 选择器语法细节:集合下标是 **0-based 方括号**,标签为事件 seq:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
grep path=ctx://session/user_prompts pattern=… → ❌ ctx://…[]: no such element
|
|
133
|
+
(collection "user_prompts" has 2 items, 0-based; labels are event seqs)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### 3.3 `write` 侧
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
write dsh://config {…} → ❌ write to dsh:// is not supported (read-only scheme, or its write channel is not wired yet)
|
|
140
|
+
write dvc://ast_grep {patterns:[…] path:/abs} → ✅ 结构化 payload 完整渲染(含 matches/totalMatches/parseErrors)
|
|
141
|
+
write dvc://ast_edit {ops:[…] dryRun:true} → ✅ {"applied": false, …}(dryRun 生效,未落盘)
|
|
142
|
+
write dvc://browser {"action":"open"|"close"} → ✅ {"ok":true,"url":"about:blank"} / {"ok":true}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**`dvc://` 设备 payload 已被完整渲染进工具结果**(见 §5 与旧报告的差异)。
|
|
146
|
+
|
|
147
|
+
### 3.4 旁路发现
|
|
148
|
+
|
|
149
|
+
1. **`dvc://` 设备相对路径以服务端 cwd 为根,不是会话 workspace。** `path:"."` 全量搜了 monorepo checkout(6950 文件,返回 `../../dashr/src/...`);`path:"dashr/src"` 直接 `Path not found`;绝对路径才命中(163 文件)。设备 cwd = `upstream/deepseek-harness`。
|
|
150
|
+
2. **`ast_grep` 的 `export function $NAME` 形态静默 0 命中**,而 `function $NAME` 在同一路径命中 646。导出声明的 pattern 形态在本 vendored 实现下**不报错也不匹配**(部分语言另报 `Multiple AST nodes are detected`)。
|
|
151
|
+
3. **发布面残留调试日志**:`url-schemes/index.ts:154` 与 `:337` 仍有 `console.log('DEBUG-INSTALL …')`,并已在 4999 日志里逐 session 打印。
|
|
152
|
+
4. **会话指引与部署面不符**:本 session 收到的 URL scheme 指引把 `read` 描述为 `HASH│content` 锚点读;`hashline:false` 下实际是原生行号读。指引来源疑为 `renderGeneralSectionText()` / `generalSection()`(`index.ts:263`、`catalog.ts:135`),建议门控对齐。
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## 4. 发现清单
|
|
157
|
+
|
|
158
|
+
### P1 — `https://` 在 FS 层未登记(一行修复,✅ 2026-09-13 复验存活)
|
|
159
|
+
|
|
160
|
+
`fs-aware/wrap.ts:57` 写死 `resolver.register('http', createHttpHandler())`,而工具层正确循环 `HTTP_SCHEMES = ['http','https']`(`handlers/http.ts:45`)。`hashline:false` 时 FS 层是 `read` 的唯一路径 → `read https://…` 恒失败。修法:`buildFsLayerResolver` 同样 `for (const s of HTTP_SCHEMES) resolver.register(s, handler)`。skill:// 重分类重构后复验:`read https://example.com` 正常抓取(session 60418790)。遗留小项(与本次无关,记录在案):`read https://example.com:1-3` 这类**把行选择器写进 URL** 的形态会整串进 `new URL()` 报 invalid URL——http handler 不剥选择器后缀,dsh handler 剥(`dsh://docs:1-3` 正常);属探针写法与既有限制,非本次回归。
|
|
161
|
+
|
|
162
|
+
### P1 — `skill://` 在 FS 层丢失 agent/cwd(workspace 技能全不可见)
|
|
163
|
+
|
|
164
|
+
`wrap.ts:81` 只给 `{ fs, rawUrl }`;`handlers/skill.ts:106-113` 的 `lookupOptions` 需要 `cwd` + `scope`,两者皆缺时 workspace 作用域技能层读作 absent → 全部 `unknown`。FS 层结构性拿不到 agent,所以要么把 skill 解析留在工具层、要么在 `hashline:false` 下补一条 scheme 呈现通道。
|
|
165
|
+
|
|
166
|
+
> **处置(2026-09-13 user 裁决后重定方向,推翻本报告早前的"补通道"方案)**:第一版补通道(sessionCwd 配置 + scopedAware list 启发式)经活体证伪——dump-config 实证 **dsh-web-app bundle patch 在宿主层 disable 了 `skill-filesystem`/`tool-skill`**,web profile 全局层没有任何 skill provider,list 与 get 同空,启发式从未命中(A/B 活体:user-global 的 `skill://markitdown` 与 project 的 `skill://book-to-skill` 双双 `unknown`,session 8b6dcf85)。根因不是"缺 cwd",而是**技能加载路径解析(CWD/user-global/app 运行时根、扫描深度)是宿主 `dsh-skill-filesystem` 的业务逻辑**,FS 层不得自写近似版。最终处置:`skill://` 重分类为会话层 scheme,FS 层一律答 `CTX_SESSION_LAYER` 边界错误(指名原生 `skill` 工具);`sessionCwd` 配置整体移除;工具层 handler lookup 收敛为 `dsh-tool-skill` 的精确镜像。详见 `2026-09-12-fs-scheme-resolution-实测报告.md` §4d 与 change design.md §D6。
|
|
167
|
+
>
|
|
168
|
+
> **活体复验(session 37899b26 / bfa99754 / f12a206e / 60418790 / 029aa5bb,2026-09-13)**:`read skill://book-to-skill` → 结构化边界错误(指名原生 skill 工具);`read skill://markitdown:1-5` → 同(与技能名无关);**原生 `skill` 工具加载 `book-to-skill` 成功**(完整 `<skill_content>` + resourceBase);`grep path=skill://book-to-skill pattern=^#` → 560 matches(工具层通道完好);`read https://example.com` → 正常抓取(P1-a 存活)。
|
|
169
|
+
>
|
|
170
|
+
> **user 第二轮复验(2026-09-13,第一人称)**:lib 02:32 重建 → 02:33 重启;规范源与副本三文件逐字节一致;`https://` / DEBUG-INSTALL / gate 注释 / `skill://` 收口四项全过;`sessionCwd`、`scopedAwareSkills`、`URL_SKILL_NOT_INVOCABLE_SCOPE` 在 src/副本/**活体 bundle** 三面 **0 命中**;`grep path=skill://` 回退复验通过。user 点评:**"以承认边界替代假装能查"是对的**——上轮 `list({cwd})` 无 scope 读不到 workspace 技能(宿主 `SkillViewOptions` 明写 "omitted reads the global layer alone")本是不可达探针;定性为会话型比修探针干净。行为收窄代价(全局技能亦不在 FS 层解析)已被可执行文案覆盖。user 唯一未亲自引爆文案指向的原生 `skill` 工具(agent probe session f12a206e 已验加载成功)。
|
|
171
|
+
>
|
|
172
|
+
> **user 复验带出两处小瑕疵,本轮已修**:① `sandbox-plugin.ts` 的 `buildResolver` 有**重复的 `register('dsh', …)` 块**(改 skill 块时拼接失误;`register` 是 `handlers.set`,覆盖不抛错,纯死代码)且 `'http'` 仍是字面量未跟 `HTTP_SCHEMES` 对齐(当前非最外层故潜伏,挂载顺序一翻 https 即静默回归)→ **删除私有登记面,`buildResolver` 改为复用 `wrap.ts` 的共享 `buildFsLayerResolver`**(登记单源,双消费方永不再漂移;其 `ctx`/`agent` handler 在本类不可达——前置守卫先拦);② `url-schemes/index.ts` 两个同名 `export interface Config`(sessionCwd 增删残留)→ 并回一个。单测断言同步:https 注册性检查改为网络无关(成功/取数失败皆证登记,唯 "no handler" 才是回归)。收口烟测(session 0335526e,重启后):`skill://` 边界 / `https://` 抓取 / `dsh://docs:1-3` 三连全过;回归 vitest 489/14 基线族、tsc 13、openspec valid。
|
|
173
|
+
|
|
174
|
+
### P2 — `hashline:false` 下会话型 scheme 无 `read` 通道,且注释与事实不符
|
|
175
|
+
|
|
176
|
+
`index.ts:288-290` 声称 *"Session-layer schemes (ctx://, agent://) answer the structured boundary error here; **the read tool's scheme branch keeps serving them with the calling agent's context**"* —— 该 "read tool's scheme branch" 只在 `hashline:true` 时存在。`hashline:false` 下 `ctx://`/`agent://` 在 `read` 上无任何通道(`grep`/`glob` 可用,但那是另一个工具面的补偿,不等于 read 通道)。注释与 `index.ts:158-159` 的 gate 说明应统一。
|
|
177
|
+
|
|
178
|
+
### P2 — 发布前清理 `DEBUG-INSTALL` 调试 `console.log`
|
|
179
|
+
|
|
180
|
+
`url-schemes/index.ts:154`、`:337`。
|
|
181
|
+
|
|
182
|
+
### P3 — `ast_grep` 导出形态 pattern 静默漏报
|
|
183
|
+
|
|
184
|
+
建议在设备文档或实现里显式声明支持的 pattern 形态(或对 0 命中且 pattern 含 `export ` 时给出提示)。
|
|
185
|
+
|
|
186
|
+
### P3 — `dvc://` 设备根目录与会话 workspace 不一致
|
|
187
|
+
|
|
188
|
+
易误伤脚本化调用(相对路径静默落到别的树)。建议设备文档写明"相对路径以服务端 cwd 为根",或与 `ctxFsIO` 的 workspace 对齐。
|
|
189
|
+
|
|
190
|
+
### P3 — 会话指引把 `read` 描述为 `HASH│content` 锚点读,`hashline:false` 下实为行号读
|
|
191
|
+
|
|
192
|
+
`url-schemes-instruction.md`(owner 维护)对 read 输出的描述按 hashline 锚点语义书写;`hashline:false` 活体下 read 实际返回行号形式。建议按 gates 加一句条件说明(2026-09-13 复核:三项 P3 均无变化、未复测,挂账)。
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## 5. 与既有报告的差异(待对齐)
|
|
196
|
+
|
|
197
|
+
| 项 | 既有报告 | 本轮观测 | 研判 |
|
|
198
|
+
|---|---|---|---|
|
|
199
|
+
| `read` 上六 scheme 全可达 | `2026-09-12-url-schemes-六scheme冒烟与边界实测报告.md` §0:**✅ 6/6** | `read` 上 `ctx`/`agent`/`skill`/`https` **全 ❌** | **两次实测的 `gates` 不同**:该报告应以 `hashline:true`(DASHR read 包装在场)跑出;本轮为 `hashline:false`。二者不矛盾,但结论必须带配置标签——"六 scheme 可达"仅在 `hashline:true` 成立 |
|
|
200
|
+
| `glob` 的 URL-in-`path` 分支在 `dsh://docs` 失效 | 同上 §0:⚠️ 失效 | ✅ 正常(`glob path=dsh://docs/subsystems` → 116 文件) | 疑似已修或与 `hashline` 门控相关,建议复测后销项 |
|
|
201
|
+
| `dvc://` 设备 payload 在渲染面丢失 | 同上 §0:❌ 缺口(只输出 `Executed dvc://<device>`) | ✅ payload 完整渲染(§3.3) | **该缺口在当前构建已不复现**,建议销项 |
|
|
202
|
+
| FS 层 = dsh/dvc/http(s),会话型(含 `skill://`)走边界错误 | `2026-09-12-fs-scheme-resolution-实测报告.md` §1/§2(D2) | 一致(skill 已并入会话型族) | ✅ 与本轮 §1.4 吻合;**2026-09-13 起 FS 层登记面 = dsh/dvc/http/https(`HTTP_SCHEMES` 共享 builder),`skill://` 归入会话型边界** |
|
|
203
|
+
| `skill://` 假 "unknown"(本报告 §1.4/探针清单) | —(本报告当时的活体事实) | **✅ 已消灭**:user 第二轮复验(2026-09-13)——规范源/副本/活体 bundle 三面逐字节核验,`sessionCwd`/`scopedAwareSkills`/`URL_SKILL_NOT_INVOCABLE_SCOPE` 全 0 命中;活体 `read skill://…` 恒答可执行边界文案 | **按业务逻辑归属裁决返工**(`4c21c94` + 本轮清理):技能路径解析/扫描深度属宿主 `skill-filesystem`,插件不再自写近似版;user 唯一未亲自引爆的是文案指向的原生 `skill` 工具本身(agent 前序 probe session f12a206e 已验:完整 `<skill_content>` 加载成功) |
|
|
204
|
+
|
|
205
|
+
**建议**:两份 09-12 报告在标题或结论处补注其 `gates.urlSchemes/hashline` 取值,否则后来者会据"6/6"误判 `read` 可用性。
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## 6. 未覆盖面(诚实声明)
|
|
210
|
+
|
|
211
|
+
- `grep` 未测 `dvc://`、`agent://`、`http://`;`glob` 未测 `ctx://`、`http(s)://`、`dvc://`(矩阵中以 `—` 标注)。
|
|
212
|
+
- `write` 仅测 `dvc://`(三设备)与 `dsh://`(只读拦截);未测 `ctx://`/`agent://`/`skill://` 写拦截的具体错误分类器。
|
|
213
|
+
- 未测 `hashline:true` 组合作对照(本轮无该实例),故 §5 的"配置差异"为**推断**,需一次 `hashline:true` 复跑坐实。
|
|
214
|
+
- 未测 `skill://` 的**全局(非 workspace)技能**路径——它们可能不依赖 cwd,若存在则 FS 层 `skill://` 并非全灭。
|
|
215
|
+
- 未覆盖工具:`eval` 桥(`await tool.*` 内调用 scheme)、`present`、`subagent`、`workflow`、`agent_message`、`web_search`、`web_fetch`、`goal_*`、`todo_write`、`ask_user_question`。
|
|
216
|
+
- 未做 `tsc`/`vitest`——本轮是活体冒烟,非 change 验收。
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## 附:探针清单(可复现)
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
# read(原生 / FS 层)
|
|
224
|
+
read dsh://docs
|
|
225
|
+
read dsh://config:path/agent-loop
|
|
226
|
+
read dsh://docs/tool-catalog.md?q=ui-deliverables
|
|
227
|
+
read skill://book-to-skill # ❌ unknown
|
|
228
|
+
read ctx://session/transcript:1-8 # ❌ CTX_SESSION_LAYER
|
|
229
|
+
read agent:// # ❌ CTX_SESSION_LAYER
|
|
230
|
+
read https://example.com # ❌ unregistered
|
|
231
|
+
read http://example.com # ✅
|
|
232
|
+
|
|
233
|
+
# grep / glob(工具层)
|
|
234
|
+
grep path=dsh://docs pattern=trustedHosts
|
|
235
|
+
glob path=dsh://docs/subsystems pattern=*.md
|
|
236
|
+
grep path=skill://book-to-skill pattern='^#'
|
|
237
|
+
grep path=ctx://session/user_prompts[0] pattern='test your tools'
|
|
238
|
+
grep path=https://example.com pattern='Example Domain'
|
|
239
|
+
glob path=agent:// pattern='*'
|
|
240
|
+
|
|
241
|
+
# write(工具层)
|
|
242
|
+
write dvc://ast_grep {"patterns":["function $NAME"],"path":"/home/u1/workspaces/dashr/dashr/src","limit":3}
|
|
243
|
+
write dvc://ast_edit {"ops":[{"pat":"console.log($$$A)","out":"logger.info($$A)"}],"paths":[…],"dryRun":true}
|
|
244
|
+
write dvc://browser {"action":"open","url":"about:blank"} ; write dvc://browser {"action":"close"}
|
|
245
|
+
write dsh://config "nope" # ❌ read-only
|
|
246
|
+
```
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# 2026-09-13-preact-ui-shell 实测报告
|
|
2
|
+
|
|
3
|
+
- change: `2026-09-13-preact-ui-shell`(openspec valid)
|
|
4
|
+
- 依据: `~/workspaces/superd/apps/ui-preact` PoC(2026-09-09,0.1.3-alpha.2 + superd 伺服路径)
|
|
5
|
+
- gates: 测试线 4999,`urlSchemes:true + hashline:false + preact shell build`
|
|
6
|
+
- 结论先行: **shell 渲染引擎已换 Preact**(只 preact,无 @preact/signals——user 2026-09-13 裁决),全上游 UI 语料零改动获得 Preact 渲染;shell index chunk **555,959 → 434,173 B(−21.9%)**;浏览器级 A/B 实测挂载面与 stock 完全一致。
|
|
7
|
+
|
|
8
|
+
## 1. 改动面(全部属 monorepo 本地 patch,不入 upstream git)
|
|
9
|
+
|
|
10
|
+
| # | 改动 | 说明 |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| 1 | `apps/web/vite.config.ts` `resolve.alias` +5 条 | react / react/jsx-runtime / react/jsx-dev-runtime / react-dom / react-dom/client → preact/compat 家族(regex 锚定,防 `react-dom` 先命中 `react`) |
|
|
13
|
+
| 2 | 同文件 `resolve.dedupe` + `'preact'` | dedupe 条目从本包 node_modules 解析——**缺它必挂**:seed importer 在 `packages/client/web/lib`,node 向上走看不到 `apps/web/node_modules/preact`(报 `Could not load preact/compat`) |
|
|
14
|
+
| 3 | `apps/web/package.json` devDeps + `preact@10.29.8` | 精确 pin 对齐 PoC;仅 devDep,发布面无它 |
|
|
15
|
+
| 4 | `vendor/{AGENTS,CLAUDE,README}.md` → `vendor/docs/` | **根除 `vendor/CLAUDE.md` ENOTDIR/exit 236 老坑**(见 §4) |
|
|
16
|
+
|
|
17
|
+
AGENTS.md §二 harness 本地 patch 已记档(换 tag 需重放)。
|
|
18
|
+
|
|
19
|
+
## 2. 体积(实测)
|
|
20
|
+
|
|
21
|
+
| chunk | stock | preact build | Δ |
|
|
22
|
+
|---|---|---|---|
|
|
23
|
+
| `index-*.js`(react 家族 rides index) | 555,959 B | 434,173 B | **−121,786 B(−21.9%)** |
|
|
24
|
+
| `vendor-*.js`(react-free,katex/shiki/markdown 管线) | 740,575 B | 740,575 B | 0(设计内) |
|
|
25
|
+
|
|
26
|
+
## 3. 浏览器级 A/B 验证(playwright,同脚本双跑)
|
|
27
|
+
|
|
28
|
+
| 断言 | stock React build | preact build |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| UI 语料挂载(侧栏/会话列表/Settings/输入框文本) | ✅ 全 | ✅ 全(逐字一致) |
|
|
31
|
+
| `#root button` 数 | 31 | 31 |
|
|
32
|
+
| composer(textarea/contenteditable) | 1 | 1 |
|
|
33
|
+
| console.error | 0 | 0 |
|
|
34
|
+
| shell 内 react-dom 痕迹 | **`version:"18.3.1", rendererPackageName:"react-dom"` banner 在 shell** | **无**(唯一 `react-dom` 字串 = 平台模块种子表键 `{react:Y3, "react-dom":Y3, ...}`——同一个 preact 实例登记两个平台词,设计终态) |
|
|
35
|
+
| pageerror | slot 重复注册 ×1 | slot 重复注册 ×1 |
|
|
36
|
+
|
|
37
|
+
**pageerror 定责(A/B)**:`settings.general.item` slot id `compaction-tuning` 重复注册在 **stock 上同样存在**(factory id `Ba` vs `f5` 仅 minified 差异)→ **存量问题**,属 `.dsh-test` profile 的 compaction-tuning 本地插件,与渲染引擎无关,挂账另修。`better-dsh/client.js` 内的 `react-dom` 匹配为 pnpm 依赖路径字符串(`@tanstack+react-virtual@…_react-dom@18.3.1…`),stock/preact 两面同在,非本体。
|
|
38
|
+
|
|
39
|
+
**user 未亲自引爆项声明**:深交互面(聊天流式渲染、shiki 高亮、markdown 管线)未逐项人工过——零 console.error 为强信号非穷尽证明(PoC 同款边界声明)。
|
|
40
|
+
|
|
41
|
+
## 4. 顺带根除:`vendor/CLAUDE.md` ENOTDIR/exit 236 老坑
|
|
42
|
+
|
|
43
|
+
`vendor/` 根下三个文档文件(AGENTS/CLAUDE/README.md)撞 `pnpm-workspace.yaml` 的 `vendor/*` workspace glob:任何 workspace 枚举器读 `<条目>/package.json`——目录 ENOENT(容忍跳过),**文件 ENOTDIR(炸)**。历史受害面:`npm run build-client`(2026-09-03 记档)、本轮 `npx vite build`(exit 236、裸单行错误)。已移入 `vendor/docs/`(目录无 package.json → ENOENT 跳过)。换 tag 重放时记得同款处理。
|
|
44
|
+
|
|
45
|
+
**新坑记档**:`pnpm add` 之后 `npx vite` 从根解析到 **vite 8/rolldown**(错误形态完全不同)——web 构建一律走 `pnpm run build:web`(workspace 内 vite 6.4.3)。
|
|
46
|
+
|
|
47
|
+
## 5. 范围裁决
|
|
48
|
+
|
|
49
|
+
- **不入 better-dsh npm 发布物**:本 change 是测试线 monorepo 本地 patch。插件若要随发布把 Preact UI 带到 prod,必须附带 preact 前端 dist + web-runtime override 行(PoC 路径 B 已在 0.1.3-alpha.2 验证可行)——代价是 UI 语料冻结在 fork 点,且 prod host(0.1.3-alpha.2)与测试线(0.1.5-rc.2)语料版本错位。**该决定挂 prod host 升级门下,另行裁决。**
|
|
50
|
+
- 因此本轮 npm alpha(0.2.3-e)的插件内容不含 Preact——发布内容 = url-schemes 系(skill:// 收口等)+ 本轮清理。
|
package/docs/50_test-reports/v0.2.3c-mobile-wave/345/256/236/346/265/213/346/212/245/345/221/212.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# v0.2.3-c mobile wave 实测报告
|
|
2
|
+
|
|
3
|
+
- 日期:2026-09-11
|
|
4
|
+
- 范围:`better-dsh@0.2.3-c`(npm)/ tag `v0.2.3c`
|
|
5
|
+
- 验证环境:Dev/Test 1 源码线 4988 实例(upstream `dsh-v0.1.5-rc.2`,`DSH_HOME=~/.dsh-test`,LAN=1 socat 中继),user iPhone 真机第一人称实测
|
|
6
|
+
- 关联:`upstream-dsh-0.1.5-rc.2-local-test-report.md`(对齐轮全链路)、AGENTS.md §二 mobile wave 条目、§四红线
|
|
7
|
+
|
|
8
|
+
## 一、变更清单
|
|
9
|
+
|
|
10
|
+
1. **手势状态输入只认官方面**(红线落地;起因:旧实现读第三方 Better Sidebar 的 `body[data-dsh-sidebar-collapsed]`,插件移除后属性恒缺 → `readRightOpen` 永真 → 状态机整体毒死):
|
|
11
|
+
- 左栏:动作 `ctx.layout.toggleSidebar()`;状态读 AppFrame `[data-sidebar-collapsed]`。
|
|
12
|
+
- 右栏(0.1.5 ui-sidebar-right):开 = 官方控件 `[data-sidebar-right-expand]`(会话头角落),关 = `[data-sidebar-right-toggle]`(dock chrome);状态读双 facet:`fullscreen = [data-rightbar-fullscreen] 在场`,`trackless = [data-rightbar-collapsed] 在场`,`readRightOpen = fullscreen || !trackless`。
|
|
13
|
+
2. **响应式零自设像素阈值**:CSS 规则键纯 `[data-sidebar-collapsed]`(无 @media),上游 auto-collapse 收 rail(今日 56px)时我们压成 0px,上游改阈值自动跟随;手势激活 band = 粗指针(`pointer: coarse`)∨ 任一面板窄态,细指针全静息。
|
|
14
|
+
3. **`mobile.breakpoint` 配置删除**(schema + boot payload + client 三处);zoomGuard 内部 768 兜底不动。所谓"mobile 配置卡"从未存在(client 半唯一设置行是 failover)。
|
|
15
|
+
4. **0.1.5-rc.2 对齐移植**(随批发布):persistence seam `inspect`→`stat`+`open(id,'read')`+`handle.read()`(`src/url-schema/handlers/agent.ts` `persistedEventsOf`);`subagents.sendMessage` 统一 seam(下行 child / 上行 `parentSession`,`src/bridges/index.ts`、`src/subagents-surface.ts`);session 事件名 `tool/code-dispatch(-start)` → `tool/ptc-dispatch(-start)`(`src/index.ts`,载波 `tools/ptc-dispatch-log` 名不变)。
|
|
16
|
+
5. **船货卫生**(本次新增 `dashr/scripts/copy-docs.mjs` 替换裸 `cpSync` prebuild):发布 docs 副本排除 `60_exploration-and-research/`(gitignore 明文 never publish)、`superd/`、`dsh-sys-prompt_*.md`、`*_artifacts/`(2.8MB 探针产物),并对副本内 .md 做 `token=<20+字面量>` 脱敏。**事实记录(2026-09-11 全版本扫描)**:泄漏机制 = prebuild `cpSync('../docs','docs')` 把仓库根 docs 全量拷进包内再随 `files:["docs"]` 打包(docs:// URL schema 的运行时供给面,v0.1.8d 起存在);包内镜像 `dashr/docs/` 被 `dashr/.gitignore` 的 `/docs/` 忽略 → git 永远看不见,2026-09-03 "never publish" 裁决只落了 git 轴,npm 轴漏网。受影响版本(registry 不可撤):0.2.2-a(6 文件) / 0.2.2-b(8) / 0.2.2-c(33) / 0.2.3 游离(6) / 0.2.3-b(48 + superd 4)。**内容定级复核:全部 `token=` 命中均为占位符(`token=…` / `token=«redacted»`),真实 token 字面量从未上过 registry**——泄漏内容 = 研究笔记 + superd 蓝图 + 测试报告,无凭据类材料。0.2.3-c tarball 70 文件 / 757KB,敏感扫描零命中。
|
|
17
|
+
|
|
18
|
+
## 二、第一人称验收(user 真机,2026-09-11)
|
|
19
|
+
|
|
20
|
+
1. 初版手势(读第三方 body 属性):左滑右滑全灭——user 报障并裁决"左栏是官方的,必须永远工作;状态输入只许寻址官方面"。
|
|
21
|
+
2. 官方面重写版:左滑开右面板成功;右滑误开左栏——user 亲自诊断"手机上右栏全屏不占轨道,`data-rightbar-collapsed` 在场而面板盖满 → readRightOpen 误判 false"。修为双 facet 读法后 user 确认:**"没有问题,是成功的"**。
|
|
22
|
+
3. 4988 活体证据:boot graph 含 `"id":"better-dsh"`;served client.js 官方选择器 4 处(`data-sidebar-collapsed` / `data-sidebar-right-expand` / `data-sidebar-right-toggle` / 双 facet 读法)、第三方死引用 0。
|
|
23
|
+
|
|
24
|
+
## 三、构建与套件
|
|
25
|
+
|
|
26
|
+
- 发布产物在 monorepo(0.1.5-rc.2 workspace 手术环境)构建:tsdown 9 文件 530KB + client 18.57KB;canonical 与副本 src/cordis.patch.yml/build-client.ts 逐字节一致(diff rc=0)。
|
|
27
|
+
- 套件:monorepo 环境 492/492 通过 + tsc 0(对齐轮已录)。canonical 本地套件 14 挂 + src 5 类型错——**环境错位非产物缺陷**:canonical node_modules 的 `@deepseek-ai/*` peers 停在 0.1.2-alpha.3(registry fallback),而 src/test 已按 0.1.5 API 移植;canonical package.json 按教义保持 npm-range peers 不动(发布语义),手术只在副本。canonical dev 环境刷新另行处理,不阻塞本发布(同源同产物已由 4988 全链路验证)。
|
|
28
|
+
|
|
29
|
+
## 四、0.1.3-alpha.2(当前 prod host)兼容矩阵(2026-09-11 源码核验)
|
|
30
|
+
|
|
31
|
+
| seam | 0.1.3-alpha.2 | 结论 |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| `sessionPersistence.stat` / `open(id,'read')` / `handle.read()` | handle 模型已在(types/index.d.ts + handle.d.ts 实证) | 兼容 |
|
|
34
|
+
| `subagents.sendMessage` / `startContinuable` | 二者均在 lib/index.js 导出实证 | 兼容 |
|
|
35
|
+
| 载波 `tools/ptc-dispatch-log` | spill-policy/tools/scope/tool-cordis 均引用 | 兼容 |
|
|
36
|
+
| session 事件 `tool/ptc-dispatch(-start)` | 不在旧 catalog(旧名 code-dispatch),但 `adoptSessionEvent` 与 seed envelope 校验只查 envelope 不查目录(vocabulary-growth 容忍设计,`ignorable` 键合法) | **降级不破坏**:事件安全落盘,旧 host UI 不渲染 dispatch 卡片;host 升 0.1.5 后自愈 |
|
|
37
|
+
| mobile wave(CSS/手势/boot payload) | 纯 client 面,host 无关 | 兼容 |
|
|
38
|
+
|
|
39
|
+
结论:0.2.3-c 在 0.1.3-alpha.2 prod host 可安全安装运行,repl-dispatch 卡片渲染待 host 升级后恢复。
|
|
40
|
+
|
|
41
|
+
## 五、发布操作记录
|
|
42
|
+
|
|
43
|
+
- canonical `package.json`:version `0.2.3-c`;prebuild → `node scripts/copy-docs.mjs`。
|
|
44
|
+
- lib/ 构建:monorepo `pnpm --filter better-dsh exec tsdown` + `tsx scripts/build-client.ts`(三级 ../..),拷回 canonical。
|
|
45
|
+
- `npm pack --dry-run`:70 文件 / 757KB,`60_exploration|superd|_artifacts` 零命中,token 零命中。
|
|
46
|
+
- GitHub:commit + tag `v0.2.3c` → push origin main;npm:publish → `npm view` 复核(实际时间戳以操作为准)。
|
|
47
|
+
- prod 3080 部署:**未执行**(user 未指令;user 以普通用户身份自装实测,per 2026-09-03 裁决先例)。
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Run one Python cell on a session-persistent scripting pad. One `eval` call = one cell; the pad's state persists across calls and turns — variables, imports, and definitions from earlier cells stay alive.
|
|
2
|
+
|
|
3
|
+
Work incrementally: imports → define → test → use, each its own cell. Re-run setup only after `reset` or a crash.
|
|
4
|
+
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
- `cell` (required): one Python program body. Top-level `await` works; top-level `return` is a SyntaxError — the cell runs in module scope (REPL semantics, not a function body).
|
|
8
|
+
- `description` (required): a short summary of what the cell does — shown as the call's title in the UI.
|
|
9
|
+
- `timeout` (optional): wall-clock budget in seconds; the cell is interrupted (then force-stopped) when exceeded. Omit for the runtime default.
|
|
10
|
+
- `reset` (optional): restart the pad EMPTY first — earlier state is discarded.
|
|
11
|
+
|
|
12
|
+
## Direct calls vs cells
|
|
13
|
+
|
|
14
|
+
Payload-shaped work (one long read, one edit, one command) → direct tool call. Logic-shaped work (loops, conditions, fan-out, composing many tool results into one step) → an `eval` cell. Only what the cell prints or returns comes back — curate it.
|
|
15
|
+
|
|
16
|
+
Delegation: `agent` is the unified agent-spawn entry; `subagent` is its native alias — both delegate through the same runtime, so call either.
|
|
17
|
+
|
|
18
|
+
## Calling tools from a cell
|
|
19
|
+
|
|
20
|
+
Every session tool is callable from a cell as `await tool.<name>(args)` with ONE positional argument: `args` is the tool's parameter object written as a Python dict literal, same field names (`true`/`false`/`null` become `True`/`False`/`None`). A failed call raises `ToolCallError` with `.toolName` naming the tool. Tool names that are not plain identifiers (e.g. contain hyphens) have no `tool.<name>` member — call those as direct tool calls.
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
print(await tool.read({"path": "docs/README.md", "limit": 5}))
|
|
24
|
+
|
|
25
|
+
r = await tool.bash({"command": "ls -la src/", "description": "List source directory"})
|
|
26
|
+
print(r["stdout"]["text"])
|
|
27
|
+
|
|
28
|
+
import asyncio
|
|
29
|
+
matches, files = await asyncio.gather(
|
|
30
|
+
tool.grep({"pattern": "TODO", "path": "src"}),
|
|
31
|
+
tool.glob({"pattern": "**/*.ts", "path": "src"}),
|
|
32
|
+
)
|
|
33
|
+
```
|
package/lib/client/index.js
CHANGED
|
@@ -69,7 +69,7 @@ const zh = {
|
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
//#endregion
|
|
72
|
-
//#region \0dsh-css:/home/u1/workspaces/dashr/
|
|
72
|
+
//#region \0dsh-css:/home/u1/workspaces/dashr/dashr/src/failover/client/FailoverRow.module.css.mjs
|
|
73
73
|
const css = "._440e1d7b_row {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 12px 0;\n}\n\n._9865b509_title {\n font-weight: 600;\n font-size: 14px;\n}\n\n._3cfec826_slots {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n._70954771_slot {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n._ba1fd839_slotLabel {\n min-width: 88px;\n flex-shrink: 0;\n font-size: 13px;\n color: var(--dsw-alias-text-secondary, #666);\n}\n\n._11c2662d_select {\n flex: 1;\n max-width: 280px;\n min-width: 0;\n}\n\n._b7c358f9_alert {\n color: var(--dsw-alias-danger, #c0392b);\n font-size: 12px;\n}\n";
|
|
74
74
|
const tagId = "better-dsh/FailoverRow.module.css";
|
|
75
75
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
import { Config } from "@deepseek-ai/dsh-fs-local";
|
|
3
|
+
|
|
4
|
+
//#region src/fs-aware/sandbox-plugin.d.ts
|
|
5
|
+
|
|
6
|
+
/** Module config: the stock LocalConfig fields plus the scheme gate. */
|
|
7
|
+
interface FsAwareConfig extends Config {
|
|
8
|
+
/** Master gate for scheme interception at the FS layer (default on). */
|
|
9
|
+
urlSchemes?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** Structural view of the inherited backend (loose, like the spike's Base). */
|
|
12
|
+
interface BaseView {
|
|
13
|
+
resolve(path: string, opts?: {
|
|
14
|
+
cwd?: string;
|
|
15
|
+
signal?: AbortSignal;
|
|
16
|
+
}): Promise<{
|
|
17
|
+
targetKey: string;
|
|
18
|
+
displayPath: string;
|
|
19
|
+
}>;
|
|
20
|
+
stat(target: {
|
|
21
|
+
targetKey: string;
|
|
22
|
+
}, signal?: AbortSignal): Promise<unknown>;
|
|
23
|
+
readText(target: {
|
|
24
|
+
targetKey: string;
|
|
25
|
+
}, signal?: AbortSignal): Promise<string>;
|
|
26
|
+
writeText(target: {
|
|
27
|
+
targetKey: string;
|
|
28
|
+
}, ...rest: unknown[]): Promise<unknown>;
|
|
29
|
+
editText(target: {
|
|
30
|
+
targetKey: string;
|
|
31
|
+
}, ...rest: unknown[]): Promise<unknown>;
|
|
32
|
+
}
|
|
33
|
+
declare const Base: abstract new (ctx: Context, config: FsAwareConfig) => BaseView;
|
|
34
|
+
declare class FsAwareSandboxFileSystem extends Base {
|
|
35
|
+
static inject: string[];
|
|
36
|
+
private readonly resolver;
|
|
37
|
+
private readonly schemeResolution;
|
|
38
|
+
constructor(ctx: Context, config: FsAwareConfig);
|
|
39
|
+
/**
|
|
40
|
+
* FS-layer resolver — the SHARED builder from `wrap.ts` (design D2). One
|
|
41
|
+
* registration source for both FS consumers: this backend and the instance
|
|
42
|
+
* wrap. (A private duplicate here once drifted — a doubled `dsh` register
|
|
43
|
+
* and a literal `'http'` that would silently drop `https` if this backend
|
|
44
|
+
* were ever the outermost layer.) The `ctx`/`agent` handlers it registers
|
|
45
|
+
* are unreachable here: session-layer schemes are guarded before resolve.
|
|
46
|
+
*/
|
|
47
|
+
private buildResolver;
|
|
48
|
+
/** FS-layer resolver env: no live agent — session-layer schemes are excluded upstream. */
|
|
49
|
+
private envFor;
|
|
50
|
+
resolve(path: string, opts?: {
|
|
51
|
+
cwd?: string;
|
|
52
|
+
signal?: AbortSignal;
|
|
53
|
+
}): Promise<{
|
|
54
|
+
targetKey: string;
|
|
55
|
+
displayPath: string;
|
|
56
|
+
}>;
|
|
57
|
+
stat(target: {
|
|
58
|
+
targetKey: string;
|
|
59
|
+
}, signal?: AbortSignal): Promise<unknown>;
|
|
60
|
+
readText(target: {
|
|
61
|
+
targetKey: string;
|
|
62
|
+
}, signal?: AbortSignal): Promise<string>;
|
|
63
|
+
writeText(target: {
|
|
64
|
+
targetKey: string;
|
|
65
|
+
}, ...rest: unknown[]): Promise<unknown>;
|
|
66
|
+
editText(target: {
|
|
67
|
+
targetKey: string;
|
|
68
|
+
}, ...rest: unknown[]): Promise<unknown>;
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { FsAwareConfig, FsAwareSandboxFileSystem as default };
|