@arbidocs/client 0.3.13 → 0.3.15

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/index.d.cts CHANGED
@@ -1360,10 +1360,8 @@ interface paths {
1360
1360
  * Get Response
1361
1361
  * @description Retrieve a response by ID.
1362
1362
  *
1363
- * Returns the current state with progressive event accumulation:
1364
- * - ``in_progress`` with accumulated events if the task is still active
1365
- * - ``completed`` with output and persisted events if in the database
1366
- * - 404 if not found
1363
+ * Reads status directly from the messages table. For in-progress responses,
1364
+ * also checks in-memory event accumulation for progressive polling.
1367
1365
  */
1368
1366
  get: operations['get_response'];
1369
1367
  put?: never;
@@ -1478,6 +1476,8 @@ interface components {
1478
1476
  detail?: {
1479
1477
  [key: string]: unknown;
1480
1478
  }[] | null;
1479
+ /** @description Token usage for the LLM call in this step. */
1480
+ usage?: components['schemas']['StepUsage'] | null;
1481
1481
  /** @description Token budget context snapshot. Present when retrieval counts change. */
1482
1482
  context?: components['schemas']['TokenBudgetContext'] | null;
1483
1483
  };
@@ -1923,6 +1923,42 @@ interface components {
1923
1923
  */
1924
1924
  KeywordEmbedder: components['schemas']['KeywordEmbedderConfig'];
1925
1925
  };
1926
+ /**
1927
+ * AllLlmCallsAggregate
1928
+ * @description Aggregate token usage across all LLM calls within a single request.
1929
+ */
1930
+ AllLlmCallsAggregate: {
1931
+ /**
1932
+ * Count
1933
+ * @description Number of LLM calls made
1934
+ */
1935
+ count: number;
1936
+ /**
1937
+ * Input Tokens
1938
+ * @description Sum of prompt tokens across all calls
1939
+ */
1940
+ input_tokens: number;
1941
+ /**
1942
+ * Output Tokens
1943
+ * @description Sum of completion tokens across all calls
1944
+ */
1945
+ output_tokens: number;
1946
+ /**
1947
+ * Reasoning Tokens
1948
+ * @description Sum of reasoning tokens across all calls
1949
+ */
1950
+ reasoning_tokens: number;
1951
+ /**
1952
+ * Total Tokens
1953
+ * @description Sum of all tokens across all calls
1954
+ */
1955
+ total_tokens: number;
1956
+ /**
1957
+ * Last Input Tokens
1958
+ * @description Input tokens from the most recent LLM call (= current thread size)
1959
+ */
1960
+ last_input_tokens: number;
1961
+ };
1926
1962
  /**
1927
1963
  * ArtifactEvent
1928
1964
  * @description A generated artifact (document/draft) for the artifact panel.
@@ -3454,6 +3490,11 @@ interface components {
3454
3490
  * @default 0
3455
3491
  */
3456
3492
  tokens: number;
3493
+ /**
3494
+ * Status
3495
+ * @default completed
3496
+ */
3497
+ status: string;
3457
3498
  /** External Id */
3458
3499
  external_id: string;
3459
3500
  /**
@@ -3515,6 +3556,11 @@ interface components {
3515
3556
  * @default 0
3516
3557
  */
3517
3558
  tokens: number;
3559
+ /**
3560
+ * Status
3561
+ * @default completed
3562
+ */
3563
+ status: string;
3518
3564
  /** External Id */
3519
3565
  external_id: string;
3520
3566
  /**
@@ -5056,6 +5102,33 @@ interface components {
5056
5102
  */
5057
5103
  detail: string;
5058
5104
  };
