@databricks/appkit 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 (191) hide show
  1. package/CLAUDE.md +63 -0
  2. package/NOTICE.md +3 -2
  3. package/dist/appkit/package.js +1 -1
  4. package/dist/beta.d.ts +18 -3
  5. package/dist/beta.js +14 -1
  6. package/dist/cli/commands/agent/eval.js +120 -0
  7. package/dist/cli/commands/agent/eval.js.map +1 -0
  8. package/dist/cli/commands/agent/index.js +18 -0
  9. package/dist/cli/commands/agent/index.js.map +1 -0
  10. package/dist/cli/index.js +2 -0
  11. package/dist/cli/index.js.map +1 -1
  12. package/dist/connectors/index.js +2 -0
  13. package/dist/connectors/mlflow/auth.d.ts +28 -0
  14. package/dist/connectors/mlflow/auth.d.ts.map +1 -0
  15. package/dist/connectors/mlflow/auth.js +70 -0
  16. package/dist/connectors/mlflow/auth.js.map +1 -0
  17. package/dist/connectors/mlflow/client.d.ts +51 -0
  18. package/dist/connectors/mlflow/client.d.ts.map +1 -0
  19. package/dist/connectors/mlflow/client.js +93 -0
  20. package/dist/connectors/mlflow/client.js.map +1 -0
  21. package/dist/connectors/mlflow/index.d.ts +2 -0
  22. package/dist/database/errors.js +15 -5
  23. package/dist/database/errors.js.map +1 -1
  24. package/dist/database/runtime/data-path.d.ts +7 -0
  25. package/dist/database/runtime/data-path.d.ts.map +1 -0
  26. package/dist/database/runtime/data-path.js.map +1 -1
  27. package/dist/database/runtime/engine/drizzle-data-path.js +7 -5
  28. package/dist/database/runtime/engine/drizzle-data-path.js.map +1 -1
  29. package/dist/database/schema-builder/define-schema.d.ts +1 -1
  30. package/dist/database/schema-builder/define-schema.js +1 -1
  31. package/dist/database/schema-builder/define-schema.js.map +1 -1
  32. package/dist/errors/database-validation.d.ts +23 -0
  33. package/dist/errors/database-validation.d.ts.map +1 -0
  34. package/dist/errors/database-validation.js +24 -0
  35. package/dist/errors/database-validation.js.map +1 -0
  36. package/dist/errors/index.js +1 -0
  37. package/dist/evals/dataset.d.ts +36 -0
  38. package/dist/evals/dataset.d.ts.map +1 -0
  39. package/dist/evals/dataset.js +36 -0
  40. package/dist/evals/dataset.js.map +1 -0
  41. package/dist/evals/define-eval.d.ts +26 -0
  42. package/dist/evals/define-eval.d.ts.map +1 -0
  43. package/dist/evals/define-eval.js +28 -0
  44. package/dist/evals/define-eval.js.map +1 -0
  45. package/dist/evals/discover.d.ts +20 -0
  46. package/dist/evals/discover.d.ts.map +1 -0
  47. package/dist/evals/discover.js +49 -0
  48. package/dist/evals/discover.js.map +1 -0
  49. package/dist/evals/http-driver.d.ts +33 -0
  50. package/dist/evals/http-driver.d.ts.map +1 -0
  51. package/dist/evals/http-driver.js +123 -0
  52. package/dist/evals/http-driver.js.map +1 -0
  53. package/dist/evals/index.d.ts +14 -0
  54. package/dist/evals/index.js +14 -0
  55. package/dist/evals/judge.d.ts +27 -0
  56. package/dist/evals/judge.d.ts.map +1 -0
  57. package/dist/evals/judge.js +77 -0
  58. package/dist/evals/judge.js.map +1 -0
  59. package/dist/evals/matchers.d.ts +12 -0
  60. package/dist/evals/matchers.d.ts.map +1 -0
  61. package/dist/evals/matchers.js +26 -0
  62. package/dist/evals/matchers.js.map +1 -0
  63. package/dist/evals/mlflow-report.d.ts +37 -0
  64. package/dist/evals/mlflow-report.d.ts.map +1 -0
  65. package/dist/evals/mlflow-report.js +161 -0
  66. package/dist/evals/mlflow-report.js.map +1 -0
  67. package/dist/evals/mlflow-run.d.ts +13 -0
  68. package/dist/evals/mlflow-run.d.ts.map +1 -0
  69. package/dist/evals/mlflow-run.js +101 -0
  70. package/dist/evals/mlflow-run.js.map +1 -0
  71. package/dist/evals/pool.js +24 -0
  72. package/dist/evals/pool.js.map +1 -0
  73. package/dist/evals/report.d.ts +25 -0
  74. package/dist/evals/report.d.ts.map +1 -0
  75. package/dist/evals/report.js +57 -0
  76. package/dist/evals/report.js.map +1 -0
  77. package/dist/evals/run-eval.d.ts +23 -0
  78. package/dist/evals/run-eval.d.ts.map +1 -0
  79. package/dist/evals/run-eval.js +152 -0
  80. package/dist/evals/run-eval.js.map +1 -0
  81. package/dist/evals/run-evals.d.ts +94 -0
  82. package/dist/evals/run-evals.d.ts.map +1 -0
  83. package/dist/evals/run-evals.js +257 -0
  84. package/dist/evals/run-evals.js.map +1 -0
  85. package/dist/evals/types.d.ts +163 -0
  86. package/dist/evals/types.d.ts.map +1 -0
  87. package/dist/index.d.ts +2 -1
  88. package/dist/index.js +2 -1
  89. package/dist/plugin/plugin.d.ts.map +1 -1
  90. package/dist/plugin/plugin.js +1 -1
  91. package/dist/plugin/plugin.js.map +1 -1
  92. package/dist/plugins/agents/agents.js +1 -1
  93. package/dist/plugins/database/crud/contract.js +17 -8
  94. package/dist/plugins/database/crud/contract.js.map +1 -1
  95. package/dist/plugins/database/crud/exposure.js +63 -22
  96. package/dist/plugins/database/crud/exposure.js.map +1 -1
  97. package/dist/plugins/database/crud/request.js +50 -0
  98. package/dist/plugins/database/crud/request.js.map +1 -0
  99. package/dist/plugins/database/crud/response.js +77 -0
  100. package/dist/plugins/database/crud/response.js.map +1 -0
  101. package/dist/plugins/database/crud/routes.js +71 -52
  102. package/dist/plugins/database/crud/routes.js.map +1 -1
  103. package/dist/plugins/database/database.d.ts +6 -4
  104. package/dist/plugins/database/database.d.ts.map +1 -1
  105. package/dist/plugins/database/database.js +46 -16
  106. package/dist/plugins/database/database.js.map +1 -1
  107. package/dist/plugins/database/defaults.js +5 -1
  108. package/dist/plugins/database/defaults.js.map +1 -1
  109. package/dist/plugins/database/entity-client.js +143 -10
  110. package/dist/plugins/database/entity-client.js.map +1 -1
  111. package/dist/plugins/database/entity-types.d.ts +1 -1
  112. package/dist/plugins/database/hooks.d.ts +38 -0
  113. package/dist/plugins/database/hooks.d.ts.map +1 -0
  114. package/dist/plugins/database/index.d.ts +3 -2
  115. package/dist/plugins/database/lifecycle.js +67 -28
  116. package/dist/plugins/database/lifecycle.js.map +1 -1
  117. package/dist/plugins/database/scope.js +58 -0
  118. package/dist/plugins/database/scope.js.map +1 -0
  119. package/dist/plugins/database/types.d.ts +40 -12
  120. package/dist/plugins/database/types.d.ts.map +1 -1
  121. package/docs/api/appkit/Class.AppKitError.md +1 -0
  122. package/docs/api/appkit/Class.DatabaseValidationError.md +191 -0
  123. package/docs/api/appkit/Class.MlflowClient.md +103 -0
  124. package/docs/api/appkit/Function.buildAssessments.md +16 -0
  125. package/docs/api/appkit/Function.configureJudge.md +18 -0
  126. package/docs/api/appkit/Function.createHttpDriver.md +18 -0
  127. package/docs/api/appkit/Function.defineEval.md +35 -0
  128. package/docs/api/appkit/Function.defineSchema.md +1 -1
  129. package/docs/api/appkit/Function.discoverEvalFiles.md +18 -0
  130. package/docs/api/appkit/Function.equals.md +18 -0
  131. package/docs/api/appkit/Function.evalGlyph.md +18 -0
  132. package/docs/api/appkit/Function.formatEvalDetail.md +18 -0
  133. package/docs/api/appkit/Function.formatEvalHeadline.md +18 -0
  134. package/docs/api/appkit/Function.formatEvalResults.md +18 -0
  135. package/docs/api/appkit/Function.formatSummaryLine.md +18 -0
  136. package/docs/api/appkit/Function.includes.md +18 -0
  137. package/docs/api/appkit/Function.isJudgeConfigured.md +10 -0
  138. package/docs/api/appkit/Function.matches.md +18 -0
  139. package/docs/api/appkit/Function.normalizeHost.md +18 -0
  140. package/docs/api/appkit/Function.readEvalDataset.md +21 -0
  141. package/docs/api/appkit/Function.reportToMlflow.md +23 -0
  142. package/docs/api/appkit/Function.resolveDatabricksAuth.md +16 -0
  143. package/docs/api/appkit/Function.resolveWorkspaceClient.md +18 -0
  144. package/docs/api/appkit/Function.runEval.md +19 -0
  145. package/docs/api/appkit/Function.runEvalsInDir.md +18 -0
  146. package/docs/api/appkit/Function.summarize.md +16 -0
  147. package/docs/api/appkit/Interface.AssertionHandle.md +54 -0
  148. package/docs/api/appkit/Interface.AssertionResult.md +48 -0
  149. package/docs/api/appkit/Interface.Assessment.md +83 -0
  150. package/docs/api/appkit/Interface.CustomJudgeSpec.md +30 -0
  151. package/docs/api/appkit/Interface.DatabaseValidationIssue.md +21 -0
  152. package/docs/api/appkit/Interface.DatabricksAuth.md +21 -0
  153. package/docs/api/appkit/Interface.DatasetRow.md +21 -0
  154. package/docs/api/appkit/Interface.DiscoveredEval.md +36 -0
  155. package/docs/api/appkit/Interface.DriveResult.md +58 -0
  156. package/docs/api/appkit/Interface.EntityMutationHooks.md +173 -0
  157. package/docs/api/appkit/Interface.EvalDefinition.md +74 -0
  158. package/docs/api/appkit/Interface.EvalDriver.md +37 -0
  159. package/docs/api/appkit/Interface.EvalResult.md +83 -0
  160. package/docs/api/appkit/Interface.EvalRunSummary.md +46 -0
  161. package/docs/api/appkit/Interface.EvalSummary.md +48 -0
  162. package/docs/api/appkit/Interface.HookApp.md +12 -0
  163. package/docs/api/appkit/Interface.HookContext.md +21 -0
  164. package/docs/api/appkit/Interface.HttpDriverOptions.md +67 -0
  165. package/docs/api/appkit/Interface.JudgeConfig.md +34 -0
  166. package/docs/api/appkit/Interface.JudgeScore.md +21 -0
  167. package/docs/api/appkit/Interface.MatchResult.md +34 -0
  168. package/docs/api/appkit/Interface.PostResult.md +30 -0
  169. package/docs/api/appkit/Interface.ReadEvalDatasetOptions.md +34 -0
  170. package/docs/api/appkit/Interface.ReadSerializerContext.md +21 -0
  171. package/docs/api/appkit/Interface.ReportOutcome.md +53 -0
  172. package/docs/api/appkit/Interface.ResolveDatabricksAuthOptions.md +34 -0
  173. package/docs/api/appkit/Interface.RunEvalOptions.md +45 -0
  174. package/docs/api/appkit/Interface.RunEvalsOptions.md +214 -0
  175. package/docs/api/appkit/Interface.TestContext.md +245 -0
  176. package/docs/api/appkit/TypeAlias.DatabaseApiConfig.md +53 -0
  177. package/docs/api/appkit/TypeAlias.DatabaseApiWriteOperation.md +8 -0
  178. package/docs/api/appkit/TypeAlias.DatabaseApiWritesConfig.md +49 -0
  179. package/docs/api/appkit/TypeAlias.DatabaseExports.md +3 -3
  180. package/docs/api/appkit/TypeAlias.EntityHooks.md +25 -0
  181. package/docs/api/appkit/TypeAlias.EvalProgress.md +26 -0
  182. package/docs/api/appkit/TypeAlias.IDatabaseConfig.md +16 -5
  183. package/docs/api/appkit/TypeAlias.Matcher.md +18 -0
  184. package/docs/api/appkit/TypeAlias.ReadSerializer.md +19 -0
  185. package/docs/api/appkit/TypeAlias.Severity.md +8 -0
  186. package/docs/api/appkit/TypeAlias.TransactionClient.md +19 -0
  187. package/docs/api/appkit.md +157 -95
  188. package/docs/plugins/database.md +144 -0
  189. package/llms.txt +63 -0
  190. package/package.json +3 -2
  191. package/sbom.cdx.json +1 -1
