@anuma/sdk 6.35.0 → 6.37.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
@@ -7534,6 +7534,35 @@ declare function buildAttachedFilesText(fileContext: string): string;
7534
7534
  */
7535
7535
  declare function attachFileContextToLastUserMessage(messages: LlmapiMessage[], fileContext: string): LlmapiMessage[];
7536
7536
 
7537
+ /**
7538
+ * What became of a restaurant booking or cancellation in one turn, read from
7539
+ * the server's own tool result rather than from the model's reply.
7540
+ */
7541
+ type ReservationReceipt = {
7542
+ kind: "booking" | "cancel";
7543
+ /**
7544
+ * `made`: the provider confirmed it. `not_made`: it did not happen.
7545
+ * `already_done`: an earlier call in the conversation had already done it.
7546
+ * `unknown`: the call reached the provider and its outcome is not known.
7547
+ */
7548
+ status: "made" | "not_made" | "already_done" | "unknown";
7549
+ venueName: string;
7550
+ /** As the call sent it, e.g. `2026-10-23`. */
7551
+ day: string;
7552
+ /** As the call sent it, e.g. `9:00 PM`. */
7553
+ time: string;
7554
+ partySize?: number;
7555
+ reservationId?: string;
7556
+ /** Resy page where the user can see the reservation. */
7557
+ resyUrl?: string;
7558
+ /** The restaurant's own cancellation terms, when the booking result carries them. */
7559
+ feeSummary?: string;
7560
+ /** The provider's stated reason, when it did not happen. */
7561
+ reason?: string;
7562
+ };
7563
+ /** One receipt per kind for the turn's booking and cancel calls, holding the last attempt's outcome unless an earlier one was `made` or `unknown`. */
7564
+ declare function extractReservationReceipts(toolCallEvents?: LlmapiToolCallEvent[]): ReservationReceipt[];
7565
+
7537
7566
  /**
7538
7567
  * Value of the `origin` column on a row the SDK synthesised for a turn's tool results (v44, #866).
7539
7568
  *
@@ -8936,4 +8965,4 @@ declare const TASK_TYPE_HEADER = "X-Anuma-Task-Type";
8936
8965
  */
8937
8966
  declare function taskTypeHeader(taskType?: TaskType): Record<string, string>;
8938
8967
 
