Skip to content

sdk: add webhookHealthy to SyncProviderStatus#81

Merged
khaliqgant merged 1 commit intomainfrom
feat/sdk-webhook-healthy
May 5, 2026
Merged

sdk: add webhookHealthy to SyncProviderStatus#81
khaliqgant merged 1 commit intomainfrom
feat/sdk-webhook-healthy

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

Summary

Adds the webhookHealthy?: boolean field to SyncProviderStatus in both the TypeScript and Python SDK types so cloud and relayfile-CLI consumers can drop their permissive-cast workarounds.

Why

Productized cloud-mount contract §7.4 mandates that the cloud /sync response surfaces a per-provider webhookHealthy so the CLI can render the "falling back to periodic sync" warning when webhook delivery is degraded. The cloud already emits the field (cloud#406) and the relayfile CLI already consumes it (relayfile#71), but the SDK type didn't declare it — forcing both sides to read it via index-access casts.

Compatibility

Non-breaking type-only change:

  • TS: `webhookHealthy?: boolean` (optional)
  • Python: `webhook_healthy: bool | None = None` (default None)

Older relayfile/cloud deployments that don't emit the field still deserialize cleanly.

Tests

  • `npm test` in `packages/sdk/typescript` — 81/81 pass
  • Python types are dataclass-only; the client returns raw `dict[str, Any]` for sync status, so no parser update needed

Follow-up after merge

  • Maintainer triggers the manual publish workflow (workflow_dispatch on `.github/workflows/publish.yml`) to release the new minor.
  • Cloud's `packages/web/lib/integrations/provider-status.ts` can drop the `(value as { webhookHealthy?: unknown }).webhookHealthy` cast once the new SDK lands in cloud's package-lock.

Test plan

  • SDK typescript tests
  • Reviewer can sanity-check the type against the contract excerpt at `docs/productized-cloud-mount-contract.md#74`

Productized cloud-mount contract §7.4 mandates that the cloud `/sync`
response surfaces a per-provider `webhookHealthy` boolean so consumers
can render the "falling back to periodic sync" warning when webhook
delivery is degraded.

The cloud platform already populates the field in its provider-status
summarizer (cloud#406); the relayfile CLI already renders the warning
row when the field is false (relayfile#71). The TypeScript SDK type
did not declare it, forcing both consumers to read it via permissive
casts. Add it as an optional field on `SyncProviderStatus` in both
the TS and Python SDK types so consumers can drop the cast.

Non-breaking: the field is `?: boolean` (TS) / `bool | None = None`
(Python). Older deployments that do not yet emit the field still
deserialize cleanly.

The Python client returns raw `dict[str, Any]` for sync status so
no parser update is needed; the type is documentation for consumers
who construct SyncProviderStatus instances by hand.
@khaliqgant khaliqgant merged commit 6d1552a into main May 5, 2026
6 checks passed
@khaliqgant khaliqgant deleted the feat/sdk-webhook-healthy branch May 5, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant