@arbidocs/sdk 0.3.134 → 0.3.135
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-BSWvYcjS.d.cts → browser-k4I8Geez.d.cts} +26 -27
- package/dist/{browser-BSWvYcjS.d.ts → browser-k4I8Geez.d.ts} +26 -27
- package/dist/browser.cjs +24 -23
- 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 +24 -24
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +24 -23
- 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 +24 -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 { A as AgentControlStateEvent, a as AgentStepDeltaEvent, b as AgentStepEvent, c as Arbi, d as ArbiApiError, e as ArbiError, f as ArbiErrorEvent, g as ArbiOptions, h as ArtifactEvent, i as AuthContext, j as AuthHeaders, k as AuthenticatedClient, C as ChatSession, l as CitationSummary, m as CliConfig, n as CliCredentials, o as CommandDescriptor, p as ConfigStore, q as ConnectOptions, r as CreateMemoryRequest, s as CreateTaskRequest, t as DeferredInterjectionEvent, M as MemoryResponse, E as MemorySearchRequest, G as MemorySearchResponse, I as MessageMetadataPayload, J as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, K as ProbeAnswerEvent, N as ProjectInvoicesResponse, Q as ProjectUsageResponse, R as QueryOptions, S as ReconnectOptions, T as ReconnectableWsConnection, U as ResolvedCitation, W as ResponseCompletedEvent, X as ResponseContentPartAddedEvent, Y as ResponseCreatedEvent, Z as ResponseFailedEvent, _ as ResponseOutputItemAddedEvent, $ as ResponseOutputItemDoneEvent, a0 as ResponseOutputTextDeltaEvent, a1 as ResponseOutputTextDoneEvent, a2 as ResponseUsage, a3 as SSEEvent, a4 as SSEStreamCallbacks, a5 as SSEStreamResult, a6 as SSEStreamStartData, a8 as SkillSummary, aa as TaskResponse, ab as UpdateMemoryRequest, ac as UpdateTaskRequest, ai as UserDailyUsageResponse, aj as UserInfo, ak as UserInputRequestEvent, al as UserMessageEvent, am as WebSocketAuthError, an as WorkspaceChronologyOut, ao as WorkspaceContext, ap as WsConnection, aq as agentconfig, ar as assistant, as as authenticatedFetch, au as buildRetrievalChunkTool, av as buildRetrievalFullContextTool, aw as buildRetrievalTocTool, ax as connectWebSocket, ay as connectWithReconnect, az as consumeSSEStream, aA as contacts, aB as conversations, aC as countCitations, aD as createAuthenticatedClient, aF as dm, aG as doctags, aH as documents, aI as files, aJ as filterSkills, aK as formatAgentStepLabel, aL as formatFileSize,
|
|
1
|
+
export { A as AgentControlStateEvent, a as AgentStepDeltaEvent, b as AgentStepEvent, c as Arbi, d as ArbiApiError, e as ArbiError, f as ArbiErrorEvent, g as ArbiOptions, h as ArtifactEvent, i as AuthContext, j as AuthHeaders, k as AuthenticatedClient, C as ChatSession, l as CitationSummary, m as CliConfig, n as CliCredentials, o as CommandDescriptor, p as ConfigStore, q as ConnectOptions, r as CreateMemoryRequest, s as CreateTaskRequest, t as DeferredInterjectionEvent, M as MemoryResponse, E as MemorySearchRequest, G as MemorySearchResponse, I as MessageMetadataPayload, J as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, K as ProbeAnswerEvent, N as ProjectInvoicesResponse, Q as ProjectUsageResponse, R as QueryOptions, S as ReconnectOptions, T as ReconnectableWsConnection, U as ResolvedCitation, W as ResponseCompletedEvent, X as ResponseContentPartAddedEvent, Y as ResponseCreatedEvent, Z as ResponseFailedEvent, _ as ResponseOutputItemAddedEvent, $ as ResponseOutputItemDoneEvent, a0 as ResponseOutputTextDeltaEvent, a1 as ResponseOutputTextDoneEvent, a2 as ResponseUsage, a3 as SSEEvent, a4 as SSEStreamCallbacks, a5 as SSEStreamResult, a6 as SSEStreamStartData, a8 as SkillSummary, aa as TaskResponse, ab as UpdateMemoryRequest, ac as UpdateTaskRequest, ai as UserDailyUsageResponse, aj as UserInfo, ak as UserInputRequestEvent, al as UserMessageEvent, am as WebSocketAuthError, an as WorkspaceChronologyOut, ao as WorkspaceContext, ap as WsConnection, aq as agentconfig, ar as assistant, as as authenticatedFetch, au as buildRetrievalChunkTool, av as buildRetrievalFullContextTool, aw as buildRetrievalTocTool, ax as connectWebSocket, ay as connectWithReconnect, az as consumeSSEStream, aA as contacts, aB as conversations, aC as countCitations, aD as createAuthenticatedClient, aF as dm, aG as doctags, aH as documents, aI as files, aJ as filterSkills, aK as formatAgentStepLabel, aL as formatFileSize, aM as formatItemLabel, aO as formatUserName, aP as formatWorkspaceChoices, aU as getErrorMessage, aV as getRawWorkspaceKey, aW as health, aX as memory, aY as parseSSEEvents, aZ as parseSlashCommand, a_ as parseSlashTokenInProgress, a$ as performPasswordLogin, b2 as projects, b3 as requireData, b4 as requireOk, b5 as resolveAuth, b6 as resolveCitations, b7 as resolveWorkspace, b8 as responses, b9 as selectWorkspace, ba as selectWorkspaceById, bb as settings, bc as streamSSE, bd as stripCitationMarkdown, be as summarizeCitations, bf as tags, bg as tasks, bh as workspaces } from './browser-k4I8Geez.cjs';
|
|
2
2
|
import '@arbidocs/client';
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as AgentControlStateEvent, a as AgentStepDeltaEvent, b as AgentStepEvent, c as Arbi, d as ArbiApiError, e as ArbiError, f as ArbiErrorEvent, g as ArbiOptions, h as ArtifactEvent, i as AuthContext, j as AuthHeaders, k as AuthenticatedClient, C as ChatSession, l as CitationSummary, m as CliConfig, n as CliCredentials, o as CommandDescriptor, p as ConfigStore, q as ConnectOptions, r as CreateMemoryRequest, s as CreateTaskRequest, t as DeferredInterjectionEvent, M as MemoryResponse, E as MemorySearchRequest, G as MemorySearchResponse, I as MessageMetadataPayload, J as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, K as ProbeAnswerEvent, N as ProjectInvoicesResponse, Q as ProjectUsageResponse, R as QueryOptions, S as ReconnectOptions, T as ReconnectableWsConnection, U as ResolvedCitation, W as ResponseCompletedEvent, X as ResponseContentPartAddedEvent, Y as ResponseCreatedEvent, Z as ResponseFailedEvent, _ as ResponseOutputItemAddedEvent, $ as ResponseOutputItemDoneEvent, a0 as ResponseOutputTextDeltaEvent, a1 as ResponseOutputTextDoneEvent, a2 as ResponseUsage, a3 as SSEEvent, a4 as SSEStreamCallbacks, a5 as SSEStreamResult, a6 as SSEStreamStartData, a8 as SkillSummary, aa as TaskResponse, ab as UpdateMemoryRequest, ac as UpdateTaskRequest, ai as UserDailyUsageResponse, aj as UserInfo, ak as UserInputRequestEvent, al as UserMessageEvent, am as WebSocketAuthError, an as WorkspaceChronologyOut, ao as WorkspaceContext, ap as WsConnection, aq as agentconfig, ar as assistant, as as authenticatedFetch, au as buildRetrievalChunkTool, av as buildRetrievalFullContextTool, aw as buildRetrievalTocTool, ax as connectWebSocket, ay as connectWithReconnect, az as consumeSSEStream, aA as contacts, aB as conversations, aC as countCitations, aD as createAuthenticatedClient, aF as dm, aG as doctags, aH as documents, aI as files, aJ as filterSkills, aK as formatAgentStepLabel, aL as formatFileSize,
|
|
1
|
+
export { A as AgentControlStateEvent, a as AgentStepDeltaEvent, b as AgentStepEvent, c as Arbi, d as ArbiApiError, e as ArbiError, f as ArbiErrorEvent, g as ArbiOptions, h as ArtifactEvent, i as AuthContext, j as AuthHeaders, k as AuthenticatedClient, C as ChatSession, l as CitationSummary, m as CliConfig, n as CliCredentials, o as CommandDescriptor, p as ConfigStore, q as ConnectOptions, r as CreateMemoryRequest, s as CreateTaskRequest, t as DeferredInterjectionEvent, M as MemoryResponse, E as MemorySearchRequest, G as MemorySearchResponse, I as MessageMetadataPayload, J as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, K as ProbeAnswerEvent, N as ProjectInvoicesResponse, Q as ProjectUsageResponse, R as QueryOptions, S as ReconnectOptions, T as ReconnectableWsConnection, U as ResolvedCitation, W as ResponseCompletedEvent, X as ResponseContentPartAddedEvent, Y as ResponseCreatedEvent, Z as ResponseFailedEvent, _ as ResponseOutputItemAddedEvent, $ as ResponseOutputItemDoneEvent, a0 as ResponseOutputTextDeltaEvent, a1 as ResponseOutputTextDoneEvent, a2 as ResponseUsage, a3 as SSEEvent, a4 as SSEStreamCallbacks, a5 as SSEStreamResult, a6 as SSEStreamStartData, a8 as SkillSummary, aa as TaskResponse, ab as UpdateMemoryRequest, ac as UpdateTaskRequest, ai as UserDailyUsageResponse, aj as UserInfo, ak as UserInputRequestEvent, al as UserMessageEvent, am as WebSocketAuthError, an as WorkspaceChronologyOut, ao as WorkspaceContext, ap as WsConnection, aq as agentconfig, ar as assistant, as as authenticatedFetch, au as buildRetrievalChunkTool, av as buildRetrievalFullContextTool, aw as buildRetrievalTocTool, ax as connectWebSocket, ay as connectWithReconnect, az as consumeSSEStream, aA as contacts, aB as conversations, aC as countCitations, aD as createAuthenticatedClient, aF as dm, aG as doctags, aH as documents, aI as files, aJ as filterSkills, aK as formatAgentStepLabel, aL as formatFileSize, aM as formatItemLabel, aO as formatUserName, aP as formatWorkspaceChoices, aU as getErrorMessage, aV as getRawWorkspaceKey, aW as health, aX as memory, aY as parseSSEEvents, aZ as parseSlashCommand, a_ as parseSlashTokenInProgress, a$ as performPasswordLogin, b2 as projects, b3 as requireData, b4 as requireOk, b5 as resolveAuth, b6 as resolveCitations, b7 as resolveWorkspace, b8 as responses, b9 as selectWorkspace, ba as selectWorkspaceById, bb as settings, bc as streamSSE, bd as stripCitationMarkdown, be as summarizeCitations, bf as tags, bg as tasks, bh as workspaces } from './browser-k4I8Geez.js';
|
|
2
2
|
import '@arbidocs/client';
|
package/dist/browser.js
CHANGED
|
@@ -3819,6 +3819,12 @@ function extractPageRange(step) {
|
|
|
3819
3819
|
}
|
|
3820
3820
|
return void 0;
|
|
3821
3821
|
}
|
|
3822
|
+
function formatItemLabel(item, docNames) {
|
|
3823
|
+
const arbi = item.arbi;
|
|
3824
|
+
if (arbi?.focus) return resolveDocRefs(arbi.focus, docNames);
|
|
3825
|
+
if (arbi?.label) return arbi.label;
|
|
3826
|
+
return item.name ?? "";
|
|
3827
|
+
}
|
|
3822
3828
|
function formatAgentStepLabel(step, docNames) {
|
|
3823
3829
|
if (step.step === "goal") {
|
|
3824
3830
|
return step.label && step.label !== "Goal" ? step.label : "Thinking\u2026";
|
|
@@ -3899,7 +3905,11 @@ async function streamSSE(response, callbacks = {}) {
|
|
|
3899
3905
|
const data = JSON.parse(raw);
|
|
3900
3906
|
if (data.delta) {
|
|
3901
3907
|
text += data.delta;
|
|
3902
|
-
callbacks.
|
|
3908
|
+
if (callbacks.onOutputTextDelta) {
|
|
3909
|
+
callbacks.onOutputTextDelta({ item_id: data.item_id ?? "", delta: data.delta });
|
|
3910
|
+
} else {
|
|
3911
|
+
callbacks.onToken?.(data.delta);
|
|
3912
|
+
}
|
|
3903
3913
|
}
|
|
3904
3914
|
},
|
|
3905
3915
|
"response.output_text.done": (raw) => {
|
|
@@ -3907,9 +3917,20 @@ async function streamSSE(response, callbacks = {}) {
|
|
|
3907
3917
|
text = data.text;
|
|
3908
3918
|
callbacks.onTextDone?.(data.text);
|
|
3909
3919
|
},
|
|
3920
|
+
"response.function_call_arguments.delta": (raw) => {
|
|
3921
|
+
const data = JSON.parse(raw);
|
|
3922
|
+
callbacks.onFunctionCallArgumentsDelta?.(data);
|
|
3923
|
+
},
|
|
3910
3924
|
"response.output_item.done": (raw) => {
|
|
3911
3925
|
const data = JSON.parse(raw);
|
|
3926
|
+
const item = data.item;
|
|
3927
|
+
if (item?.type === "function_call" || item?.type === "reasoning") {
|
|
3928
|
+
const label = formatItemLabel(item);
|
|
3929
|
+
if (label) agentSteps.push(label);
|
|
3930
|
+
if (item.type === "function_call") toolCallCount += 1;
|
|
3931
|
+
}
|
|
3912
3932
|
callbacks.onOutputItemDone?.(data);
|
|
3933
|
+
if (data.t != null) callbacks.onElapsedTime?.(data.t);
|
|
3913
3934
|
},
|
|
3914
3935
|
"response.completed": (raw) => {
|
|
3915
3936
|
const data = JSON.parse(raw);
|
|
@@ -3948,27 +3969,6 @@ async function streamSSE(response, callbacks = {}) {
|
|
|
3948
3969
|
}
|
|
3949
3970
|
callbacks.onMessageQueued?.(data);
|
|
3950
3971
|
},
|
|
3951
|
-
"arbi.agent_step": (raw) => {
|
|
3952
|
-
const data = JSON.parse(raw);
|
|
3953
|
-
const label = formatAgentStepLabel(data);
|
|
3954
|
-
if (label) agentSteps.push(label);
|
|
3955
|
-
const detail = data.detail;
|
|
3956
|
-
if (detail && Array.isArray(detail)) {
|
|
3957
|
-
toolCallCount += detail.filter((d2) => d2.tool).length;
|
|
3958
|
-
}
|
|
3959
|
-
callbacks.onAgentStep?.(data);
|
|
3960
|
-
if (data.t != null) callbacks.onElapsedTime?.(data.t);
|
|
3961
|
-
},
|
|
3962
|
-
"arbi.generating": (raw) => {
|
|
3963
|
-
const data = JSON.parse(raw);
|
|
3964
|
-
callbacks.onGenerating?.(data);
|
|
3965
|
-
if (data.t != null) callbacks.onElapsedTime?.(data.t);
|
|
3966
|
-
},
|
|
3967
|
-
"arbi.agent_step_delta": (raw) => {
|
|
3968
|
-
const data = JSON.parse(raw);
|
|
3969
|
-
callbacks.onAgentStepDelta?.(data);
|
|
3970
|
-
if (data.t != null) callbacks.onElapsedTime?.(data.t);
|
|
3971
|
-
},
|
|
3972
3972
|
"arbi.user_message": (raw) => {
|
|
3973
3973
|
const data = JSON.parse(raw);
|
|
3974
3974
|
userMessage = data;
|
|
@@ -5895,7 +5895,7 @@ var Arbi = class {
|
|
|
5895
5895
|
const callbacks = {
|
|
5896
5896
|
onToken: options.onToken,
|
|
5897
5897
|
onStreamStart: options.onStreamStart,
|
|
5898
|
-
|
|
5898
|
+
onOutputItemDone: options.onOutputItemDone,
|
|
5899
5899
|
onError: options.onError,
|
|
5900
5900
|
onUserMessage: options.onUserMessage,
|
|
5901
5901
|
onMetadata: options.onMetadata,
|
|
@@ -6171,6 +6171,6 @@ function extractResponseText(response) {
|
|
|
6171
6171
|
return parts.join("");
|
|
6172
6172
|
}
|
|
6173
6173
|
|
|
6174
|
-
export { Arbi, ArbiApiError, ArbiError, WebSocketAuthError, 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, filterSkills, formatAgentStepLabel, formatFileSize, formatUserName, formatWorkspaceChoices, getErrorMessage, getRawWorkspaceKey, health_exports as health, memory_exports as memory, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, performPasswordLogin, projects_exports as projects, requireData, requireOk, resolveAuth, resolveCitations, resolveWorkspace, responses_exports as responses, selectWorkspace, selectWorkspaceById, settings_exports as settings, streamSSE, stripCitationMarkdown, summarizeCitations, tags_exports as tags, tasks_exports as tasks, workspaces_exports as workspaces };
|
|
6174
|
+
export { Arbi, ArbiApiError, ArbiError, WebSocketAuthError, 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, filterSkills, formatAgentStepLabel, formatFileSize, formatItemLabel, formatUserName, formatWorkspaceChoices, getErrorMessage, getRawWorkspaceKey, health_exports as health, memory_exports as memory, parseSSEEvents, parseSlashCommand, parseSlashTokenInProgress, performPasswordLogin, projects_exports as projects, requireData, requireOk, resolveAuth, resolveCitations, resolveWorkspace, responses_exports as responses, selectWorkspace, selectWorkspaceById, settings_exports as settings, streamSSE, stripCitationMarkdown, summarizeCitations, tags_exports as tags, tasks_exports as tasks, workspaces_exports as workspaces };
|
|
6175
6175
|
//# sourceMappingURL=browser.js.map
|
|
6176
6176
|
//# sourceMappingURL=browser.js.map
|