@inkeep/agents-core 0.0.0-dev-20260106155500 → 0.0.0-dev-20260106221934

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 (32) hide show
  1. package/dist/_virtual/rolldown_runtime.js +2 -2
  2. package/dist/auth/auth-validation-schemas.d.ts +17 -17
  3. package/dist/auth/auth.d.ts +67 -58
  4. package/dist/auth/permissions.d.ts +15 -14
  5. package/dist/auth/permissions.js +2 -1
  6. package/dist/client-exports.d.ts +13 -0
  7. package/dist/data-access/agents.d.ts +26 -26
  8. package/dist/data-access/apiKeys.d.ts +20 -20
  9. package/dist/data-access/artifactComponents.d.ts +34 -14
  10. package/dist/data-access/artifactComponents.js +22 -1
  11. package/dist/data-access/contextConfigs.d.ts +12 -12
  12. package/dist/data-access/conversations.d.ts +12 -12
  13. package/dist/data-access/dataComponents.d.ts +6 -6
  14. package/dist/data-access/functionTools.d.ts +10 -10
  15. package/dist/data-access/messages.d.ts +24 -24
  16. package/dist/data-access/subAgentExternalAgentRelations.d.ts +24 -24
  17. package/dist/data-access/subAgentRelations.d.ts +30 -30
  18. package/dist/data-access/subAgentTeamAgentRelations.d.ts +24 -24
  19. package/dist/data-access/subAgents.d.ts +18 -18
  20. package/dist/data-access/tasks.d.ts +4 -4
  21. package/dist/data-access/tools.d.ts +39 -39
  22. package/dist/db/schema.d.ts +25 -0
  23. package/dist/db/schema.js +3 -2
  24. package/dist/index.js +1 -1
  25. package/dist/utils/schema-conversion.d.ts +1 -1
  26. package/dist/utils/schema-conversion.js +1 -1
  27. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  28. package/dist/validation/schemas.d.ts +1189 -1009
  29. package/drizzle/0007_slim_karma.sql +1 -0
  30. package/drizzle/meta/0007_snapshot.json +3772 -0
  31. package/drizzle/meta/_journal.json +7 -0
  32. package/package.json +9 -9
