@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,72 @@
1
+ /**
2
+ * Symbol extraction types for tx
3
+ *
4
+ * Type definitions for code intelligence and symbol extraction.
5
+ * Used by ast-grep integration for structural code analysis.
6
+ * Zero runtime dependencies - pure TypeScript types only.
7
+ */
8
+ /**
9
+ * All valid symbol kinds for code extraction.
10
+ * Covers common constructs across TypeScript, Rust, Go, Python, etc.
11
+ */
12
+ export declare const SYMBOL_KINDS: readonly ["function", "class", "interface", "type", "const", "variable", "method", "struct", "enum", "trait", "module"];
13
+ /**
14
+ * Symbol kind - one of the valid code construct types.
15
+ */
16
+ export type SymbolKind = (typeof SYMBOL_KINDS)[number];
17
+ /**
18
+ * Information about an extracted symbol.
19
+ */
20
+ export interface SymbolInfo {
21
+ /** Symbol name (e.g., function name, class name) */
22
+ readonly name: string;
23
+ /** Kind of symbol */
24
+ readonly kind: SymbolKind;
25
+ /** Line number where the symbol is defined (1-indexed) */
26
+ readonly line: number;
27
+ /** Whether the symbol is exported */
28
+ readonly exported: boolean;
29
+ }
30
+ /**
31
+ * Import kind - static (import/require) or dynamic (import()).
32
+ */
33
+ export declare const IMPORT_KINDS: readonly ["static", "dynamic"];
34
+ export type ImportKind = (typeof IMPORT_KINDS)[number];
35
+ /**
36
+ * Information about an import statement.
37
+ */
38
+ export interface ImportInfo {
39
+ /** Source module path or package name */
40
+ readonly source: string;
41
+ /** Imported specifiers (names) */
42
+ readonly specifiers: readonly string[];
43
+ /** Kind of import */
44
+ readonly kind: ImportKind;
45
+ }
46
+ /**
47
+ * Pattern for matching symbols with ast-grep.
48
+ */
49
+ export interface SymbolPattern {
50
+ /** ast-grep pattern string */
51
+ readonly pattern: string;
52
+ /** Kind of symbol this pattern matches */
53
+ readonly kind: SymbolKind;
54
+ /** If specified, only match exported/non-exported symbols */
55
+ readonly exported?: boolean;
56
+ }
57
+ /**
58
+ * A match result from ast-grep pattern matching.
59
+ */
60
+ export interface Match {
61
+ /** File path where the match was found */
62
+ readonly file: string;
63
+ /** Line number (1-indexed) */
64
+ readonly line: number;
65
+ /** Column number (1-indexed) */
66
+ readonly column: number;
67
+ /** Matched text */
68
+ readonly text: string;
69
+ /** Named captures from the pattern (e.g., $NAME -> value) */
70
+ readonly captures: Readonly<Record<string, string>>;
71
+ }
72
+ //# sourceMappingURL=symbol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"symbol.d.ts","sourceRoot":"","sources":["../src/symbol.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;GAGG;AACH,eAAO,MAAM,YAAY,yHAYf,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,oDAAoD;IACpD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qBAAqB;IACrB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,0DAA0D;IAC1D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,gCAAiC,CAAC;AAC3D,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,yCAAyC;IACzC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kCAAkC;IAClC,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,qBAAqB;IACrB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,8BAA8B;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,0CAA0C;IAC1C,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,6DAA6D;IAC7D,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,0CAA0C;IAC1C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8BAA8B;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,gCAAgC;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,mBAAmB;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACrD"}
package/dist/symbol.js ADDED
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Symbol extraction types for tx
3
+ *
4
+ * Type definitions for code intelligence and symbol extraction.
5
+ * Used by ast-grep integration for structural code analysis.
6
+ * Zero runtime dependencies - pure TypeScript types only.
7
+ */
8
+ /**
9
+ * All valid symbol kinds for code extraction.
10
+ * Covers common constructs across TypeScript, Rust, Go, Python, etc.
11
+ */
12
+ export const SYMBOL_KINDS = [
13
+ "function",
14
+ "class",
15
+ "interface",
16
+ "type",
17
+ "const",
18
+ "variable",
19
+ "method",
20
+ "struct",
21
+ "enum",
22
+ "trait",
23
+ "module",
24
+ ];
25
+ /**
26
+ * Import kind - static (import/require) or dynamic (import()).
27
+ */
28
+ export const IMPORT_KINDS = ["static", "dynamic"];
29
+ //# sourceMappingURL=symbol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"symbol.js","sourceRoot":"","sources":["../src/symbol.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,UAAU;IACV,OAAO;IACP,WAAW;IACX,MAAM;IACN,OAAO;IACP,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,OAAO;IACP,QAAQ;CACA,CAAC;AAqBX;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAU,CAAC"}
package/dist/task.d.ts ADDED
@@ -0,0 +1,138 @@
1
+ /**
2
+ * Task types for tx
3
+ *
4
+ * Core type definitions for the task management system.
5
+ * Zero runtime dependencies - pure TypeScript types only.
6
+ */
7
+ /**
8
+ * All valid task statuses in lifecycle order.
9
+ * backlog → ready → planning → active → blocked → review → human_needs_to_review → done
10
+ */
11
+ export declare const TASK_STATUSES: readonly ["backlog", "ready", "planning", "active", "blocked", "review", "human_needs_to_review", "done"];
12
+ /**
13
+ * Task status - one of the valid lifecycle states.
14
+ */
15
+ export type TaskStatus = (typeof TASK_STATUSES)[number];
16
+ /**
17
+ * Branded type for task IDs.
18
+ * Format: tx-[a-z0-9]{6,8} (e.g., "tx-abc123")
19
+ */
20
+ export type TaskId = string & {
21
+ readonly _brand: unique symbol;
22
+ };
23
+ /**
24
+ * Core task entity without dependency information.
25
+ * IMPORTANT: Per doctrine Rule 1, never return bare Task to external consumers.
26
+ * Always use TaskWithDeps for API responses.
27
+ */
28
+ export interface Task {
29
+ readonly id: TaskId;
30
+ readonly title: string;
31
+ readonly description: string;
32
+ readonly status: TaskStatus;
33
+ readonly parentId: TaskId | null;
34
+ readonly score: number;
35
+ readonly createdAt: Date;
36
+ readonly updatedAt: Date;
37
+ readonly completedAt: Date | null;
38
+ readonly metadata: Record<string, unknown>;
39
+ }
40
+ /**
41
+ * Task with full dependency information.
42
+ * This is the REQUIRED return type for all external APIs (Rule 1).
43
+ */
44
+ export interface TaskWithDeps extends Task {
45
+ /** Task IDs that block this task */
46
+ readonly blockedBy: TaskId[];
47
+ /** Task IDs this task blocks */
48
+ readonly blocks: TaskId[];
49
+ /** Direct child task IDs */
50
+ readonly children: TaskId[];
51
+ /** Whether this task can be worked on (status is workable AND all blockers are done) */
52
+ readonly isReady: boolean;
53
+ }
54
+ /**
55
+ * Recursive tree structure for task hierarchy.
56
+ */
57
+ export interface TaskTree {
58
+ readonly task: Task;
59
+ readonly children: readonly TaskTree[];
60
+ }
61
+ /**
62
+ * Task dependency relationship.
63
+ */
64
+ export interface TaskDependency {
65
+ readonly blockerId: TaskId;
66
+ readonly blockedId: TaskId;
67
+ readonly createdAt: Date;
68
+ }
69
+ /**
70
+ * Input for creating a new task.
71
+ */
72
+ export interface CreateTaskInput {
73
+ readonly title: string;
74
+ readonly description?: string;
75
+ readonly parentId?: string | null;
76
+ readonly score?: number;
77
+ readonly metadata?: Record<string, unknown>;
78
+ }
79
+ /**
80
+ * Input for updating an existing task.
81
+ */
82
+ export interface UpdateTaskInput {
83
+ readonly title?: string;
84
+ readonly description?: string;
85
+ readonly status?: TaskStatus;
86
+ readonly parentId?: string | null;
87
+ readonly score?: number;
88
+ readonly metadata?: Record<string, unknown>;
89
+ }
90
+ /**
91
+ * Cursor for pagination (score + id based).
92
+ */
93
+ export interface TaskCursor {
94
+ readonly score: number;
95
+ readonly id: string;
96
+ }
97
+ /**
98
+ * Filter options for task queries.
99
+ */
100
+ export interface TaskFilter {
101
+ readonly status?: TaskStatus | TaskStatus[];
102
+ readonly parentId?: string | null;
103
+ readonly limit?: number;
104
+ /** Search in title and description (case-insensitive) */
105
+ readonly search?: string;
106
+ /** Cursor for keyset pagination (returns tasks after this cursor) */
107
+ readonly cursor?: TaskCursor;
108
+ }
109
+ /**
110
+ * Valid status transitions map.
111
+ * Used to validate status changes follow the lifecycle.
112
+ */
113
+ export declare const VALID_TRANSITIONS: Record<TaskStatus, readonly TaskStatus[]>;
114
+ /**
115
+ * Database row type for tasks (snake_case from SQLite).
116
+ * Used by repositories for mapping DB rows to Task objects.
117
+ */
118
+ export interface TaskRow {
119
+ id: string;
120
+ title: string;
121
+ description: string;
122
+ status: string;
123
+ parent_id: string | null;
124
+ score: number;
125
+ created_at: string;
126
+ updated_at: string;
127
+ completed_at: string | null;
128
+ metadata: string;
129
+ }
130
+ /**
131
+ * Database row type for dependencies (snake_case from SQLite).
132
+ */
133
+ export interface DependencyRow {
134
+ blocker_id: string;
135
+ blocked_id: string;
136
+ created_at: string;
137
+ }
138
+ //# sourceMappingURL=task.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../src/task.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,eAAO,MAAM,aAAa,2GAShB,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAExD;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,MAAM,CAAA;CAAE,CAAC;AAEjE;;;;GAIG;AACH,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC5C;AAED;;;GAGG;AACH,MAAM,WAAW,YAAa,SAAQ,IAAI;IACxC,oCAAoC;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAC7B,gCAAgC;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAC1B,4BAA4B;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAC5B,wFAAwF;IACxF,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,SAAS,QAAQ,EAAE,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,UAAU,EAAE,CAAC;IAC5C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,yDAAyD;IACzD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,qEAAqE;IACrE,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;CAC9B;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,UAAU,EAAE,SAAS,UAAU,EAAE,CAS9D,CAAC;AAEX;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB"}
package/dist/task.js ADDED
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Task types for tx
3
+ *
4
+ * Core type definitions for the task management system.
5
+ * Zero runtime dependencies - pure TypeScript types only.
6
+ */
7
+ /**
8
+ * All valid task statuses in lifecycle order.
9
+ * backlog → ready → planning → active → blocked → review → human_needs_to_review → done
10
+ */
11
+ export const TASK_STATUSES = [
12
+ "backlog",
13
+ "ready",
14
+ "planning",
15
+ "active",
16
+ "blocked",
17
+ "review",
18
+ "human_needs_to_review",
19
+ "done",
20
+ ];
21
+ /**
22
+ * Valid status transitions map.
23
+ * Used to validate status changes follow the lifecycle.
24
+ */
25
+ export const VALID_TRANSITIONS = {
26
+ backlog: ["ready", "planning", "active", "blocked", "done"],
27
+ ready: ["planning", "active", "blocked", "done"],
28
+ planning: ["ready", "active", "blocked", "done"],
29
+ active: ["blocked", "review", "done"],
30
+ blocked: ["backlog", "ready", "planning", "active"],
31
+ review: ["active", "human_needs_to_review", "done"],
32
+ human_needs_to_review: ["active", "review", "done"],
33
+ done: ["backlog"],
34
+ };
35
+ //# sourceMappingURL=task.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task.js","sourceRoot":"","sources":["../src/task.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,SAAS;IACT,OAAO;IACP,UAAU;IACV,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,uBAAuB;IACvB,MAAM;CACE,CAAC;AA2GX;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAA8C;IAC1E,OAAO,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC;IAC3D,KAAK,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC;IAChD,QAAQ,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC;IAChD,MAAM,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC;IACrC,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC;IACnD,MAAM,EAAE,CAAC,QAAQ,EAAE,uBAAuB,EAAE,MAAM,CAAC;IACnD,qBAAqB,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC;IACnD,IAAI,EAAE,CAAC,SAAS,CAAC;CACT,CAAC"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * @tx/types/tracked-project - Daemon tracked project types
3
+ *
4
+ * Tracked projects are directories that the daemon monitors for JSONL
5
+ * transcripts to process for learning extraction.
6
+ *
7
+ * @see PRD-015 for the JSONL daemon and knowledge promotion pipeline
8
+ */
9
+ /**
10
+ * Source type of the AI tool generating transcripts.
11
+ *
12
+ * - claude: Claude Code
13
+ * - cursor: Cursor IDE
14
+ * - windsurf: Windsurf IDE
15
+ * - other: Other AI coding tools
16
+ */
17
+ export type SourceType = "claude" | "cursor" | "windsurf" | "other";
18
+ /**
19
+ * All valid source types.
20
+ */
21
+ export declare const SOURCE_TYPES: readonly ["claude", "cursor", "windsurf", "other"];
22
+ /**
23
+ * Unique identifier for a tracked project.
24
+ */
25
+ export type TrackedProjectId = number;
26
+ /**
27
+ * A project directory tracked by the daemon for transcript processing.
28
+ */
29
+ export interface TrackedProject {
30
+ /** Unique database ID */
31
+ readonly id: TrackedProjectId;
32
+ /** Absolute path to the project directory */
33
+ readonly projectPath: string;
34
+ /** Optional project identifier (for linking to tx database) */
35
+ readonly projectId: string | null;
36
+ /** Type of AI tool generating transcripts */
37
+ readonly sourceType: SourceType;
38
+ /** When the project was added for tracking */
39
+ readonly addedAt: Date;
40
+ /** Whether tracking is currently enabled */
41
+ readonly enabled: boolean;
42
+ }
43
+ /**
44
+ * Input for tracking a new project.
45
+ */
46
+ export interface CreateTrackedProjectInput {
47
+ /** Absolute path to the project directory */
48
+ readonly projectPath: string;
49
+ /** Optional project identifier */
50
+ readonly projectId?: string | null;
51
+ /** Type of AI tool (defaults to 'claude') */
52
+ readonly sourceType?: SourceType;
53
+ }
54
+ /**
55
+ * Database row representation for daemon_tracked_projects table.
56
+ */
57
+ export interface TrackedProjectRow {
58
+ readonly id: number;
59
+ readonly project_path: string;
60
+ readonly project_id: string | null;
61
+ readonly source_type: string;
62
+ readonly added_at: string;
63
+ readonly enabled: number;
64
+ }
65
+ //# sourceMappingURL=tracked-project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracked-project.d.ts","sourceRoot":"","sources":["../src/tracked-project.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAA;AAEnE;;GAEG;AACH,eAAO,MAAM,YAAY,oDAAqD,CAAA;AAE9E;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAA;AAErC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,yBAAyB;IACzB,QAAQ,CAAC,EAAE,EAAE,gBAAgB,CAAA;IAC7B,6CAA6C;IAC7C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,+DAA+D;IAC/D,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAA;IAC/B,8CAA8C;IAC9C,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAA;IACtB,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,6CAA6C;IAC7C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,kCAAkC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAA;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @tx/types/tracked-project - Daemon tracked project types
3
+ *
4
+ * Tracked projects are directories that the daemon monitors for JSONL
5
+ * transcripts to process for learning extraction.
6
+ *
7
+ * @see PRD-015 for the JSONL daemon and knowledge promotion pipeline
8
+ */
9
+ /**
10
+ * All valid source types.
11
+ */
12
+ export const SOURCE_TYPES = ["claude", "cursor", "windsurf", "other"];
13
+ //# sourceMappingURL=tracked-project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracked-project.js","sourceRoot":"","sources":["../src/tracked-project.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAYH;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAU,CAAA"}
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@jamesaphoenix/tx-types",
3
+ "version": "0.4.1",
4
+ "description": "Shared TypeScript types for tx - zero runtime dependencies",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ },
13
+ "./task": {
14
+ "types": "./dist/task.d.ts",
15
+ "import": "./dist/task.js"
16
+ },
17
+ "./learning": {
18
+ "types": "./dist/learning.d.ts",
19
+ "import": "./dist/learning.js"
20
+ },
21
+ "./file-learning": {
22
+ "types": "./dist/file-learning.d.ts",
23
+ "import": "./dist/file-learning.js"
24
+ },
25
+ "./attempt": {
26
+ "types": "./dist/attempt.d.ts",
27
+ "import": "./dist/attempt.js"
28
+ },
29
+ "./run": {
30
+ "types": "./dist/run.d.ts",
31
+ "import": "./dist/run.js"
32
+ }
33
+ },
34
+ "files": [
35
+ "dist"
36
+ ],
37
+ "scripts": {
38
+ "build": "tsc -b",
39
+ "typecheck": "tsc --noEmit",
40
+ "lint": "eslint src/",
41
+ "test": "echo 'Types-only package - no tests needed'"
42
+ },
43
+ "devDependencies": {
44
+ "typescript": "^5.7.0"
45
+ },
46
+ "keywords": [
47
+ "tx",
48
+ "types",
49
+ "typescript"
50
+ ],
51
+ "sideEffects": false,
52
+ "repository": {
53
+ "type": "git",
54
+ "url": "https://github.com/jamesaphoenix/tx.git",
55
+ "directory": "packages/types"
56
+ },
57
+ "author": "James Phoenix",
58
+ "license": "MIT"
59
+ }