@zibby/skills 0.1.95 → 0.2.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.
Files changed (78) hide show
  1. package/README.md +1 -1
  2. package/dist/artifact.d.ts +1 -115
  3. package/dist/browser.d.ts +10 -19
  4. package/dist/chartRender.d.ts +46 -57
  5. package/dist/chartRender.js +1 -1
  6. package/dist/chat-memory.d.ts +26 -330
  7. package/dist/chat-notify.d.ts +30 -409
  8. package/dist/chat-notify.js +3 -3
  9. package/dist/chatProgress.d.ts +28 -47
  10. package/dist/code-scan.d.ts +52 -58
  11. package/dist/codeStats.d.ts +36 -136
  12. package/dist/codeStats.js +1 -1
  13. package/dist/codebaseMemory.d.ts +52 -32
  14. package/dist/codebaseMemory.js +2 -2
  15. package/dist/core-tools.d.ts +10 -131
  16. package/dist/datasetStore.d.ts +52 -179
  17. package/dist/datasetStore.js +12 -3
  18. package/dist/discord.d.ts +32 -68
  19. package/dist/figma.d.ts +5 -408
  20. package/dist/function-skill.d.ts +23 -135
  21. package/dist/function-skill.js +1 -1
  22. package/dist/gbrain.d.ts +46 -114
  23. package/dist/git-write.d.ts +45 -137
  24. package/dist/git-write.js +6 -6
  25. package/dist/git.d.ts +2 -73
  26. package/dist/github.d.ts +2 -1202
  27. package/dist/gitlab.d.ts +55 -1059
  28. package/dist/gitlab.js +2 -2
  29. package/dist/googleDocs.d.ts +39 -175
  30. package/dist/hubspot.d.ts +1 -381
  31. package/dist/index.d.ts +19 -12
  32. package/dist/index.js +157 -148
  33. package/dist/integrations.d.ts +2 -2
  34. package/dist/jira.d.ts +2 -532
  35. package/dist/jira.js +4 -4
  36. package/dist/kvMemory.d.ts +47 -78
  37. package/dist/lark.d.ts +2 -161
  38. package/dist/lark.js +1 -1
  39. package/dist/larkDocs.d.ts +35 -236
  40. package/dist/linear.d.ts +36 -343
  41. package/dist/linkedin.d.ts +10 -120
  42. package/dist/llm-billing.d.ts +92 -180
  43. package/dist/llm-billing.js +1 -1
  44. package/dist/memory.d.ts +11 -137
  45. package/dist/notion.d.ts +28 -276
  46. package/dist/notion.js +4 -4
  47. package/dist/opendesign.d.ts +24 -202
  48. package/dist/opendesign.js +2 -2
  49. package/dist/package.json +3 -2
  50. package/dist/plane.d.ts +40 -24
  51. package/dist/report.d.ts +153 -110
  52. package/dist/review-dedup.d.ts +8 -8
  53. package/dist/review.d.ts +12 -2
  54. package/dist/reviewMemoryIo.d.ts +37 -3
  55. package/dist/reviewRecord.d.ts +41 -47
  56. package/dist/sentry.d.ts +25 -22
  57. package/dist/skill-installer.d.ts +11 -86
  58. package/dist/slack.d.ts +1 -284
  59. package/dist/socialCard.d.ts +35 -89
  60. package/dist/test-runner.d.ts +1 -220
  61. package/dist/trackers/github-adapter.d.ts +39 -94
  62. package/dist/trackers/index.d.ts +25 -18
  63. package/dist/trackers/jira-adapter.d.ts +20 -88
  64. package/dist/trackers/linear-adapter.d.ts +24 -87
  65. package/dist/trackers/plane-adapter.d.ts +29 -85
  66. package/dist/trackers/plane-adapter.js +1 -1
  67. package/dist/trackers/types.d.ts +1 -186
  68. package/dist/triggerAgent.d.ts +26 -42
  69. package/dist/triggerAgent.js +1 -1
  70. package/dist/workflow-builder.d.ts +11 -245
  71. package/docs/cli-reference.md +33 -0
  72. package/docs/concepts/designing-agents.md +201 -0
  73. package/docs/self-host/backup-restore.md +52 -0
  74. package/docs/self-host/index.md +75 -0
  75. package/docs/self-host/storage.md +50 -0
  76. package/docs/self-host/troubleshooting.md +48 -0
  77. package/docs/self-host/upgrade.md +81 -0
  78. package/package.json +3 -2
