@arbidocs/sdk 0.5.56 → 0.5.58
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/README.md +41 -0
- package/dist/{browser-DEZ7kJKE.d.ts → browser-BX1E63gK.d.ts} +31 -5
- package/dist/{browser-DvpIH-Qk.d.cts → browser-ENBx11nT.d.cts} +31 -5
- package/dist/browser.cjs +78 -25
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +2 -2
- package/dist/browser.d.ts +2 -2
- package/dist/browser.js +78 -25
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +78 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +78 -25
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -212,3 +212,44 @@ This is not retrospective replay or a durable resume cursor. Keep existing callb
|
|
|
212
212
|
startup frame is needed. The iterator buffers at most 256 frames, covering existing tool and
|
|
213
213
|
control fixtures; overflow rejects its reads with code `RESPONSE_EVENT_OVERFLOW`, while snapshot
|
|
214
214
|
reduction continues. Return/break the iterator to release its buffer; a second iterator is rejected.
|
|
215
|
+
|
|
216
|
+
### Configuring HTTP transport
|
|
217
|
+
|
|
218
|
+
React Query still manages React caches, mutations and refetching. The SDK transport underneath
|
|
219
|
+
it can be configured once for typed requests, Responses streams and multipart API uploads:
|
|
220
|
+
|
|
221
|
+
```ts
|
|
222
|
+
const arbi = new Arbi({
|
|
223
|
+
url: 'https://arbi.example.com',
|
|
224
|
+
transport: {
|
|
225
|
+
fetch: customFetch, // optional fetch-compatible adapter
|
|
226
|
+
timeoutMs: 30_000, // optional; no deadline by default
|
|
227
|
+
onResponse: ({ method, url, status, durationMs }) => {
|
|
228
|
+
recordRequest({ method, url, status, durationMs })
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
})
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
For a host-owned session, configure `transport` on `createArbiClient` and pass that client to
|
|
235
|
+
`Arbi`; its wrapper inherits the host transport and session gate. Configure it on the host,
|
|
236
|
+
rather than supplying a different transport to the wrapper. Existing host client adapters
|
|
237
|
+
without `http` retain the previous global-fetch fallback for raw SDK operations.
|
|
238
|
+
|
|
239
|
+
The timeout lasts until the adapter returns a `Response`: response headers for native fetch,
|
|
240
|
+
or the buffered reply for the XMLHttpRequest upload-progress adapter. It does not cap a live
|
|
241
|
+
stream's body. AbortSignal cancellation and sign-out still stop the body after headers.
|
|
242
|
+
Metadata hooks receive method, sanitized URL (no query, fragment or credentials), status and
|
|
243
|
+
elapsed time; no headers or bodies are passed. `onError` receives the original fetch failure.
|
|
244
|
+
Hooks are opt-in and synchronous; a thrown hook exception rejects the request. No telemetry
|
|
245
|
+
or logging is enabled by default.
|
|
246
|
+
|
|
247
|
+
Default browser uploads retain XMLHttpRequest byte progress. An injected fetch takes precedence
|
|
248
|
+
over XHR and reports upload completion once rather than promising byte progress. The existing
|
|
249
|
+
presigned storage PUT adapter, public booking helpers, media downloads and WebSockets are separate
|
|
250
|
+
transports and are not changed by this API-transport option.
|
|
251
|
+
|
|
252
|
+
Connection failures are retried only for generated GET/HEAD requests, with the existing bounded
|
|
253
|
+
backoff. Mutations and response creation are never retried after an ambiguous connection failure.
|
|
254
|
+
Existing explicit authentication/workspace-state refusal recovery remains, through the same
|
|
255
|
+
configured transport. This option adds no workspace selector, header, permission or switching.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _arbidocs_client from '@arbidocs/client';
|
|
2
|
-
import { SessionPersistence, ArbiClient, LoginResult, WebSocketServerMessage, WsAuthResultMessage, WsTaskUpdateMessage, components, KeyPair, CallPeer, SessionStateStorage, RegisterParams, RegisterResult, LoginParams, SessionManager, LoginProfile } from '@arbidocs/client';
|
|
2
|
+
import { HttpTransport, SessionPersistence, ArbiClient, LoginResult, WebSocketServerMessage, WsAuthResultMessage, WsTaskUpdateMessage, components, KeyPair, CallPeer, HttpTransportOptions, SessionStateStorage, RegisterParams, RegisterResult, LoginParams, SessionManager, LoginProfile } from '@arbidocs/client';
|
|
3
3
|
import { S as SSEStreamStartData, j as ResponseOutputItemAddedEvent, k as ResponseOutputItemDoneEvent, g as ResponseContentPartAddedEvent, c as ArbiErrorEvent, f as MessageQueuedEvent, o as UserMessageEvent, e as MessageMetadataPayload$1, U as UserInputRequestEvent, P as ProbeAnswerEvent, D as DeferredInterjectionEvent, A as AgentControlStateEvent, d as ArtifactEvent, M as MailDraftSSEEvent, n as ResponseUsage, T as TokenBudgetContext, b as AgentStepEvent } from './sse-types-BbR7JG5o.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -112,6 +112,8 @@ declare function getErrorCode(err: unknown): string | undefined;
|
|
|
112
112
|
interface AuthHeaders {
|
|
113
113
|
baseUrl: string;
|
|
114
114
|
accessToken: string;
|
|
115
|
+
/** Instance transport; omitted by existing standalone callers. */
|
|
116
|
+
fetch?: typeof globalThis.fetch;
|
|
115
117
|
}
|
|
116
118
|
interface AuthFetchOptions extends AuthHeaders {
|
|
117
119
|
/** URL path relative to baseUrl (e.g. '/v1/document/upload'). */
|
|
@@ -138,7 +140,7 @@ declare function authenticatedFetch(options: AuthFetchOptions): Promise<Response
|
|
|
138
140
|
* and reports once, when the body is sent.
|
|
139
141
|
*/
|
|
140
142
|
type UploadProgressListener = (loaded: number, total: number) => void;
|
|
141
|
-
declare function progressFetch(onProgress: UploadProgressListener): (request: Request) => Promise<Response>;
|
|
143
|
+
declare function progressFetch(onProgress: UploadProgressListener, transport?: HttpTransport): (request: Request) => Promise<Response>;
|
|
142
144
|
|
|
143
145
|
/**
|
|
144
146
|
* Configuration types — shared between browser and Node.js environments.
|
|
@@ -7192,6 +7194,8 @@ type DatabaseRow = components['schemas']['DatabaseRowRead'];
|
|
|
7192
7194
|
type DatabaseRowWrite = components['schemas']['DatabaseRowWrite'];
|
|
7193
7195
|
type DatabaseRowPage = components['schemas']['DatabaseRowPage'];
|
|
7194
7196
|
type DatabaseImportResult = components['schemas']['DatabaseImportResult'];
|
|
7197
|
+
type DatabaseAggregateRequest = components['schemas']['DatabaseAggregateRequest'];
|
|
7198
|
+
type DatabaseAggregateResult = components['schemas']['DatabaseAggregateResult'];
|
|
7195
7199
|
/** A search of a database's rows: text in any cell, sorting and paging (all on the server). */
|
|
7196
7200
|
interface DatabaseRowsQuery {
|
|
7197
7201
|
q?: string;
|
|
@@ -7203,6 +7207,11 @@ interface DatabaseRowsQuery {
|
|
|
7203
7207
|
declare function listDatabases(arbi: ArbiClient): Promise<Database[]>;
|
|
7204
7208
|
declare function getDatabase(arbi: ArbiClient, databaseId: string): Promise<Database>;
|
|
7205
7209
|
declare function listDatabaseRows(arbi: ArbiClient, databaseId: string, query?: DatabaseRowsQuery): Promise<DatabaseRowPage>;
|
|
7210
|
+
/**
|
|
7211
|
+
* Group the rows and measure each group on the server (over every row, so totals are exact
|
|
7212
|
+
* however large the database is): the labels and series a chart or a metric tile draws.
|
|
7213
|
+
*/
|
|
7214
|
+
declare function aggregateDatabase(arbi: ArbiClient, databaseId: string, body: Partial<DatabaseAggregateRequest>): Promise<DatabaseAggregateResult>;
|
|
7206
7215
|
declare function createDatabase(arbi: ArbiClient, body: DatabaseCreate): Promise<Database>;
|
|
7207
7216
|
/** Rename, describe, or change the columns (`columns` is the full new list). */
|
|
7208
7217
|
declare function updateDatabase(arbi: ArbiClient, databaseId: string, body: DatabaseUpdate): Promise<Database>;
|
|
@@ -7219,6 +7228,8 @@ declare function importDatabaseRows(arbi: ArbiClient, databaseId: string, file:
|
|
|
7219
7228
|
declare function exportDatabase(arbi: ArbiClient, databaseId: string, format: 'csv' | 'xlsx'): Promise<Blob>;
|
|
7220
7229
|
|
|
7221
7230
|
type databases_Database = Database;
|
|
7231
|
+
type databases_DatabaseAggregateRequest = DatabaseAggregateRequest;
|
|
7232
|
+
type databases_DatabaseAggregateResult = DatabaseAggregateResult;
|
|
7222
7233
|
type databases_DatabaseColumn = DatabaseColumn;
|
|
7223
7234
|
type databases_DatabaseColumnWrite = DatabaseColumnWrite;
|
|
7224
7235
|
type databases_DatabaseCreate = DatabaseCreate;
|
|
@@ -7229,6 +7240,7 @@ type databases_DatabaseRowWrite = DatabaseRowWrite;
|
|
|
7229
7240
|
type databases_DatabaseRowsQuery = DatabaseRowsQuery;
|
|
7230
7241
|
type databases_DatabaseUpdate = DatabaseUpdate;
|
|
7231
7242
|
declare const databases_addDatabaseRows: typeof addDatabaseRows;
|
|
7243
|
+
declare const databases_aggregateDatabase: typeof aggregateDatabase;
|
|
7232
7244
|
declare const databases_createDatabase: typeof createDatabase;
|
|
7233
7245
|
declare const databases_deleteDatabase: typeof deleteDatabase;
|
|
7234
7246
|
declare const databases_deleteDatabaseRows: typeof deleteDatabaseRows;
|
|
@@ -7241,7 +7253,7 @@ declare const databases_listDatabases: typeof listDatabases;
|
|
|
7241
7253
|
declare const databases_updateDatabase: typeof updateDatabase;
|
|
7242
7254
|
declare const databases_updateDatabaseRow: typeof updateDatabaseRow;
|
|
7243
7255
|
declare namespace databases {
|
|
7244
|
-
export { type databases_Database as Database, type databases_DatabaseColumn as DatabaseColumn, type databases_DatabaseColumnWrite as DatabaseColumnWrite, type databases_DatabaseCreate as DatabaseCreate, type databases_DatabaseImportResult as DatabaseImportResult, type databases_DatabaseRow as DatabaseRow, type databases_DatabaseRowPage as DatabaseRowPage, type databases_DatabaseRowWrite as DatabaseRowWrite, type databases_DatabaseRowsQuery as DatabaseRowsQuery, type databases_DatabaseUpdate as DatabaseUpdate, databases_addDatabaseRows as addDatabaseRows, databases_createDatabase as createDatabase, databases_deleteDatabase as deleteDatabase, databases_deleteDatabaseRows as deleteDatabaseRows, databases_exportDatabase as exportDatabase, databases_getDatabase as getDatabase, databases_importDatabase as importDatabase, databases_importDatabaseRows as importDatabaseRows, databases_listDatabaseRows as listDatabaseRows, databases_listDatabases as listDatabases, databases_updateDatabase as updateDatabase, databases_updateDatabaseRow as updateDatabaseRow };
|
|
7256
|
+
export { type databases_Database as Database, type databases_DatabaseAggregateRequest as DatabaseAggregateRequest, type databases_DatabaseAggregateResult as DatabaseAggregateResult, type databases_DatabaseColumn as DatabaseColumn, type databases_DatabaseColumnWrite as DatabaseColumnWrite, type databases_DatabaseCreate as DatabaseCreate, type databases_DatabaseImportResult as DatabaseImportResult, type databases_DatabaseRow as DatabaseRow, type databases_DatabaseRowPage as DatabaseRowPage, type databases_DatabaseRowWrite as DatabaseRowWrite, type databases_DatabaseRowsQuery as DatabaseRowsQuery, type databases_DatabaseUpdate as DatabaseUpdate, databases_addDatabaseRows as addDatabaseRows, databases_aggregateDatabase as aggregateDatabase, databases_createDatabase as createDatabase, databases_deleteDatabase as deleteDatabase, databases_deleteDatabaseRows as deleteDatabaseRows, databases_exportDatabase as exportDatabase, databases_getDatabase as getDatabase, databases_importDatabase as importDatabase, databases_importDatabaseRows as importDatabaseRows, databases_listDatabaseRows as listDatabaseRows, databases_listDatabases as listDatabases, databases_updateDatabase as updateDatabase, databases_updateDatabaseRow as updateDatabaseRow };
|
|
7245
7257
|
}
|
|
7246
7258
|
|
|
7247
7259
|
/**
|
|
@@ -7946,6 +7958,8 @@ type ConfigUpdateData$1 = components['schemas']['ConfigUpdateData'];
|
|
|
7946
7958
|
type WorkspaceOpenResponse = components['schemas']['WorkspaceOpenResponse'];
|
|
7947
7959
|
|
|
7948
7960
|
interface ArbiOptions {
|
|
7961
|
+
/** Shared HTTP configuration. With a host session, configure its client instead. */
|
|
7962
|
+
transport?: HttpTransportOptions;
|
|
7949
7963
|
/** Backend API URL (e.g. 'https://arbi.mycompany.com') */
|
|
7950
7964
|
url: string;
|
|
7951
7965
|
/** Deployment domain for key derivation. Defaults to hostname of url. */
|
|
@@ -8115,7 +8129,11 @@ declare class Arbi {
|
|
|
8115
8129
|
* opened next, and a workspace other than the current one is opened for this session first.
|
|
8116
8130
|
*/
|
|
8117
8131
|
private createTagIn;
|
|
8118
|
-
/**
|
|
8132
|
+
/**
|
|
8133
|
+
* The workspace a call acts on, captured when it is called: the one it names (opened for this session, not
|
|
8134
|
+
* switched to), else the current one. The request names it, so a switch while it is in flight cannot move it.
|
|
8135
|
+
* `undefined` only when no workspace is known here (the server's open one then applies, as before).
|
|
8136
|
+
*/
|
|
8119
8137
|
private targetWorkspace;
|
|
8120
8138
|
/**
|
|
8121
8139
|
* Make a workspace the CURRENT one: decrypt its key, open it on the server (which makes it the
|
|
@@ -15493,6 +15511,14 @@ declare class Arbi {
|
|
|
15493
15511
|
rows: components["schemas"]["DatabaseRowRead"][];
|
|
15494
15512
|
total: number;
|
|
15495
15513
|
}>;
|
|
15514
|
+
/** Group and measure the rows on the server (a chart's labels and series). */
|
|
15515
|
+
aggregate: (databaseId: string, body: Partial<DatabaseAggregateRequest>) => Promise<{
|
|
15516
|
+
keys: string[];
|
|
15517
|
+
labels: string[];
|
|
15518
|
+
series: components["schemas"]["DatabaseSeries"][];
|
|
15519
|
+
total_rows: number;
|
|
15520
|
+
truncated: boolean;
|
|
15521
|
+
}>;
|
|
15496
15522
|
create: (body: DatabaseCreate) => Promise<{
|
|
15497
15523
|
id: string;
|
|
15498
15524
|
name: string;
|
|
@@ -17191,4 +17217,4 @@ declare function getAttachableRunId(messages: readonly RunMessage[]): string | n
|
|
|
17191
17217
|
*/
|
|
17192
17218
|
declare function getRunToAttach(localGeneration: LocalGeneration | undefined, messages: readonly RunMessage[]): string | null;
|
|
17193
17219
|
|
|
17194
|
-
export { type CliCredentials as $, ACCOUNT_VENDOR as A, type BookingConfirmation as B, type CalDavConnectBody as C, type CalendarAccountKind as D, type CalendarCreateBody as E, type CalendarEvent as F, type CalendarKeys as G, type CalendarRead as H, type CalendarSettings as I, type CalendarSettingsBody as J, type CalendarUpdate as K, type CalendarWindow as L, CallApiError as M, type ChatAttachmentFile as N, type ChatAttachmentInput as O, type ChatCryptoContext as P, type ChatKeyRing as Q, type ChatKind as R, type ChatMemberKey as S, type ChatMemberResponse as T, type ChatMessage as U, type ChatMessageResponse as V, type ChatResponse as W, type ChatSession as X, type CitationSummary as Y, type CitationToolSources as Z, type CliConfig as _, type AccountSyncResult as a, type ImportResult as a$, type CommandDescriptor as a0, type ConfigStore as a1, type ConnectOptions as a2, type ConnectorCatalogEntry as a3, type ConnectorFolder as a4, type ConnectorSyncProgress as a5, type ConnectorSyncStatus as a6, type ConnectorVendorKey as a7, type ConnectorVisibilitySettings as a8, type ContextUsage as a9, type DocumentSelector as aA, type DocumentWaiter as aB, type DocumentWaiterOptions as aC, type DriveSyncProgress as aD, type DriveSyncSummary as aE, DuplicateContactError as aF, ENTITY_KINDS as aG, type EditScope as aH, type EntityKind as aI, type EventCreateBody as aJ, type EventPatchBody as aK, FLAT_TAG_KINDS as aL, type FactResponse as aM, type FactSearchRequest as aN, type FactSearchResponse as aO, type FindTimeParams as aP, type FormattedWsMessage as aQ, type FreeBusyEntry as aR, type FullContextSelection as aS, GOOGLE_VENDORS as aT, type HolidayCountry as aU, type HouseTemplateCandidate as aV, IMANAGE_VENDORS as aW, type IdentityErrorCode as aX, type IdentityPurchase as aY, type IdentityState as aZ, type IdentityStatus as a_, type ConversationResponse as aa, type ConversationUsageResponse as ab, type CreateFactRequest as ac, type CreateFactsRequest as ad, type CreateWorkRequest as ae, type CreateWorkflowRequest as af, DEFAULT_AI_USD_PER_GBP as ag, DOC_TERMINAL_STATUSES as ah, DRIVE_SYNC_VENDORS as ai, type Database as aj, type DatabaseColumn as ak, type DatabaseColumnWrite as al, type DatabaseImportResult as am, type DatabaseRow as an, type DatabaseRowPage as ao, type DatabaseRowsQuery as ap, type DateTimeSpec as aq, type DecryptedChat as ar, type DecryptedChatMessage as as, type DeploymentHouseTemplate as at, type DocInfo as au, type DocInfoMap as av, type DocNameMap as aw, type DocumentAutomationAction as ax, type DocumentListFields as ay, type DocumentListOrder as az, type ActivityKind as b, type SSEStreamCallbacks as b$, type InvitationRead as b0, type LinkedRun as b1, type ListAllOptions as b2, type ListEventsParams as b3, type ListFactsOptions as b4, type ListPaginatedOptions as b5, MAILBOX_SYNC_VENDORS as b6, MAX_RETRIEVE_DOC_IDS as b7, MICROSOFT_VENDORS as b8, type MailAttachment as b9, type ProjectResponse as bA, type ProjectUpdateRequest as bB, type ProjectUsageResponse as bC, PublicBookingError as bD, type PublicBookingPage as bE, type QuotaExceeded as bF, type RaisedSignal as bG, type RawResponseEvent as bH, type ReconnectOptions as bI, type ReconnectableWsConnection as bJ, type ResolvedCitation as bK, type ResolvedRecipient as bL, type RespondParams as bM, type RespondPartstat as bN, type ResponseHandle as bO, type ResponseSnapshot as bP, type ResponseStart as bQ, type ResponseStartOptions as bR, type RoomCreateBody as bS, type RoomQuery as bT, type RoomRead as bU, type RunProgress as bV, type RunStats as bW, type RunStep as bX, type RunWaitingOn as bY, SHAREPOINT_VENDORS as bZ, type SSEEvent as b_, type MessageLevel as ba, type OAuthAccountKind as bb, type OutputItemDone as bc, type OverlayItem as bd, type OverlayLayerName as be, PRESENCE_KINDS as bf, PROMPT_CONTEXT_CHARS as bg, type ParsedSlashCommand as bh, type PendingAuthResponse as bi, type PersonKey as bj, PlanStepsError as bk, type PlanWorkRequest as bl, type ProductResponse as bm, type ProjectAddonKind as bn, type ProjectAddonSettingsRequest as bo, type ProjectBudget as bp, type ProjectCheckoutRequest as bq, type ProjectConversationUsageResponse as br, type ProjectCreateOptions as bs, type ProjectDetails as bt, type ProjectEventKind as bu, type ProjectEventResponse as bv, type ProjectInvoicesResponse as bw, type ProjectNextPeriodAddonsRequest as bx, type ProjectPlanChangeRequest as by, type ProjectQuoteRequest as bz, type ActivityResponse as c, type UsageBreakdown as c$, type SSEStreamOutcome as c0, type SSEStreamResult as c1, STEP_FIELD_OPTION_TONES as c2, STOP_ID_WAIT_MS as c3, STOP_REPEAT_WINDOW_MS as c4, SUPPORTED_EXTENSIONS as c5, type ScopedTarget as c6, type SearchChunk as c7, type SendBack as c8, type ShareRead as c9, type TagGroup as cA, type TagKind as cB, type TagKindField as cC, type TagKindSchema as cD, type TagLinks as cE, type TagListQuery as cF, type TagNode as cG, type TagResponse as cH, type TagScope as cI, type TagTreeRow as cJ, type TaskPlan as cK, type TaskPlanStep as cL, type TaxQuoteResponse as cM, type Thread as cN, type ThreadsResponse as cO, type TimeSuggestion as cP, type TurnRequest as cQ, type UpdateConversationRequest as cR, type UpdateFactRequest as cS, type UpdateWorkflowRequest as cT, type UploadBatchResult as cU, type UploadDirectOptions as cV, type UploadDirectResult as cW, type UploadDocumentsOptions as cX, type UploadOptions as cY, type UploadProgressListener as cZ, type UploadResult as c_, type ShareRole as ca, type SkillSummary as cb, type SkippedFile as cc, type SlackConnectionStatus as cd, type StepActionRequest as ce, type StepActivityEvent as cf, type StepAssignee as cg, type StepDisplay as ch, type StepField as ci, type StepFieldOption as cj, type StepFieldOptionTone as ck, type StepKind as cl, type StepPhase as cm, type StepSignal as cn, type StepSignalWhen as co, type StepState as cp, type StepStatus as cq, type SubagentBranchRecord as cr, type SubagentLaneInfo as cs, type SubmitBackgroundQueryOptions as ct, type SubscribeParams as cu, type SyncTriggerResult as cv, TAG_KINDS as cw, TAG_NESTING_MAX_DEPTH as cx, type TagChange as cy, type TagFieldDefinition as cz, Arbi as d, formatAgentStepLabel as d$, type UserConnectorEntry as d0, type UserDailyUsageResponse as d1, type UserInfo as d2, WebSocketAuthError as d3, type WeeklyHoursSpec as d4, type WorkStatus as d5, type WorkflowAuthMode as d6, type WorkflowResponse as d7, type WorkflowRunHistoryResponse as d8, type WorkflowRunResponse as d9, connectWebSocket as dA, connectWithReconnect as dB, connectors as dC, contacts as dD, continuityPrompt as dE, conversations as dF, countCitations as dG, createAuthenticatedClient as dH, createDocumentWaiter as dI, createIndexAssigner as dJ, databases as dK, defaultKindForFormat as dL, doctags as dM, documents as dN, estimateDraftTokens as dO, extractDocumentIdsFromMessages as dP, extractFactIdsFromMessages as dQ, extractSubagentLanes as dR, facts as dS, files as dT, filterDocumentTags as dU, filterSkills as dV, findLeafForTaskMessage as dW, findMainSiblingLeaf as dX, findReplyTarget as dY, findSubagentRunId as dZ, flattenTagTree as d_, type WorkspaceContext as da, type WorkspaceOpenResponse as db, type WsConnection as dc, account as dd, agentconfig as de, agents as df, appendTranscriptionHints as dg, assistant as dh, authenticatedFetch as di, bookPublicSlot as dj, buildCitationChunkData as dk, buildDocNameMap as dl, buildDocumentTools as dm, buildFactsContextTool as dn, buildRetrievalChunkTool as dp, buildRetrievalFullContextTool as dq, buildRetrievalTocTool as dr, buildTurnRequest as ds, calendar as dt, calls as du, canTagHaveParent as dv, cancelPublicBooking as dw, chats as dx, computeRunStats as dy, connectErrorMessage as dz, ArbiApiError as e, requireData as e$, formatFileSize as e0, formatGbp as e1, formatGbpPerMillionTokens as e2, formatItemLabel as e3, formatStreamSummary as e4, formatTokens as e5, formatUserName as e6, formatWorkspaceChoices as e7, formatWsMessage as e8, generateEncryptedWorkspaceKey as e9, isDriveSyncVendor as eA, isEntityTag as eB, isFlatKind as eC, isLabelTag as eD, isMailboxSyncVendor as eE, isNearAiUsageBudget as eF, isPresenceTag as eG, isSharePointVendor as eH, isSharedSkill as eI, isTraceItem as eJ, mail as eK, mergeAgentSteps as eL, notifications as eM, parseSSEEvents as eN, parseSlashCommand as eO, parseSlashTokenInProgress as eP, performPasswordLogin as eQ, performSigningKeyLogin as eR, performSsoDeviceFlowLogin as eS, pickMainThread as eT, profile as eU, progressFetch as eV, projects as eW, quotaExceededFrom as eX, quotaFromStreamError as eY, reduceOutputItem as eZ, refusalReason as e_, generateNewWorkspaceKey as ea, getAgentStepLabel as eb, getAttachableRunId as ec, getChildTags as ed, getContextRemainingPercent as ee, getContextUsedPercent as ef, getContextUsedTokens as eg, getCurrentStep as eh, getEligibleParentTags as ei, getErrorCode as ej, getErrorMessage as ek, getPublicBookingPage as el, getRawWorkspaceKey as em, getRunToAttach as en, getRunToCancel as eo, getStepDisplay as ep, getStepTool as eq, getSubagentBranchRecord as er, getTagDescendantIds as es, health as et, houseTemplate as eu, hydrateAgentSteps as ev, identity as ew, identityErrorCode as ex, isAnnotationTag as ey, isConnectorVendorVisible as ez, ArbiError as f, requireOk as f0, resolveAuth as f1, resolveCitations as f2, resolveSummary as f3, resolveWorkspace as f4, responses as f5, searchChunks as f6, selectFullContextDocument as f7, selectWorkspace as f8, selectWorkspaceById as f9, sessions as fa, settings as fb, signatureRequests as fc, sliceToSubagentThread as fd, streamSSE as fe, stripCitationMarkdown as ff, subagentJobLabel as fg, summarizeCitations as fh, tagUseCount as fi, tags as fj, tagsForScope as fk, tagsOfGroup as fl, topLevelAgentSteps as fm, uploadSkill as fn, usdToGbp as fo, work as fp, workflowSteps as fq, workflows as fr, workspaces as fs, wouldCreateTagCycle as ft, type ArbiErrorOptions as g, type ArbiHostSession as h, type ArbiOptions as i, ArbiSessionExpiredError as j, ArbiTransportError as k, ArbiWorkspaceChangedError as l, ArbiWorkspaceSupersededError as m, type AskHandlers as n, type AskRequest as o, type AttendeeRead as p, type AuthContext as q, type AuthHeaders as r, type AuthMode as s, type AuthenticatedClient as t, type BookingPage as u, type BookingPageWriteBody as v, type BookingRequestBody as w, type BridgeTokensOptions as x, type CalDavProfile as y, type CalendarAccount as z };
|
|
17220
|
+
export { type CliCredentials as $, ACCOUNT_VENDOR as A, type BookingConfirmation as B, type CalDavConnectBody as C, type CalendarAccountKind as D, type CalendarCreateBody as E, type CalendarEvent as F, type CalendarKeys as G, type CalendarRead as H, type CalendarSettings as I, type CalendarSettingsBody as J, type CalendarUpdate as K, type CalendarWindow as L, CallApiError as M, type ChatAttachmentFile as N, type ChatAttachmentInput as O, type ChatCryptoContext as P, type ChatKeyRing as Q, type ChatKind as R, type ChatMemberKey as S, type ChatMemberResponse as T, type ChatMessage as U, type ChatMessageResponse as V, type ChatResponse as W, type ChatSession as X, type CitationSummary as Y, type CitationToolSources as Z, type CliConfig as _, type AccountSyncResult as a, type IdentityState as a$, type CommandDescriptor as a0, type ConfigStore as a1, type ConnectOptions as a2, type ConnectorCatalogEntry as a3, type ConnectorFolder as a4, type ConnectorSyncProgress as a5, type ConnectorSyncStatus as a6, type ConnectorVendorKey as a7, type ConnectorVisibilitySettings as a8, type ContextUsage as a9, type DocumentListFields as aA, type DocumentListOrder as aB, type DocumentSelector as aC, type DocumentWaiter as aD, type DocumentWaiterOptions as aE, type DriveSyncProgress as aF, type DriveSyncSummary as aG, DuplicateContactError as aH, ENTITY_KINDS as aI, type EditScope as aJ, type EntityKind as aK, type EventCreateBody as aL, type EventPatchBody as aM, FLAT_TAG_KINDS as aN, type FactResponse as aO, type FactSearchRequest as aP, type FactSearchResponse as aQ, type FindTimeParams as aR, type FormattedWsMessage as aS, type FreeBusyEntry as aT, type FullContextSelection as aU, GOOGLE_VENDORS as aV, type HolidayCountry as aW, type HouseTemplateCandidate as aX, IMANAGE_VENDORS as aY, type IdentityErrorCode as aZ, type IdentityPurchase as a_, type ConversationResponse as aa, type ConversationUsageResponse as ab, type CreateFactRequest as ac, type CreateFactsRequest as ad, type CreateWorkRequest as ae, type CreateWorkflowRequest as af, DEFAULT_AI_USD_PER_GBP as ag, DOC_TERMINAL_STATUSES as ah, DRIVE_SYNC_VENDORS as ai, type Database as aj, type DatabaseAggregateRequest as ak, type DatabaseAggregateResult as al, type DatabaseColumn as am, type DatabaseColumnWrite as an, type DatabaseImportResult as ao, type DatabaseRow as ap, type DatabaseRowPage as aq, type DatabaseRowsQuery as ar, type DateTimeSpec as as, type DecryptedChat as at, type DecryptedChatMessage as au, type DeploymentHouseTemplate as av, type DocInfo as aw, type DocInfoMap as ax, type DocNameMap as ay, type DocumentAutomationAction as az, type ActivityKind as b, SHAREPOINT_VENDORS as b$, type IdentityStatus as b0, type ImportResult as b1, type InvitationRead as b2, type LinkedRun as b3, type ListAllOptions as b4, type ListEventsParams as b5, type ListFactsOptions as b6, type ListPaginatedOptions as b7, MAILBOX_SYNC_VENDORS as b8, MAX_RETRIEVE_DOC_IDS as b9, type ProjectPlanChangeRequest as bA, type ProjectQuoteRequest as bB, type ProjectResponse as bC, type ProjectUpdateRequest as bD, type ProjectUsageResponse as bE, PublicBookingError as bF, type PublicBookingPage as bG, type QuotaExceeded as bH, type RaisedSignal as bI, type RawResponseEvent as bJ, type ReconnectOptions as bK, type ReconnectableWsConnection as bL, type ResolvedCitation as bM, type ResolvedRecipient as bN, type RespondParams as bO, type RespondPartstat as bP, type ResponseHandle as bQ, type ResponseSnapshot as bR, type ResponseStart as bS, type ResponseStartOptions as bT, type RoomCreateBody as bU, type RoomQuery as bV, type RoomRead as bW, type RunProgress as bX, type RunStats as bY, type RunStep as bZ, type RunWaitingOn as b_, MICROSOFT_VENDORS as ba, type MailAttachment as bb, type MessageLevel as bc, type OAuthAccountKind as bd, type OutputItemDone as be, type OverlayItem as bf, type OverlayLayerName as bg, PRESENCE_KINDS as bh, PROMPT_CONTEXT_CHARS as bi, type ParsedSlashCommand as bj, type PendingAuthResponse as bk, type PersonKey as bl, PlanStepsError as bm, type PlanWorkRequest as bn, type ProductResponse as bo, type ProjectAddonKind as bp, type ProjectAddonSettingsRequest as bq, type ProjectBudget as br, type ProjectCheckoutRequest as bs, type ProjectConversationUsageResponse as bt, type ProjectCreateOptions as bu, type ProjectDetails as bv, type ProjectEventKind as bw, type ProjectEventResponse as bx, type ProjectInvoicesResponse as by, type ProjectNextPeriodAddonsRequest as bz, type ActivityResponse as c, type UploadProgressListener as c$, type SSEEvent as c0, type SSEStreamCallbacks as c1, type SSEStreamOutcome as c2, type SSEStreamResult as c3, STEP_FIELD_OPTION_TONES as c4, STOP_ID_WAIT_MS as c5, STOP_REPEAT_WINDOW_MS as c6, SUPPORTED_EXTENSIONS as c7, type ScopedTarget as c8, type SearchChunk as c9, type TagChange as cA, type TagFieldDefinition as cB, type TagGroup as cC, type TagKind as cD, type TagKindField as cE, type TagKindSchema as cF, type TagLinks as cG, type TagListQuery as cH, type TagNode as cI, type TagResponse as cJ, type TagScope as cK, type TagTreeRow as cL, type TaskPlan as cM, type TaskPlanStep as cN, type TaxQuoteResponse as cO, type Thread as cP, type ThreadsResponse as cQ, type TimeSuggestion as cR, type TurnRequest as cS, type UpdateConversationRequest as cT, type UpdateFactRequest as cU, type UpdateWorkflowRequest as cV, type UploadBatchResult as cW, type UploadDirectOptions as cX, type UploadDirectResult as cY, type UploadDocumentsOptions as cZ, type UploadOptions as c_, type SendBack as ca, type ShareRead as cb, type ShareRole as cc, type SkillSummary as cd, type SkippedFile as ce, type SlackConnectionStatus as cf, type StepActionRequest as cg, type StepActivityEvent as ch, type StepAssignee as ci, type StepDisplay as cj, type StepField as ck, type StepFieldOption as cl, type StepFieldOptionTone as cm, type StepKind as cn, type StepPhase as co, type StepSignal as cp, type StepSignalWhen as cq, type StepState as cr, type StepStatus as cs, type SubagentBranchRecord as ct, type SubagentLaneInfo as cu, type SubmitBackgroundQueryOptions as cv, type SubscribeParams as cw, type SyncTriggerResult as cx, TAG_KINDS as cy, TAG_NESTING_MAX_DEPTH as cz, Arbi as d, findSubagentRunId as d$, type UploadResult as d0, type UsageBreakdown as d1, type UserConnectorEntry as d2, type UserDailyUsageResponse as d3, type UserInfo as d4, WebSocketAuthError as d5, type WeeklyHoursSpec as d6, type WorkStatus as d7, type WorkflowAuthMode as d8, type WorkflowResponse as d9, computeRunStats as dA, connectErrorMessage as dB, connectWebSocket as dC, connectWithReconnect as dD, connectors as dE, contacts as dF, continuityPrompt as dG, conversations as dH, countCitations as dI, createAuthenticatedClient as dJ, createDocumentWaiter as dK, createIndexAssigner as dL, databases as dM, defaultKindForFormat as dN, doctags as dO, documents as dP, estimateDraftTokens as dQ, extractDocumentIdsFromMessages as dR, extractFactIdsFromMessages as dS, extractSubagentLanes as dT, facts as dU, files as dV, filterDocumentTags as dW, filterSkills as dX, findLeafForTaskMessage as dY, findMainSiblingLeaf as dZ, findReplyTarget as d_, type WorkflowRunHistoryResponse as da, type WorkflowRunResponse as db, type WorkspaceContext as dc, type WorkspaceOpenResponse as dd, type WsConnection as de, account as df, agentconfig as dg, agents as dh, appendTranscriptionHints as di, assistant as dj, authenticatedFetch as dk, bookPublicSlot as dl, buildCitationChunkData as dm, buildDocNameMap as dn, buildDocumentTools as dp, buildFactsContextTool as dq, buildRetrievalChunkTool as dr, buildRetrievalFullContextTool as ds, buildRetrievalTocTool as dt, buildTurnRequest as du, calendar as dv, calls as dw, canTagHaveParent as dx, cancelPublicBooking as dy, chats as dz, ArbiApiError as e, reduceOutputItem as e$, flattenTagTree as e0, formatAgentStepLabel as e1, formatFileSize as e2, formatGbp as e3, formatGbpPerMillionTokens as e4, formatItemLabel as e5, formatStreamSummary as e6, formatTokens as e7, formatUserName as e8, formatWorkspaceChoices as e9, isAnnotationTag as eA, isConnectorVendorVisible as eB, isDriveSyncVendor as eC, isEntityTag as eD, isFlatKind as eE, isLabelTag as eF, isMailboxSyncVendor as eG, isNearAiUsageBudget as eH, isPresenceTag as eI, isSharePointVendor as eJ, isSharedSkill as eK, isTraceItem as eL, mail as eM, mergeAgentSteps as eN, notifications as eO, parseSSEEvents as eP, parseSlashCommand as eQ, parseSlashTokenInProgress as eR, performPasswordLogin as eS, performSigningKeyLogin as eT, performSsoDeviceFlowLogin as eU, pickMainThread as eV, profile as eW, progressFetch as eX, projects as eY, quotaExceededFrom as eZ, quotaFromStreamError as e_, formatWsMessage as ea, generateEncryptedWorkspaceKey as eb, generateNewWorkspaceKey as ec, getAgentStepLabel as ed, getAttachableRunId as ee, getChildTags as ef, getContextRemainingPercent as eg, getContextUsedPercent as eh, getContextUsedTokens as ei, getCurrentStep as ej, getEligibleParentTags as ek, getErrorCode as el, getErrorMessage as em, getPublicBookingPage as en, getRawWorkspaceKey as eo, getRunToAttach as ep, getRunToCancel as eq, getStepDisplay as er, getStepTool as es, getSubagentBranchRecord as et, getTagDescendantIds as eu, health as ev, houseTemplate as ew, hydrateAgentSteps as ex, identity as ey, identityErrorCode as ez, ArbiError as f, refusalReason as f0, requireData as f1, requireOk as f2, resolveAuth as f3, resolveCitations as f4, resolveSummary as f5, resolveWorkspace as f6, responses as f7, searchChunks as f8, selectFullContextDocument as f9, selectWorkspace as fa, selectWorkspaceById as fb, sessions as fc, settings as fd, signatureRequests as fe, sliceToSubagentThread as ff, streamSSE as fg, stripCitationMarkdown as fh, subagentJobLabel as fi, summarizeCitations as fj, tagUseCount as fk, tags as fl, tagsForScope as fm, tagsOfGroup as fn, topLevelAgentSteps as fo, uploadSkill as fp, usdToGbp as fq, work as fr, workflowSteps as fs, workflows as ft, workspaces as fu, wouldCreateTagCycle as fv, type ArbiErrorOptions as g, type ArbiHostSession as h, type ArbiOptions as i, ArbiSessionExpiredError as j, ArbiTransportError as k, ArbiWorkspaceChangedError as l, ArbiWorkspaceSupersededError as m, type AskHandlers as n, type AskRequest as o, type AttendeeRead as p, type AuthContext as q, type AuthHeaders as r, type AuthMode as s, type AuthenticatedClient as t, type BookingPage as u, type BookingPageWriteBody as v, type BookingRequestBody as w, type BridgeTokensOptions as x, type CalDavProfile as y, type CalendarAccount as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _arbidocs_client from '@arbidocs/client';
|
|
2
|
-
import { SessionPersistence, ArbiClient, LoginResult, WebSocketServerMessage, WsAuthResultMessage, WsTaskUpdateMessage, components, KeyPair, CallPeer, SessionStateStorage, RegisterParams, RegisterResult, LoginParams, SessionManager, LoginProfile } from '@arbidocs/client';
|
|
2
|
+
import { HttpTransport, SessionPersistence, ArbiClient, LoginResult, WebSocketServerMessage, WsAuthResultMessage, WsTaskUpdateMessage, components, KeyPair, CallPeer, HttpTransportOptions, SessionStateStorage, RegisterParams, RegisterResult, LoginParams, SessionManager, LoginProfile } from '@arbidocs/client';
|
|
3
3
|
import { S as SSEStreamStartData, j as ResponseOutputItemAddedEvent, k as ResponseOutputItemDoneEvent, g as ResponseContentPartAddedEvent, c as ArbiErrorEvent, f as MessageQueuedEvent, o as UserMessageEvent, e as MessageMetadataPayload$1, U as UserInputRequestEvent, P as ProbeAnswerEvent, D as DeferredInterjectionEvent, A as AgentControlStateEvent, d as ArtifactEvent, M as MailDraftSSEEvent, n as ResponseUsage, T as TokenBudgetContext, b as AgentStepEvent } from './sse-types-BbR7JG5o.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -112,6 +112,8 @@ declare function getErrorCode(err: unknown): string | undefined;
|
|
|
112
112
|
interface AuthHeaders {
|
|
113
113
|
baseUrl: string;
|
|
114
114
|
accessToken: string;
|
|
115
|
+
/** Instance transport; omitted by existing standalone callers. */
|
|
116
|
+
fetch?: typeof globalThis.fetch;
|
|
115
117
|
}
|
|
116
118
|
interface AuthFetchOptions extends AuthHeaders {
|
|
117
119
|
/** URL path relative to baseUrl (e.g. '/v1/document/upload'). */
|
|
@@ -138,7 +140,7 @@ declare function authenticatedFetch(options: AuthFetchOptions): Promise<Response
|
|
|
138
140
|
* and reports once, when the body is sent.
|
|
139
141
|
*/
|
|
140
142
|
type UploadProgressListener = (loaded: number, total: number) => void;
|
|
141
|
-
declare function progressFetch(onProgress: UploadProgressListener): (request: Request) => Promise<Response>;
|
|
143
|
+
declare function progressFetch(onProgress: UploadProgressListener, transport?: HttpTransport): (request: Request) => Promise<Response>;
|
|
142
144
|
|
|
143
145
|
/**
|
|
144
146
|
* Configuration types — shared between browser and Node.js environments.
|
|
@@ -7192,6 +7194,8 @@ type DatabaseRow = components['schemas']['DatabaseRowRead'];
|
|
|
7192
7194
|
type DatabaseRowWrite = components['schemas']['DatabaseRowWrite'];
|
|
7193
7195
|
type DatabaseRowPage = components['schemas']['DatabaseRowPage'];
|
|
7194
7196
|
type DatabaseImportResult = components['schemas']['DatabaseImportResult'];
|
|
7197
|
+
type DatabaseAggregateRequest = components['schemas']['DatabaseAggregateRequest'];
|
|
7198
|
+
type DatabaseAggregateResult = components['schemas']['DatabaseAggregateResult'];
|
|
7195
7199
|
/** A search of a database's rows: text in any cell, sorting and paging (all on the server). */
|
|
7196
7200
|
interface DatabaseRowsQuery {
|
|
7197
7201
|
q?: string;
|
|
@@ -7203,6 +7207,11 @@ interface DatabaseRowsQuery {
|
|
|
7203
7207
|
declare function listDatabases(arbi: ArbiClient): Promise<Database[]>;
|
|
7204
7208
|
declare function getDatabase(arbi: ArbiClient, databaseId: string): Promise<Database>;
|
|
7205
7209
|
declare function listDatabaseRows(arbi: ArbiClient, databaseId: string, query?: DatabaseRowsQuery): Promise<DatabaseRowPage>;
|
|
7210
|
+
/**
|
|
7211
|
+
* Group the rows and measure each group on the server (over every row, so totals are exact
|
|
7212
|
+
* however large the database is): the labels and series a chart or a metric tile draws.
|
|
7213
|
+
*/
|
|
7214
|
+
declare function aggregateDatabase(arbi: ArbiClient, databaseId: string, body: Partial<DatabaseAggregateRequest>): Promise<DatabaseAggregateResult>;
|
|
7206
7215
|
declare function createDatabase(arbi: ArbiClient, body: DatabaseCreate): Promise<Database>;
|
|
7207
7216
|
/** Rename, describe, or change the columns (`columns` is the full new list). */
|
|
7208
7217
|
declare function updateDatabase(arbi: ArbiClient, databaseId: string, body: DatabaseUpdate): Promise<Database>;
|
|
@@ -7219,6 +7228,8 @@ declare function importDatabaseRows(arbi: ArbiClient, databaseId: string, file:
|
|
|
7219
7228
|
declare function exportDatabase(arbi: ArbiClient, databaseId: string, format: 'csv' | 'xlsx'): Promise<Blob>;
|
|
7220
7229
|
|
|
7221
7230
|
type databases_Database = Database;
|
|
7231
|
+
type databases_DatabaseAggregateRequest = DatabaseAggregateRequest;
|
|
7232
|
+
type databases_DatabaseAggregateResult = DatabaseAggregateResult;
|
|
7222
7233
|
type databases_DatabaseColumn = DatabaseColumn;
|
|
7223
7234
|
type databases_DatabaseColumnWrite = DatabaseColumnWrite;
|
|
7224
7235
|
type databases_DatabaseCreate = DatabaseCreate;
|
|
@@ -7229,6 +7240,7 @@ type databases_DatabaseRowWrite = DatabaseRowWrite;
|
|
|
7229
7240
|
type databases_DatabaseRowsQuery = DatabaseRowsQuery;
|
|
7230
7241
|
type databases_DatabaseUpdate = DatabaseUpdate;
|
|
7231
7242
|
declare const databases_addDatabaseRows: typeof addDatabaseRows;
|
|
7243
|
+
declare const databases_aggregateDatabase: typeof aggregateDatabase;
|
|
7232
7244
|
declare const databases_createDatabase: typeof createDatabase;
|
|
7233
7245
|
declare const databases_deleteDatabase: typeof deleteDatabase;
|
|
7234
7246
|
declare const databases_deleteDatabaseRows: typeof deleteDatabaseRows;
|
|
@@ -7241,7 +7253,7 @@ declare const databases_listDatabases: typeof listDatabases;
|
|
|
7241
7253
|
declare const databases_updateDatabase: typeof updateDatabase;
|
|
7242
7254
|
declare const databases_updateDatabaseRow: typeof updateDatabaseRow;
|
|
7243
7255
|
declare namespace databases {
|
|
7244
|
-
export { type databases_Database as Database, type databases_DatabaseColumn as DatabaseColumn, type databases_DatabaseColumnWrite as DatabaseColumnWrite, type databases_DatabaseCreate as DatabaseCreate, type databases_DatabaseImportResult as DatabaseImportResult, type databases_DatabaseRow as DatabaseRow, type databases_DatabaseRowPage as DatabaseRowPage, type databases_DatabaseRowWrite as DatabaseRowWrite, type databases_DatabaseRowsQuery as DatabaseRowsQuery, type databases_DatabaseUpdate as DatabaseUpdate, databases_addDatabaseRows as addDatabaseRows, databases_createDatabase as createDatabase, databases_deleteDatabase as deleteDatabase, databases_deleteDatabaseRows as deleteDatabaseRows, databases_exportDatabase as exportDatabase, databases_getDatabase as getDatabase, databases_importDatabase as importDatabase, databases_importDatabaseRows as importDatabaseRows, databases_listDatabaseRows as listDatabaseRows, databases_listDatabases as listDatabases, databases_updateDatabase as updateDatabase, databases_updateDatabaseRow as updateDatabaseRow };
|
|
7256
|
+
export { type databases_Database as Database, type databases_DatabaseAggregateRequest as DatabaseAggregateRequest, type databases_DatabaseAggregateResult as DatabaseAggregateResult, type databases_DatabaseColumn as DatabaseColumn, type databases_DatabaseColumnWrite as DatabaseColumnWrite, type databases_DatabaseCreate as DatabaseCreate, type databases_DatabaseImportResult as DatabaseImportResult, type databases_DatabaseRow as DatabaseRow, type databases_DatabaseRowPage as DatabaseRowPage, type databases_DatabaseRowWrite as DatabaseRowWrite, type databases_DatabaseRowsQuery as DatabaseRowsQuery, type databases_DatabaseUpdate as DatabaseUpdate, databases_addDatabaseRows as addDatabaseRows, databases_aggregateDatabase as aggregateDatabase, databases_createDatabase as createDatabase, databases_deleteDatabase as deleteDatabase, databases_deleteDatabaseRows as deleteDatabaseRows, databases_exportDatabase as exportDatabase, databases_getDatabase as getDatabase, databases_importDatabase as importDatabase, databases_importDatabaseRows as importDatabaseRows, databases_listDatabaseRows as listDatabaseRows, databases_listDatabases as listDatabases, databases_updateDatabase as updateDatabase, databases_updateDatabaseRow as updateDatabaseRow };
|
|
7245
7257
|
}
|
|
7246
7258
|
|
|
7247
7259
|
/**
|
|
@@ -7946,6 +7958,8 @@ type ConfigUpdateData$1 = components['schemas']['ConfigUpdateData'];
|
|
|
7946
7958
|
type WorkspaceOpenResponse = components['schemas']['WorkspaceOpenResponse'];
|
|
7947
7959
|
|
|
7948
7960
|
interface ArbiOptions {
|
|
7961
|
+
/** Shared HTTP configuration. With a host session, configure its client instead. */
|
|
7962
|
+
transport?: HttpTransportOptions;
|
|
7949
7963
|
/** Backend API URL (e.g. 'https://arbi.mycompany.com') */
|
|
7950
7964
|
url: string;
|
|
7951
7965
|
/** Deployment domain for key derivation. Defaults to hostname of url. */
|
|
@@ -8115,7 +8129,11 @@ declare class Arbi {
|
|
|
8115
8129
|
* opened next, and a workspace other than the current one is opened for this session first.
|
|
8116
8130
|
*/
|
|
8117
8131
|
private createTagIn;
|
|
8118
|
-
/**
|
|
8132
|
+
/**
|
|
8133
|
+
* The workspace a call acts on, captured when it is called: the one it names (opened for this session, not
|
|
8134
|
+
* switched to), else the current one. The request names it, so a switch while it is in flight cannot move it.
|
|
8135
|
+
* `undefined` only when no workspace is known here (the server's open one then applies, as before).
|
|
8136
|
+
*/
|
|
8119
8137
|
private targetWorkspace;
|
|
8120
8138
|
/**
|
|
8121
8139
|
* Make a workspace the CURRENT one: decrypt its key, open it on the server (which makes it the
|
|
@@ -15493,6 +15511,14 @@ declare class Arbi {
|
|
|
15493
15511
|
rows: components["schemas"]["DatabaseRowRead"][];
|
|
15494
15512
|
total: number;
|
|
15495
15513
|
}>;
|
|
15514
|
+
/** Group and measure the rows on the server (a chart's labels and series). */
|
|
15515
|
+
aggregate: (databaseId: string, body: Partial<DatabaseAggregateRequest>) => Promise<{
|
|
15516
|
+
keys: string[];
|
|
15517
|
+
labels: string[];
|
|
15518
|
+
series: components["schemas"]["DatabaseSeries"][];
|
|
15519
|
+
total_rows: number;
|
|
15520
|
+
truncated: boolean;
|
|
15521
|
+
}>;
|
|
15496
15522
|
create: (body: DatabaseCreate) => Promise<{
|
|
15497
15523
|
id: string;
|
|
15498
15524
|
name: string;
|
|
@@ -17191,4 +17217,4 @@ declare function getAttachableRunId(messages: readonly RunMessage[]): string | n
|
|
|
17191
17217
|
*/
|
|
17192
17218
|
declare function getRunToAttach(localGeneration: LocalGeneration | undefined, messages: readonly RunMessage[]): string | null;
|
|
17193
17219
|
|
|
17194
|
-
export { type CliCredentials as $, ACCOUNT_VENDOR as A, type BookingConfirmation as B, type CalDavConnectBody as C, type CalendarAccountKind as D, type CalendarCreateBody as E, type CalendarEvent as F, type CalendarKeys as G, type CalendarRead as H, type CalendarSettings as I, type CalendarSettingsBody as J, type CalendarUpdate as K, type CalendarWindow as L, CallApiError as M, type ChatAttachmentFile as N, type ChatAttachmentInput as O, type ChatCryptoContext as P, type ChatKeyRing as Q, type ChatKind as R, type ChatMemberKey as S, type ChatMemberResponse as T, type ChatMessage as U, type ChatMessageResponse as V, type ChatResponse as W, type ChatSession as X, type CitationSummary as Y, type CitationToolSources as Z, type CliConfig as _, type AccountSyncResult as a, type ImportResult as a$, type CommandDescriptor as a0, type ConfigStore as a1, type ConnectOptions as a2, type ConnectorCatalogEntry as a3, type ConnectorFolder as a4, type ConnectorSyncProgress as a5, type ConnectorSyncStatus as a6, type ConnectorVendorKey as a7, type ConnectorVisibilitySettings as a8, type ContextUsage as a9, type DocumentSelector as aA, type DocumentWaiter as aB, type DocumentWaiterOptions as aC, type DriveSyncProgress as aD, type DriveSyncSummary as aE, DuplicateContactError as aF, ENTITY_KINDS as aG, type EditScope as aH, type EntityKind as aI, type EventCreateBody as aJ, type EventPatchBody as aK, FLAT_TAG_KINDS as aL, type FactResponse as aM, type FactSearchRequest as aN, type FactSearchResponse as aO, type FindTimeParams as aP, type FormattedWsMessage as aQ, type FreeBusyEntry as aR, type FullContextSelection as aS, GOOGLE_VENDORS as aT, type HolidayCountry as aU, type HouseTemplateCandidate as aV, IMANAGE_VENDORS as aW, type IdentityErrorCode as aX, type IdentityPurchase as aY, type IdentityState as aZ, type IdentityStatus as a_, type ConversationResponse as aa, type ConversationUsageResponse as ab, type CreateFactRequest as ac, type CreateFactsRequest as ad, type CreateWorkRequest as ae, type CreateWorkflowRequest as af, DEFAULT_AI_USD_PER_GBP as ag, DOC_TERMINAL_STATUSES as ah, DRIVE_SYNC_VENDORS as ai, type Database as aj, type DatabaseColumn as ak, type DatabaseColumnWrite as al, type DatabaseImportResult as am, type DatabaseRow as an, type DatabaseRowPage as ao, type DatabaseRowsQuery as ap, type DateTimeSpec as aq, type DecryptedChat as ar, type DecryptedChatMessage as as, type DeploymentHouseTemplate as at, type DocInfo as au, type DocInfoMap as av, type DocNameMap as aw, type DocumentAutomationAction as ax, type DocumentListFields as ay, type DocumentListOrder as az, type ActivityKind as b, type SSEStreamCallbacks as b$, type InvitationRead as b0, type LinkedRun as b1, type ListAllOptions as b2, type ListEventsParams as b3, type ListFactsOptions as b4, type ListPaginatedOptions as b5, MAILBOX_SYNC_VENDORS as b6, MAX_RETRIEVE_DOC_IDS as b7, MICROSOFT_VENDORS as b8, type MailAttachment as b9, type ProjectResponse as bA, type ProjectUpdateRequest as bB, type ProjectUsageResponse as bC, PublicBookingError as bD, type PublicBookingPage as bE, type QuotaExceeded as bF, type RaisedSignal as bG, type RawResponseEvent as bH, type ReconnectOptions as bI, type ReconnectableWsConnection as bJ, type ResolvedCitation as bK, type ResolvedRecipient as bL, type RespondParams as bM, type RespondPartstat as bN, type ResponseHandle as bO, type ResponseSnapshot as bP, type ResponseStart as bQ, type ResponseStartOptions as bR, type RoomCreateBody as bS, type RoomQuery as bT, type RoomRead as bU, type RunProgress as bV, type RunStats as bW, type RunStep as bX, type RunWaitingOn as bY, SHAREPOINT_VENDORS as bZ, type SSEEvent as b_, type MessageLevel as ba, type OAuthAccountKind as bb, type OutputItemDone as bc, type OverlayItem as bd, type OverlayLayerName as be, PRESENCE_KINDS as bf, PROMPT_CONTEXT_CHARS as bg, type ParsedSlashCommand as bh, type PendingAuthResponse as bi, type PersonKey as bj, PlanStepsError as bk, type PlanWorkRequest as bl, type ProductResponse as bm, type ProjectAddonKind as bn, type ProjectAddonSettingsRequest as bo, type ProjectBudget as bp, type ProjectCheckoutRequest as bq, type ProjectConversationUsageResponse as br, type ProjectCreateOptions as bs, type ProjectDetails as bt, type ProjectEventKind as bu, type ProjectEventResponse as bv, type ProjectInvoicesResponse as bw, type ProjectNextPeriodAddonsRequest as bx, type ProjectPlanChangeRequest as by, type ProjectQuoteRequest as bz, type ActivityResponse as c, type UsageBreakdown as c$, type SSEStreamOutcome as c0, type SSEStreamResult as c1, STEP_FIELD_OPTION_TONES as c2, STOP_ID_WAIT_MS as c3, STOP_REPEAT_WINDOW_MS as c4, SUPPORTED_EXTENSIONS as c5, type ScopedTarget as c6, type SearchChunk as c7, type SendBack as c8, type ShareRead as c9, type TagGroup as cA, type TagKind as cB, type TagKindField as cC, type TagKindSchema as cD, type TagLinks as cE, type TagListQuery as cF, type TagNode as cG, type TagResponse as cH, type TagScope as cI, type TagTreeRow as cJ, type TaskPlan as cK, type TaskPlanStep as cL, type TaxQuoteResponse as cM, type Thread as cN, type ThreadsResponse as cO, type TimeSuggestion as cP, type TurnRequest as cQ, type UpdateConversationRequest as cR, type UpdateFactRequest as cS, type UpdateWorkflowRequest as cT, type UploadBatchResult as cU, type UploadDirectOptions as cV, type UploadDirectResult as cW, type UploadDocumentsOptions as cX, type UploadOptions as cY, type UploadProgressListener as cZ, type UploadResult as c_, type ShareRole as ca, type SkillSummary as cb, type SkippedFile as cc, type SlackConnectionStatus as cd, type StepActionRequest as ce, type StepActivityEvent as cf, type StepAssignee as cg, type StepDisplay as ch, type StepField as ci, type StepFieldOption as cj, type StepFieldOptionTone as ck, type StepKind as cl, type StepPhase as cm, type StepSignal as cn, type StepSignalWhen as co, type StepState as cp, type StepStatus as cq, type SubagentBranchRecord as cr, type SubagentLaneInfo as cs, type SubmitBackgroundQueryOptions as ct, type SubscribeParams as cu, type SyncTriggerResult as cv, TAG_KINDS as cw, TAG_NESTING_MAX_DEPTH as cx, type TagChange as cy, type TagFieldDefinition as cz, Arbi as d, formatAgentStepLabel as d$, type UserConnectorEntry as d0, type UserDailyUsageResponse as d1, type UserInfo as d2, WebSocketAuthError as d3, type WeeklyHoursSpec as d4, type WorkStatus as d5, type WorkflowAuthMode as d6, type WorkflowResponse as d7, type WorkflowRunHistoryResponse as d8, type WorkflowRunResponse as d9, connectWebSocket as dA, connectWithReconnect as dB, connectors as dC, contacts as dD, continuityPrompt as dE, conversations as dF, countCitations as dG, createAuthenticatedClient as dH, createDocumentWaiter as dI, createIndexAssigner as dJ, databases as dK, defaultKindForFormat as dL, doctags as dM, documents as dN, estimateDraftTokens as dO, extractDocumentIdsFromMessages as dP, extractFactIdsFromMessages as dQ, extractSubagentLanes as dR, facts as dS, files as dT, filterDocumentTags as dU, filterSkills as dV, findLeafForTaskMessage as dW, findMainSiblingLeaf as dX, findReplyTarget as dY, findSubagentRunId as dZ, flattenTagTree as d_, type WorkspaceContext as da, type WorkspaceOpenResponse as db, type WsConnection as dc, account as dd, agentconfig as de, agents as df, appendTranscriptionHints as dg, assistant as dh, authenticatedFetch as di, bookPublicSlot as dj, buildCitationChunkData as dk, buildDocNameMap as dl, buildDocumentTools as dm, buildFactsContextTool as dn, buildRetrievalChunkTool as dp, buildRetrievalFullContextTool as dq, buildRetrievalTocTool as dr, buildTurnRequest as ds, calendar as dt, calls as du, canTagHaveParent as dv, cancelPublicBooking as dw, chats as dx, computeRunStats as dy, connectErrorMessage as dz, ArbiApiError as e, requireData as e$, formatFileSize as e0, formatGbp as e1, formatGbpPerMillionTokens as e2, formatItemLabel as e3, formatStreamSummary as e4, formatTokens as e5, formatUserName as e6, formatWorkspaceChoices as e7, formatWsMessage as e8, generateEncryptedWorkspaceKey as e9, isDriveSyncVendor as eA, isEntityTag as eB, isFlatKind as eC, isLabelTag as eD, isMailboxSyncVendor as eE, isNearAiUsageBudget as eF, isPresenceTag as eG, isSharePointVendor as eH, isSharedSkill as eI, isTraceItem as eJ, mail as eK, mergeAgentSteps as eL, notifications as eM, parseSSEEvents as eN, parseSlashCommand as eO, parseSlashTokenInProgress as eP, performPasswordLogin as eQ, performSigningKeyLogin as eR, performSsoDeviceFlowLogin as eS, pickMainThread as eT, profile as eU, progressFetch as eV, projects as eW, quotaExceededFrom as eX, quotaFromStreamError as eY, reduceOutputItem as eZ, refusalReason as e_, generateNewWorkspaceKey as ea, getAgentStepLabel as eb, getAttachableRunId as ec, getChildTags as ed, getContextRemainingPercent as ee, getContextUsedPercent as ef, getContextUsedTokens as eg, getCurrentStep as eh, getEligibleParentTags as ei, getErrorCode as ej, getErrorMessage as ek, getPublicBookingPage as el, getRawWorkspaceKey as em, getRunToAttach as en, getRunToCancel as eo, getStepDisplay as ep, getStepTool as eq, getSubagentBranchRecord as er, getTagDescendantIds as es, health as et, houseTemplate as eu, hydrateAgentSteps as ev, identity as ew, identityErrorCode as ex, isAnnotationTag as ey, isConnectorVendorVisible as ez, ArbiError as f, requireOk as f0, resolveAuth as f1, resolveCitations as f2, resolveSummary as f3, resolveWorkspace as f4, responses as f5, searchChunks as f6, selectFullContextDocument as f7, selectWorkspace as f8, selectWorkspaceById as f9, sessions as fa, settings as fb, signatureRequests as fc, sliceToSubagentThread as fd, streamSSE as fe, stripCitationMarkdown as ff, subagentJobLabel as fg, summarizeCitations as fh, tagUseCount as fi, tags as fj, tagsForScope as fk, tagsOfGroup as fl, topLevelAgentSteps as fm, uploadSkill as fn, usdToGbp as fo, work as fp, workflowSteps as fq, workflows as fr, workspaces as fs, wouldCreateTagCycle as ft, type ArbiErrorOptions as g, type ArbiHostSession as h, type ArbiOptions as i, ArbiSessionExpiredError as j, ArbiTransportError as k, ArbiWorkspaceChangedError as l, ArbiWorkspaceSupersededError as m, type AskHandlers as n, type AskRequest as o, type AttendeeRead as p, type AuthContext as q, type AuthHeaders as r, type AuthMode as s, type AuthenticatedClient as t, type BookingPage as u, type BookingPageWriteBody as v, type BookingRequestBody as w, type BridgeTokensOptions as x, type CalDavProfile as y, type CalendarAccount as z };
|
|
17220
|
+
export { type CliCredentials as $, ACCOUNT_VENDOR as A, type BookingConfirmation as B, type CalDavConnectBody as C, type CalendarAccountKind as D, type CalendarCreateBody as E, type CalendarEvent as F, type CalendarKeys as G, type CalendarRead as H, type CalendarSettings as I, type CalendarSettingsBody as J, type CalendarUpdate as K, type CalendarWindow as L, CallApiError as M, type ChatAttachmentFile as N, type ChatAttachmentInput as O, type ChatCryptoContext as P, type ChatKeyRing as Q, type ChatKind as R, type ChatMemberKey as S, type ChatMemberResponse as T, type ChatMessage as U, type ChatMessageResponse as V, type ChatResponse as W, type ChatSession as X, type CitationSummary as Y, type CitationToolSources as Z, type CliConfig as _, type AccountSyncResult as a, type IdentityState as a$, type CommandDescriptor as a0, type ConfigStore as a1, type ConnectOptions as a2, type ConnectorCatalogEntry as a3, type ConnectorFolder as a4, type ConnectorSyncProgress as a5, type ConnectorSyncStatus as a6, type ConnectorVendorKey as a7, type ConnectorVisibilitySettings as a8, type ContextUsage as a9, type DocumentListFields as aA, type DocumentListOrder as aB, type DocumentSelector as aC, type DocumentWaiter as aD, type DocumentWaiterOptions as aE, type DriveSyncProgress as aF, type DriveSyncSummary as aG, DuplicateContactError as aH, ENTITY_KINDS as aI, type EditScope as aJ, type EntityKind as aK, type EventCreateBody as aL, type EventPatchBody as aM, FLAT_TAG_KINDS as aN, type FactResponse as aO, type FactSearchRequest as aP, type FactSearchResponse as aQ, type FindTimeParams as aR, type FormattedWsMessage as aS, type FreeBusyEntry as aT, type FullContextSelection as aU, GOOGLE_VENDORS as aV, type HolidayCountry as aW, type HouseTemplateCandidate as aX, IMANAGE_VENDORS as aY, type IdentityErrorCode as aZ, type IdentityPurchase as a_, type ConversationResponse as aa, type ConversationUsageResponse as ab, type CreateFactRequest as ac, type CreateFactsRequest as ad, type CreateWorkRequest as ae, type CreateWorkflowRequest as af, DEFAULT_AI_USD_PER_GBP as ag, DOC_TERMINAL_STATUSES as ah, DRIVE_SYNC_VENDORS as ai, type Database as aj, type DatabaseAggregateRequest as ak, type DatabaseAggregateResult as al, type DatabaseColumn as am, type DatabaseColumnWrite as an, type DatabaseImportResult as ao, type DatabaseRow as ap, type DatabaseRowPage as aq, type DatabaseRowsQuery as ar, type DateTimeSpec as as, type DecryptedChat as at, type DecryptedChatMessage as au, type DeploymentHouseTemplate as av, type DocInfo as aw, type DocInfoMap as ax, type DocNameMap as ay, type DocumentAutomationAction as az, type ActivityKind as b, SHAREPOINT_VENDORS as b$, type IdentityStatus as b0, type ImportResult as b1, type InvitationRead as b2, type LinkedRun as b3, type ListAllOptions as b4, type ListEventsParams as b5, type ListFactsOptions as b6, type ListPaginatedOptions as b7, MAILBOX_SYNC_VENDORS as b8, MAX_RETRIEVE_DOC_IDS as b9, type ProjectPlanChangeRequest as bA, type ProjectQuoteRequest as bB, type ProjectResponse as bC, type ProjectUpdateRequest as bD, type ProjectUsageResponse as bE, PublicBookingError as bF, type PublicBookingPage as bG, type QuotaExceeded as bH, type RaisedSignal as bI, type RawResponseEvent as bJ, type ReconnectOptions as bK, type ReconnectableWsConnection as bL, type ResolvedCitation as bM, type ResolvedRecipient as bN, type RespondParams as bO, type RespondPartstat as bP, type ResponseHandle as bQ, type ResponseSnapshot as bR, type ResponseStart as bS, type ResponseStartOptions as bT, type RoomCreateBody as bU, type RoomQuery as bV, type RoomRead as bW, type RunProgress as bX, type RunStats as bY, type RunStep as bZ, type RunWaitingOn as b_, MICROSOFT_VENDORS as ba, type MailAttachment as bb, type MessageLevel as bc, type OAuthAccountKind as bd, type OutputItemDone as be, type OverlayItem as bf, type OverlayLayerName as bg, PRESENCE_KINDS as bh, PROMPT_CONTEXT_CHARS as bi, type ParsedSlashCommand as bj, type PendingAuthResponse as bk, type PersonKey as bl, PlanStepsError as bm, type PlanWorkRequest as bn, type ProductResponse as bo, type ProjectAddonKind as bp, type ProjectAddonSettingsRequest as bq, type ProjectBudget as br, type ProjectCheckoutRequest as bs, type ProjectConversationUsageResponse as bt, type ProjectCreateOptions as bu, type ProjectDetails as bv, type ProjectEventKind as bw, type ProjectEventResponse as bx, type ProjectInvoicesResponse as by, type ProjectNextPeriodAddonsRequest as bz, type ActivityResponse as c, type UploadProgressListener as c$, type SSEEvent as c0, type SSEStreamCallbacks as c1, type SSEStreamOutcome as c2, type SSEStreamResult as c3, STEP_FIELD_OPTION_TONES as c4, STOP_ID_WAIT_MS as c5, STOP_REPEAT_WINDOW_MS as c6, SUPPORTED_EXTENSIONS as c7, type ScopedTarget as c8, type SearchChunk as c9, type TagChange as cA, type TagFieldDefinition as cB, type TagGroup as cC, type TagKind as cD, type TagKindField as cE, type TagKindSchema as cF, type TagLinks as cG, type TagListQuery as cH, type TagNode as cI, type TagResponse as cJ, type TagScope as cK, type TagTreeRow as cL, type TaskPlan as cM, type TaskPlanStep as cN, type TaxQuoteResponse as cO, type Thread as cP, type ThreadsResponse as cQ, type TimeSuggestion as cR, type TurnRequest as cS, type UpdateConversationRequest as cT, type UpdateFactRequest as cU, type UpdateWorkflowRequest as cV, type UploadBatchResult as cW, type UploadDirectOptions as cX, type UploadDirectResult as cY, type UploadDocumentsOptions as cZ, type UploadOptions as c_, type SendBack as ca, type ShareRead as cb, type ShareRole as cc, type SkillSummary as cd, type SkippedFile as ce, type SlackConnectionStatus as cf, type StepActionRequest as cg, type StepActivityEvent as ch, type StepAssignee as ci, type StepDisplay as cj, type StepField as ck, type StepFieldOption as cl, type StepFieldOptionTone as cm, type StepKind as cn, type StepPhase as co, type StepSignal as cp, type StepSignalWhen as cq, type StepState as cr, type StepStatus as cs, type SubagentBranchRecord as ct, type SubagentLaneInfo as cu, type SubmitBackgroundQueryOptions as cv, type SubscribeParams as cw, type SyncTriggerResult as cx, TAG_KINDS as cy, TAG_NESTING_MAX_DEPTH as cz, Arbi as d, findSubagentRunId as d$, type UploadResult as d0, type UsageBreakdown as d1, type UserConnectorEntry as d2, type UserDailyUsageResponse as d3, type UserInfo as d4, WebSocketAuthError as d5, type WeeklyHoursSpec as d6, type WorkStatus as d7, type WorkflowAuthMode as d8, type WorkflowResponse as d9, computeRunStats as dA, connectErrorMessage as dB, connectWebSocket as dC, connectWithReconnect as dD, connectors as dE, contacts as dF, continuityPrompt as dG, conversations as dH, countCitations as dI, createAuthenticatedClient as dJ, createDocumentWaiter as dK, createIndexAssigner as dL, databases as dM, defaultKindForFormat as dN, doctags as dO, documents as dP, estimateDraftTokens as dQ, extractDocumentIdsFromMessages as dR, extractFactIdsFromMessages as dS, extractSubagentLanes as dT, facts as dU, files as dV, filterDocumentTags as dW, filterSkills as dX, findLeafForTaskMessage as dY, findMainSiblingLeaf as dZ, findReplyTarget as d_, type WorkflowRunHistoryResponse as da, type WorkflowRunResponse as db, type WorkspaceContext as dc, type WorkspaceOpenResponse as dd, type WsConnection as de, account as df, agentconfig as dg, agents as dh, appendTranscriptionHints as di, assistant as dj, authenticatedFetch as dk, bookPublicSlot as dl, buildCitationChunkData as dm, buildDocNameMap as dn, buildDocumentTools as dp, buildFactsContextTool as dq, buildRetrievalChunkTool as dr, buildRetrievalFullContextTool as ds, buildRetrievalTocTool as dt, buildTurnRequest as du, calendar as dv, calls as dw, canTagHaveParent as dx, cancelPublicBooking as dy, chats as dz, ArbiApiError as e, reduceOutputItem as e$, flattenTagTree as e0, formatAgentStepLabel as e1, formatFileSize as e2, formatGbp as e3, formatGbpPerMillionTokens as e4, formatItemLabel as e5, formatStreamSummary as e6, formatTokens as e7, formatUserName as e8, formatWorkspaceChoices as e9, isAnnotationTag as eA, isConnectorVendorVisible as eB, isDriveSyncVendor as eC, isEntityTag as eD, isFlatKind as eE, isLabelTag as eF, isMailboxSyncVendor as eG, isNearAiUsageBudget as eH, isPresenceTag as eI, isSharePointVendor as eJ, isSharedSkill as eK, isTraceItem as eL, mail as eM, mergeAgentSteps as eN, notifications as eO, parseSSEEvents as eP, parseSlashCommand as eQ, parseSlashTokenInProgress as eR, performPasswordLogin as eS, performSigningKeyLogin as eT, performSsoDeviceFlowLogin as eU, pickMainThread as eV, profile as eW, progressFetch as eX, projects as eY, quotaExceededFrom as eZ, quotaFromStreamError as e_, formatWsMessage as ea, generateEncryptedWorkspaceKey as eb, generateNewWorkspaceKey as ec, getAgentStepLabel as ed, getAttachableRunId as ee, getChildTags as ef, getContextRemainingPercent as eg, getContextUsedPercent as eh, getContextUsedTokens as ei, getCurrentStep as ej, getEligibleParentTags as ek, getErrorCode as el, getErrorMessage as em, getPublicBookingPage as en, getRawWorkspaceKey as eo, getRunToAttach as ep, getRunToCancel as eq, getStepDisplay as er, getStepTool as es, getSubagentBranchRecord as et, getTagDescendantIds as eu, health as ev, houseTemplate as ew, hydrateAgentSteps as ex, identity as ey, identityErrorCode as ez, ArbiError as f, refusalReason as f0, requireData as f1, requireOk as f2, resolveAuth as f3, resolveCitations as f4, resolveSummary as f5, resolveWorkspace as f6, responses as f7, searchChunks as f8, selectFullContextDocument as f9, selectWorkspace as fa, selectWorkspaceById as fb, sessions as fc, settings as fd, signatureRequests as fe, sliceToSubagentThread as ff, streamSSE as fg, stripCitationMarkdown as fh, subagentJobLabel as fi, summarizeCitations as fj, tagUseCount as fk, tags as fl, tagsForScope as fm, tagsOfGroup as fn, topLevelAgentSteps as fo, uploadSkill as fp, usdToGbp as fq, work as fr, workflowSteps as fs, workflows as ft, workspaces as fu, wouldCreateTagCycle as fv, type ArbiErrorOptions as g, type ArbiHostSession as h, type ArbiOptions as i, ArbiSessionExpiredError as j, ArbiTransportError as k, ArbiWorkspaceChangedError as l, ArbiWorkspaceSupersededError as m, type AskHandlers as n, type AskRequest as o, type AttendeeRead as p, type AuthContext as q, type AuthHeaders as r, type AuthMode as s, type AuthenticatedClient as t, type BookingPage as u, type BookingPageWriteBody as v, type BookingRequestBody as w, type BridgeTokensOptions as x, type CalDavProfile as y, type CalendarAccount as z };
|
package/dist/browser.cjs
CHANGED
|
@@ -3660,10 +3660,19 @@ var STATUS_FALLBACKS = {
|
|
|
3660
3660
|
503: "The selected LLM is not responding. Please retry or select another model."
|
|
3661
3661
|
};
|
|
3662
3662
|
async function authenticatedFetch(options) {
|
|
3663
|
-
const {
|
|
3663
|
+
const {
|
|
3664
|
+
baseUrl,
|
|
3665
|
+
accessToken,
|
|
3666
|
+
path: path2,
|
|
3667
|
+
method,
|
|
3668
|
+
body,
|
|
3669
|
+
headers,
|
|
3670
|
+
signal,
|
|
3671
|
+
fetch: send = globalThis.fetch
|
|
3672
|
+
} = options;
|
|
3664
3673
|
let res;
|
|
3665
3674
|
try {
|
|
3666
|
-
res = await
|
|
3675
|
+
res = await send(`${baseUrl}${path2}`, {
|
|
3667
3676
|
method: method ?? (body ? "POST" : "GET"),
|
|
3668
3677
|
headers: {
|
|
3669
3678
|
Authorization: `Bearer ${accessToken}`,
|
|
@@ -3697,11 +3706,11 @@ function parseHeaders(raw) {
|
|
|
3697
3706
|
}
|
|
3698
3707
|
return headers;
|
|
3699
3708
|
}
|
|
3700
|
-
function progressFetch(onProgress) {
|
|
3709
|
+
function progressFetch(onProgress, transport) {
|
|
3701
3710
|
const Xhr = globalThis.XMLHttpRequest;
|
|
3702
|
-
|
|
3703
|
-
if (!Xhr) {
|
|
3704
|
-
const response = await fetch(request);
|
|
3711
|
+
const adapter = async (request) => {
|
|
3712
|
+
if (!Xhr || transport?.customFetch) {
|
|
3713
|
+
const response = await (transport?.customFetch ? transport.fetch : globalThis.fetch)(request);
|
|
3705
3714
|
const size = Number(request.headers.get("content-length") ?? 0);
|
|
3706
3715
|
onProgress(size, size);
|
|
3707
3716
|
return response;
|
|
@@ -3715,7 +3724,10 @@ function progressFetch(onProgress) {
|
|
|
3715
3724
|
xhr.upload.onprogress = (event) => {
|
|
3716
3725
|
if (event.lengthComputable) onProgress(event.loaded, event.total);
|
|
3717
3726
|
};
|
|
3727
|
+
const cleanup = () => request.signal.removeEventListener("abort", abort);
|
|
3728
|
+
const abort = () => xhr.abort();
|
|
3718
3729
|
xhr.onload = () => {
|
|
3730
|
+
cleanup();
|
|
3719
3731
|
onProgress(body.size, body.size);
|
|
3720
3732
|
resolve(
|
|
3721
3733
|
new Response(NULL_BODY_STATUSES.has(xhr.status) ? null : xhr.responseText, {
|
|
@@ -3725,12 +3737,30 @@ function progressFetch(onProgress) {
|
|
|
3725
3737
|
})
|
|
3726
3738
|
);
|
|
3727
3739
|
};
|
|
3728
|
-
xhr.onerror = () =>
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3740
|
+
xhr.onerror = () => {
|
|
3741
|
+
cleanup();
|
|
3742
|
+
reject(new TypeError("Network error during upload"));
|
|
3743
|
+
};
|
|
3744
|
+
xhr.onabort = () => {
|
|
3745
|
+
cleanup();
|
|
3746
|
+
reject(request.signal.reason ?? new DOMException("Upload aborted", "AbortError"));
|
|
3747
|
+
};
|
|
3748
|
+
if (request.signal.aborted) {
|
|
3749
|
+
reject(request.signal.reason ?? new DOMException("Upload aborted", "AbortError"));
|
|
3750
|
+
return;
|
|
3751
|
+
}
|
|
3752
|
+
request.signal.addEventListener("abort", abort, { once: true });
|
|
3753
|
+
try {
|
|
3754
|
+
xhr.send(body);
|
|
3755
|
+
} catch (error) {
|
|
3756
|
+
cleanup();
|
|
3757
|
+
reject(error);
|
|
3758
|
+
}
|
|
3732
3759
|
});
|
|
3733
3760
|
};
|
|
3761
|
+
if (transport?.customFetch) return adapter;
|
|
3762
|
+
const send = transport?.withFetch((input, init) => adapter(new Request(input, init)));
|
|
3763
|
+
return send ? (request) => send(request) : adapter;
|
|
3734
3764
|
}
|
|
3735
3765
|
var TOKEN_MAX_AGE_MS = 50 * 60 * 1e3;
|
|
3736
3766
|
function formatWorkspaceChoices(wsList) {
|
|
@@ -5208,7 +5238,7 @@ async function uploadDocuments(arbi, files, options = {}) {
|
|
|
5208
5238
|
}
|
|
5209
5239
|
const result = await arbi.fetch.POST("/v1/document/upload", {
|
|
5210
5240
|
params: { query: query2 },
|
|
5211
|
-
...options.onProgress ? { fetch: progressFetch(options.onProgress) } : {},
|
|
5241
|
+
...options.onProgress ? { fetch: progressFetch(options.onProgress, arbi.http) } : {},
|
|
5212
5242
|
// The schema types the files as strings; they go as multipart parts.
|
|
5213
5243
|
body: { files },
|
|
5214
5244
|
bodySerializer: () => {
|
|
@@ -6143,10 +6173,11 @@ function searchChunks(result) {
|
|
|
6143
6173
|
return Array.from(byId3.values()).sort((a2, b2) => b2.score - a2.score);
|
|
6144
6174
|
}
|
|
6145
6175
|
async function queryAssistant(options) {
|
|
6146
|
-
const { baseUrl, accessToken, signal, ...request } = options;
|
|
6176
|
+
const { baseUrl, accessToken, signal, fetch: fetch2, ...request } = options;
|
|
6147
6177
|
return authenticatedFetch({
|
|
6148
6178
|
baseUrl,
|
|
6149
6179
|
accessToken,
|
|
6180
|
+
fetch: fetch2,
|
|
6150
6181
|
path: "/v1/responses",
|
|
6151
6182
|
method: "POST",
|
|
6152
6183
|
body: JSON.stringify(buildTurnRequest(request)),
|
|
@@ -6201,7 +6232,7 @@ async function refusal(response) {
|
|
|
6201
6232
|
);
|
|
6202
6233
|
}
|
|
6203
6234
|
async function openTurnStream(auth, body, signal) {
|
|
6204
|
-
const response = await fetch(`${auth.baseUrl}/v1/responses`, {
|
|
6235
|
+
const response = await (auth.fetch ?? globalThis.fetch)(`${auth.baseUrl}/v1/responses`, {
|
|
6205
6236
|
method: "POST",
|
|
6206
6237
|
headers: { "Content-Type": "application/json", Authorization: `Bearer ${auth.accessToken}` },
|
|
6207
6238
|
body: JSON.stringify(body),
|
|
@@ -6219,7 +6250,7 @@ async function openTurnStream(auth, body, signal) {
|
|
|
6219
6250
|
return response;
|
|
6220
6251
|
}
|
|
6221
6252
|
async function openRunStream(auth, responseId, signal) {
|
|
6222
|
-
const response = await fetch(
|
|
6253
|
+
const response = await (auth.fetch ?? globalThis.fetch)(
|
|
6223
6254
|
`${auth.baseUrl}/v1/assistant/run/${encodeURIComponent(responseId)}/stream`,
|
|
6224
6255
|
{
|
|
6225
6256
|
method: "GET",
|
|
@@ -9181,6 +9212,7 @@ async function remindFact(arbi, factId, options = {}) {
|
|
|
9181
9212
|
var databases_exports = {};
|
|
9182
9213
|
__export(databases_exports, {
|
|
9183
9214
|
addDatabaseRows: () => addDatabaseRows,
|
|
9215
|
+
aggregateDatabase: () => aggregateDatabase,
|
|
9184
9216
|
createDatabase: () => createDatabase,
|
|
9185
9217
|
deleteDatabase: () => deleteDatabase,
|
|
9186
9218
|
deleteDatabaseRows: () => deleteDatabaseRows,
|
|
@@ -9216,6 +9248,15 @@ async function listDatabaseRows(arbi, databaseId, query2 = {}) {
|
|
|
9216
9248
|
"Failed to read the rows"
|
|
9217
9249
|
);
|
|
9218
9250
|
}
|
|
9251
|
+
async function aggregateDatabase(arbi, databaseId, body) {
|
|
9252
|
+
return requireData(
|
|
9253
|
+
await arbi.fetch.POST("/v1/databases/{database_id}/aggregate", {
|
|
9254
|
+
params: path(databaseId),
|
|
9255
|
+
body: { time_bucket: "month", limit: 50, ...body }
|
|
9256
|
+
}),
|
|
9257
|
+
"Failed to aggregate the database"
|
|
9258
|
+
);
|
|
9259
|
+
}
|
|
9219
9260
|
async function createDatabase(arbi, body) {
|
|
9220
9261
|
return requireData(
|
|
9221
9262
|
await arbi.fetch.POST("/v1/databases", { body }),
|
|
@@ -10604,6 +10645,10 @@ var Arbi = class {
|
|
|
10604
10645
|
options;
|
|
10605
10646
|
constructor(options) {
|
|
10606
10647
|
this.options = options;
|
|
10648
|
+
if (options.session && options.transport)
|
|
10649
|
+
throw new ArbiError(
|
|
10650
|
+
"Configure transport on the host session client, not on its Arbi wrapper."
|
|
10651
|
+
);
|
|
10607
10652
|
if (options.session) {
|
|
10608
10653
|
this.client = options.session.client;
|
|
10609
10654
|
this.loginResult = options.session.login;
|
|
@@ -10628,6 +10673,7 @@ var Arbi = class {
|
|
|
10628
10673
|
baseUrl: this.options.url,
|
|
10629
10674
|
deploymentDomain: domain,
|
|
10630
10675
|
credentials: this.options.credentials ?? "omit",
|
|
10676
|
+
transport: this.options.transport,
|
|
10631
10677
|
session: client.createSessionManager({ storage: this.options.sessionStorage }),
|
|
10632
10678
|
// A silent re-login rotates the server session key: keep ours in step, or the next
|
|
10633
10679
|
// workspace open would seal the key for a session the server no longer has.
|
|
@@ -10822,11 +10868,15 @@ var Arbi = class {
|
|
|
10822
10868
|
await this.targetWorkspace(workspaceId);
|
|
10823
10869
|
return createTag(this.requireClient(), { ...options, workspaceId });
|
|
10824
10870
|
}
|
|
10825
|
-
/**
|
|
10871
|
+
/**
|
|
10872
|
+
* The workspace a call acts on, captured when it is called: the one it names (opened for this session, not
|
|
10873
|
+
* switched to), else the current one. The request names it, so a switch while it is in flight cannot move it.
|
|
10874
|
+
* `undefined` only when no workspace is known here (the server's open one then applies, as before).
|
|
10875
|
+
*/
|
|
10826
10876
|
async targetWorkspace(workspaceId) {
|
|
10827
|
-
|
|
10828
|
-
await this.openWorkspace(
|
|
10829
|
-
return
|
|
10877
|
+
const target = workspaceId ?? this.currentWorkspaceId ?? void 0;
|
|
10878
|
+
if (target) await this.openWorkspace(target);
|
|
10879
|
+
return target;
|
|
10830
10880
|
}
|
|
10831
10881
|
/**
|
|
10832
10882
|
* Make a workspace the CURRENT one: decrypt its key, open it on the server (which makes it the
|
|
@@ -11056,7 +11106,8 @@ var Arbi = class {
|
|
|
11056
11106
|
}
|
|
11057
11107
|
return {
|
|
11058
11108
|
baseUrl: this.options.url,
|
|
11059
|
-
accessToken
|
|
11109
|
+
accessToken,
|
|
11110
|
+
...client.http ? { fetch: client.http.fetch } : {}
|
|
11060
11111
|
};
|
|
11061
11112
|
}
|
|
11062
11113
|
// ── Projects ──────────────────────────────────────────────────────────
|
|
@@ -11573,10 +11624,10 @@ var Arbi = class {
|
|
|
11573
11624
|
/** Authenticated native Word transport, with normal session recovery. */
|
|
11574
11625
|
editor = {
|
|
11575
11626
|
request: (path2, options = {}) => this.recovering(async () => {
|
|
11576
|
-
const { baseUrl, accessToken } = this.getAuthHeaders();
|
|
11627
|
+
const { baseUrl, accessToken, fetch: send = globalThis.fetch } = this.getAuthHeaders();
|
|
11577
11628
|
const headers = new Headers(options.headers);
|
|
11578
11629
|
headers.set("Authorization", `Bearer ${accessToken}`);
|
|
11579
|
-
const response = await
|
|
11630
|
+
const response = await send(`${baseUrl}/v1/editor${path2}`, { ...options, headers });
|
|
11580
11631
|
if (!response.ok) {
|
|
11581
11632
|
const body = await response.json().catch(() => null);
|
|
11582
11633
|
throw new ArbiApiError(body?.detail || `Document request failed (${response.status})`, {
|
|
@@ -11594,12 +11645,12 @@ var Arbi = class {
|
|
|
11594
11645
|
mail = {
|
|
11595
11646
|
/** Fetch a path under `/v1/mail`; rejects a non-2xx response with an `ArbiApiError` (`status`). */
|
|
11596
11647
|
fetch: (path2, init = {}) => this.recovering(async () => {
|
|
11597
|
-
const { baseUrl, accessToken } = this.getAuthHeaders();
|
|
11648
|
+
const { baseUrl, accessToken, fetch: send = globalThis.fetch } = this.getAuthHeaders();
|
|
11598
11649
|
const headers = new Headers(init.headers);
|
|
11599
11650
|
headers.set("Authorization", `Bearer ${accessToken}`);
|
|
11600
11651
|
if (init.body && !headers.has("Content-Type"))
|
|
11601
11652
|
headers.set("Content-Type", "application/json");
|
|
11602
|
-
const response = await
|
|
11653
|
+
const response = await send(`${baseUrl}/v1/mail${path2}`, { ...init, headers });
|
|
11603
11654
|
if (!response.ok) {
|
|
11604
11655
|
const body = await response.json().catch(() => null);
|
|
11605
11656
|
throw new ArbiApiError(
|
|
@@ -11795,8 +11846,8 @@ var Arbi = class {
|
|
|
11795
11846
|
*/
|
|
11796
11847
|
/** The open workspace's tags, or `query.workspaceId`'s (opened for this session, not switched to). */
|
|
11797
11848
|
list: async (query2) => {
|
|
11798
|
-
await this.targetWorkspace(query2?.workspaceId);
|
|
11799
|
-
return listTags(this.requireClient(), query2);
|
|
11849
|
+
const workspaceId = await this.targetWorkspace(query2?.workspaceId);
|
|
11850
|
+
return listTags(this.requireClient(), { ...query2, workspaceId });
|
|
11800
11851
|
},
|
|
11801
11852
|
create: (options) => this.createTagIn(options.workspaceId ?? this.requireWorkspace(), options),
|
|
11802
11853
|
delete: (tagId) => deleteTag(this.requireClient(), tagId),
|
|
@@ -12472,6 +12523,8 @@ var Arbi = class {
|
|
|
12472
12523
|
get: (databaseId) => getDatabase(this.requireClient(), databaseId),
|
|
12473
12524
|
/** A search of the rows (any cell), sorted and paged on the server. */
|
|
12474
12525
|
rows: (databaseId, query2) => listDatabaseRows(this.requireClient(), databaseId, query2),
|
|
12526
|
+
/** Group and measure the rows on the server (a chart's labels and series). */
|
|
12527
|
+
aggregate: (databaseId, body) => aggregateDatabase(this.requireClient(), databaseId, body),
|
|
12475
12528
|
create: (body) => createDatabase(this.requireClient(), body),
|
|
12476
12529
|
update: (databaseId, body) => updateDatabase(this.requireClient(), databaseId, body),
|
|
12477
12530
|
delete: (databaseId) => deleteDatabase(this.requireClient(), databaseId),
|