feat: Add Be and tbd skill, also added Roadmap file

This commit is contained in:
2026-05-10 16:32:12 -04:00
parent 3500ade13f
commit 0bb8885802
29587 changed files with 10611695 additions and 0 deletions

5
Skills/@be/node_modules/jibo-command-library/docs.md generated vendored Normal file
View File

@@ -0,0 +1,5 @@
# Jibo Documentation
| Module | Description |
| ------ | ----------- |
| [jibo.command](jibo.command.html) | Jibo's Command Library for the App Toolkit. |

View File

@@ -0,0 +1,55 @@
/**
* Interface for 'clients' of the command library.
* would be sent down to the comman dlibrary
* groups (buttons, labels, .etc) Has base methods that deal with display
* and positioning.
*
* @interface ICommandClient
*/
/**
* Constructor
* @param {string} id identifier for the CommandConnector
* @param {CommandLibrary} commandLib instance of the CommandLibrary, required to setup connection
* @param {boolean} [isReady = true] flag determining if session can begin immediately,
* if false then the owner of the CommandConnector is responsible for setting this flag
* @private
*/
/**
* Called by client to activate connection with command library
* @param {ACO} aco permissions for this connection
* @param {MessageOut} [responseCB] handler for responses coming from the CommandLibrary
* @param {SessionClosed} [sessionEndedCB] handler for session being closed
*/
/**
* Called by client or command library to end connection.
* @param {DisconnectCode} [code = DisconnectCode.RobotError] code for reason of disconnection, maps to DisconnectCode enum.
* DisconnectCode enum is meant to be an addition to those values already defined in the Websocket API
* @return {boolean} `false` if not connected, thus nothing to disconnect
*/
/**
* Called by connector owner to indicate the connection is down, but it may return.
* Command library will starts a reconnect timeout upon receivig this.
*/
/**
* Called by connector owner to send command request to command library.
*/
/**
* Called by connector owner to let command library know a message failed to be sent.
*/
/**
* Called by connector owner when ready for session to begin.
* Use of ready may not always be required.
*/
/**
* Called by command library to provide a proxy
* @param {CommandProxy} commandProxy proxy object used to communicate with CommandLibrary
* @private
*/

View File

@@ -0,0 +1,20 @@
/**
* Proxy for CommandLibrary
*/
/**
* Called by Command Library to send response message out
* @private
*/
/**
* Called by Command Library when session is closed by commaand library
* Generally called due to inactivity or reconnect timeout
* @private
*/
/**
* Called by Command Library to notify when session has started.
* You can get this same information for the start session response, this is a convenience method
* @private
*/

View File

@@ -0,0 +1,18 @@
/**
* Check if command's session id does not match with active session
* @param {string} sessionId
*/
/**
* Intercept and handle StartSession commands, because they are more of a pain to do with the component system
* @param data
*/
/**
* Reconnect an existing session or create a new one.
* New sessions rely on the pending session command supplied by checkSessionCommand
*/
/**
* Called in case of disconnection, determines if a session restore is possible
*/

View File

@@ -0,0 +1,3 @@
/**
* Indicates if the engine has an active update loop.
*/

View File

@@ -0,0 +1,11 @@
/**
* Set acknowledgement code, set dirty flag true
*/
/**
* Add response, set dirty flag true
*/
/**
* Set complete flag to true, set dirty flag true
*/

View File

@@ -0,0 +1,65 @@
/**
* The default class for managing a NodeList. This class creates the NodeList and adds and removes
* nodes to/from the list as the entities and the components in the engine change.
*
* It uses the basic entity matching pattern of an entity system - entities are added to the list if
* they contain components matching all the public properties of the node class.
*/
/**
* The constructor. Creates a ComponentMatchingFamily to provide a NodeList for the
* given node class.
*
* @param nodeClass The type of node to create and manage a NodeList for.
* @param engine The engine that this family is managing teh NodeList for.
*/
/**
* The nodelist managed by this family. This is a reference that remains valid always
* since it is retained and reused by Systems that use the list. i.e. we never recreate the list,
* we always modify it in place.
*/
/**
* Called by the engine when an entity has been added to it. We check if the entity should be in
* this family's NodeList and add it if appropriate.
*/
/**
* Called by the engine when a component has been added to an entity. We check if the entity is not in
* this family's NodeList and should be, and add it if appropriate.
*/
/**
* Called by the engine when a component has been removed from an entity. We check if the removed component
* is required by this family's NodeList and if so, we check if the entity is in this this NodeList and
* remove it if so.
*/
/**
* Called by the engine when an entity has been rmoved from it. We check if the entity is in
* this family's NodeList and remove it if so.
*/
/**
* Removes all nodes from the NodeList.
*/
/**
* Initialises the class. Creates the nodelist and other tools. Analyses the node to determine
* what component types the node requires.
*/
/**
* If the entity is not in this family's NodeList, tests the components of the entity to see
* if it should be in this NodeList and adds it if so.
*/
/**
* Removes the entity if it is in this family's NodeList.
*/
/**
* Releases the nodes that were added to the node pool during this engine update, so they can
* be reused.
*/

