@inkeep/agents-core 0.0.0-dev-20260125001234 → 0.0.0-dev-20260126174131

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 (33) hide show
  1. package/dist/auth/auth-schema.d.ts +82 -82
  2. package/dist/auth/auth.d.ts +57 -57
  3. package/dist/auth/permissions.d.ts +13 -13
  4. package/dist/client-exports.d.ts +3 -3
  5. package/dist/context/TemplateEngine.d.ts +0 -6
  6. package/dist/context/TemplateEngine.js +4 -18
  7. package/dist/data-access/manage/agents.d.ts +46 -46
  8. package/dist/data-access/manage/artifactComponents.d.ts +14 -14
  9. package/dist/data-access/manage/contextConfigs.d.ts +20 -20
  10. package/dist/data-access/manage/dataComponents.d.ts +6 -6
  11. package/dist/data-access/manage/functionTools.d.ts +18 -18
  12. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
  13. package/dist/data-access/manage/subAgentRelations.d.ts +34 -34
  14. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
  15. package/dist/data-access/manage/subAgents.d.ts +18 -18
  16. package/dist/data-access/manage/tools.d.ts +30 -30
  17. package/dist/data-access/runtime/apiKeys.d.ts +20 -20
  18. package/dist/data-access/runtime/conversations.d.ts +27 -27
  19. package/dist/data-access/runtime/messages.d.ts +15 -15
  20. package/dist/data-access/runtime/tasks.d.ts +6 -6
  21. package/dist/db/manage/manage-schema.d.ts +377 -377
  22. package/dist/db/runtime/runtime-schema.d.ts +181 -181
  23. package/dist/utils/JsonTransformer.d.ts +1 -3
  24. package/dist/utils/JsonTransformer.js +14 -23
  25. package/dist/utils/jmespath-utils.d.ts +152 -0
  26. package/dist/utils/jmespath-utils.js +213 -0
  27. package/dist/utils/signature-validation.d.ts +2 -39
  28. package/dist/utils/signature-validation.js +1 -69
  29. package/dist/utils/trigger-auth.js +3 -5
  30. package/dist/validation/dolt-schemas.d.ts +1 -1
  31. package/dist/validation/schemas.d.ts +1438 -1438
  32. package/dist/validation/schemas.js +32 -36
  33. package/package.json +1 -1
@@ -2,7 +2,7 @@ import { AgentsRunDatabaseClient } from "../db/runtime/runtime-client.js";
2
2
  import * as _better_auth_sso0 from "@better-auth/sso";
3
3
  import * as better_auth0 from "better-auth";
4
4
  import { BetterAuthAdvancedOptions } from "better-auth";
5
- import * as better_auth_plugins20 from "better-auth/plugins";
5
+ import * as better_auth_plugins0 from "better-auth/plugins";
6
6
  import * as zod0 from "zod";
7
7
  import { GoogleOptions } from "better-auth/social-providers";
8
8
 
@@ -219,7 +219,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
219
219
  handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>;
220
220
  }[];
221
221
  };
