/**
 * SimpleAgent Template — Tier 1 (rule-based, no LLM debate).
 *
 * Promoted from forge/src/agents/shared/templates/simple-agent.ts (Vague 1.B.7).
 *
 * For agents that don't need LLM reasoning, Reflexion, or supervisor-worker:
 *   - Validator Monitor, KPI Dashboard, deadLetterAgent, Support Tier 1,
 *     Invoice & Facturation, Staking/Validator Monitor.
 *
 * Pattern: observe → orient (rules) → decide (threshold-based) → act → feedback.
 *
 * Differences from Forge template:
 * - AgentDependencies removed — uses AgentFactoryDeps (SDK-native)
 * - buildSkills / createForgeAgent replaced by createAgentFromConfig (SDK)
 * - Forge-specific couplings (slackWebhookUrl, litellmUrl in skill wiring) removed
 *
 * @public @since 0.20.0
 */
import { createAgentFromConfig } from "../factory/agent-factory.js";
// ─── Factory ──────────────────────────────────────────────────────────────────
/**
 * Create a Tier 1 (simple, rule-based) OODA agent.
 *
 * Boilerplate reduction vs. raw `createAgentFromConfig`:
 * - No `readOnly` flags to specify manually (observe + orient always readOnly)
 * - No phase `type` codes to remember
 * - Strongly-typed phase chain enforced by TypeScript
 *
 * @example
 * ```ts
 * const agent = await createSimpleAgent<Observation, Orientation, Feedback>(deps, {
 *   agentId: "kpi-monitor",
 *   intervalMs: 300_000,
 *   observe: async () => ({ cpu: 0.42, memory: 0.8 }),
 *   orient: async (obs) => ({ critical: obs.memory > 0.9 }),
 *   decide: async (orient) => ({
 *     actions: orient.critical ? [{ type: "alert", payload: {} }] : [],
 *     rationale: orient.critical ? "Memory critical" : "All good",
 *   }),
 *   act: async (decision) => ({
 *     executed: decision.actions.map((a) => ({ type: a.type, success: true, details: "" })),
 *   }),
 *   feedback: async (result) => ({ actionsExecuted: result.executed.length }),
 * });
 * await agent.start();
 * ```
 *
 * @public
 */
export async function createSimpleAgent(deps, opts) {
    return createAgentFromConfig(deps, {
        agentId: opts.agentId,
        agentVersion: opts.agentVersion ?? "0.1.0",
        intervalMs: opts.intervalMs,
        sessionGuards: opts.sessionGuards,
        riskGuards: opts.riskGuards,
        outcomeMapping: opts.outcomeMapping,
        phases: {
            observe: {
                type: "observation",
                readOnly: true,
                fn: opts.observe,
            },
            orient: {
                type: "retrieval",
                readOnly: true,
                fn: opts.orient,
            },
            decide: {
                type: "decision",
                fn: opts.decide,
            },
            act: {
                type: "execution",
                fn: opts.act,
            },
            feedback: {
                type: "feedback",
                fn: opts.feedback,
            },
        },
    });
}
//# sourceMappingURL=simple-agent.js.map