@arbidocs/sdk 0.3.18 → 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-DUQ3Eyvd.d.cts → browser-D8aF-wkt.d.cts} +9 -7
- package/dist/{browser-DUQ3Eyvd.d.ts → browser-D8aF-wkt.d.ts} +9 -7
- package/dist/browser.cjs +7 -24
- 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 +8 -23
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +7 -24
- 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 +8 -23
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -255,17 +255,19 @@ interface SSEEvent {
|
|
|
255
255
|
event: string;
|
|
256
256
|
data: string;
|
|
257
257
|
}
|
|
258
|
-
declare const TOOL_LABELS: Record<string, string>;
|
|
259
|
-
declare const LIFECYCLE_LABELS: Record<string, string>;
|
|
260
258
|
/**
|
|
261
259
|
* Format an AgentStepEvent into a human-readable label.
|
|
262
260
|
*
|
|
261
|
+
* Uses backend-provided `label` field when available, falling back to
|
|
262
|
+
* tool name or step name for old persisted events.
|
|
263
|
+
*
|
|
263
264
|
* Priority:
|
|
264
265
|
* 1. `focus` — the agent's descriptive sentence about what it's doing
|
|
265
|
-
* 2.
|
|
266
|
-
* 3.
|
|
267
|
-
* 4.
|
|
268
|
-
* 5.
|
|
266
|
+
* 2. `label` — backend-provided display label
|
|
267
|
+
* 3. For `tool_progress` — detail label + optional message
|
|
268
|
+
* 4. Lifecycle fallback (planning, evaluation, etc.)
|
|
269
|
+
* 5. Tool name from detail
|
|
270
|
+
* 6. Fallback to step name or empty string
|
|
269
271
|
*/
|
|
270
272
|
declare function formatAgentStepLabel(step: AgentStepEvent): string;
|
|
271
273
|
/**
|
|
@@ -3319,4 +3321,4 @@ declare namespace responses {
|
|
|
3319
3321
|
export { type responses_SubmitBackgroundQueryOptions as SubmitBackgroundQueryOptions, responses_extractResponseText as extractResponseText, responses_getResponse as getResponse, responses_submitBackgroundQuery as submitBackgroundQuery };
|
|
3320
3322
|
}
|
|
3321
3323
|
|
|
3322
|
-
export {
|
|
3324
|
+
export { connectWebSocket as $, type AuthHeaders as A, type ResponseOutputTextDeltaEvent as B, type ConfigStore as C, type DocumentWaiter as D, type ResponseOutputTextDoneEvent as E, type FormattedWsMessage as F, type ResponseUsage as G, type SSEStreamCallbacks as H, type SSEStreamResult as I, type SSEStreamStartData as J, type UserInfo as K, type UserInputRequestEvent as L, type MessageLevel as M, type UserMessageEvent as N, type OutputTokensDetails as O, type WsConnection as P, type QueryOptions as Q, type ReconnectOptions as R, type SSEEvent as S, agentconfig as T, type UploadBatchResult as U, assistant as V, type WorkspaceContext as W, authenticatedFetch as X, buildRetrievalChunkTool as Y, buildRetrievalFullContextTool as Z, buildRetrievalTocTool as _, type CliConfig as a, connectWithReconnect as a0, consumeSSEStream as a1, contacts as a2, conversations as a3, countCitations as a4, createAuthenticatedClient as a5, createDocumentWaiter as a6, dm as a7, doctags as a8, documents as a9, tags as aA, workspaces as aB, files as aa, formatAgentStepLabel as ab, formatFileSize as ac, formatStreamSummary as ad, formatUserName as ae, formatWorkspaceChoices as af, formatWsMessage as ag, generateEncryptedWorkspaceKey as ah, getErrorCode as ai, getErrorMessage as aj, health as ak, parseSSEEvents as al, performPasswordLogin as am, performSsoDeviceFlowLogin as an, requireData as ao, requireOk as ap, resolveAuth as aq, resolveCitations as ar, resolveWorkspace as as, responses as at, selectWorkspace as au, selectWorkspaceById as av, settings as aw, streamSSE as ax, stripCitationMarkdown as ay, summarizeCitations as az, type CliCredentials as b, type ChatSession as c, type UploadOptions as d, type UploadResult as e, type AgentStepEvent as f, Arbi as g, ArbiApiError as h, ArbiError as i, type ArbiOptions as j, type ArtifactEvent as k, type AuthContext as l, type AuthenticatedClient as m, type CitationSummary as n, type ConnectOptions as o, type DocumentWaiterOptions as p, type MessageMetadataPayload$1 as q, type MessageQueuedEvent as r, type ReconnectableWsConnection as s, type ResolvedCitation as t, type ResponseCompletedEvent as u, type ResponseContentPartAddedEvent as v, type ResponseCreatedEvent as w, type ResponseFailedEvent as x, type ResponseOutputItemAddedEvent as y, type ResponseOutputItemDoneEvent as z };
|
|
@@ -255,17 +255,19 @@ interface SSEEvent {
|
|
|
255
255
|
event: string;
|
|
256
256
|
data: string;
|
|
257
257
|
}
|
|
258
|
-
declare const TOOL_LABELS: Record<string, string>;
|
|
259
|
-
declare const LIFECYCLE_LABELS: Record<string, string>;
|
|
260
258
|
/**
|
|
261
259
|
* Format an AgentStepEvent into a human-readable label.
|
|
262
260
|
*
|
|
261
|
+
* Uses backend-provided `label` field when available, falling back to
|
|
262
|
+
* tool name or step name for old persisted events.
|
|
263
|
+
*
|
|
263
264
|
* Priority:
|
|
264
265
|
* 1. `focus` — the agent's descriptive sentence about what it's doing
|
|
265
|
-
* 2.
|
|
266
|
-
* 3.
|
|
267
|
-
* 4.
|
|
268
|
-
* 5.
|
|
266
|
+
* 2. `label` — backend-provided display label
|
|
267
|
+
* 3. For `tool_progress` — detail label + optional message
|
|
268
|
+
* 4. Lifecycle fallback (planning, evaluation, etc.)
|
|
269
|
+
* 5. Tool name from detail
|
|
270
|
+
* 6. Fallback to step name or empty string
|
|
269
271
|
*/
|
|
270
272
|
declare function formatAgentStepLabel(step: AgentStepEvent): string;
|
|
271
273
|
/**
|
|
@@ -3319,4 +3321,4 @@ declare namespace responses {
|
|
|
3319
3321
|
export { type responses_SubmitBackgroundQueryOptions as SubmitBackgroundQueryOptions, responses_extractResponseText as extractResponseText, responses_getResponse as getResponse, responses_submitBackgroundQuery as submitBackgroundQuery };
|
|
3320
3322
|
}
|
|
3321
3323
|
|
|
3322
|
-
export {
|
|
3324
|
+
export { connectWebSocket as $, type AuthHeaders as A, type ResponseOutputTextDeltaEvent as B, type ConfigStore as C, type DocumentWaiter as D, type ResponseOutputTextDoneEvent as E, type FormattedWsMessage as F, type ResponseUsage as G, type SSEStreamCallbacks as H, type SSEStreamResult as I, type SSEStreamStartData as J, type UserInfo as K, type UserInputRequestEvent as L, type MessageLevel as M, type UserMessageEvent as N, type OutputTokensDetails as O, type WsConnection as P, type QueryOptions as Q, type ReconnectOptions as R, type SSEEvent as S, agentconfig as T, type UploadBatchResult as U, assistant as V, type WorkspaceContext as W, authenticatedFetch as X, buildRetrievalChunkTool as Y, buildRetrievalFullContextTool as Z, buildRetrievalTocTool as _, type CliConfig as a, connectWithReconnect as a0, consumeSSEStream as a1, contacts as a2, conversations as a3, countCitations as a4, createAuthenticatedClient as a5, createDocumentWaiter as a6, dm as a7, doctags as a8, documents as a9, tags as aA, workspaces as aB, files as aa, formatAgentStepLabel as ab, formatFileSize as ac, formatStreamSummary as ad, formatUserName as ae, formatWorkspaceChoices as af, formatWsMessage as ag, generateEncryptedWorkspaceKey as ah, getErrorCode as ai, getErrorMessage as aj, health as ak, parseSSEEvents as al, performPasswordLogin as am, performSsoDeviceFlowLogin as an, requireData as ao, requireOk as ap, resolveAuth as aq, resolveCitations as ar, resolveWorkspace as as, responses as at, selectWorkspace as au, selectWorkspaceById as av, settings as aw, streamSSE as ax, stripCitationMarkdown as ay, summarizeCitations as az, type CliCredentials as b, type ChatSession as c, type UploadOptions as d, type UploadResult as e, type AgentStepEvent as f, Arbi as g, ArbiApiError as h, ArbiError as i, type ArbiOptions as j, type ArtifactEvent as k, type AuthContext as l, type AuthenticatedClient as m, type CitationSummary as n, type ConnectOptions as o, type DocumentWaiterOptions as p, type MessageMetadataPayload$1 as q, type MessageQueuedEvent as r, type ReconnectableWsConnection as s, type ResolvedCitation as t, type ResponseCompletedEvent as u, type ResponseContentPartAddedEvent as v, type ResponseCreatedEvent as w, type ResponseFailedEvent as x, type ResponseOutputItemAddedEvent as y, type ResponseOutputItemDoneEvent as z };
|
package/dist/browser.cjs
CHANGED
|
@@ -262,23 +262,7 @@ async function resolveWorkspace(store, workspaceOpt) {
|
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
// src/sse.ts
|
|
265
|
-
var
|
|
266
|
-
search_documents: "Searching documents",
|
|
267
|
-
get_document_passages: "Reading document",
|
|
268
|
-
get_table_of_contents: "Getting table of contents",
|
|
269
|
-
view_document_pages: "Viewing document pages",
|
|
270
|
-
get_full_document: "Reading full document",
|
|
271
|
-
web_search: "Searching the web",
|
|
272
|
-
read_url: "Reading web pages",
|
|
273
|
-
ask_user: "Asking user",
|
|
274
|
-
compaction: "Compacting conversation",
|
|
275
|
-
personal_agent: "Running agent",
|
|
276
|
-
create_artifact: "Creating artifact",
|
|
277
|
-
create_plan: "Creating plan",
|
|
278
|
-
save_skill: "Saving skill",
|
|
279
|
-
run_code: "Running code"
|
|
280
|
-
};
|
|
281
|
-
var LIFECYCLE_LABELS = {
|
|
265
|
+
var LIFECYCLE_LABELS_FALLBACK = {
|
|
282
266
|
evaluation: "Evaluating results",
|
|
283
267
|
answering: "Writing answer",
|
|
284
268
|
reviewing: "Reviewing answer",
|
|
@@ -287,18 +271,19 @@ var LIFECYCLE_LABELS = {
|
|
|
287
271
|
};
|
|
288
272
|
function formatAgentStepLabel(step) {
|
|
289
273
|
if (step.focus) return step.focus;
|
|
274
|
+
if (step.label) return step.label;
|
|
290
275
|
const detail = step.detail;
|
|
291
276
|
if (step.step === "tool_progress" && detail && detail.length > 0) {
|
|
292
|
-
const
|
|
293
|
-
const label = toolName && TOOL_LABELS[toolName] || LIFECYCLE_LABELS.tool_progress;
|
|
277
|
+
const label = detail[0].label || LIFECYCLE_LABELS_FALLBACK.tool_progress;
|
|
294
278
|
const message = detail[0].message;
|
|
295
279
|
return message ? `${label}: ${message}` : label;
|
|
296
280
|
}
|
|
297
281
|
if (step.step) {
|
|
298
|
-
return
|
|
282
|
+
return LIFECYCLE_LABELS_FALLBACK[step.step] || step.step;
|
|
299
283
|
}
|
|
300
|
-
if (detail && detail.length > 0
|
|
301
|
-
|
|
284
|
+
if (detail && detail.length > 0) {
|
|
285
|
+
if (detail[0].label) return detail[0].label;
|
|
286
|
+
if (detail[0].tool) return detail[0].tool;
|
|
302
287
|
}
|
|
303
288
|
return "";
|
|
304
289
|
}
|
|
@@ -1642,8 +1627,6 @@ function extractResponseText(response) {
|
|
|
1642
1627
|
exports.Arbi = Arbi;
|
|
1643
1628
|
exports.ArbiApiError = ArbiApiError;
|
|
1644
1629
|
exports.ArbiError = ArbiError;
|
|
1645
|
-
exports.LIFECYCLE_LABELS = LIFECYCLE_LABELS;
|
|
1646
|
-
exports.TOOL_LABELS = TOOL_LABELS;
|
|
1647
1630
|
exports.agentconfig = agentconfig_exports;
|
|
1648
1631
|
exports.assistant = assistant_exports;
|
|
1649
1632
|
exports.authenticatedFetch = authenticatedFetch;
|