@ai-matrx/desktop-protocol 0.16.1 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { O as OpName } from './models-CCOaAWaM.cjs';
3
- export { B as BEARER_PREFIX, g as CLOSE_RULES, h as CancelMsg, j as ClientToCoreMsg, e as ClientType, k as CloseAction, l as CloseCode, m as CloseCodeValue, C as CloseOutcome, n as CloseRule, o as CoreToClientMsg, p as CreditMsg, D as DesktopProtocolError, d as EVENTS, q as EndMsg, E as EndReason, r as ErrorCode, s as ErrorCodeName, t as ErrorData, u as ErrorMsg, v as ErrorReason, w as ErrorReasonName, x as EventMsg, y as EventName, F as FsPatchEditFailure, H as HelloMsg, L as Limits, z as MlInstallPhase, A as MlInstallProgress, f as MlProgress, G as MlRuntimeState, I as MlServiceState, J as MlServiceStatus, K as MlStatusParams, N as MlStatusResult, P as ModelsInstallParams, Q as ModelsInstallResult, R as ModelsProgressEvent, U as ModelsStatusParams, V as ModelsStatusResult, X as ModelsTranscribeParams, M as ModelsTranscribeResult, Y as NAMED_SCHEMAS, Z as NamedSchemaId, c as OPS, _ as OpDescriptor, a as OpParams, b as OpResult, $ as OpSpec, a0 as PING_TEXT, a1 as PONG_TEXT, a2 as ProtocolErrorBody, a3 as RelayMsg, a4 as RequestMsg, a5 as ResponseMsg, a6 as SERVICES, a7 as SUBPROTOCOL, a8 as ServiceId, a9 as ServiceOpName, aa as ServiceOpSpec, ab as ServiceSpec, S as StreamMeta, ac as StreamMsg, ad as TranscriptSegment, T as TranscriptionModelId, ae as TranscriptionModelInfo, W as Welcome, af as closeRule, i as isDesktopProtocolError, ag as isTerminalClose } from './models-CCOaAWaM.cjs';
2
+ import { O as OpName } from './models-Dj_B9wHj.cjs';
3
+ export { B as BEARER_PREFIX, g as CLOSE_RULES, h as CancelMsg, j as ClientToCoreMsg, e as ClientType, k as CloseAction, l as CloseCode, m as CloseCodeValue, C as CloseOutcome, n as CloseRule, o as CoreToClientMsg, p as CreditMsg, D as DesktopProtocolError, d as EVENTS, q as EndMsg, E as EndReason, r as ErrorCode, s as ErrorCodeName, t as ErrorData, u as ErrorMsg, v as ErrorReason, w as ErrorReasonName, x as EventMsg, y as EventName, F as FsPatchEditFailure, H as HelloMsg, L as Limits, z as MlInstallPhase, A as MlInstallProgress, f as MlProgress, G as MlRuntimeState, I as MlServiceState, J as MlServiceStatus, K as MlStatusParams, N as MlStatusResult, P as ModelsInstallParams, Q as ModelsInstallResult, R as ModelsProgressEvent, U as ModelsStatusParams, V as ModelsStatusResult, X as ModelsTranscribeParams, M as ModelsTranscribeResult, Y as NAMED_SCHEMAS, Z as NamedSchemaId, c as OPS, _ as OpDescriptor, a as OpParams, b as OpResult, $ as OpSpec, a0 as PING_TEXT, a1 as PONG_TEXT, a2 as ProtocolErrorBody, a3 as RelayMsg, a4 as RequestMsg, a5 as ResponseMsg, a6 as SERVICES, a7 as SUBPROTOCOL, a8 as ServiceId, a9 as ServiceOpName, aa as ServiceOpSpec, ab as ServiceSpec, S as StreamMeta, ac as StreamMsg, ad as TranscriptSegment, T as TranscriptionModelId, ae as TranscriptionModelInfo, W as Welcome, af as closeRule, i as isDesktopProtocolError, ag as isTerminalClose } from './models-Dj_B9wHj.cjs';
4
4
  export { BROADCAST_CID, DecodedFrame, FRAME_HEADER_BYTES, FRAME_STRUCT_FORMAT, FRAME_VERSION, FrameChannel, FrameChannelValue, FrameFlag, assertFrameHeader, connectionEndFrame, decodeFrame, encodeFrame, hasFlag, isConnectionEnd, readCid, stampCid } from './frame.cjs';
5
5
 
6
6
  /** @ai-matrx/desktop-protocol — version and primitive schemas. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */
@@ -18,10 +18,11 @@ declare const PROTOCOL_MAJOR: 1;
18
18
  * folder watches (fs.watch.start/events/stop) and background jobs (exec.job.*).
19
19
  * 1.5 — `coding.history.import_missing`: Claude Code history the platform lacks, imported by the
20
20
  * `coding` Python service.
21
+ * 1.6 — the `audio` capability: devices, record a clip to a WAV file, play a file.
21
22
  */
22
- declare const PROTOCOL_MINOR: 5;
23
+ declare const PROTOCOL_MINOR: 6;
23
24
  /** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
24
- declare const PROTOCOL_VERSION: "1.5";
25
+ declare const PROTOCOL_VERSION: "1.6";
25
26
  /** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
26
27
  declare const u32: z.ZodInt;
27
28
  declare const nonNegInt: z.ZodInt;
@@ -2292,6 +2293,55 @@ declare const ResourcesSnapshotResult: z.ZodObject<{
2292
2293
  }, z.core.$strict>;
2293
2294
  type ResourcesSnapshotResult = z.output<typeof ResourcesSnapshotResult>;
2294
2295
 
2296
+ /**
2297
+ * @ai-matrx/desktop-protocol — cap audio (SPEC §6): the person's microphones and speakers; record a
2298
+ * clip to a file, play a file. Speech to text is models.transcribe. Schema source: lint-enforced
2299
+ * rules in scripts/check-schema-source.mjs. Added in protocol 1.6.
2300
+ */
2301
+
2302
+ declare const AudioDevicesParams: z.ZodObject<{}, z.core.$strict>;
2303
+ declare const AudioDevice: z.ZodObject<{
2304
+ id: z.ZodString;
2305
+ name: z.ZodString;
2306
+ default: z.ZodBoolean;
2307
+ }, z.core.$strict>;
2308
+ type AudioDevice = z.output<typeof AudioDevice>;
2309
+ declare const AudioDevicesResult: z.ZodObject<{
2310
+ inputs: z.ZodArray<z.ZodObject<{
2311
+ id: z.ZodString;
2312
+ name: z.ZodString;
2313
+ default: z.ZodBoolean;
2314
+ }, z.core.$strict>>;
2315
+ outputs: z.ZodArray<z.ZodObject<{
2316
+ id: z.ZodString;
2317
+ name: z.ZodString;
2318
+ default: z.ZodBoolean;
2319
+ }, z.core.$strict>>;
2320
+ }, z.core.$strict>;
2321
+ type AudioDevicesResult = z.output<typeof AudioDevicesResult>;
2322
+ declare const AudioRecordParams: z.ZodObject<{
2323
+ seconds: z.ZodNumber;
2324
+ device_id: z.ZodOptional<z.ZodString>;
2325
+ path: z.ZodOptional<z.ZodString>;
2326
+ }, z.core.$strict>;
2327
+ type AudioRecordParams = z.output<typeof AudioRecordParams>;
2328
+ declare const AudioRecordResult: z.ZodObject<{
2329
+ path: z.ZodString;
2330
+ seconds: z.ZodNumber;
2331
+ bytes: z.ZodInt;
2332
+ peak: z.ZodNumber;
2333
+ }, z.core.$strict>;
2334
+ type AudioRecordResult = z.output<typeof AudioRecordResult>;
2335
+ declare const AudioPlayParams: z.ZodObject<{
2336
+ path: z.ZodString;
2337
+ }, z.core.$strict>;
2338
+ type AudioPlayParams = z.output<typeof AudioPlayParams>;
2339
+ declare const AudioPlayResult: z.ZodObject<{
2340
+ path: z.ZodString;
2341
+ seconds: z.ZodNumber;
2342
+ }, z.core.$strict>;
2343
+ type AudioPlayResult = z.output<typeof AudioPlayResult>;
2344
+
2295
2345
  /**
2296
2346
  * @ai-matrx/desktop-protocol — cap fs, polled watches (SPEC §6): watch a folder and read what
2297
2347
  * changed since the last read, for callers that ask rather than hold a stream (an agent's tool
@@ -2676,7 +2726,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
2676
2726
  declare const VERSIONED_RESULT_OPS: readonly OpName[];
2677
2727
 
2678
2728
  /** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
2679
- declare const CONTRACT_SHA256: "c49a85cdd157d6f50e0050e86d4ea789e916c05a0bf16c8002d833b57225548d";
2729
+ declare const CONTRACT_SHA256: "2cbf3c7589a30141305f6f0f38c4d4a32bf9ef2a890f7572d9c7bd15c398d4b9";
2680
2730
 
2681
2731
  /**
2682
2732
  * The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
@@ -2757,11 +2807,6 @@ declare function builtOps(): OpName[];
2757
2807
 
2758
2808
  declare const TOOL_LEVELS: readonly ToolLevel[];
2759
2809
  declare const TOOL_PLATFORMS: readonly ToolPlatform[];
2760
- /**
2761
- * `pass`: every required proof passed and none failed. `partial`: passes so far, a required proof
2762
- * missing (`missing` says which). `fail`: the latest run of some proof failed. `untested`: nothing
2763
- * ran. `not_built`: the tool is planned. `unsupported`: the tool does not exist on this platform.
2764
- */
2765
2810
  type CellState = "pass" | "partial" | "fail" | "untested" | "not_built" | "unsupported";
