humanish 0.39.0 → 0.40.0
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/README.md +5 -2
- package/dist/actor-contract.d.ts +24 -1
- package/dist/actor-contract.js +4 -0
- package/dist/actor-contract.js.map +1 -1
- package/dist/claude-agent-sdk.js +4 -0
- package/dist/claude-agent-sdk.js.map +1 -1
- package/dist/comms-sandbox-catch.d.ts +8 -1
- package/dist/comms-sandbox-catch.js +128 -1
- package/dist/comms-sandbox-catch.js.map +1 -1
- package/dist/computer-use-actor.d.ts +1 -1
- package/dist/computer-use.d.ts +13 -1
- package/dist/computer-use.js +100 -14
- package/dist/computer-use.js.map +1 -1
- package/dist/cua-actor-lab.js +87 -5
- package/dist/cua-actor-lab.js.map +1 -1
- package/dist/e2b-desktop-executor.d.ts +21 -6
- package/dist/e2b-desktop-executor.js +65 -21
- package/dist/e2b-desktop-executor.js.map +1 -1
- package/dist/lab-config.d.ts +36 -0
- package/dist/lab-config.js +87 -2
- package/dist/lab-config.js.map +1 -1
- package/dist/observer-data.js +5 -0
- package/dist/observer-data.js.map +1 -1
- package/dist/openai-responses-cu.js +10 -1
- package/dist/openai-responses-cu.js.map +1 -1
- package/dist/orientation.d.ts +29 -0
- package/dist/orientation.js +95 -0
- package/dist/orientation.js.map +1 -0
- package/dist/pi-agent-core.js +4 -0
- package/dist/pi-agent-core.js.map +1 -1
- package/dist/pricing.d.ts +8 -0
- package/dist/pricing.js +22 -6
- package/dist/pricing.js.map +1 -1
- package/dist/program.js +13 -0
- package/dist/program.js.map +1 -1
- package/dist/run.d.ts +1 -1
- package/dist/run.js +27 -1
- package/dist/run.js.map +1 -1
- package/dist/subject-runtime.d.ts +23 -0
- package/dist/subject-runtime.js +70 -0
- package/dist/subject-runtime.js.map +1 -0
- package/docs/contracts/schemas.md +1 -1
- package/docs/goals/current.md +2 -2
- package/docs/principles/three-roles.md +68 -0
- package/docs/ramp/README.md +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Does this serve pipeline need a Node runtime? Matches a bare command word at a token boundary, so
|
|
3
|
+
* `npm install` and `sudo -n npm ci` count while `my-npm-wrapper` or a path containing "node" does
|
|
4
|
+
* not. Being wrong in the permissive direction only costs a skipped bootstrap probe; being wrong in
|
|
5
|
+
* the strict direction costs a paid sandbox and a cryptic exit 127.
|
|
6
|
+
*/
|
|
7
|
+
export declare function needsNodeRuntime(commands: readonly (string | undefined)[]): boolean;
|
|
8
|
+
/** Major Node version installed when the template has none. Matches the terminal lane's choice. */
|
|
9
|
+
export declare const BOOTSTRAP_NODE_MAJOR = 22;
|
|
10
|
+
/**
|
|
11
|
+
* The bootstrap command. Idempotent and cheap when Node is already present: it probes first and
|
|
12
|
+
* exits 0 without touching apt, so a custom template that ships its own runtime is untouched.
|
|
13
|
+
*
|
|
14
|
+
* `sudo -n` (non-interactive) matches the terminal lane — the desktop user has passwordless sudo,
|
|
15
|
+
* and failing fast is better than hanging on a password prompt nobody can answer.
|
|
16
|
+
*/
|
|
17
|
+
export declare function nodeBootstrapCommand(major?: number): string;
|
|
18
|
+
/**
|
|
19
|
+
* Package managers that need their own install step after Node exists. npm and npx arrive with
|
|
20
|
+
* Node; pnpm, yarn and bun do not, and `corepack enable` is the supported way to get the first two
|
|
21
|
+
* without a second network fetch.
|
|
22
|
+
*/
|
|
23
|
+
export declare function corepackCommandFor(commands: readonly (string | undefined)[]): string | undefined;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// Provide the runtime a subject's serve pipeline needs, instead of failing at exit 127 (#371).
|
|
2
|
+
//
|
|
3
|
+
// The stock E2B `desktop` template ships python3 and curl but NO Node. That fact has now been
|
|
4
|
+
// rediscovered three times: the in-sandbox comms catch was rewritten from node to python3 in 0.29.0
|
|
5
|
+
// for exactly this reason, the terminal lane bootstraps Node explicitly, and the computer-use
|
|
6
|
+
// clone/local-tree route did neither — so any lab whose `serve.install` runs npm or pnpm died with
|
|
7
|
+
// `pnpm: command not found` AFTER a sandbox had been created and paid for.
|
|
8
|
+
//
|
|
9
|
+
// It failed invisibly up front: `lab inspect` was clean, the plan printed normally, the sandbox
|
|
10
|
+
// provisioned, and the first signal was a shell exit code attributed to "subject install failed".
|
|
11
|
+
// Nobody can debug that from the outside.
|
|
12
|
+
//
|
|
13
|
+
// The posture here is PROVIDE, not warn. An adopter writing a lab for a Node app should not have to
|
|
14
|
+
// know which binaries the template happens to carry — that is the harness's job, and the terminal
|
|
15
|
+
// lane already treats it that way. Detection is conservative and the bootstrap is skipped whenever
|
|
16
|
+
// a runtime is already present, so a custom template that ships Node pays nothing.
|
|
17
|
+
/** Package managers and runtimes whose absence on the stock template breaks a serve pipeline. */
|
|
18
|
+
const NODE_COMMANDS = ["npm", "npx", "pnpm", "yarn", "bun", "node", "vite", "next", "tsx"];
|
|
19
|
+
/**
|
|
20
|
+
* Does this serve pipeline need a Node runtime? Matches a bare command word at a token boundary, so
|
|
21
|
+
* `npm install` and `sudo -n npm ci` count while `my-npm-wrapper` or a path containing "node" does
|
|
22
|
+
* not. Being wrong in the permissive direction only costs a skipped bootstrap probe; being wrong in
|
|
23
|
+
* the strict direction costs a paid sandbox and a cryptic exit 127.
|
|
24
|
+
*/
|
|
25
|
+
export function needsNodeRuntime(commands) {
|
|
26
|
+
const pattern = new RegExp(`(^|[\\s;&|(])(${NODE_COMMANDS.join("|")})([\\s;&|)]|$)`);
|
|
27
|
+
return commands.some((command) => (command ? pattern.test(command) : false));
|
|
28
|
+
}
|
|
29
|
+
/** Major Node version installed when the template has none. Matches the terminal lane's choice. */
|
|
30
|
+
export const BOOTSTRAP_NODE_MAJOR = 22;
|
|
31
|
+
/**
|
|
32
|
+
* The bootstrap command. Idempotent and cheap when Node is already present: it probes first and
|
|
33
|
+
* exits 0 without touching apt, so a custom template that ships its own runtime is untouched.
|
|
34
|
+
*
|
|
35
|
+
* `sudo -n` (non-interactive) matches the terminal lane — the desktop user has passwordless sudo,
|
|
36
|
+
* and failing fast is better than hanging on a password prompt nobody can answer.
|
|
37
|
+
*/
|
|
38
|
+
export function nodeBootstrapCommand(major = BOOTSTRAP_NODE_MAJOR) {
|
|
39
|
+
return [
|
|
40
|
+
"if command -v node >/dev/null 2>&1 && command -v npm >/dev/null 2>&1; then",
|
|
41
|
+
' echo "humanish: node $(node --version) already present; skipping bootstrap";',
|
|
42
|
+
"else",
|
|
43
|
+
` curl -fsSL https://deb.nodesource.com/setup_${major}.x | sudo -n -E bash - &&`,
|
|
44
|
+
" sudo -n apt-get install -y nodejs;",
|
|
45
|
+
"fi"
|
|
46
|
+
].join("\n");
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Package managers that need their own install step after Node exists. npm and npx arrive with
|
|
50
|
+
* Node; pnpm, yarn and bun do not, and `corepack enable` is the supported way to get the first two
|
|
51
|
+
* without a second network fetch.
|
|
52
|
+
*/
|
|
53
|
+
export function corepackCommandFor(commands) {
|
|
54
|
+
const joined = commands.filter((c) => Boolean(c)).join("\n");
|
|
55
|
+
const wantsPnpm = /(^|[\s;&|(])pnpm([\s;&|)]|$)/.test(joined);
|
|
56
|
+
const wantsYarn = /(^|[\s;&|(])yarn([\s;&|)]|$)/.test(joined);
|
|
57
|
+
if (!wantsPnpm && !wantsYarn)
|
|
58
|
+
return undefined;
|
|
59
|
+
// Probe first for the same reason as above: a template that already has it pays nothing.
|
|
60
|
+
const binary = wantsPnpm ? "pnpm" : "yarn";
|
|
61
|
+
return [
|
|
62
|
+
`if command -v ${binary} >/dev/null 2>&1; then`,
|
|
63
|
+
` echo "humanish: ${binary} already present; skipping corepack";`,
|
|
64
|
+
"else",
|
|
65
|
+
" sudo -n corepack enable >/dev/null 2>&1 || true;",
|
|
66
|
+
` corepack prepare ${binary}@latest --activate 2>/dev/null || sudo -n npm install -g ${binary};`,
|
|
67
|
+
"fi"
|
|
68
|
+
].join("\n");
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=subject-runt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AAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1E,MAAM,SAAS,GAAG,8BAA8B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAG,8BAA8B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9D,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS;QAAE,OAAO,SAAS,CAAC;IAC/C,yFAAyF;IACzF,MAAM,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IAC3C,OAAO;QACL,iBAAiB,MAAM,wBAAwB;QAC/C,qBAAqB,MAAM,uCAAuC;QAClE,MAAM;QACN,oDAAoD;QACpD,sBAAsB,MAAM,4DAA4D,MAAM,GAAG;QACjG,IAAI;KACL,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Date: 2026-06-02 (current-state note updated 2026-07-14)
|
|
4
4
|
|
|
5
5
|
Status: reference map for the major contracts shipped through source version
|
|
6
|
-
`0.
|
|
6
|
+
`0.40.0`; it is not an exhaustive inventory of command/result envelopes. Exported types,
|
|
7
7
|
schema constants, parsers, and validators in `src/` are authoritative. Rows
|
|
8
8
|
marked "reserved" name layering intent only — no code emits or validates them
|
|
9
9
|
yet. Do not emit a reserved schema.
|
package/docs/goals/current.md
CHANGED
|
@@ -16,7 +16,7 @@ Humanish should be the open-source CLI that lets a maintainer ask:
|
|
|
16
16
|
The answer should be observable, verifiable, public-safe, and easy to turn into
|
|
17
17
|
actionable feedback.
|
|
18
18
|
|
|
19
|
-
## Current Program Truth (source `0.
|
|
19
|
+
## Current Program Truth (source `0.40.0`)
|
|
20
20
|
|
|
21
21
|
The package source and repository implementation in this tree agree on these
|
|
22
22
|
points:
|
|
@@ -33,7 +33,7 @@ The immutable 2026-06-10 proof-roadmap packet is paired with a
|
|
|
33
33
|
| Public proof | A legible four-persona Observer hero from a verified real public-application study (commit-pinned drawDB) shipped in the npm payload (`0.16.0`) | Coverage beyond a single studied subject; the stratified breadth panel remains unbuilt |
|
|
34
34
|
| OSS meta-lab | Dry-run contract and separate disposable smoke harness | Live meta-lab execution; disabled until repository instructions and actor credentials have an isolated boundary |
|
|
35
35
|
| Observer serving | `watch`/`observe` loopback servers plus `serve` — the run-library surface with loopback default, capability-link exposure, `share_ready`-gated open mode, and optional operator-run tunnel; streams never served remotely | A remote live-stream (`--live-streams`) design; a persistent capability-link store; a control plane that can start runs |
|
|
36
|
-
| Off-app comms | Vendor-neutral in-sandbox email/SMS catch, a minimal persona inbox surface, and digest-only `humanish.comms-thread.v1` evidence; wired into the computer-use and shared-world routes and live-proven on
|
|
36
|
+
| Off-app comms | Vendor-neutral in-sandbox email/SMS catch, a minimal persona inbox surface, and digest-only `humanish.comms-thread.v1` evidence; wired into the computer-use and shared-world routes over both HTTP and SMTP; live-proven end to end on 2026-08-08 — a persona signed up for a public app, read the emailed link in its inbox, and reached the signed-in product (`docs/goals/email-gated-signup/receipts/signup-verify-live-2026-08-08.md`) | An adopter-hosted / app-url ingress plane; real-provider delivery |
|
|
37
37
|
|
|
38
38
|
Capability proof and adopter replacement are different gates. A deterministic
|
|
39
39
|
test or kept live receipt proves that a Humanish mechanism works. The depth-axis
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Three roles: researcher, stakeholder, participant
|
|
2
|
+
|
|
3
|
+
Humanish runs user research. Every design decision should be checked against the
|
|
4
|
+
three people a study actually involves, because they want different things and
|
|
5
|
+
conflating any two of them produces a specific, recurring class of bug.
|
|
6
|
+
|
|
7
|
+
## The roles
|
|
8
|
+
|
|
9
|
+
**The researcher** designs the study and runs it. In humanish this is usually an
|
|
10
|
+
agent invoking the CLI, not a person clicking. A researcher wants a protocol they
|
|
11
|
+
can express and defend: tasks with success criteria, a panel with declared
|
|
12
|
+
coverage, a pilot before the panel spends, and structured per-task outcomes back.
|
|
13
|
+
They care about rigor and control, and they need output they can reason over and
|
|
14
|
+
adjust.
|
|
15
|
+
|
|
16
|
+
**The stakeholder** watches. In a real study they sit behind the glass in the
|
|
17
|
+
viewing room; here they open Observer, `watch`, or `serve`. They want none of the
|
|
18
|
+
protocol. They want to know what happened, where people got stuck, how bad it is,
|
|
19
|
+
and whether anyone succeeded — moments, severity, and the denominator.
|
|
20
|
+
|
|
21
|
+
**The participant** is the persona. They have a goal, limited patience, and their
|
|
22
|
+
own idea of how the product works. They are the subject of the study, never its
|
|
23
|
+
instrument.
|
|
24
|
+
|
|
25
|
+
## Why the distinction earns its place
|
|
26
|
+
|
|
27
|
+
Two of humanish's worst bugs were category errors between these roles, not
|
|
28
|
+
missing features.
|
|
29
|
+
|
|
30
|
+
**Fusing the participant into the harness** made abandonment look like a
|
|
31
|
+
malfunction. `gave_up` mapped to a `failed` status, so a persona giving up — the
|
|
32
|
+
single most valuable thing a usability study produces — dragged the run verdict
|
|
33
|
+
red as though the instrument had broken. A participant abandoning a task is a
|
|
34
|
+
finding. The harness only fails when the harness fails.
|
|
35
|
+
|
|
36
|
+
**Fusing the researcher's question with the stakeholder's** put one pass/fail
|
|
37
|
+
verdict on a bundle that answers two different questions. "Is this evidence
|
|
38
|
+
trustworthy?" is genuinely pass/fail: did the harness do what it claimed, with a
|
|
39
|
+
real sandbox, real actions, and cost lines nobody forged. "What did we learn?" has
|
|
40
|
+
no pass/fail at all — asking whether a study passed is a category error. Because
|
|
41
|
+
there was one slot, a session that stopped early had to be called `passed`, and a
|
|
42
|
+
truncated study was reported as a green one.
|
|
43
|
+
|
|
44
|
+
## Checks worth applying
|
|
45
|
+
|
|
46
|
+
When adding a surface, a default, or a verdict, ask:
|
|
47
|
+
|
|
48
|
+
- **Which role is this for?** A knob that serves the researcher does not belong in
|
|
49
|
+
the stakeholder's view, and a highlight reel is not evidence.
|
|
50
|
+
- **Is this a participant outcome or a harness outcome?** Abandonment, confusion,
|
|
51
|
+
and running out of session are things that happened to a participant. Only a
|
|
52
|
+
broken sandbox, a forged artifact, or an unreachable service is a harness
|
|
53
|
+
failure.
|
|
54
|
+
- **Does the number travel with its denominator?** A stakeholder behind glass
|
|
55
|
+
forms conclusions from vivid moments; that is the classic failure of the viewing
|
|
56
|
+
room, and it is why researchers synthesize rather than letting the room decide.
|
|
57
|
+
Anything shown to a stakeholder carries its count and its confidence, or it
|
|
58
|
+
becomes a machine for manufacturing certainty from n=1.
|
|
59
|
+
- **Would a researcher recognize this as a study?** Budgets are recruiting
|
|
60
|
+
decisions made once, up front — how many participants can we afford. No
|
|
61
|
+
researcher has ever ended a session because it got expensive.
|
|
62
|
+
|
|
63
|
+
## Related
|
|
64
|
+
|
|
65
|
+
- [invariants-and-defaults.md](invariants-and-defaults.md) — fail-closed rules and
|
|
66
|
+
what defaults are allowed to assume
|
|
67
|
+
- [actor-fidelity.md](actor-fidelity.md) — what a claim about persona realism can
|
|
68
|
+
and cannot mean
|
package/docs/ramp/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Status: public-safe contributor and agent ramp.
|
|
4
4
|
|
|
5
|
-
Package/source version in this tree: `0.
|
|
5
|
+
Package/source version in this tree: `0.40.0` (2026-08-08). The containment boundary introduced in
|
|
6
6
|
`0.15.1` remains in force: managed run and output paths bind to validated
|
|
7
7
|
physical filesystem identities, and stored provider IDs are evidence, not
|
|
8
8
|
cleanup authority. The bundled OSS meta-lab is dry-run only until
|
package/package.json
CHANGED