@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.
@@ -448,6 +448,8 @@ interface SSEStreamCallbacks {
448
448
  onArtifact?: (data: ArtifactEvent) => void;
449
449
  onElapsedTime?: (t: number) => void;
450
450
  onUsage?: (usage: ResponseUsage) => void;
451
+ /** Final per-turn token/credit budget snapshot from response.completed. */
452
+ onContextUpdate?: (context: TokenBudgetContext) => void;
451
453
  onComplete?: () => void;
452
454
  }
453
455
  /**
@@ -481,7 +483,8 @@ declare function streamSSE(response: Response, callbacks?: SSEStreamCallbacks):
481
483
  * Format a human-readable summary line from a completed SSE stream result.
482
484
  *
483
485
  * Returns a string like:
484
- * "3 steps (2 tool calls) · 1,234 tokens · 500/8,000 context · 2.5s"
486
+ * "3 steps (2 tool calls) · 1,234 tokens · 500/8,000 context · 12.40/50 credits · 2.5s"
487
+ * (the credits segment is omitted when the workspace has no turn credit budget configured)
485
488
  *
486
489
  * Returns empty string if there's nothing to report.
487
490
  */
@@ -3391,6 +3394,7 @@ declare class Arbi {
3391
3394
  ENABLE_THINKING: boolean;
3392
3395
  AGENT_STRICT_TOOL_CALLS: boolean;
3393
3396
  AGENT_MAX_ITERATIONS: number;
3397
+ AGENT_TURN_CREDIT_BUDGET: number;
3394
3398
  AGENT_MAX_PARALLEL_TOOL_CALLS: number;
3395
3399
  AGENT_HISTORY_CHAR_THRESHOLD: number;
3396
3400
  AGENT_SYSTEM_PROMPT: string;
@@ -3514,7 +3518,6 @@ declare class Arbi {
3514
3518
  SYSTEM_INSTRUCTION: string;
3515
3519
  TEMPERATURE: number;
3516
3520
  MAX_TOKENS: number;
3517
- MAX_ITERATIONS: number;
3518
3521
  };
3519
3522
  ModelCitation: {
3520
3523
  SIM_THREASHOLD: number;
@@ -3619,6 +3622,7 @@ declare class Arbi {
3619
3622
  AGENT_MODEL_NAME: string;
3620
3623
  ENABLE_THINKING: boolean;
3621
3624
  AGENT_MAX_ITERATIONS: number;
3625
+ AGENT_TURN_CREDIT_BUDGET: number;
3622
3626
  };
3623
3627
  DoctagLLM: {
3624
3628
  AUTO_RENAME: boolean;
@@ -3821,6 +3825,7 @@ declare class Arbi {
3821
3825
  ENABLE_THINKING: boolean;
3822
3826
  AGENT_STRICT_TOOL_CALLS: boolean;
3823
3827
  AGENT_MAX_ITERATIONS: number;
3828
+ AGENT_TURN_CREDIT_BUDGET: number;
3824
3829
  AGENT_MAX_PARALLEL_TOOL_CALLS: number;
3825
3830
  AGENT_HISTORY_CHAR_THRESHOLD: number;
3826
3831
  AGENT_SYSTEM_PROMPT: string;
@@ -3944,7 +3949,6 @@ declare class Arbi {
3944
3949
  SYSTEM_INSTRUCTION: string;
3945
3950
  TEMPERATURE: number;
3946
3951
  MAX_TOKENS: number;
3947
- MAX_ITERATIONS: number;
3948
3952
  };
3949
3953
  ModelCitation: {
3950
3954
  SIM_THREASHOLD: number;
@@ -4049,6 +4053,7 @@ declare class Arbi {
4049
4053
  AGENT_MODEL_NAME: string;
4050
4054
  ENABLE_THINKING: boolean;
4051
4055
  AGENT_MAX_ITERATIONS: number;
4056
+ AGENT_TURN_CREDIT_BUDGET: number;
4052
4057
  };
4053
4058
  DoctagLLM: {
4054
4059
  AUTO_RENAME: boolean;
@@ -5163,6 +5168,7 @@ declare function getConfig(arbi: ArbiClient, configId: string): Promise<{
5163
5168
  ENABLE_THINKING: boolean;
5164
5169
  AGENT_STRICT_TOOL_CALLS: boolean;
5165
5170
  AGENT_MAX_ITERATIONS: number;
5171
+ AGENT_TURN_CREDIT_BUDGET: number;
5166
5172
  AGENT_MAX_PARALLEL_TOOL_CALLS: number;
5167
5173
  AGENT_HISTORY_CHAR_THRESHOLD: number;
5168
5174
  AGENT_SYSTEM_PROMPT: string;
@@ -5286,7 +5292,6 @@ declare function getConfig(arbi: ArbiClient, configId: string): Promise<{
5286
5292
  SYSTEM_INSTRUCTION: string;
5287
5293
  TEMPERATURE: number;
5288
5294
  MAX_TOKENS: number;
5289
- MAX_ITERATIONS: number;
5290
5295
  };
5291
5296
  ModelCitation: {
5292
5297
  SIM_THREASHOLD: number;
@@ -5391,6 +5396,7 @@ declare function getConfig(arbi: ArbiClient, configId: string): Promise<{
5391
5396
  AGENT_MODEL_NAME: string;
5392
5397
  ENABLE_THINKING: boolean;
5393
5398
  AGENT_MAX_ITERATIONS: number;
5399
+ AGENT_TURN_CREDIT_BUDGET: number;
5394
5400
  };
5395
5401
  DoctagLLM: {
5396
5402
  AUTO_RENAME: boolean;
@@ -5749,4 +5755,4 @@ declare namespace projects {
5749
5755
  export { type projects_ProjectInvoicesResponse as ProjectInvoicesResponse, type projects_ProjectUpdateRequest as ProjectUpdateRequest, type projects_ProjectUsageResponse as ProjectUsageResponse, type projects_UserDailyUsageResponse as UserDailyUsageResponse, projects_createProject as createProject, projects_deleteProject as deleteProject, projects_getProjectInvoices as getProjectInvoices, projects_getProjectUsage as getProjectUsage, projects_getUserUsageToday as getUserUsageToday, projects_listProjects as listProjects, projects_refreshProject as refreshProject, projects_renameProject as renameProject, projects_updateProject as updateProject };
5750
5756
  }
5751
5757
 
5752
- export { type ResponseOutputItemDoneEvent as $, type AgentControlStateEvent as A, type ListPaginatedOptions as B, type ChatSession as C, DOC_TERMINAL_STATUSES as D, type MessageMetadataPayload$1 as E, type FormattedWsMessage as F, type MessageQueuedEvent as G, type NoteSearchRequest as H, type NoteSearchResponse as I, type ProbeAnswerEvent as J, type ProjectInvoicesResponse as K, type ListAllOptions as L, type MessageLevel as M, type NoteResponse as N, type OutputTokensDetails as O, type ParsedSlashCommand as P, type ProjectUsageResponse as Q, type QueryOptions as R, type ReconnectOptions as S, type ReconnectableWsConnection as T, type ResolvedCitation as U, type ResolvedRecipient as V, type ResponseCompletedEvent as W, type ResponseContentPartAddedEvent as X, type ResponseCreatedEvent as Y, type ResponseFailedEvent as Z, type ResponseOutputItemAddedEvent as _, type AgentStepDeltaEvent as a, performPasswordLogin as a$, type ResponseOutputTextDeltaEvent as a0, type ResponseOutputTextDoneEvent as a1, type ResponseUsage as a2, type SSEEvent as a3, type SSEStreamCallbacks as a4, type SSEStreamResult as a5, type SSEStreamStartData as a6, SUPPORTED_EXTENSIONS as a7, type SkillSummary as a8, type SkippedFile as a9, contacts as aA, conversations as aB, countCitations as aC, createAuthenticatedClient as aD, createDocumentWaiter as aE, dm as aF, doctags as aG, documents as aH, files as aI, filterSkills as aJ, formatAgentStepLabel as aK, formatFileSize as aL, formatItemLabel as aM, formatStreamSummary as aN, formatUserName as aO, formatWorkspaceChoices as aP, formatWsMessage as aQ, generateEncryptedWorkspaceKey as aR, generateNewWorkspaceKey as aS, getErrorCode as aT, getErrorMessage as aU, getRawWorkspaceKey as aV, health as aW, notes as aX, parseSSEEvents as aY, parseSlashCommand as aZ, parseSlashTokenInProgress as a_, type TaskResponse as aa, type UpdateNoteRequest as ab, type UpdateTaskRequest as ac, type UploadBatchResult as ad, type UploadDirectOptions as ae, type UploadDirectResult as af, type UploadOptions as ag, type UploadResult as ah, type UserDailyUsageResponse as ai, type UserInfo as aj, type UserInputRequestEvent as ak, type UserMessageEvent as al, WebSocketAuthError as am, type WorkspaceChronologyOut as an, type WorkspaceContext as ao, type WsConnection as ap, agentconfig as aq, assistant as ar, authenticatedFetch as as, buildDocNameMap as at, buildRetrievalChunkTool as au, buildRetrievalFullContextTool as av, buildRetrievalTocTool as aw, connectWebSocket as ax, connectWithReconnect as ay, consumeSSEStream as az, type AgentStepEvent as b, performSigningKeyLogin as b0, performSsoDeviceFlowLogin as b1, projects as b2, requireData as b3, requireOk as b4, resolveAuth as b5, resolveCitations as b6, resolveWorkspace as b7, responses as b8, selectWorkspace as b9, selectWorkspaceById as ba, settings as bb, streamSSE as bc, stripCitationMarkdown as bd, summarizeCitations as be, tags as bf, tasks as bg, workspaces as bh, Arbi as c, ArbiApiError as d, ArbiError as e, type ArbiErrorEvent as f, type ArbiOptions as g, type ArtifactEvent as h, type AuthContext as i, type AuthHeaders as j, type AuthenticatedClient as k, type CitationSummary as l, type CliConfig as m, type CliCredentials as n, type CommandDescriptor as o, type ConfigStore as p, type ConnectOptions as q, type CreateNoteRequest as r, type CreateTaskRequest as s, type DeferredInterjectionEvent as t, type DmCryptoContext as u, type DocNameMap as v, type DocumentListFields as w, type DocumentListOrder as x, type DocumentWaiter as y, type DocumentWaiterOptions as z };
5758
+ export { type ResponseOutputItemDoneEvent as $, type AgentControlStateEvent as A, type ListPaginatedOptions as B, type ChatSession as C, DOC_TERMINAL_STATUSES as D, type MessageMetadataPayload$1 as E, type FormattedWsMessage as F, type MessageQueuedEvent as G, type NoteSearchRequest as H, type NoteSearchResponse as I, type ProbeAnswerEvent as J, type ProjectInvoicesResponse as K, type ListAllOptions as L, type MessageLevel as M, type NoteResponse as N, type OutputTokensDetails as O, type ParsedSlashCommand as P, type ProjectUsageResponse as Q, type QueryOptions as R, type ReconnectOptions as S, type ReconnectableWsConnection as T, type ResolvedCitation as U, type ResolvedRecipient as V, type ResponseCompletedEvent as W, type ResponseContentPartAddedEvent as X, type ResponseCreatedEvent as Y, type ResponseFailedEvent as Z, type ResponseOutputItemAddedEvent as _, type AgentStepDeltaEvent as a, parseSlashTokenInProgress as a$, type ResponseOutputTextDeltaEvent as a0, type ResponseOutputTextDoneEvent as a1, type ResponseUsage as a2, type SSEEvent as a3, type SSEStreamCallbacks as a4, type SSEStreamResult as a5, type SSEStreamStartData as a6, SUPPORTED_EXTENSIONS as a7, type SkillSummary as a8, type SkippedFile as a9, consumeSSEStream as aA, contacts as aB, conversations as aC, countCitations as aD, createAuthenticatedClient as aE, createDocumentWaiter as aF, dm as aG, doctags as aH, documents as aI, files as aJ, filterSkills as aK, formatAgentStepLabel as aL, formatFileSize as aM, formatItemLabel as aN, formatStreamSummary as aO, formatUserName as aP, formatWorkspaceChoices as aQ, formatWsMessage as aR, generateEncryptedWorkspaceKey as aS, generateNewWorkspaceKey as aT, getErrorCode as aU, getErrorMessage as aV, getRawWorkspaceKey as aW, health as aX, notes as aY, parseSSEEvents as aZ, parseSlashCommand as a_, type TaskResponse as aa, type TokenBudgetContext as ab, type UpdateNoteRequest as ac, type UpdateTaskRequest as ad, type UploadBatchResult as ae, type UploadDirectOptions as af, type UploadDirectResult as ag, type UploadOptions as ah, type UploadResult as ai, type UserDailyUsageResponse as aj, type UserInfo as ak, type UserInputRequestEvent as al, type UserMessageEvent as am, WebSocketAuthError as an, type WorkspaceChronologyOut as ao, type WorkspaceContext as ap, type WsConnection as aq, agentconfig as ar, assistant as as, authenticatedFetch as at, buildDocNameMap as au, buildRetrievalChunkTool as av, buildRetrievalFullContextTool as aw, buildRetrievalTocTool as ax, connectWebSocket as ay, connectWithReconnect as az, type AgentStepEvent as b, performPasswordLogin as b0, performSigningKeyLogin as b1, performSsoDeviceFlowLogin as b2, projects as b3, requireData as b4, requireOk as b5, resolveAuth as b6, resolveCitations as b7, resolveWorkspace as b8, responses as b9, selectWorkspace as ba, selectWorkspaceById as bb, settings as bc, streamSSE as bd, stripCitationMarkdown as be, summarizeCitations as bf, tags as bg, tasks as bh, workspaces as bi, Arbi as c, ArbiApiError as d, ArbiError as e, type ArbiErrorEvent as f, type ArbiOptions as g, type ArtifactEvent as h, type AuthContext as i, type AuthHeaders as j, type AuthenticatedClient as k, type CitationSummary as l, type CliConfig as m, type CliCredentials as n, type CommandDescriptor as o, type ConfigStore as p, type ConnectOptions as q, type CreateNoteRequest as r, type CreateTaskRequest as s, type DeferredInterjectionEvent as t, type DmCryptoContext as u, type DocNameMap as v, type DocumentListFields as w, type DocumentListOrder as x, type DocumentWaiter as y, type DocumentWaiterOptions as z };
@@ -448,6 +448,8 @@ interface SSEStreamCallbacks {
448
448
  onArtifact?: (data: ArtifactEvent) => void;
449
449
  onElapsedTime?: (t: number) => void;
450
450
  onUsage?: (usage: ResponseUsage) => void;
451
+ /** Final per-turn token/credit budget snapshot from response.completed. */
452
+ onContextUpdate?: (context: TokenBudgetContext) => void;
451
453
  onComplete?: () => void;
452
454
  }
453
455
  /**
@@ -481,7 +483,8 @@ declare function streamSSE(response: Response, callbacks?: SSEStreamCallbacks):
481
483
  * Format a human-readable summary line from a completed SSE stream result.
482
484
  *
483
485
  * Returns a string like:
484
- * "3 steps (2 tool calls) · 1,234 tokens · 500/8,000 context · 2.5s"
486
+ * "3 steps (2 tool calls) · 1,234 tokens · 500/8,000 context · 12.40/50 credits · 2.5s"
487
+ * (the credits segment is omitted when the workspace has no turn credit budget configured)
485
488
  *
486
489
  * Returns empty string if there's nothing to report.
487
490
  */
@@ -3391,6 +3394,7 @@ declare class Arbi {
3391
3394
  ENABLE_THINKING: boolean;
3392
3395
  AGENT_STRICT_TOOL_CALLS: boolean;
3393
3396
  AGENT_MAX_ITERATIONS: number;
3397
+ AGENT_TURN_CREDIT_BUDGET: number;
3394
3398
  AGENT_MAX_PARALLEL_TOOL_CALLS: number;
3395
3399
  AGENT_HISTORY_CHAR_THRESHOLD: number;
3396
3400
  AGENT_SYSTEM_PROMPT: string;
@@ -3514,7 +3518,6 @@ declare class Arbi {
3514
3518
  SYSTEM_INSTRUCTION: string;
3515
3519
  TEMPERATURE: number;
3516
3520
  MAX_TOKENS: number;
3517
- MAX_ITERATIONS: number;
3518
3521
  };
3519
3522
  ModelCitation: {
3520
3523
  SIM_THREASHOLD: number;
@@ -3619,6 +3622,7 @@ declare class Arbi {
3619
3622
  AGENT_MODEL_NAME: string;
3620
3623
  ENABLE_THINKING: boolean;
3621
3624
  AGENT_MAX_ITERATIONS: number;
3625
+ AGENT_TURN_CREDIT_BUDGET: number;
3622
3626
  };
3623
3627
  DoctagLLM: {
3624
3628
  AUTO_RENAME: boolean;
@@ -3821,6 +3825,7 @@ declare class Arbi {
3821
3825
  ENABLE_THINKING: boolean;
3822
3826
  AGENT_STRICT_TOOL_CALLS: boolean;
3823
3827
  AGENT_MAX_ITERATIONS: number;
3828
+ AGENT_TURN_CREDIT_BUDGET: number;
3824
3829
  AGENT_MAX_PARALLEL_TOOL_CALLS: number;
3825
3830
  AGENT_HISTORY_CHAR_THRESHOLD: number;
3826
3831
  AGENT_SYSTEM_PROMPT: string;
@@ -3944,7 +3949,6 @@ declare class Arbi {
3944
3949
  SYSTEM_INSTRUCTION: string;
3945
3950
  TEMPERATURE: number;
3946
3951
  MAX_TOKENS: number;
3947
- MAX_ITERATIONS: number;
3948
3952
  };
3949
3953
  ModelCitation: {
3950
3954
  SIM_THREASHOLD: number;
@@ -4049,6 +4053,7 @@ declare class Arbi {
4049
4053
  AGENT_MODEL_NAME: string;
4050
4054
  ENABLE_THINKING: boolean;
4051
4055
  AGENT_MAX_ITERATIONS: number;
4056
+ AGENT_TURN_CREDIT_BUDGET: number;
4052
4057
  };
4053
4058
  DoctagLLM: {
4054
4059
  AUTO_RENAME: boolean;
@@ -5163,6 +5168,7 @@ declare function getConfig(arbi: ArbiClient, configId: string): Promise<{
5163
5168
  ENABLE_THINKING: boolean;
5164
5169
  AGENT_STRICT_TOOL_CALLS: boolean;
5165
5170
  AGENT_MAX_ITERATIONS: number;
5171
+ AGENT_TURN_CREDIT_BUDGET: number;
5166
5172
  AGENT_MAX_PARALLEL_TOOL_CALLS: number;
5167
5173
  AGENT_HISTORY_CHAR_THRESHOLD: number;
5168
5174
  AGENT_SYSTEM_PROMPT: string;
@@ -5286,7 +5292,6 @@ declare function getConfig(arbi: ArbiClient, configId: string): Promise<{
5286
5292
  SYSTEM_INSTRUCTION: string;
5287
5293
  TEMPERATURE: number;
5288
5294
  MAX_TOKENS: number;
5289
- MAX_ITERATIONS: number;
5290
5295
  };
5291
5296
  ModelCitation: {
5292
5297
  SIM_THREASHOLD: number;
@@ -5391,6 +5396,7 @@ declare function getConfig(arbi: ArbiClient, configId: string): Promise<{
5391
5396
  AGENT_MODEL_NAME: string;
5392
5397
  ENABLE_THINKING: boolean;
5393
5398
  AGENT_MAX_ITERATIONS: number;
5399
+ AGENT_TURN_CREDIT_BUDGET: number;
5394
5400
  };
5395
5401
  DoctagLLM: {
5396
5402
  AUTO_RENAME: boolean;
@@ -5749,4 +5755,4 @@ declare namespace projects {
5749
5755
  export { type projects_ProjectInvoicesResponse as ProjectInvoicesResponse, type projects_ProjectUpdateRequest as ProjectUpdateRequest, type projects_ProjectUsageResponse as ProjectUsageResponse, type projects_UserDailyUsageResponse as UserDailyUsageResponse, projects_createProject as createProject, projects_deleteProject as deleteProject, projects_getProjectInvoices as getProjectInvoices, projects_getProjectUsage as getProjectUsage, projects_getUserUsageToday as getUserUsageToday, projects_listProjects as listProjects, projects_refreshProject as refreshProject, projects_renameProject as renameProject, projects_updateProject as updateProject };
5750
5756
  }
5751
5757
 
5752
- export { type ResponseOutputItemDoneEvent as $, type AgentControlStateEvent as A, type ListPaginatedOptions as B, type ChatSession as C, DOC_TERMINAL_STATUSES as D, type MessageMetadataPayload$1 as E, type FormattedWsMessage as F, type MessageQueuedEvent as G, type NoteSearchRequest as H, type NoteSearchResponse as I, type ProbeAnswerEvent as J, type ProjectInvoicesResponse as K, type ListAllOptions as L, type MessageLevel as M, type NoteResponse as N, type OutputTokensDetails as O, type ParsedSlashCommand as P, type ProjectUsageResponse as Q, type QueryOptions as R, type ReconnectOptions as S, type ReconnectableWsConnection as T, type ResolvedCitation as U, type ResolvedRecipient as V, type ResponseCompletedEvent as W, type ResponseContentPartAddedEvent as X, type ResponseCreatedEvent as Y, type ResponseFailedEvent as Z, type ResponseOutputItemAddedEvent as _, type AgentStepDeltaEvent as a, performPasswordLogin as a$, type ResponseOutputTextDeltaEvent as a0, type ResponseOutputTextDoneEvent as a1, type ResponseUsage as a2, type SSEEvent as a3, type SSEStreamCallbacks as a4, type SSEStreamResult as a5, type SSEStreamStartData as a6, SUPPORTED_EXTENSIONS as a7, type SkillSummary as a8, type SkippedFile as a9, contacts as aA, conversations as aB, countCitations as aC, createAuthenticatedClient as aD, createDocumentWaiter as aE, dm as aF, doctags as aG, documents as aH, files as aI, filterSkills as aJ, formatAgentStepLabel as aK, formatFileSize as aL, formatItemLabel as aM, formatStreamSummary as aN, formatUserName as aO, formatWorkspaceChoices as aP, formatWsMessage as aQ, generateEncryptedWorkspaceKey as aR, generateNewWorkspaceKey as aS, getErrorCode as aT, getErrorMessage as aU, getRawWorkspaceKey as aV, health as aW, notes as aX, parseSSEEvents as aY, parseSlashCommand as aZ, parseSlashTokenInProgress as a_, type TaskResponse as aa, type UpdateNoteRequest as ab, type UpdateTaskRequest as ac, type UploadBatchResult as ad, type UploadDirectOptions as ae, type UploadDirectResult as af, type UploadOptions as ag, type UploadResult as ah, type UserDailyUsageResponse as ai, type UserInfo as aj, type UserInputRequestEvent as ak, type UserMessageEvent as al, WebSocketAuthError as am, type WorkspaceChronologyOut as an, type WorkspaceContext as ao, type WsConnection as ap, agentconfig as aq, assistant as ar, authenticatedFetch as as, buildDocNameMap as at, buildRetrievalChunkTool as au, buildRetrievalFullContextTool as av, buildRetrievalTocTool as aw, connectWebSocket as ax, connectWithReconnect as ay, consumeSSEStream as az, type AgentStepEvent as b, performSigningKeyLogin as b0, performSsoDeviceFlowLogin as b1, projects as b2, requireData as b3, requireOk as b4, resolveAuth as b5, resolveCitations as b6, resolveWorkspace as b7, responses as b8, selectWorkspace as b9, selectWorkspaceById as ba, settings as bb, streamSSE as bc, stripCitationMarkdown as bd, summarizeCitations as be, tags as bf, tasks as bg, workspaces as bh, Arbi as c, ArbiApiError as d, ArbiError as e, type ArbiErrorEvent as f, type ArbiOptions as g, type ArtifactEvent as h, type AuthContext as i, type AuthHeaders as j, type AuthenticatedClient as k, type CitationSummary as l, type CliConfig as m, type CliCredentials as n, type CommandDescriptor as o, type ConfigStore as p, type ConnectOptions as q, type CreateNoteRequest as r, type CreateTaskRequest as s, type DeferredInterjectionEvent as t, type DmCryptoContext as u, type DocNameMap as v, type DocumentListFields as w, type DocumentListOrder as x, type DocumentWaiter as y, type DocumentWaiterOptions as z };
5758
+ export { type ResponseOutputItemDoneEvent as $, type AgentControlStateEvent as A, type ListPaginatedOptions as B, type ChatSession as C, DOC_TERMINAL_STATUSES as D, type MessageMetadataPayload$1 as E, type FormattedWsMessage as F, type MessageQueuedEvent as G, type NoteSearchRequest as H, type NoteSearchResponse as I, type ProbeAnswerEvent as J, type ProjectInvoicesResponse as K, type ListAllOptions as L, type MessageLevel as M, type NoteResponse as N, type OutputTokensDetails as O, type ParsedSlashCommand as P, type ProjectUsageResponse as Q, type QueryOptions as R, type ReconnectOptions as S, type ReconnectableWsConnection as T, type ResolvedCitation as U, type ResolvedRecipient as V, type ResponseCompletedEvent as W, type ResponseContentPartAddedEvent as X, type ResponseCreatedEvent as Y, type ResponseFailedEvent as Z, type ResponseOutputItemAddedEvent as _, type AgentStepDeltaEvent as a, parseSlashTokenInProgress as a$, type ResponseOutputTextDeltaEvent as a0, type ResponseOutputTextDoneEvent as a1, type ResponseUsage as a2, type SSEEvent as a3, type SSEStreamCallbacks as a4, type SSEStreamResult as a5, type SSEStreamStartData as a6, SUPPORTED_EXTENSIONS as a7, type SkillSummary as a8, type SkippedFile as a9, consumeSSEStream as aA, contacts as aB, conversations as aC, countCitations as aD, createAuthenticatedClient as aE, createDocumentWaiter as aF, dm as aG, doctags as aH, documents as aI, files as aJ, filterSkills as aK, formatAgentStepLabel as aL, formatFileSize as aM, formatItemLabel as aN, formatStreamSummary as aO, formatUserName as aP, formatWorkspaceChoices as aQ, formatWsMessage as aR, generateEncryptedWorkspaceKey as aS, generateNewWorkspaceKey as aT, getErrorCode as aU, getErrorMessage as aV, getRawWorkspaceKey as aW, health as aX, notes as aY, parseSSEEvents as aZ, parseSlashCommand as a_, type TaskResponse as aa, type TokenBudgetContext as ab, type UpdateNoteRequest as ac, type UpdateTaskRequest as ad, type UploadBatchResult as ae, type UploadDirectOptions as af, type UploadDirectResult as ag, type UploadOptions as ah, type UploadResult as ai, type UserDailyUsageResponse as aj, type UserInfo as ak, type UserInputRequestEvent as al, type UserMessageEvent as am, WebSocketAuthError as an, type WorkspaceChronologyOut as ao, type WorkspaceContext as ap, type WsConnection as aq, agentconfig as ar, assistant as as, authenticatedFetch as at, buildDocNameMap as au, buildRetrievalChunkTool as av, buildRetrievalFullContextTool as aw, buildRetrievalTocTool as ax, connectWebSocket as ay, connectWithReconnect as az, type AgentStepEvent as b, performPasswordLogin as b0, performSigningKeyLogin as b1, performSsoDeviceFlowLogin as b2, projects as b3, requireData as b4, requireOk as b5, resolveAuth as b6, resolveCitations as b7, resolveWorkspace as b8, responses as b9, selectWorkspace as ba, selectWorkspaceById as bb, settings as bc, streamSSE as bd, stripCitationMarkdown as be, summarizeCitations as bf, tags as bg, tasks as bh, workspaces as bi, Arbi as c, ArbiApiError as d, ArbiError as e, type ArbiErrorEvent as f, type ArbiOptions as g, type ArtifactEvent as h, type AuthContext as i, type AuthHeaders as j, type AuthenticatedClient as k, type CitationSummary as l, type CliConfig as m, type CliCredentials as n, type CommandDescriptor as o, type ConfigStore as p, type ConnectOptions as q, type CreateNoteRequest as r, type CreateTaskRequest as s, type DeferredInterjectionEvent as t, type DmCryptoContext as u, type DocNameMap as v, type DocumentListFields as w, type DocumentListOrder as x, type DocumentWaiter as y, type DocumentWaiterOptions as z };
package/dist/browser.cjs CHANGED
@@ -3953,6 +3953,7 @@ async function streamSSE(response, callbacks = {}) {
3953
3953
  }
3954
3954
  if (data.context) {
3955
3955
  context = data.context;
3956
+ callbacks.onContextUpdate?.(data.context);
3956
3957
  }
3957
3958
  if (data.t != null) callbacks.onElapsedTime?.(data.t);
3958
3959
  callbacks.onComplete?.();