Skip to content

fix(api): the answer after the link says where the connection stands - #336

Merged
rami-hatoum merged 3 commits into
mainfrom
the-answer-after-the-link-says-where-the-connection-stands
Oct 26, 2026
Merged

rami-hatoum merged 3 commits into
mainfrom
the-answer-after-the-link-says-where-the-connection-stands

Conversation

@rami-hatoum

Copy link
Copy Markdown
Contributor

A person's agent calls add_connection; a client that opens links is asked to open the approval page; the person opens it, approves, allows the provider and is sent back, then presses the client's "I'm done, continue". The client retries the call, and the server answered the retry with the answer it had kept before the page was opened: the connection pending, with its link. The agent then told the person to open a link that their approval had already used up.

The answer after the link now says where the connection stands. On the retry the server reads the connection as it is: connected, with no link and words that say nothing is left to open; pending while its link lasts, with the link and the words that say to open it, since the person may have pressed continue without approving; pending with its link gone, with words that say to remove it and add it again; or removed, when the person cancelled on the page, with words that say nothing is connected. Where the client says the person declined to open the page, the words say so and the link is in the answer. The request state keeps what the re-read needs rather than the whole answer; a retry by another caller or in another org is refused as before, and no retry adds a second connection. A client that does not open links gets the answer with the link, unchanged.

The mechanism stays general: beside the link a tool offers, its definition says how it answers the retry after the link, a read that gives the fresh output, so the tool layer knows nothing of connections. The operations package's entry stops exporting types nothing outside the package uses. The MCP reference and the connections guide say what the retry answers, and the OpenAPI document carries connect only while there is a link to open.

rami-hatoum and others added 3 commits October 26, 2026 19:48
A client that opens links retried add_connection after the person came back from the page, and
the retry was answered with the answer kept before the page opened: the connection pending, with
a link that approval had already used up, so the agent asked the person to approve it again.

An operation that offers a link now also gives answerAfterTheLink: the id the link is for, and a
read that answers the output as it stands once the person is back. The request state keeps the
tool, the caller, the org, that id and the link offered, not the answer. The retry dispatches the
read under the call's arguments and never runs the operation again; a state for another tool is
no link offered, and another caller or org is refused by the state's binding as before. A
definition that gives one of linkToOpen and answerAfterTheLink without the other is refused, and
linkToOpen answers nothing for an output that holds no link, so a tool asks only where there is
one.

add_connection reads the connection by its id: connected with no link, pending with the link
while it lasts, pending without it once the link expired, or removed after Cancel on the page,
each in its own words. AddedSchema holds connect only while there is a link to open. Where the
client declined or cancelled the elicitation and the answer holds the link, the words say the
person declined to open the page. A client that does not open links is answered at once, link
included. The MCP reference, the journey in Let people add connections, the READMEs of api,
operations and connections and the kept OpenAPI document follow.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…tion

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@rami-hatoum
rami-hatoum merged commit a68caaa into main Oct 26, 2026
20 checks passed
@rami-hatoum
rami-hatoum deleted the the-answer-after-the-link-says-where-the-connection-stands branch October 26, 2026 20:10
rami-hatoum pushed a commit that referenced this pull request Oct 26, 2026
🤖 I have created a release *beep* *boop*
---


## [0.24.1](v0.24.0...v0.24.1) (2026-10-26)


### Bug Fixes

* **api:** the answer after the link says where the connection stands
  ([#336](#336)) ([a68caaa](ht
  tps://github.com/BeOnAuto/runtime/commit/a68caaa0c0b1f19eb9e9e7e2e5e6e
  8b5675a03ee))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.

1 participant