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

@@ -38,7 +38,7 @@ metadata:
Guides the Agent to design, edit, test, and execute Workflow workflows. Use when the user asks to create a workflow, orchestrate multi-step automation, design an approval pipeline, or turn repetitive multi-node tasks into a reusable DSL.
body: ./SKILL.md
source_hash: sha256:aa197c62ae8a33d7
translated_by: ai:claude-opus-4-7
translated_by: human
translated_at: '2026-05-04'
market:
icon: >-
@@ -147,7 +147,7 @@ workflow is a **Procedural Skill** that empowers the Agent to orchestrate multi-
**DSL file location**:
```
~/.desirecore/workflows/<wf_id>/workflow.dsl.yaml
${DESIRECORE_ROOT}/workflows/<wf_id>/workflow.dsl.yaml
```
Where `wf_id` uses a `wf_` prefix + snake_case, e.g. `wf_legal_review`, `wf_daily_report`.
@@ -539,7 +539,7 @@ All dynamic values in the DSL are uniformly referenced using the `{{}}` template
A workflow can reference user-preconfigured secrets via `{{secrets.keyName}}` for scenarios such as API calls.
- Secrets are preconfigured by the user in `~/.desirecore/config/secrets.json`
- Secrets are preconfigured by the user in `${DESIRECORE_ROOT}/config/secrets.json`
- The engine automatically resolves `{{secrets.*}}` at runtime, replacing them with the actual values
- Secrets are resolved only during the execution phase; their actual values are not exposed during validation or dry-run
@@ -563,7 +563,7 @@ Use the `WorkflowValidate` tool to validate the structure and reference integrit
```
Tool: WorkflowValidate
Parameters:
path: ~/.desirecore/workflows/<wf_id>/workflow.dsl.yaml
path: ${DESIRECORE_ROOT}/workflows/<wf_id>/workflow.dsl.yaml
```
**What is validated**:
@@ -587,7 +587,7 @@ Use the `WorkflowTest` tool to perform a simulated execution (dry-run) without a
```
Tool: WorkflowTest
Parameters:
path: ~/.desirecore/workflows/<wf_id>/workflow.dsl.yaml
path: ${DESIRECORE_ROOT}/workflows/<wf_id>/workflow.dsl.yaml
params: # Optional, used to simulate trigger parameters
filePath: /path/to/input.md
```
@@ -610,7 +610,7 @@ Use the `WorkflowRun` tool to start the workflow.
```
Tool: WorkflowRun
Parameters:
path: ~/.desirecore/workflows/<wf_id>/workflow.dsl.yaml
path: ${DESIRECORE_ROOT}/workflows/<wf_id>/workflow.dsl.yaml
params: # Optional, passed in as the {{trigger.key}} context
filePath: /path/to/input.md
```

View File

@@ -72,7 +72,7 @@ workflow 是一个**流程型技能Procedural Skill**,赋予 Agent 编
**DSL 文件位置**
```
~/.desirecore/workflows/<wf_id>/workflow.dsl.yaml
${DESIRECORE_ROOT}/workflows/<wf_id>/workflow.dsl.yaml
```
其中 `wf_id` 使用 `wf_` 前缀 + snake_case`wf_legal_review``wf_daily_report`
@@ -464,7 +464,7 @@ DSL 中所有动态值统一使用 `{{}}` 模板语法引用:
工作流可通过 `{{secrets.keyName}}` 引用用户预配置的密钥,用于 API 调用等场景。
- Secrets 由用户在 `~/.desirecore/config/secrets.json` 中预配置
- Secrets 由用户在 `${DESIRECORE_ROOT}/config/secrets.json` 中预配置
- 引擎在运行时自动解析 `{{secrets.*}}`,将其替换为实际值
- Secrets 仅在执行阶段解析,校验和干跑阶段不会暴露实际值
@@ -488,7 +488,7 @@ config:
```
工具WorkflowValidate
参数:
path: ~/.desirecore/workflows/<wf_id>/workflow.dsl.yaml
path: ${DESIRECORE_ROOT}/workflows/<wf_id>/workflow.dsl.yaml
```
**校验内容**
@@ -512,7 +512,7 @@ config:
```
工具WorkflowTest
参数:
path: ~/.desirecore/workflows/<wf_id>/workflow.dsl.yaml
path: ${DESIRECORE_ROOT}/workflows/<wf_id>/workflow.dsl.yaml
params: # 可选,用于模拟 trigger 参数
filePath: /path/to/input.md
```
@@ -535,7 +535,7 @@ config:
```
工具WorkflowRun
参数:
path: ~/.desirecore/workflows/<wf_id>/workflow.dsl.yaml
path: ${DESIRECORE_ROOT}/workflows/<wf_id>/workflow.dsl.yaml
params: # 可选,作为 {{trigger.key}} 上下文传入
filePath: /path/to/input.md
```

View File

@@ -4,7 +4,7 @@
# 五种基座节点的完整 DSL 结构。Agent 可参考此模板构建工作流。
#
# 使用方式:
# 1. 复制此模板到 ~/.desirecore/workflows/<wf_id>/workflow.dsl.yaml
# 1. 复制此模板到 ${DESIRECORE_ROOT}/workflows/<wf_id>/workflow.dsl.yaml
# 2. 修改 id、name、nodes、flow 等字段
# 3. 用 WorkflowValidate 工具校验
# 4. 用 WorkflowTest 工具干跑测试