5105
+ /**
5106
+ * StepUsage
5107
+ * @description Per-step token usage from a single LLM call.
5108
+ */
5109
+ StepUsage: {
5110
+ /**
5111
+ * Input Tokens
5112
+ * @description Prompt tokens for this step
5113
+ */
5114
+ input_tokens: number;
5115
+ /**
5116
+ * Output Tokens
5117
+ * @description Completion tokens for this step
5118
+ */
5119
+ output_tokens: number;
5120
+ /**
5121
+ * Reasoning Tokens
5122
+ * @description Reasoning tokens for this step
5123
+ * @default 0
5124
+ */
5125
+ reasoning_tokens: number;
5126
+ /**
5127
+ * Model
5128
+ * @description LLM model used for this step
5129
+ */
5130
+ model?: string | null;
5131
+ };
5059
5132
  /** StreamEventsTool */
5060
5133
  StreamEventsTool: {
5061
5134
  /**
@@ -5460,6 +5533,8 @@ interface components {
5460
5533
  * @description Model used for the LLM call
5461
5534
  */
5462
5535
  model_name?: string | null;
5536
+ /** @description Aggregate usage across all LLM calls in the request */
5537
+ all_llm_calls?: components['schemas']['AllLlmCallsAggregate'] | null;
5463
5538
  };
5464
5539
  /**
5465
5540
  * ToolProgressDetail
@@ -5666,6 +5741,11 @@ interface components {
5666
5741
  * @default 0
5667
5742
  */
5668
5743
  tokens: number;
5744
+ /**
5745
+ * Status
5746
+ * @default completed
5747
+ */
5748
+ status: string;
5669
5749
  /** External Id */
5670
5750
  external_id: string;
5671
5751
  /**
@@ -9043,8 +9123,9 @@ type WsConnectionClosedMessage = components['schemas']['ConnectionClosedMessage'
9043
9123
  type WsErrorMessage = components['schemas']['ErrorMessage'];
9044
9124
  type WsPresenceUpdateMessage = components['schemas']['PresenceUpdateMessage'];
9045
9125
  type WsNotificationResponse = components['schemas']['NotificationResponse'];
9126
+ type WsResponseCompleteMessage = components['schemas']['ResponseCompleteMessage'];
9046
9127
  /** Union of all server → client message types (discriminated on `type` field). */
9047
- type WebSocketServerMessage = WsTaskUpdateMessage | WsAuthResultMessage | WsConnectionClosedMessage | WsPresenceUpdateMessage | WsErrorMessage | WsNotificationResponse | WsBatchCompleteMessage;
9128
+ type WebSocketServerMessage = WsTaskUpdateMessage | WsAuthResultMessage | WsConnectionClosedMessage | WsPresenceUpdateMessage | WsErrorMessage | WsNotificationResponse | WsBatchCompleteMessage | WsResponseCompleteMessage;
9048
9129
  /** Union of all client → server message types. */
9049
9130
  type WebSocketClientMessage = WsAuthMessage;
9050
9131
  /**
@@ -9097,4 +9178,4 @@ declare function isMessageType<T extends WebSocketServerMessage>(msg: WebSocketS
9097
9178
  */
9098
9179
  declare function createReloginHandler(deps: ReloginDeps): () => Promise<string | null>;
9099
9180
 
