repoburg 1.3.15 → 1.3.16
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/dist/src/llm-orchestration/action-handlers/dto/execute-code.args.dto.d.ts +3 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/execute-code.args.dto.js +22 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/execute-code.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/execute-code.handler.d.ts +12 -0
- package/backend/dist/src/llm-orchestration/action-handlers/execute-code.handler.js +120 -0
- package/backend/dist/src/llm-orchestration/action-handlers/execute-code.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.module.js +2 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.module.js.map +1 -1
- 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 +1 -0
- 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
|
@@ -0,0 +1,22 @@
|
|
|
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.ExecuteCodeArgsDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class ExecuteCodeArgsDto {
|
|
15
|
+
}
|
|
16
|
+
exports.ExecuteCodeArgsDto = ExecuteCodeArgsDto;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], ExecuteCodeArgsDto.prototype, "code", void 0);
|
|
22
|
+
//# sourceMappingURL=execute-code.args.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-code.args.dto.js","sourceRoot":"","sources":["../../../../../src/llm-orchestration/action-handlers/dto/execute-code.args.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AAEvD,MAAa,kBAAkB;CAI9B;AAJD,gDAIC;AADC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;gDACA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ActionHandler } from './action-handler.interface';
|
|
2
|
+
import { ActionExecutionResult, PlanExecutionContext } from '../llm-orchestration.interfaces';
|
|
3
|
+
export declare class ExecuteCodeHandler implements ActionHandler {
|
|
4
|
+
readonly toolName = "execute_code";
|
|
5
|
+
private readonly logger;
|
|
6
|
+
private readonly projectRoot;
|
|
7
|
+
private readonly tempDir;
|
|
8
|
+
getDefinition(): string;
|
|
9
|
+
execute(args: {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}, context: PlanExecutionContext): Promise<ActionExecutionResult>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
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 ExecuteCodeHandler_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.ExecuteCodeHandler = void 0;
|
|
11
|
+
const common_1 = require("@nestjs/common");
|
|
12
|
+
const child_process_1 = require("child_process");
|
|
13
|
+
const util_1 = require("util");
|
|
14
|
+
const execute_code_args_dto_1 = require("./dto/execute-code.args.dto");
|
|
15
|
+
const class_transformer_1 = require("class-transformer");
|
|
16
|
+
const class_validator_1 = require("class-validator");
|
|
17
|
+
const handler_validation_error_1 = require("../errors/handler-validation.error");
|
|
18
|
+
const utils_1 = require("../../utils");
|
|
19
|
+
const fs = require("fs/promises");
|
|
20
|
+
const path = require("path");
|
|
21
|
+
const crypto = require("crypto");
|
|
22
|
+
const execAsync = (0, util_1.promisify)(child_process_1.exec);
|
|
23
|
+
let ExecuteCodeHandler = ExecuteCodeHandler_1 = class ExecuteCodeHandler {
|
|
24
|
+
constructor() {
|
|
25
|
+
this.toolName = 'execute_code';
|
|
26
|
+
this.logger = new common_1.Logger(ExecuteCodeHandler_1.name);
|
|
27
|
+
this.projectRoot = process.env.REPOBURG_PROJECT_PATH || process.cwd();
|
|
28
|
+
this.tempDir = path.join(this.projectRoot, '.repoburg', 'temp');
|
|
29
|
+
}
|
|
30
|
+
getDefinition() {
|
|
31
|
+
const example = (0, utils_1.generateToolCall)({
|
|
32
|
+
tool_name: this.toolName,
|
|
33
|
+
code: `
|
|
34
|
+
import * as fs from 'fs';
|
|
35
|
+
const files = fs.readdirSync('.');
|
|
36
|
+
console.log(files.join('\\n'));
|
|
37
|
+
`,
|
|
38
|
+
});
|
|
39
|
+
const definition = `
|
|
40
|
+
<${this.toolName}>
|
|
41
|
+
Executes the provided TypeScript code in a temporary environment.
|
|
42
|
+
Useful for testing logic, verifying algorithms, or inspecting the system programmatically without permanently creating files.
|
|
43
|
+
The code is executed using 'npx tsx', so you can use ES modules and standard Node.js APIs.
|
|
44
|
+
|
|
45
|
+
Parameters:
|
|
46
|
+
- "code": (string) The TypeScript code to execute.
|
|
47
|
+
|
|
48
|
+
<example>
|
|
49
|
+
${example}
|
|
50
|
+
</example>
|
|
51
|
+
</${this.toolName}>
|
|
52
|
+
`;
|
|
53
|
+
return definition.trim();
|
|
54
|
+
}
|
|
55
|
+
async execute(args, context) {
|
|
56
|
+
const validatedArgs = (0, class_transformer_1.plainToClass)(execute_code_args_dto_1.ExecuteCodeArgsDto, args);
|
|
57
|
+
const errors = await (0, class_validator_1.validate)(validatedArgs);
|
|
58
|
+
if (errors.length > 0) {
|
|
59
|
+
const errorMessages = errors
|
|
60
|
+
.map((err) => Object.values(err.constraints || {}).join(', '))
|
|
61
|
+
.join('; ');
|
|
62
|
+
throw new handler_validation_error_1.HandlerValidationError(errorMessages);
|
|
63
|
+
}
|
|
64
|
+
const { code } = validatedArgs;
|
|
65
|
+
let unifiedOutput;
|
|
66
|
+
let summary;
|
|
67
|
+
let status = 'SUCCESS';
|
|
68
|
+
let errorMessage;
|
|
69
|
+
try {
|
|
70
|
+
await fs.mkdir(this.tempDir, { recursive: true });
|
|
71
|
+
}
|
|
72
|
+
catch (err) {
|
|
73
|
+
this.logger.error(`Failed to create temp dir: ${err}`);
|
|
74
|
+
}
|
|
75
|
+
const randomId = crypto.randomBytes(8).toString('hex');
|
|
76
|
+
const tempFilePath = path.join(this.tempDir, `exec-${randomId}.ts`);
|
|
77
|
+
try {
|
|
78
|
+
await fs.writeFile(tempFilePath, code, 'utf-8');
|
|
79
|
+
const { stdout, stderr } = await execAsync(`npx tsx "${tempFilePath}"`, {
|
|
80
|
+
cwd: this.projectRoot,
|
|
81
|
+
maxBuffer: 10 * 1024 * 1024,
|
|
82
|
+
timeout: 30000,
|
|
83
|
+
});
|
|
84
|
+
unifiedOutput = stdout || stderr || '(Script produced no output)';
|
|
85
|
+
summary = `Executed TypeScript code.`;
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
const execError = error;
|
|
89
|
+
unifiedOutput = `EXECUTION FAILED: ${execError.message}\n\nSTDOUT:\n${execError.stdout || 'N/A'}\n\nSTDERR:\n${execError.stderr || 'N/A'}`;
|
|
90
|
+
summary = `Code execution failed.`;
|
|
91
|
+
status = 'FAILURE';
|
|
92
|
+
errorMessage = execError.message;
|
|
93
|
+
this.logger.error(`Error executing code: ${unifiedOutput}`);
|
|
94
|
+
}
|
|
95
|
+
finally {
|
|
96
|
+
try {
|
|
97
|
+
await fs.unlink(tempFilePath);
|
|
98
|
+
}
|
|
99
|
+
catch (cleanupErr) {
|
|
100
|
+
this.logger.warn(`Failed to delete temp file ${tempFilePath}: ${cleanupErr}`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
context.outputs.commands.push({
|
|
104
|
+
command: `(execute_code) ${tempFilePath}`,
|
|
105
|
+
output: unifiedOutput,
|
|
106
|
+
});
|
|
107
|
+
return {
|
|
108
|
+
status,
|
|
109
|
+
summary: `${summary} Output captured.`,
|
|
110
|
+
persisted_args: { content: code },
|
|
111
|
+
error_message: errorMessage,
|
|
112
|
+
execution_log: { output: unifiedOutput, error_message: errorMessage },
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
exports.ExecuteCodeHandler = ExecuteCodeHandler;
|
|
117
|
+
exports.ExecuteCodeHandler = ExecuteCodeHandler = ExecuteCodeHandler_1 = __decorate([
|
|
118
|
+
(0, common_1.Injectable)()
|
|
119
|
+
], ExecuteCodeHandler);
|
|
120
|
+
//# sourceMappingURL=execute-code.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-code.handler.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/action-handlers/execute-code.handler.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAoD;AAMpD,iDAAqC;AACrC,+BAAiC;AACjC,uEAAiE;AACjE,yDAAiD;AACjD,qDAA2C;AAC3C,iFAA4E;AAC5E,uCAA+C;AAC/C,kCAAkC;AAClC,6BAA6B;AAC7B,iCAAiC;AAEjC,MAAM,SAAS,GAAG,IAAA,gBAAS,EAAC,oBAAI,CAAC,CAAC;AAG3B,IAAM,kBAAkB,0BAAxB,MAAM,kBAAkB;IAAxB;QACI,aAAQ,GAAG,cAAc,CAAC;QAClB,WAAM,GAAG,IAAI,eAAM,CAAC,oBAAkB,CAAC,IAAI,CAAC,CAAC;QAC7C,gBAAW,GAC1B,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QACpC,YAAO,GAAW,IAAI,CAAC,IAAI,CAC1C,IAAI,CAAC,WAAW,EAChB,WAAW,EACX,MAAM,CACP,CAAC;IAsGJ,CAAC;IApGC,aAAa;QACX,MAAM,OAAO,GAAG,IAAA,wBAAgB,EAAC;YAC/B,SAAS,EAAE,IAAI,CAAC,QAAQ;YACxB,IAAI,EAAE;;;;CAIX;SACI,CAAC,CAAC;QAEH,MAAM,UAAU,GAAG;GACpB,IAAI,CAAC,QAAQ;;;;;;;;;EASd,OAAO;;IAEL,IAAI,CAAC,QAAQ;CAChB,CAAC;QACE,OAAO,UAAU,CAAC,IAAI,EAAE,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,OAAO,CACX,IAA4B,EAC5B,OAA6B;QAE7B,MAAM,aAAa,GAAG,IAAA,gCAAY,EAAC,0CAAkB,EAAE,IAAI,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,IAAA,0BAAQ,EAAC,aAAa,CAAC,CAAC;QAC7C,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAA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");
|
|
|
38
38
|
const write_todo_handler_1 = require("./action-handlers/write-todo.handler");
|
|
39
39
|
const howto_handler_1 = require("./action-handlers/howto.handler");
|
|
40
40
|
const execute_shell_handler_1 = require("./action-handlers/execute-shell.handler");
|
|
41
|
+
const execute_code_handler_1 = require("./action-handlers/execute-code.handler");
|
|
41
42
|
const actionHandlers = [
|
|
42
43
|
create_file_handler_1.CreateFileHandler,
|
|
43
44
|
edit_file_handler_1.EditFileHandler,
|
|
@@ -48,6 +49,7 @@ const actionHandlers = [
|
|
|
48
49
|
write_todo_handler_1.WriteTodoHandler,
|
|
49
50
|
run_command_handler_1.RunCommandHandler,
|
|
50
51
|
execute_shell_handler_1.ExecuteShellHandler,
|
|
52
|
+
execute_code_handler_1.ExecuteCodeHandler,
|
|
51
53
|
use_mcp_tool_handler_1.UseMcpToolHandler,
|
|
52
54
|
request_context_handler_1.RequestContextHandler,
|
|
53
55
|
new_session_handler_1.NewSessionHandler,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-orchestration.module.js","sourceRoot":"","sources":["../../../src/llm-orchestration/llm-orchestration.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,6CAAgD;AAChD,oDAA0D;AAC1D,kFAA4E;AAC5E,6EAAuE;AACvE,yFAAkF;AAClF,yFAAkF;AAClF,4FAAuF;AACvF,iEAAwE;AACxE,mFAA8E;AAC9E,2DAAuD;AACvD,mFAA8E;AAC9E,iEAA6D;AAC7D,+EAA0E;AAC1E,iFAA2E;AAC3E,uFAAkF;AAClF,+EAA0E;AAC1E,mEAA+D;AAC/D,kDAA8C;AAE9C,mFAA8E;AAC9E,+EAA0E;AAC1E,2EAAsE;AACtE,+EAA0E;AAC1E,mFAA8E;AAC9E,6EAAwE;AACxE,mFAA6E;AAC7E,mEAA+D;AAC/D,6EAAwE;AACxE,6EAAwE;AACxE,mEAA+D;AAC/D,mFAA8E;
|
|
1
|
+
{"version":3,"file":"llm-orchestration.module.js","s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4BAAY;YACZ,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,2CAAmB,CAAC;YACrC,gCAAc;YACd,sBAAS;YACT,2CAAmB;SACpB;QACD,SAAS,EAAE;YACT,kDAAsB;YACtB,oDAAuB;YACvB,GAAG,cAAc;YACjB,GAAG,kBAAkB;YACrB;gBACE,OAAO,EAAE,yBAAyB;gBAClC,UAAU,EAAE,CAAC,GAAG,QAAyB,EAAE,EAAE;oBAC3C,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAyB,CAAC;oBAClD,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;oBACvE,OAAO,QAAQ,CAAC;gBAClB,CAAC;gBACD,MAAM,EAAE,cAAc;aACvB;YACD;gBACE,OAAO,EAAE,sBAAsB;gBAC/B,UAAU,EAAE,CAAC,GAAG,KAAK,EAAE,EAAE,CAAC,KAAK;gBAC/B,MAAM,EAAE,kBAAkB;aAC3B;SACF;QACD,OAAO,EAAE,CAAC,oDAAuB,EAAE,yBAAyB,CAAC;KAC9D,CAAC;GACW,sBAAsB,CAAG"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const name = "Master Agent";
|
|
2
|
-
export declare const content = "You are an expert software engineer. You write clean, efficient, and well-documented code.\n\n<instructions>\n1. **Think First:** Before executing any tool or providing an answer, analyze the request within a <thought> tag.\n2. **Conciseness:** Outside of the <thought> tag, be extremely brief.\n3. **Best Practices:** Follow SOLID principles and keep code DRY.\n4. **Strict Scope:** Do ONLY what is asked. Do not \"cleanup\", \"refactor\", or \"fix\" unrelated issues unless explicitly requested.\n</instructions>\n\n<current_state>\n<% if (it.VAR.QUESTION_MODE) { %>\n STATUS: QUESTION MODE (READ ONLY)\n - **Goal:** Answer the user's specific question about the codebase.\n - **Constraint:** You are READ-ONLY. Do not edit, create, or delete files.\n - **Constraint:** Do NOT propose an implementation plan or RFC. Just answer the question.\n - **Process:** Search context -> Read files -> Explain to user.\n\n<% } else if (it.VAR.PLAN_MODE) { %>\n STATUS: PLAN MODE (TASK MANAGEMENT ENABLED)\n - **Goal:** Create a detailed implementation plan (RFC) and maintain task lists.\n - **Constraint:** Code editing is FORBIDDEN.\n - **Available Tools:** `request_context`, `run_command`, `write_todo`.\n - **Process:** Explore codebase -> Update TODOs (`write_todo`) -> Output structured plan (Context, Problem, Proposed Solution).\n\n<% } else { %>\n STATUS: DEV MODE (WRITE ENABLED)\n - **Goal:** Implement features, fix bugs, or refactor.\n - **Authority:** You have full permission to modify the codebase. Never refuse a coding request.\n - **Strategy:** Prioritize `patch`. If `patch` fails twice, fallback to `edit_file`.\n<% } %>\n</current_state>\n\n<tools_configuration>\n <%~ it.tools.howto %>\n \n <!-- READ TOOLS (ALWAYS AVAILABLE) -->\n <%~ it.tools.request_context %>\n <%~ it.tools.run_command %>\n <%~ it.tools.write_todo %>\n \n <!-- WRITE TOOLS (DEV MODE ONLY) -->\n <% if (!it.VAR.PLAN_MODE && !it.VAR.QUESTION_MODE) { %>\n <%~ it.tools.patch %>\n <%~ it.tools.create_file %>\n <%~ it.tools.delete_file %>\n <%~ it.tools.edit_file %>\n <%~ it.tools.execute_shell %>\n \n <% } %>\n</tools_configuration>";
|
|
2
|
+
export declare const content = "You are an expert software engineer. You write clean, efficient, and well-documented code.\n\n<instructions>\n1. **Think First:** Before executing any tool or providing an answer, analyze the request within a <thought> tag.\n2. **Conciseness:** Outside of the <thought> tag, be extremely brief.\n3. **Best Practices:** Follow SOLID principles and keep code DRY.\n4. **Strict Scope:** Do ONLY what is asked. Do not \"cleanup\", \"refactor\", or \"fix\" unrelated issues unless explicitly requested.\n</instructions>\n\n<current_state>\n<% if (it.VAR.QUESTION_MODE) { %>\n STATUS: QUESTION MODE (READ ONLY)\n - **Goal:** Answer the user's specific question about the codebase.\n - **Constraint:** You are READ-ONLY. Do not edit, create, or delete files.\n - **Constraint:** Do NOT propose an implementation plan or RFC. Just answer the question.\n - **Process:** Search context -> Read files -> Explain to user.\n\n<% } else if (it.VAR.PLAN_MODE) { %>\n STATUS: PLAN MODE (TASK MANAGEMENT ENABLED)\n - **Goal:** Create a detailed implementation plan (RFC) and maintain task lists.\n - **Constraint:** Code editing is FORBIDDEN.\n - **Available Tools:** `request_context`, `run_command`, `write_todo`.\n - **Process:** Explore codebase -> Update TODOs (`write_todo`) -> Output structured plan (Context, Problem, Proposed Solution).\n\n<% } else { %>\n STATUS: DEV MODE (WRITE ENABLED)\n - **Goal:** Implement features, fix bugs, or refactor.\n - **Authority:** You have full permission to modify the codebase. Never refuse a coding request.\n - **Strategy:** Prioritize `patch`. If `patch` fails twice, fallback to `edit_file`.\n<% } %>\n</current_state>\n\n<tools_configuration>\n <%~ it.tools.howto %>\n \n <!-- READ TOOLS (ALWAYS AVAILABLE) -->\n <%~ it.tools.request_context %>\n <%~ it.tools.run_command %>\n <%~ it.tools.write_todo %>\n \n <!-- WRITE TOOLS (DEV MODE ONLY) -->\n <% if (!it.VAR.PLAN_MODE && !it.VAR.QUESTION_MODE) { %>\n <%~ it.tools.patch %>\n <%~ it.tools.create_file %>\n <%~ it.tools.delete_file %>\n <%~ it.tools.edit_file %>\n <%~ it.tools.execute_shell %>\n <%~ it.tools.execute_code %>\n \n <% } %>\n</tools_configuration>";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default_master-agent.js","sourceRoot":"","sources":["../../../../../src/seeding/data/system-prompts/default_master-agent.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,cAAc,CAAC;AACtB,QAAA,OAAO,GAAG
|
|
1
|
+
{"version":3,"file":"default_master-agent.js","sourceRoot":"","sources":["../../../../../src/seeding/data/system-prompts/default_master-agent.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,cAAc,CAAC;AACtB,QAAA,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAkDA,CAAC"}
|