@alfe.ai/agent-api-client 0.0.4 → 0.0.5

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.cjs ADDED
@@ -0,0 +1,61 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/index.ts
3
+ var AgentApiClient = class {
4
+ apiKey;
5
+ apiUrl;
6
+ constructor(config) {
7
+ this.apiKey = config.apiKey;
8
+ this.apiUrl = config.apiUrl;
9
+ }
10
+ async request(path, options) {
11
+ const url = `${this.apiUrl}${path}`;
12
+ const headers = new Headers(options?.headers);
13
+ headers.set("Authorization", `Bearer ${this.apiKey}`);
14
+ headers.set("Content-Type", "application/json");
15
+ const res = await fetch(url, {
16
+ ...options,
17
+ headers
18
+ });
19
+ if (!res.ok) {
20
+ const body = await res.text();
21
+ throw new Error(`Agent API error ${String(res.status)}: ${body}`);
22
+ }
23
+ return (await res.json()).data;
24
+ }
25
+ async listIntegrations() {
26
+ return this.request("/agents/integrations");
27
+ }
28
+ async getIntegrationConfig(integrationId) {
29
+ return this.request(`/agents/integrations/${encodeURIComponent(integrationId)}/config`);
30
+ }
31
+ async updateIntegrationConfig(integrationId, config) {
32
+ await this.request(`/agents/integrations/${encodeURIComponent(integrationId)}`, {
33
+ method: "PATCH",
34
+ body: JSON.stringify({ config })
35
+ });
36
+ }
37
+ async installIntegration(integrationId, options) {
38
+ return this.request("/agents/integrations", {
39
+ method: "POST",
40
+ body: JSON.stringify({
41
+ integrationId,
42
+ version: options?.version,
43
+ config: options?.config
44
+ })
45
+ });
46
+ }
47
+ async removeIntegration(integrationId) {
48
+ return this.request(`/agents/integrations/${encodeURIComponent(integrationId)}`, { method: "DELETE" });
49
+ }
50
+ async getRegistry() {
51
+ return this.request("/integrations/registry");
52
+ }
53
+ async recordActivity(data) {
54
+ return this.request("/agents/activity", {
55
+ method: "POST",
56
+ body: JSON.stringify(data)
57
+ });
58
+ }
59
+ };
60
+ //#endregion
61
+ exports.AgentApiClient = AgentApiClient;
@@ -0,0 +1,131 @@
1
+ //#region ../../packages-internal/types/dist/integration.d.ts
2
+
3
+ /** Controls where an integration appears: public (everyone), dev (non-prod only), hidden (nowhere) */
4
+ declare const IntegrationVisibility: {
5
+ readonly Public: "public";
6
+ readonly Dev: "dev";
7
+ readonly Hidden: "hidden";
8
+ };
9
+ type IntegrationVisibility = (typeof IntegrationVisibility)[keyof typeof IntegrationVisibility];
10
+ /** Scope at which an integration is installed */
11
+ declare const IntegrationScope: {
12
+ readonly Org: "org";
13
+ readonly Team: "team";
14
+ readonly Project: "project";
15
+ readonly Agent: "agent";
16
+ };
17
+ type IntegrationScope = (typeof IntegrationScope)[keyof typeof IntegrationScope];
18
+ declare const IntegrationDesiredStatus: {
19
+ readonly Active: "active";
20
+ readonly Removed: "removed";
21
+ };
22
+ type IntegrationDesiredStatus = (typeof IntegrationDesiredStatus)[keyof typeof IntegrationDesiredStatus];
23
+ declare const IntegrationActualStatus: {
24
+ readonly Installing: "installing";
25
+ readonly Active: "active";
26
+ readonly Error: "error";
27
+ readonly Removing: "removing";
28
+ readonly Inactive: "inactive";
29
+ readonly Unknown: "unknown";
30
+ };
31
+ type IntegrationActualStatus = (typeof IntegrationActualStatus)[keyof typeof IntegrationActualStatus];
32
+ interface IntegrationInstall {
33
+ scope: IntegrationScope;
34
+ scopeId: string;
35
+ integrationId: string;
36
+ tenantId: string;
37
+ desiredStatus: IntegrationDesiredStatus;
38
+ actualStatus: IntegrationActualStatus;
39
+ version: string;
40
+ config: Record<string, unknown>;
41
+ errorMessage: string;
42
+ installedAt: string;
43
+ updatedAt: string;
44
+ }
45
+ /** @deprecated Use IntegrationInstall instead */
46
+
47
+ interface IntegrationConfigSchemaField {
48
+ key: string;
49
+ label: string;
50
+ type: string;
51
+ description?: string;
52
+ required?: boolean;
53
+ default?: string | number | boolean;
54
+ options?: string[];
55
+ select_options?: {
56
+ value: string;
57
+ label: string;
58
+ }[];
59
+ oauth_provider?: string;
60
+ editable?: string;
61
+ }
62
+ interface IntegrationConfigResult {
63
+ integrationId: string;
64
+ config: Record<string, unknown>;
65
+ configSchema: IntegrationConfigSchemaField[];
66
+ }
67
+ interface RegistryEntry {
68
+ id: string;
69
+ name: string;
70
+ description: string;
71
+ versions: string[];
72
+ latest: string;
73
+ repository: string;
74
+ commit: string;
75
+ icon?: string;
76
+ author?: {
77
+ name: string;
78
+ url?: string;
79
+ } | string;
80
+ pricing?: {
81
+ type: "free" | "paid" | "usage";
82
+ price?: number;
83
+ currency?: string;
84
+ interval?: "month" | "year";
85
+ description?: string;
86
+ };
87
+ features?: string[];
88
+ preview_images?: string[];
89
+ config_schema?: IntegrationConfigSchemaField[];
90
+ supported_agents?: string[];
91
+ /** Scopes where this integration can be installed */
92
+ supported_scopes?: IntegrationScope[];
93
+ /** Visibility status — controls where integration appears */
94
+ visibility?: IntegrationVisibility;
95
+ }
96
+ //# sourceMappingURL=integration.d.ts.map
97
+ //#endregion
98
+ //#region src/index.d.ts
99
+ interface AgentApiClientConfig {
100
+ apiKey: string;
101
+ apiUrl: string;
102
+ }
103
+ declare class AgentApiClient {
104
+ private readonly apiKey;
105
+ private readonly apiUrl;
106
+ constructor(config: AgentApiClientConfig);
107
+ private request;
108
+ listIntegrations(): Promise<IntegrationInstall[]>;
109
+ getIntegrationConfig(integrationId: string): Promise<IntegrationConfigResult>;
110
+ updateIntegrationConfig(integrationId: string, config: Record<string, unknown>): Promise<void>;
111
+ installIntegration(integrationId: string, options?: {
112
+ version?: string;
113
+ config?: Record<string, unknown>;
114
+ }): Promise<IntegrationInstall>;
115
+ removeIntegration(integrationId: string): Promise<IntegrationInstall>;
116
+ getRegistry(): Promise<{
117
+ integrations: RegistryEntry[];
118
+ }>;
119
+ recordActivity(data: {
120
+ userId?: string;
121
+ channel: string;
122
+ role: "user" | "assistant";
123
+ }): Promise<{
124
+ recorded: boolean;
125
+ }>;
126
+ }
127
+ //# sourceMappingURL=index.d.ts.map
128
+
129
+ //#endregion
130
+ export { AgentApiClient, AgentApiClientConfig, type IntegrationConfigResult, type IntegrationConfigSchemaField, type IntegrationInstall, type RegistryEntry };
131
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":["DEFAULT_INTEGRATIONS","IntegrationVisibility","INTEGRATION_VISIBILITIES","IntegrationScope","INTEGRATION_SCOPES","IntegrationDesiredStatus","INTEGRATION_DESIRED_STATUSES","IntegrationActualStatus","INTEGRATION_ACTUAL_STATUSES","IntegrationInstall","Record","AgentIntegration","OrgIntegration","IntegrationConfigSchemaField","IntegrationConfigResult","RegistryEntry"],"sources":["../../../packages-internal/types/dist/integration.d.ts","../src/index.ts"],"sourcesContent":["/** Integrations auto-installed for ALL agents regardless of hosting type. Cannot be removed. */\nexport declare const DEFAULT_INTEGRATIONS: readonly string[];\n/** Controls where an integration appears: public (everyone), dev (non-prod only), hidden (nowhere) */\nexport declare const IntegrationVisibility: {\n readonly Public: \"public\";\n readonly Dev: \"dev\";\n readonly Hidden: \"hidden\";\n};\nexport type IntegrationVisibility = (typeof IntegrationVisibility)[keyof typeof IntegrationVisibility];\nexport declare const INTEGRATION_VISIBILITIES: readonly [\"dev\" | \"public\" | \"hidden\", ...(\"dev\" | \"public\" | \"hidden\")[]];\n/** Scope at which an integration is installed */\nexport declare const IntegrationScope: {\n readonly Org: \"org\";\n readonly Team: \"team\";\n readonly Project: \"project\";\n readonly Agent: \"agent\";\n};\nexport type IntegrationScope = (typeof IntegrationScope)[keyof typeof IntegrationScope];\nexport declare const INTEGRATION_SCOPES: readonly [\"org\" | \"team\" | \"project\" | \"agent\", ...(\"org\" | \"team\" | \"project\" | \"agent\")[]];\nexport declare const IntegrationDesiredStatus: {\n readonly Active: \"active\";\n readonly Removed: \"removed\";\n};\nexport type IntegrationDesiredStatus = (typeof IntegrationDesiredStatus)[keyof typeof IntegrationDesiredStatus];\nexport declare const INTEGRATION_DESIRED_STATUSES: readonly [\"active\" | \"removed\", ...(\"active\" | \"removed\")[]];\nexport declare const IntegrationActualStatus: {\n readonly Installing: \"installing\";\n readonly Active: \"active\";\n readonly Error: \"error\";\n readonly Removing: \"removing\";\n readonly Inactive: \"inactive\";\n readonly Unknown: \"unknown\";\n};\nexport type IntegrationActualStatus = (typeof IntegrationActualStatus)[keyof typeof IntegrationActualStatus];\nexport declare const INTEGRATION_ACTUAL_STATUSES: readonly [\"active\" | \"error\" | \"installing\" | \"removing\" | \"inactive\" | \"unknown\", ...(\"active\" | \"error\" | \"installing\" | \"removing\" | \"inactive\" | \"unknown\")[]];\nexport interface IntegrationInstall {\n scope: IntegrationScope;\n scopeId: string;\n integrationId: string;\n tenantId: string;\n desiredStatus: IntegrationDesiredStatus;\n actualStatus: IntegrationActualStatus;\n version: string;\n config: Record<string, unknown>;\n errorMessage: string;\n installedAt: string;\n updatedAt: string;\n}\n/** @deprecated Use IntegrationInstall instead */\nexport type AgentIntegration = IntegrationInstall;\n/** Org-scoped integration install */\nexport type OrgIntegration = IntegrationInstall;\nexport interface IntegrationConfigSchemaField {\n key: string;\n label: string;\n type: string;\n description?: string;\n required?: boolean;\n default?: string | number | boolean;\n options?: string[];\n select_options?: {\n value: string;\n label: string;\n }[];\n oauth_provider?: string;\n editable?: string;\n}\nexport interface IntegrationConfigResult {\n integrationId: string;\n config: Record<string, unknown>;\n configSchema: IntegrationConfigSchemaField[];\n}\nexport interface RegistryEntry {\n id: string;\n name: string;\n description: string;\n versions: string[];\n latest: string;\n repository: string;\n commit: string;\n icon?: string;\n author?: {\n name: string;\n url?: string;\n } | string;\n pricing?: {\n type: \"free\" | \"paid\" | \"usage\";\n price?: number;\n currency?: string;\n interval?: \"month\" | \"year\";\n description?: string;\n };\n features?: string[];\n preview_images?: string[];\n config_schema?: IntegrationConfigSchemaField[];\n supported_agents?: string[];\n /** Scopes where this integration can be installed */\n supported_scopes?: IntegrationScope[];\n /** Visibility status — controls where integration appears */\n visibility?: IntegrationVisibility;\n}\n//# sourceMapp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CAAA,CAAA,ECyCtG,ODzCsG,CCyC9F,kBDzC8F,CAAA;EAE1FE,iBAAAA,CAAAA,aAAkB,EAAA,MAAA,CAAA,ECkDe,ODlDf,CCkDuB,kBDlDvB,CAAA;EAAA,WAAA,CAAA,CAAA,ECyDZ,ODzDY,CAAA;IACxBN,YAAAA,ECwDoC,aDxDpCA,EAAAA;;gBAKOI,CAAAA,IAAAA,EAAAA;IAENG,MAAAA,CAAAA,EAAAA,MAAAA;IAAM,OAAA,EAAA,MAAA;IASDG,IAAAA,EAAAA,MAAAA,GAAAA,WAAAA;EAeAC,CAAAA,CAAAA,ECiCX,ODjCWA,CAAAA;IAAuB,QAAA,EAAA,OAAA"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,12 @@
1
1
  //#region ../../packages-internal/types/dist/integration.d.ts
2
2
 
3
+ /** Controls where an integration appears: public (everyone), dev (non-prod only), hidden (nowhere) */
4
+ declare const IntegrationVisibility: {
5
+ readonly Public: "public";
6
+ readonly Dev: "dev";
7
+ readonly Hidden: "hidden";
8
+ };
9
+ type IntegrationVisibility = (typeof IntegrationVisibility)[keyof typeof IntegrationVisibility];
3
10
  /** Scope at which an integration is installed */
4
11
  declare const IntegrationScope: {
5
12
  readonly Org: "org";
@@ -71,10 +78,11 @@ interface RegistryEntry {
71
78
  url?: string;
72
79
  } | string;
73
80
  pricing?: {
74
- type: "free" | "paid";
81
+ type: "free" | "paid" | "usage";
75
82
  price?: number;
76
83
  currency?: string;
77
84
  interval?: "month" | "year";
85
+ description?: string;
78
86
  };
79
87
  features?: string[];
80
88
  preview_images?: string[];
@@ -82,6 +90,8 @@ interface RegistryEntry {
82
90
  supported_agents?: string[];
83
91
  /** Scopes where this integration can be installed */
84
92
  supported_scopes?: IntegrationScope[];
93
+ /** Visibility status — controls where integration appears */
94
+ visibility?: IntegrationVisibility;
85
95
  }
86
96
  //# sourceMappingURL=integration.d.ts.map
87
97
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["DEFAULT_INTEGRATIONS","IntegrationScope","INTEGRATION_SCOPES","IntegrationDesiredStatus","INTEGRATION_DESIRED_STATUSES","IntegrationActualStatus","INTEGRATION_ACTUAL_STATUSES","IntegrationInstall","Record","AgentIntegration","OrgIntegration","IntegrationConfigSchemaField","IntegrationConfigResult","RegistryEntry"],"sources":["../../../packages-internal/types/dist/integration.d.ts","../src/index.ts"],"sourcesContent":["/** Integrations auto-installed for ALL agents regardless of hosting type. Cannot be removed. */\nexport declare const DEFAULT_INTEGRATIONS: readonly string[];\n/** Scope at which an integration is installed */\nexport declare const IntegrationScope: {\n readonly Org: \"org\";\n readonly Team: \"team\";\n readonly Project: \"project\";\n readonly Agent: \"agent\";\n};\nexport type IntegrationScope = (typeof IntegrationScope)[keyof typeof IntegrationScope];\nexport declare const INTEGRATION_SCOPES: readonly [\"org\" | \"team\" | \"project\" | \"agent\", ...(\"org\" | \"team\" | \"project\" | \"agent\")[]];\nexport declare const IntegrationDesiredStatus: {\n readonly Active: \"active\";\n readonly Removed: \"removed\";\n};\nexport type IntegrationDesiredStatus = (typeof IntegrationDesiredStatus)[keyof typeof IntegrationDesiredStatus];\nexport declare const INTEGRATION_DESIRED_STATUSES: readonly [\"active\" | \"removed\", ...(\"active\" | \"removed\")[]];\nexport declare const IntegrationActualStatus: {\n readonly Installing: \"installing\";\n readonly Active: \"active\";\n readonly Error: \"error\";\n readonly Removing: \"removing\";\n readonly Inactive: \"inactive\";\n readonly Unknown: \"unknown\";\n};\nexport type IntegrationActualStatus = (typeof IntegrationActualStatus)[keyof typeof IntegrationActualStatus];\nexport declare const INTEGRATION_ACTUAL_STATUSES: readonly [\"active\" | \"error\" | \"installing\" | \"removing\" | \"inactive\" | \"unknown\", ...(\"active\" | \"error\" | \"installing\" | \"removing\" | \"inactive\" | \"unknown\")[]];\nexport interface IntegrationInstall {\n scope: IntegrationScope;\n scopeId: string;\n integrationId: string;\n tenantId: string;\n desiredStatus: IntegrationDesiredStatus;\n actualStatus: IntegrationActualStatus;\n version: string;\n config: Record<string, unknown>;\n errorMessage: string;\n installedAt: string;\n updatedAt: string;\n}\n/** @deprecated Use IntegrationInstall instead */\nexport type AgentIntegration = IntegrationInstall;\n/** Org-scoped integration install */\nexport type OrgIntegration = IntegrationInstall;\nexport interface IntegrationConfigSchemaField {\n key: string;\n label: string;\n type: string;\n description?: string;\n required?: boolean;\n default?: string | number | boolean;\n options?: string[];\n select_options?: {\n value: string;\n label: string;\n }[];\n oauth_provider?: string;\n editable?: string;\n}\nexport interface IntegrationConfigResult {\n integrationId: string;\n config: Record<string, unknown>;\n configSchema: IntegrationConfigSchemaField[];\n}\nexport interface RegistryEntry {\n id: string;\n name: string;\n description: string;\n versions: string[];\n latest: string;\n repository: string;\n commit: string;\n icon?: string;\n author?: {\n name: string;\n url?: string;\n } | string;\n pricing?: {\n type: \"free\" | \"paid\";\n price?: number;\n currency?: string;\n interval?: \"month\" | \"year\";\n };\n features?: string[];\n preview_images?: string[];\n config_schema?: IntegrationConfigSchemaField[];\n supported_agents?: string[];\n /** Scopes where this integration can be installed */\n supported_scopes?: IntegrationScope[];\n}\n//# sourceMappingURL=integration.d.ts.map"],"mappings":";;AASA;AAA4B,cANPC,gBAMO,EAAA;WAAWA,GAAAA,EAAAA,KAAAA;WAA+BA,IAAAA,EAAAA,MAAAA;EAAgB,SAAA,OAAA,EAAA,SAAA;EAEjEE,SAAAA,KAAAA,EAAAA,OAAAA;AAIrB,CAAA;AAAoC,KANxBF,gBAAAA,GAMwB,CAAA,OANGA,gBAMH,CAAA,CAAA,MAAA,OANkCA,gBAMlC,CAAA;AAAkDE,cAJjEA,wBAIiEA,EAAAA;EAAwB,SAAA,MAAA,EAAA,QAAA;EAEzFE,SAAAA,OAAAA,EAAAA,SAOpB;AACD,CAAA;AAAmC,KAVvBF,wBAAAA,GAUuB,CAAA,OAVYA,wBAUZ,CAAA,CAAA,MAAA,OAVmDA,wBAUnD,CAAA;AAAiDE,cAR/DA,uBAQ+DA,EAAAA;E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AuB,gBAAA,CAAA,CAAA,ECuB/E,ODvB+E,CCuBvE,kBDvBuE,EAAA,CAAA;EAE1FE,oBAAAA,CAAkB,aAAA,EAAA,MAAA,CAAA,ECyBkB,ODzBlB,CCyB0B,uBDzB1B,CAAA;EAAA,uBAAA,CAAA,aAAA,EAAA,MAAA,EAAA,MAAA,ECiCvB,MDjCuB,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA,ECkC9B,ODlC8B,CAAA,IAAA,CAAA;oBACxBN,CAAAA,aAAAA,EAAAA,MAAAA,EAAAA,QAAAA,EAAAA;IAIQE,OAAAA,CAAAA,EAAAA,MAAAA;IACDE,MAAAA,CAAAA,ECwCyB,MDxCzBA,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;MCyCb,ODvCOG,CCuCC,kBDvCDA,CAAAA;EAAM,iBAAA,CAAA,aAAA,EAAA,MAAA,CAAA,ECkDgC,ODlDhC,CCkDwC,kBDlDxC,CAAA;EASDG,WAAAA,CAAAA,CAAAA,ECgDM,ODhDNA,CAAAA;IAeAC,YAAAA,ECiC8B,aDjCP,EAAA;EAAA,CAAA,CAAA;gBAE5BJ,CAAAA,IAAAA,EAAAA;IACMG,MAAAA,CAAAA,EAAAA,MAAAA;IAA4B,OAAA,EAAA,MAAA;IAE7BE,IAAAA,EAAAA,MAAa,GAAA,WAAA;EAAA,CAAA,CAAA,ECoCxB,ODpCwB,CAAA;IAqBVF,QAAAA,EAAAA,OAAAA"}
1
+ {"version":3,"file":"index.d.ts","names":["DEFAULT_INTEGRATIONS","IntegrationVisibility","INTEGRATION_VISIBILITIES","IntegrationScope","INTEGRATION_SCOPES","IntegrationDesiredStatus","INTEGRATION_DESIRED_STATUSES","IntegrationActualStatus","INTEGRATION_ACTUAL_STATUSES","IntegrationInstall","Record","AgentIntegration","OrgIntegration","IntegrationConfigSchemaField","IntegrationConfigResult","RegistryEntry"],"sources":["../../../packages-internal/types/dist/integration.d.ts","../src/index.ts"],"sourcesContent":["/** Integrations auto-installed for ALL agents regardless of hosting type. Cannot be removed. */\nexport declare const DEFAULT_INTEGRATIONS: readonly string[];\n/** Controls where an integration appears: public (everyone), dev (non-prod only), hidden (nowhere) */\nexport declare const IntegrationVisibility: {\n readonly Public: \"public\";\n readonly Dev: \"dev\";\n readonly Hidden: \"hidden\";\n};\nexport type IntegrationVisibility = (typeof IntegrationVisibility)[keyof typeof IntegrationVisibility];\nexport declare const INTEGRATION_VISIBILITIES: readonly [\"dev\" | \"public\" | \"hidden\", ...(\"dev\" | \"public\" | \"hidden\")[]];\n/** Scope at which an integration is installed */\nexport declare const IntegrationScope: {\n readonly Org: \"org\";\n readonly Team: \"team\";\n readonly Project: \"project\";\n readonly Agent: \"agent\";\n};\nexport type IntegrationScope = (typeof IntegrationScope)[keyof typeof IntegrationScope];\nexport declare const INTEGRATION_SCOPES: readonly [\"org\" | \"team\" | \"project\" | \"agent\", ...(\"org\" | \"team\" | \"project\" | \"agent\")[]];\nexport declare const IntegrationDesiredStatus: {\n readonly Active: \"active\";\n readonly Removed: \"removed\";\n};\nexport type IntegrationDesiredStatus = (typeof IntegrationDesiredStatus)[keyof typeof IntegrationDesiredStatus];\nexport declare const INTEGRATION_DESIRED_STATUSES: readonly [\"active\" | \"removed\", ...(\"active\" | \"removed\")[]];\nexport declare const IntegrationActualStatus: {\n readonly Installing: \"installing\";\n readonly Active: \"active\";\n readonly Error: \"error\";\n readonly Removing: \"removing\";\n readonly Inactive: \"inactive\";\n readonly Unknown: \"unknown\";\n};\nexport type IntegrationActualStatus = (typeof IntegrationActualStatus)[keyof typeof IntegrationActualStatus];\nexport declare const INTEGRATION_ACTUAL_STATUSES: readonly [\"active\" | \"error\" | \"installing\" | \"removing\" | \"inactive\" | \"unknown\", ...(\"active\" | \"error\" | \"installing\" | \"removing\" | \"inactive\" | \"unknown\")[]];\nexport interface IntegrationInstall {\n scope: IntegrationScope;\n scopeId: string;\n integrationId: string;\n tenantId: string;\n desiredStatus: IntegrationDesiredStatus;\n actualStatus: IntegrationActualStatus;\n version: string;\n config: Record<string, unknown>;\n errorMessage: string;\n installedAt: string;\n updatedAt: string;\n}\n/** @deprecated Use IntegrationInstall instead */\nexport type AgentIntegration = IntegrationInstall;\n/** Org-scoped integration install */\nexport type OrgIntegration = IntegrationInstall;\nexport interface IntegrationConfigSchemaField {\n key: string;\n label: string;\n type: string;\n description?: string;\n required?: boolean;\n default?: string | number | boolean;\n options?: string[];\n select_options?: {\n value: string;\n label: string;\n }[];\n oauth_provider?: string;\n editable?: string;\n}\nexport interface IntegrationConfigResult {\n integrationId: string;\n config: Record<string, unknown>;\n configSchema: IntegrationConfigSchemaField[];\n}\nexport interface RegistryEntry {\n id: string;\n name: string;\n description: string;\n versions: string[];\n latest: string;\n repository: string;\n commit: string;\n icon?: string;\n author?: {\n name: string;\n url?: string;\n } | string;\n pricing?: {\n type: \"free\" | \"paid\" | \"usage\";\n price?: number;\n currency?: string;\n interval?: \"month\" | \"year\";\n description?: string;\n };\n features?: string[];\n preview_images?: string[];\n config_schema?: IntegrationConfigSchemaField[];\n supported_agents?: string[];\n /** Scopes where this integration can be installed */\n supported_scopes?: IntegrationScope[];\n /** Visibility status — controls where integration appears */\n visibility?: IntegrationVisibility;\n}\n//# sourceMappingURL=integration.d.ts.map"],"mappings":";;AAQA;AAAiC,cALZC,qBAKY,EAAA;WAAWA,MAAAA,EAAAA,QAAAA;WAAoCA,GAAAA,EAAAA,KAAAA;EAAqB,SAAA,MAAA,EAAA,QAAA;AAGrG,CAAA;AAMYE,KATAF,qBAAAA,GASgB,CAAA,OATgBA,qBAShB,CAAA,CAAA,MAAA,OAToDA,qBASpD,CAAA;;AAA0CE,cANjDA,gBAMiDA,EAAAA;EAAgB,SAAA,GAAA,EAAA,KAAA;EAEjEE,SAAAA,IAAAA,EAAAA,MAAAA;EAITA,SAAAA,OAAAA,EAAAA,SAAwB;EAAA,SAAA,KAAA,EAAA,OAAA;;AAAkDA,KAN1EF,gBAAAA,GAM0EE,CAAAA,OAN/CF,gBAM+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
2
  "name": "@alfe.ai/agent-api-client",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Agent self-service API client — agents calling /agents/ endpoints",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
- "import": "./dist/index.js",
11
- "types": "./dist/index.d.ts"
10
+ "types": "./dist/index.d.ts",
11
+ "require": "./dist/index.cjs",
12
+ "import": "./dist/index.js"
12
13
  }
13
14
  },
14
15
  "files": [