@arbidocs/sdk 0.5.14 → 0.5.16
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/{browser-BNmzQBfy.d.cts → browser-4TgMltob.d.cts} +251 -8
- package/dist/{browser-B4w2pgiI.d.ts → browser-Be_hfP61.d.ts} +251 -8
- package/dist/browser.cjs +196 -15
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +196 -15
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +264 -83
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +260 -79
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import fs2, { readFileSync } from 'fs';
|
|
2
|
-
import
|
|
2
|
+
import path3, { dirname, resolve } from 'path';
|
|
3
3
|
import os2 from 'os';
|
|
4
4
|
import { createArbiClient, base64ToBytes, unwrapWorkspaceKey, sealKeyForSession, buildWebSocketUrl, createAuthMessage, parseServerMessage, isMessageType, createContentHash, encryptFile, initSodium, encryptionKeypairFromSigningKey, sealedBoxDecrypt, bytesToBase64, encryptWithChatKey, decryptWithChatKey, decryptFile, deriveDirectChatKey, openSealedChatKey, generateChatKey, sealChatKey, sealCallKey, encryptMessage, decodeSecureMailKey, openSecureMail, secureMailClaim, createSessionManager, authRequestError, changePassword, openCallKeyOf, decryptCallTitle, generateCallKey, encryptCallTitle, sealCallKeyForPeers, openSealedCallKey, readSessionClaims } from '@arbidocs/client';
|
|
5
5
|
import { execSync, spawn } from 'child_process';
|
|
@@ -3625,8 +3625,8 @@ async function extractErrorMessage(res) {
|
|
|
3625
3625
|
return `Request failed: ${res.status} ${res.statusText}`;
|
|
3626
3626
|
}
|
|
3627
3627
|
async function authenticatedFetch(options) {
|
|
3628
|
-
const { baseUrl, accessToken, path:
|
|
3629
|
-
const res = await fetch(`${baseUrl}${
|
|
3628
|
+
const { baseUrl, accessToken, path: path5, method, body, headers, signal } = options;
|
|
3629
|
+
const res = await fetch(`${baseUrl}${path5}`, {
|
|
3630
3630
|
method: method ?? (body ? "POST" : "GET"),
|
|
3631
3631
|
headers: {
|
|
3632
3632
|
Authorization: `Bearer ${accessToken}`,
|
|
@@ -3699,13 +3699,13 @@ var FileConfigStore = class {
|
|
|
3699
3699
|
sessionFile;
|
|
3700
3700
|
metadataFile;
|
|
3701
3701
|
constructor(configDir) {
|
|
3702
|
-
const arbiBase = process.env.ARBI_CONFIG_DIR ?? (fs2.existsSync(
|
|
3702
|
+
const arbiBase = process.env.ARBI_CONFIG_DIR ?? (fs2.existsSync(path3.join(process.cwd(), ".arbi", "credentials.json")) ? path3.join(process.cwd(), ".arbi") : path3.join(os2.homedir(), ".arbi"));
|
|
3703
3703
|
const arbiId = process.env.ARBI_ID;
|
|
3704
|
-
this.configDir = configDir ?? (arbiId ?
|
|
3705
|
-
this.configFile =
|
|
3706
|
-
this.credentialsFile =
|
|
3707
|
-
this.sessionFile =
|
|
3708
|
-
this.metadataFile =
|
|
3704
|
+
this.configDir = configDir ?? (arbiId ? path3.join(arbiBase, arbiId) : arbiBase);
|
|
3705
|
+
this.configFile = path3.join(this.configDir, "config.json");
|
|
3706
|
+
this.credentialsFile = path3.join(this.configDir, "credentials.json");
|
|
3707
|
+
this.sessionFile = path3.join(this.configDir, "session.json");
|
|
3708
|
+
this.metadataFile = path3.join(this.configDir, "last-metadata.json");
|
|
3709
3709
|
}
|
|
3710
3710
|
ensureConfigDir() {
|
|
3711
3711
|
if (!fs2.existsSync(this.configDir)) {
|
|
@@ -3853,12 +3853,12 @@ var FileConfigStore = class {
|
|
|
3853
3853
|
return { config: config2, source: "ARBI_SERVER_URL env var" };
|
|
3854
3854
|
}
|
|
3855
3855
|
const dir = searchDir || process.cwd();
|
|
3856
|
-
const dotenvConfig = this.readDotEnvDomain(
|
|
3856
|
+
const dotenvConfig = this.readDotEnvDomain(path3.join(dir, ".env"));
|
|
3857
3857
|
if (dotenvConfig) {
|
|
3858
3858
|
this.saveConfig(dotenvConfig);
|
|
3859
3859
|
return { config: dotenvConfig, source: ".env file" };
|
|
3860
3860
|
}
|
|
3861
|
-
const publicConfig = this.readPublicConfigDomain(
|
|
3861
|
+
const publicConfig = this.readPublicConfigDomain(path3.join(dir, "public", "config.json"));
|
|
3862
3862
|
if (publicConfig) {
|
|
3863
3863
|
this.saveConfig(publicConfig);
|
|
3864
3864
|
return { config: publicConfig, source: "public/config.json" };
|
|
@@ -4630,7 +4630,6 @@ function formatStreamSummary(result, elapsedTime) {
|
|
|
4630
4630
|
}
|
|
4631
4631
|
return parts.length > 0 ? parts.join(" \xB7 ") : "";
|
|
4632
4632
|
}
|
|
4633
|
-
var consumeSSEStream = streamSSE;
|
|
4634
4633
|
var AUTH_TIMEOUT_MS = 1e4;
|
|
4635
4634
|
var MAX_BACKOFF_MS = 3e4;
|
|
4636
4635
|
var WebSocketAuthError = class extends Error {
|
|
@@ -5631,6 +5630,7 @@ __export(workspaces_exports, {
|
|
|
5631
5630
|
addWorkspaceMembers: () => addWorkspaceMembers,
|
|
5632
5631
|
addWorkspaceMembersBody: () => addWorkspaceMembersBody,
|
|
5633
5632
|
addWorkspaceUsers: () => addWorkspaceUsers,
|
|
5633
|
+
archiveWorkspace: () => archiveWorkspace,
|
|
5634
5634
|
cancelWorkspaceTransfer: () => cancelWorkspaceTransfer,
|
|
5635
5635
|
copyDocuments: () => copyDocuments,
|
|
5636
5636
|
createWorkspace: () => createWorkspace,
|
|
@@ -5638,17 +5638,20 @@ __export(workspaces_exports, {
|
|
|
5638
5638
|
exportWorkspaceData: () => exportWorkspaceData,
|
|
5639
5639
|
getWorkspaceAccessStatus: () => getWorkspaceAccessStatus,
|
|
5640
5640
|
getWorkspaceActivity: () => getWorkspaceActivity,
|
|
5641
|
+
getWorkspaceArchive: () => getWorkspaceArchive,
|
|
5641
5642
|
getWorkspaceTransfer: () => getWorkspaceTransfer,
|
|
5642
5643
|
grantTemporaryWorkspaceAccess: () => grantTemporaryWorkspaceAccess,
|
|
5643
5644
|
listWorkspaceTransfers: () => listWorkspaceTransfers,
|
|
5644
5645
|
listWorkspaceUsers: () => listWorkspaceUsers,
|
|
5645
5646
|
listWorkspaces: () => listWorkspaces,
|
|
5647
|
+
moveWorkspaceToProject: () => moveWorkspaceToProject,
|
|
5646
5648
|
planWorkspaceTransfer: () => planWorkspaceTransfer,
|
|
5647
5649
|
primeWorkspaceKey: () => primeWorkspaceKey,
|
|
5648
5650
|
removeWorkspaceUsers: () => removeWorkspaceUsers,
|
|
5649
5651
|
resumeWorkspaceTransfer: () => resumeWorkspaceTransfer,
|
|
5650
5652
|
setUserRole: () => setUserRole,
|
|
5651
5653
|
startWorkspaceTransfer: () => startWorkspaceTransfer,
|
|
5654
|
+
unarchiveWorkspace: () => unarchiveWorkspace,
|
|
5652
5655
|
updateWorkspace: () => updateWorkspace
|
|
5653
5656
|
});
|
|
5654
5657
|
async function listWorkspaces(arbi) {
|
|
@@ -5668,6 +5671,39 @@ async function createWorkspace(arbi, name, encryptedWorkspaceKey, projectExtId,
|
|
|
5668
5671
|
"Failed to create workspace"
|
|
5669
5672
|
);
|
|
5670
5673
|
}
|
|
5674
|
+
async function moveWorkspaceToProject(arbi, workspaceExtId, projectExtId) {
|
|
5675
|
+
return requireData(
|
|
5676
|
+
await arbi.fetch.PUT("/v1/workspace/{workspace_ext_id}/project", {
|
|
5677
|
+
params: { path: { workspace_ext_id: workspaceExtId } },
|
|
5678
|
+
body: { project_ext_id: projectExtId }
|
|
5679
|
+
}),
|
|
5680
|
+
"Failed to move workspace"
|
|
5681
|
+
);
|
|
5682
|
+
}
|
|
5683
|
+
async function getWorkspaceArchive(arbi, workspaceExtId) {
|
|
5684
|
+
return requireData(
|
|
5685
|
+
await arbi.fetch.GET("/v1/workspace/{workspace_ext_id}/archive", {
|
|
5686
|
+
params: { path: { workspace_ext_id: workspaceExtId } }
|
|
5687
|
+
}),
|
|
5688
|
+
"Could not read the archive state"
|
|
5689
|
+
);
|
|
5690
|
+
}
|
|
5691
|
+
async function archiveWorkspace(arbi, workspaceExtId) {
|
|
5692
|
+
return requireData(
|
|
5693
|
+
await arbi.fetch.POST("/v1/workspace/{workspace_ext_id}/archive", {
|
|
5694
|
+
params: { path: { workspace_ext_id: workspaceExtId } }
|
|
5695
|
+
}),
|
|
5696
|
+
"Could not archive the workspace"
|
|
5697
|
+
);
|
|
5698
|
+
}
|
|
5699
|
+
async function unarchiveWorkspace(arbi, workspaceExtId) {
|
|
5700
|
+
return requireData(
|
|
5701
|
+
await arbi.fetch.POST("/v1/workspace/{workspace_ext_id}/unarchive", {
|
|
5702
|
+
params: { path: { workspace_ext_id: workspaceExtId } }
|
|
5703
|
+
}),
|
|
5704
|
+
"Could not unarchive the workspace"
|
|
5705
|
+
);
|
|
5706
|
+
}
|
|
5671
5707
|
async function deleteWorkspaces(arbi, workspaceIds) {
|
|
5672
5708
|
requireOk(
|
|
5673
5709
|
await arbi.fetch.DELETE("/v1/workspace/", {
|
|
@@ -5856,6 +5892,7 @@ __export(conversations_exports, {
|
|
|
5856
5892
|
importConversations: () => importConversations,
|
|
5857
5893
|
listConversations: () => listConversations,
|
|
5858
5894
|
postConversationMessage: () => postConversationMessage,
|
|
5895
|
+
searchConversations: () => searchConversations,
|
|
5859
5896
|
updateConversationAssistantMode: () => updateConversationAssistantMode
|
|
5860
5897
|
});
|
|
5861
5898
|
async function listConversations(arbi) {
|
|
@@ -5888,6 +5925,12 @@ async function deleteConversation(arbi, conversationId) {
|
|
|
5888
5925
|
"Failed to delete conversation"
|
|
5889
5926
|
);
|
|
5890
5927
|
}
|
|
5928
|
+
async function searchConversations(arbi, body) {
|
|
5929
|
+
return requireData(
|
|
5930
|
+
await arbi.fetch.POST("/v1/conversation/search", { body }),
|
|
5931
|
+
"Failed to search conversations"
|
|
5932
|
+
);
|
|
5933
|
+
}
|
|
5891
5934
|
async function getMessage(arbi, messageId) {
|
|
5892
5935
|
return requireData(
|
|
5893
5936
|
await arbi.fetch.GET("/v1/conversation/message/{message_ext_id}", {
|
|
@@ -9175,6 +9218,118 @@ async function remindFact(arbi, factId, options = {}) {
|
|
|
9175
9218
|
);
|
|
9176
9219
|
}
|
|
9177
9220
|
|
|
9221
|
+
// src/operations/databases.ts
|
|
9222
|
+
var databases_exports = {};
|
|
9223
|
+
__export(databases_exports, {
|
|
9224
|
+
addDatabaseRows: () => addDatabaseRows,
|
|
9225
|
+
createDatabase: () => createDatabase,
|
|
9226
|
+
deleteDatabase: () => deleteDatabase,
|
|
9227
|
+
deleteDatabaseRows: () => deleteDatabaseRows,
|
|
9228
|
+
exportDatabase: () => exportDatabase,
|
|
9229
|
+
getDatabase: () => getDatabase,
|
|
9230
|
+
importDatabase: () => importDatabase,
|
|
9231
|
+
importDatabaseRows: () => importDatabaseRows,
|
|
9232
|
+
listDatabaseRows: () => listDatabaseRows,
|
|
9233
|
+
listDatabases: () => listDatabases,
|
|
9234
|
+
updateDatabase: () => updateDatabase,
|
|
9235
|
+
updateDatabaseRow: () => updateDatabaseRow
|
|
9236
|
+
});
|
|
9237
|
+
var path2 = (databaseId) => ({ path: { database_id: databaseId } });
|
|
9238
|
+
function spreadsheet(file) {
|
|
9239
|
+
const form = new FormData();
|
|
9240
|
+
form.append("file", file);
|
|
9241
|
+
return { body: form, bodySerializer: () => form };
|
|
9242
|
+
}
|
|
9243
|
+
async function listDatabases(arbi) {
|
|
9244
|
+
return requireData(await arbi.fetch.GET("/v1/databases"), "Failed to list databases");
|
|
9245
|
+
}
|
|
9246
|
+
async function getDatabase(arbi, databaseId) {
|
|
9247
|
+
return requireData(
|
|
9248
|
+
await arbi.fetch.GET("/v1/databases/{database_id}", { params: path2(databaseId) }),
|
|
9249
|
+
"Failed to read the database"
|
|
9250
|
+
);
|
|
9251
|
+
}
|
|
9252
|
+
async function listDatabaseRows(arbi, databaseId, query2 = {}) {
|
|
9253
|
+
return requireData(
|
|
9254
|
+
await arbi.fetch.GET("/v1/databases/{database_id}/rows", {
|
|
9255
|
+
params: { ...path2(databaseId), query: query2 }
|
|
9256
|
+
}),
|
|
9257
|
+
"Failed to read the rows"
|
|
9258
|
+
);
|
|
9259
|
+
}
|
|
9260
|
+
async function createDatabase(arbi, body) {
|
|
9261
|
+
return requireData(
|
|
9262
|
+
await arbi.fetch.POST("/v1/databases", { body }),
|
|
9263
|
+
"Failed to create the database"
|
|
9264
|
+
);
|
|
9265
|
+
}
|
|
9266
|
+
async function updateDatabase(arbi, databaseId, body) {
|
|
9267
|
+
return requireData(
|
|
9268
|
+
await arbi.fetch.PATCH("/v1/databases/{database_id}", { params: path2(databaseId), body }),
|
|
9269
|
+
"Failed to update the database"
|
|
9270
|
+
);
|
|
9271
|
+
}
|
|
9272
|
+
async function deleteDatabase(arbi, databaseId) {
|
|
9273
|
+
requireOk(
|
|
9274
|
+
await arbi.fetch.DELETE("/v1/databases/{database_id}", { params: path2(databaseId) }),
|
|
9275
|
+
"Failed to delete the database"
|
|
9276
|
+
);
|
|
9277
|
+
}
|
|
9278
|
+
async function addDatabaseRows(arbi, databaseId, rows) {
|
|
9279
|
+
return requireData(
|
|
9280
|
+
await arbi.fetch.POST("/v1/databases/{database_id}/rows", {
|
|
9281
|
+
params: path2(databaseId),
|
|
9282
|
+
body: { rows }
|
|
9283
|
+
}),
|
|
9284
|
+
"Failed to add rows"
|
|
9285
|
+
);
|
|
9286
|
+
}
|
|
9287
|
+
async function updateDatabaseRow(arbi, databaseId, rowId, values) {
|
|
9288
|
+
return requireData(
|
|
9289
|
+
await arbi.fetch.PATCH("/v1/databases/{database_id}/rows/{row_id}", {
|
|
9290
|
+
params: { path: { database_id: databaseId, row_id: rowId } },
|
|
9291
|
+
body: { values }
|
|
9292
|
+
}),
|
|
9293
|
+
"Failed to update the row"
|
|
9294
|
+
);
|
|
9295
|
+
}
|
|
9296
|
+
async function deleteDatabaseRows(arbi, databaseId, ids) {
|
|
9297
|
+
requireOk(
|
|
9298
|
+
await arbi.fetch.POST("/v1/databases/{database_id}/rows/delete", {
|
|
9299
|
+
params: path2(databaseId),
|
|
9300
|
+
body: { ids }
|
|
9301
|
+
}),
|
|
9302
|
+
"Failed to delete rows"
|
|
9303
|
+
);
|
|
9304
|
+
}
|
|
9305
|
+
async function importDatabase(arbi, file, name) {
|
|
9306
|
+
return requireData(
|
|
9307
|
+
await arbi.fetch.POST("/v1/databases/import", {
|
|
9308
|
+
params: { query: { name } },
|
|
9309
|
+
...spreadsheet(file)
|
|
9310
|
+
}),
|
|
9311
|
+
"Import failed"
|
|
9312
|
+
);
|
|
9313
|
+
}
|
|
9314
|
+
async function importDatabaseRows(arbi, databaseId, file) {
|
|
9315
|
+
return requireData(
|
|
9316
|
+
await arbi.fetch.POST("/v1/databases/{database_id}/import", {
|
|
9317
|
+
params: { ...path2(databaseId), query: { add_columns: true } },
|
|
9318
|
+
...spreadsheet(file)
|
|
9319
|
+
}),
|
|
9320
|
+
"Import failed"
|
|
9321
|
+
);
|
|
9322
|
+
}
|
|
9323
|
+
async function exportDatabase(arbi, databaseId, format) {
|
|
9324
|
+
return requireData(
|
|
9325
|
+
await arbi.fetch.GET("/v1/databases/{database_id}/export", {
|
|
9326
|
+
params: { ...path2(databaseId), query: { format } },
|
|
9327
|
+
parseAs: "blob"
|
|
9328
|
+
}),
|
|
9329
|
+
"Export failed"
|
|
9330
|
+
);
|
|
9331
|
+
}
|
|
9332
|
+
|
|
9178
9333
|
// src/operations/mail.ts
|
|
9179
9334
|
var mail_exports = {};
|
|
9180
9335
|
__export(mail_exports, {
|
|
@@ -9196,9 +9351,9 @@ __export(mail_exports, {
|
|
|
9196
9351
|
});
|
|
9197
9352
|
var NATIVE_ACCOUNT = "native";
|
|
9198
9353
|
function createMailFetch(auth) {
|
|
9199
|
-
return (
|
|
9354
|
+
return (path5, init = {}) => authenticatedFetch({
|
|
9200
9355
|
...auth,
|
|
9201
|
-
path: `/v1/mail${
|
|
9356
|
+
path: `/v1/mail${path5}`,
|
|
9202
9357
|
method: init.method,
|
|
9203
9358
|
body: init.body,
|
|
9204
9359
|
headers: {
|
|
@@ -9237,8 +9392,8 @@ function getMessage2(mail, messageId, accountId = NATIVE_ACCOUNT) {
|
|
|
9237
9392
|
return json(mail(`${accountPath(accountId)}/messages/${encodeURIComponent(messageId)}`));
|
|
9238
9393
|
}
|
|
9239
9394
|
async function downloadAttachment(mail, messageId, attachmentId, accountId = NATIVE_ACCOUNT) {
|
|
9240
|
-
const
|
|
9241
|
-
return new Uint8Array(await (await mail(
|
|
9395
|
+
const path5 = `${accountPath(accountId)}/messages/${encodeURIComponent(messageId)}/attachments/${encodeURIComponent(attachmentId)}`;
|
|
9396
|
+
return new Uint8Array(await (await mail(path5)).arrayBuffer());
|
|
9242
9397
|
}
|
|
9243
9398
|
async function updateMessage(mail, messageId, update, accountId = NATIVE_ACCOUNT) {
|
|
9244
9399
|
await mail(`${accountPath(accountId)}/messages/${encodeURIComponent(messageId)}`, {
|
|
@@ -9290,11 +9445,11 @@ async function unlockNativeMail(mail, keys) {
|
|
|
9290
9445
|
async function claimSecureMail(mail, id, fragmentKey, recipientPublicKey) {
|
|
9291
9446
|
const key = decodeSecureMailKey(fragmentKey);
|
|
9292
9447
|
try {
|
|
9293
|
-
const
|
|
9294
|
-
const { raw } = await openSecureMail(await json(mail(
|
|
9448
|
+
const path5 = `/secure/${encodeURIComponent(id)}`;
|
|
9449
|
+
const { raw } = await openSecureMail(await json(mail(path5)), key);
|
|
9295
9450
|
raw.fill(0);
|
|
9296
9451
|
const claim = await secureMailClaim(key, recipientPublicKey);
|
|
9297
|
-
return await json(mail(`${
|
|
9452
|
+
return await json(mail(`${path5}/claim`, { method: "POST", body: JSON.stringify(claim) }));
|
|
9298
9453
|
} finally {
|
|
9299
9454
|
key.fill(0);
|
|
9300
9455
|
}
|
|
@@ -11141,6 +11296,14 @@ var Arbi = class {
|
|
|
11141
11296
|
this.requireClient().workspaceKeys.forget(workspaceIds);
|
|
11142
11297
|
},
|
|
11143
11298
|
update: (body) => updateWorkspace(this.requireClient(), body),
|
|
11299
|
+
/** A workspace's archive state (status, bytes per tier, the unarchive estimate). */
|
|
11300
|
+
archiveState: (workspaceId) => getWorkspaceArchive(this.requireClient(), workspaceId),
|
|
11301
|
+
/** Archive a workspace: closed for everyone until unarchived. */
|
|
11302
|
+
archive: (workspaceId) => archiveWorkspace(this.requireClient(), workspaceId),
|
|
11303
|
+
/** Start unarchiving a workspace (its documents are re-indexed). */
|
|
11304
|
+
unarchive: (workspaceId) => unarchiveWorkspace(this.requireClient(), workspaceId),
|
|
11305
|
+
/** Move a workspace (open or not) to another project. */
|
|
11306
|
+
moveToProject: (workspaceId, projectExtId) => moveWorkspaceToProject(this.requireClient(), workspaceId, projectExtId),
|
|
11144
11307
|
listUsers: () => listWorkspaceUsers(this.requireClient()),
|
|
11145
11308
|
/** One page of a workspace's activity feed, newest first (see `getWorkspaceActivity`). */
|
|
11146
11309
|
activity: (workspaceId, options) => getWorkspaceActivity(this.requireClient(), workspaceId, options),
|
|
@@ -11312,6 +11475,8 @@ var Arbi = class {
|
|
|
11312
11475
|
list: () => listConversations(this.requireClient()),
|
|
11313
11476
|
getThreads: (conversationId) => getConversationThreads(this.requireClient(), conversationId),
|
|
11314
11477
|
delete: (conversationId) => deleteConversation(this.requireClient(), conversationId),
|
|
11478
|
+
/** Search the open workspace's past conversation messages (keyword + semantic), grouped. */
|
|
11479
|
+
search: (body) => searchConversations(this.requireClient(), body),
|
|
11315
11480
|
/**
|
|
11316
11481
|
* Patch a conversation: `title`, `shared` (owner only), its bound document
|
|
11317
11482
|
* (`bound_document_ext_id`, `null` unbinds), and the work fields (`description`, `due_at`,
|
|
@@ -11399,11 +11564,11 @@ var Arbi = class {
|
|
|
11399
11564
|
};
|
|
11400
11565
|
/** Authenticated native Word transport, with normal session recovery. */
|
|
11401
11566
|
editor = {
|
|
11402
|
-
request: (
|
|
11567
|
+
request: (path5, options = {}) => this.recovering(async () => {
|
|
11403
11568
|
const { baseUrl, accessToken } = this.getAuthHeaders();
|
|
11404
11569
|
const headers = new Headers(options.headers);
|
|
11405
11570
|
headers.set("Authorization", `Bearer ${accessToken}`);
|
|
11406
|
-
const response = await fetch(`${baseUrl}/v1/editor${
|
|
11571
|
+
const response = await fetch(`${baseUrl}/v1/editor${path5}`, { ...options, headers });
|
|
11407
11572
|
if (!response.ok) {
|
|
11408
11573
|
const body = await response.json().catch(() => null);
|
|
11409
11574
|
throw new ArbiApiError(body?.detail || `Document request failed (${response.status})`, {
|
|
@@ -11420,13 +11585,13 @@ var Arbi = class {
|
|
|
11420
11585
|
*/
|
|
11421
11586
|
mail = {
|
|
11422
11587
|
/** Fetch a path under `/v1/mail`; rejects a non-2xx response with an `ArbiApiError` (`status`). */
|
|
11423
|
-
fetch: (
|
|
11588
|
+
fetch: (path5, init = {}) => this.recovering(async () => {
|
|
11424
11589
|
const { baseUrl, accessToken } = this.getAuthHeaders();
|
|
11425
11590
|
const headers = new Headers(init.headers);
|
|
11426
11591
|
headers.set("Authorization", `Bearer ${accessToken}`);
|
|
11427
11592
|
if (init.body && !headers.has("Content-Type"))
|
|
11428
11593
|
headers.set("Content-Type", "application/json");
|
|
11429
|
-
const response = await fetch(`${baseUrl}/v1/mail${
|
|
11594
|
+
const response = await fetch(`${baseUrl}/v1/mail${path5}`, { ...init, headers });
|
|
11430
11595
|
if (!response.ok) {
|
|
11431
11596
|
const body = await response.json().catch(() => null);
|
|
11432
11597
|
throw new ArbiApiError(
|
|
@@ -12239,6 +12404,22 @@ var Arbi = class {
|
|
|
12239
12404
|
/** The documents the open workspace may use as its house template. */
|
|
12240
12405
|
candidates: () => listHouseTemplateCandidates(this.requireClient())
|
|
12241
12406
|
};
|
|
12407
|
+
// ── Databases (user-defined tables of the open workspace) ──────────
|
|
12408
|
+
databases = {
|
|
12409
|
+
list: () => listDatabases(this.requireClient()),
|
|
12410
|
+
get: (databaseId) => getDatabase(this.requireClient(), databaseId),
|
|
12411
|
+
/** A search of the rows (any cell), sorted and paged on the server. */
|
|
12412
|
+
rows: (databaseId, query2) => listDatabaseRows(this.requireClient(), databaseId, query2),
|
|
12413
|
+
create: (body) => createDatabase(this.requireClient(), body),
|
|
12414
|
+
update: (databaseId, body) => updateDatabase(this.requireClient(), databaseId, body),
|
|
12415
|
+
delete: (databaseId) => deleteDatabase(this.requireClient(), databaseId),
|
|
12416
|
+
addRows: (databaseId, rows) => addDatabaseRows(this.requireClient(), databaseId, rows),
|
|
12417
|
+
updateRow: (databaseId, rowId, values) => updateDatabaseRow(this.requireClient(), databaseId, rowId, values),
|
|
12418
|
+
deleteRows: (databaseId, ids) => deleteDatabaseRows(this.requireClient(), databaseId, ids),
|
|
12419
|
+
import: (file, name) => importDatabase(this.requireClient(), file, name),
|
|
12420
|
+
importRows: (databaseId, file) => importDatabaseRows(this.requireClient(), databaseId, file),
|
|
12421
|
+
export: (databaseId, format) => exportDatabase(this.requireClient(), databaseId, format)
|
|
12422
|
+
};
|
|
12242
12423
|
// ── Workspace facts ─────────────────────────────────────────────────
|
|
12243
12424
|
facts = {
|
|
12244
12425
|
create: (body) => createFact(this.requireClient(), body),
|
|
@@ -12310,16 +12491,16 @@ function collectFiles(dirPath, baseDir) {
|
|
|
12310
12491
|
const root = baseDir ?? dirPath;
|
|
12311
12492
|
const results = [];
|
|
12312
12493
|
for (const entry of fs2.readdirSync(dirPath, { withFileTypes: true })) {
|
|
12313
|
-
const fullPath =
|
|
12494
|
+
const fullPath = path3.join(dirPath, entry.name);
|
|
12314
12495
|
if (entry.isDirectory()) {
|
|
12315
12496
|
results.push(...collectFiles(fullPath, root));
|
|
12316
12497
|
} else if (entry.isFile()) {
|
|
12317
|
-
const ext =
|
|
12498
|
+
const ext = path3.extname(entry.name).toLowerCase();
|
|
12318
12499
|
if (SUPPORTED_EXTENSIONS.has(ext)) {
|
|
12319
12500
|
const stat = fs2.statSync(fullPath);
|
|
12320
12501
|
results.push({
|
|
12321
12502
|
absolutePath: fullPath,
|
|
12322
|
-
relativePath:
|
|
12503
|
+
relativePath: path3.relative(root, fullPath),
|
|
12323
12504
|
size: stat.size
|
|
12324
12505
|
});
|
|
12325
12506
|
}
|
|
@@ -12355,14 +12536,14 @@ function readFileAsBlob(filePath, fileSize, fileName) {
|
|
|
12355
12536
|
}
|
|
12356
12537
|
async function uploadLocalFile(auth, filePath, options) {
|
|
12357
12538
|
const stat = fs2.statSync(filePath);
|
|
12358
|
-
const fileName =
|
|
12539
|
+
const fileName = path3.basename(filePath);
|
|
12359
12540
|
const blob = readFileAsBlob(filePath, stat.size, fileName);
|
|
12360
12541
|
const result = await uploadFile(auth, blob, fileName, options);
|
|
12361
12542
|
return { ...result, fileName };
|
|
12362
12543
|
}
|
|
12363
12544
|
async function uploadLocalFilesDirect(arbi, workspaceKey, filePaths, options) {
|
|
12364
12545
|
const files = filePaths.map((fp) => {
|
|
12365
|
-
const resolved =
|
|
12546
|
+
const resolved = path3.resolve(fp);
|
|
12366
12547
|
const stat = fs2.statSync(resolved);
|
|
12367
12548
|
if (stat.size > NODE_BUFFER_LIMIT) {
|
|
12368
12549
|
throw new Error(
|
|
@@ -12370,9 +12551,9 @@ async function uploadLocalFilesDirect(arbi, workspaceKey, filePaths, options) {
|
|
|
12370
12551
|
);
|
|
12371
12552
|
}
|
|
12372
12553
|
return {
|
|
12373
|
-
name:
|
|
12554
|
+
name: path3.basename(resolved),
|
|
12374
12555
|
data: new Uint8Array(fs2.readFileSync(resolved)),
|
|
12375
|
-
contentType: mimeFromName(
|
|
12556
|
+
contentType: mimeFromName(path3.basename(resolved))
|
|
12376
12557
|
};
|
|
12377
12558
|
});
|
|
12378
12559
|
return uploadDocumentsDirect(arbi, workspaceKey, files, options);
|
|
@@ -12418,8 +12599,8 @@ async function runGroupedDirectUpload(arbi, workspaceKey, groups, options) {
|
|
|
12418
12599
|
return { doc_ext_ids: allDocIds, skipped: allSkipped, folders };
|
|
12419
12600
|
}
|
|
12420
12601
|
async function uploadLocalDirectoryDirect(arbi, workspaceKey, dirPath, options) {
|
|
12421
|
-
const resolvedDir =
|
|
12422
|
-
const dirName =
|
|
12602
|
+
const resolvedDir = path3.resolve(dirPath);
|
|
12603
|
+
const dirName = path3.basename(resolvedDir);
|
|
12423
12604
|
const entries = collectFiles(resolvedDir);
|
|
12424
12605
|
if (entries.length === 0) {
|
|
12425
12606
|
return { doc_ext_ids: [], skipped: [], folders: /* @__PURE__ */ new Map() };
|
|
@@ -12431,9 +12612,9 @@ async function uploadLocalDirectoryDirect(arbi, workspaceKey, dirPath, options)
|
|
|
12431
12612
|
`File ${entry.absolutePath} is ${entry.size} bytes \u2014 direct upload currently loads the full file into memory; skip --s3 for files > 2 GiB.`
|
|
12432
12613
|
);
|
|
12433
12614
|
}
|
|
12434
|
-
const relDir =
|
|
12615
|
+
const relDir = path3.dirname(entry.relativePath);
|
|
12435
12616
|
const folder = sanitizeFolderPath(relDir === "." ? dirName : `${dirName}/${relDir}`);
|
|
12436
|
-
const name =
|
|
12617
|
+
const name = path3.basename(entry.relativePath);
|
|
12437
12618
|
if (!buckets.has(folder)) buckets.set(folder, []);
|
|
12438
12619
|
buckets.get(folder).push({
|
|
12439
12620
|
name,
|
|
@@ -12449,11 +12630,11 @@ async function uploadLocalZipDirect(arbi, workspaceKey, zipPath, options) {
|
|
|
12449
12630
|
const JSZip = (await import('jszip')).default;
|
|
12450
12631
|
const zipBuffer = fs2.readFileSync(zipPath);
|
|
12451
12632
|
const zip = await JSZip.loadAsync(zipBuffer);
|
|
12452
|
-
const zipBaseName =
|
|
12633
|
+
const zipBaseName = path3.basename(zipPath).replace(/\.zip$/i, "");
|
|
12453
12634
|
const entries = [];
|
|
12454
12635
|
zip.forEach((relativePath, zipEntry) => {
|
|
12455
12636
|
if (zipEntry.dir) return;
|
|
12456
|
-
const ext =
|
|
12637
|
+
const ext = path3.extname(relativePath).toLowerCase();
|
|
12457
12638
|
if (SUPPORTED_EXTENSIONS.has(ext)) {
|
|
12458
12639
|
entries.push({ zipEntryPath: relativePath, zipEntry });
|
|
12459
12640
|
}
|
|
@@ -12466,8 +12647,8 @@ async function uploadLocalZipDirect(arbi, workspaceKey, zipPath, options) {
|
|
|
12466
12647
|
const buckets = /* @__PURE__ */ new Map();
|
|
12467
12648
|
for (const entry of entries) {
|
|
12468
12649
|
const data = await entry.zipEntry.async("uint8array");
|
|
12469
|
-
const fileName =
|
|
12470
|
-
const relDir =
|
|
12650
|
+
const fileName = path3.basename(entry.zipEntryPath);
|
|
12651
|
+
const relDir = path3.dirname(entry.zipEntryPath);
|
|
12471
12652
|
let folder;
|
|
12472
12653
|
if (hasSingleRoot) {
|
|
12473
12654
|
folder = relDir === "." ? zipBaseName : relDir;
|
|
@@ -12492,17 +12673,17 @@ async function uploadLocalArchiveDirect(arbi, workspaceKey, archivePath, options
|
|
|
12492
12673
|
} catch {
|
|
12493
12674
|
throw new Error("7z is not installed. Install p7zip-full to extract archives.");
|
|
12494
12675
|
}
|
|
12495
|
-
const tmpDir = fs2.mkdtempSync(
|
|
12676
|
+
const tmpDir = fs2.mkdtempSync(path3.join(os2.tmpdir(), "arbi-archive-"));
|
|
12496
12677
|
let uploadDir;
|
|
12497
12678
|
let namedDir;
|
|
12498
12679
|
try {
|
|
12499
|
-
execSync(`7z x -y -o"${tmpDir}" "${
|
|
12680
|
+
execSync(`7z x -y -o"${tmpDir}" "${path3.resolve(archivePath)}"`, { stdio: "ignore" });
|
|
12500
12681
|
const topLevel = fs2.readdirSync(tmpDir);
|
|
12501
|
-
if (topLevel.length === 1 && fs2.statSync(
|
|
12502
|
-
uploadDir =
|
|
12682
|
+
if (topLevel.length === 1 && fs2.statSync(path3.join(tmpDir, topLevel[0])).isDirectory()) {
|
|
12683
|
+
uploadDir = path3.join(tmpDir, topLevel[0]);
|
|
12503
12684
|
} else {
|
|
12504
|
-
const baseName =
|
|
12505
|
-
namedDir =
|
|
12685
|
+
const baseName = path3.basename(archivePath).replace(/\.(7z|rar|zip)$/i, "");
|
|
12686
|
+
namedDir = path3.join(path3.dirname(tmpDir), baseName);
|
|
12506
12687
|
fs2.renameSync(tmpDir, namedDir);
|
|
12507
12688
|
uploadDir = namedDir;
|
|
12508
12689
|
}
|
|
@@ -12517,20 +12698,20 @@ async function uploadLocalArchiveDirect(arbi, workspaceKey, archivePath, options
|
|
|
12517
12698
|
}
|
|
12518
12699
|
}
|
|
12519
12700
|
async function uploadDirectory(auth, dirPath, options) {
|
|
12520
|
-
const resolvedDir =
|
|
12521
|
-
const dirName =
|
|
12701
|
+
const resolvedDir = path3.resolve(dirPath);
|
|
12702
|
+
const dirName = path3.basename(resolvedDir);
|
|
12522
12703
|
const entries = collectFiles(resolvedDir);
|
|
12523
12704
|
if (entries.length === 0) {
|
|
12524
12705
|
return { doc_ext_ids: [], skipped: [], folders: /* @__PURE__ */ new Map() };
|
|
12525
12706
|
}
|
|
12526
12707
|
const groups = /* @__PURE__ */ new Map();
|
|
12527
12708
|
for (const entry of entries) {
|
|
12528
|
-
const relDir =
|
|
12709
|
+
const relDir = path3.dirname(entry.relativePath);
|
|
12529
12710
|
const folder = relDir === "." ? dirName : `${dirName}/${relDir}`;
|
|
12530
12711
|
if (!groups.has(folder)) groups.set(folder, []);
|
|
12531
12712
|
groups.get(folder).push({
|
|
12532
12713
|
absolutePath: entry.absolutePath,
|
|
12533
|
-
name:
|
|
12714
|
+
name: path3.basename(entry.relativePath),
|
|
12534
12715
|
size: entry.size
|
|
12535
12716
|
});
|
|
12536
12717
|
}
|
|
@@ -12612,11 +12793,11 @@ async function uploadZip(auth, zipPath, options) {
|
|
|
12612
12793
|
const JSZip = (await import('jszip')).default;
|
|
12613
12794
|
const zipBuffer = fs2.readFileSync(zipPath);
|
|
12614
12795
|
const zip = await JSZip.loadAsync(zipBuffer);
|
|
12615
|
-
const zipBaseName =
|
|
12796
|
+
const zipBaseName = path3.basename(zipPath).replace(/\.zip$/i, "");
|
|
12616
12797
|
const entries = [];
|
|
12617
12798
|
zip.forEach((relativePath, zipEntry) => {
|
|
12618
12799
|
if (zipEntry.dir) return;
|
|
12619
|
-
const ext =
|
|
12800
|
+
const ext = path3.extname(relativePath).toLowerCase();
|
|
12620
12801
|
if (SUPPORTED_EXTENSIONS.has(ext)) {
|
|
12621
12802
|
entries.push({ zipEntryPath: relativePath, zipEntry });
|
|
12622
12803
|
}
|
|
@@ -12629,8 +12810,8 @@ async function uploadZip(auth, zipPath, options) {
|
|
|
12629
12810
|
const groups = /* @__PURE__ */ new Map();
|
|
12630
12811
|
for (const entry of entries) {
|
|
12631
12812
|
const data = await entry.zipEntry.async("uint8array");
|
|
12632
|
-
const fileName =
|
|
12633
|
-
const relDir =
|
|
12813
|
+
const fileName = path3.basename(entry.zipEntryPath);
|
|
12814
|
+
const relDir = path3.dirname(entry.zipEntryPath);
|
|
12634
12815
|
let folder;
|
|
12635
12816
|
if (hasSingleRoot) {
|
|
12636
12817
|
folder = relDir === "." ? zipBaseName : relDir;
|
|
@@ -12698,9 +12879,9 @@ async function uploadZip(auth, zipPath, options) {
|
|
|
12698
12879
|
return { doc_ext_ids: allDocIds, skipped: allSkipped, folders };
|
|
12699
12880
|
}
|
|
12700
12881
|
function commonParentDir(absolutePaths) {
|
|
12701
|
-
if (absolutePaths.length === 0) return
|
|
12702
|
-
if (absolutePaths.length === 1) return
|
|
12703
|
-
const split = absolutePaths.map((p2) =>
|
|
12882
|
+
if (absolutePaths.length === 0) return path3.sep;
|
|
12883
|
+
if (absolutePaths.length === 1) return path3.dirname(absolutePaths[0]);
|
|
12884
|
+
const split = absolutePaths.map((p2) => path3.dirname(p2).split(path3.sep));
|
|
12704
12885
|
const minLen = Math.min(...split.map((s2) => s2.length));
|
|
12705
12886
|
const common = [];
|
|
12706
12887
|
for (let i2 = 0; i2 < minLen; i2++) {
|
|
@@ -12708,21 +12889,21 @@ function commonParentDir(absolutePaths) {
|
|
|
12708
12889
|
if (split.every((s2) => s2[i2] === seg)) common.push(seg);
|
|
12709
12890
|
else break;
|
|
12710
12891
|
}
|
|
12711
|
-
const joined = common.join(
|
|
12712
|
-
return joined ||
|
|
12892
|
+
const joined = common.join(path3.sep);
|
|
12893
|
+
return joined || path3.sep;
|
|
12713
12894
|
}
|
|
12714
12895
|
function deriveFolder(absolutePath, rootDir, rootBasename) {
|
|
12715
|
-
const parent =
|
|
12716
|
-
const rel =
|
|
12896
|
+
const parent = path3.dirname(absolutePath);
|
|
12897
|
+
const rel = path3.relative(rootDir, parent);
|
|
12717
12898
|
let folderPath;
|
|
12718
12899
|
if (rel === "" || rel === ".") {
|
|
12719
12900
|
folderPath = rootBasename;
|
|
12720
12901
|
} else if (rel.startsWith("..")) {
|
|
12721
|
-
folderPath =
|
|
12902
|
+
folderPath = path3.basename(parent) || rootBasename;
|
|
12722
12903
|
} else {
|
|
12723
|
-
folderPath =
|
|
12904
|
+
folderPath = path3.join(rootBasename, rel);
|
|
12724
12905
|
}
|
|
12725
|
-
return sanitizeFolderPath(folderPath.split(
|
|
12906
|
+
return sanitizeFolderPath(folderPath.split(path3.sep).join("/"));
|
|
12726
12907
|
}
|
|
12727
12908
|
function classifySkipReason(reason) {
|
|
12728
12909
|
const lower = reason.toLowerCase();
|
|
@@ -12763,9 +12944,9 @@ async function uploadManifest(auth, paths, options) {
|
|
|
12763
12944
|
if (options?.failFast && o2.status === "error") abortedByFailFast = true;
|
|
12764
12945
|
};
|
|
12765
12946
|
const prepared = [];
|
|
12766
|
-
const absoluteInputs = paths.map((p2) =>
|
|
12767
|
-
const rootDir = options?.rootDir ?
|
|
12768
|
-
const rootBasename =
|
|
12947
|
+
const absoluteInputs = paths.map((p2) => path3.resolve(p2));
|
|
12948
|
+
const rootDir = options?.rootDir ? path3.resolve(options.rootDir) : commonParentDir(absoluteInputs);
|
|
12949
|
+
const rootBasename = path3.basename(rootDir) || "root";
|
|
12769
12950
|
for (let i2 = 0; i2 < paths.length; i2++) {
|
|
12770
12951
|
if (options?.signal?.aborted || abortedByFailFast) {
|
|
12771
12952
|
await emit({
|
|
@@ -12803,7 +12984,7 @@ async function uploadManifest(auth, paths, options) {
|
|
|
12803
12984
|
});
|
|
12804
12985
|
continue;
|
|
12805
12986
|
}
|
|
12806
|
-
const ext =
|
|
12987
|
+
const ext = path3.extname(abs).toLowerCase();
|
|
12807
12988
|
if (!SUPPORTED_EXTENSIONS.has(ext)) {
|
|
12808
12989
|
await emit({
|
|
12809
12990
|
path: inputPath,
|
|
@@ -12830,7 +13011,7 @@ async function uploadManifest(auth, paths, options) {
|
|
|
12830
13011
|
prepared.push({
|
|
12831
13012
|
inputPath,
|
|
12832
13013
|
absolutePath: abs,
|
|
12833
|
-
basename:
|
|
13014
|
+
basename: path3.basename(abs),
|
|
12834
13015
|
folder: deriveFolder(abs, rootDir, rootBasename),
|
|
12835
13016
|
size: stat.size
|
|
12836
13017
|
});
|
|
@@ -12984,7 +13165,7 @@ async function uploadManifest(auth, paths, options) {
|
|
|
12984
13165
|
}
|
|
12985
13166
|
function walkSupportedFiles(dirPath) {
|
|
12986
13167
|
const out = [];
|
|
12987
|
-
const resolved =
|
|
13168
|
+
const resolved = path3.resolve(dirPath);
|
|
12988
13169
|
const stack = [resolved];
|
|
12989
13170
|
while (stack.length > 0) {
|
|
12990
13171
|
const current = stack.pop();
|
|
@@ -12995,11 +13176,11 @@ function walkSupportedFiles(dirPath) {
|
|
|
12995
13176
|
continue;
|
|
12996
13177
|
}
|
|
12997
13178
|
for (const entry of entries) {
|
|
12998
|
-
const full =
|
|
13179
|
+
const full = path3.join(current, entry.name);
|
|
12999
13180
|
if (entry.isDirectory()) {
|
|
13000
13181
|
stack.push(full);
|
|
13001
13182
|
} else if (entry.isFile()) {
|
|
13002
|
-
const ext =
|
|
13183
|
+
const ext = path3.extname(entry.name).toLowerCase();
|
|
13003
13184
|
if (SUPPORTED_EXTENSIONS.has(ext)) out.push(full);
|
|
13004
13185
|
}
|
|
13005
13186
|
}
|
|
@@ -13012,16 +13193,16 @@ async function uploadArchive(auth, archivePath, options) {
|
|
|
13012
13193
|
} catch {
|
|
13013
13194
|
throw new Error("7z is not installed. Install p7zip-full to extract archives.");
|
|
13014
13195
|
}
|
|
13015
|
-
const tmpDir = fs2.mkdtempSync(
|
|
13196
|
+
const tmpDir = fs2.mkdtempSync(path3.join(os2.tmpdir(), "arbi-archive-"));
|
|
13016
13197
|
try {
|
|
13017
|
-
execSync(`7z x -y -o"${tmpDir}" "${
|
|
13198
|
+
execSync(`7z x -y -o"${tmpDir}" "${path3.resolve(archivePath)}"`, { stdio: "ignore" });
|
|
13018
13199
|
const topLevel = fs2.readdirSync(tmpDir);
|
|
13019
13200
|
let uploadDir;
|
|
13020
|
-
if (topLevel.length === 1 && fs2.statSync(
|
|
13021
|
-
uploadDir =
|
|
13201
|
+
if (topLevel.length === 1 && fs2.statSync(path3.join(tmpDir, topLevel[0])).isDirectory()) {
|
|
13202
|
+
uploadDir = path3.join(tmpDir, topLevel[0]);
|
|
13022
13203
|
} else {
|
|
13023
|
-
const baseName =
|
|
13024
|
-
const namedDir =
|
|
13204
|
+
const baseName = path3.basename(archivePath).replace(/\.(7z|rar|zip)$/i, "");
|
|
13205
|
+
const namedDir = path3.join(path3.dirname(tmpDir), baseName);
|
|
13025
13206
|
fs2.renameSync(tmpDir, namedDir);
|
|
13026
13207
|
uploadDir = namedDir;
|
|
13027
13208
|
}
|
|
@@ -13037,8 +13218,8 @@ __export(mail_node_exports, {
|
|
|
13037
13218
|
attachmentFromFile: () => attachmentFromFile
|
|
13038
13219
|
});
|
|
13039
13220
|
function attachmentFromFile(filePath) {
|
|
13040
|
-
const resolved =
|
|
13041
|
-
const name =
|
|
13221
|
+
const resolved = path3.resolve(filePath);
|
|
13222
|
+
const name = path3.basename(resolved);
|
|
13042
13223
|
return attachmentFromBytes(
|
|
13043
13224
|
name,
|
|
13044
13225
|
mimeFromName(name) || "application/octet-stream",
|
|
@@ -14034,6 +14215,6 @@ function getRunToAttach(localGeneration, messages) {
|
|
|
14034
14215
|
return getAttachableRunId(messages);
|
|
14035
14216
|
}
|
|
14036
14217
|
|
|
14037
|
-
export { ACCOUNT_VENDOR, Arbi, ArbiApiError, ArbiError, ArbiSessionExpiredError, ArbiWorkspaceChangedError, ArbiWorkspaceSupersededError, CallApiError, ClaudeOrchestrator, DEFAULT_AI_USD_PER_GBP, DOC_TERMINAL_STATUSES, DRIVE_SYNC_VENDORS, DuplicateContactError, ENTITY_KINDS, FLAT_TAG_KINDS, FileConfigStore, GOOGLE_VENDORS, IMANAGE_VENDORS, MAILBOX_SYNC_VENDORS, MAX_RETRIEVE_DOC_IDS, MICROSOFT_VENDORS, OpenClawOrchestrator, PRESENCE_KINDS, PROMPT_CONTEXT_CHARS, PlanStepsError, PublicBookingError, SHAREPOINT_VENDORS, STEP_FIELD_OPTION_TONES, STOP_ID_WAIT_MS, STOP_REPEAT_WINDOW_MS, TAG_KINDS, TAG_NESTING_MAX_DEPTH, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, agents_exports as agents, appendTranscriptionHints, assistant_exports as assistant, authenticatedFetch, bookPublicSlot, buildCitationChunkData, buildDocNameMap, buildDocumentTools, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, buildTurnRequest, calendar_exports as calendar, calls_exports as calls, canTagHaveParent, cancelPublicBooking, chats_exports as chats, computeRunStats, connectErrorMessage, connectWebSocket, connectWithReconnect, connectors_exports as connectors,
|
|
14218
|
+
export { ACCOUNT_VENDOR, Arbi, ArbiApiError, ArbiError, ArbiSessionExpiredError, ArbiWorkspaceChangedError, ArbiWorkspaceSupersededError, CallApiError, ClaudeOrchestrator, DEFAULT_AI_USD_PER_GBP, DOC_TERMINAL_STATUSES, DRIVE_SYNC_VENDORS, DuplicateContactError, ENTITY_KINDS, FLAT_TAG_KINDS, FileConfigStore, GOOGLE_VENDORS, IMANAGE_VENDORS, MAILBOX_SYNC_VENDORS, MAX_RETRIEVE_DOC_IDS, MICROSOFT_VENDORS, OpenClawOrchestrator, PRESENCE_KINDS, PROMPT_CONTEXT_CHARS, PlanStepsError, PublicBookingError, SHAREPOINT_VENDORS, STEP_FIELD_OPTION_TONES, STOP_ID_WAIT_MS, STOP_REPEAT_WINDOW_MS, TAG_KINDS, TAG_NESTING_MAX_DEPTH, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, agents_exports as agents, appendTranscriptionHints, assistant_exports as assistant, authenticatedFetch, bookPublicSlot, buildCitationChunkData, buildDocNameMap, buildDocumentTools, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, buildTurnRequest, calendar_exports as calendar, calls_exports as calls, canTagHaveParent, cancelPublicBooking, chats_exports as chats, computeRunStats, connectErrorMessage, connectWebSocket, connectWithReconnect, connectors_exports as connectors, contacts_exports as contacts, continuityPrompt, conversations_exports as conversations, countCitations, createAuthenticatedClient, createDocumentWaiter, createIndexAssigner, databases_exports as databases, defaultKindForFormat, device_flow_exports as deviceFlow, doctags_exports as doctags, documents_exports as documents, documents_node_exports as documentsNode, estimateDraftTokens, extractDocumentIdsFromMessages, extractFactIdsFromMessages, extractSubagentLanes, facts_exports as facts, files_exports as files, filterDocumentTags, filterSkills, findLeafForTaskMessage, findMainSiblingLeaf, findReplyTarget, findSubagentRunId, firm_exports as firm, flattenTagTree, formatAgentStepLabel, formatFileSize, formatGbp, formatGbpPerMillionTokens, formatItemLabel, formatStreamSummary, formatTokens, formatUserName, formatWorkspaceChoices, formatWsMessage, generateEncryptedWorkspaceKey, generateNewWorkspaceKey, getAgentStepLabel, getAttachableRunId, getChildTags, getContextRemainingPercent, getContextUsedPercent, getContextUsedTokens, getCurrentStep, getEligibleParentTags, getErrorCode, getErrorMessage, getPublicBookingPage, getRawWorkspaceKey, getRunToAttach, getRunToCancel, getStepDisplay, getStepTool, getSubagentBranchRecord, getTagDescendantIds, health_exports as health, house_template_exports as houseTemplates, hydrateAgentSteps, identityErrorCode, identity_exports as identityVerification, isAnnotationTag, isConnectorVendorVisible, isDriveSyncVendor, isEntityTag, isFlatKind, isLabelTag, isMailboxSyncVendor, isNearAiUsageBudget, isPresenceTag, isSharePointVendor, isSharedSkill, isTraceItem, listen_exports as listen, mail_exports as mail, mail_node_exports as mailNode, mergeAgentSteps, notifications_exports as notifications, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, performPasswordLogin, performSigningKeyLogin, performSsoDeviceFlowLogin, pickMainThread, profile_exports as profile, progressFetch, projects_exports as projects, quotaExceededFrom, quotaFromStreamError, reduceOutputItem, refusalReason, requireData, requireOk, resolveAuth, resolveCitations, resolveSummary, resolveWorkspace, responses_exports as responses, searchChunks, selectFullContextDocument, selectWorkspace, selectWorkspaceById, sessions_exports as sessions, settings_exports as settings, signature_requests_exports as signatureRequests, sliceToSubagentThread, startDmListener, streamSSE, stripCitationMarkdown, subagentJobLabel, summarizeCitations, tagUseCount, tags_exports as tags, tagsForScope, tagsOfGroup, topLevelAgentSteps, uploadSkill, usdToGbp, work_exports as work, workflow_steps_exports as workflowSteps, workflows_exports as workflows, workspaces_exports as workspaces, wouldCreateTagCycle };
|
|
14038
14219
|
//# sourceMappingURL=index.js.map
|
|
14039
14220
|
//# sourceMappingURL=index.js.map
|