@actwith-ai/sdk 0.3.0 → 0.3.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.d.mts +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +12 -1
- package/dist/index.mjs +12 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -44,6 +44,7 @@ interface Task {
|
|
|
44
44
|
claimedBy: string | null;
|
|
45
45
|
claimedByName: string | null;
|
|
46
46
|
response: string | null;
|
|
47
|
+
workContextId: string | null;
|
|
47
48
|
createdAt: number;
|
|
48
49
|
completedAt: number | null;
|
|
49
50
|
}
|
|
@@ -51,6 +52,7 @@ interface CreateTaskOptions {
|
|
|
51
52
|
contextId: string;
|
|
52
53
|
description: string;
|
|
53
54
|
bounty?: number;
|
|
55
|
+
workContextId?: string;
|
|
54
56
|
}
|
|
55
57
|
interface Memory {
|
|
56
58
|
key: string;
|
|
@@ -404,7 +406,7 @@ declare class ActwithClient {
|
|
|
404
406
|
taskCreate(options: CreateTaskOptions): Promise<{
|
|
405
407
|
id: string;
|
|
406
408
|
}>;
|
|
407
|
-
taskList(contextId: string, status?: "open" | "claimed" | "completed" | "pending_review" | "rejected"): Promise<Task[]>;
|
|
409
|
+
taskList(contextId: string, status?: "open" | "claimed" | "completed" | "pending_review" | "rejected", workContextId?: string): Promise<Task[]>;
|
|
408
410
|
taskGet(taskId: string): Promise<Task | null>;
|
|
409
411
|
taskClaim(taskId: string, agentId: string): Promise<void>;
|
|
410
412
|
taskComplete(taskId: string, response: string, artifact?: {
|
|
@@ -504,6 +506,15 @@ declare class ActwithClient {
|
|
|
504
506
|
limit?: number;
|
|
505
507
|
offset?: number;
|
|
506
508
|
}): Promise<PublicTopic[]>;
|
|
509
|
+
createPublicTopic(options: {
|
|
510
|
+
name: string;
|
|
511
|
+
slug?: string;
|
|
512
|
+
description?: string;
|
|
513
|
+
body?: string;
|
|
514
|
+
category?: string;
|
|
515
|
+
tags?: string[];
|
|
516
|
+
writeMode?: "open" | "subscribers" | "owner";
|
|
517
|
+
}): Promise<PublicTopic>;
|
|
507
518
|
getPublicTopic(slugOrId: string): Promise<{
|
|
508
519
|
id: string;
|
|
509
520
|
slug: string;
|
|
@@ -534,6 +545,22 @@ declare class ActwithClient {
|
|
|
534
545
|
messageId: string;
|
|
535
546
|
timestamp: number;
|
|
536
547
|
}>;
|
|
548
|
+
promoteTopicToSpace(topicId: string, options?: {
|
|
549
|
+
name?: string;
|
|
550
|
+
description?: string;
|
|
551
|
+
visibility?: string;
|
|
552
|
+
joinMode?: string;
|
|
553
|
+
}): Promise<{
|
|
554
|
+
id: string;
|
|
555
|
+
name: string;
|
|
556
|
+
description: string | null;
|
|
557
|
+
visibility: string;
|
|
558
|
+
joinMode: string;
|
|
559
|
+
memberCount: number;
|
|
560
|
+
agentCount: number;
|
|
561
|
+
sourceTopicId: string;
|
|
562
|
+
createdAt: number;
|
|
563
|
+
}>;
|
|
537
564
|
agentsList(contextId: string): Promise<Agent[]>;
|
|
538
565
|
contextsList(spaceId: string, status?: "active" | "completed" | "archived"): Promise<Array<{
|
|
539
566
|
id: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ interface Task {
|
|
|
44
44
|
claimedBy: string | null;
|
|
45
45
|
claimedByName: string | null;
|
|
46
46
|
response: string | null;
|
|
47
|
+
workContextId: string | null;
|
|
47
48
|
createdAt: number;
|
|
48
49
|
completedAt: number | null;
|
|
49
50
|
}
|
|
@@ -51,6 +52,7 @@ interface CreateTaskOptions {
|
|
|
51
52
|
contextId: string;
|
|
52
53
|
description: string;
|
|
53
54
|
bounty?: number;
|
|
55
|
+
workContextId?: string;
|
|
54
56
|
}
|
|
55
57
|
interface Memory {
|
|
56
58
|
key: string;
|
|
@@ -404,7 +406,7 @@ declare class ActwithClient {
|
|
|
404
406
|
taskCreate(options: CreateTaskOptions): Promise<{
|
|
405
407
|
id: string;
|
|
406
408
|
}>;
|
|
407
|
-
taskList(contextId: string, status?: "open" | "claimed" | "completed" | "pending_review" | "rejected"): Promise<Task[]>;
|
|
409
|
+
taskList(contextId: string, status?: "open" | "claimed" | "completed" | "pending_review" | "rejected", workContextId?: string): Promise<Task[]>;
|
|
408
410
|
taskGet(taskId: string): Promise<Task | null>;
|
|
409
411
|
taskClaim(taskId: string, agentId: string): Promise<void>;
|
|
410
412
|
taskComplete(taskId: string, response: string, artifact?: {
|
|
@@ -504,6 +506,15 @@ declare class ActwithClient {
|
|
|
504
506
|
limit?: number;
|
|
505
507
|
offset?: number;
|
|
506
508
|
}): Promise<PublicTopic[]>;
|
|
509
|
+
createPublicTopic(options: {
|
|
510
|
+
name: string;
|
|
511
|
+
slug?: string;
|
|
512
|
+
description?: string;
|
|
513
|
+
body?: string;
|
|
514
|
+
category?: string;
|
|
515
|
+
tags?: string[];
|
|
516
|
+
writeMode?: "open" | "subscribers" | "owner";
|
|
517
|
+
}): Promise<PublicTopic>;
|
|
507
518
|
getPublicTopic(slugOrId: string): Promise<{
|
|
508
519
|
id: string;
|
|
509
520
|
slug: string;
|
|
@@ -534,6 +545,22 @@ declare class ActwithClient {
|
|
|
534
545
|
messageId: string;
|
|
535
546
|
timestamp: number;
|
|
536
547
|
}>;
|
|
548
|
+
promoteTopicToSpace(topicId: string, options?: {
|
|
549
|
+
name?: string;
|
|
550
|
+
description?: string;
|
|
551
|
+
visibility?: string;
|
|
552
|
+
joinMode?: string;
|
|
553
|
+
}): Promise<{
|
|
554
|
+
id: string;
|
|
555
|
+
name: string;
|
|
556
|
+
description: string | null;
|
|
557
|
+
visibility: string;
|
|
558
|
+
joinMode: string;
|
|
559
|
+
memberCount: number;
|
|
560
|
+
agentCount: number;
|
|
561
|
+
sourceTopicId: string;
|
|
562
|
+
createdAt: number;
|
|
563
|
+
}>;
|
|
537
564
|
agentsList(contextId: string): Promise<Agent[]>;
|
|
538
565
|
contextsList(spaceId: string, status?: "active" | "completed" | "archived"): Promise<Array<{
|
|
539
566
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -123,9 +123,10 @@ var ActwithClient = class {
|
|
|
123
123
|
async taskCreate(options) {
|
|
124
124
|
return this.request("POST", "/v1/tasks", options);
|
|
125
125
|
}
|
|
126
|
-
async taskList(contextId, status) {
|
|
126
|
+
async taskList(contextId, status, workContextId) {
|
|
127
127
|
const params = new URLSearchParams({ context: contextId });
|
|
128
128
|
if (status) params.set("status", status);
|
|
129
|
+
if (workContextId) params.set("workContextId", workContextId);
|
|
129
130
|
return this.request("GET", `/v1/tasks?${params}`);
|
|
130
131
|
}
|
|
131
132
|
async taskGet(taskId) {
|
|
@@ -305,6 +306,9 @@ var ActwithClient = class {
|
|
|
305
306
|
if (options?.offset) params.set("offset", String(options.offset));
|
|
306
307
|
return this.request("GET", `/v1/directory/topics?${params}`);
|
|
307
308
|
}
|
|
309
|
+
async createPublicTopic(options) {
|
|
310
|
+
return this.request("POST", `/v1/topics`, options);
|
|
311
|
+
}
|
|
308
312
|
async getPublicTopic(slugOrId) {
|
|
309
313
|
try {
|
|
310
314
|
return await this.request("GET", `/v1/directory/topics/${slugOrId}`);
|
|
@@ -335,6 +339,13 @@ var ActwithClient = class {
|
|
|
335
339
|
metadata
|
|
336
340
|
});
|
|
337
341
|
}
|
|
342
|
+
async promoteTopicToSpace(topicId, options) {
|
|
343
|
+
return this.request(
|
|
344
|
+
"POST",
|
|
345
|
+
`/v1/topics/${topicId}/promote`,
|
|
346
|
+
options || {}
|
|
347
|
+
);
|
|
348
|
+
}
|
|
338
349
|
// ============================================================================
|
|
339
350
|
// Agents
|
|
340
351
|
// ============================================================================
|
package/dist/index.mjs
CHANGED
|
@@ -96,9 +96,10 @@ var ActwithClient = class {
|
|
|
96
96
|
async taskCreate(options) {
|
|
97
97
|
return this.request("POST", "/v1/tasks", options);
|
|
98
98
|
}
|
|
99
|
-
async taskList(contextId, status) {
|
|
99
|
+
async taskList(contextId, status, workContextId) {
|
|
100
100
|
const params = new URLSearchParams({ context: contextId });
|
|
101
101
|
if (status) params.set("status", status);
|
|
102
|
+
if (workContextId) params.set("workContextId", workContextId);
|
|
102
103
|
return this.request("GET", `/v1/tasks?${params}`);
|
|
103
104
|
}
|
|
104
105
|
async taskGet(taskId) {
|
|
@@ -278,6 +279,9 @@ var ActwithClient = class {
|
|
|
278
279
|
if (options?.offset) params.set("offset", String(options.offset));
|
|
279
280
|
return this.request("GET", `/v1/directory/topics?${params}`);
|
|
280
281
|
}
|
|
282
|
+
async createPublicTopic(options) {
|
|
283
|
+
return this.request("POST", `/v1/topics`, options);
|
|
284
|
+
}
|
|
281
285
|
async getPublicTopic(slugOrId) {
|
|
282
286
|
try {
|
|
283
287
|
return await this.request("GET", `/v1/directory/topics/${slugOrId}`);
|
|
@@ -308,6 +312,13 @@ var ActwithClient = class {
|
|
|
308
312
|
metadata
|
|
309
313
|
});
|
|
310
314
|
}
|
|
315
|
+
async promoteTopicToSpace(topicId, options) {
|
|
316
|
+
return this.request(
|
|
317
|
+
"POST",
|
|
318
|
+
`/v1/topics/${topicId}/promote`,
|
|
319
|
+
options || {}
|
|
320
|
+
);
|
|
321
|
+
}
|
|
311
322
|
// ============================================================================
|
|
312
323
|
// Agents
|
|
313
324
|
// ============================================================================
|
package/package.json
CHANGED