@case-framework/survey-assistant 0.2.2 → 0.3.0
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/{authoring-references-DYuOAdVx.mjs → authoring-references-yyYC4Ydi.mjs} +9 -3
- package/dist/authoring-references-yyYC4Ydi.mjs.map +1 -0
- package/dist/{capabilities-DlC1l6qy.d.mts → capabilities-CnsVuJ1k.d.mts} +12 -4
- package/dist/capabilities-CnsVuJ1k.d.mts.map +1 -0
- package/dist/capabilities-default.d.mts +1 -1
- package/dist/capabilities-default.d.mts.map +1 -1
- package/dist/capabilities-default.mjs +38 -4
- package/dist/capabilities-default.mjs.map +1 -1
- package/dist/{constants-D-5m_KGB.d.mts → constants-DrGZXtQf.d.mts} +12 -7
- package/dist/constants-DrGZXtQf.d.mts.map +1 -0
- package/dist/{controller-proxy-0WJZUZYx.mjs → controller-proxy-CpkQRezb.mjs} +3 -2
- package/dist/controller-proxy-CpkQRezb.mjs.map +1 -0
- package/dist/{controller-proxy-Hkuub9dt.d.mts → controller-proxy-DmBdzqKs.d.mts} +5 -2
- package/dist/controller-proxy-DmBdzqKs.d.mts.map +1 -0
- package/dist/{digest-BvXpeWcR.d.mts → digest-Dyjch_sC.d.mts} +2 -2
- package/dist/{digest-BvXpeWcR.d.mts.map → digest-Dyjch_sC.d.mts.map} +1 -1
- package/dist/digest.d.mts +1 -1
- package/dist/{engine-0AJrv0hI.mjs → engine-CWTuN3o2.mjs} +866 -663
- package/dist/engine-CWTuN3o2.mjs.map +1 -0
- package/dist/engine.d.mts +3 -3
- package/dist/engine.mjs +3 -3
- package/dist/fair-guidance-CEdJYccK.mjs +21 -0
- package/dist/fair-guidance-CEdJYccK.mjs.map +1 -0
- package/dist/form-authoring-DCd9XfXf.mjs +155 -0
- package/dist/form-authoring-DCd9XfXf.mjs.map +1 -0
- package/dist/{index-JXH-t2EJ.d.mts → index-Bo4dHAo8.d.mts} +68 -6
- package/dist/index-Bo4dHAo8.d.mts.map +1 -0
- package/dist/{index-MEOL9_Gr.d.mts → index-D4OitUg4.d.mts} +5 -430
- package/dist/index-D4OitUg4.d.mts.map +1 -0
- package/dist/{index-BcyfBeDj.d.mts → index-DZk20e3k.d.mts} +44 -22
- package/dist/index-DZk20e3k.d.mts.map +1 -0
- package/dist/{index-CneD8ibB.d.mts → index-Dxgg0-D_.d.mts} +12 -3
- package/dist/index-Dxgg0-D_.d.mts.map +1 -0
- package/dist/lifecycle-DWv5CiSu.d.mts +523 -0
- package/dist/lifecycle-DWv5CiSu.d.mts.map +1 -0
- package/dist/{memory-thread-repository-1ocPOda8.mjs → memory-thread-repository-acbz6HZJ.mjs} +181 -26
- package/dist/memory-thread-repository-acbz6HZJ.mjs.map +1 -0
- package/dist/{protocol-DpCYmCjr.mjs → protocol-DATvkr1S.mjs} +125 -6
- package/dist/protocol-DATvkr1S.mjs.map +1 -0
- package/dist/protocol.d.mts +4 -3
- package/dist/protocol.mjs +2 -2
- package/dist/{react-DXK5zWNo.mjs → react-Br5YE8H-.mjs} +132 -12
- package/dist/react-Br5YE8H-.mjs.map +1 -0
- package/dist/react-integration.d.mts +1 -1
- package/dist/react-integration.mjs +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.mjs +2 -2
- package/dist/references/assistant-operations.md +13 -18
- package/dist/references/embedded-forms.md +41 -2
- package/dist/references/expressions.md +17 -9
- package/dist/references/fair-by-design.md +80 -0
- package/dist/references/item-types.md +19 -3
- package/dist/references/localization.md +7 -4
- package/dist/references/source-material-surveys.md +6 -4
- package/dist/{request-context-BBzU3VdG.mjs → request-context-BEjnaaFr.mjs} +10 -5
- package/dist/request-context-BEjnaaFr.mjs.map +1 -0
- package/dist/server-agent.d.mts +44 -22
- package/dist/server-agent.d.mts.map +1 -1
- package/dist/server-agent.mjs +71 -14
- package/dist/server-agent.mjs.map +1 -1
- package/dist/server-runtime.d.mts +22 -11
- package/dist/server-runtime.d.mts.map +1 -1
- package/dist/server-runtime.mjs +47 -19
- package/dist/server-runtime.mjs.map +1 -1
- package/dist/server-tasks.d.mts +1 -1
- package/dist/server-tasks.mjs +6 -4
- package/dist/server-tasks.mjs.map +1 -1
- package/dist/server-tools.d.mts +1 -1
- package/dist/server-tools.mjs +1 -1
- package/dist/server.d.mts +16 -7
- package/dist/server.d.mts.map +1 -1
- package/dist/server.mjs +4 -4
- package/dist/storage-postgres.d.mts +1 -1
- package/dist/{tasks-DcfQNJwO.d.mts → tasks-DQgL449A.d.mts} +8 -4
- package/dist/tasks-DQgL449A.d.mts.map +1 -0
- package/dist/{thread-documents-BlxNjc7S.d.mts → thread-documents-Dvo6XS7o.d.mts} +1 -1
- package/dist/{thread-documents-BlxNjc7S.d.mts.map → thread-documents-Dvo6XS7o.d.mts.map} +1 -1
- package/dist/{thread-handlers-uddXwQjp.d.mts → thread-handlers-CeYl45xG.d.mts} +9 -4
- package/dist/thread-handlers-CeYl45xG.d.mts.map +1 -0
- package/dist/{tools-wgLen05n.mjs → tools-Dg9HZrYU.mjs} +404 -78
- package/dist/tools-Dg9HZrYU.mjs.map +1 -0
- package/dist/ui.css +2 -2
- package/dist/ui.d.mts +94 -10
- package/dist/ui.d.mts.map +1 -1
- package/dist/ui.mjs +343 -112
- package/dist/ui.mjs.map +1 -1
- package/docs/integration.md +74 -6
- package/package.json +25 -19
- package/dist/authoring-references-DYuOAdVx.mjs.map +0 -1
- package/dist/capabilities-DKbNCnBf.mjs +0 -66
- package/dist/capabilities-DKbNCnBf.mjs.map +0 -1
- package/dist/capabilities-DlC1l6qy.d.mts.map +0 -1
- package/dist/constants-D-5m_KGB.d.mts.map +0 -1
- package/dist/controller-proxy-0WJZUZYx.mjs.map +0 -1
- package/dist/controller-proxy-Hkuub9dt.d.mts.map +0 -1
- package/dist/engine-0AJrv0hI.mjs.map +0 -1
- package/dist/index-BcyfBeDj.d.mts.map +0 -1
- package/dist/index-CneD8ibB.d.mts.map +0 -1
- package/dist/index-JXH-t2EJ.d.mts.map +0 -1
- package/dist/index-MEOL9_Gr.d.mts.map +0 -1
- package/dist/memory-thread-repository-1ocPOda8.mjs.map +0 -1
- package/dist/protocol-DpCYmCjr.mjs.map +0 -1
- package/dist/react-DXK5zWNo.mjs.map +0 -1
- package/dist/request-context-BBzU3VdG.mjs.map +0 -1
- package/dist/tasks-DcfQNJwO.d.mts.map +0 -1
- package/dist/thread-handlers-uddXwQjp.d.mts.map +0 -1
- package/dist/tools-wgLen05n.mjs.map +0 -1
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { i as AssistantItemTypeManifest, o as SurveyAssistantCapabilityManifest } from "./capabilities-DlC1l6qy.mjs";
|
|
2
1
|
import { z } from "zod";
|
|
3
|
-
import { SURVEY_EDITOR_ITEM_COLORS } from "@case-framework/survey-core/editor/colors";
|
|
4
|
-
import { Content, JsonPatchOperation, JsonValue, RawSurvey, RawSurveyAsset, RawSurveyItem, RichTextImageDimension, SurveyContentImageSource } from "@case-framework/survey-core";
|
|
5
2
|
|
|
6
3
|
//#region src/protocol/errors.d.ts
|
|
7
4
|
declare const surveyAssistantErrorCodeSchema: z.ZodEnum<{
|
|
@@ -26,357 +23,6 @@ type SurveyAssistantErrorInfo = z.infer<typeof surveyAssistantErrorInfoSchema>;
|
|
|
26
23
|
declare const serializeSurveyAssistantError: (error: SurveyAssistantErrorInfo) => string;
|
|
27
24
|
declare const parseSurveyAssistantError: (value: unknown) => SurveyAssistantErrorInfo;
|
|
28
25
|
//#endregion
|
|
29
|
-
//#region src/protocol/content.d.ts
|
|
30
|
-
declare const jsonValueSchema: z.ZodType<JsonValue>;
|
|
31
|
-
declare const surveyContentSchema: z.ZodType<Content>;
|
|
32
|
-
type SurveyContent = z.infer<typeof surveyContentSchema>;
|
|
33
|
-
type JsonValue$1 = z.infer<typeof jsonValueSchema>;
|
|
34
|
-
//#endregion
|
|
35
|
-
//#region src/protocol/document.d.ts
|
|
36
|
-
interface SurveyDocumentVersionShape {
|
|
37
|
-
sessionId: string | null;
|
|
38
|
-
revision: number;
|
|
39
|
-
historyIndex: number;
|
|
40
|
-
contentHash: string;
|
|
41
|
-
capabilityDigest: string;
|
|
42
|
-
}
|
|
43
|
-
interface SurveyEditorUIContextShape {
|
|
44
|
-
view: "item-editor" | "preview-mode" | "translation-mode" | "asset-manager";
|
|
45
|
-
selectedItemId?: string;
|
|
46
|
-
selectedLocale: string;
|
|
47
|
-
focusItemId?: string;
|
|
48
|
-
recentItemIds?: string[];
|
|
49
|
-
activeSurface?: string;
|
|
50
|
-
openPanels?: string[];
|
|
51
|
-
highlights?: Array<{
|
|
52
|
-
kind: string;
|
|
53
|
-
itemId?: string;
|
|
54
|
-
componentId?: string;
|
|
55
|
-
label?: string;
|
|
56
|
-
details?: string;
|
|
57
|
-
}>;
|
|
58
|
-
history?: {
|
|
59
|
-
currentIndex: number;
|
|
60
|
-
totalEntries: number;
|
|
61
|
-
canUndo: boolean;
|
|
62
|
-
canRedo: boolean;
|
|
63
|
-
recent: Array<{
|
|
64
|
-
index: number;
|
|
65
|
-
kind: "survey-snapshot" | "asset-change";
|
|
66
|
-
label: string;
|
|
67
|
-
source?: "user" | "system" | "assistant";
|
|
68
|
-
timestamp: number;
|
|
69
|
-
isCurrent: boolean;
|
|
70
|
-
}>;
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
interface SurveyDocumentSnapshotShape {
|
|
74
|
-
protocolVersion: 1;
|
|
75
|
-
version: SurveyDocumentVersionShape;
|
|
76
|
-
survey: RawSurvey;
|
|
77
|
-
ui: SurveyEditorUIContextShape;
|
|
78
|
-
capabilities: SurveyAssistantCapabilityManifest;
|
|
79
|
-
createdAt: string;
|
|
80
|
-
}
|
|
81
|
-
declare const SURVEY_ASSISTANT_PROTOCOL_VERSION: 1;
|
|
82
|
-
declare const surveyAssistantProtocolVersionSchema: z.ZodLiteral<1>;
|
|
83
|
-
declare const surveyDocumentVersionSchema: z.ZodType<SurveyDocumentVersionShape>;
|
|
84
|
-
declare const surveyEditorUIContextSchema: z.ZodType<SurveyEditorUIContextShape>;
|
|
85
|
-
declare const rawSurveyDocumentSchema: z.ZodType<RawSurvey>;
|
|
86
|
-
declare const surveyDocumentSnapshotSchema: z.ZodType<SurveyDocumentSnapshotShape>;
|
|
87
|
-
declare const surveyAssistantSnapshotSchema: z.ZodType<SurveyDocumentSnapshotShape, unknown, z.core.$ZodTypeInternals<SurveyDocumentSnapshotShape, unknown>>;
|
|
88
|
-
declare const surveyAssistantSnapshotPayloadSchema: z.ZodType<SurveyDocumentSnapshotShape, unknown, z.core.$ZodTypeInternals<SurveyDocumentSnapshotShape, unknown>>;
|
|
89
|
-
type SurveyAssistantProtocolVersion = z.infer<typeof surveyAssistantProtocolVersionSchema>;
|
|
90
|
-
type SurveyDocumentVersion = z.infer<typeof surveyDocumentVersionSchema>;
|
|
91
|
-
type SurveyEditorUIContext = z.infer<typeof surveyEditorUIContextSchema>;
|
|
92
|
-
type RawSurveyDocument = z.infer<typeof rawSurveyDocumentSchema>;
|
|
93
|
-
type SurveyDocumentSnapshot = z.infer<typeof surveyDocumentSnapshotSchema>;
|
|
94
|
-
type SurveyAssistantSnapshot = SurveyDocumentSnapshot;
|
|
95
|
-
type SurveyAssistantSnapshotPayload = SurveyDocumentSnapshot;
|
|
96
|
-
type SurveyAssistantItemCreateStrategy = SurveyAssistantCapabilityManifest["itemTypes"][number]["create"];
|
|
97
|
-
type SurveyAssistantItemTypeManifestEntry = AssistantItemTypeManifest;
|
|
98
|
-
type SurveyAssistantItemRegistryManifest = SurveyAssistantCapabilityManifest;
|
|
99
|
-
type SurveyAssistantDraftChangePrecondition = SurveyDocumentVersion;
|
|
100
|
-
declare const surveyAssistantDraftChangePreconditionSchema: z.ZodType<SurveyDocumentVersionShape, unknown, z.core.$ZodTypeInternals<SurveyDocumentVersionShape, unknown>>;
|
|
101
|
-
//#endregion
|
|
102
|
-
//#region src/protocol/operations.d.ts
|
|
103
|
-
interface OperationBase {
|
|
104
|
-
id?: string;
|
|
105
|
-
}
|
|
106
|
-
interface ItemTranslation {
|
|
107
|
-
locale: string;
|
|
108
|
-
contentKey: string;
|
|
109
|
-
plainText?: string;
|
|
110
|
-
content?: SurveyContent;
|
|
111
|
-
}
|
|
112
|
-
interface CreateItemOperation extends OperationBase {
|
|
113
|
-
kind: "create-item";
|
|
114
|
-
target: {
|
|
115
|
-
parentItemId: string;
|
|
116
|
-
index?: number;
|
|
117
|
-
};
|
|
118
|
-
item: Omit<RawSurveyItem, "id"> & {
|
|
119
|
-
id?: string;
|
|
120
|
-
};
|
|
121
|
-
translations?: ItemTranslation[];
|
|
122
|
-
}
|
|
123
|
-
interface UpdateItemKeyOperation extends OperationBase {
|
|
124
|
-
kind: "update-item-key";
|
|
125
|
-
itemId: string;
|
|
126
|
-
key: string;
|
|
127
|
-
}
|
|
128
|
-
interface UpdateItemLabelOperation extends OperationBase {
|
|
129
|
-
kind: "update-item-label";
|
|
130
|
-
itemId: string;
|
|
131
|
-
itemLabel: string;
|
|
132
|
-
}
|
|
133
|
-
type ItemColor = (typeof SURVEY_EDITOR_ITEM_COLORS)[number];
|
|
134
|
-
interface UpdateItemColorOperation extends OperationBase {
|
|
135
|
-
kind: "update-item-color";
|
|
136
|
-
itemId: string;
|
|
137
|
-
color: ItemColor;
|
|
138
|
-
}
|
|
139
|
-
interface UpdateItemTranslationOperation extends OperationBase, ItemTranslation {
|
|
140
|
-
kind: "update-item-translation";
|
|
141
|
-
itemId: string;
|
|
142
|
-
}
|
|
143
|
-
interface UpdatePlacedImageOperation extends OperationBase {
|
|
144
|
-
kind: "update-placed-image";
|
|
145
|
-
itemId: string;
|
|
146
|
-
locale: string;
|
|
147
|
-
contentKey: string;
|
|
148
|
-
/** Zero-based index among image blocks in this rich-text content value. */
|
|
149
|
-
imageIndex: number;
|
|
150
|
-
/** Optional guard that prevents editing a different image after content changed. */
|
|
151
|
-
expectedAssetId?: string;
|
|
152
|
-
changes: {
|
|
153
|
-
source?: SurveyContentImageSource;
|
|
154
|
-
alt?: string | null;
|
|
155
|
-
caption?: string | null;
|
|
156
|
-
width?: RichTextImageDimension | null;
|
|
157
|
-
height?: RichTextImageDimension | null;
|
|
158
|
-
maxWidth?: RichTextImageDimension | null;
|
|
159
|
-
maxHeight?: RichTextImageDimension | null;
|
|
160
|
-
alignment?: "left" | "center" | "right" | null;
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
interface PatchItemConfigOperation extends OperationBase {
|
|
164
|
-
kind: "patch-item-config";
|
|
165
|
-
itemId: string;
|
|
166
|
-
/** JSON Patch paths are relative to the item's config root. */
|
|
167
|
-
patches: JsonPatchOperation[];
|
|
168
|
-
}
|
|
169
|
-
interface FormTarget {
|
|
170
|
-
itemId: string;
|
|
171
|
-
/** When present, target the inline embedded form on this choice option. */
|
|
172
|
-
optionId?: string;
|
|
173
|
-
}
|
|
174
|
-
interface UpsertFormFieldGroupOperation extends OperationBase {
|
|
175
|
-
kind: "upsert-form-field-group";
|
|
176
|
-
target: FormTarget;
|
|
177
|
-
index?: number;
|
|
178
|
-
group: Record<string, unknown> & {
|
|
179
|
-
id: string;
|
|
180
|
-
};
|
|
181
|
-
translations?: ItemTranslation[];
|
|
182
|
-
}
|
|
183
|
-
interface RemoveFormFieldGroupOperation extends OperationBase {
|
|
184
|
-
kind: "remove-form-field-group";
|
|
185
|
-
target: FormTarget;
|
|
186
|
-
groupId: string;
|
|
187
|
-
}
|
|
188
|
-
interface ReorderFormFieldGroupsOperation extends OperationBase {
|
|
189
|
-
kind: "reorder-form-field-groups";
|
|
190
|
-
target: FormTarget;
|
|
191
|
-
groupIds: string[];
|
|
192
|
-
}
|
|
193
|
-
interface UpsertFormFieldOperation extends OperationBase {
|
|
194
|
-
kind: "upsert-form-field";
|
|
195
|
-
target: FormTarget;
|
|
196
|
-
groupId: string;
|
|
197
|
-
index?: number;
|
|
198
|
-
field: Record<string, unknown> & {
|
|
199
|
-
id: string;
|
|
200
|
-
key: string;
|
|
201
|
-
type: string;
|
|
202
|
-
};
|
|
203
|
-
translations?: ItemTranslation[];
|
|
204
|
-
}
|
|
205
|
-
interface RemoveFormFieldOperation extends OperationBase {
|
|
206
|
-
kind: "remove-form-field";
|
|
207
|
-
target: FormTarget;
|
|
208
|
-
fieldId: string;
|
|
209
|
-
}
|
|
210
|
-
interface MoveFormFieldOperation extends OperationBase {
|
|
211
|
-
kind: "move-form-field";
|
|
212
|
-
target: FormTarget;
|
|
213
|
-
fieldId: string;
|
|
214
|
-
targetGroupId: string;
|
|
215
|
-
index?: number;
|
|
216
|
-
}
|
|
217
|
-
interface SetEmbeddedFormOperation extends OperationBase {
|
|
218
|
-
kind: "set-embedded-form";
|
|
219
|
-
itemId: string;
|
|
220
|
-
optionId: string;
|
|
221
|
-
form: Record<string, unknown> & {
|
|
222
|
-
id: string;
|
|
223
|
-
fieldGroups: unknown[];
|
|
224
|
-
};
|
|
225
|
-
translations?: ItemTranslation[];
|
|
226
|
-
}
|
|
227
|
-
interface RemoveEmbeddedFormOperation extends OperationBase {
|
|
228
|
-
kind: "remove-embedded-form";
|
|
229
|
-
itemId: string;
|
|
230
|
-
optionId: string;
|
|
231
|
-
}
|
|
232
|
-
interface ChoiceOptionInput {
|
|
233
|
-
id?: string;
|
|
234
|
-
key?: string;
|
|
235
|
-
label: string;
|
|
236
|
-
}
|
|
237
|
-
interface AddChoiceOptionOperation extends OperationBase {
|
|
238
|
-
kind: "add-choice-option";
|
|
239
|
-
itemId: string;
|
|
240
|
-
locale?: string;
|
|
241
|
-
index?: number;
|
|
242
|
-
option: ChoiceOptionInput;
|
|
243
|
-
}
|
|
244
|
-
interface UpdateChoiceOptionLabelOperation extends OperationBase {
|
|
245
|
-
kind: "update-choice-option-label";
|
|
246
|
-
itemId: string;
|
|
247
|
-
optionId: string;
|
|
248
|
-
locale?: string;
|
|
249
|
-
label: string;
|
|
250
|
-
}
|
|
251
|
-
interface RemoveChoiceOptionOperation extends OperationBase {
|
|
252
|
-
kind: "remove-choice-option";
|
|
253
|
-
itemId: string;
|
|
254
|
-
optionId: string;
|
|
255
|
-
}
|
|
256
|
-
interface ReorderChoiceOptionsOperation extends OperationBase {
|
|
257
|
-
kind: "reorder-choice-options";
|
|
258
|
-
itemId: string;
|
|
259
|
-
optionIds: string[];
|
|
260
|
-
}
|
|
261
|
-
interface RemoveItemOperation extends OperationBase {
|
|
262
|
-
kind: "remove-item";
|
|
263
|
-
itemId: string;
|
|
264
|
-
includeChildren?: boolean;
|
|
265
|
-
}
|
|
266
|
-
interface MoveItemOperation extends OperationBase {
|
|
267
|
-
kind: "move-item";
|
|
268
|
-
itemId: string;
|
|
269
|
-
target: {
|
|
270
|
-
parentItemId: string;
|
|
271
|
-
index?: number;
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
interface ReorderItemsOperation extends OperationBase {
|
|
275
|
-
kind: "reorder-items";
|
|
276
|
-
parentItemId: string;
|
|
277
|
-
itemIds: string[];
|
|
278
|
-
}
|
|
279
|
-
interface UpdateSurveyMetadataOperation extends OperationBase {
|
|
280
|
-
kind: "update-survey-metadata";
|
|
281
|
-
values: Record<string, string | null>;
|
|
282
|
-
}
|
|
283
|
-
interface UpdateSurveyPaginationOperation extends OperationBase {
|
|
284
|
-
kind: "update-survey-pagination";
|
|
285
|
-
value: {
|
|
286
|
-
large: number;
|
|
287
|
-
small: number;
|
|
288
|
-
} | null;
|
|
289
|
-
}
|
|
290
|
-
interface UpdateSurveyTranslationOperation extends OperationBase, Omit<ItemTranslation, "contentKey"> {
|
|
291
|
-
kind: "update-survey-translation";
|
|
292
|
-
surface: "surveyCardContent" | "navigationContent" | "validationMessages";
|
|
293
|
-
contentKey: string;
|
|
294
|
-
}
|
|
295
|
-
interface RemoveSurveyLocaleOperation extends OperationBase {
|
|
296
|
-
kind: "remove-survey-locale";
|
|
297
|
-
locale: string;
|
|
298
|
-
}
|
|
299
|
-
interface SetImageAssetOperation extends OperationBase {
|
|
300
|
-
kind: "set-image-asset";
|
|
301
|
-
assetId: string;
|
|
302
|
-
asset: RawSurveyAsset;
|
|
303
|
-
}
|
|
304
|
-
interface UpdateImageAssetMetadataOperation extends OperationBase {
|
|
305
|
-
kind: "update-image-asset-metadata";
|
|
306
|
-
assetId: string;
|
|
307
|
-
metadata: {
|
|
308
|
-
name?: string | null;
|
|
309
|
-
filename?: string | null;
|
|
310
|
-
alt?: string | null;
|
|
311
|
-
width?: number | null;
|
|
312
|
-
height?: number | null;
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
interface RemoveImageAssetOperation extends OperationBase {
|
|
316
|
-
kind: "remove-image-asset";
|
|
317
|
-
assetId: string;
|
|
318
|
-
}
|
|
319
|
-
interface SurveyPatchOperation extends OperationBase {
|
|
320
|
-
kind: "survey-json-patch";
|
|
321
|
-
patches: JsonPatchOperation[];
|
|
322
|
-
}
|
|
323
|
-
type SurveyOperationShape = CreateItemOperation | UpdateItemKeyOperation | UpdateItemLabelOperation | UpdateItemColorOperation | UpdateItemTranslationOperation | UpdatePlacedImageOperation | PatchItemConfigOperation | UpsertFormFieldGroupOperation | RemoveFormFieldGroupOperation | ReorderFormFieldGroupsOperation | UpsertFormFieldOperation | RemoveFormFieldOperation | MoveFormFieldOperation | SetEmbeddedFormOperation | RemoveEmbeddedFormOperation | AddChoiceOptionOperation | UpdateChoiceOptionLabelOperation | RemoveChoiceOptionOperation | ReorderChoiceOptionsOperation | RemoveItemOperation | MoveItemOperation | ReorderItemsOperation | UpdateSurveyMetadataOperation | UpdateSurveyPaginationOperation | UpdateSurveyTranslationOperation | RemoveSurveyLocaleOperation | SetImageAssetOperation | UpdateImageAssetMetadataOperation | RemoveImageAssetOperation | SurveyPatchOperation;
|
|
324
|
-
type SurveyOperationKind = SurveyOperationShape["kind"];
|
|
325
|
-
interface SurveyValidationIssueShape {
|
|
326
|
-
severity: "error" | "warning";
|
|
327
|
-
code: string;
|
|
328
|
-
message: string;
|
|
329
|
-
operationIndex?: number;
|
|
330
|
-
operationId?: string;
|
|
331
|
-
itemId?: string;
|
|
332
|
-
}
|
|
333
|
-
interface SurveyValidationResultShape {
|
|
334
|
-
valid: boolean;
|
|
335
|
-
issues: SurveyValidationIssueShape[];
|
|
336
|
-
warnings: SurveyValidationIssueShape[];
|
|
337
|
-
normalizedOperations: SurveyOperationShape[];
|
|
338
|
-
}
|
|
339
|
-
declare const jsonPatchOperationSchema: z.ZodType<JsonPatchOperation>;
|
|
340
|
-
declare const createItemOperationSchema: z.ZodType<CreateItemOperation>;
|
|
341
|
-
declare const updateItemKeyOperationSchema: z.ZodType<UpdateItemKeyOperation>;
|
|
342
|
-
declare const updateItemLabelOperationSchema: z.ZodType<UpdateItemLabelOperation>;
|
|
343
|
-
declare const updateItemColorOperationSchema: z.ZodType<UpdateItemColorOperation>;
|
|
344
|
-
declare const updateItemTranslationOperationSchema: z.ZodType<UpdateItemTranslationOperation>;
|
|
345
|
-
declare const patchItemConfigOperationSchema: z.ZodType<PatchItemConfigOperation>;
|
|
346
|
-
declare const addChoiceOptionOperationSchema: z.ZodType<AddChoiceOptionOperation>;
|
|
347
|
-
declare const updateChoiceOptionLabelOperationSchema: z.ZodType<UpdateChoiceOptionLabelOperation>;
|
|
348
|
-
declare const removeChoiceOptionOperationSchema: z.ZodType<RemoveChoiceOptionOperation>;
|
|
349
|
-
declare const reorderChoiceOptionsOperationSchema: z.ZodType<ReorderChoiceOptionsOperation>;
|
|
350
|
-
declare const removeItemOperationSchema: z.ZodType<RemoveItemOperation>;
|
|
351
|
-
declare const surveyPatchOperationSchema: z.ZodType<SurveyPatchOperation>;
|
|
352
|
-
declare const surveyOperationSchema: z.ZodType<SurveyOperationShape>;
|
|
353
|
-
declare const surveyValidationIssueSchema: z.ZodType<SurveyValidationIssueShape>;
|
|
354
|
-
declare const surveyValidationResultSchema: z.ZodType<SurveyValidationResultShape>;
|
|
355
|
-
type JsonPatchOperation$1 = z.infer<typeof jsonPatchOperationSchema>;
|
|
356
|
-
type SurveyOperation = z.infer<typeof surveyOperationSchema>;
|
|
357
|
-
declare const SURVEY_OPERATION_KINDS: readonly [SurveyOperationKind, ...SurveyOperationKind[]];
|
|
358
|
-
type SurveyValidationIssue = z.infer<typeof surveyValidationIssueSchema>;
|
|
359
|
-
type SurveyValidationResult = z.infer<typeof surveyValidationResultSchema>;
|
|
360
|
-
declare const surveyJsonPatchOperationSchema: z.ZodType<JsonPatchOperation, unknown, z.core.$ZodTypeInternals<JsonPatchOperation, unknown>>;
|
|
361
|
-
declare const surveyAssistantCreateItemOperationSchema: z.ZodType<CreateItemOperation, unknown, z.core.$ZodTypeInternals<CreateItemOperation, unknown>>;
|
|
362
|
-
declare const surveyAssistantUpdateItemKeyOperationSchema: z.ZodType<UpdateItemKeyOperation, unknown, z.core.$ZodTypeInternals<UpdateItemKeyOperation, unknown>>;
|
|
363
|
-
declare const surveyAssistantUpdateItemLabelOperationSchema: z.ZodType<UpdateItemLabelOperation, unknown, z.core.$ZodTypeInternals<UpdateItemLabelOperation, unknown>>;
|
|
364
|
-
declare const surveyAssistantUpdateItemColorOperationSchema: z.ZodType<UpdateItemColorOperation, unknown, z.core.$ZodTypeInternals<UpdateItemColorOperation, unknown>>;
|
|
365
|
-
declare const surveyAssistantUpdateItemTranslationOperationSchema: z.ZodType<UpdateItemTranslationOperation, unknown, z.core.$ZodTypeInternals<UpdateItemTranslationOperation, unknown>>;
|
|
366
|
-
declare const surveyAssistantAddChoiceOptionOperationSchema: z.ZodType<AddChoiceOptionOperation, unknown, z.core.$ZodTypeInternals<AddChoiceOptionOperation, unknown>>;
|
|
367
|
-
declare const surveyAssistantUpdateChoiceOptionLabelOperationSchema: z.ZodType<UpdateChoiceOptionLabelOperation, unknown, z.core.$ZodTypeInternals<UpdateChoiceOptionLabelOperation, unknown>>;
|
|
368
|
-
declare const surveyAssistantRemoveChoiceOptionOperationSchema: z.ZodType<RemoveChoiceOptionOperation, unknown, z.core.$ZodTypeInternals<RemoveChoiceOptionOperation, unknown>>;
|
|
369
|
-
declare const surveyAssistantReorderChoiceOptionsOperationSchema: z.ZodType<ReorderChoiceOptionsOperation, unknown, z.core.$ZodTypeInternals<ReorderChoiceOptionsOperation, unknown>>;
|
|
370
|
-
declare const surveyAssistantRemoveItemOperationSchema: z.ZodType<RemoveItemOperation, unknown, z.core.$ZodTypeInternals<RemoveItemOperation, unknown>>;
|
|
371
|
-
declare const surveyAssistantSurveyJsonPatchOperationSchema: z.ZodType<SurveyPatchOperation, unknown, z.core.$ZodTypeInternals<SurveyPatchOperation, unknown>>;
|
|
372
|
-
declare const surveyAssistantOperationSchema: z.ZodType<SurveyOperationShape, unknown, z.core.$ZodTypeInternals<SurveyOperationShape, unknown>>;
|
|
373
|
-
declare const surveyAssistantValidationIssueSchema: z.ZodType<SurveyValidationIssueShape, unknown, z.core.$ZodTypeInternals<SurveyValidationIssueShape, unknown>>;
|
|
374
|
-
declare const surveyAssistantValidationResultSchema: z.ZodType<SurveyValidationResultShape, unknown, z.core.$ZodTypeInternals<SurveyValidationResultShape, unknown>>;
|
|
375
|
-
type SurveyAssistantOperation = SurveyOperation;
|
|
376
|
-
type SurveyAssistantValidationIssue = SurveyValidationIssue;
|
|
377
|
-
type SurveyAssistantValidationResult = SurveyValidationResult;
|
|
378
|
-
type SurveyAssistantSurveyJsonPatchOperation = z.infer<typeof surveyPatchOperationSchema>;
|
|
379
|
-
//#endregion
|
|
380
26
|
//#region src/protocol/threads.d.ts
|
|
381
27
|
declare const SURVEY_ASSISTANT_ATTACHMENT_PART_TYPE: "data-survey-assistant-attachment";
|
|
382
28
|
interface SurveyAssistantAttachmentReference {
|
|
@@ -448,8 +94,8 @@ declare const surveyAssistantSuggestedTextSchema: z.ZodObject<{
|
|
|
448
94
|
}, z.core.$strip>;
|
|
449
95
|
type SurveyAssistantSuggestedText = z.infer<typeof surveyAssistantSuggestedTextSchema>;
|
|
450
96
|
declare const surveyAssistantKeySuggestionCategorySchema: z.ZodEnum<{
|
|
451
|
-
"survey-pattern": "survey-pattern";
|
|
452
97
|
compact: "compact";
|
|
98
|
+
"survey-pattern": "survey-pattern";
|
|
453
99
|
preferred: "preferred";
|
|
454
100
|
fair: "fair";
|
|
455
101
|
}>;
|
|
@@ -457,8 +103,8 @@ type SurveyAssistantKeySuggestionCategory = z.infer<typeof surveyAssistantKeySug
|
|
|
457
103
|
declare const surveyAssistantKeySuggestionSchema: z.ZodObject<{
|
|
458
104
|
text: z.ZodString;
|
|
459
105
|
category: z.ZodEnum<{
|
|
460
|
-
"survey-pattern": "survey-pattern";
|
|
461
106
|
compact: "compact";
|
|
107
|
+
"survey-pattern": "survey-pattern";
|
|
462
108
|
preferred: "preferred";
|
|
463
109
|
fair: "fair";
|
|
464
110
|
}>;
|
|
@@ -477,8 +123,8 @@ declare const surveyAssistantSuggestItemKeyResultSchema: z.ZodObject<{
|
|
|
477
123
|
suggestions: z.ZodArray<z.ZodObject<{
|
|
478
124
|
text: z.ZodString;
|
|
479
125
|
category: z.ZodEnum<{
|
|
480
|
-
"survey-pattern": "survey-pattern";
|
|
481
126
|
compact: "compact";
|
|
127
|
+
"survey-pattern": "survey-pattern";
|
|
482
128
|
preferred: "preferred";
|
|
483
129
|
fair: "fair";
|
|
484
130
|
}>;
|
|
@@ -1088,76 +734,5 @@ declare const surveyAssistantModelCatalogSchema: z.ZodObject<{
|
|
|
1088
734
|
type SurveyAssistantModelOption = z.infer<typeof surveyAssistantModelOptionSchema>;
|
|
1089
735
|
type SurveyAssistantModelCatalog = z.infer<typeof surveyAssistantModelCatalogSchema>;
|
|
1090
736
|
//#endregion
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
protocolVersion: 1;
|
|
1094
|
-
id: string;
|
|
1095
|
-
turnId: string;
|
|
1096
|
-
status: "validated" | "rejected";
|
|
1097
|
-
summary: string;
|
|
1098
|
-
operations: SurveyOperation[];
|
|
1099
|
-
supersedesChangeIds?: string[];
|
|
1100
|
-
precondition?: SurveyDocumentVersion;
|
|
1101
|
-
validation: SurveyValidationResult;
|
|
1102
|
-
createdAt: string;
|
|
1103
|
-
}
|
|
1104
|
-
interface SurveyAssistantTurnFinalShape {
|
|
1105
|
-
protocolVersion: 1;
|
|
1106
|
-
turnId: string;
|
|
1107
|
-
status: "completed" | "failed" | "aborted";
|
|
1108
|
-
executableChangeSetIds: string[];
|
|
1109
|
-
blockedChangeSetIds?: string[];
|
|
1110
|
-
createdAt: string;
|
|
1111
|
-
}
|
|
1112
|
-
type SurveyAssistantApplyPolicyShape = "auto" | "review" | "deny";
|
|
1113
|
-
declare const SURVEY_ASSISTANT_TURN_FINAL_DATA_NAME: "survey-assistant-turn-final";
|
|
1114
|
-
declare const SURVEY_ASSISTANT_TURN_FINAL_PART_TYPE: "data-survey-assistant-turn-final";
|
|
1115
|
-
type SurveyApplyStatusShape = "applied" | "rejected" | "stale" | "failed";
|
|
1116
|
-
interface SurveyApplyResultShape {
|
|
1117
|
-
status: SurveyApplyStatusShape;
|
|
1118
|
-
changeId: string;
|
|
1119
|
-
summary: string;
|
|
1120
|
-
message: string;
|
|
1121
|
-
appliedOperations: number;
|
|
1122
|
-
issues?: SurveyValidationIssue[];
|
|
1123
|
-
}
|
|
1124
|
-
interface SurveyBatchApplyResultShape {
|
|
1125
|
-
results: SurveyApplyResultShape[];
|
|
1126
|
-
}
|
|
1127
|
-
interface ApplyReceiptShape {
|
|
1128
|
-
protocolVersion: 1;
|
|
1129
|
-
turnId: string;
|
|
1130
|
-
changeSetId: string;
|
|
1131
|
-
beforeVersion: SurveyDocumentVersion;
|
|
1132
|
-
afterVersion?: SurveyDocumentVersion;
|
|
1133
|
-
status: SurveyApplyStatusShape;
|
|
1134
|
-
operationCount: number;
|
|
1135
|
-
commit?: {
|
|
1136
|
-
id?: string;
|
|
1137
|
-
index?: number;
|
|
1138
|
-
};
|
|
1139
|
-
issues?: SurveyValidationIssue[];
|
|
1140
|
-
createdAt: string;
|
|
1141
|
-
}
|
|
1142
|
-
declare const surveyChangeSetSchema: z.ZodType<SurveyChangeSetShape>;
|
|
1143
|
-
declare const surveyAssistantTurnFinalSchema: z.ZodType<SurveyAssistantTurnFinalShape>;
|
|
1144
|
-
declare const surveyAssistantApplyPolicySchema: z.ZodType<SurveyAssistantApplyPolicyShape>;
|
|
1145
|
-
declare const surveyApplyStatusSchema: z.ZodType<SurveyApplyStatusShape>;
|
|
1146
|
-
declare const surveyApplyResultSchema: z.ZodType<SurveyApplyResultShape>;
|
|
1147
|
-
declare const surveyBatchApplyResultSchema: z.ZodType<SurveyBatchApplyResultShape>;
|
|
1148
|
-
declare const applyReceiptSchema: z.ZodType<ApplyReceiptShape>;
|
|
1149
|
-
type SurveyChangeSet = z.infer<typeof surveyChangeSetSchema>;
|
|
1150
|
-
type SurveyAssistantTurnFinal = z.infer<typeof surveyAssistantTurnFinalSchema>;
|
|
1151
|
-
type SurveyAssistantApplyPolicy = z.infer<typeof surveyAssistantApplyPolicySchema>;
|
|
1152
|
-
type SurveyApplyStatus = z.infer<typeof surveyApplyStatusSchema>;
|
|
1153
|
-
type SurveyApplyResult = z.infer<typeof surveyApplyResultSchema>;
|
|
1154
|
-
type SurveyBatchApplyResult = z.infer<typeof surveyBatchApplyResultSchema>;
|
|
1155
|
-
type ApplyReceipt = z.infer<typeof applyReceiptSchema>;
|
|
1156
|
-
declare const surveyAssistantDraftChangeEventSchema: z.ZodType<SurveyChangeSetShape, unknown, z.core.$ZodTypeInternals<SurveyChangeSetShape, unknown>>;
|
|
1157
|
-
type SurveyAssistantDraftChangeEvent = SurveyChangeSet;
|
|
1158
|
-
type SurveyAssistantApplyStatus = SurveyApplyStatus;
|
|
1159
|
-
type SurveyAssistantApplyResult = SurveyApplyResult;
|
|
1160
|
-
type SurveyAssistantBatchApplyResult = SurveyBatchApplyResult;
|
|
1161
|
-
//#endregion
|
|
1162
|
-
export { surveyAssistantTranslateContentInputSchema as $, updateItemLabelOperationSchema as $t, SurveyAssistantSuggestItemKeyResult as A, surveyAssistantErrorInfoSchema as An, reorderChoiceOptionsOperationSchema as At, SurveyAssistantTranslateContentResult as B, surveyAssistantUpdateItemKeyOperationSchema as Bt, SurveyAssistantModelOption as C, jsonValueSchema as Cn, SurveyValidationResult as Ct, SurveyAssistantKeySuggestionCategory as D, parseSurveyAssistantError as Dn, patchItemConfigOperationSchema as Dt, SurveyAssistantKeySuggestion as E, SurveyAssistantErrorInfo as En, jsonPatchOperationSchema as Et, SurveyAssistantTaskInvocationMode as F, surveyAssistantRemoveItemOperationSchema as Ft, surveyAssistantSuggestItemLabelInputSchema as G, surveyJsonPatchOperationSchema as Gt, surveyAssistantKeySuggestionSchema as H, surveyAssistantUpdateItemTranslationOperationSchema as Ht, SurveyAssistantTaskItemSummary as I, surveyAssistantReorderChoiceOptionsOperationSchema as It, surveyAssistantTaskContextSchema as J, surveyValidationIssueSchema as Jt, surveyAssistantSuggestItemLabelResultSchema as K, surveyOperationSchema as Kt, SurveyAssistantTaskRequest as L, surveyAssistantSurveyJsonPatchOperationSchema as Lt, SurveyAssistantSuggestItemLabelResult as M, surveyAssistantCreateItemOperationSchema as Mt, SurveyAssistantSuggestedText as N, surveyAssistantOperationSchema as Nt, SurveyAssistantLabelSuggestion as O, serializeSurveyAssistantError as On, removeChoiceOptionOperationSchema as Ot, SurveyAssistantTaskContext as P, surveyAssistantRemoveChoiceOptionOperationSchema as Pt, surveyAssistantTranslateContentEntrySchema as Q, updateItemKeyOperationSchema as Qt, SurveyAssistantTranslateContentEntry as R, surveyAssistantUpdateChoiceOptionLabelOperationSchema as Rt, SurveyAssistantModelCatalog as S, SurveyContent as Sn, SurveyValidationIssue as St, surveyAssistantModelOptionSchema as T, SurveyAssistantErrorCode as Tn, createItemOperationSchema as Tt, surveyAssistantSuggestItemKeyInputSchema as U, surveyAssistantValidationIssueSchema as Ut, surveyAssistantKeySuggestionCategorySchema as V, surveyAssistantUpdateItemLabelOperationSchema as Vt, surveyAssistantSuggestItemKeyResultSchema as W, surveyAssistantValidationResultSchema as Wt, surveyAssistantTaskItemSummarySchema as X, updateChoiceOptionLabelOperationSchema as Xt, surveyAssistantTaskInvocationModeSchema as Y, surveyValidationResultSchema as Yt, surveyAssistantTaskRequestSchema as Z, updateItemColorOperationSchema as Zt, surveyAssistantApplyPolicySchema as _, surveyAssistantSnapshotSchema as _n, SurveyAssistantSurveyJsonPatchOperation as _t, SurveyApplyStatus as a, SurveyAssistantItemRegistryManifest as an, SurveyAssistantThreadList as at, surveyBatchApplyResultSchema as b, surveyEditorUIContextSchema as bn, SurveyOperation as bt, SurveyAssistantApplyStatus as c, SurveyAssistantSnapshot as cn, UpdateSurveyAssistantThreadInput as ct, SurveyAssistantTurnFinal as d, SurveyDocumentVersion as dn, surveyAssistantThreadSchema as dt, updateItemTranslationOperationSchema as en, surveyAssistantTranslateContentResultSchema as et, SurveyBatchApplyResult as f, SurveyEditorUIContext as fn, surveyAssistantThreadTranscriptSchema as ft, surveyApplyStatusSchema as g, surveyAssistantSnapshotPayloadSchema as gn, SurveyAssistantOperation as gt, surveyApplyResultSchema as h, surveyAssistantProtocolVersionSchema as hn, SURVEY_OPERATION_KINDS as ht, SurveyApplyResult as i, SurveyAssistantItemCreateStrategy as in, SurveyAssistantThread as it, SurveyAssistantSuggestItemLabelInput as j, surveyAssistantAddChoiceOptionOperationSchema as jt, SurveyAssistantSuggestItemKeyInput as k, surveyAssistantErrorCodeSchema as kn, removeItemOperationSchema as kt, SurveyAssistantBatchApplyResult as l, SurveyAssistantSnapshotPayload as ln, createSurveyAssistantThreadInputSchema as lt, applyReceiptSchema as m, surveyAssistantDraftChangePreconditionSchema as mn, JsonPatchOperation$1 as mt, SURVEY_ASSISTANT_TURN_FINAL_DATA_NAME as n, SURVEY_ASSISTANT_PROTOCOL_VERSION as nn, SURVEY_ASSISTANT_ATTACHMENT_PART_TYPE as nt, SurveyAssistantApplyPolicy as o, SurveyAssistantItemTypeManifestEntry as on, SurveyAssistantThreadTitleMode as ot, SurveyChangeSet as p, rawSurveyDocumentSchema as pn, updateSurveyAssistantThreadInputSchema as pt, surveyAssistantSuggestedTextSchema as q, surveyPatchOperationSchema as qt, SURVEY_ASSISTANT_TURN_FINAL_PART_TYPE as r, SurveyAssistantDraftChangePrecondition as rn, SurveyAssistantAttachmentReference as rt, SurveyAssistantApplyResult as s, SurveyAssistantProtocolVersion as sn, SurveyAssistantThreadTranscript as st, ApplyReceipt as t, RawSurveyDocument as tn, CreateSurveyAssistantThreadInput as tt, SurveyAssistantDraftChangeEvent as u, SurveyDocumentSnapshot as un, surveyAssistantThreadListSchema as ut, surveyAssistantDraftChangeEventSchema as v, surveyDocumentSnapshotSchema as vn, SurveyAssistantValidationIssue as vt, surveyAssistantModelCatalogSchema as w, surveyContentSchema as wn, addChoiceOptionOperationSchema as wt, surveyChangeSetSchema as x, JsonValue$1 as xn, SurveyOperationKind as xt, surveyAssistantTurnFinalSchema as y, surveyDocumentVersionSchema as yn, SurveyAssistantValidationResult as yt, SurveyAssistantTranslateContentInput as z, surveyAssistantUpdateItemColorOperationSchema as zt };
|
|
1163
|
-
//# sourceMappingURL=index-MEOL9_Gr.d.mts.map
|
|
737
|
+
export { surveyAssistantTaskRequestSchema as A, SurveyAssistantThreadTranscript as B, surveyAssistantSuggestItemKeyResultSchema as C, surveyAssistantTaskContextSchema as D, surveyAssistantSuggestedTextSchema as E, SURVEY_ASSISTANT_ATTACHMENT_PART_TYPE as F, surveyAssistantThreadTranscriptSchema as G, createSurveyAssistantThreadInputSchema as H, SurveyAssistantAttachmentReference as I, SurveyAssistantErrorInfo as J, updateSurveyAssistantThreadInputSchema as K, SurveyAssistantThread as L, surveyAssistantTranslateContentInputSchema as M, surveyAssistantTranslateContentResultSchema as N, surveyAssistantTaskInvocationModeSchema as O, CreateSurveyAssistantThreadInput as P, surveyAssistantErrorInfoSchema as Q, SurveyAssistantThreadList as R, surveyAssistantSuggestItemKeyInputSchema as S, surveyAssistantSuggestItemLabelResultSchema as T, surveyAssistantThreadListSchema as U, UpdateSurveyAssistantThreadInput as V, surveyAssistantThreadSchema as W, serializeSurveyAssistantError as X, parseSurveyAssistantError as Y, surveyAssistantErrorCodeSchema as Z, SurveyAssistantTranslateContentEntry as _, SurveyAssistantKeySuggestion as a, surveyAssistantKeySuggestionCategorySchema as b, SurveyAssistantSuggestItemKeyInput as c, SurveyAssistantSuggestItemLabelResult as d, SurveyAssistantSuggestedText as f, SurveyAssistantTaskRequest as g, SurveyAssistantTaskItemSummary as h, surveyAssistantModelOptionSchema as i, surveyAssistantTranslateContentEntrySchema as j, surveyAssistantTaskItemSummarySchema as k, SurveyAssistantSuggestItemKeyResult as l, SurveyAssistantTaskInvocationMode as m, SurveyAssistantModelOption as n, SurveyAssistantKeySuggestionCategory as o, SurveyAssistantTaskContext as p, SurveyAssistantErrorCode as q, surveyAssistantModelCatalogSchema as r, SurveyAssistantLabelSuggestion as s, SurveyAssistantModelCatalog as t, SurveyAssistantSuggestItemLabelInput as u, SurveyAssistantTranslateContentInput as v, surveyAssistantSuggestItemLabelInputSchema as w, surveyAssistantKeySuggestionSchema as x, SurveyAssistantTranslateContentResult as y, SurveyAssistantThreadTitleMode as z };
|
|
738
|
+
//# sourceMappingURL=index-D4OitUg4.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-D4OitUg4.d.mts","names":[],"sources":["../src/protocol/errors.ts","../src/protocol/threads.ts","../src/protocol/tasks.ts","../src/protocol/models.ts"],"mappings":"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"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { g as SurveyChangeSetShape } from "./lifecycle-DWv5CiSu.mjs";
|
|
1
2
|
import * as _$_mastra_core_tools0 from "@mastra/core/tools";
|
|
2
3
|
|
|
3
4
|
//#region src/server/tools/survey-audit-tool.d.ts
|
|
@@ -21,28 +22,19 @@ declare const surveyAssetTool: _$_mastra_core_tools0.Tool<{
|
|
|
21
22
|
name?: string | null | undefined;
|
|
22
23
|
filename?: string | null | undefined;
|
|
23
24
|
alt?: string | null | undefined;
|
|
24
|
-
},
|
|
25
|
+
}, SurveyChangeSetShape, unknown, unknown, _$_mastra_core_tools0.ToolExecutionContext<unknown, unknown, unknown>, "survey_asset", unknown>;
|
|
25
26
|
//#endregion
|
|
26
27
|
//#region src/server/tools/index.d.ts
|
|
27
28
|
declare const SURVEY_ASSISTANT_TOOL_IDS: readonly ["survey_inspect", "survey_change", "survey_expression", "survey_authoring_reference", "survey_attachment", "survey_audit", "survey_asset"];
|
|
28
29
|
declare const surveyAssistantTools: Readonly<{
|
|
29
30
|
survey_inspect: _$_mastra_core_tools0.Tool<{
|
|
30
|
-
action: "current-context" | "search-items" | "item-details" | "assets" | "raw-json";
|
|
31
|
-
reason: unknown;
|
|
32
|
-
scopes: unknown;
|
|
33
|
-
query: unknown;
|
|
34
|
-
itemRef: unknown;
|
|
35
|
-
cursor: unknown;
|
|
36
|
-
outlineMode: unknown;
|
|
37
|
-
paths: unknown;
|
|
38
|
-
includeChildren: unknown;
|
|
39
|
-
includeItemConfig: unknown;
|
|
40
|
-
limit: unknown;
|
|
41
|
-
} | {
|
|
42
|
-
action: "current-context" | "search-items" | "item-details" | "assets" | "raw-json";
|
|
31
|
+
action: "current-context" | "search-items" | "item-details" | "localization" | "assets" | "raw-json";
|
|
43
32
|
reason?: string | undefined;
|
|
44
33
|
scopes?: ("summary" | "selected-item" | "outline" | "response-slots" | "ui-context" | "history")[] | undefined;
|
|
45
34
|
query?: string | undefined;
|
|
35
|
+
sourceLocale?: string | undefined;
|
|
36
|
+
targetLocale?: string | undefined;
|
|
37
|
+
missingOnly?: boolean | undefined;
|
|
46
38
|
itemRef?: string | undefined;
|
|
47
39
|
cursor?: string | undefined;
|
|
48
40
|
outlineMode?: "full" | "focused" | "children" | undefined;
|
|
@@ -52,7 +44,7 @@ declare const surveyAssistantTools: Readonly<{
|
|
|
52
44
|
limit?: number | undefined;
|
|
53
45
|
}, {
|
|
54
46
|
ok: boolean;
|
|
55
|
-
action: "current-context" | "search-items" | "item-details" | "assets" | "raw-json";
|
|
47
|
+
action: "current-context" | "search-items" | "item-details" | "localization" | "assets" | "raw-json";
|
|
56
48
|
modelSummary: string;
|
|
57
49
|
reason?: string | undefined;
|
|
58
50
|
result?: unknown;
|
|
@@ -60,12 +52,12 @@ declare const surveyAssistantTools: Readonly<{
|
|
|
60
52
|
survey_change: _$_mastra_core_tools0.Tool<{
|
|
61
53
|
summary: string;
|
|
62
54
|
operations: unknown[];
|
|
63
|
-
},
|
|
55
|
+
}, SurveyChangeSetShape, unknown, unknown, _$_mastra_core_tools0.ToolExecutionContext<unknown, unknown, unknown>, "survey_change", unknown>;
|
|
64
56
|
survey_authoring_reference: _$_mastra_core_tools0.Tool<{
|
|
65
57
|
topic: string;
|
|
66
58
|
itemType?: string | undefined;
|
|
67
59
|
operationKind?: string | undefined;
|
|
68
|
-
detail?: "
|
|
60
|
+
detail?: "full" | "compact" | undefined;
|
|
69
61
|
reason?: string | undefined;
|
|
70
62
|
}, {
|
|
71
63
|
ok: boolean;
|
|
@@ -74,7 +66,7 @@ declare const surveyAssistantTools: Readonly<{
|
|
|
74
66
|
content: string;
|
|
75
67
|
itemType?: string | undefined;
|
|
76
68
|
operationKind?: string | undefined;
|
|
77
|
-
detail?: "
|
|
69
|
+
detail?: "full" | "compact" | undefined;
|
|
78
70
|
}, unknown, unknown, _$_mastra_core_tools0.ToolExecutionContext<unknown, unknown, unknown>, "survey_authoring_reference", unknown>;
|
|
79
71
|
survey_expression: _$_mastra_core_tools0.Tool<{
|
|
80
72
|
action: "context" | "prepare";
|
|
@@ -83,15 +75,45 @@ declare const surveyAssistantTools: Readonly<{
|
|
|
83
75
|
includeRawLocations?: boolean | undefined;
|
|
84
76
|
summary?: string | undefined;
|
|
85
77
|
mutations?: Record<string, unknown>[] | undefined;
|
|
86
|
-
},
|
|
78
|
+
}, SurveyChangeSetShape | {
|
|
79
|
+
ok: boolean;
|
|
80
|
+
action: "context";
|
|
81
|
+
modelSummary: string;
|
|
82
|
+
listOrdering: Record<string, string>;
|
|
83
|
+
responseSlots: {
|
|
84
|
+
ref: string;
|
|
85
|
+
valueType?: string | undefined;
|
|
86
|
+
}[];
|
|
87
|
+
expressionLocations?: {
|
|
88
|
+
itemId: string;
|
|
89
|
+
key: string;
|
|
90
|
+
itemType: string;
|
|
91
|
+
rawIndex: number;
|
|
92
|
+
locations: string[];
|
|
93
|
+
}[] | undefined;
|
|
94
|
+
}, unknown, unknown, _$_mastra_core_tools0.ToolExecutionContext<unknown, unknown, unknown>, "survey_expression", unknown>;
|
|
87
95
|
survey_attachment: _$_mastra_core_tools0.Tool<{
|
|
88
|
-
documentIds
|
|
96
|
+
documentIds?: string[] | undefined;
|
|
97
|
+
documentRequests?: {
|
|
98
|
+
documentId: string;
|
|
99
|
+
pages?: {
|
|
100
|
+
start: number;
|
|
101
|
+
end: number;
|
|
102
|
+
} | undefined;
|
|
103
|
+
focus?: string | undefined;
|
|
104
|
+
}[] | undefined;
|
|
89
105
|
}, {
|
|
90
106
|
loaded: {
|
|
91
107
|
id: string;
|
|
92
108
|
filename: string;
|
|
93
109
|
mediaType: string;
|
|
110
|
+
pages?: {
|
|
111
|
+
start: number;
|
|
112
|
+
end: number;
|
|
113
|
+
} | undefined;
|
|
114
|
+
focus?: string | undefined;
|
|
94
115
|
}[];
|
|
116
|
+
warnings?: string[] | undefined;
|
|
95
117
|
}, unknown, unknown, _$_mastra_core_tools0.ToolExecutionContext<unknown, unknown, unknown>, "survey_attachment", unknown>;
|
|
96
118
|
survey_audit: _$_mastra_core_tools0.Tool<{
|
|
97
119
|
sourceLocale?: string | undefined;
|
|
@@ -111,8 +133,8 @@ declare const surveyAssistantTools: Readonly<{
|
|
|
111
133
|
name?: string | null | undefined;
|
|
112
134
|
filename?: string | null | undefined;
|
|
113
135
|
alt?: string | null | undefined;
|
|
114
|
-
},
|
|
136
|
+
}, SurveyChangeSetShape, unknown, unknown, _$_mastra_core_tools0.ToolExecutionContext<unknown, unknown, unknown>, "survey_asset", unknown>;
|
|
115
137
|
}>;
|
|
116
138
|
//#endregion
|
|
117
139
|
export { surveyAuditTool as i, surveyAssistantTools as n, surveyAssetTool as r, SURVEY_ASSISTANT_TOOL_IDS as t };
|
|
118
|
-
//# sourceMappingURL=index-
|
|
140
|
+
//# sourceMappingURL=index-DZk20e3k.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DZk20e3k.d.mts","names":[],"sources":["../src/server/tools/survey-audit-tool.ts","../src/server/tools/survey-asset-tool.ts","../src/server/tools/index.ts"],"mappings":";;;;cA4Ga,eAAA,EAwBX,qBAAA,CAxB0B,IAAA;;;;;;;;;qBAwB1B,qBAAA,CAAA,oBAAA;;;cCiCW,eAAA,wBAAe,IAAA;;;;;;;;GA6H1B,oBAAA;;;cCvRW,yBAAA;AAAA,cAUA,oBAAA,EAAoB,QAAA;;;;;;;;;;;;;;;;;;;;;;uBAQ/B,qBAAA,CAAA,oBAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { B as SurveyAssistantThreadTranscript, L as SurveyAssistantThread, n as SurveyAssistantModelOption, q as SurveyAssistantErrorCode, t as SurveyAssistantModelCatalog } from "./index-D4OitUg4.mjs";
|
|
2
|
+
import { f as SurveyAssistantTurnFinal, h as SurveyChangeSet, i as SurveyApplyResult, s as SurveyAssistantApplyPolicy, t as ApplyReceipt, wt as SurveyDocumentVersion, xt as SurveyAssistantSnapshot } from "./lifecycle-DWv5CiSu.mjs";
|
|
3
|
+
import { a as SurveyAssistantController, m as SurveyAssistantLaunchUIContext } from "./controller-proxy-DmBdzqKs.mjs";
|
|
3
4
|
import * as _$ai from "ai";
|
|
4
5
|
import { ChatStatus, DefaultChatTransport, FileUIPart, UIMessage } from "ai";
|
|
5
6
|
|
|
@@ -52,6 +53,12 @@ type SurveyTurnAuthorization = {
|
|
|
52
53
|
changeSets: SurveyChangeSet[];
|
|
53
54
|
};
|
|
54
55
|
type SurveyTurnOutcome = {
|
|
56
|
+
status: "failed";
|
|
57
|
+
terminationReason?: SurveyAssistantTurnFinal["terminationReason"];
|
|
58
|
+
} | {
|
|
59
|
+
status: "aborted";
|
|
60
|
+
terminationReason?: SurveyAssistantTurnFinal["terminationReason"];
|
|
61
|
+
} | {
|
|
55
62
|
status: "blocked";
|
|
56
63
|
blockedChangeSetCount: number;
|
|
57
64
|
} | {
|
|
@@ -173,6 +180,8 @@ interface SurveyAssistantSessionOptions {
|
|
|
173
180
|
interface SurveyAssistantSubmitMessage {
|
|
174
181
|
text: string;
|
|
175
182
|
files: FileUIPart[];
|
|
183
|
+
/** Optional model used for this turn instead of the session's selected model. */
|
|
184
|
+
modelId?: string;
|
|
176
185
|
/** Turn-local UI context layered over the controller snapshot for this submission. */
|
|
177
186
|
uiContext?: SurveyAssistantLaunchUIContext;
|
|
178
187
|
}
|
|
@@ -206,4 +215,4 @@ declare const useSurveyAssistantSession: ({
|
|
|
206
215
|
}: SurveyAssistantSessionOptions) => SurveyAssistantSession;
|
|
207
216
|
//#endregion
|
|
208
217
|
export { SurveyAssistantSessionEvent as C, reduceSurveyAssistantSessionState as E, unwrapSurveyAssistantToolOutput as S, isSurveyAssistantTurnActive as T, createApplyReceipts as _, SurveyAssistantModelCatalogClient as a, resolveLatestSurveyTurnAuthorization as b, createSurveyAssistantModelCatalogClient as c, SurveyAssistantThreadClient as d, createSurveyAssistantThreadClient as f, collectSurveyChangeSets as g, SurveyTurnOutcome as h, useSurveyAssistantSession as i, useSurveyAssistantModelCatalog as l, SurveyTurnAuthorization as m, SurveyAssistantSessionOptions as n, SurveyAssistantModelCatalogState as o, createSurveyAssistantTransport as p, SurveyAssistantSubmitMessage as r, UseSurveyAssistantModelCatalogOptions as s, SurveyAssistantSession as t, SurveyAssistantClientError as u, getSurveyDocumentVersionFromSnapshot as v, SurveyAssistantSessionState as w, resolveSurveyTurnOutcome as x, parseSurveyChangeSet as y };
|
|
209
|
-
//# sourceMappingURL=index-
|
|
218
|
+
//# sourceMappingURL=index-Dxgg0-D_.d.mts.map
|