tpmkms 9.6.3-beta.2 → 9.6.3-beta.21

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.
Files changed (55) hide show
  1. package/common/actions.instance.json +130 -5
  2. package/common/actions.js +54 -4
  3. package/common/actions.test.json +31359 -322
  4. package/common/angle.instance.json +58 -834
  5. package/common/articles.js +1 -2
  6. package/common/compass.instance.json +3 -18
  7. package/common/concept.js +2 -1
  8. package/common/conjunction.js +11 -17
  9. package/common/dialogues.js +3 -3
  10. package/common/dimension.instance.json +4 -69
  11. package/common/dimension.js +5 -5
  12. package/common/drone.instance.json +14985 -2538
  13. package/common/drone.js +276 -61
  14. package/common/drone.test.json +412474 -28440
  15. package/common/drone_v1.instance.json +324 -44
  16. package/common/drone_v1.js +9 -9
  17. package/common/edible.instance.json +72 -0
  18. package/common/fastfood.instance.json +5 -72
  19. package/common/fastfood.js +1 -1
  20. package/common/formulas.instance.json +0 -5
  21. package/common/formulas.js +1 -1
  22. package/common/gdefaults.js +16 -5
  23. package/common/helpers/conjunction.js +2 -0
  24. package/common/helpers/formulas.js +6 -0
  25. package/common/helpers/properties.js +9 -7
  26. package/common/helpers.js +9 -5
  27. package/common/hierarchy.js +2 -0
  28. package/common/length.instance.json +555 -5686
  29. package/common/math.instance.json +10 -12
  30. package/common/math.js +6 -5
  31. package/common/menus.instance.json +0 -35
  32. package/common/meta.js +1 -1
  33. package/common/nameable.js +7 -9
  34. package/common/ordinals.js +51 -5
  35. package/common/pipboy.instance.json +0 -85
  36. package/common/pipboy.js +1 -1
  37. package/common/pressure.instance.json +28 -370
  38. package/common/properties.js +4 -3
  39. package/common/rates.instance.json +1 -1
  40. package/common/rates.js +3 -3
  41. package/common/reminders.js +1 -1
  42. package/common/reports.instance.json +9 -176
  43. package/common/reports.js +2 -2
  44. package/common/scorekeeper.js +1 -1
  45. package/common/sdefaults.js +40 -5
  46. package/common/stm.js +50 -42
  47. package/common/temperature.instance.json +648 -2303
  48. package/common/time.instance.json +7376 -1965
  49. package/common/time.js +22 -1
  50. package/common/time.test.json +13239 -0
  51. package/common/ui.instance.json +0 -5
  52. package/common/ui.js +1 -1
  53. package/common/weight.instance.json +329 -1834
  54. package/common/wp.instance.json +88 -70
  55. package/package.json +3 -3
@@ -43,7 +43,7 @@
43
43
  "verb"
44
44
  ],
45
45
  "bridge": "{ ...next(operator), interpolate: [{ context: operator }] }",
46
- "semantic": "({context, objects, api, mentioned}) => {\n objects.current.direction = 'forward'\n const startTime = api.forward(objects.current.power)\n objects.calibration.startTime = startTime\n\n const ordinal = api.nextOrdinal()\n mentioned({ marker: 'point', ordinal, point: { x: 0, y: 0 }, description: \"calibration start\" })\n objects.current.ordinal = ordinal\n }"
46
+ "semantic": "({context, objects, api, remember}) => {\n objects.current.direction = 'forward'\n const startTime = api.forward(objects.current.power)\n objects.calibration.startTime = startTime\n\n const ordinal = api.nextOrdinal()\n remember({ marker: 'point', ordinal, point: { x: 0, y: 0 }, description: \"calibration start\" })\n objects.current.ordinal = ordinal\n }"
47
47
  },
48
48
  {
49
49
  "id": "pause",
@@ -62,7 +62,7 @@
62
62
  "1": "{ marker: 'drone' }"
63
63
  },
64
64
  "bridge": "{ ...next(operator), object: after[0], interpolate: [{ context: operator }, { property: 'object' }] }",
