@wirecat/drive-cli 0.34.0 → 0.35.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.
Files changed (48) hide show
  1. package/dist/commands/config.d.ts +1 -1
  2. package/dist/commands/config.d.ts.map +1 -1
  3. package/dist/commands/config.js +110 -38
  4. package/dist/commands/config.js.map +1 -1
  5. package/dist/commands/context.d.ts +2 -0
  6. package/dist/commands/context.d.ts.map +1 -1
  7. package/dist/commands/context.js.map +1 -1
  8. package/dist/commands/doctor.d.ts +6 -6
  9. package/dist/commands/doctor.d.ts.map +1 -1
  10. package/dist/commands/doctor.js +14 -20
  11. package/dist/commands/doctor.js.map +1 -1
  12. package/dist/commands/session.js +1 -1
  13. package/dist/commands/session.js.map +1 -1
  14. package/dist/config-issues.d.ts +53 -0
  15. package/dist/config-issues.d.ts.map +1 -0
  16. package/dist/config-issues.js +172 -0
  17. package/dist/config-issues.js.map +1 -0
  18. package/dist/config.d.ts +18 -122
  19. package/dist/config.d.ts.map +1 -1
  20. package/dist/config.js +40 -70
  21. package/dist/config.js.map +1 -1
  22. package/dist/contract-overrides.js +1 -1
  23. package/dist/contract-overrides.js.map +1 -1
  24. package/dist/mcp.d.ts.map +1 -1
  25. package/dist/mcp.js +2 -2
  26. package/dist/mcp.js.map +1 -1
  27. package/dist/policy.d.ts +8 -0
  28. package/dist/policy.d.ts.map +1 -1
  29. package/dist/policy.js +36 -11
  30. package/dist/policy.js.map +1 -1
  31. package/dist/program.d.ts.map +1 -1
  32. package/dist/program.js +36 -26
  33. package/dist/program.js.map +1 -1
  34. package/dist/registry.d.ts +4 -0
  35. package/dist/registry.d.ts.map +1 -1
  36. package/dist/registry.js +17 -2
  37. package/dist/registry.js.map +1 -1
  38. package/dist/version.d.ts +1 -1
  39. package/dist/version.js +1 -1
  40. package/package.json +2 -2
  41. package/scenarios/agent-access.md +2 -2
  42. package/scenarios/brief-document.md +5 -5
  43. package/scenarios/find-decision.md +4 -4
  44. package/scenarios/set-up.md +5 -5
  45. package/dist/config-upgrade.d.ts +0 -5
  46. package/dist/config-upgrade.d.ts.map +0 -1
  47. package/dist/config-upgrade.js +0 -42
  48. package/dist/config-upgrade.js.map +0 -1
