@mastra/pg 1.14.3 → 1.15.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/CHANGELOG.md +181 -0
- package/dist/docs/SKILL.md +2 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-memory-semantic-recall.md +8 -0
- package/dist/docs/references/docs-memory-storage.md +6 -0
- package/dist/docs/references/docs-memory-working-memory.md +2 -0
- package/dist/docs/references/docs-rag-overview.md +2 -0
- package/dist/docs/references/docs-rag-retrieval.md +2 -0
- package/dist/docs/references/docs-rag-vector-databases.md +2 -0
- package/dist/docs/references/reference-memory-memory-class.md +3 -0
- package/dist/docs/references/reference-processors-message-history-processor.md +3 -0
- package/dist/docs/references/reference-processors-semantic-recall-processor.md +3 -0
- package/dist/docs/references/reference-processors-working-memory-processor.md +3 -0
- package/dist/docs/references/reference-rag-metadata-filters.md +2 -0
- package/dist/docs/references/reference-storage-composite.md +2 -0
- package/dist/docs/references/reference-storage-dynamodb.md +2 -0
- package/dist/docs/references/reference-storage-postgresql.md +2 -0
- package/dist/docs/references/reference-storage-retention.md +180 -0
- package/dist/docs/references/reference-tools-vector-query-tool.md +2 -0
- package/dist/docs/references/reference-vectors-pg.md +2 -0
- package/dist/index.cjs +932 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +933 -54
- package/dist/index.js.map +1 -1
- package/dist/shared/config.d.ts +8 -1
- package/dist/shared/config.d.ts.map +1 -1
- package/dist/storage/db/index.d.ts +51 -0
- package/dist/storage/db/index.d.ts.map +1 -1
- package/dist/storage/domains/background-tasks/index.d.ts +19 -1
- package/dist/storage/domains/background-tasks/index.d.ts.map +1 -1
- package/dist/storage/domains/datasets/index.d.ts +6 -7
- package/dist/storage/domains/datasets/index.d.ts.map +1 -1
- package/dist/storage/domains/experiments/index.d.ts +39 -5
- package/dist/storage/domains/experiments/index.d.ts.map +1 -1
- package/dist/storage/domains/memory/index.d.ts +39 -1
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/notifications/index.d.ts +18 -1
- package/dist/storage/domains/notifications/index.d.ts.map +1 -1
- package/dist/storage/domains/observability/index.d.ts +22 -1
- package/dist/storage/domains/observability/index.d.ts.map +1 -1
- package/dist/storage/domains/observability/v-next/index.d.ts +17 -1
- package/dist/storage/domains/observability/v-next/index.d.ts.map +1 -1
- package/dist/storage/domains/observability/v-next/retention.d.ts +64 -0
- package/dist/storage/domains/observability/v-next/retention.d.ts.map +1 -0
- package/dist/storage/domains/schedules/index.d.ts +23 -1
- package/dist/storage/domains/schedules/index.d.ts.map +1 -1
- package/dist/storage/domains/scorer-definitions/index.d.ts.map +1 -1
- package/dist/storage/domains/scores/index.d.ts +26 -5
- package/dist/storage/domains/scores/index.d.ts.map +1 -1
- package/dist/storage/domains/utils.d.ts +20 -1
- package/dist/storage/domains/utils.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +19 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/retention.d.ts +76 -0
- package/dist/storage/retention.d.ts.map +1 -0
- package/dist/storage/test-utils.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retention.d.ts","sourceRoot":"","sources":["../../../../../src/storage/domains/observability/v-next/retention.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE/E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;CACf;AAQD,wDAAwD;AACxD,wBAAgB,eAAe,CAAC,MAAM,EAAE,oBAAoB,EAAE,GAAG,SAAa,GAAG,IAAI,CAEpF;AA+BD;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CAAC,EAC1C,MAAM,EACN,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,GACR,EAAE;IACD,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA2BjC;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,MAAM,EACN,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,GACR,EAAE;IACD,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAuBjC"}
|
|
@@ -1,12 +1,34 @@
|
|
|
1
|
-
import type { Schedule, ScheduleFilter, ScheduleTrigger, ScheduleTriggerListOptions, ScheduleUpdate, CreateIndexOptions } from '@mastra/core/storage';
|
|
1
|
+
import type { Schedule, ScheduleFilter, ScheduleTrigger, ScheduleTriggerListOptions, ScheduleUpdate, CreateIndexOptions, PruneOptions, PruneResult, RetentionTablesDescriptor, TableRetentionPolicy } from '@mastra/core/storage';
|
|
2
2
|
import { SchedulesStorage } from '@mastra/core/storage';
|
|
3
3
|
import type { PgDomainConfig } from '../../db/index.js';
|
|
4
4
|
export declare class SchedulesPG extends SchedulesStorage {
|
|
5
5
|
#private;
|
|
6
6
|
/** Tables managed by this domain */
|
|
7
7
|
static readonly MANAGED_TABLES: readonly ["mastra_schedules", "mastra_schedule_triggers"];
|
|
8
|
+
/**
|
|
9
|
+
* The fire/run history (`schedule_triggers`, one row per fire) is the growth
|
|
10
|
+
* table; schedule definitions are config and excluded. Anchored on
|
|
11
|
+
* `actual_fire_at`, a bigint epoch-ms column (numeric comparison, not
|
|
12
|
+
* timestamptz).
|
|
13
|
+
*/
|
|
14
|
+
static readonly retentionTables: RetentionTablesDescriptor;
|
|
8
15
|
constructor(config: PgDomainConfig);
|
|
9
16
|
init(): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Lazily ensures a btree index exists on each configured policy's retention
|
|
19
|
+
* anchor column so age-based `prune()` deletes stay fast. The default
|
|
20
|
+
* composite index leads with `schedule_id`, so a bare `actual_fire_at` range
|
|
21
|
+
* scan can't use it. Called from the prune path (not init) so only
|
|
22
|
+
* deployments that configure retention pay the index's write/disk overhead.
|
|
23
|
+
* Created even with `skipDefaultIndexes` — retention is an explicit opt-in,
|
|
24
|
+
* so its supporting index is not part of the default index set.
|
|
25
|
+
*/
|
|
26
|
+
private ensureRetentionIndexes;
|
|
27
|
+
/**
|
|
28
|
+
* Delete trigger (fire history) rows whose `actual_fire_at` is older than the
|
|
29
|
+
* `triggers` policy's `maxAge`, batched. Schedule definitions are never pruned.
|
|
30
|
+
*/
|
|
31
|
+
prune(policies: Record<string, TableRetentionPolicy>, options?: PruneOptions): Promise<PruneResult[]>;
|
|
10
32
|
/**
|
|
11
33
|
* Returns default index definitions for the schedules domain.
|
|
12
34
|
* @param schemaPrefix - Prefix for index names (e.g. "my_schema_" or "")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/schedules/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EAGd,eAAe,EACf,0BAA0B,EAC1B,cAAc,EACd,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/schedules/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EAGd,eAAe,EACf,0BAA0B,EAC1B,cAAc,EACd,kBAAkB,EAElB,YAAY,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AE,gBAAgB,EAAE,kCAAkC,CAAA;KAAE,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAsF7G,MAAM,CAAC,KAAK,EAAE,kCAAkC,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAiFvF,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBjC,IAAI,CAAC,IAAI,CAAC,EAAE,iCAAiC,GAAG,OAAO,CAAC,kCAAkC,CAAC;IAuH3F,aAAa,CAAC,KAAK,EAAE,kCAAkC,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAqD1F,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC;IA2B/D,kBAAkB,CAAC,kBAAkB,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC;IA8B9G,gBAAgB,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC;IA8BrF,YAAY,CAAC,KAAK,EAAE,iCAAiC,GAAG,OAAO,CAAC,kCAAkC,CAAC;IAgFnG,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBxC,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBzD,aAAa,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IA6BhE,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,eAAe;CAkBxB"}
|
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
import type { ListScoresResponse, SaveScorePayload, ScoreRowData, ScoringSource } from '@mastra/core/evals';
|
|
2
|
-
import type { StoragePagination,
|
|
2
|
+
import type { CreateIndexOptions, PruneOptions, PruneResult, RetentionTablesDescriptor, ScoreTenancyFilters, StoragePagination, TableRetentionPolicy } from '@mastra/core/storage';
|
|
3
3
|
import { ScoresStorage } from '@mastra/core/storage';
|
|
4
4
|
import type { PgDomainConfig } from '../../db/index.js';
|
|
5
5
|
export declare class ScoresPG extends ScoresStorage {
|
|
6
6
|
#private;
|
|
7
7
|
/** Tables managed by this domain */
|
|
8
8
|
static readonly MANAGED_TABLES: readonly ["mastra_scorers"];
|
|
9
|
+
/**
|
|
10
|
+
* Scorer results accumulate as evals run. Single table, anchored on the
|
|
11
|
+
* timezone-aware `createdAtZ` mirror column (kept in sync by triggers).
|
|
12
|
+
*/
|
|
13
|
+
static readonly retentionTables: RetentionTablesDescriptor;
|
|
9
14
|
constructor(config: PgDomainConfig);
|
|
10
15
|
init(): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Lazily ensures a btree index exists on each configured policy's retention
|
|
18
|
+
* anchor column so age-based `prune()` deletes stay fast on large tables.
|
|
19
|
+
* Called from the prune path (not init) so only deployments that configure
|
|
20
|
+
* retention pay the index's write/disk overhead. Best-effort: failures are
|
|
21
|
+
* logged and pruning proceeds (correct, just slower).
|
|
22
|
+
* Created even with `skipDefaultIndexes` — retention is an explicit opt-in,
|
|
23
|
+
* so its supporting index is not part of the default index set.
|
|
24
|
+
*/
|
|
25
|
+
private ensureRetentionIndexes;
|
|
11
26
|
/**
|
|
12
27
|
* Returns default index definitions for the scores domain tables.
|
|
13
28
|
* @param schemaPrefix - Prefix for index names (e.g. "my_schema_" or "")
|
|
@@ -31,32 +46,38 @@ export declare class ScoresPG extends ScoresStorage {
|
|
|
31
46
|
*/
|
|
32
47
|
createCustomIndexes(): Promise<void>;
|
|
33
48
|
dangerouslyClearAll(): Promise<void>;
|
|
49
|
+
/** Delete scorer results older than the `scorers` policy's `maxAge`, batched. */
|
|
50
|
+
prune(policies: Record<string, TableRetentionPolicy>, options?: PruneOptions): Promise<PruneResult[]>;
|
|
34
51
|
getScoreById({ id }: {
|
|
35
52
|
id: string;
|
|
36
53
|
}): Promise<ScoreRowData | null>;
|
|
37
|
-
listScoresByScorerId({ scorerId, pagination, entityId, entityType, source, }: {
|
|
54
|
+
listScoresByScorerId({ scorerId, pagination, entityId, entityType, source, filters, }: {
|
|
38
55
|
scorerId: string;
|
|
39
56
|
pagination: StoragePagination;
|
|
40
57
|
entityId?: string;
|
|
41
58
|
entityType?: string;
|
|
42
59
|
source?: ScoringSource;
|
|
60
|
+
filters?: ScoreTenancyFilters;
|
|
43
61
|
}): Promise<ListScoresResponse>;
|
|
44
62
|
saveScore(score: SaveScorePayload): Promise<{
|
|
45
63
|
score: ScoreRowData;
|
|
46
64
|
}>;
|
|
47
|
-
listScoresByRunId({ runId, pagination, }: {
|
|
65
|
+
listScoresByRunId({ runId, pagination, filters, }: {
|
|
48
66
|
runId: string;
|
|
49
67
|
pagination: StoragePagination;
|
|
68
|
+
filters?: ScoreTenancyFilters;
|
|
50
69
|
}): Promise<ListScoresResponse>;
|
|
51
|
-
listScoresByEntityId({ entityId, entityType, pagination, }: {
|
|
70
|
+
listScoresByEntityId({ entityId, entityType, pagination, filters, }: {
|
|
52
71
|
pagination: StoragePagination;
|
|
53
72
|
entityId: string;
|
|
54
73
|
entityType: string;
|
|
74
|
+
filters?: ScoreTenancyFilters;
|
|
55
75
|
}): Promise<ListScoresResponse>;
|
|
56
|
-
listScoresBySpan({ traceId, spanId, pagination, }: {
|
|
76
|
+
listScoresBySpan({ traceId, spanId, pagination, filters, }: {
|
|
57
77
|
traceId: string;
|
|
58
78
|
spanId: string;
|
|
59
79
|
pagination: StoragePagination;
|
|
80
|
+
filters?: ScoreTenancyFilters;
|
|
60
81
|
}): Promise<ListScoresResponse>;
|
|
61
82
|
}
|
|
62
83
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/scores/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,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,CAAC,EAAE,mBAAmB,CAAC;KAC/B,GAAG,OAAO,CAAC,kBAAkB,CAAC;CA+ChC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StorageColumn, TABLE_NAMES } from '@mastra/core/storage';
|
|
1
|
+
import type { DatasetTenancyFilters, ExperimentTenancyFilters, StorageColumn, TABLE_NAMES } from '@mastra/core/storage';
|
|
2
2
|
export declare function getSchemaName(schema?: string): string | undefined;
|
|
3
3
|
export declare function getTableName({ indexName, schemaName }: {
|
|
4
4
|
indexName: string;
|
|
@@ -36,4 +36,23 @@ export declare function transformFromSqlRow<T>({ tableName, sqlRow, }: {
|
|
|
36
36
|
tableName: TABLE_NAMES;
|
|
37
37
|
sqlRow: Record<string, any>;
|
|
38
38
|
}): T;
|
|
39
|
+
/**
|
|
40
|
+
* Tenancy scope shape shared by domains that carry `organizationId` / `projectId`
|
|
41
|
+
* columns (datasets, experiments, ...). Aliases the core tenancy filter types so
|
|
42
|
+
* this helper stays in sync if the core shape ever changes.
|
|
43
|
+
*/
|
|
44
|
+
export type TenancyScope = DatasetTenancyFilters | ExperimentTenancyFilters;
|
|
45
|
+
/**
|
|
46
|
+
* Build additional `AND "col" = $N` conditions for a tenancy read-scope filter.
|
|
47
|
+
* Uses double-quoted PG identifiers and continues numbering from `startIndex`.
|
|
48
|
+
* Returns empty arrays and unchanged `nextIndex` when no filters apply.
|
|
49
|
+
*
|
|
50
|
+
* Shared across domains (datasets, experiments, ...) so tenancy predicates stay
|
|
51
|
+
* consistent and cross-tenant reads/deletes do not leak.
|
|
52
|
+
*/
|
|
53
|
+
export declare function tenancyWhere(filters: TenancyScope | undefined, startIndex: number): {
|
|
54
|
+
conditions: string[];
|
|
55
|
+
params: any[];
|
|
56
|
+
nextIndex: number;
|
|
57
|
+
};
|
|
39
58
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/storage/domains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E,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,GAAG,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAa5D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WorkflowsStorage } from '@mastra/core/storage';
|
|
2
|
-
import type { UpdateWorkflowStateOptions, StorageListWorkflowRunsInput, WorkflowRun, WorkflowRuns, CreateIndexOptions } from '@mastra/core/storage';
|
|
2
|
+
import type { UpdateWorkflowStateOptions, StorageListWorkflowRunsInput, WorkflowRun, WorkflowRuns, CreateIndexOptions, PruneOptions, PruneResult, RetentionTablesDescriptor, TableRetentionPolicy } from '@mastra/core/storage';
|
|
3
3
|
import type { StepResult, WorkflowRunState } from '@mastra/core/workflows';
|
|
4
4
|
import type { PgDomainConfig } from '../../db/index.js';
|
|
5
5
|
/**
|
|
@@ -16,6 +16,12 @@ export declare class WorkflowsPG extends WorkflowsStorage {
|
|
|
16
16
|
#private;
|
|
17
17
|
/** Tables managed by this domain */
|
|
18
18
|
static readonly MANAGED_TABLES: readonly ["mastra_workflow_snapshot"];
|
|
19
|
+
/**
|
|
20
|
+
* Workflow run snapshots accumulate as runs execute. Anchored on the
|
|
21
|
+
* timezone-aware `updatedAtZ` mirror column (last activity) so suspended or
|
|
22
|
+
* long-running runs are not pruned by start age.
|
|
23
|
+
*/
|
|
24
|
+
static readonly retentionTables: RetentionTablesDescriptor;
|
|
19
25
|
constructor(config: PgDomainConfig);
|
|
20
26
|
supportsConcurrentUpdates(): boolean;
|
|
21
27
|
private parseWorkflowRun;
|
|
@@ -35,6 +41,18 @@ export declare class WorkflowsPG extends WorkflowsStorage {
|
|
|
35
41
|
*/
|
|
36
42
|
createDefaultIndexes(): Promise<void>;
|
|
37
43
|
init(): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Lazily ensures a btree index exists on each configured policy's retention
|
|
46
|
+
* anchor column so age-based `prune()` deletes stay fast on large tables.
|
|
47
|
+
* Called from the prune path (not init) so only deployments that configure
|
|
48
|
+
* retention pay the index's write/disk overhead. Best-effort: failures are
|
|
49
|
+
* logged and pruning proceeds (correct, just slower).
|
|
50
|
+
* Created even with `skipDefaultIndexes` — retention is an explicit opt-in,
|
|
51
|
+
* so its supporting index is not part of the default index set.
|
|
52
|
+
*/
|
|
53
|
+
private ensureRetentionIndexes;
|
|
54
|
+
/** Delete workflow run snapshots older than the `workflowSnapshot` policy's `maxAge`, batched. */
|
|
55
|
+
prune(policies: Record<string, TableRetentionPolicy>, options?: PruneOptions): Promise<PruneResult[]>;
|
|
38
56
|
/**
|
|
39
57
|
* Creates custom user-defined indexes for this domain's tables.
|
|
40
58
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/workflows/index.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,gBAAgB,EAEjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,0BAA0B,EAC1B,4BAA4B,EAC5B,WAAW,EACX,YAAY,EACZ,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/workflows/index.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,gBAAgB,EAEjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,0BAA0B,EAC1B,4BAA4B,EAC5B,WAAW,EACX,YAAY,EACZ,kBAAkB,EAElB,YAAY,EACZ,WAAW,EACX,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAY/C;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAa5D;AAED,qBAAa,WAAY,SAAQ,gBAAgB;;IAM/C,oCAAoC;IAC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+
import type { PgDB } from './db/index.js';
|
|
3
|
+
/** One table to prune, resolved from a policy + the domain's descriptor. */
|
|
4
|
+
export interface PruneTarget {
|
|
5
|
+
/** Physical table name. */
|
|
6
|
+
table: TABLE_NAMES;
|
|
7
|
+
/** Anchor column for the age comparison. */
|
|
8
|
+
column: string;
|
|
9
|
+
/**
|
|
10
|
+
* How the anchor column stores time, which decides how the cutoff is bound:
|
|
11
|
+
* - `timestamp` (default): a `Date` compared against a `timestamptz` column.
|
|
12
|
+
* - `epoch-ms`: a raw millisecond number compared against a `bigint` column
|
|
13
|
+
* (e.g. `schedules.triggers.actual_fire_at`).
|
|
14
|
+
*/
|
|
15
|
+
anchorType: 'timestamp' | 'epoch-ms';
|
|
16
|
+
/** Retention policy (maxAge + optional batchSize). */
|
|
17
|
+
policy: TableRetentionPolicy;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Convert a policy's `maxAge` into a cutoff bound matching the anchor's storage
|
|
21
|
+
* type: a `Date` for `timestamptz` columns (pg compares timezone-aware), or a
|
|
22
|
+
* raw millisecond number for `bigint` epoch-ms columns.
|
|
23
|
+
*/
|
|
24
|
+
export declare function cutoffFor(policy: TableRetentionPolicy, anchorType: 'timestamp' | 'epoch-ms', now?: number): number | Date;
|
|
25
|
+
/**
|
|
26
|
+
* Run the bounded/cancellable batched-delete loop for a single logical target,
|
|
27
|
+
* delegating the actual delete of up to `limit` rows to `deleteBatch`. Returns
|
|
28
|
+
* `{ deleted, done }`; `done: false` means the loop stopped on a bound or the
|
|
29
|
+
* abort signal and eligible rows may remain.
|
|
30
|
+
*/
|
|
31
|
+
export declare function runBatchedDelete({ deleteBatch, batchSize, options, }: {
|
|
32
|
+
deleteBatch: (limit: number) => Promise<number>;
|
|
33
|
+
batchSize: number;
|
|
34
|
+
options?: PruneOptions;
|
|
35
|
+
}): Promise<{
|
|
36
|
+
deleted: number;
|
|
37
|
+
done: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Runs the bounded, batched, cancellable delete loop for a set of tables in the
|
|
41
|
+
* given order (callers pass children before parents for cascade-safe pruning),
|
|
42
|
+
* and returns one {@link PruneResult} per table.
|
|
43
|
+
*
|
|
44
|
+
* The loop:
|
|
45
|
+
* - deletes in chunks of `batchSize` (default 1000), each its own statement;
|
|
46
|
+
* - stops a table's loop when a batch deletes fewer rows than requested (drained),
|
|
47
|
+
* or when `maxBatches`/`maxRows` is hit, or the `signal` aborts — the latter
|
|
48
|
+
* three leave `done: false` so the caller can resume;
|
|
49
|
+
* - pauses `pauseMs` between batches when set, to avoid starving live traffic.
|
|
50
|
+
*
|
|
51
|
+
* `prune()` only deletes rows; it never reclaims disk. PostgreSQL reuses freed
|
|
52
|
+
* space (dead tuples) via autovacuum on subsequent writes, so tables stop
|
|
53
|
+
* growing. Returning disk to the OS (e.g. `VACUUM FULL`) is left to the operator.
|
|
54
|
+
*/
|
|
55
|
+
export declare function runPrune({ db, domain, targets, options, }: {
|
|
56
|
+
db: PgDB;
|
|
57
|
+
domain: string;
|
|
58
|
+
targets: PruneTarget[];
|
|
59
|
+
options?: PruneOptions;
|
|
60
|
+
}): Promise<PruneResult[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Resolve a domain's `{ tableKey: policy }` map plus its descriptor into an
|
|
63
|
+
* ordered list of {@link PruneTarget}s. `order` lists table keys children-first
|
|
64
|
+
* so cascade-dependent rows are removed before their parents. Table keys not in
|
|
65
|
+
* `policies` are skipped (unset = keep forever).
|
|
66
|
+
*/
|
|
67
|
+
export declare function resolveTargets({ policies, descriptor, order, }: {
|
|
68
|
+
policies: Record<string, TableRetentionPolicy>;
|
|
69
|
+
descriptor: Record<string, {
|
|
70
|
+
table: string;
|
|
71
|
+
column: string;
|
|
72
|
+
anchorType?: 'timestamp' | 'epoch-ms';
|
|
73
|
+
}>;
|
|
74
|
+
order: string[];
|
|
75
|
+
}): PruneTarget[];
|
|
76
|
+
//# sourceMappingURL=retention.d.ts.map
|
|
@@ -0,0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;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,UAAU,EACV,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAC/C,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,WAAW,GAAG,UAAU,CAAA;KAAE,CAAC,CAAC;IACrG,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,GAAG,WAAW,EAAE,CAchB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../src/storage/test-utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAK5D,eAAO,MAAM,WAAW,EAAE,mBAOF,CAAC;AAEzB,eAAO,MAAM,gBAAgB,QAA0K,CAAC;AAExM,wBAAgB,OAAO,
|
|
1
|
+
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../src/storage/test-utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAK5D,eAAO,MAAM,WAAW,EAAE,mBAOF,CAAC;AAEzB,eAAO,MAAM,gBAAgB,QAA0K,CAAC;AAExM,wBAAgB,OAAO,SA2xCtB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/pg",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0-alpha.1",
|
|
4
4
|
"description": "Postgres provider for Mastra - includes both vector and db storage capabilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"tsx": "^4.22.4",
|
|
36
36
|
"typescript": "^6.0.3",
|
|
37
37
|
"vitest": "4.1.8",
|
|
38
|
-
"@internal/lint": "0.0.110",
|
|
39
38
|
"@internal/storage-test-utils": "0.0.106",
|
|
40
|
-
"@mastra/core": "1.
|
|
39
|
+
"@mastra/core": "1.49.0-alpha.5",
|
|
40
|
+
"@internal/lint": "0.0.110",
|
|
41
41
|
"@internal/types-builder": "0.0.85"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|