@wirecat/cli-base 0.131.0 → 1.0.0-rc.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 +93 -0
- package/README.md +7 -1
- package/dist/batch.d.ts +1 -0
- package/dist/batch.js +1 -0
- package/dist/codegen/graphql-fake.d.ts +1 -1
- package/dist/codegen/graphql-fake.js +1 -1
- package/dist/codegen/graphql.d.ts +1 -12
- package/dist/codegen/graphql.js +0 -44
- package/dist/codegen/index.d.ts +4 -3
- package/dist/codegen/index.js +2 -1
- package/dist/codegen/model.d.ts +4 -1
- package/dist/codegen/pipeline.d.ts +5 -5
- package/dist/codegen/runtime.d.ts +9 -2
- package/dist/codegen/runtime.js +7 -1
- package/dist/codegen/selection.d.ts +13 -0
- package/dist/codegen/selection.js +44 -0
- package/dist/codegen/wp-json.d.ts +2 -2
- package/dist/commands/document.d.ts +3 -0
- package/dist/commands/document.js +3 -0
- package/dist/commands/page.d.ts +14 -2
- package/dist/commands/page.js +3 -0
- package/dist/completion/index.d.ts +5 -1
- package/dist/completion/index.js +5 -1
- package/dist/credentials.d.ts +2 -0
- package/dist/credentials.js +2 -0
- package/dist/dev/api-report.d.ts +24 -0
- package/dist/dev/api-report.js +345 -0
- package/dist/dev/main.js +9 -19
- package/dist/dev/next-version.d.ts +5 -1
- package/dist/dev/next-version.js +30 -2
- package/dist/dev/result-shape.d.ts +4 -0
- package/dist/dev/result-shape.js +4 -4
- package/dist/dev/wcat-lint.d.ts +4 -1
- package/dist/dev/wcat-lint.js +9 -2
- package/dist/executable.d.ts +2 -0
- package/dist/executable.js +2 -0
- package/dist/http/fetch.d.ts +1 -0
- package/dist/http/fetch.js +1 -0
- package/dist/http/hosts.d.ts +11 -2
- package/dist/http/hosts.js +11 -2
- package/dist/http/index.d.ts +10 -2
- package/dist/http/index.js +10 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/logging.d.ts +3 -0
- package/dist/logging.js +3 -0
- package/dist/mcp/index.d.ts +17 -3
- package/dist/mcp/index.js +12 -2
- package/dist/output-buffer.d.ts +3 -0
- package/dist/output-buffer.js +1 -0
- package/dist/query/dates.d.ts +6 -1
- package/dist/query/dates.js +6 -1
- package/dist/query/help.d.ts +1 -0
- package/dist/query/help.js +1 -0
- package/dist/query/registry.d.ts +6 -1
- package/dist/query/registry.js +6 -1
- package/dist/query/types.d.ts +1 -0
- package/dist/query/types.js +1 -0
- package/dist/release/fold.d.ts +5 -0
- package/dist/release/fold.js +10 -1
- package/dist/release/fragments.d.ts +5 -2
- package/dist/release/fragments.js +18 -15
- package/dist/release/level.js +17 -11
- package/dist/skill/index.d.ts +34 -5
- package/dist/skill/index.js +21 -3
- package/dist/standards/audit.d.ts +15 -1
- package/dist/standards/audit.js +12 -1
- package/dist/standards/effects.d.ts +2 -0
- package/dist/standards/effects.js +1 -0
- package/dist/standards/errors.d.ts +2 -0
- package/dist/standards/errors.js +2 -0
- package/dist/standards/fields.d.ts +3 -0
- package/dist/standards/fields.js +2 -0
- package/dist/standards/flags-what.js +1 -3
- package/dist/standards/flags-work.d.ts +3 -0
- package/dist/standards/flags-work.js +25 -0
- package/dist/standards/identifiers.d.ts +7 -1
- package/dist/standards/identifiers.js +6 -1
- package/dist/standards/lint.d.ts +48 -8
- package/dist/standards/lint.js +45 -8
- package/dist/standards/log.d.ts +15 -3
- package/dist/standards/log.js +15 -3
- package/dist/standards/monthly.d.ts +2 -0
- package/dist/standards/monthly.js +2 -0
- package/dist/standards/output.d.ts +8 -1
- package/dist/standards/output.js +7 -1
- package/dist/standards/registry.d.ts +6 -1
- package/dist/standards/registry.js +6 -1
- package/dist/standards/steps.d.ts +5 -1
- package/dist/standards/steps.js +5 -1
- package/dist/standards/vocabulary.d.ts +5 -1
- package/dist/standards/vocabulary.js +8 -2
- package/dist/testing/index.d.ts +1 -2
- package/dist/testing/index.js +1 -2
- package/dist/update/index.d.ts +25 -4
- package/dist/update/index.js +24 -4
- package/dist/wcat/manifest.d.ts +11 -1
- package/dist/wcat/manifest.js +10 -1
- package/docs/standards/commands.md +5 -4
- package/docs/standards/docs.md +5 -2
- package/docs/standards/releases.md +37 -9
- package/docs/standards/toolchain.md +1 -1
- package/package.json +23 -5
package/dist/skill/index.js
CHANGED
|
@@ -21,7 +21,11 @@ const homeOf = (env) => {
|
|
|
21
21
|
refuseOwnerHomeInTests(env);
|
|
22
22
|
return env.HOME || env.USERPROFILE || homedir();
|
|
23
23
|
};
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* `~/.claude/skills` is Claude Code's; `~/.agents/skills` is read by Codex, Gemini CLI and OpenClaw.
|
|
26
|
+
*
|
|
27
|
+
* @experimental
|
|
28
|
+
*/
|
|
25
29
|
export const skillPath = (target, appName, env) => join(homeOf(env), target === "claude" ? ".claude" : ".agents", "skills", appName, "SKILL.md");
|
|
26
30
|
const FRONTMATTER = /^---(\r?\n)([\s\S]*?\r?\n)?---(\r?\n|$)/;
|
|
27
31
|
const scalar = (key, indent) => new RegExp(`^${indent}${key}:[ \\t]*["']?([^"'\\r\\n]*?)["']?[ \\t]*\\r?\\n?$`);
|
|
@@ -54,7 +58,11 @@ const skillName = (content) => {
|
|
|
54
58
|
const line = frontmatterLines(content).find((line) => scalar("name", "").test(line));
|
|
55
59
|
return line === undefined ? undefined : scalar("name", "").exec(line)?.[1];
|
|
56
60
|
};
|
|
57
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* Adds or replaces `metadata.version` as a string; every other byte stays as it was.
|
|
63
|
+
*
|
|
64
|
+
* @experimental
|
|
65
|
+
*/
|
|
58
66
|
export const withVersion = (content, version) => {
|
|
59
67
|
const match = FRONTMATTER.exec(content);
|
|
60
68
|
if (!match)
|
|
@@ -83,6 +91,8 @@ export const withVersion = (content, version) => {
|
|
|
83
91
|
* The files beside SKILL.md that it links to or names (`references/tasks.md`), as `/`-separated paths relative to its
|
|
84
92
|
* folder. A long skill keeps its core in SKILL.md and the rest in these, so an agent loads only what its task needs.
|
|
85
93
|
* Dotfiles and symbolic links are left out: a link could point anywhere on the machine.
|
|
94
|
+
*
|
|
95
|
+
* @experimental
|
|
86
96
|
*/
|
|
87
97
|
export const skillFiles = (skill) => {
|
|
88
98
|
const root = dirname(fileURLToPath(skill));
|
|
@@ -152,7 +162,11 @@ const runProgram = (file, args, env) => {
|
|
|
152
162
|
});
|
|
153
163
|
return { status: result.status, ...(result.error ? { error: result.error } : {}), stdout: result.stdout ?? "" };
|
|
154
164
|
};
|
|
155
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* `HERMES_HOME`, else the folder Hermes itself defaults to.
|
|
167
|
+
*
|
|
168
|
+
* @experimental
|
|
169
|
+
*/
|
|
156
170
|
export const hermesHome = (env, platform = process.platform) => {
|
|
157
171
|
refuseOwnerHomeInTests(env, platform);
|
|
158
172
|
const set = env.HERMES_HOME?.trim();
|
|
@@ -227,6 +241,8 @@ const readFolder = (folder, env, run) => {
|
|
|
227
241
|
* with Hermes's own `config set`, keeping every folder already listed. When Hermes is not on PATH, cannot be asked,
|
|
228
242
|
* or does not keep the folder, the skill is copied into `$HERMES_HOME/skills` instead — but only when that home exists:
|
|
229
243
|
* with neither the program nor its home, Hermes is not installed, and nothing is written.
|
|
244
|
+
*
|
|
245
|
+
* @experimental
|
|
230
246
|
*/
|
|
231
247
|
export const installHermesSkill = (app, skill, { env = process.env, run = runProgram } = {}) => {
|
|
232
248
|
if (!existsSync(hermesHome(env)) && run("hermes", ["--version"], env).error)
|
|
@@ -244,6 +260,8 @@ export const installHermesSkill = (app, skill, { env = process.env, run = runPro
|
|
|
244
260
|
* The copy Hermes reads: its own `skills/<app>` first, as Hermes scans it first, else the `~/.agents/skills` one when
|
|
245
261
|
* `skills.external_dirs` lists that folder. Asks Hermes through `config get` when its home exists, so a host calls it
|
|
246
262
|
* only when asked.
|
|
263
|
+
*
|
|
264
|
+
* @experimental
|
|
247
265
|
*/
|
|
248
266
|
export const hermesSkillStatus = (app, { env = process.env, run = runProgram } = {}) => {
|
|
249
267
|
const own = copyStatus(app, hermesCopyPath(app.appName, env));
|
|
@@ -2,6 +2,8 @@ import * as v from "valibot";
|
|
|
2
2
|
/**
|
|
3
3
|
* Whether a new cross-CLI divergence fails `cli-dev audit`, as a new lint violation does (`"new"`), or only shows in
|
|
4
4
|
* the scorecard (`"never"`). Lint rules always block on a new violation.
|
|
5
|
+
*
|
|
6
|
+
* @experimental
|
|
5
7
|
*/
|
|
6
8
|
export declare const AUDIT_BLOCKS: "new" | "never";
|
|
7
9
|
declare const auditRuleSchema: v.StrictObjectSchema<{
|
|
@@ -9,9 +11,15 @@ declare const auditRuleSchema: v.StrictObjectSchema<{
|
|
|
9
11
|
readonly severity: v.PicklistSchema<readonly ["high", "medium", "low"], undefined>;
|
|
10
12
|
readonly summary: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
11
13
|
}, undefined>;
|
|
14
|
+
/** @experimental */
|
|
12
15
|
export type AuditRule = v.InferOutput<typeof auditRuleSchema>;
|
|
16
|
+
/** @experimental */
|
|
13
17
|
export declare const defineAuditRules: (input: unknown) => AuditRule[];
|
|
14
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* The rules that compare CLIs; each CLI is also judged alone by every lint rule.
|
|
20
|
+
*
|
|
21
|
+
* @experimental
|
|
22
|
+
*/
|
|
15
23
|
export declare const AUDIT_RULES: AuditRule[];
|
|
16
24
|
declare const parityGroupSchema: v.StrictObjectSchema<{
|
|
17
25
|
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a lower-case word, words joined by -">]>;
|
|
@@ -39,8 +47,11 @@ declare const parityGroupSchema: v.StrictObjectSchema<{
|
|
|
39
47
|
readonly review_after: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoDateAction<string, "a date, YYYY-MM-DD">]>, undefined>;
|
|
40
48
|
}, undefined>, undefined>;
|
|
41
49
|
}, undefined>;
|
|
50
|
+
/** @experimental */
|
|
42
51
|
export type ParityGroup = v.InferOutput<typeof parityGroupSchema>;
|
|
52
|
+
/** @experimental */
|
|
43
53
|
export declare const defineParityGroups: (input: unknown) => ParityGroup[];
|
|
54
|
+
/** @experimental */
|
|
44
55
|
export declare const PARITY_GROUPS: ParityGroup[];
|
|
45
56
|
/**
|
|
46
57
|
* The declared entity and reason differences: they name no CLI list, so they hold in any group, and an audit by a CLI's
|
|
@@ -60,7 +71,10 @@ declare const requiredRootSchema: v.StrictObjectSchema<{
|
|
|
60
71
|
readonly path: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a command word">]>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
|
|
61
72
|
readonly meaning: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
62
73
|
}, undefined>;
|
|
74
|
+
/** @experimental */
|
|
63
75
|
export type RequiredRoot = v.InferOutput<typeof requiredRootSchema>;
|
|
76
|
+
/** @experimental */
|
|
64
77
|
export declare const defineRequiredRoots: (input: unknown) => RequiredRoot[];
|
|
78
|
+
/** @experimental */
|
|
65
79
|
export declare const REQUIRED_ROOTS: RequiredRoot[];
|
|
66
80
|
export {};
|
package/dist/standards/audit.js
CHANGED
|
@@ -4,11 +4,18 @@ import { duplicates, parseRegistry, text, word } from "./registry.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* Whether a new cross-CLI divergence fails `cli-dev audit`, as a new lint violation does (`"new"`), or only shows in
|
|
6
6
|
* the scorecard (`"never"`). Lint rules always block on a new violation.
|
|
7
|
+
*
|
|
8
|
+
* @experimental
|
|
7
9
|
*/
|
|
8
10
|
export const AUDIT_BLOCKS = "new";
|
|
9
11
|
const auditRuleSchema = v.strictObject({ id: word, severity: v.picklist(LINT_SEVERITIES), summary: text });
|
|
12
|
+
/** @experimental */
|
|
10
13
|
export const defineAuditRules = (input) => parseRegistry("audit rules", v.array(auditRuleSchema), input, (rules) => duplicates(rules.map((rule) => rule.id)).map((id) => `"${id}" is listed twice`));
|
|
11
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* The rules that compare CLIs; each CLI is also judged alone by every lint rule.
|
|
16
|
+
*
|
|
17
|
+
* @experimental
|
|
18
|
+
*/
|
|
12
19
|
export const AUDIT_RULES = defineAuditRules([
|
|
13
20
|
{
|
|
14
21
|
id: "shared-command-contract",
|
|
@@ -70,6 +77,7 @@ const parityGroupSchema = v.strictObject({
|
|
|
70
77
|
});
|
|
71
78
|
/** Which of `absent`, `only` and `differs` a difference names: the CLI it measures by name. */
|
|
72
79
|
const kindOf = (entry) => ["absent", "only", "differs"].filter((one) => entry[one] !== undefined);
|
|
80
|
+
/** @experimental */
|
|
73
81
|
export const defineParityGroups = (input) => parseRegistry("parity groups", v.array(parityGroupSchema), input, (groups) => [
|
|
74
82
|
...duplicates(groups.map((group) => group.name)).map((name) => `"${name}" is listed twice`),
|
|
75
83
|
...groups.flatMap((group) => [
|
|
@@ -137,6 +145,7 @@ const FAMILY_SINCE_0_98 = [
|
|
|
137
145
|
review_after: "2026-12-10",
|
|
138
146
|
},
|
|
139
147
|
];
|
|
148
|
+
/** @experimental */
|
|
140
149
|
export const PARITY_GROUPS = defineParityGroups([
|
|
141
150
|
{ name: "messengers", members: ["tg", "max"], covers: "tree", differences: MESSENGERS_SINCE_0_98 },
|
|
142
151
|
{
|
|
@@ -226,7 +235,9 @@ export const SHARED_DIFFERENCES = [
|
|
|
226
235
|
.map((entry) => [`${entry.rule} ${entry.target}`, entry])).values(),
|
|
227
236
|
];
|
|
228
237
|
const requiredRootSchema = v.strictObject({ path: v.pipe(v.array(segment), v.minLength(1)), meaning: text });
|
|
238
|
+
/** @experimental */
|
|
229
239
|
export const defineRequiredRoots = (input) => parseRegistry("required roots", v.array(requiredRootSchema), input, (roots) => duplicates(roots.map((root) => root.path.join(" "))).map((path) => `"${path}" is listed twice`));
|
|
240
|
+
/** @experimental */
|
|
230
241
|
export const REQUIRED_ROOTS = defineRequiredRoots([
|
|
231
242
|
{ path: ["commands"], meaning: "the command tree as JSON, what agents and this audit read" },
|
|
232
243
|
{ path: ["doctor"], meaning: "checks this machine and the profile, and says what to fix" },
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
+
/** @experimental */
|
|
2
3
|
export declare const EFFECT_LEVELS: readonly ["none", "read", "write"];
|
|
3
4
|
/** What running a command touches: the service it talks to, and this machine (files, the keyring, the store). */
|
|
4
5
|
export declare const effectsSchema: v.StrictObjectSchema<{
|
|
@@ -6,6 +7,7 @@ export declare const effectsSchema: v.StrictObjectSchema<{
|
|
|
6
7
|
readonly local: v.PicklistSchema<readonly ["none", "read", "write"], undefined>;
|
|
7
8
|
}, undefined>;
|
|
8
9
|
export type Effects = v.InferOutput<typeof effectsSchema>;
|
|
10
|
+
/** @experimental */
|
|
9
11
|
export type EffectLevel = (typeof EFFECT_LEVELS)[number];
|
|
10
12
|
/** Unknown effects count as a write: a command nobody described is never retried or run on its own. */
|
|
11
13
|
export declare const writes: (effects: Effects | undefined) => boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
+
/** @experimental */
|
|
2
3
|
export const EFFECT_LEVELS = ["none", "read", "write"];
|
|
3
4
|
/** What running a command touches: the service it talks to, and this machine (files, the keyring, the store). */
|
|
4
5
|
export const effectsSchema = v.strictObject({
|
|
@@ -67,6 +67,8 @@ export declare const defineReasons: (input: unknown) => ErrorReason[];
|
|
|
67
67
|
/**
|
|
68
68
|
* Keys any reason's `details` may carry; the handler drops every other key it was not told about. `retryable`,
|
|
69
69
|
* `retry_after_ms` and `sent` are read into `retry`, not repeated here.
|
|
70
|
+
*
|
|
71
|
+
* @experimental
|
|
70
72
|
*/
|
|
71
73
|
export declare const COMMON_DETAILS: readonly ["attempts", "status", "request_id", "operation", "operation_id"];
|
|
72
74
|
/** One reason per code, used when the code site named none, the crash, and the reasons cli-base raises itself. */
|
package/dist/standards/errors.js
CHANGED
|
@@ -45,6 +45,8 @@ export const defineReasons = (input) => parseRegistry("error reasons", v.array(r
|
|
|
45
45
|
/**
|
|
46
46
|
* Keys any reason's `details` may carry; the handler drops every other key it was not told about. `retryable`,
|
|
47
47
|
* `retry_after_ms` and `sent` are read into `retry`, not repeated here.
|
|
48
|
+
*
|
|
49
|
+
* @experimental
|
|
48
50
|
*/
|
|
49
51
|
export const COMMON_DETAILS = ["attempts", "status", "request_id", "operation", "operation_id"];
|
|
50
52
|
/** One reason per code, used when the code site named none, the crash, and the reasons cli-base raises itself. */
|
|
@@ -3,7 +3,10 @@ declare const fieldRuleSchema: v.StrictObjectSchema<{
|
|
|
3
3
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a lower-case word, words joined by -">]>;
|
|
4
4
|
readonly rule: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
5
5
|
}, undefined>;
|
|
6
|
+
/** @experimental */
|
|
6
7
|
export type FieldRule = v.InferOutput<typeof fieldRuleSchema>;
|
|
8
|
+
/** @experimental */
|
|
7
9
|
export declare const defineFieldRules: (input: unknown) => FieldRule[];
|
|
10
|
+
/** @experimental */
|
|
8
11
|
export declare const FIELD_RULES: FieldRule[];
|
|
9
12
|
export {};
|
package/dist/standards/fields.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
import { duplicates, parseRegistry, text, word } from "./registry.js";
|
|
3
3
|
const fieldRuleSchema = v.strictObject({ id: word, rule: text });
|
|
4
|
+
/** @experimental */
|
|
4
5
|
export const defineFieldRules = (input) => parseRegistry("output field rules", v.array(fieldRuleSchema), input, (rules) => duplicates(rules.map((rule) => rule.id)).map((id) => `"${id}" is listed twice`));
|
|
6
|
+
/** @experimental */
|
|
5
7
|
export const FIELD_RULES = defineFieldRules([
|
|
6
8
|
{ id: "envelope", rule: "every JSON answer is one object: a list `{items, page, …}`, one thing `{item, …}`" },
|
|
7
9
|
{ id: "time", rule: "a time is an ISO 8601 string in UTC, ending in `Z`, never epoch milliseconds" },
|
|
@@ -409,7 +409,7 @@ export const WHAT_FLAGS = [
|
|
|
409
409
|
type: "string",
|
|
410
410
|
meaning: "an organization: its id or organization:<id>",
|
|
411
411
|
},
|
|
412
|
-
{ name: "--parent", value: "<id>", role: "target", type: "id", meaning: "the folder or
|
|
412
|
+
{ name: "--parent", value: "<id>", role: "target", type: "id", meaning: "the folder, task or issue it sits under" },
|
|
413
413
|
{
|
|
414
414
|
name: "--participant-id",
|
|
415
415
|
value: "<id>",
|
|
@@ -687,7 +687,6 @@ export const WHAT_FLAGS = [
|
|
|
687
687
|
type: "choice",
|
|
688
688
|
meaning: "how it is closed: done, or dismissed when it needs no answer",
|
|
689
689
|
},
|
|
690
|
-
{ name: "--assignee", value: "<person...>", role: "value", type: "list", meaning: "who does it, by UID" },
|
|
691
690
|
{ name: "--at", value: "<hh:mm>", role: "value", type: "string", meaning: "every day at this local time" },
|
|
692
691
|
{ name: "--body", value: "<json>", role: "value", type: "string", meaning: "the request body, as JSON" },
|
|
693
692
|
{
|
|
@@ -845,7 +844,6 @@ export const WHAT_FLAGS = [
|
|
|
845
844
|
type: "id",
|
|
846
845
|
meaning: "pin this chat at the top of it; repeat it for more",
|
|
847
846
|
},
|
|
848
|
-
{ name: "--priority", value: "<n>", role: "value", type: "count", meaning: "0 urgent … 4 low" },
|
|
849
847
|
{ name: "--quiz", role: "value", type: "switch", meaning: "a quiz: one answer is right, and a vote is final" },
|
|
850
848
|
{
|
|
851
849
|
name: "--reason",
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Work items: memo's tasks, and a tracker's issues. */
|
|
2
|
+
export const WORK_FLAGS = [
|
|
3
|
+
{
|
|
4
|
+
name: "--assignee",
|
|
5
|
+
value: "<person...>",
|
|
6
|
+
role: "value",
|
|
7
|
+
type: "list",
|
|
8
|
+
otherValues: ["user"],
|
|
9
|
+
meaning: "who does it: people by UID (<person...>), or one tracker user by id, name or e-mail (<user>)",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
name: "--priority",
|
|
13
|
+
value: "<n>",
|
|
14
|
+
role: "value",
|
|
15
|
+
type: "string",
|
|
16
|
+
meaning: "how urgent: low, medium, high, critical or none, a score from 0.0 to 1.0, or the old 0 urgent … 4 low",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "--team",
|
|
20
|
+
value: "<team>",
|
|
21
|
+
role: "value",
|
|
22
|
+
type: "string",
|
|
23
|
+
meaning: "the tracker team that owns an issue, by id, key or name",
|
|
24
|
+
},
|
|
25
|
+
];
|
|
@@ -4,8 +4,14 @@ declare const identifierSchema: v.StrictObjectSchema<{
|
|
|
4
4
|
readonly meaning: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
5
5
|
readonly replaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a snake_case key">]>, undefined>, undefined>;
|
|
6
6
|
}, undefined>;
|
|
7
|
+
/** @experimental */
|
|
7
8
|
export type Identifier = v.InferOutput<typeof identifierSchema>;
|
|
9
|
+
/** @experimental */
|
|
8
10
|
export declare const defineIdentifiers: (input: unknown) => Identifier[];
|
|
9
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* The ids a CLI's answers, errors and logs carry; one name each.
|
|
13
|
+
*
|
|
14
|
+
* @experimental
|
|
15
|
+
*/
|
|
10
16
|
export declare const IDENTIFIERS: Identifier[];
|
|
11
17
|
export {};
|
|
@@ -2,6 +2,7 @@ import * as v from "valibot";
|
|
|
2
2
|
import { duplicates, parseRegistry, SNAKE_CASE, text } from "./registry.js";
|
|
3
3
|
const key = v.pipe(v.string(), v.regex(SNAKE_CASE, "a snake_case key"));
|
|
4
4
|
const identifierSchema = v.strictObject({ key, meaning: text, replaces: v.optional(v.array(key)) });
|
|
5
|
+
/** @experimental */
|
|
5
6
|
export const defineIdentifiers = (input) => parseRegistry("identifiers", v.array(identifierSchema), input, (identifiers) => {
|
|
6
7
|
const keys = identifiers.map((entry) => entry.key);
|
|
7
8
|
const replaced = identifiers.flatMap((entry) => entry.replaces ?? []);
|
|
@@ -10,7 +11,11 @@ export const defineIdentifiers = (input) => parseRegistry("identifiers", v.array
|
|
|
10
11
|
...replaced.filter((name) => keys.includes(name)).map((name) => `"${name}" is both a key and replaced`),
|
|
11
12
|
];
|
|
12
13
|
});
|
|
13
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* The ids a CLI's answers, errors and logs carry; one name each.
|
|
16
|
+
*
|
|
17
|
+
* @experimental
|
|
18
|
+
*/
|
|
14
19
|
export const IDENTIFIERS = defineIdentifiers([
|
|
15
20
|
{
|
|
16
21
|
key: "run_id",
|
package/dist/standards/lint.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
+
/** @experimental */
|
|
2
3
|
export declare const LINT_SEVERITIES: readonly ["high", "medium", "low"];
|
|
3
4
|
declare const lintRuleSchema: v.StrictObjectSchema<{
|
|
4
5
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a lower-case word, words joined by -">]>;
|
|
@@ -7,12 +8,23 @@ declare const lintRuleSchema: v.StrictObjectSchema<{
|
|
|
7
8
|
readonly scope: v.PicklistSchema<["command", "group", "argument", "option", "flag", "key", "source", "type"], undefined>;
|
|
8
9
|
readonly summary: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
9
10
|
}, undefined>;
|
|
11
|
+
/** @experimental */
|
|
10
12
|
export type LintRule = v.InferOutput<typeof lintRuleSchema>;
|
|
13
|
+
/** @experimental */
|
|
11
14
|
export type LintSeverity = (typeof LINT_SEVERITIES)[number];
|
|
15
|
+
/** @experimental */
|
|
12
16
|
export declare const defineLintRules: (input: unknown) => LintRule[];
|
|
13
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Ids and severities follow the Azure CLI linter (`azdev linter`): a rule is named after what it finds.
|
|
19
|
+
*
|
|
20
|
+
* @experimental
|
|
21
|
+
*/
|
|
14
22
|
export declare const LINT_RULES: LintRule[];
|
|
15
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* `lint/baseline/<rule-id>.json`: today's violations of one rule, by target. It may only shrink.
|
|
25
|
+
*
|
|
26
|
+
* @experimental
|
|
27
|
+
*/
|
|
16
28
|
export declare const baselineSchema: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>, undefined>;
|
|
17
29
|
/** One `lint/overrides.json` entry: the exception, its reason, who keeps it and when to look again. */
|
|
18
30
|
export declare const overrideSchema: v.StrictObjectSchema<{
|
|
@@ -23,7 +35,11 @@ export declare const overrideSchema: v.StrictObjectSchema<{
|
|
|
23
35
|
readonly owner: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a GitHub handle or team, such as @octocat">]>;
|
|
24
36
|
readonly review_after: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoDateAction<string, "a date, YYYY-MM-DD">]>;
|
|
25
37
|
}, undefined>;
|
|
26
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* `lint/overrides.json`: exceptions, each with its reason, who keeps it and when to look again; counted against a budget.
|
|
40
|
+
*
|
|
41
|
+
* @experimental
|
|
42
|
+
*/
|
|
27
43
|
export declare const overridesSchema: v.ArraySchema<v.StrictObjectSchema<{
|
|
28
44
|
readonly rule: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a lower-case word, words joined by -">]>;
|
|
29
45
|
readonly target: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
@@ -32,12 +48,19 @@ export declare const overridesSchema: v.ArraySchema<v.StrictObjectSchema<{
|
|
|
32
48
|
readonly owner: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a GitHub handle or team, such as @octocat">]>;
|
|
33
49
|
readonly review_after: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoDateAction<string, "a date, YYYY-MM-DD">]>;
|
|
34
50
|
}, undefined>, undefined>;
|
|
51
|
+
/** @experimental */
|
|
35
52
|
export type Override = v.InferOutput<typeof overridesSchema>[number];
|
|
36
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* What the schemas cannot say, so they stay convertible to JSON Schema: no entry twice.
|
|
55
|
+
*
|
|
56
|
+
* @experimental
|
|
57
|
+
*/
|
|
37
58
|
export declare const baselineProblems: (targets: readonly string[]) => string[];
|
|
38
59
|
/**
|
|
39
60
|
* Days around an override's `review_after` that only warn: a review comes due without turning every CI run of the CLI
|
|
40
61
|
* red on one morning, and a shared word due in several CLIs at once gets two weeks to land its fix.
|
|
62
|
+
*
|
|
63
|
+
* @experimental
|
|
41
64
|
*/
|
|
42
65
|
export declare const REVIEW_GRACE_DAYS = 14;
|
|
43
66
|
/** An exception that expires: a lint override, or a parity group's difference, which may leave the date out. */
|
|
@@ -49,14 +72,31 @@ export interface Dated {
|
|
|
49
72
|
}
|
|
50
73
|
/** Entries more than `REVIEW_GRACE_DAYS` past their `review_after` on `today` (YYYY-MM-DD). */
|
|
51
74
|
export declare const overdue: (entries: readonly Dated[], today: string) => string[];
|
|
52
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* No entry twice, and none overdue.
|
|
77
|
+
*
|
|
78
|
+
* @experimental
|
|
79
|
+
*/
|
|
53
80
|
export declare const overridesProblems: (entries: readonly Override[], today: string) => string[];
|
|
54
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Entries whose `review_after` is at most `REVIEW_GRACE_DAYS` away on either side: due soon, or due and not failing yet.
|
|
83
|
+
*
|
|
84
|
+
* @experimental
|
|
85
|
+
*/
|
|
55
86
|
export declare const overridesDueSoon: (entries: readonly Dated[], today: string, check?: string) => string[];
|
|
87
|
+
/** @experimental */
|
|
56
88
|
export declare const OVERRIDE_BUDGET = 10;
|
|
57
|
-
/**
|
|
89
|
+
/**
|
|
90
|
+
* More overrides of one rule than this, across every CLI, and the rule itself is due for review.
|
|
91
|
+
*
|
|
92
|
+
* @experimental
|
|
93
|
+
*/
|
|
58
94
|
export declare const OVERRIDE_RULE_REVIEW = 3;
|
|
59
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* Rules overridden more than `OVERRIDE_RULE_REVIEW` times across the CLIs given, most first.
|
|
97
|
+
*
|
|
98
|
+
* @experimental
|
|
99
|
+
*/
|
|
60
100
|
export declare const rulesForReview: (lists: readonly (readonly Override[])[]) => {
|
|
61
101
|
rule: string;
|
|
62
102
|
overrides: number;
|
package/dist/standards/lint.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
import { duplicates, parseRegistry, text, word } from "./registry.js";
|
|
3
|
+
/** @experimental */
|
|
3
4
|
export const LINT_SEVERITIES = ["high", "medium", "low"];
|
|
4
5
|
const lintRuleSchema = v.strictObject({
|
|
5
6
|
id: word,
|
|
@@ -8,8 +9,13 @@ const lintRuleSchema = v.strictObject({
|
|
|
8
9
|
scope: v.picklist(["command", "group", "argument", "option", "flag", "key", "source", "type"]),
|
|
9
10
|
summary: text,
|
|
10
11
|
});
|
|
12
|
+
/** @experimental */
|
|
11
13
|
export const defineLintRules = (input) => parseRegistry("lint rules", v.array(lintRuleSchema), input, (rules) => duplicates(rules.map((rule) => rule.id)).map((id) => `"${id}" is listed twice`));
|
|
12
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Ids and severities follow the Azure CLI linter (`azdev linter`): a rule is named after what it finds.
|
|
16
|
+
*
|
|
17
|
+
* @experimental
|
|
18
|
+
*/
|
|
13
19
|
export const LINT_RULES = defineLintRules([
|
|
14
20
|
{
|
|
15
21
|
id: "unknown-verb",
|
|
@@ -135,7 +141,11 @@ export const LINT_RULES = defineLintRules([
|
|
|
135
141
|
summary: "a list or search in the published TypeScript API returns `{ items, hasMore, nextOffset?, total? }`: no bare array, no `hits` or `has_more`",
|
|
136
142
|
},
|
|
137
143
|
]);
|
|
138
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* `lint/baseline/<rule-id>.json`: today's violations of one rule, by target. It may only shrink.
|
|
146
|
+
*
|
|
147
|
+
* @experimental
|
|
148
|
+
*/
|
|
139
149
|
export const baselineSchema = v.array(text);
|
|
140
150
|
/** One `lint/overrides.json` entry: the exception, its reason, who keeps it and when to look again. */
|
|
141
151
|
export const overrideSchema = v.strictObject({
|
|
@@ -146,13 +156,23 @@ export const overrideSchema = v.strictObject({
|
|
|
146
156
|
owner: v.pipe(v.string(), v.regex(/^@[\w.-]+(\/[\w.-]+)?$/, "a GitHub handle or team, such as @octocat")),
|
|
147
157
|
review_after: v.pipe(v.string(), v.isoDate("a date, YYYY-MM-DD")),
|
|
148
158
|
});
|
|
149
|
-
/**
|
|
159
|
+
/**
|
|
160
|
+
* `lint/overrides.json`: exceptions, each with its reason, who keeps it and when to look again; counted against a budget.
|
|
161
|
+
*
|
|
162
|
+
* @experimental
|
|
163
|
+
*/
|
|
150
164
|
export const overridesSchema = v.array(overrideSchema);
|
|
151
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* What the schemas cannot say, so they stay convertible to JSON Schema: no entry twice.
|
|
167
|
+
*
|
|
168
|
+
* @experimental
|
|
169
|
+
*/
|
|
152
170
|
export const baselineProblems = (targets) => duplicates(targets).map((target) => `"${target}" is listed twice`);
|
|
153
171
|
/**
|
|
154
172
|
* Days around an override's `review_after` that only warn: a review comes due without turning every CI run of the CLI
|
|
155
173
|
* red on one morning, and a shared word due in several CLIs at once gets two weeks to land its fix.
|
|
174
|
+
*
|
|
175
|
+
* @experimental
|
|
156
176
|
*/
|
|
157
177
|
export const REVIEW_GRACE_DAYS = 14;
|
|
158
178
|
const shiftDays = (date, days) => new Date(Date.parse(`${date}T00:00:00Z`) + days * 86_400_000).toISOString().slice(0, 10);
|
|
@@ -161,12 +181,20 @@ const ask = (entry) => (entry.owner ? `; ask ${entry.owner}` : "");
|
|
|
161
181
|
export const overdue = (entries, today) => entries
|
|
162
182
|
.filter((entry) => entry.review_after !== undefined && shiftDays(entry.review_after, REVIEW_GRACE_DAYS) < today)
|
|
163
183
|
.map((entry) => `"${entry.rule} ${entry.target}" was due for review on ${entry.review_after}${ask(entry)}`);
|
|
164
|
-
/**
|
|
184
|
+
/**
|
|
185
|
+
* No entry twice, and none overdue.
|
|
186
|
+
*
|
|
187
|
+
* @experimental
|
|
188
|
+
*/
|
|
165
189
|
export const overridesProblems = (entries, today) => [
|
|
166
190
|
...duplicates(entries.map((entry) => `${entry.rule} ${entry.target}`)).map((both) => `"${both}" is listed twice`),
|
|
167
191
|
...overdue(entries, today),
|
|
168
192
|
];
|
|
169
|
-
/**
|
|
193
|
+
/**
|
|
194
|
+
* Entries whose `review_after` is at most `REVIEW_GRACE_DAYS` away on either side: due soon, or due and not failing yet.
|
|
195
|
+
*
|
|
196
|
+
* @experimental
|
|
197
|
+
*/
|
|
170
198
|
export const overridesDueSoon = (entries, today, check = "lint") => entries.flatMap((entry) => entry.review_after !== undefined &&
|
|
171
199
|
entry.review_after <= shiftDays(today, REVIEW_GRACE_DAYS) &&
|
|
172
200
|
shiftDays(entry.review_after, REVIEW_GRACE_DAYS) >= today
|
|
@@ -174,10 +202,19 @@ export const overridesDueSoon = (entries, today, check = "lint") => entries.flat
|
|
|
174
202
|
`"${entry.rule} ${entry.target}" is due for review on ${entry.review_after} and fails ${check} after ${shiftDays(entry.review_after, REVIEW_GRACE_DAYS)}${ask(entry)}`,
|
|
175
203
|
]
|
|
176
204
|
: []);
|
|
205
|
+
/** @experimental */
|
|
177
206
|
export const OVERRIDE_BUDGET = 10;
|
|
178
|
-
/**
|
|
207
|
+
/**
|
|
208
|
+
* More overrides of one rule than this, across every CLI, and the rule itself is due for review.
|
|
209
|
+
*
|
|
210
|
+
* @experimental
|
|
211
|
+
*/
|
|
179
212
|
export const OVERRIDE_RULE_REVIEW = 3;
|
|
180
|
-
/**
|
|
213
|
+
/**
|
|
214
|
+
* Rules overridden more than `OVERRIDE_RULE_REVIEW` times across the CLIs given, most first.
|
|
215
|
+
*
|
|
216
|
+
* @experimental
|
|
217
|
+
*/
|
|
181
218
|
export const rulesForReview = (lists) => {
|
|
182
219
|
const counts = new Map();
|
|
183
220
|
for (const entry of lists.flat())
|
package/dist/standards/log.d.ts
CHANGED
|
@@ -31,12 +31,24 @@ declare const logEventSchema: v.StrictObjectSchema<{
|
|
|
31
31
|
export type LogEvent = v.InferOutput<typeof logEventSchema>;
|
|
32
32
|
/** Events live where they are logged; each package defines its own list with this. */
|
|
33
33
|
export declare const defineLogEvents: (input: unknown) => LogEvent[];
|
|
34
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* The events cli-base logs itself.
|
|
36
|
+
*
|
|
37
|
+
* @experimental
|
|
38
|
+
*/
|
|
35
39
|
export declare const LOG_EVENTS: LogEvent[];
|
|
36
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Why a record is not one of `events` (cli-base's are always known): an unknown `body`, or a required key missing.
|
|
42
|
+
*
|
|
43
|
+
* @experimental
|
|
44
|
+
*/
|
|
37
45
|
export declare const logEventProblems: (record: Pick<LogRecord, "body" | "attributes">, events: readonly LogEvent[]) => string[];
|
|
38
46
|
export type LogSeverity = (typeof LOG_SEVERITIES)[number];
|
|
39
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Attribute keys every program may log; a program adds its own with `allow`. Keys are camelCase until §3.9 reaches logs.
|
|
49
|
+
*
|
|
50
|
+
* @experimental
|
|
51
|
+
*/
|
|
40
52
|
export declare const LOG_ATTRIBUTE_KEYS: readonly ["code", "count", "durationMs", "errorClass", "errorCode", "event", "frames", "operation", "outcome", "reason", "status"];
|
|
41
53
|
/** Whether a log attribute key names message text, a token, a phone number or another person's words. */
|
|
42
54
|
export declare const isContentKey: (key: string) => boolean;
|
package/dist/standards/log.js
CHANGED
|
@@ -31,11 +31,19 @@ export const defineLogEvents = (input) => parseRegistry("log events", v.array(lo
|
|
|
31
31
|
...duplicates(events.map((event) => event.id)).map((id) => `"${id}" is listed twice`),
|
|
32
32
|
...events.flatMap((event) => duplicates(event.keys).map((key) => `${event.id}: key "${key}" is listed twice`)),
|
|
33
33
|
]);
|
|
34
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* The events cli-base logs itself.
|
|
36
|
+
*
|
|
37
|
+
* @experimental
|
|
38
|
+
*/
|
|
35
39
|
export const LOG_EVENTS = defineLogEvents([
|
|
36
40
|
{ id: "command.failed", meaning: "a command ended with an error", keys: ["code", "reason"] },
|
|
37
41
|
]);
|
|
38
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Why a record is not one of `events` (cli-base's are always known): an unknown `body`, or a required key missing.
|
|
44
|
+
*
|
|
45
|
+
* @experimental
|
|
46
|
+
*/
|
|
39
47
|
export const logEventProblems = (record, events) => {
|
|
40
48
|
const event = [...LOG_EVENTS, ...events].find((one) => one.id === record.body);
|
|
41
49
|
if (!event)
|
|
@@ -44,7 +52,11 @@ export const logEventProblems = (record, events) => {
|
|
|
44
52
|
.filter((key) => record.attributes[key] === undefined)
|
|
45
53
|
.map((key) => `${event.id}: no "${key}" attribute`);
|
|
46
54
|
};
|
|
47
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Attribute keys every program may log; a program adds its own with `allow`. Keys are camelCase until §3.9 reaches logs.
|
|
57
|
+
*
|
|
58
|
+
* @experimental
|
|
59
|
+
*/
|
|
48
60
|
export const LOG_ATTRIBUTE_KEYS = [
|
|
49
61
|
"code",
|
|
50
62
|
"count",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WC-CI-9's table of the WireCat repositories' monthly minutes, as `HH:MM → repository`: from the given text of
|
|
3
3
|
* `docs/standards/ci.md`, or from the copy this package ships.
|
|
4
|
+
*
|
|
5
|
+
* @experimental
|
|
4
6
|
*/
|
|
5
7
|
export declare const takenMinutes: (ciPage?: string) => Map<string, string>;
|
|
@@ -5,6 +5,8 @@ const CI_PAGE = join(dirname(fileURLToPath(import.meta.url)), "../../docs/standa
|
|
|
5
5
|
/**
|
|
6
6
|
* WC-CI-9's table of the WireCat repositories' monthly minutes, as `HH:MM → repository`: from the given text of
|
|
7
7
|
* `docs/standards/ci.md`, or from the copy this package ships.
|
|
8
|
+
*
|
|
9
|
+
* @experimental
|
|
8
10
|
*/
|
|
9
11
|
export const takenMinutes = (ciPage = readFileSync(CI_PAGE, "utf8")) => new Map([...ciPage.matchAll(/^\s*\|\s*(\d\d:\d\d)\s*\|\s*([\w.-]+)\s*\|\s*$/gm)].map(([, time, repo]) => [
|
|
10
12
|
time,
|
|
@@ -4,7 +4,11 @@ export declare const MAX_NEXT_STEPS = 2;
|
|
|
4
4
|
/** The switch for one line per item (WC-OUT-24). Its name is still the owner's to settle, so it lives in one place. */
|
|
5
5
|
export declare const COMPACT_FLAG = "--compact";
|
|
6
6
|
export declare const isoTime: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* The same moment on the wall clock of a zone, with its offset: `2026-11-02T16:03:00.000+01:00` (WC-TIME-2).
|
|
9
|
+
*
|
|
10
|
+
* @experimental
|
|
11
|
+
*/
|
|
8
12
|
export declare const localTime: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "an ISO 8601 time with its offset">]>;
|
|
9
13
|
/** The typed name of a stored thing, `msg:telegram/1/2/3` or `note:42`: what every other command takes. */
|
|
10
14
|
export declare const reference: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -108,6 +112,8 @@ export declare const rankingSchema: v.StrictObjectSchema<{
|
|
|
108
112
|
* What a model a command calls on its own did in this run (mail's `inbox` sorting new threads): how many items it was
|
|
109
113
|
* sent, how many it handled, how many wait for the next run, and what that cost. `usage` is absent when the provider
|
|
110
114
|
* counted nothing; `cost_usd` is null when no price is known.
|
|
115
|
+
*
|
|
116
|
+
* @experimental
|
|
111
117
|
*/
|
|
112
118
|
export declare const modelRunSchema: v.StrictObjectSchema<{
|
|
113
119
|
readonly provider: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
|
|
@@ -441,6 +447,7 @@ export type Page = v.InferOutput<typeof pageSchema>;
|
|
|
441
447
|
export type Issue = v.InferOutput<typeof issueSchema>;
|
|
442
448
|
export type Meta = v.InferOutput<typeof metaSchema>;
|
|
443
449
|
export type Ranking = v.InferOutput<typeof rankingSchema>;
|
|
450
|
+
/** @experimental */
|
|
444
451
|
export type ModelRun = v.InferOutput<typeof modelRunSchema>;
|
|
445
452
|
export type Query = v.InferOutput<typeof querySchema>;
|
|
446
453
|
export interface ListEnvelope<T> {
|