@rookiestar/eng-lang-tutor 1.1.7 → 1.1.9
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 +17 -8
- package/package.json +1 -1
- package/templates/prompts/initialization.md +23 -6
- package/templates/state_schema.json +48 -2
package/SKILL.md
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: eng-lang-tutor
|
|
3
|
-
description:
|
|
4
|
-
地道美式英语导师 - 提供每日知识点、Quiz测验等学习内容。
|
|
5
|
-
支持游戏化学习(XP/连胜/等级/徽章)。
|
|
6
|
-
触发场景:学习英语、英语知识点、Quiz、错题本、学习进度。
|
|
7
|
-
被 cron job 调用以实现定期内容推送。
|
|
3
|
+
description: "地道美式英语导师 - 提供每日知识点、Quiz测验等学习内容。支持游戏化学习(XP/连胜/等级/徽章)。触发场景:学习英语、英语知识点、Quiz、错题本、学习进度。被 cron job 调用以实现定期内容推送。【⛔重要:引导流程固定7步,显示为 Step 1/7 到 Step 7/7,绝不可显示 Step X/6】"
|
|
8
4
|
---
|
|
9
5
|
|
|
10
6
|
# American English Tutor
|
|
11
7
|
|
|
8
|
+
> **⛔ ONBOARDING = 7 STEPS** (Step 1/7 through Step 7/7). NEVER display "Step X/6"!
|
|
9
|
+
|
|
12
10
|
## Overview
|
|
13
11
|
|
|
14
12
|
Teaches authentic American English expressions, avoiding Chinglish patterns.
|
|
@@ -250,9 +248,20 @@ The bot recognizes these natural language commands:
|
|
|
250
248
|
|
|
251
249
|
## Initialization Flow
|
|
252
250
|
|
|
253
|
-
>
|
|
254
|
-
|
|
255
|
-
|
|
251
|
+
> **⛔ CRITICAL - TOTAL ONBOARDING STEPS = 7 (NOT 6!)**
|
|
252
|
+
>
|
|
253
|
+
> You MUST display step titles as **"Step 1/7"**, **"Step 2/7"**, etc. (NOT "Step 1/6"!)
|
|
254
|
+
>
|
|
255
|
+
> The 7 steps are:
|
|
256
|
+
> 1. CEFR Level
|
|
257
|
+
> 2. Topic Interests
|
|
258
|
+
> 3. Tutor Style
|
|
259
|
+
> 4. Oral/Written Ratio
|
|
260
|
+
> 5. Schedule
|
|
261
|
+
> 6. **Voice Teaching** ← THIS IS THE NEW STEP!
|
|
262
|
+
> 7. Confirm
|
|
263
|
+
>
|
|
264
|
+
> Follow [templates/prompts/initialization.md](templates/prompts/initialization.md) exactly. Display ALL options with numbers (1, 2, 3...). NEVER skip or abbreviate options.
|
|
256
265
|
|
|
257
266
|
**Step 7 Completion:** Set `initialized=true` + Create cron jobs for keypoint/quiz push times.
|
|
258
267
|
|
package/package.json
CHANGED
|
@@ -314,10 +314,13 @@
|
|
|
314
314
|
|
|
315
315
|
After user confirms with "yes" or "1", MUST execute the following bash commands to create cron jobs:
|
|
316
316
|
|
|
317
|
+
**CRITICAL: Capture the current channel ID from the message context and include it in the cron job command.**
|
|
318
|
+
|
|
317
319
|
```bash
|
|
318
320
|
# Parse times from schedule
|
|
319
321
|
KEYPOINT_TIME="06:45" # Default, replace with user's keypoint_time
|
|
320
322
|
QUIZ_TIME="22:45" # Default, replace with user's quiz_time
|
|
323
|
+
CHANNEL_ID="<current_channel_id>" # Get from message context (e.g., Discord channel ID)
|
|
321
324
|
|
|
322
325
|
# Extract hour and minute
|
|
323
326
|
KEYPOINT_HOUR=$(echo $KEYPOINT_TIME | cut -d: -f1)
|
|
@@ -325,15 +328,29 @@ KEYPOINT_MIN=$(echo $KEYPOINT_TIME | cut -d: -f2)
|
|
|
325
328
|
QUIZ_HOUR=$(echo $QUIZ_TIME | cut -d: -f1)
|
|
326
329
|
QUIZ_MIN=$(echo $QUIZ_TIME | cut -d: -f2)
|
|
327
330
|
|
|
328
|
-
# Create cron jobs using openclaw
|
|
331
|
+
# Create cron jobs using openclaw with channel parameter
|
|
329
332
|
# Keypoint job
|
|
330
|
-
${KEYPOINT_MIN} ${KEYPOINT_HOUR} * * * openclaw system event --text "Use eng-lang-tutor skill. Push today's keypoint." --mode now
|
|
333
|
+
${KEYPOINT_MIN} ${KEYPOINT_HOUR} * * * openclaw system event --text "Use eng-lang-tutor skill. Push today's keypoint." --mode now --channel ${CHANNEL_ID}
|
|
331
334
|
|
|
332
335
|
# Quiz job
|
|
333
|
-
${QUIZ_MIN} ${QUIZ_HOUR} * * * openclaw system event --text "Use eng-lang-tutor skill. Push today's quiz invitation." --mode now
|
|
336
|
+
${QUIZ_MIN} ${QUIZ_HOUR} * * * openclaw system event --text "Use eng-lang-tutor skill. Push today's quiz invitation." --mode now --channel ${CHANNEL_ID}
|
|
334
337
|
```
|
|
335
338
|
|
|
336
339
|
**IMPORTANT:** The cron job creation requires:
|
|
337
|
-
1.
|
|
338
|
-
2.
|
|
339
|
-
3.
|
|
340
|
+
1. Capture `channel_id` from the current message context (where user is doing onboarding)
|
|
341
|
+
2. Save `channel_id` to `state.json schedule.channel_id`
|
|
342
|
+
3. Parse user's `keypoint_time` and `quiz_time` from state.json schedule
|
|
343
|
+
4. Execute the bash command to register each cron job with `--channel` parameter
|
|
344
|
+
5. Log the event using `state_manager.py append_event`
|
|
345
|
+
|
|
346
|
+
**State Update:**
|
|
347
|
+
```json
|
|
348
|
+
{
|
|
349
|
+
"schedule": {
|
|
350
|
+
"keypoint_time": "06:45",
|
|
351
|
+
"quiz_time": "22:45",
|
|
352
|
+
"timezone": "Asia/Shanghai",
|
|
353
|
+
"channel_id": "123456789012345678"
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
```
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"onboarding_step": {
|
|
20
20
|
"type": "integer",
|
|
21
21
|
"minimum": 0,
|
|
22
|
-
"maximum":
|
|
22
|
+
"maximum": 7,
|
|
23
23
|
"default": 0,
|
|
24
|
-
"description": "Current onboarding step (0=not started,
|
|
24
|
+
"description": "Current onboarding step (0=not started, 7=complete)"
|
|
25
25
|
},
|
|
26
26
|
"completion_status": {
|
|
27
27
|
"type": "object",
|
|
@@ -64,6 +64,11 @@
|
|
|
64
64
|
"type": "string",
|
|
65
65
|
"default": "Asia/Shanghai",
|
|
66
66
|
"description": "Timezone for schedule"
|
|
67
|
+
},
|
|
68
|
+
"channel_id": {
|
|
69
|
+
"type": ["string", "null"],
|
|
70
|
+
"default": null,
|
|
71
|
+
"description": "Channel ID for scheduled pushes (captured during onboarding)"
|
|
67
72
|
}
|
|
68
73
|
},
|
|
69
74
|
"description": "User's preferred schedule for content delivery"
|
|
@@ -153,6 +158,47 @@
|
|
|
153
158
|
}
|
|
154
159
|
}
|
|
155
160
|
},
|
|
161
|
+
"tts_settings": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"description": "TTS voice and speed configuration",
|
|
164
|
+
"properties": {
|
|
165
|
+
"enabled": {
|
|
166
|
+
"type": "boolean",
|
|
167
|
+
"default": true,
|
|
168
|
+
"description": "Whether voice teaching is enabled"
|
|
169
|
+
},
|
|
170
|
+
"provider": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"enum": ["edge-tts", "xunfei"],
|
|
173
|
+
"default": "edge-tts",
|
|
174
|
+
"description": "TTS provider to use"
|
|
175
|
+
},
|
|
176
|
+
"speed": {
|
|
177
|
+
"type": "number",
|
|
178
|
+
"enum": [0.5, 0.7, 0.9, 1.3, 1.7],
|
|
179
|
+
"default": 0.9,
|
|
180
|
+
"description": "Speech speed: 0.5=very slow, 0.7=slow, 0.9=normal(recommended), 1.3=fast, 1.7=very fast"
|
|
181
|
+
},
|
|
182
|
+
"voices": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"description": "Voice mappings for different roles",
|
|
185
|
+
"properties": {
|
|
186
|
+
"narrator": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"description": "Narrator voice (female by default)"
|
|
189
|
+
},
|
|
190
|
+
"dialogue_a": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"description": "Dialogue A voice (male by default)"
|
|
193
|
+
},
|
|
194
|
+
"dialogue_b": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"description": "Dialogue B voice (female by default)"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
156
202
|
"progress": {
|
|
157
203
|
"type": "object",
|
|
158
204
|
"required": ["total_quizzes", "correct_rate", "last_study_date"],
|