@wirecat/cli-core 0.422.0 → 0.423.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.
@@ -37,8 +37,8 @@ const conversationBuildCommand = (messenger) => boundOptions(reachesOtherService
37
37
  .option("--chat <chat>", messenger.chatArgument)
38
38
  .option("--analyze", "link batches using the configured analysis provider; requires --chat and remembers consent for this chat/provider")
39
39
  .addOption(new Option("--analysis-provider <provider>", "analysis: agent, openai or anthropic"))
40
- .option("--model <model>", "analysis model; overrides analysis_model")
41
- .option("--base-url <url>", "analysis API endpoint; overrides analysis_base_url")
40
+ .option("--model <model>", "analysis model; overrides models.analysis.model")
41
+ .option("--base-url <url>", "analysis API endpoint; overrides models.analysis.base_url")
42
42
  .option("--size <n>", "analysis answer messages per batch, 10–200; default 50", positiveCount("--size"))
43
43
  .option("--max-tokens <n>", "analysis input/output reservation cap per run; default 100000", positiveCount("--max-tokens")), { chunks: false }).action(async function () {
44
44
  const options = this.optsWithGlobals();
@@ -93,7 +93,6 @@ const conversationBuildCommand = (messenger) => boundOptions(reachesOtherService
93
93
  return;
94
94
  }
95
95
  if (options.analysisProvider !== undefined ||
96
- options.provider !== undefined ||
97
96
  options.model !== undefined ||
98
97
  options.baseUrl !== undefined ||
99
98
  options.size !== undefined ||
@@ -133,10 +132,7 @@ const embeddingClearCommand = (messenger) => withModelOptions(destroysNothing(an
133
132
  const chat = chatOf(options);
134
133
  const context = messengerContext(this, messenger);
135
134
  refuseLocalWrite(context, messenger.app.command, EMBED_KEY);
136
- const given = options.model !== undefined ||
137
- options.embeddingProvider !== undefined ||
138
- options.provider !== undefined ||
139
- options.baseUrl !== undefined;
135
+ const given = options.model !== undefined || options.embeddingProvider !== undefined || options.baseUrl !== undefined;
140
136
  const model = given ? choiceOf(options, messenger, context, { needKey: false }) : undefined;
141
137
  const cleared = await context.withServices((services) => services.embeddings.clear(chat, model));
142
138
  renderAnswer(this, context, itemOf(cleared), () => `${cleared.cleared} vectors dropped\n`);
@@ -379,14 +375,14 @@ export const conversationsCommand = (messenger) => {
379
375
  .option("--chat <chat>", "revoke only this chat's consents; defaults to every chat")
380
376
  .addOption(new Option("--consent-provider <identity>", "exact provider identity from consents list; defaults to every provider"))
381
377
  .action(async function () {
382
- const { chat, provider, consentProvider } = this.opts();
378
+ const { chat, consentProvider } = this.opts();
383
379
  const context = messengerContext(this, messenger);
384
380
  refuseLocalWrite(context, messenger.app.command, LINKS_KEY);
385
381
  await context.withStore(async (store, account) => {
386
382
  const chatId = chat === undefined
387
383
  ? undefined
388
384
  : (await servicesFor(storedDeps(messenger, store, account, context.guard)).conversations.batchStatus(chat, BATCH_SIZE.default)).chat;
389
- await analysisConsents(store, account).revoke(chatId, consentProvider ?? provider);
385
+ await analysisConsents(store, account).revoke(chatId, consentProvider);
390
386
  });
391
387
  renderAnswer(this, context, itemOf({ revoked: true }));
392
388
  });
@@ -1,5 +1,6 @@
1
+ import { existsSync } from "node:fs";
1
2
  import { dirname, resolve } from "node:path";
2
- import { writeSecurely } from "@wirecat/cli-base";
3
+ import { configFilePath, resolvePaths, writeSecurely } from "@wirecat/cli-base";
3
4
  import { annotate } from "@wirecat/cli-base/commands";
4
5
  import { Command } from "commander";
5
6
  import { engineStates } from "../../attachments/extract.js";
@@ -11,6 +12,8 @@ import { storePath } from "../../store/path.js";
11
12
  import { baseContext, environmentOf, outputFor } from "../context.js";
12
13
  import { destroysNothing, LOCAL_WRITE, NO_EFFECTS, REMOTE_READ } from "../effects.js";
13
14
  import { itemOf, renderAnswer, snakeKeys } from "../envelope.js";
15
+ import { unknownPermissionIssues } from "../permission-keys.js";
16
+ import { NONE_NAMED } from "../settings.js";
14
17
  import { lineOf, nextStep } from "../steps.js";
15
18
  import { recalledAccount } from "./accounts.js";
16
19
  import { messengerContext } from "./context.js";
@@ -126,14 +129,45 @@ const diagnose = async (command, messenger) => {
126
129
  platform: process.platform,
127
130
  arch: process.arch,
128
131
  };
132
+ // Every problem in the file is reported, not refused: doctor is what a person runs when nothing else will.
129
133
  let context;
130
134
  try {
131
- context = baseContext(command, messenger.resolveSettings);
135
+ context = baseContext(command, (flags, options) => messenger.resolveSettings(flags, { ...options, needsProfile: false, readOnly: true, withIssues: true }));
132
136
  }
133
137
  catch (error) {
134
- return { report: { cli, config: { error: messageOf(error) } } };
138
+ // Not the file: a profile lock, a flag or an environment variable the settings refuse.
139
+ const path = configFilePath(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config);
140
+ return {
141
+ report: {
142
+ cli,
143
+ config: { path, found: existsSync(path), issues: [] },
144
+ settings: { error: messageOf(error) },
145
+ store: snakeKeys(await storeSummary(env)),
146
+ runs: { directory: runsDirFor(app, env), kept: listRuns(runsDirFor(app, env)).length },
147
+ },
148
+ };
135
149
  }
136
150
  const { settings, renderer } = context;
151
+ const config = {
152
+ path: settings.configPath,
153
+ found: settings.configFound,
154
+ issues: [
155
+ ...(settings.configIssues ?? []),
156
+ ...unknownPermissionIssues(command, settings, app.command, messenger.permissionKey),
157
+ ],
158
+ };
159
+ if (settings.sources.profile === NONE_NAMED)
160
+ return {
161
+ renderer,
162
+ report: {
163
+ cli,
164
+ profile: null,
165
+ config,
166
+ store: snakeKeys(await storeSummary(env)),
167
+ readers: engineStates(),
168
+ runs: { directory: runsDirFor(app, env), kept: listRuns(runsDirFor(app, env)).length },
169
+ },
170
+ };
137
171
  const { profile } = settings;
138
172
  const account = recalledAccount(app, provider, profile, env);
139
173
  const store = storePath(env);
@@ -151,7 +185,7 @@ const diagnose = async (command, messenger) => {
151
185
  report: {
152
186
  cli,
153
187
  profile,
154
- config: { path: settings.configPath, found: settings.configFound },
188
+ config,
155
189
  account: { remembered: account?.account ?? null },
156
190
  // A session file on disk says nothing about whether the messenger still accepts it.
157
191
  login: { state: "not checked" },
@@ -2,7 +2,6 @@ import { CliError } from "@wirecat/cli-base";
2
2
  import { annotate } from "@wirecat/cli-base/commands";
3
3
  import { Command } from "commander";
4
4
  import { renderMessages } from "../../render/messages.js";
5
- import { kindsOf } from "../../services/inbox.js";
6
5
  import { modelWith } from "../../speech/hearing.js";
7
6
  import { REMOTE_READ } from "../effects.js";
8
7
  import { renderAnswer } from "../envelope.js";
@@ -44,15 +43,12 @@ export const inboxCommand = (messenger) => annotate(new Command("inbox"), {
44
43
  .option(...MODEL_OPTION)
45
44
  .addHelpText("after", "To mark a chat read, use `chats mark-read <chat>`. The other side sees it.")
46
45
  .action(async function (query) {
47
- const { new: fresh, all, kind, transcribe, model, } = this.opts();
46
+ const { new: fresh, all, transcribe, model, } = this.opts();
48
47
  const hearWith = modelWith(transcribe, model);
49
48
  const context = messengerContext(this, messenger);
50
49
  const { app } = messenger;
51
50
  const { settings, renderer, format, env } = context;
52
- const { since, meta, kinds: queriedKinds } = catchUpQuery(query, INBOX_QUERY, "inbox");
53
- if (kind !== undefined && queriedKinds !== undefined)
54
- throw new CliError("validation_error", "give kind: or its legacy --kind spelling, not both");
55
- const kinds = queriedKinds ?? (kind === undefined ? undefined : kindsOf(kind));
51
+ const { since, meta, kinds } = catchUpQuery(query, INBOX_QUERY, "inbox");
56
52
  if (fresh && since !== undefined)
57
53
  throw new CliError("validation_error", "--new keeps its own point — not with a date in the query");
58
54
  const saved = fresh && since === undefined
@@ -65,8 +65,7 @@ export const privatePeopleCommands = (messenger) => {
65
65
  command.action(async function (person, id) {
66
66
  const context = messengerContext(this, messenger);
67
67
  refuseLocalWrite(context, messenger.app.command, `contacts.notes.${name}`);
68
- const { textFile, file: legacyFile, revision, } = this.opts();
69
- const file = textFile ?? legacyFile;
68
+ const { textFile: file, revision } = this.opts();
70
69
  const text = file === undefined || file === "-" ? await readAll(context.stdin) : await readFile(file, "utf8");
71
70
  const version = Number(revision);
72
71
  if (name === "edit" && (!Number.isSafeInteger(version) || version < 1))
@@ -3,7 +3,7 @@ import { annotate } from "@wirecat/cli-base/commands";
3
3
  import { Command } from "commander";
4
4
  import { parseDuration } from "../../domain/duration.js";
5
5
  import { renderMessages } from "../../render/messages.js";
6
- import { kindsOf, REVIEW_DAYS, reviewStart, UNANSWERED_HOURS } from "../../services/inbox.js";
6
+ import { REVIEW_DAYS, reviewStart, UNANSWERED_HOURS } from "../../services/inbox.js";
7
7
  import { modelWith } from "../../speech/hearing.js";
8
8
  import { REMOTE_READ } from "../effects.js";
9
9
  import { renderAnswer } from "../envelope.js";
@@ -45,9 +45,7 @@ export const reviewCommand = (messenger) => annotate(new Command("review"), {
45
45
  const hearWith = modelWith(options.transcribe, options.model);
46
46
  const context = messengerContext(this, messenger);
47
47
  const { settings, renderer, format, env } = context;
48
- const { since: from, chat, meta, kinds: queriedKinds } = catchUpQuery(query, REVIEW_QUERY, "review");
49
- if (options.kind !== undefined && queriedKinds !== undefined)
50
- throw new CliError("validation_error", "give kind: or its legacy --kind spelling, not both");
48
+ const { since: from, chat, meta, kinds } = catchUpQuery(query, REVIEW_QUERY, "review");
51
49
  if (options.new && (from !== undefined || options.unanswered !== undefined)) {
52
50
  // An open question stays open: moving past it would drop it from the next review.
53
51
  throw new CliError("validation_error", "--new keeps its own point — not with a date or --unanswered");
@@ -62,7 +60,6 @@ export const reviewCommand = (messenger) => annotate(new Command("review"), {
62
60
  : undefined;
63
61
  const since = from ?? saved?.first ?? reviewStart();
64
62
  const hours = options.unanswered === undefined ? undefined : unansweredHours(options.unanswered);
65
- const kinds = queriedKinds ?? (options.kind === undefined ? undefined : kindsOf(options.kind));
66
63
  let hearing;
67
64
  const transcribe = options.transcribe === true;
68
65
  const { found, reader } = await context.withServices(async (services, connect) => {
@@ -1,5 +1,7 @@
1
1
  import type { Command } from "commander";
2
2
  import { type PermissionKey } from "../sends/permissions.js";
3
+ import { type ConfigIssue } from "./config-issues.js";
4
+ import type { Settings } from "./settings.js";
3
5
  export type PermissionKeyOf = (command: Command) => PermissionKey | null | undefined;
4
6
  /**
5
7
  * The keys `permissions` may name: every command of the program, every write key, and each of their
@@ -9,5 +11,10 @@ export declare const knownPermissionKeys: (command: Command, keyOf?: PermissionK
9
11
  /** The known keys one level under the unknown key's parent, to name in the refusal. */
10
12
  export declare const knownBeside: (key: PermissionKey, known: ReadonlySet<PermissionKey>) => PermissionKey[];
11
13
  export declare const unknownPermissionKeys: (levels: Readonly<Record<PermissionKey, unknown>>, known: ReadonlySet<PermissionKey>) => PermissionKey[];
12
- /** A saved key no command checks would do nothing, so the command refuses to run; `unset` names the fix. */
13
- export declare const refuseUnknownPermissionKeys: (command: Command, levels: Readonly<Record<PermissionKey, unknown>>, unset: string, keyOf?: PermissionKeyOf) => void;
14
+ /** Every unknown permission key saved in the file, in every section and profile, with the unset that removes it. */
15
+ export declare const unknownPermissionIssues: (command: Command, settings: Pick<Settings, "configPath" | "savedPermissions" | "permissions" | "permissionSources" | "profile">, tool: string, keyOf?: PermissionKeyOf) => ConfigIssue[];
16
+ /**
17
+ * A saved key no command checks would do nothing, so the command refuses to run and names the unset that removes
18
+ * it. A `--permission` key is checked too: it is no file's, so the flag is the fix.
19
+ */
20
+ export declare const refuseUnknownPermissionKeys: (command: Command, settings: Pick<Settings, "configPath" | "savedPermissions" | "permissions" | "permissionSources" | "profile">, tool: string, keyOf?: PermissionKeyOf) => void;
@@ -1,5 +1,6 @@
1
1
  import { CliError } from "@wirecat/cli-base";
2
2
  import { CEILING_KEY, keyForCommand, WRITE_KEYS } from "../sends/permissions.js";
3
+ import { issueMessage, permissionIssues, publicIssue } from "./config-issues.js";
3
4
  const pathOf = (command) => {
4
5
  const words = [];
5
6
  for (let at = command; at?.parent; at = at.parent)
@@ -42,10 +43,24 @@ export const knownBeside = (key, known) => {
42
43
  .sort();
43
44
  };
44
45
  export const unknownPermissionKeys = (levels, known) => Object.keys(levels).filter((key) => key !== CEILING_KEY && !known.has(key));
45
- /** A saved key no command checks would do nothing, so the command refuses to run; `unset` names the fix. */
46
- export const refuseUnknownPermissionKeys = (command, levels, unset, keyOf) => {
47
- const [key] = unknownPermissionKeys(levels, knownPermissionKeys(command, keyOf));
48
- if (key === undefined)
49
- return;
50
- throw new CliError("configuration_error", `permissions.${key} names no command — remove it with \`${unset} permissions.${key}\``, { permission: key });
46
+ /** Every unknown permission key saved in the file, in every section and profile, with the unset that removes it. */
47
+ export const unknownPermissionIssues = (command, settings, tool, keyOf) => {
48
+ const saved = settings.savedPermissions ??
49
+ Object.keys(settings.permissions)
50
+ .filter((key) => key !== CEILING_KEY && settings.permissionSources[key] !== "flag")
51
+ .map((key) => ({ key, at: ["profiles", settings.profile, "permissions", key] }));
52
+ return permissionIssues(saved, knownPermissionKeys(command, keyOf), { file: settings.configPath, tool }).map(publicIssue);
53
+ };
54
+ /**
55
+ * A saved key no command checks would do nothing, so the command refuses to run and names the unset that removes
56
+ * it. A `--permission` key is checked too: it is no file's, so the flag is the fix.
57
+ */
58
+ export const refuseUnknownPermissionKeys = (command, settings, tool, keyOf) => {
59
+ const issues = unknownPermissionIssues(command, settings, tool, keyOf);
60
+ if (issues.length > 0)
61
+ throw new CliError("configuration_error", issueMessage(issues), { permission: issues[0]?.key });
62
+ const flagged = Object.keys(settings.permissions).filter((key) => settings.permissionSources[key] === "flag");
63
+ const [key] = unknownPermissionKeys(Object.fromEntries(flagged.map((one) => [one, true])), knownPermissionKeys(command, keyOf));
64
+ if (key !== undefined)
65
+ throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
51
66
  };
@@ -1,8 +1,9 @@
1
1
  import type { Command } from "commander";
2
- import { type Level, type PermissionKey } from "../sends/permissions.js";
2
+ import { type PermissionKey } from "../sends/permissions.js";
3
+ import type { Settings } from "./settings.js";
3
4
  export declare class PreviewComplete extends Error {
4
5
  }
5
- export declare const preview: (command: Command, permissions: Readonly<Record<string, Level>>, unset: string, keyOf?: (path: readonly string[]) => PermissionKey | null | undefined) => {
6
+ export declare const preview: (command: Command, settings: Pick<Settings, "permissions" | "permissionSources" | "configPath" | "savedPermissions" | "profile">, tool: string, keyOf?: (path: readonly string[]) => PermissionKey | null | undefined) => {
6
7
  preview: boolean;
7
8
  path: string[];
8
9
  permission: {
@@ -1,14 +1,15 @@
1
1
  import { CliError } from "@wirecat/cli-base";
2
2
  import { metaOf } from "@wirecat/cli-base/commands";
3
3
  import { writes as writesAnything } from "@wirecat/cli-base/standards";
4
- import { keyForCommand, levelFor, readKeysForCommand, WRITE_KEYS, } from "../sends/permissions.js";
4
+ import { keyForCommand, levelFor, readKeysForCommand, WRITE_KEYS } from "../sends/permissions.js";
5
5
  import { commandPathOf } from "./command-contract.js";
6
6
  import { refuseUnknownPermissionKeys } from "./permission-keys.js";
7
7
  export class PreviewComplete extends Error {
8
8
  }
9
- export const preview = (command, permissions, unset, keyOf) => {
9
+ export const preview = (command, settings, tool, keyOf) => {
10
10
  const path = commandPathOf(command);
11
- refuseUnknownPermissionKeys(command, permissions, unset, keyOf && ((one) => keyOf(commandPathOf(one))));
11
+ const { permissions } = settings;
12
+ refuseUnknownPermissionKeys(command, settings, tool, keyOf && ((one) => keyOf(commandPathOf(one))));
12
13
  const key = keyForCommand(path);
13
14
  const level = key ? levelFor(permissions, key).level : "allow";
14
15
  for (const source of readKeysForCommand(path)) {
@@ -10,7 +10,7 @@ export interface ProgramDefinition {
10
10
  /** The CLI's own settings, for keeping a failure that happened before its command could; plain ones without. */
11
11
  configuration?: {
12
12
  permissionKey?: (path: readonly string[]) => string | null | undefined;
13
- resolveSettings: (flags?: GlobalFlags, options?: ResolveOptions) => Pick<Settings, "profile" | "keepFailedRuns" | "keepRunsForDays" | "skillHint"> & Partial<Pick<Settings, "permissions">>;
13
+ resolveSettings: (flags?: GlobalFlags, options?: ResolveOptions) => Pick<Settings, "profile" | "keepFailedRuns" | "keepRunsForDays" | "skillHint"> & Partial<Pick<Settings, "permissions" | "permissionSources" | "configPath" | "savedPermissions">>;
14
14
  };
15
15
  configure?: (program: Command) => void;
16
16
  /** The tool's pitch and "what you can do" lines on `--help` and a bare run. */
@@ -26,7 +26,7 @@ import { showInputFields } from "./input-fields.js";
26
26
  import { MAX_BUFFERED_INPUT, provideInputPolicy } from "./input-policy.js";
27
27
  import { checkJson, liftJson } from "./json-fields.js";
28
28
  import { PreviewComplete, preview } from "./preview.js";
29
- import { asFirstWord, commandWords, liftProfile, PROFILE_FREE, sampleCommand, valuedOptions } from "./profile.js";
29
+ import { commandWords, liftProfile, PROFILE_FREE, sampleCommand, valuedOptions } from "./profile.js";
30
30
  import { absolutePaths, relayTarget } from "./relay-route.js";
31
31
  import { settingsFor } from "./settings.js";
32
32
  import { assertSharedContracts } from "./shared-contracts.js";
@@ -379,9 +379,13 @@ const runOnce = async (argv, definition, options) => {
379
379
  // No permission governs housekeeping like `skill install`, so no profile's settings change its preview.
380
380
  needsProfile: keyForCommand(path) !== null,
381
381
  });
382
- const permissions = "permissions" in resolved ? resolved.permissions : {};
383
- const unset = `${command} ${asFirstWord(resolved.profile)}config unset${path[0] === "bot" ? " --bot" : ""}`;
384
- const previewed = preview(action, permissions, unset, definition.configuration?.permissionKey);
382
+ const previewed = preview(action, {
383
+ permissions: resolved.permissions ?? {},
384
+ permissionSources: resolved.permissionSources ?? {},
385
+ configPath: resolved.configPath ?? "",
386
+ profile: resolved.profile,
387
+ ...(resolved.savedPermissions ? { savedPermissions: resolved.savedPermissions } : {}),
388
+ }, command, definition.configuration?.permissionKey);
385
389
  renderAnswer(action, outputFor(action), itemOf(snakeKeys(previewed)));
386
390
  throw new PreviewComplete();
387
391
  }
@@ -2,6 +2,7 @@ import * as v from "valibot";
2
2
  import { type AISettings } from "../analysis/settings.js";
3
3
  import { type AppIdentity } from "../ports/app.js";
4
4
  import { type Level, type PermissionKey } from "../sends/permissions.js";
5
+ import { type ConfigIssue } from "./config-issues.js";
5
6
  export declare const plain: (rule: string) => (issue: v.BaseIssue<unknown>) => string;
6
7
  export declare const count: v.SchemaWithPipe<readonly [v.NumberSchema<(issue: v.BaseIssue<unknown>) => string>, v.IntegerAction<number, (issue: v.BaseIssue<unknown>) => string>, v.MinValueAction<number, 1, (issue: v.BaseIssue<unknown>) => string>]>;
7
8
  export declare const flag: v.BooleanSchema<(issue: v.BaseIssue<unknown>) => string>;
@@ -41,7 +42,6 @@ interface KindSection {
41
42
  profiles?: Record<string, Scope>;
42
43
  }
43
44
  export interface Config {
44
- default_profile?: string;
45
45
  defaults?: Scope;
46
46
  profiles: Record<string, Scope>;
47
47
  personal?: KindSection;
@@ -127,6 +127,19 @@ export interface Settings extends AISettings {
127
127
  /** This profile's entries and the shared defaults, for an adapter resolving its own fields with `first`. */
128
128
  configured: Scope;
129
129
  shared: Scope;
130
+ /**
131
+ * What is wrong in the file; empty unless resolved `withIssues`, which leaves those settings out. Optional for an
132
+ * app that builds `Settings` from a file of its own.
133
+ */
134
+ configIssues?: ConfigIssue[];
135
+ /**
136
+ * Every permission key saved anywhere in the file, for the program to check against its commands. An app that
137
+ * builds `Settings` itself leaves it out, and only the keys in force are checked.
138
+ */
139
+ savedPermissions?: {
140
+ key: PermissionKey;
141
+ at: string[];
142
+ }[];
130
143
  }
131
144
  export interface ResolveOptions {
132
145
  env?: NodeJS.ProcessEnv;
@@ -140,6 +153,11 @@ export interface ResolveOptions {
140
153
  needsProfile?: boolean;
141
154
  /** Read the config file without writing it: no default file. For a dry run. */
142
155
  readOnly?: boolean;
156
+ /**
157
+ * Load what is valid and report the rest in `configIssues`, rather than refuse: for `doctor`, which reports,
158
+ * and `config`, which repairs. Invalid JSON loads as an empty file.
159
+ */
160
+ withIssues?: boolean;
143
161
  }
144
162
  /** Where `profile` came from when none was named and the command needs none. */
145
163
  export declare const NONE_NAMED = "none named";
@@ -161,25 +179,22 @@ export declare const fromFile: <T>(settings: Pick<Settings, "configured" | "shar
161
179
  export declare const settingsFor: <T extends object = Record<never, never>>(app: AppIdentity, extension?: SettingsExtension<T>) => {
162
180
  resolveSettings: (flags?: GlobalFlags, options?: ResolveOptions) => Settings & T;
163
181
  configuredProfiles: (options?: ResolveOptions) => string[];
164
- changeSetting: (path: string, { profile, setting, value, kind, }: {
182
+ changeSetting: (path: string, { profile, setting, value, kind, root, }: {
165
183
  profile: string | undefined;
166
184
  setting: string;
167
185
  value: string | undefined;
168
186
  kind?: ProfileKind | undefined;
187
+ root?: boolean;
169
188
  }) => unknown;
170
189
  allSettings: string[];
171
190
  defaultsOnlyKeys: string[];
172
191
  schema: v.StrictObjectSchema<{
173
- default_profile: v.OptionalSchema<v.StringSchema<(issue: v.BaseIssue<unknown>) => string>, undefined>;
174
192
  defaults: v.OptionalSchema<v.StrictObjectSchema<{
175
193
  embedding_provider: ({
176
194
  embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
177
195
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
178
196
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
179
197
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
180
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
181
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
182
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
183
198
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
184
199
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
185
200
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
@@ -191,9 +206,6 @@ export declare const settingsFor: <T extends object = Record<never, never>>(app:
191
206
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
192
207
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
193
208
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
194
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
195
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
196
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
197
209
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
198
210
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
199
211
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
@@ -205,9 +217,6 @@ export declare const settingsFor: <T extends object = Record<never, never>>(app:
205
217
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
206
218
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
207
219
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
208
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
209
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
210
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
211
220
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
212
221
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
213
222
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
@@ -219,65 +228,17 @@ export declare const settingsFor: <T extends object = Record<never, never>>(app:
219
228
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
220
229
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
221
230
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
222
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
223
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
224
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
225
231
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
226
232
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
227
233
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
228
234
  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>;
229
235
  }, undefined>, undefined>, undefined>;
230
236
  })["embeddingDims"];
231
- analysis_provider: ({
232
- embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
233
- embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
234
- embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
235
- embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
236
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
237
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
238
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
239
- models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
240
- readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
241
- readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
242
- 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>;
243
- }, undefined>, undefined>, undefined>;
244
- })["analysisProvider"];
245
- analysis_model: ({
246
- embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
247
- embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
248
- embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
249
- embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
250
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
251
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
252
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
253
- models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
254
- readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
255
- readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
256
- 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>;
257
- }, undefined>, undefined>, undefined>;
258
- })["analysisModel"];
259
- analysis_base_url: ({
260
- embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
261
- embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
262
- embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
263
- embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
264
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
265
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
266
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
267
- models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
268
- readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
269
- readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
270
- 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>;
271
- }, undefined>, undefined>, undefined>;
272
- })["analysisBaseUrl"];
273
237
  models: ({
274
238
  embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
275
239
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
276
240
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
277
241
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
278
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
279
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
280
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
281
242
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
282
243
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
283
244
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
@@ -306,9 +267,6 @@ export declare const settingsFor: <T extends object = Record<never, never>>(app:
306
267
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
307
268
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
308
269
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
309
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
310
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
311
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
312
270
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
313
271
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
314
272
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
@@ -320,9 +278,6 @@ export declare const settingsFor: <T extends object = Record<never, never>>(app:
320
278
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
321
279
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
322
280
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
323
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
324
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
325
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
326
281
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
327
282
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
328
283
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
@@ -334,9 +289,6 @@ export declare const settingsFor: <T extends object = Record<never, never>>(app:
334
289
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
335
290
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
336
291
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
337
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
338
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
339
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
340
292
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
341
293
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
342
294
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
@@ -348,65 +300,17 @@ export declare const settingsFor: <T extends object = Record<never, never>>(app:
348
300
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
349
301
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
350
302
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
351
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
352
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
353
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
354
303
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
355
304
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
356
305
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
357
306
  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>;
358
307
  }, undefined>, undefined>, undefined>;
359
308
  })["embeddingDims"];
360
- analysis_provider: ({
361
- embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
362
- embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
363
- embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
364
- embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
365
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
366
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
367
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
368
- models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
369
- readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
370
- readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
371
- 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>;
372
- }, undefined>, undefined>, undefined>;
373
- })["analysisProvider"];
374
- analysis_model: ({
375
- embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
376
- embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
377
- embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
378
- embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
379
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
380
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
381
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
382
- models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
383
- readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
384
- readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
385
- 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>;
386
- }, undefined>, undefined>, undefined>;
387
- })["analysisModel"];
388
- analysis_base_url: ({
389
- embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
390
- embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
391
- embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
392
- embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
393
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
394
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
395
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
396
- models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
397
- readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
398
- readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
399
- 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>;
400
- }, undefined>, undefined>, undefined>;
401
- })["analysisBaseUrl"];
402
309
  models: ({
403
310
  embeddingProvider: v.OptionalSchema<v.PicklistSchema<["local", "openai"], undefined>, undefined>;
404
311
  embeddingModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
405
312
  embeddingBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
406
313
  embeddingDims: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 65536, undefined>]>, undefined>;
407
- analysisProvider: v.OptionalSchema<v.PicklistSchema<["agent", "openai", "anthropic"], undefined>, undefined>;
408
- analysisModel: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
409
- analysisBaseUrl: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "use an HTTP/S endpoint without credentials, query or fragment">]>, undefined>;
410
314
  models: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.StrictObjectSchema<{
411
315
  readonly provider: v.OptionalSchema<v.PicklistSchema<["off", "openai", "anthropic"], undefined>, undefined>;
412
316
  readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;