fix: add editV2 types and method to agent-bridge client#27
Open
galligan wants to merge 2 commits intoEveryInc:mainfrom
Open
fix: add editV2 types and method to agent-bridge client#27galligan wants to merge 2 commits intoEveryInc:mainfrom
galligan wants to merge 2 commits intoEveryInc:mainfrom
Conversation
The bridge client was missing editV2 support entirely. Adds: - EditV2BlockOp union type matching server's operation types - EditV2Input interface with correct field names (baseRevision, operations) matching server/agent-edit-v2.ts - editV2() method on the bridge client Closes EveryInc#22 🤘🏻 In-collaboration-with: [Claude Code](https://claude.com/claude-code)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d8c1418cc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The server reads idempotency keys from the Idempotency-Key header, not from the request body. Extract idempotencyKey from EditV2Input and send it as a header so the server's idempotency flow works correctly when IDEMPOTENCY_KEY_REQUIRED is enabled. 🤘🏻 In-collaboration-with: [Claude Code](https://claude.com/claude-code)
Author
|
Addressed in ef33f1c. The |
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
The
@proof/agent-bridgeclient is missingeditV2support. The issue (#22) reported mismatched field names (revision/opsvsbaseRevision/operations), but the root cause is that theeditV2method and types don't exist in the bridge client at all.This adds:
EditV2BlockOp— discriminated union matching all six server operation types (replace_block,insert_after,insert_before,delete_block,replace_range,find_replace_in_block)EditV2Input— interface with correct field names (baseRevision,operations) matchingserver/agent-edit-v2.tseditV2()method on the bridge client, posting to/documents/:slug/edit/v2Test plan
createAgentBridgeClient(config).editV2(slug, { by, baseRevision, operations })sends correct payloadCloses #22
🤘🏻 In-collaboration-with: Claude Code