ekms 9.8.0-beta.2 → 9.8.0-beta.4
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 +1 -1
- package/common/actions.js +3 -1
- package/common/askfor.instance.json +1 -1
- package/common/askfor.js +2 -2
- package/common/avatar.js +1 -1
- package/common/dateTimeSelectors.instance.json +3 -3
- package/common/dateTimeSelectors.js +3 -6
- package/common/dialogues.js +7 -6
- package/common/dimension.instance.json +3 -3
- package/common/dimension.js +4 -5
- package/common/drone.instance.json +13 -13
- package/common/drone.js +11 -12
- package/common/evaluate.js +6 -12
- package/common/formulas.instance.json +2 -2
- package/common/formulas.js +3 -3
- package/common/gdefaults.js +3 -3
- package/common/hierarchy.js +2 -2
- package/common/meta.js +2 -1
- package/common/nameable.js +2 -2
- package/common/ordinals.js +1 -1
- package/common/properties.instance.json +25 -25
- package/common/properties.js +16 -21
- package/common/rates.instance.json +1 -1
- package/common/rates.js +1 -1
- package/common/reminders.js +1 -1
- package/common/reports.instance.json +2 -2
- package/common/scorekeeper.js +6 -6
- package/common/stm.js +6 -8
- package/common/time.instance.json +2 -2
- package/common/time.js +2 -2
- package/common/wp.instance.json +2 -2
- package/common/wp.js +2 -2
- package/package.json +2 -2
package/common/scorekeeper.js
CHANGED
|
@@ -204,7 +204,7 @@ const config = {
|
|
|
204
204
|
},
|
|
205
205
|
{
|
|
206
206
|
where: where(),
|
|
207
|
-
match: ({context}) => context.marker == 'turn' && context.
|
|
207
|
+
match: ({context}) => context.marker == 'turn' && context.whose,
|
|
208
208
|
apply: ({context, objects}) => {
|
|
209
209
|
if (Number.isInteger(objects.nextPlayer)) {
|
|
210
210
|
context.evalue = `${objects.players[objects.nextPlayer]}'s turn`
|
|
@@ -215,7 +215,7 @@ const config = {
|
|
|
215
215
|
},
|
|
216
216
|
{
|
|
217
217
|
where: where(),
|
|
218
|
-
match: ({context}) => context.marker == 'unify' && context.
|
|
218
|
+
match: ({context}) => context.marker == 'unify' && context.terms[0].whose,
|
|
219
219
|
apply: ({context, objects}) => {
|
|
220
220
|
if (Number.isInteger(objects.nextPlayer)) {
|
|
221
221
|
context.evalue = `${objects.players[objects.nextPlayer]}'s turn`
|
|
@@ -226,7 +226,7 @@ const config = {
|
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
228
|
where: where(),
|
|
229
|
-
match: ({context}) => context.marker == 'next'
|
|
229
|
+
match: ({context}) => context.marker == 'next',
|
|
230
230
|
apply: ({context, objects}) => {
|
|
231
231
|
if (Number.isInteger(objects.nextPlayer)) {
|
|
232
232
|
context.evalue = objects.players[objects.nextPlayer]
|
|
@@ -237,7 +237,7 @@ const config = {
|
|
|
237
237
|
},
|
|
238
238
|
{
|
|
239
239
|
where: where(),
|
|
240
|
-
match: ({context}) => context.marker == 'player' && context.
|
|
240
|
+
match: ({context}) => context.marker == 'player' && context.pullFromContext,
|
|
241
241
|
apply: async ({context, objects, gs}) => {
|
|
242
242
|
const players = objects.players
|
|
243
243
|
if (players.length == 0) {
|
|
@@ -257,7 +257,7 @@ const config = {
|
|
|
257
257
|
},
|
|
258
258
|
{
|
|
259
259
|
where: where(),
|
|
260
|
-
match: ({context}) => context.marker == 'score' && context.
|
|
260
|
+
match: ({context}) => context.marker == 'score' && context.winning,
|
|
261
261
|
apply: ({context, objects}) => {
|
|
262
262
|
//context.value = { marker: 'point', value: objects.winningScore }
|
|
263
263
|
// i got the value by running -q '20 points'
|
|
@@ -280,7 +280,7 @@ const config = {
|
|
|
280
280
|
},
|
|
281
281
|
{
|
|
282
282
|
where: where(),
|
|
283
|
-
match: ({context}) => context.marker == 'score'
|
|
283
|
+
match: ({context}) => context.marker == 'score',
|
|
284
284
|
apply: ({context, objects}) => {
|
|
285
285
|
const players = Object.keys(objects.scores);
|
|
286
286
|
let allScoresAreZero = true
|
package/common/stm.js
CHANGED
|
@@ -288,9 +288,9 @@ const config = {
|
|
|
288
288
|
id: 'recall',
|
|
289
289
|
bridge: "{ ...next(operator), postModifiers: ['recallee'], recallee: after[0] }",
|
|
290
290
|
isA: ['verb'],
|
|
291
|
-
semantic: async ({context, recall,
|
|
291
|
+
semantic: async ({context, recall, resolveEvaluate, e}) => {
|
|
292
292
|
const object = await recall({ context: context.recallee })
|
|
293
|
-
|
|
293
|
+
resolveEvaluate(context, object)
|
|
294
294
|
},
|
|
295
295
|
},
|
|
296
296
|
{
|
|
@@ -324,7 +324,7 @@ const config = {
|
|
|
324
324
|
semantics: [
|
|
325
325
|
{
|
|
326
326
|
where: where(),
|
|
327
|
-
match: ({context}) => context.marker == 'mentions' && context.
|
|
327
|
+
match: ({context}) => context.marker == 'mentions' && context.args?.context?.distributer,
|
|
328
328
|
apply: async ({callId, _continue, toList, context, kms, e, log, toArray, retry}) => {
|
|
329
329
|
context.args.filter ??= (r) => r
|
|
330
330
|
context.args.all = true
|
|
@@ -337,7 +337,7 @@ const config = {
|
|
|
337
337
|
},
|
|
338
338
|
{
|
|
339
339
|
where: where(),
|
|
340
|
-
match: ({context}) => context.marker == 'mentions'
|
|
340
|
+
match: ({context}) => context.marker == 'mentions',
|
|
341
341
|
apply: ({context, kms, toList, resolveEvaluate}) => {
|
|
342
342
|
const value = kms.stm.api.recall(context.args)
|
|
343
343
|
if (value) {
|
|
@@ -366,7 +366,7 @@ const config = {
|
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
if (!context.value) {
|
|
369
|
-
context.evalue = { marker: '
|
|
369
|
+
context.evalue = { marker: 'undefined' }
|
|
370
370
|
return
|
|
371
371
|
}
|
|
372
372
|
|
|
@@ -375,9 +375,7 @@ const config = {
|
|
|
375
375
|
if (instance.evalue && !instance.edefault) {
|
|
376
376
|
context.value = instance.evalue
|
|
377
377
|
}
|
|
378
|
-
|
|
379
|
-
context.evalue = context.value
|
|
380
|
-
}
|
|
378
|
+
context.evalue = context.value
|
|
381
379
|
} else {
|
|
382
380
|
await s(context.value)
|
|
383
381
|
}
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
},
|
|
186
186
|
"generators": [
|
|
187
187
|
{
|
|
188
|
-
"match": "({context}) => context.marker == 'timePoint' && context.evalue && context.format == 12",
|
|
188
|
+
"match": "({context}) => context.marker == 'timePoint' && context.evalue && context.format == 12 && !context.paraphrase",
|
|
189
189
|
"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
190
|
},
|
|
191
191
|
{
|
|
@@ -203,7 +203,7 @@
|
|
|
203
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 }"
|
|
204
204
|
},
|
|
205
205
|
{
|
|
206
|
-
"match": "({objects, context, api}) => context.marker == 'timePoint' && context.
|
|
206
|
+
"match": "({objects, context, api}) => context.marker == 'timePoint' && !context.isInstance",
|
|
207
207
|
"apply": "({objects, context, api}) => {\n context.evalue = api.newDate()\n context.format = objects.format\n }"
|
|
208
208
|
},
|
|
209
209
|
{
|
package/common/time.js
CHANGED
|
@@ -170,7 +170,7 @@ const template = {
|
|
|
170
170
|
generators: [
|
|
171
171
|
{
|
|
172
172
|
where: where(),
|
|
173
|
-
match: ({context}) => context.marker == 'timePoint' && context.evalue && context.format == 12,
|
|
173
|
+
match: ({context}) => context.marker == 'timePoint' && context.evalue && context.format == 12 && !context.paraphrase,
|
|
174
174
|
apply: ({context}) => {
|
|
175
175
|
let hh = context.evalue.getHours();
|
|
176
176
|
let ampm = 'am'
|
|
@@ -225,7 +225,7 @@ const template = {
|
|
|
225
225
|
{
|
|
226
226
|
notes: 'evaluate time',
|
|
227
227
|
where: where(),
|
|
228
|
-
match: ({objects, context, api}) => context.marker == 'timePoint' && context.
|
|
228
|
+
match: ({objects, context, api}) => context.marker == 'timePoint' && !context.isInstance,
|
|
229
229
|
apply: ({objects, context, api}) => {
|
|
230
230
|
context.evalue = api.newDate()
|
|
231
231
|
context.format = objects.format
|
package/common/wp.instance.json
CHANGED
|
@@ -956,11 +956,11 @@
|
|
|
956
956
|
],
|
|
957
957
|
"semantics": [
|
|
958
958
|
{
|
|
959
|
-
"match": "({context, isA}) => isA(context, 'style_wp') && !context.same && !context.isResponse
|
|
959
|
+
"match": "({context, isA}) => isA(context, 'style_wp') && !context.same && !context.isResponse",
|
|
960
960
|
"apply": "({context, api, isA, toArray}) => {\n const update = { scope: 'selection' }\n setUpdate(isA, update, toArray(context))\n api.changeState(update)\n }"
|
|
961
961
|
},
|
|
962
962
|
{
|
|
963
|
-
"match": "({context, isA}) => isA(context, 'statefulElement_wp') && !context.same && !context.isResponse
|
|
963
|
+
"match": "({context, isA}) => isA(context, 'statefulElement_wp') && !context.same && !context.isResponse",
|
|
964
964
|
"apply": "({context, api, isA, toArray}) => {\n const unit = root(context.marker)\n let scope\n if (context.quantity) {\n scope = context.quantity.quantity\n }\n // TODO set default scope for \"every word bold underlined etc\"\n }"
|
|
965
965
|
}
|
|
966
966
|
],
|
package/common/wp.js
CHANGED
|
@@ -450,7 +450,7 @@ template = {
|
|
|
450
450
|
semantics: [
|
|
451
451
|
{
|
|
452
452
|
where: where(),
|
|
453
|
-
match: ({context, isA}) => isA(context, 'style_wp') && !context.same && !context.isResponse
|
|
453
|
+
match: ({context, isA}) => isA(context, 'style_wp') && !context.same && !context.isResponse,
|
|
454
454
|
apply: ({context, api, isA, toArray}) => {
|
|
455
455
|
const update = { scope: 'selection' }
|
|
456
456
|
setUpdate(isA, update, toArray(context))
|
|
@@ -459,7 +459,7 @@ template = {
|
|
|
459
459
|
},
|
|
460
460
|
{
|
|
461
461
|
where: where(),
|
|
462
|
-
match: ({context, isA}) => isA(context, 'statefulElement_wp') && !context.same && !context.isResponse
|
|
462
|
+
match: ({context, isA}) => isA(context, 'statefulElement_wp') && !context.same && !context.isResponse,
|
|
463
463
|
apply: ({context, api, isA, toArray}) => {
|
|
464
464
|
const unit = root(context.marker)
|
|
465
465
|
let scope
|
package/package.json
CHANGED
|
@@ -402,8 +402,8 @@
|
|
|
402
402
|
"scriptjs": "^2.5.9",
|
|
403
403
|
"table": "^6.7.1",
|
|
404
404
|
"uuid": "^9.0.0",
|
|
405
|
-
"theprogrammablemind": "9.8.0-beta.
|
|
405
|
+
"theprogrammablemind": "9.8.0-beta.4"
|
|
406
406
|
},
|
|
407
|
-
"version": "9.8.0-beta.
|
|
407
|
+
"version": "9.8.0-beta.4",
|
|
408
408
|
"license": "UNLICENSED"
|
|
409
409
|
}
|