hum-cli 0.2.67__py3-none-any.whl → 0.2.68__py3-none-any.whl
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.
- hum/__init__.py +1 -1
- hum/core.py +2 -2
- hum/plain.py +8 -2
- hum/runtime/drivers.py +4 -0
- hum/runtime/tools.py +2 -1
- hum/sdk/session.py +9 -2
- hum/tui/cli.mjs +5 -5
- {hum_cli-0.2.67.dist-info → hum_cli-0.2.68.dist-info}/METADATA +1 -1
- {hum_cli-0.2.67.dist-info → hum_cli-0.2.68.dist-info}/RECORD +12 -12
- {hum_cli-0.2.67.dist-info → hum_cli-0.2.68.dist-info}/WHEEL +0 -0
- {hum_cli-0.2.67.dist-info → hum_cli-0.2.68.dist-info}/entry_points.txt +0 -0
- {hum_cli-0.2.67.dist-info → hum_cli-0.2.68.dist-info}/licenses/LICENSE +0 -0
hum/__init__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""Hum — an agent harness built as an RL environment that humans can drive."""
|
|
2
|
-
__version__ = "0.2.
|
|
2
|
+
__version__ = "0.2.68"
|
hum/core.py
CHANGED
|
@@ -132,7 +132,7 @@ Core → front-end (events); every event has "type"
|
|
|
132
132
|
human_edit {stat} compaction {prompt_tokens_before}
|
|
133
133
|
turn_end {turns, cost_usd, budget_usd, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens,
|
|
134
134
|
reasoning_tokens, by_model{model: {calls, …}}, exchange_cost_usd, exchange_input_tokens,
|
|
135
|
-
exchange_output_tokens, model_s, tool_s, team_cost_usd?, team_tasks?, elapsed_s, stop_reason,
|
|
135
|
+
exchange_output_tokens, model_s, tool_s, team_cost_usd?, team_tasks?, elapsed_s, stop_reason, follows,
|
|
136
136
|
first_response_s, ttft_s, tally{tool: {ok, failed, error, last}}, background}
|
|
137
137
|
background = calls still out past the exchange; their results open the next one
|
|
138
138
|
cost_usd and the token counts are SESSION totals (the exchange_* ones are
|
|
@@ -2667,7 +2667,7 @@ class Core:
|
|
|
2667
2667
|
compactions=self.runner.compactions, context_tokens=self.runner.last_prompt_tokens,
|
|
2668
2668
|
context_window=self.runner.cfg.context_window,
|
|
2669
2669
|
first_response_s=res.first_response_s, ttft_s=res.ttft_s, tally=dict(self.ui.tally),
|
|
2670
|
-
background=len(self.background))
|
|
2670
|
+
background=len(self.background), follows=self.human.holds_turn())
|
|
2671
2671
|
self.session.event("exchange", **end) # on the transcript, where a later surface reads it back
|
|
2672
2672
|
if self.streamer:
|
|
2673
2673
|
self.streamer.wake(flush=True) # the turn's lines, and the server commits them
|
hum/plain.py
CHANGED
|
@@ -285,13 +285,19 @@ class Plain:
|
|
|
285
285
|
was, self.busy = self.busy, True
|
|
286
286
|
ui.set_phase(str(ev.get("phase") or ""))
|
|
287
287
|
if not was:
|
|
288
|
+
if not self.over.is_set():
|
|
289
|
+
self.turn_end = None # a following exchange: the one before says nothing of how it ends
|
|
288
290
|
self.changed.set()
|
|
289
291
|
elif k == "idle":
|
|
290
292
|
self.busy = False
|
|
291
293
|
ui.thinking(False)
|
|
292
294
|
ui.idle()
|
|
293
|
-
|
|
294
|
-
|
|
295
|
+
end = self.turn_end or {}
|
|
296
|
+
if not (self.unattended and end.get("stop_reason") == "done"
|
|
297
|
+
and (end.get("background") or end.get("follows"))):
|
|
298
|
+
# a run with a call still out is not over: its result wakes the session and the next idle ends it.
|
|
299
|
+
# Nor is one with a result that arrived as the exchange ended: an exchange starts on it. A limit
|
|
300
|
+
# or a pause ends the run whatever is out
|
|
295
301
|
self.over.set()
|
|
296
302
|
self.changed.set()
|
|
297
303
|
elif k == "info":
|
hum/runtime/drivers.py
CHANGED
|
@@ -275,6 +275,10 @@ class HumanDriver:
|
|
|
275
275
|
except asyncio.QueueEmpty:
|
|
276
276
|
return None
|
|
277
277
|
|
|
278
|
+
def holds_turn(self) -> bool:
|
|
279
|
+
"""Whether a turn waits on the queue: as an exchange ends, one that goes on to read it."""
|
|
280
|
+
return any(a.turn is not None for a in self.steering._queue)
|
|
281
|
+
|
|
278
282
|
def post_question(self, q: dict[str, Any]) -> None:
|
|
279
283
|
"""A question for the client: it is handed over, and the ``asked`` event the caller wrote is
|
|
280
284
|
what keeps it open. Whether the loop waits for the answer is the caller's (``expect``)."""
|
hum/runtime/tools.py
CHANGED
|
@@ -2134,7 +2134,8 @@ class MCPToolset:
|
|
|
2134
2134
|
|
|
2135
2135
|
def heard(t: Task) -> None:
|
|
2136
2136
|
last["task"] = t
|
|
2137
|
-
|
|
2137
|
+
if not t.done: # an end is told by its result, which follows: told twice, the model answers the first
|
|
2138
|
+
say(status_line(t, name))
|
|
2138
2139
|
again = (f"Its result is not lost: a session opened again watches the task again, and a tool of "
|
|
2139
2140
|
f"{self.name}'s that reports a task by its id reads it now. Do not call {name} again for it: that "
|
|
2140
2141
|
f"starts the work a second time.")
|
hum/sdk/session.py
CHANGED
|
@@ -452,8 +452,15 @@ async def query(prompt: str, options: HumboldtOptions | None = None) -> AsyncIte
|
|
|
452
452
|
await s.open()
|
|
453
453
|
try:
|
|
454
454
|
s.send(prompt)
|
|
455
|
-
|
|
456
|
-
|
|
455
|
+
while True:
|
|
456
|
+
ended = s.last_exchange
|
|
457
|
+
async for msg in s.receive():
|
|
458
|
+
yield msg
|
|
459
|
+
e = s.last_exchange or {}
|
|
460
|
+
# as `hum run`: a call still out, or a result that arrived as the exchange ended, opens another
|
|
461
|
+
if (s.gone or s.last_exchange is ended or e.get("stop_reason") != "done"
|
|
462
|
+
or not (e.get("background") or e.get("follows"))):
|
|
463
|
+
break
|
|
457
464
|
if s.options.output_format and not s.gone:
|
|
458
465
|
await s.structured() # the answer as data, in one more exchange: on the Result
|
|
459
466
|
finally:
|
hum/tui/cli.mjs
CHANGED
|
@@ -89568,7 +89568,7 @@ var init_install = __esm({
|
|
|
89568
89568
|
"src/install.js"() {
|
|
89569
89569
|
init_define_HUM_CORE_SUBS();
|
|
89570
89570
|
win = process.platform === "win32";
|
|
89571
|
-
MINE = true ? "0.2.
|
|
89571
|
+
MINE = true ? "0.2.68" : "";
|
|
89572
89572
|
npmFix = (version = "") => `npm i -g @metaphi-ai/hum@${version || "latest"} --foreground-scripts`;
|
|
89573
89573
|
NPM_FIX = npmFix("latest");
|
|
89574
89574
|
humHome = (env3 = process.env) => env3.HUM_HOME || path.join(os3.homedir(), ".hum");
|
|
@@ -89923,10 +89923,10 @@ function clientEnv() {
|
|
|
89923
89923
|
platform: process.platform,
|
|
89924
89924
|
arch: process.arch,
|
|
89925
89925
|
terminal: process.env.TERM_PROGRAM || (process.env.WT_SESSION ? "Windows Terminal" : process.env.TERM || ""),
|
|
89926
|
-
tui: true ? "0.2.
|
|
89926
|
+
tui: true ? "0.2.68" : ""
|
|
89927
89927
|
};
|
|
89928
89928
|
}
|
|
89929
|
-
function startFailure(failures, { npm = /^(node|bun)(\.exe)?$/i.test(String(process.execPath).split(/[\\/]/).pop()), platform: platform2 = process.platform, version = true ? "0.2.
|
|
89929
|
+
function startFailure(failures, { npm = /^(node|bun)(\.exe)?$/i.test(String(process.execPath).split(/[\\/]/).pop()), platform: platform2 = process.platform, version = true ? "0.2.68" : "" } = {}) {
|
|
89930
89930
|
const refused = failures.find((f) => f.error && f.error.code !== "ENOENT");
|
|
89931
89931
|
const fix = npm ? npmFix(version) : updateCommand({ kind: "native" }, platform2);
|
|
89932
89932
|
if (!refused) {
|
|
@@ -91441,7 +91441,7 @@ var after = (ms, fn) => {
|
|
|
91441
91441
|
|
|
91442
91442
|
// src/app.jsx
|
|
91443
91443
|
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
|
91444
|
-
var MINE2 = true ? "0.2.
|
|
91444
|
+
var MINE2 = true ? "0.2.68" : "";
|
|
91445
91445
|
var fmtDur = (s) => s < 60 ? `${Math.max(1, Math.round(s))}s` : `${Math.floor(s / 60)}m ${Math.round(s % 60)}s`;
|
|
91446
91446
|
var plural = (n, w) => `${n} ${w}${n === 1 ? "" : "s"}`;
|
|
91447
91447
|
var shortSession = (name) => (name || "").replace(/\.jsonl$/, "");
|
|
@@ -94135,7 +94135,7 @@ async function sendPending({
|
|
|
94135
94135
|
await init_theme();
|
|
94136
94136
|
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
|
|
94137
94137
|
import { spawnSync as spawnSync6 } from "node:child_process";
|
|
94138
|
-
var MINE3 = true ? "0.2.
|
|
94138
|
+
var MINE3 = true ? "0.2.68" : "0.0.0";
|
|
94139
94139
|
var layout = installLayout();
|
|
94140
94140
|
function completeInstall() {
|
|
94141
94141
|
if (layout.kind !== "npm" || !needsInstall(MINE3)) return;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
hum/__init__.py,sha256=
|
|
1
|
+
hum/__init__.py,sha256=BdGuJ-lazerjHaCzV1CD3TaQHmjz0bvQzENrM9Y2B9k,104
|
|
2
2
|
hum/auth.py,sha256=OOdMbCsxdqJ3B_YnSnsJ-akc0wcLaCLeum8y6UgINRQ,18792
|
|
3
3
|
hum/catalog.py,sha256=6INNvyhwu69UZV80Ri9pGRc6H2eRzSsqkW08vSfMhAU,5290
|
|
4
4
|
hum/cli.py,sha256=ohp1ZGLPXlUl7CoYHZrfT846tvrwQnthxKxMvasl6cw,81379
|
|
5
5
|
hum/client.py,sha256=4gy8cjpitmYCG7kYvEPqGtNIFI0ZCYAA2AF1nLkweCQ,81452
|
|
6
|
-
hum/core.py,sha256=
|
|
6
|
+
hum/core.py,sha256=e6TGqhJzqpjUZH5PpfmttrQWoXg3XKCCd2yln-Toajs,170540
|
|
7
7
|
hum/errors.py,sha256=xnhAU0A-662IYa4kMI0zbtYfcpo24uRRAPY87BYLHs4,4858
|
|
8
8
|
hum/gitcred.py,sha256=vCynyn5ZewYJZa1vx73jQNy7KCdDjx_ppiIWegSH4wM,3698
|
|
9
9
|
hum/jsonui.py,sha256=5zlJn2n99qbz8xvGsfkhSI9Vkb0bBqzUz-vlBG6HD_8,5688
|
|
10
10
|
hum/listen.py,sha256=WIYWagJ8z3CVvqjHMyFIzPwSmjJsOyvBTb2EpyA5bz4,24145
|
|
11
|
-
hum/plain.py,sha256=
|
|
11
|
+
hum/plain.py,sha256=xF6TgkoZnZuoMRGYxqrvjAUskkt0JsUoJYaBwE_QNIY,34821
|
|
12
12
|
hum/registry.py,sha256=ec_kK6t7XGYhDFwKepf3jSTdkqL8IAzg4NejuLpu9rg,11625
|
|
13
13
|
hum/stream.py,sha256=_9p53X5_YAn2bo-qjpkIXsypuflQc0V3PKsDkUJlXV0,14010
|
|
14
14
|
hum/sync.py,sha256=nbafDxCZNiQxjwQsI2z4TJPEXJVKZUHo0QBuM77DcTk,10869
|
|
@@ -41,7 +41,7 @@ hum/runtime/constraints.py,sha256=9WW-Y6W4dNIcKDdtVfxbLBCNYBb4SR18jycOCpf5gPs,64
|
|
|
41
41
|
hum/runtime/decision.py,sha256=rUx1ibu5BfwmZkfyfOs1_9fRnOrVCZUk7zytLvarPpA,7876
|
|
42
42
|
hum/runtime/dm.py,sha256=79LUVsGa7Z-wgQumGbLRmQoAbnMgC9jBJz483OaZjHs,7929
|
|
43
43
|
hum/runtime/documents.py,sha256=zIHq3uNJfekF0PZcoQCCsaOZm3HXa8-ThQnQ_u-cpRM,13756
|
|
44
|
-
hum/runtime/drivers.py,sha256=
|
|
44
|
+
hum/runtime/drivers.py,sha256=ZOVsXfJ8SQyvgCUtNYQ19Mzc3nu42P17ZTux_VpeVSo,17685
|
|
45
45
|
hum/runtime/evals.py,sha256=KvOYsI7Qzz2hJTD1z1l42ynxyWifdJLNFlAIA84tk9c,8881
|
|
46
46
|
hum/runtime/executor.py,sha256=VOLe-AA0YB6cSaoGE2ThSpFOHE5_QdBIyysUQ-Mc0kU,14684
|
|
47
47
|
hum/runtime/gateway.py,sha256=AmO060cfJZJjkmNr0EOGKDCG3pbyX21wJ_-XqtBX6S4,10155
|
|
@@ -81,7 +81,7 @@ hum/runtime/skills.py,sha256=fLJTVPyxDohaYtiZ4y5-evB_nBWQUQ3PG_XXB4KJUMY,17606
|
|
|
81
81
|
hum/runtime/store.py,sha256=Jb0g8rrGSIZI6rUUF6atbGlWeMww6CpevP3S2DJY1T4,3713
|
|
82
82
|
hum/runtime/team.py,sha256=7muE9nYG0uSAvKaMptcnUas7W8an-IAwXJxP52plR3U,16319
|
|
83
83
|
hum/runtime/telemetry.py,sha256=L_R-CSxK8AmXCjiSLjxQrtfxK7Xnts9gp8SgcNLt5ME,17907
|
|
84
|
-
hum/runtime/tools.py,sha256=
|
|
84
|
+
hum/runtime/tools.py,sha256=tUQkbNXmY0pGgQcuCJq_lnWrnFZu0Z31iFl4PVeevE0,122648
|
|
85
85
|
hum/runtime/trajectory.py,sha256=VB9dgsFzmZf7MSoweB-uhGsQzN7SAr6DIpQXgZ3vDyU,7427
|
|
86
86
|
hum/runtime/trust.py,sha256=wpMKzY2KM3rxDcI9oN8ic7eSa3RW_E9_brK-aw5QNkU,8664
|
|
87
87
|
hum/runtime/uploads.py,sha256=Paqm5buViEk9Hc_zgxMOPRhKESpk2TA1EXd-4aEDIss,4482
|
|
@@ -95,7 +95,7 @@ hum/sdk/hooks.py,sha256=ZhWIuQ8pn7Kha1f4IuOpQu3TQRV4V7YV87xMGcEGmao,1882
|
|
|
95
95
|
hum/sdk/messages.py,sha256=9nXgvse5GOYM1L4SQ3A_KSorlg_gOSI5TPR654yLCPo,10945
|
|
96
96
|
hum/sdk/options.py,sha256=8f5cNi6Z7Hd3ZaudqvfkxpbdHGJ9mlP2IpY5LPPE6oU,12029
|
|
97
97
|
hum/sdk/remote.py,sha256=e__vwnu2Dm7oLOJc9_LtFnK9CFCi6-oXhHp9MIaD9Ko,8106
|
|
98
|
-
hum/sdk/session.py,sha256=
|
|
98
|
+
hum/sdk/session.py,sha256=pKve0efLxgEc5Bq0zwK_792hGVJPZ9HCy86D-m2owBY,27552
|
|
99
99
|
hum/sdk/tools.py,sha256=w4HA3AwMyHEumAVlS0n1rLC82NsaJGgzMp6ft9Q_fyg,4466
|
|
100
100
|
hum/skills/artifact-design/SKILL.md,sha256=Edg6mnjeg7ymG-E8sCwPfe2l4phX85vXgvtRQC2bzJw,7274
|
|
101
101
|
hum/skills/artifact-design/cases/harwell-deck.json,sha256=rKTcNLqPB7SrTjmqjoAsj6DBfkYMRhYUU51SYp0OMb4,1095
|
|
@@ -118,10 +118,10 @@ hum/skills/artifact-design/references/reports.md,sha256=5MSv7JGYJHobHXfgAclt_xsf
|
|
|
118
118
|
hum/skills/consult-human/SKILL.md,sha256=5rMKwC5C9L4nn-ifTjQGXl9hsYbeqOCHNl0IEog_T-E,6867
|
|
119
119
|
hum/skills/consult-human/references/examples.md,sha256=hAdTOiJHlv27dTraEyPz0BILqx_8gZj0FPO43b2OMvw,3490
|
|
120
120
|
hum/skills/consult-human/references/hypotheses.md,sha256=a3Hj3_zdxZZS7-bpxXGu2AEgaOV5Q31iVc2VHJ2yjxQ,3263
|
|
121
|
-
hum/tui/cli.mjs,sha256=
|
|
121
|
+
hum/tui/cli.mjs,sha256=My8NaPEbPl-Znik3OWVH4yqSu-yGqf0Kw3L-3ysNgW8,4220333
|
|
122
122
|
humboldt/__init__.py,sha256=EcK3Ou8qg9DLaYCtm5t2EcU-C8xZxP8yxfGBiQkuW-M,236
|
|
123
|
-
hum_cli-0.2.
|
|
124
|
-
hum_cli-0.2.
|
|
125
|
-
hum_cli-0.2.
|
|
126
|
-
hum_cli-0.2.
|
|
127
|
-
hum_cli-0.2.
|
|
123
|
+
hum_cli-0.2.68.dist-info/METADATA,sha256=27yWtZoNSjIPfPJ9PrCSRelRjxkl0F8A7qnKOC9-5gw,1684
|
|
124
|
+
hum_cli-0.2.68.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
125
|
+
hum_cli-0.2.68.dist-info/entry_points.txt,sha256=L-JBWR79zdIsMdTN5K_PSI4HeJ4kwmo1Bm5oc3lVi5A,104
|
|
126
|
+
hum_cli-0.2.68.dist-info/licenses/LICENSE,sha256=-_Jjy2-XAujWZirw6S-ORP1kLKeVuuG8piFwhYLtt8E,742
|
|
127
|
+
hum_cli-0.2.68.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|