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.
Files changed (57) hide show
  1. package/dist/api-context.cjs +1 -1
  2. package/dist/api-context.d.cts +1 -1
  3. package/dist/api-context.d.mts +1 -1
  4. package/dist/api-context.mjs +1 -1
  5. package/dist/{api-mocks-C3SsliJZ.mjs → api-mocks-BYWvJp9v.mjs} +3 -3
  6. package/dist/{api-mocks-CAQFqUgY.d.cts → api-mocks-BenVx0e8.d.cts} +11 -11
  7. package/dist/{api-mocks-CAQFqUgY.d.mts → api-mocks-BenVx0e8.d.mts} +11 -11
  8. package/dist/{api-mocks-BjnewAya.cjs → api-mocks-CgiC7T9U.cjs} +8 -2
  9. package/dist/api-runtime.cjs +1 -1
  10. package/dist/api-runtime.d.cts +1 -1
  11. package/dist/api-runtime.d.mts +1 -1
  12. package/dist/api-runtime.mjs +1 -1
  13. package/dist/api.cjs +1 -1
  14. package/dist/api.d.cts +1 -1
  15. package/dist/api.d.mts +1 -1
  16. package/dist/api.mjs +1 -1
  17. package/dist/bin.cjs +4301 -228
  18. package/dist/bin.mjs +4305 -232
  19. package/dist/{client-COfGoWvI.cjs → client-BZDftC1x.cjs} +24 -2
  20. package/dist/{client-BucAp4c0.d.mts → client-C7iEhiDm.d.mts} +5882 -2454
  21. package/dist/{client-OTrC6QXZ.d.cts → client-CsGxLUZq.d.cts} +5882 -2454
  22. package/dist/{client-sWrfA0jZ.mjs → client-D0l3kwWV.mjs} +24 -2
  23. package/dist/{compiler-CPpRRAdH.cjs → compiler-Cy85vNbp.cjs} +2 -2
  24. package/dist/{compiler-q6rnLW2F.mjs → compiler-DSQRHvXS.mjs} +2 -2
  25. package/dist/config.cjs +1 -1
  26. package/dist/config.d.cts +1 -1
  27. package/dist/config.d.mts +1 -1
  28. package/dist/config.mjs +1 -1
  29. package/dist/{eval-turns-hf6tbL-E.mjs → eval-turns-BC-GMHD-.mjs} +3 -2
  30. package/dist/{eval-turns-Bv8wRQ-b.cjs → eval-turns-DcJ8_1qr.cjs} +8 -1
  31. package/dist/{eval-validations-D0Cz6xSg.cjs → eval-validations-CZm7vVtQ.cjs} +12 -0
  32. package/dist/{eval-validations-CUG2PvR_.mjs → eval-validations-DNO-qwkU.mjs} +1 -1
  33. package/dist/eval.cjs +1 -1
  34. package/dist/eval.d.cts +1 -1
  35. package/dist/eval.d.mts +1 -1
  36. package/dist/eval.mjs +1 -1
  37. package/dist/{evals-CSipRo7i.d.cts → evals-Dw2Ek-mx.d.cts} +131 -128
  38. package/dist/{evals-CSipRo7i.d.mts → evals-Dw2Ek-mx.d.mts} +131 -128
  39. package/dist/{evals-api-u98TxdqN.mjs → evals-api-CK3F1KoI.mjs} +164 -65
  40. package/dist/{evals-api-DZSr9rtP.cjs → evals-api-CNoLlXL5.cjs} +199 -64
  41. package/dist/index.cjs +2 -2
  42. package/dist/index.d.cts +3 -3
  43. package/dist/index.d.mts +3 -3
  44. package/dist/index.mjs +2 -2
  45. package/dist/{runtime-B5it0Siy.cjs → runtime-Bfs2j0jW.cjs} +2 -2
  46. package/dist/{runtime-ChWJywJY.mjs → runtime-CYr8RbsW.mjs} +2 -2
  47. package/dist/source.d.cts +1 -1
  48. package/dist/source.d.mts +1 -1
  49. package/dist/{types-LW0tX4MF.d.mts → types-D-h67MVJ.d.mts} +14 -13
  50. package/dist/{types-DCUo5on_.d.cts → types-Dvd_z5ge.d.cts} +14 -13
  51. package/dist/validator-runtime.cjs +2 -2
  52. package/dist/validator-runtime.d.cts +1 -1
  53. package/dist/validator-runtime.d.mts +1 -1
  54. package/dist/validator-runtime.mjs +2 -2
  55. package/dist/validators.cjs +1 -1
  56. package/dist/validators.mjs +1 -1
  57. package/package.json +3 -1
@@ -1,4 +1,4 @@
1
- import { g as NotFound, h as Forbidden, m as Conflict, p as BadRequest, r as ApiKeyAuthentication, t as PublicEvalsGroup } from "./evals-api-u98TxdqN.mjs";
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-BjnewAya.cjs");
3
- const require_evals_api = require("./evals-api-DZSr9rtP.cjs");
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-C3SsliJZ.mjs";
3
- import { a as EvalValidator, c as PROFILE_LIMITS, d as EvalSourceFiles, l as ProfilePath, n as PublicStartEvalRequest, o as EnvName, s as HarnessProfile, u as profileFitsHarness } from "./evals-api-u98TxdqN.mjs";
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-COfGoWvI.cjs");
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-OTrC6QXZ.cjs";
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-BucAp4c0.mjs";
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-sWrfA0jZ.mjs";
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 { EvalSimulatedUser as n, EvalUser as r, EvalScriptedUser as t };
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 { validationCapture as a, unavailableValue as i, VALIDATION_FRAME as n, validationExecution as o, ValidationValue as r, validationSnapshot as s, EvalValidations as t };
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-CPpRRAdH.cjs");
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-DCUo5on_.cjs";
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-LW0tX4MF.mjs";
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-q6rnLW2F.mjs";
1
+ import { n as compileEval, t as compileDefinition } from "./compiler-DSQRHvXS.mjs";
2
2
  export { compileDefinition, compileEval };