@wirecat/cli-core 0.728.0 → 0.730.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 +31 -0
- package/dist/background/daily-archive-timer.d.ts +1 -1
- package/dist/cli/documents/file-mirrors.d.ts +70 -0
- package/dist/cli/documents/file-mirrors.js +718 -0
- package/dist/cli/documents/index.d.ts +1 -0
- package/dist/cli/documents/index.js +1 -0
- package/dist/cli/documents/library.js +6 -1
- package/dist/errors/reasons.js +5 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +1 -0
- package/dist/services/notes-search.d.ts +13 -2
- package/dist/services/notes-search.js +2 -2
- package/dist/services/search-all.d.ts +5 -0
- package/dist/services/search-all.js +76 -6
- package/dist/services/tracker-meaning.d.ts +17 -0
- package/dist/services/tracker-meaning.js +27 -0
- package/dist/store/exports.d.ts +1 -1
- package/dist/store/sqlite/tracker-chunks.d.ts +52 -0
- package/dist/store/sqlite/tracker-chunks.js +190 -0
- package/dist/store/sqlite/tracker.d.ts +37 -0
- package/dist/store/sqlite/tracker.js +50 -4
- package/dist/tracker/cli/index.js +76 -9
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,37 @@ 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.730.0 — 23.11.2026
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **`search all` finds issues, projects and comments by meaning.** A tracker's issues, projects and comments get
|
|
13
|
+
chunks as notes do (`tracker_item`), kept in step by `save` and `removeUnlisted`, and `embedTracker` embeds them
|
|
14
|
+
with the shared text model. The tracker lane fuses words and meaning by reciprocal rank, says how it searched under
|
|
15
|
+
`tracker: { by, meaningSkipped? }`, and marks each hit's `foundBy`. A tracker CLI's `sync --embed` embeds new items,
|
|
16
|
+
the combined sync with documents too, within the deadline; a model not downloaded keeps the sync's answer and is
|
|
17
|
+
named in `meta.issues`. Items synced before are embedded at the next `sync --embed`
|
|
18
|
+
([TRACKER.md](docs/dev/TRACKER.md#search-all)).
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **A documents `sync --embed` stops embedding before the run's deadline.** `embedNotes` now gets the deadline the
|
|
23
|
+
sync had, so `--timeout` bounds the embedding too and the answer says when it stopped
|
|
24
|
+
([DOCUMENTS.md](docs/dev/DOCUMENTS.md#walks-over-several-syncs)).
|
|
25
|
+
- A tracker's combined `sync` that cannot reach the tracker and has no documents folder chosen fails as a tracker-only
|
|
26
|
+
`sync` does (for example `authentication_error` before sign-in) instead of a partial answer that exits 0.
|
|
27
|
+
|
|
28
|
+
## 0.729.0 — 23.11.2026
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- **One shared `mirrors` command group for a file mirror.** `fileMirrorsCommand` gives a file CLI `mirrors add`,
|
|
33
|
+
`list`, `status`, `preview`, `sync`, `watch`, `update`, `remove`, `versions list|restore` and
|
|
34
|
+
`conflicts list|show|resolve` over `syncFileMirrors`. It is yandex-disk-cli's group, with the service, its remote
|
|
35
|
+
word, how `add` finds a folder, the write guard and the keys each write checks given by the app, so notion-cli
|
|
36
|
+
mounts the same commands and ydisk can move onto them with no change in what it does or keeps on disk. See
|
|
37
|
+
[the file mirror](docs/dev/DOCUMENTS.md#plain-files-both-ways).
|
|
38
|
+
|
|
8
39
|
## 0.728.0 — 23.11.2026
|
|
9
40
|
|
|
10
41
|
### Added
|
|
@@ -24,12 +24,12 @@ export interface DailyArchiveTimerInput {
|
|
|
24
24
|
}
|
|
25
25
|
export declare const dailyArchiveTimer: (input: DailyArchiveTimerInput) => DailyArchiveTimer;
|
|
26
26
|
export declare const manageDailyArchiveTimer: (plan: DailyArchiveTimer, action: "install" | "start" | "stop" | "status" | "uninstall", system: Pick<ServerSystem, "platform" | "run">, env: NodeJS.ProcessEnv, signal?: AbortSignal) => Promise<{
|
|
27
|
+
action?: undefined;
|
|
27
28
|
name: string;
|
|
28
29
|
installed: boolean;
|
|
29
30
|
active: boolean;
|
|
30
31
|
servicePath: string;
|
|
31
32
|
timerPath: string;
|
|
32
|
-
action?: undefined;
|
|
33
33
|
} | {
|
|
34
34
|
active?: undefined;
|
|
35
35
|
name: string;
|
|
@@ -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;
|