Repository navigation
Closed
Description
Context
The archive/product operations layer has moved ahead of several public surfaces. Product list methods and archive-debt operations exist, and MCP product tools are registry-driven, but some product types and operational affordances still are not reachable from the durable CLI/facade/MCP surfaces.
Current gaps
ArchiveDebtProductandArchiveDebtProductQueryexist inpolylogue.archive_products, and archive operations can list debt products, butpolylogue.products.registrydoes not register a debt product type. That means nopolylogue products debtcommand and no registry-backed MCP product tool.Polylogueexposesstats()but lacks the explicitget_archive_stats()alias expected by API readers.- Readiness/health and session-product rebuild are operations users can trigger through CLI maintenance flows, but the async facade has no direct
health_check()orrebuild_products()methods. - MCP has single-conversation export and single-tag mutation, but lacks batch tagging, query-result export, and an explicit session-product rebuild tool.
- CLI has query-mode formatting, but no direct
polylogue export --format <fmt> <conversation-id>command for a single known conversation.
Strengthened scope
- Register archive debt in the product registry with CLI/MCP metadata, presentation fields, root filters where supported, and focused tests.
- Widen the async facade with explicit maintenance/read APIs:
get_archive_stats()as a stable alias for archive summary stats.health_check()returning the canonical readiness report.rebuild_products(conversation_ids: Sequence[str] | None = None)rebuilding durable session products and returning typed counts.
- Add MCP tools that delegate to existing operations/storage semantics instead of duplicating domain logic:
- registry-backed archive-debt listing from the product registry.
rebuild_session_productswith optional targeted conversation IDs.bulk_tag_conversationsfor many conversation IDs and one or more tags.export_query_resultsthat runs the shared query contract and returns formatted conversation exports in a machine-readable bundle payload.
- Add CLI
polylogue export --format <format> <conversation-id>using the existing rendering formatter forjson,yaml,html,csv,obsidian,org,plaintext, andmarkdown. - Regenerate CLI/MCP/product docs and add verification coverage across registry, CLI, facade, and MCP contracts.
Acceptance criteria
ArchiveDebtProductappears inproducts/registry.pyand producespolylogue products debtplus a registry-backed MCP product tool.- Facade exposes stats, health, and session-product rebuild without callers reaching into operations internals.
- MCP exposes archive debt, product rebuild, bulk tag, and query-result export with JSON payloads covered by tests.
polylogue export --format json <id>works and shares formatter behavior with existing query/export paths.- Generated CLI/devtools/product documentation is in sync.
- Focused validation covers the new API surface and the existing archive-data-products lane stays green.
Activity
Sinity commentedon Apr 23, 2026
Starting execution.
I strengthened the issue to reflect the current code: product list methods and registry-driven MCP tools already exist, so this branch will focus on missing ownership edges rather than rebuilding surfaces. The target is debt registration, explicit facade health/rebuild/stats APIs, MCP rebuild/bulk-tag/query-export tools, CLI single-conversation export, generated docs, and focused contract tests.
test: update public surface showcase baselines
feat: widen public archive product surfaces (#378)
Sinity commentedon Apr 23, 2026
Completion log:
Verification run locally:
GitHub rerun notes:
feat: widen public archive product surfaces (#378)