fix wrong herdr response parse + add labels and branch names to delegations
CI / verify (pull_request) Failing after 8s

This commit is contained in:
2026-09-17 21:32:26 +02:00
parent 5cf0beb74b
commit 9494936160
9 changed files with 291 additions and 38 deletions
+16 -5
View File
@@ -28,7 +28,11 @@ const inputSchema = z
sessionID: z.string().optional(),
background: z.boolean().optional(),
worktree: z
.object({ base: z.string().trim().min(1) })
.object({
base: z.string().trim().min(1),
branch: z.string().trim().min(1).optional(),
label: z.string().trim().min(1).optional(),
})
.strict()
.optional(),
})
@@ -180,7 +184,7 @@ export const installMultiWork = (
agent: { type: "string", enum: ["fast-lo", "coordinate"] },
};
tool.description =
"Delegate to fast-lo locally, or coordinate in a new Herdr worktree using worktree: {base}. Continue an owned coordinate child with sessionID and no worktree argument. Native background and results apply.";
"Delegate to fast-lo locally, or coordinate in a new Herdr worktree using worktree: {base, branch?, label?}. Prefer descriptive human-readable branch and label values, for example {base:'main',branch:'fix/login-timeout',label:'Fix login timeout'}. Continue an owned coordinate child with sessionID and no worktree argument; naming fields are create-only. Native background and results apply.";
}
}).pipe(Effect.orDie),
);
@@ -275,7 +279,7 @@ export const installMultiWork = (
herdr.verify(
binding.directory,
binding.workspaceID,
binding.root.repo,
binding.root,
binding.branch,
signal,
),
@@ -319,7 +323,8 @@ export const installMultiWork = (
throw new Error(
"Native executor returned an unexpected child",
);
const branch = `multi-work/${randomUUID()}`;
const branch =
worktree.branch ?? `multi-work/${randomUUID()}`;
yield* context.storage.set(callKey, {
child: id,
branch,
@@ -327,7 +332,13 @@ export const installMultiWork = (
});
yield* call.progress({ ...metadata, branch });
const destination = yield* Effect.tryPromise((signal) =>
herdr.create(root, worktree.base, branch, signal),
herdr.create(
root,
worktree.base,
branch,
signal,
worktree.label,
),
);
const binding = {
owner: call.sessionID,