@mastra/convex 0.0.0-feat-improve-processors-20251205191721 → 0.0.0-feat-mcp-embedded-docs-tools-clean-20260102135536

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.
Files changed (48) hide show
  1. package/CHANGELOG.md +787 -3
  2. package/README.md +1 -1
  3. package/dist/{chunk-QKN2PWR2.cjs → chunk-BKVR7SL7.cjs} +2 -89
  4. package/dist/chunk-BKVR7SL7.cjs.map +1 -0
  5. package/dist/chunk-H5QJE733.cjs +104 -0
  6. package/dist/chunk-H5QJE733.cjs.map +1 -0
  7. package/dist/chunk-HXB4DWFE.js +73 -0
  8. package/dist/chunk-HXB4DWFE.js.map +1 -0
  9. package/dist/{chunk-NZCHEPNU.js → chunk-KSAPIIEJ.js} +5 -65
  10. package/dist/chunk-KSAPIIEJ.js.map +1 -0
  11. package/dist/docs/README.md +32 -0
  12. package/dist/docs/SKILL.md +46 -0
  13. package/dist/docs/SOURCE_MAP.json +63 -0
  14. package/dist/docs/storage/01-reference.md +140 -0
  15. package/dist/docs/vectors/01-reference.md +240 -0
  16. package/dist/index.cjs +188 -303
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.js +172 -287
  19. package/dist/index.js.map +1 -1
  20. package/dist/schema.cjs +72 -0
  21. package/dist/schema.cjs.map +1 -0
  22. package/dist/{server/schema.d.ts → schema.d.ts} +14 -1
  23. package/dist/schema.d.ts.map +1 -0
  24. package/dist/schema.js +3 -0
  25. package/dist/schema.js.map +1 -0
  26. package/dist/server/index.cjs +19 -18
  27. package/dist/server/index.d.ts +1 -1
  28. package/dist/server/index.d.ts.map +1 -1
  29. package/dist/server/index.js +2 -1
  30. package/dist/storage/db/index.d.ts +57 -0
  31. package/dist/storage/db/index.d.ts.map +1 -0
  32. package/dist/storage/domains/{memory.d.ts → memory/index.d.ts} +6 -4
  33. package/dist/storage/domains/memory/index.d.ts.map +1 -0
  34. package/dist/storage/domains/{scores.d.ts → scores/index.d.ts} +12 -19
  35. package/dist/storage/domains/scores/index.d.ts.map +1 -0
  36. package/dist/storage/domains/{workflows.d.ts → workflows/index.d.ts} +13 -13
  37. package/dist/storage/domains/workflows/index.d.ts.map +1 -0
  38. package/dist/storage/index.d.ts +74 -153
  39. package/dist/storage/index.d.ts.map +1 -1
  40. package/package.json +17 -7
  41. package/dist/chunk-NZCHEPNU.js.map +0 -1
  42. package/dist/chunk-QKN2PWR2.cjs.map +0 -1
  43. package/dist/server/schema.d.ts.map +0 -1
  44. package/dist/storage/domains/memory.d.ts.map +0 -1
  45. package/dist/storage/domains/scores.d.ts.map +0 -1
  46. package/dist/storage/domains/workflows.d.ts.map +0 -1
  47. package/dist/storage/operations.d.ts +0 -40
  48. package/dist/storage/operations.d.ts.map +0 -1
@@ -1,64 +1,65 @@
1
1
  'use strict';
2
2
 
3
- var chunkQKN2PWR2_cjs = require('../chunk-QKN2PWR2.cjs');
3
+ var chunkBKVR7SL7_cjs = require('../chunk-BKVR7SL7.cjs');
4
+ var chunkH5QJE733_cjs = require('../chunk-H5QJE733.cjs');
4
5
 
5
6
 
6
7
 
8
+ Object.defineProperty(exports, "mastraStorage", {
9
+ enumerable: true,
10
+ get: function () { return chunkBKVR7SL7_cjs.mastraStorage; }
11
+ });
7
12
  Object.defineProperty(exports, "TABLE_MESSAGES", {
8
13
  enumerable: true,
9
- get: function () { return chunkQKN2PWR2_cjs.TABLE_MESSAGES; }
14
+ get: function () { return chunkH5QJE733_cjs.TABLE_MESSAGES; }
10
15
  });
11
16
  Object.defineProperty(exports, "TABLE_RESOURCES", {
12
17
  enumerable: true,
13
- get: function () { return chunkQKN2PWR2_cjs.TABLE_RESOURCES; }
18
+ get: function () { return chunkH5QJE733_cjs.TABLE_RESOURCES; }
14
19
  });
