ekms 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.
Files changed (99) hide show
  1. package/common/actions.instance.json +12 -10
  2. package/common/actions.js +14 -12
  3. package/common/angle.instance.json +37 -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/compass.js +1 -1
  16. package/common/concept.instance.json +14 -6
  17. package/common/concept.js +2 -0
  18. package/common/conjunction.js +20 -12
  19. package/common/control.js +10 -18
  20. package/common/countable.js +4 -3
  21. package/common/crew.instance.json +95 -27
  22. package/common/dateTimeSelectors.instance.json +4 -4
  23. package/common/dateTimeSelectors.js +4 -7
  24. package/common/dates.instance.json +52 -28
  25. package/common/dates.js +16 -11
  26. package/common/debug.instance.json +52 -0
  27. package/common/debug.js +52 -0
  28. package/common/debug.test.json +1 -0
  29. package/common/dialogues.js +126 -70
  30. package/common/dimension.instance.json +259 -492
  31. package/common/dimension.js +72 -12
  32. package/common/drone.instance.json +441 -84
  33. package/common/drone.js +57 -56
  34. package/common/drone_v1.instance.json +36 -12
  35. package/common/drone_v1.js +20 -15
  36. package/common/edible.instance.json +96 -32
  37. package/common/emotions.instance.json +15 -1
  38. package/common/evaluate.js +10 -13
  39. package/common/fastfood.instance.json +282 -100
  40. package/common/fastfood.js +30 -15
  41. package/common/formulas.instance.json +162 -24
  42. package/common/formulas.js +18 -9
  43. package/common/gdefaults.js +20 -96
  44. package/common/helpers/concept.js +2 -9
  45. package/common/helpers/conjunction.js +11 -1
  46. package/common/helpers/dialogues.js +48 -24
  47. package/common/helpers/gdefaults.js +15 -5
  48. package/common/helpers/properties.js +132 -326
  49. package/common/helpers.js +28 -58
  50. package/common/hierarchy.js +71 -41
  51. package/common/kirk.instance.json +3 -1
  52. package/common/latin.instance.json +14 -14
  53. package/common/latin.js +7 -7
  54. package/common/length.instance.json +331 -61
  55. package/common/linear_orderings.instance.json +1 -0
  56. package/common/linear_orderings.js +90 -0
  57. package/common/linear_orderings.test.json +1 -0
  58. package/common/math.instance.json +144 -5
  59. package/common/math.js +18 -7
  60. package/common/menus.instance.json +29 -11
  61. package/common/menus.js +8 -5
  62. package/common/meta.js +14 -13
  63. package/common/nameable.js +9 -5
  64. package/common/numbers.instance.json +8 -3
  65. package/common/numbers.js +59 -35
  66. package/common/ordering.instance.json +53 -4
  67. package/common/ordinals.js +25 -25
  68. package/common/people.instance.json +66 -12
  69. package/common/percentages.js +4 -2
  70. package/common/pipboy.instance.json +89 -44
  71. package/common/pipboy.js +21 -14
  72. package/common/pokemon.instance.json +39 -13
  73. package/common/pressure.instance.json +20 -6
  74. package/common/properties.instance.json +2648 -501
  75. package/common/properties.js +561 -82
  76. package/common/punctuation.js +1 -0
  77. package/common/rates.instance.json +2 -2
  78. package/common/rates.js +3 -3
  79. package/common/reminders.instance.json +16 -0
  80. package/common/reminders.js +24 -20
  81. package/common/reports.instance.json +11 -12
  82. package/common/reports.js +12 -12
  83. package/common/scorekeeper.js +20 -10
  84. package/common/sdefaults.js +30 -9
  85. package/common/spock.instance.json +3 -1
  86. package/common/stm.js +16 -21
  87. package/common/temperature.instance.json +40 -11
  88. package/common/testing.js +2 -2
  89. package/common/time.instance.json +149 -47
  90. package/common/time.js +9 -8
  91. package/common/ui.instance.json +4 -2
  92. package/common/ui.js +5 -5
  93. package/common/weight.instance.json +113 -21
  94. package/common/weight.js +5 -1
  95. package/common/words.js +113 -2
  96. package/common/wp.instance.json +125 -18
  97. package/common/wp.js +6 -2
  98. package/main.js +2 -0
  99. package/package.json +10 -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,10 @@
