@the-magic-tower/fixhive-opencode-plugin 0.1.32 → 0.1.33

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.
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/cloud/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAa3B;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAC/D,gBAAgB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAClE,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACtF,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3F,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACjF,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IA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CAAC;IAC3F,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACjF,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACjD,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IAC1D,gBAAgB,IAAI,MAAM,CAAC;IAC3B,mBAAmB,IAAI,OAAO,CAAC;CAChC;AA6BD;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAkTvF;AAID,eAAO,MAAM,WAAW;;CAEvB,CAAC"}
package/dist/index.js CHANGED
@@ -27857,15 +27857,23 @@ ${request.errorStack || ""}`;
27857
27857
  },
27858
27858
  async uploadResolution(request) {
27859
27859
  const { errorRecord, resolution, resolutionCode, resolutionSteps } = request;
27860
+ console.log(`[FixHive:Cloud] Starting upload for error: ${errorRecord.id.slice(0, 8)}`);
27860
27861
  let embeddingData = null;
27861
27862
  if (embedding) {
27862
27863
  const embeddingText = `${errorRecord.errorMessage}
27863
27864
  ${errorRecord.errorStack || ""}`;
27865
+ console.log(`[FixHive:Cloud] Generating embedding for error...`);
27864
27866
  embeddingData = await embedding.generate(embeddingText);
27867
+ console.log(`[FixHive:Cloud] Embedding generated: ${embeddingData ? embeddingData.length : 0} dims`);
27868
+ } else {
27869
+ console.log(`[FixHive:Cloud] No embedding service available - using text-only upload`);
27865
27870
  }
27866
27871
  if (embeddingData) {
27872
+ console.log(`[FixHive:Cloud] Checking for duplicates...`);
27867
27873
  const duplicateCheck = await checkDuplicateInternal(errorRecord.errorHash, embeddingData);
27874
+ console.log(`[FixHive:Cloud] Duplicate check: isDuplicate=${duplicateCheck.isDuplicate}, similarity=${duplicateCheck.similarityScore.toFixed(2)}`);
27868
27875
  if (duplicateCheck.isDuplicate && duplicateCheck.similarityScore > 0.95) {
27876
+ console.log(`[FixHive:Cloud] Duplicate found (similarity > 0.95). Incrementing usage count on entry ${duplicateCheck.existingId}`);
27869
27877
  await supabase.rpc("increment_usage_count", {
27870
27878
  entry_id: duplicateCheck.existingId
27871
27879
  });
@@ -27877,6 +27885,11 @@ ${errorRecord.errorStack || ""}`;
27877
27885
  };
27878
27886
  }
27879
27887
  }
27888
+ console.log(`[FixHive:Cloud] Inserting new knowledge entry...`);
27889
+ console.log(`[FixHive:Cloud] Hash: ${errorRecord.errorHash}`);
27890
+ console.log(`[FixHive:Cloud] Language: ${errorRecord.language}`);
27891
+ console.log(`[FixHive:Cloud] Framework: ${errorRecord.framework}`);
27892
+ console.log(`[FixHive:Cloud] Contributor: ${contributorId}`);
27880
27893
  const { data, error: error46 } = await supabase.from("knowledge_entries").insert({
27881
27894
  error_hash: errorRecord.errorHash,
27882
27895
  error_type: errorRecord.errorType,
@@ -27891,12 +27904,20 @@ ${errorRecord.errorStack || ""}`;
27891
27904
  contributor_id: contributorId
27892
27905
  }).select("id").single();
27893
27906
  if (error46) {
27907
+ console.error(`[FixHive:Cloud] Upload failed:`, error46);
27908
+ console.error(`[FixHive:Cloud] Error details:`, {
27909
+ message: error46.message,
27910
+ code: error46.code,
27911
+ hint: error46.hint,
27912
+ details: error46.details
27913
+ });
27894
27914
  return {
27895
27915
  success: false,
27896
27916
  isDuplicate: false,
27897
27917
  message: `Upload failed: ${error46.message}`
27898
27918
  };
27899
27919
  }
27920
+ console.log(`[FixHive:Cloud] Upload successful! Knowledge ID: ${data.id}`);
27900
27921
  return {
27901
27922
  success: true,
27902
27923
  knowledgeId: data.id,
@@ -28021,19 +28042,29 @@ function createTools(localStore, cloudClient, privacyFilter, context) {
28021
28042
  resolutionCode: args.resolutionCode
28022
28043
  });
28023
28044
  if (!record2) {
28045
+ console.warn(`[FixHive] markResolved: Error with ID ${args.errorId} not found`);
28024
28046
  return `Error with ID ${args.errorId} not found.`;
28025
28047
  }
28048
+ console.log(`[FixHive] Error marked as resolved locally: ${args.errorId.slice(0, 8)}`);
28026
28049
  if (args.upload !== false) {
28050
+ console.log(`[FixHive] Starting cloud upload for error: ${args.errorId.slice(0, 8)}`);
28027
28051
  const uploadResult = await cloudClient.uploadResolution({
28028
28052
  errorRecord: record2,
28029
28053
  resolution: args.resolution,
28030
28054
  resolutionCode: args.resolutionCode
28031
28055
  });
28056
+ console.log(`[FixHive] Upload result:`, {
28057
+ success: uploadResult.success,
28058
+ isDuplicate: uploadResult.isDuplicate,
28059
+ knowledgeId: uploadResult.knowledgeId,
28060
+ message: uploadResult.message
28061
+ });
28032
28062
  if (uploadResult.isDuplicate) {
28033
28063
  return `Error resolved locally. Similar solution already exists in FixHive (ID: ${uploadResult.existingId}).`;
28034
28064
  }
28035
28065
  if (uploadResult.success && uploadResult.knowledgeId) {
28036
28066
  localStore.markUploaded(args.errorId, uploadResult.knowledgeId);
28067
+ console.log(`[FixHive] Local status updated to 'uploaded' for: ${args.errorId.slice(0, 8)}`);
28037
28068
  return `Error resolved and shared with FixHive community! Knowledge ID: ${uploadResult.knowledgeId}`;
28038
28069
  }
28039
28070
  return `Error resolved locally. Upload failed: ${uploadResult.message}`;
@@ -28166,7 +28197,7 @@ function formatErrorList(errors5) {
28166
28197
  const table = `
28167
28198
  | ID | Type | Status | Message |
28168
28199
  |----|------|--------|---------|
28169
- ${errors5.map((e) => `| ${e.id.slice(0, 8)} | ${e.errorType} | ${e.status} | ${e.errorMessage.slice(0, 50)}... |`).join(`
28200
+ ${errors5.map((e) => `| \`${e.id}\` | ${e.errorType} | ${e.status} | ${e.errorMessage.slice(0, 50)}... |`).join(`
28170
28201
  `)}
28171
28202
  `;
28172
28203
  return `${header}
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/plugin/tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,mBAAmB,CAAC;AAE/F;;;GAGG;AACH,wBAAgB,WAAW,CACzB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,cAAc,GACtB,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,CAoOzC"}
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/plugin/tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,mBAAmB,CAAC;AAE/F;;;GAGG;AACH,wBAAgB,WAAW,CACzB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,cAAc,GACtB,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,CAgPzC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-magic-tower/fixhive-opencode-plugin",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "description": "Community-based error knowledge sharing for OpenCode",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",