@arbidocs/sdk 0.3.48 → 0.3.50
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-EMgd4bP4.d.cts → browser-BJdLTFSM.d.cts} +5 -4
- package/dist/{browser-EMgd4bP4.d.ts → browser-BJdLTFSM.d.ts} +5 -4
- package/dist/browser.cjs +5 -4
- 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 +5 -4
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +7 -5
- 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 +7 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/browser.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { i as AgentStepEvent, j as Arbi, k as ArbiApiError, l as ArbiError, m as ArbiOptions, n as ArtifactEvent, o as AuthContext, A as AuthHeaders, p as AuthenticatedClient, c as ChatSession, q as CitationSummary, a as CliConfig, b as CliCredentials, C as ConfigStore, r as ConnectOptions, y as MessageMetadataPayload, z as MessageQueuedEvent, O as OutputTokensDetails, Q as QueryOptions, R as ReconnectOptions, B as ReconnectableWsConnection, E as ResolvedCitation, G as ResponseCompletedEvent, H as ResponseContentPartAddedEvent, I as ResponseCreatedEvent, J as ResponseFailedEvent, K as ResponseOutputItemAddedEvent, N as ResponseOutputItemDoneEvent, P as ResponseOutputTextDeltaEvent, T as ResponseOutputTextDoneEvent, V as ResponseUsage, W as SSEEvent, X as SSEStreamCallbacks, Y as SSEStreamResult, Z as SSEStreamStartData, _ as UserInfo, $ as UserInputRequestEvent, a0 as UserMessageEvent, a1 as WorkspaceContext, a2 as WsConnection, a3 as agentconfig, a4 as assistant, a5 as authenticatedFetch, a6 as buildRetrievalChunkTool, a7 as buildRetrievalFullContextTool, a8 as buildRetrievalTocTool, a9 as connectWebSocket, aa as connectWithReconnect, ab as consumeSSEStream, ac as contacts, ad as conversations, ae as countCitations, af as createAuthenticatedClient, ah as dm, ai as doctags, aj as documents, ak as files, al as formatAgentStepLabel, am as formatFileSize, ao as formatUserName, ap as formatWorkspaceChoices, au as getErrorMessage, av as getRawWorkspaceKey, aw as health, ax as parseSSEEvents, ay as performPasswordLogin, aB as requireData, aC as requireOk, aD as resolveAuth, aE as resolveCitations, aF as resolveWorkspace, aG as responses, aH as selectWorkspace, aI as selectWorkspaceById, aJ as settings, aK as streamSSE, aL as stripCitationMarkdown, aM as summarizeCitations, aN as tags, aO as workspaces } from './browser-
|
|
1
|
+
export { i as AgentStepEvent, j as Arbi, k as ArbiApiError, l as ArbiError, m as ArbiOptions, n as ArtifactEvent, o as AuthContext, A as AuthHeaders, p as AuthenticatedClient, c as ChatSession, q as CitationSummary, a as CliConfig, b as CliCredentials, C as ConfigStore, r as ConnectOptions, y as MessageMetadataPayload, z as MessageQueuedEvent, O as OutputTokensDetails, Q as QueryOptions, R as ReconnectOptions, B as ReconnectableWsConnection, E as ResolvedCitation, G as ResponseCompletedEvent, H as ResponseContentPartAddedEvent, I as ResponseCreatedEvent, J as ResponseFailedEvent, K as ResponseOutputItemAddedEvent, N as ResponseOutputItemDoneEvent, P as ResponseOutputTextDeltaEvent, T as ResponseOutputTextDoneEvent, V as ResponseUsage, W as SSEEvent, X as SSEStreamCallbacks, Y as SSEStreamResult, Z as SSEStreamStartData, _ as UserInfo, $ as UserInputRequestEvent, a0 as UserMessageEvent, a1 as WorkspaceContext, a2 as WsConnection, a3 as agentconfig, a4 as assistant, a5 as authenticatedFetch, a6 as buildRetrievalChunkTool, a7 as buildRetrievalFullContextTool, a8 as buildRetrievalTocTool, a9 as connectWebSocket, aa as connectWithReconnect, ab as consumeSSEStream, ac as contacts, ad as conversations, ae as countCitations, af as createAuthenticatedClient, ah as dm, ai as doctags, aj as documents, ak as files, al as formatAgentStepLabel, am as formatFileSize, ao as formatUserName, ap as formatWorkspaceChoices, au as getErrorMessage, av as getRawWorkspaceKey, aw as health, ax as parseSSEEvents, ay as performPasswordLogin, aB as requireData, aC as requireOk, aD as resolveAuth, aE as resolveCitations, aF as resolveWorkspace, aG as responses, aH as selectWorkspace, aI as selectWorkspaceById, aJ as settings, aK as streamSSE, aL as stripCitationMarkdown, aM as summarizeCitations, aN as tags, aO as workspaces } from './browser-BJdLTFSM.cjs';
|
|
2
2
|
import '@arbidocs/client';
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { i as AgentStepEvent, j as Arbi, k as ArbiApiError, l as ArbiError, m as ArbiOptions, n as ArtifactEvent, o as AuthContext, A as AuthHeaders, p as AuthenticatedClient, c as ChatSession, q as CitationSummary, a as CliConfig, b as CliCredentials, C as ConfigStore, r as ConnectOptions, y as MessageMetadataPayload, z as MessageQueuedEvent, O as OutputTokensDetails, Q as QueryOptions, R as ReconnectOptions, B as ReconnectableWsConnection, E as ResolvedCitation, G as ResponseCompletedEvent, H as ResponseContentPartAddedEvent, I as ResponseCreatedEvent, J as ResponseFailedEvent, K as ResponseOutputItemAddedEvent, N as ResponseOutputItemDoneEvent, P as ResponseOutputTextDeltaEvent, T as ResponseOutputTextDoneEvent, V as ResponseUsage, W as SSEEvent, X as SSEStreamCallbacks, Y as SSEStreamResult, Z as SSEStreamStartData, _ as UserInfo, $ as UserInputRequestEvent, a0 as UserMessageEvent, a1 as WorkspaceContext, a2 as WsConnection, a3 as agentconfig, a4 as assistant, a5 as authenticatedFetch, a6 as buildRetrievalChunkTool, a7 as buildRetrievalFullContextTool, a8 as buildRetrievalTocTool, a9 as connectWebSocket, aa as connectWithReconnect, ab as consumeSSEStream, ac as contacts, ad as conversations, ae as countCitations, af as createAuthenticatedClient, ah as dm, ai as doctags, aj as documents, ak as files, al as formatAgentStepLabel, am as formatFileSize, ao as formatUserName, ap as formatWorkspaceChoices, au as getErrorMessage, av as getRawWorkspaceKey, aw as health, ax as parseSSEEvents, ay as performPasswordLogin, aB as requireData, aC as requireOk, aD as resolveAuth, aE as resolveCitations, aF as resolveWorkspace, aG as responses, aH as selectWorkspace, aI as selectWorkspaceById, aJ as settings, aK as streamSSE, aL as stripCitationMarkdown, aM as summarizeCitations, aN as tags, aO as workspaces } from './browser-
|
|
1
|
+
export { i as AgentStepEvent, j as Arbi, k as ArbiApiError, l as ArbiError, m as ArbiOptions, n as ArtifactEvent, o as AuthContext, A as AuthHeaders, p as AuthenticatedClient, c as ChatSession, q as CitationSummary, a as CliConfig, b as CliCredentials, C as ConfigStore, r as ConnectOptions, y as MessageMetadataPayload, z as MessageQueuedEvent, O as OutputTokensDetails, Q as QueryOptions, R as ReconnectOptions, B as ReconnectableWsConnection, E as ResolvedCitation, G as ResponseCompletedEvent, H as ResponseContentPartAddedEvent, I as ResponseCreatedEvent, J as ResponseFailedEvent, K as ResponseOutputItemAddedEvent, N as ResponseOutputItemDoneEvent, P as ResponseOutputTextDeltaEvent, T as ResponseOutputTextDoneEvent, V as ResponseUsage, W as SSEEvent, X as SSEStreamCallbacks, Y as SSEStreamResult, Z as SSEStreamStartData, _ as UserInfo, $ as UserInputRequestEvent, a0 as UserMessageEvent, a1 as WorkspaceContext, a2 as WsConnection, a3 as agentconfig, a4 as assistant, a5 as authenticatedFetch, a6 as buildRetrievalChunkTool, a7 as buildRetrievalFullContextTool, a8 as buildRetrievalTocTool, a9 as connectWebSocket, aa as connectWithReconnect, ab as consumeSSEStream, ac as contacts, ad as conversations, ae as countCitations, af as createAuthenticatedClient, ah as dm, ai as doctags, aj as documents, ak as files, al as formatAgentStepLabel, am as formatFileSize, ao as formatUserName, ap as formatWorkspaceChoices, au as getErrorMessage, av as getRawWorkspaceKey, aw as health, ax as parseSSEEvents, ay as performPasswordLogin, aB as requireData, aC as requireOk, aD as resolveAuth, aE as resolveCitations, aF as resolveWorkspace, aG as responses, aH as selectWorkspace, aI as selectWorkspaceById, aJ as settings, aK as streamSSE, aL as stripCitationMarkdown, aM as summarizeCitations, aN as tags, aO as workspaces } from './browser-BJdLTFSM.js';
|
|
2
2
|
import '@arbidocs/client';
|
package/dist/browser.js
CHANGED
|
@@ -3569,16 +3569,17 @@ function formatWorkspaceChoices(wsList) {
|
|
|
3569
3569
|
};
|
|
3570
3570
|
});
|
|
3571
3571
|
}
|
|
3572
|
-
function buildClientOptions(config, store) {
|
|
3572
|
+
function buildClientOptions(config, store, email) {
|
|
3573
3573
|
return {
|
|
3574
3574
|
baseUrl: config.baseUrl,
|
|
3575
3575
|
deploymentDomain: config.deploymentDomain,
|
|
3576
3576
|
credentials: "omit",
|
|
3577
|
-
sessionStorage: store?.getSessionStorageProvider?.()
|
|
3577
|
+
sessionStorage: store?.getSessionStorageProvider?.(),
|
|
3578
|
+
userEmail: email
|
|
3578
3579
|
};
|
|
3579
3580
|
}
|
|
3580
3581
|
async function createAuthenticatedClient(config, creds, store) {
|
|
3581
|
-
const arbi = createArbiClient(buildClientOptions(config, store));
|
|
3582
|
+
const arbi = createArbiClient(buildClientOptions(config, store, creds.email));
|
|
3582
3583
|
await arbi.crypto.initSodium();
|
|
3583
3584
|
const signingPrivateKey = base64ToBytes(creds.signingPrivateKeyBase64);
|
|
3584
3585
|
const loginResult = await arbi.auth.loginWithKey({
|
|
@@ -3691,7 +3692,7 @@ async function resolveWorkspace(store, workspaceOpt) {
|
|
|
3691
3692
|
throw new ArbiError("No workspace selected. Run: arbi workspace select <id>");
|
|
3692
3693
|
}
|
|
3693
3694
|
if (isCachedTokenValid(creds, workspaceId)) {
|
|
3694
|
-
const arbi2 = createArbiClient(buildClientOptions(config, store));
|
|
3695
|
+
const arbi2 = createArbiClient(buildClientOptions(config, store, creds.email));
|
|
3695
3696
|
await arbi2.crypto.initSodium();
|
|
3696
3697
|
arbi2.session.setUser(creds.email);
|
|
3697
3698
|
arbi2.session.setSelectedWorkspace(workspaceId);
|