humanish 0.110.0 → 0.110.1

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 (132) hide show
  1. package/ARCHITECTURE.md +14 -11
  2. package/CHANGELOG.md +13 -0
  3. package/CONTEXT.md +8 -6
  4. package/README.md +96 -47
  5. package/dist/actors/computer-use/loop/ending.js +4 -4
  6. package/dist/actors/local-agent/claude-participant.d.ts +74 -0
  7. package/dist/actors/local-agent/claude-participant.js +243 -0
  8. package/dist/actors/local-agent/claude-session.d.ts +16 -3
  9. package/dist/actors/local-agent/claude-session.js +64 -23
  10. package/dist/actors/local-agent/cli.d.ts +11 -0
  11. package/dist/actors/local-agent/cli.js +103 -24
  12. package/dist/actors/local-agent/readiness.d.ts +2 -2
  13. package/dist/actors/local-agent/readiness.js +18 -11
  14. package/dist/cli/commands/analyze.js +21 -5
  15. package/dist/cli/commands/run-signals.d.ts +2 -0
  16. package/dist/cli/commands/run-signals.js +96 -44
  17. package/dist/cli/commands/runs.d.ts +5 -0
  18. package/dist/cli/commands/runs.js +86 -70
  19. package/dist/cli/commands/study-route-computer-use.js +2 -0
  20. package/dist/cli/commands/study-route-scripted.js +2 -0
  21. package/dist/cli/commands/study-route-shared-world.js +2 -0
  22. package/dist/cli/commands/study-route-terminal.js +2 -0
  23. package/dist/cli/doctor.d.ts +4 -1
  24. package/dist/cli/doctor.js +42 -4
  25. package/dist/cli/findings.d.ts +103 -0
  26. package/dist/cli/findings.js +316 -0
  27. package/dist/cli/first-run-path.d.ts +5 -4
  28. package/dist/cli/first-run-path.js +14 -7
  29. package/dist/cli/io.js +2 -1
  30. package/dist/cli/product-sentence.d.ts +3 -3
  31. package/dist/cli/product-sentence.js +3 -3
  32. package/dist/keys/env-file.d.ts +4 -0
  33. package/dist/keys/env-file.js +17 -0
  34. package/dist/observer/data.d.ts +14 -1
  35. package/dist/observer/data.js +19 -9
  36. package/dist/observer/library.d.ts +4 -0
  37. package/dist/observer/library.js +18 -15
  38. package/dist/observer/render.js +8 -2
  39. package/dist/observer/run-routes.d.ts +2 -0
  40. package/dist/observer/run-routes.js +43 -34
  41. package/dist/observer-app.html +3 -3
  42. package/dist/routes/computer-use/bundle.js +3 -1
  43. package/dist/routes/computer-use/fanout-records.js +1 -1
  44. package/dist/routes/computer-use/participant-execution.js +3 -1
  45. package/dist/routes/computer-use/participant-model.js +5 -2
  46. package/dist/routes/computer-use/plan.js +4 -4
  47. package/dist/routes/computer-use/preflight.js +1 -1
  48. package/dist/routes/computer-use/result.js +17 -28
  49. package/dist/routes/computer-use/single-bundle.js +7 -1
  50. package/dist/routes/scripted/bundle.js +4 -2
  51. package/dist/routes/scripted/plan.js +2 -2
  52. package/dist/routes/scripted/result.d.ts +3 -5
  53. package/dist/routes/scripted/result.js +16 -22
  54. package/dist/routes/scripted/scenario.js +4 -4
  55. package/dist/routes/shared-world/bundle-records.js +6 -1
  56. package/dist/routes/shared-world/bundle.js +2 -0
  57. package/dist/routes/shared-world/plan.js +1 -1
  58. package/dist/routes/shared-world/result.js +22 -22
  59. package/dist/routes/terminal/bundle.js +4 -2
  60. package/dist/routes/terminal/dry-run.js +8 -12
  61. package/dist/routes/terminal/ledger.d.ts +3 -3
  62. package/dist/routes/terminal/ledger.js +6 -6
  63. package/dist/routes/terminal/live-finish.js +15 -13
  64. package/dist/routes/terminal/plan.js +4 -4
  65. package/dist/routes/terminal/result.d.ts +6 -7
  66. package/dist/routes/terminal/result.js +6 -22
  67. package/dist/routes/terminal/session.js +1 -1
  68. package/dist/run/bundle-shape.d.ts +3 -1
  69. package/dist/run/bundle-shape.js +25 -1
  70. package/dist/run/bundle.d.ts +24 -0
  71. package/dist/run/display.d.ts +59 -0
  72. package/dist/run/display.js +106 -0
  73. package/dist/run/dry-run.js +11 -7
  74. package/dist/run/judge.d.ts +3 -2
  75. package/dist/run/judge.js +10 -0
  76. package/dist/run/pricing.js +1 -1
  77. package/dist/run/projection.d.ts +0 -2
  78. package/dist/run/projection.js +0 -11
  79. package/dist/run/reclaim-outcomes.d.ts +89 -0
  80. package/dist/run/reclaim-outcomes.js +213 -0
  81. package/dist/run/reclaim.d.ts +18 -17
  82. package/dist/run/reclaim.js +180 -113
  83. package/dist/run/results.d.ts +10 -20
  84. package/dist/run/results.js +2 -2
  85. package/dist/run/run-index.d.ts +11 -1
  86. package/dist/run/run-index.js +11 -0
  87. package/dist/run/run.d.ts +34 -18
  88. package/dist/run/run.js +166 -67
  89. package/dist/run/sandbox-creates.d.ts +59 -0
  90. package/dist/run/sandbox-creates.js +138 -0
  91. package/dist/run/sandbox-receipts.d.ts +14 -0
  92. package/dist/run/sandbox-receipts.js +44 -0
  93. package/dist/run/stats.d.ts +5 -0
  94. package/dist/run/stats.js +8 -4
  95. package/dist/run/status.d.ts +6 -9
  96. package/dist/run/status.js +7 -23
  97. package/dist/run/stored-runs.d.ts +5 -14
  98. package/dist/run/stored-runs.js +31 -146
  99. package/dist/run/streams.d.ts +3 -2
  100. package/dist/study/doctor.d.ts +1 -1
  101. package/dist/study/doctor.js +5 -2
  102. package/dist/study/init.js +14 -3
  103. package/dist/study/keys.d.ts +12 -0
  104. package/dist/study/keys.js +32 -0
  105. package/dist/study/persona.d.ts +4 -0
  106. package/dist/study/persona.js +4 -2
  107. package/dist/substrates/e2b/peer-install.d.ts +51 -0
  108. package/dist/substrates/e2b/peer-install.js +161 -0
  109. package/dist/substrates/e2b/sandbox.d.ts +34 -6
  110. package/dist/substrates/e2b/sandbox.js +128 -35
  111. package/dist/substrates/e2b/sdk.d.ts +33 -0
  112. package/dist/substrates/e2b/sdk.js +21 -21
  113. package/dist/substrates/shell.d.ts +2 -0
  114. package/dist/substrates/shell.js +4 -0
  115. package/dist/tui-app.js +133 -133
  116. package/dist/verify/liveness.d.ts +19 -3
  117. package/dist/verify/liveness.js +46 -25
  118. package/dist/verify/verify.d.ts +3 -0
  119. package/dist/verify/verify.js +6 -2
  120. package/docs/architecture/actor-contract.md +2 -1
  121. package/docs/architecture/observer.md +22 -7
  122. package/docs/architecture/task-protocol-support.md +13 -13
  123. package/docs/architecture/terminal-product-route.md +1 -1
  124. package/docs/contracts/run-bundle.md +75 -6
  125. package/docs/contracts/schemas.md +39 -22
  126. package/docs/contracts/study-analysis.md +45 -0
  127. package/docs/contracts/study-costs.md +8 -0
  128. package/docs/decisions/0001-run-bundle-is-the-source-of-truth.md +3 -0
  129. package/docs/decisions/0003-contained-paths-and-cleanup-authority.md +9 -3
  130. package/docs/principles/invariants-and-defaults.md +11 -8
  131. package/package.json +4 -3
  132. package/skills/humanish/SKILL.md +16 -2
