@the-magic-tower/fixhive-opencode-plugin 0.1.25 → 0.1.27
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 +44 -0
- package/dist/cloud/client.d.ts.map +1 -0
- package/dist/cloud/embedding.d.ts +43 -0
- package/dist/cloud/embedding.d.ts.map +1 -0
- package/dist/core/error-detector.d.ts +26 -0
- package/dist/core/error-detector.d.ts.map +1 -0
- package/dist/core/hash.d.ts +41 -0
- package/dist/core/hash.d.ts.map +1 -0
- package/dist/core/privacy-filter.d.ts +33 -0
- package/dist/core/privacy-filter.d.ts.map +1 -0
- package/dist/index.d.ts +44 -472
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27031 -355
- package/dist/plugin/index.d.ts +11 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/tools.d.ts +15 -0
- package/dist/plugin/tools.d.ts.map +1 -0
- package/dist/storage/local-store.d.ts +46 -0
- package/dist/storage/local-store.d.ts.map +1 -0
- package/dist/storage/migrations.d.ts +10 -0
- package/dist/storage/migrations.d.ts.map +1 -0
- package/dist/types/index.d.ts +218 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +6 -11
- package/dist/index.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,473 +1,45 @@
|
|
|
1
|
-
import { Plugin } from '@opencode-ai/plugin';
|
|
2
|
-
import Database from 'better-sqlite3';
|
|
3
|
-
|
|
4
1
|
/**
|
|
5
|
-
* FixHive OpenCode
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
totalErrors: number;
|
|
50
|
-
resolvedErrors: number;
|
|
51
|
-
uploadedErrors: number;
|
|
52
|
-
}
|
|
53
|
-
interface CloudKnowledgeEntry {
|
|
54
|
-
id: string;
|
|
55
|
-
errorHash: string;
|
|
56
|
-
errorType: ErrorType;
|
|
57
|
-
errorMessage: string;
|
|
58
|
-
errorStack?: string;
|
|
59
|
-
language: Language;
|
|
60
|
-
framework?: string;
|
|
61
|
-
dependencies?: Record<string, string>;
|
|
62
|
-
embedding?: number[];
|
|
63
|
-
resolutionDescription: string;
|
|
64
|
-
resolutionCode?: string;
|
|
65
|
-
resolutionSteps?: string[];
|
|
66
|
-
contributorId: string;
|
|
67
|
-
upvotes: number;
|
|
68
|
-
downvotes: number;
|
|
69
|
-
usageCount: number;
|
|
70
|
-
createdAt: string;
|
|
71
|
-
updatedAt: string;
|
|
72
|
-
isVerified: boolean;
|
|
73
|
-
similarity?: number;
|
|
74
|
-
}
|
|
75
|
-
interface DuplicateCheckResult {
|
|
76
|
-
isDuplicate: boolean;
|
|
77
|
-
existingId?: string;
|
|
78
|
-
similarityScore: number;
|
|
79
|
-
}
|
|
80
|
-
interface ContributorStats {
|
|
81
|
-
contributionCount: number;
|
|
82
|
-
helpedCount: number;
|
|
83
|
-
totalUpvotes: number;
|
|
84
|
-
}
|
|
85
|
-
interface DetectedSignal {
|
|
86
|
-
type: 'exit_code' | 'stderr' | 'pattern' | 'stack_trace';
|
|
87
|
-
weight: number;
|
|
88
|
-
value: string | number;
|
|
89
|
-
description: string;
|
|
90
|
-
}
|
|
91
|
-
interface ErrorDetectionResult {
|
|
92
|
-
detected: boolean;
|
|
93
|
-
confidence: number;
|
|
94
|
-
errorType: ErrorType;
|
|
95
|
-
severity: Severity;
|
|
96
|
-
signals: DetectedSignal[];
|
|
97
|
-
errorMessage: string;
|
|
98
|
-
errorStack?: string;
|
|
99
|
-
rawOutput: string;
|
|
100
|
-
}
|
|
101
|
-
interface StackFrame {
|
|
102
|
-
function: string;
|
|
103
|
-
file: string;
|
|
104
|
-
line: number;
|
|
105
|
-
column?: number;
|
|
106
|
-
isProjectCode: boolean;
|
|
107
|
-
}
|
|
108
|
-
interface StackTraceInfo {
|
|
109
|
-
hasStackTrace: boolean;
|
|
110
|
-
language: string | null;
|
|
111
|
-
frames: string[];
|
|
112
|
-
}
|
|
113
|
-
interface FixHiveContext {
|
|
114
|
-
sessionId: string;
|
|
115
|
-
projectDirectory: string;
|
|
116
|
-
language?: Language;
|
|
117
|
-
framework?: string;
|
|
118
|
-
}
|
|
119
|
-
interface ToolOutput {
|
|
120
|
-
tool: string;
|
|
121
|
-
output: string;
|
|
122
|
-
exitCode?: number;
|
|
123
|
-
stderr?: string;
|
|
124
|
-
metadata?: Record<string, unknown>;
|
|
125
|
-
}
|
|
126
|
-
interface PrivacyFilterRule {
|
|
127
|
-
name: string;
|
|
128
|
-
category: 'secret' | 'identity' | 'infrastructure' | 'path' | 'environment';
|
|
129
|
-
pattern: RegExp;
|
|
130
|
-
replacement: string | ((match: string, ...groups: string[]) => string);
|
|
131
|
-
priority: number;
|
|
132
|
-
}
|
|
133
|
-
interface SanitizedContent {
|
|
134
|
-
original: string;
|
|
135
|
-
sanitized: string;
|
|
136
|
-
redactedCount: number;
|
|
137
|
-
appliedFilters: string[];
|
|
138
|
-
}
|
|
139
|
-
interface FilterContext {
|
|
140
|
-
projectRoot: string;
|
|
141
|
-
homeDir: string;
|
|
142
|
-
commonPaths: Map<string, string>;
|
|
143
|
-
}
|
|
144
|
-
interface SearchRequest {
|
|
145
|
-
errorMessage: string;
|
|
146
|
-
errorStack?: string;
|
|
147
|
-
language?: Language;
|
|
148
|
-
framework?: string;
|
|
149
|
-
limit?: number;
|
|
150
|
-
threshold?: number;
|
|
151
|
-
}
|
|
152
|
-
interface SearchResponse {
|
|
153
|
-
results: CloudKnowledgeEntry[];
|
|
154
|
-
queryTime: number;
|
|
155
|
-
cached: boolean;
|
|
156
|
-
}
|
|
157
|
-
interface UploadRequest {
|
|
158
|
-
errorRecord: LocalErrorRecord;
|
|
159
|
-
resolution: string;
|
|
160
|
-
resolutionCode?: string;
|
|
161
|
-
resolutionSteps?: string[];
|
|
162
|
-
}
|
|
163
|
-
interface UploadResponse {
|
|
164
|
-
success: boolean;
|
|
165
|
-
knowledgeId?: string;
|
|
166
|
-
isDuplicate: boolean;
|
|
167
|
-
existingId?: string;
|
|
168
|
-
message: string;
|
|
169
|
-
}
|
|
170
|
-
interface QueryKnowledgeArgs {
|
|
171
|
-
errorMessage: string;
|
|
172
|
-
language?: string;
|
|
173
|
-
framework?: string;
|
|
174
|
-
limit?: number;
|
|
175
|
-
}
|
|
176
|
-
interface SubmitResolutionArgs {
|
|
177
|
-
errorId: string;
|
|
178
|
-
resolution: string;
|
|
179
|
-
resolutionCode?: string;
|
|
180
|
-
}
|
|
181
|
-
interface ListErrorsArgs {
|
|
182
|
-
status?: ErrorStatus;
|
|
183
|
-
limit?: number;
|
|
184
|
-
}
|
|
185
|
-
interface MarkResolvedArgs {
|
|
186
|
-
errorId: string;
|
|
187
|
-
resolution: string;
|
|
188
|
-
resolutionCode?: string;
|
|
189
|
-
upload?: boolean;
|
|
190
|
-
}
|
|
191
|
-
interface VoteArgs {
|
|
192
|
-
knowledgeId: string;
|
|
193
|
-
helpful: boolean;
|
|
194
|
-
}
|
|
195
|
-
interface FixHiveConfig {
|
|
196
|
-
supabaseUrl: string;
|
|
197
|
-
supabaseAnonKey: string;
|
|
198
|
-
openaiApiKey?: string;
|
|
199
|
-
contributorId: string;
|
|
200
|
-
cacheExpirationMs: number;
|
|
201
|
-
embeddingModel: string;
|
|
202
|
-
embeddingDimensions: number;
|
|
203
|
-
similarityThreshold: number;
|
|
204
|
-
maxSearchResults: number;
|
|
205
|
-
}
|
|
206
|
-
interface PartialConfig {
|
|
207
|
-
supabaseUrl?: string;
|
|
208
|
-
supabaseAnonKey?: string;
|
|
209
|
-
openaiApiKey?: string;
|
|
210
|
-
contributorId?: string;
|
|
211
|
-
cacheExpirationMs?: number;
|
|
212
|
-
}
|
|
213
|
-
type FixHiveEvent = {
|
|
214
|
-
type: 'error:detected';
|
|
215
|
-
payload: LocalErrorRecord;
|
|
216
|
-
} | {
|
|
217
|
-
type: 'error:resolved';
|
|
218
|
-
payload: {
|
|
219
|
-
errorId: string;
|
|
220
|
-
resolution: string;
|
|
221
|
-
};
|
|
222
|
-
} | {
|
|
223
|
-
type: 'solution:uploaded';
|
|
224
|
-
payload: {
|
|
225
|
-
knowledgeId: string;
|
|
226
|
-
};
|
|
227
|
-
} | {
|
|
228
|
-
type: 'solution:found';
|
|
229
|
-
payload: CloudKnowledgeEntry[];
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* FixHive Privacy Filter
|
|
234
|
-
* Sanitizes sensitive information from error messages before sharing
|
|
235
|
-
*/
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Create a PrivacyFilter instance
|
|
239
|
-
* Factory function pattern to avoid ES6 class issues with Bun
|
|
240
|
-
*/
|
|
241
|
-
declare function createPrivacyFilter(customRules?: PrivacyFilterRule[]): PrivacyFilter;
|
|
242
|
-
/**
|
|
243
|
-
* PrivacyFilter interface - defines all public methods
|
|
244
|
-
*/
|
|
245
|
-
interface PrivacyFilter {
|
|
246
|
-
sanitize(content: string, context?: FilterContext): SanitizedContent;
|
|
247
|
-
addRule(rule: PrivacyFilterRule): void;
|
|
248
|
-
removeRule(name: string): boolean;
|
|
249
|
-
getRules(): ReadonlyArray<PrivacyFilterRule>;
|
|
250
|
-
containsSensitiveData(content: string): boolean;
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* Legacy class wrapper for backwards compatibility
|
|
254
|
-
* @deprecated Use createPrivacyFilter() instead
|
|
255
|
-
*/
|
|
256
|
-
declare const PrivacyFilter: {
|
|
257
|
-
create: typeof createPrivacyFilter;
|
|
258
|
-
};
|
|
259
|
-
/**
|
|
260
|
-
* Create default filter context from project directory
|
|
261
|
-
*/
|
|
262
|
-
declare function createFilterContext(projectDirectory: string): FilterContext;
|
|
263
|
-
declare const defaultPrivacyFilter: PrivacyFilter;
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* FixHive Error Detector
|
|
267
|
-
* Detects errors from tool outputs using multi-signal analysis
|
|
268
|
-
*/
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Create an ErrorDetector instance
|
|
272
|
-
* Factory function pattern to avoid ES6 class issues with Bun
|
|
273
|
-
*/
|
|
274
|
-
declare function createErrorDetector(privacyFilter?: PrivacyFilter): ErrorDetector;
|
|
275
|
-
/**
|
|
276
|
-
* ErrorDetector interface - defines all public methods
|
|
277
|
-
*/
|
|
278
|
-
interface ErrorDetector {
|
|
279
|
-
detect(toolOutput: ToolOutput): ErrorDetectionResult;
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* Legacy class wrapper for backwards compatibility
|
|
283
|
-
* @deprecated Use createErrorDetector() instead
|
|
284
|
-
*/
|
|
285
|
-
declare const ErrorDetector: {
|
|
286
|
-
create: typeof createErrorDetector;
|
|
287
|
-
};
|
|
288
|
-
declare const defaultErrorDetector: ErrorDetector;
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* FixHive Hash Utilities
|
|
292
|
-
* Generates fingerprints and hashes for error deduplication
|
|
293
|
-
*/
|
|
294
|
-
/**
|
|
295
|
-
* Generate SHA-256 hash of content
|
|
296
|
-
*/
|
|
297
|
-
declare function sha256(content: string): string;
|
|
298
|
-
/**
|
|
299
|
-
* Generate a shortened hash (first 16 characters)
|
|
300
|
-
*/
|
|
301
|
-
declare function shortHash(content: string): string;
|
|
302
|
-
/**
|
|
303
|
-
* Generate error fingerprint for matching similar errors
|
|
304
|
-
* Normalizes variable parts (paths, numbers, hashes) before hashing
|
|
305
|
-
*/
|
|
306
|
-
declare function generateErrorFingerprint(errorMessage: string, errorStack?: string): string;
|
|
307
|
-
/**
|
|
308
|
-
* Normalize error content by replacing variable parts
|
|
309
|
-
*/
|
|
310
|
-
declare function normalizeErrorContent(content: string): string;
|
|
311
|
-
/**
|
|
312
|
-
* Generate contributor ID (anonymous hash)
|
|
313
|
-
* Uses machine-specific information to create a stable anonymous ID
|
|
314
|
-
*/
|
|
315
|
-
declare function generateContributorId(): string;
|
|
316
|
-
/**
|
|
317
|
-
* Generate session-specific hash
|
|
318
|
-
*/
|
|
319
|
-
declare function generateSessionHash(sessionId: string): string;
|
|
320
|
-
/**
|
|
321
|
-
* Compare two fingerprints for similarity
|
|
322
|
-
* Returns true if they're identical (exact match)
|
|
323
|
-
*/
|
|
324
|
-
declare function fingerprintsMatch(fp1: string, fp2: string): boolean;
|
|
325
|
-
/**
|
|
326
|
-
* Calculate simple string similarity (Jaccard index)
|
|
327
|
-
* Used as a fallback when embeddings aren't available
|
|
328
|
-
*/
|
|
329
|
-
declare function calculateStringSimilarity(str1: string, str2: string): number;
|
|
330
|
-
|
|
331
|
-
/**
|
|
332
|
-
* FixHive Local Store
|
|
333
|
-
* SQLite-based local storage for error records and caching
|
|
334
|
-
*/
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* Create a LocalStore instance
|
|
338
|
-
* Factory function pattern to avoid ES6 class issues with Bun
|
|
339
|
-
*/
|
|
340
|
-
declare function createLocalStore(projectDirectory: string): LocalStore;
|
|
341
|
-
/**
|
|
342
|
-
* LocalStore interface - defines all public methods
|
|
343
|
-
*/
|
|
344
|
-
interface LocalStore {
|
|
345
|
-
createErrorRecord(data: Omit<LocalErrorRecord, 'id' | 'errorHash' | 'status' | 'createdAt'>): LocalErrorRecord;
|
|
346
|
-
getErrorById(id: string): LocalErrorRecord | null;
|
|
347
|
-
getSessionErrors(sessionId: string, options?: {
|
|
348
|
-
status?: ErrorStatus;
|
|
349
|
-
limit?: number;
|
|
350
|
-
}): LocalErrorRecord[];
|
|
351
|
-
getUnresolvedErrors(sessionId: string): LocalErrorRecord[];
|
|
352
|
-
getRecentErrors(limit?: number): LocalErrorRecord[];
|
|
353
|
-
markResolved(id: string, data: {
|
|
354
|
-
resolution: string;
|
|
355
|
-
resolutionCode?: string;
|
|
356
|
-
}): LocalErrorRecord | null;
|
|
357
|
-
markUploaded(id: string, cloudKnowledgeId: string): void;
|
|
358
|
-
findSimilarErrors(errorHash: string): LocalErrorRecord[];
|
|
359
|
-
getCachedResults(errorHash: string): CloudKnowledgeEntry[] | null;
|
|
360
|
-
cacheResults(errorHash: string, results: CloudKnowledgeEntry[], expirationMs?: number): void;
|
|
361
|
-
clearExpiredCache(): number;
|
|
362
|
-
getStats(): LocalStats;
|
|
363
|
-
getPreference(key: string): string | null;
|
|
364
|
-
setPreference(key: string, value: string): void;
|
|
365
|
-
close(): void;
|
|
366
|
-
getDatabase(): Database.Database;
|
|
367
|
-
}
|
|
368
|
-
/**
|
|
369
|
-
* Legacy class wrapper for backwards compatibility
|
|
370
|
-
* @deprecated Use createLocalStore() instead
|
|
371
|
-
*/
|
|
372
|
-
declare const LocalStore: {
|
|
373
|
-
create: typeof createLocalStore;
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* FixHive Database Migrations
|
|
378
|
-
* SQLite schema setup and migrations
|
|
379
|
-
*/
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
* Run all migrations on the database
|
|
383
|
-
*/
|
|
384
|
-
declare function runMigrations(db: Database.Database): void;
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* FixHive Cloud Client
|
|
388
|
-
* Supabase client for cloud knowledge base operations
|
|
389
|
-
*/
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* Cloud Client Configuration
|
|
393
|
-
*/
|
|
394
|
-
interface CloudClientConfig {
|
|
395
|
-
supabaseUrl: string;
|
|
396
|
-
supabaseAnonKey: string;
|
|
397
|
-
openaiApiKey?: string;
|
|
398
|
-
contributorId?: string;
|
|
399
|
-
similarityThreshold?: number;
|
|
400
|
-
}
|
|
401
|
-
/**
|
|
402
|
-
* Create a CloudClient instance
|
|
403
|
-
* Factory function pattern to avoid ES6 class issues with Bun
|
|
404
|
-
*/
|
|
405
|
-
declare function createCloudClient(config: CloudClientConfig): Promise<CloudClient>;
|
|
406
|
-
/**
|
|
407
|
-
* CloudClient interface - defines all public methods
|
|
408
|
-
*/
|
|
409
|
-
interface CloudClient {
|
|
410
|
-
searchSimilar(request: SearchRequest): Promise<SearchResponse>;
|
|
411
|
-
uploadResolution(request: UploadRequest): Promise<UploadResponse>;
|
|
412
|
-
checkDuplicate(errorHash: string, embedding: number[]): Promise<DuplicateCheckResult>;
|
|
413
|
-
vote(knowledgeId: string, helpful: boolean): Promise<{
|
|
414
|
-
success: boolean;
|
|
415
|
-
error?: string;
|
|
416
|
-
}>;
|
|
417
|
-
reportEntry(knowledgeId: string, reason?: string): Promise<{
|
|
418
|
-
success: boolean;
|
|
419
|
-
}>;
|
|
420
|
-
reportHelpful(knowledgeId: string): Promise<void>;
|
|
421
|
-
getContributorStats(): Promise<ContributorStats>;
|
|
422
|
-
getEntry(id: string): Promise<CloudKnowledgeEntry | null>;
|
|
423
|
-
getContributorId(): string;
|
|
424
|
-
hasEmbeddingService(): boolean;
|
|
425
|
-
}
|
|
426
|
-
declare const CloudClient: {
|
|
427
|
-
create: typeof createCloudClient;
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* EmbeddingService configuration
|
|
432
|
-
*/
|
|
433
|
-
interface EmbeddingServiceConfig {
|
|
434
|
-
apiKey: string;
|
|
435
|
-
model?: string;
|
|
436
|
-
dimensions?: number;
|
|
437
|
-
}
|
|
438
|
-
/**
|
|
439
|
-
* Calculate cosine similarity between two embeddings
|
|
440
|
-
*/
|
|
441
|
-
declare function cosineSimilarity(a: number[], b: number[]): number;
|
|
442
|
-
/**
|
|
443
|
-
* Create an EmbeddingService instance
|
|
444
|
-
* Factory function pattern to avoid ES6 class issues with Bun
|
|
445
|
-
*/
|
|
446
|
-
declare function createEmbeddingService(config: EmbeddingServiceConfig): Promise<EmbeddingService>;
|
|
447
|
-
/**
|
|
448
|
-
* FixHive Embedding Service
|
|
449
|
-
* Generates text embeddings for semantic search using OpenAI
|
|
450
|
-
*/
|
|
451
|
-
/**
|
|
452
|
-
* EmbeddingService interface - defines all public methods
|
|
453
|
-
*/
|
|
454
|
-
interface EmbeddingService {
|
|
455
|
-
generate(text: string): Promise<number[]>;
|
|
456
|
-
generateBatch(texts: string[]): Promise<number[][]>;
|
|
457
|
-
generateErrorEmbedding(errorMessage: string, errorStack?: string, context?: {
|
|
458
|
-
language?: string;
|
|
459
|
-
framework?: string;
|
|
460
|
-
}): Promise<number[]>;
|
|
461
|
-
getDimensions(): number;
|
|
462
|
-
getModel(): string;
|
|
463
|
-
}
|
|
464
|
-
/**
|
|
465
|
-
* Legacy class wrapper for backwards compatibility
|
|
466
|
-
* @deprecated Use createEmbeddingService() instead
|
|
467
|
-
*/
|
|
468
|
-
declare const EmbeddingService: {
|
|
469
|
-
create: typeof createEmbeddingService;
|
|
470
|
-
cosineSimilarity: typeof cosineSimilarity;
|
|
471
|
-
};
|
|
472
|
-
|
|
473
|
-
export { CloudClient, CloudClient as CloudClientInterface, type CloudKnowledgeEntry, type ContributorStats, type DetectedSignal, type DuplicateCheckResult, EmbeddingService, type EmbeddingServiceConfig, EmbeddingService as EmbeddingServiceInterface, type ErrorDetectionResult, ErrorDetector, ErrorDetector as ErrorDetectorInterface, type ErrorStatus, type ErrorType, type FilterContext, type FixHiveConfig, type FixHiveContext, type FixHiveEvent, FixHivePlugin, type Language, type ListErrorsArgs, type LocalErrorRecord, type LocalStats, LocalStore, LocalStore as LocalStoreInterface, type MarkResolvedArgs, type PartialConfig, PrivacyFilter, PrivacyFilter as PrivacyFilterInterface, type PrivacyFilterRule, type QueryCacheEntry, type QueryKnowledgeArgs, type SanitizedContent, type SearchRequest, type SearchResponse, type Severity, type StackFrame, type StackTraceInfo, type SubmitResolutionArgs, type ToolOutput, type UploadRequest, type UploadResponse, type VoteArgs, calculateStringSimilarity, cosineSimilarity, createCloudClient, createEmbeddingService, createErrorDetector, createFilterContext, createLocalStore, createPrivacyFilter, FixHivePlugin as default, defaultErrorDetector, defaultPrivacyFilter, fingerprintsMatch, generateContributorId, generateErrorFingerprint, generateSessionHash, normalizeErrorContent, runMigrations, sha256, shortHash };
|
|
2
|
+
* FixHive - Community-based Error Knowledge Sharing for OpenCode
|
|
3
|
+
*
|
|
4
|
+
* @module @fixhive/opencode-plugin
|
|
5
|
+
* @description
|
|
6
|
+
* FixHive is an OpenCode plugin that automatically captures errors during
|
|
7
|
+
* development sessions, queries a community knowledge base for solutions,
|
|
8
|
+
* and shares resolved errors with other developers.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* // In your OpenCode plugin configuration
|
|
13
|
+
* import FixHivePlugin from '@fixhive/opencode-plugin';
|
|
14
|
+
*
|
|
15
|
+
* export default FixHivePlugin;
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```bash
|
|
20
|
+
* # Environment variables
|
|
21
|
+
* FIXHIVE_SUPABASE_URL=https://your-project.supabase.co
|
|
22
|
+
* FIXHIVE_SUPABASE_KEY=your-anon-key
|
|
23
|
+
* OPENAI_API_KEY=sk-... # Optional, for embeddings
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export { FixHivePlugin, default } from './plugin/index.js';
|
|
27
|
+
export { createErrorDetector, defaultErrorDetector } from './core/error-detector.js';
|
|
28
|
+
export { createPrivacyFilter, defaultPrivacyFilter, createFilterContext } from './core/privacy-filter.js';
|
|
29
|
+
export { sha256, shortHash, generateErrorFingerprint, normalizeErrorContent, generateContributorId, generateSessionHash, fingerprintsMatch, calculateStringSimilarity, } from './core/hash.js';
|
|
30
|
+
export { createLocalStore } from './storage/local-store.js';
|
|
31
|
+
export { runMigrations } from './storage/migrations.js';
|
|
32
|
+
export { createCloudClient } from './cloud/client.js';
|
|
33
|
+
export { createEmbeddingService, cosineSimilarity } from './cloud/embedding.js';
|
|
34
|
+
export { ErrorDetector } from './core/error-detector.js';
|
|
35
|
+
export { PrivacyFilter } from './core/privacy-filter.js';
|
|
36
|
+
export { LocalStore } from './storage/local-store.js';
|
|
37
|
+
export { CloudClient } from './cloud/client.js';
|
|
38
|
+
export { EmbeddingService } from './cloud/embedding.js';
|
|
39
|
+
export type { ErrorType, ErrorStatus, Language, Severity, LocalErrorRecord, QueryCacheEntry, LocalStats, CloudKnowledgeEntry, DuplicateCheckResult, ContributorStats, DetectedSignal, ErrorDetectionResult, StackFrame, StackTraceInfo, FixHiveContext, ToolOutput, PrivacyFilterRule, SanitizedContent, FilterContext, SearchRequest, SearchResponse, UploadRequest, UploadResponse, QueryKnowledgeArgs, SubmitResolutionArgs, ListErrorsArgs, MarkResolvedArgs, VoteArgs, FixHiveConfig, PartialConfig, FixHiveEvent, } from './types/index.js';
|
|
40
|
+
export type { ErrorDetector as ErrorDetectorInterface } from './core/error-detector.js';
|
|
41
|
+
export type { PrivacyFilter as PrivacyFilterInterface } from './core/privacy-filter.js';
|
|
42
|
+
export type { LocalStore as LocalStoreInterface } from './storage/local-store.js';
|
|
43
|
+
export type { CloudClient as CloudClientInterface } from './cloud/client.js';
|
|
44
|
+
export type { EmbeddingService as EmbeddingServiceInterface, EmbeddingServiceConfig } from './cloud/embedding.js';
|
|
45
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;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