@mastra/libsql 1.28.0 → 1.29.0-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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/agents/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EASd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAEnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAInD,qBAAa,YAAa,SAAQ,aAAa;;IAI7C,YAAY,MAAM,EAAE,kBAAkB,EAKrC;IAEK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAiC1B;IAmMK,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAGzC;IAED,OAAO,CAAC,SAAS;IAwCjB,OAAO,CAAC,QAAQ;IAcV,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAoB1D;IAEK,MAAM,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,uBAAuB,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAiEjF;IAEK,MAAM,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA8DtE;IAEK,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBtC;IAEK,IAAI,CAAC,IAAI,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAgK1E;IAMK,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC,CAqDpE;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I,CAAC,CA8B9D;IAEK,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsBpD;IAMD,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,uBAAuB;IAW/B,OAAO,CAAC,eAAe;CAgCxB"}
@@ -1,6 +1,5 @@
1
- import type { ListKnowledgeScopeMembersInput, ListKnowledgeScopeMembersOutput, ListKnowledgeScopeNodesInput, ListKnowledgeScopeNodesOutput } from '../../../_types/@internal_core/dist/knowledge-compat/index.js';
2
1
  import { KnowledgeStorage } from '@mastra/core/storage';
3
- import type { AppendKnowledgeInput, ClaimKnowledgeSemanticOutboxInput, CreateKnowledgeNodeInput, KnowledgeActivityEvent, KnowledgeCurationCursor, KnowledgeNode, KnowledgeRecord, KnowledgeScope, KnowledgeStructurePlan, KnowledgeStructureReconcileResult, KnowledgeSemanticOutboxEntry, ListKnowledgeNodesInput, QueryKnowledgeBySourceInput, QueryKnowledgeInput, QueryKnowledgeOutput, SearchKnowledgeInput, SearchKnowledgeResult, UpdateKnowledgeNodeInput } from '@mastra/core/storage';
2
+ import type { KnowledgePageStore } from '@mastra/core/storage';
4
3
  import type { LibSQLDomainConfig } from '../../db/index.js';
5
4
  import type { SqliteClient as Client } from '../../db/client.js';
