pi2dsh 0.6.1 → 0.8.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.
@@ -18,12 +18,17 @@ declare function normalizeToolSchema(schema: unknown): {
18
18
  warnings: string[];
19
19
  };
20
20
  /**
21
- * Load models.json routes for a host with NO mounted Pi package yet — the
22
- * single-directory capability (custom providers + image-admission
23
- * companions in the DSH picker) is the bridge's own, not any plugin's.
24
- * A later package mount adopts the same shared snapshot.
21
+ * Image-admission companion routes, configured on the DSH side (the
22
+ * engine's or a bundle's cordis config): `{ <existingRoute>: [modelIds] }`
23
+ * registers a `<route>-vision` route that admits images at the host's
24
+ * admission checks, replaces image blocks with explicit path-carrying
25
+ * notices, and forwards text-only to the original route. The companion is
26
+ * an ordinary directory entry (single-directory contract); Pi's ctx.model
27
+ * reports the original route for it (companionRoutes). Idempotent per
28
+ * host: repeated calls (several packages, engine + bundle) keep one live
29
+ * adapter and one mapping.
25
30
  */
26
- declare function ensureModelsJsonRoutes(ctx: Context): Promise<void>;
31
+ declare function registerVisionCompanions(ctx: Context, companions: Record<string, readonly string[]> | undefined): void;
27
32
  declare function splitArguments(input: string): string[];
28
33
  declare function expandPrompt(text: string, rawInput: string): string;
29
34
  declare function applyPiPackage(ctx: Context, options: RuntimeOptions): Promise<void>;
@@ -34,5 +39,5 @@ declare const runtimeInternals: {
34
39
  textBlocks: typeof textBlocks;
35
40
  };
36
41
  //#endregion
37
- export { applyPiPackage, ensureModelsJsonRoutes, normalizeToolSchema, runtimeInternals };
42
+ export { applyPiPackage, normalizeToolSchema, registerVisionCompanions, runtimeInternals };
38
43
  //# sourceMappingURL=runtime.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.mts","names":[],"sources":["../src/runtime.ts"],"mappings":";;;;KAyCK,gBAAgB;UAGX;EACR,SAAS;EACT,UAAU;EACV,SAAS;;iBA4JF,WAAW,mBAAmB;EAAQ;EAAc;;iBAcpD,oBAAoB,kBAAkB;iBAuH/B,oBAAoB;EAAoB,QAAQ;EAAe;;;;;;;;iBAigCzD,uBAAuB,KAAK,UAAU;iBAkqBnD,eAAe;iBA+Bf,aAAa,cAAc;iBAuHd,eAAe,KAAK,SAAS,SAAS,iBAAiB;cA6HhE"}
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;;;;;;;;;;;;;iBAm9B/D,yBACd,KAAK,SACL,YAAY;iBA8lBL,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 ensureModelsJsonRoutes, r as normalizeToolSchema, t as applyPiPackage } from "./runtime-CPvg87et.mjs";
3
- export { applyPiPackage, ensureModelsJsonRoutes, normalizeToolSchema, runtimeInternals };
2
+ import { i as runtimeInternals, n as normalizeToolSchema, r as registerVisionCompanions, t as applyPiPackage } from "./runtime-B-Mun-jX.mjs";
3
+ export { applyPiPackage, normalizeToolSchema, registerVisionCompanions, runtimeInternals };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi2dsh",
3
- "version": "0.6.1",
3
+ "version": "0.8.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,9 +84,8 @@
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
- "@earendil-works/pi-ai": "^0.84.1"
88
+ "openai": "^6.40.0"
90
89
  },
91
90
  "peerDependencies": {
92
91
  "@deepseek-ai/cordis": "^4.0.1",
@@ -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": {