@kvali/cli 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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kvali",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "Live progress for Claude Code: plan progress, the current step and the time left, what the agent is doing right now, tokens and your plan limits, in a pane beside the chat.",
|
|
5
5
|
"author": { "name": "Giorgi Khiladze" },
|
|
6
6
|
"homepage": "https://github.com/webGrandpa/kvali",
|
package/dist/kvali.mjs
CHANGED
|
@@ -1399,6 +1399,8 @@ function loopKey(a) {
|
|
|
1399
1399
|
// ../core/src/adapters/claude-code.ts
|
|
1400
1400
|
var PULSE_FRESH_MS = 3e4;
|
|
1401
1401
|
var PULSE_ACTIVE = /* @__PURE__ */ new Set(["requesting", "thinking", "writing", "tool-input", "running", "needs-you", "stalled"]);
|
|
1402
|
+
var PULSE_ENDED = /* @__PURE__ */ new Set(["idle", "done", "interrupted", "error"]);
|
|
1403
|
+
var WAKE_GRACE_MS = 2 * 6e4;
|
|
1402
1404
|
var WAITING_NOTIFICATIONS = /* @__PURE__ */ new Set([
|
|
1403
1405
|
"permission_prompt",
|
|
1404
1406
|
"elicitation_dialog",
|
|
@@ -1664,6 +1666,15 @@ var ClaudeCodeAdapter = class {
|
|
|
1664
1666
|
return;
|
|
1665
1667
|
case "system":
|
|
1666
1668
|
if (o.subtype === "compact_boundary") st.context = void 0;
|
|
1669
|
+
if (!o.isSidechain && (o.subtype === "turn_duration" || o.subtype === "stop_hook_summary" && st.open.size === 0)) {
|
|
1670
|
+
const at = ts ?? st.updatedAt;
|
|
1671
|
+
if (st.phase === "working" || st.phase === "tool") {
|
|
1672
|
+
st.phase = "idle";
|
|
1673
|
+
st.phaseAt = at;
|
|
1674
|
+
}
|
|
1675
|
+
st.open.clear();
|
|
1676
|
+
if (st.turnOpen) this.endTurn(st, at, void 0);
|
|
1677
|
+
}
|
|
1667
1678
|
if (/error|retry/i.test(String(o.subtype ?? "")) || o.level === "error" || o.level === "warning") {
|
|
1668
1679
|
const err = o.error && typeof o.error === "object" ? o.error : {};
|
|
1669
1680
|
const attempt = Number(o.retryAttempt ?? o.attempt ?? err.retryAttempt) || void 0;
|
|
@@ -1736,6 +1747,7 @@ var ClaudeCodeAdapter = class {
|
|
|
1736
1747
|
return;
|
|
1737
1748
|
}
|
|
1738
1749
|
if (typeof m.model === "string" && m.model !== "<synthetic>") st.model = m.model;
|
|
1750
|
+
st.lastModelAt = ts;
|
|
1739
1751
|
this.countUsage(st, o, ts, ctx, true);
|
|
1740
1752
|
if (m.model !== "<synthetic>") st.trouble = void 0;
|
|
1741
1753
|
if (o.isApiErrorMessage || o.error && m.model === "<synthetic>") {
|
|
@@ -1863,6 +1875,7 @@ var ClaudeCodeAdapter = class {
|
|
|
1863
1875
|
if (!st.turnOpen) {
|
|
1864
1876
|
st.phase = "working";
|
|
1865
1877
|
st.phaseAt = ts;
|
|
1878
|
+
st.wokeAt = ts;
|
|
1866
1879
|
st.activity = { kind: "thinking", label: "Thinking", startedAt: ts };
|
|
1867
1880
|
}
|
|
1868
1881
|
}
|
|
@@ -2025,6 +2038,9 @@ var ClaudeCodeAdapter = class {
|
|
|
2025
2038
|
default:
|
|
2026
2039
|
status = allDone ? "done" : "idle";
|
|
2027
2040
|
}
|
|
2041
|
+
if (status === "working" && !st.turnOpen && st.wokeAt === st.phaseAt && now - st.phaseAt > WAKE_GRACE_MS) {
|
|
2042
|
+
status = allDone ? "done" : "idle";
|
|
2043
|
+
}
|
|
2028
2044
|
let lastSignal = st.updatedAt;
|
|
2029
2045
|
const live = st.pulse ? void 0 : st.live;
|
|
2030
2046
|
if (live?.at && live.at >= st.phaseAt - 1e3) {
|
|
@@ -2083,6 +2099,10 @@ var ClaudeCodeAdapter = class {
|
|
|
2083
2099
|
status = "stale";
|
|
2084
2100
|
detail = "Claude Code stopped responding";
|
|
2085
2101
|
}
|
|
2102
|
+
} else if (beat && beat.at >= st.startedAt && PULSE_ENDED.has(beat.phase) && status === "working" && !background && beat.at >= (st.lastModelAt ?? 0) - 2e3 && now - beat.at > PULSE_FRESH_MS) {
|
|
2103
|
+
status = beat.phase === "error" ? "error" : allDone ? "done" : "idle";
|
|
2104
|
+
if (beat.phase === "interrupted") detail = "Interrupted";
|
|
2105
|
+
else if (beat.phase === "error") detail = st.errorText ?? "Stopped with an error";
|
|
2086
2106
|
}
|
|
2087
2107
|
if (status === "working") {
|
|
2088
2108
|
const stale = staleness(lastSignal, ctx);
|
|
@@ -8544,7 +8564,7 @@ function qrTerminal(text, color = true) {
|
|
|
8544
8564
|
}
|
|
8545
8565
|
|
|
8546
8566
|
// src/index.ts
|
|
8547
|
-
var VERSION = "0.7.
|
|
8567
|
+
var VERSION = "0.7.4";
|
|
8548
8568
|
function parse(argv) {
|
|
8549
8569
|
const opts = {
|
|
8550
8570
|
json: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kvali/cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "Live progress, time left, tokens, plan limits and phone alerts for AI coding agents (Claude Code, Codex, Gemini CLI, Antigravity, Copilot, Cline, Roo Code, Kilo Code, OpenCode), in your terminal.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Giorgi Khiladze (https://github.com/webGrandpa)",
|