Draft
Conversation
✅ Deploy Preview for fdc3 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
9 tasks
Roaders
reviewed
Apr 25, 2025
| <!-- TODO: Describe the use-case for sub-agents without being overly focused on a particular platform (could make sense in web apps and monolithic apps built in other languages. | ||
| Ensure routing of channel messages and intent resolution are covered. | ||
| --> | ||
|
|
Contributor
There was a problem hiding this comment.
Suggested change
| In some scenarios, it may be necessary to load more than one `DesktopAgent` into the context of a single application or browser window (for web-based applications). This is particularly relevant in the context of micro-frontends, where different applications within the same window may need to communicate with each other. | |
| Using a single `DesktopAgent` per window does not allow separate applications within the same browser window to communicate with each other (this limitation does not apply if the application is loaded into an iframe which is considered to be a different browser window). | |
| To address this, sub-applications can use **sub-agents**. Sub-agents allow different sub-applications within a single window to communicate with each other. Here's an example of how to create and use a sub-agent: | |
| ```ts | |
| const subAgent: DesktopAgent = await (await getAgent()).getSubAgent({appId: "my-app@my-host.com"}); | |
| subAgent.raiseIntent("StartChat", context); |
This approach enables seamless communication between sub-agents in the same window.
Roaders
reviewed
Apr 28, 2025
| */ | ||
| getAppMetadata(app: AppIdentifier): Promise<AppMetadata>; | ||
|
|
||
| // TODO: add getSubAgent definition |
Contributor
There was a problem hiding this comment.
/**
Suggested change
| // TODO: add getSubAgent definition | |
| * @param {string} params Required parameters object, which must include | |
| * at least a fully qualified appId or appD URL for the application to | |
| * indicate the app's identity. | |
| * @param {string} params.appId The fully qualified appId | |
| * (in the form appid@<appd origin> for the application | |
| * @param {URL} params.appDUrl The URL to the appD record providing the | |
| * app's identity, used as an alternative to a fully qualified appId. | |
| * | |
| * @return A promise that resolves to a DesktopAgent implementation or | |
| * rejects if the app identity could not be validated. | |
| */ | |
| getSubAgent (params: GetSubAgentParams): Promise<DesktopAgent>; |
| open(app: AppIdentifier, context?: Context): Promise<AppIdentifier>; | ||
| findInstances(app: AppIdentifier): Promise<Array<AppIdentifier>>; | ||
| getAppMetadata(app: AppIdentifier): Promise<AppMetadata>; | ||
| // TODO: add getSubAgent |
Contributor
There was a problem hiding this comment.
Suggested change
| // TODO: add getSubAgent | |
| getSubAgent (params: GetSubAgentParams): Promise<DesktopAgent>; |
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.
Describe your change
Proposal stub for getSubAgent - raised to show where additions to the FDC3 Standard will be needed to handle the linked issues and to facilitate collaboration. Please feel free to raise PRs into the getSubAgent-proposal branch or comment and make suggestions to apply on the Files changed tab of this PR:
For more info making suggestions through PR reviews see GitHub's docs: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request#adding-comments-to-a-pull-request
Related Issue
resolves #1250
resolves #1263
Contributor License Agreement
Review Checklist
DesktopAgent,Channel,PrivateChannel,Listener,Bridging)?JSDoc comments on interfaces and types should be matched to the main documentation in /docs
Conformance test definitions should cover all required aspects of an FDC3 Desktop Agent implementation, which are usually marked with a MUST keyword, and optional features (SHOULD or MAY) where the format of those features is defined
The Web Connection protocol and Desktop Agent Communication Protocol schemas must be able to support all necessary aspects of the Desktop Agent API, while Bridging must support those aspects necessary for Desktop Agents to communicate with each other
npm run build) run and the results checked in?Generated code will be found at
/src/api/BrowserTypes.tsand/or/src/bridging/BridgingTypes.tsBaseContextschema applied viaallOf(as it is in existing types)?titleanddescriptionprovided for all properties defined in the schema?npm run build) run and the results checked in?Generated code will be found at
/src/context/ContextTypes.ts