@inkeep/agents-core 0.35.1 → 0.35.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/auth/auth-schema.d.ts +1097 -0
- package/dist/auth/auth-schema.js +1 -0
- package/dist/auth/auth-validation-schemas.d.ts +1881 -0
- package/dist/auth/auth-validation-schemas.js +39 -0
- package/dist/auth/auth.d.ts +118 -0
- package/dist/auth/auth.js +95 -0
- package/dist/auth/permissions.d.ts +273 -0
- package/dist/auth/permissions.js +1 -0
- package/dist/chunk-4JZT4QEE.js +162 -0
- package/dist/chunk-F5WWOOIX.js +62 -0
- package/dist/{chunk-YZ5ZBVHJ.js → chunk-NFYCSHD3.js} +3 -81
- package/dist/chunk-NOPEANIU.js +82 -0
- package/dist/{chunk-J5AHY6M2.js → chunk-SPRTYWRV.js} +1 -1
- package/dist/{chunk-OP3KPT4T.js → chunk-TGESM3JG.js} +1 -160
- package/dist/{chunk-DYGTCLJO.js → chunk-VBCCPAZK.js} +1 -1
- package/dist/chunk-ZYSTJ4XY.js +948 -0
- package/dist/client-CPYOMZF2.d.ts +19 -0
- package/dist/client-exports.js +4 -3
- package/dist/db/schema.d.ts +2 -1
- package/dist/db/schema.js +2 -1
- package/dist/index.d.ts +9 -154
- package/dist/index.js +1565 -2498
- package/dist/{schema-BWd551GM.d.ts → schema-5N2lPWNV.d.ts} +2 -1095
- package/dist/validation/index.js +2 -2
- package/package.json +17 -1
- package/dist/auth-detection-CGqhPDnj.d.cts +0 -435
- package/dist/client-exports.cjs +0 -2833
- package/dist/client-exports.d.cts +0 -289
- package/dist/constants/models.cjs +0 -40
- package/dist/constants/models.d.cts +0 -42
- package/dist/db/schema.cjs +0 -1090
- package/dist/db/schema.d.cts +0 -7
- package/dist/index.cjs +0 -227898
- package/dist/index.d.cts +0 -4893
- package/dist/props-validation-BMR1qNiy.d.cts +0 -15
- package/dist/schema-D4WR42em.d.cts +0 -6352
- package/dist/types/index.cjs +0 -39
- package/dist/types/index.d.cts +0 -132
- package/dist/utility-DbltUp2Q.d.cts +0 -17079
- package/dist/utils/schema-conversion.cjs +0 -232
- package/dist/utils/schema-conversion.d.cts +0 -26
- package/dist/validation/index.cjs +0 -2930
- package/dist/validation/index.d.cts +0 -279
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
import { z as z$1 } from 'zod';
|
|
2
|
-
import { gg as AgentWithinContextOfProjectSchema, v as FullAgentDefinition } from '../utility-DbltUp2Q.cjs';
|
|
3
|
-
export { e2 as AgentApiInsertSchema, e1 as AgentApiSelectSchema, e3 as AgentApiUpdateSchema, d$ as AgentInsertSchema, gM as AgentListResponse, gw as AgentResponse, d_ as AgentSelectSchema, e as AgentStopWhen, b as AgentStopWhenSchema, e0 as AgentUpdateSchema, h3 as AgentWithinContextOfProjectResponse, f6 as AllAgentSchema, fb as ApiKeyApiCreationResponseSchema, fc as ApiKeyApiInsertSchema, fa as ApiKeyApiSelectSchema, A as ApiKeyApiUpdateSchema, f8 as ApiKeyInsertSchema, gQ as ApiKeyListResponse, gA as ApiKeyResponse, f7 as ApiKeySelectSchema, f9 as ApiKeyUpdateSchema, eU as ArtifactComponentApiInsertSchema, eT as ArtifactComponentApiSelectSchema, eV as ArtifactComponentApiUpdateSchema, hd as ArtifactComponentArrayResponse, eR as ArtifactComponentInsertSchema, gV as ArtifactComponentListResponse, gF as ArtifactComponentResponse, eQ as ArtifactComponentSelectSchema, eS as ArtifactComponentUpdateSchema, gc as CanUseItemSchema, h5 as ComponentAssociationListResponse, fo as ComponentAssociationSchema, eB as ContextCacheApiInsertSchema, eA as ContextCacheApiSelectSchema, eC as ContextCacheApiUpdateSchema, ey as ContextCacheInsertSchema, ex as ContextCacheSelectSchema, ez as ContextCacheUpdateSchema, fM as ContextConfigApiInsertSchema, fL as ContextConfigApiSelectSchema, fN as ContextConfigApiUpdateSchema, fJ as ContextConfigInsertSchema, gP as ContextConfigListResponse, gz as ContextConfigResponse, fI as ContextConfigSelectSchema, fK as ContextConfigUpdateSchema, ep as ConversationApiInsertSchema, eo as ConversationApiSelectSchema, eq as ConversationApiUpdateSchema, em as ConversationInsertSchema, gY as ConversationListResponse, gI as ConversationResponse, el as ConversationSelectSchema, en as ConversationUpdateSchema, fl as CreateCredentialInStoreRequestSchema, fm as CreateCredentialInStoreResponseSchema, fh as CredentialReferenceApiInsertSchema, fg as CredentialReferenceApiSelectSchema, fi as CredentialReferenceApiUpdateSchema, fe as CredentialReferenceInsertSchema, gR as CredentialReferenceListResponse, gB as CredentialReferenceResponse, fd as CredentialReferenceSelectSchema, ff as CredentialReferenceUpdateSchema, fk as CredentialStoreListResponseSchema, fj as CredentialStoreSchema, eI as DataComponentApiInsertSchema, eH as DataComponentApiSelectSchema, eJ as DataComponentApiUpdateSchema, hc as DataComponentArrayResponse, eF as DataComponentBaseSchema, eE as DataComponentInsertSchema, gU as DataComponentListResponse, gE as DataComponentResponse, eD as DataComponentSelectSchema, eG as DataComponentUpdateSchema, gk as ErrorResponseSchema, gl as ExistsResponseSchema, f4 as ExternalAgentApiInsertSchema, f3 as ExternalAgentApiSelectSchema, f5 as ExternalAgentApiUpdateSchema, f1 as ExternalAgentInsertSchema, gO as ExternalAgentListResponse, gy as ExternalAgentResponse, f0 as ExternalAgentSelectSchema, f2 as ExternalAgentUpdateSchema, dZ as ExternalSubAgentRelationApiInsertSchema, dY as ExternalSubAgentRelationInsertSchema, fG as FetchConfigSchema, fH as FetchDefinitionSchema, a as FullAgentAgentInsertSchema, h2 as FullProjectDefinitionResponse, gt as FullProjectDefinitionSchema, F as FunctionApiInsertSchema, j as FunctionApiSelectSchema, k as FunctionApiUpdateSchema, fE as FunctionInsertSchema, gS as FunctionListResponse, gC as FunctionResponse, fD as FunctionSelectSchema, fB as FunctionToolApiInsertSchema, fA as FunctionToolApiSelectSchema, fC as FunctionToolApiUpdateSchema, dK as FunctionToolConfig, dJ as FunctionToolConfigSchema, fy as FunctionToolInsertSchema, gT as FunctionToolListResponse, gD as FunctionToolResponse, fx as FunctionToolSelectSchema, fz as FunctionToolUpdateSchema, fF as FunctionUpdateSchema, he as HeadersScopeSchema, g8 as LedgerArtifactApiInsertSchema, g7 as LedgerArtifactApiSelectSchema, g9 as LedgerArtifactApiUpdateSchema, g5 as LedgerArtifactInsertSchema, g4 as LedgerArtifactSelectSchema, g6 as LedgerArtifactUpdateSchema, gi as ListResponseSchema, fs as MCPToolConfigSchema, ei as McpToolDefinitionSchema, h7 as McpToolListResponse, h6 as McpToolResponse, fr as McpToolSchema, eg as McpTransportConfigSchema, ev as MessageApiInsertSchema, eu as MessageApiSelectSchema, ew as MessageApiUpdateSchema, es as MessageInsertSchema, gZ as MessageListResponse, gJ as MessageResponse, er as MessageSelectSchema, et as MessageUpdateSchema, dH as ModelSchema, g as ModelSettings, M as ModelSettingsSchema, fq as OAuthCallbackQuerySchema, fp as OAuthLoginQuerySchema, hn as PaginationQueryParamsSchema, gh as PaginationSchema, gr as ProjectApiInsertSchema, gq as ProjectApiSelectSchema, gs as ProjectApiUpdateSchema, go as ProjectInsertSchema, gK as ProjectListResponse, dI as ProjectModelSchema, gu as ProjectResponse, gn as ProjectSelectSchema, gp as ProjectUpdateSchema, h4 as RelatedAgentInfoListResponse, fn as RelatedAgentInfoSchema, gm as RemovedResponseSchema, gj as SingleResponseSchema, ga as StatusComponentSchema, gb as StatusUpdateSchema, d as StopWhen, S as StopWhenSchema, dP as SubAgentApiInsertSchema, dO as SubAgentApiSelectSchema, dQ as SubAgentApiUpdateSchema, e_ as SubAgentArtifactComponentApiInsertSchema, eZ as SubAgentArtifactComponentApiSelectSchema, e$ as SubAgentArtifactComponentApiUpdateSchema, eX as SubAgentArtifactComponentInsertSchema, h1 as SubAgentArtifactComponentListResponse, g$ as SubAgentArtifactComponentResponse, eW as SubAgentArtifactComponentSelectSchema, eY as SubAgentArtifactComponentUpdateSchema, eO as SubAgentDataComponentApiInsertSchema, eN as SubAgentDataComponentApiSelectSchema, eP as SubAgentDataComponentApiUpdateSchema, eL as SubAgentDataComponentInsertSchema, h0 as SubAgentDataComponentListResponse, g_ as SubAgentDataComponentResponse, eK as SubAgentDataComponentSelectSchema, eM as SubAgentDataComponentUpdateSchema, fY as SubAgentExternalAgentRelationApiInsertSchema, fX as SubAgentExternalAgentRelationApiSelectSchema, fZ as SubAgentExternalAgentRelationApiUpdateSchema, fV as SubAgentExternalAgentRelationInsertSchema, hb as SubAgentExternalAgentRelationListResponse, ha as SubAgentExternalAgentRelationResponse, fU as SubAgentExternalAgentRelationSelectSchema, fW as SubAgentExternalAgentRelationUpdateSchema, dM as SubAgentInsertSchema, gL as SubAgentListResponse, dV as SubAgentRelationApiInsertSchema, dU as SubAgentRelationApiSelectSchema, dW as SubAgentRelationApiUpdateSchema, dS as SubAgentRelationInsertSchema, gW as SubAgentRelationListResponse, dX as SubAgentRelationQuerySchema, gG as SubAgentRelationResponse, dR as SubAgentRelationSelectSchema, dT as SubAgentRelationUpdateSchema, gv as SubAgentResponse, dL as SubAgentSelectSchema, f as SubAgentStopWhen, c as SubAgentStopWhenSchema, g2 as SubAgentTeamAgentRelationApiInsertSchema, g1 as SubAgentTeamAgentRelationApiSelectSchema, g3 as SubAgentTeamAgentRelationApiUpdateSchema, f$ as SubAgentTeamAgentRelationInsertSchema, h9 as SubAgentTeamAgentRelationListResponse, h8 as SubAgentTeamAgentRelationResponse, f_ as SubAgentTeamAgentRelationSelectSchema, g0 as SubAgentTeamAgentRelationUpdateSchema, fS as SubAgentToolRelationApiInsertSchema, fR as SubAgentToolRelationApiSelectSchema, fT as SubAgentToolRelationApiUpdateSchema, fP as SubAgentToolRelationInsertSchema, gX as SubAgentToolRelationListResponse, gH as SubAgentToolRelationResponse, fO as SubAgentToolRelationSelectSchema, fQ as SubAgentToolRelationUpdateSchema, dN as SubAgentUpdateSchema, e8 as TaskApiInsertSchema, e7 as TaskApiSelectSchema, e9 as TaskApiUpdateSchema, e5 as TaskInsertSchema, ee as TaskRelationApiInsertSchema, ed as TaskRelationApiSelectSchema, ef as TaskRelationApiUpdateSchema, eb as TaskRelationInsertSchema, ea as TaskRelationSelectSchema, ec as TaskRelationUpdateSchema, e4 as TaskSelectSchema, e6 as TaskUpdateSchema, gf as TeamAgentSchema, hg as TenantIdParamsSchema, hf as TenantParamsSchema, hk as TenantProjectAgentIdParamsSchema, hj as TenantProjectAgentParamsSchema, hm as TenantProjectAgentSubAgentIdParamsSchema, hl as TenantProjectAgentSubAgentParamsSchema, hi as TenantProjectIdParamsSchema, hh as TenantProjectParamsSchema, fv as ToolApiInsertSchema, fu as ToolApiSelectSchema, fw as ToolApiUpdateSchema, ek as ToolInsertSchema, gN as ToolListResponse, gx as ToolResponse, ej as ToolSelectSchema, eh as ToolStatusSchema, ft as ToolUpdateSchema, gd as canDelegateToExternalAgentSchema, ge as canDelegateToTeamAgentSchema } from '../utility-DbltUp2Q.cjs';
|
|
4
|
-
export { P as PropsValidationResult, v as validatePropsAsJsonSchema } from '../props-validation-BMR1qNiy.cjs';
|
|
5
|
-
import { z } from '@hono/zod-openapi';
|
|
6
|
-
import 'drizzle-zod';
|
|
7
|
-
import 'drizzle-orm/pg-core';
|
|
8
|
-
|
|
9
|
-
declare const MIN_ID_LENGTH = 1;
|
|
10
|
-
declare const MAX_ID_LENGTH = 255;
|
|
11
|
-
declare const URL_SAFE_ID_PATTERN: RegExp;
|
|
12
|
-
declare const resourceIdSchema: z.ZodString;
|
|
13
|
-
|
|
14
|
-
declare function validateAndTypeAgentData(data: unknown): z$1.infer<typeof AgentWithinContextOfProjectSchema>;
|
|
15
|
-
/**
|
|
16
|
-
* Validates that all tool IDs referenced in agents exist in the tools record
|
|
17
|
-
* Note: With scoped architecture, tool validation should be done at the project level
|
|
18
|
-
* This function is kept for backward compatibility but will need project-scoped tool data
|
|
19
|
-
*/
|
|
20
|
-
declare function validateToolReferences(agentData: FullAgentDefinition, availableToolIds?: Set<string>): void;
|
|
21
|
-
/**
|
|
22
|
-
* Validates that all dataComponent IDs referenced in agents exist in the dataComponents record
|
|
23
|
-
* Note: With scoped architecture, dataComponent validation should be done at the project level
|
|
24
|
-
*/
|
|
25
|
-
declare function validateDataComponentReferences(agentData: FullAgentDefinition, availableDataComponentIds?: Set<string>): void;
|
|
26
|
-
/**
|
|
27
|
-
* Validates that all artifactComponent IDs referenced in agents exist in the artifactComponents record.
|
|
28
|
-
* Note: With scoped architecture, artifactComponent validation should be done at the project level
|
|
29
|
-
*/
|
|
30
|
-
declare function validateArtifactComponentReferences(agentData: FullAgentDefinition, availableArtifactComponentIds?: Set<string>): void;
|
|
31
|
-
/**
|
|
32
|
-
* Validates agent relationships (transfer and delegation targets exist, and there is no circular delegation)
|
|
33
|
-
*/
|
|
34
|
-
declare function validateAgentRelationships(agentData: FullAgentDefinition): void;
|
|
35
|
-
declare function validateSubAgentExternalAgentRelations(agentData: FullAgentDefinition, availableExternalAgentIds?: Set<string>): void;
|
|
36
|
-
/**
|
|
37
|
-
* Validates the agent structure before creation/update
|
|
38
|
-
* Note: With scoped architecture, project-scoped resource validation should be done at project level
|
|
39
|
-
*/
|
|
40
|
-
declare function validateAgentStructure(agentData: FullAgentDefinition, projectResources?: {
|
|
41
|
-
toolIds?: Set<string>;
|
|
42
|
-
dataComponentIds?: Set<string>;
|
|
43
|
-
artifactComponentIds?: Set<string>;
|
|
44
|
-
externalAgentIds?: Set<string>;
|
|
45
|
-
}): void;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Agent transfer event data
|
|
49
|
-
* Used when an agent transfers control to another agent
|
|
50
|
-
*/
|
|
51
|
-
declare const TransferDataSchema: z$1.ZodObject<{
|
|
52
|
-
fromSubAgent: z$1.ZodString;
|
|
53
|
-
targetSubAgent: z$1.ZodString;
|
|
54
|
-
reason: z$1.ZodOptional<z$1.ZodString>;
|
|
55
|
-
context: z$1.ZodOptional<z$1.ZodAny>;
|
|
56
|
-
}, z$1.core.$strip>;
|
|
57
|
-
type TransferData = z$1.infer<typeof TransferDataSchema>;
|
|
58
|
-
/**
|
|
59
|
-
* Delegation sent event data
|
|
60
|
-
* Used when an agent delegates a task to another agent
|
|
61
|
-
*/
|
|
62
|
-
declare const DelegationSentDataSchema: z$1.ZodObject<{
|
|
63
|
-
delegationId: z$1.ZodString;
|
|
64
|
-
fromSubAgent: z$1.ZodString;
|
|
65
|
-
targetSubAgent: z$1.ZodString;
|
|
66
|
-
taskDescription: z$1.ZodString;
|
|
67
|
-
context: z$1.ZodOptional<z$1.ZodAny>;
|
|
68
|
-
}, z$1.core.$strip>;
|
|
69
|
-
type DelegationSentData = z$1.infer<typeof DelegationSentDataSchema>;
|
|
70
|
-
/**
|
|
71
|
-
* Delegation returned event data
|
|
72
|
-
* Used when a delegated task is completed and returned
|
|
73
|
-
*/
|
|
74
|
-
declare const DelegationReturnedDataSchema: z$1.ZodObject<{
|
|
75
|
-
delegationId: z$1.ZodString;
|
|
76
|
-
fromSubAgent: z$1.ZodString;
|
|
77
|
-
targetSubAgent: z$1.ZodString;
|
|
78
|
-
result: z$1.ZodOptional<z$1.ZodAny>;
|
|
79
|
-
}, z$1.core.$strip>;
|
|
80
|
-
type DelegationReturnedData = z$1.infer<typeof DelegationReturnedDataSchema>;
|
|
81
|
-
/**
|
|
82
|
-
* Data operation event details
|
|
83
|
-
* Used for emit operations and agent data events
|
|
84
|
-
*/
|
|
85
|
-
declare const DataOperationDetailsSchema: z$1.ZodObject<{
|
|
86
|
-
timestamp: z$1.ZodNumber;
|
|
87
|
-
subAgentId: z$1.ZodString;
|
|
88
|
-
data: z$1.ZodAny;
|
|
89
|
-
}, z$1.core.$strip>;
|
|
90
|
-
type DataOperationDetails = z$1.infer<typeof DataOperationDetailsSchema>;
|
|
91
|
-
/**
|
|
92
|
-
* Complete data operation event
|
|
93
|
-
* Includes type and label for user-facing display
|
|
94
|
-
*/
|
|
95
|
-
declare const DataOperationEventSchema: z$1.ZodObject<{
|
|
96
|
-
type: z$1.ZodString;
|
|
97
|
-
label: z$1.ZodString;
|
|
98
|
-
details: z$1.ZodObject<{
|
|
99
|
-
timestamp: z$1.ZodNumber;
|
|
100
|
-
subAgentId: z$1.ZodString;
|
|
101
|
-
data: z$1.ZodAny;
|
|
102
|
-
}, z$1.core.$strip>;
|
|
103
|
-
}, z$1.core.$strip>;
|
|
104
|
-
type DataOperationEvent = z$1.infer<typeof DataOperationEventSchema>;
|
|
105
|
-
/**
|
|
106
|
-
* Message metadata for A2A communication
|
|
107
|
-
* Used in message passing between agents
|
|
108
|
-
*/
|
|
109
|
-
declare const A2AMessageMetadataSchema: z$1.ZodObject<{
|
|
110
|
-
fromSubAgentId: z$1.ZodOptional<z$1.ZodString>;
|
|
111
|
-
toSubAgentId: z$1.ZodOptional<z$1.ZodString>;
|
|
112
|
-
fromExternalAgentId: z$1.ZodOptional<z$1.ZodString>;
|
|
113
|
-
toExternalAgentId: z$1.ZodOptional<z$1.ZodString>;
|
|
114
|
-
taskId: z$1.ZodOptional<z$1.ZodString>;
|
|
115
|
-
a2aTaskId: z$1.ZodOptional<z$1.ZodString>;
|
|
116
|
-
}, z$1.core.$strip>;
|
|
117
|
-
type A2AMessageMetadata = z$1.infer<typeof A2AMessageMetadataSchema>;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Valid URL-safe characters for resource IDs based on RFC 3986.
|
|
121
|
-
*
|
|
122
|
-
* Allowed characters:
|
|
123
|
-
* - Letters: a-z, A-Z
|
|
124
|
-
* - Numbers: 0-9
|
|
125
|
-
* - Hyphens: -
|
|
126
|
-
* - Underscores: _
|
|
127
|
-
*
|
|
128
|
-
* Note: While dots (.) and tildes (~) are technically URL-safe,
|
|
129
|
-
* we exclude them for consistency with existing patterns in the codebase.
|
|
130
|
-
*/
|
|
131
|
-
/**
|
|
132
|
-
* Helper function to validate if a string is a valid resource ID
|
|
133
|
-
*/
|
|
134
|
-
declare function isValidResourceId(id: string): boolean;
|
|
135
|
-
/**
|
|
136
|
-
* Helper function to generate a URL-safe ID from a name or title.
|
|
137
|
-
* Converts to lowercase and replaces invalid characters with hyphens.
|
|
138
|
-
*/
|
|
139
|
-
declare function generateIdFromName(name: string): string;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Validation utilities for component render code
|
|
143
|
-
*/
|
|
144
|
-
interface RenderValidationResult {
|
|
145
|
-
isValid: boolean;
|
|
146
|
-
errors: Array<{
|
|
147
|
-
field: string;
|
|
148
|
-
message: string;
|
|
149
|
-
}>;
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Validates component render code and data
|
|
153
|
-
*/
|
|
154
|
-
declare function validateRender(render: {
|
|
155
|
-
component: string;
|
|
156
|
-
mockData: Record<string, unknown>;
|
|
157
|
-
}): RenderValidationResult;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Vercel AI SDK Data Stream Protocol Event Schemas
|
|
161
|
-
*
|
|
162
|
-
* These schemas define the structure of events sent by the Inkeep Agents Run API.
|
|
163
|
-
* They are used by both the streaming backend and AI SDK providers to ensure type safety.
|
|
164
|
-
*/
|
|
165
|
-
/**
|
|
166
|
-
* Marks the beginning of a text stream
|
|
167
|
-
*/
|
|
168
|
-
declare const TextStartEventSchema: z$1.ZodObject<{
|
|
169
|
-
type: z$1.ZodLiteral<"text-start">;
|
|
170
|
-
id: z$1.ZodString;
|
|
171
|
-
}, z$1.core.$strip>;
|
|
172
|
-
/**
|
|
173
|
-
* Represents a chunk of streaming text
|
|
174
|
-
*/
|
|
175
|
-
declare const TextDeltaEventSchema: z$1.ZodObject<{
|
|
176
|
-
type: z$1.ZodLiteral<"text-delta">;
|
|
177
|
-
id: z$1.ZodString;
|
|
178
|
-
delta: z$1.ZodString;
|
|
179
|
-
}, z$1.core.$strip>;
|
|
180
|
-
/**
|
|
181
|
-
* Marks the end of a text stream
|
|
182
|
-
*/
|
|
183
|
-
declare const TextEndEventSchema: z$1.ZodObject<{
|
|
184
|
-
type: z$1.ZodLiteral<"text-end">;
|
|
185
|
-
id: z$1.ZodString;
|
|
186
|
-
}, z$1.core.$strip>;
|
|
187
|
-
/**
|
|
188
|
-
* Data component event - structured data in the stream
|
|
189
|
-
* Used for artifacts, visualizations, or other structured outputs
|
|
190
|
-
*/
|
|
191
|
-
declare const DataComponentStreamEventSchema: z$1.ZodObject<{
|
|
192
|
-
type: z$1.ZodLiteral<"data-component">;
|
|
193
|
-
id: z$1.ZodString;
|
|
194
|
-
data: z$1.ZodAny;
|
|
195
|
-
}, z$1.core.$strip>;
|
|
196
|
-
/**
|
|
197
|
-
* Data operation event - agent operations and state changes
|
|
198
|
-
* Wraps operation events (agent_initializing, completion, etc.)
|
|
199
|
-
*/
|
|
200
|
-
declare const DataOperationStreamEventSchema: z$1.ZodObject<{
|
|
201
|
-
type: z$1.ZodLiteral<"data-operation">;
|
|
202
|
-
data: z$1.ZodAny;
|
|
203
|
-
}, z$1.core.$strip>;
|
|
204
|
-
/**
|
|
205
|
-
* Data summary event - progress summaries and status updates
|
|
206
|
-
*/
|
|
207
|
-
declare const DataSummaryStreamEventSchema: z$1.ZodObject<{
|
|
208
|
-
type: z$1.ZodLiteral<"data-summary">;
|
|
209
|
-
data: z$1.ZodAny;
|
|
210
|
-
}, z$1.core.$strip>;
|
|
211
|
-
/**
|
|
212
|
-
* Stream error event
|
|
213
|
-
*/
|
|
214
|
-
declare const StreamErrorEventSchema: z$1.ZodObject<{
|
|
215
|
-
type: z$1.ZodLiteral<"error">;
|
|
216
|
-
error: z$1.ZodString;
|
|
217
|
-
}, z$1.core.$strip>;
|
|
218
|
-
/**
|
|
219
|
-
* Stream finish event with usage statistics
|
|
220
|
-
*/
|
|
221
|
-
declare const StreamFinishEventSchema: z$1.ZodObject<{
|
|
222
|
-
type: z$1.ZodLiteral<"finish">;
|
|
223
|
-
finishReason: z$1.ZodOptional<z$1.ZodString>;
|
|
224
|
-
usage: z$1.ZodOptional<z$1.ZodObject<{
|
|
225
|
-
promptTokens: z$1.ZodOptional<z$1.ZodNumber>;
|
|
226
|
-
completionTokens: z$1.ZodOptional<z$1.ZodNumber>;
|
|
227
|
-
totalTokens: z$1.ZodOptional<z$1.ZodNumber>;
|
|
228
|
-
}, z$1.core.$strip>>;
|
|
229
|
-
}, z$1.core.$strip>;
|
|
230
|
-
/**
|
|
231
|
-
* Union of all stream event types
|
|
232
|
-
* This is the main schema used for validating incoming stream events
|
|
233
|
-
*/
|
|
234
|
-
declare const StreamEventSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
235
|
-
type: z$1.ZodLiteral<"text-start">;
|
|
236
|
-
id: z$1.ZodString;
|
|
237
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
238
|
-
type: z$1.ZodLiteral<"text-delta">;
|
|
239
|
-
id: z$1.ZodString;
|
|
240
|
-
delta: z$1.ZodString;
|
|
241
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
242
|
-
type: z$1.ZodLiteral<"text-end">;
|
|
243
|
-
id: z$1.ZodString;
|
|
244
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
245
|
-
type: z$1.ZodLiteral<"data-component">;
|
|
246
|
-
id: z$1.ZodString;
|
|
247
|
-
data: z$1.ZodAny;
|
|
248
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
249
|
-
type: z$1.ZodLiteral<"data-operation">;
|
|
250
|
-
data: z$1.ZodAny;
|
|
251
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
252
|
-
type: z$1.ZodLiteral<"data-summary">;
|
|
253
|
-
data: z$1.ZodAny;
|
|
254
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
255
|
-
type: z$1.ZodLiteral<"error">;
|
|
256
|
-
error: z$1.ZodString;
|
|
257
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
258
|
-
type: z$1.ZodLiteral<"finish">;
|
|
259
|
-
finishReason: z$1.ZodOptional<z$1.ZodString>;
|
|
260
|
-
usage: z$1.ZodOptional<z$1.ZodObject<{
|
|
261
|
-
promptTokens: z$1.ZodOptional<z$1.ZodNumber>;
|
|
262
|
-
completionTokens: z$1.ZodOptional<z$1.ZodNumber>;
|
|
263
|
-
totalTokens: z$1.ZodOptional<z$1.ZodNumber>;
|
|
264
|
-
}, z$1.core.$strip>>;
|
|
265
|
-
}, z$1.core.$strip>], "type">;
|
|
266
|
-
type TextStartEvent = z$1.infer<typeof TextStartEventSchema>;
|
|
267
|
-
type TextDeltaEvent = z$1.infer<typeof TextDeltaEventSchema>;
|
|
268
|
-
type TextEndEvent = z$1.infer<typeof TextEndEventSchema>;
|
|
269
|
-
type DataComponentStreamEvent = z$1.infer<typeof DataComponentStreamEventSchema>;
|
|
270
|
-
type DataOperationStreamEvent = z$1.infer<typeof DataOperationStreamEventSchema>;
|
|
271
|
-
type DataSummaryStreamEvent = z$1.infer<typeof DataSummaryStreamEventSchema>;
|
|
272
|
-
type StreamErrorEvent = z$1.infer<typeof StreamErrorEventSchema>;
|
|
273
|
-
type StreamFinishEvent = z$1.infer<typeof StreamFinishEventSchema>;
|
|
274
|
-
/**
|
|
275
|
-
* Union type of all possible stream events
|
|
276
|
-
*/
|
|
277
|
-
type StreamEvent = z$1.infer<typeof StreamEventSchema>;
|
|
278
|
-
|
|
279
|
-
export { type A2AMessageMetadata, A2AMessageMetadataSchema, AgentWithinContextOfProjectSchema, type DataComponentStreamEvent, DataComponentStreamEventSchema, type DataOperationDetails, DataOperationDetailsSchema, type DataOperationEvent, DataOperationEventSchema, type DataOperationStreamEvent, DataOperationStreamEventSchema, type DataSummaryStreamEvent, DataSummaryStreamEventSchema, type DelegationReturnedData, DelegationReturnedDataSchema, type DelegationSentData, DelegationSentDataSchema, MAX_ID_LENGTH, MIN_ID_LENGTH, type RenderValidationResult, type StreamErrorEvent, StreamErrorEventSchema, type StreamEvent, StreamEventSchema, type StreamFinishEvent, StreamFinishEventSchema, type TextDeltaEvent, TextDeltaEventSchema, type TextEndEvent, TextEndEventSchema, type TextStartEvent, TextStartEventSchema, type TransferData, TransferDataSchema, URL_SAFE_ID_PATTERN, generateIdFromName, isValidResourceId, resourceIdSchema, validateAgentRelationships, validateAgentStructure, validateAndTypeAgentData, validateArtifactComponentReferences, validateDataComponentReferences, validateRender, validateSubAgentExternalAgentRelations, validateToolReferences };
|