@ai-matrx/desktop-protocol 0.16.0 → 0.17.0
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 +16 -0
- package/dist/client.cjs +145 -112
- 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 +145 -112
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +112 -65
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -12
- package/dist/index.d.ts +66 -12
- package/dist/index.js +112 -65
- package/dist/index.js.map +1 -1
- package/dist/{models-k4pDkXUe.d.cts → models-Dj_B9wHj.d.cts} +91 -9
- package/dist/{models-k4pDkXUe.d.ts → models-Dj_B9wHj.d.ts} +91 -9
- package/dist/react.d.cts +46 -0
- package/dist/react.d.ts +46 -0
- package/generated/desktop-protocol.schema.json +184 -3
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { O as OpName } from './models-
|
|
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-
|
|
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:
|
|
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.
|
|
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
|
|
@@ -2438,22 +2488,26 @@ declare const CodingHistoryFailure: z.ZodObject<{
|
|
|
2438
2488
|
session_id: z.ZodString;
|
|
2439
2489
|
reason: z.ZodString;
|
|
2440
2490
|
}, z.core.$strict>;
|
|
2441
|
-
/**
|
|
2491
|
+
/**
|
|
2492
|
+
* Service op `coding.plan_missing`: read the cloud's list and this computer's history (stat only).
|
|
2493
|
+
* `credentials` is null when nobody is signed in: the service answers `blocked: signed_out` with
|
|
2494
|
+
* its own line, so every sentence the person reads comes from one place.
|
|
2495
|
+
*/
|
|
2442
2496
|
declare const CodingPlanMissingParams: z.ZodObject<{
|
|
2443
|
-
credentials: z.ZodObject<{
|
|
2497
|
+
credentials: z.ZodNullable<z.ZodObject<{
|
|
2444
2498
|
access_token: z.ZodString;
|
|
2445
2499
|
user_id: z.ZodString;
|
|
2446
2500
|
server_url: z.ZodString;
|
|
2447
|
-
}, z.core.$strict
|
|
2501
|
+
}, z.core.$strict>>;
|
|
2448
2502
|
}, z.core.$strict>;
|
|
2449
|
-
/** Service op `coding.import_next`: import the plan's next bounded batch. */
|
|
2503
|
+
/** Service op `coding.import_next`: import the plan's next bounded batch (null credentials: as above). */
|
|
2450
2504
|
declare const CodingImportNextParams: z.ZodObject<{
|
|
2451
2505
|
plan_id: z.ZodString;
|
|
2452
|
-
credentials: z.ZodObject<{
|
|
2506
|
+
credentials: z.ZodNullable<z.ZodObject<{
|
|
2453
2507
|
access_token: z.ZodString;
|
|
2454
2508
|
user_id: z.ZodString;
|
|
2455
2509
|
server_url: z.ZodString;
|
|
2456
|
-
}, z.core.$strict
|
|
2510
|
+
}, z.core.$strict>>;
|
|
2457
2511
|
}, z.core.$strict>;
|
|
2458
2512
|
declare const CodingHistoryImportMissingParams: z.ZodObject<{}, z.core.$strict>;
|
|
2459
2513
|
/** What the core adds to every coding service op from its own sign-in (never sent by a client). */
|
|
@@ -2672,7 +2726,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
|
|
|
2672
2726
|
declare const VERSIONED_RESULT_OPS: readonly OpName[];
|
|
2673
2727
|
|
|
2674
2728
|
/** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
|
|
2675
|
-
declare const CONTRACT_SHA256: "
|
|
2729
|
+
declare const CONTRACT_SHA256: "2cbf3c7589a30141305f6f0f38c4d4a32bf9ef2a890f7572d9c7bd15c398d4b9";
|
|
2676
2730
|
|
|
2677
2731
|
/**
|
|
2678
2732
|
* The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
|
|
@@ -2804,4 +2858,4 @@ declare function buildToolStatus(files: readonly unknown[], opts: {
|
|
|
2804
2858
|
/** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */
|
|
2805
2859
|
declare function renderToolStatusMarkdown(status: ToolStatus): string;
|
|
2806
2860
|
|
|
2807
|
-
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 };
|
|
2861
|
+
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-
|
|
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-
|
|
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:
|
|
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.
|
|
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
|
|
@@ -2438,22 +2488,26 @@ declare const CodingHistoryFailure: z.ZodObject<{
|
|
|
2438
2488
|
session_id: z.ZodString;
|
|
2439
2489
|
reason: z.ZodString;
|
|
2440
2490
|
}, z.core.$strict>;
|
|
2441
|
-
/**
|
|
2491
|
+
/**
|
|
2492
|
+
* Service op `coding.plan_missing`: read the cloud's list and this computer's history (stat only).
|
|
2493
|
+
* `credentials` is null when nobody is signed in: the service answers `blocked: signed_out` with
|
|
2494
|
+
* its own line, so every sentence the person reads comes from one place.
|
|
2495
|
+
*/
|
|
2442
2496
|
declare const CodingPlanMissingParams: z.ZodObject<{
|
|
2443
|
-
credentials: z.ZodObject<{
|
|
2497
|
+
credentials: z.ZodNullable<z.ZodObject<{
|
|
2444
2498
|
access_token: z.ZodString;
|
|
2445
2499
|
user_id: z.ZodString;
|
|
2446
2500
|
server_url: z.ZodString;
|
|
2447
|
-
}, z.core.$strict
|
|
2501
|
+
}, z.core.$strict>>;
|
|
2448
2502
|
}, z.core.$strict>;
|
|
2449
|
-
/** Service op `coding.import_next`: import the plan's next bounded batch. */
|
|
2503
|
+
/** Service op `coding.import_next`: import the plan's next bounded batch (null credentials: as above). */
|
|
2450
2504
|
declare const CodingImportNextParams: z.ZodObject<{
|
|
2451
2505
|
plan_id: z.ZodString;
|
|
2452
|
-
credentials: z.ZodObject<{
|
|
2506
|
+
credentials: z.ZodNullable<z.ZodObject<{
|
|
2453
2507
|
access_token: z.ZodString;
|
|
2454
2508
|
user_id: z.ZodString;
|
|
2455
2509
|
server_url: z.ZodString;
|
|
2456
|
-
}, z.core.$strict
|
|
2510
|
+
}, z.core.$strict>>;
|
|
2457
2511
|
}, z.core.$strict>;
|
|
2458
2512
|
declare const CodingHistoryImportMissingParams: z.ZodObject<{}, z.core.$strict>;
|
|
2459
2513
|
/** What the core adds to every coding service op from its own sign-in (never sent by a client). */
|
|
@@ -2672,7 +2726,7 @@ declare function forPeer(op: OpName | null, part: "error", value: unknown, versi
|
|
|
2672
2726
|
declare const VERSIONED_RESULT_OPS: readonly OpName[];
|
|
2673
2727
|
|
|
2674
2728
|
/** SHA-256 of generated/desktop-protocol.schema.json: the contract both sides of a service connection were built from. */
|
|
2675
|
-
declare const CONTRACT_SHA256: "
|
|
2729
|
+
declare const CONTRACT_SHA256: "2cbf3c7589a30141305f6f0f38c4d4a32bf9ef2a890f7572d9c7bd15c398d4b9";
|
|
2676
2730
|
|
|
2677
2731
|
/**
|
|
2678
2732
|
* The local tool catalog (SPEC §10): every tool a platform agent calls on a person's computer, the
|
|
@@ -2804,4 +2858,4 @@ declare function buildToolStatus(files: readonly unknown[], opts: {
|
|
|
2804
2858
|
/** The committed text form. Columns: per platform, the three levels (P = programmatic, R = protocol, C = chat). */
|
|
2805
2859
|
declare function renderToolStatusMarkdown(status: ToolStatus): string;
|
|
2806
2860
|
|
|
2807
|
-
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 };
|
|
2861
|
+
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 =
|
|
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/
|
|
1274
|
+
// src/schema/audio.ts
|
|
1275
1275
|
import { z as z22 } from "zod";
|
|
1276
|
-
var
|
|
1277
|
-
|
|
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
|
-
|
|
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:
|
|
1311
|
+
ignore: z23.array(z23.string().max(256)).max(64).default([])
|
|
1282
1312
|
});
|
|
1283
|
-
var FsWatchStartResult =
|
|
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 =
|
|
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:
|
|
1322
|
+
wait_ms: z23.int().min(0).max(25e3).default(0)
|
|
1293
1323
|
});
|
|
1294
|
-
var FsWatchEventsResult =
|
|
1324
|
+
var FsWatchEventsResult = z23.strictObject({
|
|
1295
1325
|
/** What changed since the last read, oldest first; re-checked against the disk when read. */
|
|
1296
|
-
changes:
|
|
1326
|
+
changes: z23.array(FsChange).max(1e3),
|
|
1297
1327
|
/** Changes were dropped (more than 1000 waited): list the folder again. */
|
|
1298
|
-
overflow:
|
|
1328
|
+
overflow: z23.boolean(),
|
|
1299
1329
|
expires_at_ms: epochMs
|
|
1300
1330
|
});
|
|
1301
|
-
var FsWatchStopParams =
|
|
1302
|
-
var FsWatchStopResult =
|
|
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
|
|
1306
|
-
var ExecJobId =
|
|
1307
|
-
var ExecJobStartParams =
|
|
1308
|
-
command:
|
|
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:
|
|
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 =
|
|
1314
|
-
var ExecJobOutputParams =
|
|
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:
|
|
1320
|
-
max_bytes:
|
|
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 =
|
|
1352
|
+
var ExecJobOutputResult = z24.strictObject({
|
|
1323
1353
|
/** stdout and stderr interleaved as they arrived (UTF-8). */
|
|
1324
|
-
output:
|
|
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:
|
|
1329
|
-
exit_code:
|
|
1358
|
+
running: z24.boolean(),
|
|
1359
|
+
exit_code: z24.int().nullable()
|
|
1330
1360
|
});
|
|
1331
|
-
var ExecJobStopParams =
|
|
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:
|
|
1364
|
+
force: z24.boolean().default(false)
|
|
1335
1365
|
});
|
|
1336
|
-
var ExecJobStopResult =
|
|
1337
|
-
var ExecJobInfo =
|
|
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:
|
|
1340
|
-
pid:
|
|
1369
|
+
command: z24.string().max(1024),
|
|
1370
|
+
pid: z24.int().min(1),
|
|
1341
1371
|
cwd: AbsPath,
|
|
1342
|
-
running:
|
|
1343
|
-
exit_code:
|
|
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 =
|
|
1348
|
-
var ExecJobListResult =
|
|
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
|
|
1352
|
-
var CodingServiceCredentials =
|
|
1353
|
-
access_token:
|
|
1354
|
-
user_id:
|
|
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:
|
|
1386
|
+
server_url: z25.string().min(1).max(2048).regex(/^https?:\/\/[^\s/?#]+(\/[^\s?#]*)?$/)
|
|
1357
1387
|
});
|
|
1358
|
-
var CodingHistoryBlocked =
|
|
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 =
|
|
1367
|
-
session_id:
|
|
1368
|
-
reason:
|
|
1396
|
+
var CodingHistoryFailure = z25.strictObject({
|
|
1397
|
+
session_id: z25.string().max(64),
|
|
1398
|
+
reason: z25.string().max(300)
|
|
1369
1399
|
});
|
|
1370
|
-
var CodingHistoryRun =
|
|
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:
|
|
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:
|
|
1419
|
+
summary: z25.string().max(400)
|
|
1390
1420
|
});
|
|
1391
|
-
var CodingHistoryStep =
|
|
1421
|
+
var CodingHistoryStep = z25.strictObject({
|
|
1392
1422
|
/** Null when the run could not start (blocked before a plan existed). */
|
|
1393
|
-
plan_id:
|
|
1394
|
-
finished:
|
|
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 =
|
|
1399
|
-
var CodingImportNextParams =
|
|
1400
|
-
plan_id:
|
|
1401
|
-
credentials: CodingServiceCredentials
|
|
1428
|
+
var CodingPlanMissingParams = z25.strictObject({ credentials: CodingServiceCredentials.nullable() });
|
|
1429
|
+
var CodingImportNextParams = z25.strictObject({
|
|
1430
|
+
plan_id: z25.string().regex(/^[0-9a-f]{32}$/),
|
|
1431
|
+
credentials: CodingServiceCredentials.nullable()
|
|
1402
1432
|
});
|
|
1403
|
-
var CodingServiceProgress =
|
|
1404
|
-
phase:
|
|
1433
|
+
var CodingServiceProgress = z25.strictObject({
|
|
1434
|
+
phase: z25.enum(["checking", "importing"]),
|
|
1405
1435
|
done: nonNegInt,
|
|
1406
1436
|
total: nonNegInt
|
|
1407
1437
|
});
|
|
1408
|
-
var CodingHistoryImportMissingParams =
|
|
1409
|
-
var CodingHistoryImportMissingResult =
|
|
1410
|
-
state:
|
|
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 =
|
|
1445
|
+
var CodingHistoryProgressEvent = z25.strictObject({
|
|
1416
1446
|
request_id: RequestId,
|
|
1417
|
-
phase:
|
|
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 = "
|
|
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: "
|
|
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" },
|
|
@@ -2190,6 +2230,13 @@ export {
|
|
|
2190
2230
|
AppsProfilesRemoveResult,
|
|
2191
2231
|
AppsProfilesSaveParams,
|
|
2192
2232
|
AppsProfilesSaveResult,
|
|
2233
|
+
AudioDevice,
|
|
2234
|
+
AudioDevicesParams,
|
|
2235
|
+
AudioDevicesResult,
|
|
2236
|
+
AudioPlayParams,
|
|
2237
|
+
AudioPlayResult,
|
|
2238
|
+
AudioRecordParams,
|
|
2239
|
+
AudioRecordResult,
|
|
2193
2240
|
BEARER_PREFIX,
|
|
2194
2241
|
BROADCAST_CID,
|
|
2195
2242
|
CLOSE_RULES,
|