@anuma/sdk 8.0.2 → 8.1.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/expo/index.cjs +228 -5
- package/dist/expo/index.d.mts +113 -2
- package/dist/expo/index.d.ts +113 -2
- package/dist/expo/index.mjs +224 -5
- package/dist/index.cjs +21 -1
- package/dist/index.mjs +21 -1
- package/dist/react/index.cjs +238 -5
- package/dist/react/index.d.mts +117 -2
- package/dist/react/index.d.ts +117 -2
- package/dist/react/index.mjs +234 -5
- package/dist/server/index.cjs +54 -3
- package/dist/server/index.d.mts +6 -1
- package/dist/server/index.d.ts +6 -1
- package/dist/server/index.mjs +54 -3
- package/dist/tools/index.cjs +142 -0
- package/dist/tools/index.d.mts +91 -1
- package/dist/tools/index.d.ts +91 -1
- package/dist/tools/index.mjs +138 -0
- package/dist/tools/selection/index.cjs +25 -3
- package/dist/tools/selection/index.d.mts +1 -1
- package/dist/tools/selection/index.d.ts +1 -1
- package/dist/tools/selection/index.mjs +25 -3
- package/package.json +1 -1
package/dist/react/index.d.ts
CHANGED
|
@@ -9221,7 +9221,7 @@ declare function clearConversationMemoriesOp(ctx: ConversationMemoryOperationsCo
|
|
|
9221
9221
|
* - v48: Added kind, kind_value (encrypted) and level to memory_vault; level is
|
|
9222
9222
|
* backfilled from scope where SQL steps run
|
|
9223
9223
|
*/
|
|
9224
|
-
declare const SDK_SCHEMA_VERSION =
|
|
9224
|
+
declare const SDK_SCHEMA_VERSION = 49;
|
|
9225
9225
|
/**
|
|
9226
9226
|
* Combined WatermelonDB schema for all SDK storage modules.
|
|
9227
9227
|
*
|
|
@@ -10289,6 +10289,7 @@ declare class UserPreference extends Model {
|
|
|
10289
10289
|
description?: string;
|
|
10290
10290
|
models?: string;
|
|
10291
10291
|
personality?: string;
|
|
10292
|
+
externalWallets?: string;
|
|
10292
10293
|
createdAt: number;
|
|
10293
10294
|
updatedAt: number;
|
|
10294
10295
|
}
|
|
@@ -10342,6 +10343,8 @@ interface StoredUserPreference {
|
|
|
10342
10343
|
description?: string;
|
|
10343
10344
|
models?: string;
|
|
10344
10345
|
personality?: string;
|
|
10346
|
+
/** JSON array of the user's saved external wallets, stored as given. */
|
|
10347
|
+
externalWallets?: string;
|
|
10345
10348
|
createdAt: number;
|
|
10346
10349
|
updatedAt: number;
|
|
10347
10350
|
}
|
|
@@ -10355,6 +10358,7 @@ interface CreateUserPreferenceOptions {
|
|
|
10355
10358
|
description?: string;
|
|
10356
10359
|
models?: string;
|
|
10357
10360
|
personality?: string;
|
|
10361
|
+
externalWallets?: string;
|
|
10358
10362
|
}
|
|
10359
10363
|
/**
|
|
10360
10364
|
* Options for updating an existing user preference record
|
|
@@ -10365,6 +10369,7 @@ interface UpdateUserPreferenceOptions {
|
|
|
10365
10369
|
description?: string;
|
|
10366
10370
|
models?: string;
|
|
10367
10371
|
personality?: string;
|
|
10372
|
+
externalWallets?: string;
|
|
10368
10373
|
}
|
|
10369
10374
|
/**
|
|
10370
10375
|
* Profile-only update options
|
|
@@ -13352,6 +13357,26 @@ type ThemeAttr = (typeof THEME_ATTRS)[number];
|
|
|
13352
13357
|
/** Canonical storage path for the slide deck, relative to a conversation. */
|
|
13353
13358
|
declare const SLIDES_FILE_PATH = "slides.jsx";
|
|
13354
13359
|
|
|
13360
|
+
/**
|
|
13361
|
+
* Minimal context interface required by tool factories.
|
|
13362
|
+
* Matches the methods provided by UIInteractionProvider.
|
|
13363
|
+
*/
|
|
13364
|
+
type UIInteractionContext = {
|
|
13365
|
+
createInteraction: (id: string, type: string, data: unknown) => Promise<unknown>;
|
|
13366
|
+
/** Rejects and removes a pending interaction. Optional for older contexts. */
|
|
13367
|
+
cancelInteraction?: (id: string) => void;
|
|
13368
|
+
createDisplayInteraction: (id: string, displayType: string, data: unknown, result: unknown, toolVersion?: number, replacesInteractionId?: string) => void;
|
|
13369
|
+
};
|
|
13370
|
+
/**
|
|
13371
|
+
* Options for context injection, following the same getter pattern
|
|
13372
|
+
* as createGoogleCalendarTool and createDriveTools.
|
|
13373
|
+
*/
|
|
13374
|
+
type CreateUIToolsOptions = {
|
|
13375
|
+
/** Returns the current UIInteractionContext (or null if unavailable) */
|
|
13376
|
+
getContext: () => UIInteractionContext | null;
|
|
13377
|
+
/** Returns the ID of the last message in the conversation (used for anchoring) */
|
|
13378
|
+
getLastMessageId?: () => string | undefined;
|
|
13379
|
+
};
|
|
13355
13380
|
/**
|
|
13356
13381
|
* Migration map for a display tool.
|
|
13357
13382
|
* Keys are "fromVersion->toVersion" strings (e.g. "1->2").
|
|
@@ -13385,6 +13410,96 @@ type DisplayToolMigrations = {
|
|
|
13385
13410
|
*/
|
|
13386
13411
|
declare function migrateDisplayResult(result: unknown, fromVersion: number, toVersion: number, migrations: DisplayToolMigrations): unknown;
|
|
13387
13412
|
|
|
13413
|
+
/** A wallet the user can pay from, as the wallet picker card shows it. */
|
|
13414
|
+
type PaymentWallet = {
|
|
13415
|
+
address: string;
|
|
13416
|
+
chainType: "solana";
|
|
13417
|
+
label?: string;
|
|
13418
|
+
walletName?: string;
|
|
13419
|
+
usdcBalance?: string;
|
|
13420
|
+
builtIn?: boolean;
|
|
13421
|
+
};
|
|
13422
|
+
/** What the wallet picker returns to the model. */
|
|
13423
|
+
type SelectPaymentWalletResult = {
|
|
13424
|
+
confirmed: true;
|
|
13425
|
+
offer_id: string;
|
|
13426
|
+
funding_wallet: string;
|
|
13427
|
+
} | {
|
|
13428
|
+
confirmed: false;
|
|
13429
|
+
} | {
|
|
13430
|
+
cancelled: true;
|
|
13431
|
+
} | {
|
|
13432
|
+
error_code: "wallets_unavailable";
|
|
13433
|
+
retryable: true;
|
|
13434
|
+
};
|
|
13435
|
+
/** One passenger as the payment card collects it. */
|
|
13436
|
+
type WalletPaymentPassenger = Record<string, unknown>;
|
|
13437
|
+
/** What the caller's `pay` function receives once the user has filled in the payment card. */
|
|
13438
|
+
type WalletPaymentRequest = {
|
|
13439
|
+
provider: string;
|
|
13440
|
+
reference: string;
|
|
13441
|
+
passengers: WalletPaymentPassenger[];
|
|
13442
|
+
};
|
|
13443
|
+
/** What the caller's `pay` function resolves with. */
|
|
13444
|
+
type WalletPaymentOutcome = {
|
|
13445
|
+
paid: true;
|
|
13446
|
+
provider: string;
|
|
13447
|
+
reference: string;
|
|
13448
|
+
status: string;
|
|
13449
|
+
} | {
|
|
13450
|
+
paid: false;
|
|
13451
|
+
error_code: string;
|
|
13452
|
+
retryable: boolean;
|
|
13453
|
+
};
|
|
13454
|
+
/** What the payment tool returns to the model. */
|
|
13455
|
+
type WalletPaymentResult = WalletPaymentOutcome | {
|
|
13456
|
+
cancelled: true;
|
|
13457
|
+
};
|
|
13458
|
+
/** Options for {@link createSelectPaymentWalletTool}. */
|
|
13459
|
+
type CreateSelectPaymentWalletToolOptions = CreateUIToolsOptions & {
|
|
13460
|
+
listWallets: () => Promise<PaymentWallet[]>;
|
|
13461
|
+
};
|
|
13462
|
+
/** Options for {@link createWalletPaymentTool}. */
|
|
13463
|
+
type CreateWalletPaymentToolOptions = CreateUIToolsOptions & {
|
|
13464
|
+
/** Pays the booking: if `signal` fires before submitting, stop there; if it fires after submitting, show the user the real outcome, because the tool result will read cancelled. */
|
|
13465
|
+
pay: (request: WalletPaymentRequest, signal?: AbortSignal) => Promise<WalletPaymentOutcome>;
|
|
13466
|
+
};
|
|
13467
|
+
/**
|
|
13468
|
+
* Create the select_payment_wallet tool, which shows the user's wallets for a flight offer and returns the one they chose.
|
|
13469
|
+
*
|
|
13470
|
+
* @example
|
|
13471
|
+
* ```typescript
|
|
13472
|
+
* import { createSelectPaymentWalletTool } from "@anuma/sdk/tools";
|
|
13473
|
+
*
|
|
13474
|
+
* const selectWalletTool = createSelectPaymentWalletTool({
|
|
13475
|
+
* getContext: () => uiInteraction,
|
|
13476
|
+
* getLastMessageId: () => lastMsgId,
|
|
13477
|
+
* listWallets: async () => wallets,
|
|
13478
|
+
* });
|
|
13479
|
+
* ```
|
|
13480
|
+
*/
|
|
13481
|
+
declare function createSelectPaymentWalletTool(options: CreateSelectPaymentWalletToolOptions): ToolConfig;
|
|
13482
|
+
/**
|
|
13483
|
+
* Create the prompt_wallet_payment tool, which collects the passengers on a card and then pays the booking through the caller's `pay` function.
|
|
13484
|
+
*
|
|
13485
|
+
* @example
|
|
13486
|
+
* ```typescript
|
|
13487
|
+
* import { createWalletPaymentTool } from "@anuma/sdk/tools";
|
|
13488
|
+
*
|
|
13489
|
+
* const paymentTool = createWalletPaymentTool({
|
|
13490
|
+
* getContext: () => uiInteraction,
|
|
13491
|
+
* getLastMessageId: () => lastMsgId,
|
|
13492
|
+
* pay: (request, signal) => payFromWallet(request, signal),
|
|
13493
|
+
* });
|
|
13494
|
+
* ```
|
|
13495
|
+
*/
|
|
13496
|
+
declare function createWalletPaymentTool(options: CreateWalletPaymentToolOptions): ToolConfig;
|
|
13497
|
+
|
|
13498
|
+
/** Name of the client tool that shows the wallet picker card for a flight payment. */
|
|
13499
|
+
declare const SELECT_PAYMENT_WALLET_TOOL_NAME = "select_payment_wallet";
|
|
13500
|
+
/** Name of the client tool that collects passengers and pays a booking from the chosen wallet. */
|
|
13501
|
+
declare const WALLET_PAYMENT_TOOL_NAME = "prompt_wallet_payment";
|
|
13502
|
+
|
|
13388
13503
|
/**
|
|
13389
13504
|
* Anuma JSX runtime — React components for the `<Anuma.*>` primitives.
|
|
13390
13505
|
*
|
|
@@ -15626,4 +15741,4 @@ type UseWalletBindingResult = {
|
|
|
15626
15741
|
*/
|
|
15627
15742
|
declare function useWalletBinding(options?: UseWalletBindingOptions): UseWalletBindingResult;
|
|
15628
15743
|
|
|
15629
|
-
export { Anuma, type AnumaChild, AnumaJsxError, type AnumaNode, AnumaShadowIsolationProvider, type AnumaShadowIsolationProviderProps, type AnumaTheme, AnumaThemeProvider, type AnumaThemeProviderProps, AppFile as AppFileModel, type AppFileOperationsContext, type AttrValue, type AutoExtractMessage, type AutoExtractor, DEFAULT_BACKUP_FOLDER as BACKUP_ICLOUD_FOLDER, BUILT_IN_TOOL_SETS, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, BlobUrlManager, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, ChartCard, type ChartCardProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChatStorageAdapter, type ChatStorageObservable, type ChunkSearchResult, type ChunkSearchStats, type ChunkVectorCache, type ChunkingOptions, type CircleProps, type ClientToolsFilterFn, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type ConversationQueryOptions, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateEntityOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateSavedToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_BACKUP_FOLDER as DEFAULT_ICLOUD_BACKUP_FOLDER, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DeckProps, type DisplayToolMigrations, type DurableAutoExtractorOptions, ENTITY_FANOUT, ENTITY_KINDS, type EmbeddedWalletSignerFn, type EmbeddingRepairOptions, type EmbeddingRepairResult, EncryptionKeyMissingError, type EncryptionKeyVersion, type EntityInput, type EntityKind, Entity as EntityModel, type EntityOperationsContext, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionMessageSource, type ExtractionSourceMessage, type ExtractionSourceStatus, type ExtractionTimings, FILE_PLACEHOLDER_PREFIX, FILE_PLACEHOLDER_REGEX, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, type GroupProps, HARD_DELETE_WINDOW_MS, type ICloudAuthContextValue, ICloudAuthProvider, type ICloudAuthProviderProps, type ICloudExportResult, type ICloudImportResult, INFERENCE_ID_HEADER, INTERNAL_FLOW_MARKER, type IconProps, type ImageProps, type InjectionClassifierOptions, type InjectionReason, type InteractionType, type KnownTag, type LazyStoredConversation, type LineProps, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type MemoryDecay, type MemoryDecaySweeperOptions, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, MemoryEntity as MemoryEntityModel, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageChunk, type MessageFeedback, type MessageOrigin, type MessageSkeleton, type ModelLoadProgress, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type OCRFile, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, type PdfExportOptions, type PdfExportProgress, type PdfExportStage, type PdfFile, PdfProcessor, type PendingInteraction, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PhoneCallPollingOptions, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, type ProgressCallback, Project, type ProjectOperationsContext, type PromptPreProcessor, type PromptPreProcessorContext, type ProviderAuthState, type ProviderBackupState, ProviderStreamError, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, R2_DEFAULT_TTL_MS, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RectProps, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, SLIDES_FILE_PATH, SLIDE_CANVAS_HEIGHT, SLIDE_CANVAS_WIDTH, STREAM_RESUMABLE_HEADER, SavedTool as SavedToolModel, type SavedToolOperationsContext, type SavedToolParameter, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenProps, type ScreenResult, type ScreenedCandidate, type SearchMessagesOptions, type SearchSource, type SelectServerToolsForPromptOptions, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type ServerTool, type ServerToolsFilter, type ServerToolsFilterFn, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type SignMessageOptions, type SlideProps, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredAppFile, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredEntity, type StoredFileWithContext, type StoredMedia, Media as StoredMediaModel, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type StoredProject, type StoredSavedTool, type StoredTopic, type StoredUserPreference, UserPreference as StoredUserPreferenceModel, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, THEME_ATTRS, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type TextProps, type ThemeAttr, type ToolCallArgumentsDeltaEvent, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, type TopicSkipReason, type TopicSource, type TranscriptionResult, type TurnCompleteEvent, type TurnSkippedEvent, type UIInteractionContextValue, UIInteractionProvider, type UIInteractionProviderProps, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateSavedToolOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseBackupOptions, type UseBackupResult, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseEncryptionResult, type UseExportPdfResult, type UseFilesOptions, type UseFilesResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseModelsResult, type UseOCRResult, type UsePdfResult, type UsePhoneCallsOptions, type UsePhoneCallsResult, type UseProjectsOptions, type UseProjectsResult, type UseSettingsOptions, type UseSettingsResult, type UseSubscriptionOptions, type UseSubscriptionResult, type UseToolsOptions, type UseToolsResult, type UseVoiceOptions, type UseVoiceResult, type UseWalletBindingOptions, type UseWalletBindingResult, VAULT_SIZE_HOP_CAP, type VaultCandidateKey, type VaultEmbeddingCache, type VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, type VoiceRecording, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, type WriteFailureReason, ZipProcessor, type ZipProcessorOptions, addConversationMemoriesOp, appFileToStored, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryEntityUserIdsOp, backfillMemoryTopicsOp, buildAttachedFilesText, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearConversationMemoriesOp, clearEncryptionKey, clearICloudAuth, clearKeyPair, clearLazyTitleCache, clearMemoryTopicsOverrideOp, clearModelsCache, clearNotionToken, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createGitHubTools, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createSavedToolOp, createServerToolsFilter, createStockPricePreProcessor, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, decryptMessageEmbeddingFields, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteMessageOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, encryptToolCallEventsOp, ensureDefaultFoldersOp, expandToolSetsAdditive, exportElementToPdf, exportMarkdownToPdf, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractFileIds, extractMCPImageUrls, extractReservationReceipts, fileExists, findById, findMatchingTools, findParentOfId, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllSavedToolsOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAndClearNotionPendingMessage, getAndClearNotionReturnUrl, getAppFileMapOp, getAppFileOp, getAppFilesOp, getAudioOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getEntitiesByMemoryIdsOp, getId, getImagesOp, getLogger, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesByEntityNamesOp, getMemoriesNeedingTopicExtractionOp, getNotionAccessToken, getNotionMCPUrl, getNumberAttr, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getSavedToolByIdOp, getServerTools, getStringAttr, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserUploadedMediaOp, getValidNotionToken, getVaultCandidateKeysOp, getVaultEmbeddingsByIdsOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, getVideosOp, handleNotionCallback, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasICloudCredentials, hasKeyPair, hasNotionCredentials, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, insertAfterId, insertChild, isAnumaTag, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isRerankerAvailable, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, maskScopedEmbeddingCache, mediaToStored, memoryCipher, migrateDisplayResult, migrateMemoriesToRemote, migrateNotionClientRegistration, migrateNotionToken, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseJsx, parseMedia, preEmbedVaultMemories, preprocessFiles, previewToolSelection, primaryTopic, projectToStored, putAppFileOp, quantizeEmbedding, queueManager, rankProfileCandidates, readEncryptedFile, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionToken, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, removeById, renderAnumaJsx, renderAnumaTree, renderElementToCanvas, replaceById, replaceMemoryEntitiesGuardedOp, requestEncryptionKey, requestKeyPair, resolveFilePlaceholders, resolveThemeColor, restoreVaultMemoryOp, resumeStream, retain, revokeNotionAccess, savedToolToStored, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, sealLegacyMessageEmbeddingsOp, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serializeJsx, setLogger, setMemoryEntitiesOp, setMemoryVisibilityOp, settingsStorageSchema, shouldChunkMessage, shouldRecallMemory, shouldRefreshTools, stampTopicsExtractedAtOp, startNotionAuth, storeNotionPendingMessage, storeNotionReturnUrl, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateAttrs, updateConversationProjectOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageFeedbackOp, updateProjectNameOp, updateProjectOp, updateSavedToolOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, useAnumaTheme, useBackup, useBackupAuth, useChat, useChatStorage, useCredits, useDatabaseManager, useEncryption, useExportPdf, useFiles, useICloudAuth, useICloudBackup, useModels, useOCR, usePdf, usePhoneCalls, useProjects, useSettings, useSubscription, useTools, useUIInteraction, useVoice, useWalletBinding, userPreferencesStorageSchema, verifyMemoriesForPublish, walk, webPlatformStorage, withActiveToolSetServerTools, withInternalFlowMarker, writeEncryptedFile };
|
|
15744
|
+
export { Anuma, type AnumaChild, AnumaJsxError, type AnumaNode, AnumaShadowIsolationProvider, type AnumaShadowIsolationProviderProps, type AnumaTheme, AnumaThemeProvider, type AnumaThemeProviderProps, AppFile as AppFileModel, type AppFileOperationsContext, type AttrValue, type AutoExtractMessage, type AutoExtractor, DEFAULT_BACKUP_FOLDER as BACKUP_ICLOUD_FOLDER, BUILT_IN_TOOL_SETS, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, BlobUrlManager, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, ChartCard, type ChartCardProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChatStorageAdapter, type ChatStorageObservable, type ChunkSearchResult, type ChunkSearchStats, type ChunkVectorCache, type ChunkingOptions, type CircleProps, type ClientToolsFilterFn, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type ConversationQueryOptions, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateEntityOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateSavedToolOptions, type CreateSelectPaymentWalletToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CreateWalletPaymentToolOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_BACKUP_FOLDER as DEFAULT_ICLOUD_BACKUP_FOLDER, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DeckProps, type DisplayToolMigrations, type DurableAutoExtractorOptions, ENTITY_FANOUT, ENTITY_KINDS, type EmbeddedWalletSignerFn, type EmbeddingRepairOptions, type EmbeddingRepairResult, EncryptionKeyMissingError, type EncryptionKeyVersion, type EntityInput, type EntityKind, Entity as EntityModel, type EntityOperationsContext, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionMessageSource, type ExtractionSourceMessage, type ExtractionSourceStatus, type ExtractionTimings, FILE_PLACEHOLDER_PREFIX, FILE_PLACEHOLDER_REGEX, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, type GroupProps, HARD_DELETE_WINDOW_MS, type ICloudAuthContextValue, ICloudAuthProvider, type ICloudAuthProviderProps, type ICloudExportResult, type ICloudImportResult, INFERENCE_ID_HEADER, INTERNAL_FLOW_MARKER, type IconProps, type ImageProps, type InjectionClassifierOptions, type InjectionReason, type InteractionType, type KnownTag, type LazyStoredConversation, type LineProps, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type MemoryDecay, type MemoryDecaySweeperOptions, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, MemoryEntity as MemoryEntityModel, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageChunk, type MessageFeedback, type MessageOrigin, type MessageSkeleton, type ModelLoadProgress, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type OCRFile, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, type PaymentWallet, type PdfExportOptions, type PdfExportProgress, type PdfExportStage, type PdfFile, PdfProcessor, type PendingInteraction, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PhoneCallPollingOptions, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, type ProgressCallback, Project, type ProjectOperationsContext, type PromptPreProcessor, type PromptPreProcessorContext, type ProviderAuthState, type ProviderBackupState, ProviderStreamError, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, R2_DEFAULT_TTL_MS, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RectProps, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SELECT_PAYMENT_WALLET_TOOL_NAME, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, SLIDES_FILE_PATH, SLIDE_CANVAS_HEIGHT, SLIDE_CANVAS_WIDTH, STREAM_RESUMABLE_HEADER, SavedTool as SavedToolModel, type SavedToolOperationsContext, type SavedToolParameter, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenProps, type ScreenResult, type ScreenedCandidate, type SearchMessagesOptions, type SearchSource, type SelectPaymentWalletResult, type SelectServerToolsForPromptOptions, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type ServerTool, type ServerToolsFilter, type ServerToolsFilterFn, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type SignMessageOptions, type SlideProps, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredAppFile, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredEntity, type StoredFileWithContext, type StoredMedia, Media as StoredMediaModel, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type StoredProject, type StoredSavedTool, type StoredTopic, type StoredUserPreference, UserPreference as StoredUserPreferenceModel, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, THEME_ATTRS, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type TextProps, type ThemeAttr, type ToolCallArgumentsDeltaEvent, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, type TopicSkipReason, type TopicSource, type TranscriptionResult, type TurnCompleteEvent, type TurnSkippedEvent, type UIInteractionContextValue, UIInteractionProvider, type UIInteractionProviderProps, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateSavedToolOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseBackupOptions, type UseBackupResult, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseEncryptionResult, type UseExportPdfResult, type UseFilesOptions, type UseFilesResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseModelsResult, type UseOCRResult, type UsePdfResult, type UsePhoneCallsOptions, type UsePhoneCallsResult, type UseProjectsOptions, type UseProjectsResult, type UseSettingsOptions, type UseSettingsResult, type UseSubscriptionOptions, type UseSubscriptionResult, type UseToolsOptions, type UseToolsResult, type UseVoiceOptions, type UseVoiceResult, type UseWalletBindingOptions, type UseWalletBindingResult, VAULT_SIZE_HOP_CAP, type VaultCandidateKey, type VaultEmbeddingCache, type VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, type VoiceRecording, WALLET_PAYMENT_TOOL_NAME, type WalletPaymentOutcome, type WalletPaymentPassenger, type WalletPaymentRequest, type WalletPaymentResult, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, type WriteFailureReason, ZipProcessor, type ZipProcessorOptions, addConversationMemoriesOp, appFileToStored, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryEntityUserIdsOp, backfillMemoryTopicsOp, buildAttachedFilesText, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearConversationMemoriesOp, clearEncryptionKey, clearICloudAuth, clearKeyPair, clearLazyTitleCache, clearMemoryTopicsOverrideOp, clearModelsCache, clearNotionToken, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createGitHubTools, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createSavedToolOp, createSelectPaymentWalletTool, createServerToolsFilter, createStockPricePreProcessor, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWalletPaymentTool, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, decryptMessageEmbeddingFields, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteMessageOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, encryptToolCallEventsOp, ensureDefaultFoldersOp, expandToolSetsAdditive, exportElementToPdf, exportMarkdownToPdf, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractFileIds, extractMCPImageUrls, extractReservationReceipts, fileExists, findById, findMatchingTools, findParentOfId, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllSavedToolsOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAndClearNotionPendingMessage, getAndClearNotionReturnUrl, getAppFileMapOp, getAppFileOp, getAppFilesOp, getAudioOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getEntitiesByMemoryIdsOp, getId, getImagesOp, getLogger, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesByEntityNamesOp, getMemoriesNeedingTopicExtractionOp, getNotionAccessToken, getNotionMCPUrl, getNumberAttr, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getSavedToolByIdOp, getServerTools, getStringAttr, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserUploadedMediaOp, getValidNotionToken, getVaultCandidateKeysOp, getVaultEmbeddingsByIdsOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, getVideosOp, handleNotionCallback, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasICloudCredentials, hasKeyPair, hasNotionCredentials, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, insertAfterId, insertChild, isAnumaTag, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isRerankerAvailable, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, maskScopedEmbeddingCache, mediaToStored, memoryCipher, migrateDisplayResult, migrateMemoriesToRemote, migrateNotionClientRegistration, migrateNotionToken, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseJsx, parseMedia, preEmbedVaultMemories, preprocessFiles, previewToolSelection, primaryTopic, projectToStored, putAppFileOp, quantizeEmbedding, queueManager, rankProfileCandidates, readEncryptedFile, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionToken, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, removeById, renderAnumaJsx, renderAnumaTree, renderElementToCanvas, replaceById, replaceMemoryEntitiesGuardedOp, requestEncryptionKey, requestKeyPair, resolveFilePlaceholders, resolveThemeColor, restoreVaultMemoryOp, resumeStream, retain, revokeNotionAccess, savedToolToStored, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, sealLegacyMessageEmbeddingsOp, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serializeJsx, setLogger, setMemoryEntitiesOp, setMemoryVisibilityOp, settingsStorageSchema, shouldChunkMessage, shouldRecallMemory, shouldRefreshTools, stampTopicsExtractedAtOp, startNotionAuth, storeNotionPendingMessage, storeNotionReturnUrl, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateAttrs, updateConversationProjectOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageFeedbackOp, updateProjectNameOp, updateProjectOp, updateSavedToolOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, useAnumaTheme, useBackup, useBackupAuth, useChat, useChatStorage, useCredits, useDatabaseManager, useEncryption, useExportPdf, useFiles, useICloudAuth, useICloudBackup, useModels, useOCR, usePdf, usePhoneCalls, useProjects, useSettings, useSubscription, useTools, useUIInteraction, useVoice, useWalletBinding, userPreferencesStorageSchema, verifyMemoriesForPublish, walk, webPlatformStorage, withActiveToolSetServerTools, withInternalFlowMarker, writeEncryptedFile };
|
package/dist/react/index.mjs
CHANGED
|
@@ -5468,6 +5468,17 @@ function missingConfirmFields(action, parameters) {
|
|
|
5468
5468
|
return requirement.fields.filter((field10) => !shown.has(field10));
|
|
5469
5469
|
}
|
|
5470
5470
|
|
|
5471
|
+
// src/tools/walletPaymentConstants.ts
|
|
5472
|
+
var SELECT_PAYMENT_WALLET_TOOL_NAME = "select_payment_wallet";
|
|
5473
|
+
var WALLET_PAYMENT_TOOL_NAME = "prompt_wallet_payment";
|
|
5474
|
+
var FLIGHT_BOOK_TOOL_SET = "flight-book";
|
|
5475
|
+
var FLIGHT_SERVER_TOOL_NAMES = [
|
|
5476
|
+
"AnumaPaymentsMCP-anuma_search_flights",
|
|
5477
|
+
"AnumaPaymentsMCP-anuma_flight_offer_details",
|
|
5478
|
+
"AnumaPaymentsMCP-anuma_create_flight_intent",
|
|
5479
|
+
"AnumaPaymentsMCP-anuma_get_flight_booking"
|
|
5480
|
+
];
|
|
5481
|
+
|
|
5471
5482
|
// src/lib/storage/mcpImages.ts
|
|
5472
5483
|
var IMAGE_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
5473
5484
|
"AnumaMediaMCP-anuma_create_image",
|
|
@@ -6240,7 +6251,8 @@ var BUILT_IN_TOOL_SETS = [
|
|
|
6240
6251
|
"AnumaPaymentsMCP-anuma_cancel_reservation"
|
|
6241
6252
|
],
|
|
6242
6253
|
anchors: []
|
|
6243
|
-
}
|
|
6254
|
+
},
|
|
6255
|
+
{ name: FLIGHT_BOOK_TOOL_SET, members: [...FLIGHT_SERVER_TOOL_NAMES], anchors: [] }
|
|
6244
6256
|
];
|
|
6245
6257
|
var CONFIRMED_ACTION_TOOL_SETS = /* @__PURE__ */ new Map([
|
|
6246
6258
|
["book_restaurant", "restaurant-book"],
|
|
@@ -6372,6 +6384,16 @@ var SERVER_TOOL_DEPENDENCY_SETS = [
|
|
|
6372
6384
|
members: ["AnumaPaymentsMCP-anuma_list_reservations"],
|
|
6373
6385
|
anchors: ["AnumaPaymentsMCP-anuma_cancel_reservation"],
|
|
6374
6386
|
anchorMinSimilarity: 0.5
|
|
6387
|
+
},
|
|
6388
|
+
{
|
|
6389
|
+
name: "flight-book-lookup",
|
|
6390
|
+
members: [
|
|
6391
|
+
"AnumaPaymentsMCP-anuma_flight_offer_details",
|
|
6392
|
+
"AnumaPaymentsMCP-anuma_create_flight_intent",
|
|
6393
|
+
"AnumaPaymentsMCP-anuma_get_flight_booking"
|
|
6394
|
+
],
|
|
6395
|
+
anchors: ["AnumaPaymentsMCP-anuma_search_flights"],
|
|
6396
|
+
anchorMinSimilarity: 0.5
|
|
6375
6397
|
}
|
|
6376
6398
|
];
|
|
6377
6399
|
var defaultServerToolsFilter = createServerToolsFilter({
|
|
@@ -8681,7 +8703,14 @@ function getToolName(tool) {
|
|
|
8681
8703
|
function toolsAfterConfirmation(apiTools, executionResults) {
|
|
8682
8704
|
const members = /* @__PURE__ */ new Set();
|
|
8683
8705
|
let keepConfirm = false;
|
|
8706
|
+
let keepPaymentTools = false;
|
|
8684
8707
|
for (const r of executionResults) {
|
|
8708
|
+
if (r.name === SELECT_PAYMENT_WALLET_TOOL_NAME && r.result?.confirmed === true) {
|
|
8709
|
+
const flightSet = BUILT_IN_TOOL_SETS.find((s) => s.name === FLIGHT_BOOK_TOOL_SET);
|
|
8710
|
+
for (const member of flightSet?.members ?? []) members.add(member);
|
|
8711
|
+
keepPaymentTools = true;
|
|
8712
|
+
continue;
|
|
8713
|
+
}
|
|
8685
8714
|
if (r.name !== CONFIRM_TOOL_NAME) continue;
|
|
8686
8715
|
const answer = r.result;
|
|
8687
8716
|
if (answer?.confirmed !== true || typeof answer.action !== "string") continue;
|
|
@@ -8693,7 +8722,7 @@ function toolsAfterConfirmation(apiTools, executionResults) {
|
|
|
8693
8722
|
if (!apiTools.some((t) => members.has(getToolName(t) ?? ""))) return void 0;
|
|
8694
8723
|
return apiTools.filter((t) => {
|
|
8695
8724
|
const name = getToolName(t) ?? "";
|
|
8696
|
-
return members.has(name) || name === TOOL_SEARCH_TOOL_NAME || keepConfirm && name === CONFIRM_TOOL_NAME;
|
|
8725
|
+
return members.has(name) || name === TOOL_SEARCH_TOOL_NAME || keepConfirm && name === CONFIRM_TOOL_NAME || keepPaymentTools && (name === SELECT_PAYMENT_WALLET_TOOL_NAME || name === WALLET_PAYMENT_TOOL_NAME);
|
|
8697
8726
|
});
|
|
8698
8727
|
}
|
|
8699
8728
|
var STREAM_RESUMABLE_HEADER = "X-Stream-Resumable";
|
|
@@ -11420,6 +11449,9 @@ __decorateClass([
|
|
|
11420
11449
|
__decorateClass([
|
|
11421
11450
|
text11("personality")
|
|
11422
11451
|
], UserPreference.prototype, "personality", 2);
|
|
11452
|
+
__decorateClass([
|
|
11453
|
+
text11("external_wallets")
|
|
11454
|
+
], UserPreference.prototype, "externalWallets", 2);
|
|
11423
11455
|
__decorateClass([
|
|
11424
11456
|
field8("created_at")
|
|
11425
11457
|
], UserPreference.prototype, "createdAt", 2);
|
|
@@ -11457,7 +11489,7 @@ __decorateClass([
|
|
|
11457
11489
|
], VaultFolder.prototype, "context", 2);
|
|
11458
11490
|
|
|
11459
11491
|
// src/lib/db/schema.ts
|
|
11460
|
-
var SDK_SCHEMA_VERSION =
|
|
11492
|
+
var SDK_SCHEMA_VERSION = 49;
|
|
11461
11493
|
var sdkSchema = appSchema2({
|
|
11462
11494
|
version: SDK_SCHEMA_VERSION,
|
|
11463
11495
|
tables: [
|
|
@@ -11543,6 +11575,7 @@ var sdkSchema = appSchema2({
|
|
|
11543
11575
|
{ name: "description", type: "string", isOptional: true },
|
|
11544
11576
|
{ name: "models", type: "string", isOptional: true },
|
|
11545
11577
|
{ name: "personality", type: "string", isOptional: true },
|
|
11578
|
+
{ name: "external_wallets", type: "string", isOptional: true },
|
|
11546
11579
|
{ name: "created_at", type: "number" },
|
|
11547
11580
|
{ name: "updated_at", type: "number" }
|
|
11548
11581
|
]
|
|
@@ -12247,6 +12280,15 @@ var sdkMigrations = schemaMigrations2({
|
|
|
12247
12280
|
"UPDATE memory_vault SET level = CASE WHEN scope IN ('shared', 'public') THEN 'matching' ELSE 'private' END WHERE level IS NULL;"
|
|
12248
12281
|
)
|
|
12249
12282
|
]
|
|
12283
|
+
},
|
|
12284
|
+
{
|
|
12285
|
+
toVersion: 49,
|
|
12286
|
+
steps: [
|
|
12287
|
+
addColumns2({
|
|
12288
|
+
table: "userPreferences",
|
|
12289
|
+
columns: [{ name: "external_wallets", type: "string", isOptional: true }]
|
|
12290
|
+
})
|
|
12291
|
+
]
|
|
12250
12292
|
}
|
|
12251
12293
|
]
|
|
12252
12294
|
});
|
|
@@ -15425,6 +15467,7 @@ function userPreferenceToStored(preference) {
|
|
|
15425
15467
|
description: preference.description,
|
|
15426
15468
|
models: preference.models,
|
|
15427
15469
|
personality: preference.personality,
|
|
15470
|
+
externalWallets: preference.externalWallets,
|
|
15428
15471
|
createdAt: preference.createdAt,
|
|
15429
15472
|
updatedAt: preference.updatedAt
|
|
15430
15473
|
};
|
|
@@ -15443,6 +15486,7 @@ async function createUserPreferenceOp(ctx, opts) {
|
|
|
15443
15486
|
if (opts.description) pref._setRaw("description", opts.description);
|
|
15444
15487
|
if (opts.models) pref._setRaw("models", opts.models);
|
|
15445
15488
|
if (opts.personality) pref._setRaw("personality", opts.personality);
|
|
15489
|
+
if (opts.externalWallets) pref._setRaw("external_wallets", opts.externalWallets);
|
|
15446
15490
|
pref._setRaw("created_at", now);
|
|
15447
15491
|
pref._setRaw("updated_at", now);
|
|
15448
15492
|
});
|
|
@@ -15470,6 +15514,9 @@ async function updateUserPreferenceOp(ctx, walletAddress, opts) {
|
|
|
15470
15514
|
if (opts.personality !== void 0) {
|
|
15471
15515
|
pref._setRaw("personality", opts.personality || null);
|
|
15472
15516
|
}
|
|
15517
|
+
if (opts.externalWallets !== void 0) {
|
|
15518
|
+
pref._setRaw("external_wallets", opts.externalWallets || null);
|
|
15519
|
+
}
|
|
15473
15520
|
pref._setRaw("updated_at", Date.now());
|
|
15474
15521
|
});
|
|
15475
15522
|
});
|
|
@@ -15497,6 +15544,9 @@ async function setUserPreferenceOp(ctx, walletAddress, opts) {
|
|
|
15497
15544
|
if (opts.personality !== void 0) {
|
|
15498
15545
|
pref._setRaw("personality", opts.personality || null);
|
|
15499
15546
|
}
|
|
15547
|
+
if (opts.externalWallets !== void 0) {
|
|
15548
|
+
pref._setRaw("external_wallets", opts.externalWallets || null);
|
|
15549
|
+
}
|
|
15500
15550
|
pref._setRaw("updated_at", now);
|
|
15501
15551
|
});
|
|
15502
15552
|
return preference;
|
|
@@ -15508,6 +15558,7 @@ async function setUserPreferenceOp(ctx, walletAddress, opts) {
|
|
|
15508
15558
|
if (opts.description) pref._setRaw("description", opts.description);
|
|
15509
15559
|
if (opts.models) pref._setRaw("models", opts.models);
|
|
15510
15560
|
if (opts.personality) pref._setRaw("personality", opts.personality);
|
|
15561
|
+
if (opts.externalWallets) pref._setRaw("external_wallets", opts.externalWallets);
|
|
15511
15562
|
pref._setRaw("created_at", now);
|
|
15512
15563
|
pref._setRaw("updated_at", now);
|
|
15513
15564
|
});
|
|
@@ -15598,6 +15649,7 @@ var userPreferencesStorageSchema = appSchema4({
|
|
|
15598
15649
|
{ name: "description", type: "string", isOptional: true },
|
|
15599
15650
|
{ name: "models", type: "string", isOptional: true },
|
|
15600
15651
|
{ name: "personality", type: "string", isOptional: true },
|
|
15652
|
+
{ name: "external_wallets", type: "string", isOptional: true },
|
|
15601
15653
|
{ name: "created_at", type: "number" },
|
|
15602
15654
|
{ name: "updated_at", type: "number" }
|
|
15603
15655
|
]
|
|
@@ -27647,7 +27699,7 @@ function computeToolGuidance(selectedServerTools, selectedClientTools, extraTool
|
|
|
27647
27699
|
async function autoFilterClientTools(clientTools, promptEmbeddings, cache, embeddingOptions, extraToolSets = [], activeToolSets = [], noEmbeddingsReason = "short-prompt") {
|
|
27648
27700
|
const isAlwaysIncluded = (t) => {
|
|
27649
27701
|
const name = getToolName2(t);
|
|
27650
|
-
return name.startsWith("memory_vault_") || name === RECALL_TOOL_NAME || name === CONFIRM_TOOL_NAME;
|
|
27702
|
+
return name.startsWith("memory_vault_") || name === RECALL_TOOL_NAME || name === CONFIRM_TOOL_NAME || name === SELECT_PAYMENT_WALLET_TOOL_NAME || name === WALLET_PAYMENT_TOOL_NAME;
|
|
27651
27703
|
};
|
|
27652
27704
|
const alwaysInclude = clientTools.filter(isAlwaysIncluded);
|
|
27653
27705
|
const filterCandidates = clientTools.filter((t) => !isAlwaysIncluded(t));
|
|
@@ -27659,7 +27711,7 @@ async function autoFilterClientTools(clientTools, promptEmbeddings, cache, embed
|
|
|
27659
27711
|
}
|
|
27660
27712
|
if (!promptEmbeddings) {
|
|
27661
27713
|
if (activeToolSets.length === 0) {
|
|
27662
|
-
return { tools:
|
|
27714
|
+
return { tools: alwaysInclude, activatedSetNames: /* @__PURE__ */ new Set(), matchedSetNames: /* @__PURE__ */ new Set() };
|
|
27663
27715
|
}
|
|
27664
27716
|
const allSets = extraToolSets.length > 0 ? [...BUILT_IN_TOOL_SETS, ...extraToolSets] : BUILT_IN_TOOL_SETS;
|
|
27665
27717
|
const activeSets = allSets.filter((s) => activeToolSets.includes(s.name));
|
|
@@ -28743,6 +28795,177 @@ function migrateDisplayResult(result, fromVersion, toVersion, migrations) {
|
|
|
28743
28795
|
}
|
|
28744
28796
|
return current;
|
|
28745
28797
|
}
|
|
28798
|
+
function generateInteractionId(prefix) {
|
|
28799
|
+
return `${prefix}_${Date.now()}_${Math.random().toString(36).slice(2, 11)}`;
|
|
28800
|
+
}
|
|
28801
|
+
function createInteractiveTool(options, config) {
|
|
28802
|
+
return {
|
|
28803
|
+
type: "function",
|
|
28804
|
+
function: {
|
|
28805
|
+
name: config.name,
|
|
28806
|
+
description: config.description,
|
|
28807
|
+
arguments: config.parameters
|
|
28808
|
+
},
|
|
28809
|
+
executor: async (args, signal) => {
|
|
28810
|
+
if (config.validate && !config.validate(args)) {
|
|
28811
|
+
return { cancelled: true };
|
|
28812
|
+
}
|
|
28813
|
+
const context = options.getContext();
|
|
28814
|
+
if (!context) {
|
|
28815
|
+
return { cancelled: true };
|
|
28816
|
+
}
|
|
28817
|
+
const interactionId = generateInteractionId(config.interactionType);
|
|
28818
|
+
const interactionData = config.mapArgs ? config.mapArgs(args) : args;
|
|
28819
|
+
const onAbort = () => context.cancelInteraction?.(interactionId);
|
|
28820
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
28821
|
+
try {
|
|
28822
|
+
const result = await context.createInteraction(interactionId, config.interactionType, {
|
|
28823
|
+
...interactionData,
|
|
28824
|
+
afterMessageId: options.getLastMessageId?.()
|
|
28825
|
+
});
|
|
28826
|
+
if (config.mapResult) {
|
|
28827
|
+
return config.mapResult(result, args);
|
|
28828
|
+
}
|
|
28829
|
+
return result;
|
|
28830
|
+
} catch {
|
|
28831
|
+
return { cancelled: true };
|
|
28832
|
+
} finally {
|
|
28833
|
+
signal?.removeEventListener("abort", onAbort);
|
|
28834
|
+
}
|
|
28835
|
+
},
|
|
28836
|
+
executorTimeout: Infinity
|
|
28837
|
+
};
|
|
28838
|
+
}
|
|
28839
|
+
|
|
28840
|
+
// src/tools/walletPayment.ts
|
|
28841
|
+
var CANCELLED = { cancelled: true };
|
|
28842
|
+
function isNonEmptyString(value) {
|
|
28843
|
+
return typeof value === "string" && value.length > 0;
|
|
28844
|
+
}
|
|
28845
|
+
function hasPassengers(value) {
|
|
28846
|
+
return Array.isArray(value?.passengers);
|
|
28847
|
+
}
|
|
28848
|
+
function createSelectPaymentWalletTool(options) {
|
|
28849
|
+
const tool = createInteractiveTool(options, {
|
|
28850
|
+
name: SELECT_PAYMENT_WALLET_TOOL_NAME,
|
|
28851
|
+
description: "Show the user a card with the flight offer and their wallets, and let them pick the wallet to pay from. Call it after anuma_flight_offer_details, with the exact offer id, price and currency from that result. Returns the chosen wallet, or that the user declined.",
|
|
28852
|
+
parameters: {
|
|
28853
|
+
type: "object",
|
|
28854
|
+
properties: {
|
|
28855
|
+
offer_id: {
|
|
28856
|
+
type: "string",
|
|
28857
|
+
description: "The offer id from anuma_flight_offer_details"
|
|
28858
|
+
},
|
|
28859
|
+
summary: {
|
|
28860
|
+
type: "string",
|
|
28861
|
+
description: "Route, dates and fare of the offer, as shown to the user"
|
|
28862
|
+
},
|
|
28863
|
+
amount: {
|
|
28864
|
+
type: "string",
|
|
28865
|
+
description: "Total price of the offer, e.g. '412.50'"
|
|
28866
|
+
},
|
|
28867
|
+
currency: {
|
|
28868
|
+
type: "string",
|
|
28869
|
+
description: "Currency of the price, e.g. 'USD'"
|
|
28870
|
+
}
|
|
28871
|
+
},
|
|
28872
|
+
required: ["offer_id", "amount", "currency"]
|
|
28873
|
+
},
|
|
28874
|
+
interactionType: "select_payment_wallet",
|
|
28875
|
+
validate: (args) => isNonEmptyString(args.offer_id),
|
|
28876
|
+
mapArgs: ({ offer_id, summary, amount, currency, wallets }) => ({
|
|
28877
|
+
offer_id,
|
|
28878
|
+
summary,
|
|
28879
|
+
amount,
|
|
28880
|
+
currency,
|
|
28881
|
+
wallets
|
|
28882
|
+
}),
|
|
28883
|
+
mapResult: (result, args) => {
|
|
28884
|
+
if (result?.confirmed === true && isNonEmptyString(result.funding_wallet)) {
|
|
28885
|
+
return {
|
|
28886
|
+
confirmed: true,
|
|
28887
|
+
offer_id: args.offer_id,
|
|
28888
|
+
funding_wallet: result.funding_wallet
|
|
28889
|
+
};
|
|
28890
|
+
}
|
|
28891
|
+
if (result?.confirmed === false) return { confirmed: false };
|
|
28892
|
+
return CANCELLED;
|
|
28893
|
+
}
|
|
28894
|
+
});
|
|
28895
|
+
const showCard = tool.executor;
|
|
28896
|
+
return {
|
|
28897
|
+
...tool,
|
|
28898
|
+
executor: async (args, signal) => {
|
|
28899
|
+
if (!isNonEmptyString(args.offer_id)) return CANCELLED;
|
|
28900
|
+
let wallets;
|
|
28901
|
+
try {
|
|
28902
|
+
wallets = await options.listWallets();
|
|
28903
|
+
} catch {
|
|
28904
|
+
return { error_code: "wallets_unavailable", retryable: true };
|
|
28905
|
+
}
|
|
28906
|
+
if (signal?.aborted) return CANCELLED;
|
|
28907
|
+
return showCard?.({ ...args, wallets }, signal);
|
|
28908
|
+
}
|
|
28909
|
+
};
|
|
28910
|
+
}
|
|
28911
|
+
function createWalletPaymentTool(options) {
|
|
28912
|
+
const tool = createInteractiveTool(options, {
|
|
28913
|
+
name: WALLET_PAYMENT_TOOL_NAME,
|
|
28914
|
+
description: "Show the user a card to enter the passengers, then pay the flight booking from the wallet they chose. Call it after anuma_create_flight_intent, with the provider and reference from that result. Returns whether the payment went through.",
|
|
28915
|
+
parameters: {
|
|
28916
|
+
type: "object",
|
|
28917
|
+
properties: {
|
|
28918
|
+
provider: {
|
|
28919
|
+
type: "string",
|
|
28920
|
+
description: "The payment provider from anuma_create_flight_intent"
|
|
28921
|
+
},
|
|
28922
|
+
reference: {
|
|
28923
|
+
type: "string",
|
|
28924
|
+
description: "The payment reference from anuma_create_flight_intent"
|
|
28925
|
+
},
|
|
28926
|
+
passenger_count: {
|
|
28927
|
+
type: "integer",
|
|
28928
|
+
minimum: 1,
|
|
28929
|
+
description: "How many passengers the booking is for"
|
|
28930
|
+
}
|
|
28931
|
+
},
|
|
28932
|
+
required: ["provider", "reference", "passenger_count"]
|
|
28933
|
+
},
|
|
28934
|
+
interactionType: "prompt_wallet_payment",
|
|
28935
|
+
validate: (args) => isNonEmptyString(args.provider) && isNonEmptyString(args.reference) && Number.isInteger(args.passenger_count) && args.passenger_count >= 1,
|
|
28936
|
+
mapArgs: ({ provider, reference, passenger_count }) => ({
|
|
28937
|
+
provider,
|
|
28938
|
+
reference,
|
|
28939
|
+
passenger_count
|
|
28940
|
+
}),
|
|
28941
|
+
mapResult: (result) => hasPassengers(result) ? { passengers: result.passengers } : CANCELLED
|
|
28942
|
+
});
|
|
28943
|
+
const showCard = tool.executor;
|
|
28944
|
+
return {
|
|
28945
|
+
...tool,
|
|
28946
|
+
executor: async (args, signal) => {
|
|
28947
|
+
const answer = await showCard?.(args, signal);
|
|
28948
|
+
if (!hasPassengers(answer) || signal?.aborted) return CANCELLED;
|
|
28949
|
+
const provider = args.provider;
|
|
28950
|
+
const reference = args.reference;
|
|
28951
|
+
let outcome2;
|
|
28952
|
+
try {
|
|
28953
|
+
outcome2 = await options.pay({ provider, reference, passengers: answer.passengers }, signal);
|
|
28954
|
+
} catch {
|
|
28955
|
+
return { paid: false, error_code: "payment_failed", retryable: false };
|
|
28956
|
+
}
|
|
28957
|
+
if (outcome2.paid) {
|
|
28958
|
+
return {
|
|
28959
|
+
paid: true,
|
|
28960
|
+
provider: outcome2.provider,
|
|
28961
|
+
reference: outcome2.reference,
|
|
28962
|
+
status: outcome2.status
|
|
28963
|
+
};
|
|
28964
|
+
}
|
|
28965
|
+
return { paid: false, error_code: outcome2.error_code, retryable: outcome2.retryable };
|
|
28966
|
+
}
|
|
28967
|
+
};
|
|
28968
|
+
}
|
|
28746
28969
|
|
|
28747
28970
|
// src/react/anumaRuntime.tsx
|
|
28748
28971
|
import * as React from "react";
|
|
@@ -35184,6 +35407,7 @@ function startObserve(entry, walletAddress) {
|
|
|
35184
35407
|
"description",
|
|
35185
35408
|
"models",
|
|
35186
35409
|
"personality",
|
|
35410
|
+
"external_wallets",
|
|
35187
35411
|
"updated_at"
|
|
35188
35412
|
]).subscribe({
|
|
35189
35413
|
next: (records) => {
|
|
@@ -35198,6 +35422,7 @@ function startObserve(entry, walletAddress) {
|
|
|
35198
35422
|
description: record2.description,
|
|
35199
35423
|
models: record2.models,
|
|
35200
35424
|
personality: record2.personality,
|
|
35425
|
+
externalWallets: record2.externalWallets,
|
|
35201
35426
|
createdAt: record2.createdAt,
|
|
35202
35427
|
updatedAt: record2.updatedAt
|
|
35203
35428
|
}
|
|
@@ -36422,6 +36647,7 @@ export {
|
|
|
36422
36647
|
RemoteMemoryPartialCreateError,
|
|
36423
36648
|
RerankerUnavailableError,
|
|
36424
36649
|
SDK_SCHEMA_VERSION,
|
|
36650
|
+
SELECT_PAYMENT_WALLET_TOOL_NAME,
|
|
36425
36651
|
SERVER_TOOL_DEPENDENCY_SETS,
|
|
36426
36652
|
SHORT_TTL_MS,
|
|
36427
36653
|
SLIDER_CONFIG,
|
|
@@ -36446,6 +36672,7 @@ export {
|
|
|
36446
36672
|
TextProcessor,
|
|
36447
36673
|
UIInteractionProvider,
|
|
36448
36674
|
VAULT_SIZE_HOP_CAP,
|
|
36675
|
+
WALLET_PAYMENT_TOOL_NAME,
|
|
36449
36676
|
WalletPoller,
|
|
36450
36677
|
WatermelonChatStorageAdapter,
|
|
36451
36678
|
WordProcessor,
|
|
@@ -36512,12 +36739,14 @@ export {
|
|
|
36512
36739
|
createRemoteMemoryPipeline,
|
|
36513
36740
|
createRemoteMemoryStore,
|
|
36514
36741
|
createSavedToolOp,
|
|
36742
|
+
createSelectPaymentWalletTool,
|
|
36515
36743
|
createServerToolsFilter,
|
|
36516
36744
|
createStockPricePreProcessor,
|
|
36517
36745
|
createVaultEmbeddingCache,
|
|
36518
36746
|
createVaultFolderOp,
|
|
36519
36747
|
createVaultMemoriesBatchOp,
|
|
36520
36748
|
createVaultMemoryOp,
|
|
36749
|
+
createWalletPaymentTool,
|
|
36521
36750
|
createWeatherPreProcessor,
|
|
36522
36751
|
createWebSearchPreProcessor,
|
|
36523
36752
|
decodeChunkVector,
|