@link-assistant/hive-mind 0.47.2 → 0.48.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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,19 @@
1
1
  # @link-assistant/hive-mind
2
2
 
3
- ## 0.47.2
3
+ ## 0.48.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 04e8375: Fix package-lock.json sync in changeset version bump flow
8
+ - Add `npm install --package-lock-only` after `npm run changeset:version` in version-and-commit.mjs
9
+ - Ensures package-lock.json stays in sync with package.json during changeset-based releases
10
+ - Fixes issue where version bumps only updated package.json
11
+
12
+ ## 0.48.0
13
+
14
+ ### Minor Changes
15
+
16
+ - 93ea94b: Add solution drafts listing feature to hive command. When processing completes, hive now displays all completed issues with their linked pull requests before showing the "✅ All issues processed!" message.
4
17
 
5
18
  ### Patch Changes
6
19
 
@@ -9,6 +22,8 @@
9
22
  - Applied consistently across all three prompt modules (claude, codex, opencode)
10
23
  - Helps maintain consistency with existing patterns and reduces redundant work
11
24
 
25
+ - 1bdc96d: Fix --base-branch option to properly create branches from the specified base branch instead of from current HEAD
26
+
12
27
  ## 0.47.1
13
28
 
14
29
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/hive-mind",
3
- "version": "0.47.2",
3
+ "version": "0.48.1",
4
4
  "description": "AI-powered issue solver and hive mind for collaborative problem solving",
5
5
  "main": "src/hive.mjs",
6
6
  "type": "module",
package/src/hive.mjs CHANGED
@@ -108,6 +108,8 @@ if (isDirectExecution) {
108
108
  const { initializeSentry, withSentry, addBreadcrumb, reportError } = sentryLib;
109
109
  const graphqlLib = await import('./github.graphql.lib.mjs');
110
110
  const { tryFetchIssuesWithGraphQL } = graphqlLib;
111
+ const solutionDraftsLib = await import('./list-solution-drafts.lib.mjs');
112
+ const { listSolutionDrafts } = solutionDraftsLib;
111
113
  const commandName = process.argv[1] ? process.argv[1].split('/').pop() : '';
112
114
  const isLocalScript = commandName.endsWith('.mjs');
113
115
  const solveCommand = isLocalScript ? './solve.mjs' : 'solve';
@@ -196,9 +198,7 @@ if (isDirectExecution) {
196
198
  }
197
199
  // Add delay between repository requests
198
200
  await new Promise(resolve => setTimeout(resolve, 1000));
199
-
200
201
  const repoIssues = await fetchAllIssuesWithPagination(issueCmd);
201
-
202
202
  // Add repository information to each issue
203
203
  const issuesWithRepo = repoIssues.map(issue => ({
204
204
  ...issue,
@@ -207,10 +207,8 @@ if (isDirectExecution) {
207
207
  owner: { login: ownerName },
208
208
  },
209
209
  }));
210
-
211
210
  collectedIssues.push(...issuesWithRepo);
212
211
  processedRepos++;
213
-
214
212
  if (issuesWithRepo.length > 0) {
215
213
  await log(` ✅ Found ${issuesWithRepo.length} issues in ${ownerName}/${repoName}`, { verbose: true });
216
214
  }
@@ -1348,7 +1346,10 @@ if (isDirectExecution) {
1348
1346
  }
1349
1347
  Object.assign(stats, currentStats);
1350
1348
  }
1351
-
1349
+ // List completed issues with their solution draft PRs
1350
+ if (stats.completed > 0) {
1351
+ await listSolutionDrafts(issueQueue, log, batchCheckPullRequestsForIssues);
1352
+ }
1352
1353
  await log('\n✅ All issues processed!');
1353
1354
  await log(` Completed: ${stats.completed}`);
1354
1355
  await log(` Failed: ${stats.failed}`);
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Solution Drafts Listing Module
3
+ * Displays completed issues with their linked pull requests
4
+ */
5
+
6
+ /**
7
+ * Lists all completed issues with their solution drafts (PRs)
8
+ * @param {Object} issueQueue - The issue queue containing completed issues
9
+ * @param {Function} log - Logging function
10
+ * @param {Function} batchCheckPullRequestsForIssues - Function to batch check PRs for issues
11
+ */
12
+ export async function listSolutionDrafts(issueQueue, log, batchCheckPullRequestsForIssues) {
13
+ if (!issueQueue.completed || issueQueue.completed.length === 0) return;
14
+ await log('\n📋 Issues with solution drafts:');
15
+ const byRepo = {};
16
+ for (const url of issueQueue.completed) {
17
+ const m = url.match(/github\.com\/([^/]+)\/([^/]+)\/issues\/(\d+)/);
18
+ if (m) (byRepo[`${m[1]}/${m[2]}`] ||= { owner: m[1], repo: m[2], iss: [] }).iss.push({ n: +m[3], url });
19
+ }
20
+ for (const r of Object.values(byRepo)) {
21
+ const prs = await batchCheckPullRequestsForIssues(
22
+ r.owner,
23
+ r.repo,
24
+ r.iss.map(i => i.n)
25
+ );
26
+ for (const i of r.iss)
27
+ if (prs[i.n]?.linkedPRs?.length) {
28
+ await log(` - ${i.url}`);
29
+ for (const p of prs[i.n].linkedPRs) await log(` → PR #${p.number}: ${p.url}`);
30
+ } else await log(` - ${i.url} (no PR found)`);
31
+ }
32
+ }
@@ -115,11 +115,16 @@ export async function createOrCheckoutBranch({ isContinueMode, prBranch, issueNu
115
115
  // Traditional mode: create new branch for issue
116
116
  const randomHex = crypto.randomBytes(6).toString('hex');
117
117
  branchName = `issue-${issueNumber}-${randomHex}`;
118
- await log(`\n${formatAligned('🌿', 'Creating branch:', `${branchName} from ${defaultBranch}`)}`);
118
+
119
+ // Use user-specified base branch if provided, otherwise use repository default
120
+ const baseBranch = argv.baseBranch || defaultBranch;
121
+ const branchSource = argv.baseBranch ? 'custom' : 'default';
122
+ await log(`\n${formatAligned('🌿', 'Creating branch:', `${branchName} from ${baseBranch} (${branchSource})`)}`);
119
123
 
120
124
  // IMPORTANT: Don't use 2>&1 here as it can interfere with exit codes
121
125
  // Git checkout -b outputs to stderr but that's normal
122
- checkoutResult = await $({ cwd: tempDir })`git checkout -b ${branchName}`;
126
+ // Create branch from the specified base branch (origin/baseBranch)
127
+ checkoutResult = await $({ cwd: tempDir })`git checkout -b ${branchName} origin/${baseBranch}`;
123
128
  }
124
129
 
125
130
  if (checkoutResult.code !== 0) {