@@ -29,6 +29,14 @@ They do not suddenly include a separate analysis request. The bundle's
29
29
  `cost.estimatedTotalUsd`, `status.json`'s `outcome.estimatedCostUsd` and the run
30
30
  index's `estimatedCostUsd` stay participants and desktops only.
31
31
 
32
+ Each study's `passed` counts the runs that show as passed on every surface
33
+ (`runDisplay` in `src/run/display.ts`): a `pass` verdict and a run whose own `ok`
34
+ is not false. `passRate` divides it by `judged`, the runs with a verdict.
35
+ `totals.verdicts` counts the participants' verdicts; `totals.outcomes` counts
36
+ every selected run by its display state (`passed`, `failed`, `blocked`,
37
+ `timed_out`, `no_verdict`, `dry_run`, `interrupted`, `running`, `unknown`), and
38
+ the human output prints that line.
39
+
32
40
  ## One run's cost
33
41
 
34
42
  A run's analysis spend has one reader, `readAnalysisAccounting` in
@@ -18,6 +18,9 @@ the evidence. Everything else is a projection rebuilt from them:
18
18
  - `status.json` (`humanish.run-status.v1`) is a liveness index. When it disagrees with `run.json`,
19
19
  `run.json` wins. `verify` reads it, with the sandbox and reclaim receipts, only to say a run
