@markjaquith/agency 2.47.2 → 2.47.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markjaquith/agency",
3
- "version": "2.47.2",
3
+ "version": "2.47.3",
4
4
  "description": "Manage agentic work across repositories with durable workbases",
5
5
  "keywords": [
6
6
  "agents",
@@ -46,11 +46,15 @@ describe("withWorktreeLocks", () => {
46
46
  )
47
47
  release()
48
48
  await held
49
+ const lockPath = join(
50
+ root,
51
+ `.agency-worktree-${Buffer.from("alpha:task").toString("hex")}.lock`,
52
+ )
49
53
  expect(conflict).toMatchObject({
50
54
  _tag: "Left",
51
55
  left: {
52
56
  _tag: "WorktreeLockError",
53
- message: "Another worktree operation is in progress for 'alpha'",
57
+ message: `Another worktree operation is in progress for 'alpha'. If no operation is active, remove the stale sentinel with: rm '${lockPath}'`,
54
58
  },
55
59
  })
56
60
  })
@@ -21,12 +21,13 @@ const withWorktreeLock = <A, E, R>(
21
21
  `${target.taskId}:${target.phaseId ?? "task"}`,
22
22
  ).toString("hex")
23
23
  const lockPath = join(root, `.agency-worktree-${key}.lock`)
24
+ const removalCommand = `rm '${lockPath.replaceAll("'", `'\\''`)}'`
24
25
  return Effect.acquireUseRelease(
25
26
  Effect.tryPromise({
26
27
  try: () => open(lockPath, "wx"),
27
28
  catch: (cause) =>
28
29
  new WorktreeLockError({
29
- message: `Another worktree operation is in progress for '${target.taskId}${target.phaseId ? `/${target.phaseId}` : ""}'`,
30
+ message: `Another worktree operation is in progress for '${target.taskId}${target.phaseId ? `/${target.phaseId}` : ""}'. If no operation is active, remove the stale sentinel with: ${removalCommand}`,
30
31
  cause,
31
32
  }),
32
33
  }),