-
Notifications
You must be signed in to change notification settings - Fork 132
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
Allow intents to be targeted at specific instances of apps #450
Comments
Proposal ADefine an interface AppInstance extends AppMetadata {
instanceId: string;
} simply extends the interface AppIntent {
intent: IntentMetadata;
apps: Array<AppMetadata | AppInstance>;
} and can use narrowing to determine the type of each response: let appIntent = await fdc3.findIntent("ViewChart", context);
appIntent.forEach((option) => {
if("instanceId" in option) {
//its an instance of an app
} else {
//just metadata for an app
}
}); Desktop agents would be expected to return both AppInstances and AppMetadata for apps that can be started (n.b. this allows for cases where an app can't be started for some reasons, which we have occasionally encountered, e.g. because they are singletons or integrated into the desktop in such a way that new instances can't be started). Similarly, the signatures of the type TargetApp = string | AppMetadata | AppInstance; which handles both the ability to specify an AppInstance as a target and the IntentResolution to return details of the instance (as it also leverages |
Proposal BCreate a new interface AppInstance {
instanceId: string;
//may be extended with other fields specific to Desktop Agent implementations...
}
interface AppMetadata {
name: string;
appId?: string;
version?: string;
title?: string;
tooltip?: string;
description?: string;
icons?: Array<string>;
images?: Array<string>;
instances?: Array<AppInstance>;
} Again the signature of However, this proposal becomes inelegant as soon as we start working with the
|
Supplementary proposalIf either proposal A or B are chosen, we may also wish to:
open(app: TargetApp, context?: Context): Promise<AppInstance>;
findInstances(app: TargetApp): Promise<Array<AppInstance>>; |
Hi @kriswest interface AppMetadata {
name: string;
appId?: string;
/**
* Unique id cross-agent / cross-workstations
* e.g. UUID or object containing a unique identifier - implementation specific to each desktop agent
*/
instanceId?: any;
version?: string;
title?: string;
tooltip?: string;
description?: string;
icons?: Array<string>;
images?: Array<string>;
instances?: Array<AppInstance>;
}
interface AppInstance extends AppMetadata {
instanceId: any;
//may be extended with other fields specific to Desktop Agent implementations...
} So you can use AppInstance when instanceId is mandatory and AppMetadata when it is optional... Note: I also put instanceId as any - as per yesterday discussions - but Desktop Agents using an object will have to ensure to always send back the same object reference when a given instanceId is 'reused', which will lead to extra implementation complexity (this problem doesn't exist with strings) |
Thanks @bertrand-s - I think some of the objections were to the introduction of the interface AppIntent {
intent: IntentMetadata;
apps: Array<AppMetadata | AppInstance>;
}
type TargetApp = string | AppMetadata | AppInstance; vs. interface AppIntent {
intent: IntentMetadata;
apps: Array<AppMetadata>;
}
type TargetApp = string | AppMetadata; Does I'm actually more concerned with whether we should standardize any metadata about the instance. The idea of making the instance data |
Enhancement Request
Use Case:
fdc3.raiseIntent
andfdc3.raiseIntentForContext
support an optionalapp?
argument that allow you to bypass an intent resolver UI when raising an intent and instead select a specific app type, which is further enabled via thefdc3.findIntent
andfdc3.findIntentForContext
functions which allow programmatic access to the resolver data.However, in a typical FDC3-enabled desktop there may be one or more instances of an application already open, which the user will often wish to deliver their intent and context to. This might be to any open instance or it might be to a specific instance of the application that has already interacted with the request in some way. There is, at present, no programmatic way to achieve this (although some desktop agents have implemented this behaviour via their resolver UIs) and no way to retrieve details of open application instances through the FDC3 APIs.
For example:
Additional information
There are a number of approaches that could be used to support AppInstances, however they will have to be made carefully in order to preserve backwards compatibility. Consideration should also be given to whether support for targeting specific instances of apps is required for FDC3 spec compliance or not.
The text was updated successfully, but these errors were encountered: