kaizen-agent 0.7.3 → 0.7.4
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/cli/install.ts +27 -28
- package/package.json +1 -1
package/cli/install.ts
CHANGED
|
@@ -267,8 +267,32 @@ async function anyKey() {
|
|
|
267
267
|
|
|
268
268
|
const repo = await resolveRepo();
|
|
269
269
|
const root = await chooseRoot();
|
|
270
|
+
const presetChoice = await choosePreset();
|
|
270
271
|
const targets = found(root);
|
|
271
272
|
|
|
273
|
+
async function choosePreset(): Promise<PresetName> {
|
|
274
|
+
if (presetArg) return presetArg;
|
|
275
|
+
if (!interactive) return "medium";
|
|
276
|
+
|
|
277
|
+
return select("Choose workflow preset", [
|
|
278
|
+
{
|
|
279
|
+
label: "Medium (Recommended)",
|
|
280
|
+
hint: "balanced — subagents, plan approval, auto-fix high/critical",
|
|
281
|
+
value: "medium",
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
label: "Low",
|
|
285
|
+
hint: "inline & manual — lite runner, inline builder, manual approvals, no auto-fix",
|
|
286
|
+
value: "low",
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
label: "Ultra",
|
|
290
|
+
hint: "autonomous — subagents, auto mode, auto-fix all findings (up to 4 rounds)",
|
|
291
|
+
value: "ultra",
|
|
292
|
+
},
|
|
293
|
+
]);
|
|
294
|
+
}
|
|
295
|
+
|
|
272
296
|
// ---------------------------------------------------------------- repo
|
|
273
297
|
|
|
274
298
|
// Settings only needs the clone's default config, not a pull.
|
|
@@ -411,40 +435,15 @@ const inProject = process.cwd() !== home;
|
|
|
411
435
|
const kaizenDir = join(process.cwd(), ".kaizen");
|
|
412
436
|
const globalKaizen = join(home, ".kaizen");
|
|
413
437
|
const globalConfig = join(globalKaizen, "config.yml");
|
|
414
|
-
const hasConfig = (args.has("onboard") || args.has("--onboard"))
|
|
415
|
-
? false
|
|
416
|
-
: (inProject ? existsSync(localConfig) : existsSync(globalConfig));
|
|
417
|
-
|
|
418
|
-
let presetChoice: PresetName | null = presetArg;
|
|
419
|
-
if (!hasConfig && !presetChoice && interactive) {
|
|
420
|
-
presetChoice = await select("Choose workflow preset", [
|
|
421
|
-
{
|
|
422
|
-
label: "Medium (Recommended)",
|
|
423
|
-
hint: "balanced — subagents, plan approval, auto-fix high/critical",
|
|
424
|
-
value: "medium",
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
label: "Low",
|
|
428
|
-
hint: "inline & manual — lite runner, inline builder, manual approvals, no auto-fix",
|
|
429
|
-
value: "low",
|
|
430
|
-
},
|
|
431
|
-
{
|
|
432
|
-
label: "Ultra",
|
|
433
|
-
hint: "autonomous — subagents, auto mode, auto-fix all findings (up to 4 rounds)",
|
|
434
|
-
value: "ultra",
|
|
435
|
-
},
|
|
436
|
-
]);
|
|
437
|
-
}
|
|
438
438
|
|
|
439
|
-
if (
|
|
439
|
+
if (!args.has("--project")) {
|
|
440
440
|
mkdirSync(globalKaizen, { recursive: true });
|
|
441
441
|
const defPath = join(repo, "skills/kaizen/config.default.yml");
|
|
442
442
|
const def = readFileSync(defPath, "utf8");
|
|
443
443
|
const base = existsSync(globalConfig) ? readFileSync(globalConfig, "utf8") : def;
|
|
444
|
-
const
|
|
445
|
-
const conf = applyPreset(base, target, def);
|
|
444
|
+
const conf = applyPreset(base, presetChoice, def);
|
|
446
445
|
writeFileSync(globalConfig, conf);
|
|
447
|
-
step(`configured ${c.bold(
|
|
446
|
+
step(`configured ${c.bold(presetChoice)} preset in ${tilde(globalConfig)}`);
|
|
448
447
|
}
|
|
449
448
|
|
|
450
449
|
// A .kaizen/ in a parent already owns this folder's state, and setting up a child
|
package/package.json
CHANGED