@ai-matrx/desktop-protocol 0.21.94 → 0.21.95

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.
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  negotiate,
15
15
  statusForPeer,
16
16
  versionSubprotocol
17
- } from "./chunk-server-Q7F4IE6F.js";
17
+ } from "./chunk-server-46JNNDT7.js";
18
18
  import {
19
19
  AccountAgent,
20
20
  AccountAgentDetail,
@@ -620,6 +620,14 @@ import {
620
620
  ModelsTtsVoiceRemoveResult,
621
621
  ModelsTtsVoiceSaveParams,
622
622
  ModelsTtsVoiceSaveResult,
623
+ ModelsWakeCloseParams,
624
+ ModelsWakeCloseResult,
625
+ ModelsWakeDetectParams,
626
+ ModelsWakeDetectResult,
627
+ ModelsWakeInstallParams,
628
+ ModelsWakeInstallResult,
629
+ ModelsWakeStatusParams,
630
+ ModelsWakeStatusResult,
623
631
  NAMED_SCHEMAS,
624
632
  NetAddress,
625
633
  NetBluetoothDevice,
@@ -855,13 +863,23 @@ import {
855
863
  VaultFieldSummary,
856
864
  VaultItemKind,
857
865
  VaultItemSummary,
866
+ WAKE_PCM_MAX_CHARS,
858
867
  WEB_MAX_TEXT_CHARS,
868
+ WakeEngine,
869
+ WakeModelInfo,
859
870
  WebAttachTarget,
860
871
  WebBrowserFetchParams,
861
872
  WebBrowserFetchResult,
862
873
  WebFetchParams,
863
874
  WebFetchResult,
864
875
  WebHeader,
876
+ WebHomeFetchParams,
877
+ WebHomeFetchResult,
878
+ WebHomeHistoryEntry,
879
+ WebHomeQueueItem,
880
+ WebHomeQueueState,
881
+ WebHomeStatusParams,
882
+ WebHomeStatusResult,
865
883
  WebLand,
866
884
  WebLogCaller,
867
885
  WebLogClearParams,
@@ -933,7 +951,7 @@ import {
933
951
  WindowsServiceControlResult,
934
952
  WindowsServicesParams,
935
953
  WindowsServicesResult
936
- } from "./chunk-server-RWKOPRNC.js";
954
+ } from "./chunk-server-BQQPFQSL.js";
937
955
  import {
938
956
  AbsPath,
939
957
  BEARER_PREFIX,
@@ -980,7 +998,7 @@ import {
980
998
  epochMs,
981
999
  nonNegInt,
982
1000
  u32
983
- } from "./chunk-server-5MKSD7FQ.js";
1001
+ } from "./chunk-server-IHK7SYRO.js";
984
1002
  import {
985
1003
  BROADCAST_CID,
986
1004
  DesktopProtocolError,
@@ -1001,7 +1019,7 @@ import {
1001
1019
  } from "./chunk-server-OVLU5III.js";
1002
1020
 
1003
1021
  // src/contract.ts
1004
- var CONTRACT_SHA256 = "24650f34e966ce74c997fefcc7e6474b71fb9737ea81e81bfd1513a5e5018768";
1022
+ var CONTRACT_SHA256 = "c506c1188555e5a6810a0fb4c8517ee0b7328c66f5b4ddcf7eb1fe55bc737914";
1005
1023
 
1006
1024
  // src/tools/catalog.ts
1007
1025
  var TOOL_GROUPS = [
@@ -1061,9 +1079,10 @@ var TOOL_CATALOG = [
1061
1079
  { name: "desktop_documents", group: "tools_service", state: "built", path: "device_op", ops: ["documents.pdf_text", "documents.ocr", "documents.image_resize", "documents.office_generate"], platforms: ALL, summary: "PDF text, OCR, images, Word and Excel files" },
1062
1080
  { name: "desktop_web", group: "tools_service", state: "built", path: "device_op", ops: ["web.fetch", "web.scrape", "web.search", "web.fetch_with_browser"], platforms: ALL, summary: "Fetch, scrape, search and research the web from this computer's own connection (research: search on AI Matrx, every result read here)" },
1063
1081
  { name: "desktop_entities", group: "tools_service", state: "built", path: "device_op", ops: ["entities.ner", "entities.pii"], platforms: ALL, summary: "Names, places, organizations and private data, found on the device" },
1064
- // matrx-local's SemanticFindPaths: needs a local embedding index of this computer's files and an
1065
- // embedding model on the device; neither exists yet, so it is Coming soon on Agents › Tools.
1066
- { name: "desktop_semantic_find", group: "files_shell", state: "planned", path: "device_op", ops: ["fs.search_semantic"], platforms: ALL, summary: "Find files by meaning (a local embedding index of this computer's files)" },
1082
+ // matrx-local's SemanticFindPaths: the local embedding index of this computer's files (1.87) searched by an
1083
+ // embedding model on the device (1.88: the model service's embeddings slot). fs.semantic_status tells an agent
1084
+ // whether the index is ready (indexed N of M, or why not) before it asks.
1085
+ { name: "desktop_semantic_find", group: "files_shell", state: "built", path: "device_op", ops: ["fs.search_semantic", "fs.semantic_status"], platforms: ALL, summary: "Find files by meaning (a local embedding index of this computer's files, searched by an embedding model on the device)" },
1067
1086
  { name: "desktop_notes", group: "files_shell", state: "built", path: "device_op", ops: ["notes.folders", "notes.list", "notes.read", "notes.write", "notes.search"], platforms: ALL, summary: "The person's local notes (Documents/Matrx/Notes): list, read, write, search" },
1068
1087
  // ── 5. Python `ml` service ───────────────────────────────────────────────────────────────────
1069
1088
  // Built: models.transcribe through local_proxy's POST /op/{cap.op} (matrx-ai implementations/desktop.py).
@@ -1092,7 +1111,7 @@ var LEGACY_ACTIONS = {
1092
1111
  "local_file.list": tool("fs_list"),
1093
1112
  "local_file.places": dropped("The device's home and folders reach the agent in its binding briefing (sysinfo.get)"),
1094
1113
  "local_file.find": tool("fs_search"),
1095
- "local_file.semantic_find": dropped("Needs a local embedding index; desktop_semantic_find is planned (Coming soon on Agents \u203A Tools) until it exists"),
1114
+ "local_file.semantic_find": tool("desktop_semantic_find"),
1096
1115
  "local_shell.run": tool("shell_execute"),
1097
1116
  "local_shell.output": tool("shell_job"),
1098
1117
  "local_shell.stop": tool("shell_job"),
@@ -2014,6 +2033,14 @@ export {
2014
2033
  ModelsTtsVoiceRemoveResult,
2015
2034
  ModelsTtsVoiceSaveParams,
2016
2035
  ModelsTtsVoiceSaveResult,
2036
+ ModelsWakeCloseParams,
2037
+ ModelsWakeCloseResult,
2038
+ ModelsWakeDetectParams,
2039
+ ModelsWakeDetectResult,
2040
+ ModelsWakeInstallParams,
2041
+ ModelsWakeInstallResult,
2042
+ ModelsWakeStatusParams,
2043
+ ModelsWakeStatusResult,
2017
2044
  NAMED_SCHEMAS,
2018
2045
  NULL_SINCE,
2019
2046
  NetAddress,
@@ -2276,13 +2303,23 @@ export {
2276
2303
  VaultFieldSummary,
2277
2304
  VaultItemKind,
2278
2305
  VaultItemSummary,
2306
+ WAKE_PCM_MAX_CHARS,
2279
2307
  WEB_MAX_TEXT_CHARS,
2308
+ WakeEngine,
2309
+ WakeModelInfo,
2280
2310
  WebAttachTarget,
2281
2311
  WebBrowserFetchParams,
2282
2312
  WebBrowserFetchResult,
2283
2313
  WebFetchParams,
2284
2314
  WebFetchResult,
2285
2315
  WebHeader,
2316
+ WebHomeFetchParams,
2317
+ WebHomeFetchResult,
2318
+ WebHomeHistoryEntry,
2319
+ WebHomeQueueItem,
2320
+ WebHomeQueueState,
2321
+ WebHomeStatusParams,
2322
+ WebHomeStatusResult,
2286
2323
  WebLand,
2287
2324
  WebLogCaller,
2288
2325
  WebLogClearParams,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contract.ts","../src/tools/catalog.ts","../src/tools/status.ts","../src/tools/policy.ts"],"sourcesContent":["// AUTO-GENERATED by scripts/generate.ts — DO NOT EDIT. `pnpm generate --check` fails on any hand edit.\n/** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */\nexport const CONTRACT_SHA256 = \"24650f34e966ce74c997fefcc7e6474b71fb9737ea81e81bfd1513a5e5018768\" as const;\n","/**\n * The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the\n * protocol ops it reaches, the group it ships in, and what became of each of matrx-local's 139\n * handlers (120 actions + the 19 action-enum dispatchers that fanned out to them).\n *\n * Data only. The status table (./status.ts) joins it with the harnesses' results, so a tool listed\n * here with no passing result reads \"untested\", never \"working\". Design and the reasons behind each\n * group: matrx-desktop/design/local-tools.md.\n */\nimport type { OpName } from \"../schema/registry\";\nimport type { ToolPlatform } from \"../schema/tools\";\n\nexport type ToolGroupId = \"files_shell\" | \"os_control\" | \"personal_automation\" | \"tools_service\" | \"ml_service\" | \"windows_admin\";\n\nexport interface ToolGroup {\n readonly id: ToolGroupId;\n readonly order: number;\n readonly title: string;\n /** Who implements the ops: a TS capability owner in the core, or a Python service. */\n readonly owner: \"core\" | \"python_tools\" | \"python_ml\";\n}\n\nexport const TOOL_GROUPS: readonly ToolGroup[] = [\n { id: \"files_shell\", order: 1, title: \"Files and shell\", owner: \"core\" },\n { id: \"os_control\", order: 2, title: \"Computer control\", owner: \"core\" },\n { id: \"personal_automation\", order: 3, title: \"Personal apps and automation\", owner: \"core\" },\n { id: \"tools_service\", order: 4, title: \"Web, documents, OCR and entities\", owner: \"python_tools\" },\n { id: \"ml_service\", order: 5, title: \"Speech\", owner: \"python_ml\" },\n { id: \"windows_admin\", order: 6, title: \"Windows administration\", owner: \"core\" },\n];\n\n/**\n * How an agent's call reaches the device. Both end at the relay's `POST /v1/devices/{id}/call`:\n * - `sandbox_proxy`: the cloud-sandbox-shaped tools (fs_*, shell_*). matrx-ai's `_sandbox_proxy`\n * calls aidream `/api/local-proxy/{device}/{fs|search|exec}/…`, which maps the route to its op.\n * Agent code never knows a laptop from a cloud box (SPEC §6.1).\n * - `device_op`: desktop-only capabilities. One generic route, `/api/local-proxy/{device}/op/{cap.op}`,\n * params and result exactly the op's schema; the tool definition is generated from that schema.\n * - `server`: runs on the aidream server even when the turn is bound to a device (a defect when\n * the tool reads a local path; see `note`).\n */\nexport type ToolPath = \"sandbox_proxy\" | \"device_op\" | \"server\";\n\n/** `built`: the ops exist in the protocol and Matrx 2's core serves them (registered on the platform for agents with the server tool); `planned`: designed, not built; `broken`: registered but wrong on a device. */\nexport type ToolState = \"built\" | \"planned\" | \"broken\";\n\nexport interface CatalogTool {\n /** The platform registry name (`tool.definition.name`). */\n readonly name: string;\n readonly group: ToolGroupId;\n readonly state: ToolState;\n readonly path: ToolPath;\n /** Ops the tool sends. For `built` tools every one is in OPS (a test enforces it). */\n readonly ops: readonly string[];\n readonly platforms: readonly ToolPlatform[];\n /** One line for the status table. */\n readonly summary: string;\n /** Required for `broken`: what is wrong. */\n readonly note?: string;\n}\n\nconst ALL: readonly ToolPlatform[] = [\"darwin\", \"win32\", \"linux\"];\n\nexport const TOOL_CATALOG: readonly CatalogTool[] = [\n // ── 1. Files and shell (core `fs`, `exec`; the cloud sandbox's agent tools) ──────────────────\n { name: \"fs_read\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.read\"], platforms: ALL, summary: \"Read a file, paged\" },\n { name: \"fs_write\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.read\", \"fs.write\"], platforms: ALL, summary: \"Create or overwrite a file\" },\n { name: \"fs_edit\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.read\", \"fs.patch\"], platforms: ALL, summary: \"Replace one exact string\" },\n { name: \"fs_patch\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.read\", \"fs.patch\"], platforms: ALL, summary: \"Apply several exact edits at once\" },\n { name: \"fs_list\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.list\"], platforms: ALL, summary: \"List a folder\" },\n { name: \"fs_mkdir\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.mkdir\"], platforms: ALL, summary: \"Create a folder\" },\n { name: \"fs_search\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.search_paths\", \"fs.search_content\"], platforms: ALL, summary: \"Find files by name or content\" },\n { name: \"shell_execute\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"exec.run\"], platforms: ALL, summary: \"Run a command; cd carries over\" },\n { name: \"shell_python\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"exec.run\"], platforms: ALL, summary: \"Run a Python script\" },\n { name: \"desktop_git\", group: \"files_shell\", state: \"built\", path: \"device_op\", ops: [\"git.status\", \"git.diff\", \"git.log\", \"git.add\", \"git.commit\", \"git.push\", \"git.pull\", \"git.branch\", \"git.stash\", \"git.clone\"], platforms: ALL, summary: \"Git: status, diff, log, commit, branches, push and pull\" },\n { name: \"shell_job\", group: \"files_shell\", state: \"built\", path: \"device_op\", ops: [\"exec.job.start\", \"exec.job.output\", \"exec.job.stop\", \"exec.job.list\"], platforms: ALL, summary: \"Background commands: start, read output, stop\" },\n\n // ── 2. Computer control (TS owners) ──────────────────────────────────────────────────────────\n { name: \"desktop_process\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"proc.list\", \"proc.ports\", \"proc.kill\"], platforms: ALL, summary: \"Running processes and ports; stop one\" },\n { name: \"desktop_apps\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"apps.list\", \"apps.open\"], platforms: ALL, summary: \"Installed apps; open or bring one forward\" },\n { name: \"desktop_system\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"sysinfo.get\", \"sysinfo.hardware\", \"system.open_url\", \"system.open_path\", \"system.open_settings\", \"system.notify\"], platforms: ALL, summary: \"System facts, open, notify\" },\n { name: \"desktop_clipboard\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"clipboard.read\", \"clipboard.write\"], platforms: ALL, summary: \"Read and write the clipboard's text\" },\n { name: \"desktop_action_needed\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"action_needed.raise\", \"action_needed.wait\", \"action_needed.get\", \"action_needed.cancel\", \"action_needed.list\"], platforms: ALL, summary: \"Ask the person for an answer, a pick, an approval, a sign-in, a file or a permission; wait for or poll the answer\" },\n { name: \"desktop_screen\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"screen.list\", \"screen.capture\"], platforms: ALL, summary: \"Displays and screenshots\" },\n { name: \"desktop_browser\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"browser.sessions\", \"browser.call\"], platforms: ALL, summary: \"The person's own browser through the AI Matrx extension: tabs, read, screenshot, navigate, click, type\" },\n { name: \"desktop_window\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"window.list\", \"window.focus\", \"window.move\", \"window.minimize\"], platforms: ALL, summary: \"Find, focus and arrange windows\" },\n { name: \"desktop_input\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"input.type_text\", \"input.hotkey\", \"input.mouse_click\", \"input.mouse_move\", \"input.keyboard_settings\", \"input.set_keyboard_settings\"], platforms: ALL, summary: \"Keyboard and mouse\" },\n { name: \"desktop_audio\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"audio.devices\", \"audio.levels\", \"audio.set_levels\", \"audio.record\", \"audio.play\"], platforms: ALL, summary: \"Audio devices, record, play\" },\n { name: \"desktop_power\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"power.status\", \"power.history\", \"power.prevent_sleep\"], platforms: ALL, summary: \"Battery and keep awake\" },\n { name: \"desktop_resources\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"resources.snapshot\", \"resources.activity\", \"resources.stop_job\", \"resources.incidents\"], platforms: ALL, summary: \"CPU, memory and disk use; what is using them, grouped into jobs; stop a job; the slowdown log\" },\n { name: \"fs_watch\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"fs.watch.start\", \"fs.watch.events\", \"fs.watch.stop\"], platforms: ALL, summary: \"Watch a folder; read what changed\" },\n\n // ── 3. Personal apps and automation (1.37: the core's `automation`, `personal`, `net` and `schedule` owners) ──\n { name: \"desktop_automation\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"automation.script\"], platforms: [\"darwin\", \"win32\"], summary: \"AppleScript or JavaScript for Automation on a Mac, PowerShell on Windows\" },\n { name: \"desktop_mail\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"mail.accounts\", \"mail.list\", \"mail.send\"], platforms: [\"darwin\"], summary: \"The Mail app: accounts, messages, send\" },\n { name: \"desktop_outlook\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"outlook.status\", \"outlook.draft\", \"outlook.list\", \"outlook.read\"], platforms: [\"win32\"], summary: \"The person's own Outlook: drafts with attachments, recent mail, one message\" },\n { name: \"desktop_messages\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"messages.chats\", \"messages.list\", \"messages.send\"], platforms: [\"darwin\"], summary: \"The Messages app: chats, messages, send\" },\n { name: \"desktop_contacts\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"contacts.search\", \"contacts.get\"], platforms: [\"darwin\"], summary: \"Contacts: search, one card\" },\n { name: \"desktop_calendar\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"calendar.list\", \"calendar.create\", \"reminders.list\", \"reminders.create\"], platforms: [\"darwin\"], summary: \"Calendar and Reminders: list and add\" },\n { name: \"desktop_photos\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"photos.search\", \"photos.get\"], platforms: [\"darwin\"], summary: \"The Photos library: find, export an original\" },\n // Windows comes back once a Windows location fix is proven (plan attack retire-local 2026-10-12, B6):\n // until then local_mac_apps (macOS-only) is judged on macOS and nothing claims Windows.\n { name: \"desktop_location\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"location.get\"], platforms: [\"darwin\"], summary: \"Where the computer is (the OS's location service)\" },\n { name: \"desktop_net\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"net.info\", \"net.wifi\", \"net.bluetooth\", \"net.devices\", \"net.mdns\", \"net.scan\", \"net.download\"], platforms: ALL, summary: \"Local network, Wi-Fi, Bluetooth, open ports and downloads\" },\n { name: \"desktop_schedule\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"schedule.create\", \"schedule.list\", \"schedule.cancel\"], platforms: ALL, summary: \"Run a tool's op on this computer on an interval; list and cancel\" },\n // 1.38, code from anywhere: the person's Claude Code and Codex sessions on this computer. Turning\n // either off in Agents › Tools refuses its ops on every relay connection (the existing switch).\n { name: \"coding_sessions_read\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"coding.providers\", \"coding.sessions.list\", \"coding.discover\", \"coding.runs.list\", \"coding.history\", \"coding.transcript.read\", \"coding.item.full\", \"coding.activity\", \"coding.folders.recent\", \"coding.folders.check\", \"coding.agents.access\", \"coding.titles.status\", \"coding.prefs.list\", \"coding.recent.seen\", \"coding.search\", \"coding.transcript.raw\", \"coding.watch\", \"coding.session.watch\", \"coding.assets.list\", \"coding.assets.get\"], platforms: ALL, summary: \"Claude Code and Codex sessions: list, read live, search, download; the agents' memories and instructions\" },\n { name: \"coding_sessions_drive\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"coding.start\", \"coding.takeover\", \"coding.send\", \"coding.stop\", \"coding.stop_elsewhere\", \"coding.options.set\", \"coding.account.continue\", \"coding.agent.set\", \"coding.folders.create\", \"coding.prefs.set\", \"coding.reconcile\"], platforms: ALL, summary: \"Claude Code and Codex sessions: start, send, stop, take over, rename\" },\n\n // ── 4. Documents, notes and entities (1.37: the core's `documents` and `notes` owners; desktop_web is the `tools` service) ──\n { name: \"desktop_documents\", group: \"tools_service\", state: \"built\", path: \"device_op\", ops: [\"documents.pdf_text\", \"documents.ocr\", \"documents.image_resize\", \"documents.office_generate\"], platforms: ALL, summary: \"PDF text, OCR, images, Word and Excel files\" },\n { name: \"desktop_web\", group: \"tools_service\", state: \"built\", path: \"device_op\", ops: [\"web.fetch\", \"web.scrape\", \"web.search\", \"web.fetch_with_browser\"], platforms: ALL, summary: \"Fetch, scrape, search and research the web from this computer's own connection (research: search on AI Matrx, every result read here)\" },\n { name: \"desktop_entities\", group: \"tools_service\", state: \"built\", path: \"device_op\", ops: [\"entities.ner\", \"entities.pii\"], platforms: ALL, summary: \"Names, places, organizations and private data, found on the device\" },\n // matrx-local's SemanticFindPaths: needs a local embedding index of this computer's files and an\n // embedding model on the device; neither exists yet, so it is Coming soon on Agents › Tools.\n { name: \"desktop_semantic_find\", group: \"files_shell\", state: \"planned\", path: \"device_op\", ops: [\"fs.search_semantic\"], platforms: ALL, summary: \"Find files by meaning (a local embedding index of this computer's files)\" },\n { name: \"desktop_notes\", group: \"files_shell\", state: \"built\", path: \"device_op\", ops: [\"notes.folders\", \"notes.list\", \"notes.read\", \"notes.write\", \"notes.search\"], platforms: ALL, summary: \"The person's local notes (Documents/Matrx/Notes): list, read, write, search\" },\n\n // ── 5. Python `ml` service ───────────────────────────────────────────────────────────────────\n // Built: models.transcribe through local_proxy's POST /op/{cap.op} (matrx-ai implementations/desktop.py).\n // Whisper detects the language itself, so matrx-local's speech_locales needs no op of its own.\n { name: \"desktop_transcribe\", group: \"ml_service\", state: \"built\", path: \"device_op\", ops: [\"models.transcribe\"], platforms: ALL, summary: \"Speech to text on the device\" },\n\n // ── 6. Windows administration ────────────────────────────────────────────────────────────────\n { name: \"desktop_windows_admin\", group: \"windows_admin\", state: \"built\", path: \"device_op\", ops: [\"windows.registry_read\", \"windows.registry_write\", \"windows.services\", \"windows.service_control\", \"windows.event_log\", \"windows.features\"], platforms: [\"win32\"], summary: \"Registry, services, event log, optional features\" },\n];\n\n/**\n * Tools armed with a device binding that are deliberately NOT device tools, each with its reason.\n * They run on the server; the status table does not track them.\n */\nexport const EXCLUDED_TOOLS: Readonly<Record<string, string>> = {\n git_ingest:\n \"Runs on the server: it ingests repository URLs. A local path on a bound computer or sandbox is refused with the fs_* and shell remedy, since the server cannot see it\",\n};\n\n/** What became of one matrx-local handler. */\nexport type LegacyDisposition =\n | { readonly kind: \"tool\"; readonly tool: string }\n | { readonly kind: \"dropped\"; readonly reason: string };\n\nconst tool = (name: string): LegacyDisposition => ({ kind: \"tool\", tool: name });\nconst dropped = (reason: string): LegacyDisposition => ({ kind: \"dropped\", reason });\n\nconst SHELL_COVERS = \"Done with shell_execute (mv, cp, rm, tar), as every coding agent does\";\n\n/** matrx-local's 120 actions (`app/tools/actions.py` ACTION_GROUPS), keyed `<mega tool>.<action>`. */\nexport const LEGACY_ACTIONS: Readonly<Record<string, LegacyDisposition>> = {\n \"local_file.read\": tool(\"fs_read\"),\n \"local_file.write\": tool(\"fs_write\"),\n \"local_file.edit\": tool(\"fs_edit\"),\n \"local_file.move\": dropped(SHELL_COVERS),\n \"local_file.copy\": dropped(SHELL_COVERS),\n \"local_file.delete\": dropped(SHELL_COVERS),\n \"local_file.rename\": dropped(SHELL_COVERS),\n \"local_file.mkdir\": tool(\"fs_mkdir\"),\n \"local_file.glob\": tool(\"fs_search\"),\n \"local_file.grep\": tool(\"fs_search\"),\n \"local_file.list\": tool(\"fs_list\"),\n \"local_file.places\": dropped(\"The device's home and folders reach the agent in its binding briefing (sysinfo.get)\"),\n \"local_file.find\": tool(\"fs_search\"),\n \"local_file.semantic_find\": dropped(\"Needs a local embedding index; desktop_semantic_find is planned (Coming soon on Agents › Tools) until it exists\"),\n\n \"local_shell.run\": tool(\"shell_execute\"),\n \"local_shell.output\": tool(\"shell_job\"),\n \"local_shell.stop\": tool(\"shell_job\"),\n\n \"local_window.list\": tool(\"desktop_window\"),\n \"local_window.focus\": tool(\"desktop_window\"),\n \"local_window.move\": tool(\"desktop_window\"),\n \"local_window.minimize\": tool(\"desktop_window\"),\n\n \"local_process.list\": tool(\"desktop_process\"),\n \"local_process.ports\": tool(\"desktop_process\"),\n \"local_process.launch_app\": tool(\"desktop_apps\"),\n \"local_process.kill\": tool(\"desktop_process\"),\n \"local_process.focus_app\": tool(\"desktop_apps\"),\n \"local_process.terminals\": dropped(\"Matrx 2 terminals are exec sessions; the person's own terminal windows are not the agent's\"),\n \"local_process.tail_terminal\": dropped(\"Matrx 2 terminals are exec sessions; the person's own terminal windows are not the agent's\"),\n \"local_process.installed_apps\": tool(\"desktop_apps\"),\n\n \"local_input.type_text\": tool(\"desktop_input\"),\n \"local_input.hotkey\": tool(\"desktop_input\"),\n \"local_input.mouse_click\": tool(\"desktop_input\"),\n \"local_input.mouse_move\": tool(\"desktop_input\"),\n\n \"local_audio.devices\": tool(\"desktop_audio\"),\n \"local_audio.record\": tool(\"desktop_audio\"),\n \"local_audio.play\": tool(\"desktop_audio\"),\n \"local_audio.transcribe\": tool(\"desktop_transcribe\"),\n \"local_audio.transcribe_with_speech\": tool(\"desktop_transcribe\"),\n \"local_audio.speech_locales\": tool(\"desktop_transcribe\"),\n\n \"local_clipboard.read\": tool(\"desktop_clipboard\"),\n \"local_clipboard.write\": tool(\"desktop_clipboard\"),\n\n \"local_screen.screenshot\": tool(\"desktop_screen\"),\n \"local_screen.list\": tool(\"desktop_screen\"),\n \"local_screen.capture_book\": dropped(\"A one-off loop of screenshot plus page turn; the agent composes it from desktop_screen and desktop_input\"),\n\n \"local_system.info\": tool(\"desktop_system\"),\n \"local_system.open_url\": tool(\"desktop_system\"),\n \"local_system.open_path\": tool(\"desktop_system\"),\n \"local_system.notify\": tool(\"desktop_system\"),\n\n // The person's own browser is the AI Matrx extension paired with Matrx 2 (cap browser).\n \"local_browser.navigate\": tool(\"desktop_browser\"),\n \"local_browser.click\": tool(\"desktop_browser\"),\n \"local_browser.type_text\": tool(\"desktop_browser\"),\n \"local_browser.extract\": tool(\"desktop_browser\"),\n \"local_browser.screenshot\": tool(\"desktop_browser\"),\n \"local_browser.eval\": dropped(\"The extension runs no page script for Matrx 2: its script and cdp tools are privileged and refused over the desktop path; read, click and type cover what eval was used for\"),\n \"local_browser.tabs\": tool(\"desktop_browser\"),\n \"local_browser.close\": tool(\"desktop_browser\"),\n\n \"local_web.fetch\": tool(\"desktop_web\"),\n \"local_web.fetch_with_browser\": tool(\"desktop_web\"),\n \"local_web.scrape\": tool(\"desktop_web\"),\n \"local_web.search\": tool(\"desktop_web\"),\n \"local_web.research\": tool(\"desktop_web\"),\n \"local_web.download\": tool(\"desktop_net\"),\n \"local_web.upload\": dropped(\"Uploads are cloud files (matrx-files) and file sync, one upload path\"),\n\n \"local_net.info\": tool(\"desktop_net\"),\n \"local_net.scan\": tool(\"desktop_net\"),\n \"local_net.port_scan\": tool(\"desktop_net\"),\n \"local_net.mdns_discover\": tool(\"desktop_net\"),\n \"local_net.wifi_networks\": tool(\"desktop_net\"),\n \"local_net.bluetooth_devices\": tool(\"desktop_net\"),\n \"local_net.connected_devices\": tool(\"desktop_net\"),\n\n \"local_monitor.resources\": tool(\"desktop_resources\"),\n \"local_monitor.battery\": tool(\"desktop_power\"),\n \"local_monitor.disk_usage\": tool(\"desktop_resources\"),\n \"local_monitor.top_processes\": tool(\"desktop_process\"),\n \"local_monitor.watch_directory\": tool(\"fs_watch\"),\n \"local_monitor.watch_events\": tool(\"fs_watch\"),\n \"local_monitor.stop_watch\": tool(\"fs_watch\"),\n \"local_monitor.heartbeat\": dropped(\"The relay's device status replaces the heartbeat\"),\n\n // Matrx Local's scheduler ran one of its tools on an interval; desktop_schedule runs an op so.\n \"local_schedule.create\": tool(\"desktop_schedule\"),\n \"local_schedule.list\": tool(\"desktop_schedule\"),\n \"local_schedule.cancel\": tool(\"desktop_schedule\"),\n \"local_schedule.prevent_sleep\": tool(\"desktop_power\"),\n\n // Matrx Local's documents are the Markdown notes in Documents/Matrx/Notes; desktop_notes reads and writes them.\n \"local_documents.list\": tool(\"desktop_notes\"),\n \"local_documents.folders\": tool(\"desktop_notes\"),\n \"local_documents.read\": tool(\"desktop_notes\"),\n \"local_documents.write\": tool(\"desktop_notes\"),\n \"local_documents.search\": tool(\"desktop_notes\"),\n\n \"local_media.ocr\": tool(\"desktop_documents\"),\n \"local_media.resize\": tool(\"desktop_documents\"),\n \"local_media.pdf_extract\": tool(\"desktop_documents\"),\n \"local_media.office_generate\": tool(\"desktop_documents\"),\n \"local_media.archive_create\": dropped(SHELL_COVERS),\n \"local_media.archive_extract\": dropped(SHELL_COVERS),\n\n \"local_ner.entities\": tool(\"desktop_entities\"),\n \"local_ner.pii\": tool(\"desktop_entities\"),\n\n \"local_mac_apps.applescript\": tool(\"desktop_automation\"),\n \"local_mac_apps.list_emails\": tool(\"desktop_mail\"),\n \"local_mac_apps.send_email\": tool(\"desktop_mail\"),\n \"local_mac_apps.email_accounts\": tool(\"desktop_mail\"),\n \"local_mac_apps.list_messages\": tool(\"desktop_messages\"),\n \"local_mac_apps.list_conversations\": tool(\"desktop_messages\"),\n \"local_mac_apps.send_message\": tool(\"desktop_messages\"),\n \"local_mac_apps.search_contacts\": tool(\"desktop_contacts\"),\n \"local_mac_apps.get_contact\": tool(\"desktop_contacts\"),\n \"local_mac_apps.list_events\": tool(\"desktop_calendar\"),\n \"local_mac_apps.create_event\": tool(\"desktop_calendar\"),\n \"local_mac_apps.list_reminders\": tool(\"desktop_calendar\"),\n \"local_mac_apps.create_reminder\": tool(\"desktop_calendar\"),\n \"local_mac_apps.search_photos\": tool(\"desktop_photos\"),\n \"local_mac_apps.get_photo\": tool(\"desktop_photos\"),\n \"local_mac_apps.location\": tool(\"desktop_location\"),\n\n \"local_windows_ps.run\": tool(\"desktop_automation\"),\n \"local_windows_ps.get_env\": dropped(\"Read with shell_execute; a per-command env rides exec.run\"),\n \"local_windows_ps.set_env\": dropped(\"Changing the person's persistent environment is not an agent tool\"),\n \"local_windows_ps.registry_read\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.registry_write\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.service_list\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.service_control\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.event_log\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.windows_features\": tool(\"desktop_windows_admin\"),\n};\n\n/**\n * matrx-local's 19 action-enum dispatchers. Each fanned an `action` out to the handlers above and\n * did nothing else; they retire with the `matrx-local` executor binding (the platform reaches a\n * device through the relay now, never by client delegation).\n */\nexport const LEGACY_DISPATCHERS: readonly string[] = [\n \"local_file\",\n \"local_shell\",\n \"local_window\",\n \"local_process\",\n \"local_input\",\n \"local_audio\",\n \"local_clipboard\",\n \"local_screen\",\n \"local_system\",\n \"local_browser\",\n \"local_web\",\n \"local_net\",\n \"local_monitor\",\n \"local_schedule\",\n \"local_documents\",\n \"local_media\",\n \"local_ner\",\n \"local_mac_apps\",\n \"local_windows_ps\",\n];\n\n/** Built tools' ops, typed: a built tool naming an op the protocol does not have fails to compile in the test. */\nexport function builtOps(): OpName[] {\n return TOOL_CATALOG.filter((t) => t.state === \"built\").flatMap((t) => t.ops as OpName[]);\n}\n","/**\n * The generated tool status table (SPEC §10): tool × level × platform, built ONLY from harness\n * results (`ToolResultsFile`) joined with the catalog. Never written by hand; the one status anyone\n * cites. `renderToolStatusMarkdown` is the committed text form; screens render `ToolStatus` itself.\n */\nimport { ToolResultsFile, type ToolLevel, type ToolLevelResult, type ToolPlatform, type ToolTransport } from \"../schema/tools\";\nimport { EXCLUDED_TOOLS, TOOL_CATALOG, TOOL_GROUPS, type CatalogTool, type ToolGroupId, type ToolState } from \"./catalog\";\n\nexport const TOOL_LEVELS: readonly ToolLevel[] = [\"programmatic\", \"protocol\", \"chat\"];\nexport const TOOL_PLATFORMS: readonly ToolPlatform[] = [\"darwin\", \"win32\", \"linux\"];\n\n/**\n * `pass`: every required proof passed and none failed. `partial`: passes so far, a required proof\n * missing (`missing` says which). `fail`: the latest run of some proof failed. `untested`: nothing\n * ran. `not_built`: the tool is planned. `unsupported`: the tool does not exist on this platform.\n */\nconst UUID_IN_NAME = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi;\n\nexport type CellState = \"pass\" | \"partial\" | \"fail\" | \"untested\" | \"not_built\" | \"unsupported\";\n\nexport interface StatusEvidence {\n readonly suite: string;\n readonly test: string;\n readonly transport: ToolTransport;\n readonly outcome: ToolLevelResult[\"outcome\"];\n readonly remote_network: boolean;\n readonly commit: string;\n readonly run_at_ms: number;\n readonly detail: string;\n /** Chat level: the tool calls the turn made, of any tool (absent on older evidence). */\n readonly calls_made?: number;\n}\n\n/**\n * A run that never exercised the tool: a `skip`, or a chat turn that made no tool calls at all (the\n * model answered in prose, or the chat request failed). It is shown as the latest run but is never\n * evidence about the tool, so it can neither prove a cell nor turn a proven one red.\n */\nexport function isInconclusive(e: Pick<StatusEvidence, \"outcome\" | \"calls_made\">): boolean {\n return e.outcome === \"skip\" || e.calls_made === 0;\n}\n\nexport interface StatusCell {\n readonly state: CellState;\n /** Required proofs not yet passed, e.g. \"relay from another network\". */\n readonly missing: readonly string[];\n readonly last_run_at_ms: number | null;\n readonly evidence: readonly StatusEvidence[];\n}\n\nexport interface StatusRow {\n readonly tool: string;\n readonly group: ToolGroupId;\n readonly tool_state: ToolState;\n readonly summary: string;\n readonly note: string | null;\n readonly cells: Readonly<Record<ToolPlatform, Readonly<Record<ToolLevel, StatusCell>>>>;\n /** Working on a platform = all three levels pass there (SPEC §10). */\n readonly working: Readonly<Record<ToolPlatform, boolean>>;\n}\n\nexport interface ToolStatus {\n readonly schema: \"matrx.tool-status.v1\";\n readonly generated_at_ms: number;\n readonly commits: readonly string[];\n readonly rows: readonly StatusRow[];\n readonly totals: Readonly<Record<ToolPlatform, { readonly working: number; readonly built: number; readonly tools: number }>>;\n}\n\n/** What each level needs before it reads `pass`. Level 2 is the transports AND the relay from another network. */\nconst REQUIRED: Readonly<Record<ToolLevel, readonly { readonly label: string; readonly ok: (e: StatusEvidence) => boolean }[]>> = {\n programmatic: [{ label: \"in process\", ok: (e) => e.transport === \"in_process\" }],\n protocol: [\n { label: \"localhost\", ok: (e) => e.transport === \"localhost\" },\n { label: \"relay\", ok: (e) => e.transport === \"relay\" },\n { label: \"relay from another network\", ok: (e) => e.transport === \"relay\" && e.remote_network },\n ],\n chat: [{ label: \"a real agent in a real chat\", ok: (e) => e.transport === \"agent\" }],\n};\n\nfunction cellFor(tool: CatalogTool, platform: ToolPlatform, level: ToolLevel, evidence: StatusEvidence[]): StatusCell {\n if (!tool.platforms.includes(platform)) return { state: \"unsupported\", missing: [], last_run_at_ms: null, evidence: [] };\n // The latest DECISIVE run of each (suite, test, transport, network) decides; older runs are\n // history. A run that never exercised the tool (`isInconclusive`) never replaces a decisive one:\n // it is kept beside it, when newer, so the table still shows that the last run proved nothing.\n const latest = new Map<string, StatusEvidence>();\n const latestInconclusive = new Map<string, StatusEvidence>();\n for (const e of evidence) {\n // A uuid in a test name (the agent a chat proof ran, a conversation) is run data, never the\n // proof's identity: the same proof under a new test agent replaces the old one's result.\n const key = `${e.suite}\\u0000${e.test.replace(UUID_IN_NAME, \"<id>\")}\\u0000${e.transport}\\u0000${e.remote_network}`;\n const into = isInconclusive(e) ? latestInconclusive : latest;\n const prev = into.get(key);\n if (!prev || prev.run_at_ms < e.run_at_ms) into.set(key, e);\n }\n const runs = [...latest.values()].sort((a, b) => b.run_at_ms - a.run_at_ms);\n const unproven = [...latestInconclusive].filter(([k, e]) => (latest.get(k)?.run_at_ms ?? -1) < e.run_at_ms).map(([, e]) => e);\n const shown = [...runs, ...unproven].sort((a, b) => b.run_at_ms - a.run_at_ms);\n const last = runs[0]?.run_at_ms ?? null;\n if (tool.state === \"planned\" && runs.length === 0) return { state: \"not_built\", missing: [], last_run_at_ms: null, evidence: [] };\n if (runs.length === 0) return { state: \"untested\", missing: REQUIRED[level].map((r) => r.label), last_run_at_ms: null, evidence: shown };\n if (runs.some((e) => e.outcome === \"fail\")) return { state: \"fail\", missing: [], last_run_at_ms: last, evidence: shown };\n const missing = REQUIRED[level].filter((r) => !runs.some((e) => e.outcome === \"pass\" && r.ok(e))).map((r) => r.label);\n return { state: missing.length === 0 ? \"pass\" : \"partial\", missing, last_run_at_ms: last, evidence: shown };\n}\n\n/** Build the table from every results file. Throws when a file is off-contract (never silently skipped). */\nexport function buildToolStatus(files: readonly unknown[], opts: { readonly generatedAtMs: number }): ToolStatus {\n const parsed = files.map((f, i) => {\n const r = ToolResultsFile.safeParse(f);\n if (!r.success) throw new Error(`tool results file #${i} is off-contract: ${r.error.issues[0]?.path.join(\".\")} ${r.error.issues[0]?.message}`);\n return r.data;\n });\n const known = new Set(TOOL_CATALOG.map((t) => t.name));\n const byKey = new Map<string, StatusEvidence[]>();\n for (const file of parsed) {\n for (const r of file.results) {\n if (!known.has(r.tool)) throw new Error(`a result names ${r.tool}, which is not in the tool catalog`);\n const key = `${r.tool}|${r.platform}|${r.level}`;\n const list = byKey.get(key) ?? [];\n list.push({\n suite: r.suite,\n test: r.test,\n transport: r.transport,\n outcome: r.outcome,\n remote_network: r.remote_network,\n commit: file.commit,\n run_at_ms: r.run_at_ms,\n detail: r.detail,\n ...(r.calls_made === undefined ? {} : { calls_made: r.calls_made }),\n });\n byKey.set(key, list);\n }\n }\n const groupOrder = new Map(TOOL_GROUPS.map((g) => [g.id, g.order]));\n const tools = [...TOOL_CATALOG].sort((a, b) => (groupOrder.get(a.group) ?? 99) - (groupOrder.get(b.group) ?? 99));\n const rows: StatusRow[] = tools.map((tool) => {\n const cells = {} as Record<ToolPlatform, Record<ToolLevel, StatusCell>>;\n const working = {} as Record<ToolPlatform, boolean>;\n for (const platform of TOOL_PLATFORMS) {\n const perLevel = {} as Record<ToolLevel, StatusCell>;\n for (const level of TOOL_LEVELS) perLevel[level] = cellFor(tool, platform, level, byKey.get(`${tool.name}|${platform}|${level}`) ?? []);\n cells[platform] = perLevel;\n working[platform] = TOOL_LEVELS.every((l) => perLevel[l].state === \"pass\");\n }\n return { tool: tool.name, group: tool.group, tool_state: tool.state, summary: tool.summary, note: tool.note ?? null, cells, working };\n });\n const totals = {} as Record<ToolPlatform, { working: number; built: number; tools: number }>;\n for (const platform of TOOL_PLATFORMS) {\n const onPlatform = TOOL_CATALOG.filter((t) => t.platforms.includes(platform));\n totals[platform] = {\n working: rows.filter((r) => r.working[platform]).length,\n built: onPlatform.filter((t) => t.state !== \"planned\").length,\n tools: onPlatform.length,\n };\n }\n const commits = [...new Set(parsed.map((f) => f.commit))].sort();\n return { schema: \"matrx.tool-status.v1\", generated_at_ms: opts.generatedAtMs, commits, rows, totals };\n}\n\nconst MARK: Readonly<Record<CellState, string>> = { pass: \"✓\", partial: \"◐\", fail: \"✗\", untested: \"·\", not_built: \"—\", unsupported: \" \" };\n\n/** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */\nexport function renderToolStatusMarkdown(status: ToolStatus): string {\n const lines: string[] = [\n \"<!-- GENERATED by `pnpm tools:status` from test results. Never edit by hand. -->\",\n \"# Local tools: status\",\n \"\",\n `Generated ${new Date(status.generated_at_ms).toISOString()} from commits ${status.commits.join(\", \") || \"none\"}.`,\n \"\",\n \"✓ pass · ◐ passing so far, a required proof missing · ✗ fail · `·` untested · — not built. Levels: P programmatic, R protocol, C chat.\",\n \"\",\n \"| Platform | Working | Built | Tools |\",\n \"|---|---|---|---|\",\n ...TOOL_PLATFORMS.map((p) => `| ${p} | ${status.totals[p].working} | ${status.totals[p].built} | ${status.totals[p].tools} |`),\n \"\",\n ];\n for (const group of TOOL_GROUPS) {\n const rows = status.rows.filter((r) => r.group === group.id);\n if (rows.length === 0) continue;\n lines.push(`## ${group.order}. ${group.title}`, \"\", \"| Tool | darwin P R C | win32 P R C | linux P R C | Missing |\", \"|---|---|---|---|---|\");\n for (const r of rows) {\n const cols = TOOL_PLATFORMS.map((p) => TOOL_LEVELS.map((l) => MARK[r.cells[p][l].state]).join(\" \"));\n const missing = new Set<string>();\n for (const p of TOOL_PLATFORMS) for (const l of TOOL_LEVELS) for (const m of r.cells[p][l].missing) if (r.cells[p][l].state !== \"untested\") missing.add(`${p} ${l}: ${m}`);\n const name = r.tool_state === \"broken\" ? `${r.tool} (broken: ${r.note ?? \"\"})` : r.tool;\n lines.push(`| ${name} | ${cols.join(\" | \")} | ${[...missing].join(\"; \")} |`);\n }\n lines.push(\"\");\n }\n const excluded = Object.entries(EXCLUDED_TOOLS);\n if (excluded.length > 0) {\n lines.push(\"## Not device tools\", \"\", \"| Tool | Why |\", \"|---|---|\", ...excluded.map(([name, why]) => `| ${name} | ${why} |`), \"\");\n }\n return lines.join(\"\\n\");\n}\n","/**\n * The per-device tool policy's op rule (Matrx 2: Agents › Tools' switches, the\n * `desktop.tools/disabled_on_device` knob). The relay carries an op, never the tool that sent it, and\n * several tools share ops (fs_read, fs_write and fs_edit all read with `fs.read`; shell_execute and\n * shell_python both run `exec.run`). So an op is refused when EVERY catalog tool that sends it is\n * turned off. Pure, data-only: the core enforces it on relay connections, the screen explains it.\n */\nimport { TOOL_CATALOG } from \"./catalog\";\n\n/** The ops refused when these tools are off: those every sending tool has turned off. */\nexport function refusedOps(disabledTools: readonly string[]): ReadonlySet<string> {\n const off = new Set(disabledTools);\n const senders = new Map<string, string[]>();\n for (const tool of TOOL_CATALOG) for (const op of tool.ops) senders.set(op, [...(senders.get(op) ?? []), tool.name]);\n const refused = new Set<string>();\n for (const [op, tools] of senders) if (tools.every((t) => off.has(t))) refused.add(op);\n return refused;\n}\n\n/** The catalog tools that send this op. */\nexport function toolsSending(op: string): string[] {\n return TOOL_CATALOG.filter((t) => t.ops.includes(op)).map((t) => t.name);\n}\n\n/**\n * For one tool switched off: the tools still on that keep ALL its ops open (turning it off alone\n * stops nothing until they are off too). Empty when turning it off stops at least one op.\n */\nexport function sharedOpsBlocking(tool: string, disabledTools: readonly string[]): string[] {\n const entry = TOOL_CATALOG.find((t) => t.name === tool);\n if (!entry || entry.ops.length === 0) return [];\n const off = new Set([...disabledTools, tool]);\n const refused = refusedOps([...off]);\n if (entry.ops.some((op) => refused.has(op))) return [];\n const keepers = new Set<string>();\n for (const op of entry.ops) for (const other of TOOL_CATALOG) if (other.name !== tool && !off.has(other.name) && other.ops.includes(op)) keepers.add(other.name);\n return [...keepers].sort();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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C3B;","names":["tool","tool"]}
1
+ {"version":3,"sources":["../src/contract.ts","../src/tools/catalog.ts","../src/tools/status.ts","../src/tools/policy.ts"],"sourcesContent":["// AUTO-GENERATED by scripts/generate.ts — DO NOT EDIT. `pnpm generate --check` fails on any hand edit.\n/** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */\nexport const CONTRACT_SHA256 = \"c506c1188555e5a6810a0fb4c8517ee0b7328c66f5b4ddcf7eb1fe55bc737914\" as const;\n","/**\n * The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the\n * protocol ops it reaches, the group it ships in, and what became of each of matrx-local's 139\n * handlers (120 actions + the 19 action-enum dispatchers that fanned out to them).\n *\n * Data only. The status table (./status.ts) joins it with the harnesses' results, so a tool listed\n * here with no passing result reads \"untested\", never \"working\". Design and the reasons behind each\n * group: matrx-desktop/design/local-tools.md.\n */\nimport type { OpName } from \"../schema/registry\";\nimport type { ToolPlatform } from \"../schema/tools\";\n\nexport type ToolGroupId = \"files_shell\" | \"os_control\" | \"personal_automation\" | \"tools_service\" | \"ml_service\" | \"windows_admin\";\n\nexport interface ToolGroup {\n readonly id: ToolGroupId;\n readonly order: number;\n readonly title: string;\n /** Who implements the ops: a TS capability owner in the core, or a Python service. */\n readonly owner: \"core\" | \"python_tools\" | \"python_ml\";\n}\n\nexport const TOOL_GROUPS: readonly ToolGroup[] = [\n { id: \"files_shell\", order: 1, title: \"Files and shell\", owner: \"core\" },\n { id: \"os_control\", order: 2, title: \"Computer control\", owner: \"core\" },\n { id: \"personal_automation\", order: 3, title: \"Personal apps and automation\", owner: \"core\" },\n { id: \"tools_service\", order: 4, title: \"Web, documents, OCR and entities\", owner: \"python_tools\" },\n { id: \"ml_service\", order: 5, title: \"Speech\", owner: \"python_ml\" },\n { id: \"windows_admin\", order: 6, title: \"Windows administration\", owner: \"core\" },\n];\n\n/**\n * How an agent's call reaches the device. Both end at the relay's `POST /v1/devices/{id}/call`:\n * - `sandbox_proxy`: the cloud-sandbox-shaped tools (fs_*, shell_*). matrx-ai's `_sandbox_proxy`\n * calls aidream `/api/local-proxy/{device}/{fs|search|exec}/…`, which maps the route to its op.\n * Agent code never knows a laptop from a cloud box (SPEC §6.1).\n * - `device_op`: desktop-only capabilities. One generic route, `/api/local-proxy/{device}/op/{cap.op}`,\n * params and result exactly the op's schema; the tool definition is generated from that schema.\n * - `server`: runs on the aidream server even when the turn is bound to a device (a defect when\n * the tool reads a local path; see `note`).\n */\nexport type ToolPath = \"sandbox_proxy\" | \"device_op\" | \"server\";\n\n/** `built`: the ops exist in the protocol and Matrx 2's core serves them (registered on the platform for agents with the server tool); `planned`: designed, not built; `broken`: registered but wrong on a device. */\nexport type ToolState = \"built\" | \"planned\" | \"broken\";\n\nexport interface CatalogTool {\n /** The platform registry name (`tool.definition.name`). */\n readonly name: string;\n readonly group: ToolGroupId;\n readonly state: ToolState;\n readonly path: ToolPath;\n /** Ops the tool sends. For `built` tools every one is in OPS (a test enforces it). */\n readonly ops: readonly string[];\n readonly platforms: readonly ToolPlatform[];\n /** One line for the status table. */\n readonly summary: string;\n /** Required for `broken`: what is wrong. */\n readonly note?: string;\n}\n\nconst ALL: readonly ToolPlatform[] = [\"darwin\", \"win32\", \"linux\"];\n\nexport const TOOL_CATALOG: readonly CatalogTool[] = [\n // ── 1. Files and shell (core `fs`, `exec`; the cloud sandbox's agent tools) ──────────────────\n { name: \"fs_read\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.read\"], platforms: ALL, summary: \"Read a file, paged\" },\n { name: \"fs_write\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.read\", \"fs.write\"], platforms: ALL, summary: \"Create or overwrite a file\" },\n { name: \"fs_edit\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.read\", \"fs.patch\"], platforms: ALL, summary: \"Replace one exact string\" },\n { name: \"fs_patch\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.read\", \"fs.patch\"], platforms: ALL, summary: \"Apply several exact edits at once\" },\n { name: \"fs_list\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.list\"], platforms: ALL, summary: \"List a folder\" },\n { name: \"fs_mkdir\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.mkdir\"], platforms: ALL, summary: \"Create a folder\" },\n { name: \"fs_search\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.search_paths\", \"fs.search_content\"], platforms: ALL, summary: \"Find files by name or content\" },\n { name: \"shell_execute\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"exec.run\"], platforms: ALL, summary: \"Run a command; cd carries over\" },\n { name: \"shell_python\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"exec.run\"], platforms: ALL, summary: \"Run a Python script\" },\n { name: \"desktop_git\", group: \"files_shell\", state: \"built\", path: \"device_op\", ops: [\"git.status\", \"git.diff\", \"git.log\", \"git.add\", \"git.commit\", \"git.push\", \"git.pull\", \"git.branch\", \"git.stash\", \"git.clone\"], platforms: ALL, summary: \"Git: status, diff, log, commit, branches, push and pull\" },\n { name: \"shell_job\", group: \"files_shell\", state: \"built\", path: \"device_op\", ops: [\"exec.job.start\", \"exec.job.output\", \"exec.job.stop\", \"exec.job.list\"], platforms: ALL, summary: \"Background commands: start, read output, stop\" },\n\n // ── 2. Computer control (TS owners) ──────────────────────────────────────────────────────────\n { name: \"desktop_process\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"proc.list\", \"proc.ports\", \"proc.kill\"], platforms: ALL, summary: \"Running processes and ports; stop one\" },\n { name: \"desktop_apps\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"apps.list\", \"apps.open\"], platforms: ALL, summary: \"Installed apps; open or bring one forward\" },\n { name: \"desktop_system\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"sysinfo.get\", \"sysinfo.hardware\", \"system.open_url\", \"system.open_path\", \"system.open_settings\", \"system.notify\"], platforms: ALL, summary: \"System facts, open, notify\" },\n { name: \"desktop_clipboard\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"clipboard.read\", \"clipboard.write\"], platforms: ALL, summary: \"Read and write the clipboard's text\" },\n { name: \"desktop_action_needed\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"action_needed.raise\", \"action_needed.wait\", \"action_needed.get\", \"action_needed.cancel\", \"action_needed.list\"], platforms: ALL, summary: \"Ask the person for an answer, a pick, an approval, a sign-in, a file or a permission; wait for or poll the answer\" },\n { name: \"desktop_screen\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"screen.list\", \"screen.capture\"], platforms: ALL, summary: \"Displays and screenshots\" },\n { name: \"desktop_browser\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"browser.sessions\", \"browser.call\"], platforms: ALL, summary: \"The person's own browser through the AI Matrx extension: tabs, read, screenshot, navigate, click, type\" },\n { name: \"desktop_window\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"window.list\", \"window.focus\", \"window.move\", \"window.minimize\"], platforms: ALL, summary: \"Find, focus and arrange windows\" },\n { name: \"desktop_input\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"input.type_text\", \"input.hotkey\", \"input.mouse_click\", \"input.mouse_move\", \"input.keyboard_settings\", \"input.set_keyboard_settings\"], platforms: ALL, summary: \"Keyboard and mouse\" },\n { name: \"desktop_audio\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"audio.devices\", \"audio.levels\", \"audio.set_levels\", \"audio.record\", \"audio.play\"], platforms: ALL, summary: \"Audio devices, record, play\" },\n { name: \"desktop_power\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"power.status\", \"power.history\", \"power.prevent_sleep\"], platforms: ALL, summary: \"Battery and keep awake\" },\n { name: \"desktop_resources\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"resources.snapshot\", \"resources.activity\", \"resources.stop_job\", \"resources.incidents\"], platforms: ALL, summary: \"CPU, memory and disk use; what is using them, grouped into jobs; stop a job; the slowdown log\" },\n { name: \"fs_watch\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"fs.watch.start\", \"fs.watch.events\", \"fs.watch.stop\"], platforms: ALL, summary: \"Watch a folder; read what changed\" },\n\n // ── 3. Personal apps and automation (1.37: the core's `automation`, `personal`, `net` and `schedule` owners) ──\n { name: \"desktop_automation\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"automation.script\"], platforms: [\"darwin\", \"win32\"], summary: \"AppleScript or JavaScript for Automation on a Mac, PowerShell on Windows\" },\n { name: \"desktop_mail\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"mail.accounts\", \"mail.list\", \"mail.send\"], platforms: [\"darwin\"], summary: \"The Mail app: accounts, messages, send\" },\n { name: \"desktop_outlook\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"outlook.status\", \"outlook.draft\", \"outlook.list\", \"outlook.read\"], platforms: [\"win32\"], summary: \"The person's own Outlook: drafts with attachments, recent mail, one message\" },\n { name: \"desktop_messages\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"messages.chats\", \"messages.list\", \"messages.send\"], platforms: [\"darwin\"], summary: \"The Messages app: chats, messages, send\" },\n { name: \"desktop_contacts\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"contacts.search\", \"contacts.get\"], platforms: [\"darwin\"], summary: \"Contacts: search, one card\" },\n { name: \"desktop_calendar\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"calendar.list\", \"calendar.create\", \"reminders.list\", \"reminders.create\"], platforms: [\"darwin\"], summary: \"Calendar and Reminders: list and add\" },\n { name: \"desktop_photos\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"photos.search\", \"photos.get\"], platforms: [\"darwin\"], summary: \"The Photos library: find, export an original\" },\n // Windows comes back once a Windows location fix is proven (plan attack retire-local 2026-10-12, B6):\n // until then local_mac_apps (macOS-only) is judged on macOS and nothing claims Windows.\n { name: \"desktop_location\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"location.get\"], platforms: [\"darwin\"], summary: \"Where the computer is (the OS's location service)\" },\n { name: \"desktop_net\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"net.info\", \"net.wifi\", \"net.bluetooth\", \"net.devices\", \"net.mdns\", \"net.scan\", \"net.download\"], platforms: ALL, summary: \"Local network, Wi-Fi, Bluetooth, open ports and downloads\" },\n { name: \"desktop_schedule\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"schedule.create\", \"schedule.list\", \"schedule.cancel\"], platforms: ALL, summary: \"Run a tool's op on this computer on an interval; list and cancel\" },\n // 1.38, code from anywhere: the person's Claude Code and Codex sessions on this computer. Turning\n // either off in Agents › Tools refuses its ops on every relay connection (the existing switch).\n { name: \"coding_sessions_read\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"coding.providers\", \"coding.sessions.list\", \"coding.discover\", \"coding.runs.list\", \"coding.history\", \"coding.transcript.read\", \"coding.item.full\", \"coding.activity\", \"coding.folders.recent\", \"coding.folders.check\", \"coding.agents.access\", \"coding.titles.status\", \"coding.prefs.list\", \"coding.recent.seen\", \"coding.search\", \"coding.transcript.raw\", \"coding.watch\", \"coding.session.watch\", \"coding.assets.list\", \"coding.assets.get\"], platforms: ALL, summary: \"Claude Code and Codex sessions: list, read live, search, download; the agents' memories and instructions\" },\n { name: \"coding_sessions_drive\", group: \"personal_automation\", state: \"built\", path: \"device_op\", ops: [\"coding.start\", \"coding.takeover\", \"coding.send\", \"coding.stop\", \"coding.stop_elsewhere\", \"coding.options.set\", \"coding.account.continue\", \"coding.agent.set\", \"coding.folders.create\", \"coding.prefs.set\", \"coding.reconcile\"], platforms: ALL, summary: \"Claude Code and Codex sessions: start, send, stop, take over, rename\" },\n\n // ── 4. Documents, notes and entities (1.37: the core's `documents` and `notes` owners; desktop_web is the `tools` service) ──\n { name: \"desktop_documents\", group: \"tools_service\", state: \"built\", path: \"device_op\", ops: [\"documents.pdf_text\", \"documents.ocr\", \"documents.image_resize\", \"documents.office_generate\"], platforms: ALL, summary: \"PDF text, OCR, images, Word and Excel files\" },\n { name: \"desktop_web\", group: \"tools_service\", state: \"built\", path: \"device_op\", ops: [\"web.fetch\", \"web.scrape\", \"web.search\", \"web.fetch_with_browser\"], platforms: ALL, summary: \"Fetch, scrape, search and research the web from this computer's own connection (research: search on AI Matrx, every result read here)\" },\n { name: \"desktop_entities\", group: \"tools_service\", state: \"built\", path: \"device_op\", ops: [\"entities.ner\", \"entities.pii\"], platforms: ALL, summary: \"Names, places, organizations and private data, found on the device\" },\n // matrx-local's SemanticFindPaths: the local embedding index of this computer's files (1.87) searched by an\n // embedding model on the device (1.88: the model service's embeddings slot). fs.semantic_status tells an agent\n // whether the index is ready (indexed N of M, or why not) before it asks.\n { name: \"desktop_semantic_find\", group: \"files_shell\", state: \"built\", path: \"device_op\", ops: [\"fs.search_semantic\", \"fs.semantic_status\"], platforms: ALL, summary: \"Find files by meaning (a local embedding index of this computer's files, searched by an embedding model on the device)\" },\n { name: \"desktop_notes\", group: \"files_shell\", state: \"built\", path: \"device_op\", ops: [\"notes.folders\", \"notes.list\", \"notes.read\", \"notes.write\", \"notes.search\"], platforms: ALL, summary: \"The person's local notes (Documents/Matrx/Notes): list, read, write, search\" },\n\n // ── 5. Python `ml` service ───────────────────────────────────────────────────────────────────\n // Built: models.transcribe through local_proxy's POST /op/{cap.op} (matrx-ai implementations/desktop.py).\n // Whisper detects the language itself, so matrx-local's speech_locales needs no op of its own.\n { name: \"desktop_transcribe\", group: \"ml_service\", state: \"built\", path: \"device_op\", ops: [\"models.transcribe\"], platforms: ALL, summary: \"Speech to text on the device\" },\n\n // ── 6. Windows administration ────────────────────────────────────────────────────────────────\n { name: \"desktop_windows_admin\", group: \"windows_admin\", state: \"built\", path: \"device_op\", ops: [\"windows.registry_read\", \"windows.registry_write\", \"windows.services\", \"windows.service_control\", \"windows.event_log\", \"windows.features\"], platforms: [\"win32\"], summary: \"Registry, services, event log, optional features\" },\n];\n\n/**\n * Tools armed with a device binding that are deliberately NOT device tools, each with its reason.\n * They run on the server; the status table does not track them.\n */\nexport const EXCLUDED_TOOLS: Readonly<Record<string, string>> = {\n git_ingest:\n \"Runs on the server: it ingests repository URLs. A local path on a bound computer or sandbox is refused with the fs_* and shell remedy, since the server cannot see it\",\n};\n\n/** What became of one matrx-local handler. */\nexport type LegacyDisposition =\n | { readonly kind: \"tool\"; readonly tool: string }\n | { readonly kind: \"dropped\"; readonly reason: string };\n\nconst tool = (name: string): LegacyDisposition => ({ kind: \"tool\", tool: name });\nconst dropped = (reason: string): LegacyDisposition => ({ kind: \"dropped\", reason });\n\nconst SHELL_COVERS = \"Done with shell_execute (mv, cp, rm, tar), as every coding agent does\";\n\n/** matrx-local's 120 actions (`app/tools/actions.py` ACTION_GROUPS), keyed `<mega tool>.<action>`. */\nexport const LEGACY_ACTIONS: Readonly<Record<string, LegacyDisposition>> = {\n \"local_file.read\": tool(\"fs_read\"),\n \"local_file.write\": tool(\"fs_write\"),\n \"local_file.edit\": tool(\"fs_edit\"),\n \"local_file.move\": dropped(SHELL_COVERS),\n \"local_file.copy\": dropped(SHELL_COVERS),\n \"local_file.delete\": dropped(SHELL_COVERS),\n \"local_file.rename\": dropped(SHELL_COVERS),\n \"local_file.mkdir\": tool(\"fs_mkdir\"),\n \"local_file.glob\": tool(\"fs_search\"),\n \"local_file.grep\": tool(\"fs_search\"),\n \"local_file.list\": tool(\"fs_list\"),\n \"local_file.places\": dropped(\"The device's home and folders reach the agent in its binding briefing (sysinfo.get)\"),\n \"local_file.find\": tool(\"fs_search\"),\n \"local_file.semantic_find\": tool(\"desktop_semantic_find\"),\n\n \"local_shell.run\": tool(\"shell_execute\"),\n \"local_shell.output\": tool(\"shell_job\"),\n \"local_shell.stop\": tool(\"shell_job\"),\n\n \"local_window.list\": tool(\"desktop_window\"),\n \"local_window.focus\": tool(\"desktop_window\"),\n \"local_window.move\": tool(\"desktop_window\"),\n \"local_window.minimize\": tool(\"desktop_window\"),\n\n \"local_process.list\": tool(\"desktop_process\"),\n \"local_process.ports\": tool(\"desktop_process\"),\n \"local_process.launch_app\": tool(\"desktop_apps\"),\n \"local_process.kill\": tool(\"desktop_process\"),\n \"local_process.focus_app\": tool(\"desktop_apps\"),\n \"local_process.terminals\": dropped(\"Matrx 2 terminals are exec sessions; the person's own terminal windows are not the agent's\"),\n \"local_process.tail_terminal\": dropped(\"Matrx 2 terminals are exec sessions; the person's own terminal windows are not the agent's\"),\n \"local_process.installed_apps\": tool(\"desktop_apps\"),\n\n \"local_input.type_text\": tool(\"desktop_input\"),\n \"local_input.hotkey\": tool(\"desktop_input\"),\n \"local_input.mouse_click\": tool(\"desktop_input\"),\n \"local_input.mouse_move\": tool(\"desktop_input\"),\n\n \"local_audio.devices\": tool(\"desktop_audio\"),\n \"local_audio.record\": tool(\"desktop_audio\"),\n \"local_audio.play\": tool(\"desktop_audio\"),\n \"local_audio.transcribe\": tool(\"desktop_transcribe\"),\n \"local_audio.transcribe_with_speech\": tool(\"desktop_transcribe\"),\n \"local_audio.speech_locales\": tool(\"desktop_transcribe\"),\n\n \"local_clipboard.read\": tool(\"desktop_clipboard\"),\n \"local_clipboard.write\": tool(\"desktop_clipboard\"),\n\n \"local_screen.screenshot\": tool(\"desktop_screen\"),\n \"local_screen.list\": tool(\"desktop_screen\"),\n \"local_screen.capture_book\": dropped(\"A one-off loop of screenshot plus page turn; the agent composes it from desktop_screen and desktop_input\"),\n\n \"local_system.info\": tool(\"desktop_system\"),\n \"local_system.open_url\": tool(\"desktop_system\"),\n \"local_system.open_path\": tool(\"desktop_system\"),\n \"local_system.notify\": tool(\"desktop_system\"),\n\n // The person's own browser is the AI Matrx extension paired with Matrx 2 (cap browser).\n \"local_browser.navigate\": tool(\"desktop_browser\"),\n \"local_browser.click\": tool(\"desktop_browser\"),\n \"local_browser.type_text\": tool(\"desktop_browser\"),\n \"local_browser.extract\": tool(\"desktop_browser\"),\n \"local_browser.screenshot\": tool(\"desktop_browser\"),\n \"local_browser.eval\": dropped(\"The extension runs no page script for Matrx 2: its script and cdp tools are privileged and refused over the desktop path; read, click and type cover what eval was used for\"),\n \"local_browser.tabs\": tool(\"desktop_browser\"),\n \"local_browser.close\": tool(\"desktop_browser\"),\n\n \"local_web.fetch\": tool(\"desktop_web\"),\n \"local_web.fetch_with_browser\": tool(\"desktop_web\"),\n \"local_web.scrape\": tool(\"desktop_web\"),\n \"local_web.search\": tool(\"desktop_web\"),\n \"local_web.research\": tool(\"desktop_web\"),\n \"local_web.download\": tool(\"desktop_net\"),\n \"local_web.upload\": dropped(\"Uploads are cloud files (matrx-files) and file sync, one upload path\"),\n\n \"local_net.info\": tool(\"desktop_net\"),\n \"local_net.scan\": tool(\"desktop_net\"),\n \"local_net.port_scan\": tool(\"desktop_net\"),\n \"local_net.mdns_discover\": tool(\"desktop_net\"),\n \"local_net.wifi_networks\": tool(\"desktop_net\"),\n \"local_net.bluetooth_devices\": tool(\"desktop_net\"),\n \"local_net.connected_devices\": tool(\"desktop_net\"),\n\n \"local_monitor.resources\": tool(\"desktop_resources\"),\n \"local_monitor.battery\": tool(\"desktop_power\"),\n \"local_monitor.disk_usage\": tool(\"desktop_resources\"),\n \"local_monitor.top_processes\": tool(\"desktop_process\"),\n \"local_monitor.watch_directory\": tool(\"fs_watch\"),\n \"local_monitor.watch_events\": tool(\"fs_watch\"),\n \"local_monitor.stop_watch\": tool(\"fs_watch\"),\n \"local_monitor.heartbeat\": dropped(\"The relay's device status replaces the heartbeat\"),\n\n // Matrx Local's scheduler ran one of its tools on an interval; desktop_schedule runs an op so.\n \"local_schedule.create\": tool(\"desktop_schedule\"),\n \"local_schedule.list\": tool(\"desktop_schedule\"),\n \"local_schedule.cancel\": tool(\"desktop_schedule\"),\n \"local_schedule.prevent_sleep\": tool(\"desktop_power\"),\n\n // Matrx Local's documents are the Markdown notes in Documents/Matrx/Notes; desktop_notes reads and writes them.\n \"local_documents.list\": tool(\"desktop_notes\"),\n \"local_documents.folders\": tool(\"desktop_notes\"),\n \"local_documents.read\": tool(\"desktop_notes\"),\n \"local_documents.write\": tool(\"desktop_notes\"),\n \"local_documents.search\": tool(\"desktop_notes\"),\n\n \"local_media.ocr\": tool(\"desktop_documents\"),\n \"local_media.resize\": tool(\"desktop_documents\"),\n \"local_media.pdf_extract\": tool(\"desktop_documents\"),\n \"local_media.office_generate\": tool(\"desktop_documents\"),\n \"local_media.archive_create\": dropped(SHELL_COVERS),\n \"local_media.archive_extract\": dropped(SHELL_COVERS),\n\n \"local_ner.entities\": tool(\"desktop_entities\"),\n \"local_ner.pii\": tool(\"desktop_entities\"),\n\n \"local_mac_apps.applescript\": tool(\"desktop_automation\"),\n \"local_mac_apps.list_emails\": tool(\"desktop_mail\"),\n \"local_mac_apps.send_email\": tool(\"desktop_mail\"),\n \"local_mac_apps.email_accounts\": tool(\"desktop_mail\"),\n \"local_mac_apps.list_messages\": tool(\"desktop_messages\"),\n \"local_mac_apps.list_conversations\": tool(\"desktop_messages\"),\n \"local_mac_apps.send_message\": tool(\"desktop_messages\"),\n \"local_mac_apps.search_contacts\": tool(\"desktop_contacts\"),\n \"local_mac_apps.get_contact\": tool(\"desktop_contacts\"),\n \"local_mac_apps.list_events\": tool(\"desktop_calendar\"),\n \"local_mac_apps.create_event\": tool(\"desktop_calendar\"),\n \"local_mac_apps.list_reminders\": tool(\"desktop_calendar\"),\n \"local_mac_apps.create_reminder\": tool(\"desktop_calendar\"),\n \"local_mac_apps.search_photos\": tool(\"desktop_photos\"),\n \"local_mac_apps.get_photo\": tool(\"desktop_photos\"),\n \"local_mac_apps.location\": tool(\"desktop_location\"),\n\n \"local_windows_ps.run\": tool(\"desktop_automation\"),\n \"local_windows_ps.get_env\": dropped(\"Read with shell_execute; a per-command env rides exec.run\"),\n \"local_windows_ps.set_env\": dropped(\"Changing the person's persistent environment is not an agent tool\"),\n \"local_windows_ps.registry_read\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.registry_write\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.service_list\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.service_control\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.event_log\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.windows_features\": tool(\"desktop_windows_admin\"),\n};\n\n/**\n * matrx-local's 19 action-enum dispatchers. Each fanned an `action` out to the handlers above and\n * did nothing else; they retire with the `matrx-local` executor binding (the platform reaches a\n * device through the relay now, never by client delegation).\n */\nexport const LEGACY_DISPATCHERS: readonly string[] = [\n \"local_file\",\n \"local_shell\",\n \"local_window\",\n \"local_process\",\n \"local_input\",\n \"local_audio\",\n \"local_clipboard\",\n \"local_screen\",\n \"local_system\",\n \"local_browser\",\n \"local_web\",\n \"local_net\",\n \"local_monitor\",\n \"local_schedule\",\n \"local_documents\",\n \"local_media\",\n \"local_ner\",\n \"local_mac_apps\",\n \"local_windows_ps\",\n];\n\n/** Built tools' ops, typed: a built tool naming an op the protocol does not have fails to compile in the test. */\nexport function builtOps(): OpName[] {\n return TOOL_CATALOG.filter((t) => t.state === \"built\").flatMap((t) => t.ops as OpName[]);\n}\n","/**\n * The generated tool status table (SPEC §10): tool × level × platform, built ONLY from harness\n * results (`ToolResultsFile`) joined with the catalog. Never written by hand; the one status anyone\n * cites. `renderToolStatusMarkdown` is the committed text form; screens render `ToolStatus` itself.\n */\nimport { ToolResultsFile, type ToolLevel, type ToolLevelResult, type ToolPlatform, type ToolTransport } from \"../schema/tools\";\nimport { EXCLUDED_TOOLS, TOOL_CATALOG, TOOL_GROUPS, type CatalogTool, type ToolGroupId, type ToolState } from \"./catalog\";\n\nexport const TOOL_LEVELS: readonly ToolLevel[] = [\"programmatic\", \"protocol\", \"chat\"];\nexport const TOOL_PLATFORMS: readonly ToolPlatform[] = [\"darwin\", \"win32\", \"linux\"];\n\n/**\n * `pass`: every required proof passed and none failed. `partial`: passes so far, a required proof\n * missing (`missing` says which). `fail`: the latest run of some proof failed. `untested`: nothing\n * ran. `not_built`: the tool is planned. `unsupported`: the tool does not exist on this platform.\n */\nconst UUID_IN_NAME = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi;\n\nexport type CellState = \"pass\" | \"partial\" | \"fail\" | \"untested\" | \"not_built\" | \"unsupported\";\n\nexport interface StatusEvidence {\n readonly suite: string;\n readonly test: string;\n readonly transport: ToolTransport;\n readonly outcome: ToolLevelResult[\"outcome\"];\n readonly remote_network: boolean;\n readonly commit: string;\n readonly run_at_ms: number;\n readonly detail: string;\n /** Chat level: the tool calls the turn made, of any tool (absent on older evidence). */\n readonly calls_made?: number;\n}\n\n/**\n * A run that never exercised the tool: a `skip`, or a chat turn that made no tool calls at all (the\n * model answered in prose, or the chat request failed). It is shown as the latest run but is never\n * evidence about the tool, so it can neither prove a cell nor turn a proven one red.\n */\nexport function isInconclusive(e: Pick<StatusEvidence, \"outcome\" | \"calls_made\">): boolean {\n return e.outcome === \"skip\" || e.calls_made === 0;\n}\n\nexport interface StatusCell {\n readonly state: CellState;\n /** Required proofs not yet passed, e.g. \"relay from another network\". */\n readonly missing: readonly string[];\n readonly last_run_at_ms: number | null;\n readonly evidence: readonly StatusEvidence[];\n}\n\nexport interface StatusRow {\n readonly tool: string;\n readonly group: ToolGroupId;\n readonly tool_state: ToolState;\n readonly summary: string;\n readonly note: string | null;\n readonly cells: Readonly<Record<ToolPlatform, Readonly<Record<ToolLevel, StatusCell>>>>;\n /** Working on a platform = all three levels pass there (SPEC §10). */\n readonly working: Readonly<Record<ToolPlatform, boolean>>;\n}\n\nexport interface ToolStatus {\n readonly schema: \"matrx.tool-status.v1\";\n readonly generated_at_ms: number;\n readonly commits: readonly string[];\n readonly rows: readonly StatusRow[];\n readonly totals: Readonly<Record<ToolPlatform, { readonly working: number; readonly built: number; readonly tools: number }>>;\n}\n\n/** What each level needs before it reads `pass`. Level 2 is the transports AND the relay from another network. */\nconst REQUIRED: Readonly<Record<ToolLevel, readonly { readonly label: string; readonly ok: (e: StatusEvidence) => boolean }[]>> = {\n programmatic: [{ label: \"in process\", ok: (e) => e.transport === \"in_process\" }],\n protocol: [\n { label: \"localhost\", ok: (e) => e.transport === \"localhost\" },\n { label: \"relay\", ok: (e) => e.transport === \"relay\" },\n { label: \"relay from another network\", ok: (e) => e.transport === \"relay\" && e.remote_network },\n ],\n chat: [{ label: \"a real agent in a real chat\", ok: (e) => e.transport === \"agent\" }],\n};\n\nfunction cellFor(tool: CatalogTool, platform: ToolPlatform, level: ToolLevel, evidence: StatusEvidence[]): StatusCell {\n if (!tool.platforms.includes(platform)) return { state: \"unsupported\", missing: [], last_run_at_ms: null, evidence: [] };\n // The latest DECISIVE run of each (suite, test, transport, network) decides; older runs are\n // history. A run that never exercised the tool (`isInconclusive`) never replaces a decisive one:\n // it is kept beside it, when newer, so the table still shows that the last run proved nothing.\n const latest = new Map<string, StatusEvidence>();\n const latestInconclusive = new Map<string, StatusEvidence>();\n for (const e of evidence) {\n // A uuid in a test name (the agent a chat proof ran, a conversation) is run data, never the\n // proof's identity: the same proof under a new test agent replaces the old one's result.\n const key = `${e.suite}\\u0000${e.test.replace(UUID_IN_NAME, \"<id>\")}\\u0000${e.transport}\\u0000${e.remote_network}`;\n const into = isInconclusive(e) ? latestInconclusive : latest;\n const prev = into.get(key);\n if (!prev || prev.run_at_ms < e.run_at_ms) into.set(key, e);\n }\n const runs = [...latest.values()].sort((a, b) => b.run_at_ms - a.run_at_ms);\n const unproven = [...latestInconclusive].filter(([k, e]) => (latest.get(k)?.run_at_ms ?? -1) < e.run_at_ms).map(([, e]) => e);\n const shown = [...runs, ...unproven].sort((a, b) => b.run_at_ms - a.run_at_ms);\n const last = runs[0]?.run_at_ms ?? null;\n if (tool.state === \"planned\" && runs.length === 0) return { state: \"not_built\", missing: [], last_run_at_ms: null, evidence: [] };\n if (runs.length === 0) return { state: \"untested\", missing: REQUIRED[level].map((r) => r.label), last_run_at_ms: null, evidence: shown };\n if (runs.some((e) => e.outcome === \"fail\")) return { state: \"fail\", missing: [], last_run_at_ms: last, evidence: shown };\n const missing = REQUIRED[level].filter((r) => !runs.some((e) => e.outcome === \"pass\" && r.ok(e))).map((r) => r.label);\n return { state: missing.length === 0 ? \"pass\" : \"partial\", missing, last_run_at_ms: last, evidence: shown };\n}\n\n/** Build the table from every results file. Throws when a file is off-contract (never silently skipped). */\nexport function buildToolStatus(files: readonly unknown[], opts: { readonly generatedAtMs: number }): ToolStatus {\n const parsed = files.map((f, i) => {\n const r = ToolResultsFile.safeParse(f);\n if (!r.success) throw new Error(`tool results file #${i} is off-contract: ${r.error.issues[0]?.path.join(\".\")} ${r.error.issues[0]?.message}`);\n return r.data;\n });\n const known = new Set(TOOL_CATALOG.map((t) => t.name));\n const byKey = new Map<string, StatusEvidence[]>();\n for (const file of parsed) {\n for (const r of file.results) {\n if (!known.has(r.tool)) throw new Error(`a result names ${r.tool}, which is not in the tool catalog`);\n const key = `${r.tool}|${r.platform}|${r.level}`;\n const list = byKey.get(key) ?? [];\n list.push({\n suite: r.suite,\n test: r.test,\n transport: r.transport,\n outcome: r.outcome,\n remote_network: r.remote_network,\n commit: file.commit,\n run_at_ms: r.run_at_ms,\n detail: r.detail,\n ...(r.calls_made === undefined ? {} : { calls_made: r.calls_made }),\n });\n byKey.set(key, list);\n }\n }\n const groupOrder = new Map(TOOL_GROUPS.map((g) => [g.id, g.order]));\n const tools = [...TOOL_CATALOG].sort((a, b) => (groupOrder.get(a.group) ?? 99) - (groupOrder.get(b.group) ?? 99));\n const rows: StatusRow[] = tools.map((tool) => {\n const cells = {} as Record<ToolPlatform, Record<ToolLevel, StatusCell>>;\n const working = {} as Record<ToolPlatform, boolean>;\n for (const platform of TOOL_PLATFORMS) {\n const perLevel = {} as Record<ToolLevel, StatusCell>;\n for (const level of TOOL_LEVELS) perLevel[level] = cellFor(tool, platform, level, byKey.get(`${tool.name}|${platform}|${level}`) ?? []);\n cells[platform] = perLevel;\n working[platform] = TOOL_LEVELS.every((l) => perLevel[l].state === \"pass\");\n }\n return { tool: tool.name, group: tool.group, tool_state: tool.state, summary: tool.summary, note: tool.note ?? null, cells, working };\n });\n const totals = {} as Record<ToolPlatform, { working: number; built: number; tools: number }>;\n for (const platform of TOOL_PLATFORMS) {\n const onPlatform = TOOL_CATALOG.filter((t) => t.platforms.includes(platform));\n totals[platform] = {\n working: rows.filter((r) => r.working[platform]).length,\n built: onPlatform.filter((t) => t.state !== \"planned\").length,\n tools: onPlatform.length,\n };\n }\n const commits = [...new Set(parsed.map((f) => f.commit))].sort();\n return { schema: \"matrx.tool-status.v1\", generated_at_ms: opts.generatedAtMs, commits, rows, totals };\n}\n\nconst MARK: Readonly<Record<CellState, string>> = { pass: \"✓\", partial: \"◐\", fail: \"✗\", untested: \"·\", not_built: \"—\", unsupported: \" \" };\n\n/** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */\nexport function renderToolStatusMarkdown(status: ToolStatus): string {\n const lines: string[] = [\n \"<!-- GENERATED by `pnpm tools:status` from test results. Never edit by hand. -->\",\n \"# Local tools: status\",\n \"\",\n `Generated ${new Date(status.generated_at_ms).toISOString()} from commits ${status.commits.join(\", \") || \"none\"}.`,\n \"\",\n \"✓ pass · ◐ passing so far, a required proof missing · ✗ fail · `·` untested · — not built. Levels: P programmatic, R protocol, C chat.\",\n \"\",\n \"| Platform | Working | Built | Tools |\",\n \"|---|---|---|---|\",\n ...TOOL_PLATFORMS.map((p) => `| ${p} | ${status.totals[p].working} | ${status.totals[p].built} | ${status.totals[p].tools} |`),\n \"\",\n ];\n for (const group of TOOL_GROUPS) {\n const rows = status.rows.filter((r) => r.group === group.id);\n if (rows.length === 0) continue;\n lines.push(`## ${group.order}. ${group.title}`, \"\", \"| Tool | darwin P R C | win32 P R C | linux P R C | Missing |\", \"|---|---|---|---|---|\");\n for (const r of rows) {\n const cols = TOOL_PLATFORMS.map((p) => TOOL_LEVELS.map((l) => MARK[r.cells[p][l].state]).join(\" \"));\n const missing = new Set<string>();\n for (const p of TOOL_PLATFORMS) for (const l of TOOL_LEVELS) for (const m of r.cells[p][l].missing) if (r.cells[p][l].state !== \"untested\") missing.add(`${p} ${l}: ${m}`);\n const name = r.tool_state === \"broken\" ? `${r.tool} (broken: ${r.note ?? \"\"})` : r.tool;\n lines.push(`| ${name} | ${cols.join(\" | \")} | ${[...missing].join(\"; \")} |`);\n }\n lines.push(\"\");\n }\n const excluded = Object.entries(EXCLUDED_TOOLS);\n if (excluded.length > 0) {\n lines.push(\"## Not device tools\", \"\", \"| Tool | Why |\", \"|---|---|\", ...excluded.map(([name, why]) => `| ${name} | ${why} |`), \"\");\n }\n return lines.join(\"\\n\");\n}\n","/**\n * The per-device tool policy's op rule (Matrx 2: Agents › Tools' switches, the\n * `desktop.tools/disabled_on_device` knob). The relay carries an op, never the tool that sent it, and\n * several tools share ops (fs_read, fs_write and fs_edit all read with `fs.read`; shell_execute and\n * shell_python both run `exec.run`). So an op is refused when EVERY catalog tool that sends it is\n * turned off. Pure, data-only: the core enforces it on relay connections, the screen explains it.\n */\nimport { TOOL_CATALOG } from \"./catalog\";\n\n/** The ops refused when these tools are off: those every sending tool has turned off. */\nexport function refusedOps(disabledTools: readonly string[]): ReadonlySet<string> {\n const off = new Set(disabledTools);\n const senders = new Map<string, string[]>();\n for (const tool of TOOL_CATALOG) for (const op of tool.ops) senders.set(op, [...(senders.get(op) ?? []), tool.name]);\n const refused = new Set<string>();\n for (const [op, tools] of senders) if (tools.every((t) => off.has(t))) refused.add(op);\n return refused;\n}\n\n/** The catalog tools that send this op. */\nexport function toolsSending(op: string): string[] {\n return TOOL_CATALOG.filter((t) => t.ops.includes(op)).map((t) => t.name);\n}\n\n/**\n * For one tool switched off: the tools still on that keep ALL its ops open (turning it off alone\n * stops nothing until they are off too). Empty when turning it off stops at least one op.\n */\nexport function sharedOpsBlocking(tool: string, disabledTools: readonly string[]): string[] {\n const entry = TOOL_CATALOG.find((t) => t.name === tool);\n if (!entry || entry.ops.length === 0) return [];\n const off = new Set([...disabledTools, tool]);\n const refused = refusedOps([...off]);\n if (entry.ops.some((op) => refused.has(op))) return [];\n const keepers = new Set<string>();\n for (const op of entry.ops) for (const other of TOOL_CATALOG) if (other.name !== tool && !off.has(other.name) && other.ops.includes(op)) keepers.add(other.name);\n return [...keepers].sort();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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