@wirecat/cli-base 0.109.0 → 0.110.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 +35 -0
- package/dist/dev/main.js +6 -1
- package/dist/standards/flags-knowledge.js +7 -0
- package/dist/standards/index.d.ts +1 -1
- package/dist/standards/index.js +1 -1
- package/dist/standards/output.d.ts +50 -0
- package/dist/standards/output.js +10 -0
- package/dist/standards/vocabulary.js +4 -0
- package/docs/standards/ci.md +8 -6
- package/docs/standards/output.md +5 -2
- package/docs/standards/testing.md +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,41 @@ Versions before 0.8.0 are in the [git tags](https://github.com/WireCatLabs/cli-b
|
|
|
8
8
|
Every entry says what changed as a caller sees it, why, and what to watch for — the rules are
|
|
9
9
|
[`docs/dev/CONVENTIONS.md`](docs/dev/CONVENTIONS.md#the-changelog).
|
|
10
10
|
|
|
11
|
+
## 0.110.0 — 17.11.2026
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **`node-ci.yml` warns about each test over 3 s** ([WC-TEST-20](docs/standards/testing.md#wc-test-20--one-test-time-limit-of-15-s-and-each-test-runs-within-3-s)).
|
|
16
|
+
The test run also writes Vitest's JSON report to `coverage/tests.json`, and a `slow tests` step runs
|
|
17
|
+
`cli-dev slow-tests` on it: the slowest tests and files in the log, and a warning annotation for each test over 3 s.
|
|
18
|
+
It never fails the job. With `test-shards` it runs in the `coverage` job on the merged report, so every shard's
|
|
19
|
+
tests count. A run with no report or no `cli-dev` gets a notice instead. A caller gets it by moving its
|
|
20
|
+
`uses: …/node-ci.yml@<sha>` pin; the 3 s warning needs `@wirecat/cli-base` 0.107.0 or later in its lockfile, and an
|
|
21
|
+
older one prints only the slowest tests. No `vitest.config.ts` changes.
|
|
22
|
+
- **The vocabulary has `upload`, `publish`, `unpublish` and `stale`, and the flag `--tab <id>`.** drive-cli and
|
|
23
|
+
notion-cli kept `files upload` as an override and cli-core's shared `memories stale` and `memories extract --tab` in
|
|
24
|
+
a baseline; yandex-disk-cli needs the same words and `files publish` / `files unpublish` for a public link. A new
|
|
25
|
+
documents CLI now passes `cli-dev lint` without either.
|
|
26
|
+
`cli-dev lint` fails on a baseline or override entry the vocabulary now covers: at their next bump, drive-cli drops
|
|
27
|
+
`files upload`, `memories stale` and `memories extract --tab` from `lint/baseline/`, and notion-cli drops
|
|
28
|
+
`memories stale`, `memories extract --tab` and its `files upload` override.
|
|
29
|
+
- **`meta.query`: what a search made of its query before it searched.** An optional, typed block of the answer
|
|
30
|
+
envelope's `meta`: `{ chat?: { word, chat_id, title }, respelled?: [{ word, tried }] }`. `chat` says a word of the
|
|
31
|
+
query named one chat and the search ran in it; `respelled` lists each unknown word and the known spellings tried in
|
|
32
|
+
its place. A program or an MCP client reads the decision instead of parsing the note. `meta` stays strict: any other
|
|
33
|
+
key is still refused. See
|
|
34
|
+
[WC-OUT-7](docs/standards/output.md#wc-out-7--put-the-facts-about-the-run-in-meta).
|
|
35
|
+
|
|
36
|
+
### Changed — may break callers
|
|
37
|
+
|
|
38
|
+
- **`node-ci.yml` names the test reporters on the command line**: `default`, `github-actions` and `json`, in the
|
|
39
|
+
unsharded test run and in the shard merge. That is Vitest's own default in CI plus the JSON report, but it replaces
|
|
40
|
+
any `reporters` a caller sets in `vitest.config.ts`; none sets one today.
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- **`cli-dev slow-tests` with no report names the file and how to write it**, and exits 1, instead of a stack trace.
|
|
45
|
+
|
|
11
46
|
## 0.109.0 — 16.11.2026
|
|
12
47
|
|
|
13
48
|
### Added
|
package/dist/dev/main.js
CHANGED
|
@@ -37,7 +37,8 @@ import { binNameWarnings, describeWarnings, hostsWarnings, WCAT_RULES } from "./
|
|
|
37
37
|
const USAGE = `usage: cli-dev <command> [options]
|
|
38
38
|
|
|
39
39
|
slow-tests [report] [count] the slowest tests and files (report: coverage/tests.json, count: 20);
|
|
40
|
-
warns on stderr about each test over 3 s, and still exits 0
|
|
40
|
+
warns on stderr about each test over 3 s, and still exits 0;
|
|
41
|
+
exits 1 when the report is missing
|
|
41
42
|
next-version <wanted> <latest> <versions-json>
|
|
42
43
|
the version bin/release publishes, given npm's answers
|
|
43
44
|
version [--sync] [--file <path>] package.json's version against src/version.ts
|
|
@@ -916,6 +917,10 @@ export const main = async (argv, io) => {
|
|
|
916
917
|
switch (command) {
|
|
917
918
|
case "slow-tests": {
|
|
918
919
|
const [file = "coverage/tests.json", count = "20"] = args;
|
|
920
|
+
if (!existsSync(join(io.cwd, file))) {
|
|
921
|
+
io.err(`no test report at ${file}: run vitest with --reporter=json --outputFile.json=${file} first`);
|
|
922
|
+
return 1;
|
|
923
|
+
}
|
|
919
924
|
const parsed = JSON.parse(readFileSync(join(io.cwd, file), "utf8"));
|
|
920
925
|
const { out, warning } = slowTests(parsed, io.cwd, Number(count));
|
|
921
926
|
io.out(out);
|
|
@@ -34,6 +34,13 @@ export const KNOWLEDGE_FLAGS = [
|
|
|
34
34
|
meaning: "at most this many characters read",
|
|
35
35
|
unit: "characters",
|
|
36
36
|
},
|
|
37
|
+
{
|
|
38
|
+
name: "--tab",
|
|
39
|
+
value: "<id>",
|
|
40
|
+
role: "target",
|
|
41
|
+
type: "id",
|
|
42
|
+
meaning: "one tab of a document, by its id: only its text is read",
|
|
43
|
+
},
|
|
37
44
|
{
|
|
38
45
|
name: "--tag",
|
|
39
46
|
value: "<name>",
|
|
@@ -2,6 +2,6 @@ export { EFFECT_LEVELS, type EffectLevel, type Effects, effectsSchema, writes }
|
|
|
2
2
|
export { BASE_REASONS, COMMON_DETAILS, CRASH_CODE, CRASH_REASON, defineReasons, type ErrorObject, type ErrorReason, errorObjectSchema, } from "./errors.js";
|
|
3
3
|
export { defineLogEvents, isContentKey, LOG_ATTRIBUTE_KEYS, LOG_EVENTS, LOG_SEVERITIES, type LogEvent, type LogRecord, type LogSeverity, logAttributesJsonSchema, logEventProblems, logRecordSchema, traceIdOf, } from "./log.js";
|
|
4
4
|
export { takenMinutes } from "./monthly.js";
|
|
5
|
-
export { COMPACT_FLAG, clockMeta, type Issue, type ItemEnvelope, isoTime, issueSchema, itemEnvelopeSchema, jsonlEndSchema, jsonlItemSchema, jsonlOf, type ListEnvelope, type ListResult, listEnvelopeSchema, localTime, MAX_NEXT_STEPS, type Meta, type Missing, metaSchema, missingSchema, type NextStep, nextStepSchema, type Page, pageSchema, type Ranking, rankingSchema, reference, type Total, totalSchema, } from "./output.js";
|
|
5
|
+
export { COMPACT_FLAG, clockMeta, type Issue, type ItemEnvelope, isoTime, issueSchema, itemEnvelopeSchema, jsonlEndSchema, jsonlItemSchema, jsonlOf, type ListEnvelope, type ListResult, listEnvelopeSchema, localTime, MAX_NEXT_STEPS, type Meta, type Missing, metaSchema, missingSchema, type NextStep, nextStepSchema, type Page, pageSchema, type Query, querySchema, type Ranking, rankingSchema, reference, type Total, totalSchema, } from "./output.js";
|
|
6
6
|
export { fill, jsonSchemaOf, RegistryError } from "./registry.js";
|
|
7
7
|
export { defineSteps, SAME_COMMAND, STEPS, type StepDefinition, type StepInput, type StepTarget, stepOf, } from "./steps.js";
|
package/dist/standards/index.js
CHANGED
|
@@ -2,6 +2,6 @@ export { EFFECT_LEVELS, effectsSchema, writes } from "./effects.js";
|
|
|
2
2
|
export { BASE_REASONS, COMMON_DETAILS, CRASH_CODE, CRASH_REASON, defineReasons, errorObjectSchema, } from "./errors.js";
|
|
3
3
|
export { defineLogEvents, isContentKey, LOG_ATTRIBUTE_KEYS, LOG_EVENTS, LOG_SEVERITIES, logAttributesJsonSchema, logEventProblems, logRecordSchema, traceIdOf, } from "./log.js";
|
|
4
4
|
export { takenMinutes } from "./monthly.js";
|
|
5
|
-
export { COMPACT_FLAG, clockMeta, isoTime, issueSchema, itemEnvelopeSchema, jsonlEndSchema, jsonlItemSchema, jsonlOf, listEnvelopeSchema, localTime, MAX_NEXT_STEPS, metaSchema, missingSchema, nextStepSchema, pageSchema, rankingSchema, reference, totalSchema, } from "./output.js";
|
|
5
|
+
export { COMPACT_FLAG, clockMeta, isoTime, issueSchema, itemEnvelopeSchema, jsonlEndSchema, jsonlItemSchema, jsonlOf, listEnvelopeSchema, localTime, MAX_NEXT_STEPS, metaSchema, missingSchema, nextStepSchema, pageSchema, querySchema, rankingSchema, reference, totalSchema, } from "./output.js";
|
|
6
6
|
export { fill, jsonSchemaOf, RegistryError } from "./registry.js";
|
|
7
7
|
export { defineSteps, SAME_COMMAND, STEPS, stepOf, } from "./steps.js";
|
|
@@ -104,6 +104,22 @@ export declare const rankingSchema: v.StrictObjectSchema<{
|
|
|
104
104
|
}, undefined>, undefined>;
|
|
105
105
|
readonly ms: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
106
106
|
}, undefined>;
|
|
107
|
+
/**
|
|
108
|
+
* What a search made of its query before it searched: `chat` when a word of it named one chat and the search ran
|
|
109
|
+
* there, `respelled` for each unknown word and the known spellings tried in its place. A program reads it instead of
|
|
110
|
+
* parsing the note.
|
|
111
|
+
*/
|
|
112
|
+
export declare const querySchema: v.StrictObjectSchema<{
|
|
113
|
+
readonly chat: v.OptionalSchema<v.StrictObjectSchema<{
|
|
114
|
+
readonly word: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
115
|
+
readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
116
|
+
readonly title: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>, undefined>;
|
|
117
|
+
}, undefined>, undefined>;
|
|
118
|
+
readonly respelled: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
119
|
+
readonly word: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
120
|
+
readonly tried: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
|
|
121
|
+
}, undefined>, undefined>, undefined>;
|
|
122
|
+
}, undefined>;
|
|
107
123
|
export declare const metaSchema: v.StrictObjectSchema<{
|
|
108
124
|
readonly run_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
109
125
|
readonly duration_ms: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
@@ -138,6 +154,17 @@ export declare const metaSchema: v.StrictObjectSchema<{
|
|
|
138
154
|
}, undefined>, undefined>;
|
|
139
155
|
readonly ms: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
140
156
|
}, undefined>, undefined>;
|
|
157
|
+
readonly query: v.OptionalSchema<v.StrictObjectSchema<{
|
|
158
|
+
readonly chat: v.OptionalSchema<v.StrictObjectSchema<{
|
|
159
|
+
readonly word: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
160
|
+
readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
161
|
+
readonly title: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>, undefined>;
|
|
162
|
+
}, undefined>, undefined>;
|
|
163
|
+
readonly respelled: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
164
|
+
readonly word: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
165
|
+
readonly tried: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
|
|
166
|
+
}, undefined>, undefined>, undefined>;
|
|
167
|
+
}, undefined>, undefined>;
|
|
141
168
|
}, undefined>;
|
|
142
169
|
/**
|
|
143
170
|
* `meta.now`, `meta.now_local` and `meta.timezone` for an answer an agent plans by (WC-TIME-7): the moment in UTC, the
|
|
@@ -244,6 +271,17 @@ export declare const listEnvelopeSchema: <T extends v.GenericSchema>(item: T) =>
|
|
|
244
271
|
}, undefined>, undefined>;
|
|
245
272
|
readonly ms: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
246
273
|
}, undefined>, undefined>;
|
|
274
|
+
readonly query: v.OptionalSchema<v.StrictObjectSchema<{
|
|
275
|
+
readonly chat: v.OptionalSchema<v.StrictObjectSchema<{
|
|
276
|
+
readonly word: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
277
|
+
readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
278
|
+
readonly title: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>, undefined>;
|
|
279
|
+
}, undefined>, undefined>;
|
|
280
|
+
readonly respelled: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
281
|
+
readonly word: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
282
|
+
readonly tried: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
|
|
283
|
+
}, undefined>, undefined>, undefined>;
|
|
284
|
+
}, undefined>, undefined>;
|
|
247
285
|
}, undefined>;
|
|
248
286
|
}, undefined>;
|
|
249
287
|
export declare const itemEnvelopeSchema: <T extends v.GenericSchema>(item: T) => v.StrictObjectSchema<{
|
|
@@ -323,6 +361,17 @@ export declare const itemEnvelopeSchema: <T extends v.GenericSchema>(item: T) =>
|
|
|
323
361
|
}, undefined>, undefined>;
|
|
324
362
|
readonly ms: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
325
363
|
}, undefined>, undefined>;
|
|
364
|
+
readonly query: v.OptionalSchema<v.StrictObjectSchema<{
|
|
365
|
+
readonly chat: v.OptionalSchema<v.StrictObjectSchema<{
|
|
366
|
+
readonly word: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
367
|
+
readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
368
|
+
readonly title: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>, undefined>;
|
|
369
|
+
}, undefined>, undefined>;
|
|
370
|
+
readonly respelled: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
371
|
+
readonly word: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
372
|
+
readonly tried: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
|
|
373
|
+
}, undefined>, undefined>, undefined>;
|
|
374
|
+
}, undefined>, undefined>;
|
|
326
375
|
}, undefined>;
|
|
327
376
|
}, undefined>;
|
|
328
377
|
export type NextStep = v.InferOutput<typeof nextStepSchema>;
|
|
@@ -331,6 +380,7 @@ export type Page = v.InferOutput<typeof pageSchema>;
|
|
|
331
380
|
export type Issue = v.InferOutput<typeof issueSchema>;
|
|
332
381
|
export type Meta = v.InferOutput<typeof metaSchema>;
|
|
333
382
|
export type Ranking = v.InferOutput<typeof rankingSchema>;
|
|
383
|
+
export type Query = v.InferOutput<typeof querySchema>;
|
|
334
384
|
export interface ListEnvelope<T> {
|
|
335
385
|
items: T[];
|
|
336
386
|
page: Page;
|
package/dist/standards/output.js
CHANGED
|
@@ -95,6 +95,15 @@ export const rankingSchema = v.strictObject({
|
|
|
95
95
|
})),
|
|
96
96
|
ms: v.pipe(v.number(), v.integer(), v.minValue(0)),
|
|
97
97
|
});
|
|
98
|
+
/**
|
|
99
|
+
* What a search made of its query before it searched: `chat` when a word of it named one chat and the search ran
|
|
100
|
+
* there, `respelled` for each unknown word and the known spellings tried in its place. A program reads it instead of
|
|
101
|
+
* parsing the note.
|
|
102
|
+
*/
|
|
103
|
+
export const querySchema = v.strictObject({
|
|
104
|
+
chat: v.optional(v.strictObject({ word: text, chat_id: text, title: v.nullable(text) })),
|
|
105
|
+
respelled: v.optional(v.array(v.strictObject({ word: text, tried: v.pipe(v.array(text), v.minLength(1)) }))),
|
|
106
|
+
});
|
|
98
107
|
export const metaSchema = v.strictObject({
|
|
99
108
|
run_id: text,
|
|
100
109
|
duration_ms: v.pipe(v.number(), v.integer(), v.minValue(0)),
|
|
@@ -108,6 +117,7 @@ export const metaSchema = v.strictObject({
|
|
|
108
117
|
now_local: v.optional(localTime),
|
|
109
118
|
window: v.optional(v.strictObject({ since: v.optional(isoTime), until: v.optional(isoTime) })),
|
|
110
119
|
ranking: v.optional(rankingSchema),
|
|
120
|
+
query: v.optional(querySchema),
|
|
111
121
|
});
|
|
112
122
|
const offsetOf = (at, zone) => {
|
|
113
123
|
const name = new Intl.DateTimeFormat("en-US", { timeZone: zone, timeZoneName: "longOffset" })
|
|
@@ -143,6 +143,10 @@ const verbs = [
|
|
|
143
143
|
["export", "write from the store to a file"],
|
|
144
144
|
["import", "bring a file or list the user gives into the store or the messenger, once"],
|
|
145
145
|
["download", "save a file from the source to this machine"],
|
|
146
|
+
["upload", "put a file from this machine on the source"],
|
|
147
|
+
["publish", "open a thing to anyone who has its public link"],
|
|
148
|
+
["unpublish", "close a thing's public link"],
|
|
149
|
+
["stale", "mark a saved memory as out of date, keeping it"],
|
|
146
150
|
["transcribe", "turn speech into text"],
|
|
147
151
|
["extract", "read the text inside files already on this machine into the store"],
|
|
148
152
|
["migrate", "bring a file up to this build's schema"],
|
package/docs/standards/ci.md
CHANGED
|
@@ -117,12 +117,14 @@ plus community itself. cli-template follows every rule here as a CLI does
|
|
|
117
117
|
catches that merge skew the same hour, not at the next release.
|
|
118
118
|
- **Enforced by:** `main.yml:validation` · `node-ci.yml:check` · `node-ci.yml:bun` · `node-ci.yml:secrets`.
|
|
119
119
|
- **Example:** `main.yml` calls the repository's own `ci.yml`, which calls cli-base `node-ci.yml`. That runs
|
|
120
|
-
`pnpm lint`, `pnpm typecheck`, `pnpm test:coverage` and `pnpm build
|
|
121
|
-
|
|
122
|
-
`
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
`pnpm lint`, `pnpm typecheck`, `pnpm test:coverage` and `pnpm build`, then warns about each test over 3 s from that
|
|
121
|
+
run's JSON report ([WC-TEST-20](testing.md#wc-test-20--one-test-time-limit-of-15-s-and-each-test-runs-within-3-s)).
|
|
122
|
+
With `cli: true` it then runs one named step per CLI script: `contracts:check`, `contracts:upgrade`,
|
|
123
|
+
`security:no-leak`, `version:check`, `generate:check`, `test:matrix:check`, `docs:check`, `package:check`,
|
|
124
|
+
`lint:commands`, and `parity:check` with `parity: true`. Then the project's `checks` lines, a Bun job, and a
|
|
125
|
+
gitleaks scan of the whole history. The shared workflow owns the CLI steps: the repository's `ci.yml` names a step
|
|
126
|
+
it cannot run yet in `skip`, with the reason beside it, and puts only its extra checks in `checks` (tg and max:
|
|
127
|
+
`pnpm check:agent-docs`).
|
|
126
128
|
- **Exceptions:** platform suites (Windows, macOS, install checks) are skipped here and run at release, monthly or on
|
|
127
129
|
request. Nothing in this run publishes or tags. cli-docs runs its full validation before each deployment and monthly
|
|
128
130
|
instead; community has no build to validate.
|
package/docs/standards/output.md
CHANGED
|
@@ -82,7 +82,7 @@ JSON Schema 2020-12.
|
|
|
82
82
|
|
|
83
83
|
- **Why:** `run_id` finds the run later, and `complete` says whether the answer can be trusted as whole.
|
|
84
84
|
- **Enforced by:** review only.
|
|
85
|
-
- **Example:** `{ run_id, duration_ms, accounts?, complete, issues?, truncated?, timezone?, window?, ranking? }`.
|
|
85
|
+
- **Example:** `{ run_id, duration_ms, accounts?, complete, issues?, truncated?, timezone?, window?, ranking?, query? }`.
|
|
86
86
|
`timezone`
|
|
87
87
|
names the zone a time without one was read or shown in, and `window` the UTC bounds a date filter used
|
|
88
88
|
([Time](time.md)). `complete: false` with
|
|
@@ -90,7 +90,10 @@ JSON Schema 2020-12.
|
|
|
90
90
|
answer. Neither one means another page exists: that is `page.has_more`. `ranking` says what a hosted model did to
|
|
91
91
|
the order of a search's hits: `{ applied, reason_id?, provider, model, endpoint, sent, cost_usd, usage?, ms }`, with
|
|
92
92
|
`reason_id` (such as `harder.timeout`) when its order was not used and `cost_usd: null` for a model with no known
|
|
93
|
-
price.
|
|
93
|
+
price. `query` says what a search made of its query before it searched: `{ chat?, respelled? }`, with
|
|
94
|
+
`chat: { word, chat_id, title }` when a word named one chat and the search ran there, and
|
|
95
|
+
`respelled: [{ word, tried }]` for each unknown word and the known spellings tried in its place. A program reads
|
|
96
|
+
these instead of parsing a sentence.
|
|
94
97
|
- **Exceptions:** none.
|
|
95
98
|
- **Applies to:** all CLIs. **Since:** cli-base 0.41.0. **Rulings:** none.
|
|
96
99
|
|
|
@@ -274,13 +274,14 @@ a captured answer, beside it or in the table it comes from.
|
|
|
274
274
|
Every repository sets `testTimeout: 15_000` in `vitest.config.ts`. A test that builds big data, such as a thousand
|
|
275
275
|
meetings or a long conversation, sizes it so the test runs within 3 s on a developer machine: a fifth of the limit,
|
|
276
276
|
because a slow CI runner takes up to five times as long. `pnpm test:slow` warns about each test over 3 s, so it is
|
|
277
|
-
shrunk before a release runner fails it.
|
|
277
|
+
shrunk before a release runner fails it. cli-base's `node-ci.yml` shows the same warning on every run, from the
|
|
278
|
+
merged report when the tests run in shards, and never fails the job.
|
|
278
279
|
|
|
279
280
|
- **Why:** twice a release failed on a slow GitHub runner with no real wait involved, only CPU work: cli-core's test
|
|
280
281
|
of 1200 meetings, and zoom-cli's `src/answer-entities.test.ts` at 6.9 s against vitest's default 5 s. Each
|
|
281
282
|
repository had its own limit (15 s in cli-core and tg-cli, 5 s in zoom-cli, gcal-cli and max-cli), so the same
|
|
282
283
|
test passed in one and failed in another.
|
|
283
|
-
- **Enforced by:** `pnpm test:slow`.
|
|
284
|
+
- **Enforced by:** `pnpm test:slow` · `node-ci.yml:check` · `node-ci.yml:coverage`.
|
|
284
285
|
- **Example:** `vitest.config.ts` has `test: { testTimeout: 15_000 }`. A test that checks paging over many meetings
|
|
285
286
|
builds as many as it needs to cross two pages, not 1200. `pnpm test:slow` ends with
|
|
286
287
|
`warning: 1 test takes over 3 s, …` and the test's line on stderr; it still exits 0.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-base",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.110.0",
|
|
4
4
|
"description": "The parts every command line tool needs: output modes, terminal rendering, error model, exit codes, credentials, clocks",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|