pi2dsh 0.12.3 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -22
- package/README.zh.md +67 -19
- package/dist/{analyzer-2Nx5XYOA.mjs → analyzer-CXNbeBAe.mjs} +2 -2
- package/dist/{analyzer-2Nx5XYOA.mjs.map → analyzer-CXNbeBAe.mjs.map} +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/client.js +604 -31
- package/dist/compat/pi-ai.d.mts +36 -1
- package/dist/compat/pi-ai.d.mts.map +1 -1
- package/dist/compat/pi-ai.mjs +2 -2
- package/dist/compat/pi-coding-agent.d.mts +2 -1411
- package/dist/compat/pi-coding-agent.mjs +1 -1
- package/dist/compat/pi-tui.mjs +1 -1
- package/dist/{oauth-bridge-CfyImWx4.mjs → credentials-oauth-BakY-0PA.mjs} +172 -13
- package/dist/credentials-oauth-BakY-0PA.mjs.map +1 -0
- package/dist/credentials-oauth.mjs +1 -89
- package/dist/host.mjs +4 -2
- package/dist/host.mjs.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{mcp-config-Cjae0vot.mjs → mcp-config-CZepacin.mjs} +19 -19
- package/dist/mcp-config-CZepacin.mjs.map +1 -0
- package/dist/{pi-ai-Dyg4zyLZ.mjs → pi-ai-BA3V_J0V.mjs} +40 -2
- package/dist/{pi-ai-Dyg4zyLZ.mjs.map → pi-ai-BA3V_J0V.mjs.map} +1 -1
- package/dist/pi-coding-agent-B0PT23gE.d.mts +1412 -0
- package/dist/pi-coding-agent-B0PT23gE.d.mts.map +1 -0
- package/dist/{pi-coding-agent-CYnmeJEx.mjs → pi-coding-agent-D9skobb6.mjs} +0 -0
- package/dist/pi-coding-agent-D9skobb6.mjs.map +1 -0
- package/dist/{pi-tui-5CYLcj-_.mjs → pi-tui-DruSeKmd.mjs} +3 -3
- package/dist/pi-tui-DruSeKmd.mjs.map +1 -0
- package/dist/{runtime-B_Ig28og.mjs → runtime-B-SlR8mJ.mjs} +970 -75
- package/dist/runtime-B-SlR8mJ.mjs.map +1 -0
- package/dist/runtime.d.mts +600 -0
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +1 -1
- package/package.json +2 -1
- package/dist/compat/pi-coding-agent.d.mts.map +0 -1
- package/dist/credentials-oauth.mjs.map +0 -1
- package/dist/mcp-config-Cjae0vot.mjs.map +0 -1
- package/dist/oauth-bridge-CfyImWx4.mjs.map +0 -1
- package/dist/pi-coding-agent-CYnmeJEx.mjs.map +0 -1
- package/dist/pi-tui-5CYLcj-_.mjs.map +0 -1
- package/dist/runtime-B_Ig28og.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -170,7 +170,9 @@ it work. **This is the list to trust.**
|
|
|
170
170
|
| Plugin | What was exercised | Where | Example |
|
|
171
171
|
|---|---|---|---|
|
|
172
172
|
| [`@kassing/pi-vision`](https://www.npmjs.com/package/@kassing/pi-vision) | Image analysis delegated to a vision model; image-admission companion route; analysis injected into a text-only model's turn | CLI + web | [`vision-bridge`](examples/vision-bridge/) |
|
|
173
|
+
| [`@crazygit/pi-codex-image-gen`](https://www.npmjs.com/package/@crazygit/pi-codex-image-gen) | ChatGPT/Codex OAuth → `gpt-image-2` generation; local reference-image upload through DSH approval; image edit; native attachment storage and inline Web rendering | CLI + web | [`codex-image-gen`](examples/codex-image-gen/) |
|
|
173
174
|
| [`pi-btw`](https://www.npmjs.com/package/pi-btw) | `/btw <question>` as a real child session in DSH's subagent UI; `/btw-inject`; `/btw --save`; main thread stays clean | CLI + web | [`side-conversation`](examples/side-conversation/) |
|
|
175
|
+
| [`pi-powerline-footer`](https://www.npmjs.com/package/pi-powerline-footer) | A terminal status line — model, thinking level, project, context usage — drawn into DSH's widget dock, colour included | web | [`presentation-surfaces`](examples/presentation-surfaces/) |
|
|
174
176
|
| [`pi-vision-tool`](https://www.npmjs.com/package/pi-vision-tool) | Tool registration through a JSON-Schema shape DSH had to convert (`anyOf` → `oneOf`) | CLI + web | — |
|
|
175
177
|
| [`pi-approval-guardian`](https://www.npmjs.com/package/pi-approval-guardian) | Every tool call reviewed by a second model before execution; allow and deny both observed | CLI (bare env) | — |
|
|
176
178
|
| [`pi-hermes-memory`](https://www.npmjs.com/package/pi-hermes-memory) | Cross-session memory: written in one process, read back in a second, fresh one | CLI | — |
|
|
@@ -266,20 +268,24 @@ rather than a behaviour lands there:
|
|
|
266
268
|
┌──────────── DSH server (cordis) ────────────┐ ┌──────── DSH browser shell ────────┐
|
|
267
269
|
│ services · waterfalls · durable events │ │ dsh.client + exports "./client" │
|
|
268
270
|
│ │ │ slot registry (ui-slots) │
|
|
269
|
-
│ pi2dsh engine │ │ shell.overlay ←
|
|
270
|
-
│ tools · commands · models · sessions │ │
|
|
271
|
-
│ subagent bridge ─────────────┐ │ │
|
|
272
|
-
│
|
|
273
|
-
│ GET /pi2dsh/
|
|
271
|
+
│ pi2dsh engine │ │ shell.overlay ← panel, pills │
|
|
272
|
+
│ tools · commands · models · sessions │ │ session.header.utilities ← hdr │
|
|
273
|
+
│ subagent bridge ─────────────┐ │ │ input.dock ← widgets │
|
|
274
|
+
│ browser-state registry │ │ │ composer.dock ← working/footer │
|
|
275
|
+
│ GET /pi2dsh/browser-state ─┼── own route┼──┼─▶ all four seats, one poller │
|
|
274
276
|
└────────────────────────────────┴────────────┘ └───────────────────────────────────┘
|
|
275
277
|
```
|
|
276
278
|
|
|
277
|
-
The
|
|
278
|
-
system: that one is a first-party, code-generated contract, and an
|
|
279
|
-
plugin talking to its own UI should carry its own channel.
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
279
|
+
The browser half's data rides **this package's own route**, not DSH's typed
|
|
280
|
+
Remote system: that one is a first-party, code-generated contract, and an
|
|
281
|
+
out-of-tree plugin talking to its own UI should carry its own channel. One
|
|
282
|
+
payload per session serves every seat — the side-conversation panel, plus the
|
|
283
|
+
Pi presentation surfaces (status, widget, header, footer, title and the
|
|
284
|
+
working/thinking chrome), which are drawn in the host's own slot seats rather
|
|
285
|
+
than re-implemented. Two host rules make the browser half load at all — the
|
|
286
|
+
package must export `./package.json` (the host resolves the manifest by
|
|
287
|
+
subpath), and the `./client` bundle is a closure-factory artifact, not plain
|
|
288
|
+
ESM.
|
|
283
289
|
|
|
284
290
|
The rules that keep it honest:
|
|
285
291
|
|
|
@@ -301,23 +307,71 @@ The rules that keep it honest:
|
|
|
301
307
|
- **Verified, not asserted.** Every capability has a public-API contract test,
|
|
302
308
|
and ships only after running end to end on a real DSH loop — CLI *and* web.
|
|
303
309
|
|
|
310
|
+
## What this is teaching us about DSH
|
|
311
|
+
|
|
312
|
+
pi2dsh is also an executable stress test of DSH's plugin architecture. Pi gives
|
|
313
|
+
that test a useful workload: a large, already-used public plugin ABI rather than
|
|
314
|
+
a set of examples invented to fit the host.
|
|
315
|
+
|
|
316
|
+
The result so far is specific, not a thumbs-up/thumbs-down verdict:
|
|
317
|
+
|
|
318
|
+
- DSH's public seams successfully carry whole capabilities: tools, commands,
|
|
319
|
+
model adapters, user questions, native child sessions and browser slots.
|
|
320
|
+
- The pressure points appear when an out-of-repo plugin needs to extend an
|
|
321
|
+
existing capability *from the inside*: add a durable session-event type,
|
|
322
|
+
intercept the real provider request/response, control compaction before it
|
|
323
|
+
happens, or participate in trust before project resources load.
|
|
324
|
+
- A working pi2dsh sidecar or alternate adapter is useful product behaviour,
|
|
325
|
+
but it is **not** counted as proof that the native DSH seam is complete.
|
|
326
|
+
|
|
327
|
+
For example, a `pi-btw` answer is a real DSH child session — visible, resumable
|
|
328
|
+
and continuable by the host. Pi custom entries are different: they still need a
|
|
329
|
+
pi2dsh sidecar because an out-of-repo plugin cannot safely add a new event type
|
|
330
|
+
to DSH's durable log. Likewise, a transport-owning Pi provider can register a
|
|
331
|
+
native DSH route with its full compatibility profile, while the hand-configured
|
|
332
|
+
`llm-pi-ai` schema still drops some wire-compatibility fields.
|
|
333
|
+
|
|
334
|
+
The project follows one **[Pi → DSH architecture mapping standard](docs/architecture-mapping-standard.md)**.
|
|
335
|
+
All 111 Pi surfaces belong to capability contracts, all 45 DSH subsystems belong
|
|
336
|
+
to carrying mechanisms, and each capability contract maps to concrete public
|
|
337
|
+
DSH seams. Real plugin runs reference those mappings and record the five-layer
|
|
338
|
+
trace and five-grade result. The structured source of truth is
|
|
339
|
+
[`architecture-ledger.json`](docs/architecture-ledger.json); it produces the
|
|
340
|
+
**[theoretical architecture matrix](docs/architecture-mapping-matrix.md)**,
|
|
341
|
+
**[real-plugin validation matrix](docs/plugin-validation-matrix.md)** and
|
|
342
|
+
**[current architecture conclusions](docs/dsh-architecture-conformance.md)**.
|
|
343
|
+
That makes both top-down status and per-plugin drill-down answerable from the
|
|
344
|
+
same ledger. The current five DSH gap IDs are confirmed findings, not a claim
|
|
345
|
+
of complete coverage. Current
|
|
346
|
+
upstream reports include
|
|
347
|
+
[#2708 — durable events for out-of-repo plugins](https://github.com/deepseek-ai/deepseek-harness/discussions/2708)
|
|
348
|
+
and
|
|
349
|
+
[#3076 — provider compat fields dropped by `llm-pi-ai`](https://github.com/deepseek-ai/deepseek-harness/discussions/3076).
|
|
350
|
+
|
|
304
351
|
## Pi capabilities on DSH
|
|
305
352
|
|
|
306
353
|
Every surface a Pi package can touch, and what it maps onto. These tables are
|
|
307
354
|
generated from the rules the bridge consults at runtime, so they cannot drift
|
|
308
355
|
from the code.
|
|
309
356
|
|
|
357
|
+
For pinned Pi 0.84.1, the generated catalog has **111 upstream-shaped rule
|
|
358
|
+
rows**. The bridge also keeps one
|
|
359
|
+
documented compatibility extension, `unregisterTool`; it appears on the tools
|
|
360
|
+
detail page but is deliberately outside that total. Nested objects such as the
|
|
361
|
+
session manager can expose several methods behind one row; the architecture
|
|
362
|
+
audit states this boundary explicitly.
|
|
363
|
+
|
|
310
364
|
<!-- capability-table:start -->
|
|
311
365
|
| Area | Pi surfaces | Status |
|
|
312
366
|
|---|---|---|
|
|
313
|
-
| [Tools](docs/capabilities/tools.md) |
|
|
314
|
-
| [Commands, flags, editor input](docs/capabilities/commands.md) |
|
|
367
|
+
| [Tools](docs/capabilities/tools.md) | 11 | 2 same semantics · 9 mapped, difference stated |
|
|
368
|
+
| [Commands, flags, editor input](docs/capabilities/commands.md) | 6 | 6 mapped, difference stated |
|
|
315
369
|
| [Messages, context, agent loop](docs/capabilities/conversation.md) | 20 | 9 same semantics · 11 mapped, difference stated |
|
|
316
|
-
| [Sessions & side conversations](docs/capabilities/sessions.md) |
|
|
370
|
+
| [Sessions & side conversations](docs/capabilities/sessions.md) | 23 | 5 same semantics · 18 mapped, difference stated |
|
|
317
371
|
| [Models, providers, credentials](docs/capabilities/models.md) | 15 | 1 same semantics · 11 mapped, difference stated · 3 not available |
|
|
318
|
-
| [Asking the user, rendering](docs/capabilities/interaction.md) |
|
|
372
|
+
| [Asking the user, rendering](docs/capabilities/interaction.md) | 32 | 5 same semantics · 27 mapped, difference stated |
|
|
319
373
|
| [Project environment & resources](docs/capabilities/environment.md) | 4 | 1 same semantics · 1 mapped, difference stated · 2 not available |
|
|
320
|
-
| **Total** | **
|
|
374
|
+
| **Total** | **111** | **23 same semantics · 83 mapped, difference stated · 5 not available** |
|
|
321
375
|
<!-- capability-table:end -->
|
|
322
376
|
|
|
323
377
|
Plus **202 imported symbols** from Pi's three runtime packages
|
|
@@ -325,9 +379,10 @@ Plus **202 imported symbols** from Pi's three runtime packages
|
|
|
325
379
|
shims — so a plugin's own Pi version pins never load. They are listed in
|
|
326
380
|
[Imported Pi runtime symbols](docs/capabilities/imports.md).
|
|
327
381
|
|
|
328
|
-
Each area page states
|
|
329
|
-
|
|
330
|
-
|
|
382
|
+
Each area page states the Pi capability contract, the theoretical DSH mechanism
|
|
383
|
+
and public seam, and the current implementation for every surface. Adding a
|
|
384
|
+
surface without a capability assignment or theoretical mapping fails the docs
|
|
385
|
+
check.
|
|
331
386
|
|
|
332
387
|
Start at the [capability index](docs/capabilities/README.md). Machine-readable:
|
|
333
388
|
`pi2dsh matrix --json`.
|
|
@@ -352,8 +407,9 @@ project trust is a host decision. See
|
|
|
352
407
|
**The one gap we own:** plugin-drawn cards. Pi plugins can ship their own
|
|
353
408
|
renderers; today those registrations are accepted but not invoked, so such a
|
|
354
409
|
note appears as a native context-injection row — the content reaches you and
|
|
355
|
-
the model, without the plugin's styling.
|
|
356
|
-
|
|
410
|
+
the model, without the plugin's styling. The client half exists and takes four
|
|
411
|
+
seats (side-conversation panel, header, widget dock, working chrome) — the card
|
|
412
|
+
renderers are what it does not draw yet.
|
|
357
413
|
|
|
358
414
|
## Examples
|
|
359
415
|
|
|
@@ -363,8 +419,11 @@ in one has actually been executed against a real DSH loop before landing.
|
|
|
363
419
|
| Example | What you get |
|
|
364
420
|
|---|---|
|
|
365
421
|
| [`vision-bridge`](examples/vision-bridge/) | A text-only model answers questions about images — CLI and web, probe images included |
|
|
422
|
+
| [`codex-image-gen`](examples/codex-image-gen/) | Generate and edit images with a ChatGPT/Codex subscription; DSH approval and inline result included |
|
|
366
423
|
| [`side-conversation`](examples/side-conversation/) | `/btw <question>` runs a side thread in DSH's native subagent UI; your main conversation stays clean |
|
|
367
|
-
| [`
|
|
424
|
+
| [`presentation-surfaces`](examples/presentation-surfaces/) | A real plugin's terminal chrome (`pi-powerline-footer`) in DSH's web seats, plus which of the top-50 Pi plugins draw at all |
|
|
425
|
+
| [`subscription-login`](examples/subscription-login/) | Use a ChatGPT / Claude / Copilot / Kimi subscription as a DSH model: `/login`, then the route and credential appear on their own |
|
|
426
|
+
| [`gateway-compat`](examples/gateway-compat/) | Private / domestic / proxy gateways that reject the `developer` role: why reasoning 400s, and how a Pi provider plugin gets past it (recording proxy included, so you can read the exact request body we send) |
|
|
368
427
|
| [`custom-gateways`](examples/custom-gateways/) | Add any OpenAI-compatible gateway the official DSH way, and every Pi plugin sees it |
|
|
369
428
|
|
|
370
429
|
## Other tools
|
|
@@ -384,6 +443,7 @@ pnpm verify # typecheck + contract tests + packaging
|
|
|
384
443
|
pnpm audit:community # static screening over the top-50 corpus
|
|
385
444
|
pnpm test:community # deep runtime + official plugin-manager + e2e
|
|
386
445
|
DEEPSEEK_API_KEY=… pnpm test:live # real-model acceptance (key from env only)
|
|
446
|
+
CODEX_AUTH_FILE=… pnpm test:codex-image # real OAuth generation + reference edit + Web pixels
|
|
387
447
|
```
|
|
388
448
|
|
|
389
449
|
Acceptance evidence per capability: [docs/acceptance.md](docs/acceptance.md).
|
package/README.zh.md
CHANGED
|
@@ -152,7 +152,9 @@ Web 里**直接粘图**——哪怕你的主模型是纯文本的。DSH 正常
|
|
|
152
152
|
| 插件 | 验证了什么 | 在哪验的 | 示例 |
|
|
153
153
|
|---|---|---|---|
|
|
154
154
|
| [`@kassing/pi-vision`](https://www.npmjs.com/package/@kassing/pi-vision) | 图片委托给视觉模型;贴图伴生路由;分析结果注入纯文本模型的这一轮 | CLI + Web | [`vision-bridge`](examples/vision-bridge/) |
|
|
155
|
+
| [`@crazygit/pi-codex-image-gen`](https://www.npmjs.com/package/@crazygit/pi-codex-image-gen) | ChatGPT/Codex OAuth 调 `gpt-image-2` 生图;本地参考图走 DSH 审批后上传;编辑图片;原生附件存储并在 Web 内直接显示 | CLI + Web | [`codex-image-gen`](examples/codex-image-gen/) |
|
|
155
156
|
| [`pi-btw`](https://www.npmjs.com/package/pi-btw) | `/btw <问题>` 跑成 DSH 子代理界面里的真子会话;`/btw-inject`;`/btw --save`;主会话保持干净 | CLI + Web | [`side-conversation`](examples/side-conversation/) |
|
|
157
|
+
| [`pi-powerline-footer`](https://www.npmjs.com/package/pi-powerline-footer) | 终端状态条(模型、思考档位、项目、上下文用量)画进 DSH 的 widget dock,带颜色 | Web | [`presentation-surfaces`](examples/presentation-surfaces/) |
|
|
156
158
|
| [`pi-vision-tool`](https://www.npmjs.com/package/pi-vision-tool) | 工具注册,且带一个 DSH 需要转换的 JSON Schema 形状(`anyOf` → `oneOf`) | CLI + Web | — |
|
|
157
159
|
| [`pi-approval-guardian`](https://www.npmjs.com/package/pi-approval-guardian) | 每次工具调用先由第二个模型审批;放行与拒绝两条路都看到了 | CLI(裸环境) | — |
|
|
158
160
|
| [`pi-hermes-memory`](https://www.npmjs.com/package/pi-hermes-memory) | 跨会话记忆:一个进程写入,另一个全新进程读回 | CLI | — |
|
|
@@ -234,18 +236,20 @@ DSH 有两半,桥也有两半。上面那根柱子是服务端;浏览器壳
|
|
|
234
236
|
┌──────────── DSH 服务端(cordis) ───────────┐ ┌──────── DSH 浏览器壳 ────────────┐
|
|
235
237
|
│ 服务 · waterfall · durable 事件 │ │ dsh.client + exports "./client" │
|
|
236
238
|
│ │ │ slot 注册表(ui-slots) │
|
|
237
|
-
│ pi2dsh 引擎 │ │ shell.overlay ←
|
|
238
|
-
│ 工具 · 命令 · 模型 · 会话 │ │
|
|
239
|
-
│ 子代理桥 ───────────────────┐ │ │
|
|
240
|
-
│
|
|
241
|
-
│ GET /pi2dsh/
|
|
239
|
+
│ pi2dsh 引擎 │ │ shell.overlay ← 浮层与 pill │
|
|
240
|
+
│ 工具 · 命令 · 模型 · 会话 │ │ header.utilities ← 头部文本 │
|
|
241
|
+
│ 子代理桥 ───────────────────┐ │ │ input.dock ← widget │
|
|
242
|
+
│ browser-state 注册表 │ │ │ composer.dock ← working/底部 │
|
|
243
|
+
│ GET /pi2dsh/browser-state┼── 自有通路 ─┼──┼─▶ 四个座位,共用一个轮询 │
|
|
242
244
|
└───────────────────────────────┴─────────────┘ └───────────────────────────────────┘
|
|
243
245
|
```
|
|
244
246
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
浏览器半边用的数据走**本包自己的路由**,不走 DSH 的 typed Remote 体系——那是
|
|
248
|
+
一等公民的代码生成契约,仓外插件跟自己的 UI 说话就该自带通道。一个会话一个
|
|
249
|
+
payload,喂给所有座位:侧边对话浮层,以及 Pi 的呈现面(status、widget、header、
|
|
250
|
+
footer、title、working/thinking 类),都画在宿主自己的 slot 座位里,而不是再造
|
|
251
|
+
一套。另外两条宿主规则决定浏览器半边能不能被装载:包必须导出 `./package.json`
|
|
252
|
+
(宿主按子路径解析清单),`./client` 产物必须是闭包工厂格式而不是普通 ESM。
|
|
249
253
|
|
|
250
254
|
保证它靠谱的几条标准:
|
|
251
255
|
|
|
@@ -262,31 +266,70 @@ DSH 有两半,桥也有两半。上面那根柱子是服务端;浏览器壳
|
|
|
262
266
|
- **验证过才算数。** 每项能力都有公开 API 契约测试,并且必须在真实 DSH loop 上
|
|
263
267
|
端到端跑通——CLI **和** Web 双端——才会发布。
|
|
264
268
|
|
|
269
|
+
## 这件事正在检验 DSH 什么
|
|
270
|
+
|
|
271
|
+
pi2dsh 同时也是一套会执行的 DSH 插件架构压力测试。Pi 提供的不是为了迎合 DSH
|
|
272
|
+
现编的几个 demo,而是一套已经被大量真实插件用过的公开 ABI,所以它很适合回答:
|
|
273
|
+
DSH 所说的“能力由插件自由组合”,到底走到了哪一步。
|
|
274
|
+
|
|
275
|
+
目前的结论不是简单的“好”或“不好”,而是边界已经很清楚:
|
|
276
|
+
|
|
277
|
+
- DSH 对**替换一整项能力**的公开 seam 是成立的:工具、命令、模型 adapter、用户
|
|
278
|
+
提问、原生子会话和浏览器 slot 都已经承接住真实 Pi 能力。
|
|
279
|
+
- 压力集中在**从内部扩展已有能力**:仓外插件新增一种持久会话事件、拦截真正发出的
|
|
280
|
+
provider 请求/响应、在压缩发生前改变决定、在项目资源加载前参与 trust。
|
|
281
|
+
- pi2dsh 用 sidecar 或另一条 adapter 把功能绕通,对用户有价值,但**不能算 DSH
|
|
282
|
+
原生架构已经承接成功**。我们会把“功能可用”和“宿主 seam 完整”分开记。
|
|
283
|
+
|
|
284
|
+
一个容易说错的例子:`pi-btw` 的回答已经是真正的 DSH child session,宿主能打开、
|
|
285
|
+
续聊和恢复;sidecar 存的是 Pi 自定义 entry 等 DSH 仓外插件目前无法写进原生日志的
|
|
286
|
+
事实,不是把整个子会话伪造了一遍。模型侧也一样:自带 transport 的 Pi provider
|
|
287
|
+
可以注册成原生 DSH route,并保留完整 compat;但手写 `llm-pi-ai` 配置时,部分
|
|
288
|
+
wire 兼容字段仍会被 schema 丢掉。
|
|
289
|
+
|
|
290
|
+
项目采用一套统一的 **[Pi → DSH 架构映射标准](docs/architecture-mapping-standard.md)**:
|
|
291
|
+
111 条 Pi 接口先归入能力契约,DSH 的 45 个模块归入承载机制,再建立到具体公开 seam
|
|
292
|
+
的理论映射;真实插件只引用这些映射,记录五层流转和五级结果。结构化事实保存在
|
|
293
|
+
[`architecture-ledger.json`](docs/architecture-ledger.json),由同一份总账生成
|
|
294
|
+
**[理论架构矩阵](docs/architecture-mapping-matrix.md)**、
|
|
295
|
+
**[真实插件验证矩阵](docs/plugin-validation-matrix.md)** 和
|
|
296
|
+
**[当前架构结论](docs/dsh-architecture-conformance.md)**。这样既能从总体看到已经适配的
|
|
297
|
+
能力,也能从任一插件下钻到它用了哪些 Pi 能力、落到哪些 DSH 机制、实际达到哪一级。
|
|
298
|
+
当前 5 个 DSH 缺口是已经坐实的发现,**不是已经完成全覆盖**。
|
|
299
|
+
当前已向上游提交的实证包括
|
|
300
|
+
[#2708:让仓外插件安全写持久事件](https://github.com/deepseek-ai/deepseek-harness/discussions/2708)
|
|
301
|
+
和
|
|
302
|
+
[#3076:`llm-pi-ai` 丢 provider compat 字段](https://github.com/deepseek-ai/deepseek-harness/discussions/3076)。
|
|
303
|
+
|
|
265
304
|
## Pi 的开放能力在 DSH 上怎么落
|
|
266
305
|
|
|
267
306
|
Pi 包能碰到的每一个面,以及它落到 DSH 的什么位置。下面这些表是从桥在运行时真正
|
|
268
307
|
查的那份规则生成的,所以不会和代码脱节。
|
|
269
308
|
|
|
309
|
+
针对固定的 Pi 0.84.1,当前生成目录有 **111** 条上游形状的规则行。桥另外保留了一个
|
|
310
|
+
兼容扩展 `unregisterTool`;它会出现在工具细表中,但明确不计入这个总数。
|
|
311
|
+
`sessionManager` 等嵌套对象仍可能用一行代表多个方法,架构审计会明确写出这层边界。
|
|
312
|
+
|
|
270
313
|
<!-- capability-table:start -->
|
|
271
314
|
| 能力域 | Pi 面数 | 状态 |
|
|
272
315
|
|---|---|---|
|
|
273
|
-
| [工具](docs/capabilities/tools.md) |
|
|
274
|
-
| [命令、flag、编辑器输入](docs/capabilities/commands.md) |
|
|
316
|
+
| [工具](docs/capabilities/tools.md) | 11 | 2 语义一致 · 9 已映射并写明差异 |
|
|
317
|
+
| [命令、flag、编辑器输入](docs/capabilities/commands.md) | 6 | 6 已映射并写明差异 |
|
|
275
318
|
| [消息、上下文、agent 循环](docs/capabilities/conversation.md) | 20 | 9 语义一致 · 11 已映射并写明差异 |
|
|
276
|
-
| [会话与侧边对话](docs/capabilities/sessions.md) |
|
|
319
|
+
| [会话与侧边对话](docs/capabilities/sessions.md) | 23 | 5 语义一致 · 18 已映射并写明差异 |
|
|
277
320
|
| [模型、provider、凭证](docs/capabilities/models.md) | 15 | 1 语义一致 · 11 已映射并写明差异 · 3 不提供 |
|
|
278
|
-
| [向用户提问与渲染](docs/capabilities/interaction.md) |
|
|
321
|
+
| [向用户提问与渲染](docs/capabilities/interaction.md) | 32 | 5 语义一致 · 27 已映射并写明差异 |
|
|
279
322
|
| [项目环境与资源](docs/capabilities/environment.md) | 4 | 1 语义一致 · 1 已映射并写明差异 · 2 不提供 |
|
|
280
|
-
| **合计** | **
|
|
323
|
+
| **合计** | **111** | **23 语义一致 · 83 已映射并写明差异 · 5 不提供** |
|
|
281
324
|
<!-- capability-table:end -->
|
|
282
325
|
|
|
283
326
|
另外还有 Pi 三个运行时包(`pi-coding-agent`、`pi-tui`、`pi-ai`)的 **202 个
|
|
284
327
|
导入符号**,由 vendored 或 headless shim 提供——所以插件自己钉的 Pi 版本永远不会
|
|
285
328
|
被加载,清单见[导入的 Pi 运行时符号](docs/capabilities/imports.md)。
|
|
286
329
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
330
|
+
每个能力域页面对每一个面都写清它属于哪个 Pi 能力契约、理论上应落到哪个 DSH 承载
|
|
331
|
+
机制与公开 seam、当前代码实际上如何实现。新增接口如果没有能力归属或理论映射,文档
|
|
332
|
+
检查会直接失败。
|
|
290
333
|
|
|
291
334
|
从[能力索引](docs/capabilities/README.md)开始看。机器可读版:`pi2dsh matrix --json`。
|
|
292
335
|
|
|
@@ -304,7 +347,8 @@ Codex、Anthropic、GitHub Copilot、Kimi Code)内置。凭证按 Pi 的 `auth
|
|
|
304
347
|
|
|
305
348
|
**我们自己欠的那一块**:插件自绘卡片。Pi 插件可以自带渲染器,目前这类注册我们接
|
|
306
349
|
下来但不调用,所以这种笔记会显示成原生的上下文注入行——内容你和模型都拿得到,
|
|
307
|
-
|
|
350
|
+
只是没有插件自己的样式。客户端半边已经在并占着四个座位(侧边对话浮层、头部、
|
|
351
|
+
widget 区、working 区)——卡片渲染器正是它还没画的那部分。
|
|
308
352
|
|
|
309
353
|
## 示例
|
|
310
354
|
|
|
@@ -314,8 +358,11 @@ loop 上实际跑过才会进来。
|
|
|
314
358
|
| 示例 | 你能得到什么 |
|
|
315
359
|
|---|---|
|
|
316
360
|
| [`vision-bridge`](examples/vision-bridge/) | 纯文本模型回答图片问题——CLI 与 Web 双端,附探针图 |
|
|
361
|
+
| [`codex-image-gen`](examples/codex-image-gen/) | 用 ChatGPT/Codex 订阅生图和改图,包含 DSH 上传审批与 Web 内直接显示结果 |
|
|
317
362
|
| [`side-conversation`](examples/side-conversation/) | `/btw <问题>` 在 DSH 原生子代理界面里开一条侧边线程,主会话保持干净 |
|
|
318
|
-
| [`
|
|
363
|
+
| [`presentation-surfaces`](examples/presentation-surfaces/) | 真插件(`pi-powerline-footer`)的终端界面画进 DSH Web 座位,附 top50 里哪些 Pi 插件会画界面 |
|
|
364
|
+
| [`subscription-login`](examples/subscription-login/) | 用 ChatGPT / Claude / Copilot / Kimi 订阅账号当 DSH 的模型:`/login`、登录后自动建路由与凭证 |
|
|
365
|
+
| [`gateway-compat`](examples/gateway-compat/) | 私有 / 国内 / 代理网关拒收 `developer` 角色:为什么一开推理就 400,以及用 Pi provider 插件怎么绕过去(附透传录制代理,能看到我们真正发出去的请求体) |
|
|
319
366
|
| [`custom-gateways`](examples/custom-gateways/) | 按 DSH 官方方式接任何 OpenAI 兼容网关,每个 Pi 插件都能看到它 |
|
|
320
367
|
|
|
321
368
|
## 其它工具
|
|
@@ -335,6 +382,7 @@ pnpm verify # 类型检查 + 契约测试 + 打包检查
|
|
|
335
382
|
pnpm audit:community # 前 50 静态筛查
|
|
336
383
|
pnpm test:community # 深度运行时 + 官方插件管理器 + e2e
|
|
337
384
|
DEEPSEEK_API_KEY=… pnpm test:live # 真实模型验收(key 只从环境读)
|
|
385
|
+
CODEX_AUTH_FILE=… pnpm test:codex-image # 真 OAuth 生图 + 参考图编辑 + Web 像素显示
|
|
338
386
|
```
|
|
339
387
|
|
|
340
388
|
逐项能力的验收证据:[docs/acceptance.md](docs/acceptance.md)。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { c as PI_AI_PACKAGES, f as ruleForApi, g as ruleForUiContextProperty, h as ruleForHostImport, l as PI_CODING_AGENT_PACKAGES, m as ruleForEvent, p as ruleForContextProperty, u as PI_TUI_PACKAGES } from "./mcp-config-
|
|
2
|
+
import { c as PI_AI_PACKAGES, f as ruleForApi, g as ruleForUiContextProperty, h as ruleForHostImport, l as PI_CODING_AGENT_PACKAGES, m as ruleForEvent, p as ruleForContextProperty, u as PI_TUI_PACKAGES } from "./mcp-config-CZepacin.mjs";
|
|
3
3
|
import { builtinModules } from "node:module";
|
|
4
4
|
import { lstat, readFile, readdir, stat } from "node:fs/promises";
|
|
5
5
|
import { basename, dirname, extname, join, relative, resolve } from "node:path";
|
|
@@ -623,4 +623,4 @@ async function analyzePackage(pkg) {
|
|
|
623
623
|
//#endregion
|
|
624
624
|
export { analyzePackage };
|
|
625
625
|
|
|
626
|
-
//# sourceMappingURL=analyzer-
|
|
626
|
+
//# sourceMappingURL=analyzer-CXNbeBAe.mjs.map
|