@@ -0,0 +1,172 @@
1
+ import * as v from "valibot";
2
+ const isNode = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
3
+ const SHELL_SAFE = /^[A-Za-z0-9_.:@-]*$/;
4
+ /** Where a path of the file sits: the profile and the flags `config unset` needs, and the setting under it. */
5
+ const scopeOf = (at) => {
6
+ const [first, second] = at;
7
+ if (first === "profiles" && second !== undefined && at.length > 2)
8
+ return { profile: second, flags: "", rest: at.slice(2) };
9
+ if (first === "defaults" && at.length > 1)
10
+ return { flags: " --defaults", rest: at.slice(1) };
11
+ return { flags: "", rest: [...at] };
12
+ };
13
+ /** The part of a scope's path `config unset` takes as one setting: a permission key, a model field, or the setting. */
14
+ const settingPath = (rest) => {
15
+ if (rest[0] === "permissions" && rest.length > 1)
16
+ return rest.slice(0, 2);
17
+ if (rest[0] === "models" && rest.length > 1)
18
+ return rest.slice(0, 3);
19
+ return rest.slice(0, 1);
20
+ };
21
+ const settingOf = (path) => path[0] === "permissions" && path.length > 1 ? `permissions.${path[1]}` : path.join(".");
22
+ /** An issue at `at`, cut to the setting `config unset` removes, with that command as its fix. */
23
+ export const locate = (kind, at, context, what) => {
24
+ const { profile, flags, rest } = scopeOf(at);
25
+ const inScope = rest.length < at.length;
26
+ // Outside a section the path itself is the key: `profiles.work` with the wrong type is removed alone.
27
+ const setting = inScope ? settingPath(rest) : [...rest];
28
+ const key = inScope ? settingOf(setting) : setting.join(".");
29
+ const prefix = at.slice(0, at.length - rest.length);
30
+ return {
31
+ kind,
32
+ file: context.file,
33
+ ...(profile === undefined ? {} : { profile }),
34
+ key,
35
+ what: what(key),
36
+ // A fix runs exactly as written; a name a shell would split or expand gets none.
37
+ ...([key, profile ?? ""].every((word) => SHELL_SAFE.test(word))
38
+ ? { fix: `${context.tool}${profile === undefined ? "" : ` ${profile}`} config unset${flags} ${key}` }
39
+ : {}),
40
+ at: [...prefix, ...setting],
41
+ };
42
+ };
43
+ /** Node prints `(line 3 column 5)`, older runtimes only `position 41`, and Bun neither. */
44
+ const placeOf = (message, text) => {
45
+ const said = /line (\d+) column (\d+)/.exec(message);
46
+ if (said)
47
+ return { line: Number(said[1]), column: Number(said[2]) };
48
+ const position = /position (\d+)/.exec(message);
49
+ if (!position)
50
+ return {};
51
+ const before = text.slice(0, Number(position[1])).split("\n");
52
+ return { line: before.length, column: (before.at(-1)?.length ?? 0) + 1 };
53
+ };
54
+ /** The file's JSON, or the one issue that says where it stopped parsing. */
55
+ export const parseConfigText = (text, file) => {
56
+ try {
57
+ return { raw: JSON.parse(text) };
58
+ }
59
+ catch (error) {
60
+ const place = placeOf(error instanceof Error ? error.message : "", text);
61
+ const where = place.line === undefined ? "" : ` at line ${place.line}, column ${place.column}`;
62
+ return { issue: { kind: "invalid_json", file, ...place, what: `the file is not valid JSON${where}`, at: [] } };
63
+ }
64
+ };
65
+ const keyOfPath = (issue) => (issue.path ?? []).map((item) => String(item.key));
66
+ /** A key the schema does not know: valibot says it expected nothing there. */
67
+ const isUnknownKey = (issue) => issue.expected === "never";
68
+ /** A `permissions` key refused by its pattern, rather than its level. */
69
+ const isPermissionKey = (issue, at) => {
70
+ const last = issue.path?.at(-1);
71
+ return at.at(-2) === "permissions" && last !== undefined && "origin" in last && last.origin === "key";
72
+ };
73
+ const isMissing = (issue) => {
74
+ const last = issue.path?.at(-1);
75
+ return last !== undefined && "origin" in last && last.origin === "key" && issue.input === undefined;
76
+ };
77
+ /**
78
+ * What a value has to be, never what it was: the schema's own "has to be …" without its ", not <value>", else
79
+ * the type or choices valibot expected.
80
+ */
81
+ const ruleOf = (issue) => {
82
+ const own = /^(has to be [\s\S]*?)(, not [\s\S]*)?$/.exec(issue.message);
83
+ if (own?.[1])
84
+ return own[1];
85
+ if (issue.type === "picklist")
86
+ return `has to be one of ${issue.expected}`;
87
+ // valibot's own messages start "Invalid" and quote the value; a schema's own words do not.
88
+ if (!issue.message.startsWith("Invalid "))
89
+ return `is refused: ${issue.message}`;
90
+ if (issue.kind === "schema")
91
+ return `has to be of type ${issue.expected}`;
92
+ return issue.expected === null ? "has a value it does not take" : `has to be ${issue.expected}`;
93
+ };
94
+ /** One pass of the schema: valibot names only the first unknown key of each object. */
95
+ const onePass = (raw, schema, context) => {
96
+ const result = v.safeParse(schema, raw);
97
+ if (result.success)
98
+ return [];
99
+ return result.issues.map((issue) => {
100
+ const at = keyOfPath(issue);
101
+ const located = isPermissionKey(issue, at)
102
+ ? locate("unknown_permission", at, context, (key) => `${key} names no command`)
103
+ : isUnknownKey(issue)
104
+ ? locate("unknown_setting", at, context, (key) => `setting ${key} is not a setting of ${context.tool}`)
105
+ : isMissing(issue)
106
+ ? locate("missing_setting", at, context, (key) => `setting ${key} is missing`)
107
+ : locate("invalid_value", at, context, (key) => at.length === 0 ? "the file has to be an object, in braces" : `setting ${key} ${ruleOf(issue)}`);
108
+ if (located.kind === "missing_setting" || at.length === 0)
109
+ delete located.fix;
110
+ return located;
111
+ });
112
+ };
113
+ /** Every problem the schema finds, never only the first, each cut to the setting that holds it. */
114
+ export const schemaIssues = (raw, schema, context) => {
115
+ const found = new Map();
116
+ for (;;) {
117
+ const fresh = onePass(withoutIssues(raw, [...found.values()]), schema, context).filter((issue) => !found.has(issue.at.join("\u0000")));
118
+ if (fresh.length === 0)
119
+ return [...found.values()];
120
+ for (const issue of fresh)
121
+ found.set(issue.at.join("\u0000"), issue);
122
+ // A missing setting cannot be removed, so another pass would find it again.
123
+ if (fresh.every((issue) => issue.kind === "missing_setting" || issue.at.length === 0))
124
+ return [...found.values()];
125
+ }
126
+ };
127
+ /** Every section of the file that may hold `permissions`, with its path. */
128
+ const scopes = (raw) => {
129
+ if (!isNode(raw))
130
+ return [];
131
+ const out = [];
132
+ if (isNode(raw.defaults))
133
+ out.push([["defaults"], raw.defaults]);
134
+ if (isNode(raw.profiles))
135
+ for (const [name, scope] of Object.entries(raw.profiles))
136
+ if (isNode(scope))
137
+ out.push([["profiles", name], scope]);
138
+ return out;
139
+ };
140
+ /** Every saved permission key, in every section and profile of the file — not only the ones that win. */
141
+ export const savedPermissionKeys = (raw) => scopes(raw).flatMap(([path, scope]) => isNode(scope.permissions)
142
+ ? Object.keys(scope.permissions).map((key) => ({ key, at: [...path, "permissions", key] }))
143
+ : []);
144
+ /** A saved key no command checks would do nothing: one issue per key, wherever it is saved. */
145
+ export const permissionIssues = (saved, known, context) => saved
146
+ .filter(({ key }) => !known.has(key))
147
+ .map(({ at }) => locate("unknown_permission", at, context, (key) => `${key} names no command`));
148
+ /** The file without the settings the issues name: what still loads, and what `config unset` would leave. */
149
+ export const withoutIssues = (raw, issues) => {
150
+ if (issues.some((issue) => issue.at.length === 0))
151
+ return {};
152
+ const copy = structuredClone(raw);
153
+ for (const { at } of issues) {
154
+ const parent = at.slice(0, -1).reduce((node, key) => (isNode(node) ? node[key] : undefined), copy);
155
+ if (isNode(parent))
156
+ delete parent[at.at(-1)];
157
+ }
158
+ return copy;
159
+ };
160
+ /** The public shape: where in the file is the loader's own business. */
161
+ export const publicIssue = ({ at: _, ...issue }) => issue;
162
+ /** One line for a command that refuses to run on the file: the first problem, how to fix it, and how many more. */
163
+ export const issueMessage = (issues) => {
164
+ const [first] = issues;
165
+ if (!first)
166
+ return "";
167
+ const more = issues.length - 1;
168
+ return (`${first.file}: ${first.what}` +
169
+ (first.fix ? ` — remove it with \`${first.fix}\`` : "") +
170
+ (more === 0 ? "" : ` (and ${more} more problem${more === 1 ? "" : "s"} — \`doctor\` lists them all)`));
171
+ };
172
+ //# sourceMappingURL=config-issues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-issues.js","sourceRoot":"","sources":["../src/config-issues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AA8B5B,MAAM,MAAM,GAAG,CAAC,KAAc,EA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,CAAC,SAAS,IAAI,gBAAgB,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,+BAA+B,CAAC,CACtG,CAAA;AACH,CAAC,CAAA"}
package/dist/config.d.ts CHANGED
@@ -1,7 +1,8 @@
1
+ import { CliError } from "@wirecat/cli-base";
1
2
  import * as v from "valibot";
