tpmkms_4wp 9.8.0 → 9.9.0-beta.1
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 +12 -10
- package/common/actions.js +14 -12
- package/common/angle.instance.json +37 -17
- package/common/animals.instance.json +54 -28
- package/common/askfor.instance.json +89 -192
- package/common/askfor.js +49 -12
- package/common/asking.js +13 -5
- package/common/avatar.js +3 -3
- package/common/can.instance.json +32 -20
- package/common/can.js +2 -2
- package/common/colors.instance.json +44 -16
- package/common/colors.js +1 -1
- package/common/comparable.instance.json +25 -22
- package/common/compass.instance.json +9 -3
- package/common/compass.js +1 -1
- package/common/concept.instance.json +14 -6
- package/common/concept.js +2 -0
- package/common/conjunction.js +20 -12
- package/common/control.js +10 -18
- package/common/countable.js +4 -3
- package/common/crew.instance.json +95 -27
- package/common/dateTimeSelectors.instance.json +4 -4
- package/common/dateTimeSelectors.js +4 -7
- package/common/dates.instance.json +52 -28
- package/common/dates.js +16 -11
- package/common/debug.instance.json +52 -0
- package/common/debug.js +52 -0
- package/common/debug.test.json +1 -0
- package/common/dialogues.js +126 -70
- package/common/dimension.instance.json +259 -492
- package/common/dimension.js +72 -12
- package/common/drone.instance.json +441 -84
- package/common/drone.js +57 -56
- package/common/drone_v1.instance.json +36 -12
- package/common/drone_v1.js +20 -15
- package/common/edible.instance.json +96 -32
- package/common/emotions.instance.json +15 -1
- package/common/evaluate.js +10 -13
- package/common/fastfood.instance.json +282 -100
- package/common/fastfood.js +30 -15
- package/common/formulas.instance.json +162 -24
- package/common/formulas.js +18 -9
- package/common/gdefaults.js +20 -96
- package/common/helpers/concept.js +2 -9
- package/common/helpers/conjunction.js +11 -1
- package/common/helpers/dialogues.js +48 -24
- package/common/helpers/gdefaults.js +15 -5
- package/common/helpers/properties.js +132 -326
- package/common/helpers.js +28 -58
- package/common/hierarchy.js +71 -41
- package/common/kirk.instance.json +3 -1
- package/common/latin.instance.json +14 -14
- package/common/latin.js +7 -7
- package/common/length.instance.json +331 -61
- package/common/linear_orderings.instance.json +1 -0
- package/common/linear_orderings.js +90 -0
- package/common/linear_orderings.test.json +1 -0
- package/common/math.instance.json +144 -5
- package/common/math.js +18 -7
- package/common/menus.instance.json +29 -11
- package/common/menus.js +8 -5
- package/common/meta.js +14 -13
- package/common/nameable.js +9 -5
- package/common/numbers.instance.json +8 -3
- package/common/numbers.js +59 -35
- package/common/ordering.instance.json +53 -4
- package/common/ordinals.js +25 -25
- package/common/people.instance.json +66 -12
- package/common/percentages.js +4 -2
- package/common/pipboy.instance.json +89 -44
- package/common/pipboy.js +21 -14
- package/common/pokemon.instance.json +39 -13
- package/common/pressure.instance.json +20 -6
- package/common/properties.instance.json +2648 -501
- package/common/properties.js +561 -82
- package/common/punctuation.js +1 -0
- package/common/rates.instance.json +2 -2
- package/common/rates.js +3 -3
- package/common/reminders.instance.json +16 -0
- package/common/reminders.js +24 -20
- package/common/reports.instance.json +11 -12
- package/common/reports.js +12 -12
- package/common/scorekeeper.js +20 -10
- package/common/sdefaults.js +30 -9
- package/common/spock.instance.json +3 -1
- package/common/stm.js +16 -21
- package/common/temperature.instance.json +40 -11
- package/common/testing.js +2 -2
- package/common/time.instance.json +149 -47
- package/common/time.js +9 -8
- package/common/ui.instance.json +4 -2
- package/common/ui.js +5 -5
- package/common/weight.instance.json +113 -21
- package/common/weight.js +5 -1
- package/common/words.js +113 -2
- package/common/wp.instance.json +125 -18
- package/common/wp.js +6 -2
- package/main.js +2 -0
- package/package.json +10 -3
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"action": "(@<= 'action' || @<= 'doAction')"
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
"semantic": "async ({context, fragments, e,
|
|
49
|
+
"semantic": "async ({context, fragments, e, toFinalValue, kms}) => {\n const instantiation = await fragments(\"quantity in milliseconds\", { quantity: context.delayTime })\n const result = await e(instantiation, where())\n const milliseconds = toFinalValue(toFinalValue(result).amount)\n await kms.time.api.sleep(milliseconds)\n await e(context.action, where())\n }"
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"where": "/home/dev/code/theprogrammablemind/kms/common/actions.js:62",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"doAction"
|
|
67
67
|
],
|
|
68
68
|
"selector": {
|
|
69
|
-
"match": "
|
|
69
|
+
"match": "applicable",
|
|
70
70
|
"left": [
|
|
71
71
|
{
|
|
72
72
|
"pattern": "(@<= action || (@<=doAction && context.marker.level == 1))"
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"action"
|
|
143
143
|
]
|
|
144
144
|
],
|
|
145
|
-
"semantic": "async ({context, toArray,
|
|
145
|
+
"semantic": "async ({context, toArray, e}) => {\n for (const action of toArray(context.action)) {\n await e(action, where())\n }\n }"
|
|
146
146
|
}
|
|
147
147
|
],
|
|
148
148
|
"words": {
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"defs": [
|
|
159
159
|
{
|
|
160
160
|
"id": "action",
|
|
161
|
-
"initial": "{ value: text,
|
|
161
|
+
"initial": "{ value: text, isInstance: true, dead: true }"
|
|
162
162
|
}
|
|
163
163
|
]
|
|
164
164
|
}
|
|
@@ -166,8 +166,8 @@
|
|
|
166
166
|
},
|
|
167
167
|
"semantics": [
|
|
168
168
|
{
|
|
169
|
-
"match": "({context, isA, stack, namespaced}) => !context.pullFromContext && !
|
|
170
|
-
"apply": "async ({context, _continue, testLog,
|
|
169
|
+
"match": "({context, isA, contextHierarchy, stack, namespaced}) => {\n return !context.pullFromContext && !contextHierarchy.under('call') && (isA(context.marker, 'action') || isA(context.marker, 'doAction')) && !namespaced.get('actions', context, 'logged')\n }",
|
|
170
|
+
"apply": "async ({context, _continue, testLog, gp, remember}) => {\n remember(context)\n await testLog(() => gp(context))\n _continue()\n }"
|
|
171
171
|
}
|
|
172
172
|
]
|
|
173
173
|
}
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
"doAction"
|
|
240
240
|
],
|
|
241
241
|
"selector": {
|
|
242
|
-
"match": "
|
|
242
|
+
"match": "applicable",
|
|
243
243
|
"left": [
|
|
244
244
|
{
|
|
245
245
|
"pattern": "(@<= action || (@<=doAction && context.marker.level == 1))"
|
|
@@ -330,7 +330,7 @@
|
|
|
330
330
|
"defs": [
|
|
331
331
|
{
|
|
332
332
|
"id": "action",
|
|
333
|
-
"initial": "{ value: text,
|
|
333
|
+
"initial": "{ value: text, isInstance: true, dead: true }"
|
|
334
334
|
}
|
|
335
335
|
]
|
|
336
336
|
}
|
|
@@ -427,8 +427,7 @@
|
|
|
427
427
|
},
|
|
428
428
|
"level": 1,
|
|
429
429
|
"context_index": 1,
|
|
430
|
-
"topLevel": true
|
|
431
|
-
"context_id": 2
|
|
430
|
+
"topLevel": true
|
|
432
431
|
}
|
|
433
432
|
],
|
|
434
433
|
"generated": [
|
|
@@ -536,6 +535,9 @@
|
|
|
536
535
|
}
|
|
537
536
|
],
|
|
538
537
|
"learned_contextual_priorities": [],
|
|
538
|
+
"explain_associations_details": [
|
|
539
|
+
null
|
|
540
|
+
],
|
|
539
541
|
"query": "quantity in milliseconds",
|
|
540
542
|
"skipSemantics": true,
|
|
541
543
|
"key": {
|
package/common/actions.js
CHANGED
|
@@ -50,12 +50,12 @@ const config = {
|
|
|
50
50
|
action: "(@<= 'action' || @<= 'doAction')",
|
|
51
51
|
},
|
|
52
52
|
},
|
|
53
|
-
semantic: async ({context, fragments, e,
|
|
53
|
+
semantic: async ({context, fragments, e, toFinalValue, kms}) => {
|
|
54
54
|
const instantiation = await fragments("quantity in milliseconds", { quantity: context.delayTime })
|
|
55
|
-
const result = await e(instantiation)
|
|
55
|
+
const result = await e(instantiation, where())
|
|
56
56
|
const milliseconds = toFinalValue(toFinalValue(result).amount)
|
|
57
57
|
await kms.time.api.sleep(milliseconds)
|
|
58
|
-
await
|
|
58
|
+
await e(context.action, where())
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
{
|
|
@@ -70,7 +70,7 @@ const config = {
|
|
|
70
70
|
isA: ['action'],
|
|
71
71
|
before: ['doAction'],
|
|
72
72
|
selector: {
|
|
73
|
-
match: "
|
|
73
|
+
match: "applicable",
|
|
74
74
|
left: [ { pattern: '(@<= action || (@<=doAction && context.marker.level == 1))' } ],
|
|
75
75
|
right: [ { pattern: '(@<= action || (@<=doAction && context.marker.level == 1))' } ],
|
|
76
76
|
passthrough: true
|
|
@@ -98,9 +98,9 @@ const config = {
|
|
|
98
98
|
bridge: "{ ...next(operator), value: append(before, operator.value) }",
|
|
99
99
|
semantic: {
|
|
100
100
|
match: ({context}) => context.isList,
|
|
101
|
-
apply: async ({context, toArray,
|
|
101
|
+
apply: async ({context, toArray, e}) => {
|
|
102
102
|
for (const action of toArray(context)) {
|
|
103
|
-
await
|
|
103
|
+
await e(action, where())
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
106
|
}
|
|
@@ -131,26 +131,28 @@ const config = {
|
|
|
131
131
|
}`,
|
|
132
132
|
localHierarchy: [['thisitthat', 'action']],
|
|
133
133
|
where: where(),
|
|
134
|
-
semantic: async ({context, toArray,
|
|
134
|
+
semantic: async ({context, toArray, e}) => {
|
|
135
135
|
for (const action of toArray(context.action)) {
|
|
136
|
-
await
|
|
136
|
+
await e(action, where())
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
139
|
},
|
|
140
140
|
],
|
|
141
141
|
words: {
|
|
142
142
|
patterns: [
|
|
143
|
-
{ "pattern": ["action", { type: 'digit' }], allow_partial_matches: false, defs: [{id: "action", initial: "{ value: text,
|
|
143
|
+
{ "pattern": ["action", { type: 'digit' }], allow_partial_matches: false, defs: [{id: "action", initial: "{ value: text, isInstance: true, dead: true }" }]},
|
|
144
144
|
],
|
|
145
145
|
},
|
|
146
146
|
semantics: [
|
|
147
147
|
{
|
|
148
148
|
where: where(),
|
|
149
149
|
priority: -1,
|
|
150
|
-
match: ({context, isA, stack, namespaced}) =>
|
|
151
|
-
|
|
150
|
+
match: ({context, isA, contextHierarchy, stack, namespaced}) => {
|
|
151
|
+
return !context.pullFromContext && !contextHierarchy.under('call') && (isA(context.marker, 'action') || isA(context.marker, 'doAction')) && !namespaced.get('actions', context, 'logged')
|
|
152
|
+
},
|
|
153
|
+
apply: async ({context, _continue, testLog, gp, remember}) => {
|
|
152
154
|
remember(context)
|
|
153
|
-
await testLog(() =>
|
|
155
|
+
await testLog(() => gp(context))
|
|
154
156
|
_continue()
|
|
155
157
|
}
|
|
156
158
|
},
|
|
@@ -140,7 +140,6 @@
|
|
|
140
140
|
"level": 2,
|
|
141
141
|
"context_index": 1,
|
|
142
142
|
"topLevel": true,
|
|
143
|
-
"context_id": 2,
|
|
144
143
|
"touchedBy": [
|
|
145
144
|
"angle#call2"
|
|
146
145
|
]
|
|
@@ -321,6 +320,9 @@
|
|
|
321
320
|
}
|
|
322
321
|
],
|
|
323
322
|
"learned_contextual_priorities": [],
|
|
323
|
+
"explain_associations_details": [
|
|
324
|
+
null
|
|
325
|
+
],
|
|
324
326
|
"query": "angle is a dimension",
|
|
325
327
|
"key": {
|
|
326
328
|
"query": "angle is a dimension"
|
|
@@ -340,7 +342,7 @@
|
|
|
340
342
|
0
|
|
341
343
|
],
|
|
342
344
|
[
|
|
343
|
-
"
|
|
345
|
+
"hasPropertyValue",
|
|
344
346
|
0
|
|
345
347
|
],
|
|
346
348
|
[
|
|
@@ -373,7 +375,7 @@
|
|
|
373
375
|
0
|
|
374
376
|
],
|
|
375
377
|
[
|
|
376
|
-
"
|
|
378
|
+
"hasPropertyValue",
|
|
377
379
|
0
|
|
378
380
|
],
|
|
379
381
|
[
|
|
@@ -402,7 +404,7 @@
|
|
|
402
404
|
0
|
|
403
405
|
],
|
|
404
406
|
[
|
|
405
|
-
"
|
|
407
|
+
"hasPropertyValue",
|
|
406
408
|
0
|
|
407
409
|
],
|
|
408
410
|
[
|
|
@@ -647,7 +649,6 @@
|
|
|
647
649
|
"level": 2,
|
|
648
650
|
"context_index": 1,
|
|
649
651
|
"topLevel": true,
|
|
650
|
-
"context_id": 2,
|
|
651
652
|
"touchedBy": [
|
|
652
653
|
"angle#call2"
|
|
653
654
|
]
|
|
@@ -702,7 +703,7 @@
|
|
|
702
703
|
},
|
|
703
704
|
{
|
|
704
705
|
"marker": [
|
|
705
|
-
"
|
|
706
|
+
"hasPropertyValue",
|
|
706
707
|
0
|
|
707
708
|
],
|
|
708
709
|
"range": {
|
|
@@ -777,7 +778,7 @@
|
|
|
777
778
|
},
|
|
778
779
|
{
|
|
779
780
|
"marker": [
|
|
780
|
-
"
|
|
781
|
+
"hasPropertyValue",
|
|
781
782
|
0
|
|
782
783
|
],
|
|
783
784
|
"range": {
|
|
@@ -852,7 +853,7 @@
|
|
|
852
853
|
},
|
|
853
854
|
{
|
|
854
855
|
"marker": [
|
|
855
|
-
"
|
|
856
|
+
"hasPropertyValue",
|
|
856
857
|
0
|
|
857
858
|
],
|
|
858
859
|
"range": {
|
|
@@ -1118,6 +1119,9 @@
|
|
|
1118
1119
|
}
|
|
1119
1120
|
],
|
|
1120
1121
|
"learned_contextual_priorities": [],
|
|
1122
|
+
"explain_associations_details": [
|
|
1123
|
+
null
|
|
1124
|
+
],
|
|
1121
1125
|
"query": "degrees and radians are units of angle",
|
|
1122
1126
|
"key": {
|
|
1123
1127
|
"query": "degrees and radians are units of angle"
|
|
@@ -1361,7 +1365,10 @@
|
|
|
1361
1365
|
},
|
|
1362
1366
|
"y": {
|
|
1363
1367
|
"value": 180,
|
|
1364
|
-
"
|
|
1368
|
+
"isInstance": true,
|
|
1369
|
+
"rangeableWith": [
|
|
1370
|
+
"number"
|
|
1371
|
+
],
|
|
1365
1372
|
"text": "180",
|
|
1366
1373
|
"marker": "integer",
|
|
1367
1374
|
"word": "180",
|
|
@@ -1393,7 +1400,10 @@
|
|
|
1393
1400
|
"y": {
|
|
1394
1401
|
"value": 3.1415926,
|
|
1395
1402
|
"integer": "many",
|
|
1396
|
-
"
|
|
1403
|
+
"isInstance": true,
|
|
1404
|
+
"rangeableWith": [
|
|
1405
|
+
"number"
|
|
1406
|
+
],
|
|
1397
1407
|
"marker": "integer",
|
|
1398
1408
|
"word": "pi",
|
|
1399
1409
|
"text": "pi",
|
|
@@ -1425,7 +1435,6 @@
|
|
|
1425
1435
|
"level": 1,
|
|
1426
1436
|
"context_index": 1,
|
|
1427
1437
|
"topLevel": true,
|
|
1428
|
-
"context_id": 2,
|
|
1429
1438
|
"touchedBy": [
|
|
1430
1439
|
"angle#call2"
|
|
1431
1440
|
]
|
|
@@ -1781,6 +1790,9 @@
|
|
|
1781
1790
|
}
|
|
1782
1791
|
],
|
|
1783
1792
|
"learned_contextual_priorities": [],
|
|
1793
|
+
"explain_associations_details": [
|
|
1794
|
+
null
|
|
1795
|
+
],
|
|
1784
1796
|
"query": "degrees = radians * 180 / pi",
|
|
1785
1797
|
"key": {
|
|
1786
1798
|
"query": "degrees = radians * 180 / pi"
|
|
@@ -2025,7 +2037,10 @@
|
|
|
2025
2037
|
"y": {
|
|
2026
2038
|
"value": 3.1415926,
|
|
2027
2039
|
"integer": "many",
|
|
2028
|
-
"
|
|
2040
|
+
"isInstance": true,
|
|
2041
|
+
"rangeableWith": [
|
|
2042
|
+
"number"
|
|
2043
|
+
],
|
|
2029
2044
|
"marker": "integer",
|
|
2030
2045
|
"word": "pi",
|
|
2031
2046
|
"text": "pi",
|
|
@@ -2056,7 +2071,10 @@
|
|
|
2056
2071
|
},
|
|
2057
2072
|
"y": {
|
|
2058
2073
|
"value": 180,
|
|
2059
|
-
"
|
|
2074
|
+
"isInstance": true,
|
|
2075
|
+
"rangeableWith": [
|
|
2076
|
+
"number"
|
|
2077
|
+
],
|
|
2060
2078
|
"text": "180",
|
|
2061
2079
|
"marker": "integer",
|
|
2062
2080
|
"word": "180",
|
|
@@ -2088,7 +2106,6 @@
|
|
|
2088
2106
|
"level": 1,
|
|
2089
2107
|
"context_index": 1,
|
|
2090
2108
|
"topLevel": true,
|
|
2091
|
-
"context_id": 2,
|
|
2092
2109
|
"touchedBy": [
|
|
2093
2110
|
"angle#call2"
|
|
2094
2111
|
]
|
|
@@ -2444,6 +2461,9 @@
|
|
|
2444
2461
|
}
|
|
2445
2462
|
],
|
|
2446
2463
|
"learned_contextual_priorities": [],
|
|
2464
|
+
"explain_associations_details": [
|
|
2465
|
+
null
|
|
2466
|
+
],
|
|
2447
2467
|
"query": "radians = degrees * pi / 180",
|
|
2448
2468
|
"key": {
|
|
2449
2469
|
"query": "radians = degrees * pi / 180"
|
|
@@ -2650,7 +2670,7 @@
|
|
|
2650
2670
|
},
|
|
2651
2671
|
{
|
|
2652
2672
|
"marker": [
|
|
2653
|
-
"
|
|
2673
|
+
"hasPropertyValue",
|
|
2654
2674
|
0
|
|
2655
2675
|
],
|
|
2656
2676
|
"range": {
|
|
@@ -2725,7 +2745,7 @@
|
|
|
2725
2745
|
},
|
|
2726
2746
|
{
|
|
2727
2747
|
"marker": [
|
|
2728
|
-
"
|
|
2748
|
+
"hasPropertyValue",
|
|
2729
2749
|
0
|
|
2730
2750
|
],
|
|
2731
2751
|
"range": {
|
|
@@ -2800,7 +2820,7 @@
|
|
|
2800
2820
|
},
|
|
2801
2821
|
{
|
|
2802
2822
|
"marker": [
|
|
2803
|
-
"
|
|
2823
|
+
"hasPropertyValue",
|
|
2804
2824
|
0
|
|
2805
2825
|
],
|
|
2806
2826
|
"range": {
|