Skip to content

Record computer-use actions and diagnostic evidence #20

Description

@ElbertePlinio

Parent: #17
Depends on: #19

Goal

Record a coherent, privacy-safe timeline of what the agent did and what the computer returned, producing both machine-readable evidence and a replayable human HTML filmstrip.

Storage contract

Do not let multiple CLI/MCP/bridge processes race on manifest.json.

Each computer-use run has:

  • manifest fields evidenceVersion: 1 and actionLog: "actions.jsonl"
  • append-only actions.jsonl as the authoritative timeline
  • an atomically-created session-scoped active-run pointer
  • static report.html filmstrip plus the existing text summary

Existing manifests without evidence fields remain valid. Rendering sorts by timestamp plus action ID and assigns display step numbers.

Each sanitized action contains:

  • actionId, source, tool, sessionId
  • startedAt, durationMs, status
  • optional allowlisted target metadata
  • artifact paths
  • redacted error summary

Privacy contract

  • Typed/fill values persist only as length and input type.
  • Network failures persist only method, origin/path without query, status, resource type, timing, and sanitized error text.
  • Persist no request/response headers or bodies.
  • Strip Cookie, Set-Cookie, Authorization, session/JWT/CSRF/OTP values, bare JWTs, query tokens, and CDP websocket capabilities.
  • Do not auto-capture screenshots for typing/fill/password/OTP/payment actions.
  • Screenshot pixels cannot be redacted; document this and allow evidence capture to be disabled.

Bounds

  • Maximum auto-generated evidence: 100 MiB per run.
  • After the cap, continue metadata and mark evidence truncated.
  • Retain the latest 20 finalized computer-use runs per project.
  • Never prune active/running runs.

Checklist

  • Active-run pointer and append-only action journal
  • Structured evidence redaction
  • MCP tool instrumentation
  • DevTools relay instrumentation
  • Screenshot capture policy
  • Console/network failure metadata
  • Backward-compatible manifest/resource rendering
  • HTML filmstrip report
  • 100 MiB cap and 20-run pruning
  • Concurrent append and planted-secret tests
  • README and docs/releases/UNRELEASED.md
  • PR/review

Validation

  • bun run typecheck
  • focused core/run/MCP/relay tests
  • bun run test
  • bun run test:coverage
  • bun run build
  • concurrent writers lose zero actions
  • old manifests still list and render
  • planted cookies, headers, query tokens, JWTs, OTPs, typed passwords, and CDP GUIDs are absent from the entire run directory
  • sensitive actions create no automatic screenshots
  • cap and pruning are deterministic
  • a failed browser flow produces a useful sanitized report.html

Current status: Completed
Next: complete — delivered across PRs #33, #35, #37, #38, #40, and #42.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions