@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.
- package/CLAUDE.md +63 -0
- package/NOTICE.md +3 -2
- package/dist/appkit/package.js +1 -1
- package/dist/beta.d.ts +18 -3
- package/dist/beta.js +14 -1
- package/dist/cli/commands/agent/eval.js +120 -0
- package/dist/cli/commands/agent/eval.js.map +1 -0
- package/dist/cli/commands/agent/index.js +18 -0
- package/dist/cli/commands/agent/index.js.map +1 -0
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/connectors/index.js +2 -0
- package/dist/connectors/mlflow/auth.d.ts +28 -0
- package/dist/connectors/mlflow/auth.d.ts.map +1 -0
- package/dist/connectors/mlflow/auth.js +70 -0
- package/dist/connectors/mlflow/auth.js.map +1 -0
- package/dist/connectors/mlflow/client.d.ts +51 -0
- package/dist/connectors/mlflow/client.d.ts.map +1 -0
- package/dist/connectors/mlflow/client.js +93 -0
- package/dist/connectors/mlflow/client.js.map +1 -0
- package/dist/connectors/mlflow/index.d.ts +2 -0
- package/dist/database/errors.js +15 -5
- package/dist/database/errors.js.map +1 -1
- package/dist/database/runtime/data-path.d.ts +7 -0
- package/dist/database/runtime/data-path.d.ts.map +1 -0
- package/dist/database/runtime/data-path.js.map +1 -1
- package/dist/database/runtime/engine/drizzle-data-path.js +7 -5
- package/dist/database/runtime/engine/drizzle-data-path.js.map +1 -1
- package/dist/database/schema-builder/define-schema.d.ts +1 -1
- package/dist/database/schema-builder/define-schema.js +1 -1
- package/dist/database/schema-builder/define-schema.js.map +1 -1
- package/dist/errors/database-validation.d.ts +23 -0
- package/dist/errors/database-validation.d.ts.map +1 -0
- package/dist/errors/database-validation.js +24 -0
- package/dist/errors/database-validation.js.map +1 -0
- package/dist/errors/index.js +1 -0
- package/dist/evals/dataset.d.ts +36 -0
- package/dist/evals/dataset.d.ts.map +1 -0
- package/dist/evals/dataset.js +36 -0
- package/dist/evals/dataset.js.map +1 -0
- package/dist/evals/define-eval.d.ts +26 -0
- package/dist/evals/define-eval.d.ts.map +1 -0
- package/dist/evals/define-eval.js +28 -0
- package/dist/evals/define-eval.js.map +1 -0
- package/dist/evals/discover.d.ts +20 -0
- package/dist/evals/discover.d.ts.map +1 -0
- package/dist/evals/discover.js +49 -0
- package/dist/evals/discover.js.map +1 -0
- package/dist/evals/http-driver.d.ts +33 -0
- package/dist/evals/http-driver.d.ts.map +1 -0
- package/dist/evals/http-driver.js +123 -0
- package/dist/evals/http-driver.js.map +1 -0
- package/dist/evals/index.d.ts +14 -0
- package/dist/evals/index.js +14 -0
- package/dist/evals/judge.d.ts +27 -0
- package/dist/evals/judge.d.ts.map +1 -0
- package/dist/evals/judge.js +77 -0
- package/dist/evals/judge.js.map +1 -0
- package/dist/evals/matchers.d.ts +12 -0
- package/dist/evals/matchers.d.ts.map +1 -0
- package/dist/evals/matchers.js +26 -0
- package/dist/evals/matchers.js.map +1 -0
- package/dist/evals/mlflow-report.d.ts +37 -0
- package/dist/evals/mlflow-report.d.ts.map +1 -0
- package/dist/evals/mlflow-report.js +161 -0
- package/dist/evals/mlflow-report.js.map +1 -0
- package/dist/evals/mlflow-run.d.ts +13 -0
- package/dist/evals/mlflow-run.d.ts.map +1 -0
- package/dist/evals/mlflow-run.js +101 -0
- package/dist/evals/mlflow-run.js.map +1 -0
- package/dist/evals/pool.js +24 -0
- package/dist/evals/pool.js.map +1 -0
- package/dist/evals/report.d.ts +25 -0
- package/dist/evals/report.d.ts.map +1 -0
- package/dist/evals/report.js +57 -0
- package/dist/evals/report.js.map +1 -0
- package/dist/evals/run-eval.d.ts +23 -0
- package/dist/evals/run-eval.d.ts.map +1 -0
- package/dist/evals/run-eval.js +152 -0
- package/dist/evals/run-eval.js.map +1 -0
- package/dist/evals/run-evals.d.ts +94 -0
- package/dist/evals/run-evals.d.ts.map +1 -0
- package/dist/evals/run-evals.js +257 -0
- package/dist/evals/run-evals.js.map +1 -0
- package/dist/evals/types.d.ts +163 -0
- package/dist/evals/types.d.ts.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/plugin/plugin.d.ts.map +1 -1
- package/dist/plugin/plugin.js +1 -1
- package/dist/plugin/plugin.js.map +1 -1
- package/dist/plugins/agents/agents.js +1 -1
- package/dist/plugins/database/crud/contract.js +17 -8
- package/dist/plugins/database/crud/contract.js.map +1 -1
- package/dist/plugins/database/crud/exposure.js +63 -22
- package/dist/plugins/database/crud/exposure.js.map +1 -1
- package/dist/plugins/database/crud/request.js +50 -0
- package/dist/plugins/database/crud/request.js.map +1 -0
- package/dist/plugins/database/crud/response.js +77 -0
- package/dist/plugins/database/crud/response.js.map +1 -0
- package/dist/plugins/database/crud/routes.js +71 -52
- package/dist/plugins/database/crud/routes.js.map +1 -1
- package/dist/plugins/database/database.d.ts +6 -4
- package/dist/plugins/database/database.d.ts.map +1 -1
- package/dist/plugins/database/database.js +46 -16
- package/dist/plugins/database/database.js.map +1 -1
- package/dist/plugins/database/defaults.js +5 -1
- package/dist/plugins/database/defaults.js.map +1 -1
- package/dist/plugins/database/entity-client.js +143 -10
- package/dist/plugins/database/entity-client.js.map +1 -1
- package/dist/plugins/database/entity-types.d.ts +1 -1
- package/dist/plugins/database/hooks.d.ts +38 -0
- package/dist/plugins/database/hooks.d.ts.map +1 -0
- package/dist/plugins/database/index.d.ts +3 -2
- package/dist/plugins/database/lifecycle.js +67 -28
- package/dist/plugins/database/lifecycle.js.map +1 -1
- package/dist/plugins/database/scope.js +58 -0
- package/dist/plugins/database/scope.js.map +1 -0
- package/dist/plugins/database/types.d.ts +40 -12
- package/dist/plugins/database/types.d.ts.map +1 -1
- package/docs/api/appkit/Class.AppKitError.md +1 -0
- package/docs/api/appkit/Class.DatabaseValidationError.md +191 -0
- package/docs/api/appkit/Class.MlflowClient.md +103 -0
- package/docs/api/appkit/Function.buildAssessments.md +16 -0
- package/docs/api/appkit/Function.configureJudge.md +18 -0
- package/docs/api/appkit/Function.createHttpDriver.md +18 -0
- package/docs/api/appkit/Function.defineEval.md +35 -0
- package/docs/api/appkit/Function.defineSchema.md +1 -1
- package/docs/api/appkit/Function.discoverEvalFiles.md +18 -0
- package/docs/api/appkit/Function.equals.md +18 -0
- package/docs/api/appkit/Function.evalGlyph.md +18 -0
- package/docs/api/appkit/Function.formatEvalDetail.md +18 -0
- package/docs/api/appkit/Function.formatEvalHeadline.md +18 -0
- package/docs/api/appkit/Function.formatEvalResults.md +18 -0
- package/docs/api/appkit/Function.formatSummaryLine.md +18 -0
- package/docs/api/appkit/Function.includes.md +18 -0
- package/docs/api/appkit/Function.isJudgeConfigured.md +10 -0
- package/docs/api/appkit/Function.matches.md +18 -0
- package/docs/api/appkit/Function.normalizeHost.md +18 -0
- package/docs/api/appkit/Function.readEvalDataset.md +21 -0
- package/docs/api/appkit/Function.reportToMlflow.md +23 -0
- package/docs/api/appkit/Function.resolveDatabricksAuth.md +16 -0
- package/docs/api/appkit/Function.resolveWorkspaceClient.md +18 -0
- package/docs/api/appkit/Function.runEval.md +19 -0
- package/docs/api/appkit/Function.runEvalsInDir.md +18 -0
- package/docs/api/appkit/Function.summarize.md +16 -0
- package/docs/api/appkit/Interface.AssertionHandle.md +54 -0
- package/docs/api/appkit/Interface.AssertionResult.md +48 -0
- package/docs/api/appkit/Interface.Assessment.md +83 -0
- package/docs/api/appkit/Interface.CustomJudgeSpec.md +30 -0
- package/docs/api/appkit/Interface.DatabaseValidationIssue.md +21 -0
- package/docs/api/appkit/Interface.DatabricksAuth.md +21 -0
- package/docs/api/appkit/Interface.DatasetRow.md +21 -0
- package/docs/api/appkit/Interface.DiscoveredEval.md +36 -0
- package/docs/api/appkit/Interface.DriveResult.md +58 -0
- package/docs/api/appkit/Interface.EntityMutationHooks.md +173 -0
- package/docs/api/appkit/Interface.EvalDefinition.md +74 -0
- package/docs/api/appkit/Interface.EvalDriver.md +37 -0
- package/docs/api/appkit/Interface.EvalResult.md +83 -0
- package/docs/api/appkit/Interface.EvalRunSummary.md +46 -0
- package/docs/api/appkit/Interface.EvalSummary.md +48 -0
- package/docs/api/appkit/Interface.HookApp.md +12 -0
- package/docs/api/appkit/Interface.HookContext.md +21 -0
- package/docs/api/appkit/Interface.HttpDriverOptions.md +67 -0
- package/docs/api/appkit/Interface.JudgeConfig.md +34 -0
- package/docs/api/appkit/Interface.JudgeScore.md +21 -0
- package/docs/api/appkit/Interface.MatchResult.md +34 -0
- package/docs/api/appkit/Interface.PostResult.md +30 -0
- package/docs/api/appkit/Interface.ReadEvalDatasetOptions.md +34 -0
- package/docs/api/appkit/Interface.ReadSerializerContext.md +21 -0
- package/docs/api/appkit/Interface.ReportOutcome.md +53 -0
- package/docs/api/appkit/Interface.ResolveDatabricksAuthOptions.md +34 -0
- package/docs/api/appkit/Interface.RunEvalOptions.md +45 -0
- package/docs/api/appkit/Interface.RunEvalsOptions.md +214 -0
- package/docs/api/appkit/Interface.TestContext.md +245 -0
- package/docs/api/appkit/TypeAlias.DatabaseApiConfig.md +53 -0
- package/docs/api/appkit/TypeAlias.DatabaseApiWriteOperation.md +8 -0
- package/docs/api/appkit/TypeAlias.DatabaseApiWritesConfig.md +49 -0
- package/docs/api/appkit/TypeAlias.DatabaseExports.md +3 -3
- package/docs/api/appkit/TypeAlias.EntityHooks.md +25 -0
- package/docs/api/appkit/TypeAlias.EvalProgress.md +26 -0
- package/docs/api/appkit/TypeAlias.IDatabaseConfig.md +16 -5
- package/docs/api/appkit/TypeAlias.Matcher.md +18 -0
- package/docs/api/appkit/TypeAlias.ReadSerializer.md +19 -0
- package/docs/api/appkit/TypeAlias.Severity.md +8 -0
- package/docs/api/appkit/TypeAlias.TransactionClient.md +19 -0
- package/docs/api/appkit.md +157 -95
- package/docs/plugins/database.md +144 -0
- package/llms.txt +63 -0
- package/package.json +3 -2
- package/sbom.cdx.json +1 -1
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Interface: EntityMutationHooks\<TTable>
|
|
2
|
+
|
|
3
|
+
Mutation lifecycle for one entity. A before hook may return a replacement payload, which is revalidated against the trusted schema before it is persisted. Every hook, the mutation, and any write a hook issues through `ctx.app.database` share one transaction, so a rejection anywhere rolls all of them back. Throw `DatabaseValidationError` to answer a generated route with `422`; any other failure stays an opaque server error.
|
|
4
|
+
|
|
5
|
+
## Type Parameters[](#type-parameters "Direct link to Type Parameters")
|
|
6
|
+
|
|
7
|
+
| Type Parameter | Default type |
|
|
8
|
+
| --------------------------- | ------------ |
|
|
9
|
+
| `TTable` *extends* `string` | `string` |
|
|
10
|
+
|
|
11
|
+
## Methods[](#methods "Direct link to Methods")
|
|
12
|
+
|
|
13
|
+
### afterCreate()?[](#aftercreate "Direct link to afterCreate()?")
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
optional afterCreate(row: FacetOf<TTable, "row">, context: HookContext): MaybePromise<void>;
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
#### Parameters[](#parameters "Direct link to Parameters")
|
|
21
|
+
|
|
22
|
+
| Parameter | Type |
|
|
23
|
+
| --------- | ----------------------------------------------------------------- |
|
|
24
|
+
| `row` | `FacetOf`<`TTable`, `"row"`> |
|
|
25
|
+
| `context` | [`HookContext`](./docs/api/appkit/Interface.HookContext.md) |
|
|
26
|
+
|
|
27
|
+
#### Returns[](#returns "Direct link to Returns")
|
|
28
|
+
|
|
29
|
+
`MaybePromise`<`void`>
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
### afterDelete()?[](#afterdelete "Direct link to afterDelete()?")
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
optional afterDelete(id: IdValue, context: HookContext): MaybePromise<void>;
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### Parameters[](#parameters-1 "Direct link to Parameters")
|
|
41
|
+
|
|
42
|
+
| Parameter | Type |
|
|
43
|
+
| --------- | ----------------------------------------------------------------- |
|
|
44
|
+
| `id` | `IdValue` |
|
|
45
|
+
| `context` | [`HookContext`](./docs/api/appkit/Interface.HookContext.md) |
|
|
46
|
+
|
|
47
|
+
#### Returns[](#returns-1 "Direct link to Returns")
|
|
48
|
+
|
|
49
|
+
`MaybePromise`<`void`>
|
|
50
|
+
|
|
51
|
+
***
|
|
52
|
+
|
|
53
|
+
### afterUpdate()?[](#afterupdate "Direct link to afterUpdate()?")
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
optional afterUpdate(row: FacetOf<TTable, "row">, context: HookContext): MaybePromise<void>;
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### Parameters[](#parameters-2 "Direct link to Parameters")
|
|
61
|
+
|
|
62
|
+
| Parameter | Type |
|
|
63
|
+
| --------- | ----------------------------------------------------------------- |
|
|
64
|
+
| `row` | `FacetOf`<`TTable`, `"row"`> |
|
|
65
|
+
| `context` | [`HookContext`](./docs/api/appkit/Interface.HookContext.md) |
|
|
66
|
+
|
|
67
|
+
#### Returns[](#returns-2 "Direct link to Returns")
|
|
68
|
+
|
|
69
|
+
`MaybePromise`<`void`>
|
|
70
|
+
|
|
71
|
+
***
|
|
72
|
+
|
|
73
|
+
### afterUpsert()?[](#afterupsert "Direct link to afterUpsert()?")
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
optional afterUpsert(row: FacetOf<TTable, "row">, context: HookContext): MaybePromise<void>;
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
#### Parameters[](#parameters-3 "Direct link to Parameters")
|
|
81
|
+
|
|
82
|
+
| Parameter | Type |
|
|
83
|
+
| --------- | ----------------------------------------------------------------- |
|
|
84
|
+
| `row` | `FacetOf`<`TTable`, `"row"`> |
|
|
85
|
+
| `context` | [`HookContext`](./docs/api/appkit/Interface.HookContext.md) |
|
|
86
|
+
|
|
87
|
+
#### Returns[](#returns-3 "Direct link to Returns")
|
|
88
|
+
|
|
89
|
+
`MaybePromise`<`void`>
|
|
90
|
+
|
|
91
|
+
***
|
|
92
|
+
|
|
93
|
+
### beforeCreate()?[](#beforecreate "Direct link to beforeCreate()?")
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
optional beforeCreate(values: FacetOf<TTable, "insert">, context: HookContext): MaybePromise<void | FacetOf<TTable, "insert">>;
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
#### Parameters[](#parameters-4 "Direct link to Parameters")
|
|
101
|
+
|
|
102
|
+
| Parameter | Type |
|
|
103
|
+
| --------- | ----------------------------------------------------------------- |
|
|
104
|
+
| `values` | `FacetOf`<`TTable`, `"insert"`> |
|
|
105
|
+
| `context` | [`HookContext`](./docs/api/appkit/Interface.HookContext.md) |
|
|
106
|
+
|
|
107
|
+
#### Returns[](#returns-4 "Direct link to Returns")
|
|
108
|
+
|
|
109
|
+
`MaybePromise`<`void` | `FacetOf`<`TTable`, `"insert"`>>
|
|
110
|
+
|
|
111
|
+
***
|
|
112
|
+
|
|
113
|
+
### beforeDelete()?[](#beforedelete "Direct link to beforeDelete()?")
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
optional beforeDelete(id: IdValue, context: HookContext): MaybePromise<void>;
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
#### Parameters[](#parameters-5 "Direct link to Parameters")
|
|
121
|
+
|
|
122
|
+
| Parameter | Type |
|
|
123
|
+
| --------- | ----------------------------------------------------------------- |
|
|
124
|
+
| `id` | `IdValue` |
|
|
125
|
+
| `context` | [`HookContext`](./docs/api/appkit/Interface.HookContext.md) |
|
|
126
|
+
|
|
127
|
+
#### Returns[](#returns-5 "Direct link to Returns")
|
|
128
|
+
|
|
129
|
+
`MaybePromise`<`void`>
|
|
130
|
+
|
|
131
|
+
***
|
|
132
|
+
|
|
133
|
+
### beforeUpdate()?[](#beforeupdate "Direct link to beforeUpdate()?")
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
optional beforeUpdate(
|
|
137
|
+
id: IdValue,
|
|
138
|
+
values: FacetOf<TTable, "update">,
|
|
139
|
+
context: HookContext): MaybePromise<void | FacetOf<TTable, "update">>;
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
#### Parameters[](#parameters-6 "Direct link to Parameters")
|
|
144
|
+
|
|
145
|
+
| Parameter | Type |
|
|
146
|
+
| --------- | ----------------------------------------------------------------- |
|
|
147
|
+
| `id` | `IdValue` |
|
|
148
|
+
| `values` | `FacetOf`<`TTable`, `"update"`> |
|
|
149
|
+
| `context` | [`HookContext`](./docs/api/appkit/Interface.HookContext.md) |
|
|
150
|
+
|
|
151
|
+
#### Returns[](#returns-6 "Direct link to Returns")
|
|
152
|
+
|
|
153
|
+
`MaybePromise`<`void` | `FacetOf`<`TTable`, `"update"`>>
|
|
154
|
+
|
|
155
|
+
***
|
|
156
|
+
|
|
157
|
+
### beforeUpsert()?[](#beforeupsert "Direct link to beforeUpsert()?")
|
|
158
|
+
|
|
159
|
+
```ts
|
|
160
|
+
optional beforeUpsert(values: FacetOf<TTable, "insert">, context: HookContext): MaybePromise<void | FacetOf<TTable, "insert">>;
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
#### Parameters[](#parameters-7 "Direct link to Parameters")
|
|
165
|
+
|
|
166
|
+
| Parameter | Type |
|
|
167
|
+
| --------- | ----------------------------------------------------------------- |
|
|
168
|
+
| `values` | `FacetOf`<`TTable`, `"insert"`> |
|
|
169
|
+
| `context` | [`HookContext`](./docs/api/appkit/Interface.HookContext.md) |
|
|
170
|
+
|
|
171
|
+
#### Returns[](#returns-7 "Direct link to Returns")
|
|
172
|
+
|
|
173
|
+
`MaybePromise`<`void` | `FacetOf`<`TTable`, `"insert"`>>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Interface: EvalDefinition
|
|
2
|
+
|
|
3
|
+
A single eval, default-exported from a `*.eval.ts` file.
|
|
4
|
+
|
|
5
|
+
## Properties[](#properties "Direct link to Properties")
|
|
6
|
+
|
|
7
|
+
### agent?[](#agent "Direct link to agent?")
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
optional agent: string;
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Target agent id. Defaults to the eval's parent `server/agents/<id>` dir.
|
|
15
|
+
|
|
16
|
+
***
|
|
17
|
+
|
|
18
|
+
### dataset?[](#dataset "Direct link to dataset?")
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
optional dataset: {
|
|
22
|
+
limit?: number;
|
|
23
|
+
table: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Run this eval once per row of a Databricks managed evaluation dataset (a Unity Catalog `catalog.schema.table` with `inputs`/`expectations` columns). Each row is bound to `t.input`/`t.expected`. Requires the runner to have a workspace client + warehouse (`--warehouse-id`). Omit for a single-run eval.
|
|
29
|
+
|
|
30
|
+
#### limit?[](#limit "Direct link to limit?")
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
optional limit: number;
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
#### table[](#table "Direct link to table")
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
table: string;
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
***
|
|
45
|
+
|
|
46
|
+
### description?[](#description "Direct link to description?")
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
optional description: string;
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Short human description, shown in reports.
|
|
54
|
+
|
|
55
|
+
## Methods[](#methods "Direct link to Methods")
|
|
56
|
+
|
|
57
|
+
### test()[](#test "Direct link to test()")
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
test(t: TestContext): void | Promise<void>;
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The eval body: drive the agent and assert on its behavior.
|
|
65
|
+
|
|
66
|
+
#### Parameters[](#parameters "Direct link to Parameters")
|
|
67
|
+
|
|
68
|
+
| Parameter | Type |
|
|
69
|
+
| --------- | ----------------------------------------------------------------- |
|
|
70
|
+
| `t` | [`TestContext`](./docs/api/appkit/Interface.TestContext.md) |
|
|
71
|
+
|
|
72
|
+
#### Returns[](#returns "Direct link to Returns")
|
|
73
|
+
|
|
74
|
+
`void` | `Promise`<`void`>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Interface: EvalDriver
|
|
2
|
+
|
|
3
|
+
Abstraction over how the agent is driven. The HTTP driver posts to a running app's agents endpoint; future drivers (in-process) implement the same shape.
|
|
4
|
+
|
|
5
|
+
## Methods[](#methods "Direct link to Methods")
|
|
6
|
+
|
|
7
|
+
### reset()?[](#reset "Direct link to reset()?")
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
optional reset(): void;
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Drop the current conversation so the next `send` starts a fresh thread. Optional: drivers without a session concept omit it.
|
|
15
|
+
|
|
16
|
+
#### Returns[](#returns "Direct link to Returns")
|
|
17
|
+
|
|
18
|
+
`void`
|
|
19
|
+
|
|
20
|
+
***
|
|
21
|
+
|
|
22
|
+
### send()[](#send "Direct link to send()")
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
send(message: string): Promise<DriveResult>;
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
#### Parameters[](#parameters "Direct link to Parameters")
|
|
30
|
+
|
|
31
|
+
| Parameter | Type |
|
|
32
|
+
| --------- | -------- |
|
|
33
|
+
| `message` | `string` |
|
|
34
|
+
|
|
35
|
+
#### Returns[](#returns-1 "Direct link to Returns")
|
|
36
|
+
|
|
37
|
+
`Promise`<[`DriveResult`](./docs/api/appkit/Interface.DriveResult.md)>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Interface: EvalResult
|
|
2
|
+
|
|
3
|
+
The outcome of running one eval.
|
|
4
|
+
|
|
5
|
+
## Properties[](#properties "Direct link to Properties")
|
|
6
|
+
|
|
7
|
+
### assertions[](#assertions "Direct link to assertions")
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
assertions: AssertionResult[];
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
***
|
|
15
|
+
|
|
16
|
+
### description?[](#description "Direct link to description?")
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
optional description: string;
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### error?[](#error "Direct link to error?")
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
optional error: string;
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Set when the eval threw before completing.
|
|
33
|
+
|
|
34
|
+
***
|
|
35
|
+
|
|
36
|
+
### id[](#id "Direct link to id")
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
id: string;
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
***
|
|
44
|
+
|
|
45
|
+
### passed[](#passed "Direct link to passed")
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
passed: boolean;
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
True when all gates passed (and, under strict, all soft assertions too).
|
|
53
|
+
|
|
54
|
+
***
|
|
55
|
+
|
|
56
|
+
### skipped?[](#skipped "Direct link to skipped?")
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
optional skipped: {
|
|
60
|
+
reason?: string;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Set when the eval called `t.skip`.
|
|
66
|
+
|
|
67
|
+
#### reason?[](#reason "Direct link to reason?")
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
optional reason: string;
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
***
|
|
75
|
+
|
|
76
|
+
### traceId?[](#traceid "Direct link to traceId?")
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
optional traceId: string;
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
MLflow trace id of the eval's last turn, for attaching assessments.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Interface: EvalRunSummary
|
|
2
|
+
|
|
3
|
+
## Properties[](#properties "Direct link to Properties")
|
|
4
|
+
|
|
5
|
+
### mlflow?[](#mlflow "Direct link to mlflow?")
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
optional mlflow: {
|
|
9
|
+
finish: FinishOutcome;
|
|
10
|
+
report: ReportOutcome;
|
|
11
|
+
runId: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Present when an MLflow evaluation run was created.
|
|
17
|
+
|
|
18
|
+
#### finish[](#finish "Direct link to finish")
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
finish: FinishOutcome;
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
#### report[](#report "Direct link to report")
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
report: ReportOutcome;
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
#### runId[](#runid "Direct link to runId")
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
runId: string;
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
***
|
|
40
|
+
|
|
41
|
+
### results[](#results "Direct link to results")
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
results: EvalResult[];
|
|
45
|
+
|
|
46
|
+
```
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Interface: EvalSummary
|
|
2
|
+
|
|
3
|
+
## Properties[](#properties "Direct link to Properties")
|
|
4
|
+
|
|
5
|
+
### allPassed[](#allpassed "Direct link to allPassed")
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
allPassed: boolean;
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
True when no eval failed (skips don't count as failures).
|
|
13
|
+
|
|
14
|
+
***
|
|
15
|
+
|
|
16
|
+
### failed[](#failed "Direct link to failed")
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
failed: number;
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### passed[](#passed "Direct link to passed")
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
passed: number;
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
***
|
|
33
|
+
|
|
34
|
+
### skipped[](#skipped "Direct link to skipped")
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
skipped: number;
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
***
|
|
42
|
+
|
|
43
|
+
### total[](#total "Direct link to total")
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
total: number;
|
|
47
|
+
|
|
48
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Interface: HookApp
|
|
2
|
+
|
|
3
|
+
The only capability a hook receives: entities bound to its transaction.
|
|
4
|
+
|
|
5
|
+
## Properties[](#properties "Direct link to Properties")
|
|
6
|
+
|
|
7
|
+
### database[](#database "Direct link to database")
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
readonly database: TransactionClient;
|
|
11
|
+
|
|
12
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Interface: HookContext
|
|
2
|
+
|
|
3
|
+
Which entity is being mutated, and the surface a hook may write through.
|
|
4
|
+
|
|
5
|
+
## Properties[](#properties "Direct link to Properties")
|
|
6
|
+
|
|
7
|
+
### app[](#app "Direct link to app")
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
readonly app: HookApp;
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
***
|
|
15
|
+
|
|
16
|
+
### entity[](#entity "Direct link to entity")
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
readonly entity: string;
|
|
20
|
+
|
|
21
|
+
```
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Interface: HttpDriverOptions
|
|
2
|
+
|
|
3
|
+
## Properties[](#properties "Direct link to Properties")
|
|
4
|
+
|
|
5
|
+
### agent?[](#agent "Direct link to agent?")
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
optional agent: string;
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Agent alias to target. Omit to use the app's default agent.
|
|
13
|
+
|
|
14
|
+
***
|
|
15
|
+
|
|
16
|
+
### baseUrl[](#baseurl "Direct link to baseUrl")
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
baseUrl: string;
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Base URL of the running app, e.g. `http://localhost:3000`.
|
|
24
|
+
|
|
25
|
+
***
|
|
26
|
+
|
|
27
|
+
### headers?[](#headers "Direct link to headers?")
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
optional headers: Record<string, string>;
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Extra request headers (e.g. auth for a deployed app).
|
|
35
|
+
|
|
36
|
+
***
|
|
37
|
+
|
|
38
|
+
### mlflowRunId?[](#mlflowrunid "Direct link to mlflowRunId?")
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
optional mlflowRunId: string;
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
MLflow run id to link each turn's trace to (for evaluation runs).
|
|
46
|
+
|
|
47
|
+
***
|
|
48
|
+
|
|
49
|
+
### path?[](#path "Direct link to path?")
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
optional path: string;
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Chat endpoint path. Defaults to `/api/agents/chat`.
|
|
57
|
+
|
|
58
|
+
***
|
|
59
|
+
|
|
60
|
+
### timeoutMs?[](#timeoutms "Direct link to timeoutMs?")
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
optional timeoutMs: number;
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Max wall-clock time for a single turn before it is abandoned as a failed turn (`succeeded: false`). Without this a hung agent — a blocked tool, a stalled model — never ends the SSE stream (heartbeats keep it alive), so the read loop spins forever and wedges the whole sequential suite. Defaults to 120s.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Interface: JudgeConfig
|
|
2
|
+
|
|
3
|
+
## Properties[](#properties "Direct link to Properties")
|
|
4
|
+
|
|
5
|
+
### client[](#client "Direct link to client")
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
client: MlflowClient;
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Client for the workspace hosting the judge serving endpoint.
|
|
13
|
+
|
|
14
|
+
***
|
|
15
|
+
|
|
16
|
+
### model[](#model "Direct link to model")
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
model: string;
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Serving endpoint name used as the judge model.
|
|
24
|
+
|
|
25
|
+
***
|
|
26
|
+
|
|
27
|
+
### token[](#token "Direct link to token")
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
token: string;
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Bearer token for the serving endpoint.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Interface: JudgeScore
|
|
2
|
+
|
|
3
|
+
A normalized judge result. `score` is 0..1.
|
|
4
|
+
|
|
5
|
+
## Properties[](#properties "Direct link to Properties")
|
|
6
|
+
|
|
7
|
+
### rationale?[](#rationale "Direct link to rationale?")
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
optional rationale: string;
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
***
|
|
15
|
+
|
|
16
|
+
### score[](#score "Direct link to score")
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
score: number;
|
|
20
|
+
|
|
21
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Interface: MatchResult
|
|
2
|
+
|
|
3
|
+
Result of a deterministic matcher run against a value.
|
|
4
|
+
|
|
5
|
+
## Properties[](#properties "Direct link to Properties")
|
|
6
|
+
|
|
7
|
+
### detail?[](#detail "Direct link to detail?")
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
optional detail: string;
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Human-readable explanation, shown on failure.
|
|
15
|
+
|
|
16
|
+
***
|
|
17
|
+
|
|
18
|
+
### pass[](#pass "Direct link to pass")
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
pass: boolean;
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
***
|
|
26
|
+
|
|
27
|
+
### score?[](#score "Direct link to score?")
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
optional score: number;
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Optional 0..1 score for scored matchers (similarity, judges).
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Interface: PostResult
|
|
2
|
+
|
|
3
|
+
Structured result for a best-effort POST that must not throw.
|
|
4
|
+
|
|
5
|
+
## Properties[](#properties "Direct link to Properties")
|
|
6
|
+
|
|
7
|
+
### error?[](#error "Direct link to error?")
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
optional error: string;
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
***
|
|
15
|
+
|
|
16
|
+
### ok[](#ok "Direct link to ok")
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
ok: boolean;
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### status?[](#status "Direct link to status?")
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
optional status: number;
|
|
29
|
+
|
|
30
|
+
```
|