@metaphi-ai/hum 0.2.20 → 0.2.21
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 +45 -5
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -88639,7 +88639,7 @@ var win, MINE, npmFix, NPM_FIX, humHome, versionsDir, versionDir, pkgDir, coreDi
|
|
|
88639
88639
|
var init_install = __esm({
|
|
88640
88640
|
"src/install.js"() {
|
|
88641
88641
|
win = process.platform === "win32";
|
|
88642
|
-
MINE = true ? "0.2.
|
|
88642
|
+
MINE = true ? "0.2.21" : "";
|
|
88643
88643
|
npmFix = (version = "") => `npm i -g @metaphi-ai/hum@${version || "latest"} --foreground-scripts`;
|
|
88644
88644
|
NPM_FIX = npmFix("latest");
|
|
88645
88645
|
humHome = (env3 = process.env) => env3.HUM_HOME || path.join(os3.homedir(), ".hum");
|
|
@@ -88975,10 +88975,10 @@ function clientEnv() {
|
|
|
88975
88975
|
platform: process.platform,
|
|
88976
88976
|
arch: process.arch,
|
|
88977
88977
|
terminal: process.env.TERM_PROGRAM || (process.env.WT_SESSION ? "Windows Terminal" : process.env.TERM || ""),
|
|
88978
|
-
tui: true ? "0.2.
|
|
88978
|
+
tui: true ? "0.2.21" : ""
|
|
88979
88979
|
};
|
|
88980
88980
|
}
|
|
88981
|
-
function startFailure(failures, { npm = /^(node|bun)(\.exe)?$/i.test(String(process.execPath).split(/[\\/]/).pop()), platform: platform2 = process.platform, version = true ? "0.2.
|
|
88981
|
+
function startFailure(failures, { npm = /^(node|bun)(\.exe)?$/i.test(String(process.execPath).split(/[\\/]/).pop()), platform: platform2 = process.platform, version = true ? "0.2.21" : "" } = {}) {
|
|
88982
88982
|
const refused = failures.find((f) => f.error && f.error.code !== "ENOENT");
|
|
88983
88983
|
const fix = npm ? npmFix(version) : updateCommand({ kind: "native" }, platform2);
|
|
88984
88984
|
if (!refused) {
|
|
@@ -89377,6 +89377,7 @@ function replayLines(items, n = 20) {
|
|
|
89377
89377
|
else if (it.type === "tool_call") out.push(` ${it.desc || it.name}`);
|
|
89378
89378
|
else if (it.type === "tool_result") out.push(` \u23BF ${it.summary || ""}`);
|
|
89379
89379
|
else if (it.type === "plan") out.push(` plan \xB7 ${(it.steps || []).length} steps`);
|
|
89380
|
+
else if (it.type === "hypotheses") out.push(` hypotheses \xB7 ${(it.hypotheses || []).length}`);
|
|
89380
89381
|
else if (["info", "warn", "error"].includes(it.type)) out.push(` ${it.text || ""}`);
|
|
89381
89382
|
}
|
|
89382
89383
|
return out.slice(-n);
|
|
@@ -90513,11 +90514,12 @@ var input_default = MultilineInput;
|
|
|
90513
90514
|
|
|
90514
90515
|
// src/app.jsx
|
|
90515
90516
|
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
|
90516
|
-
var MINE2 = true ? "0.2.
|
|
90517
|
+
var MINE2 = true ? "0.2.21" : "";
|
|
90517
90518
|
var fmtDur = (s) => s < 60 ? `${Math.max(1, Math.round(s))}s` : `${Math.floor(s / 60)}m ${Math.round(s % 60)}s`;
|
|
90518
90519
|
var plural = (n, w) => `${n} ${w}${n === 1 ? "" : "s"}`;
|
|
90519
90520
|
var firstResp = (e) => e.first_response_s ? ` \xB7 first response ${e.first_response_s.toFixed(1)}s` : "";
|
|
90520
90521
|
var shortSession = (name) => (name || "").replace(/\.jsonl$/, "");
|
|
90522
|
+
var HYPOTHESIS_GLYPH = { candidate: "\u25FB", testing: "\u25B8", supported: "\u25FC", refuted: "\u2717", superseded: "\u21B7", blocked: "\u23F8" };
|
|
90521
90523
|
var PICKER_ROWS = 8;
|
|
90522
90524
|
var sessionRows = (p, here) => {
|
|
90523
90525
|
const q = p.query.trim().toLowerCase();
|
|
@@ -90871,6 +90873,7 @@ function App2({ core: core2, task, resume, images = [], peek = peekSession, upda
|
|
|
90871
90873
|
setStatus(ev.phase || "");
|
|
90872
90874
|
return;
|
|
90873
90875
|
case "plan":
|
|
90876
|
+
case "hypotheses":
|
|
90874
90877
|
return;
|
|
90875
90878
|
case "text_delta":
|
|
90876
90879
|
case "reasoning_delta":
|
|
@@ -90985,6 +90988,9 @@ function App2({ core: core2, task, resume, images = [], peek = peekSession, upda
|
|
|
90985
90988
|
append({ kind: "plan", steps: (it.steps || []).map((st) => ({ ...st, glyph: glyph[st.status] || "\u25FB" })), explanation: it.explanation });
|
|
90986
90989
|
break;
|
|
90987
90990
|
}
|
|
90991
|
+
case "hypotheses":
|
|
90992
|
+
append({ kind: "hypotheses", hypotheses: (it.hypotheses || []).map((h) => ({ ...h, glyph: HYPOTHESIS_GLYPH[h.status] || "\u25FB" })), explanation: it.explanation });
|
|
90993
|
+
break;
|
|
90988
90994
|
case "turn_end":
|
|
90989
90995
|
append({ kind: "turn", text: `${fmtDur(it.elapsed_s || 0)} \xB7 ${plural(it.turns, "step")} \xB7 ${fmtCost2(it.cost_usd)} session${firstResp(it)}` });
|
|
90990
90996
|
setSpend(it.cost_usd || 0);
|
|
@@ -91112,6 +91118,12 @@ function App2({ core: core2, task, resume, images = [], peek = peekSession, upda
|
|
|
91112
91118
|
append({ kind: "plan", steps: (ev.steps || []).map((st) => ({ ...st, glyph: glyph[st.status] || "\u25FB" })), explanation: ev.explanation });
|
|
91113
91119
|
break;
|
|
91114
91120
|
}
|
|
91121
|
+
case "hypotheses": {
|
|
91122
|
+
foldThinking();
|
|
91123
|
+
flushDraft();
|
|
91124
|
+
append({ kind: "hypotheses", hypotheses: (ev.hypotheses || []).map((h) => ({ ...h, glyph: HYPOTHESIS_GLYPH[h.status] || "\u25FB" })), explanation: ev.explanation });
|
|
91125
|
+
break;
|
|
91126
|
+
}
|
|
91115
91127
|
case "proposal":
|
|
91116
91128
|
foldThinking();
|
|
91117
91129
|
flushDraft();
|
|
@@ -91901,6 +91913,34 @@ function App2({ core: core2, task, resume, images = [], peek = peekSession, upda
|
|
|
91901
91913
|
i
|
|
91902
91914
|
))
|
|
91903
91915
|
] }),
|
|
91916
|
+
item.kind === "hypotheses" && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, children: [
|
|
91917
|
+
item.explanation ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: item.explanation }) : null,
|
|
91918
|
+
item.hypotheses.map((h, i) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
91919
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
91920
|
+
Text,
|
|
91921
|
+
{
|
|
91922
|
+
dimColor: ["refuted", "superseded", "blocked"].includes(h.status),
|
|
91923
|
+
bold: h.status === "testing",
|
|
91924
|
+
color: h.status === "testing" ? ACCENT : void 0,
|
|
91925
|
+
children: [
|
|
91926
|
+
h.glyph,
|
|
91927
|
+
" ",
|
|
91928
|
+
h.id,
|
|
91929
|
+
" \xB7 ",
|
|
91930
|
+
h.claim
|
|
91931
|
+
]
|
|
91932
|
+
}
|
|
91933
|
+
),
|
|
91934
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { dimColor: true, children: [
|
|
91935
|
+
" check: ",
|
|
91936
|
+
h.check
|
|
91937
|
+
] }),
|
|
91938
|
+
h.evidence ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { dimColor: true, children: [
|
|
91939
|
+
" evidence: ",
|
|
91940
|
+
h.evidence
|
|
91941
|
+
] }) : null
|
|
91942
|
+
] }, i))
|
|
91943
|
+
] }),
|
|
91904
91944
|
item.kind === "tool_result" && (item.isError ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { color: "red", dimColor: true, children: [
|
|
91905
91945
|
item.agent ? " \u23BF " : " \u23BF ",
|
|
91906
91946
|
item.text
|
|
@@ -92379,7 +92419,7 @@ init_update();
|
|
|
92379
92419
|
init_install();
|
|
92380
92420
|
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
|
|
92381
92421
|
import { spawnSync as spawnSync5 } from "node:child_process";
|
|
92382
|
-
var MINE3 = true ? "0.2.
|
|
92422
|
+
var MINE3 = true ? "0.2.21" : "0.0.0";
|
|
92383
92423
|
var layout = installLayout();
|
|
92384
92424
|
function completeInstall() {
|
|
92385
92425
|
if (layout.kind !== "npm" || !needsInstall(MINE3)) return;
|