@project-ava-supernova/core 0.2.187 → 0.2.189

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/dist/agent/agent.d.ts +1 -1
  2. package/dist/agent/agent.d.ts.map +1 -1
  3. package/dist/agent/agent.js +23 -5
  4. package/dist/agent/agent.js.map +1 -1
  5. package/dist/agent/mode-tags.d.ts.map +1 -1
  6. package/dist/agent/mode-tags.js +3 -1
  7. package/dist/agent/mode-tags.js.map +1 -1
  8. package/dist/agent/social-craft.d.ts +1 -1
  9. package/dist/agent/social-craft.d.ts.map +1 -1
  10. package/dist/agent/social-craft.js +1 -1
  11. package/dist/agent/system-prompt.d.ts +13 -18
  12. package/dist/agent/system-prompt.d.ts.map +1 -1
  13. package/dist/agent/system-prompt.js +86 -37
  14. package/dist/agent/system-prompt.js.map +1 -1
  15. package/dist/brainstorm/brainstorm-store.d.ts +47 -25
  16. package/dist/brainstorm/brainstorm-store.d.ts.map +1 -1
  17. package/dist/brainstorm/brainstorm-store.js +221 -104
  18. package/dist/brainstorm/brainstorm-store.js.map +1 -1
  19. package/dist/brainstorm/page.d.ts +41 -0
  20. package/dist/brainstorm/page.d.ts.map +1 -0
  21. package/dist/brainstorm/page.js +109 -0
  22. package/dist/brainstorm/page.js.map +1 -0
  23. package/dist/brainstorm/types.d.ts +75 -19
  24. package/dist/brainstorm/types.d.ts.map +1 -1
  25. package/dist/brainstorm/types.js +19 -14
  26. package/dist/brainstorm/types.js.map +1 -1
  27. package/dist/brainstorm/work-plans.d.ts +23 -0
  28. package/dist/brainstorm/work-plans.d.ts.map +1 -0
  29. package/dist/brainstorm/work-plans.js +56 -0
  30. package/dist/brainstorm/work-plans.js.map +1 -0
  31. package/dist/brand/brand-kits.d.ts +17 -0
  32. package/dist/brand/brand-kits.d.ts.map +1 -1
  33. package/dist/brand/brand-kits.js +10 -0
  34. package/dist/brand/brand-kits.js.map +1 -1
  35. package/dist/config/personality.js +1 -1
  36. package/dist/docs/content/concepts.js +1 -1
  37. package/dist/docs/content/concepts.js.map +1 -1
  38. package/dist/docs/content/reference.js +1 -1
  39. package/dist/docs/content/reference.js.map +1 -1
  40. package/dist/docs/content/start.js +2 -2
  41. package/dist/docs/content/start.js.map +1 -1
  42. package/dist/docs/data/modes.d.ts.map +1 -1
  43. package/dist/docs/data/modes.js +3 -9
  44. package/dist/docs/data/modes.js.map +1 -1
  45. package/dist/docs/data/personas.js +4 -4
  46. package/dist/docs/data/personas.js.map +1 -1
  47. package/dist/docs/data/shortcuts.d.ts.map +1 -1
  48. package/dist/docs/data/shortcuts.js +8 -7
  49. package/dist/docs/data/shortcuts.js.map +1 -1
  50. package/dist/docs/i18n/translations.d.ts.map +1 -1
  51. package/dist/docs/i18n/translations.js +1 -1
  52. package/dist/docs/i18n/translations.js.map +1 -1
  53. package/dist/history/conversation-title.d.ts +1 -1
  54. package/dist/history/conversation-title.d.ts.map +1 -1
  55. package/dist/history/conversation-title.js +1 -0
  56. package/dist/history/conversation-title.js.map +1 -1
  57. package/dist/i18n/keep-english.d.ts.map +1 -1
  58. package/dist/i18n/keep-english.js +0 -4
  59. package/dist/i18n/keep-english.js.map +1 -1
  60. package/dist/i18n/locales/ar.d.ts.map +1 -1
  61. package/dist/i18n/locales/ar.js +242 -36
  62. package/dist/i18n/locales/ar.js.map +1 -1
  63. package/dist/i18n/locales/de.d.ts.map +1 -1
  64. package/dist/i18n/locales/de.js +242 -36
  65. package/dist/i18n/locales/de.js.map +1 -1
  66. package/dist/i18n/locales/en.d.ts +236 -32
  67. package/dist/i18n/locales/en.d.ts.map +1 -1
  68. package/dist/i18n/locales/en.js +242 -36
  69. package/dist/i18n/locales/en.js.map +1 -1
  70. package/dist/i18n/locales/es.d.ts.map +1 -1
  71. package/dist/i18n/locales/es.js +242 -36
  72. package/dist/i18n/locales/es.js.map +1 -1
  73. package/dist/i18n/locales/fr.d.ts.map +1 -1
  74. package/dist/i18n/locales/fr.js +242 -36
  75. package/dist/i18n/locales/fr.js.map +1 -1
  76. package/dist/i18n/locales/hi.d.ts.map +1 -1
  77. package/dist/i18n/locales/hi.js +242 -36
  78. package/dist/i18n/locales/hi.js.map +1 -1
  79. package/dist/i18n/locales/id.d.ts.map +1 -1
  80. package/dist/i18n/locales/id.js +242 -36
  81. package/dist/i18n/locales/id.js.map +1 -1
  82. package/dist/i18n/locales/it.d.ts.map +1 -1
  83. package/dist/i18n/locales/it.js +242 -36
  84. package/dist/i18n/locales/it.js.map +1 -1
  85. package/dist/i18n/locales/ja.d.ts.map +1 -1
  86. package/dist/i18n/locales/ja.js +242 -36
  87. package/dist/i18n/locales/ja.js.map +1 -1
  88. package/dist/i18n/locales/ko.d.ts.map +1 -1
  89. package/dist/i18n/locales/ko.js +242 -36
  90. package/dist/i18n/locales/ko.js.map +1 -1
  91. package/dist/i18n/locales/nl.d.ts.map +1 -1
  92. package/dist/i18n/locales/nl.js +242 -36
  93. package/dist/i18n/locales/nl.js.map +1 -1
  94. package/dist/i18n/locales/pl.d.ts.map +1 -1
  95. package/dist/i18n/locales/pl.js +242 -36
  96. package/dist/i18n/locales/pl.js.map +1 -1
  97. package/dist/i18n/locales/pt.d.ts.map +1 -1
  98. package/dist/i18n/locales/pt.js +242 -36
  99. package/dist/i18n/locales/pt.js.map +1 -1
  100. package/dist/i18n/locales/ru.d.ts.map +1 -1
  101. package/dist/i18n/locales/ru.js +242 -36
  102. package/dist/i18n/locales/ru.js.map +1 -1
  103. package/dist/i18n/locales/th.d.ts.map +1 -1
  104. package/dist/i18n/locales/th.js +242 -36
  105. package/dist/i18n/locales/th.js.map +1 -1
  106. package/dist/i18n/locales/tr.d.ts.map +1 -1
  107. package/dist/i18n/locales/tr.js +242 -36
  108. package/dist/i18n/locales/tr.js.map +1 -1
  109. package/dist/i18n/locales/uk.d.ts.map +1 -1
  110. package/dist/i18n/locales/uk.js +242 -36
  111. package/dist/i18n/locales/uk.js.map +1 -1
  112. package/dist/i18n/locales/vi.d.ts.map +1 -1
  113. package/dist/i18n/locales/vi.js +242 -36
  114. package/dist/i18n/locales/vi.js.map +1 -1
  115. package/dist/i18n/locales/zh-CN.d.ts.map +1 -1
  116. package/dist/i18n/locales/zh-CN.js +242 -36
  117. package/dist/i18n/locales/zh-CN.js.map +1 -1
  118. package/dist/i18n/locales/zh-TW.d.ts.map +1 -1
  119. package/dist/i18n/locales/zh-TW.js +242 -36
  120. package/dist/i18n/locales/zh-TW.js.map +1 -1
  121. package/dist/index.d.ts +9 -2
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.js +5 -1
  124. package/dist/index.js.map +1 -1
  125. package/dist/mcp/connection.d.ts +30 -3
  126. package/dist/mcp/connection.d.ts.map +1 -1
  127. package/dist/mcp/connection.js +70 -3
  128. package/dist/mcp/connection.js.map +1 -1
  129. package/dist/mcp/import.d.ts +47 -0
  130. package/dist/mcp/import.d.ts.map +1 -0
  131. package/dist/mcp/import.js +157 -0
  132. package/dist/mcp/import.js.map +1 -0
  133. package/dist/mcp/index.d.ts +25 -0
  134. package/dist/mcp/index.d.ts.map +1 -1
  135. package/dist/mcp/index.js +14 -0
  136. package/dist/mcp/index.js.map +1 -1
  137. package/dist/mcp/manager.d.ts +144 -0
  138. package/dist/mcp/manager.d.ts.map +1 -0
  139. package/dist/mcp/manager.js +550 -0
  140. package/dist/mcp/manager.js.map +1 -0
  141. package/dist/mcp/oauth.d.ts +117 -0
  142. package/dist/mcp/oauth.d.ts.map +1 -0
  143. package/dist/mcp/oauth.js +382 -0
  144. package/dist/mcp/oauth.js.map +1 -0
  145. package/dist/mcp/page.d.ts +99 -0
  146. package/dist/mcp/page.d.ts.map +1 -0
  147. package/dist/mcp/page.js +287 -0
  148. package/dist/mcp/page.js.map +1 -0
  149. package/dist/mcp/permissions.d.ts +22 -0
  150. package/dist/mcp/permissions.d.ts.map +1 -0
  151. package/dist/mcp/permissions.js +35 -0
  152. package/dist/mcp/permissions.js.map +1 -0
  153. package/dist/mcp/registry.d.ts +63 -0
  154. package/dist/mcp/registry.d.ts.map +1 -0
  155. package/dist/mcp/registry.js +106 -0
  156. package/dist/mcp/registry.js.map +1 -0
  157. package/dist/mcp/risk.d.ts +23 -0
  158. package/dist/mcp/risk.d.ts.map +1 -0
  159. package/dist/mcp/risk.js +98 -0
  160. package/dist/mcp/risk.js.map +1 -0
  161. package/dist/mcp/secrets.d.ts +38 -0
  162. package/dist/mcp/secrets.d.ts.map +1 -0
  163. package/dist/mcp/secrets.js +82 -0
  164. package/dist/mcp/secrets.js.map +1 -0
  165. package/dist/mcp/servers-config.d.ts +107 -0
  166. package/dist/mcp/servers-config.d.ts.map +1 -0
  167. package/dist/mcp/servers-config.js +243 -0
  168. package/dist/mcp/servers-config.js.map +1 -0
  169. package/dist/mcp/setup.d.ts +75 -0
  170. package/dist/mcp/setup.d.ts.map +1 -0
  171. package/dist/mcp/setup.js +150 -0
  172. package/dist/mcp/setup.js.map +1 -0
  173. package/dist/mcp/suggested.d.ts +47 -0
  174. package/dist/mcp/suggested.d.ts.map +1 -0
  175. package/dist/mcp/suggested.js +91 -0
  176. package/dist/mcp/suggested.js.map +1 -0
  177. package/dist/memory/ambient-capture.js +1 -1
  178. package/dist/memory/ambient-capture.js.map +1 -1
  179. package/dist/personas/definitions.d.ts.map +1 -1
  180. package/dist/personas/definitions.js +55 -42
  181. package/dist/personas/definitions.js.map +1 -1
  182. package/dist/tools/brainstorm-plan.d.ts +25 -0
  183. package/dist/tools/brainstorm-plan.d.ts.map +1 -0
  184. package/dist/tools/brainstorm-plan.js +179 -0
  185. package/dist/tools/brainstorm-plan.js.map +1 -0
  186. package/dist/tools/brainstorm-session.d.ts +14 -12
  187. package/dist/tools/brainstorm-session.d.ts.map +1 -1
  188. package/dist/tools/brainstorm-session.js +220 -113
  189. package/dist/tools/brainstorm-session.js.map +1 -1
  190. package/dist/tools/connection-tools.d.ts +61 -0
  191. package/dist/tools/connection-tools.d.ts.map +1 -0
  192. package/dist/tools/connection-tools.js +271 -0
  193. package/dist/tools/connection-tools.js.map +1 -0
  194. package/dist/tools/create-project.js +1 -1
  195. package/dist/tools/create-project.js.map +1 -1
  196. package/dist/tools/open-brainstorm-room.d.ts +22 -0
  197. package/dist/tools/open-brainstorm-room.d.ts.map +1 -0
  198. package/dist/tools/open-brainstorm-room.js +40 -0
  199. package/dist/tools/open-brainstorm-room.js.map +1 -0
  200. package/dist/tools/switch-mode.d.ts.map +1 -1
  201. package/dist/tools/switch-mode.js +4 -3
  202. package/dist/tools/switch-mode.js.map +1 -1
  203. package/dist/tools/tool-registry.d.ts.map +1 -1
  204. package/dist/tools/tool-registry.js +28 -1
  205. package/dist/tools/tool-registry.js.map +1 -1
  206. package/dist/tools/tool-request-words.d.ts.map +1 -1
  207. package/dist/tools/tool-request-words.js +38 -0
  208. package/dist/tools/tool-request-words.js.map +1 -1
  209. package/package.json +1 -1
