@arbidocs/sdk 0.3.17 → 0.3.18
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-BtAHbiq_.d.cts → browser-DUQ3Eyvd.d.cts} +14 -1
- package/dist/{browser-BtAHbiq_.d.ts → browser-DUQ3Eyvd.d.ts} +14 -1
- package/dist/browser.cjs +4 -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 +4 -1
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +139 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +63 -3
- package/dist/index.d.ts +63 -3
- package/dist/index.js +138 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/browser.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { f as AgentStepEvent, g as Arbi, h as ArbiApiError, i as ArbiError, j as ArbiOptions, k as ArtifactEvent, l as AuthContext, A as AuthHeaders, m as AuthenticatedClient, c as ChatSession, n as CitationSummary, a as CliConfig, b as CliCredentials, C as ConfigStore, o as ConnectOptions, L as LIFECYCLE_LABELS, q as MessageMetadataPayload, r as MessageQueuedEvent, O as OutputTokensDetails, Q as QueryOptions, R as ReconnectOptions, s as ReconnectableWsConnection, t as ResolvedCitation, u as ResponseCompletedEvent, v as ResponseContentPartAddedEvent, w as ResponseCreatedEvent, x as ResponseFailedEvent, y as ResponseOutputItemAddedEvent, z as ResponseOutputItemDoneEvent, B as ResponseOutputTextDeltaEvent, E as ResponseOutputTextDoneEvent, G as ResponseUsage, S as SSEEvent, H as SSEStreamCallbacks, I as SSEStreamResult, J as SSEStreamStartData, T as TOOL_LABELS, K as UserInfo, N as UserInputRequestEvent, P as UserMessageEvent, W as WorkspaceContext, V as WsConnection, X as agentconfig, Y as assistant, Z as authenticatedFetch, _ as buildRetrievalChunkTool, $ as buildRetrievalFullContextTool, a0 as buildRetrievalTocTool, a1 as connectWebSocket, a2 as connectWithReconnect, a3 as consumeSSEStream, a4 as contacts, a5 as conversations, a6 as countCitations, a7 as createAuthenticatedClient, a9 as dm, aa as doctags, ab as documents, ac as files, ad as formatAgentStepLabel, ae as formatFileSize, ag as formatUserName, ah as formatWorkspaceChoices, al as getErrorMessage, am as health, an as parseSSEEvents, ao as performPasswordLogin,
|
|
1
|
+
export { f as AgentStepEvent, g as Arbi, h as ArbiApiError, i as ArbiError, j as ArbiOptions, k as ArtifactEvent, l as AuthContext, A as AuthHeaders, m as AuthenticatedClient, c as ChatSession, n as CitationSummary, a as CliConfig, b as CliCredentials, C as ConfigStore, o as ConnectOptions, L as LIFECYCLE_LABELS, q as MessageMetadataPayload, r as MessageQueuedEvent, O as OutputTokensDetails, Q as QueryOptions, R as ReconnectOptions, s as ReconnectableWsConnection, t as ResolvedCitation, u as ResponseCompletedEvent, v as ResponseContentPartAddedEvent, w as ResponseCreatedEvent, x as ResponseFailedEvent, y as ResponseOutputItemAddedEvent, z as ResponseOutputItemDoneEvent, B as ResponseOutputTextDeltaEvent, E as ResponseOutputTextDoneEvent, G as ResponseUsage, S as SSEEvent, H as SSEStreamCallbacks, I as SSEStreamResult, J as SSEStreamStartData, T as TOOL_LABELS, K as UserInfo, N as UserInputRequestEvent, P as UserMessageEvent, W as WorkspaceContext, V as WsConnection, X as agentconfig, Y as assistant, Z as authenticatedFetch, _ as buildRetrievalChunkTool, $ as buildRetrievalFullContextTool, a0 as buildRetrievalTocTool, a1 as connectWebSocket, a2 as connectWithReconnect, a3 as consumeSSEStream, a4 as contacts, a5 as conversations, a6 as countCitations, a7 as createAuthenticatedClient, a9 as dm, aa as doctags, ab as documents, ac as files, ad as formatAgentStepLabel, ae as formatFileSize, ag as formatUserName, ah as formatWorkspaceChoices, al as getErrorMessage, am as health, an as parseSSEEvents, ao as performPasswordLogin, aq as requireData, ar as requireOk, as as resolveAuth, at as resolveCitations, au as resolveWorkspace, av as responses, aw as selectWorkspace, ax as selectWorkspaceById, ay as settings, az as streamSSE, aA as stripCitationMarkdown, aB as summarizeCitations, aC as tags, aD as workspaces } from './browser-DUQ3Eyvd.cjs';
|
|
2
2
|
import '@arbidocs/client';
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { f as AgentStepEvent, g as Arbi, h as ArbiApiError, i as ArbiError, j as ArbiOptions, k as ArtifactEvent, l as AuthContext, A as AuthHeaders, m as AuthenticatedClient, c as ChatSession, n as CitationSummary, a as CliConfig, b as CliCredentials, C as ConfigStore, o as ConnectOptions, L as LIFECYCLE_LABELS, q as MessageMetadataPayload, r as MessageQueuedEvent, O as OutputTokensDetails, Q as QueryOptions, R as ReconnectOptions, s as ReconnectableWsConnection, t as ResolvedCitation, u as ResponseCompletedEvent, v as ResponseContentPartAddedEvent, w as ResponseCreatedEvent, x as ResponseFailedEvent, y as ResponseOutputItemAddedEvent, z as ResponseOutputItemDoneEvent, B as ResponseOutputTextDeltaEvent, E as ResponseOutputTextDoneEvent, G as ResponseUsage, S as SSEEvent, H as SSEStreamCallbacks, I as SSEStreamResult, J as SSEStreamStartData, T as TOOL_LABELS, K as UserInfo, N as UserInputRequestEvent, P as UserMessageEvent, W as WorkspaceContext, V as WsConnection, X as agentconfig, Y as assistant, Z as authenticatedFetch, _ as buildRetrievalChunkTool, $ as buildRetrievalFullContextTool, a0 as buildRetrievalTocTool, a1 as connectWebSocket, a2 as connectWithReconnect, a3 as consumeSSEStream, a4 as contacts, a5 as conversations, a6 as countCitations, a7 as createAuthenticatedClient, a9 as dm, aa as doctags, ab as documents, ac as files, ad as formatAgentStepLabel, ae as formatFileSize, ag as formatUserName, ah as formatWorkspaceChoices, al as getErrorMessage, am as health, an as parseSSEEvents, ao as performPasswordLogin,
|
|
1
|
+
export { f as AgentStepEvent, g as Arbi, h as ArbiApiError, i as ArbiError, j as ArbiOptions, k as ArtifactEvent, l as AuthContext, A as AuthHeaders, m as AuthenticatedClient, c as ChatSession, n as CitationSummary, a as CliConfig, b as CliCredentials, C as ConfigStore, o as ConnectOptions, L as LIFECYCLE_LABELS, q as MessageMetadataPayload, r as MessageQueuedEvent, O as OutputTokensDetails, Q as QueryOptions, R as ReconnectOptions, s as ReconnectableWsConnection, t as ResolvedCitation, u as ResponseCompletedEvent, v as ResponseContentPartAddedEvent, w as ResponseCreatedEvent, x as ResponseFailedEvent, y as ResponseOutputItemAddedEvent, z as ResponseOutputItemDoneEvent, B as ResponseOutputTextDeltaEvent, E as ResponseOutputTextDoneEvent, G as ResponseUsage, S as SSEEvent, H as SSEStreamCallbacks, I as SSEStreamResult, J as SSEStreamStartData, T as TOOL_LABELS, K as UserInfo, N as UserInputRequestEvent, P as UserMessageEvent, W as WorkspaceContext, V as WsConnection, X as agentconfig, Y as assistant, Z as authenticatedFetch, _ as buildRetrievalChunkTool, $ as buildRetrievalFullContextTool, a0 as buildRetrievalTocTool, a1 as connectWebSocket, a2 as connectWithReconnect, a3 as consumeSSEStream, a4 as contacts, a5 as conversations, a6 as countCitations, a7 as createAuthenticatedClient, a9 as dm, aa as doctags, ab as documents, ac as files, ad as formatAgentStepLabel, ae as formatFileSize, ag as formatUserName, ah as formatWorkspaceChoices, al as getErrorMessage, am as health, an as parseSSEEvents, ao as performPasswordLogin, aq as requireData, ar as requireOk, as as resolveAuth, at as resolveCitations, au as resolveWorkspace, av as responses, aw as selectWorkspace, ax as selectWorkspaceById, ay as settings, az as streamSSE, aA as stripCitationMarkdown, aB as summarizeCitations, aC as tags, aD as workspaces } from './browser-DUQ3Eyvd.js';
|
|
2
2
|
import '@arbidocs/client';
|
package/dist/browser.js
CHANGED
|
@@ -96,6 +96,8 @@ async function authenticatedFetch(options) {
|
|
|
96
96
|
}
|
|
97
97
|
return res;
|
|
98
98
|
}
|
|
99
|
+
|
|
100
|
+
// src/auth.ts
|
|
99
101
|
function formatWorkspaceChoices(wsList) {
|
|
100
102
|
return wsList.map((ws) => {
|
|
101
103
|
const totalDocs = ws.shared_document_count + ws.private_document_count;
|
|
@@ -116,7 +118,8 @@ async function createAuthenticatedClient(config, creds, store) {
|
|
|
116
118
|
const signingPrivateKey = base64ToBytes(creds.signingPrivateKeyBase64);
|
|
117
119
|
const loginResult = await arbi.auth.loginWithKey({
|
|
118
120
|
email: creds.email,
|
|
119
|
-
signingPrivateKey
|
|
121
|
+
signingPrivateKey,
|
|
122
|
+
ssoToken: creds.ssoToken
|
|
120
123
|
});
|
|
121
124
|
store.saveCredentials({
|
|
122
125
|
...creds,
|