View File

@@ -0,0 +1,40 @@
/**
* An object pool for re-using components. This is not integrated in to Ash but is used dierectly by
* the developer. It expects components to not require any parameters in their constructor.
*
* <p>Fetch an object from the pool with</p>
*
* <p>ComponentPool.get( ComponentClass );</p>
*
* <p>If the pool contains an object of the required type, it will be returned. If it does not, a new object
* will be created and returned.</p>
*
* <p>The object returned may have properties set on it from the time it was previously used, so all properties
* should be reset in the object once it is received.</p>
*
* <p>Add an object to the pool with</p>
*
* <p>ComponentPool.dispose( component );</p>
*
* <p>You will usually want to do this when removing a component from an entity. The remove method on the entity
* returns the component that was removed, so this can be done in one line of code like this</p>
*
* <p>ComponentPool.dispose( entity.remove( component ) );</p>
*/
/**
* Get an object from the pool.
*
* @param componentClass The type of component wanted.
* @return The component.
*/
/**
* Return an object to the pool for reuse.
*
* @param component The component to return to the pool.
*/
/**
* Dispose of all pooled resources, freeing them for garbage collection.
*/

View File

@@ -0,0 +1,130 @@
/**
* The Engine class is the central point for creating and managing your game state. Add
* entities and systems to the engine, and fetch families of nodes from the engine.
*/
/**
* Indicates if the engine is currently in its update loop.
*/
/**
* Dispatched when the update loop ends. If you want to add and remove systems from the
* engine it is usually best not to do so during the update loop. To avoid this you can
* listen for this signal and make the change when the signal is dispatched.
*/
/**
* The class used to manage node lists. In most cases the default class is sufficient
* but it is exposed here so advanced developers can choose to create and use a
* different implementation.
*
* The class must implement the Family interface.
*/
/**
* Add an entity to the engine.
*
* @param entity The entity to add.
*/
/**
* Remove an entity from the engine.
*
* @param entity The entity to remove.
*/
/**
* Get an entity based on its name.
*
* @param name The name of the entity
* @return The entity, or null if no entity with that name exists on the engine
*/
/**
* Remove all entities from the engine.
*/
/**
* Returns a vector containing all the entities in the engine.
*/
/**
* Get a collection of nodes from the engine, based on the type of the node required.
*
* <p>The engine will create the appropriate NodeList if it doesn't already exist and
* will keep its contents up to date as entities are added to and removed from the
* engine.</p>
*
* <p>If a NodeList is no longer required, release it with the releaseNodeList method.</p>
*
* @param nodeClass The type of node required.
* @return A linked list of all nodes of this type from all entities in the engine.
*/
/**
* If a NodeList is no longer required, this method will stop the engine updating
* the list and will release all references to the list within the framework
* classes, enabling it to be garbage collected.
*
* <p>It is not essential to release a list, but releasing it will free
* up memory and processor resources.</p>
*
* @param nodeClass The type of the node class if the list to be released.
*/
/**
* Add a system to the engine, and set its priority for the order in which the
* systems are updated by the engine update loop.
*
* <p>The priority dictates the order in which the systems are updated by the engine update
* loop. Lower numbers for priority are updated first. i.e. a priority of 1 is
* updated before a priority of 2.</p>
*
* @param system The system to add to the engine.
* @param priority The priority for updating the systems during the engine loop. A
* lower number means the system is updated sooner.
*/
/**
* Get the system instance of a particular type from within the engine.
*
* @param type The type of system
* @return The instance of the system type that is in the engine, or
* null if no systems of this type are in the engine.
*/
/**
* Returns a vector containing all the systems in the engine.
*/
/**
* Remove a system from the engine.
*
* @param system The system to remove from the engine.
*/
/**
* Remove all systems from the engine.
*/
/**
* Request an update
*/
/**
* Update the engine. This causes the engine update loop to run, calling update on all the
* systems in the engine.
*
* <p>The package net.richardlord.ash.tick contains classes that can be used to provide
* a steady or variable tick that calls this update method.</p>
*
* @time The duration, in seconds, of this update step.
*/
/**
* @private
*/
/**
* @private
*/

