Repository navigation
Description
Summary
Expose retained Evidence v2, analysis snapshots, investigation workspaces, artifact pages, function dossiers, captures, and residual unknowns through addressable MCP resources and resource_link tool results.
Use REA's existing canonical evidence identities and 1.3.0 persistence primitives as the backing store. Do not create an unrelated second cache solely for MCP.
Current state in REA 1.3.0
- Tool calls return full Evidence v2 records inline.
- The session retains evidence and unknowns in memory.
- Provider-neutral persistent analysis snapshots now exist.
- Persistent cross-version investigation workspaces now exist with deterministic identities and CAS-linked revisions.
- Evidence bundle import/export exists under approved roots.
- No MCP resources, resource templates, rea:// URIs, subscriptions, or resource_link results exist.
User problem
Large evidence objects consume context repeatedly. Agents cannot cheaply retrieve only:
- one capture dimension;
- one artifact page;
- one function dossier section;
- one investigation revision;
- one active unknown;
- one canonical record by evidence ID.
They often re-run analysis or carry entire records through unrelated reasoning.
Canonical resource model
Candidate URI families:
- rea://evidence/
- rea://snapshot/
- rea://workspace//revision/
- rea://artifact/ with paged nodes, occurrences, and edges
- rea://capture/ with terminal, filesystem, process, and protocol dimensions
- rea://function//
- rea://unknown/ and rea://unknowns/active
URI details may change, but identity must be canonical, stable, and derived from existing Evidence v2/store concepts.
Tool-result behavior
Evidence-producing tools should return:
- concise structuredContent with primary IDs, status, authority, limitations, and pagination metadata;
- resource_link blocks for large or independently useful evidence;
- inline compatibility output for clients without resource support or for small results.
A resource link is discoverability, not authorization.
Storage and retention
Define one evidence repository abstraction over:
- current session evidence;
- imported/exported bundles;
- persistent snapshots;
- investigation workspaces;
- retained process captures.
Every resource must report:
- canonical evidence or content digest;
- authority/confidence/provider;
- creation or observation identity where applicable;
- retention/expiry behavior;
- limitations;
- access context.
Security
- Bind session evidence to the originating connection unless explicitly exported.
- Enforce approved roots for persistent files.
- Never let a rea:// URI escape filesystem policy.
- Do not expose another client's tasks, captures, or unknown registry.
- Keep secret-bearing capture bodies redacted/aliased according to capture policy.
- Resource retrieval must not imply approval to extract, execute, mount, or access the network.
Acceptance criteria
- REA implements an evidence repository abstraction shared by session state, snapshots, workspaces, and imported bundles.
- Successful evidence-producing tools can return resource_link content.
- Agents can fetch one evidence record by evidence ID without re-running analysis.
- Capture dimensions are independently retrievable.
- Artifact node/occurrence/edge collections remain deterministically paginated.
- Function dossiers retain page/dimension identity and provider provenance.
- Workspace revisions are immutable and CAS relationships remain verifiable.
- Resource contents preserve canonical Evidence v2 hashes, authority, confidence, provider, locations, and limitations.
- Missing, expired, unauthorized, and integrity-invalid resources return typed structured errors.
- Access is isolated by session/authorization context.
- Inline compatibility remains available for clients without resources.
- Tests cover large pagination, stale IDs, expiry, session isolation, imported bundles, snapshot reuse, workspace revisions, and capture redaction.
- Documentation defines URI stability and retention guarantees.
Non-goals
- Treating MCP resources as an authorization boundary.
- Making mutable Hopper GUI cursor state a durable resource.
- Duplicating evidence bytes separately for every URI.
- Replacing Evidence v2 bundle import/export.
Relationships
- Support MCP Tasks for long-running analysis operations #97 may return task-result evidence links.
- Complete actionable output schemas, structured results, and typed error details #100 governs structured tool and error contracts.
- Create an evidence-linked residual-unknowns registry #73 governs the residual-unknown registry.
- REA 1.3.0 snapshots and investigation workspaces should become backing stores rather than parallel systems.
Activity
morluto commentedon Jul 17, 2026
Completed on current main. registerEvidenceResources exposes session-scoped evidence, sections and dimensions, unknowns, snapshots, artifact collections, function dossiers, workspace revisions, and reconstruction coverage. toolResult emits resource links; evidenceResources and investigation MCP tests cover list/read ownership, links, and stale IDs; docs/mcp-contracts.md documents URI, retention, and authorization behavior.
[field-journal] 2026-08-20 APK逆向 - Flutter服务端广告去除 (morluto#99)