Files
dth/openspec/changes/chg_0003_dispatch_helpers/proposal.md
T
xstudio agentandClaude Opus 4.8 a94f40e42e merge sandbox/dd24a29: chg_0003 dispatch_helpers — A1 prep + A2 setup + A3 wait scripts (3 host tools, 8 cases, gate PASS)
- scripts/prep-sandbox-skills.sh: A1 host-side skill 拷贝 (跳过 symlink/template-boot-jnpf/JNPF_*)
- scripts/setup-xstudio-ai.sh: A2 host-side ai-config writer (python3 merge 不覆盖已有 providers)
- scripts/wait-for-task.sh: A3 host-side completion poller (轮询 /tmp/xstudio-sandbox/*/space/.xstudio-report.md)
- tests/e2e/dispatch_helpers.test.sh: 6 case 自检
- openspec/changes/chg_0003_dispatch_helpers/{5 工件}

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-09-28 11:18:36 +08:00

39 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
change_id: chg_0003
status: proposed
owner: pm@dth
stakeholders: [dev, sre]
priority: P1
target_release: v0.2
created: 2026-09-28
skip_coverage: false
---
# Change: xstudio-sandbox-dispatch 三个 host-side 辅助脚本
## Why
首次 dispatch(taskId ai-1790562657-0EF743)暴露三个真坑:沙盒拿不到 skill 资产(手搓降级骨架)/ ai-config.json 缺省值 401 重试 / 任务完成信号只走 macOS 通知 AI agent 漏接。本 chg 给出 host-side 最小修改路径。
## Who
编排 agent(host 侧)、未来 dispatch 的复用者。
## Scope
- 3 个脚本:`scripts/prep-sandbox-skills.sh`(A1)、`scripts/setup-xstudio-ai.sh`(A2)、`scripts/wait-for-task.sh`(A3)
- 不动 xstudio 内核、不重打 sandbox 镜像、不改 ai-collab-framework 门禁脚本
## Non-Goals
- 不补 ssw-jnpf-lite-react 完整 demo/shop/dashboard 业务模块(那是 chg_0005+)
- 不做 React 前端(chg_0004)
## Impact
- 新 capability `dispatch_helpers`(独立元能力)
## Acceptance
- [ ] `bash scripts/prep-sandbox-skills.sh <wsHash>` 后 `/tmp/xstudio-sandbox/<wsHash>/space/.claude/skills/ai-collab-framework/` 存在
- [ ] `bash scripts/setup-xstudio-ai.sh <workspaceRoot>` 后 `<workspaceRoot>/.xstudio/ai-config.json` 含正确 provider 配置(baseURL / authTokenEnv=ANTHROPIC_AUTH_TOKEN / model=MiniMax-M3 / ccContainer=true)
- [ ] `bash scripts/wait-for-task.sh <taskId>` 在 `.xstudio-report.md` 出现后立即打印内容并 exit 0
- [ ] 三个脚本自带 `set -euo pipefail` + `--help` 输出
- [ ] check_spec_coverage.sh gap=0
## Rollout
合并 main 即生效;host 在下次 dispatch 前手动调三个脚本即可。