@anuma/sdk 10.8.0 → 10.10.0

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.ts CHANGED
@@ -8507,6 +8507,164 @@ interface ConnectorGuidance {
8507
8507
  */
8508
8508
  declare function buildConnectorGuidance(input: ConnectorGuidanceInput): ConnectorGuidance;
8509
8509
 
8510
+ type ChatRole = "user" | "assistant" | "system";
8511
+ /**
8512
+ * Feedback type for message like/dislike.
8513
+ * - 'like': User liked the response (thumbs up)
8514
+ * - 'dislike': User disliked the response (thumbs down)
8515
+ * - null/undefined: No feedback given
8516
+ */
8517
+ type MessageFeedback = "like" | "dislike" | null;
8518
+ /**
8519
+ * Provenance for a row that needs handling the content cannot justify. Set at
8520
+ * write time by whoever produced or repaired the row; a union so further kinds
8521
+ * can be added without another column.
8522
+ *
8523
+ * Read it as an enum, never as a boolean. The values do NOT share a meaning:
8524
+ * `tool_result` marks a synthetic row that is both unindexed and hidden, while
8525
+ * `chunks_discarded` marks an ordinary typed message that is unindexed and still
8526
+ * rendered. Any predicate that collapses this to "has an origin" hides real
8527
+ * messages (see `isToolResultsRow`).
8528
+ *
8529
+ * - `tool_result`: the hidden `[Tool Execution Results]` row built from a
8530
+ * turn's auto-executed tool results. Skipped by the embedding sweep (see
8531
+ * `memoryEngine/embeddings`) AND hidden from the transcript.
8532
+ * - `message`: an ordinary message with an index after explicit repair.
8533
+ * - `chunks_discarded`: an ordinary, still-rendered message whose chunk vectors
8534
+ * were built over `enc:v3:` ciphertext (sdk#864) and have been discarded
8535
+ * rather than re-embedded at the user's own expense (client#5618). Skipped by
8536
+ * the embedding sweep so nothing re-embeds it, but NOT hidden — only
8537
+ * `tool_result` hides a row, and `isToolResultsRow` is what draws that line.
8538
+ * - undefined/null: a normal message, or any row written before v44.
8539
+ *
8540
+ * Stored in the plaintext `origin` column — never encrypted. The deferred
8541
+ * embedding sweep that has to honour it runs without wallet context, so an
8542
+ * encrypted flag would be unreadable exactly where it matters and the skip
8543
+ * would fail open.
8544
+ */
8545
+ type MessageOrigin = "tool_result" | "chunks_discarded" | "message";
8546
+ /** Why an Anuma 1:1 turn exists: a daily intro or a reply to the user. */
8547
+ type AnumaTurnOrigin = "intro" | "reply";
8548
+ /** One Anuma 1:1 turn: 1-3 ordered bubbles sealed inside the message payload. */
8549
+ interface AnumaTurn {
8550
+ turnId: string;
8551
+ bubbles?: string[];
8552
+ origin?: AnumaTurnOrigin;
8553
+ }
8554
+ /**
8555
+ * Metadata for files attached to messages.
8556
+ *
8557
+ * Note the distinction between `url` and `sourceUrl`:
8558
+ * - `url`: Content URL that gets sent to the AI as part of the message (e.g., data URIs for user uploads)
8559
+ * - `sourceUrl`: Original external URL for locally-cached files (for lookup only, never sent to AI)
8560
+ */
8561
+ interface FileMetadata {
8562
+ /** Unique identifier for the file (used as OPFS key for cached files) */
8563
+ id: string;
8564
+ /** Display name of the file */
8565
+ name: string;
8566
+ /** MIME type (e.g., "image/png") */
8567
+ type: string;
8568
+ /** File size in bytes */
8569
+ size: number;
8570
+ /**
8571
+ * Content URL to include when sending this message to the AI.
8572
+ * When present, this URL is added as an `image_url` content part.
8573
+ * Typically used for user-uploaded files (data URIs) that should be sent with the message.
8574
+ *
8575
+ * NOT used for MCP-cached files - those use `sourceUrl` for lookup and render from OPFS.
8576
+ */
8577
+ url?: string;
8578
+ /**
8579
+ * Original external URL for files downloaded and cached locally (e.g., from MCP R2).
8580
+ * Used purely for URL→OPFS mapping to enable fallback when the source returns 404.
8581
+ *
8582
+ * This is metadata for local lookup only - it is NOT sent to the AI or rendered directly.
8583
+ * The file content is served from OPFS using the `id` field.
8584
+ */
8585
+ sourceUrl?: string;
8586
+ }
8587
+ /** Points a message's local file (`FileMetadata.id` or a `fileIds` media id) at its encrypted copy in vault, so any device can fetch it. */
8588
+ interface VaultAttachmentRef {
8589
+ attachmentId: string;
8590
+ fileId: string;
8591
+ name: string;
8592
+ type: string;
8593
+ size: number;
8594
+ }
8595
+ interface ChatCompletionUsage {
8596
+ promptTokens?: number;
8597
+ completionTokens?: number;
8598
+ totalTokens?: number;
8599
+ costMicroUsd?: number;
8600
+ creditsUsed?: number;
8601
+ /** Per-step out-of-credits marker (ai-portal #1146): true when the run ended
8602
+ * via the mid-loop wrap-up. Passed through like creditsUsed (not summed) so
8603
+ * it reaches message.usage for the out-of-credits UX. */
8604
+ creditsExhausted?: boolean;
8605
+ }
8606
+ interface SearchSource {
8607
+ title?: string;
8608
+ url?: string;
8609
+ snippet?: string;
8610
+ date?: string;
8611
+ }
8612
+ interface StoredMessage {
8613
+ uniqueId: string;
8614
+ messageId: number;
8615
+ conversationId: string;
8616
+ role: ChatRole;
8617
+ content: string;
8618
+ model?: string;
8619
+ /** Image generation model used for this message (e.g., "nano-banana-flash") */
8620
+ imageModel?: string;
8621
+ /** @deprecated Use fileIds with media table instead */
8622
+ files?: FileMetadata[];
8623
+ /** Array of media_id references for direct lookup in media table */
8624
+ fileIds?: string[];
8625
+ vaultAttachments?: VaultAttachmentRef[];
8626
+ createdAt: Date;
8627
+ updatedAt: Date;
8628
+ vector?: number[];
8629
+ embeddingModel?: string;
8630
+ /** Chunks of this message with individual embeddings for fine-grained search */
8631
+ chunks?: MessageChunk[];
8632
+ usage?: ChatCompletionUsage;
8633
+ sources?: SearchSource[];
8634
+ responseDuration?: number;
8635
+ wasStopped?: boolean;
8636
+ /** If set, indicates the message failed with this error */
8637
+ error?: string;
8638
+ thoughtProcess?: ActivityPhase[];
8639
+ /** Reasoning/thinking content from models that support extended thinking */
8640
+ thinking?: string;
8641
+ /** Parent message ID for branching (edit/regenerate). Null for root messages. */
8642
+ parentMessageId?: string;
8643
+ /** User feedback: 'like', 'dislike', or null for no feedback */
8644
+ feedback?: MessageFeedback;
8645
+ /** Tool call events from the backend response (for reconstructing tool call history) */
8646
+ toolCallEvents?: LlmapiToolCallEvent[];
8647
+ /** Provenance for synthetic rows; undefined for typed messages and pre-v44 rows */
8648
+ origin?: MessageOrigin;
8649
+ /** Anuma 1:1 turn fields; only vault chat backends store them. */
8650
+ anuma?: AnumaTurn;
8651
+ /**
8652
+ * Set when `content` could not be decrypted on read (#561).
8653
+ * The `content` field still holds the original ciphertext — never a
8654
+ * `[Decryption Failed]` placeholder — so a later unlock can recover.
8655
+ * - `key_missing`: no key for this field's `enc:vN:` version in the store
8656
+ * - `auth_mismatch`: a key was present but AES-GCM auth failed (wrong key)
8657
+ * - `invalid_payload`: malformed ciphertext envelope
8658
+ */
8659
+ decryptionStatus?: "key_missing" | "auth_mismatch" | "invalid_payload";
8660
+ }
8661
+ interface ActivityPhase {
8662
+ id: string;
8663
+ label: string;
8664
+ timestamp: number;
8665
+ status: "pending" | "active" | "completed";
8666
+ data?: unknown[];
8667
+ }
8510
8668
  interface StoredConversation {
8511
8669
  uniqueId: string;
8512
8670
  conversationId: string;
@@ -8547,6 +8705,70 @@ interface LazyStoredConversation extends Omit<StoredConversation, "title"> {
8547
8705
  */
8548
8706
  encryptedTitle: string;
8549
8707
  }
8708
+ /**
8709
+ * A chunk of a message with its own embedding for fine-grained search
8710
+ */
8711
+ interface MessageChunk {
8712
+ /**
8713
+ * The chunk text — IN MEMORY ONLY. Not persisted (sdk#880).
8714
+ *
8715
+ * `chunkText` covers a message end to end with a 50-character overlap, so the
8716
+ * chunk set of any message over 400 characters reconstructs the whole thing.
8717
+ * Storing it put a fully readable copy of the message next to its own
8718
+ * ciphertext `content` on devices with at-rest encryption enabled.
8719
+ *
8720
+ * `updateMessageChunksOp` now strips this before writing and readers rebuild
8721
+ * the snippet from {@link startOffset}/{@link endOffset} against the message's
8722
+ * own (decrypted) `content` — so the text exists exactly once, under the
8723
+ * protection `content` already has. Encrypting the column instead was
8724
+ * rejected: the client reads this column raw and `JSON.parse`s it in four
8725
+ * places, each swallowing the throw and silently scoring 0.
8726
+ *
8727
+ * Optional because rows written before that change still carry it, and
8728
+ * readers prefer a stored value when present. It is populated in memory by
8729
+ * `chunkText()` and on the way out of a search.
8730
+ */
8731
+ text?: string;
8732
+ /**
8733
+ * Embedding vector for this chunk.
8734
+ *
8735
+ * Read it through `decodeChunkVector` rather than passing it straight to a
8736
+ * numeric call site. This stays `number[]` only while the writer still emits
8737
+ * JSON arrays; it widens to `number[] | string` in the release that flips the
8738
+ * writer to base64 float32 (sdk#862), and that widening is the whole reason
8739
+ * that release is a major. Readers already accept both, so code written
8740
+ * against the decoder today needs no change when it happens — code written
8741
+ * against the raw array degrades silently, because a string handed to
8742
+ * `Float32Array.from` yields one NaN per character rather than an error.
8743
+ */
8744
+ vector: number[];
8745
+ /** Character offset where this chunk starts in the original message */
8746
+ startOffset: number;
8747
+ /** Character offset where this chunk ends in the original message */
8748
+ endOffset: number;
8749
+ }
8750
+
8751
+ /** Returns `value` as an {@link AnumaTurn} when it is one, otherwise `undefined`. */
8752
+ declare function readAnumaTurn(value: unknown): AnumaTurn | undefined;
8753
+
8754
+ /** The one vault conversation that holds the user's Anuma 1:1 chat. */
8755
+ declare const ANUMA_CONVERSATION_ID = "anuma-1on1";
8756
+ /** The message text for a turn's bubbles, so readers that ignore bubbles still see every line. */
8757
+ declare function anumaTurnContent(bubbles: readonly string[]): string;
8758
+ /** The highest message sort key the user has read in the Anuma chat; 0 before anything was read. */
8759
+ declare function anumaLastReadSortKey(conversation: ChatRecord | ChatSnapshot | null): number;
8760
+ /** Reads the Anuma conversation, creating it on first use; a device that loses the creation race reads the winner's record. */
8761
+ declare function ensureAnumaConversation(store: ChatStore, options?: {
8762
+ now?: () => number;
8763
+ signal?: AbortSignal;
8764
+ }): Promise<ChatSnapshot>;
8765
+ /** Moves the read marker up to `sortKey`; it never moves down, and a concurrent write is re-read and re-applied. */
8766
+ declare function markAnumaRead(store: ChatStore, sortKey: number, options?: {
8767
+ now?: () => number;
8768
+ signal?: AbortSignal;
8769
+ }): Promise<ChatSnapshot>;
8770
+ /** Counts Anuma turns the user has not read: assistant turns above both the read marker and the user's latest message. */
8771
+ declare function countUnreadAnumaTurns(messages: readonly Pick<StoredMessage, "messageId" | "role" | "anuma" | "uniqueId">[], lastReadSortKey: number): number;
8550
8772
 
8551
8773
  /** Connect to owner-scoped server storage using the account's canonical device-held cipher. */
8552
8774
  declare function createRemoteChatStore(options: RemoteChatStoreOptions): Promise<ChatStore>;
@@ -8996,4 +9218,4 @@ declare class SseIdleTimeoutError extends Error {
8996
9218
  */
8997
9219
  declare function withSseKeepalive<T>(source: AsyncIterable<T>, options?: SseKeepaliveOptions): AsyncGenerator<T, void, unknown>;
8998
9220
 
8999
- export { type AgentAgendaItem, type AgentAgendaTranscript, type AgentAnalysisSection, type AgentAnalysisTranscript, type AgentConfig, type AgentExampleConversation, type AgentManifest, type AgentMarketplaceContent, type AgentMarketplaceFamily, type AgentMarketplaceTranscript, type AgentPrimaryActionKind, type AgentRuntime, type AgentScheduleItem, type AgentTranscriptItem, type AgentTranscriptTone, type AgentUiMetadata, type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, BUILT_IN_TOOL_SETS, type BuildPromptOptions, type BuildPromptResult, CHUNKS_DISCARDED_ORIGIN, type ChatAccount, type ChatAccountState, type ChatAttachment, type ChatAttachments, type ChatChanges, type ChatImport, type ChatJson, type ChatListOptions, type ChatPage, type ChatPresignedUrl, type ChatRecord, type ChatRecordKind, type ChatRef, type ChatRevision, type ChatSearchHit, type ChatSearchOptions, type ChatSnapshot, type ChatStore, ChatStoreError, type ChatWrite, type ClientOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type CreateServerToolsFilterOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_MESSAGES, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, type DeleteApiV1AccountData, type DeleteApiV1AccountError, type DeleteApiV1AccountErrors, type DeleteApiV1AccountResponse, type DeleteApiV1AccountResponses, type DeleteApiV1AdminAgentsByIdData, type DeleteApiV1AdminAgentsByIdError, type DeleteApiV1AdminAgentsByIdErrors, type DeleteApiV1AdminAgentsByIdResponse, type DeleteApiV1AdminAgentsByIdResponses, type DeleteApiV1AdminAppsByAppIdApiKeysByIdData, type DeleteApiV1AdminAppsByAppIdApiKeysByIdError, type DeleteApiV1AdminAppsByAppIdApiKeysByIdErrors, type DeleteApiV1AdminAppsByAppIdApiKeysByIdResponse, type DeleteApiV1AdminAppsByAppIdApiKeysByIdResponses, type DeleteApiV1AdminAppsByIdData, type DeleteApiV1AdminAppsByIdError, type DeleteApiV1AdminAppsByIdErrors, type DeleteApiV1AdminAppsByIdResponse, type DeleteApiV1AdminAppsByIdResponses, type DeleteApiV1AdminPersonasByIdData, type DeleteApiV1AdminPersonasByIdError, type DeleteApiV1AdminPersonasByIdErrors, type DeleteApiV1AdminPersonasByIdResponse, type DeleteApiV1AdminPersonasByIdResponses, type DeleteApiV1AdminTextResetData, type DeleteApiV1AdminTextResetError, type DeleteApiV1AdminTextResetErrors, type DeleteApiV1AdminTextResetResponse, type DeleteApiV1AdminTextResetResponses, type DeleteApiV1DeveloperAppsByAppUuidApiKeysByKeyIdData, type DeleteApiV1DeveloperAppsByAppUuidApiKeysByKeyIdError, type DeleteApiV1DeveloperAppsByAppUuidApiKeysByKeyIdErrors, type DeleteApiV1DeveloperAppsByAppUuidApiKeysByKeyIdResponse, type DeleteApiV1DeveloperAppsByAppUuidApiKeysByKeyIdResponses, type DeleteApiV1DeveloperAppsByAppUuidData, type DeleteApiV1DeveloperAppsByAppUuidError, type DeleteApiV1DeveloperAppsByAppUuidErrors, type DeleteApiV1DeveloperAppsByAppUuidPrivyData, type DeleteApiV1DeveloperAppsByAppUuidPrivyError, type DeleteApiV1DeveloperAppsByAppUuidPrivyErrors, type DeleteApiV1DeveloperAppsByAppUuidPrivyResponse, type DeleteApiV1DeveloperAppsByAppUuidPrivyResponses, type DeleteApiV1DeveloperAppsByAppUuidResponse, type DeleteApiV1DeveloperAppsByAppUuidResponses, type DeleteApiV1UserApiKeysByKeyIdData, type DeleteApiV1UserApiKeysByKeyIdError, type DeleteApiV1UserApiKeysByKeyIdErrors, type DeleteApiV1UserApiKeysByKeyIdResponse, type DeleteApiV1UserApiKeysByKeyIdResponses, type DeleteApiV1WalletsBindingByAddressData, type DeleteApiV1WalletsBindingByAddressError, type DeleteApiV1WalletsBindingByAddressErrors, type DeleteApiV1WalletsBindingByAddressResponse, type DeleteApiV1WalletsBindingByAddressResponses, type FileExtractionStrategy, type FileProcessingReason, type FileProcessingStatus, type GetApiV1AdminAppsByAppIdApiKeysByIdData, type GetApiV1AdminAppsByAppIdApiKeysByIdError, type GetApiV1AdminAppsByAppIdApiKeysByIdErrors, type GetApiV1AdminAppsByAppIdApiKeysByIdResponse, type GetApiV1AdminAppsByAppIdApiKeysByIdResponses, type GetApiV1AdminAppsByAppIdApiKeysData, type GetApiV1AdminAppsByAppIdApiKeysError, type GetApiV1AdminAppsByAppIdApiKeysErrors, type GetApiV1AdminAppsByAppIdApiKeysResponse, type GetApiV1AdminAppsByAppIdApiKeysResponses, type GetApiV1AdminAppsByIdData, type GetApiV1AdminAppsByIdError, type GetApiV1AdminAppsByIdErrors, type GetApiV1AdminAppsByIdResponse, type GetApiV1AdminAppsByIdResponses, type GetApiV1AdminAppsData, type GetApiV1AdminAppsError, type GetApiV1AdminAppsErrors, type GetApiV1AdminAppsResponse, type GetApiV1AdminAppsResponses, type GetApiV1AdminUsersLookupData, type GetApiV1AdminUsersLookupError, type GetApiV1AdminUsersLookupErrors, type GetApiV1AdminUsersLookupResponse, type GetApiV1AdminUsersLookupResponses, type GetApiV1AgentPreferencesData, type GetApiV1AgentPreferencesError, type GetApiV1AgentPreferencesErrors, type GetApiV1AgentPreferencesResponse, type GetApiV1AgentPreferencesResponses, type GetApiV1AgentsByIdData, type GetApiV1AgentsByIdError, type GetApiV1AgentsByIdErrors, type GetApiV1AgentsByIdResponse, type GetApiV1AgentsByIdResponses, type GetApiV1AgentsData, type GetApiV1AgentsError, type GetApiV1AgentsErrors, type GetApiV1AgentsResponse, type GetApiV1AgentsResponses, type GetApiV1ConfigData, type GetApiV1ConfigError, type GetApiV1ConfigErrors, type GetApiV1ConfigResponse, type GetApiV1ConfigResponses, type GetApiV1CreditsBalanceData, type GetApiV1CreditsBalanceError, type GetApiV1CreditsBalanceErrors, type GetApiV1CreditsBalanceResponse, type GetApiV1CreditsBalanceResponses, type GetApiV1CreditsPacksData, type GetApiV1CreditsPacksError, type GetApiV1CreditsPacksErrors, type GetApiV1CreditsPacksResponse, type GetApiV1CreditsPacksResponses, type GetApiV1DeveloperAppsByAppUuidApiKeysData, type GetApiV1DeveloperAppsByAppUuidApiKeysError, type GetApiV1DeveloperAppsByAppUuidApiKeysErrors, type GetApiV1DeveloperAppsByAppUuidApiKeysResponse, type GetApiV1DeveloperAppsByAppUuidApiKeysResponses, type GetApiV1DeveloperAppsByAppUuidData, type GetApiV1DeveloperAppsByAppUuidError, type GetApiV1DeveloperAppsByAppUuidErrors, type GetApiV1DeveloperAppsByAppUuidResponse, type GetApiV1DeveloperAppsByAppUuidResponses, type GetApiV1DeveloperAppsByAppUuidUsageData, type GetApiV1DeveloperAppsByAppUuidUsageError, type GetApiV1DeveloperAppsByAppUuidUsageErrors, type GetApiV1DeveloperAppsByAppUuidUsageResponse, type GetApiV1DeveloperAppsByAppUuidUsageResponses, type GetApiV1DeveloperAppsByAppUuidUsageUsersData, type GetApiV1DeveloperAppsByAppUuidUsageUsersError, type GetApiV1DeveloperAppsByAppUuidUsageUsersErrors, type GetApiV1DeveloperAppsByAppUuidUsageUsersResponse, type GetApiV1DeveloperAppsByAppUuidUsageUsersResponses, type GetApiV1DeveloperAppsByAppUuidUsersByAddressData, type GetApiV1DeveloperAppsByAppUuidUsersByAddressError, type GetApiV1DeveloperAppsByAppUuidUsersByAddressErrors, type GetApiV1DeveloperAppsByAppUuidUsersByAddressResponse, type GetApiV1DeveloperAppsByAppUuidUsersByAddressResponses, type GetApiV1DeveloperAppsByAppUuidUsersData, type GetApiV1DeveloperAppsByAppUuidUsersError, type GetApiV1DeveloperAppsByAppUuidUsersErrors, type GetApiV1DeveloperAppsByAppUuidUsersResponse, type GetApiV1DeveloperAppsByAppUuidUsersResponses, type GetApiV1DeveloperAppsData, type GetApiV1DeveloperAppsError, type GetApiV1DeveloperAppsErrors, type GetApiV1DeveloperAppsResponse, type GetApiV1DeveloperAppsResponses, type GetApiV1DeveloperBillingData, type GetApiV1DeveloperBillingError, type GetApiV1DeveloperBillingErrors, type GetApiV1DeveloperBillingResponse, type GetApiV1DeveloperBillingResponses, type GetApiV1DocsSwaggerJsonData, type GetApiV1DocsSwaggerJsonResponse, type GetApiV1DocsSwaggerJsonResponses, type GetApiV1ModelsData, type GetApiV1ModelsError, type GetApiV1ModelsErrors, type GetApiV1ModelsResponse, type GetApiV1ModelsResponses, type GetApiV1PersonasByIdData, type GetApiV1PersonasByIdError, type GetApiV1PersonasByIdErrors, type GetApiV1PersonasByIdResponse, type GetApiV1PersonasByIdResponses, type GetApiV1PersonasData, type GetApiV1PersonasError, type GetApiV1PersonasErrors, type GetApiV1PersonasResponse, type GetApiV1PersonasResponses, type GetApiV1PhoneCallsByCallIdData, type GetApiV1PhoneCallsByCallIdError, type GetApiV1PhoneCallsByCallIdErrors, type GetApiV1PhoneCallsByCallIdResponse, type GetApiV1PhoneCallsByCallIdResponses, type GetApiV1SubscriptionsPlansData, type GetApiV1SubscriptionsPlansError, type GetApiV1SubscriptionsPlansErrors, type GetApiV1SubscriptionsPlansResponse, type GetApiV1SubscriptionsPlansResponses, type GetApiV1SubscriptionsStatusData, type GetApiV1SubscriptionsStatusError, type GetApiV1SubscriptionsStatusErrors, type GetApiV1SubscriptionsStatusResponse, type GetApiV1SubscriptionsStatusResponses, type GetApiV1ToolsData, type GetApiV1ToolsError, type GetApiV1ToolsErrors, type GetApiV1ToolsResponse, type GetApiV1ToolsResponses, type GetApiV1UsageInferenceWeeklyData, type GetApiV1UsageInferenceWeeklyResponse, type GetApiV1UsageInferenceWeeklyResponses, type GetApiV1UsageModelsData, type GetApiV1UsageModelsError, type GetApiV1UsageModelsErrors, type GetApiV1UsageModelsResponse, type GetApiV1UsageModelsResponses, type GetApiV1UserApiKeysData, type GetApiV1UserApiKeysError, type GetApiV1UserApiKeysErrors, type GetApiV1UserApiKeysResponse, type GetApiV1UserApiKeysResponses, type GetApiV1WalletsBindingData, type GetApiV1WalletsBindingError, type GetApiV1WalletsBindingErrors, type GetApiV1WalletsBindingResponse, type GetApiV1WalletsBindingResponses, type GetApiV1ZetaCreditRateData, type GetApiV1ZetaCreditRateResponse, type GetApiV1ZetaCreditRateResponses, type GetApiV1ZetaMarketData, type GetApiV1ZetaMarketResponse, type GetApiV1ZetaMarketResponses, type GetHealthData, type GetHealthError, type GetHealthErrors, type GetHealthResponse, type GetHealthResponses, type HandlersAddCreditsRequest, type HandlersAddCreditsResponse, type HandlersAgentListItem, type HandlersAgentListResponse, type HandlersAgentResponse, type HandlersApiKeyResponse, type HandlersApiKeyWithKeyResponse, type HandlersAppConfig, type HandlersAppResponse, type HandlersAppUsageResponse, type HandlersAppUserUsageResponse, type HandlersBillingHistoryResponse, type HandlersBillingRecordResponse, type HandlersBindRequest, type HandlersBoundWalletResponse, type HandlersCancelScheduledDowngradeResponse, type HandlersCancelSubscriptionResponse, type HandlersCheckoutSessionResponse, type HandlersConfigResponse, type HandlersConfigurePrivyRequest, type HandlersCreateAgentRequest, type HandlersCreateApiKeyRequest, type HandlersCreateAppRequest, type HandlersCreateCheckoutSessionRequest, type HandlersCreateCreditPackCheckoutRequest, type HandlersCreateCustomerPortalRequest, type HandlersCreateDeveloperAppRequest, type HandlersCreatePersonaRequest, type HandlersCreatePhoneCallRequest, type HandlersCreditBalanceResponse, type HandlersCreditPack, type HandlersCreditPacksResponse, type HandlersCreditRateResponse, type HandlersCustomerPortalResponse, type HandlersDeveloperApiKeyRequest, type HandlersDeveloperApiKeyResponse, type HandlersDeveloperApiKeyWithSecretResponse, type HandlersDeveloperAppResponse, type HandlersDeveloperUserResponse, type HandlersExpiringCredits, type HandlersFundDeveloperAppRequest, type HandlersGeneratedApiKey, type HandlersGetToolsResponse, type HandlersHealthResponse, type HandlersInferenceWeeklyResponse, type HandlersListApiKeysResponse, type HandlersListAppsResponse, type HandlersListDeveloperApiKeysResponse, type HandlersListDeveloperAppsResponse, type HandlersListResponse, type HandlersListTotals, type HandlersListUserApiKeysResponse, type HandlersListUsersResponse, type HandlersModelToolUsageItem, type HandlersModelUsageItem, type HandlersNonceResponse, type HandlersPaginationResponse, type HandlersPersonaListResponse, type HandlersPersonaResponse, type HandlersPhoneCallResponse, type HandlersPhoneCallTranscriptEntry, type HandlersProInfo, type HandlersRedeemTokensRequest, type HandlersRedeemTokensResponse, type HandlersRenewSubscriptionResponse, type HandlersScheduleDowngradeRequest, type HandlersScheduleDowngradeResponse, type HandlersSeedApiKeyInput, type HandlersSeedAppInput, type HandlersSeedAppsRequest, type HandlersSeedAppsResponse, type HandlersSetSubscriptionTierRequest, type HandlersSetSubscriptionTierResponse, type HandlersSetUserAgentPreferenceRequest, type HandlersSubscriptionPlan, type HandlersSubscriptionPlansResponse, type HandlersSubscriptionStatusResponse, type HandlersTool, type HandlersToolCallDetailItem, type HandlersTopUpUserRequest, type HandlersUpdateAgentRequest, type HandlersUpdateApiKeyRequest, type HandlersUpdateAppRequest, type HandlersUpdateDeveloperAppRequest, type HandlersUpdatePersonaRequest, type HandlersUpdateUserLimitRequest, type HandlersUpgradeSubscriptionRequest, type HandlersUpgradeSubscriptionResponse, type HandlersUsageByModelResponse, type HandlersUsagePeriod, type HandlersUsageTimeseriesPoint, type HandlersUsageTotals, type HandlersUserAgentPreferenceResponse, type HandlersUserAgentPreferencesListResponse, type HandlersUserApiKeyRequest, type HandlersUserApiKeyResponse, type HandlersUserApiKeyWithSecretResponse, type HandlersUserLookupAccount, type HandlersUserLookupEnrollment, type HandlersUserLookupResponse, type HandlersUserLookupTextReg, type HandlersUserUsageResponse, type HandlersWalletDetails, type HandlersWeeklyInferenceItem, type HandlersZetaMarketResponse, type LazyStoredConversation, type LlmapiChatCompletionExtraFields, type LlmapiChatCompletionRequest, type LlmapiChatCompletionResponse, type LlmapiChatCompletionTool, type LlmapiChatCompletionToolChoice, type LlmapiChatCompletionUsage, type OpenaiChatCompletionChoice as LlmapiChoice, type LlmapiEmbeddingData, type LlmapiEmbeddingExtraFields, type LlmapiEmbeddingRequest, type LlmapiEmbeddingResponse, type LlmapiEmbeddingUsage, type LlmapiMcpTool, type LlmapiMessage, type LlmapiMessageContentFile, type LlmapiMessageContentImage, type LlmapiMessageContentPart, type LlmapiModel, type LlmapiModelArchitecture, type LlmapiModelPerRequestLimits, type LlmapiModelPricing, type LlmapiModelTopProvider, type LlmapiModelsListExtraFields, type LlmapiModelsListResponse, type LlmapiPortalChatCompletionRequest, type LlmapiPortalChatCompletionResponse, type LlmapiResponseExtraFields, type LlmapiResponseInput, type LlmapiResponseOutputContent, type LlmapiResponseOutputItem, type LlmapiResponseReasoning, type LlmapiResponseRequest, type LlmapiResponseResponse, type LlmapiResponseTool, type LlmapiResponseToolChoice, type LlmapiResponseUsage, type LlmapiRole, type LlmapiThinkingOptions, type LlmapiToolCall, type LlmapiToolCallEvent, type LlmapiToolCallFunction, type Logger, MULTILINE_FIELD_MAX, type McpToolSchema, type MessageRedactionResult, type NerDetector, type Options, PII_PATTERNS, type PatchApiV1DeveloperAppsByAppUuidData, type PatchApiV1DeveloperAppsByAppUuidError, type PatchApiV1DeveloperAppsByAppUuidErrors, type PatchApiV1DeveloperAppsByAppUuidResponse, type PatchApiV1DeveloperAppsByAppUuidResponses, type PatchApiV1DeveloperAppsByAppUuidUsersByAddressData, type PatchApiV1DeveloperAppsByAppUuidUsersByAddressError, type PatchApiV1DeveloperAppsByAppUuidUsersByAddressErrors, type PatchApiV1DeveloperAppsByAppUuidUsersByAddressResponse, type PatchApiV1DeveloperAppsByAppUuidUsersByAddressResponses, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PiiSpan, type PostApiV1AdminAddCreditsData, type PostApiV1AdminAddCreditsError, type PostApiV1AdminAddCreditsErrors, type PostApiV1AdminAddCreditsResponse, type PostApiV1AdminAddCreditsResponses, type PostApiV1AdminAgentsData, type PostApiV1AdminAgentsError, type PostApiV1AdminAgentsErrors, type PostApiV1AdminAgentsResponse, type PostApiV1AdminAgentsResponses, type PostApiV1AdminAppsByAppIdApiKeysData, type PostApiV1AdminAppsByAppIdApiKeysError, type PostApiV1AdminAppsByAppIdApiKeysErrors, type PostApiV1AdminAppsByAppIdApiKeysResponse, type PostApiV1AdminAppsByAppIdApiKeysResponses, type PostApiV1AdminAppsData, type PostApiV1AdminAppsError, type PostApiV1AdminAppsErrors, type PostApiV1AdminAppsResponse, type PostApiV1AdminAppsResponses, type PostApiV1AdminPersonasData, type PostApiV1AdminPersonasError, type PostApiV1AdminPersonasErrors, type PostApiV1AdminPersonasResponse, type PostApiV1AdminPersonasResponses, type PostApiV1AdminSeedAppsData, type PostApiV1AdminSeedAppsError, type PostApiV1AdminSeedAppsErrors, type PostApiV1AdminSeedAppsResponse, type PostApiV1AdminSeedAppsResponses, type PostApiV1AdminSubscriptionTierData, type PostApiV1AdminSubscriptionTierError, type PostApiV1AdminSubscriptionTierErrors, type PostApiV1AdminSubscriptionTierResponse, type PostApiV1AdminSubscriptionTierResponses, type PostApiV1ChatCompletionsData, type PostApiV1ChatCompletionsError, type PostApiV1ChatCompletionsErrors, type PostApiV1ChatCompletionsResponse, type PostApiV1ChatCompletionsResponses, type PostApiV1CreditsPurchaseData, type PostApiV1CreditsPurchaseError, type PostApiV1CreditsPurchaseErrors, type PostApiV1CreditsPurchaseResponse, type PostApiV1CreditsPurchaseResponses, type PostApiV1CreditsRedeemTokensData, type PostApiV1CreditsRedeemTokensError, type PostApiV1CreditsRedeemTokensErrors, type PostApiV1CreditsRedeemTokensResponse, type PostApiV1CreditsRedeemTokensResponses, type PostApiV1DeveloperAppsByAppUuidApiKeysData, type PostApiV1DeveloperAppsByAppUuidApiKeysError, type PostApiV1DeveloperAppsByAppUuidApiKeysErrors, type PostApiV1DeveloperAppsByAppUuidApiKeysResponse, type PostApiV1DeveloperAppsByAppUuidApiKeysResponses, type PostApiV1DeveloperAppsByAppUuidFundData, type PostApiV1DeveloperAppsByAppUuidFundError, type PostApiV1DeveloperAppsByAppUuidFundErrors, type PostApiV1DeveloperAppsByAppUuidFundResponse, type PostApiV1DeveloperAppsByAppUuidFundResponses, type PostApiV1DeveloperAppsByAppUuidPrivyData, type PostApiV1DeveloperAppsByAppUuidPrivyError, type PostApiV1DeveloperAppsByAppUuidPrivyErrors, type PostApiV1DeveloperAppsByAppUuidPrivyResponse, type PostApiV1DeveloperAppsByAppUuidPrivyResponses, type PostApiV1DeveloperAppsByAppUuidUsersByAddressTopUpData, type PostApiV1DeveloperAppsByAppUuidUsersByAddressTopUpError, type PostApiV1DeveloperAppsByAppUuidUsersByAddressTopUpErrors, type PostApiV1DeveloperAppsByAppUuidUsersByAddressTopUpResponse, type PostApiV1DeveloperAppsByAppUuidUsersByAddressTopUpResponses, type PostApiV1DeveloperAppsData, type PostApiV1DeveloperAppsError, type PostApiV1DeveloperAppsErrors, type PostApiV1DeveloperAppsResponse, type PostApiV1DeveloperAppsResponses, type PostApiV1EmbeddingsData, type PostApiV1EmbeddingsError, type PostApiV1EmbeddingsErrors, type PostApiV1EmbeddingsResponse, type PostApiV1EmbeddingsResponses, type PostApiV1PhoneCallsData, type PostApiV1PhoneCallsError, type PostApiV1PhoneCallsErrors, type PostApiV1PhoneCallsResponse, type PostApiV1PhoneCallsResponses, type PostApiV1ResponsesData, type PostApiV1ResponsesError, type PostApiV1ResponsesErrors, type PostApiV1ResponsesResponse, type PostApiV1ResponsesResponses, type PostApiV1SubscriptionsCancelData, type PostApiV1SubscriptionsCancelError, type PostApiV1SubscriptionsCancelErrors, type PostApiV1SubscriptionsCancelResponse, type PostApiV1SubscriptionsCancelResponses, type PostApiV1SubscriptionsCancelScheduledDowngradeData, type PostApiV1SubscriptionsCancelScheduledDowngradeError, type PostApiV1SubscriptionsCancelScheduledDowngradeErrors, type PostApiV1SubscriptionsCancelScheduledDowngradeResponse, type PostApiV1SubscriptionsCancelScheduledDowngradeResponses, type PostApiV1SubscriptionsCreateCheckoutSessionData, type PostApiV1SubscriptionsCreateCheckoutSessionError, type PostApiV1SubscriptionsCreateCheckoutSessionErrors, type PostApiV1SubscriptionsCreateCheckoutSessionResponse, type PostApiV1SubscriptionsCreateCheckoutSessionResponses, type PostApiV1SubscriptionsCustomerPortalData, type PostApiV1SubscriptionsCustomerPortalError, type PostApiV1SubscriptionsCustomerPortalErrors, type PostApiV1SubscriptionsCustomerPortalResponse, type PostApiV1SubscriptionsCustomerPortalResponses, type PostApiV1SubscriptionsRenewData, type PostApiV1SubscriptionsRenewError, type PostApiV1SubscriptionsRenewErrors, type PostApiV1SubscriptionsRenewResponse, type PostApiV1SubscriptionsRenewResponses, type PostApiV1SubscriptionsScheduleDowngradeData, type PostApiV1SubscriptionsScheduleDowngradeError, type PostApiV1SubscriptionsScheduleDowngradeErrors, type PostApiV1SubscriptionsScheduleDowngradeResponse, type PostApiV1SubscriptionsScheduleDowngradeResponses, type PostApiV1SubscriptionsUpgradeData, type PostApiV1SubscriptionsUpgradeError, type PostApiV1SubscriptionsUpgradeErrors, type PostApiV1SubscriptionsUpgradeResponse, type PostApiV1SubscriptionsUpgradeResponses, type PostApiV1SubscriptionsWebhookData, type PostApiV1SubscriptionsWebhookError, type PostApiV1SubscriptionsWebhookErrors, type PostApiV1SubscriptionsWebhookResponse, type PostApiV1SubscriptionsWebhookResponses, type PostApiV1UserApiKeysData, type PostApiV1UserApiKeysError, type PostApiV1UserApiKeysErrors, type PostApiV1UserApiKeysResponse, type PostApiV1UserApiKeysResponses, type PostApiV1WalletsBindingData, type PostApiV1WalletsBindingError, type PostApiV1WalletsBindingErrors, type PostApiV1WalletsBindingNonceData, type PostApiV1WalletsBindingNonceError, type PostApiV1WalletsBindingNonceErrors, type PostApiV1WalletsBindingNonceResponse, type PostApiV1WalletsBindingNonceResponses, type PostApiV1WalletsBindingResponse, type PostApiV1WalletsBindingResponses, type PostApiV1WebhooksRevenuecatData, type PostApiV1WebhooksRevenuecatError, type PostApiV1WebhooksRevenuecatErrors, type PostApiV1WebhooksRevenuecatResponse, type PostApiV1WebhooksRevenuecatResponses, type PromptContext, type PromptSection, type PromptTemplates, type PutApiV1AdminAgentsByIdData, type PutApiV1AdminAgentsByIdError, type PutApiV1AdminAgentsByIdErrors, type PutApiV1AdminAgentsByIdResponse, type PutApiV1AdminAgentsByIdResponses, type PutApiV1AdminAppsByAppIdApiKeysByIdData, type PutApiV1AdminAppsByAppIdApiKeysByIdError, type PutApiV1AdminAppsByAppIdApiKeysByIdErrors, type PutApiV1AdminAppsByAppIdApiKeysByIdResponse, type PutApiV1AdminAppsByAppIdApiKeysByIdResponses, type PutApiV1AdminAppsByIdData, type PutApiV1AdminAppsByIdError, type PutApiV1AdminAppsByIdErrors, type PutApiV1AdminAppsByIdResponse, type PutApiV1AdminAppsByIdResponses, type PutApiV1AdminPersonasByIdData, type PutApiV1AdminPersonasByIdError, type PutApiV1AdminPersonasByIdErrors, type PutApiV1AdminPersonasByIdResponse, type PutApiV1AdminPersonasByIdResponses, type PutApiV1AgentsByIdPreferenceData, type PutApiV1AgentsByIdPreferenceError, type PutApiV1AgentsByIdPreferenceErrors, type PutApiV1AgentsByIdPreferenceResponse, type PutApiV1AgentsByIdPreferenceResponses, type QuantizedEmbedding, type RedactionResult, type RemoteChatStoreOptions, type ReservationReceipt, type ResponseErrorResponse, type SelectServerSideToolsOptions, type Setting, type SkillConfig, type SkillJourneyDefinition, type SkillJourneyField, type SkillJourneyFieldType, SseIdleTimeoutError, type SseKeepaliveOptions, type StyleAnalysisSchedule, TASK_TYPE_HEADER, TOOL_CATALOG, TOOL_RESULT_ORIGIN, type TaskType, type ToolSet, activatedToolSetNames, analyzeStyle, applyToolSets, attachFileContextToLastUserMessage, buildAttachedFilesText, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, clearLazyTitleCache, consoleLogger, cosineInt8, createRemoteChatStore, createServerToolsFilter, createStreamingDeAnonymizer, decodeChunkVector, decryptConversationTitle, defaultServerToolsFilter, deleteApiV1Account, deleteApiV1AdminAgentsById, deleteApiV1AdminAppsByAppIdApiKeysById, deleteApiV1AdminAppsById, deleteApiV1AdminPersonasById, deleteApiV1AdminTextReset, deleteApiV1DeveloperAppsByAppUuid, deleteApiV1DeveloperAppsByAppUuidApiKeysByKeyId, deleteApiV1DeveloperAppsByAppUuidPrivy, deleteApiV1UserApiKeysByKeyId, deleteApiV1WalletsBindingByAddress, dequantizeEmbedding, encodeChunkVector, expandToolSetsAdditive, extractReservationReceipts, formatFileProcessingNotes, getApiV1AdminApps, getApiV1AdminAppsByAppIdApiKeys, getApiV1AdminAppsByAppIdApiKeysById, getApiV1AdminAppsById, getApiV1AdminUsersLookup, getApiV1AgentPreferences, getApiV1Agents, getApiV1AgentsById, getApiV1Config, getApiV1CreditsBalance, getApiV1CreditsPacks, getApiV1DeveloperApps, getApiV1DeveloperAppsByAppUuid, getApiV1DeveloperAppsByAppUuidApiKeys, getApiV1DeveloperAppsByAppUuidUsage, getApiV1DeveloperAppsByAppUuidUsageUsers, getApiV1DeveloperAppsByAppUuidUsers, getApiV1DeveloperAppsByAppUuidUsersByAddress, getApiV1DeveloperBilling, getApiV1DocsSwaggerJson, getApiV1Models, getApiV1Personas, getApiV1PersonasById, getApiV1PhoneCallsByCallId, getApiV1SubscriptionsPlans, getApiV1SubscriptionsStatus, getApiV1Tools, getApiV1UsageInferenceWeekly, getApiV1UsageModels, getApiV1UserApiKeys, getApiV1WalletsBinding, getApiV1ZetaCreditRate, getApiV1ZetaMarket, getCostMicroUsd, getCreditsUsed, getHealth, getImageModel, getLogger, getToolCallEvents, isAttachedFilesText, isPiiRedactor, loadSettings, noopLogger, patchApiV1DeveloperAppsByAppUuid, patchApiV1DeveloperAppsByAppUuidUsersByAddress, postApiV1AdminAddCredits, postApiV1AdminAgents, postApiV1AdminApps, postApiV1AdminAppsByAppIdApiKeys, postApiV1AdminPersonas, postApiV1AdminSeedApps, postApiV1AdminSubscriptionTier, postApiV1ChatCompletions, postApiV1CreditsPurchase, postApiV1CreditsRedeemTokens, postApiV1DeveloperApps, postApiV1DeveloperAppsByAppUuidApiKeys, postApiV1DeveloperAppsByAppUuidFund, postApiV1DeveloperAppsByAppUuidPrivy, postApiV1DeveloperAppsByAppUuidUsersByAddressTopUp, postApiV1Embeddings, postApiV1PhoneCalls, postApiV1Responses, postApiV1SubscriptionsCancel, postApiV1SubscriptionsCancelScheduledDowngrade, postApiV1SubscriptionsCreateCheckoutSession, postApiV1SubscriptionsCustomerPortal, postApiV1SubscriptionsRenew, postApiV1SubscriptionsScheduleDowngrade, postApiV1SubscriptionsUpgrade, postApiV1SubscriptionsWebhook, postApiV1UserApiKeys, postApiV1WalletsBinding, postApiV1WalletsBindingNonce, postApiV1WebhooksRevenuecat, putApiV1AdminAgentsById, putApiV1AdminAppsByAppIdApiKeysById, putApiV1AdminAppsById, putApiV1AdminPersonasById, putApiV1AgentsByIdPreference, quantizeEmbedding, renderTemplate, resolvePiiRedactor, sanitizeQuotes, saveSetting, selectServerSideTools, setLogger, shouldAnalyzeStyle, taskTypeHeader, toolSetSystemPrompts, withSseKeepalive };
9221
+ export { ANUMA_CONVERSATION_ID, type AgentAgendaItem, type AgentAgendaTranscript, type AgentAnalysisSection, type AgentAnalysisTranscript, type AgentConfig, type AgentExampleConversation, type AgentManifest, type AgentMarketplaceContent, type AgentMarketplaceFamily, type AgentMarketplaceTranscript, type AgentPrimaryActionKind, type AgentRuntime, type AgentScheduleItem, type AgentTranscriptItem, type AgentTranscriptTone, type AgentUiMetadata, type AnalyzeStyleOptions, type AnalyzeStyleResult, type AnumaTurn, type AnumaTurnOrigin, type ApiResponse, BUILT_IN_TOOL_SETS, type BuildPromptOptions, type BuildPromptResult, CHUNKS_DISCARDED_ORIGIN, type ChatAccount, type ChatAccountState, type ChatAttachment, type ChatAttachments, type ChatChanges, type ChatImport, type ChatJson, type ChatListOptions, type ChatPage, type ChatPresignedUrl, type ChatRecord, type ChatRecordKind, type ChatRef, type ChatRevision, type ChatSearchHit, type ChatSearchOptions, type ChatSnapshot, type ChatStore, ChatStoreError, type ChatWrite, type ClientOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type CreateServerToolsFilterOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_MESSAGES, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, type DeleteApiV1AccountData, type DeleteApiV1AccountError, type DeleteApiV1AccountErrors, type DeleteApiV1AccountResponse, type DeleteApiV1AccountResponses, type DeleteApiV1AdminAgentsByIdData, type DeleteApiV1AdminAgentsByIdError, type DeleteApiV1AdminAgentsByIdErrors, type DeleteApiV1AdminAgentsByIdResponse, type DeleteApiV1AdminAgentsByIdResponses, type DeleteApiV1AdminAppsByAppIdApiKeysByIdData, type DeleteApiV1AdminAppsByAppIdApiKeysByIdError, type DeleteApiV1AdminAppsByAppIdApiKeysByIdErrors, type DeleteApiV1AdminAppsByAppIdApiKeysByIdResponse, type DeleteApiV1AdminAppsByAppIdApiKeysByIdResponses, type DeleteApiV1AdminAppsByIdData, type DeleteApiV1AdminAppsByIdError, type DeleteApiV1AdminAppsByIdErrors, type DeleteApiV1AdminAppsByIdResponse, type DeleteApiV1AdminAppsByIdResponses, type DeleteApiV1AdminPersonasByIdData, type DeleteApiV1AdminPersonasByIdError, type DeleteApiV1AdminPersonasByIdErrors, type DeleteApiV1AdminPersonasByIdResponse, type DeleteApiV1AdminPersonasByIdResponses, type DeleteApiV1AdminTextResetData, type DeleteApiV1AdminTextResetError, type DeleteApiV1AdminTextResetErrors, type DeleteApiV1AdminTextResetResponse, type DeleteApiV1AdminTextResetResponses, type DeleteApiV1DeveloperAppsByAppUuidApiKeysByKeyIdData, type DeleteApiV1DeveloperAppsByAppUuidApiKeysByKeyIdError, type DeleteApiV1DeveloperAppsByAppUuidApiKeysByKeyIdErrors, type DeleteApiV1DeveloperAppsByAppUuidApiKeysByKeyIdResponse, type DeleteApiV1DeveloperAppsByAppUuidApiKeysByKeyIdResponses, type DeleteApiV1DeveloperAppsByAppUuidData, type DeleteApiV1DeveloperAppsByAppUuidError, type DeleteApiV1DeveloperAppsByAppUuidErrors, type DeleteApiV1DeveloperAppsByAppUuidPrivyData, type DeleteApiV1DeveloperAppsByAppUuidPrivyError, type DeleteApiV1DeveloperAppsByAppUuidPrivyErrors, type DeleteApiV1DeveloperAppsByAppUuidPrivyResponse, type DeleteApiV1DeveloperAppsByAppUuidPrivyResponses, type DeleteApiV1DeveloperAppsByAppUuidResponse, type DeleteApiV1DeveloperAppsByAppUuidResponses, type DeleteApiV1UserApiKeysByKeyIdData, type DeleteApiV1UserApiKeysByKeyIdError, type DeleteApiV1UserApiKeysByKeyIdErrors, type DeleteApiV1UserApiKeysByKeyIdResponse, type DeleteApiV1UserApiKeysByKeyIdResponses, type DeleteApiV1WalletsBindingByAddressData, type DeleteApiV1WalletsBindingByAddressError, type DeleteApiV1WalletsBindingByAddressErrors, type DeleteApiV1WalletsBindingByAddressResponse, type DeleteApiV1WalletsBindingByAddressResponses, type FileExtractionStrategy, type FileProcessingReason, type FileProcessingStatus, type GetApiV1AdminAppsByAppIdApiKeysByIdData, type GetApiV1AdminAppsByAppIdApiKeysByIdError, type GetApiV1AdminAppsByAppIdApiKeysByIdErrors, type GetApiV1AdminAppsByAppIdApiKeysByIdResponse, type GetApiV1AdminAppsByAppIdApiKeysByIdResponses, type GetApiV1AdminAppsByAppIdApiKeysData, type GetApiV1AdminAppsByAppIdApiKeysError, type GetApiV1AdminAppsByAppIdApiKeysErrors, type GetApiV1AdminAppsByAppIdApiKeysResponse, type GetApiV1AdminAppsByAppIdApiKeysResponses, type GetApiV1AdminAppsByIdData, type GetApiV1AdminAppsByIdError, type GetApiV1AdminAppsByIdErrors, type GetApiV1AdminAppsByIdResponse, type GetApiV1AdminAppsByIdResponses, type GetApiV1AdminAppsData, type GetApiV1AdminAppsError, type GetApiV1AdminAppsErrors, type GetApiV1AdminAppsResponse, type GetApiV1AdminAppsResponses, type GetApiV1AdminUsersLookupData, type GetApiV1AdminUsersLookupError, type GetApiV1AdminUsersLookupErrors, type GetApiV1AdminUsersLookupResponse, type GetApiV1AdminUsersLookupResponses, type GetApiV1AgentPreferencesData, type GetApiV1AgentPreferencesError, type GetApiV1AgentPreferencesErrors, type GetApiV1AgentPreferencesResponse, type GetApiV1AgentPreferencesResponses, type GetApiV1AgentsByIdData, type GetApiV1AgentsByIdError, type GetApiV1AgentsByIdErrors, type GetApiV1AgentsByIdResponse, type GetApiV1AgentsByIdResponses, type GetApiV1AgentsData, type GetApiV1AgentsError, type GetApiV1AgentsErrors, type GetApiV1AgentsResponse, type GetApiV1AgentsResponses, type GetApiV1ConfigData, type GetApiV1ConfigError, type GetApiV1ConfigErrors, type GetApiV1ConfigResponse, type GetApiV1ConfigResponses, type GetApiV1CreditsBalanceData, type GetApiV1CreditsBalanceError, type GetApiV1CreditsBalanceErrors, type GetApiV1CreditsBalanceResponse, type GetApiV1CreditsBalanceResponses, type GetApiV1CreditsPacksData, type GetApiV1CreditsPacksError, type GetApiV1CreditsPacksErrors, type GetApiV1CreditsPacksResponse, type GetApiV1CreditsPacksResponses, type GetApiV1DeveloperAppsByAppUuidApiKeysData, type GetApiV1DeveloperAppsByAppUuidApiKeysError, type GetApiV1DeveloperAppsByAppUuidApiKeysErrors, type GetApiV1DeveloperAppsByAppUuidApiKeysResponse, type GetApiV1DeveloperAppsByAppUuidApiKeysResponses, type GetApiV1DeveloperAppsByAppUuidData, type GetApiV1DeveloperAppsByAppUuidError, type GetApiV1DeveloperAppsByAppUuidErrors, type GetApiV1DeveloperAppsByAppUuidResponse, type GetApiV1DeveloperAppsByAppUuidResponses, type GetApiV1DeveloperAppsByAppUuidUsageData, type GetApiV1DeveloperAppsByAppUuidUsageError, type GetApiV1DeveloperAppsByAppUuidUsageErrors, type GetApiV1DeveloperAppsByAppUuidUsageResponse, type GetApiV1DeveloperAppsByAppUuidUsageResponses, type GetApiV1DeveloperAppsByAppUuidUsageUsersData, type GetApiV1DeveloperAppsByAppUuidUsageUsersError, type GetApiV1DeveloperAppsByAppUuidUsageUsersErrors, type GetApiV1DeveloperAppsByAppUuidUsageUsersResponse, type GetApiV1DeveloperAppsByAppUuidUsageUsersResponses, type GetApiV1DeveloperAppsByAppUuidUsersByAddressData, type GetApiV1DeveloperAppsByAppUuidUsersByAddressError, type GetApiV1DeveloperAppsByAppUuidUsersByAddressErrors, type GetApiV1DeveloperAppsByAppUuidUsersByAddressResponse, type GetApiV1DeveloperAppsByAppUuidUsersByAddressResponses, type GetApiV1DeveloperAppsByAppUuidUsersData, type GetApiV1DeveloperAppsByAppUuidUsersError, type GetApiV1DeveloperAppsByAppUuidUsersErrors, type GetApiV1DeveloperAppsByAppUuidUsersResponse, type GetApiV1DeveloperAppsByAppUuidUsersResponses, type GetApiV1DeveloperAppsData, type GetApiV1DeveloperAppsError, type GetApiV1DeveloperAppsErrors, type GetApiV1DeveloperAppsResponse, type GetApiV1DeveloperAppsResponses, type GetApiV1DeveloperBillingData, type GetApiV1DeveloperBillingError, type GetApiV1DeveloperBillingErrors, type GetApiV1DeveloperBillingResponse, type GetApiV1DeveloperBillingResponses, type GetApiV1DocsSwaggerJsonData, type GetApiV1DocsSwaggerJsonResponse, type GetApiV1DocsSwaggerJsonResponses, type GetApiV1ModelsData, type GetApiV1ModelsError, type GetApiV1ModelsErrors, type GetApiV1ModelsResponse, type GetApiV1ModelsResponses, type GetApiV1PersonasByIdData, type GetApiV1PersonasByIdError, type GetApiV1PersonasByIdErrors, type GetApiV1PersonasByIdResponse, type GetApiV1PersonasByIdResponses, type GetApiV1PersonasData, type GetApiV1PersonasError, type GetApiV1PersonasErrors, type GetApiV1PersonasResponse, type GetApiV1PersonasResponses, type GetApiV1PhoneCallsByCallIdData, type GetApiV1PhoneCallsByCallIdError, type GetApiV1PhoneCallsByCallIdErrors, type GetApiV1PhoneCallsByCallIdResponse, type GetApiV1PhoneCallsByCallIdResponses, type GetApiV1SubscriptionsPlansData, type GetApiV1SubscriptionsPlansError, type GetApiV1SubscriptionsPlansErrors, type GetApiV1SubscriptionsPlansResponse, type GetApiV1SubscriptionsPlansResponses, type GetApiV1SubscriptionsStatusData, type GetApiV1SubscriptionsStatusError, type GetApiV1SubscriptionsStatusErrors, type GetApiV1SubscriptionsStatusResponse, type GetApiV1SubscriptionsStatusResponses, type GetApiV1ToolsData, type GetApiV1ToolsError, type GetApiV1ToolsErrors, type GetApiV1ToolsResponse, type GetApiV1ToolsResponses, type GetApiV1UsageInferenceWeeklyData, type GetApiV1UsageInferenceWeeklyResponse, type GetApiV1UsageInferenceWeeklyResponses, type GetApiV1UsageModelsData, type GetApiV1UsageModelsError, type GetApiV1UsageModelsErrors, type GetApiV1UsageModelsResponse, type GetApiV1UsageModelsResponses, type GetApiV1UserApiKeysData, type GetApiV1UserApiKeysError, type GetApiV1UserApiKeysErrors, type GetApiV1UserApiKeysResponse, type GetApiV1UserApiKeysResponses, type GetApiV1WalletsBindingData, type GetApiV1WalletsBindingError, type GetApiV1WalletsBindingErrors, type GetApiV1WalletsBindingResponse, type GetApiV1WalletsBindingResponses, type GetApiV1ZetaCreditRateData, type GetApiV1ZetaCreditRateResponse, type GetApiV1ZetaCreditRateResponses, type GetApiV1ZetaMarketData, type GetApiV1ZetaMarketResponse, type GetApiV1ZetaMarketResponses, type GetHealthData, type GetHealthError, type GetHealthErrors, type GetHealthResponse, type GetHealthResponses, type HandlersAddCreditsRequest, type HandlersAddCreditsResponse, type HandlersAgentListItem, type HandlersAgentListResponse, type HandlersAgentResponse, type HandlersApiKeyResponse, type HandlersApiKeyWithKeyResponse, type HandlersAppConfig, type HandlersAppResponse, type HandlersAppUsageResponse, type HandlersAppUserUsageResponse, type HandlersBillingHistoryResponse, type HandlersBillingRecordResponse, type HandlersBindRequest, type HandlersBoundWalletResponse, type HandlersCancelScheduledDowngradeResponse, type HandlersCancelSubscriptionResponse, type HandlersCheckoutSessionResponse, type HandlersConfigResponse, type HandlersConfigurePrivyRequest, type HandlersCreateAgentRequest, type HandlersCreateApiKeyRequest, type HandlersCreateAppRequest, type HandlersCreateCheckoutSessionRequest, type HandlersCreateCreditPackCheckoutRequest, type HandlersCreateCustomerPortalRequest, type HandlersCreateDeveloperAppRequest, type HandlersCreatePersonaRequest, type HandlersCreatePhoneCallRequest, type HandlersCreditBalanceResponse, type HandlersCreditPack, type HandlersCreditPacksResponse, type HandlersCreditRateResponse, type HandlersCustomerPortalResponse, type HandlersDeveloperApiKeyRequest, type HandlersDeveloperApiKeyResponse, type HandlersDeveloperApiKeyWithSecretResponse, type HandlersDeveloperAppResponse, type HandlersDeveloperUserResponse, type HandlersExpiringCredits, type HandlersFundDeveloperAppRequest, type HandlersGeneratedApiKey, type HandlersGetToolsResponse, type HandlersHealthResponse, type HandlersInferenceWeeklyResponse, type HandlersListApiKeysResponse, type HandlersListAppsResponse, type HandlersListDeveloperApiKeysResponse, type HandlersListDeveloperAppsResponse, type HandlersListResponse, type HandlersListTotals, type HandlersListUserApiKeysResponse, type HandlersListUsersResponse, type HandlersModelToolUsageItem, type HandlersModelUsageItem, type HandlersNonceResponse, type HandlersPaginationResponse, type HandlersPersonaListResponse, type HandlersPersonaResponse, type HandlersPhoneCallResponse, type HandlersPhoneCallTranscriptEntry, type HandlersProInfo, type HandlersRedeemTokensRequest, type HandlersRedeemTokensResponse, type HandlersRenewSubscriptionResponse, type HandlersScheduleDowngradeRequest, type HandlersScheduleDowngradeResponse, type HandlersSeedApiKeyInput, type HandlersSeedAppInput, type HandlersSeedAppsRequest, type HandlersSeedAppsResponse, type HandlersSetSubscriptionTierRequest, type HandlersSetSubscriptionTierResponse, type HandlersSetUserAgentPreferenceRequest, type HandlersSubscriptionPlan, type HandlersSubscriptionPlansResponse, type HandlersSubscriptionStatusResponse, type HandlersTool, type HandlersToolCallDetailItem, type HandlersTopUpUserRequest, type HandlersUpdateAgentRequest, type HandlersUpdateApiKeyRequest, type HandlersUpdateAppRequest, type HandlersUpdateDeveloperAppRequest, type HandlersUpdatePersonaRequest, type HandlersUpdateUserLimitRequest, type HandlersUpgradeSubscriptionRequest, type HandlersUpgradeSubscriptionResponse, type HandlersUsageByModelResponse, type HandlersUsagePeriod, type HandlersUsageTimeseriesPoint, type HandlersUsageTotals, type HandlersUserAgentPreferenceResponse, type HandlersUserAgentPreferencesListResponse, type HandlersUserApiKeyRequest, type HandlersUserApiKeyResponse, type HandlersUserApiKeyWithSecretResponse, type HandlersUserLookupAccount, type HandlersUserLookupEnrollment, type HandlersUserLookupResponse, type HandlersUserLookupTextReg, type HandlersUserUsageResponse, type HandlersWalletDetails, type HandlersWeeklyInferenceItem, type HandlersZetaMarketResponse, type LazyStoredConversation, type LlmapiChatCompletionExtraFields, type LlmapiChatCompletionRequest, type LlmapiChatCompletionResponse, type LlmapiChatCompletionTool, type LlmapiChatCompletionToolChoice, type LlmapiChatCompletionUsage, type OpenaiChatCompletionChoice as LlmapiChoice, type LlmapiEmbeddingData, type LlmapiEmbeddingExtraFields, type LlmapiEmbeddingRequest, type LlmapiEmbeddingResponse, type LlmapiEmbeddingUsage, type LlmapiMcpTool, type LlmapiMessage, type LlmapiMessageContentFile, type LlmapiMessageContentImage, type LlmapiMessageContentPart, type LlmapiModel, type LlmapiModelArchitecture, type LlmapiModelPerRequestLimits, type LlmapiModelPricing, type LlmapiModelTopProvider, type LlmapiModelsListExtraFields, type LlmapiModelsListResponse, type LlmapiPortalChatCompletionRequest, type LlmapiPortalChatCompletionResponse, type LlmapiResponseExtraFields, type LlmapiResponseInput, type LlmapiResponseOutputContent, type LlmapiResponseOutputItem, type LlmapiResponseReasoning, type LlmapiResponseRequest, type LlmapiResponseResponse, type LlmapiResponseTool, type LlmapiResponseToolChoice, type LlmapiResponseUsage, type LlmapiRole, type LlmapiThinkingOptions, type LlmapiToolCall, type LlmapiToolCallEvent, type LlmapiToolCallFunction, type Logger, MULTILINE_FIELD_MAX, type McpToolSchema, type MessageRedactionResult, type NerDetector, type Options, PII_PATTERNS, type PatchApiV1DeveloperAppsByAppUuidData, type PatchApiV1DeveloperAppsByAppUuidError, type PatchApiV1DeveloperAppsByAppUuidErrors, type PatchApiV1DeveloperAppsByAppUuidResponse, type PatchApiV1DeveloperAppsByAppUuidResponses, type PatchApiV1DeveloperAppsByAppUuidUsersByAddressData, type PatchApiV1DeveloperAppsByAppUuidUsersByAddressError, type PatchApiV1DeveloperAppsByAppUuidUsersByAddressErrors, type PatchApiV1DeveloperAppsByAppUuidUsersByAddressResponse, type PatchApiV1DeveloperAppsByAppUuidUsersByAddressResponses, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PiiSpan, type PostApiV1AdminAddCreditsData, type PostApiV1AdminAddCreditsError, type PostApiV1AdminAddCreditsErrors, type PostApiV1AdminAddCreditsResponse, type PostApiV1AdminAddCreditsResponses, type PostApiV1AdminAgentsData, type PostApiV1AdminAgentsError, type PostApiV1AdminAgentsErrors, type PostApiV1AdminAgentsResponse, type PostApiV1AdminAgentsResponses, type PostApiV1AdminAppsByAppIdApiKeysData, type PostApiV1AdminAppsByAppIdApiKeysError, type PostApiV1AdminAppsByAppIdApiKeysErrors, type PostApiV1AdminAppsByAppIdApiKeysResponse, type PostApiV1AdminAppsByAppIdApiKeysResponses, type PostApiV1AdminAppsData, type PostApiV1AdminAppsError, type PostApiV1AdminAppsErrors, type PostApiV1AdminAppsResponse, type PostApiV1AdminAppsResponses, type PostApiV1AdminPersonasData, type PostApiV1AdminPersonasError, type PostApiV1AdminPersonasErrors, type PostApiV1AdminPersonasResponse, type PostApiV1AdminPersonasResponses, type PostApiV1AdminSeedAppsData, type PostApiV1AdminSeedAppsError, type PostApiV1AdminSeedAppsErrors, type PostApiV1AdminSeedAppsResponse, type PostApiV1AdminSeedAppsResponses, type PostApiV1AdminSubscriptionTierData, type PostApiV1AdminSubscriptionTierError, type PostApiV1AdminSubscriptionTierErrors, type PostApiV1AdminSubscriptionTierResponse, type PostApiV1AdminSubscriptionTierResponses, type PostApiV1ChatCompletionsData, type PostApiV1ChatCompletionsError, type PostApiV1ChatCompletionsErrors, type PostApiV1ChatCompletionsResponse, type PostApiV1ChatCompletionsResponses, type PostApiV1CreditsPurchaseData, type PostApiV1CreditsPurchaseError, type PostApiV1CreditsPurchaseErrors, type PostApiV1CreditsPurchaseResponse, type PostApiV1CreditsPurchaseResponses, type PostApiV1CreditsRedeemTokensData, type PostApiV1CreditsRedeemTokensError, type PostApiV1CreditsRedeemTokensErrors, type PostApiV1CreditsRedeemTokensResponse, type PostApiV1CreditsRedeemTokensResponses, type PostApiV1DeveloperAppsByAppUuidApiKeysData, type PostApiV1DeveloperAppsByAppUuidApiKeysError, type PostApiV1DeveloperAppsByAppUuidApiKeysErrors, type PostApiV1DeveloperAppsByAppUuidApiKeysResponse, type PostApiV1DeveloperAppsByAppUuidApiKeysResponses, type PostApiV1DeveloperAppsByAppUuidFundData, type PostApiV1DeveloperAppsByAppUuidFundError, type PostApiV1DeveloperAppsByAppUuidFundErrors, type PostApiV1DeveloperAppsByAppUuidFundResponse, type PostApiV1DeveloperAppsByAppUuidFundResponses, type PostApiV1DeveloperAppsByAppUuidPrivyData, type PostApiV1DeveloperAppsByAppUuidPrivyError, type PostApiV1DeveloperAppsByAppUuidPrivyErrors, type PostApiV1DeveloperAppsByAppUuidPrivyResponse, type PostApiV1DeveloperAppsByAppUuidPrivyResponses, type PostApiV1DeveloperAppsByAppUuidUsersByAddressTopUpData, type PostApiV1DeveloperAppsByAppUuidUsersByAddressTopUpError, type PostApiV1DeveloperAppsByAppUuidUsersByAddressTopUpErrors, type PostApiV1DeveloperAppsByAppUuidUsersByAddressTopUpResponse, type PostApiV1DeveloperAppsByAppUuidUsersByAddressTopUpResponses, type PostApiV1DeveloperAppsData, type PostApiV1DeveloperAppsError, type PostApiV1DeveloperAppsErrors, type PostApiV1DeveloperAppsResponse, type PostApiV1DeveloperAppsResponses, type PostApiV1EmbeddingsData, type PostApiV1EmbeddingsError, type PostApiV1EmbeddingsErrors, type PostApiV1EmbeddingsResponse, type PostApiV1EmbeddingsResponses, type PostApiV1PhoneCallsData, type PostApiV1PhoneCallsError, type PostApiV1PhoneCallsErrors, type PostApiV1PhoneCallsResponse, type PostApiV1PhoneCallsResponses, type PostApiV1ResponsesData, type PostApiV1ResponsesError, type PostApiV1ResponsesErrors, type PostApiV1ResponsesResponse, type PostApiV1ResponsesResponses, type PostApiV1SubscriptionsCancelData, type PostApiV1SubscriptionsCancelError, type PostApiV1SubscriptionsCancelErrors, type PostApiV1SubscriptionsCancelResponse, type PostApiV1SubscriptionsCancelResponses, type PostApiV1SubscriptionsCancelScheduledDowngradeData, type PostApiV1SubscriptionsCancelScheduledDowngradeError, type PostApiV1SubscriptionsCancelScheduledDowngradeErrors, type PostApiV1SubscriptionsCancelScheduledDowngradeResponse, type PostApiV1SubscriptionsCancelScheduledDowngradeResponses, type PostApiV1SubscriptionsCreateCheckoutSessionData, type PostApiV1SubscriptionsCreateCheckoutSessionError, type PostApiV1SubscriptionsCreateCheckoutSessionErrors, type PostApiV1SubscriptionsCreateCheckoutSessionResponse, type PostApiV1SubscriptionsCreateCheckoutSessionResponses, type PostApiV1SubscriptionsCustomerPortalData, type PostApiV1SubscriptionsCustomerPortalError, type PostApiV1SubscriptionsCustomerPortalErrors, type PostApiV1SubscriptionsCustomerPortalResponse, type PostApiV1SubscriptionsCustomerPortalResponses, type PostApiV1SubscriptionsRenewData, type PostApiV1SubscriptionsRenewError, type PostApiV1SubscriptionsRenewErrors, type PostApiV1SubscriptionsRenewResponse, type PostApiV1SubscriptionsRenewResponses, type PostApiV1SubscriptionsScheduleDowngradeData, type PostApiV1SubscriptionsScheduleDowngradeError, type PostApiV1SubscriptionsScheduleDowngradeErrors, type PostApiV1SubscriptionsScheduleDowngradeResponse, type PostApiV1SubscriptionsScheduleDowngradeResponses, type PostApiV1SubscriptionsUpgradeData, type PostApiV1SubscriptionsUpgradeError, type PostApiV1SubscriptionsUpgradeErrors, type PostApiV1SubscriptionsUpgradeResponse, type PostApiV1SubscriptionsUpgradeResponses, type PostApiV1SubscriptionsWebhookData, type PostApiV1SubscriptionsWebhookError, type PostApiV1SubscriptionsWebhookErrors, type PostApiV1SubscriptionsWebhookResponse, type PostApiV1SubscriptionsWebhookResponses, type PostApiV1UserApiKeysData, type PostApiV1UserApiKeysError, type PostApiV1UserApiKeysErrors, type PostApiV1UserApiKeysResponse, type PostApiV1UserApiKeysResponses, type PostApiV1WalletsBindingData, type PostApiV1WalletsBindingError, type PostApiV1WalletsBindingErrors, type PostApiV1WalletsBindingNonceData, type PostApiV1WalletsBindingNonceError, type PostApiV1WalletsBindingNonceErrors, type PostApiV1WalletsBindingNonceResponse, type PostApiV1WalletsBindingNonceResponses, type PostApiV1WalletsBindingResponse, type PostApiV1WalletsBindingResponses, type PostApiV1WebhooksRevenuecatData, type PostApiV1WebhooksRevenuecatError, type PostApiV1WebhooksRevenuecatErrors, type PostApiV1WebhooksRevenuecatResponse, type PostApiV1WebhooksRevenuecatResponses, type PromptContext, type PromptSection, type PromptTemplates, type PutApiV1AdminAgentsByIdData, type PutApiV1AdminAgentsByIdError, type PutApiV1AdminAgentsByIdErrors, type PutApiV1AdminAgentsByIdResponse, type PutApiV1AdminAgentsByIdResponses, type PutApiV1AdminAppsByAppIdApiKeysByIdData, type PutApiV1AdminAppsByAppIdApiKeysByIdError, type PutApiV1AdminAppsByAppIdApiKeysByIdErrors, type PutApiV1AdminAppsByAppIdApiKeysByIdResponse, type PutApiV1AdminAppsByAppIdApiKeysByIdResponses, type PutApiV1AdminAppsByIdData, type PutApiV1AdminAppsByIdError, type PutApiV1AdminAppsByIdErrors, type PutApiV1AdminAppsByIdResponse, type PutApiV1AdminAppsByIdResponses, type PutApiV1AdminPersonasByIdData, type PutApiV1AdminPersonasByIdError, type PutApiV1AdminPersonasByIdErrors, type PutApiV1AdminPersonasByIdResponse, type PutApiV1AdminPersonasByIdResponses, type PutApiV1AgentsByIdPreferenceData, type PutApiV1AgentsByIdPreferenceError, type PutApiV1AgentsByIdPreferenceErrors, type PutApiV1AgentsByIdPreferenceResponse, type PutApiV1AgentsByIdPreferenceResponses, type QuantizedEmbedding, type RedactionResult, type RemoteChatStoreOptions, type ReservationReceipt, type ResponseErrorResponse, type SelectServerSideToolsOptions, type Setting, type SkillConfig, type SkillJourneyDefinition, type SkillJourneyField, type SkillJourneyFieldType, SseIdleTimeoutError, type SseKeepaliveOptions, type StyleAnalysisSchedule, TASK_TYPE_HEADER, TOOL_CATALOG, TOOL_RESULT_ORIGIN, type TaskType, type ToolSet, activatedToolSetNames, analyzeStyle, anumaLastReadSortKey, anumaTurnContent, applyToolSets, attachFileContextToLastUserMessage, buildAttachedFilesText, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, clearLazyTitleCache, consoleLogger, cosineInt8, countUnreadAnumaTurns, createRemoteChatStore, createServerToolsFilter, createStreamingDeAnonymizer, decodeChunkVector, decryptConversationTitle, defaultServerToolsFilter, deleteApiV1Account, deleteApiV1AdminAgentsById, deleteApiV1AdminAppsByAppIdApiKeysById, deleteApiV1AdminAppsById, deleteApiV1AdminPersonasById, deleteApiV1AdminTextReset, deleteApiV1DeveloperAppsByAppUuid, deleteApiV1DeveloperAppsByAppUuidApiKeysByKeyId, deleteApiV1DeveloperAppsByAppUuidPrivy, deleteApiV1UserApiKeysByKeyId, deleteApiV1WalletsBindingByAddress, dequantizeEmbedding, encodeChunkVector, ensureAnumaConversation, expandToolSetsAdditive, extractReservationReceipts, formatFileProcessingNotes, getApiV1AdminApps, getApiV1AdminAppsByAppIdApiKeys, getApiV1AdminAppsByAppIdApiKeysById, getApiV1AdminAppsById, getApiV1AdminUsersLookup, getApiV1AgentPreferences, getApiV1Agents, getApiV1AgentsById, getApiV1Config, getApiV1CreditsBalance, getApiV1CreditsPacks, getApiV1DeveloperApps, getApiV1DeveloperAppsByAppUuid, getApiV1DeveloperAppsByAppUuidApiKeys, getApiV1DeveloperAppsByAppUuidUsage, getApiV1DeveloperAppsByAppUuidUsageUsers, getApiV1DeveloperAppsByAppUuidUsers, getApiV1DeveloperAppsByAppUuidUsersByAddress, getApiV1DeveloperBilling, getApiV1DocsSwaggerJson, getApiV1Models, getApiV1Personas, getApiV1PersonasById, getApiV1PhoneCallsByCallId, getApiV1SubscriptionsPlans, getApiV1SubscriptionsStatus, getApiV1Tools, getApiV1UsageInferenceWeekly, getApiV1UsageModels, getApiV1UserApiKeys, getApiV1WalletsBinding, getApiV1ZetaCreditRate, getApiV1ZetaMarket, getCostMicroUsd, getCreditsUsed, getHealth, getImageModel, getLogger, getToolCallEvents, isAttachedFilesText, isPiiRedactor, loadSettings, markAnumaRead, noopLogger, patchApiV1DeveloperAppsByAppUuid, patchApiV1DeveloperAppsByAppUuidUsersByAddress, postApiV1AdminAddCredits, postApiV1AdminAgents, postApiV1AdminApps, postApiV1AdminAppsByAppIdApiKeys, postApiV1AdminPersonas, postApiV1AdminSeedApps, postApiV1AdminSubscriptionTier, postApiV1ChatCompletions, postApiV1CreditsPurchase, postApiV1CreditsRedeemTokens, postApiV1DeveloperApps, postApiV1DeveloperAppsByAppUuidApiKeys, postApiV1DeveloperAppsByAppUuidFund, postApiV1DeveloperAppsByAppUuidPrivy, postApiV1DeveloperAppsByAppUuidUsersByAddressTopUp, postApiV1Embeddings, postApiV1PhoneCalls, postApiV1Responses, postApiV1SubscriptionsCancel, postApiV1SubscriptionsCancelScheduledDowngrade, postApiV1SubscriptionsCreateCheckoutSession, postApiV1SubscriptionsCustomerPortal, postApiV1SubscriptionsRenew, postApiV1SubscriptionsScheduleDowngrade, postApiV1SubscriptionsUpgrade, postApiV1SubscriptionsWebhook, postApiV1UserApiKeys, postApiV1WalletsBinding, postApiV1WalletsBindingNonce, postApiV1WebhooksRevenuecat, putApiV1AdminAgentsById, putApiV1AdminAppsByAppIdApiKeysById, putApiV1AdminAppsById, putApiV1AdminPersonasById, putApiV1AgentsByIdPreference, quantizeEmbedding, readAnumaTurn, renderTemplate, resolvePiiRedactor, sanitizeQuotes, saveSetting, selectServerSideTools, setLogger, shouldAnalyzeStyle, taskTypeHeader, toolSetSystemPrompts, withSseKeepalive };
package/dist/index.mjs CHANGED
@@ -1622,6 +1622,152 @@ function getImageModel(r) {
1622
1622
  return r.image_model;
1623
1623
  }
1624
1624
 
1625
+ // src/lib/chatStore/types.ts
1626
+ var ChatStoreError = class extends Error {
1627
+ constructor(message, status, code, retryAfterMs) {
1628
+ super(message);
1629
+ this.status = status;
1630
+ this.code = code;
1631
+ this.retryAfterMs = retryAfterMs;
1632
+ this.name = "ChatStoreError";
1633
+ }
1634
+ };
1635
+
1636
+ // src/lib/chatStore/vaultRecords.ts
1637
+ var PINNED_SORT_BASE = 2 ** 51;
1638
+ var maxBubbles = 3;
1639
+ var maxTurnIdBytes = 128;
1640
+ var maxBubbleBytes = 16384;
1641
+ var anumaOrigins = /* @__PURE__ */ new Set(["intro", "reply"]);
1642
+ function plain(value) {
1643
+ return JSON.parse(JSON.stringify(value ?? {}));
1644
+ }
1645
+ function number(value) {
1646
+ return typeof value === "number" ? value : void 0;
1647
+ }
1648
+ function readAnumaTurn(value) {
1649
+ if (!isObject(value)) return void 0;
1650
+ const { turnId, bubbles, origin } = value;
1651
+ if (typeof turnId !== "string" || turnId.length === 0 || new TextEncoder().encode(turnId).length > maxTurnIdBytes)
1652
+ return void 0;
1653
+ if (bubbles !== void 0 && (!Array.isArray(bubbles) || bubbles.length < 1 || bubbles.length > maxBubbles || !bubbles.every((b) => typeof b === "string") || bubbles.reduce((sum, b) => sum + new TextEncoder().encode(b).length, 0) > maxBubbleBytes))
1654
+ return void 0;
1655
+ if (origin !== void 0 && (typeof origin !== "string" || !anumaOrigins.has(origin)))
1656
+ return void 0;
1657
+ return {
1658
+ turnId,
1659
+ ...bubbles !== void 0 ? { bubbles: [...bubbles] } : {},
1660
+ ...origin !== void 0 ? { origin } : {}
1661
+ };
1662
+ }
1663
+ function isObject(value) {
1664
+ return value !== null && typeof value === "object" && !Array.isArray(value);
1665
+ }
1666
+ function conversationSortKey(data, createdAt) {
1667
+ const pinnedAt = number(data.pinnedAt);
1668
+ if (pinnedAt) return PINNED_SORT_BASE + pinnedAt;
1669
+ return number(data.lastActivityAt) ?? createdAt;
1670
+ }
1671
+
1672
+ // src/lib/chatStore/anuma.ts
1673
+ var ANUMA_CONVERSATION_ID = "anuma-1on1";
1674
+ var maxAttempts = 3;
1675
+ function anumaTurnContent(bubbles) {
1676
+ return bubbles.join("\n\n");
1677
+ }
1678
+ function anumaLastReadSortKey(conversation) {
1679
+ const record2 = conversation && "record" in conversation ? conversation.record : conversation;
1680
+ const state = record2?.data.anuma;
1681
+ if (!isObject(state)) return 0;
1682
+ const sortKey = state.lastReadSortKey;
1683
+ return Number.isSafeInteger(sortKey) && sortKey > 0 ? sortKey : 0;
1684
+ }
1685
+ function conflict(error) {
1686
+ return error instanceof ChatStoreError && error.code === "version_conflict";
1687
+ }
1688
+ function live(snapshot) {
1689
+ if (snapshot?.record.isDeleted)
1690
+ throw new ChatStoreError("Anuma conversation was deleted", 409, "conversation_deleted");
1691
+ return snapshot;
1692
+ }
1693
+ async function ensureAnumaConversation(store, options = {}) {
1694
+ const existing = live(await store.get("conversation", ANUMA_CONVERSATION_ID, options.signal));
1695
+ if (existing) return existing;
1696
+ const at = (options.now ?? Date.now)();
1697
+ const data = plain({ title: "Anuma", lastActivityAt: at, anuma: { lastReadSortKey: 0 } });
1698
+ try {
1699
+ const [created] = await store.putMany(
1700
+ [
1701
+ {
1702
+ expectedVersion: 0,
1703
+ record: {
1704
+ kind: "conversation",
1705
+ id: ANUMA_CONVERSATION_ID,
1706
+ conversationId: "",
1707
+ sortKey: conversationSortKey(data, at),
1708
+ createdAt: at,
1709
+ updatedAt: at,
1710
+ isDeleted: false,
1711
+ data
1712
+ }
1713
+ }
1714
+ ],
1715
+ options.signal
1716
+ );
1717
+ return created;
1718
+ } catch (error) {
1719
+ if (!conflict(error)) throw error;
1720
+ const winner = live(await store.get("conversation", ANUMA_CONVERSATION_ID, options.signal));
1721
+ if (!winner) throw error;
1722
+ return winner;
1723
+ }
1724
+ }
1725
+ async function markAnumaRead(store, sortKey, options = {}) {
1726
+ if (!Number.isSafeInteger(sortKey) || sortKey < 0)
1727
+ throw new ChatStoreError("Invalid Anuma read marker", 0, "invalid_record");
1728
+ const now = options.now ?? Date.now;
1729
+ for (let attempt = 1; ; attempt++) {
1730
+ const current = await ensureAnumaConversation(store, options);
1731
+ const read = anumaLastReadSortKey(current);
1732
+ if (sortKey <= read) return current;
1733
+ const record2 = current.record;
1734
+ const state = isObject(record2.data.anuma) ? record2.data.anuma : {};
1735
+ const data = plain({ ...record2.data, anuma: { ...state, lastReadSortKey: sortKey } });
1736
+ try {
1737
+ const [written] = await store.putMany(
1738
+ [
1739
+ {
1740
+ expectedVersion: current.version,
1741
+ record: {
1742
+ ...record2,
1743
+ data,
1744
+ sortKey: conversationSortKey(data, record2.createdAt),
1745
+ updatedAt: Math.max(record2.updatedAt, now())
1746
+ }
1747
+ }
1748
+ ],
1749
+ options.signal
1750
+ );
1751
+ return written;
1752
+ } catch (error) {
1753
+ if (!conflict(error) || attempt >= maxAttempts) throw error;
1754
+ }
1755
+ }
1756
+ }
1757
+ function countUnreadAnumaTurns(messages, lastReadSortKey) {
1758
+ const answered = Math.max(
1759
+ 0,
1760
+ ...messages.filter((m) => m.role === "user").map((m) => m.messageId)
1761
+ );
1762
+ const floor = Math.max(lastReadSortKey, answered);
1763
+ const turns = /* @__PURE__ */ new Set();
1764
+ for (const m of messages) {
1765
+ if (m.role !== "assistant" || m.messageId <= floor) continue;
1766
+ turns.add(m.anuma?.turnId ? `turn:${m.anuma.turnId}` : `message:${m.uniqueId}`);
1767
+ }
1768
+ return turns.size;
1769
+ }
1770
+
1625
1771
  // src/lib/memoryEngine/vector.ts
1626
1772
  function cosineSimilarity(a, b) {
1627
1773
  if (a.length !== b.length) return 0;
@@ -1825,17 +1971,6 @@ function createNearbyRequest(options, apiPath = "/api/private-memories") {
1825
1971
  return request;
1826
1972
  }
1827
1973
 
1828
- // src/lib/chatStore/types.ts
1829
- var ChatStoreError = class extends Error {
1830
- constructor(message, status, code, retryAfterMs) {
1831
- super(message);
1832
- this.status = status;
1833
- this.code = code;
1834
- this.retryAfterMs = retryAfterMs;
1835
- this.name = "ChatStoreError";
1836
- }
1837
- };
1838
-
1839
1974
  // src/lib/chatStore/remote.ts
1840
1975
  var kinds = /* @__PURE__ */ new Set(["conversation", "message", "summary", "project", "memory_links", "setting"]);
1841
1976
  var cipherPattern = /^enc:v\d+:(?:[0-9a-f]{2}){28,}$/i;
@@ -1995,7 +2130,7 @@ async function createRemoteChatStore(options) {
1995
2130
  if (!object(value) || !object(value.record) || !integer(value.version, 1) || typeof value.server_updated_at !== "string" || !Number.isFinite(Date.parse(value.server_updated_at)))
1996
2131
  invalid();
1997
2132
  const r = value.record;
1998
- const plain = {
2133
+ const plain2 = {
1999
2134
  kind: r.kind,
2000
2135
  id: r.id,
2001
2136
  conversationId: r.conversation_id,
@@ -2005,13 +2140,13 @@ async function createRemoteChatStore(options) {
2005
2140
  isDeleted: r.is_deleted,
2006
2141
  data: {}
2007
2142
  };
2008
- if (!validRecord(plain) || typeof r.payload !== "string" || r.payload.length > maxPayload)
2143
+ if (!validRecord(plain2) || typeof r.payload !== "string" || r.payload.length > maxPayload)
2009
2144
  invalid();
2010
- if (plain.isDeleted && r.payload === "")
2011
- return { record: plain, version: value.version, serverUpdatedAt: value.server_updated_at };
2145
+ if (plain2.isDeleted && r.payload === "")
2146
+ return { record: plain2, version: value.version, serverUpdatedAt: value.server_updated_at };
2012
2147
  if (!cipherPattern.test(r.payload)) invalid();
2013
2148
  const envelope = JSON.parse(await decrypt(r.payload));
2014
- if (!object(envelope) || envelope.schema !== 1 || envelope.account_id !== accountId || envelope.key_id !== keyId || !validRecord(envelope.record) || !sameMetadata(plain, envelope.record))
2149
+ if (!object(envelope) || envelope.schema !== 1 || envelope.account_id !== accountId || envelope.key_id !== keyId || !validRecord(envelope.record) || !sameMetadata(plain2, envelope.record))
2015
2150
  invalid();
2016
2151
  return {
2017
2152
  record: envelope.record,
@@ -4577,6 +4712,7 @@ async function selectServerSideTools(options) {
4577
4712
  return matchedTools.map(toResponsesFormat);
4578
4713
  }
4579
4714
  export {
4715
+ ANUMA_CONVERSATION_ID,
4580
4716
  BUILT_IN_TOOL_SETS,
4581
4717
  CHUNKS_DISCARDED_ORIGIN,
4582
4718
  ChatStoreError,
@@ -4599,6 +4735,8 @@ export {
4599
4735
  TOOL_RESULT_ORIGIN,
4600
4736
  activatedToolSetNames,
4601
4737
  analyzeStyle,
4738
+ anumaLastReadSortKey,
4739
+ anumaTurnContent,
4602
4740
  applyToolSets,
4603
4741
  attachFileContextToLastUserMessage,
4604
4742
  buildAttachedFilesText,
@@ -4608,6 +4746,7 @@ export {
4608
4746
  clearLazyTitleCache,
4609
4747
  consoleLogger,
4610
4748
  cosineInt8,
4749
+ countUnreadAnumaTurns,
4611
4750
  createRemoteChatStore,
4612
4751
  createServerToolsFilter,
4613
4752
  createStreamingDeAnonymizer,
@@ -4627,6 +4766,7 @@ export {
4627
4766
  deleteApiV1WalletsBindingByAddress,
4628
4767
  dequantizeEmbedding,
4629
4768
  encodeChunkVector,
4769
+ ensureAnumaConversation,
4630
4770
  expandToolSetsAdditive,
4631
4771
  extractReservationReceipts,
4632
4772
  formatFileProcessingNotes,
@@ -4672,6 +4812,7 @@ export {
4672
4812
  isAttachedFilesText,
4673
4813
  isPiiRedactor,
4674
4814
  loadSettings,
4815
+ markAnumaRead,
4675
4816
  noopLogger,
4676
4817
  patchApiV1DeveloperAppsByAppUuid,
4677
4818
  patchApiV1DeveloperAppsByAppUuidUsersByAddress,
@@ -4711,6 +4852,7 @@ export {
4711
4852
  putApiV1AdminPersonasById,
4712
4853
  putApiV1AgentsByIdPreference,
4713
4854
  quantizeEmbedding,
4855
+ readAnumaTurn,
4714
4856
  renderTemplate,
4715
4857
  resolvePiiRedactor,
4716
4858
  sanitizeQuotes,