tpmkms 9.8.0 → 9.9.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.
Files changed (95) hide show
  1. package/common/actions.instance.json +10 -8
  2. package/common/actions.js +13 -11
  3. package/common/angle.instance.json +25 -17
  4. package/common/animals.instance.json +54 -28
  5. package/common/askfor.instance.json +89 -192
  6. package/common/askfor.js +49 -12
  7. package/common/asking.js +13 -5
  8. package/common/avatar.js +3 -3
  9. package/common/can.instance.json +32 -20
  10. package/common/can.js +2 -2
  11. package/common/colors.instance.json +44 -16
  12. package/common/colors.js +1 -1
  13. package/common/comparable.instance.json +25 -22
  14. package/common/compass.instance.json +9 -3
  15. package/common/concept.instance.json +14 -6
  16. package/common/concept.js +2 -0
  17. package/common/conjunction.js +17 -9
  18. package/common/control.js +10 -18
  19. package/common/countable.js +4 -3
  20. package/common/crew.instance.json +95 -27
  21. package/common/dateTimeSelectors.instance.json +4 -4
  22. package/common/dateTimeSelectors.js +4 -7
  23. package/common/dates.instance.json +52 -28
  24. package/common/dates.js +16 -11
  25. package/common/debug.instance.json +48 -0
  26. package/common/debug.js +50 -0
  27. package/common/debug.test.json +1 -0
  28. package/common/dialogues.js +126 -70
  29. package/common/dimension.instance.json +239 -495
  30. package/common/dimension.js +51 -9
  31. package/common/drone.instance.json +395 -84
  32. package/common/drone.js +43 -50
  33. package/common/drone_v1.instance.json +36 -12
  34. package/common/drone_v1.js +14 -9
  35. package/common/edible.instance.json +96 -32
  36. package/common/emotions.instance.json +15 -1
  37. package/common/evaluate.js +10 -13
  38. package/common/fastfood.instance.json +282 -100
  39. package/common/fastfood.js +30 -15
  40. package/common/formulas.instance.json +162 -24
  41. package/common/formulas.js +18 -9
  42. package/common/gdefaults.js +20 -96
  43. package/common/helpers/concept.js +2 -9
  44. package/common/helpers/conjunction.js +11 -1
  45. package/common/helpers/dialogues.js +48 -24
  46. package/common/helpers/gdefaults.js +15 -5
  47. package/common/helpers/properties.js +125 -326
  48. package/common/helpers.js +28 -58
  49. package/common/hierarchy.js +71 -41
  50. package/common/kirk.instance.json +3 -1
  51. package/common/latin.instance.json +10 -10
  52. package/common/latin.js +5 -5
  53. package/common/length.instance.json +247 -61
  54. package/common/math.instance.json +144 -5
  55. package/common/math.js +18 -5
  56. package/common/menus.instance.json +29 -11
  57. package/common/menus.js +8 -5
  58. package/common/meta.js +14 -13
  59. package/common/nameable.js +9 -5
  60. package/common/numbers.instance.json +5 -3
  61. package/common/numbers.js +28 -28
  62. package/common/ordering.instance.json +53 -4
  63. package/common/ordinals.js +25 -25
  64. package/common/people.instance.json +66 -12
  65. package/common/percentages.js +4 -2
  66. package/common/pipboy.instance.json +89 -44
  67. package/common/pipboy.js +21 -14
  68. package/common/pokemon.instance.json +39 -13
  69. package/common/pressure.instance.json +14 -6
  70. package/common/properties.instance.json +2370 -511
  71. package/common/properties.js +496 -78
  72. package/common/punctuation.js +1 -0
  73. package/common/rates.instance.json +2 -2
  74. package/common/rates.js +3 -3
  75. package/common/reminders.instance.json +16 -0
  76. package/common/reminders.js +24 -20
  77. package/common/reports.instance.json +11 -12
  78. package/common/reports.js +12 -12
  79. package/common/scorekeeper.js +20 -10
  80. package/common/sdefaults.js +30 -9
  81. package/common/spock.instance.json +3 -1
  82. package/common/stm.js +16 -21
  83. package/common/temperature.instance.json +19 -11
  84. package/common/testing.js +2 -2
  85. package/common/time.instance.json +104 -47
  86. package/common/time.js +9 -8
  87. package/common/ui.instance.json +4 -2
  88. package/common/ui.js +5 -5
  89. package/common/weight.instance.json +86 -21
  90. package/common/weight.js +5 -1
  91. package/common/words.js +113 -2
  92. package/common/wp.instance.json +125 -18
  93. package/common/wp.js +6 -2
  94. package/main.js +2 -0
  95. package/package.json +7 -3
