@inkeep/agents-core 0.37.0 → 0.37.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 (44) hide show
  1. package/dist/auth/auth-schema.js +1 -1
  2. package/dist/auth/auth-validation-schemas.js +18 -18
  3. package/dist/auth/auth.d.ts +3 -3
  4. package/dist/auth/auth.js +5 -4
  5. package/dist/{auth-detection-CGqhPDnj.d.ts → auth-detection-7G0Dxt55.d.ts} +11 -0
  6. package/dist/{chunk-SSRRHYU4.js → chunk-7GZHUB4J.js} +4 -5
  7. package/dist/chunk-CMNLBV2A.js +39 -0
  8. package/dist/{chunk-MB2ZIPZS.js → chunk-FOK3JSQN.js} +5 -5
  9. package/dist/{chunk-SG75RA63.js → chunk-I6IF7ZTL.js} +2 -2
  10. package/dist/{chunk-VQXQOGJU.js → chunk-K6GMXJPW.js} +313 -315
  11. package/dist/{chunk-Q5U2SVA6.js → chunk-LL6F3EAR.js} +11 -7
  12. package/dist/{chunk-TGESM3JG.js → chunk-MQMMFK2K.js} +14 -3
  13. package/dist/{chunk-NFYCSHD3.js → chunk-PVRIMF6N.js} +2 -1
  14. package/dist/{chunk-ICZLNCX7.js → chunk-ROXPFQAM.js} +367 -69
  15. package/dist/{chunk-32YRH2S7.js → chunk-W3QDM7WH.js} +63 -67
  16. package/dist/{chunk-SLQW43IV.js → chunk-ZEZCCHV7.js} +4 -5
  17. package/dist/{client-CnpNkGsH.d.ts → client-B_3j-V4-.d.ts} +1 -1
  18. package/dist/client-exports.d.ts +6 -3
  19. package/dist/client-exports.js +126 -127
  20. package/dist/constants/schema-validation/index.js +1 -1
  21. package/dist/credential-stores/index.d.ts +3 -3
  22. package/dist/credential-stores/index.js +1 -1
  23. package/dist/db/schema.d.ts +2 -2
  24. package/dist/db/schema.js +2 -2
  25. package/dist/db/test-client.d.ts +3 -3
  26. package/dist/db/test-client.js +1 -1
  27. package/dist/index.d.ts +126 -9
  28. package/dist/index.js +284 -73
  29. package/dist/{schema-Cgkp_geg.d.ts → schema-DKbG39on.d.ts} +24 -1
  30. package/dist/server-BXoUiBMg.d.ts +127 -0
  31. package/dist/types/index.d.ts +33 -113
  32. package/dist/types/index.js +1 -1
  33. package/dist/{utility-C_tTZ7-k.d.ts → utility-Lo5NoRHK.d.ts} +141 -11
  34. package/dist/utils/schema-conversion.js +1 -1
  35. package/dist/validation/index.d.ts +2 -2
  36. package/dist/validation/index.js +2 -2
  37. package/drizzle/{0001_fair_malice.sql → 0001_calm_sheva_callister.sql} +1 -16
  38. package/drizzle/meta/0001_snapshot.json +7 -1
  39. package/drizzle/meta/_journal.json +2 -2
  40. package/package.json +14 -4
  41. package/dist/chunk-CUM6BY2Y.js +0 -320
  42. package/dist/chunk-H2F72PDA.js +0 -15
  43. package/dist/chunk-OUXC23J7.js +0 -12534
  44. /package/dist/{chunk-NOPEANIU.js → chunk-NFTJ5JBY.js} +0 -0
