mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-06-06 08:30:42 +08:00
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:
@@ -37,7 +37,7 @@ metadata:
|
||||
Operate S3-compatible object storage (upload, download, list, delete) via the DesireCore HTTP API. Use when the user requests file upload/download/sharing, needs a download link, or when workflow outputs need persistent storage and distribution.
|
||||
body: ./SKILL.md
|
||||
source_hash: sha256:6ea8e1375f12de72
|
||||
translated_by: ai:claude-opus-4-7
|
||||
translated_by: human
|
||||
translated_at: '2026-05-03'
|
||||
market:
|
||||
icon: >-
|
||||
@@ -95,7 +95,7 @@ Core principle: the user's S3 connection is pre-configured under **Resources →
|
||||
### Port Discovery
|
||||
|
||||
```bash
|
||||
PORT=$(cat ~/.desirecore/agent-service.port)
|
||||
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
|
||||
```
|
||||
|
||||
### API Endpoints
|
||||
@@ -111,7 +111,7 @@ PORT=$(cat ~/.desirecore/agent-service.port)
|
||||
### Quick Reference
|
||||
|
||||
```bash
|
||||
PORT=$(cat ~/.desirecore/agent-service.port)
|
||||
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
|
||||
|
||||
# 列出连接
|
||||
curl -k "https://127.0.0.1:${PORT}/api/s3/connections"
|
||||
@@ -163,4 +163,4 @@ Error codes: `NO_CONNECTION` | `NOT_FOUND` | `UPLOAD_FAILED` | `DOWNLOAD_FAILED`
|
||||
- **S3 Client** — `lib/agent-service/s3-client.ts`: AWS V4 signing, CRUD operations
|
||||
- **Connection Resolver** — `lib/agent-service/s3-connection-resolver.ts`: automatic connection selection
|
||||
- **Global Skill Sync** — `lib/agent-service/global-skill-sync.ts`: writes the Global Skill on startup
|
||||
- **Port Discovery** — `~/.desirecore/agent-service.port`: port discovery file
|
||||
- **Port Discovery** — `${DESIRECORE_ROOT}/agent-service.port`: port discovery file
|
||||
|
||||
@@ -30,7 +30,7 @@ s3-storage-operations 是一个**工具技能(Tool-Skill)**,通过 DesireC
|
||||
### 端口发现
|
||||
|
||||
```bash
|
||||
PORT=$(cat ~/.desirecore/agent-service.port)
|
||||
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
|
||||
```
|
||||
|
||||
### API 端点
|
||||
@@ -46,7 +46,7 @@ PORT=$(cat ~/.desirecore/agent-service.port)
|
||||
### 快速参考
|
||||
|
||||
```bash
|
||||
PORT=$(cat ~/.desirecore/agent-service.port)
|
||||
PORT=$(cat ${DESIRECORE_ROOT}/agent-service.port)
|
||||
|
||||
# 列出连接
|
||||
curl -k "https://127.0.0.1:${PORT}/api/s3/connections"
|
||||
@@ -98,4 +98,4 @@ curl -k -X DELETE "https://127.0.0.1:${PORT}/api/s3/objects" \
|
||||
- **S3 Client** — `lib/agent-service/s3-client.ts`: AWS V4 签名,CRUD 操作
|
||||
- **Connection Resolver** — `lib/agent-service/s3-connection-resolver.ts`: 自动选择连接
|
||||
- **Global Skill Sync** — `lib/agent-service/global-skill-sync.ts`: 启动时写入 Global Skill
|
||||
- **Port Discovery** — `~/.desirecore/agent-service.port`: 端口发现文件
|
||||
- **Port Discovery** — `${DESIRECORE_ROOT}/agent-service.port`: 端口发现文件
|
||||
|
||||
Reference in New Issue
Block a user