@jamesaphoenix/tx-core 0.4.3 → 0.4.5

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 (94) hide show
  1. package/dist/db.d.ts.map +1 -1
  2. package/dist/db.js +8 -2
  3. package/dist/db.js.map +1 -1
  4. package/dist/layer.d.ts +3 -3
  5. package/dist/services/auto-sync-service.d.ts +1 -1
  6. package/dist/services/cycle-scan-service.d.ts.map +1 -1
  7. package/dist/services/cycle-scan-service.js +6 -2
  8. package/dist/services/cycle-scan-service.js.map +1 -1
  9. package/dist/services/learning-service.d.ts +1 -1
  10. package/dist/services/orchestrator-service.d.ts +1 -1
  11. package/dist/services/orchestrator-service.d.ts.map +1 -1
  12. package/dist/services/orchestrator-service.js +14 -13
  13. package/dist/services/orchestrator-service.js.map +1 -1
  14. package/dist/services/retriever-service.d.ts +2 -2
  15. package/dist/services/sync-service.d.ts.map +1 -1
  16. package/dist/services/sync-service.js +9 -8
  17. package/dist/services/sync-service.js.map +1 -1
  18. package/dist/services/task-service.d.ts.map +1 -1
  19. package/dist/services/task-service.js +3 -2
  20. package/dist/services/task-service.js.map +1 -1
  21. package/dist/services/worker-process.d.ts +1 -1
  22. package/dist/services/worker-process.d.ts.map +1 -1
  23. package/dist/services/worker-process.js +9 -2
  24. package/dist/services/worker-process.js.map +1 -1
  25. package/dist/worker/run-worker.d.ts +1 -1
  26. package/package.json +1 -1
  27. package/dist/mappers/anchor.d.ts +0 -28
  28. package/dist/mappers/anchor.d.ts.map +0 -1
  29. package/dist/mappers/anchor.js +0 -105
  30. package/dist/mappers/anchor.js.map +0 -1
  31. package/dist/mappers/candidate.d.ts +0 -25
  32. package/dist/mappers/candidate.d.ts.map +0 -1
  33. package/dist/mappers/candidate.js +0 -83
  34. package/dist/mappers/candidate.js.map +0 -1
  35. package/dist/mappers/edge.d.ts +0 -19
  36. package/dist/mappers/edge.d.ts.map +0 -1
  37. package/dist/mappers/edge.js +0 -81
  38. package/dist/mappers/edge.js.map +0 -1
  39. package/dist/repo/anchor-repo.d.ts +0 -52
  40. package/dist/repo/anchor-repo.d.ts.map +0 -1
  41. package/dist/repo/anchor-repo.js +0 -245
  42. package/dist/repo/anchor-repo.js.map +0 -1
  43. package/dist/repo/candidate-repo.d.ts +0 -16
  44. package/dist/repo/candidate-repo.d.ts.map +0 -1
  45. package/dist/repo/candidate-repo.js +0 -164
  46. package/dist/repo/candidate-repo.js.map +0 -1
  47. package/dist/repo/compaction-repo.d.ts +0 -41
  48. package/dist/repo/compaction-repo.d.ts.map +0 -1
  49. package/dist/repo/compaction-repo.js +0 -84
  50. package/dist/repo/compaction-repo.js.map +0 -1
  51. package/dist/repo/edge-repo.d.ts +0 -26
  52. package/dist/repo/edge-repo.d.ts.map +0 -1
  53. package/dist/repo/edge-repo.js +0 -258
  54. package/dist/repo/edge-repo.js.map +0 -1
  55. package/dist/services/anchor-service.d.ts +0 -147
  56. package/dist/services/anchor-service.d.ts.map +0 -1
  57. package/dist/services/anchor-service.js +0 -540
  58. package/dist/services/anchor-service.js.map +0 -1
  59. package/dist/services/anchor-verification.d.ts +0 -102
  60. package/dist/services/anchor-verification.d.ts.map +0 -1
  61. package/dist/services/anchor-verification.js +0 -817
  62. package/dist/services/anchor-verification.js.map +0 -1
  63. package/dist/services/ast-grep-service.d.ts +0 -58
  64. package/dist/services/ast-grep-service.d.ts.map +0 -1
  65. package/dist/services/ast-grep-service.js +0 -427
  66. package/dist/services/ast-grep-service.js.map +0 -1
  67. package/dist/services/candidate-extractor-service.d.ts +0 -56
  68. package/dist/services/candidate-extractor-service.d.ts.map +0 -1
  69. package/dist/services/candidate-extractor-service.js +0 -365
  70. package/dist/services/candidate-extractor-service.js.map +0 -1
  71. package/dist/services/compaction-service.d.ts +0 -105
  72. package/dist/services/compaction-service.d.ts.map +0 -1
  73. package/dist/services/compaction-service.js +0 -369
  74. package/dist/services/compaction-service.js.map +0 -1
  75. package/dist/services/edge-service.d.ts +0 -78
  76. package/dist/services/edge-service.d.ts.map +0 -1
  77. package/dist/services/edge-service.js +0 -158
  78. package/dist/services/edge-service.js.map +0 -1
  79. package/dist/services/feedback-tracker.d.ts +0 -64
  80. package/dist/services/feedback-tracker.d.ts.map +0 -1
  81. package/dist/services/feedback-tracker.js +0 -110
  82. package/dist/services/feedback-tracker.js.map +0 -1
  83. package/dist/services/graph-expansion.d.ts +0 -158
  84. package/dist/services/graph-expansion.d.ts.map +0 -1
  85. package/dist/services/graph-expansion.js +0 -487
  86. package/dist/services/graph-expansion.js.map +0 -1
  87. package/dist/services/promotion-service.d.ts +0 -67
  88. package/dist/services/promotion-service.d.ts.map +0 -1
  89. package/dist/services/promotion-service.js +0 -151
  90. package/dist/services/promotion-service.js.map +0 -1
  91. package/dist/services/swarm-verification.d.ts +0 -104
  92. package/dist/services/swarm-verification.d.ts.map +0 -1
  93. package/dist/services/swarm-verification.js +0 -406
  94. package/dist/services/swarm-verification.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"edge-repo.d.ts","sourceRoot":"","sources":["../../src/repo/edge-repo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAoB,MAAM,cAAc,CAAA;AAGjF,OAAO,KAAK,EACV,IAAI,EAEJ,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,eAAe,EACf,YAAY,EACb,MAAM,yBAAyB,CAAA;;qBAKX,CAAC,KAAK,EAAE,eAAe,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC;uBAC5D,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,EAAE,aAAa,CAAC;2BACrD,CAAC,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,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G,aAAa,CAAC;sBAC5E,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,EAAE,aAAa,CAAC;;AA3BvF,qBAAa,cAAe,SAAQ,mBA6BjC;CAAG;AAEN,eAAO,MAAM,kBAAkB,kDA2U9B,CAAA"}
