@ai-matrx/desktop-protocol 0.21.25 → 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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.21.26
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/desktop-protocol/v0.21.25..npm/desktop-protocol/v0.21.26 -- apps/shared/desktop-protocol`).
7
+ No source changes intended and no consumer action required.
8
+
3
9
  ## 0.21.25
4
10
 
5
11
  Automatic changed-only republish (docs/metadata drift since the last tag — see
package/dist/client.cjs CHANGED
@@ -144,7 +144,7 @@ var import_zod2 = require("zod");
144
144
  var import_zod = require("zod");
145
145
  var import_uuid = require("@ai-matrx/kit/uuid");
146
146
  var PROTOCOL_MAJOR = 1;
147
- var PROTOCOL_MINOR = 29;
147
+ var PROTOCOL_MINOR = 32;
148
148
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
149
149
  var ProtocolVersion = import_zod.z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
150
150
  var RequestId = import_zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -554,6 +554,8 @@ var FsMkdirParams = import_zod6.z.strictObject({ path: AbsPath, parents: import_
554
554
  var FsMkdirResult = import_zod6.z.strictObject({ path: AbsPath, created: import_zod6.z.boolean() });
555
555
  var FsMoveParams = import_zod6.z.strictObject({ from_path: AbsPath, to_path: AbsPath, overwrite: import_zod6.z.boolean().default(false) });
556
556
  var FsMoveResult = import_zod6.z.strictObject({ from_path: AbsPath, to_path: AbsPath });
557
+ var FsCopyParams = import_zod6.z.strictObject({ from_path: AbsPath, to_path: AbsPath, overwrite: import_zod6.z.boolean().default(false) });
558
+ var FsCopyResult = import_zod6.z.strictObject({ from_path: AbsPath, to_path: AbsPath });
557
559
  var FsDeleteParams = import_zod6.z.strictObject({
558
560
  path: AbsPath,
559
561
  recursive: import_zod6.z.boolean().default(false),
@@ -622,6 +624,36 @@ var FsSearchContentResult = import_zod6.z.strictObject({
622
624
  })
623
625
  )
624
626
  });
627
+ var FsSearchIndexParams = import_zod6.z.strictObject({
628
+ query: import_zod6.z.string().min(1).max(256),
629
+ /** Only under this folder; absent: the whole computer (the walk: the home folder). */
630
+ scope: AbsPath.optional(),
631
+ max_results: import_zod6.z.int().min(1).max(1e3).default(200)
632
+ });
633
+ var FsSearchIndexResult = import_zod6.z.strictObject({
634
+ entries: import_zod6.z.array(FsEntry).max(1e3),
635
+ truncated: import_zod6.z.boolean(),
636
+ source: import_zod6.z.enum(["index", "walk"])
637
+ });
638
+ var FsInfoParams = import_zod6.z.strictObject({ path: AbsPath });
639
+ var FsInfoResult = import_zod6.z.strictObject({
640
+ entry: FsEntry,
641
+ created: import_zod6.z.number().min(0).nullable(),
642
+ // seconds, float
643
+ owner: import_zod6.z.string().max(256).nullable(),
644
+ group: import_zod6.z.string().max(256).nullable(),
645
+ /** A file's logical size, or a folder's whole tree (null when the walk was cut short). */
646
+ total_size: nonNegInt.nullable(),
647
+ /** Bytes the OS uses for it on disk (blocks), same bound as total_size. */
648
+ size_on_disk: nonNegInt.nullable(),
649
+ /** A folder's own children (not its tree); null for a file. */
650
+ items: nonNegInt.nullable(),
651
+ hidden: import_zod6.z.boolean(),
652
+ /** Finder's Locked (macOS uchg); null where the OS has no such flag. */
653
+ locked: import_zod6.z.boolean().nullable(),
654
+ /** The volume holding it refuses writes (a disk image, a read-only share). */
655
+ read_only: import_zod6.z.boolean()
656
+ });
625
657
  var FsChange = import_zod6.z.strictObject({
626
658
  type: import_zod6.z.enum(["created", "modified", "deleted", "moved"]),
627
659
  path: AbsPath,
@@ -790,6 +822,49 @@ var MlProgress = import_zod9.z.strictObject({
790
822
  /** The segment just transcribed (transcribe only): text appears as it is recognised. */
791
823
  segment: TranscriptSegment.nullable()
792
824
  });
825
+ var TextModelId = import_zod9.z.enum([
826
+ "smollm2-135m",
827
+ "llama-3.2-3b",
828
+ "phi-4-mini",
829
+ "gemma-3-4b",
830
+ "llama-3.1-8b",
831
+ "qwen-2.5-7b",
832
+ "mistral-small-3.1",
833
+ "gpt-oss-20b",
834
+ "qwen-2.5-coder-7b",
835
+ "qwen-2.5-coder-14b"
836
+ ]);
837
+ var TextModelInfo = import_zod9.z.strictObject({
838
+ id: TextModelId,
839
+ /** Download size of the weights. */
840
+ size_bytes: nonNegInt,
841
+ installed: import_zod9.z.boolean()
842
+ });
843
+ var LlmServerState = import_zod9.z.enum(["stopped", "starting", "running", "failed"]);
844
+ var LlmRunning = import_zod9.z.strictObject({ id: TextModelId, port: import_zod9.z.int().min(1024).max(65535) });
845
+ var ModelsLlmStatusParams = import_zod9.z.strictObject({});
846
+ var ModelsLlmStatusResult = import_zod9.z.strictObject({
847
+ state: LlmServerState,
848
+ /** Every model in the catalog, with whether its weights are on this computer. */
849
+ models: import_zod9.z.array(TextModelInfo).max(64),
850
+ running: LlmRunning.nullable(),
851
+ /** The model being loaded while `state` is "starting". */
852
+ starting: TextModelId.nullable(),
853
+ /** Non-null while the server program or a model's weights are being downloaded. */
854
+ install: MlInstallProgress.nullable(),
855
+ /** Why the last start or download failed, one human line; null otherwise. */
856
+ error: import_zod9.z.string().max(300).nullable()
857
+ });
858
+ var ModelsLlmInstallParams = import_zod9.z.strictObject({ model: TextModelId });
859
+ var ModelsLlmInstallResult = import_zod9.z.strictObject({ model: TextModelId, elapsed_ms: nonNegInt });
860
+ var ModelsLlmStartParams = import_zod9.z.strictObject({
861
+ model: TextModelId,
862
+ /** Tokens of context; the service picks a size that fits this computer when omitted. */
863
+ context_length: import_zod9.z.int().min(512).max(131072).optional()
864
+ });
865
+ var ModelsLlmStartResult = import_zod9.z.strictObject({ running: LlmRunning, elapsed_ms: nonNegInt });
866
+ var ModelsLlmStopParams = import_zod9.z.strictObject({});
867
+ var ModelsLlmStopResult = import_zod9.z.strictObject({ stopped: import_zod9.z.boolean() });
793
868
  var MlServiceState = import_zod9.z.enum(["starting", "ready", "restarting", "failed", "stopped"]);
794
869
  var MlServiceStatus = import_zod9.z.strictObject({
795
870
  state: MlServiceState,
@@ -2334,6 +2409,19 @@ var ProjectMoveGroup = import_zod30.z.strictObject({
2334
2409
  /** A group of that name was already there (reused, never doubled). */
2335
2410
  group_exists: import_zod30.z.boolean().optional()
2336
2411
  });
2412
+ var ProjectMovePin = import_zod30.z.strictObject({
2413
+ ok: import_zod30.z.boolean(),
2414
+ /** "now" = written into the closed window; "next_close" = queued until that window closes. */
2415
+ when: import_zod30.z.enum(["now", "next_close"]),
2416
+ /** Pinned by this call (dry run: would be). */
2417
+ pinned: nonNegInt,
2418
+ /** Already pinned there. */
2419
+ already: nonNegInt,
2420
+ /** Waiting for the window to close (dry run: would wait). */
2421
+ queued: nonNegInt,
2422
+ /** Why not pinned (ok false), or why queued. */
2423
+ reason: import_zod30.z.string().max(400).optional()
2424
+ });
2337
2425
  var AppsProjectsToWindowParams = import_zod30.z.strictObject({
2338
2426
  app_key: AppKey,
2339
2427
  project_id: ChatProjectId,
@@ -2342,6 +2430,8 @@ var AppsProjectsToWindowParams = import_zod30.z.strictObject({
2342
2430
  take_off: import_zod30.z.boolean().default(false),
2343
2431
  /** Also group them under the project's name in that window's sidebar (closed windows only). */
2344
2432
  group: import_zod30.z.boolean().default(false),
2433
+ /** 1.32: also pin them in that window (now if closed, else when it next closes). */
2434
+ pin: import_zod30.z.boolean().optional(),
2345
2435
  dry_run: import_zod30.z.boolean().default(false)
2346
2436
  });
2347
2437
  var AppsProjectsToWindowResult = import_zod30.z.strictObject({
@@ -2355,6 +2445,8 @@ var AppsProjectsToWindowResult = import_zod30.z.strictObject({
2355
2445
  /** Chats of the project from other apps (no windows to place into), left as they are. */
2356
2446
  other_apps: nonNegInt,
2357
2447
  group: ProjectMoveGroup.nullable(),
2448
+ /** 1.32: the pin in the target window (absent: not asked). */
2449
+ pin: ProjectMovePin.optional(),
2358
2450
  message: import_zod30.z.string().max(400)
2359
2451
  });
2360
2452
  var ColdChat = import_zod30.z.strictObject({
@@ -2642,6 +2734,9 @@ var OPS = {
2642
2734
  "fs.write": { params: FsWriteParams, result: FsWriteResult, kind: "unary", since: "1.0", errors: [...FS_ERR, "CONFLICT", "PAYLOAD_TOO_LARGE"] },
2643
2735
  "fs.mkdir": { params: FsMkdirParams, result: FsMkdirResult, kind: "unary", since: "1.0", errors: [...FS_ERR, "CONFLICT"] },
2644
2736
  "fs.move": { params: FsMoveParams, result: FsMoveResult, kind: "unary", since: "1.0", errors: [...FS_ERR, "CONFLICT"] },
2737
+ "fs.copy": { params: FsCopyParams, result: FsCopyResult, kind: "unary", since: "1.30", errors: [...FS_ERR, "CONFLICT"] },
2738
+ "fs.info": { params: FsInfoParams, result: FsInfoResult, kind: "unary", since: "1.30", errors: FS_ERR },
2739
+ "fs.search_index": { params: FsSearchIndexParams, result: FsSearchIndexResult, kind: "unary", since: "1.30", errors: [...FS_ERR, "TIMEOUT"] },
2645
2740
  "fs.delete": { params: FsDeleteParams, result: FsDeleteResult, kind: "unary", since: "1.0", errors: FS_ERR },
2646
2741
  "fs.watch": { params: FsWatchParams, result: FsWatchResult, kind: "resource", since: "1.0", errors: [...FS_ERR, "RATE_LIMITED"] },
2647
2742
  "fs.patch": { params: FsPatchParams, result: FsPatchResult, kind: "unary", since: "1.0", errors: [...FS_ERR, "CONFLICT"] },
@@ -2662,6 +2757,10 @@ var OPS = {
2662
2757
  "models.status": { params: ModelsStatusParams, result: ModelsStatusResult, kind: "unary", since: "1.2", errors: ["INTERNAL"] },
2663
2758
  "models.install": { params: ModelsInstallParams, result: ModelsInstallResult, kind: "unary", since: "1.2", errors: ["RESOURCE_BUSY", "RESOURCE_GONE", "TIMEOUT", "CANCELLED", "INTERNAL"] },
2664
2759
  "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"] },
2760
+ "models.llm.status": { params: ModelsLlmStatusParams, result: ModelsLlmStatusResult, kind: "unary", since: "1.31", errors: ["INTERNAL"] },
2761
+ "models.llm.install": { params: ModelsLlmInstallParams, result: ModelsLlmInstallResult, kind: "unary", since: "1.31", errors: ["RESOURCE_BUSY", "RESOURCE_GONE", "TIMEOUT", "CANCELLED", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2762
+ "models.llm.start": { params: ModelsLlmStartParams, result: ModelsLlmStartResult, kind: "unary", since: "1.31", errors: ["NOT_FOUND", "RESOURCE_BUSY", "RESOURCE_GONE", "TIMEOUT", "CANCELLED", "PLATFORM_UNSUPPORTED", "INTERNAL"] },
2763
+ "models.llm.stop": { params: ModelsLlmStopParams, result: ModelsLlmStopResult, kind: "unary", since: "1.31", errors: ["INTERNAL"] },
2665
2764
  // Desktop apps and their profiles (SPEC §6 apps); profiles are rows in users.desktop_app_profile.
2666
2765
  "apps.list": { params: AppsListParams, result: AppsListResult, kind: "unary", since: "1.2", errors: ["INTERNAL"] },
2667
2766
  "apps.profiles.list": { params: AppsProfilesListParams, result: AppsProfilesListResult, kind: "unary", since: "1.2", errors: ["NOT_FOUND", "INVALID_PARAMS", "INTERNAL"] },