@mastra/oracledb 0.5.1 → 0.5.2-alpha.1
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/_types/@internal_core/dist/memory/index.d.ts +102 -0
- package/dist/_types/@internal_core/package.json +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-memory-observational-memory.md +17 -15
- package/dist/index.cjs +677 -170
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +678 -171
- package/dist/index.js.map +1 -1
- package/dist/storage/db/run-fencing.d.ts +32 -0
- package/dist/storage/db/run-fencing.d.ts.map +1 -0
- package/dist/storage/domains/memory/index.d.ts +28 -8
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/memory/messages.d.ts +6 -4
- package/dist/storage/domains/memory/messages.d.ts.map +1 -1
- package/dist/storage/domains/memory/observational-buffering.d.ts +6 -5
- package/dist/storage/domains/memory/observational-buffering.d.ts.map +1 -1
- package/dist/storage/domains/memory/observational.d.ts +25 -3
- package/dist/storage/domains/memory/observational.d.ts.map +1 -1
- package/dist/storage/domains/memory/resources.d.ts +3 -2
- package/dist/storage/domains/memory/resources.d.ts.map +1 -1
- package/dist/storage/domains/memory/schema.d.ts +11 -0
- package/dist/storage/domains/memory/schema.d.ts.map +1 -1
- package/dist/storage/domains/memory/threads.d.ts +5 -3
- package/dist/storage/domains/memory/threads.d.ts.map +1 -1
- package/dist/storage/domains/memory/utils.d.ts +15 -2
- package/dist/storage/domains/memory/utils.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +19 -6
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +5 -4
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { RunFence } from '@mastra/core/storage';
|
|
2
|
+
import type { OracleDB, OracleTxClient } from './index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Epoch milliseconds on the database clock. Oracle evaluates `SYSTIMESTAMP`
|
|
5
|
+
* once per statement, so every reference here reads the same instant, and a
|
|
6
|
+
* statement that waits on a lock compares against the time it started. That
|
|
7
|
+
* error only makes an existing lease look longer and a new lease shorter.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DB_NOW_MS = "(EXTRACT(DAY FROM (SYS_EXTRACT_UTC(SYSTIMESTAMP) - TIMESTAMP '1970-01-01 00:00:00')) * 86400000 + EXTRACT(HOUR FROM (SYS_EXTRACT_UTC(SYSTIMESTAMP) - TIMESTAMP '1970-01-01 00:00:00')) * 3600000 + EXTRACT(MINUTE FROM (SYS_EXTRACT_UTC(SYSTIMESTAMP) - TIMESTAMP '1970-01-01 00:00:00')) * 60000 + FLOOR(EXTRACT(SECOND FROM (SYS_EXTRACT_UTC(SYSTIMESTAMP) - TIMESTAMP '1970-01-01 00:00:00')) * 1000))";
|
|
10
|
+
/**
|
|
11
|
+
* The check half of a fenced write; call it first inside the write's
|
|
12
|
+
* transaction. Oracle has no shared row lock, so this takes the claim row
|
|
13
|
+
* `FOR UPDATE`: a claim that updates the row waits for the write to commit,
|
|
14
|
+
* and a write queued behind a claim re-reads the row once the claim commits
|
|
15
|
+
* and sees the new generation. Writes from one run serialize on its row,
|
|
16
|
+
* which they mostly do anyway.
|
|
17
|
+
*/
|
|
18
|
+
export declare function assertRunFence(client: OracleTxClient, claimsTable: string, fence: RunFence, operation: string): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Runs `write` in a transaction, behind the fence check when it carries a
|
|
21
|
+
* fence.
|
|
22
|
+
*/
|
|
23
|
+
export declare function withRunFence<T>(db: OracleDB, claimsTable: string, fence: RunFence | undefined, operation: string, write: (client: OracleTxClient) => Promise<T>): Promise<T>;
|
|
24
|
+
/**
|
|
25
|
+
* Runs a transaction that creates or updates a run's claim row, retrying when
|
|
26
|
+
* two first claims race to insert it. `FOR UPDATE` locks nothing while the row
|
|
27
|
+
* is missing, so racing first claims both insert; the second waits on the
|
|
28
|
+
* primary key and fails once the first commits. On retry the row exists and
|
|
29
|
+
* the claim serializes behind its row lock. A deadlock is retried too.
|
|
30
|
+
*/
|
|
31
|
+
export declare function claimTransaction<T>(db: OracleDB, fn: (client: OracleTxClient) => Promise<T>): Promise<T>;
|
|
32
|
+
//# sourceMappingURL=run-fencing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-fencing.d.ts","sourceRoot":"","sources":["../../../src/storage/db/run-fencing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIrD,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAIxD;;;;;GAKG;AACH,eAAO,MAAM,SAAS,8YAAkM,CAAC;AAMzN;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,cAAc,EACtB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,QAAQ,EACf,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CASf;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,EAAE,EAAE,QAAQ,EACZ,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,QAAQ,GAAG,SAAS,EAC3B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,OAAO,CAAC,CAAC,CAAC,GAC5C,OAAO,CAAC,CAAC,CAAC,CAKZ;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAS9G"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { type UpdateActiveObservationsResult, type UpdateBufferedObservationsResult } from '../../../_types/@internal_core/dist/memory/index.js';
|
|
1
2
|
import type { MastraMessageContentV2 } from '@mastra/core/agent';
|
|
2
3
|
import type { MastraDBMessage, StorageThreadType } from '@mastra/core/memory';
|
|
3
4
|
import { MemoryStorage } from '@mastra/core/storage';
|
|
4
|
-
import type { CreateObservationalMemoryInput, CreateReflectionGenerationInput, ObservationalMemoryHistoryOptions, ObservationalMemoryRecord, StorageCloneThreadInput, StorageCloneThreadOutput, StorageListMessagesByResourceIdInput, StorageListMessagesInput, StorageListMessagesOutput, StorageListThreadsInput, StorageListThreadsOutput, StorageResourceType, SwapBufferedReflectionToActiveInput, SwapBufferedToActiveInput, SwapBufferedToActiveResult, UpdateActiveObservationsInput, UpdateBufferedObservationsInput, UpdateBufferedReflectionInput, UpdateObservationalMemoryConfigInput } from '@mastra/core/storage';
|
|
5
|
+
import type { CreateObservationalMemoryInput, CreateReflectionGenerationInput, ObservationalMemoryHistoryOptions, ObservationalMemoryRecord, RunFence, StorageCloneThreadInput, StorageCloneThreadOutput, StorageListMessagesByResourceIdInput, StorageListMessagesInput, StorageListMessagesOutput, StorageListThreadsInput, StorageListThreadsOutput, StorageResourceType, SwapBufferedReflectionToActiveInput, SwapBufferedToActiveInput, SwapBufferedToActiveResult, UpdateActiveObservationsInput, UpdateBufferedObservationsInput, UpdateBufferedReflectionInput, UpdateObservationalMemoryConfigInput } from '@mastra/core/storage';
|
|
5
6
|
import type { OracleDomainConfig } from '../../types.js';
|
|
6
7
|
export declare class MemoryOracle extends MemoryStorage {
|
|
7
8
|
readonly supportsPartialThreadUpdate = true;
|
|
8
9
|
readonly supportsObservationalMemory = true;
|
|
9
10
|
readonly supportsObservationalMemoryHistorySearch = true;
|
|
10
|
-
static readonly MANAGED_TABLES: readonly ["mastra_threads", "mastra_messages", "mastra_resources", "mastra_observational_memory"];
|
|
11
|
+
static readonly MANAGED_TABLES: readonly ["mastra_threads", "mastra_messages", "mastra_resources", "mastra_observational_memory", "mastra_memory_run_fences"];
|
|
11
12
|
private readonly db;
|
|
12
13
|
private readonly schemaName?;
|
|
13
14
|
private readonly messageBatchSize;
|
|
@@ -17,18 +18,30 @@ export declare class MemoryOracle extends MemoryStorage {
|
|
|
17
18
|
constructor(config: OracleDomainConfig);
|
|
18
19
|
private get ctx();
|
|
19
20
|
init(): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Mark observational memory rows that are not their key's canonical head as superseded.
|
|
23
|
+
* Runs as part of `init()`; `OracleStore` also runs it on every start when the memory schema
|
|
24
|
+
* migration is unchanged and skipped.
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
backfillObservationalMemorySupersededBy(): Promise<void>;
|
|
20
28
|
dangerouslyClearAll(): Promise<void>;
|
|
29
|
+
supportsRunFencing(): boolean;
|
|
30
|
+
raiseRunFence(fence: RunFence): Promise<boolean>;
|
|
31
|
+
retireRunFence(fence: RunFence): Promise<boolean>;
|
|
21
32
|
getThreadById(args: {
|
|
22
33
|
threadId: string;
|
|
23
34
|
resourceId?: string;
|
|
24
35
|
}): Promise<StorageThreadType | null>;
|
|
25
|
-
saveThread(args: {
|
|
36
|
+
saveThread({ fence, ...args }: {
|
|
26
37
|
thread: StorageThreadType;
|
|
38
|
+
fence?: RunFence;
|
|
27
39
|
}): Promise<StorageThreadType>;
|
|
28
|
-
updateThread(args: {
|
|
40
|
+
updateThread({ fence, ...args }: {
|
|
29
41
|
id: string;
|
|
30
42
|
title?: string;
|
|
31
43
|
metadata?: Record<string, unknown>;
|
|
44
|
+
fence?: RunFence;
|
|
32
45
|
}): Promise<StorageThreadType>;
|
|
33
46
|
deleteThread(args: {
|
|
34
47
|
threadId: string;
|
|
@@ -45,12 +58,13 @@ export declare class MemoryOracle extends MemoryStorage {
|
|
|
45
58
|
}>;
|
|
46
59
|
listMessages(args: StorageListMessagesInput): Promise<StorageListMessagesOutput>;
|
|
47
60
|
listMessagesByResourceId(args: StorageListMessagesByResourceIdInput): Promise<StorageListMessagesOutput>;
|
|
48
|
-
saveMessages(args: {
|
|
61
|
+
saveMessages({ fence, ...args }: {
|
|
49
62
|
messages: MastraDBMessage[];
|
|
63
|
+
fence?: RunFence;
|
|
50
64
|
}): Promise<{
|
|
51
65
|
messages: MastraDBMessage[];
|
|
52
66
|
}>;
|
|
53
|
-
updateMessages(args: {
|
|
67
|
+
updateMessages({ fence, ...args }: {
|
|
54
68
|
messages: (Partial<Omit<MastraDBMessage, 'createdAt'>> & {
|
|
55
69
|
id: string;
|
|
56
70
|
content?: {
|
|
@@ -58,18 +72,22 @@ export declare class MemoryOracle extends MemoryStorage {
|
|
|
58
72
|
content?: MastraMessageContentV2['content'];
|
|
59
73
|
};
|
|
60
74
|
})[];
|
|
75
|
+
fence?: RunFence;
|
|
61
76
|
}): Promise<MastraDBMessage[]>;
|
|
62
|
-
deleteMessages(messageIds: string[]
|
|
77
|
+
deleteMessages(messageIds: string[], options?: {
|
|
78
|
+
fence?: RunFence;
|
|
79
|
+
}): Promise<void>;
|
|
63
80
|
getResourceById(args: {
|
|
64
81
|
resourceId: string;
|
|
65
82
|
}): Promise<StorageResourceType | null>;
|
|
66
83
|
saveResource(args: {
|
|
67
84
|
resource: StorageResourceType;
|
|
68
85
|
}): Promise<StorageResourceType>;
|
|
69
|
-
updateResource(args: {
|
|
86
|
+
updateResource({ fence, ...args }: {
|
|
70
87
|
resourceId: string;
|
|
71
88
|
workingMemory?: string;
|
|
72
89
|
metadata?: Record<string, unknown>;
|
|
90
|
+
fence?: RunFence;
|
|
73
91
|
}): Promise<StorageResourceType>;
|
|
74
92
|
cloneThread(args: StorageCloneThreadInput): Promise<StorageCloneThreadOutput>;
|
|
75
93
|
private messagesForClone;
|
|
@@ -78,6 +96,7 @@ export declare class MemoryOracle extends MemoryStorage {
|
|
|
78
96
|
initializeObservationalMemory(input: CreateObservationalMemoryInput): Promise<ObservationalMemoryRecord>;
|
|
79
97
|
insertObservationalMemoryRecord(record: ObservationalMemoryRecord): Promise<void>;
|
|
80
98
|
updateActiveObservations(input: UpdateActiveObservationsInput): Promise<void>;
|
|
99
|
+
commitActiveObservations(input: UpdateActiveObservationsInput): Promise<UpdateActiveObservationsResult>;
|
|
81
100
|
createReflectionGeneration(input: CreateReflectionGenerationInput): Promise<ObservationalMemoryRecord>;
|
|
82
101
|
setReflectingFlag(id: string, isReflecting: boolean): Promise<void>;
|
|
83
102
|
setObservingFlag(id: string, isObserving: boolean): Promise<void>;
|
|
@@ -87,6 +106,7 @@ export declare class MemoryOracle extends MemoryStorage {
|
|
|
87
106
|
setPendingMessageTokens(id: string, tokenCount: number): Promise<void>;
|
|
88
107
|
updateObservationalMemoryConfig(input: UpdateObservationalMemoryConfigInput): Promise<void>;
|
|
89
108
|
updateBufferedObservations(input: UpdateBufferedObservationsInput): Promise<void>;
|
|
109
|
+
appendBufferedObservations(input: UpdateBufferedObservationsInput): Promise<UpdateBufferedObservationsResult>;
|
|
90
110
|
swapBufferedToActive(input: SwapBufferedToActiveInput): Promise<SwapBufferedToActiveResult>;
|
|
91
111
|
updateBufferedReflection(input: UpdateBufferedReflectionInput): Promise<void>;
|
|
92
112
|
swapBufferedReflectionToActive(input: SwapBufferedReflectionToActiveInput): Promise<ObservationalMemoryRecord>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EACL,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACtC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;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2BAA2B,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,oBAAoB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEhH;IAEK,0BAA0B,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAEhF;IAEK,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEzF;IAEK,uBAAuB,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE3E;IAEK,+BAA+B,CAAC,KAAK,EAAE,oCAAoC,GAAG,OAAO,CAAC,IAAI,CAAC,CAEhG;IAEK,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,GAAG,OAAO,CAAC,IAAI,CAAC,CAEtF;IAEK,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAElH;IAEK,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAEhG;IAEK,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC,CAElF;IAEK,8BAA8B,CAAC,KAAK,EAAE,mCAAmC,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAEnH;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MastraMessageContentV2 } from '@mastra/core/agent';
|
|
2
2
|
import type { MastraDBMessage } from '@mastra/core/memory';
|
|
3
|
-
import type { StorageListMessagesByResourceIdInput, StorageListMessagesInput, StorageListMessagesOutput } from '@mastra/core/storage';
|
|
3
|
+
import type { RunFence, StorageListMessagesByResourceIdInput, StorageListMessagesInput, StorageListMessagesOutput } from '@mastra/core/storage';
|
|
4
4
|
import type { OracleTxClient } from '../../db/index.js';
|
|
5
5
|
import type { MemoryContext } from './utils.js';
|
|
6
6
|
export declare function listMessagesById(ctx: MemoryContext, { messageIds }: {
|
|
@@ -10,8 +10,9 @@ export declare function listMessagesById(ctx: MemoryContext, { messageIds }: {
|
|
|
10
10
|
}>;
|
|
11
11
|
export declare function listMessages(ctx: MemoryContext, args: StorageListMessagesInput): Promise<StorageListMessagesOutput>;
|
|
12
12
|
export declare function listMessagesByResourceId(ctx: MemoryContext, args: StorageListMessagesByResourceIdInput): Promise<StorageListMessagesOutput>;
|
|
13
|
-
export declare function saveMessages(ctx: MemoryContext, { messages }: {
|
|
13
|
+
export declare function saveMessages(ctx: MemoryContext, { messages, fence }: {
|
|
14
14
|
messages: MastraDBMessage[];
|
|
15
|
+
fence?: RunFence;
|
|
15
16
|
}): Promise<{
|
|
16
17
|
messages: MastraDBMessage[];
|
|
17
18
|
}>;
|
|
@@ -24,7 +25,7 @@ export declare function saveMessages(ctx: MemoryContext, { messages }: {
|
|
|
24
25
|
* thread exists; `saveMessages` checks that before opening its transaction.
|
|
25
26
|
*/
|
|
26
27
|
export declare function insertMessageBatch(ctx: MemoryContext, client: OracleTxClient, messages: MastraDBMessage[]): Promise<void>;
|
|
27
|
-
export declare function updateMessages(ctx: MemoryContext, { messages, }: {
|
|
28
|
+
export declare function updateMessages(ctx: MemoryContext, { messages, fence, }: {
|
|
28
29
|
messages: (Partial<Omit<MastraDBMessage, 'createdAt'>> & {
|
|
29
30
|
id: string;
|
|
30
31
|
content?: {
|
|
@@ -32,6 +33,7 @@ export declare function updateMessages(ctx: MemoryContext, { messages, }: {
|
|
|
32
33
|
content?: MastraMessageContentV2['content'];
|
|
33
34
|
};
|
|
34
35
|
})[];
|
|
36
|
+
fence?: RunFence;
|
|
35
37
|
}): Promise<MastraDBMessage[]>;
|
|
36
|
-
export declare function deleteMessages(ctx: MemoryContext, messageIds: string[]): Promise<void>;
|
|
38
|
+
export declare function deleteMessages(ctx: MemoryContext, messageIds: string[], fence?: RunFence): Promise<void>;
|
|
37
39
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/messages.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAmB,MAAM,qBAAqB,CAAC;AAS5E,OAAO,KAAK,EACV,oCAAoC,EACpC,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,sBAAsB,CAAC;AAO9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/messages.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAmB,MAAM,qBAAqB,CAAC;AAS5E,OAAO,KAAK,EACV,QAAQ,EACR,oCAAoC,EACpC,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,sBAAsB,CAAC;AAO9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAY/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AA0B7C,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,aAAa,EAClB,EAAE,UAAU,EAAE,EAAE;IAAE,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,GACvC,OAAO,CAAC;IAAE,QAAQ,EAAE,eAAe,EAAE,CAAA;CAAE,CAAC,CA0B1C;AAED,wBAAsB,YAAY,CAChC,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CAAC,yBAAyB,CAAC,CAyBpC;AAED,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,oCAAoC,GACzC,OAAO,CAAC,yBAAyB,CAAC,CAqBpC;AAED,wBAAsB,YAAY,CAChC,GAAG,EAAE,aAAa,EAClB,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,QAAQ,CAAA;CAAE,GACrE,OAAO,CAAC;IAAE,QAAQ,EAAE,eAAe,EAAE,CAAA;CAAE,CAAC,CA2C1C;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,aAAa,EAClB,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,eAAe,EAAE,GAC1B,OAAO,CAAC,IAAI,CAAC,CA4Df;AAED,wBAAsB,cAAc,CAClC,GAAG,EAAE,aAAa,EAClB,EACE,QAAQ,EACR,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC,GAAG;QACvD,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,CAAC,EAAE;YAAE,QAAQ,CAAC,EAAE,sBAAsB,CAAC,UAAU,CAAC,CAAC;YAAC,OAAO,CAAC,EAAE,sBAAsB,CAAC,SAAS,CAAC,CAAA;SAAE,CAAC;KAC1G,CAAC,EAAE,CAAC;IACL,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB,GACA,OAAO,CAAC,eAAe,EAAE,CAAC,CAwF5B;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAgC9G"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type UpdateBufferedObservationsResult } from '../../../_types/@internal_core/dist/memory/index.js';
|
|
2
|
+
import type { ObservationalMemoryRecord, RunFence, SwapBufferedReflectionToActiveInput, SwapBufferedToActiveInput, SwapBufferedToActiveResult, UpdateBufferedObservationsInput, UpdateBufferedReflectionInput } from '@mastra/core/storage';
|
|
2
3
|
import type { MemoryContext } from './utils.js';
|
|
3
|
-
export declare function updateBufferedObservations(ctx: MemoryContext, input: UpdateBufferedObservationsInput): Promise<
|
|
4
|
-
export declare function swapBufferedToActive(ctx: MemoryContext, input: SwapBufferedToActiveInput): Promise<SwapBufferedToActiveResult>;
|
|
5
|
-
export declare function updateBufferedReflection(ctx: MemoryContext, input: UpdateBufferedReflectionInput): Promise<void>;
|
|
6
|
-
export declare function swapBufferedReflectionToActive(ctx: MemoryContext, input: SwapBufferedReflectionToActiveInput): Promise<ObservationalMemoryRecord>;
|
|
4
|
+
export declare function updateBufferedObservations(ctx: MemoryContext, input: UpdateBufferedObservationsInput, fence?: RunFence): Promise<UpdateBufferedObservationsResult>;
|
|
5
|
+
export declare function swapBufferedToActive(ctx: MemoryContext, input: SwapBufferedToActiveInput, fence?: RunFence): Promise<SwapBufferedToActiveResult>;
|
|
6
|
+
export declare function updateBufferedReflection(ctx: MemoryContext, input: UpdateBufferedReflectionInput, fence?: RunFence): Promise<void>;
|
|
7
|
+
export declare function swapBufferedReflectionToActive(ctx: MemoryContext, input: SwapBufferedReflectionToActiveInput, fence?: RunFence): Promise<ObservationalMemoryRecord>;
|
|
7
8
|
//# sourceMappingURL=observational-buffering.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observational-buffering.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/observational-buffering.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"observational-buffering.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/observational-buffering.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,gCAAgC,EACtC,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAEV,yBAAyB,EACzB,QAAQ,EACR,mCAAmC,EACnC,yBAAyB,EACzB,0BAA0B,EAC1B,+BAA+B,EAC/B,6BAA6B,EAC9B,MAAM,sBAAsB,CAAC;AA4B9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAM7C,wBAAsB,0BAA0B,CAC9C,GAAG,EAAE,aAAa,EAClB,KAAK,EAAE,+BAA+B,EACtC,KAAK,CAAC,EAAE,QAAQ,GACf,OAAO,CAAC,gCAAgC,CAAC,CAyD3C;AAED,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,aAAa,EAClB,KAAK,EAAE,yBAAyB,EAChC,KAAK,CAAC,EAAE,QAAQ,GACf,OAAO,CAAC,0BAA0B,CAAC,CAiErC;AAED,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,aAAa,EAClB,KAAK,EAAE,6BAA6B,EACpC,KAAK,CAAC,EAAE,QAAQ,GACf,OAAO,CAAC,IAAI,CAAC,CA+Bf;AAED,wBAAsB,8BAA8B,CAClD,GAAG,EAAE,aAAa,EAClB,KAAK,EAAE,mCAAmC,EAC1C,KAAK,CAAC,EAAE,QAAQ,GACf,OAAO,CAAC,yBAAyB,CAAC,CA0DpC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type UpdateActiveObservationsResult } from '../../../_types/@internal_core/dist/memory/index.js';
|
|
2
|
+
import type { CreateObservationalMemoryInput, CreateReflectionGenerationInput, ObservationalMemoryHistoryOptions, ObservationalMemoryRecord, RunFence, UpdateActiveObservationsInput, UpdateObservationalMemoryConfigInput } from '@mastra/core/storage';
|
|
2
3
|
import type { Connection } from 'oracledb';
|
|
3
4
|
import type { MemoryContext } from './utils.js';
|
|
4
5
|
export type ObservationalMemoryRow = {
|
|
@@ -34,6 +35,7 @@ export type ObservationalMemoryRow = {
|
|
|
34
35
|
lastBufferedAtTokens?: number | string | null;
|
|
35
36
|
lastBufferedAtTime?: Date | string | null;
|
|
36
37
|
metadata?: unknown;
|
|
38
|
+
supersededBy?: string | null;
|
|
37
39
|
createdAt: Date | string;
|
|
38
40
|
updatedAt: Date | string;
|
|
39
41
|
};
|
|
@@ -41,8 +43,14 @@ export declare function getObservationalMemory(ctx: MemoryContext, threadId: str
|
|
|
41
43
|
export declare function getObservationalMemoryHistory(ctx: MemoryContext, threadId: string | null, resourceId: string, limit?: number, options?: ObservationalMemoryHistoryOptions): Promise<ObservationalMemoryRecord[]>;
|
|
42
44
|
export declare function initializeObservationalMemory(ctx: MemoryContext, input: CreateObservationalMemoryInput): Promise<ObservationalMemoryRecord>;
|
|
43
45
|
export declare function insertObservationalMemoryRecord(ctx: MemoryContext, record: ObservationalMemoryRecord): Promise<void>;
|
|
44
|
-
export declare function updateActiveObservations(ctx: MemoryContext, input: UpdateActiveObservationsInput): Promise<
|
|
45
|
-
export declare function createReflectionGeneration(ctx: MemoryContext, input: CreateReflectionGenerationInput): Promise<ObservationalMemoryRecord>;
|
|
46
|
+
export declare function updateActiveObservations(ctx: MemoryContext, input: UpdateActiveObservationsInput, fence?: RunFence): Promise<UpdateActiveObservationsResult>;
|
|
47
|
+
export declare function createReflectionGeneration(ctx: MemoryContext, input: CreateReflectionGenerationInput, fence?: RunFence): Promise<ObservationalMemoryRecord>;
|
|
48
|
+
/**
|
|
49
|
+
* Create the next generation from the stored (live, row-locked) record and retire it in the
|
|
50
|
+
* same transaction. Buffered chunks move to the new generation; the cursor, buffering markers,
|
|
51
|
+
* flags, and counters carry over; buffered reflection state does not.
|
|
52
|
+
*/
|
|
53
|
+
export declare function rollOverOMRow(ctx: MemoryContext, connection: Connection, stored: ObservationalMemoryRecord, observations: string, tokenCount: number, newRecordId: string | undefined): Promise<ObservationalMemoryRecord>;
|
|
46
54
|
export declare function setReflectingFlag(ctx: MemoryContext, id: string, isReflecting: boolean): Promise<void>;
|
|
47
55
|
export declare function setObservingFlag(ctx: MemoryContext, id: string, isObserving: boolean): Promise<void>;
|
|
48
56
|
export declare function setBufferingObservationFlag(ctx: MemoryContext, id: string, isBuffering: boolean, lastBufferedAtTokens?: number): Promise<void>;
|
|
@@ -53,4 +61,18 @@ export declare function updateObservationalMemoryConfig(ctx: MemoryContext, inpu
|
|
|
53
61
|
export declare function insertOMRecord(ctx: MemoryContext, connection: Connection, record: ObservationalMemoryRecord, timestamp?: Date): Promise<void>;
|
|
54
62
|
export declare function omSelect(): string;
|
|
55
63
|
export declare function parseOMRow(row: ObservationalMemoryRow): ObservationalMemoryRecord;
|
|
64
|
+
/** Row-locks one record by primary key for the rest of the transaction; `undefined` when missing. */
|
|
65
|
+
export declare function findOMRowForUpdate(ctx: MemoryContext, connection: Connection, id: string): Promise<ObservationalMemoryRow | undefined>;
|
|
66
|
+
/**
|
|
67
|
+
* Row-locks one record by primary key. Observational memory updates are incremental and
|
|
68
|
+
* order-sensitive, so mutating paths derive their next state from a locked row.
|
|
69
|
+
* Throws "record not found" when it is missing.
|
|
70
|
+
*/
|
|
71
|
+
export declare function lockOMRow(ctx: MemoryContext, connection: Connection, id: string, operation: string): Promise<ObservationalMemoryRow>;
|
|
72
|
+
/**
|
|
73
|
+
* The live, row-locked record a lifecycle write aimed at `row` lands on: `row` itself while
|
|
74
|
+
* live, otherwise the head of its lookup key (locked, then re-checked — a rollover may retire
|
|
75
|
+
* it between the head read and the lock).
|
|
76
|
+
*/
|
|
77
|
+
export declare function resolveLiveOMRow(ctx: MemoryContext, connection: Connection, row: ObservationalMemoryRow): Promise<ObservationalMemoryRow>;
|
|
56
78
|
//# sourceMappingURL=observational.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observational.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/observational.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"observational.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/observational.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,8BAA8B,EACpC,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EACV,8BAA8B,EAC9B,+BAA+B,EAC/B,iCAAiC,EACjC,yBAAyB,EACzB,QAAQ,EACR,6BAA6B,EAC7B,oC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EAAE,aAAa,EAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CASf;AAED,wBAAsB,uBAAuB,CAAC,GAAG,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB/G;AAED,wBAAsB,+BAA+B,CACnD,GAAG,EAAE,aAAa,EAClB,KAAK,EAAE,oCAAoC,GAC1C,OAAO,CAAC,IAAI,CAAC,CA8Bf;AAMD,wBAAsB,cAAc,CAClC,GAAG,EAAE,aAAa,EAClB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,yBAAyB,EACjC,SAAS,OAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAoHf;AAqCD,wBAAgB,QAAQ,IAAI,MAAM,CAqCjC;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,sBAAsB,GAAG,yBAAyB,CAmCjF;AAmBD,qGAAqG;AACrG,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,aAAa,EAClB,UAAU,EAAE,UAAU,EACtB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC,CAO7C;AAED;;;;GAIG;AACH,wBAAsB,SAAS,CAC7B,GAAG,EAAE,aAAa,EAClB,UAAU,EAAE,UAAU,EACtB,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,sBAAsB,CAAC,CAOjC;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,aAAa,EAClB,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE,sBAAsB,GAC1B,OAAO,CAAC,sBAAsB,CAAC,CAgBjC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StorageResourceType } from '@mastra/core/storage';
|
|
1
|
+
import type { RunFence, StorageResourceType } from '@mastra/core/storage';
|
|
2
2
|
import type { MemoryContext } from './utils.js';
|
|
3
3
|
export declare function getResourceById(ctx: MemoryContext, { resourceId }: {
|
|
4
4
|
resourceId: string;
|
|
@@ -6,9 +6,10 @@ export declare function getResourceById(ctx: MemoryContext, { resourceId }: {
|
|
|
6
6
|
export declare function saveResource(ctx: MemoryContext, { resource }: {
|
|
7
7
|
resource: StorageResourceType;
|
|
8
8
|
}): Promise<StorageResourceType>;
|
|
9
|
-
export declare function updateResource(ctx: MemoryContext, { resourceId, workingMemory, metadata, }: {
|
|
9
|
+
export declare function updateResource(ctx: MemoryContext, { resourceId, workingMemory, metadata, fence, }: {
|
|
10
10
|
resourceId: string;
|
|
11
11
|
workingMemory?: string;
|
|
12
12
|
metadata?: Record<string, unknown>;
|
|
13
|
+
fence?: RunFence;
|
|
13
14
|
}): Promise<StorageResourceType>;
|
|
14
15
|
//# sourceMappingURL=resources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/resources.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/resources.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAgB1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAa7C,wBAAsB,eAAe,CACnC,GAAG,EAAE,aAAa,EAClB,EAAE,UAAU,EAAE,EAAE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,GACrC,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAcrC;AAED,wBAAsB,YAAY,CAChC,GAAG,EAAE,aAAa,EAClB,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,mBAAmB,CAAA;CAAE,GAC9C,OAAO,CAAC,mBAAmB,CAAC,CA4C9B;AAED,wBAAsB,cAAc,CAClC,GAAG,EAAE,aAAa,EAClB,EACE,UAAU,EACV,aAAa,EACb,QAAQ,EACR,KAAK,GACN,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB,GACA,OAAO,CAAC,mBAAmB,CAAC,CA8C9B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Connection } from 'oracledb';
|
|
1
2
|
import type { MemoryContext } from './utils.js';
|
|
2
3
|
export declare const THREAD_RESOURCE_ID = "\"resourceId\"";
|
|
3
4
|
export declare const THREAD_CREATED_AT = "\"createdAt\"";
|
|
@@ -38,6 +39,16 @@ export declare const OM_LAST_BUFFERED_AT_TOKENS = "\"lastBufferedAtTokens\"";
|
|
|
38
39
|
export declare const OM_LAST_BUFFERED_AT_TIME = "\"lastBufferedAtTime\"";
|
|
39
40
|
export declare const OM_CREATED_AT = "\"createdAt\"";
|
|
40
41
|
export declare const OM_UPDATED_AT = "\"updatedAt\"";
|
|
42
|
+
export declare const OM_SUPERSEDED_BY = "\"supersededBy\"";
|
|
41
43
|
export declare function initMemorySchema(ctx: MemoryContext): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Retire every live observational memory row that sorts after its key's canonical head
|
|
46
|
+
* (`generationCount DESC, createdAt ASC, id ASC`), marking it superseded by the head. Rows
|
|
47
|
+
* retired by older adapter versions (which never set `supersededBy`) become frozen. Idempotent.
|
|
48
|
+
* One statement: the head's ordering key is part of the condition, so a row created by a
|
|
49
|
+
* concurrent rollover (higher generation) never matches, and a row locked by one is
|
|
50
|
+
* re-evaluated after it commits.
|
|
51
|
+
*/
|
|
52
|
+
export declare function backfillObservationalMemorySupersededBy(ctx: MemoryContext, connection: Connection): Promise<void>;
|
|
42
53
|
export declare function clearAllMemoryTables(ctx: MemoryContext): Promise<void>;
|
|
43
54
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAQ3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAM7C,eAAO,MAAM,kBAAkB,mBAAiB,CAAC;AACjD,eAAO,MAAM,iBAAiB,kBAAgB,CAAC;AAC/C,eAAO,MAAM,iBAAiB,kBAAgB,CAAC;AAC/C,eAAO,MAAM,mBAAmB,mBAAiB,CAAC;AAClD,eAAO,MAAM,kBAAkB,kBAAgB,CAAC;AAChD,eAAO,MAAM,uBAAuB,sBAAoB,CAAC;AACzD,eAAO,MAAM,mBAAmB,kBAAgB,CAAC;AACjD,eAAO,MAAM,mBAAmB,kBAAgB,CAAC;AACjD,eAAO,MAAM,aAAa,kBAAgB,CAAC;AAC3C,eAAO,MAAM,QAAQ,cAAY,CAAC;AAClC,eAAO,MAAM,cAAc,mBAAiB,CAAC;AAC7C,eAAO,MAAM,YAAY,iBAAe,CAAC;AACzC,eAAO,MAAM,sBAAsB,2BAAyB,CAAC;AAC7D,eAAO,MAAM,qCAAqC,wCAAsC,CAAC;AACzF,eAAO,MAAM,cAAc,mBAAiB,CAAC;AAC7C,eAAO,MAAM,mBAAmB,wBAAsB,CAAC;AACvD,eAAO,MAAM,mBAAmB,uBAAqB,CAAC;AACtD,eAAO,MAAM,qBAAqB,yBAAuB,CAAC;AAC1D,eAAO,MAAM,yBAAyB,6BAA2B,CAAC;AAClE,eAAO,MAAM,wBAAwB,4BAA0B,CAAC;AAChE,eAAO,MAAM,0BAA0B,8BAA4B,CAAC;AACpE,eAAO,MAAM,eAAe,oBAAkB,CAAC;AAC/C,eAAO,MAAM,gBAAgB,qBAAmB,CAAC;AACjD,eAAO,MAAM,uBAAuB,2BAAyB,CAAC;AAC9D,eAAO,MAAM,oBAAoB,yBAAuB,CAAC;AACzD,eAAO,MAAM,wBAAwB,6BAA2B,CAAC;AACjE,eAAO,MAAM,8BAA8B,kCAAgC,CAAC;AAC5E,eAAO,MAAM,uBAAuB,2BAAyB,CAAC;AAC9D,eAAO,MAAM,sBAAsB,2BAAyB,CAAC;AAC7D,eAAO,MAAM,6BAA6B,iCAA+B,CAAC;AAC1E,eAAO,MAAM,mCAAmC,sCAAoC,CAAC;AACrF,eAAO,MAAM,mCAAmC,sCAAoC,CAAC;AACrF,eAAO,MAAM,8BAA8B,kCAAgC,CAAC;AAC5E,eAAO,MAAM,2BAA2B,+BAA6B,CAAC;AACtE,eAAO,MAAM,0BAA0B,8BAA4B,CAAC;AACpE,eAAO,MAAM,0BAA0B,6BAA2B,CAAC;AACnE,eAAO,MAAM,wBAAwB,2BAAyB,CAAC;AAC/D,eAAO,MAAM,aAAa,kBAAgB,CAAC;AAC3C,eAAO,MAAM,aAAa,kBAAgB,CAAC;AAC3C,eAAO,MAAM,gBAAgB,qBAAmB,CAAC;AAEjD,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAQxE;AAED;;;;;;;GAOG;AACH,wBAAsB,uCAAuC,CAC3D,GAAG,EAAE,aAAa,EAClB,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,IAAI,CAAC,CA6Bf;AAED,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAO5E"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { StorageThreadType } from '@mastra/core/memory';
|
|
2
|
-
import type { StorageListThreadsInput, StorageListThreadsOutput } from '@mastra/core/storage';
|
|
2
|
+
import type { RunFence, StorageListThreadsInput, StorageListThreadsOutput } from '@mastra/core/storage';
|
|
3
3
|
import type { OracleTxClient } from '../../db/index.js';
|
|
4
4
|
import type { MemoryContext } from './utils.js';
|
|
5
5
|
export declare function getThreadById(ctx: MemoryContext, { threadId, resourceId }: {
|
|
6
6
|
threadId: string;
|
|
7
7
|
resourceId?: string;
|
|
8
8
|
}): Promise<StorageThreadType | null>;
|
|
9
|
-
export declare function saveThread(ctx: MemoryContext, { thread }: {
|
|
9
|
+
export declare function saveThread(ctx: MemoryContext, { thread, fence }: {
|
|
10
10
|
thread: StorageThreadType;
|
|
11
|
+
fence?: RunFence;
|
|
11
12
|
}): Promise<StorageThreadType>;
|
|
12
13
|
/**
|
|
13
14
|
* Upserts one thread row against the given client. Only `saveThread` may
|
|
@@ -25,10 +26,11 @@ export declare function mergeThreadRow(ctx: Pick<MemoryContext, 'schemaName'>, c
|
|
|
25
26
|
* partway through rolls back the whole clone.
|
|
26
27
|
*/
|
|
27
28
|
export declare function insertThreadRow(ctx: Pick<MemoryContext, 'schemaName'>, client: Pick<OracleTxClient, 'none'>, thread: StorageThreadType): Promise<void>;
|
|
28
|
-
export declare function updateThread(ctx: MemoryContext, { id, title, metadata, }: {
|
|
29
|
+
export declare function updateThread(ctx: MemoryContext, { id, title, metadata, fence, }: {
|
|
29
30
|
id: string;
|
|
30
31
|
title?: string;
|
|
31
32
|
metadata?: Record<string, unknown>;
|
|
33
|
+
fence?: RunFence;
|
|
32
34
|
}): Promise<StorageThreadType>;
|
|
33
35
|
export declare function deleteThread(ctx: MemoryContext, { threadId }: {
|
|
34
36
|
threadId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"threads.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/threads.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,wBAAwB,EAA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AAG,EAAE,aAAa,EAClB,EACE,EAAE,EACF,KAAK,EACL,QAAQ,EACR,KAAK,GACN,EAAE;IACD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB,GACA,OAAO,CAAC,iBAAiB,CAAC,CAgD5B;AAED,wBAAsB,YAAY,CAAC,GAAG,EAAE,aAAa,EAAE,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAYxG;AAED,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,aAAa,EAClB,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACjE,OAAO,CAAC,iBAAiB,CAAC,CAoC5B;AAED,wBAAsB,WAAW,CAC/B,GAAG,EAAE,aAAa,EAClB,IAAI,EAAE,uBAAuB,GAC5B,OAAO,CAAC,wBAAwB,CAAC,CAkDnC"}
|
|
@@ -2,7 +2,8 @@ import type { MastraError } from '@mastra/core/error';
|
|
|
2
2
|
import { ErrorCategory } from '@mastra/core/error';
|
|
3
3
|
import type { IMastraLogger } from '@mastra/core/logger';
|
|
4
4
|
import type { MastraDBMessage, StorageThreadType } from '@mastra/core/memory';
|
|
5
|
-
import type { BufferedObservationChunk, StorageResourceType, ThreadOrderBy, ThreadSortDirection, StorageOrderBy } from '@mastra/core/storage';
|
|
5
|
+
import type { BufferedObservationChunk, RunFence, StorageResourceType, ThreadOrderBy, ThreadSortDirection, StorageOrderBy } from '@mastra/core/storage';
|
|
6
|
+
import oracledb from 'oracledb';
|
|
6
7
|
import type { OracleDB, OracleCreateIndexOptions, OracleTxClient } from '../../db/index.js';
|
|
7
8
|
export declare const ORACLE_IN_LIMIT = 900;
|
|
8
9
|
export declare const EMPTY_STRING_SENTINEL = "__MASTRA_ORACLE_EMPTY_STRING__";
|
|
@@ -44,6 +45,12 @@ export interface MemoryContext {
|
|
|
44
45
|
}): Promise<StorageResourceType>;
|
|
45
46
|
}
|
|
46
47
|
export declare function table(ctx: Pick<MemoryContext, 'schemaName'>, tableName: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* The fence check for a memory write; call it first inside the write's
|
|
50
|
+
* transaction. `fence` is the one `MemoryOracle` already resolved against the
|
|
51
|
+
* run fence scope, so an unfenced write skips the check.
|
|
52
|
+
*/
|
|
53
|
+
export declare function assertMemoryFence(ctx: Pick<MemoryContext, 'schemaName'>, client: OracleTxClient, fence: RunFence | undefined, operation: string): Promise<void>;
|
|
47
54
|
export declare function storageError(operation: string, reason: string, details: Record<string, string | number | boolean | undefined>, cause: unknown, category?: ErrorCategory): MastraError;
|
|
48
55
|
export declare function assertRowsAffected(rowsAffected: number | undefined, operation: string, id: string): void;
|
|
49
56
|
export declare function inClause(prefix: string, values: readonly string[]): {
|
|
@@ -51,6 +58,12 @@ export declare function inClause(prefix: string, values: readonly string[]): {
|
|
|
51
58
|
binds: Record<string, unknown>;
|
|
52
59
|
};
|
|
53
60
|
export declare function chunkValues<T>(values: T[], size?: number): T[][];
|
|
61
|
+
/**
|
|
62
|
+
* Bind an instant as TIMESTAMP WITH TIME ZONE. A bare `Date` binds as TIMESTAMP WITH LOCAL
|
|
63
|
+
* TIME ZONE, which the server converts with the session's fixed offset (captured at connect
|
|
64
|
+
* time); an instant on the other side of a DST change is then stored shifted by an hour.
|
|
65
|
+
*/
|
|
66
|
+
export declare function timestampBind(value: Date | string | null | undefined): oracledb.BindParameter | null;
|
|
54
67
|
export declare function boolToNumber(value: boolean | undefined): number;
|
|
55
68
|
export declare function toBoolean(value: unknown): boolean;
|
|
56
69
|
export declare function numberOrZero(value: unknown): number;
|
|
@@ -58,7 +71,7 @@ export declare function optionalNumber(value: unknown): number | undefined;
|
|
|
58
71
|
export declare function stringOrEmpty(value: unknown): string;
|
|
59
72
|
export declare function emptyToUndefined(value: unknown): string | undefined;
|
|
60
73
|
export declare function optionalStringBind(value: string | null | undefined): string | null;
|
|
61
|
-
export declare function optionalClobStringBind(value: string | null | undefined):
|
|
74
|
+
export declare function optionalClobStringBind(value: string | null | undefined): oracledb.BindParameter | null;
|
|
62
75
|
export declare function parseOptionalString(value: unknown): string | undefined;
|
|
63
76
|
export declare function parseJson(value: unknown): Record<string, unknown>;
|
|
64
77
|
export declare function paginationClause(perPageInput: number | false | undefined, perPage: number, offset: number): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,KAAK,EACV,wBAAwB,EACxB,QAAQ,EACR,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,cAAc,EACf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,QAAQ,MAAM,UAAU,CAAC;AAIhC,OAAO,KAAK,EAAE,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AAC,EAClE,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAcf;AAED,wBAAsB,uCAAuC,CAC3D,GAAG,EAAE,IAAI,CAAC,aAAa,EAAE,YAAY,GAAG,yBAAyB,CAAC,EAClE,MAAM,EAAE,cAAc,EACtB,UAAU,EAAE,SAAS,MAAM,EAAE,GAC5B,OAAO,CAAC,IAAI,CAAC,CAiBf"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { WorkflowsStorage } from '@mastra/core/storage';
|
|
2
|
-
import type { StorageListWorkflowRunsInput, UpdateWorkflowStateOptions, WorkflowRun, WorkflowRuns } from '@mastra/core/storage';
|
|
2
|
+
import type { ClaimRunOwnershipInput, ClaimRunOwnershipResult, RenewRunOwnershipInput, RenewRunOwnershipResult, RunFence, RunOwnershipRecord, StorageListWorkflowRunsInput, UpdateWorkflowStateOptions, WorkflowRun, WorkflowRuns } from '@mastra/core/storage';
|
|
3
3
|
import type { StepResult, WorkflowRunState } from '@mastra/core/workflows';
|
|
4
4
|
import type { OracleDomainConfig } from '../../types.js';
|
|
5
5
|
export declare class WorkflowsOracle extends WorkflowsStorage {
|
|
6
|
-
static readonly MANAGED_TABLES: readonly ["mastra_workflow_snapshot"];
|
|
6
|
+
static readonly MANAGED_TABLES: readonly ["mastra_workflow_snapshot", "mastra_workflow_run_owners"];
|
|
7
7
|
private readonly db;
|
|
8
8
|
private readonly schemaName?;
|
|
9
9
|
private readonly skipDefaultIndexes?;
|
|
@@ -12,26 +12,37 @@ export declare class WorkflowsOracle extends WorkflowsStorage {
|
|
|
12
12
|
supportsConcurrentUpdates(): boolean;
|
|
13
13
|
init(): Promise<void>;
|
|
14
14
|
dangerouslyClearAll(): Promise<void>;
|
|
15
|
-
|
|
15
|
+
supportsRunFencing(): boolean;
|
|
16
|
+
claimRunOwnership({ runId, ownerId, leaseMs, force, expectedGeneration, }: ClaimRunOwnershipInput): Promise<ClaimRunOwnershipResult>;
|
|
17
|
+
renewRunOwnership({ leaseMs, ...fence }: RenewRunOwnershipInput): Promise<RenewRunOwnershipResult>;
|
|
18
|
+
releaseRunOwnership(fence: RunFence): Promise<boolean>;
|
|
19
|
+
getRunOwnership({ runId }: {
|
|
20
|
+
runId: string;
|
|
21
|
+
}): Promise<RunOwnershipRecord | null>;
|
|
22
|
+
private readRunOwner;
|
|
23
|
+
updateWorkflowResults({ workflowName, runId, stepId, result, requestContext, state, fence: explicitFence, }: {
|
|
16
24
|
workflowName: string;
|
|
17
25
|
runId: string;
|
|
18
26
|
stepId: string;
|
|
19
27
|
result: StepResult<any, any, any, any>;
|
|
20
28
|
requestContext: Record<string, any>;
|
|
21
29
|
state?: Record<string, any>;
|
|
30
|
+
fence?: RunFence;
|
|
22
31
|
}): Promise<Record<string, StepResult<any, any, any, any>>>;
|
|
23
|
-
updateWorkflowState({ workflowName, runId, opts, }: {
|
|
32
|
+
updateWorkflowState({ workflowName, runId, opts, fence: explicitFence, }: {
|
|
24
33
|
workflowName: string;
|
|
25
34
|
runId: string;
|
|
26
35
|
opts: UpdateWorkflowStateOptions;
|
|
36
|
+
fence?: RunFence;
|
|
27
37
|
}): Promise<WorkflowRunState | undefined>;
|
|
28
|
-
persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot, createdAt, updatedAt, }: {
|
|
38
|
+
persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot, createdAt, updatedAt, fence, }: {
|
|
29
39
|
workflowName: string;
|
|
30
40
|
runId: string;
|
|
31
41
|
resourceId?: string;
|
|
32
42
|
snapshot: WorkflowRunState;
|
|
33
43
|
createdAt?: Date;
|
|
34
44
|
updatedAt?: Date;
|
|
45
|
+
fence?: RunFence;
|
|
35
46
|
}): Promise<void>;
|
|
36
47
|
loadWorkflowSnapshot({ workflowName, runId, }: {
|
|
37
48
|
workflowName: string;
|
|
@@ -42,9 +53,10 @@ export declare class WorkflowsOracle extends WorkflowsStorage {
|
|
|
42
53
|
runId: string;
|
|
43
54
|
workflowName?: string;
|
|
44
55
|
}): Promise<WorkflowRun | null>;
|
|
45
|
-
deleteWorkflowRunById({ runId, workflowName }: {
|
|
56
|
+
deleteWorkflowRunById({ runId, workflowName, fence, }: {
|
|
46
57
|
runId: string;
|
|
47
58
|
workflowName: string;
|
|
59
|
+
fence?: RunFence;
|
|
48
60
|
}): Promise<void>;
|
|
49
61
|
private createTables;
|
|
50
62
|
private createIndexes;
|
|
@@ -55,6 +67,7 @@ export declare class WorkflowsOracle extends WorkflowsStorage {
|
|
|
55
67
|
private workflowSelect;
|
|
56
68
|
private parseWorkflowRun;
|
|
57
69
|
private table;
|
|
70
|
+
private runOwnersTable;
|
|
58
71
|
private indexName;
|
|
59
72
|
private constraint;
|
|
60
73
|
private storageError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/workflows/index.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/workflows/index.ts"],"names":[],"mappings":"AACA,OAAO,EAOL,gBAAgB,EAEjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,QAAQ,EACR,kBAAkB,EAClB,4BAA4B,EAE5B,0BAA0B,EAC1B,WAAW,EACX,YAAY,EACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAQ3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAuCtD,qBAAa,eAAgB,SAAQ,gBAAgB;IAGnD,MAAM,CAAC,QAAQ,CAAC,cAAc,sEAAiE;IAE/F,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAW;IAC9B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAS;I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AAE,MAAM,CAAC;KACvB,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAiB9B;IAEK,qBAAqB,CAAC,EAC1B,KAAK,EACL,YAAY,EACZ,KAAK,GACN,EAAE;QACD,KAAK,EAAE,MAAM,CAAC;QACd,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,QAAQ,CAAC;KAClB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBhB;YAEa,YAAY;YAuBZ,aAAa;IAkB3B,OAAO,CAAC,cAAc;IAoBtB,OAAO,CAAC,gBAAgB;YAmCV,oBAAoB;IAmClC,OAAO,CAAC,mBAAmB;IAmC3B,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,gBAAgB;IAWxB,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,YAAY;CASrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAwB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,QAAQ,EAA0B,MAAM,MAAM,CAAC;AAUxD,OAAO,KAAK,EAAmB,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAClG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAwB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAA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