feat(cli)!: default the scan target and add a JSON error contract

List local scans, resolve the active or most recent workspace automatically, and make logs, status, and stop use one canonical scan identity.

Add stable machine-readable failures, richer status output, explicit help errors, and seven-day Temporal retention. Treat absent Temporal pending-activity failures as absent whether the decoder represents them as `null` or missing.

BREAKING CHANGE: `status --json` now returns a fixed `failureMessage`. Read `partialReasons`, `agenticSast`, and `workflow.log` for diagnostic detail.
This commit is contained in:
ajmallesh
2026-08-26 20:00:11 -07:00
parent 3bdcfac85d
commit 242f85f158
13 changed files with 651 additions and 146 deletions
+5
View File
@@ -70,6 +70,11 @@ function agentState(name: string, state: PipelineState | null, running: Set<stri
return resolved ? 'skipped' : 'pending';
}
/**
* Only `failed`'s presence is used here, never its `.error` text: that string is the
* worker's raw error for the failed class, not vetted for display, so it is reduced to
* a boolean before reaching safeFailureDetail's fixed sentence.
*/
function agentError(name: string, state: PipelineState | null, byAgent: Map<string, RunningAgent>): string | undefined {
const failed = state?.failedPipelines.find((f) => f.vulnType === agentClass(name));
return (