@ai-matrx/desktop-protocol 0.21.65 → 0.21.67
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 +2 -1
- package/dist/{chunk-server-K7IQDLLV.js → chunk-server-AHS5QIQV.js} +104 -18
- package/dist/chunk-server-AHS5QIQV.js.map +1 -0
- package/dist/client.cjs +85 -17
- 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 +1 -1
- package/dist/index.cjs +104 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +134 -6
- package/dist/index.d.ts +134 -6
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/{models-Bz990hcd.d.cts → models-C0Jgv2ev.d.cts} +111 -2
- package/dist/{models-Bz990hcd.d.ts → models-C0Jgv2ev.d.ts} +111 -2
- package/dist/react.d.cts +48 -1
- package/dist/react.d.ts +48 -1
- package/generated/desktop-protocol.schema.json +192 -5
- package/package.json +2 -2
- package/dist/chunk-server-K7IQDLLV.js.map +0 -1
package/dist/client.cjs
CHANGED
|
@@ -144,7 +144,7 @@ var import_zod2 = require("zod");
|
|
|
144
144
|
var import_zod = require("zod");
|
|
145
145
|
var import_uuid = require("@ai-matrx/kit/uuid");
|
|
146
146
|
var PROTOCOL_MAJOR = 1;
|
|
147
|
-
var PROTOCOL_MINOR =
|
|
147
|
+
var PROTOCOL_MINOR = 67;
|
|
148
148
|
var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
|
|
149
149
|
var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
|
|
150
150
|
var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
@@ -1982,7 +1982,7 @@ var AudioRecordParams = import_zod21.z.strictObject({
|
|
|
1982
1982
|
path: AbsPath.optional(),
|
|
1983
1983
|
/** (1.66) 1 (mono, the default) or 2 (stereo). */
|
|
1984
1984
|
channels: import_zod21.z.int().min(1).max(2).optional(),
|
|
1985
|
-
/** (1.66) Samples per second;
|
|
1985
|
+
/** (1.66) Samples per second; 16000 when absent (the rate Whisper reads). */
|
|
1986
1986
|
sample_rate: import_zod21.z.int().min(8e3).max(192e3).optional()
|
|
1987
1987
|
});
|
|
1988
1988
|
var AudioRecordResult = import_zod21.z.strictObject({
|
|
@@ -4025,7 +4025,13 @@ var AutomationScriptResult = import_zod35.z.strictObject({
|
|
|
4025
4025
|
elapsed_ms: nonNegInt
|
|
4026
4026
|
});
|
|
4027
4027
|
var MailAccountsParams = import_zod35.z.strictObject({});
|
|
4028
|
-
var MailAccount = import_zod35.z.strictObject({
|
|
4028
|
+
var MailAccount = import_zod35.z.strictObject({
|
|
4029
|
+
name: import_zod35.z.string(),
|
|
4030
|
+
emails: import_zod35.z.array(import_zod35.z.string()),
|
|
4031
|
+
enabled: import_zod35.z.boolean(),
|
|
4032
|
+
/** (1.67) The account's mailboxes by name (Matrx Local's email_accounts listed them). */
|
|
4033
|
+
mailboxes: import_zod35.z.array(import_zod35.z.string()).optional()
|
|
4034
|
+
});
|
|
4029
4035
|
var MailAccountsResult = import_zod35.z.strictObject({ accounts: import_zod35.z.array(MailAccount) });
|
|
4030
4036
|
var MailListParams = import_zod35.z.strictObject({
|
|
4031
4037
|
/** The account's name in Mail; absent: every account. */
|
|
@@ -4050,6 +4056,8 @@ var MailListResult = import_zod35.z.strictObject({ messages: import_zod35.z.arra
|
|
|
4050
4056
|
var MailSendParams = import_zod35.z.strictObject({
|
|
4051
4057
|
to: import_zod35.z.array(import_zod35.z.string().min(3).max(320)).min(1).max(50),
|
|
4052
4058
|
cc: import_zod35.z.array(import_zod35.z.string().min(3).max(320)).max(50).default([]),
|
|
4059
|
+
/** (1.67) Blind copies (Matrx Local's send_email bcc). */
|
|
4060
|
+
bcc: import_zod35.z.array(import_zod35.z.string().min(3).max(320)).max(50).optional(),
|
|
4053
4061
|
subject: import_zod35.z.string().max(998),
|
|
4054
4062
|
body: Text,
|
|
4055
4063
|
/** The sending account's address; absent: Mail's default. */
|
|
@@ -4128,13 +4136,19 @@ var MessagesChat = import_zod35.z.strictObject({
|
|
|
4128
4136
|
name: import_zod35.z.string().nullable(),
|
|
4129
4137
|
participants: import_zod35.z.array(import_zod35.z.string()),
|
|
4130
4138
|
last_message_at_ms: epochMs.nullable(),
|
|
4131
|
-
service: import_zod35.z.string().nullable()
|
|
4139
|
+
service: import_zod35.z.string().nullable(),
|
|
4140
|
+
/** (1.67) The newest message's text (Matrx Local's list_conversations preview); absent when it has none. */
|
|
4141
|
+
last_message: import_zod35.z.string().optional()
|
|
4132
4142
|
});
|
|
4133
4143
|
var MessagesChatsResult = import_zod35.z.strictObject({ chats: import_zod35.z.array(MessagesChat) });
|
|
4134
4144
|
var MessagesListParams = import_zod35.z.strictObject({
|
|
4135
4145
|
/** One chat (messages.chats' chat_id); absent: the newest across all. */
|
|
4136
4146
|
chat_id: import_zod35.z.string().min(1).max(512).optional(),
|
|
4137
|
-
limit: import_zod35.z.int().min(1).max(500).default(50)
|
|
4147
|
+
limit: import_zod35.z.int().min(1).max(500).default(50),
|
|
4148
|
+
/** (1.67) Only messages with this handle or chat name in them (partial: a phone, an email, a name). */
|
|
4149
|
+
contact: import_zod35.z.string().min(1).max(320).optional(),
|
|
4150
|
+
/** (1.67) Only messages not yet read. */
|
|
4151
|
+
unread_only: import_zod35.z.boolean().optional()
|
|
4138
4152
|
});
|
|
4139
4153
|
var MessagesMessage = import_zod35.z.strictObject({
|
|
4140
4154
|
id: import_zod35.z.string(),
|
|
@@ -4143,7 +4157,13 @@ var MessagesMessage = import_zod35.z.strictObject({
|
|
|
4143
4157
|
from_me: import_zod35.z.boolean(),
|
|
4144
4158
|
/** The other person's handle (phone or email); null for the person's own messages. */
|
|
4145
4159
|
sender: import_zod35.z.string().nullable(),
|
|
4146
|
-
sent_at_ms: epochMs.nullable()
|
|
4160
|
+
sent_at_ms: epochMs.nullable(),
|
|
4161
|
+
/** (1.67) Whether it has been read. */
|
|
4162
|
+
read: import_zod35.z.boolean().optional(),
|
|
4163
|
+
/** (1.67) iMessage, SMS or RCS, as the Messages database says. */
|
|
4164
|
+
service: import_zod35.z.string().optional(),
|
|
4165
|
+
/** (1.67) The chat's name (group chats); absent for a one-to-one chat. */
|
|
4166
|
+
chat_name: import_zod35.z.string().optional()
|
|
4147
4167
|
});
|
|
4148
4168
|
var MessagesListResult = import_zod35.z.strictObject({ messages: import_zod35.z.array(MessagesMessage) });
|
|
4149
4169
|
var MessagesSendParams = import_zod35.z.strictObject({
|
|
@@ -4158,8 +4178,8 @@ var MessagesSendParams = import_zod35.z.strictObject({
|
|
|
4158
4178
|
});
|
|
4159
4179
|
var MessagesSendResult = import_zod35.z.strictObject({ sent: import_zod35.z.boolean() });
|
|
4160
4180
|
var ContactsSearchParams = import_zod35.z.strictObject({
|
|
4161
|
-
/** Matched against names, organizations, emails and phone numbers. */
|
|
4162
|
-
query: import_zod35.z.string().min(1).max(256),
|
|
4181
|
+
/** Matched against names, organizations, emails and phone numbers; absent (1.67): the first `limit` contacts. */
|
|
4182
|
+
query: import_zod35.z.string().min(1).max(256).optional(),
|
|
4163
4183
|
limit: import_zod35.z.int().min(1).max(200).default(25)
|
|
4164
4184
|
});
|
|
4165
4185
|
var ContactLabeled = import_zod35.z.strictObject({ label: import_zod35.z.string().nullable(), value: import_zod35.z.string() });
|
|
@@ -4189,6 +4209,8 @@ var CalendarListParams = import_zod35.z.strictObject({
|
|
|
4189
4209
|
to_ms: epochMs,
|
|
4190
4210
|
/** One calendar's name; absent: every calendar. */
|
|
4191
4211
|
calendar: import_zod35.z.string().min(1).max(256).optional(),
|
|
4212
|
+
/** (1.67) Several calendars by name (Matrx Local's calendar_names); with `calendar`, both count. */
|
|
4213
|
+
calendars: import_zod35.z.array(import_zod35.z.string().min(1).max(256)).min(1).max(100).optional(),
|
|
4192
4214
|
limit: import_zod35.z.int().min(1).max(500).default(100)
|
|
4193
4215
|
});
|
|
4194
4216
|
var CalendarEvent = import_zod35.z.strictObject({
|
|
@@ -4199,7 +4221,9 @@ var CalendarEvent = import_zod35.z.strictObject({
|
|
|
4199
4221
|
all_day: import_zod35.z.boolean(),
|
|
4200
4222
|
calendar: import_zod35.z.string(),
|
|
4201
4223
|
location: import_zod35.z.string().nullable(),
|
|
4202
|
-
notes: import_zod35.z.string().nullable()
|
|
4224
|
+
notes: import_zod35.z.string().nullable(),
|
|
4225
|
+
/** (1.67) The event's link; absent when it has none. */
|
|
4226
|
+
url: import_zod35.z.string().optional()
|
|
4203
4227
|
});
|
|
4204
4228
|
var CalendarListResult = import_zod35.z.strictObject({ events: import_zod35.z.array(CalendarEvent) });
|
|
4205
4229
|
var CalendarCreateParams = import_zod35.z.strictObject({
|
|
@@ -4216,6 +4240,8 @@ var CalendarCreateResult = import_zod35.z.strictObject({ id: import_zod35.z.stri
|
|
|
4216
4240
|
var RemindersListParams = import_zod35.z.strictObject({
|
|
4217
4241
|
/** One list's name; absent: every list. */
|
|
4218
4242
|
list: import_zod35.z.string().min(1).max(256).optional(),
|
|
4243
|
+
/** (1.67) Several lists by name (Matrx Local's list_names); with `list`, both count. */
|
|
4244
|
+
lists: import_zod35.z.array(import_zod35.z.string().min(1).max(256)).min(1).max(100).optional(),
|
|
4219
4245
|
include_completed: import_zod35.z.boolean().default(false),
|
|
4220
4246
|
limit: import_zod35.z.int().min(1).max(500).default(100)
|
|
4221
4247
|
});
|
|
@@ -4225,7 +4251,11 @@ var Reminder = import_zod35.z.strictObject({
|
|
|
4225
4251
|
list: import_zod35.z.string(),
|
|
4226
4252
|
due_ms: epochMs.nullable(),
|
|
4227
4253
|
completed: import_zod35.z.boolean(),
|
|
4228
|
-
notes: import_zod35.z.string().nullable()
|
|
4254
|
+
notes: import_zod35.z.string().nullable(),
|
|
4255
|
+
/** (1.67) 0 none, 1 high … 9 low (EventKit's scale). */
|
|
4256
|
+
priority: import_zod35.z.int().min(0).max(9).optional(),
|
|
4257
|
+
/** (1.67) When it was completed; absent while open. */
|
|
4258
|
+
completed_at_ms: epochMs.optional()
|
|
4229
4259
|
});
|
|
4230
4260
|
var RemindersListResult = import_zod35.z.strictObject({ reminders: import_zod35.z.array(Reminder) });
|
|
4231
4261
|
var RemindersCreateParams = import_zod35.z.strictObject({
|
|
@@ -4241,6 +4271,8 @@ var PhotosSearchParams = import_zod35.z.strictObject({
|
|
|
4241
4271
|
from_ms: epochMs.optional(),
|
|
4242
4272
|
to_ms: epochMs.optional(),
|
|
4243
4273
|
favorites_only: import_zod35.z.boolean().default(false),
|
|
4274
|
+
/** (1.67) image, video or all (Matrx Local's media_type); absent: all. */
|
|
4275
|
+
media_type: import_zod35.z.enum(["image", "video", "all"]).optional(),
|
|
4244
4276
|
limit: import_zod35.z.int().min(1).max(200).default(25)
|
|
4245
4277
|
});
|
|
4246
4278
|
var Photo = import_zod35.z.strictObject({
|
|
@@ -4250,15 +4282,26 @@ var Photo = import_zod35.z.strictObject({
|
|
|
4250
4282
|
width: nonNegInt.nullable(),
|
|
4251
4283
|
height: nonNegInt.nullable(),
|
|
4252
4284
|
favorite: import_zod35.z.boolean(),
|
|
4253
|
-
title: import_zod35.z.string().nullable()
|
|
4285
|
+
title: import_zod35.z.string().nullable(),
|
|
4286
|
+
/** (1.67) What the asset is. */
|
|
4287
|
+
media_type: import_zod35.z.enum(["image", "video", "audio", "unknown"]).optional(),
|
|
4288
|
+
/** (1.67) A video's length in seconds; absent for a still. */
|
|
4289
|
+
duration_s: import_zod35.z.number().min(0).optional()
|
|
4254
4290
|
});
|
|
4255
4291
|
var PhotosSearchResult = import_zod35.z.strictObject({ photos: import_zod35.z.array(Photo) });
|
|
4256
4292
|
var PhotosGetParams = import_zod35.z.strictObject({
|
|
4257
4293
|
id: import_zod35.z.string().min(1).max(256),
|
|
4258
4294
|
/** Copy the original into a folder Matrx 2 owns and answer its path (then fs_read or desktop_documents reads it). */
|
|
4259
|
-
export: import_zod35.z.boolean().default(false)
|
|
4295
|
+
export: import_zod35.z.boolean().default(false),
|
|
4296
|
+
/** (1.67) Also answer a PNG thumbnail no larger than this many pixels a side (Matrx Local's get_photo thumbnail). */
|
|
4297
|
+
thumbnail_size: import_zod35.z.int().min(64).max(2048).optional()
|
|
4298
|
+
});
|
|
4299
|
+
var PhotosGetResult = import_zod35.z.strictObject({
|
|
4300
|
+
photo: Photo,
|
|
4301
|
+
path: import_zod35.z.string().nullable(),
|
|
4302
|
+
/** (1.67) The thumbnail as base64 PNG, when thumbnail_size asked for one; absent when it could not be drawn. */
|
|
4303
|
+
thumbnail_png_base64: import_zod35.z.string().optional()
|
|
4260
4304
|
});
|
|
4261
|
-
var PhotosGetResult = import_zod35.z.strictObject({ photo: Photo, path: import_zod35.z.string().nullable() });
|
|
4262
4305
|
var LocationGetParams = import_zod35.z.strictObject({ timeout_s: import_zod35.z.int().min(1).max(60).default(15) });
|
|
4263
4306
|
var LocationGetResult = import_zod35.z.strictObject({
|
|
4264
4307
|
latitude: import_zod35.z.number().min(-90).max(90),
|
|
@@ -4267,7 +4310,12 @@ var LocationGetResult = import_zod35.z.strictObject({
|
|
|
4267
4310
|
accuracy_m: import_zod35.z.number().min(0).nullable(),
|
|
4268
4311
|
at_ms: epochMs,
|
|
4269
4312
|
/** Who answered: the OS's own location service. */
|
|
4270
|
-
source: import_zod35.z.enum(["corelocation", "windows", "geoclue"])
|
|
4313
|
+
source: import_zod35.z.enum(["corelocation", "windows", "geoclue"]),
|
|
4314
|
+
/** (1.67) Metres above sea level, its accuracy, speed (m/s) and course (degrees); absent where the OS does not say. */
|
|
4315
|
+
altitude_m: import_zod35.z.number().optional(),
|
|
4316
|
+
vertical_accuracy_m: import_zod35.z.number().min(0).optional(),
|
|
4317
|
+
speed_mps: import_zod35.z.number().min(0).optional(),
|
|
4318
|
+
course_deg: import_zod35.z.number().min(0).max(360).optional()
|
|
4271
4319
|
});
|
|
4272
4320
|
|
|
4273
4321
|
// src/schema/windows.ts
|
|
@@ -4299,6 +4347,8 @@ var WindowsRegistryWriteResult = import_zod36.z.strictObject({ key: import_zod36
|
|
|
4299
4347
|
var WindowsServicesParams = import_zod36.z.strictObject({
|
|
4300
4348
|
/** Matched against the service's name and display name. */
|
|
4301
4349
|
filter: import_zod36.z.string().min(1).max(256).optional(),
|
|
4350
|
+
/** (1.67) Only services in this state (Matrx Local's service_list status). */
|
|
4351
|
+
status: import_zod36.z.enum(["running", "stopped", "paused"]).optional(),
|
|
4302
4352
|
limit: import_zod36.z.int().min(1).max(1e3).default(200)
|
|
4303
4353
|
});
|
|
4304
4354
|
var WindowsService = import_zod36.z.strictObject({
|
|
@@ -4312,7 +4362,8 @@ var WindowsService = import_zod36.z.strictObject({
|
|
|
4312
4362
|
var WindowsServicesResult = import_zod36.z.strictObject({ services: import_zod36.z.array(WindowsService) });
|
|
4313
4363
|
var WindowsServiceControlParams = import_zod36.z.strictObject({
|
|
4314
4364
|
name: import_zod36.z.string().min(1).max(256),
|
|
4315
|
-
|
|
4365
|
+
/** pause and resume since 1.67 (Matrx Local's service_control). */
|
|
4366
|
+
action: import_zod36.z.enum(["start", "stop", "restart", "pause", "resume"])
|
|
4316
4367
|
});
|
|
4317
4368
|
var WindowsServiceControlResult = import_zod36.z.strictObject({ name: import_zod36.z.string(), status: import_zod36.z.string() });
|
|
4318
4369
|
var WindowsEventLogParams = import_zod36.z.strictObject({
|
|
@@ -4320,6 +4371,8 @@ var WindowsEventLogParams = import_zod36.z.strictObject({
|
|
|
4320
4371
|
/** Only these levels; absent: all. */
|
|
4321
4372
|
levels: import_zod36.z.array(import_zod36.z.enum(["critical", "error", "warning", "information", "verbose"])).max(5).optional(),
|
|
4322
4373
|
since_ms: epochMs.optional(),
|
|
4374
|
+
/** (1.67) Only events whose source (provider) name contains this. */
|
|
4375
|
+
source: import_zod36.z.string().min(1).max(256).optional(),
|
|
4323
4376
|
limit: import_zod36.z.int().min(1).max(500).default(50)
|
|
4324
4377
|
});
|
|
4325
4378
|
var WindowsEvent = import_zod36.z.strictObject({
|
|
@@ -4330,7 +4383,11 @@ var WindowsEvent = import_zod36.z.strictObject({
|
|
|
4330
4383
|
message: import_zod36.z.string()
|
|
4331
4384
|
});
|
|
4332
4385
|
var WindowsEventLogResult = import_zod36.z.strictObject({ log: import_zod36.z.string(), events: import_zod36.z.array(WindowsEvent) });
|
|
4333
|
-
var WindowsFeaturesParams = import_zod36.z.strictObject({
|
|
4386
|
+
var WindowsFeaturesParams = import_zod36.z.strictObject({
|
|
4387
|
+
filter: import_zod36.z.string().min(1).max(256).optional(),
|
|
4388
|
+
/** (1.67) Only features that are on (Matrx Local's windows_features installed_only). */
|
|
4389
|
+
installed_only: import_zod36.z.boolean().optional()
|
|
4390
|
+
});
|
|
4334
4391
|
var WindowsFeature = import_zod36.z.strictObject({ name: import_zod36.z.string(), state: import_zod36.z.string() });
|
|
4335
4392
|
var WindowsFeaturesResult = import_zod36.z.strictObject({ features: import_zod36.z.array(WindowsFeature) });
|
|
4336
4393
|
|
|
@@ -4850,7 +4907,10 @@ var RESULT_PATH = /* @__PURE__ */ new Map([
|
|
|
4850
4907
|
["web.fetch_with_browser", "WebBrowserFetchResult"],
|
|
4851
4908
|
["sysinfo.get", "SysinfoGetResult"],
|
|
4852
4909
|
["sysinfo.hardware", "SysinfoHardwareResult"],
|
|
4853
|
-
["apps.projects.to_window", "AppsProjectsToWindowResult"]
|
|
4910
|
+
["apps.projects.to_window", "AppsProjectsToWindowResult"],
|
|
4911
|
+
// 1.67: Matrx Local's local_mac_apps result fields.
|
|
4912
|
+
["photos.get", "PhotosGetResult"],
|
|
4913
|
+
["location.get", "LocationGetResult"]
|
|
4854
4914
|
]);
|
|
4855
4915
|
var NESTED_RESULTS = /* @__PURE__ */ new Map([
|
|
4856
4916
|
["apps.chats.list", [["chats", "ChatRow"]]],
|
|
@@ -4874,6 +4934,14 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
|
|
|
4874
4934
|
// 1.63: what an instance record still lacks.
|
|
4875
4935
|
["apps.instances.list", [["instances", "AppInstance"]]],
|
|
4876
4936
|
["apps.windows.set_remote_control", [["remote_control", "WindowRemoteControl"]]],
|
|
4937
|
+
// 1.67: Matrx Local's local_mac_apps result fields.
|
|
4938
|
+
["mail.accounts", [["accounts", "MailAccount"]]],
|
|
4939
|
+
["messages.chats", [["chats", "MessagesChat"]]],
|
|
4940
|
+
["messages.list", [["messages", "MessagesMessage"]]],
|
|
4941
|
+
["calendar.list", [["events", "CalendarEvent"]]],
|
|
4942
|
+
["reminders.list", [["reminders", "Reminder"]]],
|
|
4943
|
+
["photos.search", [["photos", "Photo"]]],
|
|
4944
|
+
["photos.get", [["photo", "Photo"]]],
|
|
4877
4945
|
["coding.providers", [["providers", "CodingProviderStatus"]]],
|
|
4878
4946
|
// 1.57: the account a coding record belongs to.
|
|
4879
4947
|
["coding.sessions.list", [["sessions", "CodingSessionRecord"], ["recent", "CodingRecentRow"]]],
|