@project-ava-supernova/core 0.2.186 → 0.2.188

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 (169) hide show
  1. package/dist/agent/agent.d.ts +2 -1
  2. package/dist/agent/agent.d.ts.map +1 -1
  3. package/dist/agent/agent.js +22 -4
  4. package/dist/agent/agent.js.map +1 -1
  5. package/dist/agent/system-prompt.d.ts.map +1 -1
  6. package/dist/agent/system-prompt.js +13 -1
  7. package/dist/agent/system-prompt.js.map +1 -1
  8. package/dist/docs/content/features.d.ts.map +1 -1
  9. package/dist/docs/content/features.js +2 -1
  10. package/dist/docs/content/features.js.map +1 -1
  11. package/dist/docs/i18n/translations.d.ts.map +1 -1
  12. package/dist/docs/i18n/translations.js +1 -1
  13. package/dist/docs/i18n/translations.js.map +1 -1
  14. package/dist/i18n/keep-english.d.ts.map +1 -1
  15. package/dist/i18n/keep-english.js +0 -4
  16. package/dist/i18n/keep-english.js.map +1 -1
  17. package/dist/i18n/locales/ar.d.ts.map +1 -1
  18. package/dist/i18n/locales/ar.js +169 -33
  19. package/dist/i18n/locales/ar.js.map +1 -1
  20. package/dist/i18n/locales/de.d.ts.map +1 -1
  21. package/dist/i18n/locales/de.js +169 -33
  22. package/dist/i18n/locales/de.js.map +1 -1
  23. package/dist/i18n/locales/en.d.ts +167 -32
  24. package/dist/i18n/locales/en.d.ts.map +1 -1
  25. package/dist/i18n/locales/en.js +170 -33
  26. package/dist/i18n/locales/en.js.map +1 -1
  27. package/dist/i18n/locales/es.d.ts.map +1 -1
  28. package/dist/i18n/locales/es.js +169 -33
  29. package/dist/i18n/locales/es.js.map +1 -1
  30. package/dist/i18n/locales/fr.d.ts.map +1 -1
  31. package/dist/i18n/locales/fr.js +169 -33
  32. package/dist/i18n/locales/fr.js.map +1 -1
  33. package/dist/i18n/locales/hi.d.ts.map +1 -1
  34. package/dist/i18n/locales/hi.js +169 -33
  35. package/dist/i18n/locales/hi.js.map +1 -1
  36. package/dist/i18n/locales/id.d.ts.map +1 -1
  37. package/dist/i18n/locales/id.js +169 -33
  38. package/dist/i18n/locales/id.js.map +1 -1
  39. package/dist/i18n/locales/it.d.ts.map +1 -1
  40. package/dist/i18n/locales/it.js +169 -33
  41. package/dist/i18n/locales/it.js.map +1 -1
  42. package/dist/i18n/locales/ja.d.ts.map +1 -1
  43. package/dist/i18n/locales/ja.js +169 -33
  44. package/dist/i18n/locales/ja.js.map +1 -1
  45. package/dist/i18n/locales/ko.d.ts.map +1 -1
  46. package/dist/i18n/locales/ko.js +169 -33
  47. package/dist/i18n/locales/ko.js.map +1 -1
  48. package/dist/i18n/locales/nl.d.ts.map +1 -1
  49. package/dist/i18n/locales/nl.js +169 -33
  50. package/dist/i18n/locales/nl.js.map +1 -1
  51. package/dist/i18n/locales/pl.d.ts.map +1 -1
  52. package/dist/i18n/locales/pl.js +169 -33
  53. package/dist/i18n/locales/pl.js.map +1 -1
  54. package/dist/i18n/locales/pt.d.ts.map +1 -1
  55. package/dist/i18n/locales/pt.js +169 -33
  56. package/dist/i18n/locales/pt.js.map +1 -1
  57. package/dist/i18n/locales/ru.d.ts.map +1 -1
  58. package/dist/i18n/locales/ru.js +169 -33
  59. package/dist/i18n/locales/ru.js.map +1 -1
  60. package/dist/i18n/locales/th.d.ts.map +1 -1
  61. package/dist/i18n/locales/th.js +169 -33
  62. package/dist/i18n/locales/th.js.map +1 -1
  63. package/dist/i18n/locales/tr.d.ts.map +1 -1
  64. package/dist/i18n/locales/tr.js +169 -33
  65. package/dist/i18n/locales/tr.js.map +1 -1
  66. package/dist/i18n/locales/uk.d.ts.map +1 -1
  67. package/dist/i18n/locales/uk.js +169 -33
  68. package/dist/i18n/locales/uk.js.map +1 -1
  69. package/dist/i18n/locales/vi.d.ts.map +1 -1
  70. package/dist/i18n/locales/vi.js +169 -33
  71. package/dist/i18n/locales/vi.js.map +1 -1
  72. package/dist/i18n/locales/zh-CN.d.ts.map +1 -1
  73. package/dist/i18n/locales/zh-CN.js +169 -33
  74. package/dist/i18n/locales/zh-CN.js.map +1 -1
  75. package/dist/i18n/locales/zh-TW.d.ts.map +1 -1
  76. package/dist/i18n/locales/zh-TW.js +169 -33
  77. package/dist/i18n/locales/zh-TW.js.map +1 -1
  78. package/dist/index.d.ts +9 -0
  79. package/dist/index.d.ts.map +1 -1
  80. package/dist/index.js +7 -0
  81. package/dist/index.js.map +1 -1
  82. package/dist/mcp/connection.d.ts +125 -0
  83. package/dist/mcp/connection.d.ts.map +1 -0
  84. package/dist/mcp/connection.js +249 -0
  85. package/dist/mcp/connection.js.map +1 -0
  86. package/dist/mcp/import.d.ts +47 -0
  87. package/dist/mcp/import.d.ts.map +1 -0
  88. package/dist/mcp/import.js +157 -0
  89. package/dist/mcp/import.js.map +1 -0
  90. package/dist/mcp/index.d.ts +30 -0
  91. package/dist/mcp/index.d.ts.map +1 -0
  92. package/dist/mcp/index.js +17 -0
  93. package/dist/mcp/index.js.map +1 -0
  94. package/dist/mcp/manager.d.ts +144 -0
  95. package/dist/mcp/manager.d.ts.map +1 -0
  96. package/dist/mcp/manager.js +550 -0
  97. package/dist/mcp/manager.js.map +1 -0
  98. package/dist/mcp/oauth.d.ts +117 -0
  99. package/dist/mcp/oauth.d.ts.map +1 -0
  100. package/dist/mcp/oauth.js +382 -0
  101. package/dist/mcp/oauth.js.map +1 -0
  102. package/dist/mcp/page.d.ts +99 -0
  103. package/dist/mcp/page.d.ts.map +1 -0
  104. package/dist/mcp/page.js +287 -0
  105. package/dist/mcp/page.js.map +1 -0
  106. package/dist/mcp/permissions.d.ts +22 -0
  107. package/dist/mcp/permissions.d.ts.map +1 -0
  108. package/dist/mcp/permissions.js +35 -0
  109. package/dist/mcp/permissions.js.map +1 -0
  110. package/dist/mcp/registry.d.ts +63 -0
  111. package/dist/mcp/registry.d.ts.map +1 -0
  112. package/dist/mcp/registry.js +106 -0
  113. package/dist/mcp/registry.js.map +1 -0
  114. package/dist/mcp/risk.d.ts +23 -0
  115. package/dist/mcp/risk.d.ts.map +1 -0
  116. package/dist/mcp/risk.js +98 -0
  117. package/dist/mcp/risk.js.map +1 -0
  118. package/dist/mcp/secrets.d.ts +38 -0
  119. package/dist/mcp/secrets.d.ts.map +1 -0
  120. package/dist/mcp/secrets.js +82 -0
  121. package/dist/mcp/secrets.js.map +1 -0
  122. package/dist/mcp/servers-config.d.ts +107 -0
  123. package/dist/mcp/servers-config.d.ts.map +1 -0
  124. package/dist/mcp/servers-config.js +243 -0
  125. package/dist/mcp/servers-config.js.map +1 -0
  126. package/dist/mcp/setup.d.ts +75 -0
  127. package/dist/mcp/setup.d.ts.map +1 -0
  128. package/dist/mcp/setup.js +150 -0
  129. package/dist/mcp/setup.js.map +1 -0
  130. package/dist/mcp/suggested.d.ts +47 -0
  131. package/dist/mcp/suggested.d.ts.map +1 -0
  132. package/dist/mcp/suggested.js +91 -0
  133. package/dist/mcp/suggested.js.map +1 -0
  134. package/dist/mcp/tools.d.ts +30 -0
  135. package/dist/mcp/tools.d.ts.map +1 -0
  136. package/dist/mcp/tools.js +83 -0
  137. package/dist/mcp/tools.js.map +1 -0
  138. package/dist/tools/blender/build-model.d.ts +10 -0
  139. package/dist/tools/blender/build-model.d.ts.map +1 -1
  140. package/dist/tools/blender/build-model.js +11 -2
  141. package/dist/tools/blender/build-model.js.map +1 -1
  142. package/dist/tools/blender/live-setup.d.ts +63 -0
  143. package/dist/tools/blender/live-setup.d.ts.map +1 -0
  144. package/dist/tools/blender/live-setup.js +281 -0
  145. package/dist/tools/blender/live-setup.js.map +1 -0
  146. package/dist/tools/blender/live-tools.d.ts +83 -0
  147. package/dist/tools/blender/live-tools.d.ts.map +1 -0
  148. package/dist/tools/blender/live-tools.js +402 -0
  149. package/dist/tools/blender/live-tools.js.map +1 -0
  150. package/dist/tools/blender/live.d.ts +88 -0
  151. package/dist/tools/blender/live.d.ts.map +1 -0
  152. package/dist/tools/blender/live.js +285 -0
  153. package/dist/tools/blender/live.js.map +1 -0
  154. package/dist/tools/blender/runner-py.d.ts +7 -0
  155. package/dist/tools/blender/runner-py.d.ts.map +1 -1
  156. package/dist/tools/blender/runner-py.js +108 -100
  157. package/dist/tools/blender/runner-py.js.map +1 -1
  158. package/dist/tools/connection-tools.d.ts +61 -0
  159. package/dist/tools/connection-tools.d.ts.map +1 -0
  160. package/dist/tools/connection-tools.js +271 -0
  161. package/dist/tools/connection-tools.js.map +1 -0
  162. package/dist/tools/tool-registry.d.ts +2 -0
  163. package/dist/tools/tool-registry.d.ts.map +1 -1
  164. package/dist/tools/tool-registry.js +35 -1
  165. package/dist/tools/tool-registry.js.map +1 -1
  166. package/dist/tools/tool-request-words.d.ts.map +1 -1
  167. package/dist/tools/tool-request-words.js +34 -0
  168. package/dist/tools/tool-request-words.js.map +1 -1
  169. package/package.json +2 -1
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Adding servers — shared by Ava's tools (tools/connection-tools.ts) and the
3
+ * Connections page (plan 2026-11-17-mcp-servers, Phase 4).
4
+ *
5
+ * Ava never handles a key's VALUE: anything typed in the chat goes to his AI
6
+ * provider. She names the keys a server needs; the entry gets
7
+ * `${secret:<server>.<NAME>}` slots, the server shows "needs a key", and he
8
+ * types the value on the Connections page (straight into the keychain).
9
+ * Imported servers are the exception that proves it: their keys move from
10
+ * the other app's file into the keychain without ever passing through her.
11
+ */
12
+ import { type McpServerStatus } from './manager.js';
13
+ import { type McpServerEntry } from './servers-config.js';
14
+ import { type McpRiskNote } from './risk.js';
15
+ import { type McpImportApp } from './import.js';
16
+ export interface McpProposal {
17
+ /** What to call it (becomes its id: letters, digits, _ and -). */
18
+ name: string;
19
+ /** The whole command line, for a server on this computer. */
20
+ command?: string;
21
+ /** Its address, for an online server. */
22
+ url?: string;
23
+ /** Environment variables it needs that are SECRET: names only, he sets the values. */
24
+ keys?: string[];
25
+ /** An online server's fixed-key header (e.g. Authorization), value set by him. */
26
+ keyHeader?: string;
27
+ /** Environment variables that are NOT secret (a folder, a region…). */
28
+ settings?: Record<string, string>;
29
+ /** Her view, shown on its card. */
30
+ view?: string;
31
+ registry?: string;
32
+ repository?: string;
33
+ }
34
+ export type McpProposalCheck = {
35
+ ok: true;
36
+ id: string;
37
+ entry: McpServerEntry;
38
+ shows: string;
39
+ notes: McpRiskNote[];
40
+ slots: string[];
41
+ } | {
42
+ ok: false;
43
+ problem: string;
44
+ };
45
+ /** The entry a proposal would add, or what's wrong with it. Writes nothing. */
46
+ export declare function checkProposal(p: McpProposal): Promise<McpProposalCheck>;
47
+ /** Add servers (and keep any keys that came with them), then start them. */
48
+ export declare function addMcpServers(items: Array<{
49
+ id: string;
50
+ entry: McpServerEntry;
51
+ secrets?: Record<string, string>;
52
+ }>): Promise<void>;
53
+ /** Wait (up to `ms`) for these servers to finish starting, and say where they got to. */
54
+ export declare function settleMcpServers(ids: string[], ms?: number): Promise<McpServerStatus[]>;
55
+ export interface McpImportResult {
56
+ added: Array<{
57
+ id: string;
58
+ from: string;
59
+ keysMoved: number;
60
+ keysToSet: string[];
61
+ }>;
62
+ skipped: Array<{
63
+ app: string;
64
+ name: string;
65
+ why: string;
66
+ }>;
67
+ }
68
+ /** Bring in the servers he picked from the other apps. */
69
+ export declare function importMcpServers(picks: Array<{
70
+ app: McpImportApp;
71
+ name: string;
72
+ }>, paths?: Record<McpImportApp, string>): Promise<McpImportResult>;
73
+ /** A status in plain words, for Ava. */
74
+ export declare function statusInWords(s: McpServerStatus): string;
75
+ //# sourceMappingURL=setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/mcp/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EACsE,KAAK,cAAc,EAC/F,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAA4B,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAEvE,OAAO,EAAwD,KAAK,YAAY,EAAE,MAAM,aAAa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AG,OAAO,CAAC,eAAe,EAAE,CAAC,CAM7F;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;IACnF,OAAO,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC5D;AAED,0DAA0D;AAC1D,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC;IAAE,GAAG,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,KAAK,+BAAmB,GAAG,OAAO,CAAC,eAAe,CAAC,CA4B5I;AAED,wCAAwC;AACxC,wBAAgB,aAAa,CAAC,CAAC,EAAE,eAAe,GAAG,MAAM,CAWxD"}
@@ -0,0 +1,150 @@
1
+ /**
2
+ * Adding servers — shared by Ava's tools (tools/connection-tools.ts) and the
3
+ * Connections page (plan 2026-11-17-mcp-servers, Phase 4).
4
+ *
5
+ * Ava never handles a key's VALUE: anything typed in the chat goes to his AI
6
+ * provider. She names the keys a server needs; the entry gets
7
+ * `${secret:<server>.<NAME>}` slots, the server shows "needs a key", and he
8
+ * types the value on the Connections page (straight into the keychain).
9
+ * Imported servers are the exception that proves it: their keys move from
10
+ * the other app's file into the keychain without ever passing through her.
11
+ */
12
+ import { McpServers } from './manager.js';
13
+ import { cleanServerId, describeEntry, readMcpFile, updateMcpFile, } from './servers-config.js';
14
+ import { setMcpSecret } from './secrets.js';
15
+ import { checkServerUrl } from './connection.js';
16
+ import { redactSecrets, riskNotes } from './risk.js';
17
+ import { splitCommandLine } from './page.js';
18
+ import { MCP_IMPORT_APP_NAMES, mcpImportPaths, scanMcpImports } from './import.js';
19
+ const ENV_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
20
+ /** The entry a proposal would add, or what's wrong with it. Writes nothing. */
21
+ export async function checkProposal(p) {
22
+ if (!p.name?.trim())
23
+ return { ok: false, problem: 'It needs a name.' };
24
+ const id = cleanServerId(p.name);
25
+ const slots = [];
26
+ let entry;
27
+ if (p.url?.trim()) {
28
+ const url = p.url.trim();
29
+ const bad = checkServerUrl(url);
30
+ if (bad)
31
+ return { ok: false, problem: bad };
32
+ entry = { type: 'http', url };
33
+ if (p.keyHeader?.trim()) {
34
+ const header = p.keyHeader.trim();
35
+ const slot = `${id}.key`;
36
+ slots.push(slot);
37
+ entry.headers = { [header]: /^authorization$/i.test(header) ? `Bearer \${secret:${slot}}` : `\${secret:${slot}}` };
38
+ }
39
+ }
40
+ else if (p.command?.trim()) {
41
+ const parts = splitCommandLine(p.command);
42
+ if (!parts[0])
43
+ return { ok: false, problem: 'The command is empty.' };
44
+ entry = { command: parts[0], ...(parts.length > 1 ? { args: parts.slice(1) } : {}) };
45
+ const env = {};
46
+ for (const [k, v] of Object.entries(p.settings ?? {})) {
47
+ if (!ENV_NAME.test(k))
48
+ return { ok: false, problem: `"${k}" isn't a usable setting name.` };
49
+ env[k] = String(v);
50
+ }
51
+ for (const k of p.keys ?? []) {
52
+ if (!ENV_NAME.test(k))
53
+ return { ok: false, problem: `"${k}" isn't a usable key name.` };
54
+ const slot = `${id}.${k}`;
55
+ slots.push(slot);
56
+ env[k] = `\${secret:${slot}}`;
57
+ }
58
+ if (Object.keys(env).length)
59
+ entry.env = env;
60
+ }
61
+ else {
62
+ return { ok: false, problem: 'It needs a command (a server on this computer) or an address (an online server).' };
63
+ }
64
+ const ava = {};
65
+ if (p.view?.trim())
66
+ ava.view = p.view.trim().slice(0, 1200);
67
+ if (p.registry?.trim())
68
+ ava.registry = p.registry.trim().slice(0, 200);
69
+ if (p.repository?.trim())
70
+ ava.repository = p.repository.trim().slice(0, 300);
71
+ if (Object.keys(ava).length)
72
+ entry.ava = { ...ava, at: new Date().toISOString() };
73
+ const { file } = await readMcpFile();
74
+ if (file.mcpServers[id])
75
+ return { ok: false, problem: `He already has a server called "${id}". Use another name, or he can remove that one on the Connections page.` };
76
+ return { ok: true, id, entry, shows: describeEntry(entry), notes: riskNotes(entry), slots };
77
+ }
78
+ /** Add servers (and keep any keys that came with them), then start them. */
79
+ export async function addMcpServers(items) {
80
+ for (const it of items)
81
+ for (const [name, value] of Object.entries(it.secrets ?? {}))
82
+ await setMcpSecret(name, value);
83
+ await updateMcpFile((f) => { for (const it of items)
84
+ f.mcpServers[it.id] = it.entry; });
85
+ await McpServers.current().reload();
86
+ }
87
+ /** Wait (up to `ms`) for these servers to finish starting, and say where they got to. */
88
+ export async function settleMcpServers(ids, ms = 30_000) {
89
+ const m = McpServers.current();
90
+ const mine = () => m.status().filter((s) => s.scope === 'user' && ids.includes(s.id));
91
+ const end = Date.now() + ms;
92
+ while (Date.now() < end && mine().some((s) => s.state === 'connecting'))
93
+ await new Promise((r) => setTimeout(r, 200));
94
+ return mine();
95
+ }
96
+ /** Bring in the servers he picked from the other apps. */
97
+ export async function importMcpServers(picks, paths = mcpImportPaths()) {
98
+ const sources = await scanMcpImports(paths);
99
+ const { file } = await readMcpFile();
100
+ const taken = new Set(Object.keys(file.mcpServers));
101
+ const result = { added: [], skipped: [] };
102
+ const items = [];
103
+ for (const pick of picks) {
104
+ const appName = MCP_IMPORT_APP_NAMES[pick.app] ?? pick.app;
105
+ const c = sources.find((s) => s.app === pick.app)?.servers.find((x) => x.name === pick.name);
106
+ if (!c) {
107
+ result.skipped.push({ app: appName, name: pick.name, why: 'not found there' });
108
+ continue;
109
+ }
110
+ if (c.here === 'same') {
111
+ result.skipped.push({ app: appName, name: pick.name, why: 'already in your list' });
112
+ continue;
113
+ }
114
+ let id = c.id;
115
+ if (taken.has(id))
116
+ id = cleanServerId(`${c.id}-${pick.app}`);
117
+ if (taken.has(id)) {
118
+ result.skipped.push({ app: appName, name: pick.name, why: `the name "${c.id}" is taken` });
119
+ continue;
120
+ }
121
+ taken.add(id);
122
+ // Renamed: its key slots follow the new name.
123
+ const rename = (v) => (id === c.id ? v : v.split(`\${secret:${c.id}.`).join(`\${secret:${id}.`));
124
+ const entry = JSON.parse(rename(JSON.stringify(c.entry)));
125
+ const secrets = Object.fromEntries(Object.entries(c.secrets).map(([k, v]) => [id === c.id ? k : `${id}.${k.slice(c.id.length + 1)}`, v]));
126
+ entry.ava = { from: appName, at: new Date().toISOString() };
127
+ items.push({ id, entry, secrets });
128
+ result.added.push({
129
+ id, from: appName, keysMoved: Object.keys(secrets).length,
130
+ keysToSet: c.slots.map((s) => (id === c.id ? s : `${id}.${s.slice(c.id.length + 1)}`)),
131
+ });
132
+ }
133
+ if (items.length)
134
+ await addMcpServers(items);
135
+ return result;
136
+ }
137
+ /** A status in plain words, for Ava. */
138
+ export function statusInWords(s) {
139
+ const where = s.online ? 'online' : 'on this computer';
140
+ switch (s.state) {
141
+ case 'ready': return `running (${where}), ${s.tools.length} tool${s.tools.length === 1 ? '' : 's'}: ${s.tools.map((t) => t.name).join(', ')}`;
142
+ case 'connecting': return 'still starting';
143
+ case 'needs-key': return `waiting for ${s.missing?.length === 1 ? 'a key' : 'keys'} he sets on the Connections page: ${(s.missing ?? []).join(', ')}`;
144
+ case 'needs-signin': return 'waiting for him to sign in (Sign in button on the Connections page)';
145
+ case 'waiting': return "a project's server, waiting for his yes on the Connections page";
146
+ case 'off': return 'switched off';
147
+ default: return `couldn't start: ${redactSecrets(s.message ?? 'no reason given')}`;
148
+ }
149
+ }
150
+ //# sourceMappingURL=setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/mcp/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAwB,MAAM,cAAc,CAAC;AAChE,OAAO,EACL,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,GACzD,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CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC;IACvD,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC;QAChB,KAAK,OAAO,CAAC,CAAC,OAAO,YAAY,KAAK,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9I,KAAK,YAAY,CAAC,CAAC,OAAO,gBAAgB,CAAC;QAC3C,KAAK,WAAW,CAAC,CAAC,OAAO,eAAe,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,qCAAqC,CAAC,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACtJ,KAAK,cAAc,CAAC,CAAC,OAAO,qEAAqE,CAAC;QAClG,KAAK,SAAS,CAAC,CAAC,OAAO,iEAAiE,CAAC;QACzF,KAAK,KAAK,CAAC,CAAC,OAAO,cAAc,CAAC;QAClC,OAAO,CAAC,CAAC,OAAO,mBAAmB,aAAa,CAAC,CAAC,CAAC,OAAO,IAAI,iBAAiB,CAAC,EAAE,CAAC;IACrF,CAAC;AACH,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Suggested servers — a short, free, checked list on the Connections page and
3
+ * known to Ava (plan 2026-11-17-mcp-servers; his call 17 Nov: "a selection of
4
+ * free helpful mcp's along with the ability for the user to add their own").
5
+ *
6
+ * Suggested, never installed: each one goes through the same card (exact
7
+ * address, warnings, his yes) as anything else. All are ONLINE servers from the
8
+ * company itself, so nothing is downloaded or run on his computer. Only gaps:
9
+ * Ava already reads files, runs git, fetches pages and browses, so servers that
10
+ * repeat those aren't here.
11
+ *
12
+ * Checked 17 Nov 2026, each against its live address (open / wants a sign-in /
13
+ * lets an app register itself) and the official MCP Registry, plus its own
14
+ * docs for "free". RE-CHECK EVERY RELEASE: run the probe in the plan, and
15
+ * drop anything that stops being free or official.
16
+ *
17
+ * Words for him (what it does, Ava's view) live in the locale files under
18
+ * mcp.suggest.<id>.*, so the page says them in his language.
19
+ */
20
+ export type McpSuggestionKind = 'open' | 'signin' | 'key';
21
+ export interface McpSuggestion {
22
+ id: string;
23
+ /** What to call it on the page. */
24
+ name: string;
25
+ /** Who runs it. */
26
+ publisher: string;
27
+ /** Its name in the official MCP Registry (publisher verified there), if listed. */
28
+ registry?: string;
29
+ kind: McpSuggestionKind;
30
+ url: string;
31
+ /** Its own page about the server (checked 17 Nov: each answers and is about this server). */
32
+ docs: string;
33
+ /** 'key' servers: the header his key goes in (value set on the page). */
34
+ keyHeader?: string;
35
+ /** Sign-in permissions to ask for, when the server offers far more than its tools need. */
36
+ scopes?: string[];
37
+ /** In English, for Ava (the page uses mcp.suggest.<id>.what). */
38
+ what: string;
39
+ /** Ava's view, in English (the page uses mcp.suggest.<id>.view). */
40
+ view: string;
41
+ }
42
+ export declare const MCP_SUGGESTIONS: McpSuggestion[];
43
+ /** A suggested server, matched by its address. */
44
+ export declare function suggestionFor(url: string | undefined): McpSuggestion | undefined;
45
+ /** The permissions a suggested server should ask for, matched by address. */
46
+ export declare function suggestedScopes(url: string | undefined): string[] | undefined;
47
+ //# sourceMappingURL=suggested.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suggested.d.ts","sourceRoot":"","sources":["../../src/mcp/suggested.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,QAAQ,GACR,KAAK,CAAC;AAEV,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,iBAAiB,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,6FAA6F;IAC7F,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2FAA2F;IAC3F,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,eAAe,EAAE,aAAa,EA4D1C,CAAC;AAEF,kDAAkD;AAClD,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAEhF;AAED,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,SAAS,CAG7E"}
@@ -0,0 +1,91 @@
1
+ /**
2
+ * Suggested servers — a short, free, checked list on the Connections page and
3
+ * known to Ava (plan 2026-11-17-mcp-servers; his call 17 Nov: "a selection of
4
+ * free helpful mcp's along with the ability for the user to add their own").
5
+ *
6
+ * Suggested, never installed: each one goes through the same card (exact
7
+ * address, warnings, his yes) as anything else. All are ONLINE servers from the
8
+ * company itself, so nothing is downloaded or run on his computer. Only gaps:
9
+ * Ava already reads files, runs git, fetches pages and browses, so servers that
10
+ * repeat those aren't here.
11
+ *
12
+ * Checked 17 Nov 2026, each against its live address (open / wants a sign-in /
13
+ * lets an app register itself) and the official MCP Registry, plus its own
14
+ * docs for "free". RE-CHECK EVERY RELEASE: run the probe in the plan, and
15
+ * drop anything that stops being free or official.
16
+ *
17
+ * Words for him (what it does, Ava's view) live in the locale files under
18
+ * mcp.suggest.<id>.*, so the page says them in his language.
19
+ */
20
+ export const MCP_SUGGESTIONS = [
21
+ {
22
+ id: 'context7', name: 'Context7', publisher: 'Upstash', registry: 'io.github.upstash/context7', kind: 'open',
23
+ url: 'https://mcp.context7.com/mcp', docs: 'https://github.com/upstash/context7',
24
+ what: 'Up-to-date documentation for code libraries and frameworks.',
25
+ view: "Run by Upstash and verified in the MCP Registry. It helps me write code for the library version you actually use instead of an old one. It's free without an account at a lower hourly limit; a free Context7 key raises it. It only reads public docs.",
26
+ },
27
+ {
28
+ id: 'deepwiki', name: 'DeepWiki', publisher: 'Cognition', kind: 'open',
29
+ url: 'https://mcp.deepwiki.com/mcp', docs: 'https://docs.devin.ai/work-with-devin/deepwiki-mcp',
30
+ what: 'Explanations of, and answers about, any public GitHub repository.',
31
+ view: "Run by Cognition (the makers of Devin), free with no account. It isn't listed in the MCP Registry, so I've gone on Cognition's own announcement. It only sees public repositories, and the questions I ask it are sent to Cognition.",
32
+ },
33
+ {
34
+ id: 'microsoft-learn', name: 'Microsoft Learn', publisher: 'Microsoft', registry: 'com.microsoft/microsoft-learn-mcp', kind: 'open',
35
+ url: 'https://learn.microsoft.com/api/mcp', docs: 'https://learn.microsoft.com/training/support/mcp',
36
+ what: "Microsoft's official documentation: Windows, .NET, Azure, PowerShell and more.",
37
+ view: "Microsoft's own server, verified in the MCP Registry. Free, no account, and read-only: it searches and reads Microsoft's public docs. Useful whenever you work with Windows, .NET or Azure.",
38
+ },
39
+ {
40
+ id: 'cloudflare-docs', name: 'Cloudflare Docs', publisher: 'Cloudflare', registry: 'com.cloudflare.mcp/mcp', kind: 'open',
41
+ url: 'https://docs.mcp.cloudflare.com/mcp', docs: 'https://developers.cloudflare.com/agents/model-context-protocol/cloudflare/servers-for-cloudflare/',
42
+ what: "Cloudflare's official documentation.",
43
+ view: "Cloudflare's own server, verified in the MCP Registry. Free, no account, read-only: it searches Cloudflare's public docs. Only worth adding if you use Cloudflare.",
44
+ },
45
+ {
46
+ id: 'huggingface', name: 'Hugging Face', publisher: 'Hugging Face', registry: 'co.huggingface/hf-mcp-server', kind: 'open',
47
+ url: 'https://huggingface.co/mcp', docs: 'https://huggingface.co/docs/hub/en/hf-mcp-server',
48
+ what: 'Search AI models, datasets, papers and Spaces on Hugging Face.',
49
+ view: "Hugging Face's own server, verified in the MCP Registry. Free with no account for its basic search tools; a free Hugging Face account unlocks more. It reads public information only.",
50
+ },
51
+ {
52
+ id: 'notion', name: 'Notion', publisher: 'Notion', registry: 'com.notion/mcp', kind: 'signin',
53
+ url: 'https://mcp.notion.com/mcp', docs: 'https://developers.notion.com/docs/mcp',
54
+ what: 'Your Notion pages and databases: search, read, create and update.',
55
+ view: "Notion's own server, verified in the MCP Registry. It works on Notion's free plan (a few tools need a paid one). You sign in with Notion and choose which pages I can reach; it can change pages, so each of its tools asks you first.",
56
+ },
57
+ {
58
+ id: 'linear', name: 'Linear', publisher: 'Linear', registry: 'app.linear/linear', kind: 'signin',
59
+ url: 'https://mcp.linear.app/mcp', docs: 'https://linear.app/docs/mcp',
60
+ what: 'Your Linear issues, projects and comments.',
61
+ view: "Linear's own server, verified in the MCP Registry, and included on Linear's free plan. You sign in with Linear. It can create and change issues, so each of its tools asks you first.",
62
+ },
63
+ {
64
+ id: 'atlassian', name: 'Atlassian (Jira & Confluence)', publisher: 'Atlassian', registry: 'com.atlassian/atlassian-mcp-server', kind: 'signin',
65
+ url: 'https://mcp.atlassian.com/v2/mcp', docs: 'https://www.atlassian.com/platform/remote-mcp-server',
66
+ scopes: [
67
+ 'read:me', 'read:account', 'offline_access',
68
+ 'read:jira:agent-interface', 'write:jira:agent-interface', 'search:jira:agent-interface',
69
+ 'read:confluence:agent-interface', 'write:confluence:agent-interface', 'search:confluence:agent-interface',
70
+ ],
71
+ what: 'Your Jira issues and Confluence pages.',
72
+ view: "Atlassian's own server, verified in the MCP Registry, free on Atlassian's free plan (500 calls an hour). It offers about 40 permissions, including deleting; I ask only for reading, searching and writing Jira and Confluence, so it can't delete anything.",
73
+ },
74
+ {
75
+ id: 'github', name: 'GitHub', publisher: 'GitHub', registry: 'io.github.github/github-mcp-server', kind: 'key',
76
+ url: 'https://api.githubcopilot.com/mcp/', docs: 'https://github.com/github/github-mcp-server', keyHeader: 'Authorization',
77
+ what: 'Your repositories, issues and pull requests.',
78
+ view: "GitHub's own server, verified in the MCP Registry. GitHub's sign-in doesn't let apps register themselves, so it takes a personal access token: make a fine-grained one at github.com/settings/personal-access-tokens with only the repositories and rights you want me to have. GitHub lists Copilot access as a requirement; Copilot's free plan counts.",
79
+ },
80
+ ];
81
+ /** A suggested server, matched by its address. */
82
+ export function suggestionFor(url) {
83
+ return url ? MCP_SUGGESTIONS.find((s) => s.url === url) : undefined;
84
+ }
85
+ /** The permissions a suggested server should ask for, matched by address. */
86
+ export function suggestedScopes(url) {
87
+ if (!url)
88
+ return undefined;
89
+ return MCP_SUGGESTIONS.find((s) => s.url === url)?.scopes;
90
+ }
91
+ //# sourceMappingURL=suggested.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suggested.js","sourceRoot":"","sources":["../../src/mcp/suggested.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AA6BH,MAAM,CAAC,MAAM,eAAe,GAAoB;IAC9C;QACE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,4BAA4B,EAAE,IAAI,EAAE,MAAM;QAC5G,GAAG,EAAE,8BAA8B,EAAE,IAAI,EAAE,qCAAqC;QAChF,IAAI,EAAE,6DAA6D;QACnE,IAAI,EAAE,yPAAyP;KAChQ;IACD;QACE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM;QACtE,GAAG,EAAE,8BAA8B,EAAE,IAAI,EAAE,oDAAoD;QAC/F,IAAI,EAAE,mEAAmE;QACzE,IAAI,EAA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_<tool>` so they can't collide with Ava's tools.
5
+ * - Through the normal approval: a tool the server marks read-only is safe;
6
+ * anything else asks first (with "always allow" available) — his call,
7
+ * 16–17 Nov: safe by design, not heavy.
8
+ * - Their output is third-party content, so it is marked untrusted and the
9
+ * registry wraps it before it reaches the model.
10
+ * - Images come back the way Ava's own tools return them (base64_image), so
11
+ * she sees a viewport screenshot exactly as she sees a Blender preview.
12
+ */
13
+ import type { Tool, ToolRiskLevel } from '../tools/types.js';
14
+ import type { McpConnection, McpToolInfo } from './connection.js';
15
+ /** Tool names models accept: letters, digits, _ and -, up to 64. */
16
+ export declare function avaToolName(serverId: string, toolName: string): string;
17
+ export declare function riskFor(tool: McpToolInfo): ToolRiskLevel;
18
+ export interface McpToolOptions {
19
+ /** Only these of the server's tools (by the server's own names). Default: all. */
20
+ only?: string[];
21
+ /** Override a tool's risk (e.g. a server that marks nothing read-only). */
22
+ risk?: (tool: McpToolInfo) => ToolRiskLevel | undefined;
23
+ /** Extra guidance appended to a tool's description for Ava. */
24
+ describe?: (tool: McpToolInfo) => string | undefined;
25
+ /** Runs before a call; return a message to refuse it (e.g. a script check). */
26
+ check?: (tool: McpToolInfo, args: Record<string, unknown>) => string | undefined;
27
+ }
28
+ /** The connected server's tools as Ava tools (read at connect time, never hard-coded). */
29
+ export declare function mcpToolsForAva(conn: McpConnection, opts?: McpToolOptions): Tool[];
30
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAoC,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE/F,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAElE,oEAAoE;AACpE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGtE;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,aAAa,CAIxD;AAED,MAAM,WAAW,cAAc;IAC7B,kFAAkF;IAClF,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,aAAa,GAAG,SAAS,CAAC;IACxD,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,GAAG,SAAS,CAAC;IACrD,+EAA+E;IAC/E,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,GAAG,SAAS,CAAC;CAClF;AAkDD,0FAA0F;AAC1F,wBAAgB,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,GAAE,cAAmB,GAAG,IAAI,EAAE,CAGrF"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * A connected MCP server's tools, offered to Ava as her own tools.
3
+ *
4
+ * - Named `<server id>_<tool>` so they can't collide with Ava's tools.
5
+ * - Through the normal approval: a tool the server marks read-only is safe;
6
+ * anything else asks first (with "always allow" available) — his call,
7
+ * 16–17 Nov: safe by design, not heavy.
8
+ * - Their output is third-party content, so it is marked untrusted and the
9
+ * registry wraps it before it reaches the model.
10
+ * - Images come back the way Ava's own tools return them (base64_image), so
11
+ * she sees a viewport screenshot exactly as she sees a Blender preview.
12
+ */
13
+ /** Tool names models accept: letters, digits, _ and -, up to 64. */
14
+ export function avaToolName(serverId, toolName) {
15
+ const clean = (s) => s.replace(/[^a-zA-Z0-9_-]+/g, '_').replace(/^_+|_+$/g, '');
16
+ return `${clean(serverId)}_${clean(toolName)}`.slice(0, 64);
17
+ }
18
+ export function riskFor(tool) {
19
+ if (tool.readOnly)
20
+ return 'safe';
21
+ if (tool.destructive)
22
+ return 'dangerous';
23
+ return 'write';
24
+ }
25
+ class McpTool {
26
+ conn;
27
+ info;
28
+ opts;
29
+ name;
30
+ description;
31
+ schema;
32
+ riskLevel;
33
+ requiresConfirmation;
34
+ outputTrust = 'untrusted';
35
+ constructor(conn, info, opts) {
36
+ this.conn = conn;
37
+ this.info = info;
38
+ this.opts = opts;
39
+ this.name = avaToolName(conn.config.id, info.name);
40
+ const extra = opts.describe?.(info);
41
+ this.description = `${info.description || info.name} (from ${conn.config.name})${extra ? ` ${extra}` : ''}`;
42
+ this.riskLevel = opts.risk?.(info) ?? riskFor(info);
43
+ this.requiresConfirmation = this.riskLevel !== 'safe';
44
+ const s = info.inputSchema ?? { type: 'object' };
45
+ this.schema = {
46
+ name: this.name,
47
+ description: this.description,
48
+ parameters: { type: 'object', properties: (s.properties ?? {}), ...(s.required?.length ? { required: s.required } : {}) },
49
+ };
50
+ }
51
+ async execute(args, context) {
52
+ if (!this.conn.isOpen) {
53
+ return { success: false, output: `${this.conn.config.name} isn't connected any more. Tell them, and don't retry until it's back.` };
54
+ }
55
+ const refused = this.opts.check?.(this.info, args);
56
+ if (refused)
57
+ return { success: false, output: refused };
58
+ try {
59
+ const r = await this.conn.call(this.info.name, args, { signal: context.signal });
60
+ const [first, ...rest] = r.images;
61
+ return {
62
+ success: !r.isError,
63
+ output: r.text || (r.images.length ? `[${r.images.length} image${r.images.length === 1 ? '' : 's'}]` : '(no output)'),
64
+ metadata: first
65
+ ? {
66
+ base64_image: first.data,
67
+ mime_type: first.mimeType,
68
+ ...(rest.length ? { more_images: rest.map((i) => i.data), more_mime_types: rest.map((i) => i.mimeType) } : {}),
69
+ }
70
+ : undefined,
71
+ };
72
+ }
73
+ catch (err) {
74
+ return { success: false, output: `${this.conn.config.name}: ${err instanceof Error ? err.message : String(err)}` };
75
+ }
76
+ }
77
+ }
78
+ /** The connected server's tools as Ava tools (read at connect time, never hard-coded). */
79
+ export function mcpToolsForAva(conn, opts = {}) {
80
+ const only = opts.only ? new Set(opts.only) : null;
81
+ return conn.tools().filter((t) => !only || only.has(t.name)).map((t) => new McpTool(conn, t, opts));
82
+ }
83
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,oEAAoE;AACpE,MAAM,UAAU,WAAW,CAAC,QAAgB,EAAE,QAAgB;IAC5D,MAAM,KAAK,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IACxF,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAAiB;IACvC,IAAI,IAAI,CAAC,QAAQ;QAAE,OAAO,MAAM,CAAC;IACjC,IAAI,IAAI,CAAC,WAAW;QAAE,OAAO,WAAW,CAAC;IACzC,OAAO,OAAO,CAAC;AACjB,CAAC;AAaD,MAAM,OAAO;IAQkB;IAAsC;IAAoC;IAP9F,IAAI,CAAS;IACb,WAAW,CAAS;IACpB,MAAM,CAAiB;IACvB,SAAS,CAAgB;IACzB,oBAAoB,CAAU;IAC9B,WAAW,GAAG,WAAoB,CAAC;IAE5C,YAA6B,IAAmB,EAAmB,IAAiB,EAAmB,IAAoB;QAA9F,SAAI,GAAJ,IAAI,CAAe;QAAmB,SAAI,GAAJ,IAAI,CAAa;QAAmB,SAAI,GAAJ,IAAI,CAAgB;QACzH,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACnD,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;Q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AAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;QACrH,CAAC;IACH,CAAC;CACF;AAED,0FAA0F;AAC1F,MAAM,UAAU,cAAc,CAAC,IAAmB,EAAE,OAAuB,EAAE;IAC3E,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACnD,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AACtG,CAAC"}
@@ -27,6 +27,16 @@ import type { Tool, ToolResult, ToolExecutionContext, ToolRiskLevel } from '../t
27
27
  import type { FunctionSchema } from '../../providers/types.js';
28
28
  export { modelsDir, modelSlug } from './paths.js';
29
29
  export declare function checkBlenderScript(script: string): string | null;
30
+ export interface ModelEntry {
31
+ slug: string;
32
+ name: string;
33
+ description?: string;
34
+ files: string[];
35
+ blenderVersion: string;
36
+ triangles?: number;
37
+ sizeM?: number[];
38
+ }
39
+ export declare function upsertLibraryEntry(m: ModelEntry): Promise<void>;
30
40
  export declare class DesignBuildModelTool implements Tool {
31
41
  readonly name = "design_build_model";
32
42
  readonly description = "Build or change a 3D model in Blender with no window: run your Blender Python on the model, save it, export it and see a preview. Free \u2014 Blender runs on their own computer.";
@@ -1 +1 @@
1
- {"version":3,"file":"build-model.d.ts","sourceRoot":"","sources":["../../../src/tools/blender/build-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAQ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AAC,MAAM,EAAE,cAAc,CA+C7B;IAEF;;;;OAIG;IACG,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC;YA0BlF,IAAI;CAyKnB;AAID,qBAAa,wBAAyB,YAAW,IAAI;IACnD,QAAQ,CAAC,IAAI,4BAA4B;IACzC,QAAQ,CAAC,WAAW,4GACuF;IAC3G,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAW;IAC5C,QAAQ,CAAC,oBAAoB,SAAS;IAEtC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAa7B;IAEI,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC;CAmDlG;AAID,qBAAa,sBAAuB,YAAW,IAAI;IACjD,QAAQ,CAAC,IAAI,0BAA0B;IACvC,QAAQ,CAAC,WAAW,sEAAsE;IAC1F,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAW;IAC5C,QAAQ,CAAC,oBAAoB,SAAS;IACtC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAa7B;IAEI,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC;CAiBlG;AAED,qGAAqG;AACrG,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMnE"}
@@ -39,6 +39,7 @@ import { recordModelStep, restoreModelStep, readModelHistory } from './model-his
39
39
  export { modelsDir, modelSlug } from './paths.js';
40
40
  import { findBlender, BLENDER_DOWNLOAD_URL } from './find-blender.js';
41
41
  import { BLENDER_RUNNER_PY } from './runner-py.js';
42
+ import { BlenderLive } from './live.js';
42
43
  const DEFAULT_TIMEOUT_S = 300;
43
44
  const MAX_TIMEOUT_S = 900;
44
45
  const MAX_OUTPUT = 400_000;
@@ -78,7 +79,7 @@ async function folderBytes(dir) {
78
79
  }
79
80
  return total;
80
81
  }
81
- async function upsertLibraryEntry(m) {
82
+ export async function upsertLibraryEntry(m) {
82
83
  let items = [];
83
84
  try {
84
85
  const parsed = JSON.parse(await readFile(metadataFile(), 'utf-8'));
@@ -256,6 +257,14 @@ export class DesignBuildModelTool {
256
257
  const refused = checkBlenderScript(script);
257
258
  if (refused)
258
259
  return { success: false, output: refused };
260
+ // One model, one place: while it's open Live, their Blender holds the file.
261
+ const live = BlenderLive.current();
262
+ if (live.connection && live.openModel?.slug === slug) {
263
+ return {
264
+ success: false,
265
+ output: `"${name}" is open in their Blender through MCP, so Headless won't touch it — two Blenders writing one file would lose work. Keep working with design_live_step, including baking: KIT, ava_unwrap() and ava_bake() work there too. To build headless instead, save it with design_live_save and ask them to switch the room to Headless.`,
266
+ };
267
+ }
259
268
  const blender = await findBlender();
260
269
  if (!blender) {
261
270
  return {
@@ -362,7 +371,7 @@ export class DesignBuildModelTool {
362
371
  }
363
372
  catch { /* none */ }
364
373
  }
365
- lines.push(`The agreed brief:
374
+ lines.push(`The agreed brief:
366
375
  ${formatModelBrief(brief)}`);
367
376
  lines.push(previewB64
368
377
  ? 'LOOK at the preview now and check it against the brief — shape, proportions, true scale, detail, condition. Say plainly what is off and fix it in the next step; the next run opens this saved model, so write only the change.'