8939
- 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 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 HandlersExchangeRequest, 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 HandlersRefreshRequest, type HandlersRenewSubscriptionResponse, type HandlersRevokeRequest, 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 HandlersTokenResponse, 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 PostAuthOauthByProviderExchangeData, type PostAuthOauthByProviderExchangeError, type PostAuthOauthByProviderExchangeErrors, type PostAuthOauthByProviderExchangeResponse, type PostAuthOauthByProviderExchangeResponses, type PostAuthOauthByProviderRefreshData, type PostAuthOauthByProviderRefreshError, type PostAuthOauthByProviderRefreshErrors, type PostAuthOauthByProviderRefreshResponse, type PostAuthOauthByProviderRefreshResponses, type PostAuthOauthByProviderRevokeData, type PostAuthOauthByProviderRevokeError, type PostAuthOauthByProviderRevokeErrors, type PostAuthOauthByProviderRevokeResponse, type PostAuthOauthByProviderRevokeResponses, 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 ResponseErrorResponse, type SelectServerSideToolsOptions, 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, createServerToolsFilter, createStreamingDeAnonymizer, decodeChunkVector, decryptConversationTitle, defaultServerToolsFilter, deleteApiV1Account, deleteApiV1AdminAgentsById, deleteApiV1AdminAppsByAppIdApiKeysById, deleteApiV1AdminAppsById, deleteApiV1AdminPersonasById, deleteApiV1AdminTextReset, deleteApiV1DeveloperAppsByAppUuid, deleteApiV1DeveloperAppsByAppUuidApiKeysByKeyId, deleteApiV1DeveloperAppsByAppUuidPrivy, deleteApiV1UserApiKeysByKeyId, deleteApiV1WalletsBindingByAddress, dequantizeEmbedding, encodeChunkVector, expandToolSetsAdditive, 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, 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, postAuthOauthByProviderExchange, postAuthOauthByProviderRefresh, postAuthOauthByProviderRevoke, putApiV1AdminAgentsById, putApiV1AdminAppsByAppIdApiKeysById, putApiV1AdminAppsById, putApiV1AdminPersonasById, putApiV1AgentsByIdPreference, quantizeEmbedding, renderTemplate, resolvePiiRedactor, sanitizeQuotes, selectServerSideTools, setLogger, shouldAnalyzeStyle, taskTypeHeader, toolSetSystemPrompts, withSseKeepalive };
8968
+ 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 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 HandlersExchangeRequest, 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 HandlersRefreshRequest, type HandlersRenewSubscriptionResponse, type HandlersRevokeRequest, 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 HandlersTokenResponse, 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 PostAuthOauthByProviderExchangeData, type PostAuthOauthByProviderExchangeError, type PostAuthOauthByProviderExchangeErrors, type PostAuthOauthByProviderExchangeResponse, type PostAuthOauthByProviderExchangeResponses, type PostAuthOauthByProviderRefreshData, type PostAuthOauthByProviderRefreshError, type PostAuthOauthByProviderRefreshErrors, type PostAuthOauthByProviderRefreshResponse, type PostAuthOauthByProviderRefreshResponses, type PostAuthOauthByProviderRevokeData, type PostAuthOauthByProviderRevokeError, type PostAuthOauthByProviderRevokeErrors, type PostAuthOauthByProviderRevokeResponse, type PostAuthOauthByProviderRevokeResponses, 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 ReservationReceipt, type ResponseErrorResponse, type SelectServerSideToolsOptions, 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, 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, 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, postAuthOauthByProviderExchange, postAuthOauthByProviderRefresh, postAuthOauthByProviderRevoke, putApiV1AdminAgentsById, putApiV1AdminAppsByAppIdApiKeysById, putApiV1AdminAppsById, putApiV1AdminPersonasById, putApiV1AgentsByIdPreference, quantizeEmbedding, renderTemplate, resolvePiiRedactor, sanitizeQuotes, selectServerSideTools, setLogger, shouldAnalyzeStyle, taskTypeHeader, toolSetSystemPrompts, withSseKeepalive };
package/dist/index.mjs CHANGED
@@ -684,8 +684,8 @@ var createClient = (config = {}) => {
684
684
  data = await response[parseAs]();
685
685
  break;
686
686
  case "json": {
687
- const text = await response.text();
688
- data = text ? JSON.parse(text) : {};
687
+ const text2 = await response.text();
688
+ data = text2 ? JSON.parse(text2) : {};
689
689
  break;
690
690
  }
691
691
  case "stream":
@@ -1137,8 +1137,8 @@ var ATTACHED_FILES_OPEN_TAG = "<attached_files>";
1137
1137
  var ATTACHED_FILES_CLOSE_TAG = "</attached_files>";
1138
1138
  var ATTACHED_FILES_PREFIX = `${ATTACHED_FILES_OPEN_TAG}
1139
1139
  The user attached the following file(s) to this message. Their extracted contents are below; when the user refers to "the attached file", "this file" or "the document", they mean these.`;
1140
- function isAttachedFilesText(text) {
1141
- return typeof text === "string" && text.startsWith(ATTACHED_FILES_PREFIX) && text.endsWith(ATTACHED_FILES_CLOSE_TAG);
1140
+ function isAttachedFilesText(text2) {
1141
+ return typeof text2 === "string" && text2.startsWith(ATTACHED_FILES_PREFIX) && text2.endsWith(ATTACHED_FILES_CLOSE_TAG);
1142
1142
  }
1143
1143
  function buildAttachedFilesText(fileContext) {
1144
1144
  return `${ATTACHED_FILES_PREFIX}
@@ -1172,6 +1172,80 @@ function attachFileContextToLastUserMessage(messages, fileContext) {
1172
1172
  return result;
1173
1173
  }
1174
1174
 
1175
+ // src/lib/chat/reservationReceipts.ts
1176
+ var ACTIONS = [
1177
+ {
1178
+ kind: "booking",
1179
+ tool: "anuma_book_restaurant",
1180
+ alreadyDone: /^Tool "[^"]*" failed: ALREADY_BOOKED:/
1181
+ },
1182
+ {
1183
+ kind: "cancel",
1184
+ tool: "anuma_cancel_reservation",
1185
+ alreadyDone: /^Tool "[^"]*" failed: ALREADY_CANCELLED:/
1186
+ }
1187
+ ];
1188
+ var NOT_AN_ATTEMPT = /^Tool "[^"]*" (has already been called|was already called)/;
1189
+ var BOOKING_OUTCOME_UNKNOWN = /^Tool "[^"]*" failed: BOOKING_OUTCOME_UNKNOWN:/;
1190
+ var CANCEL_OUTCOME_UNKNOWN = "CANCEL_OUTCOME_UNKNOWN";
1191
+ function extractReservationReceipts(toolCallEvents) {
1192
+ const latest = /* @__PURE__ */ new Map();
1193
+ for (const event of toolCallEvents ?? []) {
1194
+ const action = ACTIONS.find((a) => event.name?.endsWith(a.tool));
1195
+ const output = event.output ?? "";
1196
+ if (!action || !output || NOT_AN_ATTEMPT.test(output)) continue;
1197
+ const kept = latest.get(action.kind)?.status;
1198
+ if (kept === "made") continue;
1199
+ const receipt = toReceipt(action, event.arguments ?? "", output);
1200
+ if (kept === "unknown" && receipt.status !== "made") continue;
1201
+ latest.set(action.kind, receipt);
1202
+ }
1203
+ return [...latest.values()];
1204
+ }
1205
+ function toReceipt(action, argumentsJson, output) {
1206
+ const args = parseObject(argumentsJson);
1207
+ const result = parseObject(output);
1208
+ return {
1209
+ kind: action.kind,
1210
+ venueName: text(args.venue_name) ?? "",
1211
+ day: text(args.day) ?? "",
1212
+ time: text(args.time) ?? "",
1213
+ partySize: count(args.party_size),
1214
+ reservationId: text(result.reservation_id) ?? text(args.reservation_id),
1215
+ resyUrl: text(result.reservations_url),
1216
+ feeSummary: text(result.fee_summary),
1217
+ ...outcome(action, output, result)
1218
+ };
1219
+ }
1220
+ function outcome(action, output, result) {
1221
+ if (action.alreadyDone.test(output)) return { status: "already_done" };
1222
+ const reason = text(result.error);
1223
+ if (action.kind === "booking") {
1224
+ if (BOOKING_OUTCOME_UNKNOWN.test(output)) return { status: "unknown" };
1225
+ const held = result.success === true || text(result.reservation_id) !== void 0;
1226
+ return held ? { status: "made" } : { status: "not_made", reason };
1227
+ }
1228
+ if (result.error_code === CANCEL_OUTCOME_UNKNOWN) return { status: "unknown", reason };
1229
+ const cancelled = result.success === true && !result.error && !result.error_code;
1230
+ return cancelled ? { status: "made" } : { status: "not_made", reason };
1231
+ }
1232
+ function parseObject(json) {
1233
+ try {
1234
+ const parsed = JSON.parse(json);
1235
+ return parsed && typeof parsed === "object" ? parsed : {};
1236
+ } catch {
1237
+ return {};
1238
+ }
1239
+ }
1240
+ function text(value) {
1241
+ if (typeof value === "number") return String(value);
1242
+ return typeof value === "string" && value ? value : void 0;
1243
+ }
1244
+ function count(value) {
1245
+ const n = typeof value === "string" && value.trim() ? Number(value) : value;
1246
+ return typeof n === "number" && Number.isFinite(n) ? n : void 0;
1247
+ }
1248
+
1175
1249
  // src/lib/tools/toolCatalog.ts
1176
1250
  var TOOL_CATALOG = {
1177
1251
  gmail_search_messages: { label: "Search emails", provider: "gmail", connector: "Gmail" },
@@ -1689,49 +1763,49 @@ function decodeChunkVector(vector, onMalformed) {
1689
1763
  var DEFAULT_CHUNK_SIZE = 400;
1690
1764
  var DEFAULT_CHUNK_OVERLAP = 50;
1691
1765
  var DEFAULT_MIN_CHUNK_SIZE = 50;
1692
- function splitIntoSentences(text) {
1766
+ function splitIntoSentences(text2) {
1693
1767
  const sentenceRegex = /[.!?]+[\s"')}\]]*(?=\s|$)/g;
1694
1768
  const sentences = [];
1695
1769
  let lastIndex = 0;
1696
1770
  let match;
1697
- while ((match = sentenceRegex.exec(text)) !== null) {
1771
+ while ((match = sentenceRegex.exec(text2)) !== null) {
1698
1772
  const endIndex = match.index + match[0].length;
1699
- const sentence = text.slice(lastIndex, endIndex).trim();
1773
+ const sentence = text2.slice(lastIndex, endIndex).trim();
1700
1774
  if (sentence) {
1701
1775
  sentences.push(sentence);
1702
1776
  }
1703
1777
  lastIndex = endIndex;
1704
1778
  }
1705
- const remaining = text.slice(lastIndex).trim();
1779
+ const remaining = text2.slice(lastIndex).trim();
1706
1780
  if (remaining) {
1707
1781
  sentences.push(remaining);
1708
1782
  }
1709
1783
  return sentences;
1710
1784
  }
1711
- function chunkText(text, options) {
1785
+ function chunkText(text2, options) {
1712
1786
  const {
1713
1787
  chunkSize = DEFAULT_CHUNK_SIZE,
1714
1788
  chunkOverlap: requestedOverlap = DEFAULT_CHUNK_OVERLAP,
1715
1789
  minChunkSize = DEFAULT_MIN_CHUNK_SIZE
1716
1790
  } = options ?? {};
1717
1791
  const chunkOverlap = Math.min(requestedOverlap, chunkSize - 1);
1718
- if (text.length <= chunkSize) {
1792
+ if (text2.length <= chunkSize) {
1719
1793
  return [
1720
1794
  {
1721
- text: text.trim(),
1795
+ text: text2.trim(),
1722
1796
  startOffset: 0,
1723
- endOffset: text.length
1797
+ endOffset: text2.length
1724
1798
  }
1725
1799
  ];
1726
1800
  }
1727
- const sentences = splitIntoSentences(text);
1801
+ const sentences = splitIntoSentences(text2);
1728
1802
  const chunks = [];
1729
1803
  let currentChunkSentences = [];
1730
1804
  let currentChunkStart = 0;
1731
1805
  let currentOffset = 0;
1732
1806
  for (let i = 0; i < sentences.length; i++) {
1733
1807
  const sentence = sentences[i];
1734
- let sentenceStart = text.indexOf(sentence, currentOffset);
1808
+ let sentenceStart = text2.indexOf(sentence, currentOffset);
1735
1809
  if (sentenceStart === -1) {
1736
1810
  sentenceStart = currentOffset;
1737
1811
  }
@@ -1778,7 +1852,7 @@ function chunkText(text, options) {
1778
1852
  if (overlapSentences.length > 0) {
1779
1853
  currentChunkSentences = [...overlapSentences, sentence];
1780
1854
  const overlapText = overlapSentences[0];
1781
- const overlapStart = text.lastIndexOf(overlapText, currentOffset);
1855
+ const overlapStart = text2.lastIndexOf(overlapText, currentOffset);
1782
1856
  currentChunkStart = overlapStart === -1 ? sentenceStart : overlapStart;
1783
1857
  } else {
1784
1858
  currentChunkSentences = [sentence];
@@ -1798,18 +1872,18 @@ function chunkText(text, options) {
1798
1872
  chunks.push({
1799
1873
  text: chunkText2,
1800
1874
  startOffset: currentChunkStart,
1801
- endOffset: text.length
1875
+ endOffset: text2.length
1802
1876
  });
1803
1877
  }
1804
1878
  }
1805
1879
  if (chunks.length === 0) {
1806
- const trimmedText = text.trim();
1880
+ const trimmedText = text2.trim();
1807
1881
  if (trimmedText.length > 0) {
1808
1882
  return [
1809
1883
  {
1810
1884
  text: trimmedText,
1811
1885
  startOffset: 0,
1812
- endOffset: text.length
1886
+ endOffset: text2.length
1813
1887
  }
1814
1888
  ];
1815
1889
  }
@@ -1906,16 +1980,16 @@ function embeddingErrorFrom(response) {
1906
1980
  const message = typeof response.error === "object" && response.error && "error" in response.error ? response.error.error : "API embedding failed";
1907
1981
  return new EmbeddingHttpError(message, response.response?.status);
1908
1982
  }
1909
- async function generateEmbedding(text, options) {
1983
+ async function generateEmbedding(text2, options) {
1910
1984
  const total = options.totalTimeoutMs;
1911
- if (total === void 0) return embedOne(text, options, void 0);
1912
- return withDeadline((signal) => embedOne(text, options, signal), total, "embedding");
1985
+ if (total === void 0) return embedOne(text2, options, void 0);
1986
+ return withDeadline((signal) => embedOne(text2, options, signal), total, "embedding");
1913
1987
  }
1914
- async function embedOne(text, options, outer) {
1988
+ async function embedOne(text2, options, outer) {
1915
1989
  const { baseUrl = BASE_URL, model, cache } = options;
1916
1990
  const timeoutMs = options.timeoutMs ?? DEFAULT_EMBEDDING_REQUEST_TIMEOUT_MS;
1917
1991
  if (cache) {
1918
- const cached = cache.get(text);
1992
+ const cached = cache.get(text2);
1919
1993
  if (cached) return Array.from(cached);
1920
1994
  }
1921
1995
  const headers = await resolveAuthHeaders(options, outer);
@@ -1924,7 +1998,7 @@ async function embedOne(text, options, outer) {
1924
1998
  (signal) => postApiV1Embeddings({
1925
1999
  baseUrl,
1926
2000
  body: {
1927
- input: options.maskInput ? options.maskInput(text) : text,
2001
+ input: options.maskInput ? options.maskInput(text2) : text2,
1928
2002
  model: model ?? DEFAULT_API_EMBEDDING_MODEL
1929
2003
  },
1930
2004
  headers,
@@ -1951,7 +2025,7 @@ async function embedOne(text, options, outer) {
1951
2025
  }
1952
2026
  const f32Embedding = Float32Array.from(embedding);
1953
2027
  if (cache) {
1954
- cache.set(text, f32Embedding);
2028
+ cache.set(text2, f32Embedding);
1955
2029
  }
1956
2030
  return Array.from(f32Embedding);
1957
2031
  }
@@ -2156,9 +2230,9 @@ function extractUserMessages(messages, maxCount, documentPattern) {
2156
2230
  }
2157
2231
  return result.reverse();
2158
2232
  }
2159
- function truncateAtWordBoundary(text, maxLength) {
2160
- if (text.length <= maxLength) return text;
2161
- const truncated = text.slice(0, maxLength);
2233
+ function truncateAtWordBoundary(text2, maxLength) {
2234
+ if (text2.length <= maxLength) return text2;
2235
+ const truncated = text2.slice(0, maxLength);
2162
2236
  const lastSpace = truncated.lastIndexOf(" ");
2163
2237
  return lastSpace > maxLength * 0.5 ? truncated.slice(0, lastSpace) : truncated;
2164
2238
  }
@@ -2283,12 +2357,12 @@ function buildSystemPrompt(ctx, options) {
2283
2357
  let prompt = "";
2284
2358
  const activeSections = [];
2285
2359
  for (const section of sections) {
2286
- const text = section.render(ctx);
2287
- if (text === null) continue;
2288
- if (maxLength > 0 && prompt.length + text.length > maxLength) {
2360
+ const text2 = section.render(ctx);
2361
+ if (text2 === null) continue;
2362
+ if (maxLength > 0 && prompt.length + text2.length > maxLength) {
2289
2363
  continue;
2290
2364
  }
2291
- prompt += text;
2365
+ prompt += text2;
2292
2366
  activeSections.push(section.key);
2293
2367
  }
2294
2368
  return { prompt, activeSections };
@@ -2479,10 +2553,10 @@ var PiiRedactor = class {
2479
2553
  const existing = this.valueToPlaceholder.get(normalizedValue);
2480
2554
  if (existing) return existing;
2481
2555
  const existingCount = this.categoryCounters.get(category);
2482
- const count = (existingCount ?? 0) + 1;
2483
- this.categoryCounters.set(category, count);
2556
+ const count2 = (existingCount ?? 0) + 1;
2557
+ this.categoryCounters.set(category, count2);
2484
2558
  if (existingCount === void 0) this.storagePattern = void 0;
2485
- const placeholder = `[${category}_${count}]`;
2559
+ const placeholder = `[${category}_${count2}]`;
2486
2560
  this.valueToPlaceholder.set(normalizedValue, placeholder);
2487
2561
  this.placeholderToValue.set(placeholder, normalizedValue);
2488
2562
  this.storageLookup = null;
@@ -2495,15 +2569,15 @@ var PiiRedactor = class {
2495
2569
  * (sequential, per-pattern) and the async {@link collectRegexSpans} (span)
2496
2570
  * paths so the detection rules live in exactly one place.
2497
2571
  */
2498
- findMatches(text, pattern) {
2572
+ findMatches(text2, pattern) {
2499
2573
  const regex = new RegExp(pattern.regex.source, pattern.regex.flags);
2500
2574
  const found = [];
2501
2575
  let m;
2502
- while ((m = regex.exec(text)) !== null) {
2576
+ while ((m = regex.exec(text2)) !== null) {
2503
2577
  const value = m[0];
2504
2578
  if (pattern.validate && !pattern.validate(value)) continue;
2505
2579
  if (pattern.context) {
2506
- const before = text.slice(Math.max(0, m.index - 40), m.index);
2580
+ const before = text2.slice(Math.max(0, m.index - 40), m.index);
2507
2581
  if (!pattern.context.test(before)) continue;
2508
2582
  }
2509
2583
  found.push({ match: value, index: m.index });
@@ -2519,9 +2593,9 @@ var PiiRedactor = class {
2519
2593
  * earlier patterns, so an earlier (more specific) pattern claims a region
2520
2594
  * before a later one can — placeholders are inert and match no pattern.
2521
2595
  */
2522
- scan(text, makeReplacement) {
2596
+ scan(text2, makeReplacement) {
2523
2597
  const matches = [];
2524
- let redacted = text;
2598
+ let redacted = text2;
2525
2599
  for (const pattern of this.patterns) {
2526
2600
  const found = this.findMatches(redacted, pattern);
2527
2601
  if (found.length === 0) continue;
@@ -2542,8 +2616,8 @@ var PiiRedactor = class {
2542
2616
  * Scan and redact PII from a single text string, using numbered, reversible
2543
2617
  * placeholders ([EMAIL_1], …) tracked on this instance.
2544
2618
  */
2545
- redactText(text) {
2546
- return this.scan(text, (category, value) => this.getPlaceholder(category, value));
2619
+ redactText(text2) {
2620
+ return this.scan(text2, (category, value) => this.getPlaceholder(category, value));
2547
2621
  }
2548
2622
  /**
2549
2623
  * Mask PII with unnumbered, NON-reversible tokens ([EMAIL], [SSN], …) without
@@ -2552,15 +2626,15 @@ var PiiRedactor = class {
2552
2626
  * embeddings endpoint while staying deterministic, so the same content always
2553
2627
  * masks identically and search stays consistent across conversations.
2554
2628
  */
2555
- maskText(text) {
2556
- return this.scan(text, (category) => `[${category}]`).text;
2629
+ maskText(text2) {
2630
+ return this.scan(text2, (category) => `[${category}]`).text;
2557
2631
  }
2558
2632
  /** All regex matches as spans on the ORIGINAL text (priority 0). Uses the
2559
2633
  * same {@link findMatches} guards as the sync scan. */
2560
- collectRegexSpans(text) {
2634
+ collectRegexSpans(text2) {
2561
2635
  const spans = [];
2562
2636
  this.patterns.forEach((pattern, patternIndex) => {
2563
- for (const { match, index } of this.findMatches(text, pattern)) {
2637
+ for (const { match, index } of this.findMatches(text2, pattern)) {
2564
2638
  spans.push({
2565
2639
  start: index,
2566
2640
  end: index + match.length,
@@ -2579,16 +2653,16 @@ var PiiRedactor = class {
2579
2653
  * of "Stripe") from producing a corrupting partial placeholder like
2580
2654
  * `[ORG_1]e`.
2581
2655
  */
2582
- normalizeNerSpans(text, raw) {
2656
+ normalizeNerSpans(text2, raw) {
2583
2657
  if (!Array.isArray(raw)) return [];
2584
2658
  const out = [];
2585
2659
  raw.forEach((s, i) => {
2586
2660
  if (!Number.isFinite(s.start) || !Number.isFinite(s.end)) return;
2587
- let start = Math.max(0, Math.min(Math.trunc(s.start), text.length));
2588
- let end = Math.max(0, Math.min(Math.trunc(s.end), text.length));
2661
+ let start = Math.max(0, Math.min(Math.trunc(s.start), text2.length));
2662
+ let end = Math.max(0, Math.min(Math.trunc(s.end), text2.length));
2589
2663
  if (end <= start) return;
2590
- while (start > 0 && isWordChar(text[start - 1])) start--;
2591
- while (end < text.length && isWordChar(text[end])) end++;
2664
+ while (start > 0 && isWordChar(text2[start - 1])) start--;
2665
+ while (end < text2.length && isWordChar(text2[end])) end++;
2592
2666
  const category = String(s.category ?? "").trim();
2593
2667
  if (!category) return;
2594
2668
  out.push({ start, end, category, priority: 1, order: i });
@@ -2597,10 +2671,10 @@ var PiiRedactor = class {
2597
2671
  }
2598
2672
  /** Run the configured detector defensively: failures degrade to regex-only
2599
2673
  * (fail-open on detection, not on protection) with a one-time warning. */
2600
- async detectNerSpans(text) {
2674
+ async detectNerSpans(text2) {
2601
2675
  if (!this.nerDetector) return [];
2602
2676
  try {
2603
- return this.normalizeNerSpans(text, await this.nerDetector.detect(text));
2677
+ return this.normalizeNerSpans(text2, await this.nerDetector.detect(text2));
2604
2678
  } catch (err) {
2605
2679
  this.warnNerFailure(err);
2606
2680
  return [];
@@ -2633,11 +2707,11 @@ var PiiRedactor = class {
2633
2707
  * in pattern then document order, matching the sync scan's numbering). The
2634
2708
  * string is then EMITTED in document order.
2635
2709
  */
2636
- rebuildSpans(text, spans, makeReplacement) {
2710
+ rebuildSpans(text2, spans, makeReplacement) {
2637
2711
  const placeholderByStart = /* @__PURE__ */ new Map();
2638
2712
  const matches = [];
2639
2713
  for (const s of spans) {
2640
- const value = text.slice(s.start, s.end);
2714
+ const value = text2.slice(s.start, s.end);
2641
2715
  const placeholder = makeReplacement(s.category, value);
2642
2716
  placeholderByStart.set(s.start, placeholder);
2643
2717
  matches.push({ category: s.category, original: value, placeholder });
@@ -2646,16 +2720,16 @@ var PiiRedactor = class {
2646
2720
  let result = "";
2647
2721
  let cursor = 0;
2648
2722
  for (const s of emitOrder) {
2649
- result += text.slice(cursor, s.start) + (placeholderByStart.get(s.start) ?? "");
2723
+ result += text2.slice(cursor, s.start) + (placeholderByStart.get(s.start) ?? "");
2650
2724
  cursor = s.end;
2651
2725
  }
2652
- result += text.slice(cursor);
2726
+ result += text2.slice(cursor);
2653
2727
  return { text: result, matches };
2654
2728
  }
2655
2729
  /** Merge regex + NER spans for `text` into a resolved, non-overlapping set. */
2656
- async detectAllSpans(text) {
2657
- const nerPromise = this.detectNerSpans(text);
2658
- const regexSpans = this.collectRegexSpans(text);
2730
+ async detectAllSpans(text2) {
2731
+ const nerPromise = this.detectNerSpans(text2);
2732
+ const regexSpans = this.collectRegexSpans(text2);
2659
2733
  const ner = await nerPromise;
2660
2734
  return this.resolveOverlaps([...regexSpans, ...ner]);
2661
2735
  }
@@ -2664,11 +2738,11 @@ var PiiRedactor = class {
2664
2738
  * unstructured PII (the configured {@link NerDetector}) with numbered,
2665
2739
  * reversible placeholders. With no detector, identical to `redactText`.
2666
2740
  */
2667
- async redactTextAsync(text) {
2668
- if (!this.nerDetector) return this.redactText(text);
2669
- const spans = await this.detectAllSpans(text);
2741
+ async redactTextAsync(text2) {
2742
+ if (!this.nerDetector) return this.redactText(text2);
2743
+ const spans = await this.detectAllSpans(text2);
2670
2744
  return this.rebuildSpans(
2671
- text,
2745
+ text2,
2672
2746
  spans,
2673
2747
  (category, value) => this.getPlaceholder(category, value)
2674
2748
  );
@@ -2677,10 +2751,10 @@ var PiiRedactor = class {
2677
2751
  * Async counterpart to {@link maskText}: stateless `[CATEGORY]` masking over
2678
2752
  * regex + NER matches. With no detector, identical to `maskText`.
2679
2753
  */
2680
- async maskTextAsync(text) {
2681
- if (!this.nerDetector) return this.maskText(text);
2682
- const spans = await this.detectAllSpans(text);
2683
- return this.rebuildSpans(text, spans, (category) => `[${category}]`).text;
2754
+ async maskTextAsync(text2) {
2755
+ if (!this.nerDetector) return this.maskText(text2);
2756
+ const spans = await this.detectAllSpans(text2);
2757
+ return this.rebuildSpans(text2, spans, (category) => `[${category}]`).text;
2684
2758
  }
2685
2759
  /**
2686
2760
  * Async counterpart to {@link redactMessages}. Text parts are redacted
@@ -2766,9 +2840,9 @@ var PiiRedactor = class {
2766
2840
  * {@link restoreForStorage} instead, which tolerates the mangled echoes the
2767
2841
  * extraction models produce.
2768
2842
  */
2769
- deAnonymize(text) {
2770
- if (!text.includes("[")) return text;
2771
- let restored = text;
2843
+ deAnonymize(text2) {
2844
+ if (!text2.includes("[")) return text2;
2845
+ let restored = text2;
2772
2846
  for (const [placeholder, original] of this.placeholderToValue) {
2773
2847
  if (restored.includes(placeholder)) {
2774
2848
  restored = restored.split(placeholder).join(original);
@@ -2793,15 +2867,15 @@ var PiiRedactor = class {
2793
2867
  * - `unresolved` is derived from the lookup miss during this pass, not from a
2794
2868
  * regex re-scan of the output — so it can't trip over a restored value.
2795
2869
  */
2796
- restoreForStorage(text) {
2870
+ restoreForStorage(text2) {
2797
2871
  if (this.storagePattern === void 0) this.storagePattern = this.buildStoragePattern();
2798
2872
  if (!this.storagePattern || this.placeholderToValue.size === 0) {
2799
- return { text, unresolved: false };
2873
+ return { text: text2, unresolved: false };
2800
2874
  }
2801
2875
  this.storageLookup ?? (this.storageLookup = this.buildStorageLookup());
2802
2876
  const { exact, ci, ciCollisions } = this.storageLookup;
2803
2877
  let unresolved = false;
2804
- const restored = text.replace(
2878
+ const restored = text2.replace(
2805
2879
  this.storagePattern,
2806
2880
  (match, bracketed, bare) => {
2807
2881
  const body = bracketed ?? bare ?? "";
@@ -3720,6 +3794,7 @@ export {
3720
3794
  dequantizeEmbedding,
3721
3795
  encodeChunkVector,
3722
3796
  expandToolSetsAdditive,
3797
+ extractReservationReceipts,
3723
3798
  formatFileProcessingNotes,
3724
3799
  getApiV1AdminApps,
3725
3800
  getApiV1AdminAppsByAppIdApiKeys,