@@ -1,258 +0,0 @@
1
- import { Context, Effect, Layer } from "effect";
2
- import { SqliteClient } from "../db.js";
3
- import { DatabaseError, EdgeNotFoundError, EntityFetchError } from "../errors.js";
4
- import { rowToEdge } from "../mappers/edge.js";
5
- import { DEFAULT_QUERY_LIMIT } from "../utils/sql.js";
6
- export class EdgeRepository extends Context.Tag("EdgeRepository")() {
7
- }
8
- export const EdgeRepositoryLive = Layer.effect(EdgeRepository, Effect.gen(function* () {
9
- const db = yield* SqliteClient;
10
- return {
11
- create: (input) => Effect.try({
12
- try: () => {
13
- const result = db.prepare(`INSERT INTO learning_edges
14
- (edge_type, source_type, source_id, target_type, target_id, weight, metadata)
15
- VALUES (?, ?, ?, ?, ?, ?, ?)`).run(input.edgeType, input.sourceType, input.sourceId, input.targetType, input.targetId, input.weight ?? 1.0, JSON.stringify(input.metadata ?? {}));
16
- const row = db.prepare("SELECT * FROM learning_edges WHERE id = ?").get(result.lastInsertRowid);
17
- if (!row) {
18
- throw new EntityFetchError({
19
- entity: "edge",
20
- id: result.lastInsertRowid,
21
- operation: "insert"
22
- });
23
- }
24
- return rowToEdge(row);
25
- },
26
- catch: (cause) => new DatabaseError({ cause })
27
- }),
28
- findById: (id) => Effect.try({
29
- try: () => {
30
- const row = db.prepare("SELECT * FROM learning_edges WHERE id = ? AND invalidated_at IS NULL").get(id);
31
- return row ? rowToEdge(row) : null;
32
- },
33
- catch: (cause) => new DatabaseError({ cause })
34
- }),
35
- findBySource: (sourceType, sourceId) => Effect.try({
36
- try: () => {
37
- const rows = db.prepare(`SELECT * FROM learning_edges
38
- WHERE source_type = ? AND source_id = ? AND invalidated_at IS NULL
39
- ORDER BY created_at ASC`).all(sourceType, sourceId);
40
- return rows.map(rowToEdge);
41
- },
42
- catch: (cause) => new DatabaseError({ cause })
43
- }),
44
- findByTarget: (targetType, targetId) => Effect.try({
45
- try: () => {
46
- const rows = db.prepare(`SELECT * FROM learning_edges
47
- WHERE target_type = ? AND target_id = ? AND invalidated_at IS NULL
48
- ORDER BY created_at ASC`).all(targetType, targetId);
49
- return rows.map(rowToEdge);
50
- },
51
- catch: (cause) => new DatabaseError({ cause })
52
- }),
53
- findByMultipleSources: (sourceType, sourceIds) => Effect.try({
54
- try: () => {
55
- // Return empty map for empty input
56
- if (sourceIds.length === 0) {
57
- return new Map();
58
- }
59
- // Build IN clause with placeholders
60
- const placeholders = sourceIds.map(() => "?").join(", ");
61
- const rows = db.prepare(`SELECT * FROM learning_edges
62
- WHERE source_type = ? AND source_id IN (${placeholders}) AND invalidated_at IS NULL
63
- ORDER BY weight DESC, created_at ASC`).all(sourceType, ...sourceIds);
64
- // Group edges by source_id
65
- const result = new Map();
66
- // Initialize all requested sourceIds with empty arrays
67
- for (const sourceId of sourceIds) {
68
- result.set(sourceId, []);
69
- }
70
- // Populate with actual edges
71
- for (const row of rows) {
72
- const edge = rowToEdge(row);
73
- const existing = result.get(row.source_id);
74
- if (existing) {
75
- existing.push(edge);
76
- }
77
- }
78
- return result;
79
- },
80
- catch: (cause) => new DatabaseError({ cause })
81
- }),
82
- findByEdgeType: (edgeType) => Effect.try({
83
- try: () => {
84
- const rows = db.prepare(`SELECT * FROM learning_edges
85
- WHERE edge_type = ? AND invalidated_at IS NULL
86
- ORDER BY weight DESC, created_at ASC`).all(edgeType);
87
- return rows.map(rowToEdge);
88
- },
89
- catch: (cause) => new DatabaseError({ cause })
90
- }),
91
- countByType: () => Effect.try({
92
- try: () => {
93
- const rows = db.prepare(`SELECT edge_type, COUNT(*) as count FROM learning_edges
94
- WHERE invalidated_at IS NULL
95
- GROUP BY edge_type`).all();
96
- const result = new Map();
97
- for (const row of rows) {
98
- result.set(row.edge_type, row.count);
99
- }
100
- return result;
101
- },
102
- catch: (cause) => new DatabaseError({ cause })
103
- }),
104
- findNeighbors: (nodeType, nodeId, options = {}) => Effect.try({
105
- try: () => {
106
- const direction = options.direction ?? "both";
107
- const edgeTypes = options.edgeTypes;
108
- const neighbors = [];
109
- // Build edge type filter clause
110
- const edgeTypeFilter = edgeTypes && edgeTypes.length > 0
111
- ? `AND edge_type IN (${edgeTypes.map(() => "?").join(", ")})`
112
- : "";
113
- const edgeTypeParams = edgeTypes ?? [];
114
- // Outgoing edges (this node is the source)
115
- if (direction === "outgoing" || direction === "both") {
116
- const outgoingRows = db.prepare(`SELECT * FROM learning_edges
117
- WHERE source_type = ? AND source_id = ? AND invalidated_at IS NULL
118
- ${edgeTypeFilter}
119
- ORDER BY weight DESC, created_at ASC`).all(nodeType, nodeId, ...edgeTypeParams);
120
- for (const row of outgoingRows) {
121
- neighbors.push({
122
- nodeType: row.target_type,
123
- nodeId: row.target_id,
124
- edgeType: row.edge_type,
125
- weight: row.weight,
126
- direction: "outgoing"
127
- });
128
- }
129
- }
130
- // Incoming edges (this node is the target)
131
- if (direction === "incoming" || direction === "both") {
132
- const incomingRows = db.prepare(`SELECT * FROM learning_edges
133
- WHERE target_type = ? AND target_id = ? AND invalidated_at IS NULL
134
- ${edgeTypeFilter}
135
- ORDER BY weight DESC, created_at ASC`).all(nodeType, nodeId, ...edgeTypeParams);
136
- for (const row of incomingRows) {
137
- neighbors.push({
138
- nodeType: row.source_type,
139
- nodeId: row.source_id,
140
- edgeType: row.edge_type,
141
- weight: row.weight,
142
- direction: "incoming"
143
- });
144
- }
145
- }
146
- return neighbors;
147
- },
148
- catch: (cause) => new DatabaseError({ cause })
149
- }),
150
- findPath: (fromType, fromId, toType, toId, maxDepth = 5) => Effect.try({
151
- try: () => {
152
- // Recursive CTE performs BFS in a single query (eliminates N+1 pattern)
153
- // Uses UNION ALL with delimiter-based visited tracking to prevent cycles
154
- // Similar pattern to hasPath CTE in dep-repo.ts
155
- const result = db.prepare(`
156
- WITH RECURSIVE bfs(node_type, node_id, depth, edge_path, visited) AS (
157
- -- Base case: starting node at depth 0
158
- SELECT ?, ?, 0, '',
159
- '|' || ? || ':' || ? || '|'
160
-
161
- UNION ALL
162
-
163
- -- Recursive case: follow outgoing edges from current frontier
164
- SELECT
165
- e.target_type,
166
- e.target_id,
167
- b.depth + 1,
168
- CASE WHEN b.edge_path = ''
169
- THEN CAST(e.id AS TEXT)
170
- ELSE b.edge_path || ',' || CAST(e.id AS TEXT)
171
- END,
172
- b.visited || e.target_type || ':' || e.target_id || '|'
173
- FROM learning_edges e
174
- JOIN bfs b ON e.source_type = b.node_type
175
- AND e.source_id = b.node_id
176
- WHERE e.invalidated_at IS NULL
177
- AND b.depth < ?
178
- AND instr(b.visited, '|' || e.target_type || ':' || e.target_id || '|') = 0
179
- )
180
- SELECT edge_path FROM bfs
181
- WHERE node_type = ? AND node_id = ?
182
- AND edge_path != ''
183
- ORDER BY depth ASC
184
- LIMIT 1
185
- `).get(fromType, fromId, // CTE base: starting node
186
- fromType, fromId, // CTE base: initial visited set
187
- maxDepth, // depth limit
188
- toType, toId // final filter: target node
189
- );
190
- if (!result)
191
- return null;
192
- // Fetch full edge objects in a single query
193
- const edgeIds = result.edge_path.split(',').map(Number);
194
- const placeholders = edgeIds.map(() => '?').join(', ');
195
- const edgeRows = db.prepare(`SELECT * FROM learning_edges WHERE id IN (${placeholders})`).all(...edgeIds);
196
- // Maintain path order from CTE traversal
197
- const edgeMap = new Map(edgeRows.map(row => [row.id, rowToEdge(row)]));
198
- return edgeIds.map(id => edgeMap.get(id)).filter((e) => e != null);
199
- },
200
- catch: (cause) => new DatabaseError({ cause })
201
- }),
202
- update: (id, input) => Effect.try({
203
- try: () => {
204
- const updates = [];
205
- const values = [];
206
- if (input.weight !== undefined) {
207
- updates.push("weight = ?");
208
- values.push(input.weight);
209
- }
210
- if (input.metadata !== undefined) {
211
- updates.push("metadata = ?");
212
- values.push(JSON.stringify(input.metadata));
213
- }
214
- if (updates.length === 0) {
215
- const row = db.prepare("SELECT * FROM learning_edges WHERE id = ? AND invalidated_at IS NULL").get(id);
216
- return row ? rowToEdge(row) : null;
217
- }
218
- values.push(id);
219
- const result = db.prepare(`UPDATE learning_edges SET ${updates.join(", ")} WHERE id = ? AND invalidated_at IS NULL`).run(...values);
220
- if (result.changes === 0) {
221
- return null;
222
- }
223
- const row = db.prepare("SELECT * FROM learning_edges WHERE id = ?").get(id);
224
- if (!row) {
225
- throw new EntityFetchError({
226
- entity: "edge",
227
- id,
228
- operation: "update"
229
- });
230
- }
231
- return rowToEdge(row);
232
- },
233
- catch: (cause) => new DatabaseError({ cause })
234
- }),
235
- invalidate: (id) => Effect.try({
236
- try: () => {
237
- const result = db.prepare("UPDATE learning_edges SET invalidated_at = datetime('now') WHERE id = ? AND invalidated_at IS NULL").run(id);
238
- if (result.changes === 0) {
239
- throw new EdgeNotFoundError({ id });
240
- }
241
- return true;
242
- },
243
- catch: (cause) => {
244
- if (cause instanceof EdgeNotFoundError)
245
- throw cause;
246
- throw new DatabaseError({ cause });
247
- }
248
- }),
249
- findAll: (limit) => Effect.try({
250
- try: () => {
251
- const rows = db.prepare("SELECT * FROM learning_edges WHERE invalidated_at IS NULL ORDER BY created_at ASC LIMIT ?").all(limit ?? DEFAULT_QUERY_LIMIT);
252
- return rows.map(rowToEdge);
253
- },
254
- catch: (cause) => new DatabaseError({ cause })
255
- })
256
- };
257
- }));
258
- //# sourceMappingURL=edge-repo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"edge-repo.js","sourceRoot":"","sources":["../../src/repo/edge-repo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACjF,OAAO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AG,EAAE,GAAG,EAAE;gBACR,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,CACrB,2FAA2F,CAC5F,CAAC,GAAG,CAAC,KAAK,IAAI,mBAAmB,CAAc,CAAA;gBAChD,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;YAC5B,CAAC;YACD,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,aAAa,CAAC,EAAE,KAAK,EAAE,CAAC;SAC/C,CAAC;KACL,CAAA;AACH,CAAC,CAAC,CACH,CAAA"}
@@ -1,147 +0,0 @@
1
- import { Context, Effect, Layer } from "effect";
2
- import { AnchorRepository } from "../repo/anchor-repo.js";
3
- import { LearningRepository } from "../repo/learning-repo.js";
4
- import { AnchorNotFoundError, ValidationError, DatabaseError, LearningNotFoundError } from "../errors.js";
5
- import type { Anchor, AnchorWithFreshness, AnchorStatus, AnchorType, InvalidationLog, InvalidationSource } from "@jamesaphoenix/tx-types";
6
- /** Verification result for an anchor */
7
- export interface AnchorVerificationResult {
8
- readonly anchorId: number;
9
- readonly previousStatus: AnchorStatus;
10
- readonly newStatus: AnchorStatus;
11
- readonly verified: boolean;
12
- readonly reason?: string;
13
- }
14
- /** Result of batch verification */
15
- export interface BatchVerificationResult {
16
- readonly total: number;
17
- readonly verified: number;
18
- readonly drifted: number;
19
- readonly invalid: number;
20
- }
21
- /** Graph status summary */
22
- export interface GraphStatusResult {
23
- readonly total: number;
24
- readonly valid: number;
25
- readonly drifted: number;
26
- readonly invalid: number;
27
- readonly pinned: number;
28
- readonly recentInvalidations: readonly InvalidationLog[];
29
- }
30
- /** Prune result */
31
- export interface PruneResult {
32
- readonly deleted: number;
33
- }
34
- /** Anchor input with type-specific validation */
35
- export interface TypedAnchorInput {
36
- readonly learningId: number;
37
- readonly anchorType: AnchorType;
38
- readonly filePath: string;
39
- /** Value depends on type: glob pattern, content hash, symbol FQName, or line range string */
40
- readonly value: string;
41
- /** Symbol fully-qualified name (for symbol anchors) */
42
- readonly symbolFqname?: string;
43
- /** Start line (for line_range anchors) */
44
- readonly lineStart?: number;
45
- /** End line (for line_range anchors) */
46
- readonly lineEnd?: number;
47
- /** Content hash for verification */
48
- readonly contentHash?: string;
49
- /** Content preview for self-healing comparison (max ~500 chars) */
50
- readonly contentPreview?: string;
51
- }
52
- declare const AnchorService_base: Context.TagClass<AnchorService, "AnchorService", {
53
- /**
54
- * Create an anchor with type-specific validation.
55
- * Supports: glob, hash, symbol, line_range
56
- */
57
- readonly createAnchor: (input: TypedAnchorInput) => Effect.Effect<Anchor, ValidationError | LearningNotFoundError | DatabaseError>;
58
- /**
59
- * Verify an anchor's validity.
60
- * Checks if the file/content still matches what the anchor references.
61
- */
62
- readonly verifyAnchor: (anchorId: number) => Effect.Effect<AnchorVerificationResult, AnchorNotFoundError | DatabaseError>;
63
- /**
64
- * Update an anchor's status (valid, drifted, invalid).
65
- */
66
- readonly updateAnchorStatus: (anchorId: number, status: AnchorStatus, reason?: string, detectedBy?: InvalidationSource) => Effect.Effect<Anchor, AnchorNotFoundError | ValidationError | DatabaseError>;
67
- /**
68
- * Log a status change for an anchor.
69
- * Creates an entry in the invalidation_log table.
70
- */
71
- readonly logStatusChange: (anchorId: number, oldStatus: AnchorStatus, newStatus: AnchorStatus, reason: string, detectedBy?: InvalidationSource, oldHash?: string | null, newHash?: string | null, similarity?: number | null) => Effect.Effect<InvalidationLog, AnchorNotFoundError | DatabaseError>;
72
- /**
73
- * Find all anchors for a given file path.
74
- */
75
- readonly findAnchorsForFile: (filePath: string) => Effect.Effect<readonly Anchor[], DatabaseError>;
76
- /**
77
- * Find all anchors for a learning.
78
- */
79
- readonly findAnchorsForLearning: (learningId: number) => Effect.Effect<readonly Anchor[], DatabaseError>;
80
- /**
81
- * Get an anchor by ID.
82
- */
83
- readonly get: (id: number) => Effect.Effect<Anchor, AnchorNotFoundError | DatabaseError>;
84
- /**
85
- * Get an anchor with lazy verification.
86
- * If anchor is stale (verified_at > now - TTL), runs verification first.
87
- * Returns anchor with freshness information.
88
- */
89
- readonly getWithVerification: (id: number, options?: {
90
- baseDir?: string;
91
- }) => Effect.Effect<AnchorWithFreshness, AnchorNotFoundError | DatabaseError>;
92
- /**
93
- * Soft delete an anchor (set status='invalid' and log the change).
94
- * Use hardDelete for actual removal.
95
- */
96
- readonly remove: (id: number, reason?: string) => Effect.Effect<Anchor, AnchorNotFoundError | DatabaseError>;
97
- /**
98
- * Hard delete an anchor (actual removal from database).
99
- * Used by prune operations. Prefer soft delete via remove().
100
- */
101
- readonly hardDelete: (id: number) => Effect.Effect<void, AnchorNotFoundError | DatabaseError>;
102
- /**
103
- * Find all drifted anchors.
104
- */
105
- readonly findDrifted: () => Effect.Effect<readonly Anchor[], DatabaseError>;
106
- /**
107
- * Find all invalid anchors.
108
- */
109
- readonly findInvalid: () => Effect.Effect<readonly Anchor[], DatabaseError>;
110
- /**
111
- * Verify all anchors for a file (batch operation).
112
- */
113
- readonly verifyAnchorsForFile: (filePath: string) => Effect.Effect<BatchVerificationResult, DatabaseError>;
114
- /**
115
- * Pin an anchor (prevents auto-invalidation).
116
- */
117
- readonly pin: (anchorId: number) => Effect.Effect<Anchor, AnchorNotFoundError | DatabaseError>;
118
- /**
119
- * Unpin an anchor.
120
- */
121
- readonly unpin: (anchorId: number) => Effect.Effect<Anchor, AnchorNotFoundError | DatabaseError>;
122
- /**
123
- * Manually invalidate an anchor with a reason.
124
- */
125
- readonly invalidate: (anchorId: number, reason: string, detectedBy?: InvalidationSource) => Effect.Effect<Anchor, AnchorNotFoundError | DatabaseError>;
126
- /**
127
- * Restore a soft-deleted (invalid) anchor to valid status.
128
- */
129
- readonly restore: (anchorId: number) => Effect.Effect<Anchor, AnchorNotFoundError | DatabaseError>;
130
- /**
131
- * Hard delete old invalid anchors.
132
- */
133
- readonly prune: (olderThanDays: number) => Effect.Effect<PruneResult, DatabaseError>;
134
- /**
135
- * Get graph status summary.
136
- */
137
- readonly getStatus: () => Effect.Effect<GraphStatusResult, DatabaseError>;
138
- /**
139
- * Verify all anchors (batch operation).
140
- */
141
- readonly verifyAll: () => Effect.Effect<BatchVerificationResult, DatabaseError>;
142
- }>;
143
- export declare class AnchorService extends AnchorService_base {
144
- }
145
- export declare const AnchorServiceLive: Layer.Layer<AnchorService, never, LearningRepository | AnchorRepository>;
146
- export {};
147
- //# sourceMappingURL=anchor-service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"anchor-service.d.ts","sourceRoot":"","sources":["../../src/services/anchor-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEzG,OAAO,KAAK,EAAE,MAAM,EAAE,mBAAmB,EAAE,YAAY,EAAqB,UAAU,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE5J,wCAAwC;AACxC,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,cAAc,EAAE,YAAY,CAAA;IACrC,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAA;IAChC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,mCAAmC;AACnC,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED,2BAA2B;AAC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