15
20
  Object.defineProperty(exports, "TABLE_SCORERS", {
16
21
  enumerable: true,
17
- get: function () { return chunkQKN2PWR2_cjs.TABLE_SCORERS; }
22
+ get: function () { return chunkH5QJE733_cjs.TABLE_SCORERS; }
18
23
  });
19
24
  Object.defineProperty(exports, "TABLE_THREADS", {
20
25
  enumerable: true,
21
- get: function () { return chunkQKN2PWR2_cjs.TABLE_THREADS; }
26
+ get: function () { return chunkH5QJE733_cjs.TABLE_THREADS; }
22
27
  });
23
28
  Object.defineProperty(exports, "TABLE_WORKFLOW_SNAPSHOT", {
24
29
  enumerable: true,
25
- get: function () { return chunkQKN2PWR2_cjs.TABLE_WORKFLOW_SNAPSHOT; }
30
+ get: function () { return chunkH5QJE733_cjs.TABLE_WORKFLOW_SNAPSHOT; }
26
31
  });
27
32
  Object.defineProperty(exports, "mastraDocumentsTable", {
28
33
  enumerable: true,
29
- get: function () { return chunkQKN2PWR2_cjs.mastraDocumentsTable; }
34
+ get: function () { return chunkH5QJE733_cjs.mastraDocumentsTable; }
30
35
  });
31
36
  Object.defineProperty(exports, "mastraMessagesTable", {
32
37
  enumerable: true,
33
- get: function () { return chunkQKN2PWR2_cjs.mastraMessagesTable; }
38
+ get: function () { return chunkH5QJE733_cjs.mastraMessagesTable; }
34
39
  });
35
40
  Object.defineProperty(exports, "mastraResourcesTable", {
36
41
  enumerable: true,
37
- get: function () { return chunkQKN2PWR2_cjs.mastraResourcesTable; }
42
+ get: function () { return chunkH5QJE733_cjs.mastraResourcesTable; }
38
43
  });
39
44
  Object.defineProperty(exports, "mastraScoresTable", {
40
45
  enumerable: true,
41
- get: function () { return chunkQKN2PWR2_cjs.mastraScoresTable; }
42
- });
43
- Object.defineProperty(exports, "mastraStorage", {
44
- enumerable: true,
45
- get: function () { return chunkQKN2PWR2_cjs.mastraStorage; }
46
+ get: function () { return chunkH5QJE733_cjs.mastraScoresTable; }
46
47
  });
47
48
  Object.defineProperty(exports, "mastraThreadsTable", {
48
49
  enumerable: true,
49
- get: function () { return chunkQKN2PWR2_cjs.mastraThreadsTable; }
50
+ get: function () { return chunkH5QJE733_cjs.mastraThreadsTable; }
50
51
  });
51
52
  Object.defineProperty(exports, "mastraVectorIndexesTable", {
52
53
  enumerable: true,
53
- get: function () { return chunkQKN2PWR2_cjs.mastraVectorIndexesTable; }
54
+ get: function () { return chunkH5QJE733_cjs.mastraVectorIndexesTable; }
54
55
  });
55
56
  Object.defineProperty(exports, "mastraVectorsTable", {
56
57
  enumerable: true,
57
- get: function () { return chunkQKN2PWR2_cjs.mastraVectorsTable; }
58
+ get: function () { return chunkH5QJE733_cjs.mastraVectorsTable; }
58
59
  });
59
60
  Object.defineProperty(exports, "mastraWorkflowSnapshotsTable", {
60
61
  enumerable: true,
61
- get: function () { return chunkQKN2PWR2_cjs.mastraWorkflowSnapshotsTable; }
62
+ get: function () { return chunkH5QJE733_cjs.mastraWorkflowSnapshotsTable; }
62
63
  });
63
64
  //# sourceMappingURL=index.cjs.map
64
65
  //# sourceMappingURL=index.cjs.map
@@ -1,3 +1,3 @@
1
1
  export { mastraStorage } from './storage.js';