@@ -0,0 +1,34 @@
1
+ # Interface: ReadEvalDatasetOptions
2
+
3
+ ## Properties[​](#properties "Direct link to Properties")
4
+
5
+ ### limit?[​](#limit "Direct link to limit?")
6
+
7
+ ```ts
8
+ optional limit: number;
9
+
10
+ ```
11
+
12
+ Optional row cap.
13
+
14
+ ***
15
+
16
+ ### table[​](#table "Direct link to table")
17
+
18
+ ```ts
19
+ table: string;
20
+
21
+ ```
22
+
23
+ Fully-qualified UC table: `catalog.schema.table`.
24
+
25
+ ***
26
+
27
+ ### warehouseId[​](#warehouseid "Direct link to warehouseId")
28
+
29
+ ```ts
30
+ warehouseId: string;
31
+
32
+ ```
33
+
34
+ SQL warehouse id to run the read against.
@@ -0,0 +1,21 @@
1
+ # Interface: ReadSerializerContext
2
+
3
+ Which entity and generated operation produced the row being shaped.
4
+
5
+ ## Properties[​](#properties "Direct link to Properties")
6
+
7
+ ### entity[​](#entity "Direct link to entity")
8
+
9
+ ```ts
10
+ readonly entity: string;
11
+
12
+ ```
13
+
14
+ ***
15
+
16
+ ### operation[​](#operation "Direct link to operation")
17
+
18
+ ```ts
19
+ readonly operation: "detail" | "list";
20
+
21
+ ```
@@ -0,0 +1,53 @@
1
+ # Interface: ReportOutcome
2
+
3
+ ## Properties[​](#properties "Direct link to Properties")
4
+
5
+ ### failures[​](#failures "Direct link to failures")
6
+
7
+ ```ts
8
+ failures: {
9
+ error?: string;
10
+ status?: number;
11
+ traceId: string;
12
+ }[];
13
+
14
+ ```
15
+
16
+ #### error?[​](#error "Direct link to error?")
17
+
18
+ ```ts
19
+ optional error: string;
20
+
21
+ ```
22
+
23
+ #### status?[​](#status "Direct link to status?")
24
+
25
+ ```ts
26
+ optional status: number;
27
+
28
+ ```
29
+
30
+ #### traceId[​](#traceid "Direct link to traceId")
31
+
32
+ ```ts
33
+ traceId: string;
34
+
35
+ ```
36
+
37
+ ***
38
+
39
+ ### skipped[​](#skipped "Direct link to skipped")
40
+
41
+ ```ts
42
+ skipped: number;
43
+
44
+ ```
45
+
46
+ ***
47
+
48
+ ### written[​](#written "Direct link to written")
49
+
50
+ ```ts
51
+ written: number;
52
+
53
+ ```
@@ -0,0 +1,34 @@
1
+ # Interface: ResolveDatabricksAuthOptions
2
+
3
+ ## Properties[​](#properties "Direct link to Properties")
4
+
5
+ ### host?[​](#host "Direct link to host?")
6
+
7
+ ```ts
8
+ optional host: string;
9
+
10
+ ```
11
+
12
+ Explicit host; wins over the profile/SDK-resolved host when set.
13
+
14
+ ***
15
+
16
+ ### profile?[​](#profile "Direct link to profile?")
17
+
18
+ ```ts
19
+ optional profile: string;
20
+
21
+ ```
22
+
23
+ `~/.databrickscfg` profile to authenticate with (e.g. `dogfood`).
24
+
25
+ ***
26
+
27
+ ### token?[​](#token "Direct link to token?")
28
+
29
+ ```ts
30
+ optional token: string;
31
+
32
+ ```
33
+
34
+ Explicit bearer token; when set, no OAuth is minted (PAT/CI path).
@@ -0,0 +1,45 @@
1
+ # Interface: RunEvalOptions
2
+
3
+ ## Properties[​](#properties "Direct link to Properties")
4
+
5
+ ### driver[​](#driver "Direct link to driver")
6
+
7
+ ```ts
8
+ driver: EvalDriver;
9
+
10
+ ```
11
+
12
+ Drives the agent and returns reply/tool-calls/success per `send`.
13
+
14
+ ***
15
+
16
+ ### id[​](#id "Direct link to id")
17
+
18
+ ```ts
19
+ id: string;
20
+
21
+ ```
22
+
23
+ Stable id for the eval (e.g. its file path relative to the evals dir).
24
+
25
+ ***
26
+
27
+ ### row?[​](#row "Direct link to row?")
28
+
29
+ ```ts
30
+ optional row: DatasetRow;
31
+
32
+ ```
33
+
34
+ Dataset row bound to `t.input`/`t.expected` for dataset-driven evals.
35
+
36
+ ***
37
+
38
+ ### strict?[​](#strict "Direct link to strict?")
39
+
40
+ ```ts
41
+ optional strict: boolean;
42
+
43
+ ```
44
+
45
+ When true, soft assertion failures also fail the eval.
@@ -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.