@taico/client 0.2.6 → 0.2.9

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.
Files changed (48) hide show
  1. package/dist/contracts/types.d.ts +268 -187
  2. package/dist/src/v1/client/index.d.ts +4 -3
  3. package/dist/src/v1/client/index.js +1 -2
  4. package/dist/src/v1/client/models/ActiveTaskExecutionResponseDto.d.ts +8 -0
  5. package/dist/src/v1/client/models/ImportBlocksResponseDto.d.ts +6 -0
  6. package/dist/src/v1/client/models/TaskExecutionHistoryResponseDto.d.ts +8 -0
  7. package/dist/src/v1/client/models/UpdateRunnerSessionIdDto.d.ts +6 -0
  8. package/dist/src/v1/client/models/UpdateRunnerSessionIdDto.js +1 -0
  9. package/dist/src/v1/client/models/WorkerResponseDto.d.ts +8 -0
  10. package/dist/src/v1/client/models/WorkerResponseDto.js +1 -0
  11. package/dist/src/v1/client/services/AgentRunService.d.ts +2 -2
  12. package/dist/src/v1/client/services/AgentRunService.js +2 -2
  13. package/dist/src/v1/client/services/ContextService.d.ts +19 -0
  14. package/dist/src/v1/client/services/ContextService.js +28 -0
  15. package/dist/src/v1/client/services/ExecutionsService.d.ts +57 -10
  16. package/dist/src/v1/client/services/ExecutionsService.js +97 -15
  17. package/dist/src/v1/client/services/WorkersService.d.ts +11 -0
  18. package/dist/src/v1/client/services/WorkersService.js +15 -0
  19. package/dist/src/v2/agent-resource.js +2 -2
  20. package/dist/src/v2/authorization-server-resource.js +3 -3
  21. package/dist/src/v2/base-client.d.ts +4 -0
  22. package/dist/src/v2/base-client.js +51 -7
  23. package/dist/src/v2/chat-providers-resource.js +2 -2
  24. package/dist/src/v2/client.d.ts +4 -4
  25. package/dist/src/v2/client.js +6 -6
  26. package/dist/src/v2/context-resource.d.ts +10 -1
  27. package/dist/src/v2/context-resource.js +16 -8
  28. package/dist/src/v2/executions-resource.d.ts +35 -10
  29. package/dist/src/v2/executions-resource.js +27 -3
  30. package/dist/src/v2/meta---projects-resource.js +1 -1
  31. package/dist/src/v2/meta-resource.js +1 -1
  32. package/dist/src/v2/scheduled-tasks-resource.js +1 -1
  33. package/dist/src/v2/secrets-resource.js +1 -1
  34. package/dist/src/v2/task-blueprints-resource.js +1 -1
  35. package/dist/src/v2/task-resource.js +8 -8
  36. package/dist/src/v2/threads-resource.js +1 -1
  37. package/dist/src/v2/types.d.ts +18 -28
  38. package/dist/src/v2/workers-resource.d.ts +9 -0
  39. package/dist/src/v2/workers-resource.js +10 -0
  40. package/package.json +1 -1
  41. package/dist/src/v1/client/models/ExecutionListResponseDto.d.ts +0 -23
  42. package/dist/src/v1/client/models/ExecutionResponseDto.d.ts +0 -93
  43. package/dist/src/v1/client/models/ExecutionResponseDto.js +0 -17
  44. package/dist/src/v1/client/services/ExecutionsV2Service.d.ts +0 -46
  45. package/dist/src/v1/client/services/ExecutionsV2Service.js +0 -75
  46. package/dist/src/v2/executions-v2-resource.d.ts +0 -28
  47. package/dist/src/v2/executions-v2-resource.js +0 -26
  48. /package/dist/src/v1/client/models/{ExecutionListResponseDto.js → ImportBlocksResponseDto.js} +0 -0