65
- "semantic": "async ({mentioned, context, objects, api, say}) => {\n if (!objects.calibration.startTime) {\n return // ignore\n }\n if (objects.calibration.speed) {\n /*\n const stopTime = api.stop()\n const ordinal = api.nextOrdinal()\n const point = api.currentPoint()\n mentioned({ marker: 'point', ordinal, point })\n objects.current.ordinal = ordinal\n */\n api.stop()\n await api.markCurrentPoint()\n } else {\n const stopTime = api.stop()\n objects.calibration.endTime = stopTime\n objects.calibration.duration = (objects.calibration.endTime - objects.calibration.startTime)/1000\n }\n }"
65
+ "semantic": "async ({remember, context, objects, api, say}) => {\n if (!objects.calibration.startTime) {\n return // ignore\n }\n if (objects.calibration.speed) {\n /*\n const stopTime = api.stop()\n const ordinal = api.nextOrdinal()\n const point = api.currentPoint()\n remember({ marker: 'point', ordinal, point })\n objects.current.ordinal = ordinal\n */\n api.stop()\n await api.markCurrentPoint()\n } else {\n const stopTime = api.stop()\n objects.calibration.endTime = stopTime\n objects.calibration.duration = (objects.calibration.endTime - objects.calibration.startTime)/1000\n }\n }"
66
66
  }
67
67
  ],
68
68
  "generators": [
@@ -1077,11 +1077,6 @@
1077
1077
  "expression",
1078
1078
  false
1079
1079
  ],
1080
- [
1081
- "mathematicalExpression",
1082
- "number",
1083
- false
1084
- ],
1085
1080
  [
1086
1081
  "mathematical_operator",
1087
1082
  "adjective",
@@ -1622,6 +1617,51 @@
1622
1617
  "unit_length",
1623
1618
  false
1624
1619
  ],
1620
+ [
1621
+ "millisecond",
1622
+ "hierarchyAble",
1623
+ false
1624
+ ],
1625
+ [
1626
+ "millisecond",
1627
+ "isEdee",
1628
+ false
1629
+ ],
1630
+ [
1631
+ "millisecond",
1632
+ "isEder",
1633
+ false
1634
+ ],
1635
+ [
1636
+ "millisecond",
1637
+ "object",
1638
+ false
1639
+ ],
1640
+ [
1641
+ "millisecond",
1642
+ "property",
1643
+ false
1644
+ ],
1645
+ [
1646
+ "millisecond",
1647
+ "queryable",
1648
+ false
1649
+ ],
1650
+ [
1651
+ "millisecond",
1652
+ "theAble",
1653
+ false
1654
+ ],
1655
+ [
1656
+ "millisecond",
1657
+ "thisAble",
1658
+ false
1659
+ ],
1660
+ [
1661
+ "millisecond",
1662
+ "unit_time",
1663
+ false
1664
+ ],
1625
1665
  [
1626
1666
  "minimum",
1627
1667
  "hierarchyAble",
@@ -2329,7 +2369,7 @@
2329
2369
  ],
2330
2370
  [
2331
2371
  "unit",
2332
- "number",
2372
+ "mathematicalExpression",
2333
2373
  false
2334
2374
  ],
2335
2375
  [
@@ -3955,11 +3995,6 @@
3955
3995
  "expression",
3956
3996
  false
3957
3997
  ],
3958
- [
3959
- "mathematicalExpression",
3960
- "number",
3961
- false
3962
- ],
3963
3998
  [
3964
3999
  "mathematical_operator",
3965
4000
  "adjective",
@@ -4500,6 +4535,51 @@
4500
4535
  "unit_length",
4501
4536
  false
4502
4537
  ],
4538
+ [
4539
+ "millisecond",
4540
+ "hierarchyAble",
4541
+ false
4542
+ ],
4543
+ [
4544
+ "millisecond",
4545
+ "isEdee",
4546
+ false
4547
+ ],
4548
+ [
4549
+ "millisecond",
4550
+ "isEder",
4551
+ false
4552
+ ],
4553
+ [
4554
+ "millisecond",
4555
+ "object",
4556
+ false
4557
+ ],
4558
+ [
4559
+ "millisecond",
4560
+ "property",
4561
+ false
4562
+ ],
4563
+ [
4564
+ "millisecond",
4565
+ "queryable",
4566
+ false
4567
+ ],
4568
+ [
4569
+ "millisecond",
4570
+ "theAble",
4571
+ false
4572
+ ],
4573
+ [
4574
+ "millisecond",
4575
+ "thisAble",
4576
+ false
4577
+ ],
4578
+ [
4579
+ "millisecond",
4580
+ "unit_time",
4581
+ false
4582
+ ],
4503
4583
  [
4504
4584
  "minimum",
4505
4585
  "hierarchyAble",
@@ -5207,7 +5287,7 @@
5207
5287
  ],
