@ai-matrx/desktop-protocol 0.21.32 → 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.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { z } from "zod";
3
3
  import { UUID_SHAPE_PATTERN } from "@ai-matrx/kit/uuid";
4
4
  var PROTOCOL_MAJOR = 1;
5
- var PROTOCOL_MINOR = 42;
5
+ var PROTOCOL_MINOR = 43;
6
6
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
7
7
  var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
8
8
  var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -1465,7 +1465,27 @@ var ProjectMoveGroup = z14.strictObject({
1465
1465
  already: nonNegInt.optional(),
1466
1466
  from_other_groups: nonNegInt.optional(),
1467
1467
  /** A group of that name was already there (reused, never doubled). */
1468
- group_exists: z14.boolean().optional()
1468
+ group_exists: z14.boolean().optional(),
1469
+ /** 1.43: "now" = written into the closed window; "next_close" = queued until that window closes. */
1470
+ when: z14.enum(["now", "next_close"]).optional(),
1471
+ /** 1.43: the window's own id of the group used (absent while a new one waits to be made). */
1472
+ group_id: z14.string().max(200).optional()
1473
+ });
1474
+ var ProjectMoveOutcome = z14.strictObject({
1475
+ chat_id: ChatId,
1476
+ title: z14.string().max(300),
1477
+ outcome: z14.enum(["copied", "moved", "already", "skipped"]),
1478
+ off: z14.array(ChatPlace).max(50),
1479
+ reason: z14.string().max(400).nullable(),
1480
+ pin: z14.enum(["now", "next_close", "failed"]).nullable(),
1481
+ group: z14.enum(["now", "next_close", "failed"]).nullable()
1482
+ });
1483
+ var WindowGroup = z14.strictObject({ id: z14.string().max(200), name: z14.string().max(200), count: nonNegInt });
1484
+ var AppsWindowsGroupsParams = z14.strictObject({ app_key: AppKey, window: ChatPlace });
1485
+ var AppsWindowsGroupsResult = z14.strictObject({
1486
+ window: ChatPlace,
1487
+ open: z14.boolean(),
1488
+ groups: z14.array(WindowGroup).max(1e3)
1469
1489
  });
