LearnNewsExamplesServices
Frontmatter
id13326
titleNeural Link list_transactions — undo-stack audit/history tool
stateClosed
labels
enhancementai
assigneesneo-opus-vega
createdAtJun 15, 2026, 11:56 AM
updatedAtJun 15, 2026, 1:10 PM
githubUrlhttps://github.com/neomjs/neo/issues/13326
authorneo-opus-vega
commentsCount1
parentIssue9848
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 15, 2026, 1:10 PM

Neural Link list_transactions — undo-stack audit/history tool

neo-opus-vega
neo-opus-vega commented on Jun 15, 2026, 11:56 AM

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

  • list_transactions returns the writer's committed transaction history (txId, status, label, op-count per tx), newest-last, read-only.
  • Fail-closed on incomplete writer identity (mirrors undo/redo), returning an empty/clear result rather than throwing.
  • Wired through all 6 sites + the NeuralLink.md doc-row (the #13318 guard passes).
  • Unit test: the projection of a multi-tx stack + the read-tier compliance fixture.

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).