View File

@@ -0,0 +1,88 @@
/**
* An entity is composed from components. As such, it is essentially a collection object for components.
* Sometimes, the entities in a game will mirror the actual characters and objects in the game, but this
* is not necessary.
*
* <p>Components are simple value objects that contain data relevant to the entity. Entities
* with similar functionality will have instances of the same components. So we might have
* a position component</p>
*
* <p><code>public class PositionComponent
* {
* public var x : Number;
* public var y : Number;
* }</code></p>
*
* <p>All entities that have a position in the game world, will have an instance of the
* position component. Systems operate on entities based on the components they have.</p>
*/
/**
* This signal is dispatched when a component is added to the entity.
*/
/**
* This signal is dispatched when a component is removed from the entity.
*/
/**
* Dispatched when the name of the entity changes. Used internally by the engine to track entities based on their names.
*/
/**
* Optional, give the entity a name. This can help with debugging and with serialising the entity.
*/
/**
* The constructor
*
* @param name The name for the entity. If left blank, a default name is assigned with the form _entityN where N is an integer.
*/
/**
* All entities have a name. If no name is set, a default name is used. Names are used to
* fetch specific entities from the engine, and can also help to identify an entity when debugging.
*/
/**
* Add a component to the entity.
*
* @param component The component object to add.
* @param componentClass The class of the component. This is only necessary if the component
* extends another component class and you want the framework to treat the component as of
* the base class type. If not set, the class type is determined directly from the component.
*
* @return A reference to the entity. This enables the chaining of calls to add, to make
* creating and configuring entities cleaner. e.g.
*
* <code>var entity : Entity = new Entity()
* .add( new Position( 100, 200 )
* .add( new Display( new PlayerClip() );</code>
*/
/**
* Remove a component from the entity.
*
* @param componentClass The class of the component to be removed.
* @return the component, or null if the component doesn't exist in the entity
*/
/**
* Get a component from the entity.
*
* @param componentClass The class of the component requested.
* @return The component, or null if none was found.
*/
/**
* Get all components from the entity.
*
* @return An array containing all the components that are on the entity.
*/
/**
* Does the entity have a component of a particular type.
*
* @param componentClass The class of the component sought.
* @return true if the entity has a component of the type, false if not.
*/

View File

@@ -0,0 +1,4 @@
/**
* An internal class for a linked list of entities. Used inside the framework for
* managing the entities.
*/

View File

@@ -0,0 +1,35 @@
/**
* The interface for classes that are used to manage NodeLists (set as the familyClass property
* in the Engine object). Most developers don't need to use this since the default implementation
* is used by default and suits most needs.
*/
/**
* Returns the NodeList managed by this class. This should be a reference that remains valid always
* since it is retained and reused by Systems that use the list. i.e. never recreate the list,
* always modify it in place.
*/
/**
* An entity has been added to the engine. It may already have components so test the entity
* for inclusion in this family's NodeList.
*/
/**
* An entity has been removed from the engine. If it's in this family's NodeList it should be removed.
*/
/**
* A component has been added to an entity. Test whether the entity's inclusion in this family's
* NodeList should be modified.
*/
/**
* A component has been removed from an entity. Test whether the entity's inclusion in this family's
* NodeList should be modified.
*/
/**
* The family is about to be discarded. Clean up all properties as necessary. Usually, you will
* want to empty the NodeList at this time.
*/

View File

