Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the app to each reference page mermaid diagram to clarify how mes… #80

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/agent-bridging/ref/PrivateChannel.broadcast.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ Some additional tracking of PrivateChannel metadata is required on the Desktop A

```mermaid
sequenceDiagram
box Desktop Agent A
participant AA as App A
participant DA as Desktop Agent A
end
participant DAB as Desktop Agent Bridge
participant DB as Desktop Agent B
participant DC as Desktop Agent C
DA ->>+ DAB: PrivateChannel.broadcast
DAB ->>+ DB: PrivateChannel.broadcast
AA --) DA: privateChannel.broadcast()
DA ->> DAB: PrivateChannel.broadcast
DAB ->> DB: PrivateChannel.broadcast
```

## Request format
Expand Down
8 changes: 6 additions & 2 deletions docs/agent-bridging/ref/PrivateChannel.eventListenerAdded.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ Private channels support a number of additional event listeners (`onAddContextLi

```mermaid
sequenceDiagram
box Desktop Agent A
participant AA as App A
participant DA as Desktop Agent A
end
participant DAB as Desktop Agent Bridge
participant DB as Desktop Agent B
participant DC as Desktop Agent C
DA ->>+ DAB: PrivateChannel.eventListenerAdded
DAB ->>+ DB: PrivateChannel.eventListenerAdded
AA --) DA: adds an event listener
DA ->> DAB: PrivateChannel.eventListenerAdded
DAB ->> DB: PrivateChannel.eventListenerAdded
```

## Request format
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ Private channels support a number of additional event listeners (`onAddContextLi

```mermaid
sequenceDiagram
box Desktop Agent A
participant AA as App A
participant DA as Desktop Agent A
end
participant DAB as Desktop Agent Bridge
participant DB as Desktop Agent B
participant DC as Desktop Agent C
DA ->>+ DAB: PrivateChannel.eventListenerRemoved
DAB ->>+ DB: PrivateChannel.eventListenerRemoved
AA --) DA: removes an event listener
DA ->> DAB: PrivateChannel.eventListenerRemoved
DAB ->> DB: PrivateChannel.eventListenerRemoved
```

## Request format
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ When a `ContextListener` is added to a `PrivateChannel` any applications that ha

```mermaid
sequenceDiagram
box Desktop Agent A
participant AA as App A
participant DA as Desktop Agent A
end
participant DAB as Desktop Agent Bridge
participant DB as Desktop Agent B
participant DC as Desktop Agent C
DA ->>+ DAB: PrivateChannel.onAddContextListener
DAB ->>+ DB: PrivateChannel.onAddContextListener
AA --) DA: privateChannel.addContextListener()
DA ->> DAB: PrivateChannel.onAddContextListener
DAB ->> DB: PrivateChannel.onAddContextListener
```

## Request format
Expand Down
8 changes: 6 additions & 2 deletions docs/agent-bridging/ref/PrivateChannel.onDisconnect.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ When the `disconnect` function is is called on a `PrivateChannel` any applicatio

```mermaid
sequenceDiagram
box Desktop Agent A
participant AA as App A
participant DA as Desktop Agent A
end
participant DAB as Desktop Agent Bridge
participant DB as Desktop Agent B
participant DC as Desktop Agent C
DA ->>+ DAB: PrivateChannel.onDisconnect
DAB ->>+ DB: PrivateChannel.onDisconnect
AA --) DA: privateChannel.disconnect()
DA ->> DAB: PrivateChannel.onDisconnect
DAB ->> DB: PrivateChannel.onDisconnect
```

### Request message schemas
Expand Down
4 changes: 4 additions & 0 deletions docs/agent-bridging/ref/PrivateChannel.onUnsubscribe.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ When a `ContextListener` is removed from a `PrivateChannel` (via `listener.unsub

```mermaid
sequenceDiagram
box Desktop Agent A
participant AA as App A
participant DA as Desktop Agent A
end
participant DAB as Desktop Agent Bridge
participant DB as Desktop Agent B
participant DC as Desktop Agent C
AA --) DA: listener.unsubscribe()
DA ->>+ DAB: PrivateChannel.onUnsubscribe
DAB ->>+ DB: PrivateChannel.onUnsubscribe
```
Expand Down
10 changes: 7 additions & 3 deletions docs/agent-bridging/ref/broadcast.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@ or

```mermaid
sequenceDiagram
box Desktop Agent A
participant AA as App A
participant DA as Desktop Agent A
end
participant DAB as Desktop Agent Bridge
participant DB as Desktop Agent B
participant DC as Desktop Agent C
DA ->>+ DAB: broadcastRequest
DAB ->>+ DB: broadcastRequest
DAB ->>+ DC: broadcastRequest
AA --) DA: fdc3.broadcast() / channel.broadcast()
DA ->> DAB: broadcastRequest
DAB ->> DB: broadcastRequest
DAB ->> DC: broadcastRequest
```

## Request format
Expand Down
13 changes: 9 additions & 4 deletions docs/agent-bridging/ref/findInstances.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,21 @@ let instances = await fdc3.findInstances({appId: "MyAppId", desktopAgent: "agent

```mermaid
sequenceDiagram
box Desktop Agent A
participant AA as App A
participant DA as Desktop Agent A
end
participant DAB as Desktop Agent Bridge
participant DB as Desktop Agent B
participant DC as Desktop Agent C
DA ->>+ DAB: findInstancesRequest
DAB ->>+ DB: findInstancesRequest
DAB ->>+ DC: findInstancesRequest
AA --) DA: fdc3.findInstances()
DA ->> DAB: findInstancesRequest
DAB ->> DB: findInstancesRequest
DAB ->> DC: findInstancesRequest
DB ->> DAB: findInstancesResponse (B)
DC ->> DAB: findInstancesResponse (C)
DAB -->>- DA: findInstancesResponse (B + C)
DAB ->> DA: findInstancesResponse (B + C)
DA --) AA: resolve (AppIdentifier[])
```

## Request format
Expand Down
17 changes: 11 additions & 6 deletions docs/agent-bridging/ref/findIntent.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,21 @@ let appIntent = await fdc3.findIntent("StartChat", context);

```mermaid
sequenceDiagram
box Desktop Agent A
participant AA as App A
participant DA as Desktop Agent A
end
participant DAB as Desktop Agent Bridge
participant DB as Desktop Agent B
participant DC as Desktop Agent C
DA ->>+ DAB: findIntentRequest
DAB ->>+ DB: findIntentRequest
DAB ->>+ DC: findIntentRequest
DB -->>- DAB: findIntentResponse (B)
DC -->>- DAB: findIntentResponse (C)
DAB -->>- DA: findIntentResponse (B + C)
AA --) DA: fdc3.findIntent()
DA ->> DAB: findIntentRequest
DAB ->> DB: findIntentRequest
DAB ->> DC: findIntentRequest
DB ->> DAB: findIntentResponse (B)
DC ->> DAB: findIntentResponse (C)
DAB ->> DA: findIntentResponse (B + C)
DA --) AA: resolve (AppIntent)
```

## Request format
Expand Down
17 changes: 11 additions & 6 deletions docs/agent-bridging/ref/findIntentsByContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,21 @@ The message exchanges for this API call are nearly identical to that used for [`