2
- export { mastraThreadsTable, mastraMessagesTable, mastraResourcesTable, mastraWorkflowSnapshotsTable, mastraScoresTable, mastraVectorIndexesTable, mastraVectorsTable, mastraDocumentsTable, TABLE_WORKFLOW_SNAPSHOT, TABLE_MESSAGES, TABLE_THREADS, TABLE_RESOURCES, TABLE_SCORERS, } from './schema.js';
2
+ export { mastraThreadsTable, mastraMessagesTable, mastraResourcesTable, mastraWorkflowSnapshotsTable, mastraScoresTable, mastraVectorIndexesTable, mastraVectorsTable, mastraDocumentsTable, TABLE_WORKFLOW_SNAPSHOT, TABLE_MESSAGES, TABLE_THREADS, TABLE_RESOURCES, TABLE_SCORERS, } from '../schema.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAEL,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,4BAA4B,EAC5B,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EAEpB,uBAAuB,EACvB,cAAc,EACd,aAAa,EACb,eAAe,EACf,aAAa,GACd,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAI1C,OAAO,EAEL,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,4BAA4B,EAC5B,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EAEpB,uBAAuB,EACvB,cAAc,EACd,aAAa,EACb,eAAe,EACf,aAAa,GACd,MAAM,WAAW,CAAC"}
@@ -1,3 +1,4 @@
1
- export { TABLE_MESSAGES, TABLE_RESOURCES, TABLE_SCORERS, TABLE_THREADS, TABLE_WORKFLOW_SNAPSHOT, mastraDocumentsTable, mastraMessagesTable, mastraResourcesTable, mastraScoresTable, mastraStorage, mastraThreadsTable, mastraVectorIndexesTable, mastraVectorsTable, mastraWorkflowSnapshotsTable } from '../chunk-NZCHEPNU.js';
1
+ export { mastraStorage } from '../chunk-KSAPIIEJ.js';
2
+ export { TABLE_MESSAGES, TABLE_RESOURCES, TABLE_SCORERS, TABLE_THREADS, TABLE_WORKFLOW_SNAPSHOT, mastraDocumentsTable, mastraMessagesTable, mastraResourcesTable, mastraScoresTable, mastraThreadsTable, mastraVectorIndexesTable, mastraVectorsTable, mastraWorkflowSnapshotsTable } from '../chunk-HXB4DWFE.js';
2
3
  //# sourceMappingURL=index.js.map
3
4
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,57 @@
1
+ import { MastraBase } from '@mastra/core/base';
2
+ import type { TABLE_NAMES } from '@mastra/core/storage';
3
+ import { ConvexAdminClient } from '../client.js';
4
+ import type { EqualityFilter } from '../types.js';
5
+ /**
6
+ * Configuration for standalone domain usage.
7
+ * Accepts either:
8
+ * 1. An existing ConvexAdminClient
9
+ * 2. Config to create a new client internally
10
+ */
11
+ export type ConvexDomainConfig = ConvexDomainClientConfig | ConvexDomainRestConfig;
12
+ /**
13
+ * Pass an existing ConvexAdminClient
14
+ */
15
+ export interface ConvexDomainClientConfig {
16
+ client: ConvexAdminClient;
17
+ }
18
+ /**
19
+ * Pass config to create a new ConvexAdminClient internally
20
+ */
21
+ export interface ConvexDomainRestConfig {
22
+ deploymentUrl: string;
23
+ adminAuthToken: string;
24
+ storageFunction?: string;
25
+ }
26
+ /**
27
+ * Resolves ConvexDomainConfig to a ConvexAdminClient.
28
+ * Handles creating a new client if config is provided.
29
+ */
30
+ export declare function resolveConvexConfig(config: ConvexDomainConfig): ConvexAdminClient;
31
+ export declare class ConvexDB extends MastraBase {
32
+ private readonly client;
33
+ constructor(client: ConvexAdminClient);
34
+ hasColumn(_table: string, _column: string): Promise<boolean>;
35
+ clearTable({ tableName }: {
36
+ tableName: TABLE_NAMES;
37
+ }): Promise<void>;
38
+ dropTable({ tableName }: {
39
+ tableName: TABLE_NAMES;
40
+ }): Promise<void>;
41
+ insert({ tableName, record }: {
42
+ tableName: TABLE_NAMES;
43
+ record: Record<string, any>;
44
+ }): Promise<void>;
45
+ batchInsert({ tableName, records }: {
46
+ tableName: TABLE_NAMES;
47
+ records: Record<string, any>[];
48
+ }): Promise<void>;
49
+ load<R>({ tableName, keys }: {
50
+ tableName: TABLE_NAMES;
51
+ keys: Record<string, any>;
52
+ }): Promise<R | null>;
53
+ queryTable<R>(tableName: TABLE_NAMES, filters?: EqualityFilter[]): Promise<R[]>;
54
+ deleteMany(tableName: TABLE_NAMES, ids: string[]): Promise<void>;
55
+ private normalizeRecord;
56
+ }
57
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/storage/db/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,O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AAO,CAAC,IAAI,CAAC;IAU9G,IAAI,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE;QAAE,SAAS,EAAE,WAAW,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAU/F,UAAU,CAAC,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAQ/E,UAAU,CAAC,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAS7E,OAAO,CAAC,eAAe;CAqBxB"}
@@ -2,10 +2,12 @@ import type { MastraMessageContentV2 } from '@mastra/core/agent';
2
2
  import type { MastraDBMessage, StorageThreadType } from '@mastra/core/memory';