9100
- export { type $defs, API_PREFIX, type ArbiClient, type ArbiClientOptions, type AuthStateProvider, type AutoReloginMiddlewareConfig, type BearerAuthMiddlewareConfig, type ChangePasswordParams, type ChangePasswordRequest, type ChangePasswordResult, type CryptoProvider, type KeyPair, type LoginCredentials, type LoginParams, type LoginProvider, type LoginRequest, type LoginResult, type LoginWithKeyParams, type OnReloginSuccess, type PasswordChangeCredentials, type RegisterParams, type RegisterRequest, type RegisterResult, type RegistrationCredentials, type ReloginDeps, type ReloginHandler, type SessionData, type SessionKeys, type SessionManager, type SessionState, type SessionStorageProvider, type SsoTokenProvider, type TokenProvider, type UserKeypairs, type WebSocketClientMessage, type WebSocketServerMessage, type WorkspaceKeyMiddlewareConfig, type WorkspaceKeyProvider, type WorkspaceKeyRefreshProvider, type WorkspaceKeyUrlConfig, type WorkspaceOpenProvider, type WsAuthMessage, type WsAuthResultMessage, type WsBatchCompleteMessage, type WsConnectionClosedMessage, type WsErrorMessage, type WsNotificationResponse, type WsPresenceUpdateMessage, type WsTaskUpdateMessage, base64Decode, base64Encode, base64ToBytes, buildWebSocketUrl, bytesToBase64, clearAllData, clearSession, type components, computeSharedSecret, createArbiClient, createAuthMessage, createAutoReloginMiddleware, createBearerAuthMiddleware, createReloginHandler, createSessionManager, createWorkspaceKeyHeader, createWorkspaceKeyMiddleware, decryptMessage, decryptMessageWithSharedSecret, deriveEncryptionKeypairFromSigning, derivePublicKey, encryptMessage, encryptMessageWithSharedSecret, generateKeyPairs, generateLoginCredentials, generateLoginCredentialsFromKey, generatePasswordChangeCredentials, generateRecoveryPasswordChangeCredentials, generateRegistrationCredentials, generateUserKeypairs, getSession, hasSession, initSodium, initializeDatabase, isMessageType, needsWorkspaceKey, type operations, parseServerMessage, type paths, saveSession, sealedBoxDecrypt, sealedBoxEncrypt, signMessage, updateSigningPrivateKey, type webhooks };
9181
+ export { type $defs, API_PREFIX, type ArbiClient, type ArbiClientOptions, type AuthStateProvider, type AutoReloginMiddlewareConfig, type BearerAuthMiddlewareConfig, type ChangePasswordParams, type ChangePasswordRequest, type ChangePasswordResult, type CryptoProvider, type KeyPair, type LoginCredentials, type LoginParams, type LoginProvider, type LoginRequest, type LoginResult, type LoginWithKeyParams, type OnReloginSuccess, type PasswordChangeCredentials, type RegisterParams, type RegisterRequest, type RegisterResult, type RegistrationCredentials, type ReloginDeps, type ReloginHandler, type SessionData, type SessionKeys, type SessionManager, type SessionState, type SessionStorageProvider, type SsoTokenProvider, type TokenProvider, type UserKeypairs, type WebSocketClientMessage, type WebSocketServerMessage, type WorkspaceKeyMiddlewareConfig, type WorkspaceKeyProvider, type WorkspaceKeyRefreshProvider, type WorkspaceKeyUrlConfig, type WorkspaceOpenProvider, type WsAuthMessage, type WsAuthResultMessage, type WsBatchCompleteMessage, type WsConnectionClosedMessage, type WsErrorMessage, type WsNotificationResponse, type WsPresenceUpdateMessage, type WsResponseCompleteMessage, type WsTaskUpdateMessage, base64Decode, base64Encode, base64ToBytes, buildWebSocketUrl, bytesToBase64, clearAllData, clearSession, type components, computeSharedSecret, createArbiClient, createAuthMessage, createAutoReloginMiddleware, createBearerAuthMiddleware, createReloginHandler, createSessionManager, createWorkspaceKeyHeader, createWorkspaceKeyMiddleware, decryptMessage, decryptMessageWithSharedSecret, deriveEncryptionKeypairFromSigning, derivePublicKey, encryptMessage, encryptMessageWithSharedSecret, generateKeyPairs, generateLoginCredentials, generateLoginCredentialsFromKey, generatePasswordChangeCredentials, generateRecoveryPasswordChangeCredentials, generateRegistrationCredentials, generateUserKeypairs, getSession, hasSession, initSodium, initializeDatabase, isMessageType, needsWorkspaceKey, type operations, parseServerMessage, type paths, saveSession, sealedBoxDecrypt, sealedBoxEncrypt, signMessage, updateSigningPrivateKey, type webhooks };
package/dist/index.d.ts CHANGED
@@ -1360,10 +1360,8 @@ interface paths {
1360
1360
  * Get Response
1361
1361
  * @description Retrieve a response by ID.
1362
1362
  *
1363
- * Returns the current state with progressive event accumulation:
1364
- * - ``in_progress`` with accumulated events if the task is still active
1365
- * - ``completed`` with output and persisted events if in the database
1366
- * - 404 if not found
1363
+ * Reads status directly from the messages table. For in-progress responses,
1364
+ * also checks in-memory event accumulation for progressive polling.
1367
1365
  */
1368
1366
  get: operations['get_response'];
1369
1367
  put?: never;
@@ -1478,6 +1476,8 @@ interface components {
1478
1476
  detail?: {
1479
1477
  [key: string]: unknown;
1480
1478
  }[] | null;
1479
+ /** @description Token usage for the LLM call in this step. */
1480
+ usage?: components['schemas']['StepUsage'] | null;
1481
1481
  /** @description Token budget context snapshot. Present when retrieval counts change. */
1482
1482
  context?: components['schemas']['TokenBudgetContext'] | null;
1483
1483
  };
@@ -1923,6 +1923,42 @@ interface components {
1923
1923
  */
1924
1924
  KeywordEmbedder: components['schemas']['KeywordEmbedderConfig'];
1925
1925
  };
1926
+ /**
1927
+ * AllLlmCallsAggregate
1928
+ * @description Aggregate token usage across all LLM calls within a single request.
1929
+ */
1930
+ AllLlmCallsAggregate: {
1931
+ /**
1932
+ * Count
1933
+ * @description Number of LLM calls made
1934
+ */
1935
+ count: number;
1936
+ /**
1937
+ * Input Tokens
1938
+ * @description Sum of prompt tokens across all calls
1939
+ */
1940
+ input_tokens: number;
1941
+ /**
1942
+ * Output Tokens
1943
+ * @description Sum of completion tokens across all calls
1944
+ */
1945
+ output_tokens: number;
1946
+ /**
1947
+ * Reasoning Tokens
1948
+ * @description Sum of reasoning tokens across all calls
1949
+ */
1950
+ reasoning_tokens: number;
1951
+ /**
1952
+ * Total Tokens
1953
+ * @description Sum of all tokens across all calls
1954
+ */
1955
+ total_tokens: number;
1956
+ /**
1957
+ * Last Input Tokens
1958
+ * @description Input tokens from the most recent LLM call (= current thread size)
1959
+ */
1960
+ last_input_tokens: number;
1961
+ };
1926
1962
  /**
1927
1963
  * ArtifactEvent
1928
1964
  * @description A generated artifact (document/draft) for the artifact panel.
@@ -3454,6 +3490,11 @@ interface components {
3454
3490
  * @default 0
3455
3491
  */
3456
3492
  tokens: number;
3493
+ /**
3494
+ * Status
3495
+ * @default completed
3496
+ */
3497
+ status: string;
3457
3498
  /** External Id */
3458
3499
  external_id: string;
3459
3500
  /**
@@ -3515,6 +3556,11 @@ interface components {
3515
3556
  * @default 0
3516
3557
  */
3517
3558
  tokens: number;
3559
+ /**
3560
+ * Status
3561
+ * @default completed
3562
+ */
3563
+ status: string;
3518
3564
  /** External Id */
3519
3565
  external_id: string;
3520
3566
  /**
@@ -5056,6 +5102,33 @@ interface components {
5056
5102
  */
5057
5103
  detail: string;
5058
5104
  };
