@mastra/memory 0.0.0-error-handler-fix-20251020202607 → 0.0.0-esbuild-bundle-worker-20260807182016
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/CHANGELOG.md +4656 -3
- package/LICENSE.md +15 -0
- package/README.md +26 -1
- package/dist/_types/@internal_ai-sdk-v4/dist/index.d.ts +7450 -0
- package/dist/docs/SKILL.md +62 -0
- package/dist/docs/assets/SOURCE_MAP.json +11 -0
- package/dist/docs/references/docs-agents-agent-approval.md +664 -0
- package/dist/docs/references/docs-agents-networks.md +184 -0
- package/dist/docs/references/docs-capabilities-subagents.md +454 -0
- package/dist/docs/references/docs-evals-evals-with-memory.md +146 -0
- package/dist/docs/references/docs-long-running-agents-background-tasks.md +382 -0
- package/dist/docs/references/docs-long-running-agents-goals.md +118 -0
- package/dist/docs/references/docs-memory-memory-processors.md +385 -0
- package/dist/docs/references/docs-memory-message-history.md +348 -0
- package/dist/docs/references/docs-memory-multi-user-threads.md +208 -0
- package/dist/docs/references/docs-memory-observational-memory.md +835 -0
- package/dist/docs/references/docs-memory-overview.md +266 -0
- package/dist/docs/references/docs-memory-semantic-recall.md +401 -0
- package/dist/docs/references/docs-memory-working-memory.md +431 -0
- package/dist/docs/references/docs-storage-overview.md +214 -0
- package/dist/docs/references/reference-core-getMemory.md +51 -0
- package/dist/docs/references/reference-core-listMemory.md +57 -0
- package/dist/docs/references/reference-file-based-agents-memory.md +58 -0
- package/dist/docs/references/reference-memory-clone-utilities.md +203 -0
- package/dist/docs/references/reference-memory-cloneThread.md +173 -0
- package/dist/docs/references/reference-memory-createThread.md +70 -0
- package/dist/docs/references/reference-memory-getThreadById.md +26 -0
- package/dist/docs/references/reference-memory-listThreads.md +147 -0
- package/dist/docs/references/reference-memory-memory-class.md +148 -0
- package/dist/docs/references/reference-memory-observational-memory.md +877 -0
- package/dist/docs/references/reference-memory-summarizeConversation.md +99 -0
- package/dist/docs/references/reference-memory-summarizeThread.md +93 -0
- package/dist/docs/references/reference-processors-token-limiter-processor.md +158 -0
- package/dist/docs/references/reference-storage-dsql.md +430 -0
- package/dist/docs/references/reference-storage-dynamodb.md +284 -0
- package/dist/docs/references/reference-storage-libsql.md +143 -0
- package/dist/docs/references/reference-storage-mongodb.md +267 -0
- package/dist/docs/references/reference-storage-postgresql.md +531 -0
- package/dist/docs/references/reference-storage-redis.md +268 -0
- package/dist/docs/references/reference-storage-upstash.md +162 -0
- package/dist/docs/references/reference-vectors-libsql.md +307 -0
- package/dist/docs/references/reference-vectors-mongodb.md +567 -0
- package/dist/docs/references/reference-vectors-pg.md +430 -0
- package/dist/docs/references/reference-vectors-upstash.md +296 -0
- package/dist/index.cjs +35 -893
- package/dist/index.d.ts +465 -62
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -887
- package/dist/processors/index.cjs +32 -165
- package/dist/processors/index.d.ts +1 -2
- package/dist/processors/index.d.ts.map +1 -1
- package/dist/processors/index.js +2 -158
- package/dist/processors/observational-memory/activation-ttl.d.ts +4 -0
- package/dist/processors/observational-memory/activation-ttl.d.ts.map +1 -0
- package/dist/processors/observational-memory/anchor-ids.d.ts +4 -0
- package/dist/processors/observational-memory/anchor-ids.d.ts.map +1 -0
- package/dist/processors/observational-memory/buffering-coordinator.d.ts +61 -0
- package/dist/processors/observational-memory/buffering-coordinator.d.ts.map +1 -0
- package/dist/processors/observational-memory/built-in-extractors.d.ts +15 -0
- package/dist/processors/observational-memory/built-in-extractors.d.ts.map +1 -0
- package/dist/processors/observational-memory/constants.d.ts +74 -0
- package/dist/processors/observational-memory/constants.d.ts.map +1 -0
- package/dist/processors/observational-memory/date-utils.d.ts +41 -0
- package/dist/processors/observational-memory/date-utils.d.ts.map +1 -0
- package/dist/processors/observational-memory/debug.d.ts +3 -0
- package/dist/processors/observational-memory/debug.d.ts.map +1 -0
- package/dist/processors/observational-memory/extracted-values.d.ts +44 -0
- package/dist/processors/observational-memory/extracted-values.d.ts.map +1 -0
- package/dist/processors/observational-memory/extraction-runner.d.ts +22 -0
- package/dist/processors/observational-memory/extraction-runner.d.ts.map +1 -0
- package/dist/processors/observational-memory/extractor.d.ts +76 -0
- package/dist/processors/observational-memory/extractor.d.ts.map +1 -0
- package/dist/processors/observational-memory/index.d.ts +30 -0
- package/dist/processors/observational-memory/index.d.ts.map +1 -0
- package/dist/processors/observational-memory/internal-request-context.d.ts +17 -0
- package/dist/processors/observational-memory/internal-request-context.d.ts.map +1 -0
- package/dist/processors/observational-memory/markers.d.ts +118 -0
- package/dist/processors/observational-memory/markers.d.ts.map +1 -0
- package/dist/processors/observational-memory/message-utils.d.ts +83 -0
- package/dist/processors/observational-memory/message-utils.d.ts.map +1 -0
- package/dist/processors/observational-memory/model-by-input-tokens.d.ts +14 -0
- package/dist/processors/observational-memory/model-by-input-tokens.d.ts.map +1 -0
- package/dist/processors/observational-memory/model-context.d.ts +2 -0
- package/dist/processors/observational-memory/model-context.d.ts.map +1 -0
- package/dist/processors/observational-memory/observation-groups.d.ts +15 -0
- package/dist/processors/observational-memory/observation-groups.d.ts.map +1 -0
- package/dist/processors/observational-memory/observation-strategies/async-buffer.d.ts +39 -0
- package/dist/processors/observational-memory/observation-strategies/async-buffer.d.ts.map +1 -0
- package/dist/processors/observational-memory/observation-strategies/base.d.ts +122 -0
- package/dist/processors/observational-memory/observation-strategies/base.d.ts.map +1 -0
- package/dist/processors/observational-memory/observation-strategies/index.d.ts +7 -0
- package/dist/processors/observational-memory/observation-strategies/index.d.ts.map +1 -0
- package/dist/processors/observational-memory/observation-strategies/resource-scoped.d.ts +43 -0
- package/dist/processors/observational-memory/observation-strategies/resource-scoped.d.ts.map +1 -0
- package/dist/processors/observational-memory/observation-strategies/sync.d.ts +41 -0
- package/dist/processors/observational-memory/observation-strategies/sync.d.ts.map +1 -0
- package/dist/processors/observational-memory/observation-strategies/types.d.ts +103 -0
- package/dist/processors/observational-memory/observation-strategies/types.d.ts.map +1 -0
- package/dist/processors/observational-memory/observation-turn/index.d.ts +4 -0
- package/dist/processors/observational-memory/observation-turn/index.d.ts.map +1 -0
- package/dist/processors/observational-memory/observation-turn/load-memory-context.d.ts +9 -0
- package/dist/processors/observational-memory/observation-turn/load-memory-context.d.ts.map +1 -0
- package/dist/processors/observational-memory/observation-turn/step.d.ts +53 -0
- package/dist/processors/observational-memory/observation-turn/step.d.ts.map +1 -0
- package/dist/processors/observational-memory/observation-turn/turn.d.ts +139 -0
- package/dist/processors/observational-memory/observation-turn/turn.d.ts.map +1 -0
- package/dist/processors/observational-memory/observation-turn/types.d.ts +46 -0
- package/dist/processors/observational-memory/observation-turn/types.d.ts.map +1 -0
- package/dist/processors/observational-memory/observation-utils.d.ts +16 -0
- package/dist/processors/observational-memory/observation-utils.d.ts.map +1 -0
- package/dist/processors/observational-memory/observational-memory.d.ts +930 -0
- package/dist/processors/observational-memory/observational-memory.d.ts.map +1 -0
- package/dist/processors/observational-memory/observer-agent.d.ts +190 -0
- package/dist/processors/observational-memory/observer-agent.d.ts.map +1 -0
- package/dist/processors/observational-memory/observer-runner.d.ts +141 -0
- package/dist/processors/observational-memory/observer-runner.d.ts.map +1 -0
- package/dist/processors/observational-memory/operation-registry.d.ts +14 -0
- package/dist/processors/observational-memory/operation-registry.d.ts.map +1 -0
- package/dist/processors/observational-memory/processor.d.ts +70 -0
- package/dist/processors/observational-memory/processor.d.ts.map +1 -0
- package/dist/processors/observational-memory/reflector-agent.d.ts +62 -0
- package/dist/processors/observational-memory/reflector-agent.d.ts.map +1 -0
- package/dist/processors/observational-memory/reflector-runner.d.ts +133 -0
- package/dist/processors/observational-memory/reflector-runner.d.ts.map +1 -0
- package/dist/processors/observational-memory/repro-capture.d.ts +33 -0
- package/dist/processors/observational-memory/repro-capture.d.ts.map +1 -0
- package/dist/processors/observational-memory/retry.d.ts +63 -0
- package/dist/processors/observational-memory/retry.d.ts.map +1 -0
- package/dist/processors/observational-memory/string-utils.d.ts +13 -0
- package/dist/processors/observational-memory/string-utils.d.ts.map +1 -0
- package/dist/processors/observational-memory/summarize.d.ts +92 -0
- package/dist/processors/observational-memory/summarize.d.ts.map +1 -0
- package/dist/processors/observational-memory/temporal-markers.d.ts +4 -0
- package/dist/processors/observational-memory/temporal-markers.d.ts.map +1 -0
- package/dist/processors/observational-memory/temporary-memory.d.ts +8 -0
- package/dist/processors/observational-memory/temporary-memory.d.ts.map +1 -0
- package/dist/processors/observational-memory/thresholds.d.ts +52 -0
- package/dist/processors/observational-memory/thresholds.d.ts.map +1 -0
- package/dist/processors/observational-memory/token-counter.d.ts +57 -0
- package/dist/processors/observational-memory/token-counter.d.ts.map +1 -0
- package/dist/processors/observational-memory/tool-result-helpers.d.ts +12 -0
- package/dist/processors/observational-memory/tool-result-helpers.d.ts.map +1 -0
- package/dist/processors/observational-memory/tracing.d.ts +17 -0
- package/dist/processors/observational-memory/tracing.d.ts.map +1 -0
- package/dist/processors/observational-memory/types.d.ts +997 -0
- package/dist/processors/observational-memory/types.d.ts.map +1 -0
- package/dist/processors/observational-memory/working-memory-extractor.d.ts +5 -0
- package/dist/processors/observational-memory/working-memory-extractor.d.ts.map +1 -0
- package/dist/processors/working-memory-state/index.d.ts +2 -0
- package/dist/processors/working-memory-state/index.d.ts.map +1 -0
- package/dist/processors/working-memory-state/processor.d.ts +53 -0
- package/dist/processors/working-memory-state/processor.d.ts.map +1 -0
- package/dist/src-C1tlhGeW.js +28559 -0
- package/dist/src-C1tlhGeW.js.map +1 -0
- package/dist/src-DqoifKIy.cjs +28813 -0
- package/dist/src-DqoifKIy.cjs.map +1 -0
- package/dist/tools/om-tools.d.ts +172 -0
- package/dist/tools/om-tools.d.ts.map +1 -0
- package/dist/tools/working-memory.d.ts +33 -28
- package/dist/tools/working-memory.d.ts.map +1 -1
- package/package.json +36 -28
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/processors/index.cjs.map +0 -1
- package/dist/processors/index.js.map +0 -1
- package/dist/processors/token-limiter.d.ts +0 -32
- package/dist/processors/token-limiter.d.ts.map +0 -1
- package/dist/processors/tool-call-filter.d.ts +0 -20
- package/dist/processors/tool-call-filter.d.ts.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,67 +1,117 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { embedMany } from './_types/@internal_ai-sdk-v4/dist/index.d.ts';
|
|
2
|
+
import type { MastraDBMessage } from '@mastra/core/agent';
|
|
3
|
+
import type { Mastra } from '@mastra/core/mastra';
|
|
2
4
|
import { MastraMemory } from '@mastra/core/memory';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
+
import type { MemoryConfigInternal, SharedMemoryConfig, StorageThreadType, WorkingMemoryTemplate, MessageDeleteInput, ObservationalMemoryOptions, MemoryConfig } from '@mastra/core/memory';
|
|
6
|
+
import type { ObservabilityContext } from '@mastra/core/observability';
|
|
7
|
+
import type { InputProcessor, InputProcessorOrWorkflow, OutputProcessor, OutputProcessorOrWorkflow } from '@mastra/core/processors';
|
|
8
|
+
import type { RequestContext } from '@mastra/core/request-context';
|
|
9
|
+
import type { StorageListThreadsInput, StorageListThreadsOutput, StorageListMessagesInput, StorageListMessagesByResourceIdInput, StorageListMessagesOutput, MemoryStorage, StorageCloneThreadInput, StorageCloneThreadOutput, ThreadCloneMetadata, ObservationalMemoryRecord } from '@mastra/core/storage';
|
|
5
10
|
import type { ToolAction } from '@mastra/core/tools';
|
|
6
|
-
import {
|
|
7
|
-
import type {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
+
import type { ObservationalMemory, ObservationalMemoryConfig } from './processors/observational-memory/index.js';
|
|
12
|
+
import type { SummarizeConversationOptions, SummarizeConversationResult } from './processors/observational-memory/summarize.js';
|
|
13
|
+
import { deepMergeWorkingMemory } from './tools/working-memory.js';
|
|
14
|
+
export { ModelByInputTokens, type ModelByInputTokensConfig, } from './processors/observational-memory/model-by-input-tokens.js';
|
|
15
|
+
export { Extractor, type ExtractorConfig, type ExtractorOnExtractedContext, type ExtractorRuntimeContext, type ExtractorSource, } from './processors/observational-memory/index.js';
|
|
16
|
+
export { WorkingMemoryExtractor } from './processors/observational-memory/working-memory-extractor.js';
|
|
17
|
+
export { summarizeConversation, SUMMARIZE_THREAD_DEFAULTS } from './processors/observational-memory/summarize.js';
|
|
18
|
+
export type { SummarizeConversationOptions, SummarizeConversationResult, SummarizeModel, } from './processors/observational-memory/summarize.js';
|
|
19
|
+
/**
|
|
20
|
+
* Normalize a `boolean | object` observational memory config.
|
|
21
|
+
* Returns the options object if enabled, undefined if disabled.
|
|
22
|
+
* Inlined here to avoid importing runtime exports that don't exist on older @mastra/core versions.
|
|
23
|
+
*/
|
|
24
|
+
type MemoryObservationalMemoryOptions = Omit<ObservationalMemoryOptions, 'model' | 'observation' | 'reflection'> & {
|
|
25
|
+
model?: ObservationalMemoryConfig['model'];
|
|
26
|
+
observation?: ObservationalMemoryConfig['observation'];
|
|
27
|
+
reflection?: ObservationalMemoryConfig['reflection'];
|
|
28
|
+
activateAfterIdle?: ObservationalMemoryConfig['activateAfterIdle'];
|
|
29
|
+
activateOnProviderChange?: ObservationalMemoryConfig['activateOnProviderChange'];
|
|
30
|
+
temporalMarkers?: boolean;
|
|
31
|
+
hooks?: ObservationalMemoryConfig['hooks'];
|
|
32
|
+
};
|
|
33
|
+
type MemoryOptions = Omit<MemoryConfigInternal, 'observationalMemory'> & {
|
|
34
|
+
observationalMemory?: boolean | MemoryObservationalMemoryOptions;
|
|
35
|
+
};
|
|
36
|
+
type MemoryConstructorConfig = Omit<SharedMemoryConfig, 'options'> & {
|
|
37
|
+
options?: MemoryOptions;
|
|
38
|
+
};
|
|
39
|
+
export declare function extractWorkingMemoryTags(text: string): string[] | null;
|
|
40
|
+
export declare function removeWorkingMemoryTags(text: string): string;
|
|
41
|
+
export declare function extractWorkingMemoryContent(text: string): string | null;
|
|
42
|
+
export { deepMergeWorkingMemory };
|
|
11
43
|
/**
|
|
12
44
|
* Concrete implementation of MastraMemory that adds support for thread configuration
|
|
13
45
|
* and message injection.
|
|
14
46
|
*/
|
|
15
47
|
export declare class Memory extends MastraMemory {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
48
|
+
private _omEngine;
|
|
49
|
+
private _omEngineInstance;
|
|
50
|
+
private _mastraInstance;
|
|
51
|
+
/** The shared ObservationalMemory engine. Lazily created on first access. */
|
|
52
|
+
get omEngine(): Promise<ObservationalMemory | null>;
|
|
53
|
+
__registerMastra(mastra: Mastra): void;
|
|
54
|
+
getMergedThreadConfig(config?: MemoryConfigInternal): MemoryConfigInternal;
|
|
55
|
+
private applyManagedWorkingMemoryDefaults;
|
|
56
|
+
constructor(config?: MemoryConstructorConfig);
|
|
57
|
+
/**
|
|
58
|
+
* Gets the memory storage domain, throwing if not available.
|
|
59
|
+
*/
|
|
60
|
+
protected getMemoryStore(): Promise<MemoryStorage>;
|
|
61
|
+
listMessagesByResourceId(args: StorageListMessagesByResourceIdInput): Promise<StorageListMessagesOutput>;
|
|
62
|
+
protected validateThreadIsOwnedByResource(threadId: string, resourceId: string, config: MemoryConfigInternal): Promise<void>;
|
|
63
|
+
private createMemorySpan;
|
|
64
|
+
recall(args: StorageListMessagesInput & {
|
|
65
|
+
threadConfig?: MemoryConfigInternal;
|
|
66
|
+
vectorSearchString?: string;
|
|
67
|
+
includeSystemReminders?: boolean;
|
|
27
68
|
threadId: string;
|
|
28
|
-
|
|
29
|
-
vectorMessageSearch?: string;
|
|
30
|
-
config?: MemoryConfig;
|
|
69
|
+
observabilityContext?: Partial<ObservabilityContext>;
|
|
31
70
|
}): Promise<{
|
|
32
|
-
messages:
|
|
33
|
-
|
|
71
|
+
messages: MastraDBMessage[];
|
|
72
|
+
usage?: {
|
|
73
|
+
tokens: number;
|
|
74
|
+
};
|
|
75
|
+
total: number;
|
|
76
|
+
page: number;
|
|
77
|
+
perPage: number | false;
|
|
78
|
+
hasMore: boolean;
|
|
34
79
|
}>;
|
|
35
|
-
getThreadById({ threadId }: {
|
|
80
|
+
getThreadById({ threadId, resourceId, }: {
|
|
36
81
|
threadId: string;
|
|
82
|
+
resourceId?: string;
|
|
37
83
|
}): Promise<StorageThreadType | null>;
|
|
38
|
-
|
|
39
|
-
resourceId: string;
|
|
40
|
-
} & ThreadSortOptions): Promise<StorageThreadType[]>;
|
|
41
|
-
getThreadsByResourceIdPaginated({ resourceId, page, perPage, orderBy, sortDirection, }: {
|
|
42
|
-
resourceId: string;
|
|
43
|
-
page: number;
|
|
44
|
-
perPage: number;
|
|
45
|
-
} & ThreadSortOptions): Promise<PaginationInfo & {
|
|
46
|
-
threads: StorageThreadType[];
|
|
47
|
-
}>;
|
|
84
|
+
listThreads(args: StorageListThreadsInput): Promise<StorageListThreadsOutput>;
|
|
48
85
|
private handleWorkingMemoryFromMetadata;
|
|
49
86
|
saveThread({ thread, memoryConfig, }: {
|
|
50
87
|
thread: StorageThreadType;
|
|
51
|
-
memoryConfig?:
|
|
88
|
+
memoryConfig?: MemoryConfigInternal;
|
|
52
89
|
}): Promise<StorageThreadType>;
|
|
53
90
|
updateThread({ id, title, metadata, memoryConfig, }: {
|
|
54
91
|
id: string;
|
|
55
92
|
title: string;
|
|
56
93
|
metadata: Record<string, unknown>;
|
|
57
|
-
memoryConfig?:
|
|
94
|
+
memoryConfig?: MemoryConfigInternal;
|
|
58
95
|
}): Promise<StorageThreadType>;
|
|
59
96
|
deleteThread(threadId: string): Promise<void>;
|
|
60
|
-
|
|
97
|
+
/**
|
|
98
|
+
* Lists all vector indexes that match the memory messages prefix.
|
|
99
|
+
* Handles separator differences across vector store backends (e.g. '_' vs '-').
|
|
100
|
+
*/
|
|
101
|
+
private getMemoryVectorIndexes;
|
|
102
|
+
/**
|
|
103
|
+
* Deletes all vector embeddings associated with a thread.
|
|
104
|
+
* This is called internally by deleteThread to clean up orphaned vectors.
|
|
105
|
+
*
|
|
106
|
+
* @param threadId - The ID of the thread whose vectors should be deleted
|
|
107
|
+
*/
|
|
108
|
+
private deleteThreadVectors;
|
|
109
|
+
updateWorkingMemory({ threadId, resourceId, workingMemory, memoryConfig, observabilityContext, }: {
|
|
61
110
|
threadId: string;
|
|
62
111
|
resourceId?: string;
|
|
63
112
|
workingMemory: string;
|
|
64
|
-
memoryConfig?:
|
|
113
|
+
memoryConfig?: MemoryConfigInternal;
|
|
114
|
+
observabilityContext?: Partial<ObservabilityContext>;
|
|
65
115
|
}): Promise<void>;
|
|
66
116
|
private updateWorkingMemoryMutexes;
|
|
67
117
|
/**
|
|
@@ -72,7 +122,7 @@ export declare class Memory extends MastraMemory {
|
|
|
72
122
|
resourceId?: string;
|
|
73
123
|
workingMemory: string;
|
|
74
124
|
searchString?: string;
|
|
75
|
-
memoryConfig?:
|
|
125
|
+
memoryConfig?: MemoryConfigInternal;
|
|
76
126
|
}): Promise<{
|
|
77
127
|
success: boolean;
|
|
78
128
|
reason: string;
|
|
@@ -84,25 +134,27 @@ export declare class Memory extends MastraMemory {
|
|
|
84
134
|
protected embedMessageContent(content: string): Promise<{
|
|
85
135
|
chunks: string[];
|
|
86
136
|
embeddings: Awaited<ReturnType<typeof embedMany>>["embeddings"];
|
|
137
|
+
usage?: {
|
|
138
|
+
tokens: number;
|
|
139
|
+
};
|
|
87
140
|
dimension: number | undefined;
|
|
88
141
|
}>;
|
|
89
|
-
saveMessages(
|
|
90
|
-
messages:
|
|
91
|
-
memoryConfig?: MemoryConfig | undefined;
|
|
92
|
-
format?: 'v1';
|
|
93
|
-
}): Promise<MastraMessageV1[]>;
|
|
94
|
-
saveMessages(args: {
|
|
95
|
-
messages: (MastraMessageV1 | MastraMessageV2)[] | MastraMessageV1[] | MastraMessageV2[];
|
|
142
|
+
saveMessages({ messages, memoryConfig, observabilityContext, }: {
|
|
143
|
+
messages: MastraDBMessage[];
|
|
96
144
|
memoryConfig?: MemoryConfig | undefined;
|
|
97
|
-
|
|
98
|
-
}): Promise<
|
|
99
|
-
|
|
100
|
-
|
|
145
|
+
observabilityContext?: Partial<ObservabilityContext>;
|
|
146
|
+
}): Promise<{
|
|
147
|
+
messages: MastraDBMessage[];
|
|
148
|
+
usage?: {
|
|
149
|
+
tokens: number;
|
|
150
|
+
};
|
|
151
|
+
}>;
|
|
152
|
+
protected updateMessageToHideWorkingMemoryV2(message: MastraDBMessage): MastraDBMessage | null;
|
|
101
153
|
protected parseWorkingMemory(text: string): string | null;
|
|
102
154
|
getWorkingMemory({ threadId, resourceId, memoryConfig, }: {
|
|
103
155
|
threadId: string;
|
|
104
156
|
resourceId?: string;
|
|
105
|
-
memoryConfig?:
|
|
157
|
+
memoryConfig?: MemoryConfigInternal;
|
|
106
158
|
}): Promise<string | null>;
|
|
107
159
|
/**
|
|
108
160
|
* Gets the working memory template for the current memory configuration.
|
|
@@ -112,13 +164,57 @@ export declare class Memory extends MastraMemory {
|
|
|
112
164
|
* @returns The working memory template with format and content, or null if working memory is disabled
|
|
113
165
|
*/
|
|
114
166
|
getWorkingMemoryTemplate({ memoryConfig, }: {
|
|
115
|
-
memoryConfig?:
|
|
167
|
+
memoryConfig?: MemoryConfigInternal;
|
|
116
168
|
}): Promise<WorkingMemoryTemplate | null>;
|
|
117
169
|
getSystemMessage({ threadId, resourceId, memoryConfig, }: {
|
|
118
170
|
threadId: string;
|
|
119
171
|
resourceId?: string;
|
|
120
|
-
memoryConfig?:
|
|
172
|
+
memoryConfig?: MemoryConfigInternal;
|
|
121
173
|
}): Promise<string | null>;
|
|
174
|
+
/**
|
|
175
|
+
* Get everything needed for an LLM call in one shot.
|
|
176
|
+
*
|
|
177
|
+
* Assembles the system message (observations + working memory), loads
|
|
178
|
+
* unobserved messages from storage, and returns them ready to use.
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ```ts
|
|
182
|
+
* const ctx = await memory.getContext({ threadId });
|
|
183
|
+
* const result = await generateText({
|
|
184
|
+
* model: openai('gpt-4o'),
|
|
185
|
+
* system: ctx.systemMessage,
|
|
186
|
+
* messages: ctx.messages.map(toAiSdkMessage),
|
|
187
|
+
* });
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
getContext(opts: {
|
|
191
|
+
threadId: string;
|
|
192
|
+
resourceId?: string;
|
|
193
|
+
memoryConfig?: MemoryConfigInternal;
|
|
194
|
+
}): Promise<{
|
|
195
|
+
/** Fully-formed system message (observations + instructions + working memory), or undefined if none. */
|
|
196
|
+
systemMessage: string | undefined;
|
|
197
|
+
/** Messages for the LLM — unobserved messages if OM is active, or recent messages from history. */
|
|
198
|
+
messages: MastraDBMessage[];
|
|
199
|
+
/** Whether observations exist for this thread. */
|
|
200
|
+
hasObservations: boolean;
|
|
201
|
+
/** The OM record, if OM is active. */
|
|
202
|
+
omRecord: ObservationalMemoryRecord | null;
|
|
203
|
+
/** The om-continuation reminder message, if OM has observations. Caller decides where to place it. */
|
|
204
|
+
continuationMessage: MastraDBMessage | undefined;
|
|
205
|
+
/** Formatted context blocks from other threads (resource scope only). */
|
|
206
|
+
otherThreadsContext: string | undefined;
|
|
207
|
+
}>;
|
|
208
|
+
/**
|
|
209
|
+
* Raw message upsert — persist messages to storage without embedding or working memory processing.
|
|
210
|
+
* Used by the processor to save sealed messages before firing a background buffer operation.
|
|
211
|
+
*/
|
|
212
|
+
persistMessages(messages: MastraDBMessage[]): Promise<void>;
|
|
213
|
+
/**
|
|
214
|
+
* One-time initialization of the shared ObservationalMemory engine.
|
|
215
|
+
* Called lazily by the `omEngine` getter on first access.
|
|
216
|
+
*/
|
|
217
|
+
private _initOMEngine;
|
|
122
218
|
defaultWorkingMemoryTemplate: string;
|
|
123
219
|
protected getWorkingMemoryToolInstruction({ template, data, }: {
|
|
124
220
|
template: WorkingMemoryTemplate;
|
|
@@ -128,18 +224,144 @@ export declare class Memory extends MastraMemory {
|
|
|
128
224
|
template: WorkingMemoryTemplate;
|
|
129
225
|
data: string | null;
|
|
130
226
|
}): string;
|
|
227
|
+
/**
|
|
228
|
+
* Generate read-only working memory instructions.
|
|
229
|
+
* This provides the working memory context without any tool update instructions.
|
|
230
|
+
* Used when memory is in readOnly mode.
|
|
231
|
+
*/
|
|
232
|
+
protected getReadOnlyWorkingMemoryInstruction({ data }: {
|
|
233
|
+
template: WorkingMemoryTemplate;
|
|
234
|
+
data: string | null;
|
|
235
|
+
}): string;
|
|
131
236
|
private isVNextWorkingMemoryConfig;
|
|
132
|
-
|
|
237
|
+
private assertWorkingMemoryStateSignalsCompatibility;
|
|
238
|
+
private getObservationEmbeddingIndexName;
|
|
239
|
+
private createObservationEmbeddingIndex;
|
|
133
240
|
/**
|
|
134
|
-
*
|
|
135
|
-
*
|
|
241
|
+
* Search observation groups across threads by semantic similarity.
|
|
242
|
+
* Requires a vector store and embedder to be configured.
|
|
243
|
+
*/
|
|
244
|
+
searchMessages({ query, resourceId, topK, filter, }: {
|
|
245
|
+
query: string;
|
|
246
|
+
resourceId: string;
|
|
247
|
+
topK?: number;
|
|
248
|
+
filter?: {
|
|
249
|
+
threadId?: string;
|
|
250
|
+
observedAfter?: Date;
|
|
251
|
+
observedBefore?: Date;
|
|
252
|
+
};
|
|
253
|
+
}): Promise<{
|
|
254
|
+
results: Array<{
|
|
255
|
+
threadId: string;
|
|
256
|
+
score: number;
|
|
257
|
+
groupId?: string;
|
|
258
|
+
range?: string;
|
|
259
|
+
text?: string;
|
|
260
|
+
observedAt?: Date;
|
|
261
|
+
}>;
|
|
262
|
+
}>;
|
|
263
|
+
/**
|
|
264
|
+
* Index a single observation group into the observation vector store.
|
|
265
|
+
*/
|
|
266
|
+
indexObservation({ text, groupId, range, threadId, resourceId, observedAt, }: {
|
|
267
|
+
text: string;
|
|
268
|
+
groupId: string;
|
|
269
|
+
range: string;
|
|
270
|
+
threadId: string;
|
|
271
|
+
resourceId: string;
|
|
272
|
+
observedAt?: Date;
|
|
273
|
+
}): Promise<void>;
|
|
274
|
+
/**
|
|
275
|
+
* Update per-record observational memory config overrides for a thread.
|
|
276
|
+
* The provided config is deep-merged, so you only need to specify fields you want to change.
|
|
277
|
+
*
|
|
278
|
+
* @example
|
|
279
|
+
* ```ts
|
|
280
|
+
* await memory.updateObservationalMemoryConfig({
|
|
281
|
+
* threadId: 'thread-1',
|
|
282
|
+
* config: {
|
|
283
|
+
* observation: { messageTokens: 2000 },
|
|
284
|
+
* reflection: { observationTokens: 8000 },
|
|
285
|
+
* },
|
|
286
|
+
* });
|
|
287
|
+
* ```
|
|
288
|
+
*/
|
|
289
|
+
updateObservationalMemoryConfig({ threadId, resourceId, config, }: {
|
|
290
|
+
threadId: string;
|
|
291
|
+
resourceId?: string;
|
|
292
|
+
config: Record<string, unknown>;
|
|
293
|
+
}): Promise<void>;
|
|
294
|
+
/**
|
|
295
|
+
* Summarize one of this memory's threads in one shot.
|
|
296
|
+
*
|
|
297
|
+
* Loads the thread's messages from storage and runs `summarizeConversation()` over them —
|
|
298
|
+
* Observational Memory's Observer plumbing as a standalone call. Nothing is written back to
|
|
299
|
+
* memory: the summary and extracted values are returned to you (and to each extractor's
|
|
300
|
+
* `onExtracted` hook), so you decide where they go. Works whether or not observational
|
|
301
|
+
* memory is enabled on this instance.
|
|
302
|
+
*
|
|
303
|
+
* Use this when a session ends and you want a summary or structured extraction of the whole
|
|
304
|
+
* conversation — for example a voice call at hang-up.
|
|
305
|
+
*
|
|
306
|
+
* Messages are loaded page-by-page starting from the newest, bounded by `lastMessages` and
|
|
307
|
+
* `maxInputTokens`, so summarizing a very long thread doesn't read its entire history from
|
|
308
|
+
* storage.
|
|
309
|
+
*
|
|
310
|
+
* @example
|
|
311
|
+
* ```ts
|
|
312
|
+
* const result = await memory.summarizeThread({
|
|
313
|
+
* model: 'openai/gpt-4.1-mini',
|
|
314
|
+
* threadId: call.threadId,
|
|
315
|
+
* instructions: 'Summarize this voicemail call for the business owner.',
|
|
316
|
+
* extract: [callSummaryExtractor],
|
|
317
|
+
* });
|
|
318
|
+
* ```
|
|
319
|
+
*/
|
|
320
|
+
summarizeThread(opts: {
|
|
321
|
+
threadId: string;
|
|
322
|
+
resourceId?: string;
|
|
323
|
+
/** Only summarize the last N messages of the thread. By default the whole thread is loaded, bounded by `maxInputTokens`. */
|
|
324
|
+
lastMessages?: number;
|
|
325
|
+
/**
|
|
326
|
+
* Stop loading older messages once the collected messages exceed this estimated token count,
|
|
327
|
+
* so very long threads don't get read from storage in full. The newest message is always
|
|
328
|
+
* included. Defaults to 1,000,000 tokens.
|
|
329
|
+
*/
|
|
330
|
+
maxInputTokens?: number;
|
|
331
|
+
} & Omit<SummarizeConversationOptions, 'messages' | 'memory' | 'mastra' | 'threadId' | 'resourceId'>): Promise<SummarizeConversationResult>;
|
|
332
|
+
/**
|
|
333
|
+
* Load a thread's messages for `summarizeThread()` without reading the whole thread from
|
|
334
|
+
* storage at once. Pages backwards from the newest message and stops once `lastMessages`
|
|
335
|
+
* messages are collected or the estimated token count crosses `maxInputTokens` (the newest
|
|
336
|
+
* message is always kept). Returns messages in chronological order.
|
|
337
|
+
*/
|
|
338
|
+
private loadMessagesForSummarization;
|
|
339
|
+
/**
|
|
340
|
+
* Index a list of messages directly (without querying storage).
|
|
341
|
+
* Used by observe-time indexing to vectorize newly-observed messages.
|
|
342
|
+
*/
|
|
343
|
+
private indexMessagesList;
|
|
344
|
+
/**
|
|
345
|
+
* Check whether retrieval search (vector-based) is enabled.
|
|
346
|
+
* Returns true when `retrieval: { vector: true }` and Memory has vector + embedder configured.
|
|
347
|
+
*/
|
|
348
|
+
hasRetrievalSearch(retrieval: ObservationalMemoryOptions['retrieval']): boolean;
|
|
349
|
+
listTools(config?: MemoryConfigInternal): Record<string, ToolAction<any, any, any>>;
|
|
350
|
+
/**
|
|
351
|
+
* Updates a list of messages and syncs the vector database for semantic recall.
|
|
352
|
+
* When message content is updated, the corresponding vector embeddings are also updated
|
|
353
|
+
* to ensure semantic recall stays in sync with the message content.
|
|
354
|
+
*
|
|
355
|
+
* @param messages - The list of messages to update (must include id, can include partial content)
|
|
356
|
+
* @param memoryConfig - Optional memory configuration to determine if semantic recall is enabled
|
|
136
357
|
* @returns The list of updated messages
|
|
137
358
|
*/
|
|
138
|
-
updateMessages({ messages, }: {
|
|
139
|
-
messages: Partial<
|
|
359
|
+
updateMessages({ messages, memoryConfig, }: {
|
|
360
|
+
messages: (Partial<MastraDBMessage> & {
|
|
140
361
|
id: string;
|
|
141
|
-
}[];
|
|
142
|
-
|
|
362
|
+
})[];
|
|
363
|
+
memoryConfig?: MemoryConfigInternal;
|
|
364
|
+
}): Promise<MastraDBMessage[]>;
|
|
143
365
|
/**
|
|
144
366
|
* Deletes one or more messages
|
|
145
367
|
* @param input - Must be an array containing either:
|
|
@@ -147,6 +369,187 @@ export declare class Memory extends MastraMemory {
|
|
|
147
369
|
* - Message objects with 'id' properties
|
|
148
370
|
* @returns Promise that resolves when all messages are deleted
|
|
149
371
|
*/
|
|
150
|
-
deleteMessages(input: MessageDeleteInput): Promise<void>;
|
|
372
|
+
deleteMessages(input: MessageDeleteInput, observabilityContext?: Partial<ObservabilityContext>): Promise<void>;
|
|
373
|
+
/**
|
|
374
|
+
* Deletes vector embeddings for specific messages.
|
|
375
|
+
* This is called internally by deleteMessages to clean up orphaned vectors.
|
|
376
|
+
*
|
|
377
|
+
* @param messageIds - The IDs of the messages whose vectors should be deleted
|
|
378
|
+
*/
|
|
379
|
+
private deleteMessageVectors;
|
|
380
|
+
/**
|
|
381
|
+
* Clone a thread and its messages to create a new independent thread.
|
|
382
|
+
* The cloned thread will have metadata tracking its source.
|
|
383
|
+
*
|
|
384
|
+
* If semantic recall is enabled, the cloned messages will also be embedded
|
|
385
|
+
* and added to the vector store for semantic search.
|
|
386
|
+
*
|
|
387
|
+
* @param args - Clone configuration options
|
|
388
|
+
* @param args.sourceThreadId - ID of the thread to clone
|
|
389
|
+
* @param args.newThreadId - ID for the new cloned thread (if not provided, a random UUID will be generated)
|
|
390
|
+
* @param args.resourceId - Resource ID for the new thread (defaults to source thread's resourceId)
|
|
391
|
+
* @param args.title - Title for the new cloned thread
|
|
392
|
+
* @param args.metadata - Additional metadata to merge with clone metadata
|
|
393
|
+
* @param args.options - Options for filtering which messages to include
|
|
394
|
+
* @param args.options.messageLimit - Maximum number of messages to copy (from most recent)
|
|
395
|
+
* @param args.options.messageFilter - Filter messages by date range or specific IDs
|
|
396
|
+
* @param memoryConfig - Optional memory configuration override
|
|
397
|
+
* @returns The newly created thread and the cloned messages
|
|
398
|
+
*
|
|
399
|
+
* @example
|
|
400
|
+
* ```typescript
|
|
401
|
+
* // Clone entire thread
|
|
402
|
+
* const { thread, clonedMessages } = await memory.cloneThread({
|
|
403
|
+
* sourceThreadId: 'thread-123',
|
|
404
|
+
* });
|
|
405
|
+
*
|
|
406
|
+
* // Clone with custom ID
|
|
407
|
+
* const { thread, clonedMessages } = await memory.cloneThread({
|
|
408
|
+
* sourceThreadId: 'thread-123',
|
|
409
|
+
* newThreadId: 'my-custom-thread-id',
|
|
410
|
+
* });
|
|
411
|
+
*
|
|
412
|
+
* // Clone with message limit
|
|
413
|
+
* const { thread, clonedMessages } = await memory.cloneThread({
|
|
414
|
+
* sourceThreadId: 'thread-123',
|
|
415
|
+
* title: 'My cloned conversation',
|
|
416
|
+
* options: {
|
|
417
|
+
* messageLimit: 10, // Only clone last 10 messages
|
|
418
|
+
* },
|
|
419
|
+
* });
|
|
420
|
+
*
|
|
421
|
+
* // Clone with date filter
|
|
422
|
+
* const { thread, clonedMessages } = await memory.cloneThread({
|
|
423
|
+
* sourceThreadId: 'thread-123',
|
|
424
|
+
* options: {
|
|
425
|
+
* messageFilter: {
|
|
426
|
+
* startDate: new Date('2024-01-01'),
|
|
427
|
+
* endDate: new Date('2024-06-01'),
|
|
428
|
+
* },
|
|
429
|
+
* },
|
|
430
|
+
* });
|
|
431
|
+
* ```
|
|
432
|
+
*/
|
|
433
|
+
cloneThread(args: StorageCloneThreadInput, memoryConfig?: MemoryConfigInternal): Promise<StorageCloneThreadOutput>;
|
|
434
|
+
/**
|
|
435
|
+
* Clone observational memory records when cloning a thread.
|
|
436
|
+
* Thread-scoped: always cloned to the new thread.
|
|
437
|
+
* Resource-scoped: cloned only when the resourceId changes (same resourceId shares OM naturally).
|
|
438
|
+
* All stored message/thread IDs are remapped to the cloned IDs.
|
|
439
|
+
*/
|
|
440
|
+
private cloneObservationalMemory;
|
|
441
|
+
/**
|
|
442
|
+
* Create a remapped copy of an OM record with new thread/message IDs.
|
|
443
|
+
*/
|
|
444
|
+
private remapObservationalMemoryRecord;
|
|
445
|
+
/**
|
|
446
|
+
* Embed cloned messages for semantic recall.
|
|
447
|
+
* This is similar to the embedding logic in saveMessages but operates on already-saved messages.
|
|
448
|
+
*/
|
|
449
|
+
private embedClonedMessages;
|
|
450
|
+
/**
|
|
451
|
+
* Get the clone metadata from a thread if it was cloned from another thread.
|
|
452
|
+
*
|
|
453
|
+
* @param thread - The thread to check
|
|
454
|
+
* @returns The clone metadata if the thread is a clone, null otherwise
|
|
455
|
+
*
|
|
456
|
+
* @example
|
|
457
|
+
* ```typescript
|
|
458
|
+
* const thread = await memory.getThreadById({ threadId: 'thread-123' });
|
|
459
|
+
* const cloneInfo = memory.getCloneMetadata(thread);
|
|
460
|
+
* if (cloneInfo) {
|
|
461
|
+
* console.log(`This thread was cloned from ${cloneInfo.sourceThreadId}`);
|
|
462
|
+
* }
|
|
463
|
+
* ```
|
|
464
|
+
*/
|
|
465
|
+
getCloneMetadata(thread: StorageThreadType | null): ThreadCloneMetadata | null;
|
|
466
|
+
/**
|
|
467
|
+
* Check if a thread is a clone of another thread.
|
|
468
|
+
*
|
|
469
|
+
* @param thread - The thread to check
|
|
470
|
+
* @returns True if the thread is a clone, false otherwise
|
|
471
|
+
*
|
|
472
|
+
* @example
|
|
473
|
+
* ```typescript
|
|
474
|
+
* const thread = await memory.getThreadById({ threadId: 'thread-123' });
|
|
475
|
+
* if (memory.isClone(thread)) {
|
|
476
|
+
* console.log('This is a cloned thread');
|
|
477
|
+
* }
|
|
478
|
+
* ```
|
|
479
|
+
*/
|
|
480
|
+
isClone(thread: StorageThreadType | null): boolean;
|
|
481
|
+
/**
|
|
482
|
+
* Get the source thread that a cloned thread was created from.
|
|
483
|
+
*
|
|
484
|
+
* @param threadId - ID of the cloned thread
|
|
485
|
+
* @returns The source thread if found, null if the thread is not a clone or source doesn't exist
|
|
486
|
+
*
|
|
487
|
+
* @example
|
|
488
|
+
* ```typescript
|
|
489
|
+
* const sourceThread = await memory.getSourceThread('cloned-thread-123');
|
|
490
|
+
* if (sourceThread) {
|
|
491
|
+
* console.log(`Original thread: ${sourceThread.title}`);
|
|
492
|
+
* }
|
|
493
|
+
* ```
|
|
494
|
+
*/
|
|
495
|
+
getSourceThread(threadId: string): Promise<StorageThreadType | null>;
|
|
496
|
+
/**
|
|
497
|
+
* List all threads that were cloned from a specific source thread.
|
|
498
|
+
*
|
|
499
|
+
* @param sourceThreadId - ID of the source thread
|
|
500
|
+
* @param resourceId - Optional resource ID to filter by
|
|
501
|
+
* @returns Array of threads that are clones of the source thread
|
|
502
|
+
*
|
|
503
|
+
* @example
|
|
504
|
+
* ```typescript
|
|
505
|
+
* const clones = await memory.listClones('original-thread-123', 'user-456');
|
|
506
|
+
* console.log(`Found ${clones.length} clones of this thread`);
|
|
507
|
+
* ```
|
|
508
|
+
*/
|
|
509
|
+
listClones(sourceThreadId: string, resourceId?: string): Promise<StorageThreadType[]>;
|
|
510
|
+
/**
|
|
511
|
+
* Get the clone history chain for a thread (all ancestors back to the original).
|
|
512
|
+
*
|
|
513
|
+
* @param threadId - ID of the thread to get history for
|
|
514
|
+
* @returns Array of threads from oldest ancestor to the given thread (inclusive)
|
|
515
|
+
*
|
|
516
|
+
* @example
|
|
517
|
+
* ```typescript
|
|
518
|
+
* const history = await memory.getCloneHistory('deeply-cloned-thread');
|
|
519
|
+
* // Returns: [originalThread, firstClone, secondClone, deeplyClonedThread]
|
|
520
|
+
* ```
|
|
521
|
+
*/
|
|
522
|
+
getCloneHistory(threadId: string): Promise<StorageThreadType[]>;
|
|
523
|
+
/**
|
|
524
|
+
* Get input processors for this memory instance.
|
|
525
|
+
* Extends the base implementation to add ObservationalMemory processor when configured.
|
|
526
|
+
*
|
|
527
|
+
* @param configuredProcessors - Processors already configured by the user (for deduplication)
|
|
528
|
+
* @param context - Request context for runtime configuration
|
|
529
|
+
* @returns Array of input processors configured for this memory instance
|
|
530
|
+
*/
|
|
531
|
+
getInputProcessors(configuredProcessors?: InputProcessorOrWorkflow[], context?: RequestContext): Promise<InputProcessor[]>;
|
|
532
|
+
/**
|
|
533
|
+
* Extends the base implementation to add ObservationalMemory as an output processor.
|
|
534
|
+
* OM needs processOutputResult to save messages at the end of the agent turn,
|
|
535
|
+
* even when the observation threshold was never reached during the loop.
|
|
536
|
+
*/
|
|
537
|
+
getOutputProcessors(configuredProcessors?: OutputProcessorOrWorkflow[], context?: RequestContext): Promise<OutputProcessor[]>;
|
|
538
|
+
/**
|
|
539
|
+
* Creates an ObservationalMemory processor wrapping the shared engine.
|
|
540
|
+
* Returns null if OM is not configured, not supported, or already present
|
|
541
|
+
* in the user's configured processors.
|
|
542
|
+
*/
|
|
543
|
+
private createOMProcessor;
|
|
544
|
+
/**
|
|
545
|
+
* Creates a WorkingMemoryStateProcessor when working memory is enabled and the
|
|
546
|
+
* `useStateSignals` opt-in is set. Returns null otherwise or if the processor
|
|
547
|
+
* is already present in the user's configured processors.
|
|
548
|
+
*/
|
|
549
|
+
private createWorkingMemoryStateProcessor;
|
|
151
550
|
}
|
|
551
|
+
export { SemanticRecall, WorkingMemory, MessageHistory } from '@mastra/core/processors';
|
|
552
|
+
export type { StorageCloneThreadInput, StorageCloneThreadOutput, ThreadCloneMetadata } from '@mastra/core/storage';
|
|
553
|
+
export { getObservationsAsOf } from './processors/observational-memory/index.js';
|
|
554
|
+
export { WorkingMemoryStateProcessor, WORKING_MEMORY_STATE_ID, WORKING_MEMORY_STATE_PROCESSOR_ID, } from './processors/working-memory-state/index.js';
|
|
152
555
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAKhD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,0BAA0B,EAC1B,YAAY,EACb,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,oBAAoB,EAA6B,MAAM,4BAA4B,CAAC;AAClG,OAAO,KAAK,EACV,cAAc,EACd,wBAAwB,EACxB,eAAe,EACf,yBAAyB,EAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EACV,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,oCAAoC,EACpC,yBAAyB,EACzB,aAAa,EACb,uBAAuB,EACvB,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EAE1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAQrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAExG,OAAO,KAAK,EACV,4BAA4B,EAC5B,2BAA2B,EAC5B,MAAM,6CAA6C,CAAC;AAIrD,OAAO,EAA2B,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEzF,OAAO,EACL,kBAAkB,EAClB,KAA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