feat(client): keys, shareLinks, and security surfaces (#3563 PR-3) - #3575
Merged
Conversation
Three more domains the route audit found with zero SDK expression, each
implemented against the dispatcher's actual contract (domains/keys.ts,
domains/share-links.ts, domains/security.ts):
- client.keys.create({ name?, expiresAt? }) — POST /api/v1/keys. The raw
secret is returned exactly once (only its hash is stored); user_id is
pinned server-side and never sent. expiresAt forwards as expires_at (ISO
or epoch — the server normalizes and rejects past dates). There was
previously NO SDK path to create an API key.
- client.shareLinks.create(object, recordId, opts?) / list(opts?) /
revoke(idOrToken) — authenticated share-link management. Listing is
server-constrained to the caller's own links. The public token routes
(:token/resolve, :token/messages) stay browser-only by design — their
ledger rows remain `public`.
- client.security.suggestedBindings.list / confirm / dismiss — the ADR-0090
admin surface. Anonymous is denied unconditionally server-side.
All three use fixed /api/v1 paths (none are in ApiRoutesSchema — the
actions/projects precedent, noted at each definition).
Ledger: seven rows flip to sdk; the gap ratchet drops 24 → 17. Docs-site SDK
page gains the three namespaces + usage snippets.
Verified: client 129 passed (7 new), ledger guard both halves green, eslint
clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LX9ut3MK3KykE11S9bJmv5
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckThis PR changes 2 package(s): 26 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
marked this pull request as ready for review
July 27, 2026 07:34
This was referenced Jul 27, 2026
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.
PR-3 of #3563: three more zero-expression domains closed. Gap ratchet: 24 → 17.
The surfaces
Each is implemented against the dispatcher's actual contract (
domains/keys.ts,domains/share-links.ts,domains/security.ts— all read in full before writing a line):Contract-faithful details:
keys.createforwardsexpiresAtasexpires_at(ISO or epoch — the server normalizes and rejects past dates);user_idis never sent (pinned server-side, body-whitelisted).:token/resolve,:token/messages) stay browser-only by design — their ledger rows remainpublic, notgap./api/v1paths: none of these domains are inApiRoutesSchema(theactions/projectsprecedent, noted at each definition).Ledger + docs
gap→sdk; the conformance ratchet drops to 17.Test plan
🤖 Generated with Claude Code
https://claude.ai/code/session_01LX9ut3MK3KykE11S9bJmv5
Generated by Claude Code