5105
+ /**
5106
+ * StepUsage
5107
+ * @description Per-step token usage from a single LLM call.
5108
+ */
5109
+ StepUsage: {
5110
+ /**
5111
+ * Input Tokens
5112
+ * @description Prompt tokens for this step
5113
+ */
5114
+ input_tokens: number;
5115
+ /**
5116
+ * Output Tokens
5117
+ * @description Completion tokens for this step
5118
+ */
5119
+ output_tokens: number;
5120
+ /**
5121
+ * Reasoning Tokens
5122
+ * @description Reasoning tokens for this step
5123
+ * @default 0
5124
+ */
5125
+ reasoning_tokens: number;
5126
+ /**
5127
+ * Model
5128
+ * @description LLM model used for this step
5129
+ */
5130
+ model?: string | null;
5131
+ };
5059
5132
  /** StreamEventsTool */
5060
5133
  StreamEventsTool: {
5061
5134
  /**
@@ -5460,6 +5533,8 @@ interface components {
5460
5533
  * @description Model used for the LLM call
5461
5534
  */
5462
5535
  model_name?: string | null;
5536
+ /** @description Aggregate usage across all LLM calls in the request */
5537
+ all_llm_calls?: components['schemas']['AllLlmCallsAggregate'] | null;
5463
5538
  };
