feat: add ApeMind default workflows#18
Merged
Merged
Conversation
earayu
added a commit
that referenced
this pull request
May 25, 2026
…on first launch (#19) * feat(desktop): bundle ApeMind MCP placeholder + seed default recipes on first launch Three pieces for the ApeCloud distribution layer: 1. forge.config.ts: add `default-recipes` to extraResource so the directory ships inside the packaged app's Resources path. 2. main.ts seedDefaultRecipes(): on app startup, read recipe YAMLs from the bundled `default-recipes/` directory (packaged: process.resourcesPath; dev: relative to __dirname) and copy them to ~/.config/goose/recipes/. Same-name files are skipped (never overwrite user edits). This intentionally uses goose's existing user-recipe directory so the reader logic in goose-rs and the Desktop UI need no changes — upstream-merge-friendly. 3. bundled-extensions.json: add an `apemind` entry of type streamable_http, enabled=false, uri="" — appears in the extensions list with description prompting the user to configure URL + token before enabling. URL/token intentionally not hardcoded. Recipe YAML content authored separately in #18 (placed at ui/desktop/default-recipes/). 5-cat compliance: category 3 (默认配置 / bundled extension config) + category 5 (打包分发 / forge extraResource + first-copy logic). Zero changes to Rust crates or recipe reader logic. Signed-off-by: earayu <earayu@163.com> * fix(desktop): wire Authorization header for bundled streamable_http ApeMind MCP Per earayu2 #鹅岛 msg 792dda6a: - ApeMind MCP placeholder URL: `https://your-apemind.example.com/mcp` - Auth header placeholder: `Authorization: Bearer your-api-key-here` Two pieces: 1. `bundled-extensions.json` apemind entry: add `uri` + `headers.Authorization` placeholder values so the user only has to swap `your-api-key-here` (and adjust the URL if needed) when enabling. 2. `bundled-extensions.ts` BundledExtension type + streamable_http loader case: extend to propagate `headers` (and `envs`/`env_keys`) into the actual extension config. Without this, the JSON `headers` field is silently dropped during sync, so the auth would never reach the runtime. 5-cat compliance: still category 3 (默认配置 / bundled extension config). The loader extension is a 1-line TS plumbing pass-through, not a change to the goose-rs extension runtime — minimal rebase surface upstream-side. Signed-off-by: earayu <earayu@163.com> --------- Signed-off-by: earayu <earayu@163.com>
earayu
added a commit
that referenced
this pull request
May 25, 2026
Co-authored-by: 梅西 <messi-agent@users.noreply.github.com>
earayu
added a commit
that referenced
this pull request
May 25, 2026
…on first launch (#19) * feat(desktop): bundle ApeMind MCP placeholder + seed default recipes on first launch Three pieces for the ApeCloud distribution layer: 1. forge.config.ts: add `default-recipes` to extraResource so the directory ships inside the packaged app's Resources path. 2. main.ts seedDefaultRecipes(): on app startup, read recipe YAMLs from the bundled `default-recipes/` directory (packaged: process.resourcesPath; dev: relative to __dirname) and copy them to ~/.config/goose/recipes/. Same-name files are skipped (never overwrite user edits). This intentionally uses goose's existing user-recipe directory so the reader logic in goose-rs and the Desktop UI need no changes — upstream-merge-friendly. 3. bundled-extensions.json: add an `apemind` entry of type streamable_http, enabled=false, uri="" — appears in the extensions list with description prompting the user to configure URL + token before enabling. URL/token intentionally not hardcoded. Recipe YAML content authored separately in #18 (placed at ui/desktop/default-recipes/). 5-cat compliance: category 3 (默认配置 / bundled extension config) + category 5 (打包分发 / forge extraResource + first-copy logic). Zero changes to Rust crates or recipe reader logic. Signed-off-by: earayu <earayu@163.com> * fix(desktop): wire Authorization header for bundled streamable_http ApeMind MCP Per earayu2 #鹅岛 msg 792dda6a: - ApeMind MCP placeholder URL: `https://your-apemind.example.com/mcp` - Auth header placeholder: `Authorization: Bearer your-api-key-here` Two pieces: 1. `bundled-extensions.json` apemind entry: add `uri` + `headers.Authorization` placeholder values so the user only has to swap `your-api-key-here` (and adjust the URL if needed) when enabling. 2. `bundled-extensions.ts` BundledExtension type + streamable_http loader case: extend to propagate `headers` (and `envs`/`env_keys`) into the actual extension config. Without this, the JSON `headers` field is silently dropped during sync, so the auth would never reach the runtime. 5-cat compliance: still category 3 (默认配置 / bundled extension config). The loader extension is a 1-line TS plumbing pass-through, not a change to the goose-rs extension runtime — minimal rebase surface upstream-side. Signed-off-by: earayu <earayu@163.com> --------- Signed-off-by: earayu <earayu@163.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
现状
ApeMind Agent 分发包需要内置一组 ApeMind 工作流模板,供首次启动时复制到用户 recipe 目录。
现象
当前仓库里还没有可随包携带的 ApeMind workflow YAML。
影响
新增 3 个默认工作流源文件:
apemind-knowledge-qa.yaml:知识库问答,强调证据、引用和证据不足处理apemind-deep-research.yaml:深度研究报告,强调多源检索、事实/解释/建议分离apemind-table-summary.yaml:表格总结,强调可复制表格、Unknown 占位和 source 列期望结果
后续打包/首次启动逻辑可以把这些 YAML 作为源模板复制到
~/.config/goose/recipes/,同名文件存在时不覆盖用户版本。不解决什么
不实现 extraResource 接线、不实现首次拷贝逻辑、不配置 ApeMind MCP;这些由 @Monarudo 的分发接线 PR 处理。
验证
ruby -e 'require "yaml"; ARGV.each { |f| YAML.load_file(f); puts "ok #{f}" }' ui/desktop/default-recipes/*.yaml