@yemi33/minions 0.1.24 → 0.1.25

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,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.25 (2026-03-28)
4
+
5
+ ### Engine
6
+ - engine.js
7
+ - engine/lifecycle.js
8
+
9
+ ### Other
10
+ - test/unit.test.js
11
+
3
12
  ## 0.1.24 (2026-03-28)
4
13
 
5
14
  ### Engine
@@ -1011,7 +1011,8 @@ function runPostCompletionHooks(dispatchItem, agentId, code, stdout, config) {
1011
1011
  if (isSuccess && sessionId && agentId && !agentId.startsWith('temp-')) {
1012
1012
  try {
1013
1013
  shared.safeWrite(path.join(AGENTS_DIR, agentId, 'session.json'), {
1014
- sessionId, dispatchId: dispatchItem.id, savedAt: new Date().toISOString()
1014
+ sessionId, dispatchId: dispatchItem.id, savedAt: new Date().toISOString(),
1015
+ branch: dispatchItem.meta?.branch || null,
1015
1016
  });
1016
1017
  } catch {}
1017
1018
  }
package/engine.js CHANGED
@@ -939,15 +939,18 @@ function spawnAgent(dispatchItem, config) {
939
939
  args.push('--allowedTools', claudeConfig.allowedTools);
940
940
  }
941
941
 
942
- // Session resume: reuse last session if recent enough (< 2 hours)
942
+ // Session resume: reuse last session if same branch and recent enough (< 2 hours)
943
+ // Only resume when the context is relevant — same branch means the agent is
944
+ // continuing work on the same PR/feature (e.g., author fixing their own build failure)
943
945
  if (!agentId.startsWith('temp-')) {
944
946
  try {
945
947
  const sessionFile = safeJson(path.join(AGENTS_DIR, agentId, 'session.json'));
946
948
  if (sessionFile?.sessionId && sessionFile.savedAt) {
947
949
  const sessionAge = Date.now() - new Date(sessionFile.savedAt).getTime();
948
- if (sessionAge < 2 * 60 * 60 * 1000) { // 2 hour TTL
950
+ const sameBranch = branchName && sessionFile.branch && sessionFile.branch === branchName;
951
+ if (sessionAge < 2 * 60 * 60 * 1000 && sameBranch) {
949
952
  args.push('--resume', sessionFile.sessionId);
950
- log('info', `Resuming session ${sessionFile.sessionId} for ${agentId} (age: ${Math.round(sessionAge / 60000)}min)`);
953
+ log('info', `Resuming session ${sessionFile.sessionId} for ${agentId} on branch ${branchName} (age: ${Math.round(sessionAge / 60000)}min)`);
951
954
  }
952
955
  }
953
956
  } catch {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.24",
3
+ "version": "0.1.25",
4
4
  "description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
5
5
  "bin": {
6
6
  "minions": "bin/minions.js"