@inkeep/agents-core 0.80.7 → 0.81.1

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 (48) hide show
  1. package/dist/auth/auth-config-utils.js +1 -2
  2. package/dist/auth/auth-schema.d.ts +1110 -91
  3. package/dist/auth/auth-schema.js +73 -9
  4. package/dist/auth/auth-validation-schemas.d.ts +137 -137
  5. package/dist/auth/auth.d.ts +862 -251
  6. package/dist/auth/auth.js +13 -3
  7. package/dist/auth/permissions.d.ts +7 -7
  8. package/dist/auth/sso-issuer-discovery.d.ts +2 -1
  9. package/dist/context/TemplateEngine.js +2 -1
  10. package/dist/credential-stores/defaults.js +2 -1
  11. package/dist/credential-stores/memory-store.js +6 -0
  12. package/dist/data-access/manage/agents.d.ts +5 -5
  13. package/dist/data-access/manage/functionTools.d.ts +2 -2
  14. package/dist/data-access/manage/skills.d.ts +1 -1
  15. package/dist/data-access/manage/subAgentRelations.d.ts +2 -2
  16. package/dist/data-access/manage/subAgents.d.ts +3 -3
  17. package/dist/data-access/manage/tools.d.ts +6 -6
  18. package/dist/data-access/manage/triggers.d.ts +1 -1
  19. package/dist/data-access/runtime/apps.d.ts +5 -5
  20. package/dist/data-access/runtime/conversations.d.ts +8 -8
  21. package/dist/data-access/runtime/events.d.ts +1 -1
  22. package/dist/data-access/runtime/feedback.d.ts +2 -2
  23. package/dist/data-access/runtime/messages.d.ts +15 -15
  24. package/dist/db/manage/manage-schema.d.ts +504 -504
  25. package/dist/db/runtime/runtime-schema.d.ts +453 -453
  26. package/dist/db/runtime/runtime-schema.js +5 -2
  27. package/dist/env.d.ts +5 -0
  28. package/dist/env.js +1 -0
  29. package/dist/index.d.ts +3 -3
  30. package/dist/index.js +3 -3
  31. package/dist/utils/env-detection.d.ts +3 -1
  32. package/dist/utils/env-detection.js +7 -1
  33. package/dist/utils/index.d.ts +2 -2
  34. package/dist/utils/index.js +2 -2
  35. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  36. package/dist/validation/event-schemas.d.ts +2 -2
  37. package/dist/validation/event-schemas.js +1 -1
  38. package/dist/validation/schemas/shared.d.ts +2 -2
  39. package/dist/validation/schemas/shared.js +26 -37
  40. package/dist/validation/schemas/skills.d.ts +29 -29
  41. package/dist/validation/schemas.d.ts +1787 -1787
  42. package/dist/validation/schemas.js +2 -2
  43. package/dist/validation/stream-event-schemas.d.ts +10 -10
  44. package/dist/validation/stream-event-schemas.js +5 -5
  45. package/drizzle/runtime/0045_complex_phantom_reporter.sql +95 -0
  46. package/drizzle/runtime/meta/0045_snapshot.json +6800 -0
  47. package/drizzle/runtime/meta/_journal.json +7 -0
  48. package/package.json +9 -8
@@ -50,7 +50,9 @@ const jwks = pgTable("jwks", {
50
50
  publicKey: text("public_key").notNull(),
51
51
  privateKey: text("private_key").notNull(),
52
52
  createdAt: timestamp("created_at").notNull(),
53
- expiresAt: timestamp("expires_at")
53
+ expiresAt: timestamp("expires_at"),
54
+ alg: text("alg"),
55
+ crv: text("crv")
54
56
  });