@@ -19,6 +19,14 @@ export class ContextResource extends BaseClient {
19
19
  async ContextController_getBlockTree(params) {
20
20
  return this.request('GET', '/api/v1/context/blocks/tree', { signal: params?.signal });
21
21
  }
22
+ /** Export all context blocks as markdown zip */
23
+ async ContextController_exportBlocks(params) {
24
+ return this.request('GET', '/api/v1/context/blocks/export', { responseType: 'arrayBuffer', signal: params?.signal });
25
+ }
26
+ /** Import context blocks from markdown zip */
27
+ async ContextController_importBlocks(params) {
28
+ return this.request('POST', '/api/v1/context/blocks/import', { body: params.body, bodyType: 'form-data', signal: params?.signal });
29
+ }
22
30
  /** Fetch a wiki page by ID */
23
31
  async ContextController_getBlock(params) {
24
32
  return this.request('GET', `/api/v1/context/blocks/${params.id}`, { signal: params?.signal });
@@ -29,7 +37,7 @@ export class ContextResource extends BaseClient {
29
37
  }
30
38
  /** Delete a wiki page */
31
39
  async ContextController_deleteBlock(params) {
32
- return this.request('DELETE', `/api/v1/context/blocks/${params.id}`, { signal: params?.signal });
40
+ return this.request('DELETE', `/api/v1/context/blocks/${params.id}`, { responseType: 'void', signal: params?.signal });
33
41
  }
34
42
  /** Append content to an existing wiki page */
35
43
  async ContextController_appendToBlock(params) {
@@ -52,24 +60,24 @@ export class ContextResource extends BaseClient {
52
60
  return this.request('DELETE', `/api/v1/context/blocks/${params.id}/tags/${params.tagId}`, { signal: params?.signal });
53
61
  }
54
62
  async ContextController_handleMcp_get(params) {
55
- return this.request('GET', '/api/v1/context/blocks/mcp', { signal: params?.signal });
63
+ return this.request('GET', '/api/v1/context/blocks/mcp', { responseType: 'void', signal: params?.signal });
56
64
  }
57
65
  async ContextController_handleMcp_post(params) {
58
- return this.request('POST', '/api/v1/context/blocks/mcp', { signal: params?.signal });
66
+ return this.request('POST', '/api/v1/context/blocks/mcp', { responseType: 'void', signal: params?.signal });
59
67
  }
60
68
  async ContextController_handleMcp_put(params) {
61
- return this.request('PUT', '/api/v1/context/blocks/mcp', { signal: params?.signal });
69
+ return this.request('PUT', '/api/v1/context/blocks/mcp', { responseType: 'void', signal: params?.signal });
62
70
  }
63
71
  async ContextController_handleMcp_delete(params) {
64
- return this.request('DELETE', '/api/v1/context/blocks/mcp', { signal: params?.signal });
72
+ return this.request('DELETE', '/api/v1/context/blocks/mcp', { responseType: 'void', signal: params?.signal });
65
73
  }
66
74
  async ContextController_handleMcp_patch(params) {
67
- return this.request('PATCH', '/api/v1/context/blocks/mcp', { signal: params?.signal });
75
+ return this.request('PATCH', '/api/v1/context/blocks/mcp', { responseType: 'void', signal: params?.signal });
68
76
  }
69
77
  async ContextController_handleMcp_options(params) {
70
- return this.request('OPTIONS', '/api/v1/context/blocks/mcp', { signal: params?.signal });
78
+ return this.request('OPTIONS', '/api/v1/context/blocks/mcp', { responseType: 'void', signal: params?.signal });
71
79
  }
72
80
  async ContextController_handleMcp_head(params) {
73
- return this.request('HEAD', '/api/v1/context/blocks/mcp', { signal: params?.signal });
81
+ return this.request('HEAD', '/api/v1/context/blocks/mcp', { responseType: 'void', signal: params?.signal });
74
82
  }
75
83
  }
@@ -1,14 +1,39 @@
1
1
  import { BaseClient, ClientConfig } from './base-client.js';
2
- import type { ExecutionListResponseDto } from './types.js';
2
+ import type { ActiveTaskExecutionResponseDto, StopActiveTaskExecutionDto, TaskExecutionHistoryResponseDto, TaskExecutionQueueEntryResponseDto, UpdateRunnerSessionIdDto } from './types.js';
3
3
  export declare class ExecutionsResource extends BaseClient {
4
4
  constructor(config: ClientConfig);
5
- /** List task executions with optional filtering and pagination */
6
- ExecutionsController_listExecutions(params?: {
7
- status?: 'READY' | 'CLAIMED' | 'RUNNING' | 'STOP_REQUESTED' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'STALE';
8
- agentActorId?: string;
9
- taskId?: string;
10
- page?: number;
11
- limit?: number;
12
- signal?: AbortSignal;
13
- }): Promise<ExecutionListResponseDto>;
5
+ /** List the current task execution work queue */
6
+ TaskExecutionQueueController_listQueue(params?: {
7
+ signal?: AbortSignal;
8
+ }): Promise<TaskExecutionQueueEntryResponseDto[]>;
9
+ /** Claim a specific task from the execution queue */
10
+ TaskExecutionQueueController_claimTask(params: {
11
+ taskId: string;
12
+ signal?: AbortSignal;
13
+ }): Promise<ActiveTaskExecutionResponseDto>;
14
+ /** List active task executions */
15
+ ActiveTaskExecutionController_listActiveExecutions(params?: {
16
+ signal?: AbortSignal;
17
+ }): Promise<ActiveTaskExecutionResponseDto[]>;
18
+ /** Stop an active task execution and move it to history */
19
+ ActiveTaskExecutionController_stopTaskExecution(params: {
20
+ executionId: string;
21
+ body: StopActiveTaskExecutionDto;
22
+ signal?: AbortSignal;
23
+ }): Promise<TaskExecutionHistoryResponseDto>;
24
+ /** Attach the runner session id to an active execution */
25
+ ActiveTaskExecutionController_updateRunnerSessionId(params: {
26
+ executionId: string;
27
+ body: UpdateRunnerSessionIdDto;
28
+ signal?: AbortSignal;
29
+ }): Promise<void>;
30
+ /** Increment tool call count for an active execution */
31
+ ActiveTaskExecutionController_incrementToolCallCount(params: {
32
+ executionId: string;
33
+ signal?: AbortSignal;
34
+ }): Promise<void>;
35
+ /** List task execution history */
36
+ TaskExecutionHistoryController_listHistory(params?: {
37
+ signal?: AbortSignal;
38
+ }): Promise<TaskExecutionHistoryResponseDto[]>;
14
39
  }
@@ -3,8 +3,32 @@ export class ExecutionsResource extends BaseClient {
3
3
  constructor(config) {
4
4
  super(config);
5
5
  }
6
- /** List task executions with optional filtering and pagination */
7
- async ExecutionsController_listExecutions(params) {
8
- return this.request('GET', '/api/v1/executions', { params: { status: params?.status, agentActorId: params?.agentActorId, taskId: params?.taskId, page: params?.page, limit: params?.limit }, signal: params?.signal });
6
+ /** List the current task execution work queue */
7
+ async TaskExecutionQueueController_listQueue(params) {
8
+ return this.request('GET', '/api/v1/executions/queue', { signal: params?.signal });
9
+ }
10
+ /** Claim a specific task from the execution queue */
11
+ async TaskExecutionQueueController_claimTask(params) {
12
+ return this.request('POST', `/api/v1/executions/queue/${params.taskId}/claim`, { signal: params?.signal });
13
+ }
14
+ /** List active task executions */
15
+ async ActiveTaskExecutionController_listActiveExecutions(params) {
16
+ return this.request('GET', '/api/v1/executions/active', { signal: params?.signal });
17
+ }
18
+ /** Stop an active task execution and move it to history */
19
+ async ActiveTaskExecutionController_stopTaskExecution(params) {
20
+ return this.request('POST', `/api/v1/executions/active/${params.executionId}/stop`, { body: params.body, signal: params?.signal });
21
+ }
22
+ /** Attach the runner session id to an active execution */
23
+ async ActiveTaskExecutionController_updateRunnerSessionId(params) {
24
+ return this.request('PATCH', `/api/v1/executions/active/${params.executionId}/session`, { body: params.body, responseType: 'void', signal: params?.signal });
25
+ }
26
+ /** Increment tool call count for an active execution */
27
+ async ActiveTaskExecutionController_incrementToolCallCount(params) {
28
+ return this.request('PATCH', `/api/v1/executions/active/${params.executionId}/tool-calls/increment`, { responseType: 'void', signal: params?.signal });
29
+ }
30
+ /** List task execution history */
31
+ async TaskExecutionHistoryController_listHistory(params) {
32
+ return this.request('GET', '/api/v1/executions/history', { signal: params?.signal });
9
33
  }
10
34
  }
@@ -29,6 +29,6 @@ export class MetaProjectsResource extends BaseClient {
29
29
  }
30
30
  /** Delete a project */
31
31
  async ProjectsController_deleteProject(params) {
32
- return this.request('DELETE', `/api/v1/meta/projects/${params.projectId}`, { signal: params?.signal });
32
+ return this.request('DELETE', `/api/v1/meta/projects/${params.projectId}`, { responseType: 'void', signal: params?.signal });
33
33
  }
34
34
  }
@@ -17,6 +17,6 @@ export class MetaResource extends BaseClient {
17
17
  }
18
18
  /** Delete a tag from the system */
19
19
  async MetaController_deleteTag(params) {
20
- return this.request('DELETE', `/api/v1/meta/tags/${params.tagId}`, { signal: params?.signal });
20
+ return this.request('DELETE', `/api/v1/meta/tags/${params.tagId}`, { responseType: 'void', signal: params?.signal });
21
21
  }
22
22
  }
@@ -21,6 +21,6 @@ export class ScheduledTasksResource extends BaseClient {
21
21
  }
22
22
  /** Delete a scheduled task */
23
23
  async ScheduledTasksController_deleteScheduledTask(params) {
24
- return this.request('DELETE', `/api/v1/scheduled-tasks/${params.id}`, { signal: params?.signal });
24
+ return this.request('DELETE', `/api/v1/scheduled-tasks/${params.id}`, { responseType: 'void', signal: params?.signal });
25
25
  }
26
26
  }
