// `support` agent — DESCRIPTOR (browser-safe).
//
// `defineAgent` from `@voltro/ai/agent` declares ONLY the wire contract:
// the agent's `name` and `input` schema. This file is value-imported into
// `rpcGroup.generated.ts`, so it must stay browser-safe — it imports
// nothing server-only (no `@voltro/ai` main entry, no database, no tools).
//
// The framework SYNTHESIZES two routes from this descriptor:
//   - `support.send`     — an action: appends the user turn + streams the
//                          assistant turn (delta-persisted to agent_messages).
//   - `support.messages` — a reactive query over agent_messages: streams the
//                          turns (incl. the live streaming row) to the client.
//
// Behaviour (system prompt, tools, model + key, maxSteps) lives in the
// paired server executor: `support.agent.server.tsx`.

import { defineAgent } from '@voltro/ai/agent'
import { Schema } from 'effect'

export const support = defineAgent({
  name:  'support',
  input: Schema.Struct({
    prompt: Schema.String,
    // Optional locale to steer the system prompt's reply language.
    locale: Schema.optional(Schema.String),
  }),
})
