@ai-matrx/desktop-protocol 0.21.33 → 0.21.35

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.cjs CHANGED
@@ -551,6 +551,16 @@ __export(src_exports, {
551
551
  OsGrantState: () => OsGrantState,
552
552
  OsPermissionName: () => OsPermissionName,
553
553
  OsRequirementName: () => OsRequirementName,
554
+ OutlookAccount: () => OutlookAccount,
555
+ OutlookDraftParams: () => OutlookDraftParams,
556
+ OutlookDraftResult: () => OutlookDraftResult,
557
+ OutlookListParams: () => OutlookListParams,
558
+ OutlookListResult: () => OutlookListResult,
559
+ OutlookMessage: () => OutlookMessage,
560
+ OutlookReadParams: () => OutlookReadParams,
561
+ OutlookReadResult: () => OutlookReadResult,
562
+ OutlookStatusParams: () => OutlookStatusParams,
563
+ OutlookStatusResult: () => OutlookStatusResult,
554
564
  PERMISSIONS_SINCE: () => PERMISSIONS_SINCE,
555
565
  PING_TEXT: () => PING_TEXT,
556
566
  PONG_TEXT: () => PONG_TEXT,
@@ -848,7 +858,7 @@ module.exports = __toCommonJS(src_exports);
848
858
  var import_zod = require("zod");
849
859
  var import_uuid = require("@ai-matrx/kit/uuid");
850
860
  var PROTOCOL_MAJOR = 1;
851
- var PROTOCOL_MINOR = 43;
861
+ var PROTOCOL_MINOR = 44;
852
862
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
853
863
  var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
854
864
  var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -4535,6 +4545,70 @@ var MailSendParams = import_zod36.z.strictObject({
4535
4545
  send: import_zod36.z.boolean().default(true)
4536
4546
  });
4537
4547
  var MailSendResult = import_zod36.z.strictObject({ sent: import_zod36.z.boolean() });
4548
+ var OutlookStatusParams = import_zod36.z.strictObject({});
4549
+ var OutlookAccount = import_zod36.z.strictObject({ name: import_zod36.z.string(), email: import_zod36.z.string().nullable() });
4550
+ var OutlookStatusResult = import_zod36.z.strictObject({
4551
+ /** classic_windows: scriptable. new_windows / mac: installed, not scriptable. none: not found. */
4552
+ client: import_zod36.z.enum(["classic_windows", "new_windows", "mac", "none"]),
4553
+ scriptable: import_zod36.z.boolean(),
4554
+ version: import_zod36.z.string().nullable(),
4555
+ accounts: import_zod36.z.array(OutlookAccount),
4556
+ /** Why it is not scriptable here, in a sentence the person can act on; null when it is. */
4557
+ reason: import_zod36.z.string().nullable()
4558
+ });
4559
+ var Address = import_zod36.z.string().min(3).max(320);
4560
+ var OutlookDraftParams = import_zod36.z.strictObject({
4561
+ to: import_zod36.z.array(Address).max(100).default([]),
4562
+ cc: import_zod36.z.array(Address).max(100).default([]),
4563
+ bcc: import_zod36.z.array(Address).max(100).default([]),
4564
+ subject: import_zod36.z.string().max(998).default(""),
4565
+ body: import_zod36.z.string().max(1048576).default(""),
4566
+ body_format: import_zod36.z.enum(["text", "html"]).default("text"),
4567
+ /** Files on this computer to attach (absolute paths). */
4568
+ attachments: import_zod36.z.array(import_zod36.z.string().min(1).max(4096)).max(50).default([]),
4569
+ /** The sending account's address (one of outlook.status's accounts); absent: Outlook's default. */
4570
+ account: Address.optional(),
4571
+ /** true also opens the draft in a window for the person. */
4572
+ display: import_zod36.z.boolean().default(false)
4573
+ });
4574
+ var OutlookDraftResult = import_zod36.z.strictObject({
4575
+ /** The draft's id in Outlook (outlook.read takes it). */
4576
+ id: import_zod36.z.string(),
4577
+ account: import_zod36.z.string().nullable(),
4578
+ folder: import_zod36.z.string(),
4579
+ attachments: nonNegInt,
4580
+ displayed: import_zod36.z.boolean()
4581
+ });
4582
+ var OutlookListParams = import_zod36.z.strictObject({
4583
+ folder: import_zod36.z.enum(["inbox", "sent", "drafts"]).default("inbox"),
4584
+ /** The account's address; absent: the default account. */
4585
+ account: Address.optional(),
4586
+ unread_only: import_zod36.z.boolean().default(false),
4587
+ limit: import_zod36.z.int().min(1).max(200).default(25)
4588
+ });
4589
+ var OutlookMessage = import_zod36.z.strictObject({
4590
+ id: import_zod36.z.string(),
4591
+ subject: import_zod36.z.string(),
4592
+ sender: import_zod36.z.string(),
4593
+ received_at_ms: epochMs.nullable(),
4594
+ read: import_zod36.z.boolean(),
4595
+ has_attachments: import_zod36.z.boolean(),
4596
+ /** The first lines of the message's text. */
4597
+ preview: import_zod36.z.string()
4598
+ });
4599
+ var OutlookListResult = import_zod36.z.strictObject({ folder: import_zod36.z.string(), messages: import_zod36.z.array(OutlookMessage) });
4600
+ var OutlookReadParams = import_zod36.z.strictObject({ id: import_zod36.z.string().min(1).max(1024) });
4601
+ var OutlookReadResult = import_zod36.z.strictObject({
4602
+ id: import_zod36.z.string(),
4603
+ subject: import_zod36.z.string(),
4604
+ sender: import_zod36.z.string(),
4605
+ to: import_zod36.z.array(import_zod36.z.string()),
4606
+ cc: import_zod36.z.array(import_zod36.z.string()),
4607
+ received_at_ms: epochMs.nullable(),
4608
+ /** The plain text body, cut at 1 MiB. */
4609
+ body: import_zod36.z.string(),
4610
+ attachments: import_zod36.z.array(import_zod36.z.strictObject({ name: import_zod36.z.string(), size: nonNegInt }))
4611
+ });
4538
4612
  var MessagesChatsParams = import_zod36.z.strictObject({ limit: import_zod36.z.int().min(1).max(200).default(25) });
4539
4613
  var MessagesChat = import_zod36.z.strictObject({
4540
4614
  chat_id: import_zod36.z.string(),
@@ -5170,6 +5244,10 @@ var OPS = {
5170
5244
  "mail.accounts": { params: MailAccountsParams, result: MailAccountsResult, kind: "unary", since: "1.37", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
5171
5245
  "mail.list": { params: MailListParams, result: MailListResult, kind: "unary", since: "1.37", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
5172
5246
  "mail.send": { params: MailSendParams, result: MailSendResult, kind: "unary", since: "1.37", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
5247
+ "outlook.status": { params: OutlookStatusParams, result: OutlookStatusResult, kind: "unary", since: "1.44", errors: ["TIMEOUT", "INTERNAL"] },
5248
+ "outlook.draft": { params: OutlookDraftParams, result: OutlookDraftResult, kind: "unary", since: "1.44", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
5249
+ "outlook.list": { params: OutlookListParams, result: OutlookListResult, kind: "unary", since: "1.44", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
5250
+ "outlook.read": { params: OutlookReadParams, result: OutlookReadResult, kind: "unary", since: "1.44", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
5173
5251
  "messages.chats": { params: MessagesChatsParams, result: MessagesChatsResult, kind: "unary", since: "1.37", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
5174
5252
  "messages.list": { params: MessagesListParams, result: MessagesListResult, kind: "unary", since: "1.37", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
5175
5253
  "messages.send": { params: MessagesSendParams, result: MessagesSendResult, kind: "unary", since: "1.37", errors: ["INVALID_PARAMS", "NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "TIMEOUT", "INTERNAL"] },
@@ -5916,6 +5994,16 @@ var NAMED_SCHEMAS = {
5916
5994
  MailListResult,
5917
5995
  MailSendParams,
5918
5996
  MailSendResult,
5997
+ OutlookStatusParams,
5998
+ OutlookAccount,
5999
+ OutlookStatusResult,
6000
+ OutlookDraftParams,
6001
+ OutlookDraftResult,
6002
+ OutlookListParams,
6003
+ OutlookMessage,
6004
+ OutlookListResult,
6005
+ OutlookReadParams,
6006
+ OutlookReadResult,
5919
6007
  MessagesChatsParams,
5920
6008
  MessagesChat,
5921
6009
  MessagesChatsResult,
@@ -6200,7 +6288,7 @@ function forPeer(op, part, value, version) {
6200
6288
  var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
6201
6289
 
6202
6290
  // src/contract.ts
6203
- var CONTRACT_SHA256 = "d4f3377c50868e84827a5b331afca1aa3b3eebabe841c65a195c1edbd52080e4";
6291
+ var CONTRACT_SHA256 = "0024b25ed8c4984e38962ec31d70ee685f0cf158efdfb12ac7695d192045bc37";
6204
6292
 
6205
6293
  // src/close-policy.ts
6206
6294
  var CLOSE_RULES = {
@@ -6267,6 +6355,7 @@ var TOOL_CATALOG = [
6267
6355
  // ── 3. Personal apps and automation (1.37: the core's `automation`, `personal`, `net` and `schedule` owners) ──
6268
6356
  { name: "desktop_automation", group: "personal_automation", state: "built", path: "device_op", ops: ["automation.script"], platforms: ["darwin", "win32"], summary: "AppleScript or JavaScript for Automation on a Mac, PowerShell on Windows" },
6269
6357
  { name: "desktop_mail", group: "personal_automation", state: "built", path: "device_op", ops: ["mail.accounts", "mail.list", "mail.send"], platforms: ["darwin"], summary: "The Mail app: accounts, messages, send" },
6358
+ { name: "desktop_outlook", group: "personal_automation", state: "built", path: "device_op", ops: ["outlook.status", "outlook.draft", "outlook.list", "outlook.read"], platforms: ["win32"], summary: "The person's own Outlook: drafts with attachments, recent mail, one message" },
6270
6359
  { name: "desktop_messages", group: "personal_automation", state: "built", path: "device_op", ops: ["messages.chats", "messages.list", "messages.send"], platforms: ["darwin"], summary: "The Messages app: chats, messages, send" },
6271
6360
  { name: "desktop_contacts", group: "personal_automation", state: "built", path: "device_op", ops: ["contacts.search", "contacts.get"], platforms: ["darwin"], summary: "Contacts: search, one card" },
6272
6361
  { name: "desktop_calendar", group: "personal_automation", state: "built", path: "device_op", ops: ["calendar.list", "calendar.create", "reminders.list", "reminders.create"], platforms: ["darwin"], summary: "Calendar and Reminders: list and add" },