@the-magic-tower/fixhive-opencode-plugin 0.1.15 → 0.1.19
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/dist/cloud/client.d.ts.map +1 -1
- package/dist/cloud/embedding.d.ts +22 -34
- package/dist/cloud/embedding.d.ts.map +1 -1
- package/dist/core/error-detector.d.ts +15 -41
- package/dist/core/error-detector.d.ts.map +1 -1
- package/dist/core/privacy-filter.d.ts +14 -25
- package/dist/core/privacy-filter.d.ts.map +1 -1
- package/dist/index.d.ts +15 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +399 -418
- package/dist/storage/local-store.d.ts +14 -66
- package/dist/storage/local-store.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -5,94 +5,42 @@
|
|
|
5
5
|
import Database from 'better-sqlite3';
|
|
6
6
|
import type { LocalErrorRecord, ErrorStatus, LocalStats, CloudKnowledgeEntry } from '../types/index.js';
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* Manages SQLite database for error records and caching
|
|
8
|
+
* LocalStore interface - defines all public methods
|
|
10
9
|
*/
|
|
11
|
-
export
|
|
12
|
-
private db;
|
|
13
|
-
constructor(projectDirectory: string);
|
|
14
|
-
/**
|
|
15
|
-
* Create a new error record
|
|
16
|
-
*/
|
|
10
|
+
export interface LocalStore {
|
|
17
11
|
createErrorRecord(data: Omit<LocalErrorRecord, 'id' | 'errorHash' | 'status' | 'createdAt'>): LocalErrorRecord;
|
|
18
|
-
/**
|
|
19
|
-
* Get error record by ID
|
|
20
|
-
*/
|
|
21
12
|
getErrorById(id: string): LocalErrorRecord | null;
|
|
22
|
-
/**
|
|
23
|
-
* Get errors by session
|
|
24
|
-
*/
|
|
25
13
|
getSessionErrors(sessionId: string, options?: {
|
|
26
14
|
status?: ErrorStatus;
|
|
27
15
|
limit?: number;
|
|
28
16
|
}): LocalErrorRecord[];
|
|
29
|
-
/**
|
|
30
|
-
* Get unresolved errors for a session
|
|
31
|
-
*/
|
|
32
17
|
getUnresolvedErrors(sessionId: string): LocalErrorRecord[];
|
|
33
|
-
/**
|
|
34
|
-
* Get recent errors across all sessions
|
|
35
|
-
*/
|
|
36
18
|
getRecentErrors(limit?: number): LocalErrorRecord[];
|
|
37
|
-
/**
|
|
38
|
-
* Mark error as resolved
|
|
39
|
-
*/
|
|
40
19
|
markResolved(id: string, data: {
|
|
41
20
|
resolution: string;
|
|
42
21
|
resolutionCode?: string;
|
|
43
22
|
}): LocalErrorRecord | null;
|
|
44
|
-
/**
|
|
45
|
-
* Mark error as uploaded to cloud
|
|
46
|
-
*/
|
|
47
23
|
markUploaded(id: string, cloudKnowledgeId: string): void;
|
|
48
|
-
/**
|
|
49
|
-
* Find similar errors by hash
|
|
50
|
-
*/
|
|
51
24
|
findSimilarErrors(errorHash: string): LocalErrorRecord[];
|
|
52
|
-
/**
|
|
53
|
-
* Get cached query results
|
|
54
|
-
*/
|
|
55
25
|
getCachedResults(errorHash: string): CloudKnowledgeEntry[] | null;
|
|
56
|
-
/**
|
|
57
|
-
* Cache query results
|
|
58
|
-
*/
|
|
59
26
|
cacheResults(errorHash: string, results: CloudKnowledgeEntry[], expirationMs?: number): void;
|
|
60
|
-
/**
|
|
61
|
-
* Clear expired cache entries
|
|
62
|
-
*/
|
|
63
27
|
clearExpiredCache(): number;
|
|
64
|
-
/**
|
|
65
|
-
* Get usage statistics
|
|
66
|
-
*/
|
|
67
28
|
getStats(): LocalStats;
|
|
68
|
-
/**
|
|
69
|
-
* Allowed stat column names for incrementStat (whitelist to prevent SQL injection)
|
|
70
|
-
*/
|
|
71
|
-
private static readonly ALLOWED_STATS;
|
|
72
|
-
/**
|
|
73
|
-
* Increment a stat counter
|
|
74
|
-
* @throws Error if stat name is not in the allowed whitelist
|
|
75
|
-
*/
|
|
76
|
-
private incrementStat;
|
|
77
|
-
/**
|
|
78
|
-
* Get preference value
|
|
79
|
-
*/
|
|
80
29
|
getPreference(key: string): string | null;
|
|
81
|
-
/**
|
|
82
|
-
* Set preference value
|
|
83
|
-
*/
|
|
84
30
|
setPreference(key: string, value: string): void;
|
|
85
|
-
/**
|
|
86
|
-
* Convert database row to LocalErrorRecord
|
|
87
|
-
*/
|
|
88
|
-
private rowToRecord;
|
|
89
|
-
/**
|
|
90
|
-
* Close database connection
|
|
91
|
-
*/
|
|
92
31
|
close(): void;
|
|
93
|
-
/**
|
|
94
|
-
* Get database for advanced queries
|
|
95
|
-
*/
|
|
96
32
|
getDatabase(): Database.Database;
|
|
97
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Create a LocalStore instance
|
|
36
|
+
* Factory function pattern to avoid ES6 class issues with Bun
|
|
37
|
+
*/
|
|
38
|
+
export declare function createLocalStore(projectDirectory: string): LocalStore;
|
|
39
|
+
/**
|
|
40
|
+
* Legacy class wrapper for backwards compatibility
|
|
41
|
+
* @deprecated Use createLocalStore() instead
|
|
42
|
+
*/
|
|
43
|
+
export declare const LocalStore: {
|
|
44
|
+
create: typeof createLocalStore;
|
|
45
|
+
};
|
|
98
46
|
//# sourceMappingURL=local-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-store.d.ts","sourceRoot":"","sources":["../../src/storage/local-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAItC,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"local-store.d.ts","sourceRoot":"","sources":["../../src/storage/local-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAItC,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAc3B;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,iBAAiB,CAAC,IAAI,EAAE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