@mdxui/do 2.1.1
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 +412 -0
- package/dist/__test-utils__/index.d.ts +399 -0
- package/dist/__test-utils__/index.js +34641 -0
- package/dist/__test-utils__/index.js.map +1 -0
- package/dist/agents-xcIn2dUB.d.ts +832 -0
- package/dist/chunk-EEDMN7UF.js +1351 -0
- package/dist/chunk-EEDMN7UF.js.map +1 -0
- package/dist/chunk-G3PMV62Z.js +33 -0
- package/dist/chunk-G3PMV62Z.js.map +1 -0
- package/dist/chunk-GGO5GW72.js +695 -0
- package/dist/chunk-GGO5GW72.js.map +1 -0
- package/dist/chunk-GKSP5RIA.js +3 -0
- package/dist/chunk-GKSP5RIA.js.map +1 -0
- package/dist/chunk-NXPXL5NA.js +3789 -0
- package/dist/chunk-NXPXL5NA.js.map +1 -0
- package/dist/chunk-PC5FJY6M.js +20 -0
- package/dist/chunk-PC5FJY6M.js.map +1 -0
- package/dist/chunk-XF6LKY2M.js +445 -0
- package/dist/chunk-XF6LKY2M.js.map +1 -0
- package/dist/components/index.d.ts +813 -0
- package/dist/components/index.js +8 -0
- package/dist/components/index.js.map +1 -0
- package/dist/do-CaQVueZw.d.ts +195 -0
- package/dist/hooks/index.d.ts +801 -0
- package/dist/hooks/index.js +7 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.d.ts +1012 -0
- package/dist/index.js +843 -0
- package/dist/index.js.map +1 -0
- package/dist/magic-string.es-J7BYFTTJ.js +1307 -0
- package/dist/magic-string.es-J7BYFTTJ.js.map +1 -0
- package/dist/providers/index.d.ts +90 -0
- package/dist/providers/index.js +5 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/schemas/index.d.ts +206 -0
- package/dist/schemas/index.js +262 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/thing-DtI25yZh.d.ts +902 -0
- package/dist/types/index.d.ts +7681 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +94 -0
|
@@ -0,0 +1,695 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
// src/types/schemas.ts
|
|
4
|
+
var ThingFilterSchema = z.object({
|
|
5
|
+
/** Filter by namespace - single string or array of strings */
|
|
6
|
+
ns: z.union([z.string(), z.array(z.string())]).optional(),
|
|
7
|
+
/** Filter by type - single string or array of strings */
|
|
8
|
+
type: z.union([z.string(), z.array(z.string())]).optional(),
|
|
9
|
+
/** Filter by ID pattern (supports wildcards) */
|
|
10
|
+
idPattern: z.string().optional(),
|
|
11
|
+
/** Filter by name (case-insensitive search) */
|
|
12
|
+
nameSearch: z.string().optional(),
|
|
13
|
+
/** Filter by creation date range - start */
|
|
14
|
+
createdAfter: z.coerce.date().optional(),
|
|
15
|
+
/** Filter by creation date range - end */
|
|
16
|
+
createdBefore: z.coerce.date().optional(),
|
|
17
|
+
/** Filter by update date range - start */
|
|
18
|
+
updatedAfter: z.coerce.date().optional(),
|
|
19
|
+
/** Filter by update date range - end */
|
|
20
|
+
updatedBefore: z.coerce.date().optional(),
|
|
21
|
+
/** Include soft-deleted things */
|
|
22
|
+
includeDeleted: z.boolean().optional(),
|
|
23
|
+
/** Filter by specific property values in data */
|
|
24
|
+
properties: z.record(z.unknown()).optional(),
|
|
25
|
+
/** Filter by variant */
|
|
26
|
+
variant: z.string().optional()
|
|
27
|
+
}).passthrough();
|
|
28
|
+
var ThingSortSchema = z.object({
|
|
29
|
+
/** Field to sort by */
|
|
30
|
+
field: z.enum(["name", "createdAt", "updatedAt", "ts", "type"]),
|
|
31
|
+
/** Sort direction */
|
|
32
|
+
order: z.enum(["asc", "desc"])
|
|
33
|
+
});
|
|
34
|
+
var ThingPaginationSchema = z.object({
|
|
35
|
+
/** Page number (1-indexed, must be positive) */
|
|
36
|
+
page: z.number().int().positive(),
|
|
37
|
+
/** Items per page (must be positive, max 1000) */
|
|
38
|
+
perPage: z.number().int().positive().max(1e3)
|
|
39
|
+
});
|
|
40
|
+
var ThingDataSchema = z.object({
|
|
41
|
+
/** JSON-LD context */
|
|
42
|
+
"@context": z.union([z.string(), z.record(z.unknown())]).optional(),
|
|
43
|
+
/** JSON-LD type */
|
|
44
|
+
"@type": z.string().optional(),
|
|
45
|
+
/** JSON-LD identifier */
|
|
46
|
+
"@id": z.string().optional()
|
|
47
|
+
}).passthrough();
|
|
48
|
+
var ThingCreateInputSchema = z.object({
|
|
49
|
+
/** Namespace (required, non-empty string) */
|
|
50
|
+
ns: z.string().min(1, "Namespace is required"),
|
|
51
|
+
/** Type (required, non-empty string) */
|
|
52
|
+
type: z.string().min(1, "Type is required"),
|
|
53
|
+
/** ID (optional, auto-generated if not provided) */
|
|
54
|
+
id: z.string().optional(),
|
|
55
|
+
/** Display name (required, non-empty string) */
|
|
56
|
+
name: z.string().min(1, "Name is required"),
|
|
57
|
+
/** JSON-LD data */
|
|
58
|
+
data: ThingDataSchema,
|
|
59
|
+
/** Variant for A/B testing */
|
|
60
|
+
variant: z.string().optional()
|
|
61
|
+
});
|
|
62
|
+
var ThingUpdateInputSchema = z.object({
|
|
63
|
+
/** Updated name */
|
|
64
|
+
name: z.string().min(1, "Name cannot be empty").optional(),
|
|
65
|
+
/** Updated data (merged with existing) */
|
|
66
|
+
data: ThingDataSchema.partial().optional(),
|
|
67
|
+
/** Updated variant */
|
|
68
|
+
variant: z.string().optional()
|
|
69
|
+
});
|
|
70
|
+
var ThingDeleteOptionsSchema = z.object({
|
|
71
|
+
/** Hard delete (permanent) vs soft delete */
|
|
72
|
+
hard: z.boolean().optional()
|
|
73
|
+
});
|
|
74
|
+
var AgentStatusSchema = z.enum(["draft", "active", "paused", "deprecated", "archived"]);
|
|
75
|
+
var RoleCategorySchema = z.enum([
|
|
76
|
+
"sdr",
|
|
77
|
+
"csm",
|
|
78
|
+
"engineer",
|
|
79
|
+
"devops",
|
|
80
|
+
"content",
|
|
81
|
+
"design",
|
|
82
|
+
"security",
|
|
83
|
+
"compliance",
|
|
84
|
+
"finance",
|
|
85
|
+
"hr",
|
|
86
|
+
"legal",
|
|
87
|
+
"support",
|
|
88
|
+
"analyst",
|
|
89
|
+
"researcher",
|
|
90
|
+
"manager",
|
|
91
|
+
"executive",
|
|
92
|
+
"specialist",
|
|
93
|
+
"custom"
|
|
94
|
+
]);
|
|
95
|
+
var WorkModeSchema = z.enum(["digital-first", "hybrid", "embodiment-required"]);
|
|
96
|
+
var AgentFilterSchema = z.object({
|
|
97
|
+
/** Filter by status - array of status values */
|
|
98
|
+
status: z.array(AgentStatusSchema).optional(),
|
|
99
|
+
/** Filter by role category - array of role categories */
|
|
100
|
+
roleCategory: z.array(RoleCategorySchema).optional(),
|
|
101
|
+
/** Filter by work mode - array of work modes */
|
|
102
|
+
workMode: z.array(WorkModeSchema).optional(),
|
|
103
|
+
/** Filter by namespace */
|
|
104
|
+
ns: z.string().optional(),
|
|
105
|
+
/** Search by name */
|
|
106
|
+
nameSearch: z.string().optional(),
|
|
107
|
+
/** Filter by tools - array of tool names */
|
|
108
|
+
tools: z.array(z.string()).optional(),
|
|
109
|
+
/** Minimum autonomy level (0-1) */
|
|
110
|
+
minAutonomyLevel: z.number().min(0).max(1).optional()
|
|
111
|
+
}).passthrough();
|
|
112
|
+
var AgentExecutionStatusSchema = z.enum([
|
|
113
|
+
"pending",
|
|
114
|
+
"running",
|
|
115
|
+
"completed",
|
|
116
|
+
"failed",
|
|
117
|
+
"cancelled",
|
|
118
|
+
"handed-off",
|
|
119
|
+
"awaiting-human"
|
|
120
|
+
]);
|
|
121
|
+
var AgentExecutionFilterSchema = z.object({
|
|
122
|
+
/** Filter by agent ID */
|
|
123
|
+
agentId: z.string().optional(),
|
|
124
|
+
/** Filter by status - array of status values */
|
|
125
|
+
status: z.array(AgentExecutionStatusSchema).optional(),
|
|
126
|
+
/** Filter by date range - start */
|
|
127
|
+
startedAfter: z.coerce.date().optional(),
|
|
128
|
+
/** Filter by date range - end */
|
|
129
|
+
startedBefore: z.coerce.date().optional(),
|
|
130
|
+
/** Filter by namespace */
|
|
131
|
+
ns: z.string().optional(),
|
|
132
|
+
/** Filter by triggered by */
|
|
133
|
+
triggeredBy: z.string().optional(),
|
|
134
|
+
/** Has feedback */
|
|
135
|
+
hasFeedback: z.boolean().optional(),
|
|
136
|
+
/** Minimum rating (1-5) */
|
|
137
|
+
minRating: z.number().int().min(1).max(5).optional()
|
|
138
|
+
}).passthrough();
|
|
139
|
+
var AgentExecuteInputSchema = z.object({
|
|
140
|
+
/** Task description (required) */
|
|
141
|
+
task: z.string().min(1, "Task description is required"),
|
|
142
|
+
/** Context information */
|
|
143
|
+
context: z.record(z.unknown()).optional()
|
|
144
|
+
});
|
|
145
|
+
var AgentFeedbackInputSchema = z.object({
|
|
146
|
+
/** Rating (1-5) */
|
|
147
|
+
rating: z.number().int().min(1).max(5),
|
|
148
|
+
/** Comment */
|
|
149
|
+
comment: z.string().optional(),
|
|
150
|
+
/** Feedback categories */
|
|
151
|
+
categories: z.array(z.enum(["accurate", "helpful", "fast", "clear", "wrong", "slow", "confusing"])).optional()
|
|
152
|
+
});
|
|
153
|
+
var WorkflowStatusSchema = z.enum(["draft", "active", "deprecated", "archived"]);
|
|
154
|
+
var TriggerTypeSchema = z.enum(["event", "schedule", "manual", "webhook"]);
|
|
155
|
+
var WorkflowFilterSchema = z.object({
|
|
156
|
+
/** Filter by status - array of status values */
|
|
157
|
+
status: z.array(WorkflowStatusSchema).optional(),
|
|
158
|
+
/** Filter by namespace */
|
|
159
|
+
ns: z.string().optional(),
|
|
160
|
+
/** Filter by tags - array of tag strings */
|
|
161
|
+
tags: z.array(z.string()).optional(),
|
|
162
|
+
/** Filter by trigger type - array of trigger types */
|
|
163
|
+
triggerType: z.array(TriggerTypeSchema).optional(),
|
|
164
|
+
/** Search by name */
|
|
165
|
+
nameSearch: z.string().optional(),
|
|
166
|
+
/** Filter by owner */
|
|
167
|
+
owner: z.string().optional()
|
|
168
|
+
}).passthrough();
|
|
169
|
+
var ExecutionStatusSchema = z.enum([
|
|
170
|
+
"pending",
|
|
171
|
+
"running",
|
|
172
|
+
"completed",
|
|
173
|
+
"failed",
|
|
174
|
+
"cancelled",
|
|
175
|
+
"compensating",
|
|
176
|
+
"compensated"
|
|
177
|
+
]);
|
|
178
|
+
var ExecutionFilterSchema = z.object({
|
|
179
|
+
/** Filter by workflow ID */
|
|
180
|
+
workflowId: z.string().optional(),
|
|
181
|
+
/** Filter by status - array of status values */
|
|
182
|
+
status: z.array(ExecutionStatusSchema).optional(),
|
|
183
|
+
/** Filter by trigger type - array of trigger types */
|
|
184
|
+
triggerType: z.array(TriggerTypeSchema).optional(),
|
|
185
|
+
/** Filter by date range - start */
|
|
186
|
+
startedAfter: z.coerce.date().optional(),
|
|
187
|
+
/** Filter by date range - end */
|
|
188
|
+
startedBefore: z.coerce.date().optional(),
|
|
189
|
+
/** Filter by namespace */
|
|
190
|
+
ns: z.string().optional()
|
|
191
|
+
}).passthrough();
|
|
192
|
+
var WorkflowTriggerInputSchema = z.record(z.unknown()).optional();
|
|
193
|
+
var EntityReferenceSchema = z.object({
|
|
194
|
+
/** Namespace */
|
|
195
|
+
ns: z.string().min(1, "Namespace is required"),
|
|
196
|
+
/** Type */
|
|
197
|
+
type: z.string().min(1, "Type is required"),
|
|
198
|
+
/** ID */
|
|
199
|
+
id: z.string().min(1, "ID is required"),
|
|
200
|
+
/** Semantic ID (ns/type/id) */
|
|
201
|
+
semanticId: z.string().optional(),
|
|
202
|
+
/** Display name (if loaded) */
|
|
203
|
+
name: z.string().optional()
|
|
204
|
+
});
|
|
205
|
+
var PartialEntityReferenceSchema = z.object({
|
|
206
|
+
/** Namespace */
|
|
207
|
+
ns: z.string().optional(),
|
|
208
|
+
/** Type */
|
|
209
|
+
type: z.string().optional(),
|
|
210
|
+
/** ID */
|
|
211
|
+
id: z.string().optional()
|
|
212
|
+
}).passthrough();
|
|
213
|
+
var SemanticPredicateCategorySchema = z.enum([
|
|
214
|
+
"temporal",
|
|
215
|
+
"spatial",
|
|
216
|
+
"directional",
|
|
217
|
+
"relational",
|
|
218
|
+
"causal",
|
|
219
|
+
"ownership",
|
|
220
|
+
"membership",
|
|
221
|
+
"dependency",
|
|
222
|
+
"custom"
|
|
223
|
+
]);
|
|
224
|
+
var RelationshipFilterSchema = z.object({
|
|
225
|
+
/** Filter by predicate type - array of predicates */
|
|
226
|
+
predicates: z.array(z.string()).optional(),
|
|
227
|
+
/** Filter by source entity */
|
|
228
|
+
from: PartialEntityReferenceSchema.optional(),
|
|
229
|
+
/** Filter by target entity */
|
|
230
|
+
to: PartialEntityReferenceSchema.optional(),
|
|
231
|
+
/** Filter by category - array of categories */
|
|
232
|
+
categories: z.array(SemanticPredicateCategorySchema).optional(),
|
|
233
|
+
/** Include deleted */
|
|
234
|
+
includeDeleted: z.boolean().optional(),
|
|
235
|
+
/** Filter by metadata */
|
|
236
|
+
metadata: z.record(z.unknown()).optional(),
|
|
237
|
+
/** Date range - start */
|
|
238
|
+
createdAfter: z.coerce.date().optional(),
|
|
239
|
+
/** Date range - end */
|
|
240
|
+
createdBefore: z.coerce.date().optional()
|
|
241
|
+
}).passthrough();
|
|
242
|
+
var RelationshipMetadataSchema = z.object({
|
|
243
|
+
/** Relationship strength/weight (0-1) */
|
|
244
|
+
weight: z.number().min(0).max(1).optional(),
|
|
245
|
+
/** Confidence score (0-1) */
|
|
246
|
+
confidence: z.number().min(0).max(1).optional(),
|
|
247
|
+
/** Source of the relationship */
|
|
248
|
+
source: z.enum(["manual", "inferred", "imported", "system"]).optional(),
|
|
249
|
+
/** Start date (for temporal relationships) */
|
|
250
|
+
startDate: z.coerce.date().optional(),
|
|
251
|
+
/** End date (for temporal relationships) */
|
|
252
|
+
endDate: z.coerce.date().optional()
|
|
253
|
+
}).passthrough();
|
|
254
|
+
var RelationshipCreateInputSchema = z.object({
|
|
255
|
+
/** Predicate type (required) */
|
|
256
|
+
relationshipType: z.string().min(1, "Relationship type is required"),
|
|
257
|
+
/** Source entity (required) */
|
|
258
|
+
from: EntityReferenceSchema,
|
|
259
|
+
/** Target entity (required) */
|
|
260
|
+
to: EntityReferenceSchema,
|
|
261
|
+
/** Metadata */
|
|
262
|
+
metadata: RelationshipMetadataSchema.optional()
|
|
263
|
+
});
|
|
264
|
+
var GraphPatternSchema = z.object({
|
|
265
|
+
/** Subject pattern */
|
|
266
|
+
subject: PartialEntityReferenceSchema.extend({ pattern: z.string().optional() }).optional(),
|
|
267
|
+
/** Predicate filter - single or array */
|
|
268
|
+
predicate: z.union([z.string(), z.array(z.string())]).optional(),
|
|
269
|
+
/** Object pattern */
|
|
270
|
+
object: PartialEntityReferenceSchema.extend({ pattern: z.string().optional() }).optional(),
|
|
271
|
+
/** Maximum depth for traversal */
|
|
272
|
+
depth: z.number().int().positive().max(10).optional(),
|
|
273
|
+
/** Direction of traversal */
|
|
274
|
+
direction: z.enum(["outgoing", "incoming", "both"]).optional()
|
|
275
|
+
}).passthrough();
|
|
276
|
+
var DateResponseSchema = z.union([
|
|
277
|
+
z.date(),
|
|
278
|
+
z.string().datetime().transform((str) => new Date(str)),
|
|
279
|
+
z.string().transform((str) => new Date(str))
|
|
280
|
+
// Fallback for non-standard date strings
|
|
281
|
+
]);
|
|
282
|
+
var OptionalDateResponseSchema = z.union([DateResponseSchema, z.null()]).optional();
|
|
283
|
+
var ThingResponseSchema = z.object({
|
|
284
|
+
ns: z.string(),
|
|
285
|
+
type: z.string(),
|
|
286
|
+
id: z.string(),
|
|
287
|
+
ts: DateResponseSchema,
|
|
288
|
+
name: z.string(),
|
|
289
|
+
createdAt: DateResponseSchema,
|
|
290
|
+
updatedAt: DateResponseSchema,
|
|
291
|
+
createdBy: z.string().optional(),
|
|
292
|
+
updatedBy: z.string().optional(),
|
|
293
|
+
deletedAt: OptionalDateResponseSchema,
|
|
294
|
+
variant: z.string().optional(),
|
|
295
|
+
data: ThingDataSchema
|
|
296
|
+
});
|
|
297
|
+
var ThingQueryResultResponseSchema = z.object({
|
|
298
|
+
data: z.array(ThingResponseSchema),
|
|
299
|
+
total: z.number(),
|
|
300
|
+
page: z.number(),
|
|
301
|
+
perPage: z.number(),
|
|
302
|
+
totalPages: z.number()
|
|
303
|
+
});
|
|
304
|
+
var ThingVersionResponseSchema = z.object({
|
|
305
|
+
eventId: z.string(),
|
|
306
|
+
eventType: z.enum(["create", "update", "delete", "create_version", "update_version"]),
|
|
307
|
+
ts: DateResponseSchema,
|
|
308
|
+
userId: z.string(),
|
|
309
|
+
data: ThingDataSchema,
|
|
310
|
+
delta: ThingDataSchema.optional(),
|
|
311
|
+
metadata: z.record(z.unknown())
|
|
312
|
+
});
|
|
313
|
+
var TypeStatsResponseSchema = z.object({
|
|
314
|
+
type: z.string(),
|
|
315
|
+
ns: z.string(),
|
|
316
|
+
count: z.number(),
|
|
317
|
+
activeCount: z.number(),
|
|
318
|
+
createdToday: z.number(),
|
|
319
|
+
updatedToday: z.number(),
|
|
320
|
+
lastCreatedAt: DateResponseSchema.optional(),
|
|
321
|
+
lastUpdatedAt: DateResponseSchema.optional()
|
|
322
|
+
});
|
|
323
|
+
var AgentTypeResponseSchema = z.object({
|
|
324
|
+
onetCode: z.string().optional(),
|
|
325
|
+
onetTitle: z.string().optional(),
|
|
326
|
+
naicsCode: z.string().optional(),
|
|
327
|
+
naicsTitle: z.string().optional(),
|
|
328
|
+
customType: z.string().optional(),
|
|
329
|
+
roleCategory: RoleCategorySchema
|
|
330
|
+
});
|
|
331
|
+
var AgentClassificationResponseSchema = z.object({
|
|
332
|
+
workMode: WorkModeSchema,
|
|
333
|
+
roleType: z.enum(["leadership", "analytical", "creative", "customer-facing", "operational"]),
|
|
334
|
+
autonomyLevel: z.number(),
|
|
335
|
+
automationScore: z.number().optional(),
|
|
336
|
+
jobZone: z.number().optional(),
|
|
337
|
+
requiredSkills: z.array(z.string()),
|
|
338
|
+
requiredKnowledge: z.array(z.string())
|
|
339
|
+
});
|
|
340
|
+
var CharacterBibleResponseSchema = z.object({
|
|
341
|
+
fullName: z.string(),
|
|
342
|
+
pronouns: z.string(),
|
|
343
|
+
age: z.number().optional(),
|
|
344
|
+
background: z.string(),
|
|
345
|
+
traits: z.array(z.string()),
|
|
346
|
+
communicationStyle: z.string(),
|
|
347
|
+
expertise: z.array(z.string()),
|
|
348
|
+
limitations: z.array(z.string()),
|
|
349
|
+
avatarUrl: z.string().optional(),
|
|
350
|
+
voiceCharacteristics: z.string().optional()
|
|
351
|
+
});
|
|
352
|
+
var AgentGuardrailResponseSchema = z.object({
|
|
353
|
+
id: z.string(),
|
|
354
|
+
type: z.enum(["input", "output", "action", "content", "safety"]),
|
|
355
|
+
check: z.string(),
|
|
356
|
+
onViolation: z.enum(["block", "warn", "log", "escalate"]),
|
|
357
|
+
validator: z.string().optional(),
|
|
358
|
+
severity: z.enum(["low", "medium", "high", "critical"])
|
|
359
|
+
});
|
|
360
|
+
var HandoffRuleResponseSchema = z.object({
|
|
361
|
+
id: z.string(),
|
|
362
|
+
condition: z.string(),
|
|
363
|
+
target: z.string(),
|
|
364
|
+
targetType: z.enum(["agent", "workflow", "human"]),
|
|
365
|
+
context: z.array(z.string()),
|
|
366
|
+
required: z.boolean(),
|
|
367
|
+
priority: z.number()
|
|
368
|
+
});
|
|
369
|
+
var AgentMetricsResponseSchema = z.object({
|
|
370
|
+
totalExecutions: z.number(),
|
|
371
|
+
successfulExecutions: z.number(),
|
|
372
|
+
failedExecutions: z.number(),
|
|
373
|
+
successRate: z.number(),
|
|
374
|
+
avgDurationMs: z.number(),
|
|
375
|
+
avgIterations: z.number(),
|
|
376
|
+
avgTokenUsage: z.number(),
|
|
377
|
+
avgCostUsd: z.number(),
|
|
378
|
+
userSatisfaction: z.number().optional(),
|
|
379
|
+
lastExecutedAt: DateResponseSchema.optional(),
|
|
380
|
+
periodStart: DateResponseSchema,
|
|
381
|
+
periodEnd: DateResponseSchema
|
|
382
|
+
});
|
|
383
|
+
var AgentResponseSchema = z.object({
|
|
384
|
+
id: z.string(),
|
|
385
|
+
name: z.string(),
|
|
386
|
+
slug: z.string(),
|
|
387
|
+
description: z.string(),
|
|
388
|
+
ns: z.string(),
|
|
389
|
+
type: AgentTypeResponseSchema,
|
|
390
|
+
classification: AgentClassificationResponseSchema,
|
|
391
|
+
systemPrompt: z.string(),
|
|
392
|
+
characterBible: CharacterBibleResponseSchema.optional(),
|
|
393
|
+
tools: z.array(z.string()),
|
|
394
|
+
model: z.string(),
|
|
395
|
+
maxIterations: z.number(),
|
|
396
|
+
thinkingBudget: z.number().optional(),
|
|
397
|
+
guardrails: z.array(AgentGuardrailResponseSchema),
|
|
398
|
+
handoffRules: z.array(HandoffRuleResponseSchema),
|
|
399
|
+
status: AgentStatusSchema,
|
|
400
|
+
metrics: AgentMetricsResponseSchema.optional(),
|
|
401
|
+
createdAt: DateResponseSchema,
|
|
402
|
+
updatedAt: DateResponseSchema,
|
|
403
|
+
createdBy: z.string()
|
|
404
|
+
});
|
|
405
|
+
var TokenUsageResponseSchema = z.object({
|
|
406
|
+
inputTokens: z.number(),
|
|
407
|
+
outputTokens: z.number(),
|
|
408
|
+
totalTokens: z.number(),
|
|
409
|
+
thinkingTokens: z.number().optional()
|
|
410
|
+
});
|
|
411
|
+
var AgentInputResponseSchema = z.object({
|
|
412
|
+
task: z.string(),
|
|
413
|
+
context: z.record(z.unknown()).optional(),
|
|
414
|
+
constraints: z.array(z.string()).optional(),
|
|
415
|
+
outputFormat: z.string().optional()
|
|
416
|
+
});
|
|
417
|
+
var AgentArtifactResponseSchema = z.object({
|
|
418
|
+
type: z.enum(["file", "code", "image", "document", "data"]),
|
|
419
|
+
name: z.string(),
|
|
420
|
+
content: z.string(),
|
|
421
|
+
mimeType: z.string().optional()
|
|
422
|
+
});
|
|
423
|
+
var AgentOutputResponseSchema = z.object({
|
|
424
|
+
result: z.unknown(),
|
|
425
|
+
summary: z.string(),
|
|
426
|
+
confidence: z.number().optional(),
|
|
427
|
+
artifacts: z.array(AgentArtifactResponseSchema).optional(),
|
|
428
|
+
recommendations: z.array(z.string()).optional()
|
|
429
|
+
});
|
|
430
|
+
var AgentTraceResponseSchema = z.object({
|
|
431
|
+
iteration: z.number(),
|
|
432
|
+
timestamp: DateResponseSchema,
|
|
433
|
+
type: z.enum(["thought", "action", "observation", "decision"]),
|
|
434
|
+
content: z.string(),
|
|
435
|
+
tool: z.string().optional(),
|
|
436
|
+
toolInput: z.record(z.unknown()).optional(),
|
|
437
|
+
toolOutput: z.unknown().optional(),
|
|
438
|
+
tokenUsage: TokenUsageResponseSchema.optional()
|
|
439
|
+
});
|
|
440
|
+
var AgentHandoffResponseSchema = z.object({
|
|
441
|
+
timestamp: DateResponseSchema,
|
|
442
|
+
ruleId: z.string(),
|
|
443
|
+
fromAgent: z.string(),
|
|
444
|
+
toTarget: z.string(),
|
|
445
|
+
targetType: z.enum(["agent", "workflow", "human"]),
|
|
446
|
+
context: z.record(z.unknown()),
|
|
447
|
+
successful: z.boolean()
|
|
448
|
+
});
|
|
449
|
+
var GuardrailViolationResponseSchema = z.object({
|
|
450
|
+
timestamp: DateResponseSchema,
|
|
451
|
+
guardrailId: z.string(),
|
|
452
|
+
type: z.string(),
|
|
453
|
+
details: z.string(),
|
|
454
|
+
actionTaken: z.enum(["blocked", "warned", "logged", "escalated"]),
|
|
455
|
+
severity: z.enum(["low", "medium", "high", "critical"])
|
|
456
|
+
});
|
|
457
|
+
var AgentFeedbackResponseSchema = z.object({
|
|
458
|
+
rating: z.number(),
|
|
459
|
+
comment: z.string().optional(),
|
|
460
|
+
categories: z.array(z.enum(["accurate", "helpful", "fast", "clear", "wrong", "slow", "confusing"])).optional(),
|
|
461
|
+
submittedAt: DateResponseSchema,
|
|
462
|
+
submittedBy: z.string()
|
|
463
|
+
});
|
|
464
|
+
var AgentExecutionResponseSchema = z.object({
|
|
465
|
+
id: z.string(),
|
|
466
|
+
agentId: z.string(),
|
|
467
|
+
status: AgentExecutionStatusSchema,
|
|
468
|
+
input: AgentInputResponseSchema,
|
|
469
|
+
output: AgentOutputResponseSchema.optional(),
|
|
470
|
+
trace: z.array(AgentTraceResponseSchema),
|
|
471
|
+
handoffs: z.array(AgentHandoffResponseSchema),
|
|
472
|
+
violations: z.array(GuardrailViolationResponseSchema),
|
|
473
|
+
startedAt: DateResponseSchema,
|
|
474
|
+
completedAt: DateResponseSchema.optional(),
|
|
475
|
+
durationMs: z.number().optional(),
|
|
476
|
+
iterations: z.number(),
|
|
477
|
+
tokenUsage: TokenUsageResponseSchema,
|
|
478
|
+
costUsd: z.number(),
|
|
479
|
+
feedback: AgentFeedbackResponseSchema.optional(),
|
|
480
|
+
ns: z.string(),
|
|
481
|
+
triggeredBy: z.string()
|
|
482
|
+
});
|
|
483
|
+
var RetryConfigResponseSchema = z.object({
|
|
484
|
+
maxAttempts: z.number(),
|
|
485
|
+
backoff: z.enum(["exponential", "linear", "fixed"]),
|
|
486
|
+
initialDelayMs: z.number(),
|
|
487
|
+
maxDelayMs: z.number(),
|
|
488
|
+
retryOn: z.array(z.string()).optional()
|
|
489
|
+
});
|
|
490
|
+
var StepConfigResponseSchema = z.record(z.unknown());
|
|
491
|
+
var WorkflowStepResponseSchema = z.object({
|
|
492
|
+
id: z.string(),
|
|
493
|
+
name: z.string(),
|
|
494
|
+
type: z.enum(["function", "workflow", "task", "wait", "parallel", "choice", "foreach", "http", "database", "ai", "event"]),
|
|
495
|
+
config: StepConfigResponseSchema,
|
|
496
|
+
dependsOn: z.array(z.string()).optional(),
|
|
497
|
+
chainAfter: z.string().optional(),
|
|
498
|
+
condition: z.record(z.unknown()).optional(),
|
|
499
|
+
retry: RetryConfigResponseSchema.optional(),
|
|
500
|
+
timeout: z.number().optional(),
|
|
501
|
+
outputMapping: z.record(z.string()).optional()
|
|
502
|
+
});
|
|
503
|
+
var TriggerBaseResponseSchema = z.object({
|
|
504
|
+
type: TriggerTypeSchema,
|
|
505
|
+
name: z.string(),
|
|
506
|
+
enabled: z.boolean()
|
|
507
|
+
});
|
|
508
|
+
var WorkflowTriggerResponseSchema = z.discriminatedUnion("type", [
|
|
509
|
+
TriggerBaseResponseSchema.extend({
|
|
510
|
+
type: z.literal("event"),
|
|
511
|
+
pattern: z.string(),
|
|
512
|
+
filter: z.record(z.unknown()).optional(),
|
|
513
|
+
batch: z.object({
|
|
514
|
+
maxSize: z.number(),
|
|
515
|
+
maxWaitMs: z.number()
|
|
516
|
+
}).optional()
|
|
517
|
+
}),
|
|
518
|
+
TriggerBaseResponseSchema.extend({
|
|
519
|
+
type: z.literal("schedule"),
|
|
520
|
+
cron: z.string().optional(),
|
|
521
|
+
intervalSeconds: z.number().optional(),
|
|
522
|
+
timezone: z.string().optional()
|
|
523
|
+
}),
|
|
524
|
+
TriggerBaseResponseSchema.extend({
|
|
525
|
+
type: z.literal("manual"),
|
|
526
|
+
inputSchema: z.record(z.unknown()).optional(),
|
|
527
|
+
requireApproval: z.boolean().optional(),
|
|
528
|
+
allowedBy: z.array(z.string()).optional()
|
|
529
|
+
}),
|
|
530
|
+
TriggerBaseResponseSchema.extend({
|
|
531
|
+
type: z.literal("webhook"),
|
|
532
|
+
path: z.string(),
|
|
533
|
+
methods: z.array(z.enum(["GET", "POST", "PUT", "DELETE"])),
|
|
534
|
+
authentication: z.enum(["none", "api-key", "jwt", "hmac"]).optional(),
|
|
535
|
+
hmacSecret: z.string().optional()
|
|
536
|
+
})
|
|
537
|
+
]);
|
|
538
|
+
var ErrorHandlingConfigResponseSchema = z.object({
|
|
539
|
+
strategy: z.enum(["retry", "compensate", "ignore", "fail"]),
|
|
540
|
+
retry: RetryConfigResponseSchema.optional(),
|
|
541
|
+
notify: z.object({
|
|
542
|
+
channels: z.array(z.enum(["email", "slack", "webhook"])),
|
|
543
|
+
recipients: z.array(z.string()),
|
|
544
|
+
messageTemplate: z.string().optional()
|
|
545
|
+
}).optional(),
|
|
546
|
+
errorHandler: z.string().optional()
|
|
547
|
+
});
|
|
548
|
+
var CompensationConfigResponseSchema = z.object({
|
|
549
|
+
steps: z.array(WorkflowStepResponseSchema),
|
|
550
|
+
strategy: z.enum(["sequential", "parallel"]),
|
|
551
|
+
continueOnFailure: z.boolean()
|
|
552
|
+
});
|
|
553
|
+
var WorkflowConfigResponseSchema = z.object({
|
|
554
|
+
timeout: z.number(),
|
|
555
|
+
maxConcurrency: z.number().optional(),
|
|
556
|
+
rateLimit: z.object({
|
|
557
|
+
maxPerMinute: z.number(),
|
|
558
|
+
strategy: z.enum(["sliding", "fixed"])
|
|
559
|
+
}).optional(),
|
|
560
|
+
executionMode: z.enum(["async", "sync"]),
|
|
561
|
+
storeHistory: z.boolean(),
|
|
562
|
+
historyRetentionDays: z.number()
|
|
563
|
+
});
|
|
564
|
+
var WorkflowResponseSchema = z.object({
|
|
565
|
+
id: z.string(),
|
|
566
|
+
slug: z.string(),
|
|
567
|
+
name: z.string(),
|
|
568
|
+
description: z.string(),
|
|
569
|
+
ns: z.string(),
|
|
570
|
+
version: z.string(),
|
|
571
|
+
status: WorkflowStatusSchema,
|
|
572
|
+
trigger: WorkflowTriggerResponseSchema,
|
|
573
|
+
steps: z.array(WorkflowStepResponseSchema),
|
|
574
|
+
errorHandling: ErrorHandlingConfigResponseSchema,
|
|
575
|
+
compensation: CompensationConfigResponseSchema.optional(),
|
|
576
|
+
config: WorkflowConfigResponseSchema,
|
|
577
|
+
tags: z.array(z.string()),
|
|
578
|
+
owner: z.string(),
|
|
579
|
+
createdAt: DateResponseSchema,
|
|
580
|
+
updatedAt: DateResponseSchema
|
|
581
|
+
});
|
|
582
|
+
var TriggerDataResponseSchema = z.object({
|
|
583
|
+
type: TriggerTypeSchema,
|
|
584
|
+
data: z.record(z.unknown()),
|
|
585
|
+
triggeredAt: DateResponseSchema,
|
|
586
|
+
source: z.string()
|
|
587
|
+
});
|
|
588
|
+
var ExecutionContextResponseSchema = z.object({
|
|
589
|
+
variables: z.record(z.unknown()),
|
|
590
|
+
stepOutputs: z.record(z.unknown()),
|
|
591
|
+
metadata: z.record(z.unknown())
|
|
592
|
+
});
|
|
593
|
+
var ExecutionErrorResponseSchema = z.object({
|
|
594
|
+
code: z.string(),
|
|
595
|
+
message: z.string(),
|
|
596
|
+
stack: z.string().optional(),
|
|
597
|
+
failedStep: z.string().optional()
|
|
598
|
+
});
|
|
599
|
+
var StepExecutionResponseSchema = z.object({
|
|
600
|
+
stepId: z.string(),
|
|
601
|
+
stepName: z.string(),
|
|
602
|
+
status: ExecutionStatusSchema,
|
|
603
|
+
input: z.record(z.unknown()),
|
|
604
|
+
output: z.record(z.unknown()).optional(),
|
|
605
|
+
error: ExecutionErrorResponseSchema.optional(),
|
|
606
|
+
startedAt: DateResponseSchema,
|
|
607
|
+
completedAt: DateResponseSchema.optional(),
|
|
608
|
+
durationMs: z.number().optional(),
|
|
609
|
+
retryCount: z.number()
|
|
610
|
+
});
|
|
611
|
+
var WorkflowExecutionResponseSchema = z.object({
|
|
612
|
+
id: z.string(),
|
|
613
|
+
workflowId: z.string(),
|
|
614
|
+
workflowVersion: z.string(),
|
|
615
|
+
status: ExecutionStatusSchema,
|
|
616
|
+
trigger: TriggerDataResponseSchema,
|
|
617
|
+
context: ExecutionContextResponseSchema,
|
|
618
|
+
steps: z.array(StepExecutionResponseSchema),
|
|
619
|
+
startedAt: DateResponseSchema,
|
|
620
|
+
completedAt: DateResponseSchema.optional(),
|
|
621
|
+
durationMs: z.number().optional(),
|
|
622
|
+
error: ExecutionErrorResponseSchema.optional(),
|
|
623
|
+
ns: z.string()
|
|
624
|
+
});
|
|
625
|
+
var RelationshipMetadataResponseSchema = z.object({
|
|
626
|
+
weight: z.number().optional(),
|
|
627
|
+
confidence: z.number().optional(),
|
|
628
|
+
source: z.enum(["manual", "inferred", "imported", "system"]).optional(),
|
|
629
|
+
startDate: DateResponseSchema.optional(),
|
|
630
|
+
endDate: DateResponseSchema.optional()
|
|
631
|
+
}).catchall(z.unknown());
|
|
632
|
+
var RelationshipResponseSchema = z.object({
|
|
633
|
+
relationshipId: z.string(),
|
|
634
|
+
relationshipType: z.string(),
|
|
635
|
+
fromNs: z.string(),
|
|
636
|
+
fromType: z.string(),
|
|
637
|
+
fromId: z.string(),
|
|
638
|
+
toNs: z.string(),
|
|
639
|
+
toType: z.string(),
|
|
640
|
+
toId: z.string(),
|
|
641
|
+
createdAt: DateResponseSchema,
|
|
642
|
+
createdBy: z.string(),
|
|
643
|
+
deletedAt: OptionalDateResponseSchema,
|
|
644
|
+
deletedBy: z.string().optional(),
|
|
645
|
+
metadata: RelationshipMetadataResponseSchema
|
|
646
|
+
});
|
|
647
|
+
var EntityReferenceResponseSchema = z.object({
|
|
648
|
+
ns: z.string(),
|
|
649
|
+
type: z.string(),
|
|
650
|
+
id: z.string(),
|
|
651
|
+
semanticId: z.string(),
|
|
652
|
+
name: z.string().optional()
|
|
653
|
+
});
|
|
654
|
+
var GraphPathResponseSchema = z.object({
|
|
655
|
+
start: EntityReferenceResponseSchema,
|
|
656
|
+
end: EntityReferenceResponseSchema,
|
|
657
|
+
edges: z.array(RelationshipResponseSchema),
|
|
658
|
+
totalWeight: z.number(),
|
|
659
|
+
length: z.number()
|
|
660
|
+
});
|
|
661
|
+
var GraphTraversalResultResponseSchema = z.object({
|
|
662
|
+
root: EntityReferenceResponseSchema,
|
|
663
|
+
nodes: z.array(EntityReferenceResponseSchema),
|
|
664
|
+
edges: z.array(RelationshipResponseSchema),
|
|
665
|
+
depth: z.number(),
|
|
666
|
+
paths: z.array(GraphPathResponseSchema)
|
|
667
|
+
});
|
|
668
|
+
var GraphStatsResponseSchema = z.object({
|
|
669
|
+
totalRelationships: z.number(),
|
|
670
|
+
activeRelationships: z.number(),
|
|
671
|
+
byPredicate: z.record(z.number()),
|
|
672
|
+
byCategory: z.record(z.number()),
|
|
673
|
+
averageDegree: z.number(),
|
|
674
|
+
topConnectedNodes: z.array(z.object({
|
|
675
|
+
entity: EntityReferenceResponseSchema,
|
|
676
|
+
degree: z.number()
|
|
677
|
+
}))
|
|
678
|
+
});
|
|
679
|
+
var EntityRelationshipsResultResponseSchema = z.object({
|
|
680
|
+
outgoing: z.array(RelationshipResponseSchema),
|
|
681
|
+
incoming: z.array(RelationshipResponseSchema)
|
|
682
|
+
});
|
|
683
|
+
var PaginatedResultResponseSchema = (dataSchema) => z.object({
|
|
684
|
+
data: z.array(dataSchema),
|
|
685
|
+
total: z.number(),
|
|
686
|
+
page: z.number(),
|
|
687
|
+
perPage: z.number(),
|
|
688
|
+
totalPages: z.number(),
|
|
689
|
+
hasMore: z.boolean().optional(),
|
|
690
|
+
cursor: z.string().optional()
|
|
691
|
+
});
|
|
692
|
+
|
|
693
|
+
export { AgentArtifactResponseSchema, AgentClassificationResponseSchema, AgentExecuteInputSchema, AgentExecutionFilterSchema, AgentExecutionResponseSchema, AgentFeedbackInputSchema, AgentFeedbackResponseSchema, AgentFilterSchema, AgentGuardrailResponseSchema, AgentHandoffResponseSchema, AgentInputResponseSchema, AgentMetricsResponseSchema, AgentOutputResponseSchema, AgentResponseSchema, AgentTraceResponseSchema, AgentTypeResponseSchema, CharacterBibleResponseSchema, CompensationConfigResponseSchema, DateResponseSchema, EntityReferenceResponseSchema, EntityReferenceSchema, EntityRelationshipsResultResponseSchema, ErrorHandlingConfigResponseSchema, ExecutionContextResponseSchema, ExecutionErrorResponseSchema, ExecutionFilterSchema, GraphPathResponseSchema, GraphPatternSchema, GraphStatsResponseSchema, GraphTraversalResultResponseSchema, GuardrailViolationResponseSchema, HandoffRuleResponseSchema, OptionalDateResponseSchema, PaginatedResultResponseSchema, PartialEntityReferenceSchema, RelationshipCreateInputSchema, RelationshipFilterSchema, RelationshipMetadataResponseSchema, RelationshipMetadataSchema, RelationshipResponseSchema, RetryConfigResponseSchema, StepConfigResponseSchema, StepExecutionResponseSchema, ThingCreateInputSchema, ThingDataSchema, ThingDeleteOptionsSchema, ThingFilterSchema, ThingPaginationSchema, ThingQueryResultResponseSchema, ThingResponseSchema, ThingSortSchema, ThingUpdateInputSchema, ThingVersionResponseSchema, TokenUsageResponseSchema, TriggerDataResponseSchema, TypeStatsResponseSchema, WorkflowConfigResponseSchema, WorkflowExecutionResponseSchema, WorkflowFilterSchema, WorkflowResponseSchema, WorkflowStepResponseSchema, WorkflowTriggerInputSchema, WorkflowTriggerResponseSchema };
|
|
694
|
+
//# sourceMappingURL=chunk-GGO5GW72.js.map
|
|
695
|
+
//# sourceMappingURL=chunk-GGO5GW72.js.map
|