Skip to content

Commit

Permalink
chore: API definition modification
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinshahfws committed Jun 26, 2024
1 parent 602ed5c commit 6486a41
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 106 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 3 additions & 11 deletions requirements/specifications/extnSDK/CertificationExtensionSDK.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ end
note over Plugin: e.g. \nWindow Manager \nScreenshot Capture


group Firebolt Interactions
DeveloperTools -> FireboltExtn: {"jsonrpc":"2.0","method":"onFireboltInterections", \n"params":{"listen":true},"id":1}

FireboltExtn -> DeveloperTools: {"jsonrpc":"2.0", "id":1,"result":{"listening":true,\n"event":"onFireboltInterections"}}

FireboltExtn -> DeveloperTools: {"jsonrpc": "2.0", id:1, result: {interactions}}

end

group Firebolt compatible provider command and control
DeveloperTools -> FireboltExtn: {"jsonrpc": "2.0", "method": "commandAndControl", \n"params": [<intent>], "id": "1"}
Expand All @@ -33,14 +25,14 @@ end

group Firebolt compatible provider screen capture

DeveloperTools -> FireboltExtn: {"jsonrpc": "2.0", "method": "captureScreenshot", \n"params": [<pathToUpload>], "id": "1"}
DeveloperTools -> FireboltExtn: {"jsonrpc": "2.0",\n "method": "captureScreenshot", "id": "1"}
FireboltExtn -> Plugin: Request fullfil
Plugin -> FireboltExtn: {id:0, "jsonrpc": "2.0", result: "true"}
FireboltExtn -> DeveloperTools : {id:0, "jsonrpc": "2.0", result: "true"}
end

group Health Check
DeveloperTools -> FireboltExtn: {"jsonrpc": "2.0", "method": "healthCheck","id": "1"}
DeveloperTools -> FireboltExtn: {"jsonrpc": "2.0",\n "method": "platformHealthCheck","id": "1"}

note over FireboltExtn: Healthcheck snapshot includes \nprocess memory usage, load, \nlive connections etc.

