@link-assistant/hive-mind 1.10.1 → 1.10.2
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/CHANGELOG.md +10 -0
- package/package.json +1 -1
- package/src/github.lib.mjs +20 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @link-assistant/hive-mind
|
|
2
2
|
|
|
3
|
+
## 1.10.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e1ed8fc: fix: enable large log file uploads using gh-upload-log (issue #1173)
|
|
8
|
+
- Remove premature 25MB size check that incorrectly rejected large log files
|
|
9
|
+
- Files larger than 25MB now use gh-upload-log which can handle any size
|
|
10
|
+
- Default to private visibility when repository visibility cannot be determined (safer for private repos)
|
|
11
|
+
- Add case study documentation for issue #1173
|
|
12
|
+
|
|
3
13
|
## 1.10.1
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/package.json
CHANGED
package/src/github.lib.mjs
CHANGED
|
@@ -391,9 +391,13 @@ export async function attachLogToGitHub(options) {
|
|
|
391
391
|
if (logStats.size === 0) {
|
|
392
392
|
await log(' ⚠️ Log file is empty, skipping upload');
|
|
393
393
|
return false;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
|
|
394
|
+
}
|
|
395
|
+
// Issue #1173: Remove premature size check that blocked large files.
|
|
396
|
+
// gh-upload-log can handle files of any size by using repositories for large files.
|
|
397
|
+
// For files larger than fileMaxSize, we'll skip inline comment attempt and go directly to gh-upload-log.
|
|
398
|
+
const useLargeFileMode = logStats.size > githubLimits.fileMaxSize;
|
|
399
|
+
if (useLargeFileMode && verbose) {
|
|
400
|
+
await log(` 📁 Large log file (${Math.round(logStats.size / 1024 / 1024)}MB), will use gh-upload-log`, { verbose: true });
|
|
397
401
|
}
|
|
398
402
|
// Calculate token usage if sessionId and tempDir are provided
|
|
399
403
|
// For agent tool, publicPricingEstimate is already provided, so we skip Claude-specific calculation
|
|
@@ -539,13 +543,19 @@ ${logContent}
|
|
|
539
543
|
---
|
|
540
544
|
*Now working session is ended, feel free to review and add any feedback on the solution draft.*`;
|
|
541
545
|
}
|
|
542
|
-
// Check GitHub comment size limit
|
|
546
|
+
// Check GitHub comment size limit or large file mode
|
|
547
|
+
// Issue #1173: Also use gh-upload-log for large files, not just long comments
|
|
543
548
|
let commentResult;
|
|
544
|
-
if (logComment.length > githubLimits.commentMaxSize) {
|
|
545
|
-
|
|
549
|
+
if (useLargeFileMode || logComment.length > githubLimits.commentMaxSize) {
|
|
550
|
+
if (useLargeFileMode) {
|
|
551
|
+
await log(` 📁 Log file too large for inline comment (${Math.round(logStats.size / 1024 / 1024)}MB), using gh-upload-log`);
|
|
552
|
+
} else {
|
|
553
|
+
await log(` ⚠️ Log comment too long (${logComment.length} chars), GitHub limit is ${githubLimits.commentMaxSize} chars`);
|
|
554
|
+
}
|
|
546
555
|
await log(' 📎 Uploading log using gh-upload-log...');
|
|
547
556
|
try {
|
|
548
557
|
// Check if repository is public or private
|
|
558
|
+
// Issue #1173: Use public upload for public repos, private for private repos
|
|
549
559
|
let isPublicRepo = true;
|
|
550
560
|
try {
|
|
551
561
|
const repoVisibilityResult = await $`gh api repos/${owner}/${repo} --jq .visibility`;
|
|
@@ -553,7 +563,7 @@ ${logContent}
|
|
|
553
563
|
const visibility = repoVisibilityResult.stdout.toString().trim();
|
|
554
564
|
isPublicRepo = visibility === 'public';
|
|
555
565
|
if (verbose) {
|
|
556
|
-
await log(` 🔍 Repository visibility: ${visibility}`, { verbose: true });
|
|
566
|
+
await log(` 🔍 Repository visibility: ${visibility}, log upload will be ${isPublicRepo ? 'public' : 'private'}`, { verbose: true });
|
|
557
567
|
}
|
|
558
568
|
}
|
|
559
569
|
} catch (visibilityError) {
|
|
@@ -563,8 +573,9 @@ ${logContent}
|
|
|
563
573
|
owner,
|
|
564
574
|
repo,
|
|
565
575
|
});
|
|
566
|
-
// Default to
|
|
567
|
-
|
|
576
|
+
// Default to private if we can't determine visibility (safer for private repos)
|
|
577
|
+
isPublicRepo = false;
|
|
578
|
+
await log(' ⚠️ Could not determine repository visibility, defaulting to private for safety');
|
|
568
579
|
}
|
|
569
580
|
// Create temp log file with sanitized content (no compression, just gh-upload-log)
|
|
570
581
|
const tempLogFile = `/tmp/solution-draft-log-${targetType}-${Date.now()}.txt`;
|