clavarium 0.2.356-next.1 → 0.2.358-next.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.
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.356-next.1",
3
+ "version": "0.2.358-next.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.2.356-next.1",
9
+ "version": "0.2.358-next.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
13
13
  "@xterm/xterm": "^6.0.0",
14
- "clavarium-binder": "0.1.61-next.1",
14
+ "clavarium-binder": "0.1.62-next.1",
15
15
  "clavarium-docket": "0.1.2-next.2",
16
- "clavarium-parley": "0.17.84-next.1",
16
+ "clavarium-parley": "0.17.85-next.1",
17
17
  "clavarium-tether": "0.1.0-next.55",
18
18
  "mammoth": "1.13.0",
19
19
  "mermaid": "11.17.2",
@@ -761,9 +761,9 @@
761
761
  }
762
762
  },
763
763
  "node_modules/clavarium-binder": {
764
- "version": "0.1.61-next.1",
765
- "resolved": "https://registry.npmjs.org/clavarium-binder/-/clavarium-binder-0.1.61-next.1.tgz",
766
- "integrity": "sha512-yxaKU3pBfoGYkGXADEALeEhEBivP6L2GD8S/ke2/oESIMRd/D9uLf8fYg+geHfonxLNxj3cWen/H6d1YoCGtww==",
764
+ "version": "0.1.62-next.1",
765
+ "resolved": "https://registry.npmjs.org/clavarium-binder/-/clavarium-binder-0.1.62-next.1.tgz",
766
+ "integrity": "sha512-YhBt+k29zbASU931T5kPAnsZwo5JVgGw94HRs4UoKL2WHK4WVvmn54RCzTBSnHCWuvo4Lc27eLcxl0rNb+6Yug==",
767
767
  "license": "MIT",
768
768
  "bin": {
769
769
  "binder": "bin/binder.mjs",
@@ -787,9 +787,9 @@
787
787
  }
788
788
  },
789
789
  "node_modules/clavarium-parley": {
790
- "version": "0.17.84-next.1",
791
- "resolved": "https://registry.npmjs.org/clavarium-parley/-/clavarium-parley-0.17.84-next.1.tgz",
792
- "integrity": "sha512-tvw4ahhxfwzbBZ1r22hhyEHts+41tt78zmEQl+DlUvR+V3GipiriOQSfLqiEWE1HbTeMZZO98lG69ipHLZ/rNg==",
790
+ "version": "0.17.85-next.1",
791
+ "resolved": "https://registry.npmjs.org/clavarium-parley/-/clavarium-parley-0.17.85-next.1.tgz",
792
+ "integrity": "sha512-eLXKOktwO2SUEh6b0OjxDOv4V5PlgCVhjfNTspBEFSgUiAb8pq0j5FUh+FBW7sCYClOy6ybOTOkH8gtcAk9AAA==",
793
793
  "license": "MIT",
794
794
  "bin": {
795
795
  "parley": "bin/parley.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.356-next.1",
3
+ "version": "0.2.358-next.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "A conversation is a VM with a terminal in it. Everything else is a folder.",
@@ -44,9 +44,9 @@
44
44
  "dependencies": {
45
45
  "@xterm/addon-fit": "^0.11.0",
46
46
  "@xterm/xterm": "^6.0.0",
47
- "clavarium-binder": "0.1.61-next.1",
47
+ "clavarium-binder": "0.1.62-next.1",
48
48
  "clavarium-docket": "0.1.2-next.2",
49
- "clavarium-parley": "0.17.84-next.1",
49
+ "clavarium-parley": "0.17.85-next.1",
50
50
  "clavarium-tether": "0.1.0-next.55",
51
51
  "mammoth": "1.13.0",
52
52
  "mermaid": "11.17.2",
package/server/boxes.mjs CHANGED
@@ -40,6 +40,9 @@ export const WAKE_DROP = process.env.CLAVARIUM_WAKE_DROP === '1';
40
40
  the room (« Oui, à l'ombre ») not. */
41
41
  const WAKE_SOUND = /^(?:\S+ )?[ml](?:a|e|i|ai|ei)(?:s|z|ss|se|ze|sse) (?:a|e|o)n|^m[ae]s doi/;
42
42
  export const wakeHeard = (text) => { const t = plainWords(text); return WAKE_HEARD.test(t) || WAKE_SOUND.test(t.replace(/^l /, '')); };
43
+ /* Heard by its sound only (« Mise en œuvre », « Mise en jeu »), not by its spelling: the real calls read so had a
44
+ firm voice; with a faint one it is the room's talk (06-11, 23h20: « Mise en œuvre… moment », voice 396). */
45
+ export const wakeBySoundOnly = (text) => { const t = plainWords(text); return !WAKE_HEARD.test(t) && WAKE_SOUND.test(t.replace(/^l /, '')); };
43
46
  /* DROPPED IN SILENCE (05-11, the owner's go): a wake whose word is not heard again AND whose voice was faint --
44
47
  the room's talk from afar, not someone speaking to the box. Every real call of 05-11 that the word missed
45
48
  had a firm voice or none measured; the false wake of 05-11, 429. Said by one discreet line in the thread. */
@@ -937,7 +940,8 @@ export class Boxes {
937
940
  /* First in the line: Parley keeps 120 characters of `why`, and the end stats after it can pass that. */
938
941
  link.why = `mot ${check.ok ? '\u2713' : '\u2717'} « ${check.heard.slice(0, 30)} »${link.why ? ` · ${link.why}` : ''}`;
939
942
  this.#log(`voice box ${box.name}: wake word heard again: ${check.ok ? 'yes' : 'NO'} (« ${check.heard.slice(0, 40)} »)`);
940
- if (dropsWake(check.ok, link.voice, link.endReason, check.heard)) {
943
+ const soundOnlyFaint = check.ok && wakeBySoundOnly(check.heard) && Number.isFinite(link.voice) && link.voice > 0 && link.voice < WAKE_FAINT;
944
+ if (dropsWake(check.ok, link.voice, link.endReason, check.heard) || soundOnlyFaint) {
941
945
  link.send({ t: 'cue', name: 'done' });
942
946
  this.#log(`voice box ${box.name}: wake ignored (word not heard again, ${link.endReason === 'timeout' ? 'a sentence that never ended' : !check.heard.trim() ? 'no word in its clip' : `faint voice ${Math.round(link.voice || 0)}`})`);
943
947
  try { this.#note?.(box.conversation, { kind: 'box-wake-ignored', text: `Wake ignored on ${box.name}: « ${check.heard.slice(0, 40)} », ${link.endReason === 'timeout' ? 'a sound that never stopped (radio, TV)' : !check.heard.trim() ? 'no word where the wake word should be' : 'faint voice'}`, topic: 'Voice box', tone: 'info' }); } catch { /* the log has it */ }