@zibby/skills 0.1.34 → 0.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/browser.d.ts +19 -0
- package/dist/chat-memory.d.ts +355 -0
- package/dist/chat-notify.d.ts +409 -0
- package/dist/core-tools.d.ts +131 -0
- package/dist/function-skill.d.ts +149 -0
- package/dist/git.d.ts +72 -0
- package/dist/github.d.ts +777 -0
- package/dist/gitlab.d.ts +396 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +43 -43
- package/dist/integrations.d.ts +110 -0
- package/dist/jira.d.ts +547 -0
- package/dist/lark.d.ts +161 -0
- package/dist/linear.d.ts +344 -0
- package/dist/llm-billing.d.ts +294 -0
- package/dist/memory.d.ts +137 -0
- package/dist/package.json +67 -19
- package/dist/plane.d.ts +24 -0
- package/dist/report.d.ts +354 -0
- package/dist/report.js +9 -9
- package/dist/sentry.d.ts +43 -0
- package/dist/skill-installer.d.ts +86 -0
- package/dist/slack.d.ts +284 -0
- package/dist/test-runner.d.ts +220 -0
- package/dist/trackers/github-adapter.d.ts +96 -0
- package/dist/trackers/index.d.ts +27 -0
- package/dist/trackers/jira-adapter.d.ts +90 -0
- package/dist/trackers/linear-adapter.d.ts +89 -0
- package/dist/trackers/plane-adapter.d.ts +101 -0
- package/dist/trackers/types.d.ts +335 -0
- package/dist/workflow-builder.d.ts +245 -0
- package/package.json +67 -19
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
export namespace chatNotifySkill {
|
|
2
|
+
let id: string;
|
|
3
|
+
let description: string;
|
|
4
|
+
let envKeys: any[];
|
|
5
|
+
const serverName: string;
|
|
6
|
+
const allowedTools: string[];
|
|
7
|
+
let promptFragment: string;
|
|
8
|
+
/**
|
|
9
|
+
* Runtime MCP server selection. Picks the provider whose env var
|
|
10
|
+
* the user actually set. Falls back to null when neither is
|
|
11
|
+
* configured (workflow code should already have errored on env
|
|
12
|
+
* validation before reaching this point).
|
|
13
|
+
*/
|
|
14
|
+
function resolve(ctx: any): {
|
|
15
|
+
type: string;
|
|
16
|
+
command: string;
|
|
17
|
+
args: any[];
|
|
18
|
+
env: {};
|
|
19
|
+
alwaysLoad: boolean;
|
|
20
|
+
};
|
|
21
|
+
function handleToolCall(name: any, args: any, context: any): Promise<string>;
|
|
22
|
+
const tools: ({
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
input_schema: {
|
|
26
|
+
type: string;
|
|
27
|
+
properties: {
|
|
28
|
+
channel?: undefined;
|
|
29
|
+
text?: undefined;
|
|
30
|
+
blocks?: undefined;
|
|
31
|
+
thread_ts?: undefined;
|
|
32
|
+
timestamp?: undefined;
|
|
33
|
+
reaction?: undefined;
|
|
34
|
+
limit?: undefined;
|
|
35
|
+
user_id?: undefined;
|
|
36
|
+
email?: undefined;
|
|
37
|
+
usergroup?: undefined;
|
|
38
|
+
query?: undefined;
|
|
39
|
+
};
|
|
40
|
+
required?: undefined;
|
|
41
|
+
};
|
|
42
|
+
} | {
|
|
43
|
+
name: string;
|
|
44
|
+
description: string;
|
|
45
|
+
input_schema: {
|
|
46
|
+
type: string;
|
|
47
|
+
properties: {
|
|
48
|
+
channel: {
|
|
49
|
+
type: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
text: {
|
|
53
|
+
type: string;
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
56
|
+
blocks: {
|
|
57
|
+
type: string;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
thread_ts?: undefined;
|
|
61
|
+
timestamp?: undefined;
|
|
62
|
+
reaction?: undefined;
|
|
63
|
+
limit?: undefined;
|
|
64
|
+
user_id?: undefined;
|
|
65
|
+
email?: undefined;
|
|
66
|
+
usergroup?: undefined;
|
|
67
|
+
query?: undefined;
|
|
68
|
+
};
|
|
69
|
+
required: string[];
|
|
70
|
+
};
|
|
71
|
+
} | {
|
|
72
|
+
name: string;
|
|
73
|
+
description: string;
|
|
74
|
+
input_schema: {
|
|
75
|
+
type: string;
|
|
76
|
+
properties: {
|
|
77
|
+
channel: {
|
|
78
|
+
type: string;
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
thread_ts: {
|
|
82
|
+
type: string;
|
|
83
|
+
description: string;
|
|
84
|
+
};
|
|
85
|
+
text: {
|
|
86
|
+
type: string;
|
|
87
|
+
description: string;
|
|
88
|
+
};
|
|
89
|
+
blocks?: undefined;
|
|
90
|
+
timestamp?: undefined;
|
|
91
|
+
reaction?: undefined;
|
|
92
|
+
limit?: undefined;
|
|
93
|
+
user_id?: undefined;
|
|
94
|
+
email?: undefined;
|
|
95
|
+
usergroup?: undefined;
|
|
96
|
+
query?: undefined;
|
|
97
|
+
};
|
|
98
|
+
required: string[];
|
|
99
|
+
};
|
|
100
|
+
} | {
|
|
101
|
+
name: string;
|
|
102
|
+
description: string;
|
|
103
|
+
input_schema: {
|
|
104
|
+
type: string;
|
|
105
|
+
properties: {
|
|
106
|
+
channel: {
|
|
107
|
+
type: string;
|
|
108
|
+
description: string;
|
|
109
|
+
};
|
|
110
|
+
timestamp: {
|
|
111
|
+
type: string;
|
|
112
|
+
description: string;
|
|
113
|
+
};
|
|
114
|
+
reaction: {
|
|
115
|
+
type: string;
|
|
116
|
+
description: string;
|
|
117
|
+
};
|
|
118
|
+
text?: undefined;
|
|
119
|
+
blocks?: undefined;
|
|
120
|
+
thread_ts?: undefined;
|
|
121
|
+
limit?: undefined;
|
|
122
|
+
user_id?: undefined;
|
|
123
|
+
email?: undefined;
|
|
124
|
+
usergroup?: undefined;
|
|
125
|
+
query?: undefined;
|
|
126
|
+
};
|
|
127
|
+
required: string[];
|
|
128
|
+
};
|
|
129
|
+
} | {
|
|
130
|
+
name: string;
|
|
131
|
+
description: string;
|
|
132
|
+
input_schema: {
|
|
133
|
+
type: string;
|
|
134
|
+
properties: {
|
|
135
|
+
channel: {
|
|
136
|
+
type: string;
|
|
137
|
+
description: string;
|
|
138
|
+
};
|
|
139
|
+
limit: {
|
|
140
|
+
type: string;
|
|
141
|
+
description: string;
|
|
142
|
+
};
|
|
143
|
+
text?: undefined;
|
|
144
|
+
blocks?: undefined;
|
|
145
|
+
thread_ts?: undefined;
|
|
146
|
+
timestamp?: undefined;
|
|
147
|
+
reaction?: undefined;
|
|
148
|
+
user_id?: undefined;
|
|
149
|
+
email?: undefined;
|
|
150
|
+
usergroup?: undefined;
|
|
151
|
+
query?: undefined;
|
|
152
|
+
};
|
|
153
|
+
required: string[];
|
|
154
|
+
};
|
|
155
|
+
} | {
|
|
156
|
+
name: string;
|
|
157
|
+
description: string;
|
|
158
|
+
input_schema: {
|
|
159
|
+
type: string;
|
|
160
|
+
properties: {
|
|
161
|
+
channel: {
|
|
162
|
+
type: string;
|
|
163
|
+
description: string;
|
|
164
|
+
};
|
|
165
|
+
thread_ts: {
|
|
166
|
+
type: string;
|
|
167
|
+
description: string;
|
|
168
|
+
};
|
|
169
|
+
text?: undefined;
|
|
170
|
+
blocks?: undefined;
|
|
171
|
+
timestamp?: undefined;
|
|
172
|
+
reaction?: undefined;
|
|
173
|
+
limit?: undefined;
|
|
174
|
+
user_id?: undefined;
|
|
175
|
+
email?: undefined;
|
|
176
|
+
usergroup?: undefined;
|
|
177
|
+
query?: undefined;
|
|
178
|
+
};
|
|
179
|
+
required: string[];
|
|
180
|
+
};
|
|
181
|
+
} | {
|
|
182
|
+
name: string;
|
|
183
|
+
description: string;
|
|
184
|
+
input_schema: {
|
|
185
|
+
type: string;
|
|
186
|
+
properties: {
|
|
187
|
+
user_id: {
|
|
188
|
+
type: string;
|
|
189
|
+
description: string;
|
|
190
|
+
};
|
|
191
|
+
channel?: undefined;
|
|
192
|
+
text?: undefined;
|
|
193
|
+
blocks?: undefined;
|
|
194
|
+
thread_ts?: undefined;
|
|
195
|
+
timestamp?: undefined;
|
|
196
|
+
reaction?: undefined;
|
|
197
|
+
limit?: undefined;
|
|
198
|
+
email?: undefined;
|
|
199
|
+
usergroup?: undefined;
|
|
200
|
+
query?: undefined;
|
|
201
|
+
};
|
|
202
|
+
required: string[];
|
|
203
|
+
};
|
|
204
|
+
} | {
|
|
205
|
+
name: string;
|
|
206
|
+
description: string;
|
|
207
|
+
input_schema: {
|
|
208
|
+
type: string;
|
|
209
|
+
properties: {
|
|
210
|
+
email: {
|
|
211
|
+
type: string;
|
|
212
|
+
description: string;
|
|
213
|
+
};
|
|
214
|
+
channel?: undefined;
|
|
215
|
+
text?: undefined;
|
|
216
|
+
blocks?: undefined;
|
|
217
|
+
thread_ts?: undefined;
|
|
218
|
+
timestamp?: undefined;
|
|
219
|
+
reaction?: undefined;
|
|
220
|
+
limit?: undefined;
|
|
221
|
+
user_id?: undefined;
|
|
222
|
+
usergroup?: undefined;
|
|
223
|
+
query?: undefined;
|
|
224
|
+
};
|
|
225
|
+
required: string[];
|
|
226
|
+
};
|
|
227
|
+
} | {
|
|
228
|
+
name: string;
|
|
229
|
+
description: string;
|
|
230
|
+
input_schema: {
|
|
231
|
+
type: string;
|
|
232
|
+
properties: {
|
|
233
|
+
usergroup: {
|
|
234
|
+
type: string;
|
|
235
|
+
description: string;
|
|
236
|
+
};
|
|
237
|
+
channel?: undefined;
|
|
238
|
+
text?: undefined;
|
|
239
|
+
blocks?: undefined;
|
|
240
|
+
thread_ts?: undefined;
|
|
241
|
+
timestamp?: undefined;
|
|
242
|
+
reaction?: undefined;
|
|
243
|
+
limit?: undefined;
|
|
244
|
+
user_id?: undefined;
|
|
245
|
+
email?: undefined;
|
|
246
|
+
query?: undefined;
|
|
247
|
+
};
|
|
248
|
+
required: string[];
|
|
249
|
+
};
|
|
250
|
+
} | {
|
|
251
|
+
name: string;
|
|
252
|
+
description: string;
|
|
253
|
+
input_schema: {
|
|
254
|
+
type: string;
|
|
255
|
+
properties: {
|
|
256
|
+
query: {
|
|
257
|
+
type: string;
|
|
258
|
+
description: string;
|
|
259
|
+
};
|
|
260
|
+
limit: {
|
|
261
|
+
type: string;
|
|
262
|
+
description: string;
|
|
263
|
+
};
|
|
264
|
+
channel?: undefined;
|
|
265
|
+
text?: undefined;
|
|
266
|
+
blocks?: undefined;
|
|
267
|
+
thread_ts?: undefined;
|
|
268
|
+
timestamp?: undefined;
|
|
269
|
+
reaction?: undefined;
|
|
270
|
+
user_id?: undefined;
|
|
271
|
+
email?: undefined;
|
|
272
|
+
usergroup?: undefined;
|
|
273
|
+
};
|
|
274
|
+
required: string[];
|
|
275
|
+
};
|
|
276
|
+
} | {
|
|
277
|
+
name: string;
|
|
278
|
+
description: string;
|
|
279
|
+
input_schema: {
|
|
280
|
+
type: string;
|
|
281
|
+
properties: {
|
|
282
|
+
receive_id: {
|
|
283
|
+
type: string;
|
|
284
|
+
description: string;
|
|
285
|
+
};
|
|
286
|
+
text: {
|
|
287
|
+
type: string;
|
|
288
|
+
description: string;
|
|
289
|
+
};
|
|
290
|
+
message_id?: undefined;
|
|
291
|
+
page_size?: undefined;
|
|
292
|
+
chat_id?: undefined;
|
|
293
|
+
email?: undefined;
|
|
294
|
+
query?: undefined;
|
|
295
|
+
limit?: undefined;
|
|
296
|
+
};
|
|
297
|
+
required: string[];
|
|
298
|
+
};
|
|
299
|
+
} | {
|
|
300
|
+
name: string;
|
|
301
|
+
description: string;
|
|
302
|
+
input_schema: {
|
|
303
|
+
type: string;
|
|
304
|
+
properties: {
|
|
305
|
+
message_id: {
|
|
306
|
+
type: string;
|
|
307
|
+
description: string;
|
|
308
|
+
};
|
|
309
|
+
text: {
|
|
310
|
+
type: string;
|
|
311
|
+
description: string;
|
|
312
|
+
};
|
|
313
|
+
receive_id?: undefined;
|
|
314
|
+
page_size?: undefined;
|
|
315
|
+
chat_id?: undefined;
|
|
316
|
+
email?: undefined;
|
|
317
|
+
query?: undefined;
|
|
318
|
+
limit?: undefined;
|
|
319
|
+
};
|
|
320
|
+
required: string[];
|
|
321
|
+
};
|
|
322
|
+
} | {
|
|
323
|
+
name: string;
|
|
324
|
+
description: string;
|
|
325
|
+
input_schema: {
|
|
326
|
+
type: string;
|
|
327
|
+
properties: {
|
|
328
|
+
page_size: {
|
|
329
|
+
type: string;
|
|
330
|
+
description: string;
|
|
331
|
+
};
|
|
332
|
+
receive_id?: undefined;
|
|
333
|
+
text?: undefined;
|
|
334
|
+
message_id?: undefined;
|
|
335
|
+
chat_id?: undefined;
|
|
336
|
+
email?: undefined;
|
|
337
|
+
query?: undefined;
|
|
338
|
+
limit?: undefined;
|
|
339
|
+
};
|
|
340
|
+
required?: undefined;
|
|
341
|
+
};
|
|
342
|
+
} | {
|
|
343
|
+
name: string;
|
|
344
|
+
description: string;
|
|
345
|
+
input_schema: {
|
|
346
|
+
type: string;
|
|
347
|
+
properties: {
|
|
348
|
+
chat_id: {
|
|
349
|
+
type: string;
|
|
350
|
+
description: string;
|
|
351
|
+
};
|
|
352
|
+
page_size: {
|
|
353
|
+
type: string;
|
|
354
|
+
description: string;
|
|
355
|
+
};
|
|
356
|
+
receive_id?: undefined;
|
|
357
|
+
text?: undefined;
|
|
358
|
+
message_id?: undefined;
|
|
359
|
+
email?: undefined;
|
|
360
|
+
query?: undefined;
|
|
361
|
+
limit?: undefined;
|
|
362
|
+
};
|
|
363
|
+
required: string[];
|
|
364
|
+
};
|
|
365
|
+
} | {
|
|
366
|
+
name: string;
|
|
367
|
+
description: string;
|
|
368
|
+
input_schema: {
|
|
369
|
+
type: string;
|
|
370
|
+
properties: {
|
|
371
|
+
email: {
|
|
372
|
+
type: string;
|
|
373
|
+
description: string;
|
|
374
|
+
};
|
|
375
|
+
receive_id?: undefined;
|
|
376
|
+
text?: undefined;
|
|
377
|
+
message_id?: undefined;
|
|
378
|
+
page_size?: undefined;
|
|
379
|
+
chat_id?: undefined;
|
|
380
|
+
query?: undefined;
|
|
381
|
+
limit?: undefined;
|
|
382
|
+
};
|
|
383
|
+
required: string[];
|
|
384
|
+
};
|
|
385
|
+
} | {
|
|
386
|
+
name: string;
|
|
387
|
+
description: string;
|
|
388
|
+
input_schema: {
|
|
389
|
+
type: string;
|
|
390
|
+
properties: {
|
|
391
|
+
query: {
|
|
392
|
+
type: string;
|
|
393
|
+
description: string;
|
|
394
|
+
};
|
|
395
|
+
limit: {
|
|
396
|
+
type: string;
|
|
397
|
+
description: string;
|
|
398
|
+
};
|
|
399
|
+
receive_id?: undefined;
|
|
400
|
+
text?: undefined;
|
|
401
|
+
message_id?: undefined;
|
|
402
|
+
page_size?: undefined;
|
|
403
|
+
chat_id?: undefined;
|
|
404
|
+
email?: undefined;
|
|
405
|
+
};
|
|
406
|
+
required: string[];
|
|
407
|
+
};
|
|
408
|
+
})[];
|
|
409
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
export namespace coreToolsSkill {
|
|
2
|
+
let id: string;
|
|
3
|
+
let description: string;
|
|
4
|
+
let envKeys: any[];
|
|
5
|
+
let tools: ({
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
input_schema: {
|
|
9
|
+
type: string;
|
|
10
|
+
properties: {
|
|
11
|
+
path: {
|
|
12
|
+
type: string;
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
content?: undefined;
|
|
16
|
+
command?: undefined;
|
|
17
|
+
cwd?: undefined;
|
|
18
|
+
url?: undefined;
|
|
19
|
+
seconds?: undefined;
|
|
20
|
+
reason?: undefined;
|
|
21
|
+
};
|
|
22
|
+
required: string[];
|
|
23
|
+
};
|
|
24
|
+
} | {
|
|
25
|
+
name: string;
|
|
26
|
+
description: string;
|
|
27
|
+
input_schema: {
|
|
28
|
+
type: string;
|
|
29
|
+
properties: {
|
|
30
|
+
path: {
|
|
31
|
+
type: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
content: {
|
|
35
|
+
type: string;
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
command?: undefined;
|
|
39
|
+
cwd?: undefined;
|
|
40
|
+
url?: undefined;
|
|
41
|
+
seconds?: undefined;
|
|
42
|
+
reason?: undefined;
|
|
43
|
+
};
|
|
44
|
+
required: string[];
|
|
45
|
+
};
|
|
46
|
+
} | {
|
|
47
|
+
name: string;
|
|
48
|
+
description: string;
|
|
49
|
+
input_schema: {
|
|
50
|
+
type: string;
|
|
51
|
+
properties: {
|
|
52
|
+
path: {
|
|
53
|
+
type: string;
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
56
|
+
content?: undefined;
|
|
57
|
+
command?: undefined;
|
|
58
|
+
cwd?: undefined;
|
|
59
|
+
url?: undefined;
|
|
60
|
+
seconds?: undefined;
|
|
61
|
+
reason?: undefined;
|
|
62
|
+
};
|
|
63
|
+
required?: undefined;
|
|
64
|
+
};
|
|
65
|
+
} | {
|
|
66
|
+
name: string;
|
|
67
|
+
description: string;
|
|
68
|
+
input_schema: {
|
|
69
|
+
type: string;
|
|
70
|
+
properties: {
|
|
71
|
+
command: {
|
|
72
|
+
type: string;
|
|
73
|
+
description: string;
|
|
74
|
+
};
|
|
75
|
+
cwd: {
|
|
76
|
+
type: string;
|
|
77
|
+
description: string;
|
|
78
|
+
};
|
|
79
|
+
path?: undefined;
|
|
80
|
+
content?: undefined;
|
|
81
|
+
url?: undefined;
|
|
82
|
+
seconds?: undefined;
|
|
83
|
+
reason?: undefined;
|
|
84
|
+
};
|
|
85
|
+
required: string[];
|
|
86
|
+
};
|
|
87
|
+
} | {
|
|
88
|
+
name: string;
|
|
89
|
+
description: string;
|
|
90
|
+
input_schema: {
|
|
91
|
+
type: string;
|
|
92
|
+
properties: {
|
|
93
|
+
url: {
|
|
94
|
+
type: string;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
path?: undefined;
|
|
98
|
+
content?: undefined;
|
|
99
|
+
command?: undefined;
|
|
100
|
+
cwd?: undefined;
|
|
101
|
+
seconds?: undefined;
|
|
102
|
+
reason?: undefined;
|
|
103
|
+
};
|
|
104
|
+
required: string[];
|
|
105
|
+
};
|
|
106
|
+
} | {
|
|
107
|
+
name: string;
|
|
108
|
+
description: string;
|
|
109
|
+
input_schema: {
|
|
110
|
+
type: string;
|
|
111
|
+
properties: {
|
|
112
|
+
seconds: {
|
|
113
|
+
type: string;
|
|
114
|
+
description: string;
|
|
115
|
+
};
|
|
116
|
+
reason: {
|
|
117
|
+
type: string;
|
|
118
|
+
description: string;
|
|
119
|
+
};
|
|
120
|
+
path?: undefined;
|
|
121
|
+
content?: undefined;
|
|
122
|
+
command?: undefined;
|
|
123
|
+
cwd?: undefined;
|
|
124
|
+
url?: undefined;
|
|
125
|
+
};
|
|
126
|
+
required?: undefined;
|
|
127
|
+
};
|
|
128
|
+
})[];
|
|
129
|
+
function handleToolCall(name: any, args: any, context: any): Promise<any>;
|
|
130
|
+
function resolve(): any;
|
|
131
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create and register a skill.
|
|
3
|
+
*
|
|
4
|
+
* Function skill: skill(id, { description, input, handler })
|
|
5
|
+
* MCP skill: skill(id, { resolve(), serverName?, ... })
|
|
6
|
+
*
|
|
7
|
+
* @param {string} id — Unique skill identifier
|
|
8
|
+
* @param {SkillConfig} config — Skill definition
|
|
9
|
+
* @returns {Skill} A registered skill object
|
|
10
|
+
*/
|
|
11
|
+
export function skill(id: string, config: SkillConfig): Skill;
|
|
12
|
+
/**
|
|
13
|
+
* Create and register a skill.
|
|
14
|
+
*
|
|
15
|
+
* Function skill: skill(id, { description, input, handler })
|
|
16
|
+
* MCP skill: skill(id, { resolve(), serverName?, ... })
|
|
17
|
+
*
|
|
18
|
+
* @param {string} id — Unique skill identifier
|
|
19
|
+
* @param {SkillConfig} config — Skill definition
|
|
20
|
+
* @returns {Skill} A registered skill object
|
|
21
|
+
*/
|
|
22
|
+
export function functionSkill(id: string, config: SkillConfig): Skill;
|
|
23
|
+
/**
|
|
24
|
+
* A tool exposed by a skill (Anthropic tool-definition shape).
|
|
25
|
+
*/
|
|
26
|
+
export type SkillTool = {
|
|
27
|
+
/**
|
|
28
|
+
* — Tool name.
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
* — Human-readable description.
|
|
33
|
+
*/
|
|
34
|
+
description?: string;
|
|
35
|
+
/**
|
|
36
|
+
* — JSON Schema for the tool input.
|
|
37
|
+
*/
|
|
38
|
+
input_schema?: any;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* A registered skill object. Returned by {@link skill} and consumed by
|
|
42
|
+
* `registerSkill` / the workflow runtime.
|
|
43
|
+
*/
|
|
44
|
+
export type Skill = {
|
|
45
|
+
/**
|
|
46
|
+
* — Unique skill identifier.
|
|
47
|
+
*/
|
|
48
|
+
id: string;
|
|
49
|
+
/**
|
|
50
|
+
* — Skill kind.
|
|
51
|
+
*/
|
|
52
|
+
type: "function" | "mcp";
|
|
53
|
+
/**
|
|
54
|
+
* — MCP server name this skill registers under.
|
|
55
|
+
*/
|
|
56
|
+
serverName: string;
|
|
57
|
+
/**
|
|
58
|
+
* — Glob patterns of tools this skill grants.
|
|
59
|
+
*/
|
|
60
|
+
allowedTools: string[];
|
|
61
|
+
/**
|
|
62
|
+
* — Human-readable description.
|
|
63
|
+
*/
|
|
64
|
+
description: string;
|
|
65
|
+
/**
|
|
66
|
+
* — Env var names the skill reads at resolve time.
|
|
67
|
+
*/
|
|
68
|
+
envKeys: string[];
|
|
69
|
+
/**
|
|
70
|
+
* — Tool definitions exposed by the skill.
|
|
71
|
+
*/
|
|
72
|
+
tools: SkillTool[];
|
|
73
|
+
/**
|
|
74
|
+
* — Returns the MCP server launch config, or null when unavailable.
|
|
75
|
+
*/
|
|
76
|
+
resolve: () => ({
|
|
77
|
+
command: string;
|
|
78
|
+
args: string[];
|
|
79
|
+
env?: Record<string, string>;
|
|
80
|
+
} | null);
|
|
81
|
+
/**
|
|
82
|
+
* — Optional Cursor MCP registry key.
|
|
83
|
+
*/
|
|
84
|
+
cursorKey?: string;
|
|
85
|
+
/**
|
|
86
|
+
* — Optional env key carrying session info.
|
|
87
|
+
*/
|
|
88
|
+
sessionEnvKey?: string;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Function-skill input field: either a JSON-Schema type string
|
|
92
|
+
* (e.g. `'number'`) or a partial JSON-Schema object with an optional
|
|
93
|
+
* `required` flag (defaults to required).
|
|
94
|
+
*/
|
|
95
|
+
export type SkillInputField = string | (any & {
|
|
96
|
+
required?: boolean;
|
|
97
|
+
});
|
|
98
|
+
/**
|
|
99
|
+
* Configuration passed to {@link skill}.
|
|
100
|
+
*
|
|
101
|
+
* Provide `handler` for a function skill (one skill = one tool), or
|
|
102
|
+
* `resolve` for an MCP skill.
|
|
103
|
+
*/
|
|
104
|
+
export type SkillConfig = {
|
|
105
|
+
/**
|
|
106
|
+
* — Human-readable description.
|
|
107
|
+
*/
|
|
108
|
+
description?: string;
|
|
109
|
+
/**
|
|
110
|
+
* — Function-skill input schema.
|
|
111
|
+
*/
|
|
112
|
+
input?: Record<string, SkillInputField>;
|
|
113
|
+
/**
|
|
114
|
+
* — Function-skill handler (makes it a function skill).
|
|
115
|
+
*/
|
|
116
|
+
handler?: (args: any) => any;
|
|
117
|
+
/**
|
|
118
|
+
* — MCP-skill resolver (makes it an MCP skill).
|
|
119
|
+
*/
|
|
120
|
+
resolve?: () => ({
|
|
121
|
+
command: string;
|
|
122
|
+
args: string[];
|
|
123
|
+
env?: Record<string, string>;
|
|
124
|
+
} | null);
|
|
125
|
+
/**
|
|
126
|
+
* — MCP server name (defaults to `id`).
|
|
127
|
+
*/
|
|
128
|
+
serverName?: string;
|
|
129
|
+
/**
|
|
130
|
+
* — Allowed tool globs.
|
|
131
|
+
*/
|
|
132
|
+
allowedTools?: string[];
|
|
133
|
+
/**
|
|
134
|
+
* — Env var names the skill reads.
|
|
135
|
+
*/
|
|
136
|
+
envKeys?: string[];
|
|
137
|
+
/**
|
|
138
|
+
* — Tool definitions (MCP skills).
|
|
139
|
+
*/
|
|
140
|
+
tools?: SkillTool[];
|
|
141
|
+
/**
|
|
142
|
+
* — Optional Cursor MCP registry key.
|
|
143
|
+
*/
|
|
144
|
+
cursorKey?: string;
|
|
145
|
+
/**
|
|
146
|
+
* — Optional session env key.
|
|
147
|
+
*/
|
|
148
|
+
sessionEnvKey?: string;
|
|
149
|
+
};
|