Add suggestion_id to prompt chip and passive-suggestion result (REV-2138) - #364
Draft
warp-agent-staging[bot] wants to merge 1 commit into
Draft
Add suggestion_id to prompt chip and passive-suggestion result (REV-2138)#364warp-agent-staging[bot] wants to merge 1 commit into
warp-agent-staging[bot] wants to merge 1 commit into
Conversation
REV-2138 needs an opaque, server-minted id for a prompt-suggestion offer so the server can substitute its own stored prompt text on accept instead of trusting the client-authored string. - ToolCall.SuggestPrompt.PromptChip.suggestion_id (field 3): stamped on the chip the server streams. - PassiveSuggestionResultType.suggestion_id (field 5): round-tripped by the client on accept. Putting it on the shared type covers both the request input (Input.UserInputs.PassiveSuggestionResultInput.result) and the persisted history message (Message.PassiveSuggestionResult.result). Regenerated the Go bindings with ./script/generate -a multi_agent -v v1.
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Warp Factory.
|
Contributor
Author
|
This PR was generated with Warp. Comment |
2 tasks
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.



Description
Adds an opaque, server-minted offer id to the two prompt-suggestion wire surfaces:
ToolCall.SuggestPrompt.PromptChip.suggestion_id— field 3 (task.proto). The server stamps this on each chip it streams.PassiveSuggestionResultType.suggestion_id— field 5 (task.proto; 1–4 were taken by thetriggerandsuggestiononeofs). The client round-trips it verbatim when the user accepts a chip.suggestion_idsits on the sharedPassiveSuggestionResultTyperather than onInput.UserInputs.PassiveSuggestionResultInputso one field covers both the accept request input (PassiveSuggestionResultInput.result) and the persisted history message (Message.PassiveSuggestionResult.result), which is exactly the request shape the spec calls for (passive_suggestion_result { suggestion_id, prompt }).No existing field is renumbered, reused, or reserved. This PR is only the id plumbing — no server or client behavior.
Justification
Part of REV-2138 — Free-user credit allowance for prompt-suggestion agent runs, implementing the
warp-proto-apisslice of the approved spec in warpdotdev/warp-server#15272 (specs/REV-2138/{PRODUCT,TECH}.md).The prompt text on an accept request is client-authored today, so a client can send any string and have it run against the new free-tier allowance (TECH.md §5). The fix is an offer vault: the server persists the prompt text it generated, mints a single-use
suggestion_id, puts that id on the streamed chip, and substitutes its stored text for whatever the client sends when the id redeems. That requires an id on both surfaces, which is what this change adds.Mapping to the spec:
suggestion_idon the streamedPromptChip(proto-apis)."click: input.user_inputs[] = passive_suggestion_result { suggestion_id, prompt }.suggestion_idonPromptChipandPassiveSuggestionResult."Both fields are optional and unset by existing clients and by the server until the warp-server and warp changes land. An absent, unknown, expired, or already-redeemed id is not an error — the request falls through to the ordinary allowance waterfall with the client's text, per TECH.md §5 step 1 — so this can merge ahead of the other two repos. Ship order per the spec is proto → server → client.
Sensitive Fields
suggestion_idis an opaque server-generated identifier, not user content, so it is deliberately not marked(sensitive). No other string field is added or changed.sensitive.Validation
./script/generate -a multi_agent -v v1(protoc 30.2, protoc-gen-go v1.36.6) — regeneratedapis/multi_agent/v1/gen/go/task.pb.go, committed.git diff -I '^[[:space:]]*//.*(protoc|protoc-gen-go)[[:space:]]*v[0-9]', the same expressioncheck-generated-code.ymluses) is empty, so the checked-in Go is up to date. The other 14.pb.gofiles only differ in the// protoc vXheader comment this environment's protoc emits, which that check ignores by design, so they are left untouched.cd apis/multi_agent && go build ./... && go vet ./...— clean.cargo buildandcargo test— clean; confirmed the build script's compile-time Rust bindings containpub suggestion_id: ::prost::alloc::string::Stringon both messages.Not touched:
apis/multi_agent/v1/gen/python, whichscript/generatedoes not produce and which is already stale relative tomain.