anpord 0.1.19 → 0.1.21
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/dist/api-context.cjs +1 -1
- package/dist/api-context.d.cts +1 -1
- package/dist/api-context.d.mts +1 -1
- package/dist/api-context.mjs +1 -1
- package/dist/{api-mocks-C3SsliJZ.mjs → api-mocks-BYWvJp9v.mjs} +3 -3
- package/dist/{api-mocks-CAQFqUgY.d.cts → api-mocks-BenVx0e8.d.cts} +11 -11
- package/dist/{api-mocks-CAQFqUgY.d.mts → api-mocks-BenVx0e8.d.mts} +11 -11
- package/dist/{api-mocks-BjnewAya.cjs → api-mocks-CgiC7T9U.cjs} +8 -2
- package/dist/api-runtime.cjs +1 -1
- package/dist/api-runtime.d.cts +1 -1
- package/dist/api-runtime.d.mts +1 -1
- package/dist/api-runtime.mjs +1 -1
- package/dist/api.cjs +1 -1
- package/dist/api.d.cts +1 -1
- package/dist/api.d.mts +1 -1
- package/dist/api.mjs +1 -1
- package/dist/bin.cjs +4301 -228
- package/dist/bin.mjs +4305 -232
- package/dist/{client-COfGoWvI.cjs → client-BZDftC1x.cjs} +24 -2
- package/dist/{client-BucAp4c0.d.mts → client-C7iEhiDm.d.mts} +5882 -2454
- package/dist/{client-OTrC6QXZ.d.cts → client-CsGxLUZq.d.cts} +5882 -2454
- package/dist/{client-sWrfA0jZ.mjs → client-D0l3kwWV.mjs} +24 -2
- package/dist/{compiler-CPpRRAdH.cjs → compiler-Cy85vNbp.cjs} +2 -2
- package/dist/{compiler-q6rnLW2F.mjs → compiler-DSQRHvXS.mjs} +2 -2
- package/dist/config.cjs +1 -1
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/{eval-turns-hf6tbL-E.mjs → eval-turns-BC-GMHD-.mjs} +3 -2
- package/dist/{eval-turns-Bv8wRQ-b.cjs → eval-turns-DcJ8_1qr.cjs} +8 -1
- package/dist/{eval-validations-D0Cz6xSg.cjs → eval-validations-CZm7vVtQ.cjs} +12 -0
- package/dist/{eval-validations-CUG2PvR_.mjs → eval-validations-DNO-qwkU.mjs} +1 -1
- package/dist/eval.cjs +1 -1
- package/dist/eval.d.cts +1 -1
- package/dist/eval.d.mts +1 -1
- package/dist/eval.mjs +1 -1
- package/dist/{evals-CSipRo7i.d.cts → evals-Dw2Ek-mx.d.cts} +131 -128
- package/dist/{evals-CSipRo7i.d.mts → evals-Dw2Ek-mx.d.mts} +131 -128
- package/dist/{evals-api-u98TxdqN.mjs → evals-api-CK3F1KoI.mjs} +164 -65
- package/dist/{evals-api-DZSr9rtP.cjs → evals-api-CNoLlXL5.cjs} +199 -64
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{runtime-B5it0Siy.cjs → runtime-Bfs2j0jW.cjs} +2 -2
- package/dist/{runtime-ChWJywJY.mjs → runtime-CYr8RbsW.mjs} +2 -2
- package/dist/source.d.cts +1 -1
- package/dist/source.d.mts +1 -1
- package/dist/{types-LW0tX4MF.d.mts → types-D-h67MVJ.d.mts} +14 -13
- package/dist/{types-DCUo5on_.d.cts → types-Dvd_z5ge.d.cts} +14 -13
- package/dist/validator-runtime.cjs +2 -2
- package/dist/validator-runtime.d.cts +1 -1
- package/dist/validator-runtime.d.mts +1 -1
- package/dist/validator-runtime.mjs +2 -2
- package/dist/validators.cjs +1 -1
- package/dist/validators.mjs +1 -1
- package/package.json +3 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as CredentialValues, _ as Forbidden, b as CredentialIntegration, g as Conflict, h as BadRequest, m as ApiKeyAuthentication, t as PublicEvalsGroup, v as NotFound, x as CredentialScope, y as CredentialConnection } from "./evals-api-CK3F1KoI.mjs";
|
|
2
2
|
import { Effect, Layer, Redacted, Schema } from "effect";
|
|
3
3
|
import { FetchHttpClient, HttpApi, HttpApiClient, HttpApiEndpoint, HttpApiGroup, HttpClient, HttpClientRequest, OpenApi } from "@effect/platform";
|
|
4
4
|
//#region ../schema/src/domain/prompts.ts
|
|
@@ -93,6 +93,28 @@ Schema.Struct({
|
|
|
93
93
|
version: Schema.optional(VersionNumber)
|
|
94
94
|
});
|
|
95
95
|
//#endregion
|
|
96
|
+
//#region ../schema/src/public/connectors-api.ts
|
|
97
|
+
const ListConnectorsRequest = Schema.Struct({}).annotations({
|
|
98
|
+
description: "List the connectors this organization has.",
|
|
99
|
+
identifier: "ListConnectorsRequest"
|
|
100
|
+
});
|
|
101
|
+
const AddConnectorRequest = Schema.Struct({
|
|
102
|
+
authMethodId: Schema.String.pipe(Schema.minLength(1)),
|
|
103
|
+
integrationId: Schema.String.pipe(Schema.minLength(1)),
|
|
104
|
+
isDefault: Schema.optionalWith(Schema.Boolean, { default: () => false }),
|
|
105
|
+
name: Schema.String.pipe(Schema.minLength(1), Schema.maxLength(80)),
|
|
106
|
+
scope: Schema.optionalWith(CredentialScope, { default: () => "organization" }),
|
|
107
|
+
values: CredentialValues
|
|
108
|
+
}).annotations({
|
|
109
|
+
description: "Connect an integration. The values are encrypted on arrival and never read back.",
|
|
110
|
+
identifier: "AddConnectorRequest"
|
|
111
|
+
});
|
|
112
|
+
const RemoveConnectorRequest = Schema.Struct({ id: Schema.String.pipe(Schema.minLength(1)) }).annotations({
|
|
113
|
+
description: "Remove a connector by its id.",
|
|
114
|
+
identifier: "RemoveConnectorRequest"
|
|
115
|
+
});
|
|
116
|
+
var PublicConnectorsGroup = class extends HttpApiGroup.make("connectors").add(HttpApiEndpoint.post("integrations", "/connectors.integrations").setPayload(ListConnectorsRequest).addSuccess(Schema.Array(CredentialIntegration)).annotate(OpenApi.Summary, "List the integrations that can be connected").annotate(OpenApi.Description, "Each integration states the auth methods it accepts and the fields each one needs.")).add(HttpApiEndpoint.post("list", "/connectors.list").setPayload(ListConnectorsRequest).addSuccess(Schema.Array(CredentialConnection)).annotate(OpenApi.Summary, "List connected integrations").annotate(OpenApi.Description, "The stored secret is never returned, only that a connection exists.")).add(HttpApiEndpoint.post("add", "/connectors.add").setPayload(AddConnectorRequest).addSuccess(CredentialConnection).annotate(OpenApi.Summary, "Connect an integration").annotate(OpenApi.Description, "Values are encrypted on arrival. The response states the connection without them.")).add(HttpApiEndpoint.post("remove", "/connectors.remove").setPayload(RemoveConnectorRequest).addSuccess(Schema.Void).annotate(OpenApi.Summary, "Remove a connector")).middleware(ApiKeyAuthentication).addError(BadRequest).addError(Forbidden).addError(NotFound).annotate(OpenApi.Title, "Connectors").annotate(OpenApi.Description, "Connect the credentials an eval run needs: a harness to drive, a sandbox to run in, and a model to play a case's human.") {};
|
|
117
|
+
//#endregion
|
|
96
118
|
//#region ../schema/src/public/requests.ts
|
|
97
119
|
const GetPromptRequest = Schema.Struct({
|
|
98
120
|
channel: Schema.optional(ChannelName),
|
|
@@ -201,7 +223,7 @@ const PromptList = Schema.Struct({ data: Schema.Array(PublicPromptSummary) }).an
|
|
|
201
223
|
var PublicPromptsGroup = class extends HttpApiGroup.make("prompts").add(HttpApiEndpoint.post("get", "/prompts.get").setPayload(GetPromptRequest).addSuccess(PublicPromptWithVersions).annotate(OpenApi.Summary, "Resolve a prompt").annotate(OpenApi.Description, "Returns the content a caller should send to a model. With no selector this follows the organization's default channel.")).add(HttpApiEndpoint.post("list", "/prompts.list").setPayload(ListPromptsRequest).addSuccess(PromptList).annotate(OpenApi.Summary, "List prompts").annotate(OpenApi.Description, "Up to 100 prompts in the organization, without content.")).add(HttpApiEndpoint.post("create", "/prompts.create").setPayload(CreatePromptRequest).addSuccess(PublicPromptWithVersions).annotate(OpenApi.Summary, "Create a prompt").annotate(OpenApi.Description, "Creates the prompt and its first version in one call.")).add(HttpApiEndpoint.post("update", "/prompts.update").setPayload(UpdatePromptRequest).addSuccess(PublicPromptWithVersions).annotate(OpenApi.Summary, "Add a version").annotate(OpenApi.Description, "Content is versioned, so updating a prompt appends a version rather than overwriting one. Earlier versions stay readable.")).add(HttpApiEndpoint.post("promote", "/prompts.promote").setPayload(PromotePromptRequest).addSuccess(Ok).annotate(OpenApi.Summary, "Promote a version to a channel").annotate(OpenApi.Description, "Points a channel, such as production, at a version. This is how a version goes live without callers changing anything.")).addError(BadRequest).addError(Forbidden).addError(Conflict).addError(NotFound).middleware(ApiKeyAuthentication).annotate(OpenApi.Title, "Prompts").annotate(OpenApi.Description, "Read and write prompts. Content is versioned, so writes append rather than overwrite, and channels decide which version callers receive.") {};
|
|
202
224
|
//#endregion
|
|
203
225
|
//#region ../schema/src/public/api.ts
|
|
204
|
-
var PublicApi = class extends HttpApi.make("anpord-public").add(PublicEvalsGroup).add(PublicPromptsGroup).prefix("/v1").annotate(OpenApi.Title, "Anpord API").annotate(OpenApi.Version, "1.0.0").annotate(OpenApi.Description, "Run agent evals and manage prompts. Every endpoint takes a JSON body over POST and authenticates with a bearer API key.").annotate(OpenApi.Servers, [{
|
|
226
|
+
var PublicApi = class extends HttpApi.make("anpord-public").add(PublicConnectorsGroup).add(PublicEvalsGroup).add(PublicPromptsGroup).prefix("/v1").annotate(OpenApi.Title, "Anpord API").annotate(OpenApi.Version, "1.0.0").annotate(OpenApi.Description, "Run agent evals and manage prompts. Every endpoint takes a JSON body over POST and authenticates with a bearer API key.").annotate(OpenApi.Servers, [{
|
|
205
227
|
description: "Production",
|
|
206
228
|
url: "https://api.anpord.com"
|
|
207
229
|
}]) {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_eval_judges = require("./eval-judges-1zF4PVqV.cjs");
|
|
2
|
-
const require_api_mocks = require("./api-mocks-
|
|
3
|
-
const require_evals_api = require("./evals-api-
|
|
2
|
+
const require_api_mocks = require("./api-mocks-CgiC7T9U.cjs");
|
|
3
|
+
const require_evals_api = require("./evals-api-CNoLlXL5.cjs");
|
|
4
4
|
const require_source = require("./source-aW5nSo2h.cjs");
|
|
5
5
|
let effect = require("effect");
|
|
6
6
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as EvalJudge } from "./eval-judges-Bee_ABJt.mjs";
|
|
2
|
-
import { r as API_PROGRAM } from "./api-mocks-
|
|
3
|
-
import {
|
|
2
|
+
import { r as API_PROGRAM } from "./api-mocks-BYWvJp9v.mjs";
|
|
3
|
+
import { c as HarnessProfile, d as profileFitsHarness, f as EvalSourceFiles, l as PROFILE_LIMITS, n as PublicStartEvalRequest, o as EvalValidator, s as EnvName, u as ProfilePath } from "./evals-api-CK3F1KoI.mjs";
|
|
4
4
|
import { r as repo } from "./source-BP11pzVV.mjs";
|
|
5
5
|
import { Data, Effect, Option, Schema } from "effect";
|
|
6
6
|
import { mkdtemp, readFile, readdir, rm, stat, writeFile } from "node:fs/promises";
|
package/dist/config.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_client = require("./client-
|
|
2
|
+
const require_client = require("./client-BZDftC1x.cjs");
|
|
3
3
|
let effect = require("effect");
|
|
4
4
|
//#region src/client/config.ts
|
|
5
5
|
const apiKeyConfig = effect.Config.redacted("ANPORD_API_KEY");
|
package/dist/config.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as AnpordApi } from "./client-
|
|
1
|
+
import { t as AnpordApi } from "./client-CsGxLUZq.cjs";
|
|
2
2
|
import { Config, Layer } from "effect";
|
|
3
3
|
//#region src/client/config.d.ts
|
|
4
4
|
declare const apiKeyConfig: Config.Config<import("effect/Redacted").Redacted<string>>;
|
package/dist/config.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as AnpordApi } from "./client-
|
|
1
|
+
import { t as AnpordApi } from "./client-C7iEhiDm.mjs";
|
|
2
2
|
import { Config, Layer } from "effect";
|
|
3
3
|
//#region src/client/config.d.ts
|
|
4
4
|
declare const apiKeyConfig: Config.Config<import("effect/Redacted").Redacted<string>>;
|
package/dist/config.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as DEFAULT_BASE_URL, r as layer } from "./client-
|
|
1
|
+
import { n as DEFAULT_BASE_URL, r as layer } from "./client-D0l3kwWV.mjs";
|
|
2
2
|
import { Config, Effect, Layer } from "effect";
|
|
3
3
|
//#region src/client/config.ts
|
|
4
4
|
const apiKeyConfig = Config.redacted("ANPORD_API_KEY");
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
//#region ../schema/src/domain/eval-turns.ts
|
|
3
3
|
const text = Schema.String.pipe(Schema.minLength(1));
|
|
4
|
+
const DEFAULT_USER_MODEL = "gpt-5.4-mini";
|
|
4
5
|
const EvalSimulatedUser = Schema.Struct({
|
|
5
6
|
kind: Schema.Literal("simulated"),
|
|
6
7
|
goal: text.pipe(Schema.maxLength(2e3)),
|
|
@@ -17,6 +18,6 @@ Schema.Struct({
|
|
|
17
18
|
agentText: Schema.String,
|
|
18
19
|
commandCount: Schema.NonNegativeInt
|
|
19
20
|
});
|
|
20
|
-
Schema.Literal("user-done", "max-turns", "failed");
|
|
21
|
+
Schema.Literal("user-done", "max-turns", "no-user", "failed");
|
|
21
22
|
//#endregion
|
|
22
|
-
export {
|
|
23
|
+
export { EvalUser as i, EvalScriptedUser as n, EvalSimulatedUser as r, DEFAULT_USER_MODEL as t };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
let effect = require("effect");
|
|
2
2
|
//#region ../schema/src/domain/eval-turns.ts
|
|
3
3
|
const text = effect.Schema.String.pipe(effect.Schema.minLength(1));
|
|
4
|
+
const DEFAULT_USER_MODEL = "gpt-5.4-mini";
|
|
4
5
|
const EvalSimulatedUser = effect.Schema.Struct({
|
|
5
6
|
kind: effect.Schema.Literal("simulated"),
|
|
6
7
|
goal: text.pipe(effect.Schema.maxLength(2e3)),
|
|
@@ -17,8 +18,14 @@ effect.Schema.Struct({
|
|
|
17
18
|
agentText: effect.Schema.String,
|
|
18
19
|
commandCount: effect.Schema.NonNegativeInt
|
|
19
20
|
});
|
|
20
|
-
effect.Schema.Literal("user-done", "max-turns", "failed");
|
|
21
|
+
effect.Schema.Literal("user-done", "max-turns", "no-user", "failed");
|
|
21
22
|
//#endregion
|
|
23
|
+
Object.defineProperty(exports, "DEFAULT_USER_MODEL", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function() {
|
|
26
|
+
return DEFAULT_USER_MODEL;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
22
29
|
Object.defineProperty(exports, "EvalScriptedUser", {
|
|
23
30
|
enumerable: true,
|
|
24
31
|
get: function() {
|
|
@@ -110,6 +110,12 @@ const validationExecution = (identity, startedAt) => ({
|
|
|
110
110
|
logs: []
|
|
111
111
|
});
|
|
112
112
|
//#endregion
|
|
113
|
+
Object.defineProperty(exports, "EvalValidation", {
|
|
114
|
+
enumerable: true,
|
|
115
|
+
get: function() {
|
|
116
|
+
return EvalValidation;
|
|
117
|
+
}
|
|
118
|
+
});
|
|
113
119
|
Object.defineProperty(exports, "EvalValidations", {
|
|
114
120
|
enumerable: true,
|
|
115
121
|
get: function() {
|
|
@@ -122,6 +128,12 @@ Object.defineProperty(exports, "VALIDATION_FRAME", {
|
|
|
122
128
|
return VALIDATION_FRAME;
|
|
123
129
|
}
|
|
124
130
|
});
|
|
131
|
+
Object.defineProperty(exports, "VALIDATION_TEXT_LIMIT", {
|
|
132
|
+
enumerable: true,
|
|
133
|
+
get: function() {
|
|
134
|
+
return VALIDATION_TEXT_LIMIT;
|
|
135
|
+
}
|
|
136
|
+
});
|
|
125
137
|
Object.defineProperty(exports, "ValidationValue", {
|
|
126
138
|
enumerable: true,
|
|
127
139
|
get: function() {
|
|
@@ -110,4 +110,4 @@ const validationExecution = (identity, startedAt) => ({
|
|
|
110
110
|
logs: []
|
|
111
111
|
});
|
|
112
112
|
//#endregion
|
|
113
|
-
export {
|
|
113
|
+
export { ValidationValue as a, validationExecution as c, VALIDATION_TEXT_LIMIT as i, validationSnapshot as l, EvalValidations as n, unavailableValue as o, VALIDATION_FRAME as r, validationCapture as s, EvalValidation as t };
|
package/dist/eval.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_compiler = require("./compiler-
|
|
2
|
+
const require_compiler = require("./compiler-Cy85vNbp.cjs");
|
|
3
3
|
exports.compileDefinition = require_compiler.compileDefinition;
|
|
4
4
|
exports.compileEval = require_compiler.compileEval;
|
package/dist/eval.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as PublicStartEvalRequest, i as EvalDefinition } from "./types-
|
|
1
|
+
import { h as PublicStartEvalRequest, i as EvalDefinition } from "./types-Dvd_z5ge.cjs";
|
|
2
2
|
import { Effect } from "effect";
|
|
3
3
|
//#region src/evals/compiler.d.ts
|
|
4
4
|
declare const compileDefinition: (definition: EvalDefinition) => Promise<PublicStartEvalRequest>;
|
package/dist/eval.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as PublicStartEvalRequest, i as EvalDefinition } from "./types-
|
|
1
|
+
import { h as PublicStartEvalRequest, i as EvalDefinition } from "./types-D-h67MVJ.mjs";
|
|
2
2
|
import { Effect } from "effect";
|
|
3
3
|
//#region src/evals/compiler.d.ts
|
|
4
4
|
declare const compileDefinition: (definition: EvalDefinition) => Promise<PublicStartEvalRequest>;
|
package/dist/eval.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as compileEval, t as compileDefinition } from "./compiler-
|
|
1
|
+
import { n as compileEval, t as compileDefinition } from "./compiler-DSQRHvXS.mjs";
|
|
2
2
|
export { compileDefinition, compileEval };
|