5208
5288
  [
5209
5289
  "unit",
5210
- "number",
5290
+ "mathematicalExpression",
5211
5291
  false
5212
5292
  ],
5213
5293
  [
@@ -8922,11 +9002,6 @@
8922
9002
  "expression",
8923
9003
  false
8924
9004
  ],
8925
- [
8926
- "mathematicalExpression",
8927
- "number",
8928
- false
8929
- ],
8930
9005
  [
8931
9006
  "mathematical_operator",
8932
9007
  "adjective",
@@ -9467,6 +9542,51 @@
9467
9542
  "unit_length",
9468
9543
  false
9469
9544
  ],
9545
+ [
9546
+ "millisecond",
9547
+ "hierarchyAble",
9548
+ false
9549
+ ],
9550
+ [
9551
+ "millisecond",
9552
+ "isEdee",
9553
+ false
9554
+ ],
9555
+ [
9556
+ "millisecond",
9557
+ "isEder",
9558
+ false
9559
+ ],
9560
+ [
9561
+ "millisecond",
9562
+ "object",
9563
+ false
9564
+ ],
9565
+ [
9566
+ "millisecond",
9567
+ "property",
9568
+ false
9569
+ ],
9570
+ [
9571
+ "millisecond",
9572
+ "queryable",
9573
+ false
9574
+ ],
9575
+ [
9576
+ "millisecond",
9577
+ "theAble",
9578
+ false
9579
+ ],
9580
+ [
9581
+ "millisecond",
9582
+ "thisAble",
9583
+ false
9584
+ ],
9585
+ [
9586
+ "millisecond",
9587
+ "unit_time",
9588
+ false
9589
+ ],
9470
9590
  [
9471
9591
  "minimum",
9472
9592
  "hierarchyAble",
@@ -10219,7 +10339,7 @@
10219
10339
  ],
10220
10340
  [
10221
10341
  "unit",
10222
- "number",
10342
+ "mathematicalExpression",
10223
10343
  false
10224
10344
  ],
10225
10345
  [
@@ -12181,11 +12301,6 @@
12181
12301
  "expression",
12182
12302
  false
12183
12303
  ],
12184
- [
12185
- "mathematicalExpression",
12186
- "number",
12187
- false
12188
- ],
12189
12304
  [
12190
12305
  "mathematical_operator",
12191
12306
  "adjective",
@@ -12726,6 +12841,51 @@
12726
12841
  "unit_length",
12727
12842
  false
12728
12843
  ],
12844
+ [
12845
+ "millisecond",
12846
+ "hierarchyAble",
12847
+ false
12848
+ ],
12849
+ [
12850
+ "millisecond",
12851
+ "isEdee",
12852
+ false
12853
+ ],
12854
+ [
12855
+ "millisecond",
12856
+ "isEder",
12857
+ false
12858
+ ],
12859
+ [
12860
+ "millisecond",
12861
+ "object",
12862
+ false
12863
+ ],
12864
+ [
12865
+ "millisecond",
12866
+ "property",
12867
+ false
12868
+ ],
12869
+ [
12870
+ "millisecond",
12871
+ "queryable",
12872
+ false
12873
+ ],
12874
+ [
12875
+ "millisecond",
12876
+ "theAble",
12877
+ false
12878
+ ],
12879
+ [
12880
+ "millisecond",
12881
+ "thisAble",
12882
+ false
12883
+ ],
12884
+ [
12885
+ "millisecond",
12886
+ "unit_time",
12887
+ false
12888
+ ],
12729
12889
  [
12730
12890
  "minimum",
12731
12891
  "hierarchyAble",
@@ -13558,7 +13718,7 @@
13558
13718
  ],
