@ai-matrx/desktop-protocol 0.21.21 → 0.21.23
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 +12 -0
- package/dist/client.cjs +171 -4
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +171 -4
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +256 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +418 -6
- package/dist/index.d.ts +418 -6
- package/dist/index.js +256 -7
- package/dist/index.js.map +1 -1
- package/dist/{models-ZQtKshfc.d.cts → models-CXjW101n.d.cts} +629 -2
- package/dist/{models-ZQtKshfc.d.ts → models-CXjW101n.d.ts} +629 -2
- package/dist/react.d.cts +261 -1
- package/dist/react.d.ts +261 -1
- package/generated/desktop-protocol.schema.json +1019 -85
- package/package.json +4 -4
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/schema/primitives.ts","../src/schema/errors.ts","../src/schema/frame.ts","../src/error.ts","../src/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/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/registry.ts","../src/versioning.ts","../src/contract.ts","../src/close-policy.ts","../src/tools/catalog.ts","../src/tools/status.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 */\nexport const PROTOCOL_MINOR = 27 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 ]);\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","/**\n * The one error type every package entry throws. It carries the wire ErrorCode (SPEC §5), so a\n * caller branches on `code`/`retryable`/`data.reason` and never parses a message. Zod-free on\n * purpose: `./frame` (the relay hot path) throws it without pulling the schema graph.\n */\nimport type { ErrorCodeName, ErrorData } from \"./types\";\n\nexport class DesktopProtocolError extends Error {\n readonly code: ErrorCodeName;\n readonly retryable: boolean;\n readonly data: ErrorData | undefined;\n\n constructor(code: ErrorCodeName, message: string, options: { retryable?: boolean; data?: ErrorData; cause?: unknown } = {}) {\n super(message, options.cause === undefined ? undefined : { cause: options.cause });\n this.name = \"DesktopProtocolError\";\n this.code = code;\n this.retryable = options.retryable ?? false;\n this.data = options.data;\n }\n\n /**\n * Any thrown value as a DesktopProtocolError, keeping its code, message and data. Each built entry\n * (`.`, `./client`, `./react`) carries its own copy of this class, so `instanceof` alone misses an\n * error thrown by a sibling entry and reports a real NOT_FOUND as INTERNAL; this checks the shape.\n */\n static from(caught: unknown): DesktopProtocolError {\n if (caught instanceof DesktopProtocolError) return caught;\n const e = caught as { name?: unknown; code?: unknown; message?: unknown; retryable?: unknown; data?: unknown } | null;\n if (e && typeof e === \"object\" && e.name === \"DesktopProtocolError\" && typeof e.code === \"string\") {\n return new DesktopProtocolError(e.code as ErrorCodeName, typeof e.message === \"string\" ? e.message : String(e.code), {\n retryable: e.retryable === true,\n ...(e.data && typeof e.data === \"object\" ? { data: e.data as ErrorData } : {}),\n cause: caught,\n });\n }\n return new DesktopProtocolError(\"INTERNAL\", caught instanceof Error ? caught.message : String(caught), { cause: caught });\n }\n\n /** The wire body (ProtocolErrorBody) — what a core or relay sends for this error. */\n toBody(): { code: ErrorCodeName; message: string; retryable: boolean; data?: ErrorData } {\n return this.data === undefined\n ? { code: this.code, message: this.message, retryable: this.retryable }\n : { code: this.code, message: this.message, retryable: this.retryable, data: this.data };\n }\n}\n\nexport function isDesktopProtocolError(value: unknown): value is DesktopProtocolError {\n return value instanceof DesktopProtocolError || (value instanceof Error && value.name === \"DesktopProtocolError\" && \"code\" in value);\n}\n","/**\n * `@ai-matrx/desktop-protocol/frame` — the 16-byte binary frame codec. ZOD-FREE by design: the\n * relay Worker's hot path imports only this entry and must stay tiny.\n *\n * off size field notes\n * 0 u8 version = 1\n * 1 u8 flags bit0 FIN (last frame of this stream), bit1 REPLAY (from ring buffer),\n * bits2-7 reserved = 0\n * 2 u8 channel see FrameChannel\n * 3 u8 reserved = 0\n * 4 u32 cid relay connection id. 0 on every client↔relay hop; the relay stamps it on\n * the relay→device hop and strips it on the way back (rewrites 4 bytes in\n * place — the relay never parses payloads).\n * 8 u32 sid stream id, announced by the core in stream{meta:{kind:\"open\",sid}}\n * 12 u32 seq per-stream frame sequence, starts at 1, strictly +1\n *\n * Big-endian. Payload length = message length − 16 (one frame = one WS binary message).\n * Python struct format: \">BBBBIII\". The zod twin (FrameHeader in the root entry, and so the JSON\n * Schema and Pydantic model) is checked against this file by src/frame.test.ts.\n */\nimport { DesktopProtocolError } from \"./error\";\n\nexport const FRAME_HEADER_BYTES = 16 as const;\nexport const FRAME_VERSION = 1 as const;\nexport const FRAME_STRUCT_FORMAT = \">BBBBIII\" as const;\nexport const FrameFlag = { FIN: 0b01, REPLAY: 0b10 } as const;\nexport const FrameChannel = {\n /** core→client: pty output, fs.read_stream bytes */\n DATA: 0,\n /** core→client: stderr of a non-pty process (reserved for exec.spawn in v1.1) */\n STDERR: 1,\n /** client→core: keystrokes / stdin to sid */\n STDIN: 2,\n /** core→client: serialized terminal screen (attach when since_seq is outside the ring) */\n SNAPSHOT: 3,\n /** relay↔device hop only: a JSON envelope carried inside a binary frame so the relay can route\n * by cid without parsing JSON. Never seen by clients. */\n ENVELOPE: 255,\n} as const;\n\nexport type FrameChannelValue = (typeof FrameChannel)[keyof typeof FrameChannel];\n\nexport interface FrameHeader {\n version: typeof FRAME_VERSION;\n /** 0..3 — FrameFlag bits. */\n flags: number;\n channel: FrameChannelValue;\n cid: number;\n sid: number;\n seq: number;\n}\n\nexport interface DecodedFrame {\n header: FrameHeader;\n /** A VIEW into the input buffer (no copy). Copy it if you keep it past the input's lifetime. */\n payload: Uint8Array;\n}\n\nconst U32_MAX = 4_294_967_295;\nconst CHANNELS: ReadonlySet<number> = new Set(Object.values(FrameChannel));\n\nfunction frameError(message: string): DesktopProtocolError {\n return new DesktopProtocolError(\"PROTOCOL_ERROR\", message);\n}\n\nfunction checkU32(name: string, value: number): void {\n if (!Number.isInteger(value) || value < 0 || value > U32_MAX) throw frameError(`frame ${name} is not a u32: ${value}`);\n}\n\n/** Validate a header without zod. Throws DesktopProtocolError(PROTOCOL_ERROR). */\nexport function assertFrameHeader(h: FrameHeader): void {\n if (h.version !== FRAME_VERSION) throw frameError(`unsupported frame version ${String(h.version)}`);\n if (!Number.isInteger(h.flags) || h.flags < 0 || h.flags > 3) throw frameError(`reserved frame flag bits set: ${h.flags}`);\n if (!CHANNELS.has(h.channel)) throw frameError(`unknown frame channel ${String(h.channel)}`);\n checkU32(\"cid\", h.cid);\n checkU32(\"sid\", h.sid);\n checkU32(\"seq\", h.seq);\n}\n\nexport function encodeFrame(h: FrameHeader, payload: Uint8Array): Uint8Array {\n assertFrameHeader(h);\n const out = new Uint8Array(FRAME_HEADER_BYTES + payload.byteLength);\n const v = new DataView(out.buffer);\n v.setUint8(0, h.version);\n v.setUint8(1, h.flags);\n v.setUint8(2, h.channel);\n v.setUint8(3, 0);\n v.setUint32(4, h.cid);\n v.setUint32(8, h.sid);\n v.setUint32(12, h.seq);\n out.set(payload, FRAME_HEADER_BYTES);\n return out;\n}\n\nexport function decodeFrame(buf: ArrayBuffer | Uint8Array): DecodedFrame {\n const bytes = buf instanceof Uint8Array ? buf : new Uint8Array(buf);\n if (bytes.byteLength < FRAME_HEADER_BYTES) throw frameError(`short frame: ${bytes.byteLength} bytes`);\n const v = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n if (v.getUint8(3) !== 0) throw frameError(\"reserved frame byte 3 is not 0\");\n const header = {\n version: v.getUint8(0),\n flags: v.getUint8(1),\n channel: v.getUint8(2),\n cid: v.getUint32(4),\n sid: v.getUint32(8),\n seq: v.getUint32(12),\n } as FrameHeader;\n assertFrameHeader(header);\n return { header, payload: bytes.subarray(FRAME_HEADER_BYTES) };\n}\n\n/** Read only the 4-byte cid (relay routing) without decoding the rest. */\nexport function readCid(frame: Uint8Array): number {\n if (frame.byteLength < FRAME_HEADER_BYTES) throw frameError(`short frame: ${frame.byteLength} bytes`);\n return new DataView(frame.buffer, frame.byteOffset, frame.byteLength).getUint32(4);\n}\n\n/** Relay hot path: rewrite only the cid IN PLACE, never touch the payload. Returns the same array. */\nexport function stampCid(frame: Uint8Array, cid: number): Uint8Array {\n if (frame.byteLength < FRAME_HEADER_BYTES) throw frameError(`short frame: ${frame.byteLength} bytes`);\n checkU32(\"cid\", cid);\n new DataView(frame.buffer, frame.byteOffset, frame.byteLength).setUint32(4, cid);\n return frame;\n}\n\nexport function hasFlag(header: FrameHeader, flag: (typeof FrameFlag)[keyof typeof FrameFlag]): boolean {\n return (header.flags & flag) !== 0;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Relay ↔ device hop (never seen by clients). Every JSON envelope rides an ENVELOPE frame with\n// flags 0, sid 0, seq 0 and the client's cid; byte frames carry that cid too.\n// ─────────────────────────────────────────────────────────────────────────────\n\n/** cid 0 on an ENVELOPE frame from the device: the relay delivers it to every client. */\nexport const BROADCAST_CID = 0 as const;\n\n/**\n * Connection end: an ENVELOPE frame with FIN, sid 0, seq 0 and NO payload, for connection `cid`.\n * Relay → device: client `cid` is gone — cancel its streams, detach its sessions (idempotent; it\n * may arrive more than once). Device → relay: close client `cid`.\n */\nexport function connectionEndFrame(cid: number): Uint8Array {\n if (cid === BROADCAST_CID) throw frameError(\"a connection end needs a client cid, not the broadcast cid 0\");\n return encodeFrame({ version: FRAME_VERSION, flags: FrameFlag.FIN, channel: FrameChannel.ENVELOPE, cid, sid: 0, seq: 0 }, new Uint8Array(0));\n}\n\n/** True for a decoded connection-end frame (see connectionEndFrame). */\nexport function isConnectionEnd(frame: DecodedFrame): boolean {\n const h = frame.header;\n return h.channel === FrameChannel.ENVELOPE && hasFlag(h, FrameFlag.FIN) && frame.payload.byteLength === 0 && h.cid !== BROADCAST_CID;\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 ]);\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 }),\n ),\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.\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});\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 SysinfoGetParams = z.output<typeof SysinfoGetParams>;\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 behaviour: 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 * 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 behaviour,\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\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 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/** Whisper sizes the device can run (CTranslate2 weights). Larger = slower, more accurate. */\nexport const TranscriptionModelId = z.enum([\"tiny\", \"base\", \"small\", \"large-v3-turbo\"]);\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 models: z.array(TranscriptionModelInfo).max(16),\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 recognised. */\n segment: TranscriptSegment.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` 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 TranscriptSegment = z.output<typeof TranscriptSegment>;\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});\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/** 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>;\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\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});\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\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 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>;\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/** 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});\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});\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});\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});\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 (closed windows only). */\n group: z.boolean().default(false),\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 message: z.string().max(400),\n});\n\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});\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/** 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});\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({ id: ChatId, title: z.string().max(1000), window: z.string().max(64).nullable(), helpers: z.array(SpendHelper).max(200) });\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({ id: ChatId, chat: z.string().max(1000), who: z.string().max(400), today: SpendIdleScope, week: SpendIdleScope, last_ms: epochMs });\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 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 ShownSection = z.output<typeof ShownSection>;\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 * @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 * @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\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 * @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 * @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.\n */\nimport { z } from \"zod\";\nimport { nonNegInt } 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\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// ── 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});\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});\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});\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});\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>;\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]);\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 * @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 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\nexport const WindowMinimizeParams = z.strictObject({ id: nonNegInt });\nexport const WindowMinimizeResult = z.strictObject({ id: nonNegInt });\n\nexport type WindowInfo = z.output<typeof WindowInfo>;\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 * @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 * @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, colour 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 * @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});\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});\n\nexport const AudioPlayParams = z.strictObject({ path: AbsPath });\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 * @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 * @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\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","/** @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 OsPermissionName,\n SysinfoGetParams,\n SysinfoGetResult,\n SysinfoHardwareParams,\n SysinfoHardwareResult,\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 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 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 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} 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 } 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\";\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 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} from \"./apps-chats\";\nimport {\n AppWindowInfo,\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 ProjectMoveChat,\n ProjectMoveSkip,\n ProjectMoveGroup,\n ColdChat,\n AppsChatsColdParams,\n AppsChatsColdResult,\n AppsChatsOpenParams,\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\";\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\";\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.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\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.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 \"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 \"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 \"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.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.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\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 // 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.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} 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 \"relay.device_status\": RelayDeviceStatusEvent,\n \"relay.auth_expiring\": RelayAuthExpiringEvent,\n \"diag.errors.changed\": DiagErrorsChangedEvent,\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 },\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: WebScrapeParams, result: WebScrapeResult },\n \"tools.web_search\": { params: ToolsWebSearchParams, result: WebSearchResult },\n \"tools.web_browser_fetch\": { params: WebBrowserFetchParams, result: WebBrowserFetchResult },\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 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 OsPermissionName,\n SysinfoGetParams,\n SysinfoGetResult,\n SysinfoHardwareParams,\n SysinfoHardwareResult,\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 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 CodingServiceCredentials,\n CodingHistoryBlocked,\n CodingHistoryFailure,\n CodingHistoryRun,\n CodingHistoryStep,\n CodingPlanMissingParams,\n CodingImportNextParams,\n CodingServiceProgress,\n CodingHistoryImportMissingParams,\n CodingHistoryImportMissingResult,\n CodingHistoryProgressEvent,\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 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 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 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 AppsProjectsToWindowParams,\n AppsProjectsToWindowResult,\n ShownSection,\n AppsWindowsShownParams,\n AppsWindowsShownResult,\n ColdChat,\n AppsChatsColdParams,\n AppsChatsColdResult,\n AppsChatsOpenParams,\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 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 AppsWindowsUpdateStateParams,\n AppsWindowsUpdateStateResult,\n AppsWindowsReopenParams,\n AppsWindowsReopenResult,\n AppsWindowsUpdateAndReopenParams,\n AppsWindowsUpdateAndReopenResult,\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 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 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 AppsChatsListResult: { updating: \"1.9\", live: \"1.9\", families: \"1.10\" },\n AppsAccountsUsageResult: { problem: \"1.12\" },\n AppsAccountsResetsResult: { problem: \"1.12\" },\n ChatRow: { app_project: \"1.13\", tokens: \"1.13\", original_title: \"1.14\", title_source: \"1.14\", title_override: \"1.14\", archived: \"1.15\" },\n AccountUsage: { plan: \"1.13\", credits: \"1.13\", five_hour_resets_by_ms: \"1.25\" },\n ResourcesDisk: { name: \"1.17\" },\n StackServer: { cpu_percent: \"1.18\", memory_bytes: \"1.18\" },\n AudioDevice: { kind: \"1.24\" },\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} 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} as const satisfies Partial<Record<ErrorReasonName, `${number}.${number}`>>;\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/** \"1.10\" > \"1.9\". Same-major comparison of \"major.minor\" strings. */\nexport function compareVersions(a: string, b: string): number {\n const [am = 0, an = 0] = a.split(\".\").map(Number);\n const [bm = 0, bn = 0] = b.split(\".\").map(Number);\n return am - bm || an - bn;\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]);\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 [\"apps.chats.place\", [[\"chat\", \"ChatRow\"]]],\n [\"apps.accounts.usage\", [[\"accounts\", \"AccountUsage\"]]],\n [\"resources.snapshot\", [[\"disks\", \"ResourcesDisk\"]]],\n [\"stack.state\", [[\"servers\", \"StackServer\"]]],\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/** 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 top = path ? strip(value, FIELDS_SINCE[path], version) : value;\n const nested = op ? NESTED_RESULTS.get(op) : undefined;\n return nested ? stripNested(top, nested, version) : top;\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","// AUTO-GENERATED by scripts/generate.ts — DO NOT EDIT. `pnpm generate --check` fails on any hand edit.\n/** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */\nexport const CONTRACT_SHA256 = \"eece2e5eba3e6e33126a0fda2fad8c91abe9c878fbfdc98bd049ff5af126cb09\" as const;\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","/**\n * The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the\n * protocol ops it reaches, the group it ships in, and what became of each of matrx-local's 139\n * handlers (120 actions + the 19 action-enum dispatchers that fanned out to them).\n *\n * Data only. The status table (./status.ts) joins it with the harnesses' results, so a tool listed\n * here with no passing result reads \"untested\", never \"working\". Design and the reasons behind each\n * group: matrx-desktop/design/local-tools.md.\n */\nimport type { OpName } from \"../schema/registry\";\nimport type { ToolPlatform } from \"../schema/tools\";\n\nexport type ToolGroupId = \"files_shell\" | \"os_control\" | \"personal_automation\" | \"tools_service\" | \"ml_service\" | \"windows_admin\";\n\nexport interface ToolGroup {\n readonly id: ToolGroupId;\n readonly order: number;\n readonly title: string;\n /** Who implements the ops: a TS capability owner in the core, or a Python service. */\n readonly owner: \"core\" | \"python_tools\" | \"python_ml\";\n}\n\nexport const TOOL_GROUPS: readonly ToolGroup[] = [\n { id: \"files_shell\", order: 1, title: \"Files and shell\", owner: \"core\" },\n { id: \"os_control\", order: 2, title: \"Computer control\", owner: \"core\" },\n { id: \"personal_automation\", order: 3, title: \"Personal apps and automation\", owner: \"core\" },\n { id: \"tools_service\", order: 4, title: \"Web, documents, OCR and entities\", owner: \"python_tools\" },\n { id: \"ml_service\", order: 5, title: \"Speech\", owner: \"python_ml\" },\n { id: \"windows_admin\", order: 6, title: \"Windows administration\", owner: \"core\" },\n];\n\n/**\n * How an agent's call reaches the device. Both end at the relay's `POST /v1/devices/{id}/call`:\n * - `sandbox_proxy`: the cloud-sandbox-shaped tools (fs_*, shell_*). matrx-ai's `_sandbox_proxy`\n * calls aidream `/api/local-proxy/{device}/{fs|search|exec}/…`, which maps the route to its op.\n * Agent code never knows a laptop from a cloud box (SPEC §6.1).\n * - `device_op`: desktop-only capabilities. One generic route, `/api/local-proxy/{device}/op/{cap.op}`,\n * params and result exactly the op's schema; the tool definition is generated from that schema.\n * - `server`: runs on the aidream server even when the turn is bound to a device (a defect when\n * the tool reads a local path; see `note`).\n */\nexport type ToolPath = \"sandbox_proxy\" | \"device_op\" | \"server\";\n\n/** `built`: the ops exist and the tool is registered; `planned`: designed, not built; `broken`: registered but wrong on a device. */\nexport type ToolState = \"built\" | \"planned\" | \"broken\";\n\nexport interface CatalogTool {\n /** The platform registry name (`tool.definition.name`). */\n readonly name: string;\n readonly group: ToolGroupId;\n readonly state: ToolState;\n readonly path: ToolPath;\n /** Ops the tool sends. For `built` tools every one is in OPS (a test enforces it). */\n readonly ops: readonly string[];\n readonly platforms: readonly ToolPlatform[];\n /** One line for the status table. */\n readonly summary: string;\n /** Required for `broken`: what is wrong. */\n readonly note?: string;\n}\n\nconst ALL: readonly ToolPlatform[] = [\"darwin\", \"win32\", \"linux\"];\n\nexport const TOOL_CATALOG: readonly CatalogTool[] = [\n // ── 1. Files and shell (core `fs`, `exec`; the cloud sandbox's agent tools) ──────────────────\n { name: \"fs_read\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.read\"], platforms: ALL, summary: \"Read a file, paged\" },\n { name: \"fs_write\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.read\", \"fs.write\"], platforms: ALL, summary: \"Create or overwrite a file\" },\n { name: \"fs_edit\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.read\", \"fs.patch\"], platforms: ALL, summary: \"Replace one exact string\" },\n { name: \"fs_patch\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.read\", \"fs.patch\"], platforms: ALL, summary: \"Apply several exact edits at once\" },\n { name: \"fs_list\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.list\"], platforms: ALL, summary: \"List a folder\" },\n { name: \"fs_mkdir\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.mkdir\"], platforms: ALL, summary: \"Create a folder\" },\n { name: \"fs_search\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.search_paths\", \"fs.search_content\"], platforms: ALL, summary: \"Find files by name or content\" },\n { name: \"shell_execute\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"exec.run\"], platforms: ALL, summary: \"Run a command; cd carries over\" },\n { name: \"shell_python\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"exec.run\"], platforms: ALL, summary: \"Run a Python script\" },\n { name: \"desktop_git\", group: \"files_shell\", state: \"built\", path: \"device_op\", ops: [\"git.status\", \"git.diff\", \"git.log\", \"git.add\", \"git.commit\", \"git.push\", \"git.pull\", \"git.branch\", \"git.stash\", \"git.clone\"], platforms: ALL, summary: \"Git: status, diff, log, commit, branches, push and pull\" },\n { name: \"shell_job\", group: \"files_shell\", state: \"built\", path: \"device_op\", ops: [\"exec.job.start\", \"exec.job.output\", \"exec.job.stop\", \"exec.job.list\"], platforms: ALL, summary: \"Background commands: start, read output, stop\" },\n\n // ── 2. Computer control (TS owners) ──────────────────────────────────────────────────────────\n { name: \"desktop_process\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"proc.list\", \"proc.ports\", \"proc.kill\"], platforms: ALL, summary: \"Running processes and ports; stop one\" },\n { name: \"desktop_apps\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"apps.list\", \"apps.open\"], platforms: ALL, summary: \"Installed apps; open or bring one forward\" },\n { name: \"desktop_system\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"sysinfo.get\", \"sysinfo.hardware\", \"system.open_url\", \"system.open_path\", \"system.open_settings\", \"system.notify\"], platforms: ALL, summary: \"System facts, open, notify\" },\n { name: \"desktop_clipboard\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"clipboard.read\", \"clipboard.write\"], platforms: ALL, summary: \"Read and write the clipboard's text\" },\n { name: \"desktop_screen\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"screen.list\", \"screen.capture\"], platforms: ALL, summary: \"Displays and screenshots\" },\n { name: \"desktop_window\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"window.list\", \"window.focus\", \"window.move\", \"window.minimize\"], platforms: ALL, summary: \"Find, focus and arrange windows\" },\n { name: \"desktop_input\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"input.type_text\", \"input.hotkey\", \"input.mouse_click\", \"input.mouse_move\", \"input.keyboard_settings\", \"input.set_keyboard_settings\"], platforms: ALL, summary: \"Keyboard and mouse\" },\n { name: \"desktop_audio\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"audio.devices\", \"audio.levels\", \"audio.set_levels\", \"audio.record\", \"audio.play\"], platforms: ALL, summary: \"Audio devices, record, play\" },\n { name: \"desktop_power\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"power.status\", \"power.history\", \"power.prevent_sleep\"], platforms: ALL, summary: \"Battery and keep awake\" },\n { name: \"desktop_resources\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"resources.snapshot\", \"resources.activity\", \"resources.stop_job\", \"resources.incidents\"], platforms: ALL, summary: \"CPU, memory and disk use; what is using them, grouped into jobs; stop a job; the slowdown log\" },\n { name: \"fs_watch\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"fs.watch.start\", \"fs.watch.events\", \"fs.watch.stop\"], platforms: ALL, summary: \"Watch a folder; read what changed\" },\n\n // ── 3. Personal apps and automation ──────────────────────────────────────────────────────────\n { name: \"desktop_automation\", group: \"personal_automation\", state: \"planned\", path: \"device_op\", ops: [\"automation.script\"], platforms: [\"darwin\", \"win32\"], summary: \"AppleScript on a Mac, PowerShell on Windows\" },\n { name: \"desktop_mail\", group: \"personal_automation\", state: \"planned\", path: \"device_op\", ops: [\"mail.accounts\", \"mail.list\", \"mail.send\"], platforms: [\"darwin\"], summary: \"The Mail app\" },\n { name: \"desktop_messages\", group: \"personal_automation\", state: \"planned\", path: \"device_op\", ops: [\"messages.conversations\", \"messages.list\", \"messages.send\"], platforms: [\"darwin\"], summary: \"The Messages app\" },\n { name: \"desktop_contacts\", group: \"personal_automation\", state: \"planned\", path: \"device_op\", ops: [\"contacts.search\", \"contacts.get\"], platforms: [\"darwin\"], summary: \"Contacts\" },\n { name: \"desktop_calendar\", group: \"personal_automation\", state: \"planned\", path: \"device_op\", ops: [\"calendar.list\", \"calendar.create\", \"reminders.list\", \"reminders.create\"], platforms: [\"darwin\"], summary: \"Calendar and reminders\" },\n { name: \"desktop_photos\", group: \"personal_automation\", state: \"planned\", path: \"device_op\", ops: [\"photos.search\", \"photos.get\"], platforms: [\"darwin\"], summary: \"Photos library\" },\n { name: \"desktop_location\", group: \"personal_automation\", state: \"planned\", path: \"device_op\", ops: [\"location.get\"], platforms: [\"darwin\", \"win32\"], summary: \"Where the computer is\" },\n { name: \"desktop_net\", group: \"personal_automation\", state: \"planned\", path: \"device_op\", ops: [\"net.info\", \"net.wifi\", \"net.bluetooth\", \"net.devices\", \"net.mdns\", \"net.scan\", \"net.download\"], platforms: ALL, summary: \"Local network and downloads\" },\n\n // ── 4. Python `tools` service ────────────────────────────────────────────────────────────────\n { name: \"desktop_documents\", group: \"tools_service\", state: \"planned\", path: \"device_op\", ops: [\"tools.pdf_extract\", \"tools.office_generate\", \"tools.ocr\", \"tools.image_resize\"], platforms: ALL, summary: \"PDF text, Office files, OCR, images\" },\n { name: \"desktop_web\", group: \"tools_service\", state: \"built\", path: \"device_op\", ops: [\"web.fetch\", \"web.scrape\", \"web.search\", \"web.fetch_with_browser\"], platforms: ALL, summary: \"Fetch, scrape and search the web from this computer's own connection\" },\n { name: \"desktop_entities\", group: \"tools_service\", state: \"planned\", path: \"device_op\", ops: [\"tools.ner\", \"tools.pii\"], platforms: ALL, summary: \"Names and private data, found on the device\" },\n\n // ── 5. Python `ml` service ───────────────────────────────────────────────────────────────────\n // Built: models.transcribe through local_proxy's POST /op/{cap.op} (matrx-ai implementations/desktop.py).\n // Whisper detects the language itself, so matrx-local's speech_locales needs no op of its own.\n { name: \"desktop_transcribe\", group: \"ml_service\", state: \"built\", path: \"device_op\", ops: [\"models.transcribe\"], platforms: ALL, summary: \"Speech to text on the device\" },\n\n // ── 6. Windows administration ────────────────────────────────────────────────────────────────\n { name: \"desktop_windows_admin\", group: \"windows_admin\", state: \"planned\", path: \"device_op\", ops: [\"windows.registry_read\", \"windows.registry_write\", \"windows.services\", \"windows.service_control\", \"windows.event_log\", \"windows.features\"], platforms: [\"win32\"], summary: \"Registry, services, event log\" },\n];\n\n/**\n * Tools armed with a device binding that are deliberately NOT device tools, each with its reason.\n * They run on the server; the status table does not track them.\n */\nexport const EXCLUDED_TOOLS: Readonly<Record<string, string>> = {\n git_ingest:\n \"Runs on the server: it ingests repository URLs. A local path on a bound computer or sandbox is refused with the fs_* and shell remedy, since the server cannot see it\",\n};\n\n/** What became of one matrx-local handler. */\nexport type LegacyDisposition =\n | { readonly kind: \"tool\"; readonly tool: string }\n | { readonly kind: \"dropped\"; readonly reason: string };\n\nconst tool = (name: string): LegacyDisposition => ({ kind: \"tool\", tool: name });\nconst dropped = (reason: string): LegacyDisposition => ({ kind: \"dropped\", reason });\n\nconst SHELL_COVERS = \"Done with shell_execute (mv, cp, rm, tar), as every coding agent does\";\nconst CLOUD_SCRAPER = \"The cloud scraper and research tools run with this computer as their network (the `proxy` capability)\";\n\n/** matrx-local's 120 actions (`app/tools/actions.py` ACTION_GROUPS), keyed `<mega tool>.<action>`. */\nexport const LEGACY_ACTIONS: Readonly<Record<string, LegacyDisposition>> = {\n \"local_file.read\": tool(\"fs_read\"),\n \"local_file.write\": tool(\"fs_write\"),\n \"local_file.edit\": tool(\"fs_edit\"),\n \"local_file.move\": dropped(SHELL_COVERS),\n \"local_file.copy\": dropped(SHELL_COVERS),\n \"local_file.delete\": dropped(SHELL_COVERS),\n \"local_file.rename\": dropped(SHELL_COVERS),\n \"local_file.mkdir\": tool(\"fs_mkdir\"),\n \"local_file.glob\": tool(\"fs_search\"),\n \"local_file.grep\": tool(\"fs_search\"),\n \"local_file.list\": tool(\"fs_list\"),\n \"local_file.places\": dropped(\"The device's home and folders reach the agent in its binding briefing (sysinfo.get)\"),\n \"local_file.find\": tool(\"fs_search\"),\n \"local_file.semantic_find\": dropped(\"Needs a local embedding index; returns with file sync's index, not before\"),\n\n \"local_shell.run\": tool(\"shell_execute\"),\n \"local_shell.output\": tool(\"shell_job\"),\n \"local_shell.stop\": tool(\"shell_job\"),\n\n \"local_window.list\": tool(\"desktop_window\"),\n \"local_window.focus\": tool(\"desktop_window\"),\n \"local_window.move\": tool(\"desktop_window\"),\n \"local_window.minimize\": tool(\"desktop_window\"),\n\n \"local_process.list\": tool(\"desktop_process\"),\n \"local_process.ports\": tool(\"desktop_process\"),\n \"local_process.launch_app\": tool(\"desktop_apps\"),\n \"local_process.kill\": tool(\"desktop_process\"),\n \"local_process.focus_app\": tool(\"desktop_apps\"),\n \"local_process.terminals\": dropped(\"Matrx 2 terminals are exec sessions; the person's own terminal windows are not the agent's\"),\n \"local_process.tail_terminal\": dropped(\"Matrx 2 terminals are exec sessions; the person's own terminal windows are not the agent's\"),\n \"local_process.installed_apps\": tool(\"desktop_apps\"),\n\n \"local_input.type_text\": tool(\"desktop_input\"),\n \"local_input.hotkey\": tool(\"desktop_input\"),\n \"local_input.mouse_click\": tool(\"desktop_input\"),\n \"local_input.mouse_move\": tool(\"desktop_input\"),\n\n \"local_audio.devices\": tool(\"desktop_audio\"),\n \"local_audio.record\": tool(\"desktop_audio\"),\n \"local_audio.play\": tool(\"desktop_audio\"),\n \"local_audio.transcribe\": tool(\"desktop_transcribe\"),\n \"local_audio.transcribe_with_speech\": tool(\"desktop_transcribe\"),\n \"local_audio.speech_locales\": tool(\"desktop_transcribe\"),\n\n \"local_clipboard.read\": tool(\"desktop_clipboard\"),\n \"local_clipboard.write\": tool(\"desktop_clipboard\"),\n\n \"local_screen.screenshot\": tool(\"desktop_screen\"),\n \"local_screen.list\": tool(\"desktop_screen\"),\n \"local_screen.capture_book\": dropped(\"A one-off loop of screenshot plus page turn; the agent composes it from desktop_screen and desktop_input\"),\n\n \"local_system.info\": tool(\"desktop_system\"),\n \"local_system.open_url\": tool(\"desktop_system\"),\n \"local_system.open_path\": tool(\"desktop_system\"),\n \"local_system.notify\": tool(\"desktop_system\"),\n\n \"local_browser.navigate\": dropped(\"The browser agent is the extension (matrx-extend) and the cloud browser; a second Playwright on the device duplicates it\"),\n \"local_browser.click\": dropped(\"The browser agent is the extension (matrx-extend) and the cloud browser\"),\n \"local_browser.type_text\": dropped(\"The browser agent is the extension (matrx-extend) and the cloud browser\"),\n \"local_browser.extract\": dropped(\"The browser agent is the extension (matrx-extend) and the cloud browser\"),\n \"local_browser.screenshot\": dropped(\"The browser agent is the extension (matrx-extend) and the cloud browser\"),\n \"local_browser.eval\": dropped(\"The browser agent is the extension (matrx-extend) and the cloud browser\"),\n \"local_browser.tabs\": dropped(\"The browser agent is the extension (matrx-extend) and the cloud browser\"),\n \"local_browser.close\": dropped(\"The browser agent is the extension (matrx-extend) and the cloud browser\"),\n\n \"local_web.fetch\": tool(\"desktop_web\"),\n \"local_web.fetch_with_browser\": tool(\"desktop_web\"),\n \"local_web.scrape\": tool(\"desktop_web\"),\n \"local_web.search\": tool(\"desktop_web\"),\n \"local_web.research\": dropped(CLOUD_SCRAPER),\n \"local_web.download\": tool(\"desktop_net\"),\n \"local_web.upload\": dropped(\"Uploads are cloud files (matrx-files) and file sync, one upload path\"),\n\n \"local_net.info\": tool(\"desktop_net\"),\n \"local_net.scan\": tool(\"desktop_net\"),\n \"local_net.port_scan\": tool(\"desktop_net\"),\n \"local_net.mdns_discover\": tool(\"desktop_net\"),\n \"local_net.wifi_networks\": tool(\"desktop_net\"),\n \"local_net.bluetooth_devices\": tool(\"desktop_net\"),\n \"local_net.connected_devices\": tool(\"desktop_net\"),\n\n \"local_monitor.resources\": tool(\"desktop_resources\"),\n \"local_monitor.battery\": tool(\"desktop_power\"),\n \"local_monitor.disk_usage\": tool(\"desktop_resources\"),\n \"local_monitor.top_processes\": tool(\"desktop_process\"),\n \"local_monitor.watch_directory\": tool(\"fs_watch\"),\n \"local_monitor.watch_events\": tool(\"fs_watch\"),\n \"local_monitor.stop_watch\": tool(\"fs_watch\"),\n \"local_monitor.heartbeat\": dropped(\"The relay's device status replaces the heartbeat\"),\n\n \"local_schedule.create\": dropped(\"One scheduler: the platform's runs the agent on time and reaches the device through the relay\"),\n \"local_schedule.list\": dropped(\"One scheduler: the platform's runs the agent on time and reaches the device through the relay\"),\n \"local_schedule.cancel\": dropped(\"One scheduler: the platform's runs the agent on time and reaches the device through the relay\"),\n \"local_schedule.prevent_sleep\": tool(\"desktop_power\"),\n\n \"local_documents.list\": dropped(\"matrx-local's private document store is gone; documents are files (fs_*) or cloud Knowledge\"),\n \"local_documents.folders\": dropped(\"matrx-local's private document store is gone; documents are files (fs_*) or cloud Knowledge\"),\n \"local_documents.read\": dropped(\"matrx-local's private document store is gone; documents are files (fs_*) or cloud Knowledge\"),\n \"local_documents.write\": dropped(\"matrx-local's private document store is gone; documents are files (fs_*) or cloud Knowledge\"),\n \"local_documents.search\": dropped(\"matrx-local's private document store is gone; documents are files (fs_*) or cloud Knowledge\"),\n\n \"local_media.ocr\": tool(\"desktop_documents\"),\n \"local_media.resize\": tool(\"desktop_documents\"),\n \"local_media.pdf_extract\": tool(\"desktop_documents\"),\n \"local_media.office_generate\": tool(\"desktop_documents\"),\n \"local_media.archive_create\": dropped(SHELL_COVERS),\n \"local_media.archive_extract\": dropped(SHELL_COVERS),\n\n \"local_ner.entities\": tool(\"desktop_entities\"),\n \"local_ner.pii\": tool(\"desktop_entities\"),\n\n \"local_mac_apps.applescript\": tool(\"desktop_automation\"),\n \"local_mac_apps.list_emails\": tool(\"desktop_mail\"),\n \"local_mac_apps.send_email\": tool(\"desktop_mail\"),\n \"local_mac_apps.email_accounts\": tool(\"desktop_mail\"),\n \"local_mac_apps.list_messages\": tool(\"desktop_messages\"),\n \"local_mac_apps.list_conversations\": tool(\"desktop_messages\"),\n \"local_mac_apps.send_message\": tool(\"desktop_messages\"),\n \"local_mac_apps.search_contacts\": tool(\"desktop_contacts\"),\n \"local_mac_apps.get_contact\": tool(\"desktop_contacts\"),\n \"local_mac_apps.list_events\": tool(\"desktop_calendar\"),\n \"local_mac_apps.create_event\": tool(\"desktop_calendar\"),\n \"local_mac_apps.list_reminders\": tool(\"desktop_calendar\"),\n \"local_mac_apps.create_reminder\": tool(\"desktop_calendar\"),\n \"local_mac_apps.search_photos\": tool(\"desktop_photos\"),\n \"local_mac_apps.get_photo\": tool(\"desktop_photos\"),\n \"local_mac_apps.location\": tool(\"desktop_location\"),\n\n \"local_windows_ps.run\": tool(\"desktop_automation\"),\n \"local_windows_ps.get_env\": dropped(\"Read with shell_execute; a per-command env rides exec.run\"),\n \"local_windows_ps.set_env\": dropped(\"Changing the person's persistent environment is not an agent tool\"),\n \"local_windows_ps.registry_read\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.registry_write\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.service_list\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.service_control\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.event_log\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.windows_features\": tool(\"desktop_windows_admin\"),\n};\n\n/**\n * matrx-local's 19 action-enum dispatchers. Each fanned an `action` out to the handlers above and\n * did nothing else; they retire with the `matrx-local` executor binding (the platform reaches a\n * device through the relay now, never by client delegation).\n */\nexport const LEGACY_DISPATCHERS: readonly string[] = [\n \"local_file\",\n \"local_shell\",\n \"local_window\",\n \"local_process\",\n \"local_input\",\n \"local_audio\",\n \"local_clipboard\",\n \"local_screen\",\n \"local_system\",\n \"local_browser\",\n \"local_web\",\n \"local_net\",\n \"local_monitor\",\n \"local_schedule\",\n \"local_documents\",\n \"local_media\",\n \"local_ner\",\n \"local_mac_apps\",\n \"local_windows_ps\",\n];\n\n/** Built tools' ops, typed: a built tool naming an op the protocol does not have fails to compile in the test. */\nexport function builtOps(): OpName[] {\n return TOOL_CATALOG.filter((t) => t.state === \"built\").flatMap((t) => t.ops as OpName[]);\n}\n","/**\n * The generated tool status table (SPEC §10): tool × level × platform, built ONLY from harness\n * results (`ToolResultsFile`) joined with the catalog. Never written by hand; the one status anyone\n * cites. `renderToolStatusMarkdown` is the committed text form; screens render `ToolStatus` itself.\n */\nimport { ToolResultsFile, type ToolLevel, type ToolLevelResult, type ToolPlatform, type ToolTransport } from \"../schema/tools\";\nimport { EXCLUDED_TOOLS, TOOL_CATALOG, TOOL_GROUPS, type CatalogTool, type ToolGroupId, type ToolState } from \"./catalog\";\n\nexport const TOOL_LEVELS: readonly ToolLevel[] = [\"programmatic\", \"protocol\", \"chat\"];\nexport const TOOL_PLATFORMS: readonly ToolPlatform[] = [\"darwin\", \"win32\", \"linux\"];\n\n/**\n * `pass`: every required proof passed and none failed. `partial`: passes so far, a required proof\n * missing (`missing` says which). `fail`: the latest run of some proof failed. `untested`: nothing\n * ran. `not_built`: the tool is planned. `unsupported`: the tool does not exist on this platform.\n */\nconst UUID_IN_NAME = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi;\n\nexport type CellState = \"pass\" | \"partial\" | \"fail\" | \"untested\" | \"not_built\" | \"unsupported\";\n\nexport interface StatusEvidence {\n readonly suite: string;\n readonly test: string;\n readonly transport: ToolTransport;\n readonly outcome: ToolLevelResult[\"outcome\"];\n readonly remote_network: boolean;\n readonly commit: string;\n readonly run_at_ms: number;\n readonly detail: string;\n}\n\nexport interface StatusCell {\n readonly state: CellState;\n /** Required proofs not yet passed, e.g. \"relay from another network\". */\n readonly missing: readonly string[];\n readonly last_run_at_ms: number | null;\n readonly evidence: readonly StatusEvidence[];\n}\n\nexport interface StatusRow {\n readonly tool: string;\n readonly group: ToolGroupId;\n readonly tool_state: ToolState;\n readonly summary: string;\n readonly note: string | null;\n readonly cells: Readonly<Record<ToolPlatform, Readonly<Record<ToolLevel, StatusCell>>>>;\n /** Working on a platform = all three levels pass there (SPEC §10). */\n readonly working: Readonly<Record<ToolPlatform, boolean>>;\n}\n\nexport interface ToolStatus {\n readonly schema: \"matrx.tool-status.v1\";\n readonly generated_at_ms: number;\n readonly commits: readonly string[];\n readonly rows: readonly StatusRow[];\n readonly totals: Readonly<Record<ToolPlatform, { readonly working: number; readonly built: number; readonly tools: number }>>;\n}\n\n/** What each level needs before it reads `pass`. Level 2 is the transports AND the relay from another network. */\nconst REQUIRED: Readonly<Record<ToolLevel, readonly { readonly label: string; readonly ok: (e: StatusEvidence) => boolean }[]>> = {\n programmatic: [{ label: \"in process\", ok: (e) => e.transport === \"in_process\" }],\n protocol: [\n { label: \"localhost\", ok: (e) => e.transport === \"localhost\" },\n { label: \"relay\", ok: (e) => e.transport === \"relay\" },\n { label: \"relay from another network\", ok: (e) => e.transport === \"relay\" && e.remote_network },\n ],\n chat: [{ label: \"a real agent in a real chat\", ok: (e) => e.transport === \"agent\" }],\n};\n\nfunction cellFor(tool: CatalogTool, platform: ToolPlatform, level: ToolLevel, evidence: StatusEvidence[]): StatusCell {\n if (!tool.platforms.includes(platform)) return { state: \"unsupported\", missing: [], last_run_at_ms: null, evidence: [] };\n // The latest run of each (suite, test, transport, network) decides; older runs are history.\n const latest = new Map<string, StatusEvidence>();\n for (const e of evidence) {\n // A uuid in a test name (the agent a chat proof ran, a conversation) is run data, never the\n // proof's identity: the same proof under a new test agent replaces the old one's result.\n const key = `${e.suite}\\u0000${e.test.replace(UUID_IN_NAME, \"<id>\")}\\u0000${e.transport}\\u0000${e.remote_network}`;\n const prev = latest.get(key);\n if (!prev || prev.run_at_ms < e.run_at_ms) latest.set(key, e);\n }\n const runs = [...latest.values()].filter((e) => e.outcome !== \"skip\").sort((a, b) => b.run_at_ms - a.run_at_ms);\n const last = runs[0]?.run_at_ms ?? null;\n if (tool.state === \"planned\" && runs.length === 0) return { state: \"not_built\", missing: [], last_run_at_ms: null, evidence: [] };\n if (runs.length === 0) return { state: \"untested\", missing: REQUIRED[level].map((r) => r.label), last_run_at_ms: null, evidence: [...latest.values()] };\n if (runs.some((e) => e.outcome === \"fail\")) return { state: \"fail\", missing: [], last_run_at_ms: last, evidence: runs };\n const missing = REQUIRED[level].filter((r) => !runs.some((e) => e.outcome === \"pass\" && r.ok(e))).map((r) => r.label);\n return { state: missing.length === 0 ? \"pass\" : \"partial\", missing, last_run_at_ms: last, evidence: runs };\n}\n\n/** Build the table from every results file. Throws when a file is off-contract (never silently skipped). */\nexport function buildToolStatus(files: readonly unknown[], opts: { readonly generatedAtMs: number }): ToolStatus {\n const parsed = files.map((f, i) => {\n const r = ToolResultsFile.safeParse(f);\n if (!r.success) throw new Error(`tool results file #${i} is off-contract: ${r.error.issues[0]?.path.join(\".\")} ${r.error.issues[0]?.message}`);\n return r.data;\n });\n const known = new Set(TOOL_CATALOG.map((t) => t.name));\n const byKey = new Map<string, StatusEvidence[]>();\n for (const file of parsed) {\n for (const r of file.results) {\n if (!known.has(r.tool)) throw new Error(`a result names ${r.tool}, which is not in the tool catalog`);\n const key = `${r.tool}|${r.platform}|${r.level}`;\n const list = byKey.get(key) ?? [];\n list.push({ suite: r.suite, test: r.test, transport: r.transport, outcome: r.outcome, remote_network: r.remote_network, commit: file.commit, run_at_ms: r.run_at_ms, detail: r.detail });\n byKey.set(key, list);\n }\n }\n const groupOrder = new Map(TOOL_GROUPS.map((g) => [g.id, g.order]));\n const tools = [...TOOL_CATALOG].sort((a, b) => (groupOrder.get(a.group) ?? 99) - (groupOrder.get(b.group) ?? 99));\n const rows: StatusRow[] = tools.map((tool) => {\n const cells = {} as Record<ToolPlatform, Record<ToolLevel, StatusCell>>;\n const working = {} as Record<ToolPlatform, boolean>;\n for (const platform of TOOL_PLATFORMS) {\n const perLevel = {} as Record<ToolLevel, StatusCell>;\n for (const level of TOOL_LEVELS) perLevel[level] = cellFor(tool, platform, level, byKey.get(`${tool.name}|${platform}|${level}`) ?? []);\n cells[platform] = perLevel;\n working[platform] = TOOL_LEVELS.every((l) => perLevel[l].state === \"pass\");\n }\n return { tool: tool.name, group: tool.group, tool_state: tool.state, summary: tool.summary, note: tool.note ?? null, cells, working };\n });\n const totals = {} as Record<ToolPlatform, { working: number; built: number; tools: number }>;\n for (const platform of TOOL_PLATFORMS) {\n const onPlatform = TOOL_CATALOG.filter((t) => t.platforms.includes(platform));\n totals[platform] = {\n working: rows.filter((r) => r.working[platform]).length,\n built: onPlatform.filter((t) => t.state !== \"planned\").length,\n tools: onPlatform.length,\n };\n }\n const commits = [...new Set(parsed.map((f) => f.commit))].sort();\n return { schema: \"matrx.tool-status.v1\", generated_at_ms: opts.generatedAtMs, commits, rows, totals };\n}\n\nconst MARK: Readonly<Record<CellState, string>> = { pass: \"✓\", partial: \"◐\", fail: \"✗\", untested: \"·\", not_built: \"—\", unsupported: \" \" };\n\n/** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */\nexport function renderToolStatusMarkdown(status: ToolStatus): string {\n const lines: string[] = [\n \"<!-- GENERATED by `pnpm tools:status` from test results. Never edit by hand. -->\",\n \"# Local tools: status\",\n \"\",\n `Generated ${new Date(status.generated_at_ms).toISOString()} from commits ${status.commits.join(\", \") || \"none\"}.`,\n \"\",\n \"✓ pass · ◐ passing so far, a required proof missing · ✗ fail · `·` untested · — not built. Levels: P programmatic, R protocol, C chat.\",\n \"\",\n \"| Platform | Working | Built | Tools |\",\n \"|---|---|---|---|\",\n ...TOOL_PLATFORMS.map((p) => `| ${p} | ${status.totals[p].working} | ${status.totals[p].built} | ${status.totals[p].tools} |`),\n \"\",\n ];\n for (const group of TOOL_GROUPS) {\n const rows = status.rows.filter((r) => r.group === group.id);\n if (rows.length === 0) continue;\n lines.push(`## ${group.order}. ${group.title}`, \"\", \"| Tool | darwin P R C | win32 P R C | linux P R C | Missing |\", \"|---|---|---|---|---|\");\n for (const r of rows) {\n const cols = TOOL_PLATFORMS.map((p) => TOOL_LEVELS.map((l) => MARK[r.cells[p][l].state]).join(\" \"));\n const missing = new Set<string>();\n for (const p of TOOL_PLATFORMS) for (const l of TOOL_LEVELS) for (const m of r.cells[p][l].missing) if (r.cells[p][l].state !== \"untested\") missing.add(`${p} ${l}: ${m}`);\n const name = r.tool_state === \"broken\" ? `${r.tool} (broken: ${r.note ?? \"\"})` : r.tool;\n lines.push(`| ${name} | ${cols.join(\" | \")} | ${[...missing].join(\"; \")} |`);\n }\n lines.push(\"\");\n }\n const excluded = Object.entries(EXCLUDED_TOOLS);\n if (excluded.length > 0) {\n lines.push(\"## Not device tools\", \"\", \"| Tool | Why |\", \"|---|---|\", ...excluded.map(([name, why]) => `| ${name} | ${why} |`), \"\");\n }\n return lines.join(\"\\n\");\n}\n"],"mappings":";AACA,SAAS,SAAS;AAClB,SAAS,0BAA0B;AAM5B,IAAM,iBAAiB;AA6CvB,IAAM,iBAAiB;AAEvB,IAAM,mBAAmB,GAAG,cAAc,IAAI,cAAc;AAE5D,IAAM,kBAAkB,EAC5B,OAAO,EACP,MAAM,+BAA+B;AAOjC,IAAM,YAAY,EACtB,OAAO,EACP,IAAI,CAAC,EACL,IAAI,EAAE,EACN,MAAM,kBAAkB;AAGpB,IAAM,aAAa,EACvB,OAAO,EACP,MAAM,kCAAkC;AAQpC,IAAM,WAAW,EACrB,OAAO,EACP,MAAM,kBAAkB;AAMpB,IAAM,UAAU,EACpB,OAAO,EACP,IAAI,CAAC,EACL,IAAI,IAAI,EACR,MAAM,gCAAgC;AAGlC,IAAM,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,IAAI,UAAa;AAC5C,IAAM,YAAY,EAAE,IAAI,EAAE,IAAI,CAAC;AAE/B,IAAM,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC;;;ACpGpC,SAAS,KAAAA,UAAS;AAQX,IAAM,YAAYC,GACtB,KAAK;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AACF,CAAC;AAGI,IAAM,c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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,EAC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ACA,QAAM,WAAW,OAAO,QAAQ,cAAc;AAC9C,MAAI,SAAS,SAAS,GAAG;AACvB,UAAM,KAAK,uBAAuB,IAAI,kBAAkB,aAAa,GAAG,SAAS,IAAI,CAAC,CAAC,MAAM,GAAG,MAAM,KAAK,IAAI,MAAM,GAAG,IAAI,GAAG,EAAE;AAAA,EACnI;AACA,SAAO,MAAM,KAAK,IAAI;AACxB;","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","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","next","tool","rows","cols"]}
|
|
1
|
+
{"version":3,"sources":["../src/schema/primitives.ts","../src/schema/errors.ts","../src/schema/frame.ts","../src/error.ts","../src/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/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/browser.ts","../src/schema/registry.ts","../src/versioning.ts","../src/contract.ts","../src/close-policy.ts","../src/tools/catalog.ts","../src/tools/status.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 */\nexport const PROTOCOL_MINOR = 29 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 ]);\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","/**\n * The one error type every package entry throws. It carries the wire ErrorCode (SPEC §5), so a\n * caller branches on `code`/`retryable`/`data.reason` and never parses a message. Zod-free on\n * purpose: `./frame` (the relay hot path) throws it without pulling the schema graph.\n */\nimport type { ErrorCodeName, ErrorData } from \"./types\";\n\nexport class DesktopProtocolError extends Error {\n readonly code: ErrorCodeName;\n readonly retryable: boolean;\n readonly data: ErrorData | undefined;\n\n constructor(code: ErrorCodeName, message: string, options: { retryable?: boolean; data?: ErrorData; cause?: unknown } = {}) {\n super(message, options.cause === undefined ? undefined : { cause: options.cause });\n this.name = \"DesktopProtocolError\";\n this.code = code;\n this.retryable = options.retryable ?? false;\n this.data = options.data;\n }\n\n /**\n * Any thrown value as a DesktopProtocolError, keeping its code, message and data. Each built entry\n * (`.`, `./client`, `./react`) carries its own copy of this class, so `instanceof` alone misses an\n * error thrown by a sibling entry and reports a real NOT_FOUND as INTERNAL; this checks the shape.\n */\n static from(caught: unknown): DesktopProtocolError {\n if (caught instanceof DesktopProtocolError) return caught;\n const e = caught as { name?: unknown; code?: unknown; message?: unknown; retryable?: unknown; data?: unknown } | null;\n if (e && typeof e === \"object\" && e.name === \"DesktopProtocolError\" && typeof e.code === \"string\") {\n return new DesktopProtocolError(e.code as ErrorCodeName, typeof e.message === \"string\" ? e.message : String(e.code), {\n retryable: e.retryable === true,\n ...(e.data && typeof e.data === \"object\" ? { data: e.data as ErrorData } : {}),\n cause: caught,\n });\n }\n return new DesktopProtocolError(\"INTERNAL\", caught instanceof Error ? caught.message : String(caught), { cause: caught });\n }\n\n /** The wire body (ProtocolErrorBody) — what a core or relay sends for this error. */\n toBody(): { code: ErrorCodeName; message: string; retryable: boolean; data?: ErrorData } {\n return this.data === undefined\n ? { code: this.code, message: this.message, retryable: this.retryable }\n : { code: this.code, message: this.message, retryable: this.retryable, data: this.data };\n }\n}\n\nexport function isDesktopProtocolError(value: unknown): value is DesktopProtocolError {\n return value instanceof DesktopProtocolError || (value instanceof Error && value.name === \"DesktopProtocolError\" && \"code\" in value);\n}\n","/**\n * `@ai-matrx/desktop-protocol/frame` — the 16-byte binary frame codec. ZOD-FREE by design: the\n * relay Worker's hot path imports only this entry and must stay tiny.\n *\n * off size field notes\n * 0 u8 version = 1\n * 1 u8 flags bit0 FIN (last frame of this stream), bit1 REPLAY (from ring buffer),\n * bits2-7 reserved = 0\n * 2 u8 channel see FrameChannel\n * 3 u8 reserved = 0\n * 4 u32 cid relay connection id. 0 on every client↔relay hop; the relay stamps it on\n * the relay→device hop and strips it on the way back (rewrites 4 bytes in\n * place — the relay never parses payloads).\n * 8 u32 sid stream id, announced by the core in stream{meta:{kind:\"open\",sid}}\n * 12 u32 seq per-stream frame sequence, starts at 1, strictly +1\n *\n * Big-endian. Payload length = message length − 16 (one frame = one WS binary message).\n * Python struct format: \">BBBBIII\". The zod twin (FrameHeader in the root entry, and so the JSON\n * Schema and Pydantic model) is checked against this file by src/frame.test.ts.\n */\nimport { DesktopProtocolError } from \"./error\";\n\nexport const FRAME_HEADER_BYTES = 16 as const;\nexport const FRAME_VERSION = 1 as const;\nexport const FRAME_STRUCT_FORMAT = \">BBBBIII\" as const;\nexport const FrameFlag = { FIN: 0b01, REPLAY: 0b10 } as const;\nexport const FrameChannel = {\n /** core→client: pty output, fs.read_stream bytes */\n DATA: 0,\n /** core→client: stderr of a non-pty process (reserved for exec.spawn in v1.1) */\n STDERR: 1,\n /** client→core: keystrokes / stdin to sid */\n STDIN: 2,\n /** core→client: serialized terminal screen (attach when since_seq is outside the ring) */\n SNAPSHOT: 3,\n /** relay↔device hop only: a JSON envelope carried inside a binary frame so the relay can route\n * by cid without parsing JSON. Never seen by clients. */\n ENVELOPE: 255,\n} as const;\n\nexport type FrameChannelValue = (typeof FrameChannel)[keyof typeof FrameChannel];\n\nexport interface FrameHeader {\n version: typeof FRAME_VERSION;\n /** 0..3 — FrameFlag bits. */\n flags: number;\n channel: FrameChannelValue;\n cid: number;\n sid: number;\n seq: number;\n}\n\nexport interface DecodedFrame {\n header: FrameHeader;\n /** A VIEW into the input buffer (no copy). Copy it if you keep it past the input's lifetime. */\n payload: Uint8Array;\n}\n\nconst U32_MAX = 4_294_967_295;\nconst CHANNELS: ReadonlySet<number> = new Set(Object.values(FrameChannel));\n\nfunction frameError(message: string): DesktopProtocolError {\n return new DesktopProtocolError(\"PROTOCOL_ERROR\", message);\n}\n\nfunction checkU32(name: string, value: number): void {\n if (!Number.isInteger(value) || value < 0 || value > U32_MAX) throw frameError(`frame ${name} is not a u32: ${value}`);\n}\n\n/** Validate a header without zod. Throws DesktopProtocolError(PROTOCOL_ERROR). */\nexport function assertFrameHeader(h: FrameHeader): void {\n if (h.version !== FRAME_VERSION) throw frameError(`unsupported frame version ${String(h.version)}`);\n if (!Number.isInteger(h.flags) || h.flags < 0 || h.flags > 3) throw frameError(`reserved frame flag bits set: ${h.flags}`);\n if (!CHANNELS.has(h.channel)) throw frameError(`unknown frame channel ${String(h.channel)}`);\n checkU32(\"cid\", h.cid);\n checkU32(\"sid\", h.sid);\n checkU32(\"seq\", h.seq);\n}\n\nexport function encodeFrame(h: FrameHeader, payload: Uint8Array): Uint8Array {\n assertFrameHeader(h);\n const out = new Uint8Array(FRAME_HEADER_BYTES + payload.byteLength);\n const v = new DataView(out.buffer);\n v.setUint8(0, h.version);\n v.setUint8(1, h.flags);\n v.setUint8(2, h.channel);\n v.setUint8(3, 0);\n v.setUint32(4, h.cid);\n v.setUint32(8, h.sid);\n v.setUint32(12, h.seq);\n out.set(payload, FRAME_HEADER_BYTES);\n return out;\n}\n\nexport function decodeFrame(buf: ArrayBuffer | Uint8Array): DecodedFrame {\n const bytes = buf instanceof Uint8Array ? buf : new Uint8Array(buf);\n if (bytes.byteLength < FRAME_HEADER_BYTES) throw frameError(`short frame: ${bytes.byteLength} bytes`);\n const v = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n if (v.getUint8(3) !== 0) throw frameError(\"reserved frame byte 3 is not 0\");\n const header = {\n version: v.getUint8(0),\n flags: v.getUint8(1),\n channel: v.getUint8(2),\n cid: v.getUint32(4),\n sid: v.getUint32(8),\n seq: v.getUint32(12),\n } as FrameHeader;\n assertFrameHeader(header);\n return { header, payload: bytes.subarray(FRAME_HEADER_BYTES) };\n}\n\n/** Read only the 4-byte cid (relay routing) without decoding the rest. */\nexport function readCid(frame: Uint8Array): number {\n if (frame.byteLength < FRAME_HEADER_BYTES) throw frameError(`short frame: ${frame.byteLength} bytes`);\n return new DataView(frame.buffer, frame.byteOffset, frame.byteLength).getUint32(4);\n}\n\n/** Relay hot path: rewrite only the cid IN PLACE, never touch the payload. Returns the same array. */\nexport function stampCid(frame: Uint8Array, cid: number): Uint8Array {\n if (frame.byteLength < FRAME_HEADER_BYTES) throw frameError(`short frame: ${frame.byteLength} bytes`);\n checkU32(\"cid\", cid);\n new DataView(frame.buffer, frame.byteOffset, frame.byteLength).setUint32(4, cid);\n return frame;\n}\n\nexport function hasFlag(header: FrameHeader, flag: (typeof FrameFlag)[keyof typeof FrameFlag]): boolean {\n return (header.flags & flag) !== 0;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Relay ↔ device hop (never seen by clients). Every JSON envelope rides an ENVELOPE frame with\n// flags 0, sid 0, seq 0 and the client's cid; byte frames carry that cid too.\n// ─────────────────────────────────────────────────────────────────────────────\n\n/** cid 0 on an ENVELOPE frame from the device: the relay delivers it to every client. */\nexport const BROADCAST_CID = 0 as const;\n\n/**\n * Connection end: an ENVELOPE frame with FIN, sid 0, seq 0 and NO payload, for connection `cid`.\n * Relay → device: client `cid` is gone — cancel its streams, detach its sessions (idempotent; it\n * may arrive more than once). Device → relay: close client `cid`.\n */\nexport function connectionEndFrame(cid: number): Uint8Array {\n if (cid === BROADCAST_CID) throw frameError(\"a connection end needs a client cid, not the broadcast cid 0\");\n return encodeFrame({ version: FRAME_VERSION, flags: FrameFlag.FIN, channel: FrameChannel.ENVELOPE, cid, sid: 0, seq: 0 }, new Uint8Array(0));\n}\n\n/** True for a decoded connection-end frame (see connectionEndFrame). */\nexport function isConnectionEnd(frame: DecodedFrame): boolean {\n const h = frame.header;\n return h.channel === FrameChannel.ENVELOPE && hasFlag(h, FrameFlag.FIN) && frame.payload.byteLength === 0 && h.cid !== BROADCAST_CID;\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 ]);\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 }),\n ),\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.\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});\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 SysinfoGetParams = z.output<typeof SysinfoGetParams>;\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 behaviour: 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 * 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 behaviour,\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\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 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/** Whisper sizes the device can run (CTranslate2 weights). Larger = slower, more accurate. */\nexport const TranscriptionModelId = z.enum([\"tiny\", \"base\", \"small\", \"large-v3-turbo\"]);\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 models: z.array(TranscriptionModelInfo).max(16),\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 recognised. */\n segment: TranscriptSegment.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` 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 TranscriptSegment = z.output<typeof TranscriptSegment>;\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});\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/** 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>;\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\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});\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\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 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>;\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/** 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});\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});\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});\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});\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 (closed windows only). */\n group: z.boolean().default(false),\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 message: z.string().max(400),\n});\n\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});\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});\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});\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});\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({ id: ChatId, title: z.string().max(1000), window: z.string().max(64).nullable(), helpers: z.array(SpendHelper).max(200) });\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({ id: ChatId, chat: z.string().max(1000), who: z.string().max(400), today: SpendIdleScope, week: SpendIdleScope, last_ms: epochMs });\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 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 ShownSection = z.output<typeof ShownSection>;\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 * @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 * @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\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 * @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 * @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.\n */\nimport { z } from \"zod\";\nimport { nonNegInt } 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\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// ── 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});\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});\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});\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});\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>;\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]);\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 * @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 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\nexport const WindowMinimizeParams = z.strictObject({ id: nonNegInt });\nexport const WindowMinimizeResult = z.strictObject({ id: nonNegInt });\n\nexport type WindowInfo = z.output<typeof WindowInfo>;\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 * @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 * @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, colour 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 * @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});\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});\n\nexport const AudioPlayParams = z.strictObject({ path: AbsPath });\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 * @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 * @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\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 * @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/** 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 BrowserPairResult = z.output<typeof BrowserPairResult>;\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 OsPermissionName,\n SysinfoGetParams,\n SysinfoGetResult,\n SysinfoHardwareParams,\n SysinfoHardwareResult,\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 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 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 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} 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 } 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\";\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 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} from \"./apps-chats\";\nimport {\n AppWindowInfo,\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 ProjectMoveChat,\n ProjectMoveSkip,\n ProjectMoveGroup,\n ColdChat,\n AppsChatsColdParams,\n AppsChatsColdResult,\n AppsChatsOpenParams,\n TitleCopies,\n TitleMismatch,\n AppsChatsTitlesCheckParams,\n AppsChatsTitlesCheckResult,\n AppsChatsTitlesPushParams,\n AppsChatsTitlesPushResult,\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 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} from \"./browser\";\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\";\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.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\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.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 \"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 \"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 \"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.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.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\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 // 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.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.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} 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 \"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} 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 },\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: WebScrapeParams, result: WebScrapeResult },\n \"tools.web_search\": { params: ToolsWebSearchParams, result: WebSearchResult },\n \"tools.web_browser_fetch\": { params: WebBrowserFetchParams, result: WebBrowserFetchResult },\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 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 OsPermissionName,\n SysinfoGetParams,\n SysinfoGetResult,\n SysinfoHardwareParams,\n SysinfoHardwareResult,\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 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 CodingServiceCredentials,\n CodingHistoryBlocked,\n CodingHistoryFailure,\n CodingHistoryRun,\n CodingHistoryStep,\n CodingPlanMissingParams,\n CodingImportNextParams,\n CodingServiceProgress,\n CodingHistoryImportMissingParams,\n CodingHistoryImportMissingResult,\n CodingHistoryProgressEvent,\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 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 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 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 AppsProjectsToWindowParams,\n AppsProjectsToWindowResult,\n ShownSection,\n AppsWindowsShownParams,\n AppsWindowsShownResult,\n ColdChat,\n AppsChatsColdParams,\n AppsChatsColdResult,\n AppsChatsOpenParams,\n TitleCopies,\n TitleMismatch,\n AppsChatsTitlesCheckParams,\n AppsChatsTitlesCheckResult,\n AppsChatsTitlesPushParams,\n AppsChatsTitlesPushResult,\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 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 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} 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 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 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 AppsChatsListResult: { updating: \"1.9\", live: \"1.9\", families: \"1.10\" },\n AppsAccountsUsageResult: { problem: \"1.12\" },\n AppsAccountsResetsResult: { problem: \"1.12\" },\n ChatRow: { app_project: \"1.13\", tokens: \"1.13\", original_title: \"1.14\", title_source: \"1.14\", title_override: \"1.14\", archived: \"1.15\" },\n AccountUsage: { plan: \"1.13\", credits: \"1.13\", five_hour_resets_by_ms: \"1.25\" },\n ResourcesDisk: { name: \"1.17\" },\n StackServer: { cpu_percent: \"1.18\", memory_bytes: \"1.18\" },\n AudioDevice: { kind: \"1.24\" },\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} 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} as const satisfies Partial<Record<ErrorReasonName, `${number}.${number}`>>;\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/** \"1.10\" > \"1.9\". Same-major comparison of \"major.minor\" strings. */\nexport function compareVersions(a: string, b: string): number {\n const [am = 0, an = 0] = a.split(\".\").map(Number);\n const [bm = 0, bn = 0] = b.split(\".\").map(Number);\n return am - bm || an - bn;\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]);\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 [\"apps.chats.place\", [[\"chat\", \"ChatRow\"]]],\n [\"apps.accounts.usage\", [[\"accounts\", \"AccountUsage\"]]],\n [\"resources.snapshot\", [[\"disks\", \"ResourcesDisk\"]]],\n [\"stack.state\", [[\"servers\", \"StackServer\"]]],\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/** 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 top = path ? strip(value, FIELDS_SINCE[path], version) : value;\n const nested = op ? NESTED_RESULTS.get(op) : undefined;\n return nested ? stripNested(top, nested, version) : top;\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","// AUTO-GENERATED by scripts/generate.ts — DO NOT EDIT. `pnpm generate --check` fails on any hand edit.\n/** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */\nexport const CONTRACT_SHA256 = \"5994ab9f6c2dba636a90e18c99bd3a90736f23782b3f8df9e0d2d7234b8e2b1b\" as const;\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","/**\n * The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the\n * protocol ops it reaches, the group it ships in, and what became of each of matrx-local's 139\n * handlers (120 actions + the 19 action-enum dispatchers that fanned out to them).\n *\n * Data only. The status table (./status.ts) joins it with the harnesses' results, so a tool listed\n * here with no passing result reads \"untested\", never \"working\". Design and the reasons behind each\n * group: matrx-desktop/design/local-tools.md.\n */\nimport type { OpName } from \"../schema/registry\";\nimport type { ToolPlatform } from \"../schema/tools\";\n\nexport type ToolGroupId = \"files_shell\" | \"os_control\" | \"personal_automation\" | \"tools_service\" | \"ml_service\" | \"windows_admin\";\n\nexport interface ToolGroup {\n readonly id: ToolGroupId;\n readonly order: number;\n readonly title: string;\n /** Who implements the ops: a TS capability owner in the core, or a Python service. */\n readonly owner: \"core\" | \"python_tools\" | \"python_ml\";\n}\n\nexport const TOOL_GROUPS: readonly ToolGroup[] = [\n { id: \"files_shell\", order: 1, title: \"Files and shell\", owner: \"core\" },\n { id: \"os_control\", order: 2, title: \"Computer control\", owner: \"core\" },\n { id: \"personal_automation\", order: 3, title: \"Personal apps and automation\", owner: \"core\" },\n { id: \"tools_service\", order: 4, title: \"Web, documents, OCR and entities\", owner: \"python_tools\" },\n { id: \"ml_service\", order: 5, title: \"Speech\", owner: \"python_ml\" },\n { id: \"windows_admin\", order: 6, title: \"Windows administration\", owner: \"core\" },\n];\n\n/**\n * How an agent's call reaches the device. Both end at the relay's `POST /v1/devices/{id}/call`:\n * - `sandbox_proxy`: the cloud-sandbox-shaped tools (fs_*, shell_*). matrx-ai's `_sandbox_proxy`\n * calls aidream `/api/local-proxy/{device}/{fs|search|exec}/…`, which maps the route to its op.\n * Agent code never knows a laptop from a cloud box (SPEC §6.1).\n * - `device_op`: desktop-only capabilities. One generic route, `/api/local-proxy/{device}/op/{cap.op}`,\n * params and result exactly the op's schema; the tool definition is generated from that schema.\n * - `server`: runs on the aidream server even when the turn is bound to a device (a defect when\n * the tool reads a local path; see `note`).\n */\nexport type ToolPath = \"sandbox_proxy\" | \"device_op\" | \"server\";\n\n/** `built`: the ops exist and the tool is registered; `planned`: designed, not built; `broken`: registered but wrong on a device. */\nexport type ToolState = \"built\" | \"planned\" | \"broken\";\n\nexport interface CatalogTool {\n /** The platform registry name (`tool.definition.name`). */\n readonly name: string;\n readonly group: ToolGroupId;\n readonly state: ToolState;\n readonly path: ToolPath;\n /** Ops the tool sends. For `built` tools every one is in OPS (a test enforces it). */\n readonly ops: readonly string[];\n readonly platforms: readonly ToolPlatform[];\n /** One line for the status table. */\n readonly summary: string;\n /** Required for `broken`: what is wrong. */\n readonly note?: string;\n}\n\nconst ALL: readonly ToolPlatform[] = [\"darwin\", \"win32\", \"linux\"];\n\nexport const TOOL_CATALOG: readonly CatalogTool[] = [\n // ── 1. Files and shell (core `fs`, `exec`; the cloud sandbox's agent tools) ──────────────────\n { name: \"fs_read\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.read\"], platforms: ALL, summary: \"Read a file, paged\" },\n { name: \"fs_write\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.read\", \"fs.write\"], platforms: ALL, summary: \"Create or overwrite a file\" },\n { name: \"fs_edit\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.read\", \"fs.patch\"], platforms: ALL, summary: \"Replace one exact string\" },\n { name: \"fs_patch\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.read\", \"fs.patch\"], platforms: ALL, summary: \"Apply several exact edits at once\" },\n { name: \"fs_list\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.list\"], platforms: ALL, summary: \"List a folder\" },\n { name: \"fs_mkdir\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.mkdir\"], platforms: ALL, summary: \"Create a folder\" },\n { name: \"fs_search\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"fs.search_paths\", \"fs.search_content\"], platforms: ALL, summary: \"Find files by name or content\" },\n { name: \"shell_execute\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"exec.run\"], platforms: ALL, summary: \"Run a command; cd carries over\" },\n { name: \"shell_python\", group: \"files_shell\", state: \"built\", path: \"sandbox_proxy\", ops: [\"exec.run\"], platforms: ALL, summary: \"Run a Python script\" },\n { name: \"desktop_git\", group: \"files_shell\", state: \"built\", path: \"device_op\", ops: [\"git.status\", \"git.diff\", \"git.log\", \"git.add\", \"git.commit\", \"git.push\", \"git.pull\", \"git.branch\", \"git.stash\", \"git.clone\"], platforms: ALL, summary: \"Git: status, diff, log, commit, branches, push and pull\" },\n { name: \"shell_job\", group: \"files_shell\", state: \"built\", path: \"device_op\", ops: [\"exec.job.start\", \"exec.job.output\", \"exec.job.stop\", \"exec.job.list\"], platforms: ALL, summary: \"Background commands: start, read output, stop\" },\n\n // ── 2. Computer control (TS owners) ──────────────────────────────────────────────────────────\n { name: \"desktop_process\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"proc.list\", \"proc.ports\", \"proc.kill\"], platforms: ALL, summary: \"Running processes and ports; stop one\" },\n { name: \"desktop_apps\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"apps.list\", \"apps.open\"], platforms: ALL, summary: \"Installed apps; open or bring one forward\" },\n { name: \"desktop_system\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"sysinfo.get\", \"sysinfo.hardware\", \"system.open_url\", \"system.open_path\", \"system.open_settings\", \"system.notify\"], platforms: ALL, summary: \"System facts, open, notify\" },\n { name: \"desktop_clipboard\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"clipboard.read\", \"clipboard.write\"], platforms: ALL, summary: \"Read and write the clipboard's text\" },\n { name: \"desktop_screen\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"screen.list\", \"screen.capture\"], platforms: ALL, summary: \"Displays and screenshots\" },\n { name: \"desktop_window\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"window.list\", \"window.focus\", \"window.move\", \"window.minimize\"], platforms: ALL, summary: \"Find, focus and arrange windows\" },\n { name: \"desktop_input\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"input.type_text\", \"input.hotkey\", \"input.mouse_click\", \"input.mouse_move\", \"input.keyboard_settings\", \"input.set_keyboard_settings\"], platforms: ALL, summary: \"Keyboard and mouse\" },\n { name: \"desktop_audio\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"audio.devices\", \"audio.levels\", \"audio.set_levels\", \"audio.record\", \"audio.play\"], platforms: ALL, summary: \"Audio devices, record, play\" },\n { name: \"desktop_power\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"power.status\", \"power.history\", \"power.prevent_sleep\"], platforms: ALL, summary: \"Battery and keep awake\" },\n { name: \"desktop_resources\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"resources.snapshot\", \"resources.activity\", \"resources.stop_job\", \"resources.incidents\"], platforms: ALL, summary: \"CPU, memory and disk use; what is using them, grouped into jobs; stop a job; the slowdown log\" },\n { name: \"fs_watch\", group: \"os_control\", state: \"built\", path: \"device_op\", ops: [\"fs.watch.start\", \"fs.watch.events\", \"fs.watch.stop\"], platforms: ALL, summary: \"Watch a folder; read what changed\" },\n\n // ── 3. Personal apps and automation ──────────────────────────────────────────────────────────\n { name: \"desktop_automation\", group: \"personal_automation\", state: \"planned\", path: \"device_op\", ops: [\"automation.script\"], platforms: [\"darwin\", \"win32\"], summary: \"AppleScript on a Mac, PowerShell on Windows\" },\n { name: \"desktop_mail\", group: \"personal_automation\", state: \"planned\", path: \"device_op\", ops: [\"mail.accounts\", \"mail.list\", \"mail.send\"], platforms: [\"darwin\"], summary: \"The Mail app\" },\n { name: \"desktop_messages\", group: \"personal_automation\", state: \"planned\", path: \"device_op\", ops: [\"messages.conversations\", \"messages.list\", \"messages.send\"], platforms: [\"darwin\"], summary: \"The Messages app\" },\n { name: \"desktop_contacts\", group: \"personal_automation\", state: \"planned\", path: \"device_op\", ops: [\"contacts.search\", \"contacts.get\"], platforms: [\"darwin\"], summary: \"Contacts\" },\n { name: \"desktop_calendar\", group: \"personal_automation\", state: \"planned\", path: \"device_op\", ops: [\"calendar.list\", \"calendar.create\", \"reminders.list\", \"reminders.create\"], platforms: [\"darwin\"], summary: \"Calendar and reminders\" },\n { name: \"desktop_photos\", group: \"personal_automation\", state: \"planned\", path: \"device_op\", ops: [\"photos.search\", \"photos.get\"], platforms: [\"darwin\"], summary: \"Photos library\" },\n { name: \"desktop_location\", group: \"personal_automation\", state: \"planned\", path: \"device_op\", ops: [\"location.get\"], platforms: [\"darwin\", \"win32\"], summary: \"Where the computer is\" },\n { name: \"desktop_net\", group: \"personal_automation\", state: \"planned\", path: \"device_op\", ops: [\"net.info\", \"net.wifi\", \"net.bluetooth\", \"net.devices\", \"net.mdns\", \"net.scan\", \"net.download\"], platforms: ALL, summary: \"Local network and downloads\" },\n\n // ── 4. Python `tools` service ────────────────────────────────────────────────────────────────\n { name: \"desktop_documents\", group: \"tools_service\", state: \"planned\", path: \"device_op\", ops: [\"tools.pdf_extract\", \"tools.office_generate\", \"tools.ocr\", \"tools.image_resize\"], platforms: ALL, summary: \"PDF text, Office files, OCR, images\" },\n { name: \"desktop_web\", group: \"tools_service\", state: \"built\", path: \"device_op\", ops: [\"web.fetch\", \"web.scrape\", \"web.search\", \"web.fetch_with_browser\"], platforms: ALL, summary: \"Fetch, scrape and search the web from this computer's own connection\" },\n { name: \"desktop_entities\", group: \"tools_service\", state: \"planned\", path: \"device_op\", ops: [\"tools.ner\", \"tools.pii\"], platforms: ALL, summary: \"Names and private data, found on the device\" },\n\n // ── 5. Python `ml` service ───────────────────────────────────────────────────────────────────\n // Built: models.transcribe through local_proxy's POST /op/{cap.op} (matrx-ai implementations/desktop.py).\n // Whisper detects the language itself, so matrx-local's speech_locales needs no op of its own.\n { name: \"desktop_transcribe\", group: \"ml_service\", state: \"built\", path: \"device_op\", ops: [\"models.transcribe\"], platforms: ALL, summary: \"Speech to text on the device\" },\n\n // ── 6. Windows administration ────────────────────────────────────────────────────────────────\n { name: \"desktop_windows_admin\", group: \"windows_admin\", state: \"planned\", path: \"device_op\", ops: [\"windows.registry_read\", \"windows.registry_write\", \"windows.services\", \"windows.service_control\", \"windows.event_log\", \"windows.features\"], platforms: [\"win32\"], summary: \"Registry, services, event log\" },\n];\n\n/**\n * Tools armed with a device binding that are deliberately NOT device tools, each with its reason.\n * They run on the server; the status table does not track them.\n */\nexport const EXCLUDED_TOOLS: Readonly<Record<string, string>> = {\n git_ingest:\n \"Runs on the server: it ingests repository URLs. A local path on a bound computer or sandbox is refused with the fs_* and shell remedy, since the server cannot see it\",\n};\n\n/** What became of one matrx-local handler. */\nexport type LegacyDisposition =\n | { readonly kind: \"tool\"; readonly tool: string }\n | { readonly kind: \"dropped\"; readonly reason: string };\n\nconst tool = (name: string): LegacyDisposition => ({ kind: \"tool\", tool: name });\nconst dropped = (reason: string): LegacyDisposition => ({ kind: \"dropped\", reason });\n\nconst SHELL_COVERS = \"Done with shell_execute (mv, cp, rm, tar), as every coding agent does\";\nconst CLOUD_SCRAPER = \"The cloud scraper and research tools run with this computer as their network (the `proxy` capability)\";\n\n/** matrx-local's 120 actions (`app/tools/actions.py` ACTION_GROUPS), keyed `<mega tool>.<action>`. */\nexport const LEGACY_ACTIONS: Readonly<Record<string, LegacyDisposition>> = {\n \"local_file.read\": tool(\"fs_read\"),\n \"local_file.write\": tool(\"fs_write\"),\n \"local_file.edit\": tool(\"fs_edit\"),\n \"local_file.move\": dropped(SHELL_COVERS),\n \"local_file.copy\": dropped(SHELL_COVERS),\n \"local_file.delete\": dropped(SHELL_COVERS),\n \"local_file.rename\": dropped(SHELL_COVERS),\n \"local_file.mkdir\": tool(\"fs_mkdir\"),\n \"local_file.glob\": tool(\"fs_search\"),\n \"local_file.grep\": tool(\"fs_search\"),\n \"local_file.list\": tool(\"fs_list\"),\n \"local_file.places\": dropped(\"The device's home and folders reach the agent in its binding briefing (sysinfo.get)\"),\n \"local_file.find\": tool(\"fs_search\"),\n \"local_file.semantic_find\": dropped(\"Needs a local embedding index; returns with file sync's index, not before\"),\n\n \"local_shell.run\": tool(\"shell_execute\"),\n \"local_shell.output\": tool(\"shell_job\"),\n \"local_shell.stop\": tool(\"shell_job\"),\n\n \"local_window.list\": tool(\"desktop_window\"),\n \"local_window.focus\": tool(\"desktop_window\"),\n \"local_window.move\": tool(\"desktop_window\"),\n \"local_window.minimize\": tool(\"desktop_window\"),\n\n \"local_process.list\": tool(\"desktop_process\"),\n \"local_process.ports\": tool(\"desktop_process\"),\n \"local_process.launch_app\": tool(\"desktop_apps\"),\n \"local_process.kill\": tool(\"desktop_process\"),\n \"local_process.focus_app\": tool(\"desktop_apps\"),\n \"local_process.terminals\": dropped(\"Matrx 2 terminals are exec sessions; the person's own terminal windows are not the agent's\"),\n \"local_process.tail_terminal\": dropped(\"Matrx 2 terminals are exec sessions; the person's own terminal windows are not the agent's\"),\n \"local_process.installed_apps\": tool(\"desktop_apps\"),\n\n \"local_input.type_text\": tool(\"desktop_input\"),\n \"local_input.hotkey\": tool(\"desktop_input\"),\n \"local_input.mouse_click\": tool(\"desktop_input\"),\n \"local_input.mouse_move\": tool(\"desktop_input\"),\n\n \"local_audio.devices\": tool(\"desktop_audio\"),\n \"local_audio.record\": tool(\"desktop_audio\"),\n \"local_audio.play\": tool(\"desktop_audio\"),\n \"local_audio.transcribe\": tool(\"desktop_transcribe\"),\n \"local_audio.transcribe_with_speech\": tool(\"desktop_transcribe\"),\n \"local_audio.speech_locales\": tool(\"desktop_transcribe\"),\n\n \"local_clipboard.read\": tool(\"desktop_clipboard\"),\n \"local_clipboard.write\": tool(\"desktop_clipboard\"),\n\n \"local_screen.screenshot\": tool(\"desktop_screen\"),\n \"local_screen.list\": tool(\"desktop_screen\"),\n \"local_screen.capture_book\": dropped(\"A one-off loop of screenshot plus page turn; the agent composes it from desktop_screen and desktop_input\"),\n\n \"local_system.info\": tool(\"desktop_system\"),\n \"local_system.open_url\": tool(\"desktop_system\"),\n \"local_system.open_path\": tool(\"desktop_system\"),\n \"local_system.notify\": tool(\"desktop_system\"),\n\n \"local_browser.navigate\": dropped(\"The browser agent is the extension (matrx-extend) and the cloud browser; a second Playwright on the device duplicates it\"),\n \"local_browser.click\": dropped(\"The browser agent is the extension (matrx-extend) and the cloud browser\"),\n \"local_browser.type_text\": dropped(\"The browser agent is the extension (matrx-extend) and the cloud browser\"),\n \"local_browser.extract\": dropped(\"The browser agent is the extension (matrx-extend) and the cloud browser\"),\n \"local_browser.screenshot\": dropped(\"The browser agent is the extension (matrx-extend) and the cloud browser\"),\n \"local_browser.eval\": dropped(\"The browser agent is the extension (matrx-extend) and the cloud browser\"),\n \"local_browser.tabs\": dropped(\"The browser agent is the extension (matrx-extend) and the cloud browser\"),\n \"local_browser.close\": dropped(\"The browser agent is the extension (matrx-extend) and the cloud browser\"),\n\n \"local_web.fetch\": tool(\"desktop_web\"),\n \"local_web.fetch_with_browser\": tool(\"desktop_web\"),\n \"local_web.scrape\": tool(\"desktop_web\"),\n \"local_web.search\": tool(\"desktop_web\"),\n \"local_web.research\": dropped(CLOUD_SCRAPER),\n \"local_web.download\": tool(\"desktop_net\"),\n \"local_web.upload\": dropped(\"Uploads are cloud files (matrx-files) and file sync, one upload path\"),\n\n \"local_net.info\": tool(\"desktop_net\"),\n \"local_net.scan\": tool(\"desktop_net\"),\n \"local_net.port_scan\": tool(\"desktop_net\"),\n \"local_net.mdns_discover\": tool(\"desktop_net\"),\n \"local_net.wifi_networks\": tool(\"desktop_net\"),\n \"local_net.bluetooth_devices\": tool(\"desktop_net\"),\n \"local_net.connected_devices\": tool(\"desktop_net\"),\n\n \"local_monitor.resources\": tool(\"desktop_resources\"),\n \"local_monitor.battery\": tool(\"desktop_power\"),\n \"local_monitor.disk_usage\": tool(\"desktop_resources\"),\n \"local_monitor.top_processes\": tool(\"desktop_process\"),\n \"local_monitor.watch_directory\": tool(\"fs_watch\"),\n \"local_monitor.watch_events\": tool(\"fs_watch\"),\n \"local_monitor.stop_watch\": tool(\"fs_watch\"),\n \"local_monitor.heartbeat\": dropped(\"The relay's device status replaces the heartbeat\"),\n\n \"local_schedule.create\": dropped(\"One scheduler: the platform's runs the agent on time and reaches the device through the relay\"),\n \"local_schedule.list\": dropped(\"One scheduler: the platform's runs the agent on time and reaches the device through the relay\"),\n \"local_schedule.cancel\": dropped(\"One scheduler: the platform's runs the agent on time and reaches the device through the relay\"),\n \"local_schedule.prevent_sleep\": tool(\"desktop_power\"),\n\n \"local_documents.list\": dropped(\"matrx-local's private document store is gone; documents are files (fs_*) or cloud Knowledge\"),\n \"local_documents.folders\": dropped(\"matrx-local's private document store is gone; documents are files (fs_*) or cloud Knowledge\"),\n \"local_documents.read\": dropped(\"matrx-local's private document store is gone; documents are files (fs_*) or cloud Knowledge\"),\n \"local_documents.write\": dropped(\"matrx-local's private document store is gone; documents are files (fs_*) or cloud Knowledge\"),\n \"local_documents.search\": dropped(\"matrx-local's private document store is gone; documents are files (fs_*) or cloud Knowledge\"),\n\n \"local_media.ocr\": tool(\"desktop_documents\"),\n \"local_media.resize\": tool(\"desktop_documents\"),\n \"local_media.pdf_extract\": tool(\"desktop_documents\"),\n \"local_media.office_generate\": tool(\"desktop_documents\"),\n \"local_media.archive_create\": dropped(SHELL_COVERS),\n \"local_media.archive_extract\": dropped(SHELL_COVERS),\n\n \"local_ner.entities\": tool(\"desktop_entities\"),\n \"local_ner.pii\": tool(\"desktop_entities\"),\n\n \"local_mac_apps.applescript\": tool(\"desktop_automation\"),\n \"local_mac_apps.list_emails\": tool(\"desktop_mail\"),\n \"local_mac_apps.send_email\": tool(\"desktop_mail\"),\n \"local_mac_apps.email_accounts\": tool(\"desktop_mail\"),\n \"local_mac_apps.list_messages\": tool(\"desktop_messages\"),\n \"local_mac_apps.list_conversations\": tool(\"desktop_messages\"),\n \"local_mac_apps.send_message\": tool(\"desktop_messages\"),\n \"local_mac_apps.search_contacts\": tool(\"desktop_contacts\"),\n \"local_mac_apps.get_contact\": tool(\"desktop_contacts\"),\n \"local_mac_apps.list_events\": tool(\"desktop_calendar\"),\n \"local_mac_apps.create_event\": tool(\"desktop_calendar\"),\n \"local_mac_apps.list_reminders\": tool(\"desktop_calendar\"),\n \"local_mac_apps.create_reminder\": tool(\"desktop_calendar\"),\n \"local_mac_apps.search_photos\": tool(\"desktop_photos\"),\n \"local_mac_apps.get_photo\": tool(\"desktop_photos\"),\n \"local_mac_apps.location\": tool(\"desktop_location\"),\n\n \"local_windows_ps.run\": tool(\"desktop_automation\"),\n \"local_windows_ps.get_env\": dropped(\"Read with shell_execute; a per-command env rides exec.run\"),\n \"local_windows_ps.set_env\": dropped(\"Changing the person's persistent environment is not an agent tool\"),\n \"local_windows_ps.registry_read\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.registry_write\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.service_list\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.service_control\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.event_log\": tool(\"desktop_windows_admin\"),\n \"local_windows_ps.windows_features\": tool(\"desktop_windows_admin\"),\n};\n\n/**\n * matrx-local's 19 action-enum dispatchers. Each fanned an `action` out to the handlers above and\n * did nothing else; they retire with the `matrx-local` executor binding (the platform reaches a\n * device through the relay now, never by client delegation).\n */\nexport const LEGACY_DISPATCHERS: readonly string[] = [\n \"local_file\",\n \"local_shell\",\n \"local_window\",\n \"local_process\",\n \"local_input\",\n \"local_audio\",\n \"local_clipboard\",\n \"local_screen\",\n \"local_system\",\n \"local_browser\",\n \"local_web\",\n \"local_net\",\n \"local_monitor\",\n \"local_schedule\",\n \"local_documents\",\n \"local_media\",\n \"local_ner\",\n \"local_mac_apps\",\n \"local_windows_ps\",\n];\n\n/** Built tools' ops, typed: a built tool naming an op the protocol does not have fails to compile in the test. */\nexport function builtOps(): OpName[] {\n return TOOL_CATALOG.filter((t) => t.state === \"built\").flatMap((t) => t.ops as OpName[]);\n}\n","/**\n * The generated tool status table (SPEC §10): tool × level × platform, built ONLY from harness\n * results (`ToolResultsFile`) joined with the catalog. Never written by hand; the one status anyone\n * cites. `renderToolStatusMarkdown` is the committed text form; screens render `ToolStatus` itself.\n */\nimport { ToolResultsFile, type ToolLevel, type ToolLevelResult, type ToolPlatform, type ToolTransport } from \"../schema/tools\";\nimport { EXCLUDED_TOOLS, TOOL_CATALOG, TOOL_GROUPS, type CatalogTool, type ToolGroupId, type ToolState } from \"./catalog\";\n\nexport const TOOL_LEVELS: readonly ToolLevel[] = [\"programmatic\", \"protocol\", \"chat\"];\nexport const TOOL_PLATFORMS: readonly ToolPlatform[] = [\"darwin\", \"win32\", \"linux\"];\n\n/**\n * `pass`: every required proof passed and none failed. `partial`: passes so far, a required proof\n * missing (`missing` says which). `fail`: the latest run of some proof failed. `untested`: nothing\n * ran. `not_built`: the tool is planned. `unsupported`: the tool does not exist on this platform.\n */\nconst UUID_IN_NAME = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi;\n\nexport type CellState = \"pass\" | \"partial\" | \"fail\" | \"untested\" | \"not_built\" | \"unsupported\";\n\nexport interface StatusEvidence {\n readonly suite: string;\n readonly test: string;\n readonly transport: ToolTransport;\n readonly outcome: ToolLevelResult[\"outcome\"];\n readonly remote_network: boolean;\n readonly commit: string;\n readonly run_at_ms: number;\n readonly detail: string;\n}\n\nexport interface StatusCell {\n readonly state: CellState;\n /** Required proofs not yet passed, e.g. \"relay from another network\". */\n readonly missing: readonly string[];\n readonly last_run_at_ms: number | null;\n readonly evidence: readonly StatusEvidence[];\n}\n\nexport interface StatusRow {\n readonly tool: string;\n readonly group: ToolGroupId;\n readonly tool_state: ToolState;\n readonly summary: string;\n readonly note: string | null;\n readonly cells: Readonly<Record<ToolPlatform, Readonly<Record<ToolLevel, StatusCell>>>>;\n /** Working on a platform = all three levels pass there (SPEC §10). */\n readonly working: Readonly<Record<ToolPlatform, boolean>>;\n}\n\nexport interface ToolStatus {\n readonly schema: \"matrx.tool-status.v1\";\n readonly generated_at_ms: number;\n readonly commits: readonly string[];\n readonly rows: readonly StatusRow[];\n readonly totals: Readonly<Record<ToolPlatform, { readonly working: number; readonly built: number; readonly tools: number }>>;\n}\n\n/** What each level needs before it reads `pass`. Level 2 is the transports AND the relay from another network. */\nconst REQUIRED: Readonly<Record<ToolLevel, readonly { readonly label: string; readonly ok: (e: StatusEvidence) => boolean }[]>> = {\n programmatic: [{ label: \"in process\", ok: (e) => e.transport === \"in_process\" }],\n protocol: [\n { label: \"localhost\", ok: (e) => e.transport === \"localhost\" },\n { label: \"relay\", ok: (e) => e.transport === \"relay\" },\n { label: \"relay from another network\", ok: (e) => e.transport === \"relay\" && e.remote_network },\n ],\n chat: [{ label: \"a real agent in a real chat\", ok: (e) => e.transport === \"agent\" }],\n};\n\nfunction cellFor(tool: CatalogTool, platform: ToolPlatform, level: ToolLevel, evidence: StatusEvidence[]): StatusCell {\n if (!tool.platforms.includes(platform)) return { state: \"unsupported\", missing: [], last_run_at_ms: null, evidence: [] };\n // The latest run of each (suite, test, transport, network) decides; older runs are history.\n const latest = new Map<string, StatusEvidence>();\n for (const e of evidence) {\n // A uuid in a test name (the agent a chat proof ran, a conversation) is run data, never the\n // proof's identity: the same proof under a new test agent replaces the old one's result.\n const key = `${e.suite}\\u0000${e.test.replace(UUID_IN_NAME, \"<id>\")}\\u0000${e.transport}\\u0000${e.remote_network}`;\n const prev = latest.get(key);\n if (!prev || prev.run_at_ms < e.run_at_ms) latest.set(key, e);\n }\n const runs = [...latest.values()].filter((e) => e.outcome !== \"skip\").sort((a, b) => b.run_at_ms - a.run_at_ms);\n const last = runs[0]?.run_at_ms ?? null;\n if (tool.state === \"planned\" && runs.length === 0) return { state: \"not_built\", missing: [], last_run_at_ms: null, evidence: [] };\n if (runs.length === 0) return { state: \"untested\", missing: REQUIRED[level].map((r) => r.label), last_run_at_ms: null, evidence: [...latest.values()] };\n if (runs.some((e) => e.outcome === \"fail\")) return { state: \"fail\", missing: [], last_run_at_ms: last, evidence: runs };\n const missing = REQUIRED[level].filter((r) => !runs.some((e) => e.outcome === \"pass\" && r.ok(e))).map((r) => r.label);\n return { state: missing.length === 0 ? \"pass\" : \"partial\", missing, last_run_at_ms: last, evidence: runs };\n}\n\n/** Build the table from every results file. Throws when a file is off-contract (never silently skipped). */\nexport function buildToolStatus(files: readonly unknown[], opts: { readonly generatedAtMs: number }): ToolStatus {\n const parsed = files.map((f, i) => {\n const r = ToolResultsFile.safeParse(f);\n if (!r.success) throw new Error(`tool results file #${i} is off-contract: ${r.error.issues[0]?.path.join(\".\")} ${r.error.issues[0]?.message}`);\n return r.data;\n });\n const known = new Set(TOOL_CATALOG.map((t) => t.name));\n const byKey = new Map<string, StatusEvidence[]>();\n for (const file of parsed) {\n for (const r of file.results) {\n if (!known.has(r.tool)) throw new Error(`a result names ${r.tool}, which is not in the tool catalog`);\n const key = `${r.tool}|${r.platform}|${r.level}`;\n const list = byKey.get(key) ?? [];\n list.push({ suite: r.suite, test: r.test, transport: r.transport, outcome: r.outcome, remote_network: r.remote_network, commit: file.commit, run_at_ms: r.run_at_ms, detail: r.detail });\n byKey.set(key, list);\n }\n }\n const groupOrder = new Map(TOOL_GROUPS.map((g) => [g.id, g.order]));\n const tools = [...TOOL_CATALOG].sort((a, b) => (groupOrder.get(a.group) ?? 99) - (groupOrder.get(b.group) ?? 99));\n const rows: StatusRow[] = tools.map((tool) => {\n const cells = {} as Record<ToolPlatform, Record<ToolLevel, StatusCell>>;\n const working = {} as Record<ToolPlatform, boolean>;\n for (const platform of TOOL_PLATFORMS) {\n const perLevel = {} as Record<ToolLevel, StatusCell>;\n for (const level of TOOL_LEVELS) perLevel[level] = cellFor(tool, platform, level, byKey.get(`${tool.name}|${platform}|${level}`) ?? []);\n cells[platform] = perLevel;\n working[platform] = TOOL_LEVELS.every((l) => perLevel[l].state === \"pass\");\n }\n return { tool: tool.name, group: tool.group, tool_state: tool.state, summary: tool.summary, note: tool.note ?? null, cells, working };\n });\n const totals = {} as Record<ToolPlatform, { working: number; built: number; tools: number }>;\n for (const platform of TOOL_PLATFORMS) {\n const onPlatform = TOOL_CATALOG.filter((t) => t.platforms.includes(platform));\n totals[platform] = {\n working: rows.filter((r) => r.working[platform]).length,\n built: onPlatform.filter((t) => t.state !== \"planned\").length,\n tools: onPlatform.length,\n };\n }\n const commits = [...new Set(parsed.map((f) => f.commit))].sort();\n return { schema: \"matrx.tool-status.v1\", generated_at_ms: opts.generatedAtMs, commits, rows, totals };\n}\n\nconst MARK: Readonly<Record<CellState, string>> = { pass: \"✓\", partial: \"◐\", fail: \"✗\", untested: \"·\", not_built: \"—\", unsupported: \" \" };\n\n/** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */\nexport function renderToolStatusMarkdown(status: ToolStatus): string {\n const lines: string[] = [\n \"<!-- GENERATED by `pnpm tools:status` from test results. Never edit by hand. -->\",\n \"# Local tools: status\",\n \"\",\n `Generated ${new Date(status.generated_at_ms).toISOString()} from commits ${status.commits.join(\", \") || \"none\"}.`,\n \"\",\n \"✓ pass · ◐ passing so far, a required proof missing · ✗ fail · `·` untested · — not built. Levels: P programmatic, R protocol, C chat.\",\n \"\",\n \"| Platform | Working | Built | Tools |\",\n \"|---|---|---|---|\",\n ...TOOL_PLATFORMS.map((p) => `| ${p} | ${status.totals[p].working} | ${status.totals[p].built} | ${status.totals[p].tools} |`),\n \"\",\n ];\n for (const group of TOOL_GROUPS) {\n const rows = status.rows.filter((r) => r.group === group.id);\n if (rows.length === 0) continue;\n lines.push(`## ${group.order}. ${group.title}`, \"\", \"| Tool | darwin P R C | win32 P R C | linux P R C | Missing |\", \"|---|---|---|---|---|\");\n for (const r of rows) {\n const cols = TOOL_PLATFORMS.map((p) => TOOL_LEVELS.map((l) => MARK[r.cells[p][l].state]).join(\" \"));\n const missing = new Set<string>();\n for (const p of TOOL_PLATFORMS) for (const l of TOOL_LEVELS) for (const m of r.cells[p][l].missing) if (r.cells[p][l].state !== \"untested\") missing.add(`${p} ${l}: ${m}`);\n const name = r.tool_state === \"broken\" ? `${r.tool} (broken: ${r.note ?? \"\"})` : r.tool;\n lines.push(`| ${name} | ${cols.join(\" | \")} | ${[...missing].join(\"; \")} |`);\n }\n lines.push(\"\");\n }\n const excluded = Object.entries(EXCLUDED_TOOLS);\n if (excluded.length > 0) {\n lines.push(\"## Not device tools\", \"\", \"| Tool | Why |\", \"|---|---|\", ...excluded.map(([name, why]) => `| ${name} | ${why} |`), \"\");\n }\n return lines.join(\"\\n\");\n}\n"],"mappings":";AACA,SAAS,SAAS;AAClB,SAAS,0BAA0B;AAM5B,IAAM,iBAAiB;AAmDvB,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A,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,E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MAAM,KAAK,IAAI;AACxB;","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","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","next","tool","rows","cols"]}
|