@ai-matrx/desktop-protocol 0.21.24 → 0.21.26

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-CXjW101n.cjs';
5
- export { i as isDesktopProtocolError } from './models-CXjW101n.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-BJsUM5sC.cjs';
5
+ export { i as isDesktopProtocolError } from './models-BJsUM5sC.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-CXjW101n.js';
5
- export { i as isDesktopProtocolError } from './models-CXjW101n.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-BJsUM5sC.js';
5
+ export { i as isDesktopProtocolError } from './models-BJsUM5sC.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 = 29;
115
+ var PROTOCOL_MINOR = 32;
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_-]+$/);
@@ -522,6 +522,8 @@ var FsMkdirParams = z6.strictObject({ path: AbsPath, parents: z6.boolean().defau
522
522
  var FsMkdirResult = z6.strictObject({ path: AbsPath, created: z6.boolean() });
523
523
  var FsMoveParams = z6.strictObject({ from_path: AbsPath, to_path: AbsPath, overwrite: z6.boolean().default(false) });
524
524
  var FsMoveResult = z6.strictObject({ from_path: AbsPath, to_path: AbsPath });
525
+ var FsCopyParams = z6.strictObject({ from_path: AbsPath, to_path: AbsPath, overwrite: z6.boolean().default(false) });
526
+ var FsCopyResult = z6.strictObject({ from_path: AbsPath, to_path: AbsPath });
525
527
  var FsDeleteParams = z6.strictObject({
526
528
  path: AbsPath,
527
529
  recursive: z6.boolean().default(false),
@@ -590,6 +592,36 @@ var FsSearchContentResult = z6.strictObject({
590
592
  })
591
593
  )
592
594
  });
595
+ var FsSearchIndexParams = z6.strictObject({
596
+ query: z6.string().min(1).max(256),
597
+ /** Only under this folder; absent: the whole computer (the walk: the home folder). */
598
+ scope: AbsPath.optional(),
599
+ max_results: z6.int().min(1).max(1e3).default(200)
600
+ });
601
+ var FsSearchIndexResult = z6.strictObject({
602
+ entries: z6.array(FsEntry).max(1e3),
603
+ truncated: z6.boolean(),
604
+ source: z6.enum(["index", "walk"])
605
+ });
606
+ var FsInfoParams = z6.strictObject({ path: AbsPath });
607
+ var FsInfoResult = z6.strictObject({
608
+ entry: FsEntry,
609
+ created: z6.number().min(0).nullable(),
610
+ // seconds, float
611
+ owner: z6.string().max(256).nullable(),
612
+ group: z6.string().max(256).nullable(),
613
+ /** A file's logical size, or a folder's whole tree (null when the walk was cut short). */
614
+ total_size: nonNegInt.nullable(),
615
+ /** Bytes the OS uses for it on disk (blocks), same bound as total_size. */
616
+ size_on_disk: nonNegInt.nullable(),
617
+ /** A folder's own children (not its tree); null for a file. */
618
+ items: nonNegInt.nullable(),
619
+ hidden: z6.boolean(),
620
+ /** Finder's Locked (macOS uchg); null where the OS has no such flag. */
621
+ locked: z6.boolean().nullable(),
622
+ /** The volume holding it refuses writes (a disk image, a read-only share). */
623
+ read_only: z6.boolean()
624
+ });
593
625
  var FsChange = z6.strictObject({
594
626
  type: z6.enum(["created", "modified", "deleted", "moved"]),
595
627
  path: AbsPath,
@@ -758,6 +790,49 @@ var MlProgress = z9.strictObject({
758
790
  /** The segment just transcribed (transcribe only): text appears as it is recognised. */
759
791
  segment: TranscriptSegment.nullable()
760
792
  });
793
+ var TextModelId = z9.enum([
794
+ "smollm2-135m",
795
+ "llama-3.2-3b",
796
+ "phi-4-mini",
797
+ "gemma-3-4b",
798
+ "llama-3.1-8b",
799
+ "qwen-2.5-7b",
800
+ "mistral-small-3.1",
801
+ "gpt-oss-20b",
802
+ "qwen-2.5-coder-7b",
803
+ "qwen-2.5-coder-14b"
804
+ ]);
805
+ var TextModelInfo = z9.strictObject({
806
+ id: TextModelId,
807
+ /** Download size of the weights. */
808
+ size_bytes: nonNegInt,
809
+ installed: z9.boolean()
810
+ });
811
+ var LlmServerState = z9.enum(["stopped", "starting", "running", "failed"]);
812
+ var LlmRunning = z9.strictObject({ id: TextModelId, port: z9.int().min(1024).max(65535) });
813
+ var ModelsLlmStatusParams = z9.strictObject({});
814
+ var ModelsLlmStatusResult = z9.strictObject({
815
+ state: LlmServerState,
816
+ /** Every model in the catalog, with whether its weights are on this computer. */
817
+ models: z9.array(TextModelInfo).max(64),
818
+ running: LlmRunning.nullable(),
819
+ /** The model being loaded while `state` is "starting". */
820
+ starting: TextModelId.nullable(),
821
+ /** Non-null while the server program or a model's weights are being downloaded. */
822
+ install: MlInstallProgress.nullable(),
823
+ /** Why the last start or download failed, one human line; null otherwise. */
824
+ error: z9.string().max(300).nullable()
825
+ });
826
+ var ModelsLlmInstallParams = z9.strictObject({ model: TextModelId });
827
+ var ModelsLlmInstallResult = z9.strictObject({ model: TextModelId, elapsed_ms: nonNegInt });
828
+ var ModelsLlmStartParams = z9.strictObject({
829
+ model: TextModelId,
830
+ /** Tokens of context; the service picks a size that fits this computer when omitted. */
831
+ context_length: z9.int().min(512).max(131072).optional()
832
+ });
833
+ var ModelsLlmStartResult = z9.strictObject({ running: LlmRunning, elapsed_ms: nonNegInt });
834
+ var ModelsLlmStopParams = z9.strictObject({});
835
+ var ModelsLlmStopResult = z9.strictObject({ stopped: z9.boolean() });
761
836
  var MlServiceState = z9.enum(["starting", "ready", "restarting", "failed", "stopped"]);
762
837
  var MlServiceStatus = z9.strictObject({
763
838
  state: MlServiceState,
@@ -2302,6 +2377,19 @@ var ProjectMoveGroup = z30.strictObject({
2302
2377
  /** A group of that name was already there (reused, never doubled). */
2303
2378
  group_exists: z30.boolean().optional()
2304
2379
  });
2380
+ var ProjectMovePin = z30.strictObject({
2381
+ ok: z30.boolean(),
2382
+ /** "now" = written into the closed window; "next_close" = queued until that window closes. */
2383
+ when: z30.enum(["now", "next_close"]),
2384
+ /** Pinned by this call (dry run: would be). */
2385
+ pinned: nonNegInt,
2386
+ /** Already pinned there. */
2387
+ already: nonNegInt,
2388
+ /** Waiting for the window to close (dry run: would wait). */
2389
+ queued: nonNegInt,
2390
+ /** Why not pinned (ok false), or why queued. */
2391
+ reason: z30.string().max(400).optional()
2392
+ });
2305
2393
  var AppsProjectsToWindowParams = z30.strictObject({
2306
2394
  app_key: AppKey,
2307
2395
  project_id: ChatProjectId,
@@ -2310,6 +2398,8 @@ var AppsProjectsToWindowParams = z30.strictObject({
2310
2398
  take_off: z30.boolean().default(false),
2311
2399
  /** Also group them under the project's name in that window's sidebar (closed windows only). */
2312
2400
  group: z30.boolean().default(false),
2401
+ /** 1.32: also pin them in that window (now if closed, else when it next closes). */
2402
+ pin: z30.boolean().optional(),
2313
2403
  dry_run: z30.boolean().default(false)
2314
2404
  });
2315
2405
  var AppsProjectsToWindowResult = z30.strictObject({
@@ -2323,6 +2413,8 @@ var AppsProjectsToWindowResult = z30.strictObject({
2323
2413
  /** Chats of the project from other apps (no windows to place into), left as they are. */
2324
2414
  other_apps: nonNegInt,
2325
2415
  group: ProjectMoveGroup.nullable(),
2416
+ /** 1.32: the pin in the target window (absent: not asked). */
2417
+ pin: ProjectMovePin.optional(),
2326
2418
  message: z30.string().max(400)
2327
2419
  });
2328
2420
  var ColdChat = z30.strictObject({
@@ -2610,6 +2702,9 @@ var OPS = {
2610
2702
  "fs.write": { params: FsWriteParams, result: FsWriteResult, kind: "unary", since: "1.0", errors: [...FS_ERR, "CONFLICT", "PAYLOAD_TOO_LARGE"] },
2611
2703
  "fs.mkdir": { params: FsMkdirParams, result: FsMkdirResult, kind: "unary", since: "1.0", errors: [...FS_ERR, "CONFLICT"] },
2612
2704
  "fs.move": { params: FsMoveParams, result: FsMoveResult, kind: "unary", since: "1.0", errors: [...FS_ERR, "CONFLICT"] },
2705
+ "fs.copy": { params: FsCopyParams, result: FsCopyResult, kind: "unary", since: "1.30", errors: [...FS_ERR, "CONFLICT"] },
2706
+ "fs.info": { params: FsInfoParams, result: FsInfoResult, kind: "unary", since: "1.30", errors: FS_ERR },
2707
+ "fs.search_index": { params: FsSearchIndexParams, result: FsSearchIndexResult, kind: "unary", since: "1.30", errors: [...FS_ERR, "TIMEOUT"] },
2613
2708
  "fs.delete": { params: FsDeleteParams, result: FsDeleteResult, kind: "unary", since: "1.0", errors: FS_ERR },
2614
2709
  "fs.watch": { params: FsWatchParams, result: FsWatchResult, kind: "resource", since: "1.0", errors: [...FS_ERR, "RATE_LIMITED"] },
2615
2710
  "fs.patch": { params: FsPatchParams, result: FsPatchResult, kind: "unary", since: "1.0", errors: [...FS_ERR, "CONFLICT"] },
@@ -2630,6 +2725,10 @@ var OPS = {
2630
2725
  "models.status": { params: ModelsStatusParams, result: ModelsStatusResult, kind: "unary", since: "1.2", errors: ["INTERNAL"] },
2631
2726
  "models.install": { params: ModelsInstallParams, result: ModelsInstallResult, kind: "unary", since: "1.2", errors: ["RESOURCE_BUSY", "RESOURCE_GONE", "TIMEOUT", "CANCELLED", "INTERNAL"] },
2632
2727
  "models.transcribe": { params: ModelsTranscribeParams, result: ModelsTranscribeResult, kind: "unary", since: "1.2", errors: ["NOT_FOUND", "INVALID_PARAMS", "PERMISSION_DENIED_OS", "RESOURCE_BUSY", "RESOURCE_GONE", "CANCELLED", "PAYLOAD_TOO_LARGE", "INTERNAL"] },
2728
+ "models.llm.status": { params: ModelsLlmStatusParams, result: ModelsLlmStatusResult, kind: "unary", since: "1.31", errors: ["INTERNAL"] },
2729
+ "models.llm.install": { params: ModelsLlmInstallParams, result: ModelsLlmInstallResult, kind: "unary", since: "1.31", errors: ["RESOURCE_BUSY", "RESOURCE_GONE", "TIMEOUT", "CANCELLED", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2730
+ "models.llm.start": { params: ModelsLlmStartParams, result: ModelsLlmStartResult, kind: "unary", since: "1.31", errors: ["NOT_FOUND", "RESOURCE_BUSY", "RESOURCE_GONE", "TIMEOUT", "CANCELLED", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2731
+ "models.llm.stop": { params: ModelsLlmStopParams, result: ModelsLlmStopResult, kind: "unary", since: "1.31", errors: ["INTERNAL"] },
2633
2732
  // Desktop apps and their profiles (SPEC §6 apps); profiles are rows in users.desktop_app_profile.
2634
2733
  "apps.list": { params: AppsListParams, result: AppsListResult, kind: "unary", since: "1.2", errors: ["INTERNAL"] },
2635
2734
  "apps.profiles.list": { params: AppsProfilesListParams, result: AppsProfilesListResult, kind: "unary", since: "1.2", errors: ["NOT_FOUND", "INVALID_PARAMS", "INTERNAL"] },