pi2dsh 0.7.0 → 0.9.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 +5 -2
- package/README.zh.md +4 -2
- package/dist/analyzer-C86ba-27.mjs +626 -0
- package/dist/analyzer-C86ba-27.mjs.map +1 -0
- package/dist/cli.mjs +3 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/compat/pi-ai.d.mts +1 -11
- package/dist/compat/pi-ai.d.mts.map +1 -1
- package/dist/compat/pi-ai.mjs +2 -2
- package/dist/credentials-oauth.mjs +1 -1
- package/dist/generator-C0jNM-yu.mjs +298 -0
- package/dist/generator-C0jNM-yu.mjs.map +1 -0
- package/dist/host.d.mts +2 -0
- package/dist/host.d.mts.map +1 -1
- package/dist/host.mjs +2 -1
- package/dist/host.mjs.map +1 -1
- package/dist/index.d.mts +29 -10
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +27 -4
- package/dist/index.mjs.map +1 -1
- package/dist/mcp-config-Dlou-ZA-.mjs +707 -0
- package/dist/mcp-config-Dlou-ZA-.mjs.map +1 -0
- package/dist/{pi-ai-B4hucafU.mjs → pi-ai-BA3h0Dwv.mjs} +2 -84
- package/dist/pi-ai-BA3h0Dwv.mjs.map +1 -0
- package/dist/{runtime-k3IlCgjQ.mjs → runtime-DMEJknhK.mjs} +115 -960
- package/dist/runtime-DMEJknhK.mjs.map +1 -0
- package/dist/runtime.d.mts +19 -6
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +2 -2
- package/package.json +6 -3
- package/dist/all-BChhwMVE.mjs +0 -28512
- package/dist/all-BChhwMVE.mjs.map +0 -1
- package/dist/anthropic-messages-Dlw4T0S4.mjs +0 -6438
- package/dist/anthropic-messages-Dlw4T0S4.mjs.map +0 -1
- package/dist/azure-openai-responses-vGUNukZ7.mjs +0 -209
- package/dist/azure-openai-responses-vGUNukZ7.mjs.map +0 -1
- package/dist/deferred-tools-BD4g5QUx.mjs +0 -32
- package/dist/deferred-tools-BD4g5QUx.mjs.map +0 -1
- package/dist/diagnostics-CJye1UFh.mjs +0 -99
- package/dist/diagnostics-CJye1UFh.mjs.map +0 -1
- package/dist/dist-DY2GeEQ6.mjs +0 -1089
- package/dist/dist-DY2GeEQ6.mjs.map +0 -1
- package/dist/dist-DYfTHu0C.mjs +0 -1246
- package/dist/dist-DYfTHu0C.mjs.map +0 -1
- package/dist/error-body-DKA3lknR.mjs +0 -104
- package/dist/error-body-DKA3lknR.mjs.map +0 -1
- package/dist/github-copilot-headers-CZo2QHrt.mjs +0 -25
- package/dist/github-copilot-headers-CZo2QHrt.mjs.map +0 -1
- package/dist/google-generative-ai-C30gRjRi.mjs +0 -358
- package/dist/google-generative-ai-C30gRjRi.mjs.map +0 -1
- package/dist/google-shared-W8g3Esep.mjs +0 -29042
- package/dist/google-shared-W8g3Esep.mjs.map +0 -1
- package/dist/google-vertex--O_gyVYA.mjs +0 -402
- package/dist/google-vertex--O_gyVYA.mjs.map +0 -1
- package/dist/hash-Dbggamac.mjs +0 -19
- package/dist/hash-Dbggamac.mjs.map +0 -1
- package/dist/headers-CPzZhJQn.mjs +0 -17
- package/dist/headers-CPzZhJQn.mjs.map +0 -1
- package/dist/images-models-DJtHo9Rp.mjs +0 -1068
- package/dist/images-models-DJtHo9Rp.mjs.map +0 -1
- package/dist/json-parse-C-vG4_qc.mjs +0 -384
- package/dist/json-parse-C-vG4_qc.mjs.map +0 -1
- package/dist/mcp-config-Cful6uUS.mjs +0 -1618
- package/dist/mcp-config-Cful6uUS.mjs.map +0 -1
- package/dist/mistral-conversations-LSDG9sjq.mjs +0 -42007
- package/dist/mistral-conversations-LSDG9sjq.mjs.map +0 -1
- package/dist/multipart-parser-CoM3rwav.mjs +0 -301
- package/dist/multipart-parser-CoM3rwav.mjs.map +0 -1
- package/dist/openai-codex-responses-JxII_OUX.mjs +0 -1169
- package/dist/openai-codex-responses-JxII_OUX.mjs.map +0 -1
- package/dist/openai-completions-Dp-VwLzJ.mjs +0 -947
- package/dist/openai-completions-Dp-VwLzJ.mjs.map +0 -1
- package/dist/openai-completions-lite-BrM7gJzs.mjs +0 -316
- package/dist/openai-completions-lite-BrM7gJzs.mjs.map +0 -1
- package/dist/openai-prompt-cache-BDWtZRKh.mjs +0 -11
- package/dist/openai-prompt-cache-BDWtZRKh.mjs.map +0 -1
- package/dist/openai-responses-CWmNks8K.mjs +0 -247
- package/dist/openai-responses-CWmNks8K.mjs.map +0 -1
- package/dist/openai-responses-shared-CYgIDTf3.mjs +0 -572
- package/dist/openai-responses-shared-CYgIDTf3.mjs.map +0 -1
- package/dist/openrouter-images-DfAULV7l.mjs +0 -127
- package/dist/openrouter-images-DfAULV7l.mjs.map +0 -1
- package/dist/otel-Boafyju5.mjs +0 -24935
- package/dist/otel-Boafyju5.mjs.map +0 -1
- package/dist/pi-ai-B4hucafU.mjs.map +0 -1
- package/dist/pi-messages-HzGtvc5_.mjs +0 -306
- package/dist/pi-messages-HzGtvc5_.mjs.map +0 -1
- package/dist/provider-env-C9gOBFJi.mjs +0 -40
- package/dist/provider-env-C9gOBFJi.mjs.map +0 -1
- package/dist/provider-retry-Cw6YJ4cr.mjs +0 -80
- package/dist/provider-retry-Cw6YJ4cr.mjs.map +0 -1
- package/dist/runtime-k3IlCgjQ.mjs.map +0 -1
- package/dist/sanitize-unicode-wLA11KvZ.mjs +0 -29
- package/dist/sanitize-unicode-wLA11KvZ.mjs.map +0 -1
- package/dist/src-D0GRWCE8.mjs +0 -5031
- package/dist/src-D0GRWCE8.mjs.map +0 -1
- package/dist/transform-messages-DGq9mvhA.mjs +0 -379
- package/dist/transform-messages-DGq9mvhA.mjs.map +0 -1
- package/dist/uuid-DtFT7tOE.mjs +0 -65
- package/dist/uuid-DtFT7tOE.mjs.map +0 -1
package/dist/runtime.d.mts
CHANGED
|
@@ -17,13 +17,26 @@ declare function normalizeToolSchema(schema: unknown): {
|
|
|
17
17
|
schema: UnknownRecord;
|
|
18
18
|
warnings: string[];
|
|
19
19
|
};
|
|
20
|
+
/** Companion configuration: default (auto), `false` (off), or an explicit narrow map. */
|
|
21
|
+
type VisionCompanionsConfig = false | Record<string, readonly string[]> | undefined;
|
|
20
22
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
23
|
+
* Image-admission companion routes: for every text-only route in the DSH
|
|
24
|
+
* llm directory, a `<route>-vision` route that admits images at the host's
|
|
25
|
+
* admission checks, replaces image blocks with explicit path-carrying
|
|
26
|
+
* notices, and forwards text-only to the original route. What happens to
|
|
27
|
+
* an admitted image is decided at run time by whatever is mounted — a
|
|
28
|
+
* vision extension analyzes it through the turn's entering messages, and
|
|
29
|
+
* without one the notice's file path lets any image-capable tool read it —
|
|
30
|
+
* so companions need no knowledge of any particular plugin and are
|
|
31
|
+
* registered AUTOMATICALLY (zero configuration). `visionCompanions: false`
|
|
32
|
+
* turns them off; an explicit `{ <route>: [modelIds] }` map narrows them.
|
|
33
|
+
* The directory is live: adapters-updated re-sweeps, adding companions for
|
|
34
|
+
* new text-only routes and disposing companions whose original vanished.
|
|
35
|
+
* The companion is an ordinary directory entry (single-directory
|
|
36
|
+
* contract); Pi's ctx.model reports the original route for it
|
|
37
|
+
* (companionRoutes). Idempotent per host.
|
|
25
38
|
*/
|
|
26
|
-
declare function
|
|
39
|
+
declare function registerVisionCompanions(ctx: Context, config: VisionCompanionsConfig): void;
|
|
27
40
|
declare function splitArguments(input: string): string[];
|
|
28
41
|
declare function expandPrompt(text: string, rawInput: string): string;
|
|
29
42
|
declare function applyPiPackage(ctx: Context, options: RuntimeOptions): Promise<void>;
|
|
@@ -34,5 +47,5 @@ declare const runtimeInternals: {
|
|
|
34
47
|
textBlocks: typeof textBlocks;
|
|
35
48
|
};
|
|
36
49
|
//#endregion
|
|
37
|
-
export {
|
|
50
|
+
export { VisionCompanionsConfig, applyPiPackage, normalizeToolSchema, registerVisionCompanions, runtimeInternals };
|
|
38
51
|
//# sourceMappingURL=runtime.d.mts.map
|
package/dist/runtime.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.mts","names":[],"sources":["../src/runtime.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"runtime.d.mts","names":[],"sources":["../src/runtime.ts"],"mappings":";;;;KAiCK,gBAAgB;UAGX;EACR,SAAS;EACT,UAAU;EACV,SAAS;;iBAsJF,WAAW,mBAAmB;EAAQ;EAAc;;iBAcpD,oBAAoB,kBAAkB;iBAuH/B,oBAAoB;EAAoB,QAAQ;EAAe;;;KA08BnE,iCAAiC;;;;;;;;;;;;;;;;;;iBAmB7B,yBAAyB,KAAK,SAAS,QAAQ;iBAopBtD,eAAe;iBA+Bf,aAAa,cAAc;iBAuHd,eAAe,KAAK,SAAS,SAAS,iBAAiB;cA0HhE"}
|
package/dist/runtime.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { i as runtimeInternals, n as
|
|
3
|
-
export { applyPiPackage,
|
|
2
|
+
import { i as runtimeInternals, n as normalizeToolSchema, r as registerVisionCompanions, t as applyPiPackage } from "./runtime-DMEJknhK.mjs";
|
|
3
|
+
export { applyPiPackage, normalizeToolSchema, registerVisionCompanions, runtimeInternals };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi2dsh",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Bridge the Pi and DeepSeek Harness ecosystems: a general Pi Host ABI that runs unmodified Pi extensions as native DSH plugins, plus per-package conversion and MCP config translation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -84,7 +84,6 @@
|
|
|
84
84
|
"pacote": "^21.0.0",
|
|
85
85
|
"tinyglobby": "^0.2.15",
|
|
86
86
|
"typebox": "^1.0.4",
|
|
87
|
-
"typescript": "^5.9.3",
|
|
88
87
|
"yaml": "^2.8.1",
|
|
89
88
|
"openai": "^6.40.0"
|
|
90
89
|
},
|
|
@@ -97,7 +96,8 @@
|
|
|
97
96
|
"@deepseek-ai/dsh-subprocess": "^0.1.0-rc.6",
|
|
98
97
|
"@deepseek-ai/dsh-system-prompt": "^0.1.0-rc.6",
|
|
99
98
|
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
|
|
100
|
-
"@deepseek-ai/dsh-user-questions": "^0.1.0-rc.6"
|
|
99
|
+
"@deepseek-ai/dsh-user-questions": "^0.1.0-rc.6",
|
|
100
|
+
"typescript": "^5"
|
|
101
101
|
},
|
|
102
102
|
"peerDependenciesMeta": {
|
|
103
103
|
"@deepseek-ai/dsh-commands": {
|
|
@@ -114,6 +114,9 @@
|
|
|
114
114
|
},
|
|
115
115
|
"@deepseek-ai/dsh-user-questions": {
|
|
116
116
|
"optional": true
|
|
117
|
+
},
|
|
118
|
+
"typescript": {
|
|
119
|
+
"optional": true
|
|
117
120
|
}
|
|
118
121
|
},
|
|
119
122
|
"devDependencies": {
|