@0xprathamesh/why-cli 1.1.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/README.md +436 -0
- package/dist/cli/index.js +101 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/ai.js +195 -0
- package/dist/core/ai.js.map +1 -0
- package/dist/core/args.js +221 -0
- package/dist/core/args.js.map +1 -0
- package/dist/core/codebase-context.js +74 -0
- package/dist/core/codebase-context.js.map +1 -0
- package/dist/core/command-intelligence.js +196 -0
- package/dist/core/command-intelligence.js.map +1 -0
- package/dist/core/env.js +117 -0
- package/dist/core/env.js.map +1 -0
- package/dist/core/error-parser.js +172 -0
- package/dist/core/error-parser.js.map +1 -0
- package/dist/core/process.js +118 -0
- package/dist/core/process.js.map +1 -0
- package/dist/core/prompts.js +64 -0
- package/dist/core/prompts.js.map +1 -0
- package/dist/core/provider-health.js +71 -0
- package/dist/core/provider-health.js.map +1 -0
- package/dist/core/runner.js +266 -0
- package/dist/core/runner.js.map +1 -0
- package/dist/core/setup.js +82 -0
- package/dist/core/setup.js.map +1 -0
- package/dist/core/simulation.js +330 -0
- package/dist/core/simulation.js.map +1 -0
- package/dist/core/skills.js +57 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/utils/logger.js +147 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +43 -0
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.simulateCommand = simulateCommand;
|
|
4
|
+
const process_1 = require("./process");
|
|
5
|
+
function confidenceForVerdict(verdict, supported) {
|
|
6
|
+
if (!supported) {
|
|
7
|
+
return 35;
|
|
8
|
+
}
|
|
9
|
+
switch (verdict) {
|
|
10
|
+
case "ready":
|
|
11
|
+
return 90;
|
|
12
|
+
case "blocked":
|
|
13
|
+
return 88;
|
|
14
|
+
case "warning":
|
|
15
|
+
default:
|
|
16
|
+
return 60;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function quoteArgs(args) {
|
|
20
|
+
return args.map((part) => (/\s/.test(part) ? JSON.stringify(part) : part)).join(" ");
|
|
21
|
+
}
|
|
22
|
+
async function simulateGit(intent, commandArgs, cwd) {
|
|
23
|
+
const action = intent.action;
|
|
24
|
+
const artifacts = [];
|
|
25
|
+
const checks = [];
|
|
26
|
+
if (action === "init") {
|
|
27
|
+
const gitDirProbe = await (0, process_1.runProcess)(["test", "-d", ".git"], { cwd });
|
|
28
|
+
const alreadyInitialized = gitDirProbe.ok;
|
|
29
|
+
return {
|
|
30
|
+
simulatedCommand: quoteArgs(commandArgs),
|
|
31
|
+
supported: true,
|
|
32
|
+
verdict: alreadyInitialized ? "blocked" : "ready",
|
|
33
|
+
confidence: confidenceForVerdict(alreadyInitialized ? "blocked" : "ready", true),
|
|
34
|
+
summary: alreadyInitialized
|
|
35
|
+
? "This directory already looks like a Git repository, so `git init` would be redundant here."
|
|
36
|
+
: "This directory is not initialized yet, so `git init` would create a new `.git` folder here.",
|
|
37
|
+
checks: [
|
|
38
|
+
"Checked whether a `.git` directory already exists in the current folder.",
|
|
39
|
+
],
|
|
40
|
+
artifacts: [
|
|
41
|
+
{
|
|
42
|
+
title: "Repository inspection",
|
|
43
|
+
body: alreadyInitialized ? ".git directory already exists." : ".git directory does not exist yet.",
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
exitCode: alreadyInitialized ? 1 : 0,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
const status = await (0, process_1.runProcess)(["git", "status", "--short", "--branch"], { cwd });
|
|
50
|
+
const statusBody = `${status.stdout}\n${status.stderr}`.trim();
|
|
51
|
+
if (statusBody) {
|
|
52
|
+
artifacts.push({ title: "git status --short --branch", body: statusBody });
|
|
53
|
+
}
|
|
54
|
+
if (!status.ok && /not a git repository/i.test(statusBody)) {
|
|
55
|
+
return {
|
|
56
|
+
simulatedCommand: quoteArgs(commandArgs),
|
|
57
|
+
supported: true,
|
|
58
|
+
verdict: "blocked",
|
|
59
|
+
confidence: confidenceForVerdict("blocked", true),
|
|
60
|
+
summary: "The command cannot be simulated here because the current directory is not inside a Git repository.",
|
|
61
|
+
checks: ["Validated repository presence before simulating the Git command."],
|
|
62
|
+
artifacts,
|
|
63
|
+
exitCode: status.exitCode,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
if (action === "add") {
|
|
67
|
+
const dryRunArgs = ["git", "add", "--dry-run", ...commandArgs.slice(2)];
|
|
68
|
+
const probe = await (0, process_1.runProcess)(dryRunArgs, { cwd });
|
|
69
|
+
const body = `${probe.stdout}\n${probe.stderr}`.trim() || "git add --dry-run produced no output.";
|
|
70
|
+
checks.push("Validated the add operation with Git dry-run mode.");
|
|
71
|
+
artifacts.push({ title: quoteArgs(dryRunArgs), body });
|
|
72
|
+
return {
|
|
73
|
+
simulatedCommand: quoteArgs(dryRunArgs),
|
|
74
|
+
supported: true,
|
|
75
|
+
verdict: probe.ok ? "ready" : "blocked",
|
|
76
|
+
confidence: confidenceForVerdict(probe.ok ? "ready" : "blocked", true),
|
|
77
|
+
summary: probe.ok
|
|
78
|
+
? "Git accepted the staged-file simulation, so the add should succeed if executed for real."
|
|
79
|
+
: "Git rejected the simulated add command before any files were staged.",
|
|
80
|
+
checks,
|
|
81
|
+
artifacts,
|
|
82
|
+
exitCode: probe.exitCode,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
if (action === "commit") {
|
|
86
|
+
const staged = await (0, process_1.runProcess)(["git", "diff", "--cached", "--stat"], { cwd });
|
|
87
|
+
if (!staged.ok && staged.stderr.trim()) {
|
|
88
|
+
artifacts.push({ title: "git diff --cached --stat", body: `${staged.stdout}\n${staged.stderr}`.trim() });
|
|
89
|
+
return {
|
|
90
|
+
simulatedCommand: quoteArgs(commandArgs),
|
|
91
|
+
supported: true,
|
|
92
|
+
verdict: "blocked",
|
|
93
|
+
confidence: confidenceForVerdict("blocked", true),
|
|
94
|
+
summary: "why-cli could not validate the commit because Git returned an error while inspecting staged changes.",
|
|
95
|
+
checks: ["Tried to inspect the staged diff without creating a commit."],
|
|
96
|
+
artifacts,
|
|
97
|
+
exitCode: staged.exitCode,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
const commitMessageIndex = commandArgs.findIndex((value) => value === "-m" || value === "--message");
|
|
101
|
+
const commitMessage = commitMessageIndex >= 0 ? commandArgs[commitMessageIndex + 1] : undefined;
|
|
102
|
+
const stagedBody = staged.stdout.trim() || "No staged diff was found.";
|
|
103
|
+
artifacts.push({ title: "git diff --cached --stat", body: stagedBody });
|
|
104
|
+
checks.push(commitMessage ? "Detected an explicit commit message." : "No explicit commit message flag was detected.");
|
|
105
|
+
return {
|
|
106
|
+
simulatedCommand: quoteArgs(commandArgs),
|
|
107
|
+
supported: true,
|
|
108
|
+
verdict: staged.stdout.trim() ? "ready" : "blocked",
|
|
109
|
+
confidence: confidenceForVerdict(staged.stdout.trim() ? "ready" : "blocked", true),
|
|
110
|
+
summary: staged.stdout.trim()
|
|
111
|
+
? "A commit was not executed, but staged changes exist and the repository looks ready for commit validation."
|
|
112
|
+
: "The commit would likely fail because there are no staged changes to commit.",
|
|
113
|
+
checks,
|
|
114
|
+
artifacts,
|
|
115
|
+
exitCode: staged.stdout.trim() ? 0 : 1,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
if (action === "push") {
|
|
119
|
+
const dryRunArgs = ["git", "push", "--dry-run", ...commandArgs.slice(2)];
|
|
120
|
+
const probe = await (0, process_1.runProcess)(dryRunArgs, { cwd });
|
|
121
|
+
const body = `${probe.stdout}\n${probe.stderr}`.trim() || "git push --dry-run produced no output.";
|
|
122
|
+
checks.push("Validated the push operation with Git dry-run mode.");
|
|
123
|
+
artifacts.push({ title: quoteArgs(dryRunArgs), body });
|
|
124
|
+
return {
|
|
125
|
+
simulatedCommand: quoteArgs(dryRunArgs),
|
|
126
|
+
supported: true,
|
|
127
|
+
verdict: probe.ok ? "ready" : "blocked",
|
|
128
|
+
confidence: confidenceForVerdict(probe.ok ? "ready" : "blocked", true),
|
|
129
|
+
summary: probe.ok
|
|
130
|
+
? "The remote accepted the dry-run push, so the real push appears viable from Git's perspective."
|
|
131
|
+
: "The dry-run push surfaced a problem before any remote changes were sent.",
|
|
132
|
+
checks,
|
|
133
|
+
artifacts,
|
|
134
|
+
exitCode: probe.exitCode,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
if (action === "merge" || action === "pull" || action === "rebase") {
|
|
138
|
+
return {
|
|
139
|
+
simulatedCommand: quoteArgs(commandArgs),
|
|
140
|
+
supported: false,
|
|
141
|
+
verdict: "warning",
|
|
142
|
+
confidence: confidenceForVerdict("warning", false),
|
|
143
|
+
summary: `why-cli detected a high-risk Git history command (${action}), but it does not yet have a safe no-side-effect simulator for it.`,
|
|
144
|
+
checks: [
|
|
145
|
+
"Repository status was inspected first.",
|
|
146
|
+
"No changes were executed.",
|
|
147
|
+
],
|
|
148
|
+
artifacts,
|
|
149
|
+
exitCode: null,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
simulatedCommand: quoteArgs(commandArgs),
|
|
154
|
+
supported: false,
|
|
155
|
+
verdict: "warning",
|
|
156
|
+
confidence: confidenceForVerdict("warning", false),
|
|
157
|
+
summary: `why-cli recognized \`git ${action}\`, but does not have a native simulator for it yet.`,
|
|
158
|
+
checks: ["No changes were executed."],
|
|
159
|
+
artifacts,
|
|
160
|
+
exitCode: null,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
async function simulatePackageManager(intent, commandArgs, cwd) {
|
|
164
|
+
const executable = commandArgs[0];
|
|
165
|
+
const action = intent.action;
|
|
166
|
+
if (!executable) {
|
|
167
|
+
return {
|
|
168
|
+
simulatedCommand: "",
|
|
169
|
+
supported: false,
|
|
170
|
+
verdict: "blocked",
|
|
171
|
+
confidence: confidenceForVerdict("blocked", false),
|
|
172
|
+
summary: "No executable was provided for simulation.",
|
|
173
|
+
checks: [],
|
|
174
|
+
artifacts: [],
|
|
175
|
+
exitCode: 1,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
if (action === "publish" || action === "install" || action === "add") {
|
|
179
|
+
const dryRunArgs = [...commandArgs];
|
|
180
|
+
if (!dryRunArgs.includes("--dry-run")) {
|
|
181
|
+
dryRunArgs.push("--dry-run");
|
|
182
|
+
}
|
|
183
|
+
const probe = await (0, process_1.runProcess)(dryRunArgs, { cwd });
|
|
184
|
+
return {
|
|
185
|
+
simulatedCommand: quoteArgs(dryRunArgs),
|
|
186
|
+
supported: true,
|
|
187
|
+
verdict: probe.ok ? "ready" : "blocked",
|
|
188
|
+
confidence: confidenceForVerdict(probe.ok ? "ready" : "blocked", true),
|
|
189
|
+
summary: probe.ok
|
|
190
|
+
? `${executable} accepted the dry-run, so the command shape looks valid without making changes.`
|
|
191
|
+
: `${executable} rejected the dry-run command before making changes.`,
|
|
192
|
+
checks: ["Used the package manager dry-run mode where supported."],
|
|
193
|
+
artifacts: [
|
|
194
|
+
{
|
|
195
|
+
title: quoteArgs(dryRunArgs),
|
|
196
|
+
body: `${probe.stdout}\n${probe.stderr}`.trim() || "No output from dry-run.",
|
|
197
|
+
},
|
|
198
|
+
],
|
|
199
|
+
exitCode: probe.exitCode,
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
return {
|
|
203
|
+
simulatedCommand: quoteArgs(commandArgs),
|
|
204
|
+
supported: false,
|
|
205
|
+
verdict: "warning",
|
|
206
|
+
confidence: confidenceForVerdict("warning", false),
|
|
207
|
+
summary: `why-cli recognized ${executable}, but this action does not expose a safe native dry-run flow here.`,
|
|
208
|
+
checks: ["No changes were executed."],
|
|
209
|
+
artifacts: [],
|
|
210
|
+
exitCode: null,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
async function simulateFilesystem(commandArgs, cwd) {
|
|
214
|
+
const executable = commandArgs[0];
|
|
215
|
+
const targets = commandArgs.slice(1);
|
|
216
|
+
if (executable === "cat" || executable === "ls" || executable === "pwd" || executable === "echo" || executable === "whoami") {
|
|
217
|
+
const probe = await (0, process_1.runProcess)(commandArgs, { cwd });
|
|
218
|
+
return {
|
|
219
|
+
simulatedCommand: quoteArgs(commandArgs),
|
|
220
|
+
supported: true,
|
|
221
|
+
verdict: probe.ok ? "ready" : "blocked",
|
|
222
|
+
confidence: confidenceForVerdict(probe.ok ? "ready" : "blocked", true),
|
|
223
|
+
summary: probe.ok
|
|
224
|
+
? "This is a read-only command, so why-cli executed it safely during simulation."
|
|
225
|
+
: "The read-only command failed during simulation, so it would also fail when run normally.",
|
|
226
|
+
checks: ["Executed the read-only command directly because it does not mutate local state."],
|
|
227
|
+
artifacts: [
|
|
228
|
+
{
|
|
229
|
+
title: quoteArgs(commandArgs),
|
|
230
|
+
body: `${probe.stdout}\n${probe.stderr}`.trim() || "No output.",
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
exitCode: probe.exitCode,
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
if (executable === "mkdir") {
|
|
237
|
+
const targetChecks = await Promise.all(targets.map(async (target) => {
|
|
238
|
+
const exists = await (0, process_1.runProcess)(["test", "-e", target], { cwd });
|
|
239
|
+
return `${target}: ${exists.ok ? "already exists" : "would be created"}`;
|
|
240
|
+
}));
|
|
241
|
+
return {
|
|
242
|
+
simulatedCommand: quoteArgs(commandArgs),
|
|
243
|
+
supported: true,
|
|
244
|
+
verdict: targetChecks.some((check) => check.includes("already exists")) ? "blocked" : "ready",
|
|
245
|
+
confidence: confidenceForVerdict(targetChecks.some((check) => check.includes("already exists")) ? "blocked" : "ready", true),
|
|
246
|
+
summary: "why-cli inspected whether the target directories already exist without creating them.",
|
|
247
|
+
checks: ["Validated mkdir targets before execution."],
|
|
248
|
+
artifacts: [{ title: "Directory inspection", body: targetChecks.join("\n") }],
|
|
249
|
+
exitCode: targetChecks.some((check) => check.includes("already exists")) ? 1 : 0,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
if (executable === "touch") {
|
|
253
|
+
const targetChecks = await Promise.all(targets.map(async (target) => {
|
|
254
|
+
const exists = await (0, process_1.runProcess)(["test", "-e", target], { cwd });
|
|
255
|
+
return `${target}: ${exists.ok ? "would update timestamp" : "would create file"}`;
|
|
256
|
+
}));
|
|
257
|
+
return {
|
|
258
|
+
simulatedCommand: quoteArgs(commandArgs),
|
|
259
|
+
supported: true,
|
|
260
|
+
verdict: "ready",
|
|
261
|
+
confidence: confidenceForVerdict("ready", true),
|
|
262
|
+
summary: "why-cli inspected whether touch would create a file or update an existing one.",
|
|
263
|
+
checks: ["Validated touch targets before execution."],
|
|
264
|
+
artifacts: [{ title: "File inspection", body: targetChecks.join("\n") }],
|
|
265
|
+
exitCode: 0,
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
if (executable === "rmdir") {
|
|
269
|
+
const targetChecks = await Promise.all(targets.map(async (target) => {
|
|
270
|
+
const exists = await (0, process_1.runProcess)(["test", "-d", target], { cwd });
|
|
271
|
+
if (!exists.ok) {
|
|
272
|
+
return `${target}: missing`;
|
|
273
|
+
}
|
|
274
|
+
const list = await (0, process_1.runProcess)(["find", target, "-mindepth", "1", "-maxdepth", "1"], { cwd });
|
|
275
|
+
const empty = !list.stdout.trim();
|
|
276
|
+
return `${target}: ${empty ? "empty and removable" : "not empty"}`;
|
|
277
|
+
}));
|
|
278
|
+
return {
|
|
279
|
+
simulatedCommand: quoteArgs(commandArgs),
|
|
280
|
+
supported: true,
|
|
281
|
+
verdict: targetChecks.every((check) => check.includes("empty and removable")) ? "ready" : "blocked",
|
|
282
|
+
confidence: confidenceForVerdict(targetChecks.every((check) => check.includes("empty and removable")) ? "ready" : "blocked", true),
|
|
283
|
+
summary: "why-cli checked whether the directories exist and are empty before removing them.",
|
|
284
|
+
checks: ["Validated rmdir targets before execution."],
|
|
285
|
+
artifacts: [{ title: "Directory inspection", body: targetChecks.join("\n") }],
|
|
286
|
+
exitCode: targetChecks.every((check) => check.includes("empty and removable")) ? 0 : 1,
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
const probes = await Promise.all(targets.map(async (target) => {
|
|
290
|
+
const result = await (0, process_1.runProcess)(["test", "-e", target], { cwd });
|
|
291
|
+
return `${target}: ${result.ok ? "exists" : "missing"}`;
|
|
292
|
+
}));
|
|
293
|
+
return {
|
|
294
|
+
simulatedCommand: quoteArgs(commandArgs),
|
|
295
|
+
supported: true,
|
|
296
|
+
verdict: probes.some((probe) => probe.endsWith("missing")) ? "blocked" : "warning",
|
|
297
|
+
confidence: confidenceForVerdict(probes.some((probe) => probe.endsWith("missing")) ? "blocked" : "warning", true),
|
|
298
|
+
summary: "why-cli inspected the filesystem targets without executing the destructive command.",
|
|
299
|
+
checks: ["Validated whether the referenced paths exist before execution."],
|
|
300
|
+
artifacts: [
|
|
301
|
+
{
|
|
302
|
+
title: "Path inspection",
|
|
303
|
+
body: probes.join("\n"),
|
|
304
|
+
},
|
|
305
|
+
],
|
|
306
|
+
exitCode: probes.some((probe) => probe.endsWith("missing")) ? 1 : 0,
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
async function simulateCommand(commandArgs, intent, cwd) {
|
|
310
|
+
if (intent.family === "git") {
|
|
311
|
+
return simulateGit(intent, commandArgs, cwd);
|
|
312
|
+
}
|
|
313
|
+
if (intent.family === "npm" || intent.family === "pnpm" || intent.family === "yarn") {
|
|
314
|
+
return simulatePackageManager(intent, commandArgs, cwd);
|
|
315
|
+
}
|
|
316
|
+
if (intent.family === "system") {
|
|
317
|
+
return simulateFilesystem(commandArgs, cwd);
|
|
318
|
+
}
|
|
319
|
+
return {
|
|
320
|
+
simulatedCommand: quoteArgs(commandArgs),
|
|
321
|
+
supported: false,
|
|
322
|
+
verdict: "warning",
|
|
323
|
+
confidence: confidenceForVerdict("warning", false),
|
|
324
|
+
summary: "No native simulation strategy is available for this command yet.",
|
|
325
|
+
checks: ["No changes were executed."],
|
|
326
|
+
artifacts: [],
|
|
327
|
+
exitCode: null,
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
//# sourceMappingURL=simulation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simulation.js","sourceRoot":"","sources":["../../src/core/simulation.ts"],"names":[],"mappings":";;AA4WA,0CAuBC;AAlYD,uCAAuC;AAkBvC,SAAS,oBAAoB,CAAC,OAAoC,EAAE,SAAkB;IACpF,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,OAAO;YACV,OAAO,EAAE,CAAC;QACZ,KAAK,SAAS;YACZ,OAAO,EAAE,CAAC;QACZ,KAAK,SAAS,CAAC;QACf;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,IAAc;IAC/B,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACvF,CAAC;AAED,KAAK,UAAU,WAAW,CAAC,MAAqB,EAAE,WAAqB,EAAE,GAAW;IAClF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7B,MAAM,SAAS,GAAyB,EAAE,CAAC;IAC3C,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,MAAM,WAAW,GAAG,MAAM,IAAA,oBAAU,EAAC,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;QACtE,MAAM,kBAAkB,GAAG,WAAW,CAAC,EAAE,CAAC;QAE1C,OAAO;YACL,gB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AC,CAAC;KACpE,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,eAAe,CAAC,WAAqB,EAAE,MAAqB,EAAE,GAAW;IAC7F,IAAI,MAAM,CAAC,MAAM,KAAK,KAAK,EAAE,CAAC;QAC5B,OAAO,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,KAAK,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;QACpF,OAAO,sBAAsB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC;IAC1D,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,kBAAkB,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IAC9C,CAAC;IAED,OAAO;QACL,gBAAgB,EAAE,SAAS,CAAC,WAAW,CAAC;QACxC,SAAS,EAAE,KAAK;QAChB,OAAO,EAAE,SAAS;QAClB,UAAU,EAAE,oBAAoB,CAAC,SAAS,EAAE,KAAK,CAAC;QAClD,OAAO,EAAE,kEAAkE;QAC3E,MAAM,EAAE,CAAC,2BAA2B,CAAC;QACrC,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE,IAAI;KACf,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BUILTIN_SKILLS = void 0;
|
|
4
|
+
exports.resolveSkills = resolveSkills;
|
|
5
|
+
exports.formatSkillList = formatSkillList;
|
|
6
|
+
exports.BUILTIN_SKILLS = [
|
|
7
|
+
{
|
|
8
|
+
name: "debug",
|
|
9
|
+
title: "Root Cause Debugger",
|
|
10
|
+
description: "Focus on the most likely root cause and how to verify it quickly.",
|
|
11
|
+
promptHint: "Explain the most probable root cause first. Prefer a minimal reproduction or verification step.",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: "teach",
|
|
15
|
+
title: "Explain Like A Teammate",
|
|
16
|
+
description: "Translate the failure into plain language for developers who need context.",
|
|
17
|
+
promptHint: "Use simple language, define jargon briefly, and help the user understand what the error means.",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "fix",
|
|
21
|
+
title: "Patch Planner",
|
|
22
|
+
description: "Turn the failure into a concrete fix path with likely code changes.",
|
|
23
|
+
promptHint: "Offer likely code-level fixes, mention where to look first, and call out edge cases if relevant.",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "tests",
|
|
27
|
+
title: "Test Guard",
|
|
28
|
+
description: "Recommend tests that would catch this failure next time.",
|
|
29
|
+
promptHint: "Include 1-3 test ideas that would prevent regressions once the issue is fixed.",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "security",
|
|
33
|
+
title: "Security Lens",
|
|
34
|
+
description: "Highlight whether the failure could involve secrets, auth, or unsafe config.",
|
|
35
|
+
promptHint: "Point out any security concerns, especially around secrets, permissions, tokens, and unsafe fallbacks.",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "perf",
|
|
39
|
+
title: "Performance Lens",
|
|
40
|
+
description: "Spot performance or scalability angles related to the failure.",
|
|
41
|
+
promptHint: "Mention performance or resource-usage implications only if they materially affect the issue.",
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
function resolveSkills(input) {
|
|
45
|
+
const requested = new Set(input
|
|
46
|
+
.flatMap((value) => value.split(","))
|
|
47
|
+
.map((value) => value.trim().toLowerCase())
|
|
48
|
+
.filter(Boolean));
|
|
49
|
+
if (requested.size === 0) {
|
|
50
|
+
return [exports.BUILTIN_SKILLS[0], exports.BUILTIN_SKILLS[1]];
|
|
51
|
+
}
|
|
52
|
+
return exports.BUILTIN_SKILLS.filter((skill) => requested.has(skill.name));
|
|
53
|
+
}
|
|
54
|
+
function formatSkillList() {
|
|
55
|
+
return exports.BUILTIN_SKILLS.map((skill) => `${skill.name.padEnd(8)} ${skill.description}`).join("\n");
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=skills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/core/skills.ts"],"names":[],"mappings":";;;AAoDA,sCAaC;AAED,0CAEC;AA9DY,QAAA,cAAc,GAAsB;IAC/C;QACE,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,mEAAmE;QAChF,UAAU,EACR,iGAAiG;KACpG;IACD;QACE,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE,4EAA4E;QACzF,UAAU,EACR,gGAAgG;KACnG;IACD;QACE,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,qEAAqE;QAClF,UAAU,EACR,kGAAkG;KACrG;IACD;QACE,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,0DAA0D;QACvE,UAAU,EACR,gFAAgF;KACnF;IACD;QACE,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,8EAA8E;QAC3F,UAAU,EACR,wGAAwG;KAC3G;IACD;QACE,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,gEAAgE;QAC7E,UAAU,EACR,8FAA8F;KACjG;CACF,CAAC;AAEF,SAAgB,aAAa,CAAC,KAAe;IAC3C,MAAM,SAAS,GAAG,IAAI,GAAG,CACvB,KAAK;SACF,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACpC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;SAC1C,MAAM,CAAC,OAAO,CAAC,CACnB,CAAC;IAEF,IAAI,SAAS,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,CAAC,sBAAc,CAAC,CAAC,CAAC,EAAE,sBAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IAChD,CAAC;IAED,OAAO,sBAAc,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AACrE,CAAC;AAED,SAAgB,eAAe;IAC7B,OAAO,sBAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClG,CAAC"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Logger = void 0;
|
|
4
|
+
const ANSI = {
|
|
5
|
+
reset: "\x1b[0m",
|
|
6
|
+
dim: "\x1b[2m",
|
|
7
|
+
bold: "\x1b[1m",
|
|
8
|
+
red: "\x1b[31m",
|
|
9
|
+
green: "\x1b[32m",
|
|
10
|
+
yellow: "\x1b[33m",
|
|
11
|
+
blue: "\x1b[34m",
|
|
12
|
+
cyan: "\x1b[36m",
|
|
13
|
+
gray: "\x1b[90m",
|
|
14
|
+
};
|
|
15
|
+
function applyColor(enabled, value, color) {
|
|
16
|
+
if (!enabled) {
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
return `${color}${value}${ANSI.reset}`;
|
|
20
|
+
}
|
|
21
|
+
function toneToColor(tone) {
|
|
22
|
+
switch (tone) {
|
|
23
|
+
case "success":
|
|
24
|
+
return ANSI.green;
|
|
25
|
+
case "warn":
|
|
26
|
+
return ANSI.yellow;
|
|
27
|
+
case "error":
|
|
28
|
+
return ANSI.red;
|
|
29
|
+
case "muted":
|
|
30
|
+
return ANSI.gray;
|
|
31
|
+
case "accent":
|
|
32
|
+
return ANSI.cyan;
|
|
33
|
+
case "info":
|
|
34
|
+
default:
|
|
35
|
+
return ANSI.blue;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function formatJson(event, payload) {
|
|
39
|
+
return JSON.stringify({
|
|
40
|
+
event,
|
|
41
|
+
...payload,
|
|
42
|
+
}, null, 2);
|
|
43
|
+
}
|
|
44
|
+
class Logger {
|
|
45
|
+
constructor(options = {}) {
|
|
46
|
+
this.color = options.color ?? process.stdout.isTTY ?? false;
|
|
47
|
+
this.silent = options.silent ?? false;
|
|
48
|
+
this.json = options.json ?? false;
|
|
49
|
+
}
|
|
50
|
+
heading(title, subtitle) {
|
|
51
|
+
if (this.silent) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (this.json) {
|
|
55
|
+
console.log(formatJson("heading", { title, subtitle }));
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const renderedTitle = applyColor(this.color, title, `${ANSI.bold}${ANSI.cyan}`);
|
|
59
|
+
console.log(renderedTitle);
|
|
60
|
+
if (subtitle) {
|
|
61
|
+
console.log(applyColor(this.color, subtitle, ANSI.gray));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
line(message = "") {
|
|
65
|
+
if (this.silent) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (this.json) {
|
|
69
|
+
console.log(formatJson("line", { message }));
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
console.log(message);
|
|
73
|
+
}
|
|
74
|
+
section(title) {
|
|
75
|
+
if (this.silent) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (this.json) {
|
|
79
|
+
console.log(formatJson("section", { title }));
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const decorated = applyColor(this.color, `\n${title}`, `${ANSI.bold}${ANSI.blue}`);
|
|
83
|
+
console.log(decorated);
|
|
84
|
+
}
|
|
85
|
+
badge(label, value, tone = "info") {
|
|
86
|
+
if (this.silent) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (this.json) {
|
|
90
|
+
console.log(formatJson("badge", { label, value, tone }));
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const renderedLabel = applyColor(this.color, ` ${label.toUpperCase()} `, `${ANSI.bold}${toneToColor(tone)}`);
|
|
94
|
+
console.log(`${renderedLabel} ${value}`);
|
|
95
|
+
}
|
|
96
|
+
list(items, tone = "info") {
|
|
97
|
+
if (items.length === 0 || this.silent) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
if (this.json) {
|
|
101
|
+
console.log(formatJson("list", { tone, items }));
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const bullet = applyColor(this.color, "•", toneToColor(tone));
|
|
105
|
+
for (const item of items) {
|
|
106
|
+
console.log(`${bullet} ${item}`);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
block(title, body, tone = "muted") {
|
|
110
|
+
if (!body.trim() || this.silent) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (this.json) {
|
|
114
|
+
console.log(formatJson("block", { title, tone, body }));
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const heading = applyColor(this.color, title, `${ANSI.bold}${toneToColor(tone)}`);
|
|
118
|
+
console.log(`${heading}\n${body}`);
|
|
119
|
+
}
|
|
120
|
+
event(message, tone = "info") {
|
|
121
|
+
if (this.silent) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
if (this.json) {
|
|
125
|
+
console.log(formatJson("event", { tone, message }));
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
console.log(applyColor(this.color, message, toneToColor(tone)));
|
|
129
|
+
}
|
|
130
|
+
rawStdout(message) {
|
|
131
|
+
if (this.silent) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
process.stdout.write(message);
|
|
135
|
+
}
|
|
136
|
+
rawStderr(message) {
|
|
137
|
+
if (this.silent) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
process.stderr.write(message);
|
|
141
|
+
}
|
|
142
|
+
printJson(payload) {
|
|
143
|
+
console.log(JSON.stringify(payload, null, 2));
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
exports.Logger = Logger;
|
|
147
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":";;;AAQA,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,SAAS;IAChB,GAAG,EAAE,SAAS;IACd,IAAI,EAAE,SAAS;IACf,GAAG,EAAE,UAAU;IACf,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;CACjB,CAAC;AAEF,SAAS,UAAU,CAAC,OAAgB,EAAE,KAAa,EAAE,KAAa;IAChE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;AACzC,CAAC;AAED,SAAS,WAAW,CAAC,IAAU;IAC7B,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,SAAS;YACZ,OAAO,IAAI,CAAC,KAAK,CAAC;QACpB,KAAK,MAAM;YACT,OAAO,IAAI,CAAC,MAAM,CAAC;QACrB,KAAK,OAAO;YACV,OAAO,IAAI,CAAC,GAAG,CAAC;QAClB,KAAK,OAAO;YACV,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,KAAK,QAAQ;YACX,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,KA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AI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;YACpD,OAAO;QACT,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClE,CAAC;IAED,SAAS,CAAC,OAAe;QACvB,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QAED,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAED,SAAS,CAAC,OAAe;QACvB,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QAED,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAED,SAAS,CAAC,OAAgB;QACxB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAChD,CAAC;CACF;AAzID,wBAyIC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@0xprathamesh/why-cli",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "AI-first CLI debugger with safe simulation, code-aware fixes, and LangChain support for OpenAI and Ollama.",
|
|
5
|
+
"main": "dist/cli/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"bin": {
|
|
10
|
+
"why": "dist/cli/index.js"
|
|
11
|
+
},
|
|
12
|
+
"preferGlobal": true,
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc",
|
|
15
|
+
"dev": "node dist/cli/index.js",
|
|
16
|
+
"check": "npm run build && npm pack --dry-run --cache ./.npm-pack-cache",
|
|
17
|
+
"prepublishOnly": "npm run build"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"cli",
|
|
21
|
+
"debugging",
|
|
22
|
+
"developer-tools",
|
|
23
|
+
"openai",
|
|
24
|
+
"ollama",
|
|
25
|
+
"typescript",
|
|
26
|
+
"langchain"
|
|
27
|
+
],
|
|
28
|
+
"author": "why-cli contributors",
|
|
29
|
+
"license": "ISC",
|
|
30
|
+
"type": "commonjs",
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=18"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@langchain/core": "^0.3.58",
|
|
36
|
+
"@langchain/ollama": "^0.2.0",
|
|
37
|
+
"@langchain/openai": "^0.6.16"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/node": "^25.5.2",
|
|
41
|
+
"typescript": "^6.0.2"
|
|
42
|
+
}
|
|
43
|
+
}
|