@qlucent/fishi 0.16.3 → 0.16.5
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 +17 -27
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1801,12 +1801,7 @@ import fs8 from "fs";
|
|
|
1801
1801
|
import path8 from "path";
|
|
1802
1802
|
import { parse as parseYaml4 } from "yaml";
|
|
1803
1803
|
import { readMonitorState, getAgentSummary } from "@qlucent/fishi-core";
|
|
1804
|
-
var PHASES = ["init", "discovery", "
|
|
1805
|
-
function formatNumber(n) {
|
|
1806
|
-
if (n >= 1e6) return `${(n / 1e6).toFixed(1)}M`;
|
|
1807
|
-
if (n >= 1e3) return `${(n / 1e3).toFixed(1)}K`;
|
|
1808
|
-
return String(n);
|
|
1809
|
-
}
|
|
1804
|
+
var PHASES = ["init", "discovery", "prd", "architecture", "sprint_planning", "development", "deployment", "deployed"];
|
|
1810
1805
|
function renderPhaseBar(currentPhase) {
|
|
1811
1806
|
const idx = PHASES.indexOf(currentPhase);
|
|
1812
1807
|
const parts = PHASES.map((p, i) => {
|
|
@@ -1851,27 +1846,10 @@ function renderMonitor(projectDir) {
|
|
|
1851
1846
|
console.log(renderPhaseBar(currentPhase));
|
|
1852
1847
|
console.log("");
|
|
1853
1848
|
console.log(renderDivider("Summary"));
|
|
1849
|
+
const checkpointCount = events.filter((e) => e.type === "checkpoint.created").length;
|
|
1854
1850
|
console.log(
|
|
1855
|
-
` ${chalk6.bold("
|
|
1851
|
+
` ${chalk6.bold("Events:")} ${chalk6.cyan(events.length)} ${chalk6.bold("Checkpoints:")} ${chalk6.cyan(checkpointCount)} ${chalk6.bold("Agent Completions:")} ${chalk6.cyan(summary.totalAgentCompletions)} ${chalk6.bold("Files Changed:")} ${chalk6.cyan(summary.totalFilesChanged)}`
|
|
1856
1852
|
);
|
|
1857
|
-
console.log(renderDivider("Tokens by Model"));
|
|
1858
|
-
const modelEntries = Object.entries(summary.tokensByModel);
|
|
1859
|
-
if (modelEntries.length === 0) {
|
|
1860
|
-
console.log(chalk6.gray(" (none yet)"));
|
|
1861
|
-
} else {
|
|
1862
|
-
for (const [model, tokens] of modelEntries.sort((a, b) => b[1] - a[1])) {
|
|
1863
|
-
console.log(` ${chalk6.yellow(model.padEnd(30))} ${chalk6.cyan(formatNumber(tokens))}`);
|
|
1864
|
-
}
|
|
1865
|
-
}
|
|
1866
|
-
console.log(renderDivider("Tools Used"));
|
|
1867
|
-
const toolEntries = Object.entries(summary.toolsUsed);
|
|
1868
|
-
if (toolEntries.length === 0) {
|
|
1869
|
-
console.log(chalk6.gray(" (none yet)"));
|
|
1870
|
-
} else {
|
|
1871
|
-
for (const [tool, count] of toolEntries.sort((a, b) => b[1] - a[1]).slice(0, 10)) {
|
|
1872
|
-
console.log(` ${chalk6.yellow(tool.padEnd(30))} ${chalk6.cyan(count)}`);
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
1853
|
console.log(renderDivider("Agent Activity"));
|
|
1876
1854
|
const agentEntries = Object.entries(agentSummary);
|
|
1877
1855
|
if (agentEntries.length === 0) {
|
|
@@ -1988,7 +1966,7 @@ async function dashboardCommand(options) {
|
|
|
1988
1966
|
if (fs9.existsSync(projectYamlPath)) {
|
|
1989
1967
|
try {
|
|
1990
1968
|
const projectState = parseYaml5(fs9.readFileSync(projectYamlPath, "utf-8"));
|
|
1991
|
-
phase = projectState?.current_phase || "init";
|
|
1969
|
+
phase = projectState?.phase || projectState?.current_phase || "init";
|
|
1992
1970
|
} catch {
|
|
1993
1971
|
}
|
|
1994
1972
|
}
|
|
@@ -2024,6 +2002,18 @@ async function dashboardCommand(options) {
|
|
|
2024
2002
|
res.writeHead(404, { "Content-Type": "text/plain" });
|
|
2025
2003
|
res.end("Not found");
|
|
2026
2004
|
});
|
|
2005
|
+
server.on("error", (err) => {
|
|
2006
|
+
if (err.code === "EADDRINUSE") {
|
|
2007
|
+
console.log("");
|
|
2008
|
+
console.log(chalk7.cyan.bold(" FISHI Agent Dashboard"));
|
|
2009
|
+
console.log("");
|
|
2010
|
+
console.log(chalk7.green(` Dashboard is already running on port ${port}`));
|
|
2011
|
+
console.log(` ${chalk7.bold("URL:")} ${chalk7.cyan(`http://localhost:${port}`)}`);
|
|
2012
|
+
console.log("");
|
|
2013
|
+
process.exit(0);
|
|
2014
|
+
}
|
|
2015
|
+
throw err;
|
|
2016
|
+
});
|
|
2027
2017
|
server.listen(port, () => {
|
|
2028
2018
|
console.log("");
|
|
2029
2019
|
console.log(chalk7.cyan.bold(" FISHI Agent Dashboard"));
|
|
@@ -2779,7 +2769,7 @@ async function upgradeCommand() {
|
|
|
2779
2769
|
var program = new Command();
|
|
2780
2770
|
program.name("fishi").description(
|
|
2781
2771
|
chalk15.cyan("\u{1F41F} FISHI") + " \u2014 AI-Powered Software Delivery Pipeline\n Autonomous AI development with human governance"
|
|
2782
|
-
).version("0.16.
|
|
2772
|
+
).version("0.16.5");
|
|
2783
2773
|
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(
|
|
2784
2774
|
"-c, --cost-mode <mode>",
|
|
2785
2775
|
"Cost mode: performance | balanced | economy",
|