humanish 0.0.1 → 0.15.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/AGENTS.md +77 -0
- package/CONTRIBUTING.md +39 -0
- package/LICENSE +21 -0
- package/README.md +435 -8
- package/SECURITY.md +34 -0
- package/dist/actor-contract.d.ts +107 -0
- package/dist/actor-contract.js +286 -0
- package/dist/actor-contract.js.map +1 -0
- package/dist/actor-registry.d.ts +73 -0
- package/dist/actor-registry.js +93 -0
- package/dist/actor-registry.js.map +1 -0
- package/dist/adapter-extension.d.ts +54 -0
- package/dist/adapter-extension.js +214 -0
- package/dist/adapter-extension.js.map +1 -0
- package/dist/argv.d.ts +1 -0
- package/dist/argv.js +8 -0
- package/dist/argv.js.map +1 -0
- package/dist/artifact-reference.d.ts +22 -0
- package/dist/artifact-reference.js +47 -0
- package/dist/artifact-reference.js.map +1 -0
- package/dist/browser-evidence-hygiene.d.ts +7 -0
- package/dist/browser-evidence-hygiene.js +40 -0
- package/dist/browser-evidence-hygiene.js.map +1 -0
- package/dist/claude-agent-sdk.d.ts +94 -0
- package/dist/claude-agent-sdk.js +356 -0
- package/dist/claude-agent-sdk.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +5 -0
- package/dist/cli.js.map +1 -0
- package/dist/codex-app-server-ui.d.ts +39 -0
- package/dist/codex-app-server-ui.js +327 -0
- package/dist/codex-app-server-ui.js.map +1 -0
- package/dist/codex-app-server.d.ts +141 -0
- package/dist/codex-app-server.js +747 -0
- package/dist/codex-app-server.js.map +1 -0
- package/dist/command-failure.d.ts +29 -0
- package/dist/command-failure.js +54 -0
- package/dist/command-failure.js.map +1 -0
- package/dist/computer-use-actor.d.ts +52 -0
- package/dist/computer-use-actor.js +48 -0
- package/dist/computer-use-actor.js.map +1 -0
- package/dist/computer-use.d.ts +232 -0
- package/dist/computer-use.js +615 -0
- package/dist/computer-use.js.map +1 -0
- package/dist/concurrency.d.ts +1 -0
- package/dist/concurrency.js +27 -0
- package/dist/concurrency.js.map +1 -0
- package/dist/concurrent-shared-world-lab.d.ts +115 -0
- package/dist/concurrent-shared-world-lab.js +1092 -0
- package/dist/concurrent-shared-world-lab.js.map +1 -0
- package/dist/core/git-state.d.ts +31 -0
- package/dist/core/git-state.js +142 -0
- package/dist/core/git-state.js.map +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.js +3 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/run-primitives.d.ts +66 -0
- package/dist/core/run-primitives.js +120 -0
- package/dist/core/run-primitives.js.map +1 -0
- package/dist/cua-actor-lab.d.ts +620 -0
- package/dist/cua-actor-lab.js +2834 -0
- package/dist/cua-actor-lab.js.map +1 -0
- package/dist/device-presets.d.ts +67 -0
- package/dist/device-presets.js +50 -0
- package/dist/device-presets.js.map +1 -0
- package/dist/e2b-desktop-executor.d.ts +101 -0
- package/dist/e2b-desktop-executor.js +309 -0
- package/dist/e2b-desktop-executor.js.map +1 -0
- package/dist/e2b-desktop-launch.d.ts +144 -0
- package/dist/e2b-desktop-launch.js +59 -0
- package/dist/e2b-desktop-launch.js.map +1 -0
- package/dist/e2b-detached.d.ts +53 -0
- package/dist/e2b-detached.js +130 -0
- package/dist/e2b-detached.js.map +1 -0
- package/dist/e2b-terminal-lab.d.ts +345 -0
- package/dist/e2b-terminal-lab.js +1467 -0
- package/dist/e2b-terminal-lab.js.map +1 -0
- package/dist/env-file.d.ts +14 -0
- package/dist/env-file.js +108 -0
- package/dist/env-file.js.map +1 -0
- package/dist/feedback.d.ts +51 -0
- package/dist/feedback.js +313 -0
- package/dist/feedback.js.map +1 -0
- package/dist/image-evidence.d.ts +2 -0
- package/dist/image-evidence.js +33 -0
- package/dist/image-evidence.js.map +1 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/init-templates.d.ts +12 -0
- package/dist/init-templates.js +369 -0
- package/dist/init-templates.js.map +1 -0
- package/dist/init.d.ts +26 -0
- package/dist/init.js +343 -0
- package/dist/init.js.map +1 -0
- package/dist/lab-app-runner.d.ts +78 -0
- package/dist/lab-app-runner.js +403 -0
- package/dist/lab-app-runner.js.map +1 -0
- package/dist/lab-config.d.ts +578 -0
- package/dist/lab-config.js +1751 -0
- package/dist/lab-config.js.map +1 -0
- package/dist/lab-engine.d.ts +77 -0
- package/dist/lab-engine.js +216 -0
- package/dist/lab-engine.js.map +1 -0
- package/dist/lab-preflight.d.ts +67 -0
- package/dist/lab-preflight.js +385 -0
- package/dist/lab-preflight.js.map +1 -0
- package/dist/labs.d.ts +53 -0
- package/dist/labs.js +176 -0
- package/dist/labs.js.map +1 -0
- package/dist/observer-assets.d.ts +2 -0
- package/dist/observer-assets.js +2630 -0
- package/dist/observer-assets.js.map +1 -0
- package/dist/observer-data.d.ts +63 -0
- package/dist/observer-data.js +145 -0
- package/dist/observer-data.js.map +1 -0
- package/dist/observer-static.d.ts +39 -0
- package/dist/observer-static.js +192 -0
- package/dist/observer-static.js.map +1 -0
- package/dist/observer.d.ts +46 -0
- package/dist/observer.js +353 -0
- package/dist/observer.js.map +1 -0
- package/dist/openai-responses-cu.d.ts +113 -0
- package/dist/openai-responses-cu.js +531 -0
- package/dist/openai-responses-cu.js.map +1 -0
- package/dist/oss-lab.d.ts +52 -0
- package/dist/oss-lab.js +299 -0
- package/dist/oss-lab.js.map +1 -0
- package/dist/oss-meta-lab-scoring.d.ts +15 -0
- package/dist/oss-meta-lab-scoring.js +145 -0
- package/dist/oss-meta-lab-scoring.js.map +1 -0
- package/dist/oss-meta-lab.d.ts +279 -0
- package/dist/oss-meta-lab.js +4889 -0
- package/dist/oss-meta-lab.js.map +1 -0
- package/dist/oss-remote-telemetry.d.ts +77 -0
- package/dist/oss-remote-telemetry.js +403 -0
- package/dist/oss-remote-telemetry.js.map +1 -0
- package/dist/persona.d.ts +35 -0
- package/dist/persona.js +133 -0
- package/dist/persona.js.map +1 -0
- package/dist/pi-agent-core.d.ts +77 -0
- package/dist/pi-agent-core.js +203 -0
- package/dist/pi-agent-core.js.map +1 -0
- package/dist/program.d.ts +54 -0
- package/dist/program.js +2347 -0
- package/dist/program.js.map +1 -0
- package/dist/redaction.d.ts +90 -0
- package/dist/redaction.js +292 -0
- package/dist/redaction.js.map +1 -0
- package/dist/run.d.ts +784 -0
- package/dist/run.js +4555 -0
- package/dist/run.js.map +1 -0
- package/dist/scripted-browser-actor.d.ts +294 -0
- package/dist/scripted-browser-actor.js +1286 -0
- package/dist/scripted-browser-actor.js.map +1 -0
- package/dist/scripted-browser-lab.d.ts +107 -0
- package/dist/scripted-browser-lab.js +738 -0
- package/dist/scripted-browser-lab.js.map +1 -0
- package/dist/shared-world-lab.d.ts +208 -0
- package/dist/shared-world-lab.js +1048 -0
- package/dist/shared-world-lab.js.map +1 -0
- package/dist/source-archive.d.ts +82 -0
- package/dist/source-archive.js +365 -0
- package/dist/source-archive.js.map +1 -0
- package/dist/stop-conditions.d.ts +26 -0
- package/dist/stop-conditions.js +66 -0
- package/dist/stop-conditions.js.map +1 -0
- package/dist/terminal-agent-actor.d.ts +36 -0
- package/dist/terminal-agent-actor.js +23 -0
- package/dist/terminal-agent-actor.js.map +1 -0
- package/docs/architecture/actor-contract.md +431 -0
- package/docs/architecture/github-feedback-loop.md +189 -0
- package/docs/architecture/local-codex-tui-actor.md +213 -0
- package/docs/architecture/observer.md +118 -0
- package/docs/architecture/oss-lab-poc.md +242 -0
- package/docs/architecture/project-layout.md +166 -0
- package/docs/architecture/state-driven-executor.md +203 -0
- package/docs/architecture/terminal-product-lane.md +148 -0
- package/docs/contracts/adapter-fixtures.md +80 -0
- package/docs/contracts/core.md +71 -0
- package/docs/contracts/feedback.md +145 -0
- package/docs/contracts/policy.md +305 -0
- package/docs/contracts/run-bundle.md +358 -0
- package/docs/contracts/schemas.md +984 -0
- package/docs/goals/current.md +409 -0
- package/docs/principles/invariants-and-defaults.md +135 -0
- package/docs/principles/self-driving-harness.md +129 -0
- package/docs/product/open-source-install-experience.md +229 -0
- package/docs/ramp/README.md +200 -0
- package/docs/release/open-source-readiness.md +208 -0
- package/docs/release/public-readiness-standard.md +205 -0
- package/docs/roadmap/world-class-open-source-v0.md +311 -0
- package/package.json +102 -8
- package/skills/humanish/SKILL.md +244 -0
- package/skills/humanish/agents/openai.yaml +7 -0
- package/index.js +0 -1
package/AGENTS.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
Agent instructions for `humanish`.
|
|
4
|
+
|
|
5
|
+
## Public Boundary
|
|
6
|
+
|
|
7
|
+
Assume this repository is public.
|
|
8
|
+
|
|
9
|
+
Hard rule: never commit, paste, preserve, or generate PII, PHI, secrets, keys,
|
|
10
|
+
tokens, raw private transcripts, private screenshots, private customer data,
|
|
11
|
+
private patient data, or private source snippets.
|
|
12
|
+
|
|
13
|
+
- Use synthetic personas, synthetic emails, synthetic screenshots, and redacted
|
|
14
|
+
proof examples only.
|
|
15
|
+
- Do not copy `.env*`, credential files, hosted logs with identifiers, or
|
|
16
|
+
artifact bundles that may contain sensitive user data.
|
|
17
|
+
- Do not let private upstream context leak into docs, examples, issue
|
|
18
|
+
bodies, fixtures, tests, Observer screenshots, or generated run bundles.
|
|
19
|
+
- If an artifact might contain PII, PHI, credentials, or private operational
|
|
20
|
+
context, summarize the shape and keep the raw artifact outside this repo.
|
|
21
|
+
- Public usefulness beats private convenience. When in doubt, redact,
|
|
22
|
+
synthesize, or stop and ask.
|
|
23
|
+
|
|
24
|
+
## Mission
|
|
25
|
+
|
|
26
|
+
- Build a reusable CLI and harness standard for persona simulation.
|
|
27
|
+
- Keep reusable substrate in core code and product truth in adapters.
|
|
28
|
+
- Make product feedback loops cheap: run manifests, scenario profiles, actor
|
|
29
|
+
traces, Observer views, review packets, and proof artifacts.
|
|
30
|
+
- Treat run bundles as the source of truth and Observer as the projection.
|
|
31
|
+
|
|
32
|
+
## Architecture Principles
|
|
33
|
+
|
|
34
|
+
- Adapter-first, not config sprawl: product-specific apps, ports, env
|
|
35
|
+
allowlists, routes, scenarios, milestones, and review vocabulary belong in
|
|
36
|
+
adapters.
|
|
37
|
+
- Core owns generic primitives: manifests, artifact layout, source packaging,
|
|
38
|
+
actor orchestration, lifecycle events, Observer rendering, run review, and
|
|
39
|
+
history indexing.
|
|
40
|
+
- CLI JSON envelopes must be truthful. Unsupported capabilities fail closed
|
|
41
|
+
with structured errors.
|
|
42
|
+
- Proof artifacts are API surface. Treat paths, schemas, and review packets as
|
|
43
|
+
durable contracts.
|
|
44
|
+
- Prefer fixtures and contract tests over prose claims.
|
|
45
|
+
|
|
46
|
+
## Development Rules
|
|
47
|
+
|
|
48
|
+
- Keep `main` clean. Use scoped branches or worktrees for feature work.
|
|
49
|
+
- Make small commits with explicit scope.
|
|
50
|
+
- When the repository owner explicitly grants autonomous shipping authority for
|
|
51
|
+
a Humanish goal, do not stop at a PR handoff. Push the branch, open the PR,
|
|
52
|
+
watch checks/reviews, address failures, merge when green, fast-forward main,
|
|
53
|
+
and clean up the worktree/branch trail.
|
|
54
|
+
- Before substantial work, read [`docs/ramp/README.md`](docs/ramp/README.md)
|
|
55
|
+
and [`docs/goals/current.md`](docs/goals/current.md).
|
|
56
|
+
- Do not commit generated proof artifacts, local env files, E2B/runtime caches,
|
|
57
|
+
`.npmrc`, packed tarballs, or provider credentials.
|
|
58
|
+
- Before extracting from any source project, classify the code as core, CLI
|
|
59
|
+
shell, Observer, adapter contract, or example adapter.
|
|
60
|
+
- Before publishing, run the release gates in
|
|
61
|
+
[`docs/release/open-source-readiness.md`](docs/release/open-source-readiness.md).
|
|
62
|
+
|
|
63
|
+
## Acceptance Bar
|
|
64
|
+
|
|
65
|
+
- A change is not done until it has command-level proof.
|
|
66
|
+
- Harness changes need tests or fixture artifacts that prove the contract.
|
|
67
|
+
- Adapter changes need at least one safe dry-run path and one realistic path
|
|
68
|
+
where credentials allow it.
|
|
69
|
+
- Any "live-proven" claim in a PR body must cite a kept receipt — a
|
|
70
|
+
`docs/goals/<goal>/receipts/` entry or a retained run id. Narrative alone is
|
|
71
|
+
not proof.
|
|
72
|
+
- Provider-API test fixtures must derive from captured live wire shapes, never
|
|
73
|
+
hand-authored from memory. A fixture written from memory can encode the same
|
|
74
|
+
wrong field name as the code and pass in lockstep — that is how the 0.6.1
|
|
75
|
+
parser bug shipped with green tests.
|
|
76
|
+
- End substantial work with what changed, what was checked, and what remains
|
|
77
|
+
uncertain.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for helping make Humanish better.
|
|
4
|
+
|
|
5
|
+
## Ground Rules
|
|
6
|
+
|
|
7
|
+
- Keep examples synthetic and public-safe.
|
|
8
|
+
- Do not commit `.env*`, `.npmrc`, `.humanish/`, generated run bundles, provider
|
|
9
|
+
credentials, private screenshots, raw transcripts, or customer data.
|
|
10
|
+
- Prefer small PRs with explicit proof commands.
|
|
11
|
+
- Keep product-specific route names, milestones, and vocabulary in adapters.
|
|
12
|
+
- If a change touches credentials, provider spend, hosted execution, or GitHub
|
|
13
|
+
mutation, document the stop conditions and use dry-run proof first.
|
|
14
|
+
|
|
15
|
+
## Local Setup
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pnpm install
|
|
19
|
+
pnpm check
|
|
20
|
+
pnpm public-surface:scan
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Useful Commands
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pnpm humanish -- --help
|
|
27
|
+
pnpm humanish -- watch --json --no-open
|
|
28
|
+
pnpm humanish -- verify --run latest --json
|
|
29
|
+
pnpm pack:dry-run
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Pull Requests
|
|
33
|
+
|
|
34
|
+
PRs should include:
|
|
35
|
+
|
|
36
|
+
- a concise summary;
|
|
37
|
+
- proof commands and outcomes;
|
|
38
|
+
- any remaining gaps;
|
|
39
|
+
- confirmation that fixtures and examples are synthetic or redacted.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Humanish CLI contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,10 +1,437 @@
|
|
|
1
1
|
# humanish
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
Open-source-safe persona simulation for apps, CLIs, and agent-facing product
|
|
4
|
+
flows.
|
|
5
|
+
|
|
6
|
+
Humanish gives a project a repeatable way to ask: what happens when realistic
|
|
7
|
+
synthetic users, with different goals and tolerances, try to use this thing?
|
|
8
|
+
It creates committed simulation source under `humanish/`, ignored run evidence
|
|
9
|
+
under `.humanish/`, a watchable Observer UI, verification gates, and public-safe
|
|
10
|
+
feedback drafts.
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm i -D humanish
|
|
16
|
+
npx humanish init --yes
|
|
17
|
+
npx humanish watch
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The package is `humanish`; the installed binary is `humanish`. For a one-shot
|
|
21
|
+
command before installation, use `npx --package humanish humanish ...` to
|
|
22
|
+
guarantee the binary comes from the `humanish` registry package rather than a
|
|
23
|
+
same-named command already on your PATH.
|
|
24
|
+
|
|
25
|
+
For coding agents, install the repo skill first:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx skills add danielgwilson/humanish --skill humanish
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The skill lives at [`skills/humanish/SKILL.md`](skills/humanish/SKILL.md)
|
|
32
|
+
for skills.sh discovery.
|
|
33
|
+
|
|
34
|
+
## Public-Safety Boundary
|
|
35
|
+
|
|
36
|
+
Humanish is designed for public repositories and public issue queues. The
|
|
37
|
+
boundary is three planks, each enforced where it actually holds:
|
|
38
|
+
|
|
39
|
+
**1. This repo and the published package are kept public-safe by CI.** Every
|
|
40
|
+
push runs a public-surface scan (secret/key/path shapes, a sha256 binary-asset
|
|
41
|
+
allowlist, over both tracked files and the packed npm payload) plus a
|
|
42
|
+
full-history gitleaks scan. That protects what we ship — it does not scan your
|
|
43
|
+
repo.
|
|
44
|
+
|
|
45
|
+
**2. The harness never persists secret values into run artifacts.** On every
|
|
46
|
+
route, values it provisioned are scrubbed by literal match (they have no shape
|
|
47
|
+
for patterns to catch) and secret-shaped content is pattern-redacted before any
|
|
48
|
+
log tail, harness error, or model narration lands on disk. Env var names are
|
|
49
|
+
evidence; values never are. Pixels are the exception: a raw screenshot shows
|
|
50
|
+
whatever was on screen, which is why plank 3 exists.
|
|
51
|
+
|
|
52
|
+
**3. Run bundles are local by default.** Evidence lands under gitignored
|
|
53
|
+
`.humanish/`, and no command publishes it for you. Sharing evidence — committing
|
|
54
|
+
screenshots, pasting transcripts, attaching bundles to issues — is a deliberate
|
|
55
|
+
act, and reviewing what you share is on you. Use synthetic personas and
|
|
56
|
+
synthetic data so there is nothing sensitive to capture in the first place.
|
|
57
|
+
|
|
58
|
+
**What the automated gate enforces.** `humanish verify` scans public-bound
|
|
59
|
+
artifacts and fails closed on secret, key, and token shapes and on known local
|
|
60
|
+
path shapes. It does not yet detect free-form PII or PHI such as names, emails,
|
|
61
|
+
phone numbers, dates of birth, or medical identifiers. Keeping those out depends
|
|
62
|
+
on using synthetic data and on review, so `redaction: passed` means the
|
|
63
|
+
automated secret and path scan found no matches, not that the artifact was
|
|
64
|
+
certified free of PII or PHI. A first-class PII/PHI detector is on the roadmap
|
|
65
|
+
([#108](https://github.com/danielgwilson/humanish/issues/108)).
|
|
66
|
+
|
|
67
|
+
`humanish verify --json` also reports `shareSafety.status`:
|
|
68
|
+
|
|
69
|
+
- `share_ready`: the verified bundle is eligible for public feedback drafts;
|
|
70
|
+
- `local_only`: the bundle is valid local evidence, but should not be shared as-is
|
|
71
|
+
(for example, full-fidelity raw screenshots are present);
|
|
72
|
+
- `blocked`: the bundle failed verification or public-safety gates.
|
|
73
|
+
|
|
74
|
+
Feedback commands require `share_ready`. A valid local run can still be
|
|
75
|
+
reviewed in Observer without being promoted into a public issue draft.
|
|
76
|
+
|
|
77
|
+
## How It Works
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
humanish/ committed source plane: labs, personas, scenarios, policy, adapters
|
|
81
|
+
.humanish/ ignored runtime plane: runs, Observer output, reviews, local state
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The first-run path does not require credentials:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npx humanish doctor
|
|
88
|
+
npx humanish watch
|
|
89
|
+
npx humanish verify --run latest --json
|
|
90
|
+
npx humanish feedback issue --run latest --repo owner/repo --format markdown
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`humanish watch` starts a fresh four-lane synthetic run, renders the Observer,
|
|
94
|
+
opens it in the browser, serves it over localhost, and keeps the shell attached.
|
|
95
|
+
After `humanish init`, named lab manifests can be run the same way:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
npx humanish watch first-run
|
|
99
|
+
npx humanish lab list
|
|
100
|
+
npx humanish lab inspect first-run
|
|
101
|
+
npx humanish lab preflight first-run
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The CI-safe equivalent is:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
npx humanish watch --json --no-open
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Commands
|
|
111
|
+
|
|
112
|
+
| Command | Purpose |
|
|
113
|
+
| --- | --- |
|
|
114
|
+
| `humanish init` | Scaffold committed `humanish/` source and ignored `.humanish/` runtime state. |
|
|
115
|
+
| `humanish doctor` | Explain readiness and missing setup. |
|
|
116
|
+
| `humanish run --dry-run` | Generate a synthetic run bundle without browser, keys, or provider spend. |
|
|
117
|
+
| `humanish run --app-url http://127.0.0.1:<port>` | Capture live desktop/mobile browser evidence against a running local app. |
|
|
118
|
+
| `humanish watch [lab]` | Run sims or a named lab, open Observer, and keep watching. |
|
|
119
|
+
| `humanish lab list` | List committed and ignored lab manifests. |
|
|
120
|
+
| `humanish lab inspect <lab>` | Show the source manifest for a lab without running it. |
|
|
121
|
+
| `humanish lab preflight <lab>` | Check lab routing and optional target reachability before actor/model spend. |
|
|
122
|
+
| `humanish lab run <lab>` | Run a lab manifest in human or JSON mode. |
|
|
123
|
+
| `humanish verify` | Validate a run bundle and public-safety gates. |
|
|
124
|
+
| `humanish cleanup` | Clean resources explicitly recorded as owned by a run and write `cleanup.json`. |
|
|
125
|
+
| `humanish review` | Read review evidence for a run. |
|
|
126
|
+
| `humanish runs` | List local runs and latest pointers. |
|
|
127
|
+
| `humanish feedback issue` | Print a public-safe GitHub issue draft without API mutation. |
|
|
128
|
+
| `humanish lab run oss` | Repo-maintainer dogfood example: Observer-of-Observers for headed authorized-repo app setup attempts. |
|
|
129
|
+
| `humanish lab run oss-smoke` | Repo-maintainer dogfood example: disposable clone smoke test against public OSS repos. |
|
|
130
|
+
|
|
131
|
+
## Exit Codes
|
|
132
|
+
|
|
133
|
+
| Code | Meaning |
|
|
134
|
+
| --- | --- |
|
|
135
|
+
| `0` | Success. |
|
|
136
|
+
| `1` | Commander usage error: unknown command, unknown option, or a missing/invalid argument. |
|
|
137
|
+
| `2` | Humanish domain or validation failure. Check the JSON envelope's `error.code` for detail. |
|
|
138
|
+
| `128+N` | Terminated by signal `N`: `130` for SIGINT, `143` for SIGTERM, `129` for SIGHUP. |
|
|
139
|
+
|
|
140
|
+
## Lab Manifests
|
|
141
|
+
|
|
142
|
+
Labs are authored as `.yaml` source:
|
|
143
|
+
|
|
144
|
+
```text
|
|
145
|
+
humanish/labs/*.yaml committed public-safe labs
|
|
146
|
+
.humanish/labs/*.yaml ignored local labs
|
|
147
|
+
.humanish/local/labs/*.yaml ignored private or machine-specific labs
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Committed labs should be useful to anyone who clones the project. Private repo
|
|
151
|
+
targets, token-backed provider settings, and local-only dogfood variants belong
|
|
152
|
+
in ignored `.humanish/` lab manifests and can be run explicitly:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
npx humanish watch .humanish/labs/local-dogfood.yaml --env-file .humanish/local/provider.env
|
|
156
|
+
npx humanish lab run .humanish/labs/local-dogfood.yaml --json --no-open
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
`--env-file` loads values for the current process only. Humanish reports loaded
|
|
160
|
+
env var names, never values, and does not persist those values into run bundles
|
|
161
|
+
or Observer data.
|
|
162
|
+
|
|
163
|
+
### Computer-Use Labs
|
|
164
|
+
|
|
165
|
+
A computer-use lab dispatches a **registered computer-use actor** (`actors[0].type`,
|
|
166
|
+
resolved against the actor registry — e.g. `openai-computer-use`) to drive an app in
|
|
167
|
+
a hosted E2B desktop browser and emit an evidence bundle under gitignored
|
|
168
|
+
`.humanish/` (full-fidelity screenshots by default — see below; length-only typed
|
|
169
|
+
text; provider-neutral `humanish.actor-trace.v1` on the stream). Two subjects route
|
|
170
|
+
here:
|
|
171
|
+
|
|
172
|
+
- **`subject.source: clone`** (+ `execution.target: e2b-desktop` + a computer-use
|
|
173
|
+
actor): the lab clones your repo INTO the sandbox, runs your declared
|
|
174
|
+
`serve.install`/`serve.build`/`serve.start` commands (detached, with readiness
|
|
175
|
+
probing), and drives the served app at `serve.url`. Subject env var NAMES declared
|
|
176
|
+
in `subject.env` are provisioned from `--env-file` (names land in evidence; values
|
|
177
|
+
never do). The bundle records provenance: repo, cloned commit, env names.
|
|
178
|
+
- **`subject.source: app-url`**: you (a library caller) provision the app yourself
|
|
179
|
+
via the `prepareDesktop` hook (`runLab(config, { cuaHooks: { prepareDesktop } })`)
|
|
180
|
+
and the actor drives the URL you declared.
|
|
181
|
+
|
|
182
|
+
```yaml
|
|
183
|
+
subject:
|
|
184
|
+
source: clone
|
|
185
|
+
repos: [example-org/example-app]
|
|
186
|
+
serve:
|
|
187
|
+
install: pnpm install --frozen-lockfile
|
|
188
|
+
build: pnpm build
|
|
189
|
+
start: pnpm start
|
|
190
|
+
url: http://127.0.0.1:3000/
|
|
191
|
+
actors:
|
|
192
|
+
- type: openai-computer-use
|
|
193
|
+
mission: Explore the app as a first-time visitor and complete its primary flow.
|
|
194
|
+
execution: { target: e2b-desktop }
|
|
195
|
+
scenario: { mode: live }
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
npx humanish lab run cua-browser # dry-run contract bundle (no spend)
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Live runs (`scenario.mode: live`) need `OPENAI_API_KEY` + `E2B_API_KEY` (pass via
|
|
203
|
+
`--env-file`) and the optional peer dependency: `npm i -D @e2b/desktop`. A cloned
|
|
204
|
+
subject is served **inside** the sandbox on loopback; to instead drive a deployment
|
|
205
|
+
you own (a Vercel preview, staging), use an `app-url` subject with
|
|
206
|
+
`policies.allowPublicTargets: true`. The actor's API key never enters the sandbox;
|
|
207
|
+
only declared subject env names do. `humanish init` scaffolds an example at
|
|
208
|
+
`humanish/labs/cua-browser.yaml`.
|
|
209
|
+
|
|
210
|
+
**Screenshots are full-fidelity by default.** Run bundles live in gitignored
|
|
211
|
+
`.humanish/`, so the Observer shows exactly what the persona saw — the point of
|
|
212
|
+
simming your own app. Set `policies.redactScreenshots: true` to persist blurred
|
|
213
|
+
thumbnails at capture instead (for unowned subjects, or bundles you intend to share
|
|
214
|
+
as-is). Raw bundles stay local in gitignored `.humanish/`; nothing scans the pixels,
|
|
215
|
+
so review them before sharing anywhere — a redact-on-export step is planned. The
|
|
216
|
+
frame sent to the model is always full-resolution regardless. (Doctrine:
|
|
217
|
+
`docs/principles/invariants-and-defaults.md` — redaction binds the publish boundary,
|
|
218
|
+
not capture.) `humanish verify` reports raw-screenshot bundles as
|
|
219
|
+
`shareSafety.status: local_only`; `humanish feedback issue` refuses them until the
|
|
220
|
+
run is share-ready.
|
|
221
|
+
|
|
222
|
+
**Device presets.** `execution.desktop.device` picks the viewport the run renders at —
|
|
223
|
+
`mobile` (414×896), `small-mobile` (360×740), `narrow-mobile` (320×700), `tablet`
|
|
224
|
+
(820×1180), `desktop` (1440×950, default), or `wide` (1920×1080). The values are copied
|
|
225
|
+
from the mature in-house sims, not invented. **Honest fidelity:** on the computer-use /
|
|
226
|
+
E2B-desktop route only width/height physically render — so a site's width-based responsive
|
|
227
|
+
CSS fires (real mobile *layout*), and the model is *told* its device in the prompt, matching
|
|
228
|
+
how those sims run organic mobile lanes. There is no touch input, the device-pixel-ratio
|
|
229
|
+
isn't rendered, and the user-agent stays desktop on this route; true touch/DPR/UA emulation
|
|
230
|
+
arrives with the deterministic CDP actor. Device is run-wide today; per-*persona* device
|
|
231
|
+
(N personas × devices) lands with fan-out. `execution.desktop.resolution` is a raw escape
|
|
232
|
+
hatch that overrides the preset.
|
|
233
|
+
|
|
234
|
+
**Desktop browser choice.** Hosted computer-use lanes and shared-world actor seats use the
|
|
235
|
+
route's historical opener unless you set `execution.desktop.browser` to `chrome`, `chromium`,
|
|
236
|
+
or `firefox`. A concrete value means "launch this browser or fail" rather than silently
|
|
237
|
+
falling back to whatever the image prefers. When configured, run bundles record the requested
|
|
238
|
+
browser and the resolved in-sandbox command as `desktopBrowser`.
|
|
239
|
+
|
|
240
|
+
**Deterministic stop conditions.** Freeform computer-use actors can keep acting after the
|
|
241
|
+
app has already reached the state you care about. Add `stopWhen` to the actor or a lane to
|
|
242
|
+
stop immediately after a deterministic browser observation matches. Conditions inside one
|
|
243
|
+
rule are ANDed together; rules under `any` are ORed. Lane-level `stopWhen` overrides the
|
|
244
|
+
actor default.
|
|
245
|
+
|
|
246
|
+
```yaml
|
|
247
|
+
actors:
|
|
248
|
+
- type: openai-computer-use
|
|
249
|
+
mission: Complete the assigned browser task.
|
|
250
|
+
stopWhen:
|
|
251
|
+
any:
|
|
252
|
+
- id: dashboard-visible
|
|
253
|
+
urlPathEquals: /dashboard
|
|
254
|
+
textIncludes: Dashboard
|
|
255
|
+
lanes:
|
|
256
|
+
- id: reviewer
|
|
257
|
+
entry: /items/123
|
|
258
|
+
instruction: Review the item and return to the queue.
|
|
259
|
+
stopWhen:
|
|
260
|
+
any:
|
|
261
|
+
- id: returned-to-queue
|
|
262
|
+
urlPathEquals: /items
|
|
263
|
+
textIncludes: Queue
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Supported primitives are `urlIncludes`, `urlPathEquals`, `textIncludes`, and
|
|
267
|
+
`appStatePathEquals`. URL and text observations are runtime-only and are not persisted into
|
|
268
|
+
the run bundle; the trace stores only the matched rule id and primitive names. Browser URL
|
|
269
|
+
and text observation requires a Chrome/Chromium CDP session in the desktop. For deterministic
|
|
270
|
+
browser-observed stops, set `execution.desktop.browser: chrome` or `chromium`.
|
|
271
|
+
|
|
272
|
+
**Failed-lane reruns.** Multi-lane CUA fan-out can be rerun surgically without mutating
|
|
273
|
+
the source run:
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
npx humanish lab run cua-browser --rerun-failed-from latest --json --no-open
|
|
277
|
+
npx humanish lab run cua-browser --rerun-failed-from <run-id> --lanes lane-02,lane-04
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
This creates a new linked run containing only the failed/blocked/timed-out/hollow lanes
|
|
281
|
+
(or the explicit `--lanes` selection). The new `run.json` records `rerun.sourceRunId`,
|
|
282
|
+
selected lane ids, and previous lane statuses; the source run's verdict is left unchanged.
|
|
283
|
+
This is intentionally not automatic retry; a passing rerun is evidence of a
|
|
284
|
+
nondeterminism candidate, not permission to erase the original red lane.
|
|
285
|
+
|
|
286
|
+
**Run-owned cleanup.** Live providers can record exact owned resources in `run.json`.
|
|
287
|
+
After a run, reclaim only those resources and write a durable receipt:
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
npx humanish cleanup --run latest
|
|
291
|
+
npx humanish verify --run latest
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
Cleanup is exact-id only; Humanish does not enumerate or bulk-delete provider
|
|
295
|
+
accounts from this command.
|
|
296
|
+
|
|
297
|
+
Trust note: `serve` commands run inside the disposable sandbox with the declared
|
|
298
|
+
subject env provisioned — the same trust class as a repo's package.json scripts.
|
|
299
|
+
Only run lab configs you trust, and declare only the env names that the subject
|
|
300
|
+
genuinely needs. (Since 0.5.0, a clone × e2b-desktop lab whose actor is a
|
|
301
|
+
registered computer-use actor routes here and requires `serve`; on earlier
|
|
302
|
+
versions that shape routed to the meta lab.)
|
|
303
|
+
|
|
304
|
+
#### Adapters: drive a local app via its JS state contract (no E2B, no vision)
|
|
305
|
+
|
|
306
|
+
The computer-use loop is provider- and substrate-agnostic. You can point a lab at an
|
|
307
|
+
**already-running local dev server** (`subject.source: local-app`) and drive it
|
|
308
|
+
through its in-process JS contract (`window.app.getState()` etc.) with a custom
|
|
309
|
+
`CuaExecutor` (screenshot optional, `appState` as the progress signal) paired with a
|
|
310
|
+
**non-vision** `CuaProvider` (`requiresFrame` falsey) — keeping personas, the
|
|
311
|
+
Observer, the evidence bundle, redaction, and the friction loop, with **NO E2B
|
|
312
|
+
desktop and NO clone**. Supply `cuaHooks.buildExecutor` + `buildProvider` to
|
|
313
|
+
`runLab` (a config-only run with no hooks fails closed with a structured error). See
|
|
314
|
+
[State-driven executor](docs/architecture/state-driven-executor.md).
|
|
315
|
+
|
|
316
|
+
## Browser Scenario Manifests
|
|
317
|
+
|
|
318
|
+
`humanish run --app-url http://127.0.0.1:<port>` looks for executable browser
|
|
319
|
+
steps in committed `humanish/scenarios/*.yaml`. If none are present, Humanish
|
|
320
|
+
falls back to the built-in two-step browser persona proof. Browser steps are
|
|
321
|
+
public-safe source, so use synthetic fixture values and committed relative app
|
|
322
|
+
paths only.
|
|
323
|
+
|
|
324
|
+
```yaml
|
|
325
|
+
schema: humanish.scenario.v1
|
|
326
|
+
id: todo-onboarding
|
|
327
|
+
title: Todo onboarding
|
|
328
|
+
persona: synthetic-new-user
|
|
329
|
+
goal: Create the first synthetic todo and verify the list updates.
|
|
330
|
+
mode: browser
|
|
331
|
+
browser:
|
|
332
|
+
startPath: /
|
|
333
|
+
steps:
|
|
334
|
+
- id: open-home
|
|
335
|
+
label: Open the todo app
|
|
336
|
+
action: goto
|
|
337
|
+
path: /
|
|
338
|
+
expect:
|
|
339
|
+
text: Add todo
|
|
340
|
+
- id: enter-todo
|
|
341
|
+
label: Enter synthetic todo text
|
|
342
|
+
action: fill
|
|
343
|
+
selector: input[name="todo"]
|
|
344
|
+
value: Synthetic onboarding task
|
|
345
|
+
- id: create-todo
|
|
346
|
+
label: Create the todo
|
|
347
|
+
action: click
|
|
348
|
+
selector: button[type="submit"]
|
|
349
|
+
expect:
|
|
350
|
+
text: Synthetic onboarding task
|
|
351
|
+
stateChanged: true
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
Supported actions are `goto`, `fill`, `click`, `assertText`, `waitForText`,
|
|
355
|
+
and `waitForSelector`. Supported expectations are `text`, `selectorVisible`,
|
|
356
|
+
`urlIncludes`, and `stateChanged`. Generated traces are stored as JSON under
|
|
357
|
+
`.humanish/runs/<run>/traces/` and summarized in the Observer.
|
|
358
|
+
|
|
359
|
+
## Maintainer OSS Meta-Lab Example
|
|
360
|
+
|
|
361
|
+
This repository includes an experimental authorized-repo dogfood lab:
|
|
362
|
+
|
|
363
|
+
```bash
|
|
364
|
+
pnpm humanish -- watch oss
|
|
365
|
+
pnpm humanish -- lab run oss --repos CorentinTh/it-tools,drawdb-io/drawdb,maciekt07/TodoApp,lissy93/dashy
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Default lab targets are intentionally app/tool-like repos with visible,
|
|
369
|
+
locally runnable user surfaces. Avoid libraries and frameworks for public
|
|
370
|
+
dogfood unless the scenario is explicitly testing developer experience.
|
|
371
|
+
|
|
372
|
+
With `E2B_API_KEY` and `OPENAI_API_KEY` present, Humanish launches headed E2B
|
|
373
|
+
desktop lanes, uploads the local package tarball, clones each assigned
|
|
374
|
+
repository inside the sandbox, initializes Humanish, runs nested proof commands,
|
|
375
|
+
starts the target app when a runnable script is present, opens desktop/mobile
|
|
376
|
+
app windows plus the nested Observer in the sandbox browser, and starts a
|
|
377
|
+
nonblocking Codex actor attempt.
|
|
378
|
+
Install the optional desktop substrate first:
|
|
379
|
+
|
|
380
|
+
```bash
|
|
381
|
+
npm i -D @e2b/desktop
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
The contract-safe path for agents and CI is:
|
|
385
|
+
|
|
386
|
+
```bash
|
|
387
|
+
pnpm humanish -- lab run oss --dry-run --json --no-open
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
The `oss` lab accepts GitHub `owner/repo` slugs. Private repositories are
|
|
391
|
+
maintainer-only and should be supplied from ignored local lab manifests with an
|
|
392
|
+
authorized `GH_TOKEN` or `GITHUB_TOKEN` loaded via `--env-file`. When a GitHub
|
|
393
|
+
token is present, durable run artifacts redact repo labels by default; pass
|
|
394
|
+
`--no-redact-repos` only for public-safe repo selections. Live E2B stream URLs
|
|
395
|
+
are runtime-only for the attached Observer server and are not persisted to
|
|
396
|
+
`run.json` or `observer-data.json`. Local bundles remain ignored under
|
|
397
|
+
`.humanish/`; do not publish private screenshots, logs, or upstream details.
|
|
398
|
+
|
|
399
|
+
## Development
|
|
400
|
+
|
|
401
|
+
```bash
|
|
402
|
+
pnpm install
|
|
403
|
+
pnpm check
|
|
404
|
+
pnpm public-surface:scan
|
|
405
|
+
pnpm pack:dry-run
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
Local dogfood:
|
|
409
|
+
|
|
410
|
+
```bash
|
|
411
|
+
pnpm humanish:watch
|
|
412
|
+
pnpm humanish:verify
|
|
413
|
+
pnpm humanish:feedback
|
|
414
|
+
pnpm humanish:lab:list
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
## Docs
|
|
418
|
+
|
|
419
|
+
- [Ramp for future contributors and agents](docs/ramp/README.md)
|
|
420
|
+
- [Current goals](docs/goals/current.md)
|
|
421
|
+
- [Project layout](docs/architecture/project-layout.md)
|
|
422
|
+
- [Observer architecture](docs/architecture/observer.md)
|
|
423
|
+
- [Actor contract (pluggable harnesses)](docs/architecture/actor-contract.md)
|
|
424
|
+
- [State-driven executor (drive a local app, no E2B/vision)](docs/architecture/state-driven-executor.md)
|
|
425
|
+
- [OSS lab POC](docs/architecture/oss-lab-poc.md)
|
|
426
|
+
- [Feedback contract](docs/contracts/feedback.md)
|
|
427
|
+
- [Open-source install experience](docs/product/open-source-install-experience.md)
|
|
428
|
+
- [Self-driving harness principles](docs/principles/self-driving-harness.md)
|
|
429
|
+
- [World-class open-source v0 roadmap](docs/roadmap/world-class-open-source-v0.md)
|
|
430
|
+
- [Open-source release readiness](docs/release/open-source-readiness.md)
|
|
431
|
+
- [Public readiness standard](docs/release/public-readiness-standard.md)
|
|
432
|
+
|
|
433
|
+
## Release Status
|
|
434
|
+
|
|
435
|
+
This package is prepared for public npm packaging, but publication is still a
|
|
436
|
+
human release action. Do not run `npm publish` unless the maintainer explicitly
|
|
437
|
+
approves it in the current context.
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Public-Safety Boundary
|
|
4
|
+
|
|
5
|
+
Humanish must not contain or emit PII, PHI, secrets, keys, tokens, raw private
|
|
6
|
+
transcripts, private screenshots, private customer data, private patient data,
|
|
7
|
+
or private source snippets.
|
|
8
|
+
|
|
9
|
+
Do not file public issues that contain sensitive data. Redact the data and
|
|
10
|
+
describe the class of problem instead.
|
|
11
|
+
|
|
12
|
+
## Reporting A Vulnerability
|
|
13
|
+
|
|
14
|
+
If you find a security issue, open a minimal public issue only when the report
|
|
15
|
+
does not disclose exploitable details or sensitive data. Otherwise, contact the
|
|
16
|
+
maintainer privately through the repository owner profile.
|
|
17
|
+
|
|
18
|
+
Include:
|
|
19
|
+
|
|
20
|
+
- affected version or commit;
|
|
21
|
+
- command run;
|
|
22
|
+
- safe reproduction steps;
|
|
23
|
+
- redacted evidence path or synthetic fixture;
|
|
24
|
+
- whether any generated `.humanish/` artifact may contain sensitive data.
|
|
25
|
+
|
|
26
|
+
## Maintainer Release Checks
|
|
27
|
+
|
|
28
|
+
Before any public release, run:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pnpm check
|
|
32
|
+
pnpm public-surface:scan
|
|
33
|
+
pnpm pack:dry-run
|
|
34
|
+
```
|