@wirecat/cli-core 0.464.0 → 0.465.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 +8 -0
- package/dist/background/relay.js +5 -1
- package/dist/calendar/cli/index.js +8 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,14 @@ shape of this file.
|
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
+
## 0.465.0 — 27.10.2026
|
|
11
|
+
|
|
12
|
+
### Changed — may break callers
|
|
13
|
+
|
|
14
|
+
- **The calendar `sync` starts over with `--rescan`, not `--full`**, the start-over flag WC-LIFE-13 names and drive's
|
|
15
|
+
`sync --rescan` uses. `--full` is the shared program's output flag; `sync --full` is now refused with a message
|
|
16
|
+
that names `--rescan`, rather than quietly reading only the changes.
|
|
17
|
+
|
|
10
18
|
## 0.464.0 — 27.10.2026
|
|
11
19
|
|
|
12
20
|
### Added
|
package/dist/background/relay.js
CHANGED
|
@@ -75,6 +75,7 @@ export const listenRelay = async (path, run) => {
|
|
|
75
75
|
// The caller holds the serve lock, so a socket left here belongs to a serve that is gone.
|
|
76
76
|
rmSync(path, { force: true });
|
|
77
77
|
const open = new Set();
|
|
78
|
+
const running = new Set();
|
|
78
79
|
const server = createServer((socket) => {
|
|
79
80
|
open.add(socket);
|
|
80
81
|
const stop = new AbortController();
|
|
@@ -111,7 +112,9 @@ export const listenRelay = async (path, run) => {
|
|
|
111
112
|
stdin.isTTY = parsed.output.stdinTty;
|
|
112
113
|
if (parsed.output.stdinTty)
|
|
113
114
|
stdin.end();
|
|
114
|
-
|
|
115
|
+
const job = serve(socket, parsed.output, stdin, stop.signal, run);
|
|
116
|
+
running.add(job);
|
|
117
|
+
void job.then(() => running.delete(job), () => running.delete(job));
|
|
115
118
|
return;
|
|
116
119
|
}
|
|
117
120
|
if (typeof message.stdin === "string" && !stdin.writableEnded)
|
|
@@ -133,6 +136,7 @@ export const listenRelay = async (path, run) => {
|
|
|
133
136
|
for (const socket of open)
|
|
134
137
|
socket.destroy();
|
|
135
138
|
await new Promise((resolve) => server.close(() => resolve()));
|
|
139
|
+
await Promise.allSettled(running);
|
|
136
140
|
rmSync(path, { force: true });
|
|
137
141
|
},
|
|
138
142
|
};
|
|
@@ -122,21 +122,22 @@ const addCalendarCommandsDefinition = (program, deps) => {
|
|
|
122
122
|
offline: false,
|
|
123
123
|
cooperative: true,
|
|
124
124
|
partial: true,
|
|
125
|
-
}).description("bring the synced calendars up to date: what changed since the last sync, or everything with --
|
|
126
|
-
"stops before its deadline or --max-pages and the next one goes on from there"), "sync", "sync --
|
|
127
|
-
.option("--
|
|
125
|
+
}).description("bring the synced calendars up to date: what changed since the last sync, or everything with --rescan; a run " +
|
|
126
|
+
"stops before its deadline or --max-pages and the next one goes on from there"), "sync", "sync --rescan --embed", "sync --timeout 2m"))
|
|
127
|
+
.option("--rescan", "list every synced calendar's window again, dropping a round in progress")
|
|
128
128
|
.option("--max-pages <pages>", "at most this many requests to the provider in this run; as many as fit the deadline if not given", integer)
|
|
129
129
|
.option("--embed", "also index new events for meaning search, with a model already downloaded")
|
|
130
130
|
.action(async (opts, command) => {
|
|
131
|
-
//
|
|
132
|
-
|
|
131
|
+
// --full is the shared program's output flag; it used to start the round over here, and silently would not now.
|
|
132
|
+
if (command.optsWithGlobals().full)
|
|
133
|
+
throw new CliError("validation_error", "sync starts over with --rescan; --full only widens output");
|
|
133
134
|
const { signal } = environmentOf(command);
|
|
134
135
|
const report = await syncCalendars(source(), deps.store, {
|
|
135
136
|
accountId: deps.accountId,
|
|
136
137
|
now: now(),
|
|
137
138
|
budget: runBudgetOf(command, opts.maxPages),
|
|
138
139
|
...(signal ? { signal } : {}),
|
|
139
|
-
...(
|
|
140
|
+
...(opts.rescan ? { full: true } : {}),
|
|
140
141
|
...(deps.expand ? { expand: deps.expand } : {}),
|
|
141
142
|
});
|
|
142
143
|
if (opts.embed && !deps.embed)
|
|
@@ -144,7 +145,7 @@ const addCalendarCommandsDefinition = (program, deps) => {
|
|
|
144
145
|
// A run its budget stopped has no time left for the model; the run that finishes the round embeds.
|
|
145
146
|
const embeddings = opts.embed && !report.stopped ? await deps.embed?.(EMBED_MAX) : undefined;
|
|
146
147
|
const timeout = command.optsWithGlobals().timeout;
|
|
147
|
-
// The same command again, never --
|
|
148
|
+
// The same command again, never --rescan: that would drop the round this run leaves in progress. A run that moved
|
|
148
149
|
// nothing on would only repeat itself, so it gets no step an agent may run unasked.
|
|
149
150
|
const stuck = report.state === "partial" && report.progress.steps === 0 && !report.synced.some((one) => one.error);
|
|
150
151
|
const next = report.state === "partial" && !stuck && !report.synced.some((one) => one.error !== undefined)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.465.0",
|
|
4
4
|
"description": "The messenger-neutral half of a messaging CLI: domain model, message locators, rendering, name resolution, the SQLite seam, the command skeleton and shared read commands, the send guard, run records and the message store",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|