@inkeep/agents-cli 0.19.0 → 0.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +262 -74
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -79,7 +79,7 @@ var init_models = __esm({
|
|
|
79
79
|
init_esm_shims();
|
|
80
80
|
ANTHROPIC_MODELS = {
|
|
81
81
|
CLAUDE_OPUS_4_1: "anthropic/claude-opus-4-1-20250805",
|
|
82
|
-
CLAUDE_SONNET_4_5: "anthropic/claude-sonnet-4
|
|
82
|
+
CLAUDE_SONNET_4_5: "anthropic/claude-sonnet-4-5-20250929",
|
|
83
83
|
CLAUDE_SONNET_4: "anthropic/claude-sonnet-4-20250514",
|
|
84
84
|
CLAUDE_3_5_SONNET: "anthropic/claude-3-5-sonnet-20241022",
|
|
85
85
|
CLAUDE_3_5_HAIKU: "anthropic/claude-3-5-haiku-20241022"
|
|
@@ -2472,7 +2472,7 @@ var init_utility = __esm({
|
|
|
2472
2472
|
});
|
|
2473
2473
|
|
|
2474
2474
|
// ../packages/agents-core/src/validation/schemas.ts
|
|
2475
|
-
var StopWhenSchema, AgentStopWhenSchema, SubAgentStopWhenSchema, MIN_ID_LENGTH, MAX_ID_LENGTH, URL_SAFE_ID_PATTERN, resourceIdSchema, ModelSettingsSchema, ModelSchema, ProjectModelSchema, SandboxConfigSchema, FunctionToolConfigSchema, createApiSchema, createApiInsertSchema, createApiUpdateSchema, createAgentScopedApiSchema, createAgentScopedApiInsertSchema, createAgentScopedApiUpdateSchema, SubAgentSelectSchema, SubAgentInsertSchema, SubAgentUpdateSchema, SubAgentApiSelectSchema, SubAgentApiInsertSchema, SubAgentApiUpdateSchema, SubAgentRelationSelectSchema, SubAgentRelationInsertSchema, SubAgentRelationUpdateSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiInsertSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationQuerySchema, ExternalSubAgentRelationInsertSchema, ExternalSubAgentRelationApiInsertSchema, AgentSelectSchema, AgentInsertSchema, AgentUpdateSchema, AgentApiSelectSchema, AgentApiInsertSchema, AgentApiUpdateSchema, 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, SubAgentDataComponentSelectSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentUpdateSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiUpdateSchema, ArtifactComponentSelectSchema, ArtifactComponentInsertSchema, ArtifactComponentUpdateSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiUpdateSchema, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentUpdateSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiUpdateSchema, 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, FunctionToolSelectSchema, FunctionToolInsertSchema, FunctionToolUpdateSchema, FunctionToolApiSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiUpdateSchema, FunctionSelectSchema, FunctionInsertSchema, FunctionUpdateSchema, FunctionApiSelectSchema, FunctionApiInsertSchema, FunctionApiUpdateSchema, FetchConfigSchema, FetchDefinitionSchema, ContextConfigSelectSchema, ContextConfigInsertSchema, ContextConfigUpdateSchema, ContextConfigApiSelectSchema, ContextConfigApiInsertSchema, ContextConfigApiUpdateSchema, SubAgentToolRelationSelectSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationUpdateSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiUpdateSchema, LedgerArtifactSelectSchema, LedgerArtifactInsertSchema, LedgerArtifactUpdateSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiUpdateSchema, StatusComponentSchema, StatusUpdateSchema, CanUseItemSchema, FullAgentAgentInsertSchema, AgentWithinContextOfProjectSchema, PaginationSchema, ErrorResponseSchema, ExistsResponseSchema, RemovedResponseSchema, ProjectSelectSchema, ProjectInsertSchema, ProjectUpdateSchema, ProjectApiSelectSchema, ProjectApiInsertSchema, ProjectApiUpdateSchema, FullProjectDefinitionSchema, HeadersScopeSchema, TenantId, ProjectId, AgentId, SubAgentId, TenantParamsSchema, TenantIdParamsSchema, TenantProjectParamsSchema, TenantProjectIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, PaginationQueryParamsSchema;
|
|
2475
|
+
var StopWhenSchema, AgentStopWhenSchema, SubAgentStopWhenSchema, MIN_ID_LENGTH, MAX_ID_LENGTH, URL_SAFE_ID_PATTERN, resourceIdSchema, ModelSettingsSchema, ModelSchema, ProjectModelSchema, SandboxConfigSchema, FunctionToolConfigSchema, createApiSchema, createApiInsertSchema, createApiUpdateSchema, createAgentScopedApiSchema, createAgentScopedApiInsertSchema, createAgentScopedApiUpdateSchema, SubAgentSelectSchema, SubAgentInsertSchema, SubAgentUpdateSchema, SubAgentApiSelectSchema, SubAgentApiInsertSchema, SubAgentApiUpdateSchema, SubAgentRelationSelectSchema, SubAgentRelationInsertSchema, SubAgentRelationUpdateSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiInsertSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationQuerySchema, ExternalSubAgentRelationInsertSchema, ExternalSubAgentRelationApiInsertSchema, AgentSelectSchema, AgentInsertSchema, AgentUpdateSchema, AgentApiSelectSchema, AgentApiInsertSchema, AgentApiUpdateSchema, 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, SubAgentDataComponentSelectSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentUpdateSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiUpdateSchema, ArtifactComponentSelectSchema, ArtifactComponentInsertSchema, ArtifactComponentUpdateSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiUpdateSchema, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentUpdateSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiUpdateSchema, ExternalAgentSelectSchema, ExternalAgentInsertSchema, ExternalAgentUpdateSchema, ExternalAgentApiSelectSchema, ExternalAgentApiInsertSchema, ExternalAgentApiUpdateSchema, AllAgentSchema, ApiKeySelectSchema, ApiKeyInsertSchema, ApiKeyUpdateSchema, ApiKeyApiSelectSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiUpdateSchema, CredentialReferenceSelectSchema, CredentialReferenceInsertSchema, CredentialReferenceUpdateSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiUpdateSchema, McpToolSchema, MCPToolConfigSchema, ToolUpdateSchema, ToolApiSelectSchema, ToolApiInsertSchema, ToolApiUpdateSchema, FunctionToolSelectSchema, FunctionToolInsertSchema, FunctionToolUpdateSchema, FunctionToolApiSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiUpdateSchema, FunctionSelectSchema, FunctionInsertSchema, FunctionUpdateSchema, FunctionApiSelectSchema, FunctionApiInsertSchema, FunctionApiUpdateSchema, FetchConfigSchema, FetchDefinitionSchema, ContextConfigSelectSchema, ContextConfigInsertSchema, ContextConfigUpdateSchema, ContextConfigApiSelectSchema, ContextConfigApiInsertSchema, ContextConfigApiUpdateSchema, SubAgentToolRelationSelectSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationUpdateSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiUpdateSchema, LedgerArtifactSelectSchema, LedgerArtifactInsertSchema, LedgerArtifactUpdateSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiUpdateSchema, StatusComponentSchema, StatusUpdateSchema, CanUseItemSchema, FullAgentAgentInsertSchema, AgentWithinContextOfProjectSchema, PaginationSchema, ErrorResponseSchema, ExistsResponseSchema, RemovedResponseSchema, ProjectSelectSchema, ProjectInsertSchema, ProjectUpdateSchema, ProjectApiSelectSchema, ProjectApiInsertSchema, ProjectApiUpdateSchema, FullProjectDefinitionSchema, ProjectResponse, SubAgentResponse, AgentResponse, ToolResponse, ExternalAgentResponse, ContextConfigResponse, ApiKeyResponse, CredentialReferenceResponse, FunctionResponse, FunctionToolResponse, DataComponentResponse, ArtifactComponentResponse, SubAgentRelationResponse, SubAgentToolRelationResponse, ConversationResponse, MessageResponse, ProjectListResponse, SubAgentListResponse, AgentListResponse, ToolListResponse, ExternalAgentListResponse, ContextConfigListResponse, ApiKeyListResponse, CredentialReferenceListResponse, FunctionListResponse, FunctionToolListResponse, DataComponentListResponse, ArtifactComponentListResponse, SubAgentRelationListResponse, SubAgentToolRelationListResponse, ConversationListResponse, MessageListResponse, SubAgentDataComponentResponse, SubAgentArtifactComponentResponse, SubAgentDataComponentListResponse, SubAgentArtifactComponentListResponse, HeadersScopeSchema, TenantId, ProjectId, AgentId, SubAgentId, TenantParamsSchema, TenantIdParamsSchema, TenantProjectParamsSchema, TenantProjectIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, PaginationQueryParamsSchema;
|
|
2476
2476
|
var init_schemas = __esm({
|
|
2477
2477
|
"../packages/agents-core/src/validation/schemas.ts"() {
|
|
2478
2478
|
"use strict";
|
|
@@ -2484,9 +2484,13 @@ var init_schemas = __esm({
|
|
|
2484
2484
|
StopWhenSchema = z2.object({
|
|
2485
2485
|
transferCountIs: z2.number().min(1).max(100).optional(),
|
|
2486
2486
|
stepCountIs: z2.number().min(1).max(1e3).optional()
|
|
2487
|
-
});
|
|
2488
|
-
AgentStopWhenSchema = StopWhenSchema.pick({ transferCountIs: true })
|
|
2489
|
-
|
|
2487
|
+
}).openapi("StopWhen");
|
|
2488
|
+
AgentStopWhenSchema = StopWhenSchema.pick({ transferCountIs: true }).openapi(
|
|
2489
|
+
"AgentStopWhen"
|
|
2490
|
+
);
|
|
2491
|
+
SubAgentStopWhenSchema = StopWhenSchema.pick({ stepCountIs: true }).openapi(
|
|
2492
|
+
"SubAgentStopWhen"
|
|
2493
|
+
);
|
|
2490
2494
|
MIN_ID_LENGTH = 1;
|
|
2491
2495
|
MAX_ID_LENGTH = 255;
|
|
2492
2496
|
URL_SAFE_ID_PATTERN = /^[a-zA-Z0-9\-_.]+$/;
|
|
@@ -2499,23 +2503,23 @@ var init_schemas = __esm({
|
|
|
2499
2503
|
ModelSettingsSchema = z2.object({
|
|
2500
2504
|
model: z2.string().optional(),
|
|
2501
2505
|
providerOptions: z2.record(z2.string(), z2.any()).optional()
|
|
2502
|
-
});
|
|
2506
|
+
}).openapi("ModelSettings");
|
|
2503
2507
|
ModelSchema = z2.object({
|
|
2504
2508
|
base: ModelSettingsSchema.optional(),
|
|
2505
2509
|
structuredOutput: ModelSettingsSchema.optional(),
|
|
2506
2510
|
summarizer: ModelSettingsSchema.optional()
|
|
2507
|
-
});
|
|
2511
|
+
}).openapi("Model");
|
|
2508
2512
|
ProjectModelSchema = z2.object({
|
|
2509
2513
|
base: ModelSettingsSchema,
|
|
2510
2514
|
structuredOutput: ModelSettingsSchema.optional(),
|
|
2511
2515
|
summarizer: ModelSettingsSchema.optional()
|
|
2512
|
-
});
|
|
2516
|
+
}).openapi("ProjectModel");
|
|
2513
2517
|
SandboxConfigSchema = z2.object({
|
|
2514
2518
|
provider: z2.enum(["vercel", "local"]),
|
|
2515
2519
|
runtime: z2.enum(["node22", "typescript"]),
|
|
2516
2520
|
timeout: z2.number().min(1e3).max(3e5).optional(),
|
|
2517
2521
|
vcpus: z2.number().min(1).max(8).optional()
|
|
2518
|
-
});
|
|
2522
|
+
}).openapi("SandboxConfig");
|
|
2519
2523
|
FunctionToolConfigSchema = z2.object({
|
|
2520
2524
|
name: z2.string(),
|
|
2521
2525
|
description: z2.string(),
|
|
@@ -2535,9 +2539,15 @@ var init_schemas = __esm({
|
|
|
2535
2539
|
models: ModelSchema.optional()
|
|
2536
2540
|
});
|
|
2537
2541
|
SubAgentUpdateSchema = SubAgentInsertSchema.partial();
|
|
2538
|
-
SubAgentApiSelectSchema = createAgentScopedApiSchema(SubAgentSelectSchema)
|
|
2539
|
-
|
|
2540
|
-
|
|
2542
|
+
SubAgentApiSelectSchema = createAgentScopedApiSchema(SubAgentSelectSchema).openapi(
|
|
2543
|
+
"SubAgent"
|
|
2544
|
+
);
|
|
2545
|
+
SubAgentApiInsertSchema = createAgentScopedApiInsertSchema(
|
|
2546
|
+
SubAgentInsertSchema
|
|
2547
|
+
).openapi("SubAgentCreate");
|
|
2548
|
+
SubAgentApiUpdateSchema = createAgentScopedApiUpdateSchema(
|
|
2549
|
+
SubAgentUpdateSchema
|
|
2550
|
+
).openapi("SubAgentUpdate");
|
|
2541
2551
|
SubAgentRelationSelectSchema = createSelectSchema(subAgentRelations);
|
|
2542
2552
|
SubAgentRelationInsertSchema = createInsertSchema(subAgentRelations).extend({
|
|
2543
2553
|
id: resourceIdSchema,
|
|
@@ -2549,7 +2559,7 @@ var init_schemas = __esm({
|
|
|
2549
2559
|
SubAgentRelationUpdateSchema = SubAgentRelationInsertSchema.partial();
|
|
2550
2560
|
SubAgentRelationApiSelectSchema = createAgentScopedApiSchema(
|
|
2551
2561
|
SubAgentRelationSelectSchema
|
|
2552
|
-
);
|
|
2562
|
+
).openapi("SubAgentRelation");
|
|
2553
2563
|
SubAgentRelationApiInsertSchema = createAgentScopedApiInsertSchema(
|
|
2554
2564
|
SubAgentRelationInsertSchema
|
|
2555
2565
|
).extend({
|
|
@@ -2564,7 +2574,7 @@ var init_schemas = __esm({
|
|
|
2564
2574
|
message: "Must specify exactly one of targetSubAgentId or externalSubAgentId",
|
|
2565
2575
|
path: ["targetSubAgentId", "externalSubAgentId"]
|
|
2566
2576
|
}
|
|
2567
|
-
);
|
|
2577
|
+
).openapi("SubAgentRelationCreate");
|
|
2568
2578
|
SubAgentRelationApiUpdateSchema = createAgentScopedApiUpdateSchema(
|
|
2569
2579
|
SubAgentRelationUpdateSchema
|
|
2570
2580
|
).extend({
|
|
@@ -2582,7 +2592,7 @@ var init_schemas = __esm({
|
|
|
2582
2592
|
message: "Must specify exactly one of targetSubAgentId or externalSubAgentId when updating sub-agent relationships",
|
|
2583
2593
|
path: ["targetSubAgentId", "externalSubAgentId"]
|
|
2584
2594
|
}
|
|
2585
|
-
);
|
|
2595
|
+
).openapi("SubAgentRelationUpdate");
|
|
2586
2596
|
SubAgentRelationQuerySchema = z2.object({
|
|
2587
2597
|
sourceSubAgentId: z2.string().optional(),
|
|
2588
2598
|
targetSubAgentId: z2.string().optional(),
|
|
@@ -2602,11 +2612,13 @@ var init_schemas = __esm({
|
|
|
2602
2612
|
id: resourceIdSchema
|
|
2603
2613
|
});
|
|
2604
2614
|
AgentUpdateSchema = AgentInsertSchema.partial();
|
|
2605
|
-
AgentApiSelectSchema = createApiSchema(AgentSelectSchema);
|
|
2615
|
+
AgentApiSelectSchema = createApiSchema(AgentSelectSchema).openapi("Agent");
|
|
2606
2616
|
AgentApiInsertSchema = createApiInsertSchema(AgentInsertSchema).extend({
|
|
2607
2617
|
id: resourceIdSchema
|
|
2608
|
-
});
|
|
2609
|
-
AgentApiUpdateSchema = createApiUpdateSchema(AgentUpdateSchema)
|
|
2618
|
+
}).openapi("AgentCreate");
|
|
2619
|
+
AgentApiUpdateSchema = createApiUpdateSchema(AgentUpdateSchema).openapi(
|
|
2620
|
+
"AgentUpdate"
|
|
2621
|
+
);
|
|
2610
2622
|
TaskSelectSchema = createSelectSchema(tasks);
|
|
2611
2623
|
TaskInsertSchema = createInsertSchema(tasks).extend({
|
|
2612
2624
|
id: resourceIdSchema,
|
|
@@ -2654,7 +2666,7 @@ var init_schemas = __esm({
|
|
|
2654
2666
|
description: "Reconnection options for streamable HTTP transport"
|
|
2655
2667
|
}),
|
|
2656
2668
|
sessionId: z2.string().optional()
|
|
2657
|
-
});
|
|
2669
|
+
}).openapi("McpTransportConfig");
|
|
2658
2670
|
ToolStatusSchema = z2.enum(TOOL_STATUS_VALUES);
|
|
2659
2671
|
McpToolDefinitionSchema = z2.object({
|
|
2660
2672
|
name: z2.string(),
|
|
@@ -2691,9 +2703,15 @@ var init_schemas = __esm({
|
|
|
2691
2703
|
contextConfigId: resourceIdSchema.optional()
|
|
2692
2704
|
});
|
|
2693
2705
|
ConversationUpdateSchema = ConversationInsertSchema.partial();
|
|
2694
|
-
ConversationApiSelectSchema = createApiSchema(ConversationSelectSchema)
|
|
2695
|
-
|
|
2696
|
-
|
|
2706
|
+
ConversationApiSelectSchema = createApiSchema(ConversationSelectSchema).openapi(
|
|
2707
|
+
"Conversation"
|
|
2708
|
+
);
|
|
2709
|
+
ConversationApiInsertSchema = createApiInsertSchema(ConversationInsertSchema).openapi(
|
|
2710
|
+
"ConversationCreate"
|
|
2711
|
+
);
|
|
2712
|
+
ConversationApiUpdateSchema = createApiUpdateSchema(ConversationUpdateSchema).openapi(
|
|
2713
|
+
"ConversationUpdate"
|
|
2714
|
+
);
|
|
2697
2715
|
MessageSelectSchema = createSelectSchema(messages);
|
|
2698
2716
|
MessageInsertSchema = createInsertSchema(messages).extend({
|
|
2699
2717
|
id: resourceIdSchema,
|
|
@@ -2701,9 +2719,13 @@ var init_schemas = __esm({
|
|
|
2701
2719
|
taskId: resourceIdSchema.optional()
|
|
2702
2720
|
});
|
|
2703
2721
|
MessageUpdateSchema = MessageInsertSchema.partial();
|
|
2704
|
-
MessageApiSelectSchema = createApiSchema(MessageSelectSchema);
|
|
2705
|
-
MessageApiInsertSchema = createApiInsertSchema(MessageInsertSchema)
|
|
2706
|
-
|
|
2722
|
+
MessageApiSelectSchema = createApiSchema(MessageSelectSchema).openapi("Message");
|
|
2723
|
+
MessageApiInsertSchema = createApiInsertSchema(MessageInsertSchema).openapi(
|
|
2724
|
+
"MessageCreate"
|
|
2725
|
+
);
|
|
2726
|
+
MessageApiUpdateSchema = createApiUpdateSchema(MessageUpdateSchema).openapi(
|
|
2727
|
+
"MessageUpdate"
|
|
2728
|
+
);
|
|
2707
2729
|
ContextCacheSelectSchema = createSelectSchema(contextCache);
|
|
2708
2730
|
ContextCacheInsertSchema = createInsertSchema(contextCache);
|
|
2709
2731
|
ContextCacheUpdateSchema = ContextCacheInsertSchema.partial();
|
|
@@ -2719,9 +2741,15 @@ var init_schemas = __esm({
|
|
|
2719
2741
|
updatedAt: true
|
|
2720
2742
|
});
|
|
2721
2743
|
DataComponentUpdateSchema = DataComponentInsertSchema.partial();
|
|
2722
|
-
DataComponentApiSelectSchema = createApiSchema(
|
|
2723
|
-
|
|
2724
|
-
|
|
2744
|
+
DataComponentApiSelectSchema = createApiSchema(
|
|
2745
|
+
DataComponentSelectSchema
|
|
2746
|
+
).openapi("DataComponent");
|
|
2747
|
+
DataComponentApiInsertSchema = createApiInsertSchema(
|
|
2748
|
+
DataComponentInsertSchema
|
|
2749
|
+
).openapi("DataComponentCreate");
|
|
2750
|
+
DataComponentApiUpdateSchema = createApiUpdateSchema(
|
|
2751
|
+
DataComponentUpdateSchema
|
|
2752
|
+
).openapi("DataComponentUpdate");
|
|
2725
2753
|
SubAgentDataComponentSelectSchema = createSelectSchema(subAgentDataComponents);
|
|
2726
2754
|
SubAgentDataComponentInsertSchema = createInsertSchema(subAgentDataComponents);
|
|
2727
2755
|
SubAgentDataComponentUpdateSchema = SubAgentDataComponentInsertSchema.partial();
|
|
@@ -2742,16 +2770,18 @@ var init_schemas = __esm({
|
|
|
2742
2770
|
id: resourceIdSchema
|
|
2743
2771
|
});
|
|
2744
2772
|
ArtifactComponentUpdateSchema = ArtifactComponentInsertSchema.partial();
|
|
2745
|
-
ArtifactComponentApiSelectSchema = createApiSchema(
|
|
2773
|
+
ArtifactComponentApiSelectSchema = createApiSchema(
|
|
2774
|
+
ArtifactComponentSelectSchema
|
|
2775
|
+
).openapi("ArtifactComponent");
|
|
2746
2776
|
ArtifactComponentApiInsertSchema = ArtifactComponentInsertSchema.omit({
|
|
2747
2777
|
tenantId: true,
|
|
2748
2778
|
projectId: true,
|
|
2749
2779
|
createdAt: true,
|
|
2750
2780
|
updatedAt: true
|
|
2751
|
-
});
|
|
2781
|
+
}).openapi("ArtifactComponentCreate");
|
|
2752
2782
|
ArtifactComponentApiUpdateSchema = createApiUpdateSchema(
|
|
2753
2783
|
ArtifactComponentUpdateSchema
|
|
2754
|
-
);
|
|
2784
|
+
).openapi("ArtifactComponentUpdate");
|
|
2755
2785
|
SubAgentArtifactComponentSelectSchema = createSelectSchema(subAgentArtifactComponents);
|
|
2756
2786
|
SubAgentArtifactComponentInsertSchema = createInsertSchema(
|
|
2757
2787
|
subAgentArtifactComponents
|
|
@@ -2781,9 +2811,15 @@ var init_schemas = __esm({
|
|
|
2781
2811
|
id: resourceIdSchema
|
|
2782
2812
|
});
|
|
2783
2813
|
ExternalAgentUpdateSchema = ExternalAgentInsertSchema.partial();
|
|
2784
|
-
ExternalAgentApiSelectSchema = createAgentScopedApiSchema(
|
|
2785
|
-
|
|
2786
|
-
|
|
2814
|
+
ExternalAgentApiSelectSchema = createAgentScopedApiSchema(
|
|
2815
|
+
ExternalAgentSelectSchema
|
|
2816
|
+
).openapi("ExternalAgent");
|
|
2817
|
+
ExternalAgentApiInsertSchema = createAgentScopedApiInsertSchema(
|
|
2818
|
+
ExternalAgentInsertSchema
|
|
2819
|
+
).openapi("ExternalAgentCreate");
|
|
2820
|
+
ExternalAgentApiUpdateSchema = createAgentScopedApiUpdateSchema(
|
|
2821
|
+
ExternalAgentUpdateSchema
|
|
2822
|
+
).openapi("ExternalAgentUpdate");
|
|
2787
2823
|
AllAgentSchema = z2.discriminatedUnion("type", [
|
|
2788
2824
|
SubAgentApiSelectSchema.extend({ type: z2.literal("internal") }),
|
|
2789
2825
|
ExternalAgentApiSelectSchema.extend({ type: z2.literal("external") })
|
|
@@ -2807,7 +2843,7 @@ var init_schemas = __esm({
|
|
|
2807
2843
|
projectId: true,
|
|
2808
2844
|
keyHash: true
|
|
2809
2845
|
// Never expose the hash
|
|
2810
|
-
});
|
|
2846
|
+
}).openapi("ApiKey");
|
|
2811
2847
|
ApiKeyApiCreationResponseSchema = z2.object({
|
|
2812
2848
|
data: z2.object({
|
|
2813
2849
|
apiKey: ApiKeyApiSelectSchema,
|
|
@@ -2827,7 +2863,8 @@ var init_schemas = __esm({
|
|
|
2827
2863
|
// Auto-generated
|
|
2828
2864
|
lastUsedAt: true
|
|
2829
2865
|
// Not set on creation
|
|
2830
|
-
});
|
|
2866
|
+
}).openapi("ApiKeyCreate");
|
|
2867
|
+
ApiKeyApiUpdateSchema = ApiKeyUpdateSchema.openapi("ApiKeyUpdate");
|
|
2831
2868
|
CredentialReferenceSelectSchema = z2.object({
|
|
2832
2869
|
id: z2.string(),
|
|
2833
2870
|
tenantId: z2.string(),
|
|
@@ -2850,17 +2887,17 @@ var init_schemas = __esm({
|
|
|
2850
2887
|
).extend({
|
|
2851
2888
|
type: z2.enum(CredentialStoreType),
|
|
2852
2889
|
tools: z2.array(ToolSelectSchema).optional()
|
|
2853
|
-
});
|
|
2890
|
+
}).openapi("CredentialReference");
|
|
2854
2891
|
CredentialReferenceApiInsertSchema = createApiInsertSchema(
|
|
2855
2892
|
CredentialReferenceInsertSchema
|
|
2856
2893
|
).extend({
|
|
2857
2894
|
type: z2.enum(CredentialStoreType)
|
|
2858
|
-
});
|
|
2895
|
+
}).openapi("CredentialReferenceCreate");
|
|
2859
2896
|
CredentialReferenceApiUpdateSchema = createApiUpdateSchema(
|
|
2860
2897
|
CredentialReferenceUpdateSchema
|
|
2861
2898
|
).extend({
|
|
2862
2899
|
type: z2.enum(CredentialStoreType).optional()
|
|
2863
|
-
});
|
|
2900
|
+
}).openapi("CredentialReferenceUpdate");
|
|
2864
2901
|
McpToolSchema = ToolInsertSchema.extend({
|
|
2865
2902
|
imageUrl: imageUrlSchema,
|
|
2866
2903
|
availableTools: z2.array(McpToolDefinitionSchema).optional(),
|
|
@@ -2889,25 +2926,35 @@ var init_schemas = __esm({
|
|
|
2889
2926
|
credential: CredentialReferenceApiInsertSchema.optional()
|
|
2890
2927
|
});
|
|
2891
2928
|
ToolUpdateSchema = ToolInsertSchema.partial();
|
|
2892
|
-
ToolApiSelectSchema = createApiSchema(ToolSelectSchema);
|
|
2893
|
-
ToolApiInsertSchema = createApiInsertSchema(ToolInsertSchema);
|
|
2894
|
-
ToolApiUpdateSchema = createApiUpdateSchema(ToolUpdateSchema);
|
|
2929
|
+
ToolApiSelectSchema = createApiSchema(ToolSelectSchema).openapi("Tool");
|
|
2930
|
+
ToolApiInsertSchema = createApiInsertSchema(ToolInsertSchema).openapi("ToolCreate");
|
|
2931
|
+
ToolApiUpdateSchema = createApiUpdateSchema(ToolUpdateSchema).openapi("ToolUpdate");
|
|
2895
2932
|
FunctionToolSelectSchema = createSelectSchema(functionTools);
|
|
2896
2933
|
FunctionToolInsertSchema = createInsertSchema(functionTools).extend({
|
|
2897
2934
|
id: resourceIdSchema
|
|
2898
2935
|
});
|
|
2899
2936
|
FunctionToolUpdateSchema = FunctionToolInsertSchema.partial();
|
|
2900
|
-
FunctionToolApiSelectSchema = createApiSchema(FunctionToolSelectSchema)
|
|
2901
|
-
|
|
2902
|
-
|
|
2937
|
+
FunctionToolApiSelectSchema = createApiSchema(FunctionToolSelectSchema).openapi(
|
|
2938
|
+
"FunctionTool"
|
|
2939
|
+
);
|
|
2940
|
+
FunctionToolApiInsertSchema = createAgentScopedApiInsertSchema(
|
|
2941
|
+
FunctionToolInsertSchema
|
|
2942
|
+
).openapi("FunctionToolCreate");
|
|
2943
|
+
FunctionToolApiUpdateSchema = createApiUpdateSchema(
|
|
2944
|
+
FunctionToolUpdateSchema
|
|
2945
|
+
).openapi("FunctionToolUpdate");
|
|
2903
2946
|
FunctionSelectSchema = createSelectSchema(functions);
|
|
2904
2947
|
FunctionInsertSchema = createInsertSchema(functions).extend({
|
|
2905
2948
|
id: resourceIdSchema
|
|
2906
2949
|
});
|
|
2907
2950
|
FunctionUpdateSchema = FunctionInsertSchema.partial();
|
|
2908
|
-
FunctionApiSelectSchema = createApiSchema(FunctionSelectSchema);
|
|
2909
|
-
FunctionApiInsertSchema = createApiInsertSchema(FunctionInsertSchema)
|
|
2910
|
-
|
|
2951
|
+
FunctionApiSelectSchema = createApiSchema(FunctionSelectSchema).openapi("Function");
|
|
2952
|
+
FunctionApiInsertSchema = createApiInsertSchema(FunctionInsertSchema).openapi(
|
|
2953
|
+
"FunctionCreate"
|
|
2954
|
+
);
|
|
2955
|
+
FunctionApiUpdateSchema = createApiUpdateSchema(FunctionUpdateSchema).openapi(
|
|
2956
|
+
"FunctionUpdate"
|
|
2957
|
+
);
|
|
2911
2958
|
FetchConfigSchema = z2.object({
|
|
2912
2959
|
url: z2.string().min(1, "URL is required"),
|
|
2913
2960
|
method: z2.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().default("GET"),
|
|
@@ -2916,7 +2963,7 @@ var init_schemas = __esm({
|
|
|
2916
2963
|
transform: z2.string().optional(),
|
|
2917
2964
|
// JSONPath or JS transform function
|
|
2918
2965
|
timeout: z2.number().min(0).optional().default(1e4).optional()
|
|
2919
|
-
});
|
|
2966
|
+
}).openapi("FetchConfig");
|
|
2920
2967
|
FetchDefinitionSchema = z2.object({
|
|
2921
2968
|
id: z2.string().min(1, "Fetch definition ID is required"),
|
|
2922
2969
|
name: z2.string().optional(),
|
|
@@ -2928,7 +2975,7 @@ var init_schemas = __esm({
|
|
|
2928
2975
|
description: "Default value if fetch fails"
|
|
2929
2976
|
}),
|
|
2930
2977
|
credential: CredentialReferenceApiInsertSchema.optional()
|
|
2931
|
-
});
|
|
2978
|
+
}).openapi("FetchDefinition");
|
|
2932
2979
|
ContextConfigSelectSchema = createSelectSchema(contextConfigs).extend({
|
|
2933
2980
|
headersSchema: z2.any().optional().openapi({
|
|
2934
2981
|
type: "object",
|
|
@@ -2952,13 +2999,13 @@ var init_schemas = __esm({
|
|
|
2952
2999
|
ContextConfigUpdateSchema = ContextConfigInsertSchema.partial();
|
|
2953
3000
|
ContextConfigApiSelectSchema = createApiSchema(ContextConfigSelectSchema).omit({
|
|
2954
3001
|
agentId: true
|
|
2955
|
-
});
|
|
3002
|
+
}).openapi("ContextConfig");
|
|
2956
3003
|
ContextConfigApiInsertSchema = createApiInsertSchema(ContextConfigInsertSchema).omit({
|
|
2957
3004
|
agentId: true
|
|
2958
|
-
});
|
|
3005
|
+
}).openapi("ContextConfigCreate");
|
|
2959
3006
|
ContextConfigApiUpdateSchema = createApiUpdateSchema(ContextConfigUpdateSchema).omit({
|
|
2960
3007
|
agentId: true
|
|
2961
|
-
});
|
|
3008
|
+
}).openapi("ContextConfigUpdate");
|
|
2962
3009
|
SubAgentToolRelationSelectSchema = createSelectSchema(subAgentToolRelations);
|
|
2963
3010
|
SubAgentToolRelationInsertSchema = createInsertSchema(subAgentToolRelations).extend({
|
|
2964
3011
|
id: resourceIdSchema,
|
|
@@ -2970,13 +3017,13 @@ var init_schemas = __esm({
|
|
|
2970
3017
|
SubAgentToolRelationUpdateSchema = SubAgentToolRelationInsertSchema.partial();
|
|
2971
3018
|
SubAgentToolRelationApiSelectSchema = createAgentScopedApiSchema(
|
|
2972
3019
|
SubAgentToolRelationSelectSchema
|
|
2973
|
-
);
|
|
3020
|
+
).openapi("SubAgentToolRelation");
|
|
2974
3021
|
SubAgentToolRelationApiInsertSchema = createAgentScopedApiInsertSchema(
|
|
2975
3022
|
SubAgentToolRelationInsertSchema
|
|
2976
|
-
);
|
|
3023
|
+
).openapi("SubAgentToolRelationCreate");
|
|
2977
3024
|
SubAgentToolRelationApiUpdateSchema = createAgentScopedApiUpdateSchema(
|
|
2978
3025
|
SubAgentToolRelationUpdateSchema
|
|
2979
|
-
);
|
|
3026
|
+
).openapi("SubAgentToolRelationUpdate");
|
|
2980
3027
|
LedgerArtifactSelectSchema = createSelectSchema(ledgerArtifacts);
|
|
2981
3028
|
LedgerArtifactInsertSchema = createInsertSchema(ledgerArtifacts);
|
|
2982
3029
|
LedgerArtifactUpdateSchema = LedgerArtifactInsertSchema.partial();
|
|
@@ -2991,20 +3038,20 @@ var init_schemas = __esm({
|
|
|
2991
3038
|
properties: z2.record(z2.string(), z2.any()),
|
|
2992
3039
|
required: z2.array(z2.string()).optional()
|
|
2993
3040
|
}).optional()
|
|
2994
|
-
});
|
|
3041
|
+
}).openapi("StatusComponent");
|
|
2995
3042
|
StatusUpdateSchema = z2.object({
|
|
2996
3043
|
enabled: z2.boolean().optional(),
|
|
2997
3044
|
numEvents: z2.number().min(1).max(100).optional(),
|
|
2998
3045
|
timeInSeconds: z2.number().min(1).max(600).optional(),
|
|
2999
3046
|
prompt: z2.string().max(2e3, "Custom prompt cannot exceed 2000 characters").optional(),
|
|
3000
3047
|
statusComponents: z2.array(StatusComponentSchema).optional()
|
|
3001
|
-
});
|
|
3048
|
+
}).openapi("StatusUpdate");
|
|
3002
3049
|
CanUseItemSchema = z2.object({
|
|
3003
3050
|
agentToolRelationId: z2.string().optional(),
|
|
3004
3051
|
toolId: z2.string(),
|
|
3005
3052
|
toolSelection: z2.array(z2.string()).nullish(),
|
|
3006
3053
|
headers: z2.record(z2.string(), z2.string()).nullish()
|
|
3007
|
-
});
|
|
3054
|
+
}).openapi("CanUseItem");
|
|
3008
3055
|
FullAgentAgentInsertSchema = SubAgentApiInsertSchema.extend({
|
|
3009
3056
|
type: z2.literal("internal"),
|
|
3010
3057
|
canUse: z2.array(CanUseItemSchema),
|
|
@@ -3037,21 +3084,21 @@ var init_schemas = __esm({
|
|
|
3037
3084
|
limit: z2.coerce.number().min(1).max(100).default(10),
|
|
3038
3085
|
total: z2.number(),
|
|
3039
3086
|
pages: z2.number()
|
|
3040
|
-
});
|
|
3087
|
+
}).openapi("Pagination");
|
|
3041
3088
|
ErrorResponseSchema = z2.object({
|
|
3042
3089
|
error: z2.string(),
|
|
3043
3090
|
message: z2.string().optional(),
|
|
3044
3091
|
details: z2.any().optional().openapi({
|
|
3045
3092
|
description: "Additional error details"
|
|
3046
3093
|
})
|
|
3047
|
-
});
|
|
3094
|
+
}).openapi("ErrorResponse");
|
|
3048
3095
|
ExistsResponseSchema = z2.object({
|
|
3049
3096
|
exists: z2.boolean()
|
|
3050
|
-
});
|
|
3097
|
+
}).openapi("ExistsResponse");
|
|
3051
3098
|
RemovedResponseSchema = z2.object({
|
|
3052
3099
|
message: z2.string(),
|
|
3053
3100
|
removed: z2.boolean()
|
|
3054
|
-
});
|
|
3101
|
+
}).openapi("RemovedResponse");
|
|
3055
3102
|
ProjectSelectSchema = createSelectSchema(projects);
|
|
3056
3103
|
ProjectInsertSchema = createInsertSchema(projects).extend({
|
|
3057
3104
|
models: ProjectModelSchema,
|
|
@@ -3062,9 +3109,15 @@ var init_schemas = __esm({
|
|
|
3062
3109
|
updatedAt: true
|
|
3063
3110
|
});
|
|
3064
3111
|
ProjectUpdateSchema = ProjectInsertSchema.partial();
|
|
3065
|
-
ProjectApiSelectSchema = ProjectSelectSchema.omit({ tenantId: true })
|
|
3066
|
-
|
|
3067
|
-
|
|
3112
|
+
ProjectApiSelectSchema = ProjectSelectSchema.omit({ tenantId: true }).openapi(
|
|
3113
|
+
"Project"
|
|
3114
|
+
);
|
|
3115
|
+
ProjectApiInsertSchema = ProjectInsertSchema.omit({ tenantId: true }).openapi(
|
|
3116
|
+
"ProjectCreate"
|
|
3117
|
+
);
|
|
3118
|
+
ProjectApiUpdateSchema = ProjectUpdateSchema.omit({ tenantId: true }).openapi(
|
|
3119
|
+
"ProjectUpdate"
|
|
3120
|
+
);
|
|
3068
3121
|
FullProjectDefinitionSchema = ProjectApiInsertSchema.extend({
|
|
3069
3122
|
agents: z2.record(z2.string(), AgentWithinContextOfProjectSchema),
|
|
3070
3123
|
tools: z2.record(z2.string(), ToolApiInsertSchema),
|
|
@@ -3076,6 +3129,96 @@ var init_schemas = __esm({
|
|
|
3076
3129
|
createdAt: z2.string().optional(),
|
|
3077
3130
|
updatedAt: z2.string().optional()
|
|
3078
3131
|
});
|
|
3132
|
+
ProjectResponse = z2.object({ data: ProjectApiSelectSchema }).openapi("ProjectResponse");
|
|
3133
|
+
SubAgentResponse = z2.object({ data: SubAgentApiSelectSchema }).openapi("SubAgentResponse");
|
|
3134
|
+
AgentResponse = z2.object({ data: AgentApiSelectSchema }).openapi("AgentResponse");
|
|
3135
|
+
ToolResponse = z2.object({ data: ToolApiSelectSchema }).openapi("ToolResponse");
|
|
3136
|
+
ExternalAgentResponse = z2.object({ data: ExternalAgentApiSelectSchema }).openapi("ExternalAgentResponse");
|
|
3137
|
+
ContextConfigResponse = z2.object({ data: ContextConfigApiSelectSchema }).openapi("ContextConfigResponse");
|
|
3138
|
+
ApiKeyResponse = z2.object({ data: ApiKeyApiSelectSchema }).openapi("ApiKeyResponse");
|
|
3139
|
+
CredentialReferenceResponse = z2.object({ data: CredentialReferenceApiSelectSchema }).openapi("CredentialReferenceResponse");
|
|
3140
|
+
FunctionResponse = z2.object({ data: FunctionApiSelectSchema }).openapi("FunctionResponse");
|
|
3141
|
+
FunctionToolResponse = z2.object({ data: FunctionToolApiSelectSchema }).openapi("FunctionToolResponse");
|
|
3142
|
+
DataComponentResponse = z2.object({ data: DataComponentApiSelectSchema }).openapi("DataComponentResponse");
|
|
3143
|
+
ArtifactComponentResponse = z2.object({ data: ArtifactComponentApiSelectSchema }).openapi("ArtifactComponentResponse");
|
|
3144
|
+
SubAgentRelationResponse = z2.object({ data: SubAgentRelationApiSelectSchema }).openapi("SubAgentRelationResponse");
|
|
3145
|
+
SubAgentToolRelationResponse = z2.object({ data: SubAgentToolRelationApiSelectSchema }).openapi("SubAgentToolRelationResponse");
|
|
3146
|
+
ConversationResponse = z2.object({ data: ConversationApiSelectSchema }).openapi("ConversationResponse");
|
|
3147
|
+
MessageResponse = z2.object({ data: MessageApiSelectSchema }).openapi("MessageResponse");
|
|
3148
|
+
ProjectListResponse = z2.object({
|
|
3149
|
+
data: z2.array(ProjectApiSelectSchema),
|
|
3150
|
+
pagination: PaginationSchema
|
|
3151
|
+
}).openapi("ProjectListResponse");
|
|
3152
|
+
SubAgentListResponse = z2.object({
|
|
3153
|
+
data: z2.array(SubAgentApiSelectSchema),
|
|
3154
|
+
pagination: PaginationSchema
|
|
3155
|
+
}).openapi("SubAgentListResponse");
|
|
3156
|
+
AgentListResponse = z2.object({
|
|
3157
|
+
data: z2.array(AgentApiSelectSchema),
|
|
3158
|
+
pagination: PaginationSchema
|
|
3159
|
+
}).openapi("AgentListResponse");
|
|
3160
|
+
ToolListResponse = z2.object({
|
|
3161
|
+
data: z2.array(ToolApiSelectSchema),
|
|
3162
|
+
pagination: PaginationSchema
|
|
3163
|
+
}).openapi("ToolListResponse");
|
|
3164
|
+
ExternalAgentListResponse = z2.object({
|
|
3165
|
+
data: z2.array(ExternalAgentApiSelectSchema),
|
|
3166
|
+
pagination: PaginationSchema
|
|
3167
|
+
}).openapi("ExternalAgentListResponse");
|
|
3168
|
+
ContextConfigListResponse = z2.object({
|
|
3169
|
+
data: z2.array(ContextConfigApiSelectSchema),
|
|
3170
|
+
pagination: PaginationSchema
|
|
3171
|
+
}).openapi("ContextConfigListResponse");
|
|
3172
|
+
ApiKeyListResponse = z2.object({
|
|
3173
|
+
data: z2.array(ApiKeyApiSelectSchema),
|
|
3174
|
+
pagination: PaginationSchema
|
|
3175
|
+
}).openapi("ApiKeyListResponse");
|
|
3176
|
+
CredentialReferenceListResponse = z2.object({
|
|
3177
|
+
data: z2.array(CredentialReferenceApiSelectSchema),
|
|
3178
|
+
pagination: PaginationSchema
|
|
3179
|
+
}).openapi("CredentialReferenceListResponse");
|
|
3180
|
+
FunctionListResponse = z2.object({
|
|
3181
|
+
data: z2.array(FunctionApiSelectSchema),
|
|
3182
|
+
pagination: PaginationSchema
|
|
3183
|
+
}).openapi("FunctionListResponse");
|
|
3184
|
+
FunctionToolListResponse = z2.object({
|
|
3185
|
+
data: z2.array(FunctionToolApiSelectSchema),
|
|
3186
|
+
pagination: PaginationSchema
|
|
3187
|
+
}).openapi("FunctionToolListResponse");
|
|
3188
|
+
DataComponentListResponse = z2.object({
|
|
3189
|
+
data: z2.array(DataComponentApiSelectSchema),
|
|
3190
|
+
pagination: PaginationSchema
|
|
3191
|
+
}).openapi("DataComponentListResponse");
|
|
3192
|
+
ArtifactComponentListResponse = z2.object({
|
|
3193
|
+
data: z2.array(ArtifactComponentApiSelectSchema),
|
|
3194
|
+
pagination: PaginationSchema
|
|
3195
|
+
}).openapi("ArtifactComponentListResponse");
|
|
3196
|
+
SubAgentRelationListResponse = z2.object({
|
|
3197
|
+
data: z2.array(SubAgentRelationApiSelectSchema),
|
|
3198
|
+
pagination: PaginationSchema
|
|
3199
|
+
}).openapi("SubAgentRelationListResponse");
|
|
3200
|
+
SubAgentToolRelationListResponse = z2.object({
|
|
3201
|
+
data: z2.array(SubAgentToolRelationApiSelectSchema),
|
|
3202
|
+
pagination: PaginationSchema
|
|
3203
|
+
}).openapi("SubAgentToolRelationListResponse");
|
|
3204
|
+
ConversationListResponse = z2.object({
|
|
3205
|
+
data: z2.array(ConversationApiSelectSchema),
|
|
3206
|
+
pagination: PaginationSchema
|
|
3207
|
+
}).openapi("ConversationListResponse");
|
|
3208
|
+
MessageListResponse = z2.object({
|
|
3209
|
+
data: z2.array(MessageApiSelectSchema),
|
|
3210
|
+
pagination: PaginationSchema
|
|
3211
|
+
}).openapi("MessageListResponse");
|
|
3212
|
+
SubAgentDataComponentResponse = z2.object({ data: SubAgentDataComponentApiSelectSchema }).openapi("SubAgentDataComponentResponse");
|
|
3213
|
+
SubAgentArtifactComponentResponse = z2.object({ data: SubAgentArtifactComponentApiSelectSchema }).openapi("SubAgentArtifactComponentResponse");
|
|
3214
|
+
SubAgentDataComponentListResponse = z2.object({
|
|
3215
|
+
data: z2.array(SubAgentDataComponentApiSelectSchema),
|
|
3216
|
+
pagination: PaginationSchema
|
|
3217
|
+
}).openapi("SubAgentDataComponentListResponse");
|
|
3218
|
+
SubAgentArtifactComponentListResponse = z2.object({
|
|
3219
|
+
data: z2.array(SubAgentArtifactComponentApiSelectSchema),
|
|
3220
|
+
pagination: PaginationSchema
|
|
3221
|
+
}).openapi("SubAgentArtifactComponentListResponse");
|
|
3079
3222
|
HeadersScopeSchema = z2.object({
|
|
3080
3223
|
"x-inkeep-tenant-id": z2.string().optional().openapi({
|
|
3081
3224
|
description: "Tenant identifier",
|
|
@@ -236342,6 +236485,27 @@ export { ${exportStatement} };
|
|
|
236342
236485
|
}
|
|
236343
236486
|
|
|
236344
236487
|
// src/commands/pull.ts
|
|
236488
|
+
async function detectCurrentProject() {
|
|
236489
|
+
const indexPath = join7(process.cwd(), "index.ts");
|
|
236490
|
+
if (!existsSync6(indexPath)) {
|
|
236491
|
+
return null;
|
|
236492
|
+
}
|
|
236493
|
+
try {
|
|
236494
|
+
const module = await importWithTypeScriptSupport(indexPath);
|
|
236495
|
+
const exports = Object.keys(module);
|
|
236496
|
+
for (const exportKey of exports) {
|
|
236497
|
+
const value = module[exportKey];
|
|
236498
|
+
if (value && typeof value === "object" && value.__type === "project") {
|
|
236499
|
+
if (typeof value.getId === "function") {
|
|
236500
|
+
return value.getId();
|
|
236501
|
+
}
|
|
236502
|
+
}
|
|
236503
|
+
}
|
|
236504
|
+
return null;
|
|
236505
|
+
} catch (error) {
|
|
236506
|
+
return null;
|
|
236507
|
+
}
|
|
236508
|
+
}
|
|
236345
236509
|
async function verifyGeneratedFiles(projectDir, originalProjectData, debug = false) {
|
|
236346
236510
|
const errors = [];
|
|
236347
236511
|
const warnings = [];
|
|
@@ -236507,9 +236671,14 @@ function ensureDirectoryExists(dirPath) {
|
|
|
236507
236671
|
mkdirSync(dirPath, { recursive: true });
|
|
236508
236672
|
}
|
|
236509
236673
|
}
|
|
236510
|
-
function createProjectStructure(projectDir, projectId) {
|
|
236511
|
-
|
|
236512
|
-
|
|
236674
|
+
function createProjectStructure(projectDir, projectId, useCurrentDirectory = false) {
|
|
236675
|
+
let projectRoot;
|
|
236676
|
+
if (useCurrentDirectory) {
|
|
236677
|
+
projectRoot = projectDir;
|
|
236678
|
+
} else {
|
|
236679
|
+
const dirName = projectDir.split("/").pop() || projectDir;
|
|
236680
|
+
projectRoot = dirName === projectId ? projectDir : join7(projectDir, projectId);
|
|
236681
|
+
}
|
|
236513
236682
|
const agentsDir = join7(projectRoot, "agents");
|
|
236514
236683
|
const toolsDir = join7(projectRoot, "tools");
|
|
236515
236684
|
const dataComponentsDir = join7(projectRoot, "data-components");
|
|
@@ -236754,7 +236923,29 @@ async function pullProjectCommand(options) {
|
|
|
236754
236923
|
agentsManageApiUrl: config.agentsManageApi.url,
|
|
236755
236924
|
agentsManageApiKey: config.agentsManageApi.apiKey
|
|
236756
236925
|
};
|
|
236757
|
-
|
|
236926
|
+
spinner.text = "Detecting project in current directory...";
|
|
236927
|
+
const currentProjectId = await detectCurrentProject();
|
|
236928
|
+
let useCurrentDirectory = false;
|
|
236929
|
+
if (options.project) {
|
|
236930
|
+
if (currentProjectId) {
|
|
236931
|
+
spinner.fail("Conflicting project specification");
|
|
236932
|
+
console.error(chalk7.red("Error: Cannot specify --project argument when in a project directory"));
|
|
236933
|
+
console.error(chalk7.yellow(` \u2022 Current directory project: ${currentProjectId}`));
|
|
236934
|
+
console.error(chalk7.yellow(` \u2022 Specified project argument: ${options.project}`));
|
|
236935
|
+
console.error(chalk7.gray("\nTo pull to this directory, run without --project argument:"));
|
|
236936
|
+
console.error(chalk7.gray(" inkeep pull"));
|
|
236937
|
+
console.error(chalk7.gray("\nTo pull a different project, run from a non-project directory."));
|
|
236938
|
+
process.exit(1);
|
|
236939
|
+
}
|
|
236940
|
+
const projectIdFromPath = options.project.split("/").pop() || options.project;
|
|
236941
|
+
finalConfig.projectId = projectIdFromPath;
|
|
236942
|
+
} else if (currentProjectId) {
|
|
236943
|
+
finalConfig.projectId = currentProjectId;
|
|
236944
|
+
useCurrentDirectory = true;
|
|
236945
|
+
baseDir = process.cwd();
|
|
236946
|
+
spinner.succeed(`Detected project in current directory: ${currentProjectId}`);
|
|
236947
|
+
console.log(chalk7.gray(` \u2022 Will pull to current directory (directory-aware mode)`));
|
|
236948
|
+
} else {
|
|
236758
236949
|
spinner.stop();
|
|
236759
236950
|
const response = await prompts({
|
|
236760
236951
|
type: "text",
|
|
@@ -236768,9 +236959,6 @@ async function pullProjectCommand(options) {
|
|
|
236768
236959
|
}
|
|
236769
236960
|
finalConfig.projectId = response.projectId;
|
|
236770
236961
|
spinner.start("Configuration loaded");
|
|
236771
|
-
} else {
|
|
236772
|
-
const projectIdFromPath = options.project.split("/").pop() || options.project;
|
|
236773
|
-
finalConfig.projectId = projectIdFromPath;
|
|
236774
236962
|
}
|
|
236775
236963
|
spinner.succeed("Configuration loaded");
|
|
236776
236964
|
console.log(chalk7.gray("Configuration:"));
|
|
@@ -236834,7 +237022,7 @@ async function pullProjectCommand(options) {
|
|
|
236834
237022
|
);
|
|
236835
237023
|
}
|
|
236836
237024
|
spinner.start("Creating project structure...");
|
|
236837
|
-
const dirs = createProjectStructure(baseDir, finalConfig.projectId);
|
|
237025
|
+
const dirs = createProjectStructure(baseDir, finalConfig.projectId, useCurrentDirectory);
|
|
236838
237026
|
spinner.succeed("Project structure created");
|
|
236839
237027
|
if (options.json) {
|
|
236840
237028
|
const jsonFilePath = join7(dirs.projectRoot, `${finalConfig.projectId}.json`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-cli",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.2",
|
|
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.19.
|
|
50
|
-
"@inkeep/agents-sdk": "^0.19.
|
|
49
|
+
"@inkeep/agents-core": "^0.19.2",
|
|
50
|
+
"@inkeep/agents-sdk": "^0.19.2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/degit": "^2.8.6",
|