@ai-matrx/desktop-protocol 0.21.79 → 0.21.81
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/CHANGELOG.md +25 -2
- package/dist/{chunk-server-XQQUJENM.js → chunk-server-T5RWEV22.js} +33 -6
- package/dist/chunk-server-T5RWEV22.js.map +1 -0
- package/dist/client.cjs +73 -8
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +26 -2
- package/dist/client.d.ts +26 -2
- package/dist/client.js +46 -4
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +33 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -5
- package/dist/index.d.ts +28 -5
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/{models-C2VdtixP.d.cts → models-BnUudL7J.d.cts} +14 -0
- package/dist/{models-C2VdtixP.d.ts → models-BnUudL7J.d.ts} +14 -0
- package/dist/react.d.cts +7 -0
- package/dist/react.d.ts +7 -0
- package/generated/desktop-protocol.schema.json +25 -1
- package/package.json +2 -2
- package/dist/chunk-server-XQQUJENM.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schema/primitives.ts","../src/schema/errors.ts","../src/schema/frame.ts","../src/schema/envelope.ts","../src/schema/sysinfo.ts","../src/schema/fs.ts","../src/schema/exec.ts","../src/schema/session.ts","../src/schema/relay.ts","../src/schema/models.ts","../src/schema/account.ts","../src/schema/apps.ts","../src/schema/apps-chats.ts","../src/schema/apps-accounts.ts","../src/schema/apps-instances.ts","../src/schema/service.ts","../src/schema/tools.ts","../src/schema/proc.ts","../src/schema/clipboard.ts","../src/schema/git.ts","../src/schema/web.ts","../src/schema/system.ts","../src/schema/screen.ts","../src/schema/window.ts","../src/schema/input.ts","../src/schema/power.ts","../src/schema/diag.ts","../src/schema/resources.ts","../src/schema/stack.ts","../src/schema/audio.ts","../src/schema/fs-watch.ts","../src/schema/exec-job.ts","../src/schema/coding.ts","../src/schema/coding-sessions.ts","../src/schema/browser.ts","../src/schema/net.ts","../src/schema/personal.ts","../src/schema/windows.ts","../src/schema/schedule.ts","../src/schema/notes.ts","../src/schema/documents.ts","../src/schema/registry.ts","../src/versioning.ts","../src/close-policy.ts"],"sourcesContent":["/** @ai-matrx/desktop-protocol — version and primitive schemas. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */\nimport { z } from \"zod\";\nimport { UUID_SHAPE_PATTERN } from \"@ai-matrx/kit/uuid\";\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Version\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const PROTOCOL_MAJOR = 1 as const;\n/**\n * Minor history (same major = compatible; see src/versioning.ts for the rule and FIELDS_SINCE):\n * 1.0 — the first contract.\n * 1.1 — fs.patch per-edit results; /call reports the negotiated version;\n * device status since_ms is null for a device that never connected.\n * 1.2 — the `models` capability (local transcription) and its error reasons (REASONS_SINCE);\n * the `apps` capability (desktop apps, their profiles and usage).\n * 1.3 — the `proc` capability (processes, listening ports, stopping one) and `clipboard`.\n * 1.4 — computer control: `system`, `screen`, `window`, `input`, `power`, `resources`; polled\n * folder watches (fs.watch.start/events/stop) and background jobs (exec.job.*).\n * 1.5 — `coding.history.import_missing`: Claude Code history the platform lacks, imported by the\n * `coding` Python service.\n * 1.6 — the `audio` capability: devices, record a clip to a WAV file, play a file.\n * 1.7 — a window names its owning application and process (WindowInfo `app`, `pid`).\n * 1.8 — `apps.chats.*` / `apps.projects.*`: a coding app's chats, windows, pins and projects, live.\n * 1.9 — chats placed in windows / held, several filed at once, projects renamed / archived / copied;\n * the list says when it is a saved copy being re-read (`updating`) and when it is not live.\n * 1.14 — a chat row carries its original title, where it came from, and the person's rename.\n * 1.15 — a chat row says when the app archived it (typed), and its title source is a closed set.\n * 1.16 — the `stack` capability: the local AI Matrx servers, their logs, errors and history.\n * 1.17 — what is using the computer: resources.activity (jobs, heaviest processes, strain, the\n * last hour), resources.stop_job (a job's whole tree), resources.incidents (slowdown log);\n * a disk names its volume (ResourcesDisk `name`).\n * 1.18 — a local server says what it is using (StackServer `cpu_percent`, `memory_bytes`).\n * 1.19 — apps.projects.to_window: every chat of a project into one window (plan first), taking\n * them off other side windows where safe, optionally grouped in that window's sidebar.\n * 1.20 — the device's error ledger: diag.errors.list, diag.errors.report, event diag.errors.changed.\n * 1.21 — apps.windows.shown: what a window's sidebar draws right now (read-only), e.g. a project's group.\n * 1.22 — git for agents (git.status/diff/log/add/commit/push/pull/branch/stash/clone, core `git`);\n * the web from this computer (web.fetch/scrape/search/fetch_with_browser, the `tools` service).\n * 1.23 — the signed-in person's own agents and Vault (account.agents.list, account.vault.list,\n * account.vault.copy: one field onto this computer's clipboard, never its value on the wire).\n * 1.24 — the System Settings panes' own facts: sysinfo.hardware (model, chip, serial, the OS's\n * name), audio.levels/set_levels (volumes, Mute) and each device's kind, the displays'\n * rotation and refresh rate, power's energy settings and power.history, the keyboard's\n * repeat, fn key and input sources (input.keyboard_settings/set_keyboard_settings),\n * system.open_settings (the OS's own settings page), Spend's last 7 days.\n * 1.25 — each coding account's 5-hour reset (AccountUsage.five_hour_resets_by_ms), so Accounts\n * sorts and filters by when an account is usable again.\n * 1.26 — the coding app's own update: apps.windows.update_state (pending, which windows closed),\n * apps.windows.reopen and apps.windows.update_and_reopen (quit all, install, reopen all).\n * 1.27 — AppsWindowsUpdateStateResult.closed_by_update: the closed windows the update itself quit\n * (the app's log says it went down for the update), apart from ones a person closed.\n * 1.28 — the `browser` capability: the AI Matrx extension as a client (browser.register, result,\n * progress), the Browsers screen (browser.sessions, disconnect, set_enabled, pair_code,\n * pair_reset), agents' browser.call, events browser.invoke / sessions_changed / progress,\n * and the browser_* / awaiting_confirmation error reasons (REASONS_SINCE).\n * 1.29 — one name per chat in every window: apps.chats.titles_check (each chat's right name and\n * the windows where it differs) and apps.chats.titles_push (write it into every copy).\n * 1.30 — Finder's file commands: fs.copy (Duplicate, Copy and Paste), fs.search_index (search\n * \"This Mac\" through the OS's index) and fs.info (Get Info's created, owner, size on disk,\n * item count and flags).\n * 1.31 — language models on this computer (Confidential Chat's engine): models.llm.status,\n * models.llm.install, models.llm.start and models.llm.stop (llama-server, one model at a\n * time; status names the loopback port, never a URL).\n * 1.32 — apps.projects.to_window `pin`: pin the moved chats in the target window, now when it is\n * closed, else queued for its next close (result `pin`: when, pinned, already, queued).\n * 1.33 — apps.chats.titles_check `stale_windows`: windows that keep writing replaced chat names\n * back from memory (rewritten each pass; reloading the window stops it).\n * 1.34 — error reason `tool_disabled_on_device` (AUTH_FORBIDDEN): the person turned the tool\n * that sends this op off for agents on this computer (the per-device tool policy,\n * src/tools/policy.ts). An older peer gets the code and message without the reason.\n * 1.35 — system.open_settings pane `microphone` (Privacy & Security › Microphone; Windows'\n * microphone privacy page): the one place the person allows the microphone. A 1.34 core\n * refuses the pane as INVALID_PARAMS, so a client asks only a 1.35 core for it.\n * 1.36 — apps.projects.to_window `chat_ids` (a batch: exactly these chats of the project, no\n * other) and `take_off_from` (take them off that one side window only, never main). A\n * 1.35 core refuses them as INVALID_PARAMS, so a client sends them only to a 1.36 core.\n * 1.37 — Matrx Local's remaining sidecar tools, served by the core: net.* (interfaces, Wi-Fi,\n * Bluetooth, local devices, mDNS, port scan, download), automation.script, mail.*,\n * messages.* (chats, list, send), contacts.*, calendar.*, reminders.*, photos.*, location.get, windows.*\n * (registry, services, event log, features), schedule.* (an op on an interval),\n * notes.* (Documents/Matrx/Notes), documents.* (PDF text, OCR, image resize, Office files)\n * and entities.* (names, private data); browser.tool_metrics, browser.reset_counters and\n * browser.log (the bridge's diagnostics for every one of the owner's clients). A 1.36 core\n * answers UNKNOWN_OPERATION.\n * 1.38 — code from anywhere: coding.* (the coding engine's sessions, runs, transcripts, preferences\n * and recent rows; start, send, stop, take over, stop elsewhere, Full Download, reconcile;\n * live watches coding.watch / coding.session.watch with events coding.changed,\n * coding.watch_state, coding.item, coding.gap) and session.identify (a client's label,\n * e.g. \"iPhone\", for \"Started from iPhone\"). A 1.37 core answers UNKNOWN_OPERATION.\n * 1.39 — Agents in the desktop app: account.agents.get (one agent's inputs and what it uses),\n * account.agents.runs (one agent's runs, mandate.run_history) and account.agents.favorite\n * (the catalogue's one star write); AccountAgent gains the catalogue's own fields (tags,\n * model_id, access_level, organization_id, origin, is_archived, orchestra), optional. A\n * 1.38 core answers UNKNOWN_OPERATION.\n * 1.40 — the web from this computer becomes Sources: web.scrape `engine` (auto, browser, server)\n * and `land`, web.fetch_with_browser `land`; WebScrapePage and WebBrowserFetchResult\n * `source` (saved, or waiting in this computer's outbox); web.search answers through AI\n * Matrx's own search (never a key on the computer); web.runtime.state/install/remove\n * (the browser), web.outbox.list/retry/discard, web.log.list/clear and the web.log.entry\n * event (never page text), web.research.queue/fetch and the web.progress event. The\n * tools service's web_scrape and web_browser_fetch take their own params (knobs, a spool\n * folder) and hand back each page's parse as a file. A 1.39 core answers\n * UNKNOWN_OPERATION for the new ops and refuses `engine`/`land` as INVALID_PARAMS.\n * 1.41 — Permissions and privacy on every OS: sysinfo.get's permissions gain Matrx Local's\n * remaining kinds (reminders, speech_recognition, messages, mail, wifi) and a `detail`\n * line, and the result gains `requirements` (secret storage, tray, display server, helper\n * programs, Smart App Control, path length); system.open_settings opens each grant's own\n * page by its name. A 1.40 peer is sent neither the new rows nor the new fields; a 1.40\n * core refuses the new panes as INVALID_PARAMS.\n * 1.43 — moving chats to another window says what it did and groups where the person picks:\n * apps.windows.groups (a window's own sidebar groups with their counts, read only);\n * apps.projects.to_window `group_id` / `group_name` (an existing group, or a name) and,\n * for an open window, the grouping queued for its next close (group `when`, `group_id`);\n * result `chats` (one row per chat: copied, moved, already, skipped, its pin and group).\n * A 1.42 core answers UNKNOWN_OPERATION and refuses the new params as INVALID_PARAMS.\n * 1.44 — the person's own Microsoft Outlook, with no Microsoft consent: outlook.status (which\n * Outlook is here and whether it can be scripted), outlook.draft (a draft with recipients,\n * subject, body and attachments, saved to Drafts, never sent), outlook.list, outlook.read.\n * Classic Outlook for Windows only; elsewhere status explains and the rest answer\n * PLATFORM_UNSUPPORTED. A 1.43 core answers UNKNOWN_OPERATION.\n * 1.45 — what this computer can run, and its downloads: sysinfo.hardware `graphics` (each\n * adapter's name, vendor, memory and whether it shares the computer's memory);\n * models.downloads.list (every running model download and every half-done one) and\n * models.downloads.cancel. A 1.44 core omits graphics and answers UNKNOWN_OPERATION.\n * 1.46 — a failed download stays listed with why: DownloadRow `error`. A 1.45 core omits it.\n * 1.49 — local models come from the platform catalog: TextModelId and TranscriptionModelId are\n * string keys (`ModelKey`; every 1.48 id stays valid), and the service op ml.catalog_set\n * hands the ml service the selected files to fetch (URL + SHA-256 each) and the\n * llama-server build. A 1.48 peer still refuses keys outside its enum; the catalog's\n * min_app_version keeps new keys away from it.\n * 1.50 — a window's Remote Control (phone) setting: AppWindowInfo `remote_control` (setting,\n * serving, pending) and apps.windows.set_remote_control (written while the window is\n * closed, else queued for its next close). A 1.49 core omits the field and answers\n * UNKNOWN_OPERATION.\n * 1.52 — Remote Control says when it is wrong: WindowRemoteControl `problem` (a damaged settings\n * file, or why a queued change failed to land) and setting \"unreadable\". A 1.51 peer is\n * never sent `problem`, and a window whose file is damaged simply has no remote_control\n * for it (it would refuse the unknown setting).\n * 1.53 — one account list: CodingProviderStatus `accounts` (the person's saved accounts a run can\n * use, from the computer's engine) and `accountsProblem` (why they could not be listed).\n * A 1.52 peer is never sent either; a 1.52 core omits them (its screen offers the\n * default sign-in alone).\n * 1.54 — CodingProviderStatus `defaultModel.source` \"account\" (the signed-in account's default\n * model, e.g. Codex's). A 1.53 peer is sent \"driver\" instead (its strict enum would refuse\n * the whole coding.providers answer).\n * 1.55 — apps.chats.copy_to_account: chats copied (or moved) to another account in one engine\n * pass with their sidebar groups mirrored by name, pins following, the origin grouped\n * \"Copied to <target>\", and every chat read back (verified, queued, failed); restart\n * \"restart_verify\" closes both windows, applies, verifies and reopens them. A 1.54 core\n * answers UNKNOWN_OPERATION.\n * 1.56 — apps.windows.set_account, apps.windows.forget, apps.chats.probe; and\n * coding.account.continue: a coding session moves to another of the person's accounts\n * (Continue on <account>) and the turn a limit or the person stopped is sent again there,\n * exactly once per client_request_id. A 1.55 core answers UNKNOWN_OPERATION; the remote\n * screen says that computer needs an update.\n * 1.57 — the account a coding record belongs to: `accountId` on a session, a discovered chat, a\n * Recent row and a search hit (absent: the default sign-in); and each sign-in's usage and\n * \"Continue on <account>\" in coding.providers (`usage`, `continueOn` on a provider and on\n * each of its `accounts`, with the account's own `ready`/`lastProblem`/`problem`/`fix`).\n * Optional and stripped for an older peer by forPeer.\n * 1.58 — a person's own model downloaded from a link (Matrx 2 › Models › Find models):\n * `models.llm.install` takes the person's Hugging Face token for that one download\n * (`hf_token`, sent only to Hugging Face hosts); a catalog file's `sha256` may be null (its\n * source publishes none) and the first download hashes it (`hashed` in the result). The app\n * and its ml service ship together, so no peer stripping is needed.\n * 1.59 — the one chat record: ChatRow `session_id`, `app_groups`, `parent`, `prior_sessions`.\n * 1.60 — apps.chats.copy_to_account `restart.reopened`: for each window \"restart_verify\" closed,\n * whether it came back (`ok`) and why not. Optional and stripped for an older peer by\n * forPeer; a 1.59 core omits it (its screen reads the reason text).\n * 1.61 — ChatRow `title_sync`: where the chat's one title shows (synced / not_synced / unsupported,\n * and a note). Optional and stripped for an older peer by forPeer.\n * 1.62 — ChatRow `moved`: the chat's move records (kind move/copy, from, to, at_ms, back_at_ms),\n * ours, never a project name. Optional and stripped for an older peer by forPeer.\n * 1.63 — ChatRow `home` (the instance whose folder holds the chat) and AppInstance `missing`\n * (what an instance record still lacks: account / email / version). Optional and stripped\n * for an older peer by forPeer.\n * 1.64 — an agent's saved versions in the desktop app: account.agents.versions (list, note, age),\n * account.agents.version_diff (one version and the current one, as THE agent diff compares\n * them) and account.agents.restore_version (agx_promote_version). New ops only.\n * 1.65 — CodingTranscriptItem `continued` (\"Continue on <account>\": the line across the transcript\n * where a chat moved from another account). A 1.64 peer's coding.history /\n * coding.transcript.read is sent each as the `notice` it used to be (forPeer).\n * 1.66 — matrx-local's local_window and local_audio contracts on desktop_window and desktop_audio:\n * window.list `app`, window.minimize `mode` (minimize, maximize, restore), audio.record\n * `channels` and `sample_rate` (and both in its result), audio.play `device_id`. Optional\n * fields only.\n * 1.67 — Matrx Local's local_mac_apps and local_windows_ps contracts carried whole: mail.send bcc,\n * mail.accounts mailboxes, messages.list contact / unread_only (+ read, service, chat_name),\n * messages.chats last_message, contacts.search without a query, calendar.list calendars\n * (+ url), reminders.list lists (+ priority, completed_at_ms), photos.search media_type\n * (+ media_type, duration_s), photos.get thumbnail_size, location.get altitude / speed /\n * course, windows.services status, windows.service_control pause / resume,\n * windows.event_log source, windows.features installed_only. Optional fields only.\n * 1.68 — account.agents.restore_version answers `new_version` (the version row the restore saved,\n * agx_promote_version since aidream migration 20261021233500) and `unchanged` (it already\n * matched; nothing saved). Optional fields only.\n * 1.69 — every local language model is listed: models.llm.status `models` carries `title` and\n * `problem` (on this computer but cannot run here, in one line with its fix), lists the\n * models on this computer first, and is bounded at 1024 (was 64); ml.catalog_set `unusable`\n * hands those models to the service. Optional fields only.\n * 1.70 — our Hide for chats: ChatRow `hidden` (the person hid it from Matrx's lists; kept by\n * Matrx, never written into the app) and apps.chats.hide (hide or show one or many chats).\n * An optional field and a new op only.\n * 1.71 — coding-app accounts and instances in the database: apps.instances.list carries `computer`\n * (this computer's name), `elsewhere` (ElsewhereInstance: the person's instances on their\n * other computers, read only) and `shared_problem`; apps.accounts.list carries\n * `shared_problem`. Optional fields only.\n * 1.72 — ours pushed into the apps: ChatRow `pin_sync` (whether our star is the app's pin, per\n * chat), apps.chats.bring_back (one chat home from its move records) and apps.chats.tidy_up\n * (push titles and pins where proven; Claude windows quit and reopened only when asked).\n * An optional field and new ops only.\n * 1.73 — what each coding app keeps besides chats (ledger D9): AppAccount `profile` (plan details,\n * role, tiers, Cursor's subscription: allow-listed fields, never a token), `read_source` and\n * `session_cost_usd` (Claude Code's live-usage file as a no-network reading; AccountUsage\n * `read_source` too), and apps.setup.list (each app's settings, models, plugins, extensions\n * and MCP servers: names, transport and URL or command only). Optional fields and a new op.\n * 1.74 — the models on this computer: models.local.list (every model the ml service holds, text\n * and speech, with its size, folder, what Remove frees and whether it is used in place) and\n * models.local.remove (deletes only files Matrx 2 holds; a link to the person's own file is\n * unlinked, never the file; the running model stops first). Service ops ml.local_list and\n * ml.local_remove. New ops only.\n * 1.75 — no models list is bounded any more: ModelsLlmStatusResult.models (was 1024),\n * MlStatusResult.models (16), MlCatalogSetParams text/transcription/unusable (512/64/512) and\n * ModelsDownloadsListResult.downloads (64), ModelsLocalListResult.models\n * (1024). A bound silently cut off a person's models; every\n * one now arrives. Constraints loosened only.\n * 1.76 — models.llm.chat (stream): an OpenAI chat-completions body in, llama-server's server-sent\n * events out (tool-call deltas included), served by the core's one llama-server home. Error\n * reasons model_not_running and model_server_unreachable. New op and reasons only.\n * 1.77 — CodingServiceCredentials.organization_id (optional): the active organization the coding\n * service sends as X-Organization-Id on every AI Matrx request. New optional field only.\n * 1.78 — our Hide on Going cold and Spend: ColdChat, SpendChat, SpendLive and SpendIdle carry\n * `hidden` (the person hid the chat from Matrx's lists, as ChatRow.hidden). Optional only.\n */\nexport const PROTOCOL_MINOR = 78 as const;\n/** This package's version as the wire spells it (\"major.minor\"): hello, welcome, relay status. */\nexport const PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}` as const;\n/** \"major.minor\". Same major = compatible (minor adds optional fields/ops only). */\nexport const ProtocolVersion = z\n .string()\n .regex(/^[1-9][0-9]{0,2}\\.[0-9]{1,3}$/);\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Primitives\n// ─────────────────────────────────────────────────────────────────────────────\n\n/** Client-generated request id, unique per session. */\nexport const RequestId = z\n .string()\n .min(1)\n .max(64)\n .regex(/^[A-Za-z0-9_-]+$/);\n\n/** Long-lived resource handle minted by the core: \"<kind>_<base62>\" (pty_…, watch_…). */\nexport const ResourceId = z\n .string()\n .regex(/^(pty|watch)_[A-Za-z0-9]{16,40}$/);\n\n/**\n * = app_instances.id. A plain pattern, NOT z.uuid(): z.uuid() emits `format: uuid` + `pattern`,\n * which datamodel-codegen renders as `Annotated[UUID, Field(pattern=...)]` — a model Pydantic can\n * never validate (\"Unable to apply constraint 'pattern' … of type 'uuid'\"). generate.ts now\n * refuses format+pattern on one node so this class cannot come back.\n */\nexport const DeviceId = z\n .string()\n .regex(UUID_SHAPE_PATTERN);\n\n/**\n * Absolute, normalized path: forward slashes on every OS, NFC. POSIX \"/...\" or Windows \"C:/...\".\n * Normalization happens once, in the fs owner (SPEC §9); the wire never carries backslashes.\n */\nexport const AbsPath = z\n .string()\n .min(1)\n .max(4096)\n .regex(/^(\\/|[A-Za-z]:\\/)[^\\\\\\u0000]*$/);\n\n/** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */\nexport const u32 = z.int().min(0).max(4_294_967_295);\nexport const nonNegInt = z.int().min(0);\n/** Unix epoch milliseconds. */\nexport const epochMs = z.int().min(0);\n\n// Inferred (output) types — same name as the schema, so `FsEntry` is both the validator and its type.\nexport type ProtocolVersion = z.output<typeof ProtocolVersion>;\nexport type RequestId = z.output<typeof RequestId>;\nexport type ResourceId = z.output<typeof ResourceId>;\nexport type DeviceId = z.output<typeof DeviceId>;\nexport type AbsPath = z.output<typeof AbsPath>;\n","/** @ai-matrx/desktop-protocol — error model (SPEC §5). Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */\nimport { z } from \"zod\";\nimport type { ErrorCodeName, ErrorData, ErrorReasonName } from \"../types\";\nimport { AbsPath, ProtocolVersion, nonNegInt } from \"./primitives\";\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Errors (SPEC §5, plus the five additions marked NEW)\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const ErrorCode = z\n .enum([\n \"AUTH_REQUIRED\",\n \"AUTH_INVALID\",\n \"AUTH_EXPIRED\",\n \"AUTH_FORBIDDEN\", // signed in, but not this device's owner\n \"AUTH_DEVICE_REVOKED\", // kill switch\n \"PERMISSION_DENIED_OS\",\n \"NOT_FOUND\",\n \"CONFLICT\",\n \"INVALID_PARAMS\",\n \"RESOURCE_BUSY\",\n \"RESOURCE_GONE\",\n \"CANCELLED\",\n \"TIMEOUT\",\n \"PLATFORM_UNSUPPORTED\",\n \"RATE_LIMITED\",\n \"INTERNAL\",\n \"PROTOCOL_VERSION_UNSUPPORTED\", // NEW: hello refused, carries data.upgrade\n \"PROTOCOL_ERROR\", // NEW: malformed envelope/frame, credit overrun, unknown sid\n \"UNKNOWN_OPERATION\", // NEW: cap.op not served by this core version\n \"DEVICE_OFFLINE\", // NEW: relay has no live device socket (retryable)\n \"PAYLOAD_TOO_LARGE\", // NEW: message or frame above limits.max_*_bytes\n ]);\n\n/** Machine reason under a code, so clients branch without parsing messages. */\nexport const ErrorReason = z\n .enum([\n \"not_a_directory\",\n \"is_a_directory\",\n \"directory_not_empty\",\n \"already_exists\",\n \"stale_write\", // fs.write if_match_mtime_ms mismatch → CONFLICT\n \"binary_content\", // utf8 read of non-UTF-8 bytes → INVALID_PARAMS\n \"not_utf8_boundary\",\n \"patch_no_match\",\n \"patch_ambiguous\",\n \"resource_exited\",\n \"resource_expired\",\n \"control_taken\", // another client of the same user took control\n \"window_exhausted\",\n // 1.2 (REASONS_SINCE): the `models` capability and its supervised Python service\n \"runtime_not_installed\", // NOT_FOUND: install the inference runtime first (models.install)\n \"model_not_installed\", // NOT_FOUND: that model's weights are not on the device\n \"unsupported_media\", // INVALID_PARAMS: the file is not audio or video the decoder reads\n \"download_failed\", // install could not fetch a package or model file\n \"service_starting\", // RESOURCE_BUSY (retryable): the service is starting or restarting\n \"service_restarted\", // RESOURCE_GONE: the service died while this request ran\n \"service_failed\", // INTERNAL: the service could not be started (see models.status)\n // 1.28 (REASONS_SINCE): the `browser` capability (the AI Matrx extension as Matrx 2's client)\n \"browser_not_connected\", // NOT_FOUND: no browser with the extension is connected (or none routable)\n \"browser_ambiguous\", // CONFLICT: several browsers are connected and none was named\n \"browser_account_mismatch\", // AUTH_FORBIDDEN: the named browser is signed in to another account\n \"browser_connection_off\", // AUTH_FORBIDDEN: the person turned Browser connection off\n \"awaiting_confirmation\", // TIMEOUT: the person did not answer the browser's confirmation in time\n // 1.34 (REASONS_SINCE): the per-device tool policy (src/tools/policy.ts)\n \"tool_disabled_on_device\", // AUTH_FORBIDDEN: the person turned this tool off for agents on this computer (Agents › Tools)\n // 1.76 (REASONS_SINCE): models.llm.chat\n \"model_not_running\", // NOT_FOUND (nothing runs) or RESOURCE_BUSY (another model runs): start this model first\n \"model_server_unreachable\", // RESOURCE_GONE (retryable): llama-server did not answer on this computer\n ]);\n\n/**\n * One edit fs.patch could not apply — the daemon's `edits_failed[]` entry, verbatim: the edit's\n * index and the daemon's own reason text (\"old_text not found\", or \"old_text matches N locations —\n * add context or set replace_all=True\").\n */\nexport const FsPatchEditFailure = z.strictObject({ edit_index: nonNegInt, reason: z.string().max(300) });\n\nexport const ProtocolErrorBody = z\n .strictObject({\n code: ErrorCode,\n message: z.string().max(300), // short, human, never a stack trace or a token\n retryable: z.boolean(),\n data: z\n .strictObject({\n reason: ErrorReason.optional(),\n cap: z.string().max(32).optional(),\n op: z.string().max(64).optional(),\n path: AbsPath.optional(),\n settings_url: z.string().max(512).optional(), // PERMISSION_DENIED_OS deep link\n retry_after_ms: nonNegInt.optional(),\n limit_bytes: nonNegInt.optional(),\n /** fs.patch when every edit failed (CONFLICT, patch_no_match / patch_ambiguous): the daemon's 422 `failures`. */\n edits_failed: z.array(FsPatchEditFailure).max(256).optional(),\n upgrade: z\n .strictObject({\n min_version: ProtocolVersion,\n max_version: ProtocolVersion,\n download_url: z.url().optional(),\n })\n .optional(),\n })\n .optional(),\n });\n\n\n// Compile-time proof the zod-free twins in ../types.ts equal these schemas.\ntype Same<A, B> = [A] extends [B] ? ([B] extends [A] ? true : false) : false;\ntype AssertTrue<T extends true> = T;\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ntype ErrorTwinCheck = [\n AssertTrue<Same<z.infer<typeof ErrorCode>, ErrorCodeName>>,\n AssertTrue<Same<z.infer<typeof ErrorReason>, ErrorReasonName>>,\n AssertTrue<Same<NonNullable<z.input<typeof ProtocolErrorBody>[\"data\"]>, ErrorData>>,\n];\n\n// Inferred (output) types — same name as the schema, so `FsEntry` is both the validator and its type.\nexport type ErrorCode = z.output<typeof ErrorCode>;\nexport type ErrorReason = z.output<typeof ErrorReason>;\nexport type ProtocolErrorBody = z.output<typeof ProtocolErrorBody>;\nexport type FsPatchEditFailure = z.output<typeof FsPatchEditFailure>;\n","/** @ai-matrx/desktop-protocol — binary frame header and flow-control constants. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */\nimport { z } from \"zod\";\nimport { FRAME_VERSION } from \"../frame\";\nimport type { FrameHeader as FrameHeaderShape } from \"../frame\";\nimport { u32 } from \"./primitives\";\n\n/** Zod twin of the codec's FrameHeader (layout documented in src/frame.ts) — for $defs and Pydantic. */\nexport const FrameHeader = z\n .strictObject({\n version: z.literal(FRAME_VERSION),\n flags: z.int().min(0).max(3),\n channel: z.union([z.literal(0), z.literal(1), z.literal(2), z.literal(3), z.literal(255)]),\n cid: u32,\n sid: u32,\n seq: u32,\n });\nexport type FrameHeader = z.infer<typeof FrameHeader>;\n\n/** Relay ↔ device hop: the header of a frame carrying one JSON envelope. cid 0 = broadcast (device → relay). */\nexport const RelayHopEnvelopeHeader = z\n .strictObject({\n version: z.literal(FRAME_VERSION),\n flags: z.literal(0),\n channel: z.literal(255),\n cid: u32,\n sid: z.literal(0),\n seq: z.literal(0),\n });\nexport type RelayHopEnvelopeHeader = z.infer<typeof RelayHopEnvelopeHeader>;\n\n/** Relay ↔ device hop: the header of a connection-end frame (FIN, empty payload; see connectionEndFrame). */\nexport const RelayHopConnectionEnd = z\n .strictObject({\n version: z.literal(FRAME_VERSION),\n flags: z.literal(1),\n channel: z.literal(255),\n cid: z.int().min(1).max(4_294_967_295),\n sid: z.literal(0),\n seq: z.literal(0),\n });\nexport type RelayHopConnectionEnd = z.infer<typeof RelayHopConnectionEnd>;\n\n// Compile-time proof the zod twin and the zod-free codec type are the same shape.\ntype Same<A, B> = [A] extends [B] ? ([B] extends [A] ? true : false) : false;\ntype AssertTrue<T extends true> = T;\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ntype FrameHeaderTwinCheck = AssertTrue<Same<z.infer<typeof FrameHeader>, FrameHeaderShape>>;\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Flow control (credits)\n//\n// The RECEIVER of a byte stream grants the SENDER a window in payload bytes. The sender may have at\n// most `window` un-credited payload bytes in flight per sid; it pauses its source (node-pty\n// pause(), file read loop) at zero and resumes on credit. Initial window = request's\n// `window_bytes` or limits.default_window_bytes. The receiver sends credit{n} after it has\n// CONSUMED n bytes (xterm write callback fired, file chunk persisted). Overrun → PROTOCOL_ERROR\n// and the stream is ended. Credits are end-to-end (client↔core), so the relay holds at most\n// sum(windows) per device and never buffers without bound. Unary JSON ops are not credited.\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const DEFAULT_WINDOW_BYTES = 262_144 as const; // 256 KiB\nexport const DEFAULT_MAX_FRAME_PAYLOAD_BYTES = 65_536 as const; // 64 KiB\nexport const DEFAULT_MAX_MESSAGE_BYTES = 8_388_608 as const; // 8 MiB JSON message cap\n\n","/** @ai-matrx/desktop-protocol — the JSON envelope (SPEC §4). Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */\nimport { z } from \"zod\";\nimport { ProtocolErrorBody } from \"./errors\";\nimport { DeviceId, ProtocolVersion, RequestId, ResourceId, epochMs, u32 } from \"./primitives\";\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Client types and hello\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const ClientType = z\n .enum([\"screen\", \"web\", \"extension\", \"server\", \"test\"]);\n\nexport const Limits = z\n .strictObject({\n max_message_bytes: z.int().min(65_536),\n max_frame_payload_bytes: z.int().min(4096),\n default_window_bytes: z.int().min(4096),\n max_streams_per_client: z.int().min(1),\n max_resources_per_user: z.int().min(1),\n });\n\nexport const OpDescriptor = z\n .strictObject({ cap: z.string().max(32), op: z.string().max(64), since: ProtocolVersion });\n\nexport const Welcome = z\n .strictObject({\n protocol_version: ProtocolVersion, // negotiated = min(client, core) within the same major\n session_id: z.string().min(8).max(64),\n client_id: z.string().min(8).max(64), // this connection's identity in the Session Manager\n device_id: DeviceId,\n device_name: z.string().max(128),\n app_version: z.string().max(32),\n platform: z.enum([\"darwin\", \"win32\", \"linux\"]),\n ops: z.array(OpDescriptor),\n limits: Limits,\n server_time_ms: epochMs,\n });\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Envelope (SPEC §4). Text WS messages carry exactly one of these as JSON.\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const HelloMsg = z\n .strictObject({\n type: z.literal(\"hello\"),\n id: RequestId, // answered by response{id, result: Welcome} or error{id}\n protocolVersion: ProtocolVersion,\n clientType: ClientType,\n clientVersion: z.string().min(1).max(32),\n });\n\nexport const RequestMsg = z\n .strictObject({\n id: RequestId,\n type: z.literal(\"request\"),\n cap: z.string().min(1).max(32),\n op: z.string().min(1).max(64),\n params: z.unknown(), // validated by the Router against OPS[cap.op].params — once, there\n });\n\nexport const ResponseMsg = z\n .strictObject({ id: RequestId, type: z.literal(\"response\"), result: z.unknown() });\n\nexport const ErrorMsg = z\n .strictObject({ id: RequestId, type: z.literal(\"error\"), error: ProtocolErrorBody });\n\nexport const StreamMeta = z\n .discriminatedUnion(\"kind\", [\n /** Binds request id → numeric sid; binary frames for this stream follow. */\n z.strictObject({\n kind: z.literal(\"open\"),\n sid: u32,\n window_bytes: z.int().min(4096),\n resource_id: ResourceId.optional(),\n }),\n /** Frames after this (channel SNAPSHOT) are a serialized screen; live DATA resumes after. */\n z.strictObject({ kind: z.literal(\"snapshot\"), cols: z.int().min(1), rows: z.int().min(1) }),\n /** Frames [from_seq, to_seq] are gone from the ring; a snapshot follows. */\n z.strictObject({ kind: z.literal(\"gap\"), from_seq: u32, to_seq: u32 }),\n ]);\n\nexport const StreamMsg = z\n .strictObject({ id: RequestId, type: z.literal(\"stream\"), seq: u32, meta: StreamMeta });\n\nexport const EndReason = z\n .enum([\"completed\", \"cancelled\", \"detached\", \"resource_exited\", \"error\"]);\n\nexport const EndMsg = z\n .strictObject({ id: RequestId, type: z.literal(\"end\"), seq: u32, reason: EndReason.optional() });\n\nexport const CancelMsg = z\n .strictObject({ id: RequestId, type: z.literal(\"cancel\") });\n\n/** Grant n more payload bytes for the stream opened by request `id` (either direction). */\nexport const CreditMsg = z\n .strictObject({ id: RequestId, type: z.literal(\"credit\"), n: z.int().min(1).max(2_147_483_647) });\n\nexport const EventMsg = z\n .strictObject({\n type: z.literal(\"event\"),\n cap: z.string().min(1).max(32),\n name: z.string().min(1).max(64),\n payload: z.unknown(), // validated against EVENTS[cap.name]\n resourceId: ResourceId.optional(),\n });\n\n/** Client↔relay only; the relay consumes these and never forwards them to the core. */\nexport const RelayMsg = z\n .discriminatedUnion(\"op\", [\n /** Fresh access token before the current one expires (relay closes 4008 at exp + 60 s). */\n z.strictObject({ type: z.literal(\"relay\"), op: z.literal(\"reauth\"), token: z.string().min(16).max(8192) }),\n ]);\n\n/**\n * Heartbeat. Sent as these EXACT bytes; the relay answers via the Durable Object\n * setWebSocketAutoResponse pair, so a heartbeat never wakes a hibernated object.\n * Interval 25 s (device and clients); 2 missed pongs = reconnect.\n */\nexport const PING_TEXT = '{\"type\":\"ping\"}' as const;\nexport const PONG_TEXT = '{\"type\":\"pong\"}' as const;\n\n/**\n * Every WebSocket (device, phone, browser, localhost) offers this subprotocol; the access token\n * rides beside it as `${BEARER_PREFIX}<token>`, never in the URL. The server echoes only SUBPROTOCOL.\n */\nexport const SUBPROTOCOL = \"matrx.v1\" as const;\nexport const BEARER_PREFIX = \"bearer.\" as const;\n\nexport const ClientToCoreMsg = z\n .discriminatedUnion(\"type\", [HelloMsg, RequestMsg, CancelMsg, CreditMsg]);\n\nexport const CoreToClientMsg = z\n .discriminatedUnion(\"type\", [ResponseMsg, ErrorMsg, StreamMsg, EndMsg, CreditMsg, EventMsg]);\n\n// ─────────────────────────────────────────────────────────────────────────────\n// WebSocket close codes (relay and localhost transport alike)\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const CloseCode = {\n NORMAL: 1000,\n GOING_AWAY: 1001, // app quit; relay: the device was silent for 75 s — reconnect\n /** Never sent by anyone: what a socket reports when it drops without a close frame. A relay\n * deploy (every Durable Object restarts) arrives as this — reconnect immediately. */\n ABNORMAL: 1006,\n /** Relay → clients: the device (re)connected, so the core session they spoke to is gone —\n * reconnect, hello, and reattach with since_seq. */\n DEVICE_RECONNECTED: 1012,\n TRY_AGAIN_LATER: 1013, // relay: signing keys or the device registry unreachable — retry\n AUTH_INVALID: 4001,\n AUTH_FORBIDDEN: 4003,\n DEVICE_NOT_FOUND: 4004,\n AUTH_EXPIRED: 4008, // no reauth before exp + 60 s\n REPLACED: 4009, // a newer device socket for the same device took over\n DEVICE_REVOKED: 4010, // kill switch — do NOT reconnect\n PROTOCOL_ERROR: 4400,\n UPGRADE_REQUIRED: 4426,\n} as const;\n\n/** Every close code above, as a schema (so Python sees the same table). */\nexport const CloseCodeValue = z.literal([1000, 1001, 1006, 1012, 1013, 4001, 4003, 4004, 4008, 4009, 4010, 4400, 4426]);\nexport type CloseCodeValue = z.output<typeof CloseCodeValue>;\n\n// Compile-time proof the schema lists exactly the CloseCode table.\ntype SameCodes<A, B> = [A] extends [B] ? ([B] extends [A] ? true : false) : false;\ntype AssertCodes<T extends true> = T;\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ntype CloseCodeTableCheck = AssertCodes<SameCodes<CloseCodeValue, (typeof CloseCode)[keyof typeof CloseCode]>>;\n\n// Inferred (output) types — same name as the schema, so `FsEntry` is both the validator and its type.\nexport type ClientType = z.output<typeof ClientType>;\nexport type Limits = z.output<typeof Limits>;\nexport type OpDescriptor = z.output<typeof OpDescriptor>;\nexport type Welcome = z.output<typeof Welcome>;\nexport type HelloMsg = z.output<typeof HelloMsg>;\nexport type RequestMsg = z.output<typeof RequestMsg>;\nexport type ResponseMsg = z.output<typeof ResponseMsg>;\nexport type ErrorMsg = z.output<typeof ErrorMsg>;\nexport type StreamMeta = z.output<typeof StreamMeta>;\nexport type StreamMsg = z.output<typeof StreamMsg>;\nexport type EndReason = z.output<typeof EndReason>;\nexport type EndMsg = z.output<typeof EndMsg>;\nexport type CancelMsg = z.output<typeof CancelMsg>;\nexport type CreditMsg = z.output<typeof CreditMsg>;\nexport type EventMsg = z.output<typeof EventMsg>;\nexport type RelayMsg = z.output<typeof RelayMsg>;\nexport type ClientToCoreMsg = z.output<typeof ClientToCoreMsg>;\nexport type CoreToClientMsg = z.output<typeof CoreToClientMsg>;\n","/** @ai-matrx/desktop-protocol — cap sysinfo. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */\nimport { z } from \"zod\";\nimport { AbsPath, DeviceId, ProtocolVersion, nonNegInt } from \"./primitives\";\n\n// ─────────────────────────────────────────────────────────────────────────────\n// sysinfo\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const OsPermissionName = z\n .enum([\n \"full_disk_access\",\n \"accessibility\",\n \"screen_recording\",\n \"microphone\",\n \"camera\",\n \"automation\",\n \"contacts\",\n \"calendars\",\n \"photos\",\n \"location\",\n \"local_network\",\n \"bluetooth\",\n \"notifications\",\n // (1.41) Matrx Local's remaining kinds, checked on every OS (its permissions checker): a peer\n // older than 1.41 is never sent these rows (versioning.ts PERMISSIONS_SINCE).\n \"reminders\",\n \"speech_recognition\",\n \"messages\",\n \"mail\",\n \"wifi\",\n ]);\n\n/** The state of one OS grant or one requirement. */\nexport const OsGrantState = z.enum([\"granted\", \"denied\", \"not_determined\", \"not_applicable\"]);\n\n/**\n * (1.41) What Matrx 2 needs from the computer beyond its privacy grants: secret storage (the OS's\n * keychain for the sign-in), the tray (Linux: a StatusNotifier host), the display server (Linux),\n * the helper programs its tools run (Linux), Smart App Control (Windows 11: blocks an unsigned app)\n * and the path length (Windows' 260-character limit). `granted` met, `denied` missing.\n */\nexport const OsRequirementName = z.enum([\"secret_storage\", \"tray\", \"display_server\", \"helper_programs\", \"smart_app_control\", \"path_length\"]);\n\nexport const SysinfoGetParams = z.strictObject({});\nexport const SysinfoGetResult = z\n .strictObject({\n device_id: DeviceId,\n device_name: z.string().max(128),\n hostname: z.string().max(255),\n platform: z.enum([\"darwin\", \"win32\", \"linux\"]),\n os_version: z.string().max(64),\n arch: z.enum([\"arm64\", \"x64\"]),\n app_version: z.string().max(32),\n protocol_version: ProtocolVersion,\n user: z.strictObject({ username: z.string().max(128), shell: z.string().max(512) }),\n paths: z.strictObject({\n home: AbsPath,\n desktop: AbsPath,\n documents: AbsPath,\n downloads: AbsPath,\n app_data: AbsPath,\n temp: AbsPath,\n }),\n cpu: z.strictObject({ model: z.string().max(128), cores: z.int().min(1) }),\n memory: z.strictObject({ total_bytes: nonNegInt, free_bytes: nonNegInt }),\n uptime_seconds: nonNegInt,\n on_battery: z.boolean().nullable(),\n sleep_prevented: z.boolean(), // true while any remote session holds the power blocker\n permissions: z.array(\n z.strictObject({\n name: OsPermissionName,\n state: z.enum([\"granted\", \"denied\", \"not_determined\", \"not_applicable\"]),\n settings_url: z.string().max(512).nullable(),\n /** (1.41) One short fact when the state alone does not say it (\"No camera\", \"Bluetooth is off\"); absent when there is none. */\n detail: z.string().max(256).optional(),\n }),\n ),\n /** (1.41) The requirements beyond the grants (OsRequirementName), each read when asked. */\n requirements: z\n .array(\n z.strictObject({\n name: OsRequirementName,\n state: OsGrantState,\n settings_url: z.string().max(512).nullable(),\n detail: z.string().max(256).nullable(),\n }),\n )\n .optional(),\n });\n\n// (1.24) The machine as About This Mac names it: the marketing model, chip, serial and the OS's own\n// name. Read once per call (a second or so on macOS); every field null where the OS does not say.\n/** (1.45) One graphics adapter. `memory_bytes` is its own memory (VRAM), null when the OS does not\n * say; `unified` is true when it shares the computer's memory (Apple silicon, most integrated GPUs). */\nexport const SysinfoGraphicsAdapter = z.strictObject({\n name: z.string().max(128),\n vendor: z.string().max(64).nullable(),\n memory_bytes: nonNegInt.nullable(),\n /** True when the OS gives only an approximate size (Windows AdapterRAM, capped at 4 GB). */\n memory_approximate: z.boolean(),\n unified: z.boolean(),\n});\nexport const SysinfoHardwareParams = z.strictObject({});\nexport const SysinfoHardwareResult = z.strictObject({\n /** \"Mac Studio\", \"MacBook Pro\", \"ThinkPad X1 Carbon\". */\n model_name: z.string().max(128).nullable(),\n /** What tells two of that model apart: \"M3 Ultra, 2025\", \"14-inch, Nov 2023\". */\n model_detail: z.string().max(128).nullable(),\n /** \"Mac15,14\", the vendor's model number. */\n model_identifier: z.string().max(128).nullable(),\n /** \"Apple M3 Ultra\", \"Intel Core i7-1185G7\". */\n chip: z.string().max(128).nullable(),\n serial_number: z.string().max(128).nullable(),\n /** The OS's own name with its release name: \"macOS Tahoe\", \"Windows 11 Pro\", \"Ubuntu\". */\n os_name: z.string().max(64).nullable(),\n /** \"26.6.2\". */\n os_version: z.string().max(64).nullable(),\n os_build: z.string().max(64).nullable(),\n /** (1.45) Every graphics adapter, as System Information's Graphics/Displays lists them. Optional:\n * a core older than 1.45 omits it. */\n graphics: z.array(SysinfoGraphicsAdapter).max(16).optional(),\n});\n\n// Inferred (output) types — same name as the schema, so `FsEntry` is both the validator and its type.\nexport type OsPermissionName = z.output<typeof OsPermissionName>;\nexport type OsGrantState = z.output<typeof OsGrantState>;\nexport type OsRequirementName = z.output<typeof OsRequirementName>;\nexport type SysinfoGetParams = z.output<typeof SysinfoGetParams>;\nexport type SysinfoGraphicsAdapter = z.output<typeof SysinfoGraphicsAdapter>;\nexport type SysinfoGetResult = z.output<typeof SysinfoGetResult>;\nexport type SysinfoHardwareParams = z.output<typeof SysinfoHardwareParams>;\nexport type SysinfoHardwareResult = z.output<typeof SysinfoHardwareResult>;\n","/** @ai-matrx/desktop-protocol — cap fs. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */\nimport { z } from \"zod\";\nimport { FsPatchEditFailure } from \"./errors\";\nimport { AbsPath, ResourceId, epochMs, nonNegInt } from \"./primitives\";\n\n// ─────────────────────────────────────────────────────────────────────────────\n// fs — mirrors matrx_agent daemon /fs/* field names (SPEC §6.1)\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const FsKind = z.enum([\"file\", \"dir\", \"symlink\"]);\n\n/**\n * = daemon get_stat_dict(), field for field (SPEC 6.1): what /fs/stat and every /fs/list entry\n * answer in the cloud sandbox. Never follows symlinks; `target` is the fully resolved target.\n */\nexport const FsEntry = z\n .strictObject({\n name: z.string().max(1024),\n path: AbsPath,\n kind: FsKind,\n size: nonNegInt,\n mtime: z.number().min(0), // seconds, float\n mode: z.int().min(0).max(0o7777),\n target: AbsPath.nullable(),\n });\n\nexport const FsListParams = z\n .strictObject({\n path: AbsPath,\n recursive: z.boolean().default(false),\n depth: z.int().min(1).max(32).default(1),\n pattern: z.string().max(256).optional(), // glob on name\n limit: z.int().min(1).max(5000).default(1000),\n page_token: z.string().max(256).optional(),\n // Desktop additions; their defaults ARE the daemon's behavior: dotfiles listed, siblings in\n // binary (byte) order of name, depth-first.\n show_hidden: z.boolean().default(true),\n sort: z.enum([\"name\", \"mtime\", \"size\", \"kind\"]).default(\"name\"),\n });\nexport const FsListResult = z\n .strictObject({\n entries: z.array(FsEntry),\n truncated: z.boolean(),\n next_page_token: z.string().max(256).nullable(),\n scanned: nonNegInt,\n });\n\nexport const FsStatParams = z.strictObject({ path: AbsPath });\nexport const FsStatResult = FsEntry;\n\nexport const FsEncoding = z.enum([\"utf8\", \"base64\"]);\n\n/** Bounded read. offset = byte offset; limit = chars (utf8) or bytes (base64), as the daemon. */\nexport const FsReadParams = z\n .strictObject({\n path: AbsPath,\n encoding: FsEncoding.default(\"utf8\"),\n offset: nonNegInt.default(0),\n limit: z.int().min(1).max(4_194_304).default(262_144),\n });\nexport const FsReadResult = z\n .strictObject({\n content: z.string(),\n encoding: FsEncoding,\n size: nonNegInt,\n offset: nonNegInt,\n next_offset: nonNegInt,\n truncated: z.boolean(),\n mime: z.string().max(128).nullable(),\n mtime_ms: epochMs, // pass back as if_match_mtime_ms to guard a later write\n });\n\n/** Whole-file or ranged download as binary frames (channel DATA, credited). */\nexport const FsReadStreamParams = z\n .strictObject({\n path: AbsPath,\n offset: nonNegInt.default(0),\n length: nonNegInt.optional(), // absent = to EOF\n window_bytes: z.int().min(4096).max(16_777_216).optional(),\n });\n/** Unary result arrives first (size/mime), then stream{open} + DATA frames + end. */\nexport const FsReadStreamResult = z\n .strictObject({ size: nonNegInt, mime: z.string().max(128).nullable(), mtime_ms: epochMs });\n\nexport const FsWriteParams = z\n .strictObject({\n path: AbsPath,\n content: z.string().max(5_592_406), // ≤ 4 MiB of bytes after base64 decode\n encoding: FsEncoding.default(\"utf8\"),\n mode: z.int().min(0).max(0o7777).optional(),\n create_parents: z.boolean().default(false),\n /** Optimistic concurrency: CONFLICT/stale_write if the file changed since this mtime. */\n if_match_mtime_ms: epochMs.optional(),\n /** Refuse to replace an existing file (CONFLICT/already_exists). */\n exclusive: z.boolean().default(false),\n });\n/** Writes are atomic: temp file in the same directory + rename (daemon parity). */\nexport const FsWriteResult = z\n .strictObject({ path: AbsPath, size: nonNegInt, mtime_ms: epochMs, created: z.boolean() });\n\nexport const FsMkdirParams = z\n .strictObject({ path: AbsPath, parents: z.boolean().default(false) });\nexport const FsMkdirResult = z\n .strictObject({ path: AbsPath, created: z.boolean() });\n\n/** = daemon RenameRequest (/fs/rename). */\nexport const FsMoveParams = z\n .strictObject({ from_path: AbsPath, to_path: AbsPath, overwrite: z.boolean().default(false) });\nexport const FsMoveResult = z\n .strictObject({ from_path: AbsPath, to_path: AbsPath });\n\n/**\n * Copy a file or a whole folder (Finder's Duplicate, Copy and Paste, ⌥-drag). Desktop only (1.30):\n * the daemon has no copy. Timestamps and permission bits are kept, symlinks are copied as links.\n * A name already at `to_path` is CONFLICT/already_exists unless `overwrite`; replacing a folder\n * with a file (or the reverse) is CONFLICT/is_a_directory; copying a folder into itself is\n * INVALID_PARAMS (no reason). A replaced item goes to the Trash first, as Finder's Replace.\n */\nexport const FsCopyParams = z\n .strictObject({ from_path: AbsPath, to_path: AbsPath, overwrite: z.boolean().default(false) });\nexport const FsCopyResult = z\n .strictObject({ from_path: AbsPath, to_path: AbsPath });\n\n/**\n * Delete. Default goes to the OS Trash (Finder/Explorer semantics: undoable from the phone's\n * \"Undo\" toast via fs.move back). to_trash:false is a permanent delete — the daemon's behavior,\n * used by agents through _sandbox_proxy.\n */\nexport const FsDeleteParams = z\n .strictObject({\n path: AbsPath,\n recursive: z.boolean().default(false),\n to_trash: z.boolean().default(true),\n });\nexport const FsDeleteResult = z\n .strictObject({ deleted: z.literal(true), trashed_to: AbsPath.nullable() });\n\n/** Opens a watch resource; changes arrive as event fs.changed with resourceId. */\nexport const FsWatchParams = z\n .strictObject({\n path: AbsPath,\n recursive: z.boolean().default(false),\n ignore: z.array(z.string().max(256)).max(64).default([]),\n debounce_ms: z.int().min(0).max(5000).default(50),\n });\nexport const FsWatchResult = z\n .strictObject({ resource_id: ResourceId, path: AbsPath });\n\n// — Required by lane F (SPEC §6.1 parity sequence and every existing _sandbox_proxy call) —\n\n/** = daemon EditChunk / PatchRequest (/fs/patch). */\nexport const FsPatchParams = z\n .strictObject({\n path: AbsPath,\n edits: z\n .array(\n z.strictObject({\n old_text: z.string(),\n new_text: z.string(),\n replace_all: z.boolean().default(false),\n }),\n )\n .min(1)\n .max(256),\n create_if_missing: z.boolean().default(false),\n });\n/** One edit fs.patch applied — the daemon's `edits_applied[]` entry, verbatim. */\nexport const FsPatchEditApplied = z.strictObject({\n edit_index: nonNegInt,\n mode: z.enum([\"create\", \"replace\", \"replace_all\"]),\n /** Present for replace_all only, as the daemon sends it. */\n matches_replaced: nonNegInt.optional(),\n});\n\n/**\n * = the daemon's /fs/patch answer per edit: edits apply in order, each sees the previous result; an\n * edit whose old_text is missing, or matches more than once without replace_all, is skipped and\n * listed in edits_failed with the daemon's reason; the file is written when at least one applied.\n * (Every edit failing is a CONFLICT whose data.edits_failed lists them — the daemon's 422.)\n */\nexport const FsPatchResult = z.strictObject({\n path: AbsPath,\n applied: nonNegInt,\n size: nonNegInt,\n mtime_ms: epochMs,\n /** Since 1.1 (FIELDS_SINCE): a 1.0 app sends only `applied`. Always sent to a ≥1.1 peer. */\n edits_applied: z.array(FsPatchEditApplied).max(256).optional(),\n /** Since 1.1 (FIELDS_SINCE). */\n edits_failed: z.array(FsPatchEditFailure).max(256).optional(),\n});\n\n/** = daemon SearchPathRequest (/search/paths). */\nexport const FsSearchPathsParams = z\n .strictObject({\n pattern: z.string().min(1).max(512),\n cwd: AbsPath,\n hidden: z.boolean().default(false),\n max_results: z.int().min(1).max(5000).default(100),\n });\n/**\n * = the daemon's /search/paths answer (fd 8.3.1 in the sandbox image): paths RELATIVE to `cwd`, each\n * prefixed \"./\", sorted, cut to max_results. No truncation flag (the daemon has none).\n */\nexport const FsSearchPathsResult = z\n .strictObject({ paths: z.array(z.string().min(3).max(4096).regex(/^\\.\\/[^\\\\\\u0000]+$/)) });\n\n/** = daemon SearchContentRequest (/search/content). */\nexport const FsSearchContentParams = z\n .strictObject({\n query: z.string().min(1).max(1024),\n cwd: AbsPath,\n regex: z.boolean().default(true),\n case_sensitive: z.boolean().default(false),\n include: z.array(z.string().max(256)).max(64).optional(),\n exclude: z.array(z.string().max(256)).max(64).optional(),\n max_results: z.int().min(1).max(5000).default(100),\n });\n/**\n * = the daemon's /search/content answer (ripgrep 13 --json run in `cwd`): `path` RELATIVE to `cwd`\n * with no \"./\"; `lines` is the matching line with its newline; submatches are ripgrep's, byte\n * offsets within the line. max_results is per FILE (rg -m), as the daemon passes it. No truncation\n * flag (the daemon has none).\n */\nexport const FsSearchContentResult = z\n .strictObject({\n results: z.array(\n z.strictObject({\n path: z.string().min(1).max(4096).regex(/^[^/\\\\\\u0000][^\\\\\\u0000]*$/),\n lines: z.string(),\n line_number: z.int().min(1),\n submatches: z.array(\n z.strictObject({ match: z.strictObject({ text: z.string() }), start: nonNegInt, end: nonNegInt }),\n ),\n }),\n ),\n });\n\n/**\n * Search the computer's own index by name (Finder's \"This Mac\", 1.30): Spotlight on macOS; elsewhere,\n * or when the index answers nothing usable, a bounded walk of `scope` (or the home folder). `source`\n * says which one answered. Entries are FsEntry (never following links), most relevant first.\n */\nexport const FsSearchIndexParams = z\n .strictObject({\n query: z.string().min(1).max(256),\n /** Only under this folder; absent: the whole computer (the walk: the home folder). */\n scope: AbsPath.optional(),\n max_results: z.int().min(1).max(1000).default(200),\n });\nexport const FsSearchIndexResult = z\n .strictObject({\n entries: z.array(FsEntry).max(1000),\n truncated: z.boolean(),\n source: z.enum([\"index\", \"walk\"]),\n });\n\n/**\n * Finder's Get Info facts beyond fs.stat (1.30): when it was made, who owns it, its size on disk\n * (a folder's whole tree, bounded), how many items a folder holds, and its flags. null = the OS\n * does not say (or the bound was hit before the folder's size was known).\n */\nexport const FsInfoParams = z.strictObject({ path: AbsPath });\nexport const FsInfoResult = z\n .strictObject({\n entry: FsEntry,\n created: z.number().min(0).nullable(), // seconds, float\n owner: z.string().max(256).nullable(),\n group: z.string().max(256).nullable(),\n /** A file's logical size, or a folder's whole tree (null when the walk was cut short). */\n total_size: nonNegInt.nullable(),\n /** Bytes the OS uses for it on disk (blocks), same bound as total_size. */\n size_on_disk: nonNegInt.nullable(),\n /** A folder's own children (not its tree); null for a file. */\n items: nonNegInt.nullable(),\n hidden: z.boolean(),\n /** Finder's Locked (macOS uchg); null where the OS has no such flag. */\n locked: z.boolean().nullable(),\n /** The volume holding it refuses writes (a disk image, a read-only share). */\n read_only: z.boolean(),\n });\n\nexport const FsChange = z\n .strictObject({\n type: z.enum([\"created\", \"modified\", \"deleted\", \"moved\"]),\n path: AbsPath,\n to_path: AbsPath.optional(),\n kind: z.enum([\"file\", \"dir\", \"symlink\", \"unknown\"]),\n });\nexport const FsChangedEvent = z\n .strictObject({ changes: z.array(FsChange).min(1).max(1000), overflow: z.boolean() }); // overflow:true = events dropped; client re-lists\n\n// Inferred (output) types — same name as the schema, so `FsEntry` is both the validator and its type.\nexport type FsKind = z.output<typeof FsKind>;\nexport type FsEntry = z.output<typeof FsEntry>;\nexport type FsListParams = z.output<typeof FsListParams>;\nexport type FsListResult = z.output<typeof FsListResult>;\nexport type FsStatParams = z.output<typeof FsStatParams>;\nexport type FsStatResult = z.output<typeof FsStatResult>;\nexport type FsEncoding = z.output<typeof FsEncoding>;\nexport type FsReadParams = z.output<typeof FsReadParams>;\nexport type FsReadResult = z.output<typeof FsReadResult>;\nexport type FsReadStreamParams = z.output<typeof FsReadStreamParams>;\nexport type FsReadStreamResult = z.output<typeof FsReadStreamResult>;\nexport type FsWriteParams = z.output<typeof FsWriteParams>;\nexport type FsWriteResult = z.output<typeof FsWriteResult>;\nexport type FsMkdirParams = z.output<typeof FsMkdirParams>;\nexport type FsMkdirResult = z.output<typeof FsMkdirResult>;\nexport type FsMoveParams = z.output<typeof FsMoveParams>;\nexport type FsMoveResult = z.output<typeof FsMoveResult>;\nexport type FsCopyParams = z.output<typeof FsCopyParams>;\nexport type FsCopyResult = z.output<typeof FsCopyResult>;\nexport type FsInfoParams = z.output<typeof FsInfoParams>;\nexport type FsInfoResult = z.output<typeof FsInfoResult>;\nexport type FsSearchIndexParams = z.output<typeof FsSearchIndexParams>;\nexport type FsSearchIndexResult = z.output<typeof FsSearchIndexResult>;\nexport type FsDeleteParams = z.output<typeof FsDeleteParams>;\nexport type FsDeleteResult = z.output<typeof FsDeleteResult>;\nexport type FsWatchParams = z.output<typeof FsWatchParams>;\nexport type FsWatchResult = z.output<typeof FsWatchResult>;\nexport type FsPatchParams = z.output<typeof FsPatchParams>;\nexport type FsPatchResult = z.output<typeof FsPatchResult>;\nexport type FsPatchEditApplied = z.output<typeof FsPatchEditApplied>;\nexport type FsSearchPathsParams = z.output<typeof FsSearchPathsParams>;\nexport type FsSearchPathsResult = z.output<typeof FsSearchPathsResult>;\nexport type FsSearchContentParams = z.output<typeof FsSearchContentParams>;\nexport type FsSearchContentResult = z.output<typeof FsSearchContentResult>;\nexport type FsChange = z.output<typeof FsChange>;\nexport type FsChangedEvent = z.output<typeof FsChangedEvent>;\n","/** @ai-matrx/desktop-protocol — cap exec. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */\nimport { z } from \"zod\";\nimport { AbsPath, ResourceId, epochMs, nonNegInt, u32 } from \"./primitives\";\n\n// ─────────────────────────────────────────────────────────────────────────────\n// exec — PTY sessions (resources) + one-shot run\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const Signal = z\n .enum([\"SIGINT\", \"SIGTERM\", \"SIGKILL\", \"SIGHUP\", \"SIGQUIT\", \"SIGTSTP\", \"SIGCONT\", \"SIGUSR1\", \"SIGUSR2\"]); // Windows: SIGINT→Ctrl-C event, SIGTERM/SIGKILL/SIGHUP→terminate, others PLATFORM_UNSUPPORTED\n\nconst cols = z.int().min(2).max(1000);\nconst rows = z.int().min(1).max(500);\n\n/**\n * Start a PTY. Response result = PtyInfo; the same request id then carries the output stream:\n * stream{meta:{kind:\"open\",sid,resource_id}} → DATA frames (credited) → end{reason}.\n * Input goes as STDIN frames on that sid (cheap per keystroke) or via exec.pty.write.\n */\nexport const ExecPtyStartParams = z\n .strictObject({\n cols,\n rows,\n cwd: AbsPath.optional(), // default: home\n shell: z.string().max(512).optional(), // default: user's login shell (PowerShell on Windows)\n args: z.array(z.string().max(4096)).max(64).optional(),\n env: z.record(z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(128), z.string().max(32_768)).optional(),\n name: z.string().max(64).optional(), // tab label\n window_bytes: z.int().min(4096).max(16_777_216).optional(),\n });\n\nexport const PtyInfo = z\n .strictObject({\n resource_id: ResourceId,\n pid: z.int().min(1),\n shell: z.string().max(512),\n cwd: AbsPath, // live, from OSC 7 / process cwd\n title: z.string().max(256),\n name: z.string().max(64).nullable(),\n cols,\n rows,\n state: z.enum([\"running\", \"exited\"]),\n exit_code: z.int().nullable(),\n exit_signal: Signal.nullable(),\n last_seq: u32,\n created_at_ms: epochMs,\n controller_client_id: z.string().max(64).nullable(), // null = orphaned (in grace period)\n attached_clients: nonNegInt,\n orphan_expires_at_ms: epochMs.nullable(),\n });\n\nexport const ExecPtyStartResult = PtyInfo;\n\nexport const ExecPtyWriteParams = z\n .strictObject({ resource_id: ResourceId, data: z.string().min(1).max(65_536) });\nexport const ExecPtyWriteResult = z.strictObject({ written: nonNegInt });\n\nexport const ExecPtyResizeParams = z\n .strictObject({ resource_id: ResourceId, cols, rows });\nexport const ExecPtyResizeResult = z.strictObject({ cols, rows });\n\n/** Delivered to the PTY's foreground process group (daemon parity: tcgetpgrp + killpg). */\nexport const ExecPtySignalParams = z\n .strictObject({ resource_id: ResourceId, signal: Signal });\nexport const ExecPtySignalResult = z.strictObject({ delivered: z.boolean() });\n\n/** SIGHUP the session, SIGKILL after grace_ms, reap, free the resource. Idempotent. */\nexport const ExecPtyKillParams = z\n .strictObject({ resource_id: ResourceId, grace_ms: z.int().min(0).max(30_000).default(2000) });\nexport const ExecPtyKillResult = z\n .strictObject({ exit_code: z.int().nullable(), exit_signal: Signal.nullable() });\n\nexport const ExecListParams = z.strictObject({});\nexport const ExecListResult = z.strictObject({ sessions: z.array(PtyInfo) });\n\n/**\n * One-shot command (agents, via _sandbox_proxy → /exec). Timeout ENFORCED (exit 124, daemon\n * convention). cwd is sticky per cwd_key: a later run with the same key and no cwd starts where\n * the last one ended (SPEC §6.1: \"cd sub && pwd\" then \"pwd\").\n */\nexport const ExecRunParams = z\n .strictObject({\n command: z.string().min(1).max(131_072),\n cwd: AbsPath.optional(),\n cwd_key: z.string().max(128).optional(),\n env: z.record(z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(128), z.string().max(32_768)).optional(),\n stdin: z.string().max(1_048_576).optional(),\n timeout: z.int().min(1).max(3600).default(60), // seconds, daemon parity\n max_output_bytes: z.int().min(1024).max(8_388_608).default(1_048_576),\n });\nexport const ExecRunResult = z\n .strictObject({\n exit_code: z.int(),\n stdout: z.string(),\n stderr: z.string(),\n cwd: AbsPath,\n duration_ms: nonNegInt,\n timed_out: z.boolean(),\n output_truncated: z.boolean(),\n });\n\nexport const ExecExitedEvent = z\n .strictObject({ exit_code: z.int().nullable(), exit_signal: Signal.nullable() });\nexport const ExecTitleEvent = z.strictObject({ title: z.string().max(256) });\nexport const ExecCwdEvent = z.strictObject({ cwd: AbsPath });\n\n// Inferred (output) types — same name as the schema, so `FsEntry` is both the validator and its type.\nexport type Signal = z.output<typeof Signal>;\nexport type ExecPtyStartParams = z.output<typeof ExecPtyStartParams>;\nexport type PtyInfo = z.output<typeof PtyInfo>;\nexport type ExecPtyStartResult = z.output<typeof ExecPtyStartResult>;\nexport type ExecPtyWriteParams = z.output<typeof ExecPtyWriteParams>;\nexport type ExecPtyWriteResult = z.output<typeof ExecPtyWriteResult>;\nexport type ExecPtyResizeParams = z.output<typeof ExecPtyResizeParams>;\nexport type ExecPtyResizeResult = z.output<typeof ExecPtyResizeResult>;\nexport type ExecPtySignalParams = z.output<typeof ExecPtySignalParams>;\nexport type ExecPtySignalResult = z.output<typeof ExecPtySignalResult>;\nexport type ExecPtyKillParams = z.output<typeof ExecPtyKillParams>;\nexport type ExecPtyKillResult = z.output<typeof ExecPtyKillResult>;\nexport type ExecListParams = z.output<typeof ExecListParams>;\nexport type ExecListResult = z.output<typeof ExecListResult>;\nexport type ExecRunParams = z.output<typeof ExecRunParams>;\nexport type ExecRunResult = z.output<typeof ExecRunResult>;\nexport type ExecExitedEvent = z.output<typeof ExecExitedEvent>;\nexport type ExecTitleEvent = z.output<typeof ExecTitleEvent>;\nexport type ExecCwdEvent = z.output<typeof ExecCwdEvent>;\n","/** @ai-matrx/desktop-protocol — cap session. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */\nimport { z } from \"zod\";\nimport { PtyInfo } from \"./exec\";\nimport { AbsPath, ResourceId, epochMs, u32 } from \"./primitives\";\n\n// ─────────────────────────────────────────────────────────────────────────────\n// session — generic resource ownership (SPEC §3.3). One attach/detach for EVERY resource kind.\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Reattach after a drop. mode \"control\" by the same user takes control (previous controller is\n * demoted to read_only and gets session.control_changed). since_seq = last seq the client\n * rendered: frames (since_seq, last_seq] are replayed from the ring with the REPLAY flag; if they\n * have left the ring, stream{gap} + stream{snapshot} + SNAPSHOT frames come first.\n * Response = PtyInfo|FsWatchResult-shaped ResourceInfo; then the stream continues on a new sid.\n */\nexport const SessionAttachParams = z\n .strictObject({\n resource_id: ResourceId,\n mode: z.enum([\"control\", \"read_only\"]).default(\"control\"),\n since_seq: u32.optional(),\n window_bytes: z.int().min(4096).max(16_777_216).optional(),\n });\n\nexport const ResourceInfo = z\n .discriminatedUnion(\"kind\", [\n z.strictObject({ kind: z.literal(\"pty\"), pty: PtyInfo }),\n z.strictObject({\n kind: z.literal(\"watch\"),\n resource_id: ResourceId,\n path: AbsPath,\n orphan_expires_at_ms: epochMs.nullable(),\n }),\n ]);\nexport const SessionAttachResult = ResourceInfo;\n\n/** Leave the resource running (orphan grace starts if no other client controls it). */\nexport const SessionDetachParams = z.strictObject({ resource_id: ResourceId });\nexport const SessionDetachResult = z\n .strictObject({ orphan_expires_at_ms: epochMs.nullable() });\n\n/** Free a resource through its owner's cancel path (watch → unwatch; pty → exec.pty.kill). */\nexport const SessionReleaseParams = z.strictObject({ resource_id: ResourceId });\nexport const SessionReleaseResult = z.strictObject({ released: z.literal(true) });\n\nexport const SessionListParams = z.strictObject({});\nexport const SessionListResult = z.strictObject({ resources: z.array(ResourceInfo) });\n\nexport const SessionControlChangedEvent = z\n .strictObject({ controller_client_id: z.string().max(64).nullable(), your_mode: z.enum([\"control\", \"read_only\"]) });\n\n// Inferred (output) types — same name as the schema, so `FsEntry` is both the validator and its type.\nexport type SessionAttachParams = z.output<typeof SessionAttachParams>;\nexport type ResourceInfo = z.output<typeof ResourceInfo>;\nexport type SessionAttachResult = z.output<typeof SessionAttachResult>;\nexport type SessionDetachParams = z.output<typeof SessionDetachParams>;\nexport type SessionDetachResult = z.output<typeof SessionDetachResult>;\nexport type SessionReleaseParams = z.output<typeof SessionReleaseParams>;\nexport type SessionReleaseResult = z.output<typeof SessionReleaseResult>;\nexport type SessionListParams = z.output<typeof SessionListParams>;\nexport type SessionListResult = z.output<typeof SessionListResult>;\nexport type SessionControlChangedEvent = z.output<typeof SessionControlChangedEvent>;\n","/** @ai-matrx/desktop-protocol — cap relay. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */\nimport { z } from \"zod\";\nimport { ProtocolErrorBody } from \"./errors\";\nimport { ProtocolVersion, epochMs } from \"./primitives\";\n\n// ─────────────────────────────────────────────────────────────────────────────\n// relay — events the relay itself emits to clients (cap \"relay\")\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const RelayDeviceStatusEvent = z\n .strictObject({\n online: z.boolean(),\n /**\n * When the device last went online/offline; null = it has never connected (since 1.1 —\n * NULL_SINCE: a 1.0 reader is sent 0, its old meaning).\n */\n since_ms: epochMs.nullable(),\n app_version: z.string().max(32).nullable(),\n protocol_version: ProtocolVersion.nullable(),\n });\nexport const RelayAuthExpiringEvent = z\n .strictObject({ expires_at_ms: epochMs });\n\n/** HTTP POST https://relay.matrxserver.com/v1/devices/{device_id}/call — unary ops only (lane F). */\nexport const RelayCallRequest = z\n .strictObject({\n cap: z.string().min(1).max(32),\n op: z.string().min(1).max(64),\n params: z.unknown(),\n timeout_ms: z.int().min(100).max(3_700_000).default(70_000),\n });\n/**\n * The caller of /call announces the newest protocol it reads in this request header; the relay\n * includes fields newer than 1.0 only when the announced version knows them (src/versioning.ts).\n */\nexport const RELAY_CALL_VERSION_HEADER = \"x-matrx-protocol-version\" as const;\n\nexport const RelayCallResponse = z\n .discriminatedUnion(\"ok\", [\n z.strictObject({\n ok: z.literal(true),\n result: z.unknown(),\n /** Since 1.1: the version the device negotiated for this call (its welcome). */\n protocol_version: ProtocolVersion.optional(),\n }),\n z.strictObject({\n ok: z.literal(false),\n error: ProtocolErrorBody,\n /** Since 1.1, as above (absent when the device never answered hello). */\n protocol_version: ProtocolVersion.optional(),\n }),\n ]);\n\n/**\n * How the relay runs one /call on the device: a fresh cid (its own connection) carrying exactly\n * RelayCallHello then RelayCallEnvelope, answered on that cid by response/error with id \"call\"\n * (an error on id \"hello\" also ends it), then a connection-end frame. A stream answer is refused.\n */\nexport const RELAY_CALL_HELLO_ID = \"hello\" as const;\nexport const RELAY_CALL_REQUEST_ID = \"call\" as const;\n\nexport const RelayCallHello = z\n .strictObject({\n type: z.literal(\"hello\"),\n id: z.literal(RELAY_CALL_HELLO_ID),\n protocolVersion: ProtocolVersion,\n clientType: z.literal(\"server\"),\n clientVersion: z.string().min(1).max(32),\n });\nexport const RelayCallEnvelope = z\n .strictObject({\n id: z.literal(RELAY_CALL_REQUEST_ID),\n type: z.literal(\"request\"),\n cap: z.string().min(1).max(32),\n op: z.string().min(1).max(64),\n params: z.unknown(),\n });\n\n/** HTTP GET /v1/devices/{device_id}/status (owner JWT). */\nexport const RelayStatusResponse = RelayDeviceStatusEvent;\n\n// Inferred (output) types — same name as the schema, so `FsEntry` is both the validator and its type.\nexport type RelayDeviceStatusEvent = z.output<typeof RelayDeviceStatusEvent>;\nexport type RelayAuthExpiringEvent = z.output<typeof RelayAuthExpiringEvent>;\nexport type RelayCallRequest = z.output<typeof RelayCallRequest>;\nexport type RelayCallResponse = z.output<typeof RelayCallResponse>;\nexport type RelayStatusResponse = z.output<typeof RelayStatusResponse>;\nexport type RelayCallHello = z.output<typeof RelayCallHello>;\nexport type RelayCallEnvelope = z.output<typeof RelayCallEnvelope>;\n","/**\n * @ai-matrx/desktop-protocol — the `models` capability (SPEC §6): local AI models on the device,\n * served by Matrx 2's `ml` Python service (SPEC §3.10). Schema source: lint-enforced rules in\n * scripts/check-schema-source.mjs.\n *\n * Two contracts share these shapes, both generated from this file (SPEC P11):\n * - the Router ops `models.*` (every transport: relay, localhost, extension, the app's screen);\n * - the internal service ops `ml.*` between the desktop core and the Python service\n * (src/schema/service.ts, `SERVICES` in registry.ts). A forwarded op uses the SAME named\n * schema on both hops, so the two can never disagree.\n */\nimport { z } from \"zod\";\nimport { AbsPath, RequestId, nonNegInt } from \"./primitives\";\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Transcription (local Whisper)\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * (1.49) A downloadable model's key in the platform catalog (ai.model_definition name, optionally\n * `/<variant key>`): `llama-3.2-3b`, `llama-3.2-3b/q4_k_m`. Was a closed enum until 1.48; every 1.48\n * id is still a valid key (a bare model name means its default variant). The catalog gives every\n * later variant a `min_app_version` at or above the first string-key app, so an older peer never\n * receives a key its enum refuses.\n */\nexport const ModelKey = z\n .string()\n .min(1)\n .max(128)\n .regex(/^[a-z0-9][a-z0-9._-]*(\\/[a-z0-9][a-z0-9._-]*)?$/);\n\n/** A Whisper model's catalog key (1.49: a string key; 1.48 sizes tiny/base/small/large-v3-turbo stay valid). */\nexport const TranscriptionModelId = ModelKey;\n\n/** The heavy runtime (inference packages) is installed on first use, never shipped in the app. */\nexport const MlRuntimeState = z.enum([\"not_installed\", \"installing\", \"installed\", \"failed\"]);\n\n/** `packages`: the locked inference wheels; `model`: one model's weights; `verifying`: hashes and a load test. */\nexport const MlInstallPhase = z.enum([\"packages\", \"model\", \"verifying\"]);\n\nexport const MlInstallProgress = z.strictObject({\n phase: MlInstallPhase,\n /** What is being fetched now: a package or a model file name. */\n item: z.string().max(200),\n bytes_done: nonNegInt,\n /** Null while the total is not known yet. */\n bytes_total: nonNegInt.nullable(),\n});\n\nexport const TranscriptionModelInfo = z.strictObject({\n id: TranscriptionModelId,\n /** Download size of the weights. */\n size_bytes: nonNegInt,\n multilingual: z.boolean(),\n installed: z.boolean(),\n});\n\nexport const TranscriptSegment = z.strictObject({\n start_s: z.number().min(0),\n end_s: z.number().min(0),\n text: z.string().max(4000),\n});\n\n/** What the `ml` service itself reports (the core adds the supervisor's view in ModelsStatusResult). */\nexport const MlStatusParams = z.strictObject({});\nexport const MlStatusResult = z.strictObject({\n runtime: MlRuntimeState,\n /** Non-null while runtime or model files are being installed. */\n install: MlInstallProgress.nullable(),\n /** The last install failure, one human line; null when the last install succeeded or none ran. */\n error: z.string().max(300).nullable(),\n /** Where inference runs once the runtime is installed: `cuda` only when a usable GPU is present. */\n accelerator: z.enum([\"cpu\", \"cuda\"]),\n /** Every transcription model in the catalog (1.74: unbounded; a bound here silently dropped models past 16). */\n models: z.array(TranscriptionModelInfo),\n default_model: TranscriptionModelId,\n});\n\n/** Install the runtime (if missing) and one model's weights (default: the default model). */\nexport const ModelsInstallParams = z.strictObject({ model: TranscriptionModelId.optional() });\nexport const ModelsInstallResult = z.strictObject({ model: TranscriptionModelId, elapsed_ms: nonNegInt });\n\n/**\n * Transcribe an audio or video file on the device. Any format the bundled decoder reads (wav, mp3,\n * m4a, webm/opus, mp4…). `language` is ISO 639-1; omitted = detect. `translate` = into English.\n */\nexport const ModelsTranscribeParams = z.strictObject({\n path: AbsPath,\n model: TranscriptionModelId.optional(),\n language: z\n .string()\n .regex(/^[a-z]{2,3}$/)\n .optional(),\n task: z.enum([\"transcribe\", \"translate\"]).default(\"transcribe\"),\n});\nexport const ModelsTranscribeResult = z.strictObject({\n text: z.string().max(400_000),\n language: z.string().max(8),\n language_probability: z.number().min(0).max(1),\n duration_s: z.number().min(0),\n model: TranscriptionModelId,\n segments: z.array(TranscriptSegment).max(20_000),\n elapsed_ms: nonNegInt,\n});\n\n/** A progress report while `ml.install` / `ml.transcribe` runs. */\nexport const MlProgress = z.strictObject({\n kind: z.enum([\"install\", \"transcribe\"]),\n /** 0–1 when known (transcribe: audio covered so far; install: bytes so far). */\n fraction: z.number().min(0).max(1).nullable(),\n install: MlInstallProgress.nullable(),\n /** The segment just transcribed (transcribe only): text appears as it is recognized. */\n segment: TranscriptSegment.nullable(),\n});\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Language models (llama-server on this computer): Confidential Chat's engine\n// ─────────────────────────────────────────────────────────────────────────────\n\n/** A language model's catalog key (1.49: a string key; the ten 1.48 ids stay valid). */\nexport const TextModelId = ModelKey;\n\nexport const TextModelInfo = z.strictObject({\n id: TextModelId,\n /** Download size of the weights. */\n size_bytes: nonNegInt,\n installed: z.boolean(),\n /** (1.69) The name to show, for a model on this computer no catalog names (one that cannot run here). */\n title: z.string().min(1).max(200).optional(),\n /**\n * (1.69) Absent: it runs here. Else it is on this computer but cannot run, said in one plain\n * line with its fix (\"It needs about 39 GB of memory and this computer lets models use 24 GB.\",\n * \"Part 2 of 3 is incomplete: …\"). Listed so no model the person has ever vanishes; never startable.\n */\n problem: z.string().min(1).max(300).optional(),\n});\n\n/** (1.69) A language model on this computer that cannot run here (ml.catalog_set `unusable`): listed with why, never started. */\nexport const UnusableTextModel = z.strictObject({\n key: TextModelId,\n title: z.string().min(1).max(200),\n size_bytes: nonNegInt,\n problem: z.string().min(1).max(300),\n});\n\n/** The model server's process: one model loaded at a time. */\nexport const LlmServerState = z.enum([\"stopped\", \"starting\", \"running\", \"failed\"]);\n\n/**\n * The model that answers now and the loopback port it listens on. Never a URL: the only caller that\n * talks to it (the app's own main process) builds http://127.0.0.1:<port> itself, so no status\n * payload can choose where text goes.\n */\nexport const LlmRunning = z.strictObject({\n id: TextModelId,\n port: z.int().min(1024).max(65535),\n /** (1.48) What the service actually applied, echoed so the app can attest \"read and applied\". Optional until the service sends them. */\n context_length: z.int().min(512).max(131_072).optional(),\n gpu_layers: z.int().min(-1).max(999).optional(),\n threads: z.int().min(1).max(512).optional(),\n});\n\nexport const ModelsLlmStatusParams = z.strictObject({});\nexport const ModelsLlmStatusResult = z.strictObject({\n state: LlmServerState,\n /**\n * Every language model: (1.69) the ones on this computer first (installed, then those that cannot run\n * here, each with its `problem`), then the rest of the catalog. Every one: unbounded since 1.74\n * (64 until 1.69, 1024 until 1.74; a bound silently cut off models).\n */\n models: z.array(TextModelInfo),\n running: LlmRunning.nullable(),\n /** The model being loaded while `state` is \"starting\". */\n starting: TextModelId.nullable(),\n /** Non-null while the server program or a model's weights are being downloaded. */\n install: MlInstallProgress.nullable(),\n /** Why the last start or download failed, one human line; null otherwise. */\n error: z.string().max(300).nullable(),\n});\n\n/** Download the model server program (if missing) and one model's weights. Progress: models.progress. */\nexport const ModelsLlmInstallParams = z.strictObject({\n model: TextModelId,\n /** (1.58) The person's own Hugging Face token for this download (gated/private files): sent only to Hugging Face hosts, never stored or logged. */\n hf_token: z.string().min(8).max(512).optional(),\n});\nexport const ModelsLlmInstallResult = z.strictObject({\n model: TextModelId,\n elapsed_ms: nonNegInt,\n /** (1.58) path -> SHA-256 of every file whose catalog sha256 was null, hashed on this first download. */\n hashed: z.record(z.string().max(512), z.string().regex(/^[0-9a-f]{64}$/)).optional(),\n});\n\n/** Load one downloaded model (stopping any other). Resolves once the server answers its health check. */\nexport const ModelsLlmStartParams = z.strictObject({\n model: TextModelId,\n /** Tokens of context, from the knob desktop.models/context_length. Omitted today means the service's fixed 4096 (optional until callers send it). */\n context_length: z.int().min(512).max(131_072).optional(),\n /** (1.48) Layers offloaded to the GPU; -1 = all. From the knob desktop.models/gpu_layers. */\n gpu_layers: z.int().min(-1).max(999).optional(),\n /** (1.48) CPU threads, computed by the app from the knobs. */\n threads: z.int().min(1).max(512).optional(),\n /** (1.48) Seconds to wait for the model to load, computed by the app from the knobs. */\n load_timeout_s: z.int().min(10).max(3600).optional(),\n});\nexport const ModelsLlmStartResult = z.strictObject({ running: LlmRunning, elapsed_ms: nonNegInt });\n\nexport const ModelsLlmStopParams = z.strictObject({});\nexport const ModelsLlmStopResult = z.strictObject({ stopped: z.boolean() });\n\n/**\n * (1.76) models.llm.chat (stream): one chat completion from the language model running on this\n * computer, through llama-server's OpenAI-compatible endpoint. `body` is an OpenAI chat-completions\n * body (messages, tools, tool_choice, sampling...); the core forwards it as sent with `stream: true`\n * and its `model` set to the local model. The unary result arrives first, then the stream's DATA\n * frames carry llama-server's server-sent events byte for byte (`data: {...}` chunks, tool-call\n * deltas included, `data: [DONE]` last). Cancel stops the generation.\n */\nexport const ModelsLlmChatParams = z.strictObject({\n model: TextModelId,\n body: z.record(z.string().max(200), z.unknown()),\n /** Start the model first when nothing runs (a `models` progress event says so); a different model running is never stopped. */\n start_if_stopped: z.boolean().optional(),\n window_bytes: z.int().min(4096).max(16_777_216).optional(),\n});\n/** What answers: the model, and llama-server's content type (text/event-stream). */\nexport const ModelsLlmChatResult = z.strictObject({ model: TextModelId, content_type: z.string().max(128) });\n\n// (1.49) The catalog the service runs from: the app resolves the platform catalog (live → cache →\n// generated snapshot), selects each model's variant for this computer and hands the service exactly\n// the files to fetch, each with its pinned URL and SHA-256. The service holds no model list of its own.\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const Sha256Hex = z.string().regex(/^[0-9a-f]{64}$/);\n\nexport const CatalogFile = z.strictObject({\n /** Path inside the model's folder (the artifact's path_in_repo). */\n path: z.string().min(1).max(512),\n /** The pinned https URL it is downloaded from. */\n url: z.string().url().max(2048),\n size_bytes: nonNegInt,\n /**\n * The file's SHA-256; (1.58) null when its source publishes none (a small non-LFS file on Hugging\n * Face): the first download hashes it and reports it in `models.llm.install`'s `hashed`.\n */\n sha256: Sha256Hex.nullable(),\n /** weights, weights_shard, mmproj, config, tokenizer, … (ai.model_artifact.role). */\n role: z.string().max(32),\n});\n\nexport const CatalogModelEntry = z.strictObject({\n /** The key callers name this model by (the 1.48 id for a seeded model). */\n key: ModelKey,\n /** The selected variant's key (`q4_k_m`, `ct2`). */\n variant: z.string().min(1).max(64),\n /** The upstream revision (or the variant id when there is none): a change re-downloads. */\n revision: z.string().min(1).max(64),\n multilingual: z.boolean(),\n /** Exactly the files this computer fetches for this model: never more, never fewer. */\n files: z.array(CatalogFile).min(1).max(256),\n});\n\n/** The llama-server build for this computer, from ai.runtime_build. */\nexport const LlamaServerBuild = z.strictObject({\n version: z.string().min(1).max(32),\n url: z.string().url().max(2048),\n size_bytes: nonNegInt,\n sha256: Sha256Hex,\n});\n\nexport const MlCatalogSetParams = z.strictObject({\n /** (1.74) Unbounded, like every models list: a catalog or a person's own models are never cut off. */\n text: z.array(CatalogModelEntry),\n transcription: z.array(CatalogModelEntry),\n /** Null where the catalog has no build for this os/arch (installs then say so). */\n llama_server: LlamaServerBuild.nullable(),\n /** The knob desktop.models/default_transcription_model; null when the knob could not be read (a transcribe naming no model then says so). */\n default_transcription: TranscriptionModelId.nullable(),\n /** When the catalog was last changed (catalog_updated_at), for the service's log. */\n catalog_updated_at: z.string().max(40),\n /** (1.69) Language models on this computer that cannot run here, each with its one-line reason: models.llm.status lists them. */\n unusable: z.array(UnusableTextModel).optional(),\n});\nexport const MlCatalogSetResult = z.strictObject({ text: nonNegInt, transcription: nonNegInt });\n\n// (1.45) Downloads: every model download the ml service is running now, and the ones a crash or a\n// cancel left half done (a `.partial` on disk). The service's own job table IS the queue.\n// ─────────────────────────────────────────────────────────────────────────────\n\n/** What a download fetches: a speech model, a language model, or a runtime (speech runtime, model server program). */\nexport const DownloadKind = z.enum([\"speech_model\", \"text_model\", \"runtime\"]);\n\nexport const DownloadRow = z.strictObject({\n /** The job's key in the service: \"model:base\", \"llm:smollm2-135m\", \"llm-server\", \"runtime\". */\n key: z.string().max(64),\n kind: DownloadKind,\n /** The model id for a model download; null for a runtime. */\n model: z.string().max(64).nullable(),\n /** \"running\" while it downloads; \"stopped\" when only its half-done file is left (Resume re-runs the install). */\n state: z.enum([\"running\", \"stopped\"]),\n /** What it is doing now (\"download\", \"verify\", …); null when stopped. */\n step: z.string().max(32).nullable(),\n bytes_done: nonNegInt,\n bytes_total: nonNegInt.nullable(),\n fraction: z.number().min(0).max(1).nullable(),\n /** Unix ms; null when stopped. */\n started_at: nonNegInt.nullable(),\n /** The folder it downloads into (Show in Finder). */\n path: z.string().max(1024).nullable(),\n /** (1.46) Why it stopped, when it failed (one human line); absent otherwise. */\n error: z.string().max(300).optional(),\n});\n\nexport const ModelsDownloadsListParams = z.strictObject({});\nexport const ModelsDownloadsListResult = z.strictObject({ downloads: z.array(DownloadRow) });\n\n/** Cancel one running download (every caller waiting on it gets CANCELED); its half-done file stays for Resume. */\nexport const ModelsDownloadsCancelParams = z.strictObject({ key: z.string().max(64) });\nexport const ModelsDownloadsCancelResult = z.strictObject({ cancelled: z.boolean() });\n\n// (1.74) The models on this computer: every model the ml service holds (language models, its own\n// adopted ones included, and speech models), each with its size, where it lives and what a Remove frees.\n// ─────────────────────────────────────────────────────────────────────────────\n\n/** Which of the service's stores holds it: language models (`llm/`) or speech models (`models/`). */\nexport const LocalModelKind = z.enum([\"text\", \"speech\"]);\n\nexport const LocalModelRow = z.strictObject({\n kind: LocalModelKind,\n model: ModelKey,\n /** Its folder in the service's store. */\n path: z.string().max(1024),\n /** Every file of the model, as installed. */\n size_bytes: nonNegInt,\n /** What Remove frees: the files only Matrx 2 holds. A file linked from the person's own folder frees nothing. */\n freed_bytes: nonNegInt,\n /** True when any file is a link to a file elsewhere (used in place): Remove then never deletes that file. */\n in_place: z.boolean(),\n /** The folder the person's files stay in (in place), when the service can tell; null otherwise. */\n source: z.string().max(1024).nullable(),\n /** The language model the server runs now (Remove stops it first). */\n running: z.boolean(),\n});\n\nexport const ModelsLocalListParams = z.strictObject({});\n/** (1.75) Every model on this computer, unbounded like every models list. */\nexport const ModelsLocalListResult = z.strictObject({ models: z.array(LocalModelRow) });\n\n/**\n * Remove one model from this computer. A file only Matrx 2 holds is deleted; a file used in place (a\n * link to the person's own file) is only unlinked: the person's file is never deleted. The running\n * model is stopped first. RESOURCE_BUSY while it downloads; NOT_FOUND when it is not here.\n */\nexport const ModelsLocalRemoveParams = z.strictObject({ kind: LocalModelKind, model: ModelKey });\nexport const ModelsLocalRemoveResult = z.strictObject({\n kind: LocalModelKind,\n model: ModelKey,\n /** Bytes of disk the removal gave back (0 for a model used in place). */\n freed_bytes: nonNegInt,\n /** True when it was the running model and the server was stopped first. */\n stopped: z.boolean(),\n /** Where the person's files stay (a model used in place); null when nothing was kept. */\n kept: z.string().max(1024).nullable(),\n});\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Router ops (`models.*`)\n// ─────────────────────────────────────────────────────────────────────────────\n\n/** The supervisor's view of the `ml` service process. */\nexport const MlServiceState = z.enum([\"starting\", \"ready\", \"restarting\", \"failed\", \"stopped\"]);\n\nexport const MlServiceStatus = z.strictObject({\n state: MlServiceState,\n pid: nonNegInt.nullable(),\n /** Restarts since the app started (crashes, missed health checks). */\n restarts: nonNegInt,\n /** The bundled interpreter's version once the service has answered, e.g. \"3.13.15\". */\n python: z.string().max(32).nullable(),\n /** Why the service is restarting or failed, one human line. */\n error: z.string().max(300).nullable(),\n});\n\nexport const ModelsStatusParams = z.strictObject({});\nexport const ModelsStatusResult = z.strictObject({\n service: MlServiceStatus,\n /** Null until the service has answered (starting, restarting, failed). */\n transcription: MlStatusResult.nullable(),\n});\n\n/** Sent to the client that started a `models.install`, `models.llm.install` or `models.transcribe`, for that request. */\nexport const ModelsProgressEvent = z.strictObject({ request_id: RequestId, progress: MlProgress });\n\nexport type TranscriptionModelId = z.output<typeof TranscriptionModelId>;\nexport type MlStatusResult = z.output<typeof MlStatusResult>;\nexport type MlProgress = z.output<typeof MlProgress>;\nexport type ModelsStatusResult = z.output<typeof ModelsStatusResult>;\nexport type ModelsTranscribeParams = z.output<typeof ModelsTranscribeParams>;\nexport type ModelsTranscribeResult = z.output<typeof ModelsTranscribeResult>;\nexport type ModelsInstallParams = z.output<typeof ModelsInstallParams>;\nexport type ModelsInstallResult = z.output<typeof ModelsInstallResult>;\nexport type ModelsProgressEvent = z.output<typeof ModelsProgressEvent>;\nexport type TextModelId = z.output<typeof TextModelId>;\nexport type ModelKey = z.output<typeof ModelKey>;\nexport type CatalogFile = z.output<typeof CatalogFile>;\nexport type CatalogModelEntry = z.output<typeof CatalogModelEntry>;\nexport type LlamaServerBuild = z.output<typeof LlamaServerBuild>;\nexport type MlCatalogSetParams = z.output<typeof MlCatalogSetParams>;\nexport type LlmRunning = z.output<typeof LlmRunning>;\nexport type ModelsLlmStatusResult = z.output<typeof ModelsLlmStatusResult>;\nexport type ModelsLlmStartResult = z.output<typeof ModelsLlmStartResult>;\nexport type DownloadRow = z.output<typeof DownloadRow>;\nexport type ModelsDownloadsListResult = z.output<typeof ModelsDownloadsListResult>;\nexport type TranscriptSegment = z.output<typeof TranscriptSegment>;\n\n// Every schema's type beside it (type-exports.test.ts).\nexport type MlRuntimeState = z.output<typeof MlRuntimeState>;\nexport type MlInstallPhase = z.output<typeof MlInstallPhase>;\nexport type MlInstallProgress = z.output<typeof MlInstallProgress>;\nexport type TranscriptionModelInfo = z.output<typeof TranscriptionModelInfo>;\nexport type MlStatusParams = z.output<typeof MlStatusParams>;\nexport type TextModelInfo = z.output<typeof TextModelInfo>;\nexport type UnusableTextModel = z.output<typeof UnusableTextModel>;\nexport type LlmServerState = z.output<typeof LlmServerState>;\nexport type ModelsLlmStatusParams = z.output<typeof ModelsLlmStatusParams>;\nexport type ModelsLlmInstallParams = z.output<typeof ModelsLlmInstallParams>;\nexport type ModelsLlmInstallResult = z.output<typeof ModelsLlmInstallResult>;\nexport type ModelsLlmStartParams = z.output<typeof ModelsLlmStartParams>;\nexport type ModelsLlmStopParams = z.output<typeof ModelsLlmStopParams>;\nexport type ModelsLlmStopResult = z.output<typeof ModelsLlmStopResult>;\nexport type ModelsLlmChatParams = z.output<typeof ModelsLlmChatParams>;\nexport type ModelsLlmChatResult = z.output<typeof ModelsLlmChatResult>;\nexport type Sha256Hex = z.output<typeof Sha256Hex>;\nexport type MlCatalogSetResult = z.output<typeof MlCatalogSetResult>;\nexport type DownloadKind = z.output<typeof DownloadKind>;\nexport type ModelsDownloadsListParams = z.output<typeof ModelsDownloadsListParams>;\nexport type ModelsDownloadsCancelParams = z.output<typeof ModelsDownloadsCancelParams>;\nexport type ModelsDownloadsCancelResult = z.output<typeof ModelsDownloadsCancelResult>;\nexport type LocalModelKind = z.output<typeof LocalModelKind>;\nexport type LocalModelRow = z.output<typeof LocalModelRow>;\nexport type ModelsLocalListParams = z.output<typeof ModelsLocalListParams>;\nexport type ModelsLocalListResult = z.output<typeof ModelsLocalListResult>;\nexport type ModelsLocalRemoveParams = z.output<typeof ModelsLocalRemoveParams>;\nexport type ModelsLocalRemoveResult = z.output<typeof ModelsLocalRemoveResult>;\nexport type MlServiceState = z.output<typeof MlServiceState>;\nexport type MlServiceStatus = z.output<typeof MlServiceStatus>;\nexport type ModelsStatusParams = z.output<typeof ModelsStatusParams>;\n","/**\n * @ai-matrx/desktop-protocol — cap account (SPEC §6): the signed-in person's own AI Matrx things the\n * desktop app shows natively — their agents (Agents › Agents, a Shortcuts library) and their Vault\n * (Passwords). Schema source: lint-enforced rules in scripts/check-schema-source.mjs.\n *\n * The desktop core reads them AS the signed-in person (their token, row-level security): it never\n * holds anything the person could not read on the web. A secret's value never crosses this\n * contract: `account.vault.copy` puts one field on THIS computer's clipboard and answers only when.\n */\nimport { z } from \"zod\";\nimport { UUID_SHAPE_PATTERN } from \"@ai-matrx/kit/uuid\";\nimport { epochMs } from \"./primitives\";\n\n/** A platform row id (agent, vault item). Plain pattern (see DeviceId for why not z.uuid()). */\nexport const AccountRowId = z\n .string()\n .regex(UUID_SHAPE_PATTERN);\n\n/** Whether the person's rows could be read: signed out, or AI Matrx could not be reached. */\nexport const AccountReadState = z.enum([\"ok\", \"signed_out\", \"unavailable\"]);\n\n/** One of the person's agents, as the web's agent list names it (agx_get_list). */\nexport const AccountAgent = z.strictObject({\n id: AccountRowId,\n name: z.string().min(1).max(200),\n description: z.string().max(2000),\n /** The agent's category (\"\" when it has none): the library's folders. */\n category: z.string().max(120),\n /** The agent's kind as the platform names it (user, builtin, orchestra…). */\n agent_type: z.string().max(40),\n is_favorite: z.boolean(),\n /** The person owns it (false: shared with them). */\n is_owner: z.boolean(),\n /** Who shared it, when it is shared with the person. */\n shared_by: z.string().max(320).nullable(),\n /** The organization it belongs to. */\n organization: z.string().max(200).nullable(),\n updated_at_ms: epochMs,\n // 1.39: the catalogue's own row (agx_get_list_full, read whole through @ai-matrx/agents/catalog).\n /** The agent's tags (the library's search and its inspector). */\n tags: z.array(z.string().max(120)).max(50).optional(),\n /** The model it runs (a model catalog id); absent when it names none. */\n model_id: AccountRowId.optional(),\n /** The person's access: owner, admin, editor, viewer or system (the database's own words); absent when unknown. */\n access_level: z.string().min(1).max(40).optional(),\n /** The organization's id (the label is `organization`); absent when it has none. */\n organization_id: AccountRowId.optional(),\n /** Whose it is: the person's own, shared with them, or one AI Matrx ships (Gallery). */\n origin: z.enum([\"mine\", \"shared\", \"system\"]).optional(),\n /** Archived (the catalogue's archive filter decides whether the library lists it). */\n is_archived: z.boolean().optional(),\n /** An orchestra: it conducts other agents. */\n orchestra: z.boolean().optional(),\n});\n\nexport const AccountAgentsListParams = z.strictObject({});\nexport const AccountAgentsListResult = z.strictObject({\n state: AccountReadState,\n /** One line when state is not \"ok\" (what went wrong, in plain words); null otherwise. */\n problem: z.string().max(300).nullable(),\n agents: z.array(AccountAgent).max(2000),\n});\n\n/** One agent, opened (Shortcuts' editor and its Details inspector): what it asks for and what it uses. */\nexport const AccountAgentVariable = z.strictObject({\n name: z.string().min(1).max(200),\n /** The default value as text (\"\" when it has none). */\n default_value: z.string().max(4000),\n required: z.boolean(),\n help: z.string().max(1000),\n});\n\nexport const AccountAgentDetail = z.strictObject({\n agent: AccountAgent,\n /** The inputs a run asks for (the agent's variables). */\n variables: z.array(AccountAgentVariable).max(100),\n /** How many tools, custom tools, skills and connections it may use. */\n tool_count: z.int().min(0),\n custom_tool_count: z.int().min(0),\n skill_count: z.int().min(0),\n connection_count: z.int().min(0),\n /** The model's display name when the catalog knows it. */\n model_name: z.string().max(200).nullable(),\n});\n\nexport const AccountAgentsGetParams = z.strictObject({ agent_id: AccountRowId });\nexport const AccountAgentsGetResult = z.strictObject({\n state: AccountReadState,\n problem: z.string().max(300).nullable(),\n /** Null when the person cannot open it (not theirs, not shared with them, or gone). */\n detail: AccountAgentDetail.nullable(),\n});\n\n/** A run's status as mandate.run_history names it. */\nexport const AccountAgentRunStatus = z.enum([\"succeeded\", \"warned\", \"failed\", \"stopped\", \"waiting\", \"running\"]);\n\n/** One run of one agent (mandate.run_history, view \"mine\"): never its content beyond one line. */\nexport const AccountAgentRun = z.strictObject({\n run_id: AccountRowId,\n status: AccountAgentRunStatus,\n started_at_ms: epochMs,\n completed_at_ms: epochMs.nullable(),\n duration_ms: z.int().min(0).nullable(),\n cost: z.number().min(0).nullable(),\n tokens: z.int().min(0).nullable(),\n /** One line of the answer (at most 240 characters), when the run kept one. */\n output_preview: z.string().max(240).nullable(),\n /** The run's error, one line. */\n error: z.string().max(300).nullable(),\n /** The mandate it served, when one named it. */\n mandate_key: z.string().max(200).nullable(),\n organization: z.string().max(200).nullable(),\n /** The conversation that holds its transcript, when it kept one. */\n conversation_id: AccountRowId.nullable(),\n has_transcript: z.boolean(),\n});\n\nexport const AccountAgentRunSort = z.enum([\"started_at\", \"duration\", \"cost\", \"status\"]);\n\nexport const AccountAgentsRunsParams = z.strictObject({\n agent_id: AccountRowId,\n status: AccountAgentRunStatus.optional(),\n sort: AccountAgentRunSort.optional(),\n descending: z.boolean().optional(),\n offset: z.int().min(0).max(100_000).optional(),\n limit: z.int().min(1).max(100).optional(),\n});\nexport const AccountAgentsRunsResult = z.strictObject({\n state: AccountReadState,\n problem: z.string().max(300).nullable(),\n /** Every run of this agent the person may see (rows is one page of it). */\n total: z.int().min(0),\n rows: z.array(AccountAgentRun).max(100),\n});\n\n/** Star or unstar an agent: the catalogue's one favorite write (the person's own entity state). */\nexport const AccountAgentsFavoriteParams = z.strictObject({ agent_id: AccountRowId, favorite: z.boolean() });\nexport const AccountAgentsFavoriteResult = z.strictObject({ favorite: z.boolean() });\n\n/** 1.64 — one saved version of an agent (agx_get_version_history), newest first. */\nexport const AccountAgentVersion = z.strictObject({\n version_id: AccountRowId,\n version_number: z.int().min(1),\n changed_at_ms: epochMs,\n /** The change note the person wrote when saving, when they wrote one. */\n note: z.string().max(1000).nullable(),\n});\nexport const AccountAgentsVersionsParams = z.strictObject({\n agent_id: AccountRowId,\n offset: z.int().min(0).max(100_000).optional(),\n limit: z.int().min(1).max(200).optional(),\n});\nexport const AccountAgentsVersionsResult = z.strictObject({\n state: AccountReadState,\n problem: z.string().max(300).nullable(),\n /** The version the agent is at now (null: no saved version yet). */\n current_version: z.int().min(1).nullable(),\n rows: z.array(AccountAgentVersion).max(200),\n});\n/**\n * 1.64 — one version against the agent's current version, as the two records THE agent diff\n * (@ai-matrx/agents/versions/react AgentDiffViewer) compares: agent-definition keys, values as stored.\n */\nexport const AccountAgentsVersionDiffParams = z.strictObject({ agent_id: AccountRowId, version_number: z.int().min(1) });\nexport const AccountAgentsVersionDiffResult = z.strictObject({\n state: AccountReadState,\n problem: z.string().max(300).nullable(),\n version_number: z.int().min(1),\n current_version: z.int().min(1).nullable(),\n old: z.record(z.string().max(200), z.unknown()).nullable(),\n current: z.record(z.string().max(200), z.unknown()).nullable(),\n});\n/** 1.64 — restore: the past version becomes the agent's current definition (agx_promote_version). */\nexport const AccountAgentsRestoreVersionParams = z.strictObject({ agent_id: AccountRowId, version_number: z.int().min(1) });\nexport const AccountAgentsRestoreVersionResult = z.strictObject({\n restored_version: z.int().min(1),\n /** (1.68) The version row the restore saved (\"Restored from v<N>\"), now the agent's current version. */\n new_version: z.int().min(1).optional(),\n /** (1.68) True when the agent already matched the restored version: nothing was saved. */\n unchanged: z.boolean().optional(),\n});\n\n/** Passwords' kinds: a website sign-in, a passkey, a key or token, anything else. */\nexport const VaultItemKind = z.enum([\"login\", \"passkey\", \"key\", \"other\"]);\n\n/** One field of a vault item, masked: never its value. */\nexport const VaultFieldSummary = z.strictObject({\n key: z.string().min(1).max(120),\n /** visible: shown as written; revealable: copyable on request; sealed: never leaves the server. */\n handling: z.enum([\"visible\", \"revealable\", \"sealed\"]),\n /** The masked hint the server keeps (\"••••ab12\"), or \"\" when it keeps none. */\n hint: z.string().max(200),\n});\n\nexport const VaultItemSummary = z.strictObject({\n id: AccountRowId,\n name: z.string().min(1).max(200),\n kind: VaultItemKind,\n /** The platform's definition (\"website_login\", \"native_passkey\", \"custom\"…). */\n definition: z.string().max(80),\n /** The sign-in's user name hint (its \"username\" field's hint); null when it has none. */\n username: z.string().max(200).nullable(),\n /** The sites a sign-in is for. */\n urls: z.array(z.string().max(2048)).max(20),\n notes: z.string().max(4000).nullable(),\n fields: z.array(VaultFieldSummary).max(50),\n /** Shared with the person by someone else (Passwords' shared groups). */\n shared: z.boolean(),\n /** active, or the server's other states (a deleted item waits in \"deleted\"). */\n status: z.string().max(40),\n created_at_ms: epochMs,\n updated_at_ms: epochMs,\n});\n\nexport const AccountVaultListParams = z.strictObject({});\nexport const AccountVaultListResult = z.strictObject({\n state: AccountReadState,\n problem: z.string().max(300).nullable(),\n items: z.array(VaultItemSummary).max(5000),\n});\n\n/** Copy one field's value to this computer's clipboard (revealable or visible fields only). */\nexport const AccountVaultCopyParams = z.strictObject({\n item_id: AccountRowId,\n field_key: z.string().min(1).max(120),\n});\nexport const AccountVaultCopyResult = z.strictObject({\n copied: z.boolean(),\n /** When the clipboard is cleared again if it still holds the value (Passwords clears a copied password). */\n clears_at_ms: epochMs,\n});\n\n// Inferred (output) types — same name as the schema.\nexport type AccountRowId = z.output<typeof AccountRowId>;\nexport type AccountReadState = z.output<typeof AccountReadState>;\nexport type AccountAgent = z.output<typeof AccountAgent>;\nexport type AccountAgentsListParams = z.output<typeof AccountAgentsListParams>;\nexport type AccountAgentsListResult = z.output<typeof AccountAgentsListResult>;\nexport type VaultItemKind = z.output<typeof VaultItemKind>;\nexport type VaultFieldSummary = z.output<typeof VaultFieldSummary>;\nexport type VaultItemSummary = z.output<typeof VaultItemSummary>;\nexport type AccountVaultListParams = z.output<typeof AccountVaultListParams>;\nexport type AccountVaultListResult = z.output<typeof AccountVaultListResult>;\nexport type AccountVaultCopyParams = z.output<typeof AccountVaultCopyParams>;\nexport type AccountVaultCopyResult = z.output<typeof AccountVaultCopyResult>;\nexport type AccountAgentVariable = z.output<typeof AccountAgentVariable>;\nexport type AccountAgentDetail = z.output<typeof AccountAgentDetail>;\nexport type AccountAgentsGetParams = z.output<typeof AccountAgentsGetParams>;\nexport type AccountAgentsGetResult = z.output<typeof AccountAgentsGetResult>;\nexport type AccountAgentRunStatus = z.output<typeof AccountAgentRunStatus>;\nexport type AccountAgentRun = z.output<typeof AccountAgentRun>;\nexport type AccountAgentRunSort = z.output<typeof AccountAgentRunSort>;\nexport type AccountAgentsRunsParams = z.output<typeof AccountAgentsRunsParams>;\nexport type AccountAgentsRunsResult = z.output<typeof AccountAgentsRunsResult>;\nexport type AccountAgentsFavoriteParams = z.output<typeof AccountAgentsFavoriteParams>;\nexport type AccountAgentsFavoriteResult = z.output<typeof AccountAgentsFavoriteResult>;\nexport type AccountAgentVersion = z.output<typeof AccountAgentVersion>;\nexport type AccountAgentsVersionsParams = z.output<typeof AccountAgentsVersionsParams>;\nexport type AccountAgentsVersionsResult = z.output<typeof AccountAgentsVersionsResult>;\nexport type AccountAgentsVersionDiffParams = z.output<typeof AccountAgentsVersionDiffParams>;\nexport type AccountAgentsVersionDiffResult = z.output<typeof AccountAgentsVersionDiffResult>;\nexport type AccountAgentsRestoreVersionParams = z.output<typeof AccountAgentsRestoreVersionParams>;\nexport type AccountAgentsRestoreVersionResult = z.output<typeof AccountAgentsRestoreVersionResult>;\n","/**\n * @ai-matrx/desktop-protocol — cap apps (SPEC §6): the desktop apps a person uses (Claude, Codex,\n * Cursor, VS Code, Antigravity, and any app a later adapter adds), their profiles and usage.\n * Schema source: lint-enforced rules in scripts/check-schema-source.mjs.\n *\n * A profile is one data folder of one app on one device, so several accounts of the same app run\n * side by side. Profiles are the person's own rows in `users.desktop_app_profile` (the one\n * database); folders found on disk that no row names yet are listed with `id: null` so they can be\n * added. Nothing here is ever a credential: signing in happens inside the app.\n */\nimport { z } from \"zod\";\nimport { UUID_SHAPE_PATTERN } from \"@ai-matrx/kit/uuid\";\nimport { AbsPath, DeviceId, epochMs } from \"./primitives\";\n\n/** An adapter key: lowercase, open-ended (a new app needs only a new adapter). */\nexport const AppKey = z\n .string()\n .regex(/^[a-z][a-z0-9_-]{0,39}$/);\n\n/** A users.desktop_app_profile id. Plain pattern (see DeviceId for why not z.uuid()). */\nexport const AppProfileId = z\n .string()\n .regex(UUID_SHAPE_PATTERN);\n\n/**\n * Where a profile's folder lives, RELATIVE to the app adapter's data root on that device: one or\n * more plain names joined by \"/\" (none starting with a dot, so never \".\" or \"..\"), never absolute.\n * Null on a profile means the app's own default profile. No lookaround: Pydantic's regex engine\n * has none.\n */\nexport const AppProfileLocator = z\n .string()\n .min(1)\n .max(512)\n .regex(/^[A-Za-z0-9 _()+@,-][A-Za-z0-9 ._()+@,-]{0,127}(\\/[A-Za-z0-9 _()+@,-][A-Za-z0-9 ._()+@,-]{0,127}){0,7}$/);\n\n/** supported: proven here; partial: works with a stated gap; unsupported: not on this OS. */\nexport const AppSupport = z.enum([\"supported\", \"partial\", \"unsupported\"]);\n\nexport const AppFeatureStatus = z.strictObject({\n status: AppSupport,\n /** One line, set whenever status is not \"supported\". */\n reason: z.string().max(140).nullable(),\n});\n\nexport const AppInfo = z.strictObject({\n app_key: AppKey,\n name: z.string().max(64),\n installed: z.boolean(),\n /** The app's own version string, or null when it is not installed or does not say. */\n version: z.string().max(64).nullable(),\n /** The install found (an .app bundle, an .exe, a binary), or null. */\n location: AbsPath.nullable(),\n /** Open the app at all on this OS. */\n open: AppFeatureStatus,\n /** Separate profiles (one account each) on this OS. */\n profiles: AppFeatureStatus,\n /** Plan usage read from the app's own files on this OS. */\n usage: AppFeatureStatus,\n});\n\n/** One plan-usage figure, as the app itself last recorded it. */\nexport const AppUsageReading = z.strictObject({\n window: z.enum([\"five_hour\", \"weekly\", \"extra\"]),\n /** 0–100 for five_hour and weekly; extra-usage spend as a percent of its cap (may pass 100). */\n percent: z.number().min(0).max(10_000),\n /** When the app recorded it. */\n sampled_at_ms: epochMs,\n /** True when the window has rolled over since the sample, so the figure has reset. */\n reset_since: z.boolean(),\n});\n\nexport const AppProfile = z.strictObject({\n /** The row's id; null for a folder found on disk that no row names yet. */\n id: AppProfileId.nullable(),\n app_key: AppKey,\n display_name: z.string().min(1).max(120),\n /** The account the person means to be signed in here; null when not stated (never guessed). */\n account_identity: z.string().min(3).max(320).nullable(),\n profile_locator: AppProfileLocator.nullable(),\n /** The device the row is tied to; null when the row names none. */\n device_id: DeviceId.nullable(),\n /** The folder this profile resolves to on this device; null for a row tied to another device. */\n folder: AbsPath.nullable(),\n /** The folder exists on this device. */\n on_disk: z.boolean(),\n /** An instance with this profile is running; null when it could not be determined. */\n running: z.boolean().nullable(),\n /** Usage the app recorded for this profile; null when the app exposes none here. */\n usage: z.array(AppUsageReading).nullable(),\n last_opened_ms: epochMs.nullable(),\n});\n\nexport const AppsListParams = z.strictObject({});\nexport const AppsListResult = z.strictObject({ apps: z.array(AppInfo) });\n\nexport const AppsProfilesListParams = z.strictObject({\n /** Only this app's profiles; every app's when absent. */\n app_key: AppKey.optional(),\n});\nexport const AppsProfilesListResult = z.strictObject({\n profiles: z.array(AppProfile),\n /**\n * Whether the saved rows could be read: false while signed out or offline, when only folders\n * found on disk are listed.\n */\n registry: z.enum([\"ok\", \"signed_out\", \"unavailable\"]),\n});\n\n/** Create (no id) or update (id) the person's own profile row. */\nexport const AppsProfilesSaveParams = z.strictObject({\n id: AppProfileId.optional(),\n app_key: AppKey,\n display_name: z.string().min(1).max(120),\n account_identity: z.string().min(3).max(320).nullable(),\n /** On create: the folder to use (one found on disk), or null for the app's default profile. Ignored on update. */\n profile_locator: AppProfileLocator.nullable(),\n /** On create with profile_locator null: make a new folder named after display_name instead. */\n new_folder: z.boolean().default(false),\n});\nexport const AppsProfilesSaveResult = AppProfile;\n\n/** Remove the row (soft delete). The folder on disk is never touched. */\nexport const AppsProfilesRemoveParams = z.strictObject({ id: AppProfileId });\nexport const AppsProfilesRemoveResult = z.strictObject({ removed: z.boolean() });\n\n/** Open the app with a profile (its default profile when profile_id is absent). */\nexport const AppsOpenParams = z.strictObject({\n app_key: AppKey,\n profile_id: AppProfileId.optional(),\n});\nexport const AppsOpenResult = z.strictObject({\n /** True when an instance with this profile was already running; it is brought forward. */\n already_running: z.boolean(),\n folder: AbsPath.nullable(),\n});\n\n// Inferred (output) types — same name as the schema, so `AppInfo` is both the validator and its type.\nexport type AppKey = z.output<typeof AppKey>;\nexport type AppProfileId = z.output<typeof AppProfileId>;\nexport type AppProfileLocator = z.output<typeof AppProfileLocator>;\nexport type AppSupport = z.output<typeof AppSupport>;\nexport type AppFeatureStatus = z.output<typeof AppFeatureStatus>;\nexport type AppInfo = z.output<typeof AppInfo>;\nexport type AppUsageReading = z.output<typeof AppUsageReading>;\nexport type AppProfile = z.output<typeof AppProfile>;\nexport type AppsListParams = z.output<typeof AppsListParams>;\nexport type AppsListResult = z.output<typeof AppsListResult>;\nexport type AppsProfilesListParams = z.output<typeof AppsProfilesListParams>;\nexport type AppsProfilesListResult = z.output<typeof AppsProfilesListResult>;\nexport type AppsProfilesSaveParams = z.output<typeof AppsProfilesSaveParams>;\nexport type AppsProfilesSaveResult = z.output<typeof AppsProfilesSaveResult>;\nexport type AppsProfilesRemoveParams = z.output<typeof AppsProfilesRemoveParams>;\nexport type AppsProfilesRemoveResult = z.output<typeof AppsProfilesRemoveResult>;\nexport type AppsOpenParams = z.output<typeof AppsOpenParams>;\nexport type AppsOpenResult = z.output<typeof AppsOpenResult>;\n","/**\n * @ai-matrx/desktop-protocol — cap apps, chats and projects (SPEC §6 `apps`, §6.2): the\n * conversations a coding app (Claude first; Codex, Cursor, VS Code through the same shape) keeps\n * on this device, which of the app's windows (profiles) list each one, and the person's own\n * groupings of them. Schema source: lint-enforced rules in scripts/check-schema-source.mjs.\n *\n * A chat is one conversation, keyed by its transcript id, never by one window's listing of it. A\n * window is one profile of the app. A pin is the app's own (read only, never written); a star and\n * a project are ours. Added in protocol 1.8.\n */\nimport { z } from \"zod\";\nimport { AppKey } from \"./apps\";\nimport { ResourceId, epochMs, nonNegInt } from \"./primitives\";\n\n/** A conversation id (Claude: the transcript's cliSessionId). */\nexport const ChatId = z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/);\n\n/** A window (profile) key, e.g. \"main\", \"emily\"; \"holder\" is our vault, not a window. */\nexport const ChatPlace = z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/);\n\n/** A project id (a slug made from its first name). */\nexport const ChatProjectId = z.string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/);\n\nexport const ChatWindow = z.strictObject({\n key: ChatPlace,\n /** The app's default profile (Claude: the main window, which lists every account's chats). */\n main: z.boolean(),\n /** The account the window is signed into, when known. */\n account: z.string().max(320).nullable(),\n});\n\nexport const ChatProject = z.strictObject({\n id: ChatProjectId,\n name: z.string().min(1).max(200),\n archived: z.boolean(),\n /** Chats in it. */\n count: nonNegInt,\n});\n\n/** The app's own pin, read from one window's account. */\nexport const ChatPin = z.strictObject({\n /** The window whose account pins it; an account with no window of its own is named by its email. */\n window: z.string().min(1).max(320),\n /** When that account's pin list was last read; null when the reading has no time. */\n observed_at_ms: epochMs.nullable(),\n});\n\nexport const ChatRunning = z.strictObject({\n window: ChatPlace,\n /** process: a live process resumed this chat there (exact); activity: that window's own record moved in the last 3 minutes. */\n how: z.enum([\"process\", \"activity\"]),\n});\n\n/** A window that holds a listing of the chat but whose sidebar does not show it, and why. */\nexport const ChatHidden = z.strictObject({\n window: ChatPlace,\n reason: z.string().max(200),\n});\n\nexport const ChatLastUse = z.strictObject({\n /** The conversation's last reply. */\n at_ms: epochMs,\n window: ChatPlace.nullable(),\n account: z.string().max(320).nullable(),\n /** How the window was decided (one short line). */\n how: z.string().max(120).nullable(),\n /** The account's 1-hour prompt cache is still warm. */\n cache_warm: z.boolean(),\n cache_minutes_left: nonNegInt,\n});\n\n/** 1.13: a project the app itself keeps (Codex's sidebar projects), never ours and never written. */\nexport const ChatAppProject = z.strictObject({\n id: z.string().min(1).max(200),\n name: z.string().max(200),\n});\n\n/** 1.14/1.15: the one title rule's sources (`@ai-matrx/coding-sessions/sessions` TITLE_PRECEDENCE, minus the person's override). */\nconst ChatTitleSource = z.enum([\"app\", \"app-remembered\", \"custom-title\", \"ai-title\", \"agent-name\", \"summary\", \"first-prompt\", \"last-prompt\"]);\n\n/** 1.59: one of the app's own groups a chat is filed in, in one instance (Claude's sidebar groups: \"Claude Categories\"). */\nexport const ChatAppGroup = z.strictObject({ window: ChatPlace, group_id: z.string().max(120), name: z.string().max(200) });\n/** 1.59: the chat this one came from: spawned by another agent's chat, dispatched by it, or forked from it. */\nexport const ChatParent = z.strictObject({ id: ChatId, how: z.enum([\"spawned\", \"dispatched\", \"forked\"]), title: z.string().max(1000).nullable() });\n/**\n * 1.61: where the chat's title (ours: the person's rename, else the app's) shows: `synced` = the app\n * is proven to show and keep it; `not_synced` = shown in Matrx, the app keeps its own (both kept);\n * `unsupported` = the app has no title Matrx could set. `note` says it in words for the screen.\n */\nexport const ChatTitleSync = z.strictObject({ state: z.enum([\"synced\", \"not_synced\", \"unsupported\"]), note: z.string().max(200) });\n/**\n * 1.62: one Move or Copy of a chat from one instance (window) to another, as Matrx recorded it (ours,\n * never the app's and never a project): `from`/`to` are window keys (null when an old record did not\n * say), `at_ms` when it went, `back_at_ms` when Bring back returned it (null = still away).\n */\nexport const ChatMove = z.strictObject({\n kind: z.enum([\"move\", \"copy\"]),\n from: ChatPlace.nullable(),\n to: ChatPlace.nullable(),\n at_ms: epochMs.nullable(),\n back_at_ms: epochMs.nullable(),\n});\n\nexport const ChatRow = z.strictObject({\n id: ChatId,\n /** The short id people see (the listing's first 8 characters). */\n short_id: z.string().max(16),\n /** The listing's own name (Claude: local_<id>), null for a chat only in the holder. */\n record: z.string().max(160).nullable(),\n title: z.string().max(1000),\n last_active_ms: epochMs.nullable(),\n created_ms: epochMs.nullable(),\n projects: z.array(ChatProjectId).max(500),\n starred: z.boolean(),\n pinned_in: z.array(ChatPin).max(200),\n /** Every place it is listed now: window keys, plus \"holder\". */\n places: z.array(ChatPlace).max(200),\n held: z.boolean(),\n running: z.array(ChatRunning).max(200),\n hidden_in: z.array(ChatHidden).max(200),\n /** Kept out of the main window on purpose. */\n hidden_from_main: z.boolean(),\n /** Listed in a side window and not yet copied into main. */\n main_pending: z.boolean(),\n /** A scheduled routine's run (its task id). */\n scheduled: z.string().max(200).nullable(),\n /** Created recently and in no project: offered for filing. */\n new_unfiled: z.boolean(),\n warnings: z.array(z.string().max(400)).max(20),\n last_use: ChatLastUse.nullable(),\n /** 1.13: the app's own project the chat is grouped under in the app (Codex), read only; absent = none or not an app that groups. */\n app_project: ChatAppProject.optional(),\n /** 1.13: tokens the conversation has used, when the app records it (Codex); absent when not recorded; prices are not on disk. */\n tokens: nonNegInt.optional(),\n /**\n * 1.14: the chat's own title before the person's rename (the one title rule, `@ai-matrx/coding-sessions/sessions`);\n * `title` is what to show (`title_override` when set, else this).\n */\n original_title: z.string().max(1000).optional(),\n /** 1.14: where `original_title` came from (the one rule's sources, strongest first; 1.15: a closed set). */\n title_source: ChatTitleSource.optional(),\n /** 1.14: the person's rename inside Matrx (Coding Sessions), applied once by the row builder; absent = none. */\n title_override: z.string().min(1).max(300).optional(),\n /** 1.15: the app itself archived it (hidden_in says where and why, in words for people; this is the typed fact). */\n archived: z.boolean().optional(),\n /** 1.59: the coding session Matrx itself drives this chat in (the one chat, whether it runs in the app or in Matrx); absent = none. */\n session_id: z.string().max(80).optional(),\n /** 1.59: the app's own groups it is filed in, per instance, as the app keeps them (never merged into the person's projects). */\n app_groups: z.array(ChatAppGroup).max(200).optional(),\n /** 1.59: the chat it came from (nesting): an agent's chat that spawned it, dispatched it, or that it was forked from. */\n parent: ChatParent.optional(),\n /** 1.59: earlier sessions of this same chat (the app continued it under new session ids). */\n prior_sessions: z.array(ChatId).max(50).optional(),\n /** 1.61: where the title shows (the title facet's sync state for this chat's app). */\n title_sync: ChatTitleSync.optional(),\n /**\n * 1.72: whether our star is the app's pin for this chat (the pin facet's sync state: `synced` only\n * where a test proved the app takes and keeps the pin Matrx writes; `not_synced` says why).\n */\n pin_sync: ChatTitleSync.optional(),\n /** 1.62: every Move and Copy of this chat between instances, newest first (absent = never moved or copied). */\n moved: z.array(ChatMove).max(50).optional(),\n /**\n * 1.63: the instance the chat belongs to: the one whose folder holds it (read only; nothing is\n * moved). Claude: the side window holding its newest record copy (main mirrors every window), else\n * main; Codex: the home whose database holds it. Absent = only Matrx's holder keeps it.\n */\n home: ChatPlace.optional(),\n /**\n * 1.70: the person hid it from Matrx's lists (ours, kept by Matrx, never written into the app;\n * absent = shown). The app's own hidden facts stay apart: `hidden_in`, `archived`, `hidden_from_main`.\n */\n hidden: z.boolean().optional(),\n});\n\n/** 1.10: a chat's family: the conversation it was forked from, or the original it is a copy of. */\nexport const ChatFamily = z.strictObject({\n id: ChatId,\n fork_of: ChatId.nullable(),\n copy_of: ChatId.nullable(),\n});\n\nexport const AppsChatsListParams = z.strictObject({\n app_key: AppKey,\n /** Only these chats (a live update re-reads just what changed). */\n ids: z.array(ChatId).max(500).optional(),\n});\nexport const AppsChatsListResult = z.strictObject({\n app_key: AppKey,\n /** Bumps on every change the index sees; `apps.chats.changed` carries the same number. */\n version: nonNegInt,\n windows: z.array(ChatWindow).max(200),\n projects: z.array(ChatProject).max(5000),\n chats: z.array(ChatRow).max(20_000),\n /** How long a chat in no project counts as new. */\n new_window_ms: nonNegInt,\n /** 1.9: this is the copy saved at the last read, shown while everything is read again. */\n updating: z.boolean().optional(),\n /** 1.9: false while the folder watches are down (changes are not arriving); `apps.chats.watch_state` says when it changes. */\n live: z.boolean().optional(),\n /** 1.10: every listed chat that is a fork or a copy of another (read from the conversations' first lines). */\n families: z.array(ChatFamily).max(20_000).optional(),\n});\n\nexport const AppsChatsWatchParams = z.strictObject({ app_key: AppKey });\nexport const AppsChatsWatchResult = z.strictObject({ resource_id: ResourceId, version: nonNegInt });\n\n/** Event to every holder of an `apps.chats.watch`: these chats changed (all: re-read the list). */\nexport const AppsChatsChangedEvent = z.strictObject({\n app_key: AppKey,\n version: nonNegInt,\n ids: z.array(ChatId).max(1000),\n all: z.boolean(),\n});\n\n/** 1.9: the index's own state, to every watcher: live (changes arrive) or not, and why. */\nexport const AppsChatsWatchStateEvent = z.strictObject({\n app_key: AppKey,\n live: z.boolean(),\n updating: z.boolean(),\n reason: z.string().max(300).nullable(),\n});\n\n/** 1.9: put a chat in a window, take it off one (never its last place), or keep it in the holder. */\nexport const AppsChatsPlaceParams = z.strictObject({\n app_key: AppKey,\n chat_id: ChatId,\n action: z.enum([\"place\", \"take_off\", \"hold\"]),\n /** The window (for place and take_off). */\n window: ChatPlace.optional(),\n /** take_off where it is open: stop it there first (the person confirmed). */\n stop_if_open: z.boolean().default(false),\n});\nexport const AppsChatsPlaceResult = z.strictObject({ chat: ChatRow, message: z.string().max(400) });\n\n/** 1.9: several chats into one project (or a new one by name). */\nexport const AppsProjectsFileManyParams = z.strictObject({\n app_key: AppKey,\n chat_ids: z.array(ChatId).min(1).max(500),\n project_id: ChatProjectId.optional(),\n new_project_name: z.string().min(1).max(200).optional(),\n});\nexport const AppsProjectsFileManyResult = z.strictObject({ chats: z.array(ChatRow).max(500), project: ChatProject });\n\n/** 1.9: rename, archive or restore a project. */\nexport const AppsProjectsUpdateParams = z.strictObject({\n app_key: AppKey,\n project_id: ChatProjectId,\n name: z.string().min(1).max(200).optional(),\n archived: z.boolean().optional(),\n});\nexport const AppsProjectsUpdateResult = z.strictObject({ project: ChatProject });\n\n/** 1.9: save a copy of every chat in a project as another project (made if new). */\nexport const AppsProjectsCopyParams = z.strictObject({ app_key: AppKey, project_id: ChatProjectId, new_project_name: z.string().min(1).max(200) });\nexport const AppsProjectsCopyResult = z.strictObject({ project: ChatProject });\n\n/** File a chat in a project: `project_id`, or `new_project_name` to make one (exactly one). */\nexport const AppsProjectsFileParams = z.strictObject({\n app_key: AppKey,\n chat_id: ChatId,\n project_id: ChatProjectId.optional(),\n new_project_name: z.string().min(1).max(200).optional(),\n});\nexport const AppsProjectsFileResult = z.strictObject({ chat: ChatRow, project: ChatProject });\n\nexport const AppsProjectsUnfileParams = z.strictObject({ app_key: AppKey, chat_id: ChatId, project_id: ChatProjectId });\nexport const AppsProjectsUnfileResult = z.strictObject({ chat: ChatRow });\n\nexport const AppsChatsStarParams = z.strictObject({ app_key: AppKey, chat_id: ChatId, starred: z.boolean() });\nexport const AppsChatsStarResult = z.strictObject({ chat: ChatRow });\n\n/** 1.70: hide chats from Matrx's lists, or show them again (ours only; the app is never told). */\nexport const AppsChatsHideParams = z.strictObject({ app_key: AppKey, chat_ids: z.array(ChatId).min(1).max(500), hidden: z.boolean() });\n/** `changed`: the chats whose hidden state this call changed (the rest already were). */\nexport const AppsChatsHideResult = z.strictObject({ app_key: AppKey, hidden: z.boolean(), changed: z.array(ChatId).max(500) });\n\nexport type ChatId = z.output<typeof ChatId>;\nexport type ChatPlace = z.output<typeof ChatPlace>;\nexport type ChatProjectId = z.output<typeof ChatProjectId>;\nexport type ChatWindow = z.output<typeof ChatWindow>;\nexport type ChatProject = z.output<typeof ChatProject>;\nexport type ChatPin = z.output<typeof ChatPin>;\nexport type ChatRunning = z.output<typeof ChatRunning>;\nexport type ChatHidden = z.output<typeof ChatHidden>;\nexport type ChatLastUse = z.output<typeof ChatLastUse>;\nexport type ChatRow = z.output<typeof ChatRow>;\nexport type ChatAppProject = z.output<typeof ChatAppProject>;\nexport type ChatFamily = z.output<typeof ChatFamily>;\nexport type AppsChatsListParams = z.output<typeof AppsChatsListParams>;\nexport type AppsChatsListResult = z.output<typeof AppsChatsListResult>;\nexport type AppsChatsWatchParams = z.output<typeof AppsChatsWatchParams>;\nexport type AppsChatsWatchResult = z.output<typeof AppsChatsWatchResult>;\nexport type AppsChatsChangedEvent = z.output<typeof AppsChatsChangedEvent>;\nexport type AppsProjectsFileParams = z.output<typeof AppsProjectsFileParams>;\nexport type AppsProjectsFileResult = z.output<typeof AppsProjectsFileResult>;\nexport type AppsProjectsUnfileParams = z.output<typeof AppsProjectsUnfileParams>;\nexport type AppsProjectsUnfileResult = z.output<typeof AppsProjectsUnfileResult>;\nexport type AppsChatsStarParams = z.output<typeof AppsChatsStarParams>;\nexport type AppsChatsStarResult = z.output<typeof AppsChatsStarResult>;\nexport type AppsChatsHideParams = z.output<typeof AppsChatsHideParams>;\nexport type AppsChatsHideResult = z.output<typeof AppsChatsHideResult>;\nexport type AppsChatsWatchStateEvent = z.output<typeof AppsChatsWatchStateEvent>;\nexport type AppsChatsPlaceParams = z.output<typeof AppsChatsPlaceParams>;\nexport type AppsChatsPlaceResult = z.output<typeof AppsChatsPlaceResult>;\nexport type AppsProjectsFileManyParams = z.output<typeof AppsProjectsFileManyParams>;\nexport type AppsProjectsFileManyResult = z.output<typeof AppsProjectsFileManyResult>;\nexport type AppsProjectsUpdateParams = z.output<typeof AppsProjectsUpdateParams>;\nexport type AppsProjectsUpdateResult = z.output<typeof AppsProjectsUpdateResult>;\nexport type AppsProjectsCopyParams = z.output<typeof AppsProjectsCopyParams>;\nexport type AppsProjectsCopyResult = z.output<typeof AppsProjectsCopyResult>;\nexport type ChatAppGroup = z.output<typeof ChatAppGroup>;\nexport type ChatParent = z.output<typeof ChatParent>;\nexport type ChatTitleSync = z.output<typeof ChatTitleSync>;\nexport type ChatMove = z.output<typeof ChatMove>;\n","/**\n * @ai-matrx/desktop-protocol — cap apps, a coding app's windows and the accounts behind them\n * (SPEC §6 `apps`, §6.2, plan `apps-chats` phase 2): each window (profile) with the account it is\n * meant for and the one signed in, open or closed; each account's plan usage (5-hour, weekly,\n * extra) as the app records it; each account's weekly reset; and the window actions (bring to\n * front or open, reload its list, restart, open briefly for a fresh usage reading). Claude is the\n * first adapter. Added in protocol 1.10. Schema source: lint-enforced rules in\n * scripts/check-schema-source.mjs.\n */\nimport { z } from \"zod\";\nimport { AppKey } from \"./apps\";\nimport { ChatId, ChatPlace, ChatProject, ChatProjectId, ChatRow } from \"./apps-chats\";\nimport { epochMs, nonNegInt } from \"./primitives\";\n\n/**\n * 1.50: the window's \"Connect new sessions to Remote Control\" setting (Claude: Settings > Claude Code,\n * `preferences.ccRemoteControlDefaultEnabled` in the profile's claude_desktop_config.json): new coding\n * chats in that account show up in the Claude phone app's Code tab. The app reads the file once at\n * launch and writes it back from memory, so a change to an open window waits for its next close.\n */\nexport const WindowRemoteControl = z.strictObject({\n /**\n * As the window's settings file holds it: on, off, or never set (the app's default). 1.52:\n * \"unreadable\" = the file is there but damaged, so the setting is not known (`problem` says why).\n */\n setting: z.enum([\"on\", \"off\", \"default\", \"unreadable\"]),\n /** The window serves Remote Control now (its live state says \"on\"); null: not known (closed, or no state file). */\n serving: z.boolean().nullable(),\n /** A change queued until the window next closes (or restarts); null: none. */\n pending: z.enum([\"on\", \"off\"]).nullable(),\n /**\n * 1.52: why the setting cannot be trusted, as a plain sentence for the person: the settings file is\n * damaged (\"unreadable\"), or a queued change failed to land (it stays queued; asking again retries).\n * Absent: nothing wrong. An older core omits it.\n */\n problem: z.string().max(300).optional(),\n});\n\n/** One window (profile) of the app on this device. */\nexport const AppWindowInfo = z.strictObject({\n key: ChatPlace,\n /** The app's default profile (Claude: main, which may sign into any account). */\n main: z.boolean(),\n /** The account the window is meant for (null for main). */\n account: z.string().max(320).nullable(),\n /** The account signed in there now: an email, or the account id while it has no saved name. */\n signed_in: z.string().max(320).nullable(),\n signed_in_is_email: z.boolean(),\n /** Signed into another account than the one it is meant for. */\n mismatch: z.boolean(),\n /** Its folder exists. */\n created: z.boolean(),\n /** Open now. */\n running: z.boolean(),\n /** Chats open in it now (a process resuming each one). */\n open_chats: nonNegInt,\n /** 1.50: its Remote Control (phone) setting; absent from an older core, or an app without one. */\n remote_control: WindowRemoteControl.optional(),\n});\n\n/** One account's plan usage, newest reading from any window (an account is matched to an org by vote). */\nexport const AccountUsage = z.strictObject({\n /** The account's email, or \"org <8 chars>\" when no window has ever sampled that org. */\n account: z.string().max(320),\n org: z.string().max(80).nullable(),\n /** False when the org was sampled in several accounts' windows and the vote is not clear (≥ 75 %). */\n account_certain: z.boolean(),\n /** 5-hour use in percent (0 once the reading is over 5 hours old). */\n five_hour: z.number().nullable(),\n five_hour_reset_since: z.boolean(),\n /** Weekly use in percent (0 once the week reset after the reading). */\n weekly: z.number().nullable(),\n weekly_reset_since: z.boolean(),\n /** Extra-usage spend in percent of its cap, when on. */\n extra_usage: z.number().nullable(),\n extra_usage_as_of_ms: epochMs.nullable(),\n as_of_ms: epochMs,\n /** The windows meant for this account (and main when main took the reading). */\n windows: z.array(ChatPlace).max(200),\n /** The window that took the reading is open now and the reading is under 30 minutes old. */\n live: z.boolean(),\n /** The next weekly reset, when known. */\n weekly_resets_at_ms: epochMs.nullable(),\n /** That reset time is Claude's own (its reading, or a reset seen in its usage history). */\n weekly_reset_official: z.boolean().nullable(),\n /** 1.13: the account's plan as the app names it (Codex: \"pro\", \"prolite\"), when recorded. */\n plan: z.string().max(80).optional(),\n /** 1.13: the account's credit balance as the app records it (Codex), when recorded. */\n credits: z.string().max(40).optional(),\n /**\n * 1.25: the latest the account's 5-hour window can reset: 5 hours after the first reading of this\n * window's use (its usage history), so the real reset is at or before it. Absent when no 5-hour\n * window is running (no use in the last reading, or the reading is over 5 hours old).\n */\n five_hour_resets_by_ms: epochMs.optional(),\n /** 1.73: where the reading came from (absent = the app itself). */\n read_source: z.enum([\"app\", \"claude_code\"]).optional(),\n});\n\n/** One window's account's next weekly reset and where the time came from. */\nexport const AccountReset = z.strictObject({\n window: ChatPlace,\n account: z.string().max(320).nullable(),\n next_reset_ms: epochMs.nullable(),\n /** claude: the app's own reading; usage_history: a weekly drop seen in its usage record; your_list: the person's own entry. */\n source: z.enum([\"claude\", \"usage_history\", \"your_list\"]).nullable(),\n /** claude or usage_history. */\n official: z.boolean(),\n /** Set when the person's list disagrees with the official time. */\n note: z.string().max(200).nullable(),\n});\n\nexport const AppsWindowsListParams = z.strictObject({ app_key: AppKey });\nexport const AppsWindowsListResult = z.strictObject({ app_key: AppKey, windows: z.array(AppWindowInfo).max(200) });\n\nexport const AppsAccountsUsageParams = z.strictObject({ app_key: AppKey });\nexport const AppsAccountsUsageResult = z.strictObject({\n app_key: AppKey,\n accounts: z.array(AccountUsage).max(500),\n /** 1.12: the rows are right but something around them failed (a newly read reset time could not be saved); shown, never hidden. */\n problem: z.string().max(400).optional(),\n});\n\nexport const AppsAccountsResetsParams = z.strictObject({ app_key: AppKey });\nexport const AppsAccountsResetsResult = z.strictObject({\n app_key: AppKey,\n resets: z.array(AccountReset).max(200),\n /** 1.12: as on `apps.accounts.usage`. */\n problem: z.string().max(400).optional(),\n});\n\n/** A window action's answer: what happened, in one line. */\nexport const AppsWindowActionResult = z.strictObject({ message: z.string().max(400) });\n\n/** Bring the window to the front if it is open (never a second copy), else open it. */\nexport const AppsWindowsOpenParams = z.strictObject({ app_key: AppKey, window: ChatPlace });\n/** Reload an open window's page (⌘R) so it re-reads its chat list; its chats keep running. */\nexport const AppsWindowsReloadParams = z.strictObject({ app_key: AppKey, window: ChatPlace });\n/** Quit and reopen a window; refused (CONFLICT) while chats are open in it unless `force`. */\n/**\n * What a window's sidebar draws right now (read-only: Accessibility, no focus, no input). A closed\n * window draws nothing (`open` false, `sections` empty); `problem` says why an open one could not be read.\n */\nexport const ShownSection = z.strictObject({\n title: z.string().max(300),\n /** Rows drawn under it (a collapsed section draws none). */\n rows: z.number().int().nonnegative(),\n expanded: z.boolean(),\n});\nexport const AppsWindowsShownParams = z.strictObject({ app_key: AppKey, window: ChatPlace });\nexport const AppsWindowsShownResult = z.strictObject({\n window: ChatPlace,\n open: z.boolean(),\n sections: z.array(ShownSection).max(200),\n problem: z.string().max(400).nullable(),\n});\n/**\n * 1.50: turn a window's Remote Control setting on or off. A closed window's settings file is written\n * now; an open one's change is queued and written on its next close or Restart (as pins are).\n */\nexport const AppsWindowsSetRemoteControlParams = z.strictObject({ app_key: AppKey, window: ChatPlace, enabled: z.boolean() });\nexport const AppsWindowsSetRemoteControlResult = z.strictObject({\n message: z.string().max(400),\n /** \"now\" = written into the closed window; \"next_close\" = queued until it closes. */\n when: z.enum([\"now\", \"next_close\"]),\n remote_control: WindowRemoteControl,\n});\nexport const AppsWindowsRestartParams = z.strictObject({ app_key: AppKey, window: ChatPlace, force: z.boolean().default(false) });\n/** Open a closed window in the background until it records a fresh usage reading, then close it. */\nexport const AppsWindowsRefreshUsageParams = z.strictObject({ app_key: AppKey, window: ChatPlace });\n\n/** Move a chat from one project to another (made if new by name). */\nexport const AppsProjectsMoveParams = z.strictObject({\n app_key: AppKey,\n chat_id: ChatId,\n from_project_id: ChatProjectId,\n to_project_id: ChatProjectId.optional(),\n new_project_name: z.string().min(1).max(200).optional(),\n});\nexport const AppsProjectsMoveResult = z.strictObject({ chat: ChatRow, project: ChatProject });\n\n/** A new, empty project. */\nexport const AppsProjectsCreateParams = z.strictObject({ app_key: AppKey, name: z.string().min(1).max(200) });\nexport const AppsProjectsCreateResult = z.strictObject({ project: ChatProject });\n\n/** Refresh pins: the Unsorted project becomes every pinned chat in no other project (never touches the app's pins). */\nexport const AppsProjectsImportPinsParams = z.strictObject({ app_key: AppKey });\nexport const AppsProjectsImportPinsResult = z.strictObject({ message: z.string().max(400) });\n\n/** 1.19: one chat named in a whole-project move (its id and title as listed). */\nexport const ProjectMoveChat = z.strictObject({ chat_id: ChatId, title: z.string().max(300) });\n/** 1.19: a chat the move leaves alone in one window (null: the chat itself), and why. */\nexport const ProjectMoveSkip = z.strictObject({ chat_id: ChatId, title: z.string().max(300), window: ChatPlace.nullable(), reason: z.string().max(400) });\n/** 1.19: the sidebar group named after the project in the target window: done/planned, or why not. */\nexport const ProjectMoveGroup = z.strictObject({\n ok: z.boolean(),\n name: z.string().max(200),\n /** Why it is not (or was not) grouped — e.g. the window is open. */\n reason: z.string().max(400).optional(),\n /** Chats that get (or got) the group; already in it; taken from another group of the window. */\n assign: nonNegInt.optional(),\n already: nonNegInt.optional(),\n from_other_groups: nonNegInt.optional(),\n /** A group of that name was already there (reused, never doubled). */\n group_exists: z.boolean().optional(),\n /** 1.43: \"now\" = written into the closed window; \"next_close\" = queued until that window closes. */\n when: z.enum([\"now\", \"next_close\"]).optional(),\n /** 1.43: the window's own id of the group used (absent while a new one waits to be made). */\n group_id: z.string().max(200).optional(),\n});\n\n/**\n * 1.43: one chat of a to-window pass and what happened to it: copied (still where it was),\n * moved (taken off `off`, or a Move from main, which keeps every chat), already there, or\n * skipped (`reason`). Its pin and group in the target: \"now\", \"next_close\" (queued until the\n * window closes), \"failed\"; null = not asked, or not this chat.\n */\nexport const ProjectMoveOutcome = z.strictObject({\n chat_id: ChatId,\n title: z.string().max(300),\n outcome: z.enum([\"copied\", \"moved\", \"already\", \"skipped\"]),\n off: z.array(ChatPlace).max(50),\n reason: z.string().max(400).nullable(),\n pin: z.enum([\"now\", \"next_close\", \"failed\"]).nullable(),\n group: z.enum([\"now\", \"next_close\", \"failed\"]).nullable(),\n});\n\n/** 1.43: one of a window's own sidebar groups (Claude's custom groups) and how many chats it holds. */\nexport const WindowGroup = z.strictObject({ id: z.string().max(200), name: z.string().max(200), count: nonNegInt });\n/** 1.43: a window's own sidebar groups (read only; its live list while it is open). */\nexport const AppsWindowsGroupsParams = z.strictObject({ app_key: AppKey, window: ChatPlace });\nexport const AppsWindowsGroupsResult = z.strictObject({\n window: ChatPlace,\n open: z.boolean(),\n groups: z.array(WindowGroup).max(1000),\n});\n\n/**\n * 1.32: pinning them in the target window. A window's pins are its own list (Claude's settings\n * file), written only while that window is closed; for an open window they are queued and written\n * when it next closes. Counts are what happened (or, on a dry run, what would): never a claimed pin.\n */\nexport const ProjectMovePin = z.strictObject({\n ok: z.boolean(),\n /** \"now\" = written into the closed window; \"next_close\" = queued until that window closes. */\n when: z.enum([\"now\", \"next_close\"]),\n /** Pinned by this call (dry run: would be). */\n pinned: nonNegInt,\n /** Already pinned there. */\n already: nonNegInt,\n /** Waiting for the window to close (dry run: would wait). */\n queued: nonNegInt,\n /** Why not pinned (ok false), or why queued. */\n reason: z.string().max(400).optional(),\n});\n\n/** 1.19: every chat of a project into one window (dry_run = the plan only, nothing written). */\nexport const AppsProjectsToWindowParams = z.strictObject({\n app_key: AppKey,\n project_id: ChatProjectId,\n window: ChatPlace,\n /** Also take each chat off its other side windows where safe (never main, the holder, an open window). */\n take_off: z.boolean().default(false),\n /** Also group them under the project's name in that window's sidebar (1.43: an open window's is queued for its next close). */\n group: z.boolean().default(false),\n /** 1.43: group them into this existing group of the window (apps.windows.groups); implies group. */\n group_id: z.string().min(1).max(200).optional(),\n /** 1.43: group them under this name (an existing group of that name is reused, else made); implies group. */\n group_name: z.string().trim().min(1).max(200).optional(),\n /** 1.32: also pin them in that window (now if closed, else when it next closes). */\n pin: z.boolean().optional(),\n /** 1.36: a batch: exactly these chats of the project and no other (a reused marker is a label, never a sweep). */\n chat_ids: z.array(ChatId).min(1).max(5000).optional(),\n /** 1.36: take them off this one side window only (a Move's origin), never main or another window that lists them. */\n take_off_from: ChatPlace.optional(),\n dry_run: z.boolean().default(false),\n});\nexport const AppsProjectsToWindowResult = z.strictObject({\n project_id: ChatProjectId,\n window: ChatPlace,\n dry_run: z.boolean(),\n place: z.array(ProjectMoveChat).max(5000),\n already: z.array(ProjectMoveChat).max(5000),\n take_off: z.array(ProjectMoveChat.extend({ window: ChatPlace })).max(20000),\n skipped: z.array(ProjectMoveSkip).max(20000),\n /** Chats of the project from other apps (no windows to place into), left as they are. */\n other_apps: nonNegInt,\n group: ProjectMoveGroup.nullable(),\n /** 1.32: the pin in the target window (absent: not asked). */\n pin: ProjectMovePin.optional(),\n /** 1.43: one row per chat, what happened to it (absent from an older core). */\n chats: z.array(ProjectMoveOutcome).max(5000).optional(),\n message: z.string().max(400),\n});\n\n/**\n * 1.72: ONE chat home, from its move records alone (never a project): home is where its newest\n * move not brought back yet came from; it comes off only where it went (a copy never comes off).\n * The answer is a to-window pass into its home, `project_id` null.\n */\nexport const AppsChatsBringBackParams = z.strictObject({ app_key: AppKey, chat_id: ChatId, dry_run: z.boolean().optional() });\nexport const AppsChatsBringBackResult = AppsProjectsToWindowResult.extend({ project_id: ChatProjectId.nullable() });\n\n/**\n * 1.72: one app's facet in a tidy-up run (ours pushed into the app): what its state is, and what\n * the run pushed (`to_push` in a dry run), found already so, left waiting (the app is open) or failed.\n */\nexport const TidyUpFacet = z.strictObject({\n app_key: AppKey,\n facet: z.enum([\"title\", \"pin\"]),\n state: z.enum([\"synced\", \"not_synced\", \"unsupported\"]),\n note: z.string().max(400),\n to_push: nonNegInt,\n pushed: nonNegInt,\n already: nonNegInt,\n waiting: nonNegInt,\n failed: nonNegInt,\n});\n/** 1.72: a Claude window that holds an old name while it runs: quit and reopened only when the person says so. */\nexport const TidyUpRestart = z.strictObject({ window: ChatPlace, why: z.string().max(400) });\n/**\n * 1.72: push ours (titles, pins) into every app whose facet can take it. `dry_run` = the plan only.\n * `restart_windows`: the Claude windows the person agreed to quit and reopen (from a plan's `restart`).\n */\nexport const AppsChatsTidyUpParams = z.strictObject({ dry_run: z.boolean(), restart_windows: z.array(ChatPlace).max(64).optional() });\nexport const AppsChatsTidyUpResult = z.strictObject({\n dry_run: z.boolean(),\n facets: z.array(TidyUpFacet).max(32),\n /** Claude windows that would keep an old name until they reopen (the plan lists them; nothing is quit unasked). */\n restart: z.array(TidyUpRestart).max(64),\n /** The windows this run quit and reopened. */\n restarted: z.array(ChatPlace).max(64),\n message: z.string().max(600),\n});\n\nexport type WindowRemoteControl = z.output<typeof WindowRemoteControl>;\nexport type AppsWindowsSetRemoteControlParams = z.output<typeof AppsWindowsSetRemoteControlParams>;\nexport type AppsWindowsSetRemoteControlResult = z.output<typeof AppsWindowsSetRemoteControlResult>;\nexport type AppWindowInfo = z.output<typeof AppWindowInfo>;\nexport type AccountUsage = z.output<typeof AccountUsage>;\nexport type AccountReset = z.output<typeof AccountReset>;\nexport type AppsWindowsListParams = z.output<typeof AppsWindowsListParams>;\nexport type AppsWindowsListResult = z.output<typeof AppsWindowsListResult>;\nexport type AppsAccountsUsageParams = z.output<typeof AppsAccountsUsageParams>;\nexport type AppsAccountsUsageResult = z.output<typeof AppsAccountsUsageResult>;\nexport type AppsAccountsResetsParams = z.output<typeof AppsAccountsResetsParams>;\nexport type AppsAccountsResetsResult = z.output<typeof AppsAccountsResetsResult>;\nexport type AppsWindowActionResult = z.output<typeof AppsWindowActionResult>;\nexport type AppsWindowsOpenParams = z.output<typeof AppsWindowsOpenParams>;\nexport type AppsWindowsReloadParams = z.output<typeof AppsWindowsReloadParams>;\nexport type AppsWindowsRestartParams = z.output<typeof AppsWindowsRestartParams>;\nexport type AppsWindowsRefreshUsageParams = z.output<typeof AppsWindowsRefreshUsageParams>;\nexport type AppsProjectsMoveParams = z.output<typeof AppsProjectsMoveParams>;\nexport type AppsProjectsMoveResult = z.output<typeof AppsProjectsMoveResult>;\nexport type AppsProjectsCreateParams = z.output<typeof AppsProjectsCreateParams>;\nexport type AppsProjectsCreateResult = z.output<typeof AppsProjectsCreateResult>;\nexport type AppsProjectsImportPinsParams = z.output<typeof AppsProjectsImportPinsParams>;\nexport type AppsProjectsImportPinsResult = z.output<typeof AppsProjectsImportPinsResult>;\n\n// ── 1.11: the rest of the coding app's tools (Going cold, Spend, sync health, windows upkeep) ──\n\n/** A chat waiting for the person, with when its prompt cache goes cold and what waking it costs (API list prices, USD). */\nexport const ColdChat = z.strictObject({\n id: ChatId,\n title: z.string().max(1000),\n repo: z.string().max(200).nullable(),\n window: z.string().max(64).nullable(),\n account: z.string().max(320).nullable(),\n model_name: z.string().max(120).nullable(),\n context_tokens: nonNegInt,\n cold_at_ms: epochMs,\n /** Waking it once the cache is cold. */\n cold_cost: z.number().nullable(),\n /** Waking it while the cache is warm. */\n warm_cost: z.number().nullable(),\n /** Its account is on extra usage (a 5-minute cache, and real money). */\n extra_usage: z.boolean(),\n /** A scheduled routine's run. */\n scheduled: z.boolean(),\n /** It can be shown in its window (started in the desktop app). */\n openable: z.boolean(),\n /** How its window was decided, or why it can't be opened. */\n how: z.string().max(200).nullable(),\n /** 1.78: the person hid this chat from Matrx's lists (our Hide, as on ChatRow.hidden); absent = shown. */\n hidden: z.boolean().optional(),\n});\n\nexport const AppsChatsColdParams = z.strictObject({ app_key: AppKey });\nexport const AppsChatsColdResult = z.strictObject({\n app_key: AppKey,\n /** Waiting for the person with a warm cache, most urgent first. */\n waiting: z.array(ColdChat).max(2000),\n /** Went cold in the last while. */\n recently_cold: z.array(ColdChat).max(2000),\n /** Chats working right now (not waiting). */\n working: nonNegInt,\n});\n\n/** One window's copies of a chat whose name differs from the chat's right name. */\nexport const TitleCopies = z.strictObject({\n window: ChatPlace,\n /** Record copies in that window holding a different name (main keeps one per account folder). */\n copies: nonNegInt,\n titles: z.array(z.strictObject({ title: z.string().max(2000), source: z.string().max(32) })).max(50),\n});\n/** A chat that does not have one name everywhere: the right name, and where it differs. */\nexport const TitleMismatch = z.strictObject({\n chat_id: ChatId,\n /** The right name: the latest one a person gave it (in any window, or in Matrx), else the newest automatic title. */\n title: z.string().max(2000),\n title_source: z.enum([\"user\", \"auto\"]),\n /** Where the right name came from: a window, \"matrx\", or \"ledger\" (decided earlier). */\n decided_from: z.string().max(64),\n kind: z.enum([\"user_vs_auto\", \"user_vs_user\", \"auto_vs_auto\", \"source_only\"]),\n windows: z.array(ChatPlace).max(200),\n differs_in: z.array(TitleCopies).max(200),\n});\n/** A window that keeps writing chat names that were already replaced back from its memory. */\nexport const StaleTitleWindow = z.strictObject({\n window: ChatPlace,\n /** First and latest time (ms) it was seen writing an old name back. */\n since_ms: nonNegInt,\n last_ms: nonNegInt,\n});\nexport const AppsChatsTitlesCheckParams = z.strictObject({ app_key: AppKey });\nexport const AppsChatsTitlesCheckResult = z.strictObject({\n app_key: AppKey,\n chats_total: nonNegInt,\n chats_in_several_windows: nonNegInt,\n /** Chats with a different name in some window (or in Matrx). */\n chats_with_a_different_name: nonNegInt,\n copies_to_write: nonNegInt,\n chats: z.array(TitleMismatch).max(5000),\n /** Windows that keep writing old names back (each is fixed every pass; reloading it, Cmd+R, stops it). Since 1.33. */\n stale_windows: z.array(StaleTitleWindow).max(200).optional(),\n});\n/** Write each chat's right name into every copy in every window (one chat with chat_id). */\nexport const AppsChatsTitlesPushParams = z.strictObject({ app_key: AppKey, chat_id: ChatId.optional(), dry_run: z.boolean().optional() });\nexport const AppsChatsTitlesPushResult = z.strictObject({\n app_key: AppKey,\n /** Record files rewritten (title and titleSource only, each backed up first). */\n written: nonNegInt,\n chats_fixed: nonNegInt,\n /** Copies that could not be written (left for the next push). */\n failed: nonNegInt,\n /** Still different after the push (dry_run: would be written). */\n chats_with_a_different_name: nonNegInt,\n});\n\n/** Show one chat in its window (Claude's own \"Continue session\" link, sent to that window only); never sends it anything. */\nexport const AppsChatsOpenParams = z.strictObject({ app_key: AppKey, chat_id: ChatId, window: ChatPlace.optional() });\n\n/** Main conversation and helpers, USD at API list prices. */\nexport const SpendSplit = z.strictObject({ main: z.number(), helpers: z.number() });\nexport const SpendScopes = z.strictObject({ today: SpendSplit, week: SpendSplit });\n\nexport const SpendAccount = z.strictObject({\n account: z.string().max(320),\n spend: SpendScopes,\n last_hour: z.number().nullable(),\n last_5h: z.number().nullable(),\n five_hour: z.number().nullable(),\n weekly: z.number().nullable(),\n as_of_ms: epochMs.nullable(),\n weekly_resets_at_ms: epochMs.nullable(),\n /** When the 5-hour or weekly limit is projected to be reached at the current burn. */\n five_hour_full_at_ms: epochMs.nullable(),\n weekly_full_at_ms: epochMs.nullable(),\n /** The reading is too old to project. */\n stale: z.boolean(),\n});\nexport const SpendModel = z.strictObject({ model: z.string().max(120), name: z.string().max(120), spend: SpendScopes });\nexport const SpendChat = z.strictObject({\n id: ChatId,\n title: z.string().max(1000),\n repo: z.string().max(200).nullable(),\n window: z.string().max(64).nullable(),\n spend: SpendScopes,\n helpers: nonNegInt,\n /** 1.78: the person hid this chat from Matrx's lists (our Hide, as on ChatRow.hidden); absent = shown. */\n hidden: z.boolean().optional(),\n});\nexport const SpendHelper = z.strictObject({ model: z.string().max(120), steps: nonNegInt, over_steps: z.boolean(), description: z.string().max(400) });\nexport const SpendLive = z.strictObject({\n id: ChatId,\n title: z.string().max(1000),\n window: z.string().max(64).nullable(),\n helpers: z.array(SpendHelper).max(200),\n /** 1.78: the person hid this chat from Matrx's lists (our Hide, as on ChatRow.hidden); absent = shown. */\n hidden: z.boolean().optional(),\n});\nexport const SpendIdleScope = z.strictObject({ count: nonNegInt, tokens: nonNegInt, cost: z.number(), avoidable: z.number() });\n/** Idle cache re-saves, grouped by chat and by who re-saved (the chat itself or one helper). */\nexport const SpendIdle = z.strictObject({\n id: ChatId,\n chat: z.string().max(1000),\n who: z.string().max(400),\n today: SpendIdleScope,\n week: SpendIdleScope,\n last_ms: epochMs,\n /** 1.78: the person hid this chat from Matrx's lists (our Hide, as on ChatRow.hidden); absent = shown. */\n hidden: z.boolean().optional(),\n});\n/** How big each repo's helpers start (their first request's tokens). */\nexport const SpendStart = z.strictObject({ repo: z.string().max(200), count: nonNegInt, median: nonNegInt, latest: z.array(nonNegInt).max(20), alarm: z.string().max(400).nullable() });\n\n/** (1.24) One day's spend, for Screen Time's bar chart: the local date and its split. */\nexport const SpendDay = z.strictObject({ date: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}$/), main: z.number(), helpers: z.number() });\nexport const AppsSpendParams = z.strictObject({ app_key: AppKey });\nexport const AppsSpendResult = z.strictObject({\n app_key: AppKey,\n /** False while older chats are still being read. */\n complete: z.boolean(),\n today_total: z.number(),\n week_total: z.number(),\n idle_today: z.number(),\n idle_week: z.number(),\n /** Models with no known list price. */\n unpriced: z.array(z.string().max(120)).max(100),\n /** Helpers past their step budget, unusual starting sizes. */\n alarms: z.array(z.string().max(400)).max(200),\n live: z.array(SpendLive).max(200),\n accounts: z.array(SpendAccount).max(200),\n models: z.array(SpendModel).max(100),\n /** (1.24) The last 7 days, oldest first (today last). */\n days: z.array(SpendDay).max(14).optional(),\n chats: z.array(SpendChat).max(500),\n idle: z.array(SpendIdle).max(500),\n starts: z.array(SpendStart).max(200),\n});\n\n/** The chat sync's own read-only health check (is every chat reaching main?). */\nexport const AppsSyncStatusParams = z.strictObject({ app_key: AppKey });\nexport const AppsSyncStatusResult = z.strictObject({\n healthy: z.boolean(),\n summary: z.string().max(400),\n problems: z.array(z.string().max(400)).max(200),\n warnings: z.array(z.string().max(400)).max(200),\n /** Accounts seen with no saved name yet (Save account names fixes them). */\n unnamed_accounts: z.array(z.string().max(80)).max(200),\n /** The full report. */\n output: z.string().max(200_000),\n});\n/** Run the chat sync now (main shows the result within a minute). */\nexport const AppsSyncRunParams = z.strictObject({ app_key: AppKey });\n\n/** The app's processes still running (an app update installs only when there are none). */\nexport const AppsWindowsProcessesParams = z.strictObject({ app_key: AppKey });\nexport const AppsWindowsProcessesResult = z.strictObject({ processes: z.array(z.string().max(2000)).max(2000) });\n\n/** A window for another account: a short lowercase name and the account's email. */\nexport const AppsWindowsAddParams = z.strictObject({ app_key: AppKey, window: ChatPlace, email: z.string().min(3).max(320) });\n/** Save each window's signed-in account id → its email, so every list shows names. */\nexport const AppsWindowsSaveNamesParams = z.strictObject({ app_key: AppKey });\n\n// ── 1.26: the app's own update (Claude's \"stealth update\" quits windows one by one) ──\n\n/**\n * Whether the app has downloaded an update that installs only once every window has quit, and the\n * windows that closed while it waited (they do not come back by themselves). Apps without such an\n * updater answer `pending` false.\n */\nexport const AppsWindowsUpdateStateParams = z.strictObject({ app_key: AppKey });\nexport const AppsWindowsUpdateStateResult = z.strictObject({\n app_key: AppKey,\n pending: z.boolean(),\n /** The downloaded release's name (Claude: \"Claude 2.31226.1\"), when the app's log names it. */\n version: z.string().max(120).nullable(),\n /** When the update became pending (the download's time), when known. */\n since_ms: epochMs.nullable(),\n /** Windows open when the update became pending (or last seen open) that are closed now. */\n closed: z.array(ChatPlace).max(200),\n /**\n * Since 1.27: the windows in `closed` that the update itself quit (the app's log records a quit for\n * the update within a minute of when each was last seen running). Absent: not known.\n */\n closed_by_update: z.array(ChatPlace).max(200).optional(),\n});\n/** Open these windows again (main first), one at a time. */\nexport const AppsWindowsReopenParams = z.strictObject({ app_key: AppKey, windows: z.array(ChatPlace).min(1).max(200) });\nexport const AppsWindowsReopenResult = z.strictObject({ message: z.string().max(400), opened: z.array(ChatPlace).max(200) });\n/**\n * Install the pending update and bring every window back: quits the open windows (refused with\n * CONFLICT while chats are open in any, unless `force`), waits for the install, then reopens main\n * first and the rest after. `dry_run` answers the plan only.\n */\nexport const AppsWindowsUpdateAndReopenParams = z.strictObject({ app_key: AppKey, force: z.boolean().default(false), dry_run: z.boolean().default(false) });\nexport const AppsWindowsUpdateAndReopenResult = z.strictObject({\n message: z.string().max(400),\n /** Windows quit (with dry_run: to be quit). */\n quit: z.array(ChatPlace).max(200),\n /** Windows reopened (with dry_run: to be reopened), main first. */\n reopened: z.array(ChatPlace).max(200),\n /** The version installed, null when the install did not happen (or dry_run). */\n installed_version: z.string().max(64).nullable(),\n});\n\nexport type ColdChat = z.output<typeof ColdChat>;\nexport type AppsChatsColdParams = z.output<typeof AppsChatsColdParams>;\nexport type AppsChatsColdResult = z.output<typeof AppsChatsColdResult>;\nexport type AppsChatsOpenParams = z.output<typeof AppsChatsOpenParams>;\nexport type TitleCopies = z.output<typeof TitleCopies>;\nexport type TitleMismatch = z.output<typeof TitleMismatch>;\nexport type AppsChatsTitlesCheckParams = z.output<typeof AppsChatsTitlesCheckParams>;\nexport type AppsChatsTitlesCheckResult = z.output<typeof AppsChatsTitlesCheckResult>;\nexport type StaleTitleWindow = z.output<typeof StaleTitleWindow>;\nexport type AppsChatsTitlesPushParams = z.output<typeof AppsChatsTitlesPushParams>;\nexport type AppsChatsTitlesPushResult = z.output<typeof AppsChatsTitlesPushResult>;\nexport type SpendSplit = z.output<typeof SpendSplit>;\nexport type SpendScopes = z.output<typeof SpendScopes>;\nexport type SpendAccount = z.output<typeof SpendAccount>;\nexport type SpendModel = z.output<typeof SpendModel>;\nexport type SpendChat = z.output<typeof SpendChat>;\nexport type SpendHelper = z.output<typeof SpendHelper>;\nexport type SpendLive = z.output<typeof SpendLive>;\nexport type SpendIdleScope = z.output<typeof SpendIdleScope>;\nexport type SpendIdle = z.output<typeof SpendIdle>;\nexport type SpendStart = z.output<typeof SpendStart>;\nexport type SpendDay = z.output<typeof SpendDay>;\nexport type AppsSpendParams = z.output<typeof AppsSpendParams>;\nexport type AppsSpendResult = z.output<typeof AppsSpendResult>;\nexport type AppsSyncStatusParams = z.output<typeof AppsSyncStatusParams>;\nexport type AppsSyncStatusResult = z.output<typeof AppsSyncStatusResult>;\nexport type AppsSyncRunParams = z.output<typeof AppsSyncRunParams>;\nexport type AppsWindowsProcessesParams = z.output<typeof AppsWindowsProcessesParams>;\nexport type AppsWindowsProcessesResult = z.output<typeof AppsWindowsProcessesResult>;\nexport type AppsWindowsAddParams = z.output<typeof AppsWindowsAddParams>;\nexport type AppsWindowsSaveNamesParams = z.output<typeof AppsWindowsSaveNamesParams>;\nexport type ProjectMoveChat = z.output<typeof ProjectMoveChat>;\nexport type ProjectMoveSkip = z.output<typeof ProjectMoveSkip>;\nexport type ProjectMoveGroup = z.output<typeof ProjectMoveGroup>;\nexport type AppsProjectsToWindowParams = z.output<typeof AppsProjectsToWindowParams>;\nexport type AppsProjectsToWindowResult = z.output<typeof AppsProjectsToWindowResult>;\nexport type AppsChatsBringBackParams = z.output<typeof AppsChatsBringBackParams>;\nexport type AppsChatsBringBackResult = z.output<typeof AppsChatsBringBackResult>;\nexport type TidyUpFacet = z.output<typeof TidyUpFacet>;\nexport type TidyUpRestart = z.output<typeof TidyUpRestart>;\nexport type AppsChatsTidyUpParams = z.output<typeof AppsChatsTidyUpParams>;\nexport type AppsChatsTidyUpResult = z.output<typeof AppsChatsTidyUpResult>;\nexport type ProjectMovePin = z.output<typeof ProjectMovePin>;\nexport type ShownSection = z.output<typeof ShownSection>;\nexport type ProjectMoveOutcome = z.output<typeof ProjectMoveOutcome>;\nexport type WindowGroup = z.output<typeof WindowGroup>;\nexport type AppsWindowsGroupsParams = z.output<typeof AppsWindowsGroupsParams>;\nexport type AppsWindowsGroupsResult = z.output<typeof AppsWindowsGroupsResult>;\nexport type AppsWindowsShownParams = z.output<typeof AppsWindowsShownParams>;\nexport type AppsWindowsShownResult = z.output<typeof AppsWindowsShownResult>;\nexport type AppsWindowsUpdateStateParams = z.output<typeof AppsWindowsUpdateStateParams>;\nexport type AppsWindowsUpdateStateResult = z.output<typeof AppsWindowsUpdateStateResult>;\nexport type AppsWindowsReopenParams = z.output<typeof AppsWindowsReopenParams>;\nexport type AppsWindowsReopenResult = z.output<typeof AppsWindowsReopenResult>;\nexport type AppsWindowsUpdateAndReopenParams = z.output<typeof AppsWindowsUpdateAndReopenParams>;\nexport type AppsWindowsUpdateAndReopenResult = z.output<typeof AppsWindowsUpdateAndReopenResult>;\n\n/**\n * 1.55: copy (or move) chats to another account with their organization, in ONE engine pass\n * (Arman, 2026-10-16). Each chat lands in the target's group of the same name it had in the origin\n * (made when missing), a chat pinned in the origin is pinned there too, and a copy groups them in the\n * origin as `source_group` (\"Copied to <target>\"). `restart`: \"queued\" writes what it can now and\n * queues an open window's groups and pins for its next close; \"restart_verify\" closes both windows\n * (never one with chats running: then it falls back to queued and says why), applies everything,\n * reads every chat back and reopens the windows that were open. Every chat ends verified, queued or\n * failed with its reason.\n */\nexport const AppsChatsCopyToAccountParams = z.strictObject({\n app_key: AppKey,\n origin: ChatPlace,\n target: ChatPlace,\n chat_ids: z.array(ChatId).min(1).max(500),\n mode: z.enum([\"copy\", \"move\"]).default(\"copy\"),\n restart: z.enum([\"queued\", \"restart_verify\"]).default(\"queued\"),\n /** Put each chat in the target group named as its origin group (default true). */\n mirror_groups: z.boolean().default(true),\n /** Pin in the target the chats pinned in the origin (default true). */\n pins_follow: z.boolean().default(true),\n /** A copy: group them in the origin under this name (\"Copied to <target>\"). */\n source_group: z.string().trim().min(1).max(200).optional(),\n});\nexport const CopiedChat = z.strictObject({\n chat_id: ChatId,\n title: z.string().max(500),\n outcome: z.enum([\"copied\", \"moved\", \"already\", \"skipped\"]),\n /** The target group it was put in (its origin group's name), or null. */\n group: z.string().max(200).nullable(),\n group_state: z.enum([\"now\", \"next_close\", \"failed\"]).nullable(),\n pinned: z.boolean(),\n pin_state: z.enum([\"now\", \"next_close\", \"failed\"]).nullable(),\n /** The read-back: verified, waiting for a window to close (queued), or failed. */\n state: z.enum([\"verified\", \"queued\", \"failed\"]),\n reason: z.string().max(400).nullable(),\n});\n/** 1.60: how one window the restart closed came back: it reopened (proven running) or it did not, and why. */\nexport const CopyReopened = z.strictObject({ window: ChatPlace, ok: z.boolean(), reason: z.string().max(400).nullable() });\nexport const CopyRestart = z.strictObject({\n asked: z.enum([\"queued\", \"restart_verify\"]),\n done: z.enum([\"queued\", \"restart_verify\"]),\n windows: z.array(ChatPlace).max(2),\n reason: z.string().max(400).nullable(),\n /** 1.60: each closed window's reopen outcome (absent from a 1.59 core, and when no window was closed): `ok: false` is a window that did not come back. */\n reopened: z.array(CopyReopened).max(2).optional(),\n});\nexport const AppsChatsCopyToAccountResult = z.strictObject({\n message: z.string().max(400),\n origin: ChatPlace,\n target: ChatPlace,\n mode: z.enum([\"copy\", \"move\"]),\n /** The marker the chats are filed under (\"From <origin>\"), for Bring back. */\n project: z.strictObject({ id: ChatProjectId, name: z.string().max(200) }),\n /** The target groups used, by name: made or reused, now or at the next close. */\n groups: z.array(z.strictObject({ name: z.string().max(200), chats: z.number().int().nonnegative(), ok: z.boolean(), when: z.enum([\"now\", \"next_close\"]).nullable(), reason: z.string().max(400).nullable() })).max(500),\n source_group: z.strictObject({ name: z.string().max(200), ok: z.boolean(), when: z.enum([\"now\", \"next_close\"]).nullable(), reason: z.string().max(400).nullable() }).nullable(),\n chats: z.array(CopiedChat).max(500),\n verified: z.number().int().nonnegative(),\n queued: z.number().int().nonnegative(),\n failed: z.number().int().nonnegative(),\n /** What the restart choice did: \"restart_verify\" closed and reopened `windows`; a fall back to \"queued\" says why. */\n restart: CopyRestart,\n});\nexport type AppsChatsCopyToAccountParams = z.output<typeof AppsChatsCopyToAccountParams>;\nexport type CopiedChat = z.output<typeof CopiedChat>;\nexport type CopyReopened = z.output<typeof CopyReopened>;\nexport type CopyRestart = z.output<typeof CopyRestart>;\nexport type AppsChatsCopyToAccountResult = z.output<typeof AppsChatsCopyToAccountResult>;\n","/**\n * @ai-matrx/desktop-protocol — cap apps, instances and accounts kept apart (protocol 1.47).\n *\n * An ACCOUNT is one sign-in at a provider (Anthropic for Claude, OpenAI for Codex), keyed by the\n * provider's own account id; its usage, resets and plan belong to it alone. An INSTANCE is one data\n * folder of an app on this device (the main instance is the app's own folder; every other one is the\n * same install started with a folder of its own), signed into one account at a time. The same account\n * signed in at two instances is one account row; an instance shows its account's figures by its id.\n * Schema source: lint-enforced rules in scripts/check-schema-source.mjs.\n */\nimport { z } from \"zod\";\nimport { AppKey } from \"./apps\";\nimport { ChatPlace } from \"./apps-chats\";\nimport { epochMs, nonNegInt } from \"./primitives\";\n\n/** One word for an instance's state: open, closed, signed into another account than it is kept for,\n * running an older version than the one installed, or its folder gone. */\nexport const InstanceStatus = z.enum([\"open\", \"closed\", \"wrong_account\", \"update_waiting\", \"folder_missing\"]);\n\n/** The app's program on this computer. */\nexport const AppInstall = z.strictObject({\n location: z.string().max(1024),\n version: z.string().max(80).nullable(),\n});\n\n/** 1.63: what an instance record still lacks (filled the next time it is read: ledger D10): who is signed in, that account's email, the version it runs or last ran. */\nexport const InstanceGap = z.enum([\"account\", \"email\", \"version\"]);\n\n/** One instance of the app on this device. */\nexport const AppInstance = z.strictObject({\n app_key: AppKey,\n /** \"main\", or the instance's name: the same key every window action takes. */\n key: ChatPlace,\n main: z.boolean(),\n status: InstanceStatus,\n running: z.boolean(),\n /** Its process while open. */\n pid: nonNegInt.nullable(),\n /** Its data folder on this device. */\n folder: z.string().max(1024).nullable(),\n folder_exists: z.boolean(),\n /** The provider's id of the account signed in there now, when the app records it. */\n account_id: z.string().max(200).nullable(),\n /** That account's email, when known. */\n account: z.string().max(320).nullable(),\n /** The account this instance is kept for (null for main: it signs into any). */\n meant_for: z.string().max(320).nullable(),\n /** The version running in it now, or the one it last ran when closed. */\n version: z.string().max(80).nullable(),\n installed_version: z.string().max(80).nullable(),\n /** Chats open in it now. */\n open_chats: nonNegInt,\n launched_ms: epochMs.nullable(),\n quit_ms: epochMs.nullable(),\n first_launch_ms: epochMs.nullable(),\n /** 1.63: what this record still lacks after Matrx filled what it remembered (absent = nothing). */\n missing: z.array(InstanceGap).max(3).optional(),\n});\n\n/**\n * 1.71: an instance on ANOTHER of the person's computers, as that computer last wrote it to the\n * database (ledger D7/D8/B14). Read only: nothing here acts on this computer.\n */\nexport const ElsewhereInstance = z.strictObject({\n app_key: AppKey,\n /** Its key on its own computer (\"main\", or its name). */\n key: z.string().max(120),\n main: z.boolean(),\n /** The computer it is on, by its name in Devices. */\n computer: z.string().max(200),\n /** Its data folder, as that computer shows it (a label: it is not on this computer). */\n folder: z.string().max(1024).nullable(),\n account_id: z.string().max(200).nullable(),\n account: z.string().max(320).nullable(),\n /** When that computer last read it. */\n seen_ms: epochMs.nullable(),\n});\n\n/** Where a weekly reset time came from: the app's own reading, a reset seen in its usage history, or the person's list. */\nexport const AccountResetSource = z.enum([\"app\", \"usage_history\", \"your_list\"]);\n\n/** What an account record still lacks (filled in the next time an instance signed into it opens). */\nexport const AccountGap = z.enum([\"email\", \"plan\", \"usage\"]);\n\n/** 1.73: where an account's newest usage reading came from: the app itself, or Claude Code's own live-usage file (read with no network). */\nexport const AccountReadSource = z.enum([\"app\", \"claude_code\"]);\n\n/**\n * 1.73: who the account is at its provider beyond its email, as the app's own files record it\n * (an allow-list of named fields only: never a token, cookie, key or OAuth cache). Each field is null\n * when the app does not record it.\n */\nexport const AccountProfile = z.strictObject({\n /** The person's name on the account. */\n name: z.string().max(200).nullable(),\n /** The organization the sign-in is in, and the person's role there. */\n org_name: z.string().max(200).nullable(),\n org_role: z.string().max(80).nullable(),\n /** Claude: the seat tier of a team plan, the rate-limit tier, how it is billed, when a trial ends. */\n seat_tier: z.string().max(80).nullable(),\n rate_limit_tier: z.string().max(120).nullable(),\n billing: z.string().max(80).nullable(),\n trial_ends_ms: epochMs.nullable(),\n /** Cursor: whether the subscription is active (\"active\", \"canceled\", …) as Cursor records it. */\n subscription: z.string().max(80).nullable(),\n /** Where these facts were read (a short label: \"Claude Code's sign-in\"). */\n source: z.string().max(200),\n /** When the app last fetched them, when it says. */\n as_of_ms: epochMs.nullable(),\n});\n\n/** One account at the app's provider: who it is, and its newest usage reading from any instance. */\nexport const AppAccount = z.strictObject({\n app_key: AppKey,\n /** The provider's own account id (Claude's account uuid, ChatGPT's account id); `org:<uuid>` when only its organization is known. */\n account_id: z.string().max(200),\n email: z.string().max(320).nullable(),\n plan: z.string().max(80).nullable(),\n /** The provider organizations its readings are filed under. */\n orgs: z.array(z.string().max(80)).max(20),\n /** Weekly use in percent; 0 once the week reset after the reading. */\n weekly: z.number().nullable(),\n weekly_reset_since: z.boolean(),\n weekly_resets_at_ms: epochMs.nullable(),\n weekly_reset_source: AccountResetSource.nullable(),\n /** 5-hour use in percent; 0 once the 5-hour window passed after the reading. */\n five_hour: z.number().nullable(),\n five_hour_reset_since: z.boolean(),\n /** The latest the 5-hour window resets. */\n five_hour_resets_at_ms: epochMs.nullable(),\n /** Claude: extra-usage spend as a percent of its cap. */\n extra_usage: z.number().nullable(),\n /** Codex: the credit balance. */\n credits: z.number().nullable(),\n /** When the newest reading was taken, and in which instance. */\n read_at_ms: epochMs.nullable(),\n read_in: ChatPlace.nullable(),\n /** Instances signed into it now. */\n instances: z.array(ChatPlace).max(200),\n first_seen_ms: epochMs.nullable(),\n last_seen_ms: epochMs.nullable(),\n missing: z.array(AccountGap).max(3),\n /** 1.73: who the account is beyond its email (plan details, role, tiers), when the app records it. */\n profile: AccountProfile.optional(),\n /** 1.73: where the newest reading came from (absent = the app itself). */\n read_source: AccountReadSource.optional(),\n /** 1.73: Claude Code: the running session's cost as Claude Code estimates it (US dollars), with a Claude Code reading. */\n session_cost_usd: z.number().nonnegative().optional(),\n});\n\n/**\n * 1.51: both lists answer at once from the core's last reading (kept across restarts) and read again\n * in the background; `fresh` waits for a new reading instead (a Refresh button). The answer says when\n * it was read (`as_of_ms`) and whether a newer reading is on its way (`refreshing`).\n */\nexport const AppsInstancesListParams = z.strictObject({ app_key: AppKey, fresh: z.boolean().optional() });\nexport const AppsInstancesListResult = z.strictObject({\n app_key: AppKey,\n install: AppInstall.nullable(),\n instances: z.array(AppInstance).max(200),\n /** The rows are right but something around them failed; shown, never hidden. */\n problem: z.string().max(400).optional(),\n as_of_ms: epochMs.optional(),\n refreshing: z.boolean().optional(),\n /** 1.71: this computer's name (the Computer of every `instances` row). */\n computer: z.string().max(200).optional(),\n /** 1.71: the person's instances on their other computers, from the database (read only). */\n elsewhere: z.array(ElsewhereInstance).max(500).optional(),\n /** 1.71: the database copy could not be read or written (signed out, offline): the rows are this computer's alone. */\n shared_problem: z.string().max(200).optional(),\n});\n\nexport const AppsAccountsListParams = z.strictObject({ app_key: AppKey, fresh: z.boolean().optional() });\nexport const AppsAccountsListResult = z.strictObject({\n app_key: AppKey,\n accounts: z.array(AppAccount).max(500),\n problem: z.string().max(400).optional(),\n as_of_ms: epochMs.optional(),\n refreshing: z.boolean().optional(),\n /** 1.71: the database copy could not be read or written (signed out, offline): the rows are this computer's memory alone. */\n shared_problem: z.string().max(200).optional(),\n});\n\nexport type InstanceStatus = z.output<typeof InstanceStatus>;\nexport type InstanceGap = z.output<typeof InstanceGap>;\nexport type AppInstall = z.output<typeof AppInstall>;\nexport type AppInstance = z.output<typeof AppInstance>;\nexport type ElsewhereInstance = z.output<typeof ElsewhereInstance>;\nexport type AccountResetSource = z.output<typeof AccountResetSource>;\nexport type AccountGap = z.output<typeof AccountGap>;\nexport type AppAccount = z.output<typeof AppAccount>;\nexport type AccountReadSource = z.output<typeof AccountReadSource>;\nexport type AccountProfile = z.output<typeof AccountProfile>;\nexport type AppsInstancesListParams = z.output<typeof AppsInstancesListParams>;\nexport type AppsInstancesListResult = z.output<typeof AppsInstancesListResult>;\nexport type AppsAccountsListParams = z.output<typeof AppsAccountsListParams>;\nexport type AppsAccountsListResult = z.output<typeof AppsAccountsListResult>;\n\n/** 1.56: change the account an instance is kept for (its name, folder and everything filed under it stay). */\nexport const AppsWindowsSetAccountParams = z.strictObject({ app_key: AppKey, window: ChatPlace, email: z.string().min(3).max(320) });\n/** 1.56: take an instance off the app's list; nothing is deleted (its folder and sign-in stay; adding it again brings it back). Refused while it is open. */\nexport const AppsWindowsForgetParams = z.strictObject({ app_key: AppKey, window: ChatPlace });\n\n/** 1.56: one raw fact a source holds about a chat (its own key and value, JSON as text), never interpreted. */\nexport const ProbeFact = z.strictObject({ key: z.string().max(200), value: z.string().max(2000) });\n/** Everything one source holds about a chat: an app's record copy in one instance, its sidebar there, the Claude tools' files, Matrx's own row. */\nexport const ProbeSource = z.strictObject({ source: z.string().max(120), instance: z.string().max(64).nullable(), facts: z.array(ProbeFact).max(500) });\n/** 1.56: every raw fact every source holds about one chat, side by side (the chats ledger's probe, C9). */\nexport const AppsChatsProbeParams = z.strictObject({ app_key: AppKey, chat_id: z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/) });\nexport const AppsChatsProbeResult = z.strictObject({ app_key: AppKey, chat_id: z.string().max(128), sources: z.array(ProbeSource).max(200) });\n\nexport type AppsWindowsSetAccountParams = z.output<typeof AppsWindowsSetAccountParams>;\nexport type AppsWindowsForgetParams = z.output<typeof AppsWindowsForgetParams>;\nexport type ProbeFact = z.output<typeof ProbeFact>;\nexport type ProbeSource = z.output<typeof ProbeSource>;\nexport type AppsChatsProbeParams = z.output<typeof AppsChatsProbeParams>;\nexport type AppsChatsProbeResult = z.output<typeof AppsChatsProbeResult>;\n\n/** 1.73: how an MCP server is reached. */\nexport const McpTransport = z.enum([\"stdio\", \"http\", \"sse\", \"unknown\"]);\n\n/**\n * 1.73: one MCP server an app is set up with on this computer: its name, how it is reached and\n * where (a URL without its query or sign-in part, or the command it runs), never its env or headers.\n */\nexport const McpServerRow = z.strictObject({\n app_key: AppKey,\n /** The app's instance whose settings hold it (\"main\", a home's name). */\n instance: z.string().max(120),\n name: z.string().max(200),\n transport: McpTransport,\n /** The URL (scheme, host and path only) or the command and its arguments (secret-looking ones blanked). */\n target: z.string().max(400).nullable(),\n /** \"user\" (every folder), \"desktop\" (the desktop app), or the folder it is set up for. */\n scope: z.string().max(400),\n /** Turned on or off in the app, when it records it. */\n enabled: z.boolean().nullable(),\n /** The settings file it was read from. */\n where: z.string().max(400),\n});\n\n/** 1.73: one named setting as the app keeps it (\"Model\" · \"gpt-6-astra\"), from an allow-list. */\nexport const SetupFact = z.strictObject({ name: z.string().max(80), value: z.string().max(300) });\n\n/** 1.73: one thing installed in or offered to an app: an extension, a plugin, a marketplace, a model. */\nexport const SetupItemKind = z.enum([\"extension\", \"plugin\", \"marketplace\", \"model\"]);\nexport const SetupItem = z.strictObject({\n kind: SetupItemKind,\n name: z.string().max(200),\n version: z.string().max(80).nullable(),\n /** Turned on or off, when the app records it. */\n enabled: z.boolean().nullable(),\n});\n\n/** 1.73: one app instance's setup: its settings, models, plugins and extensions, read from its own files. */\nexport const AppSetup = z.strictObject({\n app_key: AppKey,\n instance: z.string().max(120),\n /** The folder its settings were read from. */\n where: z.string().max(400),\n facts: z.array(SetupFact).max(60),\n items: z.array(SetupItem).max(2000),\n /** What could not be read there (shown, never hidden). */\n problems: z.array(z.string().max(300)).max(20),\n});\n\n/** 1.73: every app's setup and MCP servers on this computer (one app, or all). Read only. */\nexport const AppsSetupListParams = z.strictObject({ app_key: AppKey.optional() });\nexport const AppsSetupListResult = z.strictObject({\n setups: z.array(AppSetup).max(200),\n mcp: z.array(McpServerRow).max(2000),\n problem: z.string().max(400).optional(),\n});\n\nexport type McpTransport = z.output<typeof McpTransport>;\nexport type McpServerRow = z.output<typeof McpServerRow>;\nexport type SetupFact = z.output<typeof SetupFact>;\nexport type SetupItemKind = z.output<typeof SetupItemKind>;\nexport type SetupItem = z.output<typeof SetupItem>;\nexport type AppSetup = z.output<typeof AppSetup>;\nexport type AppsSetupListParams = z.output<typeof AppsSetupListParams>;\nexport type AppsSetupListResult = z.output<typeof AppsSetupListResult>;\n","/**\n * @ai-matrx/desktop-protocol — the internal envelope between Matrx 2's core and its supervised\n * Python services (SPEC §3.10). Schema source: lint-enforced rules in scripts/check-schema-source.mjs.\n *\n * Never seen by a client: clients speak the Router protocol (envelope.ts); a capability owner in\n * the core forwards a Router op to its service op (SERVICES in registry.ts). One local socket per\n * service (a Unix socket on macOS/Linux, a named pipe on Windows). Each message is one frame:\n * a 4-byte big-endian length, then that many bytes of UTF-8 JSON (at most SERVICE_MAX_FRAME_BYTES).\n *\n * The first message on a connection is `hello` (the per-launch token the core handed the service\n * in its environment, plus the contract hash it was built against). A wrong token or a different\n * contract is answered with `error` id 0 and the connection is closed: the two sides of the\n * connection were generated from different contracts and must never talk (SPEC P11).\n */\nimport { z } from \"zod\";\nimport { ProtocolErrorBody } from \"./errors\";\nimport { nonNegInt, u32 } from \"./primitives\";\n\n/** The largest frame either side accepts (16 MiB). */\nexport const SERVICE_MAX_FRAME_BYTES = 16_777_216 as const;\n\n/** Supervised Python services. */\nexport const ServiceName = z.enum([\"ml\", \"coding\", \"tools\"]);\n\n/** SHA-256 (hex) of generated/desktop-protocol.schema.json: CONTRACT_SHA256 on both sides. */\nexport const ContractHash = z.string().regex(/^[0-9a-f]{64}$/);\n\n/** The per-launch secret: 32 random bytes, base64url (43 characters). Passed by environment, never argv. */\nexport const ServiceToken = z.string().regex(/^[A-Za-z0-9_-]{43}$/);\n\n/** Request ids on a service connection: 1 and up; 0 answers a refused hello. (u32, inlined.) */\nconst ServiceRequestId = u32;\n\nexport const ServiceHello = z.strictObject({ type: z.literal(\"hello\"), token: ServiceToken, contract: ContractHash });\n\nexport const ServiceWelcome = z.strictObject({\n type: z.literal(\"welcome\"),\n service: ServiceName,\n contract: ContractHash,\n pid: nonNegInt,\n /** The interpreter's version, e.g. \"3.13.15\". */\n python: z.string().max(32),\n /** Every op this service serves; must equal SERVICES[service] exactly. */\n ops: z.array(z.string().min(1).max(64)).max(64),\n});\n\nexport const ServiceRequest = z.strictObject({\n type: z.literal(\"request\"),\n id: ServiceRequestId,\n op: z.string().min(1).max(64),\n params: z.unknown(), // validated by the service against SERVICES[service][op].params\n});\n\nexport const ServiceResponse = z.strictObject({\n type: z.literal(\"response\"),\n id: ServiceRequestId,\n result: z.unknown(), // validated by the core against SERVICES[service][op].result\n});\n\nexport const ServiceErrorMsg = z.strictObject({ type: z.literal(\"error\"), id: ServiceRequestId, error: ProtocolErrorBody });\n\n/** A running request's progress (validated against the service's progress schema). */\nexport const ServiceProgressMsg = z.strictObject({ type: z.literal(\"progress\"), id: ServiceRequestId, progress: z.unknown() });\n\nexport const ServiceCancel = z.strictObject({ type: z.literal(\"cancel\"), id: ServiceRequestId });\n\n/** Health check: the service answers `pong` at once from its event loop, even while it works. */\nexport const ServicePing = z.strictObject({ type: z.literal(\"ping\"), id: ServiceRequestId });\nexport const ServicePong = z.strictObject({\n type: z.literal(\"pong\"),\n id: ServiceRequestId,\n /** Requests running now. */\n busy: nonNegInt,\n});\n\n/** Finish quickly: cancel running work, answer nothing more, exit 0. */\nexport const ServiceShutdown = z.strictObject({ type: z.literal(\"shutdown\") });\n\nexport const CoreToServiceMsg = z.discriminatedUnion(\"type\", [ServiceHello, ServiceRequest, ServiceCancel, ServicePing, ServiceShutdown]);\nexport const ServiceToCoreMsg = z.discriminatedUnion(\"type\", [ServiceWelcome, ServiceResponse, ServiceErrorMsg, ServiceProgressMsg, ServicePong]);\n\nexport type ServiceName = z.output<typeof ServiceName>;\nexport type CoreToServiceMsg = z.output<typeof CoreToServiceMsg>;\nexport type ServiceToCoreMsg = z.output<typeof ServiceToCoreMsg>;\nexport type ServiceWelcome = z.output<typeof ServiceWelcome>;\n\n// Every schema's type beside it (type-exports.test.ts).\nexport type ContractHash = z.output<typeof ContractHash>;\nexport type ServiceToken = z.output<typeof ServiceToken>;\nexport type ServiceHello = z.output<typeof ServiceHello>;\nexport type ServiceRequest = z.output<typeof ServiceRequest>;\nexport type ServiceResponse = z.output<typeof ServiceResponse>;\nexport type ServiceErrorMsg = z.output<typeof ServiceErrorMsg>;\nexport type ServiceProgressMsg = z.output<typeof ServiceProgressMsg>;\nexport type ServiceCancel = z.output<typeof ServiceCancel>;\nexport type ServicePing = z.output<typeof ServicePing>;\nexport type ServicePong = z.output<typeof ServicePong>;\nexport type ServiceShutdown = z.output<typeof ServiceShutdown>;\n","/**\n * @ai-matrx/desktop-protocol — local tool proof records (SPEC §10). Schema source: lint-enforced\n * rules in scripts/check-schema-source.mjs.\n *\n * A tool is \"working\" only when three levels pass: programmatic (its owner, called directly on the\n * real OS), protocol (through the transports, including the relay), chat (a real platform agent in a\n * real chat calls it and gets the right result). Every harness that proves a level — the desktop's\n * vitest suites, aidream's live pytest — writes `ToolResultsFile`s; the status table is generated\n * from them (src/tools/status.ts) and is never written by hand. This file is the one contract\n * between those harnesses: the Pydantic twin in aidream/_generated/desktop_protocol.py is generated\n * from it, so the Python writers and the TS reader cannot drift.\n */\nimport { z } from \"zod\";\n\nexport const ToolLevel = z.enum([\"programmatic\", \"protocol\", \"chat\"]);\nexport const ToolOutcome = z.enum([\"pass\", \"fail\", \"skip\"]);\nexport const ToolPlatform = z.enum([\"darwin\", \"win32\", \"linux\"]);\n/**\n * How the call reached the owner. `in_process` is level 1; `localhost` and `relay` are level 2;\n * `agent` is level 3 (a model chose the call). `relay` means the platform's real path: a matrx-ai\n * tool → aidream local-proxy → the relay → the device.\n */\nexport const ToolTransport = z.enum([\"in_process\", \"localhost\", \"relay\", \"agent\"]);\n\n/** Tool names are the platform registry's (`tool.definition.name`): `fs_read`, `shell_execute`… */\nexport const ToolName = z\n .string()\n .min(1)\n .max(64)\n .regex(/^[a-z][a-z0-9_]*$/);\n\nexport const ToolLevelResult = z.strictObject({\n tool: ToolName,\n level: ToolLevel,\n platform: ToolPlatform,\n transport: ToolTransport,\n outcome: ToolOutcome,\n /** True when the caller sat on a different network from the device (a phone on cellular, CI). */\n remote_network: z.boolean(),\n /** One line: what was asserted, or why it failed. Never a token, a file's contents or a path under a real home. */\n detail: z.string().max(500),\n /** The harness that produced it, e.g. `matrx-desktop test/tools/programmatic.test.ts`. */\n suite: z.string().min(1).max(200),\n /** The test case inside the suite. */\n test: z.string().min(1).max(300),\n run_at_ms: z.int().min(0),\n /**\n * Chat level: how many tool calls the agent's turn made, of any tool. `0` means the turn never\n * exercised a tool (the model answered in prose, or the chat request failed), so the result is\n * no evidence about the tool: it never turns a cell red. Absent on older results.\n */\n calls_made: z.int().min(0).optional(),\n});\n\nexport const ToolResultsFile = z.strictObject({\n schema: z.literal(\"matrx.tool-results.v1\"),\n /** The producing repo's commit (short or full SHA). */\n commit: z.string().min(4).max(64),\n results: z.array(ToolLevelResult).max(10_000),\n});\n\nexport type ToolLevel = z.output<typeof ToolLevel>;\nexport type ToolOutcome = z.output<typeof ToolOutcome>;\nexport type ToolPlatform = z.output<typeof ToolPlatform>;\nexport type ToolTransport = z.output<typeof ToolTransport>;\nexport type ToolLevelResult = z.output<typeof ToolLevelResult>;\nexport type ToolResultsFile = z.output<typeof ToolResultsFile>;\n","/**\n * @ai-matrx/desktop-protocol — cap proc (SPEC §6): the processes running on the person's computer,\n * the ports they listen on, and stopping one. Schema source: lint-enforced rules in\n * scripts/check-schema-source.mjs. Added in protocol 1.3.\n */\nimport { z } from \"zod\";\nimport { nonNegInt } from \"./primitives\";\n\nexport const ProcSort = z.enum([\"cpu\", \"memory\", \"pid\", \"name\"]);\n\nexport const ProcListParams = z.strictObject({\n /** Case-insensitive substring of the process name or its command line. */\n name: z.string().min(1).max(128).optional(),\n sort: ProcSort.default(\"cpu\"),\n limit: z.int().min(1).max(500).default(50),\n});\n\nexport const ProcInfo = z.strictObject({\n pid: z.int().min(0),\n /** Parent process id; null where the OS does not report it. */\n ppid: z.int().min(0).nullable(),\n name: z.string().max(256),\n /** The command line, cut to 1024 characters. */\n command: z.string().max(1024),\n /** Share of one core, as `ps` and Task Manager report it; null where the OS does not say. */\n cpu_percent: z.number().min(0).nullable(),\n memory_bytes: nonNegInt.nullable(),\n user: z.string().max(128).nullable(),\n});\n\nexport const ProcListResult = z.strictObject({\n processes: z.array(ProcInfo).max(500),\n /** Processes that matched before `limit`. */\n total: nonNegInt,\n truncated: z.boolean(),\n});\n\nexport const ProcPortsParams = z.strictObject({\n /** Only this port. */\n port: z.int().min(1).max(65535).optional(),\n});\n\nexport const ProcPort = z.strictObject({\n port: z.int().min(1).max(65535),\n protocol: z.enum([\"tcp\", \"udp\"]),\n /** The local address it listens on (\"127.0.0.1\", \"*\", \"::\"). */\n address: z.string().max(64),\n pid: z.int().min(0).nullable(),\n process: z.string().max(256).nullable(),\n});\n\nexport const ProcPortsResult = z.strictObject({ ports: z.array(ProcPort).max(4000) });\n\nexport const ProcKillParams = z.strictObject({\n pid: z.int().min(1),\n /** Kill outright (SIGKILL; on Windows the same /F) instead of asking it to quit. */\n force: z.boolean().default(false),\n});\n\nexport const ProcKillResult = z.strictObject({\n pid: z.int().min(1),\n signal: z.enum([\"SIGTERM\", \"SIGKILL\"]),\n /** True when the process was gone within 3 s. */\n exited: z.boolean(),\n});\n\nexport type ProcListParams = z.output<typeof ProcListParams>;\nexport type ProcListResult = z.output<typeof ProcListResult>;\nexport type ProcInfo = z.output<typeof ProcInfo>;\nexport type ProcPortsParams = z.output<typeof ProcPortsParams>;\nexport type ProcPortsResult = z.output<typeof ProcPortsResult>;\nexport type ProcPort = z.output<typeof ProcPort>;\nexport type ProcKillParams = z.output<typeof ProcKillParams>;\nexport type ProcKillResult = z.output<typeof ProcKillResult>;\n\n// Every schema's type beside it (type-exports.test.ts).\nexport type ProcSort = z.output<typeof ProcSort>;\n","/**\n * @ai-matrx/desktop-protocol — cap clipboard (SPEC §6): the system clipboard's text. Schema source:\n * lint-enforced rules in scripts/check-schema-source.mjs. Added in protocol 1.3.\n */\nimport { z } from \"zod\";\nimport { nonNegInt } from \"./primitives\";\n\nexport const ClipboardReadParams = z.strictObject({});\nexport const ClipboardReadResult = z.strictObject({\n /** The clipboard's text (\"\" when it holds none), cut to 1 MiB. */\n text: z.string().max(1_048_576),\n truncated: z.boolean(),\n});\n\nexport const ClipboardWriteParams = z.strictObject({ text: z.string().max(1_048_576) });\nexport const ClipboardWriteResult = z.strictObject({ bytes: nonNegInt });\n\nexport type ClipboardReadResult = z.output<typeof ClipboardReadResult>;\nexport type ClipboardWriteParams = z.output<typeof ClipboardWriteParams>;\nexport type ClipboardWriteResult = z.output<typeof ClipboardWriteResult>;\n\n// Every schema's type beside it (type-exports.test.ts).\nexport type ClipboardReadParams = z.output<typeof ClipboardReadParams>;\n","/**\n * @ai-matrx/desktop-protocol — cap git (SPEC §6): git operations for agents on the person's own\n * computer, the same set the cloud sandbox serves at /git/* (matrx-sandbox matrx_agent/api/git.py),\n * so an agent cannot tell a laptop from a sandbox (SPEC §6.1). The core runs the system `git`; a\n * computer without git answers PLATFORM_UNSUPPORTED. A git refusal (rejected push, conflict, nothing\n * to commit) is CONFLICT with git's own words as the message. Schema source: lint-enforced rules in\n * scripts/check-schema-source.mjs. Added in protocol 1.22.\n */\nimport { z } from \"zod\";\nimport { AbsPath, nonNegInt } from \"./primitives\";\n\n/** The longest output any git op returns; longer output is cut and says so (`truncated`). */\nexport const GIT_MAX_OUTPUT_CHARS = 262_144 as const;\n\nconst GitText = z.string().max(GIT_MAX_OUTPUT_CHARS);\n/** A ref, remote or branch name as git spells it (no leading dash: never read as an option). */\nconst GitName = z.string().min(1).max(255).regex(/^[^-\\s][^\\s]*$/);\n\n/** What any git op that only reports its output returns. */\nexport const GitOutputResult = z.strictObject({ output: GitText, truncated: z.boolean() });\n\nexport const GitStatusParams = z.strictObject({ cwd: AbsPath });\nexport const GitStatusFile = z.strictObject({\n path: z.string(),\n /** Porcelain v1 status letters: index (staged) and worktree; \"?\" for untracked. */\n index: z.string().length(1),\n worktree: z.string().length(1),\n});\nexport const GitStatusResult = z.strictObject({\n /** The checked-out branch; null when HEAD is detached. */\n branch: z.string().nullable(),\n upstream: z.string().nullable(),\n ahead: nonNegInt,\n behind: nonNegInt,\n files: z.array(GitStatusFile).max(5000),\n clean: z.boolean(),\n /** More than 5000 changed files: the list is cut. */\n truncated: z.boolean(),\n});\n\nexport const GitDiffParams = z.strictObject({ cwd: AbsPath, path: z.string().max(4096).optional(), staged: z.boolean().default(false) });\nexport const GitDiffResult = z.strictObject({ diff: GitText, truncated: z.boolean() });\n\nexport const GitLogParams = z.strictObject({ cwd: AbsPath, limit: z.int().min(1).max(500).default(50) });\nexport const GitLogCommit = z.strictObject({ sha: z.string(), short: z.string(), author: z.string(), date: z.string(), subject: z.string() });\nexport const GitLogResult = z.strictObject({ commits: z.array(GitLogCommit).max(500) });\n\nexport const GitAddParams = z.strictObject({ cwd: AbsPath, paths: z.array(z.string().min(1).max(4096)).min(1).max(1000) });\n\nexport const GitCommitParams = z.strictObject({\n cwd: AbsPath,\n message: z.string().min(1).max(65_536),\n amend: z.boolean().default(false),\n /** \"Name <email>\"; absent = the computer's own git identity. */\n author: z.string().max(512).optional(),\n});\nexport const GitCommitResult = z.strictObject({ sha: z.string(), output: GitText, truncated: z.boolean() });\n\nexport const GitPushParams = z.strictObject({ cwd: AbsPath, remote: GitName.default(\"origin\"), branch: GitName.optional(), force_with_lease: z.boolean().default(false) });\nexport const GitPullParams = z.strictObject({ cwd: AbsPath, remote: GitName.default(\"origin\"), branch: GitName.optional(), rebase: z.boolean().default(false) });\n\nexport const GitBranchParams = z.strictObject({ cwd: AbsPath, action: z.enum([\"list\", \"create\", \"delete\", \"switch\"]), name: GitName.optional() });\nexport const GitBranchResult = z.strictObject({\n /** The branch checked out after the action; null when detached. */\n current: z.string().nullable(),\n /** Local branches (filled by `list`; empty otherwise). */\n branches: z.array(z.string()).max(5000),\n output: GitText,\n truncated: z.boolean(),\n});\n\nexport const GitStashParams = z.strictObject({ cwd: AbsPath, action: z.enum([\"push\", \"pop\", \"list\", \"drop\"]), message: z.string().max(4096).optional() });\n\nexport const GitCloneParams = z.strictObject({\n url: z.string().min(1).max(4096).regex(/^[^-]/),\n /** The folder to create; must not exist yet (or be empty). */\n dest: AbsPath,\n branch: GitName.optional(),\n depth: z.int().min(1).max(1_000_000).optional(),\n});\n\nexport type GitOutputResult = z.output<typeof GitOutputResult>;\nexport type GitStatusParams = z.output<typeof GitStatusParams>;\nexport type GitStatusFile = z.output<typeof GitStatusFile>;\nexport type GitStatusResult = z.output<typeof GitStatusResult>;\nexport type GitDiffParams = z.output<typeof GitDiffParams>;\nexport type GitDiffResult = z.output<typeof GitDiffResult>;\nexport type GitLogParams = z.output<typeof GitLogParams>;\nexport type GitLogCommit = z.output<typeof GitLogCommit>;\nexport type GitLogResult = z.output<typeof GitLogResult>;\nexport type GitAddParams = z.output<typeof GitAddParams>;\nexport type GitCommitParams = z.output<typeof GitCommitParams>;\nexport type GitCommitResult = z.output<typeof GitCommitResult>;\nexport type GitPushParams = z.output<typeof GitPushParams>;\nexport type GitPullParams = z.output<typeof GitPullParams>;\nexport type GitBranchParams = z.output<typeof GitBranchParams>;\nexport type GitBranchResult = z.output<typeof GitBranchResult>;\nexport type GitStashParams = z.output<typeof GitStashParams>;\nexport type GitCloneParams = z.output<typeof GitCloneParams>;\n","/**\n * @ai-matrx/desktop-protocol — cap web (SPEC §3.10, §6): fetch, scrape, search and browser-fetch\n * from the person's own computer, on its own network and IP. Served by the `tools` Python service,\n * which runs the platform's one scraper (`matrx_scraper`) in its local lane (no proxy, ever: the\n * point of the device lane is the person's own connection). The core forwards each Router op to its\n * service op (SERVICES.tools in registry.ts). Schema source: lint-enforced rules in\n * scripts/check-schema-source.mjs. Added in protocol 1.22. 1.40: every page read here is saved as a\n * Source (land, source), the server lane, search through AI Matrx, the browser runtime, the outbox,\n * the Scrape log and research fetch.\n */\nimport { UUID_SHAPE_PATTERN } from \"@ai-matrx/kit/uuid\";\nimport { z } from \"zod\";\nimport { nonNegInt, RequestId } from \"./primitives\";\n\n/** The most text any web op returns per page; longer text is cut and says so (`truncated`). */\nexport const WEB_MAX_TEXT_CHARS = 524_288 as const;\n\nconst WebUrl = z.string().min(1).max(8192).regex(/^https?:\\/\\//);\nconst WebText = z.string().max(WEB_MAX_TEXT_CHARS);\n/** An organization id: a plain pattern (a uuid format plus a pattern breaks the Pydantic twin). */\nconst OrgId = z.string().regex(UUID_SHAPE_PATTERN);\n\nexport const WebHeader = z.strictObject({ name: z.string().min(1).max(256), value: z.string().max(8192) });\n\n// ── web.fetch: one HTTP request, no rendering (matrx-local FetchUrl) ──────────────────────────\nexport const WebFetchParams = z.strictObject({\n url: WebUrl,\n method: z.enum([\"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\", \"HEAD\", \"OPTIONS\"]).default(\"GET\"),\n headers: z.array(WebHeader).max(64).default([]),\n body: z.string().max(1_048_576).optional(),\n follow_redirects: z.boolean().default(true),\n timeout_s: z.int().min(1).max(300).default(30),\n});\nexport const WebFetchResult = z.strictObject({\n status: z.int().min(100).max(999),\n reason: z.string(),\n /** The final URL after redirects. */\n url: z.string(),\n content_type: z.string().nullable(),\n headers: z.array(WebHeader),\n body: WebText,\n truncated: z.boolean(),\n bytes: nonNegInt,\n elapsed_ms: nonNegInt,\n});\n\n// ── Landing: every page this computer reads becomes a Source (since 1.38) ───────────────────────\n/** An entity a saved page is filed against (`platform.associations`, the door's AttachTarget). */\nexport const WebAttachTarget = z.strictObject({\n entity_type: z.string().min(1).max(64),\n entity_id: z.string().min(1).max(128),\n label: z.string().max(200).optional(),\n});\n/**\n * Where and how a read page is saved (since 1.38). Absent: saved in the organization this computer\n * is signed in to, not kept. The core saves every page it reads, for every caller (the person's own\n * screens, an agent through the relay, the phone), through AI Matrx's one desktop door\n * (`POST /scraper/content/save`).\n */\nexport const WebLand = z.strictObject({\n /** The organization the page is saved in; absent: this computer's active organization. */\n organization_id: OrgId.optional(),\n /** Keep it: AI processing starts (chunks, search). Unkept pages are saved and wait. */\n keep: z.boolean().default(false),\n attach_to: z.array(WebAttachTarget).max(8).default([]),\n});\n/** Why a read page is not saved yet. The page is never lost: it waits in this computer's outbox. */\nexport const WebNotSavedReason = z.enum([\n /** Nobody is signed in on this computer. Saved on sign-in. */\n \"signed_out\",\n /** AI Matrx could not be reached. Retried on its own. */\n \"offline\",\n /** AI Matrx refused it (the message says why). Kept until the person retries or discards it. */\n \"rejected\",\n /** Waiting its turn behind other pages (retried on its own). */\n \"queued\",\n]);\nexport const WebSourceNotice = z.strictObject({ code: z.string().max(120), message: z.string().max(2000), remedy: z.string().max(120) });\n/** A read page's Source (since 1.38): saved (the door's LandedSource), or waiting in the outbox. */\nexport const WebSourceState = z.discriminatedUnion(\"state\", [\n z.strictObject({\n state: z.literal(\"saved\"),\n processed_document_id: z.string().min(1).max(64),\n source_id: z.string().min(1).max(128),\n /** The page was already saved and nothing changed (\"Already saved, no change\"). */\n reused_existing: z.boolean(),\n /** The page changed: this is a new version of that Source. */\n new_version_of: z.string().max(64).nullable(),\n kept: z.boolean(),\n intelligence: z.enum([\"queued\", \"deferred\", \"never\"]),\n /** The original page as captured, kept by AI Matrx (null: the organization keeps none). */\n original_file_id: z.string().max(128).nullable(),\n /** The organization it was saved in. */\n organization_id: OrgId,\n notices: z.array(WebSourceNotice).max(20),\n }),\n z.strictObject({\n state: z.literal(\"not_saved\"),\n outbox_id: z.string().min(1).max(64),\n reason: WebNotSavedReason,\n message: z.string().max(2000),\n }),\n]);\n\n// ── web.scrape: matrx_scraper's local lane (matrx-local Scrape) ─────────────────────────────────\nexport const WebScrapeParams = z.strictObject({\n urls: z.array(WebUrl).min(1).max(20),\n use_cache: z.boolean().default(true),\n get_links: z.boolean().default(false),\n /**\n * Since 1.38. `auto` (absent): this computer's scraper (HTTP, its browser only when a page needs\n * it). `browser`: this computer's own browser renders every page. `server`: AI Matrx's servers\n * read it (their connection, not this computer's; saved there as a web capture).\n */\n engine: z.enum([\"auto\", \"browser\", \"server\"]).optional(),\n /** Since 1.38: where the pages are saved (see WebLand). */\n land: WebLand.optional(),\n});\nexport const WebScrapePage = z.strictObject({\n url: z.string(),\n ok: z.boolean(),\n status: z.int().min(0).max(999).nullable(),\n title: z.string().nullable(),\n /** The page's readable content (markdown-like text from the scraper's parse). */\n text: WebText,\n truncated: z.boolean(),\n /** Links found on the page (only with get_links). */\n links: z.array(z.string()).max(2000),\n /** Why the page failed (blocked, timeout, not found…), in the scraper's words; null when ok. */\n error: z.string().nullable(),\n /** How the page was fetched (http, browser, cache). */\n via: z.string().nullable(),\n /** Since 1.38: the page's Source (absent from a 1.37 core, and for a page that failed). */\n source: WebSourceState.optional(),\n});\nexport const WebScrapeResult = z.strictObject({ pages: z.array(WebScrapePage), elapsed_ms: nonNegInt });\n\n// ── web.search: Brave Search through matrx_scraper (matrx-local Search) ─────────────────────────\nexport const WebSearchParams = z.strictObject({\n keywords: z.array(z.string().min(1).max(400)).min(1).max(5),\n country: z.string().min(2).max(2).default(\"us\"),\n count: z.int().min(1).max(20).default(10),\n freshness: z.enum([\"pd\", \"pw\", \"pm\", \"py\"]).optional(),\n});\nexport const WebSearchHit = z.strictObject({ title: z.string(), url: z.string(), description: z.string() });\nexport const WebSearchQueryResult = z.strictObject({ keyword: z.string(), hits: z.array(WebSearchHit), error: z.string().nullable() });\nexport const WebSearchResult = z.strictObject({ queries: z.array(WebSearchQueryResult), elapsed_ms: nonNegInt });\n/** The service op's params: exactly the Router op's. No provider key ever reaches the computer: search runs on the server. */\nexport const ToolsWebSearchParams = z.strictObject({\n keywords: z.array(z.string().min(1).max(400)).min(1).max(5),\n country: z.string().min(2).max(2).default(\"us\"),\n count: z.int().min(1).max(20).default(10),\n freshness: z.enum([\"pd\", \"pw\", \"pm\", \"py\"]).optional(),\n});\n\n// ── web.fetch_with_browser: a real browser renders the page (matrx-local FetchWithBrowser) ───────\nexport const WebBrowserFetchParams = z.strictObject({\n url: WebUrl,\n /** A CSS selector to wait for before reading the page. */\n wait_for: z.string().max(1024).optional(),\n wait_timeout_ms: z.int().min(100).max(120_000).default(30_000),\n /** true: readable text; false: the rendered HTML. */\n extract_text: z.boolean().default(true),\n /** Since 1.38: where the rendered page is saved (see WebLand). */\n land: WebLand.optional(),\n});\nexport const WebBrowserFetchResult = z.strictObject({\n url: z.string(),\n status: z.int().min(0).max(999).nullable(),\n title: z.string().nullable(),\n content: WebText,\n truncated: z.boolean(),\n elapsed_ms: nonNegInt,\n /** Since 1.38: the rendered page's Source (absent from a 1.37 core). */\n source: WebSourceState.optional(),\n});\n\n// ── The tools service's own ops (since 1.38): the core passes the knobs, the service hands back\n// each page's whole parse as a file the core saves through the door (never through the socket).\n/** One page's whole parse (`ScrapeResult.to_dict_with_html()`), written gzipped by the service. */\nexport const ToolsParseFile = z.strictObject({\n /** Absolute path of the gzipped JSON the core reads, saves and then removes. */\n path: z.string().min(1).max(4096),\n bytes: nonNegInt,\n});\nexport const ToolsWebScrapeParams = z.strictObject({\n urls: z.array(WebUrl).min(1).max(20),\n use_cache: z.boolean().default(true),\n get_links: z.boolean().default(false),\n /** `browser`: render every page in this computer's browser, then parse it. */\n engine: z.enum([\"auto\", \"browser\"]).default(\"auto\"),\n /** Pages read at once (desktop.web/scrape_concurrency). */\n concurrency: z.int().min(1).max(20).default(5),\n /** The wait between pages from the same site (desktop.web/request_delay_ms). */\n delay_ms: z.int().min(0).max(30_000).default(0),\n /** Where the parse files go (the core's spool folder). */\n spool_dir: z.string().min(1).max(4096),\n});\nexport const ToolsWebScrapePage = z.strictObject({\n page: WebScrapePage,\n /** The page's whole parse, for the door; null when the page failed or had no words. */\n parse: ToolsParseFile.nullable(),\n /** The page as fetched, for research (rendered HTML or the HTTP body); null when not kept. */\n html: ToolsParseFile.nullable(),\n});\nexport const ToolsWebScrapeResult = z.strictObject({ pages: z.array(ToolsWebScrapePage), elapsed_ms: nonNegInt });\nexport const ToolsWebBrowserFetchParams = z.strictObject({\n url: WebUrl,\n wait_for: z.string().max(1024).optional(),\n wait_timeout_ms: z.int().min(100).max(120_000).default(30_000),\n extract_text: z.boolean().default(true),\n spool_dir: z.string().min(1).max(4096),\n});\nexport const ToolsWebBrowserFetchResult = z.strictObject({ result: WebBrowserFetchResult, parse: ToolsParseFile.nullable() });\n\n// ── web.runtime.*: this computer's browser for reading pages (since 1.38) ───────────────────────\nexport const WebRuntimeStateName = z.enum([\"not_installed\", \"installing\", \"installed\", \"failed\"]);\nexport const WebRuntimeParams = z.strictObject({});\nexport const WebRuntimeState = z.strictObject({\n state: WebRuntimeStateName,\n /** Why it failed, in the installer's words; null otherwise. */\n error: z.string().max(2000).nullable(),\n /** Bytes the browser takes on this computer (its packages and Chromium); null when unknown. */\n size_bytes: nonNegInt.nullable(),\n /** Whether it can show a window while it works (false: only the headless shell is installed). */\n can_show_window: z.boolean(),\n});\n\n// ── web.outbox.*: pages read here that are not saved yet (since 1.38) ───────────────────────────\nexport const WebOutboxItem = z.strictObject({\n outbox_id: z.string().min(1).max(64),\n url: z.string().max(8192),\n title: z.string().max(500).nullable(),\n organization_id: OrgId.nullable(),\n reason: WebNotSavedReason,\n message: z.string().max(2000),\n attempts: nonNegInt,\n created_at_ms: nonNegInt,\n last_attempt_at_ms: nonNegInt.nullable(),\n bytes: nonNegInt,\n});\nexport const WebOutboxListParams = z.strictObject({});\nexport const WebOutboxListResult = z.strictObject({\n items: z.array(WebOutboxItem),\n bytes: nonNegInt,\n /** The most the outbox holds; past it the oldest pages are dropped (and the log says so). */\n cap_bytes: nonNegInt,\n});\nexport const WebOutboxRetryParams = z.strictObject({ outbox_id: z.string().min(1).max(64).optional() });\nexport const WebOutboxRetryResult = z.strictObject({ saved: nonNegInt, waiting: nonNegInt });\nexport const WebOutboxDiscardParams = z.strictObject({ outbox_id: z.string().min(1).max(64) });\nexport const WebOutboxDiscardResult = z.strictObject({ discarded: z.boolean() });\n\n// ── web.log.*: what this computer read, for whom (since 1.38). Never page text. ─────────────────\nexport const WebLogVia = z.enum([\"this_computer\", \"browser\", \"server\"]);\nexport const WebLogCaller = z.enum([\"person\", \"agent\", \"research\", \"phone\", \"other\"]);\nexport const WebLogResult = z.enum([\"saved\", \"not_saved\", \"failed\", \"blocked\", \"read\"]);\nexport const WebLogEntry = z.strictObject({\n id: z.string().min(1).max(64),\n at_ms: nonNegInt,\n caller: WebLogCaller,\n url: z.string().max(8192),\n title: z.string().max(500).nullable(),\n result: WebLogResult,\n /** One sentence: why it failed or was blocked, or the save's notice. Never page text. */\n detail: z.string().max(1000).nullable(),\n via: WebLogVia,\n duration_ms: nonNegInt,\n processed_document_id: z.string().max(64).nullable(),\n});\nexport const WebLogListParams = z.strictObject({ since_ms: nonNegInt.optional(), limit: z.int().min(1).max(1000).default(200) });\nexport const WebLogListResult = z.strictObject({ entries: z.array(WebLogEntry) });\nexport const WebLogClearParams = z.strictObject({});\nexport const WebLogClearResult = z.strictObject({ cleared: nonNegInt });\n\n/** A long web op's progress (web.runtime.install, web.research.fetch): the op's request id. */\nexport const WebProgressEvent = z.strictObject({\n request_id: RequestId,\n phase: z.enum([\"installing\", \"fetching\", \"saving\"]),\n done: nonNegInt,\n total: nonNegInt,\n});\n\n// ── web.research.*: research sources the servers could not read, fetched here (since 1.38) ──────\nexport const WebResearchItemState = z.enum([\"waiting\", \"fetching\", \"saved\", \"thin\", \"failed\", \"cannot_edit\", \"blocked\"]);\nexport const WebResearchItem = z.strictObject({\n topic_id: z.string().min(1).max(64),\n topic_name: z.string().max(500),\n source_id: z.string().min(1).max(64),\n url: z.string().max(8192),\n title: z.string().max(500).nullable(),\n /** The capture level this computer would try (1 quick, 2 scroll); 3+ is the extension's. */\n level: z.int().min(1).max(4),\n last_failure: z.string().max(1000).nullable(),\n state: WebResearchItemState,\n /** One sentence after a fetch: what happened. */\n message: z.string().max(1000).nullable(),\n});\nexport const WebResearchQueueParams = z.strictObject({ topic_id: z.string().min(1).max(64).optional() });\nexport const WebResearchQueueResult = z.strictObject({\n state: z.enum([\"ready\", \"signed_out\", \"unavailable\"]),\n problem: z.string().max(1000).nullable(),\n /** L1/L2 items on topics this person can edit: what this computer can fetch. */\n items: z.array(WebResearchItem),\n /** Items on topics the person can view but not add to (shown, never fetched). */\n view_only: nonNegInt,\n});\nexport const WebResearchFetchParams = z.strictObject({\n topic_id: z.string().min(1).max(64).optional(),\n source_ids: z.array(z.string().min(1).max(64)).max(200).optional(),\n});\nexport const WebResearchFetchResult = z.strictObject({\n items: z.array(WebResearchItem),\n saved: nonNegInt,\n thin: nonNegInt,\n failed: nonNegInt,\n cannot_edit: nonNegInt,\n});\n\n/** The tools service's progress (one phase per long op). */\nexport const ToolsServiceProgress = z.strictObject({ phase: z.enum([\"fetching\", \"installing\"]), done: nonNegInt, total: nonNegInt });\n\nexport type WebHeader = z.output<typeof WebHeader>;\nexport type WebFetchParams = z.output<typeof WebFetchParams>;\nexport type WebFetchResult = z.output<typeof WebFetchResult>;\nexport type WebScrapeParams = z.output<typeof WebScrapeParams>;\nexport type WebScrapePage = z.output<typeof WebScrapePage>;\nexport type WebScrapeResult = z.output<typeof WebScrapeResult>;\nexport type WebSearchParams = z.output<typeof WebSearchParams>;\nexport type WebSearchHit = z.output<typeof WebSearchHit>;\nexport type WebSearchQueryResult = z.output<typeof WebSearchQueryResult>;\nexport type WebSearchResult = z.output<typeof WebSearchResult>;\nexport type ToolsWebSearchParams = z.output<typeof ToolsWebSearchParams>;\nexport type WebBrowserFetchParams = z.output<typeof WebBrowserFetchParams>;\nexport type WebBrowserFetchResult = z.output<typeof WebBrowserFetchResult>;\nexport type ToolsServiceProgress = z.output<typeof ToolsServiceProgress>;\nexport type WebAttachTarget = z.output<typeof WebAttachTarget>;\nexport type WebLand = z.output<typeof WebLand>;\nexport type WebNotSavedReason = z.output<typeof WebNotSavedReason>;\nexport type WebSourceNotice = z.output<typeof WebSourceNotice>;\nexport type WebSourceState = z.output<typeof WebSourceState>;\nexport type ToolsParseFile = z.output<typeof ToolsParseFile>;\nexport type ToolsWebScrapeParams = z.output<typeof ToolsWebScrapeParams>;\nexport type ToolsWebScrapePage = z.output<typeof ToolsWebScrapePage>;\nexport type ToolsWebScrapeResult = z.output<typeof ToolsWebScrapeResult>;\nexport type ToolsWebBrowserFetchParams = z.output<typeof ToolsWebBrowserFetchParams>;\nexport type ToolsWebBrowserFetchResult = z.output<typeof ToolsWebBrowserFetchResult>;\nexport type WebRuntimeStateName = z.output<typeof WebRuntimeStateName>;\nexport type WebRuntimeState = z.output<typeof WebRuntimeState>;\nexport type WebOutboxItem = z.output<typeof WebOutboxItem>;\nexport type WebOutboxListResult = z.output<typeof WebOutboxListResult>;\nexport type WebOutboxRetryResult = z.output<typeof WebOutboxRetryResult>;\nexport type WebLogVia = z.output<typeof WebLogVia>;\nexport type WebLogCaller = z.output<typeof WebLogCaller>;\nexport type WebLogResult = z.output<typeof WebLogResult>;\nexport type WebLogEntry = z.output<typeof WebLogEntry>;\nexport type WebLogListResult = z.output<typeof WebLogListResult>;\nexport type WebProgressEvent = z.output<typeof WebProgressEvent>;\nexport type WebResearchItemState = z.output<typeof WebResearchItemState>;\nexport type WebResearchItem = z.output<typeof WebResearchItem>;\nexport type WebResearchQueueResult = z.output<typeof WebResearchQueueResult>;\nexport type WebResearchFetchParams = z.output<typeof WebResearchFetchParams>;\nexport type WebResearchFetchResult = z.output<typeof WebResearchFetchResult>;\n\n// Every schema's type beside it (type-exports.test.ts).\nexport type WebRuntimeParams = z.output<typeof WebRuntimeParams>;\nexport type WebOutboxListParams = z.output<typeof WebOutboxListParams>;\nexport type WebOutboxRetryParams = z.output<typeof WebOutboxRetryParams>;\nexport type WebOutboxDiscardParams = z.output<typeof WebOutboxDiscardParams>;\nexport type WebOutboxDiscardResult = z.output<typeof WebOutboxDiscardResult>;\nexport type WebLogListParams = z.output<typeof WebLogListParams>;\nexport type WebLogClearParams = z.output<typeof WebLogClearParams>;\nexport type WebLogClearResult = z.output<typeof WebLogClearResult>;\nexport type WebResearchQueueParams = z.output<typeof WebResearchQueueParams>;\n","/**\n * @ai-matrx/desktop-protocol — cap system (SPEC §6): open a link or a file the way the person's\n * computer would, and show a notification. Schema source: lint-enforced rules in\n * scripts/check-schema-source.mjs. Added in protocol 1.4.\n */\nimport { z } from \"zod\";\nimport { AbsPath } from \"./primitives\";\n\nexport const SystemOpenUrlParams = z.strictObject({\n /** http, https or mailto; opened in the person's default app for it. */\n url: z.string().min(1).max(4096),\n});\nexport const SystemOpenUrlResult = z.strictObject({ url: z.string().max(4096) });\n\nexport const SystemOpenPathParams = z.strictObject({\n path: AbsPath,\n /** Show it in the file manager (Finder, Explorer) instead of opening it. */\n reveal: z.boolean().default(false),\n});\nexport const SystemOpenPathResult = z.strictObject({ path: AbsPath, revealed: z.boolean() });\n\nexport const SystemNotifyParams = z.strictObject({\n title: z.string().min(1).max(128),\n body: z.string().max(1024).default(\"\"),\n});\nexport const SystemNotifyResult = z.strictObject({\n /** False when this computer has no notification service to show it (a bare Linux box). */\n shown: z.boolean(),\n});\n\n/** (1.24) An OS settings page Matrx 2 can open: the person's own place to change what Matrx 2 only shows. */\nexport const SystemSettingsPane = z.enum([\n \"displays\",\n \"night_shift\",\n \"sound\",\n \"keyboard\",\n \"keyboard_shortcuts\",\n \"text_input\",\n \"dictation\",\n \"energy\",\n \"about\",\n \"storage\",\n \"system_report\",\n /** (1.35) Privacy & Security › Microphone: where the person allows Matrx 2 the microphone. */\n \"microphone\",\n // (1.41) Each other privacy grant's own page (Settings › Permissions and privacy's buttons), named\n // as sysinfo's OsPermissionName so a row opens its pane by its own name. A 1.40 core refuses these\n // as INVALID_PARAMS, so a client asks only a 1.41 core for them.\n \"full_disk_access\",\n \"accessibility\",\n \"screen_recording\",\n \"camera\",\n \"automation\",\n \"contacts\",\n \"calendars\",\n \"reminders\",\n \"photos\",\n \"location\",\n \"local_network\",\n \"bluetooth\",\n \"wifi\",\n \"notifications\",\n \"speech_recognition\",\n \"messages\",\n \"mail\",\n]);\nexport const SystemOpenSettingsParams = z.strictObject({ pane: SystemSettingsPane });\nexport const SystemOpenSettingsResult = z.strictObject({ pane: SystemSettingsPane });\n\nexport type SystemSettingsPane = z.output<typeof SystemSettingsPane>;\nexport type SystemOpenSettingsParams = z.output<typeof SystemOpenSettingsParams>;\nexport type SystemOpenSettingsResult = z.output<typeof SystemOpenSettingsResult>;\nexport type SystemOpenUrlParams = z.output<typeof SystemOpenUrlParams>;\nexport type SystemOpenUrlResult = z.output<typeof SystemOpenUrlResult>;\nexport type SystemOpenPathParams = z.output<typeof SystemOpenPathParams>;\nexport type SystemOpenPathResult = z.output<typeof SystemOpenPathResult>;\nexport type SystemNotifyParams = z.output<typeof SystemNotifyParams>;\nexport type SystemNotifyResult = z.output<typeof SystemNotifyResult>;\n","/**\n * @ai-matrx/desktop-protocol — cap screen (SPEC §6): the person's displays and a picture of one.\n * Schema source: lint-enforced rules in scripts/check-schema-source.mjs. Added in protocol 1.4.\n */\nimport { z } from \"zod\";\nimport { nonNegInt } from \"./primitives\";\n\nexport const ScreenDisplay = z.strictObject({\n /** The OS's display id; pass it to screen.capture. */\n id: nonNegInt,\n name: z.string().max(128),\n /** Position and size in the OS's logical points (x and y may be negative left of or above the main display). */\n x: z.int(),\n y: z.int(),\n width: z.int().min(1),\n height: z.int().min(1),\n /** Pixels per point (2 on a Retina display). */\n scale: z.number().min(0.1).max(8),\n primary: z.boolean(),\n /** (1.24) Clockwise rotation in degrees (Displays' Rotation: 0 is Standard). */\n rotation: z.int().min(0).max(359).optional(),\n /** (1.24) Refresh rate in hertz; absent where the OS does not say. */\n refresh_hz: z.number().min(0).max(1000).optional(),\n /** (1.24) The computer's own screen (a laptop's), not one plugged in. */\n builtin: z.boolean().optional(),\n});\n\nexport const ScreenListParams = z.strictObject({});\nexport const ScreenListResult = z.strictObject({ displays: z.array(ScreenDisplay).max(32) });\n\nexport const ScreenCaptureParams = z.strictObject({\n /** The display (from screen.list); the primary display when absent. */\n display_id: nonNegInt.optional(),\n format: z.enum([\"jpeg\", \"png\"]).default(\"jpeg\"),\n /** Scale the picture down to at most this width in pixels (kept when already smaller). */\n max_width: z.int().min(160).max(7680).default(1600),\n});\nexport const ScreenCaptureResult = z.strictObject({\n display_id: nonNegInt,\n mime_type: z.enum([\"image/jpeg\", \"image/png\"]),\n width: z.int().min(1),\n height: z.int().min(1),\n /** The display's full resolution in pixels, before scaling. */\n source_width: z.int().min(1),\n source_height: z.int().min(1),\n /** The image, base64 (at most 6 MiB of text). */\n data_base64: z.string().max(6_291_456),\n});\n\nexport type ScreenDisplay = z.output<typeof ScreenDisplay>;\nexport type ScreenListResult = z.output<typeof ScreenListResult>;\nexport type ScreenCaptureParams = z.output<typeof ScreenCaptureParams>;\nexport type ScreenCaptureResult = z.output<typeof ScreenCaptureResult>;\n\n// Every schema's type beside it (type-exports.test.ts).\nexport type ScreenListParams = z.output<typeof ScreenListParams>;\n","/**\n * @ai-matrx/desktop-protocol — cap window (SPEC §6): the windows on the person's screen; focus,\n * move or resize, and minimize one. Schema source: lint-enforced rules in\n * scripts/check-schema-source.mjs. Added in protocol 1.4.\n */\nimport { z } from \"zod\";\nimport { nonNegInt } from \"./primitives\";\n\nexport const WindowInfo = z.strictObject({\n /** The OS's window handle (macOS window number, Windows HWND, X11 window id). */\n id: nonNegInt,\n title: z.string().max(512),\n /** Position and size in logical points. */\n x: z.int(),\n y: z.int(),\n width: z.int().min(0),\n height: z.int().min(0),\n /**\n * The application that owns the window, by the name the OS shows people; absent when the OS does\n * not say. Optional (never null, the schema rule) because it was added in protocol 1.7: an older\n * app's answer has no such field (FIELDS_SINCE).\n */\n app: z.string().max(256).optional(),\n /** The owning process id; absent when the OS does not say. Added in protocol 1.7. */\n pid: z.int().min(0).optional(),\n});\n\nexport const WindowListParams = z.strictObject({\n /** Case-insensitive substring of the window title. */\n title: z.string().min(1).max(256).optional(),\n /** (1.66) Case-insensitive substring of the owning application's name (matrx-local's app_filter). */\n app: z.string().min(1).max(256).optional(),\n limit: z.int().min(1).max(500).default(100),\n});\nexport const WindowListResult = z.strictObject({\n windows: z.array(WindowInfo).max(500),\n total: nonNegInt,\n truncated: z.boolean(),\n});\n\nexport const WindowFocusParams = z.strictObject({ id: nonNegInt });\nexport const WindowFocusResult = z.strictObject({ window: WindowInfo });\n\nexport const WindowMoveParams = z.strictObject({\n id: nonNegInt,\n /** New top-left corner; unchanged when absent. */\n x: z.int().optional(),\n y: z.int().optional(),\n /** New size; unchanged when absent. */\n width: z.int().min(50).max(16_384).optional(),\n height: z.int().min(50).max(16_384).optional(),\n});\nexport const WindowMoveResult = z.strictObject({ window: WindowInfo });\n\n/** (1.66) What window.minimize does to the window: matrx-local's window_action. */\nexport const WindowState = z.enum([\"minimize\", \"maximize\", \"restore\"]);\nexport const WindowMinimizeParams = z.strictObject({\n id: nonNegInt,\n /** (1.66) minimize (the default), maximize (fill its display), or restore (bring a minimized or maximized window back). */\n mode: WindowState.optional(),\n});\nexport const WindowMinimizeResult = z.strictObject({\n id: nonNegInt,\n /** (1.66) What was done. */\n mode: WindowState.optional(),\n});\n\nexport type WindowInfo = z.output<typeof WindowInfo>;\nexport type WindowState = z.output<typeof WindowState>;\nexport type WindowListParams = z.output<typeof WindowListParams>;\nexport type WindowListResult = z.output<typeof WindowListResult>;\nexport type WindowFocusParams = z.output<typeof WindowFocusParams>;\nexport type WindowFocusResult = z.output<typeof WindowFocusResult>;\nexport type WindowMoveParams = z.output<typeof WindowMoveParams>;\nexport type WindowMoveResult = z.output<typeof WindowMoveResult>;\nexport type WindowMinimizeParams = z.output<typeof WindowMinimizeParams>;\nexport type WindowMinimizeResult = z.output<typeof WindowMinimizeResult>;\n","/**\n * @ai-matrx/desktop-protocol — cap input (SPEC §6): the keyboard and mouse, as if the person used\n * them. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. Added in protocol 1.4.\n */\nimport { z } from \"zod\";\nimport { nonNegInt } from \"./primitives\";\n\n/** Key names for input.hotkey. `cmd` is Command on a Mac and Ctrl elsewhere; `meta` is the Windows/Super key. */\nexport const InputKey = z.enum([\n \"cmd\", \"ctrl\", \"alt\", \"shift\", \"meta\",\n \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\",\n \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\",\n \"f1\", \"f2\", \"f3\", \"f4\", \"f5\", \"f6\", \"f7\", \"f8\", \"f9\", \"f10\", \"f11\", \"f12\",\n \"enter\", \"tab\", \"escape\", \"space\", \"backspace\", \"delete\",\n \"up\", \"down\", \"left\", \"right\", \"home\", \"end\", \"pageup\", \"pagedown\",\n \"minus\", \"equal\", \"comma\", \"period\", \"slash\", \"semicolon\", \"quote\", \"bracketleft\", \"bracketright\", \"backslash\", \"grave\",\n]);\n\nexport const InputTypeTextParams = z.strictObject({ text: z.string().min(1).max(10_000) });\nexport const InputTypeTextResult = z.strictObject({ characters: z.int().min(1) });\n\nexport const InputHotkeyParams = z.strictObject({\n /** Pressed together in order and released in reverse: [\"cmd\", \"shift\", \"t\"]. */\n keys: z.array(InputKey).min(1).max(6),\n});\nexport const InputHotkeyResult = z.strictObject({ keys: z.array(InputKey) });\n\nexport const InputPoint = z.strictObject({ x: z.int(), y: z.int() });\n\nexport const InputMouseMoveParams = z.strictObject({\n /** Screen position in logical points (the coordinates screen.list and window.list report). */\n x: z.int(),\n y: z.int(),\n});\nexport const InputMouseMoveResult = z.strictObject({\n /** Where the pointer is now, read back from the OS. */\n position: InputPoint,\n});\n\nexport const InputMouseClickParams = z.strictObject({\n /** Move here first; clicks where the pointer is when absent. */\n x: z.int().optional(),\n y: z.int().optional(),\n button: z.enum([\"left\", \"right\", \"middle\"]).default(\"left\"),\n double: z.boolean().default(false),\n});\nexport const InputMouseClickResult = z.strictObject({\n position: InputPoint,\n button: z.enum([\"left\", \"right\", \"middle\"]),\n double: z.boolean(),\n});\n\n/**\n * (1.24) The keyboard's own settings, as System Settings › Keyboard shows them. Times in ms; each\n * field null where this OS does not say.\n */\nexport const InputKeyboardSettingsParams = z.strictObject({});\nexport const InputKeyboardSettingsResult = z.strictObject({\n /** Key repeat is off (a held key types once). */\n repeat_off: z.boolean().nullable(),\n /** Time between repeats while a key is held (Key repeat rate: shorter is faster). */\n repeat_interval_ms: nonNegInt.nullable(),\n /** Time a key is held before it starts repeating (Delay until repeat). */\n repeat_delay_ms: nonNegInt.nullable(),\n /** What the fn / globe key does alone. */\n fn_key: z.enum([\"nothing\", \"input_source\", \"emoji\", \"dictation\"]).nullable(),\n /** Tab moves focus between every control. */\n keyboard_navigation: z.boolean().nullable(),\n /** The enabled input sources by name (\"U.S.\", \"ABC – Extended\"). */\n input_sources: z.array(z.string().max(128)).max(64),\n /** A key repeat change takes effect only after the person logs out and in again (macOS). */\n applies_after_login: z.boolean(),\n});\n/** (1.24) Change the key repeat or keyboard navigation; the result is the settings read back. */\nexport const InputSetKeyboardSettingsParams = z.strictObject({\n repeat_off: z.boolean().optional(),\n repeat_interval_ms: z.int().min(15).max(2000).optional(),\n repeat_delay_ms: z.int().min(150).max(2000).optional(),\n keyboard_navigation: z.boolean().optional(),\n});\nexport type InputKey = z.output<typeof InputKey>;\nexport type InputKeyboardSettingsParams = z.output<typeof InputKeyboardSettingsParams>;\nexport type InputKeyboardSettingsResult = z.output<typeof InputKeyboardSettingsResult>;\nexport type InputSetKeyboardSettingsParams = z.output<typeof InputSetKeyboardSettingsParams>;\nexport type InputPoint = z.output<typeof InputPoint>;\nexport type InputTypeTextParams = z.output<typeof InputTypeTextParams>;\nexport type InputTypeTextResult = z.output<typeof InputTypeTextResult>;\nexport type InputHotkeyParams = z.output<typeof InputHotkeyParams>;\nexport type InputHotkeyResult = z.output<typeof InputHotkeyResult>;\nexport type InputMouseMoveParams = z.output<typeof InputMouseMoveParams>;\nexport type InputMouseMoveResult = z.output<typeof InputMouseMoveResult>;\nexport type InputMouseClickParams = z.output<typeof InputMouseClickParams>;\nexport type InputMouseClickResult = z.output<typeof InputMouseClickResult>;\n","/**\n * @ai-matrx/desktop-protocol — cap power (SPEC §6): the battery and keeping the computer awake.\n * Schema source: lint-enforced rules in scripts/check-schema-source.mjs. Added in protocol 1.4.\n */\nimport { z } from \"zod\";\nimport { epochMs, nonNegInt } from \"./primitives\";\n\n/** (1.24) The OS's own energy settings, as Battery/Energy shows them. Minutes are null when that\n * sleep is never; each other field null where the OS does not say. */\nexport const PowerEnergy = z.strictObject({\n display_sleep_minutes: nonNegInt.nullable(),\n /** The computer itself sleeps after this long idle; null = never (Prevent automatic sleeping). */\n sleep_minutes: nonNegInt.nullable(),\n /** Hard disks sleep after this long; null = never. */\n disk_sleep_minutes: nonNegInt.nullable(),\n wake_for_network: z.boolean().nullable(),\n restart_after_power_failure: z.boolean().nullable(),\n /** Low Power Mode (Energy Mode \"Low Power\"). */\n low_power_mode: z.boolean().nullable(),\n});\n\nexport const PowerStatusParams = z.strictObject({});\nexport const PowerStatusResult = z.strictObject({\n has_battery: z.boolean(),\n /** 0–100; null without a battery. */\n percent: z.number().min(0).max(100).nullable(),\n charging: z.boolean().nullable(),\n /** On wall power; null where the OS does not say. */\n plugged_in: z.boolean().nullable(),\n /** Minutes of battery left; null when charging, unknown or without a battery. */\n minutes_left: nonNegInt.nullable(),\n /** Matrx 2 is keeping the computer awake (power.prevent_sleep) until this time; null when it is not. */\n awake_until_ms: epochMs.nullable(),\n /** (1.24) The OS's own energy settings; absent where it keeps none Matrx 2 can read. */\n energy: PowerEnergy.optional(),\n});\n\n/** (1.24) The battery's charge over the last ten days, from the OS's own power log. */\nexport const PowerHistoryParams = z.strictObject({});\nexport const PowerHistoryPoint = z.strictObject({ at_ms: epochMs, percent: z.number().min(0).max(100), plugged_in: z.boolean() });\nexport const PowerHistoryResult = z.strictObject({\n /** Oldest first; empty without a battery or where the OS keeps no log. */\n points: z.array(PowerHistoryPoint).max(5000),\n});\n\nexport const PowerPreventSleepParams = z.strictObject({\n /** Keep the computer awake this long; 0 lets it sleep again now. */\n seconds: z.int().min(0).max(86_400),\n /** Shown where the OS lists what keeps it awake. */\n reason: z.string().min(1).max(128).default(\"Matrx 2 is working\"),\n});\nexport const PowerPreventSleepResult = z.strictObject({\n /** When it may sleep again; null after seconds 0. */\n awake_until_ms: epochMs.nullable(),\n});\n\nexport type PowerStatusResult = z.output<typeof PowerStatusResult>;\nexport type PowerEnergy = z.output<typeof PowerEnergy>;\nexport type PowerHistoryParams = z.output<typeof PowerHistoryParams>;\nexport type PowerHistoryPoint = z.output<typeof PowerHistoryPoint>;\nexport type PowerHistoryResult = z.output<typeof PowerHistoryResult>;\nexport type PowerPreventSleepParams = z.output<typeof PowerPreventSleepParams>;\nexport type PowerPreventSleepResult = z.output<typeof PowerPreventSleepResult>;\n\n// Every schema's type beside it (type-exports.test.ts).\nexport type PowerStatusParams = z.output<typeof PowerStatusParams>;\n","/**\n * @ai-matrx/desktop-protocol — cap diag (SPEC §3.12): the device's error ledger. Every process's\n * errors (main, every renderer and hosted page, the core, the PTY host, the Python services, the\n * relay client) are collected on the device, grouped by signature, kept in the state DB and\n * delivered to the platform's one error system (ops.system_error, source_app `matrx-desktop`).\n * These ops show the ledger to a screen and let a renderer report what only it sees.\n * Schema source: lint-enforced rules in scripts/check-schema-source.mjs. Added in protocol 1.20.\n */\nimport { z } from \"zod\";\nimport { epochMs, nonNegInt } from \"./primitives\";\n\n/** Which part of the app the error came from. */\nexport const DiagProcess = z.enum([\n \"main\",\n \"renderer\",\n \"hosted_page\",\n \"core\",\n \"pty_host\",\n \"python_ml\",\n \"python_coding\",\n \"python_tools\",\n \"relay\",\n \"coding_sessions\",\n \"claude_accounts\",\n]);\n\n/** What happened. */\nexport const DiagErrorKind = z.enum([\n \"uncaught_exception\",\n \"unhandled_rejection\",\n \"renderer_crash\",\n \"native_crash\",\n \"console_error\",\n \"load_failed\",\n \"op_failed\",\n \"child_exit\",\n \"banner\",\n \"logged_error\",\n]);\n\n/** waiting = not yet delivered (signed out, offline); sent = in the platform's error queue; resolved = an agent closed it there. */\nexport const DiagErrorStatus = z.enum([\"waiting\", \"sent\", \"resolved\"]);\n\n/** One error signature: every occurrence of the same failure in the same place. */\nexport const DiagErrorEntry = z.strictObject({\n /** sha256 prefix over process, kind, source, code and the normalized message. */\n signature: z.string().regex(/^[0-9a-f]{32}$/),\n process: DiagProcess,\n kind: DiagErrorKind,\n /** Where: a cap.op, a log event, a screen or page name. */\n source: z.string().min(1).max(128),\n /** An ErrorCode, an exit code or signal, an error class; null when there is none. */\n code: z.string().max(64).nullable(),\n /** The first occurrence's message, personal data removed. */\n message: z.string().max(500),\n count: nonNegInt,\n first_seen_ms: epochMs,\n last_seen_ms: epochMs,\n status: DiagErrorStatus,\n /** What the agent who resolved it wrote; null until resolved. */\n resolution_note: z.string().max(500).nullable(),\n app_version: z.string().max(64),\n});\n\nexport const DiagErrorsListParams = z.strictObject({\n /** open = waiting or sent; all includes resolved. */\n status: z.enum([\"open\", \"all\"]).default(\"open\"),\n limit: z.int().min(1).max(500).default(200),\n});\nexport const DiagErrorsListResult = z.strictObject({\n /** Newest last_seen first. */\n entries: z.array(DiagErrorEntry).max(500),\n total_signatures: nonNegInt,\n total_occurrences: nonNegInt,\n /** Signatures with occurrences not yet delivered. */\n waiting: nonNegInt,\n /** signed_out = kept until sign-in; ok = the last delivery worked; failing = the last delivery failed (kept, retried). */\n delivery: z.enum([\"signed_out\", \"ok\", \"failing\"]),\n last_delivery_ms: epochMs.nullable(),\n});\n\n/** A renderer or hosted page reports what only it sees (a banner shown to the person, a caught error). */\nexport const DiagErrorsReportParams = z.strictObject({\n process: z.enum([\"renderer\", \"hosted_page\"]),\n kind: z.enum([\"uncaught_exception\", \"unhandled_rejection\", \"console_error\", \"banner\"]),\n /** The screen or page, e.g. \"code.chats\". */\n source: z.string().min(1).max(128),\n message: z.string().min(1).max(2000),\n code: z.string().max(64).optional(),\n stack: z.string().max(8000).optional(),\n});\nexport const DiagErrorsReportResult = z.strictObject({\n signature: z.string().regex(/^[0-9a-f]{32}$/),\n});\n\n/** The ledger changed (a new occurrence, a delivery, a resolution). */\nexport const DiagErrorsChangedEvent = z.strictObject({\n total_signatures: nonNegInt,\n waiting: nonNegInt,\n});\n\nexport type DiagProcess = z.output<typeof DiagProcess>;\nexport type DiagErrorKind = z.output<typeof DiagErrorKind>;\nexport type DiagErrorStatus = z.output<typeof DiagErrorStatus>;\nexport type DiagErrorEntry = z.output<typeof DiagErrorEntry>;\nexport type DiagErrorsListParams = z.output<typeof DiagErrorsListParams>;\nexport type DiagErrorsListResult = z.output<typeof DiagErrorsListResult>;\nexport type DiagErrorsReportParams = z.output<typeof DiagErrorsReportParams>;\nexport type DiagErrorsReportResult = z.output<typeof DiagErrorsReportResult>;\nexport type DiagErrorsChangedEvent = z.output<typeof DiagErrorsChangedEvent>;\n","/**\n * @ai-matrx/desktop-protocol — cap resources (SPEC §6): how busy the computer is — CPU, memory and\n * disks — and (1.17) what is using it, grouped into jobs, with a slowdown log. The busiest single\n * processes are proc.list. Schema source: lint-enforced rules in scripts/check-schema-source.mjs.\n * Added in protocol 1.4.\n */\nimport { z } from \"zod\";\nimport { epochMs, nonNegInt } from \"./primitives\";\n\nexport const ResourcesDisk = z.strictObject({\n /** Where it is mounted (\"/\", \"C:\"). */\n mount: z.string().max(512),\n /** The volume's name as the file manager shows it (\"Macintosh HD\", \"Local Disk (C:)\"). Since 1.17. */\n name: z.string().max(256).optional(),\n /** The file system (\"apfs\", \"NTFS\", \"ext4\"). */\n fs: z.string().max(64),\n size_bytes: nonNegInt,\n used_bytes: nonNegInt,\n available_bytes: nonNegInt,\n});\n\nexport const ResourcesSnapshotParams = z.strictObject({});\nexport const ResourcesSnapshotResult = z.strictObject({\n cpu: z.strictObject({\n /** Busy share of all cores, 0–100, measured now. */\n percent: z.number().min(0).max(100),\n cores: z.int().min(1),\n /** 1, 5 and 15 minute load averages; null on Windows. */\n load: z.array(z.number().min(0)).length(3).nullable(),\n }),\n memory: z.strictObject({ total_bytes: nonNegInt, used_bytes: nonNegInt, available_bytes: nonNegInt }),\n swap: z.strictObject({ total_bytes: nonNegInt, used_bytes: nonNegInt }),\n disks: z.array(ResourcesDisk).max(64),\n uptime_seconds: nonNegInt,\n});\n\n// ── 1.17: what is using the computer ──────────────────────────────────────────────────────────\n\n/** What a job is, from its command line. */\nexport const ResourcesJobKind = z.enum([\"type-check\", \"tests\", \"build\", \"lint\", \"dev server\", \"language server\", \"search\"]);\n/** How hard the computer is working right now. */\nexport const ResourcesStrain = z.enum([\"good\", \"strain\", \"overloaded\"]);\n/** The kernel's memory-pressure level (macOS); null where the OS has none. */\nexport const ResourcesPressure = z.enum([\"normal\", \"warning\", \"critical\"]);\n\n/** A job: a type-check, test run, build, lint, dev server, language server or search, with its whole process tree. */\nexport const ResourcesJob = z.strictObject({\n /** The job's root process (Stop takes its whole tree). */\n pid: z.int().min(0),\n kind: ResourcesJobKind,\n /** Its heaviest process's command line, shortened (\"…/lib/tsc --noEmit -p tsconfig.json\"). */\n command: z.string().max(256),\n /** Who started it: \"Claude Code\", \"Codex\", \"Cursor\", \"VS Code\", \"Terminal\", \"local stack\", \"detached\"; null when unknown. */\n started_by: z.string().max(64).nullable(),\n /** Whatever started it is gone and nothing waits for it. */\n orphan: z.boolean(),\n /** A type-check queued for its turn (no compiler running yet). */\n waiting: z.boolean(),\n /** The project folder it runs in (\"matrx-frontend\"); null when not in one. */\n folder: z.string().max(256).nullable(),\n /** The same command in the same folder, running this many times (1 = no duplicate). */\n duplicates: z.int().min(1),\n processes: z.int().min(1),\n /** Sum over the tree, as `ps` reports it: 100 = one full core. */\n cpu_percent: z.number().min(0),\n /** Real memory (macOS: the physical footprint Activity Monitor shows, compressed included). */\n memory_bytes: nonNegInt,\n started_at_ms: epochMs.nullable(),\n /** False for an app, an agent session, a terminal, a system process, the local stack or Matrx 2 itself. */\n stoppable: z.boolean(),\n});\n\n/** One of the heaviest processes. */\nexport const ResourcesProcess = z.strictObject({\n pid: z.int().min(0),\n /** The command line, shortened. */\n name: z.string().max(256),\n cpu_percent: z.number().min(0),\n memory_bytes: nonNegInt,\n started_by: z.string().max(64).nullable(),\n /** The job it belongs to (\"type-check in aidream\"); null when none. */\n job: z.string().max(256).nullable(),\n started_at_ms: epochMs.nullable(),\n});\n\nexport const ResourcesVerdict = z.strictObject({\n level: ResourcesStrain,\n /** One sentence (\"Your Mac is under strain. 3 type-checks are running at once.\"). */\n text: z.string().max(256),\n /** The biggest jobs behind it; null when all is well. */\n cause: z.string().max(1024).nullable(),\n});\n\nexport const ResourcesSample = z.strictObject({\n at_ms: epochMs,\n /** The 1-minute load average. */\n load: z.number().min(0),\n memory_used_bytes: nonNegInt,\n typechecks: nonNegInt,\n});\n\nexport const ResourcesActivityParams = z.strictObject({});\nexport const ResourcesActivityResult = z.strictObject({\n /** False until the first reading (a second or two after start). */\n ready: z.boolean(),\n sampled_at_ms: epochMs.nullable(),\n cores: z.int().min(1),\n /** 1, 5 and 15 minute load averages. */\n load: z.array(z.number().min(0)).length(3),\n memory: z.strictObject({\n total_bytes: nonNegInt,\n /** Activity Monitor's Memory Used: app memory + wired + compressed. */\n used_bytes: nonNegInt,\n /** Data held compressed, and the memory the compressor takes to hold it. */\n compressed_bytes: nonNegInt,\n compressor_bytes: nonNegInt,\n swap_used_bytes: nonNegInt,\n pressure: ResourcesPressure.nullable(),\n }),\n verdict: ResourcesVerdict,\n typechecks: z.strictObject({ running: nonNegInt, waiting: nonNegInt, comfort: nonNegInt }),\n /** Heaviest first (1 GB weighs as much as 16 % of a core). */\n jobs: z.array(ResourcesJob).max(200),\n /** The 15 heaviest by memory and the 15 busiest by CPU, together. */\n top: z.array(ResourcesProcess).max(30),\n /** The last hour, oldest first. */\n history: z.array(ResourcesSample).max(1200),\n});\n\nexport const ResourcesStopJobParams = z.strictObject({ pid: z.int().min(1) });\nexport const ResourcesStopJobResult = z.strictObject({\n /** Processes signalled; whatever is still running 5 seconds later is force-stopped. */\n processes: nonNegInt,\n /** It had finished before the request arrived. */\n already_finished: z.boolean(),\n});\n\n/** A moment the computer was under strain, and what was using it. */\nexport const ResourcesIncident = z.strictObject({\n at_ms: epochMs,\n verdict: ResourcesVerdict,\n load: z.number().min(0),\n memory_used_bytes: nonNegInt,\n compressed_bytes: nonNegInt,\n pressure: ResourcesPressure.nullable(),\n jobs: z.array(\n z.strictObject({\n kind: ResourcesJobKind,\n started_by: z.string().max(64).nullable(),\n folder: z.string().max(256).nullable(),\n command: z.string().max(256),\n cpu_percent: z.number().min(0),\n memory_bytes: nonNegInt,\n duplicates: z.int().min(1),\n }),\n ).max(8),\n});\n\nexport const ResourcesIncidentsParams = z.strictObject({ limit: z.int().min(1).max(200).default(50) });\nexport const ResourcesIncidentsResult = z.strictObject({\n /** Newest first; at most one a minute is written. */\n incidents: z.array(ResourcesIncident).max(200),\n});\n\nexport type ResourcesDisk = z.output<typeof ResourcesDisk>;\nexport type ResourcesJobKind = z.output<typeof ResourcesJobKind>;\nexport type ResourcesStrain = z.output<typeof ResourcesStrain>;\nexport type ResourcesPressure = z.output<typeof ResourcesPressure>;\nexport type ResourcesJob = z.output<typeof ResourcesJob>;\nexport type ResourcesProcess = z.output<typeof ResourcesProcess>;\nexport type ResourcesVerdict = z.output<typeof ResourcesVerdict>;\nexport type ResourcesSample = z.output<typeof ResourcesSample>;\nexport type ResourcesActivityResult = z.output<typeof ResourcesActivityResult>;\nexport type ResourcesStopJobParams = z.output<typeof ResourcesStopJobParams>;\nexport type ResourcesStopJobResult = z.output<typeof ResourcesStopJobResult>;\nexport type ResourcesIncident = z.output<typeof ResourcesIncident>;\nexport type ResourcesIncidentsParams = z.output<typeof ResourcesIncidentsParams>;\nexport type ResourcesIncidentsResult = z.output<typeof ResourcesIncidentsResult>;\nexport type ResourcesSnapshotResult = z.output<typeof ResourcesSnapshotResult>;\n\n// Every schema's type beside it (type-exports.test.ts).\nexport type ResourcesSnapshotParams = z.output<typeof ResourcesSnapshotParams>;\nexport type ResourcesActivityParams = z.output<typeof ResourcesActivityParams>;\n","/**\n * @ai-matrx/desktop-protocol — cap stack (SPEC §6): the local AI Matrx servers on this computer\n * (aidream's process-compose stack): each server's state in plain words, start / stop / restart,\n * its log read and followed by byte offset, every error of the last hour, and a history of what\n * happened. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. Added in 1.16.\n */\nimport { z } from \"zod\";\nimport { epochMs, nonNegInt } from \"./primitives\";\n\n/** A server's name as the stack's config declares it (\"aidream\", \"scraper\"). */\nexport const StackServerName = z.string().regex(/^[a-z0-9_-]{1,64}$/);\n\n/** good: healthy · wait: starting, stopping, unhealthy for now · bad: needs attention · off. */\nexport const StackTone = z.enum([\"good\", \"wait\", \"bad\", \"off\"]);\n\nexport const StackServer = z.strictObject({\n name: StackServerName,\n /** One word: Healthy, Starting, Unhealthy, Restarting, Stopping, Waiting, Stopped, Crashed, Off. */\n label: z.string().max(32),\n tone: StackTone,\n /** What is going on, in one or two plain sentences. */\n sentence: z.string().max(2000),\n /** The config's own description of the server. */\n description: z.string().max(512),\n /** Where the server answers, when its description names an address. */\n open_url: z.string().max(2048).nullable(),\n log_file: z.string().max(4096),\n /** When its log file was last written. */\n last_output_at_ms: epochMs.nullable(),\n started_at_ms: epochMs.nullable(),\n restarts: nonNegInt,\n exit_code: z.int().nullable(),\n pid: z.int().nullable(),\n /** (1.18) CPU of the server's process and everything under it, in percent of one core; absent when it is not running. */\n cpu_percent: z.number().min(0).optional(),\n /** (1.18) Memory of the same processes: the physical footprint (Activity Monitor's Memory) summed; absent when it is not running. */\n memory_bytes: nonNegInt.optional(),\n});\n\n/** One entry of the stack's history (the same file Local Admin keeps). */\nexport const StackEvent = z.strictObject({\n at_ms: epochMs,\n /** A server name, or \"stack\" for the stack as a whole. */\n server: z.string().max(64),\n /** started · stopped · healthy · unhealthy · crashed · exited · restarting · stopping · action · action-done · action-failed · setup · error */\n kind: z.string().max(32),\n text: z.string().max(4000),\n});\n\nexport const StackStateParams = z.strictObject({});\nexport const StackStateResult = z.strictObject({\n /** The stack's config file, when found. */\n config_path: z.string().max(4096).nullable(),\n /** Why the stack cannot be run from here (no config, no process-compose), else null. */\n problem: z.string().max(1000).nullable(),\n stack_up: z.boolean(),\n stack_started_at_ms: epochMs.nullable(),\n servers: z.array(StackServer).max(64),\n /** One line about the one-shot setup steps (\"Docker Desktop: running.\"), or null. */\n setup_note: z.string().max(500).nullable(),\n /** Start everything / Stop everything in flight. */\n pending: z.strictObject({ verb: z.enum([\"start\", \"stop\"]), label: z.string().max(64), since_ms: epochMs }).nullable(),\n /** The newest entries last. */\n events: z.array(StackEvent).max(300),\n});\n\nexport const StackStartParams = z.strictObject({});\nexport const StackStopParams = z.strictObject({});\n/** The request was accepted; the outcome lands in the history (action-done / action-failed). */\nexport const StackRunResult = z.strictObject({ accepted: z.boolean() });\n\nexport const StackServerActionParams = z.strictObject({\n name: StackServerName,\n verb: z.enum([\"start\", \"stop\", \"restart\"]),\n});\nexport const StackServerActionResult = z.strictObject({ message: z.string().max(1000) });\n\nexport const StackLogsParams = z.strictObject({\n name: StackServerName,\n /** Without `offset`: the last this-many complete lines. With it: new lines after it, at most this many. */\n lines: z.int().min(1).max(200_000).default(2000),\n /** Byte offset the last read ended at: answer only what was written after it (follow). */\n offset: nonNegInt.optional(),\n /** A \"Clear\" point: the lines written after this byte offset (no `offset`). */\n since: nonNegInt.optional(),\n /** With `offset`: wait up to this long for a new line when none is waiting (0 answers at once). */\n wait_ms: z.int().min(0).max(25_000).default(0),\n});\nexport const StackLogsResult = z.strictObject({\n /** Complete lines, color codes removed. */\n lines: z.array(z.string().max(65_536)).max(200_000),\n /** Where these lines end: pass it back as `offset` to follow. */\n offset: nonNegInt,\n /** False when `since` no longer exists (the log rotated): the lines are the plain tail instead. */\n since_valid: z.boolean(),\n /** The log was rotated or truncated since `offset`: these lines start the file again. */\n reset: z.boolean(),\n log_file: z.string().max(4096),\n});\n\nexport const StackErrorsParams = z.strictObject({\n window_minutes: z.int().min(1).max(1440).default(60),\n});\nexport const StackErrorsResult = z.strictObject({\n /** Per server: a heading line (\"=== aidream — errors in the last 60 minutes (<file>) ===\") and each error with the 10 lines after it. */\n sections: z.array(z.strictObject({ name: StackServerName, heading: z.string().max(4096), lines: z.array(z.string().max(65_536)).max(5000) })).max(64),\n window_minutes: z.int().min(1).max(1440),\n});\n\nexport type StackServerName = z.output<typeof StackServerName>;\nexport type StackTone = z.output<typeof StackTone>;\nexport type StackServer = z.output<typeof StackServer>;\nexport type StackEvent = z.output<typeof StackEvent>;\nexport type StackStateResult = z.output<typeof StackStateResult>;\nexport type StackServerActionParams = z.output<typeof StackServerActionParams>;\nexport type StackLogsParams = z.output<typeof StackLogsParams>;\nexport type StackLogsResult = z.output<typeof StackLogsResult>;\nexport type StackErrorsResult = z.output<typeof StackErrorsResult>;\n\n// Every schema's type beside it (type-exports.test.ts).\nexport type StackStateParams = z.output<typeof StackStateParams>;\nexport type StackStartParams = z.output<typeof StackStartParams>;\nexport type StackStopParams = z.output<typeof StackStopParams>;\nexport type StackRunResult = z.output<typeof StackRunResult>;\nexport type StackServerActionResult = z.output<typeof StackServerActionResult>;\nexport type StackErrorsParams = z.output<typeof StackErrorsParams>;\n","/**\n * @ai-matrx/desktop-protocol — cap audio (SPEC §6): the person's microphones and speakers; record a\n * clip to a file, play a file. Speech to text is models.transcribe. Schema source: lint-enforced\n * rules in scripts/check-schema-source.mjs. Added in protocol 1.6.\n */\nimport { z } from \"zod\";\nimport { AbsPath, nonNegInt } from \"./primitives\";\n\nexport const AudioDevice = z.strictObject({\n /** The OS's name for it, as audio.record takes it. */\n id: z.string().min(1).max(256),\n name: z.string().max(256),\n default: z.boolean(),\n /** (1.24) How it is connected, as Sound's Type column says it: \"Built-in\", \"USB\", \"Bluetooth\",\n * \"DisplayPort\", \"HDMI\", \"AirPlay\", \"Virtual\". Absent where the OS does not say. */\n kind: z.string().max(64).optional(),\n});\n\nexport const AudioDevicesParams = z.strictObject({});\nexport const AudioDevicesResult = z.strictObject({\n inputs: z.array(AudioDevice).max(64),\n outputs: z.array(AudioDevice).max(64),\n});\n\nexport const AudioRecordParams = z.strictObject({\n seconds: z.number().min(0.5).max(600),\n /** The microphone (from audio.devices); the default input when absent. */\n device_id: z.string().min(1).max(256).optional(),\n /** Where the WAV file goes; a new file in the temp folder when absent. */\n path: AbsPath.optional(),\n /** (1.66) 1 (mono, the default) or 2 (stereo). */\n channels: z.int().min(1).max(2).optional(),\n /** (1.66) Samples per second; 16000 when absent (the rate Whisper reads). */\n sample_rate: z.int().min(8000).max(192_000).optional(),\n});\nexport const AudioRecordResult = z.strictObject({\n path: AbsPath,\n seconds: z.number().min(0),\n bytes: nonNegInt,\n /** Loudest sample, 0–1: 0 means the device gave silence. */\n peak: z.number().min(0).max(1),\n /** (1.66) The file's channels and sample rate, as written. */\n channels: z.int().min(1).max(8).optional(),\n sample_rate: z.int().min(1).max(768_000).optional(),\n});\n\nexport const AudioPlayParams = z.strictObject({\n path: AbsPath,\n /** (1.66) The speaker or output (its id from audio.devices' outputs); the system's output when absent. */\n device_id: z.string().min(1).max(256).optional(),\n});\nexport const AudioPlayResult = z.strictObject({ path: AbsPath, seconds: z.number().min(0) });\n\n/** (1.24) The system's own levels, 0–100: what Sound's sliders and Mute show. Null where this OS does not say. */\nexport const AudioLevelsParams = z.strictObject({});\nexport const AudioLevelsResult = z.strictObject({\n output_volume: z.number().min(0).max(100).nullable(),\n output_muted: z.boolean().nullable(),\n input_volume: z.number().min(0).max(100).nullable(),\n /** The alert (beep) volume, a share of the output volume. */\n alert_volume: z.number().min(0).max(100).nullable(),\n});\n/** (1.24) Change any of the levels; the result is the levels read back after the change. */\nexport const AudioSetLevelsParams = z.strictObject({\n output_volume: z.number().min(0).max(100).optional(),\n output_muted: z.boolean().optional(),\n input_volume: z.number().min(0).max(100).optional(),\n alert_volume: z.number().min(0).max(100).optional(),\n});\nexport type AudioDevice = z.output<typeof AudioDevice>;\nexport type AudioLevelsParams = z.output<typeof AudioLevelsParams>;\nexport type AudioLevelsResult = z.output<typeof AudioLevelsResult>;\nexport type AudioSetLevelsParams = z.output<typeof AudioSetLevelsParams>;\nexport type AudioDevicesResult = z.output<typeof AudioDevicesResult>;\nexport type AudioRecordParams = z.output<typeof AudioRecordParams>;\nexport type AudioRecordResult = z.output<typeof AudioRecordResult>;\nexport type AudioPlayParams = z.output<typeof AudioPlayParams>;\nexport type AudioPlayResult = z.output<typeof AudioPlayResult>;\n\n// Every schema's type beside it (type-exports.test.ts).\nexport type AudioDevicesParams = z.output<typeof AudioDevicesParams>;\n","/**\n * @ai-matrx/desktop-protocol — cap fs, polled watches (SPEC §6): watch a folder and read what\n * changed since the last read, for callers that ask rather than hold a stream (an agent's tool\n * call through the relay's /call). The streamed `fs.watch` resource stays for live clients. Schema\n * source: lint-enforced rules in scripts/check-schema-source.mjs. Added in protocol 1.4.\n */\nimport { z } from \"zod\";\nimport { FsChange } from \"./fs\";\nimport { AbsPath, epochMs } from \"./primitives\";\n\nexport const FsWatchId = z.string().regex(/^fw_[A-Za-z0-9]{12,40}$/);\n\nexport const FsWatchStartParams = z.strictObject({\n path: AbsPath,\n recursive: z.boolean().default(true),\n /** Globs relative to `path` whose changes are not reported (\".git/**\", \"node_modules/**\"). */\n ignore: z.array(z.string().max(256)).max(64).default([]),\n});\nexport const FsWatchStartResult = z.strictObject({\n watch_id: FsWatchId,\n path: AbsPath,\n /** The watch ends by itself if nobody reads it for 30 minutes. */\n expires_at_ms: epochMs,\n});\n\nexport const FsWatchEventsParams = z.strictObject({\n watch_id: FsWatchId,\n /** Wait up to this long for a first change when none is waiting (0 answers at once). */\n wait_ms: z.int().min(0).max(25_000).default(0),\n});\nexport const FsWatchEventsResult = z.strictObject({\n /** What changed since the last read, oldest first; re-checked against the disk when read. */\n changes: z.array(FsChange).max(1000),\n /** Changes were dropped (more than 1000 waited): list the folder again. */\n overflow: z.boolean(),\n expires_at_ms: epochMs,\n});\n\nexport const FsWatchStopParams = z.strictObject({ watch_id: FsWatchId });\nexport const FsWatchStopResult = z.strictObject({ watch_id: FsWatchId });\n\nexport type FsWatchId = z.output<typeof FsWatchId>;\nexport type FsWatchStartParams = z.output<typeof FsWatchStartParams>;\nexport type FsWatchStartResult = z.output<typeof FsWatchStartResult>;\nexport type FsWatchEventsParams = z.output<typeof FsWatchEventsParams>;\nexport type FsWatchEventsResult = z.output<typeof FsWatchEventsResult>;\nexport type FsWatchStopParams = z.output<typeof FsWatchStopParams>;\nexport type FsWatchStopResult = z.output<typeof FsWatchStopResult>;\n","/**\n * @ai-matrx/desktop-protocol — cap exec, background jobs (SPEC §6): start a command that keeps\n * running (a dev server, a long build), read its output later, stop it. Schema source:\n * lint-enforced rules in scripts/check-schema-source.mjs. Added in protocol 1.4.\n */\nimport { z } from \"zod\";\nimport { AbsPath, epochMs, nonNegInt } from \"./primitives\";\n\nexport const ExecJobId = z.string().regex(/^job_[A-Za-z0-9]{12,40}$/);\n\nexport const ExecJobStartParams = z.strictObject({\n command: z.string().min(1).max(131_072),\n /** The folder it runs in; the home folder when absent. */\n cwd: AbsPath.optional(),\n env: z.record(z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(128), z.string().max(32_768)).optional(),\n});\nexport const ExecJobStartResult = z.strictObject({ job_id: ExecJobId, pid: z.int().min(1), cwd: AbsPath });\n\nexport const ExecJobOutputParams = z.strictObject({\n job_id: ExecJobId,\n /** Byte offset into the job's output to read from (next_offset of the last read; 0 = the start). */\n offset: nonNegInt.default(0),\n /** Wait up to this long for new output or the exit when none is waiting (0 answers at once). */\n wait_ms: z.int().min(0).max(25_000).default(0),\n max_bytes: z.int().min(1024).max(1_048_576).default(65_536),\n});\nexport const ExecJobOutputResult = z.strictObject({\n /** stdout and stderr interleaved as they arrived (UTF-8). */\n output: z.string(),\n next_offset: nonNegInt,\n /** Bytes before `offset` that are gone (the job keeps its last 4 MiB). */\n dropped_bytes: nonNegInt,\n running: z.boolean(),\n exit_code: z.int().nullable(),\n});\n\nexport const ExecJobStopParams = z.strictObject({\n job_id: ExecJobId,\n /** End it at once (SIGKILL; on Windows the whole tree with /F) instead of asking it to quit. */\n force: z.boolean().default(false),\n});\nexport const ExecJobStopResult = z.strictObject({ job_id: ExecJobId, exited: z.boolean(), exit_code: z.int().nullable() });\n\nexport const ExecJobInfo = z.strictObject({\n job_id: ExecJobId,\n command: z.string().max(1024),\n pid: z.int().min(1),\n cwd: AbsPath,\n running: z.boolean(),\n exit_code: z.int().nullable(),\n started_at_ms: epochMs,\n output_bytes: nonNegInt,\n});\nexport const ExecJobListParams = z.strictObject({});\nexport const ExecJobListResult = z.strictObject({ jobs: z.array(ExecJobInfo).max(64) });\n\nexport type ExecJobId = z.output<typeof ExecJobId>;\nexport type ExecJobStartParams = z.output<typeof ExecJobStartParams>;\nexport type ExecJobStartResult = z.output<typeof ExecJobStartResult>;\nexport type ExecJobOutputParams = z.output<typeof ExecJobOutputParams>;\nexport type ExecJobOutputResult = z.output<typeof ExecJobOutputResult>;\nexport type ExecJobStopParams = z.output<typeof ExecJobStopParams>;\nexport type ExecJobStopResult = z.output<typeof ExecJobStopResult>;\nexport type ExecJobInfo = z.output<typeof ExecJobInfo>;\nexport type ExecJobListResult = z.output<typeof ExecJobListResult>;\n\n// Every schema's type beside it (type-exports.test.ts).\nexport type ExecJobListParams = z.output<typeof ExecJobListParams>;\n","/**\n * @ai-matrx/desktop-protocol — the `coding` capability's Claude Code history (SPEC §6 `coding`):\n * \"Import missing history\" — every Claude Code session on this computer that AI Matrx lacks, or is\n * behind on, imported through the shared importer (matrx-coding-history, the same code Matrx Local\n * runs) in Matrx 2's `coding` Python service (SPEC §3.10). Schema source: lint-enforced rules in\n * scripts/check-schema-source.mjs.\n *\n * Two contracts, both generated from this file (SPEC P11):\n * - the Router op `coding.history.import_missing` (every transport) and its progress event;\n * - the internal service ops `coding.plan_missing` / `coding.import_next` between the core and\n * the Python service. The core runs the loop: each service call is one bounded batch carrying\n * a fresh access token, so a long run never outlives its credential.\n */\nimport { z } from \"zod\";\nimport { UUID_SHAPE_PATTERN } from \"@ai-matrx/kit/uuid\";\nimport { RequestId, nonNegInt } from \"./primitives\";\n\n/** What the core adds to every coding service op from its own sign-in (never sent by a client). */\nexport const CodingServiceCredentials = z.strictObject({\n access_token: z.string().min(16).max(16_384),\n user_id: z.string().regex(UUID_SHAPE_PATTERN),\n /** The AI Matrx server this app talks to (production, or a local server on the nightly copy). */\n server_url: z\n .string()\n .min(1)\n .max(2048)\n .regex(/^https?:\\/\\/[^\\s/?#]+(\\/[^\\s?#]*)?$/),\n /**\n * The organization the person works in (the core's active organization): the service sends it as\n * X-Organization-Id on every AI Matrx request, as the app's own calls do. Absent: the\n * service sends nothing and says an organization is needed (1.77).\n */\n organization_id: z.string().regex(UUID_SHAPE_PATTERN).optional(),\n});\n\n/**\n * Why a run stopped before it was done, as a state the screen can name:\n * signed_out — no usable AI Matrx sign-in (or it expired mid-run);\n * offline — the AI Matrx server did not answer;\n * organization_required — AI Matrx needs to know which organization files coding sessions;\n * claude_unavailable — Claude Code's account on this computer cannot be read;\n * cloud_list_unavailable — the server's list of sessions could not be proven complete;\n * history_too_large — more local sessions than the importer reads in one run.\n */\nexport const CodingHistoryBlocked = z.enum([\n \"signed_out\",\n \"offline\",\n \"organization_required\",\n \"claude_unavailable\",\n \"cloud_list_unavailable\",\n \"history_too_large\",\n]);\n\nexport const CodingHistoryFailure = z.strictObject({\n session_id: z.string().max(64),\n reason: z.string().max(300),\n});\n\n/** A run's counts so far, and its one honest line. */\nexport const CodingHistoryRun = z.strictObject({\n /** Claude Code sessions found on this computer. */\n local_sessions: nonNegInt,\n /** Of those, already complete in AI Matrx. */\n in_cloud: nonNegInt,\n /** In AI Matrx under neither of its identities. */\n missing: nonNegInt,\n /** In AI Matrx, but changed here after the last turn AI Matrx received (turns the hook lost). */\n behind: nonNegInt,\n /** Over the importer's size cap; never imported. */\n too_large: nonNegInt,\n imported: nonNegInt,\n /** Changed while being read; a later run takes them. */\n changed: nonNegInt,\n failed: nonNegInt,\n failures: z.array(CodingHistoryFailure).max(20),\n /** Candidates not reached yet. */\n remaining: nonNegInt,\n /** The one line a person reads, e.g. \"Imported 12 of 14 sessions. 140 already in AI Matrx.\" */\n summary: z.string().max(400),\n});\n\n/** The answer to each service op: where the run stands. */\nexport const CodingHistoryStep = z.strictObject({\n /** Null when the run could not start (blocked before a plan existed). */\n plan_id: z.string().regex(/^[0-9a-f]{32}$/).nullable(),\n finished: z.boolean(),\n blocked: CodingHistoryBlocked.nullable(),\n run: CodingHistoryRun,\n});\n\n/**\n * Service op `coding.plan_missing`: read the cloud's list and this computer's history (stat only).\n * `credentials` is null when nobody is signed in: the service answers `blocked: signed_out` with\n * its own line, so every sentence the person reads comes from one place.\n */\nexport const CodingPlanMissingParams = z.strictObject({ credentials: CodingServiceCredentials.nullable() });\n/** Service op `coding.import_next`: import the plan's next bounded batch (null credentials: as above). */\nexport const CodingImportNextParams = z.strictObject({\n plan_id: z.string().regex(/^[0-9a-f]{32}$/),\n credentials: CodingServiceCredentials.nullable(),\n});\n\n/** The coding service's progress messages (sent while it reads a large history). */\nexport const CodingServiceProgress = z.strictObject({\n phase: z.enum([\"checking\", \"importing\"]),\n done: nonNegInt,\n total: nonNegInt,\n});\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Router op (`coding.history.*`)\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const CodingHistoryImportMissingParams = z.strictObject({});\nexport const CodingHistoryImportMissingResult = z.strictObject({\n state: z.enum([\"done\", \"blocked\", \"cancelled\"]),\n blocked: CodingHistoryBlocked.nullable(),\n run: CodingHistoryRun,\n elapsed_ms: nonNegInt,\n});\n\n/** Sent to the client that started `coding.history.import_missing`, for that request. */\nexport const CodingHistoryProgressEvent = z.strictObject({\n request_id: RequestId,\n phase: z.enum([\"checking\", \"importing\"]),\n /** Sessions settled so far, of `total` candidates (0 of 0 while checking). */\n done: nonNegInt,\n total: nonNegInt,\n imported: nonNegInt,\n failed: nonNegInt,\n});\n\nexport type CodingServiceCredentials = z.output<typeof CodingServiceCredentials>;\nexport type CodingHistoryBlocked = z.output<typeof CodingHistoryBlocked>;\nexport type CodingHistoryRun = z.output<typeof CodingHistoryRun>;\nexport type CodingHistoryStep = z.output<typeof CodingHistoryStep>;\nexport type CodingServiceProgress = z.output<typeof CodingServiceProgress>;\nexport type CodingHistoryImportMissingResult = z.output<typeof CodingHistoryImportMissingResult>;\nexport type CodingHistoryProgressEvent = z.output<typeof CodingHistoryProgressEvent>;\n\n// Every schema's type beside it (type-exports.test.ts).\nexport type CodingHistoryFailure = z.output<typeof CodingHistoryFailure>;\nexport type CodingPlanMissingParams = z.output<typeof CodingPlanMissingParams>;\nexport type CodingImportNextParams = z.output<typeof CodingImportNextParams>;\nexport type CodingHistoryImportMissingParams = z.output<typeof CodingHistoryImportMissingParams>;\n","/**\n * @ai-matrx/desktop-protocol — the `coding` capability's sessions (SPEC §6 `coding`, \"code from\n * anywhere\"): the Claude Code and Codex chats Matrx 2's engine (`@ai-matrx/coding-sessions`) runs\n * and discovers on this computer, read and driven from a phone, the web or an agent through the\n * relay. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. Added in 1.38.\n *\n * TWO SHAPES, ON PURPOSE:\n * - Params are wire-designed (snake_case), like every other op.\n * - The RECORDS the engine owns (a session, a run, a transcript item, a discovered chat, a\n * provider's status, a preference) travel in the engine's own shape (camelCase), so the Mac's\n * own screen (IPC) and a phone (relay) render exactly the same rows with the same code\n * (`@ai-matrx/coding-sessions/react`). The core fills every \"optional or null\" engine field\n * with null before sending (the strict Python twin cannot mirror optional+nullable), so each\n * record's z.output is assignable to the package's own type (proven in coding-sessions).\n *\n * Not on the wire, by design (they act on the computer's own screen or its own sign-in): open a\n * folder in an app, the screen's own preferences and drafts, retrying the apps' titles, and the\n * agent catalog reads (a web client reads the catalog directly as the same person).\n */\nimport { z } from \"zod\";\nimport { ResourceId, nonNegInt } from \"./primitives\";\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Building blocks\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const CodingProviderName = z.enum([\"claude\", \"codex\"]);\nexport const CodingRunStatus = z.enum([\"starting\", \"running\", \"completed\", \"stopped\", \"failed\"]);\n\n/** Our session id (a UUID) or a provider's own session id (a UUID, or a Codex thread id). */\nconst SessionKey = z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/);\n/** An ISO-8601 timestamp, as the engine writes it. */\nconst IsoTime = z.string().min(10).max(40);\n/** A folder or file on the computer, as the engine reports it (native form). */\nconst LocalPath = z.string().min(1).max(4096);\n/** Exactly-once sends (the core keeps these ids 10 minutes). */\nexport const CodingClientRequestId = z.string().regex(/^[A-Za-z0-9_-]{8,64}$/);\nconst ShortText = z.string().max(500);\n\nexport const CodingRunUsage = z.strictObject({\n inputTokens: nonNegInt,\n outputTokens: nonNegInt,\n cachedInputTokens: nonNegInt,\n});\n\n/**\n * Who started a run, stamped by the core from the connection (never from call arguments):\n * \"This Mac\", \"iPhone\", \"Safari on Mac\", \"An agent\".\n */\nexport const CodingStartedBy = z.strictObject({\n kind: z.enum([\"this_computer\", \"web\", \"phone\", \"agent\", \"other\"]),\n label: z.string().min(1).max(80),\n});\n\nexport const CodingRunRecord = z.strictObject({\n runId: z.string().min(1).max(64),\n sessionId: SessionKey,\n provider: CodingProviderName,\n cwd: LocalPath,\n prompt: z.string().max(1_048_576),\n model: z.string().max(200).nullable(),\n status: CodingRunStatus,\n startedAt: IsoTime,\n endedAt: IsoTime.nullable(),\n error: z.string().max(65_536).nullable(),\n usage: CodingRunUsage.nullable(),\n costUsd: z.number().nullable(),\n billing: z.enum([\"subscription\", \"api\", \"unknown\"]).nullable(),\n startedBy: CodingStartedBy.nullable(),\n});\n\nexport const CodingSessionAgentPart = z.strictObject({\n part: z.enum([\"instructions\", \"skills\", \"tools\"]),\n loaded: nonNegInt,\n total: nonNegInt,\n});\n\nexport const CodingSessionAgent = z.strictObject({\n agentId: z.string().min(1).max(64),\n versionId: z.string().max(64).nullable(),\n versionNumber: nonNegInt.nullable(),\n name: z.string().max(300),\n definitionHash: z.string().max(200),\n loaded: z.array(CodingSessionAgentPart).max(3),\n unavailable: z.array(z.strictObject({ kind: z.string().max(60), name: z.string().max(300), reason: ShortText })).max(500),\n skills: z.array(z.string().max(300)).max(500),\n tools: z.array(z.string().max(300)).max(500),\n variables: z.record(z.string().max(200), z.unknown()),\n blockDue: z.boolean(),\n deliveredAt: IsoTime.nullable(),\n replaces: z.string().max(300).nullable(),\n});\n\nexport const CodingSessionRecord = z.strictObject({\n id: SessionKey,\n provider: CodingProviderName,\n providerSessionId: SessionKey.nullable(),\n cwd: LocalPath,\n title: z.string().max(500),\n model: z.string().max(200).nullable(),\n effort: z.string().max(40).nullable(),\n origin: z.enum([\"started\", \"takeover\"]),\n createdAt: IsoTime,\n updatedAt: IsoTime,\n lastRunId: z.string().max(64).nullable(),\n lastRunStatus: CodingRunStatus.nullable(),\n queued: z.array(z.string().max(1_048_576)).max(100),\n agent: CodingSessionAgent.nullable(),\n agentRemovedDue: z.boolean(),\n /**\n * (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session\n * runs as, or whose config directory holds the chat. Absent: the default sign-in.\n */\n accountId: z.string().min(1).max(64).optional(),\n});\n\nexport const CodingActiveElsewhere = z.strictObject({\n reason: z.enum([\"process\", \"recent-write\", \"open-tool-call\", \"open\"]),\n message: ShortText,\n /** The process driving it, when the evidence is a process (re-checked before any stop). */\n pid: z.int().min(1).nullable(),\n});\n\nconst CodingTitleSource = z.enum([\"app\", \"app-remembered\", \"custom-title\", \"ai-title\", \"agent-name\", \"summary\", \"first-prompt\", \"last-prompt\", \"unknown\"]);\n\nexport const CodingDiscoveredChat = z.strictObject({\n provider: CodingProviderName,\n providerSessionId: SessionKey,\n cwd: LocalPath.nullable(),\n title: z.string().max(500),\n titleSource: CodingTitleSource.optional(),\n titlePending: z.boolean().optional(),\n archived: z.boolean().optional(),\n scheduled: z.boolean().optional(),\n unlisted: z.boolean().optional(),\n unavailable: ShortText.nullable(),\n updatedAt: IsoTime,\n source: z.string().max(60).nullable(),\n activeElsewhere: CodingActiveElsewhere.nullable(),\n /**\n * (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session\n * runs as, or whose config directory holds the chat. Absent: the default sign-in.\n */\n accountId: z.string().min(1).max(64).optional(),\n});\n\nexport const CodingTranscriptItem = z.discriminatedUnion(\"kind\", [\n z.strictObject({ kind: z.literal(\"user\"), id: z.string().max(200), text: z.string(), at: IsoTime.nullable() }),\n z.strictObject({ kind: z.literal(\"text\"), id: z.string().max(200), text: z.string() }),\n z.strictObject({ kind: z.literal(\"text-delta\"), id: z.string().max(200), text: z.string() }),\n z.strictObject({ kind: z.literal(\"reasoning\"), id: z.string().max(200), text: z.string() }),\n z.strictObject({ kind: z.literal(\"tool-call\"), id: z.string().max(200), name: z.string().max(300), input: z.unknown() }),\n z.strictObject({\n kind: z.literal(\"tool-result\"),\n id: z.string().max(200),\n output: z.string(),\n isError: z.boolean(),\n /** The output's full size when only its start is here; `coding.item.full` reads the rest. */\n fullBytes: nonNegInt.optional(),\n }),\n z.strictObject({ kind: z.literal(\"usage\"), usage: CodingRunUsage, costUsd: z.number().nullable() }),\n z.strictObject({ kind: z.literal(\"notice\"), id: z.string().max(200), level: z.enum([\"info\", \"warning\"]), text: z.string() }),\n /** \"Continue on <account>\": the line across the transcript where the chat moved from `from`. */\n z.strictObject({ kind: z.literal(\"continued\"), id: z.string().max(200), from: z.string().max(300), text: z.string(), at: IsoTime.nullable() }),\n z.strictObject({ kind: z.literal(\"error\"), id: z.string().max(200), text: z.string() }),\n]);\n\nexport const CodingHistoryRecord = z.strictObject({\n items: z.array(CodingTranscriptItem),\n /** Only the end of the chat is here; \"Show earlier\" reads more (a bigger `max_bytes`). */\n truncated: z.boolean(),\n unavailable: ShortText.nullable(),\n /** The last live item `seq` this read already contains; a watch applies only newer ones. */\n seq: nonNegInt,\n});\n\nexport const CodingQuotaWindow = z.strictObject({\n label: z.string().max(120),\n usedPercent: z.number().nullable(),\n resetsAt: z.string().max(80).nullable(),\n valueLabel: z.string().max(120).nullable(),\n});\n\nexport const CodingProviderProblem = z.strictObject({\n kind: z.enum([\"usage-limit\", \"signed-out\"]),\n message: z.string().max(2000),\n until: z.string().max(120).nullable(),\n at: IsoTime,\n});\n\n/** (1.57) One account's usage as the provider last reported it (Claude: its runs' rate-limit events; Codex: its probe). */\nexport const CodingAccountUsage = z.strictObject({\n windows: z.array(CodingQuotaWindow).max(20),\n /** The provider's own status word (\"allowed\", \"allowed_warning\", \"rejected\"...), when it gives one. */\n status: z.string().max(60).nullable(),\n /** When a rejected status lifts (ISO), when the provider says. */\n resetsAt: z.string().max(80).nullable(),\n at: IsoTime,\n});\n\n/** (1.57) Where a limited sign-in can continue: another account of the same app (null id: the default sign-in). */\nexport const CodingContinueTarget = z.strictObject({\n accountId: z.string().min(1).max(64).nullable(),\n label: z.string().max(200),\n});\n\n/**\n * (1.53) One of the person's other accounts for an app on the computer (Matrx 2's Accounts), by id and\n * name only, never its home. (1.57) With its own health and usage, as the default sign-in's are said.\n */\nexport const CodingProviderAccount = z.strictObject({\n id: z.string().min(1).max(64),\n label: z.string().max(200),\n /** (1.57) No known usage limit or expired sign-in on this account. Absent: not read. */\n ready: z.boolean().optional(),\n lastProblem: CodingProviderProblem.optional(),\n problem: ShortText.optional(),\n fix: ShortText.optional(),\n /** (1.57) Absent: never seen (\"No usage data yet\"). */\n usage: CodingAccountUsage.optional(),\n /** (1.57) This account is limited and that other one is not: \"Continue on <label>\". */\n continueOn: CodingContinueTarget.optional(),\n});\n\nexport const CodingProviderBinary = z.strictObject({\n path: LocalPath,\n version: z.string().max(80).nullable(),\n source: z.enum([\"desktop-app\", \"path\", \"npm-global\", \"configured\"]),\n sourceLabel: z.string().max(120),\n newer: z.strictObject({ path: LocalPath, version: z.string().max(80), sourceLabel: z.string().max(120) }).nullable(),\n});\n\nexport const CodingProviderStatus = z.strictObject({\n provider: CodingProviderName,\n label: z.string().max(60),\n installed: z.boolean(),\n version: z.string().max(80).nullable(),\n loggedIn: z.boolean(),\n billing: z.enum([\"subscription\", \"api\", \"unknown\"]),\n plan: z.string().max(80).nullable(),\n account: z.string().max(320).nullable(),\n problem: ShortText.nullable(),\n fix: ShortText.nullable(),\n ready: z.boolean(),\n lastProblem: CodingProviderProblem.nullable(),\n quota: z.array(CodingQuotaWindow).max(20),\n models: z.array(z.strictObject({ id: z.string().max(200), label: z.string().max(200) })).max(200),\n efforts: z.array(z.string().max(40)).max(20),\n /**\n * Where the default model came from: the app's own settings file, the account (1.54: the signed-in\n * account's default, e.g. Codex's), or the driver's built-in pick. A peer older than 1.54 is sent\n * \"driver\" for \"account\" (its enum does not know the value).\n */\n defaultModel: z.strictObject({ id: z.string().max(200), source: z.enum([\"settings\", \"driver\", \"account\"]) }).nullable(),\n defaultEffort: z.string().max(40).nullable(),\n binary: CodingProviderBinary.nullable(),\n /**\n * (1.53) The person's other accounts for this app on the computer (Matrx 2's Accounts) that a run\n * can use, as the computer's engine lists them; New session offers them beside the default sign-in.\n * Absent: only the default sign-in (or a computer older than 1.53).\n */\n accounts: z.array(CodingProviderAccount).max(100).optional(),\n /** (1.53) The computer tried to list `accounts` and could not: a short sentence the form shows with a retry. */\n accountsProblem: ShortText.optional(),\n /** (1.57) The default sign-in's usage as last seen. Absent: never seen (\"No usage data yet\"). */\n usage: CodingAccountUsage.optional(),\n /** (1.57) The default sign-in is limited and this other account is not: \"Continue on <label>\". */\n continueOn: CodingContinueTarget.optional(),\n});\n\n/** The person's rename, pin, hide and \"last looked at\" for one chat, by the engine's chat key. */\nexport const CodingChatPreference = z.strictObject({\n title: z.string().max(500).nullable(),\n pinned: z.boolean(),\n hidden: z.boolean(),\n /** When the person last had this chat open on any screen of this computer (the \"New output\" dot). */\n lastSeenAt: IsoTime.nullable(),\n updatedAt: IsoTime.nullable(),\n});\n\nexport const CodingTitleStatus = z.strictObject({\n owner: z.boolean(),\n pending: z.boolean(),\n problem: ShortText.nullable(),\n renames: ShortText.nullable(),\n});\n\n/**\n * One row of THE recent coding chats (the Mac's Code › Recent and the phone's Sessions list draw\n * exactly these): the chats driven here and the coding apps' own chats, newest first, each with\n * the Mac's dot. `state`: running (amber \"Running\"), needs_attention (amber: failed or\n * interrupted since the person last looked), new_output (blue), elsewhere (amber \"Running in\n * <app>\"), idle (no dot).\n */\nexport const CodingRecentRow = z.strictObject({\n target: z.string().min(3).max(200),\n title: z.string().max(500),\n provider: CodingProviderName,\n sessionId: SessionKey.nullable(),\n providerSessionId: SessionKey.nullable(),\n cwd: LocalPath.nullable(),\n updatedAt: IsoTime,\n state: z.enum([\"running\", \"needs_attention\", \"new_output\", \"elsewhere\", \"idle\"]),\n stateLabel: z.string().max(120).nullable(),\n pinned: z.boolean(),\n startedBy: CodingStartedBy.nullable(),\n /**\n * (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session\n * runs as, or whose config directory holds the chat. Absent: the default sign-in.\n */\n accountId: z.string().min(1).max(64).optional(),\n});\n\nexport const CodingFolderCheck = z.strictObject({\n path: z.string().max(4096),\n exists: z.boolean(),\n isDirectory: z.boolean(),\n});\n\nexport const CodingRecentFolder = z.strictObject({ path: LocalPath, lastUsedAt: IsoTime, exists: z.boolean() });\n\nexport const CodingAgentSelectionParams = z.strictObject({\n agent_id: z.string().min(1).max(64),\n version_id: z.string().min(1).max(64).optional(),\n variables: z.record(z.string().max(200), z.unknown()).optional(),\n});\n\nexport const CodingSendResult = z.strictObject({\n session: CodingSessionRecord,\n run: CodingRunRecord.nullable(),\n /** The prompt waits behind a live run (it shows as a queued bubble). */\n queued: z.boolean(),\n});\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Unary ops\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const CodingProvidersParams = z.strictObject({});\nexport const CodingProvidersResult = z.strictObject({ providers: z.array(CodingProviderStatus).max(4) });\n\nexport const CodingSessionsListParams = z.strictObject({});\nexport const CodingSessionsListResult = z.strictObject({\n sessions: z.array(CodingSessionRecord),\n /** The latest run of each session, by session id. */\n runs: z.record(z.string().max(128), CodingRunRecord),\n recent: z.array(CodingRecentRow),\n title_status: CodingTitleStatus,\n});\n\nexport const CodingDiscoverParams = z.strictObject({ limit: z.int().min(1).max(1000).optional() });\nexport const CodingDiscoverResult = z.strictObject({ chats: z.array(CodingDiscoveredChat) });\n\nexport const CodingRunsListParams = z.strictObject({ session_id: SessionKey });\nexport const CodingRunsListResult = z.strictObject({ runs: z.array(CodingRunRecord) });\n\n/** A first page defaults to the device's config (256 KB); \"Show earlier\" asks for more. */\nexport const CodingHistoryParams = z.strictObject({ session_id: SessionKey, max_bytes: z.int().min(1024).max(209_715_200).optional() });\nexport const CodingHistoryResult = CodingHistoryRecord;\n\nexport const CodingTranscriptReadParams = z.strictObject({\n provider: CodingProviderName,\n provider_session_id: SessionKey,\n max_bytes: z.int().min(1024).max(209_715_200).optional(),\n});\nexport const CodingTranscriptReadResult = CodingHistoryRecord;\n\n/** The whole of one tool output the transcript carried only the start of. */\nexport const CodingItemFullParams = z.strictObject({\n provider: CodingProviderName,\n provider_session_id: SessionKey,\n item_id: z.string().min(1).max(200),\n});\nexport const CodingItemFullResult = z.strictObject({ output: z.string(), bytes: nonNegInt });\n\nexport const CodingActivityParams = z.strictObject({ provider: CodingProviderName, provider_session_id: SessionKey });\nexport const CodingActivityResult = z.strictObject({ active: CodingActiveElsewhere.nullable() });\n\nexport const CodingFoldersRecentParams = z.strictObject({});\nexport const CodingFoldersRecentResult = z.strictObject({ folders: z.array(CodingRecentFolder).max(100) });\nexport const CodingFoldersCheckParams = z.strictObject({ path: z.string().min(1).max(4096) });\nexport const CodingFoldersCheckResult = CodingFolderCheck;\nexport const CodingFoldersCreateParams = z.strictObject({ path: z.string().min(1).max(4096) });\nexport const CodingFoldersCreateResult = CodingFolderCheck;\n\nexport const CodingStartParams = z.strictObject({\n provider: CodingProviderName,\n cwd: z.string().min(1).max(4096),\n prompt: z.string().min(1).max(1_048_576),\n model: z.string().min(1).max(200).optional(),\n effort: z.string().min(1).max(40).optional(),\n agent: CodingAgentSelectionParams.optional(),\n /** One of the person's coding accounts on this computer (Accounts); absent = the default login. */\n account_profile_id: z.string().min(1).max(64).optional(),\n client_request_id: CodingClientRequestId,\n});\nexport const CodingStartResult = CodingSendResult;\n\n/**\n * Continue a chat from another app here. When it is live elsewhere the core refuses with\n * RESOURCE_BUSY carrying the sentence, unless `confirm_elsewhere` (the person saw the warning).\n */\nexport const CodingTakeoverParams = z.strictObject({\n provider: CodingProviderName,\n provider_session_id: SessionKey,\n cwd: z.string().min(1).max(4096),\n title: z.string().max(500).optional(),\n agent: CodingAgentSelectionParams.optional(),\n confirm_elsewhere: z.boolean().optional(),\n});\nexport const CodingTakeoverResult = z.strictObject({ session: CodingSessionRecord });\n\nexport const CodingSendParams = z.strictObject({\n session_id: SessionKey,\n prompt: z.string().min(1).max(1_048_576),\n client_request_id: CodingClientRequestId,\n});\n\nexport const CodingStopParams = z.strictObject({ run_id: z.string().min(1).max(64) });\nexport const CodingStopResult = z.strictObject({ run: CodingRunRecord.nullable() });\n\n/**\n * Stop a chat running in another app: the process is re-read at stop time and refused with a\n * sentence when it is gone or is now something else (a reused pid).\n */\nexport const CodingStopElsewhereParams = z.strictObject({\n provider: CodingProviderName,\n provider_session_id: SessionKey,\n pid: z.int().min(1),\n});\nexport const CodingStopElsewhereResult = z.strictObject({ stopped: z.boolean(), message: ShortText });\n\n/** The next run's model or effort; \"\" = the provider's own default. */\nexport const CodingOptionsSetParams = z.strictObject({\n session_id: SessionKey,\n model: z.string().max(200).optional(),\n effort: z.string().max(40).optional(),\n});\nexport const CodingOptionsSetResult = z.strictObject({ session: CodingSessionRecord });\n\n/**\n * (1.56) \"Continue on <account>\": the session moves to another of the person's accounts for its app\n * (absent `account_profile_id`: the default sign-in) and the turn a limit (or the person) stopped is\n * sent again there, exactly once per `client_request_id`. `how` \"moved\": the chat itself was carried\n * and resumes there; \"fresh\": it could not be, so a new chat started there told what came before.\n */\nexport const CodingAccountContinueParams = z.strictObject({\n session_id: SessionKey,\n account_profile_id: z.string().min(1).max(64).optional(),\n client_request_id: CodingClientRequestId,\n});\nexport const CodingAccountContinueResult = z.strictObject({\n session: CodingSessionRecord,\n run: CodingRunRecord.nullable(),\n how: z.enum([\"moved\", \"fresh\"]),\n});\n\n/** Load a different agent from the next message on; absent `agent` removes it. */\nexport const CodingAgentSetParams = z.strictObject({ session_id: SessionKey, agent: CodingAgentSelectionParams.optional() });\nexport const CodingAgentSetResult = z.strictObject({ session: CodingSessionRecord });\n\n/** Whether this computer is signed in to AI Matrx, so an agent can load into a session. */\nexport const CodingAgentsAccessParams = z.strictObject({});\nexport const CodingAgentsAccessResult = z.strictObject({\n signedIn: z.boolean(),\n userId: z.string().max(64).nullable(),\n organizationId: z.string().max(64).nullable(),\n configured: z.boolean(),\n});\n\nexport const CodingTitlesStatusParams = z.strictObject({});\nexport const CodingTitlesStatusResult = CodingTitleStatus;\n\nexport const CodingPrefsListParams = z.strictObject({});\nexport const CodingPrefsListResult = z.strictObject({ preferences: z.record(z.string().max(200), CodingChatPreference) });\n\n/** Rename (`title`; `clear_title` restores the chat's own), pin, hide. */\nexport const CodingPrefsSetParams = z.strictObject({\n key: z.string().min(1).max(200),\n title: z.string().min(1).max(500).optional(),\n clear_title: z.boolean().optional(),\n pinned: z.boolean().optional(),\n hidden: z.boolean().optional(),\n});\nexport const CodingPrefsSetResult = CodingPrefsListResult;\n\n/** The person opened this chat (on any screen): its \"New output\" dot clears everywhere. */\nexport const CodingRecentSeenParams = z.strictObject({ target: z.string().min(3).max(200) });\nexport const CodingRecentSeenResult = z.strictObject({ recent: z.array(CodingRecentRow) });\n\nexport const CodingSearchParams = z.strictObject({\n query: z.string().min(1).max(500),\n cursor: nonNegInt.optional(),\n limit: z.int().min(1).max(100).optional(),\n});\n/** One chat a search found. */\nexport const CodingSearchHit = z.strictObject({\n provider: CodingProviderName,\n providerSessionId: SessionKey,\n title: z.string().max(500),\n cwd: LocalPath.nullable(),\n updatedAt: IsoTime,\n where: z.enum([\"title\", \"content\"]),\n snippet: z.string().max(2000).nullable(),\n /**\n * (1.57) Claude Code: the account the record belongs to (Accounts' profile id): the one a session\n * runs as, or whose config directory holds the chat. Absent: the default sign-in.\n */\n accountId: z.string().min(1).max(64).optional(),\n});\nexport const CodingSearchResult = z.strictObject({\n query: z.string().max(500),\n hits: z.array(CodingSearchHit),\n scanned: nonNegInt,\n total: nonNegInt,\n nextCursor: nonNegInt.nullable(),\n});\n\n/**\n * \"Ask the desktop app to reconcile this conversation\" (the web's sync panel): deliver this one\n * chat's missing entries to AI Matrx through the shared importer. Progress arrives as\n * coding.history.progress for this request.\n */\nexport const CodingReconcileParams = z.strictObject({ provider: CodingProviderName, provider_session_id: SessionKey });\nexport const CodingReconcileResult = z.strictObject({\n state: z.enum([\"done\", \"blocked\", \"nothing_to_do\"]),\n summary: z.string().max(400),\n});\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Stream: Full Download\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * FULL DOWNLOAD over any transport: the provider's own complete transcript file, byte for byte,\n * on the op's stream. It also refreshes the person's opt-in cloud backup and counts the chat's\n * subagent transcripts. `available: false` says why (the stream then carries nothing).\n */\nexport const CodingTranscriptRawParams = z.strictObject({ provider: CodingProviderName, provider_session_id: SessionKey });\nexport const CodingTranscriptRawResult = z.strictObject({\n available: z.boolean(),\n reason: ShortText.nullable(),\n file_name: z.string().max(300).nullable(),\n bytes: nonNegInt,\n /** The opt-in cloud backup was refreshed (false: off, unchanged, or signed out). */\n backup_refreshed: z.boolean(),\n /** Subagent transcripts beside the chat (Claude Code), downloaded separately. */\n subagents: nonNegInt,\n});\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Resources: live lists and one live transcript\n// ─────────────────────────────────────────────────────────────────────────────\n\n/** Live changes to the sessions, runs, preferences, titles and recent rows (coding.changed). */\nexport const CodingWatchParams = z.strictObject({});\nexport const CodingWatchResult = z.strictObject({ resource_id: ResourceId });\n\n/**\n * One chat's live items (coding.item), replayed from `since_seq` when it is still in the device's\n * ring; older than the ring → coding.gap first, and the client reads history again.\n */\nexport const CodingSessionWatchParams = z.strictObject({ session_id: SessionKey, since_seq: nonNegInt.optional() });\nexport const CodingSessionWatchResult = z.strictObject({\n resource_id: ResourceId,\n /** The newest item seq the device has for this session right now. */\n seq: nonNegInt,\n});\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Events\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const CodingChangedEvent = z.discriminatedUnion(\"kind\", [\n z.strictObject({ kind: z.literal(\"session\"), session: CodingSessionRecord }),\n z.strictObject({ kind: z.literal(\"run\"), run: CodingRunRecord }),\n z.strictObject({ kind: z.literal(\"preferences\"), preferences: z.record(z.string().max(200), CodingChatPreference) }),\n z.strictObject({ kind: z.literal(\"titles\") }),\n z.strictObject({ kind: z.literal(\"recent\"), recent: z.array(CodingRecentRow) }),\n]);\n\n/** Repeated every heartbeat: a watcher that hears nothing for 2.5× the beat says \"Not live\". */\nexport const CodingWatchStateEvent = z.strictObject({ live: z.boolean(), reason: ShortText.nullable(), beat_ms: z.int().min(1000) });\n\nexport const CodingItemEvent = z.strictObject({\n session_id: SessionKey,\n run_id: z.string().min(1).max(64),\n seq: nonNegInt,\n item: CodingTranscriptItem,\n});\n\n/** Items between `since_seq` and `seq` are no longer held: read history again. */\nexport const CodingGapEvent = z.strictObject({ session_id: SessionKey, since_seq: nonNegInt, seq: nonNegInt });\n\n// ─────────────────────────────────────────────────────────────────────────────\n// session.identify (1.38): what this client is, in words, for \"Started from iPhone\"\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Sent once after hello by a client that knows the core is 1.38+ (an older core answers\n * UNKNOWN_OPERATION; a new hello field would have made every older core refuse the hello).\n */\nexport const SessionIdentifyParams = z.strictObject({ label: z.string().min(1).max(60) });\nexport const SessionIdentifyResult = z.strictObject({ label: z.string().max(60) });\n\nexport type CodingProviderName = z.output<typeof CodingProviderName>;\nexport type CodingRunStatus = z.output<typeof CodingRunStatus>;\nexport type CodingRunUsage = z.output<typeof CodingRunUsage>;\nexport type CodingStartedBy = z.output<typeof CodingStartedBy>;\nexport type CodingRunRecord = z.output<typeof CodingRunRecord>;\nexport type CodingSessionAgent = z.output<typeof CodingSessionAgent>;\nexport type CodingSessionRecord = z.output<typeof CodingSessionRecord>;\nexport type CodingActiveElsewhere = z.output<typeof CodingActiveElsewhere>;\nexport type CodingDiscoveredChat = z.output<typeof CodingDiscoveredChat>;\nexport type CodingTranscriptItem = z.output<typeof CodingTranscriptItem>;\nexport type CodingHistoryRecord = z.output<typeof CodingHistoryRecord>;\nexport type CodingProviderStatus = z.output<typeof CodingProviderStatus>;\nexport type CodingChatPreference = z.output<typeof CodingChatPreference>;\nexport type CodingTitleStatus = z.output<typeof CodingTitleStatus>;\nexport type CodingRecentRow = z.output<typeof CodingRecentRow>;\nexport type CodingFolderCheck = z.output<typeof CodingFolderCheck>;\nexport type CodingRecentFolder = z.output<typeof CodingRecentFolder>;\nexport type CodingAgentSelectionParams = z.output<typeof CodingAgentSelectionParams>;\nexport type CodingSendResult = z.output<typeof CodingSendResult>;\nexport type CodingSessionsListResult = z.output<typeof CodingSessionsListResult>;\nexport type CodingSearchResult = z.output<typeof CodingSearchResult>;\nexport type CodingTranscriptRawResult = z.output<typeof CodingTranscriptRawResult>;\nexport type CodingChangedEvent = z.output<typeof CodingChangedEvent>;\nexport type CodingWatchStateEvent = z.output<typeof CodingWatchStateEvent>;\nexport type CodingItemEvent = z.output<typeof CodingItemEvent>;\nexport type CodingGapEvent = z.output<typeof CodingGapEvent>;\nexport type CodingStartParams = z.output<typeof CodingStartParams>;\nexport type CodingTakeoverParams = z.output<typeof CodingTakeoverParams>;\nexport type CodingReconcileResult = z.output<typeof CodingReconcileResult>;\n\n// Every schema's type beside it (type-exports.test.ts).\nexport type CodingClientRequestId = z.output<typeof CodingClientRequestId>;\nexport type CodingSessionAgentPart = z.output<typeof CodingSessionAgentPart>;\nexport type CodingQuotaWindow = z.output<typeof CodingQuotaWindow>;\nexport type CodingProviderProblem = z.output<typeof CodingProviderProblem>;\nexport type CodingProviderBinary = z.output<typeof CodingProviderBinary>;\nexport type CodingAccountUsage = z.output<typeof CodingAccountUsage>;\nexport type CodingContinueTarget = z.output<typeof CodingContinueTarget>;\nexport type CodingProviderAccount = z.output<typeof CodingProviderAccount>;\nexport type CodingSearchHit = z.output<typeof CodingSearchHit>;\nexport type CodingProvidersParams = z.output<typeof CodingProvidersParams>;\nexport type CodingProvidersResult = z.output<typeof CodingProvidersResult>;\nexport type CodingSessionsListParams = z.output<typeof CodingSessionsListParams>;\nexport type CodingDiscoverParams = z.output<typeof CodingDiscoverParams>;\nexport type CodingDiscoverResult = z.output<typeof CodingDiscoverResult>;\nexport type CodingRunsListParams = z.output<typeof CodingRunsListParams>;\nexport type CodingRunsListResult = z.output<typeof CodingRunsListResult>;\nexport type CodingHistoryParams = z.output<typeof CodingHistoryParams>;\nexport type CodingTranscriptReadParams = z.output<typeof CodingTranscriptReadParams>;\nexport type CodingItemFullParams = z.output<typeof CodingItemFullParams>;\nexport type CodingItemFullResult = z.output<typeof CodingItemFullResult>;\nexport type CodingActivityParams = z.output<typeof CodingActivityParams>;\nexport type CodingActivityResult = z.output<typeof CodingActivityResult>;\nexport type CodingFoldersRecentParams = z.output<typeof CodingFoldersRecentParams>;\nexport type CodingFoldersRecentResult = z.output<typeof CodingFoldersRecentResult>;\nexport type CodingFoldersCheckParams = z.output<typeof CodingFoldersCheckParams>;\nexport type CodingFoldersCreateParams = z.output<typeof CodingFoldersCreateParams>;\nexport type CodingTakeoverResult = z.output<typeof CodingTakeoverResult>;\nexport type CodingSendParams = z.output<typeof CodingSendParams>;\nexport type CodingStopParams = z.output<typeof CodingStopParams>;\nexport type CodingStopResult = z.output<typeof CodingStopResult>;\nexport type CodingStopElsewhereParams = z.output<typeof CodingStopElsewhereParams>;\nexport type CodingStopElsewhereResult = z.output<typeof CodingStopElsewhereResult>;\nexport type CodingOptionsSetParams = z.output<typeof CodingOptionsSetParams>;\nexport type CodingOptionsSetResult = z.output<typeof CodingOptionsSetResult>;\nexport type CodingAccountContinueParams = z.output<typeof CodingAccountContinueParams>;\nexport type CodingAccountContinueResult = z.output<typeof CodingAccountContinueResult>;\nexport type CodingAgentSetParams = z.output<typeof CodingAgentSetParams>;\nexport type CodingAgentSetResult = z.output<typeof CodingAgentSetResult>;\nexport type CodingAgentsAccessParams = z.output<typeof CodingAgentsAccessParams>;\nexport type CodingAgentsAccessResult = z.output<typeof CodingAgentsAccessResult>;\nexport type CodingTitlesStatusParams = z.output<typeof CodingTitlesStatusParams>;\nexport type CodingPrefsListParams = z.output<typeof CodingPrefsListParams>;\nexport type CodingPrefsListResult = z.output<typeof CodingPrefsListResult>;\nexport type CodingPrefsSetParams = z.output<typeof CodingPrefsSetParams>;\nexport type CodingRecentSeenParams = z.output<typeof CodingRecentSeenParams>;\nexport type CodingRecentSeenResult = z.output<typeof CodingRecentSeenResult>;\nexport type CodingSearchParams = z.output<typeof CodingSearchParams>;\nexport type CodingReconcileParams = z.output<typeof CodingReconcileParams>;\nexport type CodingTranscriptRawParams = z.output<typeof CodingTranscriptRawParams>;\nexport type CodingWatchParams = z.output<typeof CodingWatchParams>;\nexport type CodingWatchResult = z.output<typeof CodingWatchResult>;\nexport type CodingSessionWatchParams = z.output<typeof CodingSessionWatchParams>;\nexport type CodingSessionWatchResult = z.output<typeof CodingSessionWatchResult>;\nexport type SessionIdentifyParams = z.output<typeof SessionIdentifyParams>;\nexport type SessionIdentifyResult = z.output<typeof SessionIdentifyResult>;\n","/**\n * @ai-matrx/desktop-protocol — cap browser (protocol 1.28): the AI Matrx browser extension as a\n * client of Matrx 2, and Matrx 2's agents driving it. Schema source: lint-enforced rules in\n * scripts/check-schema-source.mjs.\n *\n * The extension finds Matrx 2 with `GET /v1/health` (DesktopHealth, public, no token), pairs once\n * with `POST /v1/pair` (BrowserPairRequest → BrowserPairResult, loopback + an allowed extension\n * Origin), connects to `/v1/connect` as clientType \"extension\" with `bearer.<pair token>`, says\n * hello as usual (the envelope is unchanged) and then `browser.register` — once the welcome lists\n * it. Matrx 2 checks the extension's account against the device owner; only a session of the same\n * account is ever driven. An agent's call (`browser.call`) reaches exactly one session as the event\n * `browser.invoke`; the extension answers with `browser.result` (accepted only from that session)\n * and may say `browser.progress` while a person confirms the action in Chrome.\n */\nimport { z } from \"zod\";\nimport { epochMs, nonNegInt } from \"./primitives\";\n\n/** Stable per Chrome profile (the extension mints it once): one session per instance. */\nexport const BrowserClientInstance = z.string().min(1).max(64).regex(/^[A-Za-z0-9_.:-]+$/);\n\n/** The browser the extension runs in, as the extension reports it. */\nexport const BrowserKind = z.enum([\"chrome\", \"edge\", \"brave\", \"arc\", \"opera\", \"vivaldi\", \"chromium\", \"firefox\", \"other\"]);\n\n/**\n * Whether this computer's agents may drive the session:\n * - `connected` — same account as the device owner: routable;\n * - `different_account` — the extension is signed in to another AI Matrx account: listed, never driven;\n * - `extension_signed_out` — the extension is signed out of AI Matrx: listed, never driven;\n * - `device_signed_out` — Matrx 2 itself is signed out, so there is no owner to match: listed, never driven;\n * - `unverified` — the account could not be checked (no network, keys unavailable): retried on the next register.\n */\nexport const BrowserSessionState = z.enum([\"connected\", \"different_account\", \"extension_signed_out\", \"device_signed_out\", \"unverified\"]);\n\nexport const BrowserSession = z.strictObject({\n client_instance: BrowserClientInstance,\n /** What the person sees (\"Chrome — Work\"), set by the extension. */\n client_label: z.string().min(1).max(128),\n browser: BrowserKind,\n extension_version: z.string().min(1).max(32),\n state: BrowserSessionState,\n /** True only for `connected`: an agent's call can reach this session. */\n routable: z.boolean(),\n /** The extension's account email from its token (null when signed out or unknown). */\n account_email: z.string().max(320).nullable(),\n connected_at_ms: epochMs,\n last_call_at_ms: epochMs.nullable(),\n calls: nonNegInt,\n errors: nonNegInt,\n /** Call latency over the last 200 calls; null before the first. */\n p50_ms: nonNegInt.nullable(),\n p95_ms: nonNegInt.nullable(),\n /** A call is waiting for the person to confirm it in the browser. */\n awaiting_confirmation: z.boolean(),\n});\n\n// ── ops the extension calls ─────────────────────────────────────────────────────────────\n\nexport const BrowserRegisterParams = z.strictObject({\n client_instance: BrowserClientInstance,\n client_label: z.string().min(1).max(128),\n browser: BrowserKind,\n extension_version: z.string().min(1).max(32),\n /** The extension's current AI Matrx access token, checked against the device owner; null when signed out. */\n account_token: z.string().min(16).max(8192).nullable(),\n});\nexport const BrowserRegisterResult = z.strictObject({ session: BrowserSession });\n\nexport const BrowserCallError = z.strictObject({\n message: z.string().max(1000),\n /** The extension's own error code, when it has one (\"tool_not_found\", \"denied\"). */\n code: z.string().max(64).nullable(),\n});\n\n/** The extension's answer to one `browser.invoke`. */\nexport const BrowserResultParams = z.strictObject({\n call_id: z.string().min(1).max(64),\n ok: z.boolean(),\n /** The tool's result when ok (any JSON). */\n result: z.unknown(),\n error: BrowserCallError.nullable(),\n});\nexport const BrowserResultResult = z.strictObject({ accepted: z.boolean() });\n\nexport const BrowserCallPhase = z.enum([\"awaiting_confirmation\", \"running\"]);\n\n/** The extension says where a call stands (the person is being asked to confirm it). */\nexport const BrowserProgressParams = z.strictObject({ call_id: z.string().min(1).max(64), phase: BrowserCallPhase });\nexport const BrowserProgressResult = z.strictObject({ accepted: z.boolean() });\n\n// ── ops the app's screens call ──────────────────────────────────────────────────────────\n\nexport const BrowserSessionsParams = z.strictObject({});\nexport const BrowserSessionsResult = z.strictObject({\n /** The person's Browser connection switch. Off: no pairing, no extension sessions. */\n enabled: z.boolean(),\n /** Whether Matrx 2 is signed in (without an owner no session is routable). */\n owner_signed_in: z.boolean(),\n sessions: z.array(BrowserSession).max(64),\n});\n\nexport const BrowserDisconnectParams = z.strictObject({ client_instance: BrowserClientInstance });\nexport const BrowserDisconnectResult = z.strictObject({ disconnected: z.boolean() });\n\nexport const BrowserSetEnabledParams = z.strictObject({ enabled: z.boolean() });\nexport const BrowserSetEnabledResult = z.strictObject({ enabled: z.boolean() });\n\n/** The pairing code a browser on another computer types in (screen clients on this computer only). */\nexport const BrowserPairCodeParams = z.strictObject({});\nexport const BrowserPairCodeResult = z.strictObject({ code: z.string().min(16).max(128) });\nexport const BrowserPairResetParams = z.strictObject({});\n\n// ── ops agents call ─────────────────────────────────────────────────────────────────────\n\n/**\n * Run one of the extension's own tools (any `chrome-extension` tool_def row) in one session. The\n * server validates `args` against that row's parameters; here they are opaque and size-capped.\n */\nexport const BrowserCallParams = z.strictObject({\n tool: z.string().min(1).max(96).regex(/^[a-z][a-z0-9_]*$/),\n args: z.record(z.string(), z.unknown()),\n /** Which session; default: the most recently active routable one (BROWSER ambiguity → CONFLICT). */\n client_instance: BrowserClientInstance.optional(),\n /** How long to wait, including a person's confirmation; default 120 s. */\n timeout_ms: z.int().min(1000).max(600_000).optional(),\n});\nexport const BrowserCallResult = z.strictObject({\n client_instance: BrowserClientInstance,\n result: z.unknown(),\n duration_ms: nonNegInt,\n});\n\n// ── events ──────────────────────────────────────────────────────────────────────────────\n\n// ── (1.37) The bridge's own diagnostics (Matrx Local's Bridge Test metrics table and live log), for\n// every one of the owner's clients — the phone and the web app as well as Matrx 2's own window.\n// Never content: a message records its kind, tool, call and outcome, never arguments or answers.\nexport const BrowserToolMetricsParams = z.strictObject({ client_instance: BrowserClientInstance });\nexport const BrowserToolMetric = z.strictObject({\n tool: z.string().max(256),\n calls: nonNegInt,\n errors: nonNegInt,\n /** Over the last 200 answered calls; null before the first answer. */\n p50_ms: nonNegInt.nullable(),\n p95_ms: nonNegInt.nullable(),\n last_call_at_ms: epochMs.nullable(),\n last_error: z.string().max(2048).nullable(),\n});\nexport const BrowserToolMetricsResult = z.strictObject({ client_instance: z.string(), tools: z.array(BrowserToolMetric) });\nexport const BrowserResetCountersParams = z.strictObject({ client_instance: BrowserClientInstance });\n/** `reset` false: that browser is not connected (its numbers by tool were cleared all the same). */\nexport const BrowserResetCountersResult = z.strictObject({ reset: z.boolean() });\nexport const BrowserLogParams = z.strictObject({\n /** Only messages after this seq (0: from the oldest kept; the core keeps the last 500). */\n after_seq: nonNegInt.default(0),\n limit: z.int().min(1).max(500).default(500),\n});\nexport const BrowserLogMessage = z.strictObject({\n seq: nonNegInt,\n at_ms: epochMs,\n direction: z.enum([\"to_browser\", \"from_browser\", \"core\"]),\n client_instance: z.string(),\n kind: z.enum([\"register\", \"invoke\", \"result\", \"progress\", \"timeout\", \"closed\"]),\n tool: z.string().nullable(),\n call_id: z.string().nullable(),\n ok: z.boolean().nullable(),\n detail: z.string().max(1024),\n});\nexport const BrowserLogResult = z.strictObject({\n messages: z.array(BrowserLogMessage),\n /** The newest seq the core has written (pass it back as after_seq to follow the log). */\n last_seq: nonNegInt,\n});\n\n/** Core → one extension session: run this tool and answer with browser.result. */\nexport const BrowserInvokeEvent = z.strictObject({\n call_id: z.string().min(1).max(64),\n tool: z.string().min(1).max(96),\n args: z.record(z.string(), z.unknown()),\n deadline_ms: epochMs,\n});\n\n/** Core → the app's screens: the session list changed (re-read browser.sessions). */\nexport const BrowserSessionsChangedEvent = z.strictObject({ count: nonNegInt, enabled: z.boolean() });\n\n/** Core → the caller of a browser.call: where it stands. */\nexport const BrowserProgressEvent = z.strictObject({\n call_id: z.string().min(1).max(64),\n client_instance: BrowserClientInstance,\n phase: BrowserCallPhase,\n});\n\n// ── the HTTP doors on the localhost port (not ops: the extension uses them before it connects) ──\n\n/** `GET /v1/health`: public, no token, no user id. Matrx 2 never serves `/health` (Matrx Local's). */\nexport const DesktopHealth = z.strictObject({\n status: z.literal(\"ok\"),\n service: z.literal(\"matrx-desktop\"),\n version: z.string().max(32),\n protocol_version: z.string().max(16),\n ws_path: z.literal(\"/v1/connect\"),\n device_id: z.string().max(64),\n browser_connection: z.enum([\"on\", \"off\"]),\n});\n\n/** `POST /v1/pair` body. */\nexport const BrowserPairRequest = z.strictObject({ client_instance: BrowserClientInstance });\n/** `POST /v1/pair` answer: the token rides `bearer.<pair_token>` on /v1/connect. */\nexport const BrowserPairResult = z.strictObject({ pair_token: z.string().min(16).max(128), ws_path: z.literal(\"/v1/connect\") });\n\n/**\n * The extension IDs allowed to pair (Origin `chrome-extension://<id>`): the Chrome Web Store build\n * and the keyed development build. matrx-extend's src/config/identity.ts names the same IDs; this\n * constant is the one both sides read. The development ID is accepted only by development builds.\n */\nexport const MATRX_EXTENSION_IDS = {\n store: \"hnfolienncfklkgmdjjmhhegglimlamg\",\n development: \"cihdmkcdjjckfhjpgoedmgfpoljebaml\",\n} as const;\n\n/** The discovery file Matrx 2 writes under ~/.matrx (Matrx Local keeps local.json). */\nexport const DISCOVERY_FILE = { live: \"matrx2.json\", development: \"matrx2-dev.json\" } as const;\n\nexport type BrowserKind = z.output<typeof BrowserKind>;\nexport type BrowserSessionState = z.output<typeof BrowserSessionState>;\nexport type BrowserSession = z.output<typeof BrowserSession>;\nexport type BrowserRegisterParams = z.output<typeof BrowserRegisterParams>;\nexport type BrowserResultParams = z.output<typeof BrowserResultParams>;\nexport type BrowserCallPhase = z.output<typeof BrowserCallPhase>;\nexport type BrowserSessionsResult = z.output<typeof BrowserSessionsResult>;\nexport type BrowserCallParams = z.output<typeof BrowserCallParams>;\nexport type BrowserCallResult = z.output<typeof BrowserCallResult>;\nexport type BrowserInvokeEvent = z.output<typeof BrowserInvokeEvent>;\nexport type DesktopHealth = z.output<typeof DesktopHealth>;\nexport type BrowserToolMetric = z.output<typeof BrowserToolMetric>;\nexport type BrowserToolMetricsResult = z.output<typeof BrowserToolMetricsResult>;\nexport type BrowserLogMessage = z.output<typeof BrowserLogMessage>;\nexport type BrowserLogParams = z.output<typeof BrowserLogParams>;\nexport type BrowserLogResult = z.output<typeof BrowserLogResult>;\nexport type BrowserPairResult = z.output<typeof BrowserPairResult>;\n\n// Every schema's type beside it (type-exports.test.ts).\nexport type BrowserClientInstance = z.output<typeof BrowserClientInstance>;\nexport type BrowserRegisterResult = z.output<typeof BrowserRegisterResult>;\nexport type BrowserCallError = z.output<typeof BrowserCallError>;\nexport type BrowserResultResult = z.output<typeof BrowserResultResult>;\nexport type BrowserProgressParams = z.output<typeof BrowserProgressParams>;\nexport type BrowserProgressResult = z.output<typeof BrowserProgressResult>;\nexport type BrowserSessionsParams = z.output<typeof BrowserSessionsParams>;\nexport type BrowserDisconnectParams = z.output<typeof BrowserDisconnectParams>;\nexport type BrowserDisconnectResult = z.output<typeof BrowserDisconnectResult>;\nexport type BrowserSetEnabledParams = z.output<typeof BrowserSetEnabledParams>;\nexport type BrowserSetEnabledResult = z.output<typeof BrowserSetEnabledResult>;\nexport type BrowserPairCodeParams = z.output<typeof BrowserPairCodeParams>;\nexport type BrowserPairCodeResult = z.output<typeof BrowserPairCodeResult>;\nexport type BrowserPairResetParams = z.output<typeof BrowserPairResetParams>;\nexport type BrowserToolMetricsParams = z.output<typeof BrowserToolMetricsParams>;\nexport type BrowserResetCountersParams = z.output<typeof BrowserResetCountersParams>;\nexport type BrowserResetCountersResult = z.output<typeof BrowserResetCountersResult>;\nexport type BrowserSessionsChangedEvent = z.output<typeof BrowserSessionsChangedEvent>;\nexport type BrowserProgressEvent = z.output<typeof BrowserProgressEvent>;\nexport type BrowserPairRequest = z.output<typeof BrowserPairRequest>;\n","/**\n * @ai-matrx/desktop-protocol — cap net (SPEC §6, §10 desktop_net): the computer's own network as it\n * sees it (interfaces, Wi-Fi, Bluetooth, the devices on the local network, Bonjour services, open\n * ports on a host) and downloads onto the computer. Matrx Local's local_net and local_web.download.\n * Served by the core's `net` owner. Schema source: lint-enforced rules in\n * scripts/check-schema-source.mjs. Added in protocol 1.37.\n */\nimport { z } from \"zod\";\nimport { AbsPath, nonNegInt } from \"./primitives\";\n\n// ── net.info: interfaces, the default gateway and DNS (matrx-local NetworkInfo) ─────────────────\nexport const NetInfoParams = z.strictObject({});\nexport const NetAddress = z.strictObject({\n address: z.string(),\n family: z.enum([\"ipv4\", \"ipv6\"]),\n netmask: z.string().nullable(),\n /** CIDR form (\"192.168.1.20/24\"); null where the OS gives no prefix. */\n cidr: z.string().nullable(),\n});\nexport const NetInterface = z.strictObject({\n name: z.string(),\n mac: z.string().nullable(),\n /** Loopback and other internal interfaces. */\n internal: z.boolean(),\n addresses: z.array(NetAddress),\n});\nexport const NetInfoResult = z.strictObject({\n hostname: z.string(),\n interfaces: z.array(NetInterface),\n /** The default route's gateway; null when the OS does not say (or there is none). */\n gateway: z.string().nullable(),\n /** The DNS servers the OS uses; empty when it does not say. */\n dns: z.array(z.string()),\n});\n\n// ── net.wifi: the current Wi-Fi network and the ones in range (matrx-local WifiNetworks) ────────\nexport const NetWifiParams = z.strictObject({});\nexport const NetWifiNetwork = z.strictObject({\n /** null: the OS hides the name (macOS without Location Services for this app). */\n ssid: z.string().nullable(),\n /** dBm; null where the OS does not say. */\n rssi: z.int().nullable(),\n channel: z.string().nullable(),\n security: z.string().nullable(),\n});\nexport const NetWifiResult = z.strictObject({\n /** Whether the computer has a Wi-Fi interface at all. */\n available: z.boolean(),\n /** The network the computer is on; null when it is on none. */\n current: NetWifiNetwork.nullable(),\n /** Networks in range (may be empty where the OS lists none to apps). */\n networks: z.array(NetWifiNetwork),\n});\n\n// ── net.bluetooth: paired and connected Bluetooth devices (matrx-local BluetoothDevices) ────────\nexport const NetBluetoothParams = z.strictObject({});\nexport const NetBluetoothDevice = z.strictObject({\n name: z.string(),\n address: z.string().nullable(),\n connected: z.boolean(),\n /** What it is, in the OS's words (\"Headphones\", \"Keyboard\"); null where it does not say. */\n kind: z.string().nullable(),\n /** Battery percent, where the OS reports it. */\n battery: z.int().min(0).max(100).nullable(),\n});\nexport const NetBluetoothResult = z.strictObject({\n /** Bluetooth is on; null where the OS does not say. */\n powered: z.boolean().nullable(),\n devices: z.array(NetBluetoothDevice),\n});\n\n// ── net.devices: the devices this computer has seen on its local network (matrx-local\n// ConnectedDevices, NetworkScan: the ARP neighbour table) ───────────────────────────────────\nexport const NetDevicesParams = z.strictObject({});\nexport const NetDevice = z.strictObject({\n ip: z.string(),\n mac: z.string().nullable(),\n interface: z.string().nullable(),\n /** The name the local network gives it (reverse DNS / mDNS), when the table carries one. */\n hostname: z.string().nullable(),\n});\nexport const NetDevicesResult = z.strictObject({ devices: z.array(NetDevice) });\n\n// ── net.mdns: Bonjour / mDNS services on the local network (matrx-local MDNSDiscover) ───────────\nexport const NetMdnsParams = z.strictObject({\n /** A service type (\"_http._tcp\"); absent lists the service types found. */\n service_type: z.string().min(1).max(64).regex(/^_[A-Za-z0-9-]+\\._(tcp|udp)$/).optional(),\n /** How long to listen. */\n timeout_s: z.int().min(1).max(30).default(3),\n});\nexport const NetMdnsService = z.strictObject({\n name: z.string(),\n type: z.string(),\n domain: z.string(),\n interface: z.string().nullable(),\n});\nexport const NetMdnsResult = z.strictObject({ services: z.array(NetMdnsService) });\n\n// ── net.scan: which TCP ports answer on a host (matrx-local PortScan) ───────────────────────────\nexport const NetScanParams = z.strictObject({\n /** A host name or address; a private or loopback address unless `allow_public`. */\n host: z.string().min(1).max(253),\n ports: z.array(z.int().min(1).max(65_535)).min(1).max(1024),\n timeout_ms: z.int().min(50).max(10_000).default(800),\n /** Scanning a host on the public internet needs saying so. */\n allow_public: z.boolean().default(false),\n});\nexport const NetScanResult = z.strictObject({\n host: z.string(),\n /** The address the host resolved to. */\n address: z.string(),\n open: z.array(z.int().min(1).max(65_535)),\n closed: nonNegInt,\n elapsed_ms: nonNegInt,\n});\n\n// ── net.download: a URL saved onto the computer (matrx-local DownloadFile) ──────────────────────\nexport const NetDownloadParams = z.strictObject({\n url: z.string().min(1).max(8192).regex(/^https?:\\/\\//),\n /** Where to save it: an absolute path (a folder keeps the URL's file name). */\n path: AbsPath,\n overwrite: z.boolean().default(false),\n timeout_s: z.int().min(1).max(3600).default(300),\n /** Refuse anything larger. */\n max_bytes: z.int().min(1).max(10_737_418_240).default(2_147_483_648),\n});\nexport const NetDownloadResult = z.strictObject({\n path: z.string(),\n bytes: nonNegInt,\n content_type: z.string().nullable(),\n /** The final URL after redirects. */\n url: z.string(),\n elapsed_ms: nonNegInt,\n});\n\nexport type NetInfoParams = z.output<typeof NetInfoParams>;\nexport type NetAddress = z.output<typeof NetAddress>;\nexport type NetInterface = z.output<typeof NetInterface>;\nexport type NetInfoResult = z.output<typeof NetInfoResult>;\nexport type NetWifiParams = z.output<typeof NetWifiParams>;\nexport type NetWifiNetwork = z.output<typeof NetWifiNetwork>;\nexport type NetWifiResult = z.output<typeof NetWifiResult>;\nexport type NetBluetoothParams = z.output<typeof NetBluetoothParams>;\nexport type NetBluetoothDevice = z.output<typeof NetBluetoothDevice>;\nexport type NetBluetoothResult = z.output<typeof NetBluetoothResult>;\nexport type NetDevicesParams = z.output<typeof NetDevicesParams>;\nexport type NetDevice = z.output<typeof NetDevice>;\nexport type NetDevicesResult = z.output<typeof NetDevicesResult>;\nexport type NetMdnsParams = z.output<typeof NetMdnsParams>;\nexport type NetMdnsService = z.output<typeof NetMdnsService>;\nexport type NetMdnsResult = z.output<typeof NetMdnsResult>;\nexport type NetScanParams = z.output<typeof NetScanParams>;\nexport type NetScanResult = z.output<typeof NetScanResult>;\nexport type NetDownloadParams = z.output<typeof NetDownloadParams>;\nexport type NetDownloadResult = z.output<typeof NetDownloadResult>;\n","/**\n * @ai-matrx/desktop-protocol — the person's own apps and automation (SPEC §6, §10 group 3): scripts\n * (AppleScript / JavaScript for Automation on a Mac, PowerShell on Windows), Mail, Messages,\n * Contacts, Calendar and Reminders, Photos, and where the computer is. Matrx Local's\n * local_mac_apps and local_windows_ps.run. Served by the core's `automation` and `personal`\n * owners through the OS's own scripting; each op answers PERMISSION_DENIED_OS (reason\n * `os_permission`) when the person has not allowed Matrx 2 that app, and PLATFORM_UNSUPPORTED\n * where the OS has no such app. Schema source: lint-enforced rules in\n * scripts/check-schema-source.mjs. Added in protocol 1.37.\n */\nimport { z } from \"zod\";\nimport { epochMs, nonNegInt } from \"./primitives\";\n\nconst Text = z.string().max(65_536);\n\n// ── automation.script: run a script in the OS's own automation language ─────────────────────────\nexport const AutomationScriptParams = z.strictObject({\n /** applescript and jxa: macOS (osascript); powershell: Windows (and pwsh where installed). */\n language: z.enum([\"applescript\", \"jxa\", \"powershell\"]),\n script: z.string().min(1).max(262_144),\n timeout_s: z.int().min(1).max(600).default(60),\n});\nexport const AutomationScriptResult = z.strictObject({\n stdout: z.string(),\n stderr: z.string(),\n exit_code: z.int(),\n timed_out: z.boolean(),\n /** stdout or stderr was cut at 1 MiB. */\n truncated: z.boolean(),\n elapsed_ms: nonNegInt,\n});\n\n// ── mail.*: the Mail app (macOS) ─────────────────────────────────────────────────────────────────\nexport const MailAccountsParams = z.strictObject({});\nexport const MailAccount = z.strictObject({\n name: z.string(),\n emails: z.array(z.string()),\n enabled: z.boolean(),\n /** (1.67) The account's mailboxes by name (Matrx Local's email_accounts listed them). */\n mailboxes: z.array(z.string()).optional(),\n});\nexport const MailAccountsResult = z.strictObject({ accounts: z.array(MailAccount) });\n\nexport const MailListParams = z.strictObject({\n /** The account's name in Mail; absent: every account. */\n account: z.string().min(1).max(256).optional(),\n /** The mailbox's name (\"INBOX\", \"Sent Messages\"). */\n mailbox: z.string().min(1).max(256).default(\"INBOX\"),\n unread_only: z.boolean().default(false),\n limit: z.int().min(1).max(200).default(25),\n});\nexport const MailMessage = z.strictObject({\n id: z.string(),\n subject: z.string(),\n sender: z.string(),\n received_at_ms: epochMs.nullable(),\n read: z.boolean(),\n account: z.string(),\n mailbox: z.string(),\n /** The first lines of the message's text. */\n preview: z.string(),\n});\nexport const MailListResult = z.strictObject({ messages: z.array(MailMessage) });\n\nexport const MailSendParams = z.strictObject({\n to: z.array(z.string().min(3).max(320)).min(1).max(50),\n cc: z.array(z.string().min(3).max(320)).max(50).default([]),\n /** (1.67) Blind copies (Matrx Local's send_email bcc). */\n bcc: z.array(z.string().min(3).max(320)).max(50).optional(),\n subject: z.string().max(998),\n body: Text,\n /** The sending account's address; absent: Mail's default. */\n from: z.string().min(3).max(320).optional(),\n /** false leaves it open in Mail as a draft for the person to send. */\n send: z.boolean().default(true),\n});\nexport const MailSendResult = z.strictObject({ sent: z.boolean() });\n\n// ── outlook.*: the person's own Microsoft Outlook (1.44) ─────────────────────────────────────────\n// The channel that needs no Microsoft consent: it drives the Outlook the person is already signed in\n// to. Classic Outlook for Windows is scriptable (its object model); new Outlook for Windows and\n// Outlook for Mac are not, and outlook.status says so instead of failing later. A draft is only\n// saved in the person's Drafts folder: nothing here sends.\nexport const OutlookStatusParams = z.strictObject({});\nexport const OutlookAccount = z.strictObject({ name: z.string(), email: z.string().nullable() });\nexport const OutlookStatusResult = z.strictObject({\n /** classic_windows: scriptable. new_windows / mac: installed, not scriptable. none: not found. */\n client: z.enum([\"classic_windows\", \"new_windows\", \"mac\", \"none\"]),\n scriptable: z.boolean(),\n version: z.string().nullable(),\n accounts: z.array(OutlookAccount),\n /** Why it is not scriptable here, in a sentence the person can act on; null when it is. */\n reason: z.string().nullable(),\n});\n\nconst Address = z.string().min(3).max(320);\nexport const OutlookDraftParams = z.strictObject({\n to: z.array(Address).max(100).default([]),\n cc: z.array(Address).max(100).default([]),\n bcc: z.array(Address).max(100).default([]),\n subject: z.string().max(998).default(\"\"),\n body: z.string().max(1_048_576).default(\"\"),\n body_format: z.enum([\"text\", \"html\"]).default(\"text\"),\n /** Files on this computer to attach (absolute paths). */\n attachments: z.array(z.string().min(1).max(4096)).max(50).default([]),\n /** The sending account's address (one of outlook.status's accounts); absent: Outlook's default. */\n account: Address.optional(),\n /** true also opens the draft in a window for the person. */\n display: z.boolean().default(false),\n});\nexport const OutlookDraftResult = z.strictObject({\n /** The draft's id in Outlook (outlook.read takes it). */\n id: z.string(),\n account: z.string().nullable(),\n folder: z.string(),\n attachments: nonNegInt,\n displayed: z.boolean(),\n});\n\nexport const OutlookListParams = z.strictObject({\n folder: z.enum([\"inbox\", \"sent\", \"drafts\"]).default(\"inbox\"),\n /** The account's address; absent: the default account. */\n account: Address.optional(),\n unread_only: z.boolean().default(false),\n limit: z.int().min(1).max(200).default(25),\n});\nexport const OutlookMessage = z.strictObject({\n id: z.string(),\n subject: z.string(),\n sender: z.string(),\n received_at_ms: epochMs.nullable(),\n read: z.boolean(),\n has_attachments: z.boolean(),\n /** The first lines of the message's text. */\n preview: z.string(),\n});\nexport const OutlookListResult = z.strictObject({ folder: z.string(), messages: z.array(OutlookMessage) });\n\nexport const OutlookReadParams = z.strictObject({ id: z.string().min(1).max(1024) });\nexport const OutlookReadResult = z.strictObject({\n id: z.string(),\n subject: z.string(),\n sender: z.string(),\n to: z.array(z.string()),\n cc: z.array(z.string()),\n received_at_ms: epochMs.nullable(),\n /** The plain text body, cut at 1 MiB. */\n body: z.string(),\n attachments: z.array(z.strictObject({ name: z.string(), size: nonNegInt })),\n});\n\n// ── messages.*: the Messages app (macOS) ──────────────────────────────────────────────────────────\n/** Messages' chats (its own word in the app is conversations; the op says chats). */\nexport const MessagesChatsParams = z.strictObject({ limit: z.int().min(1).max(200).default(25) });\nexport const MessagesChat = z.strictObject({\n chat_id: z.string(),\n name: z.string().nullable(),\n participants: z.array(z.string()),\n last_message_at_ms: epochMs.nullable(),\n service: z.string().nullable(),\n /** (1.67) The newest message's text (Matrx Local's list_conversations preview); absent when it has none. */\n last_message: z.string().optional(),\n});\nexport const MessagesChatsResult = z.strictObject({ chats: z.array(MessagesChat) });\n\nexport const MessagesListParams = z.strictObject({\n /** One chat (messages.chats' chat_id); absent: the newest across all. */\n chat_id: z.string().min(1).max(512).optional(),\n limit: z.int().min(1).max(500).default(50),\n /** (1.67) Only messages with this handle or chat name in them (partial: a phone, an email, a name). */\n contact: z.string().min(1).max(320).optional(),\n /** (1.67) Only messages not yet read. */\n unread_only: z.boolean().optional(),\n});\nexport const MessagesMessage = z.strictObject({\n id: z.string(),\n chat_id: z.string().nullable(),\n text: z.string(),\n from_me: z.boolean(),\n /** The other person's handle (phone or email); null for the person's own messages. */\n sender: z.string().nullable(),\n sent_at_ms: epochMs.nullable(),\n /** (1.67) Whether it has been read. */\n read: z.boolean().optional(),\n /** (1.67) iMessage, SMS or RCS, as the Messages database says. */\n service: z.string().optional(),\n /** (1.67) The chat's name (group chats); absent for a one-to-one chat. */\n chat_name: z.string().optional(),\n});\nexport const MessagesListResult = z.strictObject({ messages: z.array(MessagesMessage) });\n\nexport const MessagesSendParams = z.strictObject({\n /** A phone number or email the person can message. */\n to: z.string().min(3).max(320),\n text: z.string().min(1).max(20_000),\n /**\n * Send only over this service (Matrx Local's SendMessage `service`). Absent: iMessage first, and\n * SMS when the recipient has no iMessage (since 1.42).\n */\n service: z.enum([\"iMessage\", \"SMS\"]).optional(),\n});\nexport const MessagesSendResult = z.strictObject({ sent: z.boolean() });\n\n// ── contacts.*: Contacts (macOS) ──────────────────────────────────────────────────────────────────\nexport const ContactsSearchParams = z.strictObject({\n /** Matched against names, organizations, emails and phone numbers; absent (1.67): the first `limit` contacts. */\n query: z.string().min(1).max(256).optional(),\n limit: z.int().min(1).max(200).default(25),\n});\nexport const ContactLabeled = z.strictObject({ label: z.string().nullable(), value: z.string() });\nexport const ContactSummary = z.strictObject({\n id: z.string(),\n name: z.string(),\n organization: z.string().nullable(),\n emails: z.array(ContactLabeled),\n phones: z.array(ContactLabeled),\n});\nexport const ContactsSearchResult = z.strictObject({ contacts: z.array(ContactSummary) });\n\nexport const ContactsGetParams = z.strictObject({ id: z.string().min(1).max(256) });\nexport const ContactDetail = z.strictObject({\n id: z.string(),\n name: z.string(),\n organization: z.string().nullable(),\n job_title: z.string().nullable(),\n emails: z.array(ContactLabeled),\n phones: z.array(ContactLabeled),\n addresses: z.array(ContactLabeled),\n birthday: z.string().nullable(),\n note: z.string().nullable(),\n});\nexport const ContactsGetResult = z.strictObject({ contact: ContactDetail });\n\n// ── calendar.* and reminders.*: Calendar and Reminders (macOS) ──────────────────────────────────\nexport const CalendarListParams = z.strictObject({\n from_ms: epochMs,\n to_ms: epochMs,\n /** One calendar's name; absent: every calendar. */\n calendar: z.string().min(1).max(256).optional(),\n /** (1.67) Several calendars by name (Matrx Local's calendar_names); with `calendar`, both count. */\n calendars: z.array(z.string().min(1).max(256)).min(1).max(100).optional(),\n limit: z.int().min(1).max(500).default(100),\n});\nexport const CalendarEvent = z.strictObject({\n id: z.string(),\n title: z.string(),\n start_ms: epochMs,\n end_ms: epochMs,\n all_day: z.boolean(),\n calendar: z.string(),\n location: z.string().nullable(),\n notes: z.string().nullable(),\n /** (1.67) The event's link; absent when it has none. */\n url: z.string().optional(),\n});\nexport const CalendarListResult = z.strictObject({ events: z.array(CalendarEvent) });\n\nexport const CalendarCreateParams = z.strictObject({\n title: z.string().min(1).max(1024),\n start_ms: epochMs,\n end_ms: epochMs,\n all_day: z.boolean().default(false),\n /** The calendar's name; absent: the first writable calendar. */\n calendar: z.string().min(1).max(256).optional(),\n location: z.string().max(1024).optional(),\n notes: Text.optional(),\n});\nexport const CalendarCreateResult = z.strictObject({ id: z.string(), calendar: z.string() });\n\nexport const RemindersListParams = z.strictObject({\n /** One list's name; absent: every list. */\n list: z.string().min(1).max(256).optional(),\n /** (1.67) Several lists by name (Matrx Local's list_names); with `list`, both count. */\n lists: z.array(z.string().min(1).max(256)).min(1).max(100).optional(),\n include_completed: z.boolean().default(false),\n limit: z.int().min(1).max(500).default(100),\n});\nexport const Reminder = z.strictObject({\n id: z.string(),\n title: z.string(),\n list: z.string(),\n due_ms: epochMs.nullable(),\n completed: z.boolean(),\n notes: z.string().nullable(),\n /** (1.67) 0 none, 1 high … 9 low (EventKit's scale). */\n priority: z.int().min(0).max(9).optional(),\n /** (1.67) When it was completed; absent while open. */\n completed_at_ms: epochMs.optional(),\n});\nexport const RemindersListResult = z.strictObject({ reminders: z.array(Reminder) });\n\nexport const RemindersCreateParams = z.strictObject({\n title: z.string().min(1).max(1024),\n due_ms: epochMs.optional(),\n list: z.string().min(1).max(256).optional(),\n notes: Text.optional(),\n});\nexport const RemindersCreateResult = z.strictObject({ id: z.string(), list: z.string() });\n\n// ── photos.*: the Photos library (macOS) ─────────────────────────────────────────────────────────\nexport const PhotosSearchParams = z.strictObject({\n /** Matched against file names, titles, descriptions and keywords; absent: the newest. */\n query: z.string().min(1).max(256).optional(),\n from_ms: epochMs.optional(),\n to_ms: epochMs.optional(),\n favorites_only: z.boolean().default(false),\n /** (1.67) image, video or all (Matrx Local's media_type); absent: all. */\n media_type: z.enum([\"image\", \"video\", \"all\"]).optional(),\n limit: z.int().min(1).max(200).default(25),\n});\nexport const Photo = z.strictObject({\n id: z.string(),\n filename: z.string(),\n taken_at_ms: epochMs.nullable(),\n width: nonNegInt.nullable(),\n height: nonNegInt.nullable(),\n favorite: z.boolean(),\n title: z.string().nullable(),\n /** (1.67) What the asset is. */\n media_type: z.enum([\"image\", \"video\", \"audio\", \"unknown\"]).optional(),\n /** (1.67) A video's length in seconds; absent for a still. */\n duration_s: z.number().min(0).optional(),\n});\nexport const PhotosSearchResult = z.strictObject({ photos: z.array(Photo) });\n\nexport const PhotosGetParams = z.strictObject({\n id: z.string().min(1).max(256),\n /** Copy the original into a folder Matrx 2 owns and answer its path (then fs_read or desktop_documents reads it). */\n export: z.boolean().default(false),\n /** (1.67) Also answer a PNG thumbnail no larger than this many pixels a side (Matrx Local's get_photo thumbnail). */\n thumbnail_size: z.int().min(64).max(2048).optional(),\n});\nexport const PhotosGetResult = z.strictObject({\n photo: Photo,\n path: z.string().nullable(),\n /** (1.67) The thumbnail as base64 PNG, when thumbnail_size asked for one; absent when it could not be drawn. */\n thumbnail_png_base64: z.string().optional(),\n});\n\n// ── location.get: where the computer is ─────────────────────────────────────────────────────────\nexport const LocationGetParams = z.strictObject({ timeout_s: z.int().min(1).max(60).default(15) });\nexport const LocationGetResult = z.strictObject({\n latitude: z.number().min(-90).max(90),\n longitude: z.number().min(-180).max(180),\n /** Metres; null where the OS does not say. */\n accuracy_m: z.number().min(0).nullable(),\n at_ms: epochMs,\n /** Who answered: the OS's own location service. */\n source: z.enum([\"corelocation\", \"windows\", \"geoclue\"]),\n /** (1.67) Metres above sea level, its accuracy, speed (m/s) and course (degrees); absent where the OS does not say. */\n altitude_m: z.number().optional(),\n vertical_accuracy_m: z.number().min(0).optional(),\n speed_mps: z.number().min(0).optional(),\n course_deg: z.number().min(0).max(360).optional(),\n});\n\nexport type AutomationScriptParams = z.output<typeof AutomationScriptParams>;\nexport type AutomationScriptResult = z.output<typeof AutomationScriptResult>;\nexport type MailAccountsParams = z.output<typeof MailAccountsParams>;\nexport type MailAccount = z.output<typeof MailAccount>;\nexport type MailAccountsResult = z.output<typeof MailAccountsResult>;\nexport type MailListParams = z.output<typeof MailListParams>;\nexport type MailMessage = z.output<typeof MailMessage>;\nexport type MailListResult = z.output<typeof MailListResult>;\nexport type MailSendParams = z.output<typeof MailSendParams>;\nexport type MailSendResult = z.output<typeof MailSendResult>;\nexport type MessagesChatsParams = z.output<typeof MessagesChatsParams>;\nexport type MessagesChat = z.output<typeof MessagesChat>;\nexport type MessagesChatsResult = z.output<typeof MessagesChatsResult>;\nexport type MessagesListParams = z.output<typeof MessagesListParams>;\nexport type MessagesMessage = z.output<typeof MessagesMessage>;\nexport type MessagesListResult = z.output<typeof MessagesListResult>;\nexport type MessagesSendParams = z.output<typeof MessagesSendParams>;\nexport type MessagesSendResult = z.output<typeof MessagesSendResult>;\nexport type ContactsSearchParams = z.output<typeof ContactsSearchParams>;\nexport type ContactLabeled = z.output<typeof ContactLabeled>;\nexport type ContactSummary = z.output<typeof ContactSummary>;\nexport type ContactsSearchResult = z.output<typeof ContactsSearchResult>;\nexport type ContactsGetParams = z.output<typeof ContactsGetParams>;\nexport type ContactDetail = z.output<typeof ContactDetail>;\nexport type ContactsGetResult = z.output<typeof ContactsGetResult>;\nexport type CalendarListParams = z.output<typeof CalendarListParams>;\nexport type CalendarEvent = z.output<typeof CalendarEvent>;\nexport type CalendarListResult = z.output<typeof CalendarListResult>;\nexport type CalendarCreateParams = z.output<typeof CalendarCreateParams>;\nexport type CalendarCreateResult = z.output<typeof CalendarCreateResult>;\nexport type RemindersListParams = z.output<typeof RemindersListParams>;\nexport type Reminder = z.output<typeof Reminder>;\nexport type RemindersListResult = z.output<typeof RemindersListResult>;\nexport type RemindersCreateParams = z.output<typeof RemindersCreateParams>;\nexport type RemindersCreateResult = z.output<typeof RemindersCreateResult>;\nexport type PhotosSearchParams = z.output<typeof PhotosSearchParams>;\nexport type Photo = z.output<typeof Photo>;\nexport type PhotosSearchResult = z.output<typeof PhotosSearchResult>;\nexport type PhotosGetParams = z.output<typeof PhotosGetParams>;\nexport type PhotosGetResult = z.output<typeof PhotosGetResult>;\nexport type LocationGetParams = z.output<typeof LocationGetParams>;\nexport type LocationGetResult = z.output<typeof LocationGetResult>;\n\n// Every schema's type beside it (type-exports.test.ts).\nexport type OutlookStatusParams = z.output<typeof OutlookStatusParams>;\nexport type OutlookAccount = z.output<typeof OutlookAccount>;\nexport type OutlookStatusResult = z.output<typeof OutlookStatusResult>;\nexport type OutlookDraftParams = z.output<typeof OutlookDraftParams>;\nexport type OutlookDraftResult = z.output<typeof OutlookDraftResult>;\nexport type OutlookListParams = z.output<typeof OutlookListParams>;\nexport type OutlookMessage = z.output<typeof OutlookMessage>;\nexport type OutlookListResult = z.output<typeof OutlookListResult>;\nexport type OutlookReadParams = z.output<typeof OutlookReadParams>;\nexport type OutlookReadResult = z.output<typeof OutlookReadResult>;\n","/**\n * @ai-matrx/desktop-protocol — cap windows (SPEC §10 desktop_windows_admin): Windows\n * administration — the registry, services, the event log and optional features. Matrx Local's\n * local_windows_ps. Served by the core's `windows` owner through reg.exe and PowerShell; every op\n * answers PLATFORM_UNSUPPORTED off Windows, and PERMISSION_DENIED_OS where Windows needs an\n * administrator. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. Added in\n * protocol 1.37.\n */\nimport { z } from \"zod\";\nimport { epochMs } from \"./primitives\";\n\n/** A registry key with its hive (\"HKCU\\\\Software\\\\Example\"); HKLM, HKCU, HKCR, HKU, HKCC. */\nconst RegistryKey = z.string().min(6).max(1024).regex(/^(HKLM|HKCU|HKCR|HKU|HKCC|HKEY_LOCAL_MACHINE|HKEY_CURRENT_USER|HKEY_CLASSES_ROOT|HKEY_USERS|HKEY_CURRENT_CONFIG)(\\\\.*)?$/);\nexport const RegistryValueType = z.enum([\"REG_SZ\", \"REG_EXPAND_SZ\", \"REG_MULTI_SZ\", \"REG_DWORD\", \"REG_QWORD\", \"REG_BINARY\", \"REG_NONE\"]);\n\nexport const WindowsRegistryReadParams = z.strictObject({\n key: RegistryKey,\n /** One value's name (\"\" is the key's default value); absent: every value and the subkeys. */\n name: z.string().max(16_383).optional(),\n});\nexport const RegistryValue = z.strictObject({ name: z.string(), type: RegistryValueType, data: z.string() });\nexport const WindowsRegistryReadResult = z.strictObject({\n key: z.string(),\n exists: z.boolean(),\n values: z.array(RegistryValue),\n subkeys: z.array(z.string()),\n});\n\nexport const WindowsRegistryWriteParams = z.strictObject({\n key: RegistryKey,\n name: z.string().max(16_383),\n type: RegistryValueType.default(\"REG_SZ\"),\n /** As reg.exe takes it: text, a number, hex for binary, \\\\0 between the strings of a multi-string. */\n data: z.string().max(1_048_576),\n /** Remove the value instead of writing it. */\n delete: z.boolean().default(false),\n});\nexport const WindowsRegistryWriteResult = z.strictObject({ key: z.string(), name: z.string(), deleted: z.boolean() });\n\nexport const WindowsServicesParams = z.strictObject({\n /** Matched against the service's name and display name. */\n filter: z.string().min(1).max(256).optional(),\n /** (1.67) Only services in this state (Matrx Local's service_list status). */\n status: z.enum([\"running\", \"stopped\", \"paused\"]).optional(),\n limit: z.int().min(1).max(1000).default(200),\n});\nexport const WindowsService = z.strictObject({\n name: z.string(),\n display_name: z.string(),\n /** Running, Stopped, Paused… as Windows says it. */\n status: z.string(),\n /** Automatic, Manual, Disabled…; null where Windows does not say. */\n start_type: z.string().nullable(),\n});\nexport const WindowsServicesResult = z.strictObject({ services: z.array(WindowsService) });\n\nexport const WindowsServiceControlParams = z.strictObject({\n name: z.string().min(1).max(256),\n /** pause and resume since 1.67 (Matrx Local's service_control). */\n action: z.enum([\"start\", \"stop\", \"restart\", \"pause\", \"resume\"]),\n});\nexport const WindowsServiceControlResult = z.strictObject({ name: z.string(), status: z.string() });\n\nexport const WindowsEventLogParams = z.strictObject({\n log: z.string().min(1).max(256).default(\"System\"),\n /** Only these levels; absent: all. */\n levels: z.array(z.enum([\"critical\", \"error\", \"warning\", \"information\", \"verbose\"])).max(5).optional(),\n since_ms: epochMs.optional(),\n /** (1.67) Only events whose source (provider) name contains this. */\n source: z.string().min(1).max(256).optional(),\n limit: z.int().min(1).max(500).default(50),\n});\nexport const WindowsEvent = z.strictObject({\n id: z.int(),\n level: z.string(),\n source: z.string(),\n at_ms: epochMs,\n message: z.string(),\n});\nexport const WindowsEventLogResult = z.strictObject({ log: z.string(), events: z.array(WindowsEvent) });\n\nexport const WindowsFeaturesParams = z.strictObject({\n filter: z.string().min(1).max(256).optional(),\n /** (1.67) Only features that are on (Matrx Local's windows_features installed_only). */\n installed_only: z.boolean().optional(),\n});\nexport const WindowsFeature = z.strictObject({ name: z.string(), state: z.string() });\nexport const WindowsFeaturesResult = z.strictObject({ features: z.array(WindowsFeature) });\n\nexport type RegistryValueType = z.output<typeof RegistryValueType>;\nexport type WindowsRegistryReadParams = z.output<typeof WindowsRegistryReadParams>;\nexport type RegistryValue = z.output<typeof RegistryValue>;\nexport type WindowsRegistryReadResult = z.output<typeof WindowsRegistryReadResult>;\nexport type WindowsRegistryWriteParams = z.output<typeof WindowsRegistryWriteParams>;\nexport type WindowsRegistryWriteResult = z.output<typeof WindowsRegistryWriteResult>;\nexport type WindowsServicesParams = z.output<typeof WindowsServicesParams>;\nexport type WindowsService = z.output<typeof WindowsService>;\nexport type WindowsServicesResult = z.output<typeof WindowsServicesResult>;\nexport type WindowsServiceControlParams = z.output<typeof WindowsServiceControlParams>;\nexport type WindowsServiceControlResult = z.output<typeof WindowsServiceControlResult>;\nexport type WindowsEventLogParams = z.output<typeof WindowsEventLogParams>;\nexport type WindowsEvent = z.output<typeof WindowsEvent>;\nexport type WindowsEventLogResult = z.output<typeof WindowsEventLogResult>;\nexport type WindowsFeaturesParams = z.output<typeof WindowsFeaturesParams>;\nexport type WindowsFeature = z.output<typeof WindowsFeature>;\nexport type WindowsFeaturesResult = z.output<typeof WindowsFeaturesResult>;\n","/**\n * @ai-matrx/desktop-protocol — cap schedule (SPEC §10 desktop_schedule): one protocol op run on\n * this computer again and again, on an interval, until it is canceled or has run its count\n * (Matrx Local's ScheduleTask, ListScheduled, CancelScheduled). The core's `schedule` owner keeps\n * each task in its own device store, so tasks outlive a restart, and runs the op through the\n * Router as the device's owner, exactly as the agent would have sent it. A task can never run a\n * schedule op itself. Schema source: lint-enforced rules in scripts/check-schema-source.mjs.\n * Added in protocol 1.37.\n */\nimport { z } from \"zod\";\nimport { epochMs, nonNegInt } from \"./primitives\";\n\n/** \"cap.op\", e.g. \"fs.read\", \"exec.run\", \"web.fetch\". */\nconst OpRef = z.string().min(3).max(128).regex(/^[a-z_]+(\\.[a-z_]+)+$/);\n\nexport const ScheduleCreateParams = z.strictObject({\n name: z.string().min(1).max(200),\n op: OpRef,\n /** The op's params, exactly as the op takes them; checked when the task is created. */\n params: z.record(z.string(), z.unknown()).default({}),\n interval_s: z.int().min(10).max(2_592_000),\n /** Stop after this many runs; absent: until canceled. */\n max_runs: z.int().min(1).max(100_000).optional(),\n /** Run once now, before the first interval. */\n run_now: z.boolean().default(false),\n});\nexport const ScheduleRun = z.strictObject({\n at_ms: epochMs,\n ok: z.boolean(),\n elapsed_ms: nonNegInt,\n /** The error's code and message when the run failed. */\n error: z.string().nullable(),\n /** The start of the answer, as JSON (cut at 4 KiB). */\n result_preview: z.string().nullable(),\n});\nexport const ScheduledTask = z.strictObject({\n id: z.string(),\n name: z.string(),\n op: z.string(),\n params: z.record(z.string(), z.unknown()),\n interval_s: nonNegInt,\n max_runs: nonNegInt.nullable(),\n runs: nonNegInt,\n created_at_ms: epochMs,\n next_run_at_ms: epochMs.nullable(),\n /** active, done (ran max_runs), canceled. */\n state: z.enum([\"active\", \"done\", \"cancelled\"]),\n /** The newest runs, newest first (at most 10). */\n recent: z.array(ScheduleRun),\n});\nexport const ScheduleCreateResult = z.strictObject({ task: ScheduledTask });\n\nexport const ScheduleListParams = z.strictObject({ include_finished: z.boolean().default(false) });\nexport const ScheduleListResult = z.strictObject({ tasks: z.array(ScheduledTask) });\n\nexport const ScheduleCancelParams = z.strictObject({ id: z.string().min(1).max(64) });\nexport const ScheduleCancelResult = z.strictObject({ task: ScheduledTask });\n\nexport type ScheduleCreateParams = z.output<typeof ScheduleCreateParams>;\nexport type ScheduleRun = z.output<typeof ScheduleRun>;\nexport type ScheduledTask = z.output<typeof ScheduledTask>;\nexport type ScheduleCreateResult = z.output<typeof ScheduleCreateResult>;\nexport type ScheduleListParams = z.output<typeof ScheduleListParams>;\nexport type ScheduleListResult = z.output<typeof ScheduleListResult>;\nexport type ScheduleCancelParams = z.output<typeof ScheduleCancelParams>;\nexport type ScheduleCancelResult = z.output<typeof ScheduleCancelResult>;\n","/**\n * @ai-matrx/desktop-protocol — cap notes (SPEC §10 desktop_notes): the person's local notes, the\n * Markdown files in Documents/Matrx/Notes that Matrx Local kept (its ListDocuments,\n * ListDocumentFolders, ReadDocument, WriteDocument and SearchDocuments). A folder is a directory\n * under that root; a note is `<label>.md`. Every path is relative to the root and never leaves it.\n * Served by the core's `notes` owner. Schema source: lint-enforced rules in\n * scripts/check-schema-source.mjs. Added in protocol 1.37.\n */\nimport { z } from \"zod\";\nimport { epochMs, nonNegInt } from \"./primitives\";\n\n/** A folder under the notes root (\"General\", \"Work/Clients\"); never absolute (the owner refuses \"..\"). */\nconst NoteFolder = z.string().min(1).max(512).regex(/^[^/\\\\:*?\"<>|][^\\\\:*?\"<>|]*$/);\n/** A note's path relative to the root (\"General/Ideas.md\"); never absolute (the owner refuses \"..\"). */\nconst NotePath = z.string().min(4).max(1024).regex(/^[^/\\\\:*?\"<>|][^\\\\:*?\"<>|]*\\.md$/);\n\nexport const NotesFoldersParams = z.strictObject({});\nexport const NotesFolder = z.strictObject({ folder: z.string(), notes: nonNegInt });\nexport const NotesFoldersResult = z.strictObject({\n /** The notes root on this computer. */\n root: z.string(),\n folders: z.array(NotesFolder),\n});\n\nexport const NotesListParams = z.strictObject({\n folder: NoteFolder.optional(),\n limit: z.int().min(1).max(2000).default(500),\n});\nexport const NoteEntry = z.strictObject({\n path: z.string(),\n label: z.string(),\n folder: z.string(),\n bytes: nonNegInt,\n modified_at_ms: epochMs,\n});\nexport const NotesListResult = z.strictObject({ root: z.string(), notes: z.array(NoteEntry), total: nonNegInt });\n\nexport const NotesReadParams = z.strictObject({ path: NotePath });\nexport const NotesReadResult = z.strictObject({\n path: z.string(),\n content: z.string(),\n bytes: nonNegInt,\n modified_at_ms: epochMs,\n /** SHA-256 of the content: pass it back as `if_hash` to write only over this version. */\n hash: z.string(),\n});\n\nexport const NotesWriteParams = z.strictObject({\n folder: NoteFolder.default(\"General\"),\n /** The note's name, without \".md\". */\n label: z.string().min(1).max(200).regex(/^[^/\\\\:*?\"<>|]+$/),\n content: z.string().max(10_485_760),\n /** Write only when the note is still this version (notes.read's hash); a change since answers CONFLICT. */\n if_hash: z.string().length(64).optional(),\n});\nexport const NotesWriteResult = z.strictObject({ path: z.string(), bytes: nonNegInt, created: z.boolean(), hash: z.string() });\n\nexport const NotesSearchParams = z.strictObject({\n query: z.string().min(1).max(512),\n limit: z.int().min(1).max(200).default(50),\n});\nexport const NotesMatch = z.strictObject({\n path: z.string(),\n label: z.string(),\n folder: z.string(),\n /** The matching lines (at most five), trimmed. */\n lines: z.array(z.string()),\n});\nexport const NotesSearchResult = z.strictObject({ matches: z.array(NotesMatch), total: nonNegInt });\n\nexport type NotesFoldersParams = z.output<typeof NotesFoldersParams>;\nexport type NotesFolder = z.output<typeof NotesFolder>;\nexport type NotesFoldersResult = z.output<typeof NotesFoldersResult>;\nexport type NotesListParams = z.output<typeof NotesListParams>;\nexport type NoteEntry = z.output<typeof NoteEntry>;\nexport type NotesListResult = z.output<typeof NotesListResult>;\nexport type NotesReadParams = z.output<typeof NotesReadParams>;\nexport type NotesReadResult = z.output<typeof NotesReadResult>;\nexport type NotesWriteParams = z.output<typeof NotesWriteParams>;\nexport type NotesWriteResult = z.output<typeof NotesWriteResult>;\nexport type NotesSearchParams = z.output<typeof NotesSearchParams>;\nexport type NotesMatch = z.output<typeof NotesMatch>;\nexport type NotesSearchResult = z.output<typeof NotesSearchResult>;\n","/**\n * @ai-matrx/desktop-protocol — caps documents and entities (SPEC §10 desktop_documents,\n * desktop_entities): a PDF's text, text in an image (OCR), an image resized, an Office file\n * written, and the names and private data in a text — all on the computer, nothing uploaded.\n * Matrx Local's local_media (ocr, resize, pdf_extract, office_generate) and local_ner. Served by\n * the core's `documents` owner with what the OS already has (macOS: PDFKit, Vision,\n * NaturalLanguage and sips; Windows: PowerShell; Linux: the usual command-line tools where\n * installed), answering PLATFORM_UNSUPPORTED, with what to install, where a computer has none.\n * Schema source: lint-enforced rules in scripts/check-schema-source.mjs. Added in protocol 1.37.\n */\nimport { z } from \"zod\";\nimport { AbsPath, nonNegInt } from \"./primitives\";\n\n/** The most text a documents op returns; longer text is cut and says so (`truncated`). */\nexport const DOCUMENTS_MAX_TEXT_CHARS = 1_048_576 as const;\n\n// ── documents.pdf_text: a PDF's text (matrx-local PdfExtract) ────────────────────────────────────\nexport const DocumentsPdfTextParams = z.strictObject({\n path: AbsPath,\n /** 1-based, inclusive. */\n first_page: z.int().min(1).optional(),\n last_page: z.int().min(1).optional(),\n max_chars: z.int().min(1).max(DOCUMENTS_MAX_TEXT_CHARS).default(200_000),\n});\nexport const DocumentsPdfPage = z.strictObject({ page: z.int().min(1), text: z.string() });\nexport const DocumentsPdfTextResult = z.strictObject({\n pages: nonNegInt,\n /** Each page read, in order (an image-only page has empty text: OCR it). */\n read: z.array(DocumentsPdfPage),\n truncated: z.boolean(),\n title: z.string().nullable(),\n author: z.string().nullable(),\n});\n\n// ── documents.ocr: the text in an image or a scanned page (matrx-local ImageOCR) ────────────────\nexport const DocumentsOcrParams = z.strictObject({\n path: AbsPath,\n /** BCP-47 language hints (\"en-US\", \"fr-FR\"); absent: the OS's own choice. */\n languages: z.array(z.string().min(2).max(16)).max(8).optional(),\n /** Faster, less accurate. */\n fast: z.boolean().default(false),\n});\nexport const DocumentsOcrLine = z.strictObject({\n text: z.string(),\n /** 0–1; null where the engine does not say. */\n confidence: z.number().min(0).max(1).nullable(),\n});\nexport const DocumentsOcrResult = z.strictObject({\n text: z.string(),\n lines: z.array(DocumentsOcrLine),\n truncated: z.boolean(),\n /** Which engine read it (\"vision\" on macOS, \"windows-ocr\", \"tesseract\"). */\n engine: z.string(),\n});\n\n// ── documents.image_resize: an image made smaller or converted (matrx-local ImageResize) ────────\nexport const DocumentsImageResizeParams = z.strictObject({\n path: AbsPath,\n /** Where to write it; absent: next to the original, \"<name>-resized.<ext>\". */\n out_path: AbsPath.optional(),\n /** The longest side, kept in proportion; absent: the size stays (a format change only). */\n max_size: z.int().min(1).max(32_768).optional(),\n format: z.enum([\"png\", \"jpeg\", \"tiff\", \"heic\", \"bmp\", \"gif\"]).optional(),\n overwrite: z.boolean().default(false),\n});\nexport const DocumentsImageResizeResult = z.strictObject({\n path: z.string(),\n width: nonNegInt,\n height: nonNegInt,\n bytes: nonNegInt,\n});\n\n// ── documents.office_generate: a Word or Excel file written (matrx-local OfficeGenerate) ─────────\nexport const DocumentsParagraph = z.strictObject({\n style: z.enum([\"title\", \"heading1\", \"heading2\", \"heading3\", \"body\", \"bullet\", \"numbered\", \"quote\", \"code\"]).default(\"body\"),\n text: z.string().max(100_000),\n});\nexport const DocumentsSheet = z.strictObject({\n name: z.string().min(1).max(31),\n /** Rows of cells; the first row is the header when `header` is true. */\n rows: z.array(z.array(z.union([z.string().max(32_767), z.number(), z.boolean(), z.null()])).max(16_384)).max(100_000),\n header: z.boolean().default(true),\n});\nexport const DocumentsOfficeGenerateParams = z.strictObject({\n kind: z.enum([\"docx\", \"xlsx\"]),\n path: AbsPath,\n title: z.string().max(1024).optional(),\n /** docx: the document's paragraphs, in order. */\n paragraphs: z.array(DocumentsParagraph).max(50_000).optional(),\n /** xlsx: the workbook's sheets, in order. */\n sheets: z.array(DocumentsSheet).min(1).max(64).optional(),\n overwrite: z.boolean().default(false),\n});\nexport const DocumentsOfficeGenerateResult = z.strictObject({ path: z.string(), bytes: nonNegInt });\n\n// ── entities.ner: people, places and organizations in a text (matrx-local ExtractEntities) ──────\nexport const EntitiesNerParams = z.strictObject({\n text: z.string().min(1).max(DOCUMENTS_MAX_TEXT_CHARS),\n /** Which kinds to keep; absent: all three. */\n labels: z.array(z.enum([\"person\", \"place\", \"organization\"])).min(1).max(3).optional(),\n});\nexport const EntitySpan = z.strictObject({\n text: z.string(),\n label: z.string(),\n /** Character offsets into the text (UTF-16, as JavaScript counts). */\n start: nonNegInt,\n end: nonNegInt,\n});\nexport const EntitiesNerResult = z.strictObject({ entities: z.array(EntitySpan), engine: z.string() });\n\n// ── entities.pii: private data in a text (matrx-local ExtractPII) ───────────────────────────────\nexport const PiiKind = z.enum([\"email\", \"phone\", \"credit_card\", \"us_ssn\", \"iban\", \"ip_address\", \"url\", \"api_key\"]);\nexport const EntitiesPiiParams = z.strictObject({\n text: z.string().min(1).max(DOCUMENTS_MAX_TEXT_CHARS),\n kinds: z.array(PiiKind).min(1).max(8).optional(),\n /** Also answer the text with each finding replaced by its kind (\"[email]\"). */\n redact: z.boolean().default(false),\n});\nexport const EntitiesPiiResult = z.strictObject({\n findings: z.array(z.strictObject({ kind: PiiKind, text: z.string(), start: nonNegInt, end: nonNegInt })),\n redacted: z.string().nullable(),\n});\n\nexport type DocumentsPdfTextParams = z.output<typeof DocumentsPdfTextParams>;\nexport type DocumentsPdfPage = z.output<typeof DocumentsPdfPage>;\nexport type DocumentsPdfTextResult = z.output<typeof DocumentsPdfTextResult>;\nexport type DocumentsOcrParams = z.output<typeof DocumentsOcrParams>;\nexport type DocumentsOcrLine = z.output<typeof DocumentsOcrLine>;\nexport type DocumentsOcrResult = z.output<typeof DocumentsOcrResult>;\nexport type DocumentsImageResizeParams = z.output<typeof DocumentsImageResizeParams>;\nexport type DocumentsImageResizeResult = z.output<typeof DocumentsImageResizeResult>;\nexport type DocumentsParagraph = z.output<typeof DocumentsParagraph>;\nexport type DocumentsSheet = z.output<typeof DocumentsSheet>;\nexport type DocumentsOfficeGenerateParams = z.output<typeof DocumentsOfficeGenerateParams>;\nexport type DocumentsOfficeGenerateResult = z.output<typeof DocumentsOfficeGenerateResult>;\nexport type EntitiesNerParams = z.output<typeof EntitiesNerParams>;\nexport type EntitySpan = z.output<typeof EntitySpan>;\nexport type EntitiesNerResult = z.output<typeof EntitiesNerResult>;\nexport type PiiKind = z.output<typeof PiiKind>;\nexport type EntitiesPiiParams = z.output<typeof EntitiesPiiParams>;\nexport type EntitiesPiiResult = z.output<typeof EntitiesPiiResult>;\n","/** @ai-matrx/desktop-protocol — the op and event registries (Router, client and Python are generated from these). */\nimport { z } from \"zod\";\nimport {\n AbsPath,\n DeviceId,\n ProtocolVersion,\n RequestId,\n ResourceId,\n} from \"./primitives\";\nimport {\n ErrorCode,\n ErrorReason,\n FsPatchEditFailure,\n ProtocolErrorBody,\n} from \"./errors\";\nimport {\n FrameHeader,\n RelayHopEnvelopeHeader,\n RelayHopConnectionEnd,\n} from \"./frame\";\nimport {\n CancelMsg,\n ClientToCoreMsg,\n ClientType,\n CoreToClientMsg,\n CreditMsg,\n EndMsg,\n EndReason,\n ErrorMsg,\n EventMsg,\n HelloMsg,\n Limits,\n OpDescriptor,\n RelayMsg,\n RequestMsg,\n ResponseMsg,\n StreamMeta,\n StreamMsg,\n Welcome,\n CloseCodeValue,\n} from \"./envelope\";\nimport {\n OsGrantState,\n OsPermissionName,\n OsRequirementName,\n SysinfoGetParams,\n SysinfoGetResult,\n SysinfoHardwareParams,\n SysinfoHardwareResult,\n SysinfoGraphicsAdapter,\n} from \"./sysinfo\";\nimport {\n FsChange,\n FsChangedEvent,\n FsDeleteParams,\n FsDeleteResult,\n FsEncoding,\n FsEntry,\n FsKind,\n FsListParams,\n FsListResult,\n FsMkdirParams,\n FsMkdirResult,\n FsMoveParams,\n FsMoveResult,\n FsCopyParams,\n FsCopyResult,\n FsInfoParams,\n FsInfoResult,\n FsSearchIndexParams,\n FsSearchIndexResult,\n FsPatchEditApplied,\n FsPatchParams,\n FsPatchResult,\n FsReadParams,\n FsReadResult,\n FsReadStreamParams,\n FsReadStreamResult,\n FsSearchContentParams,\n FsSearchContentResult,\n FsSearchPathsParams,\n FsSearchPathsResult,\n FsStatParams,\n FsStatResult,\n FsWatchParams,\n FsWatchResult,\n FsWriteParams,\n FsWriteResult,\n} from \"./fs\";\nimport {\n ExecCwdEvent,\n ExecExitedEvent,\n ExecListParams,\n ExecListResult,\n ExecPtyKillParams,\n ExecPtyKillResult,\n ExecPtyResizeParams,\n ExecPtyResizeResult,\n ExecPtySignalParams,\n ExecPtySignalResult,\n ExecPtyStartParams,\n ExecPtyStartResult,\n ExecPtyWriteParams,\n ExecPtyWriteResult,\n ExecRunParams,\n ExecRunResult,\n ExecTitleEvent,\n PtyInfo,\n Signal,\n} from \"./exec\";\nimport {\n ResourceInfo,\n SessionAttachParams,\n SessionAttachResult,\n SessionControlChangedEvent,\n SessionDetachParams,\n SessionDetachResult,\n SessionListParams,\n SessionListResult,\n SessionReleaseParams,\n SessionReleaseResult,\n} from \"./session\";\nimport {\n MlInstallPhase,\n MlInstallProgress,\n MlProgress,\n MlRuntimeState,\n MlServiceState,\n MlServiceStatus,\n MlStatusParams,\n MlStatusResult,\n ModelsInstallParams,\n ModelsInstallResult,\n ModelsLlmInstallParams,\n ModelsLlmInstallResult,\n ModelsLlmStartParams,\n ModelsLlmStartResult,\n ModelsLlmStatusParams,\n ModelsLlmStatusResult,\n ModelsLlmStopParams,\n ModelsLlmStopResult,\n ModelsLlmChatParams,\n ModelsLlmChatResult,\n ModelsDownloadsListParams,\n ModelsDownloadsListResult,\n ModelsDownloadsCancelParams,\n ModelsDownloadsCancelResult,\n LocalModelKind,\n LocalModelRow,\n ModelsLocalListParams,\n ModelsLocalListResult,\n ModelsLocalRemoveParams,\n ModelsLocalRemoveResult,\n DownloadKind,\n DownloadRow,\n LlmRunning,\n LlmServerState,\n TextModelId,\n TextModelInfo,\n UnusableTextModel,\n ModelKey,\n Sha256Hex,\n CatalogFile,\n CatalogModelEntry,\n LlamaServerBuild,\n MlCatalogSetParams,\n MlCatalogSetResult,\n ModelsProgressEvent,\n ModelsStatusParams,\n ModelsStatusResult,\n ModelsTranscribeParams,\n ModelsTranscribeResult,\n TranscriptionModelId,\n TranscriptionModelInfo,\n TranscriptSegment,\n} from \"./models\";\nimport {\n ContractHash,\n CoreToServiceMsg,\n ServiceCancel,\n ServiceErrorMsg,\n ServiceHello,\n ServiceName,\n ServicePing,\n ServicePong,\n ServiceProgressMsg,\n ServiceRequest,\n ServiceResponse,\n ServiceShutdown,\n ServiceToCoreMsg,\n ServiceToken,\n ServiceWelcome,\n} from \"./service\";\nimport {\n RelayAuthExpiringEvent,\n RelayCallRequest,\n RelayCallResponse,\n RelayDeviceStatusEvent,\n RelayCallHello,\n RelayCallEnvelope,\n} from \"./relay\";\nimport { ClipboardReadParams, ClipboardReadResult, ClipboardWriteParams, ClipboardWriteResult } from \"./clipboard\";\nimport {\n GitOutputResult,\n GitStatusParams,\n GitStatusFile,\n GitStatusResult,\n GitDiffParams,\n GitDiffResult,\n GitLogParams,\n GitLogCommit,\n GitLogResult,\n GitAddParams,\n GitCommitParams,\n GitCommitResult,\n GitPushParams,\n GitPullParams,\n GitBranchParams,\n GitBranchResult,\n GitStashParams,\n GitCloneParams,\n} from \"./git\";\nimport {\n WebHeader,\n WebFetchParams,\n WebFetchResult,\n WebScrapeParams,\n WebScrapePage,\n WebScrapeResult,\n WebSearchParams,\n WebSearchHit,\n WebSearchQueryResult,\n WebSearchResult,\n ToolsWebSearchParams,\n WebBrowserFetchParams,\n WebBrowserFetchResult,\n WebAttachTarget,\n WebLand,\n WebNotSavedReason,\n WebSourceNotice,\n WebSourceState,\n ToolsParseFile,\n ToolsWebScrapeParams,\n ToolsWebScrapePage,\n ToolsWebScrapeResult,\n ToolsWebBrowserFetchParams,\n ToolsWebBrowserFetchResult,\n WebRuntimeStateName,\n WebRuntimeParams,\n WebRuntimeState,\n WebOutboxItem,\n WebOutboxListParams,\n WebOutboxListResult,\n WebOutboxRetryParams,\n WebOutboxRetryResult,\n WebOutboxDiscardParams,\n WebOutboxDiscardResult,\n WebLogVia,\n WebLogCaller,\n WebLogResult,\n WebLogEntry,\n WebLogListParams,\n WebLogListResult,\n WebLogClearParams,\n WebLogClearResult,\n WebProgressEvent,\n WebResearchItemState,\n WebResearchItem,\n WebResearchQueueParams,\n WebResearchQueueResult,\n WebResearchFetchParams,\n WebResearchFetchResult,\n ToolsServiceProgress,\n} from \"./web\";\nimport {\n AccountRowId,\n AccountReadState,\n AccountAgent,\n AccountAgentsListParams,\n AccountAgentsListResult,\n VaultItemKind,\n VaultFieldSummary,\n VaultItemSummary,\n AccountVaultListParams,\n AccountVaultListResult,\n AccountVaultCopyParams,\n AccountVaultCopyResult,\n AccountAgentVariable,\n AccountAgentDetail,\n AccountAgentsGetParams,\n AccountAgentsGetResult,\n AccountAgentRunStatus,\n AccountAgentRun,\n AccountAgentRunSort,\n AccountAgentsRunsParams,\n AccountAgentsRunsResult,\n AccountAgentsFavoriteParams,\n AccountAgentsFavoriteResult,\n AccountAgentVersion,\n AccountAgentsVersionsParams,\n AccountAgentsVersionsResult,\n AccountAgentsVersionDiffParams,\n AccountAgentsVersionDiffResult,\n AccountAgentsRestoreVersionParams,\n AccountAgentsRestoreVersionResult,\n} from \"./account\";\nimport { ProcInfo, ProcKillParams, ProcKillResult, ProcListParams, ProcListResult, ProcPort, ProcPortsParams, ProcPortsResult, ProcSort } from \"./proc\";\nimport { SystemNotifyParams, SystemNotifyResult, SystemOpenPathParams, SystemOpenPathResult, SystemOpenSettingsParams, SystemOpenSettingsResult, SystemOpenUrlParams, SystemOpenUrlResult, SystemSettingsPane } from \"./system\";\nimport { ScreenCaptureParams, ScreenCaptureResult, ScreenDisplay, ScreenListParams, ScreenListResult } from \"./screen\";\nimport { WindowFocusParams, WindowFocusResult, WindowInfo, WindowListParams, WindowListResult, WindowMinimizeParams, WindowMinimizeResult, WindowMoveParams, WindowMoveResult, WindowState } from \"./window\";\nimport { InputKeyboardSettingsParams, InputKeyboardSettingsResult, InputSetKeyboardSettingsParams, InputHotkeyParams, InputHotkeyResult, InputKey, InputMouseClickParams, InputMouseClickResult, InputMouseMoveParams, InputMouseMoveResult, InputPoint, InputTypeTextParams, InputTypeTextResult } from \"./input\";\nimport { PowerEnergy, PowerHistoryParams, PowerHistoryPoint, PowerHistoryResult, PowerPreventSleepParams, PowerPreventSleepResult, PowerStatusParams, PowerStatusResult } from \"./power\";\nimport { AudioLevelsParams, AudioLevelsResult, AudioSetLevelsParams, AudioDevice, AudioDevicesParams, AudioDevicesResult, AudioPlayParams, AudioPlayResult, AudioRecordParams, AudioRecordResult } from \"./audio\";\nimport {\n ResourcesActivityParams,\n ResourcesActivityResult,\n ResourcesDisk,\n ResourcesIncident,\n ResourcesIncidentsParams,\n ResourcesIncidentsResult,\n ResourcesJob,\n ResourcesJobKind,\n ResourcesPressure,\n ResourcesProcess,\n ResourcesSample,\n ResourcesSnapshotParams,\n ResourcesSnapshotResult,\n ResourcesStopJobParams,\n ResourcesStopJobResult,\n ResourcesStrain,\n ResourcesVerdict,\n} from \"./resources\";\nimport { DiagErrorEntry, DiagErrorKind, DiagErrorStatus, DiagErrorsChangedEvent, DiagErrorsListParams, DiagErrorsListResult, DiagErrorsReportParams, DiagErrorsReportResult, DiagProcess } from \"./diag\";\nimport { StackErrorsParams, StackErrorsResult, StackEvent, StackLogsParams, StackLogsResult, StackRunResult, StackServer, StackServerActionParams, StackServerActionResult, StackServerName, StackStartParams, StackStateParams, StackStateResult, StackStopParams, StackTone } from \"./stack\";\nimport { FsWatchEventsParams, FsWatchEventsResult, FsWatchId, FsWatchStartParams, FsWatchStartResult, FsWatchStopParams, FsWatchStopResult } from \"./fs-watch\";\nimport { ExecJobId, ExecJobInfo, ExecJobListParams, ExecJobListResult, ExecJobOutputParams, ExecJobOutputResult, ExecJobStartParams, ExecJobStartResult, ExecJobStopParams, ExecJobStopResult } from \"./exec-job\";\nimport { ToolLevel, ToolLevelResult, ToolName, ToolOutcome, ToolPlatform, ToolResultsFile, ToolTransport } from \"./tools\";\nimport {\n CodingHistoryBlocked,\n CodingHistoryFailure,\n CodingHistoryImportMissingParams,\n CodingHistoryImportMissingResult,\n CodingHistoryProgressEvent,\n CodingHistoryRun,\n CodingHistoryStep,\n CodingImportNextParams,\n CodingPlanMissingParams,\n CodingServiceCredentials,\n CodingServiceProgress,\n} from \"./coding\";\nimport {\n CodingProviderName,\n CodingRunStatus,\n CodingClientRequestId,\n CodingRunUsage,\n CodingStartedBy,\n CodingRunRecord,\n CodingSessionAgentPart,\n CodingSessionAgent,\n CodingSessionRecord,\n CodingActiveElsewhere,\n CodingDiscoveredChat,\n CodingTranscriptItem,\n CodingHistoryRecord,\n CodingQuotaWindow,\n CodingProviderProblem,\n CodingProviderBinary,\n CodingAccountUsage,\n CodingContinueTarget,\n CodingProviderAccount,\n CodingProviderStatus,\n CodingChatPreference,\n CodingTitleStatus,\n CodingRecentRow,\n CodingFolderCheck,\n CodingRecentFolder,\n CodingAgentSelectionParams,\n CodingSendResult,\n CodingProvidersParams,\n CodingProvidersResult,\n CodingSessionsListParams,\n CodingSessionsListResult,\n CodingDiscoverParams,\n CodingDiscoverResult,\n CodingRunsListParams,\n CodingRunsListResult,\n CodingHistoryParams,\n CodingHistoryResult,\n CodingTranscriptReadParams,\n CodingTranscriptReadResult,\n CodingItemFullParams,\n CodingItemFullResult,\n CodingActivityParams,\n CodingActivityResult,\n CodingFoldersRecentParams,\n CodingFoldersRecentResult,\n CodingFoldersCheckParams,\n CodingFoldersCheckResult,\n CodingFoldersCreateParams,\n CodingFoldersCreateResult,\n CodingStartParams,\n CodingStartResult,\n CodingTakeoverParams,\n CodingTakeoverResult,\n CodingSendParams,\n CodingStopParams,\n CodingStopResult,\n CodingStopElsewhereParams,\n CodingStopElsewhereResult,\n CodingOptionsSetParams,\n CodingOptionsSetResult,\n CodingAccountContinueParams,\n CodingAccountContinueResult,\n CodingAgentSetParams,\n CodingAgentSetResult,\n CodingAgentsAccessParams,\n CodingAgentsAccessResult,\n CodingTitlesStatusParams,\n CodingTitlesStatusResult,\n CodingPrefsListParams,\n CodingPrefsListResult,\n CodingPrefsSetParams,\n CodingPrefsSetResult,\n CodingRecentSeenParams,\n CodingRecentSeenResult,\n CodingSearchParams,\n CodingSearchHit,\n CodingSearchResult,\n CodingReconcileParams,\n CodingReconcileResult,\n CodingTranscriptRawParams,\n CodingTranscriptRawResult,\n CodingWatchParams,\n CodingWatchResult,\n CodingSessionWatchParams,\n CodingSessionWatchResult,\n SessionIdentifyParams,\n SessionIdentifyResult,\n CodingChangedEvent,\n CodingWatchStateEvent,\n CodingItemEvent,\n CodingGapEvent,\n} from \"./coding-sessions\";\n\nimport {\n AppFeatureStatus,\n AppInfo,\n AppKey,\n AppProfile,\n AppProfileId,\n AppProfileLocator,\n AppSupport,\n AppUsageReading,\n AppsListParams,\n AppsListResult,\n AppsOpenParams,\n AppsOpenResult,\n AppsProfilesListParams,\n AppsProfilesListResult,\n AppsProfilesRemoveParams,\n AppsProfilesRemoveResult,\n AppsProfilesSaveParams,\n AppsProfilesSaveResult,\n} from \"./apps\";\nimport {\n AppsChatsChangedEvent,\n AppsChatsListParams,\n AppsChatsListResult,\n AppsChatsStarParams,\n AppsChatsStarResult,\n AppsChatsHideParams,\n AppsChatsHideResult,\n AppsChatsWatchParams,\n AppsChatsWatchResult,\n AppsProjectsFileParams,\n AppsProjectsFileResult,\n AppsProjectsUnfileParams,\n AppsProjectsUnfileResult,\n ChatHidden,\n ChatId,\n ChatLastUse,\n ChatPin,\n ChatPlace,\n ChatProject,\n ChatProjectId,\n ChatRow,\n ChatAppProject,\n ChatRunning,\n ChatWindow,\n AppsChatsWatchStateEvent,\n AppsChatsPlaceParams,\n AppsChatsPlaceResult,\n AppsProjectsFileManyParams,\n AppsProjectsFileManyResult,\n AppsProjectsUpdateParams,\n AppsProjectsUpdateResult,\n AppsProjectsCopyParams,\n AppsProjectsCopyResult,\n ChatFamily,\n ChatAppGroup,\n ChatParent,\n ChatTitleSync,\n ChatMove,\n} from \"./apps-chats\";\nimport {\n AppWindowInfo,\n WindowRemoteControl,\n AppsWindowsSetRemoteControlParams,\n AppsWindowsSetRemoteControlResult,\n AppsChatsCopyToAccountParams,\n CopiedChat,\n CopyReopened,\n CopyRestart,\n AppsChatsCopyToAccountResult,\n AccountUsage,\n AccountReset,\n AppsWindowsListParams,\n AppsWindowsListResult,\n AppsAccountsUsageParams,\n AppsAccountsUsageResult,\n AppsAccountsResetsParams,\n AppsAccountsResetsResult,\n AppsWindowActionResult,\n AppsWindowsOpenParams,\n AppsWindowsReloadParams,\n AppsWindowsRestartParams,\n AppsWindowsRefreshUsageParams,\n AppsProjectsMoveParams,\n AppsProjectsMoveResult,\n AppsProjectsCreateParams,\n AppsProjectsCreateResult,\n AppsProjectsImportPinsParams,\n AppsProjectsImportPinsResult,\n AppsProjectsToWindowParams,\n AppsProjectsToWindowResult,\n ShownSection,\n AppsWindowsShownParams,\n AppsWindowsShownResult,\n ProjectMoveOutcome,\n WindowGroup,\n AppsWindowsGroupsParams,\n AppsWindowsGroupsResult,\n ProjectMoveChat,\n ProjectMoveSkip,\n ProjectMoveGroup,\n ProjectMovePin,\n ColdChat,\n AppsChatsColdParams,\n AppsChatsColdResult,\n AppsChatsOpenParams,\n TitleCopies,\n TitleMismatch,\n StaleTitleWindow,\n AppsChatsTitlesCheckParams,\n AppsChatsTitlesCheckResult,\n AppsChatsTitlesPushParams,\n AppsChatsTitlesPushResult,\n AppsChatsBringBackParams,\n AppsChatsBringBackResult,\n AppsChatsTidyUpParams,\n AppsChatsTidyUpResult,\n TidyUpFacet,\n TidyUpRestart,\n SpendSplit,\n SpendScopes,\n SpendAccount,\n SpendModel,\n SpendChat,\n SpendHelper,\n SpendLive,\n SpendIdleScope,\n SpendIdle,\n SpendStart,\n SpendDay,\n AppsSpendParams,\n AppsSpendResult,\n AppsSyncStatusParams,\n AppsSyncStatusResult,\n AppsSyncRunParams,\n AppsWindowsProcessesParams,\n AppsWindowsProcessesResult,\n AppsWindowsAddParams,\n AppsWindowsSaveNamesParams,\n AppsWindowsUpdateStateParams,\n AppsWindowsUpdateStateResult,\n AppsWindowsReopenParams,\n AppsWindowsReopenResult,\n AppsWindowsUpdateAndReopenParams,\n AppsWindowsUpdateAndReopenResult,\n} from \"./apps-accounts\";\nimport {\n InstanceStatus,\n InstanceGap,\n AppInstall,\n AppInstance,\n ElsewhereInstance,\n AccountResetSource,\n AccountGap,\n AppAccount,\n AppsInstancesListParams,\n AppsInstancesListResult,\n AppsAccountsListParams,\n AppsAccountsListResult,\n AccountReadSource,\n AccountProfile,\n McpTransport,\n McpServerRow,\n SetupFact,\n SetupItemKind,\n SetupItem,\n AppSetup,\n AppsSetupListParams,\n AppsSetupListResult,\n AppsWindowsSetAccountParams,\n AppsWindowsForgetParams,\n ProbeFact,\n ProbeSource,\n AppsChatsProbeParams,\n AppsChatsProbeResult,\n} from \"./apps-instances\";\nimport {\n BrowserCallError,\n BrowserCallParams,\n BrowserCallPhase,\n BrowserCallResult,\n BrowserClientInstance,\n BrowserDisconnectParams,\n BrowserDisconnectResult,\n BrowserInvokeEvent,\n BrowserKind,\n BrowserPairCodeParams,\n BrowserPairCodeResult,\n BrowserPairRequest,\n BrowserPairResetParams,\n BrowserPairResult,\n BrowserProgressEvent,\n BrowserProgressParams,\n BrowserProgressResult,\n BrowserRegisterParams,\n BrowserRegisterResult,\n BrowserResultParams,\n BrowserResultResult,\n BrowserSession,\n BrowserSessionsChangedEvent,\n BrowserSessionsParams,\n BrowserSessionsResult,\n BrowserSessionState,\n BrowserSetEnabledParams,\n BrowserSetEnabledResult,\n DesktopHealth,\n BrowserToolMetricsParams,\n BrowserToolMetric,\n BrowserToolMetricsResult,\n BrowserResetCountersParams,\n BrowserResetCountersResult,\n BrowserLogParams,\n BrowserLogMessage,\n BrowserLogResult,\n} from \"./browser\";\nimport {\n NetInfoParams,\n NetAddress,\n NetInterface,\n NetInfoResult,\n NetWifiParams,\n NetWifiNetwork,\n NetWifiResult,\n NetBluetoothParams,\n NetBluetoothDevice,\n NetBluetoothResult,\n NetDevicesParams,\n NetDevice,\n NetDevicesResult,\n NetMdnsParams,\n NetMdnsService,\n NetMdnsResult,\n NetScanParams,\n NetScanResult,\n NetDownloadParams,\n NetDownloadResult,\n} from \"./net\";\nimport {\n AutomationScriptParams,\n AutomationScriptResult,\n MailAccountsParams,\n MailAccount,\n MailAccountsResult,\n MailListParams,\n MailMessage,\n MailListResult,\n MailSendParams,\n MailSendResult,\n OutlookStatusParams,\n OutlookAccount,\n OutlookStatusResult,\n OutlookDraftParams,\n OutlookDraftResult,\n OutlookListParams,\n OutlookMessage,\n OutlookListResult,\n OutlookReadParams,\n OutlookReadResult,\n MessagesChatsParams,\n MessagesChat,\n MessagesChatsResult,\n MessagesListParams,\n MessagesMessage,\n MessagesListResult,\n MessagesSendParams,\n MessagesSendResult,\n ContactsSearchParams,\n ContactLabeled,\n ContactSummary,\n ContactsSearchResult,\n ContactsGetParams,\n ContactDetail,\n ContactsGetResult,\n CalendarListParams,\n CalendarEvent,\n CalendarListResult,\n CalendarCreateParams,\n CalendarCreateResult,\n RemindersListParams,\n Reminder,\n RemindersListResult,\n RemindersCreateParams,\n RemindersCreateResult,\n PhotosSearchParams,\n Photo,\n PhotosSearchResult,\n PhotosGetParams,\n PhotosGetResult,\n LocationGetParams,\n LocationGetResult,\n} from \"./personal\";\nimport {\n RegistryValueType,\n WindowsRegistryReadParams,\n RegistryValue,\n WindowsRegistryReadResult,\n WindowsRegistryWriteParams,\n WindowsRegistryWriteResult,\n WindowsServicesParams,\n WindowsService,\n WindowsServicesResult,\n WindowsServiceControlParams,\n WindowsServiceControlResult,\n WindowsEventLogParams,\n WindowsEvent,\n WindowsEventLogResult,\n WindowsFeaturesParams,\n WindowsFeature,\n WindowsFeaturesResult,\n} from \"./windows\";\nimport {\n ScheduleCreateParams,\n ScheduleRun,\n ScheduledTask,\n ScheduleCreateResult,\n ScheduleListParams,\n ScheduleListResult,\n ScheduleCancelParams,\n ScheduleCancelResult,\n} from \"./schedule\";\nimport {\n NotesFoldersParams,\n NotesFolder,\n NotesFoldersResult,\n NotesListParams,\n NoteEntry,\n NotesListResult,\n NotesReadParams,\n NotesReadResult,\n NotesWriteParams,\n NotesWriteResult,\n NotesSearchParams,\n NotesMatch,\n NotesSearchResult,\n} from \"./notes\";\nimport {\n DocumentsPdfTextParams,\n DocumentsPdfPage,\n DocumentsPdfTextResult,\n DocumentsOcrParams,\n DocumentsOcrLine,\n DocumentsOcrResult,\n DocumentsImageResizeParams,\n DocumentsImageResizeResult,\n DocumentsParagraph,\n DocumentsSheet,\n DocumentsOfficeGenerateParams,\n DocumentsOfficeGenerateResult,\n EntitiesNerParams,\n EntitySpan,\n EntitiesNerResult,\n PiiKind,\n EntitiesPiiParams,\n EntitiesPiiResult,\n} from \"./documents\";\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Registries — the Router, the client and the Python side are all generated from these.\n// kind: unary = response only; stream = response, then stream/end on the same id;\n// resource = like stream and the result carries a resource_id the Session Manager owns.\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport type OpSpec = {\n readonly params: z.ZodType;\n readonly result: z.ZodType;\n readonly kind: \"unary\" | \"stream\" | \"resource\";\n readonly since: \"1.0\" | \"1.2\" | \"1.3\" | \"1.4\" | \"1.5\" | \"1.6\" | \"1.8\" | \"1.9\" | \"1.10\" | \"1.11\" | \"1.16\" | \"1.17\" | \"1.19\" | \"1.20\" | \"1.21\" | \"1.22\" | \"1.23\" | \"1.24\" | \"1.26\" | \"1.28\" | \"1.29\" | \"1.30\" | \"1.31\" | \"1.37\" | \"1.38\" | \"1.39\" | \"1.40\" | \"1.43\" | \"1.44\" | \"1.45\" | \"1.47\" | \"1.50\" | \"1.55\" | \"1.56\" | \"1.64\" | \"1.70\" | \"1.72\" | \"1.73\" | \"1.74\" | \"1.76\";\n readonly errors: readonly z.infer<typeof ErrorCode>[];\n};\n\nconst FS_ERR = [\"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"INVALID_PARAMS\", \"RESOURCE_BUSY\", \"INTERNAL\"] as const;\n\nexport const OPS = {\n \"sysinfo.get\": { params: SysinfoGetParams, result: SysinfoGetResult, kind: \"unary\", since: \"1.0\", errors: [\"INTERNAL\"] },\n \"sysinfo.hardware\": { params: SysinfoHardwareParams, result: SysinfoHardwareResult, kind: \"unary\", since: \"1.24\", errors: [\"INTERNAL\"] },\n\n \"fs.list\": { params: FsListParams, result: FsListResult, kind: \"unary\", since: \"1.0\", errors: FS_ERR },\n \"fs.stat\": { params: FsStatParams, result: FsStatResult, kind: \"unary\", since: \"1.0\", errors: FS_ERR },\n \"fs.read\": { params: FsReadParams, result: FsReadResult, kind: \"unary\", since: \"1.0\", errors: [...FS_ERR, \"PAYLOAD_TOO_LARGE\"] },\n \"fs.read_stream\": { params: FsReadStreamParams, result: FsReadStreamResult, kind: \"stream\", since: \"1.0\", errors: [...FS_ERR, \"CANCELLED\"] },\n \"fs.write\": { params: FsWriteParams, result: FsWriteResult, kind: \"unary\", since: \"1.0\", errors: [...FS_ERR, \"CONFLICT\", \"PAYLOAD_TOO_LARGE\"] },\n \"fs.mkdir\": { params: FsMkdirParams, result: FsMkdirResult, kind: \"unary\", since: \"1.0\", errors: [...FS_ERR, \"CONFLICT\"] },\n \"fs.move\": { params: FsMoveParams, result: FsMoveResult, kind: \"unary\", since: \"1.0\", errors: [...FS_ERR, \"CONFLICT\"] },\n \"fs.copy\": { params: FsCopyParams, result: FsCopyResult, kind: \"unary\", since: \"1.30\", errors: [...FS_ERR, \"CONFLICT\"] },\n \"fs.info\": { params: FsInfoParams, result: FsInfoResult, kind: \"unary\", since: \"1.30\", errors: FS_ERR },\n \"fs.search_index\": { params: FsSearchIndexParams, result: FsSearchIndexResult, kind: \"unary\", since: \"1.30\", errors: [...FS_ERR, \"TIMEOUT\"] },\n \"fs.delete\": { params: FsDeleteParams, result: FsDeleteResult, kind: \"unary\", since: \"1.0\", errors: FS_ERR },\n \"fs.watch\": { params: FsWatchParams, result: FsWatchResult, kind: \"resource\", since: \"1.0\", errors: [...FS_ERR, \"RATE_LIMITED\"] },\n \"fs.patch\": { params: FsPatchParams, result: FsPatchResult, kind: \"unary\", since: \"1.0\", errors: [...FS_ERR, \"CONFLICT\"] },\n \"fs.search_paths\": { params: FsSearchPathsParams, result: FsSearchPathsResult, kind: \"unary\", since: \"1.0\", errors: [...FS_ERR, \"TIMEOUT\"] },\n \"fs.search_content\": { params: FsSearchContentParams, result: FsSearchContentResult, kind: \"unary\", since: \"1.0\", errors: [...FS_ERR, \"TIMEOUT\"] },\n\n \"exec.pty.start\": { params: ExecPtyStartParams, result: ExecPtyStartResult, kind: \"resource\", since: \"1.0\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"RATE_LIMITED\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"exec.pty.write\": { params: ExecPtyWriteParams, result: ExecPtyWriteResult, kind: \"unary\", since: \"1.0\", errors: [\"RESOURCE_GONE\", \"AUTH_FORBIDDEN\", \"INVALID_PARAMS\"] },\n \"exec.pty.resize\": { params: ExecPtyResizeParams, result: ExecPtyResizeResult, kind: \"unary\", since: \"1.0\", errors: [\"RESOURCE_GONE\", \"AUTH_FORBIDDEN\"] },\n \"exec.pty.signal\": { params: ExecPtySignalParams, result: ExecPtySignalResult, kind: \"unary\", since: \"1.0\", errors: [\"RESOURCE_GONE\", \"AUTH_FORBIDDEN\", \"PLATFORM_UNSUPPORTED\"] },\n \"exec.pty.kill\": { params: ExecPtyKillParams, result: ExecPtyKillResult, kind: \"unary\", since: \"1.0\", errors: [\"RESOURCE_GONE\", \"AUTH_FORBIDDEN\"] },\n \"exec.list\": { params: ExecListParams, result: ExecListResult, kind: \"unary\", since: \"1.0\", errors: [\"INTERNAL\"] },\n \"exec.run\": { params: ExecRunParams, result: ExecRunResult, kind: \"unary\", since: \"1.0\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"TIMEOUT\", \"CANCELLED\", \"INTERNAL\"] },\n\n \"session.attach\": { params: SessionAttachParams, result: SessionAttachResult, kind: \"stream\", since: \"1.0\", errors: [\"RESOURCE_GONE\", \"AUTH_FORBIDDEN\", \"RESOURCE_BUSY\"] },\n \"session.detach\": { params: SessionDetachParams, result: SessionDetachResult, kind: \"unary\", since: \"1.0\", errors: [\"RESOURCE_GONE\"] },\n \"session.release\": { params: SessionReleaseParams, result: SessionReleaseResult, kind: \"unary\", since: \"1.0\", errors: [\"RESOURCE_GONE\", \"AUTH_FORBIDDEN\"] },\n \"session.list\": { params: SessionListParams, result: SessionListResult, kind: \"unary\", since: \"1.0\", errors: [\"INTERNAL\"] },\n\n // Local models (SPEC §6), served by the `ml` Python service through SERVICES below.\n \"models.status\": { params: ModelsStatusParams, result: ModelsStatusResult, kind: \"unary\", since: \"1.2\", errors: [\"INTERNAL\"] },\n \"models.install\": { params: ModelsInstallParams, result: ModelsInstallResult, kind: \"unary\", since: \"1.2\", errors: [\"RESOURCE_BUSY\", \"RESOURCE_GONE\", \"TIMEOUT\", \"CANCELLED\", \"INTERNAL\"] },\n \"models.transcribe\": { params: ModelsTranscribeParams, result: ModelsTranscribeResult, kind: \"unary\", since: \"1.2\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"PERMISSION_DENIED_OS\", \"RESOURCE_BUSY\", \"RESOURCE_GONE\", \"CANCELLED\", \"PAYLOAD_TOO_LARGE\", \"INTERNAL\"] },\n \"models.llm.status\": { params: ModelsLlmStatusParams, result: ModelsLlmStatusResult, kind: \"unary\", since: \"1.31\", errors: [\"INTERNAL\"] },\n \"models.llm.install\": { params: ModelsLlmInstallParams, result: ModelsLlmInstallResult, kind: \"unary\", since: \"1.31\", errors: [\"RESOURCE_BUSY\", \"RESOURCE_GONE\", \"TIMEOUT\", \"CANCELLED\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"models.llm.start\": { params: ModelsLlmStartParams, result: ModelsLlmStartResult, kind: \"unary\", since: \"1.31\", errors: [\"NOT_FOUND\", \"RESOURCE_BUSY\", \"RESOURCE_GONE\", \"TIMEOUT\", \"CANCELLED\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"models.llm.stop\": { params: ModelsLlmStopParams, result: ModelsLlmStopResult, kind: \"unary\", since: \"1.31\", errors: [\"INTERNAL\"] },\n \"models.llm.chat\": { params: ModelsLlmChatParams, result: ModelsLlmChatResult, kind: \"stream\", since: \"1.76\", errors: [\"NOT_FOUND\", \"RESOURCE_BUSY\", \"RESOURCE_GONE\", \"INVALID_PARAMS\", \"TIMEOUT\", \"CANCELLED\", \"RATE_LIMITED\", \"INTERNAL\"] },\n \"models.downloads.list\": { params: ModelsDownloadsListParams, result: ModelsDownloadsListResult, kind: \"unary\", since: \"1.45\", errors: [\"INTERNAL\"] },\n \"models.downloads.cancel\": { params: ModelsDownloadsCancelParams, result: ModelsDownloadsCancelResult, kind: \"unary\", since: \"1.45\", errors: [\"NOT_FOUND\", \"INTERNAL\"] },\n \"models.local.list\": { params: ModelsLocalListParams, result: ModelsLocalListResult, kind: \"unary\", since: \"1.74\", errors: [\"INTERNAL\"] },\n \"models.local.remove\": { params: ModelsLocalRemoveParams, result: ModelsLocalRemoveResult, kind: \"unary\", since: \"1.74\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"RESOURCE_BUSY\", \"INTERNAL\"] },\n\n // Desktop apps and their profiles (SPEC §6 apps); profiles are rows in users.desktop_app_profile.\n \"apps.list\": { params: AppsListParams, result: AppsListResult, kind: \"unary\", since: \"1.2\", errors: [\"INTERNAL\"] },\n \"apps.profiles.list\": { params: AppsProfilesListParams, result: AppsProfilesListResult, kind: \"unary\", since: \"1.2\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"INTERNAL\"] },\n \"apps.profiles.save\": { params: AppsProfilesSaveParams, result: AppsProfilesSaveResult, kind: \"unary\", since: \"1.2\", errors: [\"AUTH_REQUIRED\", \"AUTH_FORBIDDEN\", \"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"DEVICE_OFFLINE\", \"INTERNAL\"] },\n \"apps.profiles.remove\": { params: AppsProfilesRemoveParams, result: AppsProfilesRemoveResult, kind: \"unary\", since: \"1.2\", errors: [\"AUTH_REQUIRED\", \"AUTH_FORBIDDEN\", \"NOT_FOUND\", \"DEVICE_OFFLINE\", \"INTERNAL\"] },\n \"apps.open\": { params: AppsOpenParams, result: AppsOpenResult, kind: \"unary\", since: \"1.2\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"AUTH_REQUIRED\", \"DEVICE_OFFLINE\", \"INTERNAL\"] },\n \"apps.chats.list\": { params: AppsChatsListParams, result: AppsChatsListResult, kind: \"unary\", since: \"1.8\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.chats.watch\": { params: AppsChatsWatchParams, result: AppsChatsWatchResult, kind: \"resource\", since: \"1.8\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"RESOURCE_BUSY\", \"INTERNAL\"] },\n \"apps.chats.star\": { params: AppsChatsStarParams, result: AppsChatsStarResult, kind: \"unary\", since: \"1.8\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.chats.hide\": { params: AppsChatsHideParams, result: AppsChatsHideResult, kind: \"unary\", since: \"1.70\", errors: [\"INVALID_PARAMS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.projects.file\": { params: AppsProjectsFileParams, result: AppsProjectsFileResult, kind: \"unary\", since: \"1.8\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.chats.place\": { params: AppsChatsPlaceParams, result: AppsChatsPlaceResult, kind: \"unary\", since: \"1.9\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.projects.file_many\": { params: AppsProjectsFileManyParams, result: AppsProjectsFileManyResult, kind: \"unary\", since: \"1.9\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.projects.update\": { params: AppsProjectsUpdateParams, result: AppsProjectsUpdateResult, kind: \"unary\", since: \"1.9\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.projects.copy\": { params: AppsProjectsCopyParams, result: AppsProjectsCopyResult, kind: \"unary\", since: \"1.9\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.projects.unfile\": { params: AppsProjectsUnfileParams, result: AppsProjectsUnfileResult, kind: \"unary\", since: \"1.8\", errors: [\"NOT_FOUND\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n // 1.10: the app's windows and accounts (usage by vote, weekly resets, window actions), project move/create, Refresh pins.\n \"apps.windows.list\": { params: AppsWindowsListParams, result: AppsWindowsListResult, kind: \"unary\", since: \"1.10\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.windows.open\": { params: AppsWindowsOpenParams, result: AppsWindowActionResult, kind: \"unary\", since: \"1.10\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.windows.reload\": { params: AppsWindowsReloadParams, result: AppsWindowActionResult, kind: \"unary\", since: \"1.10\", errors: [\"NOT_FOUND\", \"CONFLICT\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.windows.restart\": { params: AppsWindowsRestartParams, result: AppsWindowActionResult, kind: \"unary\", since: \"1.10\", errors: [\"NOT_FOUND\", \"CONFLICT\", \"TIMEOUT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n // 1.50: a window's Remote Control (phone) setting, written while closed or queued for its next close.\n \"apps.windows.set_remote_control\": { params: AppsWindowsSetRemoteControlParams, result: AppsWindowsSetRemoteControlResult, kind: \"unary\", since: \"1.50\", errors: [\"NOT_FOUND\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.windows.refresh_usage\": { params: AppsWindowsRefreshUsageParams, result: AppsWindowActionResult, kind: \"unary\", since: \"1.10\", errors: [\"NOT_FOUND\", \"TIMEOUT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.accounts.usage\": { params: AppsAccountsUsageParams, result: AppsAccountsUsageResult, kind: \"unary\", since: \"1.10\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.accounts.resets\": { params: AppsAccountsResetsParams, result: AppsAccountsResetsResult, kind: \"unary\", since: \"1.10\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n // 1.47: instances and accounts kept apart — an account's usage is the account's, every instance shows it by id.\n \"apps.instances.list\": { params: AppsInstancesListParams, result: AppsInstancesListResult, kind: \"unary\", since: \"1.47\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.accounts.list\": { params: AppsAccountsListParams, result: AppsAccountsListResult, kind: \"unary\", since: \"1.47\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.setup.list\": { params: AppsSetupListParams, result: AppsSetupListResult, kind: \"unary\", since: \"1.73\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n // 1.56: an instance's kept-for account and forgetting it (the app's own tool writes both); every raw fact about one chat.\n \"apps.windows.set_account\": { params: AppsWindowsSetAccountParams, result: AppsWindowActionResult, kind: \"unary\", since: \"1.56\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.windows.forget\": { params: AppsWindowsForgetParams, result: AppsWindowActionResult, kind: \"unary\", since: \"1.56\", errors: [\"NOT_FOUND\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.chats.probe\": { params: AppsChatsProbeParams, result: AppsChatsProbeResult, kind: \"unary\", since: \"1.56\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.projects.move\": { params: AppsProjectsMoveParams, result: AppsProjectsMoveResult, kind: \"unary\", since: \"1.10\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.projects.create\": { params: AppsProjectsCreateParams, result: AppsProjectsCreateResult, kind: \"unary\", since: \"1.10\", errors: [\"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.projects.import_pins\": { params: AppsProjectsImportPinsParams, result: AppsProjectsImportPinsResult, kind: \"unary\", since: \"1.10\", errors: [\"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n // 1.55: copy (or move) chats to another account with their groups and pins, in one engine pass, read back.\n \"apps.chats.copy_to_account\": { params: AppsChatsCopyToAccountParams, result: AppsChatsCopyToAccountResult, kind: \"unary\", since: \"1.55\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.projects.to_window\": { params: AppsProjectsToWindowParams, result: AppsProjectsToWindowResult, kind: \"unary\", since: \"1.19\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n // 1.11: Going cold, Spend, sync health, windows upkeep.\n \"apps.chats.cold\": { params: AppsChatsColdParams, result: AppsChatsColdResult, kind: \"unary\", since: \"1.11\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.chats.open\": { params: AppsChatsOpenParams, result: AppsWindowActionResult, kind: \"unary\", since: \"1.11\", errors: [\"NOT_FOUND\", \"CONFLICT\", \"TIMEOUT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.chats.titles_check\": { params: AppsChatsTitlesCheckParams, result: AppsChatsTitlesCheckResult, kind: \"unary\", since: \"1.29\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.chats.titles_push\": { params: AppsChatsTitlesPushParams, result: AppsChatsTitlesPushResult, kind: \"unary\", since: \"1.29\", errors: [\"NOT_FOUND\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.chats.bring_back\": { params: AppsChatsBringBackParams, result: AppsChatsBringBackResult, kind: \"unary\", since: \"1.72\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.chats.tidy_up\": { params: AppsChatsTidyUpParams, result: AppsChatsTidyUpResult, kind: \"unary\", since: \"1.72\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.spend\": { params: AppsSpendParams, result: AppsSpendResult, kind: \"unary\", since: \"1.11\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.sync.status\": { params: AppsSyncStatusParams, result: AppsSyncStatusResult, kind: \"unary\", since: \"1.11\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.sync.run\": { params: AppsSyncRunParams, result: AppsWindowActionResult, kind: \"unary\", since: \"1.11\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.windows.processes\": { params: AppsWindowsProcessesParams, result: AppsWindowsProcessesResult, kind: \"unary\", since: \"1.11\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.windows.add\": { params: AppsWindowsAddParams, result: AppsWindowActionResult, kind: \"unary\", since: \"1.11\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.windows.save_names\": { params: AppsWindowsSaveNamesParams, result: AppsWindowActionResult, kind: \"unary\", since: \"1.11\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n\n \"proc.list\": { params: ProcListParams, result: ProcListResult, kind: \"unary\", since: \"1.3\", errors: [\"INVALID_PARAMS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"proc.ports\": { params: ProcPortsParams, result: ProcPortsResult, kind: \"unary\", since: \"1.3\", errors: [\"INVALID_PARAMS\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"proc.kill\": { params: ProcKillParams, result: ProcKillResult, kind: \"unary\", since: \"1.3\", errors: [\"NOT_FOUND\", \"AUTH_FORBIDDEN\", \"PERMISSION_DENIED_OS\", \"INVALID_PARAMS\", \"INTERNAL\"] },\n\n \"clipboard.read\": { params: ClipboardReadParams, result: ClipboardReadResult, kind: \"unary\", since: \"1.3\", errors: [\"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"clipboard.write\": { params: ClipboardWriteParams, result: ClipboardWriteResult, kind: \"unary\", since: \"1.3\", errors: [\"PLATFORM_UNSUPPORTED\", \"PAYLOAD_TOO_LARGE\", \"INTERNAL\"] },\n \"fs.watch.start\": { params: FsWatchStartParams, result: FsWatchStartResult, kind: \"unary\", since: \"1.4\", errors: [...FS_ERR, \"RATE_LIMITED\"] },\n \"fs.watch.events\": { params: FsWatchEventsParams, result: FsWatchEventsResult, kind: \"unary\", since: \"1.4\", errors: [\"RESOURCE_GONE\", \"INVALID_PARAMS\", \"INTERNAL\"] },\n \"fs.watch.stop\": { params: FsWatchStopParams, result: FsWatchStopResult, kind: \"unary\", since: \"1.4\", errors: [\"RESOURCE_GONE\", \"INVALID_PARAMS\"] },\n\n \"exec.job.start\": { params: ExecJobStartParams, result: ExecJobStartResult, kind: \"unary\", since: \"1.4\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"RATE_LIMITED\", \"INTERNAL\"] },\n \"exec.job.output\": { params: ExecJobOutputParams, result: ExecJobOutputResult, kind: \"unary\", since: \"1.4\", errors: [\"RESOURCE_GONE\", \"INVALID_PARAMS\"] },\n \"exec.job.stop\": { params: ExecJobStopParams, result: ExecJobStopResult, kind: \"unary\", since: \"1.4\", errors: [\"RESOURCE_GONE\", \"INVALID_PARAMS\", \"INTERNAL\"] },\n \"exec.job.list\": { params: ExecJobListParams, result: ExecJobListResult, kind: \"unary\", since: \"1.4\", errors: [\"INTERNAL\"] },\n\n \"system.open_url\": { params: SystemOpenUrlParams, result: SystemOpenUrlResult, kind: \"unary\", since: \"1.4\", errors: [\"INVALID_PARAMS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"system.open_settings\": { params: SystemOpenSettingsParams, result: SystemOpenSettingsResult, kind: \"unary\", since: \"1.24\", errors: [\"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"system.open_path\": { params: SystemOpenPathParams, result: SystemOpenPathResult, kind: \"unary\", since: \"1.4\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"system.notify\": { params: SystemNotifyParams, result: SystemNotifyResult, kind: \"unary\", since: \"1.4\", errors: [\"PERMISSION_DENIED_OS\", \"INTERNAL\"] },\n\n \"screen.list\": { params: ScreenListParams, result: ScreenListResult, kind: \"unary\", since: \"1.4\", errors: [\"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"screen.capture\": { params: ScreenCaptureParams, result: ScreenCaptureResult, kind: \"unary\", since: \"1.4\", errors: [\"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"PAYLOAD_TOO_LARGE\", \"INTERNAL\"] },\n\n \"window.list\": { params: WindowListParams, result: WindowListResult, kind: \"unary\", since: \"1.4\", errors: [\"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"window.focus\": { params: WindowFocusParams, result: WindowFocusResult, kind: \"unary\", since: \"1.4\", errors: [\"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"window.move\": { params: WindowMoveParams, result: WindowMoveResult, kind: \"unary\", since: \"1.4\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"window.minimize\": { params: WindowMinimizeParams, result: WindowMinimizeResult, kind: \"unary\", since: \"1.4\", errors: [\"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n\n \"input.type_text\": { params: InputTypeTextParams, result: InputTypeTextResult, kind: \"unary\", since: \"1.4\", errors: [\"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"input.keyboard_settings\": { params: InputKeyboardSettingsParams, result: InputKeyboardSettingsResult, kind: \"unary\", since: \"1.24\", errors: [\"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"input.set_keyboard_settings\": { params: InputSetKeyboardSettingsParams, result: InputKeyboardSettingsResult, kind: \"unary\", since: \"1.24\", errors: [\"INVALID_PARAMS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"input.hotkey\": { params: InputHotkeyParams, result: InputHotkeyResult, kind: \"unary\", since: \"1.4\", errors: [\"INVALID_PARAMS\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"input.mouse_move\": { params: InputMouseMoveParams, result: InputMouseMoveResult, kind: \"unary\", since: \"1.4\", errors: [\"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"input.mouse_click\": { params: InputMouseClickParams, result: InputMouseClickResult, kind: \"unary\", since: \"1.4\", errors: [\"INVALID_PARAMS\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n\n \"power.status\": { params: PowerStatusParams, result: PowerStatusResult, kind: \"unary\", since: \"1.4\", errors: [\"INTERNAL\"] },\n \"power.history\": { params: PowerHistoryParams, result: PowerHistoryResult, kind: \"unary\", since: \"1.24\", errors: [\"INTERNAL\"] },\n \"power.prevent_sleep\": { params: PowerPreventSleepParams, result: PowerPreventSleepResult, kind: \"unary\", since: \"1.4\", errors: [\"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n\n \"resources.snapshot\": { params: ResourcesSnapshotParams, result: ResourcesSnapshotResult, kind: \"unary\", since: \"1.4\", errors: [\"INTERNAL\"] },\n \"resources.activity\": { params: ResourcesActivityParams, result: ResourcesActivityResult, kind: \"unary\", since: \"1.17\", errors: [\"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"resources.stop_job\": { params: ResourcesStopJobParams, result: ResourcesStopJobResult, kind: \"unary\", since: \"1.17\", errors: [\"NOT_FOUND\", \"CONFLICT\", \"AUTH_FORBIDDEN\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"resources.incidents\": { params: ResourcesIncidentsParams, result: ResourcesIncidentsResult, kind: \"unary\", since: \"1.17\", errors: [\"INTERNAL\"] },\n\n \"audio.devices\": { params: AudioDevicesParams, result: AudioDevicesResult, kind: \"unary\", since: \"1.6\", errors: [\"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"audio.levels\": { params: AudioLevelsParams, result: AudioLevelsResult, kind: \"unary\", since: \"1.24\", errors: [\"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"audio.set_levels\": { params: AudioSetLevelsParams, result: AudioLevelsResult, kind: \"unary\", since: \"1.24\", errors: [\"INVALID_PARAMS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"audio.record\": { params: AudioRecordParams, result: AudioRecordResult, kind: \"unary\", since: \"1.6\", errors: [\"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"RESOURCE_BUSY\", \"INTERNAL\"] },\n \"audio.play\": { params: AudioPlayParams, result: AudioPlayResult, kind: \"unary\", since: \"1.6\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n\n // The local AI Matrx servers (aidream's process-compose stack), supervised from Matrx 2's core.\n \"stack.state\": { params: StackStateParams, result: StackStateResult, kind: \"unary\", since: \"1.16\", errors: [\"INTERNAL\"] },\n \"stack.start\": { params: StackStartParams, result: StackRunResult, kind: \"unary\", since: \"1.16\", errors: [\"RESOURCE_BUSY\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"stack.stop\": { params: StackStopParams, result: StackRunResult, kind: \"unary\", since: \"1.16\", errors: [\"RESOURCE_BUSY\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"stack.server.action\": { params: StackServerActionParams, result: StackServerActionResult, kind: \"unary\", since: \"1.16\", errors: [\"NOT_FOUND\", \"CONFLICT\", \"INTERNAL\"] },\n \"stack.logs\": { params: StackLogsParams, result: StackLogsResult, kind: \"unary\", since: \"1.16\", errors: [\"NOT_FOUND\", \"INTERNAL\"] },\n \"stack.errors\": { params: StackErrorsParams, result: StackErrorsResult, kind: \"unary\", since: \"1.16\", errors: [\"INTERNAL\"] },\n\n // The device's error ledger (SPEC §3.12): every process's errors, grouped, delivered to ops.system_error.\n \"diag.errors.list\": { params: DiagErrorsListParams, result: DiagErrorsListResult, kind: \"unary\", since: \"1.20\", errors: [\"INTERNAL\"] },\n \"diag.errors.report\": { params: DiagErrorsReportParams, result: DiagErrorsReportResult, kind: \"unary\", since: \"1.20\", errors: [\"INTERNAL\"] },\n // 1.21: what a window's sidebar draws (the Move-all grouping check).\n \"apps.windows.groups\": { params: AppsWindowsGroupsParams, result: AppsWindowsGroupsResult, kind: \"unary\", since: \"1.43\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.windows.shown\": { params: AppsWindowsShownParams, result: AppsWindowsShownResult, kind: \"unary\", since: \"1.21\", errors: [\"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n\n // Claude Code history (SPEC §6 coding): served by the `coding` Python service through SERVICES below.\n \"coding.history.import_missing\": { params: CodingHistoryImportMissingParams, result: CodingHistoryImportMissingResult, kind: \"unary\", since: \"1.5\", errors: [\"RESOURCE_BUSY\", \"RESOURCE_GONE\", \"CANCELLED\", \"INTERNAL\"] },\n // Code from anywhere (1.38): the coding engine's sessions, read and driven over any transport.\n \"coding.providers\": { params: CodingProvidersParams, result: CodingProvidersResult, kind: \"unary\", since: \"1.38\", errors: [\"INTERNAL\"] },\n \"coding.sessions.list\": { params: CodingSessionsListParams, result: CodingSessionsListResult, kind: \"unary\", since: \"1.38\", errors: [\"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"coding.discover\": { params: CodingDiscoverParams, result: CodingDiscoverResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"coding.runs.list\": { params: CodingRunsListParams, result: CodingRunsListResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"INTERNAL\"] },\n \"coding.history\": { params: CodingHistoryParams, result: CodingHistoryResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"INTERNAL\"] },\n \"coding.transcript.read\": { params: CodingTranscriptReadParams, result: CodingTranscriptReadResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"INTERNAL\"] },\n \"coding.item.full\": { params: CodingItemFullParams, result: CodingItemFullResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PAYLOAD_TOO_LARGE\", \"INTERNAL\"] },\n \"coding.activity\": { params: CodingActivityParams, result: CodingActivityResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"INTERNAL\"] },\n \"coding.folders.recent\": { params: CodingFoldersRecentParams, result: CodingFoldersRecentResult, kind: \"unary\", since: \"1.38\", errors: [\"INTERNAL\"] },\n \"coding.folders.check\": { params: CodingFoldersCheckParams, result: CodingFoldersCheckResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"AUTH_FORBIDDEN\", \"INTERNAL\"] },\n \"coding.folders.create\": { params: CodingFoldersCreateParams, result: CodingFoldersCreateResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"AUTH_FORBIDDEN\", \"PERMISSION_DENIED_OS\", \"INTERNAL\"] },\n \"coding.start\": { params: CodingStartParams, result: CodingStartResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"AUTH_FORBIDDEN\", \"RATE_LIMITED\", \"INTERNAL\"] },\n \"coding.takeover\": { params: CodingTakeoverParams, result: CodingTakeoverResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"RESOURCE_BUSY\", \"AUTH_FORBIDDEN\", \"INTERNAL\"] },\n \"coding.send\": { params: CodingSendParams, result: CodingSendResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"RATE_LIMITED\", \"INTERNAL\"] },\n \"coding.stop\": { params: CodingStopParams, result: CodingStopResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"INTERNAL\"] },\n \"coding.stop_elsewhere\": { params: CodingStopElsewhereParams, result: CodingStopElsewhereResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"CONFLICT\", \"PERMISSION_DENIED_OS\", \"INTERNAL\"] },\n \"coding.options.set\": { params: CodingOptionsSetParams, result: CodingOptionsSetResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"INTERNAL\"] },\n // 1.56: \"Continue on <account>\" — the session moves to another account and its stopped turn is sent again, exactly once.\n \"coding.account.continue\": { params: CodingAccountContinueParams, result: CodingAccountContinueResult, kind: \"unary\", since: \"1.56\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"RESOURCE_BUSY\", \"AUTH_FORBIDDEN\", \"INTERNAL\"] },\n \"coding.agent.set\": { params: CodingAgentSetParams, result: CodingAgentSetResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"AUTH_FORBIDDEN\", \"INTERNAL\"] },\n \"coding.agents.access\": { params: CodingAgentsAccessParams, result: CodingAgentsAccessResult, kind: \"unary\", since: \"1.38\", errors: [\"INTERNAL\"] },\n \"coding.titles.status\": { params: CodingTitlesStatusParams, result: CodingTitlesStatusResult, kind: \"unary\", since: \"1.38\", errors: [\"INTERNAL\"] },\n \"coding.prefs.list\": { params: CodingPrefsListParams, result: CodingPrefsListResult, kind: \"unary\", since: \"1.38\", errors: [\"INTERNAL\"] },\n \"coding.prefs.set\": { params: CodingPrefsSetParams, result: CodingPrefsSetResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"INTERNAL\"] },\n \"coding.recent.seen\": { params: CodingRecentSeenParams, result: CodingRecentSeenResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"INTERNAL\"] },\n \"coding.search\": { params: CodingSearchParams, result: CodingSearchResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"TIMEOUT\", \"INTERNAL\"] },\n \"coding.reconcile\": { params: CodingReconcileParams, result: CodingReconcileResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"RESOURCE_BUSY\", \"CANCELLED\", \"INTERNAL\"] },\n \"coding.transcript.raw\": { params: CodingTranscriptRawParams, result: CodingTranscriptRawResult, kind: \"stream\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"CANCELLED\", \"INTERNAL\"] },\n \"coding.watch\": { params: CodingWatchParams, result: CodingWatchResult, kind: \"resource\", since: \"1.38\", errors: [\"PLATFORM_UNSUPPORTED\", \"RATE_LIMITED\", \"INTERNAL\"] },\n \"coding.session.watch\": { params: CodingSessionWatchParams, result: CodingSessionWatchResult, kind: \"resource\", since: \"1.38\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"RATE_LIMITED\", \"INTERNAL\"] },\n \"session.identify\": { params: SessionIdentifyParams, result: SessionIdentifyResult, kind: \"unary\", since: \"1.38\", errors: [\"INVALID_PARAMS\"] },\n\n // 1.22: git for agents (core `git`, the system git; the cloud sandbox's /git/* set, SPEC 6.1).\n \"git.status\": { params: GitStatusParams, result: GitStatusResult, kind: \"unary\", since: \"1.22\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"git.diff\": { params: GitDiffParams, result: GitDiffResult, kind: \"unary\", since: \"1.22\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"git.log\": { params: GitLogParams, result: GitLogResult, kind: \"unary\", since: \"1.22\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"git.add\": { params: GitAddParams, result: GitOutputResult, kind: \"unary\", since: \"1.22\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"git.commit\": { params: GitCommitParams, result: GitCommitResult, kind: \"unary\", since: \"1.22\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"git.push\": { params: GitPushParams, result: GitOutputResult, kind: \"unary\", since: \"1.22\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"git.pull\": { params: GitPullParams, result: GitOutputResult, kind: \"unary\", since: \"1.22\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"git.branch\": { params: GitBranchParams, result: GitBranchResult, kind: \"unary\", since: \"1.22\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"git.stash\": { params: GitStashParams, result: GitOutputResult, kind: \"unary\", since: \"1.22\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"git.clone\": { params: GitCloneParams, result: GitOutputResult, kind: \"unary\", since: \"1.22\", errors: [\"NOT_FOUND\", \"INVALID_PARAMS\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n // 1.22: the web from this computer (the `tools` Python service: matrx_scraper's local lane).\n \"web.fetch\": { params: WebFetchParams, result: WebFetchResult, kind: \"unary\", since: \"1.22\", errors: [\"INVALID_PARAMS\", \"TIMEOUT\", \"RESOURCE_BUSY\", \"AUTH_REQUIRED\", \"INTERNAL\"] },\n \"web.scrape\": { params: WebScrapeParams, result: WebScrapeResult, kind: \"unary\", since: \"1.22\", errors: [\"INVALID_PARAMS\", \"TIMEOUT\", \"RESOURCE_BUSY\", \"AUTH_REQUIRED\", \"INTERNAL\"] },\n \"web.search\": { params: WebSearchParams, result: WebSearchResult, kind: \"unary\", since: \"1.22\", errors: [\"INVALID_PARAMS\", \"TIMEOUT\", \"RESOURCE_BUSY\", \"AUTH_REQUIRED\", \"INTERNAL\"] },\n \"web.fetch_with_browser\": { params: WebBrowserFetchParams, result: WebBrowserFetchResult, kind: \"unary\", since: \"1.22\", errors: [\"INVALID_PARAMS\", \"TIMEOUT\", \"RESOURCE_BUSY\", \"AUTH_REQUIRED\", \"INTERNAL\"] },\n \"web.runtime.state\": { params: WebRuntimeParams, result: WebRuntimeState, kind: \"unary\", since: \"1.40\", errors: [\"INTERNAL\"] },\n \"web.runtime.install\": { params: WebRuntimeParams, result: WebRuntimeState, kind: \"unary\", since: \"1.40\", errors: [\"TIMEOUT\", \"RESOURCE_BUSY\", \"CANCELLED\", \"INTERNAL\"] },\n \"web.runtime.remove\": { params: WebRuntimeParams, result: WebRuntimeState, kind: \"unary\", since: \"1.40\", errors: [\"RESOURCE_BUSY\", \"INTERNAL\"] },\n \"web.outbox.list\": { params: WebOutboxListParams, result: WebOutboxListResult, kind: \"unary\", since: \"1.40\", errors: [\"INTERNAL\"] },\n \"web.outbox.retry\": { params: WebOutboxRetryParams, result: WebOutboxRetryResult, kind: \"unary\", since: \"1.40\", errors: [\"NOT_FOUND\", \"AUTH_REQUIRED\", \"INTERNAL\"] },\n \"web.outbox.discard\": { params: WebOutboxDiscardParams, result: WebOutboxDiscardResult, kind: \"unary\", since: \"1.40\", errors: [\"NOT_FOUND\", \"INTERNAL\"] },\n \"web.log.list\": { params: WebLogListParams, result: WebLogListResult, kind: \"unary\", since: \"1.40\", errors: [\"INVALID_PARAMS\"] },\n \"web.log.clear\": { params: WebLogClearParams, result: WebLogClearResult, kind: \"unary\", since: \"1.40\", errors: [\"INTERNAL\"] },\n \"web.research.queue\": { params: WebResearchQueueParams, result: WebResearchQueueResult, kind: \"unary\", since: \"1.40\", errors: [\"INVALID_PARAMS\", \"INTERNAL\"] },\n \"web.research.fetch\": { params: WebResearchFetchParams, result: WebResearchFetchResult, kind: \"unary\", since: \"1.40\", errors: [\"INVALID_PARAMS\", \"AUTH_REQUIRED\", \"RESOURCE_BUSY\", \"CANCELLED\", \"INTERNAL\"] },\n // 1.23: the signed-in person's own agents and Vault, read as them (the desktop's Agents library and Vault).\n \"account.agents.list\": { params: AccountAgentsListParams, result: AccountAgentsListResult, kind: \"unary\", since: \"1.23\", errors: [\"INTERNAL\"] },\n \"account.vault.list\": { params: AccountVaultListParams, result: AccountVaultListResult, kind: \"unary\", since: \"1.23\", errors: [\"INTERNAL\"] },\n \"account.vault.copy\": { params: AccountVaultCopyParams, result: AccountVaultCopyResult, kind: \"unary\", since: \"1.23\", errors: [\"AUTH_REQUIRED\", \"AUTH_FORBIDDEN\", \"NOT_FOUND\", \"INVALID_PARAMS\", \"DEVICE_OFFLINE\", \"INTERNAL\"] },\n // 1.39: one agent opened (its inputs and what it uses), its runs (mandate.run_history, one agent at a time) and its star.\n \"account.agents.get\": { params: AccountAgentsGetParams, result: AccountAgentsGetResult, kind: \"unary\", since: \"1.39\", errors: [\"INVALID_PARAMS\", \"INTERNAL\"] },\n \"account.agents.runs\": { params: AccountAgentsRunsParams, result: AccountAgentsRunsResult, kind: \"unary\", since: \"1.39\", errors: [\"INVALID_PARAMS\", \"INTERNAL\"] },\n \"account.agents.favorite\": { params: AccountAgentsFavoriteParams, result: AccountAgentsFavoriteResult, kind: \"unary\", since: \"1.39\", errors: [\"AUTH_REQUIRED\", \"NOT_FOUND\", \"INVALID_PARAMS\", \"DEVICE_OFFLINE\", \"INTERNAL\"] },\n \"account.agents.versions\": { params: AccountAgentsVersionsParams, result: AccountAgentsVersionsResult, kind: \"unary\", since: \"1.64\", errors: [\"INVALID_PARAMS\", \"INTERNAL\"] },\n \"account.agents.version_diff\": { params: AccountAgentsVersionDiffParams, result: AccountAgentsVersionDiffResult, kind: \"unary\", since: \"1.64\", errors: [\"INVALID_PARAMS\", \"INTERNAL\"] },\n \"account.agents.restore_version\": { params: AccountAgentsRestoreVersionParams, result: AccountAgentsRestoreVersionResult, kind: \"unary\", since: \"1.64\", errors: [\"AUTH_REQUIRED\", \"NOT_FOUND\", \"INVALID_PARAMS\", \"DEVICE_OFFLINE\", \"INTERNAL\"] },\n // 1.26: the app's own update (it installs only once every window quit) and bringing the windows back.\n \"apps.windows.update_state\": { params: AppsWindowsUpdateStateParams, result: AppsWindowsUpdateStateResult, kind: \"unary\", since: \"1.26\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.windows.reopen\": { params: AppsWindowsReopenParams, result: AppsWindowsReopenResult, kind: \"unary\", since: \"1.26\", errors: [\"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"apps.windows.update_and_reopen\": { params: AppsWindowsUpdateAndReopenParams, result: AppsWindowsUpdateAndReopenResult, kind: \"unary\", since: \"1.26\", errors: [\"NOT_FOUND\", \"CONFLICT\", \"TIMEOUT\", \"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n // 1.28: the AI Matrx extension as a client (register, result, progress), the Browsers screen, and agents' calls.\n \"browser.register\": { params: BrowserRegisterParams, result: BrowserRegisterResult, kind: \"unary\", since: \"1.28\", errors: [\"AUTH_FORBIDDEN\", \"INVALID_PARAMS\", \"INTERNAL\"] },\n \"browser.result\": { params: BrowserResultParams, result: BrowserResultResult, kind: \"unary\", since: \"1.28\", errors: [\"AUTH_FORBIDDEN\", \"PAYLOAD_TOO_LARGE\"] },\n \"browser.progress\": { params: BrowserProgressParams, result: BrowserProgressResult, kind: \"unary\", since: \"1.28\", errors: [\"AUTH_FORBIDDEN\"] },\n \"browser.sessions\": { params: BrowserSessionsParams, result: BrowserSessionsResult, kind: \"unary\", since: \"1.28\", errors: [\"INTERNAL\"] },\n \"browser.disconnect\": { params: BrowserDisconnectParams, result: BrowserDisconnectResult, kind: \"unary\", since: \"1.28\", errors: [\"NOT_FOUND\", \"AUTH_FORBIDDEN\"] },\n \"browser.set_enabled\": { params: BrowserSetEnabledParams, result: BrowserSetEnabledResult, kind: \"unary\", since: \"1.28\", errors: [\"AUTH_FORBIDDEN\", \"INTERNAL\"] },\n \"browser.pair_code\": { params: BrowserPairCodeParams, result: BrowserPairCodeResult, kind: \"unary\", since: \"1.28\", errors: [\"AUTH_FORBIDDEN\", \"INTERNAL\"] },\n \"browser.pair_reset\": { params: BrowserPairResetParams, result: BrowserPairCodeResult, kind: \"unary\", since: \"1.28\", errors: [\"AUTH_FORBIDDEN\", \"INTERNAL\"] },\n \"browser.tool_metrics\": { params: BrowserToolMetricsParams, result: BrowserToolMetricsResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\"] },\n \"browser.reset_counters\": { params: BrowserResetCountersParams, result: BrowserResetCountersResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\"] },\n \"browser.log\": { params: BrowserLogParams, result: BrowserLogResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\"] },\n \"browser.call\": { params: BrowserCallParams, result: BrowserCallResult, kind: \"unary\", since: \"1.28\", errors: [\"NOT_FOUND\", \"CONFLICT\", \"AUTH_FORBIDDEN\", \"INVALID_PARAMS\", \"TIMEOUT\", \"CANCELLED\", \"RESOURCE_GONE\", \"PAYLOAD_TOO_LARGE\", \"INTERNAL\"] },\n // 1.37: Matrx Local's remaining sidecar tools in the core (net, automation, the person's apps,\n // Windows administration, schedules, local notes, documents and entities).\n \"net.info\": { params: NetInfoParams, result: NetInfoResult, kind: \"unary\", since: \"1.37\", errors: [\"PLATFORM_UNSUPPORTED\", \"INTERNAL\"] },\n \"net.wifi\": { params: NetWifiParams, result: NetWifiResult, kind: \"unary\", since: \"1.37\", errors: [\"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"net.bluetooth\": { params: NetBluetoothParams, result: NetBluetoothResult, kind: \"unary\", since: \"1.37\", errors: [\"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"net.devices\": { params: NetDevicesParams, result: NetDevicesResult, kind: \"unary\", since: \"1.37\", errors: [\"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"net.mdns\": { params: NetMdnsParams, result: NetMdnsResult, kind: \"unary\", since: \"1.37\", errors: [\"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"net.scan\": { params: NetScanParams, result: NetScanResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"AUTH_FORBIDDEN\", \"TIMEOUT\", \"INTERNAL\"] },\n \"net.download\": { params: NetDownloadParams, result: NetDownloadResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"CONFLICT\", \"PERMISSION_DENIED_OS\", \"PAYLOAD_TOO_LARGE\", \"TIMEOUT\", \"INTERNAL\"] },\n \"automation.script\": { params: AutomationScriptParams, result: AutomationScriptResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"mail.accounts\": { params: MailAccountsParams, result: MailAccountsResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"mail.list\": { params: MailListParams, result: MailListResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"mail.send\": { params: MailSendParams, result: MailSendResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"outlook.status\": { params: OutlookStatusParams, result: OutlookStatusResult, kind: \"unary\", since: \"1.44\", errors: [\"TIMEOUT\", \"INTERNAL\"] },\n \"outlook.draft\": { params: OutlookDraftParams, result: OutlookDraftResult, kind: \"unary\", since: \"1.44\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"outlook.list\": { params: OutlookListParams, result: OutlookListResult, kind: \"unary\", since: \"1.44\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"outlook.read\": { params: OutlookReadParams, result: OutlookReadResult, kind: \"unary\", since: \"1.44\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"messages.chats\": { params: MessagesChatsParams, result: MessagesChatsResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"messages.list\": { params: MessagesListParams, result: MessagesListResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"messages.send\": { params: MessagesSendParams, result: MessagesSendResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"contacts.search\": { params: ContactsSearchParams, result: ContactsSearchResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"contacts.get\": { params: ContactsGetParams, result: ContactsGetResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"calendar.list\": { params: CalendarListParams, result: CalendarListResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"calendar.create\": { params: CalendarCreateParams, result: CalendarCreateResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"reminders.list\": { params: RemindersListParams, result: RemindersListResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"reminders.create\": { params: RemindersCreateParams, result: RemindersCreateResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"photos.search\": { params: PhotosSearchParams, result: PhotosSearchResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"photos.get\": { params: PhotosGetParams, result: PhotosGetResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"location.get\": { params: LocationGetParams, result: LocationGetResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"windows.registry_read\": { params: WindowsRegistryReadParams, result: WindowsRegistryReadResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"windows.registry_write\": { params: WindowsRegistryWriteParams, result: WindowsRegistryWriteResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"windows.services\": { params: WindowsServicesParams, result: WindowsServicesResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"windows.service_control\": { params: WindowsServiceControlParams, result: WindowsServiceControlResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"windows.event_log\": { params: WindowsEventLogParams, result: WindowsEventLogResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"windows.features\": { params: WindowsFeaturesParams, result: WindowsFeaturesResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PERMISSION_DENIED_OS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"schedule.create\": { params: ScheduleCreateParams, result: ScheduleCreateResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"INTERNAL\"] },\n \"schedule.list\": { params: ScheduleListParams, result: ScheduleListResult, kind: \"unary\", since: \"1.37\", errors: [\"INTERNAL\"] },\n \"schedule.cancel\": { params: ScheduleCancelParams, result: ScheduleCancelResult, kind: \"unary\", since: \"1.37\", errors: [\"NOT_FOUND\", \"INTERNAL\"] },\n \"notes.folders\": { params: NotesFoldersParams, result: NotesFoldersResult, kind: \"unary\", since: \"1.37\", errors: [\"INTERNAL\"] },\n \"notes.list\": { params: NotesListParams, result: NotesListResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"INTERNAL\"] },\n \"notes.read\": { params: NotesReadParams, result: NotesReadResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"INTERNAL\"] },\n \"notes.write\": { params: NotesWriteParams, result: NotesWriteResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"CONFLICT\", \"PERMISSION_DENIED_OS\", \"INTERNAL\"] },\n \"notes.search\": { params: NotesSearchParams, result: NotesSearchResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"INTERNAL\"] },\n \"documents.pdf_text\": { params: DocumentsPdfTextParams, result: DocumentsPdfTextResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"documents.ocr\": { params: DocumentsOcrParams, result: DocumentsOcrResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"documents.image_resize\": { params: DocumentsImageResizeParams, result: DocumentsImageResizeResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"CONFLICT\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"documents.office_generate\": { params: DocumentsOfficeGenerateParams, result: DocumentsOfficeGenerateResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"NOT_FOUND\", \"CONFLICT\", \"PERMISSION_DENIED_OS\", \"INTERNAL\"] },\n \"entities.ner\": { params: EntitiesNerParams, result: EntitiesNerResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"PLATFORM_UNSUPPORTED\", \"TIMEOUT\", \"INTERNAL\"] },\n \"entities.pii\": { params: EntitiesPiiParams, result: EntitiesPiiResult, kind: \"unary\", since: \"1.37\", errors: [\"INVALID_PARAMS\", \"INTERNAL\"] },\n} as const satisfies Record<string, OpSpec>;\n\nexport type OpName = keyof typeof OPS;\nexport type OpParams<N extends OpName> = z.input<(typeof OPS)[N][\"params\"]>;\nexport type OpResult<N extends OpName> = z.output<(typeof OPS)[N][\"result\"]>;\n\nexport const EVENTS = {\n \"fs.changed\": FsChangedEvent,\n \"apps.chats.changed\": AppsChatsChangedEvent,\n \"apps.chats.watch_state\": AppsChatsWatchStateEvent,\n \"exec.exited\": ExecExitedEvent,\n \"exec.title\": ExecTitleEvent,\n \"exec.cwd\": ExecCwdEvent,\n \"session.control_changed\": SessionControlChangedEvent,\n \"models.progress\": ModelsProgressEvent,\n \"coding.history.progress\": CodingHistoryProgressEvent,\n \"coding.changed\": CodingChangedEvent,\n \"coding.watch_state\": CodingWatchStateEvent,\n \"coding.item\": CodingItemEvent,\n \"coding.gap\": CodingGapEvent,\n \"relay.device_status\": RelayDeviceStatusEvent,\n \"relay.auth_expiring\": RelayAuthExpiringEvent,\n \"diag.errors.changed\": DiagErrorsChangedEvent,\n \"browser.invoke\": BrowserInvokeEvent,\n \"browser.sessions_changed\": BrowserSessionsChangedEvent,\n \"browser.progress\": BrowserProgressEvent,\n \"web.log.entry\": WebLogEntry,\n \"web.progress\": WebProgressEvent,\n} as const satisfies Record<string, z.ZodType>;\n\nexport type EventName = keyof typeof EVENTS;\n\n/**\n * Supervised Python services (SPEC §3.10) and the ops each serves over its local socket\n * (src/schema/service.ts). The Python side's handler protocol, op table and models are generated\n * from this table (scripts/gen_pydantic.py); the core's service client is typed by it. A Router\n * op that a capability owner forwards uses the same params/result schemas as its service op.\n */\nexport type ServiceOpSpec = { readonly params: z.ZodType; readonly result: z.ZodType };\nexport type ServiceSpec = { readonly progress: z.ZodType; readonly ops: Readonly<Record<string, ServiceOpSpec>> };\n\nexport const SERVICES = {\n ml: {\n progress: MlProgress,\n ops: {\n \"ml.status\": { params: MlStatusParams, result: MlStatusResult },\n \"ml.install\": { params: ModelsInstallParams, result: ModelsInstallResult },\n \"ml.transcribe\": { params: ModelsTranscribeParams, result: ModelsTranscribeResult },\n \"ml.llm_status\": { params: ModelsLlmStatusParams, result: ModelsLlmStatusResult },\n \"ml.llm_install\": { params: ModelsLlmInstallParams, result: ModelsLlmInstallResult },\n \"ml.llm_start\": { params: ModelsLlmStartParams, result: ModelsLlmStartResult },\n \"ml.llm_stop\": { params: ModelsLlmStopParams, result: ModelsLlmStopResult },\n \"ml.downloads\": { params: ModelsDownloadsListParams, result: ModelsDownloadsListResult },\n \"ml.download_cancel\": { params: ModelsDownloadsCancelParams, result: ModelsDownloadsCancelResult },\n \"ml.local_list\": { params: ModelsLocalListParams, result: ModelsLocalListResult },\n \"ml.local_remove\": { params: ModelsLocalRemoveParams, result: ModelsLocalRemoveResult },\n \"ml.catalog_set\": { params: MlCatalogSetParams, result: MlCatalogSetResult },\n },\n },\n coding: {\n progress: CodingServiceProgress,\n ops: {\n \"coding.plan_missing\": { params: CodingPlanMissingParams, result: CodingHistoryStep },\n \"coding.import_next\": { params: CodingImportNextParams, result: CodingHistoryStep },\n },\n },\n tools: {\n progress: ToolsServiceProgress,\n ops: {\n \"tools.web_fetch\": { params: WebFetchParams, result: WebFetchResult },\n \"tools.web_scrape\": { params: ToolsWebScrapeParams, result: ToolsWebScrapeResult },\n \"tools.web_search\": { params: ToolsWebSearchParams, result: WebSearchResult },\n \"tools.web_browser_fetch\": { params: ToolsWebBrowserFetchParams, result: ToolsWebBrowserFetchResult },\n \"tools.web_runtime_state\": { params: WebRuntimeParams, result: WebRuntimeState },\n \"tools.web_runtime_install\": { params: WebRuntimeParams, result: WebRuntimeState },\n \"tools.web_runtime_remove\": { params: WebRuntimeParams, result: WebRuntimeState },\n },\n },\n} as const satisfies Record<z.infer<typeof ServiceName>, ServiceSpec>;\n\nexport type ServiceId = keyof typeof SERVICES;\nexport type ServiceOpName<S extends ServiceId> = keyof (typeof SERVICES)[S][\"ops\"] & string;\n\n/**\n * Every schema that lands in the generated JSON Schema `$defs` under a stable name (and so becomes a\n * named Pydantic model). Order is the emission order. A test asserts every exported schema of\n * src/schema/* is either listed here or is a documented alias of a listed one.\n * Registered into a PRIVATE zod registry by scripts/generate.ts — never `.meta()`/`.describe()`,\n * which write zod's process-global registry as an import side effect.\n */\nexport const NAMED_SCHEMAS = {\n ChatAppGroup,\n ChatParent,\n ChatTitleSync,\n ChatMove,\n AppsWindowsSetAccountParams,\n AppsWindowsForgetParams,\n ProbeFact,\n ProbeSource,\n AppsChatsProbeParams,\n AppsChatsProbeResult,\n InstanceStatus,\n InstanceGap,\n AppInstall,\n AppInstance,\n ElsewhereInstance,\n AccountResetSource,\n AccountGap,\n AppAccount,\n AppsInstancesListParams,\n AppsInstancesListResult,\n AppsAccountsListParams,\n AppsAccountsListResult,\n AccountReadSource,\n AccountProfile,\n McpTransport,\n McpServerRow,\n SetupFact,\n SetupItemKind,\n SetupItem,\n AppSetup,\n AppsSetupListParams,\n AppsSetupListResult,\n ProtocolVersion,\n RequestId,\n ResourceId,\n DeviceId,\n AbsPath,\n ErrorCode,\n ErrorReason,\n FsPatchEditFailure,\n ProtocolErrorBody,\n FrameHeader,\n ClientType,\n Limits,\n OpDescriptor,\n Welcome,\n HelloMsg,\n RequestMsg,\n ResponseMsg,\n ErrorMsg,\n StreamMeta,\n StreamMsg,\n EndReason,\n EndMsg,\n CancelMsg,\n CreditMsg,\n EventMsg,\n RelayMsg,\n ClientToCoreMsg,\n CoreToClientMsg,\n OsGrantState,\n OsPermissionName,\n OsRequirementName,\n SysinfoGetParams,\n SysinfoGetResult,\n SysinfoHardwareParams,\n SysinfoHardwareResult,\n SysinfoGraphicsAdapter,\n FsKind,\n FsEntry,\n FsListParams,\n FsListResult,\n FsStatParams,\n FsEncoding,\n FsReadParams,\n FsReadResult,\n FsReadStreamParams,\n FsReadStreamResult,\n FsWriteParams,\n FsWriteResult,\n FsMkdirParams,\n FsMkdirResult,\n FsMoveParams,\n FsMoveResult,\n FsCopyParams,\n FsCopyResult,\n FsInfoParams,\n FsInfoResult,\n FsSearchIndexParams,\n FsSearchIndexResult,\n FsDeleteParams,\n FsDeleteResult,\n FsWatchParams,\n FsWatchResult,\n FsPatchEditApplied,\n FsPatchParams,\n FsPatchResult,\n FsSearchPathsParams,\n FsSearchPathsResult,\n FsSearchContentParams,\n FsSearchContentResult,\n FsChange,\n FsChangedEvent,\n Signal,\n ExecPtyStartParams,\n PtyInfo,\n ExecPtyWriteParams,\n ExecPtyWriteResult,\n ExecPtyResizeParams,\n ExecPtyResizeResult,\n ExecPtySignalParams,\n ExecPtySignalResult,\n ExecPtyKillParams,\n ExecPtyKillResult,\n ExecListParams,\n ExecListResult,\n ExecRunParams,\n ExecRunResult,\n ExecExitedEvent,\n ExecTitleEvent,\n ExecCwdEvent,\n SessionAttachParams,\n ResourceInfo,\n SessionDetachParams,\n SessionDetachResult,\n SessionReleaseParams,\n SessionReleaseResult,\n SessionListParams,\n SessionListResult,\n SessionControlChangedEvent,\n TranscriptionModelId,\n MlRuntimeState,\n MlInstallPhase,\n MlInstallProgress,\n TranscriptionModelInfo,\n TranscriptSegment,\n MlStatusParams,\n MlStatusResult,\n ModelsInstallParams,\n ModelsInstallResult,\n ModelsTranscribeParams,\n ModelsTranscribeResult,\n MlProgress,\n MlServiceState,\n MlServiceStatus,\n ModelsStatusParams,\n ModelsStatusResult,\n ModelsProgressEvent,\n TextModelId,\n TextModelInfo,\n UnusableTextModel,\n ModelKey,\n Sha256Hex,\n CatalogFile,\n CatalogModelEntry,\n LlamaServerBuild,\n MlCatalogSetParams,\n MlCatalogSetResult,\n LlmServerState,\n LlmRunning,\n ModelsLlmStatusParams,\n ModelsLlmStatusResult,\n ModelsLlmInstallParams,\n ModelsLlmInstallResult,\n ModelsLlmStartParams,\n ModelsLlmStartResult,\n ModelsLlmStopParams,\n ModelsLlmStopResult,\n ModelsLlmChatParams,\n ModelsLlmChatResult,\n DownloadKind,\n DownloadRow,\n ModelsDownloadsListParams,\n ModelsDownloadsListResult,\n ModelsDownloadsCancelParams,\n ModelsDownloadsCancelResult,\n LocalModelKind,\n LocalModelRow,\n ModelsLocalListParams,\n ModelsLocalListResult,\n ModelsLocalRemoveParams,\n ModelsLocalRemoveResult,\n CodingServiceCredentials,\n CodingHistoryBlocked,\n CodingHistoryFailure,\n CodingHistoryRun,\n CodingHistoryStep,\n CodingPlanMissingParams,\n CodingImportNextParams,\n CodingServiceProgress,\n CodingHistoryImportMissingParams,\n CodingHistoryImportMissingResult,\n CodingHistoryProgressEvent,\n CodingProviderName,\n CodingRunStatus,\n CodingClientRequestId,\n CodingRunUsage,\n CodingStartedBy,\n CodingRunRecord,\n CodingSessionAgentPart,\n CodingSessionAgent,\n CodingSessionRecord,\n CodingActiveElsewhere,\n CodingDiscoveredChat,\n CodingTranscriptItem,\n CodingHistoryRecord,\n CodingQuotaWindow,\n CodingProviderProblem,\n CodingProviderBinary,\n CodingAccountUsage,\n CodingContinueTarget,\n CodingProviderAccount,\n CodingProviderStatus,\n CodingChatPreference,\n CodingTitleStatus,\n CodingRecentRow,\n CodingFolderCheck,\n CodingRecentFolder,\n CodingAgentSelectionParams,\n CodingSendResult,\n CodingProvidersParams,\n CodingProvidersResult,\n CodingSessionsListParams,\n CodingSessionsListResult,\n CodingDiscoverParams,\n CodingDiscoverResult,\n CodingRunsListParams,\n CodingRunsListResult,\n CodingHistoryParams,\n CodingHistoryResult,\n CodingTranscriptReadParams,\n CodingTranscriptReadResult,\n CodingItemFullParams,\n CodingItemFullResult,\n CodingActivityParams,\n CodingActivityResult,\n CodingFoldersRecentParams,\n CodingFoldersRecentResult,\n CodingFoldersCheckParams,\n CodingFoldersCheckResult,\n CodingFoldersCreateParams,\n CodingFoldersCreateResult,\n CodingStartParams,\n CodingStartResult,\n CodingTakeoverParams,\n CodingTakeoverResult,\n CodingSendParams,\n CodingStopParams,\n CodingStopResult,\n CodingStopElsewhereParams,\n CodingStopElsewhereResult,\n CodingOptionsSetParams,\n CodingOptionsSetResult,\n CodingAccountContinueParams,\n CodingAccountContinueResult,\n CodingAgentSetParams,\n CodingAgentSetResult,\n CodingAgentsAccessParams,\n CodingAgentsAccessResult,\n CodingTitlesStatusParams,\n CodingTitlesStatusResult,\n CodingPrefsListParams,\n CodingPrefsListResult,\n CodingPrefsSetParams,\n CodingPrefsSetResult,\n CodingRecentSeenParams,\n CodingRecentSeenResult,\n CodingSearchParams,\n CodingSearchHit,\n CodingSearchResult,\n CodingReconcileParams,\n CodingReconcileResult,\n CodingTranscriptRawParams,\n CodingTranscriptRawResult,\n CodingWatchParams,\n CodingWatchResult,\n CodingSessionWatchParams,\n CodingSessionWatchResult,\n SessionIdentifyParams,\n SessionIdentifyResult,\n CodingChangedEvent,\n CodingWatchStateEvent,\n CodingItemEvent,\n CodingGapEvent,\n ServiceName,\n ContractHash,\n ServiceToken,\n ServiceHello,\n ServiceWelcome,\n ServiceRequest,\n ServiceResponse,\n ServiceErrorMsg,\n ServiceProgressMsg,\n ServiceCancel,\n ServicePing,\n ServicePong,\n ServiceShutdown,\n CoreToServiceMsg,\n ServiceToCoreMsg,\n RelayDeviceStatusEvent,\n RelayAuthExpiringEvent,\n RelayCallRequest,\n RelayCallResponse,\n RelayCallHello,\n RelayCallEnvelope,\n RelayHopEnvelopeHeader,\n RelayHopConnectionEnd,\n CloseCodeValue,\n ProcSort,\n ProcListParams,\n ProcInfo,\n ProcListResult,\n ProcPortsParams,\n ProcPort,\n ProcPortsResult,\n ProcKillParams,\n ProcKillResult,\n ClipboardReadParams,\n ClipboardReadResult,\n ClipboardWriteParams,\n ClipboardWriteResult,\n SystemOpenUrlParams,\n SystemOpenUrlResult,\n SystemOpenPathParams,\n SystemOpenPathResult,\n SystemSettingsPane,\n SystemOpenSettingsParams,\n SystemOpenSettingsResult,\n SystemNotifyParams,\n SystemNotifyResult,\n ScreenDisplay,\n ScreenListParams,\n ScreenListResult,\n ScreenCaptureParams,\n ScreenCaptureResult,\n WindowInfo,\n WindowListParams,\n WindowListResult,\n WindowFocusParams,\n WindowFocusResult,\n WindowMoveParams,\n WindowMoveResult,\n WindowMinimizeParams,\n WindowMinimizeResult,\n WindowState,\n InputKey,\n InputKeyboardSettingsParams,\n InputKeyboardSettingsResult,\n InputSetKeyboardSettingsParams,\n InputPoint,\n InputTypeTextParams,\n InputTypeTextResult,\n InputHotkeyParams,\n InputHotkeyResult,\n InputMouseMoveParams,\n InputMouseMoveResult,\n InputMouseClickParams,\n InputMouseClickResult,\n PowerStatusParams,\n PowerStatusResult,\n PowerPreventSleepParams,\n PowerPreventSleepResult,\n PowerEnergy,\n PowerHistoryParams,\n PowerHistoryPoint,\n PowerHistoryResult,\n ResourcesDisk,\n ResourcesSnapshotParams,\n ResourcesSnapshotResult,\n ResourcesJobKind,\n ResourcesStrain,\n ResourcesPressure,\n ResourcesVerdict,\n ResourcesSample,\n ResourcesJob,\n ResourcesProcess,\n ResourcesActivityParams,\n ResourcesActivityResult,\n ResourcesStopJobParams,\n ResourcesStopJobResult,\n ResourcesIncident,\n ResourcesIncidentsParams,\n ResourcesIncidentsResult,\n AudioDevice,\n AudioDevicesParams,\n AudioDevicesResult,\n AudioRecordParams,\n AudioRecordResult,\n AudioPlayParams,\n AudioPlayResult,\n AudioLevelsParams,\n AudioLevelsResult,\n AudioSetLevelsParams,\n StackServerName,\n StackTone,\n StackServer,\n StackEvent,\n StackStateParams,\n StackStateResult,\n StackStartParams,\n StackStopParams,\n StackRunResult,\n StackServerActionParams,\n StackServerActionResult,\n StackLogsParams,\n StackLogsResult,\n StackErrorsParams,\n StackErrorsResult,\n DiagProcess,\n DiagErrorKind,\n DiagErrorStatus,\n DiagErrorEntry,\n DiagErrorsListParams,\n DiagErrorsListResult,\n DiagErrorsReportParams,\n DiagErrorsReportResult,\n DiagErrorsChangedEvent,\n FsWatchId,\n FsWatchStartParams,\n FsWatchStartResult,\n FsWatchEventsParams,\n FsWatchEventsResult,\n FsWatchStopParams,\n FsWatchStopResult,\n ExecJobId,\n ExecJobStartParams,\n ExecJobStartResult,\n ExecJobOutputParams,\n ExecJobOutputResult,\n ExecJobStopParams,\n ExecJobStopResult,\n ExecJobInfo,\n ExecJobListParams,\n ExecJobListResult,\n ToolLevel,\n ToolOutcome,\n ToolPlatform,\n ToolTransport,\n ToolName,\n ToolLevelResult,\n ToolResultsFile,\n AppKey,\n AppProfileId,\n AppProfileLocator,\n AppSupport,\n AppFeatureStatus,\n AppInfo,\n AppUsageReading,\n AppProfile,\n AppsListParams,\n AppsListResult,\n AppsProfilesListParams,\n AppsProfilesListResult,\n AppsProfilesSaveParams,\n AppsProfilesRemoveParams,\n AppsProfilesRemoveResult,\n AppsOpenParams,\n AppsOpenResult,\n ChatId,\n ChatPlace,\n ChatProjectId,\n ChatWindow,\n ChatProject,\n ChatPin,\n ChatRunning,\n ChatHidden,\n ChatLastUse,\n ChatAppProject,\n ChatRow,\n AppsChatsListParams,\n AppsChatsListResult,\n AppsChatsWatchParams,\n AppsChatsWatchResult,\n AppsChatsChangedEvent,\n AppsChatsStarParams,\n AppsChatsStarResult,\n AppsChatsHideParams,\n AppsChatsHideResult,\n AppsProjectsFileParams,\n AppsProjectsFileResult,\n AppsProjectsUnfileParams,\n AppsProjectsUnfileResult,\n AppsChatsWatchStateEvent,\n AppsChatsPlaceParams,\n AppsChatsPlaceResult,\n AppsProjectsFileManyParams,\n AppsProjectsFileManyResult,\n AppsProjectsUpdateParams,\n AppsProjectsUpdateResult,\n AppsProjectsCopyParams,\n AppsProjectsCopyResult,\n ChatFamily,\n AppWindowInfo,\n WindowRemoteControl,\n AppsWindowsSetRemoteControlParams,\n AppsWindowsSetRemoteControlResult,\n AppsChatsCopyToAccountParams,\n CopiedChat,\n CopyReopened,\n CopyRestart,\n AppsChatsCopyToAccountResult,\n AccountUsage,\n AccountReset,\n AppsWindowsListParams,\n AppsWindowsListResult,\n AppsAccountsUsageParams,\n AppsAccountsUsageResult,\n AppsAccountsResetsParams,\n AppsAccountsResetsResult,\n AppsWindowActionResult,\n AppsWindowsOpenParams,\n AppsWindowsReloadParams,\n AppsWindowsRestartParams,\n AppsWindowsRefreshUsageParams,\n AppsProjectsMoveParams,\n AppsProjectsMoveResult,\n AppsProjectsCreateParams,\n AppsProjectsCreateResult,\n AppsProjectsImportPinsParams,\n AppsProjectsImportPinsResult,\n ProjectMoveChat,\n ProjectMoveSkip,\n ProjectMoveGroup,\n ProjectMovePin,\n AppsProjectsToWindowParams,\n AppsProjectsToWindowResult,\n ShownSection,\n AppsWindowsShownParams,\n AppsWindowsShownResult,\n ProjectMoveOutcome,\n WindowGroup,\n AppsWindowsGroupsParams,\n AppsWindowsGroupsResult,\n ColdChat,\n AppsChatsColdParams,\n AppsChatsColdResult,\n AppsChatsOpenParams,\n TitleCopies,\n TitleMismatch,\n StaleTitleWindow,\n AppsChatsTitlesCheckParams,\n AppsChatsTitlesCheckResult,\n AppsChatsTitlesPushParams,\n AppsChatsTitlesPushResult,\n AppsChatsBringBackParams,\n AppsChatsBringBackResult,\n AppsChatsTidyUpParams,\n AppsChatsTidyUpResult,\n TidyUpFacet,\n TidyUpRestart,\n SpendSplit,\n SpendScopes,\n SpendAccount,\n SpendModel,\n SpendChat,\n SpendHelper,\n SpendLive,\n SpendIdleScope,\n SpendIdle,\n SpendStart,\n SpendDay,\n AppsSpendParams,\n AppsSpendResult,\n AppsSyncStatusParams,\n AppsSyncStatusResult,\n AppsSyncRunParams,\n AppsWindowsProcessesParams,\n AppsWindowsProcessesResult,\n AppsWindowsAddParams,\n AppsWindowsSaveNamesParams,\n GitOutputResult,\n GitStatusParams,\n GitStatusFile,\n GitStatusResult,\n GitDiffParams,\n GitDiffResult,\n GitLogParams,\n GitLogCommit,\n GitLogResult,\n GitAddParams,\n GitCommitParams,\n GitCommitResult,\n GitPushParams,\n GitPullParams,\n GitBranchParams,\n GitBranchResult,\n GitStashParams,\n GitCloneParams,\n WebHeader,\n WebFetchParams,\n WebFetchResult,\n WebScrapeParams,\n WebScrapePage,\n WebScrapeResult,\n WebSearchParams,\n WebSearchHit,\n WebSearchQueryResult,\n WebSearchResult,\n ToolsWebSearchParams,\n WebBrowserFetchParams,\n WebBrowserFetchResult,\n WebAttachTarget,\n WebLand,\n WebNotSavedReason,\n WebSourceNotice,\n WebSourceState,\n ToolsParseFile,\n ToolsWebScrapeParams,\n ToolsWebScrapePage,\n ToolsWebScrapeResult,\n ToolsWebBrowserFetchParams,\n ToolsWebBrowserFetchResult,\n WebRuntimeStateName,\n WebRuntimeParams,\n WebRuntimeState,\n WebOutboxItem,\n WebOutboxListParams,\n WebOutboxListResult,\n WebOutboxRetryParams,\n WebOutboxRetryResult,\n WebOutboxDiscardParams,\n WebOutboxDiscardResult,\n WebLogVia,\n WebLogCaller,\n WebLogResult,\n WebLogEntry,\n WebLogListParams,\n WebLogListResult,\n WebLogClearParams,\n WebLogClearResult,\n WebProgressEvent,\n WebResearchItemState,\n WebResearchItem,\n WebResearchQueueParams,\n WebResearchQueueResult,\n WebResearchFetchParams,\n WebResearchFetchResult,\n ToolsServiceProgress,\n AccountRowId,\n AccountReadState,\n AccountAgent,\n AccountAgentsListParams,\n AccountAgentsListResult,\n VaultItemKind,\n VaultFieldSummary,\n VaultItemSummary,\n AccountVaultListParams,\n AccountVaultListResult,\n AccountVaultCopyParams,\n AccountVaultCopyResult,\n AccountAgentVariable,\n AccountAgentDetail,\n AccountAgentsGetParams,\n AccountAgentsGetResult,\n AccountAgentRunStatus,\n AccountAgentRun,\n AccountAgentRunSort,\n AccountAgentsRunsParams,\n AccountAgentsRunsResult,\n AccountAgentsFavoriteParams,\n AccountAgentsFavoriteResult,\n AccountAgentVersion,\n AccountAgentsVersionsParams,\n AccountAgentsVersionsResult,\n AccountAgentsVersionDiffParams,\n AccountAgentsVersionDiffResult,\n AccountAgentsRestoreVersionParams,\n AccountAgentsRestoreVersionResult,\n AppsWindowsUpdateStateParams,\n AppsWindowsUpdateStateResult,\n AppsWindowsReopenParams,\n AppsWindowsReopenResult,\n AppsWindowsUpdateAndReopenParams,\n AppsWindowsUpdateAndReopenResult,\n BrowserClientInstance,\n BrowserKind,\n BrowserSessionState,\n BrowserSession,\n BrowserRegisterParams,\n BrowserRegisterResult,\n BrowserCallError,\n BrowserResultParams,\n BrowserResultResult,\n BrowserCallPhase,\n BrowserProgressParams,\n BrowserProgressResult,\n BrowserSessionsParams,\n BrowserSessionsResult,\n BrowserDisconnectParams,\n BrowserDisconnectResult,\n BrowserSetEnabledParams,\n BrowserSetEnabledResult,\n BrowserPairCodeParams,\n BrowserPairCodeResult,\n BrowserPairResetParams,\n BrowserCallParams,\n BrowserCallResult,\n BrowserInvokeEvent,\n BrowserSessionsChangedEvent,\n BrowserProgressEvent,\n DesktopHealth,\n BrowserPairRequest,\n BrowserPairResult,\n BrowserToolMetricsParams,\n BrowserToolMetric,\n BrowserToolMetricsResult,\n BrowserResetCountersParams,\n BrowserResetCountersResult,\n BrowserLogParams,\n BrowserLogMessage,\n BrowserLogResult,\n NetInfoParams,\n NetAddress,\n NetInterface,\n NetInfoResult,\n NetWifiParams,\n NetWifiNetwork,\n NetWifiResult,\n NetBluetoothParams,\n NetBluetoothDevice,\n NetBluetoothResult,\n NetDevicesParams,\n NetDevice,\n NetDevicesResult,\n NetMdnsParams,\n NetMdnsService,\n NetMdnsResult,\n NetScanParams,\n NetScanResult,\n NetDownloadParams,\n NetDownloadResult,\n AutomationScriptParams,\n AutomationScriptResult,\n MailAccountsParams,\n MailAccount,\n MailAccountsResult,\n MailListParams,\n MailMessage,\n MailListResult,\n MailSendParams,\n MailSendResult,\n OutlookStatusParams,\n OutlookAccount,\n OutlookStatusResult,\n OutlookDraftParams,\n OutlookDraftResult,\n OutlookListParams,\n OutlookMessage,\n OutlookListResult,\n OutlookReadParams,\n OutlookReadResult,\n MessagesChatsParams,\n MessagesChat,\n MessagesChatsResult,\n MessagesListParams,\n MessagesMessage,\n MessagesListResult,\n MessagesSendParams,\n MessagesSendResult,\n ContactsSearchParams,\n ContactLabeled,\n ContactSummary,\n ContactsSearchResult,\n ContactsGetParams,\n ContactDetail,\n ContactsGetResult,\n CalendarListParams,\n CalendarEvent,\n CalendarListResult,\n CalendarCreateParams,\n CalendarCreateResult,\n RemindersListParams,\n Reminder,\n RemindersListResult,\n RemindersCreateParams,\n RemindersCreateResult,\n PhotosSearchParams,\n Photo,\n PhotosSearchResult,\n PhotosGetParams,\n PhotosGetResult,\n LocationGetParams,\n LocationGetResult,\n RegistryValueType,\n WindowsRegistryReadParams,\n RegistryValue,\n WindowsRegistryReadResult,\n WindowsRegistryWriteParams,\n WindowsRegistryWriteResult,\n WindowsServicesParams,\n WindowsService,\n WindowsServicesResult,\n WindowsServiceControlParams,\n WindowsServiceControlResult,\n WindowsEventLogParams,\n WindowsEvent,\n WindowsEventLogResult,\n WindowsFeaturesParams,\n WindowsFeature,\n WindowsFeaturesResult,\n ScheduleCreateParams,\n ScheduleRun,\n ScheduledTask,\n ScheduleCreateResult,\n ScheduleListParams,\n ScheduleListResult,\n ScheduleCancelParams,\n ScheduleCancelResult,\n NotesFoldersParams,\n NotesFolder,\n NotesFoldersResult,\n NotesListParams,\n NoteEntry,\n NotesListResult,\n NotesReadParams,\n NotesReadResult,\n NotesWriteParams,\n NotesWriteResult,\n NotesSearchParams,\n NotesMatch,\n NotesSearchResult,\n DocumentsPdfTextParams,\n DocumentsPdfPage,\n DocumentsPdfTextResult,\n DocumentsOcrParams,\n DocumentsOcrLine,\n DocumentsOcrResult,\n DocumentsImageResizeParams,\n DocumentsImageResizeResult,\n DocumentsParagraph,\n DocumentsSheet,\n DocumentsOfficeGenerateParams,\n DocumentsOfficeGenerateResult,\n EntitiesNerParams,\n EntitySpan,\n EntitiesNerResult,\n PiiKind,\n EntitiesPiiParams,\n EntitiesPiiResult,\n} as const satisfies Record<string, z.ZodType>;\n\nexport type NamedSchemaId = keyof typeof NAMED_SCHEMAS;\n","/**\n * Version skew is the normal state: a phone, the server and a desktop app in the field run\n * different package versions, and a minor protocol bump must never make any of them fail.\n *\n * THE RULE (enforced by src/versioning.test.ts against generated/baseline-1.0.json):\n * 1. Within a major, a minor may only ADD. A field added after x.0 is OPTIONAL in the schema\n * (an older peer omits it) and is listed in FIELDS_SINCE with the minor that added it.\n * 2. A writer never sends a field newer than the version its peer negotiated (hello/welcome, or\n * the /call version header): older peers' strict schemas refuse unknown keys. `forPeer`\n * does the stripping; the core's Router applies it to every result and error it sends.\n * 3. A reader that needs a newer field checks the peer's version and says so loudly when the\n * peer is older (e.g. aidream's local_proxy marks a patch answer from a 1.0 app).\n */\nimport { compareVersions } from \"@ai-matrx/kit/versions\";\n\nimport type { OpName } from \"./schema/registry\";\nimport type { ErrorReasonName } from \"./types\";\nimport { PROTOCOL_MAJOR, PROTOCOL_MINOR } from \"./schema/primitives\";\n\n/**\n * Fields added after x.0, by schema location: a named schema (`FsPatchResult`), a property path\n * inside one (`ProtocolErrorBody.data`), or a union branch (`RelayCallResponse|0`).\n */\nexport const FIELDS_SINCE = {\n LlmRunning: { context_length: \"1.48\", gpu_layers: \"1.48\", threads: \"1.48\" },\n TextModelInfo: { title: \"1.69\", problem: \"1.69\" },\n MlCatalogSetParams: { unusable: \"1.69\" },\n ModelsLlmStartParams: { gpu_layers: \"1.48\", threads: \"1.48\", load_timeout_s: \"1.48\" },\n FsPatchResult: { edits_applied: \"1.1\", edits_failed: \"1.1\" },\n \"ProtocolErrorBody.data\": { edits_failed: \"1.1\" },\n \"RelayCallResponse|0\": { protocol_version: \"1.1\" },\n \"RelayCallResponse|1\": { protocol_version: \"1.1\" },\n WindowInfo: { app: \"1.7\", pid: \"1.7\" },\n AppWindowInfo: { remote_control: \"1.50\" },\n WindowRemoteControl: { problem: \"1.52\" },\n CodingProviderStatus: { accounts: \"1.53\", accountsProblem: \"1.53\", usage: \"1.57\", continueOn: \"1.57\" },\n CodingProviderAccount: { ready: \"1.57\", lastProblem: \"1.57\", problem: \"1.57\", fix: \"1.57\", usage: \"1.57\", continueOn: \"1.57\" },\n CodingSessionRecord: { accountId: \"1.57\" },\n CodingDiscoveredChat: { accountId: \"1.57\" },\n CodingRecentRow: { accountId: \"1.57\" },\n CodingSearchHit: { accountId: \"1.57\" },\n AppInstance: { missing: \"1.63\" },\n AppsInstancesListParams: { fresh: \"1.51\" },\n AppsInstancesListResult: { as_of_ms: \"1.51\", refreshing: \"1.51\", computer: \"1.71\", elsewhere: \"1.71\", shared_problem: \"1.71\" },\n AppsAccountsListParams: { fresh: \"1.51\" },\n AppsAccountsListResult: { as_of_ms: \"1.51\", refreshing: \"1.51\", shared_problem: \"1.71\" },\n AppsChatsListResult: { updating: \"1.9\", live: \"1.9\", families: \"1.10\" },\n AppsAccountsUsageResult: { problem: \"1.12\" },\n AppsAccountsResetsResult: { problem: \"1.12\" },\n ColdChat: { hidden: \"1.78\" },\n SpendChat: { hidden: \"1.78\" },\n SpendLive: { hidden: \"1.78\" },\n SpendIdle: { hidden: \"1.78\" },\n ChatRow: { app_project: \"1.13\", tokens: \"1.13\", original_title: \"1.14\", title_source: \"1.14\", title_override: \"1.14\", archived: \"1.15\", session_id: \"1.59\", app_groups: \"1.59\", parent: \"1.59\", prior_sessions: \"1.59\", title_sync: \"1.61\", moved: \"1.62\", home: \"1.63\", hidden: \"1.70\", pin_sync: \"1.72\" },\n AccountUsage: { plan: \"1.13\", credits: \"1.13\", five_hour_resets_by_ms: \"1.25\", read_source: \"1.73\" },\n AppAccount: { profile: \"1.73\", read_source: \"1.73\", session_cost_usd: \"1.73\" },\n ResourcesDisk: { name: \"1.17\" },\n StackServer: { cpu_percent: \"1.18\", memory_bytes: \"1.18\" },\n AudioDevice: { kind: \"1.24\" },\n AudioRecordParams: { channels: \"1.66\", sample_rate: \"1.66\" },\n AudioRecordResult: { channels: \"1.66\", sample_rate: \"1.66\" },\n AudioPlayParams: { device_id: \"1.66\" },\n WindowListParams: { app: \"1.66\" },\n WindowMinimizeParams: { mode: \"1.66\" },\n WindowMinimizeResult: { mode: \"1.66\" },\n ScreenDisplay: { rotation: \"1.24\", refresh_hz: \"1.24\", builtin: \"1.24\" },\n PowerStatusResult: { energy: \"1.24\" },\n AppsSpendResult: { days: \"1.24\" },\n AppsWindowsUpdateStateResult: { closed_by_update: \"1.27\" },\n AppsProjectsToWindowParams: { pin: \"1.32\", chat_ids: \"1.36\", take_off_from: \"1.36\", group_id: \"1.43\", group_name: \"1.43\" },\n AppsProjectsToWindowResult: { pin: \"1.32\", chats: \"1.43\" },\n ProjectMoveGroup: { when: \"1.43\", group_id: \"1.43\" },\n AppsChatsTitlesCheckResult: { stale_windows: \"1.33\" },\n AccountAgent: { tags: \"1.39\", model_id: \"1.39\", access_level: \"1.39\", organization_id: \"1.39\", origin: \"1.39\", is_archived: \"1.39\", orchestra: \"1.39\" },\n WebScrapeParams: { engine: \"1.40\", land: \"1.40\" },\n WebScrapePage: { source: \"1.40\" },\n WebBrowserFetchParams: { land: \"1.40\" },\n WebBrowserFetchResult: { source: \"1.40\" },\n SysinfoGetResult: { requirements: \"1.41\" },\n \"SysinfoGetResult.permissions[]\": { detail: \"1.41\" },\n MessagesSendParams: { service: \"1.42\" },\n // 1.67: Matrx Local's local_mac_apps and local_windows_ps contracts, carried whole.\n MailAccount: { mailboxes: \"1.67\" },\n MailSendParams: { bcc: \"1.67\" },\n MessagesChat: { last_message: \"1.67\" },\n MessagesListParams: { contact: \"1.67\", unread_only: \"1.67\" },\n MessagesMessage: { read: \"1.67\", service: \"1.67\", chat_name: \"1.67\" },\n CalendarListParams: { calendars: \"1.67\" },\n CalendarEvent: { url: \"1.67\" },\n RemindersListParams: { lists: \"1.67\" },\n Reminder: { priority: \"1.67\", completed_at_ms: \"1.67\" },\n PhotosSearchParams: { media_type: \"1.67\" },\n Photo: { media_type: \"1.67\", duration_s: \"1.67\" },\n PhotosGetParams: { thumbnail_size: \"1.67\" },\n PhotosGetResult: { thumbnail_png_base64: \"1.67\" },\n LocationGetResult: { altitude_m: \"1.67\", vertical_accuracy_m: \"1.67\", speed_mps: \"1.67\", course_deg: \"1.67\" },\n WindowsServicesParams: { status: \"1.67\" },\n WindowsEventLogParams: { source: \"1.67\" },\n WindowsFeaturesParams: { installed_only: \"1.67\" },\n SysinfoHardwareResult: { graphics: \"1.45\" },\n DownloadRow: { error: \"1.46\" },\n CopyRestart: { reopened: \"1.60\" },\n AccountAgentsRestoreVersionResult: { new_version: \"1.68\", unchanged: \"1.68\" },\n} as const satisfies Record<string, Record<string, `${number}.${number}`>>;\n\nexport type FieldsSincePath = keyof typeof FIELDS_SINCE;\n\n/**\n * 1.0 fields that a later minor lets be null, and what a peer older than that minor is sent\n * instead (the value that meant the same thing before). Widening a field any other way is a major.\n */\nexport const NULL_SINCE = {\n \"RelayDeviceStatusEvent.since_ms\": { since: \"1.1\", olderPeersGet: 0 },\n} as const satisfies Record<string, { since: `${number}.${number}`; olderPeersGet: unknown }>;\n\n/**\n * Error reasons added after x.0, with the minor that added each. An older peer's strict enum would\n * refuse the whole error body, so `forPeer` drops a reason the peer does not know (the code, the\n * message and `retryable` still tell it what happened).\n */\nexport const REASONS_SINCE = {\n runtime_not_installed: \"1.2\",\n model_not_installed: \"1.2\",\n unsupported_media: \"1.2\",\n download_failed: \"1.2\",\n service_starting: \"1.2\",\n service_restarted: \"1.2\",\n service_failed: \"1.2\",\n browser_not_connected: \"1.28\",\n browser_ambiguous: \"1.28\",\n browser_account_mismatch: \"1.28\",\n browser_connection_off: \"1.28\",\n awaiting_confirmation: \"1.28\",\n tool_disabled_on_device: \"1.34\",\n model_not_running: \"1.76\",\n model_server_unreachable: \"1.76\",\n} as const satisfies Partial<Record<ErrorReasonName, `${number}.${number}`>>;\n\n/**\n * (1.41) Values a later minor added to an enum a peer reads inside a list, by the minor that added\n * each: sysinfo.get's permission names. An older peer's strict enum would refuse the whole answer,\n * so `forPeer` leaves out the rows it does not know (it is never sent a name it cannot read).\n */\nexport const PERMISSIONS_SINCE = {\n reminders: \"1.41\",\n speech_recognition: \"1.41\",\n messages: \"1.41\",\n mail: \"1.41\",\n wifi: \"1.41\",\n} as const satisfies Record<string, `${number}.${number}`>;\n\nfunction permissionsForPeer(value: unknown, version: string): unknown {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) return value;\n const body = value as { permissions?: unknown };\n if (!Array.isArray(body.permissions)) return value;\n const since = PERMISSIONS_SINCE as Record<string, string>;\n const kept = body.permissions.filter((p: unknown) => {\n const name = (p as { name?: unknown } | null)?.name;\n const added = typeof name === \"string\" ? since[name] : undefined;\n return !added || knows(version, added);\n });\n return kept.length === body.permissions.length ? value : { ...body, permissions: kept };\n}\n\n/** A device status for a reader at `version`: `since_ms` null (\"never\") becomes 0 before 1.1. */\nexport function statusForPeer<T extends { since_ms: number | null }>(status: T, version: string): T {\n const rule = NULL_SINCE[\"RelayDeviceStatusEvent.since_ms\"];\n return status.since_ms === null && !knows(version, rule.since) ? { ...status, since_ms: rule.olderPeersGet } : status;\n}\n\n/**\n * A WebSocket client announces the newest minor it reads at connect time by also offering\n * `matrx.v<major>.<minor>` beside SUBPROTOCOL (servers still answer SUBPROTOCOL). Before hello is\n * possible, this is how the relay picks the right shape for its greeting.\n */\nexport function versionSubprotocol(version: string): string {\n return `matrx.v${version}`;\n}\n\n/** The version a client announced in its offered subprotocols; \"1.0\" when it did not. */\nexport function announcedVersion(offered: readonly string[]): string {\n let best = `${PROTOCOL_MAJOR}.0`;\n for (const p of offered) {\n const m = /^matrx\\.v(\\d+\\.\\d+)$/.exec(p.trim());\n if (m?.[1] && compareVersions(m[1], best) > 0 && m[1].startsWith(`${PROTOCOL_MAJOR}.`)) best = m[1];\n }\n return best;\n}\n\n/** True when a peer at `version` knows a field added in `since`. */\nexport function knows(version: string, since: string): boolean {\n return compareVersions(version, since) >= 0;\n}\n\n/** The version two peers speak: the lower minor within this major. */\nexport function negotiate(peerVersion: string): string {\n const [major = 0, minor = 0] = peerVersion.split(\".\").map(Number);\n if (major !== PROTOCOL_MAJOR) return `${PROTOCOL_MAJOR}.0`;\n return `${PROTOCOL_MAJOR}.${Math.min(minor, PROTOCOL_MINOR)}`;\n}\n\nfunction strip(value: unknown, fields: Record<string, string> | undefined, version: string): unknown {\n if (!fields || value === null || typeof value !== \"object\" || Array.isArray(value)) return value;\n let out: Record<string, unknown> | null = null;\n for (const [field, since] of Object.entries(fields)) {\n if (field in (value as object) && !knows(version, since)) {\n out ??= { ...(value as Record<string, unknown>) };\n delete out[field];\n }\n }\n return out ?? value;\n}\n\nconst RESULT_PATH = new Map<OpName, FieldsSincePath>([\n [\"fs.patch\", \"FsPatchResult\"],\n [\"apps.chats.list\", \"AppsChatsListResult\"],\n [\"apps.accounts.usage\", \"AppsAccountsUsageResult\"],\n [\"apps.accounts.resets\", \"AppsAccountsResetsResult\"],\n [\"apps.windows.update_state\", \"AppsWindowsUpdateStateResult\"],\n [\"web.fetch_with_browser\", \"WebBrowserFetchResult\"],\n [\"sysinfo.get\", \"SysinfoGetResult\"],\n [\"sysinfo.hardware\", \"SysinfoHardwareResult\"],\n [\"apps.projects.to_window\", \"AppsProjectsToWindowResult\"],\n // 1.67: Matrx Local's local_mac_apps result fields.\n [\"photos.get\", \"PhotosGetResult\"],\n [\"location.get\", \"LocationGetResult\"],\n [\"account.agents.restore_version\", \"AccountAgentsRestoreVersionResult\"],\n]);\n\n/** 1.13: results that carry a named schema with versioned fields under a key (one object or an array of them). */\nconst NESTED_RESULTS: ReadonlyMap<OpName, ReadonlyArray<readonly [string, FieldsSincePath]>> = new Map<OpName, ReadonlyArray<readonly [string, FieldsSincePath]>>([\n [\"apps.chats.list\", [[\"chats\", \"ChatRow\"]]],\n [\"apps.projects.file\", [[\"chat\", \"ChatRow\"]]],\n [\"apps.projects.file_many\", [[\"chats\", \"ChatRow\"]]],\n [\"apps.projects.unfile\", [[\"chat\", \"ChatRow\"]]],\n [\"apps.projects.move\", [[\"chat\", \"ChatRow\"]]],\n [\"apps.chats.star\", [[\"chat\", \"ChatRow\"]]],\n // 1.78: our Hide on the cold and spend rows.\n [\"apps.chats.cold\", [[\"waiting\", \"ColdChat\"], [\"recently_cold\", \"ColdChat\"]]],\n [\"apps.spend\", [[\"chats\", \"SpendChat\"], [\"live\", \"SpendLive\"], [\"idle\", \"SpendIdle\"]]],\n [\"apps.chats.place\", [[\"chat\", \"ChatRow\"]]],\n [\"apps.accounts.usage\", [[\"accounts\", \"AccountUsage\"]]],\n [\"resources.snapshot\", [[\"disks\", \"ResourcesDisk\"]]],\n [\"stack.state\", [[\"servers\", \"StackServer\"]]],\n [\"account.agents.list\", [[\"agents\", \"AccountAgent\"]]],\n [\"web.scrape\", [[\"pages\", \"WebScrapePage\"]]],\n [\"sysinfo.get\", [[\"permissions\", \"SysinfoGetResult.permissions[]\"]]],\n [\"models.downloads.list\", [[\"downloads\", \"DownloadRow\"]]],\n [\"apps.projects.to_window\", [[\"group\", \"ProjectMoveGroup\"]]],\n // 1.60: each closed window's reopen outcome in a restart_verify copy.\n [\"apps.chats.copy_to_account\", [[\"restart\", \"CopyRestart\"]]],\n [\"apps.windows.list\", [[\"windows\", \"AppWindowInfo\"]]],\n // 1.63: what an instance record still lacks.\n [\"apps.instances.list\", [[\"instances\", \"AppInstance\"]]],\n [\"apps.windows.set_remote_control\", [[\"remote_control\", \"WindowRemoteControl\"]]],\n // 1.67: Matrx Local's local_mac_apps result fields.\n [\"mail.accounts\", [[\"accounts\", \"MailAccount\"]]],\n [\"messages.chats\", [[\"chats\", \"MessagesChat\"]]],\n [\"messages.list\", [[\"messages\", \"MessagesMessage\"]]],\n [\"calendar.list\", [[\"events\", \"CalendarEvent\"]]],\n [\"reminders.list\", [[\"reminders\", \"Reminder\"]]],\n [\"photos.search\", [[\"photos\", \"Photo\"]]],\n [\"photos.get\", [[\"photo\", \"Photo\"]]],\n [\"coding.providers\", [[\"providers\", \"CodingProviderStatus\"]]],\n // 1.57: the account a coding record belongs to.\n [\"coding.sessions.list\", [[\"sessions\", \"CodingSessionRecord\"], [\"recent\", \"CodingRecentRow\"]]],\n [\"coding.recent.seen\", [[\"recent\", \"CodingRecentRow\"]]],\n [\"coding.discover\", [[\"chats\", \"CodingDiscoveredChat\"]]],\n [\"coding.search\", [[\"hits\", \"CodingSearchHit\"]]],\n [\"coding.start\", [[\"session\", \"CodingSessionRecord\"]]],\n [\"coding.send\", [[\"session\", \"CodingSessionRecord\"]]],\n [\"coding.takeover\", [[\"session\", \"CodingSessionRecord\"]]],\n [\"coding.options.set\", [[\"session\", \"CodingSessionRecord\"]]],\n [\"coding.agent.set\", [[\"session\", \"CodingSessionRecord\"]]],\n [\"coding.account.continue\", [[\"session\", \"CodingSessionRecord\"]]],\n]);\n\nfunction stripNested(value: unknown, nested: ReadonlyArray<readonly [string, FieldsSincePath]>, version: string): unknown {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) return value;\n let body = value as Record<string, unknown>;\n for (const [key, path] of nested) {\n const inner = body[key];\n if (inner === undefined || inner === null) continue;\n const fields = FIELDS_SINCE[path];\n if (Array.isArray(inner)) {\n const next = inner.map((x: unknown) => strip(x, fields, version));\n if (next.some((x, i) => x !== inner[i])) body = { ...body, [key]: next };\n } else {\n const next = strip(inner, fields, version);\n if (next !== inner) body = { ...body, [key]: next };\n }\n }\n return body;\n}\n\n/**\n * (1.52) apps.windows.list for a peer older than 1.52: each window's `remote_control` loses `problem`,\n * and a window whose settings file is damaged (\"unreadable\", a value its strict enum does not know)\n * has no `remote_control` at all (not known) instead of failing the whole list.\n */\nfunction windowListRemoteControlForPeer(value: unknown, version: string): unknown {\n if (knows(version, \"1.52\") || value === null || typeof value !== \"object\") return value;\n const body = value as { windows?: unknown };\n if (!Array.isArray(body.windows)) return value;\n const windows: unknown[] = body.windows;\n const next = windows.map((w: unknown) => {\n const rc = (w as { remote_control?: unknown } | null)?.remote_control;\n if (rc === null || typeof rc !== \"object\") return w;\n if ((rc as { setting?: unknown }).setting === \"unreadable\") {\n const { remote_control: _dropped, ...rest } = w as Record<string, unknown>;\n return rest;\n }\n const kept = strip(rc, FIELDS_SINCE.WindowRemoteControl, version);\n return kept === rc ? w : { ...(w as Record<string, unknown>), remote_control: kept };\n });\n return next.some((w, i) => w !== windows[i]) ? { ...body, windows: next } : value;\n}\n\n/**\n * coding.providers, one level below the providers:\n * (1.54) for a peer older than 1.54, a default model whose source is \"account\" (a value its strict\n * enum does not know) is sent as \"driver\" (the app picked it, not the person's settings\n * file), instead of failing the whole answer;\n * (1.57) each of a provider's `accounts` loses the fields newer than the peer (its health, usage\n * and \"Continue on\").\n */\nfunction providersForPeer(value: unknown, version: string): unknown {\n if (knows(version, \"1.57\") || value === null || typeof value !== \"object\") return value;\n const body = value as { providers?: unknown };\n if (!Array.isArray(body.providers)) return value;\n const providers: unknown[] = body.providers;\n const next = providers.map((p: unknown) => {\n if (p === null || typeof p !== \"object\") return p;\n let out = p as Record<string, unknown>;\n const dm = out.defaultModel;\n if (!knows(version, \"1.54\") && dm !== null && typeof dm === \"object\" && (dm as { source?: unknown }).source === \"account\") {\n out = { ...out, defaultModel: { ...(dm as Record<string, unknown>), source: \"driver\" } };\n }\n const accounts = out.accounts;\n if (Array.isArray(accounts)) {\n const kept = accounts.map((a: unknown) => strip(a, FIELDS_SINCE.CodingProviderAccount, version));\n if (kept.some((a, i) => a !== accounts[i])) out = { ...out, accounts: kept };\n }\n return out;\n });\n return next.some((p, i) => p !== providers[i]) ? { ...body, providers: next } : value;\n}\n\n/**\n * (1.65) coding.history / coding.transcript.read for a peer older than 1.65: a `continued` item (a\n * kind its strict union does not know, which would refuse the whole transcript) is sent as the\n * info `notice` it was before (\"Continued from Alpha\").\n */\nfunction transcriptItemsForPeer(value: unknown, version: string): unknown {\n if (knows(version, \"1.65\") || value === null || typeof value !== \"object\") return value;\n const body = value as { items?: unknown };\n if (!Array.isArray(body.items)) return value;\n const items: unknown[] = body.items;\n const next = items.map((item: unknown) => {\n const it = item as { kind?: unknown; id?: unknown; text?: unknown } | null;\n if (it?.kind !== \"continued\") return item;\n return { kind: \"notice\", id: it.id, level: \"info\", text: it.text };\n });\n return next.some((it, i) => it !== items[i]) ? { ...body, items: next } : value;\n}\n\n/** Results that carry WindowInfo (window.list's `windows`, focus/move's `window`). */\nconst WINDOW_RESULTS: ReadonlyMap<OpName, \"windows\" | \"window\"> = new Map([\n [\"window.list\", \"windows\"],\n [\"window.focus\", \"window\"],\n [\"window.move\", \"window\"],\n]);\n\nfunction stripWindows(value: unknown, key: \"windows\" | \"window\", version: string): unknown {\n if (value === null || typeof value !== \"object\") return value;\n const body = value as Record<string, unknown>;\n const inner = body[key];\n if (inner === undefined) return value;\n const fields = FIELDS_SINCE.WindowInfo;\n if (Array.isArray(inner)) {\n const next = inner.map((w: unknown) => strip(w, fields, version));\n return next.some((w, i) => w !== inner[i]) ? { ...body, [key]: next } : value;\n }\n const next = strip(inner, fields, version);\n return next === inner ? value : { ...body, [key]: next };\n}\n\n/**\n * What to send a peer that negotiated `version`: `result` of `op`, or an error body, with every\n * field newer than that version removed (rule 2). Unchanged for a current peer.\n */\nexport function forPeer(op: OpName, part: \"result\", value: unknown, version: string): unknown;\nexport function forPeer(op: OpName | null, part: \"error\", value: unknown, version: string): unknown;\nexport function forPeer(op: OpName | null, part: \"result\" | \"error\", value: unknown, version: string): unknown {\n if (part === \"result\") {\n const windowKey = op ? WINDOW_RESULTS.get(op) : undefined;\n if (windowKey) return stripWindows(value, windowKey, version);\n const path = op ? RESULT_PATH.get(op) : undefined;\n const known = op === \"sysinfo.get\" ? permissionsForPeer(value, version) : value;\n const top = path ? strip(known, FIELDS_SINCE[path], version) : known;\n const nested = op ? NESTED_RESULTS.get(op) : undefined;\n const stripped = nested ? stripNested(top, nested, version) : top;\n if (op === \"coding.providers\") return providersForPeer(stripped, version);\n if (op === \"coding.history\" || op === \"coding.transcript.read\") return transcriptItemsForPeer(stripped, version);\n return op === \"apps.windows.list\" ? windowListRemoteControlForPeer(stripped, version) : stripped;\n }\n if (value === null || typeof value !== \"object\") return value;\n const body = value as { data?: unknown };\n if (body.data === undefined) return value;\n let data = strip(body.data, FIELDS_SINCE[\"ProtocolErrorBody.data\"], version);\n const reason = (data as { reason?: unknown }).reason;\n const reasonSince = typeof reason === \"string\" ? (REASONS_SINCE as Record<string, string>)[reason] : undefined;\n if (reasonSince && !knows(version, reasonSince)) {\n const { reason: _dropped, ...rest } = data as Record<string, unknown>;\n data = rest;\n }\n return data === body.data ? value : { ...body, data };\n}\n\n/** Every op whose result has a versioned field is wired into forPeer (checked by the test). */\nexport const VERSIONED_RESULT_OPS: readonly OpName[] = [...new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];\n","/**\n * What a connecting side does after each WebSocket close — the ONE table every client reads (the\n * package client, the desktop's relay transport, any other dialer). Never keep a local list of\n * \"terminal\" codes: a code added to CloseCode without a rule here fails to compile.\n *\n * reconnect_now the far side went away on purpose or the socket died; dial again at once if the\n * connection had opened, with backoff otherwise (a dead network never spins).\n * reconnect transient refusal; dial again with backoff.\n * reauth the token was refused; get a FRESH token and dial once more. A second refusal in\n * a row (no successful open between) is terminal with outcome \"signed_out\".\n * stop retrying cannot help: stop dialing until something changes (a new sign-in, a\n * new device, an update) and show the outcome.\n */\nimport type { ErrorCodeName } from \"./types\";\nimport { CloseCode, type CloseCodeValue } from \"./schema/envelope\";\n\nexport type CloseAction = \"reconnect_now\" | \"reconnect\" | \"reauth\" | \"stop\";\n\n/** The one state a person is shown when dialing stops. */\nexport type CloseOutcome = \"signed_out\" | \"not_owned\" | \"removed\" | \"revoked\" | \"replaced\" | \"upgrade_required\";\n\nexport interface CloseRule {\n readonly action: CloseAction;\n /** Set for `stop` and `reauth` (the outcome when the fresh token is refused too). */\n readonly outcome?: CloseOutcome;\n /** The error a caller's pending work is failed with. */\n readonly error: readonly [ErrorCodeName, string];\n}\n\nexport const CLOSE_RULES = {\n [CloseCode.NORMAL]: { action: \"reconnect\", error: [\"DEVICE_OFFLINE\", \"Connection closed\"] },\n [CloseCode.GOING_AWAY]: { action: \"reconnect_now\", error: [\"DEVICE_OFFLINE\", \"Connection lost\"] },\n [CloseCode.ABNORMAL]: { action: \"reconnect_now\", error: [\"DEVICE_OFFLINE\", \"Connection lost\"] },\n [CloseCode.DEVICE_RECONNECTED]: { action: \"reconnect_now\", error: [\"DEVICE_OFFLINE\", \"Device reconnected\"] },\n [CloseCode.TRY_AGAIN_LATER]: { action: \"reconnect\", error: [\"DEVICE_OFFLINE\", \"Relay busy; retrying\"] },\n [CloseCode.AUTH_INVALID]: { action: \"reauth\", outcome: \"signed_out\", error: [\"AUTH_INVALID\", \"Sign-in was not accepted\"] },\n [CloseCode.AUTH_FORBIDDEN]: { action: \"stop\", outcome: \"not_owned\", error: [\"AUTH_FORBIDDEN\", \"Not this device's owner\"] },\n [CloseCode.DEVICE_NOT_FOUND]: { action: \"stop\", outcome: \"removed\", error: [\"NOT_FOUND\", \"Device not found\"] },\n [CloseCode.AUTH_EXPIRED]: { action: \"reauth\", outcome: \"signed_out\", error: [\"AUTH_EXPIRED\", \"Sign-in expired\"] },\n [CloseCode.REPLACED]: { action: \"stop\", outcome: \"replaced\", error: [\"CONFLICT\", \"Replaced by a newer connection\"] },\n [CloseCode.DEVICE_REVOKED]: { action: \"stop\", outcome: \"revoked\", error: [\"AUTH_DEVICE_REVOKED\", \"This device was revoked\"] },\n // A malformed message, or a connection the relay lost track of: a fresh socket starts clean.\n [CloseCode.PROTOCOL_ERROR]: { action: \"reconnect\", error: [\"PROTOCOL_ERROR\", \"Connection reset by the relay\"] },\n [CloseCode.UPGRADE_REQUIRED]: { action: \"stop\", outcome: \"upgrade_required\", error: [\"PROTOCOL_VERSION_UNSUPPORTED\", \"Protocol upgrade required\"] },\n} as const satisfies Record<CloseCodeValue, CloseRule>;\n\nconst UNKNOWN: CloseRule = { action: \"reconnect\", error: [\"DEVICE_OFFLINE\", \"Connection lost\"] };\n\n/** The rule for any close code; one this table does not know (or null: no close frame) reconnects with backoff. */\nexport function closeRule(code: number | null | undefined): CloseRule {\n if (code === null || code === undefined) return CLOSE_RULES[CloseCode.ABNORMAL];\n return (CLOSE_RULES as Record<number, CloseRule>)[code] ?? UNKNOWN;\n}\n\n/** True when dialing must stop after this close (no retry will help). */\nexport function isTerminalClose(code: number | null | undefined): boolean {\n return closeRule(code).action === \"stop\";\n}\n"],"mappings":";;;;;AACA,SAAS,SAAS;AAClB,SAAS,0BAA0B;AAM5B,IAAM,iBAAiB;AAmOvB,IAAM,iBAAiB;AAEvB,IAAM,mBAAmB,GAAG,cAAc,IAAI,cAAc;AAE5D,IAAM,kBAAkB,EAC5B,OAAO,EACP,MAAM,+BAA+B;AAOjC,IAAM,YAAY,EACtB,OA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EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AA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AAG,EAAE,QAAQ,QAAQ,SAAS,WAAW,OAAO,CAAC,uBAAuB,yBAAyB,EAAE;AAAA;AAAA,EAE5H,CAAC,UAAU,cAAc,GAAG,EAAE,QAAQ,aAAa,OAAO,CAAC,kBAAkB,+BAA+B,EAAE;AAAA,EAC9G,CAAC,UAAU,gBAAgB,GAAG,EAAE,QAAQ,QAAQ,SAAS,oBAAoB,OAAO,CAAC,gCAAgC,2BAA2B,EAAE;AACpJ;AAEA,IAAM,UAAqB,EAAE,QAAQ,aAAa,OAAO,CAAC,kBAAkB,iBAAiB,EAAE;AAGxF,SAAS,UAAU,MAA4C;AACpE,MAAI,SAAS,QAAQ,SAAS,OAAW,QAAO,YAAY,UAAU,QAAQ;AAC9E,SAAQ,YAA0C,IAAI,KAAK;AAC7D;AAGO,SAAS,gBAAgB,MAA0C;AACxE,SAAO,UAAU,IAAI,EAAE,WAAW;AACpC;","names":["z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","UUID_SHAPE_PATTERN","z","UUID_SHAPE_PATTERN","z","UUID_SHAPE_PATTERN","z","UUID_SHAPE_PATTERN","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","UUID_SHAPE_PATTERN","z","z","UUID_SHAPE_PATTERN","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","UUID_SHAPE_PATTERN","z","UUID_SHAPE_PATTERN","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","next"]}
|