tpmkms_4wp 9.6.1 → 9.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/actions.instance.json +99 -0
- package/common/actions.js +67 -0
- package/common/actions.test.json +656 -0
- package/common/angle.instance.json +20 -0
- package/common/colors.instance.json +0 -28
- package/common/compass.instance.json +15 -0
- package/common/dates.instance.json +0 -84
- package/common/dialogues.js +1 -1
- package/common/dimension.instance.json +96 -12
- package/common/dimension.js +12 -3
- package/common/drone.instance.json +10130 -1641
- package/common/drone.js +217 -71
- package/common/drone.test.json +192134 -3455
- package/common/drone_v1.instance.json +38 -31
- package/common/drone_v1.js +20 -15
- package/common/drone_v1.test.json +659 -389
- package/common/edible.instance.json +0 -128
- package/common/fastfood.instance.json +72 -392
- package/common/gdefaults.js +5 -1
- package/common/helpers/conjunction.js +9 -5
- package/common/helpers/drone.js +13 -1
- package/common/length.instance.json +135 -0
- package/common/nameable.js +63 -24
- package/common/nameable.test.json +3270 -3912
- package/common/ordinals.js +13 -0
- package/common/pipboy.instance.json +0 -56
- package/common/pressure.instance.json +20 -0
- package/common/properties.js +16 -6
- package/common/reports.instance.json +1 -1
- package/common/stm.js +119 -25
- package/common/temperature.instance.json +20 -0
- package/common/time.instance.json +45 -0
- package/common/time.test.json +3403 -0
- package/common/weight.instance.json +60 -0
- package/common/wp.instance.json +0 -56
- package/main.js +2 -0
- package/package.json +6 -2
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"configs": [
|
|
3
|
+
{
|
|
4
|
+
"name": "actions",
|
|
5
|
+
"operators": [
|
|
6
|
+
"([doAction|do] ([action]))",
|
|
7
|
+
"((action) <again>)"
|
|
8
|
+
],
|
|
9
|
+
"bridges": [
|
|
10
|
+
{
|
|
11
|
+
"id": "action"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"id": "again",
|
|
15
|
+
"bridge": "{\n ...before[0],\n action: before[0],\n again: operator,\n interpolate: [{ property: 'action' }, { property: 'again' }]\n }"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "doAction",
|
|
19
|
+
"isA": [
|
|
20
|
+
"verb"
|
|
21
|
+
],
|
|
22
|
+
"check": [
|
|
23
|
+
"marker",
|
|
24
|
+
"text",
|
|
25
|
+
"verbatim",
|
|
26
|
+
"value",
|
|
27
|
+
"evalue",
|
|
28
|
+
"isResponse",
|
|
29
|
+
{
|
|
30
|
+
"properties": "modifiers"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"properties": "postModifiers"
|
|
34
|
+
},
|
|
35
|
+
"action"
|
|
36
|
+
],
|
|
37
|
+
"bridge": "{\n ...next(operator),\n operator: operator,\n action: after[0],\n interpolate: [{ property: 'operator' }, { property: 'action' }]\n }"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"semantics": [
|
|
41
|
+
{
|
|
42
|
+
"match": "({context, isA}) => isA(context.marker, 'action')",
|
|
43
|
+
"apply": "({context, _continue, mentioned}) => {\n mentioned(context)\n _continue()\n }"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"resultss": [
|
|
49
|
+
{
|
|
50
|
+
"extraConfig": true,
|
|
51
|
+
"name": "actions",
|
|
52
|
+
"operators": [
|
|
53
|
+
"([doAction|do] ([action]))",
|
|
54
|
+
"((action) <again>)"
|
|
55
|
+
],
|
|
56
|
+
"bridges": [
|
|
57
|
+
{
|
|
58
|
+
"id": "action"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"id": "again",
|
|
62
|
+
"bridge": "{\n ...before[0],\n action: before[0],\n again: operator,\n interpolate: [{ property: 'action' }, { property: 'again' }]\n }"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "doAction",
|
|
66
|
+
"isA": [
|
|
67
|
+
"verb"
|
|
68
|
+
],
|
|
69
|
+
"check": [
|
|
70
|
+
"marker",
|
|
71
|
+
"text",
|
|
72
|
+
"verbatim",
|
|
73
|
+
"value",
|
|
74
|
+
"evalue",
|
|
75
|
+
"isResponse",
|
|
76
|
+
{
|
|
77
|
+
"properties": "modifiers"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"properties": "postModifiers"
|
|
81
|
+
},
|
|
82
|
+
"action"
|
|
83
|
+
],
|
|
84
|
+
"bridge": "{\n ...next(operator),\n operator: operator,\n action: after[0],\n interpolate: [{ property: 'operator' }, { property: 'action' }]\n }"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"semantics": [
|
|
88
|
+
{
|
|
89
|
+
"priority": -1
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"fragments": [],
|
|
95
|
+
"semantics": [],
|
|
96
|
+
"associations": [],
|
|
97
|
+
"summaries": [],
|
|
98
|
+
"learned_contextual_priorities": []
|
|
99
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const { knowledgeModule, where, Digraph } = require('./runtime').theprogrammablemind
|
|
2
|
+
const { defaultContextCheckProperties, defaultContextCheck } = require('./helpers')
|
|
3
|
+
const dialogues = require("./dialogues")
|
|
4
|
+
const tests = require('./actions.test.json')
|
|
5
|
+
const instance = require('./actions.instance.json')
|
|
6
|
+
|
|
7
|
+
const config = {
|
|
8
|
+
name: 'actions',
|
|
9
|
+
operators: [
|
|
10
|
+
"([doAction|do] ([action]))",
|
|
11
|
+
"((action) <again>)",
|
|
12
|
+
],
|
|
13
|
+
bridges: [
|
|
14
|
+
{
|
|
15
|
+
id: 'action',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: 'again',
|
|
19
|
+
bridge: `{
|
|
20
|
+
...before[0],
|
|
21
|
+
action: before[0],
|
|
22
|
+
again: operator,
|
|
23
|
+
interpolate: [{ property: 'action' }, { property: 'again' }]
|
|
24
|
+
}`
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'doAction',
|
|
28
|
+
isA: ['verb'],
|
|
29
|
+
check: defaultContextCheckProperties(['action']),
|
|
30
|
+
bridge: `{
|
|
31
|
+
...next(operator),
|
|
32
|
+
operator: operator,
|
|
33
|
+
action: after[0],
|
|
34
|
+
interpolate: [{ property: 'operator' }, { property: 'action' }]
|
|
35
|
+
}`,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
semantics: [
|
|
39
|
+
{
|
|
40
|
+
priority: -1,
|
|
41
|
+
match: ({context, isA}) => isA(context.marker, 'action'),
|
|
42
|
+
apply: ({context, _continue, mentioned}) => {
|
|
43
|
+
mentioned(context)
|
|
44
|
+
_continue()
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const template = {
|
|
51
|
+
configs: [
|
|
52
|
+
config,
|
|
53
|
+
],
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
knowledgeModule({
|
|
57
|
+
config: { name: 'actions' },
|
|
58
|
+
includes: [dialogues],
|
|
59
|
+
instance,
|
|
60
|
+
template,
|
|
61
|
+
module,
|
|
62
|
+
description: 'Actions using the word do',
|
|
63
|
+
test: {
|
|
64
|
+
name: './actions.test.json',
|
|
65
|
+
contents: tests,
|
|
66
|
+
},
|
|
67
|
+
})
|