@@ -0,0 +1,271 @@
1
+ /**
2
+ * Ava sets up his MCP servers (plan 2026-11-17-mcp-servers, Phase 4).
3
+ *
4
+ * connection_search the official MCP Registry: who publishes a server (verified
5
+ * namespace), its repository, the exact package and version,
6
+ * which keys it needs — the core of her research
7
+ * connection_list his servers and where each one is
8
+ * connection_add add one, with her view — ALWAYS shows him the card first
9
+ * connection_import what Claude Desktop, Cursor and VS Code have (scan), and
10
+ * bringing in the ones he picks (always asks)
11
+ *
12
+ * Not named mcp_*: that prefix is the servers' OWN tools (permissions.ts).
13
+ * Keys are never taken in the chat (mcp/setup.ts): she names them, he types
14
+ * them on the Connections page.
15
+ */
16
+ import { searchMcpRegistry } from '../mcp/registry.js';
17
+ import { McpServers } from '../mcp/manager.js';
18
+ import { addMcpServers, checkProposal, importMcpServers, settleMcpServers, statusInWords, } from '../mcp/setup.js';
19
+ import { MCP_IMPORT_APP_NAMES, scanMcpImports } from '../mcp/import.js';
20
+ import { describeEntry } from '../mcp/servers-config.js';
21
+ import { redactSecrets } from '../mcp/risk.js';
22
+ import { MCP_SUGGESTIONS } from '../mcp/suggested.js';
23
+ /** The suggested servers he doesn't have yet, for Ava. */
24
+ function suggestionsInWords(have) {
25
+ const left = MCP_SUGGESTIONS.filter((g) => !have.some((s) => s.id === g.id || s.shows === g.url));
26
+ if (!left.length)
27
+ return '';
28
+ const how = { open: 'free, no account', signin: 'free account; he signs in on the page', key: 'free account; he pastes a key on the page' };
29
+ return '\nSuggested servers (checked, free, official; he can add any with connection_add using this exact address'
30
+ + ' — or from the Suggested list on the Connections page):\n'
31
+ + left.map((g) => `• ${g.id} — ${g.name} by ${g.publisher}: ${g.what} ${g.url} (${how[g.kind]}${g.keyHeader ? `; key_header "${g.keyHeader}"` : ''}). Your view: ${g.view}`).join('\n');
32
+ }
33
+ /** The risk notes in words (the page says them in his language; the card and Ava read these). */
34
+ export function riskNoteInWords(n) {
35
+ const d = n.detail ?? '';
36
+ switch (n.code) {
37
+ case 'admin': return 'It asks for administrator rights.';
38
+ case 'deletes': return 'It deletes files or folders.';
39
+ case 'download-run': return 'It downloads a script and runs it.';
40
+ case 'hidden': return 'It runs a hidden (encoded) command.';
41
+ case 'keys-folder': return `It can reach a folder with SSH or cloud keys: ${d}`;
42
+ case 'whole-home': return `It can reach the whole home folder or drive (${d}).`;
43
+ case 'plain-secret': return `A key or password is written in plain text${d ? ` (${redactSecrets(d)})` : ''}.`;
44
+ case 'latest': return `It fetches the newest version of ${d} each time it starts.`;
45
+ case 'online': return `What Ava gives it is sent to ${d}.`;
46
+ case 'bad-url': return "The address won't be used: a server that isn't on this computer needs https.";
47
+ }
48
+ }
49
+ function proposalFrom(args) {
50
+ const s = (k) => (typeof args[k] === 'string' ? args[k] : undefined);
51
+ const settings = args.settings && typeof args.settings === 'object' && !Array.isArray(args.settings)
52
+ ? Object.fromEntries(Object.entries(args.settings).map(([k, v]) => [k, String(v)]))
53
+ : undefined;
54
+ return {
55
+ name: s('name') ?? '',
56
+ command: s('command'),
57
+ url: s('url'),
58
+ keys: Array.isArray(args.keys) ? args.keys.map(String) : undefined,
59
+ keyHeader: s('key_header'),
60
+ settings,
61
+ view: s('view'),
62
+ registry: s('registry_name'),
63
+ repository: s('repository'),
64
+ };
65
+ }
66
+ // ── connection_search ──────────────────────────────────────────────────────
67
+ export class ConnectionSearchTool {
68
+ name = 'connection_search';
69
+ description = 'Look a server up in the official MCP Registry';
70
+ riskLevel = 'safe';
71
+ outputTrust = 'untrusted';
72
+ requiresConfirmation = false;
73
+ schema = {
74
+ name: 'connection_search',
75
+ description: 'Search the official MCP Registry for an MCP server, before suggesting one. It matches server NAMES, not descriptions: search a product or company '
76
+ + '("github", "notion", "postgres") or a publisher namespace ("io.github.github/"). Each result says who published it — the registry verified '
77
+ + 'that namespace (io.github.<account>/ by that GitHub account, com.example/ by that domain) — plus its repository, the exact package and '
78
+ + 'version with the command that runs it, any online address, and the keys it needs (and which are secret). A listing proves the publisher, '
79
+ + 'not that the code is safe; not being listed is not proof of harm. Prefer the product\'s OWN publisher over a third party\'s wrapper.',
80
+ parameters: {
81
+ type: 'object',
82
+ properties: {
83
+ query: { type: 'string', description: 'A name or publisher namespace to look for.' },
84
+ },
85
+ required: ['query'],
86
+ },
87
+ };
88
+ async execute(args) {
89
+ const query = String(args.query ?? '').trim();
90
+ if (!query)
91
+ return { success: false, output: 'Say what to look for.' };
92
+ try {
93
+ const found = await searchMcpRegistry(query, 8);
94
+ if (!found.length)
95
+ return { success: true, output: `Nothing in the MCP Registry has "${query}" in its name. Try the product's or company's name, or search the web for its official MCP server.` };
96
+ const lines = found.map((s) => {
97
+ const out = [`• ${s.name} v${s.version} — published by ${s.publisher} (verified by the registry). ${s.description}`];
98
+ if (s.repository)
99
+ out.push(` repository: ${s.repository}`);
100
+ if (s.status !== 'active')
101
+ out.push(` registry status: ${s.status}`);
102
+ for (const p of s.packages) {
103
+ out.push(` package: ${p.registryType} ${p.identifier}${p.version ? ` ${p.version}` : ''} (${p.transport})${p.command ? ` — runs as: ${p.command.join(' ')}` : ''}`);
104
+ for (const e of p.env)
105
+ out.push(` env ${e.name}${e.secret ? ' [SECRET — a key he sets]' : ''}${e.required ? ' [required]' : ''}${e.description ? `: ${e.description}` : ''}`);
106
+ }
107
+ for (const r of s.remotes) {
108
+ out.push(` online: ${r.url} (${r.type})`);
109
+ for (const h of r.headers)
110
+ out.push(` header ${h.name}${h.secret ? ' [SECRET — a key he sets]' : ''}${h.required ? ' [required]' : ''}${h.description ? `: ${h.description}` : ''}`);
111
+ }
112
+ return out.join('\n');
113
+ });
114
+ return { success: true, output: `MCP Registry results for "${query}":\n${lines.join('\n')}` };
115
+ }
116
+ catch (err) {
117
+ return { success: false, output: `The MCP Registry couldn't be reached: ${err instanceof Error ? err.message : String(err)}` };
118
+ }
119
+ }
120
+ }
121
+ // ── connection_list ────────────────────────────────────────────────────────
122
+ export class ConnectionListTool {
123
+ name = 'connection_list';
124
+ description = 'List his MCP servers and how each is doing';
125
+ riskLevel = 'safe';
126
+ requiresConfirmation = false;
127
+ schema = {
128
+ name: 'connection_list',
129
+ description: 'List the MCP servers he has connected (his own, and this project\'s), with each one\'s state, tools and your earlier view of it — and the checked, free, official servers Ava suggests that he hasn\'t added yet. Look here first when he asks to connect something.',
130
+ parameters: { type: 'object', properties: {} },
131
+ };
132
+ async execute() {
133
+ const m = McpServers.current();
134
+ if (!m.isStarted)
135
+ await m.start();
136
+ const all = m.status();
137
+ const mine = all.filter((s) => s.scope === 'user');
138
+ if (!all.length)
139
+ return { success: true, output: `He has no MCP servers yet. They live on the Connections page (and in ~/.ava/mcp.json).${suggestionsInWords([])}` };
140
+ const lines = all.map((s) => {
141
+ const parts = [`• ${s.id} (${s.scope === 'user' ? 'his' : "this project's"}) — ${statusInWords(s)}`, ` ${s.online ? 'address' : 'command'}: ${redactSecrets(s.shows)}`];
142
+ if (s.ava?.view)
143
+ parts.push(` your view: ${s.ava.view}`);
144
+ if (s.ava?.from)
145
+ parts.push(` brought in from ${s.ava.from}`);
146
+ return parts.join('\n');
147
+ });
148
+ const problems = m.fileProblems();
149
+ return { success: true, output: `${lines.join('\n')}${problems.length ? `\nProblems: ${problems.join('; ')}` : ''}${suggestionsInWords(mine)}` };
150
+ }
151
+ }
152
+ // ── connection_add ─────────────────────────────────────────────────────────
153
+ export class ConnectionAddTool {
154
+ name = 'connection_add';
155
+ description = 'Add an MCP server to his list (he sees it first)';
156
+ riskLevel = 'write';
157
+ requiresConfirmation = true;
158
+ schema = {
159
+ name: 'connection_add',
160
+ description: 'Add an MCP server to his Connections. He ALWAYS sees a card first with the exact command or address, the risks and your view, and says yes or no. '
161
+ + 'Research it first (connection_search; web_search for its docs): who publishes it, what its tools can reach, what it costs him in risk. '
162
+ + 'Give either `command` (a server on this computer — the whole command line, pinned to a version where you can, e.g. "npx -y @scope/pkg@1.2.3") '
163
+ + 'or `url` (an online server, https). NEVER ask him for a key or password in the chat — anything typed here goes to his AI provider. Put secret '
164
+ + 'environment variable NAMES in `keys` (or `key_header` for an online server\'s fixed key); he types the values on the Connections page. '
165
+ + 'An online server that uses a sign-in needs no key: he clicks Sign in on the page.',
166
+ parameters: {
167
+ type: 'object',
168
+ properties: {
169
+ name: { type: 'string', description: 'Short name (letters, digits, - and _), e.g. "github".' },
170
+ command: { type: 'string', description: 'The whole command line, for a server on this computer.' },
171
+ url: { type: 'string', description: 'The address, for an online server.' },
172
+ keys: { type: 'array', items: { type: 'string' }, description: 'Names of SECRET environment variables it needs (values: he sets them on the page).' },
173
+ key_header: { type: 'string', description: 'Online only: the header for a fixed key (e.g. "Authorization"); he sets the value on the page.' },
174
+ settings: { type: 'object', description: 'Environment variables that are NOT secret (a folder, a region), name → value.' },
175
+ view: { type: 'string', description: 'Your honest view in 1-3 sentences, shown on its card: who publishes it, what it can reach, and anything to watch.' },
176
+ registry_name: { type: 'string', description: 'Its name in the MCP Registry, if it is listed.' },
177
+ repository: { type: 'string', description: 'Its source repository, if known.' },
178
+ },
179
+ required: ['name', 'view'],
180
+ },
181
+ };
182
+ async precheck(args) {
183
+ const c = await checkProposal(proposalFrom(args));
184
+ return c.ok ? { ok: true } : { ok: false, output: `Not added: ${c.problem} (He hasn't seen a card.)` };
185
+ }
186
+ deniedMessage(reason) {
187
+ return `He said no to adding this server${reason ? `: "${reason}"` : ''}. Nothing was added.`;
188
+ }
189
+ async execute(args) {
190
+ const c = await checkProposal(proposalFrom(args));
191
+ if (!c.ok)
192
+ return { success: false, output: `Not added: ${c.problem}` };
193
+ if (!McpServers.current().isStarted)
194
+ await McpServers.current().start();
195
+ await addMcpServers([{ id: c.id, entry: c.entry }]);
196
+ const [s] = await settleMcpServers([c.id]);
197
+ const keys = c.slots.length ? ` He sets ${c.slots.length === 1 ? 'its key' : 'its keys'} (${c.slots.join(', ')}) on the Connections page: never ask for ${c.slots.length === 1 ? 'it' : 'them'} here.` : '';
198
+ return { success: true, output: `Added "${c.id}" (${describeEntry(c.entry)}). Now: ${s ? statusInWords(s) : 'starting'}.${keys} Every one of its tools asks him the first time.` };
199
+ }
200
+ }
201
+ // ── connection_import ──────────────────────────────────────────────────────
202
+ const APPS = Object.keys(MCP_IMPORT_APP_NAMES);
203
+ export class ConnectionImportTool {
204
+ name = 'connection_import';
205
+ description = 'Bring in his servers from Claude Desktop, Cursor or VS Code';
206
+ riskLevel = 'safe';
207
+ requiresConfirmation = false; // `bring_in` always asks (ToolRegistry.needsConfirmation)
208
+ schema = {
209
+ name: 'connection_import',
210
+ description: 'ONLY when he asks: bring in MCP servers he set up in Claude Desktop, Cursor or VS Code. action "scan" lists what each app has (their files are only read; '
211
+ + 'keys in them are never shown). action "bring_in" with `picks` adds the ones he chose — he sees a card first; keys written in their files move into '
212
+ + 'his keychain, never through the chat.',
213
+ parameters: {
214
+ type: 'object',
215
+ properties: {
216
+ action: { type: 'string', enum: ['scan', 'bring_in'] },
217
+ picks: {
218
+ type: 'array',
219
+ description: 'For bring_in: the servers to bring in, by app and their name there (from scan).',
220
+ items: { type: 'object', properties: { app: { type: 'string', enum: APPS }, name: { type: 'string' } }, required: ['app', 'name'] },
221
+ },
222
+ },
223
+ required: ['action'],
224
+ },
225
+ };
226
+ async execute(args, _context) {
227
+ if (args.action === 'bring_in') {
228
+ const picks = (Array.isArray(args.picks) ? args.picks : [])
229
+ .map((p) => p)
230
+ .filter((p) => APPS.includes(p.app) && typeof p.name === 'string');
231
+ if (!picks.length)
232
+ return { success: false, output: 'Say which servers to bring in (scan first).' };
233
+ if (!McpServers.current().isStarted)
234
+ await McpServers.current().start();
235
+ const r = await importMcpServers(picks);
236
+ const states = await settleMcpServers(r.added.map((a) => a.id), 20_000);
237
+ const lines = r.added.map((a) => {
238
+ const s = states.find((x) => x.id === a.id);
239
+ return `• ${a.id} from ${a.from}${a.keysMoved ? ` (${a.keysMoved} key${a.keysMoved === 1 ? '' : 's'} moved into his keychain)` : ''} — ${s ? statusInWords(s) : 'starting'}${a.keysToSet.length ? `; he sets ${a.keysToSet.join(', ')} on the Connections page` : ''}`;
240
+ });
241
+ for (const k of r.skipped)
242
+ lines.push(`• skipped ${k.name} from ${k.app}: ${k.why}`);
243
+ return { success: true, output: lines.join('\n') || 'Nothing was brought in.' };
244
+ }
245
+ const sources = await scanMcpImports();
246
+ const lines = [];
247
+ for (const src of sources) {
248
+ const app = MCP_IMPORT_APP_NAMES[src.app];
249
+ if (!src.found) {
250
+ lines.push(`${app}: not set up on this computer.`);
251
+ continue;
252
+ }
253
+ if (src.problem) {
254
+ lines.push(`${app}: its file couldn't be read (${src.problem}).`);
255
+ continue;
256
+ }
257
+ if (!src.servers.length) {
258
+ lines.push(`${app}: no servers.`);
259
+ continue;
260
+ }
261
+ lines.push(`${app}:`);
262
+ for (const c of src.servers) {
263
+ const here = c.here === 'same' ? ' — already in his list' : c.here === 'different' ? ` — he already has a different "${c.id}" (it would come in as "${c.id}-${c.app}")` : '';
264
+ const risks = c.notes.filter((n) => n.code !== 'online').map(riskNoteInWords);
265
+ lines.push(`• ${c.name}: ${c.shows}${here}${Object.keys(c.secrets).length ? ` (${Object.keys(c.secrets).length} key(s) would move into his keychain)` : ''}${risks.length ? `\n ⚠ ${risks.join(' ')}` : ''}`);
266
+ }
267
+ }
268
+ return { success: true, output: lines.join('\n') };
269
+ }
270
+ }
271
+ //# sourceMappingURL=connection-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-tools.js","sourceRoot":"","sources":["../../src/tools/connection-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EACL,aAAa,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,GAChF,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAqB,MAAM,kBAAkB,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAoB,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,0DAA0D;AAC1D,SAAS,kBAAkB,CAAC,IAA0C;IACpE,MAAM,IAAI,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAClG,IAAI,CAAC,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IAC5B,MAAM,GAAG,GAAG,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,uCAAuC,EAAE,GAAG,EAAE,2CAA2C,EAAW,CAAC;IACrJ,OAAO,2GAA2G;UAC9G,2DAA2D;UAC3D,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,EAA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rD,CAAC;CACF"}
@@ -38,7 +38,7 @@ export class CreateProjectTool {
38
38
  schema = {
39
39
  name: 'create_project',
40
40
  description: 'Create a new, empty project folder in the user\'s projects home ' +
41
- '(~/Ava Projects by default) and return its absolute path. ' +
41
+ '(~/.ava/projects by default) and return its absolute path. ' +
42
42
  'Use this when the user asks to START A NEW PROJECT rather than work on ' +
43
43
  'the one that is open — every other file tool is restricted to the ' +
44
44
  'currently open project, so without this a new project would be created ' +
@@ -1 +1 @@
1
- {"version":3,"file":"create-project.js","sourceRoot":"","sources":["../../src/tools/create-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,iBAAiB;IACnB,IAAI,GAAG,gBAAgB,CAAC;IACxB,WAAW,GAAG,iEAAiE,CAAC;IACzF,6EAA6E;IAC7E,sEAAsE;IACtE,uEAAuE;IACvE,gCAAgC;IACvB,SAAS,GAAkB,OAAO,CAAC;IACnC,oBAAoB,GAAG,KAAK,CAAC;IAE7B,MAAM,GAAmB;QAChC,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,kEAAkE;YAClE,4DAA4D;YAC5D,yEAAyE;YACzE,oEAAoE;YACpE,yEAAyE;YACzE,2BAA2B;YAC3B,uEAAuE;YACvE,uEAAuE;YACvE,oEAAoE;QACtE,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,kEAAkE;wBAClE,0DAA0D;iBAC7D;aACF;YACD,QAAQ,EAAE,CAAC,MAAM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tB,IAAI,CAAC;YACH,MAAM,uBAAuB,CAAC,MAAM,CAAC,CAAC;YACtC,SAAS,GAAG,IAAI,CAAC;QACnB,CAAC;QAAC,MAAM,CAAC;YACP,yEAAyE;YACzE,kEAAkE;YAClE,8CAA8C;QAChD,CAAC;QAED,OAAO;YACL,OAAO,EAAE,IAAI;YACb,MAAM,EACJ,WAAW,MAAM,MAAM;gBACvB,CAAC,SAAS;oBACR,CAAC,CAAC,oEAAoE;wBACpE,iCAAiC;oBACnC,CAAC,CAAC,EAAE,CAAC;gBACP,gEAAgE;gBAChE,kEAAkE;gBAClE,wCAAwC;YAC1C,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE;SACrE,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"create-project.js","sourceRoot":"","sources":["../../src/tools/create-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,iBAAiB;IACnB,IAAI,GAAG,gBAAgB,CAAC;IACxB,WAAW,GAAG,iEAAiE,CAAC;IACzF,6EAA6E;IAC7E,sEAAsE;IACtE,uEAAuE;IACvE,gCAAgC;IACvB,SAAS,GAAkB,OAAO,CAAC;IACnC,oBAAoB,GAAG,KAAK,CAAC;IAE7B,MAAM,GAAmB;QAChC,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,kEAAkE;YAClE,6DAA6D;YAC7D,yEAAyE;YACzE,oEAAoE;YACpE,yEAAyE;YACzE,2BAA2B;YAC3B,uEA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C,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;aAC1F,CAAC;QACJ,CAAC;QAED,qEAAqE;QACrE,wEAAwE;QACxE,2EAA2E;QAC3E,mEAAmE;QACnE,yEAAyE;QACzE,0EAA0E;QAC1E,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC;YACH,MAAM,uBAAuB,CAAC,MAAM,CAAC,CAAC;YACtC,SAAS,GAAG,IAAI,CAAC;QACnB,CAAC;QAAC,MAAM,CAAC;YACP,yEAAyE;YACzE,kEAAkE;YAClE,8CAA8C;QAChD,CAAC;QAED,OAAO;YACL,OAAO,EAAE,IAAI;YACb,MAAM,EACJ,WAAW,MAAM,MAAM;gBACvB,CAAC,SAAS;oBACR,CAAC,CAAC,oEAAoE;wBACpE,iCAAiC;oBACnC,CAAC,CAAC,EAAE,CAAC;gBACP,gEAAgE;gBAChE,kEAAkE;gBAClE,wCAAwC;YAC1C,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE;SACrE,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,22 @@
1
+ import type { Tool, ToolResult, ToolExecutionContext, ToolRiskLevel } from './types.js';
2
+ import type { FunctionSchema } from '../providers/types.js';
3
+ /**
4
+ * Hand off from the main chat to the Brainstorm room (plan
5
+ * 2026-11-17-brainstorm, Phase 3) — the focused space where a fragment of an
6
+ * idea becomes ideas, a plan and an experience, all kept and visible beside the
7
+ * chat. Mirror of open_learning_room: the surface renders a button; tapping it
8
+ * opens the room on a NEW brainstorm and sends the primer as its first message,
9
+ * so the thread continues instead of starting cold.
10
+ *
11
+ * Since 17 Nov 2026 the room is the ONLY place brainstorming happens — it is no
12
+ * longer a main-chat mode — so this is how Code, Plan and Chat get there.
13
+ */
14
+ export declare class OpenBrainstormRoomTool implements Tool {
15
+ readonly name = "open_brainstorm_room";
16
+ readonly description = "Hand the user to the Brainstorm room to work an idea through properly \u2014 its ideas, plan and experience kept and visible beside the chat. Shows a button that takes them there.";
17
+ readonly riskLevel: ToolRiskLevel;
18
+ readonly requiresConfirmation = false;
19
+ readonly schema: FunctionSchema;
20
+ execute(_args: Record<string, unknown>, _context: ToolExecutionContext): Promise<ToolResult>;
21
+ }
22
+ //# sourceMappingURL=open-brainstorm-room.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-brainstorm-room.d.ts","sourceRoot":"","sources":["../../src/tools/open-brainstorm-room.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;;;;;;;GAUG;AACH,qBAAa,sBAAuB,YAAW,IAAI;IACjD,QAAQ,CAAC,IAAI,0BAA0B;IACvC,QAAQ,CAAC,WAAW,yLAC+J;IACnL,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAU;IAC3C,QAAQ,CAAC,oBAAoB,SAAS;IAEtC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAoB7B;IAEI,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC;CAGnG"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Hand off from the main chat to the Brainstorm room (plan
3
+ * 2026-11-17-brainstorm, Phase 3) — the focused space where a fragment of an
4
+ * idea becomes ideas, a plan and an experience, all kept and visible beside the
5
+ * chat. Mirror of open_learning_room: the surface renders a button; tapping it
6
+ * opens the room on a NEW brainstorm and sends the primer as its first message,
7
+ * so the thread continues instead of starting cold.
8
+ *
9
+ * Since 17 Nov 2026 the room is the ONLY place brainstorming happens — it is no
10
+ * longer a main-chat mode — so this is how Code, Plan and Chat get there.
11
+ */
12
+ export class OpenBrainstormRoomTool {
13
+ name = 'open_brainstorm_room';
14
+ description = 'Hand the user to the Brainstorm room to work an idea through properly — its ideas, plan and experience kept and visible beside the chat. Shows a button that takes them there.';
15
+ riskLevel = 'safe';
16
+ requiresConfirmation = false;
17
+ schema = {
18
+ name: 'open_brainstorm_room',
19
+ description: 'Offer a one-tap jump to the Brainstorm room (the focused space where an idea — a project, a feature, an experience or a direction — '
20
+ + 'becomes ideas, a plan and an experience, kept beside the chat). Brainstorming lives there, not in the main chat: use it whenever '
21
+ + 'they want to brainstorm or work an idea through. Pair it with one warm line. A passing question about an idea you can just answer.',
22
+ parameters: {
23
+ type: 'object',
24
+ properties: {
25
+ topic: { type: 'string', description: 'What the brainstorm is about, so the button can name it. Omit if unclear.' },
26
+ primer: {
27
+ type: 'string',
28
+ description: 'Their idea so far, written in the FIRST PERSON as their opening message to the room — the real detail they gave '
29
+ + '(the fragment, what it is for, how it should feel), e.g. "I want a budgeting app that feels calm — money stresses me out." '
30
+ + 'When they tap through, the room sends this for them so the thread continues. Omit only if they gave no specifics.',
31
+ },
32
+ },
33
+ required: [],
34
+ },
35
+ };
36
+ async execute(_args, _context) {
37
+ return { success: true, output: 'Offered a jump to the Brainstorm room.' };
38
+ }
39
+ }
40
+ //# sourceMappingURL=open-brainstorm-room.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-brainstorm-room.js","sourceRoot":"","sources":["../../src/tools/open-brainstorm-room.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,MAAM,OAAO,sBAAsB;IACxB,IAAI,GAAG,sBAAsB,CAAC;IAC9B,WAAW,GAClB,gLAAgL,CAAC;IAC1K,SAAS,GAAkB,MAAM,CAAC;IAClC,oBAAoB,GAAG,KAAK,CAAC;IAE7B,MAAM,GAAmB;QAChC,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EACT,sIAAsI;cACpI,mIAAmI;cACnI,oIAAoI;QACxI,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2EAA2E,EAAE;gBACnH,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,kHAAkH;0BAChH,6HAA6H;0BAC7H,mHAAmH;iBACxH;aACF;YACD,QAAQ,EAAE,EAAE;SACb;KACF,CAAC;IAEF,KAAK,CAAC,OAAO,CAAC,KAA8B,EAAE,QAA8B;QAC1E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,wCAAwC,EAAE,CAAC;IAC7E,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"switch-mode.d.ts","sourceRoot":"","sources":["../../src/tools/switch-mode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAK5D,qBAAa,cAAe,YAAW,IAAI;IACzC,QAAQ,CAAC,IAAI,iBAAiB;IAC9B,QAAQ,CAAC,WAAW,yHAA0H;IAC9I,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAU;IAC3C,QAAQ,CAAC,oBAAoB,QAAQ;IAErC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAEhC;;;;;;;;OAQG;gBACS,gBAAgB,UAAO;IAgC7B,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC;CAQnG"}
1
+ {"version":3,"file":"switch-mode.d.ts","sourceRoot":"","sources":["../../src/tools/switch-mode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAM5D,qBAAa,cAAe,YAAW,IAAI;IACzC,QAAQ,CAAC,IAAI,iBAAiB;IAC9B,QAAQ,CAAC,WAAW,yHAA0H;IAC9I,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAU;IAC3C,QAAQ,CAAC,oBAAoB,QAAQ;IAErC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAEhC;;;;;;;;OAQG;gBACS,gBAAgB,UAAO;IAgC7B,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC;CAQnG"}
@@ -1,5 +1,6 @@
1
- /** Modes offered on every surface. */
2
- const CROSS_SURFACE_MODES = ['work', 'plan', 'chat', 'teach', 'security', 'brainstorm', 'write'];
1
+ /** Modes offered on every surface. Brainstorm is not one: it is a room (17 Nov
2
+ * 2026), reached with open_brainstorm_room, not a mode the main chat switches to. */
3
+ const CROSS_SURFACE_MODES = ['work', 'plan', 'chat', 'teach', 'security', 'write'];
3
4
  export class SwitchModeTool {
4
5
  name = 'switch_mode';
5
6
  description = 'Offer to transition to a different mode when the current mode\'s work is complete. Always check with the user first.';
@@ -20,7 +21,7 @@ export class SwitchModeTool {
20
21
  this.schema = {
21
22
  name: 'switch_mode',
22
23
  description: 'Offer to switch to a different mode when a natural transition point is reached. ' +
23
- 'Examples: Plan mode after plan approved → Work mode. Brainstorm after idea refined → Plan or Work. ' +
24
+ 'Examples: Plan mode after plan approved → Work mode. An idea worked out in the Brainstorm room → Plan or Work. ' +
24
25
  'Security after findings → Work to fix. Chat when a task is mentioned → Work or Plan. ' +
25
26
  'The user will see this as a transition card and can confirm, add more context, or decline. ' +
26
27
  'Always ask if there is anything to add before switching.',
@@ -1 +1 @@
1
- {"version":3,"file":"switch-mode.js","sourceRoot":"","sources":["../../src/tools/switch-mode.ts"],"names":[],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;;;;;;OAqBG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAIxC;IAEF,+DAA+D;IAC/D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAI5C;IAEF,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;IAIvC;;;;OAIG;IACH,UAAU,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,UAAU,EAAE;IAiB/D,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO;IAgGhE,OAAO,CACX,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,UAAU,CAAC;IAqItB,OAAO,CAAC,SAAS;CAwBlB;AAED;gDACgD;AAChD,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAMzF"}
@@ -37,6 +37,7 @@ import { TaskManageTool } from './task-manage.js';
37
37
  import { TaskSuggestTool } from './task-suggest.js';
38
38
  import { JournalWriteTool } from './journal.js';
39
39
  import { BrainstormSessionTool } from './brainstorm-session.js';
40
+ import { BrainstormPlanTool } from './brainstorm-plan.js';
40
41
  import { HealthPlanCreateTool } from './health-plan-create.js';
41
42
  import { HealthPlanUpdateTool } from './health-plan-update.js';
42
43
  import { HealthPlanListTool } from './health-plan-list.js';
@@ -72,7 +73,9 @@ import { HealthCatalogueSearchTool } from './health-catalogue-search.js';
72
73
  import { HealthProfileAskTool } from './health-profile-ask.js';
73
74
  import { OpenHealthRoomTool } from './open-health-room.js';
74
75
  import { OpenLearningRoomTool } from './open-learning-room.js';
76
+ import { OpenBrainstormRoomTool } from './open-brainstorm-room.js';
75
77
  import { OpenDesignStudioTool } from './open-design-studio.js';
78
+ import { isUserMcpTool, mcpToolAlwaysAllowed } from '../mcp/permissions.js';
76
79
  import { DesignFindShapeTool, DesignGenerateIconTool, DesignGenerateSetTool, DesignGenerateVideoTool, DesignGenerateImageTool, DesignGenerateVoiceTool, DesignGenerateLogoTool, DesignExploreLogosTool, DesignBrandKitTool, DesignProposeKitTool, DesignSaveToKitTool, DesignSaveTool, } from './design-studio-tools.js';
77
80
  import { DesignFontsTool, DesignInstallFontTool } from './design-fonts.js';
78
81
  import { DesignRestoreImageTool } from './gimp/build-image.js';
@@ -122,6 +125,7 @@ import { EnvWriteTool } from './env-write.js';
122
125
  // See ./desktop-tools.ts for the full reasoning before adding an import here.
123
126
  import { RecordMachineRuleTool } from './record-machine-rule.js';
124
127
  import { bashDangerTier } from './bash.js';
128
+ import { ConnectionAddTool, ConnectionImportTool, ConnectionListTool, ConnectionSearchTool } from './connection-tools.js';
125
129
  // ── Untrusted output wrapper ───────────────────────────────────────────────
126
130
  // Tools that fetch external content (web_search, http_request, browser
127
131
  // extracts, file_read of arbitrary files, docs_lookup) declare
@@ -163,6 +167,8 @@ export const TOOL_CATEGORY_MAP = {
163
167
  git_create_pr: 'git', rollback: 'git',
164
168
  // Web — search, HTTP, browsing, real-world data
165
169
  web_search: 'web', http_request: 'web', browser: 'web',
170
+ // His MCP servers (Phase 4): looking one up is web; adding one changes his setup.
171
+ connection_search: 'web', connection_list: 'system', connection_add: 'system', connection_import: 'system',
166
172
  weather: 'web', news: 'web', release_notes: 'web',
167
173
  // Browser automation (Desktop mode) — Playwright DOM via Tauri subprocess
168
174
  browser_navigate: 'web', browser_snapshot: 'web', browser_click: 'web',
@@ -411,6 +417,11 @@ export class ToolRegistry {
411
417
  new MemoryRecallV4Tool(),
412
418
  new ConversationRecallTool(),
413
419
  new CheckPostsTool(),
420
+ // His MCP servers: Ava researches and sets them up (plan 2026-11-17-mcp-servers, Phase 4).
421
+ new ConnectionSearchTool(),
422
+ new ConnectionListTool(),
423
+ new ConnectionAddTool(),
424
+ new ConnectionImportTool(),
414
425
  new ReviewPostTool(),
415
426
  new MemoryUpdateV4Tool(),
416
427
  new MemoryDeleteV4Tool(),
@@ -427,10 +438,12 @@ export class ToolRegistry {
427
438
  new TaskSuggestTool(),
428
439
  new JournalWriteTool(),
429
440
  new BrainstormSessionTool(),
441
+ new BrainstormPlanTool(),
430
442
  new HealthCatalogueSearchTool(),
431
443
  new HealthProfileAskTool(),
432
444
  new OpenHealthRoomTool(),
433
445
  new OpenLearningRoomTool(),
446
+ new OpenBrainstormRoomTool(),
434
447
  new OpenDesignStudioTool(),
435
448
  new DesignFindShapeTool(),
436
449
  new DesignGenerateIconTool(),
@@ -646,8 +659,22 @@ export class ToolRegistry {
646
659
  || tool.name === 'health_profile_ask' || tool.name === 'task_suggest'
647
660
  // A new health plan is SHOWN to them before it is saved (12 Nov 2026);
648
661
  // "always allow" on its category must not skip the look.
649
- || tool.name === 'health_plan_create')
662
+ || tool.name === 'health_plan_create'
663
+ // A server runs as him: he sees the exact command and Ava's view before
664
+ // it's added, whatever the permission mode (plan 2026-11-17-mcp-servers).
665
+ || tool.name === 'connection_add'
666
+ || (tool.name === 'connection_import' && args?.action === 'bring_in')
667
+ // A brainstorm's experience going into a brand kit changes the kit every
668
+ // mode designs from (plan 2026-11-17-brainstorm): he sees it first.
669
+ || (tool.name === 'brainstorm_session' && args?.action === 'experience_to_kit'))
650
670
  return true;
671
+ // Tools from a server the person added (mcp_<server>_<tool>) ask until he
672
+ // says "always allow" for that one tool, whatever the permission mode and
673
+ // whatever the server calls them: a server's own read-only label isn't
674
+ // trusted (plan 2026-11-17-mcp-servers, decision 2). Blender's own tools
675
+ // are not these (blender_live_*).
676
+ if (isUserMcpTool(tool.name))
677
+ return !mcpToolAlwaysAllowed(tool.name);
651
678
  // Tools that handle approval inside their own execute() (desktop-safety-gate
652
679
  // pattern) skip the generic flow — they carry richer per-invocation
653
680
  // classification and prompting here would double-ask the user.