4733
4749
  },
4734
4750
  "y": {
4735
4751
  "value": 12,
4736
- "instance": true,
4752
+ "isInstance": true,
4753
+ "rangeableWith": [
4754
+ "number"
4755
+ ],
4737
4756
  "text": "12",
4738
4757
  "marker": "integer",
4739
4758
  "word": "12",
@@ -4765,7 +4784,6 @@
4765
4784
  "level": 1,
4766
4785
  "context_index": 1,
4767
4786
  "topLevel": true,
4768
- "context_id": 2,
4769
4787
  "touchedBy": [
4770
4788
  "time#call2"
4771
4789
  ]
@@ -5006,6 +5024,9 @@
5006
5024
  }
5007
5025
  ],
5008
5026
  "learned_contextual_priorities": [],
5027
+ "explain_associations_details": [
5028
+ null
5029
+ ],
5009
5030
  "query": "years = months / 12",
5010
5031
  "key": {
5011
5032
  "query": "years = months / 12"
@@ -5180,7 +5201,10 @@
5180
5201
  },
5181
5202
  "y": {
5182
5203
  "value": 60,
5183
- "instance": true,
5204
+ "isInstance": true,
5205
+ "rangeableWith": [
5206
+ "number"
5207
+ ],
5184
5208
  "text": "60",
5185
5209
  "marker": "integer",
5186
5210
  "word": "60",
@@ -5212,7 +5236,6 @@
5212
5236
  "level": 1,
5213
5237
  "context_index": 1,
5214
5238
  "topLevel": true,
5215
- "context_id": 2,
5216
5239
  "touchedBy": [
5217
5240
  "time#call2"
5218
5241
  ]
@@ -5453,6 +5476,9 @@
5453
5476
  }
5454
5477
  ],
5455
5478
  "learned_contextual_priorities": [],
5479
+ "explain_associations_details": [
5480
+ null
5481
+ ],
5456
5482
  "query": "hours = minutes / 60",
5457
5483
  "key": {
5458
5484
  "query": "hours = minutes / 60"
@@ -5627,7 +5653,10 @@
5627
5653
  },
5628
5654
  "y": {
5629
5655
  "value": 60,
5630
- "instance": true,
5656
+ "isInstance": true,
5657
+ "rangeableWith": [
5658
+ "number"
5659
+ ],
5631
5660
  "text": "60",
5632
5661
  "marker": "integer",
5633
5662
  "word": "60",
@@ -5659,7 +5688,6 @@
5659
5688
  "level": 1,
5660
5689
  "context_index": 1,
5661
5690
  "topLevel": true,
5662
- "context_id": 2,
5663
5691
  "touchedBy": [
5664
5692
  "time#call2"
5665
5693
  ]
@@ -5900,6 +5928,9 @@
5900
5928
  }
5901
5929
  ],
5902
5930
  "learned_contextual_priorities": [],
5931
+ "explain_associations_details": [
5932
+ null
5933
+ ],
5903
5934
  "query": "minutes = hours * 60",
5904
5935
  "key": {
5905
5936
  "query": "minutes = hours * 60"
@@ -6074,7 +6105,10 @@
6074
6105
  },
6075
6106
  "y": {
6076
6107
  "value": 60,
6077
- "instance": true,
6108
+ "isInstance": true,
6109
+ "rangeableWith": [
6110
+ "number"
6111
+ ],
6078
6112
  "text": "60",
6079
6113
  "marker": "integer",
6080
6114
  "word": "60",
@@ -6106,7 +6140,6 @@
6106
6140
  "level": 1,
6107
6141
  "context_index": 1,
6108
6142
  "topLevel": true,
6109
- "context_id": 2,
6110
6143
  "touchedBy": [
6111
6144
  "time#call2"
6112
6145
  ]
@@ -6347,6 +6380,9 @@
6347
6380
  }
6348
6381
  ],
6349
6382
  "learned_contextual_priorities": [],
6383
+ "explain_associations_details": [
6384
+ null
6385
+ ],
6350
6386
  "query": "seconds = minutes * 60",
