Skip to content

feat(compat): support DSH 0.1.2-alpha.1 source contracts - #105

Open
Grivn wants to merge 1 commit into
mainfrom
codex/adapt-0.1.2-alpha.1
Open

feat(compat): support DSH 0.1.2-alpha.1 source contracts#105
Grivn wants to merge 1 commit into
mainfrom
codex/adapt-0.1.2-alpha.1

Conversation

@Grivn

@Grivn Grivn commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

提交 PR 前请阅读贡献指南Contributing Guide开发和验证指南 / Development and Verification Guide
Before opening a PR, read the Contributing Guide, 贡献指南, and the Development and Verification Guide / 开发和验证指南.
PR 标题和提交信息必须使用 Conventional Commits(type(scope): subject),且不得包含 emoji。 / PR titles and commits must use Conventional Commits (type(scope): subject) and must not contain emoji.

摘要 / Summary

在保留 DSH 0.1.1-rc.2 可复现 npm 基线的同时,新增 0.1.2-alpha.1 源码链接与 CI 验证流程,并适配 Client runtime 拆分、Workspace/locale/slot 契约和统一认证后的 Host RPC API。同步移除失效的 remoteAccess 配置,并以中英文文档记录插件作者需要关注的上游变化。

关联 Issue 或背景 / Related Issue or Context

N/A。该 PR 直接响应维护者对 DSH 0.1.2-alpha.1 插件兼容性研究和适配的请求,属于仓库明确接受的兼容性工作。研究基于 alpha releaserc.2-to-alpha 完整比较

直接影响 Mnemon 的上游变化包括:dsh-client-runtime 被 controller/store/renderer 拆分;Chat slot contract 迁移;Workspace snapshot 删除 recentWorkspaceId;locale ID 开放扩展;Host RPC 删除逐方法 authority;旧 ApiProxy 被 Remote/gateway 取代但通用 Connection channel 保留;subagent 模型与 token 统计调整,而 Mnemon 的 child-local projection shim 仍有必要。

涉及区域 / Affected Areas

  • Host 激活、Headless 或 bundle / Host activation, Headless, or bundle
  • 运行时记忆 / Runtime Memory
  • 项目档案 / Project Documents
  • 记忆体或 Provider / Memory Spaces or Providers
  • 子 Agent 或 Agent 工作流 / Subagent or Agent workflow
  • Web UI 或对话交互 / Web UI or conversation interaction
  • 设置、存储或安全 / Settings, storage, or security
  • CLI、RPC、命令或工具 / CLI, RPC, commands, or tools
  • 安装、更新或发布 / Installation, update, or release
  • 测试、构建或文档 / Tests, build, or documentation
  • 其他(请说明)/ Other (explain below)

PR 类型 / PR Type

  • 面向用户的功能或行为变更 / User-facing feature or behavior change
  • Bug 修复 / Bug fix
  • 增强或优化 / Enhancement or optimization
  • 兼容性适配 / Compatibility change
  • 维护或重构 / Maintenance or refactor
  • 测试或构建 / Tests or build

最新代码确认 / Latest Codebase Confirmation

  • 我已基于最新 main 分支开发,或在提交前已 rebase 或合并最新 main。 / I developed from the latest main, or rebased or merged the latest main before submitting.

同步命令 / Sync command:

git fetch origin main
git rev-list --left-right --count origin/main...HEAD

提交前结果为 0 0,适配分支直接基于最新 origin/main

AI 编码披露 / AI Coding Disclosure

  • 完全 AI 编码:全部编程改动由 AI 产出,并由贡献者接受和审查。 / Fully AI-coded: AI produced all programming changes, which the contributor accepted and reviewed.
  • 部分 AI 辅助:AI 帮助编写或修改了部分内容。 / Partially AI-assisted: AI helped write or modify part of the change.
  • 未使用 AI 编码辅助。 / No AI coding assistance was used.

使用的 AI 模型 / AI model used:

