amalgm 0.1.143 → 0.1.144

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 (57) hide show
  1. package/package.json +1 -1
  2. package/runtime/lib/local/amalgmStore.js +0 -7
  3. package/runtime/scripts/amalgm-mcp/apps/rest.js +24 -1
  4. package/runtime/scripts/amalgm-mcp/apps/supervisor.js +16 -0
  5. package/runtime/scripts/amalgm-mcp/browser/cli.js +1 -5
  6. package/runtime/scripts/amalgm-mcp/browser/engine.js +18 -3
  7. package/runtime/scripts/amalgm-mcp/browser/paths.js +6 -1
  8. package/runtime/scripts/amalgm-mcp/browser/rest.js +12 -5
  9. package/runtime/scripts/amalgm-mcp/computer-use/index.js +1038 -0
  10. package/runtime/scripts/amalgm-mcp/lib/email-embeds.js +53 -23
  11. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-aa-57534e-ffffff.png +0 -0
  12. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-nb-f37626-ffffff.png +0 -0
  13. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-p-d24726-ffffff.png +0 -0
  14. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-atsign-ffffff.png +0 -0
  15. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-box-d6d3d1.png +0 -0
  16. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-calendarclock-d6d3d1.png +0 -0
  17. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-file-a8a29e.png +0 -0
  18. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-filearchive-facc15.png +0 -0
  19. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-fileimage-2dd4bf.png +0 -0
  20. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-fileimage-c084fc.png +0 -0
  21. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-filespreadsheet-4ade80.png +0 -0
  22. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-filetext-60a5fa.png +0 -0
  23. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-filetext-a8a29e.png +0 -0
  24. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-filetext-f87171.png +0 -0
  25. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-folder-d6d3d1.png +0 -0
  26. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-globe-d6d3d1.png +0 -0
  27. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-video-f472b6.png +0 -0
  28. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-zap-fbbf24.png +0 -0
  29. package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/manifest.json +56 -0
  30. package/runtime/scripts/amalgm-mcp/lib/email-icons.js +34 -1
  31. package/runtime/scripts/amalgm-mcp/lib/email-md.js +95 -51
  32. package/runtime/scripts/amalgm-mcp/lib/file-icon-registry.json +146 -3
  33. package/runtime/scripts/amalgm-mcp/lib/generated/email-render.json +153 -0
  34. package/runtime/scripts/amalgm-mcp/notify/index.js +5 -2
  35. package/runtime/scripts/amalgm-mcp/server/core-tools.js +6 -0
  36. package/runtime/scripts/amalgm-mcp/server/routes/apps.js +4 -0
  37. package/runtime/scripts/amalgm-mcp/tests/browser-cookie-push.test.js +60 -0
  38. package/runtime/scripts/amalgm-mcp/tests/bundle-entries.test.js +54 -0
  39. package/runtime/scripts/amalgm-mcp/tests/computer-use.test.js +151 -0
  40. package/runtime/scripts/amalgm-mcp/tests/core-tools.test.js +4 -0
  41. package/runtime/scripts/amalgm-mcp/tests/email-render-fixtures/citations.md +9 -0
  42. package/runtime/scripts/amalgm-mcp/tests/email-render-fixtures/entities.md +15 -0
  43. package/runtime/scripts/amalgm-mcp/tests/email-render-fixtures/links.md +5 -0
  44. package/runtime/scripts/amalgm-mcp/tests/email-render-fixtures/media.md +21 -0
  45. package/runtime/scripts/amalgm-mcp/tests/email-render-fixtures/text.md +30 -0
  46. package/runtime/scripts/amalgm-mcp/tests/email-render-goldens/citations.html +5 -0
  47. package/runtime/scripts/amalgm-mcp/tests/email-render-goldens/entities.html +8 -0
  48. package/runtime/scripts/amalgm-mcp/tests/email-render-goldens/links.html +3 -0
  49. package/runtime/scripts/amalgm-mcp/tests/email-render-goldens/media.html +11 -0
  50. package/runtime/scripts/amalgm-mcp/tests/email-render-goldens/notification-shell.html +11 -0
  51. package/runtime/scripts/amalgm-mcp/tests/email-render-goldens/text.html +12 -0
  52. package/runtime/scripts/amalgm-mcp/tests/email-render.test.js +82 -0
  53. package/runtime/scripts/amalgm-mcp/tests/mcp-surface.test.js +2 -0
  54. package/runtime/scripts/amalgm-mcp/tests/system-catalog.test.js +5 -0
  55. package/runtime/scripts/amalgm-mcp/toolbox/loadout-context.js +1 -0
  56. package/runtime/scripts/amalgm-mcp/toolbox/mcp-surface.js +1 -0
  57. package/runtime/scripts/amalgm-mcp/toolbox/store.js +18 -0
