@resolveio/server-lib 22.2.15 → 22.2.17
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/ai/assistant-core-heuristics.d.ts +11 -0
- package/ai/assistant-core-heuristics.js +531 -0
- package/ai/assistant-core-heuristics.js.map +1 -0
- package/fixtures/cron-jobs.js +13 -1
- package/fixtures/cron-jobs.js.map +1 -1
- package/fixtures/init.js +13 -1
- package/fixtures/init.js.map +1 -1
- package/managers/mongo.manager.js +12 -10
- package/managers/mongo.manager.js.map +1 -1
- package/methods/ai-terminal.d.ts +9 -1
- package/methods/ai-terminal.js +3177 -473
- package/methods/ai-terminal.js.map +1 -1
- package/methods/publications.js +1 -1
- package/methods/publications.js.map +1 -1
- package/package.json +1 -1
- package/server-app.js +6 -1
- package/server-app.js.map +1 -1
package/methods/ai-terminal.d.ts
CHANGED
|
@@ -80,6 +80,7 @@ export type AiAssistantMongoReadInput = {
|
|
|
80
80
|
};
|
|
81
81
|
permissionView?: string;
|
|
82
82
|
id_client?: string;
|
|
83
|
+
id_app?: string;
|
|
83
84
|
mongo?: {
|
|
84
85
|
database?: string;
|
|
85
86
|
databases?: string[];
|
|
@@ -104,6 +105,7 @@ export type AiAssistantMongoAggregateInput = {
|
|
|
104
105
|
};
|
|
105
106
|
permissionView?: string;
|
|
106
107
|
id_client?: string;
|
|
108
|
+
id_app?: string;
|
|
107
109
|
mongo?: {
|
|
108
110
|
database?: string;
|
|
109
111
|
databases?: string[];
|
|
@@ -162,6 +164,7 @@ export declare function executeAiAssistantMongoAggregate(payload: AiAssistantMon
|
|
|
162
164
|
export declare function extractAssistantMongoDirective(content: string): AssistantMongoDirective | null;
|
|
163
165
|
export declare function buildAssistantToolRequest(directive: AssistantMongoDirective, payload: AiCodexRunInput, hints?: AiAssistantDirectiveHints): Record<string, any>;
|
|
164
166
|
export declare function buildAssistantInvoiceCustomerLabelExpr(): Record<string, any>;
|
|
167
|
+
export declare function resolveAssistantHeuristicDirectiveForTesting(message: string, collectionHints: string[], collectionNames?: string[], appId?: string): any;
|
|
165
168
|
export declare function buildAssistantDatedPivotDisplay(display: AiAssistantDisplayTable, expectedMonths?: string[]): AiAssistantDisplayTable | null;
|
|
166
169
|
export declare function deriveAssistantCommandExecutionStatus(commandValue: any): string;
|
|
167
170
|
export declare function normalizeIdsForTargetField(ids: any[], targetDocs: any[], targetFieldPath: string, targetFieldTypeOverride?: 'objectId' | 'string' | 'unknown'): any[];
|
|
@@ -190,6 +193,8 @@ export declare function normalizeAssistantAggregatePipeline(pipeline?: Array<Rec
|
|
|
190
193
|
export declare function stripQueryFieldPathsDeep(query: any, fieldsToStrip: string[]): any;
|
|
191
194
|
export declare function stripScopedFieldsFromPipeline(pipeline: any[], fieldsToStrip: string[]): any[];
|
|
192
195
|
export declare function rewriteEmbeddedMatchObjects(query: any): any;
|
|
196
|
+
export declare function resolveAssistantAppCollectionHintCandidates(message: string, appId?: string): string[];
|
|
197
|
+
export declare function isAssistantDeterministicHeuristicEnabledForApp(heuristicId: string, appId?: string): boolean;
|
|
193
198
|
export declare function resolveAssistantCollectionOverride(collectionRanking: Record<string, any> | null, currentCollection: string): {
|
|
194
199
|
from: string;
|
|
195
200
|
to: string;
|
|
@@ -215,7 +220,10 @@ export declare function evaluateAssistantFallbackDocumentsQuality(documents: any
|
|
|
215
220
|
averageFillRate: number;
|
|
216
221
|
};
|
|
217
222
|
export declare function shouldAcceptAssistantFallbackDocuments(documents: any[], options?: AssistantFallbackAcceptanceOptions): boolean;
|
|
218
|
-
export declare function resolveAssistantReportBuilderBridgeCollection(collection: string, db?: any, dbName?: string
|
|
223
|
+
export declare function resolveAssistantReportBuilderBridgeCollection(collection: string, db?: any, dbName?: string, options?: {
|
|
224
|
+
requestHints?: AiAssistantDirectiveHints;
|
|
225
|
+
appId?: string;
|
|
226
|
+
}): Promise<{
|
|
219
227
|
collection: string;
|
|
220
228
|
fallbackFrom?: string;
|
|
221
229
|
mode: 'report-builder' | 'direct-mongo';
|