6
5
  export declare function getLibSQLKnowledgeIsolationKey(config: {
@@ -12,93 +11,44 @@ export declare class KnowledgeLibSQL extends KnowledgeStorage {
12
11
  #private;
13
12
  constructor(config: LibSQLDomainConfig);
14
13
  getCapabilities(): {
15
- readonly contractVersion: 2;
16
- readonly schemaVersion: 2;
17
- readonly supportsV2: true;
14
+ readonly contractVersion: 4;
15
+ readonly schemaVersion: 4;
18
16
  readonly supportsSchemaInspection: true;
19
17
  readonly supportsExplicitReset: true;
20
18
  };
21
- inspectSchema(): Promise<import("../../../_types/@internal_core/dist/knowledge-compat/index.js").KnowledgeSchemaInspection>;
22
- init(): Promise<void>;
23
19
  dangerouslyClearAll(): Promise<void>;
20
+ inspectSchema(): Promise<import("../../../_types/@internal_core@0.1.4/dist/knowledge-compat/index.js").KnowledgePagesSchemaInspection>;
21
+ init(): Promise<void>;
24
22
  dangerouslyReset(): Promise<void>;
25
- reconcileStructure(plan: KnowledgeStructurePlan): Promise<KnowledgeStructureReconcileResult>;
26
- listScopeNodes(input?: ListKnowledgeScopeNodesInput): Promise<ListKnowledgeScopeNodesOutput>;
27
- listScopeMembers(input: ListKnowledgeScopeMembersInput): Promise<ListKnowledgeScopeMembersOutput>;
28
- createNode(input: CreateKnowledgeNodeInput): Promise<KnowledgeNode>;
29
- getNode(id: string): Promise<KnowledgeNode | null>;
30
- getNodeByName(input: {
31
- name: string;
32
- scope: KnowledgeScope;
33
- }): Promise<KnowledgeNode | null>;
34
- resolveNode(input: {
35
- name: string;
36
- scope: KnowledgeScope;
37
- }): Promise<KnowledgeNode | null>;
38
- listNodes(input: ListKnowledgeNodesInput): Promise<KnowledgeNode[]>;
39
- updateNode(input: UpdateKnowledgeNodeInput): Promise<KnowledgeNode>;
40
- mergeNodes(input: {
41
- sourceId: string;
42
- targetId: string;
43
- sourceVersion: number;
44
- }): Promise<KnowledgeNode>;
45
- appendKnowledge(input: AppendKnowledgeInput): Promise<KnowledgeRecord>;
46
- getKnowledge(input: {
47
- id: string;
48
- includeDeleted?: boolean;
49
- }): Promise<KnowledgeRecord | null>;
50
- listKnowledgeAbout(input: QueryKnowledgeInput): Promise<QueryKnowledgeOutput>;
51
- listKnowledgeMentioning(input: QueryKnowledgeInput): Promise<QueryKnowledgeOutput>;
52
- listKnowledgeRelatedTo(input: QueryKnowledgeInput): Promise<QueryKnowledgeOutput>;
53
- knowledgeBySource(input: QueryKnowledgeBySourceInput): Promise<QueryKnowledgeOutput>;
54
- removeKnowledge(input: {
55
- id: string;
56
- deletedBy: string;
57
- }): Promise<KnowledgeRecord>;
58
- restoreKnowledge(input: {
59
- id: string;
60
- }): Promise<KnowledgeRecord>;
61
- rescopeKnowledge(input: {
62
- id: string;
63
- scope: KnowledgeScope;
64
- }): Promise<KnowledgeRecord>;
65
- search(input: SearchKnowledgeInput): Promise<SearchKnowledgeResult[]>;
66
- /**
67
- * @deprecated Curation cursors were removed. Observation-time curate is the only Knowledge writer and needs no
68
- * cursor. Always throws.
69
- */
70
- getCurationCursor(_input: {
71
- sourceThreadId: string;
72
- agent: string;
73
- }): Promise<KnowledgeCurationCursor | null>;
74
- /**
75
- * @deprecated Curation cursors were removed. Observation-time curate is the only Knowledge writer and needs no
76
- * cursor. Always throws.
77
- */
78
- advanceCurationCursor(_input: {
79
- sourceThreadId: string;
80
- agent: string;
81
- lastKnowledgeId: string;
82
- }): Promise<KnowledgeCurationCursor>;
83
- listActivity(input: {
84
- scope: KnowledgeScope;
85
- after?: string;
86
- limit?: number;
87
- }): Promise<KnowledgeActivityEvent[]>;
88
- listSemanticOutbox(input?: {
89
- status?: KnowledgeSemanticOutboxEntry['status'];
90
- scope?: KnowledgeScope;
91
- limit?: number;
92
- }): Promise<KnowledgeSemanticOutboxEntry[]>;
93
- claimSemanticOutbox(input: ClaimKnowledgeSemanticOutboxInput): Promise<KnowledgeSemanticOutboxEntry[]>;
94
- completeSemanticOutbox(input: {
95
- ids: string[];
96
- workerId: string;
97
- }): Promise<void>;
98
- releaseSemanticOutbox(input: {
99
- ids: string[];
100
- workerId: string;
101
- retryAt?: Date;
102
- }): Promise<void>;
23
+ materializeScope(input: Parameters<KnowledgePageStore['materializeScope']>[0]): ReturnType<KnowledgePageStore['materializeScope']>;
24
+ listScopeDeclarations(): ReturnType<KnowledgePageStore['listScopeDeclarations']>;
25
+ renameScopeDeclaration(input: Parameters<KnowledgePageStore['renameScopeDeclaration']>[0]): ReturnType<KnowledgePageStore['renameScopeDeclaration']>;
26
+ getScopesByAddress(input: Parameters<KnowledgePageStore['getScopesByAddress']>[0]): ReturnType<KnowledgePageStore['getScopesByAddress']>;
27
+ listChildScopes(input: Parameters<KnowledgePageStore['listChildScopes']>[0]): ReturnType<KnowledgePageStore['listChildScopes']>;
28
+ getPage(input: Parameters<KnowledgePageStore['getPage']>[0]): ReturnType<KnowledgePageStore['getPage']>;
29
+ getPageByPath(input: Parameters<KnowledgePageStore['getPageByPath']>[0]): ReturnType<KnowledgePageStore['getPageByPath']>;
30
+ findPagesByName(input: Parameters<KnowledgePageStore['findPagesByName']>[0]): ReturnType<KnowledgePageStore['findPagesByName']>;
31
+ listChildPages(input: Parameters<KnowledgePageStore['listChildPages']>[0]): ReturnType<KnowledgePageStore['listChildPages']>;
32
+ listPages(input: Parameters<KnowledgePageStore['listPages']>[0]): ReturnType<KnowledgePageStore['listPages']>;
33
+ createPage(input: Parameters<KnowledgePageStore['createPage']>[0]): ReturnType<KnowledgePageStore['createPage']>;
34
+ updatePage(input: Parameters<KnowledgePageStore['updatePage']>[0]): ReturnType<KnowledgePageStore['updatePage']>;
35
+ movePage(input: Parameters<KnowledgePageStore['movePage']>[0]): ReturnType<KnowledgePageStore['movePage']>;
36
+ mergePages(input: Parameters<KnowledgePageStore['mergePages']>[0]): ReturnType<KnowledgePageStore['mergePages']>;
37
+ deletePage(input: Parameters<KnowledgePageStore['deletePage']>[0]): ReturnType<KnowledgePageStore['deletePage']>;
38
+ getNote(input: Parameters<KnowledgePageStore['getNote']>[0]): ReturnType<KnowledgePageStore['getNote']>;
39
+ listNotes(input: Parameters<KnowledgePageStore['listNotes']>[0]): ReturnType<KnowledgePageStore['listNotes']>;
40
+ countChildPages(input: Parameters<KnowledgePageStore['countChildPages']>[0]): ReturnType<KnowledgePageStore['countChildPages']>;
41
+ countNotes(input: Parameters<KnowledgePageStore['countNotes']>[0]): ReturnType<KnowledgePageStore['countNotes']>;
42
+ listNotesMentioning(input: Parameters<KnowledgePageStore['listNotesMentioning']>[0]): ReturnType<KnowledgePageStore['listNotesMentioning']>;
43
+ addNote(input: Parameters<KnowledgePageStore['addNote']>[0]): ReturnType<KnowledgePageStore['addNote']>;
44
+ restampNote(input: Parameters<KnowledgePageStore['restampNote']>[0]): ReturnType<KnowledgePageStore['restampNote']>;
45
+ removeNote(input: Parameters<KnowledgePageStore['removeNote']>[0]): ReturnType<KnowledgePageStore['removeNote']>;
46
+ restoreNote(input: Parameters<KnowledgePageStore['restoreNote']>[0]): ReturnType<KnowledgePageStore['restoreNote']>;
47
+ searchPages(input: Parameters<KnowledgePageStore['searchPages']>[0]): ReturnType<KnowledgePageStore['searchPages']>;
48
+ listPageActivity(input: Parameters<KnowledgePageStore['listPageActivity']>[0]): ReturnType<KnowledgePageStore['listPageActivity']>;
49
+ addPinAudience(input: Parameters<KnowledgePageStore['addPinAudience']>[0]): ReturnType<KnowledgePageStore['addPinAudience']>;
50
+ removePinAudience(input: Parameters<KnowledgePageStore['removePinAudience']>[0]): ReturnType<KnowledgePageStore['removePinAudience']>;
51
+ getPages(input: Parameters<KnowledgePageStore['getPages']>[0]): ReturnType<KnowledgePageStore['getPages']>;
52
+ listPins(input: Parameters<KnowledgePageStore['listPins']>[0]): ReturnType<KnowledgePageStore['listPins']>;
103
53
  }
104
54
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/knowledge/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,8BAA8B,EAC9B,+BAA+B,EAC/B,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,iCAAiC,CAAC;AAqCzC,OAAO,EAUL,gBAAgB,EAQjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,oBAAoB,EACpB,iCAAiC,EACjC,wBAAwB,EAExB,sBAAsB,EACtB,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,cAAc,EAEd,sBAAsB,EACtB,iCAAiC,EAEjC,4BAA4B,EAC5B,uBAAuB,EACvB,2BAA2B,EAC3B,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,kBAAkB,EAA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AAc,CACrB,KAAK,EAAE,UAAU,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,GACzD,UAAU,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,CAElD;IAEQ,iBAAiB,CACxB,KAAK,EAAE,UAAU,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,GAC5D,UAAU,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC,CAErD;IAEQ,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAElH;IAEQ,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAElH;CAmBF"}
@@ -0,0 +1,162 @@
1
+ import type { AddKnowledgeNoteInput, CreateKnowledgePageInput, KnowledgeNote, KnowledgeNoteListOutput, KnowledgePage, KnowledgePageActivityEvent, KnowledgePageListOutput, KnowledgePageSearchHit, KnowledgePageStore, KnowledgeListedPin, KnowledgeScopeDeclarationCount, KnowledgeScopeDeclarationRename, KnowledgePin, KnowledgeProvenance, KnowledgeReadScope, MaterializeKnowledgeScopeInput, MaterializeKnowledgeScopeResult, MergeKnowledgePagesInput, MoveKnowledgePageInput, SearchKnowledgePagesInput, UpdateKnowledgePageInput } from '@mastra/core/storage';
2
+ import type { SqliteInValue as InValue, SqliteResultSet as ResultSet } from '../../db/client.js';
3
+ export interface PageExecutor {
4
+ execute(statement: string | {
5
+ sql: string;
6
+ args?: InValue[];
7
+ }): Promise<ResultSet>;
8
+ }
9
+ /** Runs `operation` in one write transaction. */
10
+ export type PageTransaction = <T>(operation: (tx: PageExecutor) => Promise<T>) => Promise<T>;
11
+ export declare const KNOWLEDGE_PAGE_TABLES: {
12
+ readonly pages: 'mastra_knowledge_pages';
13
+ readonly notes: 'mastra_knowledge_notes';
14
+ readonly stamps: 'mastra_knowledge_note_stamps';
15
+ readonly mentions: 'mastra_knowledge_mentions';
16
+ readonly pins: 'mastra_knowledge_pins';
17
+ readonly pinAudiences: 'mastra_knowledge_pin_audiences';
18
+ readonly activity: 'mastra_knowledge_activity';
19
+ };
20
+ /** DDL for the schema-4 page tables, in creation order. Every statement is idempotent. */
21
+ export declare const KNOWLEDGE_PAGE_DDL: string[];
22
+ export declare class LibSQLKnowledgePages implements KnowledgePageStore {
23
+ #private;
24
+ constructor(config: {
25
+ read: PageExecutor;
26
+ transaction: PageTransaction;
27
+ });
28
+ /** Deletes every row from the page tables (scopes, pages, notes, pins, activity). */
29
+ clearAll(): Promise<void>;
30
+ materializeScope(input: MaterializeKnowledgeScopeInput): Promise<MaterializeKnowledgeScopeResult>;
31
+ listScopeDeclarations(): Promise<KnowledgeScopeDeclarationCount[]>;
32
+ renameScopeDeclaration(input: {
33
+ from: string;
34
+ to: string;
35
+ check: (scopes: KnowledgeScopeDeclarationRename[]) => void;
36
+ }): Promise<number>;
37
+ getScopesByAddress(addresses: string[]): Promise<KnowledgePage[]>;
38
+ listChildScopes(input: {
39
+ parentId: string | null;
40
+ cursor?: string;
41
+ limit?: number;
42
+ }): Promise<KnowledgePageListOutput>;
43
+ getPage(input: {
44
+ id: string;
45
+ read: KnowledgeReadScope;
46
+ }): Promise<KnowledgePage | null>;
47
+ getPages(input: {
48
+ ids: string[];
49
+ read: KnowledgeReadScope;
50
+ }): Promise<KnowledgePage[]>;
51
+ getPageByPath(input: {
52
+ scopeId: string;
53
+ path: string[];
54
+ read: KnowledgeReadScope;
55
+ }): Promise<KnowledgePage | null>;
56
+ findPagesByName(input: {
57
+ name: string;
58
+ read: KnowledgeReadScope;
59
+ scopeId?: string;
60
+ limit?: number;
61
+ }): Promise<KnowledgePage[]>;
62
+ listChildPages(input: {
63
+ parentId: string;
64
+ read: KnowledgeReadScope;
65
+ cursor?: string;
66
+ limit?: number;
67
+ }): Promise<KnowledgePageListOutput>;
68
+ listPages(input: {
69
+ read: KnowledgeReadScope;
70
+ scopeId?: string;
71
+ namePrefix?: string;
72
+ cursor?: string;
73
+ limit?: number;
74
+ }): Promise<KnowledgePageListOutput>;
75
+ createPage(input: CreateKnowledgePageInput): Promise<KnowledgePage>;
76
+ updatePage(input: UpdateKnowledgePageInput): Promise<KnowledgePage>;
77
+ movePage(input: MoveKnowledgePageInput): Promise<KnowledgePage>;
78
+ mergePages(input: MergeKnowledgePagesInput): Promise<KnowledgePage>;
79
+ deletePage(input: {
80
+ id: string;
81
+ expectedVersion: number;
82
+ deletedBy: string;
83
+ }): Promise<KnowledgePage>;
84
+ getNote(input: {
85
+ id: string;
86
+ read: KnowledgeReadScope;
87
+ includeDeleted?: boolean;
88
+ }): Promise<KnowledgeNote | null>;
89
+ listNotes(input: {
90
+ pageId: string;
91
+ read: KnowledgeReadScope;
92
+ cursor?: string;
93
+ limit?: number;
94
+ includeDeleted?: boolean;
95
+ }): Promise<KnowledgeNoteListOutput>;
96
+ countChildPages(input: {
97
+ parentIds: string[];
98
+ read: KnowledgeReadScope;
99
+ }): Promise<Record<string, number>>;
100
+ countNotes(input: {
101
+ pageIds: string[];
102
+ read: KnowledgeReadScope;
103
+ }): Promise<Record<string, number>>;
104
+ listNotesMentioning(input: {
105
+ pageId: string;
106
+ read: KnowledgeReadScope;
107
+ cursor?: string;
108
+ limit?: number;
109
+ }): Promise<KnowledgeNoteListOutput>;
110
+ addNote(input: AddKnowledgeNoteInput): Promise<KnowledgeNote>;
111
+ restampNote(input: {
112
+ id: string;
113
+ expectedVersion: number;
114
+ stampScopeIds: string[];
115
+ provenance: KnowledgeProvenance;
116
+ }): Promise<KnowledgeNote>;
117
+ removeNote(input: {
118
+ id: string;
119
+ deletedBy: string;
120
+ provenance: KnowledgeProvenance;
121
+ }): Promise<KnowledgeNote>;
122
+ restoreNote(input: {
123
+ id: string;
124
+ provenance: KnowledgeProvenance;
125
+ }): Promise<KnowledgeNote>;
126
+ searchPages(input: SearchKnowledgePagesInput): Promise<KnowledgePageSearchHit[]>;
127
+ listPageActivity(input: {
128
+ read: KnowledgeReadScope;
129
+ scopeId?: string;
130
+ pageId?: string;
131
+ cursor?: string;
132
+ limit?: number;
133
+ }): Promise<{
134
+ events: KnowledgePageActivityEvent[];
135
+ nextCursor?: string;
136
+ }>;
137
+ addPinAudience(input: {
138
+ pageId: string;
139
+ audience: string[];
140
+ createdBy: string;
141
+ }): Promise<KnowledgePin>;
142
+ removePinAudience(input: {
143
+ pageId: string;
144
+ audience: string[];
145
+ removedBy: string;
146
+ }): Promise<KnowledgePin | null>;
147
+ listPins(input: {
148
+ audience: string[] | 'all';
149
+ read: KnowledgeReadScope;
150
+ pageIds?: string[];
151
+ excludePageIds?: string[];
152
+ withBody?: boolean;
153
+ count?: boolean;
154
+ cursor?: string;
155
+ limit?: number;
156
+ }): Promise<{
157
+ pins: KnowledgeListedPin[];
158
+ nextCursor?: string;
159
+ total?: number;
160
+ }>;
161
+ }
162
+ //# sourceMappingURL=pages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/knowledge/pages.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,qBAAqB,EACrB,wBAAwB,EACxB,aAAa,EACb,uBAAuB,EACvB,aAAa,EAEb,0BAA0B,EAC1B,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,8BAA8B,EAC9B,+BAA+B,EAC/B,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,8BAA8B,EAC9B,+BAA+B,EAC/B,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,aAAa,IAAI,OAAO,EAAE,eAAe,IAAI,SAAS,EAA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EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,0BAA0B,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAuCzE;IAeD,cAAc,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,CAAC,CAqCtG;IAED,iBAAiB,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CA8BhH;IAEK,QAAQ,CAAC,KAAK,EAAE;QACpB,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;QAC3B,IAAI,EAAE,kBAAkB,CAAC;QACzB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;QAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CA+C/E;CACF"}
@@ -1,4 +1,4 @@
1
- import type { UpdateActiveObservationsResult, UpdateBufferedObservationsResult } from '../../../_types/@internal_core/dist/memory/index.js';
1
+ import type { UpdateActiveObservationsResult, UpdateBufferedObservationsResult } from '../../../_types/@internal_core@0.1.4/dist/memory/index.js';
2
2
  import type { MastraMessageContentV2 } from '@mastra/core/agent';
3
3
  import type { MastraDBMessage, StorageThreadType } from '@mastra/core/memory';
4
4
  import type { StorageResourceType, StorageListMessagesInput, StorageListMessagesByResourceIdInput, StorageListMessagesOutput, StorageListThreadsInput, StorageListThreadsOutput, StorageCloneThreadInput, StorageCopyThreadOutput, ObservationalMemoryRecord, ObservationalMemoryHistoryOptions, CreateObservationalMemoryInput, UpdateActiveObservationsInput, UpdateBufferedObservationsInput, SwapBufferedToActiveInput, SwapBufferedToActiveResult, UpdateBufferedReflectionInput, SwapBufferedReflectionToActiveInput, CreateReflectionGenerationInput, UpdateObservationalMemoryConfigInput, PruneOptions, PruneResult, RetentionTablesDescriptor, RunFence, TableRetentionPolicy } from '@mastra/core/storage';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/libsql",
3
- "version": "1.28.0",
3
+ "version": "1.29.0-alpha.1",
4
4
  "description": "Libsql provider for Mastra - includes both vector and db storage capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -31,12 +31,12 @@
31
31
  "tsx": "^4.23.15",
32
32
  "typescript": "^7.0.2",
33
33
  "vitest": "4.1.12",
34
- "@internal/lint": "0.0.147",
35
34
  "@internal/core": "0.1.4",
35
+ "@internal/lint": "0.0.147",
36
36
  "@internal/storage-test-utils": "0.0.143",
37
37
  "@internal/types-builder": "0.0.122",
38
- "@mastra/core": "1.81.0",
39
- "@mastra/pg": "1.34.0"
38
+ "@mastra/core": "1.82.0-alpha.2",
39
+ "@mastra/pg": "1.35.0-alpha.2"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@mastra/core": ">=1.76.0-0 <2.0.0-0"