@wirecat/cli-core 0.727.0 → 0.729.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/CHANGELOG.md CHANGED
@@ -5,6 +5,43 @@ Notable changes to `@wirecat/cli-core` (`@wirecat/cli-messaging` up to 0.261.0,
5
5
  minor version may break callers, and says how under "Changed — may break callers". `pnpm docs:check` checks the
6
6
  shape of this file.
7
7
 
8
+ ## 0.729.0 — 23.11.2026
9
+
10
+ ### Added
11
+
12
+ - **One shared `mirrors` command group for a file mirror.** `fileMirrorsCommand` gives a file CLI `mirrors add`,
13
+ `list`, `status`, `preview`, `sync`, `watch`, `update`, `remove`, `versions list|restore` and
14
+ `conflicts list|show|resolve` over `syncFileMirrors`. It is yandex-disk-cli's group, with the service, its remote
15
+ word, how `add` finds a folder, the write guard and the keys each write checks given by the app, so notion-cli
16
+ mounts the same commands and ydisk can move onto them with no change in what it does or keeps on disk. See
17
+ [the file mirror](docs/dev/DOCUMENTS.md#plain-files-both-ways).
18
+
19
+ ## 0.728.0 — 23.11.2026
20
+
21
+ ### Added
22
+
23
+ - **One `sync` for a tracker that holds documents too.** `documentLibrary(options)` answers the shared documents
24
+ commands without their `sync`, and that sync as a step; `addTrackerCommands({ documents: library.sync })` then mounts
25
+ one `sync` that brings the issues and the documents, so linear-cli can mount both and the owner and Desktop keep one
26
+ `<cli> sync`. The answer is the tracker's report with the documents' answer under `documents`; a part that fails is
27
+ named there and in `meta.issues` and the other's answer still shows. `--rescan` lists both again, `--max-pages`
28
+ bounds each part, `--embed` indexes the documents' text, and `--limit` is refused with the reason. A tracker CLI
29
+ without `documents` keeps its `sync` unchanged ([TRACKER.md](docs/dev/TRACKER.md#one-sync-with-documents)).
30
+
31
+ ### Changed — may break callers
32
+
33
+ - **`linear` holds documents beside its tracker copy.** Its registry entry is `kind: "tracker"`,
34
+ `kinds: ["tracker", "documents"]`, and a provider that holds `documents` among its kinds is a documents account
35
+ provider, as Drive is: `documentAccountProviders()` and `isDocumentAccountProvider` now answer `linear` too.
36
+ `search all` reads a Linear account once in the tracker lane, under its own key, and once in the notes lane, as
37
+ `notes:<id>`, also when `--source` names `linear` or `linear:<account>`. A group naming `linear:<account>` holds
38
+ its documents too, so a locked run shows and opens them; one naming only `notes:<id>` holds no issues.
39
+ - **The combined `sync` skips the documents while no folder is chosen.** With no folder and no kept documents it asks
40
+ the provider nothing and writes no documents state, answering `documents: { skipped: "no folders chosen" }`.
41
+ - **A failed document is a partial answer that exits 0 in the combined `sync`.** It is named in `meta.issues` with
42
+ `source` `documents`, beside the tracker's report; notion-cli's and drive-cli's documents-only `sync` still exits
43
+ non-zero there.
44
+
8
45
  ## 0.727.0 — 23.11.2026
9
46
 
10
47
  ### Added
@@ -0,0 +1,70 @@
1
+ import { Command } from "commander";
2
+ import { type FileTarget, type MirrorAction } from "../../documents.js";
3
+ import type { AppIdentity } from "../../ports/app.js";
4
+ import type { Asker } from "../../sends/guard.js";
5
+ import type { KeyedGuard } from "../../sends/keyed-guard.js";
6
+ import { type Body } from "../envelope.js";
7
+ /** One write a sync is about to make, as the app's permission keys see it. */
8
+ export interface FileMirrorWrite {
9
+ action: MirrorAction;
10
+ side: "local" | "remote";
11
+ }
12
+ /** The remote, signed in for one run. */
13
+ export interface FileMirrorRemote {
14
+ target: FileTarget;
15
+ /**
16
+ * The remote folder `mirrors add` was given, as the app names it: `folder` is what the mirror saves and the target
17
+ * lists, `rootId` the folder's id, pinned so a folder put in its place is refused. Refuses anything that is not a
18
+ * folder the account can mirror.
19
+ */
20
+ root(input: string): Promise<{
21
+ folder: string;
22
+ rootId: string;
23
+ }>;
24
+ }
25
+ /** What a file-mirror CLI gives `fileMirrorsCommand`. */
26
+ export interface FileMirrorCommands {
27
+ /** Who the app is: its command names the examples and hints, its folders are never mirrored. */
28
+ identity: AppIdentity;
29
+ /** The service as people name it, `Yandex Disk`, `Notion`. */
30
+ service: string;
31
+ /** How the remote side is named in `--keep`, in reports (`disk_changed_at`) and in a conflict copy's name. */
32
+ remote: string;
33
+ /**
34
+ * What a mirror pairs a local folder with, as help names it (`Yandex Disk folder`, `Notion page`), the remote
35
+ * argument of `mirrors add`, two examples of the command after `mirrors add`, and a sentence its help ends with.
36
+ */
37
+ root: {
38
+ place: string;
39
+ description: string;
40
+ examples: readonly [string, string];
41
+ note?: string;
42
+ };
43
+ /** How often `mirrors watch` asks the remote by default; a remote without a revision lists everything each time. */
44
+ every?: string;
45
+ output(command: Command, body: Body): void;
46
+ /** The selected profile; refuses when there is none. */
47
+ profile(command: Command): string;
48
+ /** The profile's own state folder: `mirrors.json`, and `mirrors/` with each mirror's state, versions and lock. */
49
+ stateDir(command: Command): string;
50
+ /** How long a replaced or deleted version stays: the profile's `keep_versions_for_days`. */
51
+ keepForDays(command: Command): number;
52
+ /**
53
+ * Runs `body` inside the app's run (its `--timeout`, run record and request log) with the remote signed in. `watch`
54
+ * passes `unbounded`, since it ends at `--timeout` on its own.
55
+ */
56
+ connect<T>(command: Command, body: (remote: FileMirrorRemote) => Promise<T>, options?: {
57
+ unbounded?: boolean;
58
+ }): Promise<T>;
59
+ /** The guard of a write under the command's own key and `extra`, asking at `ask`. */
60
+ writeGuard(command: Command, extra: readonly string[], ask: Asker): KeyedGuard;
61
+ /** The keys one write checks beside the command's own, `files.delete` for a replaced file on Yandex Disk. */
62
+ keysOf(write: FileMirrorWrite): readonly string[];
63
+ }
64
+ /**
65
+ * `mirrors add|list|status|preview|sync|watch|update|remove`, `mirrors versions list|restore` and `mirrors conflicts
66
+ * list|show|resolve`: local folders and remote folders kept the same both ways, file by file, over `syncFileMirrors`.
67
+ * The app gives its remote, how `add` finds a remote folder, its write guard and its keys. Each profile keeps its
68
+ * mirrors in `mirrors.json` under its state folder, and each mirror's state, versions and the sync lock in `mirrors/`.
69
+ */
70
+ export declare const fileMirrorsCommand: (helpers: FileMirrorCommands) => Command;