UNPKG

erosolar-cli

Version:

Unified AI agent framework for the command line - Multi-provider support with schema-driven tools, code intelligence, and transparent reasoning

56 lines 2.11 kB
/** * AlphaZero-style offensive security coordinator. * * Provides a lightweight Monte Carlo style scorer over an action tree so * runs can be started, resumed, and updated with outcomes (success/fail/detected). * The goal is to keep a "sensible" frontier of next actions, reward progress, * and persist state so a long red-team style engagement can be paused/resumed. */ export type OffsecOutcome = 'success' | 'fail' | 'detected'; export type OffsecActionCategory = 'recon' | 'web' | 'creds' | 'payload' | 'lateral' | 'privilege' | 'cloud'; export interface OffsecActionNode { id: string; label: string; category: OffsecActionCategory; command: string; rationale: string; prior: number; parentId: string | null; children: string[]; visits: number; valueSum: number; status: 'pending' | 'succeeded' | 'failed' | 'detected'; note?: string; } export interface OffsecRun { id: string; objective: string; scope: string[]; rootId: string; nodes: Record<string, OffsecActionNode>; createdAt: string; updatedAt: string; nextCounter: number; } export interface OffsecSuggestion { id: string; label: string; category: OffsecActionCategory; command: string; rationale: string; score: number; path: string[]; status: OffsecActionNode['status']; } export declare function startOffsecRun(objective: string, scope?: string[]): OffsecRun; export declare function resumeOffsecRun(runId?: string | null): OffsecRun | null; export declare function listOffsecRuns(): Array<{ id: string; objective: string; updatedAt: string; }>; export declare function recordOffsecOutcome(runId: string, actionId: string, outcome: OffsecOutcome, note?: string): OffsecRun | null; export declare function getOffsecNextActions(runId: string, count?: number): OffsecSuggestion[]; export declare function simulateOffsecRollout(runId: string, steps?: number): OffsecSuggestion[]; export declare function formatOffsecStatus(run: OffsecRun, next?: OffsecSuggestion[]): string; //# sourceMappingURL=offsecAlphaZero.d.ts.map