humanish 0.110.1 → 0.110.3

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.
Files changed (121) hide show
  1. package/ARCHITECTURE.md +11 -16
  2. package/CHANGELOG.md +26 -0
  3. package/CONTEXT.md +1 -1
  4. package/README.md +8 -7
  5. package/dist/actors/computer-use/actor.js +2 -2
  6. package/dist/actors/computer-use/loop/ending.js +1 -1
  7. package/dist/actors/local-agent/cli.d.ts +6 -0
  8. package/dist/actors/local-agent/cli.js +8 -0
  9. package/dist/actors/local-agent/readiness.js +2 -1
  10. package/dist/actors/registry.js +1 -1
  11. package/dist/analysis/automatic-completion.js +8 -0
  12. package/dist/cli/commands/observe.js +18 -4
  13. package/dist/cli/commands/run-signals.js +13 -4
  14. package/dist/cli/commands/runs.js +36 -13
  15. package/dist/cli/commands/setup.js +23 -14
  16. package/dist/cli/commands/study-route-computer-use.js +7 -3
  17. package/dist/cli/commands/study-route-open.js +1 -0
  18. package/dist/cli/commands/study-route-preview.js +1 -0
  19. package/dist/cli/commands/study-route-shared-world.js +4 -2
  20. package/dist/cli/commands/study-run.js +9 -19
  21. package/dist/cli/commands/watch.js +14 -4
  22. package/dist/cli/doctor.js +9 -6
  23. package/dist/cli/findings.d.ts +5 -0
  24. package/dist/cli/findings.js +28 -6
  25. package/dist/cli/first-run-path.d.ts +27 -7
  26. package/dist/cli/first-run-path.js +112 -75
  27. package/dist/cli/invocation.d.ts +7 -0
  28. package/dist/cli/invocation.js +32 -0
  29. package/dist/cli/io.d.ts +5 -2
  30. package/dist/cli/io.js +9 -16
  31. package/dist/cli/observer-follow.d.ts +24 -0
  32. package/dist/cli/observer-follow.js +48 -3
  33. package/dist/cli/orientation.js +16 -14
  34. package/dist/cli/version.d.ts +1 -0
  35. package/dist/cli/version.js +11 -0
  36. package/dist/evidence/encoded-text.d.ts +9 -6
  37. package/dist/evidence/encoded-text.js +84 -19
  38. package/dist/evidence/redaction.d.ts +2 -0
  39. package/dist/evidence/redaction.js +134 -21
  40. package/dist/feedback/export-bundle.js +2 -2
  41. package/dist/keys/key-resolution.js +6 -5
  42. package/dist/observer/exposure.js +1 -1
  43. package/dist/observer/library.js +3 -2
  44. package/dist/observer/render.js +2 -1
  45. package/dist/observer/run-routes.js +8 -1
  46. package/dist/observer/serve.js +2 -1
  47. package/dist/routes/computer-use/participant-runs.d.ts +6 -9
  48. package/dist/routes/computer-use/participant-runs.js +16 -36
  49. package/dist/routes/computer-use/plan.d.ts +2 -2
  50. package/dist/routes/computer-use/plan.js +6 -1
  51. package/dist/routes/computer-use/route.d.ts +5 -18
  52. package/dist/routes/computer-use/route.js +17 -78
  53. package/dist/routes/computer-use/setup.d.ts +3 -2
  54. package/dist/routes/computer-use/types.d.ts +6 -10
  55. package/dist/routes/scripted/route.d.ts +4 -17
  56. package/dist/routes/scripted/route.js +10 -42
  57. package/dist/routes/scripted/types.d.ts +1 -6
  58. package/dist/routes/shared-world/plan.js +5 -1
  59. package/dist/routes/shared-world/route.d.ts +5 -11
  60. package/dist/routes/shared-world/route.js +24 -63
  61. package/dist/routes/shared-world/types.d.ts +2 -6
  62. package/dist/routes/terminal/bundle.js +2 -1
  63. package/dist/routes/terminal/credentials.d.ts +5 -5
  64. package/dist/routes/terminal/credentials.js +14 -6
  65. package/dist/routes/terminal/plan.js +8 -0
  66. package/dist/routes/terminal/route.d.ts +3 -13
  67. package/dist/routes/terminal/route.js +24 -63
  68. package/dist/routes/terminal/runtime-auth.d.ts +6 -0
  69. package/dist/routes/terminal/runtime-auth.js +5 -0
  70. package/dist/routes/terminal/session.d.ts +2 -3
  71. package/dist/routes/terminal/session.js +2 -3
  72. package/dist/routes/terminal/types.d.ts +2 -7
  73. package/dist/run/dry-run.js +2 -1
  74. package/dist/run/judge.js +2 -1
  75. package/dist/run/local-only-files.d.ts +13 -0
  76. package/dist/run/local-only-files.js +35 -0
  77. package/dist/run/reclaim.d.ts +5 -0
  78. package/dist/run/reclaim.js +34 -2
  79. package/dist/run/route-shell.d.ts +60 -0
  80. package/dist/run/route-shell.js +51 -0
  81. package/dist/run/run-not-found.js +3 -2
  82. package/dist/run/run.d.ts +6 -1
  83. package/dist/run/run.js +11 -2
  84. package/dist/run/sandbox-creates.js +5 -3
  85. package/dist/run/sandbox-receipts.d.ts +6 -5
  86. package/dist/run/sandbox-receipts.js +12 -7
  87. package/dist/run/status.d.ts +2 -0
  88. package/dist/run/status.js +5 -0
  89. package/dist/study/agents-section.d.ts +21 -0
  90. package/dist/study/agents-section.js +86 -0
  91. package/dist/study/composition-rules.js +1 -1
  92. package/dist/study/doctor.js +5 -4
  93. package/dist/study/init-templates.d.ts +1 -1
  94. package/dist/study/init-templates.js +43 -129
  95. package/dist/study/init.js +32 -35
  96. package/dist/study/local-browser-host.d.ts +11 -0
  97. package/dist/study/local-browser-host.js +42 -0
  98. package/dist/study/parse/actors.js +9 -1
  99. package/dist/study/parse/subject.js +13 -1
  100. package/dist/study/parse/url-credentials.d.ts +9 -0
  101. package/dist/study/parse/url-credentials.js +50 -0
  102. package/dist/study/preflight-probes.js +2 -1
  103. package/dist/study/types.d.ts +8 -6
  104. package/dist/study/url-credentials.d.ts +6 -0
  105. package/dist/study/url-credentials.js +34 -0
  106. package/dist/substrates/e2b/sandbox.js +33 -15
  107. package/dist/substrates/local/firecracker-desktop.js +3 -2
  108. package/dist/substrates/local/runtime-host.js +5 -4
  109. package/dist/substrates/local/runtime.js +5 -4
  110. package/dist/tui/contract.js +5 -4
  111. package/dist/verify/liveness.js +2 -1
  112. package/dist/verify/verify.js +2 -1
  113. package/docs/architecture/actor-contract.md +1 -1
  114. package/docs/architecture/external-public-shared-world.md +1 -1
  115. package/docs/architecture/terminal-product-route.md +26 -24
  116. package/docs/contracts/run-bundle.md +20 -4
  117. package/docs/contracts/schemas.md +6 -5
  118. package/docs/contracts/study-analysis.md +5 -2
  119. package/docs/product/automatic-analysis.md +1 -1
  120. package/package.json +4 -2
  121. package/skills/humanish/SKILL.md +22 -18
