@jamesaphoenix/tx-types 0.4.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.
Files changed (49) hide show
  1. package/dist/anchor.d.ts +153 -0
  2. package/dist/anchor.d.ts.map +1 -0
  3. package/dist/anchor.js +27 -0
  4. package/dist/anchor.js.map +1 -0
  5. package/dist/attempt.d.ts +53 -0
  6. package/dist/attempt.d.ts.map +1 -0
  7. package/dist/attempt.js +11 -0
  8. package/dist/attempt.js.map +1 -0
  9. package/dist/candidate.d.ts +203 -0
  10. package/dist/candidate.d.ts.map +1 -0
  11. package/dist/candidate.js +30 -0
  12. package/dist/candidate.js.map +1 -0
  13. package/dist/deduplication.d.ts +116 -0
  14. package/dist/deduplication.d.ts.map +1 -0
  15. package/dist/deduplication.js +9 -0
  16. package/dist/deduplication.js.map +1 -0
  17. package/dist/edge.d.ts +90 -0
  18. package/dist/edge.d.ts.map +1 -0
  19. package/dist/edge.js +32 -0
  20. package/dist/edge.js.map +1 -0
  21. package/dist/file-learning.d.ts +41 -0
  22. package/dist/file-learning.d.ts.map +1 -0
  23. package/dist/file-learning.js +8 -0
  24. package/dist/file-learning.js.map +1 -0
  25. package/dist/index.d.ts +29 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +36 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/learning.d.ts +204 -0
  30. package/dist/learning.d.ts.map +1 -0
  31. package/dist/learning.js +17 -0
  32. package/dist/learning.js.map +1 -0
  33. package/dist/run.d.ts +77 -0
  34. package/dist/run.d.ts.map +1 -0
  35. package/dist/run.js +17 -0
  36. package/dist/run.js.map +1 -0
  37. package/dist/symbol.d.ts +72 -0
  38. package/dist/symbol.d.ts.map +1 -0
  39. package/dist/symbol.js +29 -0
  40. package/dist/symbol.js.map +1 -0
  41. package/dist/task.d.ts +138 -0
  42. package/dist/task.d.ts.map +1 -0
  43. package/dist/task.js +35 -0
  44. package/dist/task.js.map +1 -0
  45. package/dist/tracked-project.d.ts +65 -0
  46. package/dist/tracked-project.d.ts.map +1 -0
  47. package/dist/tracked-project.js +13 -0
  48. package/dist/tracked-project.js.map +1 -0
  49. package/package.json +59 -0