20
20
  did not finish (`RUN_NOT_FINISHED`). That warning changes no check and no grade.
21
+ - A run's `ok` and execution outcome are in `run.json`'s `outcome`, and `status.json` copies them.
22
+ A `status.json` written before `run.json` carried an outcome holds the only copy of that run's
23
+ `ok`, so readers fall back to it for such a run only.
21
24
  - Analysis findings cite turns and artifacts in the bundle.
22
25
 
23
26
  ## Consequences
@@ -1,6 +1,7 @@
1
1
  # 0003: Managed paths bind to physical identities; cleanup uses create-time receipts
2
2
 
3
- Accepted in 0.15.1, extended in 0.36.0 (`humanish reclaim`).
3
+ Accepted in 0.15.1, extended in 0.36.0 (`humanish reclaim`) and after 0.110.0 (search by owner
4
+ tags).
4
5
 
5
6
  ## Context
6
7
 
@@ -18,11 +19,16 @@ Separately, an account-wide provider operation once destroyed unrelated infrastr
18
19
  - The process that creates a resource cleans it up with the handle it holds. After a crash,
19
20
  `humanish reclaim` kills sandboxes by the exact ids journaled at create time in the run's
20
21
  `sandbox-receipts.ndjson`, and reports each outcome.
21
- - No route lists an account's resources to find or verify its own.
22
+ - Nothing lists an account's resources unfiltered. Every sandbox carries its run's owner tags
23
+ (`tool`, `runId`, `runKey`), and reclaim lists only the sandboxes E2B matches to all three,
24
+ checks each tag again before it acts, and stops after three pages. A sandbox whose id never
25
+ reached a receipt, from a create that threw after E2B allocated or a process that died
26
+ mid-create, is otherwise unreachable until its timeout.
22
27
 
23
28
  ## Consequences
24
29
 
25
- - A shared operator key is safe to use: humanish reaches only resources it created.
30
+ - A shared operator key is safe to use: humanish reaches only resources it created. `runKey` keeps
31
+ two projects that reuse a run id from matching each other's sandboxes.
26
32
  - An exported bundle does not carry cleanup authority; `export` omits the receipt journal.
27
33
  - Unverified git metadata (arbitrary `gitdir:` redirects) is reported as unavailable instead of
28
34
  followed.
@@ -66,14 +66,17 @@ certify (see the conformance suite).
66
66
  6. **Claims match mechanism.** A config field that is parsed but not consumed warns; a
67
67
  document that overstates behavior is a defect; an evidence artifact never claims a
68
68
  stronger evidence class than its actor and scenario can support.
