humanish 0.116.0 → 0.117.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/actors/codex/restricted-participant-policy.d.ts +0 -2
  3. package/dist/actors/codex/restricted-participant-policy.js +4 -32
  4. package/dist/actors/codex/restricted-participant.d.ts +5 -0
  5. package/dist/actors/codex/restricted-participant.js +3 -2
  6. package/dist/actors/computer-use/actor.d.ts +4 -0
  7. package/dist/actors/computer-use/actor.js +2 -0
  8. package/dist/actors/computer-use/loop/actions.d.ts +4 -4
  9. package/dist/actors/computer-use/loop/actions.js +25 -18
  10. package/dist/actors/computer-use/loop/session.d.ts +3 -0
  11. package/dist/actors/computer-use/loop/session.js +9 -1
  12. package/dist/actors/computer-use/loop/trace.js +1 -0
  13. package/dist/actors/computer-use/loop/types.d.ts +16 -14
  14. package/dist/actors/computer-use/loop.d.ts +1 -1
  15. package/dist/actors/computer-use/loop.js +1 -1
  16. package/dist/actors/computer-use/wait.d.ts +74 -0
  17. package/dist/actors/computer-use/wait.js +100 -0
  18. package/dist/actors/contract.d.ts +14 -0
  19. package/dist/browser-control/protocol.d.ts +86 -6
  20. package/dist/browser-control/protocol.js +13 -6
  21. package/dist/guest/desktop-executor.js +3 -1
  22. package/dist/observer-app.html +7 -7
  23. package/dist/routes/computer-use/e2b-desktop/prepare.js +40 -31
  24. package/dist/routes/computer-use/local-vm.js +5 -2
  25. package/dist/routes/computer-use/participant-model.js +9 -0
  26. package/dist/routes/computer-use/plan.js +4 -2
  27. package/dist/routes/computer-use/types.d.ts +1 -1
  28. package/dist/routes/shared-world/plan.js +2 -1
  29. package/dist/routes/terminal/live-sandbox.d.ts +1 -1
  30. package/dist/routes/terminal/live-sandbox.js +14 -11
  31. package/dist/routes/terminal/sandbox.d.ts +4 -3
  32. package/dist/routes/terminal/sandbox.js +5 -5
  33. package/dist/study/config.js +4 -1
  34. package/dist/study/keys.d.ts +2 -0
  35. package/dist/study/keys.js +2 -0
  36. package/dist/study/migrate/v2.js +2 -1
  37. package/dist/study/parse/actors.js +8 -0
  38. package/dist/study/plan-participants.d.ts +4 -0
  39. package/dist/study/plan-participants.js +4 -0
  40. package/dist/study/types.d.ts +14 -0
  41. package/dist/study/validation.d.ts +5 -0
  42. package/dist/study/validation.js +8 -0
  43. package/dist/study/warnings.js +12 -0
  44. package/dist/subject/serve.d.ts +3 -0
  45. package/dist/subject/serve.js +4 -1
  46. package/dist/substrates/detached.js +14 -7
  47. package/dist/substrates/e2b/desktop-executor.d.ts +0 -2
  48. package/dist/substrates/e2b/desktop-executor.js +3 -3
  49. package/dist/tui-app.js +117 -116
  50. package/docs/architecture/browser-control.md +10 -4
  51. package/docs/contracts/schemas.md +19 -11
  52. package/package.json +2 -2
@@ -103,10 +103,16 @@ Observation requires a PNG and state signature. It may include bounded URL,
103
103
  title, text, fractional scroll position and heard speech; those remain
104
104
  runtime-only under the existing loop contract. Arbitrary `appState` is refused
105
105
  because v1 has no closed schema for it. The protocol does not truncate strings,
106
- round coordinates, or silently drop unsupported state. A Codex participant's
107
- `humanish_ui` call is checked before it reaches the protocol: a wait longer than 30 seconds is
108
- shortened to 30 seconds there, and the trace records a `wait shortened` notice with both
109
- durations.
106
+ round coordinates, or silently drop unsupported state. A participant may ask for a
107
+ longer wait than one request carries. The computer-use loop shortens it to the study's
108
+ `actor.maxWaitMs` (by default two minutes, or 30 seconds on a desktop with speech, whose heard
109
+ speech reaches the participant only with a screenshot), records a `wait shortened` notice with both
110
+ durations when it does, and sends the rest as consecutive waits of at most 30 seconds. The Codex
111
+ participant's `humanish_ui` schema leaves a wait's length open for that reason; the wire still
112
+ refuses a single wait over 30 seconds. A wait that names no duration, as every OpenAI computer-use
113
+ wait does, reaches the desktop with a length too: the study's `actor.idleWaitMs` (5 seconds by
114
+ default) when the participant's turn only waits or takes screenshots, and 500 ms after an action in
115
+ the same turn.
110
116
 
