fix(cli): validate agentId in fn_task_create/update and unblock bundle tests
fn_task_create and fn_task_update accepted any string as `agentId` and wrote it verbatim onto `task.assignedAgentId`, letting hallucinated IDs (e.g. `agent-executor-001`) appear as agent badges in the dashboard. Mirror the validation already used by fn_delegate: look the agent up via AgentStore and reject unknown or ephemeral/runtime-managed agents. Null still clears the field on update. Also clean up two stale failures in bundle-output.test that predated this change: - pi-claude-cli no longer imports cross-spawn, so drop the dependency and its orphan type-decl file. - Loosen the spawn-import regex to match `spawn` anywhere in the destructured import (the source has additional named imports). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
declare module "cross-spawn" {
|
||||
const spawn: typeof import("node:child_process").spawn & {
|
||||
sync: typeof import("node:child_process").spawnSync;
|
||||
};
|
||||
|
||||
export default spawn;
|
||||
}
|
||||
Reference in New Issue
Block a user