Skip to main content

ConnectionRequestedEvent

@forge/monorepo


@forge/monorepo / backend/src / ConnectionRequestedEvent

Type Alias: ConnectionRequestedEvent

ConnectionRequestedEvent = EventBase<"connection.requested"> & object

Defined in: backend/src/core/events.ts:110

The run needs a connection, and here is where to get one — task #264.

Its own event rather than an InteractionEvent, because it carries different things: an interaction id names a stored question or approval, and this names a provider, the scopes being asked for, and a URL. Folding it in would mean an interactionId for something that is not one.

It carries no secret. Not the client secret, not a token, not the PKCE verifier. This is rendered in a UI and clicked by a person, so it goes wherever a screenshot goes.

Type Declaration

expiresAt

readonly expiresAt: string

When the login URL stops working, so a client can offer a fresh one rather than a dead link.

loginUrl

readonly loginUrl: string

Where to send the person. Single-use and TTL-bounded — see the OAuth flow's state.

provider

readonly provider: string

scopes

readonly scopes: readonly string[]

What the consent will ask for, so a UI can say what is being granted.

toolName?

readonly optional toolName?: string

Which tool stalled, so a transcript reads coherently.