kodu 1.1.21 → 2.0.0
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/AGENTS.md +36 -68
- package/README.md +97 -96
- package/dist/package.json +1 -2
- package/dist/src/app.module.js +0 -8
- package/dist/src/app.module.js.map +1 -1
- package/dist/src/commands/init/init.command.d.ts +2 -9
- package/dist/src/commands/init/init.command.js +15 -241
- package/dist/src/commands/init/init.command.js.map +1 -1
- package/dist/src/commands/pack/pack.command.d.ts +9 -0
- package/dist/src/commands/pack/pack.command.js +72 -3
- package/dist/src/commands/pack/pack.command.js.map +1 -1
- package/dist/src/core/config/config.schema.d.ts +0 -46
- package/dist/src/core/config/config.schema.js +1 -51
- package/dist/src/core/config/config.schema.js.map +1 -1
- package/dist/src/core/config/config.service.js +2 -2
- package/dist/src/core/config/config.service.js.map +1 -1
- package/dist/src/core/config/prompt.service.d.ts +1 -4
- package/dist/src/core/config/prompt.service.js +4 -17
- package/dist/src/core/config/prompt.service.js.map +1 -1
- package/dist/src/core/file-system/fs.service.d.ts +1 -0
- package/dist/src/core/file-system/fs.service.js +4 -1
- package/dist/src/core/file-system/fs.service.js.map +1 -1
- package/dist/src/shared/constants.d.ts +0 -4
- package/dist/src/shared/constants.js +1 -5
- package/dist/src/shared/constants.js.map +1 -1
- package/dist/src/shared/git/git.module.js +0 -2
- package/dist/src/shared/git/git.module.js.map +1 -1
- package/dist/src/shared/git/git.service.d.ts +0 -8
- package/dist/src/shared/git/git.service.js +2 -34
- package/dist/src/shared/git/git.service.js.map +1 -1
- package/dist/src/shared/tokenizer/tokenizer.module.js +0 -2
- package/dist/src/shared/tokenizer/tokenizer.module.js.map +1 -1
- package/dist/src/shared/tokenizer/tokenizer.service.d.ts +0 -6
- package/dist/src/shared/tokenizer/tokenizer.service.js +8 -38
- package/dist/src/shared/tokenizer/tokenizer.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/kodu.schema.json +0 -139
- package/package.json +1 -2
- package/skills/kodu-ops/SKILL.md +184 -0
- package/src/app.module.ts +0 -8
- package/src/commands/init/init.command.ts +15 -310
- package/src/commands/pack/pack.command.ts +66 -3
- package/src/core/config/config.schema.ts +1 -68
- package/src/core/config/config.service.ts +2 -2
- package/src/core/config/prompt.service.ts +4 -26
- package/src/core/file-system/fs.service.ts +7 -1
- package/src/shared/constants.ts +0 -4
- package/src/shared/git/git.module.ts +0 -2
- package/src/shared/git/git.service.ts +1 -33
- package/src/shared/tokenizer/tokenizer.module.ts +0 -2
- package/src/shared/tokenizer/tokenizer.service.ts +9 -39
- package/.kodu/prompts/.keep +0 -0
- package/.kodu/prompts/commit.md +0 -9
- package/.kodu/prompts/pack.md +0 -7
- package/.kodu/prompts/review-bug.md +0 -6
- package/.kodu/prompts/review-security.md +0 -6
- package/.kodu/prompts/review-style.md +0 -6
- package/.opencode/command/openspec-apply.md +0 -24
- package/.opencode/command/openspec-archive.md +0 -27
- package/.opencode/command/openspec-proposal.md +0 -29
- package/.opencode/skills/kodu-ops/SKILL.md +0 -60
- package/dist/src/commands/commit/commit.command.d.ts +0 -18
- package/dist/src/commands/commit/commit.command.js +0 -149
- package/dist/src/commands/commit/commit.command.js.map +0 -1
- package/dist/src/commands/commit/commit.module.d.ts +0 -2
- package/dist/src/commands/commit/commit.module.js +0 -25
- package/dist/src/commands/commit/commit.module.js.map +0 -1
- package/dist/src/commands/ops/ops.command.d.ts +0 -4
- package/dist/src/commands/ops/ops.command.js +0 -39
- package/dist/src/commands/ops/ops.command.js.map +0 -1
- package/dist/src/commands/ops/ops.module.d.ts +0 -2
- package/dist/src/commands/ops/ops.module.js +0 -33
- package/dist/src/commands/ops/ops.module.js.map +0 -1
- package/dist/src/commands/ops/ops.types.d.ts +0 -13
- package/dist/src/commands/ops/ops.types.js +0 -12
- package/dist/src/commands/ops/ops.types.js.map +0 -1
- package/dist/src/commands/ops/ops.utils.d.ts +0 -13
- package/dist/src/commands/ops/ops.utils.js +0 -121
- package/dist/src/commands/ops/ops.utils.js.map +0 -1
- package/dist/src/commands/ops/subcommands/ops-env.command.d.ts +0 -24
- package/dist/src/commands/ops/subcommands/ops-env.command.js +0 -156
- package/dist/src/commands/ops/subcommands/ops-env.command.js.map +0 -1
- package/dist/src/commands/ops/subcommands/ops-routes.command.d.ts +0 -22
- package/dist/src/commands/ops/subcommands/ops-routes.command.js +0 -203
- package/dist/src/commands/ops/subcommands/ops-routes.command.js.map +0 -1
- package/dist/src/commands/ops/subcommands/ops-service.command.d.ts +0 -22
- package/dist/src/commands/ops/subcommands/ops-service.command.js +0 -169
- package/dist/src/commands/ops/subcommands/ops-service.command.js.map +0 -1
- package/dist/src/commands/ops/subcommands/ops-sysinfo.command.d.ts +0 -14
- package/dist/src/commands/ops/subcommands/ops-sysinfo.command.js +0 -75
- package/dist/src/commands/ops/subcommands/ops-sysinfo.command.js.map +0 -1
- package/dist/src/commands/review/review.command.d.ts +0 -26
- package/dist/src/commands/review/review.command.js +0 -205
- package/dist/src/commands/review/review.command.js.map +0 -1
- package/dist/src/commands/review/review.module.d.ts +0 -2
- package/dist/src/commands/review/review.module.js +0 -26
- package/dist/src/commands/review/review.module.js.map +0 -1
- package/dist/src/core/config/default-prompts.d.ts +0 -9
- package/dist/src/core/config/default-prompts.js +0 -49
- package/dist/src/core/config/default-prompts.js.map +0 -1
- package/dist/src/shared/ai/ai.module.d.ts +0 -2
- package/dist/src/shared/ai/ai.module.js +0 -23
- package/dist/src/shared/ai/ai.module.js.map +0 -1
- package/dist/src/shared/ai/ai.service.d.ts +0 -22
- package/dist/src/shared/ai/ai.service.js +0 -164
- package/dist/src/shared/ai/ai.service.js.map +0 -1
- package/dist/src/shared/ssh/ssh.module.d.ts +0 -2
- package/dist/src/shared/ssh/ssh.module.js +0 -21
- package/dist/src/shared/ssh/ssh.module.js.map +0 -1
- package/dist/src/shared/ssh/ssh.service.d.ts +0 -11
- package/dist/src/shared/ssh/ssh.service.js +0 -53
- package/dist/src/shared/ssh/ssh.service.js.map +0 -1
- package/src/commands/commit/commit.command.ts +0 -139
- package/src/commands/commit/commit.module.ts +0 -12
- package/src/commands/ops/ops.command.ts +0 -30
- package/src/commands/ops/ops.module.ts +0 -20
- package/src/commands/ops/ops.types.ts +0 -24
- package/src/commands/ops/ops.utils.ts +0 -160
- package/src/commands/ops/subcommands/ops-env.command.ts +0 -165
- package/src/commands/ops/subcommands/ops-routes.command.ts +0 -221
- package/src/commands/ops/subcommands/ops-service.command.ts +0 -190
- package/src/commands/ops/subcommands/ops-sysinfo.command.ts +0 -77
- package/src/commands/review/review.command.ts +0 -199
- package/src/commands/review/review.module.ts +0 -13
- package/src/core/config/default-prompts.ts +0 -53
- package/src/shared/ai/ai.module.ts +0 -10
- package/src/shared/ai/ai.service.ts +0 -216
- package/src/shared/ssh/ssh.module.ts +0 -8
- package/src/shared/ssh/ssh.service.ts +0 -61
|
@@ -1,169 +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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.OpsServiceCommand = void 0;
|
|
16
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
17
|
-
const nest_commander_1 = require("nest-commander");
|
|
18
|
-
const config_service_1 = require("../../../core/config/config.service");
|
|
19
|
-
const ssh_service_1 = require("../../../shared/ssh/ssh.service");
|
|
20
|
-
const ops_types_1 = require("../ops.types");
|
|
21
|
-
const ops_utils_1 = require("../ops.utils");
|
|
22
|
-
let OpsServiceCommand = class OpsServiceCommand extends nest_commander_1.CommandRunner {
|
|
23
|
-
configService;
|
|
24
|
-
sshService;
|
|
25
|
-
constructor(configService, sshService) {
|
|
26
|
-
super();
|
|
27
|
-
this.configService = configService;
|
|
28
|
-
this.sshService = sshService;
|
|
29
|
-
}
|
|
30
|
-
parseServer(value) {
|
|
31
|
-
return value;
|
|
32
|
-
}
|
|
33
|
-
parseAction(value) {
|
|
34
|
-
return value;
|
|
35
|
-
}
|
|
36
|
-
parseProject(value) {
|
|
37
|
-
return value;
|
|
38
|
-
}
|
|
39
|
-
parseRepo(value) {
|
|
40
|
-
return value;
|
|
41
|
-
}
|
|
42
|
-
async run(passedParams, options = {}) {
|
|
43
|
-
try {
|
|
44
|
-
if (passedParams.length > 0) {
|
|
45
|
-
throw new ops_types_1.OpsCliError('VALIDATION_ERROR', 'Positional arguments are not supported. Use named flags (e.g., --server, --action). Run with --help for examples.');
|
|
46
|
-
}
|
|
47
|
-
const serverAlias = (0, ops_utils_1.ensureRequired)(options.server, 'server');
|
|
48
|
-
const rawAction = (0, ops_utils_1.ensureRequired)(options.action, 'action');
|
|
49
|
-
const project = (0, ops_utils_1.ensureRequired)(options.project, 'project');
|
|
50
|
-
const action = (0, ops_utils_1.ensureAction)(rawAction, ['clone', 'pull', 'up', 'down', 'logs', 'status'], 'service action');
|
|
51
|
-
const server = await (0, ops_utils_1.resolveServerOrThrow)(this.configService.getConfig(), serverAlias);
|
|
52
|
-
const projectPath = node_path_1.default.posix.join((0, ops_utils_1.resolveAppsPath)(server), project);
|
|
53
|
-
if (action === 'status') {
|
|
54
|
-
await this.runStatus(server, projectPath);
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
const command = this.buildActionCommand(action, projectPath, options);
|
|
58
|
-
const result = await this.sshService.execute(server, command);
|
|
59
|
-
if (!result.success) {
|
|
60
|
-
(0, ops_utils_1.printSshError)(result, command);
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
(0, ops_utils_1.printJson)({
|
|
64
|
-
status: 'ok',
|
|
65
|
-
data: {
|
|
66
|
-
action,
|
|
67
|
-
project,
|
|
68
|
-
stdout: result.stdout,
|
|
69
|
-
},
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
catch (error) {
|
|
73
|
-
(0, ops_utils_1.printCliError)(error);
|
|
74
|
-
process.exitCode = 1;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
buildActionCommand(action, projectPath, options) {
|
|
78
|
-
const quotedProjectPath = (0, ops_utils_1.shellQuote)(projectPath);
|
|
79
|
-
if (action === 'clone') {
|
|
80
|
-
const repo = (0, ops_utils_1.ensureRequired)(options.repo, 'repo');
|
|
81
|
-
const quotedRepo = (0, ops_utils_1.shellQuote)(repo);
|
|
82
|
-
return [
|
|
83
|
-
`if [ -d ${quotedProjectPath} ]; then echo 'Project already exists' >&2; exit 3; fi`,
|
|
84
|
-
`git clone ${quotedRepo} ${quotedProjectPath}`,
|
|
85
|
-
].join(' && ');
|
|
86
|
-
}
|
|
87
|
-
if (action === 'pull') {
|
|
88
|
-
return `cd ${quotedProjectPath} && git pull`;
|
|
89
|
-
}
|
|
90
|
-
if (action === 'up') {
|
|
91
|
-
return `cd ${quotedProjectPath} && docker compose up -d`;
|
|
92
|
-
}
|
|
93
|
-
if (action === 'down') {
|
|
94
|
-
return `cd ${quotedProjectPath} && docker compose down`;
|
|
95
|
-
}
|
|
96
|
-
return `cd ${quotedProjectPath} && docker compose logs --no-color --tail=200`;
|
|
97
|
-
}
|
|
98
|
-
async runStatus(server, projectPath) {
|
|
99
|
-
const quotedProjectPath = (0, ops_utils_1.shellQuote)(projectPath);
|
|
100
|
-
const jsonCommand = `cd ${quotedProjectPath} && docker compose ps --format json`;
|
|
101
|
-
const jsonResult = await this.sshService.execute(server, jsonCommand);
|
|
102
|
-
if (jsonResult.success) {
|
|
103
|
-
(0, ops_utils_1.printJson)({
|
|
104
|
-
status: 'ok',
|
|
105
|
-
data: {
|
|
106
|
-
action: 'status',
|
|
107
|
-
stdout: jsonResult.stdout,
|
|
108
|
-
},
|
|
109
|
-
});
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
const fallbackCommand = `cd ${quotedProjectPath} && docker compose ps`;
|
|
113
|
-
const fallbackResult = await this.sshService.execute(server, fallbackCommand);
|
|
114
|
-
if (!fallbackResult.success) {
|
|
115
|
-
(0, ops_utils_1.printSshError)(fallbackResult, fallbackCommand);
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
(0, ops_utils_1.printJson)({
|
|
119
|
-
status: 'ok',
|
|
120
|
-
data: {
|
|
121
|
-
action: 'status',
|
|
122
|
-
raw: fallbackResult.stdout,
|
|
123
|
-
},
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
exports.OpsServiceCommand = OpsServiceCommand;
|
|
128
|
-
__decorate([
|
|
129
|
-
(0, nest_commander_1.Option)({
|
|
130
|
-
flags: '-s, --server <name>',
|
|
131
|
-
description: 'Server alias defined in kodu.json (e.g., dev)',
|
|
132
|
-
}),
|
|
133
|
-
__metadata("design:type", Function),
|
|
134
|
-
__metadata("design:paramtypes", [String]),
|
|
135
|
-
__metadata("design:returntype", String)
|
|
136
|
-
], OpsServiceCommand.prototype, "parseServer", null);
|
|
137
|
-
__decorate([
|
|
138
|
-
(0, nest_commander_1.Option)({
|
|
139
|
-
flags: '-a, --action <type>',
|
|
140
|
-
description: 'Action to perform: clone | pull | up | down | logs | status',
|
|
141
|
-
}),
|
|
142
|
-
__metadata("design:type", Function),
|
|
143
|
-
__metadata("design:paramtypes", [String]),
|
|
144
|
-
__metadata("design:returntype", String)
|
|
145
|
-
], OpsServiceCommand.prototype, "parseAction", null);
|
|
146
|
-
__decorate([
|
|
147
|
-
(0, nest_commander_1.Option)({
|
|
148
|
-
flags: '-p, --project <name>',
|
|
149
|
-
description: 'Target project directory name',
|
|
150
|
-
}),
|
|
151
|
-
__metadata("design:type", Function),
|
|
152
|
-
__metadata("design:paramtypes", [String]),
|
|
153
|
-
__metadata("design:returntype", String)
|
|
154
|
-
], OpsServiceCommand.prototype, "parseProject", null);
|
|
155
|
-
__decorate([
|
|
156
|
-
(0, nest_commander_1.Option)({ flags: '--repo <url>', description: 'Repository URL for clone' }),
|
|
157
|
-
__metadata("design:type", Function),
|
|
158
|
-
__metadata("design:paramtypes", [String]),
|
|
159
|
-
__metadata("design:returntype", String)
|
|
160
|
-
], OpsServiceCommand.prototype, "parseRepo", null);
|
|
161
|
-
exports.OpsServiceCommand = OpsServiceCommand = __decorate([
|
|
162
|
-
(0, nest_commander_1.SubCommand)({
|
|
163
|
-
name: 'service',
|
|
164
|
-
description: 'Manage project lifecycle using Docker Compose.\nExamples:\n kodu ops service --server dev --action clone --project temp --repo https://github.com/org/repo.git\n kodu ops service --server dev --action up --project temp\n kodu ops service --server dev --action status --project temp\n kodu ops service --server dev --action logs --project temp\n kodu ops service --server dev --action pull --project temp\n kodu ops service --server dev --action down --project temp',
|
|
165
|
-
}),
|
|
166
|
-
__metadata("design:paramtypes", [config_service_1.ConfigService,
|
|
167
|
-
ssh_service_1.SshService])
|
|
168
|
-
], OpsServiceCommand);
|
|
169
|
-
//# sourceMappingURL=ops-service.command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ops-service.command.js","sourceRoot":"","sources":["../../../../../src/commands/ops/subcommands/ops-service.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAA6B;AAC7B,mDAAmE;AACnE,wEAAoE;AACpE,iEAA6D;A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,MAAM,EAAE,QAAQ;gBAChB,GAAG,EAAE,cAAc,CAAC,MAAM;aAC3B;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA/JY,8CAAiB;AAY5B;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,+CAA+C;KAC7D,CAAC;;;;oDAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,6DAA6D;KAC3E,CAAC;;;;oDAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EAAE,+BAA+B;KAC7C,CAAC;;;;qDAGD;AAGD;IADC,IAAA,uBAAM,EAAC,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;;;;kDAG1E;4BAnCU,iBAAiB;IAL7B,IAAA,2BAAU,EAAC;QACV,IAAI,EAAE,SAAS;QACf,WAAW,EACT,udAAud;KAC1d,CAAC;qCAGkC,8BAAa;QAChB,wBAAU;GAH9B,iBAAiB,CA+J7B"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { CommandRunner } from 'nest-commander';
|
|
2
|
-
import { ConfigService } from '../../../core/config/config.service';
|
|
3
|
-
import { SshService } from '../../../shared/ssh/ssh.service';
|
|
4
|
-
type OpsSysinfoOptions = {
|
|
5
|
-
server?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare class OpsSysinfoCommand extends CommandRunner {
|
|
8
|
-
private readonly configService;
|
|
9
|
-
private readonly sshService;
|
|
10
|
-
constructor(configService: ConfigService, sshService: SshService);
|
|
11
|
-
parseServer(value: string): string;
|
|
12
|
-
run(passedParams: string[], options?: OpsSysinfoOptions): Promise<void>;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
@@ -1,75 +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.OpsSysinfoCommand = void 0;
|
|
13
|
-
const nest_commander_1 = require("nest-commander");
|
|
14
|
-
const config_service_1 = require("../../../core/config/config.service");
|
|
15
|
-
const ssh_service_1 = require("../../../shared/ssh/ssh.service");
|
|
16
|
-
const ops_types_1 = require("../ops.types");
|
|
17
|
-
const ops_utils_1 = require("../ops.utils");
|
|
18
|
-
let OpsSysinfoCommand = class OpsSysinfoCommand extends nest_commander_1.CommandRunner {
|
|
19
|
-
configService;
|
|
20
|
-
sshService;
|
|
21
|
-
constructor(configService, sshService) {
|
|
22
|
-
super();
|
|
23
|
-
this.configService = configService;
|
|
24
|
-
this.sshService = sshService;
|
|
25
|
-
}
|
|
26
|
-
parseServer(value) {
|
|
27
|
-
return value;
|
|
28
|
-
}
|
|
29
|
-
async run(passedParams, options = {}) {
|
|
30
|
-
try {
|
|
31
|
-
if (passedParams.length > 0) {
|
|
32
|
-
throw new ops_types_1.OpsCliError('VALIDATION_ERROR', 'Positional arguments are not supported. Use named flags (e.g., --server, --action). Run with --help for examples.');
|
|
33
|
-
}
|
|
34
|
-
const serverAlias = (0, ops_utils_1.ensureRequired)(options.server, 'server');
|
|
35
|
-
const server = await (0, ops_utils_1.resolveServerOrThrow)(this.configService.getConfig(), serverAlias);
|
|
36
|
-
const payload = `echo "{"uptime": "$(uptime -p)", "disk_usage": "$(df -h / | tail -1 | awk '{print $5}')", "mem_free": "$(free -m | grep Mem | awk '{print $4}')MB"}`;
|
|
37
|
-
const result = await this.sshService.execute(server, payload);
|
|
38
|
-
if (!result.success) {
|
|
39
|
-
(0, ops_utils_1.printSshError)(result, payload);
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
let data = {};
|
|
43
|
-
try {
|
|
44
|
-
data = JSON.parse(result.stdout);
|
|
45
|
-
}
|
|
46
|
-
catch {
|
|
47
|
-
data = { raw: result.stdout.trim() };
|
|
48
|
-
}
|
|
49
|
-
(0, ops_utils_1.printJson)({ status: 'ok', data });
|
|
50
|
-
}
|
|
51
|
-
catch (error) {
|
|
52
|
-
(0, ops_utils_1.printCliError)(error);
|
|
53
|
-
process.exitCode = 1;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
exports.OpsSysinfoCommand = OpsSysinfoCommand;
|
|
58
|
-
__decorate([
|
|
59
|
-
(0, nest_commander_1.Option)({
|
|
60
|
-
flags: '-s, --server <name>',
|
|
61
|
-
description: 'Server alias defined in kodu.json (e.g., dev)',
|
|
62
|
-
}),
|
|
63
|
-
__metadata("design:type", Function),
|
|
64
|
-
__metadata("design:paramtypes", [String]),
|
|
65
|
-
__metadata("design:returntype", String)
|
|
66
|
-
], OpsSysinfoCommand.prototype, "parseServer", null);
|
|
67
|
-
exports.OpsSysinfoCommand = OpsSysinfoCommand = __decorate([
|
|
68
|
-
(0, nest_commander_1.SubCommand)({
|
|
69
|
-
name: 'sysinfo',
|
|
70
|
-
description: 'Collect remote server diagnostics.\nExample: kodu ops sysinfo --server dev',
|
|
71
|
-
}),
|
|
72
|
-
__metadata("design:paramtypes", [config_service_1.ConfigService,
|
|
73
|
-
ssh_service_1.SshService])
|
|
74
|
-
], OpsSysinfoCommand);
|
|
75
|
-
//# sourceMappingURL=ops-sysinfo.command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ops-sysinfo.command.js","sourceRoot":"","sources":["../../../../../src/commands/ops/subcommands/ops-sysinfo.command.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAAmE;AACnE,wEAAoE;AACpE,iEAA6D;AAC7D,4CAA2C;AAC3C,4CAMsB;AAWf,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,8BAAa;IAE/B;IACA;IAFnB,YACmB,aAA4B,EAC5B,UAAsB;QAEvC,KAAK,EAAE,CAAC;QAHS,kBAAa,GAAb,aAAa,CAAe;QAC5B,eAAU,GAAV,UAAU,CAAY;IAGzC,CAAC;IAMD,WAAW,CAAC,KAAa;QACvB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,GAAG,CACP,YAAsB,EACtB,UAA6B,EAAE;QAE/B,IAAI,CAAC;YACH,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC5B,MAAM,IAAI,uBAAW,CACnB,kBAAkB,EAClB,mHAAmH,CACpH,CAAC;YACJ,CAAC;YAED,MAAM,WAAW,GAAG,IAAA,0BAAc,EAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAE7D,MAAM,MAAM,GAAG,MAAM,IAAA,gCAAoB,EACvC,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,EAC9B,WAAW,CACZ,CAAC;YACF,MAAM,OAAO,GAAG,qJAAqJ,CAAC;YAEtK,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAC9D,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpB,IAAA,yBAAa,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAC/B,OAAO;YACT,CAAC;YAED,IAAI,IAAI,GAA2B,EAAE,CAAC;YACtC,IAAI,CAAC;gBACH,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAA2B,CAAC;YAC7D,CAAC;YAAC,MAAM,CAAC;gBACP,IAAI,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;YACvC,CAAC;YAED,IAAA,qBAAS,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACpC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAA,yBAAa,EAAC,KAAK,CAAC,CAAC;YACrB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;CACF,CAAA;AAvDY,8CAAiB;AAY5B;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,+CAA+C;KAC7D,CAAC;;;;oDAGD;4BAdU,iBAAiB;IAL7B,IAAA,2BAAU,EAAC;QACV,IAAI,EAAE,SAAS;QACf,WAAW,EACT,4EAA4E;KAC/E,CAAC;qCAGkC,8BAAa;QAChB,wBAAU;GAH9B,iBAAiB,CAuD7B"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { CommandRunner } from 'nest-commander';
|
|
2
|
-
import { UiService } from '../../core/ui/ui.service';
|
|
3
|
-
import { AiService, type ReviewMode } from '../../shared/ai/ai.service';
|
|
4
|
-
import { GitService } from '../../shared/git/git.service';
|
|
5
|
-
import { TokenizerService } from '../../shared/tokenizer/tokenizer.service';
|
|
6
|
-
type ReviewOptions = {
|
|
7
|
-
mode?: ReviewMode;
|
|
8
|
-
copy?: boolean;
|
|
9
|
-
ci?: boolean;
|
|
10
|
-
output?: string;
|
|
11
|
-
};
|
|
12
|
-
export declare class ReviewCommand extends CommandRunner {
|
|
13
|
-
private readonly ui;
|
|
14
|
-
private readonly git;
|
|
15
|
-
private readonly tokenizer;
|
|
16
|
-
private readonly ai;
|
|
17
|
-
constructor(ui: UiService, git: GitService, tokenizer: TokenizerService, ai: AiService);
|
|
18
|
-
parseMode(value: string): ReviewMode;
|
|
19
|
-
parseCopy(): boolean;
|
|
20
|
-
parseCi(): boolean;
|
|
21
|
-
parseOutput(value: string): string;
|
|
22
|
-
run(_inputs: string[], options?: ReviewOptions): Promise<void>;
|
|
23
|
-
private writeOutput;
|
|
24
|
-
private copyText;
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
@@ -1,205 +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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.ReviewCommand = void 0;
|
|
16
|
-
const promises_1 = require("node:fs/promises");
|
|
17
|
-
const clipboardy_1 = __importDefault(require("clipboardy"));
|
|
18
|
-
const nest_commander_1 = require("nest-commander");
|
|
19
|
-
const ui_service_1 = require("../../core/ui/ui.service");
|
|
20
|
-
const ai_service_1 = require("../../shared/ai/ai.service");
|
|
21
|
-
const constants_1 = require("../../shared/constants");
|
|
22
|
-
const git_service_1 = require("../../shared/git/git.service");
|
|
23
|
-
const tokenizer_service_1 = require("../../shared/tokenizer/tokenizer.service");
|
|
24
|
-
const DEFAULT_MODE = 'bug';
|
|
25
|
-
let ReviewCommand = class ReviewCommand extends nest_commander_1.CommandRunner {
|
|
26
|
-
ui;
|
|
27
|
-
git;
|
|
28
|
-
tokenizer;
|
|
29
|
-
ai;
|
|
30
|
-
constructor(ui, git, tokenizer, ai) {
|
|
31
|
-
super();
|
|
32
|
-
this.ui = ui;
|
|
33
|
-
this.git = git;
|
|
34
|
-
this.tokenizer = tokenizer;
|
|
35
|
-
this.ai = ai;
|
|
36
|
-
}
|
|
37
|
-
parseMode(value) {
|
|
38
|
-
const availableModes = this.ai.getAvailableReviewModes();
|
|
39
|
-
if (availableModes.includes(value)) {
|
|
40
|
-
return value;
|
|
41
|
-
}
|
|
42
|
-
this.ui.log.warn(`Mode "${value}" not found. Available modes: ${availableModes.join(', ')}. Using default mode: ${DEFAULT_MODE}`);
|
|
43
|
-
return DEFAULT_MODE;
|
|
44
|
-
}
|
|
45
|
-
parseCopy() {
|
|
46
|
-
return true;
|
|
47
|
-
}
|
|
48
|
-
parseCi() {
|
|
49
|
-
return true;
|
|
50
|
-
}
|
|
51
|
-
parseOutput(value) {
|
|
52
|
-
return value;
|
|
53
|
-
}
|
|
54
|
-
async run(_inputs, options = {}) {
|
|
55
|
-
const ciMode = Boolean(options.ci);
|
|
56
|
-
const spinner = ciMode
|
|
57
|
-
? undefined
|
|
58
|
-
: this.ui.createSpinner({ text: 'Collecting diff from git...' }).start();
|
|
59
|
-
const logProgress = (text) => {
|
|
60
|
-
if (ciMode) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
if (spinner) {
|
|
64
|
-
spinner.text = text;
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
this.ui.log.info(text);
|
|
68
|
-
};
|
|
69
|
-
const finishProgress = (text) => {
|
|
70
|
-
if (ciMode) {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
if (spinner) {
|
|
74
|
-
spinner.success(text);
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
this.ui.log.success(text);
|
|
78
|
-
};
|
|
79
|
-
try {
|
|
80
|
-
if (!this.ai.hasApiKey()) {
|
|
81
|
-
const envName = this.ai.getApiKeyEnvName();
|
|
82
|
-
if (spinner) {
|
|
83
|
-
spinner.stop('AI key not found');
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
this.ui.log.error('AI key not found');
|
|
87
|
-
}
|
|
88
|
-
this.ui.log.warn(`'review' command requires AI key to work.`);
|
|
89
|
-
this.ui.log.info(`Set key: export ${envName}=<your_key>`);
|
|
90
|
-
this.ui.log.info(`Environment variable name is configured via llm.apiKeyEnv in kodu.json`);
|
|
91
|
-
process.exitCode = 1;
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
await this.git.ensureRepo();
|
|
95
|
-
const hasStaged = await this.git.hasStagedChanges();
|
|
96
|
-
if (!hasStaged) {
|
|
97
|
-
if (spinner) {
|
|
98
|
-
spinner.stop('No staged changes');
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
this.ui.log.info('No staged changes');
|
|
102
|
-
}
|
|
103
|
-
this.ui.log.warn('First run git add for the required files.');
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
const diff = await this.git.getStagedDiff();
|
|
107
|
-
if (!diff.trim()) {
|
|
108
|
-
if (spinner) {
|
|
109
|
-
spinner.stop('Diff is empty - possibly everything excluded by packer.ignore');
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
this.ui.log.info('Diff is empty - possibly everything excluded by packer.ignore');
|
|
113
|
-
}
|
|
114
|
-
this.ui.log.warn('Diff is empty: all changes fell into packer.ignore exclusions.');
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
const tokens = this.tokenizer.count(diff);
|
|
118
|
-
if (tokens.tokens > constants_1.WARNING_TOKEN_THRESHOLD) {
|
|
119
|
-
this.ui.log.warn(`Large context (${tokens.tokens} tokens, ~$${tokens.usdEstimate.toFixed(2)}). Review may cost more.`);
|
|
120
|
-
}
|
|
121
|
-
logProgress('Requesting AI...');
|
|
122
|
-
const mode = options.mode ?? DEFAULT_MODE;
|
|
123
|
-
const result = await this.ai.reviewDiff(diff, mode);
|
|
124
|
-
finishProgress('Review ready');
|
|
125
|
-
console.log(result.text);
|
|
126
|
-
await this.writeOutput(options.output, result.text, ciMode);
|
|
127
|
-
if (options.copy) {
|
|
128
|
-
await this.copyText(result.text, ciMode);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
catch (error) {
|
|
132
|
-
if (spinner) {
|
|
133
|
-
spinner.error('Review error');
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
this.ui.log.error('Review error');
|
|
137
|
-
}
|
|
138
|
-
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
139
|
-
this.ui.log.error(message);
|
|
140
|
-
process.exitCode = 1;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
async writeOutput(target, payload, ciMode) {
|
|
144
|
-
if (!target) {
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
await (0, promises_1.writeFile)(target, payload, { encoding: 'utf8' });
|
|
148
|
-
if (!ciMode) {
|
|
149
|
-
this.ui.log.success(`Result saved to ${target}`);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
async copyText(text, ciMode) {
|
|
153
|
-
if (ciMode) {
|
|
154
|
-
this.ui.log.warn('--copy ignored in CI mode');
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
await clipboardy_1.default.write(text);
|
|
158
|
-
this.ui.log.success('Result copied to clipboard');
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
exports.ReviewCommand = ReviewCommand;
|
|
162
|
-
__decorate([
|
|
163
|
-
(0, nest_commander_1.Option)({
|
|
164
|
-
flags: '-m, --mode <mode>',
|
|
165
|
-
description: 'Review mode: bug | style | security | <custom-mode>',
|
|
166
|
-
}),
|
|
167
|
-
__metadata("design:type", Function),
|
|
168
|
-
__metadata("design:paramtypes", [String]),
|
|
169
|
-
__metadata("design:returntype", String)
|
|
170
|
-
], ReviewCommand.prototype, "parseMode", null);
|
|
171
|
-
__decorate([
|
|
172
|
-
(0, nest_commander_1.Option)({ flags: '-c, --copy', description: 'Copy result to clipboard' }),
|
|
173
|
-
__metadata("design:type", Function),
|
|
174
|
-
__metadata("design:paramtypes", []),
|
|
175
|
-
__metadata("design:returntype", Boolean)
|
|
176
|
-
], ReviewCommand.prototype, "parseCopy", null);
|
|
177
|
-
__decorate([
|
|
178
|
-
(0, nest_commander_1.Option)({
|
|
179
|
-
flags: '--ci',
|
|
180
|
-
description: 'CI mode: no spinner and no buffering',
|
|
181
|
-
}),
|
|
182
|
-
__metadata("design:type", Function),
|
|
183
|
-
__metadata("design:paramtypes", []),
|
|
184
|
-
__metadata("design:returntype", Boolean)
|
|
185
|
-
], ReviewCommand.prototype, "parseCi", null);
|
|
186
|
-
__decorate([
|
|
187
|
-
(0, nest_commander_1.Option)({
|
|
188
|
-
flags: '-o, --output <path>',
|
|
189
|
-
description: 'Save final review to file',
|
|
190
|
-
}),
|
|
191
|
-
__metadata("design:type", Function),
|
|
192
|
-
__metadata("design:paramtypes", [String]),
|
|
193
|
-
__metadata("design:returntype", String)
|
|
194
|
-
], ReviewCommand.prototype, "parseOutput", null);
|
|
195
|
-
exports.ReviewCommand = ReviewCommand = __decorate([
|
|
196
|
-
(0, nest_commander_1.Command)({
|
|
197
|
-
name: 'review',
|
|
198
|
-
description: 'AI review for staged changes',
|
|
199
|
-
}),
|
|
200
|
-
__metadata("design:paramtypes", [ui_service_1.UiService,
|
|
201
|
-
git_service_1.GitService,
|
|
202
|
-
tokenizer_service_1.TokenizerService,
|
|
203
|
-
ai_service_1.AiService])
|
|
204
|
-
], ReviewCommand);
|
|
205
|
-
//# sourceMappingURL=review.command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"review.command.js","sourceRoot":"","sources":["../../../../src/commands/review/review.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA6C;AAC7C,4DAAmC;AACnC,mDAAgE;AAChE,yDAAqD;AACrD,2DAAwE;AACxE,sDAAiE;AACjE,8DAA0D;AAC1D,gFAA4E;AAS5E,MAAM,YAAY,GAAe,KAAK,CAAC;AAMhC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,8BAAa;IAE3B;IACA;IACA;IACA;IAJnB,YACmB,EAAa,EACb,GAAe,EACf,SAA2B,EAC3B,EAAa;QAE9B,KAAK,EAAE,CAAC;QALS,OAAE,GAAF,EAAE,CAAW;QACb,QAAG,GAAH,GAAG,CAAY;QACf,cAAS,GAAT,SAAS,CAAkB;QAC3B,OAAE,GAAF,EAAE,CAAW;IAGhC,CAAC;IAMD,SAAS,CAAC,KAAa;QACrB,MAAM,cAAc,GAAG,IAAI,CAAC,EAAE,CAAC,uBAAuB,EAAE,CAAC;QAEzD,IAAI,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACnC,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CACd,SAAS,KAAK,iCAAiC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,yBAAyB,YAAY,EAAE,CAChH,CAAC;QACF,OAAO,YAAY,CAAC;IACtB,CAAC;IAGD,SAAS;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IAMD,OAAO;QACL,OAAO,IAAI,CAAC;IACd,CAAC;IAMD,WAAW,CAAC,KAAa;QACvB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,OAAiB,EAAE,UAAyB,EAAE;QACtD,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACnC,MAAM,OAAO,GAAG,MAAM;YACpB,CA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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.ReviewModule = void 0;
|
|
10
|
-
const common_1 = require("@nestjs/common");
|
|
11
|
-
const config_module_1 = require("../../core/config/config.module");
|
|
12
|
-
const ui_module_1 = require("../../core/ui/ui.module");
|
|
13
|
-
const ai_module_1 = require("../../shared/ai/ai.module");
|
|
14
|
-
const git_module_1 = require("../../shared/git/git.module");
|
|
15
|
-
const tokenizer_module_1 = require("../../shared/tokenizer/tokenizer.module");
|
|
16
|
-
const review_command_1 = require("./review.command");
|
|
17
|
-
let ReviewModule = class ReviewModule {
|
|
18
|
-
};
|
|
19
|
-
exports.ReviewModule = ReviewModule;
|
|
20
|
-
exports.ReviewModule = ReviewModule = __decorate([
|
|
21
|
-
(0, common_1.Module)({
|
|
22
|
-
imports: [config_module_1.ConfigModule, ui_module_1.UiModule, git_module_1.GitModule, tokenizer_module_1.TokenizerModule, ai_module_1.AiModule],
|
|
23
|
-
providers: [review_command_1.ReviewCommand],
|
|
24
|
-
})
|
|
25
|
-
], ReviewModule);
|
|
26
|
-
//# sourceMappingURL=review.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"review.module.js","sourceRoot":"","sources":["../../../../src/commands/review/review.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,mEAA+D;AAC/D,uDAAmD;AACnD,yDAAqD;AACrD,4DAAwD;AACxD,8EAA0E;AAC1E,qDAAiD;AAM1C,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IAJxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,4BAAY,EAAE,oBAAQ,EAAE,sBAAS,EAAE,kCAAe,EAAE,oBAAQ,CAAC;QACvE,SAAS,EAAE,CAAC,8BAAa,CAAC;KAC3B,CAAC;GACW,YAAY,CAAG"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const DEFAULT_REVIEW_PROMPTS: {
|
|
2
|
-
readonly bug: "You are a strict code reviewer. Response format: concise markdown with bullet points.\nMode: {mode}. Find potential bugs, logical errors, and regressions.\nProvide a concise list of issues and recommendations. If no critical issues found, state that.\n\nDiff:\n{diff}";
|
|
3
|
-
readonly style: "You are a strict code reviewer. Response format: concise markdown with bullet points.\nMode: {mode}. Check readability, consistency, formatting, and naming.\nProvide a concise list of issues and recommendations. If no critical issues found, state that.\n\nDiff:\n{diff}";
|
|
4
|
-
readonly security: "You are a strict code reviewer. Response format: concise markdown with bullet points.\nMode: {mode}. Find vulnerabilities, secret leaks, improper permission checks.\nProvide a concise list of issues and recommendations. If no critical issues found, state that.\n\nDiff:\n{diff}";
|
|
5
|
-
};
|
|
6
|
-
export declare const DEFAULT_COMMIT_PROMPT = "You generate Conventional Commit messages.\nRules:\n- Format: <type>(<optional scope>): <subject>\n- Lowercase subject, no trailing period.\n- Keep under 70 characters.\n- Summarize the diff accurately.\n\nDiff:\n{diff}";
|
|
7
|
-
export declare const DEFAULT_PACK_PROMPT = "Project context below. Keep instructions concise.\n\nFiles packed ({{tokenCount}} tokens, ~{{usdEstimate}}):\n{{fileList}}\n\nContext:\n{{context}}";
|
|
8
|
-
export declare const STANDARD_REVIEW_MODES: readonly ["bug", "style", "security"];
|
|
9
|
-
export declare function replacePromptVariables(prompt: string, variables: Record<string, string>): string;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.STANDARD_REVIEW_MODES = exports.DEFAULT_PACK_PROMPT = exports.DEFAULT_COMMIT_PROMPT = exports.DEFAULT_REVIEW_PROMPTS = void 0;
|
|
4
|
-
exports.replacePromptVariables = replacePromptVariables;
|
|
5
|
-
exports.DEFAULT_REVIEW_PROMPTS = {
|
|
6
|
-
bug: `You are a strict code reviewer. Response format: concise markdown with bullet points.
|
|
7
|
-
Mode: {mode}. Find potential bugs, logical errors, and regressions.
|
|
8
|
-
Provide a concise list of issues and recommendations. If no critical issues found, state that.
|
|
9
|
-
|
|
10
|
-
Diff:
|
|
11
|
-
{diff}`,
|
|
12
|
-
style: `You are a strict code reviewer. Response format: concise markdown with bullet points.
|
|
13
|
-
Mode: {mode}. Check readability, consistency, formatting, and naming.
|
|
14
|
-
Provide a concise list of issues and recommendations. If no critical issues found, state that.
|
|
15
|
-
|
|
16
|
-
Diff:
|
|
17
|
-
{diff}`,
|
|
18
|
-
security: `You are a strict code reviewer. Response format: concise markdown with bullet points.
|
|
19
|
-
Mode: {mode}. Find vulnerabilities, secret leaks, improper permission checks.
|
|
20
|
-
Provide a concise list of issues and recommendations. If no critical issues found, state that.
|
|
21
|
-
|
|
22
|
-
Diff:
|
|
23
|
-
{diff}`,
|
|
24
|
-
};
|
|
25
|
-
exports.DEFAULT_COMMIT_PROMPT = `You generate Conventional Commit messages.
|
|
26
|
-
Rules:
|
|
27
|
-
- Format: <type>(<optional scope>): <subject>
|
|
28
|
-
- Lowercase subject, no trailing period.
|
|
29
|
-
- Keep under 70 characters.
|
|
30
|
-
- Summarize the diff accurately.
|
|
31
|
-
|
|
32
|
-
Diff:
|
|
33
|
-
{diff}`;
|
|
34
|
-
exports.DEFAULT_PACK_PROMPT = `Project context below. Keep instructions concise.
|
|
35
|
-
|
|
36
|
-
Files packed ({{tokenCount}} tokens, ~{{usdEstimate}}):
|
|
37
|
-
{{fileList}}
|
|
38
|
-
|
|
39
|
-
Context:
|
|
40
|
-
{{context}}`;
|
|
41
|
-
exports.STANDARD_REVIEW_MODES = ['bug', 'style', 'security'];
|
|
42
|
-
function replacePromptVariables(prompt, variables) {
|
|
43
|
-
let result = prompt;
|
|
44
|
-
for (const [key, value] of Object.entries(variables)) {
|
|
45
|
-
result = result.replace(new RegExp(`\\{${key}\\}`, 'g'), value);
|
|
46
|
-
}
|
|
47
|
-
return result;
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=default-prompts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"default-prompts.js","sourceRoot":"","sources":["../../../../src/core/config/default-prompts.ts"],"names":[],"mappings":";;;AA2CA,wDASC;AApDY,QAAA,sBAAsB,GAAG;IACpC,GAAG,EAAE;;;;;OAKA;IAEL,KAAK,EAAE;;;;;OAKF;IAEL,QAAQ,EAAE;;;;;OAKL;CACG,CAAC;AAEE,QAAA,qBAAqB,GAAG;;;;;;;;OAQ9B,CAAC;AAEK,QAAA,mBAAmB,GAAG;;;;;;YAMvB,CAAC;AAEA,QAAA,qBAAqB,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAU,CAAC;AAE3E,SAAgB,sBAAsB,CACpC,MAAc,EACd,SAAiC;IAEjC,IAAI,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QACrD,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,KAAK,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,23 +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.AiModule = void 0;
|
|
10
|
-
const common_1 = require("@nestjs/common");
|
|
11
|
-
const config_module_1 = require("../../core/config/config.module");
|
|
12
|
-
const ai_service_1 = require("./ai.service");
|
|
13
|
-
let AiModule = class AiModule {
|
|
14
|
-
};
|
|
15
|
-
exports.AiModule = AiModule;
|
|
16
|
-
exports.AiModule = AiModule = __decorate([
|
|
17
|
-
(0, common_1.Module)({
|
|
18
|
-
imports: [config_module_1.ConfigModule],
|
|
19
|
-
providers: [ai_service_1.AiService],
|
|
20
|
-
exports: [ai_service_1.AiService],
|
|
21
|
-
})
|
|
22
|
-
], AiModule);
|
|
23
|
-
//# sourceMappingURL=ai.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ai.module.js","sourceRoot":"","sources":["../../../../src/shared/ai/ai.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,mEAA+D;AAC/D,6CAAyC;AAOlC,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAAG,CAAA;AAAX,4BAAQ;mBAAR,QAAQ;IALpB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,4BAAY,CAAC;QACvB,SAAS,EAAE,CAAC,sBAAS,CAAC;QACtB,OAAO,EAAE,CAAC,sBAAS,CAAC;KACrB,CAAC;GACW,QAAQ,CAAG"}
|