@ai-matrx/desktop-protocol 0.21.71 → 0.21.73

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/client.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { BackoffOptions } from '@ai-matrx/data/realtime';
2
2
  export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/data/realtime';
3
3
  import { z } from 'zod';
4
- import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-lURX04tj.cjs';
5
- export { i as isDesktopProtocolError } from './models-lURX04tj.cjs';
4
+ import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-ClCrYsEt.cjs';
5
+ export { i as isDesktopProtocolError } from './models-ClCrYsEt.cjs';
6
6
  import { FrameHeader } from './frame.cjs';
7
7
 
8
8
  /** The subset of the WHATWG WebSocket the client uses — browser, React Native, `ws` and Workers all fit. */
package/dist/client.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { BackoffOptions } from '@ai-matrx/data/realtime';
2
2
  export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/data/realtime';
3
3
  import { z } from 'zod';
4
- import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-lURX04tj.js';
5
- export { i as isDesktopProtocolError } from './models-lURX04tj.js';
4
+ import { W as Welcome, D as DesktopProtocolError, C as CloseOutcome, O as OpName, a as OpParams, b as OpResult, c as OPS, S as StreamMeta, E as EndReason, d as EVENTS, e as ClientType, M as ModelsTranscribeResult, T as TranscriptionModelId, f as MlProgress } from './models-ClCrYsEt.js';
5
+ export { i as isDesktopProtocolError } from './models-ClCrYsEt.js';
6
6
  import { FrameHeader } from './frame.js';
7
7
 
8
8
  /** The subset of the WHATWG WebSocket the client uses — browser, React Native, `ws` and Workers all fit. */
package/dist/client.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  Welcome,
13
13
  closeRule,
14
14
  knows
