The persistence seam is now create/open/stat/list returning per-session SessionHandles (read/append/flush/close); every log read and write flows through the owning handle. The seam package exports only the service and handle contracts, consumer-visible errors, and pure durable-data validation helpers; each backend owns its complete storage runtime, and the shared contract suites pin equivalent observable behavior. The backend routes published sessions' live events by id into the active write handle; agent-loop only acquires, seeds, and closes the handle. Resume appends interruptedTurnClosers through its write handle; session-query owns the revision-keyed cold cache. Legacy-only surfaces are removed in the same swap: locate/readRaw/supportsRawArtifacts, the legacy event-shape read migration, zstd torn-frame salvage, DSH_SESSION_JSONL, and hook transcript_path population; a torn final zstd frame is discarded whole; the session-list cold blank probe returns on stat metadata (eventCount derived from the last physical row, sizeBytes). The WebUI ZIP export serializes the logical log from a read handle, so both backends export identically. Refs #3245 |
||
|---|---|---|
| .. | ||
| command-goal | ||
| goal | ||
| goal-round-driver | ||
| tool-goal | ||
| README.i18n.yaml | ||
| README.md | ||
| README.zh.md | ||
| description | kind |
|---|---|
| The goal group map: one durable completion objective per session, with model tools, a human command, and automatic continuation, for users and maintainers navigating the group. | package-group |
packages/goal
English | 中文
Summary
The goal group gives an agent session one durable completion objective that survives restarts, resume, and fork: the goal service keeps the goal state and lifecycle durable, the model tools let the agent create and update goals, the /goal command gives the human direct goal control without a model turn, and the continuation driver turns an active goal into sequential rounds of automatic work. Goal state lives in the session log, so nothing in the group keeps a separate store. Only one goal is current at a time, and a goal is state, not a scheduler — automatic continuation is an opt-in consumer you mount deliberately.
Table of Contents
Packages
| Package | Role | ctx key |
|---|---|---|
goal |
One durable goal per session: create, edit, pause, resume, complete, block, and clear | ctx.goals |
tool-goal |
Model tools get_goal, create_goal, update_goal |
registers on ctx.tools |
command-goal |
Human /goal command in UI command planes |
registers on ctx.commands |
goal-round-driver |
Automatic continuation: turns an active goal into sequential rounds | no service key |
Related documentation
- Goal subsystem — goal types, durable
goal/changeevents, and the generated service API. - Generated tool catalog — the three goal-tool schemas the model receives.
- Generated configuration catalog — every accepted config field of the goal service.
- Goal domain Agent Note — the domain design and its decisions.
- Same-session driver Agent Note — the continuation races and lifecycle rationale.
Dev Note
Working context for maintainers — click to expand
None.