@qlucent/fishi 0.15.1 → 0.16.2
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/dist/index.js +49 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1271,10 +1271,11 @@ async function initCommand(description, options) {
|
|
|
1271
1271
|
const report = generateBrownfieldReport(brownfieldAnalysis);
|
|
1272
1272
|
fs3.writeFileSync(reportPath, report, "utf-8");
|
|
1273
1273
|
}
|
|
1274
|
+
const dockerNow = sandboxMode === "docker" || detectDocker();
|
|
1274
1275
|
const sandboxYaml = `
|
|
1275
1276
|
sandbox:
|
|
1276
1277
|
mode: ${sandboxMode}
|
|
1277
|
-
docker_available: ${
|
|
1278
|
+
docker_available: ${dockerNow}
|
|
1278
1279
|
`;
|
|
1279
1280
|
const fishiYamlPath = path3.join(targetDir, ".fishi", "fishi.yaml");
|
|
1280
1281
|
if (fs3.existsSync(fishiYamlPath)) {
|
|
@@ -2566,13 +2567,18 @@ import {
|
|
|
2566
2567
|
getSandboxPolicyTemplate,
|
|
2567
2568
|
getMonitorEmitterScript,
|
|
2568
2569
|
getFileLockHookScript,
|
|
2570
|
+
getPhaseGuardHook,
|
|
2569
2571
|
getSessionStartHook,
|
|
2570
2572
|
getAutoCheckpointHook,
|
|
2571
2573
|
getAgentCompleteHook,
|
|
2572
2574
|
getGateManagerScript,
|
|
2573
|
-
getWorktreeManagerScript
|
|
2575
|
+
getWorktreeManagerScript,
|
|
2576
|
+
getInitCommand,
|
|
2577
|
+
getStatusCommand,
|
|
2578
|
+
getGateCommand,
|
|
2579
|
+
getBoardCommand
|
|
2574
2580
|
} from "@qlucent/fishi-core";
|
|
2575
|
-
var CURRENT_VERSION = "0.
|
|
2581
|
+
var CURRENT_VERSION = "0.16.0";
|
|
2576
2582
|
function fixHooksFormat(settings) {
|
|
2577
2583
|
if (!settings.hooks) return false;
|
|
2578
2584
|
let fixed = false;
|
|
@@ -2698,7 +2704,8 @@ async function upgradeCommand() {
|
|
|
2698
2704
|
{ name: "gate-manager.mjs", getter: getGateManagerScript },
|
|
2699
2705
|
{ name: "worktree-manager.mjs", getter: getWorktreeManagerScript },
|
|
2700
2706
|
{ name: "monitor-emitter.mjs", getter: getMonitorEmitterScript },
|
|
2701
|
-
{ name: "file-lock-hook.mjs", getter: getFileLockHookScript }
|
|
2707
|
+
{ name: "file-lock-hook.mjs", getter: getFileLockHookScript },
|
|
2708
|
+
{ name: "phase-guard.mjs", getter: getPhaseGuardHook }
|
|
2702
2709
|
];
|
|
2703
2710
|
const scriptsDir = path16.join(targetDir, ".fishi", "scripts");
|
|
2704
2711
|
if (fs16.existsSync(scriptsDir)) {
|
|
@@ -2711,6 +2718,43 @@ async function upgradeCommand() {
|
|
|
2711
2718
|
}
|
|
2712
2719
|
}
|
|
2713
2720
|
}
|
|
2721
|
+
const commandsDir = path16.join(targetDir, ".claude", "commands");
|
|
2722
|
+
if (fs16.existsSync(commandsDir)) {
|
|
2723
|
+
const commandsToRegenerate = [
|
|
2724
|
+
{ name: "fishi-init.md", getter: getInitCommand },
|
|
2725
|
+
{ name: "fishi-status.md", getter: getStatusCommand },
|
|
2726
|
+
{ name: "fishi-gate.md", getter: getGateCommand },
|
|
2727
|
+
{ name: "fishi-board.md", getter: getBoardCommand }
|
|
2728
|
+
];
|
|
2729
|
+
for (const cmd of commandsToRegenerate) {
|
|
2730
|
+
try {
|
|
2731
|
+
fs16.writeFileSync(path16.join(commandsDir, cmd.name), cmd.getter(), "utf-8");
|
|
2732
|
+
updated.push(`.claude/commands/${cmd.name} (orchestration enforcement)`);
|
|
2733
|
+
} catch {
|
|
2734
|
+
}
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
const settingsPath2 = path16.join(targetDir, ".claude", "settings.json");
|
|
2738
|
+
if (fs16.existsSync(settingsPath2)) {
|
|
2739
|
+
try {
|
|
2740
|
+
const existing2 = JSON.parse(fs16.readFileSync(settingsPath2, "utf-8"));
|
|
2741
|
+
const preToolUse = existing2.hooks?.PreToolUse || [];
|
|
2742
|
+
const hasPhaseGuard = preToolUse.some(
|
|
2743
|
+
(h) => h.hooks?.some((hook) => hook.command?.includes("phase-guard"))
|
|
2744
|
+
);
|
|
2745
|
+
if (!hasPhaseGuard) {
|
|
2746
|
+
if (!existing2.hooks) existing2.hooks = {};
|
|
2747
|
+
if (!existing2.hooks.PreToolUse) existing2.hooks.PreToolUse = [];
|
|
2748
|
+
existing2.hooks.PreToolUse.push({
|
|
2749
|
+
matcher: "Write|Edit",
|
|
2750
|
+
hooks: [{ type: "command", command: "node .fishi/scripts/phase-guard.mjs" }]
|
|
2751
|
+
});
|
|
2752
|
+
fs16.writeFileSync(settingsPath2, JSON.stringify(existing2, null, 2) + "\n", "utf-8");
|
|
2753
|
+
updated.push(".claude/settings.json (added phase-guard hook)");
|
|
2754
|
+
}
|
|
2755
|
+
} catch {
|
|
2756
|
+
}
|
|
2757
|
+
}
|
|
2714
2758
|
spinner.succeed("Upgrade complete");
|
|
2715
2759
|
console.log("");
|
|
2716
2760
|
if (updated.length > 0) {
|
|
@@ -2735,7 +2779,7 @@ async function upgradeCommand() {
|
|
|
2735
2779
|
var program = new Command();
|
|
2736
2780
|
program.name("fishi").description(
|
|
2737
2781
|
chalk15.cyan("\u{1F41F} FISHI") + " \u2014 AI-Powered Software Delivery Pipeline\n Autonomous AI development with human governance"
|
|
2738
|
-
).version("0.
|
|
2782
|
+
).version("0.16.2");
|
|
2739
2783
|
program.command("init").description("Initialize FISHI in the current directory").argument("[description]", "Project description (skip wizard with zero-config)").option("-l, --language <lang>", "Primary language (e.g., typescript, python)").option("-f, --framework <framework>", "Framework (e.g., nextjs, express, django)").option(
|
|
2740
2784
|
"-c, --cost-mode <mode>",
|
|
2741
2785
|
"Cost mode: performance | balanced | economy",
|