@case-framework/survey-assistant 0.6.0 → 0.8.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/README.md +67 -7
- package/dist/{attachments-B0hg3vpT.mjs → attachments-BuNni5vB.mjs} +1 -1
- package/dist/{attachments-B0hg3vpT.mjs.map → attachments-BuNni5vB.mjs.map} +1 -1
- package/dist/{authoring-references-CW38pYzK.mjs → authoring-references-DbuOKerg.mjs} +13 -4
- package/dist/authoring-references-DbuOKerg.mjs.map +1 -0
- package/dist/{capabilities-DVTfogjv.d.mts → capabilities-CmeeAjEc.d.mts} +3 -4
- package/dist/capabilities-CmeeAjEc.d.mts.map +1 -0
- package/dist/capabilities-DCMA71PP.mjs +58 -0
- package/dist/capabilities-DCMA71PP.mjs.map +1 -0
- package/dist/capabilities-default.d.mts +13 -12
- package/dist/capabilities-default.d.mts.map +1 -1
- package/dist/capabilities-default.mjs +2 -414
- package/dist/{constants-BMGTgfjv.d.mts → constants-B6HzpEsx.d.mts} +7 -28
- package/dist/constants-B6HzpEsx.d.mts.map +1 -0
- package/dist/{constants-0UHGFcRJ.mjs → constants-Ct-vv9cu.mjs} +1 -1
- package/dist/{constants-0UHGFcRJ.mjs.map → constants-Ct-vv9cu.mjs.map} +1 -1
- package/dist/controller-proxy-D7uQfm5f.d.mts +65 -0
- package/dist/controller-proxy-D7uQfm5f.d.mts.map +1 -0
- package/dist/{controller-proxy-DMTqer6T.mjs → controller-proxy-DEeFl9IA.mjs} +29 -26
- package/dist/controller-proxy-DEeFl9IA.mjs.map +1 -0
- package/dist/default-fhSon2RM.mjs +760 -0
- package/dist/default-fhSon2RM.mjs.map +1 -0
- package/dist/{digest-SJmoYVaK.d.mts → digest-C39WyAWG.d.mts} +2 -3
- package/dist/digest-C39WyAWG.d.mts.map +1 -0
- package/dist/digest.d.mts +1 -1
- package/dist/digest.mjs.map +1 -1
- package/dist/{engine-CQwOAcwK.mjs → engine-nXoCWYpQ.mjs} +2821 -2018
- package/dist/engine-nXoCWYpQ.mjs.map +1 -0
- package/dist/engine.d.mts +3 -3
- package/dist/engine.mjs +3 -3
- package/dist/{fair-guidance-CRYCRxQm.mjs → fair-guidance-BmO4PswW.mjs} +1 -1
- package/dist/{fair-guidance-CRYCRxQm.mjs.map → fair-guidance-BmO4PswW.mjs.map} +1 -1
- package/dist/{index-D6nqkz0O.d.mts → index-Ciq7vHIs.d.mts} +121 -197
- package/dist/index-Ciq7vHIs.d.mts.map +1 -0
- package/dist/{index-DvTqML-0.d.mts → index-D7wT6P3t.d.mts} +294 -63
- package/dist/index-D7wT6P3t.d.mts.map +1 -0
- package/dist/index-WB5kfnz0.d.mts +348 -0
- package/dist/index-WB5kfnz0.d.mts.map +1 -0
- package/dist/{index-B0lxsAzx.d.mts → index-r5riv4md.d.mts} +50 -29
- package/dist/index-r5riv4md.d.mts.map +1 -0
- package/dist/{lifecycle-BmGAIUlv.d.mts → lifecycle-Dm8u7QFh.d.mts} +40 -18
- package/dist/lifecycle-Dm8u7QFh.d.mts.map +1 -0
- package/dist/{memory-thread-repository-CjFGVNZh.mjs → memory-thread-repository-DAnOGIB3.mjs} +89 -34
- package/dist/memory-thread-repository-DAnOGIB3.mjs.map +1 -0
- package/dist/{protocol-DJUP4gc0.mjs → protocol-CF4Bh_Ch.mjs} +182 -50
- package/dist/protocol-CF4Bh_Ch.mjs.map +1 -0
- package/dist/protocol.d.mts +4 -4
- package/dist/protocol.mjs +3 -3
- package/dist/react-C_GY-Fsc.mjs +1727 -0
- package/dist/react-C_GY-Fsc.mjs.map +1 -0
- package/dist/react-integration.d.mts +2 -2
- package/dist/react-integration.mjs +2 -2
- package/dist/react.d.mts +3 -3
- package/dist/react.mjs +3 -3
- package/dist/references/assistant-operations.md +143 -68
- package/dist/references/core-rules.md +6 -3
- package/dist/references/embedded-forms.md +34 -14
- package/dist/references/expressions.md +238 -48
- package/dist/references/fair-by-design.md +9 -9
- package/dist/references/item-types.md +306 -72
- package/dist/references/localization.md +5 -4
- package/dist/references/response-variables.md +38 -0
- package/dist/references/rich-text-content.md +60 -27
- package/dist/references/source-material-surveys.md +13 -5
- package/dist/references/survey-data-model.md +32 -9
- package/dist/{request-context-BjTHNcDd.mjs → request-context-Dg4jSwN1.mjs} +4 -10
- package/dist/request-context-Dg4jSwN1.mjs.map +1 -0
- package/dist/{request-guardrails-TmgQtqp4.mjs → request-guardrails-C0ugBOp0.mjs} +6 -5
- package/dist/request-guardrails-C0ugBOp0.mjs.map +1 -0
- package/dist/server-agent.d.mts +53 -44
- package/dist/server-agent.d.mts.map +1 -1
- package/dist/server-agent.mjs +48 -27
- package/dist/server-agent.mjs.map +1 -1
- package/dist/server-runtime.d.mts +36 -49
- package/dist/server-runtime.d.mts.map +1 -1
- package/dist/server-runtime.mjs +17 -12
- package/dist/server-runtime.mjs.map +1 -1
- package/dist/server-tasks.d.mts +2 -2
- package/dist/server-tasks.mjs +2 -313
- package/dist/server-tools.d.mts +1 -1
- package/dist/server-tools.mjs +1 -1
- package/dist/server.d.mts +13 -36
- package/dist/server.d.mts.map +1 -1
- package/dist/server.mjs +5 -5
- package/dist/server.mjs.map +1 -1
- package/dist/storage-postgres.d.mts +9 -25
- package/dist/storage-postgres.d.mts.map +1 -1
- package/dist/storage-postgres.mjs +5 -4
- package/dist/storage-postgres.mjs.map +1 -1
- package/dist/{tasks-DxzD25Zc.d.mts → tasks-B9h3LPam.d.mts} +19 -35
- package/dist/tasks-B9h3LPam.d.mts.map +1 -0
- package/dist/tasks-BZEiwgxA.mjs +396 -0
- package/dist/tasks-BZEiwgxA.mjs.map +1 -0
- package/dist/thread-documents-DrHbaXqP.d.mts +119 -0
- package/dist/thread-documents-DrHbaXqP.d.mts.map +1 -0
- package/dist/{thread-handlers-AbQbt4sX.d.mts → thread-handlers-Bef0td9N.d.mts} +10 -40
- package/dist/thread-handlers-Bef0td9N.d.mts.map +1 -0
- package/dist/{tools-CFh35R4d.mjs → tools-CEsv-WoO.mjs} +705 -578
- package/dist/tools-CEsv-WoO.mjs.map +1 -0
- package/dist/ui.css +1 -1
- package/dist/ui.d.mts +17 -55
- package/dist/ui.d.mts.map +1 -1
- package/dist/ui.mjs +759 -171
- package/dist/ui.mjs.map +1 -1
- package/docs/integration.md +51 -1
- package/package.json +49 -42
- package/dist/authoring-references-CW38pYzK.mjs.map +0 -1
- package/dist/capabilities-DVTfogjv.d.mts.map +0 -1
- package/dist/capabilities-default.mjs.map +0 -1
- package/dist/constants-BMGTgfjv.d.mts.map +0 -1
- package/dist/controller-proxy-DMTqer6T.mjs.map +0 -1
- package/dist/controller-proxy-mRvez2qw.d.mts +0 -85
- package/dist/controller-proxy-mRvez2qw.d.mts.map +0 -1
- package/dist/digest-SJmoYVaK.d.mts.map +0 -1
- package/dist/engine-CQwOAcwK.mjs.map +0 -1
- package/dist/form-authoring-kQDgC5oz.mjs +0 -155
- package/dist/form-authoring-kQDgC5oz.mjs.map +0 -1
- package/dist/index-B0lxsAzx.d.mts.map +0 -1
- package/dist/index-BS-Xjk1h.d.mts +0 -224
- package/dist/index-BS-Xjk1h.d.mts.map +0 -1
- package/dist/index-D6nqkz0O.d.mts.map +0 -1
- package/dist/index-DvTqML-0.d.mts.map +0 -1
- package/dist/lifecycle-BmGAIUlv.d.mts.map +0 -1
- package/dist/memory-thread-repository-CjFGVNZh.mjs.map +0 -1
- package/dist/protocol-DJUP4gc0.mjs.map +0 -1
- package/dist/react-Dqlmasrs.mjs +0 -768
- package/dist/react-Dqlmasrs.mjs.map +0 -1
- package/dist/request-context-BjTHNcDd.mjs.map +0 -1
- package/dist/request-guardrails-TmgQtqp4.mjs.map +0 -1
- package/dist/server-tasks.mjs.map +0 -1
- package/dist/tasks-DxzD25Zc.d.mts.map +0 -1
- package/dist/thread-documents-rmd6nyX9.d.mts +0 -107
- package/dist/thread-documents-rmd6nyX9.d.mts.map +0 -1
- package/dist/thread-handlers-AbQbt4sX.d.mts.map +0 -1
- package/dist/tools-CFh35R4d.mjs.map +0 -1
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import { G as SurveyAssistantThread, J as SurveyAssistantThreadTranscript, K as SurveyAssistantThreadList, W as SurveyAssistantAttachmentReference, lt as SurveyAssistantErrorCode, n as SurveyAssistantModelOption, t as SurveyAssistantModelCatalog, ut as SurveyAssistantErrorInfo } from "./index-D7wT6P3t.mjs";
|
|
2
|
+
import { St as SurveyDocumentVersion, f as SurveyAssistantTurnFinal, h as SurveyChangeSet, i as SurveyApplyResult, o as SurveyAssistantApplyOutcome, s as SurveyAssistantApplyPolicy, t as ApplyReceipt, yt as SurveyAssistantSnapshot } from "./lifecycle-Dm8u7QFh.mjs";
|
|
3
|
+
import { l as SurveyAssistantController, u as SurveyAssistantLaunchUIContext } from "./controller-proxy-D7uQfm5f.mjs";
|
|
4
|
+
import { ChatStatus, DefaultChatTransport, FileUIPart, UIMessage } from "ai";
|
|
5
|
+
//#region src/react/session-state.d.ts
|
|
6
|
+
type SurveyAssistantSessionState = "idle" | "submitting" | "streaming" | "completed" | "failed" | "aborted" | "applying" | "applied";
|
|
7
|
+
type SurveyAssistantSessionEvent = {
|
|
8
|
+
type: "submit";
|
|
9
|
+
} | {
|
|
10
|
+
type: "stream-started";
|
|
11
|
+
} | {
|
|
12
|
+
type: "completed";
|
|
13
|
+
} | {
|
|
14
|
+
type: "apply-started";
|
|
15
|
+
} | {
|
|
16
|
+
type: "applied";
|
|
17
|
+
} | {
|
|
18
|
+
type: "failed";
|
|
19
|
+
} | {
|
|
20
|
+
type: "aborted";
|
|
21
|
+
} | {
|
|
22
|
+
type: "reset";
|
|
23
|
+
hasTranscript: boolean;
|
|
24
|
+
};
|
|
25
|
+
declare const isSurveyAssistantTurnActive: ({ isStreaming, state }: {
|
|
26
|
+
isStreaming: boolean;
|
|
27
|
+
state: SurveyAssistantSessionState;
|
|
28
|
+
}) => boolean;
|
|
29
|
+
declare const reduceSurveyAssistantSessionState: (_state: SurveyAssistantSessionState, event: SurveyAssistantSessionEvent) => SurveyAssistantSessionState;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/react/turn-authorization.d.ts
|
|
32
|
+
declare const unwrapSurveyAssistantToolOutput: (output: unknown) => unknown;
|
|
33
|
+
declare const parseSurveyChangeSet: (output: unknown) => SurveyChangeSet | null;
|
|
34
|
+
declare const collectSurveyChangeSets: (messages: UIMessage[]) => SurveyChangeSet[];
|
|
35
|
+
type SurveyTurnAuthorization = {
|
|
36
|
+
status: "pending";
|
|
37
|
+
} | {
|
|
38
|
+
status: "invalid";
|
|
39
|
+
reason: string;
|
|
40
|
+
turnId?: string;
|
|
41
|
+
} | {
|
|
42
|
+
status: "failed" | "aborted";
|
|
43
|
+
turnFinal: SurveyAssistantTurnFinal;
|
|
44
|
+
changeSets: [];
|
|
45
|
+
} | {
|
|
46
|
+
status: "completed";
|
|
47
|
+
turnFinal: SurveyAssistantTurnFinal;
|
|
48
|
+
changeSets: SurveyChangeSet[];
|
|
49
|
+
};
|
|
50
|
+
type SurveyTurnOutcome = {
|
|
51
|
+
status: "failed";
|
|
52
|
+
terminationReason?: SurveyAssistantTurnFinal["terminationReason"];
|
|
53
|
+
} | {
|
|
54
|
+
status: "aborted";
|
|
55
|
+
terminationReason?: SurveyAssistantTurnFinal["terminationReason"];
|
|
56
|
+
} | {
|
|
57
|
+
status: "blocked";
|
|
58
|
+
blockedChangeSetCount: number;
|
|
59
|
+
} | {
|
|
60
|
+
status: "apply-failed";
|
|
61
|
+
appliedChangeSetCount: number;
|
|
62
|
+
failedChangeSetCount: number;
|
|
63
|
+
};
|
|
64
|
+
declare const resolveLatestSurveyTurnAuthorization: (messages: UIMessage[]) => SurveyTurnAuthorization;
|
|
65
|
+
declare const resolveSurveyTurnOutcome: ({ applyResultsByChangeId, authorization }: {
|
|
66
|
+
applyResultsByChangeId: Record<string, SurveyApplyResult>;
|
|
67
|
+
authorization: SurveyTurnAuthorization;
|
|
68
|
+
}) => SurveyTurnOutcome | null;
|
|
69
|
+
declare const getSurveyDocumentVersionFromSnapshot: (snapshot: SurveyAssistantSnapshot) => SurveyDocumentVersion;
|
|
70
|
+
declare const createApplyReceipts: ({ afterSnapshot, beforeSnapshot, changeSets, results, turnFinal, createdAt }: {
|
|
71
|
+
afterSnapshot: SurveyAssistantSnapshot | null;
|
|
72
|
+
beforeSnapshot: SurveyAssistantSnapshot;
|
|
73
|
+
changeSets: SurveyChangeSet[];
|
|
74
|
+
results: SurveyApplyResult[];
|
|
75
|
+
turnFinal: SurveyAssistantTurnFinal;
|
|
76
|
+
createdAt?: string;
|
|
77
|
+
}) => ApplyReceipt[];
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/react/transport.d.ts
|
|
80
|
+
declare const createSurveyAssistantTransport: ({ api, resourceId, surveyId, threadId }: {
|
|
81
|
+
api?: string;
|
|
82
|
+
resourceId: string;
|
|
83
|
+
surveyId?: string;
|
|
84
|
+
threadId: string;
|
|
85
|
+
}) => DefaultChatTransport<UIMessage<unknown, import("ai").UIDataTypes, import("ai").UITools>>;
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/react/thread-client.d.ts
|
|
88
|
+
interface SurveyAssistantThreadClient {
|
|
89
|
+
delete(threadId: string): Promise<void>;
|
|
90
|
+
create(title?: string): Promise<SurveyAssistantThread>;
|
|
91
|
+
listPage(options?: {
|
|
92
|
+
cursor?: string;
|
|
93
|
+
}): Promise<SurveyAssistantThreadList>;
|
|
94
|
+
read(threadId: string, cursor?: string, options?: {
|
|
95
|
+
signal?: AbortSignal;
|
|
96
|
+
}): Promise<SurveyAssistantThreadTranscript>;
|
|
97
|
+
rename(threadId: string, title: string): Promise<SurveyAssistantThread>;
|
|
98
|
+
setAutomaticTitle(threadId: string, title?: string): Promise<SurveyAssistantThread>;
|
|
99
|
+
}
|
|
100
|
+
declare const createSurveyAssistantThreadClient: (api?: string) => SurveyAssistantThreadClient;
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/react/client-error.d.ts
|
|
103
|
+
declare class SurveyAssistantClientError extends Error {
|
|
104
|
+
readonly code: SurveyAssistantErrorCode;
|
|
105
|
+
readonly retryable: boolean;
|
|
106
|
+
readonly upstreamStatus?: number;
|
|
107
|
+
readonly providerRequestId?: string;
|
|
108
|
+
readonly providerMessage?: string;
|
|
109
|
+
constructor(code: SurveyAssistantErrorCode, message: string, retryable?: boolean, diagnostics?: Pick<SurveyAssistantErrorInfo, "providerMessage" | "providerRequestId" | "upstreamStatus">);
|
|
110
|
+
}
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region src/react/support-bundle-limits.d.ts
|
|
113
|
+
interface SurveyAssistantSupportBundleLimits {
|
|
114
|
+
attemptEvents: number;
|
|
115
|
+
attemptStoreBytes: number;
|
|
116
|
+
bundleBytes: number;
|
|
117
|
+
emailWarningBytes: number;
|
|
118
|
+
retainedAttempts: number;
|
|
119
|
+
transcriptBytes: number;
|
|
120
|
+
transcriptMessages: number;
|
|
121
|
+
transcriptPages: number;
|
|
122
|
+
zipEntryBytes: number;
|
|
123
|
+
}
|
|
124
|
+
declare const SURVEY_ASSISTANT_DEFAULT_SUPPORT_BUNDLE_LIMITS: {
|
|
125
|
+
readonly attemptEvents: 200;
|
|
126
|
+
readonly attemptStoreBytes: number;
|
|
127
|
+
readonly bundleBytes: number;
|
|
128
|
+
readonly emailWarningBytes: number;
|
|
129
|
+
readonly retainedAttempts: 5;
|
|
130
|
+
readonly transcriptBytes: number;
|
|
131
|
+
readonly transcriptMessages: 2000;
|
|
132
|
+
readonly transcriptPages: 20;
|
|
133
|
+
readonly zipEntryBytes: number;
|
|
134
|
+
};
|
|
135
|
+
declare const resolveSurveyAssistantSupportBundleLimits: (overrides?: Partial<SurveyAssistantSupportBundleLimits>) => SurveyAssistantSupportBundleLimits;
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region src/react/diagnostic-store.d.ts
|
|
138
|
+
type SurveyAssistantDiagnosticEventFields = Record<string, boolean | number | string | null | undefined>;
|
|
139
|
+
interface SurveyAssistantDiagnosticEvent {
|
|
140
|
+
at: string;
|
|
141
|
+
event: string;
|
|
142
|
+
fields?: SurveyAssistantDiagnosticEventFields;
|
|
143
|
+
}
|
|
144
|
+
interface SurveyAssistantDiagnosticAttachmentReference {
|
|
145
|
+
bytes: number;
|
|
146
|
+
filename: string;
|
|
147
|
+
mediaType: string;
|
|
148
|
+
sessionContentDigest: string;
|
|
149
|
+
storeKey: string;
|
|
150
|
+
}
|
|
151
|
+
interface SurveyAssistantDiagnosticAttempt {
|
|
152
|
+
applyOutcome?: SurveyAssistantApplyOutcome;
|
|
153
|
+
applyReceipts?: ApplyReceipt[];
|
|
154
|
+
attachments: SurveyAssistantDiagnosticAttachmentReference[];
|
|
155
|
+
captureFailure?: string;
|
|
156
|
+
error?: SurveyAssistantErrorInfo;
|
|
157
|
+
events: SurveyAssistantDiagnosticEvent[];
|
|
158
|
+
messages?: unknown[];
|
|
159
|
+
modelId?: string;
|
|
160
|
+
requestId: string;
|
|
161
|
+
resourceId: string;
|
|
162
|
+
submittedAt: string;
|
|
163
|
+
submittedSurvey?: SurveyAssistantSnapshot | null;
|
|
164
|
+
threadId: string;
|
|
165
|
+
turnFinal?: SurveyAssistantTurnFinal;
|
|
166
|
+
}
|
|
167
|
+
interface StoredAttachment extends SurveyAssistantDiagnosticAttachmentReference {
|
|
168
|
+
dataUrl?: string;
|
|
169
|
+
retainedBytes: number;
|
|
170
|
+
}
|
|
171
|
+
interface SurveyAssistantDiagnosticStore {
|
|
172
|
+
beginAttempt(input: {
|
|
173
|
+
attachmentReferences?: SurveyAssistantAttachmentReference[];
|
|
174
|
+
files: FileUIPart[];
|
|
175
|
+
modelId?: string;
|
|
176
|
+
requestId?: string;
|
|
177
|
+
resourceId: string;
|
|
178
|
+
submittedSurvey: SurveyAssistantSnapshot | null;
|
|
179
|
+
threadId: string;
|
|
180
|
+
}): string;
|
|
181
|
+
deleteThread(threadId: string): void;
|
|
182
|
+
getAttachment(storeKey: string): StoredAttachment | undefined;
|
|
183
|
+
getExportAttempt(threadId: string): SurveyAssistantDiagnosticAttempt | undefined;
|
|
184
|
+
recordApplyOutcome(threadId: string, outcome: SurveyAssistantApplyOutcome): void;
|
|
185
|
+
recordApplyReceipts(threadId: string, receipts: ApplyReceipt[]): void;
|
|
186
|
+
recordEvent(threadId: string, event: string, fields?: SurveyAssistantDiagnosticEventFields): void;
|
|
187
|
+
recordFailure(threadId: string, messages: unknown[], error: SurveyAssistantErrorInfo): void;
|
|
188
|
+
recordTurnFinal(threadId: string, turnFinal: SurveyAssistantTurnFinal): void;
|
|
189
|
+
}
|
|
190
|
+
declare const createSurveyAssistantDiagnosticId: (prefix?: string) => string;
|
|
191
|
+
declare const createSurveyAssistantDiagnosticStore: (overrides?: Partial<SurveyAssistantSupportBundleLimits>) => SurveyAssistantDiagnosticStore;
|
|
192
|
+
//#endregion
|
|
193
|
+
//#region src/react/support-bundle.d.ts
|
|
194
|
+
type SurveyAssistantSupportBundleCategory = "attachments" | "conversation" | "survey";
|
|
195
|
+
type SurveyAssistantSupportBundleSelection = Record<SurveyAssistantSupportBundleCategory, boolean>;
|
|
196
|
+
declare const SURVEY_ASSISTANT_DEFAULT_SUPPORT_BUNDLE_SELECTION: {
|
|
197
|
+
readonly attachments: true;
|
|
198
|
+
readonly conversation: true;
|
|
199
|
+
readonly survey: true;
|
|
200
|
+
};
|
|
201
|
+
interface SurveyAssistantSupportBundleConfig {
|
|
202
|
+
/** Set to false to disable support-bundle preparation and generation. Defaults to true. */
|
|
203
|
+
enabled?: boolean;
|
|
204
|
+
hostBuildVersion?: string;
|
|
205
|
+
limits?: Partial<SurveyAssistantSupportBundleLimits>;
|
|
206
|
+
packageVersion?: string;
|
|
207
|
+
subjectPrefix?: string;
|
|
208
|
+
supportEmail?: string;
|
|
209
|
+
}
|
|
210
|
+
declare const isSurveyAssistantSupportBundleEnabled: (config?: SurveyAssistantSupportBundleConfig) => boolean;
|
|
211
|
+
interface PreparedEntry {
|
|
212
|
+
bytes: Uint8Array;
|
|
213
|
+
category: SurveyAssistantSupportBundleCategory;
|
|
214
|
+
path: string;
|
|
215
|
+
source: "authorized-transcript" | "browser-session";
|
|
216
|
+
}
|
|
217
|
+
interface UnavailableComponent {
|
|
218
|
+
bytes?: number;
|
|
219
|
+
category: SurveyAssistantSupportBundleCategory;
|
|
220
|
+
filename?: string;
|
|
221
|
+
mediaType?: string;
|
|
222
|
+
reason: "capture-failed" | "no-attempt-retained" | "not-retained" | "too-large" | "unavailable";
|
|
223
|
+
path?: string;
|
|
224
|
+
}
|
|
225
|
+
interface PreparedSurveyAssistantSupportBundle {
|
|
226
|
+
attempt?: SurveyAssistantDiagnosticAttempt;
|
|
227
|
+
categoryBytes: Record<SurveyAssistantSupportBundleCategory, number>;
|
|
228
|
+
currentSurveyCapturedAt: string;
|
|
229
|
+
entries: PreparedEntry[];
|
|
230
|
+
limits: SurveyAssistantSupportBundleLimits;
|
|
231
|
+
resourceId: string;
|
|
232
|
+
threadId: string;
|
|
233
|
+
unavailable: UnavailableComponent[];
|
|
234
|
+
}
|
|
235
|
+
interface GeneratedSurveyAssistantSupportBundle {
|
|
236
|
+
blob: Blob;
|
|
237
|
+
filename: string;
|
|
238
|
+
generatedAt: string;
|
|
239
|
+
includedCategories: SurveyAssistantSupportBundleCategory[];
|
|
240
|
+
size: number;
|
|
241
|
+
}
|
|
242
|
+
declare const sanitizeSurveyAssistantSupportValue: (value: unknown) => {
|
|
243
|
+
redactions: number;
|
|
244
|
+
truncated: boolean;
|
|
245
|
+
value: unknown;
|
|
246
|
+
};
|
|
247
|
+
declare const prepareSurveyAssistantSupportBundle: ({ config, controller, diagnosticStore, resourceId, signal, threadClient, threadId }: {
|
|
248
|
+
config?: SurveyAssistantSupportBundleConfig;
|
|
249
|
+
controller?: SurveyAssistantController | null;
|
|
250
|
+
diagnosticStore: SurveyAssistantDiagnosticStore;
|
|
251
|
+
resourceId: string;
|
|
252
|
+
signal?: AbortSignal;
|
|
253
|
+
threadClient: SurveyAssistantThreadClient;
|
|
254
|
+
threadId: string;
|
|
255
|
+
}) => Promise<PreparedSurveyAssistantSupportBundle>;
|
|
256
|
+
declare const estimateSurveyAssistantSupportBundleBytes: (prepared: PreparedSurveyAssistantSupportBundle, selection: SurveyAssistantSupportBundleSelection, config?: SurveyAssistantSupportBundleConfig) => number;
|
|
257
|
+
declare const generateSurveyAssistantSupportBundle: (prepared: PreparedSurveyAssistantSupportBundle, selection: SurveyAssistantSupportBundleSelection, config?: SurveyAssistantSupportBundleConfig) => Promise<GeneratedSurveyAssistantSupportBundle>;
|
|
258
|
+
declare const downloadSurveyAssistantSupportBundle: (bundle: GeneratedSurveyAssistantSupportBundle) => void;
|
|
259
|
+
declare const createSurveyAssistantSupportDetails: ({ bundle, prepared }: {
|
|
260
|
+
bundle: GeneratedSurveyAssistantSupportBundle;
|
|
261
|
+
prepared: PreparedSurveyAssistantSupportBundle;
|
|
262
|
+
}) => string;
|
|
263
|
+
declare const createSurveyAssistantSupportMailto: ({ bundle, config, prepared }: {
|
|
264
|
+
bundle: GeneratedSurveyAssistantSupportBundle;
|
|
265
|
+
config: SurveyAssistantSupportBundleConfig;
|
|
266
|
+
prepared: PreparedSurveyAssistantSupportBundle;
|
|
267
|
+
}) => string | undefined;
|
|
268
|
+
//#endregion
|
|
269
|
+
//#region src/react/model-catalog.d.ts
|
|
270
|
+
interface SurveyAssistantModelCatalogClient {
|
|
271
|
+
get(): Promise<SurveyAssistantModelCatalog>;
|
|
272
|
+
}
|
|
273
|
+
declare const createSurveyAssistantModelCatalogClient: (api?: string) => SurveyAssistantModelCatalogClient;
|
|
274
|
+
interface UseSurveyAssistantModelCatalogOptions {
|
|
275
|
+
api?: string;
|
|
276
|
+
client?: SurveyAssistantModelCatalogClient;
|
|
277
|
+
onModelChange?(modelId: string): void;
|
|
278
|
+
storageKey?: string | false;
|
|
279
|
+
}
|
|
280
|
+
interface SurveyAssistantModelCatalogState {
|
|
281
|
+
error: Error | null;
|
|
282
|
+
loading: boolean;
|
|
283
|
+
modelId?: string;
|
|
284
|
+
models: SurveyAssistantModelOption[];
|
|
285
|
+
reload(): void;
|
|
286
|
+
selectModel(modelId: string): void;
|
|
287
|
+
}
|
|
288
|
+
declare const useSurveyAssistantModelCatalog: ({ api, client: providedClient, onModelChange, storageKey }?: UseSurveyAssistantModelCatalogOptions) => SurveyAssistantModelCatalogState;
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region src/react/use-survey-assistant-session.d.ts
|
|
291
|
+
interface SurveyAssistantSessionOptions {
|
|
292
|
+
api?: string;
|
|
293
|
+
/** Explicit host decision: apply immediately, present for review, or deny mutations. */
|
|
294
|
+
applyPolicy: SurveyAssistantApplyPolicy;
|
|
295
|
+
controller?: SurveyAssistantController | null;
|
|
296
|
+
/** Optional browser-session diagnostics sink used by the support-bundle UI. */
|
|
297
|
+
diagnosticStore?: SurveyAssistantDiagnosticStore;
|
|
298
|
+
initialMessages?: UIMessage[];
|
|
299
|
+
modelId?: string;
|
|
300
|
+
onApplyReceipts?: (receipts: ApplyReceipt[]) => void;
|
|
301
|
+
/**
|
|
302
|
+
* Production persistence/audit barrier. The turn remains active until this
|
|
303
|
+
* resolves; rejection leaves the settled baseline unchanged.
|
|
304
|
+
*/
|
|
305
|
+
onSettleApply?: (input: {
|
|
306
|
+
changeSets: SurveyChangeSet[];
|
|
307
|
+
receipts: ApplyReceipt[];
|
|
308
|
+
turnFinal: SurveyAssistantTurnFinal;
|
|
309
|
+
}) => void | Promise<void>;
|
|
310
|
+
/**
|
|
311
|
+
* Required for `review`. Resolve true to apply the authorized change sets,
|
|
312
|
+
* or false to leave the editor unchanged.
|
|
313
|
+
*/
|
|
314
|
+
onReviewChangeSets?: (changeSets: SurveyChangeSet[], turnFinal: SurveyAssistantTurnFinal) => boolean | Promise<boolean>;
|
|
315
|
+
/** Reports when a turn owns the editor state, including submission, streaming, and apply. */
|
|
316
|
+
onTurnActiveChange?: (active: boolean) => void;
|
|
317
|
+
resourceId?: string;
|
|
318
|
+
/** Host survey id sent as untrusted request context for server-side authorization. */
|
|
319
|
+
surveyId?: string;
|
|
320
|
+
threadId?: string;
|
|
321
|
+
}
|
|
322
|
+
interface SurveyAssistantSubmitMessage {
|
|
323
|
+
text: string;
|
|
324
|
+
files: FileUIPart[];
|
|
325
|
+
/** Optional model used for this turn instead of the session's selected model. */
|
|
326
|
+
modelId?: string;
|
|
327
|
+
/** Turn-local UI context layered over the controller snapshot for this submission. */
|
|
328
|
+
uiContext?: SurveyAssistantLaunchUIContext;
|
|
329
|
+
}
|
|
330
|
+
interface SurveyAssistantSession {
|
|
331
|
+
applyResultsByChangeId: Record<string, SurveyApplyResult>;
|
|
332
|
+
authorizationError: string | null;
|
|
333
|
+
dismissError(): void;
|
|
334
|
+
error: Error | undefined;
|
|
335
|
+
isStreaming: boolean;
|
|
336
|
+
latestTurnOutcome: SurveyTurnOutcome | null;
|
|
337
|
+
messages: UIMessage[];
|
|
338
|
+
prependMessages(messages: UIMessage[]): void;
|
|
339
|
+
state: SurveyAssistantSessionState;
|
|
340
|
+
status: ChatStatus;
|
|
341
|
+
stop(): void;
|
|
342
|
+
submit(message: SurveyAssistantSubmitMessage): boolean;
|
|
343
|
+
retry(): void;
|
|
344
|
+
}
|
|
345
|
+
declare const useSurveyAssistantSession: ({ api, applyPolicy, controller, diagnosticStore, initialMessages, modelId, onApplyReceipts, onSettleApply, onReviewChangeSets, onTurnActiveChange, resourceId: controlledResourceId, surveyId, threadId: controlledThreadId }: SurveyAssistantSessionOptions) => SurveyAssistantSession;
|
|
346
|
+
//#endregion
|
|
347
|
+
export { SurveyAssistantSupportBundleLimits as A, getSurveyDocumentVersionFromSnapshot as B, sanitizeSurveyAssistantSupportValue as C, createSurveyAssistantDiagnosticId as D, SurveyAssistantDiagnosticStore as E, createSurveyAssistantTransport as F, SurveyAssistantSessionEvent as G, resolveLatestSurveyTurnAuthorization as H, SurveyTurnAuthorization as I, reduceSurveyAssistantSessionState as J, SurveyAssistantSessionState as K, SurveyTurnOutcome as L, SurveyAssistantClientError as M, SurveyAssistantThreadClient as N, createSurveyAssistantDiagnosticStore as O, createSurveyAssistantThreadClient as P, collectSurveyChangeSets as R, prepareSurveyAssistantSupportBundle as S, SurveyAssistantDiagnosticEvent as T, resolveSurveyTurnOutcome as U, parseSurveyChangeSet as V, unwrapSurveyAssistantToolOutput as W, createSurveyAssistantSupportMailto as _, SurveyAssistantModelCatalogClient as a, generateSurveyAssistantSupportBundle as b, createSurveyAssistantModelCatalogClient as c, PreparedSurveyAssistantSupportBundle as d, SURVEY_ASSISTANT_DEFAULT_SUPPORT_BUNDLE_SELECTION as f, createSurveyAssistantSupportDetails as g, SurveyAssistantSupportBundleSelection as h, useSurveyAssistantSession as i, resolveSurveyAssistantSupportBundleLimits as j, SURVEY_ASSISTANT_DEFAULT_SUPPORT_BUNDLE_LIMITS as k, useSurveyAssistantModelCatalog as l, SurveyAssistantSupportBundleConfig as m, SurveyAssistantSessionOptions as n, SurveyAssistantModelCatalogState as o, SurveyAssistantSupportBundleCategory as p, isSurveyAssistantTurnActive as q, SurveyAssistantSubmitMessage as r, UseSurveyAssistantModelCatalogOptions as s, SurveyAssistantSession as t, GeneratedSurveyAssistantSupportBundle as u, downloadSurveyAssistantSupportBundle as v, SurveyAssistantDiagnosticAttempt as w, isSurveyAssistantSupportBundleEnabled as x, estimateSurveyAssistantSupportBundleBytes as y, createApplyReceipts as z };
|
|
348
|
+
//# sourceMappingURL=index-WB5kfnz0.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-WB5kfnz0.d.mts","names":[],"sources":["../src/react/session-state.ts","../src/react/turn-authorization.ts","../src/react/transport.ts","../src/react/thread-client.ts","../src/react/client-error.ts","../src/react/support-bundle-limits.ts","../src/react/diagnostic-store.ts","../src/react/support-bundle.ts","../src/react/model-catalog.ts","../src/react/use-survey-assistant-session.ts"],"mappings":"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"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { g as SurveyChangeSetShape } from "./lifecycle-
|
|
2
|
-
import * as _$_mastra_core_tools0 from "@mastra/core/tools";
|
|
3
|
-
|
|
1
|
+
import { g as SurveyChangeSetShape } from "./lifecycle-Dm8u7QFh.mjs";
|
|
4
2
|
//#region src/server/tools/survey-audit-tool.d.ts
|
|
5
|
-
declare const surveyAuditTool:
|
|
3
|
+
declare const surveyAuditTool: import("@mastra/core/tools").Tool<{
|
|
6
4
|
sourceLocale?: string | undefined;
|
|
7
5
|
targetLocales?: string[] | undefined;
|
|
8
6
|
maxFindings?: number | undefined;
|
|
@@ -13,24 +11,25 @@ declare const surveyAuditTool: _$_mastra_core_tools0.Tool<{
|
|
|
13
11
|
ok: boolean;
|
|
14
12
|
reason?: string | undefined;
|
|
15
13
|
report?: unknown;
|
|
16
|
-
}, unknown, unknown,
|
|
14
|
+
}, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext<unknown, unknown, unknown>, "survey_audit", unknown>;
|
|
17
15
|
//#endregion
|
|
18
16
|
//#region src/server/tools/survey-asset-tool.d.ts
|
|
19
|
-
declare const surveyAssetTool:
|
|
17
|
+
declare const surveyAssetTool: import("@mastra/core/tools").Tool<{
|
|
20
18
|
action: "import-attachment" | "update-metadata" | "remove";
|
|
21
19
|
summary: string;
|
|
20
|
+
retryOfChangeIds?: string[] | undefined;
|
|
22
21
|
documentId?: string | undefined;
|
|
23
22
|
assetId?: string | undefined;
|
|
24
23
|
name?: string | null | undefined;
|
|
25
24
|
filename?: string | null | undefined;
|
|
26
25
|
alt?: string | null | undefined;
|
|
27
|
-
}, SurveyChangeSetShape, unknown, unknown,
|
|
26
|
+
}, SurveyChangeSetShape, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext<unknown, unknown, unknown>, "survey_asset", unknown>;
|
|
28
27
|
//#endregion
|
|
29
28
|
//#region src/server/tools/index.d.ts
|
|
30
29
|
declare const SURVEY_ASSISTANT_TOOL_IDS: readonly ["survey_inspect", "survey_change", "survey_expression", "survey_authoring_reference", "survey_attachment", "survey_audit", "survey_asset"];
|
|
31
30
|
declare const surveyAssistantTools: Readonly<{
|
|
32
|
-
survey_inspect:
|
|
33
|
-
action: "
|
|
31
|
+
survey_inspect: import("@mastra/core/tools").Tool<{
|
|
32
|
+
action: "current-context" | "search-items" | "item-details" | "localization" | "assets" | "expression-diagnostics" | "raw-json";
|
|
34
33
|
reason?: string | undefined;
|
|
35
34
|
scopes?: ("summary" | "selected-item" | "outline" | "response-slots" | "ui-context" | "history")[] | undefined;
|
|
36
35
|
query?: string | undefined;
|
|
@@ -41,25 +40,27 @@ declare const surveyAssistantTools: Readonly<{
|
|
|
41
40
|
cursor?: string | undefined;
|
|
42
41
|
outlineMode?: "full" | "focused" | "children" | undefined;
|
|
43
42
|
paths?: string[] | undefined;
|
|
43
|
+
textOffset?: number | undefined;
|
|
44
44
|
includeChildren?: boolean | undefined;
|
|
45
45
|
includeItemConfig?: boolean | undefined;
|
|
46
46
|
limit?: number | undefined;
|
|
47
47
|
}, {
|
|
48
48
|
ok: boolean;
|
|
49
|
-
action: "
|
|
49
|
+
action: "current-context" | "search-items" | "item-details" | "localization" | "assets" | "expression-diagnostics" | "raw-json";
|
|
50
50
|
modelSummary: string;
|
|
51
51
|
reason?: string | undefined;
|
|
52
52
|
result?: unknown;
|
|
53
|
-
}, unknown, unknown,
|
|
54
|
-
survey_change:
|
|
53
|
+
}, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext<unknown, unknown, unknown>, "survey_inspect", unknown>;
|
|
54
|
+
survey_change: import("@mastra/core/tools").Tool<{
|
|
55
55
|
summary: string;
|
|
56
56
|
operations: unknown[];
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
retryOfChangeIds?: string[] | undefined;
|
|
58
|
+
}, SurveyChangeSetShape, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext<unknown, unknown, unknown>, "survey_change", unknown>;
|
|
59
|
+
survey_authoring_reference: import("@mastra/core/tools").Tool<{
|
|
59
60
|
topic: string;
|
|
60
61
|
itemType?: string | undefined;
|
|
61
62
|
operationKind?: string | undefined;
|
|
62
|
-
detail?: "
|
|
63
|
+
detail?: "full" | "compact" | undefined;
|
|
63
64
|
reason?: string | undefined;
|
|
64
65
|
}, {
|
|
65
66
|
ok: boolean;
|
|
@@ -68,33 +69,46 @@ declare const surveyAssistantTools: Readonly<{
|
|
|
68
69
|
content: string;
|
|
69
70
|
itemType?: string | undefined;
|
|
70
71
|
operationKind?: string | undefined;
|
|
71
|
-
detail?: "
|
|
72
|
-
}, unknown, unknown,
|
|
73
|
-
survey_expression:
|
|
72
|
+
detail?: "full" | "compact" | undefined;
|
|
73
|
+
}, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext<unknown, unknown, unknown>, "survey_authoring_reference", unknown>;
|
|
74
|
+
survey_expression: import("@mastra/core/tools").Tool<{
|
|
74
75
|
action: "context" | "prepare";
|
|
76
|
+
retryOfChangeIds?: string[] | undefined;
|
|
75
77
|
reason?: string | undefined;
|
|
76
78
|
itemIds?: string[] | undefined;
|
|
79
|
+
cursor?: string | undefined;
|
|
80
|
+
limit?: number | undefined;
|
|
77
81
|
includeRawLocations?: boolean | undefined;
|
|
78
82
|
summary?: string | undefined;
|
|
79
|
-
mutations?:
|
|
83
|
+
mutations?: unknown[] | undefined;
|
|
80
84
|
}, SurveyChangeSetShape | {
|
|
81
85
|
ok: boolean;
|
|
82
86
|
action: "context";
|
|
83
87
|
modelSummary: string;
|
|
84
88
|
listOrdering: Record<string, string>;
|
|
85
89
|
responseSlots: {
|
|
86
|
-
ref:
|
|
90
|
+
ref: {
|
|
91
|
+
slotId: string;
|
|
92
|
+
method: "get" | "isDefined";
|
|
93
|
+
};
|
|
87
94
|
valueType?: string | undefined;
|
|
95
|
+
variableName?: string | undefined;
|
|
96
|
+
itemId?: string | undefined;
|
|
88
97
|
}[];
|
|
98
|
+
nextCursor?: string | undefined;
|
|
99
|
+
totalResponseSlots?: number | undefined;
|
|
100
|
+
surveyResponseSlotCount?: number | undefined;
|
|
101
|
+
totalExpressionLocations?: number | undefined;
|
|
102
|
+
unresolvedItemIds?: string[] | undefined;
|
|
89
103
|
expressionLocations?: {
|
|
90
104
|
itemId: string;
|
|
91
|
-
|
|
105
|
+
editorName: string;
|
|
92
106
|
itemType: string;
|
|
93
107
|
rawIndex: number;
|
|
94
108
|
locations: string[];
|
|
95
109
|
}[] | undefined;
|
|
96
|
-
}, unknown, unknown,
|
|
97
|
-
survey_attachment:
|
|
110
|
+
}, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext<unknown, unknown, unknown>, "survey_expression", unknown>;
|
|
111
|
+
survey_attachment: import("@mastra/core/tools").Tool<{
|
|
98
112
|
documentIds?: string[] | undefined;
|
|
99
113
|
documentRequests?: {
|
|
100
114
|
documentId: string;
|
|
@@ -115,9 +129,15 @@ declare const surveyAssistantTools: Readonly<{
|
|
|
115
129
|
} | undefined;
|
|
116
130
|
focus?: string | undefined;
|
|
117
131
|
}[];
|
|
132
|
+
unavailable?: {
|
|
133
|
+
id: string;
|
|
134
|
+
reason: "not-listed" | "content-unavailable" | "attachment-limit";
|
|
135
|
+
filename?: string | undefined;
|
|
136
|
+
mediaType?: string | undefined;
|
|
137
|
+
}[] | undefined;
|
|
118
138
|
warnings?: string[] | undefined;
|
|
119
|
-
}, unknown, unknown,
|
|
120
|
-
survey_audit:
|
|
139
|
+
}, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext<unknown, unknown, unknown>, "survey_attachment", unknown>;
|
|
140
|
+
survey_audit: import("@mastra/core/tools").Tool<{
|
|
121
141
|
sourceLocale?: string | undefined;
|
|
122
142
|
targetLocales?: string[] | undefined;
|
|
123
143
|
maxFindings?: number | undefined;
|
|
@@ -128,17 +148,18 @@ declare const surveyAssistantTools: Readonly<{
|
|
|
128
148
|
ok: boolean;
|
|
129
149
|
reason?: string | undefined;
|
|
130
150
|
report?: unknown;
|
|
131
|
-
}, unknown, unknown,
|
|
132
|
-
survey_asset:
|
|
151
|
+
}, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext<unknown, unknown, unknown>, "survey_audit", unknown>;
|
|
152
|
+
survey_asset: import("@mastra/core/tools").Tool<{
|
|
133
153
|
action: "import-attachment" | "update-metadata" | "remove";
|
|
134
154
|
summary: string;
|
|
155
|
+
retryOfChangeIds?: string[] | undefined;
|
|
135
156
|
documentId?: string | undefined;
|
|
136
157
|
assetId?: string | undefined;
|
|
137
158
|
name?: string | null | undefined;
|
|
138
159
|
filename?: string | null | undefined;
|
|
139
160
|
alt?: string | null | undefined;
|
|
140
|
-
}, SurveyChangeSetShape, unknown, unknown,
|
|
161
|
+
}, SurveyChangeSetShape, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext<unknown, unknown, unknown>, "survey_asset", unknown>;
|
|
141
162
|
}>;
|
|
142
163
|
//#endregion
|
|
143
164
|
export { surveyAuditTool as i, surveyAssistantTools as n, surveyAssetTool as r, SURVEY_ASSISTANT_TOOL_IDS as t };
|
|
144
|
-
//# sourceMappingURL=index-
|
|
165
|
+
//# sourceMappingURL=index-r5riv4md.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-r5riv4md.d.mts","names":[],"sources":["../src/server/tools/survey-audit-tool.ts","../src/server/tools/survey-asset-tool.ts","../src/server/tools/index.ts"],"mappings":";;cAqIa,8CAAe;;;;;;;;;;;kDAwB1B;;;cCaW,8CAAe;;;;;;;;;GAAf,qEAmIX;;;cClSW;cAaA,sBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAApB"}
|