@@ -0,0 +1,22 @@
/**
* A useful class for systems which simply iterate over a set of nodes, performing the same action on each node. This
* class removes the need for a lot of boilerplate code in such systems. Extend this class and pass the node type and
* a node update method into the constructor. The node update method will be called once per node on the update cycle
* with the node instance and the frame time as parameters. e.g.
*
* <code>package
* {
* public class MySystem extends ListIteratingSystem
* {
* public function MySystem()
* {
* super( MyNode, updateNode );
* }
*
* private function updateNode( node : MyNode, time : Number ) : void
* {
* // process the node here
* }
* }
* }</code>
*/

View File

@@ -0,0 +1,21 @@
/**
* The base class for a node.
*
* <p>A node is a set of different components that are required by a system.
* A system can request a collection of nodes from the engine. Subsequently the Engine object creates
* a node for every entity that has all of the components in the node class and adds these nodes
* to the list obtained by the system. The engine keeps the list up to date as entities are added
* to and removed from the engine and as the components on entities change.</p>
*/
/**
* The entity whose components are included in the node.
*/
/**
* Used by the NodeList class. The previous node in a node list.
*/
/**
* Used by the NodeList class. The next node in a node list.
*/

View File

@@ -0,0 +1,74 @@
/**
* A collection of nodes.
*
* <p>Systems within the engine access the components of entities via NodeLists. A NodeList contains
* a node for each Entity in the engine that has all the components required by the node. To iterate
* over a NodeList, start from the head and step to the next on each loop, until the returned value
* is null.</p>
*
* <p>for( var node : Node = nodeList.head; node; node = node.next )
* {
* // do stuff
* }</p>
*
* <p>It is safe to remove items from a nodelist during the loop. When a Node is removed form the
* NodeList it's previous and next properties still point to the nodes that were before and after
* it in the NodeList just before it was removed.</p>
*/
/**
* The first item in the node list, or null if the list contains no nodes.
*/
/**
* The last item in the node list, or null if the list contains no nodes.
*/
/**
* A signal that is dispatched whenever a node is added to the node list.
*
* <p>The signal will pass a single parameter to the listeners - the node that was added.</p>
*/
/**
* A signal that is dispatched whenever a node is removed from the node list.
*
* <p>The signal will pass a single parameter to the listeners - the node that was removed.</p>
*/
/**
* true if the list is empty, false otherwise.
*/
/**
* Swaps the positions of two nodes in the list. Useful when sorting a list.
*/
/**
* Performs an insertion sort on the node list. In general, insertion sort is very efficient with short lists
* and with lists that are mostly sorted, but is inefficient with large lists that are randomly ordered.
*
* <p>The sort function takes two nodes and returns a Number.</p>
*
* <p><code>function sortFunction( node1 : MockNode, node2 : MockNode ) : Number</code></p>
*
* <p>If the returned number is less than zero, the first node should be before the second. If it is greater
* than zero the second node should be before the first. If it is zero the order of the nodes doesn't matter
* and the original order will be retained.</p>
*
* <p>This insertion sort implementation runs in place so no objects are created during the sort.</p>
*/
/**
* Performs a merge sort on the node list. In general, merge sort is more efficient than insertion sort
* with long lists that are very unsorted.
*
* <p>The sort function takes two nodes and returns a Number.</p>
*
* <p><code>function sortFunction( node1 : MockNode, node2 : MockNode ) : Number</code></p>
*
* <p>If the returned number is less than zero, the first node should be before the second. If it is greater
* than zero the second node should be before the first. If it is zero the order of the nodes doesn't matter.</p>
*
* <p>This merge sort implementation creates and uses a single Vector during the sort operation.</p>
*/

View File

@@ -0,0 +1,28 @@
/**
* This internal class maintains a pool of deleted nodes for reuse by the framework. This reduces the overhead
* from object creation and garbage collection.
*
* Because nodes may be deleted from a NodeList while in use, by deleting Nodes from a NodeList
* while iterating through the NodeList, the pool also maintains a cache of nodes that are added to the pool
* but should not be reused yet. They are then released into the pool by calling the releaseCache method.
*/
/**
* Creates a pool for the given node class.
*/
/**
* Fetches a node from the pool.
*/
/**
* Adds a node to the pool.
*/
/**
* Adds a node to the cache
*/
/**
* Releases all nodes from the cache into the pool
*/

View File