@@ -13,6 +13,7 @@ test('system toolbox catalog exposes first-party default tools', () => {
13
13
  const catalog = buildSystemToolboxCatalog();
14
14
 
15
15
  assert.equal(catalog.tools.browser.name, 'Browser');
16
+ assert.equal(catalog.tools['computer-use'].name, 'Computer Use');
16
17
  assert.equal(catalog.tools.browser.owner, 'amalgm');
17
18
  assert.equal(catalog.tools.browser.origin, 'system');
18
19
  assert.equal(catalog.tools.browser.policy.firstParty, true);
@@ -28,6 +29,10 @@ test('system toolbox catalog exposes first-party default tools', () => {
28
29
  catalog.toolActions['notifications.notify_user'].sourceAction.mcpToolName,
29
30
  'toolbox__notifications_notify_user',
30
31
  );
32
+ assert.equal(
33
+ catalog.toolActions['computer-use.list_apps'].sourceAction.mcpToolName,
34
+ 'toolbox__computer_use_list_apps',
35
+ );
31
36
  });
32
37
 
33
38
  test('system toolbox catalog merge preserves persisted records', () => {
@@ -8,6 +8,7 @@ const FIRST_PARTY_TOOL_IDS = new Set([
8
8
  'memories',
9
9
  'agents',
10
10
  'apps',
11
+ 'computer-use',
11
12
  'browser',
12
13
  ]);
13
14
 
@@ -30,6 +30,7 @@ function toolDescriptor(tool) {
30
30
  name: mcpNameForStaticTool(tool),
31
31
  description: tool.description,
32
32
  inputSchema: tool.inputSchema,
33
+ ...(tool.annotations ? { annotations: tool.annotations } : {}),
33
34
  };
34
35
  }
35
36
 
@@ -831,9 +831,27 @@ function deleteTool(id, options = {}) {
831
831
  return inserted;
832
832
  })();
833
833
  publishCommittedEvents(events);
834
+ scrubToolFromApps(toolId);
834
835
  return { ok: true, deleted: true };
835
836
  }
836
837
 
838
+ // Keep the app↔tool relation from drifting: a deleted tool must not linger in
839
+ // any app's toolIds, or sharing that app would bundle a ghost dependency.
840
+ function scrubToolFromApps(toolId) {
841
+ try {
842
+ const { loadApps, saveApps } = require('../apps/store');
843
+ const data = loadApps();
844
+ const owners = data.apps.filter((app) => Array.isArray(app.toolIds) && app.toolIds.includes(toolId));
845
+ if (owners.length === 0) return;
846
+ for (const app of owners) {
847
+ app.toolIds = app.toolIds.filter((id) => id !== toolId);
848
+ }
849
+ saveApps(data, { source: 'toolbox:delete-tool' });
850
+ } catch (error) {
851
+ console.warn('[Toolbox] Failed to scrub deleted tool from apps:', error.message);
852
+ }
853
+ }
854
+
837
855
  function deleteToolAction(id, options = {}) {
838
856
  const toolbox = readToolbox();
839
857
  const actionId = sanitizeId(id);