5464
5539
  /**
5465
5540
  * ToolProgressDetail
@@ -5666,6 +5741,11 @@ interface components {
5666
5741
  * @default 0
5667
5742
  */
5668
5743
  tokens: number;
5744
+ /**
5745
+ * Status
5746
+ * @default completed
5747
+ */
5748
+ status: string;
5669
5749
  /** External Id */
5670
5750
  external_id: string;
5671
5751
  /**
@@ -9043,8 +9123,9 @@ type WsConnectionClosedMessage = components['schemas']['ConnectionClosedMessage'
9043
9123
  type WsErrorMessage = components['schemas']['ErrorMessage'];
9044
9124
  type WsPresenceUpdateMessage = components['schemas']['PresenceUpdateMessage'];
9045
9125
  type WsNotificationResponse = components['schemas']['NotificationResponse'];
9126
+ type WsResponseCompleteMessage = components['schemas']['ResponseCompleteMessage'];
9046
9127
  /** Union of all server → client message types (discriminated on `type` field). */
9047
- type WebSocketServerMessage = WsTaskUpdateMessage | WsAuthResultMessage | WsConnectionClosedMessage | WsPresenceUpdateMessage | WsErrorMessage | WsNotificationResponse | WsBatchCompleteMessage;
9128
+ type WebSocketServerMessage = WsTaskUpdateMessage | WsAuthResultMessage | WsConnectionClosedMessage | WsPresenceUpdateMessage | WsErrorMessage | WsNotificationResponse | WsBatchCompleteMessage | WsResponseCompleteMessage;
9048
9129
  /** Union of all client → server message types. */
9049
9130
  type WebSocketClientMessage = WsAuthMessage;
9050
9131
  /**
@@ -9097,4 +9178,4 @@ declare function isMessageType<T extends WebSocketServerMessage>(msg: WebSocketS
9097
9178
  */
9098
9179
  declare function createReloginHandler(deps: ReloginDeps): () => Promise<string | null>;
9099
9180
 
