@databricks/appkit-ui 0.71.0 → 0.73.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 (79) hide show
  1. package/CLAUDE.md +63 -0
  2. package/NOTICE.md +3 -2
  3. package/dist/cli/commands/agent/eval.js +120 -0
  4. package/dist/cli/commands/agent/eval.js.map +1 -0
  5. package/dist/cli/commands/agent/index.js +18 -0
  6. package/dist/cli/commands/agent/index.js.map +1 -0
  7. package/dist/cli/index.js +2 -0
  8. package/dist/cli/index.js.map +1 -1
  9. package/docs/api/appkit/Class.AppKitError.md +1 -0
  10. package/docs/api/appkit/Class.DatabaseValidationError.md +191 -0
  11. package/docs/api/appkit/Class.MlflowClient.md +103 -0
  12. package/docs/api/appkit/Function.buildAssessments.md +16 -0
  13. package/docs/api/appkit/Function.configureJudge.md +18 -0
  14. package/docs/api/appkit/Function.createHttpDriver.md +18 -0
  15. package/docs/api/appkit/Function.defineEval.md +35 -0
  16. package/docs/api/appkit/Function.defineSchema.md +1 -1
  17. package/docs/api/appkit/Function.discoverEvalFiles.md +18 -0
  18. package/docs/api/appkit/Function.equals.md +18 -0
  19. package/docs/api/appkit/Function.evalGlyph.md +18 -0
  20. package/docs/api/appkit/Function.formatEvalDetail.md +18 -0
  21. package/docs/api/appkit/Function.formatEvalHeadline.md +18 -0
  22. package/docs/api/appkit/Function.formatEvalResults.md +18 -0
  23. package/docs/api/appkit/Function.formatSummaryLine.md +18 -0
  24. package/docs/api/appkit/Function.includes.md +18 -0
  25. package/docs/api/appkit/Function.isJudgeConfigured.md +10 -0
  26. package/docs/api/appkit/Function.matches.md +18 -0
  27. package/docs/api/appkit/Function.normalizeHost.md +18 -0
  28. package/docs/api/appkit/Function.readEvalDataset.md +21 -0
  29. package/docs/api/appkit/Function.reportToMlflow.md +23 -0
  30. package/docs/api/appkit/Function.resolveDatabricksAuth.md +16 -0
  31. package/docs/api/appkit/Function.resolveWorkspaceClient.md +18 -0
  32. package/docs/api/appkit/Function.runEval.md +19 -0
  33. package/docs/api/appkit/Function.runEvalsInDir.md +18 -0
  34. package/docs/api/appkit/Function.summarize.md +16 -0
  35. package/docs/api/appkit/Interface.AssertionHandle.md +54 -0
  36. package/docs/api/appkit/Interface.AssertionResult.md +48 -0
  37. package/docs/api/appkit/Interface.Assessment.md +83 -0
  38. package/docs/api/appkit/Interface.CustomJudgeSpec.md +30 -0
  39. package/docs/api/appkit/Interface.DatabaseValidationIssue.md +21 -0
  40. package/docs/api/appkit/Interface.DatabricksAuth.md +21 -0
  41. package/docs/api/appkit/Interface.DatasetRow.md +21 -0
  42. package/docs/api/appkit/Interface.DiscoveredEval.md +36 -0
  43. package/docs/api/appkit/Interface.DriveResult.md +58 -0
  44. package/docs/api/appkit/Interface.EntityMutationHooks.md +173 -0
  45. package/docs/api/appkit/Interface.EvalDefinition.md +74 -0
  46. package/docs/api/appkit/Interface.EvalDriver.md +37 -0
  47. package/docs/api/appkit/Interface.EvalResult.md +83 -0
  48. package/docs/api/appkit/Interface.EvalRunSummary.md +46 -0
  49. package/docs/api/appkit/Interface.EvalSummary.md +48 -0
  50. package/docs/api/appkit/Interface.HookApp.md +12 -0
  51. package/docs/api/appkit/Interface.HookContext.md +21 -0
  52. package/docs/api/appkit/Interface.HttpDriverOptions.md +67 -0
  53. package/docs/api/appkit/Interface.JudgeConfig.md +34 -0
  54. package/docs/api/appkit/Interface.JudgeScore.md +21 -0
  55. package/docs/api/appkit/Interface.MatchResult.md +34 -0
  56. package/docs/api/appkit/Interface.PostResult.md +30 -0
  57. package/docs/api/appkit/Interface.ReadEvalDatasetOptions.md +34 -0
  58. package/docs/api/appkit/Interface.ReadSerializerContext.md +21 -0
  59. package/docs/api/appkit/Interface.ReportOutcome.md +53 -0
  60. package/docs/api/appkit/Interface.ResolveDatabricksAuthOptions.md +34 -0
  61. package/docs/api/appkit/Interface.RunEvalOptions.md +45 -0
  62. package/docs/api/appkit/Interface.RunEvalsOptions.md +214 -0
  63. package/docs/api/appkit/Interface.TestContext.md +245 -0
  64. package/docs/api/appkit/TypeAlias.DatabaseApiConfig.md +53 -0
  65. package/docs/api/appkit/TypeAlias.DatabaseApiWriteOperation.md +8 -0
  66. package/docs/api/appkit/TypeAlias.DatabaseApiWritesConfig.md +49 -0
  67. package/docs/api/appkit/TypeAlias.DatabaseExports.md +3 -3
  68. package/docs/api/appkit/TypeAlias.EntityHooks.md +25 -0
  69. package/docs/api/appkit/TypeAlias.EvalProgress.md +26 -0
  70. package/docs/api/appkit/TypeAlias.IDatabaseConfig.md +16 -5
  71. package/docs/api/appkit/TypeAlias.Matcher.md +18 -0
  72. package/docs/api/appkit/TypeAlias.ReadSerializer.md +19 -0
  73. package/docs/api/appkit/TypeAlias.Severity.md +8 -0
  74. package/docs/api/appkit/TypeAlias.TransactionClient.md +19 -0
  75. package/docs/api/appkit.md +157 -95
  76. package/docs/plugins/database.md +144 -0
  77. package/llms.txt +63 -0
  78. package/package.json +1 -1
  79. package/sbom.cdx.json +1 -1
