@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.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 = 42;
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({
@@ -5042,6 +5072,7 @@ var OPS = {
5042
5072
  "diag.errors.list": { params: DiagErrorsListParams, result: DiagErrorsListResult, kind: "unary", since: "1.20", errors: ["INTERNAL"] },
5043
5073
  "diag.errors.report": { params: DiagErrorsReportParams, result: DiagErrorsReportResult, kind: "unary", since: "1.20", errors: ["INTERNAL"] },
5044
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"] },
5045
5076
  "apps.windows.shown": { params: AppsWindowsShownParams, result: AppsWindowsShownResult, kind: "unary", since: "1.21", errors: ["NOT_FOUND", "PERMISSION_DENIED_OS", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
5046
5077
  // Claude Code history (SPEC §6 coding): served by the `coding` Python service through SERVICES below.
5047
5078
  "coding.history.import_missing": { params: CodingHistoryImportMissingParams, result: CodingHistoryImportMissingResult, kind: "unary", since: "1.5", errors: ["RESOURCE_BUSY", "RESOURCE_GONE", "CANCELLED", "INTERNAL"] },
@@ -5686,6 +5717,10 @@ var NAMED_SCHEMAS = {
5686
5717
  ShownSection,
5687
5718
  AppsWindowsShownParams,
5688
5719
  AppsWindowsShownResult,
5720
+ ProjectMoveOutcome,
5721
+ WindowGroup,
5722
+ AppsWindowsGroupsParams,
5723
+ AppsWindowsGroupsResult,
5689
5724
  ColdChat,
5690
5725
  AppsChatsColdParams,
5691
5726
  AppsChatsColdResult,
@@ -5990,8 +6025,9 @@ var FIELDS_SINCE = {
5990
6025
  PowerStatusResult: { energy: "1.24" },
5991
6026
  AppsSpendResult: { days: "1.24" },
5992
6027
  AppsWindowsUpdateStateResult: { closed_by_update: "1.27" },
5993
- AppsProjectsToWindowParams: { pin: "1.32", chat_ids: "1.36", take_off_from: "1.36" },
5994
- 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" },
5995
6031
  AppsChatsTitlesCheckResult: { stale_windows: "1.33" },
5996
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" },
5997
6033
  WebScrapeParams: { engine: "1.40", land: "1.40" },
@@ -6085,7 +6121,8 @@ var RESULT_PATH = /* @__PURE__ */ new Map([
6085
6121
  ["apps.accounts.resets", "AppsAccountsResetsResult"],
6086
6122
  ["apps.windows.update_state", "AppsWindowsUpdateStateResult"],
6087
6123
  ["web.fetch_with_browser", "WebBrowserFetchResult"],
6088
- ["sysinfo.get", "SysinfoGetResult"]
6124
+ ["sysinfo.get", "SysinfoGetResult"],
6125
+ ["apps.projects.to_window", "AppsProjectsToWindowResult"]
6089
6126
  ]);
6090
6127
  var NESTED_RESULTS = /* @__PURE__ */ new Map([
6091
6128
  ["apps.chats.list", [["chats", "ChatRow"]]],
@@ -6100,7 +6137,8 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
6100
6137
  ["stack.state", [["servers", "StackServer"]]],
6101
6138
  ["account.agents.list", [["agents", "AccountAgent"]]],
6102
6139
  ["web.scrape", [["pages", "WebScrapePage"]]],
6103
- ["sysinfo.get", [["permissions", "SysinfoGetResult.permissions[]"]]]
6140
+ ["sysinfo.get", [["permissions", "SysinfoGetResult.permissions[]"]]],
6141
+ ["apps.projects.to_window", [["group", "ProjectMoveGroup"]]]
6104
6142
  ]);
6105
6143
  function stripNested(value, nested, version) {
6106
6144
  if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
@@ -6162,7 +6200,7 @@ function forPeer(op, part, value, version) {
6162
6200
  var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
6163
6201
 
6164
6202
  // src/contract.ts
6165
- var CONTRACT_SHA256 = "c96c1a43bc4b34d518fa088be9300d96baab63938ce0dbfb9425cdc706097668";
6203
+ var CONTRACT_SHA256 = "d4f3377c50868e84827a5b331afca1aa3b3eebabe841c65a195c1edbd52080e4";
6166
6204
 
6167
6205
  // src/close-policy.ts
6168
6206
  var CLOSE_RULES = {