FDC3 icon indicating copy to clipboard operation
FDC3 copied to clipboard

Missing `desktopAgent` from `ImplementationMetadata`

Open tpina opened this issue 2 years ago • 1 comments

Minor Issue

Bridging API should've extended the ImplementationMetadata element to include an optional desktopAgent field to be used by a Desktop Agent Bridge

Area of Issue

[ ] App Directory [x] API [ ] Context Data [ ] Intents [ ] Use Cases [ ] Other

Issue Description:

The API Bridging Spec on the Connected Agents Update section in the message format snippet for the allAgents field mentions that:

        /** Desktop Agent Bridge implementation metadata of all connected agents. 
         *  Note that this object is extended to include a `desktopAgent` field 
         *  with the name assigned by the DAB. */
        allAgents: ImplementationMetadata[]

The baseImplementationMetadata.schema.json file does not contain the above mentioned extended field.

Additional Context:

Without the addition of this field, to comply with the bridging spec, a custom type must be used.

tpina avatar Sep 05 '23 13:09 tpina

The desktopAgent field is a member of the AppIdentifier, but not yet ImplementationMetadata. As a workaround, in the FDC3 2.1 version a Desktop Agent can provide its assigned name to an app via the appIdentifier field, e.g. (await fdc3.getInfo()).appMetadata.desktopAgent. But I agree this is odd and it should be included in the ImplementationMetadata - ensuring that the format of that object doesn't change whether it is used through the FDC3 API or bridging API.

kriswest avatar Sep 05 '23 15:09 kriswest

Actually I think there are two issues here:

  1. AppMetadata is required in ImplementationMetadata, where its not needed/relevant in the bridging connection step 6 (which relates to a DA only and not a specific app). This is the actual difference between ImplementationMetadata and BaseImplementationMetadata
  2. It would be useful for it to include the name of the Desktop Agent assigned by the bridge, which is currently missing.

We shouldn't make AppMetadata optional in ImplementationMetadata where it is used in the FDC3 API and called by apps. Hence, we should probably create two different types derived from the base, one that includes AppMetadata for the API usage, the other a desktopAgentName field.

These types are currently fairly separate (manual TypeScript definition vs. JSON Schema definition) but with work on the Browser communication protocol they may be more closely linked in future. I'll have a poke at the schema definitions and make sure the regular version is preserved.

kriswest avatar Mar 26 '24 10:03 kriswest