@inkeep/agents-core 0.67.4 → 0.68.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 (36) hide show
  1. package/dist/auth/auth-schema.d.ts +1369 -1
  2. package/dist/auth/auth-schema.js +139 -6
  3. package/dist/auth/auth-validation-schemas.d.ts +137 -137
  4. package/dist/auth/auth.d.ts +2231 -0
  5. package/dist/auth/auth.js +23 -1
  6. package/dist/auth/permissions.d.ts +13 -13
  7. package/dist/data-access/manage/agents.d.ts +41 -41
  8. package/dist/data-access/manage/artifactComponents.d.ts +10 -10
  9. package/dist/data-access/manage/contextConfigs.d.ts +12 -12
  10. package/dist/data-access/manage/dataComponents.d.ts +4 -4
  11. package/dist/data-access/manage/functionTools.d.ts +16 -16
  12. package/dist/data-access/manage/skills.d.ts +11 -11
  13. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
  14. package/dist/data-access/manage/subAgentRelations.d.ts +30 -30
  15. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +24 -24
  16. package/dist/data-access/manage/subAgents.d.ts +15 -15
  17. package/dist/data-access/manage/tools.d.ts +30 -30
  18. package/dist/data-access/manage/triggers.d.ts +4 -4
  19. package/dist/data-access/runtime/apiKeys.d.ts +12 -12
  20. package/dist/data-access/runtime/apps.d.ts +11 -11
  21. package/dist/data-access/runtime/conversations.d.ts +16 -16
  22. package/dist/data-access/runtime/feedback.d.ts +6 -6
  23. package/dist/data-access/runtime/messages.d.ts +6 -6
  24. package/dist/data-access/runtime/scheduledTriggerUsers.d.ts +1 -1
  25. package/dist/data-access/runtime/tasks.d.ts +4 -4
  26. package/dist/db/manage/manage-schema.d.ts +457 -457
  27. package/dist/db/runtime/runtime-schema.d.ts +418 -418
  28. package/dist/db/runtime/runtime-schema.js +7 -2
  29. package/dist/index.d.ts +2 -2
  30. package/dist/index.js +2 -2
  31. package/dist/validation/schemas/skills.d.ts +38 -38
  32. package/dist/validation/schemas.d.ts +1907 -1907
  33. package/drizzle/runtime/0036_swift_hammerhead.sql +90 -0
  34. package/drizzle/runtime/meta/0036_snapshot.json +5915 -0
  35. package/drizzle/runtime/meta/_journal.json +8 -1
  36. package/package.json +2 -1
@@ -1,5 +1,5 @@
1
1
  import { relations } from "drizzle-orm";
2
- import { boolean, index, integer, pgTable, text, timestamp, uniqueIndex } from "drizzle-orm/pg-core";
2
+ import { boolean, index, integer, jsonb, pgTable, text, timestamp, uniqueIndex } from "drizzle-orm/pg-core";
3
3
 
4
4
  //#region src/auth/auth-schema.ts
