Skip to content

feat: accept explicit asset content types from native embedders - #122

Closed
michaelmorandi wants to merge 2 commits into
dfinity:mainfrom
michaelmorandi:cg-133-explicit-content-types
Closed

feat: accept explicit asset content types from native embedders#122
michaelmorandi wants to merge 2 commits into
dfinity:mainfrom
michaelmorandi:cg-133-explicit-content-types

Conversation

@michaelmorandi

Copy link
Copy Markdown

Summary

  • add compatible plan_project_with_content_types and prepare_project_with_content_types entry points to asset-prep
  • add sync_with_content_types to sync-core while preserving the existing sync API
  • apply exact caller declarations after inference and _headers content-type rules, without changing response headers

This lets native embedders pass media types as structured data instead of synthesizing a Netlify-style _headers file and parsing it back. Existing callers continue through the old entry points with an empty override map.

Closes #120.

Supersedes #121, which GitHub closed when its cross-fork source branch was renamed.

Test plan

  • cargo test -p asset-prep (162 passed)
  • cargo test -p sync-core (84 unit and 4 call-pattern tests passed)
  • cargo build -p asset-prep --no-default-features
  • cargo clippy -p asset-prep -p sync-core --all-targets

Made with Cursor

michaelmorandi and others added 2 commits August 20, 2026 13:22
Let native embedders pass media types as structured data instead of
synthesizing a Netlify-style _headers control file.

Co-authored-by: Cursor <cursoragent@cursor.com>
Verify the public sync entry point carries the declaration into the emitted
CreateAsset operation.

Co-authored-by: Cursor <cursoragent@cursor.com>
@michaelmorandi
michaelmorandi requested a review from a team as a code owner August 20, 2026 11:53
@michaelmorandi

Copy link
Copy Markdown
Author

Closing because CG-127 already provides the required behavior through CaLM's existing integration. The upstream API cleanup is not required for Layer 1 functionality.

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.

Allow callers to provide exact asset content types

1 participant