fix(sdk): expose create_parent and related HTTP add_resource fields - #3961
Open
JFPURE wants to merge 1 commit into
Open
fix(sdk): expose create_parent and related HTTP add_resource fields#3961JFPURE wants to merge 1 commit into
JFPURE wants to merge 1 commit into
Conversation
Python SDK add_resource omitted create_parent even though HTTP/CLI and the API docs already support it, so parent auto-create could not be requested from Sync/AsyncHTTPClient. Also forward source_name and add_skill source_metadata for HTTP parity, matching CLI's omit-when-false create_parent behavior for older servers. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
create_parenton Python SDKadd_resource(Sync/AsyncHTTPClient) so parent auto-create matches HTTP/CLI and the existing API docs examples.source_nameonadd_resource, andsource_metadataonadd_skill, for HTTP request parity.create_parentwhenTrue, matching CLI behavior so older servers that forbid unknown fields still accept requests.Test plan
pytest sdk/python/tests/test_async_client_behaviors.py -k 'add_resource or add_skill_forwards or add_skill_uploads'client.add_resource(url, parent="viking://user/resources/docs", create_parent=True)against a 0.4.13+ server and confirm parent directories are createdcreate_parentand confirm the request body does not include the field