react-semaphor 0.1.545 → 0.1.546

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/analytics-protocol/index.js +405 -442
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +100 -76
  4. package/dist/brand-studio/index.js +4 -4
  5. package/dist/briefings/index.js +6 -6
  6. package/dist/chunks/{add-to-dashboard-BuAqfA2Y.js → add-to-dashboard-BQRAAnc3.js} +55 -33
  7. package/dist/chunks/{analytics-base-schemas-BFAoRlkU.js → analytics-base-schemas-BKs3flFS.js} +2 -2
  8. package/dist/chunks/{assistant-chat-D7sWTypJ.js → assistant-chat-BPXhulAx.js} +2826 -2595
  9. package/dist/chunks/{bookmark-state-CXw7lZ50.js → bookmark-state-C4vetoa0.js} +7 -8
  10. package/dist/chunks/column-catalog-BYnochWQ.js +3363 -0
  11. package/dist/chunks/comparison-window-caption-C2xF-eWw.js +1433 -0
  12. package/dist/chunks/{context-ClREvqCZ.js → context-BerEBuFR.js} +11 -6
  13. package/dist/chunks/custom-visual-inputs-CkJW9pBS.js +295 -0
  14. package/dist/chunks/{dashboard-B1tMju0u.js → dashboard-C3CoKbGY.js} +1 -1
  15. package/dist/chunks/dashboard-briefing-launcher-Be4h-7My.js +3734 -0
  16. package/dist/chunks/dashboard-controls-bxPrlSyp.js +2307 -0
  17. package/dist/chunks/{dashboard-json-CoYRPqxx.js → dashboard-json-BrjxIiRt.js} +5 -5
  18. package/dist/chunks/{document-dashboard-inputs-BesAHZvB.js → document-dashboard-inputs-CRVHpIHp.js} +872 -974
  19. package/dist/chunks/{edit-dashboard-visual-JPtNfJRb.js → edit-dashboard-visual-DYYYDjY6.js} +2361 -2447
  20. package/dist/chunks/{filter-value-text-ff7osJr7.js → filter-value-text-Ddf55Ku1.js} +9 -9
  21. package/dist/chunks/global-date-filter-utils-9d6m9-FE.js +11859 -0
  22. package/dist/chunks/index-CtoK1Lgu.js +586 -0
  23. package/dist/chunks/{index-DRWiuqyd.js → index-DkQkMKa1.js} +80 -79
  24. package/dist/chunks/list-filter-DsaTbM3J.js +15 -0
  25. package/dist/chunks/matrix-analytical-definition-B9vW-osb.js +717 -0
  26. package/dist/chunks/{matrix-card-DjwWcCo8.js → matrix-card-LiMEipvq.js} +3 -3
  27. package/dist/chunks/{matrix-formatter-DnCyRXJE.js → matrix-formatter-DWEeC0_c.js} +44 -44
  28. package/dist/chunks/{matrix-member-presentation-CQGdVks6.js → matrix-member-presentation-DqzG-UhQ.js} +1 -1
  29. package/dist/chunks/{matrix-operation-contract-8OIO4gob.js → matrix-operation-contract-D6vYkZK4.js} +72 -72
  30. package/dist/chunks/{metric-comparison-DEwi9uc2.js → metric-comparison-zpGw4lD6.js} +2 -2
  31. package/dist/chunks/normalize-dashboard-for-dirty-check-XKgH3GFX.js +119 -0
  32. package/dist/chunks/{pivot-header-presentation-DHcx1XGQ.js → pivot-header-presentation-CQnIDtUv.js} +1 -1
  33. package/dist/chunks/{pivot-result-identity-DJhXXcns.js → pivot-result-identity-C-Q1j1Wb.js} +1 -1
  34. package/dist/chunks/{pivot-result-lifecycle-DM4CyGKs.js → pivot-result-lifecycle-pwq3b7LC.js} +571 -380
  35. package/dist/chunks/{raw-temporal-contract-C51YG48G.js → raw-temporal-contract-WuXA8jBP.js} +1 -1
  36. package/dist/chunks/{raw-temporal-presentation-C3mUgnEx.js → raw-temporal-presentation-CBzrDOjM.js} +8 -8
  37. package/dist/chunks/{report-preferences-dialog-DUtuUL_5.js → report-preferences-dialog-4QEZWe5U.js} +111 -112
  38. package/dist/chunks/{report-runtime-context-Dq8XyODK.js → report-runtime-context-hWiTCzFV.js} +2 -2
  39. package/dist/chunks/resolve-dashboard-input-context-UpK_LBpL.js +5677 -0
  40. package/dist/chunks/{saved-dashboard-context-LrF_kW0l.js → saved-dashboard-context-D_I3Lxk0.js} +34 -34
  41. package/dist/chunks/{selection-reducer-Dj_8xD69.js → selection-reducer-CJzkTZio.js} +15 -15
  42. package/dist/chunks/{semaphor-ready-indicator-BxF96Yhv.js → semaphor-ready-indicator-4zpRHE-X.js} +45823 -47304
  43. package/dist/chunks/{shelf-drop-preview-context-CNaM_Gmh.js → shelf-drop-preview-context-Cfw7TRAx.js} +84 -84
  44. package/dist/chunks/{source-entity-resolution-BYn9giz3.js → source-entity-resolution-BIGRvtbG.js} +13 -13
  45. package/dist/chunks/{switch-uDtPgQlQ.js → switch-CEBOR4n7.js} +3 -3
  46. package/dist/chunks/{table-export-sheet-YzMioA7Y.js → table-export-sheet-4X9mAG3V.js} +1 -1
  47. package/dist/chunks/table-settings-CunhoDUi.js +605 -0
  48. package/dist/chunks/{temporal-bucket-D7NBrrtL.js → temporal-bucket-CQOSbv9-.js} +26 -26
  49. package/dist/chunks/{token-types-DBbZVQsm.js → token-types-BMqRmT-C.js} +1 -1
  50. package/dist/chunks/{use-create-flow-overlay-state-CjB7ig1o.js → use-create-flow-overlay-state-DZBZiiD-.js} +101 -101
  51. package/dist/chunks/{validators-DMHTpf7a.js → validators-C-aOQlTB.js} +713 -658
  52. package/dist/chunks/{relative-date-label-Bk2j94pA.js → zoned-wall-clock-MulfA26h.js} +64 -21
  53. package/dist/dashboard/index.js +2 -2
  54. package/dist/dashboard-authoring/index.js +1802 -1149
  55. package/dist/data-app-sdk/index.js +6 -6
  56. package/dist/data-app-sdk-adapters/index.js +3 -3
  57. package/dist/data-app-sdk-validation/index.js +14 -14
  58. package/dist/format-utils/index.js +133 -133
  59. package/dist/index.js +192 -186
  60. package/dist/layouts/index.js +5 -242
  61. package/dist/report-runtime-context/index.js +2 -2
  62. package/dist/shared/index.js +4 -5
  63. package/dist/style.css +1 -1
  64. package/dist/surfboard/index.js +2 -2
  65. package/dist/types/components/index.d.ts +2 -0
  66. package/dist/types/components/surfboard/arrange-layout-button.d.ts +8 -0
  67. package/dist/types/components/surfboard/screen-size-preview-button.d.ts +7 -0
  68. package/dist/types/index.js +6 -6
  69. package/dist/types/lib/charts/table-chart-types.d.ts +4 -0
  70. package/dist/types/lib/charts/types.d.ts +2 -2
  71. package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +6 -0
  72. package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +2 -0
  73. package/dist/types/lib/dashboard-inputs/prepare-loaded-dashboard.d.ts +15 -0
  74. package/dist/types/lib/matrix-table/matrix-editor.d.ts +52 -0
  75. package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +69 -0
  76. package/dist/types/lib/stores/dashboard-store.d.ts +125 -6
  77. package/dist/types/lib/types/common-types.d.ts +8 -0
  78. package/dist/types/lib/types/explorer-types.d.ts +10 -0
  79. package/dist/types/lib/types/semantic-types.d.ts +84 -0
  80. package/dist/types/lib/utils/build-saved-editor-card.d.ts +20 -0
  81. package/dist/types/lib/utils/card-type-change.d.ts +16 -0
  82. package/dist/types/lib/utils/field-availability-context.d.ts +25 -0
  83. package/dist/types/lib/utils/field-placement.d.ts +96 -0
  84. package/dist/types/lib/utils/field-state-calculator.d.ts +161 -0
  85. package/dist/types/lib/utils/qualified-entity-name.d.ts +2 -0
  86. package/dist/types/shared/analytics-protocol/field-provenance.d.ts +89 -0
  87. package/dist/types/shared/analytics-protocol/index.d.ts +2 -0
  88. package/dist/types/shared/analytics-protocol/query-policies.d.ts +52 -0
  89. package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +1 -1
  90. package/dist/types/shared/analytics-protocol/time-window.d.ts +40 -1
  91. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +4 -1
  92. package/dist/types/shared/assistant-protocol/answer-text.d.ts +20 -0
  93. package/dist/types/shared/assistant-protocol/context.d.ts +21 -21
  94. package/dist/types/shared/assistant-protocol/index.d.ts +1 -0
  95. package/dist/types/shared/assistant-protocol/limits.d.ts +6 -1
  96. package/dist/types/shared/assistant-protocol/parts.d.ts +43 -3
  97. package/dist/types/shared/assistant-protocol/request.d.ts +14 -2
  98. package/dist/types/shared/dashboard-authoring/calculated-field-identity.d.ts +3 -0
  99. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +487 -0
  100. package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +34 -0
  101. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +7886 -0
  102. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +43 -0
  103. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +54 -0
  104. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +89 -0
  105. package/dist/types/shared/dashboard-authoring/column-catalog.d.ts +32 -0
  106. package/dist/types/shared/dashboard-authoring/contracts.d.ts +0 -55
  107. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +24 -14
  108. package/dist/types/shared/dashboard-authoring/dashboard-card-source-index.d.ts +9 -1
  109. package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +26 -0
  110. package/dist/types/shared/dashboard-authoring/filter-applicability.d.ts +75 -0
  111. package/dist/types/shared/dashboard-authoring/index.d.ts +18 -2
  112. package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +10 -37
  113. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +189 -0
  114. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +94 -0
  115. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +78 -0
  116. package/dist/types/shared/dashboard-authoring/validators.d.ts +1 -2
  117. package/dist/types/shared/layouts/engine/grid.d.ts +25 -0
  118. package/dist/types/shared/layouts/engine/index.d.ts +4 -0
  119. package/dist/types/shared/layouts/engine/sheet-layout.d.ts +7 -0
  120. package/dist/types/shared/layouts/engine/types.d.ts +125 -0
  121. package/dist/types/shared/layouts/index.d.ts +1 -2
  122. package/package.json +2 -2
  123. package/dist/chunks/apply-dashboard-operations-CZEMsx8E.js +0 -2080
  124. package/dist/chunks/calendar-day-equality-dvoQp1xW.js +0 -410
  125. package/dist/chunks/comparison-window-caption-D4E6IHPD.js +0 -1624
  126. package/dist/chunks/custom-visual-inputs-DLCD9Y5V.js +0 -329
  127. package/dist/chunks/dashboard-briefing-launcher-CePgIu0Z.js +0 -3720
  128. package/dist/chunks/dashboard-controls-Cq05n3e0.js +0 -2315
  129. package/dist/chunks/dashboard-filter-value-compatibility-CwQ_iSNb.js +0 -108
  130. package/dist/chunks/matrix-analytical-definition-C7Gb0e12.js +0 -117
  131. package/dist/chunks/normalize-dashboard-for-dirty-check-Bk3VYv_q.js +0 -67
  132. package/dist/chunks/numeric-presentation-7X_IrD58.js +0 -5226
  133. package/dist/chunks/resolve-dashboard-input-context-DJ2tICwz.js +0 -9415
  134. package/dist/chunks/stable-serialize-CfqXeiBP.js +0 -6
  135. package/dist/chunks/table-settings-CLZocegs.js +0 -501
  136. package/dist/chunks/use-debounced-dirty-check-BwAbnX_5.js +0 -59
  137. package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +0 -46
  138. package/dist/types/shared/dashboard-authoring/change-compiler.d.ts +0 -7
  139. package/dist/types/shared/dashboard-authoring/layout-compiler.d.ts +0 -2
  140. package/dist/types/shared/layouts/create-frame-layouts.d.ts +0 -27
  141. package/dist/types/shared/layouts/frame-layouts.d.ts +0 -23