6351
6387
  "key": {
6352
6388
  "query": "seconds = minutes * 60"
@@ -6521,7 +6557,10 @@
6521
6557
  },
6522
6558
  "y": {
6523
6559
  "value": 3600,
6524
- "instance": true,
6560
+ "isInstance": true,
6561
+ "rangeableWith": [
6562
+ "number"
6563
+ ],
6525
6564
  "text": "3600",
6526
6565
  "marker": "integer",
6527
6566
  "word": "3600",
@@ -6553,7 +6592,6 @@
6553
6592
  "level": 1,
6554
6593
  "context_index": 1,
6555
6594
  "topLevel": true,
6556
- "context_id": 2,
6557
6595
  "touchedBy": [
6558
6596
  "time#call2"
6559
6597
  ]
@@ -6794,6 +6832,9 @@
6794
6832
  }
6795
6833
  ],
6796
6834
  "learned_contextual_priorities": [],
6835
+ "explain_associations_details": [
6836
+ null
6837
+ ],
6797
6838
  "query": "hours = seconds / 3600",
6798
6839
  "key": {
6799
6840
  "query": "hours = seconds / 3600"
@@ -6968,7 +7009,10 @@
6968
7009
  },
6969
7010
  "y": {
6970
7011
  "value": 3600,
6971
- "instance": true,
7012
+ "isInstance": true,
7013
+ "rangeableWith": [
7014
+ "number"
7015
+ ],
6972
7016
  "text": "3600",
6973
7017
  "marker": "integer",
6974
7018
  "word": "3600",
@@ -7000,7 +7044,6 @@
7000
7044
  "level": 1,
7001
7045
  "context_index": 1,
7002
7046
  "topLevel": true,
7003
- "context_id": 2,
7004
7047
  "touchedBy": [
7005
7048
  "time#call2"
7006
7049
  ]
@@ -7241,6 +7284,9 @@
7241
7284
  }
7242
7285
  ],
7243
7286
  "learned_contextual_priorities": [],
7287
+ "explain_associations_details": [
7288
+ null
7289
+ ],
7244
7290
  "query": "seconds = hours * 3600",
7245
7291
  "key": {
7246
7292
  "query": "seconds = hours * 3600"
@@ -7484,7 +7530,10 @@
7484
7530
  },
7485
7531
  "y": {
7486
7532
  "value": 60,
7487
- "instance": true,
7533
+ "isInstance": true,
7534
+ "rangeableWith": [
7535
+ "number"
7536
+ ],
7488
7537
  "text": "60",
7489
7538
  "marker": "integer",
7490
7539
  "word": "60",
@@ -7515,7 +7564,10 @@
7515
7564
  },
7516
7565
  "y": {
7517
7566
  "value": 1000,
7518
- "instance": true,
7567
+ "isInstance": true,
7568
+ "rangeableWith": [
7569
+ "number"
7570
+ ],
7519
7571
  "text": "1000",
7520
7572
  "marker": "integer",
7521
7573
  "word": "1000",
@@ -7547,7 +7599,6 @@
7547
7599
  "level": 1,
7548
7600
  "context_index": 1,
7549
7601
  "topLevel": true,
7550
- "context_id": 2,
7551
7602
  "touchedBy": [
7552
7603
  "time#call2"
7553
7604
  ]
@@ -7903,6 +7954,9 @@
7903
7954
  }
7904
7955
  ],
7905
7956
  "learned_contextual_priorities": [],
7957
+ "explain_associations_details": [
7958
+ null
7959
+ ],
7906
7960
  "query": "milliseconds = minutes * 60 * 1000",
7907
7961
  "key": {
7908
7962
  "query": "milliseconds = minutes * 60 * 1000"
@@ -8146,7 +8200,10 @@
8146
8200
  },
8147
8201
  "y": {
8148
8202
  "value": 1000,
8149
- "instance": true,
8203
+ "isInstance": true,
8204
+ "rangeableWith": [
8205
+ "number"
8206
+ ],
8150
8207
  "text": "1000",
8151
8208
  "marker": "integer",
8152
8209
  "word": "1000",
@@ -8177,7 +8234,10 @@
8177
8234
  },
