Parent
#47
What to build
根 src/shared.ts 和 packages/core/src/shared.ts 目前是完全相同的两份拷贝。Issue #48 以"迁移"方式复制到 core,但根副本因 AC4("根目录原有功能不受影响")而保留。
现在 #50 已完成 OpenCode 插件迁移到 packages/opencode/,条件成熟:将根 src/shared.ts 替换为从 @matthewye/autopilot-toolkit-core 的轻薄 re-export,或通过构建脚本从 core 同步,消除重复维护的漂移风险。
实现方式:
- 根
package.json 添加 "@matthewye/autopilot-toolkit-core": "workspace:*" 依赖
- 根
src/shared.ts 改为 re-export:export * from "@matthewye/autopilot-toolkit-core"
- 根
src/index.ts 仍从 ./shared.js 导入,编译后行为一致
- 或:如果 re-export 路径有问题(bun build 可能不解析 workspace 包),则改为在 build 脚本中将
packages/core/src/shared.ts 复制到 src/shared.ts
Acceptance criteria
Blocked by
None - can start immediately
Parent
#47
What to build
根
src/shared.ts和packages/core/src/shared.ts目前是完全相同的两份拷贝。Issue #48 以"迁移"方式复制到 core,但根副本因 AC4("根目录原有功能不受影响")而保留。现在 #50 已完成 OpenCode 插件迁移到
packages/opencode/,条件成熟:将根src/shared.ts替换为从@matthewye/autopilot-toolkit-core的轻薄 re-export,或通过构建脚本从 core 同步,消除重复维护的漂移风险。实现方式:
package.json添加"@matthewye/autopilot-toolkit-core": "workspace:*"依赖src/shared.ts改为 re-export:export * from "@matthewye/autopilot-toolkit-core"src/index.ts仍从./shared.js导入,编译后行为一致packages/core/src/shared.ts复制到src/shared.tsAcceptance criteria
src/shared.ts不再是packages/core/src/shared.ts的独立拷贝bun run build在根目录成功(根插件仍正常工作)packages/core的 18 个测试全部通过Blocked by
None - can start immediately