humanish 0.122.0 → 0.124.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 (61) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/CONTEXT.md +2 -2
  3. package/README.md +33 -6
  4. package/dist/actors/computer-use/loop/trace.js +6 -1
  5. package/dist/actors/computer-use/openai-conversation.d.ts +0 -6
  6. package/dist/actors/computer-use/openai-conversation.js +0 -8
  7. package/dist/actors/computer-use/openai-provider.js +5 -8
  8. package/dist/analysis/automatic.js +2 -1
  9. package/dist/analysis/evidence.js +41 -21
  10. package/dist/cli/commands/study-run.js +9 -3
  11. package/dist/evidence/image.js +82 -3
  12. package/dist/feedback/derivative-text.d.ts +12 -0
  13. package/dist/feedback/derivative-text.js +130 -0
  14. package/dist/feedback/export-bundle.js +39 -136
  15. package/dist/feedback/export.js +36 -9
  16. package/dist/observer/artifact.js +2 -9
  17. package/dist/observer/data.d.ts +9 -2
  18. package/dist/observer/data.js +17 -2
  19. package/dist/observer/page-data.d.ts +5 -0
  20. package/dist/observer/page-data.js +21 -0
  21. package/dist/observer/participant-items.d.ts +45 -0
  22. package/dist/observer/participant-items.js +85 -0
  23. package/dist/observer/render.js +2 -1
  24. package/dist/observer/run-routes.js +75 -22
  25. package/dist/observer-app.html +4 -4
  26. package/dist/run/bundle-shape.js +2 -2
  27. package/dist/run/bundle.d.ts +5 -2
  28. package/dist/run/bundle.js +4 -1
  29. package/dist/run/detail.d.ts +6 -0
  30. package/dist/run/detail.js +14 -1
  31. package/dist/run/locate.js +3 -1
  32. package/dist/run/projection.d.ts +7 -0
  33. package/dist/run/projection.js +10 -0
  34. package/dist/run/run.js +9 -2
  35. package/dist/run/stored-runs.js +10 -4
  36. package/dist/run/stream-shape.d.ts +11 -1
  37. package/dist/run/stream-shape.js +26 -2
  38. package/dist/run/stream-trace.d.ts +68 -0
  39. package/dist/run/stream-trace.js +260 -0
  40. package/dist/run/streams.d.ts +20 -0
  41. package/dist/study/bundle-estimate.d.ts +48 -0
  42. package/dist/study/bundle-estimate.js +159 -0
  43. package/dist/study/doctor.js +4 -0
  44. package/dist/study/plan-types.d.ts +3 -0
  45. package/dist/study/plan.js +42 -2
  46. package/dist/study/preflight.js +8 -0
  47. package/dist/tui-app.js +87 -87
  48. package/dist/verify/artifacts.d.ts +17 -10
  49. package/dist/verify/artifacts.js +22 -13
  50. package/dist/verify/scan-limit.d.ts +6 -0
  51. package/dist/verify/scan-limit.js +25 -0
  52. package/dist/verify/verify.d.ts +1 -1
  53. package/dist/verify/verify.js +68 -18
  54. package/docs/architecture/github-feedback-loop.md +1 -1
  55. package/docs/architecture/observer.md +24 -5
  56. package/docs/contracts/README.md +1 -1
  57. package/docs/contracts/run-bundle.md +89 -6
  58. package/docs/contracts/schemas.md +14 -7
  59. package/docs/contracts/study-analysis.md +1 -1
  60. package/docs/decisions/0002-observer-is-one-self-contained-file.md +2 -1
  61. package/package.json +7 -4
@@ -142,6 +142,18 @@ export interface RunDesktopGeometry {
142
142
  /** Public-safe geometry measurement/fill warnings retained with the stream evidence. */
143
143
  warnings?: string[];
144
144
  }
145
+ /**
146
+ * A stream's trace file in a v2 run.json: the actor trace with its items and the stream's
147
+ * screenshot entries as `artifacts`. `bytes` and `sha256` bind the file to run.json; `items` and
148
+ * `screenshots` are what it holds, so a reader can list them without opening it.
149
+ */
150
+ export interface StreamTraceIndex {
151
+ path: string;
152
+ bytes: number;
153
+ sha256: string;
154
+ items: number;
155
+ screenshots: number;
156
+ }
145
157
  /** The original participant-facing assignment, before runtime access/coordination details. */
