@inkeep/agents-cli 0.1.6 → 0.1.7

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.
@@ -223,12 +223,12 @@ var createAgents = async (args = {}) => {
223
223
  ${color.yellow("Next steps:")}
224
224
  cd ${dirName}
225
225
  pnpm run dev (for APIs only)
226
- inkeep dev (for APIs + Management Dashboard)
226
+ inkeep dev (for APIs + Manage UI)
227
227
 
228
228
  ${color.yellow("Available services:")}
229
- \u2022 Management API: http://localhost:${manageApiPort || "3002"}
230
- \u2022 Execution API: http://localhost:${runApiPort || "3003"}
231
- \u2022 Management Dashboard: Available with 'inkeep dev'
229
+ \u2022 Manage API: http://localhost:${manageApiPort || "3002"}
230
+ \u2022 Run API: http://localhost:${runApiPort || "3003"}
231
+ \u2022 Manage UI: Available with 'inkeep dev'
232
232
 
233
233
  ${color.yellow("Configuration:")}
234
234
  \u2022 Edit .env for environment variables
@@ -290,7 +290,7 @@ async function setupPackageConfigurations(dirName) {
290
290
  const manageApiPackageJson = {
291
291
  name: `@${dirName}/manage-api`,
292
292
  version: "0.1.0",
293
- description: "Management API for agents",
293
+ description: "Manage API for agents",
294
294
  type: "module",
295
295
  scripts: {
296
296
  build: "tsc",
@@ -393,12 +393,16 @@ DB_FILE_NAME=file:../../local.db
393
393
  # AI Provider Keys
394
394
  ANTHROPIC_API_KEY=${config.anthropicKey || "your-anthropic-key-here"}
395
395
  OPENAI_API_KEY=${config.openAiKey || "your-openai-key-here"}
396
+
397
+ AGENTS_RUN_API_URL=http://localhost:${config.runApiPort}
396
398
  `;
397
399
  const manageApiEnvContent = `# Environment
398
400
  ENVIRONMENT=development
399
401
 
400
402
  # Database (relative path from API directory)
401
403
  DB_FILE_NAME=file:../../local.db
404
+
405
+ AGENTS_MANAGE_API_URL=http://localhost:${config.manageApiPort}
402
406
  `;
403
407
  await fs.writeFile("apps/manage-api/.env", manageApiEnvContent);
404
408
  await fs.writeFile("apps/run-api/.env", runApiEnvContent);
@@ -640,7 +644,7 @@ serve(
640
644
  port,
641
645
  },
642
646
  (info) => {
643
- logger.info({}, \`\u{1F4DD} Execution API running on http://localhost:\${info.port}\`);
647
+ logger.info({}, \`\u{1F4DD} Run API running on http://localhost:\${info.port}\`);
644
648
  logger.info({}, \`\u{1F4DD} OpenAPI documentation available at http://localhost:\${info.port}/openapi.json\`);
645
649
  }
646
650
  );`;
@@ -704,11 +708,11 @@ An Inkeep Agent Framework project with multi-service architecture.
704
708
 
705
709
  This project follows a workspace structure with the following services:
706
710
 
707
- - **Agents Management API** (Port 3002): Agent configuration and managemen
711
+ - **Agents Manage API** (Port 3002): Agent configuration and managemen
708
712
  - Handles entity management and configuration endpoints.
709
713
  - **Agents Run API** (Port 3003): Agent execution and chat processing
710
714
  - Handles agent communication. You can interact with your agents either over MCP from an MCP client or through our React UI components library
711
- - **Management Dashboard** (Port 3000): Web interface available via \`inkeep dev\`
715
+ - **Agents Manage UI** (Port 3000): Web interface available via \`inkeep dev\`
712
716
  - The agent framework visual builder. From the builder you can create, manage and visualize all your graphs.
713
717
 
714
718
  ## Quick Start
@@ -719,7 +723,7 @@ This project follows a workspace structure with the following services:
719
723
 
720
724
  1. **Start services:**
721
725
  \`\`\`bash
722
- # Start Agents Management API and Agents Run API
726
+ # Start Agents Manage API and Agents Run API
723
727
  pnpm run dev
724
728
 
725
729
  # Start Dashboard
@@ -744,7 +748,7 @@ ${config.dirName}/
744
748
  \u251C\u2500\u2500 src/
745
749
  \u2502 \u251C\u2500\u2500 /${config.projectId} # Agent configurations
746
750
  \u251C\u2500\u2500 apps/
747
- \u2502 \u251C\u2500\u2500 manage-api/ # Agents Management API service
751
+ \u2502 \u251C\u2500\u2500 manage-api/ # Agents Manage API service
748
752
  \u2502 \u251C\u2500\u2500 run-api/ # Agents Run API service
749
753
  \u2502 \u2514\u2500\u2500 shared/ # Shared code between API services
750
754
  \u2502 \u2514\u2500\u2500 credential-stores.ts # Shared credential store configuration
@@ -759,7 +763,7 @@ ${config.dirName}/
759
763
 
760
764
  Environment variables are defined in the following places:
761
765
 
762
- - \`apps/manage-api/.env\`: Agents Management API environment variables
766
+ - \`apps/manage-api/.env\`: Agents Manage API environment variables
763
767
  - \`apps/run-api/.env\`: Agents Run API environment variables
764
768
  - \`src/${config.projectId}/.env\`: Inkeep CLI environment variables
765
769
  - \`.env\`: Root environment variables
@@ -779,7 +783,7 @@ To change the ports used by your services modify \`apps/manage-api/.env\` and \`
779
783
  RUN_API_PORT=3003
780
784
 
781
785
  # Service port for apps/manage-api
782
- MANAGE_API_PORT
786
+ MANAGE_API_PORT=3002
783
787
  \`\`\`
784
788
 
785
789
  After changing the API Service ports make sure that you modify the dashboard API urls from whichever directory you are running \`inkeep dev\`:
@@ -800,8 +804,8 @@ Your inkeep configuration is defined in \`src/${config.projectId}/inkeep.config.
800
804
 
801
805
  - \`tenantId\`: The tenant ID
802
806
  - \`projectId\`: The project ID
803
- - \`agentsManageApiUrl\`: The management API URL
804
- - \`agentsRunApiUrl\`: The execution API URL
807
+ - \`agentsManageApiUrl\`: The Manage API URL
808
+ - \`agentsRunApiUrl\`: The Run API URL
805
809
 
806
810
 
807
811
  ## Development
@@ -815,8 +819,8 @@ Your inkeep configuration is defined in \`src/${config.projectId}/inkeep.config.
815
819
 
816
820
  Once services are running, view the OpenAPI documentation:
817
821
 
818
- - Management API: http://localhost:${config.manageApiPort}/docs
819
- - Execution API: http://localhost:${config.runApiPort}/docs
822
+ - Manage API: http://localhost:${config.manageApiPort}/docs
823
+ - Run API: http://localhost:${config.runApiPort}/docs
820
824
 
821
825
  ## Learn More
822
826
 
package/dist/index.js CHANGED
@@ -15445,12 +15445,12 @@ var createAgents = async (args = {}) => {
15445
15445
  ${color.yellow("Next steps:")}
15446
15446
  cd ${dirName}
15447
15447
  pnpm run dev (for APIs only)
15448
- inkeep dev (for APIs + Management Dashboard)
15448
+ inkeep dev (for APIs + Manage UI)
15449
15449
 
15450
15450
  ${color.yellow("Available services:")}
15451
- \u2022 Management API: http://localhost:${manageApiPort || "3002"}
15452
- \u2022 Execution API: http://localhost:${runApiPort || "3003"}
15453
- \u2022 Management Dashboard: Available with 'inkeep dev'
15451
+ \u2022 Manage API: http://localhost:${manageApiPort || "3002"}
15452
+ \u2022 Run API: http://localhost:${runApiPort || "3003"}
15453
+ \u2022 Manage UI: Available with 'inkeep dev'
15454
15454
 
15455
15455
  ${color.yellow("Configuration:")}
15456
15456
  \u2022 Edit .env for environment variables
@@ -15512,7 +15512,7 @@ async function setupPackageConfigurations(dirName) {
15512
15512
  const manageApiPackageJson = {
15513
15513
  name: `@${dirName}/manage-api`,
15514
15514
  version: "0.1.0",
15515
- description: "Management API for agents",
15515
+ description: "Manage API for agents",
15516
15516
  type: "module",
15517
15517
  scripts: {
15518
15518
  build: "tsc",
@@ -15615,12 +15615,16 @@ DB_FILE_NAME=file:../../local.db
15615
15615
  # AI Provider Keys
15616
15616
  ANTHROPIC_API_KEY=${config.anthropicKey || "your-anthropic-key-here"}
15617
15617
  OPENAI_API_KEY=${config.openAiKey || "your-openai-key-here"}
15618
+
15619
+ AGENTS_RUN_API_URL=http://localhost:${config.runApiPort}
15618
15620
  `;
15619
15621
  const manageApiEnvContent = `# Environment
15620
15622
  ENVIRONMENT=development
15621
15623
 
15622
15624
  # Database (relative path from API directory)
15623
15625
  DB_FILE_NAME=file:../../local.db
15626
+
15627
+ AGENTS_MANAGE_API_URL=http://localhost:${config.manageApiPort}
15624
15628
  `;
15625
15629
  await fs.writeFile("apps/manage-api/.env", manageApiEnvContent);
15626
15630
  await fs.writeFile("apps/run-api/.env", runApiEnvContent);
@@ -15862,7 +15866,7 @@ serve(
15862
15866
  port,
15863
15867
  },
15864
15868
  (info) => {
15865
- logger.info({}, \`\u{1F4DD} Execution API running on http://localhost:\${info.port}\`);
15869
+ logger.info({}, \`\u{1F4DD} Run API running on http://localhost:\${info.port}\`);
15866
15870
  logger.info({}, \`\u{1F4DD} OpenAPI documentation available at http://localhost:\${info.port}/openapi.json\`);
15867
15871
  }
15868
15872
  );`;
@@ -15926,11 +15930,11 @@ An Inkeep Agent Framework project with multi-service architecture.
15926
15930
 
15927
15931
  This project follows a workspace structure with the following services:
15928
15932
 
15929
- - **Agents Management API** (Port 3002): Agent configuration and managemen
15933
+ - **Agents Manage API** (Port 3002): Agent configuration and managemen
15930
15934
  - Handles entity management and configuration endpoints.
15931
15935
  - **Agents Run API** (Port 3003): Agent execution and chat processing
15932
15936
  - Handles agent communication. You can interact with your agents either over MCP from an MCP client or through our React UI components library
15933
- - **Management Dashboard** (Port 3000): Web interface available via \`inkeep dev\`
15937
+ - **Agents Manage UI** (Port 3000): Web interface available via \`inkeep dev\`
15934
15938
  - The agent framework visual builder. From the builder you can create, manage and visualize all your graphs.
15935
15939
 
15936
15940
  ## Quick Start
@@ -15941,7 +15945,7 @@ This project follows a workspace structure with the following services:
15941
15945
 
15942
15946
  1. **Start services:**
15943
15947
  \`\`\`bash
15944
- # Start Agents Management API and Agents Run API
15948
+ # Start Agents Manage API and Agents Run API
15945
15949
  pnpm run dev
15946
15950
 
15947
15951
  # Start Dashboard
@@ -15966,7 +15970,7 @@ ${config.dirName}/
15966
15970
  \u251C\u2500\u2500 src/
15967
15971
  \u2502 \u251C\u2500\u2500 /${config.projectId} # Agent configurations
15968
15972
  \u251C\u2500\u2500 apps/
15969
- \u2502 \u251C\u2500\u2500 manage-api/ # Agents Management API service
15973
+ \u2502 \u251C\u2500\u2500 manage-api/ # Agents Manage API service
15970
15974
  \u2502 \u251C\u2500\u2500 run-api/ # Agents Run API service
15971
15975
  \u2502 \u2514\u2500\u2500 shared/ # Shared code between API services
15972
15976
  \u2502 \u2514\u2500\u2500 credential-stores.ts # Shared credential store configuration
@@ -15981,7 +15985,7 @@ ${config.dirName}/
15981
15985
 
15982
15986
  Environment variables are defined in the following places:
15983
15987
 
15984
- - \`apps/manage-api/.env\`: Agents Management API environment variables
15988
+ - \`apps/manage-api/.env\`: Agents Manage API environment variables
15985
15989
  - \`apps/run-api/.env\`: Agents Run API environment variables
15986
15990
  - \`src/${config.projectId}/.env\`: Inkeep CLI environment variables
15987
15991
  - \`.env\`: Root environment variables
@@ -16001,7 +16005,7 @@ To change the ports used by your services modify \`apps/manage-api/.env\` and \`
16001
16005
  RUN_API_PORT=3003
16002
16006
 
16003
16007
  # Service port for apps/manage-api
16004
- MANAGE_API_PORT
16008
+ MANAGE_API_PORT=3002
16005
16009
  \`\`\`
16006
16010
 
16007
16011
  After changing the API Service ports make sure that you modify the dashboard API urls from whichever directory you are running \`inkeep dev\`:
@@ -16022,8 +16026,8 @@ Your inkeep configuration is defined in \`src/${config.projectId}/inkeep.config.
16022
16026
 
16023
16027
  - \`tenantId\`: The tenant ID
16024
16028
  - \`projectId\`: The project ID
16025
- - \`agentsManageApiUrl\`: The management API URL
16026
- - \`agentsRunApiUrl\`: The execution API URL
16029
+ - \`agentsManageApiUrl\`: The Manage API URL
16030
+ - \`agentsRunApiUrl\`: The Run API URL
16027
16031
 
16028
16032
 
16029
16033
  ## Development
@@ -16037,8 +16041,8 @@ Your inkeep configuration is defined in \`src/${config.projectId}/inkeep.config.
16037
16041
 
16038
16042
  Once services are running, view the OpenAPI documentation:
16039
16043
 
16040
- - Management API: http://localhost:${config.manageApiPort}/docs
16041
- - Execution API: http://localhost:${config.runApiPort}/docs
16044
+ - Manage API: http://localhost:${config.manageApiPort}/docs
16045
+ - Run API: http://localhost:${config.runApiPort}/docs
16042
16046
 
16043
16047
  ## Learn More
16044
16048
 
@@ -16854,18 +16858,14 @@ async function pullCommand(graphId, options) {
16854
16858
  } else {
16855
16859
  spinner2.text = isExistingFile ? "Merging into existing TypeScript file with LLM..." : "Generating TypeScript file with LLM...";
16856
16860
  }
16857
- const pullModel = config.modelSettings?.base || { model: "anthropic/claude-sonnet-4-20250514" };
16858
- await generateTypeScriptFileWithLLM(
16859
- graphData,
16860
- graphId,
16861
- outputFilePath,
16862
- pullModel,
16863
- {
16864
- attempt,
16865
- maxRetries,
16866
- previousDifferences: attempt > 1 ? previousDifferences : void 0
16867
- }
16868
- );
16861
+ const pullModel = config.modelSettings?.base || {
16862
+ model: "anthropic/claude-sonnet-4-20250514"
16863
+ };
16864
+ await generateTypeScriptFileWithLLM(graphData, graphId, outputFilePath, pullModel, {
16865
+ attempt,
16866
+ maxRetries,
16867
+ previousDifferences: attempt > 1 ? previousDifferences : void 0
16868
+ });
16869
16869
  if (shouldValidate) {
16870
16870
  spinner2.text = "Validating generated TypeScript file...";
16871
16871
  try {
@@ -18066,7 +18066,7 @@ var projects = sqliteTable(
18066
18066
  // This IS the project ID
18067
18067
  name: text2("name").notNull(),
18068
18068
  description: text2("description").notNull(),
18069
- // Project-level default model settingsuration that can be inherited by graphs and agents
18069
+ // Project-level default model settings that can be inherited by graphs and agents
18070
18070
  models: text2("models", { mode: "json" }).$type(),
18071
18071
  // Project-level stopWhen configuration that can be inherited by graphs and agents
18072
18072
  stopWhen: text2("stop_when", { mode: "json" }).$type(),
@@ -18091,7 +18091,14 @@ var contextConfigs = sqliteTable(
18091
18091
  createdAt: text2("created_at").notNull().default(sql`CURRENT_TIMESTAMP`),
18092
18092
  updatedAt: text2("updated_at").notNull().default(sql`CURRENT_TIMESTAMP`)
18093
18093
  },
18094
- (table) => [primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
18094
+ (table) => [
18095
+ primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
18096
+ foreignKey({
18097
+ columns: [table.tenantId, table.projectId],
18098
+ foreignColumns: [projects.tenantId, projects.id],
18099
+ name: "context_configs_project_fk"
18100
+ }).onDelete("cascade")
18101
+ ]
18095
18102
  );
18096
18103
  var contextCache = sqliteTable(
18097
18104
  "context_cache",
@@ -18120,6 +18127,11 @@ var contextCache = sqliteTable(
18120
18127
  },
18121
18128
  (table) => [
18122
18129
  primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
18130
+ foreignKey({
18131
+ columns: [table.tenantId, table.projectId],
18132
+ foreignColumns: [projects.tenantId, projects.id],
18133
+ name: "context_cache_project_fk"
18134
+ }).onDelete("cascade"),
18123
18135
  index("context_cache_lookup_idx").on(
18124
18136
  table.conversationId,
18125
18137
  table.contextConfigId,
@@ -18151,7 +18163,7 @@ var agents = sqliteTable(
18151
18163
  columns: [table.tenantId, table.projectId],
18152
18164
  foreignColumns: [projects.tenantId, projects.id],
18153
18165
  name: "agents_project_fk"
18154
- })
18166
+ }).onDelete("cascade")
18155
18167
  ]
18156
18168
  );
18157
18169
  var agentRelations = sqliteTable(
@@ -18177,7 +18189,7 @@ var agentRelations = sqliteTable(
18177
18189
  columns: [table.tenantId, table.projectId],
18178
18190
  foreignColumns: [projects.tenantId, projects.id],
18179
18191
  name: "agent_relations_project_fk"
18180
- })
18192
+ }).onDelete("cascade")
18181
18193
  ]
18182
18194
  );
18183
18195
  var externalAgents = sqliteTable(
@@ -18197,6 +18209,11 @@ var externalAgents = sqliteTable(
18197
18209
  },
18198
18210
  (table) => [
18199
18211
  primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
18212
+ foreignKey({
18213
+ columns: [table.tenantId, table.projectId],
18214
+ foreignColumns: [projects.tenantId, projects.id],
18215
+ name: "external_agents_project_fk"
18216
+ }).onDelete("cascade"),
18200
18217
  foreignKey({
18201
18218
  columns: [table.tenantId, table.projectId, table.credentialReferenceId],
18202
18219
  foreignColumns: [
@@ -18236,7 +18253,7 @@ var agentGraph = sqliteTable(
18236
18253
  columns: [table.tenantId, table.projectId],
18237
18254
  foreignColumns: [projects.tenantId, projects.id],
18238
18255
  name: "agent_graph_project_fk"
18239
- })
18256
+ }).onDelete("cascade")
18240
18257
  ]
18241
18258
  );
18242
18259
  var tasks = sqliteTable(
@@ -18252,7 +18269,14 @@ var tasks = sqliteTable(
18252
18269
  createdAt: text2("created_at").notNull().default(sql`CURRENT_TIMESTAMP`),
18253
18270
  updatedAt: text2("updated_at").notNull().default(sql`CURRENT_TIMESTAMP`)
18254
18271
  },
18255
- (table) => [primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
18272
+ (table) => [
18273
+ primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
18274
+ foreignKey({
18275
+ columns: [table.tenantId, table.projectId],
18276
+ foreignColumns: [projects.tenantId, projects.id],
18277
+ name: "tasks_project_fk"
18278
+ }).onDelete("cascade")
18279
+ ]
18256
18280
  );
18257
18281
  var taskRelations = sqliteTable(
18258
18282
  "task_relations",
@@ -18267,7 +18291,14 @@ var taskRelations = sqliteTable(
18267
18291
  createdAt: text2("created_at").notNull().default(sql`CURRENT_TIMESTAMP`),
18268
18292
  updatedAt: text2("updated_at").notNull().default(sql`CURRENT_TIMESTAMP`)
18269
18293
  },
18270
- (table) => [primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
18294
+ (table) => [
18295
+ primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
18296
+ foreignKey({
18297
+ columns: [table.tenantId, table.projectId],
18298
+ foreignColumns: [projects.tenantId, projects.id],
18299
+ name: "task_relations_project_fk"
18300
+ }).onDelete("cascade")
18301
+ ]
18271
18302
  );
18272
18303
  var dataComponents = sqliteTable(
18273
18304
  "data_components",
@@ -18281,7 +18312,14 @@ var dataComponents = sqliteTable(
18281
18312
  createdAt: text2("created_at").notNull().default(sql`CURRENT_TIMESTAMP`),
18282
18313
  updatedAt: text2("updated_at").notNull().default(sql`CURRENT_TIMESTAMP`)
18283
18314
  },
18284
- (table) => [primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
18315
+ (table) => [
18316
+ primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
18317
+ foreignKey({
18318
+ columns: [table.tenantId, table.projectId],
18319
+ foreignColumns: [projects.tenantId, projects.id],
18320
+ name: "data_components_project_fk"
18321
+ }).onDelete("cascade")
18322
+ ]
18285
18323
  );
18286
18324
  var agentDataComponents = sqliteTable(
18287
18325
  "agent_data_components",
@@ -18295,6 +18333,12 @@ var agentDataComponents = sqliteTable(
18295
18333
  },
18296
18334
  (table) => [
18297
18335
  primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
18336
+ // Foreign key constraint to projects table
18337
+ foreignKey({
18338
+ columns: [table.tenantId, table.projectId],
18339
+ foreignColumns: [projects.tenantId, projects.id],
18340
+ name: "agent_data_components_project_fk"
18341
+ }).onDelete("cascade"),
18298
18342
  // Foreign key constraint to agents table
18299
18343
  foreignKey({
18300
18344
  columns: [table.tenantId, table.projectId, table.agentId],
@@ -18322,7 +18366,14 @@ var artifactComponents = sqliteTable(
18322
18366
  createdAt: text2("created_at").notNull().default(sql`CURRENT_TIMESTAMP`),
18323
18367
  updatedAt: text2("updated_at").notNull().default(sql`CURRENT_TIMESTAMP`)
18324
18368
  },
18325
- (table) => [primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
18369
+ (table) => [
18370
+ primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
18371
+ foreignKey({
18372
+ columns: [table.tenantId, table.projectId],
18373
+ foreignColumns: [projects.tenantId, projects.id],
18374
+ name: "artifact_components_project_fk"
18375
+ }).onDelete("cascade")
18376
+ ]
18326
18377
  );
18327
18378
  var agentArtifactComponents = sqliteTable(
18328
18379
  "agent_artifact_components",
@@ -18336,6 +18387,12 @@ var agentArtifactComponents = sqliteTable(
18336
18387
  },
18337
18388
  (table) => [
18338
18389
  primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
18390
+ // Foreign key constraint to projects table
18391
+ foreignKey({
18392
+ columns: [table.tenantId, table.projectId],
18393
+ foreignColumns: [projects.tenantId, projects.id],
18394
+ name: "agent_artifact_components_project_fk"
18395
+ }).onDelete("cascade"),
18339
18396
  // Foreign key constraint to agents table
18340
18397
  foreignKey({
18341
18398
  columns: [table.tenantId, table.projectId, table.agentId],
@@ -18379,7 +18436,14 @@ var tools = sqliteTable(
18379
18436
  createdAt: text2("created_at").notNull().default(sql`CURRENT_TIMESTAMP`),
18380
18437
  updatedAt: text2("updated_at").notNull().default(sql`CURRENT_TIMESTAMP`)
18381
18438
  },
18382
- (table) => [primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
18439
+ (table) => [
18440
+ primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
18441
+ foreignKey({
18442
+ columns: [table.tenantId, table.projectId],
18443
+ foreignColumns: [projects.tenantId, projects.id],
18444
+ name: "tools_project_fk"
18445
+ }).onDelete("cascade")
18446
+ ]
18383
18447
  );
18384
18448
  var agentToolRelations = sqliteTable(
18385
18449
  "agent_tool_relations",
@@ -18395,6 +18459,12 @@ var agentToolRelations = sqliteTable(
18395
18459
  },
18396
18460
  (table) => [
18397
18461
  primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
18462
+ // Foreign key constraint to projects table
18463
+ foreignKey({
18464
+ columns: [table.tenantId, table.projectId],
18465
+ foreignColumns: [projects.tenantId, projects.id],
18466
+ name: "agent_tool_relations_project_fk"
18467
+ }).onDelete("cascade"),
18398
18468
  // Foreign key constraint to agents table
18399
18469
  foreignKey({
18400
18470
  columns: [table.tenantId, table.projectId, table.agentId],
@@ -18423,7 +18493,14 @@ var conversations = sqliteTable(
18423
18493
  createdAt: text2("created_at").notNull().default(sql`CURRENT_TIMESTAMP`),
18424
18494
  updatedAt: text2("updated_at").notNull().default(sql`CURRENT_TIMESTAMP`)
18425
18495
  },
18426
- (table) => [primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
18496
+ (table) => [
18497
+ primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
18498
+ foreignKey({
18499
+ columns: [table.tenantId, table.projectId],
18500
+ foreignColumns: [projects.tenantId, projects.id],
18501
+ name: "conversations_project_fk"
18502
+ }).onDelete("cascade")
18503
+ ]
18427
18504
  );
18428
18505
  var messages = sqliteTable(
18429
18506
  "messages",
@@ -18468,7 +18545,14 @@ var messages = sqliteTable(
18468
18545
  createdAt: text2("created_at").notNull().default(sql`CURRENT_TIMESTAMP`),
18469
18546
  updatedAt: text2("updated_at").notNull().default(sql`CURRENT_TIMESTAMP`)
18470
18547
  },
18471
- (table) => [primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
18548
+ (table) => [
18549
+ primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
18550
+ foreignKey({
18551
+ columns: [table.tenantId, table.projectId],
18552
+ foreignColumns: [projects.tenantId, projects.id],
18553
+ name: "messages_project_fk"
18554
+ }).onDelete("cascade")
18555
+ ]
18472
18556
  );
18473
18557
  var ledgerArtifacts = sqliteTable(
18474
18558
  "ledger_artifacts",
@@ -18496,7 +18580,14 @@ var ledgerArtifacts = sqliteTable(
18496
18580
  createdAt: text2("created_at").notNull().default(sql`CURRENT_TIMESTAMP`),
18497
18581
  updatedAt: text2("updated_at").notNull().default(sql`CURRENT_TIMESTAMP`)
18498
18582
  },
18499
- (table) => [primaryKey({ columns: [table.tenantId, table.projectId, table.id] })]
18583
+ (table) => [
18584
+ primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
18585
+ foreignKey({
18586
+ columns: [table.tenantId, table.projectId],
18587
+ foreignColumns: [projects.tenantId, projects.id],
18588
+ name: "ledger_artifacts_project_fk"
18589
+ }).onDelete("cascade")
18590
+ ]
18500
18591
  );
18501
18592
  var apiKeys = sqliteTable(
18502
18593
  "api_keys",
@@ -18517,6 +18608,11 @@ var apiKeys = sqliteTable(
18517
18608
  updatedAt: text2("updated_at").notNull().default(sql`CURRENT_TIMESTAMP`)
18518
18609
  },
18519
18610
  (t2) => [
18611
+ foreignKey({
18612
+ columns: [t2.tenantId, t2.projectId],
18613
+ foreignColumns: [projects.tenantId, projects.id],
18614
+ name: "api_keys_project_fk"
18615
+ }).onDelete("cascade"),
18520
18616
  foreignKey({
18521
18617
  columns: [t2.tenantId, t2.projectId, t2.graphId],
18522
18618
  foreignColumns: [agentGraph.tenantId, agentGraph.projectId, agentGraph.id],
@@ -18541,7 +18637,14 @@ var credentialReferences = sqliteTable(
18541
18637
  createdAt: text2("created_at").notNull().default(sql`CURRENT_TIMESTAMP`),
18542
18638
  updatedAt: text2("updated_at").notNull().default(sql`CURRENT_TIMESTAMP`)
18543
18639
  },
18544
- (t2) => [primaryKey({ columns: [t2.tenantId, t2.projectId, t2.id] })]
18640
+ (t2) => [
18641
+ primaryKey({ columns: [t2.tenantId, t2.projectId, t2.id] }),
18642
+ foreignKey({
18643
+ columns: [t2.tenantId, t2.projectId],
18644
+ foreignColumns: [projects.tenantId, projects.id],
18645
+ name: "credential_references_project_fk"
18646
+ }).onDelete("cascade")
18647
+ ]
18545
18648
  );
18546
18649
  var ledgerArtifactsTaskIdIdx = index("ledger_artifacts_task_id_idx").on(
18547
18650
  ledgerArtifacts.taskId
@@ -18856,6 +18959,12 @@ var CredentialStoreType = {
18856
18959
  };
18857
18960
 
18858
18961
  // ../packages/agents-core/src/validation/schemas.ts
18962
+ var StopWhenSchema = z.object({
18963
+ transferCountIs: z.number().min(1).max(100).optional(),
18964
+ stepCountIs: z.number().min(1).max(1e3).optional()
18965
+ });
18966
+ var GraphStopWhenSchema = StopWhenSchema.pick({ transferCountIs: true });
18967
+ var AgentStopWhenSchema = StopWhenSchema.pick({ stepCountIs: true });
18859
18968
  var MIN_ID_LENGTH = 1;
18860
18969
  var MAX_ID_LENGTH = 255;
18861
18970
  var URL_SAFE_ID_PATTERN = /^[a-zA-Z0-9\-_.]+$/;
@@ -19298,16 +19407,20 @@ var FullGraphAgentInsertSchema = AgentApiInsertSchema.extend({
19298
19407
  });
19299
19408
  var FullGraphDefinitionSchema = AgentGraphApiInsertSchema.extend({
19300
19409
  agents: z.record(z.string(), z.union([FullGraphAgentInsertSchema, ExternalAgentApiInsertSchema])),
19301
- tools: z.record(z.string(), ToolApiInsertSchema),
19410
+ tools: z.record(z.string(), ToolApiInsertSchema).optional(),
19302
19411
  credentialReferences: z.array(CredentialReferenceApiInsertSchema).optional(),
19303
19412
  dataComponents: z.record(z.string(), DataComponentApiInsertSchema).optional(),
19304
19413
  artifactComponents: z.record(z.string(), ArtifactComponentApiInsertSchema).optional(),
19305
19414
  contextConfig: z.optional(ContextConfigApiInsertSchema),
19306
19415
  statusUpdates: z.optional(StatusUpdateSchema),
19307
19416
  models: ModelSchema.optional(),
19308
- stopWhen: z.object({
19309
- transferCountIs: z.number().min(1).max(100).optional()
19310
- }).optional(),
19417
+ stopWhen: GraphStopWhenSchema.optional(),
19418
+ graphPrompt: z.string().max(5e3, "Graph prompt cannot exceed 5000 characters").optional()
19419
+ });
19420
+ var GraphWithinContextOfProjectSchema = AgentGraphApiInsertSchema.extend({
19421
+ agents: z.record(z.string(), z.union([FullGraphAgentInsertSchema, ExternalAgentApiInsertSchema])),
19422
+ models: ModelSchema.optional(),
19423
+ stopWhen: GraphStopWhenSchema.optional(),
19311
19424
  graphPrompt: z.string().max(5e3, "Graph prompt cannot exceed 5000 characters").optional()
19312
19425
  });
19313
19426
  var PaginationSchema = z.object({
@@ -19330,7 +19443,8 @@ var RemovedResponseSchema = z.object({
19330
19443
  });
19331
19444
  var ProjectSelectSchema = createSelectSchema(projects);
19332
19445
  var ProjectInsertSchema = createInsertSchema(projects).extend({
19333
- models: ProjectModelSchema.optional()
19446
+ models: ProjectModelSchema.optional(),
19447
+ stopWhen: StopWhenSchema.optional()
19334
19448
  }).omit({
19335
19449
  createdAt: true,
19336
19450
  updatedAt: true
@@ -19339,6 +19453,17 @@ var ProjectUpdateSchema = ProjectInsertSchema.partial();
19339
19453
  var ProjectApiSelectSchema = ProjectSelectSchema.omit({ tenantId: true });
19340
19454
  var ProjectApiInsertSchema = ProjectInsertSchema.omit({ tenantId: true });
19341
19455
  var ProjectApiUpdateSchema = ProjectUpdateSchema.omit({ tenantId: true });
19456
+ var FullProjectDefinitionSchema = ProjectApiInsertSchema.extend({
19457
+ graphs: z.record(z.string(), GraphWithinContextOfProjectSchema),
19458
+ tools: z.record(z.string(), ToolApiInsertSchema),
19459
+ dataComponents: z.record(z.string(), DataComponentApiInsertSchema).optional(),
19460
+ artifactComponents: z.record(z.string(), ArtifactComponentApiInsertSchema).optional(),
19461
+ contextConfig: z.record(z.string(), ContextConfigApiInsertSchema).optional(),
19462
+ statusUpdates: z.optional(StatusUpdateSchema),
19463
+ credentialReferences: z.array(CredentialReferenceApiInsertSchema).optional(),
19464
+ createdAt: z.string().optional(),
19465
+ updatedAt: z.string().optional()
19466
+ });
19342
19467
  var HeadersScopeSchema = z.object({
19343
19468
  "x-inkeep-tenant-id": z.string().optional().openapi({
19344
19469
  description: "Tenant identifier",
@@ -19556,6 +19681,9 @@ import { and as and14, count as count12, eq as eq14 } from "drizzle-orm";
19556
19681
  init_esm_shims();
19557
19682
  import { and as and15, asc as asc2, count as count13, desc as desc12, eq as eq15, inArray as inArray3 } from "drizzle-orm";
19558
19683
 
19684
+ // ../packages/agents-core/src/data-access/projectFull.ts
19685
+ init_esm_shims();
19686
+
19559
19687
  // ../packages/agents-core/src/data-access/projects.ts
19560
19688
  init_esm_shims();
19561
19689
  import { and as and16, count as count14, desc as desc13, eq as eq16 } from "drizzle-orm";
@@ -19578,6 +19706,9 @@ var createProject = (db) => async (params) => {
19578
19706
  return created;
19579
19707
  };
19580
19708
 
19709
+ // ../packages/agents-core/src/data-access/projectFull.ts
19710
+ var defaultLogger = getLogger("projectFull");
19711
+
19581
19712
  // ../packages/agents-core/src/data-access/tasks.ts
19582
19713
  init_esm_shims();
19583
19714
  import { and as and17, eq as eq17 } from "drizzle-orm";
@@ -20466,6 +20597,8 @@ function getTitleFromCode(code) {
20466
20597
  return "Forbidden";
20467
20598
  case "not_found":
20468
20599
  return "Not Found";
20600
+ case "conflict":
20601
+ return "Conflict";
20469
20602
  case "unprocessable_entity":
20470
20603
  return "Unprocessable Entity";
20471
20604
  case "internal_server_error":
@@ -21926,107 +22059,7 @@ function getTracer(serviceName, serviceVersion) {
21926
22059
 
21927
22060
  // ../packages/agents-core/src/utils/tracer.ts
21928
22061
  init_esm_shims();
21929
-
21930
- // ../packages/agents-core/package.json
21931
- var package_default = {
21932
- name: "@inkeep/agents-core",
21933
- version: "0.1.6",
21934
- description: "Core database schema, types, and validation schemas for Inkeep Agent Framework",
21935
- type: "module",
21936
- license: "SEE LICENSE IN LICENSE.md",
21937
- main: "./src/index.ts",
21938
- exports: {
21939
- ".": "./src/index.ts",
21940
- "./schema": "./src/db/schema.ts",
21941
- "./types": "./src/types/index.ts",
21942
- "./validation": "./src/validation/index.ts",
21943
- "./client-exports": "./src/client-exports.ts"
21944
- },
21945
- scripts: {
21946
- build: "tsup",
21947
- prepare: "pnpm build",
21948
- test: "vitest --run",
21949
- "test:unit": "vitest --run src/__tests__ --exclude src/__tests__/integration/**",
21950
- "test:integration": "vitest --run src/__tests__/integration/",
21951
- "test:coverage": "vitest --run --coverage",
21952
- "test:watch": "vitest --watch",
21953
- lint: "biome lint src",
21954
- "lint:fix": "biome check --write src",
21955
- format: "biome format --write src",
21956
- "format:check": "biome format src",
21957
- typecheck: "tsc --noEmit",
21958
- "db:generate": "drizzle-kit generate",
21959
- "db:push": "drizzle-kit push",
21960
- "db:migrate": "drizzle-kit migrate",
21961
- "db:clean": "tsx src/db/clean.ts",
21962
- "db:studio": "drizzle-kit studio",
21963
- "db:check": "drizzle-kit check",
21964
- "db:reset-schema": "rm -rf drizzle/* && echo 'All migration files removed, generating new schema' && drizzle-kit generate",
21965
- prepack: "clean-package",
21966
- postpack: "clean-package restore"
21967
- },
21968
- "clean-package": "./clean-package.config.json",
21969
- dependencies: {
21970
- "@hono/node-server": "^1.14.3",
21971
- "@hono/zod-openapi": "^1.0.2",
21972
- "@libsql/client": "^0.15.7",
21973
- "@modelcontextprotocol/sdk": "^1.17.2",
21974
- "@nangohq/node": "^0.66.0",
21975
- "@nangohq/types": "^0.66.0",
21976
- "@opentelemetry/api": "^1.9.0",
21977
- "@opentelemetry/auto-instrumentations-node": "^0.62.0",
21978
- "@opentelemetry/baggage-span-processor": "^0.4.0",
21979
- "@opentelemetry/exporter-jaeger": "^2.0.1",
21980
- "@opentelemetry/exporter-trace-otlp-proto": "^0.203.0",
21981
- "@opentelemetry/sdk-metrics": "^2.0.1",
21982
- "@opentelemetry/sdk-node": "^0.203.0",
21983
- "@opentelemetry/sdk-trace-node": "^2.0.1",
21984
- "@opentelemetry/semantic-conventions": "^1.34.0",
21985
- ai: "5.0.11",
21986
- ajv: "^8.17.1",
21987
- "ajv-formats": "^3.0.1",
21988
- dotenv: "^17.2.1",
21989
- "drizzle-orm": "^0.44.4",
21990
- "drizzle-zod": "^0.8.2",
21991
- "exit-hook": "^4.0.0",
21992
- hono: "^4.8.10",
21993
- jmespath: "^0.16.0",
21994
- keytar: "^7.9.0",
21995
- nanoid: "^5.0.9",
21996
- "ts-pattern": "^5.7.1",
21997
- zod: "^4.1.5"
21998
- },
21999
- devDependencies: {
22000
- "@types/jmespath": "^0.15.2",
22001
- "@types/node": "^20.11.24",
22002
- "@vitest/coverage-v8": "^2.0.0",
22003
- "clean-package": "^2.2.0",
22004
- "drizzle-kit": "^0.31.4",
22005
- typescript: "^5.9.2",
22006
- vitest: "^3.1.4"
22007
- },
22008
- engines: {
22009
- node: ">=22.0.0"
22010
- },
22011
- publishConfig: {
22012
- access: "restricted",
22013
- registry: "https://registry.npmjs.org/"
22014
- },
22015
- files: [
22016
- "dist",
22017
- "README.md",
22018
- "LICENSE.md",
22019
- "SUPPLEMENTAL_TERMS.md"
22020
- ],
22021
- repository: {
22022
- type: "git",
22023
- url: "git+https://github.com/inkeep/agents.git",
22024
- directory: "packages/agents-core"
22025
- }
22026
- };
22027
-
22028
- // ../packages/agents-core/src/utils/tracer.ts
22029
- var tracer = getTracer("agents-core", package_default.version);
22062
+ var tracer = getTracer("agents-core");
22030
22063
 
22031
22064
  // ../packages/agents-core/src/context/contextCache.ts
22032
22065
  init_esm_shims();
@@ -22351,7 +22384,7 @@ var packageJsonPath = join6(__dirname2, "..", "package.json");
22351
22384
  var packageJson = JSON.parse(readFileSync2(packageJsonPath, "utf-8"));
22352
22385
  var program = new Command();
22353
22386
  program.name("inkeep").description("CLI tool for Inkeep Agent Framework").version(packageJson.version);
22354
- program.command("create [directory]").description("Create a new Inkeep Agent Framework Starter Directory").option("--tenant-id <tenant-id>", "Tenant ID").option("--project-id <project-id>", "Project ID").option("--openai-key <openai-key>", "OpenAI API key").option("--anthropic-key <anthropic-key>", "Anthropic API key").option("--manage-api-port <port>", "Management API port", "3002").option("--run-api-port <port>", "Run API port", "3003").action(async (directory, options) => {
22387
+ program.command("create [directory]").description("Create a new Inkeep Agent Framework Starter Directory").option("--tenant-id <tenant-id>", "Tenant ID").option("--project-id <project-id>", "Project ID").option("--openai-key <openai-key>", "OpenAI API key").option("--anthropic-key <anthropic-key>", "Anthropic API key").option("--manage-api-port <port>", "Manage API port", "3002").option("--run-api-port <port>", "Run API port", "3003").action(async (directory, options) => {
22355
22388
  await createCommand(directory, options);
22356
22389
  });
22357
22390
  program.command("init [path]").description("Initialize a new Inkeep configuration file").option("--no-interactive", "Skip interactive path selection").action(async (path3, options) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-cli",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Inkeep CLI tool",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -42,8 +42,8 @@
42
42
  "recast": "^0.23.0",
43
43
  "ts-morph": "^26.0.0",
44
44
  "tsx": "^4.20.5",
45
- "@inkeep/agents-core": "^0.1.6",
46
- "@inkeep/agents-manage-ui": "^0.1.6"
45
+ "@inkeep/agents-core": "^0.1.7",
46
+ "@inkeep/agents-manage-ui": "^0.1.7"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/fs-extra": "^11.0.4",