@metaphi-ai/hum 0.2.62 → 0.2.64
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/cli.mjs +27 -7
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -89511,7 +89511,7 @@ var init_install = __esm({
|
|
|
89511
89511
|
"src/install.js"() {
|
|
89512
89512
|
init_define_HUM_CORE_SUBS();
|
|
89513
89513
|
win = process.platform === "win32";
|
|
89514
|
-
MINE = true ? "0.2.
|
|
89514
|
+
MINE = true ? "0.2.64" : "";
|
|
89515
89515
|
npmFix = (version = "") => `npm i -g @metaphi-ai/hum@${version || "latest"} --foreground-scripts`;
|
|
89516
89516
|
NPM_FIX = npmFix("latest");
|
|
89517
89517
|
humHome = (env3 = process.env) => env3.HUM_HOME || path.join(os3.homedir(), ".hum");
|
|
@@ -89866,10 +89866,10 @@ function clientEnv() {
|
|
|
89866
89866
|
platform: process.platform,
|
|
89867
89867
|
arch: process.arch,
|
|
89868
89868
|
terminal: process.env.TERM_PROGRAM || (process.env.WT_SESSION ? "Windows Terminal" : process.env.TERM || ""),
|
|
89869
|
-
tui: true ? "0.2.
|
|
89869
|
+
tui: true ? "0.2.64" : ""
|
|
89870
89870
|
};
|
|
89871
89871
|
}
|
|
89872
|
-
function startFailure(failures, { npm = /^(node|bun)(\.exe)?$/i.test(String(process.execPath).split(/[\\/]/).pop()), platform: platform2 = process.platform, version = true ? "0.2.
|
|
89872
|
+
function startFailure(failures, { npm = /^(node|bun)(\.exe)?$/i.test(String(process.execPath).split(/[\\/]/).pop()), platform: platform2 = process.platform, version = true ? "0.2.64" : "" } = {}) {
|
|
89873
89873
|
const refused = failures.find((f) => f.error && f.error.code !== "ENOENT");
|
|
89874
89874
|
const fix = npm ? npmFix(version) : updateCommand({ kind: "native" }, platform2);
|
|
89875
89875
|
if (!refused) {
|
|
@@ -91384,7 +91384,7 @@ var after = (ms, fn) => {
|
|
|
91384
91384
|
|
|
91385
91385
|
// src/app.jsx
|
|
91386
91386
|
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
|
91387
|
-
var MINE2 = true ? "0.2.
|
|
91387
|
+
var MINE2 = true ? "0.2.64" : "";
|
|
91388
91388
|
var fmtDur = (s) => s < 60 ? `${Math.max(1, Math.round(s))}s` : `${Math.floor(s / 60)}m ${Math.round(s % 60)}s`;
|
|
91389
91389
|
var plural = (n, w) => `${n} ${w}${n === 1 ? "" : "s"}`;
|
|
91390
91390
|
var shortSession = (name) => (name || "").replace(/\.jsonl$/, "");
|
|
@@ -91720,6 +91720,7 @@ var fitStatus = (parts, width) => {
|
|
|
91720
91720
|
}
|
|
91721
91721
|
return line();
|
|
91722
91722
|
};
|
|
91723
|
+
var RETRY_ENDS = /* @__PURE__ */ new Set(["text_delta", "reasoning_delta", "tool_pending", "tool_call", "turn_end", "idle", "interrupted", "error", "proposal"]);
|
|
91723
91724
|
function App2({ core: core2, task, resume, images = [], peek = peekSession, update = updateNotice, watch = watchReady, tty: tty3 = toTerminal, after: after2 = after }) {
|
|
91724
91725
|
const { exit } = use_app_default();
|
|
91725
91726
|
const { stdout } = use_stdout_default();
|
|
@@ -91728,6 +91729,7 @@ function App2({ core: core2, task, resume, images = [], peek = peekSession, upda
|
|
|
91728
91729
|
const [transcriptEpoch, setTranscriptEpoch] = (0, import_react38.useState)(0);
|
|
91729
91730
|
const [phase, setPhase] = (0, import_react38.useState)("connecting");
|
|
91730
91731
|
const [status, setStatus] = (0, import_react38.useState)("");
|
|
91732
|
+
const [retrying, setRetrying] = (0, import_react38.useState)(null);
|
|
91731
91733
|
const [statusOf, setStatusOf] = (0, import_react38.useState)("");
|
|
91732
91734
|
const [hello, setHello] = (0, import_react38.useState)(null);
|
|
91733
91735
|
const [latest, setLatest] = (0, import_react38.useState)(null);
|
|
@@ -92066,6 +92068,10 @@ ${r.content}`).join("\n\n") };
|
|
|
92066
92068
|
case "plan":
|
|
92067
92069
|
case "hypotheses":
|
|
92068
92070
|
return;
|
|
92071
|
+
case "retry":
|
|
92072
|
+
append({ kind: "warn", text: `agent ${ev.agent}: ${ev.text}` });
|
|
92073
|
+
return;
|
|
92074
|
+
// its stream is not the draft
|
|
92069
92075
|
case "text_delta":
|
|
92070
92076
|
case "reasoning_delta":
|
|
92071
92077
|
case "turn_start":
|
|
@@ -92076,6 +92082,7 @@ ${r.content}`).join("\n\n") };
|
|
|
92076
92082
|
break;
|
|
92077
92083
|
}
|
|
92078
92084
|
}
|
|
92085
|
+
if (RETRY_ENDS.has(ev.type)) setRetrying(null);
|
|
92079
92086
|
switch (ev.type) {
|
|
92080
92087
|
case "agents": {
|
|
92081
92088
|
const items2 = ev.items || [];
|
|
@@ -92507,7 +92514,19 @@ ${r.content}`).join("\n\n") };
|
|
|
92507
92514
|
setMeter((m) => ({ ...m, tokens: 0 }));
|
|
92508
92515
|
break;
|
|
92509
92516
|
case "retry":
|
|
92510
|
-
|
|
92517
|
+
{
|
|
92518
|
+
const dropped = Boolean(draftRef.current.trim() || thinkChars.current);
|
|
92519
|
+
draftRef.current = "";
|
|
92520
|
+
setDraft("");
|
|
92521
|
+
thinkText.current = "";
|
|
92522
|
+
thinkChars.current = 0;
|
|
92523
|
+
thinkT0.current = null;
|
|
92524
|
+
thoughtRef.current = null;
|
|
92525
|
+
ledRef.current = null;
|
|
92526
|
+
append({ kind: "warn", text: `${ev.text}${dropped ? " \xB7 the partial reply is dropped" : ""}` });
|
|
92527
|
+
setRetrying({ kind: ev.kind || "failure", attempt: ev.attempt, until: Date.now() + (ev.wait_s || 0) * 1e3 });
|
|
92528
|
+
break;
|
|
92529
|
+
}
|
|
92511
92530
|
break;
|
|
92512
92531
|
case "interrupted":
|
|
92513
92532
|
foldThinking();
|
|
@@ -93289,7 +93308,8 @@ ${r.content}`).join("\n\n") };
|
|
|
93289
93308
|
ctrlc ? { text: "ctrl+c again to quit" } : { text: "/ for commands", drop: 1 }
|
|
93290
93309
|
], width);
|
|
93291
93310
|
const stepAt = planSteps.findIndex((st) => st.status === "in_progress");
|
|
93292
|
-
const
|
|
93311
|
+
const retryLeft = retrying ? Math.max(0, Math.ceil((retrying.until - Date.now()) / 1e3)) : 0;
|
|
93312
|
+
const phaseWord = retrying ? `model ${retrying.kind}: ${retryLeft ? `retry ${retrying.attempt} in ${retryLeft} s` : `retry ${retrying.attempt} sent`}` : statusOf === "tool" ? "" : status;
|
|
93293
93313
|
const doing = [stepAt >= 0 ? `${stepAt + 1}/${planSteps.length} \xB7 ${planSteps[stepAt].step}` : "", phaseWord].filter(Boolean).join(" \xB7 ") || "working";
|
|
93294
93314
|
const beside = [elapsed >= 1 ? fmtDur(elapsed) : "", escOwned ? "" : "esc to interrupt"].filter(Boolean).join(" \xB7 ");
|
|
93295
93315
|
const spinnerLabel = phase === "connecting" ? " starting \u2026" : ` ${doing}${beside ? ` (${beside})` : ""}`;
|
|
@@ -94050,7 +94070,7 @@ async function sendPending({
|
|
|
94050
94070
|
await init_theme();
|
|
94051
94071
|
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
|
|
94052
94072
|
import { spawnSync as spawnSync6 } from "node:child_process";
|
|
94053
|
-
var MINE3 = true ? "0.2.
|
|
94073
|
+
var MINE3 = true ? "0.2.64" : "0.0.0";
|
|
94054
94074
|
var layout = installLayout();
|
|
94055
94075
|
function completeInstall() {
|
|
94056
94076
|
if (layout.kind !== "npm" || !needsInstall(MINE3)) return;
|