@40rty/ams-sdk 0.5.22 → 0.5.24

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.
@@ -20,6 +20,13 @@ import { z } from 'zod';
20
20
  * identifier verbatim rather than translating it into prose, which is exactly
21
21
  * how a vertical's vocabulary stays inside the vertical.
22
22
  */
23
+ /** The queue's sortable columns. `lastActive` newest-first is the default order. */
24
+ export declare const QueueSortKeySchema: z.ZodEnum<["lastActive", "stage", "source", "location", "turns", "duration"]>;
25
+ export type QueueSortKey = z.infer<typeof QueueSortKeySchema>;
26
+ export interface QueueSort {
27
+ key: QueueSortKey;
28
+ ascending: boolean;
29
+ }
23
30
  /**
24
31
  * What an operator concluded about a session.
25
32
  *
@@ -224,7 +231,6 @@ export declare const SessionBugSchema: z.ZodObject<{
224
231
  createdBy: string;
225
232
  createdAt: string;
226
233
  provider: string;
227
- turnIndex: number | null;
228
234
  location: {
229
235
  elementId: string | null;
230
236
  elementType: string | null;
@@ -233,6 +239,7 @@ export declare const SessionBugSchema: z.ZodObject<{
233
239
  pageX: number | null;
234
240
  pageY: number | null;
235
241
  } | null;
242
+ turnIndex: number | null;
236
243
  issueKey: string | null;
237
244
  issueUrl: string | null;
238
245
  issueState: string | null;
@@ -246,7 +253,6 @@ export declare const SessionBugSchema: z.ZodObject<{
246
253
  createdBy: string;
247
254
  createdAt: string;
248
255
  provider: string;
249
- turnIndex: number | null;
250
256
  location: {
251
257
  elementId: string | null;
252
258
  elementType: string | null;
@@ -255,6 +261,7 @@ export declare const SessionBugSchema: z.ZodObject<{
255
261
  pageX: number | null;
256
262
  pageY: number | null;
257
263
  } | null;
264
+ turnIndex: number | null;
258
265
  issueKey: string | null;
259
266
  issueUrl: string | null;
260
267
  issueState: string | null;
@@ -355,7 +362,6 @@ export declare const SpaceBugSchema: z.ZodObject<{
355
362
  createdBy: string;
356
363
  createdAt: string;
357
364
  provider: string;
358
- turnIndex: number | null;
359
365
  location: {
360
366
  elementId: string | null;
361
367
  elementType: string | null;
@@ -364,6 +370,7 @@ export declare const SpaceBugSchema: z.ZodObject<{
364
370
  pageX: number | null;
365
371
  pageY: number | null;
366
372
  } | null;
373
+ turnIndex: number | null;
367
374
  issueKey: string | null;
368
375
  issueUrl: string | null;
369
376
  issueState: string | null;
@@ -378,7 +385,6 @@ export declare const SpaceBugSchema: z.ZodObject<{
378
385
  createdBy: string;
379
386
  createdAt: string;
380
387
  provider: string;
381
- turnIndex: number | null;
382
388
  location: {
383
389
  elementId: string | null;
384
390
  elementType: string | null;
@@ -387,6 +393,7 @@ export declare const SpaceBugSchema: z.ZodObject<{
387
393
  pageX: number | null;
388
394
  pageY: number | null;
389
395
  } | null;
396
+ turnIndex: number | null;
390
397
  issueKey: string | null;
391
398
  issueUrl: string | null;
392
399
  issueState: string | null;
@@ -459,7 +466,6 @@ export declare const SessionCommentSchema: z.ZodObject<{
459
466
  id: string;
460
467
  createdBy: string;
461
468
  createdAt: string;
462
- turnIndex: number | null;
463
469
  location: {
464
470
  elementId: string | null;
465
471
  elementType: string | null;
@@ -468,13 +474,13 @@ export declare const SessionCommentSchema: z.ZodObject<{
468
474
  pageX: number | null;
469
475
  pageY: number | null;
470
476
  } | null;
477
+ turnIndex: number | null;
471
478
  body: string;
472
479
  bugId: string | null;
473
480
  }, {
474
481
  id: string;
475
482
  createdBy: string;
476
483
  createdAt: string;
477
- turnIndex: number | null;
478
484
  location: {
479
485
  elementId: string | null;
480
486
  elementType: string | null;
@@ -483,6 +489,7 @@ export declare const SessionCommentSchema: z.ZodObject<{
483
489
  pageX: number | null;
484
490
  pageY: number | null;
485
491
  } | null;
492
+ turnIndex: number | null;
486
493
  body: string;
487
494
  bugId: string | null;
488
495
  }>;
@@ -541,7 +548,6 @@ export declare const CreateCommentInputSchema: z.ZodEffects<z.ZodObject<{
541
548
  }>>;
542
549
  body: z.ZodString;
543
550
  }, "strip", z.ZodTypeAny, {
544
- turnIndex: number | null;
545
551
  location: {
546
552
  elementId: string | null;
547
553
  elementType: string | null;
@@ -550,10 +556,10 @@ export declare const CreateCommentInputSchema: z.ZodEffects<z.ZodObject<{
550
556
  pageX: number | null;
551
557
  pageY: number | null;
552
558
  } | null;
559
+ turnIndex: number | null;
553
560
  body: string;
554
561
  bugId: string | null;
555
562
  }, {
556
- turnIndex: number | null;
557
563
  location: {
558
564
  elementId: string | null;
559
565
  elementType: string | null;
@@ -562,10 +568,10 @@ export declare const CreateCommentInputSchema: z.ZodEffects<z.ZodObject<{
562
568
  pageX: number | null;
563
569
  pageY: number | null;
564
570
  } | null;
571
+ turnIndex: number | null;
565
572
  body: string;
566
573
  bugId: string | null;
567
574
  }>, {
568
- turnIndex: number | null;
569
575
  location: {
570
576
  elementId: string | null;
571
577
  elementType: string | null;
@@ -574,10 +580,10 @@ export declare const CreateCommentInputSchema: z.ZodEffects<z.ZodObject<{
574
580
  pageX: number | null;
575
581
  pageY: number | null;
576
582
  } | null;
583
+ turnIndex: number | null;
577
584
  body: string;
578
585
  bugId: string | null;
579
586
  }, {
580
- turnIndex: number | null;
581
587
  location: {
582
588
  elementId: string | null;
583
589
  elementType: string | null;
@@ -586,6 +592,7 @@ export declare const CreateCommentInputSchema: z.ZodEffects<z.ZodObject<{
586
592
  pageX: number | null;
587
593
  pageY: number | null;
588
594
  } | null;
595
+ turnIndex: number | null;
589
596
  body: string;
590
597
  bugId: string | null;
591
598
  }>;
@@ -1393,6 +1400,7 @@ export type SessionCaptureInput = z.infer<typeof SessionCaptureInputSchema>;
1393
1400
  export declare const SessionArrivalRecordSchema: z.ZodObject<{
1394
1401
  trafficBucket: z.ZodNullable<z.ZodString>;
1395
1402
  referrerHost: z.ZodNullable<z.ZodString>;
1403
+ landingPath: z.ZodNullable<z.ZodString>;
1396
1404
  utmSource: z.ZodNullable<z.ZodString>;
1397
1405
  utmMedium: z.ZodNullable<z.ZodString>;
1398
1406
  utmCampaign: z.ZodNullable<z.ZodString>;
@@ -1407,6 +1415,7 @@ export declare const SessionArrivalRecordSchema: z.ZodObject<{
1407
1415
  utmTerm: string | null;
1408
1416
  clickIdKind: string | null;
1409
1417
  referrerHost: string | null;
1418
+ landingPath: string | null;
1410
1419
  trafficBucket: string | null;
1411
1420
  }, {
1412
1421
  utmSource: string | null;
@@ -1416,6 +1425,7 @@ export declare const SessionArrivalRecordSchema: z.ZodObject<{
1416
1425
  utmTerm: string | null;
1417
1426
  clickIdKind: string | null;
1418
1427
  referrerHost: string | null;
1428
+ landingPath: string | null;
1419
1429
  trafficBucket: string | null;
1420
1430
  }>;
1421
1431
  export type SessionArrivalRecord = z.infer<typeof SessionArrivalRecordSchema>;
@@ -1770,7 +1780,6 @@ export declare const SessionDetailSchema: z.ZodObject<{
1770
1780
  createdBy: string;
1771
1781
  createdAt: string;
1772
1782
  provider: string;
1773
- turnIndex: number | null;
1774
1783
  location: {
1775
1784
  elementId: string | null;
1776
1785
  elementType: string | null;
@@ -1779,6 +1788,7 @@ export declare const SessionDetailSchema: z.ZodObject<{
1779
1788
  pageX: number | null;
1780
1789
  pageY: number | null;
1781
1790
  } | null;
1791
+ turnIndex: number | null;
1782
1792
  issueKey: string | null;
1783
1793
  issueUrl: string | null;
1784
1794
  issueState: string | null;
@@ -1792,7 +1802,6 @@ export declare const SessionDetailSchema: z.ZodObject<{
1792
1802
  createdBy: string;
1793
1803
  createdAt: string;
1794
1804
  provider: string;
1795
- turnIndex: number | null;
1796
1805
  location: {
1797
1806
  elementId: string | null;
1798
1807
  elementType: string | null;
@@ -1801,6 +1810,7 @@ export declare const SessionDetailSchema: z.ZodObject<{
1801
1810
  pageX: number | null;
1802
1811
  pageY: number | null;
1803
1812
  } | null;
1813
+ turnIndex: number | null;
1804
1814
  issueKey: string | null;
1805
1815
  issueUrl: string | null;
1806
1816
  issueState: string | null;
@@ -1872,7 +1882,6 @@ export declare const SessionDetailSchema: z.ZodObject<{
1872
1882
  id: string;
1873
1883
  createdBy: string;
1874
1884
  createdAt: string;
1875
- turnIndex: number | null;
1876
1885
  location: {
1877
1886
  elementId: string | null;
1878
1887
  elementType: string | null;
@@ -1881,13 +1890,13 @@ export declare const SessionDetailSchema: z.ZodObject<{
1881
1890
  pageX: number | null;
1882
1891
  pageY: number | null;
1883
1892
  } | null;
1893
+ turnIndex: number | null;
1884
1894
  body: string;
1885
1895
  bugId: string | null;
1886
1896
  }, {
1887
1897
  id: string;
1888
1898
  createdBy: string;
1889
1899
  createdAt: string;
1890
- turnIndex: number | null;
1891
1900
  location: {
1892
1901
  elementId: string | null;
1893
1902
  elementType: string | null;
@@ -1896,6 +1905,7 @@ export declare const SessionDetailSchema: z.ZodObject<{
1896
1905
  pageX: number | null;
1897
1906
  pageY: number | null;
1898
1907
  } | null;
1908
+ turnIndex: number | null;
1899
1909
  body: string;
1900
1910
  bugId: string | null;
1901
1911
  }>, "many">;
@@ -1950,6 +1960,7 @@ export declare const SessionDetailSchema: z.ZodObject<{
1950
1960
  arrival: z.ZodOptional<z.ZodObject<{
1951
1961
  trafficBucket: z.ZodNullable<z.ZodString>;
1952
1962
  referrerHost: z.ZodNullable<z.ZodString>;
1963
+ landingPath: z.ZodNullable<z.ZodString>;
1953
1964
  utmSource: z.ZodNullable<z.ZodString>;
1954
1965
  utmMedium: z.ZodNullable<z.ZodString>;
1955
1966
  utmCampaign: z.ZodNullable<z.ZodString>;
@@ -1964,6 +1975,7 @@ export declare const SessionDetailSchema: z.ZodObject<{
1964
1975
  utmTerm: string | null;
1965
1976
  clickIdKind: string | null;
1966
1977
  referrerHost: string | null;
1978
+ landingPath: string | null;
1967
1979
  trafficBucket: string | null;
1968
1980
  }, {
1969
1981
  utmSource: string | null;
@@ -1973,6 +1985,7 @@ export declare const SessionDetailSchema: z.ZodObject<{
1973
1985
  utmTerm: string | null;
1974
1986
  clickIdKind: string | null;
1975
1987
  referrerHost: string | null;
1988
+ landingPath: string | null;
1976
1989
  trafficBucket: string | null;
1977
1990
  }>>;
1978
1991
  }, "strip", z.ZodTypeAny, {
@@ -2033,7 +2046,6 @@ export declare const SessionDetailSchema: z.ZodObject<{
2033
2046
  createdBy: string;
2034
2047
  createdAt: string;
2035
2048
  provider: string;
2036
- turnIndex: number | null;
2037
2049
  location: {
2038
2050
  elementId: string | null;
2039
2051
  elementType: string | null;
@@ -2042,6 +2054,7 @@ export declare const SessionDetailSchema: z.ZodObject<{
2042
2054
  pageX: number | null;
2043
2055
  pageY: number | null;
2044
2056
  } | null;
2057
+ turnIndex: number | null;
2045
2058
  issueKey: string | null;
2046
2059
  issueUrl: string | null;
2047
2060
  issueState: string | null;
@@ -2053,7 +2066,6 @@ export declare const SessionDetailSchema: z.ZodObject<{
2053
2066
  id: string;
2054
2067
  createdBy: string;
2055
2068
  createdAt: string;
2056
- turnIndex: number | null;
2057
2069
  location: {
2058
2070
  elementId: string | null;
2059
2071
  elementType: string | null;
@@ -2062,6 +2074,7 @@ export declare const SessionDetailSchema: z.ZodObject<{
2062
2074
  pageX: number | null;
2063
2075
  pageY: number | null;
2064
2076
  } | null;
2077
+ turnIndex: number | null;
2065
2078
  body: string;
2066
2079
  bugId: string | null;
2067
2080
  }[];
@@ -2084,6 +2097,7 @@ export declare const SessionDetailSchema: z.ZodObject<{
2084
2097
  utmTerm: string | null;
2085
2098
  clickIdKind: string | null;
2086
2099
  referrerHost: string | null;
2100
+ landingPath: string | null;
2087
2101
  trafficBucket: string | null;
2088
2102
  } | undefined;
2089
2103
  }, {
@@ -2144,7 +2158,6 @@ export declare const SessionDetailSchema: z.ZodObject<{
2144
2158
  createdBy: string;
2145
2159
  createdAt: string;
2146
2160
  provider: string;
2147
- turnIndex: number | null;
2148
2161
  location: {
2149
2162
  elementId: string | null;
2150
2163
  elementType: string | null;
@@ -2153,6 +2166,7 @@ export declare const SessionDetailSchema: z.ZodObject<{
2153
2166
  pageX: number | null;
2154
2167
  pageY: number | null;
2155
2168
  } | null;
2169
+ turnIndex: number | null;
2156
2170
  issueKey: string | null;
2157
2171
  issueUrl: string | null;
2158
2172
  issueState: string | null;
@@ -2164,7 +2178,6 @@ export declare const SessionDetailSchema: z.ZodObject<{
2164
2178
  id: string;
2165
2179
  createdBy: string;
2166
2180
  createdAt: string;
2167
- turnIndex: number | null;
2168
2181
  location: {
2169
2182
  elementId: string | null;
2170
2183
  elementType: string | null;
@@ -2173,6 +2186,7 @@ export declare const SessionDetailSchema: z.ZodObject<{
2173
2186
  pageX: number | null;
2174
2187
  pageY: number | null;
2175
2188
  } | null;
2189
+ turnIndex: number | null;
2176
2190
  body: string;
2177
2191
  bugId: string | null;
2178
2192
  }[];
@@ -2195,6 +2209,7 @@ export declare const SessionDetailSchema: z.ZodObject<{
2195
2209
  utmTerm: string | null;
2196
2210
  clickIdKind: string | null;
2197
2211
  referrerHost: string | null;
2212
+ landingPath: string | null;
2198
2213
  trafficBucket: string | null;
2199
2214
  } | undefined;
2200
2215
  }>;
@@ -228,18 +228,32 @@ export declare const SessionTurnSchema: z.ZodObject<{
228
228
  /** Full cumulative Spec committed by this turn — never a patch delta. */
