Skip to content

LBA REQ 101

github-actions[bot] edited this page Nov 19, 2026 · 2 revisions

LBA-REQ-101: Read-only active-capture MCP resources

Status

Planned

Area

Agentic infrastructure / MCP capture resources (ADR-0084)

Statement

The system shall expose the lifecycle and ordered evidence of a local active LabVIEW capture through a pathless, read-only MCP resource contract.

Rationale

ProjectBuddy #250 needs timely frame/event reads while LBA capture remains active, but the separate stdio MCP server cannot access the extension process's in-memory activeCapture and host-specific storage paths are not a stable consumer interface. Actor issue #45 requests the producer contract; ProjectBuddy consumes it.

Acceptance Criteria

  • The versioned active-capture-session@1 record contains an opaque UUID, workload/plane/source, started time, lifecycle state (capturing, finalizing, stopped, failed), and available evidence classes; no absolute storage path is returned.
  • resources/list exposes only a bounded set of pathless session metadata resources. A session read returns capture state and the latest frame/sample sequence watermarks; a bounded batch resource returns ordered frame/event metadata with sequence numbers and timestamps.
  • PNG bytes are returned only through an explicit per-run resources/read URI after size, PNG structure/chunk-CRC, and SHA-256 validation. File reads are capped at the admitted size plus one detection byte and reject identity, timestamp, or size changes between stat, open, and completed read. The default listing/batch never embeds frame bytes.
  • Partial frame files and partial JSONL tails are not presented as complete records. Sequence gaps, stale cursors, changed hashes, malformed status, unknown state, and path traversal fail closed or produce explicit incomplete status.
  • A finalizing beacon is written before stop/finalization begins. Read operations never start, pause, stop, finalize, or otherwise mutate capture.
  • The stdio server receives its capture-root from the extension provider's Global Storage configuration, never from MCP arguments. The reader remains root-confined and exposes no local paths in results or errors.
  • No frame or run data is sent over the lbabus coordination bus.

Verification

Run node test/active-capture-mcp.mjs after npm run compile; npm test also checks the generated docs/mcp-tools.md. Tests use only temporary fixtures and a spawned local stdio server; no real capture, VM, or model is required.

Historical statement (no longer implemented)

Supersession

Change Guidance

Preserve the four core tools in LBA-REQ-019. Add resources as a separate read-only capability under ADR-0084; depend on Actor issue #45 for the consumer contract. Keep raw frame bytes explicit and bounded, never return storage paths, and leave the existing finalized capture.json contract unchanged.

TestID

T-101

CodeRef

src/captureSession.ts; src/mcp/activeCaptureEvidence.ts; src/mcp/benchmarkActorMcpServer.ts; src/mcp/runBenchmarkActorMcpServer.ts; src/mcp/benchmarkActorMcpServerProvider.ts; experiments/handoff-beacon/captureStatus.mjs; test/active-capture-mcp.mjs; docs/architecture/adr/ADR-0084-active-capture-mcp-resources.md

RTM Status

Planned

Clone this wiki locally