3
3
  import { MemoryStorage } from '@mastra/core/storage';
4
4
  import type { StorageListMessagesInput, StorageListMessagesOutput, StorageListThreadsByResourceIdInput, StorageListThreadsByResourceIdOutput, StorageResourceType } from '@mastra/core/storage';
5
- import type { StoreOperationsConvex } from '../operations.js';
5
+ import type { ConvexDomainConfig } from '../../db/index.js';
6
6
  export declare class MemoryConvex extends MemoryStorage {
7
- private readonly operations;
8
- constructor(operations: StoreOperationsConvex);
7
+ #private;
8
+ constructor(config: ConvexDomainConfig);
9
+ init(): Promise<void>;
10
+ dangerouslyClearAll(): Promise<void>;
9
11
  getThreadById({ threadId }: {
10
12
  threadId: string;
11
13
  }): Promise<StorageThreadType | null>;
@@ -56,4 +58,4 @@ export declare class MemoryConvex extends MemoryStorage {
56
58
  private parseStoredMessage;
57
59
  private addContextMessages;
58
60
  }
59
- //# sourceMappingURL=memory.d.ts.map
61
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/memory/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AG,OAAO,CAAC,mBAAmB,CAAC;IA4BhC,OAAO,CAAC,kBAAkB;YAaZ,kBAAkB;CA0CjC"}
@@ -1,14 +1,16 @@
1
- import type { ScoreRowData, ScoringEntityType, ScoringSource } from '@mastra/core/evals';
1
+ import type { ListScoresResponse, SaveScorePayload, ScoreRowData, ScoringEntityType, ScoringSource } from '@mastra/core/evals';
2
2
  import { ScoresStorage } from '@mastra/core/storage';
3
- import type { PaginationInfo, StoragePagination } from '@mastra/core/storage';
4
- import type { StoreOperationsConvex } from '../operations.js';
3
+ import type { StoragePagination } from '@mastra/core/storage';
4
+ import type { ConvexDomainConfig } from '../../db/index.js';
5
5
  export declare class ScoresConvex extends ScoresStorage {
6
- private readonly operations;
7
- constructor(operations: StoreOperationsConvex);
6
+ #private;
7
+ constructor(config: ConvexDomainConfig);
8
+ init(): Promise<void>;
9
+ dangerouslyClearAll(): Promise<void>;
8
10
  getScoreById({ id }: {
9
11
  id: string;
10
12
  }): Promise<ScoreRowData | null>;
11
- saveScore(score: Omit<ScoreRowData, 'id' | 'createdAt' | 'updatedAt'>): Promise<{
13
+ saveScore(score: SaveScorePayload): Promise<{
12
14
  score: ScoreRowData;
13
15
  }>;
14
16
  listScoresByScorerId({ scorerId, pagination, entityId, entityType, source, }: {
@@ -17,26 +19,17 @@ export declare class ScoresConvex extends ScoresStorage {
17
19
  entityId?: string;
18
20
  entityType?: ScoringEntityType;
19
21
  source?: ScoringSource;
20
- }): Promise<{
21
- pagination: PaginationInfo;
22
- scores: ScoreRowData[];
23
- }>;
22
+ }): Promise<ListScoresResponse>;
24
23
  listScoresByRunId({ runId, pagination, }: {
25
24
  runId: string;
26
25
  pagination: StoragePagination;
27
- }): Promise<{
28
- pagination: PaginationInfo;
29
- scores: ScoreRowData[];
30
- }>;
26
+ }): Promise<ListScoresResponse>;
31
27
  listScoresByEntityId({ entityId, entityType, pagination, }: {
32
28
  entityId: string;
33
29
  entityType: ScoringEntityType;
34
30
  pagination: StoragePagination;
35
- }): Promise<{
36
- pagination: PaginationInfo;
37
- scores: ScoreRowData[];
38
- }>;
31
+ }): Promise<ListScoresResponse>;
39
32
  private listScores;
40
33
  private deserialize;
41
34
  }