222
- options: better_auth_plugins20.BearerOptions | undefined;
222
+ options: better_auth_plugins0.BearerOptions | undefined;
223
223
  }, {
224
224
  id: "sso";
225
225
  endpoints: {
@@ -847,30 +847,30 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
847
847
  };
848
848
  }, {
849
849
  id: "organization";
850
- endpoints: better_auth_plugins20.OrganizationEndpoints<{
850
+ endpoints: better_auth_plugins0.OrganizationEndpoints<{
851
851
  allowUserToCreateOrganization: true;
852
- ac: better_auth_plugins20.AccessControl;
852
+ ac: better_auth_plugins0.AccessControl;
853
853
  roles: {
854
854
  member: {
855
- authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
856
- actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
855
+ authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
856
+ actions: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
857
857
  connector: "OR" | "AND";
858
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
859
- statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
858
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
859
+ statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
860
860
  };
861
861
  admin: {
862
- authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
863
- actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
862
+ authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
863
+ actions: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
864
864
  connector: "OR" | "AND";
865
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
866
- statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
865
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
866
+ statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
867
867
  };
868
868
  owner: {
869
- authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
870
- actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
869
+ authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
870
+ actions: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
871
871
  connector: "OR" | "AND";
872
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
873
- statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
872
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
873
+ statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
874
874
  };
875
875
  };
876
876
  membershipLimit: number;
@@ -880,9 +880,9 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
880
880
  id: string;
881
881
  role: string;
882
882
  email: string;
883
- organization: better_auth_plugins20.Organization;
884
- invitation: better_auth_plugins20.Invitation;
885
- inviter: better_auth_plugins20.Member & {
883
+ organization: better_auth_plugins0.Organization;
884
+ invitation: better_auth_plugins0.Invitation;
885
+ inviter: better_auth_plugins0.Member & {
886
886
  user: better_auth0.User;
887
887
  };
888
888
  }): Promise<void>;
@@ -892,28 +892,28 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
892
892
  user,
893
893
  organization: org
894
894
  }: {
895
- invitation: better_auth_plugins20.Invitation & Record<string, any>;
896
- member: better_auth_plugins20.Member & Record<string, any>;
895
+ invitation: better_auth_plugins0.Invitation & Record<string, any>;
896
+ member: better_auth_plugins0.Member & Record<string, any>;
897
897
  user: better_auth0.User & Record<string, any>;
898
- organization: better_auth_plugins20.Organization & Record<string, any>;
898
+ organization: better_auth_plugins0.Organization & Record<string, any>;
899
899
  }) => Promise<void>;
900
900
  beforeUpdateMemberRole: ({
901
901
  member,
902
902
  organization: org,
903
903
  newRole
904
904
  }: {
905
- member: better_auth_plugins20.Member & Record<string, any>;
905
+ member: better_auth_plugins0.Member & Record<string, any>;
906
906
  newRole: string;
907
907
  user: better_auth0.User & Record<string, any>;
908
- organization: better_auth_plugins20.Organization & Record<string, any>;
908
+ organization: better_auth_plugins0.Organization & Record<string, any>;
909
909
  }) => Promise<void>;
910
910
  afterRemoveMember: ({
911
911
  member,
912
912
  organization: org
913
913
  }: {
914
- member: better_auth_plugins20.Member & Record<string, any>;
914
+ member: better_auth_plugins0.Member & Record<string, any>;
915
915
  user: better_auth0.User & Record<string, any>;
916
- organization: better_auth_plugins20.Organization & Record<string, any>;
916
+ organization: better_auth_plugins0.Organization & Record<string, any>;
917
917
  }) => Promise<void>;
918
918
  };
919
919
  }>;
@@ -1044,8 +1044,8 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1044
1044
  id: string;
1045
1045
  organizationId: string;
1046
1046
  email: string;
1047
- role: "member" | "admin" | "owner";
1048
- status: better_auth_plugins20.InvitationStatus;
1047
+ role: "owner" | "admin" | "member";
1048
+ status: better_auth_plugins0.InvitationStatus;
1049
1049
  inviterId: string;
1050
1050
  expiresAt: Date;
1051
1051
  createdAt: Date;
