@arbidocs/sdk 0.4.147 → 0.4.148
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-DK6CvDoH.d.cts → browser-DtMlqla7.d.cts} +1684 -236
- package/dist/{browser-DK6CvDoH.d.ts → browser-DtMlqla7.d.ts} +1684 -236
- package/dist/browser.cjs +164 -54
- 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 +163 -54
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +164 -54
- 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 +163 -54
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, f as AgentStepEvent, g as
|
|
1
|
+
import { _ as ConfigStore, X as CliConfig, Y as CliCredentials, U as ChatSession, b$ as SkippedFile, cC as UploadResult, q as AuthHeaders, cx as UploadBatchResult, cB as UploadOptions, cy as UploadDirectOptions, cz as UploadDirectResult, bU as SUPPORTED_EXTENSIONS, aV as MailAttachment, N as ChatCryptoContext } from './browser-DtMlqla7.cjs';
|
|
2
|
+
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, f as AgentStepEvent, g as Arbi, h as ArbiApiError, i as ArbiError, k as ArbiHostSession, l as ArbiOptions, m as ArbiSessionExpiredError, n as ArtifactEvent, o as AttendeeRead, p as AuthContext, r as AuthMode, s as AuthenticatedClient, B as BookingConfirmation, t as BookingPage, u as BookingPageWriteBody, v as BookingRequestBody, w as BridgeTokensOptions, C as CalDavConnectBody, x as CalDavProfile, y as CalendarAccount, z as CalendarAccountKind, D as CalendarCreateBody, E as CalendarEvent, F as CalendarKeys, G as CalendarRead, H as CalendarSettings, I as CalendarSettingsBody, J as CalendarUpdate, K as CalendarWindow, L as ChatAttachmentFile, M as ChatAttachmentInput, O as ChatKeyRing, P as ChatKind, Q as ChatMemberKey, R as ChatMemberResponse, S as ChatMessageResponse, T as ChatResponse, V as CitationSummary, W as CitationToolSources, Z as CommandDescriptor, $ as ConnectOptions, a0 as ConnectorCatalogEntry, a1 as ConnectorFolder, a2 as ConnectorSyncProgress, a3 as ConnectorSyncStatus, a4 as ConnectorVendorKey, a5 as ConnectorVisibilitySettings, a6 as ConversationResponse, a7 as ConversationUsageResponse, aa as CreateWorkRequest, ab as CreateWorkflowRequest, ac as DEFAULT_AI_USD_PER_GBP, ad as DOC_TERMINAL_STATUSES, ae as DRIVE_SYNC_VENDORS, af as DateTimeSpec, ag as DecryptedChat, ah as DecryptedChatMessage, aj as DeploymentHouseTemplate, ak as DocNameMap, al as DocumentAutomationAction, am as DocumentListFields, an as DocumentListOrder, ao as DocumentSelector, ap as DocumentWaiter, aq as DocumentWaiterOptions, ar as DriveSyncProgress, as as DriveSyncSummary, at as EditScope, au as EventCreateBody, av as EventPatchBody, aw as FLAT_TAG_KINDS, aA as FindTimeParams, aB as FormattedWsMessage, aC as FreeBusyEntry, aD as GOOGLE_VENDORS, aE as HolidayCountry, aF as HouseTemplateCandidate, aG as IMANAGE_VENDORS, aH as IdentityErrorCode, aI as IdentityPurchase, aJ as IdentityState, aK as IdentityStatus, aL as ImportResult, aM as InvitationRead, aN as LinkedRun, aO as ListAllOptions, aP as ListEventsParams, aR as ListPaginatedOptions, aS as MAILBOX_SYNC_VENDORS, aT as MAX_RETRIEVE_DOC_IDS, aU as MICROSOFT_VENDORS, aW as MailDraftSSEEvent, aX as MessageLevel, aY as MessageMetadataPayload, aZ as MessageQueuedEvent, a_ as OAuthAccountKind, a$ as OutputTokensDetails, b0 as OverlayItem, b1 as OverlayLayerName, b2 as ParsedSlashCommand, b3 as PendingAuthResponse, b4 as PersonKey, b5 as PlanStepsError, b6 as PlanWorkRequest, b8 as ProductResponse, b9 as ProjectAddonKind, ba as ProjectAddonSettingsRequest, bb as ProjectBudget, bc as ProjectCheckoutRequest, bd as ProjectConversationUsageResponse, be as ProjectCreateOptions, bf as ProjectDetails, bg as ProjectEventKind, bh as ProjectEventResponse, bi as ProjectInvoicesResponse, bj as ProjectNextPeriodAddonsRequest, bk as ProjectPlanChangeRequest, bl as ProjectQuoteRequest, bm as ProjectResponse, bn as ProjectUpdateRequest, bo as ProjectUsageResponse, bp as PublicBookingError, bq as PublicBookingPage, br as QueryOptions, bs as RaisedSignal, bt as ReconnectOptions, bu as ReconnectableWsConnection, bv as ResolvedCitation, bw as ResolvedRecipient, bx as RespondParams, by as RespondPartstat, bz as ResponseCompletedEvent, bA as ResponseContentPartAddedEvent, bB as ResponseCreatedEvent, bC as ResponseFailedEvent, bD as ResponseOutputItemAddedEvent, bE as ResponseOutputItemDoneEvent, bF as ResponseOutputTextDeltaEvent, bG as ResponseOutputTextDoneEvent, bH as ResponseUsage, bI as RoomCreateBody, bJ as RoomQuery, bK as RoomRead, bL as RunProgress, bM as RunStep, bN as RunWaitingOn, bO as SHAREPOINT_VENDORS, bP as SSEEvent, bQ as SSEStreamCallbacks, bR as SSEStreamResult, bS as SSEStreamStartData, bT as STEP_FIELD_OPTION_TONES, bV as ScopedTarget, bW as SearchChunk, bX as SendBack, bY as ShareRead, bZ as ShareRole, b_ as SkillSummary, c0 as SlackConnectionStatus, c1 as StepActionRequest, c2 as StepActivityEvent, c3 as StepAssignee, c4 as StepField, c5 as StepFieldOption, c6 as StepFieldOptionTone, c7 as StepKind, c8 as StepPhase, c9 as StepSignal, ca as StepSignalWhen, cb as StepState, cc as StepStatus, cd as SubmitBackgroundQueryOptions, ce as SubscribeParams, cf as SyncTriggerResult, cg as TAG_KINDS, ch as TagChange, ci as TagFieldDefinition, cj as TagKind, ck as TagKindField, cl as TagKindSchema, cm as TagLinks, cn as TagListQuery, co as TagResponse, cp as TaskPlan, cq as TaskPlanStep, cr as TaxQuoteResponse, cs as TimeSuggestion, ct as TokenBudgetContext, cu as UpdateConversationRequest, cw as UpdateWorkflowRequest, cA as UploadDocumentsOptions, cD as UsageBreakdown, cE as UserConnectorEntry, cF as UserDailyUsageResponse, cG as UserInfo, cH as UserInputRequestEvent, cI as UserMessageEvent, cJ as WebSocketAuthError, cK as WeeklyHoursSpec, cL as WorkStatus, cM as WorkflowAuthMode, cN as WorkflowResponse, cO as WorkflowRunHistoryResponse, cP as WorkflowRunResponse, cQ as WorkspaceContext, cR as WsConnection, cS as account, cT as agentconfig, cU as agents, cV as assistant, cW as authenticatedFetch, cX as bookPublicSlot, cY as buildCitationChunkData, cZ as buildDocNameMap, c_ as buildFactsContextTool, c$ as buildRetrievalChunkTool, d0 as buildRetrievalFullContextTool, d1 as buildRetrievalTocTool, d2 as calendar, d3 as cancelPublicBooking, d4 as chats, d5 as connectErrorMessage, d6 as connectWebSocket, d7 as connectWithReconnect, d8 as connectors, d9 as consumeSSEStream, da as contacts, db as conversations, dc as countCitations, dd as createAuthenticatedClient, de as createDocumentWaiter, df as doctags, dg as documents, dh as facts, di as files, dj as filterSkills, dk as formatAgentStepLabel, dl as formatFileSize, dm as formatGbp, dn as formatGbpPerMillionTokens, dp as formatItemLabel, dq as formatStreamSummary, dr as formatUserName, ds as formatWorkspaceChoices, dt as formatWsMessage, du as generateEncryptedWorkspaceKey, dv as generateNewWorkspaceKey, dw as getErrorCode, dx as getErrorMessage, dy as getPublicBookingPage, dz as getRawWorkspaceKey, dA as health, dB as houseTemplates, dD as identityErrorCode, dC as identityVerification, dE as isConnectorVendorVisible, dF as isDriveSyncVendor, dG as isMailboxSyncVendor, dH as isSharePointVendor, dI as isSharedSkill, dJ as mail, dK as notifications, dL as parseSSEEvents, dM as parseSlashCommand, dN as parseSlashTokenInProgress, dO as performPasswordLogin, dP as performSigningKeyLogin, dQ as performSsoDeviceFlowLogin, dR as profile, dS as projects, dT as requireData, dU as requireOk, dV as resolveAuth, dW as resolveCitations, dX as resolveWorkspace, dY as responses, dZ as searchChunks, d_ as selectWorkspace, d$ as selectWorkspaceById, e0 as sessions, e1 as settings, e2 as signatureRequests, e3 as streamSSE, e4 as stripCitationMarkdown, e5 as summarizeCitations, e6 as tags, e7 as uploadSkill, e8 as usdToGbp, e9 as work, ea as workflowSteps, eb as workflows, ec as workspaces } from './browser-DtMlqla7.cjs';
|
|
3
3
|
import { SessionStorageProvider, ArbiClient, components } from '@arbidocs/client';
|
|
4
4
|
export { LoginProfile } from '@arbidocs/client';
|
|
5
5
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, f as AgentStepEvent, g as
|
|
1
|
+
import { _ as ConfigStore, X as CliConfig, Y as CliCredentials, U as ChatSession, b$ as SkippedFile, cC as UploadResult, q as AuthHeaders, cx as UploadBatchResult, cB as UploadOptions, cy as UploadDirectOptions, cz as UploadDirectResult, bU as SUPPORTED_EXTENSIONS, aV as MailAttachment, N as ChatCryptoContext } from './browser-DtMlqla7.js';
|
|
2
|
+
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, f as AgentStepEvent, g as Arbi, h as ArbiApiError, i as ArbiError, k as ArbiHostSession, l as ArbiOptions, m as ArbiSessionExpiredError, n as ArtifactEvent, o as AttendeeRead, p as AuthContext, r as AuthMode, s as AuthenticatedClient, B as BookingConfirmation, t as BookingPage, u as BookingPageWriteBody, v as BookingRequestBody, w as BridgeTokensOptions, C as CalDavConnectBody, x as CalDavProfile, y as CalendarAccount, z as CalendarAccountKind, D as CalendarCreateBody, E as CalendarEvent, F as CalendarKeys, G as CalendarRead, H as CalendarSettings, I as CalendarSettingsBody, J as CalendarUpdate, K as CalendarWindow, L as ChatAttachmentFile, M as ChatAttachmentInput, O as ChatKeyRing, P as ChatKind, Q as ChatMemberKey, R as ChatMemberResponse, S as ChatMessageResponse, T as ChatResponse, V as CitationSummary, W as CitationToolSources, Z as CommandDescriptor, $ as ConnectOptions, a0 as ConnectorCatalogEntry, a1 as ConnectorFolder, a2 as ConnectorSyncProgress, a3 as ConnectorSyncStatus, a4 as ConnectorVendorKey, a5 as ConnectorVisibilitySettings, a6 as ConversationResponse, a7 as ConversationUsageResponse, aa as CreateWorkRequest, ab as CreateWorkflowRequest, ac as DEFAULT_AI_USD_PER_GBP, ad as DOC_TERMINAL_STATUSES, ae as DRIVE_SYNC_VENDORS, af as DateTimeSpec, ag as DecryptedChat, ah as DecryptedChatMessage, aj as DeploymentHouseTemplate, ak as DocNameMap, al as DocumentAutomationAction, am as DocumentListFields, an as DocumentListOrder, ao as DocumentSelector, ap as DocumentWaiter, aq as DocumentWaiterOptions, ar as DriveSyncProgress, as as DriveSyncSummary, at as EditScope, au as EventCreateBody, av as EventPatchBody, aw as FLAT_TAG_KINDS, aA as FindTimeParams, aB as FormattedWsMessage, aC as FreeBusyEntry, aD as GOOGLE_VENDORS, aE as HolidayCountry, aF as HouseTemplateCandidate, aG as IMANAGE_VENDORS, aH as IdentityErrorCode, aI as IdentityPurchase, aJ as IdentityState, aK as IdentityStatus, aL as ImportResult, aM as InvitationRead, aN as LinkedRun, aO as ListAllOptions, aP as ListEventsParams, aR as ListPaginatedOptions, aS as MAILBOX_SYNC_VENDORS, aT as MAX_RETRIEVE_DOC_IDS, aU as MICROSOFT_VENDORS, aW as MailDraftSSEEvent, aX as MessageLevel, aY as MessageMetadataPayload, aZ as MessageQueuedEvent, a_ as OAuthAccountKind, a$ as OutputTokensDetails, b0 as OverlayItem, b1 as OverlayLayerName, b2 as ParsedSlashCommand, b3 as PendingAuthResponse, b4 as PersonKey, b5 as PlanStepsError, b6 as PlanWorkRequest, b8 as ProductResponse, b9 as ProjectAddonKind, ba as ProjectAddonSettingsRequest, bb as ProjectBudget, bc as ProjectCheckoutRequest, bd as ProjectConversationUsageResponse, be as ProjectCreateOptions, bf as ProjectDetails, bg as ProjectEventKind, bh as ProjectEventResponse, bi as ProjectInvoicesResponse, bj as ProjectNextPeriodAddonsRequest, bk as ProjectPlanChangeRequest, bl as ProjectQuoteRequest, bm as ProjectResponse, bn as ProjectUpdateRequest, bo as ProjectUsageResponse, bp as PublicBookingError, bq as PublicBookingPage, br as QueryOptions, bs as RaisedSignal, bt as ReconnectOptions, bu as ReconnectableWsConnection, bv as ResolvedCitation, bw as ResolvedRecipient, bx as RespondParams, by as RespondPartstat, bz as ResponseCompletedEvent, bA as ResponseContentPartAddedEvent, bB as ResponseCreatedEvent, bC as ResponseFailedEvent, bD as ResponseOutputItemAddedEvent, bE as ResponseOutputItemDoneEvent, bF as ResponseOutputTextDeltaEvent, bG as ResponseOutputTextDoneEvent, bH as ResponseUsage, bI as RoomCreateBody, bJ as RoomQuery, bK as RoomRead, bL as RunProgress, bM as RunStep, bN as RunWaitingOn, bO as SHAREPOINT_VENDORS, bP as SSEEvent, bQ as SSEStreamCallbacks, bR as SSEStreamResult, bS as SSEStreamStartData, bT as STEP_FIELD_OPTION_TONES, bV as ScopedTarget, bW as SearchChunk, bX as SendBack, bY as ShareRead, bZ as ShareRole, b_ as SkillSummary, c0 as SlackConnectionStatus, c1 as StepActionRequest, c2 as StepActivityEvent, c3 as StepAssignee, c4 as StepField, c5 as StepFieldOption, c6 as StepFieldOptionTone, c7 as StepKind, c8 as StepPhase, c9 as StepSignal, ca as StepSignalWhen, cb as StepState, cc as StepStatus, cd as SubmitBackgroundQueryOptions, ce as SubscribeParams, cf as SyncTriggerResult, cg as TAG_KINDS, ch as TagChange, ci as TagFieldDefinition, cj as TagKind, ck as TagKindField, cl as TagKindSchema, cm as TagLinks, cn as TagListQuery, co as TagResponse, cp as TaskPlan, cq as TaskPlanStep, cr as TaxQuoteResponse, cs as TimeSuggestion, ct as TokenBudgetContext, cu as UpdateConversationRequest, cw as UpdateWorkflowRequest, cA as UploadDocumentsOptions, cD as UsageBreakdown, cE as UserConnectorEntry, cF as UserDailyUsageResponse, cG as UserInfo, cH as UserInputRequestEvent, cI as UserMessageEvent, cJ as WebSocketAuthError, cK as WeeklyHoursSpec, cL as WorkStatus, cM as WorkflowAuthMode, cN as WorkflowResponse, cO as WorkflowRunHistoryResponse, cP as WorkflowRunResponse, cQ as WorkspaceContext, cR as WsConnection, cS as account, cT as agentconfig, cU as agents, cV as assistant, cW as authenticatedFetch, cX as bookPublicSlot, cY as buildCitationChunkData, cZ as buildDocNameMap, c_ as buildFactsContextTool, c$ as buildRetrievalChunkTool, d0 as buildRetrievalFullContextTool, d1 as buildRetrievalTocTool, d2 as calendar, d3 as cancelPublicBooking, d4 as chats, d5 as connectErrorMessage, d6 as connectWebSocket, d7 as connectWithReconnect, d8 as connectors, d9 as consumeSSEStream, da as contacts, db as conversations, dc as countCitations, dd as createAuthenticatedClient, de as createDocumentWaiter, df as doctags, dg as documents, dh as facts, di as files, dj as filterSkills, dk as formatAgentStepLabel, dl as formatFileSize, dm as formatGbp, dn as formatGbpPerMillionTokens, dp as formatItemLabel, dq as formatStreamSummary, dr as formatUserName, ds as formatWorkspaceChoices, dt as formatWsMessage, du as generateEncryptedWorkspaceKey, dv as generateNewWorkspaceKey, dw as getErrorCode, dx as getErrorMessage, dy as getPublicBookingPage, dz as getRawWorkspaceKey, dA as health, dB as houseTemplates, dD as identityErrorCode, dC as identityVerification, dE as isConnectorVendorVisible, dF as isDriveSyncVendor, dG as isMailboxSyncVendor, dH as isSharePointVendor, dI as isSharedSkill, dJ as mail, dK as notifications, dL as parseSSEEvents, dM as parseSlashCommand, dN as parseSlashTokenInProgress, dO as performPasswordLogin, dP as performSigningKeyLogin, dQ as performSsoDeviceFlowLogin, dR as profile, dS as projects, dT as requireData, dU as requireOk, dV as resolveAuth, dW as resolveCitations, dX as resolveWorkspace, dY as responses, dZ as searchChunks, d_ as selectWorkspace, d$ as selectWorkspaceById, e0 as sessions, e1 as settings, e2 as signatureRequests, e3 as streamSSE, e4 as stripCitationMarkdown, e5 as summarizeCitations, e6 as tags, e7 as uploadSkill, e8 as usdToGbp, e9 as work, ea as workflowSteps, eb as workflows, ec as workspaces } from './browser-DtMlqla7.js';
|
|
3
3
|
import { SessionStorageProvider, ArbiClient, components } from '@arbidocs/client';
|
|
4
4
|
export { LoginProfile } from '@arbidocs/client';
|
|
5
5
|
|
package/dist/index.js
CHANGED
|
@@ -5732,6 +5732,7 @@ async function updateConversationAssistantMode(arbi, conversationId, assistantMo
|
|
|
5732
5732
|
// src/operations/assistant.ts
|
|
5733
5733
|
var assistant_exports = {};
|
|
5734
5734
|
__export(assistant_exports, {
|
|
5735
|
+
MAX_RETRIEVE_DOC_IDS: () => MAX_RETRIEVE_DOC_IDS,
|
|
5735
5736
|
buildFactsContextTool: () => buildFactsContextTool,
|
|
5736
5737
|
buildRetrievalChunkTool: () => buildRetrievalChunkTool,
|
|
5737
5738
|
buildRetrievalFullContextTool: () => buildRetrievalFullContextTool,
|
|
@@ -5746,6 +5747,7 @@ __export(assistant_exports, {
|
|
|
5746
5747
|
queryAssistant: () => queryAssistant,
|
|
5747
5748
|
respondToAgent: () => respondToAgent,
|
|
5748
5749
|
retrieve: () => retrieve,
|
|
5750
|
+
searchChunks: () => searchChunks,
|
|
5749
5751
|
uploadSkill: () => uploadSkill
|
|
5750
5752
|
});
|
|
5751
5753
|
function buildRetrievalChunkTool(docIds, searchMode) {
|
|
@@ -5779,8 +5781,19 @@ function buildRetrievalTocTool(docIds) {
|
|
|
5779
5781
|
tool_responses: {}
|
|
5780
5782
|
};
|
|
5781
5783
|
}
|
|
5784
|
+
var MAX_RETRIEVE_DOC_IDS = 5e3;
|
|
5782
5785
|
async function retrieve(options) {
|
|
5783
|
-
const {
|
|
5786
|
+
const {
|
|
5787
|
+
arbi,
|
|
5788
|
+
workspaceId,
|
|
5789
|
+
query,
|
|
5790
|
+
docIds,
|
|
5791
|
+
searchMode,
|
|
5792
|
+
fullContextDocIds,
|
|
5793
|
+
tocDocIds,
|
|
5794
|
+
model,
|
|
5795
|
+
store = true
|
|
5796
|
+
} = options;
|
|
5784
5797
|
const tools = {
|
|
5785
5798
|
retrieval_chunk: buildRetrievalChunkTool(docIds, searchMode)
|
|
5786
5799
|
};
|
|
@@ -5795,7 +5808,7 @@ async function retrieve(options) {
|
|
|
5795
5808
|
workspace_ext_id: workspaceId,
|
|
5796
5809
|
stream: false,
|
|
5797
5810
|
background: false,
|
|
5798
|
-
store
|
|
5811
|
+
store,
|
|
5799
5812
|
tools,
|
|
5800
5813
|
...model ? { model } : {}
|
|
5801
5814
|
};
|
|
@@ -5815,6 +5828,34 @@ async function retrieve(options) {
|
|
|
5815
5828
|
}
|
|
5816
5829
|
return data;
|
|
5817
5830
|
}
|
|
5831
|
+
function isReadablePassage(content) {
|
|
5832
|
+
return content.length > 10 && content !== "-" && !/^[|\-\s]+$/.test(content);
|
|
5833
|
+
}
|
|
5834
|
+
function searchChunks(result) {
|
|
5835
|
+
const byId3 = /* @__PURE__ */ new Map();
|
|
5836
|
+
for (const [title, chunks] of Object.entries(result?.retrieval_chunk?.tool_responses ?? {})) {
|
|
5837
|
+
if (!Array.isArray(chunks)) continue;
|
|
5838
|
+
chunks.forEach((chunk2, index) => {
|
|
5839
|
+
if (!chunk2 || typeof chunk2 !== "object") return;
|
|
5840
|
+
const content = chunk2.content?.trim() ?? "";
|
|
5841
|
+
if (!isReadablePassage(content)) return;
|
|
5842
|
+
const meta = chunk2.metadata ?? {};
|
|
5843
|
+
const docId = meta.doc_ext_id || title;
|
|
5844
|
+
const rerank = meta.rerank_score;
|
|
5845
|
+
byId3.set(meta.chunk_ext_id || `${docId}_${index}`, {
|
|
5846
|
+
id: meta.chunk_ext_id || `${docId}_${index}`,
|
|
5847
|
+
...meta.chunk_ext_id ? { chunkExtId: meta.chunk_ext_id } : {},
|
|
5848
|
+
docId,
|
|
5849
|
+
docTitle: meta.doc_title || title,
|
|
5850
|
+
...meta.page_number != null ? { page: meta.page_number } : {},
|
|
5851
|
+
score: rerank && rerank > 0 ? rerank : meta.score ?? 0,
|
|
5852
|
+
index,
|
|
5853
|
+
content
|
|
5854
|
+
});
|
|
5855
|
+
});
|
|
5856
|
+
}
|
|
5857
|
+
return Array.from(byId3.values()).sort((a2, b2) => b2.score - a2.score);
|
|
5858
|
+
}
|
|
5818
5859
|
async function queryAssistant(options) {
|
|
5819
5860
|
const {
|
|
5820
5861
|
workspaceId,
|
|
@@ -7506,6 +7547,11 @@ async function remove(arbi) {
|
|
|
7506
7547
|
// src/operations/projects.ts
|
|
7507
7548
|
var projects_exports = {};
|
|
7508
7549
|
__export(projects_exports, {
|
|
7550
|
+
addAddonBlock: () => addAddonBlock,
|
|
7551
|
+
billingPortal: () => billingPortal,
|
|
7552
|
+
cancelSubscription: () => cancelSubscription,
|
|
7553
|
+
changePlan: () => changePlan,
|
|
7554
|
+
createCheckout: () => createCheckout,
|
|
7509
7555
|
createProject: () => createProject,
|
|
7510
7556
|
deleteProject: () => deleteProject,
|
|
7511
7557
|
formatBudget: () => formatBudget,
|
|
@@ -7513,11 +7559,17 @@ __export(projects_exports, {
|
|
|
7513
7559
|
getProjectInvoices: () => getProjectInvoices,
|
|
7514
7560
|
getProjectUsage: () => getProjectUsage,
|
|
7515
7561
|
getUserUsageToday: () => getUserUsageToday,
|
|
7562
|
+
listProducts: () => listProducts,
|
|
7516
7563
|
listProjectEvents: () => listProjectEvents,
|
|
7517
7564
|
listProjects: () => listProjects,
|
|
7518
7565
|
parseBudget: () => parseBudget,
|
|
7566
|
+
previewPlanChange: () => previewPlanChange,
|
|
7567
|
+
quoteAddon: () => quoteAddon,
|
|
7568
|
+
quotePlan: () => quotePlan,
|
|
7519
7569
|
refreshProject: () => refreshProject,
|
|
7520
7570
|
renameProject: () => renameProject,
|
|
7571
|
+
setNextPeriodAddons: () => setNextPeriodAddons,
|
|
7572
|
+
updateAddonSettings: () => updateAddonSettings,
|
|
7521
7573
|
updateProject: () => updateProject
|
|
7522
7574
|
});
|
|
7523
7575
|
async function listProjects(arbi, filters = {}) {
|
|
@@ -7640,6 +7692,95 @@ async function getProjectInvoices(arbi, projectExtId) {
|
|
|
7640
7692
|
async function getUserUsageToday(arbi) {
|
|
7641
7693
|
return requireData(await arbi.fetch.GET("/v1/user/me/usage/today"), "Failed to fetch today usage");
|
|
7642
7694
|
}
|
|
7695
|
+
var projectPath = (projectExtId) => ({ path: { project_ext_id: projectExtId } });
|
|
7696
|
+
async function listProducts(arbi) {
|
|
7697
|
+
return requireData(await arbi.fetch.GET("/v1/user/products"), "Failed to load the plans");
|
|
7698
|
+
}
|
|
7699
|
+
async function quotePlan(arbi, projectExtId, body) {
|
|
7700
|
+
return requireData(
|
|
7701
|
+
projectExtId ? await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/checkout/quote", {
|
|
7702
|
+
params: projectPath(projectExtId),
|
|
7703
|
+
body
|
|
7704
|
+
}) : await arbi.fetch.POST("/v1/user/projects/quote", { body }),
|
|
7705
|
+
"Failed to price the plan"
|
|
7706
|
+
);
|
|
7707
|
+
}
|
|
7708
|
+
async function createCheckout(arbi, projectExtId, body) {
|
|
7709
|
+
return requireData(
|
|
7710
|
+
await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/checkout", {
|
|
7711
|
+
params: projectPath(projectExtId),
|
|
7712
|
+
body
|
|
7713
|
+
}),
|
|
7714
|
+
"Failed to start the checkout"
|
|
7715
|
+
);
|
|
7716
|
+
}
|
|
7717
|
+
async function changePlan(arbi, projectExtId, body) {
|
|
7718
|
+
return requireData(
|
|
7719
|
+
await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/change-plan", {
|
|
7720
|
+
params: projectPath(projectExtId),
|
|
7721
|
+
body
|
|
7722
|
+
}),
|
|
7723
|
+
"Failed to change the plan"
|
|
7724
|
+
);
|
|
7725
|
+
}
|
|
7726
|
+
async function previewPlanChange(arbi, projectExtId, body) {
|
|
7727
|
+
return requireData(
|
|
7728
|
+
await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/plan/preview", {
|
|
7729
|
+
params: projectPath(projectExtId),
|
|
7730
|
+
body
|
|
7731
|
+
}),
|
|
7732
|
+
"Failed to price the plan change"
|
|
7733
|
+
);
|
|
7734
|
+
}
|
|
7735
|
+
async function quoteAddon(arbi, projectExtId, kind) {
|
|
7736
|
+
return requireData(
|
|
7737
|
+
await arbi.fetch.GET("/v1/user/projects/{project_ext_id}/addons/quote", {
|
|
7738
|
+
params: { ...projectPath(projectExtId), query: { kind } }
|
|
7739
|
+
}),
|
|
7740
|
+
"Failed to price the add-on"
|
|
7741
|
+
);
|
|
7742
|
+
}
|
|
7743
|
+
async function billingPortal(arbi, projectExtId) {
|
|
7744
|
+
return requireData(
|
|
7745
|
+
await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/billing-portal", {
|
|
7746
|
+
params: projectPath(projectExtId)
|
|
7747
|
+
}),
|
|
7748
|
+
"Failed to open the billing portal"
|
|
7749
|
+
);
|
|
7750
|
+
}
|
|
7751
|
+
async function addAddonBlock(arbi, projectExtId, kind) {
|
|
7752
|
+
const params = projectPath(projectExtId);
|
|
7753
|
+
return requireData(
|
|
7754
|
+
kind === "ai_usage" ? await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/addons/ai-usage", { params }) : await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/addons/storage", { params }),
|
|
7755
|
+
"Failed to add the add-on"
|
|
7756
|
+
);
|
|
7757
|
+
}
|
|
7758
|
+
async function setNextPeriodAddons(arbi, projectExtId, body) {
|
|
7759
|
+
return requireData(
|
|
7760
|
+
await arbi.fetch.PUT("/v1/user/projects/{project_ext_id}/addons/next-period", {
|
|
7761
|
+
params: projectPath(projectExtId),
|
|
7762
|
+
body
|
|
7763
|
+
}),
|
|
7764
|
+
"Failed to change the add-ons"
|
|
7765
|
+
);
|
|
7766
|
+
}
|
|
7767
|
+
async function updateAddonSettings(arbi, projectExtId, body) {
|
|
7768
|
+
return requireData(
|
|
7769
|
+
await arbi.fetch.PUT("/v1/user/projects/{project_ext_id}/addons/settings", {
|
|
7770
|
+
params: projectPath(projectExtId),
|
|
7771
|
+
body
|
|
7772
|
+
}),
|
|
7773
|
+
"Failed to save the add-on settings"
|
|
7774
|
+
);
|
|
7775
|
+
}
|
|
7776
|
+
async function cancelSubscription(arbi, projectExtId) {
|
|
7777
|
+
return requireData(
|
|
7778
|
+
await arbi.fetch.POST("/v1/user/projects/{project_ext_id}/cancel", {
|
|
7779
|
+
params: projectPath(projectExtId)
|
|
7780
|
+
}),
|
|
7781
|
+
"Failed to cancel the subscription"
|
|
7782
|
+
);
|
|
7783
|
+
}
|
|
7643
7784
|
|
|
7644
7785
|
// src/operations/work.ts
|
|
7645
7786
|
var work_exports = {};
|
|
@@ -8731,10 +8872,8 @@ __export(calendar_exports, {
|
|
|
8731
8872
|
cancelPublicBooking: () => cancelPublicBooking,
|
|
8732
8873
|
connectCalDavAccount: () => connectCalDavAccount,
|
|
8733
8874
|
connectOAuthAccount: () => connectOAuthAccount,
|
|
8734
|
-
createAppPassword: () => createAppPassword,
|
|
8735
8875
|
createCalendar: () => createCalendar,
|
|
8736
8876
|
createEvent: () => createEvent,
|
|
8737
|
-
createFeed: () => createFeed,
|
|
8738
8877
|
createRoom: () => createRoom,
|
|
8739
8878
|
decideCounter: () => decideCounter,
|
|
8740
8879
|
deleteBookingPage: () => deleteBookingPage,
|
|
@@ -8751,7 +8890,6 @@ __export(calendar_exports, {
|
|
|
8751
8890
|
getPublicBookingPage: () => getPublicBookingPage,
|
|
8752
8891
|
importCalendarIcs: () => importCalendarIcs,
|
|
8753
8892
|
listAccounts: () => listAccounts,
|
|
8754
|
-
listAppPasswords: () => listAppPasswords,
|
|
8755
8893
|
listBookingPages: () => listBookingPages,
|
|
8756
8894
|
listCalDavProfiles: () => listCalDavProfiles,
|
|
8757
8895
|
listCalendars: () => listCalendars,
|
|
@@ -8769,9 +8907,7 @@ __export(calendar_exports, {
|
|
|
8769
8907
|
putCalendarSettings: () => putCalendarSettings,
|
|
8770
8908
|
refreshCalendar: () => refreshCalendar,
|
|
8771
8909
|
respondToEvent: () => respondToEvent,
|
|
8772
|
-
revokeAppPassword: () => revokeAppPassword,
|
|
8773
8910
|
shareCalendar: () => shareCalendar,
|
|
8774
|
-
splitAppPasswords: () => splitAppPasswords,
|
|
8775
8911
|
subscribeCalendar: () => subscribeCalendar,
|
|
8776
8912
|
syncAccount: () => syncAccount,
|
|
8777
8913
|
unlockCalendarKeys: () => unlockCalendarKeys,
|
|
@@ -9159,46 +9295,6 @@ async function publishCalendarToAccount(client, accId, calendarId) {
|
|
|
9159
9295
|
"Publishing the calendar"
|
|
9160
9296
|
);
|
|
9161
9297
|
}
|
|
9162
|
-
async function listAppPasswords(client) {
|
|
9163
|
-
return take(await client.fetch.GET("/v1/calendar/app-passwords"), "Loading app passwords");
|
|
9164
|
-
}
|
|
9165
|
-
async function createAppPassword(client, body) {
|
|
9166
|
-
return take(
|
|
9167
|
-
await client.fetch.POST("/v1/calendar/app-passwords", {
|
|
9168
|
-
body: {
|
|
9169
|
-
label: body.label.trim(),
|
|
9170
|
-
calendar_ids: body.calendar_ids?.length ? body.calendar_ids : null
|
|
9171
|
-
}
|
|
9172
|
-
}),
|
|
9173
|
-
"Creating the app password"
|
|
9174
|
-
);
|
|
9175
|
-
}
|
|
9176
|
-
async function createFeed(client, body) {
|
|
9177
|
-
return take(
|
|
9178
|
-
await client.fetch.POST("/v1/calendar/feeds", {
|
|
9179
|
-
body: {
|
|
9180
|
-
calendar_id: body.calendar_id,
|
|
9181
|
-
level: body.level,
|
|
9182
|
-
label: body.label?.trim() || (body.level === "full" ? "Feed" : "Free/busy feed")
|
|
9183
|
-
}
|
|
9184
|
-
}),
|
|
9185
|
-
"Creating the feed"
|
|
9186
|
-
);
|
|
9187
|
-
}
|
|
9188
|
-
async function revokeAppPassword(client, apwId) {
|
|
9189
|
-
take(
|
|
9190
|
-
await client.fetch.DELETE("/v1/calendar/app-passwords/{apw_id}", {
|
|
9191
|
-
params: { path: { apw_id: apwId } }
|
|
9192
|
-
}),
|
|
9193
|
-
"Revoking"
|
|
9194
|
-
);
|
|
9195
|
-
}
|
|
9196
|
-
function splitAppPasswords(rows) {
|
|
9197
|
-
return {
|
|
9198
|
-
devices: rows.filter((r2) => r2.kind === "dav"),
|
|
9199
|
-
feeds: rows.filter((r2) => r2.kind === "feed" || r2.kind === "freebusy")
|
|
9200
|
-
};
|
|
9201
|
-
}
|
|
9202
9298
|
async function listBookingPages(client) {
|
|
9203
9299
|
return take(await client.fetch.GET("/v1/calendar/booking-pages"), "Loading booking pages");
|
|
9204
9300
|
}
|
|
@@ -9567,7 +9663,23 @@ var Arbi = class {
|
|
|
9567
9663
|
/** AI usage + spend breakdown for a project's billing period. */
|
|
9568
9664
|
usage: (projectExtId, monthsBack) => getProjectUsage(this.requireClient(), projectExtId, monthsBack),
|
|
9569
9665
|
/** Stripe invoices for a project's subscription. */
|
|
9570
|
-
invoices: (projectExtId) => getProjectInvoices(this.requireClient(), projectExtId)
|
|
9666
|
+
invoices: (projectExtId) => getProjectInvoices(this.requireClient(), projectExtId),
|
|
9667
|
+
/** Delete a project (only when empty: no workspaces, no subscription). */
|
|
9668
|
+
delete: (projectExtId) => deleteProject(this.requireClient(), projectExtId),
|
|
9669
|
+
/** The plans and add-ons on sale. */
|
|
9670
|
+
products: () => listProducts(this.requireClient()),
|
|
9671
|
+
/** The taxed total of a Pro purchase (a new project when `projectExtId` is null). */
|
|
9672
|
+
quotePlan: (projectExtId, body) => quotePlan(this.requireClient(), projectExtId, body),
|
|
9673
|
+
/** Start an embedded Stripe checkout; returns its `client_secret`. */
|
|
9674
|
+
checkout: (projectExtId, body) => createCheckout(this.requireClient(), projectExtId, body),
|
|
9675
|
+
changePlan: (projectExtId, body) => changePlan(this.requireClient(), projectExtId, body),
|
|
9676
|
+
previewPlanChange: (projectExtId, body) => previewPlanChange(this.requireClient(), projectExtId, body),
|
|
9677
|
+
quoteAddon: (projectExtId, kind) => quoteAddon(this.requireClient(), projectExtId, kind),
|
|
9678
|
+
billingPortal: (projectExtId) => billingPortal(this.requireClient(), projectExtId),
|
|
9679
|
+
addAddonBlock: (projectExtId, kind) => addAddonBlock(this.requireClient(), projectExtId, kind),
|
|
9680
|
+
setNextPeriodAddons: (projectExtId, body) => setNextPeriodAddons(this.requireClient(), projectExtId, body),
|
|
9681
|
+
updateAddonSettings: (projectExtId, body) => updateAddonSettings(this.requireClient(), projectExtId, body),
|
|
9682
|
+
cancelSubscription: (projectExtId) => cancelSubscription(this.requireClient(), projectExtId)
|
|
9571
9683
|
};
|
|
9572
9684
|
// ── User (account-scoped usage) ───────────────────────────────────────
|
|
9573
9685
|
user = {
|
|
@@ -10059,7 +10171,8 @@ var Arbi = class {
|
|
|
10059
10171
|
/** The skills the caller can run (own + shared marketplace), metadata only. */
|
|
10060
10172
|
listSkills: (options) => listSkills(this.requireClient(), options),
|
|
10061
10173
|
/**
|
|
10062
|
-
* Search documents without LLM generation (retrieval only).
|
|
10174
|
+
* Search documents without LLM generation (retrieval only). No `docIds` searches the whole
|
|
10175
|
+
* workspace; `searchChunks(result)` ranks the passages found.
|
|
10063
10176
|
*/
|
|
10064
10177
|
retrieve: (query, docIds, options) => retrieve({
|
|
10065
10178
|
arbi: this.requireClient(),
|
|
@@ -10189,10 +10302,6 @@ var Arbi = class {
|
|
|
10189
10302
|
syncAccount: (accId) => this.withCalendarKeys((c2) => syncAccount(c2, accId)),
|
|
10190
10303
|
disconnectAccount: (accId) => this.withCalendarKeys((c2) => disconnectAccount(c2, accId)),
|
|
10191
10304
|
publishToAccount: (accId, calendarId) => this.withCalendarKeys((c2) => publishCalendarToAccount(c2, accId, calendarId)),
|
|
10192
|
-
listAppPasswords: () => this.withCalendarKeys((c2) => listAppPasswords(c2)),
|
|
10193
|
-
createAppPassword: (body) => this.withCalendarKeys((c2) => createAppPassword(c2, body)),
|
|
10194
|
-
createFeed: (body) => this.withCalendarKeys((c2) => createFeed(c2, body)),
|
|
10195
|
-
revokeAppPassword: (apwId) => this.withCalendarKeys((c2) => revokeAppPassword(c2, apwId)),
|
|
10196
10305
|
listBookingPages: () => this.withCalendarKeys((c2) => listBookingPages(c2)),
|
|
10197
10306
|
putBookingPage: (body) => this.withCalendarKeys((c2) => putBookingPage(c2, body)),
|
|
10198
10307
|
deleteBookingPage: (slug) => this.withCalendarKeys((c2) => deleteBookingPage(c2, slug))
|
|
@@ -11580,6 +11689,6 @@ async function startDmListener(options) {
|
|
|
11580
11689
|
};
|
|
11581
11690
|
}
|
|
11582
11691
|
|
|
11583
|
-
export { ACCOUNT_VENDOR, Arbi, ArbiApiError, ArbiError, ArbiSessionExpiredError, ClaudeOrchestrator, DEFAULT_AI_USD_PER_GBP, DOC_TERMINAL_STATUSES, DRIVE_SYNC_VENDORS, FLAT_TAG_KINDS, FileConfigStore, GOOGLE_VENDORS, IMANAGE_VENDORS, MAILBOX_SYNC_VENDORS, MICROSOFT_VENDORS, OpenClawOrchestrator, PlanStepsError, PublicBookingError, SHAREPOINT_VENDORS, STEP_FIELD_OPTION_TONES, TAG_KINDS, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, agents_exports as agents, assistant_exports as assistant, authenticatedFetch, bookPublicSlot, buildCitationChunkData, buildDocNameMap, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, calendar_exports as calendar, cancelPublicBooking, chats_exports as chats, connectErrorMessage, connectWebSocket, connectWithReconnect, connectors_exports as connectors, consumeSSEStream, contacts_exports as contacts, conversations_exports as conversations, countCitations, createAuthenticatedClient, createDocumentWaiter, device_flow_exports as deviceFlow, doctags_exports as doctags, documents_exports as documents, documents_node_exports as documentsNode, facts_exports as facts, files_exports as files, filterSkills, firm_exports as firm, formatAgentStepLabel, formatFileSize, formatGbp, formatGbpPerMillionTokens, formatItemLabel, formatStreamSummary, formatUserName, formatWorkspaceChoices, formatWsMessage, generateEncryptedWorkspaceKey, generateNewWorkspaceKey, getErrorCode, getErrorMessage, getPublicBookingPage, getRawWorkspaceKey, health_exports as health, house_template_exports as houseTemplates, identityErrorCode, identity_exports as identityVerification, isConnectorVendorVisible, isDriveSyncVendor, isMailboxSyncVendor, isSharePointVendor, isSharedSkill, listen_exports as listen, mail_exports as mail, mail_node_exports as mailNode, notifications_exports as notifications, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, performPasswordLogin, performSigningKeyLogin, performSsoDeviceFlowLogin, profile_exports as profile, projects_exports as projects, requireData, requireOk, resolveAuth, resolveCitations, resolveWorkspace, responses_exports as responses, selectWorkspace, selectWorkspaceById, sessions_exports as sessions, settings_exports as settings, signature_requests_exports as signatureRequests,
|
|
11692
|
+
export { ACCOUNT_VENDOR, Arbi, ArbiApiError, ArbiError, ArbiSessionExpiredError, ClaudeOrchestrator, DEFAULT_AI_USD_PER_GBP, DOC_TERMINAL_STATUSES, DRIVE_SYNC_VENDORS, FLAT_TAG_KINDS, FileConfigStore, GOOGLE_VENDORS, IMANAGE_VENDORS, MAILBOX_SYNC_VENDORS, MAX_RETRIEVE_DOC_IDS, MICROSOFT_VENDORS, OpenClawOrchestrator, PlanStepsError, PublicBookingError, SHAREPOINT_VENDORS, STEP_FIELD_OPTION_TONES, TAG_KINDS, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, agents_exports as agents, assistant_exports as assistant, authenticatedFetch, bookPublicSlot, buildCitationChunkData, buildDocNameMap, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, calendar_exports as calendar, cancelPublicBooking, chats_exports as chats, connectErrorMessage, connectWebSocket, connectWithReconnect, connectors_exports as connectors, consumeSSEStream, contacts_exports as contacts, conversations_exports as conversations, countCitations, createAuthenticatedClient, createDocumentWaiter, device_flow_exports as deviceFlow, doctags_exports as doctags, documents_exports as documents, documents_node_exports as documentsNode, facts_exports as facts, files_exports as files, filterSkills, firm_exports as firm, formatAgentStepLabel, formatFileSize, formatGbp, formatGbpPerMillionTokens, formatItemLabel, formatStreamSummary, formatUserName, formatWorkspaceChoices, formatWsMessage, generateEncryptedWorkspaceKey, generateNewWorkspaceKey, getErrorCode, getErrorMessage, getPublicBookingPage, getRawWorkspaceKey, health_exports as health, house_template_exports as houseTemplates, identityErrorCode, identity_exports as identityVerification, isConnectorVendorVisible, isDriveSyncVendor, isMailboxSyncVendor, isSharePointVendor, isSharedSkill, listen_exports as listen, mail_exports as mail, mail_node_exports as mailNode, notifications_exports as notifications, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, performPasswordLogin, performSigningKeyLogin, performSsoDeviceFlowLogin, profile_exports as profile, projects_exports as projects, requireData, requireOk, resolveAuth, resolveCitations, resolveWorkspace, responses_exports as responses, searchChunks, selectWorkspace, selectWorkspaceById, sessions_exports as sessions, settings_exports as settings, signature_requests_exports as signatureRequests, startDmListener, streamSSE, stripCitationMarkdown, summarizeCitations, tags_exports as tags, uploadSkill, usdToGbp, work_exports as work, workflow_steps_exports as workflowSteps, workflows_exports as workflows, workspaces_exports as workspaces };
|
|
11584
11693
|
//# sourceMappingURL=index.js.map
|
|
11585
11694
|
//# sourceMappingURL=index.js.map
|