@akumi/sdk 0.7.0 → 0.7.2
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 +39 -12
- package/dist/index.d.cts +16 -11
- package/dist/index.d.ts +16 -11
- package/dist/index.js +38 -12
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
AgentsResource: () => AgentsResource,
|
|
23
24
|
Akumi: () => Akumi,
|
|
24
25
|
AkumiError: () => AkumiError,
|
|
25
26
|
ApiError: () => ApiError,
|
|
@@ -221,6 +222,41 @@ function safeJsonParse(text) {
|
|
|
221
222
|
}
|
|
222
223
|
}
|
|
223
224
|
|
|
225
|
+
// src/resources/agents.ts
|
|
226
|
+
var AgentsResource = class {
|
|
227
|
+
constructor(transport) {
|
|
228
|
+
this.transport = transport;
|
|
229
|
+
}
|
|
230
|
+
transport;
|
|
231
|
+
async v1AgentsIndex() {
|
|
232
|
+
return this.transport.request("GET", "/agents", null, null);
|
|
233
|
+
}
|
|
234
|
+
async v1AgentsStore(params = {}) {
|
|
235
|
+
return this.transport.request("POST", "/agents", null, params);
|
|
236
|
+
}
|
|
237
|
+
async v1AgentsRunsShow(run) {
|
|
238
|
+
return this.transport.request("GET", `/agents/runs/${run}`, null, null);
|
|
239
|
+
}
|
|
240
|
+
async v1AgentsShow(agent) {
|
|
241
|
+
return this.transport.request("GET", `/agents/${agent}`, null, null);
|
|
242
|
+
}
|
|
243
|
+
async v1AgentsUpdate(agent, params = {}) {
|
|
244
|
+
return this.transport.request("PATCH", `/agents/${agent}`, null, params);
|
|
245
|
+
}
|
|
246
|
+
async v1AgentsVersionsIndex(agent) {
|
|
247
|
+
return this.transport.request("GET", `/agents/${agent}/versions`, null, null);
|
|
248
|
+
}
|
|
249
|
+
async v1AgentsVersionsStore(agent, params = {}) {
|
|
250
|
+
return this.transport.request("POST", `/agents/${agent}/versions`, null, params);
|
|
251
|
+
}
|
|
252
|
+
async v1AgentsVersionsShow(agent, version) {
|
|
253
|
+
return this.transport.request("GET", `/agents/${agent}/versions/${version}`, null, null);
|
|
254
|
+
}
|
|
255
|
+
async v1AgentsRunsStore(agent, params = {}) {
|
|
256
|
+
return this.transport.request("POST", `/agents/${agent}/runs`, null, params);
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
|
|
224
260
|
// src/resources/auditLog.ts
|
|
225
261
|
var AuditLogResource = class {
|
|
226
262
|
constructor(transport) {
|
|
@@ -266,18 +302,6 @@ var MemoryResource = class {
|
|
|
266
302
|
this.transport = transport;
|
|
267
303
|
}
|
|
268
304
|
transport;
|
|
269
|
-
async listThreads(query = {}) {
|
|
270
|
-
return this.transport.request("GET", "/memory/threads", query, null);
|
|
271
|
-
}
|
|
272
|
-
async createThread() {
|
|
273
|
-
return this.transport.request("POST", "/memory/threads", null, null);
|
|
274
|
-
}
|
|
275
|
-
async getThread(thread) {
|
|
276
|
-
return this.transport.request("GET", `/memory/threads/${thread}`, null, null);
|
|
277
|
-
}
|
|
278
|
-
async deleteThread(thread) {
|
|
279
|
-
return this.transport.request("DELETE", `/memory/threads/${thread}`, null, null);
|
|
280
|
-
}
|
|
281
305
|
async search(params = {}) {
|
|
282
306
|
return this.transport.request("POST", "/memory/search", null, params);
|
|
283
307
|
}
|
|
@@ -350,6 +374,7 @@ var ScoresResource = class {
|
|
|
350
374
|
// src/client.ts
|
|
351
375
|
var Akumi = class _Akumi {
|
|
352
376
|
transport;
|
|
377
|
+
agents;
|
|
353
378
|
auditLog;
|
|
354
379
|
chatCompletions;
|
|
355
380
|
embeddings;
|
|
@@ -358,6 +383,7 @@ var Akumi = class _Akumi {
|
|
|
358
383
|
scores;
|
|
359
384
|
constructor(config) {
|
|
360
385
|
this.transport = new Transport(config);
|
|
386
|
+
this.agents = new AgentsResource(this.transport);
|
|
361
387
|
this.auditLog = new AuditLogResource(this.transport);
|
|
362
388
|
this.chatCompletions = new ChatCompletionsResource(this.transport);
|
|
363
389
|
this.embeddings = new EmbeddingsResource(this.transport);
|
|
@@ -371,6 +397,7 @@ var Akumi = class _Akumi {
|
|
|
371
397
|
};
|
|
372
398
|
// Annotate the CommonJS export names for ESM import in node:
|
|
373
399
|
0 && (module.exports = {
|
|
400
|
+
AgentsResource,
|
|
374
401
|
Akumi,
|
|
375
402
|
AkumiError,
|
|
376
403
|
ApiError,
|
package/dist/index.d.cts
CHANGED
|
@@ -18,6 +18,20 @@ declare class Transport {
|
|
|
18
18
|
private dispatch;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
declare class AgentsResource {
|
|
22
|
+
private readonly transport;
|
|
23
|
+
constructor(transport: Transport);
|
|
24
|
+
v1AgentsIndex(): Promise<Record<string, unknown>>;
|
|
25
|
+
v1AgentsStore(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
26
|
+
v1AgentsRunsShow(run: string): Promise<Record<string, unknown>>;
|
|
27
|
+
v1AgentsShow(agent: string): Promise<Record<string, unknown>>;
|
|
28
|
+
v1AgentsUpdate(agent: string, params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
29
|
+
v1AgentsVersionsIndex(agent: string): Promise<Record<string, unknown>>;
|
|
30
|
+
v1AgentsVersionsStore(agent: string, params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
31
|
+
v1AgentsVersionsShow(agent: string, version: string): Promise<Record<string, unknown>>;
|
|
32
|
+
v1AgentsRunsStore(agent: string, params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
33
|
+
}
|
|
34
|
+
|
|
21
35
|
declare class AuditLogResource {
|
|
22
36
|
private readonly transport;
|
|
23
37
|
constructor(transport: Transport);
|
|
@@ -41,10 +55,6 @@ declare class EmbeddingsResource {
|
|
|
41
55
|
declare class MemoryResource {
|
|
42
56
|
private readonly transport;
|
|
43
57
|
constructor(transport: Transport);
|
|
44
|
-
listThreads(query?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
45
|
-
createThread(): Promise<Record<string, unknown>>;
|
|
46
|
-
getThread(thread: string): Promise<Record<string, unknown>>;
|
|
47
|
-
deleteThread(thread: string): Promise<Record<string, unknown>>;
|
|
48
58
|
search(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
49
59
|
listFacts(query?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
50
60
|
rememberFact(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
@@ -76,6 +86,7 @@ declare class ScoresResource {
|
|
|
76
86
|
|
|
77
87
|
declare class Akumi {
|
|
78
88
|
private readonly transport;
|
|
89
|
+
readonly agents: AgentsResource;
|
|
79
90
|
readonly auditLog: AuditLogResource;
|
|
80
91
|
readonly chatCompletions: ChatCompletionsResource;
|
|
81
92
|
readonly embeddings: EmbeddingsResource;
|
|
@@ -188,10 +199,4 @@ interface StoreScoreRequest {
|
|
|
188
199
|
comment?: string | null;
|
|
189
200
|
}
|
|
190
201
|
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
interface ThreadViewModel {
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export { Akumi, AkumiError, ApiError, type AuditLogApiResource, AuditLogResource, AuthenticationError, type ChatCompletionsRequest, ChatCompletionsResource, type ClientConfig, type EmbeddingsRequest, EmbeddingsResource, type IngestDocumentRequest, InvalidRequestError, MemoryResource, ModelsResource, type PiiLanguage, RateLimitError, type RememberFactRequest, ScoresResource, type SearchRequest, type StoreCollectionRequest, type StoreScoreRequest, type ThreadMessageViewModel, type ThreadViewModel };
|
|
202
|
+
export { AgentsResource, Akumi, AkumiError, ApiError, type AuditLogApiResource, AuditLogResource, AuthenticationError, type ChatCompletionsRequest, ChatCompletionsResource, type ClientConfig, type EmbeddingsRequest, EmbeddingsResource, type IngestDocumentRequest, InvalidRequestError, MemoryResource, ModelsResource, type PiiLanguage, RateLimitError, type RememberFactRequest, ScoresResource, type SearchRequest, type StoreCollectionRequest, type StoreScoreRequest };
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,20 @@ declare class Transport {
|
|
|
18
18
|
private dispatch;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
declare class AgentsResource {
|
|
22
|
+
private readonly transport;
|
|
23
|
+
constructor(transport: Transport);
|
|
24
|
+
v1AgentsIndex(): Promise<Record<string, unknown>>;
|
|
25
|
+
v1AgentsStore(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
26
|
+
v1AgentsRunsShow(run: string): Promise<Record<string, unknown>>;
|
|
27
|
+
v1AgentsShow(agent: string): Promise<Record<string, unknown>>;
|
|
28
|
+
v1AgentsUpdate(agent: string, params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
29
|
+
v1AgentsVersionsIndex(agent: string): Promise<Record<string, unknown>>;
|
|
30
|
+
v1AgentsVersionsStore(agent: string, params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
31
|
+
v1AgentsVersionsShow(agent: string, version: string): Promise<Record<string, unknown>>;
|
|
32
|
+
v1AgentsRunsStore(agent: string, params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
33
|
+
}
|
|
34
|
+
|
|
21
35
|
declare class AuditLogResource {
|
|
22
36
|
private readonly transport;
|
|
23
37
|
constructor(transport: Transport);
|
|
@@ -41,10 +55,6 @@ declare class EmbeddingsResource {
|
|
|
41
55
|
declare class MemoryResource {
|
|
42
56
|
private readonly transport;
|
|
43
57
|
constructor(transport: Transport);
|
|
44
|
-
listThreads(query?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
45
|
-
createThread(): Promise<Record<string, unknown>>;
|
|
46
|
-
getThread(thread: string): Promise<Record<string, unknown>>;
|
|
47
|
-
deleteThread(thread: string): Promise<Record<string, unknown>>;
|
|
48
58
|
search(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
49
59
|
listFacts(query?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
50
60
|
rememberFact(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
@@ -76,6 +86,7 @@ declare class ScoresResource {
|
|
|
76
86
|
|
|
77
87
|
declare class Akumi {
|
|
78
88
|
private readonly transport;
|
|
89
|
+
readonly agents: AgentsResource;
|
|
79
90
|
readonly auditLog: AuditLogResource;
|
|
80
91
|
readonly chatCompletions: ChatCompletionsResource;
|
|
81
92
|
readonly embeddings: EmbeddingsResource;
|
|
@@ -188,10 +199,4 @@ interface StoreScoreRequest {
|
|
|
188
199
|
comment?: string | null;
|
|
189
200
|
}
|
|
190
201
|
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
interface ThreadViewModel {
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export { Akumi, AkumiError, ApiError, type AuditLogApiResource, AuditLogResource, AuthenticationError, type ChatCompletionsRequest, ChatCompletionsResource, type ClientConfig, type EmbeddingsRequest, EmbeddingsResource, type IngestDocumentRequest, InvalidRequestError, MemoryResource, ModelsResource, type PiiLanguage, RateLimitError, type RememberFactRequest, ScoresResource, type SearchRequest, type StoreCollectionRequest, type StoreScoreRequest, type ThreadMessageViewModel, type ThreadViewModel };
|
|
202
|
+
export { AgentsResource, Akumi, AkumiError, ApiError, type AuditLogApiResource, AuditLogResource, AuthenticationError, type ChatCompletionsRequest, ChatCompletionsResource, type ClientConfig, type EmbeddingsRequest, EmbeddingsResource, type IngestDocumentRequest, InvalidRequestError, MemoryResource, ModelsResource, type PiiLanguage, RateLimitError, type RememberFactRequest, ScoresResource, type SearchRequest, type StoreCollectionRequest, type StoreScoreRequest };
|
package/dist/index.js
CHANGED
|
@@ -184,6 +184,41 @@ function safeJsonParse(text) {
|
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
+
// src/resources/agents.ts
|
|
188
|
+
var AgentsResource = class {
|
|
189
|
+
constructor(transport) {
|
|
190
|
+
this.transport = transport;
|
|
191
|
+
}
|
|
192
|
+
transport;
|
|
193
|
+
async v1AgentsIndex() {
|
|
194
|
+
return this.transport.request("GET", "/agents", null, null);
|
|
195
|
+
}
|
|
196
|
+
async v1AgentsStore(params = {}) {
|
|
197
|
+
return this.transport.request("POST", "/agents", null, params);
|
|
198
|
+
}
|
|
199
|
+
async v1AgentsRunsShow(run) {
|
|
200
|
+
return this.transport.request("GET", `/agents/runs/${run}`, null, null);
|
|
201
|
+
}
|
|
202
|
+
async v1AgentsShow(agent) {
|
|
203
|
+
return this.transport.request("GET", `/agents/${agent}`, null, null);
|
|
204
|
+
}
|
|
205
|
+
async v1AgentsUpdate(agent, params = {}) {
|
|
206
|
+
return this.transport.request("PATCH", `/agents/${agent}`, null, params);
|
|
207
|
+
}
|
|
208
|
+
async v1AgentsVersionsIndex(agent) {
|
|
209
|
+
return this.transport.request("GET", `/agents/${agent}/versions`, null, null);
|
|
210
|
+
}
|
|
211
|
+
async v1AgentsVersionsStore(agent, params = {}) {
|
|
212
|
+
return this.transport.request("POST", `/agents/${agent}/versions`, null, params);
|
|
213
|
+
}
|
|
214
|
+
async v1AgentsVersionsShow(agent, version) {
|
|
215
|
+
return this.transport.request("GET", `/agents/${agent}/versions/${version}`, null, null);
|
|
216
|
+
}
|
|
217
|
+
async v1AgentsRunsStore(agent, params = {}) {
|
|
218
|
+
return this.transport.request("POST", `/agents/${agent}/runs`, null, params);
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
|
|
187
222
|
// src/resources/auditLog.ts
|
|
188
223
|
var AuditLogResource = class {
|
|
189
224
|
constructor(transport) {
|
|
@@ -229,18 +264,6 @@ var MemoryResource = class {
|
|
|
229
264
|
this.transport = transport;
|
|
230
265
|
}
|
|
231
266
|
transport;
|
|
232
|
-
async listThreads(query = {}) {
|
|
233
|
-
return this.transport.request("GET", "/memory/threads", query, null);
|
|
234
|
-
}
|
|
235
|
-
async createThread() {
|
|
236
|
-
return this.transport.request("POST", "/memory/threads", null, null);
|
|
237
|
-
}
|
|
238
|
-
async getThread(thread) {
|
|
239
|
-
return this.transport.request("GET", `/memory/threads/${thread}`, null, null);
|
|
240
|
-
}
|
|
241
|
-
async deleteThread(thread) {
|
|
242
|
-
return this.transport.request("DELETE", `/memory/threads/${thread}`, null, null);
|
|
243
|
-
}
|
|
244
267
|
async search(params = {}) {
|
|
245
268
|
return this.transport.request("POST", "/memory/search", null, params);
|
|
246
269
|
}
|
|
@@ -313,6 +336,7 @@ var ScoresResource = class {
|
|
|
313
336
|
// src/client.ts
|
|
314
337
|
var Akumi = class _Akumi {
|
|
315
338
|
transport;
|
|
339
|
+
agents;
|
|
316
340
|
auditLog;
|
|
317
341
|
chatCompletions;
|
|
318
342
|
embeddings;
|
|
@@ -321,6 +345,7 @@ var Akumi = class _Akumi {
|
|
|
321
345
|
scores;
|
|
322
346
|
constructor(config) {
|
|
323
347
|
this.transport = new Transport(config);
|
|
348
|
+
this.agents = new AgentsResource(this.transport);
|
|
324
349
|
this.auditLog = new AuditLogResource(this.transport);
|
|
325
350
|
this.chatCompletions = new ChatCompletionsResource(this.transport);
|
|
326
351
|
this.embeddings = new EmbeddingsResource(this.transport);
|
|
@@ -333,6 +358,7 @@ var Akumi = class _Akumi {
|
|
|
333
358
|
}
|
|
334
359
|
};
|
|
335
360
|
export {
|
|
361
|
+
AgentsResource,
|
|
336
362
|
Akumi,
|
|
337
363
|
AkumiError,
|
|
338
364
|
ApiError,
|