@exulu/backend 5.19.0 → 5.21.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/dist/{chunk-4NYSMZ6F.js → chunk-YTW26TUA.js} +5056 -4730
- package/dist/{convert-exulu-tools-to-ai-sdk-tools-4RXVKJHW.js → convert-exulu-tools-to-ai-sdk-tools-4TT2M2JH.js} +1 -1
- package/dist/index.cjs +1045 -252
- package/dist/index.d.cts +40 -1
- package/dist/index.d.ts +40 -1
- package/dist/index.js +487 -38
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -130,6 +130,8 @@ interface ExuluAgent {
|
|
|
130
130
|
max_tool_steps?: number | null;
|
|
131
131
|
/** Thinking budget of the answer model, forwarded as LiteLLM reasoning_effort; null = provider default. */
|
|
132
132
|
reasoning_effort?: string | null;
|
|
133
|
+
/** Answer language: null/"off", "auto" (the language of the user's message) or a locale such as "en". */
|
|
134
|
+
response_language?: string | null;
|
|
133
135
|
slug?: string;
|
|
134
136
|
tools?: {
|
|
135
137
|
id: string;
|
|
@@ -2236,6 +2238,43 @@ type ContextLike = {
|
|
|
2236
2238
|
} | null | undefined;
|
|
2237
2239
|
declare function checkMemoryBase(context: ContextLike): MemoryBaseCheck;
|
|
2238
2240
|
|
|
2241
|
+
/**
|
|
2242
|
+
* `artifacts.read(name)` — how a tool reads a shared artifact.
|
|
2243
|
+
*
|
|
2244
|
+
* A template that a tool fills (an .xlsx, a .docx) belongs to the customer,
|
|
2245
|
+
* and the customer replaces it in the Artifacts screen. The tool reads it by
|
|
2246
|
+
* NAME through this helper instead of holding an object key, so a replaced
|
|
2247
|
+
* file is picked up on the next call.
|
|
2248
|
+
*
|
|
2249
|
+
* Two things happen here that a tool should not do by hand:
|
|
2250
|
+
*
|
|
2251
|
+
* - The read is checked against the CALLING user, with the same rule the
|
|
2252
|
+
* content route applies. A tool is not a way around an artifact's access
|
|
2253
|
+
* settings.
|
|
2254
|
+
* - The read is recorded on the artifact (`used_by`). That is what the
|
|
2255
|
+
* Artifacts screen shows as "used by" — written by the act of using, so
|
|
2256
|
+
* nobody has to keep it up to date.
|
|
2257
|
+
*
|
|
2258
|
+
* Both callers that run a tool build it: the agent path
|
|
2259
|
+
* (convert-exulu-tools-to-ai-sdk-tools.ts) and POST /tools/:id
|
|
2260
|
+
* (tool-api-route.ts). Same reason as tool-upload.ts.
|
|
2261
|
+
*/
|
|
2262
|
+
|
|
2263
|
+
type ArtifactReadResult = {
|
|
2264
|
+
name: string;
|
|
2265
|
+
filename: string;
|
|
2266
|
+
contentType: string | null;
|
|
2267
|
+
bytes: Uint8Array;
|
|
2268
|
+
};
|
|
2269
|
+
declare class ArtifactReadError extends Error {
|
|
2270
|
+
readonly code: "not_found" | "expired" | "forbidden" | "missing_file";
|
|
2271
|
+
constructor(code: "not_found" | "expired" | "forbidden" | "missing_file", message: string);
|
|
2272
|
+
}
|
|
2273
|
+
type ToolArtifacts = {
|
|
2274
|
+
/** Throws ArtifactReadError; never returns partial data. */
|
|
2275
|
+
read: (name: string) => Promise<ArtifactReadResult>;
|
|
2276
|
+
};
|
|
2277
|
+
|
|
2239
2278
|
/**
|
|
2240
2279
|
* Switch this process into LiteLLM *client* mode: it connects to an
|
|
2241
2280
|
* externally-managed proxy (spawned by the Exulu HTTP server process, or a
|
|
@@ -2999,4 +3038,4 @@ declare const ExuluPython: {
|
|
|
2999
3038
|
instructions: typeof getPythonSetupInstructions;
|
|
3000
3039
|
};
|
|
3001
3040
|
|
|
3002
|
-
export { type AuditConfig, type AuditEvent, type AuditLogger, type ChunkerOperation, type ChunkerResponse, type CredentialField, CredentialInvalidError, type JOB_STATUS as EXULU_JOB_STATUS, JOB_STATUS_ENUM as EXULU_JOB_STATUS_ENUM, type STATISTICS_TYPE as EXULU_STATISTICS_TYPE, STATISTICS_TYPE_ENUM as EXULU_STATISTICS_TYPE_ENUM, type ExuluAgent, ExuluApp, type ExuluAuthConfig, ExuluAuthentication, ExuluChunkers, ExuluContext, type ExuluContextEmbedder, type ExuluCredentialsToolContext, ExuluDatabase, ExuluDefaultTools, ExuluDocumentProcessor, ExuluEval, type Item as ExuluItem, ExuluJobs, ExuluModels, type ExuluOauthConfig, type ExuluOauthToolContext, ExuluOtel, ExuluProjects, ExuluPython, queues as ExuluQueues, ExuluReadApi, ExuluRecall, ExuluReranker, ExuluTool, type ExuluUserCredentialsConfig, ExuluVariables, PROJECTION_VERSION, type RoutineHandle, type RoutineRunPatch, type VectorSearchChunkResult, backfillCoordinates, checkMemoryBase, defaultChunker, enableLiteLLMClientMode, fitContextProjection, listFittableContexts, postgresClient, recallMemories };
|
|
3041
|
+
export { ArtifactReadError, type ArtifactReadResult, type AuditConfig, type AuditEvent, type AuditLogger, type ChunkerOperation, type ChunkerResponse, type CredentialField, CredentialInvalidError, type JOB_STATUS as EXULU_JOB_STATUS, JOB_STATUS_ENUM as EXULU_JOB_STATUS_ENUM, type STATISTICS_TYPE as EXULU_STATISTICS_TYPE, STATISTICS_TYPE_ENUM as EXULU_STATISTICS_TYPE_ENUM, type ExuluAgent, ExuluApp, type ExuluAuthConfig, ExuluAuthentication, ExuluChunkers, ExuluContext, type ExuluContextEmbedder, type ExuluCredentialsToolContext, ExuluDatabase, ExuluDefaultTools, ExuluDocumentProcessor, ExuluEval, type Item as ExuluItem, ExuluJobs, ExuluModels, type ExuluOauthConfig, type ExuluOauthToolContext, ExuluOtel, ExuluProjects, ExuluPython, queues as ExuluQueues, ExuluReadApi, ExuluRecall, ExuluReranker, ExuluTool, type ExuluUserCredentialsConfig, ExuluVariables, PROJECTION_VERSION, type RoutineHandle, type RoutineRunPatch, type ToolArtifacts, type VectorSearchChunkResult, backfillCoordinates, checkMemoryBase, defaultChunker, enableLiteLLMClientMode, fitContextProjection, listFittableContexts, postgresClient, recallMemories };
|
package/dist/index.d.ts
CHANGED
|
@@ -130,6 +130,8 @@ interface ExuluAgent {
|
|
|
130
130
|
max_tool_steps?: number | null;
|
|
131
131
|
/** Thinking budget of the answer model, forwarded as LiteLLM reasoning_effort; null = provider default. */
|
|
132
132
|
reasoning_effort?: string | null;
|
|
133
|
+
/** Answer language: null/"off", "auto" (the language of the user's message) or a locale such as "en". */
|
|
134
|
+
response_language?: string | null;
|
|
133
135
|
slug?: string;
|
|
134
136
|
tools?: {
|
|
135
137
|
id: string;
|
|
@@ -2236,6 +2238,43 @@ type ContextLike = {
|
|
|
2236
2238
|
} | null | undefined;
|
|
2237
2239
|
declare function checkMemoryBase(context: ContextLike): MemoryBaseCheck;
|
|
2238
2240
|
|
|
2241
|
+
/**
|
|
2242
|
+
* `artifacts.read(name)` — how a tool reads a shared artifact.
|
|
2243
|
+
*
|
|
2244
|
+
* A template that a tool fills (an .xlsx, a .docx) belongs to the customer,
|
|
2245
|
+
* and the customer replaces it in the Artifacts screen. The tool reads it by
|
|
2246
|
+
* NAME through this helper instead of holding an object key, so a replaced
|
|
2247
|
+
* file is picked up on the next call.
|
|
2248
|
+
*
|
|
2249
|
+
* Two things happen here that a tool should not do by hand:
|
|
2250
|
+
*
|
|
2251
|
+
* - The read is checked against the CALLING user, with the same rule the
|
|
2252
|
+
* content route applies. A tool is not a way around an artifact's access
|
|
2253
|
+
* settings.
|
|
2254
|
+
* - The read is recorded on the artifact (`used_by`). That is what the
|
|
2255
|
+
* Artifacts screen shows as "used by" — written by the act of using, so
|
|
2256
|
+
* nobody has to keep it up to date.
|
|
2257
|
+
*
|
|
2258
|
+
* Both callers that run a tool build it: the agent path
|
|
2259
|
+
* (convert-exulu-tools-to-ai-sdk-tools.ts) and POST /tools/:id
|
|
2260
|
+
* (tool-api-route.ts). Same reason as tool-upload.ts.
|
|
2261
|
+
*/
|
|
2262
|
+
|
|
2263
|
+
type ArtifactReadResult = {
|
|
2264
|
+
name: string;
|
|
2265
|
+
filename: string;
|
|
2266
|
+
contentType: string | null;
|
|
2267
|
+
bytes: Uint8Array;
|
|
2268
|
+
};
|
|
2269
|
+
declare class ArtifactReadError extends Error {
|
|
2270
|
+
readonly code: "not_found" | "expired" | "forbidden" | "missing_file";
|
|
2271
|
+
constructor(code: "not_found" | "expired" | "forbidden" | "missing_file", message: string);
|
|
2272
|
+
}
|
|
2273
|
+
type ToolArtifacts = {
|
|
2274
|
+
/** Throws ArtifactReadError; never returns partial data. */
|
|
2275
|
+
read: (name: string) => Promise<ArtifactReadResult>;
|
|
2276
|
+
};
|
|
2277
|
+
|
|
2239
2278
|
/**
|
|
2240
2279
|
* Switch this process into LiteLLM *client* mode: it connects to an
|
|
2241
2280
|
* externally-managed proxy (spawned by the Exulu HTTP server process, or a
|
|
@@ -2999,4 +3038,4 @@ declare const ExuluPython: {
|
|
|
2999
3038
|
instructions: typeof getPythonSetupInstructions;
|
|
3000
3039
|
};
|
|
3001
3040
|
|
|
3002
|
-
export { type AuditConfig, type AuditEvent, type AuditLogger, type ChunkerOperation, type ChunkerResponse, type CredentialField, CredentialInvalidError, type JOB_STATUS as EXULU_JOB_STATUS, JOB_STATUS_ENUM as EXULU_JOB_STATUS_ENUM, type STATISTICS_TYPE as EXULU_STATISTICS_TYPE, STATISTICS_TYPE_ENUM as EXULU_STATISTICS_TYPE_ENUM, type ExuluAgent, ExuluApp, type ExuluAuthConfig, ExuluAuthentication, ExuluChunkers, ExuluContext, type ExuluContextEmbedder, type ExuluCredentialsToolContext, ExuluDatabase, ExuluDefaultTools, ExuluDocumentProcessor, ExuluEval, type Item as ExuluItem, ExuluJobs, ExuluModels, type ExuluOauthConfig, type ExuluOauthToolContext, ExuluOtel, ExuluProjects, ExuluPython, queues as ExuluQueues, ExuluReadApi, ExuluRecall, ExuluReranker, ExuluTool, type ExuluUserCredentialsConfig, ExuluVariables, PROJECTION_VERSION, type RoutineHandle, type RoutineRunPatch, type VectorSearchChunkResult, backfillCoordinates, checkMemoryBase, defaultChunker, enableLiteLLMClientMode, fitContextProjection, listFittableContexts, postgresClient, recallMemories };
|
|
3041
|
+
export { ArtifactReadError, type ArtifactReadResult, type AuditConfig, type AuditEvent, type AuditLogger, type ChunkerOperation, type ChunkerResponse, type CredentialField, CredentialInvalidError, type JOB_STATUS as EXULU_JOB_STATUS, JOB_STATUS_ENUM as EXULU_JOB_STATUS_ENUM, type STATISTICS_TYPE as EXULU_STATISTICS_TYPE, STATISTICS_TYPE_ENUM as EXULU_STATISTICS_TYPE_ENUM, type ExuluAgent, ExuluApp, type ExuluAuthConfig, ExuluAuthentication, ExuluChunkers, ExuluContext, type ExuluContextEmbedder, type ExuluCredentialsToolContext, ExuluDatabase, ExuluDefaultTools, ExuluDocumentProcessor, ExuluEval, type Item as ExuluItem, ExuluJobs, ExuluModels, type ExuluOauthConfig, type ExuluOauthToolContext, ExuluOtel, ExuluProjects, ExuluPython, queues as ExuluQueues, ExuluReadApi, ExuluRecall, ExuluReranker, ExuluTool, type ExuluUserCredentialsConfig, ExuluVariables, PROJECTION_VERSION, type RoutineHandle, type RoutineRunPatch, type ToolArtifacts, type VectorSearchChunkResult, backfillCoordinates, checkMemoryBase, defaultChunker, enableLiteLLMClientMode, fitContextProjection, listFittableContexts, postgresClient, recallMemories };
|