@agent-os-sdk/client 0.9.2 → 0.9.3
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/README.md +26 -102
- package/dist/client/AgentOsClient.d.ts +3 -3
- package/dist/client/AgentOsClient.d.ts.map +1 -1
- package/dist/client/AgentOsClient.js +4 -4
- package/dist/generated/openapi.d.ts +951 -519
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/modules/agents.d.ts +5 -2
- package/dist/modules/agents.d.ts.map +1 -1
- package/dist/modules/agents.js +4 -1
- package/dist/modules/chatwoot.d.ts +59 -0
- package/dist/modules/chatwoot.d.ts.map +1 -0
- package/dist/modules/chatwoot.js +200 -0
- package/dist/modules/credentials.d.ts +5 -1
- package/dist/modules/credentials.d.ts.map +1 -1
- package/dist/modules/credentials.js +14 -2
- package/dist/modules/runs.d.ts +40 -63
- package/dist/modules/runs.d.ts.map +1 -1
- package/dist/modules/runs.js +86 -78
- package/dist/sse/client.d.ts +2 -2
- package/dist/sse/client.js +2 -2
- package/package.json +2 -2
- package/src/client/AgentOsClient.ts +4 -4
- package/src/generated/openapi.ts +951 -519
- package/src/generated/swagger.json +1295 -474
- package/src/index.ts +1 -0
- package/src/modules/agents.ts +9 -3
- package/src/modules/chatwoot.ts +242 -0
- package/src/modules/credentials.ts +15 -2
- package/src/modules/runs.ts +120 -107
- package/src/sse/client.ts +2 -2
- package/dist/modules/mcp.d.ts +0 -39
- package/dist/modules/mcp.d.ts.map +0 -1
- package/dist/modules/mcp.js +0 -38
- package/src/modules/mcp.ts +0 -59
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export type { APIResponse } from "./client/raw.js";
|
|
|
47
47
|
export type { SSEEvent, SSEOptions } from "./sse/client.js";
|
|
48
48
|
export * from "./modules/agents.js";
|
|
49
49
|
export * from "./modules/auth.js";
|
|
50
|
+
export * from "./modules/chatwoot.js";
|
|
50
51
|
export * from "./modules/credentials.js";
|
|
51
52
|
export * from "./modules/me.js";
|
|
52
53
|
export * from "./modules/members.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAOH,OAAO,EAAE,YAAY,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,IAAI,eAAe,EAAE,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC7H,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAMhE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAM3E,OAAO,EACH,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EACxF,WAAW,EAAE,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,WAAW,EAC1E,gBAAgB,EACnB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,YAAY,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EACH,gCAAgC,EAAE,sBAAsB,EAAE,qBAAqB,EAClF,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAMvE,OAAO,EACH,yBAAyB,EAAE,sBAAsB,EACjD,0BAA0B,EAAE,KAAK,aAAa,EACjD,MAAM,oBAAoB,CAAC;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60,7 @@ export { withTimeout } from "./client/timeout.js";
|
|
|
60
60
|
// ============================================================
|
|
61
61
|
export * from "./modules/agents.js";
|
|
62
62
|
export * from "./modules/auth.js";
|
|
63
|
+
export * from "./modules/chatwoot.js";
|
|
63
64
|
export * from "./modules/credentials.js";
|
|
64
65
|
export * from "./modules/me.js";
|
|
65
66
|
export * from "./modules/members.js";
|
package/dist/modules/agents.d.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* - list* for collections: listAgents()
|
|
7
7
|
* - create*, update*, delete* for mutations
|
|
8
8
|
*/
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
9
|
+
import type { PaginatedResponse, PaginationParams } from "../client/helpers.js";
|
|
10
|
+
import type { APIResponse, components, RawClient } from "../client/raw.js";
|
|
11
11
|
type AgentBundleSchema = components["schemas"]["AgentExportBundle"];
|
|
12
12
|
export interface Agent {
|
|
13
13
|
id: string;
|
|
@@ -22,6 +22,7 @@ export interface Agent {
|
|
|
22
22
|
last_run_id?: string | null;
|
|
23
23
|
last_run_status?: string | null;
|
|
24
24
|
last_run_at?: string | null;
|
|
25
|
+
metadata?: any | null;
|
|
25
26
|
}
|
|
26
27
|
export interface AgentBundle extends AgentBundleSchema {
|
|
27
28
|
}
|
|
@@ -79,6 +80,7 @@ export declare class AgentsModule {
|
|
|
79
80
|
*/
|
|
80
81
|
create(body: {
|
|
81
82
|
name: string;
|
|
83
|
+
metadata?: any | null;
|
|
82
84
|
/** Idempotency key for safe retries. When set, duplicate requests with the same key return 409 Conflict. */
|
|
83
85
|
idempotency_key?: string;
|
|
84
86
|
}): Promise<APIResponse<Agent>>;
|
|
@@ -89,6 +91,7 @@ export declare class AgentsModule {
|
|
|
89
91
|
update(agentId: string, body: {
|
|
90
92
|
name?: string;
|
|
91
93
|
live_bundle_id?: string;
|
|
94
|
+
metadata?: any | null;
|
|
92
95
|
}): Promise<APIResponse<Agent>>;
|
|
93
96
|
/**
|
|
94
97
|
* Delete an agent.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/modules/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/modules/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAM3E,KAAK,iBAAiB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,mBAAmB,CAAC,CAAC;AAGpE,MAAM,WAAW,KAAK;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,WAAY,SAAQ,iBAAiB;CAAI;AAE1D,MAAM,WAAW,mBAAmB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,kBAAkB;IAC/B,OAAO,CAAC,E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,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC"}
|
package/dist/modules/agents.js
CHANGED
|
@@ -61,7 +61,10 @@ export class AgentsModule {
|
|
|
61
61
|
headers["X-Idempotency-Key"] = body.idempotency_key;
|
|
62
62
|
}
|
|
63
63
|
return this.client.POST("/v1/api/agents", {
|
|
64
|
-
body: {
|
|
64
|
+
body: {
|
|
65
|
+
name: body.name,
|
|
66
|
+
metadata: body.metadata
|
|
67
|
+
},
|
|
65
68
|
headers,
|
|
66
69
|
});
|
|
67
70
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chatwoot Module
|
|
3
|
+
*/
|
|
4
|
+
import type { APIResponse, RawClient } from "../client/raw.js";
|
|
5
|
+
export interface ChatwootInboxUrlResponse {
|
|
6
|
+
url: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ChatwootConfig {
|
|
9
|
+
baseUrl: string;
|
|
10
|
+
accountId: string;
|
|
11
|
+
apiAccessToken: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class ChatwootModule {
|
|
14
|
+
private client;
|
|
15
|
+
private headers;
|
|
16
|
+
constructor(client: RawClient, headers: () => Record<string, string>);
|
|
17
|
+
/**
|
|
18
|
+
* Internal helper to resolve Chatwoot configuration from AgentOS credentials
|
|
19
|
+
*/
|
|
20
|
+
private _getChatwootConfig;
|
|
21
|
+
/**
|
|
22
|
+
* Direct call to Chatwoot API
|
|
23
|
+
*/
|
|
24
|
+
private _chatwootRequest;
|
|
25
|
+
/**
|
|
26
|
+
* Get the inbox URL for a specific credential.
|
|
27
|
+
* Use this to open the Chatwoot inbox directly.
|
|
28
|
+
*/
|
|
29
|
+
getInboxUrl(credentialId: string): Promise<APIResponse<ChatwootInboxUrlResponse>>;
|
|
30
|
+
/**
|
|
31
|
+
* List all inboxes
|
|
32
|
+
*/
|
|
33
|
+
listInboxes(credentialId: string): Promise<APIResponse<any[]>>;
|
|
34
|
+
/**
|
|
35
|
+
* Create a new inbox
|
|
36
|
+
*/
|
|
37
|
+
createInbox(credentialId: string, data: any): Promise<APIResponse<any>>;
|
|
38
|
+
/**
|
|
39
|
+
* Get a specific inbox
|
|
40
|
+
*/
|
|
41
|
+
getInbox(credentialId: string, inboxId: string | number): Promise<APIResponse<any>>;
|
|
42
|
+
/**
|
|
43
|
+
* Update an inbox
|
|
44
|
+
*/
|
|
45
|
+
updateInbox(credentialId: string, inboxId: string | number, data: any): Promise<APIResponse<any>>;
|
|
46
|
+
/**
|
|
47
|
+
* Delete an inbox
|
|
48
|
+
*/
|
|
49
|
+
deleteInbox(credentialId: string, inboxId: string | number): Promise<APIResponse<any>>;
|
|
50
|
+
/**
|
|
51
|
+
* Get inbox metrics
|
|
52
|
+
*/
|
|
53
|
+
getInboxMetrics(credentialId: string, inboxId: string | number): Promise<APIResponse<any>>;
|
|
54
|
+
/**
|
|
55
|
+
* Get the inbox URL for a specific agent.
|
|
56
|
+
*/
|
|
57
|
+
getAgentInboxUrl(agentId: string): Promise<APIResponse<ChatwootInboxUrlResponse>>;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=chatwoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatwoot.d.ts","sourceRoot":"","sources":["../../src/modules/chatwoot.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE/D,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAA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wB,CAAC,CAAC;CA4BxF"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chatwoot Module
|
|
3
|
+
*/
|
|
4
|
+
export class ChatwootModule {
|
|
5
|
+
client;
|
|
6
|
+
headers;
|
|
7
|
+
constructor(client, headers) {
|
|
8
|
+
this.client = client;
|
|
9
|
+
this.headers = headers;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Internal helper to resolve Chatwoot configuration from AgentOS credentials
|
|
13
|
+
*/
|
|
14
|
+
async _getChatwootConfig(credentialId) {
|
|
15
|
+
const { data: credential, error } = await this.client.GET("/v1/api/credentials/{id}", {
|
|
16
|
+
params: {
|
|
17
|
+
path: { id: credentialId },
|
|
18
|
+
query: { includeValues: true }
|
|
19
|
+
},
|
|
20
|
+
headers: this.headers(),
|
|
21
|
+
});
|
|
22
|
+
if (error || !credential) {
|
|
23
|
+
return { error: error || { message: "Credential not found", code: "CREDENTIAL_NOT_FOUND" }, data: undefined };
|
|
24
|
+
}
|
|
25
|
+
// Backend now returns 'values' when includeValues=true
|
|
26
|
+
const values = credential.values || credential.Values || {};
|
|
27
|
+
const publicConfig = credential.publicConfig || credential.PublicConfig || {};
|
|
28
|
+
const data = credential.data || {};
|
|
29
|
+
const url = publicConfig.url || data.url || values.url || publicConfig.endpoint || data.endpoint || values.endpoint || values.base_url;
|
|
30
|
+
let accountId = publicConfig.account_id || data.account_id || values.account_id || publicConfig.accountId || data.accountId || values.accountId;
|
|
31
|
+
const apiAccessToken = values.api_access_token || data.api_access_token || values.api_key || data.api_key || values.apiKey || data.apiKey || values.api_token;
|
|
32
|
+
if (!url || !apiAccessToken) {
|
|
33
|
+
return { error: { message: "Invalid Chatwoot credential: missing URL/Endpoint or API Access Token/Key", code: "INVALID_CREDENTIAL" }, data: undefined };
|
|
34
|
+
}
|
|
35
|
+
const baseUrl = url.endsWith("/") ? url.slice(0, -1) : url;
|
|
36
|
+
// Auto-discover accountId if missing
|
|
37
|
+
if (!accountId) {
|
|
38
|
+
try {
|
|
39
|
+
const profileRes = await fetch(`${baseUrl}/api/v1/profile`, {
|
|
40
|
+
headers: { "api_access_token": apiAccessToken }
|
|
41
|
+
});
|
|
42
|
+
if (profileRes.ok) {
|
|
43
|
+
const profile = await profileRes.json();
|
|
44
|
+
// Use the first available account
|
|
45
|
+
if (profile.accounts && profile.accounts.length > 0) {
|
|
46
|
+
accountId = profile.accounts[0].id;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch (err) {
|
|
51
|
+
console.warn("Failed to auto-discover Chatwoot account ID:", err);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (!accountId) {
|
|
55
|
+
return { error: { message: "Invalid Chatwoot credential: missing Account ID and auto-discovery failed.", code: "ACCOUNT_ID_MISSING" }, data: undefined };
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
data: {
|
|
59
|
+
baseUrl,
|
|
60
|
+
accountId: String(accountId),
|
|
61
|
+
apiAccessToken
|
|
62
|
+
},
|
|
63
|
+
error: null
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Direct call to Chatwoot API
|
|
68
|
+
*/
|
|
69
|
+
async _chatwootRequest(config, method, path, body) {
|
|
70
|
+
const url = `${config.baseUrl}${path}`;
|
|
71
|
+
const headers = {
|
|
72
|
+
"api_access_token": config.apiAccessToken,
|
|
73
|
+
"Content-Type": "application/json",
|
|
74
|
+
};
|
|
75
|
+
try {
|
|
76
|
+
const response = await fetch(url, {
|
|
77
|
+
method,
|
|
78
|
+
headers,
|
|
79
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
80
|
+
});
|
|
81
|
+
let data = null;
|
|
82
|
+
const contentType = response.headers.get("content-type");
|
|
83
|
+
if (contentType && contentType.includes("application/json")) {
|
|
84
|
+
try {
|
|
85
|
+
const text = await response.text();
|
|
86
|
+
if (text)
|
|
87
|
+
data = JSON.parse(text);
|
|
88
|
+
}
|
|
89
|
+
catch (e) {
|
|
90
|
+
// Ignore JSON parse errors for empty bodies
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (!response.ok) {
|
|
94
|
+
return { error: data || { message: `Chatwoot API error: ${response.statusText}`, code: "API_ERROR" }, data: undefined, response };
|
|
95
|
+
}
|
|
96
|
+
return { data, error: undefined, response };
|
|
97
|
+
}
|
|
98
|
+
catch (err) {
|
|
99
|
+
return { error: { message: err.message, code: "UNKNOWN_ERROR" }, data: undefined, response: new Response() };
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Get the inbox URL for a specific credential.
|
|
104
|
+
* Use this to open the Chatwoot inbox directly.
|
|
105
|
+
*/
|
|
106
|
+
async getInboxUrl(credentialId) {
|
|
107
|
+
const { data: config, error } = await this._getChatwootConfig(credentialId);
|
|
108
|
+
if (error || !config) {
|
|
109
|
+
return { error: error || { message: "Config not found", code: "CONFIG_MISSING" }, data: undefined, response: new Response() };
|
|
110
|
+
}
|
|
111
|
+
const inboxUrl = `${config.baseUrl}/app/accounts/${config.accountId}/inbox`;
|
|
112
|
+
return {
|
|
113
|
+
data: { url: inboxUrl },
|
|
114
|
+
error: undefined,
|
|
115
|
+
response: new Response(),
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* List all inboxes
|
|
120
|
+
*/
|
|
121
|
+
async listInboxes(credentialId) {
|
|
122
|
+
const { data: config, error } = await this._getChatwootConfig(credentialId);
|
|
123
|
+
if (error || !config)
|
|
124
|
+
return { error: error || { message: "Config not found", code: "CONFIG_MISSING" }, data: undefined, response: new Response() };
|
|
125
|
+
const res = await this._chatwootRequest(config, "GET", `/api/v1/accounts/${config.accountId}/inboxes`);
|
|
126
|
+
// Chatwoot API returns { payload: [...] }
|
|
127
|
+
if (res.data && Array.isArray(res.data.payload)) {
|
|
128
|
+
return { data: res.data.payload, error: undefined, response: res.response };
|
|
129
|
+
}
|
|
130
|
+
return res;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Create a new inbox
|
|
134
|
+
*/
|
|
135
|
+
async createInbox(credentialId, data) {
|
|
136
|
+
const { data: config, error } = await this._getChatwootConfig(credentialId);
|
|
137
|
+
if (error || !config)
|
|
138
|
+
return { error: error || { message: "Config not found", code: "CONFIG_MISSING" }, data: undefined, response: new Response() };
|
|
139
|
+
return this._chatwootRequest(config, "POST", `/api/v1/accounts/${config.accountId}/inboxes`, data);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Get a specific inbox
|
|
143
|
+
*/
|
|
144
|
+
async getInbox(credentialId, inboxId) {
|
|
145
|
+
const { data: config, error } = await this._getChatwootConfig(credentialId);
|
|
146
|
+
if (error || !config)
|
|
147
|
+
return { error: error || { message: "Config not found", code: "CONFIG_MISSING" }, data: undefined, response: new Response() };
|
|
148
|
+
return this._chatwootRequest(config, "GET", `/api/v1/accounts/${config.accountId}/inboxes/${inboxId}`);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Update an inbox
|
|
152
|
+
*/
|
|
153
|
+
async updateInbox(credentialId, inboxId, data) {
|
|
154
|
+
const { data: config, error } = await this._getChatwootConfig(credentialId);
|
|
155
|
+
if (error || !config)
|
|
156
|
+
return { error: error || { message: "Config not found", code: "CONFIG_MISSING" }, data: undefined, response: new Response() };
|
|
157
|
+
return this._chatwootRequest(config, "PATCH", `/api/v1/accounts/${config.accountId}/inboxes/${inboxId}`, data);
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Delete an inbox
|
|
161
|
+
*/
|
|
162
|
+
async deleteInbox(credentialId, inboxId) {
|
|
163
|
+
const { data: config, error } = await this._getChatwootConfig(credentialId);
|
|
164
|
+
if (error || !config)
|
|
165
|
+
return { error: error || { message: "Config not found", code: "CONFIG_MISSING" }, data: undefined, response: new Response() };
|
|
166
|
+
return this._chatwootRequest(config, "DELETE", `/api/v1/accounts/${config.accountId}/inboxes/${inboxId}`);
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Get inbox metrics
|
|
170
|
+
*/
|
|
171
|
+
async getInboxMetrics(credentialId, inboxId) {
|
|
172
|
+
const { data: config, error } = await this._getChatwootConfig(credentialId);
|
|
173
|
+
if (error || !config)
|
|
174
|
+
return { error: error || { message: "Config not found", code: "CONFIG_MISSING" }, data: undefined, response: new Response() };
|
|
175
|
+
return this._chatwootRequest(config, "GET", `/api/v1/accounts/${config.accountId}/inboxes/${inboxId}/metrics`);
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Get the inbox URL for a specific agent.
|
|
179
|
+
*/
|
|
180
|
+
async getAgentInboxUrl(agentId) {
|
|
181
|
+
const { data: triggers, error: triggerError } = await this.client.GET("/v1/api/triggers", {
|
|
182
|
+
params: { query: { agent_id: agentId } },
|
|
183
|
+
headers: this.headers(),
|
|
184
|
+
});
|
|
185
|
+
if (triggerError || !triggers) {
|
|
186
|
+
return { error: triggerError || { message: "Failed to fetch triggers", code: "TRIGGER_FETCH_FAILED" }, data: undefined, response: new Response() };
|
|
187
|
+
}
|
|
188
|
+
const chatwootTrigger = triggers.items?.find((t) => t.type === "chatwoot" ||
|
|
189
|
+
(t.type === "evolution_whatsapp" && t.config?.chat_platform === "chatwoot") ||
|
|
190
|
+
(t.config?.credential_id && (t.type === "chatwoot" || t.type.includes("whatsapp"))));
|
|
191
|
+
if (!chatwootTrigger) {
|
|
192
|
+
return { error: { message: "No compatible trigger found for this agent", code: "NO_TRIGGER" }, data: undefined, response: new Response() };
|
|
193
|
+
}
|
|
194
|
+
const credentialId = chatwootTrigger.config?.credential_id;
|
|
195
|
+
if (!credentialId) {
|
|
196
|
+
return { error: { message: "Trigger configuration missing credential_id", code: "MISSING_CREDENTIAL_ID" }, data: undefined, response: new Response() };
|
|
197
|
+
}
|
|
198
|
+
return this.getInboxUrl(credentialId);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
@@ -50,7 +50,7 @@ export declare class CredentialsModule {
|
|
|
50
50
|
/**
|
|
51
51
|
* Get a credential by ID.
|
|
52
52
|
*/
|
|
53
|
-
get(credentialId: string): Promise<APIResponse<Credential>>;
|
|
53
|
+
get(credentialId: string, includeValues?: boolean): Promise<APIResponse<Credential>>;
|
|
54
54
|
/**
|
|
55
55
|
* Create a new credential.
|
|
56
56
|
*/
|
|
@@ -86,5 +86,9 @@ export declare class CredentialsModule {
|
|
|
86
86
|
* Validate a credential.
|
|
87
87
|
*/
|
|
88
88
|
validate(credentialId: string): Promise<APIResponse<ValidateCredentialResponse>>;
|
|
89
|
+
/**
|
|
90
|
+
* List available models for a credential provider.
|
|
91
|
+
*/
|
|
92
|
+
listModels(credentialId: string): Promise<APIResponse<string[]>>;
|
|
89
93
|
}
|
|
90
94
|
//# sourceMappingURL=credentials.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../src/modules/credentials.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAc,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAK3E,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,GAAG,QAAQ,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,SAAS,GAAG,QAAQ,CAAC;IACnC,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,sBAAsB;IACnC,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,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W,CAAC,MAAM,EAAE,CAAC,CAAC;CAMzE"}
|
|
@@ -22,9 +22,12 @@ export class CredentialsModule {
|
|
|
22
22
|
/**
|
|
23
23
|
* Get a credential by ID.
|
|
24
24
|
*/
|
|
25
|
-
async get(credentialId) {
|
|
25
|
+
async get(credentialId, includeValues = false) {
|
|
26
26
|
return this.client.GET("/v1/api/credentials/{id}", {
|
|
27
|
-
params: {
|
|
27
|
+
params: {
|
|
28
|
+
path: { id: credentialId },
|
|
29
|
+
query: { includeValues }
|
|
30
|
+
},
|
|
28
31
|
headers: this.headers(),
|
|
29
32
|
});
|
|
30
33
|
}
|
|
@@ -77,4 +80,13 @@ export class CredentialsModule {
|
|
|
77
80
|
headers: this.headers(),
|
|
78
81
|
});
|
|
79
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* List available models for a credential provider.
|
|
85
|
+
*/
|
|
86
|
+
async listModels(credentialId) {
|
|
87
|
+
return this.client.GET("/v1/api/credentials/{id}/models", {
|
|
88
|
+
params: { path: { id: credentialId } },
|
|
89
|
+
headers: this.headers(),
|
|
90
|
+
});
|
|
91
|
+
}
|
|
80
92
|
}
|
package/dist/modules/runs.d.ts
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { RawClient, APIResponse, components } from "../client/raw.js";
|
|
10
10
|
import type { PaginationParams, PaginatedResponse } from "../client/helpers.js";
|
|
11
|
-
import { type SSEEvent, type RunStreamEvent, type SSEOptions } from "../sse/client.js";
|
|
12
11
|
type WaitRunResponse = components["schemas"]["WaitRunResponse"];
|
|
13
12
|
type BatchRunResponse = components["schemas"]["BatchRunResponse"];
|
|
14
13
|
type CancelRunResponse = components["schemas"]["CancelRunResponse"];
|
|
@@ -24,6 +23,9 @@ export interface Run {
|
|
|
24
23
|
input?: unknown;
|
|
25
24
|
output?: unknown;
|
|
26
25
|
error?: unknown;
|
|
26
|
+
current_attempt_id?: string;
|
|
27
|
+
current_attempt_no?: number;
|
|
28
|
+
latest_seq?: number;
|
|
27
29
|
created_at: string;
|
|
28
30
|
started_at?: string;
|
|
29
31
|
completed_at?: string;
|
|
@@ -36,26 +38,17 @@ export interface Run {
|
|
|
36
38
|
replay_mode?: "best_effort" | "strict";
|
|
37
39
|
}
|
|
38
40
|
export type RunStatus = "pending" | "queued" | "running" | "completed" | "failed" | "cancelled" | "waiting_for_human" | "resumed";
|
|
39
|
-
export interface RunEvent {
|
|
40
|
-
id: string;
|
|
41
|
-
run_id: string;
|
|
42
|
-
event_type: string;
|
|
43
|
-
node?: string;
|
|
44
|
-
data?: unknown;
|
|
45
|
-
timestamp: string;
|
|
46
|
-
}
|
|
47
41
|
export interface CreateRunResponse {
|
|
48
42
|
run_id: string;
|
|
49
43
|
status: string;
|
|
50
44
|
reused?: boolean;
|
|
51
45
|
}
|
|
52
46
|
export type RunListResponse = PaginatedResponse<Run>;
|
|
53
|
-
export type RunEventsResponse = PaginatedResponse<RunEvent>;
|
|
54
47
|
/** Wave 2.3: Seq-based polling response for execution events */
|
|
55
48
|
export interface RunEventsPollResponse {
|
|
56
49
|
events: RunEventDto[];
|
|
57
50
|
latest_seq: number;
|
|
58
|
-
next_after_seq: number;
|
|
51
|
+
next_after_seq: number | null;
|
|
59
52
|
has_more: boolean;
|
|
60
53
|
}
|
|
61
54
|
/** Single event from seq-based polling */
|
|
@@ -214,15 +207,19 @@ export declare class RunsModule {
|
|
|
214
207
|
reason?: string;
|
|
215
208
|
}): Promise<APIResponse<CreateRunResponse>>;
|
|
216
209
|
/**
|
|
217
|
-
* Get run events
|
|
218
|
-
* @example
|
|
219
|
-
* ```ts
|
|
220
|
-
* const { data } = await client.runs.getEvents("run-uuid");
|
|
221
|
-
* ```
|
|
210
|
+
* Get canonical run events from SSOT ledger (polling by seq).
|
|
222
211
|
*/
|
|
223
|
-
getEvents(runId: string, params
|
|
212
|
+
getEvents(runId: string, params: {
|
|
213
|
+
attemptId: string;
|
|
214
|
+
afterSeq?: number;
|
|
215
|
+
limit?: number;
|
|
216
|
+
}): Promise<APIResponse<RunEventsPollResponse>>;
|
|
224
217
|
/** Alias: runs.events() -> runs.getEvents() */
|
|
225
|
-
events: (runId: string, params
|
|
218
|
+
events: (runId: string, params: {
|
|
219
|
+
attemptId: string;
|
|
220
|
+
afterSeq?: number;
|
|
221
|
+
limit?: number;
|
|
222
|
+
}) => Promise<APIResponse<RunEventsPollResponse>>;
|
|
226
223
|
/**
|
|
227
224
|
* Wave 2.3: Seq-based event polling for execution trace.
|
|
228
225
|
* Use this for incremental polling with reconnection support.
|
|
@@ -234,8 +231,9 @@ export declare class RunsModule {
|
|
|
234
231
|
* @example
|
|
235
232
|
* ```ts
|
|
236
233
|
* let afterSeq = 0;
|
|
234
|
+
* const attemptId = "attempt-uuid";
|
|
237
235
|
* while (run.status === 'running') {
|
|
238
|
-
* const { data } = await client.runs.pollEvents(runId, { afterSeq });
|
|
236
|
+
* const { data } = await client.runs.pollEvents(runId, { attemptId, afterSeq });
|
|
239
237
|
* for (const event of data.events) {
|
|
240
238
|
* console.log(event.type, event.payload);
|
|
241
239
|
* }
|
|
@@ -244,7 +242,8 @@ export declare class RunsModule {
|
|
|
244
242
|
* }
|
|
245
243
|
* ```
|
|
246
244
|
*/
|
|
247
|
-
pollEvents(runId: string, params
|
|
245
|
+
pollEvents(runId: string, params: {
|
|
246
|
+
attemptId: string;
|
|
248
247
|
afterSeq?: number;
|
|
249
248
|
limit?: number;
|
|
250
249
|
}): Promise<APIResponse<RunEventsPollResponse>>;
|
|
@@ -259,26 +258,27 @@ export declare class RunsModule {
|
|
|
259
258
|
checkpoints?: components["schemas"]["CheckpointNode"][] | null;
|
|
260
259
|
}>>;
|
|
261
260
|
/**
|
|
262
|
-
*
|
|
261
|
+
* Follow a run attempt's canonical event stream with automatic reconnection.
|
|
262
|
+
*
|
|
263
|
+
* SSOT contract:
|
|
264
|
+
* - Stream is keyed by (run_id, attempt_id, seq)
|
|
265
|
+
* - Resume is driven by `afterSeq` (monotonic)
|
|
266
|
+
* - No implicit attempt inference
|
|
267
|
+
*
|
|
263
268
|
* @example
|
|
264
269
|
* ```ts
|
|
265
|
-
* for await (const event of client.runs.
|
|
266
|
-
*
|
|
270
|
+
* for await (const event of client.runs.follow(runId, attemptId)) {
|
|
271
|
+
* if (event.type === "run_event") {
|
|
272
|
+
* console.log(event.payload);
|
|
273
|
+
* } else if (event.type === "close") {
|
|
274
|
+
* console.log("Run completed");
|
|
275
|
+
* }
|
|
267
276
|
* }
|
|
268
277
|
* ```
|
|
269
278
|
*/
|
|
270
|
-
|
|
279
|
+
follow(runId: string, attemptId: string, options?: FollowOptions): AsyncGenerator<FollowEvent, void, unknown>;
|
|
271
280
|
/**
|
|
272
|
-
* Create run and stream
|
|
273
|
-
* @example
|
|
274
|
-
* ```ts
|
|
275
|
-
* for await (const event of client.runs.createAndStream({
|
|
276
|
-
* agent_id: "...",
|
|
277
|
-
* input: { message: "Hello" }
|
|
278
|
-
* })) {
|
|
279
|
-
* console.log(event);
|
|
280
|
-
* }
|
|
281
|
-
* ```
|
|
281
|
+
* Create run and follow canonical SSOT stream for the current attempt.
|
|
282
282
|
*/
|
|
283
283
|
createAndStream(body: {
|
|
284
284
|
agent_id: string;
|
|
@@ -288,49 +288,26 @@ export declare class RunsModule {
|
|
|
288
288
|
new_thread: true;
|
|
289
289
|
};
|
|
290
290
|
input?: unknown;
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
*/
|
|
295
|
-
join(runId: string, options?: SSEOptions): AsyncGenerator<SSEEvent<RunStreamEvent>>;
|
|
296
|
-
/**
|
|
297
|
-
* Follow a run's event stream with automatic reconnection and resume.
|
|
298
|
-
*
|
|
299
|
-
* This is the enterprise-grade streaming method that:
|
|
300
|
-
* - Reconnects automatically on connection drops
|
|
301
|
-
* - Resumes from last received event using Last-Event-ID
|
|
302
|
-
* - Never duplicates or loses events
|
|
303
|
-
* - Terminates cleanly on 'close' event
|
|
304
|
-
*
|
|
305
|
-
* @example
|
|
306
|
-
* ```ts
|
|
307
|
-
* for await (const event of client.runs.follow(runId)) {
|
|
308
|
-
* if (event.type === "run_event") {
|
|
309
|
-
* console.log(event.payload);
|
|
310
|
-
* } else if (event.type === "close") {
|
|
311
|
-
* console.log("Run completed");
|
|
312
|
-
* }
|
|
313
|
-
* }
|
|
314
|
-
* ```
|
|
315
|
-
*/
|
|
316
|
-
follow(runId: string, options?: FollowOptions): AsyncGenerator<FollowEvent, void, unknown>;
|
|
291
|
+
/** Idempotency key for safe retries. */
|
|
292
|
+
idempotency_key?: string;
|
|
293
|
+
}, options?: FollowOptions): AsyncGenerator<FollowEvent, void, unknown>;
|
|
317
294
|
/**
|
|
318
295
|
* Wait for a specific event that matches a predicate.
|
|
319
296
|
*
|
|
320
297
|
* @example
|
|
321
298
|
* ```ts
|
|
322
299
|
* // Wait for run completion
|
|
323
|
-
* const event = await client.runs.waitFor(runId, (e) => e.type === "close", {
|
|
300
|
+
* const event = await client.runs.waitFor(runId, attemptId, (e) => e.type === "close", {
|
|
324
301
|
* timeoutMs: 60000
|
|
325
302
|
* });
|
|
326
303
|
*
|
|
327
304
|
* // Wait for specific node execution
|
|
328
|
-
* const nodeEvent = await client.runs.waitFor(runId, (e) =>
|
|
305
|
+
* const nodeEvent = await client.runs.waitFor(runId, attemptId, (e) =>
|
|
329
306
|
* e.type === "run_event" && e.payload?.node === "my_node"
|
|
330
307
|
* );
|
|
331
308
|
* ```
|
|
332
309
|
*/
|
|
333
|
-
waitFor(runId: string, predicate: (event: FollowEvent) => boolean, options?: {
|
|
310
|
+
waitFor(runId: string, attemptId: string, predicate: (event: FollowEvent) => boolean, options?: {
|
|
334
311
|
timeoutMs?: number;
|
|
335
312
|
signal?: AbortSignal;
|
|
336
313
|
startSeq?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/modules/runs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAA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