react-semaphor 0.1.537 → 0.1.539

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 (174) hide show
  1. package/dist/analytics-protocol/index.js +352 -341
  2. package/dist/assistant-context/index.js +10 -0
  3. package/dist/assistant-protocol/index.js +104 -0
  4. package/dist/brand-studio/index.js +35 -31
  5. package/dist/briefings/index.js +46 -45
  6. package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +28 -0
  7. package/dist/chunks/add-to-dashboard-CxtTfISD.js +56 -0
  8. package/dist/chunks/aggregate-table-row-presentation-BjK9YfMI.js +979 -0
  9. package/dist/chunks/analytics-base-schemas-BFAoRlkU.js +472 -0
  10. package/dist/chunks/apply-dashboard-operations-C-iahGka.js +402 -0
  11. package/dist/chunks/assistant-chat-DgiSuFT4.js +8083 -0
  12. package/dist/chunks/availability-Bp5Gfu1I.js +44 -0
  13. package/dist/chunks/{bookmark-state-B-I9BDD0.js → bookmark-state-k7y5SNGf.js} +9 -9
  14. package/dist/chunks/{braces-8TRlDwDw.js → braces-o9UiRQes.js} +1 -1
  15. package/dist/chunks/calculated-field-identity-DcBS2NPP.js +2161 -0
  16. package/dist/chunks/calendar-day-equality-Bpl15IBo.js +487 -0
  17. package/dist/chunks/class-utils-Df1OVOT1.js +2315 -0
  18. package/dist/chunks/{field-dependencies-CpRUwr9J.js → common-types-CUf03Htv.js} +65 -58
  19. package/dist/chunks/context-HD9usB1P.js +349 -0
  20. package/dist/chunks/conversation-sQiWYUOb.js +16 -0
  21. package/dist/chunks/csv-utils-GUfKyT1J.js +56 -0
  22. package/dist/chunks/custom-visual-inputs-BrUOIwln.js +3288 -0
  23. package/dist/chunks/{dashboard-briefing-launcher-A2uVpHCp.js → dashboard-briefing-launcher-Bl3gCeBR.js} +580 -556
  24. package/dist/chunks/{dashboard-controls-DxTuVis_.js → dashboard-controls-0EX0HiJt.js} +683 -686
  25. package/dist/chunks/{common-types-g7yS12Cg.js → dashboard-filter-value-compatibility-D95O4nd7.js} +18 -24
  26. package/dist/chunks/dashboard-json-6X_2BDiL.js +69 -0
  27. package/dist/chunks/{dashboard-BPJo-Fnd.js → dashboard-y5BwcvzT.js} +1 -1
  28. package/dist/chunks/document-dashboard-inputs-BrYYlRVo.js +10678 -0
  29. package/dist/chunks/document-sheet-utils-C1eEldxs.js +1076 -0
  30. package/dist/chunks/{edit-dashboard-visual-ByV0OwSp.js → edit-dashboard-visual-Bzchfgga.js} +4744 -4746
  31. package/dist/chunks/editor-draft-sync-BN5qYHPF.js +15 -0
  32. package/dist/chunks/filter-value-text-BhWugPWE.js +163 -0
  33. package/dist/chunks/index-CqMiAkay.js +3164 -0
  34. package/dist/chunks/index-CuHybtft.js +51 -0
  35. package/dist/chunks/layout-grid-Bgzth8vd.js +16 -0
  36. package/dist/chunks/{matrix-analytical-definition-CgBTD6H8.js → matrix-analytical-definition-bcprSe4u.js} +1 -1
  37. package/dist/chunks/{matrix-card-CAdizkUl.js → matrix-card-CJn1hB5V.js} +13 -12
  38. package/dist/chunks/matrix-definition-DQDI2okF.js +206 -0
  39. package/dist/chunks/{matrix-formatter-DJCk8Znf.js → matrix-formatter-DQ8avoIQ.js} +648 -457
  40. package/dist/chunks/matrix-member-presentation-BNPSDKBG.js +105 -0
  41. package/dist/chunks/{matrix-operation-contract-BKupLHXL.js → matrix-operation-contract-B8PBF1Gd.js} +134 -133
  42. package/dist/chunks/{metric-comparison-BKHyvnAy.js → metric-comparison-CojWeLqx.js} +1 -1
  43. package/dist/chunks/{palette-Cp1hqZtm.js → palette-D10o_yYX.js} +1 -1
  44. package/dist/chunks/pivot-header-presentation-MkcKnjn3.js +42 -0
  45. package/dist/chunks/{pivot-result-identity-Bs4tLtLo.js → pivot-result-identity-D6hhcRXi.js} +1 -1
  46. package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +804 -0
  47. package/dist/chunks/raw-temporal-D61lr48Y.js +1464 -0
  48. package/dist/chunks/{raw-temporal-contract-mLFS-9wk.js → raw-temporal-contract-C51YG48G.js} +1 -1
  49. package/dist/chunks/report-preferences-dialog-CWhSbc5_.js +1808 -0
  50. package/dist/chunks/{report-runtime-context-CG_I0PPW.js → report-runtime-context-B984Nq1E.js} +8 -7
  51. package/dist/chunks/save-CfJpQQ68.js +21 -0
  52. package/dist/chunks/saved-dashboard-context-Dqve2jlB.js +566 -0
  53. package/dist/chunks/{selection-reducer-CiDEtmAq.js → selection-reducer-vKIb_jS6.js} +2 -2
  54. package/dist/chunks/{semaphor-ready-indicator-CHu1L-lo.js → semaphor-ready-indicator-ldcwmLoY.js} +65803 -62954
  55. package/dist/chunks/{shelf-drop-preview-context-i-H6DFyU.js → shelf-drop-preview-context-BWxunXTq.js} +199 -196
  56. package/dist/chunks/{source-entity-resolution-C-oNyYMp.js → source-entity-resolution-CVA1a85c.js} +8 -8
  57. package/dist/chunks/switch-CvItuC1Q.js +8199 -0
  58. package/dist/chunks/{temporal-bucket-DlFuhCnT.js → temporal-bucket-D8JF7zKz.js} +86 -71
  59. package/dist/chunks/{temporal-bucket-contract-D2OuaVZ7.js → temporal-bucket-contract-DaOajRC7.js} +1 -1
  60. package/dist/chunks/{token-types-DtSJOUjh.js → token-types-bxUxXDX2.js} +1 -1
  61. package/dist/chunks/{upload-CAIpsti1.js → upload-BFX7apKV.js} +1 -1
  62. package/dist/chunks/{use-create-flow-overlay-state-Bj63WwHc.js → use-create-flow-overlay-state-RHgzVfcz.js} +331 -339
  63. package/dist/chunks/{validators-DMSH81OM.js → validators-Ej1DdCXa.js} +1050 -1510
  64. package/dist/chunks/visual-choice-JiJ-_3bi.js +204 -0
  65. package/dist/chunks/x-4f5U2XwU.js +100 -0
  66. package/dist/chunks/{zoned-wall-clock-1qlWCE20.js → zoned-wall-clock-MulfA26h.js} +2 -2
  67. package/dist/dashboard/index.js +2 -2
  68. package/dist/dashboard-authoring/index.js +823 -661
  69. package/dist/data-app-sdk/index.js +32 -30
  70. package/dist/data-app-sdk-adapters/index.js +23 -22
  71. package/dist/data-app-sdk-validation/index.js +23 -22
  72. package/dist/format-utils/index.js +173 -168
  73. package/dist/index.js +267 -258
  74. package/dist/layouts/index.js +236 -24
  75. package/dist/report-runtime-context/index.js +2 -2
  76. package/dist/style.css +1 -1
  77. package/dist/surfboard/index.js +2 -2
  78. package/dist/types/assistant-context.d.ts +2 -0
  79. package/dist/types/assistant-protocol.d.ts +2 -0
  80. package/dist/types/components/assistant/assistant-entry-points.d.ts +18 -0
  81. package/dist/types/components/assistant/assistant-provider.d.ts +19 -0
  82. package/dist/types/components/assistant/assistant-store.d.ts +52 -0
  83. package/dist/types/components/assistant/use-assistant.d.ts +38 -0
  84. package/dist/types/components/index.d.ts +5 -1
  85. package/dist/types/components/surfboard/filter/types.d.ts +5 -2
  86. package/dist/types/index.js +50 -51
  87. package/dist/types/lib/api/invalidate-token.d.ts +7 -0
  88. package/dist/types/lib/charts/cartesian-fields.d.ts +64 -0
  89. package/dist/types/lib/charts/types.d.ts +7 -0
  90. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +14 -2
  91. package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +5 -6
  92. package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +8 -3
  93. package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +11 -6
  94. package/dist/types/lib/dashboard-pagination/dashboard-card-pagination.d.ts +7 -0
  95. package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +79 -0
  96. package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +3 -2
  97. package/dist/types/lib/document/document-table-data-policy.d.ts +15 -0
  98. package/dist/types/lib/filter-values/filter-mode.d.ts +22 -0
  99. package/dist/types/lib/hooks/use-calendar-context.d.ts +5 -0
  100. package/dist/types/lib/hooks/use-filter-option-browse.d.ts +5 -0
  101. package/dist/types/lib/hooks/use-text-filter.d.ts +9 -0
  102. package/dist/types/lib/print/print-inputs.d.ts +4 -2
  103. package/dist/types/lib/query-context/build-card-query-context.d.ts +12 -4
  104. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +93 -0
  105. package/dist/types/lib/query-context/card-server-request.d.ts +72 -0
  106. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +7 -0
  107. package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +56 -0
  108. package/dist/types/lib/query-context/document-section-card-query.d.ts +45 -0
  109. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +17 -2
  110. package/dist/types/lib/stores/dashboard-store.d.ts +34 -11
  111. package/dist/types/lib/stores/editor-store.d.ts +4 -2
  112. package/dist/types/lib/types/token-types.d.ts +11 -0
  113. package/dist/types/lib/utils/card-type-change.d.ts +30 -0
  114. package/dist/types/lib/utils/comparison-window-caption.d.ts +12 -0
  115. package/dist/types/lib/utils/filter-default-value-utils.d.ts +13 -2
  116. package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +74 -0
  117. package/dist/types/shared/analytics-protocol/contracts.d.ts +3 -0
  118. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +43 -0
  119. package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
  120. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +1 -1
  121. package/dist/types/shared/analytics-protocol/visual-choice.d.ts +75 -0
  122. package/dist/types/shared/assistant-context/index.d.ts +9 -0
  123. package/dist/types/shared/assistant-context/project-context.d.ts +55 -0
  124. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +130 -0
  125. package/dist/types/shared/assistant-protocol/add-to-dashboard.d.ts +17 -0
  126. package/dist/types/shared/assistant-protocol/artifact.d.ts +63 -0
  127. package/dist/types/shared/assistant-protocol/availability.d.ts +39 -0
  128. package/dist/types/shared/assistant-protocol/context.d.ts +952 -0
  129. package/dist/types/shared/assistant-protocol/conversation.d.ts +38 -0
  130. package/dist/types/shared/assistant-protocol/index.d.ts +16 -0
  131. package/dist/types/shared/assistant-protocol/limits.d.ts +53 -0
  132. package/dist/types/shared/assistant-protocol/parts.d.ts +140 -0
  133. package/dist/types/shared/assistant-protocol/request.d.ts +77 -0
  134. package/dist/types/shared/assistant-protocol/sources.d.ts +27 -0
  135. package/dist/types/shared/assistant-protocol/token-config.d.ts +32 -0
  136. package/dist/types/shared/assistant-protocol/transcript.d.ts +40 -0
  137. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +112 -0
  138. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +1794 -0
  139. package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
  140. package/dist/types/shared/dashboard-authoring/new-card.d.ts +10 -0
  141. package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +40 -0
  142. package/dist/types/shared/dashboard-authoring/resolved-primary-date-field-validation.d.ts +16 -0
  143. package/dist/types/shared/format-utils/filter-detail.d.ts +70 -0
  144. package/dist/types/shared/format-utils/filter-value-text.d.ts +15 -0
  145. package/dist/types/shared/format-utils/index.d.ts +3 -0
  146. package/dist/types/shared/format-utils/raw-temporal.d.ts +7 -0
  147. package/dist/types/shared/format-utils/temporal-bucket.d.ts +7 -0
  148. package/dist/types/shared/layouts/frame-layouts.d.ts +23 -0
  149. package/dist/types/shared/layouts/index.d.ts +1 -0
  150. package/package.json +12 -2
  151. package/dist/chunks/calculated-field-identity-BptYhyOP.js +0 -1326
  152. package/dist/chunks/calendar-day-equality-BRjN1S9h.js +0 -383
  153. package/dist/chunks/card-config-utils-BOM1dxCk.js +0 -1150
  154. package/dist/chunks/constants-DNWVy8Y3.js +0 -9
  155. package/dist/chunks/dashboard-json-B1dEQu98.js +0 -65
  156. package/dist/chunks/field-aggregations-CoLzYHeL.js +0 -1229
  157. package/dist/chunks/index-DTcTAGGM.js +0 -4101
  158. package/dist/chunks/matrix-continuation-C4sRcjZU.js +0 -72
  159. package/dist/chunks/matrix-control-sources-DTqcA2_L.js +0 -636
  160. package/dist/chunks/matrix-definition-D9iShKZI.js +0 -87
  161. package/dist/chunks/matrix-member-presentation-Ct8GuxHt.js +0 -209
  162. package/dist/chunks/numeric-presentation-CWu3gunq.js +0 -537
  163. package/dist/chunks/pivot-header-presentation-CHs2GFrM.js +0 -753
  164. package/dist/chunks/pivot-result-lifecycle-DQz_gjGu.js +0 -789
  165. package/dist/chunks/raw-temporal-iMXRK-Qz.js +0 -930
  166. package/dist/chunks/report-preferences-dialog-DXPjteCU.js +0 -1623
  167. package/dist/chunks/save-kO6cIaob.js +0 -34
  168. package/dist/chunks/semantic-format-DiqYeKwU.js +0 -192
  169. package/dist/chunks/switch-DO8a0EfJ.js +0 -25004
  170. package/dist/chunks/temporal-input-presentation-BD7YNUzu.js +0 -195
  171. package/dist/chunks/x-CXDkqdur.js +0 -149
  172. package/dist/types/lib/class-utils.d.ts +0 -2
  173. package/dist/types/lib/document/document-input-runtime.d.ts +0 -26
  174. package/dist/types/lib/utils.d.ts +0 -51