111
117
  Click, double-click, move, scroll and drag may carry `heldKeys`, which the
112
118
  OpenAI provider maps from its computer tool's `keys`. The Codex participant's
@@ -76,17 +76,17 @@ map each one to its v3 key.
76
76
  A study declares its route and composes code primitives; it is not a hardcoded kind. The
77
77
  top-level keys:
78
78
 
79
- | Key | Meaning |
80
- | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
81
- | `schema`, `id`, `title`, `description` | the document's identity |
82
- | `route` | required: `preview`, `computer-use`, `shared-world`, `terminal` or `scripted` |
83
- | `mode` | `dry-run` (the default) or `live` |
84
- | `actor` | who drives it, one object: `type`, `model`, `localAgent`, `persona`, `mission`, `tasks`, `maxOutputTokens`, `reasoningEffort`, `stopWhen`, `dwell` |
85
- | `participants` | a count, a homogeneous `{ count, instruction }`, or a list of entries (below) |
86
- | `surfaces` | scripted only: `[desktop]` or `[desktop, mobile]` |
87
- | `caps` | the route's budget (below) |
88
- | `scenario` | scripted only: a committed scenario id or path |
89
- | `subject`, `execution`, `policies`, `review`, `defaults`, `comms` | as below |
79
+ | Key | Meaning |
80
+ | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
81
+ | `schema`, `id`, `title`, `description` | the document's identity |
82
+ | `route` | required: `preview`, `computer-use`, `shared-world`, `terminal` or `scripted` |
83
+ | `mode` | `dry-run` (the default) or `live` |
84
+ | `actor` | who drives it, one object: `type`, `model`, `localAgent`, `persona`, `mission`, `tasks`, `maxOutputTokens`, `maxWaitMs`, `idleWaitMs`, `reasoningEffort`, `stopWhen`, `dwell` |
85
+ | `participants` | a count, a homogeneous `{ count, instruction }`, or a list of entries (below) |
86
+ | `surfaces` | scripted only: `[desktop]` or `[desktop, mobile]` |
87
+ | `caps` | the route's budget (below) |
88
+ | `scenario` | scripted only: a committed scenario id or path |
89
+ | `subject`, `execution`, `policies`, `review`, `defaults`, `comms` | as below |
90
90
 
91
91
  The parser reads only the declared route's keys. A key that route never reads is an error that
92
92
  names the route, such as "route: computer-use does not read scenario. Remove it.", and an
@@ -985,6 +985,14 @@ Core-owned fields:
985
985
  “provider reply cut off by the output limit; asking again” notice. A second
986
986
  cut-off reply to the same request ends the session with
987
987
  `stopCause: provider_output_limit`.
988
+ - optional `waitSettings`: the wait lengths a computer-use participant's session
989
+ applied, in milliseconds, defaults included. `maxWaitMs` is the longest one
990
+ wait action lasts (`actor.maxWaitMs`); a longer wait is shortened to it.
991
+ `idleWaitMs` is how long a wait that names no duration lasts in a turn that
992
+ only waits or takes screenshots (`actor.idleWaitMs`), and `settleWaitMs` how
993
+ long such a wait lasts after an action in the same turn. Each `ui_action` for
994
+ a wait is titled with the length it lasted. Absent on other routes and on
995
+ earlier bundles
988
996
  - optional `conversation`: how the first-party OpenAI computer-use provider
989
997
  carried the conversation between requests. `mode` is `threaded` (the server
990
998
  kept it through `previous_response_id`) or `explicit_context` (the server kept
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "humanish",
3
- "version": "0.116.0",
3
+ "version": "0.117.0",
4
4
  "description": "Synthetic user research for apps, CLIs, and agent-facing product flows.",
5
5
  "keywords": [
6
6
  "cli",
@@ -91,7 +91,7 @@
91
91
  "comms:agentmail:contract": "node --import tsx scripts/agentmail-contract-check.mjs",
92
92
  "format": "oxfmt",
93
93
  "format:check": "oxfmt --check",
94
- "lint": "node scripts/check-lint-cap.mjs --max-warnings=436",
94
+ "lint": "node scripts/check-lint-cap.mjs --max-warnings=426",
95
95
  "knip": "knip",
96
96
  "prose:check": "node scripts/check-code-prose.mjs",
97
97
  "vocabulary:check": "tsx scripts/check-retired-words.ts",