@taico/taico 0.2.13 → 0.2.15
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/agents/agent-avatar.library.d.ts +15 -0
- package/dist/agents/agent-avatar.library.js +128 -0
- package/dist/agents/agent-avatar.library.js.map +1 -0
- package/dist/agents/agent-template.catalog.js +5 -3
- package/dist/agents/agent-template.catalog.js.map +1 -1
- package/dist/agents/agents.service.d.ts +1 -0
- package/dist/agents/agents.service.js +14 -3
- package/dist/agents/agents.service.js.map +1 -1
- package/dist/agents/dto/agent-response.dto.js +1 -1
- package/dist/agents/dto/agent-response.dto.js.map +1 -1
- package/dist/agents/dto/agent-template-catalog-response.dto.d.ts +7 -0
- package/dist/agents/dto/agent-template-catalog-response.dto.js +41 -1
- package/dist/agents/dto/agent-template-catalog-response.dto.js.map +1 -1
- package/dist/agents/dto/create-agent.dto.js +1 -1
- package/dist/agents/dto/create-agent.dto.js.map +1 -1
- package/dist/agents/dto/patch-agent.dto.js +1 -1
- package/dist/agents/dto/patch-agent.dto.js.map +1 -1
- package/dist/agents/enums/agent-type.enum.d.ts +0 -1
- package/dist/agents/enums/agent-type.enum.js +1 -9
- package/dist/agents/enums/agent-type.enum.js.map +1 -1
- package/dist/agents/errors/agents.errors.d.ts +3 -0
- package/dist/agents/errors/agents.errors.js +7 -1
- package/dist/agents/errors/agents.errors.js.map +1 -1
- package/dist/app-init/agent/code-reviewer.agent.js +2 -1
- package/dist/app-init/agent/code-reviewer.agent.js.map +1 -1
- package/dist/app-init/agent/codex-dev.agent.js +2 -1
- package/dist/app-init/agent/codex-dev.agent.js.map +1 -1
- package/dist/app-init/agent/gemini-assistant.agent.js +2 -1
- package/dist/app-init/agent/gemini-assistant.agent.js.map +1 -1
- package/dist/app-init/agent/taico.agent.js +2 -1
- package/dist/app-init/agent/taico.agent.js.map +1 -1
- package/dist/app.module.js +4 -0
- package/dist/app.module.js.map +1 -1
- package/dist/context/context.mcp.gateway.js +1 -1
- package/dist/context/context.mcp.gateway.js.map +1 -1
- package/dist/executions/active/active-task-execution.controller.d.ts +6 -2
- package/dist/executions/active/active-task-execution.controller.js +80 -6
- package/dist/executions/active/active-task-execution.controller.js.map +1 -1
- package/dist/executions/active/active-task-execution.entity.d.ts +2 -0
- package/dist/executions/active/active-task-execution.entity.js +10 -0
- package/dist/executions/active/active-task-execution.entity.js.map +1 -1
- package/dist/executions/active/active-task-execution.service.d.ts +27 -2
- package/dist/executions/active/active-task-execution.service.js +88 -7
- package/dist/executions/active/active-task-execution.service.js.map +1 -1
- package/dist/executions/active/dto/http/active-task-execution-list-response.dto.d.ts +8 -0
- package/dist/executions/active/dto/http/active-task-execution-list-response.dto.js +62 -0
- package/dist/executions/active/dto/http/active-task-execution-list-response.dto.js.map +1 -0
- package/dist/executions/active/dto/http/active-task-execution-response.dto.d.ts +2 -0
- package/dist/executions/active/dto/http/active-task-execution-response.dto.js +11 -0
- package/dist/executions/active/dto/http/active-task-execution-response.dto.js.map +1 -1
- package/dist/executions/active/dto/http/list-active-executions-query.dto.d.ts +5 -0
- package/dist/executions/active/dto/http/list-active-executions-query.dto.js +55 -0
- package/dist/executions/active/dto/http/list-active-executions-query.dto.js.map +1 -0
- package/dist/executions/active/dto/http/update-execution-stats.dto.d.ts +8 -0
- package/dist/executions/active/dto/http/update-execution-stats.dto.js +108 -0
- package/dist/executions/active/dto/http/update-execution-stats.dto.js.map +1 -0
- package/dist/executions/dto/http/execution-stats-response.dto.d.ts +10 -0
- package/dist/executions/dto/http/execution-stats-response.dto.js +87 -0
- package/dist/executions/dto/http/execution-stats-response.dto.js.map +1 -0
- package/dist/executions/errors/executions.errors.d.ts +3 -0
- package/dist/executions/errors/executions.errors.js +7 -1
- package/dist/executions/errors/executions.errors.js.map +1 -1
- package/dist/executions/events/execution-interrupt.event.d.ts +15 -0
- package/dist/executions/events/execution-interrupt.event.js +15 -0
- package/dist/executions/events/execution-interrupt.event.js.map +1 -0
- package/dist/executions/executions-worker.gateway.d.ts +3 -0
- package/dist/executions/executions-worker.gateway.js +41 -0
- package/dist/executions/executions-worker.gateway.js.map +1 -1
- package/dist/executions/executions.module.js +2 -0
- package/dist/executions/executions.module.js.map +1 -1
- package/dist/executions/history/dto/http/list-history-query.dto.d.ts +5 -0
- package/dist/executions/history/dto/http/list-history-query.dto.js +55 -0
- package/dist/executions/history/dto/http/list-history-query.dto.js.map +1 -0
- package/dist/executions/history/dto/http/task-execution-history-list-response.dto.d.ts +8 -0
- package/dist/executions/history/dto/http/task-execution-history-list-response.dto.js +62 -0
- package/dist/executions/history/dto/http/task-execution-history-list-response.dto.js.map +1 -0
- package/dist/executions/history/dto/http/task-execution-history-response.dto.d.ts +2 -0
- package/dist/executions/history/dto/http/task-execution-history-response.dto.js +11 -0
- package/dist/executions/history/dto/http/task-execution-history-response.dto.js.map +1 -1
- package/dist/executions/history/task-execution-history-error-code.enum.d.ts +1 -0
- package/dist/executions/history/task-execution-history-error-code.enum.js +1 -0
- package/dist/executions/history/task-execution-history-error-code.enum.js.map +1 -1
- package/dist/executions/history/task-execution-history.controller.d.ts +3 -2
- package/dist/executions/history/task-execution-history.controller.js +22 -6
- package/dist/executions/history/task-execution-history.controller.js.map +1 -1
- package/dist/executions/history/task-execution-history.entity.d.ts +2 -0
- package/dist/executions/history/task-execution-history.entity.js +10 -0
- package/dist/executions/history/task-execution-history.entity.js.map +1 -1
- package/dist/executions/history/task-execution-history.service.d.ts +12 -1
- package/dist/executions/history/task-execution-history.service.js +36 -4
- package/dist/executions/history/task-execution-history.service.js.map +1 -1
- package/dist/executions/history/task-execution-history.service.spec.d.ts +1 -0
- package/dist/executions/history/task-execution-history.service.spec.js +132 -0
- package/dist/executions/history/task-execution-history.service.spec.js.map +1 -0
- package/dist/executions/queue/dto/http/list-queue-query.dto.d.ts +4 -0
- package/dist/executions/queue/dto/http/list-queue-query.dto.js +45 -0
- package/dist/executions/queue/dto/http/list-queue-query.dto.js.map +1 -0
- package/dist/executions/queue/dto/http/task-execution-queue-list-response.dto.d.ts +8 -0
- package/dist/executions/queue/dto/http/task-execution-queue-list-response.dto.js +62 -0
- package/dist/executions/queue/dto/http/task-execution-queue-list-response.dto.js.map +1 -0
- package/dist/executions/queue/task-execution-queue.controller.d.ts +3 -2
- package/dist/executions/queue/task-execution-queue.controller.js +18 -6
- package/dist/executions/queue/task-execution-queue.controller.js.map +1 -1
- package/dist/executions/queue/task-execution-queue.service.d.ts +9 -1
- package/dist/executions/queue/task-execution-queue.service.js +8 -2
- package/dist/executions/queue/task-execution-queue.service.js.map +1 -1
- package/dist/executions/readiness/task-execution-queue-populator.service.d.ts +4 -1
- package/dist/executions/readiness/task-execution-queue-populator.service.js +42 -2
- package/dist/executions/readiness/task-execution-queue-populator.service.js.map +1 -1
- package/dist/executions/readiness/task-execution-queue-populator.service.spec.js +196 -0
- package/dist/executions/readiness/task-execution-queue-populator.service.spec.js.map +1 -1
- package/dist/executions/stats/execution-stats.entity.d.ts +12 -0
- package/dist/executions/stats/execution-stats.entity.js +70 -0
- package/dist/executions/stats/execution-stats.entity.js.map +1 -0
- package/dist/llm/openai-responses.service.js +1 -1
- package/dist/migrations/1742500000000-AllowInterruptedExecutionErrorCode.d.ts +7 -0
- package/dist/migrations/1742500000000-AllowInterruptedExecutionErrorCode.js +116 -0
- package/dist/migrations/1742500000000-AllowInterruptedExecutionErrorCode.js.map +1 -0
- package/dist/migrations/1742600000000-AddExecutionStatsTable.d.ts +5 -0
- package/dist/migrations/1742600000000-AddExecutionStatsTable.js +36 -0
- package/dist/migrations/1742600000000-AddExecutionStatsTable.js.map +1 -0
- package/dist/public/assets/index-BDd_IOss.css +1 -0
- package/dist/public/assets/index-BwirgFmY.js +73 -0
- package/dist/public/avatar/angus.png +0 -0
- package/dist/public/avatar/bruce.png +0 -0
- package/dist/public/avatar/claude.webp +0 -0
- package/dist/public/avatar/cockatoo.png +0 -0
- package/dist/public/avatar/gemini.png +0 -0
- package/dist/public/avatar/grace.png +0 -0
- package/dist/public/avatar/gustav.png +0 -0
- package/dist/public/avatar/openai.svg +15 -0
- package/dist/public/avatar/opencode.svg +1 -0
- package/dist/public/avatar/qwen.png +0 -0
- package/dist/public/avatar/stacy.png +0 -0
- package/dist/public/avatar/taico.png +0 -0
- package/dist/public/beta/assets/{index-g8TuopEh.js → index-Bnn4h6Il.js} +1 -1
- package/dist/public/beta/index.html +1 -1
- package/dist/public/index.html +2 -2
- package/dist/threads/backends/chat-backend.utils.js +16 -3
- package/dist/threads/backends/chat-backend.utils.js.map +1 -1
- package/dist/threads/backends/openai.backend.js +3 -3
- package/dist/threads/backends/openai.backend.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -5
- package/dist/public/assets/index-Cl8y_6g0.css +0 -1
- package/dist/public/assets/index-DaHPYsvL.js +0 -73
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ActiveTaskExecutionListResponseDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
const active_task_execution_response_dto_1 = require("./active-task-execution-response.dto");
|
|
17
|
+
class ActiveTaskExecutionListResponseDto {
|
|
18
|
+
items;
|
|
19
|
+
total;
|
|
20
|
+
page;
|
|
21
|
+
limit;
|
|
22
|
+
totalPages;
|
|
23
|
+
}
|
|
24
|
+
exports.ActiveTaskExecutionListResponseDto = ActiveTaskExecutionListResponseDto;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, swagger_1.ApiProperty)({
|
|
27
|
+
description: 'List of active task executions',
|
|
28
|
+
type: () => [active_task_execution_response_dto_1.ActiveTaskExecutionResponseDto],
|
|
29
|
+
}),
|
|
30
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
31
|
+
(0, class_transformer_1.Type)(() => active_task_execution_response_dto_1.ActiveTaskExecutionResponseDto),
|
|
32
|
+
__metadata("design:type", Array)
|
|
33
|
+
], ActiveTaskExecutionListResponseDto.prototype, "items", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, swagger_1.ApiProperty)({
|
|
36
|
+
description: 'Total number of active executions',
|
|
37
|
+
example: 42,
|
|
38
|
+
}),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], ActiveTaskExecutionListResponseDto.prototype, "total", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, swagger_1.ApiProperty)({
|
|
43
|
+
description: 'Current page number',
|
|
44
|
+
example: 1,
|
|
45
|
+
}),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], ActiveTaskExecutionListResponseDto.prototype, "page", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, swagger_1.ApiProperty)({
|
|
50
|
+
description: 'Number of items per page',
|
|
51
|
+
example: 50,
|
|
52
|
+
}),
|
|
53
|
+
__metadata("design:type", Number)
|
|
54
|
+
], ActiveTaskExecutionListResponseDto.prototype, "limit", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, swagger_1.ApiProperty)({
|
|
57
|
+
description: 'Total number of pages',
|
|
58
|
+
example: 3,
|
|
59
|
+
}),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], ActiveTaskExecutionListResponseDto.prototype, "totalPages", void 0);
|
|
62
|
+
//# sourceMappingURL=active-task-execution-list-response.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"active-task-execution-list-response.dto.js","sourceRoot":"","sources":["../../../../../src/executions/active/dto/http/active-task-execution-list-response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,yDAAyC;AACzC,qDAAiD;AACjD,6FAAsF;AAEtF,MAAa,kCAAkC;IAO7C,KAAK,CAAoC;IAMzC,KAAK,CAAU;IAMf,IAAI,CAAU;IAMd,KAAK,CAAU;IAMf,UAAU,CAAU;CACrB;AAhCD,gFAgCC;AAzBC;IANC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,gCAAgC;QAC7C,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,mEAA8B,CAAC;KAC7C,CAAC;IACD,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,mEAA8B,CAAC;;iEACF;AAMzC;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,mCAAmC;QAChD,OAAO,EAAE,EAAE;KACZ,CAAC;;iEACa;AAMf;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,qBAAqB;QAClC,OAAO,EAAE,CAAC;KACX,CAAC;;gEACY;AAMd;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,0BAA0B;QACvC,OAAO,EAAE,EAAE;KACZ,CAAC;;iEACa;AAMf;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,uBAAuB;QACpC,OAAO,EAAE,CAAC;KACX,CAAC;;sEACkB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TaskStatus } from '../../../../tasks/enums';
|
|
2
2
|
import { ActiveTaskExecutionEntity, type ActiveTaskExecutionTagSnapshot } from '../../active-task-execution.entity';
|
|
3
|
+
import { ExecutionStatsResponseDto } from '../../../dto/http/execution-stats-response.dto';
|
|
3
4
|
declare class ActiveTaskExecutionTagSnapshotResponseDto {
|
|
4
5
|
id: string;
|
|
5
6
|
name: string;
|
|
@@ -19,6 +20,7 @@ export declare class ActiveTaskExecutionResponseDto {
|
|
|
19
20
|
workerClientId: string;
|
|
20
21
|
taskAssigneeActorIdBeforeClaim: string | null;
|
|
21
22
|
agentActorId: string;
|
|
23
|
+
stats: ExecutionStatsResponseDto | null;
|
|
22
24
|
static fromEntity(entity: ActiveTaskExecutionEntity): ActiveTaskExecutionResponseDto;
|
|
23
25
|
}
|
|
24
26
|
export {};
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ActiveTaskExecutionResponseDto = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const enums_1 = require("../../../../tasks/enums");
|
|
15
|
+
const execution_stats_response_dto_1 = require("../../../dto/http/execution-stats-response.dto");
|
|
15
16
|
class ActiveTaskExecutionTagSnapshotResponseDto {
|
|
16
17
|
id;
|
|
17
18
|
name;
|
|
@@ -50,6 +51,7 @@ class ActiveTaskExecutionResponseDto {
|
|
|
50
51
|
workerClientId;
|
|
51
52
|
taskAssigneeActorIdBeforeClaim;
|
|
52
53
|
agentActorId;
|
|
54
|
+
stats;
|
|
53
55
|
static fromEntity(entity) {
|
|
54
56
|
return {
|
|
55
57
|
id: entity.id,
|
|
@@ -65,6 +67,7 @@ class ActiveTaskExecutionResponseDto {
|
|
|
65
67
|
workerClientId: entity.workerClientId,
|
|
66
68
|
taskAssigneeActorIdBeforeClaim: entity.taskAssigneeActorIdBeforeClaim,
|
|
67
69
|
agentActorId: entity.agentActorId,
|
|
70
|
+
stats: entity.stats ? execution_stats_response_dto_1.ExecutionStatsResponseDto.fromEntity(entity.stats) : null,
|
|
68
71
|
};
|
|
69
72
|
}
|
|
70
73
|
}
|
|
@@ -169,4 +172,12 @@ __decorate([
|
|
|
169
172
|
}),
|
|
170
173
|
__metadata("design:type", String)
|
|
171
174
|
], ActiveTaskExecutionResponseDto.prototype, "agentActorId", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
(0, swagger_1.ApiProperty)({
|
|
177
|
+
description: 'Execution metadata and usage stats',
|
|
178
|
+
type: execution_stats_response_dto_1.ExecutionStatsResponseDto,
|
|
179
|
+
nullable: true,
|
|
180
|
+
}),
|
|
181
|
+
__metadata("design:type", Object)
|
|
182
|
+
], ActiveTaskExecutionResponseDto.prototype, "stats", void 0);
|
|
172
183
|
//# sourceMappingURL=active-task-execution-response.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"active-task-execution-response.dto.js","sourceRoot":"","sources":["../../../../../src/executions/active/dto/http/active-task-execution-response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,mDAAqD;
|
|
1
|
+
{"version":3,"file":"active-task-execution-response.dto.js","sourceRoot":"","sources":["../../../../../src/executions/active/dto/http/active-task-execution-response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,mDAAqD;AAKrD,iGAA2F;AAE3F,MAAM,yCAAyC;IAK7C,EAAE,CAAU;IAMZ,IAAI,CAAU;IAEd,MAAM,CAAC,YAAY,CACjB,QAAwC;QAExC,OAAO;YACL,EAAE,EAAE,QAAQ,CAAC,EAAE;YACf,IAAI,EAAE,QAAQ,CAAC,IAAI;SACpB,CAAC;IACJ,CAAC;CACF;AAhBC;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,sCAAsC;KAChD,CAAC;;qEACU;AAMZ;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,2CAA2C;QACxD,OAAO,EAAE,SAAS;KACnB,CAAC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C;QACX,WAAW,EAAE,qDAAqD;QAClE,OAAO,EAAE,kCAAkC;KAC5C,CAAC;;sEACsB;AAQxB;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,oDAAoD;QACjE,OAAO,EAAE,sCAAsC;QAC/C,QAAQ,EAAE,IAAI;KACf,CAAC;;sFAC6C;AAM/C;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,wCAAwC;QACrD,OAAO,EAAE,sCAAsC;KAChD,CAAC;;oEACoB;AAOtB;IALC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,oCAAoC;QACjD,IAAI,EAAE,wDAAyB;QAC/B,QAAQ,EAAE,IAAI;KACf,CAAC;;6DACuC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ListActiveExecutionsQueryDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const class_transformer_1 = require("class-transformer");
|
|
16
|
+
class ListActiveExecutionsQueryDto {
|
|
17
|
+
page = 1;
|
|
18
|
+
limit = 50;
|
|
19
|
+
taskId;
|
|
20
|
+
}
|
|
21
|
+
exports.ListActiveExecutionsQueryDto = ListActiveExecutionsQueryDto;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
24
|
+
description: 'Page number (1-indexed)',
|
|
25
|
+
example: 1,
|
|
26
|
+
default: 1,
|
|
27
|
+
}),
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
(0, class_transformer_1.Transform)(({ value }) => Number(value)),
|
|
30
|
+
(0, class_validator_1.IsInt)(),
|
|
31
|
+
(0, class_validator_1.Min)(1),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], ListActiveExecutionsQueryDto.prototype, "page", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
36
|
+
description: 'Items per page (1-100)',
|
|
37
|
+
example: 50,
|
|
38
|
+
default: 50,
|
|
39
|
+
}),
|
|
40
|
+
(0, class_validator_1.IsOptional)(),
|
|
41
|
+
(0, class_transformer_1.Transform)(({ value }) => Number(value)),
|
|
42
|
+
(0, class_validator_1.IsInt)(),
|
|
43
|
+
(0, class_validator_1.Min)(1),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], ListActiveExecutionsQueryDto.prototype, "limit", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
48
|
+
description: 'Filter by task ID',
|
|
49
|
+
example: '123e4567-e89b-12d3-a456-426614174000',
|
|
50
|
+
}),
|
|
51
|
+
(0, class_validator_1.IsOptional)(),
|
|
52
|
+
(0, class_validator_1.IsUUID)(),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], ListActiveExecutionsQueryDto.prototype, "taskId", void 0);
|
|
55
|
+
//# sourceMappingURL=list-active-executions-query.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-active-executions-query.dto.js","sourceRoot":"","sources":["../../../../../src/executions/active/dto/http/list-active-executions-query.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiE;AACjE,6CAAsD;AACtD,yDAA8C;AAE9C,MAAa,4BAA4B;IAUvC,IAAI,GAAY,CAAC,CAAC;IAWlB,KAAK,GAAY,EAAE,CAAC;IAQpB,MAAM,CAAU;CACjB;AA9BD,oEA8BC;AApBC;IATC,IAAA,6BAAmB,EAAC;QACnB,WAAW,EAAE,yBAAyB;QACtC,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;KACX,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAG,EAAC,CAAC,CAAC;;0DACW;AAWlB;IATC,IAAA,6BAAmB,EAAC;QACnB,WAAW,EAAE,wBAAwB;QACrC,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;KACZ,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAG,EAAC,CAAC,CAAC;;2DACa;AAQpB;IANC,IAAA,6BAAmB,EAAC;QACnB,WAAW,EAAE,mBAAmB;QAChC,OAAO,EAAE,sCAAsC;KAChD,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;4DACO"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UpdateExecutionStatsDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class UpdateExecutionStatsDto {
|
|
16
|
+
harness;
|
|
17
|
+
providerId;
|
|
18
|
+
modelId;
|
|
19
|
+
inputTokens;
|
|
20
|
+
outputTokens;
|
|
21
|
+
totalTokens;
|
|
22
|
+
}
|
|
23
|
+
exports.UpdateExecutionStatsDto = UpdateExecutionStatsDto;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, swagger_1.ApiProperty)({
|
|
26
|
+
type: String,
|
|
27
|
+
required: false,
|
|
28
|
+
nullable: true,
|
|
29
|
+
description: 'Harness used by the worker to run this execution',
|
|
30
|
+
example: 'opencode',
|
|
31
|
+
maxLength: 50,
|
|
32
|
+
}),
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
(0, class_validator_1.MaxLength)(50),
|
|
36
|
+
__metadata("design:type", Object)
|
|
37
|
+
], UpdateExecutionStatsDto.prototype, "harness", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)({
|
|
40
|
+
type: String,
|
|
41
|
+
required: false,
|
|
42
|
+
nullable: true,
|
|
43
|
+
description: 'Model provider id used by the harness',
|
|
44
|
+
example: 'openai',
|
|
45
|
+
maxLength: 100,
|
|
46
|
+
}),
|
|
47
|
+
(0, class_validator_1.IsOptional)(),
|
|
48
|
+
(0, class_validator_1.IsString)(),
|
|
49
|
+
(0, class_validator_1.MaxLength)(100),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], UpdateExecutionStatsDto.prototype, "providerId", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, swagger_1.ApiProperty)({
|
|
54
|
+
type: String,
|
|
55
|
+
required: false,
|
|
56
|
+
nullable: true,
|
|
57
|
+
description: 'Model id used by the harness',
|
|
58
|
+
example: 'gpt-5.4',
|
|
59
|
+
maxLength: 255,
|
|
60
|
+
}),
|
|
61
|
+
(0, class_validator_1.IsOptional)(),
|
|
62
|
+
(0, class_validator_1.IsString)(),
|
|
63
|
+
(0, class_validator_1.MaxLength)(255),
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
|
+
], UpdateExecutionStatsDto.prototype, "modelId", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, swagger_1.ApiProperty)({
|
|
68
|
+
type: Number,
|
|
69
|
+
required: false,
|
|
70
|
+
nullable: true,
|
|
71
|
+
description: 'Input token usage when available',
|
|
72
|
+
example: 1200,
|
|
73
|
+
minimum: 0,
|
|
74
|
+
}),
|
|
75
|
+
(0, class_validator_1.IsOptional)(),
|
|
76
|
+
(0, class_validator_1.IsInt)(),
|
|
77
|
+
(0, class_validator_1.Min)(0),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], UpdateExecutionStatsDto.prototype, "inputTokens", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, swagger_1.ApiProperty)({
|
|
82
|
+
type: Number,
|
|
83
|
+
required: false,
|
|
84
|
+
nullable: true,
|
|
85
|
+
description: 'Output token usage when available',
|
|
86
|
+
example: 380,
|
|
87
|
+
minimum: 0,
|
|
88
|
+
}),
|
|
89
|
+
(0, class_validator_1.IsOptional)(),
|
|
90
|
+
(0, class_validator_1.IsInt)(),
|
|
91
|
+
(0, class_validator_1.Min)(0),
|
|
92
|
+
__metadata("design:type", Object)
|
|
93
|
+
], UpdateExecutionStatsDto.prototype, "outputTokens", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, swagger_1.ApiProperty)({
|
|
96
|
+
type: Number,
|
|
97
|
+
required: false,
|
|
98
|
+
nullable: true,
|
|
99
|
+
description: 'Total token usage when available',
|
|
100
|
+
example: 1580,
|
|
101
|
+
minimum: 0,
|
|
102
|
+
}),
|
|
103
|
+
(0, class_validator_1.IsOptional)(),
|
|
104
|
+
(0, class_validator_1.IsInt)(),
|
|
105
|
+
(0, class_validator_1.Min)(0),
|
|
106
|
+
__metadata("design:type", Object)
|
|
107
|
+
], UpdateExecutionStatsDto.prototype, "totalTokens", void 0);
|
|
108
|
+
//# sourceMappingURL=update-execution-stats.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-execution-stats.dto.js","sourceRoot":"","sources":["../../../../../src/executions/active/dto/http/update-execution-stats.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAMyB;AAEzB,MAAa,uBAAuB;IAYlC,OAAO,CAAiB;IAaxB,UAAU,CAAiB;IAa3B,OAAO,CAAiB;IAaxB,WAAW,CAAiB;IAa5B,YAAY,CAAiB;IAa7B,WAAW,CAAiB;CAC7B;AA9ED,0DA8EC;AAlEC;IAXC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,kDAAkD;QAC/D,OAAO,EAAE,UAAU;QACnB,SAAS,EAAE,EAAE;KACd,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,EAAE,CAAC;;wDACU;AAaxB;IAXC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,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OAAO,EAAE,CAAC;KACX,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAG,EAAC,CAAC,CAAC;;4DACqB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ExecutionStatsEntity } from '../../stats/execution-stats.entity';
|
|
2
|
+
export declare class ExecutionStatsResponseDto {
|
|
3
|
+
harness: string | null;
|
|
4
|
+
providerId: string | null;
|
|
5
|
+
modelId: string | null;
|
|
6
|
+
inputTokens: number | null;
|
|
7
|
+
outputTokens: number | null;
|
|
8
|
+
totalTokens: number | null;
|
|
9
|
+
static fromEntity(entity: ExecutionStatsEntity): ExecutionStatsResponseDto;
|
|
10
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ExecutionStatsResponseDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
class ExecutionStatsResponseDto {
|
|
15
|
+
harness;
|
|
16
|
+
providerId;
|
|
17
|
+
modelId;
|
|
18
|
+
inputTokens;
|
|
19
|
+
outputTokens;
|
|
20
|
+
totalTokens;
|
|
21
|
+
static fromEntity(entity) {
|
|
22
|
+
return {
|
|
23
|
+
harness: entity.harness,
|
|
24
|
+
providerId: entity.providerId,
|
|
25
|
+
modelId: entity.modelId,
|
|
26
|
+
inputTokens: entity.inputTokens,
|
|
27
|
+
outputTokens: entity.outputTokens,
|
|
28
|
+
totalTokens: entity.totalTokens,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.ExecutionStatsResponseDto = ExecutionStatsResponseDto;
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, swagger_1.ApiProperty)({
|
|
35
|
+
type: String,
|
|
36
|
+
description: 'Harness used to execute the run',
|
|
37
|
+
example: 'opencode',
|
|
38
|
+
nullable: true,
|
|
39
|
+
}),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], ExecutionStatsResponseDto.prototype, "harness", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, swagger_1.ApiProperty)({
|
|
44
|
+
type: String,
|
|
45
|
+
description: 'LLM provider id resolved for this run',
|
|
46
|
+
example: 'openai',
|
|
47
|
+
nullable: true,
|
|
48
|
+
}),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], ExecutionStatsResponseDto.prototype, "providerId", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, swagger_1.ApiProperty)({
|
|
53
|
+
type: String,
|
|
54
|
+
description: 'LLM model id resolved for this run',
|
|
55
|
+
example: 'gpt-5.4',
|
|
56
|
+
nullable: true,
|
|
57
|
+
}),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], ExecutionStatsResponseDto.prototype, "modelId", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, swagger_1.ApiProperty)({
|
|
62
|
+
type: Number,
|
|
63
|
+
description: 'Input token usage when available',
|
|
64
|
+
example: 1200,
|
|
65
|
+
nullable: true,
|
|
66
|
+
}),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], ExecutionStatsResponseDto.prototype, "inputTokens", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, swagger_1.ApiProperty)({
|
|
71
|
+
type: Number,
|
|
72
|
+
description: 'Output token usage when available',
|
|
73
|
+
example: 380,
|
|
74
|
+
nullable: true,
|
|
75
|
+
}),
|
|
76
|
+
__metadata("design:type", Object)
|
|
77
|
+
], ExecutionStatsResponseDto.prototype, "outputTokens", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, swagger_1.ApiProperty)({
|
|
80
|
+
type: Number,
|
|
81
|
+
description: 'Total token usage when available',
|
|
82
|
+
example: 1580,
|
|
83
|
+
nullable: true,
|
|
84
|
+
}),
|
|
85
|
+
__metadata("design:type", Object)
|
|
86
|
+
], ExecutionStatsResponseDto.prototype, "totalTokens", void 0);
|
|
87
|
+
//# sourceMappingURL=execution-stats-response.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-stats-response.dto.js","sourceRoot":"","sources":["../../../../src/executions/dto/http/execution-stats-response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAG9C,MAAa,yBAAyB;IAOpC,OAAO,CAAiB;IAQxB,UAAU,CAAiB;IAQ3B,OAAO,CAAiB;IAQxB,WAAW,CAAiB;IAQ5B,YAAY,CAAiB;IAQ7B,WAAW,CAAiB;IAE5B,MAAM,CAAC,UAAU,CAAC,MAA4B;QAC5C,OAAO;YACL,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,WAAW,EAAE,MAAM,CAAC,WAAW;SAChC,CAAC;IACJ,CAAC;CACF;AA3DD,8DA2DC;AApDC;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,iCAAiC;QAC9C,OAAO,EAAE,UAAU;QACnB,QAAQ,EAAE,IAAI;KACf,CAAC;;0DACsB;AAQxB;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,uCAAuC;QACpD,OAAO,EAAE,QAAQ;QACjB,QAAQ,EAAE,IAAI;KACf,CAAC;;6DACyB;AAQ3B;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,oCAAoC;QACjD,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,IAAI;KACf,CAAC;;0DACsB;AAQxB;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,IAAI;KACf,CAAC;;8DAC0B;AAQ5B;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,mCAAmC;QAChD,OAAO,EAAE,GAAG;QACZ,QAAQ,EAAE,IAAI;KACf,CAAC;;+DAC2B;AAQ7B;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,IAAI;KACf,CAAC;;8DAC0B"}
|
|
@@ -11,3 +11,6 @@ export declare class TaskAlreadyClaimedError extends ExecutionsError {
|
|
|
11
11
|
export declare class ActiveTaskExecutionNotFoundError extends ExecutionsError {
|
|
12
12
|
constructor(executionId: string);
|
|
13
13
|
}
|
|
14
|
+
export declare class ExecutionStatsNotFoundError extends ExecutionsError {
|
|
15
|
+
constructor(executionId: string);
|
|
16
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ActiveTaskExecutionNotFoundError = exports.TaskAlreadyClaimedError = exports.TaskExecutionQueueEntryNotFoundError = exports.ExecutionsError = void 0;
|
|
3
|
+
exports.ExecutionStatsNotFoundError = exports.ActiveTaskExecutionNotFoundError = exports.TaskAlreadyClaimedError = exports.TaskExecutionQueueEntryNotFoundError = exports.ExecutionsError = void 0;
|
|
4
4
|
class ExecutionsError extends Error {
|
|
5
5
|
context;
|
|
6
6
|
constructor(message, context) {
|
|
@@ -28,4 +28,10 @@ class ActiveTaskExecutionNotFoundError extends ExecutionsError {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
exports.ActiveTaskExecutionNotFoundError = ActiveTaskExecutionNotFoundError;
|
|
31
|
+
class ExecutionStatsNotFoundError extends ExecutionsError {
|
|
32
|
+
constructor(executionId) {
|
|
33
|
+
super('Execution stats were not found.', { executionId });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.ExecutionStatsNotFoundError = ExecutionStatsNotFoundError;
|
|
31
37
|
//# sourceMappingURL=executions.errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executions.errors.js","sourceRoot":"","sources":["../../../src/executions/errors/executions.errors.ts"],"names":[],"mappings":";;;AAAA,MAAsB,eAAgB,SAAQ,KAAK;IACX;IAAtC,YAAY,OAAe,EAAW,OAAiC;QACrE,KAAK,CAAC,OAAO,CAAC,CAAC;QADqB,YAAO,GAAP,OAAO,CAA0B;QAErE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACpC,CAAC;CACF;AALD,0CAKC;AAED,MAAa,oCAAqC,SAAQ,eAAe;IACvE,YAAY,MAAc;QACxB,KAAK,CAAC,6CAA6C,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACnE,CAAC;CACF;AAJD,oFAIC;AAED,MAAa,uBAAwB,SAAQ,eAAe;IAC1D,YAAY,MAAc;QACxB,KAAK,CAAC,uCAAuC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF;AAJD,0DAIC;AAED,MAAa,gCAAiC,SAAQ,eAAe;IACnE,YAAY,WAAmB;QAC7B,KAAK,CAAC,iCAAiC,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;IAC5D,CAAC;CACF;AAJD,4EAIC"}
|
|
1
|
+
{"version":3,"file":"executions.errors.js","sourceRoot":"","sources":["../../../src/executions/errors/executions.errors.ts"],"names":[],"mappings":";;;AAAA,MAAsB,eAAgB,SAAQ,KAAK;IACX;IAAtC,YAAY,OAAe,EAAW,OAAiC;QACrE,KAAK,CAAC,OAAO,CAAC,CAAC;QADqB,YAAO,GAAP,OAAO,CAA0B;QAErE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACpC,CAAC;CACF;AALD,0CAKC;AAED,MAAa,oCAAqC,SAAQ,eAAe;IACvE,YAAY,MAAc;QACxB,KAAK,CAAC,6CAA6C,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACnE,CAAC;CACF;AAJD,oFAIC;AAED,MAAa,uBAAwB,SAAQ,eAAe;IAC1D,YAAY,MAAc;QACxB,KAAK,CAAC,uCAAuC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF;AAJD,0DAIC;AAED,MAAa,gCAAiC,SAAQ,eAAe;IACnE,YAAY,WAAmB;QAC7B,KAAK,CAAC,iCAAiC,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;IAC5D,CAAC;CACF;AAJD,4EAIC;AAED,MAAa,2BAA4B,SAAQ,eAAe;IAC9D,YAAY,WAAmB;QAC7B,KAAK,CAAC,iCAAiC,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;IAC5D,CAAC;CACF;AAJD,kEAIC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ExecutionInterruptPayload = {
|
|
2
|
+
executionId: string;
|
|
3
|
+
workerClientId: string;
|
|
4
|
+
};
|
|
5
|
+
export declare class ExecutionInterruptEvent {
|
|
6
|
+
readonly actor: {
|
|
7
|
+
id: string;
|
|
8
|
+
};
|
|
9
|
+
readonly payload: ExecutionInterruptPayload;
|
|
10
|
+
static readonly INTERNAL: unique symbol;
|
|
11
|
+
readonly occurredAt: Date;
|
|
12
|
+
constructor(actor: {
|
|
13
|
+
id: string;
|
|
14
|
+
}, payload: ExecutionInterruptPayload);
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExecutionInterruptEvent = void 0;
|
|
4
|
+
class ExecutionInterruptEvent {
|
|
5
|
+
actor;
|
|
6
|
+
payload;
|
|
7
|
+
static INTERNAL = Symbol('executions.ExecutionInterruptEvent');
|
|
8
|
+
occurredAt = new Date();
|
|
9
|
+
constructor(actor, payload) {
|
|
10
|
+
this.actor = actor;
|
|
11
|
+
this.payload = payload;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.ExecutionInterruptEvent = ExecutionInterruptEvent;
|
|
15
|
+
//# sourceMappingURL=execution-interrupt.event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-interrupt.event.js","sourceRoot":"","sources":["../../../src/executions/events/execution-interrupt.event.ts"],"names":[],"mappings":";;;AAKA,MAAa,uBAAuB;IAMhB;IACA;IANlB,MAAM,CAAU,QAAQ,GAAG,MAAM,CAAC,oCAAoC,CAAC,CAAC;IAE/D,UAAU,GAAS,IAAI,IAAI,EAAE,CAAC;IAEvC,YACkB,KAAqB,EACrB,OAAkC;QADlC,UAAK,GAAL,KAAK,CAAgB;QACrB,YAAO,GAAP,OAAO,CAA2B;IACjD,CAAC;;AARN,0DASC"}
|
|
@@ -5,6 +5,7 @@ import { ExecutionActivityService } from './execution-activity.service';
|
|
|
5
5
|
import { WorkersService } from '../workers/workers.service';
|
|
6
6
|
import { AccessTokenValidationService } from '../auth/guards/validation/access-token-validation.service';
|
|
7
7
|
import { TaskExecutionQueuedEvent } from './queue/task-execution-queued.event';
|
|
8
|
+
import { ExecutionInterruptEvent } from './events/execution-interrupt.event';
|
|
8
9
|
export declare class ExecutionsWorkerGateway implements OnGatewayInit, OnGatewayConnection, OnGatewayDisconnect {
|
|
9
10
|
private readonly executionActivityService;
|
|
10
11
|
private readonly workersService;
|
|
@@ -13,6 +14,7 @@ export declare class ExecutionsWorkerGateway implements OnGatewayInit, OnGateway
|
|
|
13
14
|
private readonly logger;
|
|
14
15
|
private readonly socketExpiryTimers;
|
|
15
16
|
private readonly harnessReportRequestedSocketIds;
|
|
17
|
+
private readonly workerSocketsByClientId;
|
|
16
18
|
constructor(executionActivityService: ExecutionActivityService, workersService: WorkersService, accessTokenValidationService: AccessTokenValidationService);
|
|
17
19
|
afterInit(server: Server): void;
|
|
18
20
|
handleConnection(client: Socket): void;
|
|
@@ -47,4 +49,5 @@ export declare class ExecutionsWorkerGateway implements OnGatewayInit, OnGateway
|
|
|
47
49
|
private authenticateWorkerSocket;
|
|
48
50
|
private getSocketToken;
|
|
49
51
|
handleTaskExecutionQueued(event: TaskExecutionQueuedEvent): void;
|
|
52
|
+
handleExecutionInterrupt(event: ExecutionInterruptEvent): void;
|
|
50
53
|
}
|
|
@@ -64,6 +64,7 @@ const access_token_validation_service_1 = require("../auth/guards/validation/acc
|
|
|
64
64
|
const token_header_extractor_1 = require("../auth/guards/extractors/token-header.extractor");
|
|
65
65
|
const token_cookie_extractor_1 = require("../auth/guards/extractors/token-cookie.extractor");
|
|
66
66
|
const task_execution_queued_event_1 = require("./queue/task-execution-queued.event");
|
|
67
|
+
const execution_interrupt_event_1 = require("./events/execution-interrupt.event");
|
|
67
68
|
const SOCKET_AUTH_EXPIRY_SKEW_MS = 1_000;
|
|
68
69
|
let ExecutionsWorkerGateway = ExecutionsWorkerGateway_1 = class ExecutionsWorkerGateway {
|
|
69
70
|
executionActivityService;
|
|
@@ -73,6 +74,7 @@ let ExecutionsWorkerGateway = ExecutionsWorkerGateway_1 = class ExecutionsWorker
|
|
|
73
74
|
logger = new common_1.Logger(ExecutionsWorkerGateway_1.name);
|
|
74
75
|
socketExpiryTimers = new Map();
|
|
75
76
|
harnessReportRequestedSocketIds = new Set();
|
|
77
|
+
workerSocketsByClientId = new Map();
|
|
76
78
|
constructor(executionActivityService, workersService, accessTokenValidationService) {
|
|
77
79
|
this.executionActivityService = executionActivityService;
|
|
78
80
|
this.workersService = workersService;
|
|
@@ -95,6 +97,13 @@ let ExecutionsWorkerGateway = ExecutionsWorkerGateway_1 = class ExecutionsWorker
|
|
|
95
97
|
}
|
|
96
98
|
handleConnection(client) {
|
|
97
99
|
this.logger.log(`Worker client connected: ${client.id}`);
|
|
100
|
+
const oauthClientId = this.getOauthClientId(client);
|
|
101
|
+
if (oauthClientId) {
|
|
102
|
+
if (!this.workerSocketsByClientId.has(oauthClientId)) {
|
|
103
|
+
this.workerSocketsByClientId.set(oauthClientId, new Set());
|
|
104
|
+
}
|
|
105
|
+
this.workerSocketsByClientId.get(oauthClientId).add(client.id);
|
|
106
|
+
}
|
|
98
107
|
void this.recordAuthenticatedWorkerSeen(client).catch((error) => {
|
|
99
108
|
this.logger.warn({
|
|
100
109
|
message: 'Failed to record worker connection liveness',
|
|
@@ -107,6 +116,16 @@ let ExecutionsWorkerGateway = ExecutionsWorkerGateway_1 = class ExecutionsWorker
|
|
|
107
116
|
this.logger.log(`Worker client disconnected: ${client.id}`);
|
|
108
117
|
this.clearTokenExpiryDisconnect(client.id);
|
|
109
118
|
this.harnessReportRequestedSocketIds.delete(client.id);
|
|
119
|
+
const oauthClientId = this.getOauthClientId(client);
|
|
120
|
+
if (oauthClientId) {
|
|
121
|
+
const sockets = this.workerSocketsByClientId.get(oauthClientId);
|
|
122
|
+
if (sockets) {
|
|
123
|
+
sockets.delete(client.id);
|
|
124
|
+
if (sockets.size === 0) {
|
|
125
|
+
this.workerSocketsByClientId.delete(oauthClientId);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
110
129
|
}
|
|
111
130
|
async postExecutionActivity(client, body) {
|
|
112
131
|
if (!body?.executionId) {
|
|
@@ -258,6 +277,22 @@ let ExecutionsWorkerGateway = ExecutionsWorkerGateway_1 = class ExecutionsWorker
|
|
|
258
277
|
this.server.emit(events_1.ExecutionWireEvents.TASK_EXECUTION_QUEUED, wireEvent);
|
|
259
278
|
this.logger.debug(`Emitted ${events_1.ExecutionWireEvents.TASK_EXECUTION_QUEUED} for task ${event.taskId} to all workers`);
|
|
260
279
|
}
|
|
280
|
+
handleExecutionInterrupt(event) {
|
|
281
|
+
const wireEvent = {
|
|
282
|
+
executionId: event.payload.executionId,
|
|
283
|
+
requestedAt: event.occurredAt.toISOString(),
|
|
284
|
+
};
|
|
285
|
+
this.logger.debug(`Handling interrupt for execution ${event.payload.executionId} requested by actor ${event.actor.id}`);
|
|
286
|
+
const socketIds = this.workerSocketsByClientId.get(event.payload.workerClientId);
|
|
287
|
+
if (!socketIds || socketIds.size === 0) {
|
|
288
|
+
this.logger.warn(`No connected sockets found for worker ${event.payload.workerClientId} when interrupting execution ${event.payload.executionId}`);
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
this.logger.debug(`Emitting ${events_1.ExecutionWireEvents.EXECUTION_INTERRUPT_REQUEST} for execution ${event.payload.executionId} to worker client ${event.payload.workerClientId} on sockets ${[...socketIds].join(',')}`);
|
|
292
|
+
this.server.to([...socketIds]).emit(events_1.ExecutionWireEvents.EXECUTION_INTERRUPT_REQUEST, wireEvent);
|
|
293
|
+
this.logger.log(`Emitted ${events_1.ExecutionWireEvents.EXECUTION_INTERRUPT_REQUEST} for execution ${event.payload.executionId} to ${socketIds.size} worker socket(s)`);
|
|
294
|
+
this.logger.debug(`Finished emitting ${events_1.ExecutionWireEvents.EXECUTION_INTERRUPT_REQUEST} for execution ${event.payload.executionId} to worker client ${event.payload.workerClientId}`);
|
|
295
|
+
}
|
|
261
296
|
};
|
|
262
297
|
exports.ExecutionsWorkerGateway = ExecutionsWorkerGateway;
|
|
263
298
|
__decorate([
|
|
@@ -293,6 +328,12 @@ __decorate([
|
|
|
293
328
|
__metadata("design:paramtypes", [task_execution_queued_event_1.TaskExecutionQueuedEvent]),
|
|
294
329
|
__metadata("design:returntype", void 0)
|
|
295
330
|
], ExecutionsWorkerGateway.prototype, "handleTaskExecutionQueued", null);
|
|
331
|
+
__decorate([
|
|
332
|
+
(0, event_emitter_1.OnEvent)(execution_interrupt_event_1.ExecutionInterruptEvent.INTERNAL),
|
|
333
|
+
__metadata("design:type", Function),
|
|
334
|
+
__metadata("design:paramtypes", [execution_interrupt_event_1.ExecutionInterruptEvent]),
|
|
335
|
+
__metadata("design:returntype", void 0)
|
|
336
|
+
], ExecutionsWorkerGateway.prototype, "handleExecutionInterrupt", null);
|
|
296
337
|
exports.ExecutionsWorkerGateway = ExecutionsWorkerGateway = ExecutionsWorkerGateway_1 = __decorate([
|
|
297
338
|
(0, common_1.UseGuards)(ws_access_token_guard_1.WsAccessTokenGuard, ws_scopes_guard_1.WsScopesGuard),
|
|
298
339
|
(0, require_scopes_decorator_1.RequireScopes)(workers_scopes_1.WorkersScopes.CONNECT.id),
|