Expand All @@ -49,7 +41,7 @@ FireboltExtn -> DeveloperTools: {id:0, "jsonrpc": "2.0", result: {healthCheckDat
end

group App performance snapshot
DeveloperTools -> FireboltExtn: {"jsonrpc": "2.0", "method": "appPerformance",\n"params":<appId>, "id": "1"}
DeveloperTools -> FireboltExtn: {"jsonrpc": "2.0", \n"method": "appHealthCheck",\n"params":<appId>, "id": "1"}

note over FireboltExtn: App performance snapshot \nincludes memory usage, load etc.

Expand Down
17 changes: 7 additions & 10 deletions requirements/specifications/extnSDK/certification-extension-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,18 @@ Document contains the details around Firebolt Extension for Certification (will
## 3. Requirements
FEC would required below use cases to adhere.

- <b>Firebolt Interactions</b>
- Ability to fetch request and state of the response coming to/from platform
- Capability: <b>xrn:firebolt:capability:certification:fireboltinteractions</b>
- <b>Health check Statistics</b>
- Statistics from Firebolt-Implementation such as load, memory usage, how many firebolt connections are currently active, what apps, total requests, success and failure
- <b>Platform Health check Statistics</b>
- Statistics from Firebolt-Implementation such as load, memory usage, how many firebolt connections are currently active, and what apps
- Capability: <b>xrn:firebolt:capability:certification:healthcheck</b>
- <b>App Health check Statistics</b>
- Snapshot of the performance for app such as load, and memory
- Capability: <b>xrn:firebolt:capability:certification:healthcheck</b>
- <b>App performance Snapshot</b>
- Snapshot of the performance for app such as load, memory etc.
- Capability: <b>xrn:firebolt:capability:certification:appperformancedata</b>
- <b>Firebolt compatible provider calls</b>
- <b>Command and Control</b>
- To control the firebolt compatible device e.g. interaction on screen, media control
- To control the firebolt compatible device e.g. interaction on screen, media playback control
- Capability: <b>xrn:firebolt:capability:certification:commandandcontrol</b>
- <b>Screenshot</b>
- Fetch and upload the screenshot
- Fetch the screenshot and uploads stores in the device
- Capability: <b>xrn:firebolt:capability:certification:screencapture</b>

## 4. HLA
Expand Down
166 changes: 81 additions & 85 deletions src/openrpc/certificationextension.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,57 +7,75 @@
},
"methods": [
{
"name": "onFireboltInteractions",
"summary": "Event to fetch the interaction details for the firebolt api call",
"name": "deviceInteractions",
"tags": [
{
"name": "event"
},
{
"name": "capabilities",
"x-provides": "xrn:firebolt:capability:certification:fireboltinteractions",
"x-allow-focus": true
"x-uses": [
"xrn:firebolt:capability:certification:interactions"
]
}
],
"summary": "Performs interactions on firebolt compatible devices.",
"params": [
{
"name": "intent",
"required": true,
"summary": "A `DeviceIntent` with details what interaction needs to be performed.",
"schema": {
"$ref": "https://meta.comcast.com/firebolt/intents#/definitions/DeviceIntent"
}
}
],
"params": [],
"result": {
"name": "value",
"summary": "Result of the interaction",
"name": "success",
"summary": "whether the call was successful or not",
"schema": {
"$ref": "#/components/schemas/InteractionResult"
"type": "boolean"
}
},
"examples": [
{
"name": "Firebolt interaction to acquire device token",
"params": [],
"result": {
"name": "Default Result",
"value": {
"payload": "{\"request\":{\"type\":\"method\",\"method\":\"Authentication.device\"},\"response\":\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c\"}"
"name": "Interact with the app and go to Menu screen",
"params": [
{
"name": "intent",
"value": {
"action": "button",
"data": {
"operation": "menu"
},
"context": {
"source": "voice"
}
}
}
],
"result": {
"name": "Default Result",
"value": true
}
}
]
},
{
"name": "commandAndControl",
"name": "playbackControl",
"tags": [
{
"name": "capabilities",
"x-uses": [
"xrn:firebolt:capability:certification:commandandcontrol"
"xrn:firebolt:capability:certification:interactions"
]
}
],
"summary": "Performs interaction and media control on firebolt compatible devices.",
"summary": "Performs controlling actions of in-progress playback on firebolt compatible devices.",
"params": [
{
"name": "intent",
"required": true,
"summary": "An `PlatformIntent` with details what interaction or control needs to be performed.",
"summary": "A `PlaybackControlIntent` with details what playback control needs to be performed.",
"schema": {
"$ref": "#/components/schemas/PlatformIntent"
"$ref": "https://meta.comcast.com/firebolt/intents#/definitions/PlaybackControlIntent"
}
}
],
Expand All @@ -70,15 +88,12 @@
},
"examples": [
{
"name": "Interact with the app and go to Menu screen",
"name": "Pause the in-progress playback",
"params": [
{
"name": "intent",
"value": {
"action": "button",
"data": {
"operation": "menu"
},
"action": "pause",
"context": {
"source": "voice"
}
Expand All @@ -93,7 +108,7 @@
]
},
{
"name": "screenCapture",
"name": "getScreenshot",
"tags": [
{
"name": "capabilities",
Expand All @@ -103,50 +118,53 @@
}
],
"summary": "Fetch the current screen on the device and upload to the given server",
"params": [
{
"name": "uploadPath",
"required": false,
"summary": "An optional `path` where screenshot can be uploaded. If not provided, base64 encoded image stream will be returned in the response.",
"schema": {
"type": "string"
}
}
],
"params": [],
"result": {
"name": "success",
"summary": "whether the call was successful or not",
"schema": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "string"
}
]
"type": "boolean"
}
},
"examples": [
{
"name": "Screen capture and sends back the image stream with base64 encoded",
"name": "Screen capture and sends back the status",
"params": [],
"result": {
"name": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/wcAAgMBApDPF90AAAAASUVORK5CYII=",
"name": "Default Result",
"value": true
}
}
]
},
{
"name": "onScreenshotComplete",
"tags": [
{
"name": "event"
},
{
"name": "Screen capture and sends back the status",
"params": [
{
"name": "uploadPath",
"value": "http://example.com/upload"
}
],
"name": "capabilities",
"x-uses": [
"xrn:firebolt:capability:certification:screencapture"
]
}
],
"summary": "Listens for capturing the screenshot and provides the image data back in Base64 encoded format.",
"params": [],
"result": {
"name": "imageStream",
"schema": {
"type": "string"
}
},
"examples": [
{
"name": "Screenshot is taken",
"params": [],
"result": {
"name": "Default Result",
"value": true
"name": "imageStream",
"value": "AAAAAAAAAA"
}
}
]
Expand All @@ -166,7 +184,7 @@
"name": "healthCheckResult",
"summary": "Result of the interaction",
"schema": {
"$ref": "#/components/schemas/HealthCheckResult"
"$ref": "#/components/schemas/PlatformHealthCheckResult"
}
},
"examples": [
Expand Down Expand Up @@ -212,7 +230,7 @@
"name": "appPerformanceResult",
"summary": "Result of the interaction",
"schema": {
"$ref": "#/components/schemas/AppPerformanceSnapshotResult"
"$ref": "#/components/schemas/AppHealthCheckResult"
}
},
"examples": [
Expand All @@ -237,30 +255,8 @@
],
"components": {
"schemas": {
"InteractionResult": {
"title": "InteractionResult",
"type": "object",
"required": [
"payload"
],
"properties": {
"payload": {
"type": "string",
"description": "The stringyfy payload of the interaction contains firebolt api request and response"
}
}
},
"PlatformIntent": {
"title": "PlatformIntent",
"description": "A Firebolt compliant representation of a user intention to interact to a specific place in an app or control the media",
"anyOf": [
{
"$ref": "https://meta.comcast.com/firebolt/intents#/definitions/DeviceIntent"
}
]
},
"HealthCheckResult": {
"title": "HealthCheckResult",
"PlatformHealthCheckResult": {
"title": "PlatformHealthCheckResult",
"description": "Performance and healthcheck snapshot for the device and process which includes load, memory, cpu usage. It also provides total live firebolt connections.",
"type": "object",
"required": [
Expand Down Expand Up @@ -303,8 +299,8 @@
}
}
},
"AppPerformanceSnapshotResult": {
"title": "AppPerformanceSnapshotResult",
"AppHealthCheckResult": {
"title": "AppHealthCheckResult",
"description": "Performance snapshot for the given appId which includes memory usage, cpu usage.",
"type": "object",
"required": [
Expand Down

0 comments on commit 6486a41

Please sign in to comment.