@alfe.ai/integration-manifest 0.0.6 → 0.0.8
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 +30 -8
- package/dist/index.js +11 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -50,7 +50,9 @@ interface CommandDeclaration {
|
|
|
50
50
|
}
|
|
51
51
|
interface SkillInstall {
|
|
52
52
|
/** Relative path within the integration repo to the skill directory */
|
|
53
|
-
path
|
|
53
|
+
path?: string;
|
|
54
|
+
/** ClawHub skill slug to install from the registry */
|
|
55
|
+
clawhub?: string;
|
|
54
56
|
}
|
|
55
57
|
interface PluginInstall {
|
|
56
58
|
/** npm package name to install */
|
|
@@ -86,11 +88,13 @@ interface IntegrationPricingPlan {
|
|
|
86
88
|
interval?: 'month' | 'year';
|
|
87
89
|
}
|
|
88
90
|
interface IntegrationPricing {
|
|
89
|
-
type: 'free' | 'paid';
|
|
91
|
+
type: 'free' | 'paid' | 'usage';
|
|
90
92
|
/** Single price (shorthand for integrations with one plan) */
|
|
91
93
|
price?: number;
|
|
92
94
|
currency?: string;
|
|
93
95
|
interval?: 'month' | 'year';
|
|
96
|
+
/** Description of usage-based pricing (for type: 'usage') */
|
|
97
|
+
description?: string;
|
|
94
98
|
/** Multiple plans/tiers (e.g., starter, growth, scale) */
|
|
95
99
|
plans?: Record<string, IntegrationPricingPlan>;
|
|
96
100
|
}
|
|
@@ -121,6 +125,12 @@ interface IntegrationManifest {
|
|
|
121
125
|
* Example: ['openclaw'] means this integration only works with OpenClaw.
|
|
122
126
|
*/
|
|
123
127
|
supported_agents?: AgentRuntime[];
|
|
128
|
+
/**
|
|
129
|
+
* Scopes where this integration can be installed.
|
|
130
|
+
* Default: ['agent'] (per-agent only).
|
|
131
|
+
* 'org' means it can be installed at the org level and cascades to all agents.
|
|
132
|
+
*/
|
|
133
|
+
supported_scopes?: ('agent' | 'org')[];
|
|
124
134
|
/** Marketplace metadata */
|
|
125
135
|
publisherId?: string;
|
|
126
136
|
icon?: string;
|
|
@@ -230,7 +240,8 @@ declare const CommandDeclarationSchema: z.ZodObject<{
|
|
|
230
240
|
description: z.ZodOptional<z.ZodString>;
|
|
231
241
|
}, z.core.$strip>;
|
|
232
242
|
declare const SkillInstallSchema: z.ZodObject<{
|
|
233
|
-
path: z.ZodString
|
|
243
|
+
path: z.ZodOptional<z.ZodString>;
|
|
244
|
+
clawhub: z.ZodOptional<z.ZodString>;
|
|
234
245
|
}, z.core.$strip>;
|
|
235
246
|
declare const PluginInstallSchema: z.ZodObject<{
|
|
236
247
|
package: z.ZodString;
|
|
@@ -238,7 +249,8 @@ declare const PluginInstallSchema: z.ZodObject<{
|
|
|
238
249
|
/** Per-runtime install overrides */
|
|
239
250
|
declare const RuntimeInstallSchema: z.ZodObject<{
|
|
240
251
|
skills: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
241
|
-
path: z.ZodString
|
|
252
|
+
path: z.ZodOptional<z.ZodString>;
|
|
253
|
+
clawhub: z.ZodOptional<z.ZodString>;
|
|
242
254
|
}, z.core.$strip>>>>;
|
|
243
255
|
plugins: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
244
256
|
package: z.ZodString;
|
|
@@ -247,14 +259,16 @@ declare const RuntimeInstallSchema: z.ZodObject<{
|
|
|
247
259
|
}, z.core.$strip>;
|
|
248
260
|
declare const InstallTargetsSchema: z.ZodObject<{
|
|
249
261
|
skills: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
250
|
-
path: z.ZodString
|
|
262
|
+
path: z.ZodOptional<z.ZodString>;
|
|
263
|
+
clawhub: z.ZodOptional<z.ZodString>;
|
|
251
264
|
}, z.core.$strip>>>>;
|
|
252
265
|
plugins: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
253
266
|
package: z.ZodString;
|
|
254
267
|
}, z.core.$strip>>>>;
|
|
255
268
|
runtimes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
256
269
|
skills: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
257
|
-
path: z.ZodString
|
|
270
|
+
path: z.ZodOptional<z.ZodString>;
|
|
271
|
+
clawhub: z.ZodOptional<z.ZodString>;
|
|
258
272
|
}, z.core.$strip>>>>;
|
|
259
273
|
plugins: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
260
274
|
package: z.ZodString;
|
|
@@ -284,14 +298,16 @@ declare const IntegrationManifestSchema: z.ZodObject<{
|
|
|
284
298
|
min_gateway_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
285
299
|
installs: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
286
300
|
skills: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
287
|
-
path: z.ZodString
|
|
301
|
+
path: z.ZodOptional<z.ZodString>;
|
|
302
|
+
clawhub: z.ZodOptional<z.ZodString>;
|
|
288
303
|
}, z.core.$strip>>>>;
|
|
289
304
|
plugins: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
290
305
|
package: z.ZodString;
|
|
291
306
|
}, z.core.$strip>>>>;
|
|
292
307
|
runtimes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
293
308
|
skills: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
294
|
-
path: z.ZodString
|
|
309
|
+
path: z.ZodOptional<z.ZodString>;
|
|
310
|
+
clawhub: z.ZodOptional<z.ZodString>;
|
|
295
311
|
}, z.core.$strip>>>>;
|
|
296
312
|
plugins: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
297
313
|
package: z.ZodString;
|
|
@@ -350,12 +366,17 @@ declare const IntegrationManifestSchema: z.ZodObject<{
|
|
|
350
366
|
}, z.core.$strip>>>>;
|
|
351
367
|
repository: z.ZodOptional<z.ZodURL>;
|
|
352
368
|
supported_agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
369
|
+
supported_scopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
370
|
+
agent: "agent";
|
|
371
|
+
org: "org";
|
|
372
|
+
}>>>>;
|
|
353
373
|
publisherId: z.ZodOptional<z.ZodString>;
|
|
354
374
|
icon: z.ZodOptional<z.ZodString>;
|
|
355
375
|
pricing: z.ZodOptional<z.ZodObject<{
|
|
356
376
|
type: z.ZodEnum<{
|
|
357
377
|
free: "free";
|
|
358
378
|
paid: "paid";
|
|
379
|
+
usage: "usage";
|
|
359
380
|
}>;
|
|
360
381
|
price: z.ZodOptional<z.ZodNumber>;
|
|
361
382
|
currency: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -363,6 +384,7 @@ declare const IntegrationManifestSchema: z.ZodObject<{
|
|
|
363
384
|
month: "month";
|
|
364
385
|
year: "year";
|
|
365
386
|
}>>;
|
|
387
|
+
description: z.ZodOptional<z.ZodString>;
|
|
366
388
|
plans: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
367
389
|
name: z.ZodString;
|
|
368
390
|
price: z.ZodNumber;
|
package/dist/index.js
CHANGED
|
@@ -66,7 +66,10 @@ const CommandDeclarationSchema = z.object({
|
|
|
66
66
|
timeout_ms: z.number().int().positive().optional().default(3e4),
|
|
67
67
|
description: z.string().optional()
|
|
68
68
|
});
|
|
69
|
-
const SkillInstallSchema = z.object({
|
|
69
|
+
const SkillInstallSchema = z.object({
|
|
70
|
+
path: z.string().min(1, "Skill path must not be empty").optional(),
|
|
71
|
+
clawhub: z.string().min(1, "ClawHub skill slug must not be empty").optional()
|
|
72
|
+
}).refine((data) => data.path ?? data.clawhub, { message: "Skill must have either a path or clawhub slug" });
|
|
70
73
|
const PluginInstallSchema = z.object({ package: z.string().min(1, "Plugin package name must not be empty") });
|
|
71
74
|
/** Per-runtime install overrides */
|
|
72
75
|
const RuntimeInstallSchema = z.object({
|
|
@@ -96,10 +99,15 @@ const IntegrationPricingPlanSchema = z.object({
|
|
|
96
99
|
interval: z.enum(["month", "year"]).optional().default("month")
|
|
97
100
|
});
|
|
98
101
|
const IntegrationPricingSchema = z.object({
|
|
99
|
-
type: z.enum([
|
|
102
|
+
type: z.enum([
|
|
103
|
+
"free",
|
|
104
|
+
"paid",
|
|
105
|
+
"usage"
|
|
106
|
+
]),
|
|
100
107
|
price: z.number().positive().optional(),
|
|
101
108
|
currency: z.string().length(3).optional().default("USD"),
|
|
102
109
|
interval: z.enum(["month", "year"]).optional(),
|
|
110
|
+
description: z.string().optional(),
|
|
103
111
|
plans: z.record(z.string(), IntegrationPricingPlanSchema).optional()
|
|
104
112
|
}).refine((pricing) => {
|
|
105
113
|
if (pricing.type === "paid") {
|
|
@@ -133,6 +141,7 @@ const IntegrationManifestSchema = z.object({
|
|
|
133
141
|
commands: z.array(CommandDeclarationSchema).optional().default([]),
|
|
134
142
|
repository: z.url().optional(),
|
|
135
143
|
supported_agents: z.array(RuntimeKeySchema).optional(),
|
|
144
|
+
supported_scopes: z.array(z.enum(["agent", "org"])).optional().default(["agent"]),
|
|
136
145
|
publisherId: z.string().optional(),
|
|
137
146
|
icon: z.string().optional(),
|
|
138
147
|
pricing: IntegrationPricingSchema.optional(),
|