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

@@ -102,7 +102,7 @@ MiniMax video generation uses an asynchronous task model:
### Step 1: Submit a Text-to-Video Task
```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 '{
@@ -126,7 +126,7 @@ Extract `data.task_id` from the JSON response.
### Step 1 (alternative): Image-to-Video
```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 '{
@@ -147,7 +147,7 @@ curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
Call once every 10 seconds until `status` is `"Success"` or `"Fail"`. Replace `TASK_ID` with the `task_id` returned in Step 1.
```bash
PORT=$(cat ~/.desirecore/agent-service.port)
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
TASK_ID="task_id returned from step 1"
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
-H "Content-Type: application/json" \
@@ -189,7 +189,7 @@ Polling response (completed):
Replace `FILE_ID` with the `file_id` from the completed response in Step 2.
```bash
PORT=$(cat ~/.desirecore/agent-service.port)
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
FILE_ID="file_id returned from step 2"
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
-H "Content-Type: application/json" \
@@ -209,7 +209,7 @@ Extract `data.file.download_url` from the response.
The download URL is valid for 24 hours; you must download immediately and save it to the local media-store.
```bash
PORT=$(cat ~/.desirecore/agent-service.port)
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
VIDEO_URL="download_url obtained in step 3"
curl -sL "$VIDEO_URL" -o /tmp/minimax-video.mp4 && \
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media/upload" \

View File

@@ -39,7 +39,7 @@ MiniMax 视频生成采用异步任务模式:
### 第一步:提交文生视频任务
```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 '{
@@ -63,7 +63,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 '{
@@ -84,7 +84,7 @@ curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
每隔 10 秒调用一次,直到 `status``"Success"``"Fail"`。将 `TASK_ID` 替换为第一步返回的 `task_id`
```bash
PORT=$(cat ~/.desirecore/agent-service.port)
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
TASK_ID="第一步返回的task_id"
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
-H "Content-Type: application/json" \
@@ -126,7 +126,7 @@ curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
`FILE_ID` 替换为第二步完成响应中的 `file_id`
```bash
PORT=$(cat ~/.desirecore/agent-service.port)
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
FILE_ID="第二步返回的file_id"
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
-H "Content-Type: application/json" \
@@ -146,7 +146,7 @@ curl -sk -X POST "https://127.0.0.1:${PORT}/api/media-proxy" \
下载 URL 有 24 小时时效,必须立即下载并保存到本地 media-store。
```bash
PORT=$(cat ~/.desirecore/agent-service.port)
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
VIDEO_URL="第三步获取的download_url"
curl -sL "$VIDEO_URL" -o /tmp/minimax-video.mp4 && \
curl -sk -X POST "https://127.0.0.1:${PORT}/api/media/upload" \