@exulu/backend 1.49.2 → 1.51.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/bin/setup-python.cjs +140 -0
- package/dist/index.cjs +561 -119
- package/dist/index.d.cts +16 -3
- package/dist/index.d.ts +16 -3
- package/dist/index.js +564 -122
- package/ee/chunking/markdown.ts +83 -5
- package/ee/python/documents/processing/doc_processor.ts +380 -84
- package/ee/workers.ts +214 -18
- package/package.json +8 -1
package/dist/index.d.cts
CHANGED
|
@@ -165,13 +165,14 @@ declare class ExuluTool {
|
|
|
165
165
|
inputSchema?: z.ZodType;
|
|
166
166
|
type: "context" | "function" | "agent" | "web_search";
|
|
167
167
|
tool: Tool;
|
|
168
|
+
needsApproval: boolean;
|
|
168
169
|
config: {
|
|
169
170
|
name: string;
|
|
170
171
|
description: string;
|
|
171
172
|
type: "boolean" | "string" | "number" | "variable";
|
|
172
173
|
default?: string | boolean | number;
|
|
173
174
|
}[];
|
|
174
|
-
constructor({ id, name, description, category, inputSchema, type, execute, config, }: {
|
|
175
|
+
constructor({ id, name, description, category, inputSchema, type, execute, config, needsApproval, }: {
|
|
175
176
|
id: string;
|
|
176
177
|
name: string;
|
|
177
178
|
description: string;
|
|
@@ -184,6 +185,7 @@ declare class ExuluTool {
|
|
|
184
185
|
type: "boolean" | "string" | "number" | "variable";
|
|
185
186
|
default?: string | boolean | number;
|
|
186
187
|
}[];
|
|
188
|
+
needsApproval?: boolean;
|
|
187
189
|
execute: (inputs: any) => Promise<{
|
|
188
190
|
result?: string;
|
|
189
191
|
job?: string;
|
|
@@ -766,7 +768,7 @@ declare class ExuluProvider {
|
|
|
766
768
|
rerankers?: ExuluReranker[] | undefined;
|
|
767
769
|
exuluConfig?: ExuluConfig;
|
|
768
770
|
instructions?: string;
|
|
769
|
-
outputSchema?: z.
|
|
771
|
+
outputSchema?: z.ZodTypeAny;
|
|
770
772
|
}) => Promise<any>;
|
|
771
773
|
/**
|
|
772
774
|
* Convert file parts in messages to OpenAI Responses API compatible format.
|
|
@@ -1877,6 +1879,11 @@ declare class MarkdownChunker {
|
|
|
1877
1879
|
* Handles malformed tables gracefully by validating structure and skipping invalid tables.
|
|
1878
1880
|
*/
|
|
1879
1881
|
convertTablesToText(text: string): string;
|
|
1882
|
+
/**
|
|
1883
|
+
* Checks if a position in the text falls within a <diagram> tag.
|
|
1884
|
+
* Returns the adjusted position (before the diagram) if inside a diagram, otherwise returns the original position.
|
|
1885
|
+
*/
|
|
1886
|
+
private adjustForDiagramTags;
|
|
1880
1887
|
/**
|
|
1881
1888
|
* Find the nearest logical breakpoint working backwards from the end of the text.
|
|
1882
1889
|
* Logical breakpoints are prioritized as follows:
|
|
@@ -1888,6 +1895,7 @@ declare class MarkdownChunker {
|
|
|
1888
1895
|
*
|
|
1889
1896
|
* Only considers breakpoints in the last 50% of the text to avoid creating very small chunks.
|
|
1890
1897
|
* Returns the position of the breakpoint, or null if none found
|
|
1898
|
+
* IMPORTANT: Never splits content within <diagram> tags
|
|
1891
1899
|
*/
|
|
1892
1900
|
private findLogicalBreakpoint;
|
|
1893
1901
|
private headers;
|
|
@@ -1994,7 +2002,12 @@ type DocumentProcessorConfig = {
|
|
|
1994
2002
|
model: LanguageModel;
|
|
1995
2003
|
concurrency: number;
|
|
1996
2004
|
};
|
|
1997
|
-
|
|
2005
|
+
processor: {
|
|
2006
|
+
name: "docling" | "liteparse" | "mistral" | "officeparser";
|
|
2007
|
+
};
|
|
2008
|
+
debugging?: {
|
|
2009
|
+
deleteTempFiles?: boolean;
|
|
2010
|
+
};
|
|
1998
2011
|
};
|
|
1999
2012
|
type ProcessedPage = {
|
|
2000
2013
|
page: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -165,13 +165,14 @@ declare class ExuluTool {
|
|
|
165
165
|
inputSchema?: z.ZodType;
|
|
166
166
|
type: "context" | "function" | "agent" | "web_search";
|
|
167
167
|
tool: Tool;
|
|
168
|
+
needsApproval: boolean;
|
|
168
169
|
config: {
|
|
169
170
|
name: string;
|
|
170
171
|
description: string;
|
|
171
172
|
type: "boolean" | "string" | "number" | "variable";
|
|
172
173
|
default?: string | boolean | number;
|
|
173
174
|
}[];
|
|
174
|
-
constructor({ id, name, description, category, inputSchema, type, execute, config, }: {
|
|
175
|
+
constructor({ id, name, description, category, inputSchema, type, execute, config, needsApproval, }: {
|
|
175
176
|
id: string;
|
|
176
177
|
name: string;
|
|
177
178
|
description: string;
|
|
@@ -184,6 +185,7 @@ declare class ExuluTool {
|
|
|
184
185
|
type: "boolean" | "string" | "number" | "variable";
|
|
185
186
|
default?: string | boolean | number;
|
|
186
187
|
}[];
|
|
188
|
+
needsApproval?: boolean;
|
|
187
189
|
execute: (inputs: any) => Promise<{
|
|
188
190
|
result?: string;
|
|
189
191
|
job?: string;
|
|
@@ -766,7 +768,7 @@ declare class ExuluProvider {
|
|
|
766
768
|
rerankers?: ExuluReranker[] | undefined;
|
|
767
769
|
exuluConfig?: ExuluConfig;
|
|
768
770
|
instructions?: string;
|
|
769
|
-
outputSchema?: z.
|
|
771
|
+
outputSchema?: z.ZodTypeAny;
|
|
770
772
|
}) => Promise<any>;
|
|
771
773
|
/**
|
|
772
774
|
* Convert file parts in messages to OpenAI Responses API compatible format.
|
|
@@ -1877,6 +1879,11 @@ declare class MarkdownChunker {
|
|
|
1877
1879
|
* Handles malformed tables gracefully by validating structure and skipping invalid tables.
|
|
1878
1880
|
*/
|
|
1879
1881
|
convertTablesToText(text: string): string;
|
|
1882
|
+
/**
|
|
1883
|
+
* Checks if a position in the text falls within a <diagram> tag.
|
|
1884
|
+
* Returns the adjusted position (before the diagram) if inside a diagram, otherwise returns the original position.
|
|
1885
|
+
*/
|
|
1886
|
+
private adjustForDiagramTags;
|
|
1880
1887
|
/**
|
|
1881
1888
|
* Find the nearest logical breakpoint working backwards from the end of the text.
|
|
1882
1889
|
* Logical breakpoints are prioritized as follows:
|
|
@@ -1888,6 +1895,7 @@ declare class MarkdownChunker {
|
|
|
1888
1895
|
*
|
|
1889
1896
|
* Only considers breakpoints in the last 50% of the text to avoid creating very small chunks.
|
|
1890
1897
|
* Returns the position of the breakpoint, or null if none found
|
|
1898
|
+
* IMPORTANT: Never splits content within <diagram> tags
|
|
1891
1899
|
*/
|
|
1892
1900
|
private findLogicalBreakpoint;
|
|
1893
1901
|
private headers;
|
|
@@ -1994,7 +2002,12 @@ type DocumentProcessorConfig = {
|
|
|
1994
2002
|
model: LanguageModel;
|
|
1995
2003
|
concurrency: number;
|
|
1996
2004
|
};
|
|
1997
|
-
|
|
2005
|
+
processor: {
|
|
2006
|
+
name: "docling" | "liteparse" | "mistral" | "officeparser";
|
|
2007
|
+
};
|
|
2008
|
+
debugging?: {
|
|
2009
|
+
deleteTempFiles?: boolean;
|
|
2010
|
+
};
|
|
1998
2011
|
};
|
|
1999
2012
|
type ProcessedPage = {
|
|
2000
2013
|
page: number;
|