@@ -1053,7 +1053,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1053
1053
  Member: {
1054
1054
  id: string;
1055
1055
  organizationId: string;
1056
- role: "member" | "admin" | "owner";
1056
+ role: "owner" | "admin" | "member";
1057
1057
  createdAt: Date;
1058
1058
  userId: string;
1059
1059
  user: {
@@ -1069,7 +1069,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1069
1069
  members: {
1070
1070
  id: string;
1071
1071
  organizationId: string;
1072
- role: "member" | "admin" | "owner";
1072
+ role: "owner" | "admin" | "member";
1073
1073
  createdAt: Date;
1074
1074
  userId: string;
1075
1075
  user: {
@@ -1083,8 +1083,8 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1083
1083
  id: string;
1084
1084
  organizationId: string;
1085
1085
  email: string;
1086
- role: "member" | "admin" | "owner";
1087
- status: better_auth_plugins20.InvitationStatus;
1086
+ role: "owner" | "admin" | "member";
1087
+ status: better_auth_plugins0.InvitationStatus;
1088
1088
  inviterId: string;
1089
1089
  expiresAt: Date;
1090
1090
  createdAt: Date;
@@ -1158,28 +1158,28 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1158
1158
  };
1159
1159
  options: NoInfer<{
1160
1160
  allowUserToCreateOrganization: true;
1161
- ac: better_auth_plugins20.AccessControl;
1161
+ ac: better_auth_plugins0.AccessControl;
1162
1162
  roles: {
1163
1163
  member: {
1164
- authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
1165
- actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
1164
+ authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1165
+ actions: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
1166
1166
  connector: "OR" | "AND";
1167
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
1168
- statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
1167
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1168
+ statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
1169
1169
  };
1170
1170
  admin: {
1171
- authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
1172
- actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
1171
+ authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1172
+ actions: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
1173
1173
  connector: "OR" | "AND";
1174
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
1175
- statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
1174
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1175
+ statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
1176
1176
  };
1177
1177
  owner: {
1178
- authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
1179
- actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
1178
+ authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1179
+ actions: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
1180
1180
  connector: "OR" | "AND";
1181
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
1182
- statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
1181
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1182
+ statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
1183
1183
  };
1184
1184
  };
1185
1185
  membershipLimit: number;
@@ -1189,9 +1189,9 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1189
1189
  id: string;
1190
1190
  role: string;
1191
1191
  email: string;
1192
- organization: better_auth_plugins20.Organization;
1193
- invitation: better_auth_plugins20.Invitation;
1194
- inviter: better_auth_plugins20.Member & {
1192
+ organization: better_auth_plugins0.Organization;
1193
+ invitation: better_auth_plugins0.Invitation;
1194
+ inviter: better_auth_plugins0.Member & {
1195
1195
  user: better_auth0.User;
1196
1196
  };
1197
1197
  }): Promise<void>;
@@ -1201,28 +1201,28 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1201
1201
  user,
1202
1202
  organization: org
1203
1203
  }: {
1204
- invitation: better_auth_plugins20.Invitation & Record<string, any>;
1205
- member: better_auth_plugins20.Member & Record<string, any>;
1204
+ invitation: better_auth_plugins0.Invitation & Record<string, any>;
1205
+ member: better_auth_plugins0.Member & Record<string, any>;
1206
1206
  user: better_auth0.User & Record<string, any>;
1207
- organization: better_auth_plugins20.Organization & Record<string, any>;
1207
+ organization: better_auth_plugins0.Organization & Record<string, any>;
1208
1208
  }) => Promise<void>;
1209
1209
  beforeUpdateMemberRole: ({
1210
1210
  member,
1211
1211
  organization: org,
1212
1212
  newRole
1213
1213
  }: {
1214
- member: better_auth_plugins20.Member & Record<string, any>;
1214
+ member: better_auth_plugins0.Member & Record<string, any>;
1215
1215
  newRole: string;
1216
1216
  user: better_auth0.User & Record<string, any>;
1217
- organization: better_auth_plugins20.Organization & Record<string, any>;
1217
+ organization: better_auth_plugins0.Organization & Record<string, any>;
1218
1218
  }) => Promise<void>;
1219
1219
  afterRemoveMember: ({
1220
1220
  member,
1221
1221
  organization: org
1222
1222
  }: {
1223
- member: better_auth_plugins20.Member & Record<string, any>;
1223
+ member: better_auth_plugins0.Member & Record<string, any>;
1224
1224
  user: better_auth0.User & Record<string, any>;
1225
- organization: better_auth_plugins20.Organization & Record<string, any>;
1225
+ organization: better_auth_plugins0.Organization & Record<string, any>;
1226
1226
  }) => Promise<void>;
1227
1227
  };
1228
1228
  }>;
@@ -1559,8 +1559,8 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1559
1559
  readonly AUTHENTICATION_REQUIRED: "Authentication required";
1560
1560
  };
