@ai-matrx/desktop-protocol 0.21.32 → 0.21.34

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/client.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { BackoffOptions } from '@ai-matrx/realtime';
2
2
  export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/realtime';
3
3
  import { z } from 'zod';
4
- import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-BNbWn8EL.cjs';
5
- export { i as isDesktopProtocolError } from './models-BNbWn8EL.cjs';
4
+ import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-Sz1BEet6.cjs';
5
+ export { i as isDesktopProtocolError } from './models-Sz1BEet6.cjs';
6
6
  import { FrameHeader } from './frame.cjs';
7
7
 
8
8
  /** The subset of the WHATWG WebSocket the client uses — browser, React Native, `ws` and Workers all fit. */
package/dist/client.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { BackoffOptions } from '@ai-matrx/realtime';
2
2
  export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/realtime';
3
3
  import { z } from 'zod';
4
- import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-BNbWn8EL.js';
5
- export { i as isDesktopProtocolError } from './models-BNbWn8EL.js';
4
+ import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-Sz1BEet6.js';
5
+ export { i as isDesktopProtocolError } from './models-Sz1BEet6.js';
6
6
  import { FrameHeader } from './frame.js';
7
7
 
8
8
  /** The subset of the WHATWG WebSocket the client uses — browser, React Native, `ws` and Workers all fit. */
package/dist/client.js CHANGED
@@ -112,7 +112,7 @@ import { z as z2 } from "zod";
112
112
  import { z } from "zod";
113
113
  import { UUID_SHAPE_PATTERN } from "@ai-matrx/kit/uuid";
114
114
  var PROTOCOL_MAJOR = 1;
115
- var PROTOCOL_MINOR = 42;
115
+ var PROTOCOL_MINOR = 44;
116
116
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
117
117
  var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
118
118
  var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -3055,7 +3055,27 @@ var ProjectMoveGroup = z31.strictObject({
3055
3055
  already: nonNegInt.optional(),
3056
3056
  from_other_groups: nonNegInt.optional(),
3057
3057
  /** A group of that name was already there (reused, never doubled). */
3058
- group_exists: z31.boolean().optional()
3058
+ group_exists: z31.boolean().optional(),
3059
+ /** 1.43: "now" = written into the closed window; "next_close" = queued until that window closes. */
3060
+ when: z31.enum(["now", "next_close"]).optional(),
3061
+ /** 1.43: the window's own id of the group used (absent while a new one waits to be made). */
3062
+ group_id: z31.string().max(200).optional()
3063
+ });
3064
+ var ProjectMoveOutcome = z31.strictObject({
3065
+ chat_id: ChatId,
3066
+ title: z31.string().max(300),
3067
+ outcome: z31.enum(["copied", "moved", "already", "skipped"]),
3068
+ off: z31.array(ChatPlace).max(50),
3069
+ reason: z31.string().max(400).nullable(),
3070
+ pin: z31.enum(["now", "next_close", "failed"]).nullable(),
3071
+ group: z31.enum(["now", "next_close", "failed"]).nullable()
3072
+ });
3073
+ var WindowGroup = z31.strictObject({ id: z31.string().max(200), name: z31.string().max(200), count: nonNegInt });
3074
+ var AppsWindowsGroupsParams = z31.strictObject({ app_key: AppKey, window: ChatPlace });
3075
+ var AppsWindowsGroupsResult = z31.strictObject({
3076
+ window: ChatPlace,
3077
+ open: z31.boolean(),
3078
+ groups: z31.array(WindowGroup).max(1e3)
3059
3079
  });
