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

@@ -118,7 +118,7 @@ Example lyrics format:
**Note: Do not pass the `output_format` parameter; use the default hex format.**
```bash
PORT=$(cat ~/.desirecore/agent-service.port)
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
-H "Content-Type: application/json" \
-d '{
@@ -142,7 +142,7 @@ curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
### Generate Pure Instrumental
```bash
PORT=$(cat ~/.desirecore/agent-service.port)
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
-H "Content-Type: application/json" \
-d '{
@@ -198,7 +198,7 @@ The API returns JSON; audio data is hex-encoded and stored in the `data.data.aud
Extract the hex string from the `data.data.audio.data` field of the response JSON, convert it to binary, and upload:
```bash
PORT=$(cat ~/.desirecore/agent-service.port)
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
# Save the API response to a temporary file (avoid letting large hex data overflow shell variables)
# Assume the curl output of the previous step has been saved to /tmp/minimax-music-resp.json
@@ -256,7 +256,7 @@ Example: `"独立民谣,温暖治愈,木吉他为主,轻柔的鼓点,渐进式
If the user only describes the desired music style without providing lyrics, set `lyrics_optimizer: true` and the model will auto-generate lyrics from the prompt:
```bash
PORT=$(cat ~/.desirecore/agent-service.port)
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
-H "Content-Type: application/json" \
-d '{

View File

@@ -54,7 +54,7 @@ lyrics 字段支持以下结构标签来组织歌曲段落:
**注意:不要传 `output_format` 参数,使用默认的 hex 格式。**
```bash
PORT=$(cat ~/.desirecore/agent-service.port)
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
-H "Content-Type: application/json" \
-d '{
@@ -78,7 +78,7 @@ curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
### 生成纯器乐
```bash
PORT=$(cat ~/.desirecore/agent-service.port)
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
-H "Content-Type: application/json" \
-d '{
@@ -134,7 +134,7 @@ API 返回 JSON音频数据以 hex 编码存放在 `data.data.audio.data` 字
从响应 JSON 中提取 `data.data.audio.data` 字段的 hex 字符串,转为二进制后上传:
```bash
PORT=$(cat ~/.desirecore/agent-service.port)
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
# 将 API 响应保存到临时文件(避免 hex 数据过大撑爆 shell 变量)
# 假设上一步的 curl 输出已保存到 /tmp/minimax-music-resp.json
@@ -192,7 +192,7 @@ prompt 用于描述音乐的风格、情绪和乐器编排,建议用逗号分
如果用户只描述了想要的音乐风格但没有提供歌词,可以设置 `lyrics_optimizer: true`,模型会根据 prompt 自动生成歌词:
```bash
PORT=$(cat ~/.desirecore/agent-service.port)
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
-H "Content-Type: application/json" \
-d '{