13559
13719
  [
13560
13720
  "unit",
13561
- "number",
13721
+ "mathematicalExpression",
13562
13722
  false
13563
13723
  ],
13564
13724
  [
@@ -15404,11 +15564,6 @@
15404
15564
  "expression",
15405
15565
  false
15406
15566
  ],
15407
- [
15408
- "mathematicalExpression",
15409
- "number",
15410
- false
15411
- ],
15412
15567
  [
15413
15568
  "mathematical_operator",
15414
15569
  "adjective",
@@ -15949,6 +16104,51 @@
15949
16104
  "unit_length",
15950
16105
  false
15951
16106
  ],
16107
+ [
16108
+ "millisecond",
16109
+ "hierarchyAble",
16110
+ false
16111
+ ],
16112
+ [
16113
+ "millisecond",
16114
+ "isEdee",
16115
+ false
16116
+ ],
16117
+ [
16118
+ "millisecond",
16119
+ "isEder",
16120
+ false
16121
+ ],
16122
+ [
16123
+ "millisecond",
16124
+ "object",
16125
+ false
16126
+ ],
16127
+ [
16128
+ "millisecond",
16129
+ "property",
16130
+ false
16131
+ ],
16132
+ [
16133
+ "millisecond",
16134
+ "queryable",
16135
+ false
16136
+ ],
16137
+ [
16138
+ "millisecond",
16139
+ "theAble",
16140
+ false
16141
+ ],
16142
+ [
16143
+ "millisecond",
16144
+ "thisAble",
16145
+ false
16146
+ ],
16147
+ [
16148
+ "millisecond",
16149
+ "unit_time",
16150
+ false
16151
+ ],
15952
16152
  [
15953
16153
  "minimum",
15954
16154
  "hierarchyAble",
@@ -16826,7 +17026,7 @@
16826
17026
  ],
16827
17027
  [
16828
17028
  "unit",
16829
- "number",
17029
+ "mathematicalExpression",
16830
17030
  false
16831
17031
  ],
16832
17032
  [
@@ -19116,11 +19316,6 @@
19116
19316
  "expression",
19117
19317
  false
19118
19318
  ],
19119
- [
19120
- "mathematicalExpression",
19121
- "number",
19122
- false
19123
- ],
19124
19319
  [
19125
19320
  "mathematical_operator",
19126
19321
  "adjective",
@@ -19661,6 +19856,51 @@
19661
19856
  "unit_length",
19662
19857
  false
19663
19858
  ],
19859
+ [
19860
+ "millisecond",
19861
+ "hierarchyAble",
19862
+ false
19863
+ ],
19864
+ [
19865
+ "millisecond",
19866
+ "isEdee",
19867
+ false
19868
+ ],
19869
+ [
19870
+ "millisecond",
19871
+ "isEder",
19872
+ false
19873
+ ],
19874
+ [
19875
+ "millisecond",
19876
+ "object",
19877
+ false
19878
+ ],
19879
+ [
19880
+ "millisecond",
19881
+ "property",
19882
+ false
19883
+ ],
19884
+ [
19885
+ "millisecond",
19886
+ "queryable",
19887
+ false
19888
+ ],
19889
+ [
19890
+ "millisecond",
19891
+ "theAble",
19892
+ false
19893
+ ],
19894
+ [
19895
+ "millisecond",
19896
+ "thisAble",
19897
+ false
19898
+ ],
19899
+ [
19900
+ "millisecond",
19901
+ "unit_time",
19902
+ false
19903
+ ],
19664
19904
  [
19665
19905
  "minimum",
19666
19906
  "hierarchyAble",
@@ -20573,7 +20813,7 @@
20573
20813
  ],
20574
20814
  [
20575
20815
  "unit",
20576
- "number",
20816
+ "mathematicalExpression",
20577
20817
  false
20578
20818
  ],
20579
20819
  [
@@ -22281,11 +22521,6 @@
22281
22521
  "expression",
22282
22522
  false
22283
22523
  ],
22284
- [
22285
- "mathematicalExpression",
22286
- "number",
22287
- false
22288
- ],
22289
22524
  [
22290
22525
  "mathematical_operator",
22291
22526
  "adjective",
@@ -22826,6 +23061,51 @@
22826
23061
  "unit_length",
22827
23062
  false
22828
23063
  ],