42
- //# sourceMappingURL=scores.d.ts.map
35
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/scores/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAiB,aAAa,EAAwB,MAAM,sBAAsB,CAAC;AAC1F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAOnD,qBAAa,YAAa,SAAQ,aAAa;;gBAEjC,MAAM,EAAE,kBAAkB;IAMhC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAIpC,YAAY,CAAC,EAAE,EAAE,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAQlE,SAAS,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,YAAY,CAAA;KAAE,CAAC;IAiBpE,oBAAoB,CAAC,EACzB,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,UAAU,EACV,MAAM,GACP,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,iBAAiB,CAAC;QAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,iBAAiB,CAAC;QAC/B,MAAM,CAAC,EAAE,aAAa,CAAC;KACxB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAOzB,iBAAiB,CAAC,EACtB,KAAK,EACL,UAAU,GACX,EAAE;QACD,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,iBAAiB,CAAC;KAC/B,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAOzB,oBAAoB,CAAC,EACzB,QAAQ,EACR,UAAU,EACV,UAAU,GACX,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,iBAAiB,CAAC;QAC9B,UAAU,EAAE,iBAAiB,CAAC;KAC/B,GAAG,OAAO,CAAC,kBAAkB,CAAC;YAOjB,UAAU;IA4CxB,OAAO,CAAC,WAAW;CAOpB"}
@@ -1,10 +1,12 @@
1
1
  import { WorkflowsStorage } from '@mastra/core/storage';