@@ -143,7 +143,22 @@
143
143
  "isA": [
144
144
  "preposition"
145
145
  ],
146
- "bridge": "{ ...next(operator), time: after[0], operator: operator, interpolate: '${operator} ${time}' }"
146
+ "bridge": "{ ...next(operator), time: after[0], operator: operator, interpolate: '${operator} ${time}' }",
147
+ "check": [
148
+ "marker",
149
+ "text",
150
+ "verbatim",
151
+ "value",
152
+ "evalue",
153
+ "isResponse",
154
+ {
155
+ "properties": "modifiers"
156
+ },
157
+ {
158
+ "properties": "postModifiers"
159
+ },
160
+ "time"
161
+ ]
147
162
  },
148
163
  {
149
164
  "id": "ampm",
@@ -185,7 +200,7 @@
185
200
  },
186
201
  "generators": [
187
202
  {
188
- "match": "({context}) => context.marker == 'timePoint' && context.evalue && context.format == 12",
203
+ "match": "({context}) => context.marker == 'timePoint' && context.evalue && context.format == 12 && !context.paraphrase",
189
204
  "apply": "({context}) => {\n let hh = context.evalue.getHours();\n let ampm = 'am'\n if (hh > 12) {\n hh -= 12;\n ampm = 'pm'\n }\n let ss = context.evalue.getMinutes()\n ss = pad(ss, 2)\n return `${hh}:${ss} ${ampm}` \n }"
190
205
  },
191
206
  {
@@ -199,11 +214,11 @@
199
214
  ],
200
215
  "semantics": [
201
216
  {
202
- "match": "(args) => args.callOnce(args, ({context}) => context.repeats) && args.context.repeats?.repeats",
203
- "apply": "async ({context, e, s, handlerStack}) => {\n const v = (await e(context.repeats.repeats)).evalue\n for (let i = 0; i < v; ++i) {\n if (context.action) {\n await s(context.action)\n } else {\n const repeats = context.repeats\n context.repeats = undefined\n await s(context)\n context.repeats = repeats\n }\n }\n }"
217
+ "match": "async (args) => await args.callOnce(args, 'time.1', ({context}) => context.repeats) && args.context.repeats?.repeats",
218
+ "apply": "async ({context, e, handlerStack, toFinalValue}) => {\n const v = toFinalValue((await e(context.repeats.repeats, where())))\n for (let i = 0; i < v; ++i) {\n if (context.action) {\n await e(context.action, where())\n } else {\n const repeats = context.repeats\n context.repeats = undefined\n await e(context, where())\n context.repeats = repeats\n }\n }\n }"
204
219
  },
205
220
  {
206
- "match": "({objects, context, api}) => context.marker == 'timePoint' && context.evaluate",
221
+ "match": "({objects, context, api}) => context.marker == 'timePoint' && !context.isInstance",
207
222
  "apply": "({objects, context, api}) => {\n context.evalue = api.newDate()\n context.format = objects.format\n }"
208
223
  },
209
224
  {
@@ -351,11 +366,7 @@
351
366
  "dead": true,
352
367
  "level": 2,
353
368
  "context_index": 1,
354
- "topLevel": true,
355
- "context_id": 2,
356
- "touchedBy": [
357
- "time#call2"
358
- ]
369
+ "topLevel": true
359
370
  }
360
371
  ],
361
372
  "generated": [
@@ -533,6 +544,9 @@
533
544
  }
534
545
  ],
535
546
  "learned_contextual_priorities": [],
547
+ "explain_associations_details": [
548
+ null
549
+ ],
536
550
  "query": "concept is a property",
537
551
  "isFragment": true,
