{ "Subtree": { "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 200}, "description": "Executes a behavior tree (.bt) as a single behavior and returns the status of the subtree.", "type": "leaf", "options": [ { "type": "Subtree", "field": "behaviorPath", "description": "Select a subtree.", "defaultValue": "" }, { "type": "Function", "field": "getNotepad", "description": "Enter optional information to return an object that will be this tree's notepad.", "defaultValue": "() => {\n return {};\n}" }, { "type": "Function", "field": "onResult", "description": "Enter optional code that will be called with the subtree's results with the subtree is done.", "defaultValue": "(treeResult) => {\n}" } ] }, "SubtreeJs": { "description": "Dynamically executes a behavior tree (.bt) as a single behavior. This behavior returns the status of the subtree.", "type": "leaf", "options": [ { "type": "Function", "field": "getTree", "description": "Passes in a subtree module to the callback.", "defaultValue": "(callback) => {\n callback(require('./myBehaviorTree'));\n}" }, { "type": "Function", "field": "getNotepad", "description": "Enter optional information to return an object that will be this tree's notepad.", "defaultValue": "() => {\n return {};\n}" }, { "type": "Function", "field": "onResult", "description": "Enter optional code that will be called with the subtree's results with the subtree is done.", "defaultValue": "(treeResult) => {\n}" } ] }, "PlayAnimation": { "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 201}, "description": "Plays an animation. Succeeds when the animation is finished.", "type": "leaf", "options": [ { "type": ["enum", { "label": "Provide animation file path", "display": "Animation File Path", "value": 1, "options": [ { "type": "Animation", "field": "animPath", "description": "Select the animation file to play.", "defaultValue": "" }, { "type": "boolean", "field": "upload", "description": "True for uploading to the GPU immediately.", "defaultValue": true }, { "type": "boolean", "field": "preload", "description": "True for prevent flow start until this animation is loaded.", "defaultValue": false }, { "type": "Function", "field": "config", "description": "Enter optional code to modify the animation's playback.", "defaultValue": "(animation) => {\n}" } ] }, { "label": "Provide animation file path via function", "display": "Function returning Animation File Path", "value": 2, "options": [ { "type": "Function", "field": "animPathFunction", "description": "Enter a function returning the animation file path to play (relative to project's 'animations' folder).", "defaultValue": "() => {\n //return 'Greeting.keys';\n}" }, { "type": "boolean", "field": "upload", "description": "True for uploading to the GPU immediately.", "defaultValue": true }, { "type": "Function", "field": "config", "description": "Enter optional code to modify the animation's playback.", "defaultValue": "(animation) => {\n}" } ] }, { "label": "Provide animation name", "display": "Animation Name", "value": 3, "options": [ { "type": "AnimationName", "field": "animName", "description": "Select the name of the animation to play.", "defaultValue": "" }, { "type": "Function", "field": "creationOptions", "description": "Enter function to return 'CloneOptions' that modify the animation's creation.", "defaultValue": "() => {\n return {\n //duration: number,\n //loop: 1 (0=infinite),\n //speed: number (1=realtime,2=double fast),\n //scale: number,\n //orientation: Orientation,\n //layers: LayerPresence,\n };\n}" }, { "type": "Function", "field": "playbackOptions", "description": "Enter function to return options that modify the animation's playback.", "defaultValue": "() => {\n return {\n //forceReturnToIdle: boolean,\n //ownerInformation: DOFowner,\n //disableSetFaceAnim: boolean,\n //screenCenterOverride: boolean,\n};\n}" } ] }, { "label": "Provide animation name via function", "display": "Function returning Animation Name", "value": 5, "options": [ { "type": "Function", "field": "animNameFunction", "description": "Enter a function returning the animation name to play.", "defaultValue": "() => {\n //return 'greetings_01';\n}" }, { "type": "Function", "field": "creationOptions", "description": "Enter function to return options that modify the animation's creation.", "defaultValue": "() => {\n return {\n //duration: number,\n //speed: number,\n //scale: number,\n //orientation: Orientation,\n //layers: LayerPresence,\n };\n}" }, { "type": "Function", "field": "playbackOptions", "description": "Enter function to return options that modify the animation's playback.", "defaultValue": "() => {\n return {\n //forceReturnToIdle: boolean,\n //screenCenterOverride: boolean,\n //handleBuilder: (builder:any)=>void,\n //handleAnimation: (anim:any)=>void\n };\n}" } ] }, { "label": "Perform animation query", "display": "Animation Query", "value": 4, "options": [ { "type": "Function", "field": "queryParams", "description": "Enter function to return the animDB query parameters.", "defaultValue": "() => ({\n //category: 'happy',\n //duration: 40,\n //includeMeta: ['bla']\n});" }, { "type": "Function", "field": "queryResultSelector", "description": "Enter function to return the particular result from amongst all that matched the query.", "defaultValue": "(results) => {\n return results.matching[0];\n}" }, { "type": "Function", "field": "creationOptions", "description": "Enter function to return 'CloneOptions' that modify the animation's creation.", "defaultValue": "() => {\n return {\n //duration: number,\n //loop: 1 (0=infinite),\n //speed: number (1=realtime,2=double fast),\n //scale: number,\n //orientation: Orientation,\n //layers: LayerPresence,\n };\n}" }, { "type": "Function", "field": "playbackOptions", "description": "Enter function to return options that modify the animation's playback.", "defaultValue": "() => {\n return {\n //forceReturnToIdle: boolean,\n //ownerInformation: DOFowner,\n //disableSetFaceAnim: boolean,\n //screenCenterOverride: boolean,\n};\n}" } ] } ], "field": "animSelector", "description": "Indicate the source of the animation (filepath, function returning a filepath, AnimDB name or AnimDB query).", "defaultValue": 1 } ] }, "PlayAudio": { "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 202}, "description": "Plays a single audio source. The audio format is any format supported by HTML5 audio. Succeeds when the audio file is finished playing", "type": "leaf", "options": [ { "type": "Audio", "field": "audioPath", "description": "Enter the audio file path.", "defaultValue": "" }, { "type": "boolean", "field": "cache", "description": "True for caching the audio. False for single-play and destroy.", "defaultValue": true } ] }, "LookAt": { "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 203}, "description": "Creates body and eye animations for looking at a point in 3D space", "type": "leaf", "options": [ { "type": "Function", "field": "getTarget", "description": "Return the x, y, and z coordinates Jibo should look at.", "defaultValue": "() => {\n return {x: 0, y: 0, z: 0};\n}" }, { "type": "boolean", "field": "isContinuous", "description": "True for continuous mode look at. False for single-shot look at.", "defaultValue": false }, { "type": "Function", "field": "config", "description": "Enter optional code to modify the lookAt behavior.", "defaultValue": "(lookAt) => {\n}" } ] }, "Blink": { "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 204}, "description": "Animates Jibo's eye to blink once.", "type": "leaf", "options": [] }, "TextToSpeech": { "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 205}, "description": "Creates speech output for Jibo.", "type": "leaf", "options": [ { "type": "SSML", "field": "words", "description": "Enter text for Jibo to say. Takes plain text or SSML markup.", "defaultValue": "Hello" }, { "type": "Function", "field": "onWord", "description" : "Enter optional code to execute each time Jibo says a single word.", "defaultValue": "(word) => {\n}" } ] }, "TextToSpeechJs": { "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 206}, "description": "Dynamically creates speech output for Jibo.", "type": "leaf", "options": [ { "type": "Function", "field": "getWords", "description": "Return what you want Jibo to say.", "defaultValue": "(callback) => {\n callback('Hello');\n}" }, { "type": "Function", "field": "onWord", "description": "Enter optional code to execute each time Jibo says a single word.", "defaultValue": "(word) => {\n}" } ] }, "StartOnAnimEvent": { "description": "Prevents the behavior it's decorating from starting until a specified event is received from an animation.", "type": "decorator", "options": [ { "type": "string", "field": "eventName", "description": "Specify the event name (set on the animation's Event Layer) on which the animation should start." }, { "type": "Function", "field": "onReceived", "description": "Enter optional code to execute after the event is received but before the behavior starts.", "defaultValue": "(animFileName, payload) => {\n}" } ] }, "StartOnEvent": { "description": "Prevents behavior it's decorating from starting until specified event is received from the global emitter.", "type": "decorator", "options": [ { "type": "string", "field": "eventName", "description": "Specify the event name you want to listen for the component to start." }, { "type": "Function", "field": "onEvent", "description": "This function is called after the event was received but before the component starts.", "defaultValue": "() => {\n}" } ] }, "SucceedOnEvent": { "description": "Forces the behavior it's decorating to succeed when an event is received from the global emitter.", "type": "decorator", "options": [ { "type": "string", "field": "eventName", "description": "Specify the event name you want to listen for the component to succeed." }, { "type": "Function", "field": "onEvent", "description": "This function is called after the event was received along with any payload.", "defaultValue": "() => {\n}" } ] }, "SucceedOnEmbedded": { "description": "Succeeds a behavior upon hearing a built-in listening rule.", "type": "decorator", "options": [ { "type": ["enum", { "label": "Hey Jibo", "display": "Hey Jibo", "value": "hey_jibo" } ], "field": "rule", "description": "Specify the name of the embedded rule you want to listen for (hey_jibo).", "defaultValue": "hey_jibo" }, { "type": "Function", "field": "onResult", "description": "(listener), event emitter for hey-jibo (asr, spkr) and error events.", "defaultValue": "(listener) => {\n listener.on('hey-jibo', function(asrResult, speakerIds) {\n\n });\n}" } ] }, "ListenEmbedded": { "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 207}, "description": "Listens only for an embedded rule (hey_jibo)", "type": "leaf", "options": [ { "type": ["enum", { "label": "Hey Jibo", "display": "Hey Jibo", "value": "hey_jibo" } ], "field": "rule", "description": "Specify the name of the embedded rule you want to listen for (hey_jibo).", "defaultValue": "hey_jibo" }, { "type": "Function", "field": "onResult", "description": "(listener), event emitter for hey-jibo (asr, spkr) and error events.", "defaultValue": "(listener) => {\n listener.on('hey-jibo', function(asrResult, speakerIds) {\n\n });\n}" } ] }, "Listen": { "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 208}, "description": "Tells Jibo to listen for auditory input using Natural Language Understanding (NLU).", "type": "leaf", "options": [ { "type": "Function", "field": "getOptions", "description": "Set the dictionary of options that will be returned for the listening task.", "defaultValue": "() => {\n let options = {\n heyJibo: false,\n detectEnd: false,\n incremental: false,\n authenticateSpeaker: ''\n }\n return options;\n}" }, { "type": "Rule", "field": "rule", "description": "Specify the file path for the rule to use to parse Listen results.", "defaultValue": "" }, { "type": "Function", "field": "onResult", "description": "Enter code to execute when Jibo has heard input. (listener), event emitter for hey-jibo (asr, spkr) and timeout() events.", "defaultValue": "(listener) => {\n listener.on('cloud', function(asrResult, speakerIds) {\n\n });\n}" } ] }, "SucceedOnListen": { "description": "Succeeds a behavior upon hearing a custom Natural Language Understand (NLU) rule.", "type": "decorator", "options": [ { "type": "Function", "field": "getOptions", "description": "Set the dictionary of options that will be returned for the listening task.", "defaultValue": "() => {\n let options = {\n heyJibo: false,\n detectEnd: false,\n incremental: false,\n authenticateSpeaker: ''\n }\n return options;\n}" }, { "type": "Rule", "field": "rule", "description": "Specify the file path for the rule to use to parse Listen results.", "defaultValue": "" }, { "type": "Function", "field": "onResult", "description": "Enter code to execute when Jibo has heard input. (listener), event emitter for hey-jibo (asr, spkr) and timeout() events.", "defaultValue": "(listener) => {\n listener.on('cloud', function(asrResult, speakerIds) {\n\n });\n}" } ] }, "ListenJs": { "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 209}, "description": "Tells Jibo to listen for auditory input using Natural Language Understanding (NLU).", "type": "leaf", "options": [ { "type": "Function", "field": "getOptions", "description": "Set the dictionary of options that will be returned for the listening task.", "defaultValue": "() => {\n let options = {\n heyJibo: false,\n detectEnd: false,\n incremental: false,\n authenticateSpeaker: ''\n }\n return options;\n}" }, { "type": "Function", "field": "getRule", "description": "Pass a custom listening rule into the callback.", "defaultValue": "(callback) => {\n callback(\"TopRule = $* Hello World $*;\");\n}" }, { "type": "Function", "field": "onResult", "description": "Enter code to execute when Jibo has heard input. (listener), event emitter for cloud (asr, spkr), hey-jibo (asr, spkr), timeout (), incremental (asr, stop()), and end-of-speech() results.", "defaultValue": "(listener) => {\n listener.on('cloud', function(asrResult, speakerIds) {\n\n });\n}" } ] }, "SucceedOnListenJs": { "description": "Succeeds a behavior upon hearing a custom Natural Language Understand (NLU) rule.", "type": "decorator", "options": [ { "type": "Function", "field": "getOptions", "description": "Set the dictionary of options that will be returned for the listening task.", "defaultValue": "() => {\n let options = {\n heyJibo: false,\n detectEnd: false,\n incremental: false,\n authenticateSpeaker: ''\n }\n return options;\n}" }, { "type": "Function", "field": "getRule", "description": "Pass a custom listening rule into the callback.", "defaultValue": "() => {\n callback(\"TopRule = $* Hello World $*;\");\n}" }, { "type": "Function", "field": "onResult", "description": "Enter code to execute when Jibo has heard input. (listener), event emitter for cloud (asr, spkr), hey-jibo (asr, spkr), timeout (), incremental (asr, stop()), and end-of-speech() results.", "defaultValue": "(listener) => {\n listener.on('cloud', function(asrResult, speakerIds) {\n\n });\n}" } ] }, "TakePhoto": { "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 210}, "description": "Attempts to take a photo and return the image url in the onPhoto callback", "type": "leaf", "options": [ { "type": ["enum", { "label": "Small (672x380) - coming soon!", "display": "Small (672x380)", "value": 1 }, { "label": "Medium (1280x720)", "display": "Medium (1280x720)", "value": 2 }, { "label": "Large (1920x1080) - coming soon!", "display": "Large (1920x1080)", "value": 3 }, { "label": "X-Large (2688x1520) - coming soon!", "display": "X-Large (2688x1520)", "value": 4 } ], "field": "resolution", "description": "Specify the resolution of the photo you want to take.", "defaultValue": 2 }, { "type": ["enum", { "label": "Left (wide-angle)", "display": "Left (wide-angle)", "value": 0 }, { "label": "Right (narrow-angle)", "display": "Right (narrow-angle)", "value": 1 } ], "field": "camera", "description": "Specify the which camera to use to take a photo", "defaultValue": 1 }, { "type": "Function", "field": "onPhoto", "description" : "Set optional code to execute after the photo is taken. If successful, returns imageUrl; otherwise, returns error.", "defaultValue": "(error, imageUrl) => {\n}" }, { "type": "boolean", "field": "noDistortion", "description": "True to remove camera distortion from the photo. False to keep camera distortion on the photo.", "defaultValue": true } ] }, "ReadBarcode": { "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 211}, "description": "Attempts to read a barcode or QRcode and returns the barcode data", "type": "leaf", "options": [ { "type": "Function", "field": "onBarcode", "description" : "Enter the code that will be called when the barcode is read. If successful, returns barcode/QRcode data; otherwise, returns error.", "defaultValue": "(error, data) => {\n}" } ] }, "Mim": { "paletteInfo": {"uses": ["bt"], "color": "JiboBlue", "order": 212}, "description": "A Multimodal Interaction Module, for all your speaking needs.", "type": "leaf", "options": [ { "type": "mim", "field": "mimPath", "description": "path to mim file (from project root)", "defaultValue": "" }, { "type": "Function", "field": "getPromptData", "description": "Return variables for Mim prompt conditions and text replacement", "defaultValue": "() => {\n return {};\n}" }, { "type": "Function", "field": "checkResult", "description": "MIM result - allows modification of an individual listen result before the MIM analyzes it", "defaultValue": "(result) => {\n \n}" }, { "type": "Function", "field": "onSuccess", "description": "provides data on the end result of the MIM - a successful response.", "defaultValue": "(results) => {\n let mimState = results.state;\n let asrResults = results.asrResults;\n}" } ] }, "Menu": { "paletteInfo": {"uses": ["bt"], "color": "JiboBlue", "order": 213}, "description": "A self contained single stage menu.", "type": "leaf", "options": [ { "type": "Function", "field": "getConfig", "description": "Provide the menu config data.", "defaultValue": "(loadCallback) => {\n loadCallback({});\n}" }, { "type": "Function", "field": "onMenuClosed", "description": "Called when the menu is closed by the user or a timeout.", "defaultValue": "(wasTimeout, menu, overrideMenuTransition) => {\n}" }, { "type": "Function", "field": "onItemChosen", "description": "Called when a user utterance matches the menu rule, or an item is selected", "defaultValue": "(menuResult, menu, overrideMenuTransition) => {\n}" }, { "type": "Function", "field": "onPositionalSelect", "description": "Called when a user tries to choose an item with positional selection - 'open the second one', etc", "defaultValue": "(commandAsr, intendedIndex, menu) => {\n //Return an index to use, NaN to not select anything, or undefined to do the normal behavior (selecting intendedIndex)\n}" } ] }, "meta": { "version": 1 } }