@@ -1,5 +1,5 @@
1
- import { AgentWithinContextOfProjectSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-VQXQOGJU.js';
2
- import { external_exports } from './chunk-OUXC23J7.js';
1
+ import { AgentWithinContextOfProjectSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-K6GMXJPW.js';
2
+ import { z } from 'zod';
3
3
 
4
4
  // src/validation/cycleDetection.ts
5
5
  function detectDelegationCycles(agentData) {
@@ -181,44 +181,42 @@ function validateAgentStructure(agentData, projectResources) {
181
181
  }
182
182
  validateAgentRelationships(agentData);
183
183
  }
184
-
185
- // src/validation/event-schemas.ts
186
- var TransferDataSchema = external_exports.object({
187
- fromSubAgent: external_exports.string().describe("ID of the sub-agent transferring control"),
188
- targetSubAgent: external_exports.string().describe("ID of the sub-agent receiving control"),
189
- reason: external_exports.string().optional().describe("Reason for the transfer"),
190
- context: external_exports.any().optional().describe("Additional context data")
184
+ var TransferDataSchema = z.object({
185
+ fromSubAgent: z.string().describe("ID of the sub-agent transferring control"),
186
+ targetSubAgent: z.string().describe("ID of the sub-agent receiving control"),
187
+ reason: z.string().optional().describe("Reason for the transfer"),
188
+ context: z.any().optional().describe("Additional context data")
191
189
  });
192
- var DelegationSentDataSchema = external_exports.object({
193
- delegationId: external_exports.string().describe("Unique identifier for this delegation"),
194
- fromSubAgent: external_exports.string().describe("ID of the delegating sub-agent"),
195
- targetSubAgent: external_exports.string().describe("ID of the sub-agent receiving the delegation"),
196
- taskDescription: external_exports.string().describe("Description of the delegated task"),
197
- context: external_exports.any().optional().describe("Additional context data")
190
+ var DelegationSentDataSchema = z.object({
191
+ delegationId: z.string().describe("Unique identifier for this delegation"),
192
+ fromSubAgent: z.string().describe("ID of the delegating sub-agent"),
193
+ targetSubAgent: z.string().describe("ID of the sub-agent receiving the delegation"),
194
+ taskDescription: z.string().describe("Description of the delegated task"),
195
+ context: z.any().optional().describe("Additional context data")
198
196
  });
199
- var DelegationReturnedDataSchema = external_exports.object({
200
- delegationId: external_exports.string().describe("Unique identifier matching the original delegation"),
201
- fromSubAgent: external_exports.string().describe("ID of the sub-agent that completed the task"),
202
- targetSubAgent: external_exports.string().describe("ID of the sub-agent receiving the result"),
203
- result: external_exports.any().optional().describe("Result data from the delegated task")
197
+ var DelegationReturnedDataSchema = z.object({
198
+ delegationId: z.string().describe("Unique identifier matching the original delegation"),
199
+ fromSubAgent: z.string().describe("ID of the sub-agent that completed the task"),
200
+ targetSubAgent: z.string().describe("ID of the sub-agent receiving the result"),
201
+ result: z.any().optional().describe("Result data from the delegated task")
204
202
  });
205
- var DataOperationDetailsSchema = external_exports.object({
206
- timestamp: external_exports.number().describe("Unix timestamp in milliseconds"),
207
- subAgentId: external_exports.string().describe("ID of the sub-agent that generated this data"),
208
- data: external_exports.any().describe("The actual data payload")
203
+ var DataOperationDetailsSchema = z.object({
204
+ timestamp: z.number().describe("Unix timestamp in milliseconds"),
205
+ subAgentId: z.string().describe("ID of the sub-agent that generated this data"),
206
+ data: z.any().describe("The actual data payload")
209
207
  });
210
- var DataOperationEventSchema = external_exports.object({
211
- type: external_exports.string().describe("Event type identifier"),
212
- label: external_exports.string().describe("Human-readable label for the event"),
208
+ var DataOperationEventSchema = z.object({
209
+ type: z.string().describe("Event type identifier"),
210
+ label: z.string().describe("Human-readable label for the event"),
213
211
  details: DataOperationDetailsSchema
214
212
  });
215
- var A2AMessageMetadataSchema = external_exports.object({
216
- fromSubAgentId: external_exports.string().optional().describe("ID of the sending sub-agent"),
217
- toSubAgentId: external_exports.string().optional().describe("ID of the receiving sub-agent"),
218
- fromExternalAgentId: external_exports.string().optional().describe("ID of the sending external agent"),
219
- toExternalAgentId: external_exports.string().optional().describe("ID of the receiving external agent"),
220
- taskId: external_exports.string().optional().describe("Associated task ID"),
221
- a2aTaskId: external_exports.string().optional().describe("A2A-specific task ID")
213
+ var A2AMessageMetadataSchema = z.object({
214
+ fromSubAgentId: z.string().optional().describe("ID of the sending sub-agent"),
215
+ toSubAgentId: z.string().optional().describe("ID of the receiving sub-agent"),
216
+ fromExternalAgentId: z.string().optional().describe("ID of the sending external agent"),
217
+ toExternalAgentId: z.string().optional().describe("ID of the receiving external agent"),
218
+ taskId: z.string().optional().describe("Associated task ID"),
219
+ a2aTaskId: z.string().optional().describe("A2A-specific task ID")
222
220
  });
223
221
 
224
222
  // src/validation/id-validation.ts
@@ -341,50 +339,48 @@ function validateRender(render) {
341
339
  errors
342
340
  };
343
341
  }
344
-
345
- // src/validation/stream-event-schemas.ts
346
- var TextStartEventSchema = external_exports.object({
347
- type: external_exports.literal("text-start"),
348
- id: external_exports.string()
342
+ var TextStartEventSchema = z.object({
343
+ type: z.literal("text-start"),
344
+ id: z.string()
349
345
  });
350
- var TextDeltaEventSchema = external_exports.object({
351
- type: external_exports.literal("text-delta"),
352
- id: external_exports.string(),
353
- delta: external_exports.string()
346
+ var TextDeltaEventSchema = z.object({
347
+ type: z.literal("text-delta"),
348
+ id: z.string(),
349
+ delta: z.string()
354
350
  });
355
- var TextEndEventSchema = external_exports.object({
356
- type: external_exports.literal("text-end"),
357
- id: external_exports.string()
351
+ var TextEndEventSchema = z.object({
352
+ type: z.literal("text-end"),
353
+ id: z.string()
358
354
  });
359
- var DataComponentStreamEventSchema = external_exports.object({
360
- type: external_exports.literal("data-component"),
361
- id: external_exports.string(),
362
- data: external_exports.any()
355
+ var DataComponentStreamEventSchema = z.object({
356
+ type: z.literal("data-component"),
357
+ id: z.string(),
358
+ data: z.any()
363
359
  });
364
- var DataOperationStreamEventSchema = external_exports.object({
365
- type: external_exports.literal("data-operation"),
366
- data: external_exports.any()
360
+ var DataOperationStreamEventSchema = z.object({
361
+ type: z.literal("data-operation"),
362
+ data: z.any()
367
363
  // Contains OperationEvent types (AgentInitializingEvent, CompletionEvent, etc.)
368
364
  });
369
- var DataSummaryStreamEventSchema = external_exports.object({
370
- type: external_exports.literal("data-summary"),
371
- data: external_exports.any()
365
+ var DataSummaryStreamEventSchema = z.object({
366
+ type: z.literal("data-summary"),
367
+ data: z.any()
372
368
  // Contains SummaryEvent from entities.ts
373
369
  });
374
- var StreamErrorEventSchema = external_exports.object({
375
- type: external_exports.literal("error"),
376
- error: external_exports.string()
370
+ var StreamErrorEventSchema = z.object({
371
+ type: z.literal("error"),
372
+ error: z.string()
377
373
  });
378
- var StreamFinishEventSchema = external_exports.object({
379
- type: external_exports.literal("finish"),
380
- finishReason: external_exports.string().optional(),
381
- usage: external_exports.object({
382
- promptTokens: external_exports.number().optional(),
383
- completionTokens: external_exports.number().optional(),
384
- totalTokens: external_exports.number().optional()
374
+ var StreamFinishEventSchema = z.object({
375
+ type: z.literal("finish"),
376
+ finishReason: z.string().optional(),
377
+ usage: z.object({
378
+ promptTokens: z.number().optional(),
379
+ completionTokens: z.number().optional(),
380
+ totalTokens: z.number().optional()
385
381
  }).optional()
386
382
  });
387
- var StreamEventSchema = external_exports.discriminatedUnion("type", [
383
+ var StreamEventSchema = z.discriminatedUnion("type", [
388
384
  TextStartEventSchema,
389
385
  TextDeltaEventSchema,
390
386
  TextEndEventSchema,
@@ -1,14 +1,13 @@
1
1
  import { schemaValidationDefaults } from './chunk-Z64UK4CA.js';
2
- import { loadEnvironmentFiles } from './chunk-Q5U2SVA6.js';
3
- import { external_exports } from './chunk-OUXC23J7.js';
2
+ import { loadEnvironmentFiles } from './chunk-LL6F3EAR.js';
3
+ import { z } from 'zod';
4
4
 
5
- // src/constants/schema-validation/index.ts
6
5
  loadEnvironmentFiles();
7
- var constantsSchema = external_exports.object(
6
+ var constantsSchema = z.object(
8
7
  Object.fromEntries(
9
8
  Object.keys(schemaValidationDefaults).map((key) => [
10
9
  `AGENTS_${key}`,
11
- external_exports.coerce.number().optional()
10
+ z.coerce.number().optional()
12
11
  ])
13
12
  )
14
13
  );
@@ -1,6 +1,6 @@
1
1
  import { NodePgDatabase } from 'drizzle-orm/node-postgres';
2
2
  import { PgliteDatabase } from 'drizzle-orm/pglite';
3
- import { s as schema } from './schema-Cgkp_geg.js';
3
+ import { s as schema } from './schema-DKbG39on.js';
4
4
 
5
5
  type DatabaseClient = NodePgDatabase<typeof schema> | PgliteDatabase<typeof schema>;
6
6
  interface DatabaseConfig {
@@ -1,7 +1,7 @@
1
- export { i as ACTIVITY_NAMES, g as ACTIVITY_STATUS, f as ACTIVITY_TYPES, h as AGENT_IDS, p as AGGREGATE_OPERATORS, A as AI_OPERATIONS, j as AI_TOOL_TYPES, o as DATA_SOURCES, k as DATA_TYPES, D as DELEGATION_FROM_SUB_AGENT_ID, b as DELEGATION_ID, a as DELEGATION_TO_SUB_AGENT_ID, F as FIELD_TYPES, O as OPERATORS, m as ORDER_DIRECTIONS, P as PANEL_TYPES, q as QUERY_DEFAULTS, l as QUERY_EXPRESSIONS, Q as QUERY_FIELD_CONFIGS, n as QUERY_TYPES, R as REDUCE_OPERATIONS, e as SPAN_KEYS, S as SPAN_NAMES, T as TRANSFER_FROM_SUB_AGENT_ID, c as TRANSFER_TO_SUB_AGENT_ID, U as UNKNOWN_VALUE, d as detectAuthenticationRequired } from './auth-detection-CGqhPDnj.js';
1
+ export { i as ACTIVITY_NAMES, g as ACTIVITY_STATUS, f as ACTIVITY_TYPES, h as AGENT_IDS, p as AGGREGATE_OPERATORS, A as AI_OPERATIONS, j as AI_TOOL_TYPES, o as DATA_SOURCES, k as DATA_TYPES, D as DELEGATION_FROM_SUB_AGENT_ID, b as DELEGATION_ID, a as DELEGATION_TO_SUB_AGENT_ID, F as FIELD_TYPES, O as OPERATORS, m as ORDER_DIRECTIONS, P as PANEL_TYPES, q as QUERY_DEFAULTS, l as QUERY_EXPRESSIONS, Q as QUERY_FIELD_CONFIGS, n as QUERY_TYPES, R as REDUCE_OPERATIONS, e as SPAN_KEYS, S as SPAN_NAMES, T as TRANSFER_FROM_SUB_AGENT_ID, c as TRANSFER_TO_SUB_AGENT_ID, U as UNKNOWN_VALUE, d as detectAuthenticationRequired } from './auth-detection-7G0Dxt55.js';
2
2
  import { z } from 'zod';
3
- import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullAgentAgentInsertSchema } from './utility-C_tTZ7-k.js';
4
- export { e as AgentStopWhen, b as AgentStopWhenSchema, h as CredentialStoreType, j as FunctionApiSelectSchema, k as FunctionApiUpdateSchema, i as MCPTransportType, g as ModelSettings, M as ModelSettingsSchema, d as StopWhen, S as StopWhenSchema, f as SubAgentStopWhen, c as SubAgentStopWhenSchema } from './utility-C_tTZ7-k.js';
3
+ import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullAgentAgentInsertSchema } from './utility-Lo5NoRHK.js';
4
+ export { e as AgentStopWhen, b as AgentStopWhenSchema, h as CredentialStoreType, j as FunctionApiSelectSchema, k as FunctionApiUpdateSchema, i as MCPTransportType, g as ModelSettings, M as ModelSettingsSchema, d as StopWhen, S as StopWhenSchema, f as SubAgentStopWhen, c as SubAgentStopWhenSchema } from './utility-Lo5NoRHK.js';
5
5
  export { v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.js';
6
6
  import 'pino';
7
7
  import 'drizzle-zod';
@@ -205,6 +205,9 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
205
205
  toolId: z.ZodString;
206
206
  toolSelection: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
207
207
  headers: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
208
+ toolPolicies: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
209
+ needsApproval: z.ZodOptional<z.ZodBoolean>;
210
+ }, z.core.$strip>>>>;
208
211
  }, z.core.$strip>>;
209
212
  dataComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
210
213
  artifactComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -1,13 +1,12 @@
1
- export { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, DATA_SOURCES, DATA_TYPES, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, FIELD_TYPES, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, SPAN_KEYS, SPAN_NAMES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, UNKNOWN_VALUE } from './chunk-TGESM3JG.js';
2
- import { ModelSettingsSchema, FullAgentAgentInsertSchema, ArtifactComponentApiInsertSchema } from './chunk-VQXQOGJU.js';
3
- export { AgentStopWhenSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettingsSchema, StopWhenSchema, SubAgentStopWhenSchema, validatePropsAsJsonSchema } from './chunk-VQXQOGJU.js';
1
+ export { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, DATA_SOURCES, DATA_TYPES, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, FIELD_TYPES, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, SPAN_KEYS, SPAN_NAMES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, UNKNOWN_VALUE } from './chunk-MQMMFK2K.js';
2
+ import { ModelSettingsSchema, FullAgentAgentInsertSchema, ArtifactComponentApiInsertSchema } from './chunk-K6GMXJPW.js';
3
+ export { AgentStopWhenSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettingsSchema, StopWhenSchema, SubAgentStopWhenSchema, validatePropsAsJsonSchema } from './chunk-K6GMXJPW.js';
4
4
  import { schemaValidationDefaults } from './chunk-Z64UK4CA.js';
5
5
  export { detectAuthenticationRequired } from './chunk-4JZT4QEE.js';
6
6
  import { CredentialStoreType } from './chunk-YFHT5M2R.js';
7
7
  export { CredentialStoreType, MCPTransportType } from './chunk-YFHT5M2R.js';
8
- import { external_exports } from './chunk-OUXC23J7.js';
8
+ import { z } from 'zod';
9
9
 
10
- // src/client-exports.ts
11
10
  var {
12
11
  AGENT_EXECUTION_TRANSFER_COUNT_MAX,
13
12
  AGENT_EXECUTION_TRANSFER_COUNT_MIN,
@@ -16,153 +15,153 @@ var {
16
15
  VALIDATION_AGENT_PROMPT_MAX_CHARS,
17
16
  VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS
18
17
  } = schemaValidationDefaults;
19
- var TenantParamsSchema = external_exports.object({
20
- tenantId: external_exports.string()
18
+ var TenantParamsSchema = z.object({
19
+ tenantId: z.string()
21
20
  });
22
21
  var TenantProjectParamsSchema = TenantParamsSchema.extend({
23
- projectId: external_exports.string()
22
+ projectId: z.string()
24
23
  });
25
24
  var TenantProjectIdParamsSchema = TenantProjectParamsSchema.extend({
26
- id: external_exports.string()
25
+ id: z.string()
27
26
  });
28
- var IdParamsSchema = external_exports.object({
29
- id: external_exports.string()
27
+ var IdParamsSchema = z.object({
28
+ id: z.string()
30
29
  });
31
- var PaginationSchema = external_exports.object({
32
- page: external_exports.coerce.number().min(1).default(1),
33
- limit: external_exports.coerce.number().min(1).max(100).default(10),
34
- total: external_exports.number(),
35
- pages: external_exports.number()
30
+ var PaginationSchema = z.object({
31
+ page: z.coerce.number().min(1).default(1),
32
+ limit: z.coerce.number().min(1).max(100).default(10),
33
+ total: z.number(),
34
+ pages: z.number()
36
35
  });
37
- var ListResponseSchema = (itemSchema) => external_exports.object({
38
- data: external_exports.array(itemSchema),
36
+ var ListResponseSchema = (itemSchema) => z.object({
37
+ data: z.array(itemSchema),
39
38
  pagination: PaginationSchema
40
39
  });
41
- var SingleResponseSchema = (itemSchema) => external_exports.object({
40
+ var SingleResponseSchema = (itemSchema) => z.object({
42
41
  data: itemSchema
43
42
  });
44
- var ErrorResponseSchema = external_exports.object({
45
- error: external_exports.string(),
46
- message: external_exports.string().optional(),
47
- details: external_exports.unknown().optional()
43
+ var ErrorResponseSchema = z.object({
44
+ error: z.string(),
45
+ message: z.string().optional(),
46
+ details: z.unknown().optional()
48
47
  });
49
- var AgentApiInsertSchema = external_exports.object({
50
- id: external_exports.string().optional(),
51
- name: external_exports.string(),
52
- description: external_exports.string().optional(),
53
- prompt: external_exports.string().optional(),
48
+ var AgentApiInsertSchema = z.object({
49
+ id: z.string().optional(),
50
+ name: z.string(),
51
+ description: z.string().optional(),
52
+ prompt: z.string().optional(),
54
53
  model: ModelSettingsSchema.optional(),
55
- tools: external_exports.array(external_exports.string()).optional(),
56
- dataComponents: external_exports.array(external_exports.string()).optional(),
57
- artifactComponents: external_exports.array(external_exports.string()).optional(),
58
- canTransferTo: external_exports.array(external_exports.string()).optional(),
59
- canDelegateTo: external_exports.array(external_exports.string()).optional(),
60
- type: external_exports.enum(["internal", "external"]).optional()
61
- });
62
- var ToolApiInsertSchema = external_exports.object({
63
- id: external_exports.string().optional(),
64
- name: external_exports.string(),
65
- description: external_exports.string().optional(),
66
- type: external_exports.enum(["mcp", "hosted"]),
67
- config: external_exports.record(external_exports.string(), external_exports.unknown()),
68
- credentialReferenceId: external_exports.string().optional()
69
- });
70
- var ApiKeyApiSelectSchema = external_exports.object({
71
- id: external_exports.string(),
72
- tenantId: external_exports.string(),
73
- projectId: external_exports.string(),
74
- agentId: external_exports.string(),
75
- publicId: external_exports.string(),
76
- keyHash: external_exports.string(),
77
- keyPrefix: external_exports.string(),
78
- name: external_exports.string().optional(),
79
- lastUsedAt: external_exports.string().optional(),
80
- expiresAt: external_exports.string().optional(),
81
- createdAt: external_exports.string(),
82
- updatedAt: external_exports.string()
83
- });
84
- var ApiKeyApiCreationResponseSchema = external_exports.object({
85
- data: external_exports.object({
54
+ tools: z.array(z.string()).optional(),
55
+ dataComponents: z.array(z.string()).optional(),
56
+ artifactComponents: z.array(z.string()).optional(),
57
+ canTransferTo: z.array(z.string()).optional(),
58
+ canDelegateTo: z.array(z.string()).optional(),
59
+ type: z.enum(["internal", "external"]).optional()
60
+ });
61
+ var ToolApiInsertSchema = z.object({
62
+ id: z.string().optional(),
63
+ name: z.string(),
64
+ description: z.string().optional(),
65
+ type: z.enum(["mcp", "hosted"]),
66
+ config: z.record(z.string(), z.unknown()),
67
+ credentialReferenceId: z.string().optional()
68
+ });
69
+ var ApiKeyApiSelectSchema = z.object({
70
+ id: z.string(),
71
+ tenantId: z.string(),
72
+ projectId: z.string(),
73
+ agentId: z.string(),
74
+ publicId: z.string(),
75
+ keyHash: z.string(),
76
+ keyPrefix: z.string(),
77
+ name: z.string().optional(),
78
+ lastUsedAt: z.string().optional(),
79
+ expiresAt: z.string().optional(),
80
+ createdAt: z.string(),
81
+ updatedAt: z.string()
82
+ });
83
+ var ApiKeyApiCreationResponseSchema = z.object({
84
+ data: z.object({
86
85
  apiKey: ApiKeyApiSelectSchema,
87
- key: external_exports.string()
86
+ key: z.string()
88
87
  })
89
88
  });
90
- var CredentialReferenceApiInsertSchema = external_exports.object({
91
- id: external_exports.string(),
92
- tenantId: external_exports.string().optional(),
93
- projectId: external_exports.string().optional(),
94
- name: external_exports.string(),
95
- type: external_exports.enum(CredentialStoreType),
96
- credentialStoreId: external_exports.string(),
97
- retrievalParams: external_exports.record(external_exports.string(), external_exports.unknown()).nullish()
98
- });
99
- var DataComponentApiInsertSchema = external_exports.object({
100
- id: external_exports.string(),
101
- name: external_exports.string(),
102
- description: external_exports.string().optional(),
103
- props: external_exports.record(external_exports.string(), external_exports.unknown()),
104
- render: external_exports.object({
105
- component: external_exports.string(),
106
- mockData: external_exports.record(external_exports.string(), external_exports.unknown())
89
+ var CredentialReferenceApiInsertSchema = z.object({
90
+ id: z.string(),
91
+ tenantId: z.string().optional(),
92
+ projectId: z.string().optional(),
93
+ name: z.string(),
94
+ type: z.enum(CredentialStoreType),
95
+ credentialStoreId: z.string(),
96
+ retrievalParams: z.record(z.string(), z.unknown()).nullish()
97
+ });
98
+ var DataComponentApiInsertSchema = z.object({
99
+ id: z.string(),
100
+ name: z.string(),
101
+ description: z.string().optional(),
102
+ props: z.record(z.string(), z.unknown()),
103
+ render: z.object({
104
+ component: z.string(),
105
+ mockData: z.record(z.string(), z.unknown())
107
106
  }).nullable().optional()
108
107
  });
109
108
  var ArtifactComponentApiInsertSchema2 = ArtifactComponentApiInsertSchema;
110
- var ContextConfigApiInsertSchema = external_exports.object({
111
- id: external_exports.string().optional(),
112
- name: external_exports.string().optional(),
113
- description: external_exports.string().optional(),
114
- type: external_exports.string().optional(),
115
- config: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
116
- });
117
- var ExternalAgentApiInsertSchema = external_exports.object({
118
- id: external_exports.string().optional(),
119
- name: external_exports.string(),
120
- description: external_exports.string().optional(),
121
- baseUrl: external_exports.string(),
122
- headers: external_exports.record(external_exports.string(), external_exports.string()).nullable().optional(),
123
- credentialReferenceId: external_exports.string().nullable().optional(),
124
- type: external_exports.literal("external").optional()
125
- });
126
- var AgentAgentApiInsertSchema = external_exports.object({
127
- id: external_exports.string().optional(),
128
- name: external_exports.string(),
129
- description: external_exports.string().optional(),
130
- defaultSubAgentId: external_exports.string().optional()
109
+ var ContextConfigApiInsertSchema = z.object({
110
+ id: z.string().optional(),
111
+ name: z.string().optional(),
112
+ description: z.string().optional(),
113
+ type: z.string().optional(),
114
+ config: z.record(z.string(), z.unknown()).optional()
115
+ });
116
+ var ExternalAgentApiInsertSchema = z.object({
117
+ id: z.string().optional(),
118
+ name: z.string(),
119
+ description: z.string().optional(),
120
+ baseUrl: z.string(),
121
+ headers: z.record(z.string(), z.string()).nullable().optional(),
122
+ credentialReferenceId: z.string().nullable().optional(),
123
+ type: z.literal("external").optional()
124
+ });
125
+ var AgentAgentApiInsertSchema = z.object({
126
+ id: z.string().optional(),
127
+ name: z.string(),
128
+ description: z.string().optional(),
129
+ defaultSubAgentId: z.string().optional()
131
130
  });
132
131
  var FullAgentDefinitionSchema = AgentAgentApiInsertSchema.extend({
133
- subAgents: external_exports.record(external_exports.string(), external_exports.union([FullAgentAgentInsertSchema])),
134
- contextConfig: external_exports.optional(ContextConfigApiInsertSchema),
135
- models: external_exports.object({
136
- base: external_exports.object({
137
- model: external_exports.string(),
138
- providerOptions: external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.unknown())).optional()
132
+ subAgents: z.record(z.string(), z.union([FullAgentAgentInsertSchema])),
133
+ contextConfig: z.optional(ContextConfigApiInsertSchema),
134
+ models: z.object({
135
+ base: z.object({
136
+ model: z.string(),
137
+ providerOptions: z.record(z.string(), z.record(z.string(), z.unknown())).optional()
139
138
  }).optional(),
140
- structuredOutput: external_exports.object({
141
- model: external_exports.string(),
142
- providerOptions: external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.unknown())).optional()
139
+ structuredOutput: z.object({
140
+ model: z.string(),
141
+ providerOptions: z.record(z.string(), z.record(z.string(), z.unknown())).optional()
143
142
  }).optional(),
144
- summarizer: external_exports.object({
145
- model: external_exports.string(),
146
- providerOptions: external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.unknown())).optional()
143
+ summarizer: z.object({
144
+ model: z.string(),
145
+ providerOptions: z.record(z.string(), z.record(z.string(), z.unknown())).optional()
147
146
  }).optional()
148
147
  }).optional(),
149
- stopWhen: external_exports.object({
150
- transferCountIs: external_exports.number().min(AGENT_EXECUTION_TRANSFER_COUNT_MIN).max(AGENT_EXECUTION_TRANSFER_COUNT_MAX).optional()
148
+ stopWhen: z.object({
149
+ transferCountIs: z.number().min(AGENT_EXECUTION_TRANSFER_COUNT_MIN).max(AGENT_EXECUTION_TRANSFER_COUNT_MAX).optional()
151
150
  }).optional(),
152
- prompt: external_exports.string().max(VALIDATION_AGENT_PROMPT_MAX_CHARS).optional(),
153
- statusUpdates: external_exports.object({
154
- enabled: external_exports.boolean().optional(),
155
- numEvents: external_exports.number().min(1).max(STATUS_UPDATE_MAX_NUM_EVENTS).optional(),
156
- timeInSeconds: external_exports.number().min(1).max(STATUS_UPDATE_MAX_INTERVAL_SECONDS).optional(),
157
- prompt: external_exports.string().max(VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS).optional(),
158
- statusComponents: external_exports.array(
159
- external_exports.object({
160
- type: external_exports.string(),
161
- description: external_exports.string().optional(),
162
- detailsSchema: external_exports.object({
163
- type: external_exports.literal("object"),
164
- properties: external_exports.record(external_exports.string(), external_exports.any()),
165
- required: external_exports.array(external_exports.string()).optional()
151
+ prompt: z.string().max(VALIDATION_AGENT_PROMPT_MAX_CHARS).optional(),
152
+ statusUpdates: z.object({
153
+ enabled: z.boolean().optional(),
154
+ numEvents: z.number().min(1).max(STATUS_UPDATE_MAX_NUM_EVENTS).optional(),
155
+ timeInSeconds: z.number().min(1).max(STATUS_UPDATE_MAX_INTERVAL_SECONDS).optional(),
156
+ prompt: z.string().max(VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS).optional(),
157
+ statusComponents: z.array(
158
+ z.object({
159
+ type: z.string(),
160
+ description: z.string().optional(),
161
+ detailsSchema: z.object({
162
+ type: z.literal("object"),
163
+ properties: z.record(z.string(), z.any()),
164
+ required: z.array(z.string()).optional()
166
165
  }).optional()
167
166
  })
168
167
  ).optional()
@@ -171,7 +170,7 @@ var FullAgentDefinitionSchema = AgentAgentApiInsertSchema.extend({
171
170
  var MIN_ID_LENGTH = 1;
172
171
  var MAX_ID_LENGTH = 255;
173
172
  var URL_SAFE_ID_PATTERN = /^[a-zA-Z0-9\-_.]+$/;
174
- var resourceIdSchema = external_exports.string().min(MIN_ID_LENGTH).max(MAX_ID_LENGTH).regex(URL_SAFE_ID_PATTERN, {
173
+ var resourceIdSchema = z.string().min(MIN_ID_LENGTH).max(MAX_ID_LENGTH).regex(URL_SAFE_ID_PATTERN, {
175
174
  message: "ID must contain only letters, numbers, hyphens, underscores, and dots"
176
175
  });
177
176
  function generateIdFromName(name) {
@@ -1,2 +1,2 @@
1
- export { AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT, AGENT_EXECUTION_TRANSFER_COUNT_MAX, AGENT_EXECUTION_TRANSFER_COUNT_MIN, CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT, STATUS_UPDATE_MAX_INTERVAL_SECONDS, STATUS_UPDATE_MAX_NUM_EVENTS, SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT, SUB_AGENT_TURN_GENERATION_STEPS_MAX, SUB_AGENT_TURN_GENERATION_STEPS_MIN, VALIDATION_AGENT_PROMPT_MAX_CHARS, VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS } from '../../chunk-SLQW43IV.js';
1
+ export { AGENT_EXECUTION_TRANSFER_COUNT_DEFAULT, AGENT_EXECUTION_TRANSFER_COUNT_MAX, AGENT_EXECUTION_TRANSFER_COUNT_MIN, CONTEXT_FETCHER_HTTP_TIMEOUT_MS_DEFAULT, STATUS_UPDATE_MAX_INTERVAL_SECONDS, STATUS_UPDATE_MAX_NUM_EVENTS, SUB_AGENT_TURN_GENERATION_STEPS_DEFAULT, SUB_AGENT_TURN_GENERATION_STEPS_MAX, SUB_AGENT_TURN_GENERATION_STEPS_MIN, VALIDATION_AGENT_PROMPT_MAX_CHARS, VALIDATION_SUB_AGENT_PROMPT_MAX_CHARS } from '../../chunk-ZEZCCHV7.js';
2
2
  export { schemaValidationDefaults } from '../../chunk-Z64UK4CA.js';
@@ -1,10 +1,10 @@
1
- import { CredentialStore } from '../types/index.js';
2
- import '../utility-C_tTZ7-k.js';
1
+ import { C as CredentialStore } from '../server-BXoUiBMg.js';
2
+ import 'hono';
3
+ import '../utility-Lo5NoRHK.js';
3
4
  import 'zod';
4
5
  import 'drizzle-zod';
5
6
  import 'drizzle-orm/pg-core';
6
7
  import '@hono/zod-openapi';
7
- import 'hono';
8
8
 
9
9
  /**
10
10
  * Registry for managing credential stores in the application context
@@ -1 +1 @@
1
- export { CredentialStoreRegistry, InMemoryCredentialStore, KeyChainStore, NangoCredentialStore, createDefaultCredentialStores, createKeyChainStore, createNangoCredentialStore } from '../chunk-MB2ZIPZS.js';
1
+ export { CredentialStoreRegistry, InMemoryCredentialStore, KeyChainStore, NangoCredentialStore, createDefaultCredentialStores, createKeyChainStore, createNangoCredentialStore } from '../chunk-FOK3JSQN.js';
@@ -1,8 +1,8 @@
1
1
  import 'drizzle-orm';
2
2
  import 'drizzle-orm/pg-core';
3
- import '../utility-C_tTZ7-k.js';
3
+ import '../utility-Lo5NoRHK.js';
4
4
  export { account, invitation, member, organization, session, ssoProvider, user, verification } from '../auth/auth-schema.js';
5
- export { G as agentRelations, J as agentToolRelationsRelations, a as agents, y as apiKeys, I as apiKeysRelations, j as artifactComponents, O as artifactComponentsRelations, b as contextCache, E as contextCacheRelations, c as contextConfigs, D as contextConfigsRelations, v as conversations, M as conversationsRelations, z as credentialReferences, K as credentialReferencesRelations, h as dataComponents, Q as dataComponentsRelations, f as externalAgents, H as externalAgentsRelations, m as functionTools, V as functionToolsRelations, n as functions, T as functionsRelations, x as ledgerArtifacts, S as ledgerArtifactsRelations, w as messages, N as messagesRelations, p as projects, B as projectsRelations, k as subAgentArtifactComponents, P as subAgentArtifactComponentsRelations, i as subAgentDataComponents, R as subAgentDataComponentsRelations, q as subAgentExternalAgentRelations, X as subAgentExternalAgentRelationsRelations, u as subAgentFunctionToolRelations, W as subAgentFunctionToolRelationsRelations, e as subAgentRelations, U as subAgentRelationsRelations, r as subAgentTeamAgentRelations, Y as subAgentTeamAgentRelationsRelations, o as subAgentToolRelations, d as subAgents, F as subAgentsRelations, g as taskRelations, C as taskRelationsRelations, t as tasks, A as tasksRelations, l as tools, L as toolsRelations } from '../schema-Cgkp_geg.js';
5
+ export { G as agentRelations, J as agentToolRelationsRelations, a as agents, y as apiKeys, I as apiKeysRelations, j as artifactComponents, O as artifactComponentsRelations, b as contextCache, E as contextCacheRelations, c as contextConfigs, D as contextConfigsRelations, v as conversations, M as conversationsRelations, z as credentialReferences, K as credentialReferencesRelations, h as dataComponents, Q as dataComponentsRelations, f as externalAgents, H as externalAgentsRelations, m as functionTools, V as functionToolsRelations, n as functions, T as functionsRelations, x as ledgerArtifacts, S as ledgerArtifactsRelations, w as messages, N as messagesRelations, p as projects, B as projectsRelations, k as subAgentArtifactComponents, P as subAgentArtifactComponentsRelations, i as subAgentDataComponents, R as subAgentDataComponentsRelations, q as subAgentExternalAgentRelations, X as subAgentExternalAgentRelationsRelations, u as subAgentFunctionToolRelations, W as subAgentFunctionToolRelationsRelations, e as subAgentRelations, U as subAgentRelationsRelations, r as subAgentTeamAgentRelations, Y as subAgentTeamAgentRelationsRelations, o as subAgentToolRelations, d as subAgents, F as subAgentsRelations, g as taskRelations, C as taskRelationsRelations, t as tasks, A as tasksRelations, l as tools, L as toolsRelations } from '../schema-DKbG39on.js';
6
6
  import 'zod';
7
7
  import 'drizzle-zod';
8
8
  import '@hono/zod-openapi';
package/dist/db/schema.js CHANGED
@@ -1,2 +1,2 @@
1
- export { agentRelations, agentToolRelationsRelations, agents, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, contextCache, contextCacheRelations, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, externalAgents, externalAgentsRelations, functionTools, functionToolsRelations, functions, functionsRelations, ledgerArtifacts, ledgerArtifactsRelations, messages, messagesRelations, projects, projectsRelations, subAgentArtifactComponents, subAgentArtifactComponentsRelations, subAgentDataComponents, subAgentDataComponentsRelations, subAgentExternalAgentRelations, subAgentExternalAgentRelationsRelations, subAgentFunctionToolRelations, subAgentFunctionToolRelationsRelations, subAgentRelations, subAgentRelationsRelations, subAgentTeamAgentRelations, subAgentTeamAgentRelationsRelations, subAgentToolRelations, subAgents, subAgentsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations } from '../chunk-NFYCSHD3.js';
2
- export { account, invitation, member, organization, session, ssoProvider, user, verification } from '../chunk-NOPEANIU.js';
1
+ export { agentRelations, agentToolRelationsRelations, agents, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, contextCache, contextCacheRelations, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, externalAgents, externalAgentsRelations, functionTools, functionToolsRelations, functions, functionsRelations, ledgerArtifacts, ledgerArtifactsRelations, messages, messagesRelations, projects, projectsRelations, subAgentArtifactComponents, subAgentArtifactComponentsRelations, subAgentDataComponents, subAgentDataComponentsRelations, subAgentExternalAgentRelations, subAgentExternalAgentRelationsRelations, subAgentFunctionToolRelations, subAgentFunctionToolRelationsRelations, subAgentRelations, subAgentRelationsRelations, subAgentTeamAgentRelations, subAgentTeamAgentRelationsRelations, subAgentToolRelations, subAgents, subAgentsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations } from '../chunk-PVRIMF6N.js';
2
+ export { account, invitation, member, organization, session, ssoProvider, user, verification } from '../chunk-NFTJ5JBY.js';
@@ -1,10 +1,10 @@
1
- import { D as DatabaseClient } from '../client-CnpNkGsH.js';
1
+ import { D as DatabaseClient } from '../client-B_3j-V4-.js';
2
2
  import 'drizzle-orm/node-postgres';
3
3
  import 'drizzle-orm/pglite';
4
- import '../schema-Cgkp_geg.js';
4
+ import '../schema-DKbG39on.js';
5
5
  import 'drizzle-orm';
6
6
  import 'drizzle-orm/pg-core';
7
- import '../utility-C_tTZ7-k.js';
7
+ import '../utility-Lo5NoRHK.js';
8
8
  import 'zod';
9
9
  import 'drizzle-zod';
10
10
  import '@hono/zod-openapi';
@@ -1 +1 @@
1
- export { cleanupTestDatabase, closeTestDatabase, createTestDatabaseClient, createTestOrganization, createTestProject } from '../chunk-SG75RA63.js';
1
+ export { cleanupTestDatabase, closeTestDatabase, createTestDatabaseClient, createTestOrganization, createTestProject } from '../chunk-I6IF7ZTL.js';