538
552
  "key": {
@@ -1693,7 +1707,6 @@
1693
1707
  "level": 2,
1694
1708
  "context_index": 1,
1695
1709
  "topLevel": true,
1696
- "context_id": 2,
1697
1710
  "touchedBy": [
1698
1711
  "time#call2"
1699
1712
  ]
@@ -4559,6 +4572,9 @@
4559
4572
  }
4560
4573
  ],
4561
4574
  "learned_contextual_priorities": [],
4575
+ "explain_associations_details": [
4576
+ null
4577
+ ],
4562
4578
  "query": "years, months, days, hours, minutes, milliseconds and seconds are units of time",
4563
4579
  "key": {
4564
4580
  "query": "years, months, days, hours, minutes, milliseconds and seconds are units of time"
@@ -4733,7 +4749,7 @@
4733
4749
  },
4734
4750
  "y": {
4735
4751
  "value": 12,
4736
- "instance": true,
4752
+ "isInstance": true,
4737
4753
  "text": "12",
4738
4754
  "marker": "integer",
4739
4755
  "word": "12",
@@ -4765,7 +4781,6 @@
4765
4781
  "level": 1,
4766
4782
  "context_index": 1,
4767
4783
  "topLevel": true,
4768
- "context_id": 2,
4769
4784
  "touchedBy": [
4770
4785
  "time#call2"
4771
4786
  ]
@@ -5006,6 +5021,9 @@
5006
5021
  }
5007
5022
  ],
5008
5023
  "learned_contextual_priorities": [],
5024
+ "explain_associations_details": [
5025
+ null
5026
+ ],
5009
5027
  "query": "years = months / 12",
5010
5028
  "key": {
5011
5029
  "query": "years = months / 12"
@@ -5180,7 +5198,7 @@
5180
5198
  },
5181
5199
  "y": {
5182
5200
  "value": 60,
5183
- "instance": true,
5201
+ "isInstance": true,
5184
5202
  "text": "60",
5185
5203
  "marker": "integer",
5186
5204
  "word": "60",
@@ -5212,7 +5230,6 @@
5212
5230
  "level": 1,
5213
5231
  "context_index": 1,
5214
5232
  "topLevel": true,
5215
- "context_id": 2,
5216
5233
  "touchedBy": [
5217
5234
  "time#call2"
5218
5235
  ]
@@ -5453,6 +5470,9 @@
5453
5470
  }
5454
5471
  ],
5455
5472
  "learned_contextual_priorities": [],
5473
+ "explain_associations_details": [
5474
+ null
5475
+ ],
5456
5476
  "query": "hours = minutes / 60",
5457
5477
  "key": {
5458
5478
  "query": "hours = minutes / 60"
@@ -5627,7 +5647,7 @@
5627
5647
  },
5628
5648
  "y": {
5629
5649
  "value": 60,
5630
- "instance": true,
5650
+ "isInstance": true,
5631
5651
  "text": "60",
5632
5652
  "marker": "integer",
5633
5653
  "word": "60",
@@ -5659,7 +5679,6 @@
5659
5679
  "level": 1,
5660
5680
  "context_index": 1,
5661
5681
  "topLevel": true,
5662
- "context_id": 2,
5663
5682
  "touchedBy": [
5664
5683
  "time#call2"
5665
5684
  ]
@@ -5900,6 +5919,9 @@
5900
5919
  }
5901
5920
  ],
5902
5921
  "learned_contextual_priorities": [],
5922
+ "explain_associations_details": [
5923
+ null
5924
+ ],
5903
5925
  "query": "minutes = hours * 60",
5904
5926
  "key": {
5905
5927
  "query": "minutes = hours * 60"
@@ -6074,7 +6096,7 @@
6074
6096
  },
6075
6097
  "y": {
6076
6098
  "value": 60,
6077
- "instance": true,
6099
+ "isInstance": true,
6078
6100
  "text": "60",
6079
6101
  "marker": "integer",
6080
6102
  "word": "60",
@@ -6106,7 +6128,6 @@
6106
6128
  "level": 1,
6107
6129
  "context_index": 1,
6108
6130
  "topLevel": true,
6109
- "context_id": 2,
6110
6131
  "touchedBy": [
6111
6132
  "time#call2"
6112
6133
  ]
@@ -6347,6 +6368,9 @@
6347
6368
  }
