@inkeep/agents-core 0.59.3 → 0.59.4

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 (36) hide show
  1. package/dist/auth/auth-schema.d.ts +108 -108
  2. package/dist/auth/auth-validation-schemas.d.ts +137 -137
  3. package/dist/auth/auth.d.ts +6 -6
  4. package/dist/auth/auth.js +2 -2
  5. package/dist/auth/permissions.d.ts +13 -13
  6. package/dist/data-access/manage/credentialReferences.js +1 -1
  7. package/dist/data-access/manage/dataComponents.js +1 -1
  8. package/dist/data-access/manage/skills.d.ts +1 -1
  9. package/dist/data-access/runtime/messages.d.ts +9 -9
  10. package/dist/db/manage/manage-schema.d.ts +449 -449
  11. package/dist/db/runtime/runtime-schema.d.ts +328 -328
  12. package/dist/db/runtime/test-runtime-client.js +1 -1
  13. package/dist/dolt/advisory-lock.d.ts +7 -0
  14. package/dist/dolt/advisory-lock.js +18 -0
  15. package/dist/dolt/branches-api.d.ts +19 -9
  16. package/dist/dolt/branches-api.js +58 -29
  17. package/dist/dolt/index.d.ts +7 -4
  18. package/dist/dolt/index.js +7 -4
  19. package/dist/dolt/merge.d.ts +41 -5
  20. package/dist/dolt/merge.js +161 -24
  21. package/dist/dolt/pk-map.d.ts +6 -0
  22. package/dist/dolt/pk-map.js +27 -0
  23. package/dist/dolt/ref-middleware.d.ts +2 -1
  24. package/dist/dolt/ref-middleware.js +18 -4
  25. package/dist/dolt/resolve-conflicts.d.ts +10 -0
  26. package/dist/dolt/resolve-conflicts.js +100 -0
  27. package/dist/dolt/schema-sync.js +17 -17
  28. package/dist/index.d.ts +8 -5
  29. package/dist/index.js +9 -6
  30. package/dist/utils/index.js +1 -1
  31. package/dist/validation/dolt-schemas.d.ts +95 -2
  32. package/dist/validation/dolt-schemas.js +54 -2
  33. package/dist/validation/index.d.ts +2 -2
  34. package/dist/validation/index.js +2 -2
  35. package/dist/validation/schemas.d.ts +1261 -1261
  36. package/package.json +2 -2
@@ -2,7 +2,7 @@ import { BetterAuthConfig, EmailServiceConfig, OIDCProviderConfig, SAMLProviderC
2
2
  import { extractCookieDomain, hasCredentialAccount } from "./auth-config-utils.js";
3
3
  import * as zod0 from "zod";
4
4
  import * as better_auth0 from "better-auth";
5
- import * as better_auth_plugins0 from "better-auth/plugins";
5
+ import * as better_auth_plugins20 from "better-auth/plugins";
6
6
 
7
7
  //#region src/auth/auth.d.ts
8
8
 
@@ -38,10 +38,10 @@ declare function _inferAuthType(): better_auth0.Auth<{
38
38
  handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>;
39
39
  }[];
40
40
  };
