@vertesia/tools-sdk 0.80.0-dev.20251121 → 0.80.0
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 +122 -0
- package/lib/cjs/InteractionCollection.js +118 -0
- package/lib/cjs/InteractionCollection.js.map +1 -1
- package/lib/cjs/SkillCollection.js +318 -0
- package/lib/cjs/SkillCollection.js.map +1 -0
- package/lib/cjs/ToolCollection.js +98 -0
- package/lib/cjs/ToolCollection.js.map +1 -1
- package/lib/cjs/copy-assets.js +84 -0
- package/lib/cjs/copy-assets.js.map +1 -0
- package/lib/cjs/index.js +6 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/server.js +327 -0
- package/lib/cjs/server.js.map +1 -0
- package/lib/cjs/site/styles.js +621 -0
- package/lib/cjs/site/styles.js.map +1 -0
- package/lib/cjs/site/templates.js +932 -0
- package/lib/cjs/site/templates.js.map +1 -0
- package/lib/esm/InteractionCollection.js +83 -0
- package/lib/esm/InteractionCollection.js.map +1 -1
- package/lib/esm/SkillCollection.js +311 -0
- package/lib/esm/SkillCollection.js.map +1 -0
- package/lib/esm/ToolCollection.js +64 -0
- package/lib/esm/ToolCollection.js.map +1 -1
- package/lib/esm/copy-assets.js +81 -0
- package/lib/esm/copy-assets.js.map +1 -0
- package/lib/esm/index.js +4 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/server.js +323 -0
- package/lib/esm/server.js.map +1 -0
- package/lib/esm/site/styles.js +618 -0
- package/lib/esm/site/styles.js.map +1 -0
- package/lib/esm/site/templates.js +920 -0
- package/lib/esm/site/templates.js.map +1 -0
- package/lib/types/InteractionCollection.d.ts +29 -0
- package/lib/types/InteractionCollection.d.ts.map +1 -1
- package/lib/types/SkillCollection.d.ts +111 -0
- package/lib/types/SkillCollection.d.ts.map +1 -0
- package/lib/types/ToolCollection.d.ts +18 -0
- package/lib/types/ToolCollection.d.ts.map +1 -1
- package/lib/types/copy-assets.d.ts +14 -0
- package/lib/types/copy-assets.d.ts.map +1 -0
- package/lib/types/index.d.ts +4 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/server.d.ts +72 -0
- package/lib/types/server.d.ts.map +1 -0
- package/lib/types/site/styles.d.ts +5 -0
- package/lib/types/site/styles.d.ts.map +1 -0
- package/lib/types/site/templates.d.ts +54 -0
- package/lib/types/site/templates.d.ts.map +1 -0
- package/lib/types/types.d.ts +152 -0
- package/lib/types/types.d.ts.map +1 -1
- package/package.json +18 -5
- package/src/InteractionCollection.ts +90 -0
- package/src/SkillCollection.ts +389 -0
- package/src/ToolCollection.ts +68 -0
- package/src/copy-assets.ts +104 -0
- package/src/index.ts +4 -0
- package/src/server.ts +444 -0
- package/src/site/styles.ts +617 -0
- package/src/site/templates.ts +956 -0
- package/src/types.ts +162 -0
package/src/types.ts
CHANGED
|
@@ -119,3 +119,165 @@ export interface MCPConnectionDetails {
|
|
|
119
119
|
*/
|
|
120
120
|
token: string;
|
|
121
121
|
}
|
|
122
|
+
|
|
123
|
+
// ================== Skill Types ==================
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Content type for skill instructions
|
|
127
|
+
*/
|
|
128
|
+
export type SkillContentType = 'md' | 'jst';
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Context triggers for auto-injection of skills
|
|
132
|
+
*/
|
|
133
|
+
export interface SkillContextTriggers {
|
|
134
|
+
/**
|
|
135
|
+
* Keywords in user input that should trigger this skill
|
|
136
|
+
*/
|
|
137
|
+
keywords?: string[];
|
|
138
|
+
/**
|
|
139
|
+
* If these tools are being used, suggest this skill
|
|
140
|
+
*/
|
|
141
|
+
tool_names?: string[];
|
|
142
|
+
/**
|
|
143
|
+
* Regex patterns to match against input data
|
|
144
|
+
*/
|
|
145
|
+
data_patterns?: string[];
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Execution configuration for skills that need code execution
|
|
150
|
+
*/
|
|
151
|
+
export interface SkillExecution {
|
|
152
|
+
/**
|
|
153
|
+
* The programming language for execution
|
|
154
|
+
*/
|
|
155
|
+
language: string;
|
|
156
|
+
/**
|
|
157
|
+
* Required packages to install
|
|
158
|
+
*/
|
|
159
|
+
packages?: string[];
|
|
160
|
+
/**
|
|
161
|
+
* System-level packages to install (e.g., apt-get packages)
|
|
162
|
+
*/
|
|
163
|
+
system_packages?: string[];
|
|
164
|
+
/**
|
|
165
|
+
* Code template to execute
|
|
166
|
+
*/
|
|
167
|
+
template?: string;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Script file bundled with a skill
|
|
172
|
+
*/
|
|
173
|
+
export interface SkillScript {
|
|
174
|
+
/**
|
|
175
|
+
* Filename (e.g., "analyze.py")
|
|
176
|
+
*/
|
|
177
|
+
name: string;
|
|
178
|
+
/**
|
|
179
|
+
* Script content
|
|
180
|
+
*/
|
|
181
|
+
content: string;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Skill definition - parsed from SKILL.md or SKILL.jst
|
|
186
|
+
*/
|
|
187
|
+
export interface SkillDefinition {
|
|
188
|
+
/**
|
|
189
|
+
* Unique skill name (kebab-case)
|
|
190
|
+
*/
|
|
191
|
+
name: string;
|
|
192
|
+
/**
|
|
193
|
+
* Display title
|
|
194
|
+
*/
|
|
195
|
+
title?: string;
|
|
196
|
+
/**
|
|
197
|
+
* Short description for discovery
|
|
198
|
+
*/
|
|
199
|
+
description: string;
|
|
200
|
+
/**
|
|
201
|
+
* The skill instructions (markdown or JST template)
|
|
202
|
+
*/
|
|
203
|
+
instructions: string;
|
|
204
|
+
/**
|
|
205
|
+
* Content type: 'md' for static markdown, 'jst' for dynamic templates
|
|
206
|
+
*/
|
|
207
|
+
content_type: SkillContentType;
|
|
208
|
+
/**
|
|
209
|
+
* JSON Schema for skill input parameters.
|
|
210
|
+
* Used when skill is exposed as a tool.
|
|
211
|
+
*/
|
|
212
|
+
input_schema?: {
|
|
213
|
+
type: 'object';
|
|
214
|
+
properties?: Record<string, any>;
|
|
215
|
+
required?: string[];
|
|
216
|
+
};
|
|
217
|
+
/**
|
|
218
|
+
* Context triggers for auto-injection
|
|
219
|
+
*/
|
|
220
|
+
context_triggers?: SkillContextTriggers;
|
|
221
|
+
/**
|
|
222
|
+
* Execution configuration for code-based skills
|
|
223
|
+
*/
|
|
224
|
+
execution?: SkillExecution;
|
|
225
|
+
/**
|
|
226
|
+
* Related tools that work well with this skill
|
|
227
|
+
*/
|
|
228
|
+
related_tools?: string[];
|
|
229
|
+
/**
|
|
230
|
+
* Scripts bundled with this skill (synced to sandbox when skill is used)
|
|
231
|
+
*/
|
|
232
|
+
scripts?: SkillScript[];
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Skill execution payload
|
|
237
|
+
*/
|
|
238
|
+
export interface SkillExecutionPayload {
|
|
239
|
+
/**
|
|
240
|
+
* The skill name to execute
|
|
241
|
+
*/
|
|
242
|
+
skill_name: string;
|
|
243
|
+
/**
|
|
244
|
+
* Data context for JST template rendering
|
|
245
|
+
*/
|
|
246
|
+
data?: Record<string, any>;
|
|
247
|
+
/**
|
|
248
|
+
* Whether to execute the code template (if present)
|
|
249
|
+
*/
|
|
250
|
+
execute?: boolean;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Skill execution result
|
|
255
|
+
*/
|
|
256
|
+
export interface SkillExecutionResult {
|
|
257
|
+
/**
|
|
258
|
+
* The skill name
|
|
259
|
+
*/
|
|
260
|
+
name: string;
|
|
261
|
+
/**
|
|
262
|
+
* Rendered instructions
|
|
263
|
+
*/
|
|
264
|
+
instructions: string;
|
|
265
|
+
/**
|
|
266
|
+
* Execution output (if execute=true and skill has code template)
|
|
267
|
+
*/
|
|
268
|
+
execution_result?: {
|
|
269
|
+
output: string;
|
|
270
|
+
files?: string[];
|
|
271
|
+
is_error: boolean;
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Skill collection definition - returned by GET endpoint
|
|
277
|
+
*/
|
|
278
|
+
export interface SkillCollectionDefinition {
|
|
279
|
+
name: string;
|
|
280
|
+
title: string;
|
|
281
|
+
description: string;
|
|
282
|
+
skills: SkillDefinition[];
|
|
283
|
+
}
|