@@ -0,0 +1,50 @@
/**
* The base class for a system.
*
* <p>A system is part of the core functionality of the game. After a system is added to the engine, its
* update method will be called on every frame of the engine. When the system is removed from the engine,
* the update method is no longer called.</p>
*
* <p>The aggregate of all systems in the engine is the functionality of the game, with the update
* methods of those systems collectively constituting the engine update loop. Systems generally operate on
* node lists - collections of nodes. Each node contains the components from an entity in the engine
* that match the node.</p>
*/
/**
* Used internally to manage the list of systems within the engine. The previous system in the list.
*/
/**
* Used internally to manage the list of systems within the engine. The next system in the list.
*/
/**
* Used internally to hold the priority of this system within the system list. This is
* used to order the systems so they are updated in the correct order.
*/
/**
* Called just after the system is added to the engine, before any calls to the update method.
* Override this method to add your own functionality.
*
* @param engine The engine the system was added to.
*/
/**
* Called just after the system is removed from the engine, after all calls to the update method.
* Override this method to add your own functionality.
*
* @param engine The engine the system was removed from.
*/
/**
* After the system is added to the engine, this method is called every frame until the system
* is removed from the engine. Override this method to add your own functionality.
*
* <p>If you need to perform an action outside of the update loop (e.g. you need to change the
* systems in the engine and you don't want to do it while they're updating) add a listener to
* the engine's updateComplete signal to be notified when the update loop completes.</p>
*
* @param time The duration, in seconds, of the frame.
*/

View File

@@ -0,0 +1,3 @@
/**
* Used internally, this is an ordered list of Systems for use by the engine update loop.
*/

View File

@@ -0,0 +1,3 @@
/**
* A node in the list of listeners in a signal.
*/

View File

@@ -0,0 +1,4 @@
/**
* This internal class maintains a pool of deleted listener nodes for reuse by framework. This reduces
* the overhead from object creation and garbage collection.
*/

View File

@@ -0,0 +1,3 @@
/**
* Provides a fast signal for use where no parameters are dispatched with the signal.
*/

View File

@@ -0,0 +1,3 @@
/**
* Provides a fast signal for use where one parameter is dispatched with the signal.
*/

View File

@@ -0,0 +1,3 @@
/**
* Provides a fast signal for use where two parameters are dispatched with the signal.
*/

View File

@@ -0,0 +1,3 @@
/**
* Provides a fast signal for use where three parameters are dispatched with the signal.
*/

View File

@@ -0,0 +1,3 @@
/**
* The base class for all the signal classes.
*/

View File

@@ -0,0 +1,5 @@
/**
* The interface for a tick provider. A tick provider dispatches a regular update tick
* to act as the heartbeat for the engine. It has methods to start and stop the tick and
* to add and remove listeners for the tick.
*/

View File

@@ -0,0 +1,5 @@
/**
* AttentionSystem pushes attention modes to the expression service.
* This system works to maintain that only one mode is pushed at a time.
* When all AttentionNodes are removed the attention mode will return the underlying mode.
*/

View File

@@ -0,0 +1,5 @@
/**
* AttentionSystem pushes attention modes to the expression service.
* This system works to maintain that only one mode is pushed at a time.
* When all AttentionNodes are removed the attention mode will return the underlying mode.
*/

View File

@@ -0,0 +1,5 @@
/**
* Disables HJ listening or allows for HJ only listening
* TODO :: for now we do NOT support HJ with a listen, though we will want to allow this support eventually.
* @param {boolean} enable
*/

View File

@@ -0,0 +1,4 @@
/**
* NOT IN USE YET
* For now we just have support for input poisition, getting specific gestures poses more difficulty
*/

View File

@@ -0,0 +1,5 @@
/**
* AttentionSystem pushes attention modes to the expression service.
* This system works to maintain that only one mode is pushed at a time.
* When all AttentionNodes are removed the attention mode will return the underlying mode.
*/

View File

