humanish 0.134.0 → 0.135.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/CHANGELOG.md +15 -0
- package/dist/analysis/automatic-config.js +5 -3
- package/dist/analysis/execute.js +2 -1
- package/dist/analysis/service.js +2 -1
- package/dist/evidence/encoded-text.d.ts +13 -3
- package/dist/evidence/encoded-text.js +88 -25
- package/dist/observer/page-data.d.ts +6 -0
- package/dist/observer/page-data.js +34 -7
- package/dist/observer/participant-items.d.ts +15 -1
- package/dist/observer/participant-items.js +4 -3
- package/dist/observer/run-routes.js +4 -4
- package/dist/observer-app.html +4 -4
- package/dist/routes/computer-use/fanout-bundle.js +3 -3
- package/dist/routes/computer-use/participant-runs.js +2 -2
- package/dist/routes/computer-use/single-bundle.js +3 -3
- package/dist/routes/scripted/setup.js +62 -17
- package/dist/routes/shared-world/bundle.js +3 -3
- package/dist/routes/shared-world/participant-specs.js +2 -2
- package/dist/routes/terminal/bundle.js +2 -2
- package/dist/run/run.js +4 -3
- package/dist/run-study.d.ts +3 -3
- package/dist/run-study.js +3 -3
- package/dist/study/bundle-estimate.d.ts +0 -2
- package/dist/study/bundle-estimate.js +10 -16
- package/dist/study/config.d.ts +4 -3
- package/dist/study/config.js +8 -5
- package/dist/study/parse/actors.d.ts +6 -0
- package/dist/study/parse/actors.js +14 -0
- package/dist/study/parse/subject-state.js +4 -4
- package/dist/study/participant-assignment.js +2 -2
- package/dist/study/persona.d.ts +7 -1
- package/dist/study/persona.js +13 -5
- package/dist/study/plan-base.js +4 -3
- package/docs/architecture/observer.md +24 -7
- package/docs/contracts/run-bundle.md +3 -0
- package/docs/contracts/study-analysis.md +4 -3
- package/docs/decisions/0002-observer-is-one-self-contained-file.md +3 -3
- package/package.json +1 -1
|
@@ -39,10 +39,22 @@ account participant's `executionProfile` without its receipts. `events.ndjson` i
|
|
|
39
39
|
contract that live adapters update while a run is active.
|
|
40
40
|
|
|
41
41
|
`observer/index.html` carries both parts: the data slot holds observer-data.json's
|
|
42
|
-
content, and `<script id="observer-items" type="application/
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
content, and `<script id="observer-items" type="application/json">` holds the items
|
|
43
|
+
and full artifact lists by stream id (`humanish.observer-items.v2`) as
|
|
44
|
+
`{ schema, runId, streams }`, where `streams` lists one entry for each participant: its
|
|
45
|
+
JSON with its stream id, gzip-compressed in base64, which a `file://` page decodes
|
|
46
|
+
without a fetch. The ids stay inside the compressed entries because verify's scan
|
|
47
|
+
reads the element's plain text. There, an id such as `GITHUB_TOKEN` before a long
|
|
48
|
+
base64 value reads as a credential, and `https://` with a later id shaped like an
|
|
49
|
+
address at an E2B host reads as one E2B URL across the base64 between them. Each participant is packed
|
|
50
|
+
(`src/observer/page-data.ts`) and decoded (`observer/lib/data.ts`) on its own, so no
|
|
51
|
+
string holds two participants' items. A run of 25 participants with
|
|
52
|
+
30 MiB traces, 786 MB together, past V8's longest string of 536,870,888 characters,
|
|
53
|
+
renders to a 138 MiB page. The page itself is one string, at about 0.18 characters
|
|
54
|
+
for each trace byte, so it passes that limit near 3 GB of traces, and memory may run
|
|
55
|
+
out first; neither has been measured past 25 participants. Real trace items compress
|
|
56
|
+
about eight times. The page
|
|
57
|
+
joins the two before it renders
|
|
46
58
|
(`joinObserverData` in `src/observer/participant-items.ts`), so every view reads the
|
|
47
59
|
same data as before. A stream whose screenshot entries moved records how many in
|
|
48
60
|
`screenshotArtifacts`, and the page renders nothing from items that are another
|
|
@@ -83,9 +95,14 @@ public-safe metadata.
|
|
|
83
95
|
|
|
84
96
|
The browser polls `observer-feed.json` with `no-store` caching: the server's
|
|
85
97
|
projection of the run as `{ data, items }`, observer-data.json's content and the
|
|
86
|
-
items
|
|
87
|
-
|
|
88
|
-
|
|
98
|
+
items packed as the page packs them (`observerFeedBody`), from one read of the run
|
|
99
|
+
per poll. The feed compresses each entry at gzip level 1 on the libuv thread pool, one
|
|
100
|
+
participant at a time, so the server answers other requests while it builds a poll.
|
|
101
|
+
Every poll sends every finished participant's items again: on the 25-participant run
|
|
102
|
+
above a poll takes 17 to 20 seconds, past the 15 seconds the page waits, so that page
|
|
103
|
+
never updates and says the server stopped answering. While a participant runs, its entry in `items` carries `live`, a cursor
|
|
104
|
+
`<position>.<generation>.<items>.<bytes>` naming its live file
|
|
105
|
+
(`live/<position>.<generation>.ndjson`) and how far the list goes. The page
|
|
89
106
|
sends the cursors of its last body back as `?after=<cursor>,<cursor>`, and the server
|
|
90
107
|
then reads and sends only the items past each one, marking that entry with
|
|
91
108
|
`liveAfter`, the cursor they follow (`src/observer/feed-cursors.ts`). A cursor for an
|
|
@@ -153,6 +153,9 @@ projection is served.
|
|
|
153
153
|
observer-data.json is built from the loaded bundle. From 0.124.0 it leaves out each participant's
|
|
154
154
|
trace items, which stay in the traces, and from this release it is `humanish.observer-data.v3`,
|
|
155
155
|
which also leaves out each participant's per-request lists (docs/architecture/observer.md).
|
|
156
|
+
The Observer page and `observer-feed.json` carry the items as `humanish.observer-items.v2`, each
|
|
157
|
+
participant's entry gzip-compressed on its own, so `humanish observe` renders a run whose traces
|
|
158
|
+
together pass V8's longest string. It was measured on 25 participants with 30 MiB traces.
|
|
156
159
|
|
|
157
160
|
## Per-request lists
|
|
158
161
|
|
|
@@ -287,9 +287,10 @@ value inside a bracketed span, such as `[REDACTED_373433393231]`, is found too:
|
|
|
287
287
|
humanish writes (`[REDACTED_SECRET]`, `[REDACTED_LOCAL_PATH]`, `[REDACTED_RUNTIME_PATH]`,
|
|
288
288
|
`[REDACTED_PROMPT_TEXT]`, `[REDACTED_LOBBY_CODE]`) are left as they are. If another reading of
|
|
289
289
|
the stored field still holds a value (decoded once more, with percent escapes as UTF-8, with
|
|
290
|
-
transfer escapes expanded,
|
|
291
|
-
|
|
292
|
-
these forms in an ID, enum or
|
|
290
|
+
transfer escapes expanded, with Latin-1 characters read as UTF-8 bytes, with HTML references
|
|
291
|
+
left as written, or with only HTML references decoded), as for a value encoded twice, the whole
|
|
292
|
+
field becomes `[REDACTED_SECRET]`. A known value in any of these forms in an ID, enum or
|
|
293
|
+
reference refuses the response.
|
|
293
294
|
|
|
294
295
|
When a reviewer amends a finding, its headline and experience describe the replaced claim.
|
|
295
296
|
Text output, the Observer and feedback drafts show the reviewer's claim in their place and say the
|
|
@@ -13,9 +13,9 @@ exactly those cases.
|
|
|
13
13
|
The `observer/` workspace builds with Vite into a single HTML file with fonts inlined and no
|
|
14
14
|
network references. The root build copies it to `dist/observer-app.html`. `renderObserverHtml`
|
|
15
15
|
is the one path every surface (observe, observe --all, watch, studies) uses; it injects the run's
|
|
16
|
-
`humanish.observer-data.v3` snapshot into that file, with
|
|
17
|
-
gzip-compressed (docs/architecture/observer.md). There is no second renderer and
|
|
18
|
-
flag; rolling back means pinning an older package version.
|
|
16
|
+
`humanish.observer-data.v3` snapshot into that file, with each participant's trace items beside
|
|
17
|
+
it, gzip-compressed on their own (docs/architecture/observer.md). There is no second renderer and
|
|
18
|
+
no feature flag; rolling back means pinning an older package version.
|
|
19
19
|
|
|
20
20
|
## Consequences
|
|
21
21
|
|