Repository navigation
LBA REQ 101
Planned
Agentic infrastructure / MCP capture resources (ADR-0084)
The system shall expose the lifecycle and ordered evidence of a local active LabVIEW capture through a pathless, read-only MCP resource contract.
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.
- The versioned
active-capture-session@1record 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/listexposes 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/readURI 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
finalizingbeacon 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.
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.
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.
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
Planned