@arbidocs/sdk 0.4.18 → 0.4.25
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/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as ConfigStore, q as CliConfig, r as CliCredentials, C as ChatSession, al as SkippedFile, av as UploadResult, m as AuthHeaders, ar as UploadBatchResult, au as UploadOptions, as as UploadDirectOptions, at as UploadDirectResult, aj as SUPPORTED_EXTENSIONS, E as DmCryptoContext } from './browser-
|
|
2
|
-
export { A as ActivityKind, a as ActivityResponse, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArtifactEvent, l as AuthContext, n as AuthMode, o as AuthenticatedClient, p as CitationSummary, s as CommandDescriptor, u as ConnectOptions, v as ConversationResponse, y as CreateWorkRequest, z as CreateWorkflowRequest, D as DOC_TERMINAL_STATUSES, F as DocNameMap, G as DocumentListFields, H as DocumentListOrder, I as DocumentWaiter, J as DocumentWaiterOptions, N as FormattedWsMessage, O as ListAllOptions, Q as ListPaginatedOptions, R as MessageLevel, S as MessageMetadataPayload, T as MessageQueuedEvent, U as OutputTokensDetails, V as ParsedSlashCommand, W as PendingAuthResponse, X as PlanWorkRequest, Z as ProjectInvoicesResponse, _ as ProjectUsageResponse, $ as QueryOptions, a0 as ReconnectOptions, a1 as ReconnectableWsConnection, a2 as RequestApprovalRequest, a3 as ResolvedCitation, a4 as ResolvedRecipient, 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, 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, aL as buildDocNameMap, 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, aW as createDocumentWaiter, 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, b4 as formatStreamSummary, b5 as formatUserName, b6 as formatWorkspaceChoices, b7 as formatWsMessage, b8 as generateEncryptedWorkspaceKey, b9 as generateNewWorkspaceKey, ba as getErrorCode, bb as getErrorMessage, bc as getRawWorkspaceKey, bd as health, be as parseSSEEvents, bf as parseSlashCommand, bg as parseSlashTokenInProgress, bh as performPasswordLogin, bi as performSigningKeyLogin, bj as performSsoDeviceFlowLogin, 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
|
+
import { t as ConfigStore, q as CliConfig, r as CliCredentials, C as ChatSession, al as SkippedFile, av as UploadResult, m as AuthHeaders, ar as UploadBatchResult, au as UploadOptions, as as UploadDirectOptions, at as UploadDirectResult, aj as SUPPORTED_EXTENSIONS, E as DmCryptoContext } from './browser-C9-wve7D.cjs';
|
|
2
|
+
export { A as ActivityKind, a as ActivityResponse, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArtifactEvent, l as AuthContext, n as AuthMode, o as AuthenticatedClient, p as CitationSummary, s as CommandDescriptor, u as ConnectOptions, v as ConversationResponse, y as CreateWorkRequest, z as CreateWorkflowRequest, D as DOC_TERMINAL_STATUSES, F as DocNameMap, G as DocumentListFields, H as DocumentListOrder, I as DocumentWaiter, J as DocumentWaiterOptions, N as FormattedWsMessage, O as ListAllOptions, Q as ListPaginatedOptions, R as MessageLevel, S as MessageMetadataPayload, T as MessageQueuedEvent, U as OutputTokensDetails, V as ParsedSlashCommand, W as PendingAuthResponse, X as PlanWorkRequest, Z as ProjectInvoicesResponse, _ as ProjectUsageResponse, $ as QueryOptions, a0 as ReconnectOptions, a1 as ReconnectableWsConnection, a2 as RequestApprovalRequest, a3 as ResolvedCitation, a4 as ResolvedRecipient, 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, 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, aL as buildDocNameMap, 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, aW as createDocumentWaiter, 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, b4 as formatStreamSummary, b5 as formatUserName, b6 as formatWorkspaceChoices, b7 as formatWsMessage, b8 as generateEncryptedWorkspaceKey, b9 as generateNewWorkspaceKey, ba as getErrorCode, bb as getErrorMessage, bc as getRawWorkspaceKey, bd as health, be as parseSSEEvents, bf as parseSlashCommand, bg as parseSlashTokenInProgress, bh as performPasswordLogin, bi as performSigningKeyLogin, bj as performSsoDeviceFlowLogin, 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';
|
|
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 { t as ConfigStore, q as CliConfig, r as CliCredentials, C as ChatSession, al as SkippedFile, av as UploadResult, m as AuthHeaders, ar as UploadBatchResult, au as UploadOptions, as as UploadDirectOptions, at as UploadDirectResult, aj as SUPPORTED_EXTENSIONS, E as DmCryptoContext } from './browser-
|
|
2
|
-
export { A as ActivityKind, a as ActivityResponse, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArtifactEvent, l as AuthContext, n as AuthMode, o as AuthenticatedClient, p as CitationSummary, s as CommandDescriptor, u as ConnectOptions, v as ConversationResponse, y as CreateWorkRequest, z as CreateWorkflowRequest, D as DOC_TERMINAL_STATUSES, F as DocNameMap, G as DocumentListFields, H as DocumentListOrder, I as DocumentWaiter, J as DocumentWaiterOptions, N as FormattedWsMessage, O as ListAllOptions, Q as ListPaginatedOptions, R as MessageLevel, S as MessageMetadataPayload, T as MessageQueuedEvent, U as OutputTokensDetails, V as ParsedSlashCommand, W as PendingAuthResponse, X as PlanWorkRequest, Z as ProjectInvoicesResponse, _ as ProjectUsageResponse, $ as QueryOptions, a0 as ReconnectOptions, a1 as ReconnectableWsConnection, a2 as RequestApprovalRequest, a3 as ResolvedCitation, a4 as ResolvedRecipient, 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, 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, aL as buildDocNameMap, 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, aW as createDocumentWaiter, 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, b4 as formatStreamSummary, b5 as formatUserName, b6 as formatWorkspaceChoices, b7 as formatWsMessage, b8 as generateEncryptedWorkspaceKey, b9 as generateNewWorkspaceKey, ba as getErrorCode, bb as getErrorMessage, bc as getRawWorkspaceKey, bd as health, be as parseSSEEvents, bf as parseSlashCommand, bg as parseSlashTokenInProgress, bh as performPasswordLogin, bi as performSigningKeyLogin, bj as performSsoDeviceFlowLogin, 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
|
+
import { t as ConfigStore, q as CliConfig, r as CliCredentials, C as ChatSession, al as SkippedFile, av as UploadResult, m as AuthHeaders, ar as UploadBatchResult, au as UploadOptions, as as UploadDirectOptions, at as UploadDirectResult, aj as SUPPORTED_EXTENSIONS, E as DmCryptoContext } from './browser-C9-wve7D.js';
|
|
2
|
+
export { A as ActivityKind, a as ActivityResponse, d as AgentStepEvent, e as Arbi, f as ArbiApiError, g as ArbiError, i as ArbiOptions, j as ArbiSessionExpiredError, k as ArtifactEvent, l as AuthContext, n as AuthMode, o as AuthenticatedClient, p as CitationSummary, s as CommandDescriptor, u as ConnectOptions, v as ConversationResponse, y as CreateWorkRequest, z as CreateWorkflowRequest, D as DOC_TERMINAL_STATUSES, F as DocNameMap, G as DocumentListFields, H as DocumentListOrder, I as DocumentWaiter, J as DocumentWaiterOptions, N as FormattedWsMessage, O as ListAllOptions, Q as ListPaginatedOptions, R as MessageLevel, S as MessageMetadataPayload, T as MessageQueuedEvent, U as OutputTokensDetails, V as ParsedSlashCommand, W as PendingAuthResponse, X as PlanWorkRequest, Z as ProjectInvoicesResponse, _ as ProjectUsageResponse, $ as QueryOptions, a0 as ReconnectOptions, a1 as ReconnectableWsConnection, a2 as RequestApprovalRequest, a3 as ResolvedCitation, a4 as ResolvedRecipient, 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, 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, aL as buildDocNameMap, 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, aW as createDocumentWaiter, 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, b4 as formatStreamSummary, b5 as formatUserName, b6 as formatWorkspaceChoices, b7 as formatWsMessage, b8 as generateEncryptedWorkspaceKey, b9 as generateNewWorkspaceKey, ba as getErrorCode, bb as getErrorMessage, bc as getRawWorkspaceKey, bd as health, be as parseSSEEvents, bf as parseSlashCommand, bg as parseSlashTokenInProgress, bh as performPasswordLogin, bi as performSigningKeyLogin, bj as performSsoDeviceFlowLogin, 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';
|
|
3
3
|
import { SessionStorageProvider, ArbiClient, components } from '@arbidocs/client';
|
|
4
4
|
export { LoginProfile } from '@arbidocs/client';
|
|
5
5
|
|
package/dist/index.js
CHANGED
|
@@ -5483,9 +5483,20 @@ async function retrieve(options) {
|
|
|
5483
5483
|
return data;
|
|
5484
5484
|
}
|
|
5485
5485
|
async function queryAssistant(options) {
|
|
5486
|
-
const {
|
|
5486
|
+
const {
|
|
5487
|
+
workspaceId,
|
|
5488
|
+
question,
|
|
5489
|
+
docIds,
|
|
5490
|
+
previousResponseId,
|
|
5491
|
+
model,
|
|
5492
|
+
mentions,
|
|
5493
|
+
signal,
|
|
5494
|
+
activeArtifactExtId,
|
|
5495
|
+
...auth
|
|
5496
|
+
} = options;
|
|
5487
5497
|
const body = {
|
|
5488
5498
|
input: question,
|
|
5499
|
+
...activeArtifactExtId ? { active_artifact_ext_id: activeArtifactExtId } : {},
|
|
5489
5500
|
workspace_ext_id: workspaceId,
|
|
5490
5501
|
stream: true,
|
|
5491
5502
|
background: false,
|
|
@@ -5862,7 +5873,9 @@ async function sendEncryptedDM(arbi, messages, crypto) {
|
|
|
5862
5873
|
}))
|
|
5863
5874
|
);
|
|
5864
5875
|
const created = requireData(
|
|
5865
|
-
await arbi.fetch.POST("/v1/notifications/", {
|
|
5876
|
+
await arbi.fetch.POST("/v1/notifications/", {
|
|
5877
|
+
body: { messages: encrypted, context_only: false }
|
|
5878
|
+
}),
|
|
5866
5879
|
"Failed to send message"
|
|
5867
5880
|
);
|
|
5868
5881
|
return created.map((n2) => ({
|
|
@@ -5895,7 +5908,7 @@ async function requestWorkspaceAccess(arbi, params, crypto) {
|
|
|
5895
5908
|
async function sendDM(arbi, messages) {
|
|
5896
5909
|
return requireData(
|
|
5897
5910
|
await arbi.fetch.POST("/v1/notifications/", {
|
|
5898
|
-
body: { messages }
|
|
5911
|
+
body: { messages, context_only: false }
|
|
5899
5912
|
}),
|
|
5900
5913
|
"Failed to send message"
|
|
5901
5914
|
);
|
|
@@ -6871,6 +6884,40 @@ var Arbi = class {
|
|
|
6871
6884
|
assistantMode
|
|
6872
6885
|
)
|
|
6873
6886
|
};
|
|
6887
|
+
/** Persisted notifications also arrive on the normal workspace WebSocket. */
|
|
6888
|
+
notifications = {
|
|
6889
|
+
list: async (type) => {
|
|
6890
|
+
const { data, error } = await this.requireClient().fetch.GET("/v1/notifications/", {
|
|
6891
|
+
params: { query: { ...type ? { type } : {}, limit: 100 } }
|
|
6892
|
+
});
|
|
6893
|
+
if (error) throw new ArbiError("Could not load notifications");
|
|
6894
|
+
return data || [];
|
|
6895
|
+
},
|
|
6896
|
+
markRead: async (ids) => {
|
|
6897
|
+
if (!ids.length) return;
|
|
6898
|
+
const { error } = await this.requireClient().fetch.PATCH("/v1/notifications/", {
|
|
6899
|
+
body: { updates: ids.map((external_id) => ({ external_id, read: true })) }
|
|
6900
|
+
});
|
|
6901
|
+
if (error) throw new ArbiError("Could not mark notifications read");
|
|
6902
|
+
}
|
|
6903
|
+
};
|
|
6904
|
+
/** Authenticated native Word transport, with normal session recovery. */
|
|
6905
|
+
editor = {
|
|
6906
|
+
request: (path3, options = {}) => this.recovering(async () => {
|
|
6907
|
+
const { baseUrl, accessToken } = this.getAuthHeaders();
|
|
6908
|
+
const headers = new Headers(options.headers);
|
|
6909
|
+
headers.set("Authorization", `Bearer ${accessToken}`);
|
|
6910
|
+
const response = await fetch(`${baseUrl}/v1/editor${path3}`, { ...options, headers });
|
|
6911
|
+
if (!response.ok) {
|
|
6912
|
+
const body = await response.json().catch(() => null);
|
|
6913
|
+
throw new ArbiApiError(body?.detail || `Document request failed (${response.status})`, {
|
|
6914
|
+
status: response.status,
|
|
6915
|
+
statusText: response.statusText
|
|
6916
|
+
});
|
|
6917
|
+
}
|
|
6918
|
+
return response;
|
|
6919
|
+
})
|
|
6920
|
+
};
|
|
6874
6921
|
// ── Assistant ─────────────────────────────────────────────────────────
|
|
6875
6922
|
assistant = {
|
|
6876
6923
|
/**
|
|
@@ -6887,6 +6934,7 @@ var Arbi = class {
|
|
|
6887
6934
|
docIds: options.docIds,
|
|
6888
6935
|
previousResponseId: options.previousResponseId,
|
|
6889
6936
|
model: options.model,
|
|
6937
|
+
activeArtifactExtId: options.activeArtifactExtId,
|
|
6890
6938
|
signal: options.signal
|
|
6891
6939
|
})
|
|
6892
6940
|
);
|