@rookiestar/eng-lang-tutor 1.0.13 β 1.0.14
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.
Potentially problematic release.
This version of @rookiestar/eng-lang-tutor might be problematic. Click here for more details.
- package/SKILL.md +13 -7
- package/package.json +1 -1
- package/scripts/state_manager.py +9 -1
package/SKILL.md
CHANGED
|
@@ -287,24 +287,30 @@ Step 5: Display formatted content to user
|
|
|
287
287
|
|
|
288
288
|
### Audio File Sending (After Keypoint Save)
|
|
289
289
|
|
|
290
|
-
When keypoint is saved, audio is auto-generated. Send it to user
|
|
290
|
+
When keypoint is saved, audio is auto-generated and copied to OpenClaw's allowed media directory. Send it to user:
|
|
291
291
|
|
|
292
292
|
```
|
|
293
293
|
1. Check keypoint.json for audio field:
|
|
294
294
|
cat ~/.openclaw/state/eng-lang-tutor/daily/YYYY-MM-DD/keypoint.json | grep -o '"audio":{[^}]*}'
|
|
295
295
|
|
|
296
|
-
2. If audio exists, send via message tool
|
|
296
|
+
2. If audio.composed exists, send via message tool:
|
|
297
297
|
{
|
|
298
298
|
"action": "send",
|
|
299
|
-
"media": "~/.openclaw/
|
|
300
|
-
"
|
|
299
|
+
"media": "~/.openclaw/media/{audio.composed}",
|
|
300
|
+
"caption": "π δ»ζ₯η₯θ―ηΉθ―ι³η"
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
Example:
|
|
304
|
+
{
|
|
305
|
+
"action": "send",
|
|
306
|
+
"media": "~/.openclaw/media/eng-lang-tutor/2026-02-23/keypoint_full.mp3",
|
|
301
307
|
"caption": "π δ»ζ₯η₯θ―ηΉθ―ι³η"
|
|
302
308
|
}
|
|
303
309
|
|
|
304
310
|
3. Audio file info is stored in keypoint.json:
|
|
305
311
|
{
|
|
306
312
|
"audio": {
|
|
307
|
-
"composed": "
|
|
313
|
+
"composed": "eng-lang-tutor/2026-02-23/keypoint_full.mp3",
|
|
308
314
|
"duration_seconds": 37.7,
|
|
309
315
|
"generated_at": "2026-02-23T02:20:14"
|
|
310
316
|
}
|
|
@@ -312,9 +318,9 @@ When keypoint is saved, audio is auto-generated. Send it to user as **voice mess
|
|
|
312
318
|
```
|
|
313
319
|
|
|
314
320
|
**IMPORTANT:**
|
|
321
|
+
- Audio is saved to `~/.openclaw/media/` (OpenClaw's allowed media directory)
|
|
315
322
|
- Always send audio file BEFORE displaying text content
|
|
316
|
-
-
|
|
317
|
-
- This ensures proper voice player UI on Feishu/Discord/Telegram
|
|
323
|
+
- The `audio.composed` field contains the path relative to `~/.openclaw/media/`
|
|
318
324
|
|
|
319
325
|
### After Quiz Generation (MANDATORY)
|
|
320
326
|
```
|
package/package.json
CHANGED
package/scripts/state_manager.py
CHANGED
|
@@ -386,7 +386,15 @@ class StateManager:
|
|
|
386
386
|
result = composer.compose_keypoint_audio(keypoint, output_path)
|
|
387
387
|
|
|
388
388
|
if result.success:
|
|
389
|
-
|
|
389
|
+
# Copy to OpenClaw media directory (required for message tool access)
|
|
390
|
+
# OpenClaw only allows media from ~/.openclaw/media/
|
|
391
|
+
media_dir = Path.home() / '.openclaw' / 'media' / 'eng-lang-tutor' / date_str
|
|
392
|
+
media_dir.mkdir(parents=True, exist_ok=True)
|
|
393
|
+
media_path = media_dir / "keypoint_full.mp3"
|
|
394
|
+
shutil.copy2(output_path, media_path)
|
|
395
|
+
|
|
396
|
+
# Return path relative to ~/.openclaw/media/ for message tool
|
|
397
|
+
audio_path = f"eng-lang-tutor/{date_str}/keypoint_full.mp3"
|
|
390
398
|
|
|
391
399
|
# Update keypoint with audio metadata
|
|
392
400
|
keypoint['audio'] = {
|