@@ -21,7 +21,7 @@ export class SecretsResource extends BaseClient {
21
21
  }
22
22
  /** Delete a secret */
23
23
  async SecretsController_deleteSecret(params) {
24
- return this.request('DELETE', `/api/v1/secrets/${params.id}`, { signal: params?.signal });
24
+ return this.request('DELETE', `/api/v1/secrets/${params.id}`, { responseType: 'void', signal: params?.signal });
25
25
  }
26
26
  /** Get decrypted secret value */
27
27
  async SecretsController_getSecretValue(params) {
@@ -21,7 +21,7 @@ export class TaskBlueprintsResource extends BaseClient {
21
21
  }
22
22
  /** Delete a task blueprint */
23
23
  async TaskBlueprintsController_deleteTaskBlueprint(params) {
24
- return this.request('DELETE', `/api/v1/task-blueprints/${params.id}`, { signal: params?.signal });
24
+ return this.request('DELETE', `/api/v1/task-blueprints/${params.id}`, { responseType: 'void', signal: params?.signal });
25
25
  }
26
26
  /** Create a task from a blueprint */
27
27
  async TaskBlueprintsController_createTaskFromBlueprint(params) {
@@ -17,7 +17,7 @@ export class TaskResource extends BaseClient {
17
17
  }
18
18
  /** Delete a task */
19
19
  async TasksController_deleteTask(params) {
20
- return this.request('DELETE', `/api/v1/tasks/tasks/${params.id}`, { signal: params?.signal });
20
+ return this.request('DELETE', `/api/v1/tasks/tasks/${params.id}`, { responseType: 'void', signal: params?.signal });
21
21
  }
22
22
  /** Get a task by ID */
23
23
  async TasksController_getTask(params) {
@@ -64,24 +64,24 @@ export class TaskResource extends BaseClient {
64
64
  return this.request('POST', `/api/v1/tasks/tasks/${params.id}/input-requests/${params.inputRequestId}/answer`, { body: params.body, signal: params?.signal });
65
65
  }
66
66
  async TasksController_handleMcp_get(params) {
67
- return this.request('GET', '/api/v1/tasks/tasks/mcp', { signal: params?.signal });
67
+ return this.request('GET', '/api/v1/tasks/tasks/mcp', { responseType: 'void', signal: params?.signal });
68
68
  }
69
69
  async TasksController_handleMcp_post(params) {
70
- return this.request('POST', '/api/v1/tasks/tasks/mcp', { signal: params?.signal });
70
+ return this.request('POST', '/api/v1/tasks/tasks/mcp', { responseType: 'void', signal: params?.signal });
71
71
  }
72
72
  async TasksController_handleMcp_put(params) {
73
- return this.request('PUT', '/api/v1/tasks/tasks/mcp', { signal: params?.signal });
73
+ return this.request('PUT', '/api/v1/tasks/tasks/mcp', { responseType: 'void', signal: params?.signal });
74
74
  }
75
75
  async TasksController_handleMcp_delete(params) {
76
- return this.request('DELETE', '/api/v1/tasks/tasks/mcp', { signal: params?.signal });
76
+ return this.request('DELETE', '/api/v1/tasks/tasks/mcp', { responseType: 'void', signal: params?.signal });
77
77
  }
78
78
  async TasksController_handleMcp_patch(params) {
79
- return this.request('PATCH', '/api/v1/tasks/tasks/mcp', { signal: params?.signal });
79
+ return this.request('PATCH', '/api/v1/tasks/tasks/mcp', { responseType: 'void', signal: params?.signal });
80
80
  }
81
81
  async TasksController_handleMcp_options(params) {
82
- return this.request('OPTIONS', '/api/v1/tasks/tasks/mcp', { signal: params?.signal });
82
+ return this.request('OPTIONS', '/api/v1/tasks/tasks/mcp', { responseType: 'void', signal: params?.signal });
83
83
  }
84
84
  async TasksController_handleMcp_head(params) {
85
- return this.request('HEAD', '/api/v1/tasks/tasks/mcp', { signal: params?.signal });
85
+ return this.request('HEAD', '/api/v1/tasks/tasks/mcp', { responseType: 'void', signal: params?.signal });
86
86
  }
87
87
  }
@@ -21,7 +21,7 @@ export class ThreadsResource extends BaseClient {
21
21
  }
22
22
  /** Delete a thread */
23
23
  async ThreadsController_deleteThread(params) {
24
- return this.request('DELETE', `/api/v1/threads/${params.id}`, { signal: params?.signal });
24
+ return this.request('DELETE', `/api/v1/threads/${params.id}`, { responseType: 'void', signal: params?.signal });
25
25
  }
26
26
  /** Get a thread by task ID */
27
27
  async ThreadsController_getThreadByTaskId(params) {
@@ -761,6 +761,9 @@ export interface BlockTreeResponseDto {
761
761
  createdAt: string;
762
762
  updatedAt: string;
763
763
  }
764
+ export interface ImportBlocksResponseDto {
765
+ importedCount: number;
766
+ }
764
767
  export interface UpdateBlockDto {
765
768
  title?: string;
766
769
  content?: string;
@@ -793,6 +796,8 @@ export interface ActiveTaskExecutionResponseDto {
793
796
  taskStatus: 'NOT_STARTED' | 'IN_PROGRESS' | 'FOR_REVIEW' | 'DONE';
794
797
  claimedAt: string;
795
798
  lastHeartbeatAt: string | null;
799
+ runnerSessionId: string | null;
800
+ toolCallCount: number;
796
801
  taskStatusBeforeClaim: 'NOT_STARTED' | 'IN_PROGRESS' | 'FOR_REVIEW' | 'DONE';
797
802
  taskTagsBeforeClaim: ActiveTaskExecutionTagSnapshotResponseDto[];
798
803
  workerClientId: string;
@@ -813,10 +818,23 @@ export interface TaskExecutionHistoryResponseDto {
813
818
  transitionedAt: string;
814
819
  agentActorId: string;
815
820
  workerClientId: string;
821
+ runnerSessionId: string | null;
822
+ toolCallCount: number;
816
823
  status: 'SUCCEEDED' | 'FAILED' | 'STALE' | 'CANCELLED';
817
824
  errorCode: 'OUT_OF_QUOTA' | 'UNKNOWN';
818
825
  errorMessage: string | null;
819
826
  }
827
+ export interface UpdateRunnerSessionIdDto {
828
+ sessionId: string;
829
+ }
830
+ export interface WorkerResponseDto {
831
+ id: string;
832
+ oauthClientId: string;
833
+ lastSeenAt: string;
834
+ harnesses: ('claude' | 'codex' | 'opencode' | 'adk' | 'githubcopilot' | 'other')[];
835
+ createdAt: string;
836
+ updatedAt: string;
837
+ }
820
838
  export interface CreateTaskBlueprintDto {
821
839
  name: string;
822
840
  description: string;
@@ -895,34 +913,6 @@ export interface ProtectedResourceMetadataResponseDto {
895
913
  bearer_methods_supported: string[];
896
914
  resource_name: string;
897
915
  }
898
- export interface ExecutionResponseDto {
899
- id: string;
900
- taskId: string;
901
- taskName?: string | null;
902
- agentActorId: string;
903
- agentSlug?: string | null;
904
- agentName?: string | null;
905
- status: 'READY' | 'CLAIMED' | 'RUNNING' | 'STOP_REQUESTED' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'STALE';
906
- requestedAt: string;
907
- claimedAt?: string | null;
908
- startedAt?: string | null;
909
- finishedAt?: string | null;
910
- workerSessionId?: string | null;
911
- leaseExpiresAt?: string | null;
912
- stopRequestedAt?: string | null;
913
- failureReason?: string | null;
914
- triggerReason?: string | null;
915
- rowVersion: number;
916
- createdAt: string;
917
- updatedAt: string;
918
- }
919
- export interface ExecutionListResponseDto {
920
- items: ExecutionResponseDto[];
921
- total: number;
922
- page: number;
923
- limit: number;
924
- totalPages: number;
925
- }
926
916
  export interface GlobalSearchResultDto {
927
917
  id: string;
928
918
  type: 'task' | 'context_block' | 'agent' | 'project' | 'tag' | 'tool';
@@ -0,0 +1,9 @@
1
+ import { BaseClient, ClientConfig } from './base-client.js';
2
+ import type { WorkerResponseDto } from './types.js';
3
+ export declare class WorkersResource extends BaseClient {
4
+ constructor(config: ClientConfig);
5
+ /** List all workers */
6
+ WorkersController_listWorkers(params?: {
7
+ signal?: AbortSignal;
8
+ }): Promise<WorkerResponseDto[]>;
9
+ }
@@ -0,0 +1,10 @@
1
+ import { BaseClient } from './base-client.js';
2
+ export class WorkersResource extends BaseClient {
3
+ constructor(config) {
4
+ super(config);
5
+ }
6
+ /** List all workers */
7
+ async WorkersController_listWorkers(params) {
8
+ return this.request('GET', '/api/v1/workers', { signal: params?.signal });
9
+ }
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taico/client",
3
- "version": "0.2.6",
3
+ "version": "0.2.9",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -1,23 +0,0 @@
1
- import type { ExecutionResponseDto } from './ExecutionResponseDto.js';
2
- export type ExecutionListResponseDto = {
3
- /**
4
- * Array of task executions
5
- */
6
- items: Array<ExecutionResponseDto>;
7
- /**
8
- * Total number of executions matching the filter
9
- */
10
- total: number;
11
- /**
12
- * Current page number (1-indexed)
13
- */
14
- page: number;
15
- /**
16
- * Number of items per page
17
- */
18
- limit: number;
19
- /**
20
- * Total number of pages
21
- */
22
- totalPages: number;
23
- };
@@ -1,93 +0,0 @@
1
- export type ExecutionResponseDto = {
2
- /**
3
- * Unique execution identifier
4
- */
5
- id: string;
6
- /**
7
- * Task ID
8
- */
9
- taskId: string;
10
- /**
11
- * Task name
12
- */
13
- taskName?: string | null;
14
- /**
15
- * Agent actor ID
16
- */
17
- agentActorId: string;
18
- /**
19
- * Agent slug
20
- */
21
- agentSlug?: string | null;
22
- /**
23
- * Agent name
24
- */
25
- agentName?: string | null;
26
- /**
27
- * Execution status
28
- */
29
- status: ExecutionResponseDto.status;
30
- /**
31
- * When the execution was requested
32
- */
33
- requestedAt: string;
34
- /**
35
- * When the execution was claimed by a worker
36
- */
37
- claimedAt?: string | null;
38
- /**
39
- * When the execution started running
40
- */
41
- startedAt?: string | null;
42
- /**
43
- * When the execution finished
44
- */
45
- finishedAt?: string | null;
46
- /**
47
- * Worker session ID that claimed this execution
48
- */
49
- workerSessionId?: string | null;
50
- /**
51
- * When the worker lease expires
52
- */
53
- leaseExpiresAt?: string | null;
54
- /**
55
- * When a stop was requested
56
- */
57
- stopRequestedAt?: string | null;
58
- /**
59
- * Failure reason if execution failed
60
- */
61
- failureReason?: string | null;
62
- /**
63
- * Why this execution was triggered
64
- */
65
- triggerReason?: string | null;
66
- /**
67
- * Row version for optimistic locking
68
- */
69
- rowVersion: number;
70
- /**
71
- * Execution creation timestamp
72
- */
73
- createdAt: string;
74
- /**
75
- * Execution last update timestamp
76
- */
77
- updatedAt: string;
78
- };
79
- export declare namespace ExecutionResponseDto {
80
- /**
81
- * Execution status
82
- */
83
- enum status {
84
- READY = "READY",
85
- CLAIMED = "CLAIMED",
86
- RUNNING = "RUNNING",
87
- STOP_REQUESTED = "STOP_REQUESTED",
88
- COMPLETED = "COMPLETED",
89
- FAILED = "FAILED",
90
- CANCELLED = "CANCELLED",
91
- STALE = "STALE"
92
- }
93
- }
@@ -1,17 +0,0 @@
1
- export var ExecutionResponseDto;
2
- (function (ExecutionResponseDto) {
3
- /**
4
- * Execution status
5
- */
6
- let status;
7
- (function (status) {
8
- status["READY"] = "READY";
9
- status["CLAIMED"] = "CLAIMED";
10
- status["RUNNING"] = "RUNNING";
11
- status["STOP_REQUESTED"] = "STOP_REQUESTED";
12
- status["COMPLETED"] = "COMPLETED";
13
- status["FAILED"] = "FAILED";
14
- status["CANCELLED"] = "CANCELLED";
15
- status["STALE"] = "STALE";
16
- })(status = ExecutionResponseDto.status || (ExecutionResponseDto.status = {}));
17
- })(ExecutionResponseDto || (ExecutionResponseDto = {}));
@@ -1,46 +0,0 @@
1
- import type { ActiveTaskExecutionResponseDto } from '../models/ActiveTaskExecutionResponseDto.js';
2
- import type { StopActiveTaskExecutionDto } from '../models/StopActiveTaskExecutionDto.js';
3
- import type { TaskExecutionHistoryResponseDto } from '../models/TaskExecutionHistoryResponseDto.js';
4
- import type { TaskExecutionQueueEntryResponseDto } from '../models/TaskExecutionQueueEntryResponseDto.js';
5
- import type { CancelablePromise } from '../core/CancelablePromise.js';
6
- import type { OpenAPIConfig } from '../core/OpenAPI.js';
7
- export declare class ExecutionsV2Service {
8
- /**
9
- * List the current task execution work queue
10
- * Returns the tasks currently present in the v2 execution queue. Presence means the task is ready to be picked by the executor.
11
- * @returns TaskExecutionQueueEntryResponseDto
12
- * @throws ApiError
13
- */
14
- static taskExecutionQueueControllerListQueue(config?: OpenAPIConfig): CancelablePromise<Array<TaskExecutionQueueEntryResponseDto>>;
15
- /**
16
- * Claim a specific task from the execution queue
17
- * Atomically removes the task from the queue and inserts it into the active execution table.
18
- * @param taskId Task ID to claim
19
- * @returns ActiveTaskExecutionResponseDto
20
- * @throws ApiError
21
- */
22
- static taskExecutionQueueControllerClaimTask(taskId: string, config?: OpenAPIConfig): CancelablePromise<ActiveTaskExecutionResponseDto>;
23
- /**
24
- * List active task executions
25
- * Returns the tasks currently being worked on in the v2 execution system.
26
- * @returns ActiveTaskExecutionResponseDto
27
- * @throws ApiError
28
- */
29
- static activeTaskExecutionControllerListActiveExecutions(config?: OpenAPIConfig): CancelablePromise<Array<ActiveTaskExecutionResponseDto>>;
30
- /**
31
- * Stop an active task execution and move it to history
32
- * Atomically removes the execution from the active execution table and inserts it into the history table.
33
- * @param executionId Execution ID to stop
34
- * @param requestBody
35
- * @returns TaskExecutionHistoryResponseDto
36
- * @throws ApiError
37
- */
38
- static activeTaskExecutionControllerStopTaskExecution(executionId: string, requestBody: StopActiveTaskExecutionDto, config?: OpenAPIConfig): CancelablePromise<TaskExecutionHistoryResponseDto>;
39
- /**
40
- * List task execution history
41
- * Returns the persisted execution history rows in the v2 execution system.
42
- * @returns TaskExecutionHistoryResponseDto
43
- * @throws ApiError
44
- */
45
- static taskExecutionHistoryControllerListHistory(config?: OpenAPIConfig): CancelablePromise<Array<TaskExecutionHistoryResponseDto>>;
46
- }
@@ -1,75 +0,0 @@
1
- import { OpenAPI } from '../core/OpenAPI.js';
2
- import { request as __request } from '../core/request.js';
3
- export class ExecutionsV2Service {
4
- /**
5
- * List the current task execution work queue
6
- * Returns the tasks currently present in the v2 execution queue. Presence means the task is ready to be picked by the executor.
7
- * @returns TaskExecutionQueueEntryResponseDto
8
- * @throws ApiError
9
- */
10
- static taskExecutionQueueControllerListQueue(config = OpenAPI) {
11
- return __request(config, {
12
- method: 'GET',
13
- url: '/api/v1/executions-v2/queue',
14
- });
15
- }
16
- /**
17
- * Claim a specific task from the execution queue
18
- * Atomically removes the task from the queue and inserts it into the active execution table.
19
- * @param taskId Task ID to claim
20
- * @returns ActiveTaskExecutionResponseDto
21
- * @throws ApiError
22
- */
23
- static taskExecutionQueueControllerClaimTask(taskId, config = OpenAPI) {
24
- return __request(config, {
25
- method: 'POST',
26
- url: '/api/v1/executions-v2/queue/{taskId}/claim',
27
- path: {
28
- 'taskId': taskId,
29
- },
30
- });
31
- }
32
- /**
33
- * List active task executions
34
- * Returns the tasks currently being worked on in the v2 execution system.
35
- * @returns ActiveTaskExecutionResponseDto
36
- * @throws ApiError
37
- */
38
- static activeTaskExecutionControllerListActiveExecutions(config = OpenAPI) {
39
- return __request(config, {
40
- method: 'GET',
41
- url: '/api/v1/executions-v2/active',
42
- });
43
- }
44
- /**
45
- * Stop an active task execution and move it to history
46
- * Atomically removes the execution from the active execution table and inserts it into the history table.
47
- * @param executionId Execution ID to stop
48
- * @param requestBody
49
- * @returns TaskExecutionHistoryResponseDto
50
- * @throws ApiError
51
- */
52
- static activeTaskExecutionControllerStopTaskExecution(executionId, requestBody, config = OpenAPI) {
53
- return __request(config, {
54
- method: 'POST',
55
- url: '/api/v1/executions-v2/active/{executionId}/stop',
56
- path: {
57
- 'executionId': executionId,
58
- },
59
- body: requestBody,
60
- mediaType: 'application/json',
61
- });
62
- }
63
- /**
64
- * List task execution history
65
- * Returns the persisted execution history rows in the v2 execution system.
66
- * @returns TaskExecutionHistoryResponseDto
67
- * @throws ApiError
68
- */
69
- static taskExecutionHistoryControllerListHistory(config = OpenAPI) {
70
- return __request(config, {
71
- method: 'GET',
72
- url: '/api/v1/executions-v2/history',
73
- });
74
- }
75
- }
@@ -1,28 +0,0 @@
1
- import { BaseClient, ClientConfig } from './base-client.js';
2
- import type { ActiveTaskExecutionResponseDto, StopActiveTaskExecutionDto, TaskExecutionHistoryResponseDto, TaskExecutionQueueEntryResponseDto } from './types.js';
3
- export declare class ExecutionsV2Resource extends BaseClient {
4
- constructor(config: ClientConfig);
5
- /** List the current task execution work queue */
6
- TaskExecutionQueueController_listQueue(params?: {
7
- signal?: AbortSignal;
8
- }): Promise<TaskExecutionQueueEntryResponseDto[]>;
9
- /** Claim a specific task from the execution queue */
10
- TaskExecutionQueueController_claimTask(params: {
11
- taskId: string;
12
- signal?: AbortSignal;
13
- }): Promise<ActiveTaskExecutionResponseDto>;
14
- /** List active task executions */
15
- ActiveTaskExecutionController_listActiveExecutions(params?: {
16
- signal?: AbortSignal;
17
- }): Promise<ActiveTaskExecutionResponseDto[]>;
18
- /** Stop an active task execution and move it to history */
19
- ActiveTaskExecutionController_stopTaskExecution(params: {
20
- executionId: string;
21
- body: StopActiveTaskExecutionDto;
22
- signal?: AbortSignal;
23
- }): Promise<TaskExecutionHistoryResponseDto>;
24
- /** List task execution history */
25
- TaskExecutionHistoryController_listHistory(params?: {
26
- signal?: AbortSignal;
27
- }): Promise<TaskExecutionHistoryResponseDto[]>;
28
- }