8 Commits
Author SHA1 Message Date
esengine 0e03a900b5 docs: bring the contract documents up to the docs standard
Add owner headers to twelve contract and design documents, split their
over-wide paragraphs into rules, route their ownership to the primary
named in CODEOWNERS, and treat the generated protocol index as a
machine-read file. Baseline: doc-owner 40 -> 27, doc-prose 2276 -> 2147.
2026-09-29 09:40:04 -07:00
c020627 9a999f7b7b docs: port the retired-Wails wording cleanup to studio
Wails stopped being the desktop shell when the Electron shell landed, but
seven places on `studio` still describe it in the present tense. Six of them
were already fixed on `main-v2` by #10018; they only need the same edit
carried over here.

- `CHECKPOINTS`: the desktop rewind control calls `controller.Rewind` over the
  desktop host protocol, not the Wails binding.
- `TASK_CONTRACT`: the constraint keeps the desktop host JSON contract intact.
- `RECOVERY`: `doctor` inspects install problems without loading the desktop
  shell, and macOS keeps LaunchServices launching the desktop app bundle.
- `DESKTOP_CRASH_DIAGNOSTICS_RUNBOOK`: the budget is pre-shell work, and
  report/metric persistence runs after shell startup.
- `SESSION_MEMORY_RETRIEVAL`: the example project file no longer points at
  `desktop/frontend/wailsjs/`, which went away with the Wails shell. Studio
  commits its generated files under `internal/ext/extension/protocol/`.
- `REASONIX.md`: the frontends behind `control.Controller` are the chat TUI,
  HTTP/SSE serve and the Electron desktop.
- `issue-auto-label`: the classifier prompt no longer tells the model the
  desktop app is Wails.
2026-09-26 14:08:56 +08:00
yhh 2a62e704d3 refactor(sessionstore): a transcript's durable record leaves the agent
Session persistence moves from internal/runtime/agent to
internal/state/sessionstore: the Session type, its checkpoint and event
log, listing sidecars, branches, leases, recovery copies, migration, and
the compaction and subagent records saved beside a transcript. The agent
keeps the loop and imports the store; history, historycatalog, migration,
guardian, instanceid and sessiontool now reach the store instead of the
agent, which drops layer-order from 26 to 18.

Tests that exercise only store internals moved with it; the rest stay in
agent and qualify the moved names. DigestSessionMessages and
CompactionStateSchemaV1 are exported for the agent tests that build
legacy fixtures.

Baseline: carried with -allow-widen. The moved files bring their essay,
file-size, complexity and orphan debt unchanged under new paths, and
boot.go, acp/service.go, serve/serve.go, agent/task.go and
control/controller.go each gain the one import line the split costs.
2026-09-23 20:08:36 -07:00
SivanCola 98a1fb29a0 feat: add task contracts and stabilize credential path 2026-07-05 22:24:48 +08:00
SivanCola a9760911fc feat(tools): add workspace-confined move_file built-in (#4316)
Add a workspace-confined move_file(source_path, destination_path) built-in so
file moves/renames go through the Edit permission family instead of shell mv /
Move-Item, where prefix-scoped approvals would keep re-prompting. Both endpoints
are confined and permission-checked (deny > ask > allow across source and
destination); cross-device and case-only renames are handled.

Closes #4310
2026-06-14 20:08:28 +08:00
esengine ee44f4791c feat(checkpoint): summarize-from/up-to-here, completing the Claude Code menu (Phase 2)
Adds the last two rewind-menu actions, on both frontends, and hardens the
turn-boundary bookkeeping so a restructure can't corrupt it.

- agent: SummarizeFrom/SummarizeUpTo compress the messages after / before a turn
  into one summary, reusing the compaction summarizer. The split is always a turn
  boundary (a user message), so it never severs a tool_call/result pair.
- control: SummarizeFrom/SummarizeUpTo wrap them; the per-turn boundaries move
  from a slice to a monotonic counter + map (checkpoint.Store.NextTurn keeps
  numbering past disk), so clearing boundaries after a summarize can't collide
  with stored turns — conversation rewind/fork degrade to "unavailable" while
  code rewind stays intact.
- CLI rewind picker: "Summarize from here" / "up to here" (keys s/u), beside the
  restores and fork.
- Desktop: App.SummarizeFrom/UpTo + the two menu items, via the onRewind path.

Verified: go build + full test green; desktop go build + frontend tsc pass.
The full Claude Code rewind menu (code/conversation/both, fork, summarize
from/up-to) is now in on CLI + desktop.
2026-05-31 03:02:31 -07:00
esengine df3d4770b4 feat(checkpoint): CLI rewind picker — Esc-Esc / /rewind (Phase 1 complete)
Adds the terminal UI that drives Controller.Rewind, completing Phase 1.

- internal/cli/rewind.go: a chatTUI overlay mirroring the chooser. Esc-Esc on an
  empty composer (or /rewind) opens a two-stage picker — pick a turn, then pick
  scope (code+conversation / conversation / code). Apply calls ctrl.Rewind; for a
  conversation/both rewind it prefills the composer with that turn's prompt to
  re-send (Claude Code behavior). The committed transcript stays in terminal
  scrollback (v2 has no managed viewport), and the controller's notice marks the
  rewind point while the model's context is truncated underneath.
- chat_tui: rewind overlay field + double-Esc timing, modal key routing, the
  /rewind slash, an overlay render slot, and a status-line state.

Tested: render smoke + oneLine truncation. Interactive flow (edit → Esc-Esc →
rewind) to be exercised manually.
2026-05-31 02:28:04 -07:00
esengine 539d1d1f54 docs: design for checkpoints & rewind (snapshot-based, Claude Code-aligned) 2026-05-31 02:08:22 -07:00