229
229
  layout: z.ZodNullable<z.ZodUnknown>;
230
230
  createdAt: z.ZodString;
231
+ /** Turn start → first prose delta. Null on a turn that wrote no prose. */
232
+ latencyFirstText: z.ZodNullable<z.ZodNumber>;
233
+ /** Turn start → first layout patch — the LAYOUT latency the session screen
234
+ * grades against the budget. Null on a turn that patched nothing. */
235
+ latencyFirstPatch: z.ZodNullable<z.ZodNumber>;
231
236
  latencyTotal: z.ZodNullable<z.ZodNumber>;
232
237
  phaseTimings: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
233
238
  tokensByModel: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
234
239
  input_tokens: z.ZodOptional<z.ZodNumber>;
235
240
  output_tokens: z.ZodOptional<z.ZodNumber>;
241
+ cache_read_tokens: z.ZodOptional<z.ZodNumber>;
236
242
  }, "strip", z.ZodTypeAny, {
237
243
  input_tokens?: number | undefined;
238
244
  output_tokens?: number | undefined;
245
+ cache_read_tokens?: number | undefined;
239
246
  }, {
240
247
  input_tokens?: number | undefined;
241
248
  output_tokens?: number | undefined;
249
+ cache_read_tokens?: number | undefined;
242
250
  }>>>;
