@metaphi-ai/hum 0.2.48 → 0.2.49
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 +21 -24
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -89508,7 +89508,7 @@ var init_install = __esm({
|
|
|
89508
89508
|
"src/install.js"() {
|
|
89509
89509
|
init_define_HUM_CORE_SUBS();
|
|
89510
89510
|
win = process.platform === "win32";
|
|
89511
|
-
MINE = true ? "0.2.
|
|
89511
|
+
MINE = true ? "0.2.49" : "";
|
|
89512
89512
|
npmFix = (version = "") => `npm i -g @metaphi-ai/hum@${version || "latest"} --foreground-scripts`;
|
|
89513
89513
|
NPM_FIX = npmFix("latest");
|
|
89514
89514
|
humHome = (env3 = process.env) => env3.HUM_HOME || path.join(os3.homedir(), ".hum");
|
|
@@ -89863,10 +89863,10 @@ function clientEnv() {
|
|
|
89863
89863
|
platform: process.platform,
|
|
89864
89864
|
arch: process.arch,
|
|
89865
89865
|
terminal: process.env.TERM_PROGRAM || (process.env.WT_SESSION ? "Windows Terminal" : process.env.TERM || ""),
|
|
89866
|
-
tui: true ? "0.2.
|
|
89866
|
+
tui: true ? "0.2.49" : ""
|
|
89867
89867
|
};
|
|
89868
89868
|
}
|
|
89869
|
-
function startFailure(failures, { npm = /^(node|bun)(\.exe)?$/i.test(String(process.execPath).split(/[\\/]/).pop()), platform: platform2 = process.platform, version = true ? "0.2.
|
|
89869
|
+
function startFailure(failures, { npm = /^(node|bun)(\.exe)?$/i.test(String(process.execPath).split(/[\\/]/).pop()), platform: platform2 = process.platform, version = true ? "0.2.49" : "" } = {}) {
|
|
89870
89870
|
const refused = failures.find((f) => f.error && f.error.code !== "ENOENT");
|
|
89871
89871
|
const fix = npm ? npmFix(version) : updateCommand({ kind: "native" }, platform2);
|
|
89872
89872
|
if (!refused) {
|
|
@@ -91381,7 +91381,7 @@ var after = (ms, fn) => {
|
|
|
91381
91381
|
|
|
91382
91382
|
// src/app.jsx
|
|
91383
91383
|
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
|
91384
|
-
var MINE2 = true ? "0.2.
|
|
91384
|
+
var MINE2 = true ? "0.2.49" : "";
|
|
91385
91385
|
var fmtDur = (s) => s < 60 ? `${Math.max(1, Math.round(s))}s` : `${Math.floor(s / 60)}m ${Math.round(s % 60)}s`;
|
|
91386
91386
|
var plural = (n, w) => `${n} ${w}${n === 1 ? "" : "s"}`;
|
|
91387
91387
|
var shortSession = (name) => (name || "").replace(/\.jsonl$/, "");
|
|
@@ -91550,28 +91550,25 @@ var DIFF_TAIL_LINES = 20;
|
|
|
91550
91550
|
var PATCH_LINES = 200;
|
|
91551
91551
|
var NEEDS_EVERY_MS = 1e4;
|
|
91552
91552
|
function ToolList({ about, tools, indent = 4 }) {
|
|
91553
|
-
const
|
|
91553
|
+
const { stdout } = use_stdout_default();
|
|
91554
|
+
const width = Math.max(40, stdout && stdout.columns || 100) - indent;
|
|
91554
91555
|
if (!about || !about.length) {
|
|
91555
91556
|
if (!tools || !tools.length) return null;
|
|
91556
91557
|
const cell2 = Math.max(...tools.map((t) => t.length)) + 2;
|
|
91557
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box2, { flexDirection: "row", flexWrap: "wrap", paddingLeft: indent, children: tools.map((t) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box2, { width: cell2, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text2, { children: t }) }, t)) });
|
|
91558
|
-
}
|
|
91559
|
-
const
|
|
91560
|
-
const
|
|
91561
|
-
let
|
|
91562
|
-
|
|
91563
|
-
|
|
91564
|
-
|
|
91565
|
-
|
|
91566
|
-
|
|
91567
|
-
|
|
91568
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.
|
|
91569
|
-
|
|
91570
|
-
|
|
91571
|
-
] }, t.name)
|
|
91572
|
-
);
|
|
91573
|
-
}
|
|
91574
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box2, { flexDirection: "column", children: rows });
|
|
91558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box2, { flexDirection: "row", flexWrap: "wrap", paddingLeft: indent, width: width + indent, children: tools.map((t) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box2, { width: cell2, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text2, { children: t }) }, t)) });
|
|
91559
|
+
}
|
|
91560
|
+
const gw = Math.max(0, ...about.map((t) => (t.group || "").length));
|
|
91561
|
+
const nw = Math.max(...about.map((t) => t.name.length));
|
|
91562
|
+
let last = null;
|
|
91563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box2, { flexDirection: "column", paddingLeft: indent, children: about.map((t) => {
|
|
91564
|
+
const head = t.group && t.group !== last ? t.group : "";
|
|
91565
|
+
last = t.group || last;
|
|
91566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box2, { width, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Text2, { wrap: "truncate-end", children: [
|
|
91567
|
+
gw ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text2, { color: ACCENT, children: `${head.padEnd(gw)} ` }) : null,
|
|
91568
|
+
`${t.name.padEnd(nw)} `,
|
|
91569
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text2, { dimColor: true, children: t.summary || "" })
|
|
91570
|
+
] }) }, t.name);
|
|
91571
|
+
}) });
|
|
91575
91572
|
}
|
|
91576
91573
|
var serverLine = (s) => s.state === "connected" ? `connected \xB7 ${s.tools.length} tool${s.tools.length === 1 ? "" : "s"}${s.signed_in ? " \xB7 signed in" : ""}` : s.state;
|
|
91577
91574
|
var serverActions = (s) => [
|
|
@@ -93998,7 +93995,7 @@ async function sendPending({
|
|
|
93998
93995
|
await init_theme();
|
|
93999
93996
|
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
|
|
94000
93997
|
import { spawnSync as spawnSync6 } from "node:child_process";
|
|
94001
|
-
var MINE3 = true ? "0.2.
|
|
93998
|
+
var MINE3 = true ? "0.2.49" : "0.0.0";
|
|
94002
93999
|
var layout = installLayout();
|
|
94003
94000
|
function completeInstall() {
|
|
94004
94001
|
if (layout.kind !== "npm" || !needsInstall(MINE3)) return;
|