@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.
- package/dist/_types/@internal_core@0.1.4/dist/knowledge-compat/index.d.ts +348 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-studio-editor.md +12 -9
- package/dist/index.cjs +1463 -1822
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1464 -1823
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/agents/index.d.ts.map +1 -1
- package/dist/storage/domains/knowledge/index.d.ts +35 -85
- package/dist/storage/domains/knowledge/index.d.ts.map +1 -1
- package/dist/storage/domains/knowledge/pages.d.ts +162 -0
- package/dist/storage/domains/knowledge/pages.d.ts.map +1 -0
- package/dist/storage/domains/memory/index.d.ts +1 -1
- package/package.json +4 -4
- package/dist/_types/@internal_core/dist/knowledge-compat/index.d.ts +0 -592
- /package/dist/_types/{@internal_core → @internal_core@0.1.4}/dist/memory/index.d.ts +0 -0
- /package/dist/_types/{@internal_core → @internal_core@0.1.4}/package.json +0 -0
|
@@ -1,592 +0,0 @@
|
|
|
1
|
-
export declare const KNOWLEDGE_V2_CORE_FEATURE = "knowledge-v2";
|
|
2
|
-
export declare const KNOWLEDGE_STORAGE_CONTRACT_VERSION: 2;
|
|
3
|
-
export declare const KNOWLEDGE_STORAGE_SCHEMA_VERSION: 2;
|
|
4
|
-
/** Hard cap on scope nodes returned by one `listScopeNodes` read. */
|
|
5
|
-
export declare const MAX_KNOWLEDGE_SCOPE_NODES = 1000;
|
|
6
|
-
export interface ListKnowledgeScopeNodesInput {
|
|
7
|
-
/** Only the scope at this address and the scopes beneath it, following parent edges transitively. */
|
|
8
|
-
withinAddress?: string;
|
|
9
|
-
/** Only the scopes at these exact addresses. */
|
|
10
|
-
addresses?: string[];
|
|
11
|
-
/** Only the scope nodes with these UUIDs. Combines with the other filters. */
|
|
12
|
-
ids?: string[];
|
|
13
|
-
/** `nextCursor` from the previous page of the same query. */
|
|
14
|
-
cursor?: string;
|
|
15
|
-
/** Page size, from 1 to `MAX_KNOWLEDGE_SCOPE_NODES` (the default). */
|
|
16
|
-
limit?: number;
|
|
17
|
-
}
|
|
18
|
-
export interface ListKnowledgeScopeNodesOutput {
|
|
19
|
-
/** Scope nodes ordered by name, then id. */
|
|
20
|
-
scopes: KnowledgeScopeNodeSummary[];
|
|
21
|
-
/** Pass back as `cursor` for the next page; `null` when this is the last page. */
|
|
22
|
-
nextCursor: string | null;
|
|
23
|
-
}
|
|
24
|
-
export declare function createKnowledgeScopeNodeCursor(scope: Pick<KnowledgeScopeNodeSummary, 'name' | 'id'>, input: ListKnowledgeScopeNodesInput): string;
|
|
25
|
-
/** Validates the page size and cursor of a `listScopeNodes` query; throws on a cursor from a different query. */
|
|
26
|
-
export declare function parseListKnowledgeScopeNodesInput(input?: ListKnowledgeScopeNodesInput): {
|
|
27
|
-
limit: number;
|
|
28
|
-
after: {
|
|
29
|
-
name: string;
|
|
30
|
-
id: string;
|
|
31
|
-
} | null;
|
|
32
|
-
};
|
|
33
|
-
/** Builds a page from up to `limit + 1` name/id-ordered scope nodes. */
|
|
34
|
-
export declare function pageKnowledgeScopeNodes(rows: KnowledgeScopeNodeSummary[], limit: number, input: ListKnowledgeScopeNodesInput): ListKnowledgeScopeNodesOutput;
|
|
35
|
-
/** A node placed inside a structural scope. Child scopes are members too, with `scope: null`. */
|
|
36
|
-
export interface KnowledgeScopeMember {
|
|
37
|
-
id: string;
|
|
38
|
-
type: 'node';
|
|
39
|
-
name: string;
|
|
40
|
-
kind: string;
|
|
41
|
-
content?: string;
|
|
42
|
-
description?: string;
|
|
43
|
-
scope: string[] | null;
|
|
44
|
-
version: number;
|
|
45
|
-
mergedInto?: string;
|
|
46
|
-
createdAt: Date;
|
|
47
|
-
updatedAt: Date;
|
|
48
|
-
}
|
|
49
|
-
export interface ListKnowledgeScopeMembersInput {
|
|
50
|
-
scopeNodeId: string;
|
|
51
|
-
/** `nextCursor` from the previous page for the same scope. */
|
|
52
|
-
cursor?: string;
|
|
53
|
-
/** Members to return, 1–500 (default 500). */
|
|
54
|
-
limit?: number;
|
|
55
|
-
}
|
|
56
|
-
export interface ListKnowledgeScopeMembersOutput {
|
|
57
|
-
/** Most recently updated members first (ties by name, then ID), at most `limit`. */
|
|
58
|
-
members: KnowledgeScopeMember[];
|
|
59
|
-
/** True when the scope has more members than were returned. */
|
|
60
|
-
hasMore: boolean;
|
|
61
|
-
/** Pass as `cursor` to read the next page; `null` on the last page. */
|
|
62
|
-
nextCursor: string | null;
|
|
63
|
-
}
|
|
64
|
-
export declare const MAX_KNOWLEDGE_SCOPE_MEMBERS_LIMIT = 500;
|
|
65
|
-
/** Clamps a requested member limit to 1–{@link MAX_KNOWLEDGE_SCOPE_MEMBERS_LIMIT}. */
|
|
66
|
-
export declare function knowledgeScopeMembersLimit(limit: number | undefined): number;
|
|
67
|
-
/** Validates the page size and cursor of a `listScopeMembers` query; throws on a cursor from another scope. */
|
|
68
|
-
export declare function parseListKnowledgeScopeMembersInput(input: ListKnowledgeScopeMembersInput): {
|
|
69
|
-
limit: number;
|
|
70
|
-
after: {
|
|
71
|
-
updatedAt: Date;
|
|
72
|
-
name: string;
|
|
73
|
-
id: string;
|
|
74
|
-
} | null;
|
|
75
|
-
};
|
|
76
|
-
/** Builds a page from up to `limit + 1` members in `listScopeMembers` order. */
|
|
77
|
-
export declare function pageKnowledgeScopeMembers(rows: KnowledgeScopeMember[], limit: number, input: ListKnowledgeScopeMembersInput): ListKnowledgeScopeMembersOutput;
|
|
78
|
-
/** A reconciled structural scope node with its containing scope nodes. */
|
|
79
|
-
export interface KnowledgeScopeNodeSummary {
|
|
80
|
-
/** UUID of the `isScope` node. */
|
|
81
|
-
id: string;
|
|
82
|
-
/** Canonical address the scope node was reconciled from (e.g. `features:memory`). */
|
|
83
|
-
address: string;
|
|
84
|
-
name: string;
|
|
85
|
-
kind?: string;
|
|
86
|
-
description?: string;
|
|
87
|
-
/** UUIDs of the scope nodes that contain this scope (membership edges). */
|
|
88
|
-
parentIds: string[];
|
|
89
|
-
}
|
|
90
|
-
export declare const TABLE_KNOWLEDGE_NODE_SCOPES = "mastra_knowledge_node_scopes";
|
|
91
|
-
export declare const TABLE_KNOWLEDGE_RECORD_SCOPES = "mastra_knowledge_record_scopes";
|
|
92
|
-
export declare const TABLE_KNOWLEDGE_SCOPE_GRANTS = "mastra_knowledge_scope_grants";
|
|
93
|
-
export declare const TABLE_KNOWLEDGE_ACCESS_STATE = "mastra_knowledge_access_state";
|
|
94
|
-
export declare const TABLE_KNOWLEDGE_SCOPE_ADDRESSES = "mastra_knowledge_scope_addresses";
|
|
95
|
-
export declare const TABLE_KNOWLEDGE_NODE_ADDRESSES = "mastra_knowledge_node_addresses";
|
|
96
|
-
export declare const TABLE_KNOWLEDGE_IMPORT_STATE = "mastra_knowledge_import_state";
|
|
97
|
-
export declare const TABLE_KNOWLEDGE_IMPORT_RUNS = "mastra_knowledge_import_runs";
|
|
98
|
-
export declare const TABLE_KNOWLEDGE_PROPOSALS = "mastra_knowledge_proposals";
|
|
99
|
-
export declare const KNOWLEDGE_TABLE_NAMES: readonly ["mastra_knowledge_nodes", "mastra_knowledge_records", "mastra_knowledge_mentions", "mastra_knowledge_activity", "mastra_knowledge_semantic_outbox", "mastra_knowledge_node_scopes", "mastra_knowledge_record_scopes", "mastra_knowledge_scope_grants", "mastra_knowledge_access_state", "mastra_knowledge_scope_addresses", "mastra_knowledge_node_addresses", "mastra_knowledge_import_state", "mastra_knowledge_import_runs", "mastra_knowledge_proposals"];
|
|
100
|
-
/** Knowledge v1 tables with no v2 equivalent; an explicit schema reset drops them. */
|
|
101
|
-
export declare const RETIRED_KNOWLEDGE_TABLE_NAMES: readonly ['mastra_knowledge_cursors'];
|
|
102
|
-
/** Tables and indexes published v1 adapters created for every app, whether or not it used Knowledge. */
|
|
103
|
-
export declare const PUBLISHED_KNOWLEDGE_V1_TABLE_NAMES: ReadonlySet<string>;
|
|
104
|
-
export declare const PUBLISHED_KNOWLEDGE_V1_INDEX_NAMES: ReadonlySet<string>;
|
|
105
|
-
export declare const KNOWLEDGE_V2_NODES_SCHEMA: {
|
|
106
|
-
readonly id: {
|
|
107
|
-
readonly type: 'text';
|
|
108
|
-
readonly nullable: false;
|
|
109
|
-
readonly primaryKey: true;
|
|
110
|
-
};
|
|
111
|
-
readonly name: {
|
|
112
|
-
readonly type: 'text';
|
|
113
|
-
readonly nullable: false;
|
|
114
|
-
};
|
|
115
|
-
readonly kind: {
|
|
116
|
-
readonly type: 'text';
|
|
117
|
-
readonly nullable: true;
|
|
118
|
-
};
|
|
119
|
-
readonly isScope: {
|
|
120
|
-
readonly type: 'boolean';
|
|
121
|
-
readonly nullable: false;
|
|
122
|
-
};
|
|
123
|
-
readonly metadata: {
|
|
124
|
-
readonly type: 'jsonb';
|
|
125
|
-
readonly nullable: true;
|
|
126
|
-
};
|
|
127
|
-
readonly version: {
|
|
128
|
-
readonly type: 'integer';
|
|
129
|
-
readonly nullable: false;
|
|
130
|
-
};
|
|
131
|
-
readonly createdAt: {
|
|
132
|
-
readonly type: 'timestamp';
|
|
133
|
-
readonly nullable: false;
|
|
134
|
-
};
|
|
135
|
-
readonly updatedAt: {
|
|
136
|
-
readonly type: 'timestamp';
|
|
137
|
-
readonly nullable: false;
|
|
138
|
-
};
|
|
139
|
-
readonly deletedAt: {
|
|
140
|
-
readonly type: 'timestamp';
|
|
141
|
-
readonly nullable: true;
|
|
142
|
-
};
|
|
143
|
-
readonly deletedBy: {
|
|
144
|
-
readonly type: 'text';
|
|
145
|
-
readonly nullable: true;
|
|
146
|
-
};
|
|
147
|
-
readonly type: {
|
|
148
|
-
readonly type: 'text';
|
|
149
|
-
readonly nullable: true;
|
|
150
|
-
};
|
|
151
|
-
readonly canonicalName: {
|
|
152
|
-
readonly type: 'text';
|
|
153
|
-
readonly nullable: true;
|
|
154
|
-
};
|
|
155
|
-
readonly content: {
|
|
156
|
-
readonly type: 'text';
|
|
157
|
-
readonly nullable: true;
|
|
158
|
-
};
|
|
159
|
-
readonly description: {
|
|
160
|
-
readonly type: 'text';
|
|
161
|
-
readonly nullable: true;
|
|
162
|
-
};
|
|
163
|
-
readonly scope: {
|
|
164
|
-
readonly type: 'jsonb';
|
|
165
|
-
readonly nullable: true;
|
|
166
|
-
};
|
|
167
|
-
readonly scopeKey: {
|
|
168
|
-
readonly type: 'text';
|
|
169
|
-
readonly nullable: true;
|
|
170
|
-
};
|
|
171
|
-
readonly mergedInto: {
|
|
172
|
-
readonly type: 'text';
|
|
173
|
-
readonly nullable: true;
|
|
174
|
-
};
|
|
175
|
-
};
|
|
176
|
-
export declare const KNOWLEDGE_V2_RECORDS_SCHEMA: {
|
|
177
|
-
readonly id: {
|
|
178
|
-
readonly type: 'text';
|
|
179
|
-
readonly nullable: false;
|
|
180
|
-
readonly primaryKey: true;
|
|
181
|
-
};
|
|
182
|
-
readonly node: {
|
|
183
|
-
readonly type: 'text';
|
|
184
|
-
readonly nullable: false;
|
|
185
|
-
readonly references: {
|
|
186
|
-
readonly table: "mastra_knowledge_nodes";
|
|
187
|
-
readonly column: 'id';
|
|
188
|
-
};
|
|
189
|
-
};
|
|
190
|
-
readonly text: {
|
|
191
|
-
readonly type: 'text';
|
|
192
|
-
readonly nullable: false;
|
|
193
|
-
};
|
|
194
|
-
readonly metadata: {
|
|
195
|
-
readonly type: 'jsonb';
|
|
196
|
-
readonly nullable: true;
|
|
197
|
-
};
|
|
198
|
-
readonly version: {
|
|
199
|
-
readonly type: 'integer';
|
|
200
|
-
readonly nullable: false;
|
|
201
|
-
};
|
|
202
|
-
readonly capturedAt: {
|
|
203
|
-
readonly type: 'timestamp';
|
|
204
|
-
readonly nullable: false;
|
|
205
|
-
};
|
|
206
|
-
readonly updatedAt: {
|
|
207
|
-
readonly type: 'timestamp';
|
|
208
|
-
readonly nullable: false;
|
|
209
|
-
};
|
|
210
|
-
readonly deletedAt: {
|
|
211
|
-
readonly type: 'timestamp';
|
|
212
|
-
readonly nullable: true;
|
|
213
|
-
};
|
|
214
|
-
readonly deletedBy: {
|
|
215
|
-
readonly type: 'text';
|
|
216
|
-
readonly nullable: true;
|
|
217
|
-
};
|
|
218
|
-
readonly scope: {
|
|
219
|
-
readonly type: 'jsonb';
|
|
220
|
-
readonly nullable: true;
|
|
221
|
-
};
|
|
222
|
-
readonly scopeKey: {
|
|
223
|
-
readonly type: 'text';
|
|
224
|
-
readonly nullable: true;
|
|
225
|
-
};
|
|
226
|
-
readonly sourceThreadId: {
|
|
227
|
-
readonly type: 'text';
|
|
228
|
-
readonly nullable: true;
|
|
229
|
-
};
|
|
230
|
-
readonly when: {
|
|
231
|
-
readonly type: 'timestamp';
|
|
232
|
-
readonly nullable: true;
|
|
233
|
-
};
|
|
234
|
-
};
|
|
235
|
-
export declare const KNOWLEDGE_V2_MENTIONS_SCHEMA: {
|
|
236
|
-
readonly recordId: {
|
|
237
|
-
readonly type: 'text';
|
|
238
|
-
readonly nullable: false;
|
|
239
|
-
readonly references: {
|
|
240
|
-
readonly table: "mastra_knowledge_records";
|
|
241
|
-
readonly column: 'id';
|
|
242
|
-
};
|
|
243
|
-
};
|
|
244
|
-
readonly targetNodeId: {
|
|
245
|
-
readonly type: 'text';
|
|
246
|
-
readonly nullable: true;
|
|
247
|
-
readonly references: {
|
|
248
|
-
readonly table: "mastra_knowledge_nodes";
|
|
249
|
-
readonly column: 'id';
|
|
250
|
-
};
|
|
251
|
-
};
|
|
252
|
-
readonly sourceType: {
|
|
253
|
-
readonly type: 'text';
|
|
254
|
-
readonly nullable: true;
|
|
255
|
-
};
|
|
256
|
-
readonly sourceId: {
|
|
257
|
-
readonly type: 'text';
|
|
258
|
-
readonly nullable: true;
|
|
259
|
-
};
|
|
260
|
-
};
|
|
261
|
-
export declare const KNOWLEDGE_NODE_SCOPES_SCHEMA: {
|
|
262
|
-
readonly nodeId: {
|
|
263
|
-
readonly type: 'text';
|
|
264
|
-
readonly nullable: false;
|
|
265
|
-
readonly references: {
|
|
266
|
-
readonly table: "mastra_knowledge_nodes";
|
|
267
|
-
readonly column: 'id';
|
|
268
|
-
};
|
|
269
|
-
};
|
|
270
|
-
readonly scopeNodeId: {
|
|
271
|
-
readonly type: 'text';
|
|
272
|
-
readonly nullable: false;
|
|
273
|
-
readonly references: {
|
|
274
|
-
readonly table: "mastra_knowledge_nodes";
|
|
275
|
-
readonly column: 'id';
|
|
276
|
-
};
|
|
277
|
-
};
|
|
278
|
-
readonly addedAt: {
|
|
279
|
-
readonly type: 'timestamp';
|
|
280
|
-
readonly nullable: false;
|
|
281
|
-
};
|
|
282
|
-
};
|
|
283
|
-
export declare const KNOWLEDGE_RECORD_SCOPES_SCHEMA: {
|
|
284
|
-
readonly recordId: {
|
|
285
|
-
readonly type: 'text';
|
|
286
|
-
readonly nullable: false;
|
|
287
|
-
readonly references: {
|
|
288
|
-
readonly table: "mastra_knowledge_records";
|
|
289
|
-
readonly column: 'id';
|
|
290
|
-
};
|
|
291
|
-
};
|
|
292
|
-
readonly scopeNodeId: {
|
|
293
|
-
readonly type: 'text';
|
|
294
|
-
readonly nullable: false;
|
|
295
|
-
readonly references: {
|
|
296
|
-
readonly table: "mastra_knowledge_nodes";
|
|
297
|
-
readonly column: 'id';
|
|
298
|
-
};
|
|
299
|
-
};
|
|
300
|
-
readonly addedAt: {
|
|
301
|
-
readonly type: 'timestamp';
|
|
302
|
-
readonly nullable: false;
|
|
303
|
-
};
|
|
304
|
-
};
|
|
305
|
-
export declare const KNOWLEDGE_SCOPE_GRANTS_SCHEMA: {
|
|
306
|
-
readonly scopeNodeId: {
|
|
307
|
-
readonly type: 'text';
|
|
308
|
-
readonly nullable: false;
|
|
309
|
-
readonly references: {
|
|
310
|
-
readonly table: "mastra_knowledge_nodes";
|
|
311
|
-
readonly column: 'id';
|
|
312
|
-
};
|
|
313
|
-
};
|
|
314
|
-
readonly scopeRefId: {
|
|
315
|
-
readonly type: 'text';
|
|
316
|
-
readonly nullable: false;
|
|
317
|
-
readonly references: {
|
|
318
|
-
readonly table: "mastra_knowledge_nodes";
|
|
319
|
-
readonly column: 'id';
|
|
320
|
-
};
|
|
321
|
-
};
|
|
322
|
-
readonly role: {
|
|
323
|
-
readonly type: 'text';
|
|
324
|
-
readonly nullable: false;
|
|
325
|
-
};
|
|
326
|
-
readonly canSuggest: {
|
|
327
|
-
readonly type: 'boolean';
|
|
328
|
-
readonly nullable: true;
|
|
329
|
-
};
|
|
330
|
-
};
|
|
331
|
-
export declare const KNOWLEDGE_ACCESS_STATE_SCHEMA: {
|
|
332
|
-
readonly id: {
|
|
333
|
-
readonly type: 'text';
|
|
334
|
-
readonly nullable: false;
|
|
335
|
-
readonly primaryKey: true;
|
|
336
|
-
};
|
|
337
|
-
readonly epoch: {
|
|
338
|
-
readonly type: 'integer';
|
|
339
|
-
readonly nullable: false;
|
|
340
|
-
};
|
|
341
|
-
readonly schemaVersion: {
|
|
342
|
-
readonly type: 'integer';
|
|
343
|
-
readonly nullable: false;
|
|
344
|
-
};
|
|
345
|
-
};
|
|
346
|
-
export declare const KNOWLEDGE_SCOPE_ADDRESSES_SCHEMA: {
|
|
347
|
-
readonly address: {
|
|
348
|
-
readonly type: 'text';
|
|
349
|
-
readonly nullable: false;
|
|
350
|
-
readonly primaryKey: true;
|
|
351
|
-
};
|
|
352
|
-
readonly scopeNodeId: {
|
|
353
|
-
readonly type: 'text';
|
|
354
|
-
readonly nullable: false;
|
|
355
|
-
readonly references: {
|
|
356
|
-
readonly table: "mastra_knowledge_nodes";
|
|
357
|
-
readonly column: 'id';
|
|
358
|
-
};
|
|
359
|
-
};
|
|
360
|
-
};
|
|
361
|
-
export declare const KNOWLEDGE_NODE_ADDRESSES_SCHEMA: {
|
|
362
|
-
readonly source: {
|
|
363
|
-
readonly type: 'text';
|
|
364
|
-
readonly nullable: false;
|
|
365
|
-
};
|
|
366
|
-
readonly address: {
|
|
367
|
-
readonly type: 'text';
|
|
368
|
-
readonly nullable: false;
|
|
369
|
-
};
|
|
370
|
-
readonly nodeId: {
|
|
371
|
-
readonly type: 'text';
|
|
372
|
-
readonly nullable: false;
|
|
373
|
-
readonly references: {
|
|
374
|
-
readonly table: "mastra_knowledge_nodes";
|
|
375
|
-
readonly column: 'id';
|
|
376
|
-
};
|
|
377
|
-
};
|
|
378
|
-
};
|
|
379
|
-
export declare const KNOWLEDGE_IMPORT_STATE_SCHEMA: {
|
|
380
|
-
readonly importerId: {
|
|
381
|
-
readonly type: 'text';
|
|
382
|
-
readonly nullable: false;
|
|
383
|
-
};
|
|
384
|
-
readonly binding: {
|
|
385
|
-
readonly type: 'text';
|
|
386
|
-
readonly nullable: false;
|
|
387
|
-
};
|
|
388
|
-
readonly key: {
|
|
389
|
-
readonly type: 'text';
|
|
390
|
-
readonly nullable: false;
|
|
391
|
-
};
|
|
392
|
-
readonly value: {
|
|
393
|
-
readonly type: 'text';
|
|
394
|
-
readonly nullable: false;
|
|
395
|
-
};
|
|
396
|
-
};
|
|
397
|
-
export declare const KNOWLEDGE_IMPORT_RUNS_SCHEMA: {
|
|
398
|
-
readonly id: {
|
|
399
|
-
readonly type: 'text';
|
|
400
|
-
readonly nullable: false;
|
|
401
|
-
readonly primaryKey: true;
|
|
402
|
-
};
|
|
403
|
-
readonly importerId: {
|
|
404
|
-
readonly type: 'text';
|
|
405
|
-
readonly nullable: false;
|
|
406
|
-
};
|
|
407
|
-
readonly binding: {
|
|
408
|
-
readonly type: 'text';
|
|
409
|
-
readonly nullable: false;
|
|
410
|
-
};
|
|
411
|
-
readonly importKind: {
|
|
412
|
-
readonly type: 'text';
|
|
413
|
-
readonly nullable: false;
|
|
414
|
-
};
|
|
415
|
-
readonly triggerKind: {
|
|
416
|
-
readonly type: 'text';
|
|
417
|
-
readonly nullable: false;
|
|
418
|
-
};
|
|
419
|
-
readonly status: {
|
|
420
|
-
readonly type: 'text';
|
|
421
|
-
readonly nullable: false;
|
|
422
|
-
};
|
|
423
|
-
readonly error: {
|
|
424
|
-
readonly type: 'text';
|
|
425
|
-
readonly nullable: true;
|
|
426
|
-
};
|
|
427
|
-
readonly transcriptThreadId: {
|
|
428
|
-
readonly type: 'text';
|
|
429
|
-
readonly nullable: true;
|
|
430
|
-
};
|
|
431
|
-
readonly traceId: {
|
|
432
|
-
readonly type: 'text';
|
|
433
|
-
readonly nullable: true;
|
|
434
|
-
};
|
|
435
|
-
readonly queuedAt: {
|
|
436
|
-
readonly type: 'timestamp';
|
|
437
|
-
readonly nullable: false;
|
|
438
|
-
};
|
|
439
|
-
readonly startedAt: {
|
|
440
|
-
readonly type: 'timestamp';
|
|
441
|
-
readonly nullable: true;
|
|
442
|
-
};
|
|
443
|
-
readonly completedAt: {
|
|
444
|
-
readonly type: 'timestamp';
|
|
445
|
-
readonly nullable: true;
|
|
446
|
-
};
|
|
447
|
-
};
|
|
448
|
-
export declare const KNOWLEDGE_V2_ACTIVITY_SCHEMA: {
|
|
449
|
-
readonly id: {
|
|
450
|
-
readonly type: 'text';
|
|
451
|
-
readonly nullable: false;
|
|
452
|
-
readonly primaryKey: true;
|
|
453
|
-
};
|
|
454
|
-
readonly action: {
|
|
455
|
-
readonly type: 'text';
|
|
456
|
-
readonly nullable: false;
|
|
457
|
-
};
|
|
458
|
-
readonly targetType: {
|
|
459
|
-
readonly type: 'text';
|
|
460
|
-
readonly nullable: true;
|
|
461
|
-
};
|
|
462
|
-
readonly targetId: {
|
|
463
|
-
readonly type: 'text';
|
|
464
|
-
readonly nullable: true;
|
|
465
|
-
};
|
|
466
|
-
readonly contextScopeId: {
|
|
467
|
-
readonly type: 'text';
|
|
468
|
-
readonly nullable: true;
|
|
469
|
-
readonly references: {
|
|
470
|
-
readonly table: "mastra_knowledge_nodes";
|
|
471
|
-
readonly column: 'id';
|
|
472
|
-
};
|
|
473
|
-
};
|
|
474
|
-
readonly importRunId: {
|
|
475
|
-
readonly type: 'text';
|
|
476
|
-
readonly nullable: true;
|
|
477
|
-
readonly references: {
|
|
478
|
-
readonly table: "mastra_knowledge_import_runs";
|
|
479
|
-
readonly column: 'id';
|
|
480
|
-
};
|
|
481
|
-
};
|
|
482
|
-
readonly details: {
|
|
483
|
-
readonly type: 'jsonb';
|
|
484
|
-
readonly nullable: true;
|
|
485
|
-
};
|
|
486
|
-
readonly createdAt: {
|
|
487
|
-
readonly type: 'timestamp';
|
|
488
|
-
readonly nullable: false;
|
|
489
|
-
};
|
|
490
|
-
readonly recordType: {
|
|
491
|
-
readonly type: 'text';
|
|
492
|
-
readonly nullable: true;
|
|
493
|
-
};
|
|
494
|
-
readonly recordId: {
|
|
495
|
-
readonly type: 'text';
|
|
496
|
-
readonly nullable: true;
|
|
497
|
-
};
|
|
498
|
-
readonly scope: {
|
|
499
|
-
readonly type: 'jsonb';
|
|
500
|
-
readonly nullable: true;
|
|
501
|
-
};
|
|
502
|
-
readonly scopeKey: {
|
|
503
|
-
readonly type: 'text';
|
|
504
|
-
readonly nullable: true;
|
|
505
|
-
};
|
|
506
|
-
readonly sourceThreadId: {
|
|
507
|
-
readonly type: 'text';
|
|
508
|
-
readonly nullable: true;
|
|
509
|
-
};
|
|
510
|
-
};
|
|
511
|
-
export declare const KNOWLEDGE_PROPOSALS_SCHEMA: {
|
|
512
|
-
readonly id: {
|
|
513
|
-
readonly type: 'text';
|
|
514
|
-
readonly nullable: false;
|
|
515
|
-
readonly primaryKey: true;
|
|
516
|
-
};
|
|
517
|
-
readonly targetType: {
|
|
518
|
-
readonly type: 'text';
|
|
519
|
-
readonly nullable: false;
|
|
520
|
-
};
|
|
521
|
-
readonly targetId: {
|
|
522
|
-
readonly type: 'text';
|
|
523
|
-
readonly nullable: false;
|
|
524
|
-
};
|
|
525
|
-
readonly action: {
|
|
526
|
-
readonly type: 'text';
|
|
527
|
-
readonly nullable: false;
|
|
528
|
-
};
|
|
529
|
-
readonly changes: {
|
|
530
|
-
readonly type: 'jsonb';
|
|
531
|
-
readonly nullable: false;
|
|
532
|
-
};
|
|
533
|
-
readonly reason: {
|
|
534
|
-
readonly type: 'text';
|
|
535
|
-
readonly nullable: true;
|
|
536
|
-
};
|
|
537
|
-
readonly proposerContextScopeId: {
|
|
538
|
-
readonly type: 'text';
|
|
539
|
-
readonly nullable: false;
|
|
540
|
-
};
|
|
541
|
-
readonly expectedVersion: {
|
|
542
|
-
readonly type: 'integer';
|
|
543
|
-
readonly nullable: false;
|
|
544
|
-
};
|
|
545
|
-
readonly status: {
|
|
546
|
-
readonly type: 'text';
|
|
547
|
-
readonly nullable: false;
|
|
548
|
-
};
|
|
549
|
-
readonly reviewerContextScopeId: {
|
|
550
|
-
readonly type: 'text';
|
|
551
|
-
readonly nullable: true;
|
|
552
|
-
};
|
|
553
|
-
readonly reviewedAt: {
|
|
554
|
-
readonly type: 'timestamp';
|
|
555
|
-
readonly nullable: true;
|
|
556
|
-
};
|
|
557
|
-
readonly createdAt: {
|
|
558
|
-
readonly type: 'timestamp';
|
|
559
|
-
readonly nullable: false;
|
|
560
|
-
};
|
|
561
|
-
};
|
|
562
|
-
export type KnowledgeSchemaInspection = {
|
|
563
|
-
status: 'compatible';
|
|
564
|
-
schemaVersion: typeof KNOWLEDGE_STORAGE_SCHEMA_VERSION;
|
|
565
|
-
} | {
|
|
566
|
-
status: 'uninitialized';
|
|
567
|
-
schemaVersion: null;
|
|
568
|
-
} | {
|
|
569
|
-
status: 'incompatible-reset-required';
|
|
570
|
-
schemaVersion: number | null;
|
|
571
|
-
reason: string;
|
|
572
|
-
} | {
|
|
573
|
-
status: 'unavailable';
|
|
574
|
-
schemaVersion: null;
|
|
575
|
-
reason: string;
|
|
576
|
-
};
|
|
577
|
-
export interface KnowledgeSchemaSnapshot {
|
|
578
|
-
available: boolean;
|
|
579
|
-
tableNames: readonly string[];
|
|
580
|
-
schemaVersion?: number;
|
|
581
|
-
reason?: string;
|
|
582
|
-
}
|
|
583
|
-
interface KnowledgeV2Core {
|
|
584
|
-
assertKnowledgeDescriptionWithinBound(description: string | undefined): void;
|
|
585
|
-
assertKnowledgeRecordTextWithinBound(text: string): void;
|
|
586
|
-
assertKnowledgeSchemaCompatible(inspection: KnowledgeSchemaInspection): void;
|
|
587
|
-
inspectKnowledgeSchema(snapshot: KnowledgeSchemaSnapshot): KnowledgeSchemaInspection;
|
|
588
|
-
}
|
|
589
|
-
export declare function assertKnowledgeV2CoreSupport(features: ReadonlySet<string>): void;
|
|
590
|
-
export declare function createKnowledgeV2CoreLoader(features: ReadonlySet<string>, loadStorageModule: () => Promise<unknown>): () => Promise<KnowledgeV2Core>;
|
|
591
|
-
export {};
|
|
592
|
-
//# sourceMappingURL=index.d.ts.map
|
|
File without changes
|
|
File without changes
|