@inkeep/agents-cli 0.0.0-dev-20251009192735 → 0.0.0-dev-20251009215610

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 (3) hide show
  1. package/README.md +2 -2
  2. package/dist/index.js +349 -264
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -322,7 +322,7 @@ const assistantAgent = agent({
322
322
  export const graph = agentGraph({
323
323
  id: "my-assistant",
324
324
  name: "My Assistant Graph",
325
- defaultAgent: assistantAgent,
325
+ defaultSubAgent: assistantAgent,
326
326
  agents: {
327
327
  assistant: assistantAgent,
328
328
  },
@@ -498,7 +498,7 @@ const assistantAgent = agent({
498
498
  export const graph = agentGraph({
499
499
  id: "my-assistant",
500
500
  name: "My Assistant",
501
- defaultAgent: assistantAgent,
501
+ defaultSubAgent: assistantAgent,
502
502
  agents: { assistant: assistantAgent },
503
503
  });
504
504
 
package/dist/index.js CHANGED
@@ -66,6 +66,78 @@ var init_base_client = __esm({
66
66
  }
67
67
  });
68
68
 
69
+ // ../packages/agents-core/src/constants/otel-attributes.ts
70
+ var init_otel_attributes = __esm({
71
+ "../packages/agents-core/src/constants/otel-attributes.ts"() {
72
+ "use strict";
73
+ init_esm_shims();
74
+ }
75
+ });
76
+
77
+ // ../packages/agents-core/src/constants/signoz-queries.ts
78
+ var DATA_TYPES, FIELD_TYPES, QUERY_FIELD_CONFIGS;
79
+ var init_signoz_queries = __esm({
80
+ "../packages/agents-core/src/constants/signoz-queries.ts"() {
81
+ "use strict";
82
+ init_esm_shims();
83
+ DATA_TYPES = {
84
+ STRING: "string",
85
+ INT64: "int64",
86
+ FLOAT64: "float64",
87
+ BOOL: "bool"
88
+ };
89
+ FIELD_TYPES = {
90
+ TAG: "tag",
91
+ RESOURCE: "resource"
92
+ };
93
+ QUERY_FIELD_CONFIGS = {
94
+ // String tag fields
95
+ STRING_TAG: {
96
+ dataType: DATA_TYPES.STRING,
97
+ type: FIELD_TYPES.TAG,
98
+ isColumn: false
99
+ },
100
+ STRING_TAG_COLUMN: {
101
+ dataType: DATA_TYPES.STRING,
102
+ type: FIELD_TYPES.TAG,
103
+ isColumn: true
104
+ },
105
+ // Numeric tag fields
106
+ INT64_TAG: {
107
+ dataType: DATA_TYPES.INT64,
108
+ type: FIELD_TYPES.TAG,
109
+ isColumn: false
110
+ },
111
+ INT64_TAG_COLUMN: {
112
+ dataType: DATA_TYPES.INT64,
113
+ type: FIELD_TYPES.TAG,
114
+ isColumn: true
115
+ },
116
+ FLOAT64_TAG: {
117
+ dataType: DATA_TYPES.FLOAT64,
118
+ type: FIELD_TYPES.TAG,
119
+ isColumn: false
120
+ },
121
+ FLOAT64_TAG_COLUMN: {
122
+ dataType: DATA_TYPES.FLOAT64,
123
+ type: FIELD_TYPES.TAG,
124
+ isColumn: true
125
+ },
126
+ // Boolean tag fields
127
+ BOOL_TAG: {
128
+ dataType: DATA_TYPES.BOOL,
129
+ type: FIELD_TYPES.TAG,
130
+ isColumn: false
131
+ },
132
+ BOOL_TAG_COLUMN: {
133
+ dataType: DATA_TYPES.BOOL,
134
+ type: FIELD_TYPES.TAG,
135
+ isColumn: true
136
+ }
137
+ };
138
+ }
139
+ });
140
+
69
141
  // ../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.js
70
142
  import { webcrypto as crypto2 } from "crypto";
71
143
  function fillPool(bytes) {
@@ -1242,7 +1314,7 @@ function columnToSchema(column, factory) {
1242
1314
  }
1243
1315
  return schema;
1244
1316
  }
1245
- function numberColumnToSchema(column, z12, coerce) {
1317
+ function numberColumnToSchema(column, z13, coerce) {
1246
1318
  let unsigned = column.getSQLType().includes("unsigned");
1247
1319
  let min;
1248
1320
  let max;
@@ -1310,20 +1382,20 @@ function numberColumnToSchema(column, z12, coerce) {
1310
1382
  min = Number.MIN_SAFE_INTEGER;
1311
1383
  max = Number.MAX_SAFE_INTEGER;
1312
1384
  }
1313
- let schema = coerce === true || coerce?.number ? integer2 ? z12.coerce.number() : z12.coerce.number().int() : integer2 ? z12.int() : z12.number();
1385
+ let schema = coerce === true || coerce?.number ? integer2 ? z13.coerce.number() : z13.coerce.number().int() : integer2 ? z13.int() : z13.number();
1314
1386
  schema = schema.gte(min).lte(max);
1315
1387
  return schema;
1316
1388
  }
1317
- function bigintColumnToSchema(column, z12, coerce) {
1389
+ function bigintColumnToSchema(column, z13, coerce) {
1318
1390
  const unsigned = column.getSQLType().includes("unsigned");
1319
1391
  const min = unsigned ? 0n : CONSTANTS.INT64_MIN;
1320
1392
  const max = unsigned ? CONSTANTS.INT64_UNSIGNED_MAX : CONSTANTS.INT64_MAX;
1321
- const schema = coerce === true || coerce?.bigint ? z12.coerce.bigint() : z12.bigint();
1393
+ const schema = coerce === true || coerce?.bigint ? z13.coerce.bigint() : z13.bigint();
1322
1394
  return schema.gte(min).lte(max);
1323
1395
  }
1324
- function stringColumnToSchema(column, z12, coerce) {
1396
+ function stringColumnToSchema(column, z13, coerce) {
1325
1397
  if (isColumnType(column, ["PgUUID"])) {
1326
- return z12.uuid();
1398
+ return z13.uuid();
1327
1399
  }
1328
1400
  let max;
1329
1401
  let regex;
@@ -1355,7 +1427,7 @@ function stringColumnToSchema(column, z12, coerce) {
1355
1427
  regex = /^[01]+$/;
1356
1428
  max = column.dimensions;
1357
1429
  }
1358
- let schema = coerce === true || coerce?.string ? z12.coerce.string() : z12.string();
1430
+ let schema = coerce === true || coerce?.string ? z13.coerce.string() : z13.string();
1359
1431
  schema = regex ? schema.regex(regex) : schema;
1360
1432
  return max && fixed ? schema.length(max) : max ? schema.max(max) : schema;
1361
1433
  }
@@ -1467,7 +1539,7 @@ import {
1467
1539
  text,
1468
1540
  unique
1469
1541
  } from "drizzle-orm/sqlite-core";
1470
- var tenantScoped, projectScoped, graphScoped, agentScoped, uiProperties, timestamps, projects, agentGraph, contextConfigs, contextCache, agents, agentRelations, externalAgents, tasks, taskRelations, dataComponents, agentDataComponents, artifactComponents, agentArtifactComponents, tools, functions, agentToolRelations, conversations, messages, ledgerArtifacts, apiKeys, credentialReferences, tasksRelations, projectsRelations, taskRelationsRelations, contextConfigsRelations, contextCacheRelations, agentsRelations, agentGraphRelations, externalAgentsRelations, apiKeysRelations, agentToolRelationsRelations, credentialReferencesRelations, toolsRelations, conversationsRelations, messagesRelations, artifactComponentsRelations, agentArtifactComponentsRelations, dataComponentsRelations, agentDataComponentsRelations, ledgerArtifactsRelations, functionsRelations, agentRelationsRelations;
1542
+ var tenantScoped, projectScoped, graphScoped, subAgentScoped, uiProperties, timestamps, projects, agentGraph, contextConfigs, contextCache, subAgents, subAgentRelations, externalAgents, tasks, taskRelations, dataComponents, subAgentDataComponents, artifactComponents, subAgentArtifactComponents, tools, functions, subAgentToolRelations, conversations, messages, ledgerArtifacts, apiKeys, credentialReferences, tasksRelations, projectsRelations, taskRelationsRelations, contextConfigsRelations, contextCacheRelations, subAgentsRelations, agentGraphRelations, externalAgentsRelations, apiKeysRelations, agentToolRelationsRelations, credentialReferencesRelations, toolsRelations, conversationsRelations, messagesRelations, artifactComponentsRelations, subAgentArtifactComponentsRelations, dataComponentsRelations, subAgentDataComponentsRelations, ledgerArtifactsRelations, functionsRelations, subAgentRelationsRelations;
1471
1543
  var init_schema = __esm({
1472
1544
  "../packages/agents-core/src/db/schema.ts"() {
1473
1545
  "use strict";
@@ -1484,9 +1556,9 @@ var init_schema = __esm({
1484
1556
  ...projectScoped,
1485
1557
  graphId: text("graph_id").notNull()
1486
1558
  };
1487
- agentScoped = {
1559
+ subAgentScoped = {
1488
1560
  ...graphScoped,
1489
- agentId: text("agent_id").notNull()
1561
+ subAgentId: text("sub_agent_id").notNull()
1490
1562
  };
1491
1563
  uiProperties = {
1492
1564
  name: text("name").notNull(),
@@ -1517,7 +1589,7 @@ var init_schema = __esm({
1517
1589
  ...projectScoped,
1518
1590
  name: text("name").notNull(),
1519
1591
  description: text("description"),
1520
- defaultAgentId: text("default_agent_id"),
1592
+ defaultSubAgentId: text("default_sub_agent_id"),
1521
1593
  // Reference to shared context configuration for all agents in this graph
1522
1594
  contextConfigId: text("context_config_id"),
1523
1595
  // add fk relationship
@@ -1596,8 +1668,8 @@ var init_schema = __esm({
1596
1668
  )
1597
1669
  ]
1598
1670
  );
1599
- agents = sqliteTable(
1600
- "agents",
1671
+ subAgents = sqliteTable(
1672
+ "sub_agents",
1601
1673
  {
1602
1674
  ...graphScoped,
1603
1675
  ...uiProperties,
@@ -1619,17 +1691,16 @@ var init_schema = __esm({
1619
1691
  }).onDelete("cascade")
1620
1692
  ]
1621
1693
  );
1622
- agentRelations = sqliteTable(
1623
- "agent_relations",
1694
+ subAgentRelations = sqliteTable(
1695
+ "sub_agent_relations",
1624
1696
  {
1625
1697
  ...graphScoped,
1626
- sourceAgentId: text("source_agent_id").notNull(),
1698
+ sourceSubAgentId: text("source_sub_agent_id").notNull(),
1627
1699
  // For internal relationships
1628
- targetAgentId: text("target_agent_id"),
1700
+ targetSubAgentId: text("target_sub_agent_id"),
1629
1701
  // For external relationships
1630
- externalAgentId: text("external_agent_id"),
1702
+ externalSubAgentId: text("external_sub_agent_id"),
1631
1703
  relationType: text("relation_type"),
1632
- // 'transfer' | 'delegate'
1633
1704
  ...timestamps
1634
1705
  },
1635
1706
  (table) => [
@@ -1637,7 +1708,7 @@ var init_schema = __esm({
1637
1708
  foreignKey({
1638
1709
  columns: [table.tenantId, table.projectId, table.graphId],
1639
1710
  foreignColumns: [agentGraph.tenantId, agentGraph.projectId, agentGraph.id],
1640
- name: "agent_relations_graph_fk"
1711
+ name: "sub_agent_relations_graph_fk"
1641
1712
  }).onDelete("cascade")
1642
1713
  ]
1643
1714
  );
@@ -1673,7 +1744,7 @@ var init_schema = __esm({
1673
1744
  tasks = sqliteTable(
1674
1745
  "tasks",
1675
1746
  {
1676
- ...agentScoped,
1747
+ ...subAgentScoped,
1677
1748
  contextId: text("context_id").notNull(),
1678
1749
  status: text("status").notNull(),
1679
1750
  metadata: blob("metadata", { mode: "json" }).$type(),
@@ -1682,9 +1753,9 @@ var init_schema = __esm({
1682
1753
  (table) => [
1683
1754
  primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
1684
1755
  foreignKey({
1685
- columns: [table.tenantId, table.projectId, table.graphId, table.agentId],
1686
- foreignColumns: [agents.tenantId, agents.projectId, agents.graphId, agents.id],
1687
- name: "tasks_agent_fk"
1756
+ columns: [table.tenantId, table.projectId, table.graphId, table.subAgentId],
1757
+ foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.graphId, subAgents.id],
1758
+ name: "tasks_sub_agent_fk"
1688
1759
  }).onDelete("cascade")
1689
1760
  ]
1690
1761
  );
@@ -1724,10 +1795,10 @@ var init_schema = __esm({
1724
1795
  }).onDelete("cascade")
1725
1796
  ]
1726
1797
  );
1727
- agentDataComponents = sqliteTable(
1728
- "agent_data_components",
1798
+ subAgentDataComponents = sqliteTable(
1799
+ "sub_agent_data_components",
1729
1800
  {
1730
- ...agentScoped,
1801
+ ...subAgentScoped,
1731
1802
  dataComponentId: text("data_component_id").notNull(),
1732
1803
  createdAt: text("created_at").notNull().default(sql`CURRENT_TIMESTAMP`)
1733
1804
  },
@@ -1735,15 +1806,15 @@ var init_schema = __esm({
1735
1806
  primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
1736
1807
  // Foreign key constraint to agents table (ensures graph and project exist via cascade)
1737
1808
  foreignKey({
1738
- columns: [table.tenantId, table.projectId, table.graphId, table.agentId],
1739
- foreignColumns: [agents.tenantId, agents.projectId, agents.graphId, agents.id],
1740
- name: "agent_data_components_agent_fk"
1809
+ columns: [table.tenantId, table.projectId, table.graphId, table.subAgentId],
1810
+ foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.graphId, subAgents.id],
1811
+ name: "sub_agent_data_components_sub_agent_fk"
1741
1812
  }).onDelete("cascade"),
1742
1813
  // Foreign key constraint to data_components table
1743
1814
  foreignKey({
1744
1815
  columns: [table.tenantId, table.projectId, table.dataComponentId],
1745
1816
  foreignColumns: [dataComponents.tenantId, dataComponents.projectId, dataComponents.id],
1746
- name: "agent_data_components_data_component_fk"
1817
+ name: "sub_agent_data_components_data_component_fk"
1747
1818
  }).onDelete("cascade")
1748
1819
  ]
1749
1820
  );
@@ -1764,22 +1835,22 @@ var init_schema = __esm({
1764
1835
  }).onDelete("cascade")
1765
1836
  ]
1766
1837
  );
1767
- agentArtifactComponents = sqliteTable(
1768
- "agent_artifact_components",
1838
+ subAgentArtifactComponents = sqliteTable(
1839
+ "sub_agent_artifact_components",
1769
1840
  {
1770
- ...agentScoped,
1841
+ ...subAgentScoped,
1771
1842
  artifactComponentId: text("artifact_component_id").notNull(),
1772
1843
  createdAt: text("created_at").notNull().default(sql`CURRENT_TIMESTAMP`)
1773
1844
  },
1774
1845
  (table) => [
1775
1846
  primaryKey({
1776
- columns: [table.tenantId, table.projectId, table.graphId, table.agentId, table.id]
1847
+ columns: [table.tenantId, table.projectId, table.graphId, table.subAgentId, table.id]
1777
1848
  }),
1778
1849
  // Foreign key constraint to agents table (ensures graph and project exist via cascade)
1779
1850
  foreignKey({
1780
- columns: [table.tenantId, table.projectId, table.graphId, table.agentId],
1781
- foreignColumns: [agents.tenantId, agents.projectId, agents.graphId, agents.id],
1782
- name: "agent_artifact_components_agent_fk"
1851
+ columns: [table.tenantId, table.projectId, table.graphId, table.subAgentId],
1852
+ foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.graphId, subAgents.id],
1853
+ name: "sub_agent_artifact_components_sub_agent_fk"
1783
1854
  }).onDelete("cascade"),
1784
1855
  // Foreign key constraint to artifact_components table
1785
1856
  foreignKey({
@@ -1789,7 +1860,7 @@ var init_schema = __esm({
1789
1860
  artifactComponents.projectId,
1790
1861
  artifactComponents.id
1791
1862
  ],
1792
- name: "agent_artifact_components_artifact_component_fk"
1863
+ name: "sub_agent_artifact_components_artifact_component_fk"
1793
1864
  }).onDelete("cascade")
1794
1865
  ]
1795
1866
  );
@@ -1845,10 +1916,10 @@ var init_schema = __esm({
1845
1916
  }).onDelete("cascade")
1846
1917
  ]
1847
1918
  );
1848
- agentToolRelations = sqliteTable(
1849
- "agent_tool_relations",
1919
+ subAgentToolRelations = sqliteTable(
1920
+ "sub_agent_tool_relations",
1850
1921
  {
1851
- ...agentScoped,
1922
+ ...subAgentScoped,
1852
1923
  toolId: text("tool_id").notNull(),
1853
1924
  selectedTools: blob("selected_tools", { mode: "json" }).$type(),
1854
1925
  headers: blob("headers", { mode: "json" }).$type(),
@@ -1858,15 +1929,15 @@ var init_schema = __esm({
1858
1929
  primaryKey({ columns: [table.tenantId, table.projectId, table.graphId, table.id] }),
1859
1930
  // Foreign key constraint to agents table (which includes project and graph scope)
1860
1931
  foreignKey({
1861
- columns: [table.tenantId, table.projectId, table.graphId, table.agentId],
1862
- foreignColumns: [agents.tenantId, agents.projectId, agents.graphId, agents.id],
1863
- name: "agent_tool_relations_agent_fk"
1932
+ columns: [table.tenantId, table.projectId, table.graphId, table.subAgentId],
1933
+ foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.graphId, subAgents.id],
1934
+ name: "sub_agent_tool_relations_agent_fk"
1864
1935
  }).onDelete("cascade"),
1865
1936
  // Foreign key constraint to tools table
1866
1937
  foreignKey({
1867
1938
  columns: [table.tenantId, table.projectId, table.toolId],
1868
1939
  foreignColumns: [tools.tenantId, tools.projectId, tools.id],
1869
- name: "agent_tool_relations_tool_fk"
1940
+ name: "sub_agent_tool_relations_tool_fk"
1870
1941
  }).onDelete("cascade")
1871
1942
  ]
1872
1943
  );
@@ -1875,7 +1946,7 @@ var init_schema = __esm({
1875
1946
  {
1876
1947
  ...projectScoped,
1877
1948
  userId: text("user_id"),
1878
- activeAgentId: text("active_agent_id").notNull(),
1949
+ activeSubAgentId: text("active_sub_agent_id").notNull(),
1879
1950
  title: text("title"),
1880
1951
  lastContextResolution: text("last_context_resolution"),
1881
1952
  metadata: blob("metadata", { mode: "json" }).$type(),
@@ -1899,15 +1970,15 @@ var init_schema = __esm({
1899
1970
  role: text("role").notNull(),
1900
1971
  // 'user' | 'agent' | 'system'
1901
1972
  // Agent sender/recipient tracking (nullable - only populated when relevant)
1902
- fromAgentId: text("from_agent_id"),
1973
+ fromSubAgentId: text("from_sub_agent_id"),
1903
1974
  // Populated when message is from an agent
1904
- toAgentId: text("to_agent_id"),
1975
+ toSubAgentId: text("to_sub_agent_id"),
1905
1976
  // Populated when message is directed to a specific agent (e.g., transfers/delegations)
1906
1977
  // External agent sender tracking
1907
- fromExternalAgentId: text("from_external_agent_id"),
1978
+ fromExternalAgentId: text("from_external_sub_agent_id"),
1908
1979
  // Populated when message is directed from an external agent
1909
1980
  // External agent recipient tracking
1910
- toExternalAgentId: text("to_external_agent_id"),
1981
+ toExternalAgentId: text("to_external_sub_agent_id"),
1911
1982
  // Populated when message is directed to an external agent
1912
1983
  // Message content stored as JSON to support both formats
1913
1984
  content: blob("content", { mode: "json" }).$type().notNull(),
@@ -1916,8 +1987,6 @@ var init_schema = __esm({
1916
1987
  // 'user-facing' | 'internal' | 'system' | 'external'
1917
1988
  messageType: text("message_type").notNull().default("chat"),
1918
1989
  // 'chat' | 'a2a-request' | 'a2a-response' | 'task-update' | 'tool-call'
1919
- // Legacy agent association (consider deprecating in favor of fromAgentId/toAgentId)
1920
- agentId: text("agent_id"),
1921
1990
  taskId: text("task_id"),
1922
1991
  parentMessageId: text("parent_message_id"),
1923
1992
  // Remove self-reference constraint here
@@ -2044,10 +2113,9 @@ var init_schema = __esm({
2044
2113
  childRelations: many(taskRelations, {
2045
2114
  relationName: "parentTask"
2046
2115
  }),
2047
- // A task belongs to one agent
2048
- agent: one(agents, {
2049
- fields: [tasks.agentId],
2050
- references: [agents.id]
2116
+ subAgent: one(subAgents, {
2117
+ fields: [tasks.subAgentId],
2118
+ references: [subAgents.id]
2051
2119
  }),
2052
2120
  // A task can have many messages associated with it
2053
2121
  messages: many(messages),
@@ -2055,7 +2123,7 @@ var init_schema = __esm({
2055
2123
  ledgerArtifacts: many(ledgerArtifacts)
2056
2124
  }));
2057
2125
  projectsRelations = relations(projects, ({ many }) => ({
2058
- agents: many(agents),
2126
+ subAgents: many(subAgents),
2059
2127
  agentGraphs: many(agentGraph),
2060
2128
  tools: many(tools),
2061
2129
  contextConfigs: many(contextConfigs),
@@ -2093,17 +2161,17 @@ var init_schema = __esm({
2093
2161
  references: [contextConfigs.id]
2094
2162
  })
2095
2163
  }));
2096
- agentsRelations = relations(agents, ({ many, one }) => ({
2164
+ subAgentsRelations = relations(subAgents, ({ many, one }) => ({
2097
2165
  project: one(projects, {
2098
- fields: [agents.tenantId, agents.projectId],
2166
+ fields: [subAgents.tenantId, subAgents.projectId],
2099
2167
  references: [projects.tenantId, projects.id]
2100
2168
  }),
2101
2169
  tasks: many(tasks),
2102
2170
  defaultForGraphs: many(agentGraph),
2103
- sourceRelations: many(agentRelations, {
2171
+ sourceRelations: many(subAgentRelations, {
2104
2172
  relationName: "sourceRelations"
2105
2173
  }),
2106
- targetRelations: many(agentRelations, {
2174
+ targetRelations: many(subAgentRelations, {
2107
2175
  relationName: "targetRelations"
2108
2176
  }),
2109
2177
  sentMessages: many(messages, {
@@ -2115,18 +2183,18 @@ var init_schema = __esm({
2115
2183
  associatedMessages: many(messages, {
2116
2184
  relationName: "associatedAgent"
2117
2185
  }),
2118
- toolRelations: many(agentToolRelations),
2119
- dataComponentRelations: many(agentDataComponents),
2120
- artifactComponentRelations: many(agentArtifactComponents)
2186
+ toolRelations: many(subAgentToolRelations),
2187
+ dataComponentRelations: many(subAgentDataComponents),
2188
+ artifactComponentRelations: many(subAgentArtifactComponents)
2121
2189
  }));
2122
2190
  agentGraphRelations = relations(agentGraph, ({ one }) => ({
2123
2191
  project: one(projects, {
2124
2192
  fields: [agentGraph.tenantId, agentGraph.projectId],
2125
2193
  references: [projects.tenantId, projects.id]
2126
2194
  }),
2127
- defaultAgent: one(agents, {
2128
- fields: [agentGraph.defaultAgentId],
2129
- references: [agents.id]
2195
+ defaultSubAgent: one(subAgents, {
2196
+ fields: [agentGraph.defaultSubAgentId],
2197
+ references: [subAgents.id]
2130
2198
  }),
2131
2199
  contextConfig: one(contextConfigs, {
2132
2200
  fields: [agentGraph.contextConfigId],
@@ -2138,7 +2206,7 @@ var init_schema = __esm({
2138
2206
  fields: [externalAgents.tenantId, externalAgents.projectId],
2139
2207
  references: [projects.tenantId, projects.id]
2140
2208
  }),
2141
- agentRelations: many(agentRelations),
2209
+ subAgentRelations: many(subAgentRelations),
2142
2210
  credentialReference: one(credentialReferences, {
2143
2211
  fields: [externalAgents.credentialReferenceId],
2144
2212
  references: [credentialReferences.id]
@@ -2154,13 +2222,13 @@ var init_schema = __esm({
2154
2222
  references: [agentGraph.id]
2155
2223
  })
2156
2224
  }));
2157
- agentToolRelationsRelations = relations(agentToolRelations, ({ one }) => ({
2158
- agent: one(agents, {
2159
- fields: [agentToolRelations.agentId],
2160
- references: [agents.id]
2225
+ agentToolRelationsRelations = relations(subAgentToolRelations, ({ one }) => ({
2226
+ subAgent: one(subAgents, {
2227
+ fields: [subAgentToolRelations.subAgentId],
2228
+ references: [subAgents.id]
2161
2229
  }),
2162
2230
  tool: one(tools, {
2163
- fields: [agentToolRelations.toolId],
2231
+ fields: [subAgentToolRelations.toolId],
2164
2232
  references: [tools.id]
2165
2233
  })
2166
2234
  }));
@@ -2172,7 +2240,7 @@ var init_schema = __esm({
2172
2240
  fields: [tools.tenantId, tools.projectId],
2173
2241
  references: [projects.tenantId, projects.id]
2174
2242
  }),
2175
- agentRelations: many(agentToolRelations),
2243
+ subAgentRelations: many(subAgentToolRelations),
2176
2244
  credentialReference: one(credentialReferences, {
2177
2245
  fields: [tools.credentialReferenceId],
2178
2246
  references: [credentialReferences.id]
@@ -2188,9 +2256,9 @@ var init_schema = __esm({
2188
2256
  references: [projects.tenantId, projects.id]
2189
2257
  }),
2190
2258
  messages: many(messages),
2191
- activeAgent: one(agents, {
2192
- fields: [conversations.activeAgentId],
2193
- references: [agents.id]
2259
+ activeSubAgent: one(subAgents, {
2260
+ fields: [conversations.activeSubAgentId],
2261
+ references: [subAgents.id]
2194
2262
  })
2195
2263
  }));
2196
2264
  messagesRelations = relations(messages, ({ one, many }) => ({
@@ -2198,20 +2266,14 @@ var init_schema = __esm({
2198
2266
  fields: [messages.conversationId],
2199
2267
  references: [conversations.id]
2200
2268
  }),
2201
- // Legacy agent association (consider deprecating)
2202
- agent: one(agents, {
2203
- fields: [messages.agentId],
2204
- references: [agents.id],
2205
- relationName: "associatedAgent"
2206
- }),
2207
- fromAgent: one(agents, {
2208
- fields: [messages.fromAgentId],
2209
- references: [agents.id],
2269
+ fromSubAgent: one(subAgents, {
2270
+ fields: [messages.fromSubAgentId],
2271
+ references: [subAgents.id],
2210
2272
  relationName: "sentMessages"
2211
2273
  }),
2212
- toAgent: one(agents, {
2213
- fields: [messages.toAgentId],
2214
- references: [agents.id],
2274
+ toSubAgent: one(subAgents, {
2275
+ fields: [messages.toSubAgentId],
2276
+ references: [subAgents.id],
2215
2277
  relationName: "receivedMessages"
2216
2278
  }),
2217
2279
  fromExternalAgent: one(externalAgents, {
@@ -2237,33 +2299,40 @@ var init_schema = __esm({
2237
2299
  relationName: "parentChild"
2238
2300
  })
2239
2301
  }));
2240
- artifactComponentsRelations = relations(artifactComponents, ({ many }) => ({
2241
- agentRelations: many(agentArtifactComponents)
2242
- }));
2243
- agentArtifactComponentsRelations = relations(agentArtifactComponents, ({ one }) => ({
2244
- agent: one(agents, {
2245
- fields: [agentArtifactComponents.agentId],
2246
- references: [agents.id]
2302
+ artifactComponentsRelations = relations(artifactComponents, ({ many, one }) => ({
2303
+ project: one(projects, {
2304
+ fields: [artifactComponents.tenantId, artifactComponents.projectId],
2305
+ references: [projects.tenantId, projects.id]
2247
2306
  }),
2248
- artifactComponent: one(artifactComponents, {
2249
- fields: [agentArtifactComponents.artifactComponentId],
2250
- references: [artifactComponents.id]
2251
- })
2307
+ subAgentRelations: many(subAgentArtifactComponents)
2252
2308
  }));
2309
+ subAgentArtifactComponentsRelations = relations(
2310
+ subAgentArtifactComponents,
2311
+ ({ one }) => ({
2312
+ subAgent: one(subAgents, {
2313
+ fields: [subAgentArtifactComponents.subAgentId],
2314
+ references: [subAgents.id]
2315
+ }),
2316
+ artifactComponent: one(artifactComponents, {
2317
+ fields: [subAgentArtifactComponents.artifactComponentId],
2318
+ references: [artifactComponents.id]
2319
+ })
2320
+ })
2321
+ );
2253
2322
  dataComponentsRelations = relations(dataComponents, ({ many, one }) => ({
2254
2323
  project: one(projects, {
2255
2324
  fields: [dataComponents.tenantId, dataComponents.projectId],
2256
2325
  references: [projects.tenantId, projects.id]
2257
2326
  }),
2258
- agentRelations: many(agentDataComponents)
2327
+ subAgentRelations: many(subAgentDataComponents)
2259
2328
  }));
2260
- agentDataComponentsRelations = relations(agentDataComponents, ({ one }) => ({
2261
- agent: one(agents, {
2262
- fields: [agentDataComponents.agentId],
2263
- references: [agents.id]
2329
+ subAgentDataComponentsRelations = relations(subAgentDataComponents, ({ one }) => ({
2330
+ subAgent: one(subAgents, {
2331
+ fields: [subAgentDataComponents.subAgentId],
2332
+ references: [subAgents.id]
2264
2333
  }),
2265
2334
  dataComponent: one(dataComponents, {
2266
- fields: [agentDataComponents.dataComponentId],
2335
+ fields: [subAgentDataComponents.dataComponentId],
2267
2336
  references: [dataComponents.id]
2268
2337
  })
2269
2338
  }));
@@ -2280,23 +2349,23 @@ var init_schema = __esm({
2280
2349
  functionsRelations = relations(functions, ({ many }) => ({
2281
2350
  tools: many(tools)
2282
2351
  }));
2283
- agentRelationsRelations = relations(agentRelations, ({ one }) => ({
2352
+ subAgentRelationsRelations = relations(subAgentRelations, ({ one }) => ({
2284
2353
  graph: one(agentGraph, {
2285
- fields: [agentRelations.graphId],
2354
+ fields: [subAgentRelations.graphId],
2286
2355
  references: [agentGraph.id]
2287
2356
  }),
2288
- sourceAgent: one(agents, {
2289
- fields: [agentRelations.sourceAgentId],
2290
- references: [agents.id],
2357
+ sourceSubAgent: one(subAgents, {
2358
+ fields: [subAgentRelations.sourceSubAgentId],
2359
+ references: [subAgents.id],
2291
2360
  relationName: "sourceRelations"
2292
2361
  }),
2293
- targetAgent: one(agents, {
2294
- fields: [agentRelations.targetAgentId],
2295
- references: [agents.id],
2362
+ targetSubAgent: one(subAgents, {
2363
+ fields: [subAgentRelations.targetSubAgentId],
2364
+ references: [subAgents.id],
2296
2365
  relationName: "targetRelations"
2297
2366
  }),
2298
2367
  externalAgent: one(externalAgents, {
2299
- fields: [agentRelations.externalAgentId],
2368
+ fields: [subAgentRelations.externalSubAgentId],
2300
2369
  references: [externalAgents.id]
2301
2370
  })
2302
2371
  }));
@@ -2328,7 +2397,7 @@ var init_utility = __esm({
2328
2397
  });
2329
2398
 
2330
2399
  // ../packages/agents-core/src/validation/schemas.ts
2331
- var StopWhenSchema, GraphStopWhenSchema, AgentStopWhenSchema, MIN_ID_LENGTH, MAX_ID_LENGTH, URL_SAFE_ID_PATTERN, resourceIdSchema, ModelSettingsSchema, ModelSchema, ProjectModelSchema, SandboxConfigSchema, FunctionToolConfigSchema, createApiSchema, createApiInsertSchema, createApiUpdateSchema, createGraphScopedApiSchema, createGraphScopedApiInsertSchema, createGraphScopedApiUpdateSchema, AgentSelectSchema, AgentInsertSchema, AgentUpdateSchema, AgentApiSelectSchema, AgentApiInsertSchema, AgentApiUpdateSchema, AgentRelationSelectSchema, AgentRelationInsertSchema, AgentRelationUpdateSchema, AgentRelationApiSelectSchema, AgentRelationApiInsertSchema, AgentRelationApiUpdateSchema, AgentRelationQuerySchema, ExternalAgentRelationInsertSchema, ExternalAgentRelationApiInsertSchema, AgentGraphSelectSchema, AgentGraphInsertSchema, AgentGraphUpdateSchema, AgentGraphApiSelectSchema, AgentGraphApiInsertSchema, AgentGraphApiUpdateSchema, TaskSelectSchema, TaskInsertSchema, TaskUpdateSchema, TaskApiSelectSchema, TaskApiInsertSchema, TaskApiUpdateSchema, TaskRelationSelectSchema, TaskRelationInsertSchema, TaskRelationUpdateSchema, TaskRelationApiSelectSchema, TaskRelationApiInsertSchema, TaskRelationApiUpdateSchema, imageUrlSchema, McpTransportConfigSchema, ToolStatusSchema, McpToolDefinitionSchema, ToolSelectSchema, ToolInsertSchema, ConversationSelectSchema, ConversationInsertSchema, ConversationUpdateSchema, ConversationApiSelectSchema, ConversationApiInsertSchema, ConversationApiUpdateSchema, MessageSelectSchema, MessageInsertSchema, MessageUpdateSchema, MessageApiSelectSchema, MessageApiInsertSchema, MessageApiUpdateSchema, ContextCacheSelectSchema, ContextCacheInsertSchema, ContextCacheUpdateSchema, ContextCacheApiSelectSchema, ContextCacheApiInsertSchema, ContextCacheApiUpdateSchema, DataComponentSelectSchema, DataComponentInsertSchema, DataComponentBaseSchema, DataComponentUpdateSchema, DataComponentApiSelectSchema, DataComponentApiInsertSchema, DataComponentApiUpdateSchema, AgentDataComponentSelectSchema, AgentDataComponentInsertSchema, AgentDataComponentUpdateSchema, AgentDataComponentApiSelectSchema, AgentDataComponentApiInsertSchema, AgentDataComponentApiUpdateSchema, ArtifactComponentSelectSchema, ArtifactComponentInsertSchema, ArtifactComponentUpdateSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiUpdateSchema, AgentArtifactComponentSelectSchema, AgentArtifactComponentInsertSchema, AgentArtifactComponentUpdateSchema, AgentArtifactComponentApiSelectSchema, AgentArtifactComponentApiInsertSchema, AgentArtifactComponentApiUpdateSchema, ExternalAgentSelectSchema, ExternalAgentInsertSchema, ExternalAgentUpdateSchema, ExternalAgentApiSelectSchema, ExternalAgentApiInsertSchema, ExternalAgentApiUpdateSchema, AllAgentSchema, ApiKeySelectSchema, ApiKeyInsertSchema, ApiKeyUpdateSchema, ApiKeyApiSelectSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, CredentialReferenceSelectSchema, CredentialReferenceInsertSchema, CredentialReferenceUpdateSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiUpdateSchema, McpToolSchema, MCPToolConfigSchema, ToolUpdateSchema, ToolApiSelectSchema, ToolApiInsertSchema, ToolApiUpdateSchema, FunctionSelectSchema, FunctionInsertSchema, FunctionUpdateSchema, FunctionApiSelectSchema, FunctionApiInsertSchema, FunctionApiUpdateSchema, FetchConfigSchema, FetchDefinitionSchema, ContextConfigSelectSchema, ContextConfigInsertSchema, ContextConfigUpdateSchema, ContextConfigApiSelectSchema, ContextConfigApiInsertSchema, ContextConfigApiUpdateSchema, AgentToolRelationSelectSchema, AgentToolRelationInsertSchema, AgentToolRelationUpdateSchema, AgentToolRelationApiSelectSchema, AgentToolRelationApiInsertSchema, AgentToolRelationApiUpdateSchema, LedgerArtifactSelectSchema, LedgerArtifactInsertSchema, LedgerArtifactUpdateSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiUpdateSchema, StatusComponentSchema, StatusUpdateSchema, CanUseItemSchema, FullGraphAgentInsertSchema, FullGraphDefinitionSchema, GraphWithinContextOfProjectSchema, PaginationSchema, ErrorResponseSchema, ExistsResponseSchema, RemovedResponseSchema, ProjectSelectSchema, ProjectInsertSchema, ProjectUpdateSchema, ProjectApiSelectSchema, ProjectApiInsertSchema, ProjectApiUpdateSchema, FullProjectDefinitionSchema, HeadersScopeSchema, TenantParamsSchema, TenantProjectParamsSchema, TenantProjectGraphParamsSchema, TenantProjectGraphIdParamsSchema, TenantProjectIdParamsSchema, TenantIdParamsSchema, IdParamsSchema, PaginationQueryParamsSchema;
2400
+ var StopWhenSchema, GraphStopWhenSchema, AgentStopWhenSchema, MIN_ID_LENGTH, MAX_ID_LENGTH, URL_SAFE_ID_PATTERN, resourceIdSchema, ModelSettingsSchema, ModelSchema, ProjectModelSchema, SandboxConfigSchema, FunctionToolConfigSchema, createApiSchema, createApiInsertSchema, createApiUpdateSchema, createGraphScopedApiSchema, createGraphScopedApiInsertSchema, createGraphScopedApiUpdateSchema, SubAgentSelectSchema, SubAgentInsertSchema, SubAgentUpdateSchema, SubAgentApiSelectSchema, SubAgentApiInsertSchema, SubAgentApiUpdateSchema, AgentRelationSelectSchema, AgentRelationInsertSchema, AgentRelationUpdateSchema, AgentRelationApiSelectSchema, AgentRelationApiInsertSchema, AgentRelationApiUpdateSchema, AgentRelationQuerySchema, ExternalAgentRelationInsertSchema, ExternalAgentRelationApiInsertSchema, AgentGraphSelectSchema, AgentGraphInsertSchema, AgentGraphUpdateSchema, AgentGraphApiSelectSchema, AgentGraphApiInsertSchema, AgentGraphApiUpdateSchema, TaskSelectSchema, TaskInsertSchema, TaskUpdateSchema, TaskApiSelectSchema, TaskApiInsertSchema, TaskApiUpdateSchema, TaskRelationSelectSchema, TaskRelationInsertSchema, TaskRelationUpdateSchema, TaskRelationApiSelectSchema, TaskRelationApiInsertSchema, TaskRelationApiUpdateSchema, imageUrlSchema, McpTransportConfigSchema, ToolStatusSchema, McpToolDefinitionSchema, ToolSelectSchema, ToolInsertSchema, ConversationSelectSchema, ConversationInsertSchema, ConversationUpdateSchema, ConversationApiSelectSchema, ConversationApiInsertSchema, ConversationApiUpdateSchema, MessageSelectSchema, MessageInsertSchema, MessageUpdateSchema, MessageApiSelectSchema, MessageApiInsertSchema, MessageApiUpdateSchema, ContextCacheSelectSchema, ContextCacheInsertSchema, ContextCacheUpdateSchema, ContextCacheApiSelectSchema, ContextCacheApiInsertSchema, ContextCacheApiUpdateSchema, DataComponentSelectSchema, DataComponentInsertSchema, DataComponentBaseSchema, DataComponentUpdateSchema, DataComponentApiSelectSchema, DataComponentApiInsertSchema, DataComponentApiUpdateSchema, AgentDataComponentSelectSchema, AgentDataComponentInsertSchema, AgentDataComponentUpdateSchema, AgentDataComponentApiSelectSchema, AgentDataComponentApiInsertSchema, AgentDataComponentApiUpdateSchema, ArtifactComponentSelectSchema, ArtifactComponentInsertSchema, ArtifactComponentUpdateSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiUpdateSchema, AgentArtifactComponentSelectSchema, AgentArtifactComponentInsertSchema, AgentArtifactComponentUpdateSchema, AgentArtifactComponentApiSelectSchema, AgentArtifactComponentApiInsertSchema, AgentArtifactComponentApiUpdateSchema, ExternalAgentSelectSchema, ExternalAgentInsertSchema, ExternalAgentUpdateSchema, ExternalAgentApiSelectSchema, ExternalAgentApiInsertSchema, ExternalAgentApiUpdateSchema, AllAgentSchema, ApiKeySelectSchema, ApiKeyInsertSchema, ApiKeyUpdateSchema, ApiKeyApiSelectSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, CredentialReferenceSelectSchema, CredentialReferenceInsertSchema, CredentialReferenceUpdateSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiUpdateSchema, McpToolSchema, MCPToolConfigSchema, ToolUpdateSchema, ToolApiSelectSchema, ToolApiInsertSchema, ToolApiUpdateSchema, FunctionSelectSchema, FunctionInsertSchema, FunctionUpdateSchema, FunctionApiSelectSchema, FunctionApiInsertSchema, FunctionApiUpdateSchema, FetchConfigSchema, FetchDefinitionSchema, ContextConfigSelectSchema, ContextConfigInsertSchema, ContextConfigUpdateSchema, ContextConfigApiSelectSchema, ContextConfigApiInsertSchema, ContextConfigApiUpdateSchema, AgentToolRelationSelectSchema, AgentToolRelationInsertSchema, AgentToolRelationUpdateSchema, AgentToolRelationApiSelectSchema, AgentToolRelationApiInsertSchema, AgentToolRelationApiUpdateSchema, LedgerArtifactSelectSchema, LedgerArtifactInsertSchema, LedgerArtifactUpdateSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiUpdateSchema, StatusComponentSchema, StatusUpdateSchema, CanUseItemSchema, FullGraphAgentInsertSchema, GraphWithinContextOfProjectSchema, PaginationSchema, ErrorResponseSchema, ExistsResponseSchema, RemovedResponseSchema, ProjectSelectSchema, ProjectInsertSchema, ProjectUpdateSchema, ProjectApiSelectSchema, ProjectApiInsertSchema, ProjectApiUpdateSchema, FullProjectDefinitionSchema, HeadersScopeSchema, TenantId, ProjectId, GraphId, SubAgentId, TenantParamsSchema, TenantIdParamsSchema, TenantProjectParamsSchema, TenantProjectIdParamsSchema, TenantProjectGraphParamsSchema, TenantProjectGraphIdParamsSchema, TenantProjectGraphSubAgentParamsSchema, TenantProjectGraphSubAgentIdParamsSchema, PaginationQueryParamsSchema;
2332
2401
  var init_schemas = __esm({
2333
2402
  "../packages/agents-core/src/validation/schemas.ts"() {
2334
2403
  "use strict";
@@ -2385,22 +2454,22 @@ var init_schemas = __esm({
2385
2454
  createGraphScopedApiSchema = (schema) => schema.omit({ tenantId: true, projectId: true, graphId: true });
2386
2455
  createGraphScopedApiInsertSchema = (schema) => schema.omit({ tenantId: true, projectId: true, graphId: true });
2387
2456
  createGraphScopedApiUpdateSchema = (schema) => schema.omit({ tenantId: true, projectId: true, graphId: true }).partial();
2388
- AgentSelectSchema = createSelectSchema(agents);
2389
- AgentInsertSchema = createInsertSchema(agents).extend({
2457
+ SubAgentSelectSchema = createSelectSchema(subAgents);
2458
+ SubAgentInsertSchema = createInsertSchema(subAgents).extend({
2390
2459
  id: resourceIdSchema,
2391
2460
  models: ModelSchema.optional()
2392
2461
  });
2393
- AgentUpdateSchema = AgentInsertSchema.partial();
2394
- AgentApiSelectSchema = createGraphScopedApiSchema(AgentSelectSchema);
2395
- AgentApiInsertSchema = createGraphScopedApiInsertSchema(AgentInsertSchema);
2396
- AgentApiUpdateSchema = createGraphScopedApiUpdateSchema(AgentUpdateSchema);
2397
- AgentRelationSelectSchema = createSelectSchema(agentRelations);
2398
- AgentRelationInsertSchema = createInsertSchema(agentRelations).extend({
2462
+ SubAgentUpdateSchema = SubAgentInsertSchema.partial();
2463
+ SubAgentApiSelectSchema = createGraphScopedApiSchema(SubAgentSelectSchema);
2464
+ SubAgentApiInsertSchema = createGraphScopedApiInsertSchema(SubAgentInsertSchema);
2465
+ SubAgentApiUpdateSchema = createGraphScopedApiUpdateSchema(SubAgentUpdateSchema);
2466
+ AgentRelationSelectSchema = createSelectSchema(subAgentRelations);
2467
+ AgentRelationInsertSchema = createInsertSchema(subAgentRelations).extend({
2399
2468
  id: resourceIdSchema,
2400
2469
  graphId: resourceIdSchema,
2401
- sourceAgentId: resourceIdSchema,
2402
- targetAgentId: resourceIdSchema.optional(),
2403
- externalAgentId: resourceIdSchema.optional()
2470
+ sourceSubAgentId: resourceIdSchema,
2471
+ targetSubAgentId: resourceIdSchema.optional(),
2472
+ externalSubAgentId: resourceIdSchema.optional()
2404
2473
  });
2405
2474
  AgentRelationUpdateSchema = AgentRelationInsertSchema.partial();
2406
2475
  AgentRelationApiSelectSchema = createGraphScopedApiSchema(AgentRelationSelectSchema);
@@ -2410,13 +2479,13 @@ var init_schemas = __esm({
2410
2479
  relationType: z2.enum(VALID_RELATION_TYPES)
2411
2480
  }).refine(
2412
2481
  (data) => {
2413
- const hasTarget = data.targetAgentId != null;
2414
- const hasExternal = data.externalAgentId != null;
2482
+ const hasTarget = data.targetSubAgentId != null;
2483
+ const hasExternal = data.externalSubAgentId != null;
2415
2484
  return hasTarget !== hasExternal;
2416
2485
  },
2417
2486
  {
2418
- message: "Must specify exactly one of targetAgentId or externalAgentId",
2419
- path: ["targetAgentId", "externalAgentId"]
2487
+ message: "Must specify exactly one of targetSubAgentId or externalSubAgentId",
2488
+ path: ["targetSubAgentId", "externalSubAgentId"]
2420
2489
  }
2421
2490
  );
2422
2491
  AgentRelationApiUpdateSchema = createGraphScopedApiUpdateSchema(
@@ -2425,28 +2494,28 @@ var init_schemas = __esm({
2425
2494
  relationType: z2.enum(VALID_RELATION_TYPES).optional()
2426
2495
  }).refine(
2427
2496
  (data) => {
2428
- const hasTarget = data.targetAgentId != null;
2429
- const hasExternal = data.externalAgentId != null;
2497
+ const hasTarget = data.targetSubAgentId != null;
2498
+ const hasExternal = data.externalSubAgentId != null;
2430
2499
  if (!hasTarget && !hasExternal) {
2431
2500
  return true;
2432
2501
  }
2433
2502
  return hasTarget !== hasExternal;
2434
2503
  },
2435
2504
  {
2436
- message: "Must specify exactly one of targetAgentId or externalAgentId when updating agent relationships",
2437
- path: ["targetAgentId", "externalAgentId"]
2505
+ message: "Must specify exactly one of targetSubAgentId or externalSubAgentId when updating agent relationships",
2506
+ path: ["targetSubAgentId", "externalSubAgentId"]
2438
2507
  }
2439
2508
  );
2440
2509
  AgentRelationQuerySchema = z2.object({
2441
- sourceAgentId: z2.string().optional(),
2442
- targetAgentId: z2.string().optional(),
2443
- externalAgentId: z2.string().optional()
2510
+ sourceSubAgentId: z2.string().optional(),
2511
+ targetSubAgentId: z2.string().optional(),
2512
+ externalSubAgentId: z2.string().optional()
2444
2513
  });
2445
- ExternalAgentRelationInsertSchema = createInsertSchema(agentRelations).extend({
2514
+ ExternalAgentRelationInsertSchema = createInsertSchema(subAgentRelations).extend({
2446
2515
  id: resourceIdSchema,
2447
2516
  graphId: resourceIdSchema,
2448
- sourceAgentId: resourceIdSchema,
2449
- externalAgentId: resourceIdSchema
2517
+ sourceSubAgentId: resourceIdSchema,
2518
+ externalSubAgentId: resourceIdSchema
2450
2519
  });
2451
2520
  ExternalAgentRelationApiInsertSchema = createApiInsertSchema(
2452
2521
  ExternalAgentRelationInsertSchema
@@ -2580,8 +2649,8 @@ var init_schemas = __esm({
2580
2649
  DataComponentApiSelectSchema = createApiSchema(DataComponentSelectSchema);
2581
2650
  DataComponentApiInsertSchema = createApiInsertSchema(DataComponentInsertSchema);
2582
2651
  DataComponentApiUpdateSchema = createApiUpdateSchema(DataComponentUpdateSchema);
2583
- AgentDataComponentSelectSchema = createSelectSchema(agentDataComponents);
2584
- AgentDataComponentInsertSchema = createInsertSchema(agentDataComponents);
2652
+ AgentDataComponentSelectSchema = createSelectSchema(subAgentDataComponents);
2653
+ AgentDataComponentInsertSchema = createInsertSchema(subAgentDataComponents);
2585
2654
  AgentDataComponentUpdateSchema = AgentDataComponentInsertSchema.partial();
2586
2655
  AgentDataComponentApiSelectSchema = createGraphScopedApiSchema(
2587
2656
  AgentDataComponentSelectSchema
@@ -2610,12 +2679,12 @@ var init_schemas = __esm({
2610
2679
  ArtifactComponentApiUpdateSchema = createApiUpdateSchema(
2611
2680
  ArtifactComponentUpdateSchema
2612
2681
  );
2613
- AgentArtifactComponentSelectSchema = createSelectSchema(agentArtifactComponents);
2682
+ AgentArtifactComponentSelectSchema = createSelectSchema(subAgentArtifactComponents);
2614
2683
  AgentArtifactComponentInsertSchema = createInsertSchema(
2615
- agentArtifactComponents
2684
+ subAgentArtifactComponents
2616
2685
  ).extend({
2617
2686
  id: resourceIdSchema,
2618
- agentId: resourceIdSchema,
2687
+ subAgentId: resourceIdSchema,
2619
2688
  artifactComponentId: resourceIdSchema
2620
2689
  });
2621
2690
  AgentArtifactComponentUpdateSchema = AgentArtifactComponentInsertSchema.partial();
@@ -2643,7 +2712,7 @@ var init_schemas = __esm({
2643
2712
  ExternalAgentApiInsertSchema = createGraphScopedApiInsertSchema(ExternalAgentInsertSchema);
2644
2713
  ExternalAgentApiUpdateSchema = createGraphScopedApiUpdateSchema(ExternalAgentUpdateSchema);
2645
2714
  AllAgentSchema = z2.discriminatedUnion("type", [
2646
- AgentApiSelectSchema.extend({ type: z2.literal("internal") }),
2715
+ SubAgentApiSelectSchema.extend({ type: z2.literal("internal") }),
2647
2716
  ExternalAgentApiSelectSchema.extend({ type: z2.literal("external") })
2648
2717
  ]);
2649
2718
  ApiKeySelectSchema = createSelectSchema(apiKeys);
@@ -2797,10 +2866,10 @@ var init_schemas = __esm({
2797
2866
  ContextConfigApiUpdateSchema = createApiUpdateSchema(ContextConfigUpdateSchema).omit({
2798
2867
  graphId: true
2799
2868
  });
2800
- AgentToolRelationSelectSchema = createSelectSchema(agentToolRelations);
2801
- AgentToolRelationInsertSchema = createInsertSchema(agentToolRelations).extend({
2869
+ AgentToolRelationSelectSchema = createSelectSchema(subAgentToolRelations);
2870
+ AgentToolRelationInsertSchema = createInsertSchema(subAgentToolRelations).extend({
2802
2871
  id: resourceIdSchema,
2803
- agentId: resourceIdSchema,
2872
+ subAgentId: resourceIdSchema,
2804
2873
  toolId: resourceIdSchema,
2805
2874
  selectedTools: z2.array(z2.string()).nullish(),
2806
2875
  headers: z2.record(z2.string(), z2.string()).nullish()
@@ -2843,7 +2912,7 @@ var init_schemas = __esm({
2843
2912
  toolSelection: z2.array(z2.string()).nullish(),
2844
2913
  headers: z2.record(z2.string(), z2.string()).nullish()
2845
2914
  });
2846
- FullGraphAgentInsertSchema = AgentApiInsertSchema.extend({
2915
+ FullGraphAgentInsertSchema = SubAgentApiInsertSchema.extend({
2847
2916
  type: z2.literal("internal"),
2848
2917
  canUse: z2.array(CanUseItemSchema),
2849
2918
  // All tools (both MCP and function tools)
@@ -2852,27 +2921,17 @@ var init_schemas = __esm({
2852
2921
  canTransferTo: z2.array(z2.string()).optional(),
2853
2922
  canDelegateTo: z2.array(z2.string()).optional()
2854
2923
  });
2855
- FullGraphDefinitionSchema = AgentGraphApiInsertSchema.extend({
2856
- agents: z2.record(z2.string(), z2.union([FullGraphAgentInsertSchema, ExternalAgentApiInsertSchema])),
2857
- // Lookup maps for UI to resolve canUse items
2858
- tools: z2.record(z2.string(), ToolApiInsertSchema).optional(),
2859
- // Get tool name/description from toolId
2860
- functions: z2.record(z2.string(), FunctionApiInsertSchema).optional(),
2861
- // Get function code for function tools
2862
- contextConfig: z2.optional(ContextConfigApiInsertSchema),
2863
- statusUpdates: z2.optional(StatusUpdateSchema),
2864
- models: ModelSchema.optional(),
2865
- stopWhen: GraphStopWhenSchema.optional(),
2866
- graphPrompt: z2.string().max(5e3, "Graph prompt cannot exceed 5000 characters").optional()
2867
- });
2868
2924
  GraphWithinContextOfProjectSchema = AgentGraphApiInsertSchema.extend({
2869
- agents: z2.record(
2925
+ subAgents: z2.record(
2870
2926
  z2.string(),
2871
2927
  z2.discriminatedUnion("type", [
2872
2928
  FullGraphAgentInsertSchema,
2873
2929
  ExternalAgentApiInsertSchema.extend({ type: z2.literal("external") })
2874
2930
  ])
2875
2931
  ),
2932
+ tools: z2.record(z2.string(), ToolApiInsertSchema).optional(),
2933
+ // Get tool name/description from toolId
2934
+ functions: z2.record(z2.string(), FunctionApiInsertSchema).optional(),
2876
2935
  contextConfig: z2.optional(ContextConfigApiInsertSchema),
2877
2936
  statusUpdates: z2.optional(StatusUpdateSchema),
2878
2937
  models: ModelSchema.optional(),
@@ -2937,72 +2996,46 @@ var init_schemas = __esm({
2937
2996
  example: "graph_789"
2938
2997
  })
2939
2998
  });
2999
+ TenantId = z2.string().openapi({
3000
+ description: "Tenant identifier",
3001
+ example: "tenant_123"
3002
+ });
3003
+ ProjectId = z2.string().openapi({
3004
+ description: "Project identifier",
3005
+ example: "project_456"
3006
+ });
3007
+ GraphId = z2.string().openapi({
3008
+ description: "Graph identifier",
3009
+ example: "graph_789"
3010
+ });
3011
+ SubAgentId = z2.string().openapi({
3012
+ description: "Sub-agent identifier",
3013
+ example: "sub_agent_123"
3014
+ });
2940
3015
  TenantParamsSchema = z2.object({
2941
- tenantId: z2.string().openapi({
2942
- description: "Tenant identifier",
2943
- example: "tenant_123"
2944
- })
3016
+ tenantId: TenantId
2945
3017
  }).openapi("TenantParams");
2946
- TenantProjectParamsSchema = z2.object({
2947
- tenantId: z2.string().openapi({
2948
- description: "Tenant identifier",
2949
- example: "tenant_123"
2950
- }),
2951
- projectId: z2.string().openapi({
2952
- description: "Project identifier",
2953
- example: "project_456"
2954
- })
2955
- }).openapi("TenantProjectParams");
2956
- TenantProjectGraphParamsSchema = z2.object({
2957
- tenantId: z2.string().openapi({
2958
- description: "Tenant identifier",
2959
- example: "tenant_123"
2960
- }),
2961
- projectId: z2.string().openapi({
2962
- description: "Project identifier",
2963
- example: "project_456"
2964
- }),
2965
- graphId: z2.string().openapi({
2966
- description: "Graph identifier",
2967
- example: "graph_789"
2968
- })
2969
- }).openapi("TenantProjectGraphParams");
2970
- TenantProjectGraphIdParamsSchema = z2.object({
2971
- tenantId: z2.string().openapi({
2972
- description: "Tenant identifier",
2973
- example: "tenant_123"
2974
- }),
2975
- projectId: z2.string().openapi({
2976
- description: "Project identifier",
2977
- example: "project_456"
2978
- }),
2979
- graphId: z2.string().openapi({
2980
- description: "Graph identifier",
2981
- example: "graph_789"
2982
- }),
3018
+ TenantIdParamsSchema = TenantParamsSchema.extend({
2983
3019
  id: resourceIdSchema
2984
- }).openapi("TenantProjectGraphIdParams");
2985
- TenantProjectIdParamsSchema = z2.object({
2986
- tenantId: z2.string().openapi({
2987
- description: "Tenant identifier",
2988
- example: "tenant_123"
2989
- }),
2990
- projectId: z2.string().openapi({
2991
- description: "Project identifier",
2992
- example: "project_456"
2993
- }),
3020
+ }).openapi("TenantIdParams");
3021
+ TenantProjectParamsSchema = TenantParamsSchema.extend({
3022
+ projectId: ProjectId
3023
+ }).openapi("TenantProjectParams");
3024
+ TenantProjectIdParamsSchema = TenantProjectParamsSchema.extend({
2994
3025
  id: resourceIdSchema
2995
3026
  }).openapi("TenantProjectIdParams");
2996
- TenantIdParamsSchema = z2.object({
2997
- tenantId: z2.string().openapi({
2998
- description: "Tenant identifier",
2999
- example: "tenant_123"
3000
- }),
3027
+ TenantProjectGraphParamsSchema = TenantProjectParamsSchema.extend({
3028
+ graphId: GraphId
3029
+ }).openapi("TenantProjectGraphParams");
3030
+ TenantProjectGraphIdParamsSchema = TenantProjectGraphParamsSchema.extend({
3001
3031
  id: resourceIdSchema
3002
- }).openapi("TenantIdParams");
3003
- IdParamsSchema = z2.object({
3032
+ }).openapi("TenantProjectGraphIdParams");
3033
+ TenantProjectGraphSubAgentParamsSchema = TenantProjectGraphParamsSchema.extend({
3034
+ subAgentId: SubAgentId
3035
+ }).openapi("TenantProjectGraphSubAgentParams");
3036
+ TenantProjectGraphSubAgentIdParamsSchema = TenantProjectGraphSubAgentParamsSchema.extend({
3004
3037
  id: resourceIdSchema
3005
- }).openapi("IdParams");
3038
+ }).openapi("TenantProjectGraphSubAgentIdParams");
3006
3039
  PaginationQueryParamsSchema = z2.object({
3007
3040
  page: z2.coerce.number().min(1).default(1),
3008
3041
  limit: z2.coerce.number().min(1).max(100).default(10)
@@ -4616,50 +4649,50 @@ var init_client = __esm({
4616
4649
  }
4617
4650
  });
4618
4651
 
4619
- // ../packages/agents-core/src/data-access/agentRelations.ts
4620
- import { and, count, desc, eq, isNotNull } from "drizzle-orm";
4621
- var init_agentRelations = __esm({
4622
- "../packages/agents-core/src/data-access/agentRelations.ts"() {
4652
+ // ../packages/agents-core/src/data-access/contextConfigs.ts
4653
+ import { and, count, desc, eq, sql as sql2 } from "drizzle-orm";
4654
+ var init_contextConfigs = __esm({
4655
+ "../packages/agents-core/src/data-access/contextConfigs.ts"() {
4623
4656
  "use strict";
4624
4657
  init_esm_shims();
4625
4658
  init_schema();
4626
4659
  }
4627
4660
  });
4628
4661
 
4629
- // ../packages/agents-core/src/data-access/agents.ts
4630
- import { and as and2, count as count2, desc as desc2, eq as eq2, inArray } from "drizzle-orm";
4631
- var init_agents = __esm({
4632
- "../packages/agents-core/src/data-access/agents.ts"() {
4662
+ // ../packages/agents-core/src/data-access/externalAgents.ts
4663
+ import { and as and2, asc, count as count2, desc as desc2, eq as eq2 } from "drizzle-orm";
4664
+ var init_externalAgents = __esm({
4665
+ "../packages/agents-core/src/data-access/externalAgents.ts"() {
4633
4666
  "use strict";
4634
4667
  init_esm_shims();
4635
4668
  init_schema();
4636
4669
  }
4637
4670
  });
4638
4671
 
4639
- // ../packages/agents-core/src/data-access/contextConfigs.ts
4640
- import { and as and3, count as count3, desc as desc3, eq as eq3, sql as sql2 } from "drizzle-orm";
4641
- var init_contextConfigs = __esm({
4642
- "../packages/agents-core/src/data-access/contextConfigs.ts"() {
4672
+ // ../packages/agents-core/src/data-access/functions.ts
4673
+ import { and as and3, eq as eq3 } from "drizzle-orm";
4674
+ var init_functions = __esm({
4675
+ "../packages/agents-core/src/data-access/functions.ts"() {
4643
4676
  "use strict";
4644
4677
  init_esm_shims();
4645
4678
  init_schema();
4646
4679
  }
4647
4680
  });
4648
4681
 
4649
- // ../packages/agents-core/src/data-access/externalAgents.ts
4650
- import { and as and4, asc, count as count4, desc as desc4, eq as eq4 } from "drizzle-orm";
4651
- var init_externalAgents = __esm({
4652
- "../packages/agents-core/src/data-access/externalAgents.ts"() {
4682
+ // ../packages/agents-core/src/data-access/subAgentRelations.ts
4683
+ import { and as and4, count as count3, desc as desc3, eq as eq4, isNotNull } from "drizzle-orm";
4684
+ var init_subAgentRelations = __esm({
4685
+ "../packages/agents-core/src/data-access/subAgentRelations.ts"() {
4653
4686
  "use strict";
4654
4687
  init_esm_shims();
4655
4688
  init_schema();
4656
4689
  }
4657
4690
  });
4658
4691
 
4659
- // ../packages/agents-core/src/data-access/functions.ts
4660
- import { and as and5, eq as eq5 } from "drizzle-orm";
4661
- var init_functions = __esm({
4662
- "../packages/agents-core/src/data-access/functions.ts"() {
4692
+ // ../packages/agents-core/src/data-access/subAgents.ts
4693
+ import { and as and5, count as count4, desc as desc4, eq as eq5, inArray } from "drizzle-orm";
4694
+ var init_subAgents = __esm({
4695
+ "../packages/agents-core/src/data-access/subAgents.ts"() {
4663
4696
  "use strict";
4664
4697
  init_esm_shims();
4665
4698
  init_schema();
@@ -13578,8 +13611,8 @@ var init_tools = __esm({
13578
13611
  init_utils();
13579
13612
  init_logger();
13580
13613
  init_mcp_client();
13581
- init_agentRelations();
13582
13614
  init_credentialReferences();
13615
+ init_subAgentRelations();
13583
13616
  logger6 = getLogger("tools");
13584
13617
  }
13585
13618
  });
@@ -13591,11 +13624,11 @@ var init_agentGraphs = __esm({
13591
13624
  "use strict";
13592
13625
  init_esm_shims();
13593
13626
  init_schema();
13594
- init_agentRelations();
13595
- init_agents();
13596
13627
  init_contextConfigs();
13597
13628
  init_externalAgents();
13598
13629
  init_functions();
13630
+ init_subAgentRelations();
13631
+ init_subAgents();
13599
13632
  init_tools();
13600
13633
  }
13601
13634
  });
@@ -20155,12 +20188,12 @@ var init_graphFull2 = __esm({
20155
20188
  init_schema();
20156
20189
  init_graphFull();
20157
20190
  init_agentGraphs();
20158
- init_agentRelations();
20159
- init_agents();
20160
20191
  init_artifactComponents();
20161
20192
  init_contextConfigs();
20162
20193
  init_dataComponents();
20163
20194
  init_externalAgents();
20195
+ init_subAgentRelations();
20196
+ init_subAgents();
20164
20197
  init_tools();
20165
20198
  }
20166
20199
  });
@@ -20240,8 +20273,6 @@ var init_data_access = __esm({
20240
20273
  init_esm_shims();
20241
20274
  init_client();
20242
20275
  init_agentGraphs();
20243
- init_agentRelations();
20244
- init_agents();
20245
20276
  init_apiKeys2();
20246
20277
  init_artifactComponents();
20247
20278
  init_contextCache();
@@ -20256,6 +20287,8 @@ var init_data_access = __esm({
20256
20287
  init_messages();
20257
20288
  init_projectFull();
20258
20289
  init_projects();
20290
+ init_subAgentRelations();
20291
+ init_subAgents();
20259
20292
  init_tasks();
20260
20293
  init_tools();
20261
20294
  init_validation();
@@ -20625,6 +20658,53 @@ ${error.message}`
20625
20658
  }
20626
20659
  });
20627
20660
 
20661
+ // ../packages/agents-core/src/validation/event-schemas.ts
20662
+ import { z as z11 } from "zod";
20663
+ var TransferDataSchema, DelegationSentDataSchema, DelegationReturnedDataSchema, DataOperationDetailsSchema, DataOperationEventSchema, A2AMessageMetadataSchema;
20664
+ var init_event_schemas = __esm({
20665
+ "../packages/agents-core/src/validation/event-schemas.ts"() {
20666
+ "use strict";
20667
+ init_esm_shims();
20668
+ TransferDataSchema = z11.object({
20669
+ fromSubAgent: z11.string().describe("ID of the sub-agent transferring control"),
20670
+ targetSubAgent: z11.string().describe("ID of the sub-agent receiving control"),
20671
+ reason: z11.string().optional().describe("Reason for the transfer"),
20672
+ context: z11.any().optional().describe("Additional context data")
20673
+ });
20674
+ DelegationSentDataSchema = z11.object({
20675
+ delegationId: z11.string().describe("Unique identifier for this delegation"),
20676
+ fromSubAgent: z11.string().describe("ID of the delegating sub-agent"),
20677
+ targetSubAgent: z11.string().describe("ID of the sub-agent receiving the delegation"),
20678
+ taskDescription: z11.string().describe("Description of the delegated task"),
20679
+ context: z11.any().optional().describe("Additional context data")
20680
+ });
20681
+ DelegationReturnedDataSchema = z11.object({
20682
+ delegationId: z11.string().describe("Unique identifier matching the original delegation"),
20683
+ fromSubAgent: z11.string().describe("ID of the sub-agent that completed the task"),
20684
+ targetSubAgent: z11.string().describe("ID of the sub-agent receiving the result"),
20685
+ result: z11.any().optional().describe("Result data from the delegated task")
20686
+ });
20687
+ DataOperationDetailsSchema = z11.object({
20688
+ timestamp: z11.number().describe("Unix timestamp in milliseconds"),
20689
+ subAgentId: z11.string().describe("ID of the sub-agent that generated this data"),
20690
+ data: z11.any().describe("The actual data payload")
20691
+ });
20692
+ DataOperationEventSchema = z11.object({
20693
+ type: z11.string().describe("Event type identifier"),
20694
+ label: z11.string().describe("Human-readable label for the event"),
20695
+ details: DataOperationDetailsSchema
20696
+ });
20697
+ A2AMessageMetadataSchema = z11.object({
20698
+ fromSubAgentId: z11.string().optional().describe("ID of the sending sub-agent"),
20699
+ toSubAgentId: z11.string().optional().describe("ID of the receiving sub-agent"),
20700
+ fromExternalAgentId: z11.string().optional().describe("ID of the sending external agent"),
20701
+ toExternalAgentId: z11.string().optional().describe("ID of the receiving external agent"),
20702
+ taskId: z11.string().optional().describe("Associated task ID"),
20703
+ a2aTaskId: z11.string().optional().describe("A2A-specific task ID")
20704
+ });
20705
+ }
20706
+ });
20707
+
20628
20708
  // ../packages/agents-core/src/validation/id-validation.ts
20629
20709
  var init_id_validation = __esm({
20630
20710
  "../packages/agents-core/src/validation/id-validation.ts"() {
@@ -20639,6 +20719,7 @@ var init_validation2 = __esm({
20639
20719
  "../packages/agents-core/src/validation/index.ts"() {
20640
20720
  "use strict";
20641
20721
  init_esm_shims();
20722
+ init_event_schemas();
20642
20723
  init_graphFull();
20643
20724
  init_id_validation();
20644
20725
  init_props_validation();
@@ -20652,6 +20733,8 @@ var init_src = __esm({
20652
20733
  "use strict";
20653
20734
  init_esm_shims();
20654
20735
  init_base_client();
20736
+ init_otel_attributes();
20737
+ init_signoz_queries();
20655
20738
  init_context5();
20656
20739
  init_credential_stores();
20657
20740
  init_credential_stuffer();
@@ -20959,7 +21042,6 @@ var init_api = __esm({
20959
21042
  async pushGraph(graphDefinition) {
20960
21043
  const tenantId = this.checkTenantId();
20961
21044
  const projectId = this.getProjectId();
20962
- graphDefinition.tenantId = tenantId;
20963
21045
  const graphId = graphDefinition.id;
20964
21046
  if (!graphId) {
20965
21047
  throw new Error("Graph must have an id property");
@@ -20968,7 +21050,10 @@ var init_api = __esm({
20968
21050
  `${this.apiUrl}/tenants/${tenantId}/projects/${projectId}/graph/${graphId}`,
20969
21051
  {
20970
21052
  method: "PUT",
20971
- body: JSON.stringify(graphDefinition)
21053
+ body: JSON.stringify({
21054
+ ...graphDefinition,
21055
+ tenantId
21056
+ })
20972
21057
  }
20973
21058
  );
20974
21059
  if (!response.ok) {
@@ -21192,8 +21277,8 @@ async function chatCommandEnhanced(graphIdInput, options) {
21192
21277
  if (graph.description) {
21193
21278
  console.log(chalk9.gray(`Description: ${graph.description}`));
21194
21279
  }
21195
- if (graph.defaultAgentId || graph.default_agent_id) {
21196
- console.log(chalk9.gray(`Default Agent: ${graph.defaultAgentId || graph.default_agent_id}`));
21280
+ if (graph.defaultSubAgentId) {
21281
+ console.log(chalk9.gray(`Default Agent: ${graph.defaultSubAgentId}`));
21197
21282
  }
21198
21283
  } catch (error) {
21199
21284
  spinner.fail("Failed to connect to graph");
@@ -21422,19 +21507,19 @@ init_esm_shims();
21422
21507
  // src/env.ts
21423
21508
  init_esm_shims();
21424
21509
  init_src();
21425
- import { z as z11 } from "zod";
21510
+ import { z as z12 } from "zod";
21426
21511
  loadEnvironmentFiles();
21427
- var envSchema2 = z11.object({
21428
- DEBUG: z11.string().optional(),
21512
+ var envSchema2 = z12.object({
21513
+ DEBUG: z12.string().optional(),
21429
21514
  // Secrets loaded from .env files (relative to where CLI is executed)
21430
- ANTHROPIC_API_KEY: z11.string().optional()
21515
+ ANTHROPIC_API_KEY: z12.string().optional()
21431
21516
  });
21432
21517
  var parseEnv2 = () => {
21433
21518
  try {
21434
21519
  const parsedEnv = envSchema2.parse(process.env);
21435
21520
  return parsedEnv;
21436
21521
  } catch (error) {
21437
- if (error instanceof z11.ZodError) {
21522
+ if (error instanceof z12.ZodError) {
21438
21523
  const missingVars = error.issues.map((issue) => issue.path.join("."));
21439
21524
  throw new Error(
21440
21525
  `\u274C Invalid environment variables: ${missingVars.join(", ")}
@@ -22067,7 +22152,7 @@ async function listGraphsCommand(options) {
22067
22152
  table.push([
22068
22153
  graph.id || "",
22069
22154
  graph.name || graph.id || "",
22070
- graph.defaultAgentId || chalk6.gray("None"),
22155
+ graph.defaultSubAgentId || chalk6.gray("None"),
22071
22156
  createdDate
22072
22157
  ]);
22073
22158
  }
@@ -22332,7 +22417,7 @@ var PROJECT_JSON_EXAMPLE = `
22332
22417
  "id": "customer-service",
22333
22418
  "name": "customer-service",
22334
22419
  "description": "respond to customer service requests",
22335
- "defaultAgentId": "router",
22420
+ "defaultSubAgentId": "router",
22336
22421
  "agents": {
22337
22422
  "refund-agent": {
22338
22423
  "id": "refund-agent",
@@ -22683,7 +22768,7 @@ export const supportGraph = agentGraph({
22683
22768
  id: 'support-graph',
22684
22769
  name: 'Support Graph',
22685
22770
  description: 'Multi-agent support system', // Only include if description has a value
22686
- defaultAgent: routerAgent,
22771
+ defaultSubAgent: routerAgent,
22687
22772
  agents: () => [routerAgent, qaAgent]
22688
22773
  });
22689
22774
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-cli",
3
- "version": "0.0.0-dev-20251009192735",
3
+ "version": "0.0.0-dev-20251009215610",
4
4
  "description": "Inkeep CLI tool",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -46,8 +46,8 @@
46
46
  "recast": "^0.23.0",
47
47
  "ts-morph": "^26.0.0",
48
48
  "tsx": "^4.20.5",
49
- "@inkeep/agents-core": "^0.0.0-dev-20251009192735",
50
- "@inkeep/agents-sdk": "^0.0.0-dev-20251009192735"
49
+ "@inkeep/agents-core": "^0.0.0-dev-20251009215610",
50
+ "@inkeep/agents-sdk": "^0.0.0-dev-20251009215610"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/degit": "^2.8.6",
@@ -62,7 +62,7 @@
62
62
  "vitest": "^3.2.4"
63
63
  },
64
64
  "peerDependencies": {
65
- "@inkeep/agents-manage-ui": "0.0.0-dev-20251009192735",
65
+ "@inkeep/agents-manage-ui": "0.0.0-dev-20251009215610",
66
66
  "zod": "^4.1.11"
67
67
  },
68
68
  "engines": {