@inkeep/agents-api 0.0.0-dev-20260206021304 → 0.0.0-dev-20260206203908

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 (43) hide show
  1. package/dist/.well-known/workflow/v1/step.cjs +10 -16
  2. package/dist/createApp.d.ts +2 -2
  3. package/dist/createApp.js +1 -3
  4. package/dist/data/db/manageDbClient.d.ts +2 -2
  5. package/dist/data/db/runDbClient.d.ts +2 -2
  6. package/dist/domains/evals/routes/datasetTriggers.d.ts +2 -2
  7. package/dist/domains/evals/routes/index.d.ts +2 -2
  8. package/dist/domains/evals/services/EvaluationService.js +1 -2
  9. package/dist/domains/evals/workflow/routes.d.ts +2 -2
  10. package/dist/domains/manage/index.js +4 -2
  11. package/dist/domains/manage/routes/availableAgents.d.ts +2 -2
  12. package/dist/domains/manage/routes/availableAgents.js +2 -2
  13. package/dist/domains/manage/routes/conversations.d.ts +2 -2
  14. package/dist/domains/manage/routes/invitations.d.ts +2 -2
  15. package/dist/domains/manage/routes/invitations.js +59 -0
  16. package/dist/domains/manage/routes/mcp.d.ts +2 -2
  17. package/dist/domains/manage/routes/passwordResetLinks.d.ts +10 -0
  18. package/dist/domains/manage/routes/passwordResetLinks.js +61 -0
  19. package/dist/domains/manage/routes/signoz.d.ts +2 -2
  20. package/dist/domains/manage/routes/users.d.ts +10 -0
  21. package/dist/domains/manage/routes/users.js +78 -0
  22. package/dist/domains/mcp/routes/mcp.d.ts +2 -2
  23. package/dist/domains/run/a2a/client.d.ts +0 -2
  24. package/dist/domains/run/a2a/client.js +5 -7
  25. package/dist/domains/run/agents/relationTools.d.ts +2 -2
  26. package/dist/domains/run/agents/relationTools.js +1 -3
  27. package/dist/domains/run/handlers/executionHandler.js +8 -12
  28. package/dist/domains/run/utils/token-estimator.d.ts +2 -2
  29. package/dist/factory.d.ts +59 -25
  30. package/dist/index.d.ts +128 -94
  31. package/dist/middleware/evalsAuth.d.ts +2 -2
  32. package/dist/middleware/manageAuth.d.ts +2 -2
  33. package/dist/middleware/projectAccess.d.ts +2 -2
  34. package/dist/middleware/projectConfig.d.ts +3 -3
  35. package/dist/middleware/requirePermission.d.ts +2 -2
  36. package/dist/middleware/runAuth.d.ts +4 -4
  37. package/dist/middleware/sessionAuth.d.ts +3 -3
  38. package/dist/middleware/tenantAccess.d.ts +2 -2
  39. package/package.json +5 -5
  40. package/dist/domains/manage/routes/userOrganizations.d.ts +0 -10
  41. package/dist/domains/manage/routes/userOrganizations.js +0 -29
  42. package/dist/utils/in-process-fetch.d.ts +0 -22
  43. package/dist/utils/in-process-fetch.js +0 -32
@@ -1,6 +1,5 @@
1
1
  import { getLogger as getLogger$1 } from "../../../logger.js";
2
2
  import runDbClient_default from "../../../data/db/runDbClient.js";
3
- import { getInProcessFetch } from "../../../utils/in-process-fetch.js";
4
3
  import { AGENT_EXECUTION_MAX_CONSECUTIVE_ERRORS } from "../constants/execution-limits/index.js";
5
4
  import { tracer } from "../utils/tracer.js";
6
5
  import { registerStreamHelper, unregisterStreamHelper } from "../utils/stream-registry.js";
@@ -165,17 +164,14 @@ var ExecutionHandler = class {
165
164
  currentAgentId = activeAgent.activeSubAgentId;
166
165
  logger.info({ currentAgentId }, `Updated current agent to: ${currentAgentId}`);
167
166
  }
