dsh-router-core 0.3.18 → 0.3.20
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 +1 -1
- package/lib/client-registry.js +449 -125
- package/lib/client.js +449 -125
- package/lib/index.js +243 -102
- package/lib/suppliers/opencode.js +103 -19
- package/lib/types/ext/contract.d.ts +11 -0
- package/lib/types/llm/adapter.d.ts +7 -1
- package/lib/types/shared.d.ts +19 -0
- package/package.json +1 -1
- package/src/client/ExtDetail.tsx +257 -0
- package/src/client/ExtTab.tsx +38 -38
- package/src/client/router.css +28 -0
- package/src/ext/contract.ts +11 -0
- package/src/index.ts +29 -0
- package/src/llm/adapter.test.ts +82 -0
- package/src/llm/adapter.ts +66 -9
- package/src/router/disconnect-leak.test.ts +200 -0
- package/src/router/index.ts +65 -9
- package/src/router/usage-tokens.ts +13 -3
- package/src/shared.ts +21 -0
- package/src/suppliers/opencode/plugin.test.ts +176 -0
- package/src/suppliers/opencode/plugin.ts +103 -21
package/README.md
CHANGED
|
@@ -193,7 +193,7 @@ curl -X POST http://localhost:3080/v1/chat/completions \
|
|
|
193
193
|
│ (usage 经 toTokenUsage 转 DSH 契约,见 docs/suppliers.md)
|
|
194
194
|
├─ KeysStore(src/keys.ts) 密钥库 + requireApiKey
|
|
195
195
|
└─ Router(路由器) → suppliers[]
|
|
196
|
-
├─ OpenCodeSupplier(lib/suppliers/opencode.js)
|
|
196
|
+
├─ OpenCodeSupplier(lib/suppliers/opencode.js) 无账号直连(Zen 免费档,需 CLI 握手)
|
|
197
197
|
├─ OpenRouterSupplier(lib/suppliers/openrouter.js) API key 账号
|
|
198
198
|
└─ NvidiaSupplier(lib/suppliers/nvidia.js) API key 账号
|
|
199
199
|
└─ 外部插件供应商(经 router.suppliers service 注册)
|