pi2dsh 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -10
- package/README.zh.md +15 -10
- package/dist/all-Rt4K68QA.mjs +28512 -0
- package/dist/all-Rt4K68QA.mjs.map +1 -0
- package/dist/anthropic-messages-Beym0_aC.mjs +6438 -0
- package/dist/anthropic-messages-Beym0_aC.mjs.map +1 -0
- package/dist/azure-openai-responses-cHqZTgLD.mjs +209 -0
- package/dist/azure-openai-responses-cHqZTgLD.mjs.map +1 -0
- package/dist/{build-DsGYAgiT.mjs → build-BG7p2Lbr.mjs} +2 -2
- package/dist/{build-DsGYAgiT.mjs.map → build-BG7p2Lbr.mjs.map} +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/compat/pi-ai.d.mts +16 -3
- package/dist/compat/pi-ai.d.mts.map +1 -1
- package/dist/compat/pi-ai.mjs +3 -3
- package/dist/compat/pi-coding-agent.d.mts +12 -1
- package/dist/compat/pi-coding-agent.d.mts.map +1 -1
- package/dist/compat/pi-coding-agent.mjs +2 -2
- package/dist/credentials-oauth.mjs +3 -3
- package/dist/deferred-tools-BD4g5QUx.mjs +32 -0
- package/dist/deferred-tools-BD4g5QUx.mjs.map +1 -0
- package/dist/diagnostics-CJye1UFh.mjs +99 -0
- package/dist/diagnostics-CJye1UFh.mjs.map +1 -0
- package/dist/dist-IQKOgQyt.mjs +10035 -0
- package/dist/dist-IQKOgQyt.mjs.map +1 -0
- package/dist/dist-QBBA-dL_.mjs +1246 -0
- package/dist/dist-QBBA-dL_.mjs.map +1 -0
- package/dist/error-body-DKA3lknR.mjs +104 -0
- package/dist/error-body-DKA3lknR.mjs.map +1 -0
- package/dist/github-copilot-headers-CZo2QHrt.mjs +25 -0
- package/dist/github-copilot-headers-CZo2QHrt.mjs.map +1 -0
- package/dist/google-generative-ai-B7OZs5lu.mjs +358 -0
- package/dist/google-generative-ai-B7OZs5lu.mjs.map +1 -0
- package/dist/google-shared-CRsAUItF.mjs +29042 -0
- package/dist/google-shared-CRsAUItF.mjs.map +1 -0
- package/dist/google-vertex-DmdaHQtB.mjs +402 -0
- package/dist/google-vertex-DmdaHQtB.mjs.map +1 -0
- package/dist/hash-Dbggamac.mjs +19 -0
- package/dist/hash-Dbggamac.mjs.map +1 -0
- package/dist/headers-CPzZhJQn.mjs +17 -0
- package/dist/headers-CPzZhJQn.mjs.map +1 -0
- package/dist/host.d.mts.map +1 -1
- package/dist/host.mjs +13 -3
- package/dist/host.mjs.map +1 -1
- package/dist/images-models-DJtHo9Rp.mjs +1068 -0
- package/dist/images-models-DJtHo9Rp.mjs.map +1 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/json-parse-CFyFZSLJ.mjs +384 -0
- package/dist/json-parse-CFyFZSLJ.mjs.map +1 -0
- package/dist/{mcp-config-gqg7GJEE.mjs → mcp-config-D2B3kv-Z.mjs} +34 -16
- package/dist/mcp-config-D2B3kv-Z.mjs.map +1 -0
- package/dist/mistral-conversations-HHZCcFv_.mjs +42007 -0
- package/dist/mistral-conversations-HHZCcFv_.mjs.map +1 -0
- package/dist/multipart-parser-CIa5BbwO.mjs +301 -0
- package/dist/multipart-parser-CIa5BbwO.mjs.map +1 -0
- package/dist/{oauth-bridge-BpPrppjR.mjs → oauth-bridge-C6fL1qSv.mjs} +20 -4
- package/dist/oauth-bridge-C6fL1qSv.mjs.map +1 -0
- package/dist/openai-DkzRh5_G.mjs +6732 -0
- package/dist/openai-DkzRh5_G.mjs.map +1 -0
- package/dist/openai-codex-responses-vmovNu-q.mjs +1169 -0
- package/dist/openai-codex-responses-vmovNu-q.mjs.map +1 -0
- package/dist/openai-completions-fXHhRolF.mjs +947 -0
- package/dist/openai-completions-fXHhRolF.mjs.map +1 -0
- package/dist/openai-prompt-cache-BDWtZRKh.mjs +11 -0
- package/dist/openai-prompt-cache-BDWtZRKh.mjs.map +1 -0
- package/dist/openai-responses-DKdCYf3h.mjs +247 -0
- package/dist/openai-responses-DKdCYf3h.mjs.map +1 -0
- package/dist/openai-responses-shared-D0Jq7yVP.mjs +572 -0
- package/dist/openai-responses-shared-D0Jq7yVP.mjs.map +1 -0
- package/dist/openrouter-images-fG3Aj6M4.mjs +127 -0
- package/dist/openrouter-images-fG3Aj6M4.mjs.map +1 -0
- package/dist/otel-BQSQRBLF.mjs +24935 -0
- package/dist/otel-BQSQRBLF.mjs.map +1 -0
- package/dist/{pi-ai-CWFlgigJ.mjs → pi-ai-DhYGgq4Y.mjs} +49 -12
- package/dist/{pi-ai-CWFlgigJ.mjs.map → pi-ai-DhYGgq4Y.mjs.map} +1 -1
- package/dist/{pi-coding-agent-Z1hTs61i.mjs → pi-coding-agent-fPHwKP4d.mjs} +27 -3
- package/dist/{pi-coding-agent-Z1hTs61i.mjs.map → pi-coding-agent-fPHwKP4d.mjs.map} +1 -1
- package/dist/pi-messages-CV-Ts8An.mjs +306 -0
- package/dist/pi-messages-CV-Ts8An.mjs.map +1 -0
- package/dist/provider-env-C72pF4vP.mjs +40 -0
- package/dist/provider-env-C72pF4vP.mjs.map +1 -0
- package/dist/provider-retry-Cw6YJ4cr.mjs +80 -0
- package/dist/provider-retry-Cw6YJ4cr.mjs.map +1 -0
- package/dist/rolldown-runtime-CTfmNlz1.mjs +44 -0
- package/dist/{runtime-6DefpI6h.mjs → runtime-B9R7bDWT.mjs} +874 -37
- package/dist/runtime-B9R7bDWT.mjs.map +1 -0
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +1 -1
- package/dist/sanitize-unicode-wLA11KvZ.mjs +29 -0
- package/dist/sanitize-unicode-wLA11KvZ.mjs.map +1 -0
- package/dist/src-C3WBfOks.mjs +5031 -0
- package/dist/src-C3WBfOks.mjs.map +1 -0
- package/dist/transform-messages-DGq9mvhA.mjs +379 -0
- package/dist/transform-messages-DGq9mvhA.mjs.map +1 -0
- package/dist/uuid-DtFT7tOE.mjs +65 -0
- package/dist/uuid-DtFT7tOE.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/mcp-config-gqg7GJEE.mjs.map +0 -1
- package/dist/oauth-bridge-BpPrppjR.mjs.map +0 -1
- package/dist/rolldown-runtime-D-uZhY3_.mjs +0 -16
- package/dist/runtime-6DefpI6h.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ Three delivery modes:
|
|
|
45
45
|
Three hard rules keep it general:
|
|
46
46
|
|
|
47
47
|
1. The core contains **no `if (packageName === …)`** branching.
|
|
48
|
-
2. Every capability has a **public-API contract test** (`pnpm test`,
|
|
48
|
+
2. Every capability has a **public-API contract test** (`pnpm test`, 55 tests); "some plugin loads" is never the success criterion.
|
|
49
49
|
3. The top-50 corpus is verified **black-box only**: failures file public ABI gaps, and fixing one gap unlocks every package that hits it (e.g. one jiti subpath-alias fix unlocked 4 packages at once).
|
|
50
50
|
|
|
51
51
|
## Progress: Pi catalog top 50 by monthly downloads
|
|
@@ -54,28 +54,30 @@ Status as of 2026-08-14. Static analysis screens; the black-box run certifies. F
|
|
|
54
54
|
|
|
55
55
|
| Tier | Count | Meaning |
|
|
56
56
|
|---|---|---|
|
|
57
|
-
| ✅ **Tested working** | **
|
|
58
|
-
| 🟡 **Mounts, not fully verified** | **
|
|
57
|
+
| ✅ **Tested working** | **49 / 50** | Mounted in a real DSH runtime AND real execution verified: 42 returned success, 7 ran their business logic end-to-end and rejected the synthetic probe arguments (2 of the 49 verified through host mode). Real-service coverage along the way: a real LSP subprocess, real web search/fetch, PNG generation, a real MCP stdio server bridged end-to-end, real child-`pi` dispatch answered by a live model, real DeepSeek search on user credentials, and the official `dsh plugin` add/activate/remove flow |
|
|
58
|
+
| 🟡 **Mounts, not fully verified** | **1 / 50** | `@alexanderfortin/pi-deepseek-usage` — a pure event-hook package: all four lifecycle subscriptions attach, but every handler is gated on an active DeepSeek model session (it fetches billing usage and renders a footer), so a black-box probe has no safely-assertable callable surface. A harness limit, not a package or bridge gap |
|
|
59
59
|
| ❌ **Not yet supported** | **0 / 50** | The last four Pi-internal-runtime packages are bridged: vendored built-in tool constructors, provider factories, a real-semantics `ExtensionRunner` facade, and `createAgentSession` driving genuine DSH child agents |
|
|
60
60
|
| **Total mountable today** | **50 / 50** | 48 through convert/host bundles directly; 2 snapshot-limited packages through host mode ([evidence](community/host-mode-results.json)) |
|
|
61
61
|
|
|
62
|
+
The v6 harness also hardened the probe methodology itself: the bridge's own host-native surface (e.g. the built-in `/login` command) is measured by mounting a zero-contribution fixture extension and subtracted from every probe, so a grade reflects the package's own increment only; unsafe-name screening is word-level (`litellm_skill_list` is not a "kill" tool); and the fixture environment serves a real MCP stdio server, a LiteLLM-gateway-shaped skills API, image-model settings under Pi's config-dir contract, and — opt-in via `PI2DSH_BLACKBOX_PI_BIN` + `DEEPSEEK_API_KEY` — real child-`pi` dispatch answered by a live model.
|
|
63
|
+
|
|
62
64
|
Additional verified layers: a **host bundle** mounting two unmodified packages passed the official plugin-manager flow end-to-end; a **real model run** (`deepseek-v4-flash`) called a migrated Pi tool with the durable session log asserted and zero credential persistence ([evidence](community/live-deepseek-results.json)).
|
|
63
65
|
|
|
64
66
|
### How the last four internal-runtime packages were bridged
|
|
65
67
|
|
|
66
|
-
Each landed as a reusable public-surface bridge, not a package patch: `pi-landstrip` and `pi-fabric` run on Pi's built-in tool constructors (bash/read/edit/write/grep/find/ls) vendored byte-identical with their pure-logic closure; `pi-provider-litellm` runs on the vendored pi-ai `createProvider` factory (model transports stay native to DSH llm
|
|
68
|
+
Each landed as a reusable public-surface bridge, not a package patch: `pi-landstrip` and `pi-fabric` run on Pi's built-in tool constructors (bash/read/edit/write/grep/find/ls) vendored byte-identical with their pure-logic closure; `pi-provider-litellm` runs on the vendored pi-ai `createProvider` factory — providers key by `id` and the registry's `getProviderAuth` runs Pi's full credential chain (stored OAuth → stored key → the package's own env resolution), while model transports stay native to DSH llm; `pi-fabric` additionally hooks a real-semantics `ExtensionRunner` facade — patching `prototype.getAllRegisteredTools` genuinely filters the tool catalog, as under Pi; `@tintinweb/pi-subagents` runs on `createAgentSession` bridged to genuine DSH child agents through `ctx.agents` — the bridge owns no model loop, so compositions without one fail explicitly instead of simulating a subagent.
|
|
67
69
|
|
|
68
|
-
###
|
|
70
|
+
### How the screener judges compatibility
|
|
69
71
|
|
|
70
|
-
|
|
72
|
+
The screener models **load-time vs lazy reachability**: only an unresolvable dependency on the load-time static closure blocks a package — function-body dynamic imports, files reached only through dynamic import, and worker/data assets are lazy paths that behave identically under Pi and are graded as reviewable, never fatal. `bun:*` is treated like `node:*` (a host builtin of Pi's Bun-compiled distribution), and snapshots preserve the published file layout byte for byte. These rules are contract-tested; under them, packages that mix Bun-only branches, optional heavyweight dependencies, or bundler-generated worker paths — `pi-hermes-memory`, `@mjasnikovs/pi-task`, `pi-harness-runtime`, `mitsupi`, `pi-lens` — all mount and work as published, with no changes needed upstream.
|
|
71
73
|
|
|
72
74
|
### Roadmap
|
|
73
75
|
|
|
74
|
-
1.
|
|
76
|
+
1. ✅ Done: the 9 "mounts, not fully verified" lifted — 8 grade tested-working (credentialed fixtures, a real MCP stdio server, a live-agent probe path for userQuestions, Pi-config-dir settings, real child-`pi` dispatch, and two registry-semantics fixes in the bridge: providers keyed by `id`, and `getProviderAuth` running Pi's full credential chain instead of OAuth only); the 1 remaining is a pure event-hook package graded honestly as having no probeable surface.
|
|
75
77
|
2. ✅ Done: interactive OAuth host seam — Pi provider `oauth.login/refreshToken/getApiKey` flows run on DSH-native interaction, credentials persist with Pi's `auth.json` semantics with double-checked-lock refresh, and the four official Pi flows ship built in; verified end-to-end against a real ChatGPT Pro account (see "Interactive OAuth" above).
|
|
76
78
|
3. ✅ Done: all four Pi-internal-runtime packages bridged (see above) — every top-50 package mounts.
|
|
77
79
|
4. ✅ Done: the 2 snapshot-limited packages verified through host mode ([evidence](community/host-mode-results.json)).
|
|
78
|
-
5. ✅ Done:
|
|
80
|
+
5. ✅ Done: load-time vs lazy reachability screening landed; the five packages it unblocked all mount, four tested-working (see above).
|
|
79
81
|
|
|
80
82
|
## Quick start
|
|
81
83
|
|
|
@@ -127,17 +129,20 @@ Both layers are verified against a real ChatGPT Pro account: browser authorizati
|
|
|
127
129
|
| Sessions | Messages project from DSH's durable log; Pi custom entries/labels/names persist in a pi2dsh sidecar (DSH has no out-of-repo plugin-event channel yet) |
|
|
128
130
|
| Pi TUI | Pure logic vendored byte-identical; components construct headlessly; `ui.custom` resolves `undefined` exactly like Pi's own rpc mode |
|
|
129
131
|
| Providers/OAuth | Interactive OAuth is live: `/login <provider>` runs the package's own flow, credentials persist in Pi's `auth.json` with automatic refresh; model transports stay native to DSH `llm` |
|
|
132
|
+
| Model runtime | `modelRegistry` projects the live DSH llm directory as Pi Model objects (refreshed on `llm/adapters-updated`); `ctx.model` reflects the agent's real route; `setModel`/`setThinkingLevel` switch the loop through the `agent/request` waterfall; pi-ai `complete()`/`stream()` run REAL calls through `ctx.llm.stream()` with two-way message conversion (verified against a live model: `scripts/verify-model-bridge-e2e.mjs`) |
|
|
130
133
|
| Session tree writes | `fork`/`navigateTree`/`switchSession` fail explicitly (DSH lists pi-style entry trees as deferred) |
|
|
131
134
|
| Terminal decoration | footer/statusline/shortcuts register but never fire — matching Pi's own non-TUI modes |
|
|
132
135
|
|
|
133
|
-
Full machine-readable matrix: `pi2dsh matrix --json`. Capability-by-capability acceptance evidence: [docs/acceptance.md](docs/acceptance.md).
|
|
136
|
+
Full machine-readable matrix: `pi2dsh matrix --json`. Capability-by-capability acceptance evidence: [docs/acceptance.md](docs/acceptance.md). The complete 114-item Pi-surface → DSH-semantics verdict (3 red / 21 yellow / ~90 green): [docs/pi-abi-coverage.md](docs/pi-abi-coverage.md).
|
|
134
137
|
|
|
135
138
|
## Development and verification
|
|
136
139
|
|
|
137
140
|
```sh
|
|
138
|
-
pnpm verify # typecheck +
|
|
141
|
+
pnpm verify # typecheck + 55 contract tests + packaging
|
|
139
142
|
pnpm audit:community # static screening, top 50
|
|
140
143
|
node scripts/blackbox-community.mjs community/blackbox-results.json --exercise
|
|
144
|
+
# add DEEPSEEK_API_KEY=… PI2DSH_BLACKBOX_PI_BIN=$(command -v pi) for the
|
|
145
|
+
# credentialed probes and real child-pi dispatch (keys from env only)
|
|
141
146
|
pnpm test:community # deep runtime + official manager + host e2e
|
|
142
147
|
DEEPSEEK_API_KEY=… pnpm test:live # real-model acceptance (key from env only)
|
|
143
148
|
```
|
package/README.zh.md
CHANGED
|
@@ -45,7 +45,7 @@ DeepSeek Harness 原生服务(Cordis 组合)
|
|
|
45
45
|
保持通用性的三条硬规则:
|
|
46
46
|
|
|
47
47
|
1. 核心**没有任何 `if (packageName === …)`** 包名分支。
|
|
48
|
-
2. 每项能力有**公共 API 契约测试**(`pnpm test`,
|
|
48
|
+
2. 每项能力有**公共 API 契约测试**(`pnpm test`,55 个);"某个插件能加载"从不作为成功标准。
|
|
49
49
|
3. 前 50 只做**黑盒验收**:失败产生公共 ABI 缺口工单,修一个缺口、同类包一起解锁(例:一次 jiti 子路径 alias 修复同时解锁 4 个包)。
|
|
50
50
|
|
|
51
51
|
## 进度:Pi 官方目录下载量前 50
|
|
@@ -54,28 +54,30 @@ DeepSeek Harness 原生服务(Cordis 组合)
|
|
|
54
54
|
|
|
55
55
|
| 档位 | 数量 | 含义 |
|
|
56
56
|
|---|---|---|
|
|
57
|
-
| ✅ **已测可用** | **
|
|
58
|
-
| 🟡 **能接入、未全测** | **
|
|
57
|
+
| ✅ **已测可用** | **49 / 50** | 在真实 DSH runtime 挂载且**真实执行**验证:42 个成功返回,7 个业务逻辑端到端真跑(拒绝了合成探针参数);49 个中有 2 个经 host 模式验证。一路覆盖的真实服务包括:真 LSP 子进程、真搜索/抓取、PNG 真落盘、真 MCP stdio server 端到端桥接、真子 `pi` 进程派发并由真实模型应答、用真实凭证跑 DeepSeek 搜索、官方 `dsh plugin` 安装/激活/卸载全流程 |
|
|
58
|
+
| 🟡 **能接入、未全测** | **1 / 50** | `@alexanderfortin/pi-deepseek-usage`——纯事件钩子包:4 个生命周期订阅全部接上,但每个 handler 都以"当前在 DeepSeek 模型会话中"为门槛(它拉计费用量并渲染 footer),黑盒探针没有可安全触发并断言的调用面。这是探针方法论的边界,不是包或桥的缺口 |
|
|
59
59
|
| ❌ **尚未接入** | **0 / 50** | 最后 4 个 Pi 内部运行时包已全部桥接:内建工具构造器 vendored、provider 工厂、真语义 `ExtensionRunner` 门面、`createAgentSession` 驱动真实 DSH 子代理 |
|
|
60
60
|
| **今天即可挂载** | **50 / 50** | 48 个经 convert/host bundle 直接挂载;2 个快照受限包经 host 模式([证据](community/host-mode-results.json)) |
|
|
61
61
|
|
|
62
|
+
v6 版黑盒装置同时强化了探测方法论本身:桥自带的宿主固有面(例如内建的 `/login` 命令)通过挂载一个零贡献 fixture 扩展测出,并从每个包的探测面里扣除——档位只反映包自己的增量;不安全工具名筛查改为分词级匹配(`litellm_skill_list` 不是 "kill" 工具);fixture 环境提供真 MCP stdio server、LiteLLM 网关形状的 skills API、按 Pi config-dir 约定放置的图像模型配置,以及(经 `PI2DSH_BLACKBOX_PI_BIN` + `DEEPSEEK_API_KEY` 显式开启)由真实模型应答的子 `pi` 派发。
|
|
63
|
+
|
|
62
64
|
另有两层验证:**host bundle** 合装两个原样 Pi 包走完官方插件管理器全流程;**真实模型**(deepseek-v4-flash)调用迁移后的 Pi 工具,durable 会话日志逐项断言、凭证零落盘([证据](community/live-deepseek-results.json))。
|
|
63
65
|
|
|
64
66
|
### 最后 4 个内部运行时包是怎么桥接的
|
|
65
67
|
|
|
66
|
-
每个都落成了可复用的公共面桥,不是逐包补丁:`pi-landstrip` 与 `pi-fabric` 跑在 vendored 字节级的 Pi 内建工具构造器上(bash/read/edit/write/grep/find/ls 及其纯逻辑闭包);`pi-provider-litellm` 跑在 vendored 的 pi-ai `createProvider`
|
|
68
|
+
每个都落成了可复用的公共面桥,不是逐包补丁:`pi-landstrip` 与 `pi-fabric` 跑在 vendored 字节级的 Pi 内建工具构造器上(bash/read/edit/write/grep/find/ls 及其纯逻辑闭包);`pi-provider-litellm` 跑在 vendored 的 pi-ai `createProvider` 工厂上——provider 按 `id` 入注册表,注册表的 `getProviderAuth` 跑 Pi 完整凭证链(已存 OAuth → 已存 key → 包自己的环境变量解析),模型传输始终归 DSH llm 原生;`pi-fabric` 另挂真语义 `ExtensionRunner` 门面——patch `prototype.getAllRegisteredTools` 能真实过滤工具目录,与 Pi 下行为一致;`@tintinweb/pi-subagents` 跑在 `createAgentSession` → 真实 DSH 子代理桥上(经 `ctx.agents` 走宿主 loop 工厂)——桥不自带模型循环,无 loop 的组合显式失败,绝不假装跑了子代理。
|
|
67
69
|
|
|
68
|
-
###
|
|
70
|
+
### 筛查器如何判定兼容性
|
|
69
71
|
|
|
70
|
-
|
|
72
|
+
筛查器区分**加载期与惰性可达**:只有加载期静态闭包上解析不了的依赖才会阻断一个包——函数体内的动态 import、仅经动态 import 可达的文件、worker/数据资源都是惰性路径,与 Pi 下行为完全一致,只标记为可审阅、绝不判死。`bun:*` 与 `node:*` 同等对待(Pi 官方发行版是 Bun 编译二进制的宿主内建),快照逐字节保留发布文件布局。这些规则有契约测试钉着;在这套规则下,混用 Bun 分支、可选重依赖、打包器生成 worker 路径的包——`pi-hermes-memory`、`@mjasnikovs/pi-task`、`pi-harness-runtime`、`mitsupi`、`pi-lens`——全部按发布原样挂载可用,上游无需任何改动。
|
|
71
73
|
|
|
72
74
|
### 路线图
|
|
73
75
|
|
|
74
|
-
1.
|
|
76
|
+
1. ✅ 已完成:9 个"能接入、未全测"提级——8 个达到已测可用(带凭证的 fixture、真 MCP stdio server、userQuestions 的 live agent 探针链路、Pi config-dir 配置、真子 `pi` 派发,外加桥内两处注册表语义修正:provider 按 `id` 入表、`getProviderAuth` 跑 Pi 完整凭证链而非仅 OAuth);剩下 1 个是纯事件钩子包,如实定档为无可探测面。
|
|
75
77
|
2. ✅ 已完成:交互式 OAuth host seam——Pi provider 的 `oauth.login/refreshToken/getApiKey` 流跑在 DSH 原生交互上,凭证按 Pi `auth.json` 语义持久化并带双检锁刷新,四条官方流内建;已用真实 ChatGPT Pro 账号端到端验证(见上文"交互式 OAuth")。
|
|
76
78
|
3. ✅ 已完成:4 个 Pi 内部运行时包全部桥接(见上)——前 50 全部可挂载。
|
|
77
79
|
4. ✅ 已完成:2 个快照受限包经 host 模式实测通过([证据](community/host-mode-results.json))。
|
|
78
|
-
5. ✅
|
|
80
|
+
5. ✅ 已完成:加载期/惰性可达筛查规则落地;由此解锁的 5 个包全部可挂载、4 个已测可用(见上)。
|
|
79
81
|
|
|
80
82
|
## 快速开始
|
|
81
83
|
|
|
@@ -127,17 +129,20 @@ DSH 原生只有静态 HTTP headers;pi2dsh 把 Pi 生态的交互式 OAuth 层
|
|
|
127
129
|
| 会话 | 消息从 DSH durable 日志投影;Pi 自定义 entry/label/name 持久化在 pi2dsh sidecar(DSH 目前没有第三方插件事件通道) |
|
|
128
130
|
| Pi TUI | 纯逻辑 vendored 字节一致;组件类同签名 headless 构造;`ui.custom` 与 Pi 官方 rpc 模式一样返回 undefined |
|
|
129
131
|
| Provider/OAuth | 交互式 OAuth 已可用:`/login <provider>` 跑包自己的流程,凭证按 Pi `auth.json` 持久化并自动刷新;模型传输仍由 DSH `llm` 原生持有 |
|
|
132
|
+
| 模型运行时 | `modelRegistry` 把 DSH llm 实时目录投影为 Pi Model 对象(`llm/adapters-updated` 时刷新);`ctx.model` 反映 agent 真实路由;`setModel`/`setThinkingLevel` 经 `agent/request` waterfall 真切换 loop;pi-ai `complete()`/`stream()` 经 `ctx.llm.stream()` 发起**真实**模型调用并双向转换消息(已对真实模型验证:`scripts/verify-model-bridge-e2e.mjs`) |
|
|
130
133
|
| 会话树写操作 | `fork`/`navigateTree`/`switchSession` 显式失败(DSH 官方将 pi 式 entry tree 列为 deferred) |
|
|
131
134
|
| 终端装饰 | footer/statusline/快捷键注册成功但永不触发——与 Pi 自己的非 TUI 模式一致 |
|
|
132
135
|
|
|
133
|
-
完整机器可读矩阵:`pi2dsh matrix --json`。十项能力逐项验收证据:[docs/acceptance.md](docs/acceptance.md)。
|
|
136
|
+
完整机器可读矩阵:`pi2dsh matrix --json`。十项能力逐项验收证据:[docs/acceptance.md](docs/acceptance.md)。114 项 Pi 暴露面 → DSH 语义完整判决(红 3 / 黄 21 / 绿约 90):[docs/pi-abi-coverage.md](docs/pi-abi-coverage.md)。
|
|
134
137
|
|
|
135
138
|
## 开发与验证
|
|
136
139
|
|
|
137
140
|
```sh
|
|
138
|
-
pnpm verify # 类型检查 +
|
|
141
|
+
pnpm verify # 类型检查 + 55 契约测试 + 打包检查
|
|
139
142
|
pnpm audit:community # 前 50 静态筛查
|
|
140
143
|
node scripts/blackbox-community.mjs community/blackbox-results.json --exercise
|
|
144
|
+
# 前缀 DEEPSEEK_API_KEY=… PI2DSH_BLACKBOX_PI_BIN=$(command -v pi) 可开启
|
|
145
|
+
# 带凭证探测与真子 pi 派发(key 仅从环境读)
|
|
141
146
|
pnpm test:community # 深链路 + 官方插件管理器 + host e2e
|
|
142
147
|
DEEPSEEK_API_KEY=… pnpm test:live # 真实模型验收(key 仅从环境读)
|
|
143
148
|
```
|