251
+ /**
252
+ * The turn's tokens priced SERVER-side (`estimateCostUsd`), so the browser
253
+ * never carries a rate table. Null when any model on the turn is unpriced —
254
+ * never 0, which would read as free.
255
+ */
256
+ estimatedCostUsd: z.ZodNullable<z.ZodNumber>;
243
257
  toolCalls: z.ZodNullable<z.ZodArray<z.ZodUnknown, "many">>;
244
258
  diagnostics: z.ZodNullable<z.ZodArray<z.ZodUnknown, "many">>;
245
259
  }, "strip", z.ZodTypeAny, {
@@ -251,10 +265,14 @@ export declare const SessionTurnSchema: z.ZodObject<{
251
265
  tokensByModel: Record<string, {
252
266
  input_tokens?: number | undefined;
253
267
  output_tokens?: number | undefined;
268
+ cache_read_tokens?: number | undefined;
254
269
  }> | null;
255
270
  toolCalls: unknown[] | null;
256
271
  diagnostics: unknown[] | null;
272
+ latencyFirstText: number | null;
273
+ latencyFirstPatch: number | null;
257
274
  latencyTotal: number | null;
275
+ estimatedCostUsd: number | null;
258
276
  layout?: unknown;
259
277
  }, {
260
278
  id: string;
@@ -265,10 +283,14 @@ export declare const SessionTurnSchema: z.ZodObject<{
265
283
  tokensByModel: Record<string, {
266
284
  input_tokens?: number | undefined;
267
285
  output_tokens?: number | undefined;
286
+ cache_read_tokens?: number | undefined;
268
287
  }> | null;
269
288
  toolCalls: unknown[] | null;
270
289
  diagnostics: unknown[] | null;
290
+ latencyFirstText: number | null;
291
+ latencyFirstPatch: number | null;
271
292
  latencyTotal: number | null;
293
+ estimatedCostUsd: number | null;
272
294
  layout?: unknown;
273
295
  }>;
274
296
  export type SessionTurn = z.infer<typeof SessionTurnSchema>;
@@ -289,18 +311,32 @@ export declare const SessionReplaySchema: z.ZodObject<{
289
311
  /** Full cumulative Spec committed by this turn — never a patch delta. */
290
312
  layout: z.ZodNullable<z.ZodUnknown>;
291
313
  createdAt: z.ZodString;
314
+ /** Turn start → first prose delta. Null on a turn that wrote no prose. */
315
+ latencyFirstText: z.ZodNullable<z.ZodNumber>;
316
+ /** Turn start → first layout patch — the LAYOUT latency the session screen
317
+ * grades against the budget. Null on a turn that patched nothing. */
318
+ latencyFirstPatch: z.ZodNullable<z.ZodNumber>;
292
319
  latencyTotal: z.ZodNullable<z.ZodNumber>;
293
320
  phaseTimings: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
294
321
  tokensByModel: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
295
322
  input_tokens: z.ZodOptional<z.ZodNumber>;
296
323
  output_tokens: z.ZodOptional<z.ZodNumber>;
324
+ cache_read_tokens: z.ZodOptional<z.ZodNumber>;
297
325
  }, "strip", z.ZodTypeAny, {
298
326
  input_tokens?: number | undefined;
299
327
  output_tokens?: number | undefined;
328
+ cache_read_tokens?: number | undefined;
300
329
  }, {
301
330
  input_tokens?: number | undefined;
302
331
  output_tokens?: number | undefined;
332
+ cache_read_tokens?: number | undefined;
303
333
  }>>>;
334
+ /**
335
+ * The turn's tokens priced SERVER-side (`estimateCostUsd`), so the browser
336
+ * never carries a rate table. Null when any model on the turn is unpriced —
337
+ * never 0, which would read as free.
338
+ */
339
+ estimatedCostUsd: z.ZodNullable<z.ZodNumber>;
304
340
  toolCalls: z.ZodNullable<z.ZodArray<z.ZodUnknown, "many">>;
305
341
  diagnostics: z.ZodNullable<z.ZodArray<z.ZodUnknown, "many">>;
306
342
  }, "strip", z.ZodTypeAny, {
@@ -312,10 +348,14 @@ export declare const SessionReplaySchema: z.ZodObject<{
312
348
  tokensByModel: Record<string, {
313
349
  input_tokens?: number | undefined;
314
350
  output_tokens?: number | undefined;
351
+ cache_read_tokens?: number | undefined;
315
352
  }> | null;
316
353
  toolCalls: unknown[] | null;
317
354
  diagnostics: unknown[] | null;
355
+ latencyFirstText: number | null;
356
+ latencyFirstPatch: number | null;
318
357
  latencyTotal: number | null;
358
+ estimatedCostUsd: number | null;
319
359
  layout?: unknown;
320
360
  }, {
321
361
  id: string;
@@ -326,10 +366,14 @@ export declare const SessionReplaySchema: z.ZodObject<{
326
366
  tokensByModel: Record<string, {
327
367
  input_tokens?: number | undefined;
328
368
  output_tokens?: number | undefined;
369
+ cache_read_tokens?: number | undefined;
329
370
  }> | null;
330
371
  toolCalls: unknown[] | null;
331
372
  diagnostics: unknown[] | null;
373
+ latencyFirstText: number | null;
374
+ latencyFirstPatch: number | null;
332
375
  latencyTotal: number | null;
376
+ estimatedCostUsd: number | null;
333
377
  layout?: unknown;
334
378
  }>, "many">;
335
379
  /**
@@ -353,10 +397,14 @@ export declare const SessionReplaySchema: z.ZodObject<{
353
397
  tokensByModel: Record<string, {
354
398
  input_tokens?: number | undefined;
355
399
  output_tokens?: number | undefined;
400
+ cache_read_tokens?: number | undefined;
356
401
  }> | null;
357
402
  toolCalls: unknown[] | null;
358
403
  diagnostics: unknown[] | null;
404
+ latencyFirstText: number | null;
405
+ latencyFirstPatch: number | null;
359
406
  latencyTotal: number | null;
407
+ estimatedCostUsd: number | null;
360
408
  layout?: unknown;
361
409
  }[];
362
410
  sessionLayout: Record<string, unknown> | null;
@@ -370,10 +418,14 @@ export declare const SessionReplaySchema: z.ZodObject<{
370
418
  tokensByModel: Record<string, {
371
419
  input_tokens?: number | undefined;
372
420
  output_tokens?: number | undefined;
421
+ cache_read_tokens?: number | undefined;
373
422
  }> | null;
374
423
  toolCalls: unknown[] | null;
375
424
  diagnostics: unknown[] | null;
425
+ latencyFirstText: number | null;
426
+ latencyFirstPatch: number | null;
376
427
  latencyTotal: number | null;
428
+ estimatedCostUsd: number | null;
377
429
  layout?: unknown;
378
430
  }[];
379
431
  sessionLayout: Record<string, unknown> | null;
@@ -444,6 +496,7 @@ export declare const LlmUsageDailySchema: z.ZodObject<{
444
496
  surface: string | null;
445
497
  model: string;
446
498
  spaceId: string | null;
499
+ estimatedCostUsd: number | null;
447
500
  day: string;
448
501
  environment: string;
449
502
  feature: string;
@@ -455,11 +508,11 @@ export declare const LlmUsageDailySchema: z.ZodObject<{
455
508
  reasoningTokens: number;
456
509
  callCount: number;
457
510
  errorCount: number;
458
- estimatedCostUsd: number | null;
459
511
  }, {
460
512
  surface: string | null;
461
513
  model: string;
462
514
  spaceId: string | null;
515
+ estimatedCostUsd: number | null;
463
516
  day: string;
464
517
  environment: string;
465
518
  feature: string;
@@ -471,7 +524,6 @@ export declare const LlmUsageDailySchema: z.ZodObject<{
471
524
  reasoningTokens: number;
472
525
  callCount: number;
473
526
  errorCount: number;
474
- estimatedCostUsd: number | null;
475
527
  }>;
476
528
  export type LlmUsageDaily = z.infer<typeof LlmUsageDailySchema>;
477
529
  /**
@@ -510,6 +562,7 @@ export declare const LlmUsageBySessionSchema: z.ZodObject<{
510
562
  model: string;
511
563
  spaceId: string | null;
512
564
  startedAt: string;
565
+ estimatedCostUsd: number | null;
513
566
  environment: string;
514
567
  inputTokens: number;
515
568
  outputTokens: number;
@@ -517,7 +570,6 @@ export declare const LlmUsageBySessionSchema: z.ZodObject<{
517
570
  reasoningTokens: number;
518
571
  callCount: number;
519
572
  errorCount: number;
520
- estimatedCostUsd: number | null;
521
573
  firstFeature: string;
522
574
  endedAt: string;
523
575
  }, {
@@ -526,6 +578,7 @@ export declare const LlmUsageBySessionSchema: z.ZodObject<{
526
578
  model: string;
527
579
  spaceId: string | null;
528
580
  startedAt: string;
581
+ estimatedCostUsd: number | null;
529
582
  environment: string;
530
583
  inputTokens: number;
531
584
  outputTokens: number;
@@ -533,7 +586,6 @@ export declare const LlmUsageBySessionSchema: z.ZodObject<{
533
586
  reasoningTokens: number;
534
587
  callCount: number;
535
588
  errorCount: number;
536
- estimatedCostUsd: number | null;
537
589
  firstFeature: string;
538
590
  endedAt: string;
539
591
  }>;
@@ -235,6 +235,20 @@ export type TraceDiagnostic = {
235
235
  stage: 'layout_generation';
236
236
  rootKey: string;
237
237
  children: string[];
238
+ }
239
+ /** The turn wrote a web address that was in nothing the model was given this
240
+ * turn — not its prompt (space content, directives, catalog, canvas,
241
+ * conversation) and not a tool output. Removed pre-wire by link grounding
242
+ * (`layout/link-grounding.ts`): a `[label](url)` keeps its label as plain
243
+ * text, a bare URL is deleted. A model fault — an invented address (prod
244
+ * 2026-11-18: three different fake App Store links in one shopper's ask).
245
+ * `surface` says where it was written; `element` is set for a layout write. */
246
+ | {
247
+ kind: 'ungrounded_link_dropped';
248
+ stage: 'layout_generation';
249
+ surface: 'layout' | 'prose';
250
+ url: string;
251
+ element?: string;
238
252
  } | {
239
253
  kind: 'render_sanitized';
240
254
  stage: 'layout_generation';
@@ -41,13 +41,13 @@ export declare const PresenceProfileSchema: z.ZodObject<{
41
41
  */
42
42
  facts: z.ZodEnum<["inferred-only", "all"]>;
43
43
  }, "strip", z.ZodTypeAny, {
44
+ facts: "all" | "inferred-only";
44
45
  sources: string[] | "all";
45
46
  voice: "full" | "off" | "terse";
46
- facts: "all" | "inferred-only";
47
47
  }, {
48
+ facts: "all" | "inferred-only";
48
49
  sources: string[] | "all";
49
50
  voice: "full" | "off" | "terse";
50
- facts: "all" | "inferred-only";
51
51
  }>;
52
52
  export type PresenceProfile = z.infer<typeof PresenceProfileSchema>;
53
53
  /**
package/package.json CHANGED
@@ -26,7 +26,7 @@
26
26
  "react": "^18.3.0 || ^19.0.0",
27
27
  "react-dom": "^18.3.0 || ^19.0.0"
28
28
  },
29
- "version": "0.5.22",
29
+ "version": "0.5.24",
30
30
  "homepage": "https://docs.40rty.ai",
31
31
  "license": "UNLICENSED",
32
32
  "engines": {