package/dist/figma.d.ts CHANGED
@@ -1,416 +1,13 @@
1
1
  /** Accept a raw file key OR a figma.com URL (/file/, /design/, /board/, /proto/) → the key. */
2
- export function fileKeyFrom(fileKeyOrUrl: any): string;
2
+ export declare function fileKeyFrom(fileKeyOrUrl: any): string;
3
3
  /** Accept a comma-string OR array of node ids; map URL form `1-23` → API `1:23`; join with commas. */
4
- export function normalizeNodeIds(ids: any): string;
4
+ export declare function normalizeNodeIds(ids: any): string;
5
5
  /** Extract the `node-id` query param from a Figma URL, dash→colon. */
6
- export function nodeIdFromUrl(url: any): string;
6
+ export declare function nodeIdFromUrl(url: any): string;
7
7
  /**
8
8
  * Dev-Mode-style spec for a REST node: size, position, opacity, cornerRadius,
9
9
  * fills (hex), strokes, effects, auto-layout, and text style — recursing
10
10
  * `depth` levels into children. Used by figma_get_node_specs.
11
11
  */
12
- export function nodeSpec(n: any, depth: any): {
13
- id: any;
14
- name: any;
15
- type: any;
16
- };
17
- export namespace figmaSkill {
18
- let id: string;
19
- let serverName: string;
20
- let allowedTools: string[];
21
- let requiresIntegration: "figma";
22
- let envKeys: any[];
23
- let description: string;
24
- let promptFragment: string;
25
- function resolve(): {
26
- command: any;
27
- args: any[];
28
- env: {};
29
- description: string;
30
- type?: undefined;
31
- alwaysLoad?: undefined;
32
- } | {
33
- type: string;
34
- command: string;
35
- args: any[];
36
- env: {};
37
- description: string;
38
- alwaysLoad: boolean;
39
- };
40
- function handleToolCall(name: any, args: any): Promise<string>;
41
- let tools: ({
42
- name: string;
43
- description: string;
44
- input_schema: {
45
- type: string;
46
- properties: {
47
- fileKey?: undefined;
48
- depth?: undefined;
49
- ids?: undefined;
50
- file?: undefined;
51
- format?: undefined;
52
- scale?: undefined;
53
- svg_include_id?: undefined;
54
- version?: undefined;
55
- message?: undefined;
56
- comment_id?: undefined;
57
- node_id?: undefined;
58
- x?: undefined;
59
- y?: undefined;
60
- team_id?: undefined;
61
- project_id?: undefined;
62
- branch_data?: undefined;
63
- url?: undefined;
64
- };
65
- required?: undefined;
66
- };
67
- } | {
68
- name: string;
69
- description: string;
70
- input_schema: {
71
- type: string;
72
- properties: {
73
- fileKey: {
74
- type: string;
75
- description: string;
76
- };
77
- depth: {
78
- type: string;
79
- description: string;
80
- };
81
- ids?: undefined;
82
- file?: undefined;
83
- format?: undefined;
84
- scale?: undefined;
85
- svg_include_id?: undefined;
86
- version?: undefined;
87
- message?: undefined;
88
- comment_id?: undefined;
89
- node_id?: undefined;
90
- x?: undefined;
91
- y?: undefined;
92
- team_id?: undefined;
93
- project_id?: undefined;
94
- branch_data?: undefined;
95
- url?: undefined;
96
- };
97
- required: string[];
98
- };
99
- } | {
100
- name: string;
101
- description: string;
102
- input_schema: {
103
- type: string;
104
- properties: {
105
- fileKey: {
106
- type: string;
107
- description: string;
108
- };
109
- ids: {
110
- type: string;
111
- items: {
112
- type: string;
113
- };
114
- description: string;
115
- };
116
- depth: {
117
- type: string;
118
- description: string;
119
- };
120
- file?: undefined;
121
- format?: undefined;
122
- scale?: undefined;
123
- svg_include_id?: undefined;
124
- version?: undefined;
125
- message?: undefined;
126
- comment_id?: undefined;
127
- node_id?: undefined;
128
- x?: undefined;
129
- y?: undefined;
130
- team_id?: undefined;
131
- project_id?: undefined;
132
- branch_data?: undefined;
133
- url?: undefined;
134
- };
135
- required: string[];
136
- };
137
- } | {
138
- name: string;
139
- description: string;
140
- input_schema: {
141
- type: string;
142
- properties: {
143
- file: {
144
- type: string;
145
- description: string;
146
- };
147
- ids: {
148
- type: string;
149
- items: {
150
- type: string;
151
- };
152
- description: string;
153
- };
154
- depth: {
155
- type: string;
156
- description: string;
157
- };
158
- fileKey?: undefined;
159
- format?: undefined;
160
- scale?: undefined;
161
- svg_include_id?: undefined;
162
- version?: undefined;
163
- message?: undefined;
164
- comment_id?: undefined;
165
- node_id?: undefined;
166
- x?: undefined;
167
- y?: undefined;
168
- team_id?: undefined;
169
- project_id?: undefined;
170
- branch_data?: undefined;
171
- url?: undefined;
172
- };
173
- required: string[];
174
- };
175
- } | {
176
- name: string;
177
- description: string;
178
- input_schema: {
179
- type: string;
180
- properties: {
181
- fileKey: {
182
- type: string;
183
- description: string;
184
- };
185
- ids: {
186
- type: string;
187
- items: {
188
- type: string;
189
- };
190
- description: string;
191
- };
192
- format: {
193
- type: string;
194
- enum: string[];
195
- description: string;
196
- };
197
- scale: {
198
- type: string;
199
- description: string;
200
- };
201
- svg_include_id: {
202
- type: string;
203
- description: string;
204
- };
205
- version: {
206
- type: string;
207
- description: string;
208
- };
209
- depth?: undefined;
210
- file?: undefined;
211
- message?: undefined;
212
- comment_id?: undefined;
213
- node_id?: undefined;
214
- x?: undefined;
215
- y?: undefined;
216
- team_id?: undefined;
217
- project_id?: undefined;
218
- branch_data?: undefined;
219
- url?: undefined;
220
- };
221
- required: string[];
222
- };
223
- } | {
224
- name: string;
225
- description: string;
226
- input_schema: {
227
- type: string;
228
- properties: {
229
- file: {
230
- type: string;
231
- description: string;
232
- };
233
- fileKey?: undefined;
234
- depth?: undefined;
235
- ids?: undefined;
236
- format?: undefined;
237
- scale?: undefined;
238
- svg_include_id?: undefined;
239
- version?: undefined;
240
- message?: undefined;
241
- comment_id?: undefined;
242
- node_id?: undefined;
243
- x?: undefined;
244
- y?: undefined;
245
- team_id?: undefined;
246
- project_id?: undefined;
247
- branch_data?: undefined;
248
- url?: undefined;
249
- };
250
- required: string[];
251
- };
252
- } | {
253
- name: string;
254
- description: string;
255
- input_schema: {
256
- type: string;
257
- properties: {
258
- fileKey: {
259
- type: string;
260
- description: string;
261
- };
262
- depth?: undefined;
263
- ids?: undefined;
264
- file?: undefined;
265
- format?: undefined;
266
- scale?: undefined;
267
- svg_include_id?: undefined;
268
- version?: undefined;
269
- message?: undefined;
270
- comment_id?: undefined;
271
- node_id?: undefined;
272
- x?: undefined;
273
- y?: undefined;
274
- team_id?: undefined;
275
- project_id?: undefined;
276
- branch_data?: undefined;
277
- url?: undefined;
278
- };
279
- required: string[];
280
- };
281
- } | {
282
- name: string;
283
- description: string;
284
- input_schema: {
285
- type: string;
286
- properties: {
287
- file: {
288
- type: string;
289
- description: string;
290
- };
291
- message: {
292
- type: string;
293
- description: string;
294
- };
295
- comment_id: {
296
- type: string;
297
- description: string;
298
- };
299
- node_id: {
300
- type: string;
301
- description: string;
302
- };
303
- x: {
304
- type: string;
305
- description: string;
306
- };
307
- y: {
308
- type: string;
309
- description: string;
310
- };
311
- fileKey?: undefined;
312
- depth?: undefined;
313
- ids?: undefined;
314
- format?: undefined;
315
- scale?: undefined;
316
- svg_include_id?: undefined;
317
- version?: undefined;
318
- team_id?: undefined;
319
- project_id?: undefined;
320
- branch_data?: undefined;
321
- url?: undefined;
322
- };
323
- required: string[];
324
- };
325
- } | {
326
- name: string;
327
- description: string;
328
- input_schema: {
329
- type: string;
330
- properties: {
331
- team_id: {
332
- type: string;
333
- description: string;
334
- };
335
- fileKey?: undefined;
336
- depth?: undefined;
337
- ids?: undefined;
338
- file?: undefined;
339
- format?: undefined;
340
- scale?: undefined;
341
- svg_include_id?: undefined;
342
- version?: undefined;
343
- message?: undefined;
344
- comment_id?: undefined;
345
- node_id?: undefined;
346
- x?: undefined;
347
- y?: undefined;
348
- project_id?: undefined;
349
- branch_data?: undefined;
350
- url?: undefined;
351
- };
352
- required: string[];
353
- };
354
- } | {
355
- name: string;
356
- description: string;
357
- input_schema: {
358
- type: string;
359
- properties: {
360
- project_id: {
361
- type: string;
362
- description: string;
363
- };
364
- branch_data: {
365
- type: string;
366
- description: string;
367
- };
368
- fileKey?: undefined;
369
- depth?: undefined;
370
- ids?: undefined;
371
- file?: undefined;
372
- format?: undefined;
373
- scale?: undefined;
374
- svg_include_id?: undefined;
375
- version?: undefined;
376
- message?: undefined;
377
- comment_id?: undefined;
378
- node_id?: undefined;
379
- x?: undefined;
380
- y?: undefined;
381
- team_id?: undefined;
382
- url?: undefined;
383
- };
384
- required: string[];
385
- };
386
- } | {
387
- name: string;
388
- description: string;
389
- input_schema: {
390
- type: string;
391
- properties: {
392
- url: {
393
- type: string;
394
- description: string;
395
- };
396
- fileKey?: undefined;
397
- depth?: undefined;
398
- ids?: undefined;
399
- file?: undefined;
400
- format?: undefined;
401
- scale?: undefined;
402
- svg_include_id?: undefined;
403
- version?: undefined;
404
- message?: undefined;
405
- comment_id?: undefined;
406
- node_id?: undefined;
407
- x?: undefined;
408
- y?: undefined;
409
- team_id?: undefined;
410
- project_id?: undefined;
411
- branch_data?: undefined;
412
- };
413
- required: string[];
414
- };
415
- })[];
416
- }
12
+ export declare function nodeSpec(n: any, depth: any): any;
13
+ export declare const figmaSkill: any;
@@ -1,14 +1,28 @@
1
1
  /**
2
- * Create and register a skill.
2
+ * Unified Skill Factory
3
3
  *
4
- * Function skill: skill(id, { description, input, handler })
5
- * MCP skill: skill(id, { resolve(), serverName?, ... })
4
+ * Function skill (one skill = one tool, flat):
6
5
  *
7
- * @param {string} id Unique skill identifier
8
- * @param {SkillConfig} config — Skill definition
9
- * @returns {Skill} A registered skill object
6
+ * import { skill } from '@zibby/skills';
7
+ *
8
+ * export const add = skill('add', {
9
+ * description: 'Add two numbers',
10
+ * input: { a: 'number', b: 'number' },
11
+ * handler: async ({ a, b }) => ({ result: a + b })
12
+ * });
13
+ *
14
+ * MCP skill:
15
+ *
16
+ * import { skill } from '@zibby/skills';
17
+ *
18
+ * export const linear = skill('linear', {
19
+ * resolve() {
20
+ * if (!process.env.LINEAR_API_KEY) return null;
21
+ * return { command: 'npx', args: ['-y', '@linear/mcp-server'],
22
+ * env: { LINEAR_API_KEY: process.env.LINEAR_API_KEY } };
23
+ * }
24
+ * });
10
25
  */