@@ -0,0 +1,214 @@
1
+ # Interface: RunEvalsOptions
2
+
3
+ ## Properties[​](#properties "Direct link to Properties")
4
+
5
+ ### baseUrl[​](#baseurl "Direct link to baseUrl")
6
+
7
+ ```ts
8
+ baseUrl: string;
9
+
10
+ ```
11
+
12
+ Base URL of the running app to drive, e.g. `http://localhost:3000`.
13
+
14
+ ***
15
+
16
+ ### concurrency?[​](#concurrency "Direct link to concurrency?")
17
+
18
+ ```ts
19
+ optional concurrency: number;
20
+
21
+ ```
22
+
23
+ Max evals to drive concurrently. Each eval opens one stream to the app as the same user, so keep this at or below the app's `maxConcurrentStreamsPerUser` (default 5) or the surplus streams hit the 429 guard. Defaults to 4; clamped to `[1, total]`.
24
+
25
+ ***
26
+
27
+ ### filter?[​](#filter "Direct link to filter?")
28
+
29
+ ```ts
30
+ optional filter: string;
31
+
32
+ ```
33
+
34
+ Substring filter on `<agent>/<id>` (or an exact agent id).
35
+
36
+ ***
37
+
38
+ ### headers?[​](#headers "Direct link to headers?")
39
+
40
+ ```ts
41
+ optional headers: Record<string, string>;
42
+
43
+ ```
44
+
45
+ Extra request headers for the driver (e.g. auth for a deployed app).
46
+
47
+ ***
48
+
49
+ ### judge?[​](#judge "Direct link to judge?")
50
+
51
+ ```ts
52
+ optional judge: {
53
+ host: string;
54
+ model: string;
55
+ token: string;
56
+ };
57
+
58
+ ```
59
+
60
+ When set, enable `t.judge.*` LLM-as-judge scoring via autoevals against a Databricks serving endpoint (`model`).
61
+
62
+ #### host[​](#host "Direct link to host")
63
+
64
+ ```ts
65
+ host: string;
66
+
67
+ ```
68
+
69
+ #### model[​](#model "Direct link to model")
70
+
71
+ ```ts
72
+ model: string;
73
+
74
+ ```
75
+
76
+ #### token[​](#token "Direct link to token")
77
+
78
+ ```ts
79
+ token: string;
80
+
81
+ ```
82
+
83
+ ***
84
+
85
+ ### mlflow?[​](#mlflow "Direct link to mlflow?")
86
+
87
+ ```ts
88
+ optional mlflow: {
89
+ experimentId: string;
90
+ host: string;
91
+ sqlWarehouseId?: string;
92
+ token: string;
93
+ };
94
+
95
+ ```
96
+
97
+ When set, create a native MLflow "Evaluation run": each eval's trace is linked to the run, pass/fail is written as feedback, and aggregate metrics are logged. Requires Databricks creds + the target experiment.
98
+
99
+ #### experimentId[​](#experimentid "Direct link to experimentId")
100
+
101
+ ```ts
102
+ experimentId: string;
103
+
104
+ ```
105
+
106
+ #### host[​](#host-1 "Direct link to host")
107
+
108
+ ```ts
109
+ host: string;
110
+
111
+ ```
112
+
113
+ #### sqlWarehouseId?[​](#sqlwarehouseid "Direct link to sqlWarehouseId?")
114
+
115
+ ```ts
116
+ optional sqlWarehouseId: string;
117
+
118
+ ```
119
+
120
+ SQL warehouse id for writing assessments to UC-backed (V4) traces.
121
+
122
+ #### token[​](#token-1 "Direct link to token")
123
+
124
+ ```ts
125
+ token: string;
126
+
127
+ ```
128
+
129
+ ***
130
+
131
+ ### now?[​](#now "Direct link to now?")
132
+
133
+ ```ts
134
+ optional now: number;
135
+
136
+ ```
137
+
138
+ Wall-clock timestamp (ms) for run create/finish — pass `Date.now()`.
139
+
140
+ ***
141
+
142
+ ### onEvent()?[​](#onevent "Direct link to onEvent()?")
143
+
144
+ ```ts
145
+ optional onEvent: (event: EvalProgress) => void;
146
+
147
+ ```
148
+
149
+ Progress callback, invoked as evals are discovered, started, and finished.
150
+
151
+ #### Parameters[​](#parameters "Direct link to Parameters")
152
+
153
+ | Parameter | Type |
154
+ | --------- | ------------------------------------------------------------------- |
155
+ | `event` | [`EvalProgress`](./docs/api/appkit/TypeAlias.EvalProgress.md) |
156
+
157
+ #### Returns[​](#returns "Direct link to Returns")
158
+
159
+ `void`
160
+
161
+ ***
162
+
163
+ ### rootDir?[​](#rootdir "Direct link to rootDir?")
164
+
165
+ ```ts
166
+ optional rootDir: string;
167
+
168
+ ```
169
+
170
+ Project root containing `server/agents/`. Defaults to `process.cwd()`.
171
+
172
+ ***
173
+
174
+ ### strict?[​](#strict "Direct link to strict?")
175
+
176
+ ```ts
177
+ optional strict: boolean;
178
+
179
+ ```
180
+
181
+ Soft assertion failures also fail the eval.
182
+
183
+ ***
184
+
185
+ ### timeoutMs?[​](#timeoutms "Direct link to timeoutMs?")
186
+
187
+ ```ts
188
+ optional timeoutMs: number;
189
+
190
+ ```
191
+
192
+ Per-turn wall-clock timeout (ms) before a turn is failed. Defaults to 120s.
193
+
194
+ ***
195
+
196
+ ### warehouseId?[​](#warehouseid "Direct link to warehouseId?")
197
+
198
+ ```ts
199
+ optional warehouseId: string;
200
+
201
+ ```
202
+
203
+ SQL warehouse id used to read managed evaluation datasets.
204
+
205
+ ***
206
+
207
+ ### workspaceClient?[​](#workspaceclient "Direct link to workspaceClient?")
208
+
209
+ ```ts
210
+ optional workspaceClient: WorkspaceClient;
211
+
212
+ ```
213
+
214
+ Workspace client used to read managed evaluation datasets (for evals that declare `dataset`). Required alongside [warehouseId](#warehouseid) for those evals.
@@ -0,0 +1,245 @@
1
+ # Interface: TestContext
2
+
3
+ The `t` context passed to an eval's `test` function.
4
+
5
+ ## Properties[​](#properties "Direct link to Properties")
6
+
7
+ ### expected[​](#expected "Direct link to expected")
8
+
9
+ ```ts
10
+ readonly expected: Record<string, unknown> | undefined;
11
+
12
+ ```
13
+
14
+ The current dataset row's `expectations` (ground truth / guidelines), or `undefined` when the row has none or the eval isn't dataset-driven.
15
+
16
+ ***
17
+
18
+ ### input[​](#input "Direct link to input")
19
+
20
+ ```ts
21
+ readonly input: Record<string, unknown>;
22
+
23
+ ```
24
+
25
+ The current dataset row's `inputs` when the eval is dataset-driven (see [EvalDefinition.dataset](./docs/api/appkit/Interface.EvalDefinition.md#dataset)); `{}` for a plain single-run eval.
26
+
27
+ ***
28
+
29
+ ### judge[​](#judge "Direct link to judge")
30
+
31
+ ```ts
32
+ judge: {
33
+ closedQA: Promise<AssertionHandle>;
34
+ custom: Promise<AssertionHandle>;
35
+ factuality: Promise<AssertionHandle>;
36
+ };
37
+
38
+ ```
39
+
40
+ LLM-as-judge scoring of the last reply (via autoevals → a Databricks judge model). Each returns a scored assertion that gates by default (a miss fails the eval); chain `.atLeast(n)` to change the pass threshold or `.soft()` to demote to a tracked-only metric. Requires the judge to be configured (`--judge-model`).
41
+
42
+ #### closedQA()[​](#closedqa "Direct link to closedQA()")
43
+
44
+ ```ts
45
+ closedQA(criteria: string): Promise<AssertionHandle>;
46
+
47
+ ```
48
+
49
+ Score whether the reply answers the question, per optional `criteria`.
50
+
51
+ ##### Parameters[​](#parameters "Direct link to Parameters")
52
+
53
+ | Parameter | Type |
54
+ | ---------- | -------- |
55
+ | `criteria` | `string` |
56
+
57
+ ##### Returns[​](#returns "Direct link to Returns")
58
+
59
+ `Promise`<[`AssertionHandle`](./docs/api/appkit/Interface.AssertionHandle.md)>
60
+
61
+ #### custom()[​](#custom "Direct link to custom()")
62
+
63
+ ```ts
64
+ custom(spec: CustomJudgeSpec): Promise<AssertionHandle>;
65
+
66
+ ```
67
+
68
+ A custom prompt-template judge (the TS analog of MLflow's `@scorer`).
69
+
70
+ ##### Parameters[​](#parameters-1 "Direct link to Parameters")
71
+
72
+ | Parameter | Type |
73
+ | --------- | ------------------------------------------------------------------------- |
74
+ | `spec` | [`CustomJudgeSpec`](./docs/api/appkit/Interface.CustomJudgeSpec.md) |
75
+
76
+ ##### Returns[​](#returns-1 "Direct link to Returns")
77
+
78
+ `Promise`<[`AssertionHandle`](./docs/api/appkit/Interface.AssertionHandle.md)>
79
+
80
+ #### factuality()[​](#factuality "Direct link to factuality()")
81
+
82
+ ```ts
83
+ factuality(expected: string): Promise<AssertionHandle>;
84
+
85
+ ```
86
+
87
+ Score factuality of the reply against an expected reference.
88
+
89
+ ##### Parameters[​](#parameters-2 "Direct link to Parameters")
90
+
91
+ | Parameter | Type |
92
+ | ---------- | -------- |
93
+ | `expected` | `string` |
94
+
95
+ ##### Returns[​](#returns-2 "Direct link to Returns")
96
+
97
+ `Promise`<[`AssertionHandle`](./docs/api/appkit/Interface.AssertionHandle.md)>
98
+
99
+ ***
100
+
101
+ ### reply[​](#reply "Direct link to reply")
102
+
103
+ ```ts
104
+ readonly reply: string;
105
+
106
+ ```
107
+
108
+ The last assistant reply.
109
+
110
+ ***
111
+
112
+ ### sessionId[​](#sessionid "Direct link to sessionId")
113
+
114
+ ```ts
115
+ readonly sessionId: string | undefined;
116
+
117
+ ```
118
+
119
+ The current session/thread id, if any.
120
+
121
+ ***
122
+
123
+ ### toolCalls[​](#toolcalls "Direct link to toolCalls")
124
+
125
+ ```ts
126
+ readonly toolCalls: string[];
127
+
128
+ ```
129
+
130
+ Tools called during the last turn.
131
+
132
+ ## Methods[​](#methods "Direct link to Methods")
133
+
134
+ ### calledTool()[​](#calledtool "Direct link to calledTool()")
135
+
136
+ ```ts
137
+ calledTool(name: string): AssertionHandle;
138
+
139
+ ```
140
+
141
+ Assert a tool was called during the run (gate by default).
142
+
143
+ #### Parameters[​](#parameters-3 "Direct link to Parameters")
144
+
145
+ | Parameter | Type |
146
+ | --------- | -------- |
147
+ | `name` | `string` |
148
+
149
+ #### Returns[​](#returns-3 "Direct link to Returns")
150
+
151
+ [`AssertionHandle`](./docs/api/appkit/Interface.AssertionHandle.md)
152
+
153
+ ***
154
+
155
+ ### check()[​](#check "Direct link to check()")
156
+
157
+ ```ts
158
+ check(value: string, matcher: Matcher): AssertionHandle;
159
+
160
+ ```
161
+
162
+ Assert a value against a matcher, e.g. `t.check(t.reply, includes("Sunny"))`.
163
+
164
+ #### Parameters[​](#parameters-4 "Direct link to Parameters")
165
+
166
+ | Parameter | Type |
167
+ | --------- | --------------------------------------------------------- |
168
+ | `value` | `string` |
169
+ | `matcher` | [`Matcher`](./docs/api/appkit/TypeAlias.Matcher.md) |
170
+
171
+ #### Returns[​](#returns-4 "Direct link to Returns")
172
+
173
+ [`AssertionHandle`](./docs/api/appkit/Interface.AssertionHandle.md)
174
+
175
+ ***
176
+
177
+ ### reset()[​](#reset "Direct link to reset()")
178
+
179
+ ```ts
180
+ reset(): void;
181
+
182
+ ```
183
+
184
+ Start a fresh conversation: the next `send` opens a new thread with no history. Use to run several independent one-shot checks in one test. Consecutive `send`s (without a `reset`) stay in one multi-turn conversation.
185
+
186
+ #### Returns[​](#returns-5 "Direct link to Returns")
187
+
188
+ `void`
189
+
190
+ ***
191
+
192
+ ### send()[​](#send "Direct link to send()")
193
+
194
+ ```ts
195
+ send(message: string): Promise<void>;
196
+
197
+ ```
198
+
199
+ Send a user message to the agent and capture its response.
200
+
201
+ #### Parameters[​](#parameters-5 "Direct link to Parameters")
202
+
203
+ | Parameter | Type |
204
+ | --------- | -------- |
205
+ | `message` | `string` |
206
+
207
+ #### Returns[​](#returns-6 "Direct link to Returns")
208
+
209
+ `Promise`<`void`>
210
+
211
+ ***
212
+
213
+ ### skip()[​](#skip "Direct link to skip()")
214
+
215
+ ```ts
216
+ skip(reason?: string): never;
217
+
218
+ ```
219
+
220
+ Skip this eval with an optional reason.
221
+
222
+ #### Parameters[​](#parameters-6 "Direct link to Parameters")
223
+
224
+ | Parameter | Type |
225
+ | --------- | -------- |
226
+ | `reason?` | `string` |
227
+
228
+ #### Returns[​](#returns-7 "Direct link to Returns")
229
+
230
+ `never`
231
+
232
+ ***
233
+
234
+ ### succeeded()[​](#succeeded "Direct link to succeeded()")
235
+
236
+ ```ts
237
+ succeeded(): AssertionHandle;
238
+
239
+ ```
240
+
241
+ Assert the last turn completed successfully (gate by default).
242
+
243
+ #### Returns[​](#returns-8 "Direct link to Returns")
244
+
245
+ [`AssertionHandle`](./docs/api/appkit/Interface.AssertionHandle.md)
@@ -0,0 +1,53 @@
1
+ # Type Alias: DatabaseApiConfig\<TSchema>
2
+
3
+ ```ts
4
+ type DatabaseApiConfig<TSchema> =
5
+ | boolean
6
+ | {
7
+ tables?: readonly SchemaTableName<TSchema>[];
8
+ writes?: DatabaseApiWritesConfig<TSchema>;
9
+ };
10
+
11
+ ```
12
+
13
+ Full generated CRUD for every declared table by default. Set false to disable all generated routes, or use an object to restrict tables and writes. Keyed routes require a public primary key; upsert stays programmatic. Route names must start with a letter, contain only letters, digits, `_`, or `-`, be at most 64 characters, and be unique ignoring case. Invalid names fail setup; exclude internal tables with `api.tables` or use `api: false`.
14
+
15
+ Routes run as the app's service principal and apply no per-user filter, so anyone the app admits receives every enabled operation. An exposed table also becomes includable from its neighbours; a relation whose target stays off cannot be included.
16
+
17
+ Text filters accept caller-supplied `like`/`ilike` patterns; a server-side `statement_timeout` cancels a pattern that would otherwise hold its pooled connection to completion.
18
+
19
+ ## Type Parameters[​](#type-parameters "Direct link to Type Parameters")
20
+
21
+ | Type Parameter |
22
+ | --------------------------------------------------------------------------- |
23
+ | `TSchema` *extends* [`Schema`](./docs/api/appkit/Interface.Schema.md) |
24
+
25
+ ## Type Declaration[​](#type-declaration "Direct link to Type Declaration")
26
+
27
+ `boolean`
28
+
29
+ ```ts
30
+ {
31
+ tables?: readonly SchemaTableName<TSchema>[];
32
+ writes?: DatabaseApiWritesConfig<TSchema>;
33
+ }
34
+
35
+ ```
36
+
37
+ ### tables?[​](#tables "Direct link to tables?")
38
+
39
+ ```ts
40
+ readonly optional tables: readonly SchemaTableName<TSchema>[];
41
+
42
+ ```
43
+
44
+ Tables that remain exposed. Defaults to every declared table.
45
+
46
+ ### writes?[​](#writes "Direct link to writes?")
47
+
48
+ ```ts
49
+ readonly optional writes: DatabaseApiWritesConfig<TSchema>;
50
+
51
+ ```
52
+
53
+ All writes by default. Set false for read-only routes.
@@ -0,0 +1,8 @@
1
+ # Type Alias: DatabaseApiWriteOperation
2
+
3
+ ```ts
4
+ type DatabaseApiWriteOperation = "create" | "update" | "delete";
5
+
6
+ ```
7
+
8
+ Generated HTTP write operations.
@@ -0,0 +1,49 @@
1
+ # Type Alias: DatabaseApiWritesConfig\<TSchema>
2
+
3
+ ```ts
4
+ type DatabaseApiWritesConfig<TSchema> =
5
+ | boolean
6
+ | {
7
+ operations?: readonly DatabaseApiWriteOperation[];
8
+ tables?: readonly SchemaTableName<TSchema>[];
9
+ };
10
+
11
+ ```
12
+
13
+ All writes by default; false keeps reads only, and an object narrows writes.
14
+
15
+ ## Type Parameters[​](#type-parameters "Direct link to Type Parameters")
16
+
17
+ | Type Parameter |
18
+ | --------------------------------------------------------------------------- |
19
+ | `TSchema` *extends* [`Schema`](./docs/api/appkit/Interface.Schema.md) |
20
+
21
+ ## Type Declaration[​](#type-declaration "Direct link to Type Declaration")
22
+
23
+ `boolean`
24
+
25
+ ```ts
26
+ {
27
+ operations?: readonly DatabaseApiWriteOperation[];
28
+ tables?: readonly SchemaTableName<TSchema>[];
29
+ }
30
+
31
+ ```
32
+
33
+ ### operations?[​](#operations "Direct link to operations?")
34
+
35
+ ```ts
36
+ readonly optional operations: readonly DatabaseApiWriteOperation[];
37
+
38
+ ```
39
+
40
+ Operations that remain enabled. Defaults to create, update, and delete.
41
+
42
+ ### tables?[​](#tables "Direct link to tables?")
43
+
44
+ ```ts
45
+ readonly optional tables: readonly SchemaTableName<TSchema>[];
46
+
47
+ ```
48
+
49
+ Tables that remain writable. Defaults to every exposed table.
@@ -26,9 +26,9 @@ transaction<T>(callback: (tx: TransactionClient) => Promise<T>): Promise<T>;
26
26
 
27
27
  #### Parameters[​](#parameters "Direct link to Parameters")
28
28
 
29
- | Parameter | Type |
30
- | ---------- | --------------------------------------------- |
31
- | `callback` | (`tx`: `TransactionClient`) => `Promise`<`T`> |
29
+ | Parameter | Type |
30
+ | ---------- | ------------------------------------------------------------------------------------------------------- |
31
+ | `callback` | (`tx`: [`TransactionClient`](./docs/api/appkit/TypeAlias.TransactionClient.md)) => `Promise`<`T`> |
32
32
 
33
33
  #### Returns[​](#returns "Direct link to Returns")
34
34
 
@@ -0,0 +1,25 @@
1
+ # Type Alias: EntityHooks\<TTable>
2
+
3
+ ```ts
4
+ type EntityHooks<TTable> = EntityMutationHooks<TTable> & {
5
+ serialize?: ReadSerializer;
6
+ };
7
+
8
+ ```
9
+
10
+ Response shaping and mutation lifecycle declared for one table.
11
+
12
+ ## Type Declaration[​](#type-declaration "Direct link to Type Declaration")
13
+
14
+ ### serialize?[​](#serialize "Direct link to serialize?")
15
+
16
+ ```ts
17
+ readonly optional serialize: ReadSerializer;
18
+
19
+ ```
20
+
21
+ ## Type Parameters[​](#type-parameters "Direct link to Type Parameters")
22
+
23
+ | Type Parameter | Default type |
24
+ | --------------------------- | ------------ |
25
+ | `TTable` *extends* `string` | `string` |
@@ -0,0 +1,26 @@
1
+ # Type Alias: EvalProgress
2
+
3
+ ```ts
4
+ type EvalProgress =
5
+ | {
6
+ total: number;
7
+ type: "discovered";
8
+ }
9
+ | {
10
+ runId: string;
11
+ type: "run-created";
12
+ }
13
+ | {
14
+ id: string;
15
+ index: number;
16
+ total: number;
17
+ type: "start";
18
+ }
19
+ | {
20
+ index: number;
21
+ result: EvalResult;
22
+ total: number;
23
+ type: "result";
24
+ };
25
+
26
+ ```
@@ -2,8 +2,8 @@
2
2
 
3
3
  ```ts
4
4
  type IDatabaseConfig<TSchema> = {
5
- crudRoutes?: CrudRoutesConfig<TSchema>;
6
- hooks?: { readonly [TTable in SchemaTableName<TSchema>]?: { serialize?: ReadSerializer } };
5
+ api?: DatabaseApiConfig<TSchema>;
6
+ hooks?: { readonly [TTable in SchemaTableName<TSchema>]?: EntityHooks<TTable> };
7
7
  schema: TSchema;
8
8
  };
9
9
 
@@ -19,10 +19,21 @@ Configuration for one schema-bound DatabasePlugin instance.
19
19
 
20
20
  ## Properties[​](#properties "Direct link to Properties")
21
21
 
22
- ### crudRoutes?[​](#crudroutes "Direct link to crudRoutes?")
22
+ ### api?[​](#api "Direct link to api?")
23
23
 
24
24
  ```ts
25
- readonly optional crudRoutes: CrudRoutesConfig<TSchema>;
25
+ readonly optional api: DatabaseApiConfig<TSchema>;
26
+
27
+ ```
28
+
29
+ Generated HTTP CRUD is enabled for all tables by default, using the app's service principal. Every admitted caller receives the enabled operations; no per-user or per-row authorization is applied. This plugin does not support OBO. Use custom routes for application-specific authorization.
30
+
31
+ Set `false` to disable routes, `{ writes: false }` for reads only, or `{ tables: ["notes"] }` to expose only selected tables. To disable delete, use `{ writes: { operations: ["create", "update"] } }`.
32
+
33
+ #### Default Value[​](#default-value "Direct link to Default Value")
34
+
35
+ ```ts
36
+ true
26
37
 
27
38
  ```
28
39
 
@@ -31,7 +42,7 @@ readonly optional crudRoutes: CrudRoutesConfig<TSchema>;
31
42
  ### hooks?[​](#hooks "Direct link to hooks?")
32
43
 
33
44
  ```ts
34
- readonly optional hooks: { readonly [TTable in SchemaTableName<TSchema>]?: { serialize?: ReadSerializer } };
45
+ readonly optional hooks: { readonly [TTable in SchemaTableName<TSchema>]?: EntityHooks<TTable> };
35
46
 
36
47
  ```
37
48
 
@@ -0,0 +1,18 @@
1
+ # Type Alias: Matcher()
2
+
3
+ ```ts
4
+ type Matcher = (value: string) => MatchResult;
5
+
6
+ ```
7
+
8
+ A deterministic matcher: inspects a string value and returns a result.
9
+
10
+ ## Parameters[​](#parameters "Direct link to Parameters")
11
+
12
+ | Parameter | Type |
13
+ | --------- | -------- |
14
+ | `value` | `string` |
15
+
16
+ ## Returns[​](#returns "Direct link to Returns")
17
+
18
+ [`MatchResult`](./docs/api/appkit/Interface.MatchResult.md)