## DSL proxym — mapping of natural language phrases to API calls.
#
# This file is the default bundled DSL. Users can override it by placing
# a copy at ~/.config/proxym/dsl.yaml.

version: "1.0"

# ─── QUERY: read-only queries ────────────────────────────
queries:
  status:
    patterns:
      - "status"
      - "jak idzie"
      - "co działa"
      - "pokaż stan"
      - "show status"
    action: "GET /dashboard/system"
    format: table

  vms:
    patterns:
      - "pokaż VM-y"
      - "lista maszyn"
      - "które VM-y działają"
      - "vm list"
      - "list vms"
      - "show vms"
    action: "GET /dashboard/vms"
    format: table
    columns: [vm_id, tool, state, project, account]

  costs:
    patterns:
      - "ile wydałem"
      - "koszty"
      - "podsumowanie budżetu"
      - "costs"
      - "show costs"
      - "budget"
    action: "GET /dashboard/costs"
    format: chart

  logs:
    patterns:
      - "logi"
      - "błędy"
      - "ostatnie zdarzenia"
      - "co się stało"
      - "logs"
      - "show logs"
      - "errors"
    action: "GET /dashboard/logs?lines=50"
    format: text

  models:
    patterns:
      - "jakie modele"
      - "dostępne modele"
      - "models"
      - "list models"
    action: "GET /v1/models"
    format: table

# ─── COMMANDS: write actions ─────────────────────────────
commands:
  vm_create:
    patterns:
      - "stwórz VM {tool} dla {project}"
      - "nowa maszyna {tool} projekt {project}"
      - "utwórz {tool} dla {project}"
      - "create vm {tool} for {project}"
      - "create {tool} for {project}"
    action: "POST /dashboard/vms"
    params_from_pattern: [tool, project]
    defaults:
      account: cheapest_active

  vm_start:
    patterns:
      - "uruchom {vm_id}"
      - "start {vm_id}"
      - "włącz {vm_id}"
    action: "POST /dashboard/vms/{vm_id}/start"

  vm_stop:
    patterns:
      - "zatrzymaj {vm_id}"
      - "stop {vm_id}"
      - "wyłącz {vm_id}"
    action: "POST /dashboard/vms/{vm_id}/stop"

  vm_snapshot:
    patterns:
      - "snapshot {vm_id}"
      - "zapisz stan {vm_id}"
      - "snapshot {vm_id} jako {name}"
      - "snapshot {vm_id} as {name}"
    action: "POST /dashboard/vms/{vm_id}/snapshot"
    params_from_pattern: [vm_id, name]
    defaults:
      name: "auto-{timestamp}"

  switch_project:
    patterns:
      - "przełącz {vm_id} na {project}"
      - "zmień projekt {vm_id} na {project}"
      - "switch {vm_id} to {project}"
    action: "POST /dashboard/vms/{vm_id}/switch-project"
    params_from_pattern: [vm_id, project]

  add_account:
    patterns:
      - "dodaj konto {provider} klucz {key}"
      - "nowe konto {provider}"
      - "add account {provider} key {key}"
    action: "POST /dashboard/accounts"

# ─── SCHEMA: data types ─────────────────────────────────
schema:
  VMId:
    type: string
    pattern: "^[a-z0-9-]+$"
    examples: ["windsurf-work", "cursor-oss", "vscode-beta"]

  Tool:
    type: enum
    values: [windsurf, cursor, vscode, roocode]

  Provider:
    type: enum
    values: [anthropic, openrouter, openai, google, deepseek]

  Project:
    type: string
    description: "Directory name in ~/github/"