23064
+ [
23065
+ "millisecond",
23066
+ "hierarchyAble",
23067
+ false
23068
+ ],
23069
+ [
23070
+ "millisecond",
23071
+ "isEdee",
23072
+ false
23073
+ ],
23074
+ [
23075
+ "millisecond",
23076
+ "isEder",
23077
+ false
23078
+ ],
23079
+ [
23080
+ "millisecond",
23081
+ "object",
23082
+ false
23083
+ ],
23084
+ [
23085
+ "millisecond",
23086
+ "property",
23087
+ false
23088
+ ],
23089
+ [
23090
+ "millisecond",
23091
+ "queryable",
23092
+ false
23093
+ ],
23094
+ [
23095
+ "millisecond",
23096
+ "theAble",
23097
+ false
23098
+ ],
23099
+ [
23100
+ "millisecond",
23101
+ "thisAble",
23102
+ false
23103
+ ],
23104
+ [
23105
+ "millisecond",
23106
+ "unit_time",
23107
+ false
23108
+ ],
22829
23109
  [
22830
23110
  "minimum",
22831
23111
  "hierarchyAble",
@@ -23738,7 +24018,7 @@
23738
24018
  ],
23739
24019
  [
23740
24020
  "unit",
23741
- "number",
24021
+ "mathematicalExpression",
23742
24022
  false
23743
24023
  ],
