@afokapu/atdd-flow 0.3.1 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afokapu/atdd-flow",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Filesystem-first Desk registry for projects, seats, tasks, threads, and handoffs.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.ts CHANGED
@@ -19,7 +19,7 @@ Usage:
19
19
  atdd-flow desk migrate
20
20
  atdd-flow project init <project>
21
21
  atdd-flow spawn <project> <role> <name> [--worktree <path>] [--branch <branch>] [--agent <legacy-executable>]
22
- atdd-flow bind <address> [--application <application>] --address <native-address> [--agent <executable>] [--wake host|native]
22
+ atdd-flow bind <address> [--application <application>] --address <native-address> [--agent <executable>] [--worktree <path>] [--wake host|native]
23
23
  atdd-flow attach <address> [--application <application>] [--wake host|native]
24
24
  atdd-flow pi extension-path
25
25
  atdd-flow launch <address> --application <application> --placement <native-container-address>
package/src/seats.ts CHANGED
@@ -99,6 +99,7 @@ export async function bind(root: string, address: string, args: string[], select
99
99
  const config = await desk(root);
100
100
  const application = words(args, "--application") ?? config.application;
101
101
  const requestedAgent = words(args, "--agent");
102
+ const requestedWorktree = words(args, "--worktree");
102
103
  const requestedWake = words(args, "--wake");
103
104
  if (requestedWake && requestedWake !== "host" && requestedWake !== "native") throw new Error("Wake must be host or native.");
104
105
  const selectedWake = wake ?? requestedWake as Runtime["wake"] | undefined;
@@ -116,6 +117,11 @@ export async function bind(root: string, address: string, args: string[], select
116
117
  // Legacy Desks use this field as the executable chosen by a later `launch`.
117
118
  // Keep it aligned when an existing seat is deliberately re-homed to Pi.
118
119
  if (requestedAgent) record.agent = requestedAgent;
120
+ if (requestedWorktree) {
121
+ const worktree = resolve(requestedWorktree);
122
+ if (!existsSync(worktree)) throw new Error(`Worktree does not exist: ${worktree}`);
123
+ record.worktree = worktree;
124
+ }
119
125
  await atomicYaml(paths(root).seatFile(resolved), record);
120
126
  console.log(`Bound ${resolved} to ${application}:${nativeAddress}`);
121
127
  }