1470
1490
  var ProjectMovePin = z14.strictObject({
1471
1491
  ok: z14.boolean(),
@@ -1486,8 +1506,12 @@ var AppsProjectsToWindowParams = z14.strictObject({
1486
1506
  window: ChatPlace,
1487
1507
  /** Also take each chat off its other side windows where safe (never main, the holder, an open window). */
1488
1508
  take_off: z14.boolean().default(false),
1489
- /** Also group them under the project's name in that window's sidebar (closed windows only). */
1509
+ /** 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). */
1490
1510
  group: z14.boolean().default(false),
1511
+ /** 1.43: group them into this existing group of the window (apps.windows.groups); implies group. */
1512
+ group_id: z14.string().min(1).max(200).optional(),
1513
+ /** 1.43: group them under this name (an existing group of that name is reused, else made); implies group. */
1514
+ group_name: z14.string().trim().min(1).max(200).optional(),
1491
1515
  /** 1.32: also pin them in that window (now if closed, else when it next closes). */
1492
1516
  pin: z14.boolean().optional(),
1493
1517
  /** 1.36: a batch: exactly these chats of the project and no other (a reused marker is a label, never a sweep). */
@@ -1509,6 +1533,8 @@ var AppsProjectsToWindowResult = z14.strictObject({
1509
1533
  group: ProjectMoveGroup.nullable(),
1510
1534
  /** 1.32: the pin in the target window (absent: not asked). */
1511
1535
  pin: ProjectMovePin.optional(),
1536
+ /** 1.43: one row per chat, what happened to it (absent from an older core). */
1537
+ chats: z14.array(ProjectMoveOutcome).max(5e3).optional(),
1512
1538
  message: z14.string().max(400)
1513
1539
  });
1514
1540
  var ColdChat = z14.strictObject({
@@ -4200,6 +4226,7 @@ var OPS = {
4200
4226
  "diag.errors.list": { params: DiagErrorsListParams, result: DiagErrorsListResult, kind: "unary", since: "1.20", errors: ["INTERNAL"] },
4201
4227
  "diag.errors.report": { params: DiagErrorsReportParams, result: DiagErrorsReportResult, kind: "unary", since: "1.20", errors: ["INTERNAL"] },
4202
4228
  // 1.21: what a window's sidebar draws (the Move-all grouping check).
4229
+ "apps.windows.groups": { params: AppsWindowsGroupsParams, result: AppsWindowsGroupsResult, kind: "unary", since: "1.43", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4203
4230
  "apps.windows.shown": { params: AppsWindowsShownParams, result: AppsWindowsShownResult, kind: "unary", since: "1.21", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
4204
4231
  // Claude Code history (SPEC §6 coding): served by the `coding` Python service through SERVICES below.
4205
4232
  "coding.history.import_missing": { params: CodingHistoryImportMissingParams, result: CodingHistoryImportMissingResult, kind: "unary", since: "1.5", errors: ["RESOURCE_BUSY", "RESOURCE_GONE", "CANCELLED", "INTERNAL"] },
@@ -4844,6 +4871,10 @@ var NAMED_SCHEMAS = {
4844
4871
  ShownSection,
4845
4872
  AppsWindowsShownParams,
4846
4873
  AppsWindowsShownResult,
4874
+ ProjectMoveOutcome,
4875
+ WindowGroup,
4876
+ AppsWindowsGroupsParams,
4877
+ AppsWindowsGroupsResult,
4847
4878
  ColdChat,
4848
4879
  AppsChatsColdParams,
4849
4880
  AppsChatsColdResult,
@@ -5148,8 +5179,9 @@ var FIELDS_SINCE = {
5148
5179
  PowerStatusResult: { energy: "1.24" },
5149
5180
  AppsSpendResult: { days: "1.24" },
5150
5181
  AppsWindowsUpdateStateResult: { closed_by_update: "1.27" },
5151
- AppsProjectsToWindowParams: { pin: "1.32", chat_ids: "1.36", take_off_from: "1.36" },
5152
- AppsProjectsToWindowResult: { pin: "1.32" },
5182
+ AppsProjectsToWindowParams: { pin: "1.32", chat_ids: "1.36", take_off_from: "1.36", group_id: "1.43", group_name: "1.43" },
5183
+ AppsProjectsToWindowResult: { pin: "1.32", chats: "1.43" },
5184
+ ProjectMoveGroup: { when: "1.43", group_id: "1.43" },
5153
5185
  AppsChatsTitlesCheckResult: { stale_windows: "1.33" },
5154
5186
  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" },
5155
5187
  WebScrapeParams: { engine: "1.40", land: "1.40" },
@@ -5243,7 +5275,8 @@ var RESULT_PATH = /* @__PURE__ */ new Map([
5243
5275
  ["apps.accounts.resets", "AppsAccountsResetsResult"],
5244
5276
  ["apps.windows.update_state", "AppsWindowsUpdateStateResult"],
5245
5277
  ["web.fetch_with_browser", "WebBrowserFetchResult"],
5246
- ["sysinfo.get", "SysinfoGetResult"]
5278
+ ["sysinfo.get", "SysinfoGetResult"],
5279
+ ["apps.projects.to_window", "AppsProjectsToWindowResult"]
5247
5280
  ]);
5248
5281
  var NESTED_RESULTS = /* @__PURE__ */ new Map([
5249
5282
  ["apps.chats.list", [["chats", "ChatRow"]]],
@@ -5258,7 +5291,8 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
5258
5291
  ["stack.state", [["servers", "StackServer"]]],
5259
5292
  ["account.agents.list", [["agents", "AccountAgent"]]],
5260
5293
  ["web.scrape", [["pages", "WebScrapePage"]]],
5261
- ["sysinfo.get", [["permissions", "SysinfoGetResult.permissions[]"]]]
5294
+ ["sysinfo.get", [["permissions", "SysinfoGetResult.permissions[]"]]],
5295
+ ["apps.projects.to_window", [["group", "ProjectMoveGroup"]]]
5262
5296
  ]);
5263
5297
  function stripNested(value, nested, version) {
5264
5298
  if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
@@ -5320,7 +5354,7 @@ function forPeer(op, part, value, version) {
5320
5354
  var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
5321
5355
 
5322
5356
  // src/contract.ts
5323
- var CONTRACT_SHA256 = "c96c1a43bc4b34d518fa088be9300d96baab63938ce0dbfb9425cdc706097668";
5357
+ var CONTRACT_SHA256 = "d4f3377c50868e84827a5b331afca1aa3b3eebabe841c65a195c1edbd52080e4";
5324
5358
 
5325
5359
  // src/close-policy.ts
5326
5360
  var CLOSE_RULES = {
@@ -5786,6 +5820,8 @@ export {
5786
5820
  AppsSyncStatusResult,
5787
5821
  AppsWindowActionResult,
5788
5822
  AppsWindowsAddParams,
5823
+ AppsWindowsGroupsParams,
5824
+ AppsWindowsGroupsResult,
5789
5825
  AppsWindowsListParams,
5790
5826
  AppsWindowsListResult,
5791
5827
  AppsWindowsOpenParams,
@@ -6258,6 +6294,7 @@ export {
6258
6294
  ProcSort,
6259
6295
  ProjectMoveChat,
6260
6296
  ProjectMoveGroup,
6297
+ ProjectMoveOutcome,
6261
6298
  ProjectMovePin,
6262
6299
  ProjectMoveSkip,
6263
6300
  ProtocolErrorBody,
@@ -6466,6 +6503,7 @@ export {
6466
6503
  Welcome,
6467
6504
  WindowFocusParams,
6468
6505
  WindowFocusResult,
6506
+ WindowGroup,
6469
6507
  WindowInfo,
6470
6508
  WindowListParams,
6471
6509
  WindowListResult,