humanish 0.39.0 → 0.41.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 (60) hide show
  1. package/README.md +5 -2
  2. package/dist/actor-contract.d.ts +24 -1
  3. package/dist/actor-contract.js +4 -0
  4. package/dist/actor-contract.js.map +1 -1
  5. package/dist/claude-agent-sdk.js +4 -0
  6. package/dist/claude-agent-sdk.js.map +1 -1
  7. package/dist/comms-sandbox-catch.d.ts +8 -1
  8. package/dist/comms-sandbox-catch.js +128 -1
  9. package/dist/comms-sandbox-catch.js.map +1 -1
  10. package/dist/computer-use-actor.d.ts +1 -1
  11. package/dist/computer-use.d.ts +13 -1
  12. package/dist/computer-use.js +100 -14
  13. package/dist/computer-use.js.map +1 -1
  14. package/dist/concurrent-shared-world-lab.js +1 -1
  15. package/dist/concurrent-shared-world-lab.js.map +1 -1
  16. package/dist/cua-actor-lab.js +114 -9
  17. package/dist/cua-actor-lab.js.map +1 -1
  18. package/dist/e2b-desktop-executor.d.ts +21 -6
  19. package/dist/e2b-desktop-executor.js +65 -21
  20. package/dist/e2b-desktop-executor.js.map +1 -1
  21. package/dist/init-templates.js +4 -1
  22. package/dist/init-templates.js.map +1 -1
  23. package/dist/lab-config.d.ts +48 -1
  24. package/dist/lab-config.js +130 -2
  25. package/dist/lab-config.js.map +1 -1
  26. package/dist/observer-assets.js +8 -1
  27. package/dist/observer-assets.js.map +1 -1
  28. package/dist/observer-data.d.ts +12 -0
  29. package/dist/observer-data.js +13 -1
  30. package/dist/observer-data.js.map +1 -1
  31. package/dist/openai-responses-cu.js +10 -1
  32. package/dist/openai-responses-cu.js.map +1 -1
  33. package/dist/orientation.d.ts +29 -0
  34. package/dist/orientation.js +95 -0
  35. package/dist/orientation.js.map +1 -0
  36. package/dist/pi-agent-core.js +4 -0
  37. package/dist/pi-agent-core.js.map +1 -1
  38. package/dist/pricing.d.ts +8 -0
  39. package/dist/pricing.js +22 -6
  40. package/dist/pricing.js.map +1 -1
  41. package/dist/program.js +13 -0
  42. package/dist/program.js.map +1 -1
  43. package/dist/run.d.ts +55 -2
  44. package/dist/run.js +74 -1
  45. package/dist/run.js.map +1 -1
  46. package/dist/scripted-browser-lab.js +1 -1
  47. package/dist/scripted-browser-lab.js.map +1 -1
  48. package/dist/shared-world-lab.js +1 -1
  49. package/dist/shared-world-lab.js.map +1 -1
  50. package/dist/subject-runtime.d.ts +23 -0
  51. package/dist/subject-runtime.js +70 -0
  52. package/dist/subject-runtime.js.map +1 -0
  53. package/dist/tasks.d.ts +77 -0
  54. package/dist/tasks.js +101 -0
  55. package/dist/tasks.js.map +1 -0
  56. package/docs/contracts/schemas.md +1 -1
  57. package/docs/goals/current.md +2 -2
  58. package/docs/principles/three-roles.md +68 -0
  59. package/docs/ramp/README.md +1 -1
  60. package/package.json +1 -1
