"use strict";
// =============================================================================
// Pure Agent - Type Definitions
// Ported from Hermes agent (run_agent.py, agent/conversation_loop.py, etc.)
// =============================================================================
Object.defineProperty(exports, "__esModule", { value: true });
exports.READONLY_TOOLS = exports.TOOL_PERMISSIONS = exports.ToolPermission = exports.FailoverReason = void 0;
// ---------------------------------------------------------------------------
// Error classification (ported from Hermes error_classifier.py)
// ---------------------------------------------------------------------------
var FailoverReason;
(function (FailoverReason) {
    FailoverReason["rate_limit"] = "rate_limit";
    FailoverReason["billing"] = "billing";
    FailoverReason["context_overflow"] = "context_overflow";
    FailoverReason["payload_too_large"] = "payload_too_large";
    FailoverReason["overloaded"] = "overloaded";
    FailoverReason["content_policy_blocked"] = "content_policy_blocked";
    FailoverReason["auth_error"] = "auth_error";
    FailoverReason["invalid_request"] = "invalid_request";
    FailoverReason["stream_timeout"] = "stream_timeout";
    FailoverReason["stream_stale"] = "stream_stale";
    FailoverReason["unknown"] = "unknown";
})(FailoverReason || (exports.FailoverReason = FailoverReason = {}));
// ---------------------------------------------------------------------------
// Tool permission level
// ---------------------------------------------------------------------------
var ToolPermission;
(function (ToolPermission) {
    /** Read-only, auto-approve */
    ToolPermission[ToolPermission["READONLY"] = 1] = "READONLY";
    /** Write operations */
    ToolPermission[ToolPermission["WRITE"] = 2] = "WRITE";
    /** Dangerous, requires user confirmation */
    ToolPermission[ToolPermission["DANGEROUS"] = 3] = "DANGEROUS";
})(ToolPermission || (exports.ToolPermission = ToolPermission = {}));
// Tool name -> permission level mapping
exports.TOOL_PERMISSIONS = {
    read_file: ToolPermission.READONLY,
    search_files: ToolPermission.READONLY,
    write_file: ToolPermission.WRITE,
    patch: ToolPermission.WRITE,
    terminal: ToolPermission.DANGEROUS,
};
// Tools that are read-only (can be parallelized)
exports.READONLY_TOOLS = new Set(['read_file', 'search_files']);
//# sourceMappingURL=types.js.map