@llblab/pi-kit 0.3.2 → 0.5.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 (132) hide show
  1. package/AGENTS.md +3 -3
  2. package/BACKLOG.md +1 -1
  3. package/CHANGELOG.md +10 -0
  4. package/README.md +19 -10
  5. package/node_modules/@llblab/pi-actors/AGENTS.md +1 -0
  6. package/node_modules/@llblab/pi-actors/CHANGELOG.md +6 -0
  7. package/node_modules/@llblab/pi-actors/dist/skills/actors/SKILL.md +16 -6
  8. package/node_modules/@llblab/pi-actors/dist/skills/music-player/SKILL.md +3 -3
  9. package/node_modules/@llblab/pi-actors/dist/skills/music-player/genapps/music-player.mjs +6 -4
  10. package/node_modules/@llblab/pi-actors/dist/skills/music-player/scripts/playback.mjs +85 -18
  11. package/node_modules/@llblab/pi-actors/dist/skills/swarm/SKILL.md +2 -6
  12. package/node_modules/@llblab/pi-actors/dist/skills/swarm/references/development-swarm.md +2 -31
  13. package/node_modules/@llblab/pi-actors/docs/recipe-library.md +1 -1
  14. package/node_modules/@llblab/pi-actors/package.json +1 -1
  15. package/node_modules/@llblab/pi-actors/skills/actors/SKILL.md +16 -6
  16. package/node_modules/@llblab/pi-actors/skills/music-player/SKILL.md +3 -3
  17. package/node_modules/@llblab/pi-actors/skills/music-player/genapps/music-player.mjs +6 -4
  18. package/node_modules/@llblab/pi-actors/skills/music-player/scripts/playback.mjs +85 -18
  19. package/node_modules/@llblab/pi-actors/skills/swarm/SKILL.md +2 -6
  20. package/node_modules/@llblab/pi-actors/skills/swarm/references/development-swarm.md +2 -31
  21. package/node_modules/@llblab/pi-clean-room/AGENTS.md +5 -0
  22. package/node_modules/@llblab/pi-clean-room/BACKLOG.md +3 -0
  23. package/node_modules/@llblab/pi-clean-room/CHANGELOG.md +15 -0
  24. package/node_modules/@llblab/pi-clean-room/README.md +61 -0
  25. package/node_modules/@llblab/pi-clean-room/banner.jpg +0 -0
  26. package/node_modules/@llblab/pi-clean-room/index.ts +178 -0
  27. package/node_modules/@llblab/pi-clean-room/package.json +53 -0
  28. package/node_modules/@llblab/pi-grow-loop/AGENTS.md +1 -1
  29. package/node_modules/@llblab/pi-grow-loop/CHANGELOG.md +4 -0
  30. package/node_modules/@llblab/pi-grow-loop/package.json +1 -1
  31. package/node_modules/@llblab/pi-grow-loop/skills/grow-loop/SKILL.md +3 -17
  32. package/node_modules/@llblab/pi-state-flow/AGENTS.md +28 -0
  33. package/node_modules/@llblab/pi-state-flow/BACKLOG.md +3 -0
  34. package/node_modules/@llblab/pi-state-flow/CHANGELOG.md +79 -0
  35. package/node_modules/@llblab/pi-state-flow/README.md +197 -0
  36. package/node_modules/@llblab/pi-state-flow/index.ts +4 -0
  37. package/node_modules/@llblab/pi-state-flow/lib/context.ts +88 -0
  38. package/node_modules/@llblab/pi-state-flow/lib/episode.ts +29 -0
  39. package/node_modules/@llblab/pi-state-flow/lib/extension.ts +238 -0
  40. package/node_modules/@llblab/pi-state-flow/lib/json.ts +78 -0
  41. package/node_modules/@llblab/pi-state-flow/lib/recovery.ts +38 -0
  42. package/node_modules/@llblab/pi-state-flow/lib/session.ts +49 -0
  43. package/node_modules/@llblab/pi-state-flow/lib/skills.ts +58 -0
  44. package/node_modules/@llblab/pi-state-flow/lib/snapshot.ts +103 -0
  45. package/node_modules/@llblab/pi-state-flow/lib/state.ts +20 -0
  46. package/node_modules/@llblab/pi-state-flow/lib/status.ts +16 -0
  47. package/node_modules/@llblab/pi-state-flow/lib/terminal.ts +148 -0
  48. package/node_modules/@llblab/pi-state-flow/lib/transition.ts +47 -0
  49. package/node_modules/@llblab/pi-state-flow/lib/validation.ts +27 -0
  50. package/node_modules/@llblab/pi-state-flow/package.json +55 -0
  51. package/node_modules/@llblab/pi-telegram/BACKLOG.md +3 -0
  52. package/node_modules/@llblab/pi-telegram/CHANGELOG.md +18 -0
  53. package/node_modules/@llblab/pi-telegram/README.md +2 -2
  54. package/node_modules/@llblab/pi-telegram/docs/README.md +1 -1
  55. package/node_modules/@llblab/pi-telegram/docs/architecture.md +5 -3
  56. package/node_modules/@llblab/pi-telegram/docs/compact-matrix-literal.md +39 -11
  57. package/node_modules/@llblab/pi-telegram/docs/generative-apps.md +2 -2
  58. package/node_modules/@llblab/pi-telegram/docs/multi-instance-bus.md +17 -5
  59. package/node_modules/@llblab/pi-telegram/docs/outbound.md +6 -4
  60. package/node_modules/@llblab/pi-telegram/docs/public-api.md +1 -1
  61. package/node_modules/@llblab/pi-telegram/index.ts +13 -1
  62. package/node_modules/@llblab/pi-telegram/lib/bindings.ts +12 -3
  63. package/node_modules/@llblab/pi-telegram/lib/bus-follower.ts +29 -18
  64. package/node_modules/@llblab/pi-telegram/lib/bus-leader.ts +15 -6
  65. package/node_modules/@llblab/pi-telegram/lib/bus.ts +11 -4
  66. package/node_modules/@llblab/pi-telegram/lib/keyboard.ts +5 -3
  67. package/node_modules/@llblab/pi-telegram/lib/outbound-buttons.ts +72 -15
  68. package/node_modules/@llblab/pi-telegram/lib/outbound-markup.ts +81 -9
  69. package/node_modules/@llblab/pi-telegram/lib/outbound.ts +2 -0
  70. package/node_modules/@llblab/pi-telegram/lib/replies.ts +1 -1
  71. package/node_modules/@llblab/pi-telegram/lib/routing.ts +89 -32
  72. package/node_modules/@llblab/pi-telegram/lib/sync.ts +74 -15
  73. package/node_modules/@llblab/pi-telegram/lib/telegram-api.ts +32 -1
  74. package/node_modules/@llblab/pi-telegram/lib/thread-reconciler.ts +17 -0
  75. package/node_modules/@llblab/pi-telegram/lib/threads.ts +123 -15
  76. package/node_modules/@llblab/pi-telegram/package.json +1 -1
  77. package/node_modules/@llblab/pi-telegram/skills/generated-control-surface/SKILL.md +4 -2
  78. package/node_modules/@llblab/pi-telegram/skills/generated-control-surface/references/layout-and-state.md +4 -2
  79. package/node_modules/@llblab/pi-telegram/skills/generative-apps/SKILL.md +4 -3
  80. package/node_modules/@llblab/pi-telegram/skills/telegram-bridge/SKILL.md +19 -8
  81. package/node_modules/@llblab/pi-telegram/skills/telegram-bridge/references/diagnosis.md +4 -2
  82. package/node_modules/@llblab/skills/abcd-context/AGENTS.md +40 -0
  83. package/node_modules/@llblab/skills/abcd-context/BACKLOG.md +3 -0
  84. package/node_modules/@llblab/skills/abcd-context/CHANGELOG.md +19 -0
  85. package/node_modules/@llblab/skills/abcd-context/README.md +30 -0
  86. package/node_modules/@llblab/skills/abcd-context/SKILL.md +122 -0
  87. package/node_modules/@llblab/skills/abcd-context/docs/README.md +9 -0
  88. package/node_modules/@llblab/skills/abcd-context/docs/protocols.md +199 -0
  89. package/node_modules/@llblab/skills/abcd-context/docs/templates.md +194 -0
  90. package/node_modules/@llblab/skills/abcd-context/docs/validation-design.md +117 -0
  91. package/node_modules/@llblab/skills/abcd-context/fixtures/abcd-project/AGENTS.md +10 -0
  92. package/node_modules/@llblab/skills/abcd-context/fixtures/abcd-project/BACKLOG.md +5 -0
  93. package/node_modules/@llblab/skills/abcd-context/fixtures/abcd-project/CHANGELOG.md +5 -0
  94. package/node_modules/@llblab/skills/abcd-context/fixtures/abcd-project/README.md +10 -0
  95. package/node_modules/@llblab/skills/abcd-context/fixtures/abcd-project/docs/README.md +7 -0
  96. package/node_modules/@llblab/skills/abcd-context/fixtures/abcd-project/docs/overview.md +3 -0
  97. package/node_modules/@llblab/skills/abcd-context/recipes/validate-context.json +7 -0
  98. package/node_modules/@llblab/skills/abcd-context/scripts/_self-test.mjs +244 -0
  99. package/node_modules/@llblab/skills/abcd-context/scripts/validate-context.mjs +497 -0
  100. package/node_modules/@llblab/skills/brain-storm/AGENTS.md +5 -0
  101. package/node_modules/@llblab/skills/brain-storm/SKILL.md +321 -0
  102. package/node_modules/@llblab/skills/coding-contract/SKILL.md +228 -0
  103. package/node_modules/@llblab/skills/domain-dag/AGENTS.md +6 -0
  104. package/node_modules/@llblab/skills/domain-dag/SKILL.md +257 -0
  105. package/node_modules/@llblab/skills/domain-dag/domain-dag.json +9 -0
  106. package/node_modules/@llblab/skills/domain-dag/recipes/validate-domain-dag.json +7 -0
  107. package/node_modules/@llblab/skills/domain-dag/scripts/validate-domain-dag.mjs +771 -0
  108. package/node_modules/@llblab/skills/domain-dag/scripts/validate-domain-dag.sh +4 -0
  109. package/node_modules/@llblab/skills/edge-tts/AGENTS.md +19 -0
  110. package/node_modules/@llblab/skills/edge-tts/SKILL.md +56 -0
  111. package/node_modules/@llblab/skills/edge-tts/recipes/say-edge.json +9 -0
  112. package/node_modules/@llblab/skills/edge-tts/scripts/say.mjs +1548 -0
  113. package/node_modules/@llblab/skills/edge-tts/scripts/say.sh +4 -0
  114. package/node_modules/@llblab/skills/extra-self/SKILL.md +229 -0
  115. package/node_modules/@llblab/skills/frontend-design/SKILL.md +78 -0
  116. package/node_modules/@llblab/skills/groq-stt/AGENTS.md +15 -0
  117. package/node_modules/@llblab/skills/groq-stt/SKILL.md +35 -0
  118. package/node_modules/@llblab/skills/groq-stt/recipes/transcribe-groq.json +10 -0
  119. package/node_modules/@llblab/skills/groq-stt/scripts/transcribe.mjs +190 -0
  120. package/node_modules/@llblab/skills/groq-stt/scripts/transcribe.sh +4 -0
  121. package/node_modules/@llblab/skills/mistral-stt/AGENTS.md +15 -0
  122. package/node_modules/@llblab/skills/mistral-stt/SKILL.md +35 -0
  123. package/node_modules/@llblab/skills/mistral-stt/recipes/transcribe-mistral.json +10 -0
  124. package/node_modules/@llblab/skills/mistral-stt/scripts/transcribe.mjs +191 -0
  125. package/node_modules/@llblab/skills/mistral-stt/scripts/transcribe.sh +4 -0
  126. package/node_modules/@llblab/skills/package.json +46 -0
  127. package/node_modules/@llblab/skills/re-review/SKILL.md +318 -0
  128. package/node_modules/@llblab/skills/release-flow/SKILL.md +456 -0
  129. package/node_modules/@llblab/skills/show-me/SKILL.md +144 -0
  130. package/package.json +20 -8
  131. package/node_modules/@llblab/pi-actors/dist/skills/music-player/scripts/playback-client.mjs +0 -143
  132. package/node_modules/@llblab/pi-actors/skills/music-player/scripts/playback-client.mjs +0 -143
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)"
4
+ exec node "$SCRIPT_DIR/validate-domain-dag.mjs" "$@"
@@ -0,0 +1,19 @@
1
+ # AGENTS.md (edge-tts)
2
+
3
+ [SKILL.md](./SKILL.md) owns the client architecture, invocation, output modes, and platform playback behavior.
4
+
5
+ ### Operating Principles
6
+
7
+ - Preserve the Skill's client architecture; keep the Bash entrypoint a delegation-only wrapper.
8
+ - In playback mode, print only the spoken text to stdout; send diagnostics to stderr.
9
+ - Preserve the Skill's stdin and positional interfaces for piped responses and existing `say_edge` callers.
10
+
11
+ ### Playback Policy
12
+
13
+ - Auto-detect blocking players in this order: `ffplay`, `mpv`, `vlc`, `cvlc`, `mpg123`, `afplay`, before the Skill's Windows fallback.
14
+ - Keep media, subtitle, metadata, and voice-list operations independent of player availability.
15
+
16
+ ### Discovered Constraints
17
+
18
+ - Direct Edge binary websocket payload data begins immediately after the declared header bytes; do not skip an extra CRLF after the binary header.
19
+ - MP3 output should start with a valid frame sync such as `ff f3`; missing sync means audio chunks were sliced incorrectly.
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: edge-tts
3
+ description: Text-to-speech via Microsoft Edge TTS (free, neural voices).
4
+ ---
5
+
6
+ # Edge TTS
7
+
8
+ Direct Node.js client for Microsoft Edge's online TTS service. The canonical client is `scripts/say.mjs`; `scripts/say.sh` is the shell entrypoint wrapper. There are no Python, CLI-wrapper, or legacy shell fallbacks.
9
+
10
+ ## Usage
11
+
12
+ ```bash
13
+ ./scripts/say.sh "Привет" ru +30% # Synthesize and play with an available local MP3 player
14
+ ./scripts/say.sh "Привет" ru 1 /tmp/hello.mp3 # Save MP3; numeric rate multiplier is supported
15
+ ./scripts/say.sh "Привет" ru +30% /tmp/a.mp3 /tmp/a.jsonl
16
+ ./scripts/say.sh --text "Hello" --lang en --write-media /tmp/hello.mp3
17
+ ./scripts/say.sh --file input.txt --voice ru-RU-SvetlanaNeural --write-media out.mp3 --write-subtitles out.srt
18
+ ./scripts/say.sh --list-voices
19
+ ```
20
+
21
+ ## CLI Options
22
+
23
+ - `--text`, `--file` — text source; `-` means stdin for files.
24
+ - `--lang`, `--voice` — language shortcut or explicit voice.
25
+ - `--rate`, `--volume`, `--pitch` — Edge prosody controls.
26
+ - `--boundary` — `SentenceBoundary` or `WordBoundary`.
27
+ - `--write-media` — MP3 output path; `-` means stdout.
28
+ - `--write-subtitles` — SRT output path; `-` means stderr.
29
+ - `--write-metadata` — JSONL boundary metadata output path.
30
+ - `--list-voices` — direct voice list request.
31
+
32
+ ## Playback
33
+
34
+ Playback runs in background only when no media output path is provided. The client auto-detects a local MP3 player and removes the temp file after playback when the player is blocking.
35
+
36
+ Default candidates:
37
+
38
+ - Cross-platform if installed: `ffplay`, `mpv`, `vlc`/`cvlc`.
39
+ - Linux/BSD extras: `mpg123`.
40
+ - macOS default: `afplay`.
41
+ - Windows default fallback: the system-registered MP3 app through PowerShell `Start-Process`.
42
+
43
+ If no player exists, generation is still available through `--write-media`; the agent can then play the MP3 with any system-specific tool. Windows default-app playback uses delayed temp cleanup because registered apps usually detach immediately.
44
+
45
+ ## Dependencies
46
+
47
+ - Node.js 18+.
48
+ - A local MP3 player only for direct playback mode.
49
+ - Internet access.
50
+
51
+ ## Notes
52
+
53
+ - Built-in language shortcuts: en, ru, de, fr, es, it, zh, ja.
54
+ - Default rate: +30%.
55
+ - Rate/volume accept Edge percent strings and numeric multipliers: `1` = `+100%`, `0.8` = `+80%`, `-0.5` = `-50%`.
56
+ - The script implements direct TLS/WebSocket handshake, MUID, Sec-MS-GEC, MP3 streaming, boundary metadata, subtitles, and voice listing.
@@ -0,0 +1,9 @@
1
+ {
2
+ "description": "Synthesize speech from text through the Edge TTS skill.",
3
+ "args": [
4
+ "text:string",
5
+ "lang:string=ru",
6
+ "rate:string=+30%"
7
+ ],
8
+ "template": "{skill_dir}/scripts/say.sh {text} {lang} {rate}"
9
+ }