6348
6369
  ],
6349
6370
  "learned_contextual_priorities": [],
6371
+ "explain_associations_details": [
6372
+ null
6373
+ ],
6350
6374
  "query": "seconds = minutes * 60",
6351
6375
  "key": {
6352
6376
  "query": "seconds = minutes * 60"
@@ -6521,7 +6545,7 @@
6521
6545
  },
6522
6546
  "y": {
6523
6547
  "value": 3600,
6524
- "instance": true,
6548
+ "isInstance": true,
6525
6549
  "text": "3600",
6526
6550
  "marker": "integer",
6527
6551
  "word": "3600",
@@ -6553,7 +6577,6 @@
6553
6577
  "level": 1,
6554
6578
  "context_index": 1,
6555
6579
  "topLevel": true,
6556
- "context_id": 2,
6557
6580
  "touchedBy": [
6558
6581
  "time#call2"
6559
6582
  ]
@@ -6794,6 +6817,9 @@
6794
6817
  }
6795
6818
  ],
6796
6819
  "learned_contextual_priorities": [],
6820
+ "explain_associations_details": [
6821
+ null
6822
+ ],
6797
6823
  "query": "hours = seconds / 3600",
6798
6824
  "key": {
6799
6825
  "query": "hours = seconds / 3600"
@@ -6968,7 +6994,7 @@
6968
6994
  },
6969
6995
  "y": {
6970
6996
  "value": 3600,
6971
- "instance": true,
6997
+ "isInstance": true,
6972
6998
  "text": "3600",
6973
6999
  "marker": "integer",
6974
7000
  "word": "3600",
@@ -7000,7 +7026,6 @@
7000
7026
  "level": 1,
7001
7027
  "context_index": 1,
7002
7028
  "topLevel": true,
7003
- "context_id": 2,
7004
7029
  "touchedBy": [
7005
7030
  "time#call2"
7006
7031
  ]
@@ -7241,6 +7266,9 @@
7241
7266
  }
7242
7267
  ],
7243
7268
  "learned_contextual_priorities": [],
7269
+ "explain_associations_details": [
7270
+ null
7271
+ ],
7244
7272
  "query": "seconds = hours * 3600",
7245
7273
  "key": {
7246
7274
  "query": "seconds = hours * 3600"
@@ -7484,7 +7512,7 @@
7484
7512
  },
7485
7513
  "y": {
7486
7514
  "value": 60,
7487
- "instance": true,
7515
+ "isInstance": true,
7488
7516
  "text": "60",
7489
7517
  "marker": "integer",
7490
7518
  "word": "60",
@@ -7515,7 +7543,7 @@
7515
7543
  },
7516
7544
  "y": {
7517
7545
  "value": 1000,
7518
- "instance": true,
7546
+ "isInstance": true,
7519
7547
  "text": "1000",
7520
7548
  "marker": "integer",
7521
7549
  "word": "1000",
@@ -7547,7 +7575,6 @@
7547
7575
  "level": 1,
7548
7576
  "context_index": 1,
7549
7577
  "topLevel": true,
7550
- "context_id": 2,
7551
7578
  "touchedBy": [
7552
7579
  "time#call2"
7553
7580
  ]
@@ -7903,6 +7930,9 @@
7903
7930
  }
7904
7931
  ],
7905
7932
  "learned_contextual_priorities": [],
7933
+ "explain_associations_details": [
7934
+ null
7935
+ ],
7906
7936
  "query": "milliseconds = minutes * 60 * 1000",
7907
7937
  "key": {
7908
7938
  "query": "milliseconds = minutes * 60 * 1000"
@@ -8146,7 +8176,7 @@
8146
8176
  },
8147
8177
  "y": {
8148
8178
  "value": 1000,
8149
- "instance": true,
8179
+ "isInstance": true,
8150
8180
  "text": "1000",
8151
8181
  "marker": "integer",
8152
8182
  "word": "1000",
@@ -8177,7 +8207,7 @@
8177
8207
  },
