Skip to content

[G1] One-entry harness registry and out-of-tree local source plugins (absorb burn's collector backlog) #177

Open

Description

@willwashburn

Part of #160 (group 1 — independent). Once relayhistory is the only place harnesses are added, adding one must be cheap and possible without a core release.

Problem

Scope

  1. Registry consolidation: one LocalSource descriptor per harness in a single module (crates/ai-hist/src/sources/catalog.rs): { id, aliases, roots(home) -> Vec<PathBuf>, watch_roots, discovery: Box<dyn ShallowSessionProvider>, hydrate: fn(...), evidence_kinds, relationship_capabilities, resume_command: Option<fn>, fixtures_dir }. SOURCE_CHOICES, shallow_providers(), validate_options, ingest_selected, relationship_capabilities, resume_command and the "declared coverage" from the capability-honesty issue all derive from it. The registry test becomes "every descriptor has a fixture and a snapshot; every SOURCE_CHOICES value is a descriptor or an exemption".
  2. Local JS source plugins: allow location: 'local' in HistorySource; local sources run inside discoverSessions/hydrateSession/sync with scope local/all, return SourceEvidenceSnapshot through the existing intake, and are subject to validate_provider_path-style root checks that the plugin declares. Update docs/remote-connectors.md → docs/source-plugins.md.
  3. Rust out-of-tree providers: document how an embedder registers a ShallowSessionProvider + hydrate fn with SourceRegistry::register (sources.rs:74) — it exists; add an example crate under examples/rust-local-source/ compiled in CI.
  4. Collector issue transfer: open one collector issue here per burn backlog item (title, harness store path if known, link to the burn issue), then comment on each burn issue that sourcing moved here (do not close them until burn's cutover issue lands).
  5. docs/session-catalog.md "Adding a provider" rewritten around the descriptor + fixture + snapshot.

Acceptance

  • Adding a fake zzz harness in a test requires touching only sources/catalog.rs + a fixture dir; the registry test and MCP/TS enum tests pass without other edits (TS gets the source list from the native addon at runtime or from a generated file).
  • A local JS plugin in sdk-ts/fixtures/local-source-plugin/ registers, discovers a session, hydrates it, and the session appears in listSessionCatalog({scope:'local'}) with locations: ['local'].
  • 19 collector issues exist in relayhistory, cross-linked to burn.

Out of scope

Implementing any new collector.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions