@metaphi-ai/hum 0.2.22 → 0.2.23
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 +24 -9
- 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.23" : "";
|
|
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.23" : ""
|
|
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.23" : "" } = {}) {
|
|
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) {
|
|
@@ -90514,7 +90514,7 @@ var input_default = MultilineInput;
|
|
|
90514
90514
|
|
|
90515
90515
|
// src/app.jsx
|
|
90516
90516
|
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
|
90517
|
-
var MINE2 = true ? "0.2.
|
|
90517
|
+
var MINE2 = true ? "0.2.23" : "";
|
|
90518
90518
|
var fmtDur = (s) => s < 60 ? `${Math.max(1, Math.round(s))}s` : `${Math.floor(s / 60)}m ${Math.round(s % 60)}s`;
|
|
90519
90519
|
var plural = (n, w) => `${n} ${w}${n === 1 ? "" : "s"}`;
|
|
90520
90520
|
var firstResp = (e) => e.first_response_s ? ` \xB7 first response ${e.first_response_s.toFixed(1)}s` : "";
|
|
@@ -90616,6 +90616,7 @@ var COMMANDS = [
|
|
|
90616
90616
|
{ name: "/context", desc: "what fills the context window: system prompt, tool schemas, messages, tool results" },
|
|
90617
90617
|
{ name: "/usage-credits", desc: "your credits on our models, and the page that adds more (a code from Metaphi, or a purchase)" },
|
|
90618
90618
|
{ name: "/approve", desc: "approvals on|off \u2014 whether every change and command waits for you first (leaving the sandbox always asks)" },
|
|
90619
|
+
{ name: "/agent", desc: "speak to one running sub-agent (/agent 2 <what it should do>), or end it (/agent 2 stop); enter on its row starts the line" },
|
|
90619
90620
|
{ name: "/continue", desc: "after a pause: let the agent carry on" },
|
|
90620
90621
|
{ name: "/goal", desc: "the goal the session keeps working toward on its own, exchange after exchange, until the model marks it complete or blocked (/goal <objective>; /goal pause \xB7 resume \xB7 clear; /goal alone shows where it stands)" },
|
|
90621
90622
|
{ name: "/image", desc: "attach an image file to your next message (/image <path>); ctrl+v pastes a screenshot" },
|
|
@@ -91130,7 +91131,7 @@ function App2({ core: core2, task, resume, images = [], peek = peekSession, upda
|
|
|
91130
91131
|
(ev.calls || []).forEach((c) => {
|
|
91131
91132
|
if (c.diff) append({ kind: "output", name: `${c.desc} \xB7 the whole change`, lines: c.diff.split("\n"), diff: true });
|
|
91132
91133
|
});
|
|
91133
|
-
setProposal({ content: ev.content || "", calls: ev.calls || [], remember: ev.remember || [], remember_text: ev.remember_text || "" });
|
|
91134
|
+
setProposal({ content: ev.content || "", calls: ev.calls || [], remember: ev.remember || [], remember_text: ev.remember_text || "", agent: ev.agent || null });
|
|
91134
91135
|
setStatus("waiting for your decision");
|
|
91135
91136
|
break;
|
|
91136
91137
|
case "question":
|
|
@@ -91392,6 +91393,10 @@ function App2({ core: core2, task, resume, images = [], peek = peekSession, upda
|
|
|
91392
91393
|
if (key.return) {
|
|
91393
91394
|
const a = agents[panelIndex];
|
|
91394
91395
|
if (a && a.worker) openLook(a);
|
|
91396
|
+
else if (a) {
|
|
91397
|
+
if (inputRef.current) inputRef.current.insert(`/agent ${a.n} `);
|
|
91398
|
+
setPanelIndex(-1);
|
|
91399
|
+
}
|
|
91395
91400
|
return;
|
|
91396
91401
|
}
|
|
91397
91402
|
if (input && !key.ctrl && !key.meta && input >= " ") setPanelIndex(-1);
|
|
@@ -91745,6 +91750,15 @@ function App2({ core: core2, task, resume, images = [], peek = peekSession, upda
|
|
|
91745
91750
|
case "/goal":
|
|
91746
91751
|
core2.send(arg ? { cmd: "goal", text: arg } : { cmd: "goal" });
|
|
91747
91752
|
break;
|
|
91753
|
+
case "/agent": {
|
|
91754
|
+
const m = /^(\d+)\s+([\s\S]+)$/.exec(arg || "");
|
|
91755
|
+
if (!m) {
|
|
91756
|
+
append({ kind: "info", text: "/agent <number> <what it should do>, or /agent <number> stop" });
|
|
91757
|
+
break;
|
|
91758
|
+
}
|
|
91759
|
+
core2.send(m[2].trim() === "stop" ? { cmd: "agent", agent: Number(m[1]), stop: true } : { cmd: "agent", agent: Number(m[1]), text: m[2].trim() });
|
|
91760
|
+
break;
|
|
91761
|
+
}
|
|
91748
91762
|
case "/approve": {
|
|
91749
91763
|
const mode = arg === "on" ? "approve" : arg === "off" ? "off" : gate === "approve" ? "off" : "approve";
|
|
91750
91764
|
core2.send({ cmd: "gate", mode });
|
|
@@ -92004,8 +92018,8 @@ function App2({ core: core2, task, resume, images = [], peek = peekSession, upda
|
|
|
92004
92018
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: ` \xB7 ${item.servers.length} in this session` })
|
|
92005
92019
|
] }),
|
|
92006
92020
|
item.servers.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: " none \xB7 add [[mcp]] with a name and a url or a command to ~/.hum/config.toml; the ones your deployment provides arrive when you sign in" }) : null,
|
|
92007
|
-
[["deployment", "from your deployment"], ["config", "from your config (~/.hum/config.toml or the project's .hum/config.toml)"]].map(([src, label]) => {
|
|
92008
|
-
const rows2 = item.servers.filter((s) => (s.source || "config") === src);
|
|
92021
|
+
[["deployment", "from your deployment"], ["config", "from your config (~/.hum/config.toml or the project's .hum/config.toml)"], ["plugin", "from a plugin"], ["agent", "from the agent file this session runs as"], ["program", "from the program that started this session"]].map(([src, label]) => {
|
|
92022
|
+
const rows2 = item.servers.filter((s) => (s.source || "config").split(":")[0] === src);
|
|
92009
92023
|
if (!rows2.length) return null;
|
|
92010
92024
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
92011
92025
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: ` ${label}` }),
|
|
@@ -92089,7 +92103,8 @@ function App2({ core: core2, task, resume, images = [], peek = peekSession, upda
|
|
|
92089
92103
|
proposal && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: ACCENT, paddingX: 1, marginTop: 1, children: [
|
|
92090
92104
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { children: [
|
|
92091
92105
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: ACCENT, bold: true, children: "? " }),
|
|
92092
|
-
|
|
92106
|
+
proposal.agent ? `hum's sub-agent ${proposal.agent.agent} (${proposal.agent.description || proposal.agent.kind})` : "hum",
|
|
92107
|
+
" wants to",
|
|
92093
92108
|
proposal.calls.some((c) => c.escape) ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: "yellow", children: " leave the sandbox" }) : null,
|
|
92094
92109
|
" ",
|
|
92095
92110
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: "\xB7 enter approves \xB7 type a reason to reject \xB7 esc stops" })
|
|
@@ -92419,7 +92434,7 @@ init_update();
|
|
|
92419
92434
|
init_install();
|
|
92420
92435
|
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
|
|
92421
92436
|
import { spawnSync as spawnSync5 } from "node:child_process";
|
|
92422
|
-
var MINE3 = true ? "0.2.
|
|
92437
|
+
var MINE3 = true ? "0.2.23" : "0.0.0";
|
|
92423
92438
|
var layout = installLayout();
|
|
92424
92439
|
function completeInstall() {
|
|
92425
92440
|
if (layout.kind !== "npm" || !needsInstall(MINE3)) return;
|