2766
2811
  interface StatusEvidence {
2767
2812
  readonly suite: string;
@@ -2808,4 +2853,4 @@ declare function buildToolStatus(files: readonly unknown[], opts: {
2808
2853
  /** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */
2809
2854
  declare function renderToolStatusMarkdown(status: ToolStatus): string;
2810
2855
 
2811
- export { AbsPath, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, CONTRACT_SHA256, type CatalogTool, type CellState, ClipboardReadParams, ClipboardReadResult, ClipboardWriteParams, ClipboardWriteResult, CodingHistoryBlocked, CodingHistoryFailure, CodingHistoryImportMissingParams, CodingHistoryImportMissingResult, CodingHistoryProgressEvent, CodingHistoryRun, CodingHistoryStep, CodingImportNextParams, CodingPlanMissingParams, CodingServiceCredentials, CodingServiceProgress, ContractHash, CoreToServiceMsg, DEFAULT_MAX_FRAME_PAYLOAD_BYTES, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_WINDOW_BYTES, DeviceId, EXCLUDED_TOOLS, ExecCwdEvent, ExecExitedEvent, ExecJobId, ExecJobInfo, ExecJobListParams, ExecJobListResult, ExecJobOutputParams, ExecJobOutputResult, ExecJobStartParams, ExecJobStartResult, ExecJobStopParams, ExecJobStopResult, ExecListParams, ExecListResult, ExecPtyKillParams, ExecPtyKillResult, ExecPtyResizeParams, ExecPtyResizeResult, ExecPtySignalParams, ExecPtySignalResult, ExecPtyStartParams, ExecPtyStartResult, ExecPtyWriteParams, ExecPtyWriteResult, ExecRunParams, ExecRunResult, ExecTitleEvent, FIELDS_SINCE, type FieldsSincePath, FrameHeader, FsChange, FsChangedEvent, FsDeleteParams, FsDeleteResult, FsEncoding, FsEntry, FsKind, FsListParams, FsListResult, FsMkdirParams, FsMkdirResult, FsMoveParams, FsMoveResult, FsPatchEditApplied, FsPatchParams, FsPatchResult, FsReadParams, FsReadResult, FsReadStreamParams, FsReadStreamResult, FsSearchContentParams, FsSearchContentResult, FsSearchPathsParams, FsSearchPathsResult, FsStatParams, FsStatResult, FsWatchEventsParams, FsWatchEventsResult, FsWatchId, FsWatchParams, FsWatchResult, FsWatchStartParams, FsWatchStartResult, FsWatchStopParams, FsWatchStopResult, FsWriteParams, FsWriteResult, InputHotkeyParams, InputHotkeyResult, InputKey, InputMouseClickParams, InputMouseClickResult, InputMouseMoveParams, InputMouseMoveResult, InputPoint, InputTypeTextParams, InputTypeTextResult, LEGACY_ACTIONS, LEGACY_DISPATCHERS, type LegacyDisposition, NULL_SINCE, OpName, OsPermissionName, PROTOCOL_MAJOR, PROTOCOL_MINOR, PROTOCOL_VERSION, PowerPreventSleepParams, PowerPreventSleepResult, PowerStatusParams, PowerStatusResult, ProcInfo, ProcKillParams, ProcKillResult, ProcListParams, ProcListResult, ProcPort, ProcPortsParams, ProcPortsResult, ProcSort, ProtocolVersion, PtyInfo, REASONS_SINCE, RELAY_CALL_HELLO_ID, RELAY_CALL_REQUEST_ID, RELAY_CALL_VERSION_HEADER, RelayAuthExpiringEvent, RelayCallEnvelope, RelayCallHello, RelayCallRequest, RelayCallResponse, RelayDeviceStatusEvent, RelayHopConnectionEnd, RelayHopEnvelopeHeader, RelayStatusResponse, RequestId, ResourceId, ResourceInfo, ResourcesDisk, ResourcesSnapshotParams, ResourcesSnapshotResult, SERVICE_MAX_FRAME_BYTES, ScreenCaptureParams, ScreenCaptureResult, ScreenDisplay, ScreenListParams, ScreenListResult, ServiceCancel, ServiceErrorMsg, ServiceHello, ServiceName, ServicePing, ServicePong, ServiceProgressMsg, ServiceRequest, ServiceResponse, ServiceShutdown, ServiceToCoreMsg, ServiceToken, ServiceWelcome, SessionAttachParams, SessionAttachResult, SessionControlChangedEvent, SessionDetachParams, SessionDetachResult, SessionListParams, SessionListResult, SessionReleaseParams, SessionReleaseResult, Signal, type StatusCell, type StatusEvidence, type StatusRow, SysinfoGetParams, SysinfoGetResult, SystemNotifyParams, SystemNotifyResult, SystemOpenPathParams, SystemOpenPathResult, SystemOpenUrlParams, SystemOpenUrlResult, TOOL_CATALOG, TOOL_GROUPS, TOOL_LEVELS, TOOL_PLATFORMS, type ToolGroup, type ToolGroupId, ToolLevel, ToolLevelResult, ToolName, ToolOutcome, type ToolPath, ToolPlatform, ToolResultsFile, type ToolState, type ToolStatus, ToolTransport, VERSIONED_RESULT_OPS, WindowFocusParams, WindowFocusResult, WindowInfo, WindowListParams, WindowListResult, WindowMinimizeParams, WindowMinimizeResult, WindowMoveParams, WindowMoveResult, announcedVersion, buildToolStatus, builtOps, compareVersions, epochMs, forPeer, knows, negotiate, nonNegInt, renderToolStatusMarkdown, statusForPeer, u32, versionSubprotocol };
2856
+ export { AbsPath, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, AudioDevice, AudioDevicesParams, AudioDevicesResult, AudioPlayParams, AudioPlayResult, AudioRecordParams, AudioRecordResult, CONTRACT_SHA256, type CatalogTool, type CellState, ClipboardReadParams, ClipboardReadResult, ClipboardWriteParams, ClipboardWriteResult, CodingHistoryBlocked, CodingHistoryFailure, CodingHistoryImportMissingParams, CodingHistoryImportMissingResult, CodingHistoryProgressEvent, CodingHistoryRun, CodingHistoryStep, CodingImportNextParams, CodingPlanMissingParams, CodingServiceCredentials, CodingServiceProgress, ContractHash, CoreToServiceMsg, DEFAULT_MAX_FRAME_PAYLOAD_BYTES, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_WINDOW_BYTES, DeviceId, EXCLUDED_TOOLS, ExecCwdEvent, ExecExitedEvent, ExecJobId, ExecJobInfo, ExecJobListParams, ExecJobListResult, ExecJobOutputParams, ExecJobOutputResult, ExecJobStartParams, ExecJobStartResult, ExecJobStopParams, ExecJobStopResult, ExecListParams, ExecListResult, ExecPtyKillParams, ExecPtyKillResult, ExecPtyResizeParams, ExecPtyResizeResult, ExecPtySignalParams, ExecPtySignalResult, ExecPtyStartParams, ExecPtyStartResult, ExecPtyWriteParams, ExecPtyWriteResult, ExecRunParams, ExecRunResult, ExecTitleEvent, FIELDS_SINCE, type FieldsSincePath, FrameHeader, FsChange, FsChangedEvent, FsDeleteParams, FsDeleteResult, FsEncoding, FsEntry, FsKind, FsListParams, FsListResult, FsMkdirParams, FsMkdirResult, FsMoveParams, FsMoveResult, FsPatchEditApplied, FsPatchParams, FsPatchResult, FsReadParams, FsReadResult, FsReadStreamParams, FsReadStreamResult, FsSearchContentParams, FsSearchContentResult, FsSearchPathsParams, FsSearchPathsResult, FsStatParams, FsStatResult, FsWatchEventsParams, FsWatchEventsResult, FsWatchId, FsWatchParams, FsWatchResult, FsWatchStartParams, FsWatchStartResult, FsWatchStopParams, FsWatchStopResult, FsWriteParams, FsWriteResult, InputHotkeyParams, InputHotkeyResult, InputKey, InputMouseClickParams, InputMouseClickResult, InputMouseMoveParams, InputMouseMoveResult, InputPoint, InputTypeTextParams, InputTypeTextResult, LEGACY_ACTIONS, LEGACY_DISPATCHERS, type LegacyDisposition, NULL_SINCE, OpName, OsPermissionName, PROTOCOL_MAJOR, PROTOCOL_MINOR, PROTOCOL_VERSION, PowerPreventSleepParams, PowerPreventSleepResult, PowerStatusParams, PowerStatusResult, ProcInfo, ProcKillParams, ProcKillResult, ProcListParams, ProcListResult, ProcPort, ProcPortsParams, ProcPortsResult, ProcSort, ProtocolVersion, PtyInfo, REASONS_SINCE, RELAY_CALL_HELLO_ID, RELAY_CALL_REQUEST_ID, RELAY_CALL_VERSION_HEADER, RelayAuthExpiringEvent, RelayCallEnvelope, RelayCallHello, RelayCallRequest, RelayCallResponse, RelayDeviceStatusEvent, RelayHopConnectionEnd, RelayHopEnvelopeHeader, RelayStatusResponse, RequestId, ResourceId, ResourceInfo, ResourcesDisk, ResourcesSnapshotParams, ResourcesSnapshotResult, SERVICE_MAX_FRAME_BYTES, ScreenCaptureParams, ScreenCaptureResult, ScreenDisplay, ScreenListParams, ScreenListResult, ServiceCancel, ServiceErrorMsg, ServiceHello, ServiceName, ServicePing, ServicePong, ServiceProgressMsg, ServiceRequest, ServiceResponse, ServiceShutdown, ServiceToCoreMsg, ServiceToken, ServiceWelcome, SessionAttachParams, SessionAttachResult, SessionControlChangedEvent, SessionDetachParams, SessionDetachResult, SessionListParams, SessionListResult, SessionReleaseParams, SessionReleaseResult, Signal, type StatusCell, type StatusEvidence, type StatusRow, SysinfoGetParams, SysinfoGetResult, SystemNotifyParams, SystemNotifyResult, SystemOpenPathParams, SystemOpenPathResult, SystemOpenUrlParams, SystemOpenUrlResult, TOOL_CATALOG, TOOL_GROUPS, TOOL_LEVELS, TOOL_PLATFORMS, type ToolGroup, type ToolGroupId, ToolLevel, ToolLevelResult, ToolName, ToolOutcome, type ToolPath, ToolPlatform, ToolResultsFile, type ToolState, type ToolStatus, ToolTransport, VERSIONED_RESULT_OPS, WindowFocusParams, WindowFocusResult, WindowInfo, WindowListParams, WindowListResult, WindowMinimizeParams, WindowMinimizeResult, WindowMoveParams, WindowMoveResult, announcedVersion, buildToolStatus, builtOps, compareVersions, epochMs, forPeer, knows, negotiate, nonNegInt, renderToolStatusMarkdown, statusForPeer, u32, versionSubprotocol };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { O as OpName } from './models-CCOaAWaM.js';
3
- export { B as BEARER_PREFIX, g as CLOSE_RULES, h as CancelMsg, j as ClientToCoreMsg, e as ClientType, k as CloseAction, l as CloseCode, m as CloseCodeValue, C as CloseOutcome, n as CloseRule, o as CoreToClientMsg, p as CreditMsg, D as DesktopProtocolError, d as EVENTS, q as EndMsg, E as EndReason, r as ErrorCode, s as ErrorCodeName, t as ErrorData, u as ErrorMsg, v as ErrorReason, w as ErrorReasonName, x as EventMsg, y as EventName, F as FsPatchEditFailure, H as HelloMsg, L as Limits, z as MlInstallPhase, A as MlInstallProgress, f as MlProgress, G as MlRuntimeState, I as MlServiceState, J as MlServiceStatus, K as MlStatusParams, N as MlStatusResult, P as ModelsInstallParams, Q as ModelsInstallResult, R as ModelsProgressEvent, U as ModelsStatusParams, V as ModelsStatusResult, X as ModelsTranscribeParams, M as ModelsTranscribeResult, Y as NAMED_SCHEMAS, Z as NamedSchemaId, c as OPS, _ as OpDescriptor, a as OpParams, b as OpResult, $ as OpSpec, a0 as PING_TEXT, a1 as PONG_TEXT, a2 as ProtocolErrorBody, a3 as RelayMsg, a4 as RequestMsg, a5 as ResponseMsg, a6 as SERVICES, a7 as SUBPROTOCOL, a8 as ServiceId, a9 as ServiceOpName, aa as ServiceOpSpec, ab as ServiceSpec, S as StreamMeta, ac as StreamMsg, ad as TranscriptSegment, T as TranscriptionModelId, ae as TranscriptionModelInfo, W as Welcome, af as closeRule, i as isDesktopProtocolError, ag as isTerminalClose } from './models-CCOaAWaM.js';
2
+ import { O as OpName } from './models-Dj_B9wHj.js';
3
+ export { B as BEARER_PREFIX, g as CLOSE_RULES, h as CancelMsg, j as ClientToCoreMsg, e as ClientType, k as CloseAction, l as CloseCode, m as CloseCodeValue, C as CloseOutcome, n as CloseRule, o as CoreToClientMsg, p as CreditMsg, D as DesktopProtocolError, d as EVENTS, q as EndMsg, E as EndReason, r as ErrorCode, s as ErrorCodeName, t as ErrorData, u as ErrorMsg, v as ErrorReason, w as ErrorReasonName, x as EventMsg, y as EventName, F as FsPatchEditFailure, H as HelloMsg, L as Limits, z as MlInstallPhase, A as MlInstallProgress, f as MlProgress, G as MlRuntimeState, I as MlServiceState, J as MlServiceStatus, K as MlStatusParams, N as MlStatusResult, P as ModelsInstallParams, Q as ModelsInstallResult, R as ModelsProgressEvent, U as ModelsStatusParams, V as ModelsStatusResult, X as ModelsTranscribeParams, M as ModelsTranscribeResult, Y as NAMED_SCHEMAS, Z as NamedSchemaId, c as OPS, _ as OpDescriptor, a as OpParams, b as OpResult, $ as OpSpec, a0 as PING_TEXT, a1 as PONG_TEXT, a2 as ProtocolErrorBody, a3 as RelayMsg, a4 as RequestMsg, a5 as ResponseMsg, a6 as SERVICES, a7 as SUBPROTOCOL, a8 as ServiceId, a9 as ServiceOpName, aa as ServiceOpSpec, ab as ServiceSpec, S as StreamMeta, ac as StreamMsg, ad as TranscriptSegment, T as TranscriptionModelId, ae as TranscriptionModelInfo, W as Welcome, af as closeRule, i as isDesktopProtocolError, ag as isTerminalClose } from './models-Dj_B9wHj.js';
4
4
  export { BROADCAST_CID, DecodedFrame, FRAME_HEADER_BYTES, FRAME_STRUCT_FORMAT, FRAME_VERSION, FrameChannel, FrameChannelValue, FrameFlag, assertFrameHeader, connectionEndFrame, decodeFrame, encodeFrame, hasFlag, isConnectionEnd, readCid, stampCid } from './frame.js';
5
5
 
6
6
  /** @ai-matrx/desktop-protocol — version and primitive schemas. Schema source: lint-enforced rules in scripts/check-schema-source.mjs. */
@@ -18,10 +18,11 @@ declare const PROTOCOL_MAJOR: 1;
18
18
  * folder watches (fs.watch.start/events/stop) and background jobs (exec.job.*).
19
19
  * 1.5 — `coding.history.import_missing`: Claude Code history the platform lacks, imported by the
20
20
  * `coding` Python service.
21
+ * 1.6 — the `audio` capability: devices, record a clip to a WAV file, play a file.
21
22
  */
22
- declare const PROTOCOL_MINOR: 5;
23
+ declare const PROTOCOL_MINOR: 6;
23
24
  /** This package's version as the wire spells it ("major.minor"): hello, welcome, relay status. */
24
- declare const PROTOCOL_VERSION: "1.5";
25
+ declare const PROTOCOL_VERSION: "1.6";
25
26
  /** Internal building blocks — deliberately unnamed in $defs (inlined wherever used). */
26
27
  declare const u32: z.ZodInt;
27
28
  declare const nonNegInt: z.ZodInt;
@@ -2292,6 +2293,55 @@ declare const ResourcesSnapshotResult: z.ZodObject<{
2292
2293
  }, z.core.$strict>;
2293
2294
  type ResourcesSnapshotResult = z.output<typeof ResourcesSnapshotResult>;
2294
2295
 
2296
+ /**
2297
+ * @ai-matrx/desktop-protocol — cap audio (SPEC §6): the person's microphones and speakers; record a
2298
+ * clip to a file, play a file. Speech to text is models.transcribe. Schema source: lint-enforced
2299
+ * rules in scripts/check-schema-source.mjs. Added in protocol 1.6.
2300
+ */
2301
+
2302
+ declare const AudioDevicesParams: z.ZodObject<{}, z.core.$strict>;
2303
+ declare const AudioDevice: z.ZodObject<{
2304
+ id: z.ZodString;
2305
+ name: z.ZodString;
2306
+ default: z.ZodBoolean;
2307
+ }, z.core.$strict>;
2308
+ type AudioDevice = z.output<typeof AudioDevice>;
2309
+ declare const AudioDevicesResult: z.ZodObject<{
2310
+ inputs: z.ZodArray<z.ZodObject<{
2311
+ id: z.ZodString;
2312
+ name: z.ZodString;
2313
+ default: z.ZodBoolean;
2314
+ }, z.core.$strict>>;
2315
+ outputs: z.ZodArray<z.ZodObject<{
2316
+ id: z.ZodString;
2317
+ name: z.ZodString;
2318
+ default: z.ZodBoolean;
2319
+ }, z.core.$strict>>;
2320
+ }, z.core.$strict>;
2321
+ type AudioDevicesResult = z.output<typeof AudioDevicesResult>;
2322
+ declare const AudioRecordParams: z.ZodObject<{
2323
+ seconds: z.ZodNumber;
2324
+ device_id: z.ZodOptional<z.ZodString>;
2325
+ path: z.ZodOptional<z.ZodString>;
2326
+ }, z.core.$strict>;
2327
+ type AudioRecordParams = z.output<typeof AudioRecordParams>;
2328
+ declare const AudioRecordResult: z.ZodObject<{
2329
+ path: z.ZodString;
2330
+ seconds: z.ZodNumber;
2331
+ bytes: z.ZodInt;
2332
+ peak: z.ZodNumber;
2333
+ }, z.core.$strict>;
2334
+ type AudioRecordResult = z.output<typeof AudioRecordResult>;
2335
+ declare const AudioPlayParams: z.ZodObject<{
2336
+ path: z.ZodString;
2337
+ }, z.core.$strict>;
2338
+ type AudioPlayParams = z.output<typeof AudioPlayParams>;
2339
+ declare const AudioPlayResult: z.ZodObject<{
2340
+ path: z.ZodString;
2341
+ seconds: z.ZodNumber;
2342
+ }, z.core.$strict>;
2343
+ type AudioPlayResult = z.output<typeof AudioPlayResult>;
2344
+
2295
2345
  /**
2296
2346
  * @ai-matrx/desktop-protocol — cap fs, polled watches (SPEC §6): watch a folder and read what
2297
2347
  * changed since the last read, for callers that ask rather than hold a stream (an agent's tool
@@ -2676,7 +2726,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
2676
2726
  declare const VERSIONED_RESULT_OPS: readonly OpName[];
2677
2727
 
2678
2728
  /** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
2679
- declare const CONTRACT_SHA256: "c49a85cdd157d6f50e0050e86d4ea789e916c05a0bf16c8002d833b57225548d";
2729
+ declare const CONTRACT_SHA256: "2cbf3c7589a30141305f6f0f38c4d4a32bf9ef2a890f7572d9c7bd15c398d4b9";
2680
2730
 
2681
2731
  /**
2682
2732
  * The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
@@ -2757,11 +2807,6 @@ declare function builtOps(): OpName[];
2757
2807
 
2758
2808
  declare const TOOL_LEVELS: readonly ToolLevel[];
2759
2809
  declare const TOOL_PLATFORMS: readonly ToolPlatform[];
2760
- /**
2761
- * `pass`: every required proof passed and none failed. `partial`: passes so far, a required proof
2762
- * missing (`missing` says which). `fail`: the latest run of some proof failed. `untested`: nothing
2763
- * ran. `not_built`: the tool is planned. `unsupported`: the tool does not exist on this platform.
2764
- */
2765
2810
  type CellState = "pass" | "partial" | "fail" | "untested" | "not_built" | "unsupported";
2766
2811
  interface StatusEvidence {
2767
2812
  readonly suite: string;
@@ -2808,4 +2853,4 @@ declare function buildToolStatus(files: readonly unknown[], opts: {
2808
2853
  /** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */
2809
2854
  declare function renderToolStatusMarkdown(status: ToolStatus): string;
2810
2855
 
2811
- export { AbsPath, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, CONTRACT_SHA256, type CatalogTool, type CellState, ClipboardReadParams, ClipboardReadResult, ClipboardWriteParams, ClipboardWriteResult, CodingHistoryBlocked, CodingHistoryFailure, CodingHistoryImportMissingParams, CodingHistoryImportMissingResult, CodingHistoryProgressEvent, CodingHistoryRun, CodingHistoryStep, CodingImportNextParams, CodingPlanMissingParams, CodingServiceCredentials, CodingServiceProgress, ContractHash, CoreToServiceMsg, DEFAULT_MAX_FRAME_PAYLOAD_BYTES, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_WINDOW_BYTES, DeviceId, EXCLUDED_TOOLS, ExecCwdEvent, ExecExitedEvent, ExecJobId, ExecJobInfo, ExecJobListParams, ExecJobListResult, ExecJobOutputParams, ExecJobOutputResult, ExecJobStartParams, ExecJobStartResult, ExecJobStopParams, ExecJobStopResult, ExecListParams, ExecListResult, ExecPtyKillParams, ExecPtyKillResult, ExecPtyResizeParams, ExecPtyResizeResult, ExecPtySignalParams, ExecPtySignalResult, ExecPtyStartParams, ExecPtyStartResult, ExecPtyWriteParams, ExecPtyWriteResult, ExecRunParams, ExecRunResult, ExecTitleEvent, FIELDS_SINCE, type FieldsSincePath, FrameHeader, FsChange, FsChangedEvent, FsDeleteParams, FsDeleteResult, FsEncoding, FsEntry, FsKind, FsListParams, FsListResult, FsMkdirParams, FsMkdirResult, FsMoveParams, FsMoveResult, FsPatchEditApplied, FsPatchParams, FsPatchResult, FsReadParams, FsReadResult, FsReadStreamParams, FsReadStreamResult, FsSearchContentParams, FsSearchContentResult, FsSearchPathsParams, FsSearchPathsResult, FsStatParams, FsStatResult, FsWatchEventsParams, FsWatchEventsResult, FsWatchId, FsWatchParams, FsWatchResult, FsWatchStartParams, FsWatchStartResult, FsWatchStopParams, FsWatchStopResult, FsWriteParams, FsWriteResult, InputHotkeyParams, InputHotkeyResult, InputKey, InputMouseClickParams, InputMouseClickResult, InputMouseMoveParams, InputMouseMoveResult, InputPoint, InputTypeTextParams, InputTypeTextResult, LEGACY_ACTIONS, LEGACY_DISPATCHERS, type LegacyDisposition, NULL_SINCE, OpName, OsPermissionName, PROTOCOL_MAJOR, PROTOCOL_MINOR, PROTOCOL_VERSION, PowerPreventSleepParams, PowerPreventSleepResult, PowerStatusParams, PowerStatusResult, ProcInfo, ProcKillParams, ProcKillResult, ProcListParams, ProcListResult, ProcPort, ProcPortsParams, ProcPortsResult, ProcSort, ProtocolVersion, PtyInfo, REASONS_SINCE, RELAY_CALL_HELLO_ID, RELAY_CALL_REQUEST_ID, RELAY_CALL_VERSION_HEADER, RelayAuthExpiringEvent, RelayCallEnvelope, RelayCallHello, RelayCallRequest, RelayCallResponse, RelayDeviceStatusEvent, RelayHopConnectionEnd, RelayHopEnvelopeHeader, RelayStatusResponse, RequestId, ResourceId, ResourceInfo, ResourcesDisk, ResourcesSnapshotParams, ResourcesSnapshotResult, SERVICE_MAX_FRAME_BYTES, ScreenCaptureParams, ScreenCaptureResult, ScreenDisplay, ScreenListParams, ScreenListResult, ServiceCancel, ServiceErrorMsg, ServiceHello, ServiceName, ServicePing, ServicePong, ServiceProgressMsg, ServiceRequest, ServiceResponse, ServiceShutdown, ServiceToCoreMsg, ServiceToken, ServiceWelcome, SessionAttachParams, SessionAttachResult, SessionControlChangedEvent, SessionDetachParams, SessionDetachResult, SessionListParams, SessionListResult, SessionReleaseParams, SessionReleaseResult, Signal, type StatusCell, type StatusEvidence, type StatusRow, SysinfoGetParams, SysinfoGetResult, SystemNotifyParams, SystemNotifyResult, SystemOpenPathParams, SystemOpenPathResult, SystemOpenUrlParams, SystemOpenUrlResult, TOOL_CATALOG, TOOL_GROUPS, TOOL_LEVELS, TOOL_PLATFORMS, type ToolGroup, type ToolGroupId, ToolLevel, ToolLevelResult, ToolName, ToolOutcome, type ToolPath, ToolPlatform, ToolResultsFile, type ToolState, type ToolStatus, ToolTransport, VERSIONED_RESULT_OPS, WindowFocusParams, WindowFocusResult, WindowInfo, WindowListParams, WindowListResult, WindowMinimizeParams, WindowMinimizeResult, WindowMoveParams, WindowMoveResult, announcedVersion, buildToolStatus, builtOps, compareVersions, epochMs, forPeer, knows, negotiate, nonNegInt, renderToolStatusMarkdown, statusForPeer, u32, versionSubprotocol };
2856
+ export { AbsPath, AppFeatureStatus, AppInfo, AppKey, AppProfile, AppProfileId, AppProfileLocator, AppSupport, AppUsageReading, AppsListParams, AppsListResult, AppsOpenParams, AppsOpenResult, AppsProfilesListParams, AppsProfilesListResult, AppsProfilesRemoveParams, AppsProfilesRemoveResult, AppsProfilesSaveParams, AppsProfilesSaveResult, AudioDevice, AudioDevicesParams, AudioDevicesResult, AudioPlayParams, AudioPlayResult, AudioRecordParams, AudioRecordResult, CONTRACT_SHA256, type CatalogTool, type CellState, ClipboardReadParams, ClipboardReadResult, ClipboardWriteParams, ClipboardWriteResult, CodingHistoryBlocked, CodingHistoryFailure, CodingHistoryImportMissingParams, CodingHistoryImportMissingResult, CodingHistoryProgressEvent, CodingHistoryRun, CodingHistoryStep, CodingImportNextParams, CodingPlanMissingParams, CodingServiceCredentials, CodingServiceProgress, ContractHash, CoreToServiceMsg, DEFAULT_MAX_FRAME_PAYLOAD_BYTES, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_WINDOW_BYTES, DeviceId, EXCLUDED_TOOLS, ExecCwdEvent, ExecExitedEvent, ExecJobId, ExecJobInfo, ExecJobListParams, ExecJobListResult, ExecJobOutputParams, ExecJobOutputResult, ExecJobStartParams, ExecJobStartResult, ExecJobStopParams, ExecJobStopResult, ExecListParams, ExecListResult, ExecPtyKillParams, ExecPtyKillResult, ExecPtyResizeParams, ExecPtyResizeResult, ExecPtySignalParams, ExecPtySignalResult, ExecPtyStartParams, ExecPtyStartResult, ExecPtyWriteParams, ExecPtyWriteResult, ExecRunParams, ExecRunResult, ExecTitleEvent, FIELDS_SINCE, type FieldsSincePath, FrameHeader, FsChange, FsChangedEvent, FsDeleteParams, FsDeleteResult, FsEncoding, FsEntry, FsKind, FsListParams, FsListResult, FsMkdirParams, FsMkdirResult, FsMoveParams, FsMoveResult, FsPatchEditApplied, FsPatchParams, FsPatchResult, FsReadParams, FsReadResult, FsReadStreamParams, FsReadStreamResult, FsSearchContentParams, FsSearchContentResult, FsSearchPathsParams, FsSearchPathsResult, FsStatParams, FsStatResult, FsWatchEventsParams, FsWatchEventsResult, FsWatchId, FsWatchParams, FsWatchResult, FsWatchStartParams, FsWatchStartResult, FsWatchStopParams, FsWatchStopResult, FsWriteParams, FsWriteResult, InputHotkeyParams, InputHotkeyResult, InputKey, InputMouseClickParams, InputMouseClickResult, InputMouseMoveParams, InputMouseMoveResult, InputPoint, InputTypeTextParams, InputTypeTextResult, LEGACY_ACTIONS, LEGACY_DISPATCHERS, type LegacyDisposition, NULL_SINCE, OpName, OsPermissionName, PROTOCOL_MAJOR, PROTOCOL_MINOR, PROTOCOL_VERSION, PowerPreventSleepParams, PowerPreventSleepResult, PowerStatusParams, PowerStatusResult, ProcInfo, ProcKillParams, ProcKillResult, ProcListParams, ProcListResult, ProcPort, ProcPortsParams, ProcPortsResult, ProcSort, ProtocolVersion, PtyInfo, REASONS_SINCE, RELAY_CALL_HELLO_ID, RELAY_CALL_REQUEST_ID, RELAY_CALL_VERSION_HEADER, RelayAuthExpiringEvent, RelayCallEnvelope, RelayCallHello, RelayCallRequest, RelayCallResponse, RelayDeviceStatusEvent, RelayHopConnectionEnd, RelayHopEnvelopeHeader, RelayStatusResponse, RequestId, ResourceId, ResourceInfo, ResourcesDisk, ResourcesSnapshotParams, ResourcesSnapshotResult, SERVICE_MAX_FRAME_BYTES, ScreenCaptureParams, ScreenCaptureResult, ScreenDisplay, ScreenListParams, ScreenListResult, ServiceCancel, ServiceErrorMsg, ServiceHello, ServiceName, ServicePing, ServicePong, ServiceProgressMsg, ServiceRequest, ServiceResponse, ServiceShutdown, ServiceToCoreMsg, ServiceToken, ServiceWelcome, SessionAttachParams, SessionAttachResult, SessionControlChangedEvent, SessionDetachParams, SessionDetachResult, SessionListParams, SessionListResult, SessionReleaseParams, SessionReleaseResult, Signal, type StatusCell, type StatusEvidence, type StatusRow, SysinfoGetParams, SysinfoGetResult, SystemNotifyParams, SystemNotifyResult, SystemOpenPathParams, SystemOpenPathResult, SystemOpenUrlParams, SystemOpenUrlResult, TOOL_CATALOG, TOOL_GROUPS, TOOL_LEVELS, TOOL_PLATFORMS, type ToolGroup, type ToolGroupId, ToolLevel, ToolLevelResult, ToolName, ToolOutcome, type ToolPath, ToolPlatform, ToolResultsFile, type ToolState, type ToolStatus, ToolTransport, VERSIONED_RESULT_OPS, WindowFocusParams, WindowFocusResult, WindowInfo, WindowListParams, WindowListResult, WindowMinimizeParams, WindowMinimizeResult, WindowMoveParams, WindowMoveResult, announcedVersion, buildToolStatus, builtOps, compareVersions, epochMs, forPeer, knows, negotiate, nonNegInt, renderToolStatusMarkdown, statusForPeer, u32, versionSubprotocol };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // src/schema/primitives.ts
2
2
  import { z } from "zod";
3
3
  var PROTOCOL_MAJOR = 1;
4
- var PROTOCOL_MINOR = 5;
4
+ var PROTOCOL_MINOR = 6;
5
5
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
6
6
  var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
7
7
  var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -1271,91 +1271,121 @@ var ResourcesSnapshotResult = z21.strictObject({
1271
1271
  uptime_seconds: nonNegInt
1272
1272
  });
1273
1273
 
1274
- // src/schema/fs-watch.ts
1274
+ // src/schema/audio.ts
1275
1275
  import { z as z22 } from "zod";
1276
- var FsWatchId = z22.string().regex(/^fw_[A-Za-z0-9]{12,40}$/);
1277
- var FsWatchStartParams = z22.strictObject({
1276
+ var AudioDevice = z22.strictObject({
1277
+ /** The OS's name for it, as audio.record takes it. */
1278
+ id: z22.string().min(1).max(256),
1279
+ name: z22.string().max(256),
1280
+ default: z22.boolean()
1281
+ });
1282
+ var AudioDevicesParams = z22.strictObject({});
1283
+ var AudioDevicesResult = z22.strictObject({
1284
+ inputs: z22.array(AudioDevice).max(64),
1285
+ outputs: z22.array(AudioDevice).max(64)
1286
+ });
1287
+ var AudioRecordParams = z22.strictObject({
1288
+ seconds: z22.number().min(0.5).max(600),
1289
+ /** The microphone (from audio.devices); the default input when absent. */
1290
+ device_id: z22.string().min(1).max(256).optional(),
1291
+ /** Where the WAV file goes; a new file in the temp folder when absent. */
1292
+ path: AbsPath.optional()
1293
+ });
1294
+ var AudioRecordResult = z22.strictObject({
1278
1295
  path: AbsPath,
1279
- recursive: z22.boolean().default(true),
1296
+ seconds: z22.number().min(0),
1297
+ bytes: nonNegInt,
1298
+ /** Loudest sample, 0–1: 0 means the device gave silence. */
1299
+ peak: z22.number().min(0).max(1)
1300
+ });
1301
+ var AudioPlayParams = z22.strictObject({ path: AbsPath });
1302
+ var AudioPlayResult = z22.strictObject({ path: AbsPath, seconds: z22.number().min(0) });
1303
+
1304
+ // src/schema/fs-watch.ts
1305
+ import { z as z23 } from "zod";
1306
+ var FsWatchId = z23.string().regex(/^fw_[A-Za-z0-9]{12,40}$/);
1307
+ var FsWatchStartParams = z23.strictObject({
1308
+ path: AbsPath,
1309
+ recursive: z23.boolean().default(true),
1280
1310
  /** Globs relative to `path` whose changes are not reported (".git/**", "node_modules/**"). */
1281
- ignore: z22.array(z22.string().max(256)).max(64).default([])
1311
+ ignore: z23.array(z23.string().max(256)).max(64).default([])
1282
1312
  });
1283
- var FsWatchStartResult = z22.strictObject({
1313
+ var FsWatchStartResult = z23.strictObject({
1284
1314
  watch_id: FsWatchId,
1285
1315
  path: AbsPath,
1286
1316
  /** The watch ends by itself if nobody reads it for 30 minutes. */
1287
1317
  expires_at_ms: epochMs
1288
1318
  });
1289
- var FsWatchEventsParams = z22.strictObject({
1319
+ var FsWatchEventsParams = z23.strictObject({
1290
1320
  watch_id: FsWatchId,
1291
1321
  /** Wait up to this long for a first change when none is waiting (0 answers at once). */
1292
- wait_ms: z22.int().min(0).max(25e3).default(0)
1322
+ wait_ms: z23.int().min(0).max(25e3).default(0)
1293
1323
  });
1294
- var FsWatchEventsResult = z22.strictObject({
1324
+ var FsWatchEventsResult = z23.strictObject({
1295
1325
  /** What changed since the last read, oldest first; re-checked against the disk when read. */
1296
- changes: z22.array(FsChange).max(1e3),
1326
+ changes: z23.array(FsChange).max(1e3),
1297
1327
  /** Changes were dropped (more than 1000 waited): list the folder again. */
1298
- overflow: z22.boolean(),
1328
+ overflow: z23.boolean(),
1299
1329
  expires_at_ms: epochMs
1300
1330
  });
1301
- var FsWatchStopParams = z22.strictObject({ watch_id: FsWatchId });
1302
- var FsWatchStopResult = z22.strictObject({ watch_id: FsWatchId });
1331
+ var FsWatchStopParams = z23.strictObject({ watch_id: FsWatchId });
1332
+ var FsWatchStopResult = z23.strictObject({ watch_id: FsWatchId });
1303
1333
 
1304
1334
  // src/schema/exec-job.ts
1305
- import { z as z23 } from "zod";
1306
- var ExecJobId = z23.string().regex(/^job_[A-Za-z0-9]{12,40}$/);
1307
- var ExecJobStartParams = z23.strictObject({
1308
- command: z23.string().min(1).max(131072),
1335
+ import { z as z24 } from "zod";
1336
+ var ExecJobId = z24.string().regex(/^job_[A-Za-z0-9]{12,40}$/);
1337
+ var ExecJobStartParams = z24.strictObject({
1338
+ command: z24.string().min(1).max(131072),
1309
1339
  /** The folder it runs in; the home folder when absent. */
1310
1340
  cwd: AbsPath.optional(),
1311
- env: z23.record(z23.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(128), z23.string().max(32768)).optional()
1341
+ env: z24.record(z24.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(128), z24.string().max(32768)).optional()
1312
1342
  });
1313
- var ExecJobStartResult = z23.strictObject({ job_id: ExecJobId, pid: z23.int().min(1), cwd: AbsPath });
1314
- var ExecJobOutputParams = z23.strictObject({
1343
+ var ExecJobStartResult = z24.strictObject({ job_id: ExecJobId, pid: z24.int().min(1), cwd: AbsPath });
1344
+ var ExecJobOutputParams = z24.strictObject({
1315
1345
  job_id: ExecJobId,
1316
1346
  /** Byte offset into the job's output to read from (next_offset of the last read; 0 = the start). */
1317
1347
  offset: nonNegInt.default(0),
1318
1348
  /** Wait up to this long for new output or the exit when none is waiting (0 answers at once). */
1319
- wait_ms: z23.int().min(0).max(25e3).default(0),
1320
- max_bytes: z23.int().min(1024).max(1048576).default(65536)
1349
+ wait_ms: z24.int().min(0).max(25e3).default(0),
1350
+ max_bytes: z24.int().min(1024).max(1048576).default(65536)
1321
1351
  });
1322
- var ExecJobOutputResult = z23.strictObject({
1352
+ var ExecJobOutputResult = z24.strictObject({
1323
1353
  /** stdout and stderr interleaved as they arrived (UTF-8). */
1324
- output: z23.string(),
1354
+ output: z24.string(),
1325
1355
  next_offset: nonNegInt,
1326
1356
  /** Bytes before `offset` that are gone (the job keeps its last 4 MiB). */
1327
1357
  dropped_bytes: nonNegInt,
1328
- running: z23.boolean(),
1329
- exit_code: z23.int().nullable()
1358
+ running: z24.boolean(),
1359
+ exit_code: z24.int().nullable()
1330
1360
  });
1331
- var ExecJobStopParams = z23.strictObject({
1361
+ var ExecJobStopParams = z24.strictObject({
1332
1362
  job_id: ExecJobId,
1333
1363
  /** End it at once (SIGKILL; on Windows the whole tree with /F) instead of asking it to quit. */
1334
- force: z23.boolean().default(false)
1364
+ force: z24.boolean().default(false)
1335
1365
  });
1336
- var ExecJobStopResult = z23.strictObject({ job_id: ExecJobId, exited: z23.boolean(), exit_code: z23.int().nullable() });
1337
- var ExecJobInfo = z23.strictObject({
1366
+ var ExecJobStopResult = z24.strictObject({ job_id: ExecJobId, exited: z24.boolean(), exit_code: z24.int().nullable() });
1367
+ var ExecJobInfo = z24.strictObject({
1338
1368
  job_id: ExecJobId,
1339
- command: z23.string().max(1024),
1340
- pid: z23.int().min(1),
1369
+ command: z24.string().max(1024),
1370
+ pid: z24.int().min(1),
1341
1371
  cwd: AbsPath,
1342
- running: z23.boolean(),
1343
- exit_code: z23.int().nullable(),
1372
+ running: z24.boolean(),
1373
+ exit_code: z24.int().nullable(),
1344
1374
  started_at_ms: epochMs,
1345
1375
  output_bytes: nonNegInt
1346
1376
  });
1347
- var ExecJobListParams = z23.strictObject({});
1348
- var ExecJobListResult = z23.strictObject({ jobs: z23.array(ExecJobInfo).max(64) });
1377
+ var ExecJobListParams = z24.strictObject({});
1378
+ var ExecJobListResult = z24.strictObject({ jobs: z24.array(ExecJobInfo).max(64) });
1349
1379
 
1350
1380
  // src/schema/coding.ts
1351
- import { z as z24 } from "zod";
1352
- var CodingServiceCredentials = z24.strictObject({
1353
- access_token: z24.string().min(16).max(16384),
1354
- user_id: z24.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/),
1381
+ import { z as z25 } from "zod";
1382
+ var CodingServiceCredentials = z25.strictObject({
1383
+ access_token: z25.string().min(16).max(16384),
1384
+ user_id: z25.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/),
1355
1385
  /** The AI Matrx server this app talks to (production, or a local server on the nightly copy). */
1356
- server_url: z24.string().min(1).max(2048).regex(/^https?:\/\/[^\s/?#]+(\/[^\s?#]*)?$/)
1386
+ server_url: z25.string().min(1).max(2048).regex(/^https?:\/\/[^\s/?#]+(\/[^\s?#]*)?$/)
1357
1387
  });
1358
- var CodingHistoryBlocked = z24.enum([
1388
+ var CodingHistoryBlocked = z25.enum([
1359
1389
  "signed_out",
1360
1390
  "offline",
1361
1391
  "organization_required",
@@ -1363,11 +1393,11 @@ var CodingHistoryBlocked = z24.enum([
1363
1393
  "cloud_list_unavailable",
1364
1394
  "history_too_large"
1365
1395
  ]);
1366
- var CodingHistoryFailure = z24.strictObject({
1367
- session_id: z24.string().max(64),
1368
- reason: z24.string().max(300)
1396
+ var CodingHistoryFailure = z25.strictObject({
1397
+ session_id: z25.string().max(64),
1398
+ reason: z25.string().max(300)
1369
1399
  });
1370
- var CodingHistoryRun = z24.strictObject({
1400
+ var CodingHistoryRun = z25.strictObject({
1371
1401
  /** Claude Code sessions found on this computer. */
1372
1402
  local_sessions: nonNegInt,
1373
1403
  /** Of those, already complete in AI Matrx. */
@@ -1382,39 +1412,39 @@ var CodingHistoryRun = z24.strictObject({
1382
1412
  /** Changed while being read; a later run takes them. */
1383
1413
  changed: nonNegInt,
1384
1414
  failed: nonNegInt,
1385
- failures: z24.array(CodingHistoryFailure).max(20),
1415
+ failures: z25.array(CodingHistoryFailure).max(20),
1386
1416
  /** Candidates not reached yet. */
1387
1417
  remaining: nonNegInt,
1388
1418
  /** The one line a person reads, e.g. "Imported 12 of 14 sessions. 140 already in AI Matrx." */
1389
- summary: z24.string().max(400)
1419
+ summary: z25.string().max(400)
1390
1420
  });
1391
- var CodingHistoryStep = z24.strictObject({
1421
+ var CodingHistoryStep = z25.strictObject({
1392
1422
  /** Null when the run could not start (blocked before a plan existed). */
1393
- plan_id: z24.string().regex(/^[0-9a-f]{32}$/).nullable(),
1394
- finished: z24.boolean(),
1423
+ plan_id: z25.string().regex(/^[0-9a-f]{32}$/).nullable(),
1424
+ finished: z25.boolean(),
1395
1425
  blocked: CodingHistoryBlocked.nullable(),
1396
1426
  run: CodingHistoryRun
1397
1427
  });
1398
- var CodingPlanMissingParams = z24.strictObject({ credentials: CodingServiceCredentials.nullable() });
1399
- var CodingImportNextParams = z24.strictObject({
1400
- plan_id: z24.string().regex(/^[0-9a-f]{32}$/),
1428
+ var CodingPlanMissingParams = z25.strictObject({ credentials: CodingServiceCredentials.nullable() });
1429
+ var CodingImportNextParams = z25.strictObject({
1430
+ plan_id: z25.string().regex(/^[0-9a-f]{32}$/),
1401
1431
  credentials: CodingServiceCredentials.nullable()
1402
1432
  });
1403
- var CodingServiceProgress = z24.strictObject({
1404
- phase: z24.enum(["checking", "importing"]),
1433
+ var CodingServiceProgress = z25.strictObject({
1434
+ phase: z25.enum(["checking", "importing"]),
1405
1435
  done: nonNegInt,
1406
1436
  total: nonNegInt
1407
1437
  });
1408
- var CodingHistoryImportMissingParams = z24.strictObject({});
1409
- var CodingHistoryImportMissingResult = z24.strictObject({
1410
- state: z24.enum(["done", "blocked", "cancelled"]),
1438
+ var CodingHistoryImportMissingParams = z25.strictObject({});
1439
+ var CodingHistoryImportMissingResult = z25.strictObject({
1440
+ state: z25.enum(["done", "blocked", "cancelled"]),
1411
1441
  blocked: CodingHistoryBlocked.nullable(),
1412
1442
  run: CodingHistoryRun,
1413
1443
  elapsed_ms: nonNegInt
1414
1444
  });
1415
- var CodingHistoryProgressEvent = z24.strictObject({
1445
+ var CodingHistoryProgressEvent = z25.strictObject({
1416
1446
  request_id: RequestId,
1417
- phase: z24.enum(["checking", "importing"]),
1447
+ phase: z25.enum(["checking", "importing"]),
1418
1448
  /** Sessions settled so far, of `total` candidates (0 of 0 while checking). */
1419
1449
  done: nonNegInt,
1420
1450
  total: nonNegInt,
@@ -1487,6 +1517,9 @@ var OPS = {
1487
1517
  "power.status": { params: PowerStatusParams, result: PowerStatusResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
1488
1518
  "power.prevent_sleep": { params: PowerPreventSleepParams, result: PowerPreventSleepResult, kind: "unary", since: "1.4", errors: ["PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1489
1519
  "resources.snapshot": { params: ResourcesSnapshotParams, result: ResourcesSnapshotResult, kind: "unary", since: "1.4", errors: ["INTERNAL"] },
1520
+ "audio.devices": { params: AudioDevicesParams, result: AudioDevicesResult, kind: "unary", since: "1.6", errors: ["PLATFORM_UNSUPPORTED", "INTERNAL"] },
1521
+ "audio.record": { params: AudioRecordParams, result: AudioRecordResult, kind: "unary", since: "1.6", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "RESOURCE_BUSY", "INTERNAL"] },
1522
+ "audio.play": { params: AudioPlayParams, result: AudioPlayResult, kind: "unary", since: "1.6", errors: ["NOT_FOUND", "INVALID_PARAMS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
1490
1523
  // Claude Code history (SPEC §6 coding): served by the `coding` Python service through SERVICES below.
1491
1524
  "coding.history.import_missing": { params: CodingHistoryImportMissingParams, result: CodingHistoryImportMissingResult, kind: "unary", since: "1.5", errors: ["RESOURCE_BUSY", "RESOURCE_GONE", "CANCELLED", "INTERNAL"] }
1492
1525
  };
@@ -1709,6 +1742,13 @@ var NAMED_SCHEMAS = {
1709
1742
  ResourcesDisk,
1710
1743
  ResourcesSnapshotParams,
1711
1744
  ResourcesSnapshotResult,
1745
+ AudioDevice,
1746
+ AudioDevicesParams,
1747
+ AudioDevicesResult,
1748
+ AudioRecordParams,
1749
+ AudioRecordResult,
1750
+ AudioPlayParams,
1751
+ AudioPlayResult,
1712
1752
  FsWatchId,
1713
1753
  FsWatchStartParams,
1714
1754
  FsWatchStartResult,
@@ -1831,7 +1871,7 @@ function forPeer(op, part, value, version) {
1831
1871
  var VERSIONED_RESULT_OPS = [...RESULT_PATH.keys()];
1832
1872
 
1833
1873
  // src/contract.ts
1834
- var CONTRACT_SHA256 = "c49a85cdd157d6f50e0050e86d4ea789e916c05a0bf16c8002d833b57225548d";
1874
+ var CONTRACT_SHA256 = "2cbf3c7589a30141305f6f0f38c4d4a32bf9ef2a890f7572d9c7bd15c398d4b9";
1835
1875
 
1836
1876
  // src/close-policy.ts
1837
1877
  var CLOSE_RULES = {
@@ -1889,7 +1929,7 @@ var TOOL_CATALOG = [
1889
1929
  { name: "desktop_screen", group: "os_control", state: "built", path: "device_op", ops: ["screen.list", "screen.capture"], platforms: ALL, summary: "Displays and screenshots" },
1890
1930
  { 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" },
1891
1931
  { name: "desktop_input", group: "os_control", state: "built", path: "device_op", ops: ["input.type_text", "input.hotkey", "input.mouse_click", "input.mouse_move"], platforms: ALL, summary: "Keyboard and mouse" },
1892
- { name: "desktop_audio", group: "os_control", state: "planned", path: "device_op", ops: ["audio.devices", "audio.record", "audio.play"], platforms: ALL, summary: "Audio devices, record, play" },
1932
+ { name: "desktop_audio", group: "os_control", state: "built", path: "device_op", ops: ["audio.devices", "audio.record", "audio.play"], platforms: ALL, summary: "Audio devices, record, play" },
1893
1933
  { name: "desktop_power", group: "os_control", state: "built", path: "device_op", ops: ["power.status", "power.prevent_sleep"], platforms: ALL, summary: "Battery and keep awake" },
1894
1934
  { name: "desktop_resources", group: "os_control", state: "built", path: "device_op", ops: ["resources.snapshot"], platforms: ALL, summary: "CPU, memory and disk use" },
1895
1935
  { 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" },
@@ -2069,6 +2109,7 @@ function builtOps() {
2069
2109
  // src/tools/status.ts
2070
2110
  var TOOL_LEVELS = ["programmatic", "protocol", "chat"];
2071
2111
  var TOOL_PLATFORMS = ["darwin", "win32", "linux"];
2112
+ var UUID_IN_NAME = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi;
2072
2113
  var REQUIRED = {
2073
2114
  programmatic: [{ label: "in process", ok: (e) => e.transport === "in_process" }],
2074
2115
  protocol: [
@@ -2082,7 +2123,7 @@ function cellFor(tool2, platform, level, evidence) {
2082
2123
  if (!tool2.platforms.includes(platform)) return { state: "unsupported", missing: [], last_run_at_ms: null, evidence: [] };
2083
2124
  const latest = /* @__PURE__ */ new Map();
2084
2125
  for (const e of evidence) {
2085
- const key = `${e.suite}\0${e.test}\0${e.transport}\0${e.remote_network}`;
2126
+ const key = `${e.suite}\0${e.test.replace(UUID_IN_NAME, "<id>")}\0${e.transport}\0${e.remote_network}`;
2086
2127
  const prev = latest.get(key);
2087
2128
  if (!prev || prev.run_at_ms < e.run_at_ms) latest.set(key, e);
2088
2129
  }
@@ -2190,6 +2231,13 @@ export {
2190
2231
  AppsProfilesRemoveResult,
2191
2232
  AppsProfilesSaveParams,
2192
2233
  AppsProfilesSaveResult,
2234
+ AudioDevice,
2235
+ AudioDevicesParams,
2236
+ AudioDevicesResult,
2237
+ AudioPlayParams,
2238
+ AudioPlayResult,
2239
+ AudioRecordParams,
2240
+ AudioRecordResult,
2193
2241
  BEARER_PREFIX,
2194
2242
  BROADCAST_CID,
2195
2243
  CLOSE_RULES,