@@ -335,11 +335,11 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
335
335
  omittedValues: z.ZodOptional<z.ZodNumber>;
336
336
  }, "strict", z.ZodTypeAny, {
337
337
  text: string;
338
- origin: "card" | "selection" | "dashboard_input" | "card_input" | "drill";
338
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
339
339
  omittedValues?: number | undefined;
340
340
  }, {
341
341
  text: string;
342
- origin: "card" | "selection" | "dashboard_input" | "card_input" | "drill";
342
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
343
343
  omittedValues?: number | undefined;
344
344
  }>, "many">;
345
345
  controls: z.ZodArray<z.ZodObject<{
@@ -379,26 +379,26 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
379
379
  text: string;
380
380
  }>>;
381
381
  comparisons: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
382
- omitted: z.ZodOptional<z.ZodObject<Record<"filters" | "controls" | "fields" | "comparisons" | "drillSteps" | "sqlParameters", z.ZodOptional<z.ZodNumber>>, "strict", z.ZodTypeAny, {
382
+ omitted: z.ZodOptional<z.ZodObject<Record<"filters" | "controls" | "fields" | "drillSteps" | "comparisons" | "sqlParameters", z.ZodOptional<z.ZodNumber>>, "strict", z.ZodTypeAny, {
383
383
  filters?: number | undefined;
384
384
  controls?: number | undefined;
385
385
  fields?: number | undefined;
386
- comparisons?: number | undefined;
387
386
  drillSteps?: number | undefined;
387
+ comparisons?: number | undefined;
388
388
  sqlParameters?: number | undefined;
389
389
  }, {
390
390
  filters?: number | undefined;
391
391
  controls?: number | undefined;
392
392
  fields?: number | undefined;
393
- comparisons?: number | undefined;
394
393
  drillSteps?: number | undefined;
394
+ comparisons?: number | undefined;
395
395
  sqlParameters?: number | undefined;
396
396
  }>>;
397
397
  }, "strict", z.ZodTypeAny, {
398
398
  status: "described";
399
399
  filters: {
400
400
  text: string;
401
- origin: "card" | "selection" | "dashboard_input" | "card_input" | "drill";
401
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
402
402
  omittedValues?: number | undefined;
403
403
  }[];
404
404
  controls: {
@@ -425,15 +425,15 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
425
425
  filters?: number | undefined;
426
426
  controls?: number | undefined;
427
427
  fields?: number | undefined;
428
- comparisons?: number | undefined;
429
428
  drillSteps?: number | undefined;
429
+ comparisons?: number | undefined;
430
430
  sqlParameters?: number | undefined;
431
431
  } | undefined;
432
432
  }, {
433
433
  status: "described";
434
434
  filters: {
435
435
  text: string;
436
- origin: "card" | "selection" | "dashboard_input" | "card_input" | "drill";
436
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
437
437
  omittedValues?: number | undefined;
438
438
  }[];
439
439
  controls: {
@@ -460,8 +460,8 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
460
460
  filters?: number | undefined;
461
461
  controls?: number | undefined;
462
462
  fields?: number | undefined;
463
- comparisons?: number | undefined;
464
463
  drillSteps?: number | undefined;
464
+ comparisons?: number | undefined;
465
465
  sqlParameters?: number | undefined;
466
466
  } | undefined;
467
467
  }>, z.ZodObject<{
@@ -487,7 +487,7 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
487
487
  status: "described";
488
488
  filters: {
489
489
  text: string;
490
- origin: "card" | "selection" | "dashboard_input" | "card_input" | "drill";
490
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
491
491
  omittedValues?: number | undefined;
492
492
  }[];
493
493
  controls: {
@@ -514,8 +514,8 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
514
514
  filters?: number | undefined;
515
515
  controls?: number | undefined;
516
516
  fields?: number | undefined;
517
- comparisons?: number | undefined;
518
517
  drillSteps?: number | undefined;
518
+ comparisons?: number | undefined;
519
519
  sqlParameters?: number | undefined;
520
520
  } | undefined;
521
521
  } | {
@@ -533,7 +533,7 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
533
533
  status: "described";
534
534
  filters: {
535
535
  text: string;
536
- origin: "card" | "selection" | "dashboard_input" | "card_input" | "drill";
536
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
537
537
  omittedValues?: number | undefined;
538
538
  }[];
539
539
  controls: {
@@ -560,8 +560,8 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
560
560
  filters?: number | undefined;
561
561
  controls?: number | undefined;
562
562
  fields?: number | undefined;
563
- comparisons?: number | undefined;
564
563
  drillSteps?: number | undefined;
564
+ comparisons?: number | undefined;
565
565
  sqlParameters?: number | undefined;
566
566
  } | undefined;
567
567
  } | {
@@ -639,7 +639,7 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
639
639
  status: "described";
640
640
  filters: {
641
641
  text: string;
642
- origin: "card" | "selection" | "dashboard_input" | "card_input" | "drill";
642
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
643
643
  omittedValues?: number | undefined;
644
644
  }[];
645
645
  controls: {
@@ -666,8 +666,8 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
666
666
  filters?: number | undefined;
667
667
  controls?: number | undefined;
668
668
  fields?: number | undefined;
669
- comparisons?: number | undefined;
670
669
  drillSteps?: number | undefined;
670
+ comparisons?: number | undefined;
671
671
  sqlParameters?: number | undefined;
672
672
  } | undefined;
673
673
  } | {
@@ -731,7 +731,7 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
731
731
  status: "described";
732
732
  filters: {
733
733
  text: string;
734
- origin: "card" | "selection" | "dashboard_input" | "card_input" | "drill";
734
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
735
735
  omittedValues?: number | undefined;
736
736
  }[];
737
737
  controls: {
@@ -758,8 +758,8 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
758
758
  filters?: number | undefined;
759
759
  controls?: number | undefined;
760
760
  fields?: number | undefined;
761
- comparisons?: number | undefined;
762
761
  drillSteps?: number | undefined;
762
+ comparisons?: number | undefined;
763
763
  sqlParameters?: number | undefined;
764
764
  } | undefined;
765
765
  } | {
@@ -823,7 +823,7 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
823
823
  status: "described";
824
824
  filters: {
825
825
  text: string;
826
- origin: "card" | "selection" | "dashboard_input" | "card_input" | "drill";
826
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
827
827
  omittedValues?: number | undefined;
828
828
  }[];
829
829
  controls: {
@@ -850,8 +850,8 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
850
850
  filters?: number | undefined;
851
851
  controls?: number | undefined;
852
852
  fields?: number | undefined;
853
- comparisons?: number | undefined;
854
853
  drillSteps?: number | undefined;
854
+ comparisons?: number | undefined;
855
855
  sqlParameters?: number | undefined;
856
856
  } | undefined;
857
857
  } | {
@@ -915,7 +915,7 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
915
915
  status: "described";
916
916
  filters: {
917
917
  text: string;
918
- origin: "card" | "selection" | "dashboard_input" | "card_input" | "drill";
918
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
919
919
  omittedValues?: number | undefined;
920
920
  }[];
921
921
  controls: {
@@ -942,8 +942,8 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
942
942
  filters?: number | undefined;
943
943
  controls?: number | undefined;
944
944
  fields?: number | undefined;
945
- comparisons?: number | undefined;
946
945
  drillSteps?: number | undefined;
946
+ comparisons?: number | undefined;
947
947
  sqlParameters?: number | undefined;
948
948
  } | undefined;
949
949
  } | {
@@ -11,6 +11,7 @@ export * from './availability.js';
11
11
  export * from './parts.js';
12
12
  export * from './conversation.js';
13
13
  export * from './transcript.js';
14
+ export * from './answer-text.js';
14
15
  export * from './sources.js';
15
16
  export * from './token-config.js';
16
17
  export * from './artifact.js';
@@ -9,8 +9,13 @@ export declare const ASSISTANT_LIMITS: {
9
9
  readonly messageChars: 4000;
10
10
  /** The whole serialized AssistantContext, in UTF-8 bytes. */
11
11
  readonly contextBytes: number;
12
- /** The whole request body (context, message, added sources), in UTF-8 bytes. */
12
+ /** The whole request body (context, message, added sources) except `openDashboard`, in UTF-8 bytes. */
13
13
  readonly requestBytes: number;
14
+ /**
15
+ * The dashboard on screen sent with a question (Phase 7, D7-12), alone, in
16
+ * UTF-8 bytes of its JSON. Over it the browser sends the question without it.
17
+ */
18
+ readonly openDashboardBytes: number;
14
19
  readonly summaryCards: 30;
15
20
  readonly otherSheets: 50;
16
21
  readonly activeInputs: 50;
@@ -1,10 +1,13 @@
1
1
  import { SemaphorDialect, SemaphorSourceRef } from '../analytics-protocol/contracts.js';
2
2
  import { AssistantArtifact } from './artifact.js';
3
+ import { ChangeDiagnostic } from '../dashboard-authoring/changes/diagnostics.js';
4
+ import { CreatedEntity, DashboardOperation, OperationContext } from '../dashboard-authoring/operations/operation-types.js';
3
5
  /**
4
6
  * The parts of an answer (analytics agent Plan 1, spec 2.4). Streamed as AI
5
7
  * SDK `data-${kind}` parts (text uses the SDK's own text parts) and stored on
6
- * the turn as they are. Never a card config (AG-INV-5). Artifacts from
7
- * Phase 4; proposals in Phase 7.
8
+ * the turn as they are, except the trace and a proposal's operations, which
9
+ * are streamed and never stored. The model never reads a part (AG-INV-5).
10
+ * Artifacts from Phase 4; proposals in Phase 7.
8
11
  */
9
12
  export declare const ASSISTANT_PARTS_VERSION: 1;
10
13
  export type AssistantPart = {
@@ -25,7 +28,39 @@ export type AssistantPart = {
25
28
  kind: 'refusal';
26
29
  code: AssistantRefusalCode;
27
30
  message: string;
28
- } | AssistantTracePart;
31
+ } | AssistantTracePart | AssistantProposalPart | AssistantProposalOperationsPart;
32
+ /**
33
+ * A change the assistant made to the dashboard on screen (Phase 7, spec 8.1,
34
+ * D7-16): what it does in plain sentences, stored with the turn. Its
35
+ * operations come in the stream-only part beside it.
36
+ */
37
+ export type AssistantProposalPart = {
38
+ kind: 'proposal';
39
+ proposalId: string;
40
+ dashboardId: string;
41
+ /** This answer's proposal it builds on; null: the dashboard sent with the question (D7-15). */
42
+ buildsOn: string | null;
43
+ /** One per change: its operation (`card.add`, `filter.update`...) and its sentence, as propose returned them. */
44
+ changes: AssistantProposalChange[];
45
+ warnings: ChangeDiagnostic[];
46
+ risk: 'low' | 'medium';
47
+ created: CreatedEntity[];
48
+ };
49
+ export type AssistantProposalChange = {
50
+ op: string;
51
+ sentence: string;
52
+ };
53
+ /**
54
+ * A proposal's operations, for the browser to apply to the dashboard it was
55
+ * built from (D7-16, D7-18). Written to the stream only and never stored,
56
+ * as the trace part: a reopened conversation has nothing to apply.
57
+ */
58
+ export type AssistantProposalOperationsPart = {
59
+ kind: 'proposal_operations';
60
+ proposalId: string;
61
+ operations: DashboardOperation[];
62
+ context: OperationContext;
63
+ };
29
64
  /**
30
65
  * A question the person answers with a click, ending the answer (ledger
31
66
  * D3d-1): the model's alternatives as data, never parsed from its text. Each
@@ -47,6 +82,11 @@ export type AssistantStagePart = {
47
82
  stageId: string;
48
83
  label: string;
49
84
  state: 'live' | 'done' | 'skipped';
85
+ /**
86
+ * A step that changes the dashboard on screen (Phase 7): what the model
87
+ * wrote before it is the answer, not a working note (P7-23, P7-45).
88
+ */
89
+ change?: true;
50
90
  };
51
91
  /**
52
92
  * Where one answer's time and tokens went (spec 3.9, AG-D25). The server
@@ -1,6 +1,7 @@
1
1
  import { SemaphorSourceRef } from '../analytics-protocol/contracts.js';
2
2
  import { CardQueryRequestExtras, DashboardCardQueryRequestPayloadBase } from '../dashboard-authoring/card-query-request.js';
3
3
  import { DataSource } from '../../lib/types/explorer-types.js';
4
+ import { TDashboard } from '../../lib/types/common-types.js';
4
5
  import { AssistantCardField, AssistantContext } from './context.js';
5
6
  export { ASSISTANT_LIMITS } from './limits.js';
6
7
  /**
@@ -37,6 +38,14 @@ export type AssistantTurnRequest = {
37
38
  * `tagged-fields.ts`): each one of the fields its description lists.
38
39
  */
39
40
  taggedFields?: AssistantCardField[];
41
+ /**
42
+ * The dashboard document on screen, as the store holds it (Phase 7,
43
+ * D7-11, D7-12): propose works from it, so a change is made to what the
44
+ * person sees, unsaved edits included. Sent on the dashboard surface where
45
+ * the person may change it (`useCanChangeOpenDashboard`). Outside
46
+ * `requestBytes`, with its own cap; never read by the model, never stored.
47
+ */
48
+ openDashboard?: TDashboard;
40
49
  };
