@arbidocs/sdk 0.3.132 → 0.3.133
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-B1XvwSa9.d.cts → browser-BSWvYcjS.d.cts} +8 -0
- package/dist/{browser-B1XvwSa9.d.ts → browser-BSWvYcjS.d.ts} +8 -0
- package/dist/browser.cjs +11 -10
- 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 +11 -10
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +11 -10
- 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 +11 -10
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as ConfigStore, m as CliConfig, n as CliCredentials, C as ChatSession, a9 as SkippedFile, ah as UploadResult, j as AuthHeaders, ad as UploadBatchResult, ag as UploadOptions, ae as UploadDirectOptions, af as UploadDirectResult, a7 as SUPPORTED_EXTENSIONS, u as DmCryptoContext } from './browser-
|
|
2
|
-
export { b as AgentStepEvent, c as Arbi, d as ArbiApiError, e as ArbiError, g as ArbiOptions, h as ArtifactEvent, i as AuthContext, k as AuthenticatedClient, l as CitationSummary, o as CommandDescriptor, q as ConnectOptions, D as DOC_TERMINAL_STATUSES, v as DocNameMap, w as DocumentListFields, x as DocumentListOrder, y as DocumentWaiter, z as DocumentWaiterOptions, F as FormattedWsMessage, L as ListAllOptions, B as ListPaginatedOptions, H as MessageLevel, I as MessageMetadataPayload, J as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, N as ProjectInvoicesResponse, Q as ProjectUsageResponse, R as QueryOptions, S as ReconnectOptions, T as ReconnectableWsConnection, U as ResolvedCitation, V as ResolvedRecipient, 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, 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, at as buildDocNameMap, 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, aE as createDocumentWaiter, aF as dm, aG as doctags, aH as documents, aI as files, aJ as filterSkills, aK as formatAgentStepLabel, aL as formatFileSize, aM as formatStreamSummary, aN as formatUserName, aO as formatWorkspaceChoices, aP as formatWsMessage, aQ as generateEncryptedWorkspaceKey, aR as generateNewWorkspaceKey, aS as getErrorCode, aT as getErrorMessage, aU as getRawWorkspaceKey, aV as health, aX as parseSSEEvents, aY as parseSlashCommand, aZ as parseSlashTokenInProgress, a_ as performPasswordLogin, a$ as performSigningKeyLogin, b0 as performSsoDeviceFlowLogin, b1 as projects, b2 as requireData, b3 as requireOk, b4 as resolveAuth, b5 as resolveCitations, b6 as resolveWorkspace, b7 as responses, b8 as selectWorkspace, b9 as selectWorkspaceById, ba as settings, bb as streamSSE, bc as stripCitationMarkdown, bd as summarizeCitations, be as tags, bf as tasks, bg as workspaces } from './browser-
|
|
1
|
+
import { p as ConfigStore, m as CliConfig, n as CliCredentials, C as ChatSession, a9 as SkippedFile, ah as UploadResult, j as AuthHeaders, ad as UploadBatchResult, ag as UploadOptions, ae as UploadDirectOptions, af as UploadDirectResult, a7 as SUPPORTED_EXTENSIONS, u as DmCryptoContext } from './browser-BSWvYcjS.cjs';
|
|
2
|
+
export { b as AgentStepEvent, c as Arbi, d as ArbiApiError, e as ArbiError, g as ArbiOptions, h as ArtifactEvent, i as AuthContext, k as AuthenticatedClient, l as CitationSummary, o as CommandDescriptor, q as ConnectOptions, D as DOC_TERMINAL_STATUSES, v as DocNameMap, w as DocumentListFields, x as DocumentListOrder, y as DocumentWaiter, z as DocumentWaiterOptions, F as FormattedWsMessage, L as ListAllOptions, B as ListPaginatedOptions, H as MessageLevel, I as MessageMetadataPayload, J as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, N as ProjectInvoicesResponse, Q as ProjectUsageResponse, R as QueryOptions, S as ReconnectOptions, T as ReconnectableWsConnection, U as ResolvedCitation, V as ResolvedRecipient, 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, 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, at as buildDocNameMap, 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, aE as createDocumentWaiter, aF as dm, aG as doctags, aH as documents, aI as files, aJ as filterSkills, aK as formatAgentStepLabel, aL as formatFileSize, aM as formatStreamSummary, aN as formatUserName, aO as formatWorkspaceChoices, aP as formatWsMessage, aQ as generateEncryptedWorkspaceKey, aR as generateNewWorkspaceKey, aS as getErrorCode, aT as getErrorMessage, aU as getRawWorkspaceKey, aV as health, aX as parseSSEEvents, aY as parseSlashCommand, aZ as parseSlashTokenInProgress, a_ as performPasswordLogin, a$ as performSigningKeyLogin, b0 as performSsoDeviceFlowLogin, b1 as projects, b2 as requireData, b3 as requireOk, b4 as resolveAuth, b5 as resolveCitations, b6 as resolveWorkspace, b7 as responses, b8 as selectWorkspace, b9 as selectWorkspaceById, ba as settings, bb as streamSSE, bc as stripCitationMarkdown, bd as summarizeCitations, be as tags, bf as tasks, bg as workspaces } from './browser-BSWvYcjS.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 { p as ConfigStore, m as CliConfig, n as CliCredentials, C as ChatSession, a9 as SkippedFile, ah as UploadResult, j as AuthHeaders, ad as UploadBatchResult, ag as UploadOptions, ae as UploadDirectOptions, af as UploadDirectResult, a7 as SUPPORTED_EXTENSIONS, u as DmCryptoContext } from './browser-
|
|
2
|
-
export { b as AgentStepEvent, c as Arbi, d as ArbiApiError, e as ArbiError, g as ArbiOptions, h as ArtifactEvent, i as AuthContext, k as AuthenticatedClient, l as CitationSummary, o as CommandDescriptor, q as ConnectOptions, D as DOC_TERMINAL_STATUSES, v as DocNameMap, w as DocumentListFields, x as DocumentListOrder, y as DocumentWaiter, z as DocumentWaiterOptions, F as FormattedWsMessage, L as ListAllOptions, B as ListPaginatedOptions, H as MessageLevel, I as MessageMetadataPayload, J as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, N as ProjectInvoicesResponse, Q as ProjectUsageResponse, R as QueryOptions, S as ReconnectOptions, T as ReconnectableWsConnection, U as ResolvedCitation, V as ResolvedRecipient, 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, 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, at as buildDocNameMap, 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, aE as createDocumentWaiter, aF as dm, aG as doctags, aH as documents, aI as files, aJ as filterSkills, aK as formatAgentStepLabel, aL as formatFileSize, aM as formatStreamSummary, aN as formatUserName, aO as formatWorkspaceChoices, aP as formatWsMessage, aQ as generateEncryptedWorkspaceKey, aR as generateNewWorkspaceKey, aS as getErrorCode, aT as getErrorMessage, aU as getRawWorkspaceKey, aV as health, aX as parseSSEEvents, aY as parseSlashCommand, aZ as parseSlashTokenInProgress, a_ as performPasswordLogin, a$ as performSigningKeyLogin, b0 as performSsoDeviceFlowLogin, b1 as projects, b2 as requireData, b3 as requireOk, b4 as resolveAuth, b5 as resolveCitations, b6 as resolveWorkspace, b7 as responses, b8 as selectWorkspace, b9 as selectWorkspaceById, ba as settings, bb as streamSSE, bc as stripCitationMarkdown, bd as summarizeCitations, be as tags, bf as tasks, bg as workspaces } from './browser-
|
|
1
|
+
import { p as ConfigStore, m as CliConfig, n as CliCredentials, C as ChatSession, a9 as SkippedFile, ah as UploadResult, j as AuthHeaders, ad as UploadBatchResult, ag as UploadOptions, ae as UploadDirectOptions, af as UploadDirectResult, a7 as SUPPORTED_EXTENSIONS, u as DmCryptoContext } from './browser-BSWvYcjS.js';
|
|
2
|
+
export { b as AgentStepEvent, c as Arbi, d as ArbiApiError, e as ArbiError, g as ArbiOptions, h as ArtifactEvent, i as AuthContext, k as AuthenticatedClient, l as CitationSummary, o as CommandDescriptor, q as ConnectOptions, D as DOC_TERMINAL_STATUSES, v as DocNameMap, w as DocumentListFields, x as DocumentListOrder, y as DocumentWaiter, z as DocumentWaiterOptions, F as FormattedWsMessage, L as ListAllOptions, B as ListPaginatedOptions, H as MessageLevel, I as MessageMetadataPayload, J as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, N as ProjectInvoicesResponse, Q as ProjectUsageResponse, R as QueryOptions, S as ReconnectOptions, T as ReconnectableWsConnection, U as ResolvedCitation, V as ResolvedRecipient, 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, 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, at as buildDocNameMap, 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, aE as createDocumentWaiter, aF as dm, aG as doctags, aH as documents, aI as files, aJ as filterSkills, aK as formatAgentStepLabel, aL as formatFileSize, aM as formatStreamSummary, aN as formatUserName, aO as formatWorkspaceChoices, aP as formatWsMessage, aQ as generateEncryptedWorkspaceKey, aR as generateNewWorkspaceKey, aS as getErrorCode, aT as getErrorMessage, aU as getRawWorkspaceKey, aV as health, aX as parseSSEEvents, aY as parseSlashCommand, aZ as parseSlashTokenInProgress, a_ as performPasswordLogin, a$ as performSigningKeyLogin, b0 as performSsoDeviceFlowLogin, b1 as projects, b2 as requireData, b3 as requireOk, b4 as resolveAuth, b5 as resolveCitations, b6 as resolveWorkspace, b7 as responses, b8 as selectWorkspace, b9 as selectWorkspaceById, ba as settings, bb as streamSSE, bc as stripCitationMarkdown, bd as summarizeCitations, be as tags, bf as tasks, bg as workspaces } from './browser-BSWvYcjS.js';
|
|
3
3
|
import { SessionStorageProvider, ArbiClient, components } from '@arbidocs/client';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/index.js
CHANGED
|
@@ -4178,14 +4178,10 @@ async function resolveWorkspace(store, workspaceOpt) {
|
|
|
4178
4178
|
}
|
|
4179
4179
|
|
|
4180
4180
|
// src/sse.ts
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
interjection: "Your message",
|
|
4186
|
-
planning: "Planning",
|
|
4187
|
-
tool_progress: "Working"
|
|
4188
|
-
};
|
|
4181
|
+
function humanizeStep(identifier) {
|
|
4182
|
+
const spaced = identifier.replace(/[_-]+/g, " ").trim();
|
|
4183
|
+
return spaced.charAt(0).toUpperCase() + spaced.slice(1);
|
|
4184
|
+
}
|
|
4189
4185
|
function buildDocNameMap(docs) {
|
|
4190
4186
|
const map = {};
|
|
4191
4187
|
for (const doc of docs) {
|
|
@@ -4238,13 +4234,13 @@ function formatAgentStepLabel(step, docNames) {
|
|
|
4238
4234
|
if (step.label) return `${step.label}${suffix}`;
|
|
4239
4235
|
const detail = step.detail;
|
|
4240
4236
|
if (step.step === "tool_progress" && detail && detail.length > 0) {
|
|
4241
|
-
const label = detail[0].label ||
|
|
4237
|
+
const label = detail[0].label || humanizeStep(step.step);
|
|
4242
4238
|
if (suffix) return `${label}${suffix}`;
|
|
4243
4239
|
const message = detail[0].message;
|
|
4244
4240
|
return message ? `${label}: ${resolveDocRefs(message, docNames)}` : label;
|
|
4245
4241
|
}
|
|
4246
4242
|
if (step.step) {
|
|
4247
|
-
return
|
|
4243
|
+
return humanizeStep(step.step);
|
|
4248
4244
|
}
|
|
4249
4245
|
if (detail && detail.length > 0) {
|
|
4250
4246
|
if (detail[0].label) return `${detail[0].label}${suffix}`;
|
|
@@ -4367,6 +4363,11 @@ async function streamSSE(response, callbacks = {}) {
|
|
|
4367
4363
|
callbacks.onAgentStep?.(data);
|
|
4368
4364
|
if (data.t != null) callbacks.onElapsedTime?.(data.t);
|
|
4369
4365
|
},
|
|
4366
|
+
"arbi.generating": (raw) => {
|
|
4367
|
+
const data = JSON.parse(raw);
|
|
4368
|
+
callbacks.onGenerating?.(data);
|
|
4369
|
+
if (data.t != null) callbacks.onElapsedTime?.(data.t);
|
|
4370
|
+
},
|
|
4370
4371
|
"arbi.agent_step_delta": (raw) => {
|
|
4371
4372
|
const data = JSON.parse(raw);
|
|
4372
4373
|
callbacks.onAgentStepDelta?.(data);
|