@anuma/sdk 10.7.0 → 10.9.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 +336 -167
- package/dist/expo/index.d.mts +193 -151
- package/dist/expo/index.d.ts +193 -151
- package/dist/expo/index.mjs +321 -159
- package/dist/index.cjs +165 -16
- package/dist/index.d.mts +377 -151
- package/dist/index.d.ts +377 -151
- package/dist/index.mjs +158 -16
- package/dist/react/index.cjs +339 -170
- package/dist/react/index.d.mts +193 -151
- package/dist/react/index.d.ts +193 -151
- package/dist/react/index.mjs +324 -162
- package/dist/server/index.d.mts +20 -0
- package/dist/server/index.d.ts +20 -0
- package/package.json +2 -2
package/dist/server/index.d.mts
CHANGED
|
@@ -2603,6 +2603,10 @@ interface StockPricePreProcessorOptions {
|
|
|
2603
2603
|
*/
|
|
2604
2604
|
declare function createStockPricePreProcessor(options?: StockPricePreProcessorOptions): PromptPreProcessor;
|
|
2605
2605
|
|
|
2606
|
+
type ChatJson = null | boolean | number | string | ChatJson[] | {
|
|
2607
|
+
[key: string]: ChatJson;
|
|
2608
|
+
};
|
|
2609
|
+
|
|
2606
2610
|
declare class VaultMemory extends Model {
|
|
2607
2611
|
static table: string;
|
|
2608
2612
|
content: string;
|
|
@@ -7367,6 +7371,14 @@ type MessageFeedback = "like" | "dislike" | null;
|
|
|
7367
7371
|
* would fail open.
|
|
7368
7372
|
*/
|
|
7369
7373
|
type MessageOrigin = "tool_result" | "chunks_discarded" | "message";
|
|
7374
|
+
/** Why an Anuma 1:1 turn exists: a daily intro or a reply to the user. */
|
|
7375
|
+
type AnumaTurnOrigin = "intro" | "reply";
|
|
7376
|
+
/** One Anuma 1:1 turn: 1-3 ordered bubbles sealed inside the message payload. */
|
|
7377
|
+
interface AnumaTurn {
|
|
7378
|
+
turnId: string;
|
|
7379
|
+
bubbles?: string[];
|
|
7380
|
+
origin?: AnumaTurnOrigin;
|
|
7381
|
+
}
|
|
7370
7382
|
/**
|
|
7371
7383
|
* Metadata for files attached to messages.
|
|
7372
7384
|
*
|
|
@@ -7535,6 +7547,8 @@ interface StoredMessage {
|
|
|
7535
7547
|
toolCallEvents?: LlmapiToolCallEvent[];
|
|
7536
7548
|
/** Provenance for synthetic rows; undefined for typed messages and pre-v44 rows */
|
|
7537
7549
|
origin?: MessageOrigin;
|
|
7550
|
+
/** Anuma 1:1 turn fields; only vault chat backends store them. */
|
|
7551
|
+
anuma?: AnumaTurn;
|
|
7538
7552
|
/**
|
|
7539
7553
|
* Set when `content` could not be decrypted on read (#561).
|
|
7540
7554
|
* The `content` field still holds the original ciphertext — never a
|
|
@@ -7564,6 +7578,10 @@ interface StoredConversation {
|
|
|
7564
7578
|
/** When the conversation was pinned to the top of the list; null/unset = not pinned.
|
|
7565
7579
|
* `null` (not `undefined`) at runtime for unpinned rows — mirrors the model field. */
|
|
7566
7580
|
pinnedAt?: Date | null;
|
|
7581
|
+
/** Per-conversation app state kept with the conversation in vault, keyed by the app; absent on local storage. */
|
|
7582
|
+
context?: {
|
|
7583
|
+
[key: string]: ChatJson;
|
|
7584
|
+
};
|
|
7567
7585
|
}
|
|
7568
7586
|
/**
|
|
7569
7587
|
* Lazy variant of {@link StoredConversation}.
|
|
@@ -7706,6 +7724,8 @@ interface CreateMessageOptions {
|
|
|
7706
7724
|
toolCallEvents?: LlmapiToolCallEvent[];
|
|
7707
7725
|
/** Provenance for synthetic rows; set by the producer, never by user input */
|
|
7708
7726
|
origin?: MessageOrigin;
|
|
7727
|
+
/** Anuma 1:1 turn fields; only vault chat backends store them. */
|
|
7728
|
+
anuma?: AnumaTurn;
|
|
7709
7729
|
/**
|
|
7710
7730
|
* Optional pre-generated unique ID for this message.
|
|
7711
7731
|
* When provided, used as the WatermelonDB record ID instead of auto-generating one.
|
package/dist/server/index.d.ts
CHANGED
|
@@ -2603,6 +2603,10 @@ interface StockPricePreProcessorOptions {
|
|
|
2603
2603
|
*/
|
|
2604
2604
|
declare function createStockPricePreProcessor(options?: StockPricePreProcessorOptions): PromptPreProcessor;
|
|
2605
2605
|
|
|
2606
|
+
type ChatJson = null | boolean | number | string | ChatJson[] | {
|
|
2607
|
+
[key: string]: ChatJson;
|
|
2608
|
+
};
|
|
2609
|
+
|
|
2606
2610
|
declare class VaultMemory extends Model {
|
|
2607
2611
|
static table: string;
|
|
2608
2612
|
content: string;
|
|
@@ -7367,6 +7371,14 @@ type MessageFeedback = "like" | "dislike" | null;
|
|
|
7367
7371
|
* would fail open.
|
|
7368
7372
|
*/
|
|
7369
7373
|
type MessageOrigin = "tool_result" | "chunks_discarded" | "message";
|
|
7374
|
+
/** Why an Anuma 1:1 turn exists: a daily intro or a reply to the user. */
|
|
7375
|
+
type AnumaTurnOrigin = "intro" | "reply";
|
|
7376
|
+
/** One Anuma 1:1 turn: 1-3 ordered bubbles sealed inside the message payload. */
|
|
7377
|
+
interface AnumaTurn {
|
|
7378
|
+
turnId: string;
|
|
7379
|
+
bubbles?: string[];
|
|
7380
|
+
origin?: AnumaTurnOrigin;
|
|
7381
|
+
}
|
|
7370
7382
|
/**
|
|
7371
7383
|
* Metadata for files attached to messages.
|
|
7372
7384
|
*
|
|
@@ -7535,6 +7547,8 @@ interface StoredMessage {
|
|
|
7535
7547
|
toolCallEvents?: LlmapiToolCallEvent[];
|
|
7536
7548
|
/** Provenance for synthetic rows; undefined for typed messages and pre-v44 rows */
|
|
7537
7549
|
origin?: MessageOrigin;
|
|
7550
|
+
/** Anuma 1:1 turn fields; only vault chat backends store them. */
|
|
7551
|
+
anuma?: AnumaTurn;
|
|
7538
7552
|
/**
|
|
7539
7553
|
* Set when `content` could not be decrypted on read (#561).
|
|
7540
7554
|
* The `content` field still holds the original ciphertext — never a
|
|
@@ -7564,6 +7578,10 @@ interface StoredConversation {
|
|
|
7564
7578
|
/** When the conversation was pinned to the top of the list; null/unset = not pinned.
|
|
7565
7579
|
* `null` (not `undefined`) at runtime for unpinned rows — mirrors the model field. */
|
|
7566
7580
|
pinnedAt?: Date | null;
|
|
7581
|
+
/** Per-conversation app state kept with the conversation in vault, keyed by the app; absent on local storage. */
|
|
7582
|
+
context?: {
|
|
7583
|
+
[key: string]: ChatJson;
|
|
7584
|
+
};
|
|
7567
7585
|
}
|
|
7568
7586
|
/**
|
|
7569
7587
|
* Lazy variant of {@link StoredConversation}.
|
|
@@ -7706,6 +7724,8 @@ interface CreateMessageOptions {
|
|
|
7706
7724
|
toolCallEvents?: LlmapiToolCallEvent[];
|
|
7707
7725
|
/** Provenance for synthetic rows; set by the producer, never by user input */
|
|
7708
7726
|
origin?: MessageOrigin;
|
|
7727
|
+
/** Anuma 1:1 turn fields; only vault chat backends store them. */
|
|
7728
|
+
anuma?: AnumaTurn;
|
|
7709
7729
|
/**
|
|
7710
7730
|
* Optional pre-generated unique ID for this message.
|
|
7711
7731
|
* When provided, used as the WatermelonDB record ID instead of auto-generating one.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anuma/sdk",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.9.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"spec": "openapi-ts && node scripts/patch-generated-client.mjs",
|
|
130
130
|
"test": "vitest run",
|
|
131
131
|
"test:browser": "vitest run --config vitest.browser.config.mts",
|
|
132
|
-
"test:vault-conformance": "vitest run src/lib/chatStore/migrateChats.test.ts src/lib/chatStore/vaultBackend.contract.test.ts src/lib/chatStore/vaultBackend.test.ts src/lib/chatStore/vaultParity.test.ts src/react/useChatStorage.vaultParity.test.tsx",
|
|
132
|
+
"test:vault-conformance": "vitest run src/lib/chatStore/anuma.test.ts src/lib/chatStore/migrateChats.test.ts src/lib/chatStore/vaultBackend.contract.test.ts src/lib/chatStore/vaultBackend.test.ts src/lib/chatStore/vaultParity.test.ts src/react/useChatStorage.vaultParity.test.tsx",
|
|
133
133
|
"build": "tsup",
|
|
134
134
|
"prepublishOnly": "pnpm build",
|
|
135
135
|
"docs": "typedoc",
|