repoburg 1.2.13 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CODEMAP.md +8 -8
- package/backend/.env +4 -0
- package/backend/dist/src/ai-actions/ai-action-batch.service.d.ts +10 -3
- package/backend/dist/src/ai-actions/ai-action-batch.service.js +134 -12
- package/backend/dist/src/ai-actions/ai-action-batch.service.js.map +1 -1
- package/backend/dist/src/ai-actions/ai-actions.module.js +2 -7
- package/backend/dist/src/ai-actions/ai-actions.module.js.map +1 -1
- package/backend/dist/src/ai-actions/ai-actions.service.d.ts +16 -3
- package/backend/dist/src/ai-actions/ai-actions.service.js +75 -11
- package/backend/dist/src/ai-actions/ai-actions.service.js.map +1 -1
- package/backend/dist/src/app.module.js +0 -4
- package/backend/dist/src/app.module.js.map +1 -1
- package/backend/dist/src/core-entities/ai-action.entity.d.ts +1 -0
- package/backend/dist/src/core-entities/ai-action.entity.js +4 -0
- package/backend/dist/src/core-entities/ai-action.entity.js.map +1 -1
- package/backend/dist/src/llm-orchestration/action-handlers/action-handler.interface.d.ts +7 -0
- package/backend/dist/src/llm-orchestration/action-handlers/action-handler.interface.js +3 -0
- package/backend/dist/src/llm-orchestration/action-handlers/action-handler.interface.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/create-file.handler.d.ts +11 -0
- package/backend/dist/src/llm-orchestration/action-handlers/create-file.handler.js +65 -0
- package/backend/dist/src/llm-orchestration/action-handlers/create-file.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/delete-file.handler.d.ts +12 -0
- package/backend/dist/src/llm-orchestration/action-handlers/delete-file.handler.js +85 -0
- package/backend/dist/src/llm-orchestration/action-handlers/delete-file.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/create-file.args.dto.d.ts +4 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/create-file.args.dto.js +29 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/create-file.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/delete-file.args.dto.d.ts +3 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/delete-file.args.dto.js +22 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/delete-file.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/edit-file.args.dto.d.ts +4 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/edit-file.args.dto.js +29 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/edit-file.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/final.args.dto.d.ts +3 -0
- package/backend/dist/src/{llm-response-parser/llm-response-parser.module.js → llm-orchestration/action-handlers/dto/final.args.dto.js} +14 -13
- package/backend/dist/src/llm-orchestration/action-handlers/dto/final.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/new-session.args.dto.d.ts +3 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/new-session.args.dto.js +22 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/new-session.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/quick-edit.args.dto.d.ts +6 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/quick-edit.args.dto.js +46 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/quick-edit.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/request-context.args.dto.d.ts +11 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/request-context.args.dto.js +50 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/request-context.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/run-command.args.dto.d.ts +4 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/run-command.args.dto.js +27 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/run-command.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/sanitizer.decorator.d.ts +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/sanitizer.decorator.js +15 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/sanitizer.decorator.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/use-mcp-tool.args.dto.d.ts +5 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/use-mcp-tool.args.dto.js +49 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/use-mcp-tool.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/edit-file.handler.d.ts +12 -0
- package/backend/dist/src/llm-orchestration/action-handlers/edit-file.handler.js +78 -0
- package/backend/dist/src/llm-orchestration/action-handlers/edit-file.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/final.handler.d.ts +8 -0
- package/backend/dist/src/llm-orchestration/action-handlers/final.handler.js +40 -0
- package/backend/dist/src/llm-orchestration/action-handlers/final.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/new-session.handler.d.ts +8 -0
- package/backend/dist/src/llm-orchestration/action-handlers/new-session.handler.js +45 -0
- package/backend/dist/src/llm-orchestration/action-handlers/new-session.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/quick-edit.handler.d.ts +12 -0
- package/backend/dist/src/llm-orchestration/action-handlers/quick-edit.handler.js +133 -0
- package/backend/dist/src/llm-orchestration/action-handlers/quick-edit.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/request-context.handler.d.ts +8 -0
- package/backend/dist/src/llm-orchestration/action-handlers/request-context.handler.js +49 -0
- package/backend/dist/src/llm-orchestration/action-handlers/request-context.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/run-command.handler.d.ts +10 -0
- package/backend/dist/src/llm-orchestration/action-handlers/run-command.handler.js +73 -0
- package/backend/dist/src/llm-orchestration/action-handlers/run-command.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/use-mcp-tool.handler.d.ts +12 -0
- package/backend/dist/src/llm-orchestration/action-handlers/use-mcp-tool.handler.js +61 -0
- package/backend/dist/src/llm-orchestration/action-handlers/use-mcp-tool.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/errors/handler-validation.error.d.ts +4 -0
- package/backend/dist/src/llm-orchestration/errors/handler-validation.error.js +12 -0
- package/backend/dist/src/llm-orchestration/errors/handler-validation.error.js.map +1 -0
- package/backend/dist/src/llm-orchestration/hooks/follow-up-post-execution.hook.d.ts +25 -0
- package/backend/dist/src/llm-orchestration/hooks/follow-up-post-execution.hook.js +144 -0
- package/backend/dist/src/llm-orchestration/hooks/follow-up-post-execution.hook.js.map +1 -0
- package/backend/dist/src/llm-orchestration/hooks/frontend-notification.hook.d.ts +10 -0
- package/backend/dist/src/llm-orchestration/hooks/frontend-notification.hook.js +38 -0
- package/backend/dist/src/llm-orchestration/hooks/frontend-notification.hook.js.map +1 -0
- package/backend/dist/src/llm-orchestration/hooks/post-execution-hook.interface.d.ts +5 -0
- package/backend/dist/src/llm-orchestration/hooks/post-execution-hook.interface.js +3 -0
- package/backend/dist/src/llm-orchestration/hooks/post-execution-hook.interface.js.map +1 -0
- package/backend/dist/src/llm-orchestration/hooks/yolo-mode-post-execution.hook.d.ts +12 -0
- package/backend/dist/src/llm-orchestration/hooks/yolo-mode-post-execution.hook.js +55 -0
- package/backend/dist/src/llm-orchestration/hooks/yolo-mode-post-execution.hook.js.map +1 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.d.ts +52 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.js +13 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.interfaces.js.map +1 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.module.d.ts +2 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.module.js +90 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.module.js.map +1 -0
- package/backend/dist/src/llm-orchestration/llm-turn-processor.service.d.ts +20 -0
- package/backend/dist/src/llm-orchestration/llm-turn-processor.service.js +156 -0
- package/backend/dist/src/llm-orchestration/llm-turn-processor.service.js.map +1 -0
- package/backend/dist/src/llm-orchestration/parser/llm-output-parser.service.d.ts +5 -0
- package/backend/dist/src/llm-orchestration/parser/llm-output-parser.service.js +105 -0
- package/backend/dist/src/llm-orchestration/parser/llm-output-parser.service.js.map +1 -0
- package/backend/dist/src/llm-orchestration/parser/parsing.constants.d.ts +7 -0
- package/backend/dist/src/llm-orchestration/parser/parsing.constants.js +11 -0
- package/backend/dist/src/llm-orchestration/parser/parsing.constants.js.map +1 -0
- package/backend/dist/src/llm-responses/llm-responses.module.js +2 -0
- package/backend/dist/src/llm-responses/llm-responses.module.js.map +1 -1
- package/backend/dist/src/llm-responses/llm-responses.service.d.ts +3 -6
- package/backend/dist/src/llm-responses/llm-responses.service.js +9 -112
- package/backend/dist/src/llm-responses/llm-responses.service.js.map +1 -1
- package/backend/dist/src/seeding/data/system-prompts/carryover-agent.d.ts +1 -1
- package/backend/dist/src/seeding/data/system-prompts/carryover-agent.js +8 -8
- 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 +184 -91
- package/backend/dist/src/seeding/data/system-prompts/default_master-agent.js.map +1 -1
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/backend/dist/src/action-execution/action-execution.module.d.ts +0 -2
- package/backend/dist/src/action-execution/action-execution.module.js +0 -23
- package/backend/dist/src/action-execution/action-execution.module.js.map +0 -1
- package/backend/dist/src/action-execution/action-execution.service.d.ts +0 -19
- package/backend/dist/src/action-execution/action-execution.service.js +0 -149
- package/backend/dist/src/action-execution/action-execution.service.js.map +0 -1
- package/backend/dist/src/ai-actions/ai-action-creation.service.d.ts +0 -29
- package/backend/dist/src/ai-actions/ai-action-creation.service.js +0 -416
- package/backend/dist/src/ai-actions/ai-action-creation.service.js.map +0 -1
- package/backend/dist/src/llm-response-parser/dto/ai-action.dto.d.ts +0 -30
- package/backend/dist/src/llm-response-parser/dto/ai-action.dto.js +0 -162
- package/backend/dist/src/llm-response-parser/dto/ai-action.dto.js.map +0 -1
- package/backend/dist/src/llm-response-parser/errors/parsing.error.d.ts +0 -4
- package/backend/dist/src/llm-response-parser/errors/parsing.error.js +0 -13
- package/backend/dist/src/llm-response-parser/errors/parsing.error.js.map +0 -1
- package/backend/dist/src/llm-response-parser/llm-response-parser.module.d.ts +0 -2
- package/backend/dist/src/llm-response-parser/llm-response-parser.module.js.map +0 -1
- package/backend/dist/src/llm-response-parser/llm-response-parser.service.d.ts +0 -9
- package/backend/dist/src/llm-response-parser/llm-response-parser.service.js +0 -215
- package/backend/dist/src/llm-response-parser/llm-response-parser.service.js.map +0 -1
- package/backend/dist/src/llm-response-parser/parsing.constants.d.ts +0 -20
- package/backend/dist/src/llm-response-parser/parsing.constants.js +0 -24
- package/backend/dist/src/llm-response-parser/parsing.constants.js.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
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.RunCommandArgsDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class RunCommandArgsDto {
|
|
15
|
+
}
|
|
16
|
+
exports.RunCommandArgsDto = RunCommandArgsDto;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)({ message: 'command_string must be a string.' }),
|
|
19
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'command_string must not be empty.' }),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], RunCommandArgsDto.prototype, "command_string", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsOptional)(),
|
|
24
|
+
(0, class_validator_1.IsString)({ message: 'reason must be a string.' }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], RunCommandArgsDto.prototype, "reason", void 0);
|
|
27
|
+
//# sourceMappingURL=run-command.args.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-command.args.dto.js","sourceRoot":"","sources":["../../../../../src/llm-orchestration/action-handlers/dto/run-command.args.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmE;AAEnE,MAAa,iBAAiB;CAQ7B;AARD,8CAQC;AALC;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,kCAAkC,EAAE,CAAC;IACzD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,mCAAmC,EAAE,CAAC;;yDACtC;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,0BAA0B,EAAE,CAAC;;iDAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SanitizeCodeBlock(): PropertyDecorator;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SanitizeCodeBlock = SanitizeCodeBlock;
|
|
4
|
+
const class_transformer_1 = require("class-transformer");
|
|
5
|
+
function SanitizeCodeBlock() {
|
|
6
|
+
return (0, class_transformer_1.Transform)(({ value }) => {
|
|
7
|
+
if (typeof value !== 'string') {
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
const trimmedValue = value.trim();
|
|
11
|
+
const codeMatch = trimmedValue.match(/^```(?:\w*\n)?([\s\S]*)```$/);
|
|
12
|
+
return codeMatch ? codeMatch[1].trim() : trimmedValue;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=sanitizer.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitizer.decorator.js","sourceRoot":"","sources":["../../../../../src/llm-orchestration/action-handlers/dto/sanitizer.decorator.ts"],"names":[],"mappings":";;AAgBA,8CAeC;AA/BD,yDAA8C;AAgB9C,SAAgB,iBAAiB;IAC/B,OAAO,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAGlC,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;QAIpE,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;IACxD,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.UseMcpToolArgsDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
class UseMcpToolArgsDto {
|
|
16
|
+
}
|
|
17
|
+
exports.UseMcpToolArgsDto = UseMcpToolArgsDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsString)({ message: 'server_name must be a string.' }),
|
|
20
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'server_name must not be empty.' }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], UseMcpToolArgsDto.prototype, "server_name", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsString)({ message: 'mcp_tool_name must be a string.' }),
|
|
25
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'mcp_tool_name must not be empty.' }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], UseMcpToolArgsDto.prototype, "mcp_tool_name", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_transformer_1.Transform)(({ value }) => {
|
|
30
|
+
if (typeof value !== 'string') {
|
|
31
|
+
return value;
|
|
32
|
+
}
|
|
33
|
+
try {
|
|
34
|
+
const parsed = JSON.parse(value);
|
|
35
|
+
if (typeof parsed === 'object' && parsed !== null) {
|
|
36
|
+
return parsed;
|
|
37
|
+
}
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
}),
|
|
44
|
+
(0, class_validator_1.IsObject)({
|
|
45
|
+
message: 'arguments must be a string containing a valid JSON object.',
|
|
46
|
+
}),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], UseMcpToolArgsDto.prototype, "arguments", void 0);
|
|
49
|
+
//# sourceMappingURL=use-mcp-tool.args.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-mcp-tool.args.dto.js","sourceRoot":"","sources":["../../../../../src/llm-orchestration/action-handlers/dto/use-mcp-tool.args.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiE;AACjE,yDAA8C;AAE9C,MAAa,iBAAiB;CA4B7B;AA5BD,8CA4BC;AAzBC;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,+BAA+B,EAAE,CAAC;IACtD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,gCAAgC,EAAE,CAAC;;sDACtC;AAIpB;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,iCAAiC,EAAE,CAAC;IACxD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,kCAAkC,EAAE,CAAC;;wDACtC;AAoBtB;IAlBC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QACvB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAEjC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;gBAClD,OAAO,MAAM,CAAC;YAChB,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC,CAAC;IACD,IAAA,0BAAQ,EAAC;QACR,OAAO,EAAE,4DAA4D;KACtE,CAAC;;oDACgB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ActionHandler } from './action-handler.interface';
|
|
2
|
+
import { ActionExecutionResult, PlanExecutionContext } from '../llm-orchestration.interfaces';
|
|
3
|
+
export declare class EditFileHandler implements ActionHandler {
|
|
4
|
+
readonly toolName = "edit_file";
|
|
5
|
+
private readonly logger;
|
|
6
|
+
private readonly projectRoot;
|
|
7
|
+
private resolveAndValidatePath;
|
|
8
|
+
private readFileContent;
|
|
9
|
+
execute(args: {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}, _context: PlanExecutionContext): Promise<ActionExecutionResult>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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 EditFileHandler_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.EditFileHandler = void 0;
|
|
11
|
+
const common_1 = require("@nestjs/common");
|
|
12
|
+
const fs = require("fs/promises");
|
|
13
|
+
const path = require("path");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
const handler_validation_error_1 = require("../errors/handler-validation.error");
|
|
17
|
+
const edit_file_args_dto_1 = require("./dto/edit-file.args.dto");
|
|
18
|
+
let EditFileHandler = EditFileHandler_1 = class EditFileHandler {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.toolName = 'edit_file';
|
|
21
|
+
this.logger = new common_1.Logger(EditFileHandler_1.name);
|
|
22
|
+
this.projectRoot = process.env.REPOBURG_PROJECT_PATH || process.cwd();
|
|
23
|
+
}
|
|
24
|
+
resolveAndValidatePath(unsafePath) {
|
|
25
|
+
const normalizedPath = path.normalize(unsafePath);
|
|
26
|
+
if (path.isAbsolute(normalizedPath)) {
|
|
27
|
+
throw new common_1.BadRequestException(`Absolute paths are not allowed: ${unsafePath}`);
|
|
28
|
+
}
|
|
29
|
+
const resolvedPath = path.resolve(this.projectRoot, normalizedPath);
|
|
30
|
+
if (!resolvedPath.startsWith(this.projectRoot)) {
|
|
31
|
+
throw new common_1.BadRequestException(`Path traversal is not allowed: ${unsafePath}`);
|
|
32
|
+
}
|
|
33
|
+
return resolvedPath;
|
|
34
|
+
}
|
|
35
|
+
async readFileContent(filePath) {
|
|
36
|
+
try {
|
|
37
|
+
return await fs.readFile(filePath, 'utf8');
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
if (error.code === 'ENOENT') {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
async execute(args, _context) {
|
|
47
|
+
const validatedArgs = (0, class_transformer_1.plainToClass)(edit_file_args_dto_1.EditFileArgsDto, args);
|
|
48
|
+
const errors = await (0, class_validator_1.validate)(validatedArgs);
|
|
49
|
+
if (errors.length > 0) {
|
|
50
|
+
const errorMessages = errors
|
|
51
|
+
.map((err) => Object.values(err.constraints || {}).join(', '))
|
|
52
|
+
.join('; ');
|
|
53
|
+
throw new handler_validation_error_1.HandlerValidationError(errorMessages);
|
|
54
|
+
}
|
|
55
|
+
const { file_path, content } = validatedArgs;
|
|
56
|
+
const safePath = this.resolveAndValidatePath(file_path);
|
|
57
|
+
const originalContent = await this.readFileContent(safePath);
|
|
58
|
+
try {
|
|
59
|
+
await fs.mkdir(path.dirname(safePath), { recursive: true });
|
|
60
|
+
await fs.writeFile(safePath, content, 'utf8');
|
|
61
|
+
return {
|
|
62
|
+
status: 'SUCCESS',
|
|
63
|
+
summary: `File "${file_path}" edited.`,
|
|
64
|
+
persisted_args: { file_path, content },
|
|
65
|
+
original_content_for_revert: originalContent,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
this.logger.error(`Failed to edit file at ${file_path}: ${error.message}`);
|
|
70
|
+
throw new common_1.InternalServerErrorException(`Failed to edit file "${file_path}": ${error.message}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
exports.EditFileHandler = EditFileHandler;
|
|
75
|
+
exports.EditFileHandler = EditFileHandler = EditFileHandler_1 = __decorate([
|
|
76
|
+
(0, common_1.Injectable)()
|
|
77
|
+
], EditFileHandler);
|
|
78
|
+
//# sourceMappingURL=edit-file.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-file.handler.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/action-handlers/edit-file.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAKwB;AACxB,kCAAkC;AAClC,6BAA6B;AAC7B,yDAAiD;AACjD,qDAA2C;AAM3C,iFAA4E;AAC5E,iEAA2D;AAGpD,IAAM,eAAe,uBAArB,MAAM,eAAe;IAArB;QACI,aAAQ,GAAG,WAAW,CAAC;QACf,WAAM,GAAG,IAAI,eAAM,CAAC,iBAAe,CAAC,IAAI,CAAC,CAAC;QAC1C,gBAAW,GAC1B,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAkEvD,CAAC;IAhES,sBAAsB,CAAC,UAAkB;QAC/C,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAClD,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc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SAAS,EAAE,OAAO,EAAE,GAAG,aAAa,CAAC;QAC7C,MAAM,QAAQ,GAAG,IAAI,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;QAExD,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QAE7D,IAAI,CAAC;YACH,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAC5D,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YAC9C,OAAO;gBACL,MAAM,EAAE,SAAS;gBACjB,OAAO,EAAE,SAAS,SAAS,WAAW;gBACtC,cAAc,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE;gBACtC,2BAA2B,EAAE,eAAe;aAC7C,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,0BAA0B,SAAS,KAAK,KAAK,CAAC,OAAO,EAAE,CACxD,CAAC;YACF,MAAM,IAAI,qCAA4B,CACpC,wBAAwB,SAAS,MAAM,KAAK,CAAC,OAAO,EAAE,CACvD,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AAtEY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;GACA,eAAe,CAsE3B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActionHandler } from './action-handler.interface';
|
|
2
|
+
import { ActionExecutionResult, PlanExecutionContext } from '../llm-orchestration.interfaces';
|
|
3
|
+
export declare class FinalHandler implements ActionHandler {
|
|
4
|
+
readonly toolName = "final";
|
|
5
|
+
execute(args: {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}, context: PlanExecutionContext): Promise<ActionExecutionResult>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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.FinalHandler = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const final_args_dto_1 = require("./dto/final.args.dto");
|
|
12
|
+
const class_transformer_1 = require("class-transformer");
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const handler_validation_error_1 = require("../errors/handler-validation.error");
|
|
15
|
+
let FinalHandler = class FinalHandler {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.toolName = 'final';
|
|
18
|
+
}
|
|
19
|
+
async execute(args, context) {
|
|
20
|
+
const validatedArgs = (0, class_transformer_1.plainToClass)(final_args_dto_1.FinalArgsDto, args);
|
|
21
|
+
const errors = await (0, class_validator_1.validate)(validatedArgs);
|
|
22
|
+
if (errors.length > 0) {
|
|
23
|
+
const errorMessages = errors
|
|
24
|
+
.map((err) => Object.values(err.constraints || {}).join(', '))
|
|
25
|
+
.join('; ');
|
|
26
|
+
throw new handler_validation_error_1.HandlerValidationError(errorMessages);
|
|
27
|
+
}
|
|
28
|
+
context.flags.is_final = true;
|
|
29
|
+
return {
|
|
30
|
+
status: 'SUCCESS',
|
|
31
|
+
summary: 'Plan marked as final.',
|
|
32
|
+
persisted_args: validatedArgs,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.FinalHandler = FinalHandler;
|
|
37
|
+
exports.FinalHandler = FinalHandler = __decorate([
|
|
38
|
+
(0, common_1.Injectable)()
|
|
39
|
+
], FinalHandler);
|
|
40
|
+
//# sourceMappingURL=final.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"final.handler.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/action-handlers/final.handler.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAM5C,yDAAoD;AACpD,yDAAiD;AACjD,qDAA2C;AAC3C,iFAA4E;AAGrE,IAAM,YAAY,GAAlB,MAAM,YAAY;IAAlB;QACI,aAAQ,GAAG,OAAO,CAAC;IAuB9B,CAAC;IArBC,KAAK,CAAC,OAAO,CACX,IAA4B,EAC5B,OAA6B;QAE7B,MAAM,aAAa,GAAG,IAAA,gCAAY,EAAC,6BAAY,EAAE,IAAI,CAAC,CAAC;QACvD,MAAM,MAAM,GAAG,MAAM,IAAA,0BAAQ,EAAC,aAAa,CAAC,CAAC;QAC7C,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,aAAa,GAAG,MAAM;iBACzB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBAC7D,IAAI,CAAC,IAAI,CAAC,CAAC;YACd,MAAM,IAAI,iDAAsB,CAAC,aAAa,CAAC,CAAC;QAClD,CAAC;QAED,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;QAE9B,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,uBAAuB;YAChC,cAAc,EAAE,aAAa;SAC9B,CAAC;IACJ,CAAC;CACF,CAAA;AAxBY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;GACA,YAAY,CAwBxB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActionHandler } from './action-handler.interface';
|
|
2
|
+
import { ActionExecutionResult, PlanExecutionContext } from '../llm-orchestration.interfaces';
|
|
3
|
+
export declare class NewSessionHandler implements ActionHandler {
|
|
4
|
+
readonly toolName = "new_session";
|
|
5
|
+
execute(args: {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}, context: PlanExecutionContext): Promise<ActionExecutionResult>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.NewSessionHandler = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const new_session_args_dto_1 = require("./dto/new-session.args.dto");
|
|
12
|
+
const class_transformer_1 = require("class-transformer");
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const handler_validation_error_1 = require("../errors/handler-validation.error");
|
|
15
|
+
let NewSessionHandler = class NewSessionHandler {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.toolName = 'new_session';
|
|
18
|
+
}
|
|
19
|
+
async execute(args, context) {
|
|
20
|
+
const validatedArgs = (0, class_transformer_1.plainToClass)(new_session_args_dto_1.NewSessionArgsDto, args);
|
|
21
|
+
const errors = await (0, class_validator_1.validate)(validatedArgs);
|
|
22
|
+
if (errors.length > 0) {
|
|
23
|
+
const errorMessages = errors
|
|
24
|
+
.map((err) => Object.values(err.constraints || {}).join(', '))
|
|
25
|
+
.join('; ');
|
|
26
|
+
throw new handler_validation_error_1.HandlerValidationError(errorMessages);
|
|
27
|
+
}
|
|
28
|
+
context.flags.should_halt = true;
|
|
29
|
+
context.flags.halt_reason = 'NEW_SESSION';
|
|
30
|
+
context.followUpAction = {
|
|
31
|
+
type: 'NEW_SESSION',
|
|
32
|
+
data: { handover_string: validatedArgs.handover_string },
|
|
33
|
+
};
|
|
34
|
+
return {
|
|
35
|
+
status: 'SUCCESS',
|
|
36
|
+
summary: 'Plan halted for session handover.',
|
|
37
|
+
persisted_args: validatedArgs,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
exports.NewSessionHandler = NewSessionHandler;
|
|
42
|
+
exports.NewSessionHandler = NewSessionHandler = __decorate([
|
|
43
|
+
(0, common_1.Injectable)()
|
|
44
|
+
], NewSessionHandler);
|
|
45
|
+
//# sourceMappingURL=new-session.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-session.handler.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/action-handlers/new-session.handler.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAM5C,qEAA+D;AAC/D,yDAAiD;AACjD,qDAA2C;AAC3C,iFAA4E;AAGrE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAAvB;QACI,aAAQ,GAAG,aAAa,CAAC;IA4BpC,CAAC;IA1BC,KAAK,CAAC,OAAO,CACX,IAA4B,EAC5B,OAA6B;QAE7B,MAAM,aAAa,GAAG,IAAA,gCAAY,EAAC,wCAAiB,EAAE,IAAI,CAAC,CAAC;QAC5D,MAAM,MAAM,GAAG,MAAM,IAAA,0BAAQ,EAAC,aAAa,CAAC,CAAC;QAC7C,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,aAAa,GAAG,MAAM;iBACzB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBAC7D,IAAI,CAAC,IAAI,CAAC,CAAC;YACd,MAAM,IAAI,iDAAsB,CAAC,aAAa,CAAC,CAAC;QAClD,CAAC;QAED,OAAO,CAAC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;QACjC,OAAO,CAAC,KAAK,CAAC,WAAW,GAAG,aAAa,CAAC;QAC1C,OAAO,CAAC,cAAc,GAAG;YACvB,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,EAAE,eAAe,EAAE,aAAa,CAAC,eAAe,EAAE;SACzD,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,mCAAmC;YAC5C,cAAc,EAAE,aAAa;SAC9B,CAAC;IACJ,CAAC;CACF,CAAA;AA7BY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;GACA,iBAAiB,CA6B7B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ActionHandler } from './action-handler.interface';
|
|
2
|
+
import { ActionExecutionResult, PlanExecutionContext } from '../llm-orchestration.interfaces';
|
|
3
|
+
export declare class QuickEditHandler implements ActionHandler {
|
|
4
|
+
readonly toolName = "quick_edit";
|
|
5
|
+
private readonly logger;
|
|
6
|
+
private readonly projectRoot;
|
|
7
|
+
private resolveAndValidatePath;
|
|
8
|
+
private formatError;
|
|
9
|
+
execute(args: {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}, context: PlanExecutionContext): Promise<ActionExecutionResult>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
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 QuickEditHandler_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.QuickEditHandler = void 0;
|
|
11
|
+
const common_1 = require("@nestjs/common");
|
|
12
|
+
const fs = require("fs/promises");
|
|
13
|
+
const path = require("path");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
const handler_validation_error_1 = require("../errors/handler-validation.error");
|
|
17
|
+
const quick_edit_args_dto_1 = require("./dto/quick-edit.args.dto");
|
|
18
|
+
let QuickEditHandler = QuickEditHandler_1 = class QuickEditHandler {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.toolName = 'quick_edit';
|
|
21
|
+
this.logger = new common_1.Logger(QuickEditHandler_1.name);
|
|
22
|
+
this.projectRoot = process.env.REPOBURG_PROJECT_PATH || process.cwd();
|
|
23
|
+
}
|
|
24
|
+
resolveAndValidatePath(unsafePath) {
|
|
25
|
+
const normalizedPath = path.normalize(unsafePath);
|
|
26
|
+
if (path.isAbsolute(normalizedPath)) {
|
|
27
|
+
throw new common_1.BadRequestException(`Absolute paths are not allowed: ${unsafePath}`);
|
|
28
|
+
}
|
|
29
|
+
const resolvedPath = path.resolve(this.projectRoot, normalizedPath);
|
|
30
|
+
if (!resolvedPath.startsWith(this.projectRoot)) {
|
|
31
|
+
throw new common_1.BadRequestException(`Path traversal is not allowed: ${unsafePath}`);
|
|
32
|
+
}
|
|
33
|
+
return resolvedPath;
|
|
34
|
+
}
|
|
35
|
+
formatError(filePath, reason, searchBlock) {
|
|
36
|
+
let reasonText;
|
|
37
|
+
switch (reason) {
|
|
38
|
+
case 'NOT_FOUND':
|
|
39
|
+
reasonText = 'The `search_block` was **not found**';
|
|
40
|
+
break;
|
|
41
|
+
case 'NOT_UNIQUE':
|
|
42
|
+
reasonText =
|
|
43
|
+
'The `search_block` was **not unique** (it appeared multiple times)';
|
|
44
|
+
break;
|
|
45
|
+
case 'FILE_NOT_FOUND':
|
|
46
|
+
reasonText = 'The file itself could **not be found**';
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
return `In file \`${filePath}\`, the action failed. Reason: ${reasonText}. The problematic search block was:\n\`\`\`\n${searchBlock}\n\`\`\`\nYou MUST request the file content again to get the latest version before retrying.`;
|
|
50
|
+
}
|
|
51
|
+
async execute(args, context) {
|
|
52
|
+
const validatedArgs = (0, class_transformer_1.plainToClass)(quick_edit_args_dto_1.QuickEditArgsDto, args);
|
|
53
|
+
const errors = await (0, class_validator_1.validate)(validatedArgs);
|
|
54
|
+
if (errors.length > 0) {
|
|
55
|
+
const errorMessages = errors
|
|
56
|
+
.map((err) => Object.values(err.constraints || {}).join(', '))
|
|
57
|
+
.join('; ');
|
|
58
|
+
throw new handler_validation_error_1.HandlerValidationError(errorMessages);
|
|
59
|
+
}
|
|
60
|
+
const { file_path, action, search_block, new_content } = validatedArgs;
|
|
61
|
+
const safePath = this.resolveAndValidatePath(file_path);
|
|
62
|
+
const originalContent = await fs
|
|
63
|
+
.readFile(safePath, 'utf8')
|
|
64
|
+
.catch((error) => {
|
|
65
|
+
if (error.code === 'ENOENT') {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
throw error;
|
|
69
|
+
});
|
|
70
|
+
if (originalContent === null) {
|
|
71
|
+
const errorMessage = this.formatError(file_path, 'FILE_NOT_FOUND', search_block);
|
|
72
|
+
context.feedback.validationErrors.push({
|
|
73
|
+
tool_name: this.toolName,
|
|
74
|
+
error: errorMessage,
|
|
75
|
+
});
|
|
76
|
+
return {
|
|
77
|
+
status: 'FAILURE',
|
|
78
|
+
summary: `Quick edit on "${file_path}" failed: File not found.`,
|
|
79
|
+
error_message: errorMessage,
|
|
80
|
+
persisted_args: validatedArgs,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
const parts = originalContent.split(search_block);
|
|
84
|
+
if (parts.length !== 2) {
|
|
85
|
+
const reason = parts.length === 1 ? 'NOT_FOUND' : 'NOT_UNIQUE';
|
|
86
|
+
const errorMessage = this.formatError(file_path, reason, search_block);
|
|
87
|
+
context.feedback.validationErrors.push({
|
|
88
|
+
tool_name: this.toolName,
|
|
89
|
+
error: errorMessage,
|
|
90
|
+
});
|
|
91
|
+
return {
|
|
92
|
+
status: 'FAILURE',
|
|
93
|
+
summary: `Quick edit on "${file_path}" failed: Search block issue (${reason}).`,
|
|
94
|
+
error_message: errorMessage,
|
|
95
|
+
persisted_args: validatedArgs,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
let newFileContent;
|
|
99
|
+
const [before, after] = parts;
|
|
100
|
+
switch (action) {
|
|
101
|
+
case 'replace':
|
|
102
|
+
newFileContent = `${before}${new_content}${after}`;
|
|
103
|
+
break;
|
|
104
|
+
case 'insert_after':
|
|
105
|
+
newFileContent = `${before}${search_block}${new_content}${after}`;
|
|
106
|
+
break;
|
|
107
|
+
case 'insert_before':
|
|
108
|
+
newFileContent = `${before}${new_content}${search_block}${after}`;
|
|
109
|
+
break;
|
|
110
|
+
case 'delete_block':
|
|
111
|
+
newFileContent = `${before}${after}`;
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
try {
|
|
115
|
+
await fs.writeFile(safePath, newFileContent, 'utf8');
|
|
116
|
+
return {
|
|
117
|
+
status: 'SUCCESS',
|
|
118
|
+
summary: `File "${file_path}" successfully modified with quick_edit.`,
|
|
119
|
+
persisted_args: { ...validatedArgs, content: newFileContent },
|
|
120
|
+
original_content_for_revert: originalContent,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
this.logger.error(`Failed to write file for quick_edit at ${file_path}: ${error.message}`);
|
|
125
|
+
throw new common_1.InternalServerErrorException(`Failed to quick_edit file "${file_path}": ${error.message}`);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
exports.QuickEditHandler = QuickEditHandler;
|
|
130
|
+
exports.QuickEditHandler = QuickEditHandler = QuickEditHandler_1 = __decorate([
|
|
131
|
+
(0, common_1.Injectable)()
|
|
132
|
+
], QuickEditHandler);
|
|
133
|
+
//# sourceMappingURL=quick-edit.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quick-edit.handler.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/action-handlers/quick-edit.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAKwB;AACxB,kCAAkC;AAClC,6BAA6B;AAC7B,yDAAiD;AACjD,qDAA2C;AAM3C,iFAA4E;AAC5E,mEAA6D;AAGtD,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAAtB;QACI,aAAQ,GAAG,YAAY,CAAC;QAChB,WAAM,GAAG,IAAI,eAAM,CAAC,kBAAgB,CAAC,IAAI,CAAC,CAAC;QAC3C,gBAAW,GAC1B,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAsIvD,CAAC;IApIS,sBAAsB,CAAC,UAAkB;QAC/C,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAClD,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,4BAAmB,CAC3B,mCAAmC,UAAU,EAAE,CAChD,CAAC;QACJ,CAAC;QACD,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QACpE,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CA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0 +1,8 @@
|
|
|
1
|
+
import { ActionHandler } from './action-handler.interface';
|
|
2
|
+
import { ActionExecutionResult, PlanExecutionContext } from '../llm-orchestration.interfaces';
|
|
3
|
+
export declare class RequestContextHandler implements ActionHandler {
|
|
4
|
+
readonly toolName = "request_context";
|
|
5
|
+
execute(args: {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}, context: PlanExecutionContext): Promise<ActionExecutionResult>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.RequestContextHandler = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const request_context_args_dto_1 = require("./dto/request-context.args.dto");
|
|
12
|
+
const class_transformer_1 = require("class-transformer");
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const handler_validation_error_1 = require("../errors/handler-validation.error");
|
|
15
|
+
let RequestContextHandler = class RequestContextHandler {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.toolName = 'request_context';
|
|
18
|
+
}
|
|
19
|
+
async execute(args, context) {
|
|
20
|
+
const validatedArgs = (0, class_transformer_1.plainToClass)(request_context_args_dto_1.RequestContextArgsDto, args);
|
|
21
|
+
const errors = await (0, class_validator_1.validate)(validatedArgs);
|
|
22
|
+
if (errors.length > 0) {
|
|
23
|
+
const errorMessages = errors
|
|
24
|
+
.map((err) => Object.values(err.constraints || {}).join(', '))
|
|
25
|
+
.join('; ');
|
|
26
|
+
throw new handler_validation_error_1.HandlerValidationError(errorMessages);
|
|
27
|
+
}
|
|
28
|
+
const { files, folders } = validatedArgs;
|
|
29
|
+
context.flags.should_halt = true;
|
|
30
|
+
context.flags.halt_reason = 'CONTEXT_REQUESTED';
|
|
31
|
+
context.followUpAction = {
|
|
32
|
+
type: 'AUTO_CONTEXT_FETCH',
|
|
33
|
+
data: {
|
|
34
|
+
files: files ? files.split(',').map((f) => f.trim()) : [],
|
|
35
|
+
folders: folders ? folders.split(',').map((f) => f.trim()) : [],
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
return {
|
|
39
|
+
status: 'SUCCESS',
|
|
40
|
+
summary: 'Plan halted to fetch additional context.',
|
|
41
|
+
persisted_args: validatedArgs,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
exports.RequestContextHandler = RequestContextHandler;
|
|
46
|
+
exports.RequestContextHandler = RequestContextHandler = __decorate([
|
|
47
|
+
(0, common_1.Injectable)()
|
|
48
|
+
], RequestContextHandler);
|
|
49
|
+
//# sourceMappingURL=request-context.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-context.handler.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/action-handlers/request-context.handler.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAM5C,6EAAuE;AACvE,yDAAiD;AACjD,qDAA2C;AAC3C,iFAA4E;AAGrE,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAA3B;QACI,aAAQ,GAAG,iBAAiB,CAAC;IAiCxC,CAAC;IA/BC,KAAK,CAAC,OAAO,CACX,IAA4B,EAC5B,OAA6B;QAE7B,MAAM,aAAa,GAAG,IAAA,gCAAY,EAAC,gDAAqB,EAAE,IAAI,CAAC,CAAC;QAChE,MAAM,MAAM,GAA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
|
|
1
|
+
import { ActionHandler } from './action-handler.interface';
|
|
2
|
+
import { ActionExecutionResult, PlanExecutionContext } from '../llm-orchestration.interfaces';
|
|
3
|
+
export declare class RunCommandHandler implements ActionHandler {
|
|
4
|
+
readonly toolName = "run_command";
|
|
5
|
+
private readonly logger;
|
|
6
|
+
private readonly projectRoot;
|
|
7
|
+
execute(args: {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}, context: PlanExecutionContext): Promise<ActionExecutionResult>;
|
|
10
|
+
}
|