2
- import type { StorageListWorkflowRunsInput, WorkflowRun, WorkflowRuns } from '@mastra/core/storage';
3
- import type { StepResult, WorkflowRunState, WorkflowRunStatus } from '@mastra/core/workflows';
4
- import type { StoreOperationsConvex } from '../operations.js';
2
+ import type { StorageListWorkflowRunsInput, WorkflowRun, WorkflowRuns, UpdateWorkflowStateOptions } from '@mastra/core/storage';
3
+ import type { StepResult, WorkflowRunState } from '@mastra/core/workflows';
4
+ import type { ConvexDomainConfig } from '../../db/index.js';
5
5
  export declare class WorkflowsConvex extends WorkflowsStorage {
6
- private readonly operations;
7
- constructor(operations: StoreOperationsConvex);
6
+ #private;
7
+ constructor(config: ConvexDomainConfig);
8
+ init(): Promise<void>;
9
+ dangerouslyClearAll(): Promise<void>;
8
10
  updateWorkflowResults({ workflowName, runId, stepId, result, requestContext, }: {
9
11
  workflowName: string;
10
12
  runId: string;
@@ -15,13 +17,7 @@ export declare class WorkflowsConvex extends WorkflowsStorage {
15
17
  updateWorkflowState({ workflowName, runId, opts, }: {
16
18
  workflowName: string;
17
19
  runId: string;
18
- opts: {
19
- status: WorkflowRunStatus;
20
- result?: StepResult<any, any, any, any>;
21
- error?: string;
22
- suspendedPaths?: Record<string, number[]>;
23
- waitingPaths?: Record<string, number[]>;
24
- };
20
+ opts: UpdateWorkflowStateOptions;
25
21
  }): Promise<WorkflowRunState | undefined>;
26
22
  persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot, }: {
27
23
  workflowName: string;
@@ -38,7 +34,11 @@ export declare class WorkflowsConvex extends WorkflowsStorage {
38
34
  runId: string;
39
35
  workflowName?: string;
40
36
  }): Promise<WorkflowRun | null>;
37
+ deleteWorkflowRunById({ runId, workflowName }: {
38
+ runId: string;
39
+ workflowName: string;
40
+ }): Promise<void>;
41
41
  private getRun;
42
42
  private ensureSnapshot;
43
43
  }
44
- //# sourceMappingURL=workflows.d.ts.map
44
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/workflows/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6C,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACnG,OAAO,KAAK,EACV,4BAA4B,EAE5B,WAAW,EACX,YAAY,EACZ,0BAA0B,EAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAQnD,qBAAa,eAAgB,SAAQ,gBAAgB;;gBAEvC,MAAM,EAAE,kBAAkB;IAMhC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAIpC,qBAAqB,CAAC,EAC1B,YAAY,EACZ,KAAK,EACL,MAAM,EACN,MAAM,EACN,cAAc,GACf,EAAE;QACD,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QACvC,cAAc,E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 -1,161 +1,82 @@
1
- import type { ScoreRowData, ScoringEntityType, ScoringSource } from '@mastra/core/evals';
2
- import type { MastraDBMessage, StorageThreadType } from '@mastra/core/memory';
3
- import type { StorageColumn, StorageResourceType, PaginationInfo, StorageListMessagesInput, StorageListMessagesOutput, StorageListThreadsByResourceIdInput, StorageListThreadsByResourceIdOutput, StorageListWorkflowRunsInput, StoragePagination, WorkflowRun, WorkflowRuns, TABLE_NAMES } from '@mastra/core/storage';
1
+ import type { StorageDomains } from '@mastra/core/storage';
4
2
  import { MastraStorage } from '@mastra/core/storage';
5
- import type { StepResult, WorkflowRunState, WorkflowRunStatus } from '@mastra/core/workflows';
6
3
  import type { ConvexAdminClientConfig } from './client.js';
7
- export type ConvexStoreConfig = ConvexAdminClientConfig & {
4
+ import { ConvexAdminClient } from './client.js';
5
+ import { MemoryConvex } from './domains/memory/index.js';
6
+ import { ScoresConvex } from './domains/scores/index.js';
7
+ import { WorkflowsConvex } from './domains/workflows/index.js';
8
+ export { MemoryConvex, ScoresConvex, WorkflowsConvex };
9
+ export type { ConvexDomainConfig } from './db/index.js';
10
+ /**
11
+ * Convex configuration type.
12
+ *
13
+ * Accepts either:
14
+ * - A pre-configured ConvexAdminClient: `{ id, client }`
15
+ * - Deployment config: `{ id, deploymentUrl, adminAuthToken, storageFunction? }`
16
+ */
17
+ export type ConvexStoreConfig = {
8
18
  id: string;
9
19
  name?: string;
10
- };
20
+ /**
21
+ * When true, automatic initialization (table creation/migrations) is disabled.
22
+ * This is useful for CI/CD pipelines where you want to:
23
+ * 1. Run migrations explicitly during deployment (not at runtime)
24
+ * 2. Use different credentials for schema changes vs runtime operations
25
+ *
26
+ * When disableInit is true:
27
+ * - The storage will not automatically create/alter tables on first use
28
+ * - You must call `storage.init()` explicitly in your CI/CD scripts
29
+ *
30
+ * @example
31
+ * // In CI/CD script:
32
+ * const storage = new ConvexStore({ ...config, disableInit: false });
33
+ * await storage.init(); // Explicitly run migrations
34
+ *
35
+ * // In runtime application:
36
+ * const storage = new ConvexStore({ ...config, disableInit: true });
37
+ * // No auto-init, tables must already exist
38
+ */
39
+ disableInit?: boolean;
40
+ } & ({
41
+ /**
42
+ * Pre-configured ConvexAdminClient.
43
+ * Use this when you need to configure the client before initialization.
44
+ *
45
+ * @example
46
+ * ```typescript
47
+ * import { ConvexAdminClient } from '@mastra/convex/storage/client';
48
+ *
49
+ * const client = new ConvexAdminClient({
50
+ * deploymentUrl: 'https://your-deployment.convex.cloud',
51
+ * adminAuthToken: 'your-token',
52
+ * storageFunction: 'custom/storage:handle',
53
+ * });
54
+ *
55
+ * const store = new ConvexStore({ id: 'my-store', client });
56
+ * ```
57
+ */
58
+ client: ConvexAdminClient;
59
+ } | ConvexAdminClientConfig);
60
+ /**
61
+ * Convex storage adapter for Mastra.
62
+ *
63
+ * Access domain-specific storage via `getStore()`:
64
+ *
65
+ * @example
66
+ * ```typescript
67
+ * const storage = new ConvexStore({ id: 'my-store', deploymentUrl: '...', adminAuthToken: '...' });
68
+ *
69
+ * // Access memory domain
70
+ * const memory = await storage.getStore('memory');
71
+ * await memory?.saveThread({ thread });
72
+ *
73
+ * // Access workflows domain
74
+ * const workflows = await storage.getStore('workflows');
75
+ * await workflows?.persistWorkflowSnapshot({ workflowName, runId, snapshot });
76
+ * ```
77
+ */
11
78
  export declare class ConvexStore extends MastraStorage {
12
- private readonly operations;
13
- private readonly memory;
14
- private readonly workflows;
15
- private readonly scores;
79
+ stores: StorageDomains;
16
80
  constructor(config: ConvexStoreConfig);
17
- get supports(): {
18
- selectByIncludeResourceScope: boolean;
19
- resourceWorkingMemory: boolean;
20
- hasColumn: boolean;
21
- createTable: boolean;
22
- deleteMessages: boolean;
23
- observabilityInstance: boolean;
24
- listScoresBySpan: boolean;
25
- };
26
- createTable(_args: {
27
- tableName: TABLE_NAMES;
28
- schema: Record<string, StorageColumn>;
29
- }): Promise<void>;
30
- clearTable({ tableName }: {
31
- tableName: TABLE_NAMES;
32
- }): Promise<void>;
33
- dropTable({ tableName }: {
34
- tableName: TABLE_NAMES;
35
- }): Promise<void>;
36
- alterTable(_args: {
37
- tableName: TABLE_NAMES;
38
- schema: Record<string, StorageColumn>;
39
- ifNotExists: string[];
40
- }): Promise<void>;
41
- insert({ tableName, record }: {
42
- tableName: TABLE_NAMES;
43
- record: Record<string, any>;
44
- }): Promise<void>;
45
- batchInsert({ tableName, records }: {
46
- tableName: TABLE_NAMES;
47
- records: Record<string, any>[];
48
- }): Promise<void>;
49
- load<R>({ tableName, keys }: {
50
- tableName: TABLE_NAMES;
51
- keys: Record<string, any>;
52
- }): Promise<R | null>;
53
- getThreadById({ threadId }: {
54
- threadId: string;
55
- }): Promise<StorageThreadType | null>;
56
- saveThread({ thread }: {
57
- thread: StorageThreadType;
58
- }): Promise<StorageThreadType>;
59
- updateThread({ id, title, metadata, }: {
60
- id: string;
61
- title: string;
62
- metadata: Record<string, unknown>;
63
- }): Promise<StorageThreadType>;
64
- deleteThread({ threadId }: {
65
- threadId: string;
66
- }): Promise<void>;
67
- listMessages(args: StorageListMessagesInput): Promise<StorageListMessagesOutput>;
68
- listMessagesById({ messageIds }: {
69
- messageIds: string[];
70
- }): Promise<{
71
- messages: MastraDBMessage[];
72
- }>;
73
- saveMessages(args: {
74
- messages: MastraDBMessage[];
75
- }): Promise<{
76
- messages: MastraDBMessage[];
77
- }>;
78
- updateMessages({ messages, }: {
79
- messages: (Partial<Omit<MastraDBMessage, 'createdAt'>> & {
80
- id: string;
81
- })[];
82
- }): Promise<MastraDBMessage[]>;
83
- deleteMessages(messageIds: string[]): Promise<void>;
84
- listThreadsByResourceId(args: StorageListThreadsByResourceIdInput): Promise<StorageListThreadsByResourceIdOutput>;
85
- getResourceById({ resourceId }: {
86
- resourceId: string;
87
- }): Promise<StorageResourceType | null>;
88
- saveResource({ resource }: {
89
- resource: StorageResourceType;
90
- }): Promise<StorageResourceType>;
91
- updateResource({ resourceId, workingMemory, metadata, }: {
92
- resourceId: string;
93
- workingMemory?: string;
94
- metadata?: Record<string, unknown>;
95
- }): Promise<StorageResourceType>;
96
- updateWorkflowResults(params: {
97
- workflowName: string;
98
- runId: string;
99
- stepId: string;
100
- result: StepResult<any, any, any, any>;
101
- requestContext: Record<string, any>;
102
- }): Promise<Record<string, StepResult<any, any, any, any>>>;
103
- updateWorkflowState(params: {
104
- workflowName: string;
105
- runId: string;
106
- opts: {
107
- status: WorkflowRunStatus;
108
- result?: StepResult<any, any, any, any>;
109
- error?: string;
110
- suspendedPaths?: Record<string, number[]>;
111
- waitingPaths?: Record<string, number[]>;
112
- };
113
- }): Promise<WorkflowRunState | undefined>;
114
- persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot, }: {
115
- workflowName: string;
116
- runId: string;
117
- resourceId?: string | undefined;
118
- snapshot: WorkflowRunState;
119
- }): Promise<void>;
120
- loadWorkflowSnapshot({ workflowName, runId, }: {
121
- workflowName: string;
122
- runId: string;
123
- }): Promise<WorkflowRunState | null>;
124
- listWorkflowRuns(args?: StorageListWorkflowRunsInput): Promise<WorkflowRuns>;
125
- getWorkflowRunById({ runId, workflowName, }: {
126
- runId: string;
127
- workflowName?: string | undefined;
128
- }): Promise<WorkflowRun | null>;
129
- getScoreById({ id }: {
130
- id: string;
131
- }): Promise<ScoreRowData | null>;
132
- saveScore(score: Omit<ScoreRowData, 'id' | 'createdAt' | 'updatedAt'>): Promise<{
133
- score: ScoreRowData;
134
- }>;
135
- listScoresByScorerId({ scorerId, pagination, entityId, entityType, source, }: {
136
- scorerId: string;
137
- pagination: StoragePagination;
138
- entityId?: string | undefined;
139
- entityType?: ScoringEntityType | undefined;
140
- source?: ScoringSource | undefined;
141
- }): Promise<{
142
- pagination: PaginationInfo;
143
- scores: ScoreRowData[];
144
- }>;
145
- listScoresByRunId({ runId, pagination, }: {
146
- runId: string;
147
- pagination: StoragePagination;
148
- }): Promise<{
149
- pagination: PaginationInfo;
150
- scores: ScoreRowData[];
151
- }>;
152
- listScoresByEntityId({ entityId, entityType, pagination, }: {
153
- pagination: StoragePagination;
154
- entityId: string;
155
- entityType: ScoringEntityType;
156
- }): Promise<{
157
- pagination: PaginationInfo;
158
- scores: ScoreRowData[];
159
- }>;
160
81
  }
