@askdb/config 1.0.0-beta.11 → 1.0.0-beta.13

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/README.md +20 -19
  2. package/dist/bootstrap.d.ts +3 -0
  3. package/dist/bootstrap.d.ts.map +1 -1
  4. package/dist/bootstrap.js +16 -0
  5. package/dist/bootstrap.js.map +1 -1
  6. package/dist/constants.d.ts +15 -4
  7. package/dist/constants.d.ts.map +1 -1
  8. package/dist/constants.js +15 -4
  9. package/dist/constants.js.map +1 -1
  10. package/dist/defaults.d.ts +37 -1
  11. package/dist/defaults.d.ts.map +1 -1
  12. package/dist/defaults.js +50 -10
  13. package/dist/defaults.js.map +1 -1
  14. package/dist/diagnostics.d.ts +10 -0
  15. package/dist/diagnostics.d.ts.map +1 -0
  16. package/dist/diagnostics.js +13 -0
  17. package/dist/diagnostics.js.map +1 -0
  18. package/dist/flatten.d.ts +8 -1
  19. package/dist/flatten.d.ts.map +1 -1
  20. package/dist/flatten.js +128 -117
  21. package/dist/flatten.js.map +1 -1
  22. package/dist/index.d.ts +4 -3
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +2 -1
  25. package/dist/index.js.map +1 -1
  26. package/dist/normalize.d.ts +53 -0
  27. package/dist/normalize.d.ts.map +1 -0
  28. package/dist/normalize.js +398 -0
  29. package/dist/normalize.js.map +1 -0
  30. package/dist/projection.d.ts +12 -1
  31. package/dist/projection.d.ts.map +1 -1
  32. package/dist/projection.js +12 -3
  33. package/dist/projection.js.map +1 -1
  34. package/dist/runtime-config.d.ts +66 -3
  35. package/dist/runtime-config.d.ts.map +1 -1
  36. package/dist/runtime-config.js +122 -46
  37. package/dist/runtime-config.js.map +1 -1
  38. package/dist/scaffold/ai.d.ts +30 -0
  39. package/dist/scaffold/ai.d.ts.map +1 -0
  40. package/dist/scaffold/ai.js +54 -0
  41. package/dist/scaffold/ai.js.map +1 -0
  42. package/dist/scaffold/index.d.ts +8 -0
  43. package/dist/scaffold/index.d.ts.map +1 -0
  44. package/dist/scaffold/index.js +7 -0
  45. package/dist/scaffold/index.js.map +1 -0
  46. package/dist/types.d.ts +244 -107
  47. package/dist/types.d.ts.map +1 -1
  48. package/package.json +11 -5
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { AskDbDialectId, AskDbLogLevel, AskDbModeV1, AskDbRagEmbedder, AskDbRagStore, AskDbReasoningEffort, AskDbStudioExecuteProvider } from "./constants.js";
1
+ import type { AskDbAiProviderId, AskDbDialectId, AskDbLogLevel, AskDbModeV1, AskDbRagEmbedder, AskDbRagStore, AskDbReasoningEffort, AskDbStudioExecuteProvider } from "./constants.js";
2
2
  /**
3
3
  * Authoring-time AskDB configuration: nested groups (`ai`, `introspection`, `rag`, …)
4
4
  * passed to {@link defineConfig} in `askdb.config.*`, then flattened to canonical env keys for the runtime snapshot.
@@ -7,48 +7,104 @@ import type { AskDbDialectId, AskDbLogLevel, AskDbModeV1, AskDbRagEmbedder, AskD
7
7
  * `defineConfig({ ... } satisfies AskDbConfig)` or `const cfg = { ... } satisfies AskDbConfig`.
8
8
  *
9
9
  */
