@arbidocs/sdk 0.3.139 → 0.3.140
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-CygvmtPQ.d.cts → browser-B9JRGjYZ.d.cts} +11 -5
- package/dist/{browser-CygvmtPQ.d.ts → browser-B9JRGjYZ.d.ts} +11 -5
- package/dist/browser.cjs +1 -0
- 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 +1 -0
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +4 -0
- 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,
|
|
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, M as MessageLevel, E as MessageMetadataPayload, G as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, K 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,
|
|
1
|
+
import { p as ConfigStore, m as CliConfig, n as CliCredentials, C as ChatSession, a9 as SkippedFile, ai as UploadResult, j as AuthHeaders, ae as UploadBatchResult, ah as UploadOptions, af as UploadDirectOptions, ag as UploadDirectResult, a7 as SUPPORTED_EXTENSIONS, u as DmCryptoContext } from './browser-B9JRGjYZ.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, M as MessageLevel, E as MessageMetadataPayload, G as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, K 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, ab as TokenBudgetContext, aj as UserDailyUsageResponse, ak as UserInfo, al as UserInputRequestEvent, am as UserMessageEvent, an as WebSocketAuthError, ao as WorkspaceChronologyOut, ap as WorkspaceContext, aq as WsConnection, ar as agentconfig, as as assistant, at as authenticatedFetch, au as buildDocNameMap, av as buildRetrievalChunkTool, aw as buildRetrievalFullContextTool, ax as buildRetrievalTocTool, ay as connectWebSocket, az as connectWithReconnect, aA as consumeSSEStream, aB as contacts, aC as conversations, aD as countCitations, aE as createAuthenticatedClient, aF as createDocumentWaiter, aG as dm, aH as doctags, aI as documents, aJ as files, aK as filterSkills, aL as formatAgentStepLabel, aM as formatFileSize, aN as formatItemLabel, aO as formatStreamSummary, aP as formatUserName, aQ as formatWorkspaceChoices, aR as formatWsMessage, aS as generateEncryptedWorkspaceKey, aT as generateNewWorkspaceKey, aU as getErrorCode, aV as getErrorMessage, aW as getRawWorkspaceKey, aX as health, aZ as parseSSEEvents, a_ as parseSlashCommand, a$ as parseSlashTokenInProgress, b0 as performPasswordLogin, b1 as performSigningKeyLogin, b2 as performSsoDeviceFlowLogin, b3 as projects, b4 as requireData, b5 as requireOk, b6 as resolveAuth, b7 as resolveCitations, b8 as resolveWorkspace, b9 as responses, ba as selectWorkspace, bb as selectWorkspaceById, bc as settings, bd as streamSSE, be as stripCitationMarkdown, bf as summarizeCitations, bg as tags, bh as tasks, bi as workspaces } from './browser-B9JRGjYZ.cjs';
|
|
3
3
|
import { SessionStorageProvider, ArbiClient, components } from '@arbidocs/client';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -421,6 +421,7 @@ declare function getAgentConfig(arbi: ArbiClient, agentExtId: string): Promise<{
|
|
|
421
421
|
ENABLE_THINKING: boolean;
|
|
422
422
|
AGENT_STRICT_TOOL_CALLS: boolean;
|
|
423
423
|
AGENT_MAX_ITERATIONS: number;
|
|
424
|
+
AGENT_TURN_CREDIT_BUDGET: number;
|
|
424
425
|
AGENT_MAX_PARALLEL_TOOL_CALLS: number;
|
|
425
426
|
AGENT_HISTORY_CHAR_THRESHOLD: number;
|
|
426
427
|
AGENT_SYSTEM_PROMPT: string;
|
|
@@ -544,7 +545,6 @@ declare function getAgentConfig(arbi: ArbiClient, agentExtId: string): Promise<{
|
|
|
544
545
|
SYSTEM_INSTRUCTION: string;
|
|
545
546
|
TEMPERATURE: number;
|
|
546
547
|
MAX_TOKENS: number;
|
|
547
|
-
MAX_ITERATIONS: number;
|
|
548
548
|
};
|
|
549
549
|
ModelCitation: {
|
|
550
550
|
SIM_THREASHOLD: number;
|
|
@@ -649,6 +649,7 @@ declare function getAgentConfig(arbi: ArbiClient, agentExtId: string): Promise<{
|
|
|
649
649
|
AGENT_MODEL_NAME: string;
|
|
650
650
|
ENABLE_THINKING: boolean;
|
|
651
651
|
AGENT_MAX_ITERATIONS: number;
|
|
652
|
+
AGENT_TURN_CREDIT_BUDGET: number;
|
|
652
653
|
};
|
|
653
654
|
DoctagLLM: {
|
|
654
655
|
AUTO_RENAME: boolean;
|
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,
|
|
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, M as MessageLevel, E as MessageMetadataPayload, G as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, K 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,
|
|
1
|
+
import { p as ConfigStore, m as CliConfig, n as CliCredentials, C as ChatSession, a9 as SkippedFile, ai as UploadResult, j as AuthHeaders, ae as UploadBatchResult, ah as UploadOptions, af as UploadDirectOptions, ag as UploadDirectResult, a7 as SUPPORTED_EXTENSIONS, u as DmCryptoContext } from './browser-B9JRGjYZ.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, M as MessageLevel, E as MessageMetadataPayload, G as MessageQueuedEvent, O as OutputTokensDetails, P as ParsedSlashCommand, K 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, ab as TokenBudgetContext, aj as UserDailyUsageResponse, ak as UserInfo, al as UserInputRequestEvent, am as UserMessageEvent, an as WebSocketAuthError, ao as WorkspaceChronologyOut, ap as WorkspaceContext, aq as WsConnection, ar as agentconfig, as as assistant, at as authenticatedFetch, au as buildDocNameMap, av as buildRetrievalChunkTool, aw as buildRetrievalFullContextTool, ax as buildRetrievalTocTool, ay as connectWebSocket, az as connectWithReconnect, aA as consumeSSEStream, aB as contacts, aC as conversations, aD as countCitations, aE as createAuthenticatedClient, aF as createDocumentWaiter, aG as dm, aH as doctags, aI as documents, aJ as files, aK as filterSkills, aL as formatAgentStepLabel, aM as formatFileSize, aN as formatItemLabel, aO as formatStreamSummary, aP as formatUserName, aQ as formatWorkspaceChoices, aR as formatWsMessage, aS as generateEncryptedWorkspaceKey, aT as generateNewWorkspaceKey, aU as getErrorCode, aV as getErrorMessage, aW as getRawWorkspaceKey, aX as health, aZ as parseSSEEvents, a_ as parseSlashCommand, a$ as parseSlashTokenInProgress, b0 as performPasswordLogin, b1 as performSigningKeyLogin, b2 as performSsoDeviceFlowLogin, b3 as projects, b4 as requireData, b5 as requireOk, b6 as resolveAuth, b7 as resolveCitations, b8 as resolveWorkspace, b9 as responses, ba as selectWorkspace, bb as selectWorkspaceById, bc as settings, bd as streamSSE, be as stripCitationMarkdown, bf as summarizeCitations, bg as tags, bh as tasks, bi as workspaces } from './browser-B9JRGjYZ.js';
|
|
3
3
|
import { SessionStorageProvider, ArbiClient, components } from '@arbidocs/client';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -421,6 +421,7 @@ declare function getAgentConfig(arbi: ArbiClient, agentExtId: string): Promise<{
|
|
|
421
421
|
ENABLE_THINKING: boolean;
|
|
422
422
|
AGENT_STRICT_TOOL_CALLS: boolean;
|
|
423
423
|
AGENT_MAX_ITERATIONS: number;
|
|
424
|
+
AGENT_TURN_CREDIT_BUDGET: number;
|
|
424
425
|
AGENT_MAX_PARALLEL_TOOL_CALLS: number;
|
|
425
426
|
AGENT_HISTORY_CHAR_THRESHOLD: number;
|
|
426
427
|
AGENT_SYSTEM_PROMPT: string;
|
|
@@ -544,7 +545,6 @@ declare function getAgentConfig(arbi: ArbiClient, agentExtId: string): Promise<{
|
|
|
544
545
|
SYSTEM_INSTRUCTION: string;
|
|
545
546
|
TEMPERATURE: number;
|
|
546
547
|
MAX_TOKENS: number;
|
|
547
|
-
MAX_ITERATIONS: number;
|
|
548
548
|
};
|
|
549
549
|
ModelCitation: {
|
|
550
550
|
SIM_THREASHOLD: number;
|
|
@@ -649,6 +649,7 @@ declare function getAgentConfig(arbi: ArbiClient, agentExtId: string): Promise<{
|
|
|
649
649
|
AGENT_MODEL_NAME: string;
|
|
650
650
|
ENABLE_THINKING: boolean;
|
|
651
651
|
AGENT_MAX_ITERATIONS: number;
|
|
652
|
+
AGENT_TURN_CREDIT_BUDGET: number;
|
|
652
653
|
};
|
|
653
654
|
DoctagLLM: {
|
|
654
655
|
AUTO_RENAME: boolean;
|
package/dist/index.js
CHANGED
|
@@ -4354,6 +4354,7 @@ async function streamSSE(response, callbacks = {}) {
|
|
|
4354
4354
|
}
|
|
4355
4355
|
if (data.context) {
|
|
4356
4356
|
context = data.context;
|
|
4357
|
+
callbacks.onContextUpdate?.(data.context);
|
|
4357
4358
|
}
|
|
4358
4359
|
if (data.t != null) callbacks.onElapsedTime?.(data.t);
|
|
4359
4360
|
callbacks.onComplete?.();
|
|
@@ -4469,6 +4470,9 @@ function formatStreamSummary(result, elapsedTime) {
|
|
|
4469
4470
|
const used = result.context.all_llm_calls?.last_input_tokens ?? result.context.total_input;
|
|
4470
4471
|
parts.push(`${used.toLocaleString()}/${result.context.context_window.toLocaleString()} context`);
|
|
4471
4472
|
}
|
|
4473
|
+
if (result.context?.credits_spent != null && result.context.credit_budget != null) {
|
|
4474
|
+
parts.push(`${result.context.credits_spent.toFixed(2)}/${result.context.credit_budget} credits`);
|
|
4475
|
+
}
|
|
4472
4476
|
if (elapsedTime != null) {
|
|
4473
4477
|
parts.push(`${elapsedTime.toFixed(1)}s`);
|
|
4474
4478
|
}
|