@metaphi-ai/hum 0.1.63 → 0.1.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 +23 -30
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -9933,7 +9933,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
9933
9933
|
var HostPortal = 4;
|
|
9934
9934
|
var HostComponent = 5;
|
|
9935
9935
|
var HostText = 6;
|
|
9936
|
-
var
|
|
9936
|
+
var Fragment2 = 7;
|
|
9937
9937
|
var Mode = 8;
|
|
9938
9938
|
var ContextConsumer = 9;
|
|
9939
9939
|
var ContextProvider = 10;
|
|
@@ -10073,7 +10073,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
10073
10073
|
return "DehydratedFragment";
|
|
10074
10074
|
case ForwardRef:
|
|
10075
10075
|
return getWrappedName$1(type, type.render, "ForwardRef");
|
|
10076
|
-
case
|
|
10076
|
+
case Fragment2:
|
|
10077
10077
|
return "Fragment";
|
|
10078
10078
|
case HostComponent:
|
|
10079
10079
|
return type;
|
|
@@ -13207,7 +13207,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
13207
13207
|
}
|
|
13208
13208
|
}
|
|
13209
13209
|
function updateFragment2(returnFiber, current2, fragment, lanes, key) {
|
|
13210
|
-
if (current2 === null || current2.tag !==
|
|
13210
|
+
if (current2 === null || current2.tag !== Fragment2) {
|
|
13211
13211
|
var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
|
|
13212
13212
|
created.return = returnFiber;
|
|
13213
13213
|
return created;
|
|
@@ -13610,7 +13610,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
13610
13610
|
if (child.key === key) {
|
|
13611
13611
|
var elementType = element.type;
|
|
13612
13612
|
if (elementType === REACT_FRAGMENT_TYPE) {
|
|
13613
|
-
if (child.tag ===
|
|
13613
|
+
if (child.tag === Fragment2) {
|
|
13614
13614
|
deleteRemainingChildren(returnFiber, child.sibling);
|
|
13615
13615
|
var existing = useFiber(child, element.props.children);
|
|
13616
13616
|
existing.return = returnFiber;
|
|
@@ -19101,7 +19101,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
19101
19101
|
var _resolvedProps2 = workInProgress2.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
|
|
19102
19102
|
return updateForwardRef(current2, workInProgress2, type, _resolvedProps2, renderLanes2);
|
|
19103
19103
|
}
|
|
19104
|
-
case
|
|
19104
|
+
case Fragment2:
|
|
19105
19105
|
return updateFragment(current2, workInProgress2, renderLanes2);
|
|
19106
19106
|
case Mode:
|
|
19107
19107
|
return updateMode(current2, workInProgress2, renderLanes2);
|
|
@@ -19538,7 +19538,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
19538
19538
|
case SimpleMemoComponent:
|
|
19539
19539
|
case FunctionComponent:
|
|
19540
19540
|
case ForwardRef:
|
|
19541
|
-
case
|
|
19541
|
+
case Fragment2:
|
|
19542
19542
|
case Mode:
|
|
19543
19543
|
case Profiler:
|
|
19544
19544
|
case ContextConsumer:
|
|
@@ -24306,7 +24306,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
24306
24306
|
return fiber;
|
|
24307
24307
|
}
|
|
24308
24308
|
function createFiberFromFragment(elements, mode, lanes, key) {
|
|
24309
|
-
var fiber = createFiber(
|
|
24309
|
+
var fiber = createFiber(Fragment2, elements, key, mode);
|
|
24310
24310
|
fiber.lanes = lanes;
|
|
24311
24311
|
return fiber;
|
|
24312
24312
|
}
|
|
@@ -83589,7 +83589,7 @@ function runningVersion(candidates = engineCandidates(), opts = {}) {
|
|
|
83589
83589
|
}
|
|
83590
83590
|
return null;
|
|
83591
83591
|
}
|
|
83592
|
-
function startFailure(failures, { npm = /^(node|bun)(\.exe)?$/i.test(String(process.execPath).split(/[\\/]/).pop()), platform: platform2 = process.platform, version = true ? "0.1.
|
|
83592
|
+
function startFailure(failures, { npm = /^(node|bun)(\.exe)?$/i.test(String(process.execPath).split(/[\\/]/).pop()), platform: platform2 = process.platform, version = true ? "0.1.64" : "" } = {}) {
|
|
83593
83593
|
const refused = failures.find((f) => f.error && f.error.code !== "ENOENT");
|
|
83594
83594
|
const fix = npm ? npmFix(version) : updateCommand({ kind: "native" }, platform2);
|
|
83595
83595
|
if (!refused) {
|
|
@@ -85568,7 +85568,7 @@ var input_default = MultilineInput;
|
|
|
85568
85568
|
|
|
85569
85569
|
// src/app.jsx
|
|
85570
85570
|
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
|
85571
|
-
var MINE = true ? "0.1.
|
|
85571
|
+
var MINE = true ? "0.1.64" : "";
|
|
85572
85572
|
var fmtDur = (s) => s < 60 ? `${Math.max(1, Math.round(s))}s` : `${Math.floor(s / 60)}m ${Math.round(s % 60)}s`;
|
|
85573
85573
|
var plural = (n, w) => `${n} ${w}${n === 1 ? "" : "s"}`;
|
|
85574
85574
|
var firstResp = (e) => e.first_response_s ? ` \xB7 first response ${e.first_response_s.toFixed(1)}s` : "";
|
|
@@ -85676,6 +85676,15 @@ var REWIND_CHOICES = [
|
|
|
85676
85676
|
var ERR_TAIL_LINES = 5;
|
|
85677
85677
|
var THOUGHT_TAIL_LINES = 3;
|
|
85678
85678
|
var diagLine = (d) => `${d.file ? `${d.file}${d.line != null ? `:${d.line}` : ""}: ` : ""}${d.severity || "error"}: ${d.message || ""}`;
|
|
85679
|
+
var toolLine = (text) => {
|
|
85680
|
+
const s = String(text || "");
|
|
85681
|
+
const cut = s.indexOf(" ");
|
|
85682
|
+
if (cut <= 0) return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { bold: true, children: s });
|
|
85683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
85684
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { bold: true, children: s.slice(0, cut) }),
|
|
85685
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: s.slice(cut) })
|
|
85686
|
+
] });
|
|
85687
|
+
};
|
|
85679
85688
|
var tallyLine = (tally) => Object.entries(tally).map(([name, t]) => {
|
|
85680
85689
|
const short = name.includes("__") ? name.split("__")[1] : name;
|
|
85681
85690
|
const parts = [t.ok ? `${t.ok} ok` : null, t.failed ? `${t.failed} failed` : null, t.error ? `${t.error} error` : null].filter(Boolean);
|
|
@@ -85743,7 +85752,6 @@ function App2({ engine: engine2, task, resume, images = [], onUpdate: onUpdate2
|
|
|
85743
85752
|
const append = (item) => setItems((prev) => [...prev, { id: nextId.current++, ...item }]);
|
|
85744
85753
|
const steps = question ? question.questions && question.questions.length ? question.questions : [{ id: question.id, question: question.question, options: (question.options || []).map((o) => ({ label: o })), default: question.default }] : [];
|
|
85745
85754
|
const step = steps.length ? steps[Math.min(qStep, steps.length - 1)] : null;
|
|
85746
|
-
const harnessQ = !!question && question.kind === "delivery" && qStep === 0;
|
|
85747
85755
|
const stepOptions = step ? (step.options || []).map((o) => typeof o === "string" ? { label: o } : o) : [];
|
|
85748
85756
|
const stepLabels = stepOptions.map((o) => o.label);
|
|
85749
85757
|
const menu = value.trimStart().startsWith("/") && !value.includes(" ") ? COMMANDS.filter((c) => c.name.startsWith(value.trim())) : [];
|
|
@@ -86423,14 +86431,6 @@ function App2({ engine: engine2, task, resume, images = [], onUpdate: onUpdate2
|
|
|
86423
86431
|
answerStep("");
|
|
86424
86432
|
return;
|
|
86425
86433
|
}
|
|
86426
|
-
if (harnessQ && key.escape) {
|
|
86427
|
-
setQuestion(null);
|
|
86428
|
-
setQStep(0);
|
|
86429
|
-
setQAnswers({});
|
|
86430
|
-
setQPicks([]);
|
|
86431
|
-
setQCursor(0);
|
|
86432
|
-
return;
|
|
86433
|
-
}
|
|
86434
86434
|
return;
|
|
86435
86435
|
}
|
|
86436
86436
|
}
|
|
@@ -86686,17 +86686,10 @@ function App2({ engine: engine2, task, resume, images = [], onUpdate: onUpdate2
|
|
|
86686
86686
|
decide("reject", text);
|
|
86687
86687
|
return;
|
|
86688
86688
|
}
|
|
86689
|
-
if (question && step &&
|
|
86689
|
+
if (question && step && !/^\/(quit|exit|stop)\b/.test(text)) {
|
|
86690
86690
|
answerStep(text);
|
|
86691
86691
|
return;
|
|
86692
86692
|
}
|
|
86693
|
-
if (harnessQ) {
|
|
86694
|
-
setQuestion(null);
|
|
86695
|
-
setQStep(0);
|
|
86696
|
-
setQAnswers({});
|
|
86697
|
-
setQPicks([]);
|
|
86698
|
-
setQCursor(0);
|
|
86699
|
-
}
|
|
86700
86693
|
if (reflection) closeReflection(reflection.id, "dismiss");
|
|
86701
86694
|
if (text.startsWith("/")) {
|
|
86702
86695
|
runCommand(text);
|
|
@@ -86772,8 +86765,8 @@ function App2({ engine: engine2, task, resume, images = [], onUpdate: onUpdate2
|
|
|
86772
86765
|
" \xB7 ",
|
|
86773
86766
|
item.text
|
|
86774
86767
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { children: [
|
|
86775
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box_default, { width: 2, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: ACCENT, children: "\
|
|
86776
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, {
|
|
86768
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box_default, { width: 2, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: ACCENT, children: "\u25CB" }) }),
|
|
86769
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: toolLine(item.text) })
|
|
86777
86770
|
] })),
|
|
86778
86771
|
item.kind === "plan" && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, children: [
|
|
86779
86772
|
item.explanation ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: item.explanation }) : null,
|
|
@@ -86881,7 +86874,7 @@ function App2({ engine: engine2, task, resume, images = [], onUpdate: onUpdate2
|
|
|
86881
86874
|
] }),
|
|
86882
86875
|
thinking.length > 0 && // the thought as it streams: its newest lines, dim, so a long think is never a blank screen.
|
|
86883
86876
|
// It folds into one line under the reply the moment the reply starts
|
|
86884
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box_default, { flexDirection: "column", marginTop: 1, paddingLeft: 2, width, children: thinking.slice(-600).split("\n").filter((l) => l.trim()).slice(-Math.min(THOUGHT_TAIL_LINES, liveBudget)).map((l, i) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, wrap: "truncate-start", children: l }, i)) }),
|
|
86877
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box_default, { flexDirection: "column", marginTop: 1, paddingLeft: 2, width, children: thinking.slice(-600).split("\n").filter((l) => l.trim()).slice(-Math.min(THOUGHT_TAIL_LINES, liveBudget)).map((l, i) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, italic: true, wrap: "truncate-start", children: l }, i)) }),
|
|
86885
86878
|
(phase === "busy" || phase === "connecting") && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { marginTop: 1, children: [
|
|
86886
86879
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: ACCENT, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(build_default, { type: "dots" }) }),
|
|
86887
86880
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: spinnerLabel })
|
|
@@ -87248,7 +87241,7 @@ init_update();
|
|
|
87248
87241
|
init_install();
|
|
87249
87242
|
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
|
|
87250
87243
|
import { spawnSync as spawnSync5 } from "node:child_process";
|
|
87251
|
-
var MINE2 = true ? "0.1.
|
|
87244
|
+
var MINE2 = true ? "0.1.64" : "0.0.0";
|
|
87252
87245
|
var layout = installLayout();
|
|
87253
87246
|
function completeInstall() {
|
|
87254
87247
|
if (layout.kind !== "npm" || !needsInstall(MINE2)) return;
|