11
- export function skill(id: string, config: SkillConfig): Skill;
12
26
  /**
13
27
  * Create and register a skill.
14
28
  *
@@ -19,131 +33,5 @@ export function skill(id: string, config: SkillConfig): Skill;
19
33
  * @param {SkillConfig} config — Skill definition
20
34
  * @returns {Skill} A registered skill object
21
35
  */
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
- };
36
+ export declare function skill(id: any, config: any): any;
37
+ export declare const functionSkill: typeof skill;
@@ -1 +1 @@
1
- import{createRequire as i}from"module";import{fileURLToPath as a}from"url";import{registerHandlers as u}from"@zibby/core/function-skill-registry.js";import{registerSkill as c}from"@zibby/agent-workflow";var p=i(import.meta.url);function f(){try{return p.resolve("@zibby/core/function-bridge.js")}catch{return null}}var m=import.meta.url;function h(){let e=Error.prepareStackTrace;try{Error.prepareStackTrace=(l,o)=>o;let t=new Error().stack;for(let l=2;l<t.length;l++){let o=t[l].getFileName();if(o&&o!==m&&!o.startsWith("node:"))return o.startsWith("file://")?a(o):o}return null}finally{Error.prepareStackTrace=e}}function y(e){if(!e||typeof e!="object")return{type:"object",properties:{},required:[]};let r={},t=[];for(let[l,o]of Object.entries(e))if(typeof o=="string")r[l]={type:o},t.push(l);else{let{required:s,...n}=o;r[l]=n,s!==!1&&t.push(l)}return{type:"object",properties:r,required:t}}function v(e,r,t){if(typeof t.handler!="function")throw new Error(`Skill "${e}" must have a handler function`);let l={[e]:t.handler},o=[{name:e,description:t.description||"",input_schema:y(t.input)}];return u(e,l,o),{id:e,type:"function",serverName:e,allowedTools:[`mcp__${e}__*`],description:t.description||`Function skill: ${e}`,envKeys:[],tools:o,resolve(){let s=f();return s?{command:"node",args:[s,r,e]}:null}}}function k(e,r){return{id:e,type:"mcp",serverName:r.serverName||e,allowedTools:r.allowedTools||[`mcp__${r.serverName||e}__*`],description:r.description||`MCP skill: ${e}`,envKeys:r.envKeys||[],tools:r.tools||[],resolve:r.resolve,...r.cursorKey&&{cursorKey:r.cursorKey},...r.sessionEnvKey&&{sessionEnvKey:r.sessionEnvKey}}}function d(e,r){let t;if("handler"in r){if(typeof r.handler!="function")throw new Error(`Skill "${e}" must have a handler function`);let l=h();if(!l)throw new Error(`Could not resolve caller file for skill "${e}".`);t=v(e,l,r)}else if(typeof r.resolve=="function")t=k(e,r);else throw new Error(`Skill "${e}" must have either a handler (function skill) or resolve (MCP skill).`);return c(t),t}var S=d;export{S as functionSkill,d as skill};
1
+ import{createRequire as i}from"module";import{fileURLToPath as a}from"url";import{registerHandlers as u}from"@zibby/core/function-skill-registry.js";import{registerSkill as c}from"@zibby/agent-workflow";var p=i(import.meta.url);function f(){try{return p.resolve("@zibby/core/function-bridge.js")}catch{return null}}var m=import.meta.url;function y(){let e=Error.prepareStackTrace;try{Error.prepareStackTrace=(l,o)=>o;let t=new Error().stack;for(let l=2;l<t.length;l++){let o=t[l].getFileName();if(o&&o!==m&&!o.startsWith("node:"))return o.startsWith("file://")?a(o):o}return null}finally{Error.prepareStackTrace=e}}function h(e){if(!e||typeof e!="object")return{type:"object",properties:{},required:[]};let r={},t=[];for(let[l,o]of Object.entries(e))if(typeof o=="string")r[l]={type:o},t.push(l);else{let{required:s,...n}=o;r[l]=n,s!==!1&&t.push(l)}return{type:"object",properties:r,required:t}}function v(e,r,t){if(typeof t.handler!="function")throw new Error(`Skill "${e}" must have a handler function`);let l={[e]:t.handler},o=[{name:e,description:t.description||"",input_schema:h(t.input)}];return u(e,l,o),{id:e,type:"function",serverName:e,allowedTools:[`mcp__${e}__*`],description:t.description||`Function skill: ${e}`,envKeys:[],tools:o,resolve(){let s=f();return s?{command:"node",args:[s,r,e]}:null}}}function k(e,r){return{id:e,type:"mcp",serverName:r.serverName||e,allowedTools:r.allowedTools||[`mcp__${r.serverName||e}__*`],description:r.description||`MCP skill: ${e}`,envKeys:r.envKeys||[],tools:r.tools||[],resolve:r.resolve,...r.cursorKey&&{cursorKey:r.cursorKey},...r.sessionEnvKey&&{sessionEnvKey:r.sessionEnvKey}}}function d(e,r){let t;if("handler"in r){if(typeof r.handler!="function")throw new Error(`Skill "${e}" must have a handler function`);let l=y();if(!l)throw new Error(`Could not resolve caller file for skill "${e}".`);t=v(e,l,r)}else if(typeof r.resolve=="function")t=k(e,r);else throw new Error(`Skill "${e}" must have either a handler (function skill) or resolve (MCP skill).`);return c(t),t}var S=d;export{S as functionSkill,d as skill};