diff --git a/package-lock.json b/package-lock.json index 0652c8f69..410c89855 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16956,7 +16956,7 @@ }, "src/sdks/core": { "name": "@firebolt-js/sdk", - "version": "1.2.0-next.5", + "version": "1.2.0", "license": "Apache-2.0", "devDependencies": { "jest": "^28.1.0", @@ -16967,7 +16967,7 @@ }, "src/sdks/discovery": { "name": "@firebolt-js/discovery-sdk", - "version": "1.2.0-next.2", + "version": "1.2.0", "license": "Apache-2.0", "devDependencies": { "jest": "^28.1.0", @@ -16978,7 +16978,7 @@ }, "src/sdks/manage": { "name": "@firebolt-js/manage-sdk", - "version": "1.2.0-next.5", + "version": "1.2.0", "license": "Apache-2.0", "devDependencies": { "jest": "^28.1.0", diff --git a/requirements/specifications/extnSDK/CertificationExtensionSDK.png b/requirements/specifications/extnSDK/CertificationExtensionSDK.png new file mode 100644 index 000000000..eb744c0e6 --- /dev/null +++ b/requirements/specifications/extnSDK/CertificationExtensionSDK.png @@ -0,0 +1,53 @@ +title Firebolt Extension for Certification + +participant DeveloperTools #lightpink +note over DeveloperTools: e.g. FCS + +participantgroup #lightgreen **Firebolt Implementation** +participant FireboltExtn +end + +participantgroup #lightblue **Firebolt Compatible Provider** +participant Plugin +end + +note over Plugin: e.g. \nWindow Manager \nScreenshot Capture + + + +group Firebolt compatible provider command and control +DeveloperTools -> FireboltExtn: {"jsonrpc": "2.0", "method": "commandAndControl", \n"params": [], "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 Firebolt compatible provider screen capture + +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",\n "method": "platformHealthCheck","id": "1"} + +note over FireboltExtn: Healthcheck snapshot includes \nprocess memory usage, load, \nlive connections etc. + +FireboltExtn -> DeveloperTools: {id:0, "jsonrpc": "2.0", result: {healthCheckData}} + +end + +group App performance snapshot +DeveloperTools -> FireboltExtn: {"jsonrpc": "2.0", \n"method": "appHealthCheck",\n"params":, "id": "1"} + +note over FireboltExtn: App performance snapshot \nincludes memory usage, load etc. + +FireboltExtn -> Plugin: Request fullfil +Plugin -> FireboltExtn: {id:0, "jsonrpc": "2.0", result: {appPerformanceData}} + +FireboltExtn -> DeveloperTools: {id:0, "jsonrpc": "2.0", result: {appPerformanceData}} + +end \ No newline at end of file diff --git a/requirements/specifications/extnSDK/CertificationExtensionSDK.txt b/requirements/specifications/extnSDK/CertificationExtensionSDK.txt new file mode 100644 index 000000000..eb744c0e6 --- /dev/null +++ b/requirements/specifications/extnSDK/CertificationExtensionSDK.txt @@ -0,0 +1,53 @@ +title Firebolt Extension for Certification + +participant DeveloperTools #lightpink +note over DeveloperTools: e.g. FCS + +participantgroup #lightgreen **Firebolt Implementation** +participant FireboltExtn +end + +participantgroup #lightblue **Firebolt Compatible Provider** +participant Plugin +end + +note over Plugin: e.g. \nWindow Manager \nScreenshot Capture + + + +group Firebolt compatible provider command and control +DeveloperTools -> FireboltExtn: {"jsonrpc": "2.0", "method": "commandAndControl", \n"params": [], "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 Firebolt compatible provider screen capture + +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",\n "method": "platformHealthCheck","id": "1"} + +note over FireboltExtn: Healthcheck snapshot includes \nprocess memory usage, load, \nlive connections etc. + +FireboltExtn -> DeveloperTools: {id:0, "jsonrpc": "2.0", result: {healthCheckData}} + +end + +group App performance snapshot +DeveloperTools -> FireboltExtn: {"jsonrpc": "2.0", \n"method": "appHealthCheck",\n"params":, "id": "1"} + +note over FireboltExtn: App performance snapshot \nincludes memory usage, load etc. + +FireboltExtn -> Plugin: Request fullfil +Plugin -> FireboltExtn: {id:0, "jsonrpc": "2.0", result: {appPerformanceData}} + +FireboltExtn -> DeveloperTools: {id:0, "jsonrpc": "2.0", result: {appPerformanceData}} + +end \ No newline at end of file diff --git a/requirements/specifications/extnSDK/CertificationExtensionSDK_Ripple.png b/requirements/specifications/extnSDK/CertificationExtensionSDK_Ripple.png new file mode 100644 index 000000000..236573217 Binary files /dev/null and b/requirements/specifications/extnSDK/CertificationExtensionSDK_Ripple.png differ diff --git a/requirements/specifications/extnSDK/CertificationExtensionSDK_Ripple.txt b/requirements/specifications/extnSDK/CertificationExtensionSDK_Ripple.txt new file mode 100644 index 000000000..35697aa0c --- /dev/null +++ b/requirements/specifications/extnSDK/CertificationExtensionSDK_Ripple.txt @@ -0,0 +1,98 @@ +title Firebolt Extension on Ripple for Certification + +participant DeveloperTools #lightpink +note over DeveloperTools: e.g. FCS + +participantgroup #lightgreen **Ripple** + +participant Communication +note over Communication: e.g. \nBolt-Linchpin \nWebsocket + +participant FireboltExtn +participant Core +participant Rules Engine +end + +participantgroup #lightblue **Thunder** +participant Thunder Plugin +end + +participantgroup #lightyellow **Gateway** +participant App Service +end + +note over Rules Engine: e.g. \nSystem, Applications + +note over Thunder Plugin: e.g. \nWindow Manager + + +group communication subscription +DeveloperTools -> Communication: Establish communication +note over DeveloperTools, Communication: subscribe linchpin or \nwebsocket connection + +Communication -> DeveloperTools: acknowledgement +Communication -> FireboltExtn: {"jsonrpc":"2.0","method":"onFireboltInterections", \n"params":{"listen":true},"id":1} +FireboltExtn -> Communication: {"jsonrpc":"2.0", "id":1,"result":{"listening":true,\n"event":"onFireboltInterections"}} +end + +group Firebolt Interactions +FireboltExtn -> Core: request forward +Core -> FireboltExtn: Interactions +FireboltExtn -> Communication: {id:0, "jsonrpc": "2.0", result: {interactions}} +Communication -> DeveloperTools: {id:0, "jsonrpc": "2.0", result: {interactions}} +end + +group Thunder call for Command and Control +DeveloperTools -> Communication: Instructions to execute thunder call \nfor command and control +Communication -> FireboltExtn: {"jsonrpc": "2.0", "method": "commandAndControl", \n"params": [], "id": "1"} +FireboltExtn -> Rules Engine: request forward +Rules Engine -> Thunder Plugin: Request fullfil and respond back + +note over Rules Engine, Thunder Plugin: Request goes to \nWindowManager or \nrelated plugin + +Thunder Plugin -> Rules Engine: response forward +Rules Engine -> FireboltExtn: {id:0, "jsonrpc": "2.0", result: "true"} +FireboltExtn -> Communication: {id:0, "jsonrpc": "2.0", result: "true"} +Communication -> DeveloperTools : {id:0, "jsonrpc": "2.0", result: "true"} +end + +group Thunder call for Screen Capture +DeveloperTools -> Communication: Instructions to execute thunder call \nfor Screen Capture +Communication -> FireboltExtn: {"jsonrpc": "2.0", "method": "screenCapture", \n"params": [], "id": "1"} +FireboltExtn -> Rules Engine: request forward +Rules Engine -> Thunder Plugin: Request fullfil and respond back + +note over Rules Engine, Thunder Plugin: Request goes to \nScreenCapture or \nrelated plugin + +Thunder Plugin -> Rules Engine: response forward +Rules Engine -> FireboltExtn: {id:0, "jsonrpc": "2.0", result: "true"} +FireboltExtn -> Communication: {id:0, "jsonrpc": "2.0", result: "true"} +Communication -> DeveloperTools : {id:0, "jsonrpc": "2.0", result: "true"} +end + +group Health Check +DeveloperTools -> Communication: Instructions to get platform \nhealth check snapshot +Communication -> FireboltExtn: {"jsonrpc": "2.0", "method": "healthCheck","id": "1"} +FireboltExtn -> Core: request forward + +note over FireboltExtn: Healthcheck snapshot includes \nRipple process memory, load \nlive connections, etc. + + +Core -> FireboltExtn: {id:0, "jsonrpc": "2.0", result: {healthCheckData} +FireboltExtn -> Communication: {id:0, "jsonrpc": "2.0", result: {healthCheckData} +Communication -> DeveloperTools : {id:0, "jsonrpc": "2.0", result: {healthCheckData}} +end + +group App performance snapshot +DeveloperTools -> FireboltExtn: {"jsonrpc": "2.0", "method": "appPerformance",\n"params":, "id": "1"} + +note over FireboltExtn: App performance snapshot \nincludes memory usage, load etc. + +FireboltExtn -> Thunder Plugin: Request fullfil +Thunder Plugin -> App Service: Request fullfil +App Service -> Thunder Plugin: {id:0, "jsonrpc": "2.0", \nresult: {appPerformanceData}} +Thunder Plugin -> Rules Engine: {id:0, "jsonrpc": "2.0", \nresult: {appPerformanceData}} +Rules Engine -> FireboltExtn: {id:0, "jsonrpc": "2.0", \nresult: {appPerformanceData}} +FireboltExtn -> DeveloperTools: {id:0, "jsonrpc": "2.0", \nresult: {appPerformanceData}} + +end \ No newline at end of file diff --git a/requirements/specifications/extnSDK/certification-extension-sdk.md b/requirements/specifications/extnSDK/certification-extension-sdk.md new file mode 100644 index 000000000..15b76cdaa --- /dev/null +++ b/requirements/specifications/extnSDK/certification-extension-sdk.md @@ -0,0 +1,34 @@ +# Firebolt Extension for Certification + +Document Status: Proposed Specification + +See [Firebolt Requirements Governance](../../governance.md) for more info. + +## 1. Overview +Document contains the details around Firebolt Extension for Certification (will be called as FEC in rest of the document) and HLA for the same. + + +## 2. Table of Contents +- [Requirements](#requirements) +- [HLA](#hla) + +## 3. Requirements +FEC would required below use cases to adhere. + + - Platform Health check Statistics + - Statistics from Firebolt-Implementation such as load, memory usage, how many firebolt connections are currently active, and what apps + - Capability: xrn:firebolt:capability:certification:healthcheck + - App Health check Statistics + - Snapshot of the performance for app such as load, and memory + - Capability: xrn:firebolt:capability:certification:healthcheck + - Firebolt compatible provider calls + - Command and Control + - To control the firebolt compatible device e.g. interaction on screen, media playback control + - Capability: xrn:firebolt:capability:certification:commandandcontrol + - Screenshot + - Fetch the screenshot and uploads stores in the device + - Capability: xrn:firebolt:capability:certification:screencapture + +## 4. HLA + +![Sequence Diagram for Certification Extension SDk](CertificationExtensionSDK.png) \ No newline at end of file diff --git a/src/openrpc/certificationextension.json b/src/openrpc/certificationextension.json new file mode 100644 index 000000000..fc6bd8740 --- /dev/null +++ b/src/openrpc/certificationextension.json @@ -0,0 +1,323 @@ +{ + "openrpc": "1.2.4", + "info": { + "title": "CertificationExtension", + "description": "CertificationExtension provides various methods to get platform and/or app specific details which would be required for certification.", + "version": "0.0.0" + }, + "methods": [ + { + "name": "deviceInteractions", + "tags": [ + { + "name": "capabilities", + "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" + } + } + ], + "result": { + "name": "success", + "summary": "whether the call was successful or not", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "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": "playbackControl", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:certification:interactions" + ] + } + ], + "summary": "Performs controlling actions of in-progress playback on firebolt compatible devices.", + "params": [ + { + "name": "intent", + "required": true, + "summary": "A `PlaybackControlIntent` with details what playback control needs to be performed.", + "schema": { + "$ref": "https://meta.comcast.com/firebolt/intents#/definitions/PlaybackControlIntent" + } + } + ], + "result": { + "name": "success", + "summary": "whether the call was successful or not", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Pause the in-progress playback", + "params": [ + { + "name": "intent", + "value": { + "action": "pause", + "context": { + "source": "voice" + } + } + } + ], + "result": { + "name": "Default Result", + "value": true + } + } + ] + }, + { + "name": "getScreenshot", + "tags": [ + { + "name": "capabilities", + "x-uses": [ + "xrn:firebolt:capability:certification:screencapture" + ] + } + ], + "summary": "Fetch the current screen on the device and upload to the given server", + "params": [], + "result": { + "name": "success", + "summary": "whether the call was successful or not", + "schema": { + "type": "boolean" + } + }, + "examples": [ + { + "name": "Screen capture and sends back the status", + "params": [], + "result": { + "name": "Default Result", + "value": true + } + } + ] + }, + { + "name": "onScreenshotComplete", + "tags": [ + { + "name": "event" + }, + { + "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": "imageStream", + "value": "AAAAAAAAAA" + } + } + ] + }, + { + "name": "platformHealthCheck", + "summary": "Health check for the device and process. It provides the load, memory, cpu usage and total live firebolt connections.", + "tags": [ + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:certification:healthcheck", + "x-allow-focus": true + } + ], + "params": [], + "result": { + "name": "healthCheckResult", + "summary": "Result of the interaction", + "schema": { + "$ref": "#/components/schemas/PlatformHealthCheckResult" + } + }, + "examples": [ + { + "name": "Snapshots for the device and process", + "params": [], + "result": { + "name": "healthCheckResult", + "value": { + "cpuLoad1minAverage": 2.2, + "cpuLoad5minAverage": 1.8, + "deviceMemoryUsed": 886, + "deviceMemoryLimit": 1024, + "processMemoryPSS": 500, + "processMemoryRSS": 600, + "activeConnections": 10 + } + } + } + ] + }, + { + "name": "appHealthCheck", + "summary": "App healthCheck", + "tags": [ + { + "name": "capabilities", + "x-provides": "xrn:firebolt:capability:certification:appperformancedata", + "x-allow-focus": true + } + ], + "params": [ + { + "name": "appId", + "required": true, + "summary": "The id of the app for which the performance snapshot is required", + "schema": { + "type": "string" + } + } + ], + "result": { + "name": "appPerformanceResult", + "summary": "Result of the interaction", + "schema": { + "$ref": "#/components/schemas/AppHealthCheckResult" + } + }, + "examples": [ + { + "name": "Performance snapshot for the given app", + "params": [ + { + "name": "appId", + "value": "foo" + } + ], + "result": { + "name": "appPerformanceResult", + "value": { + "memory": 0.5, + "cpu": 0.5 + } + } + } + ] + } + ], + "components": { + "schemas": { + "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": [ + "cpuLoad1minAverage", + "cpuLoad5minAverage", + "deviceMemoryUsed", + "deviceMemoryLimit", + "processMemoryPSS", + "processMemoryRSS", + "activeConnections" + ], + "properties": { + "cpuLoad1minAverage": { + "type": "number", + "description": "The load average of the system for 1 min, typically known as short term load." + }, + "cpuLoad5minAverage": { + "type": "number", + "description": "The load average of the system for 5 min, typically known as mid term load." + }, + "processMemoryPSS": { + "type": "number", + "description": "Process memory usage as proportional set size (PSS) in KB. This data provides a way to account for memory shared between processes more accurately" + }, + "processMemoryRSS": { + "type": "number", + "description": "Process memory usage as resident set size (RSS) in KB. It represents the portion of a process's memory that is held in RAM" + }, + "deviceMemoryUsed": { + "type": "number", + "description": "The memory usage of the device" + }, + "deviceMemoryLimit": { + "type": "number", + "description": "Total memory limit of the device" + }, + "activeConnections": { + "type": "number", + "description": "The total number of active firebolt connections" + } + } + }, + "AppHealthCheckResult": { + "title": "AppHealthCheckResult", + "description": "Performance snapshot for the given appId which includes memory usage, cpu usage.", + "type": "object", + "required": [ + "memory", + "cpu" + ], + "properties": { + "memory": { + "type": "number", + "description": "The memory usage of the app" + }, + "cpu": { + "type": "number", + "description": "The cpu usage of the the app" + } + } + } + } + } +} \ No newline at end of file