@alfe.ai/agent-api-client 0.0.3 → 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,20 @@
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];
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];
3
18
  declare const IntegrationDesiredStatus: {
4
19
  readonly Active: "active";
5
20
  readonly Removed: "removed";
@@ -14,8 +29,9 @@ declare const IntegrationActualStatus: {
14
29
  readonly Unknown: "unknown";
15
30
  };
16
31
  type IntegrationActualStatus = (typeof IntegrationActualStatus)[keyof typeof IntegrationActualStatus];
17
- interface AgentIntegration {
18
- agentId: string;
32
+ interface IntegrationInstall {
33
+ scope: IntegrationScope;
34
+ scopeId: string;
19
35
  integrationId: string;
20
36
  tenantId: string;
21
37
  desiredStatus: IntegrationDesiredStatus;
@@ -26,6 +42,8 @@ interface AgentIntegration {
26
42
  installedAt: string;
27
43
  updatedAt: string;
28
44
  }
45
+ /** @deprecated Use IntegrationInstall instead */
46
+
29
47
  interface IntegrationConfigSchemaField {
30
48
  key: string;
31
49
  label: string;
@@ -60,15 +78,20 @@ interface RegistryEntry {
60
78
  url?: string;
61
79
  } | string;
62
80
  pricing?: {
63
- type: "free" | "paid";
81
+ type: "free" | "paid" | "usage";
64
82
  price?: number;
65
83
  currency?: string;
66
84
  interval?: "month" | "year";
85
+ description?: string;
67
86
  };
68
87
  features?: string[];
69
88
  preview_images?: string[];
70
89
  config_schema?: IntegrationConfigSchemaField[];
71
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;
72
95
  }
73
96
  //# sourceMappingURL=integration.d.ts.map
74
97
  //#endregion
@@ -82,14 +105,14 @@ declare class AgentApiClient {
82
105
  private readonly apiUrl;
83
106
  constructor(config: AgentApiClientConfig);
84
107
  private request;
85
- listIntegrations(): Promise<AgentIntegration[]>;
108
+ listIntegrations(): Promise<IntegrationInstall[]>;
86
109
  getIntegrationConfig(integrationId: string): Promise<IntegrationConfigResult>;
87
110
  updateIntegrationConfig(integrationId: string, config: Record<string, unknown>): Promise<void>;
88
111
  installIntegration(integrationId: string, options?: {
89
112
  version?: string;
90
113
  config?: Record<string, unknown>;
91
- }): Promise<AgentIntegration>;
92
- removeIntegration(integrationId: string): Promise<AgentIntegration>;
114
+ }): Promise<IntegrationInstall>;
115
+ removeIntegration(integrationId: string): Promise<IntegrationInstall>;
93
116
  getRegistry(): Promise<{
94
117
  integrations: RegistryEntry[];
95
118
  }>;
@@ -104,5 +127,5 @@ declare class AgentApiClient {
104
127
  //# sourceMappingURL=index.d.ts.map
105
128
 
106
129
  //#endregion
107
- export { AgentApiClient, AgentApiClientConfig, type AgentIntegration, type IntegrationConfigResult, type IntegrationConfigSchemaField, type RegistryEntry };
130
+ export { AgentApiClient, AgentApiClientConfig, type IntegrationConfigResult, type IntegrationConfigSchemaField, type IntegrationInstall, type RegistryEntry };
108
131
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["DEFAULT_INTEGRATIONS","IntegrationDesiredStatus","INTEGRATION_DESIRED_STATUSES","IntegrationActualStatus","INTEGRATION_ACTUAL_STATUSES","AgentIntegration","Record","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[];\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 AgentIntegration {\n agentId: 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}\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}\n//# sourceMappingURL=integration.d.ts.map"],"mappings":";;AAMYC,cAJSA,wBAIe,EAAA;EAAA,SAAA,MAAA,EAAA,QAAA;WAAWA,OAAAA,EAAAA,SAAAA;;AAA+D,KAAlGA,wBAAAA,GAAkG,CAAA,OAA/DA,wBAA+D,CAAA,CAAA,MAAA,OAAxBA,wBAAwB,CAAA;AAUlGE,cARSA,uBAQc,EAAA;EAAA,SAAA,UAAA,EAAA,YAAA;WAAWA,MAAAA,EAAAA,QAAAA;WAAsCA,KAAAA,EAAAA,OAAAA;EAAuB,SAAA,QAAA,EAAA,UAAA;EAE1FE,SAAAA,QAAAA,EAAgB,UAAA;EAAA,SAAA,OAAA,EAAA,SAAA;;AAKfF,KAPNA,uBAAAA,GAOMA,CAAAA,OAP4BA,uBAO5BA,CAAAA,CAAAA,MAAAA,OAPkEA,uBAOlEA,CAAAA;AAEA,UAPDE,gBAAAA,CAOC;EAKDE,OAAAA,EAAAA,MAAAA;EAeAC,aAAAA,EAAAA,MAAAA;EAAuB,QAAA,EAAA,MAAA;eAE5BF,EAzBOL,wBAyBPK;cACMC,EAzBAJ,uBAyBAI;EAA4B,OAAA,EAAA,MAAA;EAE7BE,MAAAA,EAzBLH,MAyBKG,CAAAA,MAAa,EAAA,OAqBVF,CAAAA;;;;ACtDpB;AAKa,UDQIA,4BAAAA,CCRU;EAAA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,EAAAA,MAAAA,CAAAA,ECc8B,ODd9BA,CCcsC,gBDdV,CAAA;iBCqBzB;kBAAwB;;EA3E9B,cAAA,CAAA,IAAA,EAAA;IAKJ,MAAA,CAAA,EAAA,MAAc;IAAA,OAAA,EAAA,MAAA;IAIL,IAAA,EAAA,MAAA,GAAA,WAAA;MA0EhB,OApD8B,CAAA;IAAR,QAAA,EAAA,OAAA"}
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+CE,CAAAA,CAAAA,MAAAA,OANhBF,gBAMgBE,CAAAA;AAEjEE,cANAF,wBAapB,EAAA;EACWE,SAAAA,MAAAA,EAAAA,QAAAA;EAAuB,SAAA,OAAA,EAAA,SAAA;;AAAiDA,KAVxEF,wBAAAA,GAUwEE,CAAAA,OAVrCF,wBAUqCE,CAAAA,CAAAA,MAAAA,OAVEF,wBAUFE,CAAAA;AAEnEE,cAVIF,uBAUc,EAAA;EAAA,SAAA,UAAA,EAAA,YAAA;WACxBJ,MAAAA,EAAAA,QAAAA;WAIQE,KAAAA,EAAAA,OAAAA;WACDE,QAAAA,EAAAA,UAAAA;WAENG,QAAAA,EAAAA,UAAAA;EAAM,SAAA,OAAA,EAAA,SAAA;AASlB,CAAA;AAeiBI,KAlCLP,uBAAAA,GAkC4B,CAAA,OAlCMA,uBAkCN,CAAA,CAAA,MAAA,OAlC4CA,uBAkC5C,CAAA;AAE5BG,UAlCKD,kBAAAA,CAkCLC;OACMG,EAlCPV,gBAkCOU;EAA4B,OAAA,EAAA,MAAA;EAE7B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,CAAAA,EAAAA,MAAAA;IAAsCA,MAAAA,CAAAA,ECwCzC,MDxCyCA,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;EAAuB,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.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * @alfe.ai/agent-api-client — Agent self-service API client.\n *\n * Used by agents calling /agents/ endpoints. The agent authenticates\n * with its API key — the backend resolves agentId + tenantId from the token.\n * No agent ID needed in paths or config.\n */\n\nexport type {\n AgentIntegration,\n IntegrationConfigResult,\n RegistryEntry,\n IntegrationConfigSchemaField,\n} from \"@alfe/types\";\n\nimport type { AgentIntegration, IntegrationConfigResult, RegistryEntry } from \"@alfe/types\";\n\nexport interface AgentApiClientConfig {\n apiKey: string;\n apiUrl: string;\n}\n\nexport class AgentApiClient {\n private readonly apiKey: string;\n private readonly apiUrl: string;\n\n constructor(config: AgentApiClientConfig) {\n this.apiKey = config.apiKey;\n this.apiUrl = config.apiUrl;\n }\n\n private async request<T>(path: string, options?: RequestInit): Promise<T> {\n const url = `${this.apiUrl}${path}`;\n const headers = new Headers(options?.headers);\n headers.set(\"Authorization\", `Bearer ${this.apiKey}`);\n headers.set(\"Content-Type\", \"application/json\");\n\n const res = await fetch(url, { ...options, headers });\n\n if (!res.ok) {\n const body = await res.text();\n throw new Error(`Agent API error ${String(res.status)}: ${body}`);\n }\n\n const body = (await res.json()) as { data: T };\n return body.data;\n }\n\n async listIntegrations(): Promise<AgentIntegration[]> {\n return this.request<AgentIntegration[]>(\"/agents/integrations\");\n }\n\n async getIntegrationConfig(integrationId: string): Promise<IntegrationConfigResult> {\n return this.request<IntegrationConfigResult>(\n `/agents/integrations/${encodeURIComponent(integrationId)}/config`,\n );\n }\n\n async updateIntegrationConfig(\n integrationId: string,\n config: Record<string, unknown>,\n ): Promise<void> {\n await this.request<unknown>(\n `/agents/integrations/${encodeURIComponent(integrationId)}`,\n {\n method: \"PATCH\",\n body: JSON.stringify({ config }),\n },\n );\n }\n\n async installIntegration(\n integrationId: string,\n options?: { version?: string; config?: Record<string, unknown> },\n ): Promise<AgentIntegration> {\n return this.request<AgentIntegration>(\"/agents/integrations\", {\n method: \"POST\",\n body: JSON.stringify({\n integrationId,\n version: options?.version,\n config: options?.config,\n }),\n });\n }\n\n async removeIntegration(integrationId: string): Promise<AgentIntegration> {\n return this.request<AgentIntegration>(\n `/agents/integrations/${encodeURIComponent(integrationId)}`,\n { method: \"DELETE\" },\n );\n }\n\n async getRegistry(): Promise<{ integrations: RegistryEntry[] }> {\n return this.request<{ integrations: RegistryEntry[] }>(\"/integrations/registry\");\n }\n\n async recordActivity(data: {\n userId?: string;\n channel: string;\n role: \"user\" | \"assistant\";\n }): Promise<{ recorded: boolean }> {\n return this.request<{ recorded: boolean }>(\"/agents/activity\", {\n method: \"POST\",\n body: JSON.stringify(data),\n });\n }\n}\n"],"mappings":";AAsBA,IAAa,iBAAb,MAA4B;CAC1B;CACA;CAEA,YAAY,QAA8B;AACxC,OAAK,SAAS,OAAO;AACrB,OAAK,SAAS,OAAO;;CAGvB,MAAc,QAAW,MAAc,SAAmC;EACxE,MAAM,MAAM,GAAG,KAAK,SAAS;EAC7B,MAAM,UAAU,IAAI,QAAQ,SAAS,QAAQ;AAC7C,UAAQ,IAAI,iBAAiB,UAAU,KAAK,SAAS;AACrD,UAAQ,IAAI,gBAAgB,mBAAmB;EAE/C,MAAM,MAAM,MAAM,MAAM,KAAK;GAAE,GAAG;GAAS;GAAS,CAAC;AAErD,MAAI,CAAC,IAAI,IAAI;GACX,MAAM,OAAO,MAAM,IAAI,MAAM;AAC7B,SAAM,IAAI,MAAM,mBAAmB,OAAO,IAAI,OAAO,CAAC,IAAI,OAAO;;AAInE,UADc,MAAM,IAAI,MAAM,EAClB;;CAGd,MAAM,mBAAgD;AACpD,SAAO,KAAK,QAA4B,uBAAuB;;CAGjE,MAAM,qBAAqB,eAAyD;AAClF,SAAO,KAAK,QACV,wBAAwB,mBAAmB,cAAc,CAAC,SAC3D;;CAGH,MAAM,wBACJ,eACA,QACe;AACf,QAAM,KAAK,QACT,wBAAwB,mBAAmB,cAAc,IACzD;GACE,QAAQ;GACR,MAAM,KAAK,UAAU,EAAE,QAAQ,CAAC;GACjC,CACF;;CAGH,MAAM,mBACJ,eACA,SAC2B;AAC3B,SAAO,KAAK,QAA0B,wBAAwB;GAC5D,QAAQ;GACR,MAAM,KAAK,UAAU;IACnB;IACA,SAAS,SAAS;IAClB,QAAQ,SAAS;IAClB,CAAC;GACH,CAAC;;CAGJ,MAAM,kBAAkB,eAAkD;AACxE,SAAO,KAAK,QACV,wBAAwB,mBAAmB,cAAc,IACzD,EAAE,QAAQ,UAAU,CACrB;;CAGH,MAAM,cAA0D;AAC9D,SAAO,KAAK,QAA2C,yBAAyB;;CAGlF,MAAM,eAAe,MAIc;AACjC,SAAO,KAAK,QAA+B,oBAAoB;GAC7D,QAAQ;GACR,MAAM,KAAK,UAAU,KAAK;GAC3B,CAAC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * @alfe.ai/agent-api-client — Agent self-service API client.\n *\n * Used by agents calling /agents/ endpoints. The agent authenticates\n * with its API key — the backend resolves agentId + tenantId from the token.\n * No agent ID needed in paths or config.\n */\n\nexport type {\n IntegrationInstall,\n IntegrationConfigResult,\n RegistryEntry,\n IntegrationConfigSchemaField,\n} from \"@alfe/types\";\n\nimport type { IntegrationInstall, IntegrationConfigResult, RegistryEntry } from \"@alfe/types\";\n\nexport interface AgentApiClientConfig {\n apiKey: string;\n apiUrl: string;\n}\n\nexport class AgentApiClient {\n private readonly apiKey: string;\n private readonly apiUrl: string;\n\n constructor(config: AgentApiClientConfig) {\n this.apiKey = config.apiKey;\n this.apiUrl = config.apiUrl;\n }\n\n private async request<T>(path: string, options?: RequestInit): Promise<T> {\n const url = `${this.apiUrl}${path}`;\n const headers = new Headers(options?.headers);\n headers.set(\"Authorization\", `Bearer ${this.apiKey}`);\n headers.set(\"Content-Type\", \"application/json\");\n\n const res = await fetch(url, { ...options, headers });\n\n if (!res.ok) {\n const body = await res.text();\n throw new Error(`Agent API error ${String(res.status)}: ${body}`);\n }\n\n const body = (await res.json()) as { data: T };\n return body.data;\n }\n\n async listIntegrations(): Promise<IntegrationInstall[]> {\n return this.request<IntegrationInstall[]>(\"/agents/integrations\");\n }\n\n async getIntegrationConfig(integrationId: string): Promise<IntegrationConfigResult> {\n return this.request<IntegrationConfigResult>(\n `/agents/integrations/${encodeURIComponent(integrationId)}/config`,\n );\n }\n\n async updateIntegrationConfig(\n integrationId: string,\n config: Record<string, unknown>,\n ): Promise<void> {\n await this.request<unknown>(\n `/agents/integrations/${encodeURIComponent(integrationId)}`,\n {\n method: \"PATCH\",\n body: JSON.stringify({ config }),\n },\n );\n }\n\n async installIntegration(\n integrationId: string,\n options?: { version?: string; config?: Record<string, unknown> },\n ): Promise<IntegrationInstall> {\n return this.request<IntegrationInstall>(\"/agents/integrations\", {\n method: \"POST\",\n body: JSON.stringify({\n integrationId,\n version: options?.version,\n config: options?.config,\n }),\n });\n }\n\n async removeIntegration(integrationId: string): Promise<IntegrationInstall> {\n return this.request<IntegrationInstall>(\n `/agents/integrations/${encodeURIComponent(integrationId)}`,\n { method: \"DELETE\" },\n );\n }\n\n async getRegistry(): Promise<{ integrations: RegistryEntry[] }> {\n return this.request<{ integrations: RegistryEntry[] }>(\"/integrations/registry\");\n }\n\n async recordActivity(data: {\n userId?: string;\n channel: string;\n role: \"user\" | \"assistant\";\n }): Promise<{ recorded: boolean }> {\n return this.request<{ recorded: boolean }>(\"/agents/activity\", {\n method: \"POST\",\n body: JSON.stringify(data),\n });\n }\n}\n"],"mappings":";AAsBA,IAAa,iBAAb,MAA4B;CAC1B;CACA;CAEA,YAAY,QAA8B;AACxC,OAAK,SAAS,OAAO;AACrB,OAAK,SAAS,OAAO;;CAGvB,MAAc,QAAW,MAAc,SAAmC;EACxE,MAAM,MAAM,GAAG,KAAK,SAAS;EAC7B,MAAM,UAAU,IAAI,QAAQ,SAAS,QAAQ;AAC7C,UAAQ,IAAI,iBAAiB,UAAU,KAAK,SAAS;AACrD,UAAQ,IAAI,gBAAgB,mBAAmB;EAE/C,MAAM,MAAM,MAAM,MAAM,KAAK;GAAE,GAAG;GAAS;GAAS,CAAC;AAErD,MAAI,CAAC,IAAI,IAAI;GACX,MAAM,OAAO,MAAM,IAAI,MAAM;AAC7B,SAAM,IAAI,MAAM,mBAAmB,OAAO,IAAI,OAAO,CAAC,IAAI,OAAO;;AAInE,UADc,MAAM,IAAI,MAAM,EAClB;;CAGd,MAAM,mBAAkD;AACtD,SAAO,KAAK,QAA8B,uBAAuB;;CAGnE,MAAM,qBAAqB,eAAyD;AAClF,SAAO,KAAK,QACV,wBAAwB,mBAAmB,cAAc,CAAC,SAC3D;;CAGH,MAAM,wBACJ,eACA,QACe;AACf,QAAM,KAAK,QACT,wBAAwB,mBAAmB,cAAc,IACzD;GACE,QAAQ;GACR,MAAM,KAAK,UAAU,EAAE,QAAQ,CAAC;GACjC,CACF;;CAGH,MAAM,mBACJ,eACA,SAC6B;AAC7B,SAAO,KAAK,QAA4B,wBAAwB;GAC9D,QAAQ;GACR,MAAM,KAAK,UAAU;IACnB;IACA,SAAS,SAAS;IAClB,QAAQ,SAAS;IAClB,CAAC;GACH,CAAC;;CAGJ,MAAM,kBAAkB,eAAoD;AAC1E,SAAO,KAAK,QACV,wBAAwB,mBAAmB,cAAc,IACzD,EAAE,QAAQ,UAAU,CACrB;;CAGH,MAAM,cAA0D;AAC9D,SAAO,KAAK,QAA2C,yBAAyB;;CAGlF,MAAM,eAAe,MAIc;AACjC,SAAO,KAAK,QAA+B,oBAAoB;GAC7D,QAAQ;GACR,MAAM,KAAK,UAAU,KAAK;GAC3B,CAAC"}
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "@alfe.ai/agent-api-client",
3
- "version": "0.0.3",
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": [