@@ -279,7 +279,7 @@ instruction?, target?, entry?, host?, reasoningEffort?, stopWhen?, dwell? }` bec
279
279
  an interactive PTY would overstate the mechanism (a duplex PTY
280
280
  transport does not ship). `terminal.stdin` defaults to `disabled`
281
281
  (`sent`/assisted input is rejected until the interventions ledger + a
282
- non-comparable marker exist). `runtimeAuth` (`openai-env`, the default, or `openai-egress`)
282
+ non-comparable marker exist). `runtimeAuth` (`openai-egress`, the default, or `openai-env`)
283
283
  declares the agent's runtime-auth channel, recorded as names only. On a live run, the engine
284
284
  resolves the registered terminal descriptor and requires
285
285
  `keyPlacement: in-sandbox-command-scoped` before creating a sandbox. With `openai-env`
@@ -1068,9 +1068,9 @@ contract.
1068
1068
  ## Terminal Cost Ledger And No-Spend Proof
1069
1069
 
1070
1070
  The terminal-product route (`src/routes/terminal/route.ts`), under the default
1071
- `runtimeAuth: openai-env`, passes a real provider key only to the in-sandbox agent
1072
- command; `openai-egress` gives the command a placeholder and keeps the key in an
1073
- external E2B header transform. Neither mode puts it in sandbox-global env or
1071
+ `runtimeAuth: openai-egress`, gives the in-sandbox agent command a placeholder and
1072
+ keeps the key in an external E2B header transform; `openai-env` passes a real
1073
+ provider key only to that command. Neither mode puts it in sandbox-global env or
1074
1074
  metadata, so the no-spend claim must be derived from a ledger, never asserted. The
1075
1075
  live run writes both to `terminal-ledgers.json` (a `cost` block + a
1076
1076
  `noSpendProof` block, additive to `humanish.terminal-ledgers.v1`).
@@ -1186,7 +1186,8 @@ the CLI's run command when that signal stops a live run outside post-run
1186
1186
  analysis. It first prints one line saying it is stopping and refuses any further sandbox
1187
1187
  create. It then kills the E2B sandboxes the run's `sandbox-receipts.ndjson` names, each sandbox
1188
1188
  a create in flight reports as its id arrives, and each one E2B lists with the run's owner tags,
1189
- writes `reclaim-receipt.json` as `humanish reclaim` does, and exits
1189
+ writes `reclaim-receipt.json` as `humanish reclaim` does, rewrites each run file that names one of
1190
+ the run's raw sandbox ids with the marker and digest, as a finished run's publish does, and exits
1190
1191
  128+n. The bundle is not finished: run.json keeps its last live flush, with
1191
1192
  `outcome: { state: interrupted, ok: false, signal, at }` when the run had
1192
1193
  flushed one, and status.json gets no `outcome`. A `running` record that stopped refreshing still reads as
@@ -321,10 +321,13 @@ The states without findings:
321
321
 
322
322
  - `running`: the automatic analysis is queued or running. `next` is `review` again.
323
323
  - `skipped`: the automatic analysis was skipped or refused, for example without
324
- `OPENAI_API_KEY`. `next` is `analyze --max-cost 3`.
324
+ `OPENAI_API_KEY`, or the run's study file sets `review.analysis: false`
325
+ (`AUTOMATIC_ANALYSIS_DISABLED`, read from the file when the view is built). `next` is
326
+ `analyze --max-cost 3`, which runs an analysis anyway.
325
327
  - `failed`: the latest attempt failed or was cancelled and no usable version exists. `next`
326
328
  reruns it with the same analyst, `--provider codex` for the Codex account analyst.
327
- - `none`: no analysis ran for this live run, for example with `review.analysis: false`.
329
+ - `none`: no analysis ran for this live run and nothing records why, for example a run that
330
+ started from a library call, or one whose study file has moved or changed id.
328
331
  - `dry_run`: a dry run has no participant evidence to analyze.
329
332
  - `unavailable`: the run or its analysis records could not be read or checked, or the analysis
330
333
  text matched a sensitive-text pattern (`ANALYSIS_SENSITIVE_TEXT_QUARANTINED`), which the
@@ -127,7 +127,7 @@ outcomes and the deterministic review verdict are never rewritten by analysis.
127
127
  | `AUTOMATIC_ANALYSIS_SOURCE_CHANGED` | `failed` | The run directory changed after the run published its bundle |
128
128
  | `AUTOMATIC_ANALYSIS_KEY_MISSING` | `skipped` | No OpenAI API key |
129
129
  | `AUTOMATIC_ANALYSIS_NO_PARTICIPANT_EVIDENCE` | `skipped` | A default analysis found no participant evidence |
130
- | `AUTOMATIC_ANALYSIS_ACTOR_CANCELLED` | `skipped` | The harness cancelled the participants |
130
+ | `AUTOMATIC_ANALYSIS_ACTOR_CANCELLED` | `skipped` | The harness cancelled the participants, or a signal stopped the run |
131
131
  | `AUTOMATIC_ANALYSIS_CLEANUP_UNCONFIRMED` | `skipped` | A local VM study could not confirm its cleanup; the command exits 2 |
132
132
  | `AUTOMATIC_ANALYSIS_ALREADY_REQUESTED` | `skipped` | Another request already claimed this run's analysis |
133
133
  | `AUTOMATIC_ANALYSIS_BUSY` | `skipped` | Another analysis is running |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "humanish",
3
- "version": "0.110.1",
3
+ "version": "0.110.3",
4
4
  "description": "Synthetic user research for apps, CLIs, and agent-facing product flows.",
5
5
  "keywords": [
6
6
  "cli",
@@ -56,11 +56,12 @@
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsc -p tsconfig.build.json && pnpm --filter humanish-observer build && pnpm --filter humanish-tui build && node scripts/finish-build.mjs",
59
- "check": "pnpm format:check && pnpm lint && pnpm knip && pnpm prose:check && pnpm vocabulary:check && pnpm docs:check && pnpm site-css:check && pnpm typecheck && pnpm test && pnpm tui:test && pnpm build && pnpm guest-media:startup:proof && pnpm cli:startup:test && pnpm cli:preflight:test && pnpm cli:dotenv:test && pnpm cli:peer:test && pnpm tui:smoke",
59
+ "check": "pnpm format:check && pnpm lint && pnpm knip && pnpm prose:check && pnpm vocabulary:check && pnpm docs:check && pnpm site-css:check && pnpm typecheck && pnpm test && pnpm tui:test && pnpm build && pnpm guest-media:startup:proof && pnpm cli:startup:test && pnpm cli:preflight:test && pnpm cli:dotenv:test && pnpm cli:peer:test && pnpm cli:skill:test && pnpm tui:smoke",
60
60
  "cli:startup:test": "node scripts/terminal-startup-exit-proof.mjs",
61
61
  "cli:preflight:test": "node scripts/task-route-preflight-proof.mjs",
62
62
  "cli:dotenv:test": "node scripts/dotenv-proof.mjs",
63
63
  "cli:peer:test": "node scripts/peer-install-proof.mjs",
64
+ "cli:skill:test": "node scripts/skill-first-run-proof.mjs",
64
65
  "humanish": "tsx src/cli.ts",
65
66
  "pack:dry-run": "npm pack --dry-run",
66
67
  "prepack": "pnpm build",
@@ -74,6 +75,7 @@
74
75
  "tui:smoke": "node scripts/tui-smoke.mjs",
75
76
  "tui:test": "pnpm --filter humanish-tui test",
76
77
  "release:dogfood": "node scripts/release-dogfood.mjs",
78
+ "bench": "tsx bench/run.ts",
77
79
  "browser-control:proof": "node scripts/browser-control-proof.mjs",
78
80
  "docs:generate": "tsx scripts/generate-cli-docs.ts",
79
81
  "docs:check": "tsx scripts/generate-cli-docs.ts --check && tsx scripts/check-doc-paths.ts && tsx scripts/check-doc-symbols.ts && tsx scripts/check-doc-comments.ts && tsx scripts/check-doc-study-fields.ts",
@@ -289,7 +289,6 @@ Useful commands:
289
289
  ```bash
