@arbidocs/sdk 0.5.60 → 0.5.61
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 +118 -0
- package/dist/{browser-BuRU9RVU.d.cts → browser-2WIMhFQU.d.cts} +100 -1
- package/dist/{browser-GyBIGRNQ.d.ts → browser-CKSVXWvq.d.ts} +100 -1
- package/dist/browser.cjs +253 -1
- 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 +246 -2
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +253 -1
- 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 +246 -2
- package/dist/index.js.map +1 -1
- package/examples/background-response.mjs +18 -0
- package/examples/responses-contract.json +97 -0
- package/examples/session.mjs +10 -0
- package/examples/structured-extraction.mjs +20 -0
- package/package.json +3 -2
package/dist/browser.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, d as Arbi, e as ArbiApiError, f as ArbiError, g as ArbiErrorOptions, h as ArbiHostSession, i as ArbiOptions, k as
|
|
1
|
+
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, d as Arbi, e as ArbiApiError, f as ArbiError, g as ArbiErrorOptions, h as ArbiHostSession, i as ArbiOptions, k as ArbiStructuredOutputError, l as ArbiTransportError, m as ArbiWorkspaceChangedError, n as ArbiWorkspaceSupersededError, o as AskHandlers, p as AskRequest, q as AttendeeRead, r as AuthContext, s as AuthHeaders, t as AuthMode, u as AuthenticatedClient, B as BookingConfirmation, v as BookingPage, w as BookingPageWriteBody, x as BookingRequestBody, y as BridgeTokensOptions, C as CalDavConnectBody, z as CalDavProfile, D as CalendarAccount, E as CalendarAccountKind, F as CalendarCreateBody, G as CalendarEvent, H as CalendarKeys, I as CalendarRead, J as CalendarSettings, K as CalendarSettingsBody, L as CalendarUpdate, M as CalendarWindow, N as CallApiError, O as Capabilities, P as ChatAttachmentFile, Q as ChatAttachmentInput, R as ChatCryptoContext, S as ChatKeyRing, T as ChatKind, U as ChatMemberKey, V as ChatMemberResponse, W as ChatMessage, X as ChatMessageResponse, Y as ChatResponse, Z as ChatSession, _ as CitationSummary, $ as CitationToolSources, a0 as CliConfig, a1 as CliCredentials, a2 as CommandDescriptor, a3 as ConfigStore, a4 as Configuration, a5 as ConfigurationPatch, a6 as ConnectOptions, a7 as ConnectorCatalogEntry, a8 as ConnectorFolder, a9 as ConnectorSyncProgress, aa as ConnectorSyncStatus, ab as ConnectorVendorKey, ac as ConnectorVisibilitySettings, ad as ContextUsage, ae as ConversationResponse, af as ConversationUsageResponse, ag as CreateFactRequest, ah as CreateFactsRequest, ai as CreateWorkRequest, aj as CreateWorkflowRequest, ak as DEFAULT_AI_USD_PER_GBP, am as DRIVE_SYNC_VENDORS, an as Database, ao as DatabaseAggregateRequest, ap as DatabaseAggregateResult, aq as DatabaseColumn, ar as DatabaseColumnWrite, as as DatabaseImportResult, at as DatabaseRow, au as DatabaseRowPage, av as DatabaseRowsQuery, aw as DateTimeSpec, ay as DecryptedChatMessage, az as DeploymentHouseTemplate, aA as DocInfo, aB as DocInfoMap, aD as DocumentAutomationAction, aG as DocumentSelector, aJ as DriveSyncProgress, aK as DriveSyncSummary, aL as DuplicateContactError, aM as ENTITY_KINDS, aN as EditScope, aO as EntityKind, aP as EventCreateBody, aQ as EventPatchBody, aR as FLAT_TAG_KINDS, aS as FactResponse, aT as FactSearchRequest, aU as FactSearchResponse, aV as FindTimeParams, aX as FreeBusyEntry, aY as FullContextSelection, aZ as GOOGLE_VENDORS, a_ as HolidayCountry, a$ as HouseTemplateCandidate, b0 as IMANAGE_VENDORS, b1 as IdentityErrorCode, b2 as IdentityPurchase, b3 as IdentityState, b4 as IdentityStatus, b5 as ImportResult, b6 as InvitationRead, b7 as JsonSchemaOutputFormat, b8 as LinkedRun, ba as ListEventsParams, bb as ListFactsOptions, bd as MAILBOX_SYNC_VENDORS, be as MAX_RETRIEVE_DOC_IDS, bf as MICROSOFT_VENDORS, bi as OAuthAccountKind, bj as OutputItemDone, bk as OverlayItem, bl as OverlayLayerName, bm as PRESENCE_KINDS, bn as PROMPT_CONTEXT_CHARS, bo as ParsedSlashCommand, bp as ParsedStructuredResponse, bq as PendingAuthResponse, br as PersonKey, bs as PlanStepsError, bt as PlanWorkRequest, bu as ProductResponse, bv as ProjectAddonKind, bw as ProjectAddonSettingsRequest, bx as ProjectBudget, by as ProjectCheckoutRequest, bz as ProjectConversationUsageResponse, bA as ProjectCreateOptions, bB as ProjectDetails, bC as ProjectEventKind, bD as ProjectEventResponse, bE as ProjectInvoicesResponse, bF as ProjectNextPeriodAddonsRequest, bG as ProjectPlanChangeRequest, bH as ProjectQuoteRequest, bI as ProjectResponse, bJ as ProjectUpdateRequest, bK as ProjectUsageResponse, bL as PublicBookingError, bM as PublicBookingPage, bN as QuotaExceeded, bO as RaisedSignal, bP as RawResponseEvent, bQ as ReconnectOptions, bR as ReconnectableWsConnection, bS as ResolvedCitation, bU as RespondParams, bV as RespondPartstat, bW as ResponseHandle, bX as ResponseSnapshot, bY as ResponseStart, bZ as ResponseStartOptions, b_ as ResponseTools, b$ as RoomCreateBody, c0 as RoomQuery, c1 as RoomRead, c2 as RunProgress, c3 as RunStats, c4 as RunStep, c5 as RunWaitingOn, c6 as SHAREPOINT_VENDORS, c7 as SSEEvent, c8 as SSEStreamCallbacks, c9 as SSEStreamOutcome, ca as SSEStreamResult, cc as STOP_ID_WAIT_MS, cd as STOP_REPEAT_WINDOW_MS, cf as ScopedTarget, cg as SearchChunk, ch as SendBack, ci as ShareRead, cj as ShareRole, ck as SkillSummary, cl as SkippedFile, cm as SlackConnectionStatus, cn as StepActionRequest, co as StepActivityEvent, cp as StepAssignee, cq as StepDisplay, cr as StepField, cu as StepKind, cv as StepPhase, cw as StepSignal, cx as StepSignalWhen, cy as StepState, cz as StepStatus, cA as SubagentBranchRecord, cB as SubagentLaneInfo, cC as SubmitBackgroundQueryOptions, cD as SubscribeParams, cE as SyncTriggerResult, cF as TAG_KINDS, cG as TAG_NESTING_MAX_DEPTH, cH as TagChange, cI as TagFieldDefinition, cJ as TagGroup, cK as TagKind, cL as TagKindField, cM as TagKindSchema, cN as TagLinks, cO as TagListQuery, cP as TagNode, cQ as TagResponse, cR as TagScope, cS as TagTreeRow, cT as TaskPlan, cU as TaskPlanStep, cV as TaxQuoteResponse, cW as Thread, cX as ThreadsResponse, cY as TimeSuggestion, cZ as TurnRequest, c_ as UpdateConversationRequest, c$ as UpdateFactRequest, d0 as UpdateWorkflowRequest, d4 as UploadDocumentsOptions, d5 as UploadOptions, d6 as UploadProgressListener, d7 as UploadResult, d8 as UsageBreakdown, d9 as UserConnectorEntry, da as UserDailyUsageResponse, db as UserInfo, dc as WebSocketAuthError, dd as WeeklyHoursSpec, de as WorkStatus, df as WorkflowAuthMode, dg as WorkflowResponse, dh as WorkflowRunHistoryResponse, di as WorkflowRunResponse, dj as WorkspaceContext, dk as WorkspaceOpenResponse, dl as WorkspaceResponse, dm as WsConnection, dn as account, dp as agentconfig, dr as appendTranscriptionHints, ds as assistant, dt as authenticatedFetch, du as bookPublicSlot, dv as buildCitationChunkData, dx as buildDocumentTools, dy as buildFactsContextTool, dz as buildRetrievalChunkTool, dA as buildRetrievalFullContextTool, dB as buildRetrievalTocTool, dC as buildTurnRequest, dD as calendar, dE as calls, dF as canTagHaveParent, dG as cancelPublicBooking, dH as capabilities, dI as chats, dJ as composeConfiguration, dK as composeTools, dL as computeRunStats, dM as connectErrorMessage, dN as connectWebSocket, dO as connectWithReconnect, dP as connectors, dQ as contacts, dR as continuityPrompt, dS as conversations, dT as countCitations, dU as createAuthenticatedClient, dW as createIndexAssigner, dX as databases, dY as defaultKindForFormat, dZ as doctags, d_ as documentTools, d$ as documents, e0 as estimateDraftTokens, e1 as extractDocumentIdsFromMessages, e2 as extractFactIdsFromMessages, e3 as extractSubagentLanes, e4 as facts, e5 as files, e6 as filterDocumentTags, e7 as filterSkills, e8 as findLeafForTaskMessage, e9 as findMainSiblingLeaf, ea as findReplyTarget, eb as findSubagentRunId, ec as flattenTagTree, ed as formatAgentStepLabel, ee as formatFileSize, ef as formatGbp, eg as formatGbpPerMillionTokens, eh as formatItemLabel, ej as formatTokens, ek as formatUserName, el as formatWorkspaceChoices, ep as getAgentStepLabel, eq as getAttachableRunId, er as getChildTags, es as getContextRemainingPercent, et as getContextUsedPercent, eu as getContextUsedTokens, ev as getCurrentStep, ew as getEligibleParentTags, ey as getErrorMessage, ez as getPublicBookingPage, eA as getRawWorkspaceKey, eB as getRunToAttach, eC as getRunToCancel, eD as getStepDisplay, eE as getStepTool, eF as getSubagentBranchRecord, eG as getTagDescendantIds, eH as health, eI as houseTemplates, eJ as hydrateAgentSteps, eL as identityErrorCode, eK as identityVerification, eM as instructions, eN as isAnnotationTag, eO as isConnectorVendorVisible, eP as isDriveSyncVendor, eQ as isEntityTag, eR as isFlatKind, eS as isLabelTag, eT as isMailboxSyncVendor, eU as isNearAiUsageBudget, eV as isPresenceTag, eW as isSharePointVendor, eX as isSharedSkill, eY as isTraceItem, eZ as mail, e_ as mcpTools, e$ as mergeAgentSteps, f0 as notifications, f1 as parseSSEEvents, f2 as parseSlashCommand, f3 as parseSlashTokenInProgress, f4 as parseStructuredResponse, f5 as performPasswordLogin, f8 as pickMainThread, f9 as profile, fa as progressFetch, fb as projects, fc as quotaExceededFrom, fd as quotaFromStreamError, fe as reduceOutputItem, ff as refusalReason, fg as requireData, fh as requireOk, fi as resolveAuth, fj as resolveCitations, fk as resolveSummary, fl as resolveWorkspace, fm as responses, fn as searchChunks, fo as selectFullContextDocument, fp as selectWorkspace, fq as selectWorkspaceById, fr as sessions, fs as settings, fu as sliceToSubagentThread, fv as streamSSE, fw as stripCitationMarkdown, fx as subagentJobLabel, fy as summarizeCitations, fz as tagUseCount, fA as tags, fB as tagsForScope, fC as tagsOfGroup, fD as topLevelAgentSteps, fF as usdToGbp, fG as work, fH as workflowSteps, fI as workflows, fJ as workspaces, fK as wouldCreateTagCycle } from './browser-2WIMhFQU.cjs';
|
|
2
2
|
export { A as AgentControlStateEvent, a as AgentStepDeltaEvent, b as AgentStepEvent, c as ArbiErrorEvent, d as ArtifactEvent, D as DeferredInterjectionEvent, M as MailDraftSSEEvent, e as MessageMetadataPayload, f as MessageQueuedEvent, O as OutputTokensDetails, P as ProbeAnswerEvent, R as ResponseCompletedEvent, g as ResponseContentPartAddedEvent, h as ResponseCreatedEvent, i as ResponseFailedEvent, j as ResponseOutputItemAddedEvent, k as ResponseOutputItemDoneEvent, l as ResponseOutputTextDeltaEvent, m as ResponseOutputTextDoneEvent, n as ResponseUsage, S as SSEStreamStartData, T as TokenBudgetContext, U as UserInputRequestEvent, o as UserMessageEvent } from './sse-types-BbR7JG5o.cjs';
|
|
3
3
|
export { CallPeer, HttpErrorInfo, HttpRequestInfo, HttpResponseInfo, HttpTransportOptions, LoginProfile, SessionPersistence } from '@arbidocs/client';
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, d as Arbi, e as ArbiApiError, f as ArbiError, g as ArbiErrorOptions, h as ArbiHostSession, i as ArbiOptions, k as
|
|
1
|
+
export { A as ACCOUNT_VENDOR, a as AccountSyncResult, b as ActivityKind, c as ActivityResponse, d as Arbi, e as ArbiApiError, f as ArbiError, g as ArbiErrorOptions, h as ArbiHostSession, i as ArbiOptions, k as ArbiStructuredOutputError, l as ArbiTransportError, m as ArbiWorkspaceChangedError, n as ArbiWorkspaceSupersededError, o as AskHandlers, p as AskRequest, q as AttendeeRead, r as AuthContext, s as AuthHeaders, t as AuthMode, u as AuthenticatedClient, B as BookingConfirmation, v as BookingPage, w as BookingPageWriteBody, x as BookingRequestBody, y as BridgeTokensOptions, C as CalDavConnectBody, z as CalDavProfile, D as CalendarAccount, E as CalendarAccountKind, F as CalendarCreateBody, G as CalendarEvent, H as CalendarKeys, I as CalendarRead, J as CalendarSettings, K as CalendarSettingsBody, L as CalendarUpdate, M as CalendarWindow, N as CallApiError, O as Capabilities, P as ChatAttachmentFile, Q as ChatAttachmentInput, R as ChatCryptoContext, S as ChatKeyRing, T as ChatKind, U as ChatMemberKey, V as ChatMemberResponse, W as ChatMessage, X as ChatMessageResponse, Y as ChatResponse, Z as ChatSession, _ as CitationSummary, $ as CitationToolSources, a0 as CliConfig, a1 as CliCredentials, a2 as CommandDescriptor, a3 as ConfigStore, a4 as Configuration, a5 as ConfigurationPatch, a6 as ConnectOptions, a7 as ConnectorCatalogEntry, a8 as ConnectorFolder, a9 as ConnectorSyncProgress, aa as ConnectorSyncStatus, ab as ConnectorVendorKey, ac as ConnectorVisibilitySettings, ad as ContextUsage, ae as ConversationResponse, af as ConversationUsageResponse, ag as CreateFactRequest, ah as CreateFactsRequest, ai as CreateWorkRequest, aj as CreateWorkflowRequest, ak as DEFAULT_AI_USD_PER_GBP, am as DRIVE_SYNC_VENDORS, an as Database, ao as DatabaseAggregateRequest, ap as DatabaseAggregateResult, aq as DatabaseColumn, ar as DatabaseColumnWrite, as as DatabaseImportResult, at as DatabaseRow, au as DatabaseRowPage, av as DatabaseRowsQuery, aw as DateTimeSpec, ay as DecryptedChatMessage, az as DeploymentHouseTemplate, aA as DocInfo, aB as DocInfoMap, aD as DocumentAutomationAction, aG as DocumentSelector, aJ as DriveSyncProgress, aK as DriveSyncSummary, aL as DuplicateContactError, aM as ENTITY_KINDS, aN as EditScope, aO as EntityKind, aP as EventCreateBody, aQ as EventPatchBody, aR as FLAT_TAG_KINDS, aS as FactResponse, aT as FactSearchRequest, aU as FactSearchResponse, aV as FindTimeParams, aX as FreeBusyEntry, aY as FullContextSelection, aZ as GOOGLE_VENDORS, a_ as HolidayCountry, a$ as HouseTemplateCandidate, b0 as IMANAGE_VENDORS, b1 as IdentityErrorCode, b2 as IdentityPurchase, b3 as IdentityState, b4 as IdentityStatus, b5 as ImportResult, b6 as InvitationRead, b7 as JsonSchemaOutputFormat, b8 as LinkedRun, ba as ListEventsParams, bb as ListFactsOptions, bd as MAILBOX_SYNC_VENDORS, be as MAX_RETRIEVE_DOC_IDS, bf as MICROSOFT_VENDORS, bi as OAuthAccountKind, bj as OutputItemDone, bk as OverlayItem, bl as OverlayLayerName, bm as PRESENCE_KINDS, bn as PROMPT_CONTEXT_CHARS, bo as ParsedSlashCommand, bp as ParsedStructuredResponse, bq as PendingAuthResponse, br as PersonKey, bs as PlanStepsError, bt as PlanWorkRequest, bu as ProductResponse, bv as ProjectAddonKind, bw as ProjectAddonSettingsRequest, bx as ProjectBudget, by as ProjectCheckoutRequest, bz as ProjectConversationUsageResponse, bA as ProjectCreateOptions, bB as ProjectDetails, bC as ProjectEventKind, bD as ProjectEventResponse, bE as ProjectInvoicesResponse, bF as ProjectNextPeriodAddonsRequest, bG as ProjectPlanChangeRequest, bH as ProjectQuoteRequest, bI as ProjectResponse, bJ as ProjectUpdateRequest, bK as ProjectUsageResponse, bL as PublicBookingError, bM as PublicBookingPage, bN as QuotaExceeded, bO as RaisedSignal, bP as RawResponseEvent, bQ as ReconnectOptions, bR as ReconnectableWsConnection, bS as ResolvedCitation, bU as RespondParams, bV as RespondPartstat, bW as ResponseHandle, bX as ResponseSnapshot, bY as ResponseStart, bZ as ResponseStartOptions, b_ as ResponseTools, b$ as RoomCreateBody, c0 as RoomQuery, c1 as RoomRead, c2 as RunProgress, c3 as RunStats, c4 as RunStep, c5 as RunWaitingOn, c6 as SHAREPOINT_VENDORS, c7 as SSEEvent, c8 as SSEStreamCallbacks, c9 as SSEStreamOutcome, ca as SSEStreamResult, cc as STOP_ID_WAIT_MS, cd as STOP_REPEAT_WINDOW_MS, cf as ScopedTarget, cg as SearchChunk, ch as SendBack, ci as ShareRead, cj as ShareRole, ck as SkillSummary, cl as SkippedFile, cm as SlackConnectionStatus, cn as StepActionRequest, co as StepActivityEvent, cp as StepAssignee, cq as StepDisplay, cr as StepField, cu as StepKind, cv as StepPhase, cw as StepSignal, cx as StepSignalWhen, cy as StepState, cz as StepStatus, cA as SubagentBranchRecord, cB as SubagentLaneInfo, cC as SubmitBackgroundQueryOptions, cD as SubscribeParams, cE as SyncTriggerResult, cF as TAG_KINDS, cG as TAG_NESTING_MAX_DEPTH, cH as TagChange, cI as TagFieldDefinition, cJ as TagGroup, cK as TagKind, cL as TagKindField, cM as TagKindSchema, cN as TagLinks, cO as TagListQuery, cP as TagNode, cQ as TagResponse, cR as TagScope, cS as TagTreeRow, cT as TaskPlan, cU as TaskPlanStep, cV as TaxQuoteResponse, cW as Thread, cX as ThreadsResponse, cY as TimeSuggestion, cZ as TurnRequest, c_ as UpdateConversationRequest, c$ as UpdateFactRequest, d0 as UpdateWorkflowRequest, d4 as UploadDocumentsOptions, d5 as UploadOptions, d6 as UploadProgressListener, d7 as UploadResult, d8 as UsageBreakdown, d9 as UserConnectorEntry, da as UserDailyUsageResponse, db as UserInfo, dc as WebSocketAuthError, dd as WeeklyHoursSpec, de as WorkStatus, df as WorkflowAuthMode, dg as WorkflowResponse, dh as WorkflowRunHistoryResponse, di as WorkflowRunResponse, dj as WorkspaceContext, dk as WorkspaceOpenResponse, dl as WorkspaceResponse, dm as WsConnection, dn as account, dp as agentconfig, dr as appendTranscriptionHints, ds as assistant, dt as authenticatedFetch, du as bookPublicSlot, dv as buildCitationChunkData, dx as buildDocumentTools, dy as buildFactsContextTool, dz as buildRetrievalChunkTool, dA as buildRetrievalFullContextTool, dB as buildRetrievalTocTool, dC as buildTurnRequest, dD as calendar, dE as calls, dF as canTagHaveParent, dG as cancelPublicBooking, dH as capabilities, dI as chats, dJ as composeConfiguration, dK as composeTools, dL as computeRunStats, dM as connectErrorMessage, dN as connectWebSocket, dO as connectWithReconnect, dP as connectors, dQ as contacts, dR as continuityPrompt, dS as conversations, dT as countCitations, dU as createAuthenticatedClient, dW as createIndexAssigner, dX as databases, dY as defaultKindForFormat, dZ as doctags, d_ as documentTools, d$ as documents, e0 as estimateDraftTokens, e1 as extractDocumentIdsFromMessages, e2 as extractFactIdsFromMessages, e3 as extractSubagentLanes, e4 as facts, e5 as files, e6 as filterDocumentTags, e7 as filterSkills, e8 as findLeafForTaskMessage, e9 as findMainSiblingLeaf, ea as findReplyTarget, eb as findSubagentRunId, ec as flattenTagTree, ed as formatAgentStepLabel, ee as formatFileSize, ef as formatGbp, eg as formatGbpPerMillionTokens, eh as formatItemLabel, ej as formatTokens, ek as formatUserName, el as formatWorkspaceChoices, ep as getAgentStepLabel, eq as getAttachableRunId, er as getChildTags, es as getContextRemainingPercent, et as getContextUsedPercent, eu as getContextUsedTokens, ev as getCurrentStep, ew as getEligibleParentTags, ey as getErrorMessage, ez as getPublicBookingPage, eA as getRawWorkspaceKey, eB as getRunToAttach, eC as getRunToCancel, eD as getStepDisplay, eE as getStepTool, eF as getSubagentBranchRecord, eG as getTagDescendantIds, eH as health, eI as houseTemplates, eJ as hydrateAgentSteps, eL as identityErrorCode, eK as identityVerification, eM as instructions, eN as isAnnotationTag, eO as isConnectorVendorVisible, eP as isDriveSyncVendor, eQ as isEntityTag, eR as isFlatKind, eS as isLabelTag, eT as isMailboxSyncVendor, eU as isNearAiUsageBudget, eV as isPresenceTag, eW as isSharePointVendor, eX as isSharedSkill, eY as isTraceItem, eZ as mail, e_ as mcpTools, e$ as mergeAgentSteps, f0 as notifications, f1 as parseSSEEvents, f2 as parseSlashCommand, f3 as parseSlashTokenInProgress, f4 as parseStructuredResponse, f5 as performPasswordLogin, f8 as pickMainThread, f9 as profile, fa as progressFetch, fb as projects, fc as quotaExceededFrom, fd as quotaFromStreamError, fe as reduceOutputItem, ff as refusalReason, fg as requireData, fh as requireOk, fi as resolveAuth, fj as resolveCitations, fk as resolveSummary, fl as resolveWorkspace, fm as responses, fn as searchChunks, fo as selectFullContextDocument, fp as selectWorkspace, fq as selectWorkspaceById, fr as sessions, fs as settings, fu as sliceToSubagentThread, fv as streamSSE, fw as stripCitationMarkdown, fx as subagentJobLabel, fy as summarizeCitations, fz as tagUseCount, fA as tags, fB as tagsForScope, fC as tagsOfGroup, fD as topLevelAgentSteps, fF as usdToGbp, fG as work, fH as workflowSteps, fI as workflows, fJ as workspaces, fK as wouldCreateTagCycle } from './browser-CKSVXWvq.js';
|
|
2
2
|
export { A as AgentControlStateEvent, a as AgentStepDeltaEvent, b as AgentStepEvent, c as ArbiErrorEvent, d as ArtifactEvent, D as DeferredInterjectionEvent, M as MailDraftSSEEvent, e as MessageMetadataPayload, f as MessageQueuedEvent, O as OutputTokensDetails, P as ProbeAnswerEvent, R as ResponseCompletedEvent, g as ResponseContentPartAddedEvent, h as ResponseCreatedEvent, i as ResponseFailedEvent, j as ResponseOutputItemAddedEvent, k as ResponseOutputItemDoneEvent, l as ResponseOutputTextDeltaEvent, m as ResponseOutputTextDoneEvent, n as ResponseUsage, S as SSEStreamStartData, T as TokenBudgetContext, U as UserInputRequestEvent, o as UserMessageEvent } from './sse-types-BbR7JG5o.js';
|
|
3
3
|
export { CallPeer, HttpErrorInfo, HttpRequestInfo, HttpResponseInfo, HttpTransportOptions, LoginProfile, SessionPersistence } from '@arbidocs/client';
|
package/dist/browser.js
CHANGED
|
@@ -4607,6 +4607,116 @@ function buildChunkLookup(tools) {
|
|
|
4607
4607
|
return lookup;
|
|
4608
4608
|
}
|
|
4609
4609
|
|
|
4610
|
+
// src/structured-output.ts
|
|
4611
|
+
var ArbiStructuredOutputError = class extends ArbiError {
|
|
4612
|
+
constructor(message, response, options) {
|
|
4613
|
+
const id = response && typeof response === "object" && "id" in response && typeof response.id === "string" ? response.id : void 0;
|
|
4614
|
+
super(message, { responseId: id, ...options });
|
|
4615
|
+
this.response = response;
|
|
4616
|
+
this.name = "ArbiStructuredOutputError";
|
|
4617
|
+
}
|
|
4618
|
+
response;
|
|
4619
|
+
};
|
|
4620
|
+
function localReferences(value) {
|
|
4621
|
+
if (Array.isArray(value)) {
|
|
4622
|
+
value.forEach(localReferences);
|
|
4623
|
+
return;
|
|
4624
|
+
}
|
|
4625
|
+
if (!value || typeof value !== "object") return;
|
|
4626
|
+
for (const [key, child] of Object.entries(value)) {
|
|
4627
|
+
if ((key === "$ref" || key === "$dynamicRef") && (typeof child !== "string" || !child.startsWith("#")))
|
|
4628
|
+
throw new Error("Only local schema references are supported.");
|
|
4629
|
+
if (!["enum", "const", "default", "examples"].includes(key)) localReferences(child);
|
|
4630
|
+
}
|
|
4631
|
+
}
|
|
4632
|
+
async function createStructuredParser(format) {
|
|
4633
|
+
let validate;
|
|
4634
|
+
let Constructor;
|
|
4635
|
+
try {
|
|
4636
|
+
Constructor = (await import('ajv/dist/2020.js')).default;
|
|
4637
|
+
} catch (cause) {
|
|
4638
|
+
throw new ArbiStructuredOutputError(
|
|
4639
|
+
"The JSON Schema validator could not be loaded.",
|
|
4640
|
+
void 0,
|
|
4641
|
+
{ code: "STRUCTURED_OUTPUT_VALIDATOR_UNAVAILABLE", cause }
|
|
4642
|
+
);
|
|
4643
|
+
}
|
|
4644
|
+
try {
|
|
4645
|
+
if (format.type !== "json_schema" || typeof format.name !== "string" || !/^[a-zA-Z0-9_-]{1,64}$/.test(format.name) || !format.schema || typeof format.schema !== "object" || Array.isArray(format.schema))
|
|
4646
|
+
throw new Error("Invalid structured output format.");
|
|
4647
|
+
if (format.schema.$schema !== void 0 && format.schema.$schema !== "https://json-schema.org/draft/2020-12/schema")
|
|
4648
|
+
throw new Error("Expected JSON Schema draft 2020-12.");
|
|
4649
|
+
localReferences(format.schema);
|
|
4650
|
+
validate = new Constructor({
|
|
4651
|
+
strict: false,
|
|
4652
|
+
logger: false,
|
|
4653
|
+
validateFormats: false,
|
|
4654
|
+
strictNumbers: true,
|
|
4655
|
+
addUsedSchema: false
|
|
4656
|
+
}).compile(format.schema);
|
|
4657
|
+
} catch (cause) {
|
|
4658
|
+
const unavailable = cause instanceof EvalError;
|
|
4659
|
+
throw new ArbiStructuredOutputError(
|
|
4660
|
+
unavailable ? "This runtime cannot compile JSON Schema validators." : "Invalid or unsupported output schema.",
|
|
4661
|
+
void 0,
|
|
4662
|
+
{
|
|
4663
|
+
code: unavailable ? "STRUCTURED_OUTPUT_VALIDATOR_UNAVAILABLE" : "STRUCTURED_OUTPUT_SCHEMA_INVALID",
|
|
4664
|
+
cause
|
|
4665
|
+
}
|
|
4666
|
+
);
|
|
4667
|
+
}
|
|
4668
|
+
return (response, options = {}) => {
|
|
4669
|
+
const fail = (code, message, cause) => {
|
|
4670
|
+
throw new ArbiStructuredOutputError(message, response, { ...options, code, cause });
|
|
4671
|
+
};
|
|
4672
|
+
if (!response || typeof response !== "object")
|
|
4673
|
+
fail("RESPONSE_INVALID_ENVELOPE", "Expected a Responses JSON object.");
|
|
4674
|
+
if (response.status === "incomplete")
|
|
4675
|
+
fail("RESPONSE_INCOMPLETE", "The response is incomplete; no validated data is available.");
|
|
4676
|
+
if (response.status === "cancelled")
|
|
4677
|
+
fail("RESPONSE_CANCELLED", "The response was cancelled; no validated data is available.");
|
|
4678
|
+
if (response.status === "failed")
|
|
4679
|
+
fail(
|
|
4680
|
+
typeof response.error?.code === "string" ? response.error.code : "RESPONSE_FAILED",
|
|
4681
|
+
typeof response.error?.message === "string" ? response.error.message : "The response failed."
|
|
4682
|
+
);
|
|
4683
|
+
if (response.status !== "completed")
|
|
4684
|
+
fail(
|
|
4685
|
+
"RESPONSE_NOT_COMPLETED",
|
|
4686
|
+
"Wait for a completed response before parsing structured output."
|
|
4687
|
+
);
|
|
4688
|
+
const messages = Array.isArray(response.output) ? response.output.filter(
|
|
4689
|
+
(item) => item && typeof item === "object" && item.type === "message" && item.role === "assistant"
|
|
4690
|
+
) : [];
|
|
4691
|
+
if (messages.some(
|
|
4692
|
+
(message) => !Array.isArray(message.content) || message.content.some((part) => !part || typeof part !== "object")
|
|
4693
|
+
))
|
|
4694
|
+
fail("RESPONSE_INVALID_ENVELOPE", "Invalid assistant output content.");
|
|
4695
|
+
if (messages.some((message) => message.content.some((part) => part.type === "refusal")))
|
|
4696
|
+
fail("RESPONSE_REFUSED", "The model refused this response.");
|
|
4697
|
+
const answers = messages.map(
|
|
4698
|
+
(message) => message.content.filter((part) => part.type === "output_text" && typeof part.text === "string").map((part) => part.text).join("")
|
|
4699
|
+
).filter((answer) => answer.length > 0);
|
|
4700
|
+
if (answers.length !== 1)
|
|
4701
|
+
fail(
|
|
4702
|
+
"STRUCTURED_OUTPUT_AMBIGUOUS",
|
|
4703
|
+
"Expected one final assistant output message; narrative and answer text are not joined."
|
|
4704
|
+
);
|
|
4705
|
+
let data;
|
|
4706
|
+
try {
|
|
4707
|
+
data = JSON.parse(answers[0]);
|
|
4708
|
+
} catch (cause) {
|
|
4709
|
+
fail("STRUCTURED_OUTPUT_INVALID_JSON", "The response is not valid JSON.", cause);
|
|
4710
|
+
}
|
|
4711
|
+
if (!validate(data))
|
|
4712
|
+
fail("STRUCTURED_OUTPUT_INVALID", "The response did not match the requested JSON schema.");
|
|
4713
|
+
return { data, response };
|
|
4714
|
+
};
|
|
4715
|
+
}
|
|
4716
|
+
async function parseStructuredResponse(response, format) {
|
|
4717
|
+
return (await createStructuredParser(format))(response);
|
|
4718
|
+
}
|
|
4719
|
+
|
|
4610
4720
|
// src/response-handle.ts
|
|
4611
4721
|
var object = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
4612
4722
|
var text = (value) => typeof value === "string" ? value : void 0;
|
|
@@ -6084,6 +6194,7 @@ function buildTurnRequest(request) {
|
|
|
6084
6194
|
...request.previousResponseId ? { previous_response_id: request.previousResponseId } : {},
|
|
6085
6195
|
...request.conversationId ? { conversation_ext_id: request.conversationId } : {},
|
|
6086
6196
|
...request.model && !pa2 ? { model: request.model } : {},
|
|
6197
|
+
...request.text ? { text: request.text } : {},
|
|
6087
6198
|
...activeArtifactExtId ? { active_artifact_ext_id: activeArtifactExtId } : {},
|
|
6088
6199
|
...request.bindDocumentId && !request.previousResponseId && !pa2 ? { bound_document_ext_id: request.bindDocumentId } : {},
|
|
6089
6200
|
...request.mentions && request.mentions.length > 0 ? { mentions: request.mentions } : {},
|
|
@@ -6371,6 +6482,7 @@ async function submitBackgroundQuery(options) {
|
|
|
6371
6482
|
docIds,
|
|
6372
6483
|
previousResponseId,
|
|
6373
6484
|
model,
|
|
6485
|
+
text: text2,
|
|
6374
6486
|
task,
|
|
6375
6487
|
conversationId,
|
|
6376
6488
|
mentions,
|
|
@@ -6406,7 +6518,8 @@ async function submitBackgroundQuery(options) {
|
|
|
6406
6518
|
...mentions !== void 0 ? { mentions } : {},
|
|
6407
6519
|
...activeArtifactExtId ? { active_artifact_ext_id: activeArtifactExtId } : {},
|
|
6408
6520
|
...previousResponseId ? { previous_response_id: previousResponseId } : {},
|
|
6409
|
-
...model ? { model } : {}
|
|
6521
|
+
...model ? { model } : {},
|
|
6522
|
+
...text2 ? { text: text2 } : {}
|
|
6410
6523
|
};
|
|
6411
6524
|
const res = await authenticatedFetch({
|
|
6412
6525
|
...auth,
|
|
@@ -11689,8 +11802,90 @@ var Arbi = class {
|
|
|
11689
11802
|
throw error;
|
|
11690
11803
|
}
|
|
11691
11804
|
}
|
|
11805
|
+
/** Canonical Responses-shaped requests; existing assistant convenience helpers remain supported. */
|
|
11806
|
+
responses = {
|
|
11807
|
+
create: async (request, options = {}) => {
|
|
11808
|
+
const response = await this.recovering(
|
|
11809
|
+
() => openTurnStream(
|
|
11810
|
+
this.getAuthHeaders(),
|
|
11811
|
+
{
|
|
11812
|
+
...request,
|
|
11813
|
+
workspace_ext_id: request.workspace_ext_id ?? this.requireWorkspace(),
|
|
11814
|
+
stream: false,
|
|
11815
|
+
background: request.background ?? false,
|
|
11816
|
+
store: request.store ?? true
|
|
11817
|
+
},
|
|
11818
|
+
options.signal
|
|
11819
|
+
)
|
|
11820
|
+
);
|
|
11821
|
+
let body;
|
|
11822
|
+
try {
|
|
11823
|
+
body = await response.text();
|
|
11824
|
+
} catch (cause) {
|
|
11825
|
+
throw transportError(cause);
|
|
11826
|
+
}
|
|
11827
|
+
try {
|
|
11828
|
+
return JSON.parse(body);
|
|
11829
|
+
} catch (cause) {
|
|
11830
|
+
throw new ArbiError("Expected a Responses JSON object.", {
|
|
11831
|
+
code: "RESPONSE_INVALID_ENVELOPE",
|
|
11832
|
+
cause,
|
|
11833
|
+
requestId: response.headers.get("x-request-id") ?? void 0
|
|
11834
|
+
});
|
|
11835
|
+
}
|
|
11836
|
+
},
|
|
11837
|
+
stream: (request, options = {}) => this.openResponseHandle(
|
|
11838
|
+
(signal) => openTurnStream(
|
|
11839
|
+
this.getAuthHeaders(),
|
|
11840
|
+
{
|
|
11841
|
+
...request,
|
|
11842
|
+
workspace_ext_id: request.workspace_ext_id ?? this.requireWorkspace(),
|
|
11843
|
+
stream: true,
|
|
11844
|
+
background: false,
|
|
11845
|
+
store: request.store ?? true
|
|
11846
|
+
},
|
|
11847
|
+
signal
|
|
11848
|
+
),
|
|
11849
|
+
options
|
|
11850
|
+
),
|
|
11851
|
+
retrieve: (id) => this.assistant.getResponse(id),
|
|
11852
|
+
cancel: (id) => this.assistant.cancel(id),
|
|
11853
|
+
attach: (id, options = {}) => this.assistant.attachResponse(id, options)
|
|
11854
|
+
};
|
|
11692
11855
|
// ── Assistant ─────────────────────────────────────────────────────────
|
|
11693
11856
|
assistant = {
|
|
11857
|
+
/** Create one synchronous Responses result and return validated JSON alongside the raw response. */
|
|
11858
|
+
parseResponse: async (request, options = {}) => {
|
|
11859
|
+
const parse = await createStructuredParser(request.text.format);
|
|
11860
|
+
const body = {
|
|
11861
|
+
...buildTurnRequest({
|
|
11862
|
+
...request,
|
|
11863
|
+
workspaceId: request.workspaceId ?? this.requireWorkspace()
|
|
11864
|
+
}),
|
|
11865
|
+
stream: false,
|
|
11866
|
+
background: false
|
|
11867
|
+
};
|
|
11868
|
+
const response = await this.recovering(
|
|
11869
|
+
() => openTurnStream(this.getAuthHeaders(), body, options.signal)
|
|
11870
|
+
);
|
|
11871
|
+
let rawText;
|
|
11872
|
+
try {
|
|
11873
|
+
rawText = await response.text();
|
|
11874
|
+
} catch (cause) {
|
|
11875
|
+
throw transportError(cause);
|
|
11876
|
+
}
|
|
11877
|
+
let raw;
|
|
11878
|
+
try {
|
|
11879
|
+
raw = JSON.parse(rawText);
|
|
11880
|
+
} catch (cause) {
|
|
11881
|
+
throw new ArbiStructuredOutputError("Expected a Responses JSON object.", rawText, {
|
|
11882
|
+
code: "RESPONSE_INVALID_ENVELOPE",
|
|
11883
|
+
cause,
|
|
11884
|
+
requestId: response.headers.get("x-request-id") ?? void 0
|
|
11885
|
+
});
|
|
11886
|
+
}
|
|
11887
|
+
return parse(raw, { requestId: response.headers.get("x-request-id") ?? void 0 });
|
|
11888
|
+
},
|
|
11694
11889
|
/** Start one response with a composable observer; existing ask callbacks remain unchanged. */
|
|
11695
11890
|
startResponse: async (request, options = {}) => {
|
|
11696
11891
|
const body = buildTurnRequest({
|
|
@@ -13255,6 +13450,55 @@ function getRunToAttach(localGeneration, messages) {
|
|
|
13255
13450
|
return getAttachableRunId(messages);
|
|
13256
13451
|
}
|
|
13257
13452
|
|
|
13258
|
-
|
|
13453
|
+
// src/configuration.ts
|
|
13454
|
+
function composeConfiguration(base, ...patches) {
|
|
13455
|
+
const result = structuredClone(base);
|
|
13456
|
+
for (const patch of patches) {
|
|
13457
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
13458
|
+
if (value === void 0) continue;
|
|
13459
|
+
result[key] = value && typeof value === "object" && !Array.isArray(value) ? { ...result[key] ?? {}, ...structuredClone(value) } : structuredClone(value);
|
|
13460
|
+
}
|
|
13461
|
+
}
|
|
13462
|
+
return result;
|
|
13463
|
+
}
|
|
13464
|
+
function instructions(text2) {
|
|
13465
|
+
return { QueryLLM: { SYSTEM_INSTRUCTION: text2 }, Agents: { PERSONA: text2 } };
|
|
13466
|
+
}
|
|
13467
|
+
function capabilities(options) {
|
|
13468
|
+
const flags = {
|
|
13469
|
+
webSearch: "WEB_SEARCH_ENABLED",
|
|
13470
|
+
codeExecution: "RUN_CODE_ENABLED",
|
|
13471
|
+
planning: "PLANNING_ENABLED",
|
|
13472
|
+
deepResearch: "DEEP_RESEARCH_ENABLED",
|
|
13473
|
+
subagents: "SUBAGENTS_ENABLED",
|
|
13474
|
+
humanInput: "HUMAN_IN_THE_LOOP"
|
|
13475
|
+
};
|
|
13476
|
+
const Agents = {};
|
|
13477
|
+
for (const key of Object.keys(flags)) {
|
|
13478
|
+
if (options[key] !== void 0) Agents[flags[key]] = options[key];
|
|
13479
|
+
}
|
|
13480
|
+
return { Agents };
|
|
13481
|
+
}
|
|
13482
|
+
function mcpTools(base, names, mode) {
|
|
13483
|
+
return {
|
|
13484
|
+
Agents: {
|
|
13485
|
+
MCP_TOOLS: [
|
|
13486
|
+
.../* @__PURE__ */ new Set([...mode === "add" ? base.Agents?.MCP_TOOLS ?? [] : [], ...names])
|
|
13487
|
+
]
|
|
13488
|
+
}
|
|
13489
|
+
};
|
|
13490
|
+
}
|
|
13491
|
+
function documentTools(options) {
|
|
13492
|
+
return {
|
|
13493
|
+
...options.search ? { retrieval_chunk: buildRetrievalChunkTool([...options.search]) } : {},
|
|
13494
|
+
...options.fullContext ? { retrieval_full_context: buildRetrievalFullContextTool([...options.fullContext]) } : {},
|
|
13495
|
+
...options.tableOfContents ? { retrieval_toc: buildRetrievalTocTool([...options.tableOfContents]) } : {}
|
|
13496
|
+
};
|
|
13497
|
+
}
|
|
13498
|
+
function composeTools(base, next, mode) {
|
|
13499
|
+
return structuredClone(mode === "add" ? { ...base, ...next } : next);
|
|
13500
|
+
}
|
|
13501
|
+
|
|
13502
|
+
export { ACCOUNT_VENDOR, Arbi, ArbiApiError, ArbiError, ArbiStructuredOutputError, ArbiTransportError, ArbiWorkspaceChangedError, ArbiWorkspaceSupersededError, CallApiError, DEFAULT_AI_USD_PER_GBP, DRIVE_SYNC_VENDORS, DuplicateContactError, ENTITY_KINDS, FLAT_TAG_KINDS, GOOGLE_VENDORS, IMANAGE_VENDORS, MAILBOX_SYNC_VENDORS, MAX_RETRIEVE_DOC_IDS, MICROSOFT_VENDORS, PRESENCE_KINDS, PROMPT_CONTEXT_CHARS, PlanStepsError, PublicBookingError, SHAREPOINT_VENDORS, STOP_ID_WAIT_MS, STOP_REPEAT_WINDOW_MS, TAG_KINDS, TAG_NESTING_MAX_DEPTH, WebSocketAuthError, account_exports as account, agentconfig_exports as agentconfig, appendTranscriptionHints, assistant_exports as assistant, authenticatedFetch, bookPublicSlot, buildCitationChunkData, buildDocumentTools, buildFactsContextTool, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, buildTurnRequest, calendar_exports as calendar, calls_exports as calls, canTagHaveParent, cancelPublicBooking, capabilities, chats_exports as chats, composeConfiguration, composeTools, computeRunStats, connectErrorMessage, connectWebSocket, connectWithReconnect, connectors_exports as connectors, contacts_exports as contacts, continuityPrompt, conversations_exports as conversations, countCitations, createAuthenticatedClient, createIndexAssigner, databases_exports as databases, defaultKindForFormat, doctags_exports as doctags, documentTools, documents_exports as documents, estimateDraftTokens, extractDocumentIdsFromMessages, extractFactIdsFromMessages, extractSubagentLanes, facts_exports as facts, files_exports as files, filterDocumentTags, filterSkills, findLeafForTaskMessage, findMainSiblingLeaf, findReplyTarget, findSubagentRunId, flattenTagTree, formatAgentStepLabel, formatFileSize, formatGbp, formatGbpPerMillionTokens, formatItemLabel, formatTokens, formatUserName, formatWorkspaceChoices, getAgentStepLabel, getAttachableRunId, getChildTags, getContextRemainingPercent, getContextUsedPercent, getContextUsedTokens, getCurrentStep, getEligibleParentTags, getErrorMessage, getPublicBookingPage, getRawWorkspaceKey, getRunToAttach, getRunToCancel, getStepDisplay, getStepTool, getSubagentBranchRecord, getTagDescendantIds, health_exports as health, house_template_exports as houseTemplates, hydrateAgentSteps, identityErrorCode, identity_exports as identityVerification, instructions, isAnnotationTag, isConnectorVendorVisible, isDriveSyncVendor, isEntityTag, isFlatKind, isLabelTag, isMailboxSyncVendor, isNearAiUsageBudget, isPresenceTag, isSharePointVendor, isSharedSkill, isTraceItem, mail_exports as mail, mcpTools, mergeAgentSteps, notifications_exports as notifications, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, parseStructuredResponse, performPasswordLogin, pickMainThread, profile_exports as profile, progressFetch, projects_exports as projects, quotaExceededFrom, quotaFromStreamError, reduceOutputItem, refusalReason, requireData, requireOk, resolveAuth, resolveCitations, resolveSummary, resolveWorkspace, responses_exports as responses, searchChunks, selectFullContextDocument, selectWorkspace, selectWorkspaceById, sessions_exports as sessions, settings_exports as settings, sliceToSubagentThread, streamSSE, stripCitationMarkdown, subagentJobLabel, summarizeCitations, tagUseCount, tags_exports as tags, tagsForScope, tagsOfGroup, topLevelAgentSteps, usdToGbp, work_exports as work, workflow_steps_exports as workflowSteps, workflows_exports as workflows, workspaces_exports as workspaces, wouldCreateTagCycle };
|
|
13259
13503
|
//# sourceMappingURL=browser.js.map
|
|
13260
13504
|
//# sourceMappingURL=browser.js.map
|