feat(connectors): add moss-connector-zeroentropy
Merged
HA
3mo ago+1258+1258+0123456789012345678901234567890123456789-1-1-0123456789
What
A new data connector, moss-connector-zeroentropy, that migrates a ZeroEntropy collection into a Moss index. Follows the established moss-data-connector/_template pattern exactly (same shape as the Supabase/MongoDB/DynamoDB connectors).
from moss_connector_zeroentropy import ZeroEntropyConnector, ingest
source = ZeroEntropyConnector(collection_name="my_collection", api_key="...") # or ZEROENTROPY_API_KEY
await ingest(source, project_id="...", project_key="...", index_name="my_collection")
How it works
ZeroEntropyConnector.__iter__walksdocuments.get_info_list(an auto-paginating cursor) and yields onemoss.DocumentInfoper document via amapper.- Default mapping (
path-> id, parsedcontent-> text,metadata-> metadata) means a whole collection migrates with no mapper; passmapper=to customize. - The list endpoint returns metadata only, so content is fetched per document via
documents.get_info(..., include_content=True). Documents that never parsed (nocontent) are skipped rather than indexed empty. - ZeroEntropy metadata is typed
Dict[str, str | list[str]]; the connector coerces list values to strings (Moss requiresDict[str, str]). path_prefix=scopes the migration;include_content=Falsemigrates metadata only.
Testing
tests/test_zeroentropy.py— 9 mocked unit tests, all passing (default/custom mapper, skip-empty-content,include_content=False,path_prefix, auto_id, empty collection, metadata coercion).tests/test_integration_zeroentropy_moss.py— skippable live round trip (ZeroEntropy → Moss → query → delete), gated onZEROENTROPY_API_KEY/ZEROENTROPY_TEST_COLLECTION/MOSS_PROJECT_ID/MOSS_PROJECT_KEY.- Verified against the installed
zeroentropy0.1.0a11 SDK by introspection: method names, keyword params (collection_name,path,include_content,path_prefix), theSyncGetDocumentInfoListCursorreturn, and every response field the connector reads all match.
Also
publish-moss-connector-zeroentropy.yml(mirrors the other connectors' publish workflows).- Row added to
packages/moss-data-connector/README.md.
CI is green (python-lint + python-sdk-test pass under the pinned ruff from #480).