161
82
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,wBAAwB,EACxB,yBAAyB,EACzB,mCAAmC,EACnC,oCAAoC,EACpC,4BAA4B,EAC5B,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,WAAW,EACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE9F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAOxD,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG;IACxD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,qBAAa,WAAY,SAAQ,aAAa;IAC5C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAwB;IACnD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkB;IAC5C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;gBAE1B,MAAM,EAAE,iBAAiB;IAiBrC,IAAW,QAAQ;;;;;;;;MAUlB;IAEK,WAAW,CAAC,KAAK,EAAE;QAAE,SAAS,EAAE,WAAW,CAAC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,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;;;;;;OAkBG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,CACA;IACE;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,EAAE,iBAAiB,CAAC;CAC3B,GACD,uBAAuB,CAC1B,CAAC;AASF;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,WAAY,SAAQ,aAAa;IAC5C,MAAM,EAAE,cAAc,CAAwB;gBAElC,MAAM,EAAE,iBAAiB;CAiBtC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/convex",
3
- "version": "0.0.0-feat-improve-processors-20251205191721",
3
+ "version": "0.0.0-feat-mcp-embedded-docs-tools-clean-20260102135536",
4
4
  "description": "Convex provider for Mastra - includes both storage and vector adapters plus Convex server helpers",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,6 +26,16 @@
