@inkeep/agents-core 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.
- package/README.md +2 -2
- package/dist/{chunk-VPJ6Z5QZ.js → chunk-5LRSB445.js} +115 -118
- package/dist/{chunk-TO2HNKGP.js → chunk-BVURASVM.js} +74 -110
- package/dist/chunk-TCLX6C3C.js +271 -0
- package/dist/chunk-ZSQFZL3Y.js +173 -0
- package/dist/client-exports.cjs +483 -225
- package/dist/client-exports.d.cts +6 -5
- package/dist/client-exports.d.ts +6 -5
- package/dist/client-exports.js +5 -4
- package/dist/db/schema.cjs +114 -117
- package/dist/db/schema.d.cts +2 -2
- package/dist/db/schema.d.ts +2 -2
- package/dist/db/schema.js +1 -1
- package/dist/index.cjs +1687 -1360
- package/dist/index.d.cts +1530 -1524
- package/dist/index.d.ts +1530 -1524
- package/dist/index.js +1016 -989
- package/dist/{schema-Ct2NlO81.d.cts → schema-B1rukNyF.d.ts} +118 -137
- package/dist/{schema-BQk_FMBV.d.ts → schema-BIYOOKX_.d.cts} +118 -137
- package/dist/signoz-queries-CifqdbnO.d.cts +269 -0
- package/dist/signoz-queries-CifqdbnO.d.ts +269 -0
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/{utility-s9c5CVOe.d.cts → utility-BEeDGMP9.d.cts} +226 -297
- package/dist/{utility-s9c5CVOe.d.ts → utility-BEeDGMP9.d.ts} +226 -297
- package/dist/validation/index.cjs +243 -238
- package/dist/validation/index.d.cts +76 -4
- package/dist/validation/index.d.ts +76 -4
- package/dist/validation/index.js +2 -2
- package/drizzle/0005_wide_shriek.sql +127 -0
- package/drizzle/meta/0005_snapshot.json +2558 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/dist/chunk-L53XWAYG.js +0 -134
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { subAgents, subAgentRelations, agentGraph, tasks, taskRelations, tools, conversations, messages, contextCache, dataComponents, subAgentDataComponents, artifactComponents, subAgentArtifactComponents, externalAgents, apiKeys, credentialReferences, functions, contextConfigs, subAgentToolRelations, ledgerArtifacts, projects } from './chunk-5LRSB445.js';
|
|
2
2
|
import { VALID_RELATION_TYPES, MCPTransportType, TOOL_STATUS_VALUES, CredentialStoreType, MCPServerType } from './chunk-YFHT5M2R.js';
|
|
3
3
|
import { z } from '@hono/zod-openapi';
|
|
4
4
|
import { createSelectSchema, createInsertSchema } from 'drizzle-zod';
|
|
@@ -52,22 +52,22 @@ var createApiUpdateSchema = (schema) => schema.omit({ tenantId: true, projectId:
|
|
|
52
52
|
var createGraphScopedApiSchema = (schema) => schema.omit({ tenantId: true, projectId: true, graphId: true });
|
|
53
53
|
var createGraphScopedApiInsertSchema = (schema) => schema.omit({ tenantId: true, projectId: true, graphId: true });
|
|
54
54
|
var createGraphScopedApiUpdateSchema = (schema) => schema.omit({ tenantId: true, projectId: true, graphId: true }).partial();
|
|
55
|
-
var
|
|
56
|
-
var
|
|
55
|
+
var SubAgentSelectSchema = createSelectSchema(subAgents);
|
|
56
|
+
var SubAgentInsertSchema = createInsertSchema(subAgents).extend({
|
|
57
57
|
id: resourceIdSchema,
|
|
58
58
|
models: ModelSchema.optional()
|
|
59
59
|
});
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var
|
|
63
|
-
var
|
|
64
|
-
var AgentRelationSelectSchema = createSelectSchema(
|
|
65
|
-
var AgentRelationInsertSchema = createInsertSchema(
|
|
60
|
+
var SubAgentUpdateSchema = SubAgentInsertSchema.partial();
|
|
61
|
+
var SubAgentApiSelectSchema = createGraphScopedApiSchema(SubAgentSelectSchema);
|
|
62
|
+
var SubAgentApiInsertSchema = createGraphScopedApiInsertSchema(SubAgentInsertSchema);
|
|
63
|
+
var SubAgentApiUpdateSchema = createGraphScopedApiUpdateSchema(SubAgentUpdateSchema);
|
|
64
|
+
var AgentRelationSelectSchema = createSelectSchema(subAgentRelations);
|
|
65
|
+
var AgentRelationInsertSchema = createInsertSchema(subAgentRelations).extend({
|
|
66
66
|
id: resourceIdSchema,
|
|
67
67
|
graphId: resourceIdSchema,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
sourceSubAgentId: resourceIdSchema,
|
|
69
|
+
targetSubAgentId: resourceIdSchema.optional(),
|
|
70
|
+
externalSubAgentId: resourceIdSchema.optional()
|
|
71
71
|
});
|
|
72
72
|
var AgentRelationUpdateSchema = AgentRelationInsertSchema.partial();
|
|
73
73
|
var AgentRelationApiSelectSchema = createGraphScopedApiSchema(AgentRelationSelectSchema);
|
|
@@ -77,13 +77,13 @@ var AgentRelationApiInsertSchema = createGraphScopedApiInsertSchema(
|
|
|
77
77
|
relationType: z.enum(VALID_RELATION_TYPES)
|
|
78
78
|
}).refine(
|
|
79
79
|
(data) => {
|
|
80
|
-
const hasTarget = data.
|
|
81
|
-
const hasExternal = data.
|
|
80
|
+
const hasTarget = data.targetSubAgentId != null;
|
|
81
|
+
const hasExternal = data.externalSubAgentId != null;
|
|
82
82
|
return hasTarget !== hasExternal;
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
|
-
message: "Must specify exactly one of
|
|
86
|
-
path: ["
|
|
85
|
+
message: "Must specify exactly one of targetSubAgentId or externalSubAgentId",
|
|
86
|
+
path: ["targetSubAgentId", "externalSubAgentId"]
|
|
87
87
|
}
|
|
88
88
|
);
|
|
89
89
|
var AgentRelationApiUpdateSchema = createGraphScopedApiUpdateSchema(
|
|
@@ -92,28 +92,28 @@ var AgentRelationApiUpdateSchema = createGraphScopedApiUpdateSchema(
|
|
|
92
92
|
relationType: z.enum(VALID_RELATION_TYPES).optional()
|
|
93
93
|
}).refine(
|
|
94
94
|
(data) => {
|
|
95
|
-
const hasTarget = data.
|
|
96
|
-
const hasExternal = data.
|
|
95
|
+
const hasTarget = data.targetSubAgentId != null;
|
|
96
|
+
const hasExternal = data.externalSubAgentId != null;
|
|
97
97
|
if (!hasTarget && !hasExternal) {
|
|
98
98
|
return true;
|
|
99
99
|
}
|
|
100
100
|
return hasTarget !== hasExternal;
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
|
-
message: "Must specify exactly one of
|
|
104
|
-
path: ["
|
|
103
|
+
message: "Must specify exactly one of targetSubAgentId or externalSubAgentId when updating agent relationships",
|
|
104
|
+
path: ["targetSubAgentId", "externalSubAgentId"]
|
|
105
105
|
}
|
|
106
106
|
);
|
|
107
107
|
var AgentRelationQuerySchema = z.object({
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
sourceSubAgentId: z.string().optional(),
|
|
109
|
+
targetSubAgentId: z.string().optional(),
|
|
110
|
+
externalSubAgentId: z.string().optional()
|
|
111
111
|
});
|
|
112
|
-
var ExternalAgentRelationInsertSchema = createInsertSchema(
|
|
112
|
+
var ExternalAgentRelationInsertSchema = createInsertSchema(subAgentRelations).extend({
|
|
113
113
|
id: resourceIdSchema,
|
|
114
114
|
graphId: resourceIdSchema,
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
sourceSubAgentId: resourceIdSchema,
|
|
116
|
+
externalSubAgentId: resourceIdSchema
|
|
117
117
|
});
|
|
118
118
|
var ExternalAgentRelationApiInsertSchema = createApiInsertSchema(
|
|
119
119
|
ExternalAgentRelationInsertSchema
|
|
@@ -247,8 +247,8 @@ var DataComponentUpdateSchema = DataComponentInsertSchema.partial();
|
|
|
247
247
|
var DataComponentApiSelectSchema = createApiSchema(DataComponentSelectSchema);
|
|
248
248
|
var DataComponentApiInsertSchema = createApiInsertSchema(DataComponentInsertSchema);
|
|
249
249
|
var DataComponentApiUpdateSchema = createApiUpdateSchema(DataComponentUpdateSchema);
|
|
250
|
-
var AgentDataComponentSelectSchema = createSelectSchema(
|
|
251
|
-
var AgentDataComponentInsertSchema = createInsertSchema(
|
|
250
|
+
var AgentDataComponentSelectSchema = createSelectSchema(subAgentDataComponents);
|
|
251
|
+
var AgentDataComponentInsertSchema = createInsertSchema(subAgentDataComponents);
|
|
252
252
|
var AgentDataComponentUpdateSchema = AgentDataComponentInsertSchema.partial();
|
|
253
253
|
var AgentDataComponentApiSelectSchema = createGraphScopedApiSchema(
|
|
254
254
|
AgentDataComponentSelectSchema
|
|
@@ -277,12 +277,12 @@ var ArtifactComponentApiInsertSchema = ArtifactComponentInsertSchema.omit({
|
|
|
277
277
|
var ArtifactComponentApiUpdateSchema = createApiUpdateSchema(
|
|
278
278
|
ArtifactComponentUpdateSchema
|
|
279
279
|
);
|
|
280
|
-
var AgentArtifactComponentSelectSchema = createSelectSchema(
|
|
280
|
+
var AgentArtifactComponentSelectSchema = createSelectSchema(subAgentArtifactComponents);
|
|
281
281
|
var AgentArtifactComponentInsertSchema = createInsertSchema(
|
|
282
|
-
|
|
282
|
+
subAgentArtifactComponents
|
|
283
283
|
).extend({
|
|
284
284
|
id: resourceIdSchema,
|
|
285
|
-
|
|
285
|
+
subAgentId: resourceIdSchema,
|
|
286
286
|
artifactComponentId: resourceIdSchema
|
|
287
287
|
});
|
|
288
288
|
var AgentArtifactComponentUpdateSchema = AgentArtifactComponentInsertSchema.partial();
|
|
@@ -310,7 +310,7 @@ var ExternalAgentApiSelectSchema = createGraphScopedApiSchema(ExternalAgentSelec
|
|
|
310
310
|
var ExternalAgentApiInsertSchema = createGraphScopedApiInsertSchema(ExternalAgentInsertSchema);
|
|
311
311
|
var ExternalAgentApiUpdateSchema = createGraphScopedApiUpdateSchema(ExternalAgentUpdateSchema);
|
|
312
312
|
var AllAgentSchema = z.discriminatedUnion("type", [
|
|
313
|
-
|
|
313
|
+
SubAgentApiSelectSchema.extend({ type: z.literal("internal") }),
|
|
314
314
|
ExternalAgentApiSelectSchema.extend({ type: z.literal("external") })
|
|
315
315
|
]);
|
|
316
316
|
var ApiKeySelectSchema = createSelectSchema(apiKeys);
|
|
@@ -465,10 +465,10 @@ var ContextConfigApiInsertSchema = createApiInsertSchema(ContextConfigInsertSche
|
|
|
465
465
|
var ContextConfigApiUpdateSchema = createApiUpdateSchema(ContextConfigUpdateSchema).omit({
|
|
466
466
|
graphId: true
|
|
467
467
|
});
|
|
468
|
-
var AgentToolRelationSelectSchema = createSelectSchema(
|
|
469
|
-
var AgentToolRelationInsertSchema = createInsertSchema(
|
|
468
|
+
var AgentToolRelationSelectSchema = createSelectSchema(subAgentToolRelations);
|
|
469
|
+
var AgentToolRelationInsertSchema = createInsertSchema(subAgentToolRelations).extend({
|
|
470
470
|
id: resourceIdSchema,
|
|
471
|
-
|
|
471
|
+
subAgentId: resourceIdSchema,
|
|
472
472
|
toolId: resourceIdSchema,
|
|
473
473
|
selectedTools: z.array(z.string()).nullish(),
|
|
474
474
|
headers: z.record(z.string(), z.string()).nullish()
|
|
@@ -511,7 +511,7 @@ var CanUseItemSchema = z.object({
|
|
|
511
511
|
toolSelection: z.array(z.string()).nullish(),
|
|
512
512
|
headers: z.record(z.string(), z.string()).nullish()
|
|
513
513
|
});
|
|
514
|
-
var FullGraphAgentInsertSchema =
|
|
514
|
+
var FullGraphAgentInsertSchema = SubAgentApiInsertSchema.extend({
|
|
515
515
|
type: z.literal("internal"),
|
|
516
516
|
canUse: z.array(CanUseItemSchema),
|
|
517
517
|
// All tools (both MCP and function tools)
|
|
@@ -520,27 +520,17 @@ var FullGraphAgentInsertSchema = AgentApiInsertSchema.extend({
|
|
|
520
520
|
canTransferTo: z.array(z.string()).optional(),
|
|
521
521
|
canDelegateTo: z.array(z.string()).optional()
|
|
522
522
|
});
|
|
523
|
-
var FullGraphDefinitionSchema = AgentGraphApiInsertSchema.extend({
|
|
524
|
-
agents: z.record(z.string(), z.union([FullGraphAgentInsertSchema, ExternalAgentApiInsertSchema])),
|
|
525
|
-
// Lookup maps for UI to resolve canUse items
|
|
526
|
-
tools: z.record(z.string(), ToolApiInsertSchema).optional(),
|
|
527
|
-
// Get tool name/description from toolId
|
|
528
|
-
functions: z.record(z.string(), FunctionApiInsertSchema).optional(),
|
|
529
|
-
// Get function code for function tools
|
|
530
|
-
contextConfig: z.optional(ContextConfigApiInsertSchema),
|
|
531
|
-
statusUpdates: z.optional(StatusUpdateSchema),
|
|
532
|
-
models: ModelSchema.optional(),
|
|
533
|
-
stopWhen: GraphStopWhenSchema.optional(),
|
|
534
|
-
graphPrompt: z.string().max(5e3, "Graph prompt cannot exceed 5000 characters").optional()
|
|
535
|
-
});
|
|
536
523
|
var GraphWithinContextOfProjectSchema = AgentGraphApiInsertSchema.extend({
|
|
537
|
-
|
|
524
|
+
subAgents: z.record(
|
|
538
525
|
z.string(),
|
|
539
526
|
z.discriminatedUnion("type", [
|
|
540
527
|
FullGraphAgentInsertSchema,
|
|
541
528
|
ExternalAgentApiInsertSchema.extend({ type: z.literal("external") })
|
|
542
529
|
])
|
|
543
530
|
),
|
|
531
|
+
tools: z.record(z.string(), ToolApiInsertSchema).optional(),
|
|
532
|
+
// Get tool name/description from toolId
|
|
533
|
+
functions: z.record(z.string(), FunctionApiInsertSchema).optional(),
|
|
544
534
|
contextConfig: z.optional(ContextConfigApiInsertSchema),
|
|
545
535
|
statusUpdates: z.optional(StatusUpdateSchema),
|
|
546
536
|
models: ModelSchema.optional(),
|
|
@@ -612,72 +602,46 @@ var HeadersScopeSchema = z.object({
|
|
|
612
602
|
example: "graph_789"
|
|
613
603
|
})
|
|
614
604
|
});
|
|
605
|
+
var TenantId = z.string().openapi({
|
|
606
|
+
description: "Tenant identifier",
|
|
607
|
+
example: "tenant_123"
|
|
608
|
+
});
|
|
609
|
+
var ProjectId = z.string().openapi({
|
|
610
|
+
description: "Project identifier",
|
|
611
|
+
example: "project_456"
|
|
612
|
+
});
|
|
613
|
+
var GraphId = z.string().openapi({
|
|
614
|
+
description: "Graph identifier",
|
|
615
|
+
example: "graph_789"
|
|
616
|
+
});
|
|
617
|
+
var SubAgentId = z.string().openapi({
|
|
618
|
+
description: "Sub-agent identifier",
|
|
619
|
+
example: "sub_agent_123"
|
|
620
|
+
});
|
|
615
621
|
var TenantParamsSchema = z.object({
|
|
616
|
-
tenantId:
|
|
617
|
-
description: "Tenant identifier",
|
|
618
|
-
example: "tenant_123"
|
|
619
|
-
})
|
|
622
|
+
tenantId: TenantId
|
|
620
623
|
}).openapi("TenantParams");
|
|
621
|
-
var
|
|
622
|
-
tenantId: z.string().openapi({
|
|
623
|
-
description: "Tenant identifier",
|
|
624
|
-
example: "tenant_123"
|
|
625
|
-
}),
|
|
626
|
-
projectId: z.string().openapi({
|
|
627
|
-
description: "Project identifier",
|
|
628
|
-
example: "project_456"
|
|
629
|
-
})
|
|
630
|
-
}).openapi("TenantProjectParams");
|
|
631
|
-
var TenantProjectGraphParamsSchema = z.object({
|
|
632
|
-
tenantId: z.string().openapi({
|
|
633
|
-
description: "Tenant identifier",
|
|
634
|
-
example: "tenant_123"
|
|
635
|
-
}),
|
|
636
|
-
projectId: z.string().openapi({
|
|
637
|
-
description: "Project identifier",
|
|
638
|
-
example: "project_456"
|
|
639
|
-
}),
|
|
640
|
-
graphId: z.string().openapi({
|
|
641
|
-
description: "Graph identifier",
|
|
642
|
-
example: "graph_789"
|
|
643
|
-
})
|
|
644
|
-
}).openapi("TenantProjectGraphParams");
|
|
645
|
-
var TenantProjectGraphIdParamsSchema = z.object({
|
|
646
|
-
tenantId: z.string().openapi({
|
|
647
|
-
description: "Tenant identifier",
|
|
648
|
-
example: "tenant_123"
|
|
649
|
-
}),
|
|
650
|
-
projectId: z.string().openapi({
|
|
651
|
-
description: "Project identifier",
|
|
652
|
-
example: "project_456"
|
|
653
|
-
}),
|
|
654
|
-
graphId: z.string().openapi({
|
|
655
|
-
description: "Graph identifier",
|
|
656
|
-
example: "graph_789"
|
|
657
|
-
}),
|
|
624
|
+
var TenantIdParamsSchema = TenantParamsSchema.extend({
|
|
658
625
|
id: resourceIdSchema
|
|
659
|
-
}).openapi("
|
|
660
|
-
var
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
}),
|
|
665
|
-
projectId: z.string().openapi({
|
|
666
|
-
description: "Project identifier",
|
|
667
|
-
example: "project_456"
|
|
668
|
-
}),
|
|
626
|
+
}).openapi("TenantIdParams");
|
|
627
|
+
var TenantProjectParamsSchema = TenantParamsSchema.extend({
|
|
628
|
+
projectId: ProjectId
|
|
629
|
+
}).openapi("TenantProjectParams");
|
|
630
|
+
var TenantProjectIdParamsSchema = TenantProjectParamsSchema.extend({
|
|
669
631
|
id: resourceIdSchema
|
|
670
632
|
}).openapi("TenantProjectIdParams");
|
|
671
|
-
var
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
}),
|
|
633
|
+
var TenantProjectGraphParamsSchema = TenantProjectParamsSchema.extend({
|
|
634
|
+
graphId: GraphId
|
|
635
|
+
}).openapi("TenantProjectGraphParams");
|
|
636
|
+
var TenantProjectGraphIdParamsSchema = TenantProjectGraphParamsSchema.extend({
|
|
676
637
|
id: resourceIdSchema
|
|
677
|
-
}).openapi("
|
|
678
|
-
var
|
|
638
|
+
}).openapi("TenantProjectGraphIdParams");
|
|
639
|
+
var TenantProjectGraphSubAgentParamsSchema = TenantProjectGraphParamsSchema.extend({
|
|
640
|
+
subAgentId: SubAgentId
|
|
641
|
+
}).openapi("TenantProjectGraphSubAgentParams");
|
|
642
|
+
var TenantProjectGraphSubAgentIdParamsSchema = TenantProjectGraphSubAgentParamsSchema.extend({
|
|
679
643
|
id: resourceIdSchema
|
|
680
|
-
}).openapi("
|
|
644
|
+
}).openapi("TenantProjectGraphSubAgentIdParams");
|
|
681
645
|
var PaginationQueryParamsSchema = z.object({
|
|
682
646
|
page: z.coerce.number().min(1).default(1),
|
|
683
647
|
limit: z.coerce.number().min(1).max(100).default(10)
|
|
@@ -785,4 +749,4 @@ function validatePropsAsJsonSchema(props) {
|
|
|
785
749
|
}
|
|
786
750
|
}
|
|
787
751
|
|
|
788
|
-
export {
|
|
752
|
+
export { AgentArtifactComponentApiInsertSchema, AgentArtifactComponentApiSelectSchema, AgentArtifactComponentApiUpdateSchema, AgentArtifactComponentInsertSchema, AgentArtifactComponentSelectSchema, AgentArtifactComponentUpdateSchema, AgentDataComponentApiInsertSchema, AgentDataComponentApiSelectSchema, AgentDataComponentApiUpdateSchema, AgentDataComponentInsertSchema, AgentDataComponentSelectSchema, AgentDataComponentUpdateSchema, AgentGraphApiInsertSchema, AgentGraphApiSelectSchema, AgentGraphApiUpdateSchema, AgentGraphInsertSchema, AgentGraphSelectSchema, AgentGraphUpdateSchema, AgentRelationApiInsertSchema, AgentRelationApiSelectSchema, AgentRelationApiUpdateSchema, AgentRelationInsertSchema, AgentRelationQuerySchema, AgentRelationSelectSchema, AgentRelationUpdateSchema, AgentStopWhenSchema, AgentToolRelationApiInsertSchema, AgentToolRelationApiSelectSchema, AgentToolRelationApiUpdateSchema, AgentToolRelationInsertSchema, AgentToolRelationSelectSchema, AgentToolRelationUpdateSchema, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentInsertSchema, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationSelectSchema, ConversationUpdateSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentBaseSchema, DataComponentInsertSchema, DataComponentSelectSchema, DataComponentUpdateSchema, ErrorResponseSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentRelationApiInsertSchema, ExternalAgentRelationInsertSchema, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, FetchConfigSchema, FetchDefinitionSchema, FullGraphAgentInsertSchema, FullProjectDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionSelectSchema, FunctionToolConfigSchema, FunctionUpdateSchema, GraphStopWhenSchema, GraphWithinContextOfProjectSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettingsSchema, PaginationQueryParamsSchema, PaginationSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectModelSchema, ProjectSelectSchema, ProjectUpdateSchema, RemovedResponseSchema, SandboxConfigSchema, SingleResponseSchema, StatusComponentSchema, StatusUpdateSchema, StopWhenSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentInsertSchema, SubAgentSelectSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectGraphIdParamsSchema, TenantProjectGraphParamsSchema, TenantProjectGraphSubAgentIdParamsSchema, TenantProjectGraphSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, URL_SAFE_ID_PATTERN, resourceIdSchema, validatePropsAsJsonSchema };
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
// src/constants/otel-attributes.ts
|
|
2
|
+
var DELEGATION_FROM_SUB_AGENT_ID = "delegation.from_sub_agent_id";
|
|
3
|
+
var DELEGATION_TO_SUB_AGENT_ID = "delegation.to_sub_agent_id";
|
|
4
|
+
var DELEGATION_ID = "delegation.id";
|
|
5
|
+
var TRANSFER_FROM_SUB_AGENT_ID = "transfer.from_sub_agent_id";
|
|
6
|
+
var TRANSFER_TO_SUB_AGENT_ID = "transfer.to_sub_agent_id";
|
|
7
|
+
var SPAN_NAMES = {
|
|
8
|
+
AI_TOOL_CALL: "ai.toolCall",
|
|
9
|
+
CONTEXT_RESOLUTION: "context-resolver.resolve_single_fetch_definition",
|
|
10
|
+
CONTEXT_HANDLE: "context.handle_context_resolution",
|
|
11
|
+
AGENT_GENERATION: "agent.generate",
|
|
12
|
+
CONTEXT_FETCHER: "context-fetcher.http-request"
|
|
13
|
+
};
|
|
14
|
+
var AI_OPERATIONS = {
|
|
15
|
+
GENERATE_TEXT: "ai.generateText.doGenerate",
|
|
16
|
+
STREAM_TEXT: "ai.streamText.doStream"
|
|
17
|
+
};
|
|
18
|
+
var SPAN_KEYS = {
|
|
19
|
+
// Core span attributes
|
|
20
|
+
SPAN_ID: "spanID",
|
|
21
|
+
TRACE_ID: "traceID",
|
|
22
|
+
DURATION_NANO: "durationNano",
|
|
23
|
+
TIMESTAMP: "timestamp",
|
|
24
|
+
HAS_ERROR: "hasError",
|
|
25
|
+
STATUS_MESSAGE: "status_message",
|
|
26
|
+
OTEL_STATUS_CODE: "otel.status_code",
|
|
27
|
+
OTEL_STATUS_DESCRIPTION: "otel.status_description",
|
|
28
|
+
// Graph attributes
|
|
29
|
+
GRAPH_ID: "graph.id",
|
|
30
|
+
GRAPH_NAME: "graph.name",
|
|
31
|
+
TENANT_ID: "tenant.id",
|
|
32
|
+
PROJECT_ID: "project.id",
|
|
33
|
+
// AI/Agent attributes
|
|
34
|
+
AI_AGENT_NAME: "ai.agentName",
|
|
35
|
+
AI_AGENT_NAME_ALT: "ai.agent.name",
|
|
36
|
+
AI_OPERATION_ID: "ai.operationId",
|
|
37
|
+
AI_RESPONSE_TIMESTAMP: "ai.response.timestamp",
|
|
38
|
+
AI_RESPONSE_CONTENT: "ai.response.content",
|
|
39
|
+
AI_RESPONSE_TEXT: "ai.response.text",
|
|
40
|
+
AI_RESPONSE_MODEL: "ai.response.model",
|
|
41
|
+
AI_RESPONSE_TOOL_CALLS: "ai.response.toolCalls",
|
|
42
|
+
AI_PROMPT_MESSAGES: "ai.prompt.messages",
|
|
43
|
+
AI_MODEL_PROVIDER: "ai.model.provider",
|
|
44
|
+
AI_TELEMETRY_FUNCTION_ID: "ai.telemetry.functionId",
|
|
45
|
+
AI_MODEL_ID: "ai.model.id",
|
|
46
|
+
// Tool attributes
|
|
47
|
+
AI_TOOL_CALL_NAME: "ai.toolCall.name",
|
|
48
|
+
AI_TOOL_CALL_RESULT: "ai.toolCall.result",
|
|
49
|
+
AI_TOOL_CALL_ARGS: "ai.toolCall.args",
|
|
50
|
+
AI_TOOL_CALL_ID: "ai.toolCall.id",
|
|
51
|
+
AI_TOOL_TYPE: "ai.toolType",
|
|
52
|
+
TOOL_PURPOSE: "tool.purpose",
|
|
53
|
+
// Agent attributes
|
|
54
|
+
AGENT_ID: "agent.id",
|
|
55
|
+
AGENT_NAME: "agent.name",
|
|
56
|
+
// Token usage
|
|
57
|
+
GEN_AI_USAGE_INPUT_TOKENS: "gen_ai.usage.input_tokens",
|
|
58
|
+
GEN_AI_USAGE_OUTPUT_TOKENS: "gen_ai.usage.output_tokens",
|
|
59
|
+
// Context attributes
|
|
60
|
+
CONTEXT_URL: "context.url",
|
|
61
|
+
CONTEXT_CONFIG_ID: "context.context_config_id",
|
|
62
|
+
CONTEXT_AGENT_GRAPH_ID: "context.agent_graph_id",
|
|
63
|
+
CONTEXT_HEADERS_KEYS: "context.headers_keys",
|
|
64
|
+
// Message attributes
|
|
65
|
+
MESSAGE_CONTENT: "message.content",
|
|
66
|
+
MESSAGE_TIMESTAMP: "message.timestamp",
|
|
67
|
+
MCP_TOOL_DESCRIPTION: "mcp.tool.description",
|
|
68
|
+
// Delegation/Transfer attributes
|
|
69
|
+
DELEGATION_FROM_SUB_AGENT_ID,
|
|
70
|
+
DELEGATION_TO_SUB_AGENT_ID,
|
|
71
|
+
DELEGATION_ID,
|
|
72
|
+
TRANSFER_FROM_SUB_AGENT_ID,
|
|
73
|
+
TRANSFER_TO_SUB_AGENT_ID,
|
|
74
|
+
// HTTP attributes
|
|
75
|
+
HTTP_URL: "http.url",
|
|
76
|
+
HTTP_STATUS_CODE: "http.status_code",
|
|
77
|
+
HTTP_RESPONSE_BODY_SIZE: "http.response.body_size",
|
|
78
|
+
// Core attributes
|
|
79
|
+
NAME: "name",
|
|
80
|
+
PARENT_SPAN_ID: "parentSpanID",
|
|
81
|
+
CONVERSATION_ID: "conversation.id"
|
|
82
|
+
};
|
|
83
|
+
var UNKNOWN_VALUE = "unknown";
|
|
84
|
+
var ACTIVITY_TYPES = {
|
|
85
|
+
TOOL_CALL: "tool_call",
|
|
86
|
+
AI_GENERATION: "ai_generation",
|
|
87
|
+
AGENT_GENERATION: "agent_generation",
|
|
88
|
+
CONTEXT_FETCH: "context_fetch",
|
|
89
|
+
CONTEXT_RESOLUTION: "context_resolution",
|
|
90
|
+
USER_MESSAGE: "user_message",
|
|
91
|
+
AI_ASSISTANT_MESSAGE: "ai_assistant_message",
|
|
92
|
+
AI_MODEL_STREAMED_TEXT: "ai_model_streamed_text"
|
|
93
|
+
};
|
|
94
|
+
var ACTIVITY_STATUS = {
|
|
95
|
+
SUCCESS: "success",
|
|
96
|
+
ERROR: "error",
|
|
97
|
+
PENDING: "pending"
|
|
98
|
+
};
|
|
99
|
+
var AGENT_IDS = {
|
|
100
|
+
USER: "user",
|
|
101
|
+
AI_ASSISTANT: "ai-assistant"
|
|
102
|
+
};
|
|
103
|
+
var ACTIVITY_NAMES = {
|
|
104
|
+
CONTEXT_FETCH: "Context Fetch",
|
|
105
|
+
USER_MESSAGE: "User Message",
|
|
106
|
+
AI_ASSISTANT_MESSAGE: "AI Assistant Message",
|
|
107
|
+
AI_TEXT_GENERATION: "AI Text Generation",
|
|
108
|
+
AI_STREAMING_TEXT: "AI Streaming Text",
|
|
109
|
+
UNKNOWN_AGENT: "Unknown Agent",
|
|
110
|
+
USER: "User"
|
|
111
|
+
};
|
|
112
|
+
var TOOL_NAMES = {
|
|
113
|
+
SAVE_TOOL_RESULT: "save_tool_result"
|
|
114
|
+
};
|
|
115
|
+
var AI_TOOL_TYPES = {
|
|
116
|
+
MCP: "mcp",
|
|
117
|
+
TRANSFER: "transfer",
|
|
118
|
+
DELEGATION: "delegation"
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
// src/constants/signoz-queries.ts
|
|
122
|
+
var DATA_TYPES = {
|
|
123
|
+
STRING: "string",
|
|
124
|
+
INT64: "int64",
|
|
125
|
+
FLOAT64: "float64",
|
|
126
|
+
BOOL: "bool"
|
|
127
|
+
};
|
|
128
|
+
var FIELD_TYPES = {
|
|
129
|
+
TAG: "tag",
|
|
130
|
+
RESOURCE: "resource"
|
|
131
|
+
};
|
|
132
|
+
var QUERY_FIELD_CONFIGS = {
|
|
133
|
+
// String tag fields
|
|
134
|
+
STRING_TAG: {
|
|
135
|
+
dataType: DATA_TYPES.STRING,
|
|
136
|
+
type: FIELD_TYPES.TAG,
|
|
137
|
+
isColumn: false
|
|
138
|
+
},
|
|
139
|
+
STRING_TAG_COLUMN: {
|
|
140
|
+
dataType: DATA_TYPES.STRING,
|
|
141
|
+
type: FIELD_TYPES.TAG,
|
|
142
|
+
isColumn: true
|
|
143
|
+
},
|
|
144
|
+
// Numeric tag fields
|
|
145
|
+
INT64_TAG: {
|
|
146
|
+
dataType: DATA_TYPES.INT64,
|
|
147
|
+
type: FIELD_TYPES.TAG,
|
|
148
|
+
isColumn: false
|
|
149
|
+
},
|
|
150
|
+
INT64_TAG_COLUMN: {
|
|
151
|
+
dataType: DATA_TYPES.INT64,
|
|
152
|
+
type: FIELD_TYPES.TAG,
|
|
153
|
+
isColumn: true
|
|
154
|
+
},
|
|
155
|
+
FLOAT64_TAG: {
|
|
156
|
+
dataType: DATA_TYPES.FLOAT64,
|
|
157
|
+
type: FIELD_TYPES.TAG,
|
|
158
|
+
isColumn: false
|
|
159
|
+
},
|
|
160
|
+
FLOAT64_TAG_COLUMN: {
|
|
161
|
+
dataType: DATA_TYPES.FLOAT64,
|
|
162
|
+
type: FIELD_TYPES.TAG,
|
|
163
|
+
isColumn: true
|
|
164
|
+
},
|
|
165
|
+
// Boolean tag fields
|
|
166
|
+
BOOL_TAG: {
|
|
167
|
+
dataType: DATA_TYPES.BOOL,
|
|
168
|
+
type: FIELD_TYPES.TAG,
|
|
169
|
+
isColumn: false
|
|
170
|
+
},
|
|
171
|
+
BOOL_TAG_COLUMN: {
|
|
172
|
+
dataType: DATA_TYPES.BOOL,
|
|
173
|
+
type: FIELD_TYPES.TAG,
|
|
174
|
+
isColumn: true
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
var OPERATORS = {
|
|
178
|
+
// Comparison operators
|
|
179
|
+
EQUALS: "=",
|
|
180
|
+
NOT_EQUALS: "!=",
|
|
181
|
+
LESS_THAN: "<",
|
|
182
|
+
GREATER_THAN: ">",
|
|
183
|
+
LESS_THAN_OR_EQUAL: "<=",
|
|
184
|
+
GREATER_THAN_OR_EQUAL: ">=",
|
|
185
|
+
// String operators
|
|
186
|
+
LIKE: "like",
|
|
187
|
+
NOT_LIKE: "nlike",
|
|
188
|
+
// Existence operators
|
|
189
|
+
EXISTS: "exists",
|
|
190
|
+
NOT_EXISTS: "nexists",
|
|
191
|
+
// Logical operators
|
|
192
|
+
AND: "AND",
|
|
193
|
+
OR: "OR"
|
|
194
|
+
};
|
|
195
|
+
var QUERY_EXPRESSIONS = {
|
|
196
|
+
SPAN_NAMES: "spanNames",
|
|
197
|
+
AGENT_MODEL_CALLS: "agentModelCalls",
|
|
198
|
+
MODEL_CALLS: "modelCalls",
|
|
199
|
+
LAST_ACTIVITY: "lastActivity",
|
|
200
|
+
CONVERSATION_METADATA: "conversationMetadata",
|
|
201
|
+
FILTERED_CONVERSATIONS: "filteredConversations",
|
|
202
|
+
TOOLS: "tools",
|
|
203
|
+
TRANSFERS: "transfers",
|
|
204
|
+
DELEGATIONS: "delegations",
|
|
205
|
+
AI_CALLS: "aiCalls",
|
|
206
|
+
CONTEXT_ERRORS: "contextErrors",
|
|
207
|
+
AGENT_GENERATION_ERRORS: "agentGenerationErrors",
|
|
208
|
+
USER_MESSAGES: "userMessages",
|
|
209
|
+
UNIQUE_GRAPHS: "uniqueGraphs",
|
|
210
|
+
UNIQUE_MODELS: "uniqueModels",
|
|
211
|
+
// Route-specific query names
|
|
212
|
+
TOOL_CALLS: "toolCalls",
|
|
213
|
+
CONTEXT_RESOLUTION: "contextResolution",
|
|
214
|
+
CONTEXT_HANDLE: "contextHandle",
|
|
215
|
+
AI_ASSISTANT_MESSAGES: "aiAssistantMessages",
|
|
216
|
+
AI_GENERATIONS: "aiGenerations",
|
|
217
|
+
AI_STREAMING_TEXT: "aiStreamingText",
|
|
218
|
+
CONTEXT_FETCHERS: "contextFetchers",
|
|
219
|
+
DURATION_SPANS: "durationSpans",
|
|
220
|
+
AGENT_GENERATIONS: "agentGenerations",
|
|
221
|
+
SPANS_WITH_ERRORS: "spansWithErrors"
|
|
222
|
+
};
|
|
223
|
+
var REDUCE_OPERATIONS = {
|
|
224
|
+
SUM: "sum",
|
|
225
|
+
MAX: "max",
|
|
226
|
+
MIN: "min",
|
|
227
|
+
AVG: "avg",
|
|
228
|
+
COUNT: "count"
|
|
229
|
+
};
|
|
230
|
+
var ORDER_DIRECTIONS = {
|
|
231
|
+
ASC: "asc",
|
|
232
|
+
DESC: "desc"
|
|
233
|
+
};
|
|
234
|
+
var QUERY_TYPES = {
|
|
235
|
+
BUILDER: "builder",
|
|
236
|
+
CLICKHOUSE: "clickhouse",
|
|
237
|
+
PROMQL: "promql"
|
|
238
|
+
};
|
|
239
|
+
var PANEL_TYPES = {
|
|
240
|
+
LIST: "list",
|
|
241
|
+
TABLE: "table",
|
|
242
|
+
GRAPH: "graph",
|
|
243
|
+
VALUE: "value"
|
|
244
|
+
};
|
|
245
|
+
var DATA_SOURCES = {
|
|
246
|
+
TRACES: "traces",
|
|
247
|
+
METRICS: "metrics",
|
|
248
|
+
LOGS: "logs"
|
|
249
|
+
};
|
|
250
|
+
var AGGREGATE_OPERATORS = {
|
|
251
|
+
COUNT: "count",
|
|
252
|
+
SUM: "sum",
|
|
253
|
+
AVG: "avg",
|
|
254
|
+
MIN: "min",
|
|
255
|
+
MAX: "max",
|
|
256
|
+
NOOP: "noop"
|
|
257
|
+
};
|
|
258
|
+
var QUERY_DEFAULTS = {
|
|
259
|
+
STEP: 60,
|
|
260
|
+
STEP_INTERVAL: 60,
|
|
261
|
+
OFFSET: 0,
|
|
262
|
+
DISABLED: false,
|
|
263
|
+
HAVING: [],
|
|
264
|
+
LEGEND: "",
|
|
265
|
+
LIMIT_NULL: null,
|
|
266
|
+
LIMIT_ZERO: 0,
|
|
267
|
+
LIMIT_1000: 1e3,
|
|
268
|
+
EMPTY_GROUP_BY: []
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
export { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, DATA_SOURCES, DATA_TYPES, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, FIELD_TYPES, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, SPAN_KEYS, SPAN_NAMES, TOOL_NAMES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, UNKNOWN_VALUE };
|