@metaphi-ai/hum 0.1.31 → 0.1.33
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 +23 -5
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -75838,7 +75838,7 @@ function runningVersion(candidates = engineCandidates(), opts = {}) {
|
|
|
75838
75838
|
}
|
|
75839
75839
|
return null;
|
|
75840
75840
|
}
|
|
75841
|
-
function startFailure(failures, { npm = /^(node|bun)(\.exe)?$/i.test(String(process.execPath).split(/[\\/]/).pop()), platform: platform2 = process.platform, version = true ? "0.1.
|
|
75841
|
+
function startFailure(failures, { npm = /^(node|bun)(\.exe)?$/i.test(String(process.execPath).split(/[\\/]/).pop()), platform: platform2 = process.platform, version = true ? "0.1.33" : "" } = {}) {
|
|
75842
75842
|
const refused = failures.find((f) => f.error && f.error.code !== "ENOENT");
|
|
75843
75843
|
const fix = npm ? npmFix(version) : updateCommand({ kind: "native" }, platform2);
|
|
75844
75844
|
if (!refused) {
|
|
@@ -84541,7 +84541,7 @@ var input_default = MultilineInput;
|
|
|
84541
84541
|
|
|
84542
84542
|
// src/app.jsx
|
|
84543
84543
|
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
|
84544
|
-
var MINE = true ? "0.1.
|
|
84544
|
+
var MINE = true ? "0.1.33" : "";
|
|
84545
84545
|
var fmtDur = (s) => s < 60 ? `${Math.max(1, Math.round(s))}s` : `${Math.floor(s / 60)}m ${Math.round(s % 60)}s`;
|
|
84546
84546
|
var plural = (n, w) => `${n} ${w}${n === 1 ? "" : "s"}`;
|
|
84547
84547
|
var firstResp = (e) => e.first_response_s ? ` \xB7 first response ${e.first_response_s.toFixed(1)}s` : "";
|
|
@@ -84635,6 +84635,12 @@ var REWIND_CHOICES = [
|
|
|
84635
84635
|
];
|
|
84636
84636
|
var OUTPUT_MAX_LINES = 200;
|
|
84637
84637
|
var ERR_TAIL_LINES = 5;
|
|
84638
|
+
var diagLine = (d) => `${d.file ? `${d.file}${d.line != null ? `:${d.line}` : ""}: ` : ""}${d.severity || "error"}: ${d.message || ""}`;
|
|
84639
|
+
var tallyLine = (tally) => Object.entries(tally).map(([name, t]) => {
|
|
84640
|
+
const short = name.includes("__") ? name.split("__")[1] : name;
|
|
84641
|
+
const parts = [t.ok ? `${t.ok} ok` : null, t.failed ? `${t.failed} failed` : null, t.error ? `${t.error} error` : null].filter(Boolean);
|
|
84642
|
+
return `${short} ${parts.join(" \xB7 ")}`;
|
|
84643
|
+
}).join(" ");
|
|
84638
84644
|
function App2({ engine: engine2, task, resume, images = [] }) {
|
|
84639
84645
|
const { exit } = use_app_default();
|
|
84640
84646
|
const { stdout } = use_stdout_default();
|
|
@@ -84962,10 +84968,13 @@ function App2({ engine: engine2, task, resume, images = [] }) {
|
|
|
84962
84968
|
lastOutRef.current = { name: ev.name, content: ev.content || "" };
|
|
84963
84969
|
const more = (ev.lines || 0) > 1 ? ` (+${ev.lines - 1} lines \xB7 ctrl+o expands)` : "";
|
|
84964
84970
|
append({ kind: "tool_result", text: `${ev.summary || "(no output)"}${more}`, isError: !ev.ok });
|
|
84965
|
-
if (!ev.ok && ev.
|
|
84971
|
+
if (!ev.ok && ev.diagnostics && ev.diagnostics.length) {
|
|
84972
|
+
append({ kind: "errtail", lines: ev.diagnostics.map(diagLine) });
|
|
84973
|
+
} else if (!ev.ok && ev.content) {
|
|
84966
84974
|
const t = ev.content.split("\n").filter((l) => l.trim()).slice(-ERR_TAIL_LINES);
|
|
84967
84975
|
if (t.length > 1) append({ kind: "errtail", lines: t });
|
|
84968
84976
|
}
|
|
84977
|
+
if (ev.spool) append({ kind: "spool", text: `${ev.spool}/` });
|
|
84969
84978
|
break;
|
|
84970
84979
|
}
|
|
84971
84980
|
case "plan": {
|
|
@@ -85082,6 +85091,7 @@ function App2({ engine: engine2, task, resume, images = [] }) {
|
|
|
85082
85091
|
case "turn_end": {
|
|
85083
85092
|
foldThinking();
|
|
85084
85093
|
flushDraft();
|
|
85094
|
+
if (ev.tally && Object.keys(ev.tally).length) append({ kind: "tally", text: tallyLine(ev.tally) });
|
|
85085
85095
|
setMeter((m) => ({ ...m, tokens: ev.context_tokens ?? m.tokens, input: ev.input_tokens || 0, output: ev.output_tokens || 0 }));
|
|
85086
85096
|
setSpend(ev.cost_usd);
|
|
85087
85097
|
const dur = turnT0.current ? fmtDur((Date.now() - turnT0.current) / 1e3) : fmtDur(ev.elapsed_s);
|
|
@@ -85599,6 +85609,14 @@ function App2({ engine: engine2, task, resume, images = [] }) {
|
|
|
85599
85609
|
item.more > 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: `\u2026 +${item.more} more lines \xB7 /diff <path> narrows it` }) : null,
|
|
85600
85610
|
item.stat ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: item.stat.trim() }) : null
|
|
85601
85611
|
] }),
|
|
85612
|
+
item.kind === "spool" && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { dimColor: true, children: [
|
|
85613
|
+
" \u21B3 ",
|
|
85614
|
+
item.text
|
|
85615
|
+
] }),
|
|
85616
|
+
item.kind === "tally" && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { dimColor: true, children: [
|
|
85617
|
+
" ",
|
|
85618
|
+
item.text
|
|
85619
|
+
] }),
|
|
85602
85620
|
item.kind === "errtail" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box_default, { flexDirection: "column", paddingLeft: 6, children: item.lines.map((l, i) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: "red", dimColor: true, children: l }, i)) }),
|
|
85603
85621
|
item.kind === "output" && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 4, children: [
|
|
85604
85622
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: `full output \xB7 ${item.name}` }),
|
|
@@ -85715,7 +85733,7 @@ function App2({ engine: engine2, task, resume, images = [] }) {
|
|
|
85715
85733
|
] }),
|
|
85716
85734
|
picker && picker.kind === "model" && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, marginTop: 1, children: [
|
|
85717
85735
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: ACCENT, bold: true, children: "Select model" }),
|
|
85718
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: `Switch
|
|
85736
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: `Switch models. Served via Metaphi AI.${picker.byo.length ? ` Your own keys: ${picker.byo.join(", ")} \u2014 /model <provider>/<model> uses one.` : ""}` }),
|
|
85719
85737
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: " " }),
|
|
85720
85738
|
(() => {
|
|
85721
85739
|
const nameW = Math.max(...picker.items.map((m) => m.name.length + (m.current ? 2 : 0)));
|
|
@@ -85899,7 +85917,7 @@ init_update();
|
|
|
85899
85917
|
init_install();
|
|
85900
85918
|
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
|
85901
85919
|
import { spawnSync as spawnSync5 } from "node:child_process";
|
|
85902
|
-
var MINE2 = true ? "0.1.
|
|
85920
|
+
var MINE2 = true ? "0.1.33" : "0.0.0";
|
|
85903
85921
|
var layout = installLayout();
|
|
85904
85922
|
function completeInstall() {
|
|
85905
85923
|
if (layout.kind !== "npm" || !needsInstall(MINE2)) return;
|