41
- options: better_auth_plugins0.BearerOptions | undefined;
41
+ options: better_auth_plugins20.BearerOptions | undefined;
42
42
  }, {
43
43
  id: "oauth-proxy";
44
- options: NoInfer<better_auth_plugins0.OAuthProxyOptions>;
44
+ options: NoInfer<better_auth_plugins20.OAuthProxyOptions>;
45
45
  endpoints: {
46
46
  oAuthProxy: better_auth0.StrictEndpoint<"/oauth-proxy-callback", {
47
47
  method: "GET";
@@ -93,7 +93,7 @@ declare function _inferAuthType(): better_auth0.Auth<{
93
93
  handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>;
94
94
  }[];
95
95
  };
96
- }, better_auth_plugins0.DefaultOrganizationPlugin<{
96
+ }, better_auth_plugins20.DefaultOrganizationPlugin<{
97
97
  schema: {
98
98
  invitation: {
99
99
  additionalFields: {
@@ -456,8 +456,8 @@ declare function _inferAuthType(): better_auth0.Auth<{
456
456
  AUTHENTICATION_REQUIRED: better_auth0.RawError<"AUTHENTICATION_REQUIRED">;
457
457
  };
458
458
  options: Partial<{
459
- expiresIn: better_auth_plugins0.TimeString;
460
- interval: better_auth_plugins0.TimeString;
459
+ expiresIn: better_auth_plugins20.TimeString;
460
+ interval: better_auth_plugins20.TimeString;
461
461
  deviceCodeLength: number;
462
462
  userCodeLength: number;
463
463
  schema: {
package/dist/auth/auth.js CHANGED
@@ -99,7 +99,7 @@ function createAuth(config) {
99
99
  plugins: [
100
100
  bearer(),
101
101
  dash(),
102
- lastLoginMethod({ customResolveMethod: (ctx) => {
102
+ lastLoginMethod({ customResolveMethod(ctx) {
103
103
  const path = ctx.path;
104
104
  if (path === "/sign-in/email" || path === "/sign-up/email") return "email";
105
105
  if (path.startsWith("/callback/") || path.startsWith("/oauth2/callback/")) return ctx.params?.id || ctx.params?.providerId || path.split("/").pop() || null;
@@ -109,7 +109,7 @@ function createAuth(config) {
109
109
  } }),
110
110
  sso({
111
111
  organizationProvisioning: { disabled: true },
112
- provisionUser: async ({ user, provider }) => {
112
+ async provisionUser({ user, provider }) {
113
113
  if (!provider.organizationId) return;
114
114
  if (!await shouldAutoProvision(config.dbClient, user, provider)) return;
115
115
  await instance.api.addMember({ body: {
@@ -1,29 +1,29 @@
1
- import * as better_auth_plugins4 from "better-auth/plugins";
1
+ import * as better_auth_plugins0 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_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key] | {
9
- actions: better_auth_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key];
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];
10
10
  connector: "OR" | "AND";
11
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins4.AuthorizeResponse;
12
- statements: better_auth_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>;
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>;
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_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key] | {
16
- actions: better_auth_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key];
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];
17
17
  connector: "OR" | "AND";
18
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins4.AuthorizeResponse;
19
- statements: better_auth_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>;
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>;
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_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key] | {
23
- actions: better_auth_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key];
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];
24
24
  connector: "OR" | "AND";
25
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins4.AuthorizeResponse;
26
- statements: better_auth_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>;
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>;
27
27
  };
28
28
  //#endregion
29
29
  export { ac, adminRole, memberRole, organizationClient, ownerRole };
@@ -1,6 +1,6 @@
1
1
  import { credentialReferences, externalAgents, tools } from "../../db/manage/manage-schema.js";
2
- import { projectScopedWhere } from "./scope-helpers.js";
3
2
  import { isUniqueConstraintError } from "../../utils/error.js";
3
+ import { projectScopedWhere } from "./scope-helpers.js";
4
4
  import { and, count, desc, eq, sql } from "drizzle-orm";
5
5
 
6
6
  //#region src/data-access/manage/credentialReferences.ts
@@ -2,8 +2,8 @@ import { dataComponents, subAgentDataComponents } from "../../db/manage/manage-s
2
2
  import { validatePropsAsJsonSchema } from "../../validation/props-validation.js";
3
3
  import { validateRender } from "../../validation/render-validation.js";
4
4
  import { generateId } from "../../utils/conversations.js";
5
- import { projectScopedWhere, subAgentScopedWhere } from "./scope-helpers.js";
6
5
  import { createApiError } from "../../utils/error.js";
6
+ import { projectScopedWhere, subAgentScopedWhere } from "./scope-helpers.js";
7
7
  import "../../utils/index.js";
8
8
  import { and, count, desc, eq } from "drizzle-orm";
9
9
 
@@ -99,8 +99,8 @@ declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params:
99
99
  updatedAt: string;
100
100
  index: number;
101
101
  alwaysLoaded: boolean;
102
- subAgentId: string;
103
102
  skillId: string;
103
+ subAgentId: string;
104
104
  }>;
105
105
  declare const deleteSubAgentSkill: (db: AgentsManageDatabaseClient) => (params: {
106
106
  scopes: AgentScopeConfig;
@@ -18,18 +18,18 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
18
18
  metadata: MessageMetadata | null;
19
19
  content: MessageContent;
20
20
  role: string;
21
+ conversationId: string;
21
22
  fromSubAgentId: string | null;
22
23
  toSubAgentId: string | null;
23
24
  fromExternalAgentId: string | null;
24
25
  toExternalAgentId: string | null;
25
- taskId: string | null;
26
- a2aTaskId: string | null;
27
- conversationId: string;
28
26
  fromTeamAgentId: string | null;
29
27
  toTeamAgentId: string | null;
30
28
  visibility: string;
31
29
  messageType: string;
30
+ taskId: string | null;
32
31
  parentMessageId: string | null;
32
+ a2aTaskId: string | null;
33
33
  a2aSessionId: string | null;
34
34
  } | undefined>;
35
35
  declare const listMessages: (db: AgentsRunDatabaseClient) => (params: {
@@ -152,18 +152,18 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
152
152
  metadata: MessageMetadata | null;
153
153
  content: MessageContent;
154
154
  role: string;
155
+ conversationId: string;
155
156
  fromSubAgentId: string | null;
156
157
  toSubAgentId: string | null;
157
158
  fromExternalAgentId: string | null;
158
159
  toExternalAgentId: string | null;
159
- taskId: string | null;
160
- a2aTaskId: string | null;
161
- conversationId: string;
162
160
  fromTeamAgentId: string | null;
163
161
  toTeamAgentId: string | null;
164
162
  visibility: string;
165
163
  messageType: string;
164
+ taskId: string | null;
166
165
  parentMessageId: string | null;
166
+ a2aTaskId: string | null;
167
167
  a2aSessionId: string | null;
168
168
  }>;
169
169
  declare const updateMessage: (db: AgentsRunDatabaseClient) => (params: {
@@ -205,18 +205,18 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
205
205
  metadata: MessageMetadata | null;
206
206
  content: MessageContent;
207
207
  role: string;
208
+ conversationId: string;
208
209
  fromSubAgentId: string | null;
209
210
  toSubAgentId: string | null;
210
211
  fromExternalAgentId: string | null;
211
212
  toExternalAgentId: string | null;
212
- taskId: string | null;
213
- a2aTaskId: string | null;
214
- conversationId: string;
215
213
  fromTeamAgentId: string | null;
216
214
  toTeamAgentId: string | null;
217
215
  visibility: string;
218
216
  messageType: string;
217
+ taskId: string | null;
219
218
  parentMessageId: string | null;
219
+ a2aTaskId: string | null;
220
220
  a2aSessionId: string | null;
221
221
  }>;
222
222
  declare const countMessagesByConversation: (db: AgentsRunDatabaseClient) => (params: {