@anuma/sdk 7.0.3 → 7.0.4-next.20261015010856
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 +288 -73
- package/dist/expo/index.d.mts +24 -4
- package/dist/expo/index.d.ts +24 -4
- package/dist/expo/index.mjs +288 -73
- package/dist/memory/context.d.mts +1 -0
- package/dist/memory/context.d.ts +1 -0
- package/dist/react/index.cjs +293 -73
- package/dist/react/index.d.mts +24 -4
- package/dist/react/index.d.ts +24 -4
- package/dist/react/index.mjs +293 -73
- package/dist/server/index.cjs +237 -33
- package/dist/server/index.d.mts +26 -3
- package/dist/server/index.d.ts +26 -3
- package/dist/server/index.mjs +237 -33
- package/package.json +1 -1
package/dist/expo/index.d.mts
CHANGED
|
@@ -3302,6 +3302,7 @@ interface EntityOperationsContext {
|
|
|
3302
3302
|
* (server / SQLite, where the migration backfill is authoritative).
|
|
3303
3303
|
*/
|
|
3304
3304
|
allowUnscopedRows?: boolean;
|
|
3305
|
+
canWrite?: () => Promise<boolean>;
|
|
3305
3306
|
}
|
|
3306
3307
|
|
|
3307
3308
|
/**
|
|
@@ -5251,6 +5252,10 @@ type ExtractOutcome = "extracted" | "no-facts" | "empty-after-retry" | "dropped-
|
|
|
5251
5252
|
*/
|
|
5252
5253
|
declare function extractAndRetain(messages: AutoExtractMessage[], retainCtx: RetainContext, options: {
|
|
5253
5254
|
extract: ExtractFactsOptions;
|
|
5255
|
+
/** Route extracted facts through this store instead of the local vault. */
|
|
5256
|
+
memoryStore?: MemoryStore | null;
|
|
5257
|
+
/** Cancel remote writes for this extraction batch. */
|
|
5258
|
+
signal?: AbortSignal;
|
|
5254
5259
|
minConfidence?: number;
|
|
5255
5260
|
/** Override scope/folder for all retained facts. */
|
|
5256
5261
|
scope?: string;
|
|
@@ -6540,7 +6545,12 @@ type MemoryRecallOptions = Omit<RecallOptions, "types" | "includeChunks" | "conv
|
|
|
6540
6545
|
* and never receives these credentials, callbacks or redactor instances.
|
|
6541
6546
|
* @public
|
|
6542
6547
|
*/
|
|
6543
|
-
type MemoryRetainOptions = Omit<RetainOptions, "folderId"
|
|
6548
|
+
type MemoryRetainOptions = Omit<RetainOptions, "folderId"> & {
|
|
6549
|
+
/** Reject writes when the originating extraction is no longer eligible. */
|
|
6550
|
+
canWrite?: () => Promise<boolean>;
|
|
6551
|
+
/** Abort pending remote requests when the originating extraction is cancelled. */
|
|
6552
|
+
signal?: AbortSignal;
|
|
6553
|
+
};
|
|
6544
6554
|
/**
|
|
6545
6555
|
* A topic and how many memories link to it.
|
|
6546
6556
|
* @public
|
|
@@ -6669,7 +6679,11 @@ interface MemoryStore {
|
|
|
6669
6679
|
/** Replace the memory's topics with a user-chosen set and stop auto-tagging it. */
|
|
6670
6680
|
setTopics(memoryId: string, topics: readonly EntityInput[]): Promise<StoredVaultMemory | null>;
|
|
6671
6681
|
/** Add topics alongside the existing ones (auto-tagging stays on). */
|
|
6672
|
-
addTopics(memoryId: string, topics: readonly EntityInput[]
|
|
6682
|
+
addTopics(memoryId: string, topics: readonly EntityInput[], options?: {
|
|
6683
|
+
unlessUserManaged?: boolean;
|
|
6684
|
+
canWrite?: () => Promise<boolean>;
|
|
6685
|
+
signal?: AbortSignal;
|
|
6686
|
+
}): Promise<StoredEntity[]>;
|
|
6673
6687
|
setVisibility(id: string, visibility: VaultMemoryVisibility, options?: {
|
|
6674
6688
|
twinOptIn?: boolean;
|
|
6675
6689
|
}): Promise<StoredVaultMemory | null>;
|
|
@@ -7366,8 +7380,8 @@ interface BaseUseChatStorageOptions {
|
|
|
7366
7380
|
hooks?: RunHooks | RunHooks[];
|
|
7367
7381
|
/** WatermelonDB database instance for storing conversations and messages */
|
|
7368
7382
|
database: Database;
|
|
7369
|
-
/** Route memory
|
|
7370
|
-
memoryStore?: MemoryStore;
|
|
7383
|
+
/** Route memory operations through this store; `null` disables memory access while `undefined` uses the local vault. Folders are unsupported. With `piiRedaction` on, build the store with `embeddingOptions.maskInput` or its memory calls throw. */
|
|
7384
|
+
memoryStore?: MemoryStore | null;
|
|
7371
7385
|
/** ID of an existing conversation to load and continue */
|
|
7372
7386
|
conversationId?: string;
|
|
7373
7387
|
/** Automatically create a new conversation if none is set (default: true) */
|
|
@@ -8879,6 +8893,10 @@ interface SyncKeyValueStore {
|
|
|
8879
8893
|
declare function createPlatformCursorStore(storage: SyncKeyValueStore, keyPrefix?: string): ExtractionCursorStore;
|
|
8880
8894
|
interface CreateAutoExtractorOptions {
|
|
8881
8895
|
retainCtx: RetainContext;
|
|
8896
|
+
/** Route retained facts and topics through this store; null disables memory writes. */
|
|
8897
|
+
memoryStore?: MemoryStore | null;
|
|
8898
|
+
/** Cancel remote writes for an extraction batch. */
|
|
8899
|
+
signal?: AbortSignal;
|
|
8882
8900
|
extract: ExtractFactsOptions;
|
|
8883
8901
|
/** Confidence floor for retained facts. Default 0.7. */
|
|
8884
8902
|
minConfidence?: number;
|
|
@@ -9486,6 +9504,8 @@ interface LocalMemoryStoreOptions {
|
|
|
9486
9504
|
walletAddress?: string;
|
|
9487
9505
|
signMessage?: SignMessageFn;
|
|
9488
9506
|
embeddedWalletSigner?: EmbeddedWalletSignerFn;
|
|
9507
|
+
/** Rechecked inside each serialized memory write. */
|
|
9508
|
+
canWrite?: () => Promise<boolean>;
|
|
9489
9509
|
/**
|
|
9490
9510
|
* Scope every read/write to this user — for a shared, multi-tenant database
|
|
9491
9511
|
* whose rows all carry their `user_id`. Rows with no `user_id` are invisible
|
package/dist/expo/index.d.ts
CHANGED
|
@@ -3302,6 +3302,7 @@ interface EntityOperationsContext {
|
|
|
3302
3302
|
* (server / SQLite, where the migration backfill is authoritative).
|
|
3303
3303
|
*/
|
|
3304
3304
|
allowUnscopedRows?: boolean;
|
|
3305
|
+
canWrite?: () => Promise<boolean>;
|
|
3305
3306
|
}
|
|
3306
3307
|
|
|
3307
3308
|
/**
|
|
@@ -5251,6 +5252,10 @@ type ExtractOutcome = "extracted" | "no-facts" | "empty-after-retry" | "dropped-
|
|
|
5251
5252
|
*/
|
|
5252
5253
|
declare function extractAndRetain(messages: AutoExtractMessage[], retainCtx: RetainContext, options: {
|
|
5253
5254
|
extract: ExtractFactsOptions;
|
|
5255
|
+
/** Route extracted facts through this store instead of the local vault. */
|
|
5256
|
+
memoryStore?: MemoryStore | null;
|
|
5257
|
+
/** Cancel remote writes for this extraction batch. */
|
|
5258
|
+
signal?: AbortSignal;
|
|
5254
5259
|
minConfidence?: number;
|
|
5255
5260
|
/** Override scope/folder for all retained facts. */
|
|
5256
5261
|
scope?: string;
|
|
@@ -6540,7 +6545,12 @@ type MemoryRecallOptions = Omit<RecallOptions, "types" | "includeChunks" | "conv
|
|
|
6540
6545
|
* and never receives these credentials, callbacks or redactor instances.
|
|
6541
6546
|
* @public
|
|
6542
6547
|
*/
|
|
6543
|
-
type MemoryRetainOptions = Omit<RetainOptions, "folderId"
|
|
6548
|
+
type MemoryRetainOptions = Omit<RetainOptions, "folderId"> & {
|
|
6549
|
+
/** Reject writes when the originating extraction is no longer eligible. */
|
|
6550
|
+
canWrite?: () => Promise<boolean>;
|
|
6551
|
+
/** Abort pending remote requests when the originating extraction is cancelled. */
|
|
6552
|
+
signal?: AbortSignal;
|
|
6553
|
+
};
|
|
6544
6554
|
/**
|
|
6545
6555
|
* A topic and how many memories link to it.
|
|
6546
6556
|
* @public
|
|
@@ -6669,7 +6679,11 @@ interface MemoryStore {
|
|
|
6669
6679
|
/** Replace the memory's topics with a user-chosen set and stop auto-tagging it. */
|
|
6670
6680
|
setTopics(memoryId: string, topics: readonly EntityInput[]): Promise<StoredVaultMemory | null>;
|
|
6671
6681
|
/** Add topics alongside the existing ones (auto-tagging stays on). */
|
|
6672
|
-
addTopics(memoryId: string, topics: readonly EntityInput[]
|
|
6682
|
+
addTopics(memoryId: string, topics: readonly EntityInput[], options?: {
|
|
6683
|
+
unlessUserManaged?: boolean;
|
|
6684
|
+
canWrite?: () => Promise<boolean>;
|
|
6685
|
+
signal?: AbortSignal;
|
|
6686
|
+
}): Promise<StoredEntity[]>;
|
|
6673
6687
|
setVisibility(id: string, visibility: VaultMemoryVisibility, options?: {
|
|
6674
6688
|
twinOptIn?: boolean;
|
|
6675
6689
|
}): Promise<StoredVaultMemory | null>;
|
|
@@ -7366,8 +7380,8 @@ interface BaseUseChatStorageOptions {
|
|
|
7366
7380
|
hooks?: RunHooks | RunHooks[];
|
|
7367
7381
|
/** WatermelonDB database instance for storing conversations and messages */
|
|
7368
7382
|
database: Database;
|
|
7369
|
-
/** Route memory
|
|
7370
|
-
memoryStore?: MemoryStore;
|
|
7383
|
+
/** Route memory operations through this store; `null` disables memory access while `undefined` uses the local vault. Folders are unsupported. With `piiRedaction` on, build the store with `embeddingOptions.maskInput` or its memory calls throw. */
|
|
7384
|
+
memoryStore?: MemoryStore | null;
|
|
7371
7385
|
/** ID of an existing conversation to load and continue */
|
|
7372
7386
|
conversationId?: string;
|
|
7373
7387
|
/** Automatically create a new conversation if none is set (default: true) */
|
|
@@ -8879,6 +8893,10 @@ interface SyncKeyValueStore {
|
|
|
8879
8893
|
declare function createPlatformCursorStore(storage: SyncKeyValueStore, keyPrefix?: string): ExtractionCursorStore;
|
|
8880
8894
|
interface CreateAutoExtractorOptions {
|
|
8881
8895
|
retainCtx: RetainContext;
|
|
8896
|
+
/** Route retained facts and topics through this store; null disables memory writes. */
|
|
8897
|
+
memoryStore?: MemoryStore | null;
|
|
8898
|
+
/** Cancel remote writes for an extraction batch. */
|
|
8899
|
+
signal?: AbortSignal;
|
|
8882
8900
|
extract: ExtractFactsOptions;
|
|
8883
8901
|
/** Confidence floor for retained facts. Default 0.7. */
|
|
8884
8902
|
minConfidence?: number;
|
|
@@ -9486,6 +9504,8 @@ interface LocalMemoryStoreOptions {
|
|
|
9486
9504
|
walletAddress?: string;
|
|
9487
9505
|
signMessage?: SignMessageFn;
|
|
9488
9506
|
embeddedWalletSigner?: EmbeddedWalletSignerFn;
|
|
9507
|
+
/** Rechecked inside each serialized memory write. */
|
|
9508
|
+
canWrite?: () => Promise<boolean>;
|
|
9489
9509
|
/**
|
|
9490
9510
|
* Scope every read/write to this user — for a shared, multi-tenant database
|
|
9491
9511
|
* whose rows all carry their `user_id`. Rows with no `user_id` are invisible
|