9100
- export { type $defs, API_PREFIX, type ArbiClient, type ArbiClientOptions, type AuthStateProvider, type AutoReloginMiddlewareConfig, type BearerAuthMiddlewareConfig, type ChangePasswordParams, type ChangePasswordRequest, type ChangePasswordResult, type CryptoProvider, type KeyPair, type LoginCredentials, type LoginParams, type LoginProvider, type LoginRequest, type LoginResult, type LoginWithKeyParams, type OnReloginSuccess, type PasswordChangeCredentials, type RegisterParams, type RegisterRequest, type RegisterResult, type RegistrationCredentials, type ReloginDeps, type ReloginHandler, type SessionData, type SessionKeys, type SessionManager, type SessionState, type SessionStorageProvider, type SsoTokenProvider, type TokenProvider, type UserKeypairs, type WebSocketClientMessage, type WebSocketServerMessage, type WorkspaceKeyMiddlewareConfig, type WorkspaceKeyProvider, type WorkspaceKeyRefreshProvider, type WorkspaceKeyUrlConfig, type WorkspaceOpenProvider, type WsAuthMessage, type WsAuthResultMessage, type WsBatchCompleteMessage, type WsConnectionClosedMessage, type WsErrorMessage, type WsNotificationResponse, type WsPresenceUpdateMessage, type WsTaskUpdateMessage, base64Decode, base64Encode, base64ToBytes, buildWebSocketUrl, bytesToBase64, clearAllData, clearSession, type components, computeSharedSecret, createArbiClient, createAuthMessage, createAutoReloginMiddleware, createBearerAuthMiddleware, createReloginHandler, createSessionManager, createWorkspaceKeyHeader, createWorkspaceKeyMiddleware, decryptMessage, decryptMessageWithSharedSecret, deriveEncryptionKeypairFromSigning, derivePublicKey, encryptMessage, encryptMessageWithSharedSecret, generateKeyPairs, generateLoginCredentials, generateLoginCredentialsFromKey, generatePasswordChangeCredentials, generateRecoveryPasswordChangeCredentials, generateRegistrationCredentials, generateUserKeypairs, getSession, hasSession, initSodium, initializeDatabase, isMessageType, needsWorkspaceKey, type operations, parseServerMessage, type paths, saveSession, sealedBoxDecrypt, sealedBoxEncrypt, signMessage, updateSigningPrivateKey, type webhooks };
9181
+ export { type $defs, API_PREFIX, type ArbiClient, type ArbiClientOptions, type AuthStateProvider, type AutoReloginMiddlewareConfig, type BearerAuthMiddlewareConfig, type ChangePasswordParams, type ChangePasswordRequest, type ChangePasswordResult, type CryptoProvider, type KeyPair, type LoginCredentials, type LoginParams, type LoginProvider, type LoginRequest, type LoginResult, type LoginWithKeyParams, type OnReloginSuccess, type PasswordChangeCredentials, type RegisterParams, type RegisterRequest, type RegisterResult, type RegistrationCredentials, type ReloginDeps, type ReloginHandler, type SessionData, type SessionKeys, type SessionManager, type SessionState, type SessionStorageProvider, type SsoTokenProvider, type TokenProvider, type UserKeypairs, type WebSocketClientMessage, type WebSocketServerMessage, type WorkspaceKeyMiddlewareConfig, type WorkspaceKeyProvider, type WorkspaceKeyRefreshProvider, type WorkspaceKeyUrlConfig, type WorkspaceOpenProvider, type WsAuthMessage, type WsAuthResultMessage, type WsBatchCompleteMessage, type WsConnectionClosedMessage, type WsErrorMessage, type WsNotificationResponse, type WsPresenceUpdateMessage, type WsResponseCompleteMessage, type WsTaskUpdateMessage, base64Decode, base64Encode, base64ToBytes, buildWebSocketUrl, bytesToBase64, clearAllData, clearSession, type components, computeSharedSecret, createArbiClient, createAuthMessage, createAutoReloginMiddleware, createBearerAuthMiddleware, createReloginHandler, createSessionManager, createWorkspaceKeyHeader, createWorkspaceKeyMiddleware, decryptMessage, decryptMessageWithSharedSecret, deriveEncryptionKeypairFromSigning, derivePublicKey, encryptMessage, encryptMessageWithSharedSecret, generateKeyPairs, generateLoginCredentials, generateLoginCredentialsFromKey, generatePasswordChangeCredentials, generateRecoveryPasswordChangeCredentials, generateRegistrationCredentials, generateUserKeypairs, getSession, hasSession, initSodium, initializeDatabase, isMessageType, needsWorkspaceKey, type operations, parseServerMessage, type paths, saveSession, sealedBoxDecrypt, sealedBoxEncrypt, signMessage, updateSigningPrivateKey, type webhooks };