feat(agent-bridge): add editV2 method with correct field names#32
Open
hnshah wants to merge 1 commit intoEveryInc:mainfrom
Open
feat(agent-bridge): add editV2 method with correct field names#32hnshah wants to merge 1 commit intoEveryInc:mainfrom
hnshah wants to merge 1 commit intoEveryInc:mainfrom
Conversation
Fixes EveryInc#22 The editV2() method was missing from the agent bridge client, and there was a field name mismatch between what developers might expect and what the server actually accepts. Server expects: - baseRevision (number) - operations (array of ops) This adds: - EditV2Input interface with correct field names - EditV2BlockOp union type covering all 6 operation types - editV2() client method that POSTs to /documents/:slug/edit/v2 - Idempotency-Key header support (automatically set from input.idempotencyKey) All field names now match the server implementation in server/agent-edit-v2.ts.
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.
Fixes #22
Problem
The
editV2()method was missing from the agent bridge client, and there was a field name mismatch between client expectations and server reality.Server expects (from
server/agent-edit-v2.ts):baseRevision(number)operations(array of block operations)What was missing:
editV2()method in the bridge clientSolution
This PR adds:
✅
EditV2Inputinterface with correct field names matching the server✅
EditV2BlockOpunion type covering all 6 operation types:replace_blockinsert_afterinsert_beforedelete_blockreplace_rangefind_replace_in_block✅
editV2()client method that POSTs to/documents/:slug/edit/v2✅ Idempotency-Key header support (auto-set from
input.idempotencyKey)Usage
Testing
server/agent-edit-v2.tsare coveredRelated
EditV2Inputtype sends wrong field names —revision/opsvs server'sbaseRevision/operations#22docs/agent-docs.mdexamples