feat(FN-940): allow terminated agents to restart as active or running
- Remove blanket block on terminated→any state transitions in agent-store - Add active and running as valid transitions from terminated state in types - Update tests to verify terminated→active and terminated→running succeed - Add tests for invalid terminated transitions (idle, paused) still throwing
This commit is contained in:
@@ -244,10 +244,6 @@ export class AgentStore extends EventEmitter {
|
||||
return agent; // No change needed
|
||||
}
|
||||
|
||||
if (currentState === "terminated") {
|
||||
throw new Error(`Cannot transition from terminated state to ${newState}`);
|
||||
}
|
||||
|
||||
const validTransitions = AGENT_VALID_TRANSITIONS[currentState];
|
||||
if (!validTransitions.includes(newState)) {
|
||||
throw new Error(
|
||||
|
||||
Reference in New Issue
Block a user