26
26
  "default": "./dist/server/index.cjs"
27
27
  }
28
28
  },
29
+ "./schema": {
30
+ "import": {
31
+ "types": "./dist/schema.d.ts",
32
+ "default": "./dist/schema.js"
33
+ },
34
+ "require": {
35
+ "types": "./dist/schema.d.ts",
36
+ "default": "./dist/schema.cjs"
37
+ }
38
+ },
29
39
  "./package.json": "./package.json"
30
40
  },
31
41
  "license": "Apache-2.0",
@@ -33,7 +43,6 @@
33
43
  "convex": "^1.29.3"
34
44
  },
35
45
  "devDependencies": {
36
- "@microsoft/api-extractor": "^7.52.8",
37
46
  "@types/node": "22.13.17",
38
47
  "@vitest/coverage-v8": "4.0.12",
39
48
  "@vitest/ui": "4.0.12",
@@ -42,13 +51,13 @@
42
51
  "tsup": "^8.5.0",
43
52
  "typescript": "^5.8.3",
44
53
  "vitest": "4.0.12",
45
- "@internal/lint": "0.0.0-feat-improve-processors-20251205191721",
46
- "@internal/storage-test-utils": "0.0.49",
47
- "@internal/types-builder": "0.0.0-feat-improve-processors-20251205191721",
48
- "@mastra/core": "0.0.0-feat-improve-processors-20251205191721"
54
+ "@internal/lint": "0.0.0-feat-mcp-embedded-docs-tools-clean-20260102135536",
55
+ "@internal/types-builder": "0.0.0-feat-mcp-embedded-docs-tools-clean-20260102135536",
56
+ "@mastra/core": "0.0.0-feat-mcp-embedded-docs-tools-clean-20260102135536",
57
+ "@internal/storage-test-utils": "0.0.49"
49
58
  },
50
59
  "peerDependencies": {
51
- "@mastra/core": "0.0.0-feat-improve-processors-20251205191721"
60
+ "@mastra/core": "0.0.0-feat-mcp-embedded-docs-tools-clean-20260102135536"
52
61
  },
53
62
  "files": [
54
63
  "dist",
@@ -68,6 +77,7 @@
68
77
  },
69
78
  "scripts": {
70
79
  "build": "tsup --silent --config tsup.config.ts",
80
+ "postbuild": "pnpx tsx ../../scripts/generate-package-docs.ts stores/convex",
71
81
  "build:watch": "tsup --watch --silent --config tsup.config.ts",
72
82
  "test": "vitest run",
73
83
  "lint": "eslint ."