@arbidocs/sdk 0.4.18 → 0.4.23
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-DY8mQOdF.d.cts → browser-C9-wve7D.d.cts} +55 -0
- package/dist/{browser-DY8mQOdF.d.ts → browser-C9-wve7D.d.ts} +55 -0
- package/dist/browser.cjs +51 -3
- 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 +51 -3
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +51 -3
- 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 +51 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/browser.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as ActivityKind, a as ActivityResponse, b as AgentControlStateEvent, c as AgentStepDeltaEvent, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, h as ArbiErrorEvent, i as ArbiOptions, k as ArtifactEvent, l as AuthContext, m as AuthHeaders, n as AuthMode, o as AuthenticatedClient, C as ChatSession, p as CitationSummary, q as CliConfig, r as CliCredentials, s as CommandDescriptor, t as ConfigStore, u as ConnectOptions, v as ConversationResponse, w as CreateFactRequest, x as CreateFactsRequest, y as CreateWorkRequest, z as CreateWorkflowRequest, B as DeferredInterjectionEvent, K as FactResponse, L as FactSearchRequest, M as FactSearchResponse, P as ListFactsOptions, S as MessageMetadataPayload, T as MessageQueuedEvent, U as OutputTokensDetails, V as ParsedSlashCommand, W as PendingAuthResponse, X as PlanWorkRequest, Y as ProbeAnswerEvent, Z as ProjectInvoicesResponse, _ as ProjectUsageResponse, $ as QueryOptions, a0 as ReconnectOptions, a1 as ReconnectableWsConnection, a2 as RequestApprovalRequest, a3 as ResolvedCitation, a5 as ResponseCompletedEvent, a6 as ResponseContentPartAddedEvent, a7 as ResponseCreatedEvent, a8 as ResponseFailedEvent, a9 as ResponseOutputItemAddedEvent, aa as ResponseOutputItemDoneEvent, ab as ResponseOutputTextDeltaEvent, ac as ResponseOutputTextDoneEvent, ad as ResponseUsage, ae as ReviewWorkRequest, af as SSEEvent, ag as SSEStreamCallbacks, ah as SSEStreamResult, ai as SSEStreamStartData, ak as SkillSummary, am as TaskPlan, an as TokenBudgetContext, ao as UpdateConversationRequest, ap as UpdateFactRequest, aq as UpdateWorkflowRequest, aw as UserDailyUsageResponse, ax as UserInfo, ay as UserInputRequestEvent, az as UserMessageEvent, aA as WebSocketAuthError, aB as WorkStatus, aC as WorkflowAuthMode, aD as WorkflowResponse, aE as WorkflowRunResponse, aF as WorkspaceContext, aG as WsConnection, aH as account, aI as agentconfig, aJ as assistant, aK as authenticatedFetch, aM as buildRetrievalChunkTool, aN as buildRetrievalFullContextTool, aO as buildRetrievalTocTool, aP as connectWebSocket, aQ as connectWithReconnect, aR as consumeSSEStream, aS as contacts, aT as conversations, aU as countCitations, aV as createAuthenticatedClient, aX as dm, aY as doctags, aZ as documents, a_ as facts, a$ as files, b0 as filterSkills, b1 as formatAgentStepLabel, b2 as formatFileSize, b3 as formatItemLabel, b5 as formatUserName, b6 as formatWorkspaceChoices, bb as getErrorMessage, bc as getRawWorkspaceKey, bd as health, be as parseSSEEvents, bf as parseSlashCommand, bg as parseSlashTokenInProgress, bh as performPasswordLogin, bk as profile, bl as projects, bm as requireData, bn as requireOk, bo as resolveAuth, bp as resolveCitations, bq as resolveWorkspace, br as responses, bs as selectWorkspace, bt as selectWorkspaceById, bu as sessions, bv as settings, bw as streamSSE, bx as stripCitationMarkdown, by as summarizeCitations, bz as tags, bA as work, bB as workflows, bC as workspaces } from './browser-
|
|
1
|
+
export { A as ActivityKind, a as ActivityResponse, b as AgentControlStateEvent, c as AgentStepDeltaEvent, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, h as ArbiErrorEvent, i as ArbiOptions, k as ArtifactEvent, l as AuthContext, m as AuthHeaders, n as AuthMode, o as AuthenticatedClient, C as ChatSession, p as CitationSummary, q as CliConfig, r as CliCredentials, s as CommandDescriptor, t as ConfigStore, u as ConnectOptions, v as ConversationResponse, w as CreateFactRequest, x as CreateFactsRequest, y as CreateWorkRequest, z as CreateWorkflowRequest, B as DeferredInterjectionEvent, K as FactResponse, L as FactSearchRequest, M as FactSearchResponse, P as ListFactsOptions, S as MessageMetadataPayload, T as MessageQueuedEvent, U as OutputTokensDetails, V as ParsedSlashCommand, W as PendingAuthResponse, X as PlanWorkRequest, Y as ProbeAnswerEvent, Z as ProjectInvoicesResponse, _ as ProjectUsageResponse, $ as QueryOptions, a0 as ReconnectOptions, a1 as ReconnectableWsConnection, a2 as RequestApprovalRequest, a3 as ResolvedCitation, a5 as ResponseCompletedEvent, a6 as ResponseContentPartAddedEvent, a7 as ResponseCreatedEvent, a8 as ResponseFailedEvent, a9 as ResponseOutputItemAddedEvent, aa as ResponseOutputItemDoneEvent, ab as ResponseOutputTextDeltaEvent, ac as ResponseOutputTextDoneEvent, ad as ResponseUsage, ae as ReviewWorkRequest, af as SSEEvent, ag as SSEStreamCallbacks, ah as SSEStreamResult, ai as SSEStreamStartData, ak as SkillSummary, am as TaskPlan, an as TokenBudgetContext, ao as UpdateConversationRequest, ap as UpdateFactRequest, aq as UpdateWorkflowRequest, aw as UserDailyUsageResponse, ax as UserInfo, ay as UserInputRequestEvent, az as UserMessageEvent, aA as WebSocketAuthError, aB as WorkStatus, aC as WorkflowAuthMode, aD as WorkflowResponse, aE as WorkflowRunResponse, aF as WorkspaceContext, aG as WsConnection, aH as account, aI as agentconfig, aJ as assistant, aK as authenticatedFetch, aM as buildRetrievalChunkTool, aN as buildRetrievalFullContextTool, aO as buildRetrievalTocTool, aP as connectWebSocket, aQ as connectWithReconnect, aR as consumeSSEStream, aS as contacts, aT as conversations, aU as countCitations, aV as createAuthenticatedClient, aX as dm, aY as doctags, aZ as documents, a_ as facts, a$ as files, b0 as filterSkills, b1 as formatAgentStepLabel, b2 as formatFileSize, b3 as formatItemLabel, b5 as formatUserName, b6 as formatWorkspaceChoices, bb as getErrorMessage, bc as getRawWorkspaceKey, bd as health, be as parseSSEEvents, bf as parseSlashCommand, bg as parseSlashTokenInProgress, bh as performPasswordLogin, bk as profile, bl as projects, bm as requireData, bn as requireOk, bo as resolveAuth, bp as resolveCitations, bq as resolveWorkspace, br as responses, bs as selectWorkspace, bt as selectWorkspaceById, bu as sessions, bv as settings, bw as streamSSE, bx as stripCitationMarkdown, by as summarizeCitations, bz as tags, bA as work, bB as workflows, bC as workspaces } from './browser-C9-wve7D.cjs';
|
|
2
2
|
export { LoginProfile } from '@arbidocs/client';
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as ActivityKind, a as ActivityResponse, b as AgentControlStateEvent, c as AgentStepDeltaEvent, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, h as ArbiErrorEvent, i as ArbiOptions, k as ArtifactEvent, l as AuthContext, m as AuthHeaders, n as AuthMode, o as AuthenticatedClient, C as ChatSession, p as CitationSummary, q as CliConfig, r as CliCredentials, s as CommandDescriptor, t as ConfigStore, u as ConnectOptions, v as ConversationResponse, w as CreateFactRequest, x as CreateFactsRequest, y as CreateWorkRequest, z as CreateWorkflowRequest, B as DeferredInterjectionEvent, K as FactResponse, L as FactSearchRequest, M as FactSearchResponse, P as ListFactsOptions, S as MessageMetadataPayload, T as MessageQueuedEvent, U as OutputTokensDetails, V as ParsedSlashCommand, W as PendingAuthResponse, X as PlanWorkRequest, Y as ProbeAnswerEvent, Z as ProjectInvoicesResponse, _ as ProjectUsageResponse, $ as QueryOptions, a0 as ReconnectOptions, a1 as ReconnectableWsConnection, a2 as RequestApprovalRequest, a3 as ResolvedCitation, a5 as ResponseCompletedEvent, a6 as ResponseContentPartAddedEvent, a7 as ResponseCreatedEvent, a8 as ResponseFailedEvent, a9 as ResponseOutputItemAddedEvent, aa as ResponseOutputItemDoneEvent, ab as ResponseOutputTextDeltaEvent, ac as ResponseOutputTextDoneEvent, ad as ResponseUsage, ae as ReviewWorkRequest, af as SSEEvent, ag as SSEStreamCallbacks, ah as SSEStreamResult, ai as SSEStreamStartData, ak as SkillSummary, am as TaskPlan, an as TokenBudgetContext, ao as UpdateConversationRequest, ap as UpdateFactRequest, aq as UpdateWorkflowRequest, aw as UserDailyUsageResponse, ax as UserInfo, ay as UserInputRequestEvent, az as UserMessageEvent, aA as WebSocketAuthError, aB as WorkStatus, aC as WorkflowAuthMode, aD as WorkflowResponse, aE as WorkflowRunResponse, aF as WorkspaceContext, aG as WsConnection, aH as account, aI as agentconfig, aJ as assistant, aK as authenticatedFetch, aM as buildRetrievalChunkTool, aN as buildRetrievalFullContextTool, aO as buildRetrievalTocTool, aP as connectWebSocket, aQ as connectWithReconnect, aR as consumeSSEStream, aS as contacts, aT as conversations, aU as countCitations, aV as createAuthenticatedClient, aX as dm, aY as doctags, aZ as documents, a_ as facts, a$ as files, b0 as filterSkills, b1 as formatAgentStepLabel, b2 as formatFileSize, b3 as formatItemLabel, b5 as formatUserName, b6 as formatWorkspaceChoices, bb as getErrorMessage, bc as getRawWorkspaceKey, bd as health, be as parseSSEEvents, bf as parseSlashCommand, bg as parseSlashTokenInProgress, bh as performPasswordLogin, bk as profile, bl as projects, bm as requireData, bn as requireOk, bo as resolveAuth, bp as resolveCitations, bq as resolveWorkspace, br as responses, bs as selectWorkspace, bt as selectWorkspaceById, bu as sessions, bv as settings, bw as streamSSE, bx as stripCitationMarkdown, by as summarizeCitations, bz as tags, bA as work, bB as workflows, bC as workspaces } from './browser-
|
|
1
|
+
export { A as ActivityKind, a as ActivityResponse, b as AgentControlStateEvent, c as AgentStepDeltaEvent, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, h as ArbiErrorEvent, i as ArbiOptions, k as ArtifactEvent, l as AuthContext, m as AuthHeaders, n as AuthMode, o as AuthenticatedClient, C as ChatSession, p as CitationSummary, q as CliConfig, r as CliCredentials, s as CommandDescriptor, t as ConfigStore, u as ConnectOptions, v as ConversationResponse, w as CreateFactRequest, x as CreateFactsRequest, y as CreateWorkRequest, z as CreateWorkflowRequest, B as DeferredInterjectionEvent, K as FactResponse, L as FactSearchRequest, M as FactSearchResponse, P as ListFactsOptions, S as MessageMetadataPayload, T as MessageQueuedEvent, U as OutputTokensDetails, V as ParsedSlashCommand, W as PendingAuthResponse, X as PlanWorkRequest, Y as ProbeAnswerEvent, Z as ProjectInvoicesResponse, _ as ProjectUsageResponse, $ as QueryOptions, a0 as ReconnectOptions, a1 as ReconnectableWsConnection, a2 as RequestApprovalRequest, a3 as ResolvedCitation, a5 as ResponseCompletedEvent, a6 as ResponseContentPartAddedEvent, a7 as ResponseCreatedEvent, a8 as ResponseFailedEvent, a9 as ResponseOutputItemAddedEvent, aa as ResponseOutputItemDoneEvent, ab as ResponseOutputTextDeltaEvent, ac as ResponseOutputTextDoneEvent, ad as ResponseUsage, ae as ReviewWorkRequest, af as SSEEvent, ag as SSEStreamCallbacks, ah as SSEStreamResult, ai as SSEStreamStartData, ak as SkillSummary, am as TaskPlan, an as TokenBudgetContext, ao as UpdateConversationRequest, ap as UpdateFactRequest, aq as UpdateWorkflowRequest, aw as UserDailyUsageResponse, ax as UserInfo, ay as UserInputRequestEvent, az as UserMessageEvent, aA as WebSocketAuthError, aB as WorkStatus, aC as WorkflowAuthMode, aD as WorkflowResponse, aE as WorkflowRunResponse, aF as WorkspaceContext, aG as WsConnection, aH as account, aI as agentconfig, aJ as assistant, aK as authenticatedFetch, aM as buildRetrievalChunkTool, aN as buildRetrievalFullContextTool, aO as buildRetrievalTocTool, aP as connectWebSocket, aQ as connectWithReconnect, aR as consumeSSEStream, aS as contacts, aT as conversations, aU as countCitations, aV as createAuthenticatedClient, aX as dm, aY as doctags, aZ as documents, a_ as facts, a$ as files, b0 as filterSkills, b1 as formatAgentStepLabel, b2 as formatFileSize, b3 as formatItemLabel, b5 as formatUserName, b6 as formatWorkspaceChoices, bb as getErrorMessage, bc as getRawWorkspaceKey, bd as health, be as parseSSEEvents, bf as parseSlashCommand, bg as parseSlashTokenInProgress, bh as performPasswordLogin, bk as profile, bl as projects, bm as requireData, bn as requireOk, bo as resolveAuth, bp as resolveCitations, bq as resolveWorkspace, br as responses, bs as selectWorkspace, bt as selectWorkspaceById, bu as sessions, bv as settings, bw as streamSSE, bx as stripCitationMarkdown, by as summarizeCitations, bz as tags, bA as work, bB as workflows, bC as workspaces } from './browser-C9-wve7D.js';
|
|
2
2
|
export { LoginProfile } from '@arbidocs/client';
|
package/dist/browser.js
CHANGED
|
@@ -4940,9 +4940,20 @@ async function retrieve(options) {
|
|
|
4940
4940
|
return data;
|
|
4941
4941
|
}
|
|
4942
4942
|
async function queryAssistant(options) {
|
|
4943
|
-
const {
|
|
4943
|
+
const {
|
|
4944
|
+
workspaceId,
|
|
4945
|
+
question,
|
|
4946
|
+
docIds,
|
|
4947
|
+
previousResponseId,
|
|
4948
|
+
model,
|
|
4949
|
+
mentions,
|
|
4950
|
+
signal,
|
|
4951
|
+
activeArtifactExtId,
|
|
4952
|
+
...auth
|
|
4953
|
+
} = options;
|
|
4944
4954
|
const body = {
|
|
4945
4955
|
input: question,
|
|
4956
|
+
...activeArtifactExtId ? { active_artifact_ext_id: activeArtifactExtId } : {},
|
|
4946
4957
|
workspace_ext_id: workspaceId,
|
|
4947
4958
|
stream: true,
|
|
4948
4959
|
background: false,
|
|
@@ -5309,7 +5320,9 @@ async function sendEncryptedDM(arbi, messages, crypto) {
|
|
|
5309
5320
|
}))
|
|
5310
5321
|
);
|
|
5311
5322
|
const created = requireData(
|
|
5312
|
-
await arbi.fetch.POST("/v1/notifications/", {
|
|
5323
|
+
await arbi.fetch.POST("/v1/notifications/", {
|
|
5324
|
+
body: { messages: encrypted, context_only: false }
|
|
5325
|
+
}),
|
|
5313
5326
|
"Failed to send message"
|
|
5314
5327
|
);
|
|
5315
5328
|
return created.map((n2) => ({
|
|
@@ -5342,7 +5355,7 @@ async function requestWorkspaceAccess(arbi, params, crypto) {
|
|
|
5342
5355
|
async function sendDM(arbi, messages) {
|
|
5343
5356
|
return requireData(
|
|
5344
5357
|
await arbi.fetch.POST("/v1/notifications/", {
|
|
5345
|
-
body: { messages }
|
|
5358
|
+
body: { messages, context_only: false }
|
|
5346
5359
|
}),
|
|
5347
5360
|
"Failed to send message"
|
|
5348
5361
|
);
|
|
@@ -6318,6 +6331,40 @@ var Arbi = class {
|
|
|
6318
6331
|
assistantMode
|
|
6319
6332
|
)
|
|
6320
6333
|
};
|
|
6334
|
+
/** Persisted notifications also arrive on the normal workspace WebSocket. */
|
|
6335
|
+
notifications = {
|
|
6336
|
+
list: async (type) => {
|
|
6337
|
+
const { data, error } = await this.requireClient().fetch.GET("/v1/notifications/", {
|
|
6338
|
+
params: { query: { ...type ? { type } : {}, limit: 100 } }
|
|
6339
|
+
});
|
|
6340
|
+
if (error) throw new ArbiError("Could not load notifications");
|
|
6341
|
+
return data || [];
|
|
6342
|
+
},
|
|
6343
|
+
markRead: async (ids) => {
|
|
6344
|
+
if (!ids.length) return;
|
|
6345
|
+
const { error } = await this.requireClient().fetch.PATCH("/v1/notifications/", {
|
|
6346
|
+
body: { updates: ids.map((external_id) => ({ external_id, read: true })) }
|
|
6347
|
+
});
|
|
6348
|
+
if (error) throw new ArbiError("Could not mark notifications read");
|
|
6349
|
+
}
|
|
6350
|
+
};
|
|
6351
|
+
/** Authenticated native Word transport, with normal session recovery. */
|
|
6352
|
+
editor = {
|
|
6353
|
+
request: (path, options = {}) => this.recovering(async () => {
|
|
6354
|
+
const { baseUrl, accessToken } = this.getAuthHeaders();
|
|
6355
|
+
const headers = new Headers(options.headers);
|
|
6356
|
+
headers.set("Authorization", `Bearer ${accessToken}`);
|
|
6357
|
+
const response = await fetch(`${baseUrl}/v1/editor${path}`, { ...options, headers });
|
|
6358
|
+
if (!response.ok) {
|
|
6359
|
+
const body = await response.json().catch(() => null);
|
|
6360
|
+
throw new ArbiApiError(body?.detail || `Document request failed (${response.status})`, {
|
|
6361
|
+
status: response.status,
|
|
6362
|
+
statusText: response.statusText
|
|
6363
|
+
});
|
|
6364
|
+
}
|
|
6365
|
+
return response;
|
|
6366
|
+
})
|
|
6367
|
+
};
|
|
6321
6368
|
// ── Assistant ─────────────────────────────────────────────────────────
|
|
6322
6369
|
assistant = {
|
|
6323
6370
|
/**
|
|
@@ -6334,6 +6381,7 @@ var Arbi = class {
|
|
|
6334
6381
|
docIds: options.docIds,
|
|
6335
6382
|
previousResponseId: options.previousResponseId,
|
|
6336
6383
|
model: options.model,
|
|
6384
|
+
activeArtifactExtId: options.activeArtifactExtId,
|
|
6337
6385
|
signal: options.signal
|
|
6338
6386
|
})
|
|
6339
6387
|
);
|