3060
3080
  var ProjectMovePin = z31.strictObject({
3061
3081
  ok: z31.boolean(),
@@ -3076,8 +3096,12 @@ var AppsProjectsToWindowParams = z31.strictObject({
3076
3096
  window: ChatPlace,
3077
3097
  /** Also take each chat off its other side windows where safe (never main, the holder, an open window). */
3078
3098
  take_off: z31.boolean().default(false),
3079
- /** Also group them under the project's name in that window's sidebar (closed windows only). */
3099
+ /** Also group them under the project's name in that window's sidebar (1.43: an open window's is queued for its next close). */
3080
3100
  group: z31.boolean().default(false),
3101
+ /** 1.43: group them into this existing group of the window (apps.windows.groups); implies group. */
3102
+ group_id: z31.string().min(1).max(200).optional(),
3103
+ /** 1.43: group them under this name (an existing group of that name is reused, else made); implies group. */
3104
+ group_name: z31.string().trim().min(1).max(200).optional(),
3081
3105
  /** 1.32: also pin them in that window (now if closed, else when it next closes). */
3082
3106
  pin: z31.boolean().optional(),
3083
3107
  /** 1.36: a batch: exactly these chats of the project and no other (a reused marker is a label, never a sweep). */
@@ -3099,6 +3123,8 @@ var AppsProjectsToWindowResult = z31.strictObject({
3099
3123
  group: ProjectMoveGroup.nullable(),
3100
3124
  /** 1.32: the pin in the target window (absent: not asked). */
3101
3125
  pin: ProjectMovePin.optional(),
3126
+ /** 1.43: one row per chat, what happened to it (absent from an older core). */
3127
+ chats: z31.array(ProjectMoveOutcome).max(5e3).optional(),
3102
3128
  message: z31.string().max(400)
3103
3129
  });
3104
3130
  var ColdChat = z31.strictObject({
@@ -3582,6 +3608,70 @@ var MailSendParams = z34.strictObject({
3582
3608
  send: z34.boolean().default(true)
3583
3609
  });
3584
3610
  var MailSendResult = z34.strictObject({ sent: z34.boolean() });
3611
+ var OutlookStatusParams = z34.strictObject({});
3612
+ var OutlookAccount = z34.strictObject({ name: z34.string(), email: z34.string().nullable() });
3613
+ var OutlookStatusResult = z34.strictObject({
3614
+ /** classic_windows: scriptable. new_windows / mac: installed, not scriptable. none: not found. */
3615
+ client: z34.enum(["classic_windows", "new_windows", "mac", "none"]),
3616
+ scriptable: z34.boolean(),
3617
+ version: z34.string().nullable(),
3618
+ accounts: z34.array(OutlookAccount),
3619
+ /** Why it is not scriptable here, in a sentence the person can act on; null when it is. */
3620
+ reason: z34.string().nullable()
3621
+ });
3622
+ var Address = z34.string().min(3).max(320);
3623
+ var OutlookDraftParams = z34.strictObject({
3624
+ to: z34.array(Address).max(100).default([]),
3625
+ cc: z34.array(Address).max(100).default([]),
3626
+ bcc: z34.array(Address).max(100).default([]),
3627
+ subject: z34.string().max(998).default(""),
3628
+ body: z34.string().max(1048576).default(""),
3629
+ body_format: z34.enum(["text", "html"]).default("text"),
3630
+ /** Files on this computer to attach (absolute paths). */
3631
+ attachments: z34.array(z34.string().min(1).max(4096)).max(50).default([]),
3632
+ /** The sending account's address (one of outlook.status's accounts); absent: Outlook's default. */
3633
+ account: Address.optional(),
3634
+ /** true also opens the draft in a window for the person. */
3635
+ display: z34.boolean().default(false)
3636
+ });
3637
+ var OutlookDraftResult = z34.strictObject({
3638
+ /** The draft's id in Outlook (outlook.read takes it). */
3639
+ id: z34.string(),
3640
+ account: z34.string().nullable(),
3641
+ folder: z34.string(),
3642
+ attachments: nonNegInt,
3643
+ displayed: z34.boolean()
3644
+ });
3645
+ var OutlookListParams = z34.strictObject({
3646
+ folder: z34.enum(["inbox", "sent", "drafts"]).default("inbox"),
3647
+ /** The account's address; absent: the default account. */
3648
+ account: Address.optional(),
3649
+ unread_only: z34.boolean().default(false),
3650
+ limit: z34.int().min(1).max(200).default(25)
3651
+ });
3652
+ var OutlookMessage = z34.strictObject({
3653
+ id: z34.string(),
3654
+ subject: z34.string(),
3655
+ sender: z34.string(),
3656
+ received_at_ms: epochMs.nullable(),
3657
+ read: z34.boolean(),
3658
+ has_attachments: z34.boolean(),
3659
+ /** The first lines of the message's text. */
3660
+ preview: z34.string()
3661
+ });
3662
+ var OutlookListResult = z34.strictObject({ folder: z34.string(), messages: z34.array(OutlookMessage) });
3663
+ var OutlookReadParams = z34.strictObject({ id: z34.string().min(1).max(1024) });
3664
+ var OutlookReadResult = z34.strictObject({
3665
+ id: z34.string(),
3666
+ subject: z34.string(),
3667
+ sender: z34.string(),
3668
+ to: z34.array(z34.string()),
3669
+ cc: z34.array(z34.string()),
3670
+ received_at_ms: epochMs.nullable(),
3671
+ /** The plain text body, cut at 1 MiB. */
3672
+ body: z34.string(),
3673
+ attachments: z34.array(z34.strictObject({ name: z34.string(), size: nonNegInt }))
3674
+ });
3585
3675
  var MessagesChatsParams = z34.strictObject({ limit: z34.int().min(1).max(200).default(25) });
3586
3676
  var MessagesChat = z34.strictObject({
3587
3677
  chat_id: z34.string(),
@@ -4119,6 +4209,7 @@ var OPS = {
4119
4209
  "diag.errors.list": { params: DiagErrorsListParams, result: DiagErrorsListResult, kind: "unary", since: "1.20", errors: ["INTERNAL"] },
4120
4210
  "diag.errors.report": { params: DiagErrorsReportParams, result: DiagErrorsReportResult, kind: "unary", since: "1.20", errors: ["INTERNAL"] },
4121
4211
  // 1.21: what a window's sidebar draws (the Move-all grouping check).
4212
+ "apps.windows.groups": { params: AppsWindowsGroupsParams, result: AppsWindowsGroupsResult, kind: "unary", since: "1.43", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4122
4213
  "apps.windows.shown": { params: AppsWindowsShownParams, result: AppsWindowsShownResult, kind: "unary", since: "1.21", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4123
4214
  // Claude Code history (SPEC §6 coding): served by the `coding` Python service through SERVICES below.
4124
4215
  "coding.history.import_missing": { params: CodingHistoryImportMissingParams, result: CodingHistoryImportMissingResult, kind: "unary", since: "1.5", errors: ["RESOURCE_BUSY", "RESOURCE_GONE", "CANCELLED", "INTERNAL"] },
@@ -4216,6 +4307,10 @@ var OPS = {
4216
4307
  "mail.accounts": { params: MailAccountsParams, result: MailAccountsResult, kind: "unary", since: "1.37", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
4217
4308
  "mail.list": { params: MailListParams, result: MailListResult, kind: "unary", since: "1.37", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
4218
4309
  "mail.send": { params: MailSendParams, result: MailSendResult, kind: "unary", since: "1.37", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
4310
+ "outlook.status": { params: OutlookStatusParams, result: OutlookStatusResult, kind: "unary", since: "1.44", errors: ["TIMEOUT", "INTERNAL"] },
4311
+ "outlook.draft": { params: OutlookDraftParams, result: OutlookDraftResult, kind: "unary", since: "1.44", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
4312
+ "outlook.list": { params: OutlookListParams, result: OutlookListResult, kind: "unary", since: "1.44", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
4313
+ "outlook.read": { params: OutlookReadParams, result: OutlookReadResult, kind: "unary", since: "1.44", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
4219
4314
  "messages.chats": { params: MessagesChatsParams, result: MessagesChatsResult, kind: "unary", since: "1.37", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
4220
4315
  "messages.list": { params: MessagesListParams, result: MessagesListResult, kind: "unary", since: "1.37", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
4221
4316
  "messages.send": { params: MessagesSendParams, result: MessagesSendResult, kind: "unary", since: "1.37", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
@@ -4289,7 +4384,8 @@ var RESULT_PATH = /* @__PURE__ */ new Map([
4289
4384
  ["apps.accounts.resets", "AppsAccountsResetsResult"],
4290
4385
  ["apps.windows.update_state", "AppsWindowsUpdateStateResult"],
4291
4386
  ["web.fetch_with_browser", "WebBrowserFetchResult"],
4292
- ["sysinfo.get", "SysinfoGetResult"]
4387
+ ["sysinfo.get", "SysinfoGetResult"],
4388
+ ["apps.projects.to_window", "AppsProjectsToWindowResult"]
4293
4389
  ]);
4294
4390
  var NESTED_RESULTS = /* @__PURE__ */ new Map([
4295
4391
  ["apps.chats.list", [["chats", "ChatRow"]]],
@@ -4304,7 +4400,8 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
4304
4400
  ["stack.state", [["servers", "StackServer"]]],
4305
4401
  ["account.agents.list", [["agents", "AccountAgent"]]],
4306
4402
  ["web.scrape", [["pages", "WebScrapePage"]]],
4307
- ["sysinfo.get", [["permissions", "SysinfoGetResult.permissions[]"]]]
4403
+ ["sysinfo.get", [["permissions", "SysinfoGetResult.permissions[]"]]],
4404
+ ["apps.projects.to_window", [["group", "ProjectMoveGroup"]]]
4308
4405
  ]);
4309
4406
  var WINDOW_RESULTS = /* @__PURE__ */ new Map([
4310
4407
  ["window.list", "windows"],