feat(desktop): bundle ApeMind MCP placeholder + seed default recipes on first launch#19
Merged
Merged
Conversation
…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>
…peMind 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>
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.
现状
apecloud/apemind-agent fork 已经把品牌 / Logo / repo / Docker / 工作流命名调通,但还没把 ApeMind 自家的 MCP 扩展和工作流(recipes)作为分发资源内置进来。每次新装的 ApeMind Agent 需要用户手动配置 ApeMind MCP + 没有任何预置工作流。
@梅西 在 PR #18 已经把 3 个 ApeMind 工作流 YAML 放到
ui/desktop/default-recipes/:apemind-knowledge-qa.yaml(知识库问答)apemind-deep-research.yaml(深度研究报告)apemind-table-summary.yaml(表格总结)现象
不做接线的话,PR #18 的模板源文件只是仓库里的资源,没人读,不会出现在 Desktop 用户的 Recipe 列表。ApeMind MCP 扩展也不会出现在 bundled-extensions 列表里。
影响
期望结果
三处变更:
ui/desktop/forge.config.ts:把default-recipes加到extraResource,让 Electron Forge 打包时把 YAML 目录复制到 app 的Resources/default-recipes/路径。ui/desktop/src/main.ts新增seedDefaultRecipes():appMain()顶部,包在 try/catch 里)process.resourcesPath/default-recipes/(packaged) 或__dirname/../default-recipes/(dev).yaml/.yml文件到~/.config/goose/recipes/~/.config/goose/recipes/是 goose 自家的用户 recipe 目录),零改动到核心 recipe runnerbundled-extensions.json增加apemind条目:type: streamable_httpenabled: false、uri: "":在扩展列表里出现一行 "ApeMind" + description 提示用户填写 URL/token 后启用不解决什么
~/.config/goose/recipes/读取路径)-v2后缀的更新策略留给后续)验证
git diff main...HEAD只动 3 个文件(forge.config.ts + main.ts + bundled-extensions.json)/Applications/ApeMind Agent.app+~/Library/Application Support/ApeMind Agent/+~/.config/goose/)pnpm -C ui/desktop run packageApeMind条目(disabled 状态)关联
feedback_goose_upstream_minimal_diff.md(5-cat 第 3 类默认配置 + 第 5 类打包分发)250a69aa(earayu2 拍板 B 混合方案)+cb109985(earayu2 提问怎么内置)