Repository navigation
Pin the Calls SDK prerelease and add call-link commands - #60
Conversation
Pin @polymorfa/sdk 0.1.0-dev.20260926235309, the first dev prerelease containing the merged Calls SDK (sdks #306). Group placement, re-ring, reactions, raised hands, media controls and call detail now use the SDK methods instead of refusing with a dependency error. Add calls link create and calls link preview for server-credential call links. Preview reads the link or token from standard input so it stays out of shell history, and derives voice or video from a full link.
Refuse an interactive terminal and report empty stdin as a missing link. Accept a pasted link inside share text, with a query or fragment or an uppercase host, and refuse two different links or short bare tokens. Drop the unreachable pre-publication SDK guards and their skipped tests now that the SDK is pinned, and reuse the shared Calls helpers.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (13)
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughThe change adds commands to create and preview WhatsApp call links. It also updates call operations and call-detail retrieval to use SDK methods directly, removes SDK-capability checks, and updates related tests and documentation. ChangesCall commands and SDK integration
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant CallsLinkPreview
participant stdin
participant parseCallLink
participant previewCallLink
CallsLinkPreview->>stdin: Read piped link or token
CallsLinkPreview->>parseCallLink: Parse input
parseCallLink-->>CallsLinkPreview: Return token and optional media type
CallsLinkPreview->>previewCallLink: Preview parsed link with session and video option
previewCallLink-->>CallsLinkPreview: Return preview data and metadata
CallsLinkPreview->>CallsLinkPreview: Render and write preview
Merge Risk: ⚪ Minimal · up to The supplied evidence identifies no issue requiring correction before merge. Create and preview have not been tested against live staging. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 11 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Comment |
…all-links-20260927 # Conflicts: # README.md # package-lock.json # package.json # test/release/check-prerelease.test.ts
Summary
SDK pin.
devhas since moved to@polymorfa/sdk0.1.0-dev.20261001215108, and this branch now uses that pin unchanged. That SDK still providesCallsClient.placeGroup, reactions and raised hands,Client.calls.retrieveandMessagingClient.voip.createCallLink/previewCallLink.The duck-typed "published SDK" guards for group, social and call-detail calls are removed: they can't trigger with an exact pin, and they bypassed the SDK's own types. Their always-skipped refusal tests are removed too, and the positive tests now always run. The
--mutedmedia-state guard is unchanged.New commands:
calls link create --session S [--video]: creates a WhatsApp call link from a Linked Device Number and prints its URL. The request is never retried and sends noIdempotency-Key, matching the API.calls link preview --session S [--video]: reads the link, or a bare token, from standard input so it never appears in shell history or process listings.https://call.whatsapp.com/{voice|video}/TOKENlink inside pasted share text, ignoring any query or fragment and matching the host case-insensitively. That link sets the media type, and a conflicting--videois refused.Review
A local review pass stood in for Codex, whose usage is exhausted. It found 9 issues, and the second commit addresses them:
calls view;calls.ts.Verification
format:check,lint,typecheck,build,npm pack --dry-runandaudit:prod(0 vulnerabilities) pass.dev: 975 passed, none skipped.test/commands/call-links.test.tscovers 9 cases, including link parsing and the interactive-terminal and empty-input refusals:Idempotency-Key;--video;event-stream-processSIGINT/SIGTERM tests fail only under full-suite load on this machine. They pass in isolation, 3 of 3, on both the old and new pin.Six-part assessment
/messaging/voip/call-linksroutes from polymorfa#337.calls linkcommands and topic, and removal of the unreachable SDK guards. The SDK pin comes fromdev.admin-call-settings).