@alfe.ai/agent-api-client 0.0.4 → 0.0.6
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 +64 -0
- package/dist/index.d.cts +137 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +17 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
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 getGoogleCredentials() {
|
|
54
|
+
return this.request("/agents/google/credentials");
|
|
55
|
+
}
|
|
56
|
+
async recordActivity(data) {
|
|
57
|
+
return this.request("/agents/activity", {
|
|
58
|
+
method: "POST",
|
|
59
|
+
body: JSON.stringify(data)
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
//#endregion
|
|
64
|
+
exports.AgentApiClient = AgentApiClient;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
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
|
+
getGoogleCredentials(): Promise<{
|
|
120
|
+
email: string;
|
|
121
|
+
refreshToken: string;
|
|
122
|
+
clientId: string;
|
|
123
|
+
clientSecret: string;
|
|
124
|
+
}>;
|
|
125
|
+
recordActivity(data: {
|
|
126
|
+
userId?: string;
|
|
127
|
+
channel: string;
|
|
128
|
+
role: "user" | "assistant";
|
|
129
|
+
}): Promise<{
|
|
130
|
+
recorded: boolean;
|
|
131
|
+
}>;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=index.d.ts.map
|
|
134
|
+
|
|
135
|
+
//#endregion
|
|
136
|
+
export { AgentApiClient, AgentApiClientConfig, type IntegrationConfigResult, type IntegrationConfigSchemaField, type IntegrationInstall, type RegistryEntry };
|
|
137
|
+
//# 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//# 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,O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|
//#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
|
|
@@ -106,6 +116,12 @@ declare class AgentApiClient {
|
|
|
106
116
|
getRegistry(): Promise<{
|
|
107
117
|
integrations: RegistryEntry[];
|
|
108
118
|
}>;
|
|
119
|
+
getGoogleCredentials(): Promise<{
|
|
120
|
+
email: string;
|
|
121
|
+
refreshToken: string;
|
|
122
|
+
clientId: string;
|
|
123
|
+
clientSecret: string;
|
|
124
|
+
}>;
|
|
109
125
|
recordActivity(data: {
|
|
110
126
|
userId?: string;
|
|
111
127
|
channel: string;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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":";;
|
|
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,EA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ECqCxB,ODrCwB,CAAA;IAsBVF,QAAAA,EAAAA,OAAAA"}
|
package/dist/index.js
CHANGED
|
@@ -49,6 +49,9 @@ var AgentApiClient = class {
|
|
|
49
49
|
async getRegistry() {
|
|
50
50
|
return this.request("/integrations/registry");
|
|
51
51
|
}
|
|
52
|
+
async getGoogleCredentials() {
|
|
53
|
+
return this.request("/agents/google/credentials");
|
|
54
|
+
}
|
|
52
55
|
async recordActivity(data) {
|
|
53
56
|
return this.request("/agents/activity", {
|
|
54
57
|
method: "POST",
|
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 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"}
|
|
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 getGoogleCredentials(): Promise<{\n email: string;\n refreshToken: string;\n clientId: string;\n clientSecret: string;\n }> {\n return this.request(\"/agents/google/credentials\");\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,uBAKH;AACD,SAAO,KAAK,QAAQ,6BAA6B;;CAGnD,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
|
+
"version": "0.0.6",
|
|
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
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"require": "./dist/index.cjs",
|
|
12
|
+
"import": "./dist/index.js"
|
|
12
13
|
}
|
|
13
14
|
},
|
|
14
15
|
"files": [
|