168
- const a2aClient = new A2AClient(`${baseUrl}/run/agents`, {
169
- headers: {
170
- Authorization: `Bearer ${apiKey}`,
171
- "x-inkeep-tenant-id": tenantId,
172
- "x-inkeep-project-id": projectId,
173
- "x-inkeep-agent-id": agentId,
174
- "x-inkeep-sub-agent-id": currentAgentId,
175
- ...forwardedHeaders || {}
176
- },
177
- fetchFn: getInProcessFetch()
178
- });
167
+ const a2aClient = new A2AClient(`${baseUrl}/run/agents`, { headers: {
168
+ Authorization: `Bearer ${apiKey}`,
169
+ "x-inkeep-tenant-id": tenantId,
170
+ "x-inkeep-project-id": projectId,
171
+ "x-inkeep-agent-id": agentId,
172
+ "x-inkeep-sub-agent-id": currentAgentId,
173
+ ...forwardedHeaders || {}
174
+ } });
179
175
  let messageResponse = null;
180
176
  const messageMetadata = {
181
177
  stream_request_id: requestId,
@@ -1,4 +1,4 @@
1
- import * as _inkeep_agents_core3 from "@inkeep/agents-core";
1
+ import * as _inkeep_agents_core1 from "@inkeep/agents-core";
2
2
  import { BreakdownComponentDef, ContextBreakdown, calculateBreakdownTotal, createEmptyBreakdown } from "@inkeep/agents-core";
3
3
 
4
4
  //#region src/domains/run/utils/token-estimator.d.ts
@@ -17,7 +17,7 @@ interface AssembleResult {
17
17
  /** The assembled prompt string */
18
18
  prompt: string;
19
19
  /** Token breakdown for each component */
20
- breakdown: _inkeep_agents_core3.ContextBreakdown;
20
+ breakdown: _inkeep_agents_core1.ContextBreakdown;
21
21
  }
22
22
  //#endregion
23
23
  export { AssembleResult, type BreakdownComponentDef, type ContextBreakdown, calculateBreakdownTotal, createEmptyBreakdown, estimateTokens };
package/dist/factory.d.ts CHANGED
@@ -3,10 +3,10 @@ import "./types/index.js";
3
3
  import { createAgentsHono } from "./createApp.js";
4
4
  import { createAuth0Provider, createOIDCProvider } from "./ssoHelpers.js";
5
5
  import { CredentialStore, ServerConfig } from "@inkeep/agents-core";
6
- import * as hono10 from "hono";
6
+ import * as hono1 from "hono";
7
7
  import * as zod0 from "zod";
8
8
  import { SSOProviderConfig, UserAuthConfig } from "@inkeep/agents-core/auth";
9
- import * as hono_types1 from "hono/types";
9
+ import * as hono_types0 from "hono/types";
10
10
  import * as better_auth0 from "better-auth";
11
11
  import * as better_auth_plugins0 from "better-auth/plugins";
12
12
  import * as _better_auth_sso0 from "@better-auth/sso";
@@ -22,6 +22,16 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
22
22
  maxPasswordLength: number;
23
23
  requireEmailVerification: false;
24
24
  autoSignIn: true;
25
+ resetPasswordTokenExpiresIn: number;
26
+ sendResetPassword: ({
27
+ user,
28
+ url,
29
+ token
30
+ }: {
31
+ user: better_auth0.User;
32
+ url: string;
33
+ token: string;
34
+ }) => Promise<void>;
25
35
  };
26
36
  account: {
27
37
  accountLinking: {
@@ -794,25 +804,25 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
794
804
  ac: better_auth_plugins0.AccessControl;
795
805
  roles: {
796
806
  member: {
797
- authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
798
- actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key];
807
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
808
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
799
809
  connector: "OR" | "AND";
800
810
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
801
- statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
811
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
802
812
  };
803
813
  admin: {
804
- authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
805
- actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key];
814
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
815
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
806
816
  connector: "OR" | "AND";
807
817
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
808
- statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
818
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
809
819
  };
810
820
  owner: {
811
- authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
812
- actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key];
821
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
822
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
813
823
  connector: "OR" | "AND";
814
824
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
815
- statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
825
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
816
826
  };
817
827
  };
818
828
  creatorRole: "admin";
@@ -829,6 +839,17 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
829
839
  user: better_auth0.User;
830
840
  };
831
841
  }): Promise<void>;