8178
8208
  "y": {
8179
8209
  "value": 60,
8180
- "instance": true,
8210
+ "isInstance": true,
8181
8211
  "text": "60",
8182
8212
  "marker": "integer",
8183
8213
  "word": "60",
@@ -8209,7 +8239,6 @@
8209
8239
  "level": 1,
8210
8240
  "context_index": 1,
8211
8241
  "topLevel": true,
8212
- "context_id": 2,
8213
8242
  "touchedBy": [
8214
8243
  "time#call2"
8215
8244
  ]
@@ -8565,6 +8594,9 @@
8565
8594
  }
8566
8595
  ],
8567
8596
  "learned_contextual_priorities": [],
8597
+ "explain_associations_details": [
8598
+ null
8599
+ ],
8568
8600
  "query": "minutes = milliseconds / 1000 / 60",
8569
8601
  "key": {
8570
8602
  "query": "minutes = milliseconds / 1000 / 60"
@@ -8739,7 +8771,7 @@
8739
8771
  },
8740
8772
  "y": {
8741
8773
  "value": 1000,
8742
- "instance": true,
8774
+ "isInstance": true,
8743
8775
  "text": "1000",
8744
8776
  "marker": "integer",
8745
8777
  "word": "1000",
@@ -8771,7 +8803,6 @@
8771
8803
  "level": 1,
8772
8804
  "context_index": 1,
8773
8805
  "topLevel": true,
8774
- "context_id": 2,
8775
8806
  "touchedBy": [
8776
8807
  "time#call2"
8777
8808
  ]
@@ -9012,6 +9043,9 @@
9012
9043
  }
9013
9044
  ],
9014
9045
  "learned_contextual_priorities": [],
9046
+ "explain_associations_details": [
9047
+ null
9048
+ ],
9015
9049
  "query": "milliseconds = seconds * 1000",
9016
9050
  "key": {
9017
9051
  "query": "milliseconds = seconds * 1000"
@@ -9186,7 +9220,7 @@
9186
9220
  },
9187
9221
  "y": {
9188
9222
  "value": 1000,
9189
- "instance": true,
9223
+ "isInstance": true,
9190
9224
  "text": "1000",
9191
9225
  "marker": "integer",
9192
9226
  "word": "1000",
@@ -9218,7 +9252,6 @@
9218
9252
  "level": 1,
9219
9253
  "context_index": 1,
9220
9254
  "topLevel": true,
9221
- "context_id": 2,
9222
9255
  "touchedBy": [
9223
9256
  "time#call2"
9224
9257
  ]
@@ -9459,6 +9492,9 @@
9459
9492
  }
9460
9493
  ],
9461
9494
  "learned_contextual_priorities": [],
9495
+ "explain_associations_details": [
9496
+ null
9497
+ ],
9462
9498
  "query": "seconds = milliseconds / 1000",
9463
9499
  "key": {
9464
9500
  "query": "seconds = milliseconds / 1000"
@@ -9633,7 +9669,7 @@
9633
9669
  },
9634
9670
  "y": {
9635
9671
  "value": 60,
9636
- "instance": true,
9672
+ "isInstance": true,
9637
9673
  "text": "60",
9638
9674
  "marker": "integer",
9639
9675
  "word": "60",
@@ -9665,7 +9701,6 @@
9665
9701
  "level": 1,
9666
9702
  "context_index": 1,
9667
9703
  "topLevel": true,
9668
- "context_id": 2,
9669
9704
  "touchedBy": [
9670
9705
  "time#call2"
9671
9706
  ]
@@ -9906,6 +9941,9 @@
9906
9941
  }
9907
9942
  ],
9908
9943
  "learned_contextual_priorities": [],
9944
+ "explain_associations_details": [
9945
+ null
9946
+ ],
9909
9947
  "query": "minutes = seconds / 60",
9910
9948
  "key": {
9911
9949
  "query": "minutes = seconds / 60"
@@ -10080,7 +10118,7 @@
10080
10118
  },
