@agent-earth/shared 0.0.4
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.d.ts +10 -0
- package/dist/index.js +1 -0
- package/dist/schemas/agent-system.schema.d.ts +11661 -0
- package/dist/schemas/agent-system.schema.js +1 -0
- package/dist/schemas/agent.schema.d.ts +901 -0
- package/dist/schemas/agent.schema.js +1 -0
- package/dist/schemas/cesium.schema.d.ts +517 -0
- package/dist/schemas/cesium.schema.js +1 -0
- package/dist/schemas/index.d.ts +10 -0
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/mcp.schema.d.ts +1791 -0
- package/dist/schemas/mcp.schema.js +1 -0
- package/dist/schemas/service-config.schema.d.ts +1302 -0
- package/dist/schemas/service-config.schema.js +1 -0
- package/dist/schemas/skill.schema.d.ts +392 -0
- package/dist/schemas/skill.schema.js +1 -0
- package/dist/schemas/store.schema.d.ts +1242 -0
- package/dist/schemas/store.schema.js +1 -0
- package/dist/schemas/user.schema.d.ts +541 -0
- package/dist/schemas/user.schema.js +1 -0
- package/dist/schemas/websocket.schema.d.ts +1186 -0
- package/dist/schemas/websocket.schema.js +1 -0
- package/dist/schemas/wiki.schema.d.ts +865 -0
- package/dist/schemas/wiki.schema.js +1 -0
- package/dist/types/agent.d.ts +45 -0
- package/dist/types/agent.js +1 -0
- package/dist/types/at-file.d.ts +42 -0
- package/dist/types/at-file.js +1 -0
- package/dist/types/cesium.d.ts +116 -0
- package/dist/types/cesium.js +1 -0
- package/dist/types/hermes.d.ts +95 -0
- package/dist/types/hermes.js +1 -0
- package/dist/types/mcp.d.ts +202 -0
- package/dist/types/mcp.js +1 -0
- package/dist/types/skill.d.ts +29 -0
- package/dist/types/skill.js +1 -0
- package/dist/types/slash-command.d.ts +26 -0
- package/dist/types/slash-command.js +1 -0
- package/dist/types/websocket.d.ts +301 -0
- package/dist/types/websocket.js +1 -0
- package/dist/types/wiki.d.ts +66 -0
- package/dist/types/wiki.js +1 -0
- package/package.json +33 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as e}from"zod";export const APIParameterSchema=e.object({name:e.string(),type:e.enum(["string","number","boolean","object","array"]),required:e.boolean(),description:e.string().optional(),defaultValue:e.any().optional(),enumValues:e.array(e.string()).optional(),min:e.number().optional(),max:e.number().optional(),pattern:e.string().optional()});export const APIRequestBodySchema=e.object({contentType:e.enum(["json","form","multipart"]).default("json"),parameters:e.array(APIParameterSchema)});export const APIResponseSchema=e.object({statusCode:e.number(),contentType:e.enum(["json","text","binary"]).default("json"),schema:e.any().optional(),description:e.string().optional()});export const APIDefinitionSchema=e.object({id:e.string(),name:e.string(),description:e.string(),path:e.string(),method:e.enum(["GET","POST","PUT","DELETE","PATCH"]),requestBody:APIRequestBodySchema.optional(),queryParams:e.array(APIParameterSchema).optional(),headers:e.record(e.string()).optional(),responses:e.array(APIResponseSchema),timeout:e.number().default(3e4),authRequired:e.boolean().default(!1),agentMapping:e.string().optional(),enabled:e.boolean().default(!0)});export const WebSocketMessageTypeSchema=e.object({type:e.string(),description:e.string(),payloadSchema:e.any(),direction:e.enum(["inbound","outbound","bidirectional"]),agentMapping:e.string().optional()});export const ServiceWebSocketConfigSchema=e.object({id:e.string(),name:e.string(),description:e.string(),enabled:e.boolean().default(!0),port:e.number().default(8080),host:e.string().default("0.0.0.0"),path:e.string().default("/ws"),messageFormat:e.enum(["json","binary"]).default("json"),heartbeatInterval:e.number().default(3e4),maxConnections:e.number().default(100),messageTypes:e.array(WebSocketMessageTypeSchema),clientTypes:e.array(e.enum(["nl_component","smart_earth","workspace_ui","other"])).default(["nl_component","smart_earth","workspace_ui"]),sessionTimeout:e.number().default(36e5),reconnectMaxAttempts:e.number().default(5),reconnectDelay:e.number().default(1e3)});export const SmartEarthCommandSchema=e.object({command:e.string(),description:e.string(),parameters:e.array(APIParameterSchema),returnType:e.enum(["void","boolean","object","array"]),example:e.string().optional()});export const SmartEarthInterfaceConfigSchema=e.object({id:e.string(),name:e.string(),description:e.string(),enabled:e.boolean().default(!0),websocketEndpoint:e.string().optional(),commands:e.array(SmartEarthCommandSchema),interfaceMapping:e.array(e.object({agentOutput:e.string(),cesiumCommand:e.string(),parameterMapping:e.record(e.string())})),autoGenerateSkill:e.boolean().default(!0),skillName:e.string().optional(),skillDescription:e.string().optional()});export const ServiceConfigSchema=e.object({id:e.string(),name:e.string(),description:e.string(),apis:e.array(APIDefinitionSchema),websocket:ServiceWebSocketConfigSchema.optional(),smartEarth:SmartEarthInterfaceConfigSchema.optional(),createdAt:e.string(),updatedAt:e.string()});export const HermesConfigMappingSchema=e.object({serviceConfigId:e.string(),hermesConfigPath:e.string(),mappingType:e.enum(["api","websocket","smart_earth","terminal","compression","streaming"]),hermesConfigKey:e.string(),valueMapping:e.record(e.string()).optional()});
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SkillInputSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
type: z.ZodEnum<["string", "number", "boolean", "object", "array"]>;
|
|
5
|
+
required: z.ZodBoolean;
|
|
6
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7
|
+
defaultValue: z.ZodOptional<z.ZodAny>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
10
|
+
name: string;
|
|
11
|
+
required: boolean;
|
|
12
|
+
description?: string | undefined;
|
|
13
|
+
defaultValue?: any;
|
|
14
|
+
}, {
|
|
15
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
16
|
+
name: string;
|
|
17
|
+
required: boolean;
|
|
18
|
+
description?: string | undefined;
|
|
19
|
+
defaultValue?: any;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const SkillOutputSchema: z.ZodObject<{
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
type: z.ZodEnum<["string", "number", "boolean", "object", "array", "cesium_command"]>;
|
|
24
|
+
description: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
type: "string" | "number" | "boolean" | "object" | "array" | "cesium_command";
|
|
27
|
+
name: string;
|
|
28
|
+
description?: string | undefined;
|
|
29
|
+
}, {
|
|
30
|
+
type: "string" | "number" | "boolean" | "object" | "array" | "cesium_command";
|
|
31
|
+
name: string;
|
|
32
|
+
description?: string | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
export declare const SkillMetadataSchema: z.ZodObject<{
|
|
35
|
+
id: z.ZodString;
|
|
36
|
+
name: z.ZodString;
|
|
37
|
+
displayName: z.ZodString;
|
|
38
|
+
description: z.ZodString;
|
|
39
|
+
category: z.ZodEnum<["business", "control", "query", "utility"]>;
|
|
40
|
+
tags: z.ZodArray<z.ZodString, "many">;
|
|
41
|
+
author: z.ZodString;
|
|
42
|
+
version: z.ZodString;
|
|
43
|
+
createdAt: z.ZodString;
|
|
44
|
+
updatedAt: z.ZodString;
|
|
45
|
+
status: z.ZodEnum<["draft", "published", "deprecated"]>;
|
|
46
|
+
sourceType: z.ZodEnum<["builtin", "custom", "store", "generated"]>;
|
|
47
|
+
sourceUrl: z.ZodOptional<z.ZodString>;
|
|
48
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
49
|
+
compatibility: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
minHermesVersion: z.ZodOptional<z.ZodString>;
|
|
51
|
+
supportedModels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
52
|
+
requiredCapabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
minHermesVersion?: string | undefined;
|
|
55
|
+
supportedModels?: string[] | undefined;
|
|
56
|
+
requiredCapabilities?: string[] | undefined;
|
|
57
|
+
}, {
|
|
58
|
+
minHermesVersion?: string | undefined;
|
|
59
|
+
supportedModels?: string[] | undefined;
|
|
60
|
+
requiredCapabilities?: string[] | undefined;
|
|
61
|
+
}>>;
|
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
status: "draft" | "published" | "deprecated";
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
description: string;
|
|
67
|
+
displayName: string;
|
|
68
|
+
category: "query" | "business" | "control" | "utility";
|
|
69
|
+
tags: string[];
|
|
70
|
+
author: string;
|
|
71
|
+
version: string;
|
|
72
|
+
createdAt: string;
|
|
73
|
+
updatedAt: string;
|
|
74
|
+
sourceType: "custom" | "builtin" | "store" | "generated";
|
|
75
|
+
sourceUrl?: string | undefined;
|
|
76
|
+
dependencies?: string[] | undefined;
|
|
77
|
+
compatibility?: {
|
|
78
|
+
minHermesVersion?: string | undefined;
|
|
79
|
+
supportedModels?: string[] | undefined;
|
|
80
|
+
requiredCapabilities?: string[] | undefined;
|
|
81
|
+
} | undefined;
|
|
82
|
+
}, {
|
|
83
|
+
status: "draft" | "published" | "deprecated";
|
|
84
|
+
id: string;
|
|
85
|
+
name: string;
|
|
86
|
+
description: string;
|
|
87
|
+
displayName: string;
|
|
88
|
+
category: "query" | "business" | "control" | "utility";
|
|
89
|
+
tags: string[];
|
|
90
|
+
author: string;
|
|
91
|
+
version: string;
|
|
92
|
+
createdAt: string;
|
|
93
|
+
updatedAt: string;
|
|
94
|
+
sourceType: "custom" | "builtin" | "store" | "generated";
|
|
95
|
+
sourceUrl?: string | undefined;
|
|
96
|
+
dependencies?: string[] | undefined;
|
|
97
|
+
compatibility?: {
|
|
98
|
+
minHermesVersion?: string | undefined;
|
|
99
|
+
supportedModels?: string[] | undefined;
|
|
100
|
+
requiredCapabilities?: string[] | undefined;
|
|
101
|
+
} | undefined;
|
|
102
|
+
}>;
|
|
103
|
+
export declare const SkillTemplateSchema: z.ZodObject<{
|
|
104
|
+
id: z.ZodString;
|
|
105
|
+
name: z.ZodString;
|
|
106
|
+
description: z.ZodString;
|
|
107
|
+
category: z.ZodEnum<["business", "control", "query", "utility", "demo"]>;
|
|
108
|
+
templateType: z.ZodEnum<["builtin", "custom"]>;
|
|
109
|
+
baseCode: z.ZodOptional<z.ZodString>;
|
|
110
|
+
inputTemplate: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
111
|
+
name: z.ZodString;
|
|
112
|
+
type: z.ZodEnum<["string", "number", "boolean", "object", "array"]>;
|
|
113
|
+
required: z.ZodBoolean;
|
|
114
|
+
description: z.ZodOptional<z.ZodString>;
|
|
115
|
+
defaultValue: z.ZodOptional<z.ZodAny>;
|
|
116
|
+
}, "strip", z.ZodTypeAny, {
|
|
117
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
118
|
+
name: string;
|
|
119
|
+
required: boolean;
|
|
120
|
+
description?: string | undefined;
|
|
121
|
+
defaultValue?: any;
|
|
122
|
+
}, {
|
|
123
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
124
|
+
name: string;
|
|
125
|
+
required: boolean;
|
|
126
|
+
description?: string | undefined;
|
|
127
|
+
defaultValue?: any;
|
|
128
|
+
}>, "many">>;
|
|
129
|
+
outputTemplate: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
130
|
+
name: z.ZodString;
|
|
131
|
+
type: z.ZodEnum<["string", "number", "boolean", "object", "array", "cesium_command"]>;
|
|
132
|
+
description: z.ZodOptional<z.ZodString>;
|
|
133
|
+
}, "strip", z.ZodTypeAny, {
|
|
134
|
+
type: "string" | "number" | "boolean" | "object" | "array" | "cesium_command";
|
|
135
|
+
name: string;
|
|
136
|
+
description?: string | undefined;
|
|
137
|
+
}, {
|
|
138
|
+
type: "string" | "number" | "boolean" | "object" | "array" | "cesium_command";
|
|
139
|
+
name: string;
|
|
140
|
+
description?: string | undefined;
|
|
141
|
+
}>, "many">>;
|
|
142
|
+
customizableFields: z.ZodArray<z.ZodString, "many">;
|
|
143
|
+
defaultTimeout: z.ZodOptional<z.ZodNumber>;
|
|
144
|
+
setupGuide: z.ZodOptional<z.ZodString>;
|
|
145
|
+
exampleUsage: z.ZodOptional<z.ZodString>;
|
|
146
|
+
}, "strip", z.ZodTypeAny, {
|
|
147
|
+
id: string;
|
|
148
|
+
name: string;
|
|
149
|
+
description: string;
|
|
150
|
+
category: "query" | "demo" | "business" | "control" | "utility";
|
|
151
|
+
customizableFields: string[];
|
|
152
|
+
templateType: "custom" | "builtin";
|
|
153
|
+
setupGuide?: string | undefined;
|
|
154
|
+
baseCode?: string | undefined;
|
|
155
|
+
inputTemplate?: {
|
|
156
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
157
|
+
name: string;
|
|
158
|
+
required: boolean;
|
|
159
|
+
description?: string | undefined;
|
|
160
|
+
defaultValue?: any;
|
|
161
|
+
}[] | undefined;
|
|
162
|
+
outputTemplate?: {
|
|
163
|
+
type: "string" | "number" | "boolean" | "object" | "array" | "cesium_command";
|
|
164
|
+
name: string;
|
|
165
|
+
description?: string | undefined;
|
|
166
|
+
}[] | undefined;
|
|
167
|
+
defaultTimeout?: number | undefined;
|
|
168
|
+
exampleUsage?: string | undefined;
|
|
169
|
+
}, {
|
|
170
|
+
id: string;
|
|
171
|
+
name: string;
|
|
172
|
+
description: string;
|
|
173
|
+
category: "query" | "demo" | "business" | "control" | "utility";
|
|
174
|
+
customizableFields: string[];
|
|
175
|
+
templateType: "custom" | "builtin";
|
|
176
|
+
setupGuide?: string | undefined;
|
|
177
|
+
baseCode?: string | undefined;
|
|
178
|
+
inputTemplate?: {
|
|
179
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
180
|
+
name: string;
|
|
181
|
+
required: boolean;
|
|
182
|
+
description?: string | undefined;
|
|
183
|
+
defaultValue?: any;
|
|
184
|
+
}[] | undefined;
|
|
185
|
+
outputTemplate?: {
|
|
186
|
+
type: "string" | "number" | "boolean" | "object" | "array" | "cesium_command";
|
|
187
|
+
name: string;
|
|
188
|
+
description?: string | undefined;
|
|
189
|
+
}[] | undefined;
|
|
190
|
+
defaultTimeout?: number | undefined;
|
|
191
|
+
exampleUsage?: string | undefined;
|
|
192
|
+
}>;
|
|
193
|
+
export declare const SkillPackageSchema: z.ZodObject<{
|
|
194
|
+
id: z.ZodString;
|
|
195
|
+
skillId: z.ZodString;
|
|
196
|
+
skillName: z.ZodString;
|
|
197
|
+
version: z.ZodString;
|
|
198
|
+
packageType: z.ZodEnum<["zip", "tarball", "npm", "git"]>;
|
|
199
|
+
downloadUrl: z.ZodOptional<z.ZodString>;
|
|
200
|
+
gitRepo: z.ZodOptional<z.ZodString>;
|
|
201
|
+
gitBranch: z.ZodOptional<z.ZodString>;
|
|
202
|
+
checksum: z.ZodOptional<z.ZodString>;
|
|
203
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
204
|
+
includedFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
205
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
206
|
+
installScript: z.ZodOptional<z.ZodString>;
|
|
207
|
+
uninstallScript: z.ZodOptional<z.ZodString>;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
id: string;
|
|
210
|
+
version: string;
|
|
211
|
+
skillId: string;
|
|
212
|
+
skillName: string;
|
|
213
|
+
packageType: "zip" | "tarball" | "npm" | "git";
|
|
214
|
+
dependencies?: string[] | undefined;
|
|
215
|
+
downloadUrl?: string | undefined;
|
|
216
|
+
gitRepo?: string | undefined;
|
|
217
|
+
gitBranch?: string | undefined;
|
|
218
|
+
checksum?: string | undefined;
|
|
219
|
+
size?: number | undefined;
|
|
220
|
+
includedFiles?: string[] | undefined;
|
|
221
|
+
installScript?: string | undefined;
|
|
222
|
+
uninstallScript?: string | undefined;
|
|
223
|
+
}, {
|
|
224
|
+
id: string;
|
|
225
|
+
version: string;
|
|
226
|
+
skillId: string;
|
|
227
|
+
skillName: string;
|
|
228
|
+
packageType: "zip" | "tarball" | "npm" | "git";
|
|
229
|
+
dependencies?: string[] | undefined;
|
|
230
|
+
downloadUrl?: string | undefined;
|
|
231
|
+
gitRepo?: string | undefined;
|
|
232
|
+
gitBranch?: string | undefined;
|
|
233
|
+
checksum?: string | undefined;
|
|
234
|
+
size?: number | undefined;
|
|
235
|
+
includedFiles?: string[] | undefined;
|
|
236
|
+
installScript?: string | undefined;
|
|
237
|
+
uninstallScript?: string | undefined;
|
|
238
|
+
}>;
|
|
239
|
+
export declare const SkillTestConfigSchema: z.ZodObject<{
|
|
240
|
+
skillId: z.ZodString;
|
|
241
|
+
testCases: z.ZodArray<z.ZodObject<{
|
|
242
|
+
name: z.ZodString;
|
|
243
|
+
description: z.ZodOptional<z.ZodString>;
|
|
244
|
+
inputs: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
245
|
+
expectedOutputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
246
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
247
|
+
mockDependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
248
|
+
}, "strip", z.ZodTypeAny, {
|
|
249
|
+
name: string;
|
|
250
|
+
inputs: Record<string, any>;
|
|
251
|
+
description?: string | undefined;
|
|
252
|
+
expectedOutputs?: Record<string, any> | undefined;
|
|
253
|
+
timeout?: number | undefined;
|
|
254
|
+
mockDependencies?: Record<string, any> | undefined;
|
|
255
|
+
}, {
|
|
256
|
+
name: string;
|
|
257
|
+
inputs: Record<string, any>;
|
|
258
|
+
description?: string | undefined;
|
|
259
|
+
expectedOutputs?: Record<string, any> | undefined;
|
|
260
|
+
timeout?: number | undefined;
|
|
261
|
+
mockDependencies?: Record<string, any> | undefined;
|
|
262
|
+
}>, "many">;
|
|
263
|
+
setupScript: z.ZodOptional<z.ZodString>;
|
|
264
|
+
teardownScript: z.ZodOptional<z.ZodString>;
|
|
265
|
+
}, "strip", z.ZodTypeAny, {
|
|
266
|
+
skillId: string;
|
|
267
|
+
testCases: {
|
|
268
|
+
name: string;
|
|
269
|
+
inputs: Record<string, any>;
|
|
270
|
+
description?: string | undefined;
|
|
271
|
+
expectedOutputs?: Record<string, any> | undefined;
|
|
272
|
+
timeout?: number | undefined;
|
|
273
|
+
mockDependencies?: Record<string, any> | undefined;
|
|
274
|
+
}[];
|
|
275
|
+
setupScript?: string | undefined;
|
|
276
|
+
teardownScript?: string | undefined;
|
|
277
|
+
}, {
|
|
278
|
+
skillId: string;
|
|
279
|
+
testCases: {
|
|
280
|
+
name: string;
|
|
281
|
+
inputs: Record<string, any>;
|
|
282
|
+
description?: string | undefined;
|
|
283
|
+
expectedOutputs?: Record<string, any> | undefined;
|
|
284
|
+
timeout?: number | undefined;
|
|
285
|
+
mockDependencies?: Record<string, any> | undefined;
|
|
286
|
+
}[];
|
|
287
|
+
setupScript?: string | undefined;
|
|
288
|
+
teardownScript?: string | undefined;
|
|
289
|
+
}>;
|
|
290
|
+
export declare const SkillExecutionResultSchema: z.ZodObject<{
|
|
291
|
+
skillId: z.ZodString;
|
|
292
|
+
executionId: z.ZodString;
|
|
293
|
+
startTime: z.ZodString;
|
|
294
|
+
endTime: z.ZodOptional<z.ZodString>;
|
|
295
|
+
status: z.ZodEnum<["running", "success", "failure", "timeout"]>;
|
|
296
|
+
inputs: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
297
|
+
outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
298
|
+
error: z.ZodOptional<z.ZodString>;
|
|
299
|
+
logs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
300
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
301
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
302
|
+
memoryUsed: z.ZodOptional<z.ZodNumber>;
|
|
303
|
+
tokensUsed: z.ZodOptional<z.ZodNumber>;
|
|
304
|
+
}, "strip", z.ZodTypeAny, {
|
|
305
|
+
duration?: number | undefined;
|
|
306
|
+
memoryUsed?: number | undefined;
|
|
307
|
+
tokensUsed?: number | undefined;
|
|
308
|
+
}, {
|
|
309
|
+
duration?: number | undefined;
|
|
310
|
+
memoryUsed?: number | undefined;
|
|
311
|
+
tokensUsed?: number | undefined;
|
|
312
|
+
}>>;
|
|
313
|
+
}, "strip", z.ZodTypeAny, {
|
|
314
|
+
status: "success" | "failure" | "running" | "timeout";
|
|
315
|
+
skillId: string;
|
|
316
|
+
inputs: Record<string, any>;
|
|
317
|
+
executionId: string;
|
|
318
|
+
startTime: string;
|
|
319
|
+
error?: string | undefined;
|
|
320
|
+
outputs?: Record<string, any> | undefined;
|
|
321
|
+
metrics?: {
|
|
322
|
+
duration?: number | undefined;
|
|
323
|
+
memoryUsed?: number | undefined;
|
|
324
|
+
tokensUsed?: number | undefined;
|
|
325
|
+
} | undefined;
|
|
326
|
+
endTime?: string | undefined;
|
|
327
|
+
logs?: string[] | undefined;
|
|
328
|
+
}, {
|
|
329
|
+
status: "success" | "failure" | "running" | "timeout";
|
|
330
|
+
skillId: string;
|
|
331
|
+
inputs: Record<string, any>;
|
|
332
|
+
executionId: string;
|
|
333
|
+
startTime: string;
|
|
334
|
+
error?: string | undefined;
|
|
335
|
+
outputs?: Record<string, any> | undefined;
|
|
336
|
+
metrics?: {
|
|
337
|
+
duration?: number | undefined;
|
|
338
|
+
memoryUsed?: number | undefined;
|
|
339
|
+
tokensUsed?: number | undefined;
|
|
340
|
+
} | undefined;
|
|
341
|
+
endTime?: string | undefined;
|
|
342
|
+
logs?: string[] | undefined;
|
|
343
|
+
}>;
|
|
344
|
+
export declare const NativeSkillConfigSchema: z.ZodObject<{
|
|
345
|
+
id: z.ZodString;
|
|
346
|
+
name: z.ZodString;
|
|
347
|
+
description: z.ZodString;
|
|
348
|
+
type: z.ZodLiteral<"native">;
|
|
349
|
+
version: z.ZodDefault<z.ZodString>;
|
|
350
|
+
author: z.ZodOptional<z.ZodString>;
|
|
351
|
+
license: z.ZodOptional<z.ZodString>;
|
|
352
|
+
category: z.ZodDefault<z.ZodString>;
|
|
353
|
+
directory: z.ZodString;
|
|
354
|
+
platforms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
355
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
356
|
+
requiresToolsets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
357
|
+
requiredEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
358
|
+
hasScripts: z.ZodBoolean;
|
|
359
|
+
hasReferences: z.ZodBoolean;
|
|
360
|
+
}, "strip", z.ZodTypeAny, {
|
|
361
|
+
id: string;
|
|
362
|
+
type: "native";
|
|
363
|
+
name: string;
|
|
364
|
+
description: string;
|
|
365
|
+
category: string;
|
|
366
|
+
version: string;
|
|
367
|
+
directory: string;
|
|
368
|
+
hasScripts: boolean;
|
|
369
|
+
hasReferences: boolean;
|
|
370
|
+
tags?: string[] | undefined;
|
|
371
|
+
author?: string | undefined;
|
|
372
|
+
license?: string | undefined;
|
|
373
|
+
platforms?: string[] | undefined;
|
|
374
|
+
requiresToolsets?: string[] | undefined;
|
|
375
|
+
requiredEnvVars?: string[] | undefined;
|
|
376
|
+
}, {
|
|
377
|
+
id: string;
|
|
378
|
+
type: "native";
|
|
379
|
+
name: string;
|
|
380
|
+
description: string;
|
|
381
|
+
directory: string;
|
|
382
|
+
hasScripts: boolean;
|
|
383
|
+
hasReferences: boolean;
|
|
384
|
+
category?: string | undefined;
|
|
385
|
+
tags?: string[] | undefined;
|
|
386
|
+
author?: string | undefined;
|
|
387
|
+
version?: string | undefined;
|
|
388
|
+
license?: string | undefined;
|
|
389
|
+
platforms?: string[] | undefined;
|
|
390
|
+
requiresToolsets?: string[] | undefined;
|
|
391
|
+
requiredEnvVars?: string[] | undefined;
|
|
392
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as t}from"zod";export const SkillInputSchema=t.object({name:t.string(),type:t.enum(["string","number","boolean","object","array"]),required:t.boolean(),description:t.string().optional(),defaultValue:t.any().optional()});export const SkillOutputSchema=t.object({name:t.string(),type:t.enum(["string","number","boolean","object","array","cesium_command"]),description:t.string().optional()});export const SkillMetadataSchema=t.object({id:t.string(),name:t.string(),displayName:t.string(),description:t.string(),category:t.enum(["business","control","query","utility"]),tags:t.array(t.string()),author:t.string(),version:t.string(),createdAt:t.string(),updatedAt:t.string(),status:t.enum(["draft","published","deprecated"]),sourceType:t.enum(["builtin","custom","store","generated"]),sourceUrl:t.string().optional(),dependencies:t.array(t.string()).optional(),compatibility:t.object({minHermesVersion:t.string().optional(),supportedModels:t.array(t.string()).optional(),requiredCapabilities:t.array(t.string()).optional()}).optional()});export const SkillTemplateSchema=t.object({id:t.string(),name:t.string(),description:t.string(),category:t.enum(["business","control","query","utility","demo"]),templateType:t.enum(["builtin","custom"]),baseCode:t.string().optional(),inputTemplate:t.array(SkillInputSchema).optional(),outputTemplate:t.array(SkillOutputSchema).optional(),customizableFields:t.array(t.string()),defaultTimeout:t.number().optional(),setupGuide:t.string().optional(),exampleUsage:t.string().optional()});export const SkillPackageSchema=t.object({id:t.string(),skillId:t.string(),skillName:t.string(),version:t.string(),packageType:t.enum(["zip","tarball","npm","git"]),downloadUrl:t.string().optional(),gitRepo:t.string().optional(),gitBranch:t.string().optional(),checksum:t.string().optional(),size:t.number().optional(),includedFiles:t.array(t.string()).optional(),dependencies:t.array(t.string()).optional(),installScript:t.string().optional(),uninstallScript:t.string().optional()});export const SkillTestConfigSchema=t.object({skillId:t.string(),testCases:t.array(t.object({name:t.string(),description:t.string().optional(),inputs:t.record(t.any()),expectedOutputs:t.record(t.any()).optional(),timeout:t.number().optional(),mockDependencies:t.record(t.any()).optional()})),setupScript:t.string().optional(),teardownScript:t.string().optional()});export const SkillExecutionResultSchema=t.object({skillId:t.string(),executionId:t.string(),startTime:t.string(),endTime:t.string().optional(),status:t.enum(["running","success","failure","timeout"]),inputs:t.record(t.any()),outputs:t.record(t.any()).optional(),error:t.string().optional(),logs:t.array(t.string()).optional(),metrics:t.object({duration:t.number().optional(),memoryUsed:t.number().optional(),tokensUsed:t.number().optional()}).optional()});export const NativeSkillConfigSchema=t.object({id:t.string(),name:t.string(),description:t.string(),type:t.literal("native"),version:t.string().default("1.0.0"),author:t.string().optional(),license:t.string().optional(),category:t.string().default("native"),directory:t.string(),platforms:t.array(t.string()).optional(),tags:t.array(t.string()).optional(),requiresToolsets:t.array(t.string()).optional(),requiredEnvVars:t.array(t.string()).optional(),hasScripts:t.boolean(),hasReferences:t.boolean()});
|