290
290
  npx humanish study list
291
291
  npx humanish study show first-run
292
- npx humanish watch first-run
293
292
  npx humanish run first-run --json --no-open
294
293
  ```
295
294
 
@@ -377,25 +376,30 @@ inbox page. See `docs/contracts/schemas.md` for the full `comms:` shape and
377
376
  ## First Proof Run
378
377
 
379
378
  Run the no-credentials path first. It is a dry run: humanish writes a synthetic
380
- run bundle and tests no target app behavior:
379
+ run bundle and tests no target app behavior. Every command in this block
380
+ finishes and exits, needs no key and spends nothing; lines marked
381
+ `# live only` need keys and spend money, so run them only when the user has
382
+ approved a live run. `run` prints the run id; use it in place of `<id>`.
381
383
 
382
384
  ```bash
383
- npx humanish doctor
384
- npx humanish watch
385
- npx humanish verify --run latest --json
386
- npx humanish feedback issue --run latest --repo example/app --format markdown
387
- ```
388
-
389
- For CI or non-interactive proof:
390
-
391
- ```bash
392
- npx humanish watch --json --no-open
385
+ npx humanish doctor --json
393
386
  npx humanish run first-run --json --no-open
387
+ npx humanish verify --run <id> --json
388
+ npx humanish review --run <id> --json
389
+ npx humanish observe --run <id>
390
+ npx humanish run try-live --json --no-open # live only
391
+ npx humanish feedback issue --run <id> --repo example/app --format markdown # live only
394
392
  ```
