@resolveio/server-lib 22.3.203 → 22.3.204
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/methods/ai-terminal.d.ts +77 -1
- package/methods/ai-terminal.js +866 -344
- package/methods/ai-terminal.js.map +1 -1
- package/package.json +1 -1
package/methods/ai-terminal.d.ts
CHANGED
|
@@ -53,6 +53,12 @@ type AiCodexRunInput = {
|
|
|
53
53
|
system_prompt_additions?: string[] | string;
|
|
54
54
|
systemPrompt?: string;
|
|
55
55
|
systemPromptAdditions?: string[] | string;
|
|
56
|
+
data_request_classifier_enabled?: boolean;
|
|
57
|
+
dataRequestClassifierEnabled?: boolean;
|
|
58
|
+
data_request_classifier_model?: string;
|
|
59
|
+
dataRequestClassifierModel?: string;
|
|
60
|
+
data_request_classifier_timeout_ms?: number;
|
|
61
|
+
dataRequestClassifierTimeoutMs?: number;
|
|
56
62
|
app_instructions?: string[] | string;
|
|
57
63
|
appInstructions?: string[] | string;
|
|
58
64
|
assistant_instructions?: string[] | string;
|
|
@@ -90,6 +96,71 @@ type AiAssistantDirectiveHints = {
|
|
|
90
96
|
fieldHints?: string[];
|
|
91
97
|
schemaHints?: string[];
|
|
92
98
|
};
|
|
99
|
+
type AiAssistantAppDataDimension = {
|
|
100
|
+
id: string;
|
|
101
|
+
type?: 'entity' | 'time';
|
|
102
|
+
granularity?: string;
|
|
103
|
+
requestedText?: string;
|
|
104
|
+
terms: string[];
|
|
105
|
+
groupId: any;
|
|
106
|
+
project?: Record<string, any>;
|
|
107
|
+
sort?: Record<string, any>;
|
|
108
|
+
preGroupStages?: Record<string, any>[];
|
|
109
|
+
};
|
|
110
|
+
type AiAssistantDataRequestBreakdownContract = {
|
|
111
|
+
type: 'entity' | 'time' | 'unknown';
|
|
112
|
+
requested_text: string;
|
|
113
|
+
dimension?: string;
|
|
114
|
+
granularity?: string;
|
|
115
|
+
field_hint?: string;
|
|
116
|
+
field_hints?: string[];
|
|
117
|
+
};
|
|
118
|
+
type AiAssistantDataRequestContract = {
|
|
119
|
+
intent_type: 'data_summary';
|
|
120
|
+
intent_id?: string;
|
|
121
|
+
domain: string;
|
|
122
|
+
collection?: string;
|
|
123
|
+
operation: 'aggregate';
|
|
124
|
+
requested_breakdowns: AiAssistantDataRequestBreakdownContract[];
|
|
125
|
+
date_range: {
|
|
126
|
+
start?: string;
|
|
127
|
+
end?: string;
|
|
128
|
+
year?: number;
|
|
129
|
+
} | null;
|
|
130
|
+
measures: string[];
|
|
131
|
+
filters: Array<Record<string, any>>;
|
|
132
|
+
output_format: 'collapse_table';
|
|
133
|
+
ambiguities: string[];
|
|
134
|
+
confidence: number;
|
|
135
|
+
source: string;
|
|
136
|
+
};
|
|
137
|
+
type AiAssistantDataRequestUnderstanding = {
|
|
138
|
+
dimensions: AiAssistantAppDataDimension[];
|
|
139
|
+
contract: AiAssistantDataRequestContract;
|
|
140
|
+
};
|
|
141
|
+
type AiAssistantHeuristicDirectiveOptions = {
|
|
142
|
+
appDataIntent?: AiAssistantAppDataIntent | null;
|
|
143
|
+
appDataRequestContract?: AiAssistantDataRequestContract | null;
|
|
144
|
+
appDataRequestUnderstanding?: AiAssistantDataRequestUnderstanding | null;
|
|
145
|
+
appDataRequestClassifier?: Record<string, any> | null;
|
|
146
|
+
};
|
|
147
|
+
type AiAssistantAppDataIntent = {
|
|
148
|
+
id: string;
|
|
149
|
+
terms: string[];
|
|
150
|
+
excludeTerms: string[];
|
|
151
|
+
collection: string;
|
|
152
|
+
permissionView?: string;
|
|
153
|
+
dateField?: string;
|
|
154
|
+
quantityField?: string;
|
|
155
|
+
metricField?: string;
|
|
156
|
+
fallbackCollections: string[];
|
|
157
|
+
progress: string[];
|
|
158
|
+
acknowledgement?: string;
|
|
159
|
+
assumptions: string[];
|
|
160
|
+
dimensions: AiAssistantAppDataDimension[];
|
|
161
|
+
pipeline?: Record<string, any>[];
|
|
162
|
+
options?: Record<string, any>;
|
|
163
|
+
};
|
|
93
164
|
export type AiAssistantAppCollectionPreserveRule = {
|
|
94
165
|
id?: string;
|
|
95
166
|
routePreferredCollections: string[];
|
|
@@ -201,7 +272,12 @@ export declare function buildAssistantToolRequest(directive: AssistantMongoDirec
|
|
|
201
272
|
export declare function shouldPreserveAssistantProbeCollectionForTesting(directive: any, resolvedCollection: string, probeResponse?: any): boolean;
|
|
202
273
|
export declare function buildAssistantAnswerQualityFromExecution(input?: Record<string, any>): Record<string, any>;
|
|
203
274
|
export declare function buildAssistantInvoiceCustomerLabelExpr(): Record<string, any>;
|
|
204
|
-
export declare function resolveAssistantHeuristicDirectiveForTesting(message: string, collectionHints: string[], collectionNames?: string[], appId?: string): any;
|
|
275
|
+
export declare function resolveAssistantHeuristicDirectiveForTesting(message: string, collectionHints: string[], collectionNames?: string[], appId?: string, options?: AiAssistantHeuristicDirectiveOptions): any;
|
|
276
|
+
export declare function buildAssistantDataRequestClassifierMessagesForTesting(params: {
|
|
277
|
+
message: string;
|
|
278
|
+
appId?: string;
|
|
279
|
+
collectionNames?: string[];
|
|
280
|
+
}): any;
|
|
205
281
|
export declare function buildAssistantDatedPivotDisplay(display: AiAssistantDisplayTable, expectedMonths?: string[]): AiAssistantDisplayTable | null;
|
|
206
282
|
export declare function buildAssistantToolFallbackResponseForTesting(result: any): string;
|
|
207
283
|
export declare function deriveAssistantCommandExecutionStatus(commandValue: any): string;
|