OpenAI GPT-5

使用的编码 Agent 工具 / Coding Agent tool used:

Codex desktop

仓库规范检查 / Repository Rules

  • 未修改 DSH 官方源码,未让 tsconfig 指向 DSH 源码 checkout;常规依赖只使用已发布 npm 契约,alpha 验证仅覆盖由官方 tag 构建的 @deepseek-ai/* package 输出。 / I did not modify DSH source or point tsconfig at a DSH checkout; normal dependencies use published npm contracts, while alpha verification overlays only package outputs built from the official tag.
  • Client 与 Host 边界仍以 src/shared/contracts.ts 为准,没有在两侧重复定义 wire DTO。 / The Client and Host boundary still uses src/shared/contracts.ts as the single source for wire DTOs.
  • 持久化格式、RPC 权限、路径或凭据处理的变更包含兼容或拒绝路径、安全分析和相应测试。 / Changes to persistence formats, RPC authority, paths, or credentials include compatibility or rejection paths, security analysis, and tests.
  • 没有提交 token、密钥、私有记忆、未脱敏日志或生成的 lib/ 文件。 / I did not commit tokens, credentials, private memory, unredacted logs, or generated lib/ files.
  • 用户可见文案和长期文档已同步维护中文与英文版本,命令、配置键和路径保持一致。 / User-facing copy and long-lived documentation are synchronized in Chinese and English, with matching commands, configuration keys, and paths.
  • 新增和修改的代码、注释、文档、提交信息不含 emoji。 / New and modified code, comments, documentation, and commits contain no emoji.

兼容性与数据安全 / Compatibility and Data Safety

  • registry 开发与安装基线仍为 DSH 0.1.1-rc.2;alpha 不写入不存在的 npm 依赖或 lockfile,只在生成的 node_modules 中链接官方 tag 的构建产物,并可精确恢复原 registry 链接。
  • remoteAccess 已从 schema、resolved config、示例 patch 和评估 profile 删除。迁移到 DSH 0.1.2 时应从本地 patch 删除该键。
  • DSH 0.1.2 不再提供 loopback / trusted-host 逐方法权限层;所有 Mnemon channel 都依赖 DSH launch-token-derived 浏览器会话认证。writeEnabled=false 仍是产品级 mutation guard,而不是认证边界。
  • 不修改持久化格式、Provider 数据、凭据文件或现有记忆;回滚代码后可继续使用原有数据。普通 Provider 目录仍脱敏,私密值仍只走管理 channel。

本地验证 / Local Validation

执行的命令 / Commands run:

pnpm --dir /private/tmp/dsh-harness-alpha-research.w9gFPk run build:lib
DSH_SOURCE_ROOT=/private/tmp/dsh-harness-alpha-research.w9gFPk pnpm run dsh:link-source
pnpm run verify
pnpm run dsh:restore-registry
pnpm run verify
node --check scripts/link-dsh-source.mjs

结果摘要 / Result summary:

DSH 0.1.2-alpha.1 源码链与恢复后的 0.1.1-rc.2 registry 链均通过完整验证:48 个测试文件通过、521 项测试通过,1 项 Windows-only 测试按预期跳过;typecheck、确定性构建、真实 headless profile、package contents/public entries、publint 与 attw 全部通过。最终重复 link → alpha typecheck → restore,确认 CLI 版本从 0.1.2-alpha.1 恢复为 0.1.1-rc.2,且恢复前后的 registry link fingerprint 相同。

用户可见变更证据 / Local Feature Evidence

证据 / Evidence:

N/A。该 PR 是源码契约、Host 注册、配置迁移和 CI 兼容性改造,没有新增需要截图展示的用户功能;可观察的迁移行为由配置、RPC 与完整集成测试覆盖。

@Grivn Grivn changed the title Adapt Mnemon to DSH 0.1.2-alpha.1 feat(compat): support DSH 0.1.2-alpha.1 source contracts Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant