react-semaphor 0.1.578 → 0.1.580
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/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +75 -70
- package/dist/briefings/index.js +1 -1
- package/dist/chunks/add-to-dashboard-DhP8wVtM.js +291 -0
- package/dist/chunks/{assistant-chat-B_tmsxEK.js → assistant-chat-CUwGURJj.js} +2261 -2184
- package/dist/chunks/{bookmark-impact-DUWw3wlA.js → bookmark-impact-BNyR-yDX.js} +1 -1
- package/dist/chunks/{card-filter-builder-CwnMUZU2.js → card-filter-builder-k9yqDSw8.js} +168 -180
- package/dist/chunks/{comparison-window-caption-PtcDWvkN.js → comparison-window-caption-DdLqMgiG.js} +180 -183
- package/dist/chunks/{context-R31TSL5V.js → context-BTLBjQNh.js} +99 -83
- package/dist/chunks/{dashboard-BcIIBCTP.js → dashboard-DvcAk8uJ.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BBpECqg2.js → dashboard-briefing-launcher-DBgS97ZH.js} +155 -155
- package/dist/chunks/{dashboard-controls-CONzvjmO.js → dashboard-controls-BiZ1rlNC.js} +7 -7
- package/dist/chunks/{dashboard-json-BF2chEVd.js → dashboard-json-B25xzYcJ.js} +1 -1
- package/dist/chunks/{dates-DlYMDaF2.js → dates-3Pah03_l.js} +5 -5
- package/dist/chunks/{edit-dashboard-visual-Bf-RcbuD.js → edit-dashboard-visual-DYuO3mEU.js} +9 -10
- package/dist/chunks/{filter-reach-copy-BTAXnbwQ.js → filter-reach-copy-CzLt96tq.js} +125 -125
- package/dist/chunks/{index-8BxDk8EP.js → index-BMZq6JT6.js} +2 -2
- package/dist/chunks/{report-preferences-dialog-RN4g9PEN.js → report-preferences-dialog-DpAetrdY.js} +7 -7
- package/dist/chunks/{resolve-dashboard-input-context-DBFuNhZo.js → resolve-dashboard-input-context-CNxtkCzj.js} +6266 -6191
- package/dist/chunks/{saved-dashboard-context-AChHk4tw.js → saved-dashboard-context-Bnt0H7mi.js} +3 -3
- package/dist/chunks/{semaphor-ready-indicator-DtivanBy.js → semaphor-ready-indicator-Dwmvmf0S.js} +15010 -14990
- package/dist/chunks/{shelf-drop-preview-context-BTjYxbHC.js → shelf-drop-preview-context-CiveteBS.js} +2 -2
- package/dist/chunks/{stored-dashboard-rpLzf4mk.js → stored-dashboard-D3gu-D7A.js} +67 -67
- package/dist/chunks/{table-export-sheet-CP8zSOhj.js → table-export-sheet-BNGSJA2N.js} +1 -1
- package/dist/chunks/{variable-draft-DPSMDwqt.js → variable-draft-C3_RL2gI.js} +2 -2
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +357 -350
- package/dist/format-utils/index.js +4 -4
- package/dist/index.js +12 -12
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/shared/assistant-protocol/answer-text.d.ts +5 -1
- package/dist/types/shared/assistant-protocol/context.d.ts +2 -1
- package/dist/types/shared/assistant-protocol/model-change.d.ts +23 -3
- package/dist/types/shared/assistant-protocol/parts.d.ts +12 -2
- package/dist/types/shared/dashboard-authoring/changes/aggregates.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +9 -58
- package/dist/types/shared/dashboard-authoring/changes/domain-change.d.ts +1738 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/usage-events/catalog.d.ts +5 -3
- package/dist/types/shared/usage-events/details.d.ts +66 -0
- package/dist/types/shared/usage-events/envelope.d.ts +5 -5
- package/dist/usage-events/index.js +154 -115
- package/package.json +1 -1
- package/dist/chunks/add-to-dashboard-B6Ah8Lub.js +0 -267
package/dist/surfboard/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a, R as s, D as o } from "../chunks/report-preferences-dialog-
|
|
1
|
+
import { a, R as s, D as o } from "../chunks/report-preferences-dialog-DpAetrdY.js";
|
|
2
2
|
import { C as f, E as D } from "../chunks/bookmark-state-BEl_G9vr.js";
|
|
3
3
|
export {
|
|
4
4
|
f as CONTROL_CARD_DEFAULT_VALUE,
|
|
@@ -9,7 +9,9 @@ import { AssistantPart } from './parts.js';
|
|
|
9
9
|
* anything comes out empty. A step is a stage that reads data (a query, a
|
|
10
10
|
* lookup); a change to the dashboard, showing a result or asking the person a
|
|
11
11
|
* question is not one, so an answer written before its change stays the
|
|
12
|
-
* answer (P7-45).
|
|
12
|
+
* answer (P7-45). Blank text (a line break a model streams between tool calls)
|
|
13
|
+
* is not text here, so it never turns the answer before it into a note. One
|
|
14
|
+
* rule for the transcript, the turn record and the eval.
|
|
13
15
|
*/
|
|
14
16
|
export type AnswerPartKind = 'text' | 'step' | 'other';
|
|
15
17
|
/** The parts that are working notes: text before the last step that comes before the answer's last text. */
|
|
@@ -39,5 +41,7 @@ export declare const ANSWER_PART_PLACEMENT: {
|
|
|
39
41
|
export declare function showsInAnswerBody(kind: string): boolean;
|
|
40
42
|
/** A stored part's kind for `workingNotesOf`. */
|
|
41
43
|
export declare function storedPartKind(part: AssistantPart): AnswerPartKind;
|
|
44
|
+
/** A text part's kind: blank text is not text, so it never makes the words before it a note. */
|
|
45
|
+
export declare function textPartKind(text: string): AnswerPartKind;
|
|
42
46
|
/** A stored answer's text: its text parts after the last step, a paragraph each. */
|
|
43
47
|
export declare function answerTextOf(parts: readonly AssistantPart[]): string;
|
|
@@ -8,7 +8,8 @@ import { SemaphorSourceRef } from '../analytics-protocol/contracts.js';
|
|
|
8
8
|
* draft being edited, saved or not (Phase 5, D5-2).
|
|
9
9
|
*/
|
|
10
10
|
export declare const ASSISTANT_CONTEXT_VERSION: 1;
|
|
11
|
-
export
|
|
11
|
+
export declare const ASSISTANT_SURFACES: readonly ["dashboard", "editor", "none"];
|
|
12
|
+
export type AssistantSurface = (typeof ASSISTANT_SURFACES)[number];
|
|
12
13
|
/** What the user is looking at. Built from live state in the browser, or from a saved dashboard in the regression set. */
|
|
13
14
|
export type AssistantContext = {
|
|
14
15
|
version: typeof ASSISTANT_CONTEXT_VERSION;
|
|
@@ -48,11 +48,28 @@ export type AssistantModelChangeApplied = {
|
|
|
48
48
|
replayed: boolean;
|
|
49
49
|
links: AssistantModelChangeLinkOutcome[];
|
|
50
50
|
};
|
|
51
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* A value a domain's own change would have replaced that someone changed since the suggestion
|
|
53
|
+
* (semantic model editing SE-D8, RV-01): what it is and what it is now, in the readback's words
|
|
54
|
+
* (labels and values the author typed, never a store message), so the person sees which part.
|
|
55
|
+
*/
|
|
56
|
+
export type AssistantModelChangeStaleValue = {
|
|
57
|
+
what: string;
|
|
58
|
+
now: string;
|
|
59
|
+
};
|
|
60
|
+
/** The most stale values a block shows; the rest are counted. */
|
|
61
|
+
export declare const MODEL_CHANGE_STALE_VALUES_SHOWN = 5;
|
|
62
|
+
/**
|
|
63
|
+
* The route's refusal body: a change store code and the store's message (for logs, not for the
|
|
64
|
+
* person), and for a stale domain change the values changed since (RV-01).
|
|
65
|
+
*/
|
|
52
66
|
export type AssistantModelChangeRefusal = {
|
|
53
67
|
code: string;
|
|
54
68
|
message: string;
|
|
69
|
+
changed?: AssistantModelChangeStaleValue[];
|
|
55
70
|
};
|
|
71
|
+
/** A refusal body's stale values, kept only when each is a pair of strings. */
|
|
72
|
+
export declare function staleValuesOf(value: unknown): AssistantModelChangeStaleValue[] | undefined;
|
|
56
73
|
/**
|
|
57
74
|
* One link's outcome in words, for the next turn's note and the copied
|
|
58
75
|
* conversation alike (RC-INV-4: the two say the same; review CO-08).
|
|
@@ -66,5 +83,8 @@ export declare function modelChangeLinkRefusal(reasons: readonly AssistantModelC
|
|
|
66
83
|
* model. The note and the copy say so instead of "not added" (RC-INV-4).
|
|
67
84
|
*/
|
|
68
85
|
export declare function modelChangeOutcomeUnclear(code: string): boolean;
|
|
69
|
-
/**
|
|
70
|
-
|
|
86
|
+
/**
|
|
87
|
+
* The panel's words for a refusal code; any other code (a validation failure, a server error) is
|
|
88
|
+
* "couldn't be added", or "couldn't be saved" for a domain's own changes (`edits`).
|
|
89
|
+
*/
|
|
90
|
+
export declare function modelChangeRefusalMessage(code: unknown, changeKind?: 'edits'): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssistantModelChangeLinkOutcome } from './model-change.js';
|
|
1
|
+
import { AssistantModelChangeLinkOutcome, AssistantModelChangeStaleValue } from './model-change.js';
|
|
2
2
|
import { SemaphorDialect, SemaphorSourceRef } from '../analytics-protocol/contracts.js';
|
|
3
3
|
import { AssistantArtifact } from './artifact.js';
|
|
4
4
|
import { ChangeDiagnostic } from '../dashboard-authoring/changes/diagnostics.js';
|
|
@@ -116,6 +116,14 @@ export type AssistantModelChangePart = {
|
|
|
116
116
|
*/
|
|
117
117
|
outcome?: AssistantModelChangeOutcome;
|
|
118
118
|
warnings: ChangeDiagnostic[];
|
|
119
|
+
/**
|
|
120
|
+
* What the block holds: relationships to add (absent, as on every part
|
|
121
|
+
* stored before), or a domain's own changes (`edits`: labels, descriptions,
|
|
122
|
+
* Context, settings, definitions), saved together with one Save, no ticks
|
|
123
|
+
* and no per-row outcome (semantic model editing Phase 4, SE-D6). An applied
|
|
124
|
+
* `edits` outcome has no links.
|
|
125
|
+
*/
|
|
126
|
+
changeKind?: 'edits';
|
|
119
127
|
};
|
|
120
128
|
/**
|
|
121
129
|
* Added (each link's outcome, in order), Not now, or a click the route
|
|
@@ -131,6 +139,7 @@ export type AssistantModelChangeOutcome = {
|
|
|
131
139
|
} | {
|
|
132
140
|
status: 'refused';
|
|
133
141
|
code: string;
|
|
142
|
+
changed?: AssistantModelChangeStaleValue[];
|
|
134
143
|
};
|
|
135
144
|
/** One relationship of a model change, as its row names it (RC-D6). */
|
|
136
145
|
export type AssistantModelChangeLink = {
|
|
@@ -258,7 +267,8 @@ export type AssistantUsingItem = {
|
|
|
258
267
|
from: string;
|
|
259
268
|
to: string;
|
|
260
269
|
};
|
|
261
|
-
export
|
|
270
|
+
export declare const ASSISTANT_REFUSAL_CODES: readonly ["assistant_unavailable", "context_invalid", "context_too_large", "conversation_not_found", "conversation_full", "turn_in_progress", "daily_limit_reached", "budget_exhausted", "not_permitted", "no_data_found", "model_unavailable"];
|
|
271
|
+
export type AssistantRefusalCode = (typeof ASSISTANT_REFUSAL_CODES)[number];
|
|
262
272
|
/**
|
|
263
273
|
* The data parts of the AI SDK UI message stream, by name: `data-${kind}`
|
|
264
274
|
* with the part (minus `kind`) as its data. Text is the SDK's own part. For
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { AGGREGATES } from './aggregates.js';
|
|
2
3
|
import { fieldRefSchema } from './field-ref.js';
|
|
3
4
|
import { TextRun } from '../text-card-words/blocks.js';
|
|
5
|
+
import { DomainChange } from './domain-change.js';
|
|
4
6
|
export { fieldRefSchema };
|
|
5
|
-
export
|
|
7
|
+
export { AGGREGATES };
|
|
6
8
|
/** A measure, optionally with an aggregate; `__count` counts rows. */
|
|
7
9
|
export declare const measureRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
8
10
|
aggregate: z.ZodOptional<z.ZodEnum<["SUM", "COUNT", "AVG", "MIN", "MAX", "MEDIAN", "DISTINCT"]>>;
|
|
@@ -4352,58 +4354,6 @@ declare const variableGetSchema: z.ZodUnion<[z.ZodEnum<["only", "first", "list",
|
|
|
4352
4354
|
limit?: number | undefined;
|
|
4353
4355
|
separator?: string | undefined;
|
|
4354
4356
|
}>]>;
|
|
4355
|
-
export declare const relationshipAddSchema: z.ZodObject<{
|
|
4356
|
-
op: z.ZodLiteral<"relationship.add">;
|
|
4357
|
-
from: z.ZodObject<{
|
|
4358
|
-
dataset: z.ZodString;
|
|
4359
|
-
fields: z.ZodArray<z.ZodString, "many">;
|
|
4360
|
-
}, "strict", z.ZodTypeAny, {
|
|
4361
|
-
fields: string[];
|
|
4362
|
-
dataset: string;
|
|
4363
|
-
}, {
|
|
4364
|
-
fields: string[];
|
|
4365
|
-
dataset: string;
|
|
4366
|
-
}>;
|
|
4367
|
-
to: z.ZodObject<{
|
|
4368
|
-
dataset: z.ZodString;
|
|
4369
|
-
fields: z.ZodArray<z.ZodString, "many">;
|
|
4370
|
-
}, "strict", z.ZodTypeAny, {
|
|
4371
|
-
fields: string[];
|
|
4372
|
-
dataset: string;
|
|
4373
|
-
}, {
|
|
4374
|
-
fields: string[];
|
|
4375
|
-
dataset: string;
|
|
4376
|
-
}>;
|
|
4377
|
-
cardinality: z.ZodEnum<["many_to_one", "one_to_one"]>;
|
|
4378
|
-
defaultJoinType: z.ZodEnum<["LEFT", "INNER"]>;
|
|
4379
|
-
description: z.ZodOptional<z.ZodString>;
|
|
4380
|
-
}, "strict", z.ZodTypeAny, {
|
|
4381
|
-
from: {
|
|
4382
|
-
fields: string[];
|
|
4383
|
-
dataset: string;
|
|
4384
|
-
};
|
|
4385
|
-
to: {
|
|
4386
|
-
fields: string[];
|
|
4387
|
-
dataset: string;
|
|
4388
|
-
};
|
|
4389
|
-
op: "relationship.add";
|
|
4390
|
-
cardinality: "one_to_one" | "many_to_one";
|
|
4391
|
-
defaultJoinType: "INNER" | "LEFT";
|
|
4392
|
-
description?: string | undefined;
|
|
4393
|
-
}, {
|
|
4394
|
-
from: {
|
|
4395
|
-
fields: string[];
|
|
4396
|
-
dataset: string;
|
|
4397
|
-
};
|
|
4398
|
-
to: {
|
|
4399
|
-
fields: string[];
|
|
4400
|
-
dataset: string;
|
|
4401
|
-
};
|
|
4402
|
-
op: "relationship.add";
|
|
4403
|
-
cardinality: "one_to_one" | "many_to_one";
|
|
4404
|
-
defaultJoinType: "INNER" | "LEFT";
|
|
4405
|
-
description?: string | undefined;
|
|
4406
|
-
}>;
|
|
4407
4357
|
/** Arrange a grid sheet by kind on every screen size (responsive layouts RL-D7, RL-D9). */
|
|
4408
4358
|
export declare const layoutArrangeSchema: z.ZodObject<{
|
|
4409
4359
|
op: z.ZodLiteral<"layout.arrange">;
|
|
@@ -6111,7 +6061,6 @@ export type VariableGetChange = z.infer<typeof variableGetSchema>;
|
|
|
6111
6061
|
export type VariablePresentationChange = z.infer<typeof variablePresentationSchema>;
|
|
6112
6062
|
export type RunPresentationChange = z.infer<typeof runPresentationSchema>;
|
|
6113
6063
|
export type ChipColorChange = z.infer<typeof chipColorSchema>;
|
|
6114
|
-
export type DomainChange = z.infer<typeof relationshipAddSchema>;
|
|
6115
6064
|
export type CreateTarget = z.infer<typeof createTargetSchema>;
|
|
6116
6065
|
export type ProposedChange = DashboardChange | DomainChange;
|
|
6117
6066
|
/** At most this many changes per proposal (DE-D17). */
|
|
@@ -6137,9 +6086,11 @@ export type ProposeChangeCaller = {
|
|
|
6137
6086
|
/** Dashboard changes (card.*, filter.*). False for a tenant VIEWER: the tool isn't listed at all. */
|
|
6138
6087
|
dashboards: boolean;
|
|
6139
6088
|
/**
|
|
6140
|
-
* relationship.add
|
|
6141
|
-
*
|
|
6142
|
-
*
|
|
6089
|
+
* Semantic domain changes (`relationship.add` and a domain's own changes in
|
|
6090
|
+
* `domain-change.ts`): an org Author or higher, on any credential (assistant
|
|
6091
|
+
* joins and panel AJ-D15, AJ-D19; semantic model editing SE-D5). On screen,
|
|
6092
|
+
* only for the in-product assistant, whose person adds or saves them by
|
|
6093
|
+
* click (AJ-D16).
|
|
6143
6094
|
*/
|
|
6144
6095
|
domains: boolean;
|
|
6145
6096
|
/**
|
|
@@ -6155,7 +6106,7 @@ export type ProposeChangeCaller = {
|
|
|
6155
6106
|
* Semaphor's own assistant): it changes only the open dashboard, in place,
|
|
6156
6107
|
* so `saveAs` and `preview` are not offered and, since the schema is
|
|
6157
6108
|
* strict, are refused if sent (embedded live changes LC-D17). `domainId`
|
|
6158
|
-
* is offered only with `domains`, for
|
|
6109
|
+
* is offered only with `domains`, for the domain changes (AJ-D16).
|
|
6159
6110
|
*/
|
|
6160
6111
|
onScreen: boolean;
|
|
6161
6112
|
};
|