agent-zero/plugins/_time_travel/AGENTS.md
frdel 77f7aa0274 Time Travel workspace selector + LiteLLM globals
Add selectable workspace support to the Time Travel plugin and introduce normalized global LiteLLM configuration handling.

models.py: add DEFAULT_LITELLM_GLOBAL_KWARGS and helpers to normalize, load, apply, and merge LiteLLM global kwargs; call configure_litellm/set per-call merges in LiteLLM wrappers so framework defaults, configured globals, and per-call overrides combine correctly. Add tests to assert merging and runtime application.

plugins/_time_travel: update docs and plugin metadata to describe workdir/project selection. API handlers now accept workspace_id and a new history_workspaces endpoint lists selectable workspaces. helpers/time_travel: implement workspace listing, selection, and resolution logic (workdir/project options, availability/locking, default selection). UI: add workspace picker to time-travel panel, wire selection/load into time-travel store, pass workspace_id to API calls, and add click hook to open the panel. Update styles and refresh/load behavior accordingly.

Tests: extend tests for LiteLLM global kwargs merging and adapt stream test to expect merged params; add tests for selectable workspaces, default selection, and locked external workdir handling.
2026-06-09 17:16:41 +02:00

1.1 KiB

Time Travel Plugin DOX

Purpose

  • Own Agent Zero workspace history, diff inspection, travel, snapshots, and revert for selectable Agent Zero workdir/project workspaces under /a0/usr.

Ownership

  • helpers/time_travel.py owns history storage, diff, travel, snapshot, preview, and revert mechanics.
  • api/ owns selectable workspace list, history list, diff, preview, revert, snapshot, and travel endpoints.
  • webui/ owns the time-travel panel, workspace selector, store, main surface, and thumbnail.
  • plugin.yaml and extensions/ own metadata and hook contributions.

Local Contracts

  • Keep history operations scoped to Agent Zero-owned workdir/project workspaces.
  • Revert and travel operations must avoid unintended writes outside managed workspace paths.
  • Preserve enough metadata for clear preview and diff inspection before destructive actions.

Work Guidance

  • Coordinate API and UI changes so users can inspect effects before applying travel or revert operations.

Verification

  • Smoke-test workspace selection, snapshot, list, diff, preview, travel, and revert flows after changes.

Child DOX Index

No child DOX files.