146
158
  export interface RunParticipantAssignment {
147
159
  mission: string;
@@ -189,6 +201,12 @@ export interface RunStream {
189
201
  * and never persisted into bundles; declared here because the served observer-data carries it
190
202
  * and the client is typed against this contract. */
191
203
  liveEnded?: boolean;
204
+ /**
205
+ * Set by a reader that shows the run (displayedTraces in src/run/stream-trace.ts) when the loader
206
+ * refused this participant's trace: the reason. Runtime-only and never persisted; the stream then
207
+ * carries none of the refused items.
208
+ */
209
+ traceUnavailable?: string;
192
210
  /**
193
211
  * Browser CSS layout viewport. Deterministic browser adapters may declare and render this
194
212
  * exactly; hosted-desktop CUA producers set it only from a runtime measurement. Historical
@@ -234,6 +252,8 @@ export interface RunStream {
234
252
  turnId?: string;
235
253
  };
236
254
  actor?: ActorTrace;
255
+ /** Present in a v2 run.json on each stream with an actor: where its items and screenshots are. */
256
+ trace?: StreamTraceIndex;
237
257
  /**
238
258
  * Mid-run partial actor evidence: the redacted trace items recorded so far,
239
259
  * flushed while a live participant is still running so the attached Observer's timeline can
@@ -0,0 +1,48 @@
1
+ import type { DwellWindow } from "../actors/stop-conditions.js";
2
+ /** One participant as the plan has it: when it starts and ends, and its dwell window. */
3
+ export interface EstimatedParticipant {
4
+ readonly startAfterMs?: number;
5
+ readonly endAfterMs?: number;
6
+ readonly limits: {
7
+ readonly dwell?: DwellWindow;
8
+ };
9
+ }
10
+ /** A run's estimated bundle, and the scan's limit for its participants. */
11
+ export interface BundleEstimate {
12
+ /** run.json, which analysis reads whole. */
13
+ readonly runFileBytes: number;
14
+ /** The largest file: observer/observer-data.json, or the Observer page for a small run. */
15
+ readonly largestFileBytes: number;
16
+ /** Every file, screenshots included. */
17
+ readonly totalBytes: number;
18
+ /** Files and folders in the run folder, as the public-safety scan counts them. */
19
+ readonly entries: number;
20
+ /** The most entries the scan reads in a run of these participants (runEntryLimit). */
21
+ readonly entryLimit: number;
22
+ /** What the estimate assumed, for its messages. */
23
+ readonly basis: {
24
+ readonly participants: number;
25
+ /** Participants with a declared end, counted for their whole window, and the longest window. */
26
+ readonly scheduled: number;
27
+ readonly longestWindowMs: number;
28
+ /** Participants without one, and how long each is counted at most. */
29
+ readonly open: number;
30
+ readonly openMs: number;
31
+ readonly dwell: boolean;
32
+ };
33
+ }
34
+ /**
35
+ * The bundle a live run of `participants` leaves, each in its session of `sessionMs` unless it
36
+ * declares an end. A participant with an end works its whole window; one without is counted for
37
+ * the measured open session above, or its budget when that is shorter. Each takes a model turn at
38
+ * the measured pace, and a dwell window adds a frame every `everyMs` for its length, cut to the
39
+ * session, and the frame after it.
40
+ */
41
+ export declare function estimateBundle(participants: readonly EstimatedParticipant[], sessionMs: number): BundleEstimate;
42
+ /**
43
+ * The warning for a run whose estimate passes a limit, or undefined: each limit it passes, what the
44
+ * estimate counted, how high it runs, and what to change.
45
+ */
46
+ export declare function bundleLimitReason(estimate: BundleEstimate): string | undefined;
47
+ /** The estimate beside the limits, for `study check`. */
48
+ export declare function describeBundle(estimate: BundleEstimate): string;
@@ -0,0 +1,159 @@
1
+ // How large a computer-use run's bundle grows, estimated from its plan before anything runs, and
2
+ // whether it would pass a limit a later command holds it to: analysis reads a run.json of at most
3
+ // EVIDENCE_LIMITS.sourceBytes, verify reads no file larger than RUN_ARTIFACT_MAX_BYTES, and the
4
+ // public-safety scan visits at most runEntryLimit(participants) files and folders.
5
+ import { EVIDENCE_LIMITS } from "../analysis/analysis-limits.js";
6
+ import { RUN_ARTIFACT_MAX_BYTES } from "../run/contained-output.js";
7
+ import { formatDuration } from "../run/projection.js";
8
+ import { plural } from "../run/text.js";
9
+ import { runEntryLimit } from "../verify/scan-limit.js";
10
+ // Measured on 2026-10-12. Live: the hosted computer-use bundles kept on the maintainer's machine,
11
+ // 219 runs since 2026-10-01 for run.json's size (a least-squares fit gave 372 bytes a run, 14,368
12
+ // a participant and 2,423 a turn), and for the pace the 42 participant sessions of 5 minutes or
13
+ // more among every kept run since August. Synthetic: runStudyWith on fake desktops, with the live median
14
+ // of about 270 characters of reasoning and message a turn, from 10 to 2,000 turns and from 1 to
15
+ // 16 participants. An adopter's 39-minute run grew run.json about 7 KB a minute for a participant
16
+ // working the whole window; these rates give 12.6 KB, so the estimate errs high, and a limit it
17
+ // passes is a warning.
18
+ const RATES = Object.freeze({
19
+ /** run.json bytes a minute of the one long live participant measured: the adopter's run. */
20
+ measuredLongRunBytesPerMinute: 7_000,
21
+ /** run.json bytes for the run itself: its header, study and scenario. */
22
+ runBytes: 400,
23
+ /** run.json bytes for each participant before its turns: its records, events and cost lines. */
24
+ participantBytes: 14_400,
25
+ /** run.json bytes a model turn adds. Synthetic: 2,094 to 2,125 a turn over 10 to 2,000 turns. */
26
+ turnBytes: 2_100,
27
+ /** run.json bytes a dwell frame adds. Synthetic: 6,247 for 10 frames and the frame after. */
28
+ frameBytes: 570,
29
+ /** Seconds between model turns: the median of the 42 long live sessions was 10.3. */
30
+ secondsPerTurn: 10,
31
+ /**
32
+ * How long a participant with no declared end is counted, at most its session budget. It ends
33
+ * when it finishes its mission: 90 % of 974 live sessions ended within 184 s.
34
+ */
35
+ openSessionMs: 3 * 60_000,
36
+ /** observer-data.json bytes beyond run.json's for each participant: 0.9 to 2.6 KB live. */
37
+ observerDataParticipantBytes: 2_600,
38
+ /** observer/index.html: the page, and a share of run.json it embeds (synthetic, 10 to 2,000 turns). */
39
+ observerPageBytes: 1_190_000,
40
+ observerPageShare: 0.62,
41
+ /** A desktop screenshot: the median of 249 live PNG frames was 108,565 bytes. */
42
+ screenshotBytes: 110_000,
43
+ /** Run files and folders besides the participants': run.json, status, review, events, receipts, the Observer, analysis. */
44
+ runEntries: 20,
45
+ /** A participant's entries besides its turn screenshots: its trace file, its screenshot folder, its first frame. */
46
+ participantEntries: 3,
47
+ });
48
+ const MIB = 1024 * 1024;
49
+ /**
50
+ * The bundle a live run of `participants` leaves, each in its session of `sessionMs` unless it
51
+ * declares an end. A participant with an end works its whole window; one without is counted for
52
+ * the measured open session above, or its budget when that is shorter. Each takes a model turn at
53
+ * the measured pace, and a dwell window adds a frame every `everyMs` for its length, cut to the
54
+ * session, and the frame after it.
55
+ */
56
+ export function estimateBundle(participants, sessionMs) {
57
+ let turns = 0;
58
+ let frames = 0;
59
+ let longestWindowMs = 0;
60
+ const openMs = Math.min(sessionMs, RATES.openSessionMs);
61
+ for (const participant of participants) {
62
+ const windowMs = participant.endAfterMs === undefined
63
+ ? undefined
64
+ : participant.endAfterMs - (participant.startAfterMs ?? 0);
65
+ if (windowMs !== undefined)
66
+ longestWindowMs = Math.max(longestWindowMs, windowMs);
67
+ turns += Math.ceil((windowMs ?? openMs) / (RATES.secondsPerTurn * 1000));
68
+ const dwell = participant.limits.dwell;
69
+ if (dwell !== undefined)
70
+ frames += Math.floor(Math.min(dwell.ms, windowMs ?? sessionMs) / dwell.everyMs) + 1;
71
+ }
72
+ const count = participants.length;
73
+ const runFileBytes = RATES.runBytes +
74
+ count * RATES.participantBytes +
75
+ turns * RATES.turnBytes +
76
+ frames * RATES.frameBytes;
77
+ const observerDataBytes = runFileBytes + count * RATES.observerDataParticipantBytes;
78
+ const pageBytes = RATES.observerPageBytes + Math.round(RATES.observerPageShare * runFileBytes);
79
+ const screenshots = count + turns + frames;
80
+ const scheduled = participants.filter((participant) => participant.endAfterMs !== undefined);
81
+ return {
82
+ runFileBytes,
83
+ largestFileBytes: Math.max(observerDataBytes, pageBytes),
84
+ // Each participant's trace file holds about what its stream holds in run.json.
85
+ totalBytes: 2 * runFileBytes + observerDataBytes + pageBytes + screenshots * RATES.screenshotBytes,
86
+ entries: RATES.runEntries + count * RATES.participantEntries + turns + frames,
87
+ entryLimit: runEntryLimit(count),
88
+ basis: {
89
+ participants: count,
90
+ scheduled: scheduled.length,
91
+ longestWindowMs,
92
+ open: count - scheduled.length,
93
+ openMs,
94
+ dwell: frames > 0,
95
+ },
96
+ };
97
+ }
98
+ /**
99
+ * The warning for a run whose estimate passes a limit, or undefined: each limit it passes, what the
100
+ * estimate counted, how high it runs, and what to change.
101
+ */
102
+ export function bundleLimitReason(estimate) {
103
+ const passed = [
104
+ ...(estimate.runFileBytes > EVIDENCE_LIMITS.sourceBytes
105
+ ? [
106
+ `This study's run.json may grow to about ${mib(estimate.runFileBytes)}, past the ${mib(EVIDENCE_LIMITS.sourceBytes)} analysis reads.`,
107
+ ]
108
+ : []),
109
+ ...(estimate.largestFileBytes > RUN_ARTIFACT_MAX_BYTES
110
+ ? [
111
+ `Its largest file, observer/observer-data.json, may grow to about ${mib(estimate.largestFileBytes)}, past the ${mib(RUN_ARTIFACT_MAX_BYTES)} verify reads in one file.`,
112
+ ]
113
+ : []),
114
+ ...(estimate.entries > estimate.entryLimit
115
+ ? [
116
+ `It may hold about ${count(estimate.entries)} files and folders, past the ${count(estimate.entryLimit)} the public-safety scan reads in a run of ${plural(estimate.basis.participants, "participant")}.`,
117
+ ]
118
+ : []),
119
+ ];
120
+ if (passed.length === 0)
121
+ return undefined;
122
+ const { scheduled, longestWindowMs, open, openMs, dwell } = estimate.basis;
123
+ const counted = [
124
+ ...(scheduled > 0
125
+ ? [
126
+ `${plural(scheduled, "participant")} working their declared windows of up to ${formatDuration(longestWindowMs)}`,
127
+ ]
128
+ : []),
129
+ ...(open > 0
130
+ ? [
131
+ `${scheduled > 0 ? open : plural(open, "participant")} for up to ${formatDuration(openMs)} each`,
132
+ ]
133
+ : []),
134
+ ];
135
+ const changes = [
136
+ ...(scheduled > 0 ? ["shorten the longest windows (participants[].endAfterMs)"] : []),
137
+ ...(dwell ? ["shorten the dwell window (dwell.ms) or capture less often (dwell.everyMs)"] : []),
138
+ ];
139
+ const split = "split the participants across studies";
140
+ const advice = changes.length === 0 ? split : `${changes.join(", ")}, or ${split}`;
141
+ const perMinute = (RATES.turnBytes * 60) / RATES.secondsPerTurn;
142
+ return [
143
+ ...passed,
144
+ `The estimate counts ${counted.join(" and ")}, at a model turn every ${formatDuration(RATES.secondsPerTurn * 1000)} that adds about ${(RATES.turnBytes / 1000).toFixed(1)} KB.`,
145
+ `It runs high, about ${(perMinute / RATES.measuredLongRunBytesPerMinute).toFixed(1)} times the one long live run measured, so the run goes ahead.`,
146
+ `To stay under the limit, ${advice}.`,
147
+ ].join(" ");
148
+ }
149
+ /** The estimate beside the limits, for `study check`. */
150
+ export function describeBundle(estimate) {
151
+ return `run.json about ${mib(estimate.runFileBytes)} of the ${mib(EVIDENCE_LIMITS.sourceBytes)} analysis reads; largest file about ${mib(estimate.largestFileBytes)} of the ${mib(RUN_ARTIFACT_MAX_BYTES)} verify reads; about ${count(estimate.entries)} files and folders of the ${count(estimate.entryLimit)} the public-safety scan reads; about ${mib(estimate.totalBytes, 0)} in all. Participants with a declared end are counted for their whole window and the others for up to ${formatDuration(estimate.basis.openMs)}, at a model turn every ${formatDuration(RATES.secondsPerTurn * 1000)}.`;
152
+ }
153
+ function mib(bytes, digits = 1) {
154
+ const value = bytes / MIB;
155
+ return `${Number.isInteger(value) ? value : value.toFixed(digits)} MiB`;
156
+ }
157
+ function count(value) {
158
+ return value.toLocaleString("en-US");
159
+ }
@@ -172,6 +172,10 @@ export async function studySetupChecks(args) {
172
172
  keys: [],
173
173
  checks: [...checks, { name: "live route", ok: false, message: planned.refusal.message }],
174
174
  };
175
+ // A plan warning, such as a bundle estimated past a limit, is a note: the run still goes ahead.
176
+ for (const warning of planned.planned.plan.warnings ?? [])
177
+ if (!resolved.warnings.includes(warning))
178
+ checks.push({ name: "plan", ok: true, status: "note", message: warning });
175
179
  const requirements = planned.planned.plan.requirements;
176
180
  const keys = requiredKeys(requirements, args.keyPresent);
177
181
  // This flag controls the hosted desktop SDK check as well as its API key.
@@ -6,6 +6,7 @@ import type { ScriptedRefusal } from "../routes/scripted/plan.js";
6
6
  import type { TerminalRefusal } from "../routes/terminal/plan.js";
7
7
  import type { RunStudyProvenance } from "../run/study-provenance.js";
8
8
  import type { ArrivalPlan } from "./arrivals.js";
9
+ import type { BundleEstimate } from "./bundle-estimate.js";
9
10
  import type { ComputerUseRefusal } from "../routes/computer-use/plan.js";
10
11
  import type { SharedWorldRefusal } from "../routes/shared-world/plan.js";
11
12
  import type { ComputerUseParticipant, ExternalPublicParticipant, ProvisionedParticipant } from "./plan-participants.js";
@@ -275,6 +276,8 @@ export interface ScriptedPlan extends PlanBase {
275
276
  export type StudyPlan = PreviewPlan | ComputerUsePlan | SharedWorldPlan | TerminalPlan | ScriptedPlan;
276
277
  interface PlannedStudy {
277
278
  readonly plan: StudyPlan;
279
+ /** A computer-use plan's estimated bundle, which planStudy checked against the bundle limits. */
280
+ readonly bundle?: BundleEstimate;
278
281
  }
279
282
  /**
280
283
  * The error a route returns before a run starts: the route, its error code and a message. Each
@@ -9,11 +9,13 @@ import { planTerminalStudy } from "../routes/terminal/plan.js";
9
9
  import { concurrentSandboxes, sandboxCeiling, } from "../substrates/e2b/lifetime.js";
10
10
  import { localBrowserDefaults } from "../substrates/local/runtime-config.js";
11
11
  import { THIS_REPO_DRY_RUN_ONLY } from "./composition-rules.js";
12
+ import { bundleLimitReason, estimateBundle } from "./bundle-estimate.js";
12
13
  import { planBase } from "./plan-base.js";
13
14
  import { routeOf } from "./routing.js";
14
15
  import { automaticAnalysisRouteReason, taskProtocolValidationReason } from "./validation.js";
15
16
  import { declaredParticipantCount } from "./study-fields.js";
16
17
  import { recordedStudyWarnings } from "./warnings.js";
18
+ import { plural } from "../run/text.js";
17
19
  export { routeOf } from "./routing.js";
18
20
  /** Resolve dry-run: explicit override wins, else the scenario mode, else the given fallback. */
19
21
  export function resolveStudyDryRun(config, override, fallback) {
@@ -81,15 +83,53 @@ export function planStudy(config, options, deps = {}) {
81
83
  const result = planRoute(routeOf(config), study, options, input, deps, e2b);
82
84
  if (!result.ok)
83
85
  return result;
86
+ const bundle = plannedBundle(result.plan);
84
87
  // The manifest the CLI resolved enters the plan here and nowhere else; the routes read
85
88
  // plan.study for the run's status record and bundle, and plan.warnings for its bundle events.
86
- const warnings = [...recordedStudyWarnings(study), ...(result.plan.warnings ?? [])];
89
+ const closing = closingReportWarning(result.plan);
90
+ const warnings = [
91
+ ...recordedStudyWarnings(study),
92
+ ...(result.plan.warnings ?? []),
93
+ ...(bundle.warning === undefined ? [] : [bundle.warning]),
94
+ ...(closing === undefined ? [] : [closing]),
95
+ ];
87
96
  const plan = {
88
97
  ...result.plan,
89
98
  ...(options.study === undefined ? {} : { study: options.study }),
90
99
  ...(warnings.length === 0 ? {} : { warnings }),
91
100
  };
92
- return { ok: true, planned: { plan } };
101
+ return {
102
+ ok: true,
103
+ planned: { plan, ...(bundle.estimate === undefined ? {} : { bundle: bundle.estimate }) },
104
+ };
105
+ }
106
+ /**
107
+ * The bundle a computer-use plan's participants leave, each session at the plan's budget, and the
108
+ * warning for a live plan whose estimate passes a bundle limit. A dry run records no turns.
109
+ */
110
+ function plannedBundle(plan) {
111
+ if (plan.route !== "computer-use")
112
+ return {};
113
+ const estimate = estimateBundle(plan.runner.participants, plan.sessionBudgetMs);
114
+ const warning = plan.dryRun ? undefined : bundleLimitReason(estimate);
115
+ return warning === undefined ? { estimate } : { estimate, warning };
116
+ }
117
+ /**
118
+ * The warning for participants with a scheduled end on Claude as a local-agent participant model.
119
+ * Its session has no read-only closing request, so each such participant ends with the scheduled
120
+ * end as its reason and no account of its session.
121
+ */
122
+ function closingReportWarning(plan) {
123
+ if (plan.route !== "computer-use")
124
+ return undefined;
125
+ const { brain } = plan.runner;
126
+ if (brain.kind !== "local-agent" || brain.agent !== "claude")
127
+ return undefined;
128
+ const scheduled = plan.runner.participants.filter((participant) => participant.endAfterMs !== undefined).length;
129
+ if (scheduled === 0)
130
+ return undefined;
131
+ const subject = scheduled === 1 ? "it ends" : "each ends";
132
+ return `${plural(scheduled, "participant")} ${scheduled === 1 ? "has" : "have"} a scheduled end (participants[].endAfterMs), and Claude as a local-agent participant model cannot be asked for a closing report, so ${subject} with the scheduled end as its reason and no closing account. A computer-use model (actor.type: openai-computer-use) or Codex (actor.localAgent: codex) writes one.`;
93
133
  }
94
134
  function planRoute(route, study, options, input, deps, e2b) {
95
135
  const { sandboxCeiling } = e2b;
@@ -7,6 +7,7 @@ import { runPublicPreviewPreflight, runSandboxLoopbackPreflight } from "./prefli
7
7
  import { digest, fail, finalize, STUDY_CHECK_SCHEMA } from "./preflight-result.js";
8
8
  import { planStudy, routeOf } from "./plan.js";
9
9
  import { describeArrivals, describeWindows } from "./arrivals.js";
10
+ import { describeBundle } from "./bundle-estimate.js";
10
11
  import { resolveStudyManifest } from "./discover.js";
11
12
  import { participantList } from "./study-fields.js";
12
13
  import { isLocalBrowserStudy } from "../substrates/local/runtime-config.js";
@@ -81,6 +82,13 @@ export async function runStudyPreflight(options) {
81
82
  const windows = windowsCheck(planned.planned.plan);
82
83
  if (windows !== undefined)
83
84
  ctx.checks.push(windows);
85
+ const bundle = planned.planned.bundle;
86
+ if (bundle !== undefined)
87
+ ctx.checks.push({ name: "bundle size", ok: true, message: describeBundle(bundle) });
88
+ // The plan's warnings, which the run records; the study file's own are already listed.
89
+ for (const warning of planned.planned.plan.warnings ?? [])
90
+ if (!ctx.warnings.includes(warning))
91
+ ctx.warnings.push(warning);
84
92
  const machine = machineCheck(ctx.config);
85
93
  // A local study's app and desktops run on this machine, so the hosted probes do not apply.
86
94
  if (reachability !== "metadata" && isLocalBrowserStudy(ctx.config))