initial commit
This commit is contained in:
189
node_modules/jibo/schema/schema-base.json
generated
vendored
Normal file
189
node_modules/jibo/schema/schema-base.json
generated
vendored
Normal file
@@ -0,0 +1,189 @@
|
||||
{
|
||||
"TimeoutSucceed": {
|
||||
"description": "Forces a behavior to succeed after a given number of milliseconds.",
|
||||
"type": "decorator",
|
||||
"args": ["int"],
|
||||
"meta": [
|
||||
{
|
||||
"field": "getTimeout",
|
||||
"description": "Enter the number of milliseconds until forced success."
|
||||
}
|
||||
]
|
||||
},
|
||||
"TimeoutSucceedJs": {
|
||||
"description": "Uses JavaScript to force a behavior to succeed after a given number of milliseconds.",
|
||||
"type": "decorator",
|
||||
"args": ["Function"],
|
||||
"meta": [
|
||||
{
|
||||
"field": "getTimeout",
|
||||
"description": "Return the number of milliseconds until forced success.",
|
||||
"defaultValue": "() => {\n return 0;\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TimeoutJs": {
|
||||
"description": "Succeeds after a given number of dynamically-calculated milliseconds.",
|
||||
"type": "leaf",
|
||||
"args": ["Function"],
|
||||
"meta": [
|
||||
{
|
||||
"field": "getTimeout",
|
||||
"description": "Return the number of milliseconds until forced success.",
|
||||
"defaultValue": "() => {\n return 0;\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TimeoutFail": {
|
||||
"description": "Forces a behavior to fail after a given number of milliseconds.",
|
||||
"type": "decorator",
|
||||
"args": ["int"],
|
||||
"meta": [
|
||||
{
|
||||
"field": "getTimeout",
|
||||
"description": "Enter the number of milliseconds until forced failure."
|
||||
}
|
||||
]
|
||||
},
|
||||
"FailOnCondition": {
|
||||
"description": "Forces a behavior to fail if specified condition returns false.",
|
||||
"type": "decorator",
|
||||
"args": [
|
||||
"Function",
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"field": "initVars",
|
||||
"description": "Initialize optional variables for the condition below."
|
||||
},
|
||||
{
|
||||
"field": "condition",
|
||||
"description": "Return true when you want behavior to fail."
|
||||
}
|
||||
]
|
||||
},
|
||||
"Case": {
|
||||
"description": "Use under Switch statements to specify when a behavior should execute and when it should fail.",
|
||||
"type": "decorator",
|
||||
"args": [
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"field": "condition",
|
||||
"description": "Return false for conditions under which behavior should fail."
|
||||
}
|
||||
]
|
||||
},
|
||||
"SucceedOnCondition": {
|
||||
"description": "Forces a behavor to succeed if its conditional function returns true.",
|
||||
"type": "decorator",
|
||||
"args": [
|
||||
"Function",
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"field": "initVars",
|
||||
"description": "Initialize optional variables for the condition below."
|
||||
},
|
||||
{
|
||||
"field": "condition",
|
||||
"description": "Return true when you want behavior to succeed."
|
||||
}
|
||||
]
|
||||
},
|
||||
"StartOnCondition": {
|
||||
"description": "Prevents a behavior from starting until its conditional function returns true.",
|
||||
"type": "decorator",
|
||||
"args": [
|
||||
"Function",
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"field": "initVars",
|
||||
"description": "Initialize optional variables for the condition below."
|
||||
},
|
||||
{
|
||||
"field": "condition",
|
||||
"description": "Return true when you want component to start."
|
||||
}
|
||||
]
|
||||
},
|
||||
"WhileCondition": {
|
||||
"description": "Repeats a behavior until its conditional function returns false.",
|
||||
"type": "decorator",
|
||||
"args": [
|
||||
"Function",
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"field": "initVars",
|
||||
"description": "Initialize optional variables for the condition below."
|
||||
},
|
||||
{
|
||||
"field": "condition",
|
||||
"description": "Repeat behavior as long as condition return true.",
|
||||
"defaultValue": "() => {\n return true;\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ExecuteScript": {
|
||||
"description": "Synchronously executes arbitrary JavaScript. Use ExecuteScriptAsync for asynchronous calls.",
|
||||
"type": "leaf",
|
||||
"args": ["Function"],
|
||||
"meta": [
|
||||
{
|
||||
"field": "execScript",
|
||||
"description": "Enter function that will execute once and then succeed."
|
||||
}
|
||||
]
|
||||
},
|
||||
"ExecuteScriptAsync": {
|
||||
"description": "Asynchronously executes arbitrary JavaScript. Will not succeed until the callback is called.",
|
||||
"type": "leaf",
|
||||
"args": ["Function"],
|
||||
"meta": [
|
||||
{
|
||||
"field": "execScript",
|
||||
"description": "Behavior will succeed when succeed is called, fail when fail is called.",
|
||||
"defaultValue": "(succeed, fail) => {\n succeed();\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Null": {
|
||||
"description": "This behavior never succeeds or fails. It will remain 'in progress' indefinitely. It must be decorated in order to succeed or fail.",
|
||||
"type": "leaf",
|
||||
"args": []
|
||||
},
|
||||
"Sequence": {
|
||||
"description": "This behavior plays its children in order from top to bottom. If one child fails, this behavior will fail. If all its children succeed ,this behavor will succeed.",
|
||||
"type": "composite",
|
||||
"args": []
|
||||
},
|
||||
"Parallel": {
|
||||
"description": "This behavior starts all of its children at the same time. This behavior will return success by default when all of its children have succeeded, or, if told to succeed on one, will succeed upon success of any child.",
|
||||
"type": "composite",
|
||||
"args": ["boolean"],
|
||||
"meta": [
|
||||
{
|
||||
"field": "succeedOnOne",
|
||||
"description": "Set to True to force parallel to succeed as soon as one of its children succeeds.",
|
||||
"defaultValue": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"Switch": {
|
||||
"description": "Attempts to execute its children in order from top to bottom until one child succeeds. This behavior always succeeds regardless of whether any children succeed. Use this behavior with Case decorators for branching.",
|
||||
"type": "composite",
|
||||
"args": []
|
||||
},
|
||||
"Random": {
|
||||
"description": "Chooses one of its children randomly. Succeeds if that child succeeds and fails otherwise.",
|
||||
"type": "composite",
|
||||
"args": []
|
||||
}
|
||||
}
|
||||
414
node_modules/jibo/schema/schema.json
generated
vendored
Normal file
414
node_modules/jibo/schema/schema.json
generated
vendored
Normal file
@@ -0,0 +1,414 @@
|
||||
{
|
||||
"Subtree": {
|
||||
"description": "Executes a behavior tree (.bt) as a single behavior and returns the status of the subtree.",
|
||||
"type": "leaf",
|
||||
"args": [
|
||||
"Subtree",
|
||||
"Function",
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"field": "fileName",
|
||||
"description": "Select a subtree.",
|
||||
"defaultValue": "null"
|
||||
},
|
||||
{
|
||||
"field": "getNotepad",
|
||||
"description": "Enter optional information to return an object that will be this tree's notepad.",
|
||||
"defaultValue": "() => {\n return {};\n}"
|
||||
},
|
||||
{
|
||||
"field": "setResult",
|
||||
"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",
|
||||
"args": [
|
||||
"Function",
|
||||
"Function",
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"field": "getFilename",
|
||||
"description": "Specify a subtree.",
|
||||
"defaultValue": "(callback) => {\n}"
|
||||
},
|
||||
{
|
||||
"field": "getNotepad",
|
||||
"description": "Enter optional information to return an object that will be this tree's notepad.",
|
||||
"defaultValue": "() => {\n return {};\n}"
|
||||
},
|
||||
{
|
||||
"field": "setResult",
|
||||
"description": "Enter optional code that will be called with the subtree's results with the subtree is done.",
|
||||
"defaultValue": "(treeResult) => {\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"PlayAnimation": {
|
||||
"description": "Plays an animation file (.keys). Succeeds when the animation is finished.",
|
||||
"type": "leaf",
|
||||
"args": [
|
||||
"Animation",
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"field": "fileName",
|
||||
"description": "Select the animation file to play.",
|
||||
"defaultValue": "null"
|
||||
},
|
||||
{
|
||||
"field": "animModifier",
|
||||
"description": "Enter optional code to modify the animation's playback.",
|
||||
"defaultValue": "(animation) => {\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"PlayAudio": {
|
||||
"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",
|
||||
"args": ["Audio"],
|
||||
"meta": [
|
||||
{
|
||||
"field": "path",
|
||||
"description": "Enter the audio file path.",
|
||||
"defaultValue": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"LookAt": {
|
||||
"description": "Creates body and eye animations for looking at a point in 3D space",
|
||||
"type": "leaf",
|
||||
"args": ["Function",
|
||||
"boolean",
|
||||
"Function"],
|
||||
"meta": [
|
||||
{
|
||||
"field": "target",
|
||||
"description": "Return the x, y, and z coordinates Jibo should look at.",
|
||||
"defaultValue": "() => {\n return {x: 0, y: 0, z: 0};\n}"
|
||||
},
|
||||
{
|
||||
"field": "lookAtMode",
|
||||
"description": "True for continuous mode look at. False for single-shot look at.",
|
||||
"defaultValue": false
|
||||
},
|
||||
{
|
||||
"field": "lookAtModifier",
|
||||
"description": "Enter optional code to modify the lookAt behavior.",
|
||||
"defaultValue": "(lookAt) => {\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Blink": {
|
||||
"description": "Animates Jibo's eye to blink once.",
|
||||
"type": "leaf",
|
||||
"args": [],
|
||||
"meta": []
|
||||
},
|
||||
"TextToSpeech": {
|
||||
"description": "Creates speech output for Jibo.",
|
||||
"type": "leaf",
|
||||
"args": [
|
||||
"SSML",
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"field": "words",
|
||||
"description": "Enter text for Jibo to say. Takes plain text or SSML markup.",
|
||||
"defaultValue": "Hello"
|
||||
},
|
||||
{
|
||||
"field": "onWord",
|
||||
"description" : "Enter optional code to execute each time Jibo says a single word.",
|
||||
"defaultValue": "(word) => {\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TextToSpeechJs": {
|
||||
"description": "Dynamically creates speech output for Jibo.",
|
||||
"type": "leaf",
|
||||
"args": [
|
||||
"Function",
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"field": "getWords",
|
||||
"description": "Return what you want Jibo to say.",
|
||||
"defaultValue": "(callback) => {\n callback('Hello');\n}"
|
||||
},
|
||||
{
|
||||
"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",
|
||||
"args": [
|
||||
"string",
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"field": "eventName",
|
||||
"description": "Specify the event name (set on the animation's Event Layer) on which the animation should start."
|
||||
},
|
||||
{
|
||||
"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",
|
||||
"args": [
|
||||
"string",
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"field": "eventName",
|
||||
"description": "Specify the event name you want to listen for the component to start."
|
||||
},
|
||||
{
|
||||
"field": "onReceived",
|
||||
"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",
|
||||
"args": [
|
||||
"string",
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"field": "eventName",
|
||||
"description": "Specify the event name you want to listen for the component to start."
|
||||
},
|
||||
{
|
||||
"field": "onReceived",
|
||||
"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",
|
||||
"args": [
|
||||
["enum",
|
||||
{
|
||||
"label": "Hey Jibo",
|
||||
"display": "Hey Jibo",
|
||||
"value": "hey_jibo"
|
||||
}
|
||||
],
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"field": "ruleName",
|
||||
"description": "Specify the name of the embedded rule you want to listen for (hey_jibo).",
|
||||
"defaultValue": "hey_jibo"
|
||||
},
|
||||
{
|
||||
"field": "getListener",
|
||||
"description": "(listener), event emitter for hey-jibo (asr, spkr) and error events.",
|
||||
"defaultValue": "(listener) => {\n\tlistener.on('hey-jibo', (asrResult, speakerIds) => {\n\n\t});\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ListenEmbedded": {
|
||||
"description": "Listens only for an embedded rule (hey_jibo)",
|
||||
"type": "leaf",
|
||||
"args": [
|
||||
["enum",
|
||||
{
|
||||
"label": "Hey Jibo",
|
||||
"display": "Hey Jibo",
|
||||
"value": "hey_jibo"
|
||||
}
|
||||
],
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"field": "ruleName",
|
||||
"description": "Specify the name of the embedded rule you want to listen for (hey_jibo).",
|
||||
"defaultValue": "hey_jibo"
|
||||
},
|
||||
{
|
||||
"field": "getListener",
|
||||
"description": "(listener), event emitter for hey-jibo (asr, spkr) and error events.",
|
||||
"defaultValue": "(listener) => {\n\tlistener.on('hey-jibo', (asrResult, speakerIds) => {\n\n\t});\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Listen": {
|
||||
"description": "Tells Jibo to listen for auditory input using Natural Language Understanding (NLU).",
|
||||
"type": "leaf",
|
||||
"args": [
|
||||
"Function",
|
||||
"Rule",
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"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}"
|
||||
},
|
||||
{
|
||||
"field": "ruleFile",
|
||||
"description": "Specify the file path for the rule to use to parse Listen results.",
|
||||
"defaultValue": "null"
|
||||
},
|
||||
{
|
||||
"field": "getListener",
|
||||
"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', (asrResult, speakerIds) => {\n\n });\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"SucceedOnListen": {
|
||||
"description": "Succeeds a behavior upon hearing a custom Natural Language Understand (NLU) rule.",
|
||||
"type": "decorator",
|
||||
"args": [
|
||||
"Function",
|
||||
"Rule",
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"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}"
|
||||
},
|
||||
{
|
||||
"field": "ruleFile",
|
||||
"description": "Specify the file path for the rule to use to parse Listen results.",
|
||||
"defaultValue": "null"
|
||||
},
|
||||
{
|
||||
"field": "getListener",
|
||||
"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', (asrResult, speakerIds) => {\n\n });\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ListenJs": {
|
||||
"description": "Tells Jibo to listen for auditory input using Natural Language Understanding (NLU).",
|
||||
"type": "leaf",
|
||||
"args": [
|
||||
"Function",
|
||||
"Function",
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"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}"
|
||||
},
|
||||
{
|
||||
"field": "getRule",
|
||||
"description": "Pass a custom listening rule into the callback.",
|
||||
"defaultValue": "(callback) => {\n callback(\"TopRule = $* Hello World $*;\");\n}"
|
||||
},
|
||||
{
|
||||
"field": "getListener",
|
||||
"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', (asrResult, speakerIds) => {\n\n });\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"SucceedOnListenJs": {
|
||||
"description": "Succeeds a behavior upon hearing a custom Natural Language Understand (NLU) rule.",
|
||||
"type": "decorator",
|
||||
"args": [
|
||||
"Function",
|
||||
"Function",
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"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}"
|
||||
},
|
||||
{
|
||||
"field": "getRule",
|
||||
"description": "Pass a custom listening rule into the callback.",
|
||||
"defaultValue": "() => {\n callback(\"TopRule = $* Hello World $*;\");\n}"
|
||||
},
|
||||
{
|
||||
"field": "getListener",
|
||||
"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', (asrResult, speakerIds) => {\n\n });\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TakePhoto": {
|
||||
"description": "Attempts to take a photo and return the image url in the onPhoto callback",
|
||||
"type": "leaf",
|
||||
"args": [
|
||||
["enum",
|
||||
{
|
||||
"label": "Preview (640x360)",
|
||||
"display": "Preview",
|
||||
"value": 1
|
||||
},
|
||||
{
|
||||
"label": "Full (1280x720)",
|
||||
"display": "Full",
|
||||
"value": 2
|
||||
}
|
||||
],
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"field": "photoRes",
|
||||
"description": "Specify the resolution of the photo you want to take. 1 for Preview (640x360) or 2 for Full (1280x720)",
|
||||
"defaultValue": 2
|
||||
},
|
||||
{
|
||||
"field": "onPhoto",
|
||||
"description" : "Set optional code to execute after the photo is taken. If successful, returns imageUrl; otherwise, returns error.",
|
||||
"defaultValue": "(error, imageUrl) => {\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ReadBarcode": {
|
||||
"description": "Attempts to read a barcode or QRcode and returns the barcode data",
|
||||
"type": "leaf",
|
||||
"args": [
|
||||
"Function"
|
||||
],
|
||||
"meta": [
|
||||
{
|
||||
"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}"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user