@arbidocs/sdk 0.3.17 → 0.3.19
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-D8aF-wkt.d.cts} +22 -7
- package/dist/{browser-BtAHbiq_.d.ts → browser-D8aF-wkt.d.ts} +22 -7
- package/dist/browser.cjs +11 -25
- 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 +12 -24
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +146 -25
- 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 +145 -24
- 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,
|
|
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, 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, K as UserInfo, L as UserInputRequestEvent, N as UserMessageEvent, W as WorkspaceContext, P as WsConnection, T as agentconfig, V as assistant, X as authenticatedFetch, Y as buildRetrievalChunkTool, Z as buildRetrievalFullContextTool, _ as buildRetrievalTocTool, $ as connectWebSocket, a0 as connectWithReconnect, a1 as consumeSSEStream, a2 as contacts, a3 as conversations, a4 as countCitations, a5 as createAuthenticatedClient, a7 as dm, a8 as doctags, a9 as documents, aa as files, ab as formatAgentStepLabel, ac as formatFileSize, ae as formatUserName, af as formatWorkspaceChoices, aj as getErrorMessage, ak as health, al as parseSSEEvents, am as performPasswordLogin, ao as requireData, ap as requireOk, aq as resolveAuth, ar as resolveCitations, as as resolveWorkspace, at as responses, au as selectWorkspace, av as selectWorkspaceById, aw as settings, ax as streamSSE, ay as stripCitationMarkdown, az as summarizeCitations, aA as tags, aB as workspaces } from './browser-D8aF-wkt.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,
|
|
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, 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, K as UserInfo, L as UserInputRequestEvent, N as UserMessageEvent, W as WorkspaceContext, P as WsConnection, T as agentconfig, V as assistant, X as authenticatedFetch, Y as buildRetrievalChunkTool, Z as buildRetrievalFullContextTool, _ as buildRetrievalTocTool, $ as connectWebSocket, a0 as connectWithReconnect, a1 as consumeSSEStream, a2 as contacts, a3 as conversations, a4 as countCitations, a5 as createAuthenticatedClient, a7 as dm, a8 as doctags, a9 as documents, aa as files, ab as formatAgentStepLabel, ac as formatFileSize, ae as formatUserName, af as formatWorkspaceChoices, aj as getErrorMessage, ak as health, al as parseSSEEvents, am as performPasswordLogin, ao as requireData, ap as requireOk, aq as resolveAuth, ar as resolveCitations, as as resolveWorkspace, at as responses, au as selectWorkspace, av as selectWorkspaceById, aw as settings, ax as streamSSE, ay as stripCitationMarkdown, az as summarizeCitations, aA as tags, aB as workspaces } from './browser-D8aF-wkt.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,
|
|
@@ -257,23 +260,7 @@ async function resolveWorkspace(store, workspaceOpt) {
|
|
|
257
260
|
}
|
|
258
261
|
|
|
259
262
|
// src/sse.ts
|
|
260
|
-
var
|
|
261
|
-
search_documents: "Searching documents",
|
|
262
|
-
get_document_passages: "Reading document",
|
|
263
|
-
get_table_of_contents: "Getting table of contents",
|
|
264
|
-
view_document_pages: "Viewing document pages",
|
|
265
|
-
get_full_document: "Reading full document",
|
|
266
|
-
web_search: "Searching the web",
|
|
267
|
-
read_url: "Reading web pages",
|
|
268
|
-
ask_user: "Asking user",
|
|
269
|
-
compaction: "Compacting conversation",
|
|
270
|
-
personal_agent: "Running agent",
|
|
271
|
-
create_artifact: "Creating artifact",
|
|
272
|
-
create_plan: "Creating plan",
|
|
273
|
-
save_skill: "Saving skill",
|
|
274
|
-
run_code: "Running code"
|
|
275
|
-
};
|
|
276
|
-
var LIFECYCLE_LABELS = {
|
|
263
|
+
var LIFECYCLE_LABELS_FALLBACK = {
|
|
277
264
|
evaluation: "Evaluating results",
|
|
278
265
|
answering: "Writing answer",
|
|
279
266
|
reviewing: "Reviewing answer",
|
|
@@ -282,18 +269,19 @@ var LIFECYCLE_LABELS = {
|
|
|
282
269
|
};
|
|
283
270
|
function formatAgentStepLabel(step) {
|
|
284
271
|
if (step.focus) return step.focus;
|
|
272
|
+
if (step.label) return step.label;
|
|
285
273
|
const detail = step.detail;
|
|
286
274
|
if (step.step === "tool_progress" && detail && detail.length > 0) {
|
|
287
|
-
const
|
|
288
|
-
const label = toolName && TOOL_LABELS[toolName] || LIFECYCLE_LABELS.tool_progress;
|
|
275
|
+
const label = detail[0].label || LIFECYCLE_LABELS_FALLBACK.tool_progress;
|
|
289
276
|
const message = detail[0].message;
|
|
290
277
|
return message ? `${label}: ${message}` : label;
|
|
291
278
|
}
|
|
292
279
|
if (step.step) {
|
|
293
|
-
return
|
|
280
|
+
return LIFECYCLE_LABELS_FALLBACK[step.step] || step.step;
|
|
294
281
|
}
|
|
295
|
-
if (detail && detail.length > 0
|
|
296
|
-
|
|
282
|
+
if (detail && detail.length > 0) {
|
|
283
|
+
if (detail[0].label) return detail[0].label;
|
|
284
|
+
if (detail[0].tool) return detail[0].tool;
|
|
297
285
|
}
|
|
298
286
|
return "";
|
|
299
287
|
}
|
|
@@ -1634,6 +1622,6 @@ function extractResponseText(response) {
|
|
|
1634
1622
|
return parts.join("");
|
|
1635
1623
|
}
|
|
1636
1624
|
|
|
1637
|
-
export { Arbi, ArbiApiError, ArbiError,
|
|
1625
|
+
export { Arbi, ArbiApiError, ArbiError, agentconfig_exports as agentconfig, assistant_exports as assistant, authenticatedFetch, buildRetrievalChunkTool, buildRetrievalFullContextTool, buildRetrievalTocTool, connectWebSocket, connectWithReconnect, consumeSSEStream, contacts_exports as contacts, conversations_exports as conversations, countCitations, createAuthenticatedClient, dm_exports as dm, doctags_exports as doctags, documents_exports as documents, files_exports as files, formatAgentStepLabel, formatFileSize, formatUserName, formatWorkspaceChoices, getErrorMessage, health_exports as health, parseSSEEvents, performPasswordLogin, requireData, requireOk, resolveAuth, resolveCitations, resolveWorkspace, responses_exports as responses, selectWorkspace, selectWorkspaceById, settings_exports as settings, streamSSE, stripCitationMarkdown, summarizeCitations, tags_exports as tags, workspaces_exports as workspaces };
|
|
1638
1626
|
//# sourceMappingURL=browser.js.map
|
|
1639
1627
|
//# sourceMappingURL=browser.js.map
|