@afokapu/atdd-flow 0.3.0 → 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.0",
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> [--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
@@ -98,6 +98,8 @@ export async function bind(root: string, address: string, args: string[], select
98
98
  const record = await seat(root, resolved);
99
99
  const config = await desk(root);
100
100
  const application = words(args, "--application") ?? config.application;
101
+ const requestedAgent = words(args, "--agent");
102
+ const requestedWorktree = words(args, "--worktree");
101
103
  const requestedWake = words(args, "--wake");
102
104
  if (requestedWake && requestedWake !== "host" && requestedWake !== "native") throw new Error("Wake must be host or native.");
103
105
  const selectedWake = wake ?? requestedWake as Runtime["wake"] | undefined;
@@ -112,6 +114,14 @@ export async function bind(root: string, address: string, args: string[], select
112
114
  ...(selectedModel ? { model: selectedModel } : {}),
113
115
  ...(selectedWake ? { wake: selectedWake } : {}),
114
116
  };
117
+ // Legacy Desks use this field as the executable chosen by a later `launch`.
118
+ // Keep it aligned when an existing seat is deliberately re-homed to Pi.
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
+ }
115
125
  await atomicYaml(paths(root).seatFile(resolved), record);
116
126
  console.log(`Bound ${resolved} to ${application}:${nativeAddress}`);
117
127
  }