@@ -0,0 +1,120 @@
/**
* Singleton instance of CommandLibrary.
* @type {CommandLibrary}
* @readOnly
* @private
*/
/**
* CommandLibrary constructor
* @param {any} jibo Instance of jibo runtime
* @param {boolean} [validate = true] Flag deteremining if CommandLibrary shoudl validate protocol, `false` used for testing
*/
/**
* Gets singleton instance of CommandLibrary.
*/
/**
* Destroy CommandLibrary and nullify its singleton
*/
/**
* Create a CommandConnector.
* If there is alreayd a CommandConnector registered with taht id it will return that CommandConnector.
*/
/**
* Remove reference to CommandConnector.
* If the given CommandConnector is the active it will be disconnected.
*/
/**
* Remove reference to CommandConnector by id.
* If the given CommandConnector is the active it will be disconnected.
*/
/**
* Connect delegate to command library
* private - only called by via CommandConnector.connect()
* @private
*/
/**
* Returns a Promise that resolves on completion of entity engine update.
* Convenience method for testing purposes
* @return {Promise<void>} - Promise resolving on completion of entity engine update
* @private
*/
/**
* Returns a entity Engine
* Convenience method for testing purposes
* @return {Engine} - entity engine of current command session
* @private
*/
/**
* Method to pass commands.
* @method CommandManager#onMessage
* @param {Command} data
* @private
*/
/**
* Handler for responses that could not be deliver, returned via a CommandConnector
* @private
*/
/**
* Start a session.
* @private
*/
/**
* Called by CommandConnector when a connection is lost, but a reconnect is desired.
* Would get called in the case of connection disruption.
* @private
*/
/**
* Called to disconnect current connection.
* Sends disconnect request to currently active CommandConnector
* @private
*/
/**
* End the current session and nullify active connection and connection proxy
* @private
*/
/**
* Converts ACO into a Permissions object for use by the CommandLibrary
* @private
*/
/**
* Create protocol validators for supported protocol versions
* Will need to add validators for each supported protocol
* @private
*/
/**
* Checks if data fits the protocol format of the current connection.
* @private
*/
/**
* Checks if version matches active version, if not send appropriate response code
* @private
*/
/**
* Checks if version string is incluced in set of supported protocols
* @private
*/
/**
* Helper method to send acknowledgements
* @private
*/

View File

@@ -0,0 +1,3 @@
/**
* @private
*/

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,50 @@
{
"name": "jibo-command-library",
"version": "4.0.6",
"description": "Library for handling RCP requests in the skill process",
"main": "lib/jibo-command-library.js",
"typings": "dts/index.d.ts",
"scripts": {
"build": "gulp debug",
"build:release": "gulp",
"clean": "gulp clean",
"watch": "gulp watch",
"test:debug": "gulp test --debug",
"test": "gulp test && istanbul report",
"test:report": "gulp test-report",
"docs": "gulp docs",
"docs:public": "gulp docs-public"
},
"engines": {
"node": ">=6.0"
},
"dependencies": {
"@types/jibo-command-protocol": "^2.0.0",
"ajv": "^5.2.2",
"jibo-node-xml": "^7.0.0",
"jibo-command-protocol": "^4.0.0",
"jibo-common-types": "^4.0.0",
"jibo-log": "^5.0.0",
"uuid": "^3.0.1",
"@jibo/three": "^3.0.0"
},
"devDependencies": {
"@types/node": "6.0.94",
"@types/pixi.js": "^4.0.0",
"gulp": "^3.9.1",
"istanbul": "0.4.5",
"jibo-gulp": "^8.0.0",
"jibo-typed-events": "^6.0.0",
"pixi.js": "^4.5.1"
},
"repository": {
"type": "git",
"url": "git@github.jibo.com:sdk/sdk.git"
},
"files": [
"lib"
],
"license": "UNLICENSED",
"distribution": "PROPRIETARY AND CONFIDENTIAL - NOT FOR DISTRIBUTION",
"copyright": "Copyright (c) 2014-2018 Jibo, Inc. All Rights Reserved"
}

View File

@@ -0,0 +1,17 @@
{
"compilerOptions": {
"target": "es6",
"allowJs": false,
"module": "commonjs",
"moduleResolution": "node",
"noUnusedLocals": true,
"experimentalDecorators": true,
"typeRoots": ["./node_modules/@types", "../../node_modules/@types"],
"types": ["node", "pixi.js", "jibo-command-protocol"]
},
"compileOnSave": false,
"include": [
"src/**/*.ts",
"typings/index.d.ts"
]
}

View File

@@ -0,0 +1,3 @@
{
"extends": "../../tslint_base.json"
}