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.
This commit is contained in:
committed by
GitHub
parent
82c039117a
commit
bb45164ae8
@@ -137,6 +137,10 @@ export const dict = {
|
||||
'sessions.scheduledTasks.editor.prompt.placeholder': 'Résumer les tâches ouvertes et proposer les prochaines actions',
|
||||
'sessions.scheduledTasks.editor.enabled.aria': 'Activer la tâche',
|
||||
'sessions.scheduledTasks.editor.enabled.label': 'Activé',
|
||||
'sessions.scheduledTasks.editor.goal.label': 'Exécuter comme objectif',
|
||||
'sessions.scheduledTasks.editor.goal.aria': 'Exécuter cette tâche comme un objectif que l\'agent poursuit jusqu\'au bout',
|
||||
'sessions.scheduledTasks.editor.goal.budgetLabel': 'Budget de tokens',
|
||||
'sessions.scheduledTasks.editor.goal.budgetAria': 'Limiter l’objectif à un budget de tokens',
|
||||
'sessions.scheduledTasks.editor.actions.closeAria': 'Fermer',
|
||||
'sessions.scheduledTasks.editor.actions.cancel': 'Annuler',
|
||||
'sessions.scheduledTasks.editor.actions.save': 'Sauvegarder',
|
||||
@@ -1232,6 +1236,39 @@ export const dict = {
|
||||
'header.actions.terminalPanelWithShortcut': 'Panneau à bornes ({shortcut})',
|
||||
'chat.recap.aria': 'Récapitulatif de la session',
|
||||
'chat.recap.label': 'Récap :',
|
||||
'chat.goal.dialog.titleCreate': 'Définir un objectif de session',
|
||||
'chat.goal.dialog.titleManage': 'Objectif de session',
|
||||
'chat.goal.dialog.objectiveLabel': 'Objectif',
|
||||
'chat.goal.dialog.objectivePlaceholder': 'Décrivez l\'état final que l\'agent doit atteindre et vérifier…',
|
||||
'chat.goal.dialog.budgetLabel': 'Budget de tokens',
|
||||
'chat.goal.status.active': 'Actif',
|
||||
'chat.goal.status.evaluating': 'Évaluation…',
|
||||
'chat.goal.status.paused': 'En pause',
|
||||
'chat.goal.status.blocked': 'Bloqué',
|
||||
'chat.goal.status.budgetLimited': 'Budget atteint',
|
||||
'chat.goal.status.complete': 'Terminé',
|
||||
'chat.goal.usage.tokens': '{used} tokens',
|
||||
'chat.goal.usage.tokensWithBudget': '{used}/{budget} tokens',
|
||||
'chat.goal.usage.turns': '{turns} continuations',
|
||||
'chat.goal.action.pause': 'Mettre en pause',
|
||||
'chat.goal.action.resume': 'Reprendre',
|
||||
'chat.goal.action.markComplete': 'Marquer comme terminé',
|
||||
'chat.goal.action.clear': 'Supprimer l\'objectif',
|
||||
'chat.goal.action.cancel': 'Annuler',
|
||||
'chat.goal.action.save': 'Enregistrer l\'objectif',
|
||||
'chat.goal.action.start': 'Lancer l\'objectif',
|
||||
'chat.goal.toast.actionFailed': 'Échec de la mise à jour de l\'objectif',
|
||||
'chat.goal.row.aria': 'Objectif de session — ouvrir les détails',
|
||||
'chat.goal.button.createAria': 'Définir un objectif de session',
|
||||
'chat.goal.button.manageAria': 'Gérer l\'objectif de session',
|
||||
'chat.goal.button.armAria': 'Démarrer un objectif avec le prochain message',
|
||||
"chat.goal.counter.aria": "Limite de longueur de l'objectif",
|
||||
'chat.goal.button.disarmAria': 'Objectif armé — touchez pour désarmer',
|
||||
'chat.goal.button.cancelAria': 'Objectif en cours — touchez pour l’annuler',
|
||||
'chat.goal.cancelDialog.title': 'Annuler cet objectif ?',
|
||||
'chat.goal.cancelDialog.description': 'L\'agent cessera de travailler automatiquement vers cet objectif.',
|
||||
'chat.goal.cancelDialog.keep': 'Garder l\'objectif',
|
||||
'chat.goal.cancelDialog.confirm': 'Annuler l\'objectif',
|
||||
'chat.suggestion.applyAria': 'Utiliser le message suggéré',
|
||||
'chat.suggestion.dismissAria': 'Ignorer la suggestion',
|
||||
'header.actions.toggleTerminalPanelAria': 'Basculer le panneau à bornes',
|
||||
|
||||
Reference in New Issue
Block a user