10081
10119
  "y": {
10082
10120
  "value": 24,
10083
- "instance": true,
10121
+ "isInstance": true,
10084
10122
  "text": "24",
10085
10123
  "marker": "integer",
10086
10124
  "word": "24",
@@ -10112,7 +10150,6 @@
10112
10150
  "level": 1,
10113
10151
  "context_index": 1,
10114
10152
  "topLevel": true,
10115
- "context_id": 2,
10116
10153
  "touchedBy": [
10117
10154
  "time#call2"
10118
10155
  ]
@@ -10353,6 +10390,9 @@
10353
10390
  }
10354
10391
  ],
10355
10392
  "learned_contextual_priorities": [],
10393
+ "explain_associations_details": [
10394
+ null
10395
+ ],
10356
10396
  "query": "day = hours / 24",
10357
10397
  "key": {
10358
10398
  "query": "day = hours / 24"
@@ -10527,7 +10567,7 @@
10527
10567
  },
10528
10568
  "y": {
10529
10569
  "value": 24,
10530
- "instance": true,
10570
+ "isInstance": true,
10531
10571
  "text": "24",
10532
10572
  "marker": "integer",
10533
10573
  "word": "24",
@@ -10559,7 +10599,6 @@
10559
10599
  "level": 1,
10560
10600
  "context_index": 1,
10561
10601
  "topLevel": true,
10562
- "context_id": 2,
10563
10602
  "touchedBy": [
10564
10603
  "time#call2"
10565
10604
  ]
@@ -10800,6 +10839,9 @@
10800
10839
  }
10801
10840
  ],
10802
10841
  "learned_contextual_priorities": [],
10842
+ "explain_associations_details": [
10843
+ null
10844
+ ],
10803
10845
  "query": "hours = days * 24",
10804
10846
  "key": {
10805
10847
  "query": "hours = days * 24"
@@ -10928,7 +10970,22 @@
10928
10970
  "isA": [
10929
10971
  "preposition"
10930
10972
  ],
10931
- "bridge": "{ ...next(operator), time: after[0], operator: operator, interpolate: '${operator} ${time}' }"
10973
+ "bridge": "{ ...next(operator), time: after[0], operator: operator, interpolate: '${operator} ${time}' }",
10974
+ "check": [
10975
+ "marker",
10976
+ "text",
10977
+ "verbatim",
10978
+ "value",
10979
+ "evalue",
10980
+ "isResponse",
10981
+ {
10982
+ "properties": "modifiers"
10983
+ },
10984
+ {
10985
+ "properties": "postModifiers"
10986
+ },
10987
+ "time"
10988
+ ]
10932
10989
  },
10933
10990
  {
10934
10991
  "id": "ampm",
@@ -10970,31 +11027,31 @@
10970
11027
  },
10971
11028
  "generators": [
10972
11029
  {
10973
- "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:172"
11030
+ "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:173"
10974
11031
  },
10975
11032
  {
10976
- "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:187"
11033
+ "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:188"
10977
11034
  },
10978
11035
  {
10979
- "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:200"
11036
+ "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:201"
10980
11037
  }
10981
11038
  ],
10982
11039
  "semantics": [
10983
11040
  {
10984
- "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:208",
11041
+ "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:209",
10985
11042
  "priority": -1
10986
11043
  },
10987
11044
  {
10988
11045
  "notes": "evaluate time",
10989
- "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:227"
11046
+ "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:228"
10990
11047
  },
10991
11048
  {
10992
11049
  "notes": "use time format working case",
10993
- "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:236"
11050
+ "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:237"
10994
11051
  },
10995
11052
  {
10996
11053
  "notes": "use time format error case",
10997
- "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:244"
11054
+ "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:245"
10998
11055
  }
10999
11056
  ]
11000
11057
  }
package/common/time.js CHANGED
@@ -140,7 +140,8 @@ const template = {
140
140
  id: "atTime",
141
141
  words: ['@'],
142
142
  isA: ['preposition'],
143
- bridge: "{ ...next(operator), time: after[0], operator: operator, interpolate: '${operator} ${time}' }"
143
+ bridge: "{ ...next(operator), time: after[0], operator: operator, interpolate: '${operator} ${time}' }",
144
+ check: defaultContextCheckProperties(['time']),
144
145
  },
