repoburg 1.1.6 → 1.1.8
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/backend/.env +3 -1
- package/backend/coverage/clover.xml +1 -1
- package/backend/coverage/lcov-report/src/seeding/data/context-templates/index.html +11 -12
- package/backend/coverage/lcov-report/src/seeding/data/context-templates/pr-description.ts.html +12 -13
- package/backend/coverage/lcov.info +1 -1
- package/backend/dist/src/action-execution/action-execution.service.js +2 -1
- package/backend/dist/src/action-execution/action-execution.service.js.map +1 -1
- package/backend/dist/src/app.module.js +0 -2
- package/backend/dist/src/app.module.js.map +1 -1
- package/backend/dist/src/application-state/application-state.controller.d.ts +0 -5
- package/backend/dist/src/application-state/application-state.controller.js +0 -22
- package/backend/dist/src/application-state/application-state.controller.js.map +1 -1
- package/backend/dist/src/application-state/application-state.service.d.ts +0 -6
- package/backend/dist/src/application-state/application-state.service.js +0 -36
- package/backend/dist/src/application-state/application-state.service.js.map +1 -1
- package/backend/dist/src/llm-response-parser/llm-response-parser.service.js +17 -9
- package/backend/dist/src/llm-response-parser/llm-response-parser.service.js.map +1 -1
- package/backend/dist/src/llm-responses/llm-responses.module.js +0 -2
- package/backend/dist/src/llm-responses/llm-responses.module.js.map +1 -1
- package/backend/dist/src/llm-responses/llm-responses.service.d.ts +1 -3
- package/backend/dist/src/llm-responses/llm-responses.service.js +1 -6
- package/backend/dist/src/llm-responses/llm-responses.service.js.map +1 -1
- package/backend/dist/src/seeding/data/context-templates/{pr-description.d.ts → open-pr-command.d.ts} +1 -1
- package/backend/dist/src/seeding/data/context-templates/{pr-description.js → open-pr-command.js} +22 -2
- package/backend/dist/src/seeding/data/context-templates/open-pr-command.js.map +1 -0
- package/backend/dist/src/seeding/data/system-prompts/default_master-agent.d.ts +1 -1
- package/backend/dist/src/seeding/data/system-prompts/default_master-agent.js +0 -2
- package/backend/dist/src/seeding/data/system-prompts/default_master-agent.js.map +1 -1
- package/backend/dist/src/session-inputs/session-inputs.module.js +0 -2
- package/backend/dist/src/session-inputs/session-inputs.module.js.map +1 -1
- package/backend/dist/src/session-inputs/session-inputs.service.d.ts +1 -3
- package/backend/dist/src/session-inputs/session-inputs.service.js +3 -10
- package/backend/dist/src/session-inputs/session-inputs.service.js.map +1 -1
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/backend/dist/src/application-state/dto/set-orchestration-timeout.dto.d.ts +0 -3
- package/backend/dist/src/application-state/dto/set-orchestration-timeout.dto.js +0 -21
- package/backend/dist/src/application-state/dto/set-orchestration-timeout.dto.js.map +0 -1
- package/backend/dist/src/orchestration/dto/orchestration.dto.d.ts +0 -13
- package/backend/dist/src/orchestration/dto/orchestration.dto.js +0 -50
- package/backend/dist/src/orchestration/dto/orchestration.dto.js.map +0 -1
- package/backend/dist/src/orchestration/orchestration-fs.service.d.ts +0 -19
- package/backend/dist/src/orchestration/orchestration-fs.service.js +0 -158
- package/backend/dist/src/orchestration/orchestration-fs.service.js.map +0 -1
- package/backend/dist/src/orchestration/orchestration-parser.service.d.ts +0 -5
- package/backend/dist/src/orchestration/orchestration-parser.service.js +0 -34
- package/backend/dist/src/orchestration/orchestration-parser.service.js.map +0 -1
- package/backend/dist/src/orchestration/orchestration.controller.d.ts +0 -27
- package/backend/dist/src/orchestration/orchestration.controller.js +0 -155
- package/backend/dist/src/orchestration/orchestration.controller.js.map +0 -1
- package/backend/dist/src/orchestration/orchestration.module.d.ts +0 -2
- package/backend/dist/src/orchestration/orchestration.module.js +0 -41
- package/backend/dist/src/orchestration/orchestration.module.js.map +0 -1
- package/backend/dist/src/orchestration/orchestration.service.d.ts +0 -37
- package/backend/dist/src/orchestration/orchestration.service.js +0 -276
- package/backend/dist/src/orchestration/orchestration.service.js.map +0 -1
- package/backend/dist/src/orchestration/orchestration.types.d.ts +0 -28
- package/backend/dist/src/orchestration/orchestration.types.js +0 -20
- package/backend/dist/src/orchestration/orchestration.types.js.map +0 -1
- package/backend/dist/src/seeding/data/context-templates/pr-description.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
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.SetOrchestrationTimeoutDto = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
class SetOrchestrationTimeoutDto {
|
|
15
|
-
}
|
|
16
|
-
exports.SetOrchestrationTimeoutDto = SetOrchestrationTimeoutDto;
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, class_validator_1.IsInt)(),
|
|
19
|
-
__metadata("design:type", Number)
|
|
20
|
-
], SetOrchestrationTimeoutDto.prototype, "timeout_ms", void 0);
|
|
21
|
-
//# sourceMappingURL=set-orchestration-timeout.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-orchestration-timeout.dto.js","sourceRoot":"","sources":["../../../../src/application-state/dto/set-orchestration-timeout.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAwC;AAExC,MAAa,0BAA0B;CAGtC;AAHD,gEAGC;AADC;IADC,IAAA,uBAAK,GAAE;;8DACW"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { OrchestrationMode } from '../orchestration.types';
|
|
2
|
-
export declare class StartOrchestrationDto {
|
|
3
|
-
scriptName: string;
|
|
4
|
-
sessionId: string;
|
|
5
|
-
mode: OrchestrationMode;
|
|
6
|
-
}
|
|
7
|
-
export declare class CreateOrchestrationScriptDto {
|
|
8
|
-
name: string;
|
|
9
|
-
content: string;
|
|
10
|
-
}
|
|
11
|
-
export declare class UpdateOrchestrationScriptDto {
|
|
12
|
-
content: string;
|
|
13
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
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.UpdateOrchestrationScriptDto = exports.CreateOrchestrationScriptDto = exports.StartOrchestrationDto = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
const orchestration_types_1 = require("../orchestration.types");
|
|
15
|
-
class StartOrchestrationDto {
|
|
16
|
-
}
|
|
17
|
-
exports.StartOrchestrationDto = StartOrchestrationDto;
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, class_validator_1.IsString)(),
|
|
20
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
21
|
-
__metadata("design:type", String)
|
|
22
|
-
], StartOrchestrationDto.prototype, "scriptName", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, class_validator_1.IsUUID)(),
|
|
25
|
-
__metadata("design:type", String)
|
|
26
|
-
], StartOrchestrationDto.prototype, "sessionId", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, class_validator_1.IsEnum)(orchestration_types_1.OrchestrationMode),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], StartOrchestrationDto.prototype, "mode", void 0);
|
|
31
|
-
class CreateOrchestrationScriptDto {
|
|
32
|
-
}
|
|
33
|
-
exports.CreateOrchestrationScriptDto = CreateOrchestrationScriptDto;
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, class_validator_1.IsString)(),
|
|
36
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
37
|
-
__metadata("design:type", String)
|
|
38
|
-
], CreateOrchestrationScriptDto.prototype, "name", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, class_validator_1.IsString)(),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], CreateOrchestrationScriptDto.prototype, "content", void 0);
|
|
43
|
-
class UpdateOrchestrationScriptDto {
|
|
44
|
-
}
|
|
45
|
-
exports.UpdateOrchestrationScriptDto = UpdateOrchestrationScriptDto;
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, class_validator_1.IsString)(),
|
|
48
|
-
__metadata("design:type", String)
|
|
49
|
-
], UpdateOrchestrationScriptDto.prototype, "content", void 0);
|
|
50
|
-
//# sourceMappingURL=orchestration.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration.dto.js","sourceRoot":"","sources":["../../../../src/orchestration/dto/orchestration.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AACvE,gEAA2D;AAE3D,MAAa,qBAAqB;CAUjC;AAVD,sDAUC;AAPC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACM;AAGnB;IADC,IAAA,wBAAM,GAAE;;wDACS;AAGlB;IADC,IAAA,wBAAM,EAAC,uCAAiB,CAAC;;mDACF;AAG1B,MAAa,4BAA4B;CAOxC;AAPD,oEAOC;AAJC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACA;AAGb;IADC,IAAA,0BAAQ,GAAE;;6DACK;AAGlB,MAAa,4BAA4B;CAGxC;AAHD,oEAGC;AADC;IADC,IAAA,0BAAQ,GAAE;;6DACK"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare class OrchestrationFsService {
|
|
2
|
-
private readonly logger;
|
|
3
|
-
private readonly projectRoot;
|
|
4
|
-
private readonly orchestrationsDir;
|
|
5
|
-
constructor();
|
|
6
|
-
private ensureOrchestrationsDirExists;
|
|
7
|
-
private getScriptPath;
|
|
8
|
-
private getRunScriptPath;
|
|
9
|
-
listScripts(): Promise<{
|
|
10
|
-
name: string;
|
|
11
|
-
content: string;
|
|
12
|
-
}[]>;
|
|
13
|
-
readScript(name: string): Promise<string>;
|
|
14
|
-
readRunScript(name: string): Promise<string>;
|
|
15
|
-
writeScript(name: string, content: string): Promise<void>;
|
|
16
|
-
deleteScript(name: string): Promise<void>;
|
|
17
|
-
cloneScriptForRun(name: string): Promise<void>;
|
|
18
|
-
consumeNextChunk(name: string): Promise<void>;
|
|
19
|
-
}
|
|
@@ -1,158 +0,0 @@
|
|
|
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
|
-
var OrchestrationFsService_1;
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.OrchestrationFsService = void 0;
|
|
14
|
-
const common_1 = require("@nestjs/common");
|
|
15
|
-
const fs = require("fs/promises");
|
|
16
|
-
const path = require("path");
|
|
17
|
-
const readmeContent = `# How to Create Orchestration Scripts
|
|
18
|
-
|
|
19
|
-
Orchestrations automate multi-step tasks by executing a sequence of prompts defined in a single markdown file.
|
|
20
|
-
|
|
21
|
-
## 1. File Naming
|
|
22
|
-
|
|
23
|
-
- An orchestration script is a single markdown file with a \`.rc.md\` extension (e.g., \`my-new-feature.rc.md\`).
|
|
24
|
-
|
|
25
|
-
## 2. Script Format
|
|
26
|
-
|
|
27
|
-
The file contains one or more "chunks" of text, separated by \`$$$$\`. Each chunk is treated as a distinct prompt that will be sent to the LLM.
|
|
28
|
-
|
|
29
|
-
### The Separator
|
|
30
|
-
|
|
31
|
-
- Use \`$$$$\` on its own line to separate prompts.
|
|
32
|
-
|
|
33
|
-
### Example \`.rc.md\` File (\`sample-feature.rc.md\`)
|
|
34
|
-
|
|
35
|
-
\`\`\`markdown
|
|
36
|
-
Create a new React component file named Greeting.tsx in src/components. It should be a simple functional component that displays "Hello, World!".
|
|
37
|
-
|
|
38
|
-
$$$$
|
|
39
|
-
|
|
40
|
-
Now, import and render the new Greeting component in the main App component located at src/app/page.tsx.
|
|
41
|
-
\`\`\`
|
|
42
|
-
|
|
43
|
-
## How It Works
|
|
44
|
-
|
|
45
|
-
1. **Execution**: When you run an orchestration, the system makes a temporary copy of your script.
|
|
46
|
-
2. **One Chunk at a Time**: It sends the content of the first chunk to the LLM.
|
|
47
|
-
3. **Auto-Apply**: The LLM's response is parsed, and the resulting file modifications are applied automatically.
|
|
48
|
-
4. **Consume and Continue**: After a chunk is successfully processed, it's removed from the temporary script. The engine then moves on to the next chunk.
|
|
49
|
-
5. **Completion**: The orchestration is complete when all chunks in the temporary script have been processed and removed.
|
|
50
|
-
|
|
51
|
-
This allows the orchestration to be resumable. If it's stopped, the temporary script file maintains the state of remaining tasks.
|
|
52
|
-
|
|
53
|
-
## Guidelines for Writing Prompts
|
|
54
|
-
|
|
55
|
-
- **Be Specific and Atomic**: Each chunk should describe a single, clear, and verifiable step.
|
|
56
|
-
- **Sequential Logic**: Write chunks in the order they should be executed. The orchestration runs them sequentially and depends on the success of the previous step.
|
|
57
|
-
- **Assume \`auto_apply\`**: Remember that all actions generated by the LLM will be applied automatically. Write prompts that are safe for direct execution.
|
|
58
|
-
`;
|
|
59
|
-
let OrchestrationFsService = OrchestrationFsService_1 = class OrchestrationFsService {
|
|
60
|
-
constructor() {
|
|
61
|
-
this.logger = new common_1.Logger(OrchestrationFsService_1.name);
|
|
62
|
-
this.projectRoot = process.env.REPOBURG_PROJECT_PATH || process.cwd();
|
|
63
|
-
this.orchestrationsDir = path.join(this.projectRoot, '.repoburg', 'orchestrations');
|
|
64
|
-
this.ensureOrchestrationsDirExists();
|
|
65
|
-
}
|
|
66
|
-
async ensureOrchestrationsDirExists() {
|
|
67
|
-
try {
|
|
68
|
-
await fs.mkdir(this.orchestrationsDir, { recursive: true });
|
|
69
|
-
const readmePath = path.join(this.orchestrationsDir, 'README.md');
|
|
70
|
-
this.logger.log('Ensuring orchestration README.md is up to date.');
|
|
71
|
-
await fs.writeFile(readmePath, readmeContent, 'utf-8');
|
|
72
|
-
}
|
|
73
|
-
catch (error) {
|
|
74
|
-
this.logger.error(`Failed to ensure orchestrations directory and README exist at ${this.orchestrationsDir}`, error.stack);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
getScriptPath(name) {
|
|
78
|
-
return path.join(this.orchestrationsDir, `${name}.rc.md`);
|
|
79
|
-
}
|
|
80
|
-
getRunScriptPath(name) {
|
|
81
|
-
return path.join(this.orchestrationsDir, `${name}.run.rc.md`);
|
|
82
|
-
}
|
|
83
|
-
async listScripts() {
|
|
84
|
-
const entries = await fs.readdir(this.orchestrationsDir, {
|
|
85
|
-
withFileTypes: true,
|
|
86
|
-
});
|
|
87
|
-
const scriptFiles = entries
|
|
88
|
-
.filter((e) => e.isFile() &&
|
|
89
|
-
e.name.endsWith('.rc.md') &&
|
|
90
|
-
!e.name.endsWith('.run.rc.md'))
|
|
91
|
-
.map((e) => e.name.replace(/\.rc\.md$/, ''));
|
|
92
|
-
const scripts = await Promise.all(scriptFiles.map(async (name) => {
|
|
93
|
-
const content = await this.readScript(name);
|
|
94
|
-
return { name, content };
|
|
95
|
-
}));
|
|
96
|
-
return scripts;
|
|
97
|
-
}
|
|
98
|
-
async readScript(name) {
|
|
99
|
-
const scriptPath = this.getScriptPath(name);
|
|
100
|
-
try {
|
|
101
|
-
return await fs.readFile(scriptPath, 'utf-8');
|
|
102
|
-
}
|
|
103
|
-
catch (error) {
|
|
104
|
-
if (error.code === 'ENOENT') {
|
|
105
|
-
this.logger.log(`Script "${name}.rc.md" not found at path: ${scriptPath}`);
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
this.logger.error(`Failed to read script: ${scriptPath}`, error.stack);
|
|
109
|
-
}
|
|
110
|
-
throw new common_1.NotFoundException(`Script "${name}.rc.md" not found.`);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
async readRunScript(name) {
|
|
114
|
-
const runScriptPath = this.getRunScriptPath(name);
|
|
115
|
-
try {
|
|
116
|
-
return await fs.readFile(runScriptPath, 'utf-8');
|
|
117
|
-
}
|
|
118
|
-
catch (error) {
|
|
119
|
-
if (error.code === 'ENOENT') {
|
|
120
|
-
return '';
|
|
121
|
-
}
|
|
122
|
-
this.logger.error(`Failed to read run script: ${runScriptPath}`, error.stack);
|
|
123
|
-
throw error;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
async writeScript(name, content) {
|
|
127
|
-
await fs.writeFile(this.getScriptPath(name), content, 'utf-8');
|
|
128
|
-
}
|
|
129
|
-
async deleteScript(name) {
|
|
130
|
-
await fs.unlink(this.getScriptPath(name));
|
|
131
|
-
try {
|
|
132
|
-
await fs.unlink(this.getRunScriptPath(name));
|
|
133
|
-
}
|
|
134
|
-
catch (error) {
|
|
135
|
-
if (error.code !== 'ENOENT')
|
|
136
|
-
throw error;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
async cloneScriptForRun(name) {
|
|
140
|
-
const originalPath = this.getScriptPath(name);
|
|
141
|
-
const runPath = this.getRunScriptPath(name);
|
|
142
|
-
await fs.copyFile(originalPath, runPath);
|
|
143
|
-
}
|
|
144
|
-
async consumeNextChunk(name) {
|
|
145
|
-
const runScriptPath = this.getRunScriptPath(name);
|
|
146
|
-
const content = await this.readRunScript(name);
|
|
147
|
-
const parts = content.split('$$$$');
|
|
148
|
-
parts.shift();
|
|
149
|
-
const newContent = parts.join('$$$$').trim();
|
|
150
|
-
await fs.writeFile(runScriptPath, newContent, 'utf-8');
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
exports.OrchestrationFsService = OrchestrationFsService;
|
|
154
|
-
exports.OrchestrationFsService = OrchestrationFsService = OrchestrationFsService_1 = __decorate([
|
|
155
|
-
(0, common_1.Injectable)(),
|
|
156
|
-
__metadata("design:paramtypes", [])
|
|
157
|
-
], OrchestrationFsService);
|
|
158
|
-
//# sourceMappingURL=orchestration-fs.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration-fs.service.js","sourceRoot":"","sources":["../../../src/orchestration/orchestration-fs.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAuE;AACvE,kCAAkC;AAClC,6BAA6B;AAE7B,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC5C,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,IAAY;QACjC,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAClD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAE/C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACpC,KAAK,CAAC,KAAK,EAAE,CAAC;QAEd,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;QAE7C,MAAM,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;CACF,CAAA;AAzHY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;;GACA,sBAAsB,CAyHlC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
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
|
-
var OrchestrationParserService_1;
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.OrchestrationParserService = void 0;
|
|
14
|
-
const common_1 = require("@nestjs/common");
|
|
15
|
-
let OrchestrationParserService = OrchestrationParserService_1 = class OrchestrationParserService {
|
|
16
|
-
constructor() {
|
|
17
|
-
this.logger = new common_1.Logger(OrchestrationParserService_1.name);
|
|
18
|
-
}
|
|
19
|
-
async parseScript(scriptContent) {
|
|
20
|
-
if (!scriptContent || scriptContent.trim() === '') {
|
|
21
|
-
return [];
|
|
22
|
-
}
|
|
23
|
-
return scriptContent
|
|
24
|
-
.split('$$$$')
|
|
25
|
-
.map((chunk) => chunk.trim())
|
|
26
|
-
.filter((chunk) => chunk.length > 0);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
exports.OrchestrationParserService = OrchestrationParserService;
|
|
30
|
-
exports.OrchestrationParserService = OrchestrationParserService = OrchestrationParserService_1 = __decorate([
|
|
31
|
-
(0, common_1.Injectable)(),
|
|
32
|
-
__metadata("design:paramtypes", [])
|
|
33
|
-
], OrchestrationParserService);
|
|
34
|
-
//# sourceMappingURL=orchestration-parser.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration-parser.service.js","sourceRoot":"","sources":["../../../src/orchestration/orchestration-parser.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AAG7C,IAAM,0BAA0B,kCAAhC,MAAM,0BAA0B;IAGrC;QAFiB,WAAM,GAAG,IAAI,eAAM,CAAC,4BAA0B,CAAC,IAAI,CAAC,CAAC;IAEvD,CAAC;IAEhB,KAAK,CAAC,WAAW,CAAC,aAAqB;QACrC,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YAClD,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,OAAO,aAAa;aACjB,KAAK,CAAC,MAAM,CAAC;aACb,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;aAC5B,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACzC,CAAC;CACF,CAAA;AAfY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,mBAAU,GAAE;;GACA,0BAA0B,CAetC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { OrchestrationService } from './orchestration.service';
|
|
2
|
-
import { OrchestrationFsService } from './orchestration-fs.service';
|
|
3
|
-
import { CreateOrchestrationScriptDto, StartOrchestrationDto, UpdateOrchestrationScriptDto } from './dto/orchestration.dto';
|
|
4
|
-
import { Response } from 'express';
|
|
5
|
-
export declare class OrchestrationController {
|
|
6
|
-
private readonly orchestrationService;
|
|
7
|
-
private readonly fsService;
|
|
8
|
-
constructor(orchestrationService: OrchestrationService, fsService: OrchestrationFsService);
|
|
9
|
-
listScripts(): Promise<{
|
|
10
|
-
scripts: {
|
|
11
|
-
name: string;
|
|
12
|
-
content: string;
|
|
13
|
-
}[];
|
|
14
|
-
}>;
|
|
15
|
-
getScript(scriptName: string): Promise<{
|
|
16
|
-
content: string;
|
|
17
|
-
}>;
|
|
18
|
-
createScript(dto: CreateOrchestrationScriptDto): Promise<void>;
|
|
19
|
-
updateScript(scriptName: string, dto: UpdateOrchestrationScriptDto): Promise<void>;
|
|
20
|
-
deleteScript(scriptName: string): Promise<void>;
|
|
21
|
-
getActiveRun(res: Response): Response<any, Record<string, any>>;
|
|
22
|
-
startRun(dto: StartOrchestrationDto): Promise<void>;
|
|
23
|
-
stopRun(): Promise<void>;
|
|
24
|
-
proceedRun(): Promise<void>;
|
|
25
|
-
emergencyStop(): Promise<void>;
|
|
26
|
-
clearRun(): Promise<void>;
|
|
27
|
-
}
|
|
@@ -1,155 +0,0 @@
|
|
|
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
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.OrchestrationController = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const orchestration_service_1 = require("./orchestration.service");
|
|
18
|
-
const orchestration_fs_service_1 = require("./orchestration-fs.service");
|
|
19
|
-
const orchestration_dto_1 = require("./dto/orchestration.dto");
|
|
20
|
-
let OrchestrationController = class OrchestrationController {
|
|
21
|
-
constructor(orchestrationService, fsService) {
|
|
22
|
-
this.orchestrationService = orchestrationService;
|
|
23
|
-
this.fsService = fsService;
|
|
24
|
-
}
|
|
25
|
-
async listScripts() {
|
|
26
|
-
const scripts = await this.fsService.listScripts();
|
|
27
|
-
scripts.sort((a, b) => a.name.localeCompare(b.name));
|
|
28
|
-
return { scripts };
|
|
29
|
-
}
|
|
30
|
-
async getScript(scriptName) {
|
|
31
|
-
const content = await this.fsService.readScript(scriptName);
|
|
32
|
-
return { content };
|
|
33
|
-
}
|
|
34
|
-
async createScript(dto) {
|
|
35
|
-
return this.fsService.writeScript(dto.name, dto.content);
|
|
36
|
-
}
|
|
37
|
-
async updateScript(scriptName, dto) {
|
|
38
|
-
return this.fsService.writeScript(scriptName, dto.content);
|
|
39
|
-
}
|
|
40
|
-
async deleteScript(scriptName) {
|
|
41
|
-
return this.fsService.deleteScript(scriptName);
|
|
42
|
-
}
|
|
43
|
-
getActiveRun(res) {
|
|
44
|
-
const run = this.orchestrationService.getActiveRun();
|
|
45
|
-
if (run) {
|
|
46
|
-
return res.status(common_1.HttpStatus.OK).json(run);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
return res.status(common_1.HttpStatus.NO_CONTENT).send();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
async startRun(dto) {
|
|
53
|
-
return this.orchestrationService.start(dto);
|
|
54
|
-
}
|
|
55
|
-
async stopRun() {
|
|
56
|
-
return this.orchestrationService.stop();
|
|
57
|
-
}
|
|
58
|
-
async proceedRun() {
|
|
59
|
-
return this.orchestrationService.proceed();
|
|
60
|
-
}
|
|
61
|
-
async emergencyStop() {
|
|
62
|
-
return this.orchestrationService.emergencyStop();
|
|
63
|
-
}
|
|
64
|
-
async clearRun() {
|
|
65
|
-
return this.orchestrationService.clearActiveRun();
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
exports.OrchestrationController = OrchestrationController;
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, common_1.Get)(),
|
|
71
|
-
__metadata("design:type", Function),
|
|
72
|
-
__metadata("design:paramtypes", []),
|
|
73
|
-
__metadata("design:returntype", Promise)
|
|
74
|
-
], OrchestrationController.prototype, "listScripts", null);
|
|
75
|
-
__decorate([
|
|
76
|
-
(0, common_1.Get)(':scriptName'),
|
|
77
|
-
__param(0, (0, common_1.Param)('scriptName')),
|
|
78
|
-
__metadata("design:type", Function),
|
|
79
|
-
__metadata("design:paramtypes", [String]),
|
|
80
|
-
__metadata("design:returntype", Promise)
|
|
81
|
-
], OrchestrationController.prototype, "getScript", null);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, common_1.Post)(),
|
|
84
|
-
(0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
|
|
85
|
-
__param(0, (0, common_1.Body)()),
|
|
86
|
-
__metadata("design:type", Function),
|
|
87
|
-
__metadata("design:paramtypes", [orchestration_dto_1.CreateOrchestrationScriptDto]),
|
|
88
|
-
__metadata("design:returntype", Promise)
|
|
89
|
-
], OrchestrationController.prototype, "createScript", null);
|
|
90
|
-
__decorate([
|
|
91
|
-
(0, common_1.Put)(':scriptName'),
|
|
92
|
-
(0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
|
|
93
|
-
__param(0, (0, common_1.Param)('scriptName')),
|
|
94
|
-
__param(1, (0, common_1.Body)()),
|
|
95
|
-
__metadata("design:type", Function),
|
|
96
|
-
__metadata("design:paramtypes", [String, orchestration_dto_1.UpdateOrchestrationScriptDto]),
|
|
97
|
-
__metadata("design:returntype", Promise)
|
|
98
|
-
], OrchestrationController.prototype, "updateScript", null);
|
|
99
|
-
__decorate([
|
|
100
|
-
(0, common_1.Delete)(':scriptName'),
|
|
101
|
-
(0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
|
|
102
|
-
__param(0, (0, common_1.Param)('scriptName')),
|
|
103
|
-
__metadata("design:type", Function),
|
|
104
|
-
__metadata("design:paramtypes", [String]),
|
|
105
|
-
__metadata("design:returntype", Promise)
|
|
106
|
-
], OrchestrationController.prototype, "deleteScript", null);
|
|
107
|
-
__decorate([
|
|
108
|
-
(0, common_1.Get)('runs/active'),
|
|
109
|
-
__param(0, (0, common_1.Res)()),
|
|
110
|
-
__metadata("design:type", Function),
|
|
111
|
-
__metadata("design:paramtypes", [Object]),
|
|
112
|
-
__metadata("design:returntype", void 0)
|
|
113
|
-
], OrchestrationController.prototype, "getActiveRun", null);
|
|
114
|
-
__decorate([
|
|
115
|
-
(0, common_1.Post)('runs/start'),
|
|
116
|
-
(0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
|
|
117
|
-
__param(0, (0, common_1.Body)()),
|
|
118
|
-
__metadata("design:type", Function),
|
|
119
|
-
__metadata("design:paramtypes", [orchestration_dto_1.StartOrchestrationDto]),
|
|
120
|
-
__metadata("design:returntype", Promise)
|
|
121
|
-
], OrchestrationController.prototype, "startRun", null);
|
|
122
|
-
__decorate([
|
|
123
|
-
(0, common_1.Post)('runs/active/stop'),
|
|
124
|
-
(0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
|
|
125
|
-
__metadata("design:type", Function),
|
|
126
|
-
__metadata("design:paramtypes", []),
|
|
127
|
-
__metadata("design:returntype", Promise)
|
|
128
|
-
], OrchestrationController.prototype, "stopRun", null);
|
|
129
|
-
__decorate([
|
|
130
|
-
(0, common_1.Post)('runs/active/proceed'),
|
|
131
|
-
(0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
|
|
132
|
-
__metadata("design:type", Function),
|
|
133
|
-
__metadata("design:paramtypes", []),
|
|
134
|
-
__metadata("design:returntype", Promise)
|
|
135
|
-
], OrchestrationController.prototype, "proceedRun", null);
|
|
136
|
-
__decorate([
|
|
137
|
-
(0, common_1.Post)('runs/active/emergency-stop'),
|
|
138
|
-
(0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
|
|
139
|
-
__metadata("design:type", Function),
|
|
140
|
-
__metadata("design:paramtypes", []),
|
|
141
|
-
__metadata("design:returntype", Promise)
|
|
142
|
-
], OrchestrationController.prototype, "emergencyStop", null);
|
|
143
|
-
__decorate([
|
|
144
|
-
(0, common_1.Post)('runs/active/clear'),
|
|
145
|
-
(0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
|
|
146
|
-
__metadata("design:type", Function),
|
|
147
|
-
__metadata("design:paramtypes", []),
|
|
148
|
-
__metadata("design:returntype", Promise)
|
|
149
|
-
], OrchestrationController.prototype, "clearRun", null);
|
|
150
|
-
exports.OrchestrationController = OrchestrationController = __decorate([
|
|
151
|
-
(0, common_1.Controller)('orchestrations'),
|
|
152
|
-
__metadata("design:paramtypes", [orchestration_service_1.OrchestrationService,
|
|
153
|
-
orchestration_fs_service_1.OrchestrationFsService])
|
|
154
|
-
], OrchestrationController);
|
|
155
|
-
//# sourceMappingURL=orchestration.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration.controller.js","sourceRoot":"","sources":["../../../src/orchestration/orchestration.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAWwB;AACxB,mEAA+D;AAC/D,yEAAoE;AACpE,+DAIiC;AAI1B,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,YACmB,oBAA0C,EAC1C,SAAiC;QADjC,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,cAAS,GAAT,SAAS,CAAwB;IACjD,CAAC;IAKE,AAAN,KAAK,CAAC,WAAW;QACf,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;QAEnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACrD,OAAO,EAAE,OAAO,EAAE,CAAC;IACrB,CAAC;IAGK,AAAN,KAAK,CAAC,SAAS,CAAsB,UAAkB;QACrD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAC5D,OAAO,EAAE,OAAO,EAAE,CAAC;IACrB,CAAC;IAIK,AAAN,KAAK,CAAC,YAAY,CAAS,GAAiC;QAC1D,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAIK,AAAN,KAAK,CAAC,YAAY,CACK,UAAkB,EAC/B,GAAiC;QAEzC,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,UAAU,EAAE,GAAG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iDAAsB;GAHzC,uBAAuB,CAoFnC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.OrchestrationModule = void 0;
|
|
10
|
-
const common_1 = require("@nestjs/common");
|
|
11
|
-
const orchestration_service_1 = require("./orchestration.service");
|
|
12
|
-
const orchestration_controller_1 = require("./orchestration.controller");
|
|
13
|
-
const orchestration_fs_service_1 = require("./orchestration-fs.service");
|
|
14
|
-
const application_state_module_1 = require("../application-state/application-state.module");
|
|
15
|
-
const session_inputs_module_1 = require("../session-inputs/session-inputs.module");
|
|
16
|
-
const llm_responses_module_1 = require("../llm-responses/llm-responses.module");
|
|
17
|
-
const events_module_1 = require("../events/events.module");
|
|
18
|
-
const sessions_module_1 = require("../sessions/sessions.module");
|
|
19
|
-
const orchestration_parser_service_1 = require("./orchestration-parser.service");
|
|
20
|
-
let OrchestrationModule = class OrchestrationModule {
|
|
21
|
-
};
|
|
22
|
-
exports.OrchestrationModule = OrchestrationModule;
|
|
23
|
-
exports.OrchestrationModule = OrchestrationModule = __decorate([
|
|
24
|
-
(0, common_1.Module)({
|
|
25
|
-
imports: [
|
|
26
|
-
application_state_module_1.ApplicationStateModule,
|
|
27
|
-
events_module_1.EventsModule,
|
|
28
|
-
sessions_module_1.SessionsModule,
|
|
29
|
-
(0, common_1.forwardRef)(() => session_inputs_module_1.SessionInputsModule),
|
|
30
|
-
(0, common_1.forwardRef)(() => llm_responses_module_1.LlmResponsesModule),
|
|
31
|
-
],
|
|
32
|
-
providers: [
|
|
33
|
-
orchestration_service_1.OrchestrationService,
|
|
34
|
-
orchestration_fs_service_1.OrchestrationFsService,
|
|
35
|
-
orchestration_parser_service_1.OrchestrationParserService,
|
|
36
|
-
],
|
|
37
|
-
controllers: [orchestration_controller_1.OrchestrationController],
|
|
38
|
-
exports: [orchestration_service_1.OrchestrationService],
|
|
39
|
-
})
|
|
40
|
-
], OrchestrationModule);
|
|
41
|
-
//# sourceMappingURL=orchestration.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration.module.js","sourceRoot":"","sources":["../../../src/orchestration/orchestration.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,mEAA+D;AAC/D,yEAAqE;AACrE,yEAAoE;AACpE,4FAAuF;AACvF,mFAA8E;AAC9E,gFAA2E;AAC3E,2DAAuD;AACvD,iEAA6D;AAC7D,iFAA4E;AAkBrE,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,kDAAmB;8BAAnB,mBAAmB;IAhB/B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,iDAAsB;YACtB,4BAAY;YACZ,gCAAc;YACd,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,2CAAmB,CAAC;YACrC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,yCAAkB,CAAC;SACrC;QACD,SAAS,EAAE;YACT,4CAAoB;YACpB,iDAAsB;YACtB,yDAA0B;SAC3B;QACD,WAAW,EAAE,CAAC,kDAAuB,CAAC;QACtC,OAAO,EAAE,CAAC,4CAAoB,CAAC;KAChC,CAAC;GACW,mBAAmB,CAAG"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { OnModuleInit } from '@nestjs/common';
|
|
2
|
-
import { OrchestrationFsService } from './orchestration-fs.service';
|
|
3
|
-
import { ApplicationStateService } from '../application-state/application-state.service';
|
|
4
|
-
import { OrchestrationRunState } from './orchestration.types';
|
|
5
|
-
import { StartOrchestrationDto } from './dto/orchestration.dto';
|
|
6
|
-
import { EventsGateway } from '../events/events.gateway';
|
|
7
|
-
import { SessionInputsService } from '../session-inputs/session-inputs.service';
|
|
8
|
-
import { SessionsService } from '../sessions/sessions.service';
|
|
9
|
-
import { OrchestrationParserService } from './orchestration-parser.service';
|
|
10
|
-
export declare class OrchestrationService implements OnModuleInit {
|
|
11
|
-
private readonly fsService;
|
|
12
|
-
private readonly appStateService;
|
|
13
|
-
private readonly eventsGateway;
|
|
14
|
-
private readonly parserService;
|
|
15
|
-
private readonly sessionInputsService;
|
|
16
|
-
private readonly sessionsService;
|
|
17
|
-
private readonly logger;
|
|
18
|
-
private activeRun;
|
|
19
|
-
private timeoutTimer;
|
|
20
|
-
constructor(fsService: OrchestrationFsService, appStateService: ApplicationStateService, eventsGateway: EventsGateway, parserService: OrchestrationParserService, sessionInputsService: SessionInputsService, sessionsService: SessionsService);
|
|
21
|
-
onModuleInit(): Promise<void>;
|
|
22
|
-
private loadStateFromPersistence;
|
|
23
|
-
private setState;
|
|
24
|
-
private persistState;
|
|
25
|
-
private emitStatus;
|
|
26
|
-
private log;
|
|
27
|
-
getActiveRun(): OrchestrationRunState | null;
|
|
28
|
-
start(dto: StartOrchestrationDto): Promise<void>;
|
|
29
|
-
private execute;
|
|
30
|
-
onPromptPrepared(inputId: string): void;
|
|
31
|
-
stop(): Promise<void>;
|
|
32
|
-
proceed(): Promise<void>;
|
|
33
|
-
emergencyStop(): Promise<void>;
|
|
34
|
-
clearActiveRun(): Promise<void>;
|
|
35
|
-
resumeFromInput(inputId: string): Promise<void>;
|
|
36
|
-
fail(error: string): Promise<void>;
|
|
37
|
-
}
|