@inkeep/agents-core 0.21.0 → 1.0.0
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.
- package/dist/{chunk-VTNB6CCI.js → chunk-QEXLYPVZ.js} +1 -1
- package/dist/{chunk-7GKB2SDR.js → chunk-TNHJH73I.js} +0 -27
- package/dist/{chunk-LZJWVTQ2.js → chunk-TTIPV5QP.js} +11 -0
- package/dist/{chunk-RCE4G7BW.js → chunk-XKJPMUGE.js} +1 -1
- package/dist/client-exports.cjs +0 -27
- package/dist/client-exports.js +2 -2
- package/dist/constants/models.cjs +11 -0
- package/dist/constants/models.d.cts +11 -0
- package/dist/constants/models.d.ts +11 -0
- package/dist/constants/models.js +1 -1
- package/dist/db/schema.cjs +0 -27
- package/dist/db/schema.js +1 -1
- package/dist/index.cjs +73 -55
- package/dist/index.d.cts +24 -13
- package/dist/index.d.ts +24 -13
- package/dist/index.js +68 -34
- package/dist/types/index.d.cts +8 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/validation/index.cjs +0 -27
- package/dist/validation/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentWithinContextOfProjectSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-
|
|
1
|
+
import { AgentWithinContextOfProjectSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-XKJPMUGE.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
var TransferDataSchema = z.object({
|
|
@@ -81,11 +81,8 @@ var projects = sqliteTable(
|
|
|
81
81
|
{
|
|
82
82
|
...tenantScoped,
|
|
83
83
|
...uiProperties,
|
|
84
|
-
// Project-level default model settings that can be inherited by agents
|
|
85
84
|
models: text("models", { mode: "json" }).$type(),
|
|
86
|
-
// Project-level stopWhen configuration that can be inherited by agents
|
|
87
85
|
stopWhen: text("stop_when", { mode: "json" }).$type(),
|
|
88
|
-
// Project-level sandbox configuration for function execution
|
|
89
86
|
sandboxConfig: text("sandbox_config", { mode: "json" }).$type(),
|
|
90
87
|
...timestamps
|
|
91
88
|
},
|
|
@@ -118,9 +115,7 @@ var contextConfigs = sqliteTable(
|
|
|
118
115
|
"context_configs",
|
|
119
116
|
{
|
|
120
117
|
...agentScoped,
|
|
121
|
-
// Developer-defined Zod schema for validating incoming request context
|
|
122
118
|
headersSchema: blob("headers_schema", { mode: "json" }).$type(),
|
|
123
|
-
// Object mapping template keys to fetch definitions that use request context data
|
|
124
119
|
contextVariables: blob("context_variables", { mode: "json" }).$type(),
|
|
125
120
|
...timestamps
|
|
126
121
|
},
|
|
@@ -137,15 +132,11 @@ var contextCache = sqliteTable(
|
|
|
137
132
|
"context_cache",
|
|
138
133
|
{
|
|
139
134
|
...projectScoped,
|
|
140
|
-
// Always scoped to conversation for complete data isolation
|
|
141
135
|
conversationId: text("conversation_id").notNull(),
|
|
142
|
-
// Reference to the context config and specific fetch definition
|
|
143
136
|
contextConfigId: text("context_config_id").notNull(),
|
|
144
137
|
contextVariableKey: text("context_variable_key").notNull(),
|
|
145
138
|
value: blob("value", { mode: "json" }).$type().notNull(),
|
|
146
|
-
// Request hash for cache invalidation based on context changes
|
|
147
139
|
requestHash: text("request_hash"),
|
|
148
|
-
// Metadata for monitoring and debugging
|
|
149
140
|
fetchedAt: text("fetched_at").notNull(),
|
|
150
141
|
fetchSource: text("fetch_source"),
|
|
151
142
|
fetchDurationMs: integer("fetch_duration_ms"),
|
|
@@ -192,9 +183,7 @@ var subAgentRelations = sqliteTable(
|
|
|
192
183
|
{
|
|
193
184
|
...agentScoped,
|
|
194
185
|
sourceSubAgentId: text("source_sub_agent_id").notNull(),
|
|
195
|
-
// For internal relationships
|
|
196
186
|
targetSubAgentId: text("target_sub_agent_id"),
|
|
197
|
-
// For external relationships
|
|
198
187
|
externalSubAgentId: text("external_sub_agent_id"),
|
|
199
188
|
relationType: text("relation_type"),
|
|
200
189
|
...timestamps
|
|
@@ -363,9 +352,7 @@ var tools = sqliteTable(
|
|
|
363
352
|
config: blob("config", { mode: "json" }).$type().notNull(),
|
|
364
353
|
credentialReferenceId: text("credential_reference_id"),
|
|
365
354
|
headers: blob("headers", { mode: "json" }).$type(),
|
|
366
|
-
// Image URL for custom tool icon (supports regular URLs and base64 encoded images)
|
|
367
355
|
imageUrl: text("image_url"),
|
|
368
|
-
// Server capabilities and status (only for MCP tools)
|
|
369
356
|
capabilities: blob("capabilities", { mode: "json" }).$type(),
|
|
370
357
|
lastError: text("last_error"),
|
|
371
358
|
...timestamps
|
|
@@ -395,7 +382,6 @@ var functionTools = sqliteTable(
|
|
|
395
382
|
foreignColumns: [agents.tenantId, agents.projectId, agents.id],
|
|
396
383
|
name: "function_tools_agent_fk"
|
|
397
384
|
}).onDelete("cascade"),
|
|
398
|
-
// Foreign key constraint to functions table
|
|
399
385
|
foreignKey({
|
|
400
386
|
columns: [table.tenantId, table.projectId, table.functionId],
|
|
401
387
|
foreignColumns: [functions.tenantId, functions.projectId, functions.id],
|
|
@@ -453,13 +439,11 @@ var subAgentFunctionToolRelations = sqliteTable(
|
|
|
453
439
|
},
|
|
454
440
|
(table) => [
|
|
455
441
|
primaryKey({ columns: [table.tenantId, table.projectId, table.agentId, table.id] }),
|
|
456
|
-
// Foreign key constraint to sub_agents table
|
|
457
442
|
foreignKey({
|
|
458
443
|
columns: [table.tenantId, table.projectId, table.agentId, table.subAgentId],
|
|
459
444
|
foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.agentId, subAgents.id],
|
|
460
445
|
name: "sub_agent_function_tool_relations_sub_agent_fk"
|
|
461
446
|
}).onDelete("cascade"),
|
|
462
|
-
// Foreign key constraint to functionTools table
|
|
463
447
|
foreignKey({
|
|
464
448
|
columns: [table.tenantId, table.projectId, table.agentId, table.functionToolId],
|
|
465
449
|
foreignColumns: [
|
|
@@ -497,26 +481,18 @@ var messages = sqliteTable(
|
|
|
497
481
|
{
|
|
498
482
|
...projectScoped,
|
|
499
483
|
conversationId: text("conversation_id").notNull(),
|
|
500
|
-
// Role mapping: user, agent, system (unified for both formats)
|
|
501
484
|
role: text("role").notNull(),
|
|
502
|
-
// Agent sender/recipient tracking (nullable - only populated when relevant)
|
|
503
485
|
fromSubAgentId: text("from_sub_agent_id"),
|
|
504
486
|
toSubAgentId: text("to_sub_agent_id"),
|
|
505
|
-
// External agent sender tracking
|
|
506
487
|
fromExternalAgentId: text("from_external_sub_agent_id"),
|
|
507
|
-
// External agent recipient tracking
|
|
508
488
|
toExternalAgentId: text("to_external_sub_agent_id"),
|
|
509
|
-
// Message content stored as JSON to support both formats
|
|
510
489
|
content: blob("content", { mode: "json" }).$type().notNull(),
|
|
511
|
-
// Message classification and filtering
|
|
512
490
|
visibility: text("visibility").notNull().default("user-facing"),
|
|
513
491
|
messageType: text("message_type").notNull().default("chat"),
|
|
514
492
|
taskId: text("task_id"),
|
|
515
493
|
parentMessageId: text("parent_message_id"),
|
|
516
|
-
// A2A specific fields
|
|
517
494
|
a2aTaskId: text("a2a_task_id"),
|
|
518
495
|
a2aSessionId: text("a2a_session_id"),
|
|
519
|
-
// Metadata for extensions
|
|
520
496
|
metadata: blob("metadata", { mode: "json" }).$type(),
|
|
521
497
|
...timestamps
|
|
522
498
|
},
|
|
@@ -533,17 +509,14 @@ var ledgerArtifacts = sqliteTable(
|
|
|
533
509
|
"ledger_artifacts",
|
|
534
510
|
{
|
|
535
511
|
...projectScoped,
|
|
536
|
-
// Links
|
|
537
512
|
taskId: text("task_id").notNull(),
|
|
538
513
|
toolCallId: text("tool_call_id"),
|
|
539
514
|
contextId: text("context_id").notNull(),
|
|
540
|
-
// Core Artifact fields
|
|
541
515
|
type: text("type").notNull().default("source"),
|
|
542
516
|
name: text("name"),
|
|
543
517
|
description: text("description"),
|
|
544
518
|
parts: blob("parts", { mode: "json" }).$type(),
|
|
545
519
|
metadata: blob("metadata", { mode: "json" }).$type(),
|
|
546
|
-
// Extra ledger information (not part of the Artifact spec – kept optional)
|
|
547
520
|
summary: text("summary"),
|
|
548
521
|
mime: blob("mime", { mode: "json" }).$type(),
|
|
549
522
|
visibility: text("visibility").default("context"),
|
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
// src/constants/models.ts
|
|
2
2
|
var ANTHROPIC_MODELS = {
|
|
3
|
+
CLAUDE_OPUS_4_1: "anthropic/claude-opus-4-1",
|
|
3
4
|
CLAUDE_OPUS_4_1_20250805: "anthropic/claude-opus-4-1-20250805",
|
|
5
|
+
CLAUDE_SONNET_4_5: "anthropic/claude-sonnet-4-5",
|
|
4
6
|
CLAUDE_SONNET_4_5_20250929: "anthropic/claude-sonnet-4-5-20250929",
|
|
7
|
+
CLAUDE_SONNET_4: "anthropic/claude-sonnet-4",
|
|
5
8
|
CLAUDE_SONNET_4_20250514: "anthropic/claude-sonnet-4-20250514",
|
|
9
|
+
CLAUDE_3_5_SONNET: "anthropic/claude-3-5-sonnet",
|
|
6
10
|
CLAUDE_3_5_SONNET_20241022: "anthropic/claude-3-5-sonnet-20241022",
|
|
11
|
+
CLAUDE_3_5_HAIKU: "anthropic/claude-3-5-haiku",
|
|
7
12
|
CLAUDE_3_5_HAIKU_20241022: "anthropic/claude-3-5-haiku-20241022"
|
|
8
13
|
};
|
|
9
14
|
var OPENAI_MODELS = {
|
|
15
|
+
GPT_5: "openai/gpt-5",
|
|
10
16
|
GPT_5_20250807: "openai/gpt-5-2025-08-07",
|
|
17
|
+
GPT_5_MINI: "openai/gpt-5-mini",
|
|
11
18
|
GPT_5_MINI_20250807: "openai/gpt-5-mini-2025-08-07",
|
|
19
|
+
GPT_5_NANO: "openai/gpt-5-nano",
|
|
12
20
|
GPT_5_NANO_20250807: "openai/gpt-5-nano-2025-08-07",
|
|
21
|
+
GPT_4_1: "openai/gpt-4.1",
|
|
13
22
|
GPT_4_1_20250414: "openai/gpt-4.1-2025-04-14",
|
|
23
|
+
GPT_4_1_MINI: "openai/gpt-4.1-mini",
|
|
14
24
|
GPT_4_1_MINI_20250414: "openai/gpt-4.1-mini-2025-04-14",
|
|
25
|
+
GPT_4_1_NANO: "openai/gpt-4.1-nano",
|
|
15
26
|
GPT_4_1_NANO_20250414: "openai/gpt-4.1-nano-2025-04-14"
|
|
16
27
|
};
|
|
17
28
|
var GOOGLE_MODELS = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { subAgents, subAgentRelations, agents, tasks, taskRelations, tools, conversations, messages, contextCache, dataComponents, subAgentDataComponents, artifactComponents, subAgentArtifactComponents, externalAgents, apiKeys, credentialReferences, functionTools, functions, contextConfigs, subAgentToolRelations, ledgerArtifacts, projects } from './chunk-
|
|
1
|
+
import { subAgents, subAgentRelations, agents, tasks, taskRelations, tools, conversations, messages, contextCache, dataComponents, subAgentDataComponents, artifactComponents, subAgentArtifactComponents, externalAgents, apiKeys, credentialReferences, functionTools, functions, contextConfigs, subAgentToolRelations, ledgerArtifacts, projects } from './chunk-TNHJH73I.js';
|
|
2
2
|
import { VALID_RELATION_TYPES, MCPTransportType, TOOL_STATUS_VALUES, CredentialStoreType, MCPServerType } from './chunk-YFHT5M2R.js';
|
|
3
3
|
import { z } from '@hono/zod-openapi';
|
|
4
4
|
import { createSelectSchema, createInsertSchema } from 'drizzle-zod';
|
package/dist/client-exports.cjs
CHANGED
|
@@ -58,11 +58,8 @@ var projects = sqliteCore.sqliteTable(
|
|
|
58
58
|
{
|
|
59
59
|
...tenantScoped,
|
|
60
60
|
...uiProperties,
|
|
61
|
-
// Project-level default model settings that can be inherited by agents
|
|
62
61
|
models: sqliteCore.text("models", { mode: "json" }).$type(),
|
|
63
|
-
// Project-level stopWhen configuration that can be inherited by agents
|
|
64
62
|
stopWhen: sqliteCore.text("stop_when", { mode: "json" }).$type(),
|
|
65
|
-
// Project-level sandbox configuration for function execution
|
|
66
63
|
sandboxConfig: sqliteCore.text("sandbox_config", { mode: "json" }).$type(),
|
|
67
64
|
...timestamps
|
|
68
65
|
},
|
|
@@ -95,9 +92,7 @@ var contextConfigs = sqliteCore.sqliteTable(
|
|
|
95
92
|
"context_configs",
|
|
96
93
|
{
|
|
97
94
|
...agentScoped,
|
|
98
|
-
// Developer-defined Zod schema for validating incoming request context
|
|
99
95
|
headersSchema: sqliteCore.blob("headers_schema", { mode: "json" }).$type(),
|
|
100
|
-
// Object mapping template keys to fetch definitions that use request context data
|
|
101
96
|
contextVariables: sqliteCore.blob("context_variables", { mode: "json" }).$type(),
|
|
102
97
|
...timestamps
|
|
103
98
|
},
|
|
@@ -114,15 +109,11 @@ var contextCache = sqliteCore.sqliteTable(
|
|
|
114
109
|
"context_cache",
|
|
115
110
|
{
|
|
116
111
|
...projectScoped,
|
|
117
|
-
// Always scoped to conversation for complete data isolation
|
|
118
112
|
conversationId: sqliteCore.text("conversation_id").notNull(),
|
|
119
|
-
// Reference to the context config and specific fetch definition
|
|
120
113
|
contextConfigId: sqliteCore.text("context_config_id").notNull(),
|
|
121
114
|
contextVariableKey: sqliteCore.text("context_variable_key").notNull(),
|
|
122
115
|
value: sqliteCore.blob("value", { mode: "json" }).$type().notNull(),
|
|
123
|
-
// Request hash for cache invalidation based on context changes
|
|
124
116
|
requestHash: sqliteCore.text("request_hash"),
|
|
125
|
-
// Metadata for monitoring and debugging
|
|
126
117
|
fetchedAt: sqliteCore.text("fetched_at").notNull(),
|
|
127
118
|
fetchSource: sqliteCore.text("fetch_source"),
|
|
128
119
|
fetchDurationMs: sqliteCore.integer("fetch_duration_ms"),
|
|
@@ -169,9 +160,7 @@ var subAgentRelations = sqliteCore.sqliteTable(
|
|
|
169
160
|
{
|
|
170
161
|
...agentScoped,
|
|
171
162
|
sourceSubAgentId: sqliteCore.text("source_sub_agent_id").notNull(),
|
|
172
|
-
// For internal relationships
|
|
173
163
|
targetSubAgentId: sqliteCore.text("target_sub_agent_id"),
|
|
174
|
-
// For external relationships
|
|
175
164
|
externalSubAgentId: sqliteCore.text("external_sub_agent_id"),
|
|
176
165
|
relationType: sqliteCore.text("relation_type"),
|
|
177
166
|
...timestamps
|
|
@@ -340,9 +329,7 @@ var tools = sqliteCore.sqliteTable(
|
|
|
340
329
|
config: sqliteCore.blob("config", { mode: "json" }).$type().notNull(),
|
|
341
330
|
credentialReferenceId: sqliteCore.text("credential_reference_id"),
|
|
342
331
|
headers: sqliteCore.blob("headers", { mode: "json" }).$type(),
|
|
343
|
-
// Image URL for custom tool icon (supports regular URLs and base64 encoded images)
|
|
344
332
|
imageUrl: sqliteCore.text("image_url"),
|
|
345
|
-
// Server capabilities and status (only for MCP tools)
|
|
346
333
|
capabilities: sqliteCore.blob("capabilities", { mode: "json" }).$type(),
|
|
347
334
|
lastError: sqliteCore.text("last_error"),
|
|
348
335
|
...timestamps
|
|
@@ -372,7 +359,6 @@ var functionTools = sqliteCore.sqliteTable(
|
|
|
372
359
|
foreignColumns: [agents.tenantId, agents.projectId, agents.id],
|
|
373
360
|
name: "function_tools_agent_fk"
|
|
374
361
|
}).onDelete("cascade"),
|
|
375
|
-
// Foreign key constraint to functions table
|
|
376
362
|
sqliteCore.foreignKey({
|
|
377
363
|
columns: [table.tenantId, table.projectId, table.functionId],
|
|
378
364
|
foreignColumns: [functions.tenantId, functions.projectId, functions.id],
|
|
@@ -430,13 +416,11 @@ var subAgentFunctionToolRelations = sqliteCore.sqliteTable(
|
|
|
430
416
|
},
|
|
431
417
|
(table) => [
|
|
432
418
|
sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.agentId, table.id] }),
|
|
433
|
-
// Foreign key constraint to sub_agents table
|
|
434
419
|
sqliteCore.foreignKey({
|
|
435
420
|
columns: [table.tenantId, table.projectId, table.agentId, table.subAgentId],
|
|
436
421
|
foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.agentId, subAgents.id],
|
|
437
422
|
name: "sub_agent_function_tool_relations_sub_agent_fk"
|
|
438
423
|
}).onDelete("cascade"),
|
|
439
|
-
// Foreign key constraint to functionTools table
|
|
440
424
|
sqliteCore.foreignKey({
|
|
441
425
|
columns: [table.tenantId, table.projectId, table.agentId, table.functionToolId],
|
|
442
426
|
foreignColumns: [
|
|
@@ -474,26 +458,18 @@ var messages = sqliteCore.sqliteTable(
|
|
|
474
458
|
{
|
|
475
459
|
...projectScoped,
|
|
476
460
|
conversationId: sqliteCore.text("conversation_id").notNull(),
|
|
477
|
-
// Role mapping: user, agent, system (unified for both formats)
|
|
478
461
|
role: sqliteCore.text("role").notNull(),
|
|
479
|
-
// Agent sender/recipient tracking (nullable - only populated when relevant)
|
|
480
462
|
fromSubAgentId: sqliteCore.text("from_sub_agent_id"),
|
|
481
463
|
toSubAgentId: sqliteCore.text("to_sub_agent_id"),
|
|
482
|
-
// External agent sender tracking
|
|
483
464
|
fromExternalAgentId: sqliteCore.text("from_external_sub_agent_id"),
|
|
484
|
-
// External agent recipient tracking
|
|
485
465
|
toExternalAgentId: sqliteCore.text("to_external_sub_agent_id"),
|
|
486
|
-
// Message content stored as JSON to support both formats
|
|
487
466
|
content: sqliteCore.blob("content", { mode: "json" }).$type().notNull(),
|
|
488
|
-
// Message classification and filtering
|
|
489
467
|
visibility: sqliteCore.text("visibility").notNull().default("user-facing"),
|
|
490
468
|
messageType: sqliteCore.text("message_type").notNull().default("chat"),
|
|
491
469
|
taskId: sqliteCore.text("task_id"),
|
|
492
470
|
parentMessageId: sqliteCore.text("parent_message_id"),
|
|
493
|
-
// A2A specific fields
|
|
494
471
|
a2aTaskId: sqliteCore.text("a2a_task_id"),
|
|
495
472
|
a2aSessionId: sqliteCore.text("a2a_session_id"),
|
|
496
|
-
// Metadata for extensions
|
|
497
473
|
metadata: sqliteCore.blob("metadata", { mode: "json" }).$type(),
|
|
498
474
|
...timestamps
|
|
499
475
|
},
|
|
@@ -510,17 +486,14 @@ var ledgerArtifacts = sqliteCore.sqliteTable(
|
|
|
510
486
|
"ledger_artifacts",
|
|
511
487
|
{
|
|
512
488
|
...projectScoped,
|
|
513
|
-
// Links
|
|
514
489
|
taskId: sqliteCore.text("task_id").notNull(),
|
|
515
490
|
toolCallId: sqliteCore.text("tool_call_id"),
|
|
516
491
|
contextId: sqliteCore.text("context_id").notNull(),
|
|
517
|
-
// Core Artifact fields
|
|
518
492
|
type: sqliteCore.text("type").notNull().default("source"),
|
|
519
493
|
name: sqliteCore.text("name"),
|
|
520
494
|
description: sqliteCore.text("description"),
|
|
521
495
|
parts: sqliteCore.blob("parts", { mode: "json" }).$type(),
|
|
522
496
|
metadata: sqliteCore.blob("metadata", { mode: "json" }).$type(),
|
|
523
|
-
// Extra ledger information (not part of the Artifact spec – kept optional)
|
|
524
497
|
summary: sqliteCore.text("summary"),
|
|
525
498
|
mime: sqliteCore.blob("mime", { mode: "json" }).$type(),
|
|
526
499
|
visibility: sqliteCore.text("visibility").default("context"),
|
package/dist/client-exports.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
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-QFIITHNT.js';
|
|
2
|
-
import { ModelSettingsSchema, FullAgentAgentInsertSchema, ArtifactComponentApiInsertSchema } from './chunk-
|
|
3
|
-
export { AgentStopWhenSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettingsSchema, SandboxConfigSchema, StopWhenSchema, SubAgentStopWhenSchema, validatePropsAsJsonSchema } from './chunk-
|
|
2
|
+
import { ModelSettingsSchema, FullAgentAgentInsertSchema, ArtifactComponentApiInsertSchema } from './chunk-XKJPMUGE.js';
|
|
3
|
+
export { AgentStopWhenSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettingsSchema, SandboxConfigSchema, StopWhenSchema, SubAgentStopWhenSchema, validatePropsAsJsonSchema } from './chunk-XKJPMUGE.js';
|
|
4
4
|
import { CredentialStoreType } from './chunk-YFHT5M2R.js';
|
|
5
5
|
export { CredentialStoreType, MCPTransportType } from './chunk-YFHT5M2R.js';
|
|
6
6
|
import { z } from 'zod';
|
|
@@ -2,18 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
// src/constants/models.ts
|
|
4
4
|
var ANTHROPIC_MODELS = {
|
|
5
|
+
CLAUDE_OPUS_4_1: "anthropic/claude-opus-4-1",
|
|
5
6
|
CLAUDE_OPUS_4_1_20250805: "anthropic/claude-opus-4-1-20250805",
|
|
7
|
+
CLAUDE_SONNET_4_5: "anthropic/claude-sonnet-4-5",
|
|
6
8
|
CLAUDE_SONNET_4_5_20250929: "anthropic/claude-sonnet-4-5-20250929",
|
|
9
|
+
CLAUDE_SONNET_4: "anthropic/claude-sonnet-4",
|
|
7
10
|
CLAUDE_SONNET_4_20250514: "anthropic/claude-sonnet-4-20250514",
|
|
11
|
+
CLAUDE_3_5_SONNET: "anthropic/claude-3-5-sonnet",
|
|
8
12
|
CLAUDE_3_5_SONNET_20241022: "anthropic/claude-3-5-sonnet-20241022",
|
|
13
|
+
CLAUDE_3_5_HAIKU: "anthropic/claude-3-5-haiku",
|
|
9
14
|
CLAUDE_3_5_HAIKU_20241022: "anthropic/claude-3-5-haiku-20241022"
|
|
10
15
|
};
|
|
11
16
|
var OPENAI_MODELS = {
|
|
17
|
+
GPT_5: "openai/gpt-5",
|
|
12
18
|
GPT_5_20250807: "openai/gpt-5-2025-08-07",
|
|
19
|
+
GPT_5_MINI: "openai/gpt-5-mini",
|
|
13
20
|
GPT_5_MINI_20250807: "openai/gpt-5-mini-2025-08-07",
|
|
21
|
+
GPT_5_NANO: "openai/gpt-5-nano",
|
|
14
22
|
GPT_5_NANO_20250807: "openai/gpt-5-nano-2025-08-07",
|
|
23
|
+
GPT_4_1: "openai/gpt-4.1",
|
|
15
24
|
GPT_4_1_20250414: "openai/gpt-4.1-2025-04-14",
|
|
25
|
+
GPT_4_1_MINI: "openai/gpt-4.1-mini",
|
|
16
26
|
GPT_4_1_MINI_20250414: "openai/gpt-4.1-mini-2025-04-14",
|
|
27
|
+
GPT_4_1_NANO: "openai/gpt-4.1-nano",
|
|
17
28
|
GPT_4_1_NANO_20250414: "openai/gpt-4.1-nano-2025-04-14"
|
|
18
29
|
};
|
|
19
30
|
var GOOGLE_MODELS = {
|
|
@@ -2,18 +2,29 @@
|
|
|
2
2
|
* Model name constants used throughout the Inkeep Agents SDK
|
|
3
3
|
*/
|
|
4
4
|
declare const ANTHROPIC_MODELS: {
|
|
5
|
+
readonly CLAUDE_OPUS_4_1: "anthropic/claude-opus-4-1";
|
|
5
6
|
readonly CLAUDE_OPUS_4_1_20250805: "anthropic/claude-opus-4-1-20250805";
|
|
7
|
+
readonly CLAUDE_SONNET_4_5: "anthropic/claude-sonnet-4-5";
|
|
6
8
|
readonly CLAUDE_SONNET_4_5_20250929: "anthropic/claude-sonnet-4-5-20250929";
|
|
9
|
+
readonly CLAUDE_SONNET_4: "anthropic/claude-sonnet-4";
|
|
7
10
|
readonly CLAUDE_SONNET_4_20250514: "anthropic/claude-sonnet-4-20250514";
|
|
11
|
+
readonly CLAUDE_3_5_SONNET: "anthropic/claude-3-5-sonnet";
|
|
8
12
|
readonly CLAUDE_3_5_SONNET_20241022: "anthropic/claude-3-5-sonnet-20241022";
|
|
13
|
+
readonly CLAUDE_3_5_HAIKU: "anthropic/claude-3-5-haiku";
|
|
9
14
|
readonly CLAUDE_3_5_HAIKU_20241022: "anthropic/claude-3-5-haiku-20241022";
|
|
10
15
|
};
|
|
11
16
|
declare const OPENAI_MODELS: {
|
|
17
|
+
readonly GPT_5: "openai/gpt-5";
|
|
12
18
|
readonly GPT_5_20250807: "openai/gpt-5-2025-08-07";
|
|
19
|
+
readonly GPT_5_MINI: "openai/gpt-5-mini";
|
|
13
20
|
readonly GPT_5_MINI_20250807: "openai/gpt-5-mini-2025-08-07";
|
|
21
|
+
readonly GPT_5_NANO: "openai/gpt-5-nano";
|
|
14
22
|
readonly GPT_5_NANO_20250807: "openai/gpt-5-nano-2025-08-07";
|
|
23
|
+
readonly GPT_4_1: "openai/gpt-4.1";
|
|
15
24
|
readonly GPT_4_1_20250414: "openai/gpt-4.1-2025-04-14";
|
|
25
|
+
readonly GPT_4_1_MINI: "openai/gpt-4.1-mini";
|
|
16
26
|
readonly GPT_4_1_MINI_20250414: "openai/gpt-4.1-mini-2025-04-14";
|
|
27
|
+
readonly GPT_4_1_NANO: "openai/gpt-4.1-nano";
|
|
17
28
|
readonly GPT_4_1_NANO_20250414: "openai/gpt-4.1-nano-2025-04-14";
|
|
18
29
|
};
|
|
19
30
|
declare const GOOGLE_MODELS: {
|
|
@@ -2,18 +2,29 @@
|
|
|
2
2
|
* Model name constants used throughout the Inkeep Agents SDK
|
|
3
3
|
*/
|
|
4
4
|
declare const ANTHROPIC_MODELS: {
|
|
5
|
+
readonly CLAUDE_OPUS_4_1: "anthropic/claude-opus-4-1";
|
|
5
6
|
readonly CLAUDE_OPUS_4_1_20250805: "anthropic/claude-opus-4-1-20250805";
|
|
7
|
+
readonly CLAUDE_SONNET_4_5: "anthropic/claude-sonnet-4-5";
|
|
6
8
|
readonly CLAUDE_SONNET_4_5_20250929: "anthropic/claude-sonnet-4-5-20250929";
|
|
9
|
+
readonly CLAUDE_SONNET_4: "anthropic/claude-sonnet-4";
|
|
7
10
|
readonly CLAUDE_SONNET_4_20250514: "anthropic/claude-sonnet-4-20250514";
|
|
11
|
+
readonly CLAUDE_3_5_SONNET: "anthropic/claude-3-5-sonnet";
|
|
8
12
|
readonly CLAUDE_3_5_SONNET_20241022: "anthropic/claude-3-5-sonnet-20241022";
|
|
13
|
+
readonly CLAUDE_3_5_HAIKU: "anthropic/claude-3-5-haiku";
|
|
9
14
|
readonly CLAUDE_3_5_HAIKU_20241022: "anthropic/claude-3-5-haiku-20241022";
|
|
10
15
|
};
|
|
11
16
|
declare const OPENAI_MODELS: {
|
|
17
|
+
readonly GPT_5: "openai/gpt-5";
|
|
12
18
|
readonly GPT_5_20250807: "openai/gpt-5-2025-08-07";
|
|
19
|
+
readonly GPT_5_MINI: "openai/gpt-5-mini";
|
|
13
20
|
readonly GPT_5_MINI_20250807: "openai/gpt-5-mini-2025-08-07";
|
|
21
|
+
readonly GPT_5_NANO: "openai/gpt-5-nano";
|
|
14
22
|
readonly GPT_5_NANO_20250807: "openai/gpt-5-nano-2025-08-07";
|
|
23
|
+
readonly GPT_4_1: "openai/gpt-4.1";
|
|
15
24
|
readonly GPT_4_1_20250414: "openai/gpt-4.1-2025-04-14";
|
|
25
|
+
readonly GPT_4_1_MINI: "openai/gpt-4.1-mini";
|
|
16
26
|
readonly GPT_4_1_MINI_20250414: "openai/gpt-4.1-mini-2025-04-14";
|
|
27
|
+
readonly GPT_4_1_NANO: "openai/gpt-4.1-nano";
|
|
17
28
|
readonly GPT_4_1_NANO_20250414: "openai/gpt-4.1-nano-2025-04-14";
|
|
18
29
|
};
|
|
19
30
|
declare const GOOGLE_MODELS: {
|
package/dist/constants/models.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ANTHROPIC_MODELS, GOOGLE_MODELS, OPENAI_MODELS } from '../chunk-
|
|
1
|
+
export { ANTHROPIC_MODELS, GOOGLE_MODELS, OPENAI_MODELS } from '../chunk-TTIPV5QP.js';
|
package/dist/db/schema.cjs
CHANGED
|
@@ -33,11 +33,8 @@ var projects = sqliteCore.sqliteTable(
|
|
|
33
33
|
{
|
|
34
34
|
...tenantScoped,
|
|
35
35
|
...uiProperties,
|
|
36
|
-
// Project-level default model settings that can be inherited by agents
|
|
37
36
|
models: sqliteCore.text("models", { mode: "json" }).$type(),
|
|
38
|
-
// Project-level stopWhen configuration that can be inherited by agents
|
|
39
37
|
stopWhen: sqliteCore.text("stop_when", { mode: "json" }).$type(),
|
|
40
|
-
// Project-level sandbox configuration for function execution
|
|
41
38
|
sandboxConfig: sqliteCore.text("sandbox_config", { mode: "json" }).$type(),
|
|
42
39
|
...timestamps
|
|
43
40
|
},
|
|
@@ -70,9 +67,7 @@ var contextConfigs = sqliteCore.sqliteTable(
|
|
|
70
67
|
"context_configs",
|
|
71
68
|
{
|
|
72
69
|
...agentScoped,
|
|
73
|
-
// Developer-defined Zod schema for validating incoming request context
|
|
74
70
|
headersSchema: sqliteCore.blob("headers_schema", { mode: "json" }).$type(),
|
|
75
|
-
// Object mapping template keys to fetch definitions that use request context data
|
|
76
71
|
contextVariables: sqliteCore.blob("context_variables", { mode: "json" }).$type(),
|
|
77
72
|
...timestamps
|
|
78
73
|
},
|
|
@@ -89,15 +84,11 @@ var contextCache = sqliteCore.sqliteTable(
|
|
|
89
84
|
"context_cache",
|
|
90
85
|
{
|
|
91
86
|
...projectScoped,
|
|
92
|
-
// Always scoped to conversation for complete data isolation
|
|
93
87
|
conversationId: sqliteCore.text("conversation_id").notNull(),
|
|
94
|
-
// Reference to the context config and specific fetch definition
|
|
95
88
|
contextConfigId: sqliteCore.text("context_config_id").notNull(),
|
|
96
89
|
contextVariableKey: sqliteCore.text("context_variable_key").notNull(),
|
|
97
90
|
value: sqliteCore.blob("value", { mode: "json" }).$type().notNull(),
|
|
98
|
-
// Request hash for cache invalidation based on context changes
|
|
99
91
|
requestHash: sqliteCore.text("request_hash"),
|
|
100
|
-
// Metadata for monitoring and debugging
|
|
101
92
|
fetchedAt: sqliteCore.text("fetched_at").notNull(),
|
|
102
93
|
fetchSource: sqliteCore.text("fetch_source"),
|
|
103
94
|
fetchDurationMs: sqliteCore.integer("fetch_duration_ms"),
|
|
@@ -144,9 +135,7 @@ var subAgentRelations = sqliteCore.sqliteTable(
|
|
|
144
135
|
{
|
|
145
136
|
...agentScoped,
|
|
146
137
|
sourceSubAgentId: sqliteCore.text("source_sub_agent_id").notNull(),
|
|
147
|
-
// For internal relationships
|
|
148
138
|
targetSubAgentId: sqliteCore.text("target_sub_agent_id"),
|
|
149
|
-
// For external relationships
|
|
150
139
|
externalSubAgentId: sqliteCore.text("external_sub_agent_id"),
|
|
151
140
|
relationType: sqliteCore.text("relation_type"),
|
|
152
141
|
...timestamps
|
|
@@ -315,9 +304,7 @@ var tools = sqliteCore.sqliteTable(
|
|
|
315
304
|
config: sqliteCore.blob("config", { mode: "json" }).$type().notNull(),
|
|
316
305
|
credentialReferenceId: sqliteCore.text("credential_reference_id"),
|
|
317
306
|
headers: sqliteCore.blob("headers", { mode: "json" }).$type(),
|
|
318
|
-
// Image URL for custom tool icon (supports regular URLs and base64 encoded images)
|
|
319
307
|
imageUrl: sqliteCore.text("image_url"),
|
|
320
|
-
// Server capabilities and status (only for MCP tools)
|
|
321
308
|
capabilities: sqliteCore.blob("capabilities", { mode: "json" }).$type(),
|
|
322
309
|
lastError: sqliteCore.text("last_error"),
|
|
323
310
|
...timestamps
|
|
@@ -347,7 +334,6 @@ var functionTools = sqliteCore.sqliteTable(
|
|
|
347
334
|
foreignColumns: [agents.tenantId, agents.projectId, agents.id],
|
|
348
335
|
name: "function_tools_agent_fk"
|
|
349
336
|
}).onDelete("cascade"),
|
|
350
|
-
// Foreign key constraint to functions table
|
|
351
337
|
sqliteCore.foreignKey({
|
|
352
338
|
columns: [table.tenantId, table.projectId, table.functionId],
|
|
353
339
|
foreignColumns: [functions.tenantId, functions.projectId, functions.id],
|
|
@@ -405,13 +391,11 @@ var subAgentFunctionToolRelations = sqliteCore.sqliteTable(
|
|
|
405
391
|
},
|
|
406
392
|
(table) => [
|
|
407
393
|
sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.agentId, table.id] }),
|
|
408
|
-
// Foreign key constraint to sub_agents table
|
|
409
394
|
sqliteCore.foreignKey({
|
|
410
395
|
columns: [table.tenantId, table.projectId, table.agentId, table.subAgentId],
|
|
411
396
|
foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.agentId, subAgents.id],
|
|
412
397
|
name: "sub_agent_function_tool_relations_sub_agent_fk"
|
|
413
398
|
}).onDelete("cascade"),
|
|
414
|
-
// Foreign key constraint to functionTools table
|
|
415
399
|
sqliteCore.foreignKey({
|
|
416
400
|
columns: [table.tenantId, table.projectId, table.agentId, table.functionToolId],
|
|
417
401
|
foreignColumns: [
|
|
@@ -449,26 +433,18 @@ var messages = sqliteCore.sqliteTable(
|
|
|
449
433
|
{
|
|
450
434
|
...projectScoped,
|
|
451
435
|
conversationId: sqliteCore.text("conversation_id").notNull(),
|
|
452
|
-
// Role mapping: user, agent, system (unified for both formats)
|
|
453
436
|
role: sqliteCore.text("role").notNull(),
|
|
454
|
-
// Agent sender/recipient tracking (nullable - only populated when relevant)
|
|
455
437
|
fromSubAgentId: sqliteCore.text("from_sub_agent_id"),
|
|
456
438
|
toSubAgentId: sqliteCore.text("to_sub_agent_id"),
|
|
457
|
-
// External agent sender tracking
|
|
458
439
|
fromExternalAgentId: sqliteCore.text("from_external_sub_agent_id"),
|
|
459
|
-
// External agent recipient tracking
|
|
460
440
|
toExternalAgentId: sqliteCore.text("to_external_sub_agent_id"),
|
|
461
|
-
// Message content stored as JSON to support both formats
|
|
462
441
|
content: sqliteCore.blob("content", { mode: "json" }).$type().notNull(),
|
|
463
|
-
// Message classification and filtering
|
|
464
442
|
visibility: sqliteCore.text("visibility").notNull().default("user-facing"),
|
|
465
443
|
messageType: sqliteCore.text("message_type").notNull().default("chat"),
|
|
466
444
|
taskId: sqliteCore.text("task_id"),
|
|
467
445
|
parentMessageId: sqliteCore.text("parent_message_id"),
|
|
468
|
-
// A2A specific fields
|
|
469
446
|
a2aTaskId: sqliteCore.text("a2a_task_id"),
|
|
470
447
|
a2aSessionId: sqliteCore.text("a2a_session_id"),
|
|
471
|
-
// Metadata for extensions
|
|
472
448
|
metadata: sqliteCore.blob("metadata", { mode: "json" }).$type(),
|
|
473
449
|
...timestamps
|
|
474
450
|
},
|
|
@@ -485,17 +461,14 @@ var ledgerArtifacts = sqliteCore.sqliteTable(
|
|
|
485
461
|
"ledger_artifacts",
|
|
486
462
|
{
|
|
487
463
|
...projectScoped,
|
|
488
|
-
// Links
|
|
489
464
|
taskId: sqliteCore.text("task_id").notNull(),
|
|
490
465
|
toolCallId: sqliteCore.text("tool_call_id"),
|
|
491
466
|
contextId: sqliteCore.text("context_id").notNull(),
|
|
492
|
-
// Core Artifact fields
|
|
493
467
|
type: sqliteCore.text("type").notNull().default("source"),
|
|
494
468
|
name: sqliteCore.text("name"),
|
|
495
469
|
description: sqliteCore.text("description"),
|
|
496
470
|
parts: sqliteCore.blob("parts", { mode: "json" }).$type(),
|
|
497
471
|
metadata: sqliteCore.blob("metadata", { mode: "json" }).$type(),
|
|
498
|
-
// Extra ledger information (not part of the Artifact spec – kept optional)
|
|
499
472
|
summary: sqliteCore.text("summary"),
|
|
500
473
|
mime: sqliteCore.blob("mime", { mode: "json" }).$type(),
|
|
501
474
|
visibility: sqliteCore.text("visibility").default("context"),
|
package/dist/db/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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, subAgentFunctionToolRelations, subAgentFunctionToolRelationsRelations, subAgentRelations, subAgentRelationsRelations, subAgentToolRelations, subAgents, subAgentsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations } from '../chunk-
|
|
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, subAgentFunctionToolRelations, subAgentFunctionToolRelationsRelations, subAgentRelations, subAgentRelationsRelations, subAgentToolRelations, subAgents, subAgentsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations } from '../chunk-TNHJH73I.js';
|