55
57
  const oauthClient = pgTable("oauth_client", {
56
58
  id: text("id").primaryKey(),
@@ -82,11 +84,47 @@ const oauthClient = pgTable("oauth_client", {
82
84
  type: text("type"),
83
85
  requirePKCE: boolean("require_pkce"),
84
86
  referenceId: text("reference_id"),
87
+ metadata: jsonb("metadata"),
88
+ clientDiscoveryId: text("client_discovery_id"),
89
+ clientCredentialsScopes: text("client_credentials_scopes").array(),
90
+ backchannelLogoutUri: text("backchannel_logout_uri"),
91
+ backchannelLogoutSessionRequired: boolean("backchannel_logout_session_required"),
92
+ applicationType: text("application_type"),
93
+ jwks: text("jwks"),
94
+ jwksUri: text("jwks_uri"),
95
+ dpopBoundAccessTokens: boolean("dpop_bound_access_tokens").default(false)
96
+ });
97
+ const oauthResource = pgTable("oauth_resource", {
98
+ id: text("id").primaryKey(),
99
+ identifier: text("identifier").notNull().unique(),
100
+ name: text("name").notNull(),
101
+ accessTokenTtl: integer("access_token_ttl"),
102
+ refreshTokenTtl: integer("refresh_token_ttl"),
103
+ signingAlgorithm: text("signing_algorithm"),
104
+ signingKeyId: text("signing_key_id"),
105
+ allowedScopes: text("allowed_scopes").array(),
106
+ customClaims: jsonb("custom_claims"),
107
+ dpopBoundAccessTokensRequired: boolean("dpop_bound_access_tokens_required").default(false),
108
+ disabled: boolean("disabled").default(false),
109
+ createdAt: timestamp("created_at"),
110
+ updatedAt: timestamp("updated_at"),
111
+ policyVersion: integer("policy_version").default(1),
85
112
  metadata: jsonb("metadata")
86
113
  });
114
+ const oauthClientResource = pgTable("oauth_client_resource", {
115
+ id: text("id").primaryKey(),
116
+ clientId: text("client_id").notNull().references(() => oauthClient.clientId, { onDelete: "cascade" }),
117
+ resourceId: text("resource_id").notNull().references(() => oauthResource.identifier, { onDelete: "cascade" }),
118
+ metadata: jsonb("metadata"),
119
+ createdAt: timestamp("created_at")
120
+ }, (table) => [uniqueIndex("oauth_client_resource_client_resource_uidx").on(table.clientId, table.resourceId), index("oauth_client_resource_resourceId_idx").on(table.resourceId)]);
121
+ const oauthClientAssertion = pgTable("oauth_client_assertion", {
122
+ id: text("id").primaryKey(),
123
+ expiresAt: timestamp("expires_at").notNull()
124
+ });
87
125
  const oauthRefreshToken = pgTable("oauth_refresh_token", {
88
126
  id: text("id").primaryKey(),
89
- token: text("token").notNull(),
127
+ token: text("token").notNull().unique(),
90
128
  clientId: text("client_id").notNull().references(() => oauthClient.clientId, { onDelete: "cascade" }),
91
129
  sessionId: text("session_id").references(() => session.id, { onDelete: "set null" }),
92
130
  userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
@@ -95,7 +133,14 @@ const oauthRefreshToken = pgTable("oauth_refresh_token", {
95
133
  createdAt: timestamp("created_at").notNull(),
96
134
  revoked: timestamp("revoked"),
97
135
  authTime: timestamp("auth_time"),
98
- scopes: text("scopes").array().notNull()
136
+ scopes: text("scopes").array().notNull(),
137
+ authorizationCodeId: text("authorization_code_id"),
138
+ resources: text("resources").array(),
139
+ requestedUserInfoClaims: text("requested_user_info_claims").array(),
140
+ rotatedAt: timestamp("rotated_at"),
141
+ rotationReplayResponse: text("rotation_replay_response"),
142
+ rotationReplayExpiresAt: timestamp("rotation_replay_expires_at"),
143
+ confirmation: jsonb("confirmation")
99
144
  });
100
145
  const oauthAccessToken = pgTable("oauth_access_token", {
101
146
  id: text("id").primaryKey(),
@@ -107,7 +152,12 @@ const oauthAccessToken = pgTable("oauth_access_token", {
107
152
  refreshId: text("refresh_id").references(() => oauthRefreshToken.id, { onDelete: "cascade" }),
108
153
  expiresAt: timestamp("expires_at").notNull(),
109
154
  createdAt: timestamp("created_at").notNull(),
110
- scopes: text("scopes").array().notNull()
155
+ scopes: text("scopes").array().notNull(),
156
+ authorizationCodeId: text("authorization_code_id"),
157
+ resources: text("resources").array(),
158
+ requestedUserInfoClaims: text("requested_user_info_claims").array(),
159
+ revoked: timestamp("revoked"),
160
+ confirmation: jsonb("confirmation")
111
161
  });
112
162
  const oauthConsent = pgTable("oauth_consent", {
113
163
  id: text("id").primaryKey(),
@@ -116,7 +166,9 @@ const oauthConsent = pgTable("oauth_consent", {
116
166
  referenceId: text("reference_id"),
117
167
  scopes: text("scopes").array().notNull(),
118
168
  createdAt: timestamp("created_at").notNull(),
119
- updatedAt: timestamp("updated_at").notNull()
169
+ updatedAt: timestamp("updated_at").notNull(),
170
+ resources: text("resources").array(),
171
+ requestedUserInfoClaims: text("requested_user_info_claims").array()
120
172
  });
121
173
  const ssoProvider = pgTable("sso_provider", {
122
174
  id: text("id").primaryKey(),
@@ -159,8 +211,8 @@ const invitation = pgTable("invitation", {
159
211
  }, (table) => [index("invitation_organizationId_idx").on(table.organizationId), index("invitation_email_idx").on(table.email)]);
160
212
  const deviceCode = pgTable("device_code", {
161
213
  id: text("id").primaryKey(),
162
- deviceCode: text("device_code").notNull(),
163
- userCode: text("user_code").notNull(),
214
+ deviceCode: text("device_code").notNull().unique(),
215
+ userCode: text("user_code").notNull().unique(),
164
216
  userId: text("user_id"),
165
217
  expiresAt: timestamp("expires_at").notNull(),
166
218
  status: text("status").notNull(),
@@ -199,7 +251,19 @@ const oauthClientRelations = relations(oauthClient, ({ one, many }) => ({
199
251
  }),
200
252
  oauthRefreshTokens: many(oauthRefreshToken),
201
253
  oauthAccessTokens: many(oauthAccessToken),
202
- oauthConsents: many(oauthConsent)
254
+ oauthConsents: many(oauthConsent),
255
+ oauthClientResources: many(oauthClientResource)
256
+ }));
257
+ const oauthResourceRelations = relations(oauthResource, ({ many }) => ({ oauthClientResources: many(oauthClientResource) }));
258
+ const oauthClientResourceRelations = relations(oauthClientResource, ({ one }) => ({
259
+ oauthClient: one(oauthClient, {
260
+ fields: [oauthClientResource.clientId],
261
+ references: [oauthClient.clientId]
262
+ }),
263
+ oauthResource: one(oauthResource, {
264
+ fields: [oauthClientResource.resourceId],
265
+ references: [oauthResource.identifier]
266
+ })
203
267
  }));
204
268
  const oauthRefreshTokenRelations = relations(oauthRefreshToken, ({ one, many }) => ({
205
269
  oauthClient: one(oauthClient, {
@@ -274,4 +338,4 @@ const invitationRelations = relations(invitation, ({ one }) => ({
274
338
  }));
275
339
 
276
340
  //#endregion
277
- export { account, accountRelations, deviceCode, invitation, invitationRelations, jwks, member, memberRelations, oauthAccessToken, oauthAccessTokenRelations, oauthClient, oauthClientRelations, oauthConsent, oauthConsentRelations, oauthRefreshToken, oauthRefreshTokenRelations, organization, organizationRelations, session, sessionRelations, ssoProvider, ssoProviderRelations, user, userRelations, verification };
341
+ export { account, accountRelations, deviceCode, invitation, invitationRelations, jwks, member, memberRelations, oauthAccessToken, oauthAccessTokenRelations, oauthClient, oauthClientAssertion, oauthClientRelations, oauthClientResource, oauthClientResourceRelations, oauthConsent, oauthConsentRelations, oauthRefreshToken, oauthRefreshTokenRelations, oauthResource, oauthResourceRelations, organization, organizationRelations, session, sessionRelations, ssoProvider, ssoProviderRelations, user, userRelations, verification };