@@ -12,19 +12,19 @@ declare const getToolById: (db: DatabaseClient) => (params: {
12
12
  scopes: ProjectScopeConfig;
13
13
  toolId: string;
14
14
  }) => Promise<{
15
- description: string | null;
16
- name: string;
17
- id: string;
18
- createdAt: string;
19
- updatedAt: string;
20
- headers: Record<string, string> | null;
21
15
  tenantId: string;
22
16
  projectId: string;
23
- credentialReferenceId: string | null;
17
+ id: string;
18
+ name: string;
19
+ description: string | null;
24
20
  config: {
25
21
  type: "mcp";
26
22
  mcp: ToolMcpConfig;
27
23
  };
24
+ credentialReferenceId: string | null;
25
+ createdAt: string;
26
+ updatedAt: string;
27
+ headers: Record<string, string> | null;
28
28
  credentialScope: string;
29
29
  imageUrl: string | null;
30
30
  capabilities: ToolServerCapabilities | null;
@@ -61,19 +61,19 @@ declare const listTools: (db: DatabaseClient) => (params: {
61
61
  };
62
62
  }>;
63
63
  declare const createTool: (db: DatabaseClient) => (params: ToolInsert) => Promise<{
64
- description: string | null;
65
- name: string;
66
- id: string;
67
- createdAt: string;
68
- updatedAt: string;
69
- headers: Record<string, string> | null;
70
64
  tenantId: string;
71
65
  projectId: string;
72
- credentialReferenceId: string | null;
66
+ id: string;
67
+ name: string;
68
+ description: string | null;
73
69
  config: {
74
70
  type: "mcp";
75
71
  mcp: ToolMcpConfig;
76
72
  };
73
+ credentialReferenceId: string | null;
74
+ createdAt: string;
75
+ updatedAt: string;
76
+ headers: Record<string, string> | null;
77
77
  credentialScope: string;
78
78
  imageUrl: string | null;
79
79
  capabilities: ToolServerCapabilities | null;
@@ -116,38 +116,38 @@ declare const addToolToAgent: (db: DatabaseClient) => (params: {
116
116
  needsApproval?: boolean;
117
117
  }> | null;
118
118
  }) => Promise<{
119
- subAgentId: string;
120
- id: string;
121
- createdAt: string;
122
- updatedAt: string;
123
- headers: Record<string, string> | null;
124
119
  tenantId: string;
125
120
  projectId: string;
121
+ id: string;
126
122
  agentId: string;
123
+ createdAt: string;
124
+ updatedAt: string;
127
125
  toolId: string;
128
- selectedTools: string[] | null;
126
+ headers: Record<string, string> | null;
129
127
  toolPolicies: Record<string, {
130
128
  needsApproval?: boolean;
131
129
  }> | null;
130
+ subAgentId: string;
131
+ selectedTools: string[] | null;
132
132
  }>;
133
133
  declare const removeToolFromAgent: (db: DatabaseClient) => (params: {
134
134
  scopes: AgentScopeConfig;
135
135
  subAgentId: string;
136
136
  toolId: string;
137
137
  }) => Promise<{
138
- subAgentId: string;
139
- id: string;
140
- createdAt: string;
141
- updatedAt: string;
142
- headers: Record<string, string> | null;
143
138
  tenantId: string;
144
139
  projectId: string;
140
+ id: string;
145
141
  agentId: string;
142
+ createdAt: string;
143
+ updatedAt: string;
146
144
  toolId: string;
147
- selectedTools: string[] | null;
145
+ headers: Record<string, string> | null;
148
146
  toolPolicies: Record<string, {
149
147
  needsApproval?: boolean;
150
148
  }> | null;
149
+ subAgentId: string;
150
+ selectedTools: string[] | null;
151
151
  }>;
152
152
  /**
153
153
  * Upsert agent-tool relation (create if it doesn't exist, update if it does)
@@ -163,19 +163,19 @@ declare const upsertSubAgentToolRelation: (db: DatabaseClient) => (params: {
163
163
  }> | null;
164
164
  relationId?: string;
165
165
  }) => Promise<{
166
- subAgentId: string;
167
- id: string;
168
- createdAt: string;
169
- updatedAt: string;
170
- headers: Record<string, string> | null;
171
166
  tenantId: string;
172
167
  projectId: string;
168
+ id: string;
173
169
  agentId: string;
170
+ createdAt: string;
171
+ updatedAt: string;
174
172
  toolId: string;
175
- selectedTools: string[] | null;
173
+ headers: Record<string, string> | null;
176
174
  toolPolicies: Record<string, {
177
175
  needsApproval?: boolean;
178
176
  }> | null;
177
+ subAgentId: string;
178
+ selectedTools: string[] | null;
179
179
  }>;
180
180
  /**
181
181
  * Upsert a tool (create if it doesn't exist, update if it does)
@@ -183,19 +183,19 @@ declare const upsertSubAgentToolRelation: (db: DatabaseClient) => (params: {
183
183
  declare const upsertTool: (db: DatabaseClient) => (params: {
184
184
  data: ToolInsert;
185
185
  }) => Promise<{
186
- description: string | null;
187
- name: string;
188
- id: string;
189
- createdAt: string;
190
- updatedAt: string;
191
- headers: Record<string, string> | null;
192
186
  tenantId: string;
193
187
  projectId: string;
194
- credentialReferenceId: string | null;
188
+ id: string;
189
+ name: string;
190
+ description: string | null;
195
191
  config: {
196
192
  type: "mcp";
197
193
  mcp: ToolMcpConfig;
198
194
  };
195
+ credentialReferenceId: string | null;
196
+ createdAt: string;
197
+ updatedAt: string;
198
+ headers: Record<string, string> | null;
199
199
  credentialScope: string;
200
200
  imageUrl: string | null;
201
201
  capabilities: ToolServerCapabilities | null;
@@ -2220,6 +2220,31 @@ declare const artifactComponents: drizzle_orm_pg_core208.PgTableWithColumns<{
2220
2220
  }, {}, {
2221
2221
  $type: Record<string, unknown>;
2222
2222
  }>;
2223
+ render: drizzle_orm_pg_core208.PgColumn<{
2224
+ name: "render";
2225
+ tableName: "artifact_components";
2226
+ dataType: "json";
2227
+ columnType: "PgJsonb";
2228
+ data: {
2229
+ component: string;
2230
+ mockData: Record<string, unknown>;
2231
+ };
2232
+ driverParam: unknown;
2233
+ notNull: false;
2234
+ hasDefault: false;
2235
+ isPrimaryKey: false;
2236
+ isAutoincrement: false;
2237
+ hasRuntimeDefault: false;
2238
+ enumValues: undefined;
2239
+ baseColumn: never;
2240
+ identity: undefined;
2241
+ generated: undefined;
2242
+ }, {}, {
2243
+ $type: {
2244
+ component: string;
2245
+ mockData: Record<string, unknown>;
2246
+ };
2247
+ }>;
2223
2248
  name: drizzle_orm_pg_core208.PgColumn<{
2224
2249
  name: "name";
2225
2250
  tableName: "artifact_components";
package/dist/db/schema.js CHANGED
@@ -1,10 +1,10 @@
1
- import { __export } from "../_virtual/rolldown_runtime.js";
1
+ import { __exportAll } from "../_virtual/rolldown_runtime.js";
2
2
  import { account, deviceCode, invitation, member, organization, session, ssoProvider, user, verification } from "../auth/auth-schema.js";
3
3
  import { relations } from "drizzle-orm";
4
4
  import { foreignKey, index, integer, jsonb, pgTable, primaryKey, text, timestamp, unique, varchar } from "drizzle-orm/pg-core";
5
5
 
6
6
  //#region src/db/schema.ts
7
- var schema_exports = /* @__PURE__ */ __export({
7
+ var schema_exports = /* @__PURE__ */ __exportAll({
8
8
  account: () => account,
9
9
  agentRelations: () => agentRelations,
10
10
  agentToolRelationsRelations: () => agentToolRelationsRelations,
@@ -344,6 +344,7 @@ const artifactComponents = pgTable("artifact_components", {
344
344
  ...projectScoped,
345
345
  ...uiProperties,
346
346
  props: jsonb("props").$type(),
347
+ render: jsonb("render").$type(),
347
348
  ...timestamps
348
349
  }, (table) => [primaryKey({ columns: [
349
350
  table.tenantId,
package/dist/index.js CHANGED
@@ -51,8 +51,8 @@ import "./utils/index.js";
51
51
  import { countCredentialReferences, createCredentialReference, deleteCredentialReference, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithResources, getUserScopedCredentialReference, hasCredentialReference, listCredentialReferences, listCredentialReferencesPaginated, updateCredentialReference, upsertCredentialReference } from "./data-access/credentialReferences.js";
52
52
  import { addToolToAgent, createTool, dbResultToMcpTool, deleteTool, getToolById, listTools, removeToolFromAgent, updateTool, upsertSubAgentToolRelation, upsertTool } from "./data-access/tools.js";
53
53
  import { createAgent, deleteAgent, fetchComponentRelationships, getAgentById, getAgentSubAgentInfos, getAgentWithDefaultSubAgent, getFullAgentDefinition, listAgents, listAgentsPaginated, updateAgent, upsertAgent } from "./data-access/agents.js";
54
- import { agentHasArtifactComponents, associateArtifactComponentWithAgent, countArtifactComponents, countArtifactComponentsForAgent, createArtifactComponent, deleteAgentArtifactComponentRelationByAgent, deleteArtifactComponent, getAgentsUsingArtifactComponent, getArtifactComponentById, getArtifactComponentsForAgent, isArtifactComponentAssociatedWithAgent, listArtifactComponents, listArtifactComponentsPaginated, removeArtifactComponentFromAgent, updateArtifactComponent, upsertAgentArtifactComponentRelation, upsertArtifactComponent } from "./data-access/artifactComponents.js";
55
54
  import { validateRender } from "./validation/render-validation.js";
55
+ import { agentHasArtifactComponents, associateArtifactComponentWithAgent, countArtifactComponents, countArtifactComponentsForAgent, createArtifactComponent, deleteAgentArtifactComponentRelationByAgent, deleteArtifactComponent, getAgentsUsingArtifactComponent, getArtifactComponentById, getArtifactComponentsForAgent, isArtifactComponentAssociatedWithAgent, listArtifactComponents, listArtifactComponentsPaginated, removeArtifactComponentFromAgent, updateArtifactComponent, upsertAgentArtifactComponentRelation, upsertArtifactComponent } from "./data-access/artifactComponents.js";
56
56
  import { associateDataComponentWithAgent, countDataComponents, createDataComponent, deleteAgentDataComponentRelationByAgent, deleteDataComponent, getAgentsUsingDataComponent, getDataComponent, getDataComponentsForAgent, isDataComponentAssociatedWithAgent, listDataComponents, listDataComponentsPaginated, removeDataComponentFromAgent, updateDataComponent, upsertAgentDataComponentRelation, upsertDataComponent } from "./data-access/dataComponents.js";
57
57
  import { createFullAgentServerSide, deleteFullAgent, getFullAgent, updateFullAgentServerSide } from "./data-access/agentFull.js";
58
58
  import { countApiKeys, createApiKey, deleteApiKey, generateAndCreateApiKey, getApiKeyById, getApiKeyByPublicId, hasApiKey, listApiKeys, listApiKeysPaginated, updateApiKey, updateApiKeyLastUsed, validateAndGetApiKey } from "./data-access/apiKeys.js";
@@ -6,7 +6,7 @@ import { z } from "@hono/zod-openapi";
6
6
  * Converts JSON Schema to Zod schema at runtime.
7
7
  *
8
8
  * This is useful for dynamically creating Zod schemas from JSON Schema definitions,
9
- * such as when using AI SDK's generateObject/streamObject with data component props.
9
+ * such as when using AI SDK's structured generateText/streamText with data component props.
10
10
  *
11
11
  * Note: Uses z.string() as fallback for unknown types to ensure Anthropic compatibility
12
12
  * (Anthropic requires explicit types - z.any()/z.unknown() produce invalid JSON Schema).
@@ -7,7 +7,7 @@ const logger = getLogger("schema-conversion");
7
7
  * Converts JSON Schema to Zod schema at runtime.
8
8
  *
9
9
  * This is useful for dynamically creating Zod schemas from JSON Schema definitions,
10
- * such as when using AI SDK's generateObject/streamObject with data component props.
10
+ * such as when using AI SDK's structured generateText/streamText with data component props.
11
11
  *
12
12
  * Note: Uses z.string() as fallback for unknown types to ensure Anthropic compatibility
13
13
  * (Anthropic requires explicit types - z.any()/z.unknown() produce invalid JSON Schema).
@@ -1,5 +1,5 @@
1
1
  import { z } from "@hono/zod-openapi";
2
- import * as drizzle_zod0 from "drizzle-zod";
2
+ import * as drizzle_zod15 from "drizzle-zod";
3
3
  import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
4
4
 
5
5
  //#region src/validation/drizzle-schema-helpers.d.ts
@@ -22,8 +22,8 @@ declare const resourceIdSchema: z.ZodString;
22
22
  declare function createResourceIdSchema(description: string, options?: {
23
23
  example?: string;
24
24
  }): z.ZodString;
25
- declare function createSelectSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod0.BuildSchema<"select", T["_"]["columns"], drizzle_zod0.BuildRefine<T["_"]["columns"], undefined>, undefined>;
26
- declare function createInsertSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod0.BuildSchema<"insert", T["_"]["columns"], drizzle_zod0.BuildRefine<Pick<T["_"]["columns"], keyof T["$inferInsert"]>, undefined>, undefined>;
25
+ declare function createSelectSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod15.BuildSchema<"select", T["_"]["columns"], drizzle_zod15.BuildRefine<T["_"]["columns"], undefined>, undefined>;
26
+ declare function createInsertSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod15.BuildSchema<"insert", T["_"]["columns"], drizzle_zod15.BuildRefine<Pick<T["_"]["columns"], keyof T["$inferInsert"]>, undefined>, undefined>;
27
27
  declare const createSelectSchema: typeof createSelectSchemaWithModifiers;
28
28
  declare const createInsertSchema: typeof createInsertSchemaWithModifiers;
29
29
  /**