@ai-matrx/desktop-protocol 0.18.0 → 0.19.0

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/realtime';
2
2
  export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/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-BOPMXUz-.cjs';
5
- export { i as isDesktopProtocolError } from './models-BOPMXUz-.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-DTtWH_yC.cjs';
5
+ export { i as isDesktopProtocolError } from './models-DTtWH_yC.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/realtime';
2
2
  export { RECONNECT_ALARM_ATTEMPTS } from '@ai-matrx/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-BOPMXUz-.js';
5
- export { i as isDesktopProtocolError } from './models-BOPMXUz-.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-DTtWH_yC.js';
5
+ export { i as isDesktopProtocolError } from './models-DTtWH_yC.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
@@ -112,7 +112,7 @@ import { z as z2 } from "zod";
112
112
  import { z } from "zod";
113
113
  import { UUID_SHAPE_PATTERN } from "@ai-matrx/kit/uuid";
114
114
  var PROTOCOL_MAJOR = 1;
115
- var PROTOCOL_MINOR = 17;
115
+ var PROTOCOL_MINOR = 19;
116
116
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
117
117
  var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
118
118
  var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -1293,7 +1293,11 @@ var StackServer = z20.strictObject({
1293
1293
  started_at_ms: epochMs.nullable(),
1294
1294
  restarts: nonNegInt,
1295
1295
  exit_code: z20.int().nullable(),
1296
- pid: z20.int().nullable()
1296
+ pid: z20.int().nullable(),
1297
+ /** (1.18) CPU of the server's process and everything under it, in percent of one core; absent when it is not running. */
1298
+ cpu_percent: z20.number().min(0).optional(),
1299
+ /** (1.18) Memory of the same processes: the physical footprint (Activity Monitor's Memory) summed; absent when it is not running. */
1300
+ memory_bytes: nonNegInt.optional()
1297
1301
  });
1298
1302
  var StackEvent = z20.strictObject({
1299
1303
  at_ms: epochMs,
@@ -1867,6 +1871,43 @@ var AppsProjectsCreateParams = z26.strictObject({ app_key: AppKey, name: z26.str
1867
1871
  var AppsProjectsCreateResult = z26.strictObject({ project: ChatProject });
1868
1872
  var AppsProjectsImportPinsParams = z26.strictObject({ app_key: AppKey });
1869
1873
  var AppsProjectsImportPinsResult = z26.strictObject({ message: z26.string().max(400) });
1874
+ var ProjectMoveChat = z26.strictObject({ chat_id: ChatId, title: z26.string().max(300) });
1875
+ var ProjectMoveSkip = z26.strictObject({ chat_id: ChatId, title: z26.string().max(300), window: ChatPlace.nullable(), reason: z26.string().max(400) });
1876
+ var ProjectMoveGroup = z26.strictObject({
1877
+ ok: z26.boolean(),
1878
+ name: z26.string().max(200),
1879
+ /** Why it is not (or was not) grouped — e.g. the window is open. */
1880
+ reason: z26.string().max(400).optional(),
1881
+ /** Chats that get (or got) the group; already in it; taken from another group of the window. */
1882
+ assign: nonNegInt.optional(),
1883
+ already: nonNegInt.optional(),
1884
+ from_other_groups: nonNegInt.optional(),
1885
+ /** A group of that name was already there (reused, never doubled). */
1886
+ group_exists: z26.boolean().optional()
1887
+ });
1888
+ var AppsProjectsToWindowParams = z26.strictObject({
1889
+ app_key: AppKey,
1890
+ project_id: ChatProjectId,
1891
+ window: ChatPlace,
1892
+ /** Also take each chat off its other side windows where safe (never main, the holder, an open window). */
1893
+ take_off: z26.boolean().default(false),
1894
+ /** Also group them under the project's name in that window's sidebar (closed windows only). */
1895
+ group: z26.boolean().default(false),
1896
+ dry_run: z26.boolean().default(false)
1897
+ });
1898
+ var AppsProjectsToWindowResult = z26.strictObject({
1899
+ project_id: ChatProjectId,
1900
+ window: ChatPlace,
1901
+ dry_run: z26.boolean(),
1902
+ place: z26.array(ProjectMoveChat).max(5e3),
1903
+ already: z26.array(ProjectMoveChat).max(5e3),
1904
+ take_off: z26.array(ProjectMoveChat.extend({ window: ChatPlace })).max(2e4),
1905
+ skipped: z26.array(ProjectMoveSkip).max(2e4),
1906
+ /** Chats of the project from other apps (no windows to place into), left as they are. */
1907
+ other_apps: nonNegInt,
1908
+ group: ProjectMoveGroup.nullable(),
1909
+ message: z26.string().max(400)
1910
+ });
1870
1911
  var ColdChat = z26.strictObject({
1871
1912
  id: ChatId,
1872
1913
  title: z26.string().max(1e3),
@@ -2025,6 +2066,7 @@ var OPS = {
2025
2066
  "apps.projects.move": { params: AppsProjectsMoveParams, result: AppsProjectsMoveResult, kind: "unary", since: "1.10", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2026
2067
  "apps.projects.create": { params: AppsProjectsCreateParams, result: AppsProjectsCreateResult, kind: "unary", since: "1.10", errors: ["INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2027
2068
  "apps.projects.import_pins": { params: AppsProjectsImportPinsParams, result: AppsProjectsImportPinsResult, kind: "unary", since: "1.10", errors: ["CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2069
+ "apps.projects.to_window": { params: AppsProjectsToWindowParams, result: AppsProjectsToWindowResult, kind: "unary", since: "1.19", errors: ["NOT_FOUND", "INVALID_PARAMS", "CONFLICT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2028
2070
  // 1.11: Going cold, Spend, sync health, windows upkeep.
2029
2071
  "apps.chats.cold": { params: AppsChatsColdParams, result: AppsChatsColdResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2030
2072
  "apps.chats.open": { params: AppsChatsOpenParams, result: AppsWindowActionResult, kind: "unary", since: "1.11", errors: ["NOT_FOUND", "CONFLICT", "TIMEOUT", "PLATFORM_UNSUPPORTED", "INTERNAL"] },