@@ -91,11 +91,26 @@ export declare class CuaTypeFallbackError extends Error {
91
91
  */
92
92
  export declare function createE2BDesktopExecutor(desktop: E2BDesktopLike, options?: E2BDesktopExecutorOptions): CuaExecutor;
93
93
  /**
94
- * A coarse perceptual hash of a PNG frame for no-progress detection. Decodes the
95
- * PNG, area-averages it to a SIGNATURE_GRID x SIGNATURE_GRID grayscale grid,
96
- * quantizes each cell to 2 bits (gray >> 6, four levels), and packs the
97
- * (SIGNATURE_GRID^2) two-bit cells into a compact hex string. Deterministic (no
98
- * Date, no random). Returns SIGNATURE_FALLBACK on any decode failure so two
99
- * unreadable frames compare equal.
94
+ * A perceptual hash of a PNG frame for no-progress detection. Decodes the PNG, area-averages it to
95
+ * a SIGNATURE_GRID x SIGNATURE_GRID grayscale grid, CONTRAST-NORMALIZES that grid, quantizes each
96
+ * cell to SIGNATURE_LEVELS, and packs the cells into a hex string. Deterministic (no Date, no
97
+ * random). Returns SIGNATURE_FALLBACK on any decode failure so two unreadable frames compare equal.
98
+ *
99
+ * Why normalization, and why this grid (#383). The original was 16x16 at 2 bits per cell with no
100
+ * normalization. On a 1440x950 desktop that is one cell per ~90x59 px, and on a light-themed web app
101
+ * the area-average of nearly every cell lands at the top of the range: a measured run had 93% of the
102
+ * 256 cells pinned to level 3 and levels 0 and 1 never used at all. The hash was effectively a
103
+ * constant, so renaming a row in a sidebar, adding a list item, or opening a small panel could not
104
+ * move it — 22 frames across one run produced 5 distinct values, and 9 visibly different consecutive
105
+ * frames produced ONE. The no-progress backstop read that as a stuck agent and ended a lane that was
106
+ * a foreign key away from finishing its mission.
107
+ *
108
+ * Stretching each frame's own min..max across the full range before quantizing is what makes a
109
+ * mostly-white UI use the levels it actually has, and the finer grid shrinks a cell to ~45x30 px so
110
+ * ordinary widget-sized changes survive the averaging.
111
+ *
112
+ * This is still a coarse whole-frame hash and it is still only ONE input to the backstop — see the
113
+ * corroboration rule in computer-use.ts, which is what keeps a blind frame from ending a run on its
114
+ * own.
100
115
  */
101
116
  export declare function perceptualSignature(pngBytes: Buffer | Uint8Array): string;
@@ -235,15 +235,31 @@ export function createE2BDesktopExecutor(desktop, options = {}) {
235
235
  // the image, so exposing it (e.g. in a trace) is public-safe. On any decode
236
236
  // failure it returns a stable fallback so two unreadable frames compare equal.
237
237
  // ---------------------------------------------------------------------------
238
- const SIGNATURE_GRID = 16;
238
+ const SIGNATURE_GRID = 32;
239
+ const SIGNATURE_LEVELS = 16;
239
240
  const SIGNATURE_FALLBACK = "unreadable";
240
241
  /**
241
- * A coarse perceptual hash of a PNG frame for no-progress detection. Decodes the
242
- * PNG, area-averages it to a SIGNATURE_GRID x SIGNATURE_GRID grayscale grid,
243
- * quantizes each cell to 2 bits (gray >> 6, four levels), and packs the
244
- * (SIGNATURE_GRID^2) two-bit cells into a compact hex string. Deterministic (no
245
- * Date, no random). Returns SIGNATURE_FALLBACK on any decode failure so two
246
- * unreadable frames compare equal.
242
+ * A perceptual hash of a PNG frame for no-progress detection. Decodes the PNG, area-averages it to
243
+ * a SIGNATURE_GRID x SIGNATURE_GRID grayscale grid, CONTRAST-NORMALIZES that grid, quantizes each
244
+ * cell to SIGNATURE_LEVELS, and packs the cells into a hex string. Deterministic (no Date, no
245
+ * random). Returns SIGNATURE_FALLBACK on any decode failure so two unreadable frames compare equal.
246
+ *
247
+ * Why normalization, and why this grid (#383). The original was 16x16 at 2 bits per cell with no
248
+ * normalization. On a 1440x950 desktop that is one cell per ~90x59 px, and on a light-themed web app
249
+ * the area-average of nearly every cell lands at the top of the range: a measured run had 93% of the
250
+ * 256 cells pinned to level 3 and levels 0 and 1 never used at all. The hash was effectively a
251
+ * constant, so renaming a row in a sidebar, adding a list item, or opening a small panel could not
252
+ * move it — 22 frames across one run produced 5 distinct values, and 9 visibly different consecutive
253
+ * frames produced ONE. The no-progress backstop read that as a stuck agent and ended a lane that was
254
+ * a foreign key away from finishing its mission.
255
+ *
256
+ * Stretching each frame's own min..max across the full range before quantizing is what makes a
257
+ * mostly-white UI use the levels it actually has, and the finer grid shrinks a cell to ~45x30 px so
258
+ * ordinary widget-sized changes survive the averaging.
259
+ *
260
+ * This is still a coarse whole-frame hash and it is still only ONE input to the backstop — see the
261
+ * corroboration rule in computer-use.ts, which is what keeps a blind frame from ending a run on its
262
+ * own.
247
263
  */
248
264
  export function perceptualSignature(pngBytes) {
249
265
  let cells;
@@ -257,15 +273,15 @@ export function perceptualSignature(pngBytes) {
257
273
  if (!srcW || !srcH)
258
274
  return SIGNATURE_FALLBACK;
259
275
  cells = quantizedGrid(decoded.data, srcW, srcH);
276
+ return `${brightnessAnchor(decoded.data, srcW, srcH)}${packCells(cells)}`;
260
277
  }
261
278
  catch {
262
279
  return SIGNATURE_FALLBACK;
263
280
  }
264
- return packCells(cells);
265
281
  }
266
- /** Area-average an RGBA buffer to a grid of 2-bit (0..3) grayscale cells. */
282
+ /** Area-average an RGBA buffer to a grid of grayscale cells, contrast-normalized then quantized. */
267
283
  function quantizedGrid(data, srcW, srcH) {
268
- const cells = [];
284
+ const grays = [];
269
285
  const xRatio = srcW / SIGNATURE_GRID;
270
286
  const yRatio = srcH / SIGNATURE_GRID;
271
287
  for (let gy = 0; gy < SIGNATURE_GRID; gy += 1) {
@@ -286,22 +302,50 @@ function quantizedGrid(data, srcW, srcH) {
286
302
  n += 1;
287
303
  }
288
304
  }
289
- const gray = n ? Math.round(sum / n) : 0;
290
- // Quantize 0..255 to four levels (0..3). Clamp the 255 edge so it stays in
291
- // range (255 >> 6 === 3 already, but Math.min guards any rounding surprise).
292
- cells.push(Math.min(3, gray >> 6));
305
+ grays.push(n ? Math.round(sum / n) : 0);
293
306
  }
294
307
  }
295
- return cells;
308
+ // Stretch this frame's own range across the full scale before quantizing. Without this a light UI
309
+ // occupies a sliver at the top of 0..255 and quantizes to a near-constant (#383).
310
+ //
311
+ // The endpoints are TRIMMED rather than the raw min/max: a handful of extreme cells must not be
312
+ // able to rescale the whole frame, or a blinking text cursor would rewrite every cell and read as
313
+ // progress forever. Trimming K cells from each end clamps that away while still preserving real
314
+ // structure, which occupies far more cells than K (a row of sidebar text covers dozens).
315
+ const sorted = [...grays].sort((a, b) => a - b);
316
+ const trim = Math.max(2, Math.floor(sorted.length / 256));
317
+ const lo = sorted[Math.min(trim, sorted.length - 1)] ?? 0;
318
+ const hi = sorted[Math.max(0, sorted.length - 1 - trim)] ?? 255;
319
+ const span = hi - lo;
320
+ const top = SIGNATURE_LEVELS - 1;
321
+ return grays.map((gray) => span <= 0 ? 0 : Math.min(top, Math.max(0, Math.round(((gray - lo) / span) * top))));
296
322
  }
