Skip to content

Add generic service channel publication - #1125

Merged
edwin-zvs merged 3 commits into
mainfrom
generic-channel-publication
Aug 1, 2026
Merged

Add generic service channel publication#1125
edwin-zvs merged 3 commits into
mainfrom
generic-channel-publication

Conversation

@edwin-zvs

@edwin-zvs edwin-zvs commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a provider-neutral channel publication supervisor around typed local ingress endpoints
  • keep channel parsing, caller authentication, and session routing inside channel adapters
  • add the first-party Construct backend with owner OAuth, scoped registration, reverse transport, readiness, retry, and typed public endpoint validation
  • expose explicit publish/unpublish RPCs in the client, TUI, and WebTUI
  • withdraw publication on pause, disable, detach, listener loss, endpoint replacement, or daemon restart without auto-republishing
  • document the durable architecture boundary and operator workflow

The boundary is intentionally not HTTP-shaped: HTTP and WebSocket profiles return URLs with canonical paths, opaque TCP profiles return host/port endpoints, and UDP or outbound channels can opt in or out according to provider capabilities.

Gateway rollout dependency

The client/daemon implementation is complete, but production use requires matching gateway support for:

  • POST https://tunnel.zarvis.ai/api/v1/channel-publications
  • registration by installation id plus globally exclusive channel id, transport, protocol profile/path, and authorization: "channel"
  • preserving the caller's channel Authorization header and request body end to end
  • returning a typed public endpoint, relay URL/port, scoped tunnel token, readiness URL, expiry, and optional re-registration token
  • returning HTTP public URLs that include the channel's canonical path

The existing remote-control tunnel remains a separate route and lifecycle. This PR is draft until that gateway contract is deployed.

Verification

  • cargo check --workspace
  • cargo test -p construct-daemon --lib (518 passed)
  • focused publication lifecycle, canonical-path, notification-forwarding, listener-rebind, and TUI rendering tests
  • WebTUI inline JavaScript syntax validation
  • cargo build --workspace --bins
  • full CLI suite reached 1305/1306 before the final main rebase; the only failure is the pre-existing color::tests::truecolor_backend_still_emits_rgb test, which also fails in isolation on this terminal backend and is unrelated to this diff

No recording is attached because the production gateway endpoint needed to reach the Ready state is not deployed.

@edwin-zvs

Copy link
Copy Markdown
Contributor Author

Gateway implementation: https://github.com/zarvis-ai/construct-service/pull/12. The first-party backend now advertises HTTP-over-TCP only, matching the deployed edge; the generic publication boundary still models future WebSocket and opaque transports.

@edwin-zvs
edwin-zvs marked this pull request as ready for review August 1, 2026 22:16
@edwin-zvs
edwin-zvs force-pushed the generic-channel-publication branch 2 times, most recently from 16c0aa1 to 3fdb91b Compare August 1, 2026 22:36
@edwin-zvs
edwin-zvs force-pushed the generic-channel-publication branch from 3fdb91b to a80d76f Compare August 1, 2026 23:46
@edwin-zvs
edwin-zvs merged commit 571e871 into main Aug 1, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the generic-channel-publication branch August 1, 2026 23:54
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