1561
1561
  options: Partial<{
1562
- expiresIn: better_auth_plugins20.TimeString;
1563
- interval: better_auth_plugins20.TimeString;
1562
+ expiresIn: better_auth_plugins0.TimeString;
1563
+ interval: better_auth_plugins0.TimeString;
1564
1564
  deviceCodeLength: number;
1565
1565
  userCodeLength: number;
1566
1566
  schema: {
@@ -1,29 +1,29 @@
1
- import * as better_auth_plugins0 from "better-auth/plugins";
1
+ import * as better_auth_plugins69 from "better-auth/plugins";
2
2
  import { AccessControl } from "better-auth/plugins/access";
3
3
  import { organizationClient } from "better-auth/client/plugins";
4
4
 
5
5
  //#region src/auth/permissions.d.ts
6
6
  declare const ac: AccessControl;
7
7
  declare const memberRole: {
8
- authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
9
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
8
+ authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
9
+ actions: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key];
10
10
  connector: "OR" | "AND";
11
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
12
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
11
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
12
+ statements: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>;
13
13
  };
14
14
  declare const adminRole: {
15
- authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
16
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
15
+ authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
16
+ actions: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key];
17
17
  connector: "OR" | "AND";
18
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
19
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
18
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
19
+ statements: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>;
20
20
  };
21
21
  declare const ownerRole: {
22
- authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
23
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
22
+ authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
23
+ actions: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key];
24
24
  connector: "OR" | "AND";
25
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
26
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
25
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
26
+ statements: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>;
27
27
  };
28
28
  //#endregion
29
29
  export { ac, adminRole, memberRole, organizationClient, ownerRole };
@@ -66,8 +66,8 @@ declare const AgentApiInsertSchema: z.ZodObject<{
66
66
  canTransferTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
67
67
  canDelegateTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
68
68
  type: z.ZodOptional<z.ZodEnum<{
69
- internal: "internal";
70
69
  external: "external";
70
+ internal: "internal";
71
71
  }>>;
72
72
  }, z.core.$strip>;
