@alfe.ai/integrations 0.0.16 → 0.0.17

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 CHANGED
@@ -261,7 +261,9 @@ interface CommandDeclaration {
261
261
  }
262
262
  interface SkillInstall {
263
263
  /** Relative path within the integration repo to the skill directory */
264
- path: string;
264
+ path?: string;
265
+ /** ClawHub skill slug to install from the registry */
266
+ clawhub?: string;
265
267
  }
266
268
  interface PluginInstall {
267
269
  /** npm package name to install */
@@ -332,6 +334,12 @@ interface IntegrationManifest {
332
334
  * Example: ['openclaw'] means this integration only works with OpenClaw.
333
335
  */
334
336
  supported_agents?: AgentRuntime[];
337
+ /**
338
+ * Scopes where this integration can be installed.
339
+ * Default: ['agent'] (per-agent only).
340
+ * 'org' means it can be installed at the org level and cascades to all agents.
341
+ */
342
+ supported_scopes?: ('agent' | 'org')[];
335
343
  /** Marketplace metadata */
336
344
  publisherId?: string;
337
345
  icon?: string;
@@ -367,6 +375,8 @@ interface RuntimeApplier {
367
375
  removePlugin(pkg: string): Promise<void>;
368
376
  /** Copy a skill directory into this runtime's skills location */
369
377
  applySkill(name: string, srcPath: string): Promise<void>;
378
+ /** Install a skill from ClawHub registry */
379
+ applyClawHubSkill(slug: string): Promise<void>;
370
380
  /** Remove a skill directory from this runtime */
371
381
  removeSkill(name: string): Promise<void>;
372
382
  /** Deep-merge config into the runtime's agent configuration */
@@ -701,6 +711,7 @@ declare class OpenClawApplier implements RuntimeApplier {
701
711
  private isPluginInstalled;
702
712
  removePlugin(pkg: string): Promise<void>;
703
713
  applySkill(name: string, srcPath: string): Promise<void>;
714
+ applyClawHubSkill(slug: string): Promise<void>;
704
715
  removeSkill(name: string): Promise<void>;
705
716
  /**
706
717
  * Apply integration config to the OpenClaw runtime via `openclaw config set`.
package/dist/index.js CHANGED
@@ -549,10 +549,11 @@ var LockManager = class {
549
549
  integrationVersion: version
550
550
  });
551
551
  for (const skill of skills) {
552
- const name = skill.path.split("/").pop() ?? skill.path;
552
+ const name = skill.clawhub ?? skill.path?.split("/").pop() ?? "unknown";
553
+ const sourcePath = skill.path ? join(installPath, skill.path) : `clawhub:${skill.clawhub ?? ""}`;
553
554
  if (!state.skills.some((s) => s.name === name && s.sourceIntegration === integrationId)) state.skills.push({
554
555
  name,
555
- sourcePath: join(installPath, skill.path),
556
+ sourcePath,
556
557
  sourceIntegration: integrationId,
557
558
  integrationVersion: version
558
559
  });
@@ -1009,7 +1010,10 @@ var IntegrationManager = class {
1009
1010
  this.log.info(`Applying plugin ${plugin.package} to ${runtimeName}`);
1010
1011
  await applier.applyPlugin(plugin.package, installPath);
1011
1012
  }
1012
- for (const skill of skills) {
1013
+ for (const skill of skills) if (skill.clawhub) {
1014
+ this.log.info(`Installing ClawHub skill ${skill.clawhub} to ${runtimeName}`);
1015
+ await applier.applyClawHubSkill(skill.clawhub);
1016
+ } else if (skill.path) {
1013
1017
  const skillName = skill.path.split("/").pop() ?? skill.path;
1014
1018
  const srcPath = join(installPath, skill.path);
1015
1019
  this.log.info(`Applying skill ${skillName} to ${runtimeName}`);
@@ -1494,6 +1498,19 @@ var OpenClawApplier = class {
1494
1498
  cpSync(srcPath, join(this.skillsDir, name), { recursive: true });
1495
1499
  return Promise.resolve();
1496
1500
  }
1501
+ async applyClawHubSkill(slug) {
1502
+ log.info({ slug }, "Installing skill from ClawHub");
1503
+ try {
1504
+ await execFileAsync("clawhub", ["install", slug], { timeout: 6e4 });
1505
+ log.info({ slug }, "ClawHub skill installed");
1506
+ } catch (err) {
1507
+ const msg = err instanceof Error ? err.message : String(err);
1508
+ log.warn({
1509
+ slug,
1510
+ err: msg
1511
+ }, "ClawHub skill install failed — clawhub CLI may not be available");
1512
+ }
1513
+ }
1497
1514
  removeSkill(name) {
1498
1515
  const skillPath = join(this.skillsDir, name);
1499
1516
  if (existsSync(skillPath)) rmSync(skillPath, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfe.ai/integrations",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "Integration lifecycle management for Alfe — registry, resolution, installation, and state",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "@auriclabs/logger": "^0.1.1",
16
- "@alfe.ai/integration-manifest": "^0.0.6"
16
+ "@alfe.ai/integration-manifest": "^0.0.7"
17
17
  },
18
18
  "files": [
19
19
  "dist"