@40rty/ams-sdk 0.5.11 → 0.5.12

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/dist/index.js CHANGED
@@ -42,6 +42,8 @@ __export(src_exports3, {
42
42
  BRAND_MARK_MAX_BYTES: () => BRAND_MARK_MAX_BYTES,
43
43
  BRAND_MARK_SLOTS: () => BRAND_MARK_SLOTS,
44
44
  BRAND_MARK_TYPES: () => BRAND_MARK_TYPES,
45
+ BotCheckNoticeProvider: () => BotCheckNoticeProvider,
46
+ BotCheckNoticeSchema: () => BotCheckNoticeSchema,
45
47
  BrandMarkImageSchema: () => BrandMarkImageSchema,
46
48
  BrandMarkSchema: () => BrandMarkSchema,
47
49
  BugLocationSchema: () => BugLocationSchema,
@@ -582,6 +584,7 @@ __export(src_exports3, {
582
584
  useAgentPresenceFrame: () => useAgentPresenceFrame,
583
585
  useAgentPresenceFresh: () => useAgentPresenceFresh,
584
586
  useAnalyticsSink: () => useAnalyticsSink,
587
+ useBotCheckNotice: () => useBotCheckNotice,
585
588
  useCanvasActions: () => useCanvasActions,
586
589
  useCanvasArrangement: () => useCanvasArrangement,
587
590
  useCanvasBack: () => useCanvasBack,
@@ -1523,6 +1526,7 @@ __export(src_exports, {
1523
1526
  BRAND_MARK_MAX_BYTES: () => BRAND_MARK_MAX_BYTES,
1524
1527
  BRAND_MARK_SLOTS: () => BRAND_MARK_SLOTS,
1525
1528
  BRAND_MARK_TYPES: () => BRAND_MARK_TYPES,
1529
+ BotCheckNoticeSchema: () => BotCheckNoticeSchema,
1526
1530
  BrandMarkImageSchema: () => BrandMarkImageSchema,
1527
1531
  BrandMarkSchema: () => BrandMarkSchema,
1528
1532
  BugLocationSchema: () => BugLocationSchema,
@@ -4124,8 +4128,15 @@ var UpdateAgentDirectiveInputSchema = z38.object({
4124
4128
  }).strict();
4125
4129
  var ReorderAgentDirectivesInputSchema = z38.object({ ids: z38.array(z38.string()).min(1) }).strict();
4126
4130
 
4127
- // ../spacestation/src/space/space-locale.ts
4131
+ // ../spacestation/src/shell/bot-check-notice.ts
4128
4132
  import { z as z39 } from "zod";
4133
+ var BotCheckNoticeSchema = z39.object({
4134
+ /** Read in order: plain text, and links the notice must keep linked. */
4135
+ segments: z39.array(z39.union([z39.string(), z39.object({ text: z39.string(), href: z39.string().url() })])).min(1)
4136
+ });
4137
+
4138
+ // ../spacestation/src/space/space-locale.ts
4139
+ import { z as z40 } from "zod";
4129
4140
  var DEFAULT_SPACE_LOCALE = "en-US";
4130
4141
  function isBcp47(tag) {
4131
4142
  try {
@@ -4135,7 +4146,7 @@ function isBcp47(tag) {
4135
4146
  throw err;
4136
4147
  }
4137
4148
  }
4138
- var SpaceLocaleSchema = z39.string().refine(isBcp47, { message: "locale must be a BCP 47 language tag, e.g. he-IL" });
4149
+ var SpaceLocaleSchema = z40.string().refine(isBcp47, { message: "locale must be a BCP 47 language tag, e.g. he-IL" });
4139
4150
  var RTL_SCRIPTS = /* @__PURE__ */ new Set(["Arab", "Hebr", "Thaa", "Syrc", "Nkoo", "Adlm", "Rohg", "Mand", "Samr"]);
4140
4151
  var RTL_LANGUAGES = /* @__PURE__ */ new Set(["ar", "he", "iw", "fa", "ur", "ps", "sd", "ug", "yi", "dv", "ckb", "syr"]);
4141
4152
  function textDirectionOf(locale) {
@@ -4225,30 +4236,30 @@ function hostingAllows(hosting, surface) {
4225
4236
  }
4226
4237
 
4227
4238
  // ../spacestation/src/space/trace.ts
4228
- import { z as z40 } from "zod";
4229
- var RunTokenUsageSchema = z40.object({
4230
- input_tokens: z40.number().optional(),
4231
- output_tokens: z40.number().optional(),
4232
- cache_read_tokens: z40.number().optional()
4239
+ import { z as z41 } from "zod";
4240
+ var RunTokenUsageSchema = z41.object({
4241
+ input_tokens: z41.number().optional(),
4242
+ output_tokens: z41.number().optional(),
4243
+ cache_read_tokens: z41.number().optional()
4233
4244
  });
4234
- var TraceRecordSchema = z40.object({
4235
- id: z40.string().uuid(),
4236
- spaceId: z40.string().uuid().nullable(),
4237
- sessionId: z40.string(),
4245
+ var TraceRecordSchema = z41.object({
4246
+ id: z41.string().uuid(),
4247
+ spaceId: z41.string().uuid().nullable(),
4248
+ sessionId: z41.string(),
4238
4249
  /** OTP-verified visitor email the session was unlocked with, or `null`
4239
4250
  * for an unlocked space / anonymous unlock. */
4240
- visitorEmail: z40.string().nullable(),
4241
- userPrompt: z40.string(),
4242
- branch: z40.string().nullable(),
4243
- responseText: z40.string().nullable(),
4244
- layout: z40.unknown().nullable(),
4245
- phaseTimings: z40.record(z40.number()).nullable(),
4246
- tokensByModel: z40.record(RunTokenUsageSchema).nullable(),
4247
- toolCalls: z40.array(z40.unknown()).nullable(),
4248
- diagnostics: z40.array(z40.unknown()).nullable(),
4249
- latencyFirstText: z40.number().int().nullable(),
4250
- latencyFirstPatch: z40.number().int().nullable(),
4251
- latencyTotal: z40.number().int().nullable(),
4251
+ visitorEmail: z41.string().nullable(),
4252
+ userPrompt: z41.string(),
4253
+ branch: z41.string().nullable(),
4254
+ responseText: z41.string().nullable(),
4255
+ layout: z41.unknown().nullable(),
4256
+ phaseTimings: z41.record(z41.number()).nullable(),
4257
+ tokensByModel: z41.record(RunTokenUsageSchema).nullable(),
4258
+ toolCalls: z41.array(z41.unknown()).nullable(),
4259
+ diagnostics: z41.array(z41.unknown()).nullable(),
4260
+ latencyFirstText: z41.number().int().nullable(),
4261
+ latencyFirstPatch: z41.number().int().nullable(),
4262
+ latencyTotal: z41.number().int().nullable(),
4252
4263
  /**
4253
4264
  * The CLIENT's turn id for this run, or `null`.
4254
4265
  *
@@ -4264,29 +4275,29 @@ var TraceRecordSchema = z40.object({
4264
4275
  * a turn whose ack the client never saw — none of which is evidence that a
4265
4276
  * visitor asked something and got nothing.
4266
4277
  */
4267
- turnId: z40.string().nullable(),
4278
+ turnId: z41.string().nullable(),
4268
4279
  /** Serialized `TraceTracker.exportState()` payload (parsed object) —
4269
4280
  * lets the inspector rehydrate this run verbatim after a reload. */
4270
- trackerState: z40.unknown().nullable(),
4271
- createdAt: z40.string()
4281
+ trackerState: z41.unknown().nullable(),
4282
+ createdAt: z41.string()
4272
4283
  });
4273
- var MillisecondsSchema = z40.number().nullable().transform((v) => v === null ? null : Math.round(v));
4274
- var CreateTraceInputSchema = z40.object({
4275
- spaceId: z40.string().uuid().nullable(),
4276
- sessionId: z40.string(),
4277
- visitorEmail: z40.string().nullable(),
4278
- userPrompt: z40.string(),
4279
- branch: z40.string().nullable(),
4280
- responseText: z40.string().nullable(),
4281
- layout: z40.unknown().nullable(),
4282
- phaseTimings: z40.record(z40.number()).nullable(),
4283
- tokensByModel: z40.record(RunTokenUsageSchema).nullable(),
4284
- toolCalls: z40.array(z40.unknown()).nullable(),
4285
- diagnostics: z40.array(z40.unknown()).nullable(),
4284
+ var MillisecondsSchema = z41.number().nullable().transform((v) => v === null ? null : Math.round(v));
4285
+ var CreateTraceInputSchema = z41.object({
4286
+ spaceId: z41.string().uuid().nullable(),
4287
+ sessionId: z41.string(),
4288
+ visitorEmail: z41.string().nullable(),
4289
+ userPrompt: z41.string(),
4290
+ branch: z41.string().nullable(),
4291
+ responseText: z41.string().nullable(),
4292
+ layout: z41.unknown().nullable(),
4293
+ phaseTimings: z41.record(z41.number()).nullable(),
4294
+ tokensByModel: z41.record(RunTokenUsageSchema).nullable(),
4295
+ toolCalls: z41.array(z41.unknown()).nullable(),
4296
+ diagnostics: z41.array(z41.unknown()).nullable(),
4286
4297
  latencyFirstText: MillisecondsSchema,
4287
4298
  latencyFirstPatch: MillisecondsSchema,
4288
4299
  latencyTotal: MillisecondsSchema,
4289
- trackerState: z40.unknown().nullable(),
4300
+ trackerState: z41.unknown().nullable(),
4290
4301
  /**
4291
4302
  * The CLIENT's turn id for this run, or `null`.
4292
4303
  *
@@ -4302,37 +4313,37 @@ var CreateTraceInputSchema = z40.object({
4302
4313
  * a turn whose ack the client never saw — none of which is evidence that a
4303
4314
  * visitor asked something and got nothing.
4304
4315
  */
4305
- turnId: z40.string().nullable()
4316
+ turnId: z41.string().nullable()
4306
4317
  });
4307
- var AgentSessionSummarySchema = z40.object({
4308
- sessionId: z40.string(),
4318
+ var AgentSessionSummarySchema = z41.object({
4319
+ sessionId: z41.string(),
4309
4320
  /** Turn rows only; background/secondary runs are excluded by the aggregate. */
4310
- turnCount: z40.number().int(),
4321
+ turnCount: z41.number().int(),
4311
4322
  /** The session's opening prompt — titles the row in the UI. */
4312
- firstPrompt: z40.string(),
4313
- startedAt: z40.string(),
4314
- lastRunAt: z40.string(),
4323
+ firstPrompt: z41.string(),
4324
+ startedAt: z41.string(),
4325
+ lastRunAt: z41.string(),
4315
4326
  /** Summed `latency_total` across the session's turns. */
4316
- totalLatencyMs: z40.number().int()
4327
+ totalLatencyMs: z41.number().int()
4317
4328
  });
4318
- var SessionTurnSchema = z40.object({
4319
- id: z40.string().uuid(),
4320
- userPrompt: z40.string(),
4321
- responseText: z40.string().nullable(),
4329
+ var SessionTurnSchema = z41.object({
4330
+ id: z41.string().uuid(),
4331
+ userPrompt: z41.string(),
4332
+ responseText: z41.string().nullable(),
4322
4333
  /** Full cumulative Spec committed by this turn — never a patch delta. */
4323
- layout: z40.unknown().nullable(),
4324
- createdAt: z40.string(),
4325
- latencyTotal: z40.number().int().nullable(),
4326
- phaseTimings: z40.record(z40.number()).nullable(),
4327
- tokensByModel: z40.record(z40.object({
4328
- input_tokens: z40.number().optional(),
4329
- output_tokens: z40.number().optional()
4334
+ layout: z41.unknown().nullable(),
4335
+ createdAt: z41.string(),
4336
+ latencyTotal: z41.number().int().nullable(),
4337
+ phaseTimings: z41.record(z41.number()).nullable(),
4338
+ tokensByModel: z41.record(z41.object({
4339
+ input_tokens: z41.number().optional(),
4340
+ output_tokens: z41.number().optional()
4330
4341
  })).nullable(),
4331
- toolCalls: z40.array(z40.unknown()).nullable(),
4332
- diagnostics: z40.array(z40.unknown()).nullable()
4342
+ toolCalls: z41.array(z41.unknown()).nullable(),
4343
+ diagnostics: z41.array(z41.unknown()).nullable()
4333
4344
  });
4334
- var SessionReplaySchema = z40.object({
4335
- turns: z40.array(SessionTurnSchema),
4345
+ var SessionReplaySchema = z41.object({
4346
+ turns: z41.array(SessionTurnSchema),
4336
4347
  /**
4337
4348
  * The session's own last-committed layout, read straight off the durable
4338
4349
  * session record (`sessions.blob.layout`) rather than derived from `turns`.
@@ -4343,20 +4354,20 @@ var SessionReplaySchema = z40.object({
4343
4354
  * a perfectly real layout; only this field can show it. Null exclusively
4344
4355
  * when the durable session row itself could not be read.
4345
4356
  */
4346
- sessionLayout: z40.record(z40.string(), z40.unknown()).nullable()
4357
+ sessionLayout: z41.record(z41.string(), z41.unknown()).nullable()
4347
4358
  });
4348
- var SessionTraceSchema = z40.object({
4349
- trackerState: z40.string().nullable()
4359
+ var SessionTraceSchema = z41.object({
4360
+ trackerState: z41.string().nullable()
4350
4361
  });
4351
- var LlmUsageDailySchema = z40.object({
4352
- day: z40.string(),
4362
+ var LlmUsageDailySchema = z41.object({
4363
+ day: z41.string(),
4353
4364
  /** Deployment that made the call — 'production', 'staging', 'pr-123', 'development'. */
4354
- environment: z40.string(),
4355
- feature: z40.string(),
4356
- model: z40.string(),
4357
- provider: z40.string(),
4365
+ environment: z41.string(),
4366
+ feature: z41.string(),
4367
+ model: z41.string(),
4368
+ provider: z41.string(),
4358
4369
  /** Masked tail of the key actually billed, or null when unknown/non-Google. */
4359
- keyFingerprint: z40.string().nullable(),
4370
+ keyFingerprint: z41.string().nullable(),
4360
4371
  /**
4361
4372
  * The space the call served, or null when it served none.
4362
4373
  *
@@ -4365,91 +4376,91 @@ var LlmUsageDailySchema = z40.object({
4365
4376
  * report that share rather than dropping it, or a per-space total reads as
4366
4377
  * the platform total.
4367
4378
  */
4368
- spaceId: z40.string().nullable(),
4379
+ spaceId: z41.string().nullable(),
4369
4380
  /**
4370
4381
  * The surface of the session the call served (`sessions.surface`), or null
4371
4382
  * when it served no session or the session predates surface recording.
4372
4383
  * `automation` is the eval harness — the signal that files an ordinary
4373
4384
  * `agent-turn` as testing spend rather than as a visitor's.
4374
4385
  */
4375
- surface: z40.string().nullable(),
4376
- inputTokens: z40.number(),
4377
- outputTokens: z40.number(),
4386
+ surface: z41.string().nullable(),
4387
+ inputTokens: z41.number(),
4388
+ outputTokens: z41.number(),
4378
4389
  /** Subset of inputTokens, never additional to it. */
4379
- cachedInputTokens: z40.number(),
4380
- reasoningTokens: z40.number(),
4381
- callCount: z40.number(),
4382
- errorCount: z40.number(),
4383
- estimatedCostUsd: z40.number().nullable()
4390
+ cachedInputTokens: z41.number(),
4391
+ reasoningTokens: z41.number(),
4392
+ callCount: z41.number(),
4393
+ errorCount: z41.number(),
4394
+ estimatedCostUsd: z41.number().nullable()
4384
4395
  });
4385
- var LlmUsageBySessionSchema = z40.object({
4386
- sessionId: z40.string(),
4387
- environment: z40.string(),
4388
- model: z40.string(),
4396
+ var LlmUsageBySessionSchema = z41.object({
4397
+ sessionId: z41.string(),
4398
+ environment: z41.string(),
4399
+ model: z41.string(),
4389
4400
  /** The space this session belongs to, or null for a session with no space. */
4390
- spaceId: z40.string().nullable(),
4401
+ spaceId: z41.string().nullable(),
4391
4402
  /** The session's surface — see `LlmUsageDailySchema.surface`. */
4392
- surface: z40.string().nullable(),
4403
+ surface: z41.string().nullable(),
4393
4404
  /** Label only — the first feature seen in the session. */
4394
- firstFeature: z40.string(),
4395
- startedAt: z40.string(),
4396
- endedAt: z40.string(),
4397
- inputTokens: z40.number(),
4398
- outputTokens: z40.number(),
4399
- cachedInputTokens: z40.number(),
4400
- reasoningTokens: z40.number(),
4401
- callCount: z40.number(),
4402
- errorCount: z40.number(),
4405
+ firstFeature: z41.string(),
4406
+ startedAt: z41.string(),
4407
+ endedAt: z41.string(),
4408
+ inputTokens: z41.number(),
4409
+ outputTokens: z41.number(),
4410
+ cachedInputTokens: z41.number(),
4411
+ reasoningTokens: z41.number(),
4412
+ callCount: z41.number(),
4413
+ errorCount: z41.number(),
4403
4414
  /** Priced server-side, like the daily rollup — the browser never carries a
4404
4415
  * rate table, so there is exactly one place a price can be wrong. Null when
4405
4416
  * the model is unpriced; never 0, which would read as free. */
4406
- estimatedCostUsd: z40.number().nullable()
4417
+ estimatedCostUsd: z41.number().nullable()
4407
4418
  });
4408
- var LlmSessionsDailySchema = z40.object({
4409
- day: z40.string(),
4410
- environment: z40.string(),
4411
- sessionCount: z40.number()
4419
+ var LlmSessionsDailySchema = z41.object({
4420
+ day: z41.string(),
4421
+ environment: z41.string(),
4422
+ sessionCount: z41.number()
4412
4423
  });
4413
4424
 
4414
4425
  // ../spacestation/src/space/session-queue.ts
4415
- import { z as z42 } from "zod";
4426
+ import { z as z43 } from "zod";
4416
4427
 
4417
4428
  // ../spacestation/src/space/session-activity.ts
4418
- import { z as z41 } from "zod";
4419
- var SessionActivityEventSchema = z41.object({
4420
- id: z41.string(),
4421
- kind: z41.string(),
4422
- occurredAt: z41.string(),
4423
- source: z41.string(),
4424
- surface: z41.string(),
4425
- payload: z41.record(z41.unknown())
4429
+ import { z as z42 } from "zod";
4430
+ var SessionActivityEventSchema = z42.object({
4431
+ id: z42.string(),
4432
+ kind: z42.string(),
4433
+ occurredAt: z42.string(),
4434
+ source: z42.string(),
4435
+ surface: z42.string(),
4436
+ payload: z42.record(z42.unknown())
4426
4437
  });
4427
- var SessionActivitySchema = z41.object({
4428
- events: z41.array(SessionActivityEventSchema),
4429
- hasMore: z41.boolean()
4438
+ var SessionActivitySchema = z42.object({
4439
+ events: z42.array(SessionActivityEventSchema),
4440
+ hasMore: z42.boolean()
4430
4441
  });
4431
4442
 
4432
4443
  // ../spacestation/src/space/session-queue.ts
4433
- var SessionVerdictSchema = z42.enum(["unreviewed", "viewed", "bug"]);
4434
- var RecordableVerdictSchema = z42.enum(["viewed", "bug"]);
4435
- var SessionReviewEventSchema = z42.object({
4436
- id: z42.string().uuid(),
4444
+ var SessionVerdictSchema = z43.enum(["unreviewed", "viewed", "bug"]);
4445
+ var RecordableVerdictSchema = z43.enum(["viewed", "bug"]);
4446
+ var SessionReviewEventSchema = z43.object({
4447
+ id: z43.string().uuid(),
4437
4448
  verdict: RecordableVerdictSchema,
4438
4449
  /** Account email of the operator who judged it. Attribution is the reason the
4439
4450
  * log is append-only rather than a mutable current-state row. */
4440
- reviewer: z42.string(),
4441
- note: z42.string().nullable(),
4442
- createdAt: z42.string()
4451
+ reviewer: z43.string(),
4452
+ note: z43.string().nullable(),
4453
+ createdAt: z43.string()
4443
4454
  });
4444
- var BugSeveritySchema = z42.enum(["high", "medium", "low"]);
4445
- var BugLocationSchema = z42.object({
4446
- elementId: z42.string().nullable(),
4455
+ var BugSeveritySchema = z43.enum(["high", "medium", "low"]);
4456
+ var BugLocationSchema = z43.object({
4457
+ elementId: z43.string().nullable(),
4447
4458
  /** Display only — the catalog component type, e.g. "productGrid". Null
4448
4459
  * alongside a null `elementId`. */
4449
- elementType: z42.string().nullable(),
4460
+ elementType: z43.string().nullable(),
4450
4461
  /** Fraction of the ELEMENT's own box. Null for a page anchor. */
4451
- offsetXPct: z42.number().min(0).max(100).nullable(),
4452
- offsetYPct: z42.number().min(0).max(100).nullable(),
4462
+ offsetXPct: z43.number().min(0).max(100).nullable(),
4463
+ offsetYPct: z43.number().min(0).max(100).nullable(),
4453
4464
  /**
4454
4465
  * ABSOLUTE document pixels, for a pin with no element under it. Null for an
4455
4466
  * element anchor.
@@ -4460,8 +4471,8 @@ var BugLocationSchema = z42.object({
4460
4471
  * on the page with it. Measured before this was fixed: growing the page 9%
4461
4472
  * slid a pin 32px, so a pin ran away from the cursor reaching for it.
4462
4473
  */
4463
- pageX: z42.number().nullable(),
4464
- pageY: z42.number().nullable()
4474
+ pageX: z43.number().nullable(),
4475
+ pageY: z43.number().nullable()
4465
4476
  }).refine(
4466
4477
  (loc) => {
4467
4478
  const hasOffsets = loc.offsetXPct !== null && loc.offsetYPct !== null;
@@ -4475,24 +4486,24 @@ var BugLocationSchema = z42.object({
4475
4486
  message: "location must be one complete anchor: an element (elementId + elementType + both offsets), a page position (pageX + pageY), or a legacy page fraction (both offsets)"
4476
4487
  }
4477
4488
  );
4478
- var SessionBugSchema = z42.object({
4479
- id: z42.string().uuid(),
4489
+ var SessionBugSchema = z43.object({
4490
+ id: z43.string().uuid(),
4480
4491
  /** 1-based turn the fault was observed on; null when the fault is session-wide. */
4481
- turnIndex: z42.number().int().nullable(),
4492
+ turnIndex: z43.number().int().nullable(),
4482
4493
  /** Where on that turn's canvas the pin was dropped; null for a bug filed
4483
4494
  * without pinning a spot. */
4484
4495
  location: BugLocationSchema.nullable(),
4485
- provider: z42.string(),
4486
- issueKey: z42.string().nullable(),
4487
- issueUrl: z42.string().nullable(),
4496
+ provider: z43.string(),
4497
+ issueKey: z43.string().nullable(),
4498
+ issueUrl: z43.string().nullable(),
4488
4499
  /** The tracker's own state word ('Todo', 'Done', …) — their vocabulary, so
4489
4500
  * open text. Null until first synced. */
4490
- issueState: z42.string().nullable(),
4491
- title: z42.string(),
4492
- body: z42.string(),
4501
+ issueState: z43.string().nullable(),
4502
+ title: z43.string(),
4503
+ body: z43.string(),
4493
4504
  severity: BugSeveritySchema,
4494
- createdBy: z42.string(),
4495
- createdAt: z42.string(),
4505
+ createdBy: z43.string(),
4506
+ createdAt: z43.string(),
4496
4507
  /**
4497
4508
  * When this bug was resolved from the console; null means still OPEN.
4498
4509
  *
@@ -4501,60 +4512,60 @@ var SessionBugSchema = z42.object({
4501
4512
  * whether a particular fault is still live. The timestamp IS the state, so
4502
4513
  * no boolean can contradict it.
4503
4514
  */
4504
- resolvedAt: z42.string().nullable(),
4505
- resolvedBy: z42.string().nullable()
4515
+ resolvedAt: z43.string().nullable(),
4516
+ resolvedBy: z43.string().nullable()
4506
4517
  });
4507
- var SpaceBugSchema = SessionBugSchema.extend({ sessionId: z42.string() });
4508
- var SessionCommentSchema = z42.object({
4509
- id: z42.string().uuid(),
4518
+ var SpaceBugSchema = SessionBugSchema.extend({ sessionId: z43.string() });
4519
+ var SessionCommentSchema = z43.object({
4520
+ id: z43.string().uuid(),
4510
4521
  /** Set = a reply in that bug's thread. Null = a standalone comment pin. */
4511
- bugId: z42.string().uuid().nullable(),
4522
+ bugId: z43.string().uuid().nullable(),
4512
4523
  /** 1-based turn the comment was left on; null for a reply (it reads its
4513
4524
  * parent bug's turn). */
4514
- turnIndex: z42.number().int().nullable(),
4525
+ turnIndex: z43.number().int().nullable(),
4515
4526
  /** The canvas anchor for a STANDALONE comment's own pin; null for a reply. */
4516
4527
  location: BugLocationSchema.nullable(),
4517
- body: z42.string(),
4518
- createdBy: z42.string(),
4519
- createdAt: z42.string()
4528
+ body: z43.string(),
4529
+ createdBy: z43.string(),
4530
+ createdAt: z43.string()
4520
4531
  });
4521
- var CreateCommentInputSchema = z42.object({
4522
- bugId: z42.string().uuid().nullable(),
4523
- turnIndex: z42.number().int().positive().nullable(),
4532
+ var CreateCommentInputSchema = z43.object({
4533
+ bugId: z43.string().uuid().nullable(),
4534
+ turnIndex: z43.number().int().positive().nullable(),
4524
4535
  location: BugLocationSchema.nullable(),
4525
4536
  // Trimmed, so whitespace is not content: `.min(1)` alone accepted a comment
4526
4537
  // of three spaces, which renders as an empty bubble nobody can interpret.
4527
- body: z42.string().trim().min(1)
4538
+ body: z43.string().trim().min(1)
4528
4539
  }).refine((input) => input.bugId === null !== (input.location === null), {
4529
4540
  message: "a comment is either a reply (bugId, no location) or a standalone pin (location, no bugId)"
4530
4541
  });
4531
- var UpdateCommentInputSchema = z42.object({
4532
- body: z42.string().trim().min(1).optional(),
4533
- bugId: z42.string().uuid().nullable().optional(),
4542
+ var UpdateCommentInputSchema = z43.object({
4543
+ body: z43.string().trim().min(1).optional(),
4544
+ bugId: z43.string().uuid().nullable().optional(),
4534
4545
  location: BugLocationSchema.nullable().optional()
4535
4546
  });
4536
4547
  var MOBILE_VIEWPORT_MAX = 720;
4537
- var SessionFormFactorSchema = z42.enum(["mobile", "desktop"]).nullable();
4548
+ var SessionFormFactorSchema = z43.enum(["mobile", "desktop"]).nullable();
4538
4549
  function formFactorFromViewport(width) {
4539
4550
  if (width === null) return null;
4540
4551
  return width <= MOBILE_VIEWPORT_MAX ? "mobile" : "desktop";
4541
4552
  }
4542
- var SessionSummarySchema = z42.object({
4543
- sessionId: z42.string(),
4553
+ var SessionSummarySchema = z43.object({
4554
+ sessionId: z43.string(),
4544
4555
  /** Stable per-browser id — the join key across a visitor's sessions. Null when
4545
4556
  * the session row is gone (pruned) or predates the `sessions` table. */
4546
- visitorId: z42.string().nullable(),
4557
+ visitorId: z43.string().nullable(),
4547
4558
  /** Provider-qualified identity anchor, present only once the visitor
4548
4559
  * identified themselves. Both null together means "not identified yet". */
4549
- identityProvider: z42.string().nullable(),
4550
- identityKey: z42.string().nullable(),
4560
+ identityProvider: z43.string().nullable(),
4561
+ identityKey: z43.string().nullable(),
4551
4562
  /** Team/test traffic. The queue hides these by default. */
4552
- isInternal: z42.boolean(),
4563
+ isInternal: z43.boolean(),
4553
4564
  /** Build that served the session. Null = not captured; a version filter must
4554
4565
  * therefore EXCLUDE it rather than let it match an arbitrary bucket. */
4555
- clientVersion: z42.string().nullable(),
4566
+ clientVersion: z43.string().nullable(),
4556
4567
  /** Commit-shaped interaction signals, counted, keyed by open `SignalType`. */
4557
- signalCounts: z42.record(z42.number()),
4568
+ signalCounts: z43.record(z43.number()),
4558
4569
  /**
4559
4570
  * Did this conversation ACQUIRE anything, and how many times?
4560
4571
  *
@@ -4571,7 +4582,7 @@ var SessionSummarySchema = z42.object({
4571
4582
  * predates the column — and renders as no mark at all. It never means zero:
4572
4583
  * zero is a real, recorded answer and the rail reports it as one.
4573
4584
  */
4574
- conversionAttempts: z42.number().int().nullable(),
4585
+ conversionAttempts: z43.number().int().nullable(),
4575
4586
  /**
4576
4587
  * The same attempts split by EVENT KIND, keyed by the kind's own name
4577
4588
  * (`commerce.cart_line_added`, `commerce.registry_clicked`), counted distinct
@@ -4587,7 +4598,7 @@ var SessionSummarySchema = z42.object({
4587
4598
  * kinds together, and one attempt id appearing under both would be counted
4588
4599
  * once there and twice here.
4589
4600
  */
4590
- conversionKinds: z42.record(z42.number()),
4601
+ conversionKinds: z43.record(z43.number()),
4591
4602
  /**
4592
4603
  * Every analytics funnel step this session reached, in funnel order — the
4593
4604
  * dashboard's own step ids, read by the same per-step predicates, so a queue
@@ -4595,20 +4606,20 @@ var SessionSummarySchema = z42.object({
4595
4606
  * set of strings for the reason `conversionKinds` is: the contract does not
4596
4607
  * learn what a step means. Empty only when read from a pre-column database.
4597
4608
  */
4598
- funnelSteps: z42.array(z42.string()),
4609
+ funnelSteps: z43.array(z43.string()),
4599
4610
  /**
4600
4611
  * The connector's opaque handle for what this session produced in its back
4601
4612
  * office — present only once a checkout actually reached the platform. The
4602
4613
  * console hands it to the back-office link registry; nothing else reads it.
4603
4614
  */
4604
- backOfficeRef: z42.string().nullable(),
4615
+ backOfficeRef: z43.string().nullable(),
4605
4616
  /**
4606
4617
  * The order this session produced, when the connector's back office reported
4607
4618
  * it (`session_orders`): its opaque id and the back office's own name for it.
4608
4619
  * Both null when no order is known — the cart handle above is then the door.
4609
4620
  */
4610
- orderRef: z42.string().nullable(),
4611
- orderLabel: z42.string().nullable(),
4621
+ orderRef: z43.string().nullable(),
4622
+ orderLabel: z43.string().nullable(),
4612
4623
  /**
4613
4624
  * Which shell this session rendered — the one thing about the CAPTURE a list
4614
4625
  * needs.
@@ -4621,12 +4632,12 @@ var SessionSummarySchema = z42.object({
4621
4632
  * on a desktop are not the same session.
4622
4633
  */
4623
4634
  formFactor: SessionFormFactorSchema,
4624
- turnCount: z42.number().int(),
4635
+ turnCount: z43.number().int(),
4625
4636
  /** The visitor's opening message — the single most informative field for
4626
4637
  * deciding whether a session is worth opening, hence the widest column. */
4627
- firstPrompt: z42.string(),
4628
- startedAt: z42.string(),
4629
- lastRunAt: z42.string(),
4638
+ firstPrompt: z43.string(),
4639
+ startedAt: z43.string(),
4640
+ lastRunAt: z43.string(),
4630
4641
  /**
4631
4642
  * The VISITOR's own IANA zone (`America/New_York`), read from their browser
4632
4643
  * at session create — what the two timestamps above should be read in.
@@ -4654,7 +4665,7 @@ var SessionSummarySchema = z42.object({
4654
4665
  * Client-asserted and never validated against a zone table, so every consumer
4655
4666
  * must tolerate an unknown name: `Intl` throws a RangeError on one.
4656
4667
  */
4657
- visitorTimeZone: z42.string().nullable(),
4668
+ visitorTimeZone: z43.string().nullable(),
4658
4669
  /**
4659
4670
  * Mean TIME TO FIRST PATCH, over the turns that recorded one — the first
4660
4671
  * layout op reaching the visitor, and THE latency the project is managed on.
@@ -4662,31 +4673,31 @@ var SessionSummarySchema = z42.object({
4662
4673
  * `totalLatencyMs` carries the chip-gen tail that runs after the visitor is
4663
4674
  * already reading. Null when no turn in the session recorded a patch.
4664
4675
  */
4665
- avgTtftMs: z42.number().int().nullable(),
4676
+ avgTtftMs: z43.number().int().nullable(),
4666
4677
  /** Mean `main_done_ms` — layout + prose complete. Context for the TTFT, not
4667
4678
  * a budget: null on sessions older than the mark's recording. */
4668
- avgMainDoneMs: z42.number().int().nullable(),
4679
+ avgMainDoneMs: z43.number().int().nullable(),
4669
4680
  /** Mean `chip_gen_ms` — the pass that runs AFTER mainDone and is out of the
4670
4681
  * budget. On the row only to explain the gap to `totalLatencyMs`. */
4671
- avgChipGenMs: z42.number().int().nullable(),
4672
- totalLatencyMs: z42.number().int(),
4673
- durationMs: z42.number().int(),
4682
+ avgChipGenMs: z43.number().int().nullable(),
4683
+ totalLatencyMs: z43.number().int(),
4684
+ durationMs: z43.number().int(),
4674
4685
  /** Inferred from recent activity — nothing writes a session-end marker. A
4675
4686
  * live session streams and cannot be given a verdict until it ends. */
4676
- isLive: z42.boolean(),
4687
+ isLive: z43.boolean(),
4677
4688
  verdict: SessionVerdictSchema,
4678
- reviewedBy: z42.string().nullable(),
4679
- reviewedAt: z42.string().nullable(),
4689
+ reviewedBy: z43.string().nullable(),
4690
+ reviewedAt: z43.string().nullable(),
4680
4691
  /** Latest filed bug, flattened onto the row so the queue can show its live
4681
4692
  * state without a second request. */
4682
- bugIssueKey: z42.string().nullable(),
4683
- bugIssueUrl: z42.string().nullable(),
4684
- bugIssueState: z42.string().nullable()
4693
+ bugIssueKey: z43.string().nullable(),
4694
+ bugIssueUrl: z43.string().nullable(),
4695
+ bugIssueState: z43.string().nullable()
4685
4696
  });
4686
- var SessionQueuePageSchema = z42.object({
4687
- sessions: z42.array(SessionSummarySchema),
4688
- totalCount: z42.number().int(),
4689
- hiddenInternalCount: z42.number().int(),
4697
+ var SessionQueuePageSchema = z43.object({
4698
+ sessions: z43.array(SessionSummarySchema),
4699
+ totalCount: z43.number().int(),
4700
+ hiddenInternalCount: z43.number().int(),
4690
4701
  /**
4691
4702
  * Bounced sessions the queue left out — no turn and no add, the default.
4692
4703
  *
@@ -4696,61 +4707,61 @@ var SessionQueuePageSchema = z42.object({
4696
4707
  * `totalCount + hiddenBouncedCount` is that population, and this count is the
4697
4708
  * analytics dashboard's bounce over the same window.
4698
4709
  */
4699
- hiddenBouncedCount: z42.number().int()
4710
+ hiddenBouncedCount: z43.number().int()
4700
4711
  });
4701
- var SessionQueueFacetsSchema = z42.object({
4702
- review: z42.record(z42.number()),
4703
- version: z42.record(z42.number()),
4704
- turns: z42.record(z42.number()),
4705
- durationS: z42.record(z42.number()),
4712
+ var SessionQueueFacetsSchema = z43.object({
4713
+ review: z43.record(z43.number()),
4714
+ version: z43.record(z43.number()),
4715
+ turns: z43.record(z43.number()),
4716
+ durationS: z43.record(z43.number()),
4706
4717
  /** Sessions per funnel step reached — a session counts under every step it reached. */
4707
- funnel: z42.record(z42.number())
4718
+ funnel: z43.record(z43.number())
4708
4719
  });
4709
- var SessionCaptureSchema = z42.object({
4710
- viewportWidth: z42.number().int().nullable(),
4711
- viewportHeight: z42.number().int().nullable(),
4712
- userAgent: z42.string().nullable(),
4713
- locale: z42.string().nullable(),
4720
+ var SessionCaptureSchema = z43.object({
4721
+ viewportWidth: z43.number().int().nullable(),
4722
+ viewportHeight: z43.number().int().nullable(),
4723
+ userAgent: z43.string().nullable(),
4724
+ locale: z43.string().nullable(),
4714
4725
  /** Referrer at session create — separates agentic traffic from organic. */
4715
- referrer: z42.string().nullable()
4726
+ referrer: z43.string().nullable()
4716
4727
  });
4717
- var SessionCaptureInputSchema = z42.object({
4718
- viewportWidth: z42.number().int().positive().max(2e4).optional(),
4719
- viewportHeight: z42.number().int().positive().max(2e4).optional(),
4720
- userAgent: z42.string().max(1e3).optional(),
4721
- locale: z42.string().max(35).optional(),
4728
+ var SessionCaptureInputSchema = z43.object({
4729
+ viewportWidth: z43.number().int().positive().max(2e4).optional(),
4730
+ viewportHeight: z43.number().int().positive().max(2e4).optional(),
4731
+ userAgent: z43.string().max(1e3).optional(),
4732
+ locale: z43.string().max(35).optional(),
4722
4733
  /** IANA zone name from the visitor's browser. Bounded rather than validated:
4723
4734
  * the zone database grows, and refusing a name this build has not heard of
4724
4735
  * would drop a real session's capture over a table that is out of date. */
4725
- timeZone: z42.string().max(64).optional(),
4726
- referrer: z42.string().max(2048).optional(),
4727
- clientVersion: z42.string().max(100).optional(),
4728
- isInternal: z42.boolean().optional()
4736
+ timeZone: z43.string().max(64).optional(),
4737
+ referrer: z43.string().max(2048).optional(),
4738
+ clientVersion: z43.string().max(100).optional(),
4739
+ isInternal: z43.boolean().optional()
4729
4740
  });
4730
- var SessionDetailSchema = z42.object({
4741
+ var SessionDetailSchema = z43.object({
4731
4742
  session: SessionSummarySchema,
4732
4743
  capture: SessionCaptureSchema,
4733
4744
  /** Full verdict history, newest first. Verdicts are revisable, and a session
4734
4745
  * re-judged after a fix is the evidence the fix worked. */
4735
- reviews: z42.array(SessionReviewEventSchema),
4736
- bugs: z42.array(SessionBugSchema),
4737
- comments: z42.array(SessionCommentSchema),
4746
+ reviews: z43.array(SessionReviewEventSchema),
4747
+ bugs: z43.array(SessionBugSchema),
4748
+ comments: z43.array(SessionCommentSchema),
4738
4749
  /** Optional during API/console rolling deployment. Absent is unavailable,
4739
4750
  * not evidence of zero visitor activity. */
4740
4751
  activity: SessionActivitySchema.optional()
4741
4752
  });
4742
- var RecordVerdictInputSchema = z42.object({
4753
+ var RecordVerdictInputSchema = z43.object({
4743
4754
  verdict: RecordableVerdictSchema,
4744
- note: z42.string().max(2e3).optional()
4755
+ note: z43.string().max(2e3).optional()
4745
4756
  });
4746
- var FileBugInputSchema = z42.object({
4747
- turnIndex: z42.number().int().positive().nullable(),
4757
+ var FileBugInputSchema = z43.object({
4758
+ turnIndex: z43.number().int().positive().nullable(),
4748
4759
  /** Optional — a bug filed without dropping a pin has no location. */
4749
4760
  location: BugLocationSchema.nullable().optional(),
4750
- title: z42.string().min(1).max(300),
4751
- body: z42.string().min(1),
4761
+ title: z43.string().min(1).max(300),
4762
+ body: z43.string().min(1),
4752
4763
  severity: BugSeveritySchema,
4753
- payload: z42.record(z42.unknown())
4764
+ payload: z43.record(z43.unknown())
4754
4765
  });
4755
4766
 
4756
4767
  // ../spacestation/src/contracts/retrieval/ecommerce/option-values.ts
@@ -5076,60 +5087,60 @@ __export(src_exports2, {
5076
5087
  });
5077
5088
 
5078
5089
  // ../ecommerce/src/commerce-schemas.ts
5079
- import { z as z43 } from "zod";
5080
- var MoneySchema = z43.object({
5081
- amount: z43.number(),
5082
- currencyCode: z43.string()
5090
+ import { z as z44 } from "zod";
5091
+ var MoneySchema = z44.object({
5092
+ amount: z44.number(),
5093
+ currencyCode: z44.string()
5083
5094
  });
5084
- var ImageSchema = z43.object({
5085
- url: z43.string(),
5086
- altText: z43.string(),
5087
- width: z43.number().optional(),
5088
- height: z43.number().optional(),
5095
+ var ImageSchema = z44.object({
5096
+ url: z44.string(),
5097
+ altText: z44.string(),
5098
+ width: z44.number().optional(),
5099
+ height: z44.number().optional(),
5089
5100
  /** Responsive candidate set, resolved at the commerce-adapter boundary —
5090
5101
  * never computed in a component. Renderers use it as `<img srcSet>` paired
5091
5102
  * with a layout `sizes`. Absent for non-CDN / unsizable images. */
5092
- srcSet: z43.string().optional()
5103
+ srcSet: z44.string().optional()
5093
5104
  });
5094
- var AssetSchema = z43.object({
5105
+ var AssetSchema = z44.object({
5095
5106
  /** Opaque asset id — the `resolved()` ref the agent emitted. */
5096
- id: z43.string(),
5097
- url: z43.string(),
5098
- altText: z43.string(),
5099
- srcSet: z43.string().optional()
5107
+ id: z44.string(),
5108
+ url: z44.string(),
5109
+ altText: z44.string(),
5110
+ srcSet: z44.string().optional()
5100
5111
  });
5101
- var SelectedOptionSchema = z43.object({
5102
- name: z43.string(),
5103
- value: z43.string()
5112
+ var SelectedOptionSchema = z44.object({
5113
+ name: z44.string(),
5114
+ value: z44.string()
5104
5115
  });
5105
- var VideoSourceSchema = z43.object({
5106
- url: z43.string(),
5107
- mimeType: z43.string(),
5108
- width: z43.number().optional(),
5109
- height: z43.number().optional()
5116
+ var VideoSourceSchema = z44.object({
5117
+ url: z44.string(),
5118
+ mimeType: z44.string(),
5119
+ width: z44.number().optional(),
5120
+ height: z44.number().optional()
5110
5121
  });
5111
- var ProductVideoSchema = z43.object({
5112
- kind: z43.enum(["hosted", "external"]),
5122
+ var ProductVideoSchema = z44.object({
5123
+ kind: z44.enum(["hosted", "external"]),
5113
5124
  previewImage: ImageSchema.optional(),
5114
- altText: z43.string().default(""),
5125
+ altText: z44.string().default(""),
5115
5126
  /** `kind: 'hosted'` only — empty for external embeds. */
5116
- sources: z43.array(VideoSourceSchema).default([]),
5127
+ sources: z44.array(VideoSourceSchema).default([]),
5117
5128
  /** `kind: 'external'` only — iframe embed URL. */
5118
- embedUrl: z43.string().optional(),
5129
+ embedUrl: z44.string().optional(),
5119
5130
  /** `kind: 'external'` only — e.g. `YOUTUBE` | `VIMEO`. */
5120
- host: z43.string().optional()
5131
+ host: z44.string().optional()
5121
5132
  });
5122
- var AvailabilityStatusSchema = z43.enum([
5133
+ var AvailabilityStatusSchema = z44.enum([
5123
5134
  "in_stock",
5124
5135
  "backorder",
5125
5136
  "preorder",
5126
5137
  "out_of_stock",
5127
5138
  "discontinued"
5128
5139
  ]);
5129
- var ProductVariantSchema = z43.object({
5130
- id: z43.string(),
5131
- title: z43.string(),
5132
- available: z43.boolean(),
5140
+ var ProductVariantSchema = z44.object({
5141
+ id: z44.string(),
5142
+ title: z44.string(),
5143
+ available: z44.boolean(),
5133
5144
  /**
5134
5145
  * Qualifies `available` with the fulfillment state behind it. Absent means
5135
5146
  * the backend did not say — which is NOT the same as in stock, and must not
@@ -5144,10 +5155,10 @@ var ProductVariantSchema = z43.object({
5144
5155
  availabilityStatus: AvailabilityStatusSchema.optional(),
5145
5156
  price: MoneySchema,
5146
5157
  compareAtPrice: MoneySchema.optional(),
5147
- selectedOptions: z43.array(SelectedOptionSchema).optional(),
5158
+ selectedOptions: z44.array(SelectedOptionSchema).optional(),
5148
5159
  image: ImageSchema.optional(),
5149
5160
  /** The merchant's stock-keeping code. Absent when the backend has none. */
5150
- sku: z43.string().optional()
5161
+ sku: z44.string().optional()
5151
5162
  });
5152
5163
  var MP4_MIME = "video/mp4";
5153
5164
  var HLS_MIME = "application/x-mpegURL";
@@ -5157,34 +5168,34 @@ function orderedVideoSources(video) {
5157
5168
  const hls = video.sources.filter((s) => s.mimeType === HLS_MIME);
5158
5169
  return [...mp4, ...hls];
5159
5170
  }
5160
- var SiblingProductSchema = z43.object({
5161
- id: z43.string(),
5162
- handle: z43.string(),
5163
- title: z43.string(),
5171
+ var SiblingProductSchema = z44.object({
5172
+ id: z44.string(),
5173
+ handle: z44.string(),
5174
+ title: z44.string(),
5164
5175
  /** The differentiating value across siblings — typically the color
5165
5176
  * label ("OLIVE", "STONE"). Rendered next to the swatch row. */
5166
- color: z43.string(),
5177
+ color: z44.string(),
5167
5178
  /** Swatch artwork. Hydrators populate from the sibling product's
5168
5179
  * first image; renderers crop / fit to the swatch tile. */
5169
5180
  swatchImage: ImageSchema.optional(),
5170
- available: z43.boolean().default(true),
5181
+ available: z44.boolean().default(true),
5171
5182
  /** Marks the sibling that IS the currently-rendered product. The
5172
5183
  * picker uses this to highlight the active swatch without an
5173
5184
  * external id comparison. */
5174
- current: z43.boolean().default(false)
5185
+ current: z44.boolean().default(false)
5175
5186
  });
5176
- var ProductSchema = z43.object({
5177
- id: z43.string(),
5178
- handle: z43.string().default(""),
5179
- title: z43.string(),
5180
- description: z43.string().default(""),
5181
- descriptionHtml: z43.string().optional(),
5182
- vendor: z43.string().default(""),
5183
- productType: z43.string().optional(),
5184
- tags: z43.array(z43.string()).default([]),
5187
+ var ProductSchema = z44.object({
5188
+ id: z44.string(),
5189
+ handle: z44.string().default(""),
5190
+ title: z44.string(),
5191
+ description: z44.string().default(""),
5192
+ descriptionHtml: z44.string().optional(),
5193
+ vendor: z44.string().default(""),
5194
+ productType: z44.string().optional(),
5195
+ tags: z44.array(z44.string()).default([]),
5185
5196
  price: MoneySchema.default({ amount: 0, currencyCode: "USD" }),
5186
5197
  compareAtPrice: MoneySchema.optional(),
5187
- images: z43.array(ImageSchema).default([]),
5198
+ images: z44.array(ImageSchema).default([]),
5188
5199
  /**
5189
5200
  * Product videos (`Video` + `ExternalVideo` media). Shopify's MCP
5190
5201
  * catalog drops video media — it only surfaces through the Storefront
@@ -5192,21 +5203,21 @@ var ProductSchema = z43.object({
5192
5203
  * boundary. Default `[]` so renderers gate on `length > 0` without a
5193
5204
  * presence guard.
5194
5205
  */
5195
- videos: z43.array(ProductVideoSchema).default([]),
5196
- variants: z43.array(ProductVariantSchema).default([]),
5197
- availableForSale: z43.boolean().default(true),
5198
- options: z43.array(z43.object({
5199
- name: z43.string(),
5200
- values: z43.array(z43.string())
5206
+ videos: z44.array(ProductVideoSchema).default([]),
5207
+ variants: z44.array(ProductVariantSchema).default([]),
5208
+ availableForSale: z44.boolean().default(true),
5209
+ options: z44.array(z44.object({
5210
+ name: z44.string(),
5211
+ values: z44.array(z44.string())
5201
5212
  })).optional(),
5202
- collections: z43.array(z43.string()).optional(),
5213
+ collections: z44.array(z44.string()).optional(),
5203
5214
  /** See `SiblingProductSchema`. Default `[]` so renderers can check
5204
5215
  * `length > 1` to decide whether to draw the swatch row without a
5205
5216
  * presence guard. */
5206
- colorVariants: z43.array(SiblingProductSchema).default([]),
5207
- rating: z43.object({
5208
- value: z43.number(),
5209
- count: z43.number()
5217
+ colorVariants: z44.array(SiblingProductSchema).default([]),
5218
+ rating: z44.object({
5219
+ value: z44.number(),
5220
+ count: z44.number()
5210
5221
  }).optional(),
5211
5222
  /**
5212
5223
  * Product reviews surfaced from the brand's review store. SDK
@@ -5215,12 +5226,12 @@ var ProductSchema = z43.object({
5215
5226
  * review bodies. Renderers (`Reviews` component, `ProductDetail`,
5216
5227
  * etc.) consume directly.
5217
5228
  */
5218
- reviews: z43.array(z43.object({
5219
- author: z43.string(),
5220
- rating: z43.number(),
5221
- content: z43.string(),
5222
- date: z43.string(),
5223
- verified: z43.boolean().optional()
5229
+ reviews: z44.array(z44.object({
5230
+ author: z44.string(),
5231
+ rating: z44.number(),
5232
+ content: z44.string(),
5233
+ date: z44.string(),
5234
+ verified: z44.boolean().optional()
5224
5235
  })).optional(),
5225
5236
  /**
5226
5237
  * Ghost-entity flag — `true` when the Storefront API could not hydrate
@@ -5232,7 +5243,7 @@ var ProductSchema = z43.object({
5232
5243
  * Set exclusively by `createUnavailableProduct()` — never by the
5233
5244
  * Storefront mapper.
5234
5245
  */
5235
- unavailable: z43.boolean().default(false)
5246
+ unavailable: z44.boolean().default(false)
5236
5247
  });
5237
5248
  function createUnavailableProduct(gid) {
5238
5249
  return {
@@ -5254,68 +5265,68 @@ function createUnavailableProduct(gid) {
5254
5265
  function isGhostEntity(value) {
5255
5266
  return typeof value === "object" && value !== null && "unavailable" in value && value.unavailable === true;
5256
5267
  }
5257
- var ReviewSchema = z43.object({
5258
- id: z43.string(),
5259
- productId: z43.string(),
5260
- author: z43.string(),
5261
- rating: z43.number(),
5262
- text: z43.string(),
5263
- date: z43.string(),
5264
- verified: z43.boolean()
5268
+ var ReviewSchema = z44.object({
5269
+ id: z44.string(),
5270
+ productId: z44.string(),
5271
+ author: z44.string(),
5272
+ rating: z44.number(),
5273
+ text: z44.string(),
5274
+ date: z44.string(),
5275
+ verified: z44.boolean()
5265
5276
  });
5266
- var ArticleSchema = z43.object({
5267
- id: z43.string(),
5268
- handle: z43.string().default(""),
5269
- title: z43.string(),
5270
- excerpt: z43.string().default(""),
5271
- content: z43.string().default(""),
5272
- contentHtml: z43.string().optional(),
5273
- author: z43.string().default(""),
5274
- publishedAt: z43.string().default(""),
5277
+ var ArticleSchema = z44.object({
5278
+ id: z44.string(),
5279
+ handle: z44.string().default(""),
5280
+ title: z44.string(),
5281
+ excerpt: z44.string().default(""),
5282
+ content: z44.string().default(""),
5283
+ contentHtml: z44.string().optional(),
5284
+ author: z44.string().default(""),
5285
+ publishedAt: z44.string().default(""),
5275
5286
  image: ImageSchema.optional(),
5276
- blogHandle: z43.string().default(""),
5277
- tags: z43.array(z43.string()).default([])
5287
+ blogHandle: z44.string().default(""),
5288
+ tags: z44.array(z44.string()).default([])
5278
5289
  });
5279
- var CmsPageSchema = z43.object({
5280
- id: z43.string(),
5281
- handle: z43.string().default(""),
5282
- title: z43.string(),
5283
- body: z43.string().default(""),
5284
- bodyHtml: z43.string().optional(),
5285
- bodySummary: z43.string().default(""),
5286
- updatedAt: z43.string().default(""),
5287
- seoTitle: z43.string().optional(),
5288
- seoDescription: z43.string().optional()
5290
+ var CmsPageSchema = z44.object({
5291
+ id: z44.string(),
5292
+ handle: z44.string().default(""),
5293
+ title: z44.string(),
5294
+ body: z44.string().default(""),
5295
+ bodyHtml: z44.string().optional(),
5296
+ bodySummary: z44.string().default(""),
5297
+ updatedAt: z44.string().default(""),
5298
+ seoTitle: z44.string().optional(),
5299
+ seoDescription: z44.string().optional()
5289
5300
  });
5290
- var CmsPolicySchema = z43.object({
5291
- id: z43.string(),
5301
+ var CmsPolicySchema = z44.object({
5302
+ id: z44.string(),
5292
5303
  /** Stable policy slot identifier: 'refund' | 'privacy' | 'terms' |
5293
5304
  * 'shipping' | 'subscription' | 'warranty' | custom string. Open so
5294
5305
  * platforms with custom policy types can extend. */
5295
- kind: z43.string(),
5306
+ kind: z44.string(),
5296
5307
  /** Slug-shaped handle the platform exposes for storefront URLs
5297
5308
  * (e.g. `refund-policy`). Empty string when the backend doesn't
5298
5309
  * surface one. */
5299
- handle: z43.string().default(""),
5300
- title: z43.string(),
5301
- body: z43.string().default(""),
5302
- bodyHtml: z43.string().optional(),
5303
- url: z43.string().default("")
5310
+ handle: z44.string().default(""),
5311
+ title: z44.string(),
5312
+ body: z44.string().default(""),
5313
+ bodyHtml: z44.string().optional(),
5314
+ url: z44.string().default("")
5304
5315
  });
5305
- var CollectionSchema = z43.object({
5306
- id: z43.string(),
5307
- handle: z43.string().default(""),
5308
- title: z43.string(),
5309
- description: z43.string().default(""),
5316
+ var CollectionSchema = z44.object({
5317
+ id: z44.string(),
5318
+ handle: z44.string().default(""),
5319
+ title: z44.string(),
5320
+ description: z44.string().default(""),
5310
5321
  image: ImageSchema.optional(),
5311
- productCount: z43.number().int().nonnegative().optional()
5322
+ productCount: z44.number().int().nonnegative().optional()
5312
5323
  });
5313
- var CartLineSchema = z43.object({
5314
- id: z43.string(),
5315
- merchandiseId: z43.string(),
5316
- productId: z43.string(),
5317
- title: z43.string(),
5318
- variantTitle: z43.string().optional(),
5324
+ var CartLineSchema = z44.object({
5325
+ id: z44.string(),
5326
+ merchandiseId: z44.string(),
5327
+ productId: z44.string(),
5328
+ title: z44.string(),
5329
+ variantTitle: z44.string().optional(),
5319
5330
  /**
5320
5331
  * The variant's option axes as structured pairs (e.g.
5321
5332
  * `[{name:'Size', value:'7'}]`). The machine-readable counterpart of
@@ -5324,10 +5335,10 @@ var CartLineSchema = z43.object({
5324
5335
  * single-variant products (the degenerate `Title: Default Title` axis
5325
5336
  * is normalized away at the adapter boundary).
5326
5337
  */
5327
- selectedOptions: z43.array(SelectedOptionSchema).optional(),
5328
- vendor: z43.string().optional(),
5329
- sku: z43.string().optional(),
5330
- quantity: z43.number().int().positive(),
5338
+ selectedOptions: z44.array(SelectedOptionSchema).optional(),
5339
+ vendor: z44.string().optional(),
5340
+ sku: z44.string().optional(),
5341
+ quantity: z44.number().int().positive(),
5331
5342
  unitPrice: MoneySchema,
5332
5343
  totalPrice: MoneySchema,
5333
5344
  image: ImageSchema.optional(),
@@ -5347,26 +5358,26 @@ var CartLineSchema = z43.object({
5347
5358
  * client-minted id the backend rejects, line-tap navigation is
5348
5359
  * suppressed, and the money never folds into a settled-looking total.
5349
5360
  */
5350
- pending: z43.boolean().optional()
5361
+ pending: z44.boolean().optional()
5351
5362
  });
5352
5363
  function isPendingCartLine(line) {
5353
5364
  return line.pending === true;
5354
5365
  }
5355
- var CartDiscountCodeSchema = z43.object({
5356
- code: z43.string(),
5357
- applicable: z43.boolean()
5366
+ var CartDiscountCodeSchema = z44.object({
5367
+ code: z44.string(),
5368
+ applicable: z44.boolean()
5358
5369
  });
5359
- var CartMessageSchema = z43.object({
5360
- kind: z43.enum(["error", "warning", "info"]),
5370
+ var CartMessageSchema = z44.object({
5371
+ kind: z44.enum(["error", "warning", "info"]),
5361
5372
  /** Machine code for branching; opaque and backend-defined. */
5362
- code: z43.string(),
5373
+ code: z44.string(),
5363
5374
  /** Human-readable text, meant to be shown as-is. */
5364
- content: z43.string()
5375
+ content: z44.string()
5365
5376
  });
5366
- var CartSchema = z43.object({
5367
- id: z43.string(),
5368
- lines: z43.array(CartLineSchema),
5369
- totalQuantity: z43.number().int().nonnegative(),
5377
+ var CartSchema = z44.object({
5378
+ id: z44.string(),
5379
+ lines: z44.array(CartLineSchema),
5380
+ totalQuantity: z44.number().int().nonnegative(),
5370
5381
  subtotal: MoneySchema,
5371
5382
  /**
5372
5383
  * Cart total after discounts (pre-shipping/tax). Absent when the
@@ -5376,11 +5387,11 @@ var CartSchema = z43.object({
5376
5387
  */
5377
5388
  total: MoneySchema.optional(),
5378
5389
  /** Discount codes currently attached to the cart. */
5379
- discountCodes: z43.array(CartDiscountCodeSchema).default([]),
5390
+ discountCodes: z44.array(CartDiscountCodeSchema).default([]),
5380
5391
  /** Notices the backend attached to this cart — see `CartMessageSchema`.
5381
5392
  * Empty when the backend said nothing or does not report them. */
5382
- messages: z43.array(CartMessageSchema).default([]),
5383
- checkoutUrl: z43.string().optional(),
5393
+ messages: z44.array(CartMessageSchema).default([]),
5394
+ checkoutUrl: z44.string().optional(),
5384
5395
  /**
5385
5396
  * Opaque handle this cart is known by in the connector's BACK OFFICE — the
5386
5397
  * value a space owner searches there to find the order this cart became.
@@ -5393,14 +5404,14 @@ var CartSchema = z43.object({
5393
5404
  * Absent when the platform has no such handle, or while the cart is still the
5394
5405
  * client's optimistic paint and its id is client-minted.
5395
5406
  */
5396
- backOfficeRef: z43.string().optional(),
5407
+ backOfficeRef: z44.string().optional(),
5397
5408
  /**
5398
5409
  * URL that recreates this cart on the merchant's own store website
5399
5410
  * (replace semantics — overwrites any cart the visitor already has
5400
5411
  * there). Populated by platform adapters that support it; absent when
5401
5412
  * the cart is empty or the URL cannot be built.
5402
5413
  */
5403
- storeCartUrl: z43.string().optional(),
5414
+ storeCartUrl: z44.string().optional(),
5404
5415
  /**
5405
5416
  * True while this cart exists only in the client's optimistic paint —
5406
5417
  * no backend cart has been created yet, so its `id` is client-minted and
@@ -5408,7 +5419,7 @@ var CartSchema = z43.object({
5408
5419
  * `CartLineSchema.pending`: the adapter never sets it, and callers that
5409
5420
  * need a real cart id read THIS rather than sniffing the id's shape.
5410
5421
  */
5411
- pending: z43.boolean().optional()
5422
+ pending: z44.boolean().optional()
5412
5423
  });
5413
5424
  function settledCart(cart) {
5414
5425
  if (cart === null || cart === void 0) return null;
@@ -5416,27 +5427,27 @@ function settledCart(cart) {
5416
5427
  }
5417
5428
 
5418
5429
  // ../ecommerce/src/review-schemas.ts
5419
- import { z as z44 } from "zod";
5430
+ import { z as z45 } from "zod";
5420
5431
  var PRODUCT_REVIEWS_RESOLVER_KEY = "productReviews";
5421
- var ProductReviewItemSchema = z44.object({
5422
- author: z44.string(),
5423
- rating: z44.number(),
5432
+ var ProductReviewItemSchema = z45.object({
5433
+ author: z45.string(),
5434
+ rating: z45.number(),
5424
5435
  /** The reviewer's own headline ("love"), when they wrote one — the site shows it above `content`. */
5425
- title: z44.string().optional(),
5426
- content: z44.string(),
5427
- date: z44.string(),
5428
- verified: z44.boolean().optional(),
5436
+ title: z45.string().optional(),
5437
+ content: z45.string(),
5438
+ date: z45.string(),
5439
+ verified: z45.boolean().optional(),
5429
5440
  /**
5430
5441
  * Non-empty when the review was written for a grouped SIBLING product rather
5431
5442
  * than this one (brands pool reviews across a product line). A surface can
5432
5443
  * attribute it; empty / absent ⇒ the product's own review.
5433
5444
  */
5434
- writtenFor: z44.string().optional()
5445
+ writtenFor: z45.string().optional()
5435
5446
  });
5436
5447
  var ProductReviewHighlightSchema = ProductReviewItemSchema.extend({
5437
5448
  /** The sentence(s) the ranking fired on. Descriptive — it is what the matcher
5438
5449
  * scored, NOT necessarily text that occurs in `content`. */
5439
- highlight: z44.string().optional(),
5450
+ highlight: z45.string().optional(),
5440
5451
  /**
5441
5452
  * `highlight` resolved back into `content` as a VERBATIM substring, so a
5442
5453
  * surface can mark it with a plain `indexOf` and no matcher of its own.
@@ -5451,29 +5462,29 @@ var ProductReviewHighlightSchema = ProductReviewItemSchema.extend({
5451
5462
  * Absent when the passage genuinely has no home in the body (one cut from the
5452
5463
  * title). A surface then marks NOTHING rather than guessing at a span.
5453
5464
  */
5454
- mark: z44.string().optional()
5465
+ mark: z45.string().optional()
5455
5466
  });
5456
- var ReviewAggregateSchema = z44.object({
5457
- value: z44.number(),
5458
- count: z44.number()
5467
+ var ReviewAggregateSchema = z45.object({
5468
+ value: z45.number(),
5469
+ count: z45.number()
5459
5470
  });
5460
- var ProductReviewDataSchema = z44.object({
5461
- id: z44.string(),
5471
+ var ProductReviewDataSchema = z45.object({
5472
+ id: z45.string(),
5462
5473
  /** The product's FULL retrieved set — what a filterable list renders. */
5463
- reviews: z44.array(ProductReviewItemSchema).default([]),
5474
+ reviews: z45.array(ProductReviewItemSchema).default([]),
5464
5475
  aggregate: ReviewAggregateSchema.default({ value: 0, count: 0 }),
5465
5476
  /** 5★→1★ star COUNTS over the full set (index 0 = 5-star). */
5466
- distribution: z44.array(z44.number()).default([]),
5477
+ distribution: z45.array(z45.number()).default([]),
5467
5478
  /**
5468
5479
  * The reviews that ANSWER the surface's intent, best first. Empty when no
5469
5480
  * intent was asked for — never a silent copy of `reviews`.
5470
5481
  */
5471
- highlights: z44.array(ProductReviewHighlightSchema).default([]),
5482
+ highlights: z45.array(ProductReviewHighlightSchema).default([]),
5472
5483
  /**
5473
5484
  * True when the review provider could not be read and nothing is indexed —
5474
5485
  * the empty lists mean "not loaded", NOT "this product has no reviews".
5475
5486
  */
5476
- unavailable: z44.boolean().optional()
5487
+ unavailable: z45.boolean().optional()
5477
5488
  });
5478
5489
  var ProductReviewPayloadSchema = ProductReviewDataSchema.omit({ id: true });
5479
5490
 
@@ -5767,9 +5778,9 @@ function readPdpCompanions(config) {
5767
5778
  }
5768
5779
 
5769
5780
  // ../ecommerce/src/base-attributes.ts
5770
- import { z as z45 } from "zod";
5781
+ import { z as z46 } from "zod";
5771
5782
  var BASE_ATTRIBUTES_CONFIG_KEY = "baseAttributes";
5772
- var BaseAttributesRecordSchema = z45.record(z45.string(), AttributeDefSchema);
5783
+ var BaseAttributesRecordSchema = z46.record(z46.string(), AttributeDefSchema);
5773
5784
  function buildBaseAttributesConfig(attributes) {
5774
5785
  return { [BASE_ATTRIBUTES_CONFIG_KEY]: attributes };
5775
5786
  }
@@ -5780,9 +5791,9 @@ function readBaseAttributesConfig(config) {
5780
5791
  }
5781
5792
 
5782
5793
  // ../ecommerce/src/bucket-labels.ts
5783
- import { z as z46 } from "zod";
5794
+ import { z as z47 } from "zod";
5784
5795
  var BUCKET_LABELS_CONFIG_KEY = "bucketLabels";
5785
- var BucketLabelsRecordSchema = z46.record(z46.string(), z46.string());
5796
+ var BucketLabelsRecordSchema = z47.record(z47.string(), z47.string());
5786
5797
  function buildBucketLabelsConfig(labels) {
5787
5798
  return { [BUCKET_LABELS_CONFIG_KEY]: labels };
5788
5799
  }
@@ -5901,6 +5912,8 @@ function runSessionScopedClearHandlers() {
5901
5912
  var shell_exports = {};
5902
5913
  __export(shell_exports, {
5903
5914
  ATTACHMENT_ACCEPT: () => ATTACHMENT_ACCEPT,
5915
+ BotCheckNoticeProvider: () => BotCheckNoticeProvider,
5916
+ BotCheckNoticeSchema: () => BotCheckNoticeSchema,
5904
5917
  DockPersistenceProvider: () => DockPersistenceProvider,
5905
5918
  ScrollContainerProvider: () => ScrollContainerProvider,
5906
5919
  ShellRegistryProvider: () => ShellRegistryProvider,
@@ -5912,6 +5925,7 @@ __export(shell_exports, {
5912
5925
  registerExclusiveOverlay: () => registerExclusiveOverlay,
5913
5926
  splitAnswer: () => splitAnswer,
5914
5927
  threadRowAttrs: () => threadRowAttrs,
5928
+ useBotCheckNotice: () => useBotCheckNotice,
5915
5929
  useComposerAttachments: () => useComposerAttachments,
5916
5930
  useComposerChipSelect: () => useComposerChipSelect,
5917
5931
  useConversationPage: () => useConversationPage,
@@ -5996,8 +6010,22 @@ function useDockPersistence() {
5996
6010
  return React4.useContext(DockPersistenceContext);
5997
6011
  }
5998
6012
 
6013
+ // src/shell/bot-check-notice.tsx
6014
+ import React5 from "react";
6015
+ import { jsx as jsx5 } from "react/jsx-runtime";
6016
+ var BotCheckNoticeContext = React5.createContext(null);
6017
+ function BotCheckNoticeProvider({
6018
+ value,
6019
+ children
6020
+ }) {
6021
+ return /* @__PURE__ */ jsx5(BotCheckNoticeContext.Provider, { value, children });
6022
+ }
6023
+ function useBotCheckNotice() {
6024
+ return React5.useContext(BotCheckNoticeContext);
6025
+ }
6026
+
5999
6027
  // src/shell/use-dock-state.ts
6000
- import React7 from "react";
6028
+ import React8 from "react";
6001
6029
 
6002
6030
  // src/canvas/runtime-context.tsx
6003
6031
  import { createContext as createContext6, useContext as useContext6 } from "react";
@@ -6110,21 +6138,21 @@ function useHasLeftSeedHome() {
6110
6138
  }
6111
6139
 
6112
6140
  // src/shell/use-hydrated.ts
6113
- import React5 from "react";
6141
+ import React6 from "react";
6114
6142
  function useHydrated() {
6115
- const [hydrated, setHydrated] = React5.useState(false);
6116
- React5.useEffect(() => {
6143
+ const [hydrated, setHydrated] = React6.useState(false);
6144
+ React6.useEffect(() => {
6117
6145
  setHydrated(true);
6118
6146
  }, []);
6119
6147
  return hydrated;
6120
6148
  }
6121
6149
 
6122
6150
  // src/shell/use-overridable-toggle.ts
6123
- import React6 from "react";
6151
+ import React7 from "react";
6124
6152
  function useOverridableToggle(defaultValue) {
6125
- const [override, setOverride] = React6.useState(null);
6153
+ const [override, setOverride] = React7.useState(null);
6126
6154
  const value = override === null ? defaultValue : override;
6127
- const set = React6.useCallback((next) => {
6155
+ const set = React7.useCallback((next) => {
6128
6156
  setOverride(next);
6129
6157
  }, []);
6130
6158
  const toggle = () => {
@@ -6141,9 +6169,9 @@ function useDockState(reopenOnMessage, autoOpen) {
6141
6169
  const hasLeftHome = useHasLeftSeedHome();
6142
6170
  const agentDriven = useAgentDriven();
6143
6171
  const settled = sessionId !== null;
6144
- const settledRef = React7.useRef(false);
6145
- const engagedWhenSettledRef = React7.useRef(false);
6146
- const hasEngagedRef = React7.useRef(initialOpen === true);
6172
+ const settledRef = React8.useRef(false);
6173
+ const engagedWhenSettledRef = React8.useRef(false);
6174
+ const hasEngagedRef = React8.useRef(initialOpen === true);
6147
6175
  const historyIsAccountedFor = initialOpen !== null;
6148
6176
  const engagementIsNew = historyIsAccountedFor ? settledRef.current && !engagedWhenSettledRef.current : true;
6149
6177
  if (hasLeftHome && engagementIsNew && !agentDriven) hasEngagedRef.current = true;
@@ -6151,8 +6179,8 @@ function useDockState(reopenOnMessage, autoOpen) {
6151
6179
  const openDefault = agentDriven || !autoOpen ? false : hydrated ? hasEngagedRef.current : initialOpen === true;
6152
6180
  const toggle = useOverridableToggle(openDefault);
6153
6181
  const userTurns = messages.reduce((n, m) => m.role === "user" ? n + 1 : n, 0);
6154
- const prevUserTurns = React7.useRef(userTurns);
6155
- React7.useEffect(() => {
6182
+ const prevUserTurns = React8.useRef(userTurns);
6183
+ React8.useEffect(() => {
6156
6184
  if (!settledRef.current) {
6157
6185
  if (!settled) return;
6158
6186
  settledRef.current = true;
@@ -6163,7 +6191,7 @@ function useDockState(reopenOnMessage, autoOpen) {
6163
6191
  if (reopenOnMessage && autoOpen && !agentDriven && userTurns > prevUserTurns.current) toggle.set(true);
6164
6192
  prevUserTurns.current = userTurns;
6165
6193
  }, [userTurns, settled, hasLeftHome, reopenOnMessage, autoOpen, agentDriven, toggle.set]);
6166
- React7.useEffect(() => {
6194
+ React8.useEffect(() => {
6167
6195
  onOpenChange(toggle.value);
6168
6196
  }, [toggle.value, onOpenChange]);
6169
6197
  return { open: toggle.value, toggle: toggle.toggle };
@@ -6195,7 +6223,7 @@ function useExclusiveOverlay(id, open, close) {
6195
6223
  }
6196
6224
 
6197
6225
  // src/shell/composer-attachments/use-composer-attachments.ts
6198
- import * as React8 from "react";
6226
+ import * as React9 from "react";
6199
6227
 
6200
6228
  // src/utils/core-utils/mint-id.ts
6201
6229
  function mintId(prefix) {
@@ -6237,12 +6265,12 @@ function failureOf(err) {
6237
6265
  }
6238
6266
  function useComposerAttachments() {
6239
6267
  const session = useFourtySession();
6240
- const [attachments, setAttachments] = React8.useState([]);
6241
- const createdUrls = React8.useRef(/* @__PURE__ */ new Set());
6242
- const update2 = React8.useCallback((localId, patch) => {
6268
+ const [attachments, setAttachments] = React9.useState([]);
6269
+ const createdUrls = React9.useRef(/* @__PURE__ */ new Set());
6270
+ const update2 = React9.useCallback((localId, patch) => {
6243
6271
  setAttachments((prev) => prev.map((a) => a.localId === localId ? { ...a, ...patch } : a));
6244
6272
  }, []);
6245
- const startUpload = React8.useCallback(
6273
+ const startUpload = React9.useCallback(
6246
6274
  (localId, file) => {
6247
6275
  const failure = validate(file);
6248
6276
  if (failure !== null) {
@@ -6266,7 +6294,7 @@ function useComposerAttachments() {
6266
6294
  },
6267
6295
  [session, update2]
6268
6296
  );
6269
- const addFiles = React8.useCallback(
6297
+ const addFiles = React9.useCallback(
6270
6298
  (files) => {
6271
6299
  const list2 = Array.from(files);
6272
6300
  for (const file of list2) {
@@ -6299,13 +6327,13 @@ function useComposerAttachments() {
6299
6327
  },
6300
6328
  [startUpload]
6301
6329
  );
6302
- const revoke = React8.useCallback((url) => {
6330
+ const revoke = React9.useCallback((url) => {
6303
6331
  if (url !== null && createdUrls.current.has(url)) {
6304
6332
  URL.revokeObjectURL(url);
6305
6333
  createdUrls.current.delete(url);
6306
6334
  }
6307
6335
  }, []);
6308
- const remove2 = React8.useCallback(
6336
+ const remove2 = React9.useCallback(
6309
6337
  (localId) => {
6310
6338
  setAttachments((prev) => {
6311
6339
  const target = prev.find((a) => a.localId === localId);
@@ -6315,12 +6343,12 @@ function useComposerAttachments() {
6315
6343
  },
6316
6344
  [revoke]
6317
6345
  );
6318
- const clear = React8.useCallback(() => {
6346
+ const clear = React9.useCallback(() => {
6319
6347
  for (const url of createdUrls.current) URL.revokeObjectURL(url);
6320
6348
  createdUrls.current.clear();
6321
6349
  setAttachments([]);
6322
6350
  }, []);
6323
- React8.useEffect(
6351
+ React9.useEffect(
6324
6352
  () => () => {
6325
6353
  for (const url of createdUrls.current) URL.revokeObjectURL(url);
6326
6354
  createdUrls.current.clear();
@@ -6328,7 +6356,7 @@ function useComposerAttachments() {
6328
6356
  []
6329
6357
  );
6330
6358
  const hasPending = attachments.some((a) => a.status === "uploading");
6331
- const readyRefs = React8.useMemo(
6359
+ const readyRefs = React9.useMemo(
6332
6360
  () => attachments.filter((a) => a.ref !== null).map((a) => a.ref),
6333
6361
  [attachments]
6334
6362
  );
@@ -6336,7 +6364,7 @@ function useComposerAttachments() {
6336
6364
  }
6337
6365
 
6338
6366
  // src/shell/use-prompt-composer.ts
6339
- import * as React9 from "react";
6367
+ import * as React10 from "react";
6340
6368
 
6341
6369
  // src/voice/use-voice-capture.ts
6342
6370
  import { useCallback as useCallback4, useEffect as useEffect4, useRef as useRef4, useState as useState3 } from "react";
@@ -6608,26 +6636,26 @@ function usePromptComposer(options = {}) {
6608
6636
  const internalAttach = useComposerAttachments();
6609
6637
  const attach = attachmentsController !== void 0 ? attachmentsController : internalAttach;
6610
6638
  const [value, setValue] = useComposerDraft();
6611
- const dictationBaseRef = React9.useRef("");
6612
- const handleDictationResult = React9.useCallback((transcript) => {
6639
+ const dictationBaseRef = React10.useRef("");
6640
+ const handleDictationResult = React10.useCallback((transcript) => {
6613
6641
  const base = dictationBaseRef.current;
6614
6642
  setValue(base.length > 0 ? `${base} ${transcript}` : transcript);
6615
6643
  }, [setValue]);
6616
- const submitRef = React9.useRef(() => {
6644
+ const submitRef = React10.useRef(() => {
6617
6645
  });
6618
6646
  const voiceCapture = useVoiceCapture({
6619
6647
  onResult: handleDictationResult,
6620
6648
  onCommit: () => submitRef.current()
6621
6649
  });
6622
- const valueRef = React9.useRef(value);
6650
+ const valueRef = React10.useRef(value);
6623
6651
  valueRef.current = value;
6624
- const toggleDictation = React9.useCallback(() => {
6652
+ const toggleDictation = React10.useCallback(() => {
6625
6653
  if (voiceCapture.state !== "listening") {
6626
6654
  dictationBaseRef.current = valueRef.current;
6627
6655
  }
6628
6656
  voiceCapture.toggle();
6629
6657
  }, [voiceCapture]);
6630
- const onPaste = React9.useCallback(
6658
+ const onPaste = React10.useCallback(
6631
6659
  (e) => {
6632
6660
  const files = e.clipboardData.files;
6633
6661
  if (files.length > 0) {
@@ -6638,7 +6666,7 @@ function usePromptComposer(options = {}) {
6638
6666
  [attach]
6639
6667
  );
6640
6668
  const canSend = (value.trim().length > 0 || attach.readyRefs.length > 0) && !attach.hasPending;
6641
- const submit = React9.useCallback(() => {
6669
+ const submit = React10.useCallback(() => {
6642
6670
  if (!((value.trim().length > 0 || attach.readyRefs.length > 0) && !attach.hasPending)) return;
6643
6671
  voiceCapture.cancel();
6644
6672
  session.sendMessage(
@@ -6665,10 +6693,10 @@ function usePromptComposer(options = {}) {
6665
6693
  }
6666
6694
 
6667
6695
  // src/shell/use-composer-chip-select.ts
6668
- import * as React10 from "react";
6696
+ import * as React11 from "react";
6669
6697
  function useComposerChipSelect() {
6670
6698
  const session = useFourtySession();
6671
- return React10.useCallback(
6699
+ return React11.useCallback(
6672
6700
  (action) => {
6673
6701
  session.dispatchSuggestionAction({
6674
6702
  id: action.id,
@@ -6682,10 +6710,10 @@ function useComposerChipSelect() {
6682
6710
  }
6683
6711
 
6684
6712
  // src/shell/use-turn-ask-reply.ts
6685
- import * as React11 from "react";
6713
+ import * as React12 from "react";
6686
6714
  function useTurnAskReply() {
6687
6715
  const session = useFourtySession();
6688
- return React11.useCallback(
6716
+ return React12.useCallback(
6689
6717
  (answer) => {
6690
6718
  session.dispatchSuggestionAction({ id: `ask-${answer}`, label: answer, type: "message", payload: { text: answer, followUp: true } });
6691
6719
  },
@@ -6694,14 +6722,14 @@ function useTurnAskReply() {
6694
6722
  }
6695
6723
 
6696
6724
  // src/shell/turn-ask-placement.tsx
6697
- import * as React12 from "react";
6698
- import { jsx as jsx5 } from "react/jsx-runtime";
6699
- var TurnAskPlacementContext = React12.createContext("prose");
6725
+ import * as React13 from "react";
6726
+ import { jsx as jsx6 } from "react/jsx-runtime";
6727
+ var TurnAskPlacementContext = React13.createContext("prose");
6700
6728
  function TurnAskPlacementProvider({ placement, children }) {
6701
- return /* @__PURE__ */ jsx5(TurnAskPlacementContext.Provider, { value: placement, children });
6729
+ return /* @__PURE__ */ jsx6(TurnAskPlacementContext.Provider, { value: placement, children });
6702
6730
  }
6703
6731
  function useTurnAskPlacement() {
6704
- return React12.useContext(TurnAskPlacementContext);
6732
+ return React13.useContext(TurnAskPlacementContext);
6705
6733
  }
6706
6734
 
6707
6735
  // src/shell/use-go-home.ts
@@ -6718,10 +6746,10 @@ function useGoHome() {
6718
6746
  }
6719
6747
 
6720
6748
  // src/shell/use-menu-item-select.ts
6721
- import * as React13 from "react";
6749
+ import * as React14 from "react";
6722
6750
  function useMenuItemSelect() {
6723
6751
  const session = useFourtySession();
6724
- return React13.useCallback(
6752
+ return React14.useCallback(
6725
6753
  (item) => {
6726
6754
  const payload = item.action.payload === void 0 ? {} : item.action.payload;
6727
6755
  session.dispatchSuggestionAction({
@@ -6774,15 +6802,15 @@ function useThreadRows() {
6774
6802
  }
6775
6803
 
6776
6804
  // src/shell/conversation/use-conversation-page.ts
6777
- import * as React17 from "react";
6805
+ import * as React18 from "react";
6778
6806
 
6779
6807
  // src/canvas/use-is-seed-home.ts
6780
- import * as React14 from "react";
6808
+ import * as React15 from "react";
6781
6809
  function useIsSeedHome() {
6782
6810
  const layout = useDisplayedLayout();
6783
6811
  const turn = useTurn();
6784
6812
  const sessionState = useSessionState();
6785
- return React14.useMemo(() => {
6813
+ return React15.useMemo(() => {
6786
6814
  if (sessionState.seedLayout === null) return false;
6787
6815
  if (turn.index !== 0) return false;
6788
6816
  if (turn.userMessage !== "") return false;
@@ -7018,8 +7046,8 @@ var PRESENCE_LIFECYCLE = {
7018
7046
  };
7019
7047
 
7020
7048
  // ../spacestation/src/widgets/presence/profile.ts
7021
- import { z as z47 } from "zod";
7022
- var PresenceProfileSchema = z47.object({
7049
+ import { z as z48 } from "zod";
7050
+ var PresenceProfileSchema = z48.object({
7023
7051
  /**
7024
7052
  * How much the agent SPEAKS in presence.
7025
7053
  * - 'off' the faculty generates no prose at all. Zero tokens, and
@@ -7029,14 +7057,14 @@ var PresenceProfileSchema = z47.object({
7029
7057
  * - 'terse' one lead line per turn. The default — see below.
7030
7058
  * - 'full' a lead line plus asides beside individual elements.
7031
7059
  */
7032
- voice: z47.enum(["off", "terse", "full"]),
7060
+ voice: z48.enum(["off", "terse", "full"]),
7033
7061
  /**
7034
7062
  * Which source kinds this space surfaces. 'all' = every tool that declares a
7035
7063
  * `sourceKind`. An explicit list lets a space stay quiet about lookups its
7036
7064
  * visitors would find uninteresting (policy checks on a fashion space)
7037
7065
  * without the tool having to lie about what it is.
7038
7066
  */
7039
- sources: z47.union([z47.array(z47.string()), z47.literal("all")]),
7067
+ sources: z48.union([z48.array(z48.string()), z48.literal("all")]),
7040
7068
  /**
7041
7069
  * Which facts render.
7042
7070
  * - 'inferred-only' hides `provenance: 'stated'` facts. The default and the
@@ -7045,7 +7073,7 @@ var PresenceProfileSchema = z47.object({
7045
7073
  * - 'all' shows stated facts too — for spaces where confirming the brief
7046
7074
  * back is itself the product (intake, configuration).
7047
7075
  */
7048
- facts: z47.enum(["inferred-only", "all"])
7076
+ facts: z48.enum(["inferred-only", "all"])
7049
7077
  });
7050
7078
  var DEFAULT_PRESENCE_PROFILE = {
7051
7079
  voice: "terse",
@@ -7243,13 +7271,13 @@ import { useMemo as useMemo5 } from "react";
7243
7271
 
7244
7272
  // src/catalog/CatalogContext.tsx
7245
7273
  import { createContext as createContext9, useContext as useContext9 } from "react";
7246
- import { jsx as jsx6 } from "react/jsx-runtime";
7274
+ import { jsx as jsx7 } from "react/jsx-runtime";
7247
7275
  var CatalogContext = createContext9({});
7248
7276
  function CatalogProvider({
7249
7277
  catalog,
7250
7278
  children
7251
7279
  }) {
7252
- return /* @__PURE__ */ jsx6(CatalogContext.Provider, { value: catalog, children });
7280
+ return /* @__PURE__ */ jsx7(CatalogContext.Provider, { value: catalog, children });
7253
7281
  }
7254
7282
  function useComponentCatalog() {
7255
7283
  return useContext9(CatalogContext);
@@ -7312,10 +7340,10 @@ function useAgentPresence(flowId = PRESENCE_FLOW) {
7312
7340
  }
7313
7341
 
7314
7342
  // src/widgets/presence/use-forget-fact.ts
7315
- import * as React16 from "react";
7343
+ import * as React17 from "react";
7316
7344
 
7317
7345
  // src/widgets/presence/use-optimistic-flow-set.ts
7318
- import * as React15 from "react";
7346
+ import * as React16 from "react";
7319
7347
  function readKeys(data) {
7320
7348
  if (typeof data !== "object" || data === null || !("keys" in data)) return [];
7321
7349
  const raw = data.keys;
@@ -7324,8 +7352,8 @@ function readKeys(data) {
7324
7352
  function useOptimisticFlowSet(flowId) {
7325
7353
  const keys = readKeys(useAgentFlow(flowId));
7326
7354
  const joined = keys.join("\0");
7327
- const set = React15.useMemo(() => new Set(keys), [joined]);
7328
- return React15.useMemo(
7355
+ const set = React16.useMemo(() => new Set(keys), [joined]);
7356
+ return React16.useMemo(
7329
7357
  () => ({
7330
7358
  has: (key) => set.has(key),
7331
7359
  add: (key) => {
@@ -7341,7 +7369,7 @@ function useOptimisticFlowSet(flowId) {
7341
7369
  function useReconcileFlowSet(flowId, presentKeys) {
7342
7370
  const data = useAgentFlow(flowId);
7343
7371
  const presentJoined = presentKeys === null ? null : [...presentKeys].join("\0");
7344
- React15.useEffect(() => {
7372
+ React16.useEffect(() => {
7345
7373
  if (presentKeys === null) return;
7346
7374
  const keys = readKeys(data);
7347
7375
  if (keys.length === 0) return;
@@ -7363,7 +7391,7 @@ var useUndismissedFacts = useVisibleFactList;
7363
7391
  function useForgetFact() {
7364
7392
  const { sendImmediateSignal } = useFourtySession();
7365
7393
  const dismissed = useOptimisticFlowSet(DISMISSED_FLOW);
7366
- const forget = React16.useCallback(
7394
+ const forget = React17.useCallback(
7367
7395
  (f) => {
7368
7396
  dismissed.add(f.label);
7369
7397
  sendImmediateSignal({ type: PRESENCE_FACT_DISMISS_SIGNAL, payload: { label: f.label, value: f.value } });
@@ -7414,7 +7442,7 @@ function useConversationPage() {
7414
7442
  const presence = useConversationPresence();
7415
7443
  const suggestions = useSuggestionsWithDefaults();
7416
7444
  const followUp = useComposerChipSelect();
7417
- const onWelcomePage = React17.useMemo(
7445
+ const onWelcomePage = React18.useMemo(
7418
7446
  () => seedLayout !== null && JSON.stringify(layout) === JSON.stringify(seedLayout),
7419
7447
  [layout, seedLayout]
7420
7448
  );
@@ -7482,14 +7510,14 @@ function findThreadHeadroom(scroller) {
7482
7510
  }
7483
7511
 
7484
7512
  // src/shell/thread-scroll/ThreadHeadroom.tsx
7485
- import { jsx as jsx7 } from "react/jsx-runtime";
7513
+ import { jsx as jsx8 } from "react/jsx-runtime";
7486
7514
  var HEADROOM_STYLE = { height: 0, flexShrink: 0 };
7487
7515
  function ThreadHeadroom() {
7488
- return /* @__PURE__ */ jsx7("div", { ...{ [THREAD_HEADROOM_ATTR]: "" }, "aria-hidden": true, style: HEADROOM_STYLE });
7516
+ return /* @__PURE__ */ jsx8("div", { ...{ [THREAD_HEADROOM_ATTR]: "" }, "aria-hidden": true, style: HEADROOM_STYLE });
7489
7517
  }
7490
7518
 
7491
7519
  // src/shell/thread-scroll/use-pin-turn-to-top.ts
7492
- import * as React18 from "react";
7520
+ import * as React19 from "react";
7493
7521
 
7494
7522
  // src/canvas/dom-targets.ts
7495
7523
  var ACTIVE_PANEL_ATTR = "data-fourty-panel-active";
@@ -7666,7 +7694,7 @@ function pinTurnHead(scroller, row, options) {
7666
7694
 
7667
7695
  // src/shell/thread-scroll/use-pin-turn-to-top.ts
7668
7696
  function usePinTurnToTop({ scrollerRef, turnRef, turnId }) {
7669
- React18.useEffect(() => {
7697
+ React19.useEffect(() => {
7670
7698
  if (turnId === null) return;
7671
7699
  const scroller = scrollerRef.current;
7672
7700
  const row = turnRef.current;
@@ -7687,10 +7715,10 @@ function usePinTurnToTop({ scrollerRef, turnRef, turnId }) {
7687
7715
  }
7688
7716
 
7689
7717
  // src/shell/thread-scroll/use-scroll-has-more-below.ts
7690
- import * as React19 from "react";
7718
+ import * as React20 from "react";
7691
7719
  function useScrollHasMoreBelow(scroller, thresholdPx = 16) {
7692
- const [hasMore, setHasMore] = React19.useState(false);
7693
- React19.useEffect(() => {
7720
+ const [hasMore, setHasMore] = React20.useState(false);
7721
+ React20.useEffect(() => {
7694
7722
  if (scroller === null) return;
7695
7723
  const view = scroller.ownerDocument.defaultView;
7696
7724
  if (view === null) return;
@@ -7730,9 +7758,9 @@ function threadRowAttrs(key) {
7730
7758
  }
7731
7759
 
7732
7760
  // src/shell/thread-scroll/use-thread-jump-marks.ts
7733
- import * as React20 from "react";
7761
+ import * as React21 from "react";
7734
7762
  function useThreadJumpMarks(rows) {
7735
- return React20.useMemo(
7763
+ return React21.useMemo(
7736
7764
  () => rows.filter((row) => row.visitorText.length > 0).map((row) => ({
7737
7765
  key: row.key,
7738
7766
  label: row.visitorText,
@@ -7746,7 +7774,7 @@ function useThreadJumpMarks(rows) {
7746
7774
  }
7747
7775
 
7748
7776
  // src/shell/thread-scroll/use-thread-landing.ts
7749
- import * as React21 from "react";
7777
+ import * as React22 from "react";
7750
7778
 
7751
7779
  // src/shell/thread-scroll/settle-thread-row.ts
7752
7780
  var SETTLE_MS = 1200;
@@ -7810,11 +7838,11 @@ function settleThreadRow(scroller, rowKey, behavior = "smooth") {
7810
7838
  }
7811
7839
 
7812
7840
  // src/shell/thread-scroll/use-thread-landing.ts
7813
- var useIsomorphicLayoutEffect = typeof window === "undefined" ? React21.useEffect : React21.useLayoutEffect;
7841
+ var useIsomorphicLayoutEffect = typeof window === "undefined" ? React22.useEffect : React22.useLayoutEffect;
7814
7842
  function useThreadLanding(scroller, relandKey = 0) {
7815
7843
  const { turnId, seq } = useExplicitTurnSelection();
7816
- const openedWith = React21.useRef({ turnId, seq });
7817
- const landedRef = React21.useRef(null);
7844
+ const openedWith = React22.useRef({ turnId, seq });
7845
+ const landedRef = React22.useRef(null);
7818
7846
  useIsomorphicLayoutEffect(() => {
7819
7847
  if (scroller === null) return;
7820
7848
  if (turnId !== null) {
@@ -7869,7 +7897,7 @@ function useRegisterSignalHandlers(handlers) {
7869
7897
  var AGENT_ASK_SIGNAL = "agent_ask";
7870
7898
 
7871
7899
  // src/provider/use-clamp-toggle.ts
7872
- import React22 from "react";
7900
+ import React23 from "react";
7873
7901
 
7874
7902
  // src/shared/use-expandable.ts
7875
7903
  import { useCallback as useCallback10, useState as useState5 } from "react";
@@ -7882,9 +7910,9 @@ function useExpandable(initial = false) {
7882
7910
  // src/provider/use-clamp-toggle.ts
7883
7911
  function useClampToggle(contentKey) {
7884
7912
  const { expanded, toggle } = useExpandable(false);
7885
- const [overflowing, setOverflowing] = React22.useState(false);
7886
- const ref = React22.useRef(null);
7887
- React22.useEffect(() => {
7913
+ const [overflowing, setOverflowing] = React23.useState(false);
7914
+ const ref = React23.useRef(null);
7915
+ React23.useEffect(() => {
7888
7916
  const el = ref.current;
7889
7917
  if (el === null) return;
7890
7918
  if (expanded) return;
@@ -7900,16 +7928,16 @@ function useClampToggle(contentKey) {
7900
7928
  }
7901
7929
 
7902
7930
  // src/provider/use-timed-flag.ts
7903
- import React23 from "react";
7931
+ import React24 from "react";
7904
7932
  function useTimedFlag(durationMs) {
7905
- const [flag, setFlag] = React23.useState(false);
7906
- const timerRef = React23.useRef(null);
7907
- React23.useEffect(() => {
7933
+ const [flag, setFlag] = React24.useState(false);
7934
+ const timerRef = React24.useRef(null);
7935
+ React24.useEffect(() => {
7908
7936
  return () => {
7909
7937
  if (timerRef.current !== null) window.clearTimeout(timerRef.current);
7910
7938
  };
7911
7939
  }, []);
7912
- const trigger = React23.useCallback(() => {
7940
+ const trigger = React24.useCallback(() => {
7913
7941
  if (timerRef.current !== null) window.clearTimeout(timerRef.current);
7914
7942
  setFlag(true);
7915
7943
  timerRef.current = window.setTimeout(() => {
@@ -8022,35 +8050,35 @@ __export(canvas_exports, {
8022
8050
  });
8023
8051
 
8024
8052
  // src/canvas/canvas-tail.tsx
8025
- import * as React24 from "react";
8026
- import { jsx as jsx8 } from "react/jsx-runtime";
8027
- var CanvasTailContext = React24.createContext(null);
8053
+ import * as React25 from "react";
8054
+ import { jsx as jsx9 } from "react/jsx-runtime";
8055
+ var CanvasTailContext = React25.createContext(null);
8028
8056
  function CanvasTailProvider({
8029
8057
  tail,
8030
8058
  children
8031
8059
  }) {
8032
- return /* @__PURE__ */ jsx8(CanvasTailContext.Provider, { value: tail, children });
8060
+ return /* @__PURE__ */ jsx9(CanvasTailContext.Provider, { value: tail, children });
8033
8061
  }
8034
8062
  function useCanvasTail() {
8035
- return React24.useContext(CanvasTailContext);
8063
+ return React25.useContext(CanvasTailContext);
8036
8064
  }
8037
8065
  function CanvasTailMount({
8038
8066
  isActive
8039
8067
  }) {
8040
8068
  const Tail = useCanvasTail();
8041
8069
  if (!isActive || Tail === null) return null;
8042
- return /* @__PURE__ */ jsx8(Tail, {});
8070
+ return /* @__PURE__ */ jsx9(Tail, {});
8043
8071
  }
8044
8072
 
8045
8073
  // src/canvas/hydration-notice.tsx
8046
- import * as React25 from "react";
8047
- import { jsx as jsx9 } from "react/jsx-runtime";
8048
- var HydrationNoticeContext = React25.createContext(null);
8074
+ import * as React26 from "react";
8075
+ import { jsx as jsx10 } from "react/jsx-runtime";
8076
+ var HydrationNoticeContext = React26.createContext(null);
8049
8077
  function HydrationNoticeProvider({ notice, children }) {
8050
- return /* @__PURE__ */ jsx9(HydrationNoticeContext.Provider, { value: notice, children });
8078
+ return /* @__PURE__ */ jsx10(HydrationNoticeContext.Provider, { value: notice, children });
8051
8079
  }
8052
8080
  function useHydrationNotice() {
8053
- return React25.useContext(HydrationNoticeContext);
8081
+ return React26.useContext(HydrationNoticeContext);
8054
8082
  }
8055
8083
 
8056
8084
  // src/canvas/GenerationStyleContext.tsx
@@ -8088,11 +8116,11 @@ function useGenerationStyle() {
8088
8116
 
8089
8117
  // src/canvas/ShimmerSweep.tsx
8090
8118
  import { motion, useReducedMotion } from "framer-motion";
8091
- import { jsx as jsx10 } from "react/jsx-runtime";
8119
+ import { jsx as jsx11 } from "react/jsx-runtime";
8092
8120
  function ShimmerSweep({ durationS }) {
8093
8121
  const reduce = useReducedMotion();
8094
8122
  if (reduce === true) return null;
8095
- return /* @__PURE__ */ jsx10(
8123
+ return /* @__PURE__ */ jsx11(
8096
8124
  motion.div,
8097
8125
  {
8098
8126
  "aria-hidden": true,
@@ -8110,14 +8138,14 @@ function ShimmerSweep({ durationS }) {
8110
8138
  }
8111
8139
 
8112
8140
  // src/canvas/TransitionContext.tsx
8113
- import React26, { createContext as createContext14, useContext as useContext14 } from "react";
8141
+ import React27, { createContext as createContext14, useContext as useContext14 } from "react";
8114
8142
  import { AnimatePresence, motion as motion2 } from "framer-motion";
8115
- import { jsx as jsx11 } from "react/jsx-runtime";
8143
+ import { jsx as jsx12 } from "react/jsx-runtime";
8116
8144
  function FadeGroup({ children }) {
8117
- return /* @__PURE__ */ jsx11(AnimatePresence, { mode: "popLayout", initial: false, children });
8145
+ return /* @__PURE__ */ jsx12(AnimatePresence, { mode: "popLayout", initial: false, children });
8118
8146
  }
8119
- var FadeItem = React26.forwardRef(function FadeItem2({ id, children, style, className }, ref) {
8120
- return /* @__PURE__ */ jsx11(
8147
+ var FadeItem = React27.forwardRef(function FadeItem2({ id, children, style, className }, ref) {
8148
+ return /* @__PURE__ */ jsx12(
8121
8149
  motion2.div,
8122
8150
  {
8123
8151
  ref,
@@ -8137,23 +8165,23 @@ function TransitionProvider({
8137
8165
  transition,
8138
8166
  children
8139
8167
  }) {
8140
- return /* @__PURE__ */ jsx11(TransitionContext.Provider, { value: transition, children });
8168
+ return /* @__PURE__ */ jsx12(TransitionContext.Provider, { value: transition, children });
8141
8169
  }
8142
8170
  function useLayoutTransition() {
8143
8171
  return useContext14(TransitionContext);
8144
8172
  }
8145
8173
 
8146
8174
  // src/canvas/canvas-arrangement.tsx
8147
- import React27, { createContext as createContext15, useContext as useContext15 } from "react";
8148
- import { jsx as jsx12 } from "react/jsx-runtime";
8175
+ import React28, { createContext as createContext15, useContext as useContext15 } from "react";
8176
+ import { jsx as jsx13 } from "react/jsx-runtime";
8149
8177
  var CanvasArrangementContext = createContext15({ arrangement: "stack", turnPages: false });
8150
8178
  function CanvasArrangementProvider({
8151
8179
  arrangement,
8152
8180
  turnPages = false,
8153
8181
  children
8154
8182
  }) {
8155
- const value = React27.useMemo(() => ({ arrangement, turnPages }), [arrangement, turnPages]);
8156
- return /* @__PURE__ */ jsx12(CanvasArrangementContext.Provider, { value, children });
8183
+ const value = React28.useMemo(() => ({ arrangement, turnPages }), [arrangement, turnPages]);
8184
+ return /* @__PURE__ */ jsx13(CanvasArrangementContext.Provider, { value, children });
8157
8185
  }
8158
8186
  function useCanvasArrangement() {
8159
8187
  return useContext15(CanvasArrangementContext);
@@ -8161,10 +8189,10 @@ function useCanvasArrangement() {
8161
8189
 
8162
8190
  // src/canvas/canvas-motion-style.tsx
8163
8191
  import { createContext as createContext16, useContext as useContext16 } from "react";
8164
- import { jsx as jsx13 } from "react/jsx-runtime";
8192
+ import { jsx as jsx14 } from "react/jsx-runtime";
8165
8193
  var CanvasMotionStyleContext = createContext16(null);
8166
8194
  function CanvasMotionStyleProvider({ style, children }) {
8167
- return /* @__PURE__ */ jsx13(CanvasMotionStyleContext.Provider, { value: style, children });
8195
+ return /* @__PURE__ */ jsx14(CanvasMotionStyleContext.Provider, { value: style, children });
8168
8196
  }
8169
8197
  function useCanvasMotionStyle() {
8170
8198
  return useContext16(CanvasMotionStyleContext);
@@ -8435,21 +8463,21 @@ function deriveTurnChangeAnchor(prev, next) {
8435
8463
 
8436
8464
  // src/canvas/canvas-outlet.tsx
8437
8465
  import { createContext as createContext18, useContext as useContext18 } from "react";
8438
- import { jsx as jsx14 } from "react/jsx-runtime";
8466
+ import { jsx as jsx15 } from "react/jsx-runtime";
8439
8467
  var CanvasOutletContext = createContext18(null);
8440
8468
  function CanvasOutletProvider({ canvas, children }) {
8441
- return /* @__PURE__ */ jsx14(CanvasOutletContext.Provider, { value: canvas, children });
8469
+ return /* @__PURE__ */ jsx15(CanvasOutletContext.Provider, { value: canvas, children });
8442
8470
  }
8443
8471
  function SpacefrontCanvas() {
8444
8472
  const Canvas = useContext18(CanvasOutletContext);
8445
8473
  if (Canvas === null) {
8446
8474
  throw new Error("<SpacefrontCanvas> must be rendered inside <Spacefront> \u2014 no engine has provided a canvas.");
8447
8475
  }
8448
- return /* @__PURE__ */ jsx14(Canvas, {});
8476
+ return /* @__PURE__ */ jsx15(Canvas, {});
8449
8477
  }
8450
8478
 
8451
8479
  // src/canvas/item-motion/ItemTransitionGroup.tsx
8452
- import React29 from "react";
8480
+ import React30 from "react";
8453
8481
  import { AnimatePresence as AnimatePresence2, motion as motion3, useReducedMotion as useReducedMotion2 } from "framer-motion";
8454
8482
 
8455
8483
  // src/canvas/item-motion/classify-items.ts
@@ -8668,7 +8696,7 @@ function getActiveProfile() {
8668
8696
  }
8669
8697
 
8670
8698
  // src/canvas/item-motion/ItemTransitionGroup.tsx
8671
- import { jsx as jsx15 } from "react/jsx-runtime";
8699
+ import { jsx as jsx16 } from "react/jsx-runtime";
8672
8700
  var ITEM_IDENTITY_ATTR = "data-flip-id";
8673
8701
  function ItemTransitionGroup({
8674
8702
  items,
@@ -8683,14 +8711,14 @@ function ItemTransitionGroup({
8683
8711
  const profile = getActiveProfile();
8684
8712
  const animated = reduce !== true;
8685
8713
  const ids = items.map(getId);
8686
- const prevIdsRef = React29.useRef(null);
8687
- const lastChangeRef = React29.useRef(null);
8714
+ const prevIdsRef = React30.useRef(null);
8715
+ const lastChangeRef = React30.useRef(null);
8688
8716
  const prevIds = prevIdsRef.current;
8689
8717
  const freshChange = prevIds === null ? null : classifyItemChange(prevIds, ids);
8690
8718
  if (freshChange !== null) {
8691
8719
  lastChangeRef.current = freshChange;
8692
8720
  }
8693
- React29.useEffect(() => {
8721
+ React30.useEffect(() => {
8694
8722
  prevIdsRef.current = ids;
8695
8723
  });
8696
8724
  const activeChange = lastChangeRef.current;
@@ -8703,7 +8731,7 @@ function ItemTransitionGroup({
8703
8731
  const isGrid = itemClassName === void 0;
8704
8732
  const outerClassName = isGrid ? "h-full" : itemClassName;
8705
8733
  const innerClassName = isGrid ? "h-full" : void 0;
8706
- return /* @__PURE__ */ jsx15("div", { className, style, children: /* @__PURE__ */ jsx15(AnimatePresence2, { mode: "popLayout", initial: false, children: items.map((item) => {
8734
+ return /* @__PURE__ */ jsx16("div", { className, style, children: /* @__PURE__ */ jsx16(AnimatePresence2, { mode: "popLayout", initial: false, children: items.map((item) => {
8707
8735
  const id = getId(item);
8708
8736
  const identityAttr = { [ITEM_IDENTITY_ATTR]: id };
8709
8737
  const isEntering = activeChange !== null && activeChange.entered.includes(id);
@@ -8713,7 +8741,7 @@ function ItemTransitionGroup({
8713
8741
  // `itemClassName`/`itemStyle` size the wrapper for flex/snap
8714
8742
  // layouts (carousel); grid layouts leave them unset and get
8715
8743
  // `h-full` so the cell height reaches the card.
8716
- /* @__PURE__ */ jsx15(
8744
+ /* @__PURE__ */ jsx16(
8717
8745
  motion3.div,
8718
8746
  {
8719
8747
  ...identityAttr,
@@ -8722,7 +8750,7 @@ function ItemTransitionGroup({
8722
8750
  layout: animated ? "position" : void 0,
8723
8751
  layoutDependency,
8724
8752
  transition: animated ? layoutTransition : void 0,
8725
- children: /* @__PURE__ */ jsx15(
8753
+ children: /* @__PURE__ */ jsx16(
8726
8754
  motion3.div,
8727
8755
  {
8728
8756
  className: innerClassName,
@@ -8803,13 +8831,13 @@ __export(catalog_exports, {
8803
8831
 
8804
8832
  // src/catalog/DebugContext.tsx
8805
8833
  import { createContext as createContext19, useContext as useContext19 } from "react";
8806
- import { jsx as jsx16 } from "react/jsx-runtime";
8834
+ import { jsx as jsx17 } from "react/jsx-runtime";
8807
8835
  var DebugContext = createContext19(false);
8808
8836
  function DebugProvider({
8809
8837
  debug,
8810
8838
  children
8811
8839
  }) {
8812
- return /* @__PURE__ */ jsx16(DebugContext.Provider, { value: debug, children });
8840
+ return /* @__PURE__ */ jsx17(DebugContext.Provider, { value: debug, children });
8813
8841
  }
8814
8842
  function useDebug() {
8815
8843
  return useContext19(DebugContext);
@@ -8833,13 +8861,13 @@ function useHydrationState() {
8833
8861
 
8834
8862
  // src/catalog/HydratorContext.tsx
8835
8863
  import { createContext as createContext21, useContext as useContext21 } from "react";
8836
- import { jsx as jsx17 } from "react/jsx-runtime";
8864
+ import { jsx as jsx18 } from "react/jsx-runtime";
8837
8865
  var HydratorContext = createContext21({});
8838
8866
  function HydratorProvider({
8839
8867
  hydrators,
8840
8868
  children
8841
8869
  }) {
8842
- return /* @__PURE__ */ jsx17(HydratorContext.Provider, { value: hydrators, children });
8870
+ return /* @__PURE__ */ jsx18(HydratorContext.Provider, { value: hydrators, children });
8843
8871
  }
8844
8872
  function useHydrators() {
8845
8873
  return useContext21(HydratorContext);
@@ -8847,13 +8875,13 @@ function useHydrators() {
8847
8875
 
8848
8876
  // src/catalog/registry.tsx
8849
8877
  import { createContext as createContext22, useContext as useContext22 } from "react";
8850
- import { jsx as jsx18 } from "react/jsx-runtime";
8878
+ import { jsx as jsx19 } from "react/jsx-runtime";
8851
8879
  var RegistryContext = createContext22({});
8852
8880
  function RegistryProvider({
8853
8881
  registry: registry2,
8854
8882
  children
8855
8883
  }) {
8856
- return /* @__PURE__ */ jsx18(RegistryContext.Provider, { value: registry2, children });
8884
+ return /* @__PURE__ */ jsx19(RegistryContext.Provider, { value: registry2, children });
8857
8885
  }
8858
8886
  function useRegistry() {
8859
8887
  return useContext22(RegistryContext);
@@ -8863,7 +8891,7 @@ function PackageLookupProvider({
8863
8891
  lookup,
8864
8892
  children
8865
8893
  }) {
8866
- return /* @__PURE__ */ jsx18(PackageLookupContext.Provider, { value: lookup, children });
8894
+ return /* @__PURE__ */ jsx19(PackageLookupContext.Provider, { value: lookup, children });
8867
8895
  }
8868
8896
  function usePackageLookup() {
8869
8897
  return useContext22(PackageLookupContext);
@@ -8897,9 +8925,9 @@ function createAliasedRegistry(baseRegistry, aliases, getPackageComponent) {
8897
8925
  }
8898
8926
 
8899
8927
  // src/catalog/render-inline.tsx
8900
- import React32 from "react";
8901
- import { jsx as jsx19 } from "react/jsx-runtime";
8902
- var linkRenderer = (href, key) => /* @__PURE__ */ jsx19(
8928
+ import React33 from "react";
8929
+ import { jsx as jsx20 } from "react/jsx-runtime";
8930
+ var linkRenderer = (href, key) => /* @__PURE__ */ jsx20(
8903
8931
  "a",
8904
8932
  {
8905
8933
  className: "fourty-inline-link",
@@ -8919,14 +8947,14 @@ function linkifyText(text2, keyPrefix) {
8919
8947
  URL_RE.lastIndex = 0;
8920
8948
  while ((match = URL_RE.exec(text2)) !== null) {
8921
8949
  if (match.index > last) {
8922
- out.push(/* @__PURE__ */ jsx19(React32.Fragment, { children: text2.slice(last, match.index) }, `${keyPrefix}-lt-${i++}`));
8950
+ out.push(/* @__PURE__ */ jsx20(React33.Fragment, { children: text2.slice(last, match.index) }, `${keyPrefix}-lt-${i++}`));
8923
8951
  }
8924
8952
  const href = match[0];
8925
8953
  out.push(linkRenderer(href, `${keyPrefix}-lk-${i++}`));
8926
8954
  last = match.index + href.length;
8927
8955
  }
8928
8956
  if (last < text2.length) {
8929
- out.push(/* @__PURE__ */ jsx19(React32.Fragment, { children: text2.slice(last) }, `${keyPrefix}-lt-${i++}`));
8957
+ out.push(/* @__PURE__ */ jsx20(React33.Fragment, { children: text2.slice(last) }, `${keyPrefix}-lt-${i++}`));
8930
8958
  }
8931
8959
  return out;
8932
8960
  }
@@ -8939,8 +8967,8 @@ function renderInline(text2, keyPrefix) {
8939
8967
  while ((match = re.exec(text2)) !== null) {
8940
8968
  if (match.index > last) out.push(...linkifyText(text2.slice(last, match.index), `${keyPrefix}-t-${i++}`));
8941
8969
  const bold = match[1];
8942
- if (bold !== void 0) out.push(/* @__PURE__ */ jsx19("strong", { children: bold }, `${keyPrefix}-b-${i++}`));
8943
- else out.push(/* @__PURE__ */ jsx19("em", { children: match[2] }, `${keyPrefix}-i-${i++}`));
8970
+ if (bold !== void 0) out.push(/* @__PURE__ */ jsx20("strong", { children: bold }, `${keyPrefix}-b-${i++}`));
8971
+ else out.push(/* @__PURE__ */ jsx20("em", { children: match[2] }, `${keyPrefix}-i-${i++}`));
8944
8972
  last = match.index + match[0].length;
8945
8973
  }
8946
8974
  if (last < text2.length) out.push(...linkifyText(text2.slice(last), `${keyPrefix}-t-${i++}`));
@@ -8948,7 +8976,7 @@ function renderInline(text2, keyPrefix) {
8948
8976
  }
8949
8977
 
8950
8978
  // src/catalog/component-library.ts
8951
- import * as React33 from "react";
8979
+ import * as React34 from "react";
8952
8980
  function displayNameOf(Inner) {
8953
8981
  if (typeof Inner === "string") return Inner;
8954
8982
  if (typeof Inner.displayName === "string" && Inner.displayName.length > 0) return Inner.displayName;
@@ -8957,7 +8985,7 @@ function displayNameOf(Inner) {
8957
8985
  }
8958
8986
  function adaptComponent(Inner) {
8959
8987
  function Adapted(props) {
8960
- return React33.createElement(Inner, props);
8988
+ return React34.createElement(Inner, props);
8961
8989
  }
8962
8990
  Adapted.displayName = displayNameOf(Inner);
8963
8991
  return Adapted;
@@ -8998,23 +9026,23 @@ function buildComponentLibrary(catalog, componentMap) {
8998
9026
  }
8999
9027
 
9000
9028
  // src/catalog/define.ts
9001
- import { z as z48 } from "zod";
9002
- var HYDRATED_ENTITY = z48.object({}).passthrough();
9029
+ import { z as z49 } from "zod";
9030
+ var HYDRATED_ENTITY = z49.object({}).passthrough();
9003
9031
  function entity(resolverKey, opts) {
9004
9032
  return resolved(HYDRATED_ENTITY, resolverKey, opts);
9005
9033
  }
9006
- var text = prose(z48.string());
9034
+ var text = prose(z49.string());
9007
9035
  function plain() {
9008
- return z48.string();
9036
+ return z49.string();
9009
9037
  }
9010
9038
  function token(values) {
9011
- return z48.enum(values);
9039
+ return z49.enum(values);
9012
9040
  }
9013
9041
  function catalogComponent(meta, render) {
9014
9042
  const { props, requires, ...rest } = meta;
9015
9043
  return {
9016
9044
  ...rest,
9017
- propsSchema: z48.object(props),
9045
+ propsSchema: z49.object(props),
9018
9046
  ...requires !== void 0 ? { requires } : {},
9019
9047
  component: adaptComponent(render)
9020
9048
  };
@@ -9354,7 +9382,7 @@ function useConsumeStandingSignal(type) {
9354
9382
  }
9355
9383
 
9356
9384
  // src/widgets/presence/use-presence-notch.ts
9357
- import * as React34 from "react";
9385
+ import * as React35 from "react";
9358
9386
  var SETTLE_DWELL_MS = 4e3;
9359
9387
  var HOVER_CLOSE_MS = 240;
9360
9388
  var HOVER_BOUNCE_WINDOW_MS = 800;
@@ -9362,21 +9390,21 @@ var BOUNCE_PX = 2;
9362
9390
  function usePresenceNotch(widgets) {
9363
9391
  const askStanding = useStandingOfType(AGENT_ASK_SIGNAL) !== null;
9364
9392
  const { isRunning } = useAgentPresence();
9365
- const [hovered, setHovered] = React34.useState(false);
9366
- const [openDrawerId, setOpenDrawerId] = React34.useState(null);
9367
- const rootRef = React34.useRef(null);
9368
- const toggleDrawer = React34.useCallback((id) => {
9393
+ const [hovered, setHovered] = React35.useState(false);
9394
+ const [openDrawerId, setOpenDrawerId] = React35.useState(null);
9395
+ const rootRef = React35.useRef(null);
9396
+ const toggleDrawer = React35.useCallback((id) => {
9369
9397
  setOpenDrawerId((current2) => current2 === id ? null : id);
9370
9398
  }, []);
9371
- const closeTimer = React34.useRef(null);
9372
- const cancelClose = React34.useCallback(() => {
9399
+ const closeTimer = React35.useRef(null);
9400
+ const cancelClose = React35.useCallback(() => {
9373
9401
  if (closeTimer.current !== null) {
9374
9402
  clearTimeout(closeTimer.current);
9375
9403
  closeTimer.current = null;
9376
9404
  }
9377
9405
  }, []);
9378
- const lastLeaveRef = React34.useRef(null);
9379
- const openHover = React34.useCallback((e) => {
9406
+ const lastLeaveRef = React35.useRef(null);
9407
+ const openHover = React35.useCallback((e) => {
9380
9408
  const last = lastLeaveRef.current;
9381
9409
  if (last !== null && Date.now() - last.t < HOVER_BOUNCE_WINDOW_MS && Math.abs(e.clientX - last.x) <= BOUNCE_PX && Math.abs(e.clientY - last.y) <= BOUNCE_PX) {
9382
9410
  return;
@@ -9384,7 +9412,7 @@ function usePresenceNotch(widgets) {
9384
9412
  cancelClose();
9385
9413
  setHovered(true);
9386
9414
  }, [cancelClose]);
9387
- const scheduleClose = React34.useCallback((e) => {
9415
+ const scheduleClose = React35.useCallback((e) => {
9388
9416
  lastLeaveRef.current = { x: e.clientX, y: e.clientY, t: Date.now() };
9389
9417
  cancelClose();
9390
9418
  closeTimer.current = setTimeout(() => {
@@ -9392,8 +9420,8 @@ function usePresenceNotch(widgets) {
9392
9420
  setHovered(false);
9393
9421
  }, HOVER_CLOSE_MS);
9394
9422
  }, [cancelClose]);
9395
- React34.useEffect(() => cancelClose, [cancelClose]);
9396
- React34.useEffect(() => {
9423
+ React35.useEffect(() => cancelClose, [cancelClose]);
9424
+ React35.useEffect(() => {
9397
9425
  if (openDrawerId === null) return;
9398
9426
  const onKey = (e) => {
9399
9427
  if (e.key === "Escape") setOpenDrawerId(null);
@@ -9401,7 +9429,7 @@ function usePresenceNotch(widgets) {
9401
9429
  window.addEventListener("keydown", onKey);
9402
9430
  return () => window.removeEventListener("keydown", onKey);
9403
9431
  }, [openDrawerId]);
9404
- React34.useEffect(() => {
9432
+ React35.useEffect(() => {
9405
9433
  if (openDrawerId === null) return;
9406
9434
  const onDown = (e) => {
9407
9435
  const root = rootRef.current;
@@ -9413,8 +9441,8 @@ function usePresenceNotch(widgets) {
9413
9441
  document.addEventListener("pointerdown", onDown);
9414
9442
  return () => document.removeEventListener("pointerdown", onDown);
9415
9443
  }, [openDrawerId]);
9416
- const [active, setActive] = React34.useState(false);
9417
- React34.useEffect(() => {
9444
+ const [active, setActive] = React35.useState(false);
9445
+ React35.useEffect(() => {
9418
9446
  if (isRunning) {
9419
9447
  setActive(true);
9420
9448
  return;
@@ -9574,7 +9602,7 @@ function presenceFactShape(fact) {
9574
9602
  }
9575
9603
 
9576
9604
  // src/widgets/presence/use-optimistic-facts.ts
9577
- import * as React35 from "react";
9605
+ import * as React36 from "react";
9578
9606
  function readEntries(data) {
9579
9607
  if (typeof data !== "object" || data === null || !("entries" in data)) return [];
9580
9608
  const raw = data.entries;
@@ -9593,7 +9621,7 @@ function writeOptimisticFact(entries3, fact) {
9593
9621
  }
9594
9622
  function useOptimisticFactOverlay(flowId) {
9595
9623
  const entries3 = readEntries(useAgentFlow(flowId));
9596
- return React35.useMemo(
9624
+ return React36.useMemo(
9597
9625
  () => ({
9598
9626
  entries: entries3,
9599
9627
  add: (fact) => setFlowOutput(flowId, { entries: writeOptimisticFact(entries3, fact) })
@@ -9602,8 +9630,8 @@ function useOptimisticFactOverlay(flowId) {
9602
9630
  );
9603
9631
  }
9604
9632
  function useReconcileOptimisticFacts(flowId, readIdentity) {
9605
- const seenRef = React35.useRef(null);
9606
- React35.useEffect(() => {
9633
+ const seenRef = React36.useRef(null);
9634
+ React36.useEffect(() => {
9607
9635
  if (readIdentity === null) return;
9608
9636
  if (seenRef.current === null) {
9609
9637
  seenRef.current = readIdentity;
@@ -10015,34 +10043,34 @@ __export(interaction_exports, {
10015
10043
  });
10016
10044
 
10017
10045
  // src/interaction/withInteractionTracking.tsx
10018
- import React36, { createContext as createContext24, useContext as useContext24 } from "react";
10019
- import { jsx as jsx20, jsxs } from "react/jsx-runtime";
10046
+ import React37, { createContext as createContext24, useContext as useContext24 } from "react";
10047
+ import { jsx as jsx21, jsxs } from "react/jsx-runtime";
10020
10048
  var InteractionContext = createContext24(null);
10021
10049
  function InteractionProvider({
10022
10050
  onInteraction,
10023
10051
  children
10024
10052
  }) {
10025
- return /* @__PURE__ */ jsx20(InteractionContext.Provider, { value: onInteraction, children });
10053
+ return /* @__PURE__ */ jsx21(InteractionContext.Provider, { value: onInteraction, children });
10026
10054
  }
10027
10055
  function useInteraction2() {
10028
10056
  return useContext24(InteractionContext);
10029
10057
  }
10030
10058
  function withInteractionTracking(WrappedComponent, meta) {
10031
10059
  function TrackedComponent(props) {
10032
- return /* @__PURE__ */ jsx20(
10060
+ return /* @__PURE__ */ jsx21(
10033
10061
  "div",
10034
10062
  {
10035
10063
  "data-tracked-component": meta.componentId,
10036
10064
  "data-tracked-component-type": meta.componentType,
10037
10065
  style: { display: "contents" },
10038
- children: /* @__PURE__ */ jsx20(ComponentErrorBoundary, { componentId: meta.componentId, children: /* @__PURE__ */ jsx20(WrappedComponent, { ...props }) })
10066
+ children: /* @__PURE__ */ jsx21(ComponentErrorBoundary, { componentId: meta.componentId, children: /* @__PURE__ */ jsx21(WrappedComponent, { ...props }) })
10039
10067
  }
10040
10068
  );
10041
10069
  }
10042
10070
  TrackedComponent.displayName = `Tracked(${WrappedComponent.displayName || WrappedComponent.name || "Component"})`;
10043
10071
  return TrackedComponent;
10044
10072
  }
10045
- var ComponentErrorBoundary = class extends React36.Component {
10073
+ var ComponentErrorBoundary = class extends React37.Component {
10046
10074
  constructor() {
10047
10075
  super(...arguments);
10048
10076
  __publicField(this, "state", { error: null });
@@ -10056,7 +10084,7 @@ var ComponentErrorBoundary = class extends React36.Component {
10056
10084
  render() {
10057
10085
  if (this.state.error) {
10058
10086
  return /* @__PURE__ */ jsxs("div", { className: "fourty-component-error", role: "alert", "data-component-id": this.props.componentId, children: [
10059
- /* @__PURE__ */ jsx20("strong", { children: this.props.componentId }),
10087
+ /* @__PURE__ */ jsx21("strong", { children: this.props.componentId }),
10060
10088
  ": ",
10061
10089
  this.state.error.message
10062
10090
  ] });
@@ -10117,7 +10145,7 @@ import { useSyncExternalStore as useSyncExternalStore5 } from "react";
10117
10145
 
10118
10146
  // src/utils/viewport-window.tsx
10119
10147
  import { createContext as createContext25, useContext as useContext25 } from "react";
10120
- import { jsx as jsx21 } from "react/jsx-runtime";
10148
+ import { jsx as jsx22 } from "react/jsx-runtime";
10121
10149
  var ViewportWindowContext = createContext25(null);
10122
10150
  function canAnswer(win) {
10123
10151
  return win !== null && typeof win.matchMedia === "function";
@@ -10132,7 +10160,7 @@ function ViewportWindowProvider({
10132
10160
  value,
10133
10161
  children
10134
10162
  }) {
10135
- return /* @__PURE__ */ jsx21(ViewportWindowContext.Provider, { value, children });
10163
+ return /* @__PURE__ */ jsx22(ViewportWindowContext.Provider, { value, children });
10136
10164
  }
10137
10165
 
10138
10166
  // src/utils/use-form-factor.ts
@@ -10223,7 +10251,7 @@ function useInlineCompletion(opts) {
10223
10251
  }
10224
10252
 
10225
10253
  // src/utils/use-document-visible.ts
10226
- import React37 from "react";
10254
+ import React38 from "react";
10227
10255
  function subscribe3(onChange) {
10228
10256
  document.addEventListener("visibilitychange", onChange);
10229
10257
  return () => document.removeEventListener("visibilitychange", onChange);
@@ -10235,15 +10263,15 @@ function getServerSnapshot() {
10235
10263
  return true;
10236
10264
  }
10237
10265
  function useDocumentVisible() {
10238
- return React37.useSyncExternalStore(subscribe3, getSnapshot, getServerSnapshot);
10266
+ return React38.useSyncExternalStore(subscribe3, getSnapshot, getServerSnapshot);
10239
10267
  }
10240
10268
 
10241
10269
  // src/utils/use-interval.ts
10242
- import React38 from "react";
10270
+ import React39 from "react";
10243
10271
  function useInterval(callback, ms, active = true) {
10244
- const cbRef = React38.useRef(callback);
10272
+ const cbRef = React39.useRef(callback);
10245
10273
  cbRef.current = callback;
10246
- React38.useEffect(() => {
10274
+ React39.useEffect(() => {
10247
10275
  if (!active) return;
10248
10276
  const id = window.setInterval(() => cbRef.current(), ms);
10249
10277
  return () => window.clearInterval(id);
@@ -10455,15 +10483,15 @@ function primedEntitiesFor(resolverKey) {
10455
10483
  }
10456
10484
 
10457
10485
  // src/preview/SpacefrontPreviewProvider.tsx
10458
- import * as React39 from "react";
10459
- import { jsx as jsx22 } from "react/jsx-runtime";
10486
+ import * as React40 from "react";
10487
+ import { jsx as jsx23 } from "react/jsx-runtime";
10460
10488
  var NOOP = () => {
10461
10489
  };
10462
10490
  var ASYNC_NOOP = () => Promise.resolve();
10463
10491
  var VIEW = { page: { kind: "home" }, layout: EMPTY_SPEC, shell: EMPTY_SHELL };
10464
- var PreviewContext = React39.createContext(null);
10492
+ var PreviewContext = React40.createContext(null);
10465
10493
  function usePreview() {
10466
- const value = React39.useContext(PreviewContext);
10494
+ const value = React40.useContext(PreviewContext);
10467
10495
  if (value === null) throw new Error("preview runtime used outside <SpacefrontPreviewProvider>");
10468
10496
  return value;
10469
10497
  }
@@ -10617,11 +10645,11 @@ var PRESENCE = {
10617
10645
  usePresenceLiveTurn: () => usePreview().pending?.messageId
10618
10646
  };
10619
10647
  function SpacefrontPreviewProvider({ scene, onSend, children }) {
10620
- const [sessionId] = React39.useState(() => `preview-${Math.random().toString(36).slice(2)}`);
10621
- const derived = React39.useMemo(() => derive(scene, sessionId), [scene, sessionId]);
10622
- const onSendRef = React39.useRef(onSend);
10648
+ const [sessionId] = React40.useState(() => `preview-${Math.random().toString(36).slice(2)}`);
10649
+ const derived = React40.useMemo(() => derive(scene, sessionId), [scene, sessionId]);
10650
+ const onSendRef = React40.useRef(onSend);
10623
10651
  onSendRef.current = onSend;
10624
- const draft = React39.useMemo(() => {
10652
+ const draft = React40.useMemo(() => {
10625
10653
  let text2 = "";
10626
10654
  const listeners13 = /* @__PURE__ */ new Set();
10627
10655
  return {
@@ -10637,7 +10665,7 @@ function SpacefrontPreviewProvider({ scene, onSend, children }) {
10637
10665
  }
10638
10666
  };
10639
10667
  }, []);
10640
- const session = React39.useMemo(() => {
10668
+ const session = React40.useMemo(() => {
10641
10669
  const send = (text2) => {
10642
10670
  draft.set("");
10643
10671
  onSendRef.current?.(text2);
@@ -10689,15 +10717,15 @@ function SpacefrontPreviewProvider({ scene, onSend, children }) {
10689
10717
  const qId = question === null ? null : question.id;
10690
10718
  const qText = question === null ? "" : question.text;
10691
10719
  const qReplies = question === null ? "" : list(question.replies).join("\0");
10692
- const raised = React39.useRef(0);
10693
- React39.useEffect(() => {
10720
+ const raised = React40.useRef(0);
10721
+ React40.useEffect(() => {
10694
10722
  if (qId === null) return;
10695
10723
  raised.current += 1;
10696
10724
  const id = `${qId}-${raised.current}`;
10697
10725
  raiseStanding(AGENT_ASK_SIGNAL, id, { ask: qText, suggestions: qReplies === "" ? [] : qReplies.split("\0") }, sessionId);
10698
10726
  return () => resolveStanding(id, sessionId);
10699
10727
  }, [qId, qText, qReplies, sessionId]);
10700
- return /* @__PURE__ */ jsx22(PreviewContext.Provider, { value: derived, children: /* @__PURE__ */ jsx22(FourtySessionContext.Provider, { value: session, children: /* @__PURE__ */ jsx22(FourtyRuntimeProvider, { value: RUNTIME, children: /* @__PURE__ */ jsx22(PresenceRuntimeProvider, { value: PRESENCE, children }) }) }) });
10728
+ return /* @__PURE__ */ jsx23(PreviewContext.Provider, { value: derived, children: /* @__PURE__ */ jsx23(FourtySessionContext.Provider, { value: session, children: /* @__PURE__ */ jsx23(FourtyRuntimeProvider, { value: RUNTIME, children: /* @__PURE__ */ jsx23(PresenceRuntimeProvider, { value: PRESENCE, children }) }) }) });
10701
10729
  }
10702
10730
 
10703
10731
  // src/verticals/commerce/index.ts
@@ -11064,18 +11092,18 @@ __export(ecommerce_exports, {
11064
11092
  });
11065
11093
 
11066
11094
  // ../spacestation/src/analytics/ecommerce/surfacing.ts
11067
- import { z as z49 } from "zod";
11095
+ import { z as z50 } from "zod";
11068
11096
  var PRODUCTS_SURFACED = defineEventKind(
11069
11097
  "commerce.products_surfaced",
11070
11098
  "client",
11071
- z49.object({
11099
+ z50.object({
11072
11100
  /** The turn whose commit this describes. Minted where the prompt signal
11073
11101
  * is built and shared with `agent_runs`, so the read layer can line a
11074
11102
  * surfacing up against the prompt that asked for it. */
11075
- turnId: z49.string().min(1).max(128),
11103
+ turnId: z50.string().min(1).max(128),
11076
11104
  /** Distinct entity refs this turn placed that were not on the canvas
11077
11105
  * before it. ZERO IS A REAL VALUE — see the header. */
11078
- productCount: z49.number().int().nonnegative()
11106
+ productCount: z50.number().int().nonnegative()
11079
11107
  }).strict()
11080
11108
  );
11081
11109
 
@@ -11655,7 +11683,7 @@ function useCartDrawer() {
11655
11683
  }
11656
11684
 
11657
11685
  // src/verticals/commerce/cart/use-cart-view.ts
11658
- import React40 from "react";
11686
+ import React41 from "react";
11659
11687
 
11660
11688
  // src/verticals/commerce/cart/queued-discount-codes.ts
11661
11689
  import { useSyncExternalStore as useSyncExternalStore11 } from "react";
@@ -11714,7 +11742,7 @@ registerSessionScopedClear(() => {
11714
11742
  // src/verticals/commerce/cart/use-cart-view.ts
11715
11743
  function useCartView(cart, onCheckout) {
11716
11744
  const analytics = useOptionalAnalyticsSink();
11717
- const [exitPending, setExitPending] = React40.useState(null);
11745
+ const [exitPending, setExitPending] = React41.useState(null);
11718
11746
  const lines = cart === null ? [] : cart.lines;
11719
11747
  const count = lines.reduce((sum, l) => sum + l.quantity, 0);
11720
11748
  const totalsPending = lines.some((l) => isPendingCartLine(l));
@@ -11725,7 +11753,7 @@ function useCartView(cart, onCheckout) {
11725
11753
  const backendTotal = cart !== null && cart.total !== void 0 ? cart.total.amount : void 0;
11726
11754
  const discountAmount = backendTotal !== void 0 && backendTotal < subtotal ? subtotal - backendTotal : 0;
11727
11755
  const effectiveTotal = backendTotal !== void 0 ? backendTotal : subtotal;
11728
- const navigateToExit = React40.useCallback((url, kind) => {
11756
+ const navigateToExit = React41.useCallback((url, kind) => {
11729
11757
  const result = navigateToExternalCommerceUrl(url);
11730
11758
  if (kind === "checkout") recordVisitorCheckoutExit(analytics, result);
11731
11759
  if (result === "new-tab") {
@@ -11742,7 +11770,7 @@ function useCartView(cart, onCheckout) {
11742
11770
  setExitPending(null);
11743
11771
  }
11744
11772
  }, [analytics]);
11745
- const handleCheckout = React40.useCallback(() => {
11773
+ const handleCheckout = React41.useCallback(() => {
11746
11774
  if (lines.length === 0 || exitPending !== null) return;
11747
11775
  setExitPending("checkout");
11748
11776
  if (onCheckout) {
@@ -11762,7 +11790,7 @@ function useCartView(cart, onCheckout) {
11762
11790
  }
11763
11791
  navigateToExit(cart?.checkoutUrl, "checkout");
11764
11792
  }, [lines.length, exitPending, onCheckout, cart, navigateToExit]);
11765
- const handleGoToStore = React40.useCallback(() => {
11793
+ const handleGoToStore = React41.useCallback(() => {
11766
11794
  if (lines.length === 0 || exitPending !== null) return;
11767
11795
  setExitPending("store");
11768
11796
  navigateToExit(cart?.storeCartUrl, "store");
@@ -11850,7 +11878,7 @@ registerSessionScopedClear(() => {
11850
11878
  });
11851
11879
 
11852
11880
  // src/verticals/commerce/cart/use-cart-line-row.ts
11853
- import * as React41 from "react";
11881
+ import * as React42 from "react";
11854
11882
 
11855
11883
  // src/verticals/commerce/use-commerce-actions.ts
11856
11884
  import { useCallback as useCallback22 } from "react";
@@ -11896,19 +11924,19 @@ var SPOTLIGHT_MAX_AGE_MS = 3e4;
11896
11924
  function useCartLineRow(line, opts) {
11897
11925
  const actions = useCommerceActions();
11898
11926
  const drawerFocus = useCartDrawerFocus();
11899
- const rowRef = React41.useRef(null);
11927
+ const rowRef = React42.useRef(null);
11900
11928
  const pending2 = isPendingCartLine(line);
11901
11929
  const navigable = actions !== null && !pending2 && line.productId.length > 0;
11902
11930
  const onNavigated = opts === void 0 ? void 0 : opts.onNavigated;
11903
- const navigatedRef = React41.useRef(onNavigated);
11931
+ const navigatedRef = React42.useRef(onNavigated);
11904
11932
  navigatedRef.current = onNavigated;
11905
- const navigate = React41.useCallback(() => {
11933
+ const navigate = React42.useCallback(() => {
11906
11934
  if (actions === null) return;
11907
11935
  actions.navigateToProduct(line.productId, line.title);
11908
11936
  const done = navigatedRef.current;
11909
11937
  if (done !== void 0) done();
11910
11938
  }, [actions, line.productId, line.title]);
11911
- const interaction = React41.useMemo(() => {
11939
+ const interaction = React42.useMemo(() => {
11912
11940
  if (!navigable) return void 0;
11913
11941
  return {
11914
11942
  onClick: navigate,
@@ -11923,7 +11951,7 @@ function useCartLineRow(line, opts) {
11923
11951
  };
11924
11952
  }, [navigable, navigate]);
11925
11953
  const spotlightKey = drawerFocus !== null && !pending2 && line.productId.length > 0 && drawerFocus.productId === line.productId && Date.now() - drawerFocus.at < SPOTLIGHT_MAX_AGE_MS ? drawerFocus.at : null;
11926
- React41.useEffect(() => {
11954
+ React42.useEffect(() => {
11927
11955
  if (spotlightKey === null) return;
11928
11956
  const node = rowRef.current;
11929
11957
  if (node === null) return;
@@ -12068,7 +12096,7 @@ function pickColorCount(product) {
12068
12096
  }
12069
12097
 
12070
12098
  // src/verticals/commerce/product/use-look-card.ts
12071
- import * as React42 from "react";
12099
+ import * as React43 from "react";
12072
12100
 
12073
12101
  // src/verticals/commerce/variant/variant-option-axes.ts
12074
12102
  function carriesValue(variant, name, value) {
@@ -12278,8 +12306,8 @@ function useLookCard({
12278
12306
  const session = useFourtySession();
12279
12307
  const addFlash = useSuccessFlash({ duration: 1200 });
12280
12308
  const locale = useSpaceLocale();
12281
- const [pending2, setPending] = React42.useState(null);
12282
- const clean = React42.useMemo(
12309
+ const [pending2, setPending] = React43.useState(null);
12310
+ const clean = React43.useMemo(
12283
12311
  () => (Array.isArray(products) ? products : []).filter(
12284
12312
  (p) => p !== null && p !== void 0 && typeof p === "object"
12285
12313
  ),
@@ -12634,7 +12662,7 @@ function useContentActions() {
12634
12662
  import { useEffect as useEffect19, useState as useState18 } from "react";
12635
12663
 
12636
12664
  // package.json
12637
- var version = "0.5.11";
12665
+ var version = "0.5.12";
12638
12666
 
12639
12667
  // src/host/host-modules.ts
12640
12668
  import * as react from "react";
@@ -12695,7 +12723,7 @@ function loadEngine(apiUrl) {
12695
12723
  }
12696
12724
 
12697
12725
  // src/host/Spacefront.tsx
12698
- import { jsx as jsx23 } from "react/jsx-runtime";
12726
+ import { jsx as jsx24 } from "react/jsx-runtime";
12699
12727
  function Spacefront(props) {
12700
12728
  const [engine, setEngine] = useState18(null);
12701
12729
  const [failure, setFailure] = useState18(null);
@@ -12717,11 +12745,11 @@ function Spacefront(props) {
12717
12745
  if (failure !== null) throw failure;
12718
12746
  if (engine === null) return null;
12719
12747
  const EngineRoot = engine.EngineRoot;
12720
- return /* @__PURE__ */ jsx23(EngineRoot, { ...props });
12748
+ return /* @__PURE__ */ jsx24(EngineRoot, { ...props });
12721
12749
  }
12722
12750
 
12723
12751
  // src/npm.ts
12724
- import { z as z51 } from "zod";
12752
+ import { z as z52 } from "zod";
12725
12753
  export {
12726
12754
  ACQUISITION_KIND_LABELS,
12727
12755
  ACTIVE_PANEL_ATTR,
@@ -12755,6 +12783,8 @@ export {
12755
12783
  BRAND_MARK_MAX_BYTES,
12756
12784
  BRAND_MARK_SLOTS,
12757
12785
  BRAND_MARK_TYPES,
12786
+ BotCheckNoticeProvider,
12787
+ BotCheckNoticeSchema,
12758
12788
  BrandMarkImageSchema,
12759
12789
  BrandMarkSchema,
12760
12790
  BugLocationSchema,
@@ -13299,6 +13329,7 @@ export {
13299
13329
  useAgentPresenceFrame,
13300
13330
  useAgentPresenceFresh,
13301
13331
  useAnalyticsSink,
13332
+ useBotCheckNotice,
13302
13333
  useCanvasActions,
13303
13334
  useCanvasArrangement,
13304
13335
  useCanvasBack,
@@ -13451,5 +13482,5 @@ export {
13451
13482
  withInteractionTracking,
13452
13483
  withQueuedDiscountCodes,
13453
13484
  withSignalTurn,
13454
- z51 as z
13485
+ z52 as z
13455
13486
  };