Skip to content

feat(sdk): expose ContentIdentity on write types#57

Merged
khaliqgant merged 2 commits into
mainfrom
khaliq/sdk-content-identity
Apr 21, 2026
Merged

feat(sdk): expose ContentIdentity on write types#57
khaliqgant merged 2 commits into
mainfrom
khaliq/sdk-content-identity

Conversation

@khaliqgant

@khaliqgant khaliqgant commented Apr 21, 2026

Copy link
Copy Markdown
Member

Summary

PR #54 landed contentIdentity in @relayfile/core and bumped to v0.3.0, but the TS client SDK never exposed it on FileWriteRequest / BulkWriteFile / WriteFileInput. Consumers (sage, nightcto, msd) have been working around this with local .d.ts shims — see e.g. sage #89's src/relayfile-sdk.d.ts.

This PR:

  • Adds ContentIdentity { kind: string; key: string } to the SDK's types
  • Adds optional contentIdentity to FileWriteRequest, BulkWriteFile, WriteFileInput
  • Forwards it on the PUT body in client.writeFile()
  • Exports ContentIdentity from the public surface
  • Bumps @relayfile/sdk to 0.3.1

Fully additive, no breakage for callers that omit the field.

Test plan

  • npm run typecheck passes
  • npm test passes (46/46, incl. two new tests for forward + omit cases)
  • Publish 0.3.1 via the usual Publish Packages workflow_dispatch
  • Downstream sage/nightcto/msd PRs drop their local .d.ts shims on a follow-up

Related: #54, platform-v1 runbook (sage#84)


Open in Devin Review

PR #54 added contentIdentity to @relayfile/core but the TypeScript
client SDK never picked it up. Consumers (sage, nightcto, msd) were
hacking around this with local .d.ts shims. Add the field to
FileWriteRequest, BulkWriteFile, and WriteFileInput, export
ContentIdentity from the public surface, and forward it on PUT body.

0.3.0 → 0.3.1 (additive, no breakage for omitting callers).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@khaliqgant khaliqgant merged commit 67bcbdd into main Apr 21, 2026
3 of 4 checks passed
@khaliqgant khaliqgant deleted the khaliq/sdk-content-identity branch April 21, 2026 08:57
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