2 months ago
c989f4d* feat: add skill improvement beta Add headless skill improvement scheduling, backups, JSON-RPC controls, and desktop settings UI. Wire skill usage capture after completed turns and cover persistence/config defaults plus restore flows. * fix(skill-improvement): harden runs, backups, scheduling, and live config - Roll back failed runs from a per-run snapshot instead of the first-ever original, preserving prior improvements and manual edits - Drive the changed signal from a write/edit dirty flag so reference-only edits refresh live skill catalogs and validate correctly - Make the whole run path exception-safe: crashes roll back, record a failed history entry, release the lock, and never leave a stuck retry loop - Detect and break stale locks from crashed processes (pid + age); keep scheduler reschedules silent so busy hours cannot flood run history - Gate restore behind the run queue + lock, verify backups exist before deleting live skills, reuse delete-shadow backups when re-improving a shadowed built-in, and clean up backup artifacts after restore - Preserve corrupt state.json as .corrupt and rebuild the backup registry from per-backup sidecar metadata; lock state writes across processes - Key project-scope jobs per workspace, resolve targets against the workspace the usage came from (preferring the exact SKILL.md path used), and keep evidence recorded during in-flight runs queued for the next window - Reload effective config from disk per operation so settings applied through workspace control sessions take effect without a server restart - Drain all queued jobs on run-now, refuse evidence-free named runs, dedupe transcripts per turn with per-job caps, include plugin/marketplace skills in the all-skills scope, and push status to clients after background runs - Harden the improver sandbox (symlink escape checks, write caps) and the prompt (untrusted transcripts, trigger-tuning guidance) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(desktop): reversible skill exclusions and honest improvement status UI - Keep excluded skills listed (unchecked) in the improvement checklist so exclusion is reversible instead of a one-way door - Show the restore-backups row whenever backups exist, even with the feature toggled off - Report the actual run outcome (completed/skipped/failed) in the run notification instead of assuming success, and surface restore error details - Render failed history entries with the destructive badge variant Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs: detail skill improvement run/restore semantics and status push Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(desktop): keep pending action keys and out-of-scope exclusions stable - Run/restore actions now own their pending keys end to end; status events (including background scheduler broadcasts) no longer wipe keys for requests still in flight - The improvement checklist keeps excluded skills visible even when the current scope no longer covers them, so exclusions stay reversible Addresses both Cursor Bugbot findings on the PR. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(skill-improvement): unique pending-job keys and accurate empty-run toast - Expose the queue key on pending-job summaries (project-scope jobs from different workspaces can share a skillName) and key the desktop list by it - Use a neutral toast title when a manual run had nothing due instead of claiming completion Addresses the second Cursor Bugbot pass; the session_config model-field finding is intentional behavior (absence propagates a cleared override, matching memoryGenerationModel). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(desktop): attribute run toasts only to history the request produced Snapshot known history entry ids before the run RPC and derive the toast from entries added by the response, so a background run finishing just before the click can no longer be mislabeled as the manual action. Without a prior snapshot, fall back to entries finished after the request started. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Parent64133a5