react-semaphor 0.1.603 → 0.1.604
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/activity/index.js +1 -73
- package/dist/analytics-protocol/index.js +1 -1491
- package/dist/appearance/index.js +1 -12
- package/dist/appearance-runtime/index.js +1 -5
- package/dist/assistant-context/index.js +1 -11
- package/dist/assistant-protocol/index.js +1 -152
- package/dist/brand-studio/index.js +4 -1594
- package/dist/briefings/index.js +1 -70
- package/dist/chunks/add-to-dashboard-DeHEBEqG.js +12 -0
- package/dist/chunks/analytics-base-schemas-BREc5WGv.js +1 -0
- package/dist/chunks/appearance-context-BqBZrijL.js +1 -0
- package/dist/chunks/appearance-runtime-provider-DmbCrOOG.js +1 -0
- package/dist/chunks/applied-constraints-CinevlKD.js +1 -0
- package/dist/chunks/assistant-chat-CjYrwVDa.js +56 -0
- package/dist/chunks/attribution-BEFSsbNn.js +1 -0
- package/dist/chunks/availability-3AIOf6Z-.js +1 -0
- package/dist/chunks/bookmark-impact-C89zBLq3.js +1 -0
- package/dist/chunks/bookmark-state-69YYnRql.js +1 -0
- package/dist/chunks/brand-DCaZyRt6.js +1 -0
- package/dist/chunks/card-filter-builder-CTp6RAz1.js +17 -0
- package/dist/chunks/column-bands-DwxbZ6UI.js +1 -0
- package/dist/chunks/comparison-window-caption-C312mn3s.js +1 -0
- package/dist/chunks/context-ALdccLHw.js +2 -0
- package/dist/chunks/conversation-JMK2kyTK.js +1 -0
- package/dist/chunks/dashboard-BX28ld6s.js +1 -0
- package/dist/chunks/dashboard-briefing-launcher-qo7GH4EO.js +37 -0
- package/dist/chunks/dashboard-controls-DhRjB7MA.js +42 -0
- package/dist/chunks/dashboard-json-9cHzhSjC.js +1 -0
- package/dist/chunks/dates-D-KP8G-z.js +1 -0
- package/dist/chunks/edit-DEAK0UZo.js +1 -0
- package/dist/chunks/edit-dashboard-visual-Duq_QkB_.js +93 -0
- package/dist/chunks/export-file-format-B-wQNHIn.js +4 -0
- package/dist/chunks/filter-line-CwQrqORc.js +1 -0
- package/dist/chunks/filter-reach-preview-gixPFlZj.js +1 -0
- package/dist/chunks/filter-value-text-B3tXakhd.js +1 -0
- package/dist/chunks/index-B-VF1ogs.js +1 -0
- package/dist/chunks/index-BE1DfxNs.js +1 -0
- package/dist/chunks/index-DViPGDFj.js +1 -0
- package/dist/chunks/layout-grid-BWtlgw0T.js +6 -0
- package/dist/chunks/matrix-analytical-definition-CtFqWyCK.js +1 -0
- package/dist/chunks/matrix-member-presentation-Q0MCJ-YK.js +1 -0
- package/dist/chunks/matrix-operation-contract-D1RC1bfi.js +1 -0
- package/dist/chunks/metric-comparison-DEZYXROZ.js +1 -0
- package/dist/chunks/normalize-dashboard-for-dirty-check-ILKfqgL3.js +1 -0
- package/dist/chunks/paintbrush-BjS3SbrH.js +6 -0
- package/dist/chunks/palette-BzC-CGOc.js +6 -0
- package/dist/chunks/pickers-DuBrUht0.js +1 -0
- package/dist/chunks/pivot-result-contract-expectations-DTQAgr4n.js +1 -0
- package/dist/chunks/pivot-result-identity-DTNCB--h.js +1 -0
- package/dist/chunks/raw-temporal-value-DeyEhL0S.js +1 -0
- package/dist/chunks/rendered-file-BbvwaU6z.js +1 -0
- package/dist/chunks/report-preferences-dialog-B_gUmCzG.js +1 -0
- package/dist/chunks/report-runtime-context-BWzIHCKK.js +1 -0
- package/dist/chunks/resolve-dashboard-input-context-B-TtRqxu.js +8 -0
- package/dist/chunks/resolver-AN9ChBfZ.js +1 -0
- package/dist/chunks/save-DdFUZcbi.js +6 -0
- package/dist/chunks/saved-dashboard-context-BAJ5tWiq.js +1 -0
- package/dist/chunks/schema-MC0cQSAb.js +4 -0
- package/dist/chunks/selection-filter-compiler-CCoCD25M.js +1 -0
- package/dist/chunks/semaphor-ready-indicator-DzjorP3t.js +999 -0
- package/dist/chunks/set-DuJfGkbY.js +1 -0
- package/dist/chunks/shelf-drop-preview-context-BlLJ5RsT.js +6 -0
- package/dist/chunks/stored-dashboard-Ctcpkllg.js +1 -0
- package/dist/chunks/style-sheet-parts-BRGt9O05.js +178 -0
- package/dist/chunks/table-export-sheet-rC5pKmXg.js +2 -0
- package/dist/chunks/token-types-Bj9iMy0w.js +1 -0
- package/dist/chunks/validators-CqV3Yka1.js +1 -0
- package/dist/chunks/variable-draft-DJrfUyhv.js +1 -0
- package/dist/chunks/visual-choice-DgEFfkE-.js +1 -0
- package/dist/dashboard/index.js +1 -7
- package/dist/dashboard-authoring/index.js +1 -4614
- package/dist/format-utils/index.js +1 -425
- package/dist/index.js +1 -554
- package/dist/layouts/index.js +1 -7
- package/dist/live-channel/index.js +1 -124
- package/dist/pdf-export-policy/index.js +1 -92
- package/dist/pdf-table-layout/index.js +1 -993
- package/dist/report-runtime-context/index.js +1 -9
- package/dist/shared/index.js +1 -6
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -9
- package/dist/types/index.js +1 -88
- package/dist/types/lib/filter-values/build-card-filter-definition.d.ts +32 -0
- package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +9 -0
- package/dist/types/lib/stores/explorer-actions.d.ts +7 -6
- package/dist/types/lib/types/semantic-types.d.ts +6 -10
- package/dist/types/lib/utils/field-state-calculator.d.ts +7 -19
- package/dist/types/shared/dashboard-authoring/calculations/definition.d.ts +13 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-base.d.ts +125 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-field-folders.d.ts +55 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-joins.d.ts +114 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-prune.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/filter-field-catalog.d.ts +60 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/filter-field-folders.d.ts +132 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/index.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/join-reach.d.ts +42 -0
- package/dist/types/shared/dashboard-authoring/card-field-places.d.ts +28 -0
- package/dist/types/shared/dashboard-authoring/field-folders/field-folders.d.ts +115 -0
- package/dist/types/shared/dashboard-authoring/field-folders/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/filter-reach-decision.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +6 -1
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +7 -22
- package/dist/usage-events/index.js +1 -285
- package/dist/value-format-preferences/index.js +1 -635
- package/package.json +4 -1
- package/dist/chunks/add-to-dashboard-CFF-wFU-.js +0 -291
- package/dist/chunks/analytics-base-schemas-DsUh5Q3C.js +0 -680
- package/dist/chunks/appearance-context-BwBp25ZG.js +0 -162
- package/dist/chunks/appearance-runtime-provider-BRHYELkC.js +0 -80
- package/dist/chunks/applied-constraints-DU-wndZ7.js +0 -47
- package/dist/chunks/assistant-chat-B6hNQI1t.js +0 -6115
- package/dist/chunks/attribution-BvoKvhcj.js +0 -32
- package/dist/chunks/availability-Bp5Gfu1I.js +0 -44
- package/dist/chunks/bookmark-impact-Ba2PLcGp.js +0 -76
- package/dist/chunks/bookmark-state-n7AaNzR_.js +0 -1667
- package/dist/chunks/brand-BoUV0iHF.js +0 -54
- package/dist/chunks/card-filter-builder-Y22HizVx.js +0 -4069
- package/dist/chunks/column-bands-RdM-kjDe.js +0 -47
- package/dist/chunks/comparison-window-caption-Ck2TIbnR.js +0 -741
- package/dist/chunks/context-UCQ7sere.js +0 -369
- package/dist/chunks/conversation-sQiWYUOb.js +0 -16
- package/dist/chunks/dashboard-BghI99oY.js +0 -14
- package/dist/chunks/dashboard-briefing-launcher-DtBAnGiH.js +0 -4875
- package/dist/chunks/dashboard-controls-CtFXlyjV.js +0 -2290
- package/dist/chunks/dashboard-json-DfGBUtCd.js +0 -66
- package/dist/chunks/dates-BnrXF4bb.js +0 -185
- package/dist/chunks/edit-9df1zOWe.js +0 -226
- package/dist/chunks/edit-dashboard-visual-oxt3x1wb.js +0 -18397
- package/dist/chunks/export-file-format-C-tJsxsf.js +0 -111
- package/dist/chunks/filter-line-Cy5YYqRL.js +0 -703
- package/dist/chunks/filter-reach-copy-CE_ZX147.js +0 -5111
- package/dist/chunks/filter-value-text-fWvSDwkl.js +0 -153
- package/dist/chunks/index-BVKzKl5d.js +0 -90
- package/dist/chunks/index-CV_Kzou0.js +0 -595
- package/dist/chunks/index-D5rxbtS4.js +0 -2795
- package/dist/chunks/layout-grid-9LndRoLa.js +0 -16
- package/dist/chunks/matrix-analytical-definition-CCp48UCw.js +0 -1233
- package/dist/chunks/matrix-member-presentation-zNehruXR.js +0 -391
- package/dist/chunks/matrix-operation-contract-DPBj69D8.js +0 -1413
- package/dist/chunks/metric-comparison-B0FR-Q8I.js +0 -600
- package/dist/chunks/normalize-dashboard-for-dirty-check-XKgH3GFX.js +0 -119
- package/dist/chunks/paintbrush-58FQYY-y.js +0 -27
- package/dist/chunks/palette-Be62Tkoa.js +0 -23
- package/dist/chunks/pickers-DkqmtnTL.js +0 -2403
- package/dist/chunks/pivot-result-contract-expectations-BYqAmG9n.js +0 -5092
- package/dist/chunks/pivot-result-identity-CAP4--iq.js +0 -77
- package/dist/chunks/raw-temporal-value-Dg_MTFF7.js +0 -3778
- package/dist/chunks/rendered-file-D8xEuVVx.js +0 -108
- package/dist/chunks/report-preferences-dialog-uJp9GBTM.js +0 -1651
- package/dist/chunks/report-runtime-context-c77_KF9v.js +0 -388
- package/dist/chunks/resolve-dashboard-input-context-Rtl1ffmE.js +0 -25324
- package/dist/chunks/resolver-DG_tfEpt.js +0 -156
- package/dist/chunks/save-C5A0JnEV.js +0 -21
- package/dist/chunks/saved-dashboard-context-tcyTU8jm.js +0 -618
- package/dist/chunks/schema-C9NPiIru.js +0 -2568
- package/dist/chunks/selection-filter-compiler-DNijjI5y.js +0 -150
- package/dist/chunks/semaphor-ready-indicator-FBvunj6S.js +0 -145603
- package/dist/chunks/shelf-drop-preview-context-QKStrcK9.js +0 -2466
- package/dist/chunks/stored-dashboard-CHozcAY9.js +0 -4075
- package/dist/chunks/style-sheet-parts-CDCG-8Ej.js +0 -8681
- package/dist/chunks/table-export-sheet-ZFIvs6Sj.js +0 -949
- package/dist/chunks/token-types-XbM6QByy.js +0 -8
- package/dist/chunks/upload-H15d7uHK.js +0 -15
- package/dist/chunks/validators-Baf3VIf5.js +0 -3686
- package/dist/chunks/variable-draft-C2y8Jp6Z.js +0 -242
- package/dist/chunks/visual-choice-DDfHfHvY.js +0 -172
package/dist/appearance/index.js
CHANGED
|
@@ -1,12 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { m as s, c as o, b as A } from "../chunks/resolver-DG_tfEpt.js";
|
|
3
|
-
import { n as i } from "../chunks/index-BVKzKl5d.js";
|
|
4
|
-
export {
|
|
5
|
-
p as APPEARANCE_SPEC_VERSION,
|
|
6
|
-
r as assertValidAppearanceSpec,
|
|
7
|
-
s as mergeAppearanceSpecs,
|
|
8
|
-
o as normalizeAppearanceSpec,
|
|
9
|
-
i as normalizeOrganizationAppearance,
|
|
10
|
-
A as resolveAppearance,
|
|
11
|
-
c as validateAppearanceSpec
|
|
12
|
-
};
|
|
1
|
+
import{A as p,b as r,v as c}from"../chunks/schema-MC0cQSAb.js";import{m as s,c as o,b as A}from"../chunks/resolver-AN9ChBfZ.js";import{n as i}from"../chunks/index-BE1DfxNs.js";export{p as APPEARANCE_SPEC_VERSION,r as assertValidAppearanceSpec,s as mergeAppearanceSpecs,o as normalizeAppearanceSpec,i as normalizeOrganizationAppearance,A as resolveAppearance,c as validateAppearanceSpec};
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export {
|
|
3
|
-
e as AssistantContextSourceError,
|
|
4
|
-
t as assistantCardReplayFields,
|
|
5
|
-
r as buildSavedCardRequest,
|
|
6
|
-
d as buildSavedVariableRequest,
|
|
7
|
-
o as cardReplayOf,
|
|
8
|
-
i as projectAssistantContext,
|
|
9
|
-
n as projectSavedDashboardContext,
|
|
10
|
-
p as projectSavedDashboardTurn
|
|
11
|
-
};
|
|
1
|
+
import{A as e,a as t,b as r,c as d,d as o,p as i,e as n,f as p}from"../chunks/saved-dashboard-context-BAJ5tWiq.js";export{e as AssistantContextSourceError,t as assistantCardReplayFields,r as buildSavedCardRequest,d as buildSavedVariableRequest,o as cardReplayOf,i as projectAssistantContext,n as projectSavedDashboardContext,p as projectSavedDashboardTurn};
|
|
@@ -1,152 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as g } from "../chunks/analytics-base-schemas-DsUh5Q3C.js";
|
|
3
|
-
import { a as p, A as s, b as x, c } from "../chunks/context-UCQ7sere.js";
|
|
4
|
-
import { e as L, k as B, l as q, o as F, g as U, d as M, n as $, h as P, m as j, i as w, j as V, f as Y, r as H } from "../chunks/context-UCQ7sere.js";
|
|
5
|
-
import { t as C } from "../chunks/add-to-dashboard-CFF-wFU-.js";
|
|
6
|
-
import { A as K, n as W, C as G, e as X, M as z, l as Q, k as Z, f as ee, p as se, r as ae, u as te, x as oe, q as re, s as ne, h as de, m as ie, o as ce, i as le, d as ue, a as Se, j as Ae, c as me, b as he, g as be, v as fe, w as Te } from "../chunks/add-to-dashboard-CFF-wFU-.js";
|
|
7
|
-
import { p as pe, a as xe, r as Ce } from "../chunks/availability-Bp5Gfu1I.js";
|
|
8
|
-
import { A as ye, a as Ie, D as Ee, i as Ne } from "../chunks/conversation-sQiWYUOb.js";
|
|
9
|
-
const _ = [
|
|
10
|
-
"matrix",
|
|
11
|
-
"no_query",
|
|
12
|
-
"document_section",
|
|
13
|
-
"blocked",
|
|
14
|
-
"pending"
|
|
15
|
-
], y = e.object({
|
|
16
|
-
turnId: e.string().min(1).max(s.idChars),
|
|
17
|
-
conversationId: e.string().min(1).max(s.idChars).optional(),
|
|
18
|
-
message: e.string().min(1).max(s.messageChars),
|
|
19
|
-
context: p,
|
|
20
|
-
addedSources: e.array(g).max(s.addedSources),
|
|
21
|
-
selectedCardRequest: e.object({
|
|
22
|
-
cardId: e.string().min(1).max(s.idChars),
|
|
23
|
-
connectionId: e.string().min(1).max(s.idChars),
|
|
24
|
-
payload: e.record(e.string(), e.unknown())
|
|
25
|
-
}).strict().optional(),
|
|
26
|
-
selectedCardUnavailable: e.object({
|
|
27
|
-
cardId: e.string().min(1).max(s.idChars),
|
|
28
|
-
reason: e.enum(_),
|
|
29
|
-
message: e.string().max(s.textChars).optional()
|
|
30
|
-
}).strict().optional(),
|
|
31
|
-
taggedFields: e.array(x).max(s.taggedFields).optional(),
|
|
32
|
-
// The document's own shape is the dashboard's; propose reads it through
|
|
33
|
-
// the resolver and the save's validation. Here only what routes it.
|
|
34
|
-
openDashboard: e.object({ id: e.string().min(1).max(s.idChars), sheets: e.array(e.unknown()) }).passthrough().optional()
|
|
35
|
-
}).strict(), T = s.requestBytes + s.openDashboardBytes;
|
|
36
|
-
function k(r) {
|
|
37
|
-
var b;
|
|
38
|
-
const n = new TextEncoder().encode(r).length;
|
|
39
|
-
if (n > T)
|
|
40
|
-
return d(`body: ${n} bytes exceeds ${T}`);
|
|
41
|
-
let a;
|
|
42
|
-
try {
|
|
43
|
-
a = JSON.parse(r);
|
|
44
|
-
} catch {
|
|
45
|
-
return { ok: !1, code: "context_invalid", issues: ["body: not JSON"] };
|
|
46
|
-
}
|
|
47
|
-
const l = a && typeof a == "object" ? a.openDashboard : void 0;
|
|
48
|
-
if (l !== void 0) {
|
|
49
|
-
const t = c(l);
|
|
50
|
-
if (t > s.openDashboardBytes)
|
|
51
|
-
return d(
|
|
52
|
-
`openDashboard: ${t} bytes exceeds ${s.openDashboardBytes}`
|
|
53
|
-
);
|
|
54
|
-
const f = c({ ...a, openDashboard: void 0 });
|
|
55
|
-
if (f > s.requestBytes)
|
|
56
|
-
return d(`body without openDashboard: ${f} bytes exceeds ${s.requestBytes}`);
|
|
57
|
-
} else if (n > s.requestBytes)
|
|
58
|
-
return d(`body: ${n} bytes exceeds ${s.requestBytes}`);
|
|
59
|
-
const u = a && typeof a == "object" ? a.context : void 0;
|
|
60
|
-
if (u !== void 0) {
|
|
61
|
-
const t = c(u);
|
|
62
|
-
if (t > s.contextBytes)
|
|
63
|
-
return d(
|
|
64
|
-
`context: ${t} bytes exceeds ${s.contextBytes}`
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
const o = y.safeParse(a);
|
|
68
|
-
if (!o.success)
|
|
69
|
-
return {
|
|
70
|
-
ok: !1,
|
|
71
|
-
code: "context_invalid",
|
|
72
|
-
issues: o.error.issues.map(
|
|
73
|
-
(t) => `${t.path.join(".") || "(body)"}: ${t.message}`
|
|
74
|
-
)
|
|
75
|
-
};
|
|
76
|
-
if (!o.data.message.trim())
|
|
77
|
-
return { ok: !1, code: "context_invalid", issues: ["message: must not be blank"] };
|
|
78
|
-
const { selectedCardRequest: S, selectedCardUnavailable: A } = o.data, m = (b = o.data.context.selectedCard) == null ? void 0 : b.id, i = [
|
|
79
|
-
...S ? [["selectedCardRequest", S.cardId]] : [],
|
|
80
|
-
...A ? [["selectedCardUnavailable", A.cardId]] : []
|
|
81
|
-
], h = [
|
|
82
|
-
...i.length > 1 ? ["selectedCardRequest, selectedCardUnavailable: send one of them, not both"] : [],
|
|
83
|
-
...i.filter(([, t]) => t !== m).map(([t]) => `${t}: not the card the context asks about`),
|
|
84
|
-
...m && i.length === 0 ? ["selectedCardRequest: the asked-about card needs its request or selectedCardUnavailable"] : [],
|
|
85
|
-
...C(o.data.context, o.data.taggedFields ?? []),
|
|
86
|
-
...I(o.data.context, o.data.openDashboard)
|
|
87
|
-
];
|
|
88
|
-
return h.length ? { ok: !1, code: "context_invalid", issues: h } : { ok: !0, value: o.data };
|
|
89
|
-
}
|
|
90
|
-
function I(r, n) {
|
|
91
|
-
var a;
|
|
92
|
-
return n ? r.surface !== "dashboard" ? ["openDashboard: only on the dashboard surface"] : n.id === ((a = r.dashboard) == null ? void 0 : a.id) ? [] : ["openDashboard: not the dashboard the context describes"] : [];
|
|
93
|
-
}
|
|
94
|
-
function d(r) {
|
|
95
|
-
return { ok: !1, code: "context_too_large", issues: [r] };
|
|
96
|
-
}
|
|
97
|
-
export {
|
|
98
|
-
K as ANSWER_PART_PLACEMENT,
|
|
99
|
-
W as ASSISTANT_CARD_TYPES,
|
|
100
|
-
_ as ASSISTANT_CARD_UNAVAILABLE_REASONS,
|
|
101
|
-
L as ASSISTANT_CONTEXT_VERSION,
|
|
102
|
-
ye as ASSISTANT_LAYOUTS,
|
|
103
|
-
s as ASSISTANT_LIMITS,
|
|
104
|
-
Ie as ASSISTANT_NAME_MAX_CHARS,
|
|
105
|
-
B as ASSISTANT_PARTS_VERSION,
|
|
106
|
-
q as ASSISTANT_REFUSAL_CODES,
|
|
107
|
-
F as ASSISTANT_REFUSAL_MESSAGES,
|
|
108
|
-
U as ASSISTANT_SURFACES,
|
|
109
|
-
T as ASSISTANT_TURN_BODY_BYTES,
|
|
110
|
-
M as AssistantContextTooLargeError,
|
|
111
|
-
G as COPIED_CONVERSATION_FIELDS,
|
|
112
|
-
X as COPIED_TURN_FIELDS,
|
|
113
|
-
Ee as DEFAULT_ASSISTANT_NAME,
|
|
114
|
-
z as MODEL_CHANGE_STALE_VALUES_SHOWN,
|
|
115
|
-
Q as addableSourceKey,
|
|
116
|
-
Z as answerTextOf,
|
|
117
|
-
x as assistantCardFieldSchema,
|
|
118
|
-
p as assistantContextSchema,
|
|
119
|
-
c as assistantJsonBytes,
|
|
120
|
-
$ as assistantRefusalMessage,
|
|
121
|
-
P as compareAssistantContexts,
|
|
122
|
-
ee as conversationText,
|
|
123
|
-
j as dailyLimitMessage,
|
|
124
|
-
w as describeCardField,
|
|
125
|
-
V as describeSource,
|
|
126
|
-
Y as fitAssistantText,
|
|
127
|
-
Ne as isAssistantLayout,
|
|
128
|
-
se as modelChangeLinkOutcomeWords,
|
|
129
|
-
ae as modelChangeLinkRefusal,
|
|
130
|
-
te as modelChangeOutcomeUnclear,
|
|
131
|
-
oe as modelChangeRefusalMessage,
|
|
132
|
-
pe as parseAssistantTokenConfig,
|
|
133
|
-
k as parseAssistantTurnRequest,
|
|
134
|
-
re as questionForModel,
|
|
135
|
-
xe as readAssistantTokenConfig,
|
|
136
|
-
H as renderContextForModel,
|
|
137
|
-
Ce as resolveAssistantAvailability,
|
|
138
|
-
ne as sameCardField,
|
|
139
|
-
de as showsInAnswerBody,
|
|
140
|
-
ie as sourceRefLabel,
|
|
141
|
-
ce as staleValuesOf,
|
|
142
|
-
le as storedPartKind,
|
|
143
|
-
ue as storedTurnEnding,
|
|
144
|
-
Se as taggableFields,
|
|
145
|
-
C as taggedFieldIssues,
|
|
146
|
-
Ae as textPartKind,
|
|
147
|
-
me as toTranscriptChunks,
|
|
148
|
-
he as toTranscriptPart,
|
|
149
|
-
be as toolName,
|
|
150
|
-
fe as visualInputOf,
|
|
151
|
-
Te as workingNotesOf
|
|
152
|
-
};
|
|
1
|
+
import{z as e}from"zod";import{s as g}from"../chunks/analytics-base-schemas-BREc5WGv.js";import{a as p,A as s,b as x,c}from"../chunks/context-ALdccLHw.js";import{e as L,k as B,l as q,o as F,g as U,d as M,n as $,h as P,m as j,i as w,j as V,f as Y,r as H}from"../chunks/context-ALdccLHw.js";import{t as C}from"../chunks/add-to-dashboard-DeHEBEqG.js";import{A as K,n as W,C as G,e as X,M as z,l as Q,k as Z,f as ee,p as se,r as ae,u as te,x as oe,q as re,s as ne,h as de,m as ie,o as ce,i as le,d as ue,a as Se,j as Ae,c as me,b as he,g as be,v as fe,w as Te}from"../chunks/add-to-dashboard-DeHEBEqG.js";import{p as pe,a as xe,r as Ce}from"../chunks/availability-3AIOf6Z-.js";import{A as ye,a as Ie,D as Ee,i as Ne}from"../chunks/conversation-JMK2kyTK.js";const _=["matrix","no_query","document_section","blocked","pending"],y=e.object({turnId:e.string().min(1).max(s.idChars),conversationId:e.string().min(1).max(s.idChars).optional(),message:e.string().min(1).max(s.messageChars),context:p,addedSources:e.array(g).max(s.addedSources),selectedCardRequest:e.object({cardId:e.string().min(1).max(s.idChars),connectionId:e.string().min(1).max(s.idChars),payload:e.record(e.string(),e.unknown())}).strict().optional(),selectedCardUnavailable:e.object({cardId:e.string().min(1).max(s.idChars),reason:e.enum(_),message:e.string().max(s.textChars).optional()}).strict().optional(),taggedFields:e.array(x).max(s.taggedFields).optional(),openDashboard:e.object({id:e.string().min(1).max(s.idChars),sheets:e.array(e.unknown())}).passthrough().optional()}).strict(),T=s.requestBytes+s.openDashboardBytes;function k(r){var b;const n=new TextEncoder().encode(r).length;if(n>T)return d(`body: ${n} bytes exceeds ${T}`);let a;try{a=JSON.parse(r);}catch{return{ok:!1,code:"context_invalid",issues:["body: not JSON"]};}const l=a&&typeof a=="object"?a.openDashboard:void 0;if(l!==void 0){const t=c(l);if(t>s.openDashboardBytes)return d(`openDashboard: ${t} bytes exceeds ${s.openDashboardBytes}`);const f=c({...a,openDashboard:void 0});if(f>s.requestBytes)return d(`body without openDashboard: ${f} bytes exceeds ${s.requestBytes}`);}else if(n>s.requestBytes)return d(`body: ${n} bytes exceeds ${s.requestBytes}`);const u=a&&typeof a=="object"?a.context:void 0;if(u!==void 0){const t=c(u);if(t>s.contextBytes)return d(`context: ${t} bytes exceeds ${s.contextBytes}`);}const o=y.safeParse(a);if(!o.success)return{ok:!1,code:"context_invalid",issues:o.error.issues.map(t=>`${t.path.join(".")||"(body)"}: ${t.message}`)};if(!o.data.message.trim())return{ok:!1,code:"context_invalid",issues:["message: must not be blank"]};const{selectedCardRequest:S,selectedCardUnavailable:A}=o.data,m=(b=o.data.context.selectedCard)==null?void 0:b.id,i=[...(S?[["selectedCardRequest",S.cardId]]:[]),...(A?[["selectedCardUnavailable",A.cardId]]:[])],h=[...(i.length>1?["selectedCardRequest, selectedCardUnavailable: send one of them, not both"]:[]),...i.filter(([,t])=>t!==m).map(([t])=>`${t}: not the card the context asks about`),...(m&&i.length===0?["selectedCardRequest: the asked-about card needs its request or selectedCardUnavailable"]:[]),...C(o.data.context,o.data.taggedFields??[]),...I(o.data.context,o.data.openDashboard)];return h.length?{ok:!1,code:"context_invalid",issues:h}:{ok:!0,value:o.data};}function I(r,n){var a;return n?r.surface!=="dashboard"?["openDashboard: only on the dashboard surface"]:n.id===((a=r.dashboard)==null?void 0:a.id)?[]:["openDashboard: not the dashboard the context describes"]:[];}function d(r){return{ok:!1,code:"context_too_large",issues:[r]};}export{K as ANSWER_PART_PLACEMENT,W as ASSISTANT_CARD_TYPES,_ as ASSISTANT_CARD_UNAVAILABLE_REASONS,L as ASSISTANT_CONTEXT_VERSION,ye as ASSISTANT_LAYOUTS,s as ASSISTANT_LIMITS,Ie as ASSISTANT_NAME_MAX_CHARS,B as ASSISTANT_PARTS_VERSION,q as ASSISTANT_REFUSAL_CODES,F as ASSISTANT_REFUSAL_MESSAGES,U as ASSISTANT_SURFACES,T as ASSISTANT_TURN_BODY_BYTES,M as AssistantContextTooLargeError,G as COPIED_CONVERSATION_FIELDS,X as COPIED_TURN_FIELDS,Ee as DEFAULT_ASSISTANT_NAME,z as MODEL_CHANGE_STALE_VALUES_SHOWN,Q as addableSourceKey,Z as answerTextOf,x as assistantCardFieldSchema,p as assistantContextSchema,c as assistantJsonBytes,$ as assistantRefusalMessage,P as compareAssistantContexts,ee as conversationText,j as dailyLimitMessage,w as describeCardField,V as describeSource,Y as fitAssistantText,Ne as isAssistantLayout,se as modelChangeLinkOutcomeWords,ae as modelChangeLinkRefusal,te as modelChangeOutcomeUnclear,oe as modelChangeRefusalMessage,pe as parseAssistantTokenConfig,k as parseAssistantTurnRequest,re as questionForModel,xe as readAssistantTokenConfig,H as renderContextForModel,Ce as resolveAssistantAvailability,ne as sameCardField,de as showsInAnswerBody,ie as sourceRefLabel,ce as staleValuesOf,le as storedPartKind,ue as storedTurnEnding,Se as taggableFields,C as taggedFieldIssues,Ae as textPartKind,me as toTranscriptChunks,he as toTranscriptPart,be as toolName,fe as visualInputOf,Te as workingNotesOf};
|