feat(catalog): add Wiza people and company enrichment - #514
Merged
Merged
Conversation
shehjad-dev
force-pushed
the
codex/provider-wiza
branch
from
September 16, 2026 11:56
d35f589 to
3bc238e
Compare
shehjad-dev
marked this pull request as ready for review
September 16, 2026 13:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Wiza (
wiza) as a Bearer-key enrichment provider. It catalogs the full official API surface, enables bounded synchronous calls on treg's platform key, and keeps account-scoped asynchronous jobs on BYOK.Why now: Wiza adds structured people and company search, company enrichment, contact reveals, and bulk-list workflows. The synchronous search and company-enrichment calls fit treg's existing capability and settlement contracts. The asynchronous calls do not yet have safe shared-account ownership and terminal settlement, so this PR exposes them only to teams that connect their own Wiza key.
Listing owner / contact: @shehjad-dev (platform-key custodian for this integration). No external vendor contact is recorded.
What's in the diff
oauth_providers.pyandconfig.py— Wiza registry entry, Bearer injection, freeGET /api/meta/creditsconnection probe, and an unsetTREG_PLATFORM_KEY_WIZAsetting.catalog/wiza.yaml— 12 caller-facing tools that cover 12 official paths. The thirteenth path, the credit balance route, stays internal to connection checks and capacity collection.catalog/adapters.yaml— verified adapters for one-row people search, one-row company search, and company enrichment. They join the existing routing and Enrich Arena machinery without Wiza-specific runtime code.catalog/fx.yaml—$0.025per API credit, based on Wiza's public one-time, non-expiring credit purchase rate. The promotional grant is excluded from the replacement-rate calculation. No later custom rate is claimed.credits.api_creditscollector andcredits / manual / apipolicy. A provisional provider-wide 30-per-minute shared-key spacer reuses Wiza's documented company-enrichment ceiling because search and autocomplete limits are unpublished and smoothing is not endpoint-aware. Sequential platform calls are spaced about two seconds apart; 20 one-row pages add about 38 seconds of waiting. BYOK bypasses the limiter. Its bounded, process-local wait reduces ordinary bursts but is not a strict quota gate. Vendor auto-top-up is not enabled, and no overflow route is added.Endpoint and price ledger
wiza.people.searchPOST /api/prospects/searchwiza.companies.searchPOST /api/accounts/searchwiza.companies.enrichPOST /api/company_enrichmentswiza.meta.locations.searchGET /api/meta/location_autocompletewiza.meta.technologies.searchGET /api/meta/technology_autocompletewiza.people.reveal.startPOST /api/individual_revealswiza.people.reveal.getGET /api/individual_reveals/{id}wiza.lists.createPOST /api/listswiza.lists.getGET /api/lists/{id}wiza.lists.contactsGET /api/lists/{id}/contactswiza.prospect-lists.createPOST /api/prospects/create_prospect_listwiza.prospect-lists.continuePOST /api/prospects/continue_searchGET /api/meta/creditsThe seven BYOK-only tools use account-scoped result IDs and can finish after the initiating HTTP call. The IDs carry no caller ownership token. Shared platform access would require a durable owner link and terminal-charge settlement, so this PR does not guess at that design.
Verification evidence
All live checks used the assigned Wiza key without printing or storing it in the repository. Public or synthetic targets were used, and raw responses stayed outside the repository.
Total live discovery and dataplane spend was 22.5 Wiza credits, below the 100-credit ceiling.
Local platform settlement: company hit → Wiza reported 2 credits, treg reserved and settled 50,000 micro-USD at the public replacement rate. Invalid input and a synthetic miss released their holds and settled zero. The ledger showed one close entry for every reserve.
BYOK precedence: after connecting a team Wiza key, the same company hit used that key, returned no treg cost header, and did not change the team balance. The team's key won over the platform key.
Routing and Arena
Validation
catalog_validate.py: OK — 103 provider files, 3,356 endpoints, 0 errors, 0 warningsThe earlier required CI failure was
test_the_plugin_skill_is_not_stale: adding Wiza raised the provider count rendered from the{PROVIDERS}placeholder insrc/treg/web/skill.mdfrom 76 to 77, which made all five generated skill mirrors stale. Commit3bc238edregenerates those mirrors in this PR;build_plugin.py --checknow passes. This was caused by the Wiza change, not inherited frommain.The two failures in the post-rebase full local run were archive timing/SQLite-lock flakes outside the Wiza diff:
test_upload_timeout_retries_once_and_recoversandtest_change_observation_failure_preserves_record[missing]. Both passed immediately when rerun alone against a fresh isolated database.Operations and production state
TREG_PLATFORM_KEY_WIZAin the private deployment configuration and addingwizatoTREG_PLATFORM_PROVIDERS.Known gaps