297
- /** Pack 2-bit cells (4 per hex... actually 2 per byte) into a compact hex string. */
323
+ /**
324
+ * The frame's overall brightness, coarsely quantized. Normalization deliberately discards absolute
325
+ * level, so this is prefixed back on for the two cases where absolute level IS the change: a uniform
326
+ * frame (an all-white blank vs an all-black screen normalize identically), and a whole-page dim such
327
+ * as a modal overlay, which preserves relative structure while changing the whole frame. Quantized
328
+ * coarsely so ordinary antialiasing noise cannot move it.
329
+ */
330
+ function brightnessAnchor(data, srcW, srcH) {
331
+ let sum = 0;
332
+ let n = 0;
333
+ const stride = Math.max(1, Math.floor((srcW * srcH) / 4096));
334
+ for (let p = 0; p < srcW * srcH; p += stride) {
335
+ const si = p * 4;
336
+ sum += ((data[si] ?? 0) + (data[si + 1] ?? 0) + (data[si + 2] ?? 0)) / 3;
337
+ n += 1;
338
+ }
339
+ const mean = n ? sum / n : 0;
340
+ return (Math.min(15, Math.floor(mean / 16))).toString(16);
341
+ }
342
+ /** Pack 4-bit cells (two per byte) into a compact hex string. */
298
343
  function packCells(cells) {
299
- // Pack four 2-bit cells per byte, then hex-encode. SIGNATURE_GRID^2 cells.
300
- const bytes = Buffer.alloc(Math.ceil(cells.length / 4));
344
+ const bytes = Buffer.alloc(Math.ceil(cells.length / 2));
301
345
  for (let i = 0; i < cells.length; i += 1) {
302
- const byteIndex = i >> 2;
303
- const shift = (i & 3) * 2;
304
- const value = (cells[i] ?? 0) & 3;
346
+ const byteIndex = i >> 1;
347
+ const shift = (i & 1) * 4;
348
+ const value = (cells[i] ?? 0) & 0xf;
305
349
  bytes[byteIndex] = (bytes[byteIndex] ?? 0) | (value << shift);
306
350
  }
307
351
  return bytes.toString("hex");
@@ -1 +1 @@
1
- {"version":3,"file":"e2b-desktop-executor.js","sourceRoot":"","sources":["../src/e2b-desktop-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAsGlE,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAC3C,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAExC,qGAAqG;AACrG,SAAS,QAAQ,CAAC,KAA0B;IAC1C,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7D,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,OAAO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AC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QACzC,MAAM,SAAS,GAAG,CAAC,IAAI,CAAC,CAAC;QACzB,MAAM,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QAC1B,MAAM,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC;QACpC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC"}
@@ -248,7 +248,10 @@ actors:
248
248
  instruction: Join the lobby you're told the code for, then play.
249
249
  execution:
250
250
  target: e2b-desktop
251
- timeoutMs: 120000 # PER-SEAT session budget; also caps the host-first handoff deadline
251
+ # PER-SEAT session budget; also caps the host-first handoff deadline. Budget for the WHOLE arc:
252
+ # seat provisioning + shared-session assembly + actual play. A first live run of the worked
253
+ # example died at 120000 with every seat expiring mid game and zero mission actions taken.
254
+ timeoutMs: 420000
252
255
  concurrency: 3 # all 3 seats live at once (the default when omitted); lower only to cap paid desktops
253
256
  scenario:
254
257
  mode: dry-run # default; the live path opens N real mobile-layout seats against the public app
@@ -1 +1 @@
1
- {"version":3,"file":"init-templates.js","sourceRoot":"","sources":["../src/init-templates.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,YAAY,GAAkB;IACzC;QACE,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;CAyBb;KACE;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE;;;;;;;;;;;;CAYb;KACE;IACD;QACE,IAAI,EAAE,2CAA2C;QACjD,KAAK,E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AAE,SAAS,EAAE;IACtD,EAAE,IAAI,EAAE,0BAA0B,EAAE,KAAK,EAAE,SAAS,EAAE;IACtD,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,SAAS,EAAE;CAChD,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAA2B;IACrD,QAAQ,EAAE,UAAU;IACpB,iBAAiB,EAAE,iBAAiB;IACpC,cAAc,EAAE,wBAAwB;IACxC,gBAAgB,EAAE,gBAAgB;IAClC,mBAAmB,EAAE,iCAAiC;IACtD,iBAAiB,EAAE,iBAAiB;CACrC,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type { LabTask } from "./tasks.js";
1
2
  import type { StopWhen } from "./stop-conditions.js";
2
3
  export declare const LAB_CONFIG_SCHEMA = "humanish.lab.v2";
3
4
  /**
@@ -200,6 +201,17 @@ export interface LabSubject {
200
201
  * on the computer-use clone route.
201
202
  */
202
203
  env?: string[];
204
+ /**
205
+ * LITERAL, NON-SECRET env values committed alongside the lab — the configuration every real app
206
+ * needs before it will boot: a public base URL, a transport selector, a feature flag. None of that
207
+ * is secret, and routing it through `subject.env` would force an adopter to carry a private env
208
+ * file just to reproduce a public study, which is the opposite of a reproducible lab.
209
+ *
210
+ * These values ARE recorded in evidence, because they are part of how the subject was configured,
211
+ * so a value that looks like a secret or a local path is refused at parse rather than committed to
212
+ * a public repo. Anything genuinely secret belongs in `subject.env`.
213
+ */
214
+ envValues?: Record<string, string>;
203
215
  /**
204
216
  * `clone` (computer-use route): the subject's state story — seed/migration/fixture steps
205
217
  * executed in-sandbox around the serve sequence, and/or declared external state. Recorded
@@ -314,8 +326,18 @@ export interface LabActor {
314
326
  persona?: string;
315
327
  /** Consumed on the app-url route (laneFocus.instruction appended to the mission). XOR `lanes`. */
316
328
  laneFocus?: LabActorLaneFocus;
317
- /** Free-form mission threaded into the actor prompt. Consumed on the app-url route. */
329
+ /** Free-form mission threaded into the actor prompt. Consumed on the app-url route. A mission on
330
+ * its own is a complete, valid lab — `tasks` is additive, never required. */
318
331
  mission?: string;
332
+ /**
333
+ * The researcher's protocol: discrete tasks, each with what the participant is asked to do and
334
+ * (optionally) how the researcher measures it. Additive to `mission`, which stays the brief.
335
+ *
336
+ * The two halves belong to different people. `goal` reaches the participant's prompt; `success`
337
+ * never does — a moderator does not read the success criterion aloud, because telling someone how
338
+ * they will be judged changes what they do. See src/tasks.ts.
339
+ */
340
+ tasks?: LabTask[];
319
341
  /** Provider model override. Consumed on the app-url route. */
320
342
  model?: string;
321
343
  /**
@@ -496,6 +518,21 @@ export interface LabDefaults {
496
518
  export interface LabComms {
497
519
  email?: LabCommsEmail;
498
520
  }
521
+ export interface LabCommsSmtp {
522
+ /** Fixed in-sandbox loopback SMTP port (default 2525). Known before sandbox create, like `port`. */
523
+ port?: number;
524
+ /** The subject-env var carrying the SMTP host. The harness sets it to 127.0.0.1. */
525
+ hostEnv: string;
526
+ /** The subject-env var carrying the SMTP port. The harness sets it to the port above. */
527
+ portEnv: string;
528
+ /** Optional subject-env vars for a username/password the app insists on sending. The catch accepts
529
+ * any credentials (it is loopback-only), but many apps refuse to start without the vars set. */
530
+ userEnv?: string;
531
+ passwordEnv?: string;
532
+ /** The value written to `userEnv`/`passwordEnv` when those are declared. Never a real secret. */
533
+ user?: string;
534
+ password?: string;
535
+ }
499
536
  export interface LabCommsEmail {
500
537
  /** Which implementation backs the inbox (a backend discriminator, distinct from `scenario.mode`):
501
538
  * `fake` (default) is an in-harness in-memory inbox in the Fowler test-double sense — an in-sandbox
@@ -512,6 +549,16 @@ export interface LabCommsEmail {
512
549
  injectEnv?: string;
513
550
  /** Fixed in-sandbox loopback port the catch listens on (default 8025). Known before sandbox create. */
514
551
  port?: number;
552
+ /**
553
+ * SMTP transport, for the many self-hostable apps that send mail through SMTP rather than a
554
+ * provider's HTTP API. The catch opens a loopback SMTP listener and normalizes what it receives
555
+ * into the same captured-send shape the HTTP path produces, so the inbox surface, the drain, and
556
+ * the evidence artifact are identical either way.
557
+ *
558
+ * `hostEnv` and `portEnv` are ADOPTER-NAMED, exactly like `injectEnv`: the harness sets them to
559
+ * its own loopback and the chosen port. Declare the pair your app actually reads.
560
+ */
561
+ smtp?: LabCommsSmtp;
515
562
  /** Optional escape hatch: the exact absolute origin the app-under-test bakes into its email verify
516
563
  * links, when that differs from the serve origin (e.g. an app configured with an absolute
517
564
  * APP_URL/NEXT_PUBLIC_BASE_URL). The harness cannot infer it, so the operator declares it; it is
@@ -48,6 +48,7 @@
48
48
  // bump the version honestly.
49
49
  import { normalizeExtraExcludeEntry } from "./source-archive.js";
50
50
  import { actorRegistry } from "./actor-registry.js";
51
+ import { containsSensitive } from "./redaction.js";
51
52
  import { DEVICE_PRESET_NAMES, isDevicePresetName } from "./device-presets.js";
52
53
  export const LAB_CONFIG_SCHEMA = "humanish.lab.v2";
53
54
  // Must start alphanumeric so an id never collides with the path-vs-id resolver heuristic
@@ -1108,6 +1109,11 @@ function parseSubject(raw) {
1108
1109
  }
1109
1110
  subject.env = env;
1110
1111
  }
1112
+ const envValuesResult = parseEnvValues(raw.envValues);
1113
+ if (!envValuesResult.ok)
1114
+ return envValuesResult;
1115
+ if (envValuesResult.value)
1116
+ subject.envValues = envValuesResult.value;
1111
1117
  const stateResult = parseState(raw.state);
1112
1118
  if (!stateResult.ok) {
1113
1119
  return stateResult;
@@ -1145,6 +1151,11 @@ function parseSubject(raw) {
1145
1151
  }
1146
1152
  subject.env = env;
1147
1153
  }
1154
+ const envValuesResult = parseEnvValues(raw.envValues);
1155
+ if (!envValuesResult.ok)
1156
+ return envValuesResult;
1157
+ if (envValuesResult.value)
1158
+ subject.envValues = envValuesResult.value;
1148
1159
  const stateResult = parseState(raw.state);
1149
1160
  if (!stateResult.ok) {
1150
1161
  return stateResult;
@@ -1308,6 +1319,38 @@ function parseServe(raw) {
1308
1319
  * them) so subjectStateInvalidReason rejects them — a state declaration that silently does
1309
1320
  * less than it says would violate invariant 6.
1310
1321
  */
1322
+ /**
1323
+ * LITERAL non-secret subject env. Real apps need configuration before they will boot — a public base
1324
+ * URL, a transport selector, a feature flag — and none of that is secret. Routing it through
1325
+ * `subject.env` would force an adopter to carry a private env file just to reproduce a public study.
1326
+ *
1327
+ * These values ARE recorded in evidence (they are part of how the subject was configured), so a
1328
+ * value that looks like a credential is refused here rather than committed to a public repo.
1329
+ */
1330
+ function parseEnvValues(raw) {
1331
+ if (raw === undefined)
1332
+ return { ok: true };
1333
+ if (!isRecord(raw)) {
1334
+ return invalid("`subject.envValues` must be a mapping of env var NAME to a literal non-secret value.");
1335
+ }
1336
+ const envValues = {};
1337
+ for (const [name, rawValue] of Object.entries(raw)) {
1338
+ if (!ENV_NAME_PATTERN.test(name)) {
1339
+ return invalid(`subject.envValues keys must be env var NAMES like NEXT_PUBLIC_APP_URL (got "${name}").`);
1340
+ }
1341
+ const value = typeof rawValue === "number" || typeof rawValue === "boolean" ? String(rawValue) : str(rawValue);
1342
+ if (value === undefined) {
1343
+ return invalid(`\`subject.envValues.${name}\` must be a string, number, or boolean.`);
1344
+ }
1345
+ // Reuse the redaction module's own detector rather than inventing a second opinion about what
1346
+ // a secret looks like — the two must never disagree about the same string.
1347
+ if (containsSensitive(value)) {
1348
+ return invalid(`\`subject.envValues.${name}\` looks like a secret or a local path, and these values are committed with the lab and recorded in evidence. Declare the NAME in \`subject.env\` instead — those values come from the caller's environment and never persist.`);
1349
+ }
1350
+ envValues[name] = value;
1351
+ }
1352
+ return { ok: true, value: envValues };
1353
+ }
1311
1354
  function parseState(raw) {
1312
1355
  if (raw === undefined) {
1313
1356
  return { ok: true, value: undefined };
@@ -1553,6 +1596,11 @@ function parseActors(raw) {
1553
1596
  return stopWhenResult;
1554
1597
  if (stopWhenResult.value !== undefined)
1555
1598
  actor.stopWhen = stopWhenResult.value;
1599
+ const tasksResult = parseTasks(entry.tasks, `actors[${index}].tasks`);
1600
+ if (!tasksResult.ok)
1601
+ return tasksResult;
1602
+ if (tasksResult.value !== undefined)
1603
+ actor.tasks = tasksResult.value;
1556
1604
  const laneFocus = parseLaneFocus(entry.laneFocus);
1557
1605
  if (laneFocus)
1558
1606
  actor.laneFocus = laneFocus;
@@ -1711,6 +1759,44 @@ function parseLanes(raw, actorIndex) {
1711
1759
  }
1712
1760
  return { ok: true, value: lanes };
1713
1761
  }
1762
+ /**
1763
+ * The researcher's protocol. Each task carries what the participant is asked to do and, optionally,
1764
+ * the observation that proves it happened — reusing `stopWhen`, so a criterion is exactly as
1765
+ * expressive as a stop condition and an author who knows one knows the other.
1766
+ *
1767
+ * A task with no `success` is allowed on purpose: some things you ask a participant to do (think
1768
+ * aloud, say what confused you) are not observable, and the funnel reports them as unmeasurable
1769
+ * rather than quietly counting them failed.
1770
+ */
1771
+ function parseTasks(raw, field) {
1772
+ if (raw === undefined)
1773
+ return { ok: true, value: undefined };
1774
+ if (!Array.isArray(raw) || raw.length === 0) {
1775
+ return invalid(`\`${field}\` must be a non-empty list of tasks when set.`);
1776
+ }
1777
+ const tasks = [];
1778
+ const seen = new Set();
1779
+ for (const [index, entry] of raw.entries()) {
1780
+ if (!isRecord(entry))
1781
+ return invalid(`each \`${field}\` entry must be a mapping.`);
1782
+ const id = str(entry.id);
1783
+ if (id === undefined || !/^[A-Za-z0-9][A-Za-z0-9_-]*$/.test(id)) {
1784
+ return invalid(`\`${field}[${index}].id\` must be a short id like "sign-up".`);
1785
+ }
1786
+ if (seen.has(id))
1787
+ return invalid(`\`${field}\` has a duplicate task id "${id}"; ids appear in evidence and must be unique.`);
1788
+ seen.add(id);
1789
+ const goal = str(entry.goal);
1790
+ if (goal === undefined) {
1791
+ return invalid(`\`${field}[${index}].goal\` is required — what the PARTICIPANT is asked to do, in their language.`);
1792
+ }
1793
+ const successResult = parseStopWhen(entry.success, `${field}[${index}].success`);
1794
+ if (!successResult.ok)
1795
+ return successResult;
1796
+ tasks.push({ id, goal, ...(successResult.value === undefined ? {} : { success: successResult.value }) });
1797
+ }
1798
+ return { ok: true, value: tasks };
1799
+ }
1714
1800
  function parseStopWhen(raw, field) {
1715
1801
  if (raw === undefined) {
1716
1802
  return { ok: true, value: undefined };
@@ -2106,9 +2192,50 @@ function parseCommsEmail(raw) {
2106
2192
  ...(authTokenEnv === undefined ? {} : { authTokenEnv })
2107
2193
  };
2108
2194
  }
2195
+ // SMTP transport, for apps that send mail through SMTP rather than a provider's HTTP API.
2196
+ let smtp;
2197
+ if (raw.smtp !== undefined) {
2198
+ if (!isRecord(raw.smtp))
2199
+ return invalid("`comms.email.smtp` must be a mapping.");
2200
+ const envName = (value, field) => {
2201
+ const name = str(value);
2202
+ if (name === undefined)
2203
+ return undefined;
2204
+ return /^[A-Za-z_][A-Za-z0-9_]*$/.test(name) ? name : `__invalid__${field}`;
2205
+ };
2206
+ const hostEnv = envName(raw.smtp.hostEnv, "hostEnv");
2207
+ const portEnv = envName(raw.smtp.portEnv, "portEnv");
2208
+ if (hostEnv === undefined || portEnv === undefined) {
2209
+ return invalid("`comms.email.smtp` needs both `hostEnv` and `portEnv` — the subject-env vars your app reads for its SMTP host and port. The harness sets them to its own loopback listener.");
2210
+ }
2211
+ if (hostEnv.startsWith("__invalid__") || portEnv.startsWith("__invalid__")) {
2212
+ return invalid("`comms.email.smtp.hostEnv` and `portEnv` must be valid env var names.");
2213
+ }
2214
+ let smtpPort = 2525;
2215
+ if (raw.smtp.port !== undefined) {
2216
+ const parsed = posInt(raw.smtp.port);
2217
+ if (parsed === undefined || parsed > 65_535)
2218
+ return invalid("`comms.email.smtp.port` must be a positive integer ≤ 65535.");
2219
+ smtpPort = parsed;
2220
+ }
2221
+ const userEnv = envName(raw.smtp.userEnv, "userEnv");
2222
+ const passwordEnv = envName(raw.smtp.passwordEnv, "passwordEnv");
2223
+ if (userEnv?.startsWith("__invalid__") || passwordEnv?.startsWith("__invalid__")) {
2224
+ return invalid("`comms.email.smtp.userEnv` and `passwordEnv` must be valid env var names.");
2225
+ }
2226
+ smtp = {
2227
+ port: smtpPort,
2228
+ hostEnv,
2229
+ portEnv,
2230
+ ...(userEnv === undefined ? {} : { userEnv }),
2231
+ ...(passwordEnv === undefined ? {} : { passwordEnv }),
2232
+ ...(str(raw.smtp.user) === undefined ? {} : { user: str(raw.smtp.user) }),
2233
+ ...(str(raw.smtp.password) === undefined ? {} : { password: str(raw.smtp.password) })
2234
+ };
2235
+ }
2109
2236
  const injectEnv = str(raw.injectEnv);
2110
- if (injectEnv === undefined && external === undefined) {
2111
- return invalid("`comms.email.injectEnv` is required the subject-env var the harness sets to the catch base URL (e.g. RESEND_API_URL). On an adopter-hosted plane declare `comms.email.external` instead: you run the catch and point your own app at it.");
2237
+ if (injectEnv === undefined && external === undefined && smtp === undefined) {
2238
+ return invalid("`comms.email` needs a transport: `injectEnv` (the subject-env var set to the catch's HTTP base URL, e.g. RESEND_BASE_URL), or `smtp` (host/port env vars, for an app that sends over SMTP), or `external` on an adopter-hosted plane where you run the catch yourself.");
2112
2239
  }
2113
2240
  if (injectEnv !== undefined && !/^[A-Za-z_][A-Za-z0-9_]*$/.test(injectEnv)) {
2114
2241
  return invalid(`\`comms.email.injectEnv\` must be a valid env var name (got "${injectEnv}").`);
@@ -2116,6 +2243,7 @@ function parseCommsEmail(raw) {
2116
2243
  const email = {
2117
2244
  kind: "fake",
2118
2245
  ...(injectEnv === undefined ? {} : { injectEnv }),
2246
+ ...(smtp === undefined ? {} : { smtp }),
2119
2247
  ...(external === undefined ? {} : { external })
2120
2248
  };
2121
2249
  if (raw.port !== undefined) {