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
- const require_evals_api = require("./evals-api-DZSr9rtP.cjs");
1
+ const require_evals_api = require("./evals-api-CNoLlXL5.cjs");
2
2
  let effect = require("effect");
3
3
  let _effect_platform = require("@effect/platform");
4
4
  //#region ../schema/src/domain/prompts.ts
@@ -93,6 +93,28 @@ effect.Schema.Struct({
93
93
  version: effect.Schema.optional(VersionNumber)
94
94
  });
95
95
  //#endregion
96
+ //#region ../schema/src/public/connectors-api.ts
97
+ const ListConnectorsRequest = effect.Schema.Struct({}).annotations({
98
+ description: "List the connectors this organization has.",
99
+ identifier: "ListConnectorsRequest"
100
+ });
101
+ const AddConnectorRequest = effect.Schema.Struct({
102
+ authMethodId: effect.Schema.String.pipe(effect.Schema.minLength(1)),
103
+ integrationId: effect.Schema.String.pipe(effect.Schema.minLength(1)),
104
+ isDefault: effect.Schema.optionalWith(effect.Schema.Boolean, { default: () => false }),
105
+ name: effect.Schema.String.pipe(effect.Schema.minLength(1), effect.Schema.maxLength(80)),
106
+ scope: effect.Schema.optionalWith(require_evals_api.CredentialScope, { default: () => "organization" }),
107
+ values: require_evals_api.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 = effect.Schema.Struct({ id: effect.Schema.String.pipe(effect.Schema.minLength(1)) }).annotations({
113
+ description: "Remove a connector by its id.",
114
+ identifier: "RemoveConnectorRequest"
115
+ });
116
+ var PublicConnectorsGroup = class extends _effect_platform.HttpApiGroup.make("connectors").add(_effect_platform.HttpApiEndpoint.post("integrations", "/connectors.integrations").setPayload(ListConnectorsRequest).addSuccess(effect.Schema.Array(require_evals_api.CredentialIntegration)).annotate(_effect_platform.OpenApi.Summary, "List the integrations that can be connected").annotate(_effect_platform.OpenApi.Description, "Each integration states the auth methods it accepts and the fields each one needs.")).add(_effect_platform.HttpApiEndpoint.post("list", "/connectors.list").setPayload(ListConnectorsRequest).addSuccess(effect.Schema.Array(require_evals_api.CredentialConnection)).annotate(_effect_platform.OpenApi.Summary, "List connected integrations").annotate(_effect_platform.OpenApi.Description, "The stored secret is never returned, only that a connection exists.")).add(_effect_platform.HttpApiEndpoint.post("add", "/connectors.add").setPayload(AddConnectorRequest).addSuccess(require_evals_api.CredentialConnection).annotate(_effect_platform.OpenApi.Summary, "Connect an integration").annotate(_effect_platform.OpenApi.Description, "Values are encrypted on arrival. The response states the connection without them.")).add(_effect_platform.HttpApiEndpoint.post("remove", "/connectors.remove").setPayload(RemoveConnectorRequest).addSuccess(effect.Schema.Void).annotate(_effect_platform.OpenApi.Summary, "Remove a connector")).middleware(require_evals_api.ApiKeyAuthentication).addError(require_evals_api.BadRequest).addError(require_evals_api.Forbidden).addError(require_evals_api.NotFound).annotate(_effect_platform.OpenApi.Title, "Connectors").annotate(_effect_platform.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 = effect.Schema.Struct({
98
120
  channel: effect.Schema.optional(ChannelName),
@@ -201,7 +223,7 @@ const PromptList = effect.Schema.Struct({ data: effect.Schema.Array(PublicPrompt
201
223
  var PublicPromptsGroup = class extends _effect_platform.HttpApiGroup.make("prompts").add(_effect_platform.HttpApiEndpoint.post("get", "/prompts.get").setPayload(GetPromptRequest).addSuccess(PublicPromptWithVersions).annotate(_effect_platform.OpenApi.Summary, "Resolve a prompt").annotate(_effect_platform.OpenApi.Description, "Returns the content a caller should send to a model. With no selector this follows the organization's default channel.")).add(_effect_platform.HttpApiEndpoint.post("list", "/prompts.list").setPayload(ListPromptsRequest).addSuccess(PromptList).annotate(_effect_platform.OpenApi.Summary, "List prompts").annotate(_effect_platform.OpenApi.Description, "Up to 100 prompts in the organization, without content.")).add(_effect_platform.HttpApiEndpoint.post("create", "/prompts.create").setPayload(CreatePromptRequest).addSuccess(PublicPromptWithVersions).annotate(_effect_platform.OpenApi.Summary, "Create a prompt").annotate(_effect_platform.OpenApi.Description, "Creates the prompt and its first version in one call.")).add(_effect_platform.HttpApiEndpoint.post("update", "/prompts.update").setPayload(UpdatePromptRequest).addSuccess(PublicPromptWithVersions).annotate(_effect_platform.OpenApi.Summary, "Add a version").annotate(_effect_platform.OpenApi.Description, "Content is versioned, so updating a prompt appends a version rather than overwriting one. Earlier versions stay readable.")).add(_effect_platform.HttpApiEndpoint.post("promote", "/prompts.promote").setPayload(PromotePromptRequest).addSuccess(Ok).annotate(_effect_platform.OpenApi.Summary, "Promote a version to a channel").annotate(_effect_platform.OpenApi.Description, "Points a channel, such as production, at a version. This is how a version goes live without callers changing anything.")).addError(require_evals_api.BadRequest).addError(require_evals_api.Forbidden).addError(require_evals_api.Conflict).addError(require_evals_api.NotFound).middleware(require_evals_api.ApiKeyAuthentication).annotate(_effect_platform.OpenApi.Title, "Prompts").annotate(_effect_platform.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 _effect_platform.HttpApi.make("anpord-public").add(require_evals_api.PublicEvalsGroup).add(PublicPromptsGroup).prefix("/v1").annotate(_effect_platform.OpenApi.Title, "Anpord API").annotate(_effect_platform.OpenApi.Version, "1.0.0").annotate(_effect_platform.OpenApi.Description, "Run agent evals and manage prompts. Every endpoint takes a JSON body over POST and authenticates with a bearer API key.").annotate(_effect_platform.OpenApi.Servers, [{
226
+ var PublicApi = class extends _effect_platform.HttpApi.make("anpord-public").add(PublicConnectorsGroup).add(require_evals_api.PublicEvalsGroup).add(PublicPromptsGroup).prefix("/v1").annotate(_effect_platform.OpenApi.Title, "Anpord API").annotate(_effect_platform.OpenApi.Version, "1.0.0").annotate(_effect_platform.OpenApi.Description, "Run agent evals and manage prompts. Every endpoint takes a JSON body over POST and authenticates with a bearer API key.").annotate(_effect_platform.OpenApi.Servers, [{
205
227
  description: "Production",
206
228
  url: "https://api.anpord.com"
207
229
  }]) {};