react-semaphor 0.1.606 → 0.1.607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-protocol/index.js +1 -1
- package/dist/appearance-runtime/index.js +1 -1
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +1 -1
- package/dist/brand-studio/index.js +2 -2
- package/dist/briefings/index.js +1 -1
- package/dist/chunks/add-to-dashboard-Bu3M9DpP.js +12 -0
- package/dist/chunks/appearance-provider-C4lPZcaN.js +613 -0
- package/dist/chunks/appearance-runtime-provider-De2VZS4F.js +1 -0
- package/dist/chunks/assistant-chat-B7Fngg8U.js +53 -0
- package/dist/chunks/attachment-filter-line-wJRB0GSP.js +1 -0
- package/dist/chunks/{bookmark-impact-BW30cm5E.js → bookmark-impact-DjrrJomS.js} +1 -1
- package/dist/chunks/bookmark-state-x9hJS83D.js +1 -0
- package/dist/chunks/{brand-CL5xDiFH.js → brand-DgFcvKJI.js} +1 -1
- package/dist/chunks/{card-filter-builder-CzScSOQY.js → card-filter-builder-CvxygmsE.js} +8 -3
- package/dist/chunks/check-input-7DVPUuco.js +1 -0
- package/dist/chunks/{comparison-window-caption-tguyN24S.js → comparison-window-caption-zUZDe4tL.js} +1 -1
- package/dist/chunks/compiler-XErOfUUx.js +1 -0
- package/dist/chunks/context-Cwj8Axgd.js +2 -0
- package/dist/chunks/currency-presentation-binding-w9WDUk3b.js +1 -0
- package/dist/chunks/custom-visual-inputs-D8U98aBz.js +1 -0
- package/dist/chunks/{dashboard-Cyhj9EOl.js → dashboard-BEd6i29E.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CyOFddmD.js → dashboard-briefing-launcher-DMDYM9IA.js} +9 -14
- package/dist/chunks/{dashboard-controls-DpADfhr0.js → dashboard-controls-5B2vCIjJ.js} +8 -8
- package/dist/chunks/{dashboard-json-4xMChR2q.js → dashboard-json-C6r30x-5.js} +1 -1
- package/dist/chunks/dashboard-temporal-snapshot-Wki-YACw.js +1 -0
- package/dist/chunks/edit-dashboard-visual-F2w7v4iB.js +83 -0
- package/dist/chunks/{filter-line-WwUV5JzN.js → filter-line-COFQaF4_.js} +1 -1
- package/dist/chunks/filter-reach-preview-BWRGfSmb.js +1 -0
- package/dist/chunks/filter-value-text-BSAMEgve.js +1 -0
- package/dist/chunks/kpi-trend-rule-BcnKbY7d.js +1 -0
- package/dist/chunks/{layout-grid-Dtsioq4h.js → layout-grid-DahW4ClC.js} +1 -1
- package/dist/chunks/matrix-analytical-definition-Bd-dXB8q.js +1 -0
- package/dist/chunks/{matrix-member-presentation-vVAv-aqg.js → matrix-member-presentation-CfvxPV-i.js} +1 -1
- package/dist/chunks/matrix-operation-contract-Cw7U53Ao.js +1 -0
- package/dist/chunks/metric-formatting-QDqXfQGY.js +1 -0
- package/dist/chunks/{numeric-range-options-C8tr-Bls.js → numeric-range-options-s6i_nDXg.js} +1 -1
- package/dist/chunks/{palette-565cA0nh.js → palette-CYvJHSqP.js} +1 -1
- package/dist/chunks/pivot-result-contract-expectations-BX5gLcze.js +1 -0
- package/dist/chunks/{pivot-result-identity-B0eWVMXg.js → pivot-result-identity-DOISzHU4.js} +1 -1
- package/dist/chunks/{raw-temporal-value-BHQ-ldpW.js → raw-temporal-value-Cssny3RJ.js} +1 -1
- package/dist/chunks/report-preferences-dialog-BNpB9byP.js +1 -0
- package/dist/chunks/{report-runtime-context-Cd1b5pku.js → report-runtime-context-B8HuY0bu.js} +1 -1
- package/dist/chunks/resolve-dashboard-input-context-B-0tONJg.js +8 -0
- package/dist/chunks/sandbox-host-Drf58_oU.js +197 -0
- package/dist/chunks/saved-dashboard-context-dbdbQ5bB.js +1 -0
- package/dist/chunks/{selection-filter-compiler-kYsRugss.js → selection-filter-compiler-DK8KkS9g.js} +1 -1
- package/dist/chunks/semaphor-ready-indicator-BSFsqsBJ.js +617 -0
- package/dist/chunks/set-oJDaJdtI.js +1 -0
- package/dist/chunks/slider-DAvAdfMC.js +599 -0
- package/dist/chunks/stored-dashboard-DmgJQcyZ.js +1 -0
- package/dist/chunks/table-cell-text-2x6r_oHO.js +1 -0
- package/dist/chunks/{table-export-sheet-xaczzWZF.js → table-export-sheet-CWqKiQu4.js} +1 -1
- package/dist/chunks/{token-types-1vzMWjI-.js → token-types-BSyWn2pb.js} +1 -1
- package/dist/chunks/{validators-Dg2kyF4_.js → validators-BPGmPz8-.js} +1 -1
- package/dist/chunks/{variable-draft-CRbSYdB6.js → variable-draft-DGA22H2g.js} +1 -1
- package/dist/chunks/visual-contract-DQPKg5QW.js +143 -0
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +1 -1
- package/dist/extensions/index.js +1 -0
- package/dist/format-utils/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/components/assistant/assistant-store.d.ts +19 -0
- package/dist/types/components/assistant/use-assistant.d.ts +4 -0
- package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +2 -3
- package/dist/types/components/visual/data-table/table-cell-text.d.ts +93 -0
- package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -1
- package/dist/types/extensions.d.ts +2 -0
- package/dist/types/index.js +1 -1
- package/dist/types/lib/charts/types.d.ts +3 -1
- package/dist/types/lib/dashboard/semantic-dataset-references.d.ts +0 -2
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +12 -12
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +25 -25
- package/dist/types/lib/stores/dashboard-store.d.ts +33 -2
- package/dist/types/lib/stores/editor-store.d.ts +8 -0
- package/dist/types/lib/types/common-types.d.ts +3 -0
- package/dist/types/lib/utils/card-definition.d.ts +12 -12
- package/dist/types/lib/utils/card-type-change.d.ts +9 -0
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +6 -6
- package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +10 -10
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +248 -248
- package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +10 -10
- package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +8 -8
- package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +2 -2
- package/dist/types/shared/assistant-protocol/context.d.ts +26 -26
- package/dist/types/shared/assistant-protocol/parts.d.ts +4 -0
- package/dist/types/shared/assistant-protocol/request.d.ts +2 -1
- package/dist/types/shared/dashboard-authoring/card-data-source/card-base.d.ts +16 -6
- package/dist/types/shared/dashboard-authoring/card-settings/custom-visual-write.d.ts +44 -0
- package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +2 -2
- package/dist/types/shared/dashboard-authoring/changes/custom-visual-change.d.ts +57 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +61 -54
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +5 -1
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +5 -1
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +60 -60
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +4 -4
- package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +48 -48
- package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +8 -2
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +7 -0
- package/dist/types/shared/extensions/check-audits.d.ts +30 -0
- package/dist/types/shared/extensions/check-findings.d.ts +46 -0
- package/dist/types/shared/extensions/check-input.d.ts +23 -0
- package/dist/types/shared/extensions/check-renders.d.ts +44 -0
- package/dist/types/shared/extensions/check-runner.d.ts +19 -0
- package/dist/types/shared/extensions/index.d.ts +17 -0
- package/dist/types/shared/extensions/read-document.d.ts +18 -0
- package/dist/types/shared/extensions/sandbox-host.d.ts +63 -0
- package/dist/types/shared/extensions/saved-refs.d.ts +33 -0
- package/dist/types/shared/extensions/script-policy.d.ts +11 -0
- package/dist/types/shared/extensions/types.d.ts +186 -0
- package/dist/types/shared/extensions/visual-contract.d.ts +36 -0
- package/dist/types/shared/extensions/visual-payload.d.ts +75 -0
- package/dist/types/shared/extensions/visual-theme.d.ts +21 -0
- package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +13 -6
- package/dist/types/shared/format-utils/matrix-continuation.d.ts +2 -2
- package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +24 -24
- package/dist/types/shared/usage-events/details.d.ts +4 -4
- package/dist/types/shared/usage-events/envelope.d.ts +2 -2
- package/dist/usage-events/index.js +1 -1
- package/package.json +7 -2
- package/dist/chunks/add-to-dashboard-CEmZUf9o.js +0 -12
- package/dist/chunks/appearance-provider-fIhJSX6y.js +0 -613
- package/dist/chunks/appearance-runtime-provider-Bx8H-moR.js +0 -1
- package/dist/chunks/assistant-chat-SBKSrrEA.js +0 -51
- package/dist/chunks/attachment-filter-line-C_zHMhGh.js +0 -1
- package/dist/chunks/bookmark-state-DScd31KT.js +0 -1
- package/dist/chunks/context-CntvtZwC.js +0 -2
- package/dist/chunks/dashboard-temporal-snapshot-w3SMiPKj.js +0 -1
- package/dist/chunks/edit-dashboard-visual-DlvY7au4.js +0 -73
- package/dist/chunks/filter-reach-preview-DAEIyrEG.js +0 -1
- package/dist/chunks/filter-value-text-DqTHe_vu.js +0 -1
- package/dist/chunks/kpi-trend-rule-N1Xkwe_u.js +0 -1
- package/dist/chunks/matrix-analytical-definition-5T-2euHZ.js +0 -1
- package/dist/chunks/matrix-operation-contract-CWvcEsQ0.js +0 -1
- package/dist/chunks/pivot-result-contract-expectations-BNWhS8mv.js +0 -1
- package/dist/chunks/report-preferences-dialog-B2ZGPS9t.js +0 -1
- package/dist/chunks/resolve-dashboard-input-context-SlAAe4GF.js +0 -8
- package/dist/chunks/saved-dashboard-context-Bc2SVDr-.js +0 -1
- package/dist/chunks/semaphor-ready-indicator-Bj-cjkz-.js +0 -612
- package/dist/chunks/set-CACXVM2A.js +0 -1
- package/dist/chunks/slider-CWze9OEM.js +0 -4
- package/dist/chunks/stored-dashboard-CcNdU-mG.js +0 -1
|
@@ -95,29 +95,29 @@ export declare function buildMatrixPrintTable(input: {
|
|
|
95
95
|
presentation: {
|
|
96
96
|
totals: {
|
|
97
97
|
columns: {
|
|
98
|
-
grand: {
|
|
99
|
-
visible: boolean;
|
|
100
|
-
position: "before" | "after";
|
|
101
|
-
label?: string | undefined;
|
|
102
|
-
};
|
|
103
98
|
levels: Readonly<Record<string, {
|
|
104
|
-
visible: boolean;
|
|
105
99
|
position: "before" | "after";
|
|
100
|
+
visible: boolean;
|
|
106
101
|
label?: string | undefined;
|
|
107
102
|
}>>;
|
|
108
|
-
skipRedundant?: boolean | undefined;
|
|
109
|
-
};
|
|
110
|
-
rows: {
|
|
111
103
|
grand: {
|
|
112
|
-
visible: boolean;
|
|
113
104
|
position: "before" | "after";
|
|
105
|
+
visible: boolean;
|
|
114
106
|
label?: string | undefined;
|
|
115
107
|
};
|
|
108
|
+
skipRedundant?: boolean | undefined;
|
|
109
|
+
};
|
|
110
|
+
rows: {
|
|
116
111
|
levels: Readonly<Record<string, {
|
|
117
|
-
visible: boolean;
|
|
118
112
|
position: "before" | "after";
|
|
113
|
+
visible: boolean;
|
|
119
114
|
label?: string | undefined;
|
|
120
115
|
}>>;
|
|
116
|
+
grand: {
|
|
117
|
+
position: "before" | "after";
|
|
118
|
+
visible: boolean;
|
|
119
|
+
label?: string | undefined;
|
|
120
|
+
};
|
|
121
121
|
skipRedundant?: boolean | undefined;
|
|
122
122
|
};
|
|
123
123
|
};
|
|
@@ -209,8 +209,8 @@ export declare function buildMatrixPrintTable(input: {
|
|
|
209
209
|
}[];
|
|
210
210
|
};
|
|
211
211
|
levelId: string;
|
|
212
|
-
axis: "columns" | "rows";
|
|
213
212
|
direction: "asc" | "desc";
|
|
213
|
+
axis: "columns" | "rows";
|
|
214
214
|
nulls: "last" | "first";
|
|
215
215
|
}[];
|
|
216
216
|
rankings: readonly import('../analytics-protocol/index.js').MatrixRanking[];
|
|
@@ -270,29 +270,29 @@ export declare function buildMatrixPrintTable(input: {
|
|
|
270
270
|
presentation: {
|
|
271
271
|
totals: {
|
|
272
272
|
columns: {
|
|
273
|
-
grand: {
|
|
274
|
-
visible: boolean;
|
|
275
|
-
position: "before" | "after";
|
|
276
|
-
label?: string | undefined;
|
|
277
|
-
};
|
|
278
273
|
levels: Readonly<Record<string, {
|
|
279
|
-
visible: boolean;
|
|
280
274
|
position: "before" | "after";
|
|
275
|
+
visible: boolean;
|
|
281
276
|
label?: string | undefined;
|
|
282
277
|
}>>;
|
|
283
|
-
skipRedundant?: boolean | undefined;
|
|
284
|
-
};
|
|
285
|
-
rows: {
|
|
286
278
|
grand: {
|
|
287
|
-
visible: boolean;
|
|
288
279
|
position: "before" | "after";
|
|
280
|
+
visible: boolean;
|
|
289
281
|
label?: string | undefined;
|
|
290
282
|
};
|
|
283
|
+
skipRedundant?: boolean | undefined;
|
|
284
|
+
};
|
|
285
|
+
rows: {
|
|
291
286
|
levels: Readonly<Record<string, {
|
|
292
|
-
visible: boolean;
|
|
293
287
|
position: "before" | "after";
|
|
288
|
+
visible: boolean;
|
|
294
289
|
label?: string | undefined;
|
|
295
290
|
}>>;
|
|
291
|
+
grand: {
|
|
292
|
+
position: "before" | "after";
|
|
293
|
+
visible: boolean;
|
|
294
|
+
label?: string | undefined;
|
|
295
|
+
};
|
|
296
296
|
skipRedundant?: boolean | undefined;
|
|
297
297
|
};
|
|
298
298
|
};
|
|
@@ -384,8 +384,8 @@ export declare function buildMatrixPrintTable(input: {
|
|
|
384
384
|
}[];
|
|
385
385
|
};
|
|
386
386
|
levelId: string;
|
|
387
|
-
axis: "columns" | "rows";
|
|
388
387
|
direction: "asc" | "desc";
|
|
388
|
+
axis: "columns" | "rows";
|
|
389
389
|
nulls: "last" | "first";
|
|
390
390
|
}[];
|
|
391
391
|
rankings: readonly import('../analytics-protocol/index.js').MatrixRanking[];
|
|
@@ -84,14 +84,14 @@ export declare const dashboardOpenedDetailsSchema: z.ZodObject<{
|
|
|
84
84
|
dashboard_title?: string | undefined;
|
|
85
85
|
project_name?: string | undefined;
|
|
86
86
|
requested_version?: number | undefined;
|
|
87
|
-
served?: "
|
|
87
|
+
served?: "current" | "version" | undefined;
|
|
88
88
|
sheet_count?: number | undefined;
|
|
89
89
|
card_count?: number | undefined;
|
|
90
90
|
}, {
|
|
91
91
|
dashboard_title?: string | undefined;
|
|
92
92
|
project_name?: string | undefined;
|
|
93
93
|
requested_version?: number | undefined;
|
|
94
|
-
served?: "
|
|
94
|
+
served?: "current" | "version" | undefined;
|
|
95
95
|
sheet_count?: number | undefined;
|
|
96
96
|
card_count?: number | undefined;
|
|
97
97
|
}>;
|
|
@@ -271,7 +271,7 @@ export declare const exportCompletedDetailsSchema: z.ZodObject<{
|
|
|
271
271
|
}, "strict", z.ZodTypeAny, {
|
|
272
272
|
format: "csv" | "xlsx" | "pdf" | "png";
|
|
273
273
|
mechanism: "rendered" | "job" | "matrix_direct";
|
|
274
|
-
scope?: "
|
|
274
|
+
scope?: "card" | "dashboard" | "visual" | undefined;
|
|
275
275
|
rows?: number | undefined;
|
|
276
276
|
stage?: "create" | "acquire" | "deadline" | "render" | undefined;
|
|
277
277
|
chunks?: number | undefined;
|
|
@@ -280,7 +280,7 @@ export declare const exportCompletedDetailsSchema: z.ZodObject<{
|
|
|
280
280
|
}, {
|
|
281
281
|
format: "csv" | "xlsx" | "pdf" | "png";
|
|
282
282
|
mechanism: "rendered" | "job" | "matrix_direct";
|
|
283
|
-
scope?: "
|
|
283
|
+
scope?: "card" | "dashboard" | "visual" | undefined;
|
|
284
284
|
rows?: number | undefined;
|
|
285
285
|
stage?: "create" | "acquire" | "deadline" | "render" | undefined;
|
|
286
286
|
chunks?: number | undefined;
|
|
@@ -91,9 +91,9 @@ export declare const usageEventEnvelopeSchema: z.ZodObject<{
|
|
|
91
91
|
message: string;
|
|
92
92
|
} | null;
|
|
93
93
|
surface: "api" | "embed" | "console" | "mcp" | "public_link" | "scheduler" | "pdf_renderer";
|
|
94
|
+
category: "runtime" | "usage" | "delivery" | "agent";
|
|
94
95
|
card_id: string | null;
|
|
95
96
|
sheet_id: string | null;
|
|
96
|
-
category: "runtime" | "usage" | "delivery" | "agent";
|
|
97
97
|
connection_id: string | null;
|
|
98
98
|
outcome: "cancelled" | "failed" | "timed_out" | "succeeded" | null;
|
|
99
99
|
domain_id: string | null;
|
|
@@ -120,9 +120,9 @@ export declare const usageEventEnvelopeSchema: z.ZodObject<{
|
|
|
120
120
|
message: string;
|
|
121
121
|
} | null;
|
|
122
122
|
surface: "api" | "embed" | "console" | "mcp" | "public_link" | "scheduler" | "pdf_renderer";
|
|
123
|
+
category: "runtime" | "usage" | "delivery" | "agent";
|
|
123
124
|
card_id: string | null;
|
|
124
125
|
sheet_id: string | null;
|
|
125
|
-
category: "runtime" | "usage" | "delivery" | "agent";
|
|
126
126
|
connection_id: string | null;
|
|
127
127
|
outcome: "cancelled" | "failed" | "timed_out" | "succeeded" | null;
|
|
128
128
|
domain_id: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as e}from"zod";import{g as h,l as S}from"../chunks/context-
|
|
1
|
+
import{z as e}from"zod";import{g as h,l as S}from"../chunks/context-Cwj8Axgd.js";import{Q as b,a as y,b as x}from"../chunks/attribution-BEFSsbNn.js";import{U as te,c as ne,u as ae}from"../chunks/attribution-BEFSsbNn.js";const r=e.string().min(1).max(128),t=e.string().max(500),m=e.array(e.string().max(500)).max(500),n=e.number().int().nonnegative(),p=e.string().refine(o=>new TextEncoder().encode(o).length<=16*1024),f=e.object({token_type:e.enum(["dashboard","project"]),token_purpose:e.enum(["embed","console"]).optional(),ttl_s:e.number().int().nonnegative().optional(),embed_origin:e.string().max(2048).optional(),initial_dashboard_id:r.optional(),dashboard_title:t.optional(),project_name:t.optional(),user_verified:e.boolean(),user_email:t.optional(),user_display_name:t.optional(),tenant_name:t.optional(),role:e.string().max(128).optional(),user_provisioned:e.boolean().optional(),domain_access_mode:e.enum(["all","none","include","exclude"]).optional(),domain_ids:e.array(r).max(500).optional(),rls_policy_names:m.optional(),cls_policy_names:m.optional(),has_sls:e.boolean().optional(),security_param_keys:m.optional(),timezone:e.string().max(128).optional(),mcp_scopes:e.array(e.string().max(128)).max(64).optional(),mcp_sql:e.boolean().optional(),mcp_live:e.boolean().optional()}).strict(),E=e.object({requested_version:e.number().int().optional(),served:e.enum(["current","version"]).optional(),dashboard_title:t.optional(),project_name:t.optional(),sheet_count:n.optional(),card_count:n.optional()}).strict(),T=e.object({statement:e.enum(b),duration_ms:e.number().nonnegative(),outcome:e.enum(["succeeded","failed","cancelled"]),rows:n.optional()}).strict(),v=e.object({data_service_calls:n,query_run_id:r,parent_query_run_id:r.optional(),query_kind:e.enum(x).optional(),statements:e.array(T).max(64),trigger:e.enum(y).optional(),card_title:t.optional(),card_type:e.string().max(128).optional(),dashboard_title:t.optional(),sheet_title:t.optional(),project_name:t.optional(),connection_name:t.optional(),connection_type:e.string().max(128).optional(),dialect:e.string().max(128).optional(),dataset:t.optional(),rows:n.optional(),row_limit_exceeded:e.boolean().optional(),sql_text:p.optional(),sql_truncated:e.boolean().optional(),sql_hash:e.string().regex(/^[0-9a-f]{64}$/).optional(),input_ids_applied:e.array(r).max(500).optional(),page:e.number().int().positive().optional(),export_job_id:r.optional()}).strict(),A=["assistant","mcp"],q=e.object({tool:e.string().min(1).max(128),args_json:p.optional(),args_truncated:e.boolean().optional(),arg_keys:e.array(e.string().max(128)).max(200),user_agent:e.string().max(1024).optional(),oauth_client:t.optional(),credential:e.string().max(64).optional(),access_mode:e.string().max(64).optional(),scopes:e.array(e.string().max(128)).max(64).optional(),response_bytes:n.optional(),origin:e.enum(A)}).strict(),U=["job","matrix_direct","rendered"],R=["csv","xlsx","pdf","png"],O=["visual","card","dashboard"],k=["create","acquire","deadline","render"],I=e.object({export_id:r.optional(),mechanism:e.enum(U),format:e.enum(R),scope:e.enum(O).optional(),rows:n.optional(),bytes:n.optional(),chunks:n.optional(),stage:e.enum(k).optional()}).strict(),N=["export","briefing","cache_refresh"],j=["scheduled","manual","api"],D=e.object({run_id:r,rule_id:r,rule_name:t.optional(),kind:e.enum(N),trigger_source:e.enum(j).optional(),attempt:n.optional(),scheduled_for:e.string().datetime({offset:!0}).optional()}).strict(),G=["completed","refused","stopped","failed"],C=e.object({turn_id:r.optional(),conversation_id:r.optional(),question_text:p.optional(),question_truncated:e.boolean().optional(),turn_outcome:e.enum(G),refusal:e.enum(S).optional(),context_surface:e.enum(h),model:e.string().min(1).max(128),instructions_version:e.string().min(1).max(128),input_tokens:n,cached_input_tokens:n,output_tokens:n,tools:e.array(e.string().min(1).max(128)).max(500),tool_call_count:n,tool_error_count:n,asked_user:e.boolean().optional(),finish_reason:e.string().max(64).optional()}).strict(),B=["token_issued","dashboard_opened","query_executed","tool_called","export_completed","automation_run_completed","assistant_turn_completed"],M=["usage","runtime","agent","delivery"],P=["org_user","tenant_user","tenant","api_key","system","anonymous"],w=["console","embed","public_link","mcp","api","scheduler","pdf_renderer"],L=["succeeded","failed","cancelled","timed_out"],X=["app","scheduler"],Y={token_issued:{category:"usage",version:1,emittedBy:"semaphor-app/src/lib/usage-events/token-issued.ts",personalData:!0,detailsSchema:f},dashboard_opened:{category:"usage",version:1,emittedBy:"semaphor-app/src/lib/usage-events/dashboard-opened.ts",personalData:!1,detailsSchema:E},query_executed:{category:"runtime",version:1,emittedBy:"semaphor-app/src/app/api/v1/query/query-run.ts",personalData:!0,detailsSchema:v},tool_called:{category:"agent",version:1,emittedBy:"semaphor-app/src/lib/mcp/tool-telemetry.ts",personalData:!0,detailsSchema:q},export_completed:{category:"delivery",version:1,emittedBy:"semaphor-app/src/lib/usage-events/export-completed.ts",personalData:!1,detailsSchema:I},automation_run_completed:{category:"delivery",version:1,emittedBy:"semaphor-app/src/lib/usage-events/automation-run-completed.ts",personalData:!0,detailsSchema:D},assistant_turn_completed:{category:"agent",version:1,emittedBy:"semaphor-app/src/lib/usage-events/assistant-turn-completed.ts",personalData:!0,detailsSchema:C}},$=16*1024,F=/^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,V=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?Z$/,Q=e.string().min(1).max(128),i=Q.nullable(),H=e.object({event_id:e.string().regex(F),event_type:e.enum(B),event_version:e.number().int().positive(),category:e.enum(M),occurred_at:e.string().regex(V),producer:e.enum(X),release:e.string().min(1).max(64),org_id:i,project_id:i,tenant_id:i,actor_type:e.enum(P),org_user_id:i,tenant_user_id:i,surface:e.enum(w),session_id:i,operation_id:i,dashboard_id:i,sheet_id:i,card_id:i,connection_id:i,domain_id:i,outcome:e.enum(L).nullable(),duration_ms:e.number().nonnegative().nullable(),error:e.object({code:e.string().min(1).max(128),message:e.string().refine(o=>new TextEncoder().encode(o).length<=$)}).strict().nullable(),details:e.unknown()}).strict();function W(o){const s=H.safeParse(o);if(!s.success)return{ok:!1,issues:g(s.error.issues)};const a=s.data,d=a.event_type,u=Y[d],l=[];a.event_version!==u.version&&l.push("event_version: not the catalog version"),a.category!==u.category&&l.push("category: not the catalog category");const _=a.outcome==="failed"||a.outcome==="timed_out";_&&a.error===null&&l.push("error: required when the outcome is failed or timed_out"),!_&&a.error!==null&&l.push("error: set only when the outcome is failed or timed_out"),l.push(...z[d](a));const c=u.detailsSchema.safeParse(a.details);return c.success||l.push(...g(c.error.issues,"details")),l.length>0?{ok:!1,issues:l}:{ok:!0,event:{...a,details:c.success?c.data:a.details}};}const z={token_issued:o=>{const s=[];return["org_user","tenant_user","tenant","anonymous"].includes(o.actor_type)||s.push("actor_type: not a token_issued actor"),["embed","console","mcp"].includes(o.surface)||s.push("surface: not a token_issued surface"),o.outcome===null&&s.push("outcome: required"),o.outcome==="succeeded"&&(o.session_id===null&&s.push("session_id: required on success"),o.project_id===null&&s.push("project_id: required on success")),s;},dashboard_opened:o=>[...(o.outcome===null?["outcome: required"]:[]),...(o.duration_ms===null?["duration_ms: required"]:[]),...(o.dashboard_id===null?["dashboard_id: required"]:[])],query_executed:o=>[...(o.outcome===null?["outcome: required"]:[]),...(o.duration_ms===null?["duration_ms: required"]:[])],tool_called:o=>[...(o.outcome===null?["outcome: required"]:[]),...(o.duration_ms===null?["duration_ms: required"]:[]),...(o.operation_id===null?["operation_id: required"]:[])],export_completed:o=>[...(o.outcome===null?["outcome: required"]:[]),...(o.duration_ms===null?["duration_ms: required"]:[])],automation_run_completed:o=>[...(o.outcome===null?["outcome: required"]:[]),...(o.duration_ms===null?["duration_ms: required"]:[])],assistant_turn_completed:o=>[...(o.outcome===null?["outcome: required"]:[]),...(o.duration_ms===null?["duration_ms: required"]:[]),...(o.operation_id===null?["operation_id: required"]:[])]};function g(o,s){return o.map(a=>`${[s,...a.path].filter(u=>u!==void 0).join(".")||"(root)"}: ${a.code}`);}export{G as ASSISTANT_TURN_ENDINGS,N as AUTOMATION_RUN_KINDS,j as AUTOMATION_TRIGGER_SOURCES,R as EXPORT_FORMATS,U as EXPORT_MECHANISMS,O as EXPORT_SCOPES,k as EXPORT_STAGES,x as QUERY_KINDS,b as QUERY_STATEMENTS,y as QUERY_TRIGGERS,A as TOOL_CALL_ORIGINS,P as USAGE_ACTOR_TYPES,te as USAGE_ATTRIBUTION_ID_MAX_LENGTH,ne as USAGE_ATTRIBUTION_TITLE_MAX_LENGTH,Y as USAGE_EVENT_CATALOG,M as USAGE_EVENT_CATEGORIES,$ as USAGE_EVENT_TEXT_MAX_BYTES,B as USAGE_EVENT_TYPES,L as USAGE_OUTCOMES,X as USAGE_PRODUCERS,w as USAGE_SURFACES,C as assistantTurnCompletedDetailsSchema,D as automationRunCompletedDetailsSchema,E as dashboardOpenedDetailsSchema,I as exportCompletedDetailsSchema,W as parseUsageEvent,v as queryExecutedDetailsSchema,T as queryStatementRecordSchema,f as tokenIssuedDetailsSchema,q as toolCalledDetailsSchema,ae as usageAttributionFieldsSchema,H as usageEventEnvelopeSchema};
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"email": "support@semaphor.cloud"
|
|
6
6
|
},
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"version": "0.1.
|
|
8
|
+
"version": "0.1.607",
|
|
9
9
|
"description": "Fully interactive and customizable dashboards for your apps.",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"react",
|
|
@@ -86,6 +86,10 @@
|
|
|
86
86
|
"types": "./dist/types/live-channel.d.ts",
|
|
87
87
|
"import": "./dist/live-channel/index.js"
|
|
88
88
|
},
|
|
89
|
+
"./extensions": {
|
|
90
|
+
"types": "./dist/types/extensions.d.ts",
|
|
91
|
+
"import": "./dist/extensions/index.js"
|
|
92
|
+
},
|
|
89
93
|
"./briefings": {
|
|
90
94
|
"types": "./dist/types/briefings.d.ts",
|
|
91
95
|
"import": "./dist/briefings/index.js"
|
|
@@ -115,9 +119,10 @@
|
|
|
115
119
|
"scripts": {
|
|
116
120
|
"dev": "vite",
|
|
117
121
|
"build": "node scripts/build.mjs",
|
|
122
|
+
"build:frame-formatter": "node scripts/build-frame-formatter.mjs",
|
|
118
123
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
119
124
|
"lint:regressions": "node scripts/lint-regressions.mjs",
|
|
120
|
-
"check:guards": "node scripts/card-config-consumers.mjs && node scripts/components-entry-imports.mjs && node scripts/types-entry-imports.mjs && node scripts/card-query-assembly-imports.mjs && node scripts/matrix-conversion-imports.mjs && node scripts/legacy-table-type-references.mjs && node scripts/assistant-chat-imports.mjs && node scripts/filter-model-reads.mjs && node scripts/kpi-figure-reads.mjs && node scripts/layout-engine.mjs && node scripts/text-variable-refs.mjs && node scripts/data-variable-derivation.mjs && node scripts/variable-name-allocation.mjs && node scripts/unreached-modules.mjs && node scripts/dashboard-style-reads.mjs && node scripts/host-color-variables.mjs && node scripts/table-surface-literals.mjs && node scripts/comparison-words.mjs",
|
|
125
|
+
"check:guards": "node scripts/card-config-consumers.mjs && node scripts/components-entry-imports.mjs && node scripts/types-entry-imports.mjs && node scripts/card-query-assembly-imports.mjs && node scripts/matrix-conversion-imports.mjs && node scripts/legacy-table-type-references.mjs && node scripts/assistant-chat-imports.mjs && node scripts/filter-model-reads.mjs && node scripts/kpi-figure-reads.mjs && node scripts/layout-engine.mjs && node scripts/text-variable-refs.mjs && node scripts/data-variable-derivation.mjs && node scripts/variable-name-allocation.mjs && node scripts/unreached-modules.mjs && node scripts/dashboard-style-reads.mjs && node scripts/host-color-variables.mjs && node scripts/table-surface-literals.mjs && node scripts/comparison-words.mjs && node scripts/editor-control-sizes.mjs",
|
|
121
126
|
"preview": "vite preview",
|
|
122
127
|
"test": "vitest run",
|
|
123
128
|
"test:changed": "vitest run --changed",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{A as c,i as y,o as h}from"./context-CntvtZwC.js";function f(e,t){return e.role===t.role&&e.name===t.name&&e.aggregate===t.aggregate&&e.granularity===t.granularity;}function S(e){var n,s;const t=(n=e.selectedCard)==null?void 0:n.description;return(t==null?void 0:t.status)!=="described"||t.sql||((s=e.editing)==null?void 0:s.mode)==="sql"?[]:t.fields;}function M(e,t){if(t.length===0)return[];if(t.length>c.taggedFields)return[`taggedFields: at most ${c.taggedFields}`];const n=S(e);return t.flatMap((s,a)=>n.some(o=>f(o,s))?t.slice(0,a).some(o=>f(o,s))?[`taggedFields.${a}: tagged twice`]:[]:[`taggedFields.${a}: not a field of the card the context asks about`]);}function q(e,t){return t!=null&&t.length?`Fields of the asked-about card the user tagged in this question: ${t.map(y).join("; ")}.
|
|
2
|
-
|
|
3
|
-
${e}`:e;}function C(e){if(e.kind==="text")return{type:"text",text:e.text};const{kind:t,...n}=e;return{type:`data-${t}`,...(e.kind==="stage"?{id:e.stageId}:{}),data:n};}function U(e,t){return e.kind!=="text"?[C(e)]:[{type:"text-start",id:t},{type:"text-delta",id:t,delta:e.text},{type:"text-end",id:t}];}function T(e){if(e==="failed"||e==="interrupted")return{kind:"refusal",code:"model_unavailable",message:h.model_unavailable};if(e==="running")return{kind:"refusal",code:"turn_in_progress",message:h.turn_in_progress};}function $(e,t){let n=-1;e.forEach((a,o)=>{t(a)==="text"&&(n=o);});let s=-1;return e.forEach((a,o)=>{o<n&&t(a)==="step"&&(s=o);}),new Set(e.filter((a,o)=>o<s&&t(a)==="text"));}const p={conversation:"nowhere",text:"body",stage:"details",using:"details",clarify:"body",artifact:"body",refusal:"body",trace:"details",proposal:"body",proposal_operations:"nowhere",proposal_refused:"body",model_change:"body"};function P(e){return Object.hasOwn(p,e)&&p[e]==="body";}function b(e){return e.kind==="text"?v(e.text):e.kind==="stage"&&!e.change?"step":"other";}function v(e){return e.trim().length>0?"text":"other";}function V(e){const t=$(e,b);return e.flatMap(n=>n.kind==="text"&&!t.has(n)?[n.text]:[]).filter(n=>n.trim().length>0).join(`
|
|
4
|
-
|
|
5
|
-
`);}const B=5;function K(e){if(!Array.isArray(e))return;const t=e.filter(n=>!!n&&typeof n=="object"&&typeof n.what=="string"&&typeof n.now=="string");return t.length>0?t.map(({what:n,now:s})=>({what:n,now:s})):void 0;}const k={proposal_not_found:"This suggestion has expired. Ask for a new one.",proposal_stale:"The data model changed while these were being added. Nothing was added; ask for a new suggestion.",not_permitted:"You don’t have permission to change the data model.",apply_in_progress:"They’re still being added.",apply_outcome_unknown:"It isn’t clear whether they were added. Check the data model before asking again."},A="They couldn’t be added.",N={...k,proposal_stale:"Someone changed these in the data model since they were suggested. Nothing was saved; ask for a new suggestion.",apply_in_progress:"They’re still being saved.",apply_outcome_unknown:"It isn’t clear whether they were saved. Check the data model before asking again."},E="They couldn’t be saved.",g={exists:()=>"it’s already in the model",missing_fields:e=>`a dataset or field it uses is no longer in ${e}`,type_mismatch:()=>"its fields’ types don’t match",not_supported:()=>"the data doesn’t support it"};function x(e,t){switch(e==null?void 0:e.status){case"added":return"added";case"existing":return"already in the model";case"left_out":return"left out";case"refused":return`not added: ${O(e.reasons,t)}`;default:return"outcome unknown";}}function O(e,t){const n=e.find(s=>Object.hasOwn(g,s));return n?g[n](t):"it no longer fits the model";}function m(e){return e==="apply_outcome_unknown";}function w(e,t){const n=t==="edits"?N:k;return typeof e=="string"&&Object.hasOwn(n,e)?n[e]:t==="edits"?E:A;}const z={conversationId:"with tool calls",addedSources:"left out",allows:"left out",turns:"shown"},J={turnId:"left out",startedAt:"shown",message:"shown",taggedFields:"shown",parts:"shown",outcome:"shown",toolCalls:"with tool calls",model:"with tool calls",instructionsVersion:"with tool calls"};function W(e,t){var o;const n=(o=e.turns[0])==null?void 0:o.startedAt,s=[`${t.assistantName} conversation${n?` · ${n.slice(0,16).replace("T"," ")} UTC`:""}`,...(t.toolCalls?[`Conversation ${e.conversationId}`]:[])],a=e.turns.map(r=>{const d=[`You: ${I(r)}`,"",`${t.assistantName}:`],i=T(r.outcome),l=[...r.parts,...(i?[i]:[])];return d.push(...L(l)),t.toolCalls&&r.toolCalls&&d.push(...F(r.toolCalls,r.model,r.instructionsVersion)),d.join(`
|
|
6
|
-
`);});return[s.join(`
|
|
7
|
-
`),...a].join(`
|
|
8
|
-
|
|
9
|
-
`)+`
|
|
10
|
-
`;}function I(e){return[...(e.taggedFields??[]).map(n=>`@${n.label}`),e.message].join(" ");}function L(e){const t=$(e,b),n=/* @__PURE__ */new Set(),s=[];for(const a of e)switch(a.kind){case"text":!t.has(a)&&a.text.trim()&&s.push(a.text.trim());break;case"proposal":s.push("Dashboard changes",...a.changes.filter(o=>o.sentence).map(o=>`+ ${o.sentence}`));break;case"proposal_refused":s.push("Not added",`! ${a.message}`);break;case"model_change":s.push(...R(a));break;case"clarify":s.push(a.multiple?`${a.question} (pick any)`:a.question,...a.options.map((o,r)=>` ${r+1}. ${o.label}`));break;case"artifact":s.push(`[Result: ${a.artifact.title}]`);break;case"refusal":s.push(a.message);break;case"stage":n.add(a.stageId);break;case"using":case"trace":case"conversation":case"proposal_operations":break;default:return a;}return n.size&&s.push(`(${n.size} ${n.size===1?"step":"steps"})`),s;}function F(e,t,n){const s=["","Tool calls:"];return(t||n)&&s.push(` model ${t??"unknown"}${n?` · instructions ${n}`:""}`),e.length||s.push(" none"),e.forEach((a,o)=>{var u;const r=a.durationMs===void 0?"":` · ${a.durationMs} ms`,d=a.rowCount===void 0?"":` · ${a.rowCount} ${a.rowCount===1?"row":"rows"}`,i=a.ok||(u=a.error)==null?void 0:u.trim(),l=i&&!i.includes(`
|
|
11
|
-
`)?`: ${i}`:"";s.push(` ${o+1}. ${D(a.tool)}${r}${d} · ${a.ok?"ok":`failed${l}`}`),i&&!l&&s.push(" error:",..._(i)),i&&!l&&s.push(" input:"),s.push(..._(JSON.stringify(a.input??{},null,2)));}),s;}function _(e){return e.split(`
|
|
12
|
-
`).map(t=>` ${t}`);}function D(e){return e.replace(/^semaphor_/,"");}function R(e){const t=e.changes.map(s=>s.sentence??s.op),n=e.outcome;if(e.changeKind==="edits"){const s=n?n.status==="applied"?"saved":n.status==="dismissed"?"not saved: Not now":`${m(n.code)?"unclear whether saved":"not saved"}: ${w(n.code,"edits")}`:"proposed",a=(n==null?void 0:n.status)==="refused"?(n.changed??[]).map(o=>` Changed since: ${o.what} is now ${o.now}`):[];return[`Data model change (${s})`,...t.map(o=>`+ ${o}`),...a];}return n?n.status==="dismissed"?["Data model change (not added: Not now)",...t.map(s=>`+ ${s}`)]:n.status==="refused"?[`Data model change (${m(n.code)?"unclear whether added":"not added"}: ${w(n.code)})`,...t.map(a=>`+ ${a}`)]:["Data model change",...t.map((s,a)=>`+ ${s} (${x(n.links[a],e.domainLabel)})`)]:["Data model change (proposed)",...t.map(s=>`+ ${s}`)];}function Y(e){if(e.kind==="semantic")return JSON.stringify(["semantic",e.domainId,e.datasetName]);if(e.kind==="sql")return JSON.stringify(["sql",e.connectionId]);}function G(e){return e.label??(e.kind==="semantic"?e.datasetName:e.kind==="physical"?e.tableName:"SQL");}function H(e){return{columns:e.columns,records:e.records,rowCount:e.rowCount,governed:e.status.governed,complete:e.status.complete,truncated:e.status.truncated};}const Q={number:"kpi",line:"line",bar:"bar",stackedBar:"stackedBar",table:"table"};export{p as A,z as C,B as M,S as a,C as b,U as c,T as d,J as e,W as f,D as g,P as h,b as i,v as j,V as k,Y as l,G as m,Q as n,K as o,x as p,q,O as r,f as s,M as t,m as u,H as v,$ as w,w as x};
|