15
- } from "./chunk-server-TKQNS7QK.js";
15
+ } from "./chunk-server-MK77KDKS.js";
16
16
  import {
17
17
  DesktopProtocolError,
18
18
  FRAME_VERSION,
package/dist/index.cjs CHANGED
@@ -70,6 +70,8 @@ __export(src_exports, {
70
70
  AppsAccountsResetsResult: () => AppsAccountsResetsResult,
71
71
  AppsAccountsUsageParams: () => AppsAccountsUsageParams,
72
72
  AppsAccountsUsageResult: () => AppsAccountsUsageResult,
73
+ AppsChatsBringBackParams: () => AppsChatsBringBackParams,
74
+ AppsChatsBringBackResult: () => AppsChatsBringBackResult,
73
75
  AppsChatsChangedEvent: () => AppsChatsChangedEvent,
74
76
  AppsChatsColdParams: () => AppsChatsColdParams,
75
77
  AppsChatsColdResult: () => AppsChatsColdResult,
@@ -86,6 +88,8 @@ __export(src_exports, {
86
88
  AppsChatsProbeResult: () => AppsChatsProbeResult,
87
89
  AppsChatsStarParams: () => AppsChatsStarParams,
88
90
  AppsChatsStarResult: () => AppsChatsStarResult,
91
+ AppsChatsTidyUpParams: () => AppsChatsTidyUpParams,
92
+ AppsChatsTidyUpResult: () => AppsChatsTidyUpResult,
89
93
  AppsChatsTitlesCheckParams: () => AppsChatsTitlesCheckParams,
90
94
  AppsChatsTitlesCheckResult: () => AppsChatsTitlesCheckResult,
91
95
  AppsChatsTitlesPushParams: () => AppsChatsTitlesPushParams,
@@ -385,6 +389,7 @@ __export(src_exports, {
385
389
  DownloadRow: () => DownloadRow,
386
390
  EVENTS: () => EVENTS,
387
391
  EXCLUDED_TOOLS: () => EXCLUDED_TOOLS,
392
+ ElsewhereInstance: () => ElsewhereInstance,
388
393
  EndMsg: () => EndMsg,
389
394
  EndReason: () => EndReason,
390
395
  EntitiesNerParams: () => EntitiesNerParams,
@@ -788,6 +793,8 @@ __export(src_exports, {
788
793
  TOOL_PLATFORMS: () => TOOL_PLATFORMS,
789
794
  TextModelId: () => TextModelId,
790
795
  TextModelInfo: () => TextModelInfo,
796
+ TidyUpFacet: () => TidyUpFacet,
797
+ TidyUpRestart: () => TidyUpRestart,
791
798
  TitleCopies: () => TitleCopies,
792
799
  TitleMismatch: () => TitleMismatch,
793
800
  ToolLevel: () => ToolLevel,
@@ -918,7 +925,7 @@ module.exports = __toCommonJS(src_exports);
918
925
  var import_zod = require("zod");
919
926
  var import_uuid = require("@ai-matrx/kit/uuid");
920
927
  var PROTOCOL_MAJOR = 1;
921
- var PROTOCOL_MINOR = 70;
928
+ var PROTOCOL_MINOR = 72;
922
929
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
923
930
  var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
924
931
  var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -2344,6 +2351,11 @@ var ChatRow = import_zod13.z.strictObject({
2344
2351
  prior_sessions: import_zod13.z.array(ChatId).max(50).optional(),
2345
2352
  /** 1.61: where the title shows (the title facet's sync state for this chat's app). */
2346
2353
  title_sync: ChatTitleSync.optional(),
2354
+ /**
2355
+ * 1.72: whether our star is the app's pin for this chat (the pin facet's sync state: `synced` only
2356
+ * where a test proved the app takes and keeps the pin Matrx writes; `not_synced` says why).
2357
+ */
2358
+ pin_sync: ChatTitleSync.optional(),
2347
2359
  /** 1.62: every Move and Copy of this chat between instances, newest first (absent = never moved or copied). */
2348
2360
  moved: import_zod13.z.array(ChatMove).max(50).optional(),
2349
2361
  /**
@@ -2660,6 +2672,30 @@ var AppsProjectsToWindowResult = import_zod14.z.strictObject({
2660
2672
  chats: import_zod14.z.array(ProjectMoveOutcome).max(5e3).optional(),
2661
2673
  message: import_zod14.z.string().max(400)
2662
2674
  });
2675
+ var AppsChatsBringBackParams = import_zod14.z.strictObject({ app_key: AppKey, chat_id: ChatId, dry_run: import_zod14.z.boolean().optional() });
2676
+ var AppsChatsBringBackResult = AppsProjectsToWindowResult.extend({ project_id: ChatProjectId.nullable() });
2677
+ var TidyUpFacet = import_zod14.z.strictObject({
2678
+ app_key: AppKey,
2679
+ facet: import_zod14.z.enum(["title", "pin"]),
2680
+ state: import_zod14.z.enum(["synced", "not_synced", "unsupported"]),
2681
+ note: import_zod14.z.string().max(400),
2682
+ to_push: nonNegInt,
2683
+ pushed: nonNegInt,
2684
+ already: nonNegInt,
2685
+ waiting: nonNegInt,
2686
+ failed: nonNegInt
2687
+ });
2688
+ var TidyUpRestart = import_zod14.z.strictObject({ window: ChatPlace, why: import_zod14.z.string().max(400) });
2689
+ var AppsChatsTidyUpParams = import_zod14.z.strictObject({ dry_run: import_zod14.z.boolean(), restart_windows: import_zod14.z.array(ChatPlace).max(64).optional() });
2690
+ var AppsChatsTidyUpResult = import_zod14.z.strictObject({
2691
+ dry_run: import_zod14.z.boolean(),
2692
+ facets: import_zod14.z.array(TidyUpFacet).max(32),
2693
+ /** Claude windows that would keep an old name until they reopen (the plan lists them; nothing is quit unasked). */
2694
+ restart: import_zod14.z.array(TidyUpRestart).max(64),
2695
+ /** The windows this run quit and reopened. */
2696
+ restarted: import_zod14.z.array(ChatPlace).max(64),
2697
+ message: import_zod14.z.string().max(600)
2698
+ });
2663
2699
  var ColdChat = import_zod14.z.strictObject({
2664
2700
  id: ChatId,
2665
2701
  title: import_zod14.z.string().max(1e3),
@@ -2928,6 +2964,20 @@ var AppInstance = import_zod15.z.strictObject({
2928
2964
  /** 1.63: what this record still lacks after Matrx filled what it remembered (absent = nothing). */
2929
2965
  missing: import_zod15.z.array(InstanceGap).max(3).optional()
2930
2966
  });
2967
+ var ElsewhereInstance = import_zod15.z.strictObject({
2968
+ app_key: AppKey,
2969
+ /** Its key on its own computer ("main", or its name). */
2970
+ key: import_zod15.z.string().max(120),
2971
+ main: import_zod15.z.boolean(),
2972
+ /** The computer it is on, by its name in Devices. */
2973
+ computer: import_zod15.z.string().max(200),
2974
+ /** Its data folder, as that computer shows it (a label: it is not on this computer). */
2975
+ folder: import_zod15.z.string().max(1024).nullable(),
2976
+ account_id: import_zod15.z.string().max(200).nullable(),
2977
+ account: import_zod15.z.string().max(320).nullable(),
2978
+ /** When that computer last read it. */
2979
+ seen_ms: epochMs.nullable()
2980
+ });
2931
2981
  var AccountResetSource = import_zod15.z.enum(["app", "usage_history", "your_list"]);
2932
2982
  var AccountGap = import_zod15.z.enum(["email", "plan", "usage"]);
2933
2983
  var AppAccount = import_zod15.z.strictObject({
@@ -2969,7 +3019,13 @@ var AppsInstancesListResult = import_zod15.z.strictObject({
2969
3019
  /** The rows are right but something around them failed; shown, never hidden. */
2970
3020
  problem: import_zod15.z.string().max(400).optional(),
2971
3021
  as_of_ms: epochMs.optional(),
2972
- refreshing: import_zod15.z.boolean().optional()
3022
+ refreshing: import_zod15.z.boolean().optional(),
3023
+ /** 1.71: this computer's name (the Computer of every `instances` row). */
3024
+ computer: import_zod15.z.string().max(200).optional(),
3025
+ /** 1.71: the person's instances on their other computers, from the database (read only). */
3026
+ elsewhere: import_zod15.z.array(ElsewhereInstance).max(500).optional(),
3027
+ /** 1.71: the database copy could not be read or written (signed out, offline): the rows are this computer's alone. */
3028
+ shared_problem: import_zod15.z.string().max(200).optional()
2973
3029
  });
2974
3030
  var AppsAccountsListParams = import_zod15.z.strictObject({ app_key: AppKey, fresh: import_zod15.z.boolean().optional() });
2975
3031
  var AppsAccountsListResult = import_zod15.z.strictObject({
@@ -2977,7 +3033,9 @@ var AppsAccountsListResult = import_zod15.z.strictObject({
2977
3033
  accounts: import_zod15.z.array(AppAccount).max(500),
2978
3034
  problem: import_zod15.z.string().max(400).optional(),
2979
3035
  as_of_ms: epochMs.optional(),
2980
- refreshing: import_zod15.z.boolean().optional()
3036
+ refreshing: import_zod15.z.boolean().optional(),
3037
+ /** 1.71: the database copy could not be read or written (signed out, offline): the rows are this computer's memory alone. */
3038
+ shared_problem: import_zod15.z.string().max(200).optional()
2981
3039
  });
2982
3040
  var AppsWindowsSetAccountParams = import_zod15.z.strictObject({ app_key: AppKey, window: ChatPlace, email: import_zod15.z.string().min(3).max(320) });
2983
3041
  var AppsWindowsForgetParams = import_zod15.z.strictObject({ app_key: AppKey, window: ChatPlace });
@@ -5676,6 +5734,8 @@ var OPS = {
5676
5734
  "apps.chats.open": { params: AppsChatsOpenParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "CONFLICT", "TIMEOUT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
5677
5735
  "apps.chats.titles_check": { params: AppsChatsTitlesCheckParams, result: AppsChatsTitlesCheckResult, kind: "unary", since: "1.29", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
5678
5736
  "apps.chats.titles_push": { params: AppsChatsTitlesPushParams, result: AppsChatsTitlesPushResult, kind: "unary", since: "1.29", errors: ["NOT_FOUND", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
5737
+ "apps.chats.bring_back": { params: AppsChatsBringBackParams, result: AppsChatsBringBackResult, kind: "unary", since: "1.72", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
5738
+ "apps.chats.tidy_up": { params: AppsChatsTidyUpParams, result: AppsChatsTidyUpResult, kind: "unary", since: "1.72", errors: ["INVALID_PARAMS", "NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
5679
5739
  "apps.spend": { params: AppsSpendParams, result: AppsSpendResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
5680
5740
  "apps.sync.status": { params: AppsSyncStatusParams, result: AppsSyncStatusResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
5681
5741
  "apps.sync.run": { params: AppsSyncRunParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
@@ -5947,6 +6007,7 @@ var NAMED_SCHEMAS = {
5947
6007
  InstanceGap,
5948
6008
  AppInstall,
5949
6009
  AppInstance,
6010
+ ElsewhereInstance,
5950
6011
  AccountResetSource,
5951
6012
  AccountGap,
5952
6013
  AppAccount,
@@ -6458,6 +6519,12 @@ var NAMED_SCHEMAS = {
6458
6519
  AppsChatsTitlesCheckResult,
6459
6520
  AppsChatsTitlesPushParams,
6460
6521
  AppsChatsTitlesPushResult,
6522
+ AppsChatsBringBackParams,
6523
+ AppsChatsBringBackResult,
6524
+ AppsChatsTidyUpParams,
6525
+ AppsChatsTidyUpResult,
6526
+ TidyUpFacet,
6527
+ TidyUpRestart,
6461
6528
  SpendSplit,
6462
6529
  SpendScopes,
6463
6530
  SpendAccount,
@@ -6771,13 +6838,13 @@ var FIELDS_SINCE = {
6771
6838
  CodingSearchHit: { accountId: "1.57" },
6772
6839
  AppInstance: { missing: "1.63" },
6773
6840
  AppsInstancesListParams: { fresh: "1.51" },
6774
- AppsInstancesListResult: { as_of_ms: "1.51", refreshing: "1.51" },
6841
+ AppsInstancesListResult: { as_of_ms: "1.51", refreshing: "1.51", computer: "1.71", elsewhere: "1.71", shared_problem: "1.71" },
6775
6842
  AppsAccountsListParams: { fresh: "1.51" },
6776
- AppsAccountsListResult: { as_of_ms: "1.51", refreshing: "1.51" },
6843
+ AppsAccountsListResult: { as_of_ms: "1.51", refreshing: "1.51", shared_problem: "1.71" },
6777
6844
  AppsChatsListResult: { updating: "1.9", live: "1.9", families: "1.10" },
6778
6845
  AppsAccountsUsageResult: { problem: "1.12" },
6779
6846
  AppsAccountsResetsResult: { problem: "1.12" },
6780
- ChatRow: { app_project: "1.13", tokens: "1.13", original_title: "1.14", title_source: "1.14", title_override: "1.14", archived: "1.15", session_id: "1.59", app_groups: "1.59", parent: "1.59", prior_sessions: "1.59", title_sync: "1.61", moved: "1.62", home: "1.63", hidden: "1.70" },
6847
+ ChatRow: { app_project: "1.13", tokens: "1.13", original_title: "1.14", title_source: "1.14", title_override: "1.14", archived: "1.15", session_id: "1.59", app_groups: "1.59", parent: "1.59", prior_sessions: "1.59", title_sync: "1.61", moved: "1.62", home: "1.63", hidden: "1.70", pin_sync: "1.72" },
6781
6848
  AccountUsage: { plan: "1.13", credits: "1.13", five_hour_resets_by_ms: "1.25" },
6782
6849
  ResourcesDisk: { name: "1.17" },
6783
6850
  StackServer: { cpu_percent: "1.18", memory_bytes: "1.18" },
@@ -7069,7 +7136,7 @@ function forPeer(op, part, value, version) {
7069
7136
  var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
7070
7137
 
7071
7138
  // src/contract.ts
7072
- var CONTRACT_SHA256 = "96b575595965374c3a48335602d5cbdab06f87fc261d2e38e1c3ebca6f17a9dc";
7139
+ var CONTRACT_SHA256 = "1d36d53c7f7370a8baa0577961ea9f59d46fa08e5786180c17f378bf7c4fb5f6";
7073
7140
 
7074
7141
  // src/close-policy.ts
7075
7142
  var CLOSE_RULES = {