@try-works/dsh-minimal-router 0.0.0-stage → 0.1.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/LICENSE +1 -0
- package/README.md +69 -2
- package/client/index.js +69905 -0
- package/cordis.patch.yml +147 -0
- package/lib/backend.js +14 -0
- package/lib/build-id.js +4 -0
- package/lib/capability-sync.js +27 -0
- package/lib/engine-adapter.js +451 -0
- package/lib/evidence.js +1016 -0
- package/lib/host.js +551 -0
- package/lib/index.js +1916 -0
- package/lib/route-application.js +766 -0
- package/lib/routing.js +847 -0
- package/lib/settings-route.js +52 -0
- package/lib/settings-store.js +770 -0
- package/lib/summariser.js +157 -0
- package/lib/telemetry.js +993 -0
- package/lib/tool-result-pruner.js +224 -0
- package/package.json +38 -4
package/LICENSE
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
UNLICENSED — internal DSH plugin. Not for redistribution.
|
package/README.md
CHANGED
|
@@ -1,3 +1,70 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @dsh-local-router/plugin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
DSH local router: per-session auto-routing between a local engine (oMLX today)
|
|
4
|
+
and remote providers, with evidence pages (Models, Routing, Activity, Engine)
|
|
5
|
+
and a plugin-owned **engine** provider that lists and calls the engine's served
|
|
6
|
+
models without any provider or model configuration.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
From a packed tarball:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
cd packages/plugin
|
|
14
|
+
pnpm pack --pack-destination /tmp # produces dsh-local-router-plugin-0.1.0.tgz
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Add it to a DSH profile's `package.json` (replace the path with your tarball):
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"dependencies": { "@dsh-local-router/plugin": "file:/tmp/dsh-local-router-plugin-0.1.0.tgz" },
|
|
22
|
+
"dsh": { "profile": { "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "@dsh-local-router/plugin"] } }
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
or from a checkout: `"@dsh-local-router/plugin": "file:/absolute/path/to/packages/plugin"`.
|
|
27
|
+
|
|
28
|
+
Install the profile dependencies the same way DSH does (`pnpm install` in the
|
|
29
|
+
profile directory), then start DSH with that profile.
|
|
30
|
+
|
|
31
|
+
## Verify
|
|
32
|
+
|
|
33
|
+
1. Open DSH web and check the sidebar entry **Router** and the five tabs
|
|
34
|
+
(Overview, Models, Routing, Activity, Engine).
|
|
35
|
+
2. `GET /api/router/health` returns `ok: true` and a backend kind.
|
|
36
|
+
3. `GET /api/router/engine-provider` returns `registered: true` and the models the
|
|
37
|
+
connected engine serves.
|
|
38
|
+
4. In the composer model menu, **Auto routing** appears per session; enabling it
|
|
39
|
+
lets the router select a local engine model.
|
|
40
|
+
|
|
41
|
+
## Configuration
|
|
42
|
+
|
|
43
|
+
- **Engine endpoint/key**: Router → Engine tab (Connection), saved through
|
|
44
|
+
`POST /api/router/engine`.
|
|
45
|
+
- **Policy**: Router → Settings (floor tps, main model) or the `router_policy` tool.
|
|
46
|
+
- **Local selection provider** defaults to `engine`; a profile that pins
|
|
47
|
+
`localProvider` keeps that DSH-owned provider.
|
|
48
|
+
|
|
49
|
+
## Uninstall
|
|
50
|
+
|
|
51
|
+
Remove **both** install entries from the profile `package.json`: the
|
|
52
|
+
`@dsh-local-router/plugin` dependency **and** its entry in
|
|
53
|
+
`dsh.profile.bundles` (a leftover bundle entry makes the profile fail to
|
|
54
|
+
resolve). Run the profile install again and restart DSH; delete the `Router`
|
|
55
|
+
settings state if desired.
|
|
56
|
+
|
|
57
|
+
## Optional deploy
|
|
58
|
+
|
|
59
|
+
**Not designed and not executed in this release.** There is no deploy package
|
|
60
|
+
and no recipe here; a deploy would require creating `packages/deploy` with an
|
|
61
|
+
Alchemy stack (account, stack name, credentials) as a separate decision. Do not
|
|
62
|
+
infer a deploy path from this README.
|
|
63
|
+
|
|
64
|
+
## Development
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
node scripts/build-client.mjs # rebuild packages/plugin/client/index.js
|
|
68
|
+
pnpm test # node --test suites
|
|
69
|
+
pnpm typecheck
|
|
70
|
+
```
|