Initial commit — jibo-cli v3.0.7 with bundled node_modules
This commit is contained in:
11
templates/behavior-template/README.md
Normal file
11
templates/behavior-template/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Building
|
||||
|
||||
Build process is implemented using NPM scripts installed in the **package.json** file.
|
||||
|
||||
| Command | Description
|
||||
|---|---|
|
||||
|`npm run build` | Build the project in debug mode. |
|
||||
|`npm run build:release` | Build the project in release mode. |
|
||||
|`npm run watch` | Watch the source and behaviors, auto-rebuilds. |
|
||||
|`npm run clean` | Deletes built JavaScript files. |
|
||||
|`npm start` | Alias for `npm run watch`.
|
||||
250
templates/behavior-template/animations/greeting.keys
Normal file
250
templates/behavior-template/animations/greeting.keys
Normal file
@@ -0,0 +1,250 @@
|
||||
{
|
||||
"framerate": 30,
|
||||
"duration": 60,
|
||||
"layers": [
|
||||
{
|
||||
"id": "5b631fd526fc49068920fc50cb5c10d6",
|
||||
"name": "Body #1",
|
||||
"type": "Body",
|
||||
"visible": true,
|
||||
"locked": false,
|
||||
"keyframes": [
|
||||
{
|
||||
"value": {
|
||||
"Head": 0,
|
||||
"Torso": 0,
|
||||
"Pelvis": 0
|
||||
},
|
||||
"time": 0
|
||||
},
|
||||
{
|
||||
"value": {
|
||||
"Head": -46.99999999999999,
|
||||
"Torso": 58.99999999999999,
|
||||
"Pelvis": 0
|
||||
},
|
||||
"time": 30
|
||||
},
|
||||
{
|
||||
"value": {
|
||||
"Head": 0,
|
||||
"Torso": 0,
|
||||
"Pelvis": 0
|
||||
},
|
||||
"time": 59
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "74761c70b7af43d2a67239b2155ce88d",
|
||||
"name": "Eye #3",
|
||||
"type": "Eye",
|
||||
"visible": true,
|
||||
"locked": false,
|
||||
"keyframes": [
|
||||
{
|
||||
"value": {
|
||||
"Rotate": 0,
|
||||
"Scale": {
|
||||
"x": 1,
|
||||
"y": 1
|
||||
},
|
||||
"Translate": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"Vertex 1": {
|
||||
"x": -281.3073655214508,
|
||||
"y": -297.2113789169163
|
||||
},
|
||||
"Vertex 2": {
|
||||
"x": 0,
|
||||
"y": -297.2113789169163
|
||||
},
|
||||
"Vertex 3": {
|
||||
"x": 281.3073655214508,
|
||||
"y": -297.2113789169163
|
||||
},
|
||||
"Vertex 4": {
|
||||
"x": -281.3073655214508,
|
||||
"y": 0
|
||||
},
|
||||
"Vertex 5": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"Vertex 6": {
|
||||
"x": 281.3073655214508,
|
||||
"y": 0
|
||||
},
|
||||
"Vertex 7": {
|
||||
"x": -281.3073655214508,
|
||||
"y": 297.2113789169163
|
||||
},
|
||||
"Vertex 8": {
|
||||
"x": 0,
|
||||
"y": 297.2113789169163
|
||||
},
|
||||
"Vertex 9": {
|
||||
"x": 281.3073655214508,
|
||||
"y": 297.2113789169163
|
||||
}
|
||||
},
|
||||
"time": 0
|
||||
},
|
||||
{
|
||||
"value": {
|
||||
"Rotate": 0,
|
||||
"Scale": {
|
||||
"x": 1,
|
||||
"y": 1
|
||||
},
|
||||
"Translate": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"Vertex 1": {
|
||||
"x": -281.3073655214508,
|
||||
"y": -297.2113789169163
|
||||
},
|
||||
"Vertex 2": {
|
||||
"x": 0,
|
||||
"y": -297.2113789169163
|
||||
},
|
||||
"Vertex 3": {
|
||||
"x": 281.3073655214508,
|
||||
"y": -297.2113789169163
|
||||
},
|
||||
"Vertex 4": {
|
||||
"x": -281.3073655214508,
|
||||
"y": 0
|
||||
},
|
||||
"Vertex 5": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"Vertex 6": {
|
||||
"x": 281.3073655214508,
|
||||
"y": 0
|
||||
},
|
||||
"Vertex 7": {
|
||||
"x": -281.3073655214508,
|
||||
"y": 297.2113789169163
|
||||
},
|
||||
"Vertex 8": {
|
||||
"x": 0,
|
||||
"y": 297.2113789169163
|
||||
},
|
||||
"Vertex 9": {
|
||||
"x": 281.3073655214508,
|
||||
"y": 297.2113789169163
|
||||
}
|
||||
},
|
||||
"time": 27
|
||||
},
|
||||
{
|
||||
"value": {
|
||||
"Rotate": 0,
|
||||
"Scale": {
|
||||
"x": 1,
|
||||
"y": 0.1529786611415199
|
||||
},
|
||||
"Translate": {
|
||||
"x": -7.370441612130465,
|
||||
"y": 248.1911389552236
|
||||
},
|
||||
"Vertex 1": {
|
||||
"x": -281.3073655214508,
|
||||
"y": -297.2113789169163
|
||||
},
|
||||
"Vertex 2": {
|
||||
"x": 0,
|
||||
"y": -297.2113789169163
|
||||
},
|
||||
"Vertex 3": {
|
||||
"x": 281.3073655214508,
|
||||
"y": -297.2113789169163
|
||||
},
|
||||
"Vertex 4": {
|
||||
"x": -281.3073655214508,
|
||||
"y": 0
|
||||
},
|
||||
"Vertex 5": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"Vertex 6": {
|
||||
"x": 281.3073655214508,
|
||||
"y": 0
|
||||
},
|
||||
"Vertex 7": {
|
||||
"x": -281.3073655214508,
|
||||
"y": 297.2113789169163
|
||||
},
|
||||
"Vertex 8": {
|
||||
"x": 0,
|
||||
"y": 297.2113789169163
|
||||
},
|
||||
"Vertex 9": {
|
||||
"x": 281.3073655214508,
|
||||
"y": 297.2113789169163
|
||||
}
|
||||
},
|
||||
"time": 30
|
||||
},
|
||||
{
|
||||
"value": {
|
||||
"Rotate": 0,
|
||||
"Scale": {
|
||||
"x": 1,
|
||||
"y": 1
|
||||
},
|
||||
"Translate": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"Vertex 1": {
|
||||
"x": -281.3073655214508,
|
||||
"y": -297.2113789169163
|
||||
},
|
||||
"Vertex 2": {
|
||||
"x": 0,
|
||||
"y": -297.2113789169163
|
||||
},
|
||||
"Vertex 3": {
|
||||
"x": 281.3073655214508,
|
||||
"y": -297.2113789169163
|
||||
},
|
||||
"Vertex 4": {
|
||||
"x": -281.3073655214508,
|
||||
"y": 0
|
||||
},
|
||||
"Vertex 5": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"Vertex 6": {
|
||||
"x": 281.3073655214508,
|
||||
"y": 0
|
||||
},
|
||||
"Vertex 7": {
|
||||
"x": -281.3073655214508,
|
||||
"y": 297.2113789169163
|
||||
},
|
||||
"Vertex 8": {
|
||||
"x": 0,
|
||||
"y": 297.2113789169163
|
||||
},
|
||||
"Vertex 9": {
|
||||
"x": 281.3073655214508,
|
||||
"y": 297.2113789169163
|
||||
}
|
||||
},
|
||||
"time": 33
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"version": "0.5.0",
|
||||
"scale": 1
|
||||
}
|
||||
BIN
templates/behavior-template/animations/textures/bg/black.png
Normal file
BIN
templates/behavior-template/animations/textures/bg/black.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
templates/behavior-template/animations/textures/bg/white.png
Normal file
BIN
templates/behavior-template/animations/textures/bg/white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
templates/behavior-template/animations/textures/happy-face.png
Normal file
BIN
templates/behavior-template/animations/textures/happy-face.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 169 KiB |
BIN
templates/behavior-template/animations/textures/lens.png
Normal file
BIN
templates/behavior-template/animations/textures/lens.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 766 KiB |
BIN
templates/behavior-template/animations/textures/white-eye.png
Normal file
BIN
templates/behavior-template/animations/textures/white-eye.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 194 KiB |
BIN
templates/behavior-template/audio/FX_Bawhoop.mp3
Normal file
BIN
templates/behavior-template/audio/FX_Bawhoop.mp3
Normal file
Binary file not shown.
BIN
templates/behavior-template/audio/FX_Bleep.mp3
Normal file
BIN
templates/behavior-template/audio/FX_Bleep.mp3
Normal file
Binary file not shown.
BIN
templates/behavior-template/audio/FX_Blip.mp3
Normal file
BIN
templates/behavior-template/audio/FX_Blip.mp3
Normal file
Binary file not shown.
BIN
templates/behavior-template/audio/FX_Bloop.mp3
Normal file
BIN
templates/behavior-template/audio/FX_Bloop.mp3
Normal file
Binary file not shown.
BIN
templates/behavior-template/audio/FX_BootUp.mp3
Normal file
BIN
templates/behavior-template/audio/FX_BootUp.mp3
Normal file
Binary file not shown.
BIN
templates/behavior-template/audio/FX_Disgusted_01.mp3
Normal file
BIN
templates/behavior-template/audio/FX_Disgusted_01.mp3
Normal file
Binary file not shown.
BIN
templates/behavior-template/audio/FX_Disgusted_02.mp3
Normal file
BIN
templates/behavior-template/audio/FX_Disgusted_02.mp3
Normal file
Binary file not shown.
BIN
templates/behavior-template/audio/FX_Disgusted_03.mp3
Normal file
BIN
templates/behavior-template/audio/FX_Disgusted_03.mp3
Normal file
Binary file not shown.
BIN
templates/behavior-template/audio/FX_DoYouWantToPlay_01.mp3
Normal file
BIN
templates/behavior-template/audio/FX_DoYouWantToPlay_01.mp3
Normal file
Binary file not shown.
BIN
templates/behavior-template/audio/FX_FillingUp_01.mp3
Normal file
BIN
templates/behavior-template/audio/FX_FillingUp_01.mp3
Normal file
Binary file not shown.
BIN
templates/behavior-template/audio/FX_GoodJob_01.mp3
Normal file
BIN
templates/behavior-template/audio/FX_GoodJob_01.mp3
Normal file
Binary file not shown.
BIN
templates/behavior-template/audio/FX_Holyhappiness.mp3
Normal file
BIN
templates/behavior-template/audio/FX_Holyhappiness.mp3
Normal file
Binary file not shown.
BIN
templates/behavior-template/audio/FX_ImBroken_01.mp3
Normal file
BIN
templates/behavior-template/audio/FX_ImBroken_01.mp3
Normal file
Binary file not shown.
BIN
templates/behavior-template/audio/FX_PeekABoo_01.mp3
Normal file
BIN
templates/behavior-template/audio/FX_PeekABoo_01.mp3
Normal file
Binary file not shown.
BIN
templates/behavior-template/audio/FX_Whistle.mp3
Normal file
BIN
templates/behavior-template/audio/FX_Whistle.mp3
Normal file
Binary file not shown.
4
templates/behavior-template/build/debug.json
Normal file
4
templates/behavior-template/build/debug.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"DEBUG": true,
|
||||
"RELEASE": false
|
||||
}
|
||||
4
templates/behavior-template/build/release.json
Normal file
4
templates/behavior-template/build/release.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"DEBUG": false,
|
||||
"RELEASE": true
|
||||
}
|
||||
23
templates/behavior-template/index.html
Normal file
23
templates/behavior-template/index.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>__skill-page-title__</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
background: #000;
|
||||
}
|
||||
#face {
|
||||
width: 1280px;
|
||||
height: 720px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="face"></div>
|
||||
<script>
|
||||
require('./index');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
1
templates/behavior-template/launch.rule
Normal file
1
templates/behavior-template/launch.rule
Normal file
@@ -0,0 +1 @@
|
||||
TopRule = ($* what time is it {%skill='__package-name__'%} $*);
|
||||
39
templates/behavior-template/mims/HelloWorld.mim
Normal file
39
templates/behavior-template/mims/HelloWorld.mim
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"mim_type": "question",
|
||||
"rule_name": "rules/hello-world.fst",
|
||||
"sample_utterances": "world,mars",
|
||||
"timeout": 6,
|
||||
"num_tries_for_gui": 2,
|
||||
"barge_in": true,
|
||||
"es_auto_tagging": true,
|
||||
"notes": "",
|
||||
"prompts": [
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "Q",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "Say either hello world or hello mars",
|
||||
"media": "TTS",
|
||||
"prompt_id": "ID1"
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "Q",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "Can you say hello world?",
|
||||
"media": "TTS",
|
||||
"prompt_id": "ID2"
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "Q",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "Can you say hello mars?",
|
||||
"media": "TTS",
|
||||
"prompt_id": "ID3"
|
||||
}
|
||||
]
|
||||
}
|
||||
30
templates/behavior-template/mims/YouSaidMars.mim
Normal file
30
templates/behavior-template/mims/YouSaidMars.mim
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"mim_type": "announcement",
|
||||
"rule_name": "",
|
||||
"sample_utterances": "",
|
||||
"timeout": 6,
|
||||
"num_tries_for_gui": 2,
|
||||
"barge_in": true,
|
||||
"es_auto_tagging": true,
|
||||
"notes": "",
|
||||
"prompts": [
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "You said Mars!",
|
||||
"media": "TTS",
|
||||
"prompt_id": ""
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "Yay! You said Mars/",
|
||||
"media": "TTS",
|
||||
"prompt_id": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
30
templates/behavior-template/mims/YouSaidWorld.mim
Normal file
30
templates/behavior-template/mims/YouSaidWorld.mim
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"mim_type": "announcement",
|
||||
"rule_name": "",
|
||||
"sample_utterances": "",
|
||||
"timeout": 6,
|
||||
"num_tries_for_gui": 2,
|
||||
"barge_in": true,
|
||||
"es_auto_tagging": true,
|
||||
"notes": "",
|
||||
"prompts": [
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "You said world!",
|
||||
"media": "TTS",
|
||||
"prompt_id": ""
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "Good job. You said world",
|
||||
"media": "TTS",
|
||||
"prompt_id": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
27
templates/behavior-template/package.json
Normal file
27
templates/behavior-template/package.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "__package-name__",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"jibo": {
|
||||
"main": "index.html",
|
||||
"type": "asset-pack",
|
||||
"launchRule": "launch.rule",
|
||||
"prompt": "Do something",
|
||||
"display-name": "template"
|
||||
},
|
||||
"dependencies": {
|
||||
"jibo": "^6.0.0"
|
||||
},
|
||||
"license": "UNLICENSED",
|
||||
"scripts": {
|
||||
"start": "jibo-dev watch",
|
||||
"watch": "jibo-dev watch",
|
||||
"clean": "jibo-dev clean",
|
||||
"build": "jibo-dev build",
|
||||
"build:release": "jibo-dev build --prod"
|
||||
},
|
||||
"devDependencies": {
|
||||
"jibo-dev": "^2.0.0"
|
||||
}
|
||||
}
|
||||
150
templates/behavior-template/src/behaviors/idle.bt
Normal file
150
templates/behavior-template/src/behaviors/idle.bt
Normal file
@@ -0,0 +1,150 @@
|
||||
{
|
||||
"3": {
|
||||
"id": 3,
|
||||
"class": "Parallel",
|
||||
"name": "",
|
||||
"asset-pack": "core",
|
||||
"children": [
|
||||
19,
|
||||
16
|
||||
],
|
||||
"decorators": [
|
||||
"d66a3d03-82ea-41b8-a195-d9b476386b6a"
|
||||
],
|
||||
"options": {
|
||||
"succeedOnOne": false
|
||||
}
|
||||
},
|
||||
"16": {
|
||||
"id": 16,
|
||||
"class": "Sequence",
|
||||
"name": "",
|
||||
"asset-pack": "core",
|
||||
"parent": 3,
|
||||
"children": [
|
||||
18,
|
||||
17
|
||||
],
|
||||
"decorators": [
|
||||
23
|
||||
],
|
||||
"options": {}
|
||||
},
|
||||
"17": {
|
||||
"id": 17,
|
||||
"class": "LookAt",
|
||||
"name": "Choose place to look",
|
||||
"asset-pack": "core",
|
||||
"parent": 16,
|
||||
"options": {
|
||||
"getTarget": [
|
||||
"() => {",
|
||||
"\tlet x = 1;",
|
||||
"\tlet y = (1 - 2 * Math.random());",
|
||||
"\tlet z = 0.7 + 0.5 * (1 - 2 * Math.random());",
|
||||
"\treturn {x: x, y: y, z: z};",
|
||||
"}"
|
||||
],
|
||||
"config": [
|
||||
"(lookat) => {",
|
||||
"}"
|
||||
]
|
||||
}
|
||||
},
|
||||
"18": {
|
||||
"id": 18,
|
||||
"class": "TimeoutJs",
|
||||
"asset-pack": "core",
|
||||
"parent": 16,
|
||||
"name": "Pause for a bit",
|
||||
"options": {
|
||||
"getTime": [
|
||||
"() => {",
|
||||
" return 1000 + 2000 * Math.random();",
|
||||
"}"
|
||||
]
|
||||
}
|
||||
},
|
||||
"19": {
|
||||
"id": 19,
|
||||
"class": "Sequence",
|
||||
"name": "",
|
||||
"asset-pack": "core",
|
||||
"parent": 3,
|
||||
"children": [
|
||||
21,
|
||||
20
|
||||
],
|
||||
"decorators": [
|
||||
22
|
||||
],
|
||||
"options": {}
|
||||
},
|
||||
"20": {
|
||||
"id": 20,
|
||||
"class": "Blink",
|
||||
"asset-pack": "core",
|
||||
"parent": 19,
|
||||
"options": {}
|
||||
},
|
||||
"21": {
|
||||
"id": 21,
|
||||
"class": "TimeoutJs",
|
||||
"name": "Pause for a bit",
|
||||
"asset-pack": "core",
|
||||
"parent": 19,
|
||||
"options": {
|
||||
"getTime": [
|
||||
"() => {",
|
||||
" return 2200 + 2500 * Math.random();",
|
||||
"}"
|
||||
]
|
||||
}
|
||||
},
|
||||
"22": {
|
||||
"id": 22,
|
||||
"class": "WhileCondition",
|
||||
"name": "",
|
||||
"asset-pack": "core",
|
||||
"options": {
|
||||
"init": [
|
||||
"() => {",
|
||||
"}"
|
||||
],
|
||||
"conditional": [
|
||||
"() => {",
|
||||
" return true;",
|
||||
"}"
|
||||
]
|
||||
}
|
||||
},
|
||||
"23": {
|
||||
"id": 23,
|
||||
"class": "WhileCondition",
|
||||
"name": "",
|
||||
"asset-pack": "core",
|
||||
"options": {
|
||||
"init": [
|
||||
"() => {",
|
||||
"}"
|
||||
],
|
||||
"conditional": [
|
||||
"() => {",
|
||||
" return true;",
|
||||
"}"
|
||||
]
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"version": 1
|
||||
},
|
||||
"d66a3d03-82ea-41b8-a195-d9b476386b6a": {
|
||||
"id": "d66a3d03-82ea-41b8-a195-d9b476386b6a",
|
||||
"class": "TimeoutSucceed",
|
||||
"name": "",
|
||||
"options": {
|
||||
"timeout": 8000
|
||||
},
|
||||
"asset-pack": "core"
|
||||
}
|
||||
}
|
||||
267
templates/behavior-template/src/flows/main.flow
Normal file
267
templates/behavior-template/src/flows/main.flow
Normal file
@@ -0,0 +1,267 @@
|
||||
{
|
||||
"class": "go.GraphLinksModel",
|
||||
"dataFormat": "flow-1",
|
||||
"nodeKeyProperty": "id",
|
||||
"nodeCategoryProperty": "class",
|
||||
"linkFromPortIdProperty": "fromPort",
|
||||
"linkToPortIdProperty": "toPort",
|
||||
"nodeDataArray": [
|
||||
{
|
||||
"class": "Flow.Begin",
|
||||
"name": "Begin",
|
||||
"loc": "-523.171875 -1026.5",
|
||||
"id": "943fb90c-8699-4eb6-9de1-a1cddc841c94",
|
||||
"options": {
|
||||
"inputParameters": [
|
||||
"()=>{",
|
||||
" return {",
|
||||
"// parm1: 'parm1_default_value',",
|
||||
"// parm2: 'parm2_default_value'",
|
||||
" };",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"clazz": "Flow.Begin"
|
||||
},
|
||||
{
|
||||
"class": "Mim.Question",
|
||||
"clazz": "Mim.Question",
|
||||
"loc": "-523 -870",
|
||||
"id": "b0f5c52c-3b23-430c-a2e9-ac663bbf09f5",
|
||||
"options": {
|
||||
"mimPath": "mims/HelloWorld.mim",
|
||||
"getPromptData": [
|
||||
"() => {",
|
||||
"\treturn {};",
|
||||
"}",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"onStatus": [
|
||||
"(status) => {",
|
||||
"\tlet mimState = status.state;",
|
||||
"\tlet asrResults = status.asrResults;",
|
||||
"\tlet speakerIds = status.speakerIds;",
|
||||
"}"
|
||||
],
|
||||
"onSuccess": [
|
||||
"(results) => {",
|
||||
"\tlet mimState = results.state;",
|
||||
"\tlet asrResults = results.asrResults;",
|
||||
"\tlet speakerIds = results.speakerIds;",
|
||||
"\tlet transition = results.firstGrammarTag;",
|
||||
"\treturn transition;",
|
||||
"}",
|
||||
"//Transitions: undefined",
|
||||
""
|
||||
],
|
||||
"onFailure": [
|
||||
"(results) => {",
|
||||
"\tlet mimState = results.state;",
|
||||
"\tlet asrResults = results.asrResults;",
|
||||
"\tlet speakerIds = results.speakerIds;",
|
||||
"\tlet exception = results.exception;",
|
||||
"\treturn exception;",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"name": "Hello World"
|
||||
},
|
||||
{
|
||||
"class": "Mim.Announcement",
|
||||
"clazz": "Mim.Announcement",
|
||||
"loc": "-659 -724",
|
||||
"id": "f8610690-a7d5-453b-abbf-26d28c564f0f",
|
||||
"options": {
|
||||
"mimPath": "mims/YouSaidMars.mim",
|
||||
"getPromptData": [
|
||||
"() => {",
|
||||
"\treturn {};",
|
||||
"}",
|
||||
"",
|
||||
""
|
||||
]
|
||||
},
|
||||
"name": "You Said Mars"
|
||||
},
|
||||
{
|
||||
"class": "Mim.Announcement",
|
||||
"clazz": "Mim.Announcement",
|
||||
"loc": "-395 -722",
|
||||
"id": "01a34fef-0419-43fe-b89a-67f3a58522eb",
|
||||
"options": {
|
||||
"mimPath": "mims/YouSaidWorld.mim",
|
||||
"getPromptData": [
|
||||
"() => {",
|
||||
"\treturn {};",
|
||||
"}",
|
||||
"",
|
||||
""
|
||||
]
|
||||
},
|
||||
"name": "You Said World"
|
||||
},
|
||||
{
|
||||
"class": "Flow.Subtree",
|
||||
"clazz": "Flow.Subtree",
|
||||
"loc": "-520 -553",
|
||||
"id": "88d6a8b3-7ee8-46f3-b1d6-f4fcddca5ecb",
|
||||
"options": {
|
||||
"behaviorPath": "../behaviors/idle",
|
||||
"getNotepad": [
|
||||
"() => {",
|
||||
" return {};",
|
||||
"}"
|
||||
],
|
||||
"onResult": [
|
||||
"(treeResult) => {",
|
||||
"\treturn treeResult.transition;",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"name": "idle"
|
||||
},
|
||||
{
|
||||
"class": "Flow.End",
|
||||
"clazz": "Flow.End",
|
||||
"loc": "-520 -388",
|
||||
"id": "2052e45c-2d10-4dda-9f90-8013d60de749",
|
||||
"options": {
|
||||
"getTransition": [
|
||||
"() => { return ; }"
|
||||
]
|
||||
},
|
||||
"name": ""
|
||||
}
|
||||
],
|
||||
"linkDataArray": [
|
||||
{
|
||||
"from": "b0f5c52c-3b23-430c-a2e9-ac663bbf09f5",
|
||||
"to": "f8610690-a7d5-453b-abbf-26d28c564f0f",
|
||||
"fromPort": "",
|
||||
"toPort": "",
|
||||
"text": "mars",
|
||||
"points": [
|
||||
-576.1425806705407,
|
||||
-864,
|
||||
-586.1425806705407,
|
||||
-864,
|
||||
-659,
|
||||
-864,
|
||||
-659,
|
||||
-812.9855260225262,
|
||||
-659,
|
||||
-761.9710520450524,
|
||||
-659,
|
||||
-751.9710520450524
|
||||
],
|
||||
"segmentOffset": "29 0"
|
||||
},
|
||||
{
|
||||
"from": "b0f5c52c-3b23-430c-a2e9-ac663bbf09f5",
|
||||
"to": "01a34fef-0419-43fe-b89a-67f3a58522eb",
|
||||
"fromPort": "",
|
||||
"toPort": "",
|
||||
"text": "world",
|
||||
"points": [
|
||||
-469.85741932945933,
|
||||
-869,
|
||||
-459.85741932945933,
|
||||
-869,
|
||||
-395,
|
||||
-869,
|
||||
-395,
|
||||
-814.4855260225262,
|
||||
-395,
|
||||
-759.9710520450524,
|
||||
-395,
|
||||
-749.9710520450524
|
||||
],
|
||||
"segmentOffset": "22 0"
|
||||
},
|
||||
{
|
||||
"from": "f8610690-a7d5-453b-abbf-26d28c564f0f",
|
||||
"to": "88d6a8b3-7ee8-46f3-b1d6-f4fcddca5ecb",
|
||||
"fromPort": "",
|
||||
"toPort": "",
|
||||
"text": "",
|
||||
"points": [
|
||||
-659,
|
||||
-696.0289479549476,
|
||||
-659,
|
||||
-686.0289479549476,
|
||||
-659,
|
||||
-638.5,
|
||||
-533.8878690939563,
|
||||
-638.5,
|
||||
-533.8878690939563,
|
||||
-590.9710520450524,
|
||||
-533.8878690939563,
|
||||
-580.9710520450524
|
||||
]
|
||||
},
|
||||
{
|
||||
"from": "01a34fef-0419-43fe-b89a-67f3a58522eb",
|
||||
"to": "88d6a8b3-7ee8-46f3-b1d6-f4fcddca5ecb",
|
||||
"fromPort": "",
|
||||
"toPort": "",
|
||||
"text": "",
|
||||
"points": [
|
||||
-395,
|
||||
-694.0289479549476,
|
||||
-395,
|
||||
-684.0289479549476,
|
||||
-395,
|
||||
-637.5,
|
||||
-506.1121309060438,
|
||||
-637.5,
|
||||
-506.1121309060438,
|
||||
-590.9710520450524,
|
||||
-506.1121309060438,
|
||||
-580.9710520450524
|
||||
]
|
||||
},
|
||||
{
|
||||
"from": "943fb90c-8699-4eb6-9de1-a1cddc841c94",
|
||||
"to": "b0f5c52c-3b23-430c-a2e9-ac663bbf09f5",
|
||||
"fromPort": "",
|
||||
"toPort": "",
|
||||
"text": "",
|
||||
"points": [
|
||||
-523.171875,
|
||||
-989,
|
||||
-523.171875,
|
||||
-979,
|
||||
-523.171875,
|
||||
-943.4855260225262,
|
||||
-523,
|
||||
-943.4855260225262,
|
||||
-523,
|
||||
-907.9710520450524,
|
||||
-523,
|
||||
-897.9710520450524
|
||||
]
|
||||
},
|
||||
{
|
||||
"from": "88d6a8b3-7ee8-46f3-b1d6-f4fcddca5ecb",
|
||||
"to": "2052e45c-2d10-4dda-9f90-8013d60de749",
|
||||
"fromPort": "",
|
||||
"toPort": "",
|
||||
"text": "",
|
||||
"points": [
|
||||
-520,
|
||||
-525.0289479549476,
|
||||
-520,
|
||||
-515.0289479549476,
|
||||
-520,
|
||||
-464.53113784790037,
|
||||
-520,
|
||||
-464.53113784790037,
|
||||
-520,
|
||||
-414.03332774085317,
|
||||
-520,
|
||||
-404.03332774085317
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
10
templates/behavior-template/src/index.ts
Normal file
10
templates/behavior-template/src/index.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/// <reference path="../node_modules/jibo/typings/index.d.ts" />
|
||||
|
||||
import jibo = require('jibo');
|
||||
|
||||
jibo.init('face', () => {
|
||||
let mainFlow:any = require('./flows/main');
|
||||
jibo.flow.run(mainFlow, {}, () => {
|
||||
console.log('Flow exited');
|
||||
});
|
||||
});
|
||||
1
templates/behavior-template/src/rules/hello-world.rule
Normal file
1
templates/behavior-template/src/rules/hello-world.rule
Normal file
@@ -0,0 +1 @@
|
||||
TopRule = $* (hello world){%slotAction='world'%} | (hello mars){%slotAction='mars'%} $*;
|
||||
15
templates/behavior-template/tsconfig.json
Normal file
15
templates/behavior-template/tsconfig.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"target": "es6",
|
||||
"noImplicitAny": false,
|
||||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"experimentalDecorators": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
],
|
||||
"compileOnSave": false
|
||||
}
|
||||
19
templates/behavior-template/tslint.json
Normal file
19
templates/behavior-template/tslint.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"rules": {
|
||||
"curly": true,
|
||||
"triple-equals": true,
|
||||
"semicolon": [true, "always"],
|
||||
"no-var-keyword": true,
|
||||
"no-unused-expression": true,
|
||||
"no-empty": true,
|
||||
"jsdoc-format": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-debugger": true,
|
||||
"member-ordering": [
|
||||
true,
|
||||
"public-before-private",
|
||||
"static-before-instance",
|
||||
"variables-before-functions"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user