@ai-matrx/desktop-protocol 0.21.19 → 0.21.21

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
@@ -100,10 +100,16 @@ __export(src_exports, {
100
100
  AppsWindowsProcessesResult: () => AppsWindowsProcessesResult,
101
101
  AppsWindowsRefreshUsageParams: () => AppsWindowsRefreshUsageParams,
102
102
  AppsWindowsReloadParams: () => AppsWindowsReloadParams,
103
+ AppsWindowsReopenParams: () => AppsWindowsReopenParams,
104
+ AppsWindowsReopenResult: () => AppsWindowsReopenResult,
103
105
  AppsWindowsRestartParams: () => AppsWindowsRestartParams,
104
106
  AppsWindowsSaveNamesParams: () => AppsWindowsSaveNamesParams,
105
107
  AppsWindowsShownParams: () => AppsWindowsShownParams,
106
108
  AppsWindowsShownResult: () => AppsWindowsShownResult,
109
+ AppsWindowsUpdateAndReopenParams: () => AppsWindowsUpdateAndReopenParams,
110
+ AppsWindowsUpdateAndReopenResult: () => AppsWindowsUpdateAndReopenResult,
111
+ AppsWindowsUpdateStateParams: () => AppsWindowsUpdateStateParams,
112
+ AppsWindowsUpdateStateResult: () => AppsWindowsUpdateStateResult,
107
113
  AudioDevice: () => AudioDevice,
108
114
  AudioDevicesParams: () => AudioDevicesParams,
109
115
  AudioDevicesResult: () => AudioDevicesResult,
@@ -516,7 +522,7 @@ module.exports = __toCommonJS(src_exports);
516
522
  var import_zod = require("zod");
517
523
  var import_uuid = require("@ai-matrx/kit/uuid");
518
524
  var PROTOCOL_MAJOR = 1;
519
- var PROTOCOL_MINOR = 25;
525
+ var PROTOCOL_MINOR = 27;
520
526
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
521
527
  var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
522
528
  var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -1919,6 +1925,34 @@ var AppsWindowsProcessesParams = import_zod14.z.strictObject({ app_key: AppKey }
1919
1925
  var AppsWindowsProcessesResult = import_zod14.z.strictObject({ processes: import_zod14.z.array(import_zod14.z.string().max(2e3)).max(2e3) });
1920
1926
  var AppsWindowsAddParams = import_zod14.z.strictObject({ app_key: AppKey, window: ChatPlace, email: import_zod14.z.string().min(3).max(320) });
1921
1927
  var AppsWindowsSaveNamesParams = import_zod14.z.strictObject({ app_key: AppKey });
1928
+ var AppsWindowsUpdateStateParams = import_zod14.z.strictObject({ app_key: AppKey });
1929
+ var AppsWindowsUpdateStateResult = import_zod14.z.strictObject({
1930
+ app_key: AppKey,
1931
+ pending: import_zod14.z.boolean(),
1932
+ /** The downloaded release's name (Claude: "Claude 2.31226.1"), when the app's log names it. */
1933
+ version: import_zod14.z.string().max(120).nullable(),
1934
+ /** When the update became pending (the download's time), when known. */
1935
+ since_ms: epochMs.nullable(),
1936
+ /** Windows open when the update became pending (or last seen open) that are closed now. */
1937
+ closed: import_zod14.z.array(ChatPlace).max(200),
1938
+ /**
1939
+ * Since 1.27: the windows in `closed` that the update itself quit (the app's log records a quit for
1940
+ * the update within a minute of when each was last seen running). Absent: not known.
1941
+ */
1942
+ closed_by_update: import_zod14.z.array(ChatPlace).max(200).optional()
1943
+ });
1944
+ var AppsWindowsReopenParams = import_zod14.z.strictObject({ app_key: AppKey, windows: import_zod14.z.array(ChatPlace).min(1).max(200) });
1945
+ var AppsWindowsReopenResult = import_zod14.z.strictObject({ message: import_zod14.z.string().max(400), opened: import_zod14.z.array(ChatPlace).max(200) });
1946
+ var AppsWindowsUpdateAndReopenParams = import_zod14.z.strictObject({ app_key: AppKey, force: import_zod14.z.boolean().default(false), dry_run: import_zod14.z.boolean().default(false) });
1947
+ var AppsWindowsUpdateAndReopenResult = import_zod14.z.strictObject({
1948
+ message: import_zod14.z.string().max(400),
1949
+ /** Windows quit (with dry_run: to be quit). */
1950
+ quit: import_zod14.z.array(ChatPlace).max(200),
1951
+ /** Windows reopened (with dry_run: to be reopened), main first. */
1952
+ reopened: import_zod14.z.array(ChatPlace).max(200),
1953
+ /** The version installed, null when the install did not happen (or dry_run). */
1954
+ installed_version: import_zod14.z.string().max(64).nullable()
1955
+ });
1922
1956
 
1923
1957
  // src/schema/service.ts
1924
1958
  var import_zod15 = require("zod");
@@ -3149,7 +3183,11 @@ var OPS = {
3149
3183
  // 1.23: the signed-in person's own agents and Vault, read as them (the desktop's Agents library and Vault).
3150
3184
  "account.agents.list": { params: AccountAgentsListParams, result: AccountAgentsListResult, kind: "unary", since: "1.23", errors: ["INTERNAL"] },
3151
3185
  "account.vault.list": { params: AccountVaultListParams, result: AccountVaultListResult, kind: "unary", since: "1.23", errors: ["INTERNAL"] },
3152
- "account.vault.copy": { params: AccountVaultCopyParams, result: AccountVaultCopyResult, kind: "unary", since: "1.23", errors: ["AUTH_REQUIRED", "AUTH_FORBIDDEN", "NOT_FOUND", "INVALID_PARAMS", "DEVICE_OFFLINE", "INTERNAL"] }
3186
+ "account.vault.copy": { params: AccountVaultCopyParams, result: AccountVaultCopyResult, kind: "unary", since: "1.23", errors: ["AUTH_REQUIRED", "AUTH_FORBIDDEN", "NOT_FOUND", "INVALID_PARAMS", "DEVICE_OFFLINE", "INTERNAL"] },
3187
+ // 1.26: the app's own update (it installs only once every window quit) and bringing the windows back.
3188
+ "apps.windows.update_state": { params: AppsWindowsUpdateStateParams, result: AppsWindowsUpdateStateResult, kind: "unary", since: "1.26", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
3189
+ "apps.windows.reopen": { params: AppsWindowsReopenParams, result: AppsWindowsReopenResult, kind: "unary", since: "1.26", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
3190
+ "apps.windows.update_and_reopen": { params: AppsWindowsUpdateAndReopenParams, result: AppsWindowsUpdateAndReopenResult, kind: "unary", since: "1.26", errors: ["NOT_FOUND", "CONFLICT", "TIMEOUT", "PLATFORM_UNSUPPORTED", "INTERNAL"] }
3153
3191
  };
3154
3192
  var EVENTS = {
3155
3193
  "fs.changed": FsChangedEvent,
@@ -3610,7 +3648,13 @@ var NAMED_SCHEMAS = {
3610
3648
  AccountVaultListParams,
3611
3649
  AccountVaultListResult,
3612
3650
  AccountVaultCopyParams,
3613
- AccountVaultCopyResult
3651
+ AccountVaultCopyResult,
3652
+ AppsWindowsUpdateStateParams,
3653
+ AppsWindowsUpdateStateResult,
3654
+ AppsWindowsReopenParams,
3655
+ AppsWindowsReopenResult,
3656
+ AppsWindowsUpdateAndReopenParams,
3657
+ AppsWindowsUpdateAndReopenResult
3614
3658
  };
3615
3659
 
3616
3660
  // src/versioning.ts
@@ -3630,7 +3674,8 @@ var FIELDS_SINCE = {
3630
3674
  AudioDevice: { kind: "1.24" },
3631
3675
  ScreenDisplay: { rotation: "1.24", refresh_hz: "1.24", builtin: "1.24" },
3632
3676
  PowerStatusResult: { energy: "1.24" },
3633
- AppsSpendResult: { days: "1.24" }
3677
+ AppsSpendResult: { days: "1.24" },
3678
+ AppsWindowsUpdateStateResult: { closed_by_update: "1.27" }
3634
3679
  };
3635
3680
  var NULL_SINCE = {
3636
3681
  "RelayDeviceStatusEvent.since_ms": { since: "1.1", olderPeersGet: 0 }
@@ -3687,7 +3732,8 @@ var RESULT_PATH = /* @__PURE__ */ new Map([
3687
3732
  ["fs.patch", "FsPatchResult"],
3688
3733
  ["apps.chats.list", "AppsChatsListResult"],
3689
3734
  ["apps.accounts.usage", "AppsAccountsUsageResult"],
3690
- ["apps.accounts.resets", "AppsAccountsResetsResult"]
3735
+ ["apps.accounts.resets", "AppsAccountsResetsResult"],
3736
+ ["apps.windows.update_state", "AppsWindowsUpdateStateResult"]
3691
3737
  ]);
3692
3738
  var NESTED_RESULTS = /* @__PURE__ */ new Map([
3693
3739
  ["apps.chats.list", [["chats", "ChatRow"]]],
@@ -3760,7 +3806,7 @@ function forPeer(op, part, value, version) {
3760
3806
  var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
3761
3807
 
3762
3808
  // src/contract.ts
3763
- var CONTRACT_SHA256 = "8848ddd3157baf0f83cbd62141dd8b9f2e11f57d0f155f83a4fd2b40db8c7bc6";
3809
+ var CONTRACT_SHA256 = "eece2e5eba3e6e33126a0fda2fad8c91abe9c878fbfdc98bd049ff5af126cb09";
3764
3810
 
3765
3811
  // src/close-policy.ts
3766
3812
  var CLOSE_RULES = {