From 3a4232a8fa5dfae2d409132a01f0dc2dcd9fca7d Mon Sep 17 00:00:00 2001 From: _Kerman Date: Thu, 20 Aug 2026 13:56:23 +0800 Subject: [PATCH] fix(bundle): promote the storage stack and the projection cache to base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The storage hub, json backend, and domain form are general infrastructure, and the projection cache is a session-layer service that depends on them — both belong in the shared base, not in the web overlay. Base now provides storage / storage-json / storage-domain / session-projection-cache; the web-app overlay keeps its surface consumers (workspace, message-feedback), which inherit storageDomain from base (a child layer sees parent services). This reverts the storage stack's historical web-app-only placement and the file-root design's base mount of the cache. --- packages/bundle/base/cordis.patch.yml | 27 ++++++++++++++++++++++++ packages/bundle/base/package.json | 4 ++++ packages/bundle/web-app/cordis.patch.yml | 19 ----------------- packages/bundle/web-app/package.json | 4 ---- pnpm-lock.yaml | 24 ++++++++++----------- 5 files changed, 43 insertions(+), 35 deletions(-) diff --git a/packages/bundle/base/cordis.patch.yml b/packages/bundle/base/cordis.patch.yml index e9567d9206..c2fc543db6 100644 --- a/packages/bundle/base/cordis.patch.yml +++ b/packages/bundle/base/cordis.patch.yml @@ -126,6 +126,33 @@ - id: session-projection name: '@deepseek-ai/dsh-session-projection' + # Durable KV storage: the storage hub, the json backend, and the + # schema-validated domain form over them. Session-layer persistence (the + # projection cache below; workspace and message-feedback in web layers) + # routes through this stack, so it belongs to the shared base. + - id: storage + name: '@deepseek-ai/dsh-storage' + + - id: storage-json + name: '@deepseek-ai/dsh-storage-json' + config: + root: !!js dshHomePath('storages') + + - id: storage-domain + name: '@deepseek-ai/dsh-storage-domain' + config: + backend: json + + # Persisted projection cache: throttled write-behind over the + # session_projcache domain (per-record layout — one version-stamped + # checkpoint document per session), serving the session listing's + # projection column. + - id: session-projection-cache + name: '@deepseek-ai/dsh-session-projection-cache' + config: + writeEveryEvents: 200 + writeIntervalMs: 5000 + # Session telemetry is mounted but disabled by default. DSH_TELEMETRY_MODE # explicitly opts into FULL or FEEDBACK_ONLY reporting; uploading mirrors # session-log records onto OTLP/HTTP logs with no session-telemetry/record redaction diff --git a/packages/bundle/base/package.json b/packages/bundle/base/package.json index 62350bbc11..e87dcf7cbd 100644 --- a/packages/bundle/base/package.json +++ b/packages/bundle/base/package.json @@ -74,6 +74,7 @@ "@deepseek-ai/dsh-session-checkpoint-policy": "workspace:^", "@deepseek-ai/dsh-session-persistence-jsonl": "workspace:^", "@deepseek-ai/dsh-session-projection": "workspace:^", + "@deepseek-ai/dsh-session-projection-cache": "workspace:^", "@deepseek-ai/dsh-session-query-sqlite": "workspace:^", "@deepseek-ai/dsh-session-telemetry-otel": "workspace:^", "@deepseek-ai/dsh-session-title": "workspace:^", @@ -84,6 +85,9 @@ "@deepseek-ai/dsh-skill-filesystem": "workspace:^", "@deepseek-ai/dsh-spill-local": "workspace:^", "@deepseek-ai/dsh-spill-policy": "workspace:^", + "@deepseek-ai/dsh-storage": "workspace:^", + "@deepseek-ai/dsh-storage-domain": "workspace:^", + "@deepseek-ai/dsh-storage-json": "workspace:^", "@deepseek-ai/dsh-subagent": "workspace:^", "@deepseek-ai/dsh-subagent-fork-in-process": "workspace:^", "@deepseek-ai/dsh-subagent-spawn-in-process": "workspace:^", diff --git a/packages/bundle/web-app/cordis.patch.yml b/packages/bundle/web-app/cordis.patch.yml index 203f8ff017..06baa7fe17 100644 --- a/packages/bundle/web-app/cordis.patch.yml +++ b/packages/bundle/web-app/cordis.patch.yml @@ -48,19 +48,6 @@ - id: code-runtime name: '@deepseek-ai/dsh-code-runtime-worker-thread' - - id: storage - name: '@deepseek-ai/dsh-storage' - - - id: storage-json - name: '@deepseek-ai/dsh-storage-json' - config: - root: !!js dshHomePath('storages') - - - id: storage-domain - name: '@deepseek-ai/dsh-storage-domain' - config: - backend: json - - id: message-feedback name: '@deepseek-ai/dsh-message-feedback' config: @@ -73,12 +60,6 @@ - id: workspace name: '@deepseek-ai/dsh-workspace' - - id: session-projection-cache - name: '@deepseek-ai/dsh-session-projection-cache' - config: - writeEveryEvents: 200 - writeIntervalMs: 5000 - # Whole-log turn/step counts for the chat stats strip (the sessionStats # projection key); the projection registry itself is a base-layer row. - id: session-stats diff --git a/packages/bundle/web-app/package.json b/packages/bundle/web-app/package.json index 3cf68746c0..18f7c3143b 100644 --- a/packages/bundle/web-app/package.json +++ b/packages/bundle/web-app/package.json @@ -96,12 +96,8 @@ "@deepseek-ai/dsh-host-plugin-inventory": "workspace:^", "@deepseek-ai/dsh-host-webserver": "workspace:^", "@deepseek-ai/dsh-message-feedback": "workspace:^", - "@deepseek-ai/dsh-session-projection-cache": "workspace:^", "@deepseek-ai/dsh-session-log-export": "workspace:^", "@deepseek-ai/dsh-session-stats": "workspace:^", - "@deepseek-ai/dsh-storage": "workspace:^", - "@deepseek-ai/dsh-storage-domain": "workspace:^", - "@deepseek-ai/dsh-storage-json": "workspace:^", "@deepseek-ai/dsh-workspace": "workspace:^", "@deepseek-ai/schemastery": "workspace:^", "commander": "^15.0.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 35670e79fe..083f8d1faf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1093,6 +1093,9 @@ importers: '@deepseek-ai/dsh-session-projection': specifier: workspace:^ version: link:../../session/session-projection + '@deepseek-ai/dsh-session-projection-cache': + specifier: workspace:^ + version: link:../../session/session-projection-cache '@deepseek-ai/dsh-session-query-sqlite': specifier: workspace:^ version: link:../../session-query/session-query-sqlite @@ -1126,6 +1129,15 @@ importers: '@deepseek-ai/dsh-spill-policy': specifier: workspace:^ version: link:../../spill/spill-policy + '@deepseek-ai/dsh-storage': + specifier: workspace:^ + version: link:../../storage/storage + '@deepseek-ai/dsh-storage-domain': + specifier: workspace:^ + version: link:../../storage/storage-domain + '@deepseek-ai/dsh-storage-json': + specifier: workspace:^ + version: link:../../storage/storage-json '@deepseek-ai/dsh-subagent': specifier: workspace:^ version: link:../../subagent/subagent @@ -1419,21 +1431,9 @@ importers: '@deepseek-ai/dsh-session-log-export': specifier: workspace:^ version: link:../../session-query/session-log-export - '@deepseek-ai/dsh-session-projection-cache': - specifier: workspace:^ - version: link:../../session/session-projection-cache '@deepseek-ai/dsh-session-stats': specifier: workspace:^ version: link:../../session/session-stats - '@deepseek-ai/dsh-storage': - specifier: workspace:^ - version: link:../../storage/storage - '@deepseek-ai/dsh-storage-domain': - specifier: workspace:^ - version: link:../../storage/storage-domain - '@deepseek-ai/dsh-storage-json': - specifier: workspace:^ - version: link:../../storage/storage-json '@deepseek-ai/dsh-web-frontend': specifier: workspace:^ version: link:../../../apps/web