69
- 7. **Reclamation is by exact created id, never account-wide enumeration.** A route that
70
- creates a provider resource (an E2B sandbox, for example) tracks the exact id it created and
71
- reclaims and proves cleanup against that id alone (a returned found-and-killed boolean, a
72
- getInfo-by-id NotFound check). No route ever calls a provider's list-everything endpoint to
73
- discover or verify its own cleanup, because that endpoint enumerates the whole account/team,
74
- including resources humanish did not create. This is what makes a single shared operator key
75
- safe: humanish only ever reaches a resource it created, never anything else the key's owner
76
- is running.
69
+ 7. **Reclamation is by exact created id or the run's exact owner tags, never account-wide
70
+ enumeration.** A route that creates a provider resource (an E2B sandbox, for example) tracks
71
+ the exact id it created and reclaims and proves cleanup against that id alone (a returned
72
+ found-and-killed boolean, a getInfo-by-id NotFound check). No route ever calls a provider's
73
+ list endpoint unfiltered to discover or verify its own cleanup, because that enumerates the
74
+ whole account/team, including resources humanish did not create. The one listing is reclaim's
75
+ search for a sandbox whose id never reached the run: every sandbox carries its run's owner
76
+ tags (`tool`, `runId`, `runKey`), E2B filters by all three, reclaim checks each tag again
77
+ before it acts, and it reads at most three pages. This is what makes a single shared operator
78
+ key safe: humanish only ever reaches a resource it created, never anything else the key's
79
+ owner is running.
77
80
  The one narrow exception is an explicit, maintainer-run orphan sweep (never a default, never
78
81
  reachable by a normal run) that is itself opt-in gated (an explicit flag or env var) and
79
82
  documented as such at its call site.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "humanish",
3
- "version": "0.110.0",
3
+ "version": "0.110.1",
4
4
  "description": "Synthetic user research for apps, CLIs, and agent-facing product flows.",
5
5
  "keywords": [
6
6
  "cli",
@@ -56,10 +56,11 @@
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 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 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 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
+ "cli:peer:test": "node scripts/peer-install-proof.mjs",
63
64
  "humanish": "tsx src/cli.ts",
64
65
  "pack:dry-run": "npm pack --dry-run",
65
66
  "prepack": "pnpm build",
@@ -75,7 +76,7 @@
75
76
  "release:dogfood": "node scripts/release-dogfood.mjs",
76
77
  "browser-control:proof": "node scripts/browser-control-proof.mjs",
77
78
  "docs:generate": "tsx scripts/generate-cli-docs.ts",
78
- "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",
79
+ "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",
79
80
  "observer:browser:proof": "node scripts/observer-browser-proof.mjs",
80
81
  "observer:iframe:proof": "node --import tsx scripts/observer-iframe-proof.mjs",
81
82
  "observer:chrome:proof": "node scripts/observer-chrome-proof.mjs",
@@ -35,7 +35,7 @@ Everything it shows has a machine-readable equivalent, which is what you want:
35
35
  | browsing studies | `npx humanish study list --json` |
36
36
  | browsing runs | `npx humanish runs --json` |
37
37
  | starting a run | `npx humanish run <study> --json --no-open` |
38
- | a run's outcome | `npx humanish review --run <id> --json` |
38
+ | a run's findings | `npx humanish review --run <id> --json` |
39
39
  | communication setup | `npx humanish comms providers --json` and `npx humanish comms connections list --json` |
40
40
 
41
41
  If a human asks you to "open the TUI", tell them the command to type; do not run
@@ -454,7 +454,21 @@ publish their names, screenshots, logs, source snippets, or operational details.
454
454
 
455
455
  ## Reporting Back
456
456
 
457
- Report:
457
+ After a live run, read its findings before anything else:
458
+
459
+ ```bash
460
+ npx humanish review --run <id> # the verdict, then each analysis finding
461
+ npx humanish review --run <id> --json # the same; findings are under `analysis`
462
+ ```
463
+
464
+ Report each finding to the user: its title, impact, confidence and recovery, the participants it
465
+ affected, and the capture files it cites. These come from the post-run analysis of the evidence.
466
+ Label the participant's own report in the review summary as the participant's account. When
467
+ `analysis.state` is not `ready`, report `analysis.message` and the `analysis.next` command in
468
+ place of findings; `analysis.next` is null when no command can produce them. `latest` moves with
469
+ every run, including dry runs, so use the run id the run printed.
470
+
471
+ Then report:
458
472
 
459
473
  - files changed in the target repo;
460
474
  - exact proof commands run;