@@ -0,0 +1,952 @@
1
+ import { z } from 'zod';
2
+ import { SemaphorSourceRef } from '../analytics-protocol/contracts.js';
3
+ /**
4
+ * What the user is looking at, sent with each turn (analytics agent Plan 1,
5
+ * spec 2.2, module M3). The dashboard, the sheet, its inputs and cards, and
6
+ * the card the user asked about, described from its compiled execution
7
+ * snapshot (ledger D3a-1 to D3a-9). In the editor, the card in focus is the
8
+ * draft being edited, saved or not (Phase 5, D5-2).
9
+ */
10
+ export declare const ASSISTANT_CONTEXT_VERSION: 1;
11
+ export type AssistantSurface = 'dashboard' | 'editor' | 'none';
12
+ /** What the user is looking at. Built from live state in the browser, or from a saved dashboard in the regression set. */
13
+ export type AssistantContext = {
14
+ version: typeof ASSISTANT_CONTEXT_VERSION;
15
+ surface: AssistantSurface;
16
+ dashboard?: {
17
+ id: string;
18
+ title: string;
19
+ /** The dashboard has edits the user has not saved. */
20
+ unsavedEdits: boolean;
21
+ };
22
+ sheet?: {
23
+ id: string;
24
+ title: string;
25
+ };
26
+ otherSheets: Array<{
27
+ id: string;
28
+ title: string;
29
+ }>;
30
+ /** Dashboard inputs (filters, date ranges, controls) on this sheet that currently have a value. */
31
+ activeInputs: AssistantActiveInput[];
32
+ /** Cards on the current sheet, by identity; at most ASSISTANT_LIMITS.summaryCards. */
33
+ cards: AssistantCardSummary[];
34
+ /** The card in focus: the one the user asked about (Ask), or in the editor the draft being edited. */
35
+ selectedCard?: AssistantSelectedCard;
36
+ /** Editor surface only: the visual being edited, in which mode. */
37
+ editing?: {
38
+ mode: 'visual' | 'sql';
39
+ };
40
+ /** Entries left out past a list cap, counted. */
41
+ omitted?: {
42
+ otherSheets?: number;
43
+ activeInputs?: number;
44
+ cards?: number;
45
+ };
46
+ /** IANA time zone of the viewer. */
47
+ timeZone: string;
48
+ };
49
+ /**
50
+ * A sheet-level input (D3a-3): what is set, never which cards use it. Which
51
+ * inputs a card applies is decided by its compiled query and read only from
52
+ * its description (P3-66).
53
+ */
54
+ export type AssistantActiveInput = {
55
+ /** The input's stable id on the dashboard. */
56
+ inputId: string;
57
+ label: string;
58
+ value: AssistantActiveInputValue;
59
+ /** The dashboard date: it applies to each card's own date field, on cards that have one. */
60
+ globalDate?: true;
61
+ };
62
+ export type AssistantActiveInputValue = {
63
+ kind: 'set';
64
+ /**
65
+ * The condition in full detail, from the renderer a card's filters use:
66
+ * the operator in words, every value up to the cap, dates as written,
67
+ * whole days with their zone, a relative window's definition.
68
+ */
69
+ text: string;
70
+ /** Values the text leaves out past ASSISTANT_LIMITS.inputValues. */
71
+ omittedValues?: number;
72
+ /**
73
+ * Set on screen but applied by no card in this view: the view was opened
74
+ * from another dashboard without this dashboard's own filters.
75
+ */
76
+ notApplied?: 'opened_from_another_dashboard';
77
+ /**
78
+ * Digest of the resolved value and whether the view applies it. Change
79
+ * detection reads only this, so a change the text cannot show (past a
80
+ * cap, past the text limit) counts.
81
+ */
82
+ fingerprint: string;
83
+ }
84
+ /** The value differs by card (or document section); none is listed. */
85
+ | {
86
+ kind: 'varies';
87
+ };
88
+ /** A card on the sheet, by identity only (D3a-2). */
89
+ export type AssistantCardSummary = {
90
+ id: string;
91
+ title: string;
92
+ /** The card's visual type as stored (for example "bar", "table"). */
93
+ visualType: string;
94
+ /** When the card's source index names exactly one source. */
95
+ source?: SemaphorSourceRef;
96
+ };
97
+ /** The asked-about card (D3a-4, D3a-5, D3a-8). */
98
+ export type AssistantSelectedCard = AssistantCardSummary & {
99
+ /** Digest of every compiled fact; changes when anything the card runs changes, listed or not. */
100
+ fingerprint: string;
101
+ description: AssistantCardDescription;
102
+ };
103
+ export type AssistantCardFieldRole = 'row' | 'column' | 'measure' | 'detail';
104
+ export type AssistantCardField = {
105
+ role: AssistantCardFieldRole;
106
+ /** As the card stores it. */
107
+ label: string;
108
+ name: string;
109
+ aggregate?: string;
110
+ granularity?: string;
111
+ };
112
+ /** A dashboard input, the card's own input (an inline filter on the card), its saved filter, its drill, a selection on another card. */
113
+ export type AssistantCardFilterOrigin = 'dashboard_input' | 'card_input' | 'card' | 'drill' | 'selection';
114
+ export type AssistantCardFilter = {
115
+ origin: AssistantCardFilterOrigin;
116
+ /** Full detail: every value up to the cap, literals, exact instants, relative definitions. */
117
+ text: string;
118
+ omittedValues?: number;
119
+ };
120
+ export type AssistantCardNotDescribedReason = 'matrix' | 'custom_visual' | 'python' | 'snapshot_blocked' | 'snapshot_pending';
121
+ export type AssistantCardDescription = {
122
+ status: 'described';
123
+ /** At the level the card runs (a drilled card at its drilled level). */
124
+ fields: AssistantCardField[];
125
+ filters: AssistantCardFilter[];
126
+ controls: Array<{
127
+ label: string;
128
+ valueText: string;
129
+ }>;
130
+ /** One entry per drill step, outermost first. */
131
+ drillPath: string[];
132
+ /** SQL cards: the statement and its parameters with their current values. */
133
+ sql?: {
134
+ text: string;
135
+ parameters: Array<{
136
+ name: string;
137
+ valueText: string;
138
+ }>;
139
+ };
140
+ /**
141
+ * Each measure's requested comparison, in words, with where it comes from
142
+ * (Phase 3b, D3b-6). Windows are not here: only a result carries them.
143
+ */
144
+ comparisons?: string[];
145
+ /** Entries left out past a list cap, counted. */
146
+ omitted?: {
147
+ fields?: number;
148
+ filters?: number;
149
+ controls?: number;
150
+ drillSteps?: number;
151
+ sqlParameters?: number;
152
+ comparisons?: number;
153
+ };
154
+ } | {
155
+ status: 'not_described';
156
+ reason: AssistantCardNotDescribedReason;
157
+ message?: string;
158
+ };
159
+ export type AssistantContextChange = {
160
+ kind: 'surface_changed';
161
+ from: AssistantSurface;
162
+ to: AssistantSurface;
163
+ } | {
164
+ kind: 'sheet_changed';
165
+ fromSheetId: string;
166
+ toSheetId: string;
167
+ } | {
168
+ kind: 'selection_changed';
169
+ fromCardId?: string;
170
+ toCardId?: string;
171
+ }
172
+ /** The same card, compiled differently (fingerprint). */
173
+ | {
174
+ kind: 'card_changed';
175
+ cardId: string;
176
+ } | {
177
+ kind: 'inputs_changed';
178
+ inputIds: string[];
179
+ };
180
+ /** The strict schema the server parses a turn's context with. */
181
+ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
182
+ version: z.ZodLiteral<1>;
183
+ surface: z.ZodEnum<["dashboard", "editor", "none"]>;
184
+ dashboard: z.ZodOptional<z.ZodObject<{
185
+ id: z.ZodString;
186
+ title: z.ZodString;
187
+ unsavedEdits: z.ZodBoolean;
188
+ }, "strict", z.ZodTypeAny, {
189
+ id: string;
190
+ title: string;
191
+ unsavedEdits: boolean;
192
+ }, {
193
+ id: string;
194
+ title: string;
195
+ unsavedEdits: boolean;
196
+ }>>;
197
+ sheet: z.ZodOptional<z.ZodObject<{
198
+ id: z.ZodString;
199
+ title: z.ZodString;
200
+ }, "strict", z.ZodTypeAny, {
201
+ id: string;
202
+ title: string;
203
+ }, {
204
+ id: string;
205
+ title: string;
206
+ }>>;
207
+ otherSheets: z.ZodArray<z.ZodObject<{
208
+ id: z.ZodString;
209
+ title: z.ZodString;
210
+ }, "strict", z.ZodTypeAny, {
211
+ id: string;
212
+ title: string;
213
+ }, {
214
+ id: string;
215
+ title: string;
216
+ }>, "many">;
217
+ activeInputs: z.ZodArray<z.ZodObject<{
218
+ inputId: z.ZodString;
219
+ label: z.ZodString;
220
+ value: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
221
+ kind: z.ZodLiteral<"set">;
222
+ text: z.ZodString;
223
+ omittedValues: z.ZodOptional<z.ZodNumber>;
224
+ notApplied: z.ZodOptional<z.ZodLiteral<"opened_from_another_dashboard">>;
225
+ fingerprint: z.ZodString;
226
+ }, "strict", z.ZodTypeAny, {
227
+ kind: "set";
228
+ text: string;
229
+ fingerprint: string;
230
+ omittedValues?: number | undefined;
231
+ notApplied?: "opened_from_another_dashboard" | undefined;
232
+ }, {
233
+ kind: "set";
234
+ text: string;
235
+ fingerprint: string;
236
+ omittedValues?: number | undefined;
237
+ notApplied?: "opened_from_another_dashboard" | undefined;
238
+ }>, z.ZodObject<{
239
+ kind: z.ZodLiteral<"varies">;
240
+ }, "strict", z.ZodTypeAny, {
241
+ kind: "varies";
242
+ }, {
243
+ kind: "varies";
244
+ }>]>;
245
+ globalDate: z.ZodOptional<z.ZodLiteral<true>>;
246
+ }, "strict", z.ZodTypeAny, {
247
+ value: {
248
+ kind: "set";
249
+ text: string;
250
+ fingerprint: string;
251
+ omittedValues?: number | undefined;
252
+ notApplied?: "opened_from_another_dashboard" | undefined;
253
+ } | {
254
+ kind: "varies";
255
+ };
256
+ label: string;
257
+ inputId: string;
258
+ globalDate?: true | undefined;
259
+ }, {
260
+ value: {
261
+ kind: "set";
262
+ text: string;
263
+ fingerprint: string;
264
+ omittedValues?: number | undefined;
265
+ notApplied?: "opened_from_another_dashboard" | undefined;
266
+ } | {
267
+ kind: "varies";
268
+ };
269
+ label: string;
270
+ inputId: string;
271
+ globalDate?: true | undefined;
272
+ }>, "many">;
273
+ cards: z.ZodArray<z.ZodObject<{
274
+ id: z.ZodString;
275
+ title: z.ZodString;
276
+ visualType: z.ZodString;
277
+ source: z.ZodOptional<z.ZodType<SemaphorSourceRef, z.ZodTypeDef, SemaphorSourceRef>>;
278
+ }, "strict", z.ZodTypeAny, {
279
+ id: string;
280
+ title: string;
281
+ visualType: string;
282
+ source?: SemaphorSourceRef | undefined;
283
+ }, {
284
+ id: string;
285
+ title: string;
286
+ visualType: string;
287
+ source?: SemaphorSourceRef | undefined;
288
+ }>, "many">;
289
+ selectedCard: z.ZodOptional<z.ZodObject<{
290
+ fingerprint: z.ZodString;
291
+ description: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
292
+ status: z.ZodLiteral<"described">;
293
+ fields: z.ZodArray<z.ZodObject<{
294
+ role: z.ZodEnum<["row", "column", "measure", "detail"]>;
295
+ label: z.ZodString;
296
+ name: z.ZodString;
297
+ aggregate: z.ZodOptional<z.ZodString>;
298
+ granularity: z.ZodOptional<z.ZodString>;
299
+ }, "strict", z.ZodTypeAny, {
300
+ label: string;
301
+ name: string;
302
+ role: "measure" | "row" | "detail" | "column";
303
+ granularity?: string | undefined;
304
+ aggregate?: string | undefined;
305
+ }, {
306
+ label: string;
307
+ name: string;
308
+ role: "measure" | "row" | "detail" | "column";
309
+ granularity?: string | undefined;
310
+ aggregate?: string | undefined;
311
+ }>, "many">;
312
+ filters: z.ZodArray<z.ZodObject<{
313
+ origin: z.ZodEnum<["dashboard_input", "card_input", "card", "drill", "selection"]>;
314
+ text: z.ZodString;
315
+ omittedValues: z.ZodOptional<z.ZodNumber>;
316
+ }, "strict", z.ZodTypeAny, {
317
+ text: string;
318
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
319
+ omittedValues?: number | undefined;
320
+ }, {
321
+ text: string;
322
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
323
+ omittedValues?: number | undefined;
324
+ }>, "many">;
325
+ controls: z.ZodArray<z.ZodObject<{
326
+ label: z.ZodString;
327
+ valueText: z.ZodString;
328
+ }, "strict", z.ZodTypeAny, {
329
+ label: string;
330
+ valueText: string;
331
+ }, {
332
+ label: string;
333
+ valueText: string;
334
+ }>, "many">;
335
+ drillPath: z.ZodArray<z.ZodString, "many">;
336
+ sql: z.ZodOptional<z.ZodObject<{
337
+ text: z.ZodString;
338
+ parameters: z.ZodArray<z.ZodObject<{
339
+ name: z.ZodString;
340
+ valueText: z.ZodString;
341
+ }, "strict", z.ZodTypeAny, {
342
+ name: string;
343
+ valueText: string;
344
+ }, {
345
+ name: string;
346
+ valueText: string;
347
+ }>, "many">;
348
+ }, "strict", z.ZodTypeAny, {
349
+ parameters: {
350
+ name: string;
351
+ valueText: string;
352
+ }[];
353
+ text: string;
354
+ }, {
355
+ parameters: {
356
+ name: string;
357
+ valueText: string;
358
+ }[];
359
+ text: string;
360
+ }>>;
361
+ comparisons: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
362
+ omitted: z.ZodOptional<z.ZodObject<Record<"filters" | "controls" | "fields" | "drillSteps" | "comparisons" | "sqlParameters", z.ZodOptional<z.ZodNumber>>, "strict", z.ZodTypeAny, {
363
+ filters?: number | undefined;
364
+ controls?: number | undefined;
365
+ fields?: number | undefined;
366
+ drillSteps?: number | undefined;
367
+ comparisons?: number | undefined;
368
+ sqlParameters?: number | undefined;
369
+ }, {
370
+ filters?: number | undefined;
371
+ controls?: number | undefined;
372
+ fields?: number | undefined;
373
+ drillSteps?: number | undefined;
374
+ comparisons?: number | undefined;
375
+ sqlParameters?: number | undefined;
376
+ }>>;
377
+ }, "strict", z.ZodTypeAny, {
378
+ status: "described";
379
+ filters: {
380
+ text: string;
381
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
382
+ omittedValues?: number | undefined;
383
+ }[];
384
+ controls: {
385
+ label: string;
386
+ valueText: string;
387
+ }[];
388
+ fields: {
389
+ label: string;
390
+ name: string;
391
+ role: "measure" | "row" | "detail" | "column";
392
+ granularity?: string | undefined;
393
+ aggregate?: string | undefined;
394
+ }[];
395
+ drillPath: string[];
396
+ sql?: {
397
+ parameters: {
398
+ name: string;
399
+ valueText: string;
400
+ }[];
401
+ text: string;
402
+ } | undefined;
403
+ comparisons?: string[] | undefined;
404
+ omitted?: {
405
+ filters?: number | undefined;
406
+ controls?: number | undefined;
407
+ fields?: number | undefined;
408
+ drillSteps?: number | undefined;
409
+ comparisons?: number | undefined;
410
+ sqlParameters?: number | undefined;
411
+ } | undefined;
412
+ }, {
413
+ status: "described";
414
+ filters: {
415
+ text: string;
416
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
417
+ omittedValues?: number | undefined;
418
+ }[];
419
+ controls: {
420
+ label: string;
421
+ valueText: string;
422
+ }[];
423
+ fields: {
424
+ label: string;
425
+ name: string;
426
+ role: "measure" | "row" | "detail" | "column";
427
+ granularity?: string | undefined;
428
+ aggregate?: string | undefined;
429
+ }[];
430
+ drillPath: string[];
431
+ sql?: {
432
+ parameters: {
433
+ name: string;
434
+ valueText: string;
435
+ }[];
436
+ text: string;
437
+ } | undefined;
438
+ comparisons?: string[] | undefined;
439
+ omitted?: {
440
+ filters?: number | undefined;
441
+ controls?: number | undefined;
442
+ fields?: number | undefined;
443
+ drillSteps?: number | undefined;
444
+ comparisons?: number | undefined;
445
+ sqlParameters?: number | undefined;
446
+ } | undefined;
447
+ }>, z.ZodObject<{
448
+ status: z.ZodLiteral<"not_described">;
449
+ reason: z.ZodEnum<["matrix", "custom_visual", "python", "snapshot_blocked", "snapshot_pending"]>;
450
+ message: z.ZodOptional<z.ZodString>;
451
+ }, "strict", z.ZodTypeAny, {
452
+ status: "not_described";
453
+ reason: "matrix" | "python" | "custom_visual" | "snapshot_blocked" | "snapshot_pending";
454
+ message?: string | undefined;
455
+ }, {
456
+ status: "not_described";
457
+ reason: "matrix" | "python" | "custom_visual" | "snapshot_blocked" | "snapshot_pending";
458
+ message?: string | undefined;
459
+ }>]>;
460
+ id: z.ZodString;
461
+ title: z.ZodString;
462
+ visualType: z.ZodString;
463
+ source: z.ZodOptional<z.ZodType<SemaphorSourceRef, z.ZodTypeDef, SemaphorSourceRef>>;
464
+ }, "strict", z.ZodTypeAny, {
465
+ id: string;
466
+ description: {
467
+ status: "described";
468
+ filters: {
469
+ text: string;
470
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
471
+ omittedValues?: number | undefined;
472
+ }[];
473
+ controls: {
474
+ label: string;
475
+ valueText: string;
476
+ }[];
477
+ fields: {
478
+ label: string;
479
+ name: string;
480
+ role: "measure" | "row" | "detail" | "column";
481
+ granularity?: string | undefined;
482
+ aggregate?: string | undefined;
483
+ }[];
484
+ drillPath: string[];
485
+ sql?: {
486
+ parameters: {
487
+ name: string;
488
+ valueText: string;
489
+ }[];
490
+ text: string;
491
+ } | undefined;
492
+ comparisons?: string[] | undefined;
493
+ omitted?: {
494
+ filters?: number | undefined;
495
+ controls?: number | undefined;
496
+ fields?: number | undefined;
497
+ drillSteps?: number | undefined;
498
+ comparisons?: number | undefined;
499
+ sqlParameters?: number | undefined;
500
+ } | undefined;
501
+ } | {
502
+ status: "not_described";
503
+ reason: "matrix" | "python" | "custom_visual" | "snapshot_blocked" | "snapshot_pending";
504
+ message?: string | undefined;
505
+ };
506
+ title: string;
507
+ visualType: string;
508
+ fingerprint: string;
509
+ source?: SemaphorSourceRef | undefined;
510
+ }, {
511
+ id: string;
512
+ description: {
513
+ status: "described";
514
+ filters: {
515
+ text: string;
516
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
517
+ omittedValues?: number | undefined;
518
+ }[];
519
+ controls: {
520
+ label: string;
521
+ valueText: string;
522
+ }[];
523
+ fields: {
524
+ label: string;
525
+ name: string;
526
+ role: "measure" | "row" | "detail" | "column";
527
+ granularity?: string | undefined;
528
+ aggregate?: string | undefined;
529
+ }[];
530
+ drillPath: string[];
531
+ sql?: {
532
+ parameters: {
533
+ name: string;
534
+ valueText: string;
535
+ }[];
536
+ text: string;
537
+ } | undefined;
538
+ comparisons?: string[] | undefined;
539
+ omitted?: {
540
+ filters?: number | undefined;
541
+ controls?: number | undefined;
542
+ fields?: number | undefined;
543
+ drillSteps?: number | undefined;
544
+ comparisons?: number | undefined;
545
+ sqlParameters?: number | undefined;
546
+ } | undefined;
547
+ } | {
548
+ status: "not_described";
549
+ reason: "matrix" | "python" | "custom_visual" | "snapshot_blocked" | "snapshot_pending";
550
+ message?: string | undefined;
551
+ };
552
+ title: string;
553
+ visualType: string;
554
+ fingerprint: string;
555
+ source?: SemaphorSourceRef | undefined;
556
+ }>>;
557
+ editing: z.ZodOptional<z.ZodObject<{
558
+ mode: z.ZodEnum<["visual", "sql"]>;
559
+ }, "strict", z.ZodTypeAny, {
560
+ mode: "sql" | "visual";
561
+ }, {
562
+ mode: "sql" | "visual";
563
+ }>>;
564
+ omitted: z.ZodOptional<z.ZodObject<Record<"cards" | "activeInputs" | "otherSheets", z.ZodOptional<z.ZodNumber>>, "strict", z.ZodTypeAny, {
565
+ cards?: number | undefined;
566
+ activeInputs?: number | undefined;
567
+ otherSheets?: number | undefined;
568
+ }, {
569
+ cards?: number | undefined;
570
+ activeInputs?: number | undefined;
571
+ otherSheets?: number | undefined;
572
+ }>>;
573
+ timeZone: z.ZodString;
574
+ }, "strict", z.ZodTypeAny, {
575
+ timeZone: string;
576
+ version: 1;
577
+ cards: {
578
+ id: string;
579
+ title: string;
580
+ visualType: string;
581
+ source?: SemaphorSourceRef | undefined;
582
+ }[];
583
+ surface: "none" | "dashboard" | "editor";
584
+ activeInputs: {
585
+ value: {
586
+ kind: "set";
587
+ text: string;
588
+ fingerprint: string;
589
+ omittedValues?: number | undefined;
590
+ notApplied?: "opened_from_another_dashboard" | undefined;
591
+ } | {
592
+ kind: "varies";
593
+ };
594
+ label: string;
595
+ inputId: string;
596
+ globalDate?: true | undefined;
597
+ }[];
598
+ otherSheets: {
599
+ id: string;
600
+ title: string;
601
+ }[];
602
+ sheet?: {
603
+ id: string;
604
+ title: string;
605
+ } | undefined;
606
+ dashboard?: {
607
+ id: string;
608
+ title: string;
609
+ unsavedEdits: boolean;
610
+ } | undefined;
611
+ selectedCard?: {
612
+ id: string;
613
+ description: {
614
+ status: "described";
615
+ filters: {
616
+ text: string;
617
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
618
+ omittedValues?: number | undefined;
619
+ }[];
620
+ controls: {
621
+ label: string;
622
+ valueText: string;
623
+ }[];
624
+ fields: {
625
+ label: string;
626
+ name: string;
627
+ role: "measure" | "row" | "detail" | "column";
628
+ granularity?: string | undefined;
629
+ aggregate?: string | undefined;
630
+ }[];
631
+ drillPath: string[];
632
+ sql?: {
633
+ parameters: {
634
+ name: string;
635
+ valueText: string;
636
+ }[];
637
+ text: string;
638
+ } | undefined;
639
+ comparisons?: string[] | undefined;
640
+ omitted?: {
641
+ filters?: number | undefined;
642
+ controls?: number | undefined;
643
+ fields?: number | undefined;
644
+ drillSteps?: number | undefined;
645
+ comparisons?: number | undefined;
646
+ sqlParameters?: number | undefined;
647
+ } | undefined;
648
+ } | {
649
+ status: "not_described";
650
+ reason: "matrix" | "python" | "custom_visual" | "snapshot_blocked" | "snapshot_pending";
651
+ message?: string | undefined;
652
+ };
653
+ title: string;
654
+ visualType: string;
655
+ fingerprint: string;
656
+ source?: SemaphorSourceRef | undefined;
657
+ } | undefined;
658
+ omitted?: {
659
+ cards?: number | undefined;
660
+ activeInputs?: number | undefined;
661
+ otherSheets?: number | undefined;
662
+ } | undefined;
663
+ editing?: {
664
+ mode: "sql" | "visual";
665
+ } | undefined;
666
+ }, {
667
+ timeZone: string;
668
+ version: 1;
669
+ cards: {
670
+ id: string;
671
+ title: string;
672
+ visualType: string;
673
+ source?: SemaphorSourceRef | undefined;
674
+ }[];
675
+ surface: "none" | "dashboard" | "editor";
676
+ activeInputs: {
677
+ value: {
678
+ kind: "set";
679
+ text: string;
680
+ fingerprint: string;
681
+ omittedValues?: number | undefined;
682
+ notApplied?: "opened_from_another_dashboard" | undefined;
683
+ } | {
684
+ kind: "varies";
685
+ };
686
+ label: string;
687
+ inputId: string;
688
+ globalDate?: true | undefined;
689
+ }[];
690
+ otherSheets: {
691
+ id: string;
692
+ title: string;
693
+ }[];
694
+ sheet?: {
695
+ id: string;
696
+ title: string;
697
+ } | undefined;
698
+ dashboard?: {
699
+ id: string;
700
+ title: string;
701
+ unsavedEdits: boolean;
702
+ } | undefined;
703
+ selectedCard?: {
704
+ id: string;
705
+ description: {
706
+ status: "described";
707
+ filters: {
708
+ text: string;
709
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
710
+ omittedValues?: number | undefined;
711
+ }[];
712
+ controls: {
713
+ label: string;
714
+ valueText: string;
715
+ }[];
716
+ fields: {
717
+ label: string;
718
+ name: string;
719
+ role: "measure" | "row" | "detail" | "column";
720
+ granularity?: string | undefined;
721
+ aggregate?: string | undefined;
722
+ }[];
723
+ drillPath: string[];
724
+ sql?: {
725
+ parameters: {
726
+ name: string;
727
+ valueText: string;
728
+ }[];
729
+ text: string;
730
+ } | undefined;
731
+ comparisons?: string[] | undefined;
732
+ omitted?: {
733
+ filters?: number | undefined;
734
+ controls?: number | undefined;
735
+ fields?: number | undefined;
736
+ drillSteps?: number | undefined;
737
+ comparisons?: number | undefined;
738
+ sqlParameters?: number | undefined;
739
+ } | undefined;
740
+ } | {
741
+ status: "not_described";
742
+ reason: "matrix" | "python" | "custom_visual" | "snapshot_blocked" | "snapshot_pending";
743
+ message?: string | undefined;
744
+ };
745
+ title: string;
746
+ visualType: string;
747
+ fingerprint: string;
748
+ source?: SemaphorSourceRef | undefined;
749
+ } | undefined;
750
+ omitted?: {
751
+ cards?: number | undefined;
752
+ activeInputs?: number | undefined;
753
+ otherSheets?: number | undefined;
754
+ } | undefined;
755
+ editing?: {
756
+ mode: "sql" | "visual";
757
+ } | undefined;
758
+ }>, {
759
+ timeZone: string;
760
+ version: 1;
761
+ cards: {
762
+ id: string;
763
+ title: string;
764
+ visualType: string;
765
+ source?: SemaphorSourceRef | undefined;
766
+ }[];
767
+ surface: "none" | "dashboard" | "editor";
768
+ activeInputs: {
769
+ value: {
770
+ kind: "set";
771
+ text: string;
772
+ fingerprint: string;
773
+ omittedValues?: number | undefined;
774
+ notApplied?: "opened_from_another_dashboard" | undefined;
775
+ } | {
776
+ kind: "varies";
777
+ };
778
+ label: string;
779
+ inputId: string;
780
+ globalDate?: true | undefined;
781
+ }[];
782
+ otherSheets: {
783
+ id: string;
784
+ title: string;
785
+ }[];
786
+ sheet?: {
787
+ id: string;
788
+ title: string;
789
+ } | undefined;
790
+ dashboard?: {
791
+ id: string;
792
+ title: string;
793
+ unsavedEdits: boolean;
794
+ } | undefined;
795
+ selectedCard?: {
796
+ id: string;
797
+ description: {
798
+ status: "described";
799
+ filters: {
800
+ text: string;
801
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
802
+ omittedValues?: number | undefined;
803
+ }[];
804
+ controls: {
805
+ label: string;
806
+ valueText: string;
807
+ }[];
808
+ fields: {
809
+ label: string;
810
+ name: string;
811
+ role: "measure" | "row" | "detail" | "column";
812
+ granularity?: string | undefined;
813
+ aggregate?: string | undefined;
814
+ }[];
815
+ drillPath: string[];
816
+ sql?: {
817
+ parameters: {
818
+ name: string;
819
+ valueText: string;
820
+ }[];
821
+ text: string;
822
+ } | undefined;
823
+ comparisons?: string[] | undefined;
824
+ omitted?: {
825
+ filters?: number | undefined;
826
+ controls?: number | undefined;
827
+ fields?: number | undefined;
828
+ drillSteps?: number | undefined;
829
+ comparisons?: number | undefined;
830
+ sqlParameters?: number | undefined;
831
+ } | undefined;
832
+ } | {
833
+ status: "not_described";
834
+ reason: "matrix" | "python" | "custom_visual" | "snapshot_blocked" | "snapshot_pending";
835
+ message?: string | undefined;
836
+ };
837
+ title: string;
838
+ visualType: string;
839
+ fingerprint: string;
840
+ source?: SemaphorSourceRef | undefined;
841
+ } | undefined;
842
+ omitted?: {
843
+ cards?: number | undefined;
844
+ activeInputs?: number | undefined;
845
+ otherSheets?: number | undefined;
846
+ } | undefined;
847
+ editing?: {
848
+ mode: "sql" | "visual";
849
+ } | undefined;
850
+ }, {
851
+ timeZone: string;
852
+ version: 1;
853
+ cards: {
854
+ id: string;
855
+ title: string;
856
+ visualType: string;
857
+ source?: SemaphorSourceRef | undefined;
858
+ }[];
859
+ surface: "none" | "dashboard" | "editor";
860
+ activeInputs: {
861
+ value: {
862
+ kind: "set";
863
+ text: string;
864
+ fingerprint: string;
865
+ omittedValues?: number | undefined;
866
+ notApplied?: "opened_from_another_dashboard" | undefined;
867
+ } | {
868
+ kind: "varies";
869
+ };
870
+ label: string;
871
+ inputId: string;
872
+ globalDate?: true | undefined;
873
+ }[];
874
+ otherSheets: {
875
+ id: string;
876
+ title: string;
877
+ }[];
878
+ sheet?: {
879
+ id: string;
880
+ title: string;
881
+ } | undefined;
882
+ dashboard?: {
883
+ id: string;
884
+ title: string;
885
+ unsavedEdits: boolean;
886
+ } | undefined;
887
+ selectedCard?: {
888
+ id: string;
889
+ description: {
890
+ status: "described";
891
+ filters: {
892
+ text: string;
893
+ origin: "card" | "selection" | "drill" | "dashboard_input" | "card_input";
894
+ omittedValues?: number | undefined;
895
+ }[];
896
+ controls: {
897
+ label: string;
898
+ valueText: string;
899
+ }[];
900
+ fields: {
901
+ label: string;
902
+ name: string;
903
+ role: "measure" | "row" | "detail" | "column";
904
+ granularity?: string | undefined;
905
+ aggregate?: string | undefined;
906
+ }[];
907
+ drillPath: string[];
908
+ sql?: {
909
+ parameters: {
910
+ name: string;
911
+ valueText: string;
912
+ }[];
913
+ text: string;
914
+ } | undefined;
915
+ comparisons?: string[] | undefined;
916
+ omitted?: {
917
+ filters?: number | undefined;
918
+ controls?: number | undefined;
919
+ fields?: number | undefined;
920
+ drillSteps?: number | undefined;
921
+ comparisons?: number | undefined;
922
+ sqlParameters?: number | undefined;
923
+ } | undefined;
924
+ } | {
925
+ status: "not_described";
926
+ reason: "matrix" | "python" | "custom_visual" | "snapshot_blocked" | "snapshot_pending";
927
+ message?: string | undefined;
928
+ };
929
+ title: string;
930
+ visualType: string;
931
+ fingerprint: string;
932
+ source?: SemaphorSourceRef | undefined;
933
+ } | undefined;
934
+ omitted?: {
935
+ cards?: number | undefined;
936
+ activeInputs?: number | undefined;
937
+ otherSheets?: number | undefined;
938
+ } | undefined;
939
+ editing?: {
940
+ mode: "sql" | "visual";
941
+ } | undefined;
942
+ }>;
943
+ /** Pure. Compares the last finished turn's context with this turn's. */
944
+ export declare function compareAssistantContexts(previous: AssistantContext | undefined, next: AssistantContext): AssistantContextChange[];
945
+ /**
946
+ * Pure. The text block the model reads at the start of a turn: where the user
947
+ * is, the asked-about card as compiled, the sources in scope, the changes
948
+ * since the last turn. Never a card config or rows.
949
+ */
950
+ export declare function renderContextForModel(context: AssistantContext, changes: AssistantContextChange[], addedSources: SemaphorSourceRef[]): string;
951
+ /** A source in words, with the identifiers the tools take. */
952
+ export declare function describeSource(source: SemaphorSourceRef): string;