@arbidocs/sdk 0.3.79 → 0.3.80
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-a0r4Y6dE.d.cts → browser-DIO4_N2g.d.cts} +17 -4
- package/dist/{browser-a0r4Y6dE.d.ts → browser-DIO4_N2g.d.ts} +17 -4
- package/dist/browser.cjs +45 -5
- 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 +45 -5
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +45 -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 +45 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ConfigStore, l as CliConfig, m as CliCredentials, C as ChatSession,
|
|
2
|
-
export { a as AgentStepEvent, b as Arbi, c as ArbiApiError, d as ArbiError, f as ArbiOptions, g as ArtifactEvent, h as AuthContext, j as AuthenticatedClient, k as CitationSummary, o as ConnectOptions, D as DOC_TERMINAL_STATUSES, q as
|
|
1
|
+
import { n as ConfigStore, l as CliConfig, m as CliCredentials, C as ChatSession, Z as SkippedFile, a2 as UploadResult, i as AuthHeaders, _ as UploadBatchResult, a1 as UploadOptions, $ as UploadDirectOptions, a0 as UploadDirectResult, X as SUPPORTED_EXTENSIONS, p as DmCryptoContext } from './browser-DIO4_N2g.cjs';
|
|
2
|
+
export { a as AgentStepEvent, b as Arbi, c as ArbiApiError, d as ArbiError, f as ArbiOptions, g as ArtifactEvent, h as AuthContext, j as AuthenticatedClient, k as CitationSummary, o as ConnectOptions, D as DOC_TERMINAL_STATUSES, q as DocNameMap, r as DocumentListFields, s as DocumentListOrder, t as DocumentWaiter, u as DocumentWaiterOptions, F as FormattedWsMessage, L as ListAllOptions, v as ListPaginatedOptions, M as MessageLevel, w as MessageMetadataPayload, x as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, Q as QueryOptions, R as ReconnectOptions, y as ReconnectableWsConnection, z as ResolvedCitation, B as ResponseCompletedEvent, E as ResponseContentPartAddedEvent, G as ResponseCreatedEvent, H as ResponseFailedEvent, I as ResponseOutputItemAddedEvent, J as ResponseOutputItemDoneEvent, K as ResponseOutputTextDeltaEvent, N as ResponseOutputTextDoneEvent, S as ResponseUsage, T as SSEEvent, U as SSEStreamCallbacks, V as SSEStreamResult, W as SSEStreamStartData, Y as SkillSummary, a3 as UserInfo, a4 as UserInputRequestEvent, a5 as UserMessageEvent, a6 as WebSocketAuthError, a7 as WorkspaceContext, a8 as WsConnection, a9 as agentconfig, aa as assistant, ab as authenticatedFetch, ac as buildRetrievalChunkTool, ad as buildRetrievalFullContextTool, ae as buildRetrievalTocTool, af as connectWebSocket, ag as connectWithReconnect, ah as consumeSSEStream, ai as contacts, aj as conversations, ak as countCitations, al as createAuthenticatedClient, am as createDocumentWaiter, an as dm, ao as doctags, ap as documents, aq as files, ar as filterSkills, as as formatAgentStepLabel, at as formatFileSize, au as formatStreamSummary, av as formatUserName, aw as formatWorkspaceChoices, ax as formatWsMessage, ay as generateEncryptedWorkspaceKey, az as generateNewWorkspaceKey, aA as getErrorCode, aB as getErrorMessage, aC as getRawWorkspaceKey, aD as health, aE as parseSSEEvents, aF as parseSlashCommand, aG as parseSlashTokenInProgress, aH as performPasswordLogin, aI as performSigningKeyLogin, aJ as performSsoDeviceFlowLogin, aK as requireData, aL as requireOk, aM as resolveAuth, aN as resolveCitations, aO as resolveWorkspace, aP as responses, aQ as selectWorkspace, aR as selectWorkspaceById, aS as settings, aT as streamSSE, aU as stripCitationMarkdown, aV as summarizeCitations, aW as tags, aX as workspaces } from './browser-DIO4_N2g.cjs';
|
|
3
3
|
import { SessionStorageProvider, ArbiClient, components } from '@arbidocs/client';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ConfigStore, l as CliConfig, m as CliCredentials, C as ChatSession,
|
|
2
|
-
export { a as AgentStepEvent, b as Arbi, c as ArbiApiError, d as ArbiError, f as ArbiOptions, g as ArtifactEvent, h as AuthContext, j as AuthenticatedClient, k as CitationSummary, o as ConnectOptions, D as DOC_TERMINAL_STATUSES, q as
|
|
1
|
+
import { n as ConfigStore, l as CliConfig, m as CliCredentials, C as ChatSession, Z as SkippedFile, a2 as UploadResult, i as AuthHeaders, _ as UploadBatchResult, a1 as UploadOptions, $ as UploadDirectOptions, a0 as UploadDirectResult, X as SUPPORTED_EXTENSIONS, p as DmCryptoContext } from './browser-DIO4_N2g.js';
|
|
2
|
+
export { a as AgentStepEvent, b as Arbi, c as ArbiApiError, d as ArbiError, f as ArbiOptions, g as ArtifactEvent, h as AuthContext, j as AuthenticatedClient, k as CitationSummary, o as ConnectOptions, D as DOC_TERMINAL_STATUSES, q as DocNameMap, r as DocumentListFields, s as DocumentListOrder, t as DocumentWaiter, u as DocumentWaiterOptions, F as FormattedWsMessage, L as ListAllOptions, v as ListPaginatedOptions, M as MessageLevel, w as MessageMetadataPayload, x as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, Q as QueryOptions, R as ReconnectOptions, y as ReconnectableWsConnection, z as ResolvedCitation, B as ResponseCompletedEvent, E as ResponseContentPartAddedEvent, G as ResponseCreatedEvent, H as ResponseFailedEvent, I as ResponseOutputItemAddedEvent, J as ResponseOutputItemDoneEvent, K as ResponseOutputTextDeltaEvent, N as ResponseOutputTextDoneEvent, S as ResponseUsage, T as SSEEvent, U as SSEStreamCallbacks, V as SSEStreamResult, W as SSEStreamStartData, Y as SkillSummary, a3 as UserInfo, a4 as UserInputRequestEvent, a5 as UserMessageEvent, a6 as WebSocketAuthError, a7 as WorkspaceContext, a8 as WsConnection, a9 as agentconfig, aa as assistant, ab as authenticatedFetch, ac as buildRetrievalChunkTool, ad as buildRetrievalFullContextTool, ae as buildRetrievalTocTool, af as connectWebSocket, ag as connectWithReconnect, ah as consumeSSEStream, ai as contacts, aj as conversations, ak as countCitations, al as createAuthenticatedClient, am as createDocumentWaiter, an as dm, ao as doctags, ap as documents, aq as files, ar as filterSkills, as as formatAgentStepLabel, at as formatFileSize, au as formatStreamSummary, av as formatUserName, aw as formatWorkspaceChoices, ax as formatWsMessage, ay as generateEncryptedWorkspaceKey, az as generateNewWorkspaceKey, aA as getErrorCode, aB as getErrorMessage, aC as getRawWorkspaceKey, aD as health, aE as parseSSEEvents, aF as parseSlashCommand, aG as parseSlashTokenInProgress, aH as performPasswordLogin, aI as performSigningKeyLogin, aJ as performSsoDeviceFlowLogin, aK as requireData, aL as requireOk, aM as resolveAuth, aN as resolveCitations, aO as resolveWorkspace, aP as responses, aQ as selectWorkspace, aR as selectWorkspaceById, aS as settings, aT as streamSSE, aU as stripCitationMarkdown, aV as summarizeCitations, aW as tags, aX as workspaces } from './browser-DIO4_N2g.js';
|
|
3
3
|
import { SessionStorageProvider, ArbiClient, components } from '@arbidocs/client';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/index.js
CHANGED
|
@@ -4179,26 +4179,66 @@ async function resolveWorkspace(store, workspaceOpt) {
|
|
|
4179
4179
|
|
|
4180
4180
|
// src/sse.ts
|
|
4181
4181
|
var LIFECYCLE_LABELS_FALLBACK = {
|
|
4182
|
+
goal: "Thinking\u2026",
|
|
4182
4183
|
evaluation: "Evaluating results",
|
|
4183
4184
|
answering: "Answered",
|
|
4184
4185
|
reviewing: "Reviewing answer",
|
|
4185
4186
|
planning: "Planning",
|
|
4186
4187
|
tool_progress: "Working"
|
|
4187
4188
|
};
|
|
4188
|
-
function
|
|
4189
|
-
if (
|
|
4190
|
-
|
|
4189
|
+
function resolveDocRefs(text, docNames) {
|
|
4190
|
+
if (!docNames) return text;
|
|
4191
|
+
return text.replace(/\{(doc-[^}]+)\}/g, (_match, id) => docNames[id] ?? id);
|
|
4192
|
+
}
|
|
4193
|
+
function resolveStepDocName(step, docNames) {
|
|
4194
|
+
if (!docNames) return void 0;
|
|
4195
|
+
const detail = step.detail;
|
|
4196
|
+
if (!detail || detail.length === 0) return void 0;
|
|
4197
|
+
for (const d2 of detail) {
|
|
4198
|
+
const id = d2.doc_ext_id ?? d2.document_ext_id;
|
|
4199
|
+
if (typeof id === "string") return docNames[id] ?? id;
|
|
4200
|
+
}
|
|
4201
|
+
return void 0;
|
|
4202
|
+
}
|
|
4203
|
+
function extractPageRange(step) {
|
|
4204
|
+
const detail = step.detail;
|
|
4205
|
+
if (!detail || detail.length === 0) return void 0;
|
|
4206
|
+
for (const d2 of detail) {
|
|
4207
|
+
const summary = typeof d2.summary === "string" ? d2.summary : void 0;
|
|
4208
|
+
if (!summary) continue;
|
|
4209
|
+
const match = summary.match(/\bpp?\.\s*(\d[\d.,\s–—-]*)/);
|
|
4210
|
+
if (!match) continue;
|
|
4211
|
+
const floored = match[1].replace(/\d+(?:\.\d+)?/g, (n2) => String(Math.floor(parseFloat(n2)))).replace(/(\d+)\s*[–—-]\s*\1(?!\d)/g, "$1");
|
|
4212
|
+
const items = [];
|
|
4213
|
+
for (const raw of floored.split(",")) {
|
|
4214
|
+
const item = raw.trim();
|
|
4215
|
+
if (item && !items.includes(item)) items.push(item);
|
|
4216
|
+
}
|
|
4217
|
+
if (items.length > 0) return `pp. ${items.join(", ")}`;
|
|
4218
|
+
}
|
|
4219
|
+
return void 0;
|
|
4220
|
+
}
|
|
4221
|
+
function formatAgentStepLabel(step, docNames) {
|
|
4222
|
+
if (step.step === "goal") {
|
|
4223
|
+
return step.label && step.label !== "Goal" ? step.label : "Thinking\u2026";
|
|
4224
|
+
}
|
|
4225
|
+
if (step.focus) return resolveDocRefs(step.focus, docNames);
|
|
4226
|
+
const docName = resolveStepDocName(step, docNames);
|
|
4227
|
+
const pages = docName ? extractPageRange(step) : void 0;
|
|
4228
|
+
const suffix = docName ? ` \u2014 ${docName}${pages ? ` \xB7 ${pages}` : ""}` : "";
|
|
4229
|
+
if (step.label) return `${step.label}${suffix}`;
|
|
4191
4230
|
const detail = step.detail;
|
|
4192
4231
|
if (step.step === "tool_progress" && detail && detail.length > 0) {
|
|
4193
4232
|
const label = detail[0].label || LIFECYCLE_LABELS_FALLBACK.tool_progress;
|
|
4233
|
+
if (suffix) return `${label}${suffix}`;
|
|
4194
4234
|
const message = detail[0].message;
|
|
4195
|
-
return message ? `${label}: ${message}` : label;
|
|
4235
|
+
return message ? `${label}: ${resolveDocRefs(message, docNames)}` : label;
|
|
4196
4236
|
}
|
|
4197
4237
|
if (step.step) {
|
|
4198
4238
|
return LIFECYCLE_LABELS_FALLBACK[step.step] || step.step;
|
|
4199
4239
|
}
|
|
4200
4240
|
if (detail && detail.length > 0) {
|
|
4201
|
-
if (detail[0].label) return detail[0].label
|
|
4241
|
+
if (detail[0].label) return `${detail[0].label}${suffix}`;
|
|
4202
4242
|
if (detail[0].tool) return detail[0].tool;
|
|
4203
4243
|
}
|
|
4204
4244
|
return "";
|