8178
8235
  "y": {
8179
8236
  "value": 60,
8180
- "instance": true,
8237
+ "isInstance": true,
8238
+ "rangeableWith": [
8239
+ "number"
8240
+ ],
8181
8241
  "text": "60",
8182
8242
  "marker": "integer",
8183
8243
  "word": "60",
@@ -8209,7 +8269,6 @@
8209
8269
  "level": 1,
8210
8270
  "context_index": 1,
8211
8271
  "topLevel": true,
8212
- "context_id": 2,
8213
8272
  "touchedBy": [
8214
8273
  "time#call2"
8215
8274
  ]
@@ -8565,6 +8624,9 @@
8565
8624
  }
8566
8625
  ],
8567
8626
  "learned_contextual_priorities": [],
8627
+ "explain_associations_details": [
8628
+ null
8629
+ ],
8568
8630
  "query": "minutes = milliseconds / 1000 / 60",
8569
8631
  "key": {
8570
8632
  "query": "minutes = milliseconds / 1000 / 60"
@@ -8739,7 +8801,10 @@
8739
8801
  },
8740
8802
  "y": {
8741
8803
  "value": 1000,
8742
- "instance": true,
8804
+ "isInstance": true,
8805
+ "rangeableWith": [
8806
+ "number"
8807
+ ],
8743
8808
  "text": "1000",
8744
8809
  "marker": "integer",
8745
8810
  "word": "1000",
@@ -8771,7 +8836,6 @@
8771
8836
  "level": 1,
8772
8837
  "context_index": 1,
8773
8838
  "topLevel": true,
8774
- "context_id": 2,
8775
8839
  "touchedBy": [
8776
8840
  "time#call2"
8777
8841
  ]
@@ -9012,6 +9076,9 @@
9012
9076
  }
9013
9077
  ],
9014
9078
  "learned_contextual_priorities": [],
9079
+ "explain_associations_details": [
9080
+ null
9081
+ ],
9015
9082
  "query": "milliseconds = seconds * 1000",
9016
9083
  "key": {
9017
9084
  "query": "milliseconds = seconds * 1000"
@@ -9186,7 +9253,10 @@
9186
9253
  },
9187
9254
  "y": {
9188
9255
  "value": 1000,
9189
- "instance": true,
9256
+ "isInstance": true,
9257
+ "rangeableWith": [
9258
+ "number"
9259
+ ],
9190
9260
  "text": "1000",
9191
9261
  "marker": "integer",
9192
9262
  "word": "1000",
@@ -9218,7 +9288,6 @@
9218
9288
  "level": 1,
9219
9289
  "context_index": 1,
9220
9290
  "topLevel": true,
9221
- "context_id": 2,
9222
9291
  "touchedBy": [
9223
9292
  "time#call2"
9224
9293
  ]
@@ -9459,6 +9528,9 @@
9459
9528
  }
9460
9529
  ],
9461
9530
  "learned_contextual_priorities": [],
9531
+ "explain_associations_details": [
9532
+ null
9533
+ ],
9462
9534
  "query": "seconds = milliseconds / 1000",
9463
9535
  "key": {
9464
9536
  "query": "seconds = milliseconds / 1000"
@@ -9633,7 +9705,10 @@
9633
9705
  },
9634
9706
  "y": {
9635
9707
  "value": 60,
9636
- "instance": true,
9708
+ "isInstance": true,
9709
+ "rangeableWith": [
9710
+ "number"
9711
+ ],
9637
9712
  "text": "60",
9638
9713
  "marker": "integer",
9639
9714
  "word": "60",
@@ -9665,7 +9740,6 @@
9665
9740
  "level": 1,
9666
9741
  "context_index": 1,
9667
9742
  "topLevel": true,
9668
- "context_id": 2,
9669
9743
  "touchedBy": [
9670
9744
  "time#call2"
9671
9745
  ]
@@ -9906,6 +9980,9 @@
9906
9980
  }
9907
9981
  ],
9908
9982
  "learned_contextual_priorities": [],
9983
+ "explain_associations_details": [
9984
+ null
9985
+ ],
9909
9986
  "query": "minutes = seconds / 60",
