Commit da1f5c9
feat(desktop): bundle ApeMind MCP placeholder + seed default recipes 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>1 parent ddafeb4 commit da1f5c9
4 files changed
Lines changed: 44 additions & 1 deletion
File tree
- ui/desktop
- src
- components/settings/extensions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
55 | 69 | | |
56 | 70 | | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
119 | 123 | | |
120 | 124 | | |
121 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
178 | 197 | | |
179 | 198 | | |
180 | 199 | | |
| |||
2079 | 2098 | | |
2080 | 2099 | | |
2081 | 2100 | | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
2082 | 2107 | | |
2083 | 2108 | | |
2084 | 2109 | | |
| |||
0 commit comments