Global

Members


_

BehaviorTree Copyright (c) 2017-2019 Servo Labs Inc. Parts Copyright (c) Renato de Pontes Pereira. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

_

Tick Copyright (c) 2017 Servo Labs Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

b3

Composite Copyright (c) 2017-2019 Servo Labs Inc. Parts Copyright (c) Renato de Pontes Pereira. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

dblogger

b3 Copyright (c) 2017 Servo Labs Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

lastTargetId :number

running index of the target id
Type:
  • number

passedThruPipe :boolean

true if passed already through fsm incoming pipe
Type:
  • boolean

processModel

fsm-manager FSM: Full Scale Machine

targetObjs :Array.<TargetObject>

target queue
Type:
  • Array.<TargetObject>

title :string

Type:
  • string

unusedTargetObjs :Array.<TargetObject>

backup target queue. targets in the queue remain intact until the whole tree return success or failure
Type:
  • Array.<TargetObject>

uuid

b3 Copyright (c) 2017-2019 Servo Labs Inc. Parts Copyright (c) Renato de Pontes Pereira. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Methods


findStateIndex(fsm, stateName)

util function to find the index of a state by its name
Parameters:
Name Type Description
fsm
stateName
Returns:
Type
number

runEntryProcessors()

fetch and run the state processors
Parameters:
Type Description
Returns:

Type Definitions


CompositeFieldName


ContextItem

Properties:
Name Type Description
intentId string main expected intent for this context. converted internally to an 'intentId' entity name, with expected value of intentId
description TextObject human understandable description for this context
helper boolean use for contextual help. Selected if (1) no sibling context was found and [(2) there was no default or (3) there was another child selected previously]
timeout boolean is used when question timeouts
backtrack boolean if true, this will be the child to enter on backtracking
default boolean use to select default context. Selected if (1) no sibling context was found (2) there's no other child already selected ",
passThru boolean use when another AskAndMap is expected downwards, that uses same intent/entities. If true, dont use target on context switch
entities Array.<EntitiesToContextMapItem> an array of expected entities

ContextManagerEntities

Type:
  • Object
Properties:
Name Type Description
node BaseNode a node on which the ContextManager exists.
tick Tick the tick of the subtree on which the node exist

EntitiesToContextMapItem

Type:
  • Object
Properties:
Name Type Argument Description
contextFieldName string <optional>
field name on the context. defaults to entityName
entityName string entity name on the message
intentId string <optional>
expectedValue string | Array <optional>
expected values for this entityName
entityIndex number for composite entities; should default to 0

ExpressionString

A string expression to be evaluated against all memory areas. if contains <%= %> with composite variables with the format of (fsm., global., context, volatile., local., message. ), it will be evaluated against an object with these member objects. Otherwise, evaluated literally. FOR A STRING, ENCLOSE WITH 'COMMAS'!

FoundContext

Properties:
Name Type Argument Description
tick Tick
isRootContext boolean <optional>
index number an index of new context child of this.node.
prevIndex number previous index of new context child of this.node.
helper boolean <optional>
true if this is a helper context
backtrack boolean <optional>
true if this is a backtrack context
passThru boolean <optional>
true if two consequitive AskAndMaps - do not use intent
score number <optional>
contextManager Object <optional>
autoBacktrack boolean <optional>
true if this context selected and its a backtracking, but no backtrack context is available (children will close and re-open)
target Target <optional>
the target, according to which the context was found

KeyValueArrayPair

Type:
  • Object
Properties:
Name Type Description
key string
value string | Array an array of values for each key

MemoryField

Properties:
Name Type Description
string: string (message./global./context./volatile./local./fsm.)fieldname string should have a dot notation with the memory and field names. Eg: message.text, context.amount etc

MessageObject

Type:
  • Object
Properties:
Name Type Description
intentId string
entities Map.<KeyValueArrayPair>
score number

Operator


TextObject

An object in the form of {"language code":"string"}. eg {"en":"my name is John"}
Properties:
Name Type Description
string: string language code
string: string text

TickStatus

A number representing the status returned from the tick. 1: success 2: failure 3: running 4: error
Type:
  • number

Validator

Type:
  • Object
Properties:
Name Type Description
condition boolean a condition to test
text string text to show the condition is not met