10
- export type OpenaiConfig = {
10
+ /** Legacy model fields every connection type still accepts until the 1.0 cutover. */
11
+ type LegacyConnectionModel = {
12
+ /**
13
+ * @deprecated Use `ai.language.model`. Translated at load (with a warning) when this is the
14
+ * language section's connection, ignored on any other connection. Removed at 1.0.
15
+ */
16
+ model?: string;
17
+ };
18
+ /** Legacy Azure / Foundry field, also translated at load until the 1.0 cutover. */
19
+ type LegacyConnectionModelFamily = {
20
+ /** @deprecated Use `ai.language.modelFamily`. Removed at 1.0. */
21
+ modelFamily?: string;
22
+ };
23
+ /** OpenAI connection (`ai.providerConfig.openai`). */
24
+ export type OpenaiConnection = LegacyConnectionModel & {
25
+ /** Flattened to `OPENAI_API_KEY`. */
11
26
  apiKey?: string;
27
+ /** Flattened to `OPENAI_BASE_URL`; use it for an OpenAI-compatible endpoint. */
12
28
  baseUrl?: string;
13
- /** When unset, `flattenAskDbConfig` applies the default OpenAI chat model (see `@askdb/config` defaults). */
14
- model?: string;
15
29
  };
16
- export type AzureConfig = {
30
+ /** Azure OpenAI connection (`ai.providerConfig.azure`). */
31
+ export type AzureConnection = LegacyConnectionModel & LegacyConnectionModelFamily & {
17
32
  apiKey?: string;
18
33
  secondaryApiKey?: string;
19
- baseUrl?: string;
20
- /** When unset, `flattenAskDbConfig` applies the default Azure deployment name (see `@askdb/config` defaults). */
21
- model?: string;
22
- apiVersion?: string;
23
34
  /**
24
- * Underlying model id backing `model` (the deployment name), e.g. `"gpt-5"`
25
- * or `"o3-mini"`. Deployment names are arbitrary aliases chosen at deploy
26
- * time, so AskDB can't always infer reasoning-model support from `model`
27
- * alone — set this when your deployment name doesn't match the model id.
35
+ * Azure resource name — the subdomain of your endpoint, e.g. `"my-foundry"`
36
+ * for `https://my-foundry.openai.azure.com`. One of `resourceName` or
37
+ * `baseUrl` is required.
28
38
  */
29
- modelFamily?: string;
39
+ resourceName?: string;
40
+ /** Full endpoint URL. Overrides `resourceName` when both are set. */
41
+ baseUrl?: string;
42
+ apiVersion?: string;
30
43
  };
31
- export type FoundryConfig = {
44
+ /** Microsoft Foundry connection (`ai.providerConfig.foundry`): the same fields as {@link AzureConnection}. */
45
+ export type FoundryConnection = AzureConnection;
46
+ /** Anthropic connection (`ai.providerConfig.anthropic`). Anthropic has no embeddings API. */
47
+ export type AnthropicConnection = LegacyConnectionModel & {
32
48
  apiKey?: string;
33
- secondaryApiKey?: string;
34
- model?: string;
35
- apiVersion?: string;
36
49
  baseUrl?: string;
37
- /** See {@link AzureConfig.modelFamily}. */
38
- modelFamily?: string;
39
50
  };
40
- export type AnthropicConfig = {
51
+ /** Google Gemini connection (`ai.providerConfig.google`). */
52
+ export type GoogleConnection = LegacyConnectionModel & {
41
53
  apiKey?: string;
42
54
  baseUrl?: string;
43
- /** When unset, `flattenAskDbConfig` applies the default Anthropic chat model (see `@askdb/config` defaults). */
44
- model?: string;
45
55
  };
46
- export type GoogleConfig = {
56
+ /** Vercel AI Gateway connection (`ai.providerConfig.gateway`), built into `ai` — no extra provider package. */
57
+ export type GatewayConnection = LegacyConnectionModel & {
58
+ /** AI Gateway API key. Flattened to `AI_GATEWAY_API_KEY`. */
47
59
  apiKey?: string;
48
60
  baseUrl?: string;
49
- /** When unset, `flattenAskDbConfig` applies the default Gemini chat model (see `@askdb/config` defaults). */
50
- model?: string;
51
61
  };
62
+ /**
63
+ * Connection for a provider AskDB has no dedicated type for, keyed by its provider id
64
+ * (`ai.providerConfig.mistral`). Flattened to the universal `ASKDB_AI_*` keys; works end to
65
+ * end only when the consuming registry has an adapter registered under that provider id.
66
+ */
67
+ export type CustomConnection = LegacyConnectionModel & {
68
+ apiKey?: string;
69
+ baseUrl?: string;
70
+ };
71
+ /** A connection plus its name, unique within its provider. */
72
+ export type AiNamedConnection<T> = T & {
73
+ /** Defaults to `"default"`. Unique within its provider. */
74
+ name?: string;
75
+ };
76
+ /** One connection, or a list of them when a provider needs more than one (for example two Azure resources). */
77
+ export type AiConnections<T> = AiNamedConnection<T> | readonly AiNamedConnection<T>[];
78
+ /**
79
+ * `ai.providerConfig`: provider connections only (keys, endpoints, resources, API versions),
80
+ * keyed by provider id. The model choice lives in `ai.language` and `ai.embedding`.
81
+ */
82
+ export type AiProviderConnections = {
83
+ openai?: AiConnections<OpenaiConnection>;
84
+ azure?: AiConnections<AzureConnection>;
85
+ foundry?: AiConnections<FoundryConnection>;
86
+ anthropic?: AiConnections<AnthropicConnection>;
87
+ google?: AiConnections<GoogleConnection>;
88
+ gateway?: AiConnections<GatewayConnection>;
89
+ /**
90
+ * Any other key is a custom provider id (an adapter registered under that name), whose
91
+ * connection is a {@link CustomConnection}. TypeScript also checks the keys above against this
92
+ * signature, so it accepts the widest built-in connection (Azure's) too.
93
+ */
94
+ [provider: string]: AiConnections<CustomConnection> | AiConnections<AzureConnection> | undefined;
95
+ };
96
+ /** @deprecated Use {@link OpenaiConnection}. Removed at 1.0. */
97
+ export type OpenaiConfig = OpenaiConnection;
98
+ /** @deprecated Use {@link AzureConnection}. Removed at 1.0. */
99
+ export type AzureConfig = AzureConnection;
100
+ /** @deprecated Use {@link FoundryConnection}. Removed at 1.0. */
101
+ export type FoundryConfig = FoundryConnection;
102
+ /** @deprecated Use {@link AnthropicConnection}. Removed at 1.0. */
103
+ export type AnthropicConfig = AnthropicConnection;
104
+ /** @deprecated Use {@link GoogleConnection}. Removed at 1.0. */
105
+ export type GoogleConfig = GoogleConnection;
106
+ /** @deprecated Use {@link GatewayConnection}. Removed at 1.0. */
107
+ export type GatewayConfig = GatewayConnection;
52
108
  /**
53
109
  * Provider-portable reasoning/latency effort for AskDB model calls. Unset
54
110
  * (the default) preserves current behavior: no reasoning `providerOptions`
@@ -68,92 +124,78 @@ export type AskDbAiReasoningConfig = {
68
124
  */
69
125
  enrichment?: AskDbReasoningEffort;
70
126
  };
71
- /** All provider-specific configs as optional fields — intersected per-branch to require only the active provider's key. */
72
- export type AiProviderConfigs = {
73
- openai?: OpenaiConfig;
74
- azure?: AzureConfig;
75
- foundry?: FoundryConfig;
76
- anthropic?: AnthropicConfig;
77
- google?: GoogleConfig;
78
- };
79
- /** Discriminated union branch for `ai` when `provider` is `"openai"`. */
80
- export type OpenaiAiConfig = {
81
- provider: "openai";
82
- providerConfig: AiProviderConfigs & {
83
- openai: OpenaiConfig;
84
- };
85
- reasoning?: AskDbAiReasoningConfig;
86
- };
87
- /** Discriminated union branch for `ai` when `provider` is `"azure"`. */
88
- export type AzureAiConfig = {
89
- provider: "azure";
90
- providerConfig: AiProviderConfigs & {
91
- azure: AzureConfig;
92
- };
93
- reasoning?: AskDbAiReasoningConfig;
94
- };
95
- /** Discriminated union branch for `ai` when `provider` is `"foundry"`. */
96
- export type FoundryAiConfig = {
97
- provider: "foundry";
98
- providerConfig: AiProviderConfigs & {
99
- foundry: FoundryConfig;
100
- };
101
- reasoning?: AskDbAiReasoningConfig;
102
- };
103
- /** Discriminated union branch for `ai` when `provider` is `"anthropic"`. */
104
- export type AnthropicAiConfig = {
105
- provider: "anthropic";
106
- providerConfig: AiProviderConfigs & {
107
- anthropic: AnthropicConfig;
108
- };
109
- reasoning?: AskDbAiReasoningConfig;
110
- };
111
- /** Discriminated union branch for `ai` when `provider` is `"google"`. */
112
- export type GoogleAiConfig = {
113
- provider: "google";
114
- providerConfig: AiProviderConfigs & {
115
- google: GoogleConfig;
116
- };
127
+ /** `ai.language`: the language model AskDB generates SQL and enrichment suggestions with. */
128
+ export type AskDbAiLanguageConfig = {
129
+ /** Defaults to `ai.provider`. */
130
+ provider?: AskDbAiProviderId | (string & {});
131
+ /** Name of a connection in `ai.providerConfig.<provider>`. Defaults to `"default"`. */
132
+ connection?: string;
133
+ /** Defaults to the provider's default language model (none for a custom provider). On Azure, the deployment name. */
134
+ model?: string;
135
+ /**
136
+ * Underlying model id when `model` is an alias, e.g. `"gpt-5"` or `"o3-mini"` behind an Azure
137
+ * deployment name. Deployment names are arbitrary, so AskDB can't always infer reasoning-model
138
+ * support from `model` alone. Read on Azure and Foundry.
139
+ */
140
+ modelFamily?: string;
117
141
  reasoning?: AskDbAiReasoningConfig;
118
142
  };
119
- /** Generic connection settings for a provider AskDB has no dedicated branch for.
120
- * Flattened to the universal ASKDB_AI_* keys; works end to end only when the
121
- * consuming registry has an adapter registered under this provider name. */
122
- export type CustomProviderConfig = {
123
- apiKey?: string;
124
- baseUrl?: string;
143
+ /** `ai.embedding`: the embedding model behind `rag.embedder: "ai"`. Ignored when `rag.embedder` is `"mock"`. */
144
+ export type AskDbAiEmbeddingConfig = {
145
+ /** Defaults to `ai.provider`. Anthropic has no embeddings API, so it can't be this section's provider. */
146
+ provider?: AskDbAiProviderId | (string & {});
147
+ /** Name of a connection in `ai.providerConfig.<provider>`. Defaults to `"default"`. */
148
+ connection?: string;
149
+ /** Required when `rag.embedder` is `"ai"`: AskDB has no default embedding model. On Azure, the deployment name. */
125
150
  model?: string;
151
+ /**
152
+ * Vector size to request from the provider, as a positive integer or a string holding one, for
153
+ * models that let you choose one (OpenAI's text-embedding-3 models, Gemini's). Unset: the
154
+ * model's own width, which AskDB learns from the model when it builds an index.
155
+ */
156
+ dimensions?: string | number;
126
157
  };
127
- /** Branch for custom/third-party providers. `(string & {})` preserves literal
128
- * autocomplete for the known providers while accepting any other string.
158
+ /**
159
+ * `ai`: provider connections plus one section per use of a model.
129
160
  *
130
- * **Type-level hole**: TypeScript cannot exclude specific string literals from
131
- * `string & {}`, so every known provider literal (`"openai"`, `"azure"`, …) is
132
- * technically assignable to this branch as well. As a result, a misconfigured
133
- * object like `{ provider: "openai" }` (no `providerConfig`) compiles without
134
- * error. `flattenAskDbConfig` closes this gap at runtime: it calls
135
- * `requireProviderBranch` in each known-provider branch, which throws a clear
136
- * `askdb.config: ai.providerConfig.<provider> is required …` error instead of
137
- * crashing with a raw `TypeError` when the expected branch is absent. */
138
- export type CustomAiConfig = {
139
- /** Any provider string not covered by a first-party branch. Works end to end
140
- * only when the host registry has an adapter registered under this name.
141
- * See the three-tier model: known literal (zero code) → custom string + registered
142
- * adapter (~40 lines) → BYO `LanguageModel` via `ask({ model })` (no config). */
143
- provider: string & {};
144
- providerConfig?: {
145
- custom?: CustomProviderConfig;
146
- };
161
+ * - **`provider`**: the default provider for both sections.
162
+ * - **`providerConfig`**: provider connections, keyed by provider id.
163
+ * - **`language`**: the language model (NL→SQL, enrichment suggestions).
164
+ * - **`embedding`**: the embedding model behind `rag.embedder: "ai"`.
165
+ *
166
+ * A section's provider is `section.provider ?? ai.provider`, and its connection is
167
+ * `section.connection ?? "default"` within that provider. Loading fails when a section resolves
168
+ * to no provider or to a connection that doesn't exist.
169
+ */
170
+ export type AskDbAiConfig = {
171
+ provider?: AskDbAiProviderId | (string & {});
172
+ providerConfig?: AiProviderConnections;
173
+ language?: AskDbAiLanguageConfig;
174
+ embedding?: AskDbAiEmbeddingConfig;
175
+ /** @deprecated Use `ai.language.reasoning`. Removed at 1.0. */
147
176
  reasoning?: AskDbAiReasoningConfig;
148
177
  };
149
- /** Discriminated union of all supported AI provider branches plus the generic
150
- * custom-provider escape hatch for third-party or host-registered adapters. */
151
- export type AskDbAiConfig = OpenaiAiConfig | AzureAiConfig | FoundryAiConfig | AnthropicAiConfig | GoogleAiConfig | CustomAiConfig;
178
+ /** @deprecated Use {@link AskDbAiConfig}. Removed at 1.0. */
179
+ export type OpenaiAiConfig = AskDbAiConfig;
180
+ /** @deprecated Use {@link AskDbAiConfig}. Removed at 1.0. */
181
+ export type AzureAiConfig = AskDbAiConfig;
182
+ /** @deprecated Use {@link AskDbAiConfig}. Removed at 1.0. */
183
+ export type FoundryAiConfig = AskDbAiConfig;
184
+ /** @deprecated Use {@link AskDbAiConfig}. Removed at 1.0. */
185
+ export type AnthropicAiConfig = AskDbAiConfig;
186
+ /** @deprecated Use {@link AskDbAiConfig}. Removed at 1.0. */
187
+ export type GoogleAiConfig = AskDbAiConfig;
188
+ /** @deprecated Use {@link AskDbAiConfig}. Removed at 1.0. */
189
+ export type GatewayAiConfig = AskDbAiConfig;
190
+ /** @deprecated Use `ai.embedding` and a connection in `ai.providerConfig`. Translated at load (with a warning); removed at 1.0. */
152
191
  export type OpenaiRagEmbedderConfig = {
192
+ /** @deprecated Use `ai.embedding.model`. */
153
193
  model?: string;
154
- /** Raw env string or number; positive integer parsed in {@link flattenAskDbConfig}, else derived from `model`. */
194
+ /** @deprecated Use `ai.embedding.dimensions`. */
155
195
  dimension?: string | number;
196
+ /** @deprecated Put the key on a connection in `ai.providerConfig`. */
156
197
  apiKey?: string;
198
+ /** @deprecated Put the base URL on a connection in `ai.providerConfig`. */
157
199
  baseUrl?: string;
158
200
  };
159
201
  export type FileStoreConfig = {
@@ -167,7 +209,11 @@ export type PgvectorStoreConfig = {
167
209
  /** Connection string for pgvector (maps to `ASKDB_PGVECTOR_URL`). */
168
210
  databaseUrl?: string;
169
211
  table?: string;
170
- /** Positive integer from env or number; when unset, matches resolved RAG embedder dimensions in {@link flattenAskDbConfig}. */
212
+ /**
213
+ * @deprecated Ignored with `rag.embedder: "mock"`, whose vectors are always 64 wide (a load warning
214
+ * says so). With `rag.embedder: "ai"`, use `ai.embedding.dimensions` (translated at load, with a
215
+ * warning). Removed at 1.0.
216
+ */
171
217
  dimensions?: string | number;
172
218
  /** When unset, {@link flattenAskDbConfig} uses `hnsw`. */
173
219
  indexStrategy?: string;
@@ -222,6 +268,14 @@ export type PostgresIntrospectionConfig = {
222
268
  * When unset/blank, `flattenAskDbConfig` uses the package default `./askdb/`.
223
269
  */
224
270
  outputDir?: string;
271
+ /**
272
+ * Schemas to introspect, like `askdb introspect --schemas` (which overrides it), e.g.
273
+ * `["public", "sales"]`. On MySQL/MariaDB these are databases: each becomes its own
274
+ * namespace and cross-database foreign keys are kept; without a list, only the
275
+ * connection URL's database is read, under the `public` namespace. On Postgres and SQL
276
+ * Server, the default is every non-system schema.
277
+ */
278
+ schemas?: string[];
225
279
  };
226
280
  /** Discriminated union branch for `introspection` when `provider` is `"prisma"`. */
227
281
  export type PrismaIntrospectionConfig = {
@@ -232,6 +286,14 @@ export type PrismaIntrospectionConfig = {
232
286
  * When unset/blank, `flattenAskDbConfig` uses the package default `./askdb/`.
233
287
  */
234
288
  outputDir?: string;
289
+ /**
290
+ * Schemas to introspect, like `askdb introspect --schemas` (which overrides it), e.g.
291
+ * `["public", "sales"]`. On MySQL/MariaDB these are databases: each becomes its own
292
+ * namespace and cross-database foreign keys are kept; without a list, only the
293
+ * connection URL's database is read, under the `public` namespace. On Postgres and SQL
294
+ * Server, the default is every non-system schema.
295
+ */
296
+ schemas?: string[];
235
297
  };
236
298
  /** Discriminated union branch for `introspection` when `provider` is `"mysql"`. */
237
299
  export type MysqlIntrospectionConfig = {
@@ -242,6 +304,14 @@ export type MysqlIntrospectionConfig = {
242
304
  * When unset/blank, `flattenAskDbConfig` uses the package default `./askdb/`.
243
305
  */
244
306
  outputDir?: string;
307
+ /**
308
+ * Schemas to introspect, like `askdb introspect --schemas` (which overrides it), e.g.
309
+ * `["public", "sales"]`. On MySQL/MariaDB these are databases: each becomes its own
310
+ * namespace and cross-database foreign keys are kept; without a list, only the
311
+ * connection URL's database is read, under the `public` namespace. On Postgres and SQL
312
+ * Server, the default is every non-system schema.
313
+ */
314
+ schemas?: string[];
245
315
  };
246
316
  /** Discriminated union branch for `introspection` when `provider` is `"sqlite"`. */
247
317
  export type SqliteIntrospectionConfig = {
@@ -252,6 +322,14 @@ export type SqliteIntrospectionConfig = {
252
322
  * When unset/blank, `flattenAskDbConfig` uses the package default `./askdb/`.
253
323
  */
254
324
  outputDir?: string;
325
+ /**
326
+ * Schemas to introspect, like `askdb introspect --schemas` (which overrides it), e.g.
327
+ * `["public", "sales"]`. On MySQL/MariaDB these are databases: each becomes its own
328
+ * namespace and cross-database foreign keys are kept; without a list, only the
329
+ * connection URL's database is read, under the `public` namespace. On Postgres and SQL
330
+ * Server, the default is every non-system schema.
331
+ */
332
+ schemas?: string[];
255
333
  };
256
334
  /** Discriminated union branch for `introspection` when `provider` is `"sqlserver"`. */
257
335
  export type SqlServerIntrospectionConfig = {
@@ -262,15 +340,23 @@ export type SqlServerIntrospectionConfig = {
262
340
  * When unset/blank, `flattenAskDbConfig` uses the package default `./askdb/`.
263
341
  */
264
342
  outputDir?: string;
343
+ /**
344
+ * Schemas to introspect, like `askdb introspect --schemas` (which overrides it), e.g.
345
+ * `["public", "sales"]`. On MySQL/MariaDB these are databases: each becomes its own
346
+ * namespace and cross-database foreign keys are kept; without a list, only the
347
+ * connection URL's database is read, under the `public` namespace. On Postgres and SQL
348
+ * Server, the default is every non-system schema.
349
+ */
350
+ schemas?: string[];
265
351
  };
266
352
  /** Discriminated union of all supported introspection provider branches. */
267
353
  export type AskDbIntrospectionConfig = PostgresIntrospectionConfig | PrismaIntrospectionConfig | MysqlIntrospectionConfig | SqliteIntrospectionConfig | SqlServerIntrospectionConfig;
268
354
  /**
269
355
  * Root shape for `export default defineConfig({ ... })` in `askdb.config.*`.
270
356
  *
271
- * - **`ai`**: LLM provider discriminated union — selecting `provider` determines which `providerConfig` branch is required.
357
+ * - **`ai`**: provider connections (`providerConfig`) plus the `language` and `embedding` model sections.
272
358
  * - **`introspection`**: target engine for `askdb introspect` (postgres / prisma / mysql / sqlite / sqlserver) — selecting `provider` determines which `providerConfig` branch is valid. Each branch holds the connection URL/path for that engine.
273
- * - **`rag`**: embedder + store branches flattened to `ASKDB_RAG_*` / `ASKDB_PGVECTOR_URL` / file paths.
359
+ * - **`rag`** (optional): the embedder (`"mock"`, or `"ai"` for `ai.embedding`) and the vector store, flattened to `ASKDB_RAG_*` / `ASKDB_PGVECTOR_URL` / file paths. Omitting it means the mock embedder and the in-memory store.
274
360
  * - **`logging` | `modes` | `host`**: optional operational defaults.
275
361
  */
276
362
  export type AskDbConfig = {
@@ -285,9 +371,17 @@ export type AskDbConfig = {
285
371
  * Keep aligned with `DialectId` in `@askdb/core`. Shipped specs: see `ASKDB_DIALECTS`.
286
372
  */
287
373
  dialect?: AskDbDialectId;
288
- rag: {
374
+ /**
375
+ * Retrieval (RAG): the embedder and the vector store. Optional: omit it when you don't use
376
+ * retrieval, and AskDB behaves as if `{ embedder: "mock", store: "memory", storeConfig: {} }`
377
+ * were set, so no store keys are written. Setting `ai.embedding` without it is an error, since
378
+ * nothing would use that model. When present, `embedder`, `store` and `storeConfig` are required.
379
+ */
380
+ rag?: {
381
+ /** `"mock"` (a local lexical embedder) or `"ai"` (the `ai.embedding` model). `"openai"` and `"ai-sdk"` are deprecated. */
289
382
  embedder: AskDbRagEmbedder;
290
- embedderConfig: {
383
+ /** @deprecated Use `ai.embedding` and a connection in `ai.providerConfig`. Translated at load (with a warning); removed at 1.0. */
384
+ embedderConfig?: {
291
385
  openai?: OpenaiRagEmbedderConfig;
292
386
  };
293
387
  store: AskDbRagStore;
@@ -323,8 +417,37 @@ export type AskDbConfig = {
323
417
  host?: string;
324
418
  port?: number;
325
419
  };
326
- /** Query execution against a live database from the Studio playground. */
420
+ /**
421
+ * Query execution against a live database from the Studio playground.
422
+ * Off by default — set `enabled: true` and give Studio its own connection
423
+ * (ideally a read-only database role).
424
+ */
327
425
  execute?: {
426
+ /**
427
+ * Turn on `POST /api/execute` and the Playground's **Execute Query** button.
428
+ * Default `false`: Studio generates SQL but never runs it.
429
+ * Maps to `ASKDB_STUDIO_EXECUTE_ENABLED`.
430
+ */
431
+ enabled?: boolean;
432
+ /**
433
+ * Reuse the introspection connection (`introspection.providerConfig.<engine>`)
434
+ * when `databaseUrl` / `file` is not set. Default `false` — Studio execute needs
435
+ * its own explicit connection so introspection credentials are never used to run
436
+ * ad-hoc SQL by accident. Maps to `ASKDB_STUDIO_EXECUTE_USE_INTROSPECTION_CONNECTION`.
437
+ */
438
+ useIntrospectionConnection?: boolean;
439
+ /**
440
+ * Per-query timeout in milliseconds (positive integer). Default `30000`.
441
+ * Enforced server-side on Postgres, MySQL/MariaDB, and SQL Server; not enforced
442
+ * for SQLite. Maps to `ASKDB_STUDIO_EXECUTE_TIMEOUT_MS`.
443
+ */
444
+ timeoutMs?: number;
445
+ /**
446
+ * Maximum rows returned per query (positive integer). Default `500`. Studio fetches
447
+ * at most `maxRows + 1` rows and reports `truncated: true` when more exist.
448
+ * Maps to `ASKDB_STUDIO_EXECUTE_MAX_ROWS`.
449
+ */
450
+ maxRows?: number;
328
451
  /**
329
452
  * Explicit live-execute provider. When omitted, Studio falls back to the active
330
453
  * introspection provider when it is a live engine, then defaults to `"postgres"`.
@@ -347,6 +470,20 @@ export type AskDbConfig = {
347
470
  port?: number;
348
471
  host?: string;
349
472
  };
473
+ /**
474
+ * Accept a per-request `schemaJson` override on `POST /ask`. Default `false`: an override
475
+ * lets any caller send arbitrary schema/prompt content through the server's model key, so
476
+ * enable it only for tests or trusted multi-schema deployments.
477
+ * Maps to `ASKDB_HTTP_ALLOW_SCHEMA_OVERRIDE`.
478
+ */
479
+ allowSchemaOverride?: boolean;
480
+ /**
481
+ * Abort the model call for a `POST /ask` request after this many milliseconds (positive
482
+ * integer, at most `2147483647`, the Node timer maximum; larger values are a config error).
483
+ * Default `60000`. Maps to `ASKDB_HTTP_REQUEST_TIMEOUT_MS`.
484
+ */
485
+ requestTimeoutMs?: number;
350
486
  };
351
487
  };
488
+ export {};
352
489
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,gBAAgB,CAAC;AAExB;;;;;;;GAOG;AAMH,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6GAA6G;IAC7G,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iHAAiH;IACjH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAA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ta.13",
4
4
  "description": "AskDB configuration helpers: Prisma-style env() and askdb.config file discovery for first-party apps.",
5
5
  "keywords": [
6
6
  "askdb",
7
7
  "config",
8
8
  "environment"
9
9
  ],
10
- "homepage": "https://github.com/Ygilany/AskDB#readme",
10
+ "homepage": "https://askdb.tools/reference/config/",
11
11
  "bugs": {
12
12
  "url": "https://github.com/Ygilany/AskDB/issues"
13
13
  },
@@ -19,6 +19,7 @@
19
19
  "license": "Apache-2.0",
20
20
  "author": "Yahya Gilany",
21
21
  "type": "module",
22
+ "sideEffects": false,
22
23
  "main": "./dist/index.js",
23
24
  "types": "./dist/index.d.ts",
24
25
  "exports": {
@@ -26,6 +27,11 @@
26
27
  "types": "./dist/index.d.ts",
27
28
  "import": "./dist/index.js",
28
29
  "default": "./dist/index.js"
30
+ },
31
+ "./scaffold": {
32
+ "types": "./dist/scaffold/index.d.ts",
33
+ "import": "./dist/scaffold/index.js",
34
+ "default": "./dist/scaffold/index.js"
29
35
  }
30
36
  },
31
37
  "files": [
@@ -35,15 +41,15 @@
35
41
  "NOTICE"
36
42
  ],
37
43
  "engines": {
38
- "node": ">=22.12"
44
+ "node": ">=22.23.4"
39
45
  },
40
46
  "dependencies": {
41
- "dotenv": "^17.4.2",
47
+ "dotenv": "^18.0.9",
42
48
  "jiti": "^2.7.0"
43
49
  },
44
50
  "devDependencies": {
45
51
  "typescript": "^6.0.3",
46
- "vitest": "^4.1.10"
52
+ "vitest": "^5.0.5"
47
53
  },
48
54
  "scripts": {
49
55
  "build": "tsc -p tsconfig.build.json",