@@ -0,0 +1,153 @@
1
+ /**
2
+ * Anchor types for tx
3
+ *
4
+ * Type definitions for file/code associations (anchors) that link learnings
5
+ * to specific file locations, symbols, or code regions.
6
+ * Zero runtime dependencies - pure TypeScript types only.
7
+ */
8
+ /**
9
+ * Branded type for anchor IDs.
10
+ */
11
+ export type AnchorId = number & {
12
+ readonly _brand: unique symbol;
13
+ };
14
+ /**
15
+ * Anchor type - how the learning is associated with code.
16
+ * - glob: Pattern match (e.g., "src/repo/*.ts")
17
+ * - hash: Content hash of specific lines
18
+ * - symbol: Named code element (function, class, etc.)
19
+ * - line_range: Specific line numbers
20
+ */
21
+ export declare const ANCHOR_TYPES: readonly ["glob", "hash", "symbol", "line_range"];
22
+ export type AnchorType = (typeof ANCHOR_TYPES)[number];
23
+ /**
24
+ * Anchor status - validity of the file/code association.
25
+ * - valid: Anchor still points to correct code
26
+ * - drifted: Code has changed but anchor still exists
27
+ * - invalid: Anchor no longer valid (file deleted, symbol removed)
28
+ */
29
+ export declare const ANCHOR_STATUSES: readonly ["valid", "drifted", "invalid"];
30
+ export type AnchorStatus = (typeof ANCHOR_STATUSES)[number];
31
+ /**
32
+ * Anchor entity - links a learning to a file/code location.
33
+ */
34
+ export interface Anchor {
35
+ readonly id: AnchorId;
36
+ readonly learningId: number;
37
+ readonly anchorType: AnchorType;
38
+ readonly anchorValue: string;
39
+ readonly filePath: string;
40
+ readonly symbolFqname: string | null;
41
+ readonly lineStart: number | null;
42
+ readonly lineEnd: number | null;
43
+ readonly contentHash: string | null;
44
+ /** Original content preview for self-healing Jaccard similarity comparison */
45
+ readonly contentPreview: string | null;
46
+ readonly status: AnchorStatus;
47
+ readonly pinned: boolean;
48
+ readonly verifiedAt: Date | null;
49
+ readonly createdAt: Date;
50
+ }
51
+ /**
52
+ * Input for creating a new anchor.
53
+ */
54
+ export interface CreateAnchorInput {
55
+ readonly learningId: number;
56
+ readonly anchorType: AnchorType;
57
+ readonly anchorValue: string;
58
+ readonly filePath: string;
59
+ readonly symbolFqname?: string | null;
60
+ readonly lineStart?: number | null;
61
+ readonly lineEnd?: number | null;
62
+ readonly contentHash?: string | null;
63
+ /** Original content preview for self-healing comparison (max ~500 chars) */
64
+ readonly contentPreview?: string | null;
65
+ }
66
+ /**
67
+ * Input for updating an anchor.
68
+ */
69
+ export interface UpdateAnchorInput {
70
+ readonly anchorValue?: string;
71
+ readonly filePath?: string;
72
+ readonly symbolFqname?: string | null;
73
+ readonly lineStart?: number | null;
74
+ readonly lineEnd?: number | null;
75
+ readonly contentHash?: string | null;
76
+ /** Updated content preview for self-healing comparison */
77
+ readonly contentPreview?: string | null;
78
+ readonly status?: AnchorStatus;
79
+ readonly verifiedAt?: Date | null;
80
+ }
81
+ /**
82
+ * Database row type for anchors (snake_case from SQLite).
83
+ */
84
+ export interface AnchorRow {
85
+ id: number;
86
+ learning_id: number;
87
+ anchor_type: string;
88
+ anchor_value: string;
89
+ file_path: string;
90
+ symbol_fqname: string | null;
91
+ line_start: number | null;
92
+ line_end: number | null;
93
+ content_hash: string | null;
94
+ content_preview: string | null;
95
+ status: string;
96
+ pinned: number;
97
+ verified_at: string | null;
98
+ created_at: string;
99
+ }
100
+ /**
101
+ * Detection source for invalidation.
102
+ */
103
+ export declare const INVALIDATION_SOURCES: readonly ["periodic", "lazy", "manual", "agent", "git_hook"];
104
+ export type InvalidationSource = (typeof INVALIDATION_SOURCES)[number];
105
+ /**
106
+ * Invalidation log entry - tracks anchor status changes.
107
+ */
108
+ export interface InvalidationLog {
109
+ readonly id: number;
110
+ readonly anchorId: number;
111
+ readonly oldStatus: AnchorStatus;
112
+ readonly newStatus: AnchorStatus;
113
+ readonly reason: string;
114
+ readonly detectedBy: InvalidationSource;
115
+ readonly oldContentHash: string | null;
116
+ readonly newContentHash: string | null;
117
+ readonly similarityScore: number | null;
118
+ readonly invalidatedAt: Date;
119
+ }
120
+ /**
121
+ * Database row type for invalidation log (snake_case from SQLite).
122
+ */
123
+ export interface InvalidationLogRow {
124
+ id: number;
125
+ anchor_id: number;
126
+ old_status: string;
127
+ new_status: string;
128
+ reason: string;
129
+ detected_by: string;
130
+ old_content_hash: string | null;
131
+ new_content_hash: string | null;
132
+ similarity_score: number | null;
133
+ invalidated_at: string;
134
+ }
135
+ /**
136
+ * Anchor with freshness information for lazy verification.
137
+ * Returned by getWithVerification - includes whether anchor was fresh or verified.
138
+ */
139
+ export interface AnchorWithFreshness {
140
+ readonly anchor: Anchor;
141
+ /** True if anchor was still within TTL, false if verification was needed */
142
+ readonly isFresh: boolean;
143
+ /** True if verification was performed (because anchor was stale) */
144
+ readonly wasVerified: boolean;
145
+ /** Verification result if verification was performed */
146
+ readonly verificationResult?: {
147
+ readonly previousStatus: AnchorStatus;
148
+ readonly newStatus: AnchorStatus;
149
+ readonly action: "unchanged" | "self_healed" | "drifted" | "invalidated";
150
+ readonly reason?: string;
151
+ };
152
+ }
153
+ //# sourceMappingURL=anchor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anchor.d.ts","sourceRoot":"","sources":["../src/anchor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,MAAM,CAAA;CAAE,CAAC;AAEnE;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,mDAAoD,CAAC;AAC9E,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,0CAA2C,CAAC;AACxE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,MAAM;IAC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AAY,CAAC;QACtC,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;QACjC,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,aAAa,GAAG,SAAS,GAAG,aAAa,CAAC;QACzE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;CACH"}
package/dist/anchor.js ADDED
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Anchor types for tx
3
+ *
4
+ * Type definitions for file/code associations (anchors) that link learnings
5
+ * to specific file locations, symbols, or code regions.
6
+ * Zero runtime dependencies - pure TypeScript types only.
7
+ */
8
+ /**
9
+ * Anchor type - how the learning is associated with code.
10
+ * - glob: Pattern match (e.g., "src/repo/*.ts")
11
+ * - hash: Content hash of specific lines
12
+ * - symbol: Named code element (function, class, etc.)
13
+ * - line_range: Specific line numbers
14
+ */
15
+ export const ANCHOR_TYPES = ["glob", "hash", "symbol", "line_range"];
16
+ /**
17
+ * Anchor status - validity of the file/code association.
18
+ * - valid: Anchor still points to correct code
19
+ * - drifted: Code has changed but anchor still exists
20
+ * - invalid: Anchor no longer valid (file deleted, symbol removed)
21
+ */
22
+ export const ANCHOR_STATUSES = ["valid", "drifted", "invalid"];
23
+ /**
24
+ * Detection source for invalidation.
25
+ */
26
+ export const INVALIDATION_SOURCES = ["periodic", "lazy", "manual", "agent", "git_hook"];
27
+ //# sourceMappingURL=anchor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anchor.js","sourceRoot":"","sources":["../src/anchor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,CAAU,CAAC;AAG9E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,CAAU,CAAC;AA4ExE;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAU,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Attempt types for tx
3
+ *
4
+ * Type definitions for tracking task approach outcomes.
5
+ * Zero runtime dependencies - pure TypeScript types only.
6
+ */
7
+ import type { TaskId } from "./task.js";
8
+ /**
9
+ * Valid attempt outcomes.
10
+ */
11
+ export declare const ATTEMPT_OUTCOMES: readonly ["failed", "succeeded"];
12
+ /**
13
+ * Attempt outcome - whether the approach failed or succeeded.
14
+ */
15
+ export type AttemptOutcome = (typeof ATTEMPT_OUTCOMES)[number];
16
+ /**
17
+ * Branded type for attempt IDs.
18
+ */
19
+ export type AttemptId = number & {
20
+ readonly _brand: unique symbol;
21
+ };
22
+ /**
23
+ * Attempt entity - records a specific approach tried for a task.
24
+ */
25
+ export interface Attempt {
26
+ readonly id: AttemptId;
27
+ readonly taskId: TaskId;
28
+ readonly approach: string;
29
+ readonly outcome: AttemptOutcome;
30
+ readonly reason: string | null;
31
+ readonly createdAt: Date;
32
+ }
33
+ /**
34
+ * Input for creating a new attempt.
35
+ */
36
+ export interface CreateAttemptInput {
37
+ readonly taskId: string;
38
+ readonly approach: string;
39
+ readonly outcome: AttemptOutcome;
40
+ readonly reason?: string | null;
41
+ }
42
+ /**
43
+ * Database row type for attempts (snake_case from SQLite).
44
+ */
45
+ export interface AttemptRow {
46
+ id: number;
47
+ task_id: string;
48
+ approach: string;
49
+ outcome: string;
50
+ reason: string | null;
51
+ created_at: string;
52
+ }
53
+ //# sourceMappingURL=attempt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attempt.d.ts","sourceRoot":"","sources":["../src/attempt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,gBAAgB,kCAAmC,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,MAAM,CAAA;CAAE,CAAC;AAEpE;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,EAAE,EAAE,SAAS,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Attempt types for tx
3
+ *
4
+ * Type definitions for tracking task approach outcomes.
5
+ * Zero runtime dependencies - pure TypeScript types only.
6
+ */
7
+ /**
8
+ * Valid attempt outcomes.
9
+ */
10
+ export const ATTEMPT_OUTCOMES = ["failed", "succeeded"];
11
+ //# sourceMappingURL=attempt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attempt.js","sourceRoot":"","sources":["../src/attempt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,WAAW,CAAU,CAAC"}
@@ -0,0 +1,203 @@
1
+ /**
2
+ * @tx/types/candidate - Learning candidate types for transcript extraction
3
+ *
4
+ * Learning candidates are potential learnings extracted from Claude Code
5
+ * transcripts that await promotion to the learnings table.
6
+ *
7
+ * @see PRD-015 for the JSONL daemon and knowledge promotion pipeline
8
+ */
9
+ /**
10
+ * Confidence level for extracted learning candidates.
11
+ *
12
+ * - high: Tested in session with clear outcome - auto-promotable
13
+ * - medium: Reasonable but unverified - needs review
14
+ * - low: Speculative or edge case - needs review
15
+ */
16
+ export type CandidateConfidence = "high" | "medium" | "low";
17
+ /**
18
+ * All valid confidence levels.
19
+ */
20
+ export declare const CANDIDATE_CONFIDENCES: readonly ["high", "medium", "low"];
21
+ /**
22
+ * Category of the extracted learning.
23
+ * Helps organize and filter learnings by domain.
24
+ */
25
+ export type CandidateCategory = "architecture" | "testing" | "performance" | "security" | "debugging" | "tooling" | "patterns" | "other";
26
+ /**
27
+ * All valid candidate categories.
28
+ */
29
+ export declare const CANDIDATE_CATEGORIES: readonly ["architecture", "testing", "performance", "security", "debugging", "tooling", "patterns", "other"];
30
+ /**
31
+ * Status of a learning candidate in the promotion pipeline.
32
+ *
33
+ * - pending: Awaiting review or auto-promotion
34
+ * - promoted: Successfully promoted to learnings table
35
+ * - rejected: Manually rejected by reviewer
36
+ * - merged: Merged with existing similar learning
37
+ */
38
+ export type CandidateStatus = "pending" | "promoted" | "rejected" | "merged";
39
+ /**
40
+ * All valid candidate statuses.
41
+ */
42
+ export declare const CANDIDATE_STATUSES: readonly ["pending", "promoted", "rejected", "merged"];
43
+ /**
44
+ * A chunk of transcript content to be analyzed for learning extraction.
45
+ * Used as input to the CandidateExtractor.
46
+ */
47
+ export interface TranscriptChunk {
48
+ /** The transcript text content to analyze */
49
+ readonly content: string;
50
+ /** Source file path (e.g., ~/.claude/projects/foo/session.jsonl) */
51
+ readonly sourceFile: string;
52
+ /** Optional run ID for provenance tracking */
53
+ readonly sourceRunId?: string | null;
54
+ /** Optional task ID for provenance tracking */
55
+ readonly sourceTaskId?: string | null;
56
+ /** Byte offset in source file (for incremental processing) */
57
+ readonly byteOffset?: number;
58
+ /** Line number range in source file */
59
+ readonly lineRange?: {
60
+ start: number;
61
+ end: number;
62
+ };
63
+ }
64
+ /**
65
+ * A learning candidate extracted from a transcript by the LLM.
66
+ * This is the raw extraction output before database storage.
67
+ */
68
+ export interface ExtractedCandidate {
69
+ /** The learning text (1-3 sentences, actionable) */
70
+ readonly content: string;
71
+ /** Confidence level assigned by the LLM */
72
+ readonly confidence: CandidateConfidence;
73
+ /** Category of the learning */
74
+ readonly category: CandidateCategory;
75
+ }
76
+ /**
77
+ * Unique identifier for a stored learning candidate.
78
+ */
79
+ export type CandidateId = number;
80
+ /**
81
+ * A learning candidate stored in the database.
82
+ * Extends ExtractedCandidate with storage metadata.
83
+ */
84
+ export interface LearningCandidate {
85
+ /** Unique database ID */
86
+ readonly id: CandidateId;
87
+ /** The learning text (1-3 sentences, actionable) */
88
+ readonly content: string;
89
+ /** Confidence level assigned by the LLM */
90
+ readonly confidence: CandidateConfidence;
91
+ /** Category of the learning */
92
+ readonly category: CandidateCategory | null;
93
+ /** Source JSONL file path */
94
+ readonly sourceFile: string;
95
+ /** Source run ID for provenance */
96
+ readonly sourceRunId: string | null;
97
+ /** Source task ID for provenance */
98
+ readonly sourceTaskId: string | null;
99
+ /** When the candidate was extracted */
100
+ readonly extractedAt: Date;
101
+ /** Current status in promotion pipeline */
102
+ readonly status: CandidateStatus;
103
+ /** When the candidate was reviewed */
104
+ readonly reviewedAt: Date | null;
105
+ /** Who reviewed ('auto' or user identifier) */
106
+ readonly reviewedBy: string | null;
107
+ /** ID of promoted learning (if promoted or merged) */
108
+ readonly promotedLearningId: number | null;
109
+ /** Reason for rejection (if rejected) */
110
+ readonly rejectionReason: string | null;
111
+ }
112
+ /**
113
+ * Input for creating a new learning candidate.
114
+ */
115
+ export interface CreateCandidateInput {
116
+ /** The learning text */
117
+ readonly content: string;
118
+ /** Confidence level */
119
+ readonly confidence: CandidateConfidence;
120
+ /** Category of the learning */
121
+ readonly category?: CandidateCategory | null;
122
+ /** Source file path */
123
+ readonly sourceFile: string;
124
+ /** Source run ID */
125
+ readonly sourceRunId?: string | null;
126
+ /** Source task ID */
127
+ readonly sourceTaskId?: string | null;
128
+ }
129
+ /**
130
+ * Input for updating a learning candidate.
131
+ */
132
+ export interface UpdateCandidateInput {
133
+ /** New status */
134
+ readonly status?: CandidateStatus;
135
+ /** Review timestamp */
136
+ readonly reviewedAt?: Date;
137
+ /** Reviewer identifier */
138
+ readonly reviewedBy?: string;
139
+ /** Promoted learning ID */
140
+ readonly promotedLearningId?: number;
141
+ /** Rejection reason */
142
+ readonly rejectionReason?: string;
143
+ }
144
+ /**
145
+ * Filter options for querying learning candidates.
146
+ */
147
+ export interface CandidateFilter {
148
+ /** Filter by status */
149
+ readonly status?: CandidateStatus | CandidateStatus[];
150
+ /** Filter by confidence */
151
+ readonly confidence?: CandidateConfidence | CandidateConfidence[];
152
+ /** Filter by category */
153
+ readonly category?: CandidateCategory | CandidateCategory[];
154
+ /** Filter by source file */
155
+ readonly sourceFile?: string;
156
+ /** Filter by source run ID */
157
+ readonly sourceRunId?: string;
158
+ /** Filter by source task ID */
159
+ readonly sourceTaskId?: string;
160
+ /** Maximum results */
161
+ readonly limit?: number;
162
+ /** Offset for pagination */
163
+ readonly offset?: number;
164
+ }
165
+ /**
166
+ * Result of candidate extraction from a transcript chunk.
167
+ */
168
+ export interface ExtractionResult {
169
+ /** Extracted candidates */
170
+ readonly candidates: readonly ExtractedCandidate[];
171
+ /** Source chunk that was processed */
172
+ readonly sourceChunk: TranscriptChunk;
173
+ /** Whether extraction was performed (false if using noop) */
174
+ readonly wasExtracted: boolean;
175
+ /** Processing metadata */
176
+ readonly metadata?: {
177
+ /** Model used for extraction */
178
+ readonly model?: string;
179
+ /** Tokens used (input + output) */
180
+ readonly tokensUsed?: number;
181
+ /** Processing duration in milliseconds */
182
+ readonly durationMs?: number;
183
+ };
184
+ }
185
+ /**
186
+ * Database row representation for learning_candidates table.
187
+ */
188
+ export interface CandidateRow {
189
+ readonly id: number;
190
+ readonly content: string;
191
+ readonly confidence: string;
192
+ readonly category: string | null;
193
+ readonly source_file: string;
194
+ readonly source_run_id: string | null;
195
+ readonly source_task_id: string | null;
196
+ readonly extracted_at: string;
197
+ readonly status: string;
198
+ readonly reviewed_at: string | null;
199
+ readonly reviewed_by: string | null;
200
+ readonly promoted_learning_id: number | null;
201
+ readonly rejection_reason: string | null;
202
+ }
203
+ //# sourceMappingURL=candidate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"candidate.d.ts","sourceRoot":"","sources":["../src/candidate.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAA;AAE3D;;GAEG;AACH,eAAO,MAAM,qBAAqB,oCAAqC,CAAA;AAEvE;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GACzB,cAAc,GACd,SAAS,GACT,aAAa,GACb,UAAU,GACV,WAAW,GACX,SAAS,GACT,UAAU,GACV,OAAO,CAAA;AAEX;;GAEG;AACH,eAAO,MAAM,oBAAoB,8GASvB,CAAA;AAEV;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAA;AAE5E;;GAEG;AACH,eAAO,MAAM,kBAAkB,wDAAyD,CAAA;AAExF;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,6CAA6C;IAC7C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,oEAAoE;IACpE,QAAQ,CAAC,UAAU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,MAAM,GAAG,IAAI,CAAA;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IACrC,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IACtC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5C,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;CACzC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @tx/types/candidate - Learning candidate types for transcript extraction
3
+ *
4
+ * Learning candidates are potential learnings extracted from Claude Code
5
+ * transcripts that await promotion to the learnings table.
6
+ *
7
+ * @see PRD-015 for the JSONL daemon and knowledge promotion pipeline
8
+ */
9
+ /**
10
+ * All valid confidence levels.
11
+ */
12
+ export const CANDIDATE_CONFIDENCES = ["high", "medium", "low"];
13
+ /**
14
+ * All valid candidate categories.
15
+ */
16
+ export const CANDIDATE_CATEGORIES = [
17
+ "architecture",
18
+ "testing",
19
+ "performance",
20
+ "security",
21
+ "debugging",
22
+ "tooling",
23
+ "patterns",
24
+ "other"
25
+ ];
26
+ /**
27
+ * All valid candidate statuses.
28
+ */
29
+ export const CANDIDATE_STATUSES = ["pending", "promoted", "rejected", "merged"];
30
+ //# sourceMappingURL=candidate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"candidate.js","sourceRoot":"","sources":["../src/candidate.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAWH;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAU,CAAA;AAgBvE;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,cAAc;IACd,SAAS;IACT,aAAa;IACb,UAAU;IACV,WAAW;IACX,SAAS;IACT,UAAU;IACV,OAAO;CACC,CAAA;AAYV;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAU,CAAA"}
@@ -0,0 +1,116 @@
1
+ /**
2
+ * Deduplication types for tx
3
+ *
4
+ * Type definitions for JSONL line deduplication and file progress tracking.
5
+ * Used by the telemetry daemon to avoid re-processing already-seen content.
6
+ * Zero runtime dependencies - pure TypeScript types only.
7
+ */
8
+ /**
9
+ * Processed hash ID (auto-incremented integer).
10
+ */
11
+ export type ProcessedHashId = number;
12
+ /**
13
+ * A processed JSONL line hash record.
14
+ * Tracks unique content by SHA256 hash for deduplication.
15
+ */
16
+ export interface ProcessedHash {
17
+ readonly id: ProcessedHashId;
18
+ readonly contentHash: string;
19
+ readonly sourceFile: string;
20
+ readonly sourceLine: number;
21
+ readonly processedAt: Date;
22
+ }
23
+ /**
24
+ * Input for recording a processed hash.
25
+ */
26
+ export interface CreateProcessedHashInput {
27
+ readonly contentHash: string;
28
+ readonly sourceFile: string;
29
+ readonly sourceLine: number;
30
+ }
31
+ /**
32
+ * Database row type for processed_hashes (snake_case from SQLite).
33
+ */
34
+ export interface ProcessedHashRow {
35
+ id: number;
36
+ content_hash: string;
37
+ source_file: string;
38
+ source_line: number;
39
+ processed_at: string;
40
+ }
41
+ /**
42
+ * File progress ID (auto-incremented integer).
43
+ */
44
+ export type FileProgressId = number;
45
+ /**
46
+ * File processing progress record.
47
+ * Tracks how far we've processed a JSONL file for incremental processing.
48
+ */
49
+ export interface FileProgress {
50
+ readonly id: FileProgressId;
51
+ readonly filePath: string;
52
+ readonly lastLineProcessed: number;
53
+ readonly lastByteOffset: number;
54
+ readonly fileSize: number | null;
55
+ readonly fileChecksum: string | null;
56
+ readonly lastProcessedAt: Date;
57
+ }
58
+ /**
59
+ * Input for creating/updating file progress.
60
+ */
61
+ export interface UpsertFileProgressInput {
62
+ readonly filePath: string;
63
+ readonly lastLineProcessed: number;
64
+ readonly lastByteOffset: number;
65
+ readonly fileSize?: number;
66
+ readonly fileChecksum?: string;
67
+ }
68
+ /**
69
+ * Database row type for file_progress (snake_case from SQLite).
70
+ */
71
+ export interface FileProgressRow {
72
+ id: number;
73
+ file_path: string;
74
+ last_line_processed: number;
75
+ last_byte_offset: number;
76
+ file_size: number | null;
77
+ file_checksum: string | null;
78
+ last_processed_at: string;
79
+ }
80
+ /**
81
+ * Result of checking if a hash exists.
82
+ */
83
+ export interface HashCheckResult {
84
+ readonly exists: boolean;
85
+ readonly hash: string;
86
+ }
87
+ /**
88
+ * Result of processing a JSONL line.
89
+ */
90
+ export interface LineProcessResult {
91
+ readonly hash: string;
92
+ readonly isNew: boolean;
93
+ readonly lineNumber: number;
94
+ readonly content: string;
95
+ }
96
+ /**
97
+ * Result of processing a file.
98
+ */
99
+ export interface FileProcessResult {
100
+ readonly filePath: string;
101
+ readonly totalLines: number;
102
+ readonly newLines: number;
103
+ readonly skippedLines: number;
104
+ readonly startLine: number;
105
+ readonly endLine: number;
106
+ readonly duration: number;
107
+ }
108
+ /**
109
+ * Options for deduplication processing.
110
+ */
111
+ export interface DeduplicationOptions {
112
+ readonly batchSize?: number;
113
+ readonly startLine?: number;
114
+ readonly maxLines?: number;
115
+ }
116
+ //# sourceMappingURL=deduplication.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deduplication.d.ts","sourceRoot":"","sources":["../src/deduplication.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,EAAE,eAAe,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM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x
3
+ *
4
+ * Type definitions for JSONL line deduplication and file progress tracking.
5
+ * Used by the telemetry daemon to avoid re-processing already-seen content.
6
+ * Zero runtime dependencies - pure TypeScript types only.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=deduplication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deduplication.js","sourceRoot":"","sources":["../src/deduplication.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}