feat(gui): dsh-client-hmr reload driver and the dshClient-discovered watch-build script

client-hmr is a normal plugin package composed into dev graphs only. It
listens on /plugins/events and reloads one plugin per rebuilt frame,
serialized: invalidate, prefetch (fresh factory registers while the old
fiber still serves), registry.delete before touching the fiber, drain
disposers, drop owned style tags, entry.refresh(), fiber.await() loud.
Dependency cascade costs zero client code — fiber activation epochs
re-load dependents through cordis itself. Reload is coarse by design;
no rollback in v1; self-reload works with a frame gap the next rebuild
heals.

scripts/dev-web.ts (pnpm run dev:web) is the convenience watch-build:
it discovers its package list by scanning packages/*/*/package.json for
dshClient platform "web" at startup — no hardcoded roster — and talks
no protocol to the host. Gate bookkeeping rides along: knip entries for
the new packages, README model-experience allowlist rows.
This commit is contained in:
imccyu
2026-07-23 21:56:39 +08:00
parent fb47f61a83
commit 6512e57047
12 changed files with 549 additions and 76 deletions

View File

@@ -18,7 +18,8 @@
"workspaces": {
".": {
"entry": [
"scripts/**/*.mjs"
"scripts/**/*.mjs",
"scripts/dev-web.ts"
],
"project": [
"scripts/**/*.ts",
@@ -66,15 +67,11 @@
},
"packages/host/runtime": {
"entry": [
"tests/**/*.spec.ts",
"tests/**/*.e2e.ts"
"tests/**/*.spec.ts"
],
"project": [
"src/**/*.ts",
"tests/**/*.ts"
],
"ignoreDependencies": [
"@deepseek-ai/dsh-client-.+"
]
},
"packages/client/web-ui": {
@@ -391,8 +388,14 @@
]
},
"packages/examples/agent-spine-demo": {
"entry": ["tests/**/*.spec.ts", "tests/**/*.e2e.ts"],
"project": ["src/**/*.ts", "tests/**/*.ts"]
"entry": [
"tests/**/*.spec.ts",
"tests/**/*.e2e.ts"
],
"project": [
"src/**/*.ts",
"tests/**/*.ts"
]
},
"packages/ui/jsonrpc": {
"entry": [
@@ -548,15 +551,15 @@
"tests/**/*.tsx"
],
"ignoreDependencies": [
"@deepseek-ai/dsh-client-ui-theme",
"@deepseek-ai/dsh-client-connection"
"@deepseek-ai/dsh-client-ui-theme"
]
},
"apps/web": {
"entry": [
"tests/**/*.e2e.ts",
"tests/**/*.snapshot.ts",
"tests/support.ts"
"tests/support.ts",
"src/node-module-stub.ts"
],
"project": [
"src/**/*.ts",
@@ -571,6 +574,24 @@
"react",
"react-dom"
]
},
"apps/cli": {
"project": [
"src/**/*.ts"
],
"ignoreDependencies": [
"@deepseek-ai/dsh-client-.+"
]
},
"packages/client/modules": {
"project": [
"src/**/*.ts"
]
},
"packages/client/hmr": {
"project": [
"src/**/*.ts"
]
}
}
}