145
146
  {
146
147
  id: "ampm",
@@ -170,7 +171,7 @@ const template = {
170
171
  generators: [
171
172
  {
172
173
  where: where(),
173
- match: ({context}) => context.marker == 'timePoint' && context.evalue && context.format == 12,
174
+ match: ({context}) => context.marker == 'timePoint' && context.evalue && context.format == 12 && !context.paraphrase,
174
175
  apply: ({context}) => {
175
176
  let hh = context.evalue.getHours();
176
177
  let ampm = 'am'
@@ -207,16 +208,16 @@ const template = {
207
208
  {
208
209
  where: where(),
209
210
  priority: -1,
210
- match: (args) => args.callOnce(args, ({context}) => context.repeats) && args.context.repeats?.repeats,
211
- apply: async ({context, e, s, handlerStack}) => {
212
- const v = (await e(context.repeats.repeats)).evalue
211
+ match: async (args) => await args.callOnce(args, 'time.1', ({context}) => context.repeats) && args.context.repeats?.repeats,
212
+ apply: async ({context, e, handlerStack, toFinalValue}) => {
213
+ const v = toFinalValue((await e(context.repeats.repeats, where())))
213
214
  for (let i = 0; i < v; ++i) {
214
215
  if (context.action) {
215
- await s(context.action)
216
+ await e(context.action, where())
216
217
  } else {
217
218
  const repeats = context.repeats
218
219
  context.repeats = undefined
219
- await s(context)
220
+ await e(context, where())
220
221
  context.repeats = repeats
221
222
  }
222
223
  }
@@ -225,7 +226,7 @@ const template = {
225
226
  {
226
227
  notes: 'evaluate time',
227
228
  where: where(),
228
- match: ({objects, context, api}) => context.marker == 'timePoint' && context.evaluate,
229
+ match: ({objects, context, api}) => context.marker == 'timePoint' && !context.isInstance,
229
230
  apply: ({objects, context, api}) => {
230
231
  context.evalue = api.newDate()
231
232
  context.format = objects.format
@@ -79,8 +79,7 @@
79
79
  ],
80
80
  "level": 1,
81
81
  "context_index": 1,
82
- "topLevel": true,
83
- "context_id": 2
82
+ "topLevel": true
84
83
  }
85
84
  ],
86
85
  "generated": [
@@ -143,6 +142,9 @@
143
142
  }
144
143
  ],
145
144
  "learned_contextual_priorities": [],
145
+ "explain_associations_details": [
146
+ null
147
+ ],
146
148
  "query": "move direction",
147
149
  "skipSemantics": true,
148
150
  "key": {
package/common/ui.js CHANGED
@@ -62,9 +62,9 @@ const config = {
62
62
  {
63
63
  where: where(),
64
64
  match: ({context, isA}) => isA(context, 'direction'),
65
- apply: async ({context, insert, s, fragments}) => {
65
+ apply: async ({context, insert, e, fragments}) => {
66
66
  const instantiation = await fragments("move direction", { direction: context })
67
- await s(instantiation)
67
+ await e(instantiation, where())
68
68
  }
69
69
  },
70
70
  ],
@@ -124,12 +124,12 @@ const config = {
124
124
  1: "{ marker: 'moveable', pullFromContext: true, default: true, skipDefault: true }"
125
125
  },
126
126
  bridge: "{ ...next(operator), operator: operator, moveable: after[0], direction: after[1], generate: ['operator', 'moveable', 'direction' ] }",
127
- semantic: async ({api, context, e}) => {
127
+ semantic: async ({api, context, toFinalValue, e}) => {
128
128
  if (context.direction?.steps?.quantity) {
129
129
  api.move(context.direction.value, context.direction.steps.quantity.value, context.direction.steps.marker)
130
130
  } else {
131
- const steps = await e(context.direction.steps)
132
- api.move(context.direction.value, steps?.evalue || 1)
131
+ const steps = toFinalValue(await e(context.direction.steps, where()))
132
+ api.move(context.direction.value, steps || 1)
133
133
  // api.move(context.direction.value, context.direction.steps ? context.direction.steps.value : 1)
134
134
  }
135
135
  }