Fix QA validation issues and add M7.1 security fixes (#318)

Co-authored-by: Jason Woltje <[email protected]>
Co-committed-by: Jason Woltje <[email protected]>
This commit is contained in:
2026-02-04 03:08:09 +00:00
committed by jason.woltje
parent 482507ce4d
commit a1973e6419
178 changed files with 4902 additions and 74 deletions
@@ -0,0 +1,49 @@
/**
* Command Processing Errors
*
* Custom error classes for expected business logic errors in command processing.
* These errors should be caught and returned as error responses.
* All other errors (system errors like OOM, DB failures) should propagate.
*/
/**
* Base class for command processing errors that should be caught
* and converted to error responses
*/
export class CommandProcessingError extends Error {
constructor(message: string) {
super(message);
this.name = "CommandProcessingError";
Error.captureStackTrace(this, this.constructor);
}
}
/**
* Error thrown when an unknown or unsupported command type is received
*/
export class UnknownCommandTypeError extends CommandProcessingError {
constructor(commandType: string) {
super(`Unknown command type: ${commandType}`);
this.name = "UnknownCommandTypeError";
}
}
/**
* Error thrown when command payload validation fails
*/
export class InvalidCommandPayloadError extends CommandProcessingError {
constructor(message: string) {
super(message);
this.name = "InvalidCommandPayloadError";
}
}
/**
* Error thrown when agent command execution fails due to business logic
*/
export class AgentCommandError extends CommandProcessingError {
constructor(message: string) {
super(message);
this.name = "AgentCommandError";
}
}