UNPKG

@vigilbase/cli

Version:

Vigilbase CLI — security scanners, agent tools, and Vigilbase One from the terminal.

72 lines (71 loc) • 2.28 kB
export type AgentToolDefinition = { toolName: string; name: string; description: string; targetDescription: string; uiUrl: string; skillUrl: string; executeUrl: string; }; /** Codes vigilbase.com sends in its agent API errors (apps/com/lib/agent/api-error.ts). */ export declare const AGENT_API_ERROR_CODES: readonly ["bad_request", "unauthorized", "forbidden", "not_found", "conflict", "gone", "length_required", "payload_too_large", "unsupported_media_type", "rate_limit_exceeded", "unprocessable_entity", "internal_error", "service_unavailable"]; export type AgentApiErrorCode = (typeof AGENT_API_ERROR_CODES)[number]; export type AgentApiError = { code: AgentApiErrorCode; message: string; hint?: string; }; /** vigilbase.com agent API error envelope, sent as application/problem+json. */ export type AgentApiErrorResponse = { success: false; error: AgentApiError; type: string; title: string; status: number; detail: string; code: AgentApiErrorCode; toolsUrl?: string; skillsIndex?: string; retryAfterSec?: number; docsUrl?: string; }; export type AgentToolsCatalogResponse = { success: boolean; description?: string; openapi?: string; skillsIndex?: string; tools: AgentToolDefinition[]; rateLimit?: { windowSeconds: number; maxRequests: number; scope: string; }; error?: AgentApiError; }; export type AgentToolExecuteResponse = { success: boolean; toolName?: string; target?: string; grade?: string | null; gradeScore?: number | null; result?: Record<string, unknown> | null; /** vigilbase.com sends an error object; results adapted from One carry a string. */ error?: AgentApiError | string | null; uiUrl?: string; skillUrl?: string; /** A One scan the scanner could not assess: One's status and code, and the run it recorded. */ status?: number; code?: string; toolRunId?: string; retryAfterSec?: number; toolsUrl?: string; skillsIndex?: string; }; export type CliOutputMode = 'text' | 'json'; export type ExitCode = 0 | 1 | 2; /** Exit codes used by the CLI. Documented for agents. */ export declare const EXIT: { OK: 0; ERROR: 1; RATE_LIMITED: 2; };