@resolveio/server-lib 22.1.11 → 22.1.13
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 +23 -3
- package/methods/ai-terminal.js +2079 -418
- package/methods/ai-terminal.js.map +1 -1
- package/package.json +1 -1
package/methods/ai-terminal.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export type AiAssistantMongoAggregateInput = {
|
|
|
46
46
|
access?: string;
|
|
47
47
|
readonly?: boolean;
|
|
48
48
|
};
|
|
49
|
+
__assistantMessage?: string;
|
|
49
50
|
__assistantRetryState?: AiAssistantCollectionRetryState;
|
|
50
51
|
};
|
|
51
52
|
type AiAssistantDisplayTable = {
|
|
@@ -112,9 +113,13 @@ export declare function buildDisplayTable(docs: any[], options?: {
|
|
|
112
113
|
export declare function formatDisplayTableMarkdown(display: AiAssistantDisplayTable): string;
|
|
113
114
|
export declare function resolveAssistantReadDisplayMaxRows(limit: number | undefined, rowCount: number): number;
|
|
114
115
|
export declare function normalizeAssistantNowExprPlaceholders(value: any): any;
|
|
116
|
+
export declare function repairAssistantFieldPathReferenceInPipeline(pipeline: Array<Record<string, any>>, fieldPath: string): {
|
|
117
|
+
pipeline: Array<Record<string, any>>;
|
|
118
|
+
changed: boolean;
|
|
119
|
+
};
|
|
115
120
|
export declare function rewriteMatchExpressionsToExpr(match: any): any;
|
|
116
121
|
export declare function normalizeAssistantMonthlyCalendarWindowPipeline(pipeline: Array<Record<string, any>>): Array<Record<string, any>>;
|
|
117
|
-
export declare function normalizeAssistantAggregatePipeline(pipeline?: Array<Record<string, any>>, collection?: string): Array<Record<string, any>>;
|
|
122
|
+
export declare function normalizeAssistantAggregatePipeline(pipeline?: Array<Record<string, any>>, collection?: string, originalMessage?: string): Array<Record<string, any>>;
|
|
118
123
|
export declare function stripQueryFieldPathsDeep(query: any, fieldsToStrip: string[]): any;
|
|
119
124
|
export declare function stripScopedFieldsFromPipeline(pipeline: any[], fieldsToStrip: string[]): any[];
|
|
120
125
|
export declare function rewriteEmbeddedMatchObjects(query: any): any;
|
|
@@ -126,8 +131,23 @@ export declare function resolveAssistantCollectionOverride(collectionRanking: Re
|
|
|
126
131
|
reason: string;
|
|
127
132
|
} | null;
|
|
128
133
|
export declare function resolveAssistantCrossCollectionFallbackCandidates(collection: string): string[];
|
|
129
|
-
export declare function resolveAssistantAvailableCrossCollectionFallbacksFromNames(collection: string, triedCollections: Set<string>, collectionNames: string[]
|
|
130
|
-
|
|
134
|
+
export declare function resolveAssistantAvailableCrossCollectionFallbacksFromNames(collection: string, triedCollections: Set<string>, collectionNames: string[], options?: {
|
|
135
|
+
fieldHints?: string[];
|
|
136
|
+
}): string[];
|
|
137
|
+
type AssistantFallbackAcceptanceOptions = {
|
|
138
|
+
requireDimensionFields?: boolean;
|
|
139
|
+
minDimensionFillRate?: number;
|
|
140
|
+
preferredDimensionFields?: string[];
|
|
141
|
+
};
|
|
142
|
+
export declare function evaluateAssistantFallbackDocumentsQuality(documents: any[], options?: AssistantFallbackAcceptanceOptions): {
|
|
143
|
+
accepted: boolean;
|
|
144
|
+
rowCount: number;
|
|
145
|
+
dimensionFields: string[];
|
|
146
|
+
bestField?: string;
|
|
147
|
+
bestFillRate: number;
|
|
148
|
+
averageFillRate: number;
|
|
149
|
+
};
|
|
150
|
+
export declare function shouldAcceptAssistantFallbackDocuments(documents: any[], options?: AssistantFallbackAcceptanceOptions): boolean;
|
|
131
151
|
export declare function collectUserViewPermissions(user: any): string[];
|
|
132
152
|
export declare function userHasInvoiceAccess(user: any): boolean;
|
|
133
153
|
export declare function resolveAssistantUserAccessTier(user: any): 'super_admin' | 'customer_portal' | 'client_user';
|