@vertesia/client 1.0.0-dev.20260203.130115Z → 1.0.0-dev.20260225.024852Z
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/lib/cjs/AccountApi.js +85 -0
- package/lib/cjs/AccountApi.js.map +1 -0
- package/lib/cjs/AccountsApi.js +16 -0
- package/lib/cjs/AccountsApi.js.map +1 -0
- package/lib/cjs/AnalyticsApi.js +41 -0
- package/lib/cjs/AnalyticsApi.js.map +1 -0
- package/lib/cjs/ApiKeysApi.js +63 -0
- package/lib/cjs/ApiKeysApi.js.map +1 -0
- package/lib/cjs/AppsApi.js +119 -0
- package/lib/cjs/AppsApi.js.map +1 -0
- package/lib/cjs/AuditTrailApi.js +35 -0
- package/lib/cjs/AuditTrailApi.js.map +1 -0
- package/lib/cjs/CommandsApi.js +19 -0
- package/lib/cjs/CommandsApi.js.map +1 -0
- package/lib/cjs/EnvironmentsApi.js +72 -0
- package/lib/cjs/EnvironmentsApi.js.map +1 -0
- package/lib/cjs/GroupsApi.js +78 -0
- package/lib/cjs/GroupsApi.js.map +1 -0
- package/lib/cjs/IamApi.js +53 -0
- package/lib/cjs/IamApi.js.map +1 -0
- package/lib/cjs/InteractionBase.js +44 -0
- package/lib/cjs/InteractionBase.js.map +1 -0
- package/lib/cjs/InteractionCatalogApi.js +64 -0
- package/lib/cjs/InteractionCatalogApi.js.map +1 -0
- package/lib/cjs/InteractionOutput.js +300 -0
- package/lib/cjs/InteractionOutput.js.map +1 -0
- package/lib/cjs/InteractionResult.example.js +57 -0
- package/lib/cjs/InteractionResult.example.js.map +1 -0
- package/lib/cjs/InteractionsApi.js +262 -0
- package/lib/cjs/InteractionsApi.js.map +1 -0
- package/lib/cjs/MCPOAuthApi.js +62 -0
- package/lib/cjs/MCPOAuthApi.js.map +1 -0
- package/lib/cjs/ProjectsApi.js +88 -0
- package/lib/cjs/ProjectsApi.js.map +1 -0
- package/lib/cjs/PromptsApi.js +133 -0
- package/lib/cjs/PromptsApi.js.map +1 -0
- package/lib/cjs/RefsApi.js +14 -0
- package/lib/cjs/RefsApi.js.map +1 -0
- package/lib/cjs/RunsApi.js +108 -0
- package/lib/cjs/RunsApi.js.map +1 -0
- package/lib/cjs/SkillsApi.js +39 -0
- package/lib/cjs/SkillsApi.js.map +1 -0
- package/lib/cjs/StreamSource.js +17 -0
- package/lib/cjs/StreamSource.js.map +1 -0
- package/lib/cjs/TrainingApi.js +54 -0
- package/lib/cjs/TrainingApi.js.map +1 -0
- package/lib/cjs/UsersApi.js +19 -0
- package/lib/cjs/UsersApi.js.map +1 -0
- package/lib/cjs/client.js +362 -0
- package/lib/cjs/client.js.map +1 -0
- package/lib/cjs/execute.js +158 -0
- package/lib/cjs/execute.js.map +1 -0
- package/lib/cjs/index.js +22 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/nodejs/NodeStreamSource.js +45 -0
- package/lib/cjs/nodejs/NodeStreamSource.js.map +1 -0
- package/lib/cjs/nodejs/index.js +18 -0
- package/lib/cjs/nodejs/index.js.map +1 -0
- package/lib/cjs/package.json +3 -0
- package/lib/cjs/store/AnalyzeDocApi.js +56 -0
- package/lib/cjs/store/AnalyzeDocApi.js.map +1 -0
- package/lib/cjs/store/CollectionsApi.js +131 -0
- package/lib/cjs/store/CollectionsApi.js.map +1 -0
- package/lib/cjs/store/CommandsApi.js +17 -0
- package/lib/cjs/store/CommandsApi.js.map +1 -0
- package/lib/cjs/store/DashboardApi.js +182 -0
- package/lib/cjs/store/DashboardApi.js.map +1 -0
- package/lib/cjs/store/DataApi.js +433 -0
- package/lib/cjs/store/DataApi.js.map +1 -0
- package/lib/cjs/store/EmailApi.js +103 -0
- package/lib/cjs/store/EmailApi.js.map +1 -0
- package/lib/cjs/store/EmbeddingsApi.js +29 -0
- package/lib/cjs/store/EmbeddingsApi.js.map +1 -0
- package/lib/cjs/store/FilesApi.js +237 -0
- package/lib/cjs/store/FilesApi.js.map +1 -0
- package/lib/cjs/store/HiveMemoryApi.js +174 -0
- package/lib/cjs/store/HiveMemoryApi.js.map +1 -0
- package/lib/cjs/store/IndexingApi.js +207 -0
- package/lib/cjs/store/IndexingApi.js.map +1 -0
- package/lib/cjs/store/ObjectsApi.js +316 -0
- package/lib/cjs/store/ObjectsApi.js.map +1 -0
- package/lib/cjs/store/PendingAsksApi.js +43 -0
- package/lib/cjs/store/PendingAsksApi.js.map +1 -0
- package/lib/cjs/store/QueryApi.js +67 -0
- package/lib/cjs/store/QueryApi.js.map +1 -0
- package/lib/cjs/store/RenderingApi.js +84 -0
- package/lib/cjs/store/RenderingApi.js.map +1 -0
- package/lib/cjs/store/SchedulesApi.js +103 -0
- package/lib/cjs/store/SchedulesApi.js.map +1 -0
- package/lib/cjs/store/ToolsApi.js +21 -0
- package/lib/cjs/store/ToolsApi.js.map +1 -0
- package/lib/cjs/store/TypeCatalogApi.js +50 -0
- package/lib/cjs/store/TypeCatalogApi.js.map +1 -0
- package/lib/cjs/store/TypesApi.js +60 -0
- package/lib/cjs/store/TypesApi.js.map +1 -0
- package/lib/cjs/store/WorkersApi.js +16 -0
- package/lib/cjs/store/WorkersApi.js.map +1 -0
- package/lib/cjs/store/WorkflowsApi.js +604 -0
- package/lib/cjs/store/WorkflowsApi.js.map +1 -0
- package/lib/cjs/store/client.js +89 -0
- package/lib/cjs/store/client.js.map +1 -0
- package/lib/cjs/store/errors.js +11 -0
- package/lib/cjs/store/errors.js.map +1 -0
- package/lib/cjs/store/index.js +33 -0
- package/lib/cjs/store/index.js.map +1 -0
- package/lib/cjs/store/version.js +6 -0
- package/lib/cjs/store/version.js.map +1 -0
- package/lib/esm/AccountApi.js +82 -0
- package/lib/esm/AccountApi.js.map +1 -0
- package/lib/esm/AccountsApi.js +13 -0
- package/lib/esm/AccountsApi.js.map +1 -0
- package/lib/esm/AnalyticsApi.js +38 -0
- package/lib/esm/AnalyticsApi.js.map +1 -0
- package/lib/esm/ApiKeysApi.js +59 -0
- package/lib/esm/ApiKeysApi.js.map +1 -0
- package/lib/esm/AppsApi.js +116 -0
- package/lib/esm/AppsApi.js.map +1 -0
- package/lib/esm/AuditTrailApi.js +32 -0
- package/lib/esm/AuditTrailApi.js.map +1 -0
- package/lib/esm/CommandsApi.js +16 -0
- package/lib/esm/CommandsApi.js.map +1 -0
- package/lib/esm/EnvironmentsApi.js +69 -0
- package/lib/esm/EnvironmentsApi.js.map +1 -0
- package/lib/esm/GroupsApi.js +74 -0
- package/lib/esm/GroupsApi.js.map +1 -0
- package/lib/esm/IamApi.js +47 -0
- package/lib/esm/IamApi.js.map +1 -0
- package/lib/esm/InteractionBase.js +40 -0
- package/lib/esm/InteractionBase.js.map +1 -0
- package/lib/esm/InteractionCatalogApi.js +60 -0
- package/lib/esm/InteractionCatalogApi.js.map +1 -0
- package/lib/esm/InteractionOutput.js +293 -0
- package/lib/esm/InteractionOutput.js.map +1 -0
- package/lib/esm/InteractionResult.example.js +55 -0
- package/lib/esm/InteractionResult.example.js.map +1 -0
- package/lib/esm/InteractionsApi.js +259 -0
- package/lib/esm/InteractionsApi.js.map +1 -0
- package/lib/esm/MCPOAuthApi.js +59 -0
- package/lib/esm/MCPOAuthApi.js.map +1 -0
- package/lib/esm/ProjectsApi.js +85 -0
- package/lib/esm/ProjectsApi.js.map +1 -0
- package/lib/esm/PromptsApi.js +130 -0
- package/lib/esm/PromptsApi.js.map +1 -0
- package/lib/esm/RefsApi.js +10 -0
- package/lib/esm/RefsApi.js.map +1 -0
- package/lib/esm/RunsApi.js +104 -0
- package/lib/esm/RunsApi.js.map +1 -0
- package/lib/esm/SkillsApi.js +36 -0
- package/lib/esm/SkillsApi.js.map +1 -0
- package/lib/esm/StreamSource.js +13 -0
- package/lib/esm/StreamSource.js.map +1 -0
- package/lib/esm/TrainingApi.js +51 -0
- package/lib/esm/TrainingApi.js.map +1 -0
- package/lib/esm/UsersApi.js +16 -0
- package/lib/esm/UsersApi.js.map +1 -0
- package/lib/esm/client.js +353 -0
- package/lib/esm/client.js.map +1 -0
- package/lib/esm/execute.js +118 -0
- package/lib/esm/execute.js.map +1 -0
- package/lib/esm/index.js +6 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/nodejs/NodeStreamSource.js +41 -0
- package/lib/esm/nodejs/NodeStreamSource.js.map +1 -0
- package/lib/esm/nodejs/index.js +2 -0
- package/lib/esm/nodejs/index.js.map +1 -0
- package/lib/esm/store/AnalyzeDocApi.js +52 -0
- package/lib/esm/store/AnalyzeDocApi.js.map +1 -0
- package/lib/esm/store/CollectionsApi.js +127 -0
- package/lib/esm/store/CollectionsApi.js.map +1 -0
- package/lib/esm/store/CommandsApi.js +13 -0
- package/lib/esm/store/CommandsApi.js.map +1 -0
- package/lib/esm/store/DashboardApi.js +178 -0
- package/lib/esm/store/DashboardApi.js.map +1 -0
- package/lib/esm/store/DataApi.js +429 -0
- package/lib/esm/store/DataApi.js.map +1 -0
- package/lib/esm/store/EmailApi.js +99 -0
- package/lib/esm/store/EmailApi.js.map +1 -0
- package/lib/esm/store/EmbeddingsApi.js +25 -0
- package/lib/esm/store/EmbeddingsApi.js.map +1 -0
- package/lib/esm/store/FilesApi.js +231 -0
- package/lib/esm/store/FilesApi.js.map +1 -0
- package/lib/esm/store/HiveMemoryApi.js +170 -0
- package/lib/esm/store/HiveMemoryApi.js.map +1 -0
- package/lib/esm/store/IndexingApi.js +203 -0
- package/lib/esm/store/IndexingApi.js.map +1 -0
- package/lib/esm/store/ObjectsApi.js +311 -0
- package/lib/esm/store/ObjectsApi.js.map +1 -0
- package/lib/esm/store/PendingAsksApi.js +39 -0
- package/lib/esm/store/PendingAsksApi.js.map +1 -0
- package/lib/esm/store/QueryApi.js +63 -0
- package/lib/esm/store/QueryApi.js.map +1 -0
- package/lib/esm/store/RenderingApi.js +80 -0
- package/lib/esm/store/RenderingApi.js.map +1 -0
- package/lib/esm/store/SchedulesApi.js +99 -0
- package/lib/esm/store/SchedulesApi.js.map +1 -0
- package/lib/esm/store/ToolsApi.js +17 -0
- package/lib/esm/store/ToolsApi.js.map +1 -0
- package/lib/esm/store/TypeCatalogApi.js +46 -0
- package/lib/esm/store/TypeCatalogApi.js.map +1 -0
- package/lib/esm/store/TypesApi.js +56 -0
- package/lib/esm/store/TypesApi.js.map +1 -0
- package/lib/esm/store/WorkersApi.js +12 -0
- package/lib/esm/store/WorkersApi.js.map +1 -0
- package/lib/esm/store/WorkflowsApi.js +598 -0
- package/lib/esm/store/WorkflowsApi.js.map +1 -0
- package/lib/esm/store/client.js +85 -0
- package/lib/esm/store/client.js.map +1 -0
- package/lib/esm/store/errors.js +7 -0
- package/lib/esm/store/errors.js.map +1 -0
- package/lib/esm/store/index.js +17 -0
- package/lib/esm/store/index.js.map +1 -0
- package/lib/esm/store/version.js +3 -0
- package/lib/esm/store/version.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/types/AccountApi.d.ts +59 -0
- package/lib/types/AccountApi.d.ts.map +1 -0
- package/lib/types/AccountsApi.d.ts +7 -0
- package/lib/types/AccountsApi.d.ts.map +1 -0
- package/lib/types/AnalyticsApi.d.ts +11 -0
- package/lib/types/AnalyticsApi.d.ts.map +1 -0
- package/lib/types/ApiKeysApi.d.ts +42 -0
- package/lib/types/ApiKeysApi.d.ts.map +1 -0
- package/lib/types/AppsApi.d.ts +65 -0
- package/lib/types/AppsApi.d.ts.map +1 -0
- package/lib/types/AuditTrailApi.d.ts +6 -0
- package/lib/types/AuditTrailApi.d.ts.map +1 -0
- package/lib/types/CommandsApi.d.ts +10 -0
- package/lib/types/CommandsApi.d.ts.map +1 -0
- package/lib/types/EnvironmentsApi.d.ts +40 -0
- package/lib/types/EnvironmentsApi.d.ts.map +1 -0
- package/lib/types/GroupsApi.d.ts +65 -0
- package/lib/types/GroupsApi.d.ts.map +1 -0
- package/lib/types/IamApi.d.ts +41 -0
- package/lib/types/IamApi.d.ts.map +1 -0
- package/lib/types/InteractionBase.d.ts +22 -0
- package/lib/types/InteractionBase.d.ts.map +1 -0
- package/lib/types/InteractionCatalogApi.d.ts +36 -0
- package/lib/types/InteractionCatalogApi.d.ts.map +1 -0
- package/lib/types/InteractionOutput.d.ts +174 -0
- package/lib/types/InteractionOutput.d.ts.map +1 -0
- package/lib/types/InteractionResult.example.d.ts +6 -0
- package/lib/types/InteractionResult.example.d.ts.map +1 -0
- package/lib/types/InteractionsApi.d.ts +183 -0
- package/lib/types/InteractionsApi.d.ts.map +1 -0
- package/lib/types/MCPOAuthApi.d.ts +45 -0
- package/lib/types/MCPOAuthApi.d.ts.map +1 -0
- package/lib/types/ProjectsApi.d.ts +32 -0
- package/lib/types/ProjectsApi.d.ts.map +1 -0
- package/lib/types/PromptsApi.d.ts +106 -0
- package/lib/types/PromptsApi.d.ts.map +1 -0
- package/lib/types/RefsApi.d.ts +6 -0
- package/lib/types/RefsApi.d.ts.map +1 -0
- package/lib/types/RunsApi.d.ts +78 -0
- package/lib/types/RunsApi.d.ts.map +1 -0
- package/lib/types/SkillsApi.d.ts +26 -0
- package/lib/types/SkillsApi.d.ts.map +1 -0
- package/lib/types/StreamSource.d.ts +7 -0
- package/lib/types/StreamSource.d.ts.map +1 -0
- package/lib/types/TrainingApi.d.ts +27 -0
- package/lib/types/TrainingApi.d.ts.map +1 -0
- package/lib/types/UsersApi.d.ts +10 -0
- package/lib/types/UsersApi.d.ts.map +1 -0
- package/lib/types/client.d.ts +138 -0
- package/lib/types/client.d.ts.map +1 -0
- package/lib/types/execute.d.ts +37 -0
- package/lib/types/execute.d.ts.map +1 -0
- package/lib/types/index.d.ts +10 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/nodejs/NodeStreamSource.d.ts +9 -0
- package/lib/types/nodejs/NodeStreamSource.d.ts.map +1 -0
- package/lib/types/nodejs/index.d.ts +1 -0
- package/lib/types/nodejs/index.d.ts.map +1 -0
- package/lib/types/store/AnalyzeDocApi.d.ts +17 -0
- package/lib/types/store/AnalyzeDocApi.d.ts.map +1 -0
- package/lib/types/store/CollectionsApi.d.ts +82 -0
- package/lib/types/store/CollectionsApi.d.ts.map +1 -0
- package/lib/types/store/CommandsApi.d.ts +10 -0
- package/lib/types/store/CommandsApi.d.ts.map +1 -0
- package/lib/types/store/DashboardApi.d.ts +149 -0
- package/lib/types/store/DashboardApi.d.ts.map +1 -0
- package/lib/types/store/DataApi.d.ts +392 -0
- package/lib/types/store/DataApi.d.ts.map +1 -0
- package/lib/types/store/EmailApi.d.ts +185 -0
- package/lib/types/store/EmailApi.d.ts.map +1 -0
- package/lib/types/store/EmbeddingsApi.d.ts +12 -0
- package/lib/types/store/EmbeddingsApi.d.ts.map +1 -0
- package/lib/types/store/FilesApi.d.ts +110 -0
- package/lib/types/store/FilesApi.d.ts.map +1 -0
- package/lib/types/store/HiveMemoryApi.d.ts +160 -0
- package/lib/types/store/HiveMemoryApi.d.ts.map +1 -0
- package/lib/types/store/IndexingApi.d.ts +140 -0
- package/lib/types/store/IndexingApi.d.ts.map +1 -0
- package/lib/types/store/ObjectsApi.d.ts +141 -0
- package/lib/types/store/ObjectsApi.d.ts.map +1 -0
- package/lib/types/store/PendingAsksApi.d.ts +79 -0
- package/lib/types/store/PendingAsksApi.d.ts.map +1 -0
- package/lib/types/store/QueryApi.d.ts +99 -0
- package/lib/types/store/QueryApi.d.ts.map +1 -0
- package/lib/types/store/RenderingApi.d.ts +34 -0
- package/lib/types/store/RenderingApi.d.ts.map +1 -0
- package/lib/types/store/SchedulesApi.d.ts +89 -0
- package/lib/types/store/SchedulesApi.d.ts.map +1 -0
- package/lib/types/store/ToolsApi.d.ts +13 -0
- package/lib/types/store/ToolsApi.d.ts.map +1 -0
- package/lib/types/store/TypeCatalogApi.d.ts +39 -0
- package/lib/types/store/TypeCatalogApi.d.ts.map +1 -0
- package/lib/types/store/TypesApi.d.ts +25 -0
- package/lib/types/store/TypesApi.d.ts.map +1 -0
- package/lib/types/store/WorkersApi.d.ts +6 -0
- package/lib/types/store/WorkersApi.d.ts.map +1 -0
- package/lib/types/store/WorkflowsApi.d.ts +170 -0
- package/lib/types/store/WorkflowsApi.d.ts.map +1 -0
- package/lib/types/store/client.d.ts +53 -0
- package/lib/types/store/client.d.ts.map +1 -0
- package/lib/types/store/errors.d.ts +4 -0
- package/lib/types/store/errors.d.ts.map +1 -0
- package/lib/types/store/index.d.ts +16 -0
- package/lib/types/store/index.d.ts.map +1 -0
- package/lib/types/store/version.d.ts +2 -0
- package/lib/types/store/version.d.ts.map +1 -0
- package/lib/vertesia-client.js +2 -0
- package/lib/vertesia-client.js.map +1 -0
- package/package.json +4 -4
- package/src/AuditTrailApi.ts +25 -0
- package/src/ProjectsApi.ts +21 -1
- package/src/RunsApi.ts +0 -7
- package/src/UsersApi.ts +9 -5
- package/src/client.ts +2 -0
- package/src/store/IndexingApi.ts +190 -2
- package/src/store/ObjectsApi.ts +12 -8
- package/src/store/RenderingApi.ts +105 -0
- package/src/store/TypeCatalogApi.ts +53 -0
- package/src/store/TypesApi.ts +3 -0
- package/src/store/client.ts +3 -3
- package/src/store/index.ts +2 -1
- package/src/store/version.ts +1 -1
- package/src/store/IndexingAdminApi.ts +0 -336
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FilesApi = exports.ARTIFACTS_PREFIX = exports.MEMORIES_PREFIX = void 0;
|
|
4
|
+
exports.getMemoryFilePath = getMemoryFilePath;
|
|
5
|
+
exports.getAgentArtifactPath = getAgentArtifactPath;
|
|
6
|
+
const api_fetch_client_1 = require("@vertesia/api-fetch-client");
|
|
7
|
+
const StreamSource_js_1 = require("../StreamSource.js");
|
|
8
|
+
exports.MEMORIES_PREFIX = "memories";
|
|
9
|
+
exports.ARTIFACTS_PREFIX = "agents";
|
|
10
|
+
function getMemoryFilePath(name) {
|
|
11
|
+
const nameWithExt = name.endsWith(".tar.gz") ? name : name + ".tar.gz";
|
|
12
|
+
return `${exports.MEMORIES_PREFIX}/${nameWithExt}`;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Build the storage path for an agent artifact
|
|
16
|
+
* @param runId - The workflow run ID
|
|
17
|
+
* @param name - The artifact filename
|
|
18
|
+
*/
|
|
19
|
+
function getAgentArtifactPath(runId, name) {
|
|
20
|
+
return `${exports.ARTIFACTS_PREFIX}/${runId}/${name}`;
|
|
21
|
+
}
|
|
22
|
+
class FilesApi extends api_fetch_client_1.ApiTopic {
|
|
23
|
+
constructor(parent) {
|
|
24
|
+
super(parent, "/api/v1/files");
|
|
25
|
+
}
|
|
26
|
+
async deleteFile(path, prefix) {
|
|
27
|
+
const res = await this.delete(`/${path}`, { query: { prefix } });
|
|
28
|
+
return res.count;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* get the metadata of a blob given its URI. Supported URI are:
|
|
32
|
+
* starting with s3:// and gs://.
|
|
33
|
+
* For s3 blobs use #region to specify the region. Ex: s3://bucket/key#us-west-2
|
|
34
|
+
* @param uri
|
|
35
|
+
* @returns
|
|
36
|
+
*/
|
|
37
|
+
getMetadata(uri) {
|
|
38
|
+
return this.get("/metadata", {
|
|
39
|
+
query: {
|
|
40
|
+
file: uri,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Set custom metadata on a file
|
|
46
|
+
* @param file - The file path or URI
|
|
47
|
+
* @param metadata - Custom metadata key-value pairs
|
|
48
|
+
* @returns Success status
|
|
49
|
+
*/
|
|
50
|
+
setFileMetadata(file, metadata) {
|
|
51
|
+
const payload = { file, metadata };
|
|
52
|
+
return this.put("/metadata", { payload });
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Get or create a bucket for the project. If the bucket already exists, it does nothing.
|
|
56
|
+
* The bucket URI is returned.
|
|
57
|
+
* @returns
|
|
58
|
+
*/
|
|
59
|
+
getOrCreateBucket() {
|
|
60
|
+
return this.post("/bucket");
|
|
61
|
+
}
|
|
62
|
+
getUploadUrl(payload) {
|
|
63
|
+
return this.post("/upload-url", {
|
|
64
|
+
payload,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
// Strictly typed: provide either simple args or a full payload via a separate method
|
|
68
|
+
getDownloadUrl(file, name, disposition) {
|
|
69
|
+
const payload = { file, name, disposition };
|
|
70
|
+
return this.post("/download-url", { payload });
|
|
71
|
+
}
|
|
72
|
+
getDownloadUrlWithOptions(payload) {
|
|
73
|
+
return this.post("/download-url", { payload });
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Upload content to a file and return the full path (including bucket name) of the uploaded file
|
|
77
|
+
* @param source
|
|
78
|
+
* @returns
|
|
79
|
+
*/
|
|
80
|
+
async uploadFile(source) {
|
|
81
|
+
const isStream = source instanceof StreamSource_js_1.StreamSource;
|
|
82
|
+
const { url, id, path } = await this.getUploadUrl(source);
|
|
83
|
+
await fetch(url, {
|
|
84
|
+
method: "PUT",
|
|
85
|
+
body: isStream ? source.stream : source,
|
|
86
|
+
//@ts-ignore: duplex is not in the types. See https://github.com/node-fetch/node-fetch/issues/1769
|
|
87
|
+
duplex: isStream ? "half" : undefined,
|
|
88
|
+
headers: {
|
|
89
|
+
"Content-Type": source.type || "application/gzip",
|
|
90
|
+
},
|
|
91
|
+
})
|
|
92
|
+
.then((res) => {
|
|
93
|
+
if (res.ok) {
|
|
94
|
+
return res;
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
console.log(res);
|
|
98
|
+
throw new Error(`Failed to upload file: ${res.statusText}`);
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
.catch((err) => {
|
|
102
|
+
console.error("Failed to upload file", { err, url, id, path });
|
|
103
|
+
throw err;
|
|
104
|
+
});
|
|
105
|
+
return id;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
* @param location can be a relative path in the project, a reference to a cloud storage, or a accessible HTTPS URL (typically signed URL)
|
|
110
|
+
* @returns ReadableStream
|
|
111
|
+
*/
|
|
112
|
+
async downloadFile(location) {
|
|
113
|
+
//if start with HTTPS, no download url needed - assume it's signed already
|
|
114
|
+
const needSign = !location.startsWith("https:");
|
|
115
|
+
const { url } = needSign
|
|
116
|
+
? await this.getDownloadUrl(location)
|
|
117
|
+
: { url: location };
|
|
118
|
+
const res = await fetch(url, {
|
|
119
|
+
method: "GET",
|
|
120
|
+
})
|
|
121
|
+
.then((res) => {
|
|
122
|
+
if (res.ok) {
|
|
123
|
+
return res;
|
|
124
|
+
}
|
|
125
|
+
else if (res.status === 404) {
|
|
126
|
+
throw new Error(`File at ${url} not found`); //TODO: type fetch error better with a fetch error class
|
|
127
|
+
}
|
|
128
|
+
else if (res.status === 403) {
|
|
129
|
+
throw new Error(`File at ${url} is forbidden`);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
console.log(res);
|
|
133
|
+
throw new Error(`Failed to download file ${location}: ${res.statusText}`);
|
|
134
|
+
}
|
|
135
|
+
})
|
|
136
|
+
.catch((err) => {
|
|
137
|
+
console.error(`Failed to download file ${location}.`, err);
|
|
138
|
+
throw err;
|
|
139
|
+
});
|
|
140
|
+
if (!res.body) {
|
|
141
|
+
throw new Error(`No body in response while downloading file ${location}`);
|
|
142
|
+
}
|
|
143
|
+
return res.body;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Copy a file to a new destination within the same bucket.
|
|
147
|
+
* @param source - Source file path (relative to project bucket)
|
|
148
|
+
* @param dest - Destination file path (relative to project bucket)
|
|
149
|
+
* @returns The destination file URI
|
|
150
|
+
*/
|
|
151
|
+
async copyFile(source, dest) {
|
|
152
|
+
const response = await this.post("/copy", {
|
|
153
|
+
payload: { source, dest },
|
|
154
|
+
});
|
|
155
|
+
return response.dest;
|
|
156
|
+
}
|
|
157
|
+
async uploadMemoryPack(source) {
|
|
158
|
+
const fileId = getMemoryFilePath(source.name);
|
|
159
|
+
const nameWithExt = source.name.endsWith(".tar.gz")
|
|
160
|
+
? source.name
|
|
161
|
+
: source.name + ".tar.gz";
|
|
162
|
+
if (source instanceof File) {
|
|
163
|
+
let file = source;
|
|
164
|
+
return this.uploadFile(new StreamSource_js_1.StreamSource(file.stream(), nameWithExt, file.type, fileId));
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
return this.uploadFile(new StreamSource_js_1.StreamSource(source.stream, nameWithExt, source.type, fileId));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
async downloadMemoryPack(name, gunzip = false) {
|
|
171
|
+
let stream = await this.downloadFile(getMemoryFilePath(name));
|
|
172
|
+
if (gunzip) {
|
|
173
|
+
const ds = new DecompressionStream("gzip");
|
|
174
|
+
stream = stream.pipeThrough(ds);
|
|
175
|
+
}
|
|
176
|
+
return stream;
|
|
177
|
+
}
|
|
178
|
+
// ==================== Agent Artifact Methods ====================
|
|
179
|
+
/**
|
|
180
|
+
* List files by prefix
|
|
181
|
+
* @param prefix - Path prefix to filter files
|
|
182
|
+
* @returns Array of file paths matching the prefix
|
|
183
|
+
*/
|
|
184
|
+
listByPrefix(prefix) {
|
|
185
|
+
return this.get("/list", { query: { prefix } });
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Upload an artifact for an agent run
|
|
189
|
+
* @param runId - The workflow run ID
|
|
190
|
+
* @param name - Artifact name (e.g., "output.json")
|
|
191
|
+
* @param source - File content source
|
|
192
|
+
* @returns The full path of the uploaded artifact
|
|
193
|
+
*/
|
|
194
|
+
async uploadArtifact(runId, name, source) {
|
|
195
|
+
const artifactPath = getAgentArtifactPath(runId, name);
|
|
196
|
+
if (source instanceof File) {
|
|
197
|
+
const file = source;
|
|
198
|
+
return this.uploadFile(new StreamSource_js_1.StreamSource(file.stream(), name, file.type, artifactPath));
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
return this.uploadFile(new StreamSource_js_1.StreamSource(source.stream, name, source.type, artifactPath));
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Download an artifact from an agent run
|
|
206
|
+
* @param runId - The workflow run ID
|
|
207
|
+
* @param name - Artifact name
|
|
208
|
+
* @returns ReadableStream of the artifact content
|
|
209
|
+
*/
|
|
210
|
+
async downloadArtifact(runId, name) {
|
|
211
|
+
const artifactPath = getAgentArtifactPath(runId, name);
|
|
212
|
+
return this.downloadFile(artifactPath);
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Get download URL for an artifact
|
|
216
|
+
* @param runId - The workflow run ID
|
|
217
|
+
* @param name - Artifact name
|
|
218
|
+
* @param disposition - Content disposition (inline or attachment)
|
|
219
|
+
* @returns Signed URL response
|
|
220
|
+
*/
|
|
221
|
+
getArtifactDownloadUrl(runId, name, disposition) {
|
|
222
|
+
const artifactPath = getAgentArtifactPath(runId, name);
|
|
223
|
+
return this.getDownloadUrl(artifactPath, name, disposition);
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* List artifacts for an agent run
|
|
227
|
+
* @param runId - The workflow run ID
|
|
228
|
+
* @returns Array of artifact file paths
|
|
229
|
+
*/
|
|
230
|
+
async listArtifacts(runId) {
|
|
231
|
+
const prefix = `${exports.ARTIFACTS_PREFIX}/${runId}/`;
|
|
232
|
+
const result = await this.listByPrefix(prefix);
|
|
233
|
+
return result.files;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
exports.FilesApi = FilesApi;
|
|
237
|
+
//# sourceMappingURL=FilesApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilesApi.js","sourceRoot":"","sources":["../../../src/store/FilesApi.ts"],"names":[],"mappings":";;;AAYA,8CAGC;AAOD,oDAEC;AAxBD,iEAAkE;AAOlE,wDAAkD;AAErC,QAAA,eAAe,GAAG,UAAU,CAAC;AAC7B,QAAA,gBAAgB,GAAG,QAAQ,CAAC;AAEzC,SAAgB,iBAAiB,CAAC,IAAY;IAC1C,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,C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AAI,CAAC,CAAC;QACvD,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;IAChE,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa,CAAC,KAAa;QAC7B,MAAM,MAAM,GAAG,GAAG,wBAAgB,IAAI,KAAK,GAAG,CAAC;QAC/C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAC/C,OAAO,MAAM,CAAC,KAAK,CAAC;IACxB,CAAC;CACJ;AArQD,4BAqQC"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HiveMemoryApi = void 0;
|
|
4
|
+
const api_fetch_client_1 = require("@vertesia/api-fetch-client");
|
|
5
|
+
/**
|
|
6
|
+
* Client API for managing hive memories.
|
|
7
|
+
*
|
|
8
|
+
* Hive memory is a system for storing and retrieving agent learnings,
|
|
9
|
+
* enabling agents to learn from past runs and share knowledge.
|
|
10
|
+
*/
|
|
11
|
+
class HiveMemoryApi extends api_fetch_client_1.ApiTopic {
|
|
12
|
+
constructor(parent) {
|
|
13
|
+
super(parent, "/api/v1/hive-memory");
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* List memories in the project.
|
|
17
|
+
*
|
|
18
|
+
* @param options - Optional filters and pagination
|
|
19
|
+
*/
|
|
20
|
+
list(options) {
|
|
21
|
+
const params = new URLSearchParams();
|
|
22
|
+
if (options?.category)
|
|
23
|
+
params.set('category', options.category);
|
|
24
|
+
if (options?.scope)
|
|
25
|
+
params.set('scope', options.scope);
|
|
26
|
+
if (options?.limit)
|
|
27
|
+
params.set('limit', String(options.limit));
|
|
28
|
+
if (options?.offset)
|
|
29
|
+
params.set('offset', String(options.offset));
|
|
30
|
+
const queryString = params.toString();
|
|
31
|
+
return this.get(queryString ? `/?${queryString}` : '/');
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Retrieve a memory by ID.
|
|
35
|
+
*/
|
|
36
|
+
retrieve(id) {
|
|
37
|
+
return this.get(`/${id}`);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Create a new hive memory.
|
|
41
|
+
*
|
|
42
|
+
* @param payload - Memory content including category, summary, and learnings
|
|
43
|
+
*/
|
|
44
|
+
create(payload) {
|
|
45
|
+
return this.post("/", { payload });
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Update an existing memory with new learnings.
|
|
49
|
+
*
|
|
50
|
+
* This merges new learnings with existing ones rather than replacing them.
|
|
51
|
+
*
|
|
52
|
+
* @param id - Memory ID
|
|
53
|
+
* @param payload - Fields to update/merge
|
|
54
|
+
*/
|
|
55
|
+
update(id, payload) {
|
|
56
|
+
return this.put(`/${id}`, { payload });
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Delete a memory.
|
|
60
|
+
*
|
|
61
|
+
* @param id - Memory ID
|
|
62
|
+
*/
|
|
63
|
+
delete(id) {
|
|
64
|
+
return this.del(`/${id}`);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Search memories using semantic and keyword search.
|
|
68
|
+
*
|
|
69
|
+
* @param params - Search parameters including query, filters, and pagination
|
|
70
|
+
*/
|
|
71
|
+
search(params) {
|
|
72
|
+
return this.post("/search", { payload: params });
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Recall memories for an agent.
|
|
76
|
+
*
|
|
77
|
+
* This is the primary method for agents to retrieve relevant learnings.
|
|
78
|
+
* It searches for memories matching the task description and returns
|
|
79
|
+
* them formatted for agent consumption.
|
|
80
|
+
*
|
|
81
|
+
* @param taskDescription - Description of the current task
|
|
82
|
+
* @param options - Optional filters
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```typescript
|
|
86
|
+
* const result = await client.hiveMemory.recall(
|
|
87
|
+
* "Extract financial data from PDF documents",
|
|
88
|
+
* {
|
|
89
|
+
* tools: ["extract_text", "analyze_document"],
|
|
90
|
+
* maxResults: 5
|
|
91
|
+
* }
|
|
92
|
+
* );
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
recall(taskDescription, options) {
|
|
96
|
+
return this.post("/recall", {
|
|
97
|
+
payload: {
|
|
98
|
+
task_description: taskDescription,
|
|
99
|
+
tools: options?.tools,
|
|
100
|
+
category: options?.category,
|
|
101
|
+
max_results: options?.maxResults,
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Get a memory formatted for agent consumption.
|
|
107
|
+
*
|
|
108
|
+
* @param id - Memory ID
|
|
109
|
+
*/
|
|
110
|
+
getFormatted(id) {
|
|
111
|
+
return this.get(`/${id}/formatted`);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Record that a memory was used.
|
|
115
|
+
*
|
|
116
|
+
* This increments the usage count and helps track memory effectiveness.
|
|
117
|
+
*
|
|
118
|
+
* @param id - Memory ID
|
|
119
|
+
*/
|
|
120
|
+
recordUsage(id) {
|
|
121
|
+
return this.post(`/${id}/usage`, {});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Get memories by category.
|
|
125
|
+
*
|
|
126
|
+
* @param category - Task category (e.g., "document-analysis", "data-extraction")
|
|
127
|
+
* @param options - Pagination options
|
|
128
|
+
*/
|
|
129
|
+
getByCategory(category, options) {
|
|
130
|
+
const params = new URLSearchParams();
|
|
131
|
+
if (options?.limit)
|
|
132
|
+
params.set('limit', String(options.limit));
|
|
133
|
+
if (options?.offset)
|
|
134
|
+
params.set('offset', String(options.offset));
|
|
135
|
+
const queryString = params.toString();
|
|
136
|
+
return this.get(`/category/${category}${queryString ? `?${queryString}` : ''}`);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Get memory statistics for the project.
|
|
140
|
+
*/
|
|
141
|
+
getStats() {
|
|
142
|
+
return this.get("/stats");
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Apply confidence decay to unused memories.
|
|
146
|
+
*
|
|
147
|
+
* Admin operation that reduces confidence scores for memories
|
|
148
|
+
* that haven't been used recently.
|
|
149
|
+
*
|
|
150
|
+
* @param options - Decay parameters
|
|
151
|
+
*/
|
|
152
|
+
applyDecay(options) {
|
|
153
|
+
return this.post("/admin/decay", {
|
|
154
|
+
payload: {
|
|
155
|
+
days_threshold: options?.daysThreshold,
|
|
156
|
+
decay_rate: options?.decayRate,
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Archive memories with low confidence scores.
|
|
162
|
+
*
|
|
163
|
+
* Admin operation that removes memories below a confidence threshold.
|
|
164
|
+
*
|
|
165
|
+
* @param threshold - Confidence threshold (0-1), default 0.2
|
|
166
|
+
*/
|
|
167
|
+
archiveLowConfidence(threshold) {
|
|
168
|
+
return this.post("/admin/archive", {
|
|
169
|
+
payload: { threshold }
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
exports.HiveMemoryApi = HiveMemoryApi;
|
|
174
|
+
//# sourceMappingURL=HiveMemoryApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HiveMemoryApi.js","sourceRoot":"","sources":["../../../src/store/HiveMemoryApi.ts"],"names":[],"mappings":";;;AAAA,iEAAkE;AAoClE;;;;;GAKG;AACH,MAAa,aAAc,SAAQ,2BAAQ;IACvC,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IACzC,CAAC;IAED;;;;OAIG;IACH,IAAI,CAAC,OAKJ;QACG,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;QACrC,IAAI,OAAO,EAAE,QAAQ;YAAE,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;QAChE,IAAI,OAAO,EAAE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O,EAAE;gBACL,cAAc,EAAE,OAAO,EAAE,aAAa;gBACtC,UAAU,EAAE,OAAO,EAAE,SAAS;aACjC;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;;;;OAMG;IACH,oBAAoB,CAAC,SAAkB;QACnC,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE;YAC/B,OAAO,EAAE,EAAE,SAAS,EAAE;SACzB,CAAC,CAAC;IACP,CAAC;CACJ;AA5LD,sCA4LC"}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IndexingApi = void 0;
|
|
4
|
+
const api_fetch_client_1 = require("@vertesia/api-fetch-client");
|
|
5
|
+
/**
|
|
6
|
+
* API for indexing operations on content objects.
|
|
7
|
+
* Provides status, reindex, and configuration management.
|
|
8
|
+
*
|
|
9
|
+
* Internal endpoints (prefixed with /internal/) are used by Temporal workflow activities
|
|
10
|
+
* and require content_admin permission.
|
|
11
|
+
*/
|
|
12
|
+
class IndexingApi extends api_fetch_client_1.ApiTopic {
|
|
13
|
+
constructor(parent, basePath = "/api/v1/indexing") {
|
|
14
|
+
super(parent, basePath);
|
|
15
|
+
}
|
|
16
|
+
// ========================================================================
|
|
17
|
+
// User-facing endpoints
|
|
18
|
+
// ========================================================================
|
|
19
|
+
/**
|
|
20
|
+
* Get Elasticsearch status for the current project
|
|
21
|
+
*/
|
|
22
|
+
async status() {
|
|
23
|
+
return this.get("/status");
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Trigger a full reindex of all documents
|
|
27
|
+
* @param recreateIndex If true, drops and recreates the index before reindexing
|
|
28
|
+
*/
|
|
29
|
+
async reindex(recreateIndex) {
|
|
30
|
+
return this.post("/reindex", { payload: { recreateIndex } });
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Enable indexing for this project
|
|
34
|
+
*/
|
|
35
|
+
async enableIndexing() {
|
|
36
|
+
return this.post("/enable-indexing");
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Disable indexing for this project
|
|
40
|
+
*/
|
|
41
|
+
async disableIndexing() {
|
|
42
|
+
return this.post("/disable-indexing");
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Enable index-based queries for this project
|
|
46
|
+
* @deprecated Queries are now automatically enabled when indexing is enabled
|
|
47
|
+
*/
|
|
48
|
+
async enableQueries() {
|
|
49
|
+
return this.post("/enable-queries");
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Disable index-based queries for this project
|
|
53
|
+
* @deprecated Queries are now automatically enabled when indexing is enabled
|
|
54
|
+
*/
|
|
55
|
+
async disableQueries() {
|
|
56
|
+
return this.post("/disable-queries");
|
|
57
|
+
}
|
|
58
|
+
// ========================================================================
|
|
59
|
+
// Internal endpoints - called by Temporal workflow activities
|
|
60
|
+
// ========================================================================
|
|
61
|
+
/**
|
|
62
|
+
* Index a single document to Elasticsearch
|
|
63
|
+
*/
|
|
64
|
+
index(objectId, document) {
|
|
65
|
+
return this.post("/internal/index", {
|
|
66
|
+
payload: { objectId, document },
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Delete a document from Elasticsearch
|
|
71
|
+
*/
|
|
72
|
+
delete(objectId) {
|
|
73
|
+
return this.post("/internal/delete", {
|
|
74
|
+
payload: { objectId },
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Bulk index multiple documents to Elasticsearch
|
|
79
|
+
*
|
|
80
|
+
* @param documents Array of documents to index
|
|
81
|
+
* @param targetIndex Optional explicit index name for zero-downtime reindexing
|
|
82
|
+
*/
|
|
83
|
+
bulkIndex(documents, targetIndex) {
|
|
84
|
+
return this.post("/internal/bulk-index", {
|
|
85
|
+
payload: { documents, targetIndex },
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Ensure Elasticsearch index exists for the project
|
|
90
|
+
*
|
|
91
|
+
* @param recreate If true, drops and recreates the index
|
|
92
|
+
*/
|
|
93
|
+
ensureIndex(recreate) {
|
|
94
|
+
return this.post("/internal/ensure-index", {
|
|
95
|
+
payload: { recreate },
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Create a new versioned index for reindexing (without alias)
|
|
100
|
+
* The alias will be swapped after reindexing completes via swapAlias
|
|
101
|
+
*/
|
|
102
|
+
createReindexTarget() {
|
|
103
|
+
return this.post("/internal/create-reindex-target", {
|
|
104
|
+
payload: {},
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Atomically swap the alias from old index to new index
|
|
109
|
+
*
|
|
110
|
+
* @param newIndexName The new index to point the alias to
|
|
111
|
+
* @param deleteOld If true, deletes the old index after swapping
|
|
112
|
+
*/
|
|
113
|
+
swapAlias(newIndexName, deleteOld) {
|
|
114
|
+
return this.post("/internal/swap-alias", {
|
|
115
|
+
payload: { newIndexName, deleteOld },
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Get Elasticsearch index statistics for the project
|
|
120
|
+
*/
|
|
121
|
+
getStats() {
|
|
122
|
+
return this.post("/internal/stats", {
|
|
123
|
+
payload: {},
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Get the _id range for reindexing (first, last, count)
|
|
128
|
+
* Used by workflow to set up cursor-based pagination
|
|
129
|
+
*/
|
|
130
|
+
getReindexRange() {
|
|
131
|
+
return this.post("/internal/reindex-range", {
|
|
132
|
+
payload: {},
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Fetch a batch of documents from MongoDB (without indexing)
|
|
137
|
+
* Used by pipeline approach: fetch next batch while indexing current
|
|
138
|
+
*
|
|
139
|
+
* @param cursor Cursor from previous batch (null for first batch)
|
|
140
|
+
* @param limit Maximum documents to fetch (default: 500)
|
|
141
|
+
*/
|
|
142
|
+
fetchBatch(cursor, limit) {
|
|
143
|
+
return this.post("/internal/fetch-batch", {
|
|
144
|
+
payload: { cursor, limit },
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Fetch and index a batch of documents (server-side)
|
|
149
|
+
* Uses cursor-based pagination for reliability
|
|
150
|
+
*
|
|
151
|
+
* @param cursor Cursor from previous batch (null for first batch)
|
|
152
|
+
* @param limit Maximum documents to process (default: 500)
|
|
153
|
+
* @param targetIndex Optional explicit index name for zero-downtime reindexing
|
|
154
|
+
* @param since Only index docs with updated_at >= this ISO timestamp (for catch-up after reindex)
|
|
155
|
+
*/
|
|
156
|
+
indexBatch(cursor, limit, targetIndex, since) {
|
|
157
|
+
return this.post("/internal/index-batch", {
|
|
158
|
+
payload: { cursor, limit, targetIndex, since },
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Trigger a reindex operation via Temporal workflow (internal version with more options)
|
|
163
|
+
*
|
|
164
|
+
* @param fullReindex If true, reindexes all documents in the project
|
|
165
|
+
* @param objectIds Specific object IDs to reindex (if not fullReindex)
|
|
166
|
+
* @param recreateIndex If true, recreates the index before reindexing
|
|
167
|
+
*/
|
|
168
|
+
triggerReindex(options) {
|
|
169
|
+
return this.post("/internal/trigger-reindex", {
|
|
170
|
+
payload: options ?? {},
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Fetch documents by their IDs from MongoDB (for retry workflow)
|
|
175
|
+
* Returns documents ready for bulk indexing
|
|
176
|
+
*
|
|
177
|
+
* @param objectIds Array of object IDs to fetch
|
|
178
|
+
*/
|
|
179
|
+
fetchDocumentsByIds(objectIds) {
|
|
180
|
+
return this.post("/internal/fetch-by-ids", {
|
|
181
|
+
payload: { objectIds },
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Bulk delete documents from Elasticsearch
|
|
186
|
+
*
|
|
187
|
+
* @param objectIds Array of object IDs to delete
|
|
188
|
+
*/
|
|
189
|
+
bulkDelete(objectIds) {
|
|
190
|
+
return this.post("/internal/bulk-delete", {
|
|
191
|
+
payload: { objectIds },
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Get detailed index configuration for the project
|
|
196
|
+
*
|
|
197
|
+
* Returns comprehensive information about the Elasticsearch index including
|
|
198
|
+
* status, embedding dimensions, field mappings, and project configuration.
|
|
199
|
+
*/
|
|
200
|
+
getConfiguration() {
|
|
201
|
+
return this.post("/internal/configuration", {
|
|
202
|
+
payload: {},
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
exports.IndexingApi = IndexingApi;
|
|
207
|
+
//# sourceMappingURL=IndexingApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IndexingApi.js","sourceRoot":"","sources":["../../../src/store/IndexingApi.ts"],"names":[],"mappings":";;;AAAA,iEAAkE;AAmBlE;;;;;;GAMG;AACH,MAAa,WAAY,SAAQ,2BAAQ;IAErC,YAAY,MAAkB,EAAE,WAAmB,kBAAkB;QACjE,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC5B,CAAC;IAED,2EAA2E;IAC3E,wBAAwB;IACxB,2EAA2E;IAE3E;;OAEG;IACH,KAAK,CAAC,MAAM;QACR,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,OAAO,CAAC,aAAuB;QACjC,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,cAAc;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC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