842
+ schema: {
843
+ invitation: {
844
+ additionalFields: {
845
+ authMethod: {
846
+ type: "string";
847
+ input: true;
848
+ required: false;
849
+ };
850
+ };
851
+ };
852
+ };
832
853
  organizationHooks: {
833
854
  afterAcceptInvitation: ({
834
855
  member,
@@ -987,16 +1008,17 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
987
1008
  id: string;
988
1009
  organizationId: string;
989
1010
  email: string;
990
- role: "member" | "admin" | "owner";
1011
+ role: "member" | "owner" | "admin";
991
1012
  status: better_auth_plugins0.InvitationStatus;
992
1013
  inviterId: string;
993
1014
  expiresAt: Date;
994
1015
  createdAt: Date;
1016
+ authMethod?: string | undefined;
995
1017
  };
996
1018
  Member: {
997
1019
  id: string;
998
1020
  organizationId: string;
999
- role: "member" | "admin" | "owner";
1021
+ role: "member" | "owner" | "admin";
1000
1022
  createdAt: Date;
1001
1023
  userId: string;
1002
1024
  user: {
@@ -1012,7 +1034,7 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
1012
1034
  members: {
1013
1035
  id: string;
1014
1036
  organizationId: string;
1015
- role: "member" | "admin" | "owner";
1037
+ role: "member" | "owner" | "admin";
1016
1038
  createdAt: Date;
1017
1039
  userId: string;
1018
1040
  user: {
@@ -1026,11 +1048,12 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
1026
1048
  id: string;
1027
1049
  organizationId: string;
1028
1050
  email: string;
1029
- role: "member" | "admin" | "owner";
1051
+ role: "member" | "owner" | "admin";
1030
1052
  status: better_auth_plugins0.InvitationStatus;
1031
1053
  inviterId: string;
1032
1054
  expiresAt: Date;
1033
1055
  createdAt: Date;
1056
+ authMethod?: string | undefined;
1034
1057
  }[];
1035
1058
  } & {
1036
1059
  id: string;
@@ -1104,25 +1127,25 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
1104
1127
  ac: better_auth_plugins0.AccessControl;
1105
1128
  roles: {
1106
1129
  member: {
1107
- authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
1108
- actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key];
1130
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1131
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
1109
1132
  connector: "OR" | "AND";
1110
1133
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1111
- statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
1134
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
1112
1135
  };
1113
1136
  admin: {
1114
- authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
1115
- actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key];
1137
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1138
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
1116
1139
  connector: "OR" | "AND";
1117
1140
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1118
- statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
1141
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
1119
1142
  };
1120
1143
  owner: {
1121
- authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
1122
- actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key];
1144
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1145
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
1123
1146
  connector: "OR" | "AND";
1124
1147
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1125
- statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
1148
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
1126
1149
  };
1127
1150
  };
1128
1151
  creatorRole: "admin";
@@ -1139,6 +1162,17 @@ declare function createAgentsAuth(userAuthConfig?: UserAuthConfig): better_auth0
1139
1162
  user: better_auth0.User;
1140
1163
  };
1141
1164
  }): Promise<void>;
1165
+ schema: {
1166
+ invitation: {
1167
+ additionalFields: {
1168
+ authMethod: {
1169
+ type: "string";
1170
+ input: true;
1171
+ required: false;
1172
+ };
1173
+ };
1174
+ };
1175
+ };
1142
1176
  organizationHooks: {
1143
1177
  afterAcceptInvitation: ({
1144
1178
  member,
@@ -1536,6 +1570,6 @@ declare function createAgentsApp(config?: {
1536
1570
  credentialStores?: CredentialStore[];
1537
1571
  auth?: UserAuthConfig;
1538
1572
  sandboxConfig?: SandboxConfig;
1539
- }): hono10.Hono<hono_types1.BlankEnv, hono_types1.BlankSchema, "/">;
1573
+ }): hono1.Hono<hono_types0.BlankEnv, hono_types0.BlankSchema, "/">;
1540
1574
  //#endregion
1541
1575
  export { type SSOProviderConfig, type UserAuthConfig, createAgentsApp, createAgentsAuth, createAgentsHono, createAuth0Provider, createOIDCProvider };