73
73
  declare const ToolApiInsertSchema: z.ZodObject<{
@@ -193,10 +193,10 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
193
193
  defaultSubAgentId: z.ZodOptional<z.ZodString>;
194
194
  subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
195
195
  id: z.ZodString;
196
- name: z.ZodString;
197
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
198
196
  createdAt: z.ZodOptional<z.ZodString>;
197
+ name: z.ZodString;
199
198
  updatedAt: z.ZodOptional<z.ZodString>;
199
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
200
200
  models: z.ZodOptional<z.ZodObject<{
201
201
  base: z.ZodOptional<z.ZodObject<{
202
202
  model: z.ZodOptional<z.ZodString>;
@@ -12,12 +12,6 @@ declare class TemplateEngine {
12
12
  * Render a template string with context data using JMESPath
13
13
  */
14
14
  static render(template: string, context: TemplateContext, options?: TemplateRenderOptions): string;
15
- /**
16
- * Normalize JMES path by wrapping property names with dashes in quotes
17
- * Example: headers.x-tenant-id -> headers."x-tenant-id"
18
- * Example: api-responses[0].response-code -> "api-responses"[0]."response-code"
19
- */
20
- private static normalizeJMESPath;
21
15
  /**
22
16
  * Process variable substitutions {{variable.path}} using JMESPath
23
17
  */
@@ -1,5 +1,5 @@
1
+ import { normalizeJMESPath, searchJMESPath } from "../utils/jmespath-utils.js";
1
2
  import { getLogger } from "../utils/logger.js";
2
- import jmespath from "jmespath";
3
3
 
4
4
  //#region src/context/TemplateEngine.ts
5
5
  const logger = getLogger("template-engine");
@@ -33,20 +33,6 @@ var TemplateEngine = class TemplateEngine {
33
33
  }
34
34
  }
35
35
  /**
36
- * Normalize JMES path by wrapping property names with dashes in quotes
37
- * Example: headers.x-tenant-id -> headers."x-tenant-id"
38
- * Example: api-responses[0].response-code -> "api-responses"[0]."response-code"
39
- */
40
- static normalizeJMESPath(path) {
41
- return path.split(".").map((segment) => {
42
- if (!segment.includes("-")) return segment;
43
- if (segment.startsWith("\"") && segment.includes("\"")) return segment;
44
- const bracketIndex = segment.indexOf("[");
45
- if (bracketIndex !== -1) return `"${segment.substring(0, bracketIndex)}"${segment.substring(bracketIndex)}`;
46
- return `"${segment}"`;
47
- }).join(".");
48
- }
49
- /**
50
36
  * Process variable substitutions {{variable.path}} using JMESPath
51
37
  */
52
38
  static processVariables(template, context, options) {
@@ -54,8 +40,8 @@ var TemplateEngine = class TemplateEngine {
54
40
  const trimmedPath = path.trim();
55
41
  try {
56
42
  if (trimmedPath.startsWith("$")) return TemplateEngine.processBuiltinVariable(trimmedPath);
57
- const normalizedPath = TemplateEngine.normalizeJMESPath(trimmedPath);
58
- const result = jmespath.search(context, normalizedPath);
43
+ const normalizedPath = normalizeJMESPath(trimmedPath);
44
+ const result = searchJMESPath(context, normalizedPath);
59
45
  if (result === void 0 || result === null) {
60
46
  if (options.strict) throw new Error(`Template variable '${trimmedPath}' not found in context`);
61
47
  if (options.preserveUnresolved) return match;
@@ -76,7 +62,7 @@ var TemplateEngine = class TemplateEngine {
76
62
  return String(result);
77
63
  } catch (error) {
78
64
  const errorMessage = error instanceof Error ? error.message : "Unknown error";
79
- const normalizedPath = TemplateEngine.normalizeJMESPath(trimmedPath);
65
+ const normalizedPath = normalizeJMESPath(trimmedPath);
80
66
  if (options.strict) throw new Error(`Failed to resolve template variable '${trimmedPath}' (normalized: '${normalizedPath}'): ${errorMessage}`);
81
67
  logger.error({
82
68
  variable: trimmedPath,
@@ -8,14 +8,15 @@ import { PgTable } from "drizzle-orm/pg-core";
8
8
  declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
9
9
  scopes: AgentScopeConfig;
10
10
  }) => Promise<{
11
- tenantId: string;
12
- projectId: string;
13
11
  id: string;
14
- name: string;
15
- description: string | null;
16
- prompt: string | null;
17
12
  createdAt: string;
13
+ name: string;
18
14
  updatedAt: string;
15
+ projectId: string;
16
+ tenantId: string;
17
+ description: string | null;
18
+ defaultSubAgentId: string | null;
19
+ contextConfigId: string | null;
19
20
  models: {
20
21
  base?: {
21
22
  model?: string | undefined;
@@ -30,11 +31,7 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
30
31
  providerOptions?: Record<string, any> | undefined;
31
32
  } | undefined;
32
33
  } | null;
33
- stopWhen: {
34
- transferCountIs?: number | undefined;
35
- } | null;
36
- defaultSubAgentId: string | null;
37
- contextConfigId: string | null;
34
+ prompt: string | null;
38
35
  statusUpdates: {
39
36
  enabled?: boolean | undefined;
40
37
  numEvents?: number | undefined;
@@ -50,18 +47,22 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
50
47
  } | undefined;
51
48
  }[] | undefined;
52
49
  } | null;
50
+ stopWhen: {
51
+ transferCountIs?: number | undefined;
52
+ } | null;
53
53
  } | null>;
54
54
  declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (params: {
55
55
  scopes: AgentScopeConfig;
56
56
  }) => Promise<{
57
- tenantId: string;
58
- projectId: string;
59
57
  id: string;
60
- name: string;
61
- description: string | null;
62
- prompt: string | null;
63
58
  createdAt: string;
59
+ name: string;
64
60
  updatedAt: string;
61
+ projectId: string;
62
+ tenantId: string;
63
+ description: string | null;
64
+ defaultSubAgentId: string | null;
65
+ contextConfigId: string | null;
65
66
  models: {
66
67
  base?: {
67
68
  model?: string | undefined;
@@ -76,11 +77,7 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
76
77
  providerOptions?: Record<string, any> | undefined;
77
78
  } | undefined;
78
79
  } | null;
79
- stopWhen: {
80
- transferCountIs?: number | undefined;
81
- } | null;
82
- defaultSubAgentId: string | null;
83
- contextConfigId: string | null;
80
+ prompt: string | null;
84
81
  statusUpdates: {
85
82
  enabled?: boolean | undefined;
86
83
  numEvents?: number | undefined;
@@ -96,16 +93,18 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
96
93
  } | undefined;
97
94
  }[] | undefined;
98
95
  } | null;
96
+ stopWhen: {
97
+ transferCountIs?: number | undefined;
98
+ } | null;
99
99
  defaultSubAgent: {
100
- tenantId: string;
101
- projectId: string;
102
100
  id: string;
103
- name: string;
104
- description: string | null;
105
- prompt: string | null;
106
- agentId: string;
107
101
  createdAt: string;
102
+ name: string;
108
103
  updatedAt: string;
104
+ agentId: string;
105
+ projectId: string;
106
+ tenantId: string;
107
+ description: string | null;
109
108
  models: {
110
109
  base?: {
111
110
  model?: string | undefined;
@@ -120,6 +119,7 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
120
119
  providerOptions?: Record<string, any> | undefined;
121
120
  } | undefined;
122
121
  } | null;
122
+ prompt: string | null;
123
123
  stopWhen: {
124
124
  stepCountIs?: number | undefined;
125
125
  } | null;
@@ -129,14 +129,15 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
129
129
  declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
130
130
  scopes: ProjectScopeConfig;
131
131
  }) => Promise<{
132
- tenantId: string;
133
- projectId: string;
134
132
  id: string;
135
- name: string;
136
- description: string | null;
137
- prompt: string | null;
138
133
  createdAt: string;
134
+ name: string;
139
135
  updatedAt: string;
136
+ projectId: string;
137
+ tenantId: string;
138
+ description: string | null;
139
+ defaultSubAgentId: string | null;
140
+ contextConfigId: string | null;
140
141
  models: {
141
142
  base?: {
142
143
  model?: string | undefined;
@@ -151,11 +152,7 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
151
152
  providerOptions?: Record<string, any> | undefined;
152
153
  } | undefined;
153
154
  } | null;
154
- stopWhen: {
155
- transferCountIs?: number | undefined;
156
- } | null;
157
- defaultSubAgentId: string | null;
158
- contextConfigId: string | null;
155
+ prompt: string | null;
159
156
  statusUpdates: {
160
157
  enabled?: boolean | undefined;
161
158
  numEvents?: number | undefined;
@@ -171,6 +168,9 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
171
168
  } | undefined;
172
169
  }[] | undefined;
173
170
  } | null;
171
+ stopWhen: {
172
+ transferCountIs?: number | undefined;
173
+ } | null;
174
174
  }[]>;
175
175
  declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
176
176
  scopes: ProjectScopeConfig;
@@ -228,14 +228,15 @@ declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params:
228
228
  };
229
229
  }>;
