ekms 9.6.3-beta.0 → 9.6.3-beta.10

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.
@@ -17,7 +17,8 @@
17
17
  {
18
18
  "id": "doAction",
19
19
  "isA": [
20
- "verb"
20
+ "verb",
21
+ "repeatable"
21
22
  ],
22
23
  "check": [
23
24
  "marker",
@@ -40,7 +41,7 @@
40
41
  "semantics": [
41
42
  {
42
43
  "match": "({context, isA}) => isA(context.marker, 'action')",
43
- "apply": "({context, _continue, mentioned}) => {\n mentioned(context)\n _continue()\n }"
44
+ "apply": "({context, _continue, remember}) => {\n debugger\n remember(context)\n _continue()\n }"
44
45
  }
45
46
  ]
46
47
  }
@@ -64,7 +65,8 @@
64
65
  {
65
66
  "id": "doAction",
66
67
  "isA": [
67
- "verb"
68
+ "verb",
69
+ "repeatable"
68
70
  ],
69
71
  "check": [
70
72
  "marker",
package/common/actions.js CHANGED
@@ -1,6 +1,7 @@
1
1
  const { knowledgeModule, where, Digraph } = require('./runtime').theprogrammablemind
2
2
  const { defaultContextCheckProperties, defaultContextCheck } = require('./helpers')
3
3
  const dialogues = require("./dialogues")
4
+ const time = require("./time")
4
5
  const tests = require('./actions.test.json')
5
6
  const instance = require('./actions.instance.json')
6
7
 
@@ -25,7 +26,7 @@ const config = {
25
26
  },
26
27
  {
27
28
  id: 'doAction',
28
- isA: ['verb'],
29
+ isA: ['verb', 'repeatable'],
29
30
  check: defaultContextCheckProperties(['action']),
30
31
  bridge: `{
31
32
  ...next(operator),
@@ -39,8 +40,8 @@ const config = {
39
40
  {
40
41
  priority: -1,
41
42
  match: ({context, isA}) => isA(context.marker, 'action'),
42
- apply: ({context, _continue, mentioned}) => {
43
- mentioned(context)
43
+ apply: ({context, _continue, remember}) => {
44
+ remember(context)
44
45
  _continue()
45
46
  }
46
47
  },
@@ -55,7 +56,7 @@ const template = {
55
56
 
56
57
  knowledgeModule({
57
58
  config: { name: 'actions' },
58
- includes: [dialogues],
59
+ includes: [dialogues, time],
59
60
  instance,
60
61
  template,
61
62
  module,
@@ -3661,6 +3661,20 @@
3661
3661
  0
3662
3662
  ]
3663
3663
  ],
3664
+ [
3665
+ [
3666
+ "is",
3667
+ 0
3668
+ ],
3669
+ [
3670
+ "list",
3671
+ 1
3672
+ ],
3673
+ [
3674
+ "unknown",
3675
+ 0
3676
+ ]
3677
+ ],
3664
3678
  [
3665
3679
  [
3666
3680
  "is",
@@ -37653,6 +37667,20 @@
37653
37667
  0
37654
37668
  ]
37655
37669
  ],
37670
+ [
37671
+ [
37672
+ "is",
37673
+ 0
37674
+ ],
37675
+ [
37676
+ "list",
37677
+ 1
37678
+ ],
37679
+ [
37680
+ "unknown",
37681
+ 0
37682
+ ]
37683
+ ],
37656
37684
  [
37657
37685
  [
37658
37686
  "is",
@@ -3441,6 +3441,20 @@
3441
3441
  0
3442
3442
  ]
3443
3443
  ],
3444
+ [
3445
+ [
3446
+ "is",
3447
+ 0
3448
+ ],
3449
+ [
3450
+ "list",
3451
+ 1
3452
+ ],
3453
+ [
3454
+ "unknown",
3455
+ 0
3456
+ ]
3457
+ ],
3444
3458
  [
3445
3459
  [
3446
3460
  "is",
@@ -11876,6 +11890,20 @@
11876
11890
  0
11877
11891
  ]
11878
11892
  ],
11893
+ [
11894
+ [
11895
+ "is",
11896
+ 0
11897
+ ],
11898
+ [
11899
+ "list",
11900
+ 1
11901
+ ],
11902
+ [
11903
+ "unknown",
11904
+ 0
11905
+ ]
11906
+ ],
11879
11907
  [
11880
11908
  [
11881
11909
  "is",
@@ -16090,6 +16118,20 @@
16090
16118
  0
16091
16119
  ]
16092
16120
  ],
16121
+ [
16122
+ [
16123
+ "is",
16124
+ 0
16125
+ ],
16126
+ [
16127
+ "list",
16128
+ 1
16129
+ ],
16130
+ [
16131
+ "unknown",
16132
+ 0
16133
+ ]
16134
+ ],
16093
16135
  [
16094
16136
  [
16095
16137
  "is",
@@ -19201,6 +19243,48 @@
19201
19243
  0
19202
19244
  ]
19203
19245
  ],
19246
+ [
19247
+ [
19248
+ "is",
19249
+ 0
19250
+ ],
19251
+ [
19252
+ "list",
19253
+ 1
19254
+ ],
19255
+ [
19256
+ "unknown",
19257
+ 0
19258
+ ]
19259
+ ],
19260
+ [
19261
+ [
19262
+ "is",
19263
+ 0
19264
+ ],
19265
+ [
19266
+ "list",
19267
+ 1
19268
+ ],
19269
+ [
19270
+ "unknown",
19271
+ 0
19272
+ ]
19273
+ ],
19274
+ [
19275
+ [
19276
+ "is",
19277
+ 0
19278
+ ],
19279
+ [
19280
+ "list",
19281
+ 1
19282
+ ],
19283
+ [
19284
+ "unknown",
19285
+ 0
19286
+ ]
19287
+ ],
19204
19288
  [
19205
19289
  [
19206
19290
  "setIdSuffix",
@@ -544,12 +544,12 @@ const config = {
544
544
  concept = two;
545
545
  value = one;
546
546
  }
547
- // km('dialogues').api.mentioned(concept)
547
+ // km('dialogues').api.remember(concept)
548
548
  // TODO wtf is the next line?
549
549
  value = JSON.parse(JSON.stringify(value))
550
550
  const instance = await e(value)
551
551
  if (false && instance.evalue) {
552
- km('stm').api.mentioned({ context: value })
552
+ km('stm').api.remember({ context: value })
553
553
  }
554
554
  if (instance.verbatim) {
555
555
  context.evalue = { verbatim: instance.verbatim }
@@ -647,7 +647,7 @@ const config = {
647
647
  for (const child of propertyToArray(one)) {
648
648
  await api.makeObject({ context: child, config, types: context.two.types || [] })
649
649
  kms.stm.api.setVariable(child.value, two)
650
- kms.stm.api.mentioned({ context: child, value: two })
650
+ kms.stm.api.remember({ context: child, value: two })
651
651
  }
652
652
  }
653
653
  }
@@ -38,7 +38,7 @@ class API {
38
38
  }
39
39
 
40
40
  async getPreferredUnits(quantity) {
41
- const preferredUnits = await this.args.mentions({
41
+ const preferredUnits = await this.args.recall({
42
42
  context: { marker: 'unit' },
43
43
  condition: (unit) => {
44
44
  if (quantity.unit.marker == 'unitPerUnit') {
@@ -57,7 +57,7 @@ class API {
57
57
  }
58
58
 
59
59
  setPreferredUnits(units) {
60
- this.args.mentioned(units)
60
+ this.args.remember(units)
61
61
  }
62
62
 
63
63
  setMeasurementSystem(measurementSystem) {
@@ -108,7 +108,7 @@ class API {
108
108
  const formula = kms.formulas.api.get(to, [efrom.unit])
109
109
  if (!formula) {
110
110
  const reason = { marker: 'reason', focusableForPhrase: true, evalue: { marker: 'noconversion', from: efrom.unit, to } }
111
- kms.stm.api.mentioned({ context: reason })
111
+ kms.stm.api.remember({ context: reason })
112
112
  error(reason)
113
113
  }
114
114
  kms.stm.api.setVariable(efrom.unit.value, efrom.amount)