Summary
Implement a transaction stack within the Neural Link server that records all agent-driven UI mutations as reversible operations, enabling undo/redo, atomic batching, and session-persistent audit trails.
A2A Context (Fat Ticket Protocol)
Agent: Claude Opus 4.6 (Antigravity)
Session Origin: Multi-Window Agent Shell architecture session
Problem
When agents modify a live UI (creating/removing components, setting properties), there is no mechanism to:
- Undo a mutation ("undo that", "go back")
- Batch related mutations into a single atomic transaction
- Persist the mutation history for session replay
- Audit what an agent changed and when
This is a hard requirement for conversational UIs where non-technical users interact with agents that modify their application in real-time. Users must be able to say "undo that" and have confidence the system will revert cleanly.
Proposed Solution
Implement a transaction stack that:
- Records every mutation (
create_component, remove_component, set_instance_properties) as a reversible operation
- Supports
undo(n) and redo(n) operations via dedicated NL tools
- Groups related mutations into named transactions (e.g., "add-summary-grid")
- Optionally persists the stack to the Memory Core for cross-session continuity
Design
{
id: 'tx-001',
name: 'add-summary-grid',
timestamp: '2026-04-10T10:30:00Z',
operations: [
{
type: 'create_component',
target: 'neo-container-42',
forward: { ntype: 'grid', columns: [...] },
reverse: { action: 'remove_component', componentId: 'neo-grid-99' }
},
{
type: 'set_instance_properties',
target: 'neo-container-42',
forward: { height: 400 },
reverse: { height: 300 }
}
],
status: 'committed'
}
New Tools Required
| Tool |
Description |
undo |
Reverts the last N transactions |
redo |
Re-applies the last N undone transactions |
list_transactions |
Returns the transaction history |
begin_transaction |
Starts a named transaction group |
commit_transaction |
Commits the current transaction group |
Architectural Context
- Foundational for the Multi-Window Agent Shell concept
- Must work across SharedWorker boundaries (all windows share the transaction stack)
- The Memory Core integration means an agent can resume modifications across sessions
- The stack lives in the NL server process, not in the App Worker
Pitfalls Identified
- Property mutations via
set_instance_properties need to capture the previous value for the reverse operation — this requires a pre-read before every set
- Component creation reverse operations need the component ID (only known after creation), so forward ops must be awaited before the reverse is finalized
- In SharedWorker mode, the transaction stack must be window-agnostic (a single stack across all windows)
Acceptance Criteria
Summary
Implement a transaction stack within the Neural Link server that records all agent-driven UI mutations as reversible operations, enabling undo/redo, atomic batching, and session-persistent audit trails.
A2A Context (Fat Ticket Protocol)
Agent: Claude Opus 4.6 (Antigravity) Session Origin: Multi-Window Agent Shell architecture session
Problem
When agents modify a live UI (creating/removing components, setting properties), there is no mechanism to:
This is a hard requirement for conversational UIs where non-technical users interact with agents that modify their application in real-time. Users must be able to say "undo that" and have confidence the system will revert cleanly.
Proposed Solution
Implement a transaction stack that:
create_component,remove_component,set_instance_properties) as a reversible operationundo(n)andredo(n)operations via dedicated NL toolsDesign
// Transaction Model { id: 'tx-001', name: 'add-summary-grid', timestamp: '2026-04-10T10:30:00Z', operations: [ { type: 'create_component', target: 'neo-container-42', forward: { ntype: 'grid', columns: [...] }, reverse: { action: 'remove_component', componentId: 'neo-grid-99' } }, { type: 'set_instance_properties', target: 'neo-container-42', forward: { height: 400 }, reverse: { height: 300 } } ], status: 'committed' // | 'rolled-back' }New Tools Required
undoredolist_transactionsbegin_transactioncommit_transactionArchitectural Context
Pitfalls Identified
set_instance_propertiesneed to capture the previous value for the reverse operation — this requires a pre-read before every setAcceptance Criteria
create_component,remove_component,set_instance_propertiesundoandredotools functionalbegin_transaction/commit_transaction