@alfe.ai/integrations 0.0.19 → 0.0.21

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
@@ -220,7 +220,7 @@ declare class Installer {
220
220
  * These are the canonical types used by all packages that interact with
221
221
  * integration manifests -- registry, lifecycle manager, CLI, etc.
222
222
  */
223
- type ConfigFieldType = 'secret' | 'string' | 'number' | 'boolean' | 'enum' | 'select' | 'multi_select' | 'oauth_connect' | 'phone_number_picker';
223
+ type ConfigFieldType = 'secret' | 'string' | 'number' | 'boolean' | 'enum' | 'select' | 'multi_select' | 'oauth_connect';
224
224
  interface SelectOption {
225
225
  value: string;
226
226
  label: string;
@@ -801,13 +801,17 @@ interface IIntegrationManager {
801
801
  /** Install an integration at a specific version with config */
802
802
  install(integrationId: string, version: string, config: unknown): Promise<void>;
803
803
  /** Activate an installed integration */
804
- activate(integrationId: string): Promise<void>;
804
+ activate(integrationId: string): Promise<{
805
+ configApplied: boolean;
806
+ }>;
805
807
  /** Deactivate a running integration */
806
808
  deactivate(integrationId: string): Promise<void>;
807
809
  /** Uninstall an integration */
808
810
  uninstall(integrationId: string): Promise<void>;
809
811
  /** Reinstall an integration — full teardown then fresh install + activate */
810
- reinstall(integrationId: string, version: string, config: unknown): Promise<void>;
812
+ reinstall(integrationId: string, version: string, config: unknown): Promise<{
813
+ configApplied: boolean;
814
+ }>;
811
815
  }
812
816
  declare class IntegrationManagerAdapter implements IIntegrationManager {
813
817
  private readonly manager;
@@ -819,10 +823,14 @@ declare class IntegrationManagerAdapter implements IIntegrationManager {
819
823
  installedAt?: string;
820
824
  }[]>;
821
825
  install(integrationId: string, version: string, config: unknown): Promise<void>;
822
- activate(integrationId: string): Promise<void>;
826
+ activate(integrationId: string): Promise<{
827
+ configApplied: boolean;
828
+ }>;
823
829
  deactivate(integrationId: string): Promise<void>;
824
830
  uninstall(integrationId: string): Promise<void>;
825
- reinstall(integrationId: string, version: string, config: unknown): Promise<void>;
831
+ reinstall(integrationId: string, version: string, config: unknown): Promise<{
832
+ configApplied: boolean;
833
+ }>;
826
834
  }
827
835
  //#endregion
828
836
  export { type HookEnvOptions, type HookResult, type IIntegrationManager, type InstalledInfo, Installer, InstallerError, type IntegrationConfigureParams, type IntegrationHealthParams, type IntegrationInfo, type IntegrationInstallParams, IntegrationManager, IntegrationManagerAdapter, type IntegrationManagerOptions, type IntegrationRemoveParams, LockManager, OpenClawApplier, type OpenClawApplierOptions, Registry, type RegistryEntry, type RegistryFetcher, type RegistryIndex, RegistryResolveError, type ResolvedIntegration, Resolver, type RuntimeApplier, type RuntimeDesiredState, type RuntimeLockFile, type RuntimePluginEntry, type RuntimeSkillEntry, StateManager, buildHookEnv, resolveInstallsForRuntime, runHook, runHookWithContext };
package/dist/index.js CHANGED
@@ -995,6 +995,7 @@ var IntegrationManager = class {
995
995
  const manifestPath = join(installPath, "alfe-integration.yaml");
996
996
  if (!existsSync(manifestPath)) return this.err("MANIFEST_MISSING", `Manifest not found at ${manifestPath}`);
997
997
  const manifest = parseManifestFile(manifestPath);
998
+ let configApplied = false;
998
999
  const supportedAgents = manifest.supported_agents;
999
1000
  for (const [runtimeName, applier] of this.runtimeAppliers) {
1000
1001
  if (!await applier.isAvailable()) {
@@ -1024,6 +1025,7 @@ var IntegrationManager = class {
1024
1025
  const interpolatedConfig = interpolateSelfConfig(runtimeConfig, agentConfig);
1025
1026
  this.log.info(`Applying config for ${integrationId} to ${runtimeName}`);
1026
1027
  await applier.applyConfig(integrationId, interpolatedConfig);
1028
+ configApplied = true;
1027
1029
  }
1028
1030
  if (plugins.length > 0 || skills.length > 0) this.lockManager.addEntries(runtimeName, integrationId, manifest.version, plugins, skills, installPath);
1029
1031
  }
@@ -1057,7 +1059,8 @@ var IntegrationManager = class {
1057
1059
  ok: true,
1058
1060
  payload: {
1059
1061
  name: integrationId,
1060
- status: "active"
1062
+ status: "active",
1063
+ configApplied
1061
1064
  }
1062
1065
  };
1063
1066
  } catch (err) {
@@ -1622,6 +1625,7 @@ var IntegrationManagerAdapter = class {
1622
1625
  async activate(integrationId) {
1623
1626
  const result = await this.manager.activate(integrationId);
1624
1627
  if (!result.ok) throw new Error(result.error?.message ?? `Failed to activate ${integrationId}`);
1628
+ return { configApplied: result.payload?.configApplied ?? false };
1625
1629
  }
1626
1630
  async deactivate(integrationId) {
1627
1631
  const result = await this.manager.deactivate(integrationId);
@@ -1638,6 +1642,7 @@ var IntegrationManagerAdapter = class {
1638
1642
  config
1639
1643
  });
1640
1644
  if (!result.ok) throw new Error(result.error?.message ?? `Failed to reinstall ${integrationId}`);
1645
+ return { configApplied: result.payload?.configApplied ?? false };
1641
1646
  }
1642
1647
  };
1643
1648
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfe.ai/integrations",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
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.8"
16
+ "@alfe.ai/integration-manifest": "^0.0.9"
17
17
  },
18
18
  "files": [
19
19
  "dist"