@ai-matrx/desktop-protocol 0.21.31 → 0.21.33

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
@@ -108,6 +108,8 @@ __export(src_exports, {
108
108
  AppsSyncStatusResult: () => AppsSyncStatusResult,
109
109
  AppsWindowActionResult: () => AppsWindowActionResult,
110
110
  AppsWindowsAddParams: () => AppsWindowsAddParams,
111
+ AppsWindowsGroupsParams: () => AppsWindowsGroupsParams,
112
+ AppsWindowsGroupsResult: () => AppsWindowsGroupsResult,
111
113
  AppsWindowsListParams: () => AppsWindowsListParams,
112
114
  AppsWindowsListResult: () => AppsWindowsListResult,
113
115
  AppsWindowsOpenParams: () => AppsWindowsOpenParams,
@@ -580,6 +582,7 @@ __export(src_exports, {
580
582
  ProcSort: () => ProcSort,
581
583
  ProjectMoveChat: () => ProjectMoveChat,
582
584
  ProjectMoveGroup: () => ProjectMoveGroup,
585
+ ProjectMoveOutcome: () => ProjectMoveOutcome,
583
586
  ProjectMovePin: () => ProjectMovePin,
584
587
  ProjectMoveSkip: () => ProjectMoveSkip,
585
588
  ProtocolErrorBody: () => ProtocolErrorBody,
@@ -788,6 +791,7 @@ __export(src_exports, {
788
791
  Welcome: () => Welcome,
789
792
  WindowFocusParams: () => WindowFocusParams,
790
793
  WindowFocusResult: () => WindowFocusResult,
794
+ WindowGroup: () => WindowGroup,
791
795
  WindowInfo: () => WindowInfo,
792
796
  WindowListParams: () => WindowListParams,
793
797
  WindowListResult: () => WindowListResult,
@@ -844,7 +848,7 @@ module.exports = __toCommonJS(src_exports);
844
848
  var import_zod = require("zod");
845
849
  var import_uuid = require("@ai-matrx/kit/uuid");
846
850
  var PROTOCOL_MAJOR = 1;
847
- var PROTOCOL_MINOR = 41;
851
+ var PROTOCOL_MINOR = 43;
848
852
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
849
853
  var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
850
854
  var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -2307,7 +2311,27 @@ var ProjectMoveGroup = import_zod14.z.strictObject({
2307
2311
  already: nonNegInt.optional(),
2308
2312
  from_other_groups: nonNegInt.optional(),
2309
2313
  /** A group of that name was already there (reused, never doubled). */
2310
- group_exists: import_zod14.z.boolean().optional()
2314
+ group_exists: import_zod14.z.boolean().optional(),
2315
+ /** 1.43: "now" = written into the closed window; "next_close" = queued until that window closes. */
2316
+ when: import_zod14.z.enum(["now", "next_close"]).optional(),
2317
+ /** 1.43: the window's own id of the group used (absent while a new one waits to be made). */
2318
+ group_id: import_zod14.z.string().max(200).optional()
2319
+ });
2320
+ var ProjectMoveOutcome = import_zod14.z.strictObject({
2321
+ chat_id: ChatId,
2322
+ title: import_zod14.z.string().max(300),
2323
+ outcome: import_zod14.z.enum(["copied", "moved", "already", "skipped"]),
2324
+ off: import_zod14.z.array(ChatPlace).max(50),
2325
+ reason: import_zod14.z.string().max(400).nullable(),
2326
+ pin: import_zod14.z.enum(["now", "next_close", "failed"]).nullable(),
2327
+ group: import_zod14.z.enum(["now", "next_close", "failed"]).nullable()
2328
+ });
2329
+ var WindowGroup = import_zod14.z.strictObject({ id: import_zod14.z.string().max(200), name: import_zod14.z.string().max(200), count: nonNegInt });
2330
+ var AppsWindowsGroupsParams = import_zod14.z.strictObject({ app_key: AppKey, window: ChatPlace });
2331
+ var AppsWindowsGroupsResult = import_zod14.z.strictObject({
2332
+ window: ChatPlace,
2333
+ open: import_zod14.z.boolean(),
2334
+ groups: import_zod14.z.array(WindowGroup).max(1e3)
2311
2335
  });
2312
2336
  var ProjectMovePin = import_zod14.z.strictObject({
2313
2337
  ok: import_zod14.z.boolean(),
@@ -2328,8 +2352,12 @@ var AppsProjectsToWindowParams = import_zod14.z.strictObject({
2328
2352
  window: ChatPlace,
2329
2353
  /** Also take each chat off its other side windows where safe (never main, the holder, an open window). */
2330
2354
  take_off: import_zod14.z.boolean().default(false),
2331
- /** Also group them under the project's name in that window's sidebar (closed windows only). */
2355
+ /** 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). */
2332
2356
  group: import_zod14.z.boolean().default(false),
2357
+ /** 1.43: group them into this existing group of the window (apps.windows.groups); implies group. */
2358
+ group_id: import_zod14.z.string().min(1).max(200).optional(),
2359
+ /** 1.43: group them under this name (an existing group of that name is reused, else made); implies group. */
2360
+ group_name: import_zod14.z.string().trim().min(1).max(200).optional(),
2333
2361
  /** 1.32: also pin them in that window (now if closed, else when it next closes). */
2334
2362
  pin: import_zod14.z.boolean().optional(),
2335
2363
  /** 1.36: a batch: exactly these chats of the project and no other (a reused marker is a label, never a sweep). */
@@ -2351,6 +2379,8 @@ var AppsProjectsToWindowResult = import_zod14.z.strictObject({
2351
2379
  group: ProjectMoveGroup.nullable(),
2352
2380
  /** 1.32: the pin in the target window (absent: not asked). */
2353
2381
  pin: ProjectMovePin.optional(),
2382
+ /** 1.43: one row per chat, what happened to it (absent from an older core). */
2383
+ chats: import_zod14.z.array(ProjectMoveOutcome).max(5e3).optional(),
2354
2384
  message: import_zod14.z.string().max(400)
2355
2385
  });
2356
2386
  var ColdChat = import_zod14.z.strictObject({
@@ -4532,7 +4562,12 @@ var MessagesListResult = import_zod36.z.strictObject({ messages: import_zod36.z.
4532
4562
  var MessagesSendParams = import_zod36.z.strictObject({
4533
4563
  /** A phone number or email the person can message. */
4534
4564
  to: import_zod36.z.string().min(3).max(320),
4535
- text: import_zod36.z.string().min(1).max(2e4)
4565
+ text: import_zod36.z.string().min(1).max(2e4),
4566
+ /**
4567
+ * Send only over this service (Matrx Local's SendMessage `service`). Absent: iMessage first, and
4568
+ * SMS when the recipient has no iMessage (since 1.42).
4569
+ */
4570
+ service: import_zod36.z.enum(["iMessage", "SMS"]).optional()
4536
4571
  });
4537
4572
  var MessagesSendResult = import_zod36.z.strictObject({ sent: import_zod36.z.boolean() });
4538
4573
  var ContactsSearchParams = import_zod36.z.strictObject({
@@ -5037,6 +5072,7 @@ var OPS = {
5037
5072
  "diag.errors.list": { params: DiagErrorsListParams, result: DiagErrorsListResult, kind: "unary", since: "1.20", errors: ["INTERNAL"] },
5038
5073
  "diag.errors.report": { params: DiagErrorsReportParams, result: DiagErrorsReportResult, kind: "unary", since: "1.20", errors: ["INTERNAL"] },
5039
5074
  // 1.21: what a window's sidebar draws (the Move-all grouping check).
5075
+ "apps.windows.groups": { params: AppsWindowsGroupsParams, result: AppsWindowsGroupsResult, kind: "unary", since: "1.43", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
5040
5076
  "apps.windows.shown": { params: AppsWindowsShownParams, result: AppsWindowsShownResult, kind: "unary", since: "1.21", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
5041
5077
  // Claude Code history (SPEC §6 coding): served by the `coding` Python service through SERVICES below.
5042
5078
  "coding.history.import_missing": { params: CodingHistoryImportMissingParams, result: CodingHistoryImportMissingResult, kind: "unary", since: "1.5", errors: ["RESOURCE_BUSY", "RESOURCE_GONE", "CANCELLED", "INTERNAL"] },
@@ -5681,6 +5717,10 @@ var NAMED_SCHEMAS = {
5681
5717
  ShownSection,
5682
5718
  AppsWindowsShownParams,
5683
5719
  AppsWindowsShownResult,
5720
+ ProjectMoveOutcome,
5721
+ WindowGroup,
5722
+ AppsWindowsGroupsParams,
5723
+ AppsWindowsGroupsResult,
5684
5724
  ColdChat,
5685
5725
  AppsChatsColdParams,
5686
5726
  AppsChatsColdResult,
@@ -5985,8 +6025,9 @@ var FIELDS_SINCE = {
5985
6025
  PowerStatusResult: { energy: "1.24" },
5986
6026
  AppsSpendResult: { days: "1.24" },
5987
6027
  AppsWindowsUpdateStateResult: { closed_by_update: "1.27" },
5988
- AppsProjectsToWindowParams: { pin: "1.32", chat_ids: "1.36", take_off_from: "1.36" },
5989
- AppsProjectsToWindowResult: { pin: "1.32" },
6028
+ AppsProjectsToWindowParams: { pin: "1.32", chat_ids: "1.36", take_off_from: "1.36", group_id: "1.43", group_name: "1.43" },
6029
+ AppsProjectsToWindowResult: { pin: "1.32", chats: "1.43" },
6030
+ ProjectMoveGroup: { when: "1.43", group_id: "1.43" },
5990
6031
  AppsChatsTitlesCheckResult: { stale_windows: "1.33" },
5991
6032
  AccountAgent: { tags: "1.39", model_id: "1.39", access_level: "1.39", organization_id: "1.39", origin: "1.39", is_archived: "1.39", orchestra: "1.39" },
5992
6033
  WebScrapeParams: { engine: "1.40", land: "1.40" },
@@ -5994,7 +6035,8 @@ var FIELDS_SINCE = {
5994
6035
  WebBrowserFetchParams: { land: "1.40" },
5995
6036
  WebBrowserFetchResult: { source: "1.40" },
5996
6037
  SysinfoGetResult: { requirements: "1.41" },
5997
- "SysinfoGetResult.permissions[]": { detail: "1.41" }
6038
+ "SysinfoGetResult.permissions[]": { detail: "1.41" },
6039
+ MessagesSendParams: { service: "1.42" }
5998
6040
  };
5999
6041
  var NULL_SINCE = {
6000
6042
  "RelayDeviceStatusEvent.since_ms": { since: "1.1", olderPeersGet: 0 }
@@ -6079,7 +6121,8 @@ var RESULT_PATH = /* @__PURE__ */ new Map([
6079
6121
  ["apps.accounts.resets", "AppsAccountsResetsResult"],
6080
6122
  ["apps.windows.update_state", "AppsWindowsUpdateStateResult"],
6081
6123
  ["web.fetch_with_browser", "WebBrowserFetchResult"],
6082
- ["sysinfo.get", "SysinfoGetResult"]
6124
+ ["sysinfo.get", "SysinfoGetResult"],
6125
+ ["apps.projects.to_window", "AppsProjectsToWindowResult"]
6083
6126
  ]);
6084
6127
  var NESTED_RESULTS = /* @__PURE__ */ new Map([
6085
6128
  ["apps.chats.list", [["chats", "ChatRow"]]],
@@ -6094,7 +6137,8 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
6094
6137
  ["stack.state", [["servers", "StackServer"]]],
6095
6138
  ["account.agents.list", [["agents", "AccountAgent"]]],
6096
6139
  ["web.scrape", [["pages", "WebScrapePage"]]],
6097
- ["sysinfo.get", [["permissions", "SysinfoGetResult.permissions[]"]]]
6140
+ ["sysinfo.get", [["permissions", "SysinfoGetResult.permissions[]"]]],
6141
+ ["apps.projects.to_window", [["group", "ProjectMoveGroup"]]]
6098
6142
  ]);
6099
6143
  function stripNested(value, nested, version) {
6100
6144
  if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
@@ -6156,7 +6200,7 @@ function forPeer(op, part, value, version) {
6156
6200
  var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
6157
6201
 
6158
6202
  // src/contract.ts
6159
- var CONTRACT_SHA256 = "a2ea77f45ed3f5421e4c722442205e48fce2bbc5bccc892b54403304eca55443";
6203
+ var CONTRACT_SHA256 = "d4f3377c50868e84827a5b331afca1aa3b3eebabe841c65a195c1edbd52080e4";
6160
6204
 
6161
6205
  // src/close-policy.ts
6162
6206
  var CLOSE_RULES = {
@@ -6227,7 +6271,9 @@ var TOOL_CATALOG = [
6227
6271
  { name: "desktop_contacts", group: "personal_automation", state: "built", path: "device_op", ops: ["contacts.search", "contacts.get"], platforms: ["darwin"], summary: "Contacts: search, one card" },
6228
6272
  { 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" },
6229
6273
  { name: "desktop_photos", group: "personal_automation", state: "built", path: "device_op", ops: ["photos.search", "photos.get"], platforms: ["darwin"], summary: "The Photos library: find, export an original" },
6230
- { name: "desktop_location", group: "personal_automation", state: "built", path: "device_op", ops: ["location.get"], platforms: ["darwin", "win32"], summary: "Where the computer is (the OS's location service)" },
6274
+ // Windows comes back once a Windows location fix is proven (plan attack retire-local 2026-10-12, B6):
6275
+ // until then local_mac_apps (macOS-only) is judged on macOS and nothing claims Windows.
6276
+ { name: "desktop_location", group: "personal_automation", state: "built", path: "device_op", ops: ["location.get"], platforms: ["darwin"], summary: "Where the computer is (the OS's location service)" },
6231
6277
  { name: "desktop_net", group: "personal_automation", state: "built", path: "device_op", ops: ["net.info", "net.wifi", "net.bluetooth", "net.devices", "net.mdns", "net.scan", "net.download"], platforms: ALL, summary: "Local network, Wi-Fi, Bluetooth, open ports and downloads" },
6232
6278
  { name: "desktop_schedule", group: "personal_automation", state: "built", path: "device_op", ops: ["schedule.create", "schedule.list", "schedule.cancel"], platforms: ALL, summary: "Run a tool's op on this computer on an interval; list and cancel" },
6233
6279
  // 1.38, code from anywhere: the person's Claude Code and Codex sessions on this computer. Turning