41
50
  /**
42
51
  * Why a card has no request to replay: the reasons the external path's saved
@@ -73,9 +82,12 @@ export type AssistantTurnRequestParseResult = {
73
82
  code: 'context_too_large' | 'context_invalid';
74
83
  issues: string[];
75
84
  };
85
+ /** The most a turn request body may be: the request and the dashboard on screen, each at its cap. */
86
+ export declare const ASSISTANT_TURN_BODY_BYTES: number;
76
87
  /**
77
- * Parses a turn request body as received (text). Size first, before any
78
- * parsing: a body over `requestBytes` or a context over `contextBytes` is
88
+ * Parses a turn request body as received (text). Size first: a body over
89
+ * `ASSISTANT_TURN_BODY_BYTES`, an `openDashboard` over `openDashboardBytes`,
90
+ * the rest of the body over `requestBytes` or a context over `contextBytes` is
79
91
  * `context_too_large`. Then the schema (strict) and the context version: a
80
92
  * failure is `context_invalid`.
81
93
  */
@@ -19,4 +19,7 @@ export declare function readExactDomainCalculatedFieldReference(field: Calculate
19
19
  resultRole?: string;
20
20
  };
21
21
  }): string | undefined;
22
+ /** The field list group calculated fields are listed under (the editor's constants re-export these). */
23
+ export declare const CALCULATED_FIELDS_GROUP_ID = "semaphor_calculated_fields";
24
+ export declare const CALCULATED_FIELDS_GROUP_NAME = "calculated_fields";
22
25
  export {};