tpmkms_4wp 9.5.1-beta.9 → 9.6.0-beta.0
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/animals.instance.json +130 -0
- package/common/animals.js +3 -5
- package/common/asking.js +12 -4
- package/common/avatar.test.json +1001 -860
- package/common/can.instance.json +2182 -5
- package/common/can.js +102 -39
- package/common/can.test.json +51307 -0
- package/common/colors.instance.json +142 -30
- package/common/colors.js +3 -6
- package/common/comparable.instance.json +31 -1
- package/common/comparable.js +3 -6
- package/common/concept.js +25 -27
- package/common/concept.test.json +142 -120
- package/common/conjunction.test.json +32 -42
- package/common/crew.instance.json +400 -126
- package/common/crew.js +3 -6
- package/common/dateTimeSelectors.instance.json +2 -2
- package/common/dateTimeSelectors.js +6 -9
- package/common/dateTimeSelectors.test.json +76935 -35739
- package/common/dates.instance.json +50 -84
- package/common/dates.js +3 -6
- package/common/dates.test.json +284 -287
- package/common/dialogues.js +33 -115
- package/common/dialogues.test.json +1248 -1152
- package/common/dimension.instance.json +21498 -566
- package/common/dimension.js +147 -52
- package/common/dimension.test.json +10979 -4625
- package/common/drone.instance.json +24709 -0
- package/common/drone.js +662 -0
- package/common/drone.test.json +30522 -0
- package/common/drone_v1.instance.json +24703 -0
- package/common/drone_v1.js +596 -0
- package/common/drone_v1.test.json +115538 -0
- package/common/edible.instance.json +365 -65
- package/common/edible.js +3 -5
- package/common/emotions.instance.json +57 -70
- package/common/emotions.js +3 -6
- package/common/errors.js +3 -3
- package/common/fastfood.instance.json +1270 -244
- package/common/fastfood.js +10 -12
- package/common/fastfood.test.json +6970 -6829
- package/common/formulas.instance.json +10 -0
- package/common/formulas.js +2 -1
- package/common/gdefaults.js +58 -13
- package/common/help.js +9 -9
- package/common/help.test.json +65 -11
- package/common/helpers/dialogues.js +9 -1
- package/common/helpers/properties.js +37 -18
- package/common/helpers.js +32 -2
- package/common/hierarchy.js +10 -8
- package/common/kirk.instance.json +10 -0
- package/common/kirk.js +4 -6
- package/common/kirk.test.json +600 -424
- package/common/latin.instance.json +10 -10
- package/common/latin.js +8 -10
- package/common/length.instance.json +34659 -3157
- package/common/length.js +11 -6
- package/common/length.test.json +54357 -2557
- package/common/math.instance.json +11 -1
- package/common/math.js +2 -1
- package/common/menus.instance.json +74 -7
- package/common/menus.js +3 -12
- package/common/meta.js +4 -5
- package/common/nameable.js +29 -15
- package/common/nameable.test.json +436 -0
- package/common/numbers.js +1 -1
- package/common/ordering.instance.json +24 -2
- package/common/ordering.js +3 -5
- package/common/ordering.test.json +104 -174
- package/common/people.instance.json +140 -315
- package/common/people.js +3 -5
- package/common/pipboy.instance.json +171 -57
- package/common/pipboy.js +2 -1
- package/common/pokemon.instance.json +135 -5
- package/common/pokemon.js +3 -5
- package/common/pressure.instance.json +3990 -1981
- package/common/pressure.js +3 -5
- package/common/pressure.test.json +433 -477
- package/common/properties.instance.json +15 -16
- package/common/properties.js +10 -9
- package/common/properties.test.json +9565 -6951
- package/common/rates.instance.json +59 -0
- package/common/rates.js +95 -0
- package/common/rates.test.json +27702 -0
- package/common/reminders.js +5 -8
- package/common/reminders.test.json +64635 -25787
- package/common/reports.instance.json +22 -2
- package/common/reports.js +3 -5
- package/common/scorekeeper.js +3 -6
- package/common/spock.instance.json +10 -0
- package/common/spock.js +4 -7
- package/common/spock.test.json +606 -430
- package/common/stm.js +37 -20
- package/common/temperature.instance.json +3162 -1153
- package/common/temperature.js +3 -5
- package/common/temperature.test.json +433 -477
- package/common/time.instance.json +24852 -0
- package/common/time.js +136 -139
- package/common/time.test.json +31876 -3757
- package/common/ui.instance.json +12 -5
- package/common/ui.js +4 -13
- package/common/weight.instance.json +10500 -4098
- package/common/weight.js +3 -5
- package/common/weight.test.json +2601 -2263
- package/common/words.instance.json +9 -0
- package/common/words.js +50 -0
- package/common/words.test.json +2 -0
- package/common/wp.instance.json +470 -58
- package/common/wp.js +6 -4
- package/common/wp.test.json +7385 -6906
- package/main.js +6 -2
- package/package.json +21 -6
- package/common/listener.js +0 -50
- package/common/listener.test.json +0 -142
|
@@ -719,6 +719,16 @@
|
|
|
719
719
|
"adjective",
|
|
720
720
|
false
|
|
721
721
|
],
|
|
722
|
+
[
|
|
723
|
+
"stm_current",
|
|
724
|
+
"adjective",
|
|
725
|
+
false
|
|
726
|
+
],
|
|
727
|
+
[
|
|
728
|
+
"stm_previous",
|
|
729
|
+
"adjective",
|
|
730
|
+
false
|
|
731
|
+
],
|
|
722
732
|
[
|
|
723
733
|
"that",
|
|
724
734
|
"thisitthat",
|
|
@@ -878,7 +888,7 @@
|
|
|
878
888
|
"end": 29
|
|
879
889
|
},
|
|
880
890
|
"dead": true,
|
|
881
|
-
"
|
|
891
|
+
"conceptModifiers": [
|
|
882
892
|
{
|
|
883
893
|
"value": "mathematical",
|
|
884
894
|
"unknown": true,
|
package/common/math.js
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"semantics": [
|
|
44
44
|
{
|
|
45
45
|
"match": "({context, isA}) => isA(context, 'showable_menus')",
|
|
46
|
-
"apply": "async ({context, insert, s, fragments}) => {\n const
|
|
46
|
+
"apply": "async ({context, insert, s, fragments}) => {\n const instantiation = await fragments(\"show showable\", { 'showable_menus': context })\n await s(instantiation)\n }"
|
|
47
47
|
}
|
|
48
48
|
]
|
|
49
49
|
},
|
|
@@ -807,6 +807,16 @@
|
|
|
807
807
|
"adjective",
|
|
808
808
|
false
|
|
809
809
|
],
|
|
810
|
+
[
|
|
811
|
+
"stm_current",
|
|
812
|
+
"adjective",
|
|
813
|
+
false
|
|
814
|
+
],
|
|
815
|
+
[
|
|
816
|
+
"stm_previous",
|
|
817
|
+
"adjective",
|
|
818
|
+
false
|
|
819
|
+
],
|
|
810
820
|
[
|
|
811
821
|
"stop",
|
|
812
822
|
"verb",
|
|
@@ -1861,6 +1871,16 @@
|
|
|
1861
1871
|
"adjective",
|
|
1862
1872
|
false
|
|
1863
1873
|
],
|
|
1874
|
+
[
|
|
1875
|
+
"stm_current",
|
|
1876
|
+
"adjective",
|
|
1877
|
+
false
|
|
1878
|
+
],
|
|
1879
|
+
[
|
|
1880
|
+
"stm_previous",
|
|
1881
|
+
"adjective",
|
|
1882
|
+
false
|
|
1883
|
+
],
|
|
1864
1884
|
[
|
|
1865
1885
|
"stop",
|
|
1866
1886
|
"verb",
|
|
@@ -3139,6 +3159,16 @@
|
|
|
3139
3159
|
"adjective",
|
|
3140
3160
|
false
|
|
3141
3161
|
],
|
|
3162
|
+
[
|
|
3163
|
+
"stm_current",
|
|
3164
|
+
"adjective",
|
|
3165
|
+
false
|
|
3166
|
+
],
|
|
3167
|
+
[
|
|
3168
|
+
"stm_previous",
|
|
3169
|
+
"adjective",
|
|
3170
|
+
false
|
|
3171
|
+
],
|
|
3142
3172
|
[
|
|
3143
3173
|
"stop",
|
|
3144
3174
|
"verb",
|
|
@@ -4457,6 +4487,16 @@
|
|
|
4457
4487
|
"adjective",
|
|
4458
4488
|
false
|
|
4459
4489
|
],
|
|
4490
|
+
[
|
|
4491
|
+
"stm_current",
|
|
4492
|
+
"adjective",
|
|
4493
|
+
false
|
|
4494
|
+
],
|
|
4495
|
+
[
|
|
4496
|
+
"stm_previous",
|
|
4497
|
+
"adjective",
|
|
4498
|
+
false
|
|
4499
|
+
],
|
|
4460
4500
|
[
|
|
4461
4501
|
"stop",
|
|
4462
4502
|
"verb",
|
|
@@ -4651,7 +4691,7 @@
|
|
|
4651
4691
|
"end": 17
|
|
4652
4692
|
},
|
|
4653
4693
|
"dead": true,
|
|
4654
|
-
"
|
|
4694
|
+
"conceptModifiers": [
|
|
4655
4695
|
{
|
|
4656
4696
|
"value": "menu_menus",
|
|
4657
4697
|
"number": "one",
|
|
@@ -5746,6 +5786,16 @@
|
|
|
5746
5786
|
"adjective",
|
|
5747
5787
|
false
|
|
5748
5788
|
],
|
|
5789
|
+
[
|
|
5790
|
+
"stm_current",
|
|
5791
|
+
"adjective",
|
|
5792
|
+
false
|
|
5793
|
+
],
|
|
5794
|
+
[
|
|
5795
|
+
"stm_previous",
|
|
5796
|
+
"adjective",
|
|
5797
|
+
false
|
|
5798
|
+
],
|
|
5749
5799
|
[
|
|
5750
5800
|
"stop",
|
|
5751
5801
|
"verb",
|
|
@@ -7488,6 +7538,16 @@
|
|
|
7488
7538
|
"adjective",
|
|
7489
7539
|
false
|
|
7490
7540
|
],
|
|
7541
|
+
[
|
|
7542
|
+
"stm_current",
|
|
7543
|
+
"adjective",
|
|
7544
|
+
false
|
|
7545
|
+
],
|
|
7546
|
+
[
|
|
7547
|
+
"stm_previous",
|
|
7548
|
+
"adjective",
|
|
7549
|
+
false
|
|
7550
|
+
],
|
|
7491
7551
|
[
|
|
7492
7552
|
"stop",
|
|
7493
7553
|
"verb",
|
|
@@ -8639,6 +8699,16 @@
|
|
|
8639
8699
|
"adjective",
|
|
8640
8700
|
false
|
|
8641
8701
|
],
|
|
8702
|
+
[
|
|
8703
|
+
"stm_current",
|
|
8704
|
+
"adjective",
|
|
8705
|
+
false
|
|
8706
|
+
],
|
|
8707
|
+
[
|
|
8708
|
+
"stm_previous",
|
|
8709
|
+
"adjective",
|
|
8710
|
+
false
|
|
8711
|
+
],
|
|
8642
8712
|
[
|
|
8643
8713
|
"stop",
|
|
8644
8714
|
"verb",
|
|
@@ -8839,10 +8909,7 @@
|
|
|
8839
8909
|
"level": 1,
|
|
8840
8910
|
"context_index": 1,
|
|
8841
8911
|
"topLevel": true,
|
|
8842
|
-
"context_id": 2
|
|
8843
|
-
"touchedBy": [
|
|
8844
|
-
"menus#call2"
|
|
8845
|
-
]
|
|
8912
|
+
"context_id": 2
|
|
8846
8913
|
}
|
|
8847
8914
|
],
|
|
8848
8915
|
"generated": [
|
|
@@ -8943,7 +9010,7 @@
|
|
|
8943
9010
|
"learned_contextual_priorities": [],
|
|
8944
9011
|
"rtf_associations": [],
|
|
8945
9012
|
"query": "show showable",
|
|
8946
|
-
"skipSemantics":
|
|
9013
|
+
"skipSemantics": true,
|
|
8947
9014
|
"key": {
|
|
8948
9015
|
"query": "show showable"
|
|
8949
9016
|
}
|
package/common/menus.js
CHANGED
|
@@ -156,14 +156,7 @@ const template = {
|
|
|
156
156
|
where: where(),
|
|
157
157
|
match: ({context, isA}) => isA(context, 'showable_menus'),
|
|
158
158
|
apply: async ({context, insert, s, fragments}) => {
|
|
159
|
-
const
|
|
160
|
-
const fragment = fragments("show showable")
|
|
161
|
-
const mappings = [{
|
|
162
|
-
where: where(),
|
|
163
|
-
match: ({context}) => context.value == 'showable_menus',
|
|
164
|
-
apply: ({context}) => Object.assign(context, value),
|
|
165
|
-
}]
|
|
166
|
-
const instantiation = await fragment.instantiate(mappings)
|
|
159
|
+
const instantiation = await fragments("show showable", { 'showable_menus': context })
|
|
167
160
|
await s(instantiation)
|
|
168
161
|
}
|
|
169
162
|
},
|
|
@@ -256,8 +249,6 @@ knowledgeModule({
|
|
|
256
249
|
],
|
|
257
250
|
},
|
|
258
251
|
},
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
instance,
|
|
262
|
-
}
|
|
252
|
+
instance,
|
|
253
|
+
template,
|
|
263
254
|
})
|
package/common/meta.js
CHANGED
|
@@ -5,7 +5,7 @@ const gdefaults = require('./gdefaults.js')
|
|
|
5
5
|
ensureTestFile(module, 'meta', 'test')
|
|
6
6
|
ensureTestFile(module, 'meta', 'instance')
|
|
7
7
|
const meta_tests = require('./meta.test.json')
|
|
8
|
-
const
|
|
8
|
+
const instance = require('./meta.instance.json')
|
|
9
9
|
const { hashIndexesGet, hashIndexesSet, translationMapping, translationMappings } = require('./helpers/meta.js')
|
|
10
10
|
const { zip, words } = require('./helpers.js')
|
|
11
11
|
|
|
@@ -296,6 +296,7 @@ const config = {
|
|
|
296
296
|
}
|
|
297
297
|
if (context.to.value) {
|
|
298
298
|
kms.stm.api.setVariable(context.from.value, context.to.value)
|
|
299
|
+
// config.addWord(context.from.word, context.to)
|
|
299
300
|
} else {
|
|
300
301
|
await kms.dialogues.api.makeObject({ context: context.from, types: context.to.types || [], config });
|
|
301
302
|
kms.stm.api.setVariable(context.from.value, context.to)
|
|
@@ -412,8 +413,6 @@ knowledgeModule({
|
|
|
412
413
|
context: [defaultContextCheck()],
|
|
413
414
|
},
|
|
414
415
|
},
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
instance: meta_instance,
|
|
418
|
-
},
|
|
416
|
+
instance,
|
|
417
|
+
template,
|
|
419
418
|
})
|
package/common/nameable.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { knowledgeModule, where } = require('./runtime').theprogrammablemind
|
|
2
|
-
const { defaultContextCheck } = require('./helpers')
|
|
2
|
+
const { defaultContextCheck, defaultContextCheckProperties } = require('./helpers')
|
|
3
3
|
const helpers = require('./helpers')
|
|
4
4
|
const stm = require('./stm')
|
|
5
5
|
const nameable_tests = require('./nameable.test.json')
|
|
@@ -14,13 +14,10 @@ class API {
|
|
|
14
14
|
|
|
15
15
|
// report is a context
|
|
16
16
|
setName(context, name) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
if (!context.stm.names) {
|
|
21
|
-
context.stm.names = []
|
|
22
|
-
}
|
|
17
|
+
context.stm ??= {}
|
|
18
|
+
context.stm.names ??= []
|
|
23
19
|
context.stm.names.push(name)
|
|
20
|
+
this.args.config.addWord(name, { id: context.marker, initial: `{ value: "${name}", pullFromContext: true, nameable_named: true }` })
|
|
24
21
|
}
|
|
25
22
|
|
|
26
23
|
get(type, name) {
|
|
@@ -70,8 +67,18 @@ class API {
|
|
|
70
67
|
}
|
|
71
68
|
}
|
|
72
69
|
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
function initializer({config}) {
|
|
71
|
+
config.addArgs(({kms, mentioned}) => {
|
|
72
|
+
return {
|
|
73
|
+
mentioned: (args) => {
|
|
74
|
+
mentioned(args)
|
|
75
|
+
if (args.name) {
|
|
76
|
+
kms.nameable.api.setName(args.context, args.name)
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
}
|
|
80
|
+
})
|
|
81
|
+
}
|
|
75
82
|
const config = {
|
|
76
83
|
name: 'nameable',
|
|
77
84
|
operators: [
|
|
@@ -107,19 +114,25 @@ const config = {
|
|
|
107
114
|
id: 'call',
|
|
108
115
|
isA: ['verb'],
|
|
109
116
|
bridge: "{ ...next(operator), nameable: after[0], name: after[1:][0] }",
|
|
110
|
-
// bridge: "{ ...next(operator), nameable: after[0], name: after[1] }",
|
|
111
|
-
// generatorp: async ({context, g}) => `call ${await g(context.nameable)} ${await g(context.name)}`,
|
|
112
117
|
generatorp: async ({context, g, gs}) => `call ${await g(context.nameable)} ${await gs(context.name)}`,
|
|
113
|
-
semantic: async ({config, context, api, e}) => {
|
|
118
|
+
semantic: async ({config, context, api, e, verbatim, g}) => {
|
|
114
119
|
// TODO find report being referred to
|
|
115
120
|
const nameable = (await e(context.nameable)).evalue
|
|
121
|
+
if (!nameable) {
|
|
122
|
+
verbatim(`${await g(context.nameable)} is not known`)
|
|
123
|
+
return
|
|
124
|
+
}
|
|
116
125
|
const name = context.name.map((n) => n.text).join(' ')
|
|
117
126
|
// const name = context.name.text
|
|
118
|
-
config.addWord(name, { id: nameable.marker, initial: `{ value: "${name}", pullFromContext: true, nameable_named: true }` })
|
|
119
127
|
api.setName(nameable, name)
|
|
120
|
-
}
|
|
128
|
+
},
|
|
129
|
+
check: defaultContextCheckProperties(['nameable', 'name']),
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: 'nameable',
|
|
133
|
+
words: helpers.words('nameable'),
|
|
134
|
+
children: ['thisitthat'],
|
|
121
135
|
},
|
|
122
|
-
{ id: 'nameable', words: helpers.words('nameable')},
|
|
123
136
|
]
|
|
124
137
|
}
|
|
125
138
|
|
|
@@ -127,6 +140,7 @@ knowledgeModule( {
|
|
|
127
140
|
config,
|
|
128
141
|
api: () => new API(),
|
|
129
142
|
includes: [stm],
|
|
143
|
+
initializer,
|
|
130
144
|
|
|
131
145
|
module,
|
|
132
146
|
description: 'namable objects',
|