9910
9987
  "key": {
9911
9988
  "query": "minutes = seconds / 60"
@@ -10080,7 +10157,10 @@
10080
10157
  },
10081
10158
  "y": {
10082
10159
  "value": 24,
10083
- "instance": true,
10160
+ "isInstance": true,
10161
+ "rangeableWith": [
10162
+ "number"
10163
+ ],
10084
10164
  "text": "24",
10085
10165
  "marker": "integer",
10086
10166
  "word": "24",
@@ -10112,7 +10192,6 @@
10112
10192
  "level": 1,
10113
10193
  "context_index": 1,
10114
10194
  "topLevel": true,
10115
- "context_id": 2,
10116
10195
  "touchedBy": [
10117
10196
  "time#call2"
10118
10197
  ]
@@ -10353,6 +10432,9 @@
10353
10432
  }
10354
10433
  ],
10355
10434
  "learned_contextual_priorities": [],
10435
+ "explain_associations_details": [
10436
+ null
10437
+ ],
10356
10438
  "query": "day = hours / 24",
10357
10439
  "key": {
10358
10440
  "query": "day = hours / 24"
@@ -10527,7 +10609,10 @@
10527
10609
  },
10528
10610
  "y": {
10529
10611
  "value": 24,
10530
- "instance": true,
10612
+ "isInstance": true,
10613
+ "rangeableWith": [
10614
+ "number"
10615
+ ],
10531
10616
  "text": "24",
10532
10617
  "marker": "integer",
10533
10618
  "word": "24",
@@ -10559,7 +10644,6 @@
10559
10644
  "level": 1,
10560
10645
  "context_index": 1,
10561
10646
  "topLevel": true,
10562
- "context_id": 2,
10563
10647
  "touchedBy": [
10564
10648
  "time#call2"
10565
10649
  ]
@@ -10800,6 +10884,9 @@
10800
10884
  }
10801
10885
  ],
10802
10886
  "learned_contextual_priorities": [],
10887
+ "explain_associations_details": [
10888
+ null
10889
+ ],
10803
10890
  "query": "hours = days * 24",
10804
10891
  "key": {
10805
10892
  "query": "hours = days * 24"
@@ -10928,7 +11015,22 @@
10928
11015
  "isA": [
10929
11016
  "preposition"
10930
11017
  ],
10931
- "bridge": "{ ...next(operator), time: after[0], operator: operator, interpolate: '${operator} ${time}' }"
11018
+ "bridge": "{ ...next(operator), time: after[0], operator: operator, interpolate: '${operator} ${time}' }",
11019
+ "check": [
11020
+ "marker",
11021
+ "text",
11022
+ "verbatim",
11023
+ "value",
11024
+ "evalue",
11025
+ "isResponse",
11026
+ {
11027
+ "properties": "modifiers"
11028
+ },
11029
+ {
11030
+ "properties": "postModifiers"
11031
+ },
11032
+ "time"
11033
+ ]
10932
11034
  },
10933
11035
  {
10934
11036
  "id": "ampm",
@@ -10970,31 +11072,31 @@
10970
11072
  },
10971
11073
  "generators": [
10972
11074
  {
10973
- "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:172"
11075
+ "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:173"
10974
11076
  },
10975
11077
  {
10976
- "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:187"
11078
+ "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:188"
10977
11079
  },
10978
11080
  {
10979
- "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:200"
11081
+ "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:201"
10980
11082
  }
10981
11083
  ],
10982
11084
  "semantics": [
10983
11085
  {
10984
- "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:208",
11086
+ "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:209",
10985
11087
  "priority": -1
10986
11088
  },
10987
11089
  {
10988
11090
  "notes": "evaluate time",
10989
- "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:227"
11091
+ "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:228"
10990
11092
  },
10991
11093
  {
10992
11094
  "notes": "use time format working case",
10993
- "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:236"
11095
+ "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:237"
10994
11096
  },
10995
11097
  {
10996
11098
  "notes": "use time format error case",
10997
- "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:244"
11099
+ "where": "/home/dev/code/theprogrammablemind/kms/common/time.js:245"
10998
11100
  }
10999
11101
  ]
11000
11102
  }
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
  }