better-dsh 0.2.3 → 0.2.4-b
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/cordis.patch.yml +47 -16
- package/docs/10_plans/2026-09-23-remote-execution-framework.md +236 -0
- package/docs/10_plans/2026-09-23-remote-framework-impl.md +2083 -0
- package/docs/50_test-reports/2026-09-06-write/345/267/245/345/205/267sandbox/345/215/207/347/272/247/351/200/217/344/274/240bug/345/244/215/345/217/221/345/217/212/346/214/202/350/265/267-/344/272/213/344/273/266/346/212/245/345/221/212.md +176 -0
- package/docs/50_test-reports/2026-09-08-hashline-edit-E_RANGE_UNVERIFIED/350/267/250/350/275/256/344/274/232/350/257/235/351/224/256/345/244/261/346/225/210-/350/257/212/346/226/255/346/212/245/345/221/212.md +226 -0
- package/docs/50_test-reports/2026-09-11-control-prompt-into-eval-description/345/256/236/346/265/213/346/212/245/345/221/212.md +222 -0
- package/docs/50_test-reports/2026-09-12-fs-scheme-resolution-/345/256/236/346/265/213/346/212/245/345/221/212.md +81 -0
- package/docs/50_test-reports/2026-09-12-url-schemes-grammar-matrix/344/270/216catalog-centralize-/345/256/236/346/265/213/346/212/245/345/221/212.md +234 -0
- package/docs/50_test-reports/2026-09-12-url-schemes-recallable-context-design/351/252/214/350/257/201/346/212/245/345/221/212.md +160 -0
- package/docs/50_test-reports/2026-09-12-url-schemes-recallable-context-/345/256/236/346/265/213/345/211/247/346/234/254.md +44 -0
- package/docs/50_test-reports/2026-09-12-url-schemes-recallable-context-/345/256/236/346/265/213/346/212/245/345/221/212.md +89 -0
- package/docs/50_test-reports/2026-09-12-url-schemes-/345/205/255scheme/345/206/222/347/203/237/344/270/216/350/276/271/347/225/214/345/256/236/346/265/213/346/212/245/345/221/212.md +198 -0
- package/docs/50_test-reports/2026-09-13-hashline-off/344/270/213scheme/345/217/257/350/276/276/346/200/247/345/267/245/345/205/267/351/235/242/344/270/215/345/257/271/347/247/260-/345/256/236/346/265/213/346/212/245/345/221/212.md +246 -0
- package/docs/50_test-reports/2026-09-13-preact-ui-shell/345/256/236/346/265/213/346/212/245/345/221/212.md +50 -0
- package/docs/50_test-reports/2026-09-14-4999-skill/346/270/205/345/215/225/344/270/216lsp-gate/345/256/236/346/265/213/346/212/245/345/221/212.md +63 -0
- package/docs/50_test-reports/2026-09-17-plugins/351/241/265/345/205/255/347/273/204/344/273/266/346/213/206/345/210/206/345/256/236/346/265/213/346/212/245/345/221/212.md +76 -0
- package/docs/50_test-reports/2026-09-23-remote-framework/345/256/236/346/265/213/346/212/245/345/221/212.md +92 -0
- package/docs/50_test-reports/2026-09-23-remote-framework/347/254/254/344/270/200/344/272/272/347/247/260/345/244/215/346/265/213/346/212/245/345/221/212.md +125 -0
- package/docs/50_test-reports/upstream-dsh-0.1.3-alpha.2-local-test-report.md +44 -0
- package/docs/50_test-reports/upstream-dsh-0.1.3-alpha.2-report.md +110 -0
- package/docs/50_test-reports/upstream-dsh-0.1.5-rc.2-local-test-report.md +79 -0
- package/docs/50_test-reports/v0.2.3b-hashline-content-locator/345/256/236/346/265/213/346/212/245/345/221/212.md +73 -0
- package/docs/50_test-reports/v0.2.3c-mobile-wave/345/256/236/346/265/213/346/212/245/345/221/212.md +47 -0
- package/docs/50_test-reports/v0.2.4-ios-focus-zoom-suppression/345/256/236/346/265/213/346/212/245/345/221/212.md +158 -0
- package/docs/specs/agent/spec.md +54 -0
- package/docs/specs/ast/spec.md +34 -0
- package/docs/specs/compaction-recall/spec.md +46 -0
- package/docs/specs/ctx/spec.md +107 -0
- package/docs/specs/dsh/spec.md +47 -0
- package/docs/specs/dvc/spec.md +87 -0
- package/docs/specs/escalation-guidance/spec.md +44 -0
- package/docs/specs/fs-scheme-resolution/spec.md +37 -0
- package/docs/specs/hash-edit/spec.md +41 -0
- package/docs/specs/http-read/spec.md +73 -0
- package/docs/specs/kernel-provisioning/spec.md +53 -0
- package/docs/specs/lsp/spec.md +121 -0
- package/docs/specs/mobile-layout/spec.md +108 -0
- package/docs/specs/model-failover/spec.md +20 -0
- package/docs/specs/plugins-page-components/spec.md +79 -0
- package/docs/specs/preact-ui-shell/spec.md +22 -0
- package/docs/specs/repl-dispatch-resilience/spec.md +21 -0
- package/docs/specs/skill/spec.md +58 -0
- package/docs/specs/tool-surface/spec.md +222 -0
- package/docs/specs/url-schema/spec.md +148 -0
- package/docs/specs/web-trust-fence/spec.md +43 -0
- package/docs/upstream-dsh-0.1.5-rc.2-report.md +156 -0
- package/dsh-docs/AGENTS.md +75 -0
- package/dsh-docs/agent-lifecycle.md +84 -0
- package/dsh-docs/agent-lifecycle.zh.md +86 -0
- package/dsh-docs/api-gateway.md +164 -0
- package/dsh-docs/api-gateway.zh.md +164 -0
- package/dsh-docs/architecture.md +150 -0
- package/dsh-docs/architecture.zh.md +154 -0
- package/dsh-docs/capability-seams.md +543 -0
- package/dsh-docs/capability-seams.zh.md +545 -0
- package/dsh-docs/config-catalog.md +3473 -0
- package/dsh-docs/config-catalog.zh.md +3474 -0
- package/dsh-docs/cookbook/adding-a-package.md +117 -0
- package/dsh-docs/cookbook/adding-a-package.zh.md +119 -0
- package/dsh-docs/cookbook/adding-a-remote-api.md +197 -0
- package/dsh-docs/cookbook/adding-a-remote-api.zh.md +197 -0
- package/dsh-docs/cookbook/adding-a-session-format-version.md +109 -0
- package/dsh-docs/cookbook/adding-a-session-format-version.zh.md +109 -0
- package/dsh-docs/cookbook/adding-a-settings-card.md +102 -0
- package/dsh-docs/cookbook/adding-a-settings-card.zh.md +102 -0
- package/dsh-docs/cookbook/adding-a-tool.md +101 -0
- package/dsh-docs/cookbook/adding-a-tool.zh.md +103 -0
- package/dsh-docs/cookbook/adding-a-vendored-package.md +59 -0
- package/dsh-docs/cookbook/adding-a-vendored-package.zh.md +59 -0
- package/dsh-docs/cookbook/adding-an-llm-adapter.md +43 -0
- package/dsh-docs/cookbook/adding-an-llm-adapter.zh.md +43 -0
- package/dsh-docs/cookbook/extension-cookbook.md +132 -0
- package/dsh-docs/cookbook/extension-cookbook.zh.md +136 -0
- package/dsh-docs/cookbook/maintaining-dsh-code-review.md +64 -0
- package/dsh-docs/cookbook/maintaining-dsh-code-review.zh.md +64 -0
- package/dsh-docs/cookbook/responding-to-pr-review-on-a-stack.md +32 -0
- package/dsh-docs/cookbook/responding-to-pr-review-on-a-stack.zh.md +32 -0
- package/dsh-docs/cordis-api/context.md +364 -0
- package/dsh-docs/cordis-api/context.zh.md +366 -0
- package/dsh-docs/cordis-api/events.md +207 -0
- package/dsh-docs/cordis-api/events.zh.md +209 -0
- package/dsh-docs/cordis-api/fiber.md +375 -0
- package/dsh-docs/cordis-api/fiber.zh.md +377 -0
- package/dsh-docs/cordis-api/inherited.md +39 -0
- package/dsh-docs/cordis-api/registry.md +152 -0
- package/dsh-docs/cordis-api/registry.zh.md +154 -0
- package/dsh-docs/cordis-api/service.md +102 -0
- package/dsh-docs/cordis-api/service.zh.md +104 -0
- package/dsh-docs/cordis-primer.md +45 -0
- package/dsh-docs/cordis-primer.zh.md +51 -0
- package/dsh-docs/cordis-tutorial/01-first-plugin.md +95 -0
- package/dsh-docs/cordis-tutorial/01-first-plugin.zh.md +95 -0
- package/dsh-docs/cordis-tutorial/02-lifecycle-and-effects.md +98 -0
- package/dsh-docs/cordis-tutorial/02-lifecycle-and-effects.zh.md +98 -0
- package/dsh-docs/cordis-tutorial/03-services.md +98 -0
- package/dsh-docs/cordis-tutorial/03-services.zh.md +98 -0
- package/dsh-docs/cordis-tutorial/04-events.md +144 -0
- package/dsh-docs/cordis-tutorial/04-events.zh.md +144 -0
- package/dsh-docs/cordis-tutorial/05-config.md +84 -0
- package/dsh-docs/cordis-tutorial/05-config.zh.md +84 -0
- package/dsh-docs/cordis-tutorial/06-composition-and-hmr.md +113 -0
- package/dsh-docs/cordis-tutorial/06-composition-and-hmr.zh.md +113 -0
- package/dsh-docs/cordis-tutorial/07-into-the-harness.md +108 -0
- package/dsh-docs/cordis-tutorial/07-into-the-harness.zh.md +108 -0
- package/dsh-docs/cordis-tutorial/index.md +60 -0
- package/dsh-docs/cordis-tutorial/index.zh.md +62 -0
- package/dsh-docs/deepseek-llm-api-wire-extensions.md +163 -0
- package/dsh-docs/deepseek-llm-api-wire-extensions.zh.md +163 -0
- package/dsh-docs/defensive-patterns.md +33 -0
- package/dsh-docs/defensive-patterns.zh.md +35 -0
- package/dsh-docs/development.md +167 -0
- package/dsh-docs/development.zh.md +173 -0
- package/dsh-docs/event-producer-consumer.md +86 -0
- package/dsh-docs/event-producer-consumer.zh.md +88 -0
- package/dsh-docs/glossary.md +45 -0
- package/dsh-docs/glossary.zh.md +45 -0
- package/dsh-docs/graph-atlas.md +22 -0
- package/dsh-docs/graph-atlas.zh.md +24 -0
- package/dsh-docs/i18n/README.md +60 -0
- package/dsh-docs/i18n/README.zh.md +62 -0
- package/dsh-docs/i18n/style-samples.md +87 -0
- package/dsh-docs/i18n/terminology.md +214 -0
- package/dsh-docs/i18n/translation-prompt.md +263 -0
- package/dsh-docs/i18n/translation-rules.md +69 -0
- package/dsh-docs/i18n/translation-rules.zh.md +69 -0
- package/dsh-docs/module-graph.md +1411 -0
- package/dsh-docs/module-graph.zh.md +1413 -0
- package/dsh-docs/persistence-catalog.md +1075 -0
- package/dsh-docs/persistence-catalog.zh.md +1077 -0
- package/dsh-docs/postmortem/0001-acp-default-export-drops-inject.md +113 -0
- package/dsh-docs/postmortem/0001-acp-default-export-drops-inject.zh.md +113 -0
- package/dsh-docs/postmortem/0002-js-expression-disabled-filesystem-tools.md +47 -0
- package/dsh-docs/postmortem/0002-js-expression-disabled-filesystem-tools.zh.md +47 -0
- package/dsh-docs/postmortem/0003-web-agent-gui-feedback-loop.md +53 -0
- package/dsh-docs/postmortem/0003-web-agent-gui-feedback-loop.zh.md +53 -0
- package/dsh-docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.md +55 -0
- package/dsh-docs/postmortem/0004-landlock-partial-notice-misclassified-child-failures.zh.md +55 -0
- package/dsh-docs/postmortem/README.md +18 -0
- package/dsh-docs/postmortem/README.zh.md +18 -0
- package/dsh-docs/rescope.md +53 -0
- package/dsh-docs/rescope.zh.md +53 -0
- package/dsh-docs/session-format-status.md +47 -0
- package/dsh-docs/session-format-status.zh.md +47 -0
- package/dsh-docs/subsystems/README.md +61 -0
- package/dsh-docs/subsystems/README.zh.md +61 -0
- package/dsh-docs/subsystems/agent-team.md +207 -0
- package/dsh-docs/subsystems/agent-team.zh.md +207 -0
- package/dsh-docs/subsystems/approval.md +170 -0
- package/dsh-docs/subsystems/approval.zh.md +170 -0
- package/dsh-docs/subsystems/attachment.md +351 -0
- package/dsh-docs/subsystems/attachment.zh.md +351 -0
- package/dsh-docs/subsystems/client-modules.md +168 -0
- package/dsh-docs/subsystems/client-modules.zh.md +168 -0
- package/dsh-docs/subsystems/client-resources.md +91 -0
- package/dsh-docs/subsystems/client-resources.zh.md +91 -0
- package/dsh-docs/subsystems/code-runtime.md +195 -0
- package/dsh-docs/subsystems/code-runtime.zh.md +195 -0
- package/dsh-docs/subsystems/commands.md +219 -0
- package/dsh-docs/subsystems/commands.zh.md +219 -0
- package/dsh-docs/subsystems/compaction.md +238 -0
- package/dsh-docs/subsystems/compaction.zh.md +238 -0
- package/dsh-docs/subsystems/conversation.md +258 -0
- package/dsh-docs/subsystems/conversation.zh.md +258 -0
- package/dsh-docs/subsystems/core.md +1209 -0
- package/dsh-docs/subsystems/core.zh.md +1219 -0
- package/dsh-docs/subsystems/credentials.md +329 -0
- package/dsh-docs/subsystems/credentials.zh.md +329 -0
- package/dsh-docs/subsystems/extensions.md +382 -0
- package/dsh-docs/subsystems/extensions.zh.md +382 -0
- package/dsh-docs/subsystems/feedback.md +266 -0
- package/dsh-docs/subsystems/feedback.zh.md +266 -0
- package/dsh-docs/subsystems/filesystem.md +505 -0
- package/dsh-docs/subsystems/filesystem.zh.md +505 -0
- package/dsh-docs/subsystems/goal.md +277 -0
- package/dsh-docs/subsystems/goal.zh.md +277 -0
- package/dsh-docs/subsystems/invariants.md +88 -0
- package/dsh-docs/subsystems/invariants.zh.md +88 -0
- package/dsh-docs/subsystems/jobs.md +290 -0
- package/dsh-docs/subsystems/jobs.zh.md +290 -0
- package/dsh-docs/subsystems/llm-streaming.md +1080 -0
- package/dsh-docs/subsystems/llm-streaming.zh.md +1086 -0
- package/dsh-docs/subsystems/lsp.md +202 -0
- package/dsh-docs/subsystems/lsp.zh.md +202 -0
- package/dsh-docs/subsystems/permission-presets.md +131 -0
- package/dsh-docs/subsystems/permission-presets.zh.md +131 -0
- package/dsh-docs/subsystems/persistence.md +395 -0
- package/dsh-docs/subsystems/persistence.zh.md +395 -0
- package/dsh-docs/subsystems/plan.md +87 -0
- package/dsh-docs/subsystems/plan.zh.md +87 -0
- package/dsh-docs/subsystems/sandbox.md +220 -0
- package/dsh-docs/subsystems/sandbox.zh.md +220 -0
- package/dsh-docs/subsystems/schedule.md +192 -0
- package/dsh-docs/subsystems/schedule.zh.md +192 -0
- package/dsh-docs/subsystems/scope.md +59 -0
- package/dsh-docs/subsystems/scope.zh.md +59 -0
- package/dsh-docs/subsystems/session-projection.md +354 -0
- package/dsh-docs/subsystems/session-projection.zh.md +354 -0
- package/dsh-docs/subsystems/session-query.md +509 -0
- package/dsh-docs/subsystems/session-query.zh.md +509 -0
- package/dsh-docs/subsystems/session-reference.md +219 -0
- package/dsh-docs/subsystems/session-reference.zh.md +219 -0
- package/dsh-docs/subsystems/session-telemetry.md +194 -0
- package/dsh-docs/subsystems/session-telemetry.zh.md +194 -0
- package/dsh-docs/subsystems/session-title.md +204 -0
- package/dsh-docs/subsystems/session-title.zh.md +204 -0
- package/dsh-docs/subsystems/session.md +1155 -0
- package/dsh-docs/subsystems/session.zh.md +1159 -0
- package/dsh-docs/subsystems/settings.md +405 -0
- package/dsh-docs/subsystems/settings.zh.md +405 -0
- package/dsh-docs/subsystems/shell.md +303 -0
- package/dsh-docs/subsystems/shell.zh.md +303 -0
- package/dsh-docs/subsystems/sidebar-right.md +148 -0
- package/dsh-docs/subsystems/sidebar-right.zh.md +148 -0
- package/dsh-docs/subsystems/skills.md +354 -0
- package/dsh-docs/subsystems/skills.zh.md +354 -0
- package/dsh-docs/subsystems/slots.md +175 -0
- package/dsh-docs/subsystems/slots.zh.md +175 -0
- package/dsh-docs/subsystems/spill.md +117 -0
- package/dsh-docs/subsystems/spill.zh.md +117 -0
- package/dsh-docs/subsystems/storage.md +260 -0
- package/dsh-docs/subsystems/storage.zh.md +260 -0
- package/dsh-docs/subsystems/subagent.md +766 -0
- package/dsh-docs/subsystems/subagent.zh.md +770 -0
- package/dsh-docs/subsystems/subprocess.md +324 -0
- package/dsh-docs/subsystems/subprocess.zh.md +324 -0
- package/dsh-docs/subsystems/system-prompt.md +220 -0
- package/dsh-docs/subsystems/system-prompt.zh.md +220 -0
- package/dsh-docs/subsystems/terminal.md +184 -0
- package/dsh-docs/subsystems/terminal.zh.md +184 -0
- package/dsh-docs/subsystems/todo.md +32 -0
- package/dsh-docs/subsystems/todo.zh.md +32 -0
- package/dsh-docs/subsystems/token-meter.md +105 -0
- package/dsh-docs/subsystems/token-meter.zh.md +105 -0
- package/dsh-docs/subsystems/tools.md +720 -0
- package/dsh-docs/subsystems/tools.zh.md +720 -0
- package/dsh-docs/subsystems/typert.md +343 -0
- package/dsh-docs/subsystems/typert.zh.md +343 -0
- package/dsh-docs/subsystems/user-questions.md +178 -0
- package/dsh-docs/subsystems/user-questions.zh.md +178 -0
- package/dsh-docs/subsystems/web-client.md +95 -0
- package/dsh-docs/subsystems/web-client.zh.md +95 -0
- package/dsh-docs/subsystems/web-server.md +154 -0
- package/dsh-docs/subsystems/web-server.zh.md +154 -0
- package/dsh-docs/subsystems/web.md +206 -0
- package/dsh-docs/subsystems/web.zh.md +206 -0
- package/dsh-docs/subsystems/webhook.md +70 -0
- package/dsh-docs/subsystems/webhook.zh.md +70 -0
- package/dsh-docs/subsystems/workflow.md +278 -0
- package/dsh-docs/subsystems/workflow.zh.md +278 -0
- package/dsh-docs/subsystems/workspace.md +321 -0
- package/dsh-docs/subsystems/workspace.zh.md +321 -0
- package/dsh-docs/testing.md +54 -0
- package/dsh-docs/testing.zh.md +54 -0
- package/dsh-docs/tool-catalog.md +2225 -0
- package/dsh-docs/tool-catalog.zh.md +2233 -0
- package/dsh-docs/tool-execution-pipeline.md +62 -0
- package/dsh-docs/tool-execution-pipeline.zh.md +64 -0
- package/dsh-docs/user/develop/basic/config.md +106 -0
- package/dsh-docs/user/develop/basic/config.zh.md +106 -0
- package/dsh-docs/user/develop/basic/index.md +144 -0
- package/dsh-docs/user/develop/basic/index.zh.md +144 -0
- package/dsh-docs/user/develop/basic/publish.md +183 -0
- package/dsh-docs/user/develop/basic/publish.zh.md +183 -0
- package/dsh-docs/user/develop/basic/tool.md +52 -0
- package/dsh-docs/user/develop/basic/tool.zh.md +52 -0
- package/dsh-docs/user/develop/framework/events.md +143 -0
- package/dsh-docs/user/develop/framework/events.zh.md +143 -0
- package/dsh-docs/user/develop/framework/index.md +137 -0
- package/dsh-docs/user/develop/framework/index.zh.md +137 -0
- package/dsh-docs/user/develop/framework/service.md +148 -0
- package/dsh-docs/user/develop/framework/service.zh.md +150 -0
- package/dsh-docs/user/develop/practice/dynamic-cordis.md +15 -0
- package/dsh-docs/user/develop/practice/dynamic-cordis.zh.md +15 -0
- package/dsh-docs/user/develop/practice/index.md +155 -0
- package/dsh-docs/user/develop/practice/index.zh.md +155 -0
- package/dsh-docs/user/develop/practice/llm-adapter.md +189 -0
- package/dsh-docs/user/develop/practice/llm-adapter.zh.md +189 -0
- package/dsh-docs/user/guide/github-review.md +102 -0
- package/dsh-docs/user/guide/github-review.zh.md +102 -0
- package/dsh-docs/user/guide/index.md +30 -0
- package/dsh-docs/user/guide/index.zh.md +30 -0
- package/dsh-docs/user/guide/mcp-memory.md +101 -0
- package/dsh-docs/user/guide/mcp-memory.zh.md +101 -0
- package/dsh-docs/user/guide/network-proxy.md +85 -0
- package/dsh-docs/user/guide/network-proxy.zh.md +85 -0
- package/dsh-docs/user/guide/providers.md +190 -0
- package/dsh-docs/user/guide/providers.zh.md +190 -0
- package/dsh-docs/user/guide/python-sdk.md +150 -0
- package/dsh-docs/user/guide/python-sdk.zh.md +150 -0
- package/dsh-docs/user/guide/schedule.md +21 -0
- package/dsh-docs/user/guide/schedule.zh.md +21 -0
- package/dsh-docs/user/index.md +11 -0
- package/dsh-docs/user/index.zh.md +11 -0
- package/dsh-docs/web-styling.md +29 -0
- package/dsh-docs/web-styling.zh.md +29 -0
- package/eval-description.md +33 -0
- package/lib/client/index.js +328 -89
- package/lib/compaction/index.d.ts +47 -0
- package/lib/compaction/index.js +159 -0
- package/lib/failover/index.d.ts +35 -0
- package/lib/failover/index.js +141 -0
- package/lib/fs-aware/sandbox-plugin.d.ts +71 -0
- package/lib/fs-aware/sandbox-plugin.js +249 -0
- package/lib/index.d.ts +10 -41
- package/lib/index.js +226 -8173
- package/lib/lsp-server-registry-946ysdqg.js +972 -0
- package/lib/lsp-server-registry-XU6aHSqZ.js +3 -0
- package/lib/mobile/plugin.d.ts +29 -0
- package/lib/mobile/plugin.js +54 -0
- package/lib/native-capture-x_Hos2e8.js +68 -0
- package/lib/py-sdk-Chvy92MB.js +178 -0
- package/lib/py-sdk.d.ts +19 -2
- package/lib/py-sdk.js +2 -2
- package/lib/remote/plugin.d.ts +24 -0
- package/lib/remote/plugin.js +1095 -0
- package/lib/url-schemes/index.d.ts +88 -0
- package/lib/url-schemes/index.js +7200 -0
- package/lib/web-trust-BO66y72w.js +361 -0
- package/lib/web-trust-CgpBoFv3.d.ts +106 -0
- package/lib/web-trust.d.ts +2 -0
- package/lib/web-trust.js +3 -0
- package/lib/wrap-Dr8XtIak.js +747 -0
- package/package.json +87 -56
- package/url-schemes-instruction.md +22 -0
- package/control-prompt.md +0 -37
- package/docs/50_test-reports/v0.1.8d_artifacts/README.md +0 -138
- package/docs/50_test-reports/v0.1.8d_artifacts/code-mode-repl-only.observation.md +0 -74
- package/docs/50_test-reports/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.jsonl +0 -3890
- package/docs/50_test-reports/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.w-sample-0435.jsonl +0 -544
- package/docs/50_test-reports/v0.1.8d_artifacts/functions.json +0 -592
- package/docs/50_test-reports/v0.1.8d_artifacts/skills-catalog.snapshot.md +0 -30
- package/docs/50_test-reports/v0.1.8d_artifacts/tools-sdk.output-schemas.json +0 -1236
- package/docs/50_test-reports/v0.1.8d_artifacts/tools-sdk.python.txt +0 -592
- package/docs/50_test-reports/v0.1.8d_artifacts/tools-sdk.typescript.txt +0 -516
- package/docs/50_test-reports/v0.1.8d_artifacts/wire-vs-transcription.diff.md +0 -54
- package/docs/50_test-reports/v0.2.0b_artifacts/f2probe/Cargo.lock +0 -7
- package/docs/50_test-reports/v0.2.0b_artifacts/f2probe/Cargo.toml +0 -6
- package/docs/50_test-reports/v0.2.0b_artifacts/f2probe/src/bin/messy.rs +0 -8
- package/docs/50_test-reports/v0.2.0b_artifacts/f2probe/src/main.rs +0 -4
- package/docs/50_test-reports/v0.2.0b_artifacts/hashline-probe.md +0 -5
- package/docs/50_test-reports/v0.2.0b_artifacts/slowprobe/Cargo.lock +0 -7
- package/docs/50_test-reports/v0.2.0b_artifacts/slowprobe/Cargo.toml +0 -7
- package/docs/50_test-reports/v0.2.0b_artifacts/slowprobe/build.rs +0 -4
- package/docs/50_test-reports/v0.2.0b_artifacts/slowprobe/src/main.rs +0 -13
- package/docs/60_exploration-and-research/cordis-research.md +0 -350
- package/docs/60_exploration-and-research/dsh-web-profile-package-map.md +0 -186
- package/docs/60_exploration-and-research/dsh-web-ui-slot-system-research.md +0 -310
- package/docs/60_exploration-and-research/dsh-webui-strip-boundary-research.md +0 -300
- package/docs/60_exploration-and-research/ios-chat-app-bridge-research.md +0 -324
- package/docs/60_exploration-and-research/web-frontend-composability-research.md +0 -191
- package/docs/REPL-/345/267/245/345/205/267/350/260/203/347/224/250-/346/210/252/346/226/255/350/257/212/346/226/255.md +0 -110
- package/docs/adr/0001-bridge-tool-layer-not-service-layer.md +0 -14
- package/docs/adr/0002-masking-is-presentation-only.md +0 -15
- package/docs/plans/A2A-messaging-channel-test-archive.md +0 -256
- package/docs/plans/code-mode-vs-rlm-ipython-comparison.md +0 -137
- package/docs/plans/dashr-blueprint-review.md +0 -201
- package/docs/plans/dashr-blueprint.md +0 -561
- package/docs/plans/dashr-compaction-window-and-archive.md +0 -307
- package/docs/plans/dashr-profile-layer-feasibility.md +0 -367
- package/docs/plans/dashr-sandbox-escalation-semantics-gap.md +0 -171
- package/docs/plans/dashr-security-sandbox-analysis.md +0 -187
- package/docs/plans/dashr-surface-invariant-and-omp-imports.md +0 -97
- package/docs/plans/ipython-kernel-interactive-interface-test-report.md +0 -152
- package/docs/plans/kernel-refactoring/Dash-IPython-Control-Prompt-draft.md +0 -146
- package/docs/plans/kernel-refactoring/Dash-IPython-Control-Prompt-draft_v3.md +0 -50
- package/docs/plans/kernel-refactoring/Dash-IPython-Control-Prompt-draft_v4.md +0 -79
- package/docs/plans/kernel-refactoring/Dash-vs-PrimeAgent-systemprompt-toolcatalog-comparison.md +0 -138
- package/docs/plans/kernel-refactoring/RLM-system-prompt-injection-gap-report.md +0 -161
- package/docs/plans/kernel-refactoring/V0.1.5-development-plan.md +0 -109
- package/docs/plans/kernel-refactoring/actinoable-surface-to-llm-in-agent-runtime_dsh.md +0 -50
- package/docs/plans/kernel-refactoring/actinoable-surface-to-llm-in-agent-runtime_prime.md +0 -113
- package/docs/plans/recallable-compaction.md +0 -147
- package/docs/plans/spike-tag-repro.mjs +0 -102
- package/docs/plans/upstream-analysis.md +0 -128
- package/docs/v0.1.8-improved-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -142
- package/docs/v0.1.8-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -193
- package/docs/v0.1.8b-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -96
- package/docs/v0.1.8c-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -127
- package/docs/v0.1.8d-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -150
- package/docs/v0.1.8d_artifacts/README.md +0 -138
- package/docs/v0.1.8d_artifacts/code-mode-repl-only.observation.md +0 -74
- package/docs/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.jsonl +0 -3890
- package/docs/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.w-sample-0435.jsonl +0 -544
- package/docs/v0.1.8d_artifacts/functions.json +0 -592
- package/docs/v0.1.8d_artifacts/skills-catalog.snapshot.md +0 -30
- package/docs/v0.1.8d_artifacts/tools-sdk.output-schemas.json +0 -1236
- package/docs/v0.1.8d_artifacts/tools-sdk.python.txt +0 -592
- package/docs/v0.1.8d_artifacts/tools-sdk.typescript.txt +0 -516
- package/docs/v0.1.8d_artifacts/wire-vs-transcription.diff.md +0 -54
- package/docs/v0.1.8e-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -224
- package/docs/v0.1.9a-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -168
- package/docs/v0.2.0b-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -123
- package/docs/v0.2.0b_artifacts/f2probe/Cargo.lock +0 -7
- package/docs/v0.2.0b_artifacts/f2probe/Cargo.toml +0 -6
- package/docs/v0.2.0b_artifacts/f2probe/src/bin/messy.rs +0 -8
- package/docs/v0.2.0b_artifacts/f2probe/src/main.rs +0 -4
- package/docs/v0.2.0b_artifacts/hashline-probe.md +0 -5
- package/docs/v0.2.0b_artifacts/slowprobe/Cargo.lock +0 -7
- package/docs/v0.2.0b_artifacts/slowprobe/Cargo.toml +0 -7
- package/docs/v0.2.0b_artifacts/slowprobe/build.rs +0 -4
- package/docs/v0.2.0b_artifacts/slowprobe/src/main.rs +0 -13
- package/docs/v0.2.1-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -110
- package/docs/v0.2.1b-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -86
- package/docs/v0.2.1c-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -66
- package/lib/py-sdk-BCaOGYz7.d.ts +0 -125
- package/lib/py-sdk-CbgYiX8O.js +0 -691
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# URL Schemes 可回溯上下文 — 实测报告(change 2026-09-11-url-schemes-recallable-context)
|
|
2
|
+
|
|
3
|
+
> 状态:**五层验证全部完成**(单测 + 真实日志矩阵 13/13 + 三轮自驱实测 ALL PASS:10/10、13/13、9 调用 8 ok+1 预期错误);剩余 = user 发布确认(AGENTS §〇 单次确认;npm can wait 已裁定)。详见 §3.2 / §3.2.1 / §3.2.2。
|
|
4
|
+
|
|
5
|
+
## 1. 被测运行时与环境
|
|
6
|
+
|
|
7
|
+
| 实例 | systemd `dsh-4999-test`,`http://127.0.0.1:4999`(token 见启动日志 `.scratch/dsh-4999.log`;2026-09-12 自 4986 迁入,见 §4) |
|
|
8
|
+
|---|---|
|
|
9
|
+
| 实例 | systemd `dsh-4986-test`,`http://127.0.0.1:4986`(token 见启动日志 `.scratch/dsh-4986.log`) |
|
|
10
|
+
| 源码树 | `upstream/deepseek-harness`(0.1.5-rc.2 线)+ `packages/better-dsh/better-dsh`(canonical `./dashr` 的 rsync 副本 + devDeps 手术 14 × workspace:*) |
|
|
11
|
+
| 构建 | `pnpm --filter better-dsh exec tsdown`(8 files, 509.80 kB)+ `tsx scripts/build-client.ts`(client 34ms) |
|
|
12
|
+
| DSH_HOME | 仓库内 `.dsh-test` |
|
|
13
|
+
| 健康 | shell 200;log 零错误(首次 4988 尝试撞 superd PoC 端口 EADDRINUSE loud fail 符合预期,已清理改 4986——事故记于 §4) |
|
|
14
|
+
| 健康 | shell 200;token→cookie 200;log 零错误(user 复核 4999:UI 与既有功能无破坏性回归;端口史见 §4) |
|
|
15
|
+
## 2. 代码交付(单测证据,全部绿)
|
|
16
|
+
|
|
17
|
+
| 域 | 交付 | 测试 |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| 正名 | `dsh-url-schema` → **`dsh-url-schemes`**(目录/服务名/类名/测试全链;`git mv` 保历史) | tsc 13/13 = stash 基线(diff 仅路径位移);全仓引用零残留 |
|
|
20
|
+
| config gates | `Config { urlSchemes?, hashline? }`(default true,patch 行 `config:` 可达):write/grep/glob wrapper 与 read URL branch 随 `urlSchemes` 门控;edit/undo + lsp listener 随 `hashline` 门控;read 注册条件 `(urlSchemes ‖ hashline)` | tsc/vitest 基线零新增 |
|
|
21
|
+
| capture-delegate | `NATIVE_TOOL_NAMES` 增 `read`(语义名捕获,session-start 先于自注册);`capturedRead` 终端 delegate + `NATIVE_READ_UNAVAILABLE`;branch 条件 `gates.hashline && !isScheme`(scheme 路径不落文件读) | wiring.spec 4/4(含 CTX_NO_PERSISTENCE 新断言) |
|
|
22
|
+
| ctx:// 重塑 | `session` = 统计快照(prepared)‖ transcript(canonical);identity/model/cwd 折叠;compactions 清单(label/checkpoint_seq/嵌套链/8 段预览)+ `[label|n]` 寻址(label=summary seq 精确优先、0-based 回落)+ `:raw`/行窗恒作用 canonical;`/original` 路径形;`CTX_UNKNOWN_KEY/NO_SUCH_ELEMENT/BAD_PATH/BAD_SELECTOR` 回显式错误 | `ctx.spec` **15/15**(fixture 含 2 嵌套剧集) |
|
|
23
|
+
| 披露 | `url-schema:general` section(≤600 chars,`urlSchemes` gate 门控,无空承诺)+ 快照顶层 `syntax` 字段 + 超大原文行动 note | `general-section.spec` 2/2 + ctx.spec syntax 断言 |
|
|
24
|
+
| fs spike(phase-2) | `createUrlAwareFileSystemBackend`:动态 import + `UrlAwareFileSystem extends SandboxedFileSystem`(resolve 拦 scheme → virtual FsTarget;stat 合成 file;readText 解引用;写系 virtual → `FS_VIRTUAL_READONLY`;其余 super);整体 fail-soft | `fs-backend.spec` **5/5**(真 cordis Context + sandboxPolicy stub + 合法 LocalConfig 下:resolve→stat→readText 全链、只读强制、gate 关停) |
|
|
25
|
+
|
|
26
|
+
全量回归:**vitest 14 failed | 458 passed (472) = 0.2.3-d 文档基线同数同族**(SessionSeq 既有 API 漂移,零新增);tsc 13 = 基线。
|
|
27
|
+
|
|
28
|
+
## 3. 真实日志矩阵验证(✅ ALL PASS,2026-09-12)
|
|
29
|
+
|
|
30
|
+
驱动器 `dashr/test/url-schemes/verify-live.mts`(npx tsx;走完整 UrlResolver + selector 解析 + ctx handler 链)对真实 prod 会话 **session-788be2e1**(35,562 events、3 层嵌套压缩)执行 13 项断言,全部 PASS:
|
|
31
|
+
|
|
32
|
+
- roster 列出 session 面
|
|
33
|
+
- 快照:totals.compactions = 3;identity 卡正确
|
|
34
|
+
- manifest labels = [109245, 221217, 338001]
|
|
35
|
+
- 嵌套链:ep1→null;ep2→109246;ep3→221218
|
|
36
|
+
- episode prepared = 8 段 summary(含 Primary Request / Critical Context)
|
|
37
|
+
- `:raw` = 原文 span(含 ep1 CHECKPOINT;长度 > 10 × summary)
|
|
38
|
+
- `/original:1-3` 行窗 = 3 行
|
|
39
|
+
- 嵌套后 ep1 原文仍可达(>10000 chars)
|
|
40
|
+
- transcript 含 ≥2 个 CHECKPOINT
|
|
41
|
+
|
|
42
|
+
驱动过程修出 2 个真 bug:① selector undefined 归一化(applyFace 崩);② applyFace 调用点签名错位(face flag 与 selector 参数串位)。live-log 驱动价值实证。
|
|
43
|
+
|
|
44
|
+
### 3.2 in-agent 集成确认(✅ ALL PASS,2026-09-12 自驱实测收口)
|
|
45
|
+
|
|
46
|
+
**验收口径**(AGENTS §〇 第 2 条:验收标准必须与改动点同类——本改动是 surface 给大模型的工具):§3.1 live-log 驱动验证的是 `UrlResolver → selector → ctx handler` 链在真实数据上的正确性,但绕过了工具面本体——read 工具 URL branch 的注册与 gates、capture-delegate(`NATIVE_TOOL_NAMES` 先于工具自注册)、`url-schema:general` 披露段落进真实 system prompt、以及模型对 `ctx://` 语法的实际使用。本节以一次真实 agent 会话补齐全部四项。
|
|
47
|
+
|
|
48
|
+
**执行方式:agent 自驱(HTTP RPC)**。0.1.5-rc.2 的 `/api` 是标准 HTTP JSON RPC(复审推翻原记「SPA 非 REST 需逆向传输层、成本高」):token URL 换 cookie → `POST /api/<namespace>/<method>`(斜杠两段形),payload = `{args:{<首参名>:…}}`(typert 具名参数派发);实际用 `session/create`、`session/prompt`、`commands/execute`(`agentId` + `line:'/compact'`)。每步均为真实 agent turn 内模型自调 read 工具,与 GUI 形态证据价值等价(被测路径全在 host 侧)。驱动脚本 `.scratch/url-schemes-live-driver*.sh`,过程产物 `.scratch/url-schemes-live/`。
|
|
49
|
+
|
|
50
|
+
**被测会话**:`session-eec306df-e5da-4781-a9a8-b547c361ffa0`(4999 / `.dsh-test` / cwd = 仓库根)。5 个 turn、2 次嵌套 `/compact`(L1 = label 46:13 items / 16,411 tok,shadowed 8..38;L2 = label 124:23 items / 42,672 tok,shadowed 47..118——起点 47 恰为 L1 的 checkpoint seq)、**17 次工具调用(16 ok / 1 次暴露 spec gap,见下①)**,覆盖 roster → 快照 → 灌压 → 嵌套压缩 → manifest → label 下钻 → `:raw` → 行窗 → `/original:N-M` → 跨压缩旧档回归;另含 3 次模型自发的 eval-pad 组合调用(`await tool.read({path:'ctx://…'})`)。
|
|
51
|
+
|
|
52
|
+
**判定基准对照(剧本 10 步)**:
|
|
53
|
+
|
|
54
|
+
| # | 断言 | 结果 |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| 1 | roster 含 `ctx://session`、compactions、语法提示 | ✅(原生 read 返回 roster 全文) |
|
|
57
|
+
| 2 | 快照 `totals`/`compacted: []`/`syntax`/`session.id` | ✅ |
|
|
58
|
+
| 4 | manifest 1 条目,label = compaction/summary 事件 seq | ✅ label=46(summary 事件 seq 46) |
|
|
59
|
+
| 5 | `[46]` 8 段 summary(prepared face) | ✅ 8,309 chars,8 段键齐 |
|
|
60
|
+
| 6 | `:raw` = 被 shadow 原文,含第 3 步文件名 | ✅ 1,053 行 / 62,586 chars;三文件名行级命中(3/3/2 处,与 span 边界自洽) |
|
|
61
|
+
| 7 | 嵌套链 `replaces_checkpoint` = L1 checkpoint_seq | ✅ 124 条目 replaces_checkpoint=47 = 46+1;L2 shadowed 起点=47 无重叠 |
|
|
62
|
+
| 8 | `[124]` 8 段 summary | ✅ 12,332 chars,段标题与 L1 同构 |
|
|
63
|
+
| 9 | **二次压缩后 L1 原文仍可读** | ✅ `[46]:raw` 63,893 chars 全文逐字节稳定,三文件命中行号跨压缩一字不差 |
|
|
64
|
+
| 10 | `/original:1-5` 行窗作用于 canonical | ✅ 5 行,与 `:raw[:5]` 逐字相等 |
|
|
65
|
+
|
|
66
|
+
**第一人称机制发现(测试 agent 自证)**:① `:raw:1-10` 组合 selector 被拒(`Error: invalid line selector…`)——**live 实测抓到的 spec gap**:§15 原始裁定第 2/3 条要求 `:raw:N-M` ≡ `:N-M` ≡ `/original:N-M`(行窗恒作用 canonical,`:raw` 前缀在行窗场景冗余但必须合法),而解析器只认整段 `raw`;`/original:N-M` 实测可用。已列发布前修复(selector 解析放行 `raw:` 前缀组合,语义零变化)。② 裸 label + `:N-M` 行窗索引 canonical 面(`:1-10 == :raw[:10]` 字节为真),绕过 prepared;③ `:raw` ≡ `/original` 全量(1053 行相等),差异仅 oversize 守卫挂点;④ 行号跨压缩稳定(shadowedSeqs 固定 ⇒ 渲染稳定);⑤ oversize 哨兵未误触发(62,586 < 65,536)。
|
|
67
|
+
|
|
68
|
+
**四项验收口径逐项闭合**:read URL branch + gates 双分支(ctx:// 走 URL、文件走 hashline 锚点格式,互不串线)✅;capture-delegate 语义捕获生效(17 次调用全部进入本插件 read chassis,原生 read 不识 ctx://)✅;披露段生效(模型首试即正确使用 label/`:raw`/`:N-M` 寻址)✅;模型实际使用 ✅。
|
|
69
|
+
|
|
70
|
+
### 3.2.1 二轮回归(✅ ALL PASS,2026-09-12 晚;五点对齐 + 工具/披露段重塑后)
|
|
71
|
+
|
|
72
|
+
§3.2 首轮实测抓到 `:raw:1-10` 被拒的 spec gap(§15 原始裁定第 2/3 条)后,user 批示重塑:组合 selector 放行、`/original` 子路径删除(≡ `:raw`,超尺守卫移至无窗 `:raw`)、`transcript` 保留为别名、新增 `thinking`/`system` 两个集合面、四工具 description 抹平为原生原文(read 保留 hashline 锚点条款、不再提及 scheme)、披露段改为包根 `url-schemes-section.md` 独立文件(6 schemes + 语法与 `:raw:N-M` ≡ `:N-M` + variance/只读双免责 + 一级资源覆盖 + bare-root 即 help;walk-up 加载 + `package.json files` 补录;dvc devices 实测 ids `ast_edit/ast_grep/browser/lsp`;catalog 保留为错误消息单一源)。双 sub-agent 并行实现、本人统一验收:tsc 13 基线、vitest 473 passed / 14 failed(基线同族;ctx.spec 19/19、general-section 2/2——设计核查 F9 更正原稿「6/6」为两文件合计数)、openspec validate 2/2。
|
|
73
|
+
|
|
74
|
+
**二轮自驱实测**(会话 `session-1f5a930b`,驱动器 `.scratch/url-schemes-live-driver3.sh`):13 次工具调用 **13/13 判定过**——roster 9 行含 `thinking`/`system` 无 `/original`;**`compactions[56]:raw:1-10` 与 `compactions[56]:1-10` 逐字节相同**(spec gap 修复实证);`compactions[56]/original` → `CTX_BAD_PATH`(错误回显注明被 `:raw / :raw:N-M` 取代);`thinking` 索引与 `[0]` 单块全文、`system` 索引与 `:raw` 9,786 chars 全过;压缩链正常(label 56,17 items / 18,706 tok)。**新披露段实证落进真实 system prompt**(`system/message` 事件含 `Internal URLs (dsh-url-schemes)` 全文,`:raw:N-M`/`ast_edit`/只读免责等 6 处命中);`request/header` 不携带 tools schema,description 抹平由单测层证明。
|
|
75
|
+
### 3.2.2 设计核查处置回归(✅ ALL PASS,2026-09-12 深夜;三轮自驱)
|
|
76
|
+
|
|
77
|
+
design 验证报告(4999 实例自检,F1–F12)处置落地:**F1** 快照新增 `segments`(per-compaction 段 + `live` 尾段,spec 契约补齐);**F3** bracket 元素路径接入 `applyFace`(行窗恒可用);**F5** 两处 `CTX_UNKNOWN_KEY` 均带 bare-root 指针;**F7** `system_prompt` 显式空卡恒在;**F6** section bare-root 句修正(skill://、dsh:// 需首段);**F8/F9** 文档数字修正(tasks.md/本报告);**F10** 新增 gates.spec 5/5(resolveGates 矩阵 + read 三分支路由);**F12** 过时注释修正;**F4/F11** design.md 对齐块 + spike 不挂载结论;**F2 user 裁定 no goal**(不做,FS 层接替);新增 `ctx://session/injections` 集合(user 指令)。验证:ctx.spec **23/23**、gates.spec 5/5、tsc 13 基线、openspec 2/2、全量 **482 passed / 14 failed**(基线族)。
|
|
78
|
+
|
|
79
|
+
**三轮自驱实测**(会话 `session-798157fc`,驱动器 `.scratch/url-schemes-live-driver4.sh`):9 次工具调用 8 ok / 1 次预期错误——roster 10 行;快照 `segments` live 段实测在场(压缩前单 live 段 {start:0,end:22,items:23})、`system_prompt` 空卡恒在、`injected_user_messages: 2`;`injections` 索引(2 条)/`:raw` 54,581 chars/**agent 自发 `injections:raw:1-6` 组合分页**(大注入纪律性行为自证);`user_prompts[0]:1-1` → 单行 `[0000008] USER`(F3 实证);`ctx://bogus` 错误带 `bare ctx:// lists the full roster` 指针(F5 实证);压缩后 `compactions[46]:raw:1-5` 组合正常(label 46,13 items / 7,889 tok)。
|
|
80
|
+
|
|
81
|
+
## 3.5 结论
|
|
82
|
+
实现(P0/P1/P2 + 五点对齐重塑 + 设计核查处置)与五层验证全部完成且零回归:单测(ctx 23/23、general-section 2/2、gates 5/5、fs-backend 5/5、wiring 4/4);真实日志矩阵 13/13(§3.1);in-agent 第一人称实测三轮(§3.2 一轮 10/10、§3.2.1 二轮 13/13、§3.2.2 三轮 9 次调用 8 ok + 1 预期错误,均自驱)。tsc 13/13 基线;vitest 14 failed | 482 passed = 基线同族。change 状态:**代码 + 验收完成,等 user 发布确认**(AGENTS §〇 单次确认红线;npm can wait 已裁定)。fs backend spike(5.x)**维持不挂载结论**(F11;FS 层挂载 + 工具解绑为下一 change);F2 transform 链 user 裁定 no goal(不落地,由 FS 层接替)。
|
|
83
|
+
(2026-09-12 22:0x 修订:上段为三轮前的旧结论,已由上方五层验证版取代;保留一行删除记录以防引用漂移。)
|
|
84
|
+
## 4. 事故与边界记录
|
|
85
|
+
|
|
86
|
+
- 4988 端口为 superd multi-context PoC 占用(AGENTS §二 勿杀)——首次启动误撞即 EADDRINUSE loud fail,已清理本单元改 4986;2026-09-12 按 user 指令下线 omp-web-4999-test / omp-web-lan-4999-relay 后迁入 4999(单元 `dsh-4999-test`,日志 `.scratch/dsh-4999.log`),4986 时代完成的验证记录不受端口迁移影响。
|
|
87
|
+
- 自驱驱动器调试修出 3 个 wire/脚本事实(对后续自驱有复用价值):① `/api` endpoint 只收斜杠两段形(`session/list`),点号形 404;② typert payload 必须整信封 + 恰一个 plain-object `args` 键(漏信封报「invalid client-request」);③ `commands/execute` wire 参数名是 `agentId`(client 代理把方法首参 `agent` 改名映射),且 jq 的 `//` 运算符把 `false` 当 falsy——`running` 布尔判断必须用 `== false` 显式比较,否则 idle 轮询永假(曾致 P1 后误判超时,实际 turn 已完成)。
|
|
88
|
+
- defineTool const 泛型推断在改写 literal 下断裂 ⇒ read chassis 保留原 literal 结构、以 gates + capturedRead delegate 实现语义(transform 链抽象已建于 `transforms.ts`,extract 为后续机械步骤)。
|
|
89
|
+
- 红线:**npm publish 前必须 user 单次明确确认**(AGENTS §〇);本报告即确认前置材料。
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# dsh-url-schemes 六 scheme 冒烟与边界实测报告
|
|
2
|
+
|
|
3
|
+
- 日期:2026-09-12
|
|
4
|
+
- 被测对象:`dashr/src/url-schemes/` 的六类 URL scheme(`skill://`、`agent://`、`dsh://`、`ctx://`、`dvc://`、`http(s)://`)在活体 runtime 中的 `read`/`write`/`grep`/`glob` 行为。
|
|
5
|
+
- 被测运行时:**本 agent 自己所在的活体实例** —— `dsh web` @ `http://127.0.0.1:4999`(`DSH_WEB_URL`),`DSH_HOME=/home/u1/workspaces/dashr/.dsh-test`,session id `session-92ef9c82-fbf8-4b71-87af-a92125e0734c`,cwd `/home/u1/workspaces/dashr`,agentPreset `standard`。
|
|
6
|
+
- 方法:**第一人称实测**——全部调用由本 agent 在真实 runtime 中发出(`read`/`write`/`grep`/`glob` 工具 + `eval` pad 内 `await tool.*`),无静态推断、无人工转写返回值。`dvc://` 写路径的"是否真落地"由回读文件系统二次确认。
|
|
7
|
+
- change:无(本轮为既有能力的系统冒烟,非某个 change 的验收)。
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 0. 结论
|
|
12
|
+
|
|
13
|
+
> **gates 标签(2026-09-13 补)**:本报告实测于 `urlSchemes: true + hashline: true`(DASHR read 包装在场)。「六 scheme read 全可达 6/6」仅在该组合下成立;`hashline: false` 下的可达性矩阵见《2026-09-13-hashline-off下scheme可达性工具面不对称-实测报告.md》。
|
|
14
|
+
|
|
15
|
+
| 判定项 | 结果 |
|
|
16
|
+
|---|---|
|
|
17
|
+
| 六类 scheme 在 `read` 上全部可达 | ✅ 6/6 |
|
|
18
|
+
| 未登记 scheme / 已登记只读 scheme 的写拦截 | ✅ 三类错误各自精确(`URL_READ_ONLY` / `URL_WRITE_UNSUPPORTED` / `URL_UNREGISTERED_SCHEME`) |
|
|
19
|
+
| `dvc://` 写是否**真实执行**(非 dry-run 空转) | ✅ `ast_edit` `dryRun:false` 改写落盘,回读确认 |
|
|
20
|
+
| 选择器四形态(`:raw` / `:N-M` / `:path/` / `?q=`) | ✅ 基本全通;目录列表上的 `?q=` 不过滤(§3.3) |
|
|
21
|
+
| `http(s)://` selector-exempt(端口/查询不误解析) | ✅ `:443` 与 `?x=1` 均原样进请求 |
|
|
22
|
+
| 内容型 scheme 的 `grep`/`glob` 支持 | ⚠️ `grep` 经 `/dev/shm` 物化可用;`glob` 的 URL-in-`path` 分支在 `dsh://docs` 上失效(§3.4) |
|
|
23
|
+
| **`dvc://` 结果的 wire 可见性** | ❌ **缺口**:`write` 渲染面只输出 `Executed dvc://<device>`,设备 payload 仅存在于结构化 `after` 字段(§3.1) |
|
|
24
|
+
|
|
25
|
+
**一句话**:六类 scheme 功能面完整、错误分类精确、`dvc://` 写是真执行;唯二值得处理的是 **`dvc://` 设备结果在渲染文本里丢失**(直接影响 `ast_grep`/`lsp`/`browser` 的可用性),以及 **`glob` 在 `dsh://docs` 上的 path 分支空转**。
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 1. 被测对象与环境事实
|
|
30
|
+
|
|
31
|
+
| 项 | 值 |
|
|
32
|
+
|---|---|
|
|
33
|
+
| 运行时 | `DSH_HOME=/home/u1/workspaces/dashr/.dsh-test`;`DSH_SESSION_ID=session-92ef9c82-fbf8-4b71-87af-a92125e0734c`;`DSH_SHELL=1` |
|
|
34
|
+
| GUI 端点 | `http://127.0.0.1:4999`(监听于 `127.0.0.1`);直连无 token 返回 **401** `dsh web authentication required; reopen the URL printed by dsh web.`(≈133 B,空 `<title>`) |
|
|
35
|
+
| 方案单源 | `dashr/src/url-schemes/catalog.ts` 的 `SCHEME_CATALOGUE`(六条、`SCHEME_NAMES` 排序后 = `agent, ctx, dsh, dvc, http, https, skill`) |
|
|
36
|
+
| 实现入口 | `dashr/src/url-schemes/index.ts`(挂载)、`resolver.ts`(端到端解析)、`selector.ts`(统一选择器)、`handlers/*`(六 scheme)、`tools/{read,write,grep,glob,materialize}.ts`(工具改写) |
|
|
37
|
+
| 设备实现 | `vendored/devices/ast/ast-device.ts`(`ast_edit`/`ast_grep`)、`vendored/devices/browser/browser-device.ts`、`vendored/devices/lsp/lsp-device.ts` |
|
|
38
|
+
| 已核 ctx 快照 | `ctx://session`:segments(live 0–34)、`system_prompt.chars = 0`、totals 与后续增长一致 |
|
|
39
|
+
| 临时物化 | `grep` 对 URL 内容物化到 `/dev/shm/dashr-url-*/content.txt`;调用后目录被清理(收尾核 `/dev/shm` 为空) |
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 2. 逐 scheme 实测矩阵
|
|
44
|
+
|
|
45
|
+
| Scheme | 已测形式 | 实测结果 |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| `skill://` | 裸根;`skill://dsh-dev-skill`;`/SKILL.md`;`/chapters/ch01-user-guide.md`;`:1-4`;`glob` 列目录 | 裸根 → `skill "" is unknown or no longer available`;`dsh-dev-skill` → 全文(= `.agents/skills/cordis-dsh-dev/SKILL.md`);子文件可读;`:1-4` 正确截 4 行;`glob` 返回 26 个真实相对路径 |
|
|
48
|
+
| `agent://` | 裸根;`agent://<原始id>`;`<原始id>/transcript`;`:1-8`;`agent://<label>`;含 `:` 的 label | 裸根 → `no agents`(无子 agent 时)/ 之后为 4 列表格;settled child 原始 id → 产出物 `pong`;live child transcript 可读并可开窗;label 可寻址;含 `:` 的 label → 选择器解析错误(§3.5) |
|
|
49
|
+
| `dsh://` | 裸根;`/docs`;`/docs/subsystems`;`/docs/subsystems/slots.md?q=priority`;`/config`;`:path/` 点路径(含数组下标) | 裸根 → `expected "docs" or "config"`;目录列 JSON 数组;文件可读;`?q=priority` → 3 行命中;`/config` → 完整配置 JSON;`:path/permission.defaultPreset` → `workspace-write`;`:path/llm-deepseek.models.0.id` → `deepseek-flash` |
|
|
50
|
+
| `ctx://` | 裸根;`transcript`;`system`;`thinking[0]`;`user_prompts[0]`;`tool_calls[n]`;`agent_responses[0]`;`injections:raw`;`compactions`;`:raw:N-M` | 全部可读;`[n]` 按 0 基序号或事件 seq 双寻址;越界报错带集合长度;`compactions` 无内容 → `(no compactions recorded)`;`:raw:1-3` ≡ `:1-3` |
|
|
51
|
+
| `dvc://` | 裸根;设备文档(4 个);`write` 执行(`ast_grep`/`ast_edit`/`browser`);非法参数;尾部 `/sub` | 裸根 → 4 行设备表;设备文档 + usage 提示;写执行见 §4;非法 JSON → 带解析信息的错误;`dvc://browser/ignored-sub` → 仍返回 browser 文档(首段寻址) |
|
|
52
|
+
| `http(s)://` | `read` 原始 GET;`web_fetch` 解码;`?x=1`;`:443`;loopback | `read https://example.com` → 原始 HTML(带 `[url-fetch]` 前缀);`web_fetch` → 解码纯文本;查询与端口均原样保留;`127.0.0.1` 被拒(§3.6) |
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 3. 关键发现
|
|
57
|
+
|
|
58
|
+
### 3.1 `dvc://` 设备结果在 wire 渲染面上不可见(唯一实质性缺口)
|
|
59
|
+
|
|
60
|
+
`tools/write.ts` 对 `dvc://` 写构造 `WriteOutcome{ operation:'execute', after: JSON.stringify(result,null,2) }`,但 `render` 只输出:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
const verb = … value.operation === 'execute' ? 'Executed' : …
|
|
64
|
+
return [{ type: 'text', text: `${verb} ${value.path}` }]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
→ 渲染文本恒为 `Executed dvc://ast_grep`。设备 payload 只在结构化 `after` 里。
|
|
68
|
+
|
|
69
|
+
实测对照(同一次 `ast_grep` 调用):
|
|
70
|
+
|
|
71
|
+
- 直接 `write dvc://ast_grep` → 模型侧只看到 `Executed dvc://ast_grep`;
|
|
72
|
+
- `eval` pad 内 `await tool.write({"file_path":"dvc://ast_grep", …})` → 完整 JSON:`totalMatches:143`、`filesWithMatches:28`、`filesSearched:162`、`limitReached:true`、`matches[]`(含 `byteStart/startLine/…`)、`parseErrors[]`。
|
|
73
|
+
|
|
74
|
+
**影响**:模型直调 `ast_grep`/`lsp`/`browser` 拿不到任何结果数据(既无匹配也无报错),而这三个设备恰是输出价值最高的三个。建议 `write.ts` 的 device 分支把 payload 一并渲染进文本(或以可读摘要进文本、全量进 structure)。这是本轮唯一建议改代码的点。
|
|
75
|
+
|
|
76
|
+
### 3.2 `skill://` 按 frontmatter 名寻址,而非目录名
|
|
77
|
+
|
|
78
|
+
`skill://dsh-dev-skill` 命中,其解析路径为 `.agents/skills/cordis-dsh-dev/`——目录名 `cordis-dsh-dev` 反而不被接受(`skill "cordis-dsh-dev" is unknown`)。同理 `superpowers`(顶层无 `SKILL.md`)不可寻址,裸 `skill://` 亦报未知。属正确语义(skill 名 = frontmatter `name`),但"猜目录名"是最自然的错误路径,可考虑错误信息附带候选名提示。
|
|
79
|
+
|
|
80
|
+
### 3.3 `?q=` 在目录列表上不过滤
|
|
81
|
+
|
|
82
|
+
- `dsh://docs/subsystems/slots.md?q=priority` → 正确返回 3 行命中(含行号与上下文);
|
|
83
|
+
- `dsh://docs/subsystems?q=slots` → 返回**未过滤**的完整 98 项目录列表。
|
|
84
|
+
|
|
85
|
+
即查询选择器只在"文件内容"语义下生效,目录列表(JSON 数组)上的 `?q=` 静默失效。建议改为:JSON 无匹配路径时对列表做行过滤,或明确忽略时给出提示。
|
|
86
|
+
|
|
87
|
+
### 3.4 `glob` 的 URL-in-`path` 分支在 `dsh://docs` 上空转
|
|
88
|
+
|
|
89
|
+
`tools/glob.ts` 头注声称 "path-backed schemes (`skill://`, `dsh://docs`) implement the handler's optional `resolvePath`",但实测:
|
|
90
|
+
|
|
91
|
+
- `glob({path:"skill://dsh-dev-skill", pattern:"ch01*.md"})` → ✅ 1 个文件(pattern 生效,any-depth 语义正确);
|
|
92
|
+
- `glob({path:"dsh://docs/subsystems", pattern:"slots.md"})` → ❌ `(no output)`。
|
|
93
|
+
|
|
94
|
+
对照 `glob({pattern:"dsh://docs/subsystems"})` → ✅ 返回列表(content-backed "非空行即列表" 分支)。结论:`dsh://docs` 实际走 content-backed,`glob-in-path` 把列表 JSON 物化成 `content.txt` 后自然搜不到 `slots.md`。**头注与实现不符(注释过期)**,建议二选一:给 dsh docs 补 `resolvePath`,或订正注释。
|
|
95
|
+
|
|
96
|
+
### 3.5 含 `:` 的 agent label 无法寻址
|
|
97
|
+
|
|
98
|
+
`agent://Dummy child for agent:// test` → `invalid line selector ":// test" — expected N, N-M, or N-M,N2-M2`。原因是 `parseUrl` 的 path 截断在第一个 `:`,label 中的 `://` 被当成选择器。**原始 session id 始终可寻址**(本轮据此拿到 settled child 的 `pong` 产出物)。属方案语法的固有边界,值得在 `agent://` 文档里点明"label 含 `:` 时请用原始 id"。
|
|
99
|
+
|
|
100
|
+
### 3.6 `http(s)://` 的两条路径与 SSRF 门
|
|
101
|
+
|
|
102
|
+
- `read https://example.com` → 原始 curl 式 GET(返回完整 HTML,前缀 `[url-fetch] plain-text result of a direct HTTP GET (curl-equivalent). No JS execution or interaction`);
|
|
103
|
+
- `web_fetch https://example.com/` → 解码后的纯文本;
|
|
104
|
+
- `read https://example.com:443/` 与 `?x=1` → 原样进请求(selector-exempt 生效,未误判为行选择器/点路径);
|
|
105
|
+
- `web_fetch http://127.0.0.1:4999/` → ❌ `URL hostname "127.0.0.1" resolves to a non-public IP address`(私网/回环 SSRF 门,与官方文档 Ch1 "web_fetch to literal private addresses is refused" 一致);
|
|
106
|
+
- `dvc://browser` 走设备路径**可合法访问 loopback**:`open http://127.0.0.1:4999` → `{ok:true,url:"http://127.0.0.1:4999/",title:""}`;页内求值 `document.title` → `""`、`bodyLen:133`。经 curl 侧核验,该 133 B 即 **401 认证栅栏文本**——浏览器探针到达了服务端但未携带 token(预期行为,非传输故障)。
|
|
107
|
+
|
|
108
|
+
### 3.7 错误分类精确、可直接排障
|
|
109
|
+
|
|
110
|
+
| 触发 | 返回 |
|
|
111
|
+
|---|---|
|
|
112
|
+
| `write ctx://session/transcript` | `ctx:// is a curated read-only snapshot — write to ctx://session/transcript is not supported`(`URL_READ_ONLY`) |
|
|
113
|
+
| `write skill://dsh-dev-skill/SKILL.md` | `write to skill:// is not supported (read-only scheme, or its write channel is not wired yet)`(`URL_WRITE_UNSUPPORTED`) |
|
|
114
|
+
| `write foo://bar` | `no handler registered for scheme "foo" (registered: agent, ctx, dsh, dvc, http, https, skill)` |
|
|
115
|
+
| `read dvc://nope` | `unknown device: nope` |
|
|
116
|
+
| `read ctx://session/tool_calls[999]` | `no such element (collection "tool_calls" has 40 items, 0-based; labels are event seqs)` |
|
|
117
|
+
| `write dvc://ast_grep`(非 JSON) | `dvc:// write dispatch: device "ast_grep" requires a JSON args payload (Unexpected token 'h', "this is not json" is not valid JSON)` |
|
|
118
|
+
| `dvc://lsp`(action 缺失 / 二进制缺失) | 先 `unknown action null — expected "diagnostics", "definition", "references", "hover", or "format"`;补 `action` 后 → `language server binary "typescript-language-server" not found … — npm install -g typescript-language-server typescript` |
|
|
119
|
+
| `dvc://browser`(action 缺失) | `unknown action null — expected "open", "run", or "close"` |
|
|
120
|
+
|
|
121
|
+
### 3.8 临时物化无残留
|
|
122
|
+
|
|
123
|
+
`grep` 对 `dsh://docs/subsystems/slots.md` 的搜索把内容物化到 `/dev/shm/dashr-url-c2cNM0/content.txt` 后由 `finally` 清理;收尾核 `/dev/shm` 已空。符合 `tools/materialize.ts` 的设计(shm 优先、>8 MiB 回退 `os.tmpdir()`)。
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 4. `dvc://` 写路径的真执行证据(核心)
|
|
128
|
+
|
|
129
|
+
### 4.1 `ast_edit`(`dryRun:false`)真实落盘
|
|
130
|
+
|
|
131
|
+
目标 scratch 文件(写前):
|
|
132
|
+
|
|
133
|
+
```js
|
|
134
|
+
export function greet(name) {
|
|
135
|
+
return `hello ${name}`
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function farewell(name) {
|
|
139
|
+
return `bye ${name}`
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
调用:
|
|
144
|
+
|
|
145
|
+
```json
|
|
146
|
+
{"ops": [{"pat": "export function farewell($N) { $$$B }",
|
|
147
|
+
"out": "export function goodbye($N) { $$$B }"}],
|
|
148
|
+
"paths": ["/home/u1/workspaces/dashr/.scratch/dvc-scheme-test.js"],
|
|
149
|
+
"dryRun": false}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
回读(写后):
|
|
153
|
+
|
|
154
|
+
```js
|
|
155
|
+
export function greet(name) {
|
|
156
|
+
return `hello ${name}`
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function goodbye(name) { return `bye ${name}` }
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
→ 函数名改写 + ast-grep 单行重排均落盘,**证明这是真执行而非空转**。(该 scratch 文件在收尾时已删除。)
|
|
163
|
+
|
|
164
|
+
### 4.2 `ast_grep` 结构化输出(经 eval pad 取得)
|
|
165
|
+
|
|
166
|
+
```json
|
|
167
|
+
{ "totalMatches": 143, "filesWithMatches": 28, "filesSearched": 162,
|
|
168
|
+
"limitReached": true,
|
|
169
|
+
"matches": [ { "path": "../../dashr/src/url-schemes/vendored/hashline/contract.js",
|
|
170
|
+
"text": "export function isNormalizedEdit(input) { … }",
|
|
171
|
+
"byteStart": 775, "byteEnd": 877, "startLine": 15, "startColumn": 1,
|
|
172
|
+
"endLine": 17, "endColumn": 2 }, … ],
|
|
173
|
+
"parseErrors": [ "…: url-schemes/vendored/devices/lsp/defaults.json: GenericFailure, Invalid pattern: Multiple AST nodes are detected…" ] }
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
(`parseErrors` 出现在 `patterns` 含多节点模式时,属预期:该 pattern 在 JSON 文件上不成立。)
|
|
177
|
+
|
|
178
|
+
### 4.3 `dvc://` 首段寻址
|
|
179
|
+
|
|
180
|
+
`read dvc://browser/ignored-sub` → 仍返回 browser 设备文档,证实 `catalog.ts` 所述"`dvc://` 只按第一段寻址,尾部 `/sub` 被解析后丢弃"。
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## 5. 遗留与建议(按优先级)
|
|
185
|
+
|
|
186
|
+
1. **【建议改码】`dvc://` 设备 payload 进渲染文本**(§3.1)——否则 `ast_grep`/`lsp`/`browser` 对模型是"看得见工具、看不见结果"。当前唯一绕行 = 在 `eval` cell 内 `await tool.write(...)` 取 `after`。
|
|
187
|
+
2. **【建议改码或订正注释】`glob` 的 `dsh://docs` path 分支**(§3.4)——头注声称 path-backed,实际 content-backed 空转。
|
|
188
|
+
3. **【建议改码】目录列表上的 `?q=`**(§3.3)——静默失效,至少应给提示。
|
|
189
|
+
4. **【文档】`skill://` 按 frontmatter 名寻址**、**`agent://` label 含 `:` 需用原始 id**(§3.2/§3.5)——两条最易踩,建议进 `agent://`/`skill://` 的模型面说明或错误信息附提示。
|
|
190
|
+
5. **【无需动作】** `http(s)` 私网拒绝、`ctx://` 只读、`dvc://` 尾段丢弃、临时物化清理——均为设计内行为,已复核无异常。
|
|
191
|
+
6. **【未覆盖】** 本轮未测:`dvc://lsp` 的 `definition/references/hover/format` 成功路径(缺 `typescript-language-server`,仅验到报错分支)、`http(s)` 的重定向/压缩/大响应物化、`ctx://` 分片(compaction 后多 segment)形态。留待后续按需补测。
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## 附:证据来源
|
|
196
|
+
|
|
197
|
+
- 全部返回值取自本 session(`session-92ef9c82…`)在 `DSH_HOME=/home/u1/workspaces/dashr/.dsh-test` 下的活体调用;`ctx://session/tool_calls[n]` 事后可回放本轮每一次调用与其结果。
|
|
198
|
+
- 源码核验:`dashr/src/url-schemes/{catalog,selector,resolver,index}.ts`、`handlers/{agent,ctx,dsh,dvc,skill,http}.ts`、`tools/{read,write,grep,glob,materialize}.ts`、`vendored/devices/ast/ast-device.ts`、`vendored/devices/browser/browser-device.ts`。
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# hashline:false 配置下 URL scheme 可达性的**工具面不对称** — 实测报告
|
|
2
|
+
|
|
3
|
+
- 日期:2026-09-13
|
|
4
|
+
- 被测对象:`dashr/src/url-schemes/` 七类 URL scheme(`skill://`、`agent://`、`dsh://`、`ctx://`、`dvc://`、`http(s)://`)在**当前活体配置**下的 `read`/`grep`/`glob`/`write` 行为。
|
|
5
|
+
- 被测运行时:**本 agent 自己所在的活体实例** —— `dsh web` @ `http://127.0.0.1:4999`,`DSH_HOME=/home/u1/workspaces/dashr/.dsh-test`,`DSH_SESSION_ID=session-1ae1181e-abb7-4d59-939e-f5e0400a4258`,cwd `/home/u1/workspaces/dashr`。
|
|
6
|
+
- 方法:**第一人称实测**。全部调用由本 agent 在真实 runtime 中发出(`read`/`grep`/`glob`/`write` 工具),无静态推断。被观测返回值原文摘录于 §3。
|
|
7
|
+
- change:无(系统冒烟,非某 change 的验收)。
|
|
8
|
+
- 关联:`2026-09-12-fs-scheme-resolution-实测报告.md`、`2026-09-12-url-schemes-六scheme冒烟与边界实测报告.md`(差异见 §5)。
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 0. 结论速览
|
|
13
|
+
|
|
14
|
+
| 判定项 | 结果 |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `dsh://` / `dvc://` / `http://` 在 `read` 上可达 | ✅ |
|
|
17
|
+
| `skill://` 在 `read` 上 | ✅ **已收口(2026-09-13 user 裁决后返工)**:不再查 registry——`isSessionLayerScheme` 在 `wrap.ts` 与 `sandbox-plugin.ts` 双处纳入 `skill://`,直接抛结构化 `CTX_SESSION_LAYER` 边界错误,文案可执行(指 `skill` 工具 / `grep`,`glob path=skill://…`);活的假 "unknown" 消失,`sessionCwd`/`scopedAwareSkills`/`URL_SKILL_NOT_INVOCABLE_SCOPE` 死代码在 src/副本/活体 bundle 全 0 命中(user 第二轮亲自复验) |
|
|
18
|
+
| `https://` 在 `read` 上可达 | ✅ 已修(`HTTP_SCHEMES` 循环登记)并两轮复验存活 |
|
|
19
|
+
| 同一批 scheme 在 `grep`/`glob` 上可达 | ✅ `ctx://`、`agent://`、`skill://`、`https://` 全部可达(§2、§3) |
|
|
20
|
+
| 根因 | **`hashline:false` 使 DASHR 的 `read` 包装不安装 → `read` 退化为平台原生工具 → 只剩 FS 层 resolver;`grep`/`glob`/`write` 包装仅由 `urlSchemes` 门控,仍在场 → 走工具层 resolver** |
|
|
21
|
+
|
|
22
|
+
**一句话**:不是 scheme 坏了,是**同一实例里 `read` 与 `grep`/`glob`/`write` 分属两套 resolver**。`hashline:false` 配置下,会话型(`ctx://`/`agent://`)只经 `grep`/`glob` 抵达,`read` 是死的;`https://` 更因 FS 层只登记了 `http` 而整条断掉。
|
|
23
|
+
|
|
24
|
+
> **2026-09-13 收口更新(user 第二轮复验确认)**:`https://` 已修(两轮活体存活);`skill://` 按业务逻辑归属裁决重分类为会话型边界(§4 P1-skill 处置块),行为收窄(全局技能亦不在 FS 层解析)但文案已指替代路径,`grep`/`glob` 回退复验通过。
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 1. 环境与配置锚定
|
|
28
|
+
|
|
29
|
+
### 1.1 配置来源(profile 层唯一)
|
|
30
|
+
|
|
31
|
+
`.dsh-test/profiles/web/cordis.patch.yml`(0.1.5-rc.2 无 home patch 层,故 `.dsh-test/cordis.patch.yml` 空):
|
|
32
|
+
|
|
33
|
+
```yaml
|
|
34
|
+
- id: dashr-repl
|
|
35
|
+
config:
|
|
36
|
+
python: !!js process.env.DASHR_KERNEL_PYTHON ?? 'python3'
|
|
37
|
+
snapshotDir: /home/u1/workspaces/dashr/.dsh-test/snapshots
|
|
38
|
+
hashline: false # ← 关键
|
|
39
|
+
urlSchemes: true
|
|
40
|
+
|
|
41
|
+
- id: fs-sandbox
|
|
42
|
+
name: './node_modules/better-dsh/lib/fs-aware/sandbox-plugin.js'
|
|
43
|
+
config:
|
|
44
|
+
urlSchemes: true
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 1.2 活体日志佐证
|
|
48
|
+
|
|
49
|
+
`.scratch/dsh-4999.log`(每个 session-start 一行):
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
DEBUG-INSTALL gates: {"urlSchemes":true,"hashline":false}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 1.3 工具面身份判定(决定性)
|
|
56
|
+
|
|
57
|
+
当前 `read` 工具**不是** DASHR 的 URL-aware read:
|
|
58
|
+
|
|
59
|
+
| 证据 | 值 |
|
|
60
|
+
|---|---|
|
|
61
|
+
| 工具入参名 | `file_path`(DASHR 包装用 `path`,见 `url-schemes/tools/read.ts:92`) |
|
|
62
|
+
| 输出形态 | 行号前缀 `N: content`(DASHR 包装 scheme 分支返回原文、文件分支返回 `HASH│content`) |
|
|
63
|
+
| 包装注册门 | `url-schemes/index.ts:188` `if (gates.hashline) { …register(createReadTool…) }` → `hashline:false` 即不注册 |
|
|
64
|
+
| 注释自证 | `index.ts:158-159`:**"`hashline: false` → read wrapper 不安装(captured 原生 read 独立站立,scheme 解析由挂载的 FS 后端承担)"** |
|
|
65
|
+
|
|
66
|
+
`grep`/`glob`/`write` 的注册门是 `urlSchemes`(`index.ts:197`、`266-268`),故**仍在场**,走工具层 resolver。实测 `write dsh://config` 报的是 `url-schemes/tools/write.ts:130` 的文案、`write dvc://ast_grep` 成功派发,均可交叉印证工具层包装在场。
|
|
67
|
+
|
|
68
|
+
### 1.4 两套 resolver 的登记差异(根因表)
|
|
69
|
+
|
|
70
|
+
| resolver | 构造点 | 登记 schemes | 环境字段 |
|
|
71
|
+
|---|---|---|---|
|
|
72
|
+
| **工具层**(read/grep/glob/write 包装消费) | `url-schemes/index.ts:283-328` | `skill`、`agent`、`dsh`、`dvc`、`ctx`、**`HTTP_SCHEMES = ['http','https']`** | `{ agent, cwd, rawUrl }`(`tools/read.ts:119-121`、`tools/grep.ts:69`) |
|
|
73
|
+
| **FS 层**(原生 read/grep/glob 经 `ctx.fs` 消费) | `fs-aware/wrap.ts:49-59` | `skill`、`dsh`、`dvc`、**仅字面 `http`** | 仅 `{ fs, rawUrl }`(`wrap.ts:81`,**无 agent/cwd**) |
|
|
74
|
+
| **FS 层会话型守卫** | `wrap.ts:37-46`、`99-115` | `ctx://`/`agent://` → 结构化 `CTX_SESSION_LAYER` | — |
|
|
75
|
+
|
|
76
|
+
两处差异直接产生全部四个失败:`https` 未登记、`ctx`/`agent` 被守卫、`skill` 缺 `cwd`+`scope`。
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 2. scheme × 工具 可达性矩阵
|
|
81
|
+
|
|
82
|
+
(✅ 实测可达;❌ 实测失败;`—` 本轮未测)
|
|
83
|
+
|
|
84
|
+
| scheme | `read`(原生 / FS 层) | `grep`(工具层) | `glob`(工具层) | `write`(工具层) |
|
|
85
|
+
|---|---|---|---|---|
|
|
86
|
+
| `dsh://` | ✅ 列表/配置/选择器 | ✅(`path: dsh://docs` 命中 4 行) | ✅(`dsh://docs/subsystems` → 116 文件) | ❌ 只读(`tools/write.ts:130`) |
|
|
87
|
+
| `dvc://` | ✅ roster + 各设备文档 | — | — | ✅ 三设备真派发(`ast_grep`/`ast_edit`/`browser`) |
|
|
88
|
+
| `http://` | ✅(`example.com` 抓回) | — | — | ❌ 只读 |
|
|
89
|
+
| `https://` | ❌ **未登记** | ✅(`example.com` 命中) | — | — |
|
|
90
|
+
| `skill://` | ❌ **unknown** | ✅(`book-to-skill` 命中 560 行/约 130 文件) | ✅(全部文件路径列出) | ❌ 只读 |
|
|
91
|
+
| `ctx://` | ❌ **边界错误** | ✅(`user_prompts[0]` 命中本轮首条 prompt) | — | — |
|
|
92
|
+
| `agent://` | ❌ **边界错误** | — | ✅(物化到 `/dev/shm`) | — |
|
|
93
|
+
|
|
94
|
+
`dsh://` 选择器四形态在 `read` 上全通:`:N-M`、`:raw`(与 `:raw:N-M` 等价)、`:path/agent-loop`、`?q=`。
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 3. 原始观测(判定依据,原文摘录)
|
|
99
|
+
|
|
100
|
+
### 3.1 `read` 侧四个失败
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
read dsh://docs → ✅ 251 条文档索引
|
|
104
|
+
read dsh://config:path/agent-loop → ✅ {"maxParallelToolCalls":10}
|
|
105
|
+
read dsh://docs/tool-catalog.md?q=ui-deliverables → ✅ 过滤命中 1 行
|
|
106
|
+
|
|
107
|
+
read skill://book-to-skill → ❌ skill "book-to-skill" is unknown or no longer available
|
|
108
|
+
read skill://book-to-skill/SKILL.md → ❌ 同上(子路径无效,仍是 registry 查无此名)
|
|
109
|
+
read ctx://session/transcript:1-8 → ❌ CTX_SESSION_LAYER: session-layer scheme — read it through the read tool (…)
|
|
110
|
+
read ctx://session/compactions → ❌ 同上
|
|
111
|
+
read agent:// → ❌ 同上
|
|
112
|
+
read https://example.com → ❌ no handler registered for scheme "https" (registered: dsh, dvc, http, skill)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
后者的 `registered: dsh, dvc, http, skill` 是 **FS 层 resolver 的登记表**,直接坐实 `read` 走的是 FS 层。
|
|
116
|
+
|
|
117
|
+
### 3.2 `grep`/`glob` 侧全通(反证)
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
grep path=skill://book-to-skill pattern=^# → ✅ 560 matches(真实落到 .agents/skills/book-to-skill/*)
|
|
121
|
+
glob path=skill://book-to-skill pattern=* → ✅ 约 130 条文件路径
|
|
122
|
+
grep path=ctx://session/user_prompts[0] pattern="test your tools"
|
|
123
|
+
→ ✅ 1 match:/dev/shm/dashr-url-UTBpHR/content.txt:2
|
|
124
|
+
grep path=https://example.com pattern="Example Domain"
|
|
125
|
+
→ ✅ 1 match:/dev/shm/dashr-url-NqMEfC/content.txt:3
|
|
126
|
+
glob path=agent:// pattern=* → ✅ /dev/shm/dashr-url-6h2V9Y/content.txt
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
并可见 `ctx://` 选择器语法细节:集合下标是 **0-based 方括号**,标签为事件 seq:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
grep path=ctx://session/user_prompts pattern=… → ❌ ctx://…[]: no such element
|
|
133
|
+
(collection "user_prompts" has 2 items, 0-based; labels are event seqs)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### 3.3 `write` 侧
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
write dsh://config {…} → ❌ write to dsh:// is not supported (read-only scheme, or its write channel is not wired yet)
|
|
140
|
+
write dvc://ast_grep {patterns:[…] path:/abs} → ✅ 结构化 payload 完整渲染(含 matches/totalMatches/parseErrors)
|
|
141
|
+
write dvc://ast_edit {ops:[…] dryRun:true} → ✅ {"applied": false, …}(dryRun 生效,未落盘)
|
|
142
|
+
write dvc://browser {"action":"open"|"close"} → ✅ {"ok":true,"url":"about:blank"} / {"ok":true}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**`dvc://` 设备 payload 已被完整渲染进工具结果**(见 §5 与旧报告的差异)。
|
|
146
|
+
|
|
147
|
+
### 3.4 旁路发现
|
|
148
|
+
|
|
149
|
+
1. **`dvc://` 设备相对路径以服务端 cwd 为根,不是会话 workspace。** `path:"."` 全量搜了 monorepo checkout(6950 文件,返回 `../../dashr/src/...`);`path:"dashr/src"` 直接 `Path not found`;绝对路径才命中(163 文件)。设备 cwd = `upstream/deepseek-harness`。
|
|
150
|
+
2. **`ast_grep` 的 `export function $NAME` 形态静默 0 命中**,而 `function $NAME` 在同一路径命中 646。导出声明的 pattern 形态在本 vendored 实现下**不报错也不匹配**(部分语言另报 `Multiple AST nodes are detected`)。
|
|
151
|
+
3. **发布面残留调试日志**:`url-schemes/index.ts:154` 与 `:337` 仍有 `console.log('DEBUG-INSTALL …')`,并已在 4999 日志里逐 session 打印。
|
|
152
|
+
4. **会话指引与部署面不符**:本 session 收到的 URL scheme 指引把 `read` 描述为 `HASH│content` 锚点读;`hashline:false` 下实际是原生行号读。指引来源疑为 `renderGeneralSectionText()` / `generalSection()`(`index.ts:263`、`catalog.ts:135`),建议门控对齐。
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## 4. 发现清单
|
|
157
|
+
|
|
158
|
+
### P1 — `https://` 在 FS 层未登记(一行修复,✅ 2026-09-13 复验存活)
|
|
159
|
+
|
|
160
|
+
`fs-aware/wrap.ts:57` 写死 `resolver.register('http', createHttpHandler())`,而工具层正确循环 `HTTP_SCHEMES = ['http','https']`(`handlers/http.ts:45`)。`hashline:false` 时 FS 层是 `read` 的唯一路径 → `read https://…` 恒失败。修法:`buildFsLayerResolver` 同样 `for (const s of HTTP_SCHEMES) resolver.register(s, handler)`。skill:// 重分类重构后复验:`read https://example.com` 正常抓取(session 60418790)。遗留小项(与本次无关,记录在案):`read https://example.com:1-3` 这类**把行选择器写进 URL** 的形态会整串进 `new URL()` 报 invalid URL——http handler 不剥选择器后缀,dsh handler 剥(`dsh://docs:1-3` 正常);属探针写法与既有限制,非本次回归。
|
|
161
|
+
|
|
162
|
+
### P1 — `skill://` 在 FS 层丢失 agent/cwd(workspace 技能全不可见)
|
|
163
|
+
|
|
164
|
+
`wrap.ts:81` 只给 `{ fs, rawUrl }`;`handlers/skill.ts:106-113` 的 `lookupOptions` 需要 `cwd` + `scope`,两者皆缺时 workspace 作用域技能层读作 absent → 全部 `unknown`。FS 层结构性拿不到 agent,所以要么把 skill 解析留在工具层、要么在 `hashline:false` 下补一条 scheme 呈现通道。
|
|
165
|
+
|
|
166
|
+
> **处置(2026-09-13 user 裁决后重定方向,推翻本报告早前的"补通道"方案)**:第一版补通道(sessionCwd 配置 + scopedAware list 启发式)经活体证伪——dump-config 实证 **dsh-web-app bundle patch 在宿主层 disable 了 `skill-filesystem`/`tool-skill`**,web profile 全局层没有任何 skill provider,list 与 get 同空,启发式从未命中(A/B 活体:user-global 的 `skill://markitdown` 与 project 的 `skill://book-to-skill` 双双 `unknown`,session 8b6dcf85)。根因不是"缺 cwd",而是**技能加载路径解析(CWD/user-global/app 运行时根、扫描深度)是宿主 `dsh-skill-filesystem` 的业务逻辑**,FS 层不得自写近似版。最终处置:`skill://` 重分类为会话层 scheme,FS 层一律答 `CTX_SESSION_LAYER` 边界错误(指名原生 `skill` 工具);`sessionCwd` 配置整体移除;工具层 handler lookup 收敛为 `dsh-tool-skill` 的精确镜像。详见 `2026-09-12-fs-scheme-resolution-实测报告.md` §4d 与 change design.md §D6。
|
|
167
|
+
>
|
|
168
|
+
> **活体复验(session 37899b26 / bfa99754 / f12a206e / 60418790 / 029aa5bb,2026-09-13)**:`read skill://book-to-skill` → 结构化边界错误(指名原生 skill 工具);`read skill://markitdown:1-5` → 同(与技能名无关);**原生 `skill` 工具加载 `book-to-skill` 成功**(完整 `<skill_content>` + resourceBase);`grep path=skill://book-to-skill pattern=^#` → 560 matches(工具层通道完好);`read https://example.com` → 正常抓取(P1-a 存活)。
|
|
169
|
+
>
|
|
170
|
+
> **user 第二轮复验(2026-09-13,第一人称)**:lib 02:32 重建 → 02:33 重启;规范源与副本三文件逐字节一致;`https://` / DEBUG-INSTALL / gate 注释 / `skill://` 收口四项全过;`sessionCwd`、`scopedAwareSkills`、`URL_SKILL_NOT_INVOCABLE_SCOPE` 在 src/副本/**活体 bundle** 三面 **0 命中**;`grep path=skill://` 回退复验通过。user 点评:**"以承认边界替代假装能查"是对的**——上轮 `list({cwd})` 无 scope 读不到 workspace 技能(宿主 `SkillViewOptions` 明写 "omitted reads the global layer alone")本是不可达探针;定性为会话型比修探针干净。行为收窄代价(全局技能亦不在 FS 层解析)已被可执行文案覆盖。user 唯一未亲自引爆文案指向的原生 `skill` 工具(agent probe session f12a206e 已验加载成功)。
|
|
171
|
+
>
|
|
172
|
+
> **user 复验带出两处小瑕疵,本轮已修**:① `sandbox-plugin.ts` 的 `buildResolver` 有**重复的 `register('dsh', …)` 块**(改 skill 块时拼接失误;`register` 是 `handlers.set`,覆盖不抛错,纯死代码)且 `'http'` 仍是字面量未跟 `HTTP_SCHEMES` 对齐(当前非最外层故潜伏,挂载顺序一翻 https 即静默回归)→ **删除私有登记面,`buildResolver` 改为复用 `wrap.ts` 的共享 `buildFsLayerResolver`**(登记单源,双消费方永不再漂移;其 `ctx`/`agent` handler 在本类不可达——前置守卫先拦);② `url-schemes/index.ts` 两个同名 `export interface Config`(sessionCwd 增删残留)→ 并回一个。单测断言同步:https 注册性检查改为网络无关(成功/取数失败皆证登记,唯 "no handler" 才是回归)。收口烟测(session 0335526e,重启后):`skill://` 边界 / `https://` 抓取 / `dsh://docs:1-3` 三连全过;回归 vitest 489/14 基线族、tsc 13、openspec valid。
|
|
173
|
+
|
|
174
|
+
### P2 — `hashline:false` 下会话型 scheme 无 `read` 通道,且注释与事实不符
|
|
175
|
+
|
|
176
|
+
`index.ts:288-290` 声称 *"Session-layer schemes (ctx://, agent://) answer the structured boundary error here; **the read tool's scheme branch keeps serving them with the calling agent's context**"* —— 该 "read tool's scheme branch" 只在 `hashline:true` 时存在。`hashline:false` 下 `ctx://`/`agent://` 在 `read` 上无任何通道(`grep`/`glob` 可用,但那是另一个工具面的补偿,不等于 read 通道)。注释与 `index.ts:158-159` 的 gate 说明应统一。
|
|
177
|
+
|
|
178
|
+
### P2 — 发布前清理 `DEBUG-INSTALL` 调试 `console.log`
|
|
179
|
+
|
|
180
|
+
`url-schemes/index.ts:154`、`:337`。
|
|
181
|
+
|
|
182
|
+
### P3 — `ast_grep` 导出形态 pattern 静默漏报
|
|
183
|
+
|
|
184
|
+
建议在设备文档或实现里显式声明支持的 pattern 形态(或对 0 命中且 pattern 含 `export ` 时给出提示)。
|
|
185
|
+
|
|
186
|
+
### P3 — `dvc://` 设备根目录与会话 workspace 不一致
|
|
187
|
+
|
|
188
|
+
易误伤脚本化调用(相对路径静默落到别的树)。建议设备文档写明"相对路径以服务端 cwd 为根",或与 `ctxFsIO` 的 workspace 对齐。
|
|
189
|
+
|
|
190
|
+
### P3 — 会话指引把 `read` 描述为 `HASH│content` 锚点读,`hashline:false` 下实为行号读
|
|
191
|
+
|
|
192
|
+
`url-schemes-instruction.md`(owner 维护)对 read 输出的描述按 hashline 锚点语义书写;`hashline:false` 活体下 read 实际返回行号形式。建议按 gates 加一句条件说明(2026-09-13 复核:三项 P3 均无变化、未复测,挂账)。
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## 5. 与既有报告的差异(待对齐)
|
|
196
|
+
|
|
197
|
+
| 项 | 既有报告 | 本轮观测 | 研判 |
|
|
198
|
+
|---|---|---|---|
|
|
199
|
+
| `read` 上六 scheme 全可达 | `2026-09-12-url-schemes-六scheme冒烟与边界实测报告.md` §0:**✅ 6/6** | `read` 上 `ctx`/`agent`/`skill`/`https` **全 ❌** | **两次实测的 `gates` 不同**:该报告应以 `hashline:true`(DASHR read 包装在场)跑出;本轮为 `hashline:false`。二者不矛盾,但结论必须带配置标签——"六 scheme 可达"仅在 `hashline:true` 成立 |
|
|
200
|
+
| `glob` 的 URL-in-`path` 分支在 `dsh://docs` 失效 | 同上 §0:⚠️ 失效 | ✅ 正常(`glob path=dsh://docs/subsystems` → 116 文件) | 疑似已修或与 `hashline` 门控相关,建议复测后销项 |
|
|
201
|
+
| `dvc://` 设备 payload 在渲染面丢失 | 同上 §0:❌ 缺口(只输出 `Executed dvc://<device>`) | ✅ payload 完整渲染(§3.3) | **该缺口在当前构建已不复现**,建议销项 |
|
|
202
|
+
| FS 层 = dsh/dvc/http(s),会话型(含 `skill://`)走边界错误 | `2026-09-12-fs-scheme-resolution-实测报告.md` §1/§2(D2) | 一致(skill 已并入会话型族) | ✅ 与本轮 §1.4 吻合;**2026-09-13 起 FS 层登记面 = dsh/dvc/http/https(`HTTP_SCHEMES` 共享 builder),`skill://` 归入会话型边界** |
|
|
203
|
+
| `skill://` 假 "unknown"(本报告 §1.4/探针清单) | —(本报告当时的活体事实) | **✅ 已消灭**:user 第二轮复验(2026-09-13)——规范源/副本/活体 bundle 三面逐字节核验,`sessionCwd`/`scopedAwareSkills`/`URL_SKILL_NOT_INVOCABLE_SCOPE` 全 0 命中;活体 `read skill://…` 恒答可执行边界文案 | **按业务逻辑归属裁决返工**(`4c21c94` + 本轮清理):技能路径解析/扫描深度属宿主 `skill-filesystem`,插件不再自写近似版;user 唯一未亲自引爆的是文案指向的原生 `skill` 工具本身(agent 前序 probe session f12a206e 已验:完整 `<skill_content>` 加载成功) |
|
|
204
|
+
|
|
205
|
+
**建议**:两份 09-12 报告在标题或结论处补注其 `gates.urlSchemes/hashline` 取值,否则后来者会据"6/6"误判 `read` 可用性。
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## 6. 未覆盖面(诚实声明)
|
|
210
|
+
|
|
211
|
+
- `grep` 未测 `dvc://`、`agent://`、`http://`;`glob` 未测 `ctx://`、`http(s)://`、`dvc://`(矩阵中以 `—` 标注)。
|
|
212
|
+
- `write` 仅测 `dvc://`(三设备)与 `dsh://`(只读拦截);未测 `ctx://`/`agent://`/`skill://` 写拦截的具体错误分类器。
|
|
213
|
+
- 未测 `hashline:true` 组合作对照(本轮无该实例),故 §5 的"配置差异"为**推断**,需一次 `hashline:true` 复跑坐实。
|
|
214
|
+
- 未测 `skill://` 的**全局(非 workspace)技能**路径——它们可能不依赖 cwd,若存在则 FS 层 `skill://` 并非全灭。
|
|
215
|
+
- 未覆盖工具:`eval` 桥(`await tool.*` 内调用 scheme)、`present`、`subagent`、`workflow`、`agent_message`、`web_search`、`web_fetch`、`goal_*`、`todo_write`、`ask_user_question`。
|
|
216
|
+
- 未做 `tsc`/`vitest`——本轮是活体冒烟,非 change 验收。
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## 附:探针清单(可复现)
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
# read(原生 / FS 层)
|
|
224
|
+
read dsh://docs
|
|
225
|
+
read dsh://config:path/agent-loop
|
|
226
|
+
read dsh://docs/tool-catalog.md?q=ui-deliverables
|
|
227
|
+
read skill://book-to-skill # ❌ unknown
|
|
228
|
+
read ctx://session/transcript:1-8 # ❌ CTX_SESSION_LAYER
|
|
229
|
+
read agent:// # ❌ CTX_SESSION_LAYER
|
|
230
|
+
read https://example.com # ❌ unregistered
|
|
231
|
+
read http://example.com # ✅
|
|
232
|
+
|
|
233
|
+
# grep / glob(工具层)
|
|
234
|
+
grep path=dsh://docs pattern=trustedHosts
|
|
235
|
+
glob path=dsh://docs/subsystems pattern=*.md
|
|
236
|
+
grep path=skill://book-to-skill pattern='^#'
|
|
237
|
+
grep path=ctx://session/user_prompts[0] pattern='test your tools'
|
|
238
|
+
grep path=https://example.com pattern='Example Domain'
|
|
239
|
+
glob path=agent:// pattern='*'
|
|
240
|
+
|
|
241
|
+
# write(工具层)
|
|
242
|
+
write dvc://ast_grep {"patterns":["function $NAME"],"path":"/home/u1/workspaces/dashr/dashr/src","limit":3}
|
|
243
|
+
write dvc://ast_edit {"ops":[{"pat":"console.log($$$A)","out":"logger.info($$A)"}],"paths":[…],"dryRun":true}
|
|
244
|
+
write dvc://browser {"action":"open","url":"about:blank"} ; write dvc://browser {"action":"close"}
|
|
245
|
+
write dsh://config "nope" # ❌ read-only
|
|
246
|
+
```
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# 2026-09-13-preact-ui-shell 实测报告
|
|
2
|
+
|
|
3
|
+
- change: `2026-09-13-preact-ui-shell`(openspec valid)
|
|
4
|
+
- 依据: `~/workspaces/superd/apps/ui-preact` PoC(2026-09-09,0.1.3-alpha.2 + superd 伺服路径)
|
|
5
|
+
- gates: 测试线 4999,`urlSchemes:true + hashline:false + preact shell build`
|
|
6
|
+
- 结论先行: **shell 渲染引擎已换 Preact**(只 preact,无 @preact/signals——user 2026-09-13 裁决),全上游 UI 语料零改动获得 Preact 渲染;shell index chunk **555,959 → 434,173 B(−21.9%)**;浏览器级 A/B 实测挂载面与 stock 完全一致。
|
|
7
|
+
|
|
8
|
+
## 1. 改动面(全部属 monorepo 本地 patch,不入 upstream git)
|
|
9
|
+
|
|
10
|
+
| # | 改动 | 说明 |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| 1 | `apps/web/vite.config.ts` `resolve.alias` +5 条 | react / react/jsx-runtime / react/jsx-dev-runtime / react-dom / react-dom/client → preact/compat 家族(regex 锚定,防 `react-dom` 先命中 `react`) |
|
|
13
|
+
| 2 | 同文件 `resolve.dedupe` + `'preact'` | dedupe 条目从本包 node_modules 解析——**缺它必挂**:seed importer 在 `packages/client/web/lib`,node 向上走看不到 `apps/web/node_modules/preact`(报 `Could not load preact/compat`) |
|
|
14
|
+
| 3 | `apps/web/package.json` devDeps + `preact@10.29.8` | 精确 pin 对齐 PoC;仅 devDep,发布面无它 |
|
|
15
|
+
| 4 | `vendor/{AGENTS,CLAUDE,README}.md` → `vendor/docs/` | **根除 `vendor/CLAUDE.md` ENOTDIR/exit 236 老坑**(见 §4) |
|
|
16
|
+
|
|
17
|
+
AGENTS.md §二 harness 本地 patch 已记档(换 tag 需重放)。
|
|
18
|
+
|
|
19
|
+
## 2. 体积(实测)
|
|
20
|
+
|
|
21
|
+
| chunk | stock | preact build | Δ |
|
|
22
|
+
|---|---|---|---|
|
|
23
|
+
| `index-*.js`(react 家族 rides index) | 555,959 B | 434,173 B | **−121,786 B(−21.9%)** |
|
|
24
|
+
| `vendor-*.js`(react-free,katex/shiki/markdown 管线) | 740,575 B | 740,575 B | 0(设计内) |
|
|
25
|
+
|
|
26
|
+
## 3. 浏览器级 A/B 验证(playwright,同脚本双跑)
|
|
27
|
+
|
|
28
|
+
| 断言 | stock React build | preact build |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| UI 语料挂载(侧栏/会话列表/Settings/输入框文本) | ✅ 全 | ✅ 全(逐字一致) |
|
|
31
|
+
| `#root button` 数 | 31 | 31 |
|
|
32
|
+
| composer(textarea/contenteditable) | 1 | 1 |
|
|
33
|
+
| console.error | 0 | 0 |
|
|
34
|
+
| shell 内 react-dom 痕迹 | **`version:"18.3.1", rendererPackageName:"react-dom"` banner 在 shell** | **无**(唯一 `react-dom` 字串 = 平台模块种子表键 `{react:Y3, "react-dom":Y3, ...}`——同一个 preact 实例登记两个平台词,设计终态) |
|
|
35
|
+
| pageerror | slot 重复注册 ×1 | slot 重复注册 ×1 |
|
|
36
|
+
|
|
37
|
+
**pageerror 定责(A/B + 发布前验尸修正)**:`settings.general.item` slot id `compaction-tuning` 重复注册在 **stock 上同样存在**(factory id `Ba` vs `f5` 仅 minified 差异)→ 与渲染引擎无关。**根因(publish 前验尸确认)**:canonical 树里有一份**未提交的半成品 compaction-tuning 吸收工作**(`src/compaction/` + `installCompactionTuning` 接线,随 rsync 进入 4999 副本),与 `.dsh-test` profile 仍挂着的 local-plugin 版 compaction-tuning **同 id 注册两次**——两因叠加。该半成品已 `git stash`(带说明消息)移出 0.2.3-e 发布内容,续作时须先摘除 profile 的 local-plugin 行再合入。`better-dsh/client.js` 内的 `react-dom` 匹配为 pnpm 依赖路径字符串(`@tanstack+react-virtual@…_react-dom@18.3.1…`),stock/preact 两面同在,非本体。
|
|
38
|
+
|
|
39
|
+
**user 未亲自引爆项声明**:深交互面(聊天流式渲染、shiki 高亮、markdown 管线)未逐项人工过——零 console.error 为强信号非穷尽证明(PoC 同款边界声明)。
|
|
40
|
+
|
|
41
|
+
## 4. 顺带根除:`vendor/CLAUDE.md` ENOTDIR/exit 236 老坑
|
|
42
|
+
|
|
43
|
+
`vendor/` 根下三个文档文件(AGENTS/CLAUDE/README.md)撞 `pnpm-workspace.yaml` 的 `vendor/*` workspace glob:任何 workspace 枚举器读 `<条目>/package.json`——目录 ENOENT(容忍跳过),**文件 ENOTDIR(炸)**。历史受害面:`npm run build-client`(2026-09-03 记档)、本轮 `npx vite build`(exit 236、裸单行错误)。已移入 `vendor/docs/`(目录无 package.json → ENOENT 跳过)。换 tag 重放时记得同款处理。
|
|
44
|
+
|
|
45
|
+
**新坑记档**:`pnpm add` 之后 `npx vite` 从根解析到 **vite 8/rolldown**(错误形态完全不同)——web 构建一律走 `pnpm run build:web`(workspace 内 vite 6.4.3)。
|
|
46
|
+
|
|
47
|
+
## 5. 范围裁决
|
|
48
|
+
|
|
49
|
+
- **不入 better-dsh npm 发布物**:本 change 是测试线 monorepo 本地 patch。插件若要随发布把 Preact UI 带到 prod,必须附带 preact 前端 dist + web-runtime override 行(PoC 路径 B 已在 0.1.3-alpha.2 验证可行)——代价是 UI 语料冻结在 fork 点,且 prod host(0.1.3-alpha.2)与测试线(0.1.5-rc.2)语料版本错位。**该决定挂 prod host 升级门下,另行裁决。**
|
|
50
|
+
- 因此本轮 npm alpha(0.2.3-e)的插件内容不含 Preact——发布内容 = url-schemes 系(skill:// 收口等)+ 本轮清理。
|