3
+ import { type LocatedIssue } from "./config-issues.js";
2
4
  export declare const DEFAULTS_ONLY: Set<string>;
3
5
  export declare const SETTING_NAMES: Set<string>;
4
- export declare const configKey: (key: string) => string;
5
6
  declare const Mirror: v.StrictObjectSchema<{
6
7
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
7
8
  readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -9,15 +10,12 @@ declare const Mirror: v.StrictObjectSchema<{
9
10
  }, undefined>;
10
11
  export type Mirror = v.InferOutput<typeof Mirror>;
11
12
  export declare const ConfigSchema: v.StrictObjectSchema<{
12
- readonly profiles: v.RecordSchema<v.StringSchema<undefined>, v.StrictObjectSchema<{
13
+ readonly profiles: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.StrictObjectSchema<{
13
14
  readonly embedding_provider: ({
14
15
  embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
15
16
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
16
17
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
17
18
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
18
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
19
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
20
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
21
19
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
22
20
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
23
21
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
@@ -29,9 +27,6 @@ export declare const ConfigSchema: v.StrictObjectSchema<{
29
27
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
30
28
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
31
29
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
32
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
33
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
34
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
35
30
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
36
31
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
37
32
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
@@ -43,9 +38,6 @@ export declare const ConfigSchema: v.StrictObjectSchema<{
43
38
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
44
39
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
45
40
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
46
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
47
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
48
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
49
41
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
50
42
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
51
43
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
@@ -57,65 +49,17 @@ export declare const ConfigSchema: v.StrictObjectSchema<{
57
49
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
58
50
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
59
51
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
60
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
61
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
62
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
63
52
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
64
53
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
65
54
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
66
55
  readonly base_url: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
67
56
  }, undefined>, undefined>, undefined>;
68
57
  })["embeddingDims"];
69
- readonly analysis_provider: ({
70
- embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
71
- embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
72
- embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
73
- embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
74
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
75
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
76
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
77
- models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
78
- readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
79
- readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
80
- readonly base_url: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
81
- }, undefined>, undefined>, undefined>;
82
- })["analysisProvider"];
83
- readonly analysis_model: ({
84
- embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
85
- embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
86
- embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
87
- embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
88
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
89
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
90
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
91
- models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
92
- readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
93
- readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
94
- readonly base_url: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
95
- }, undefined>, undefined>, undefined>;
96
- })["analysisModel"];
97
- readonly analysis_base_url: ({
98
- embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
99
- embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
100
- embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
101
- embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
102
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
103
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
104
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
105
- models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
106
- readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
107
- readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
108
- readonly base_url: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
109
- }, undefined>, undefined>, undefined>;
110
- })["analysisBaseUrl"];
111
58
  readonly models: ({
112
59
  embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
113
60
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
114
61
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
115
62
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
116
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
117
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
118
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
119
63
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
120
64
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
121
65
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
@@ -125,7 +69,7 @@ export declare const ConfigSchema: v.StrictObjectSchema<{
125
69
  readonly permissions: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.PicklistSchema<readonly ["deny", "readonly", "ask", "allow"], undefined>, undefined>, undefined>;
126
70
  readonly max_text_chars: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2000000, undefined>]>, undefined>;
127
71
  readonly principal: v.StringSchema<undefined>;
128
- readonly roots: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
72
+ readonly roots: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, readonly []>;
129
73
  readonly mirrors: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
130
74
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
131
75
  readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
@@ -133,16 +77,13 @@ export declare const ConfigSchema: v.StrictObjectSchema<{
133
77
  }, undefined>, undefined>, undefined>;
134
78
  readonly storage: v.PicklistSchema<["keyring", "file"], undefined>;
135
79
  readonly picture_search: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
136
- }, undefined>, undefined>;
80
+ }, undefined>, undefined>, {}>;
137
81
  readonly defaults: v.OptionalSchema<v.StrictObjectSchema<{
138
82
  readonly embedding_provider: ({
139
83
  embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
140
84
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
141
85
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
142
86
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
143
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
144
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
145
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
146
87
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
147
88
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
148
89
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
@@ -154,9 +95,6 @@ export declare const ConfigSchema: v.StrictObjectSchema<{
154
95
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
155
96
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
156
97
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
157
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
158
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
159
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
160
98
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
161
99
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
162
100
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
@@ -168,9 +106,6 @@ export declare const ConfigSchema: v.StrictObjectSchema<{
168
106
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
169
107
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
170
108
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
171
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
172
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
173
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
174
109
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
175
110
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
176
111
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
@@ -182,65 +117,17 @@ export declare const ConfigSchema: v.StrictObjectSchema<{
182
117
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
183
118
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
184
119
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
185
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
186
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
187
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
188
120
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
189
121
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
190
122
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
191
123
  readonly base_url: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
192
124
  }, undefined>, undefined>, undefined>;
193
125
  })["embeddingDims"];
194
- readonly analysis_provider: ({
195
- embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
196
- embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
197
- embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
198
- embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
199
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
200
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
201
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
202
- models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
203
- readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
204
- readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
205
- readonly base_url: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
206
- }, undefined>, undefined>, undefined>;
207
- })["analysisProvider"];
208
- readonly analysis_model: ({
209
- embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
210
- embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
211
- embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
212
- embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
213
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
214
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
215
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
216
- models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
217
- readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
218
- readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
219
- readonly base_url: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
220
- }, undefined>, undefined>, undefined>;
221
- })["analysisModel"];
222
- readonly analysis_base_url: ({
223
- embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
224
- embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
225
- embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
226
- embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
227
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
228
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
229
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
230
- models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
231
- readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
232
- readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
233
- readonly base_url: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
234
- }, undefined>, undefined>, undefined>;
235
- })["analysisBaseUrl"];
236
126
  readonly models: ({
237
127
  embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
238
128
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
239
129
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
240
130
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
241
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
242
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
243
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
244
131
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
245
132
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
246
133
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
@@ -252,22 +139,31 @@ export declare const ConfigSchema: v.StrictObjectSchema<{
252
139
  readonly record: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
253
140
  readonly keep_runs_for_days: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
254
141
  }, undefined>, undefined>;
255
- readonly default_profile: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
256
142
  }, undefined>;
257
143
  export type Config = v.InferOutput<typeof ConfigSchema>;
258
144
  export declare const paths: (env: NodeJS.ProcessEnv) => import("@wirecat/cli-base").Paths;
145
+ export declare const configPath: (env: NodeJS.ProcessEnv) => string;
146
+ export interface ConfigFile {
147
+ path: string;
148
+ found: boolean;
149
+ /** The file as written, for `config set` and `unset` to change without dropping what they do not touch. */
150
+ raw: unknown;
151
+ config: Config;
152
+ issues: LocatedIssue[];
153
+ }
154
+ /** The file, what of it loads, and every problem the schema finds, for `doctor` and `config`, which must not refuse. */
155
+ export declare const inspectConfig: (env: NodeJS.ProcessEnv) => ConfigFile;
156
+ export declare const refusal: (issues: readonly LocatedIssue[]) => CliError;
259
157
  export declare const readConfig: (env: NodeJS.ProcessEnv) => Config;
260
158
  export declare const writeConfig: (env: NodeJS.ProcessEnv, config: Config) => void;
261
159
  export declare const profileName: (profile: string) => string;
262
160
  export declare const fileId: (input: string) => string;
161
+ export declare const unknownProfile: (name: string, profiles: string[]) => CliError;
263
162
  export declare const activeProfile: (env: NodeJS.ProcessEnv, name: string) => {
264
163
  embedding_provider?: "local" | "openai" | undefined;
265
164
  embedding_model?: string | undefined;
266
165
  embedding_base_url?: string | undefined;
267
166
  embedding_dims?: number | undefined;
268
- analysis_provider?: "agent" | "anthropic" | "openai" | undefined;
269
- analysis_model?: string | undefined;
270
- analysis_base_url?: string | undefined;
271
167
  models?: {
272
168
  [x: string]: {
273
169
  provider?: "anthropic" | "off" | "openai" | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAc5B,eAAO,MAAM,aAAa,aAAoC,CAAA;AAC9D,eAAO,MAAM,aAAa,aAAwE,CAAA;AAElG,eAAO,MAAM,SAAS,QAAS,MAAM,WAIpC,CAAA;AACD,QAAA,MAAM,MAAM;;;;aAIV,CAAA;AACF,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,CAAA;AASjD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAIvB,CAAA;AACF,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,YAAY,CAAC,CAAA;AACvD,eAAO,MAAM,KAAK,QAAS,MAAM,CAAC,UAAU,sCAAiE,CAAA;AA0B7G,eAAO,MAAM,UAAU,QAAS,MAAM,CAAC,UAAU,KAAG,MAwBnD,CAAA;AACD,eAAO,MAAM,WAAW,QAAS,MAAM,CAAC,UAAU,UAAU,MAAM,SAIjE,CAAA;AACD,eAAO,MAAM,WAAW,6BAAoB,CAAA;AAC5C,eAAO,MAAM,MA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