@taico/client 0.8.0 → 0.8.1
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 +1 -1
- package/dist/contracts/types.d.ts +153 -4
- package/dist/src/v1/client/index.d.ts +2 -0
- package/dist/src/v1/client/index.js +1 -0
- package/dist/src/v1/client/models/AiModelSelectionResponseDto.d.ts +2 -1
- package/dist/src/v1/client/models/AiModelSelectionResponseDto.js +2 -1
- package/dist/src/v1/client/models/ThreadResponseDto.d.ts +5 -0
- package/dist/src/v1/client/models/ThreadTimerKind.d.ts +7 -0
- package/dist/src/v1/client/models/ThreadTimerKind.js +12 -0
- package/dist/src/v1/client/models/ThreadTimerResponseDto.d.ts +35 -0
- package/dist/src/v1/client/models/ThreadTimerResponseDto.js +1 -0
- package/dist/src/v1/client/services/AiModelSelectionsService.d.ts +2 -2
- package/dist/src/v1/client/services/ThreadsService.d.ts +18 -0
- package/dist/src/v1/client/services/ThreadsService.js +42 -0
- package/dist/src/v2/ai-model-selections-resource.d.ts +2 -2
- package/dist/src/v2/threads-resource.d.ts +12 -0
- package/dist/src/v2/threads-resource.js +8 -0
- package/dist/src/v2/types.d.ts +13 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# @taico/client
|
|
2
2
|
|
|
3
|
-
[](https://badge.socket.dev/npm/package/@taico/client/0.8.1)
|
|
@@ -1403,6 +1403,46 @@ export interface paths {
|
|
|
1403
1403
|
patch?: never;
|
|
1404
1404
|
trace?: never;
|
|
1405
1405
|
};
|
|
1406
|
+
"/api/v1/threads/{id}/timers/{timerId}": {
|
|
1407
|
+
parameters: {
|
|
1408
|
+
query?: never;
|
|
1409
|
+
header?: never;
|
|
1410
|
+
path?: never;
|
|
1411
|
+
cookie?: never;
|
|
1412
|
+
};
|
|
1413
|
+
get?: never;
|
|
1414
|
+
put?: never;
|
|
1415
|
+
post?: never;
|
|
1416
|
+
/**
|
|
1417
|
+
* Cancel a reminder or schedule of the threads agent
|
|
1418
|
+
* @description Idempotent: cancelling a timer that already finished or was cancelled succeeds.
|
|
1419
|
+
*/
|
|
1420
|
+
delete: operations["ThreadsController_cancelTimer"];
|
|
1421
|
+
options?: never;
|
|
1422
|
+
head?: never;
|
|
1423
|
+
patch?: never;
|
|
1424
|
+
trace?: never;
|
|
1425
|
+
};
|
|
1426
|
+
"/api/v1/threads/{id}/task-subscriptions/{taskId}": {
|
|
1427
|
+
parameters: {
|
|
1428
|
+
query?: never;
|
|
1429
|
+
header?: never;
|
|
1430
|
+
path?: never;
|
|
1431
|
+
cookie?: never;
|
|
1432
|
+
};
|
|
1433
|
+
get?: never;
|
|
1434
|
+
put?: never;
|
|
1435
|
+
post?: never;
|
|
1436
|
+
/**
|
|
1437
|
+
* Stop the threads agent watching a task
|
|
1438
|
+
* @description Idempotent: removing a watch that does not exist succeeds.
|
|
1439
|
+
*/
|
|
1440
|
+
delete: operations["ThreadsController_removeTaskSubscription"];
|
|
1441
|
+
options?: never;
|
|
1442
|
+
head?: never;
|
|
1443
|
+
patch?: never;
|
|
1444
|
+
trace?: never;
|
|
1445
|
+
};
|
|
1406
1446
|
"/api/v1/threads/{id}/context-blocks": {
|
|
1407
1447
|
parameters: {
|
|
1408
1448
|
query?: never;
|
|
@@ -3917,7 +3957,7 @@ export interface components {
|
|
|
3917
3957
|
* @example conversation
|
|
3918
3958
|
* @enum {string}
|
|
3919
3959
|
*/
|
|
3920
|
-
job: "conversation" | "
|
|
3960
|
+
job: "conversation" | "user_small_tasks" | "system_small_tasks" | "middle_manager" | "embeddings";
|
|
3921
3961
|
/**
|
|
3922
3962
|
* @description Provider of the job's own selection. Null when nothing is selected for it.
|
|
3923
3963
|
* @example 123e4567-e89b-12d3-a456-426614174000
|
|
@@ -3997,7 +4037,7 @@ export interface components {
|
|
|
3997
4037
|
CompleteAiProviderAuthorizationDto: {
|
|
3998
4038
|
/**
|
|
3999
4039
|
* @description The full address the browser was sent back to, pasted as is
|
|
4000
|
-
* @example http://127.0.0.1:
|
|
4040
|
+
* @example http://127.0.0.1:1456/auth/callback?code=...&state=...
|
|
4001
4041
|
*/
|
|
4002
4042
|
callbackUrl?: string;
|
|
4003
4043
|
/** @description The `state` query parameter */
|
|
@@ -4755,6 +4795,53 @@ export interface components {
|
|
|
4755
4795
|
*/
|
|
4756
4796
|
createdAt: string;
|
|
4757
4797
|
};
|
|
4798
|
+
/**
|
|
4799
|
+
* @description reminder fires once; schedule fires every period, up to maxIterations times
|
|
4800
|
+
* @enum {string}
|
|
4801
|
+
*/
|
|
4802
|
+
ThreadTimerKind: "reminder" | "schedule";
|
|
4803
|
+
ThreadTimerResponseDto: {
|
|
4804
|
+
/**
|
|
4805
|
+
* @description Timer ID; use it to cancel the timer
|
|
4806
|
+
* @example 123e4567-e89b-12d3-a456-426614174000
|
|
4807
|
+
*/
|
|
4808
|
+
id: string;
|
|
4809
|
+
/**
|
|
4810
|
+
* @description reminder fires once; schedule fires every period, up to maxIterations times
|
|
4811
|
+
* @example schedule
|
|
4812
|
+
*/
|
|
4813
|
+
kind: components["schemas"]["ThreadTimerKind"];
|
|
4814
|
+
/**
|
|
4815
|
+
* @description What the threads agent wants to be reminded of
|
|
4816
|
+
* @example Check task #123 for new comments
|
|
4817
|
+
*/
|
|
4818
|
+
reason: string;
|
|
4819
|
+
/**
|
|
4820
|
+
* @description Seconds between firings (null for a reminder)
|
|
4821
|
+
* @example 300
|
|
4822
|
+
*/
|
|
4823
|
+
periodSeconds: number | null;
|
|
4824
|
+
/**
|
|
4825
|
+
* @description Most times the timer fires
|
|
4826
|
+
* @example 5
|
|
4827
|
+
*/
|
|
4828
|
+
maxIterations: number;
|
|
4829
|
+
/**
|
|
4830
|
+
* @description Times the timer has fired so far
|
|
4831
|
+
* @example 1
|
|
4832
|
+
*/
|
|
4833
|
+
firedCount: number;
|
|
4834
|
+
/**
|
|
4835
|
+
* @description When the timer fires next (UTC)
|
|
4836
|
+
* @example 2024-01-15T10:35:00.000Z
|
|
4837
|
+
*/
|
|
4838
|
+
nextFireAt: string;
|
|
4839
|
+
/**
|
|
4840
|
+
* @description When the timer was set (UTC)
|
|
4841
|
+
* @example 2024-01-15T10:30:00.000Z
|
|
4842
|
+
*/
|
|
4843
|
+
createdAt: string;
|
|
4844
|
+
};
|
|
4758
4845
|
ThreadResponseDto: {
|
|
4759
4846
|
/**
|
|
4760
4847
|
* @description Thread ID
|
|
@@ -4788,6 +4875,8 @@ export interface components {
|
|
|
4788
4875
|
participants: components["schemas"]["ActorResponseDto"][];
|
|
4789
4876
|
/** @description Tasks the threads agent will be notified about when they go to review or are done */
|
|
4790
4877
|
taskSubscriptions: components["schemas"]["TaskSubscriptionResponseDto"][];
|
|
4878
|
+
/** @description Reminders and recurring schedules of the threads agent that will still fire, soonest first */
|
|
4879
|
+
timers: components["schemas"]["ThreadTimerResponseDto"][];
|
|
4791
4880
|
/**
|
|
4792
4881
|
* @description Row version for optimistic locking
|
|
4793
4882
|
* @example 1
|
|
@@ -8968,7 +9057,7 @@ export interface operations {
|
|
|
8968
9057
|
header?: never;
|
|
8969
9058
|
path: {
|
|
8970
9059
|
/** @description The job the model is selected for */
|
|
8971
|
-
job: "conversation" | "
|
|
9060
|
+
job: "conversation" | "user_small_tasks" | "system_small_tasks" | "middle_manager" | "embeddings";
|
|
8972
9061
|
};
|
|
8973
9062
|
cookie?: never;
|
|
8974
9063
|
};
|
|
@@ -9002,7 +9091,7 @@ export interface operations {
|
|
|
9002
9091
|
header?: never;
|
|
9003
9092
|
path: {
|
|
9004
9093
|
/** @description The job the model is selected for */
|
|
9005
|
-
job: "conversation" | "
|
|
9094
|
+
job: "conversation" | "user_small_tasks" | "system_small_tasks" | "middle_manager" | "embeddings";
|
|
9006
9095
|
};
|
|
9007
9096
|
cookie?: never;
|
|
9008
9097
|
};
|
|
@@ -10331,6 +10420,66 @@ export interface operations {
|
|
|
10331
10420
|
};
|
|
10332
10421
|
};
|
|
10333
10422
|
};
|
|
10423
|
+
ThreadsController_cancelTimer: {
|
|
10424
|
+
parameters: {
|
|
10425
|
+
query?: never;
|
|
10426
|
+
header?: never;
|
|
10427
|
+
path: {
|
|
10428
|
+
/** @description Thread UUID */
|
|
10429
|
+
id: string;
|
|
10430
|
+
/** @description Timer UUID */
|
|
10431
|
+
timerId: string;
|
|
10432
|
+
};
|
|
10433
|
+
cookie?: never;
|
|
10434
|
+
};
|
|
10435
|
+
requestBody?: never;
|
|
10436
|
+
responses: {
|
|
10437
|
+
/** @description Timer cancelled, or already gone */
|
|
10438
|
+
204: {
|
|
10439
|
+
headers: {
|
|
10440
|
+
[name: string]: unknown;
|
|
10441
|
+
};
|
|
10442
|
+
content?: never;
|
|
10443
|
+
};
|
|
10444
|
+
/** @description Thread not found */
|
|
10445
|
+
404: {
|
|
10446
|
+
headers: {
|
|
10447
|
+
[name: string]: unknown;
|
|
10448
|
+
};
|
|
10449
|
+
content?: never;
|
|
10450
|
+
};
|
|
10451
|
+
};
|
|
10452
|
+
};
|
|
10453
|
+
ThreadsController_removeTaskSubscription: {
|
|
10454
|
+
parameters: {
|
|
10455
|
+
query?: never;
|
|
10456
|
+
header?: never;
|
|
10457
|
+
path: {
|
|
10458
|
+
/** @description Thread UUID */
|
|
10459
|
+
id: string;
|
|
10460
|
+
/** @description UUID of the watched task */
|
|
10461
|
+
taskId: string;
|
|
10462
|
+
};
|
|
10463
|
+
cookie?: never;
|
|
10464
|
+
};
|
|
10465
|
+
requestBody?: never;
|
|
10466
|
+
responses: {
|
|
10467
|
+
/** @description Watch removed, or already gone */
|
|
10468
|
+
204: {
|
|
10469
|
+
headers: {
|
|
10470
|
+
[name: string]: unknown;
|
|
10471
|
+
};
|
|
10472
|
+
content?: never;
|
|
10473
|
+
};
|
|
10474
|
+
/** @description Thread not found */
|
|
10475
|
+
404: {
|
|
10476
|
+
headers: {
|
|
10477
|
+
[name: string]: unknown;
|
|
10478
|
+
};
|
|
10479
|
+
content?: never;
|
|
10480
|
+
};
|
|
10481
|
+
};
|
|
10482
|
+
};
|
|
10334
10483
|
ThreadsController_referenceContextBlock: {
|
|
10335
10484
|
parameters: {
|
|
10336
10485
|
query?: never;
|
|
@@ -143,6 +143,8 @@ export type { ThreadListResponseDto } from './models/ThreadListResponseDto.js';
|
|
|
143
143
|
export type { ThreadMessageResponseDto } from './models/ThreadMessageResponseDto.js';
|
|
144
144
|
export type { ThreadResponseDto } from './models/ThreadResponseDto.js';
|
|
145
145
|
export type { ThreadStateResponseDto } from './models/ThreadStateResponseDto.js';
|
|
146
|
+
export { ThreadTimerKind } from './models/ThreadTimerKind.js';
|
|
147
|
+
export type { ThreadTimerResponseDto } from './models/ThreadTimerResponseDto.js';
|
|
146
148
|
export type { ThreadTokenUsageResponseDto } from './models/ThreadTokenUsageResponseDto.js';
|
|
147
149
|
export { TokenExchangeRequestDto } from './models/TokenExchangeRequestDto.js';
|
|
148
150
|
export type { TokenExchangeResponseDto } from './models/TokenExchangeResponseDto.js';
|
|
@@ -41,6 +41,7 @@ export { TaskExecutionQueueEntryResponseDto } from './models/TaskExecutionQueueE
|
|
|
41
41
|
export { TaskResponseDto } from './models/TaskResponseDto.js';
|
|
42
42
|
export { TaskSubscriptionResponseDto } from './models/TaskSubscriptionResponseDto.js';
|
|
43
43
|
export { TaskSummaryResponseDto } from './models/TaskSummaryResponseDto.js';
|
|
44
|
+
export { ThreadTimerKind } from './models/ThreadTimerKind.js';
|
|
44
45
|
export { TokenExchangeRequestDto } from './models/TokenExchangeRequestDto.js';
|
|
45
46
|
export { TokenRequestDto } from './models/TokenRequestDto.js';
|
|
46
47
|
export { TokenResponseDto } from './models/TokenResponseDto.js';
|
|
@@ -34,7 +34,8 @@ export declare namespace AiModelSelectionResponseDto {
|
|
|
34
34
|
*/
|
|
35
35
|
enum job {
|
|
36
36
|
CONVERSATION = "conversation",
|
|
37
|
-
|
|
37
|
+
USER_SMALL_TASKS = "user_small_tasks",
|
|
38
|
+
SYSTEM_SMALL_TASKS = "system_small_tasks",
|
|
38
39
|
MIDDLE_MANAGER = "middle_manager",
|
|
39
40
|
EMBEDDINGS = "embeddings"
|
|
40
41
|
}
|
|
@@ -6,7 +6,8 @@ export var AiModelSelectionResponseDto;
|
|
|
6
6
|
let job;
|
|
7
7
|
(function (job) {
|
|
8
8
|
job["CONVERSATION"] = "conversation";
|
|
9
|
-
job["
|
|
9
|
+
job["USER_SMALL_TASKS"] = "user_small_tasks";
|
|
10
|
+
job["SYSTEM_SMALL_TASKS"] = "system_small_tasks";
|
|
10
11
|
job["MIDDLE_MANAGER"] = "middle_manager";
|
|
11
12
|
job["EMBEDDINGS"] = "embeddings";
|
|
12
13
|
})(job = AiModelSelectionResponseDto.job || (AiModelSelectionResponseDto.job = {}));
|
|
@@ -3,6 +3,7 @@ import type { ContextBlockSummaryResponseDto } from './ContextBlockSummaryRespon
|
|
|
3
3
|
import type { MetaTagResponseDto } from './MetaTagResponseDto.js';
|
|
4
4
|
import type { TaskSubscriptionResponseDto } from './TaskSubscriptionResponseDto.js';
|
|
5
5
|
import type { TaskSummaryResponseDto } from './TaskSummaryResponseDto.js';
|
|
6
|
+
import type { ThreadTimerResponseDto } from './ThreadTimerResponseDto.js';
|
|
6
7
|
export type ThreadResponseDto = {
|
|
7
8
|
/**
|
|
8
9
|
* Thread ID
|
|
@@ -44,6 +45,10 @@ export type ThreadResponseDto = {
|
|
|
44
45
|
* Tasks the threads agent will be notified about when they go to review or are done
|
|
45
46
|
*/
|
|
46
47
|
taskSubscriptions: Array<TaskSubscriptionResponseDto>;
|
|
48
|
+
/**
|
|
49
|
+
* Reminders and recurring schedules of the threads agent that will still fire, soonest first
|
|
50
|
+
*/
|
|
51
|
+
timers: Array<ThreadTimerResponseDto>;
|
|
47
52
|
/**
|
|
48
53
|
* Row version for optimistic locking
|
|
49
54
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* reminder fires once; schedule fires every period, up to maxIterations times
|
|
7
|
+
*/
|
|
8
|
+
export var ThreadTimerKind;
|
|
9
|
+
(function (ThreadTimerKind) {
|
|
10
|
+
ThreadTimerKind["REMINDER"] = "reminder";
|
|
11
|
+
ThreadTimerKind["SCHEDULE"] = "schedule";
|
|
12
|
+
})(ThreadTimerKind || (ThreadTimerKind = {}));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ThreadTimerKind } from './ThreadTimerKind.js';
|
|
2
|
+
export type ThreadTimerResponseDto = {
|
|
3
|
+
/**
|
|
4
|
+
* Timer ID; use it to cancel the timer
|
|
5
|
+
*/
|
|
6
|
+
id: string;
|
|
7
|
+
/**
|
|
8
|
+
* reminder fires once; schedule fires every period, up to maxIterations times
|
|
9
|
+
*/
|
|
10
|
+
kind: ThreadTimerKind;
|
|
11
|
+
/**
|
|
12
|
+
* What the threads agent wants to be reminded of
|
|
13
|
+
*/
|
|
14
|
+
reason: string;
|
|
15
|
+
/**
|
|
16
|
+
* Seconds between firings (null for a reminder)
|
|
17
|
+
*/
|
|
18
|
+
periodSeconds: number | null;
|
|
19
|
+
/**
|
|
20
|
+
* Most times the timer fires
|
|
21
|
+
*/
|
|
22
|
+
maxIterations: number;
|
|
23
|
+
/**
|
|
24
|
+
* Times the timer has fired so far
|
|
25
|
+
*/
|
|
26
|
+
firedCount: number;
|
|
27
|
+
/**
|
|
28
|
+
* When the timer fires next (UTC)
|
|
29
|
+
*/
|
|
30
|
+
nextFireAt: string;
|
|
31
|
+
/**
|
|
32
|
+
* When the timer was set (UTC)
|
|
33
|
+
*/
|
|
34
|
+
createdAt: string;
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -16,12 +16,12 @@ export declare class AiModelSelectionsService {
|
|
|
16
16
|
* @returns AiModelSelectionResponseDto Selection saved
|
|
17
17
|
* @throws ApiError
|
|
18
18
|
*/
|
|
19
|
-
static aiModelSelectionsControllerSetAiModelSelection(job: 'conversation' | '
|
|
19
|
+
static aiModelSelectionsControllerSetAiModelSelection(job: 'conversation' | 'user_small_tasks' | 'system_small_tasks' | 'middle_manager' | 'embeddings', requestBody: SetAiModelSelectionDto, config?: OpenAPIConfig): CancelablePromise<AiModelSelectionResponseDto>;
|
|
20
20
|
/**
|
|
21
21
|
* Clear a job's selection
|
|
22
22
|
* @param job The job the model is selected for
|
|
23
23
|
* @returns void
|
|
24
24
|
* @throws ApiError
|
|
25
25
|
*/
|
|
26
|
-
static aiModelSelectionsControllerClearAiModelSelection(job: 'conversation' | '
|
|
26
|
+
static aiModelSelectionsControllerClearAiModelSelection(job: 'conversation' | 'user_small_tasks' | 'system_small_tasks' | 'middle_manager' | 'embeddings', config?: OpenAPIConfig): CancelablePromise<void>;
|
|
27
27
|
}
|
|
@@ -75,6 +75,24 @@ export declare class ThreadsService {
|
|
|
75
75
|
* @throws ApiError
|
|
76
76
|
*/
|
|
77
77
|
static threadsControllerAttachTask(id: string, requestBody: AttachTaskDto, config?: OpenAPIConfig): CancelablePromise<ThreadResponseDto>;
|
|
78
|
+
/**
|
|
79
|
+
* Cancel a reminder or schedule of the threads agent
|
|
80
|
+
* Idempotent: cancelling a timer that already finished or was cancelled succeeds.
|
|
81
|
+
* @param id Thread UUID
|
|
82
|
+
* @param timerId Timer UUID
|
|
83
|
+
* @returns void
|
|
84
|
+
* @throws ApiError
|
|
85
|
+
*/
|
|
86
|
+
static threadsControllerCancelTimer(id: string, timerId: string, config?: OpenAPIConfig): CancelablePromise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Stop the threads agent watching a task
|
|
89
|
+
* Idempotent: removing a watch that does not exist succeeds.
|
|
90
|
+
* @param id Thread UUID
|
|
91
|
+
* @param taskId UUID of the watched task
|
|
92
|
+
* @returns void
|
|
93
|
+
* @throws ApiError
|
|
94
|
+
*/
|
|
95
|
+
static threadsControllerRemoveTaskSubscription(id: string, taskId: string, config?: OpenAPIConfig): CancelablePromise<void>;
|
|
78
96
|
/**
|
|
79
97
|
* Reference a context block in the thread
|
|
80
98
|
* @param id Thread UUID
|
|
@@ -145,6 +145,48 @@ export class ThreadsService {
|
|
|
145
145
|
},
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* Cancel a reminder or schedule of the threads agent
|
|
150
|
+
* Idempotent: cancelling a timer that already finished or was cancelled succeeds.
|
|
151
|
+
* @param id Thread UUID
|
|
152
|
+
* @param timerId Timer UUID
|
|
153
|
+
* @returns void
|
|
154
|
+
* @throws ApiError
|
|
155
|
+
*/
|
|
156
|
+
static threadsControllerCancelTimer(id, timerId, config = OpenAPI) {
|
|
157
|
+
return __request(config, {
|
|
158
|
+
method: 'DELETE',
|
|
159
|
+
url: '/api/v1/threads/{id}/timers/{timerId}',
|
|
160
|
+
path: {
|
|
161
|
+
'id': id,
|
|
162
|
+
'timerId': timerId,
|
|
163
|
+
},
|
|
164
|
+
errors: {
|
|
165
|
+
404: `Thread not found`,
|
|
166
|
+
},
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Stop the threads agent watching a task
|
|
171
|
+
* Idempotent: removing a watch that does not exist succeeds.
|
|
172
|
+
* @param id Thread UUID
|
|
173
|
+
* @param taskId UUID of the watched task
|
|
174
|
+
* @returns void
|
|
175
|
+
* @throws ApiError
|
|
176
|
+
*/
|
|
177
|
+
static threadsControllerRemoveTaskSubscription(id, taskId, config = OpenAPI) {
|
|
178
|
+
return __request(config, {
|
|
179
|
+
method: 'DELETE',
|
|
180
|
+
url: '/api/v1/threads/{id}/task-subscriptions/{taskId}',
|
|
181
|
+
path: {
|
|
182
|
+
'id': id,
|
|
183
|
+
'taskId': taskId,
|
|
184
|
+
},
|
|
185
|
+
errors: {
|
|
186
|
+
404: `Thread not found`,
|
|
187
|
+
},
|
|
188
|
+
});
|
|
189
|
+
}
|
|
148
190
|
/**
|
|
149
191
|
* Reference a context block in the thread
|
|
150
192
|
* @param id Thread UUID
|
|
@@ -8,13 +8,13 @@ export declare class AiModelSelectionsResource extends BaseClient {
|
|
|
8
8
|
}): Promise<AiModelSelectionResponseDto[]>;
|
|
9
9
|
/** Select the provider and model a job uses */
|
|
10
10
|
AiModelSelectionsController_setAiModelSelection(params: {
|
|
11
|
-
job: 'conversation' | '
|
|
11
|
+
job: 'conversation' | 'user_small_tasks' | 'system_small_tasks' | 'middle_manager' | 'embeddings';
|
|
12
12
|
body: SetAiModelSelectionDto;
|
|
13
13
|
signal?: AbortSignal;
|
|
14
14
|
}): Promise<AiModelSelectionResponseDto>;
|
|
15
15
|
/** Clear a job's selection */
|
|
16
16
|
AiModelSelectionsController_clearAiModelSelection(params: {
|
|
17
|
-
job: 'conversation' | '
|
|
17
|
+
job: 'conversation' | 'user_small_tasks' | 'system_small_tasks' | 'middle_manager' | 'embeddings';
|
|
18
18
|
signal?: AbortSignal;
|
|
19
19
|
}): Promise<void>;
|
|
20
20
|
}
|
|
@@ -45,6 +45,18 @@ export declare class ThreadsResource extends BaseClient {
|
|
|
45
45
|
body: AttachTaskDto;
|
|
46
46
|
signal?: AbortSignal;
|
|
47
47
|
}): Promise<ThreadResponseDto>;
|
|
48
|
+
/** Cancel a reminder or schedule of the threads agent */
|
|
49
|
+
ThreadsController_cancelTimer(params: {
|
|
50
|
+
id: string;
|
|
51
|
+
timerId: string;
|
|
52
|
+
signal?: AbortSignal;
|
|
53
|
+
}): Promise<void>;
|
|
54
|
+
/** Stop the threads agent watching a task */
|
|
55
|
+
ThreadsController_removeTaskSubscription(params: {
|
|
56
|
+
id: string;
|
|
57
|
+
taskId: string;
|
|
58
|
+
signal?: AbortSignal;
|
|
59
|
+
}): Promise<void>;
|
|
48
60
|
/** Reference a context block in the thread */
|
|
49
61
|
ThreadsController_referenceContextBlock(params: {
|
|
50
62
|
id: string;
|
|
@@ -35,6 +35,14 @@ export class ThreadsResource extends BaseClient {
|
|
|
35
35
|
async ThreadsController_attachTask(params) {
|
|
36
36
|
return this.request('POST', `/api/v1/threads/${params.id}/tasks`, { body: params.body, signal: params?.signal });
|
|
37
37
|
}
|
|
38
|
+
/** Cancel a reminder or schedule of the threads agent */
|
|
39
|
+
async ThreadsController_cancelTimer(params) {
|
|
40
|
+
return this.request('DELETE', `/api/v1/threads/${params.id}/timers/${params.timerId}`, { responseType: 'void', signal: params?.signal });
|
|
41
|
+
}
|
|
42
|
+
/** Stop the threads agent watching a task */
|
|
43
|
+
async ThreadsController_removeTaskSubscription(params) {
|
|
44
|
+
return this.request('DELETE', `/api/v1/threads/${params.id}/task-subscriptions/${params.taskId}`, { responseType: 'void', signal: params?.signal });
|
|
45
|
+
}
|
|
38
46
|
/** Reference a context block in the thread */
|
|
39
47
|
async ThreadsController_referenceContextBlock(params) {
|
|
40
48
|
return this.request('POST', `/api/v1/threads/${params.id}/context-blocks`, { body: params.body, signal: params?.signal });
|
package/dist/src/v2/types.d.ts
CHANGED
|
@@ -392,7 +392,7 @@ export interface AiProviderModelResponseDto {
|
|
|
392
392
|
kind: 'language' | 'embedding';
|
|
393
393
|
}
|
|
394
394
|
export interface AiModelSelectionResponseDto {
|
|
395
|
-
job: 'conversation' | '
|
|
395
|
+
job: 'conversation' | 'user_small_tasks' | 'system_small_tasks' | 'middle_manager' | 'embeddings';
|
|
396
396
|
aiProviderId?: string | null;
|
|
397
397
|
modelId?: string | null;
|
|
398
398
|
followsConversation: boolean;
|
|
@@ -627,6 +627,17 @@ export interface TaskSubscriptionResponseDto {
|
|
|
627
627
|
status: 'NOT_STARTED' | 'IN_PROGRESS' | 'FOR_REVIEW' | 'DONE';
|
|
628
628
|
createdAt: string;
|
|
629
629
|
}
|
|
630
|
+
export type ThreadTimerKind = 'reminder' | 'schedule';
|
|
631
|
+
export interface ThreadTimerResponseDto {
|
|
632
|
+
id: string;
|
|
633
|
+
kind: ThreadTimerKind;
|
|
634
|
+
reason: string;
|
|
635
|
+
periodSeconds: number | null;
|
|
636
|
+
maxIterations: number;
|
|
637
|
+
firedCount: number;
|
|
638
|
+
nextFireAt: string;
|
|
639
|
+
createdAt: string;
|
|
640
|
+
}
|
|
630
641
|
export interface ThreadResponseDto {
|
|
631
642
|
id: string;
|
|
632
643
|
title: string;
|
|
@@ -638,6 +649,7 @@ export interface ThreadResponseDto {
|
|
|
638
649
|
tags: MetaTagResponseDto[];
|
|
639
650
|
participants: ActorResponseDto[];
|
|
640
651
|
taskSubscriptions: TaskSubscriptionResponseDto[];
|
|
652
|
+
timers: ThreadTimerResponseDto[];
|
|
641
653
|
rowVersion: number;
|
|
642
654
|
createdAt: string;
|
|
643
655
|
updatedAt: string;
|