23744
24024
  [
@@ -146,7 +146,7 @@ class API {
146
146
  return null // in motion
147
147
  }
148
148
  const ordinal = this._objects.current.ordinal
149
- const lastPoint = await this.args.mentions({ context: { marker: 'point' }, condition: (context) => context.ordinal == ordinal })
149
+ const lastPoint = await this.args.recall({ context: { marker: 'point' }, condition: (context) => context.ordinal == ordinal })
150
150
 
151
151
  const durationInSeconds = (this._objects.current.endTime - this._objects.current.startTime) / 1000
152
152
  const speedInMetersPerSecond = (this._objects.current.power / this._objects.calibration.power) * this._objects.calibration.speed
@@ -162,7 +162,7 @@ class API {
162
162
  async markCurrentPoint() {
163
163
  const ordinal = this.nextOrdinal()
164
164
  const point = await this.currentPoint()
165
- this.args.mentioned({ marker: 'point', ordinal, point })
165
+ this.args.remember({ marker: 'point', ordinal, point })
166
166
  this._objects.current.ordinal = ordinal
167
167
  this._objects.current.endTime = null
168
168
  this._objects.current.startTime = null
@@ -196,7 +196,7 @@ class API {
196
196
  }
197
197
 
198
198
  if (this._objects.current.destination) {
199
- const currentPoint = await this.args.mentions({ context: { marker: 'point' } })
199
+ const currentPoint = await this.args.recall({ context: { marker: 'point' } })
200
200
  const polar = cartesianToPolar(currentPoint.point, this._objects.current.destination.point)
201
201
  const destinationAngleInDegrees = radiansToDegrees(polar.angle)
202
202
  let angleDelta = destinationAngleInDegrees - this._objects.current.angleInDegrees
@@ -398,12 +398,12 @@ function expectCalibrationCompletion(args) {
398
398
  args.config.addSemantic({
399
399
  oneShot: true,
400
400
  match: ({context, objects, isA}) => context.marker == 'controlEnd' && objects.calibration.distance && objects.calibration.duration && !objects.calibration.speed,
401
- apply: ({api, context, objects, _continue, say, mentioned}) => {
401
+ apply: ({api, context, objects, _continue, say, remember}) => {
402
402
  objects.calibration.speed = objects.calibration.distance / objects.calibration.duration
403
403
  objects.isCalibrated = true
404
404
  say(`The drone is calibrated. The speed is ${objects.calibration.speed.toFixed(4)} meters per second at 10 percent power`)
405
405
  const ordinal = api.nextOrdinal()
406
- mentioned({ marker: 'point', ordinal, point: { x: objects.calibration.distance, y: 0 }, distance: objects.calibration.distance, description: "calibration stop" })
406
+ remember({ marker: 'point', ordinal, point: { x: objects.calibration.distance, y: 0 }, distance: objects.calibration.distance, description: "calibration stop" })
407
407
  objects.current.ordinal = ordinal
408
408
  _continue()
409
409
  expectDistanceForMove(args)
@@ -502,13 +502,13 @@ const template = {
502
502
  id: 'calibrate',
503
503
  isA: ['verb'],
504
504
  bridge: "{ ...next(operator), interpolate: [{ context: operator }] }",
505
- semantic: ({context, objects, api, mentioned}) => {
505
+ semantic: ({context, objects, api, remember}) => {
506
506
  objects.current.direction = 'forward'
507
507
  const startTime = api.forward(objects.current.power)
508
508
  objects.calibration.startTime = startTime
509
509
 
510
510
  const ordinal = api.nextOrdinal()
511
- mentioned({ marker: 'point', ordinal, point: { x: 0, y: 0 }, description: "calibration start" })
511
+ remember({ marker: 'point', ordinal, point: { x: 0, y: 0 }, description: "calibration start" })
512
512
  objects.current.ordinal = ordinal
513
513
  }
514
514
  },
@@ -529,7 +529,7 @@ const template = {
529
529
  1: "{ marker: 'drone' }",
530
530
  },
531
531
  bridge: "{ ...next(operator), object: after[0], interpolate: [{ context: operator }, { property: 'object' }] }",
532
- semantic: async ({mentioned, context, objects, api, say}) => {
532
+ semantic: async ({remember, context, objects, api, say}) => {
533
533
  if (!objects.calibration.startTime) {
534
534
  return // ignore
535
535
  }
@@ -538,7 +538,7 @@ const template = {
538
538
  const stopTime = api.stop()
539
539
  const ordinal = api.nextOrdinal()
540
540
  const point = api.currentPoint()
541
- mentioned({ marker: 'point', ordinal, point })
541
+ remember({ marker: 'point', ordinal, point })
542
542
  objects.current.ordinal = ordinal
543
543
  */
544
544
  api.stop()
@@ -47005,6 +47005,24 @@
47005
47005
  0
47006
47006
  ]
47007
47007
  ],
47008
+ [
47009
+ [
47010
+ "a",
47011
+ 0
47012
+ ],
47013
+ [
47014
+ "is",
47015
+ 0
47016
+ ],
47017
+ [
47018
+ "sandwich",
47019
+ 0
47020
+ ],
47021
+ [
47022
+ "unknown",
47023
+ 0
47024
+ ]
47025
+ ],
47008
47026
  [
47009
47027
  [
47010
47028
  "is",
@@ -49854,6 +49872,24 @@
49854
49872
  0
49855
49873
  ]
49856
49874
  ],
49875
+ [
49876
+ [
49877
+ "a",
49878
+ 0
49879
+ ],
49880
+ [
49881
+ "hamburger",
49882
+ 0
49883
+ ],
49884
+ [
49885
+ "is",
49886
+ 0
49887
+ ],
49888
+ [
49889
+ "unknown",
49890
+ 0
49891
+ ]
49892
+ ],
49857
49893
  [
49858
49894
  [
49859
49895
  "hamburger",
@@ -71102,6 +71138,24 @@
71102
71138
  0
71103
71139
  ]
71104
71140
  ],
71141
+ [
71142
+ [
71143
+ "a",
71144
+ 0
71145
+ ],
71146
+ [
71147
+ "hamburger",
71148
+ 0
71149
+ ],
71150
+ [
71151
+ "is",
71152
+ 0
71153
+ ],
71154
+ [
71155
+ "unknown",
71156
+ 0
71157
+ ]
71158
+ ],
71105
71159
  [
71106
71160
  [
71107
71161
  "a",
@@ -71138,6 +71192,24 @@
71138
71192
  0
71139
71193
  ]
71140
71194
  ],
71195
+ [
71196
+ [
71197
+ "a",
71198
+ 0
71199
+ ],
71200
+ [
71201
+ "is",
71202
+ 0
71203
+ ],
71204
+ [
71205
+ "sandwich",
71206
+ 0
71207
+ ],
71208
+ [
71209
+ "unknown",
71210
+ 0
71211
+ ]
71212
+ ],
71141
71213
  [
71142
71214
  [
71143
71215
  "apple",