395
393
 
396
- The feedback command prints a public-safe Markdown draft. It must not call the
397
- GitHub API, require a token, update Projects, use provider credits, or claim
398
- product behavior proof from a dry run.
394
+ `observe` prints the path of the run's Observer page for the person you are
395
+ working for. Without an interactive terminal, `observe` and `watch` print the
396
+ result and exit; at a person's terminal they serve the Observer until Ctrl-C.
397
+
398
+ `feedback issue` drafts from a live run only and refuses a dry run with
399
+ `HUMANISH_FEEDBACK_REQUIRES_LIVE_RUN`. Its Markdown draft is checked for
400
+ secret, key, token and local-path shapes; it is not checked for personal data. It
401
+ must not call the GitHub API, require a token, update Projects, use provider
402
+ credits, or claim product behavior proof from a dry run.
399
403
 
400
404
  When the target app can run locally, prove a known browser path with a
401
405
  scripted-browser study after starting the app on loopback. The study replays a
@@ -414,8 +418,8 @@ no browser.
414
418
  # in another terminal, start the target app on 127.0.0.1 or localhost
415
419
  npx humanish study show <study> --json
416
420
  npx humanish run <study> --json --no-open
417
- npx humanish verify --run latest --json
418
- npx humanish observe --run latest --open # for a person; it serves until Ctrl-C
421
+ npx humanish verify --run <id> --json
422
+ npx humanish observe --run <id> --open # for a person; at their terminal it serves until Ctrl-C
419
423
  ```
420
424
 
421
425
  Do not use `humanish watch --count ...` as a substitute for a scripted-browser
@@ -442,7 +446,7 @@ Do not paste values into files, prompts, run bundles, issue drafts, or logs.
442
446
  Load local values only at invocation time:
443
447
 
444
448
  ```bash
445
- npx humanish watch .humanish/studies/local-live.yaml --dotenv .humanish/local/provider.env
449
+ npx humanish run .humanish/studies/local-live.yaml --dotenv .humanish/local/provider.env --json --no-open
446
450
  ```
447
451
 
448
452
  When choosing dogfood targets, prefer apps, CLIs, or agent-facing tools with a