230
230
  declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
231
- tenantId: string;
232
- projectId: string;
233
231
  id: string;
234
- name: string;
235
- description: string | null;
236
- prompt: string | null;
237
232
  createdAt: string;
233
+ name: string;
238
234
  updatedAt: string;
235
+ projectId: string;
236
+ tenantId: string;
237
+ description: string | null;
238
+ defaultSubAgentId: string | null;
239
+ contextConfigId: string | null;
239
240
  models: {
240
241
  base?: {
241
242
  model?: string | undefined;
@@ -250,11 +251,7 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
250
251
  providerOptions?: Record<string, any> | undefined;
251
252
  } | undefined;
252
253
  } | null;
253
- stopWhen: {
254
- transferCountIs?: number | undefined;
255
- } | null;
256
- defaultSubAgentId: string | null;
257
- contextConfigId: string | null;
254
+ prompt: string | null;
258
255
  statusUpdates: {
259
256
  enabled?: boolean | undefined;
260
257
  numEvents?: number | undefined;
@@ -270,6 +267,9 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
270
267
  } | undefined;
271
268
  }[] | undefined;
272
269
  } | null;
270
+ stopWhen: {
271
+ transferCountIs?: number | undefined;
272
+ } | null;
273
273
  }>;
274
274
  declare const updateAgent: (db: AgentsManageDatabaseClient) => (params: {
275
275
  scopes: AgentScopeConfig;