Context
Slice-1 (undo, #13221) + the redo half of Slice-2 (#13304) shipped + merged. #9848 (the undo-stack umbrella) lists list_transactions among its tools — "Audit what an agent changed and when." The in-heap Neo.ai.TransactionService already exposes the read API (stackOf({id}) → deep-cloned {open, committed, redo}, src/ai/TransactionService.mjs:385). This ticket adds the list_transactions NL tool — a read-only projection of the writer's transaction history, so an agent (or a conversational-UI user) can answer "what have you changed?" before deciding to undo/redo.
The Problem
The undo stack is mutable (undo/redo) but NOT introspectable from the agent surface — there is no tool to LIST the committed transactions (what is undoable, in what order, what each did). An agent can undo/redo blindly but can't show or audit the history. stackOf is the in-heap read API but is not exposed as a tool.
The Fix
A read-tier list_transactions NL tool, mirroring the merged undo/redo wiring (#13257 / #13304):
- Server-side
ai/services/neural-link/InstanceService.list_transactions({sessionId}) → forwards over the bridge.
- In-app
src/ai/client/InstanceService.listTransactions(params, context) → transactionService.stackOf({id: writer-pair}), projects to a read summary: {committed: [{txId, status, label, opCount}], redo: [...]} (audit view — NOT the raw reverse-ops). Read-only; no enforcement, no replay.
- Wire the 6 sites:
openapi.yaml path + read tier + schema; toolService.mjs serviceMapping; the server-side forward; Client.mjs dispatch; the in-app method; OpenApiValidatorCompliance.spec tier fixture (read tier → NOT in the dangerous-read-forbidden set).
- Add the
list_transactions row to learn/agentos/NeuralLink.md — the just-merged #13318 GuideToolParity guard now enforces doc==openapi parity, so a new tool requires its doc-row or the guard fails in CI (the guard working as designed).
Acceptance Criteria
Out of Scope
- Named transaction batching (
begin_transaction / commit_transaction) — the other Slice-2 remainder, a separate leaf.
- Returning the raw reverse-ops (a summary suffices for audit; the raw ops are internal).
- Cross-session / persisted history (Slice-3, Memory-Core).
Related
Parent: #9848 (undo-stack umbrella). Siblings: #13221 (undo), #13304 (redo), #13318 (the drift guard that enforces the doc-row). Refs #13012 (Agent Harness Pillar-2). Read API: src/ai/TransactionService.mjs stackOf.
Origin Session ID: a0bc6b23-78c5-4bd7-b944-9db5e236f42d
Release classification: boardless (Slice-2 read tool on the undo substrate — not v13-release-blocking).
Context
Slice-1 (
undo, #13221) + theredohalf of Slice-2 (#13304) shipped + merged. #9848 (the undo-stack umbrella) listslist_transactionsamong its tools — "Audit what an agent changed and when." The in-heapNeo.ai.TransactionServicealready exposes the read API (stackOf({id})→ deep-cloned{open, committed, redo},src/ai/TransactionService.mjs:385). This ticket adds thelist_transactionsNL tool — a read-only projection of the writer's transaction history, so an agent (or a conversational-UI user) can answer "what have you changed?" before deciding to undo/redo.The Problem
The undo stack is mutable (
undo/redo) but NOT introspectable from the agent surface — there is no tool to LIST the committed transactions (what is undoable, in what order, what each did). An agent canundo/redoblindly but can't show or audit the history.stackOfis the in-heap read API but is not exposed as a tool.The Fix
A read-tier
list_transactionsNL tool, mirroring the mergedundo/redowiring (#13257 / #13304):ai/services/neural-link/InstanceService.list_transactions({sessionId})→ forwards over the bridge.src/ai/client/InstanceService.listTransactions(params, context)→transactionService.stackOf({id: writer-pair}), projects to a read summary:{committed: [{txId, status, label, opCount}], redo: [...]}(audit view — NOT the raw reverse-ops). Read-only; no enforcement, no replay.openapi.yamlpath +readtier + schema;toolService.mjsserviceMapping; the server-side forward;Client.mjsdispatch; the in-app method;OpenApiValidatorCompliance.spectier fixture (read tier → NOT in the dangerous-read-forbidden set).list_transactionsrow tolearn/agentos/NeuralLink.md— the just-merged #13318GuideToolParityguard now enforces doc==openapi parity, so a new tool requires its doc-row or the guard fails in CI (the guard working as designed).Acceptance Criteria
list_transactionsreturns the writer's committed transaction history (txId, status, label, op-count per tx), newest-last, read-only.NeuralLink.mddoc-row (the #13318 guard passes).Out of Scope
begin_transaction/commit_transaction) — the other Slice-2 remainder, a separate leaf.Related
Parent: #9848 (undo-stack umbrella). Siblings: #13221 (undo), #13304 (redo), #13318 (the drift guard that enforces the doc-row). Refs #13012 (Agent Harness Pillar-2). Read API:
src/ai/TransactionService.mjsstackOf.Origin Session ID: a0bc6b23-78c5-4bd7-b944-9db5e236f42d
Release classification: boardless (Slice-2 read tool on the undo substrate — not v13-release-blocking).