@yemi33/minions 0.1.1927 → 0.1.1928

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/engine.js CHANGED
@@ -823,7 +823,9 @@ async function spawnAgent(dispatchItem, config) {
823
823
  shared.assertWorktreeOutsideProject(worktreePath, rootDir);
824
824
 
825
825
  // If branch is already checked out in an existing worktree, reuse it
826
+ _phaseT.findExistingStart = Date.now();
826
827
  const existingWt = await findExistingWorktree(rootDir, branchName);
828
+ _phaseT.findExistingEnd = Date.now();
827
829
  if (existingWt) {
828
830
  // Same guard for reuse — a previously-created bad worktree must not
829
831
  // be silently reused either; the cleanup sweep flags these so the
@@ -834,13 +836,16 @@ async function spawnAgent(dispatchItem, config) {
834
836
  // Probe origin first — locally-created branches that were never pushed
835
837
  // (orphan/timeout retry before first push) would otherwise emit a
836
838
  // "couldn't find remote ref" warn pair on every reuse.
839
+ _phaseT.reuseSyncStart = Date.now();
837
840
  await syncReusedWorktree(rootDir, existingWt, branchName, _gitOpts);
841
+ _phaseT.reuseSyncEnd = Date.now();
838
842
  } else if (READ_ONLY_ROOT_TASK_TYPES.has(type) && !isPipelineBranchName(branchName)) {
839
843
  // Read-only tasks — no worktree needed, run in rootDir
840
844
  log('info', `${type}: read-only task, no worktree needed — running in rootDir`);
841
845
  branchName = null;
842
846
  worktreePath = null;
843
847
  } else {
848
+ _phaseT.createWorktreeStart = Date.now();
844
849
  try {
845
850
  if (!fs.existsSync(worktreePath)) {
846
851
  const isSharedBranch = meta?.branchStrategy === 'shared-branch' || meta?.useExistingBranch;
@@ -965,6 +970,7 @@ async function spawnAgent(dispatchItem, config) {
965
970
  return null;
966
971
  }
967
972
  }
973
+ _phaseT.createWorktreeEnd = Date.now();
968
974
  }
969
975
 
970
976
  // Shared-branch preflight (#2439): refuse to dispatch into a dirty shared
@@ -974,7 +980,9 @@ async function spawnAgent(dispatchItem, config) {
974
980
  // fires AFTER spawn — converting orchestration hygiene into fake
975
981
  // implementation failures and cascading dependent items.
976
982
  if (worktreePath && fs.existsSync(worktreePath) && meta?.branchStrategy === 'shared-branch' && branchName) {
983
+ _phaseT.cleanCheckStart = Date.now();
977
984
  const cleanResult = await assertCleanSharedWorktree(rootDir, worktreePath, branchName, id, _gitOpts);
985
+ _phaseT.cleanCheckEnd = Date.now();
978
986
  if (!cleanResult.clean) {
979
987
  const previewFiles = (cleanResult.dirtyFiles || []).slice(0, 5).join(', ');
980
988
  const reasonMsg = `DIRTY_WORKTREE: shared branch ${branchName} worktree at ${worktreePath} is dirty (${cleanResult.reason}); ${cleanResult.dirtyFiles?.length || 0} file(s)${previewFiles ? ': ' + previewFiles : ''}`;
@@ -1281,6 +1289,7 @@ async function spawnAgent(dispatchItem, config) {
1281
1289
  // Inject dirty file list when worktree has uncommitted changes (e.g., max_turns retry)
1282
1290
  // This signals to the respawned agent that prior work exists in the worktree (#960)
1283
1291
  if (worktreePath && fs.existsSync(worktreePath)) {
1292
+ _phaseT.dirtyProbeStart = Date.now();
1284
1293
  try {
1285
1294
  const dirtyResult = await execAsync('git status --porcelain', { ..._gitOpts, cwd: worktreePath, timeout: 10000 });
1286
1295
  const dirtyOutput = (dirtyResult.stdout || '').trim();
@@ -1298,6 +1307,7 @@ async function spawnAgent(dispatchItem, config) {
1298
1307
  log('info', `Injected ${dirtyFiles.length} dirty files into prompt for ${id}`);
1299
1308
  }
1300
1309
  } catch (e) { log('warn', `git status --porcelain for dirty files: ${e.message}`); }
1310
+ _phaseT.dirtyProbeEnd = Date.now();
1301
1311
  }
1302
1312
 
1303
1313
  // Safety check: warn if a write-capable task is running in the main repo without a worktree
@@ -1504,6 +1514,11 @@ async function spawnAgent(dispatchItem, config) {
1504
1514
  const timings = {
1505
1515
  prompt: _diff('start', 'afterPrompt'),
1506
1516
  worktree_total: _diff('afterPrompt', 'afterWorktree'),
1517
+ wt_find_existing: _diff('findExistingStart', 'findExistingEnd'),
1518
+ wt_reuse_sync: _diff('reuseSyncStart', 'reuseSyncEnd'),
1519
+ wt_create: _diff('createWorktreeStart', 'createWorktreeEnd'),
1520
+ wt_clean_check: _diff('cleanCheckStart', 'cleanCheckEnd'),
1521
+ wt_dirty_probe: _diff('dirtyProbeStart', 'dirtyProbeEnd'),
1507
1522
  dep_fetch: _diff('depFetchStart', 'depFetchEnd'),
1508
1523
  dep_preflight: _diff('depPreflightStart', 'depPreflightEnd'),
1509
1524
  dep_merge: _diff('depMergeStart', 'depMergeEnd'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.1927",
3
+ "version": "0.1.1928",
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"
@@ -1,5 +0,0 @@
1
- {
2
- "runtime": "copilot",
3
- "models": null,
4
- "cachedAt": "2026-05-14T02:06:41.197Z"
5
- }