@ai-matrx/desktop-protocol 0.21.22 → 0.21.24

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
@@ -55,6 +55,10 @@ __export(src_exports, {
55
55
  AppsChatsPlaceResult: () => AppsChatsPlaceResult,
56
56
  AppsChatsStarParams: () => AppsChatsStarParams,
57
57
  AppsChatsStarResult: () => AppsChatsStarResult,
58
+ AppsChatsTitlesCheckParams: () => AppsChatsTitlesCheckParams,
59
+ AppsChatsTitlesCheckResult: () => AppsChatsTitlesCheckResult,
60
+ AppsChatsTitlesPushParams: () => AppsChatsTitlesPushParams,
61
+ AppsChatsTitlesPushResult: () => AppsChatsTitlesPushResult,
58
62
  AppsChatsWatchParams: () => AppsChatsWatchParams,
59
63
  AppsChatsWatchResult: () => AppsChatsWatchResult,
60
64
  AppsChatsWatchStateEvent: () => AppsChatsWatchStateEvent,
@@ -483,6 +487,8 @@ __export(src_exports, {
483
487
  TOOL_GROUPS: () => TOOL_GROUPS,
484
488
  TOOL_LEVELS: () => TOOL_LEVELS,
485
489
  TOOL_PLATFORMS: () => TOOL_PLATFORMS,
490
+ TitleCopies: () => TitleCopies,
491
+ TitleMismatch: () => TitleMismatch,
486
492
  ToolLevel: () => ToolLevel,
487
493
  ToolLevelResult: () => ToolLevelResult,
488
494
  ToolName: () => ToolName,
@@ -553,7 +559,7 @@ module.exports = __toCommonJS(src_exports);
553
559
  var import_zod = require("zod");
554
560
  var import_uuid = require("@ai-matrx/kit/uuid");
555
561
  var PROTOCOL_MAJOR = 1;
556
- var PROTOCOL_MINOR = 28;
562
+ var PROTOCOL_MINOR = 29;
557
563
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
558
564
  var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
559
565
  var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -1896,6 +1902,44 @@ var AppsChatsColdResult = import_zod14.z.strictObject({
1896
1902
  /** Chats working right now (not waiting). */
1897
1903
  working: nonNegInt
1898
1904
  });
1905
+ var TitleCopies = import_zod14.z.strictObject({
1906
+ window: ChatPlace,
1907
+ /** Record copies in that window holding a different name (main keeps one per account folder). */
1908
+ copies: nonNegInt,
1909
+ titles: import_zod14.z.array(import_zod14.z.strictObject({ title: import_zod14.z.string().max(2e3), source: import_zod14.z.string().max(32) })).max(50)
1910
+ });
1911
+ var TitleMismatch = import_zod14.z.strictObject({
1912
+ chat_id: ChatId,
1913
+ /** The right name: the latest one a person gave it (in any window, or in Matrx), else the newest automatic title. */
1914
+ title: import_zod14.z.string().max(2e3),
1915
+ title_source: import_zod14.z.enum(["user", "auto"]),
1916
+ /** Where the right name came from: a window, "matrx", or "ledger" (decided earlier). */
1917
+ decided_from: import_zod14.z.string().max(64),
1918
+ kind: import_zod14.z.enum(["user_vs_auto", "user_vs_user", "auto_vs_auto", "source_only"]),
1919
+ windows: import_zod14.z.array(ChatPlace).max(200),
1920
+ differs_in: import_zod14.z.array(TitleCopies).max(200)
1921
+ });
1922
+ var AppsChatsTitlesCheckParams = import_zod14.z.strictObject({ app_key: AppKey });
1923
+ var AppsChatsTitlesCheckResult = import_zod14.z.strictObject({
1924
+ app_key: AppKey,
1925
+ chats_total: nonNegInt,
1926
+ chats_in_several_windows: nonNegInt,
1927
+ /** Chats with a different name in some window (or in Matrx). */
1928
+ chats_with_a_different_name: nonNegInt,
1929
+ copies_to_write: nonNegInt,
1930
+ chats: import_zod14.z.array(TitleMismatch).max(5e3)
1931
+ });
1932
+ var AppsChatsTitlesPushParams = import_zod14.z.strictObject({ app_key: AppKey, chat_id: ChatId.optional(), dry_run: import_zod14.z.boolean().optional() });
1933
+ var AppsChatsTitlesPushResult = import_zod14.z.strictObject({
1934
+ app_key: AppKey,
1935
+ /** Record files rewritten (title and titleSource only, each backed up first). */
1936
+ written: nonNegInt,
1937
+ chats_fixed: nonNegInt,
1938
+ /** Copies that could not be written (left for the next push). */
1939
+ failed: nonNegInt,
1940
+ /** Still different after the push (dry_run: would be written). */
1941
+ chats_with_a_different_name: nonNegInt
1942
+ });
1899
1943
  var AppsChatsOpenParams = import_zod14.z.strictObject({ app_key: AppKey, chat_id: ChatId, window: ChatPlace.optional() });
1900
1944
  var SpendSplit = import_zod14.z.strictObject({ main: import_zod14.z.number(), helpers: import_zod14.z.number() });
1901
1945
  var SpendScopes = import_zod14.z.strictObject({ today: SpendSplit, week: SpendSplit });
@@ -3254,6 +3298,8 @@ var OPS = {
3254
3298
  // 1.11: Going cold, Spend, sync health, windows upkeep.
3255
3299
  "apps.chats.cold": { params: AppsChatsColdParams, result: AppsChatsColdResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
3256
3300
  "apps.chats.open": { params: AppsChatsOpenParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "CONFLICT", "TIMEOUT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
3301
+ "apps.chats.titles_check": { params: AppsChatsTitlesCheckParams, result: AppsChatsTitlesCheckResult, kind: "unary", since: "1.29", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
3302
+ "apps.chats.titles_push": { params: AppsChatsTitlesPushParams, result: AppsChatsTitlesPushResult, kind: "unary", since: "1.29", errors: ["NOT_FOUND", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
3257
3303
  "apps.spend": { params: AppsSpendParams, result: AppsSpendResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
3258
3304
  "apps.sync.status": { params: AppsSyncStatusParams, result: AppsSyncStatusResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
3259
3305
  "apps.sync.run": { params: AppsSyncRunParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
@@ -3748,6 +3794,12 @@ var NAMED_SCHEMAS = {
3748
3794
  AppsChatsColdParams,
3749
3795
  AppsChatsColdResult,
3750
3796
  AppsChatsOpenParams,
3797
+ TitleCopies,
3798
+ TitleMismatch,
3799
+ AppsChatsTitlesCheckParams,
3800
+ AppsChatsTitlesCheckResult,
3801
+ AppsChatsTitlesPushParams,
3802
+ AppsChatsTitlesPushResult,
3751
3803
  SpendSplit,
3752
3804
  SpendScopes,
3753
3805
  SpendAccount,
@@ -4003,7 +4055,7 @@ function forPeer(op, part, value, version) {
4003
4055
  var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
4004
4056
 
4005
4057
  // src/contract.ts
4006
- var CONTRACT_SHA256 = "d328d624d1de854696a07e9fb8f1e85894047e5c41164647944db79b3c1a638d";
4058
+ var CONTRACT_SHA256 = "5994ab9f6c2dba636a90e18c99bd3a90736f23782b3f8df9e0d2d7234b8e2b1b";
4007
4059
 
4008
4060
  // src/close-policy.ts
4009
4061
  var CLOSE_RULES = {