Files
openchamber/packages/docs/content/docs/es/scheduled-tasks.mdx
T
Bohdan Triapitsyn bb45164ae8 feat: session goals - server-driven goal loop with independent small-model audit (#2148)
Arm the target button in the composer and the next prompt becomes a goal:
the server keeps the session working toward it (idle tick -> small-model
audit -> continuation) until the objective is verifiably complete, blocked,
or out of budget — even with the UI closed.

Server (packages/web/server/lib/session-goal):
- event-driven loop on the global SSE hub; goal state lives in
  session.metadata.openchamber.goal (merge-safe patches, stale-write guard
  by goal id), so it survives restarts and syncs to every client for free
- the small-model audit (objective + last assistant turn only, language
  pinned to the objective) is the sole termination authority; blocked needs
  3 consecutive verdicts, audit outages tolerate one unaudited continuation
  then stop the goal as resumable-blocked
- hard stops: optional token budget, auto-continuation cap (Resume grants a
  fresh allowance), turn errors; user abort pauses the goal instead of
  blocking it, and resuming over an aborted tail nudges immediately
- token accounting as a snapshot of the latest turn (input + cache.read +
  output), goal-relative via a creation baseline and segmented across
  compactions; a compaction summary skips the audit and continues
- continuations reuse the session's own provider/model/agent/variant

UI:
- three-mode target button (arm / disarm / manage dialog), informational
  goal strip with inline pause/resume and an Evaluating indicator, sidebar
  state glyph, objective length counter (2000-char server clamp),
  read-only completed goals
- goal entry points: composer (sessions and drafts), start-new-session-
  from-answer dialog, plan implement dialog (plan content becomes the
  objective), scheduled tasks (Run as goal + budget)
- Settings -> Chat -> Goal: feature toggle + default token budget with
  three-layer parity (web server, client persistence, VS Code bridge);
  VS Code renders goal state but hides the entry points (the loop runs in
  the web server only)

Notifications: per-turn "ready" notifications are suppressed while a goal
is active; settling sends one final notification (desktop, web-push, APNs
generic titles with the session name as body) honoring the completion
toggle. Error/question/permission notifications are untouched.

Docs: user guide (session-goals) in all 9 locales + sidebar entry,
scheduled-tasks cross-reference, server module DOCUMENTATION.md.
2026-07-12 01:23:22 +03:00

36 lines
1.8 KiB
Plaintext

---
title: Tareas programadas
description: Ejecuta un prompt automáticamente según una programación.
---
# Tareas programadas
Una tarea programada ejecuta un prompt por ti según una programación; por ejemplo, un "resume los cambios de ayer" diario o una limpieza semanal. Cuando se ejecuta, OpenChamber inicia una sesión nueva y envía el prompt por su cuenta. Abre el programador desde el botón en la parte superior de la barra lateral de sesiones.
## Crea una tarea
1. Abre el diálogo de tareas programadas desde la barra lateral de sesiones.
2. Añade una tarea y dale un nombre.
3. Elige cuándo se ejecuta:
- **diaria** — a una o varias horas cada día
- **semanal** — en los días de la semana y horas elegidos
- **una vez** — una sola fecha y hora
4. Define qué hace: el prompt a enviar, y el proveedor, modelo y agente a usar. El prompt puede ser un comando de barra, como `/review`.
5. Guarda y asegúrate de que la tarea esté habilitada.
Puedes ejecutar cualquier tarea de inmediato con **run now** para comprobar que hace lo que esperas.
Marca **Ejecutar como objetivo** para que la ejecución persiga su prompt hasta completarlo en lugar de detenerse tras una respuesta — consulta [Objetivos de sesión](/session-goals/).
## Cómo se ve el éxito
Después de una ejecución, la tarea muestra cuándo se ejecutó por última vez, si tuvo éxito y un enlace a la sesión que creó. Si una ejecución falla, el error también se muestra ahí.
## Ten en cuenta
Las tareas solo se disparan mientras el servidor de OpenChamber está en funcionamiento. Si lo cierras, las ejecuciones programadas se pausan hasta que vuelva a estar activo.
## Relacionado
- [Comandos y fragmentos](/es/commands-snippets/) — reutiliza un comando de barra como prompt