fix: replace hardcoded ~/.desirecore paths with ${DESIRECORE_ROOT} variable (#16)

## Summary

- 将所有技能文件中的硬编码 `~/.desirecore/` 和 `$HOME/.desirecore/` 路径替换为
`${DESIRECORE_ROOT}/` 变量
- 递增 manifest.json version 至 1.2.1

## Why

dev 模式下 `DESIRECORE_HOME=~/.desirecore-dev`,硬编码路径导致技能读取错误的端口文件和目录。主仓库的
`variable-substitutor.ts` 会在运行时将 `${DESIRECORE_ROOT}` 替换为实际根目录。

## Test plan

- [ ] `npm run dev` 启动后触发任意技能,确认端口路径解析为
`~/.desirecore-dev/agent-service.port`
- [ ] prod 模式确认路径为 `~/.desirecore/agent-service.port`

🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
2026-05-29 15:36:19 +08:00
committed by GitHub
parent 3015a3ffb8
commit 4f7037a6b6
52 changed files with 192 additions and 192 deletions

View File

@@ -222,10 +222,10 @@ POST /api/agents/{agentId}/skills
```bash
# Sidecar file path for a global Skill
~/.desirecore/skills/{skillId}/{filename}
${DESIRECORE_ROOT}/skills/{skillId}/{filename}
# Sidecar file path for an Agent-scoped Skill
~/.desirecore/agents/{agentId}/skills/{skillId}/{filename}
${DESIRECORE_ROOT}/agents/{agentId}/skills/{skillId}/{filename}
```
### 3. Manage Existing Skills via API
@@ -351,7 +351,7 @@ When you need to create a Skill from scratch or the API approach is not flexible
**Global Skill** (visible to all Agents):
```
~/.desirecore/skills/
${DESIRECORE_ROOT}/skills/
└── my-new-skill/
├── SKILL.md # required: skill definition file
├── examples/ # optional: example files
@@ -362,7 +362,7 @@ When you need to create a Skill from scratch or the API approach is not flexible
**Agent-scoped Skill** (visible only to the specified Agent):
```
~/.desirecore/agents/{agentId}/
${DESIRECORE_ROOT}/agents/{agentId}/
└── skills/
└── my-new-skill/
├── SKILL.md
@@ -441,7 +441,7 @@ Describe the execution flow, API calls, and input/output formats stage by stage
The following example shows how to create a global Skill with the Write tool:
```
Target path: ~/.desirecore/skills/daily-summary/SKILL.md
Target path: ${DESIRECORE_ROOT}/skills/daily-summary/SKILL.md
```
Content to write:
@@ -535,8 +535,8 @@ Skills exist at three scope levels, listed from highest priority to lowest:
| Priority | Scope | Path | Visibility |
| ------ | ---------- | ---------------------------------------- | ------------------ |
| Highest | Project | `.claude/skills/` (project root) | All Agents in the current project |
| Medium | Agent | `~/.desirecore/agents/{agentId}/skills/` | Only that Agent |
| Lowest | Global | `~/.desirecore/skills/` | All Agents |
| Medium | Agent | `${DESIRECORE_ROOT}/agents/{agentId}/skills/` | Only that Agent |
| Lowest | Global | `${DESIRECORE_ROOT}/skills/` | All Agents |
**Same-name override rule**: a Skill in a higher-priority scope overrides a same-named Skill in a lower-priority scope. For example, an Agent-scoped `data-analysis` Skill will shadow a global Skill of the same name.