From e38ad5a508fccb5c724cf0f03cbd67ad4a28378c Mon Sep 17 00:00:00 2001 From: Jeremy LaCivita Date: Thu, 13 Jun 2024 09:38:32 -0400 Subject: [PATCH] fix: Remove x-alternatives that don't exist (#278) * fix: Remove x-alternatives that don't exist * fix: Cut ProviderPolicy from App Pass-through --- .../app-passthrough-apis.md | 32 ++++++------------- src/openrpc/discovery.json | 6 ++-- 2 files changed, 11 insertions(+), 27 deletions(-) diff --git a/requirements/specifications/openrpc-extensions/app-passthrough-apis.md b/requirements/specifications/openrpc-extensions/app-passthrough-apis.md index ec23922e6..826f7bed3 100644 --- a/requirements/specifications/openrpc-extensions/app-passthrough-apis.md +++ b/requirements/specifications/openrpc-extensions/app-passthrough-apis.md @@ -216,32 +216,18 @@ If the value was composed into the platform method result under a matching prope Finally the platform **MUST** dispatch the notification to the app that registered for the event via the original platform method, using all but the last parameter as context. ## 5. Provider Candidates -The Firebolt Device Manifist **MUST** have a list of `ProviderPolicy` configurations that map capabilities to policies for determining candidate providers: - -```json -{ - "providerPolicies": [ - { - "inFocus": true, - "capabilities": [ - "xrn:firebolt:capability:foo:bar" - ] - } - ] -} -``` -The policy **MUST** have a list of capabilities that it is applied to. - -A capability **MUST NOT** be included in more than one policy. - -The policy **MAY** have an `inFocus` boolean. - -If the policy has `inFocus` set to `true` then any app without RCU input focus when the capability is invoked **MUST NOT** be considered a candidate. +When a platform method with an `x-provided-by` extension is called, then +all loaded apps that have permission to provide the capability **MUST** be +considered as candidates to fulfill the method. ## 6. Best Candidate -If there is only one candidate then it **MUST** be the best candidate. +Any provider candidates that have not registered to provide the method in +question **MUST NOT** be considered the best candidate and removed from +consideration. + +If there is only one candidate left then it **MUST** be the best candidate. -If there is more than one candidate, then the candidate app that most recently had RCU input focus **MUST** be the best candidate. +If there is more than one candidate left, then the candidate app that most recently had RCU input focus **MUST** be the best candidate. If none of the candidates have had focus yet, then the candidate app that was most recently launched **MUST** be the best candidate. diff --git a/src/openrpc/discovery.json b/src/openrpc/discovery.json index 49b7e20aa..c3706de03 100644 --- a/src/openrpc/discovery.json +++ b/src/openrpc/discovery.json @@ -54,8 +54,7 @@ "x-provides": "xrn:firebolt:capability:discovery:entity-info" }, { - "name": "deprecated", - "x-alternative": "Discovery.details" + "name": "deprecated" } ], "summary": "Provide information about a program entity and its available watchable assets, such as entitlement status and price, via either a push or pull call flow.", @@ -430,8 +429,7 @@ "x-provides": "xrn:firebolt:capability:discovery:purchased-content" }, { - "name": "deprecated", - "x-alternative": "Discovery.purchases" + "name": "deprecated" } ], "summary": "Provide a list of purchased content for the authenticated account, such as rentals and electronic sell through purchases.",