Skip to content

Add getAgent opt-in flags for own broadcasts and self intent resolution - #1984

Open
Roaders wants to merge 1 commit into
mainfrom
feature/self-interaction-flags
Open

Add getAgent opt-in flags for own broadcasts and self intent resolution#1984
Roaders wants to merge 1 commit into
mainfrom
feature/self-interaction-flags

Conversation

@Roaders

@Roaders Roaders commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Implements #1751 and #1860 by adding two optional booleans to GetAgentParams:

  • receiveOwnBroadcasts: when set, the Desktop Agent delivers an app's own broadcasts back to it. Defaults to false (current behaviour).
  • resolveOwnIntents: when set, the raising app's own instance is considered when resolving an intent it raised. Defaults to false (current behaviour); other instances of the same app remain eligible either way.

The flags travel on the WCP4ValidateAppIdentity handshake message and are stored per-instance by the reference Desktop Agent (each instance of an app may connect with different getAgent options). BroadcastHandler makes its self-delivery filter conditional on receiveOwnBroadcasts; IntentHandler excludes the raising instance (by instanceId) unless resolveOwnIntents is set, dropping any AppIntent left with no resolvers so a self-only intent yields NoAppsFound.

Updates the API spec, getAgent, broadcast, Channel and raiseIntent/ raiseIntentForContext documentation (including net-new intent self-resolution wording), regenerates schema types, and adds conformance/BDD tests.

Related Issue

fixes #1751
fixes #1860

Contributor License Agreement

  • I acknowledge that a contributor license agreement is required and that I have one in place or will seek to put one in place ASAP.

Review Checklist

  • Issue: If a change was made to the FDC3 Standard, was an issue linked above?
  • CHANGELOG: Is a CHANGELOG.md entry included?
  • API changes: Does this PR include changes to any of the FDC3 APIs (DesktopAgent, Channel, PrivateChannel, Listener, Bridging)?
    • Docs & Sources: If yes, were both documentation (/docs) and sources updated?

      JSDoc comments on interfaces and types should be matched to the main documentation in /docs
    • Conformance tests: If yes, are conformance test definitions (/toolbox/fdc3-conformance) still correct and complete?

      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
    • Schemas: If yes, were changes applied to the Bridging and FDC3 for Web protocol schemas?

      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
      • If yes, was code generation (npm run build) run and the results checked in?

        Generated code will be found at /src/api/BrowserTypes.ts and/or /src/bridging/BridgingTypes.ts
  • Context types: Were new Context type schemas created or modified in this PR?
    • Were the field type conventions adhered to?
    • Was the BaseContext schema applied via allOf (as it is in existing types)?
    • Was a title and description provided for all properties defined in the schema?
    • Was at least one example provided?
    • Was code generation (npm run build) run and the results checked in?

      Generated code will be found at /src/context/ContextTypes.ts
  • Intents: Were new Intents created in this PR?

@Roaders
Roaders requested a review from a team as a code owner July 15, 2026 07:11
@netlify

netlify Bot commented Jul 15, 2026

Copy link
Copy Markdown

Deploy Preview for fdc3 ready!

Name Link
🔨 Latest commit 6acc383
🔍 Latest deploy log https://app.netlify.com/projects/fdc3/deploys/6a87012973c0a4000761260d
😎 Deploy Preview https://deploy-preview-1984.preview-fdc3.finos.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

.map(listener => ({ appId: listener.appId, instanceId: listener.instanceId, state: State.Connected }))
.filter(appRegistration => allIntents.every(intent => intent.appId !== appRegistration.appId)); // filter out apps that have intents registered in the directory

const runningApps: AppRegistration[] = [...runningDirectoryApps, ...appRegistrations].filter(

@Roaders Roaders Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug confirmed in existing reference implementation. The app that raises the intent is considered as a target for the intent:

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add a conformance test that ensures that an app will return a result rather than select itself as an intent target?

@codecov-commenter

codecov-commenter commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.42857% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.10%. Comparing base (13a47ff) to head (6acc383).

Files with missing lines Patch % Lines
...or-web/fdc3-web-impl/src/handlers/IntentHandler.ts 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1984      +/-   ##
==========================================
- Coverage   95.11%   95.10%   -0.01%     
==========================================
  Files          73       73              
  Lines        4196     4212      +16     
  Branches      581      602      +21     
==========================================
+ Hits         3991     4006      +15     
- Misses        205      206       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Roaders Roaders added this to the FDC3 3.1 milestone Jul 16, 2026
@Roaders
Roaders force-pushed the feature/self-interaction-flags branch from 62b8197 to a10da25 Compare July 23, 2026 07:50
Implements #1751 and #1860 by adding two optional booleans to GetAgentParams:

- receiveOwnBroadcasts: when set, the Desktop Agent delivers an app's own
  broadcasts back to it. Defaults to false (current behaviour).
- resolveOwnIntents: when set, the raising app's own instance is considered
  when resolving an intent it raised. Defaults to false (current behaviour);
  other instances of the same app remain eligible either way.

The flags travel on the WCP4ValidateAppIdentity handshake message and are
stored per-instance by the reference Desktop Agent (each instance of an app
may connect with different getAgent options). BroadcastHandler makes its
self-delivery filter conditional on receiveOwnBroadcasts; IntentHandler
excludes the raising instance (by instanceId) unless resolveOwnIntents is set,
dropping any AppIntent left with no resolvers so a self-only intent yields
NoAppsFound.

Updates the API spec, getAgent, broadcast, Channel and raiseIntent/
raiseIntentForContext documentation (including net-new intent self-resolution
wording), regenerates schema types, and adds conformance/BDD tests.
@Roaders
Roaders force-pushed the feature/self-interaction-flags branch from a10da25 to 6acc383 Compare August 20, 2026 13:29
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.

Question: Resolving raised intents to the app that raised them Allow apps to decide if they receive their own broadcast messages

2 participants