```mermaid
sequenceDiagram
box Desktop Agent A
participant AA as App A
participant DA as Desktop Agent A
end
participant DAB as Desktop Agent Bridge
participant DB as Desktop Agent B
participant DC as Desktop Agent C
DA ->>+ DAB: findIntentsByContextRequest
DAB ->>+ DB: findIntentsByContextRequest
DAB ->>+ DC: findIntentsByContextRequest
DB -->>- DAB: findIntentsByContextResponse (B)
DC -->>- DAB: findIntentsByContextResponse (C)
DAB -->>- DA: findIntentsByContextResponse (B + C)
AA --) DA: fdc3.findIntentsByContext
DA ->> DAB: findIntentsByContextRequest
DAB ->> DB: findIntentsByContextRequest
DAB ->> DC: findIntentsByContextRequest
DB ->> DAB: findIntentsByContextResponse (B)
DC ->> DAB: findIntentsByContextResponse (C)
DAB ->> DA: findIntentsByContextResponse (B + C)
DA --) AA: resolve (AppIntent[])
```

## Request format
Expand Down
11 changes: 8 additions & 3 deletions docs/agent-bridging/ref/getAppMetadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,19 @@ let appMetadata = await fdc3.getAppMetadata(appIdentifier);

```mermaid
sequenceDiagram
box Desktop Agent A
participant AA as App A
participant DA as Desktop Agent A
end
participant DAB as Desktop Agent Bridge
participant DB as Desktop Agent B
participant DC as Desktop Agent C
DA ->>+ DAB: getAppMetadataRequest
DAB ->>+ DB: getAppMetadataRequest
AA --) DA: fdc3.getAppMetadata()
DA ->> DAB: getAppMetadataRequest
DAB ->> DB: getAppMetadataRequest
DB ->> DAB: getAppMetadataResponse (B)
DAB -->>- DA: getAppMetadataResponse (B)
DAB ->> DA: getAppMetadataResponse (B)
DA --) AA: resolve (AppMetadata)
```

## Request format
Expand Down
13 changes: 9 additions & 4 deletions docs/agent-bridging/ref/open.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,19 @@ If the remote Desktop Agent is not currently connected from the bridge, the [`Op

```mermaid
sequenceDiagram
box Desktop Agent A
participant AA as App A
participant DA as Desktop Agent A
end
participant DAB as Desktop Agent Bridge
participant DB as Desktop Agent B
participant DC as Desktop Agent C
DA ->>+ DAB: openRequest
DAB ->>+ DB: openRequest
DB -->>- DAB: openResponse
DAB -->>- DA: openResponse
AA --) DA: fdc3.open()
DA ->> DAB: openRequest
DAB ->> DB: openRequest
DB ->> DAB: openResponse
DAB ->> DA: openResponse
DA --) AA: resolve (AppIdentifier)
```

## Request format
Expand Down
19 changes: 13 additions & 6 deletions docs/agent-bridging/ref/raiseIntent.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,23 @@ Agent-C is not involved in the diagram below as the `raiseIntent` is always spec

```mermaid
sequenceDiagram
box Desktop Agent A
participant AA as App A
participant DA as Desktop Agent A
end
participant DAB as Desktop Agent Bridge
participant DB as Desktop Agent B
participant DC as Desktop Agent C
DA ->>+ DAB: raiseIntentRequest
DAB ->>+ DB: raiseIntentRequest
DB -->>- DAB: raiseIntentResponse
DAB -->>- DA: raiseIntentResponse
DB ->>+ DAB: raiseIntentResultResponse
DAB ->>+ DA: raiseIntentResultResponse
AA --) DA: fdc3.raiseIntent
DA ->> DAB: raiseIntentRequest
DAB ->> DB: raiseIntentRequest
DB ->> DAB: raiseIntentResponse
DAB ->> DA: raiseIntentResponse
DA -->> AA: resolve (IntentResolution)
AA --) DA: resolution.getResult()
DB ->> DAB: raiseIntentResultResponse
DAB ->> DA: raiseIntentResultResponse
DA --) AA: resolve (IntentResult)
```

## Request format
Expand Down