5
5
  const user = pgTable("user", {
@@ -45,6 +45,79 @@ const verification = pgTable("verification", {
45
45
  createdAt: timestamp("created_at").defaultNow().notNull(),
46
46
  updatedAt: timestamp("updated_at").defaultNow().$onUpdate(() => /* @__PURE__ */ new Date()).notNull()
47
47
  }, (table) => [index("verification_identifier_idx").on(table.identifier)]);
48
+ const jwks = pgTable("jwks", {
49
+ id: text("id").primaryKey(),
50
+ publicKey: text("public_key").notNull(),
51
+ privateKey: text("private_key").notNull(),
52
+ createdAt: timestamp("created_at").notNull(),
53
+ expiresAt: timestamp("expires_at")
54
+ });
55
+ const oauthClient = pgTable("oauth_client", {
56
+ id: text("id").primaryKey(),
57
+ clientId: text("client_id").notNull().unique(),
58
+ clientSecret: text("client_secret"),
59
+ disabled: boolean("disabled").default(false),
60
+ skipConsent: boolean("skip_consent"),
61
+ enableEndSession: boolean("enable_end_session"),
62
+ subjectType: text("subject_type"),
63
+ scopes: text("scopes").array(),
64
+ userId: text("user_id").references(() => user.id, { onDelete: "cascade" }),
65
+ createdAt: timestamp("created_at"),
66
+ updatedAt: timestamp("updated_at"),
67
+ name: text("name"),
68
+ uri: text("uri"),
69
+ icon: text("icon"),
70
+ contacts: text("contacts").array(),
71
+ tos: text("tos"),
72
+ policy: text("policy"),
73
+ softwareId: text("software_id"),
74
+ softwareVersion: text("software_version"),
75
+ softwareStatement: text("software_statement"),
76
+ redirectUris: text("redirect_uris").array().notNull(),
77
+ postLogoutRedirectUris: text("post_logout_redirect_uris").array(),
78
+ tokenEndpointAuthMethod: text("token_endpoint_auth_method"),
79
+ grantTypes: text("grant_types").array(),
80
+ responseTypes: text("response_types").array(),
81
+ public: boolean("public"),
82
+ type: text("type"),
83
+ requirePKCE: boolean("require_pkce"),
84
+ referenceId: text("reference_id"),
85
+ metadata: jsonb("metadata")
86
+ });
87
+ const oauthRefreshToken = pgTable("oauth_refresh_token", {
88
+ id: text("id").primaryKey(),
89
+ token: text("token").notNull(),
90
+ clientId: text("client_id").notNull().references(() => oauthClient.clientId, { onDelete: "cascade" }),
91
+ sessionId: text("session_id").references(() => session.id, { onDelete: "set null" }),
92
+ userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
93
+ referenceId: text("reference_id"),
94
+ expiresAt: timestamp("expires_at"),
95
+ createdAt: timestamp("created_at"),
96
+ revoked: timestamp("revoked"),
97
+ authTime: timestamp("auth_time"),
98
+ scopes: text("scopes").array().notNull()
99
+ });
100
+ const oauthAccessToken = pgTable("oauth_access_token", {
101
+ id: text("id").primaryKey(),
102
+ token: text("token").unique(),
103
+ clientId: text("client_id").notNull().references(() => oauthClient.clientId, { onDelete: "cascade" }),
104
+ sessionId: text("session_id").references(() => session.id, { onDelete: "set null" }),
105
+ userId: text("user_id").references(() => user.id, { onDelete: "cascade" }),
106
+ referenceId: text("reference_id"),
107
+ refreshId: text("refresh_id").references(() => oauthRefreshToken.id, { onDelete: "cascade" }),
108
+ expiresAt: timestamp("expires_at"),
109
+ createdAt: timestamp("created_at"),
110
+ scopes: text("scopes").array().notNull()
111
+ });
112
+ const oauthConsent = pgTable("oauth_consent", {
113
+ id: text("id").primaryKey(),
114
+ clientId: text("client_id").notNull().references(() => oauthClient.clientId, { onDelete: "cascade" }),
115
+ userId: text("user_id").references(() => user.id, { onDelete: "cascade" }),
116
+ referenceId: text("reference_id"),
117
+ scopes: text("scopes").array().notNull(),
118
+ createdAt: timestamp("created_at"),
119
+ updatedAt: timestamp("updated_at")
120
+ });
48
121
  const ssoProvider = pgTable("sso_provider", {
49
122
  id: text("id").primaryKey(),
50
123
  issuer: text("issuer").notNull(),
@@ -99,18 +172,78 @@ const deviceCode = pgTable("device_code", {
99
172
  const userRelations = relations(user, ({ many }) => ({
100
173
  sessions: many(session),
101
174
  accounts: many(account),
175
+ oauthClients: many(oauthClient),
176
+ oauthRefreshTokens: many(oauthRefreshToken),
177
+ oauthAccessTokens: many(oauthAccessToken),
178
+ oauthConsents: many(oauthConsent),
102
179
  ssoProviders: many(ssoProvider),
103
180
  members: many(member),
104
181
  invitations: many(invitation)
105
182
  }));
106
- const sessionRelations = relations(session, ({ one }) => ({ user: one(user, {
107
- fields: [session.userId],
108
- references: [user.id]
109
- }) }));
183
+ const sessionRelations = relations(session, ({ one, many }) => ({
184
+ user: one(user, {
185
+ fields: [session.userId],
186
+ references: [user.id]
187
+ }),
188
+ oauthRefreshTokens: many(oauthRefreshToken),
189
+ oauthAccessTokens: many(oauthAccessToken)
190
+ }));
110
191
  const accountRelations = relations(account, ({ one }) => ({ user: one(user, {
111
192
  fields: [account.userId],
112
193
  references: [user.id]
113
194
  }) }));
195
+ const oauthClientRelations = relations(oauthClient, ({ one, many }) => ({
196
+ user: one(user, {
197
+ fields: [oauthClient.userId],
198
+ references: [user.id]
199
+ }),
200
+ oauthRefreshTokens: many(oauthRefreshToken),
201
+ oauthAccessTokens: many(oauthAccessToken),
202
+ oauthConsents: many(oauthConsent)
203
+ }));
204
+ const oauthRefreshTokenRelations = relations(oauthRefreshToken, ({ one, many }) => ({
205
+ oauthClient: one(oauthClient, {
206
+ fields: [oauthRefreshToken.clientId],
207
+ references: [oauthClient.clientId]
208
+ }),
209
+ session: one(session, {
210
+ fields: [oauthRefreshToken.sessionId],
211
+ references: [session.id]
212
+ }),
213
+ user: one(user, {
214
+ fields: [oauthRefreshToken.userId],
215
+ references: [user.id]
216
+ }),
217
+ oauthAccessTokens: many(oauthAccessToken)
218
+ }));
219
+ const oauthAccessTokenRelations = relations(oauthAccessToken, ({ one }) => ({
220
+ oauthClient: one(oauthClient, {
221
+ fields: [oauthAccessToken.clientId],
222
+ references: [oauthClient.clientId]
223
+ }),
224
+ session: one(session, {
225
+ fields: [oauthAccessToken.sessionId],
226
+ references: [session.id]
227
+ }),
228
+ user: one(user, {
229
+ fields: [oauthAccessToken.userId],
230
+ references: [user.id]
231
+ }),
232
+ oauthRefreshToken: one(oauthRefreshToken, {
233
+ fields: [oauthAccessToken.refreshId],
234
+ references: [oauthRefreshToken.id]
235
+ })
236
+ }));
237
+ const oauthConsentRelations = relations(oauthConsent, ({ one }) => ({
238
+ oauthClient: one(oauthClient, {
239
+ fields: [oauthConsent.clientId],
240
+ references: [oauthClient.clientId]
241
+ }),
242
+ user: one(user, {
243
+ fields: [oauthConsent.userId],
244
+ references: [user.id]
245
+ })
246
+ }));
114
247
  const ssoProviderRelations = relations(ssoProvider, ({ one }) => ({ user: one(user, {
115
248
  fields: [ssoProvider.userId],
116
249
  references: [user.id]
@@ -141,4 +274,4 @@ const invitationRelations = relations(invitation, ({ one }) => ({
141
274
  }));
142
275
 
143
276
  //#endregion
144
- export { account, accountRelations, deviceCode, invitation, invitationRelations, member, memberRelations, organization, organizationRelations, session, sessionRelations, ssoProvider, ssoProviderRelations, user, userRelations, verification };
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 };