@tencent-rtc/trtc-agent-skills 0.1.6 → 0.1.7

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 (85) hide show
  1. package/AGENTS.md +1 -1
  2. package/CLAUDE.md +1 -1
  3. package/CODEBUDDY.md +1 -1
  4. package/README.md +6 -73
  5. package/README.zh.md +6 -69
  6. package/bin/cli.js +9 -7
  7. package/package.json +1 -1
  8. package/skills/trtc/SKILL.md +55 -4
  9. package/skills/trtc-ai-oral-coach/README.ja.md +131 -0
  10. package/skills/trtc-ai-oral-coach/README.md +132 -0
  11. package/skills/trtc-ai-oral-coach/README.zh-CN.md +131 -0
  12. package/skills/trtc-ai-oral-coach/SKILL.md +395 -0
  13. package/skills/trtc-ai-oral-coach/auto_adapters/integration_templates/custom-learning-kb-sample.md +88 -0
  14. package/skills/trtc-ai-oral-coach/auto_adapters/integration_templates/generic-integration.md +104 -0
  15. package/skills/trtc-ai-oral-coach/auto_adapters/manifest.yaml +27 -0
  16. package/skills/trtc-ai-oral-coach/auto_adapters/python/README.md +49 -0
  17. package/skills/trtc-ai-oral-coach/auto_adapters/python/coach_client.py.tpl +185 -0
  18. package/skills/trtc-ai-oral-coach/auto_adapters/web/README.md +46 -0
  19. package/skills/trtc-ai-oral-coach/auto_adapters/web/oral-coach-client.js.tpl +210 -0
  20. package/skills/trtc-ai-oral-coach/capabilities/ability-report/manifest.yaml +52 -0
  21. package/skills/trtc-ai-oral-coach/capabilities/ability-report/src/__init__.py +2 -0
  22. package/skills/trtc-ai-oral-coach/capabilities/ability-report/src/adapters/__init__.py +2 -0
  23. package/skills/trtc-ai-oral-coach/capabilities/ability-report/src/adapters/default.py +177 -0
  24. package/skills/trtc-ai-oral-coach/capabilities/ability-report/src/handler.py +29 -0
  25. package/skills/trtc-ai-oral-coach/capabilities/ability-report/src/router.py +23 -0
  26. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/.env.example +59 -0
  27. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/manifest.yaml +46 -0
  28. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/requirements.txt +6 -0
  29. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/TLSSigAPIv2.py +275 -0
  30. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/__init__.py +2 -0
  31. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/_capability_loader.py +227 -0
  32. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/agent.py +197 -0
  33. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/config.py +149 -0
  34. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/core/__init__.py +2 -0
  35. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/core/report_llm.py +129 -0
  36. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/health.py +36 -0
  37. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/server.py +205 -0
  38. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/trtc_client.py +86 -0
  39. package/skills/trtc-ai-oral-coach/capabilities/conversation-core/src/usersig.py +33 -0
  40. package/skills/trtc-ai-oral-coach/capabilities/custom-learning-kb/manifest.yaml +65 -0
  41. package/skills/trtc-ai-oral-coach/capabilities/custom-learning-kb/src/__init__.py +2 -0
  42. package/skills/trtc-ai-oral-coach/capabilities/custom-learning-kb/src/adapters/__init__.py +2 -0
  43. package/skills/trtc-ai-oral-coach/capabilities/custom-learning-kb/src/adapters/clients.py +126 -0
  44. package/skills/trtc-ai-oral-coach/capabilities/custom-learning-kb/src/ports.py +46 -0
  45. package/skills/trtc-ai-oral-coach/capabilities/custom-learning-kb/src/router.py +27 -0
  46. package/skills/trtc-ai-oral-coach/capabilities/quick-correct/manifest.yaml +48 -0
  47. package/skills/trtc-ai-oral-coach/capabilities/quick-correct/src/__init__.py +2 -0
  48. package/skills/trtc-ai-oral-coach/capabilities/quick-correct/src/adapters/__init__.py +2 -0
  49. package/skills/trtc-ai-oral-coach/capabilities/quick-correct/src/adapters/default.py +106 -0
  50. package/skills/trtc-ai-oral-coach/capabilities/quick-correct/src/handler.py +33 -0
  51. package/skills/trtc-ai-oral-coach/capabilities/quick-correct/src/router.py +23 -0
  52. package/skills/trtc-ai-oral-coach/capabilities/reply-suggestion/manifest.yaml +49 -0
  53. package/skills/trtc-ai-oral-coach/capabilities/reply-suggestion/src/__init__.py +2 -0
  54. package/skills/trtc-ai-oral-coach/capabilities/reply-suggestion/src/adapters/__init__.py +2 -0
  55. package/skills/trtc-ai-oral-coach/capabilities/reply-suggestion/src/adapters/default.py +86 -0
  56. package/skills/trtc-ai-oral-coach/capabilities/reply-suggestion/src/handler.py +29 -0
  57. package/skills/trtc-ai-oral-coach/capabilities/reply-suggestion/src/router.py +23 -0
  58. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/data/practice-scenarios.json +500 -0
  59. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/manifest.yaml +54 -0
  60. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/src/__init__.py +2 -0
  61. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/src/adapters/__init__.py +2 -0
  62. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/src/adapters/default.py +113 -0
  63. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/src/compose.py +143 -0
  64. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/src/defaults.py +140 -0
  65. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/src/handler.py +29 -0
  66. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/src/router.py +22 -0
  67. package/skills/trtc-ai-oral-coach/capabilities/scenario-roleplay/src/scenario_source.py +179 -0
  68. package/skills/trtc-ai-oral-coach/references/design-specs.md +36 -0
  69. package/skills/trtc-ai-oral-coach/references/evaluator-port.md +75 -0
  70. package/skills/trtc-ai-oral-coach/scenarios/speaking-coach/recipe.yaml +86 -0
  71. package/skills/trtc-ai-oral-coach/scenarios/speaking-coach/ui/avatars/friend.png +0 -0
  72. package/skills/trtc-ai-oral-coach/scenarios/speaking-coach/ui/avatars/listener.png +0 -0
  73. package/skills/trtc-ai-oral-coach/scenarios/speaking-coach/ui/avatars/local.png +0 -0
  74. package/skills/trtc-ai-oral-coach/scenarios/speaking-coach/ui/coach.html +1986 -0
  75. package/skills/trtc-ai-oral-coach/scenarios/speaking-coach/ui/i18n.js +323 -0
  76. package/skills/trtc-ai-oral-coach/scenarios/speaking-coach/ui/practice-scenarios.json +500 -0
  77. package/skills/trtc-ai-oral-coach/scenarios/speaking-coach/ui/tokens.css +100 -0
  78. package/skills/trtc-ai-oral-coach/scripts/add-capability.py +256 -0
  79. package/skills/trtc-ai-oral-coach/scripts/verify-credentials.py +96 -0
  80. package/skills/trtc-ai-oral-coach/start.sh +59 -0
  81. package/skills/trtc-ai-oral-coach/triggers.yaml +32 -0
  82. package/skills/trtc-ai-service/README.ja.md +15 -32
  83. package/skills/trtc-ai-service/README.md +15 -32
  84. package/skills/trtc-ai-service/README.zh-CN.md +15 -32
  85. package/skills/trtc-ai-service/SKILL.md +188 -120
@@ -0,0 +1,500 @@
1
+ {
2
+ "meta": {
3
+ "travel": {
4
+ "title": "机场登机",
5
+ "tag": "TRAVEL",
6
+ "sub": "值机、安检、登机口",
7
+ "desc": "国际机场办理值机、托运行李、过安检的常用对话。",
8
+ "aiRoles": [
9
+ { "n": "Sarah", "r": "地勤" },
10
+ { "n": "Mike", "r": "安检员" },
11
+ { "n": "Linda", "r": "登机口工作人员" }
12
+ ],
13
+ "meRoles": [
14
+ { "n": "乘客", "r": "Solo" }
15
+ ],
16
+ "recommendedExpressions": [
17
+ { "en": "boarding pass", "zh": "登机牌" },
18
+ { "en": "baggage allowance", "zh": "行李额" },
19
+ { "en": "window or aisle", "zh": "靠窗/过道" },
20
+ { "en": "gate change", "zh": "登机口变动" }
21
+ ]
22
+ },
23
+ "work": {
24
+ "title": "项目周会",
25
+ "tag": "WORK",
26
+ "sub": "进度同步、异处处理",
27
+ "desc": "向团队成员同步项目进展、处理突发问题的职场沟通。",
28
+ "aiRoles": [
29
+ { "n": "David", "r": "项目经理" },
30
+ { "n": "Emma", "r": "产品经理" },
31
+ { "n": "Jason", "r": "开发负责人" }
32
+ ],
33
+ "meRoles": [
34
+ { "n": "我", "r": "团队成员" }
35
+ ],
36
+ "recommendedExpressions": [
37
+ { "en": "on track", "zh": "按计划进行" },
38
+ { "en": "blocker", "zh": "阻塞项" },
39
+ { "en": "action item", "zh": "待办事项" },
40
+ { "en": "follow up", "zh": "跟进" }
41
+ ]
42
+ },
43
+ "study": {
44
+ "title": "课堂讨论",
45
+ "tag": "STUDY",
46
+ "sub": "小组作业、观点辩论",
47
+ "desc": "校园里的小组讨论、作业讨论、课堂发言。",
48
+ "aiRoles": [
49
+ { "n": "Prof. Lee", "r": "授课老师" },
50
+ { "n": "Anna", "r": "同组同学" }
51
+ ],
52
+ "meRoles": [
53
+ { "n": "我", "r": "学生" }
54
+ ],
55
+ "recommendedExpressions": [
56
+ { "en": "from my perspective", "zh": "在我看来" },
57
+ { "en": "I see your point", "zh": "我理解你的意思" },
58
+ { "en": "to be honest", "zh": "说实话" },
59
+ { "en": "could you elaborate", "zh": "能展开说说吗" }
60
+ ]
61
+ },
62
+ "daily": {
63
+ "title": "咖啡店点单",
64
+ "tag": "DAILY",
65
+ "sub": "日常 · 闲聊",
66
+ "desc": "咖啡店点单、闲聊、推荐等轻松生活场景。",
67
+ "aiRoles": [
68
+ { "n": "Mia", "r": "咖啡师" },
69
+ { "n": "Leo", "r": "常客" }
70
+ ],
71
+ "meRoles": [
72
+ { "n": "我", "r": "顾客" }
73
+ ],
74
+ "recommendedExpressions": [
75
+ { "en": "for here or to go", "zh": "堂食还是外带" },
76
+ { "en": "can I get ...", "zh": "我要一份..." },
77
+ { "en": "what do you recommend", "zh": "你有什么推荐" },
78
+ { "en": "make it less sweet", "zh": "少糖" }
79
+ ]
80
+ },
81
+ "free": {
82
+ "title": "自由聊天",
83
+ "tag": "FREE",
84
+ "sub": "无主题、随性",
85
+ "desc": "想到什么聊什么,没有固定角色与场景。",
86
+ "aiRoles": [
87
+ { "n": "Alex", "r": "老朋友" }
88
+ ],
89
+ "meRoles": [
90
+ { "n": "我", "r": "本人" }
91
+ ],
92
+ "recommendedExpressions": [
93
+ { "en": "by the way", "zh": "顺便一提" },
94
+ { "en": "speaking of which", "zh": "说到这个" },
95
+ { "en": "I'm curious about", "zh": "我很好奇" },
96
+ { "en": "what's your take", "zh": "你怎么看" }
97
+ ]
98
+ }
99
+ },
100
+ "travel": {
101
+ "beginner": [
102
+ {
103
+ "id": "travel-b-1",
104
+ "topic": "Hotel check-in",
105
+ "hint": "checking into a hotel",
106
+ "opening": "Hi, welcome to The Grand Hotel. Do you have a reservation with us today?",
107
+ "aiRole": "A hotel front-desk clerk",
108
+ "myRole": "A guest checking in at the hotel"
109
+ },
110
+ {
111
+ "id": "travel-b-2",
112
+ "topic": "Ordering at a restaurant",
113
+ "hint": "ordering food at a restaurant",
114
+ "opening": "Hi there! Welcome. Are you ready to order, or would you like a few more minutes with the menu?",
115
+ "aiRole": "A restaurant server",
116
+ "myRole": "A diner ready to order"
117
+ },
118
+ {
119
+ "id": "travel-b-3",
120
+ "topic": "Asking for directions",
121
+ "hint": "asking a stranger for directions",
122
+ "opening": "Excuse me — you look a bit lost. Where are you trying to get to?",
123
+ "aiRole": "A friendly local on the street",
124
+ "myRole": "A traveler who got lost"
125
+ }
126
+ ],
127
+ "intermediate": [
128
+ {
129
+ "id": "travel-i-1",
130
+ "topic": "Rebooking a flight",
131
+ "hint": "rebooking a delayed flight",
132
+ "opening": "Hi, this is the airline service desk. I see your flight was delayed — how can I help you with rebooking today?",
133
+ "aiRole": "An airline service-desk agent",
134
+ "myRole": "A passenger whose flight was delayed"
135
+ },
136
+ {
137
+ "id": "travel-i-2",
138
+ "topic": "Reporting lost luggage",
139
+ "hint": "reporting lost luggage at the airport",
140
+ "opening": "Hello, baggage services. I understand your luggage didn't make it. Could you tell me what your bag looks like and which flight you were on?",
141
+ "aiRole": "A baggage-services staff member",
142
+ "myRole": "A passenger whose luggage is missing"
143
+ },
144
+ {
145
+ "id": "travel-i-3",
146
+ "topic": "Hotel complaint",
147
+ "hint": "complaining about a hotel room",
148
+ "opening": "Front desk, how can I help you? You mentioned there's an issue with your room — what's been going on?",
149
+ "aiRole": "A hotel front-desk clerk",
150
+ "myRole": "A guest reporting a room issue"
151
+ }
152
+ ],
153
+ "advanced": [
154
+ {
155
+ "id": "travel-a-1",
156
+ "topic": "Travel insurance claim",
157
+ "hint": "filing a travel insurance claim",
158
+ "opening": "Hello, you've reached travel insurance claims. I see you'd like to file a claim — could you walk me through what happened on your trip?",
159
+ "aiRole": "A travel-insurance claims officer",
160
+ "myRole": "A traveler filing a claim"
161
+ },
162
+ {
163
+ "id": "travel-a-2",
164
+ "topic": "Customs questioning",
165
+ "hint": "going through customs interview",
166
+ "opening": "Welcome. Could I see your passport please? What's the purpose of your visit, and how long do you plan to stay?",
167
+ "aiRole": "A customs officer",
168
+ "myRole": "A traveler going through customs"
169
+ },
170
+ {
171
+ "id": "travel-a-3",
172
+ "topic": "Cross-cultural misunderstanding",
173
+ "hint": "smoothing over a cultural misunderstanding",
174
+ "opening": "Hey, I noticed things got a bit awkward back there. I think there might've been a cultural mix-up — mind if we talk it through?",
175
+ "aiRole": "Someone from a different culture",
176
+ "myRole": "A traveler navigating an awkward moment"
177
+ }
178
+ ]
179
+ },
180
+ "work": {
181
+ "beginner": [
182
+ {
183
+ "id": "work-b-1",
184
+ "topic": "Self-introduction at a meeting",
185
+ "hint": "introducing yourself at a meeting",
186
+ "opening": "Hi everyone, glad to have a new face on the team. Why don't you go ahead and introduce yourself?",
187
+ "aiRole": "A teammate welcoming you",
188
+ "myRole": "A new team member"
189
+ },
190
+ {
191
+ "id": "work-b-2",
192
+ "topic": "Scheduling a meeting",
193
+ "hint": "scheduling a meeting with a colleague",
194
+ "opening": "Hey, I'd like to set up a quick sync with you this week. When works best on your end?",
195
+ "aiRole": "A colleague",
196
+ "myRole": "An employee scheduling a sync"
197
+ },
198
+ {
199
+ "id": "work-b-3",
200
+ "topic": "Lunch order with colleagues",
201
+ "hint": "deciding lunch with the team",
202
+ "opening": "Hey, we're ordering lunch in. What are you in the mood for today?",
203
+ "aiRole": "A colleague ordering lunch",
204
+ "myRole": "An employee picking a lunch order"
205
+ }
206
+ ],
207
+ "intermediate": [
208
+ {
209
+ "id": "work-i-1",
210
+ "topic": "Project status sync",
211
+ "hint": "giving a project status update",
212
+ "opening": "Hey, thanks for hopping on. Could you walk me through where things stand on the project this week?",
213
+ "aiRole": "Your manager",
214
+ "myRole": "An employee giving a project update"
215
+ },
216
+ {
217
+ "id": "work-i-2",
218
+ "topic": "Giving feedback to a teammate",
219
+ "hint": "giving feedback to a teammate",
220
+ "opening": "Hey, got a minute? I wanted to share some thoughts on how the last sprint went — open to a quick chat?",
221
+ "aiRole": "A teammate",
222
+ "myRole": "An employee giving constructive feedback"
223
+ },
224
+ {
225
+ "id": "work-i-3",
226
+ "topic": "Negotiating a deadline",
227
+ "hint": "negotiating a deadline with your manager",
228
+ "opening": "Sure, come on in. You said you wanted to talk about the timeline — what's on your mind?",
229
+ "aiRole": "Your manager",
230
+ "myRole": "An employee negotiating a timeline"
231
+ }
232
+ ],
233
+ "advanced": [
234
+ {
235
+ "id": "work-a-1",
236
+ "topic": "Salary negotiation",
237
+ "hint": "negotiating a salary offer",
238
+ "opening": "Thanks for taking the time. We'd love to bring you on board — let's talk numbers. What were you hoping to see in the offer?",
239
+ "aiRole": "A hiring manager",
240
+ "myRole": "A candidate discussing a job offer"
241
+ },
242
+ {
243
+ "id": "work-a-2",
244
+ "topic": "Job interview",
245
+ "hint": "answering a behavioural interview question",
246
+ "opening": "Welcome, thanks for coming in today. To kick things off — could you tell me about a recent project you're particularly proud of?",
247
+ "aiRole": "An interviewer",
248
+ "myRole": "A candidate in a behavioural interview"
249
+ },
250
+ {
251
+ "id": "work-a-3",
252
+ "topic": "Cross-team conflict resolution",
253
+ "hint": "resolving a cross-team conflict",
254
+ "opening": "Hey, thanks for joining. I know there's been some friction between our teams lately — can we walk through what's been going wrong?",
255
+ "aiRole": "A peer from another team",
256
+ "myRole": "An employee resolving cross-team friction"
257
+ }
258
+ ]
259
+ },
260
+ "study": {
261
+ "beginner": [
262
+ {
263
+ "id": "study-b-1",
264
+ "topic": "Explaining being late to class",
265
+ "hint": "explaining why you were late",
266
+ "opening": "Hi, you're a bit late today — everything alright?",
267
+ "aiRole": "Your teacher",
268
+ "myRole": "A student arriving late"
269
+ },
270
+ {
271
+ "id": "study-b-2",
272
+ "topic": "Asking the teacher for an extension",
273
+ "hint": "asking for a homework extension",
274
+ "opening": "Sure, what's up? Did you have a question about the assignment?",
275
+ "aiRole": "Your teacher",
276
+ "myRole": "A student asking for more time"
277
+ },
278
+ {
279
+ "id": "study-b-3",
280
+ "topic": "Discussing weekend homework",
281
+ "hint": "chatting with a classmate about homework",
282
+ "opening": "Hey! Did you finish the homework over the weekend? I got a bit stuck on one part.",
283
+ "aiRole": "A classmate",
284
+ "myRole": "A student comparing homework notes"
285
+ }
286
+ ],
287
+ "intermediate": [
288
+ {
289
+ "id": "study-i-1",
290
+ "topic": "Group project planning",
291
+ "hint": "planning a group project",
292
+ "opening": "Hey team, glad we're all here. Let's figure out how to split up the project — any thoughts on who wants to take what?",
293
+ "aiRole": "A teammate on the project",
294
+ "myRole": "A student planning group work"
295
+ },
296
+ {
297
+ "id": "study-i-2",
298
+ "topic": "Class debate",
299
+ "hint": "debating a topic in class",
300
+ "opening": "Alright, let's open this up. You're arguing in favour of remote learning — go ahead, make your case.",
301
+ "aiRole": "Your teacher moderating a debate",
302
+ "myRole": "A student arguing a position"
303
+ },
304
+ {
305
+ "id": "study-i-3",
306
+ "topic": "Presentation rehearsal",
307
+ "hint": "rehearsing a presentation with a friend",
308
+ "opening": "Okay, I'm your audience. Whenever you're ready, take it from the top — pretend it's the real thing.",
309
+ "aiRole": "A friend acting as the audience",
310
+ "myRole": "A student rehearsing a presentation"
311
+ }
312
+ ],
313
+ "advanced": [
314
+ {
315
+ "id": "study-a-1",
316
+ "topic": "Thesis viva defense",
317
+ "hint": "defending your thesis",
318
+ "opening": "Welcome. I've read your thesis with interest. Could you start by walking me through the central argument and why it matters?",
319
+ "aiRole": "A thesis committee examiner",
320
+ "myRole": "A student defending their thesis"
321
+ },
322
+ {
323
+ "id": "study-a-2",
324
+ "topic": "Cross-cultural classroom discussion",
325
+ "hint": "discussing differing cultural views in class",
326
+ "opening": "That's a really interesting perspective. I'm curious — how do you think someone from a different cultural background might read that situation?",
327
+ "aiRole": "A classmate from another culture",
328
+ "myRole": "A student sharing their perspective"
329
+ },
330
+ {
331
+ "id": "study-a-3",
332
+ "topic": "Academic disagreement",
333
+ "hint": "respectfully disagreeing with a peer's argument",
334
+ "opening": "I hear what you're saying, but I'm not sure I fully agree. Mind if I push back on one part of your argument?",
335
+ "aiRole": "A peer with an opposing view",
336
+ "myRole": "A student respectfully pushing back"
337
+ }
338
+ ]
339
+ },
340
+ "daily": {
341
+ "beginner": [
342
+ {
343
+ "id": "daily-b-1",
344
+ "topic": "Coffee shop order",
345
+ "hint": "ordering coffee at a local coffee shop",
346
+ "opening": "Hi there! Welcome to Brew & Co. What can I get started for you today?",
347
+ "aiRole": "A coffee shop barista",
348
+ "myRole": "A customer ordering coffee"
349
+ },
350
+ {
351
+ "id": "daily-b-2",
352
+ "topic": "Casual chat with barista",
353
+ "hint": "small talk while ordering",
354
+ "opening": "Hey! The usual today or are you feeling adventurous? We've got a new seasonal latte.",
355
+ "aiRole": "A friendly barista",
356
+ "myRole": "A regular customer chatting"
357
+ },
358
+ {
359
+ "id": "daily-b-3",
360
+ "topic": "Takeout order",
361
+ "hint": "ordering food to-go",
362
+ "opening": "Hi! Are you dining in or taking away today?",
363
+ "aiRole": "A restaurant staff member",
364
+ "myRole": "A customer ordering takeout"
365
+ }
366
+ ],
367
+ "intermediate": [
368
+ {
369
+ "id": "daily-i-1",
370
+ "topic": "Asking for recommendations",
371
+ "hint": "asking barista for drink recommendations",
372
+ "opening": "Good afternoon! If you're not sure what to get, I'm happy to recommend something based on what you usually like.",
373
+ "aiRole": "A barista",
374
+ "myRole": "A customer asking for a recommendation"
375
+ },
376
+ {
377
+ "id": "daily-i-2",
378
+ "topic": "Catching up with a regular",
379
+ "hint": "chatting with a familiar customer",
380
+ "opening": "Oh hey, long time no see! How have you been? The usual flat white?",
381
+ "aiRole": "A barista who knows the customer",
382
+ "myRole": "A regular customer catching up"
383
+ },
384
+ {
385
+ "id": "daily-i-3",
386
+ "topic": "Weekend plan chat",
387
+ "hint": "casual weekend conversation",
388
+ "opening": "Nice weather today, isn't it? Got any fun plans for the weekend?",
389
+ "aiRole": "A barista making small talk",
390
+ "myRole": "A customer chatting casually"
391
+ }
392
+ ],
393
+ "advanced": [
394
+ {
395
+ "id": "daily-a-1",
396
+ "topic": "Debating coffee preferences",
397
+ "hint": "discussing coffee culture",
398
+ "opening": "I see you're eyeing the single-origin Ethiopia — you into specialty coffee? What's your go-to brewing method at home?",
399
+ "aiRole": "A coffee-enthusiast barista",
400
+ "myRole": "A customer discussing coffee preferences"
401
+ },
402
+ {
403
+ "id": "daily-a-2",
404
+ "topic": "Cultural food discussion",
405
+ "hint": "talking about food culture differences",
406
+ "opening": "I've noticed you order the matcha every time. You must have spent some time in Japan — am I right?",
407
+ "aiRole": "An observant barista",
408
+ "myRole": "A customer discussing food culture"
409
+ },
410
+ {
411
+ "id": "daily-a-3",
412
+ "topic": "Giving life advice casually",
413
+ "hint": "casual heart-to-heart over coffee",
414
+ "opening": "You look like you've got a lot on your mind today. Sometimes a good latte and a chat is all you need — what's up?",
415
+ "aiRole": "A warm, chatty barista",
416
+ "myRole": "A customer having a casual heart-to-heart"
417
+ }
418
+ ]
419
+ },
420
+ "free": {
421
+ "beginner": [
422
+ {
423
+ "id": "free-b-1",
424
+ "topic": "Open chat",
425
+ "hint": "open chat",
426
+ "opening": "Hey! What's something that made you smile this week?",
427
+ "aiRole": "",
428
+ "myRole": ""
429
+ },
430
+ {
431
+ "id": "free-b-2",
432
+ "topic": "Open chat",
433
+ "hint": "open chat",
434
+ "opening": "Hi! If you could travel anywhere right now, where would it be?",
435
+ "aiRole": "",
436
+ "myRole": ""
437
+ },
438
+ {
439
+ "id": "free-b-3",
440
+ "topic": "Open chat",
441
+ "hint": "open chat",
442
+ "opening": "Hello! Tell me about something you're really into lately.",
443
+ "aiRole": "",
444
+ "myRole": ""
445
+ }
446
+ ],
447
+ "intermediate": [
448
+ {
449
+ "id": "free-i-1",
450
+ "topic": "Open chat",
451
+ "hint": "open chat",
452
+ "opening": "Hey! What's something that's been on your mind lately — work, life, or just a random thought worth chatting about?",
453
+ "aiRole": "",
454
+ "myRole": ""
455
+ },
456
+ {
457
+ "id": "free-i-2",
458
+ "topic": "Open chat",
459
+ "hint": "open chat",
460
+ "opening": "Hi there! If you had a free Saturday and zero obligations, how would you spend it?",
461
+ "aiRole": "",
462
+ "myRole": ""
463
+ },
464
+ {
465
+ "id": "free-i-3",
466
+ "topic": "Open chat",
467
+ "hint": "open chat",
468
+ "opening": "Hey! Tell me about a small habit you've picked up recently that you actually like.",
469
+ "aiRole": "",
470
+ "myRole": ""
471
+ }
472
+ ],
473
+ "advanced": [
474
+ {
475
+ "id": "free-a-1",
476
+ "topic": "Open chat",
477
+ "hint": "open chat",
478
+ "opening": "Hi! Pick any topic you'd like to dig into today — something you've been thinking about, debating with yourself, or just curious about.",
479
+ "aiRole": "",
480
+ "myRole": ""
481
+ },
482
+ {
483
+ "id": "free-a-2",
484
+ "topic": "Open chat",
485
+ "hint": "open chat",
486
+ "opening": "Hey! Is there an idea or belief you've changed your mind about over the past few years? I'd love to hear what shifted.",
487
+ "aiRole": "",
488
+ "myRole": ""
489
+ },
490
+ {
491
+ "id": "free-a-3",
492
+ "topic": "Open chat",
493
+ "hint": "open chat",
494
+ "opening": "Hello! If you could have a long, unhurried conversation with anyone — alive or not — who would it be, and what would you ask them?",
495
+ "aiRole": "",
496
+ "myRole": ""
497
+ }
498
+ ]
499
+ }
500
+ }
@@ -0,0 +1,54 @@
1
+ # scenario-roleplay —— 场景×难度×风格 → prompt 组装 + Setup 屏场景候选
2
+ name: scenario-roleplay
3
+ version: "1.0.0"
4
+ type: capability
5
+ description: "把场景/难度/风格组装成 in-character system prompt;Setup 屏具体场景候选:内置题库,装了 custom-learning-kb 则改用外接知识库(自动降级)。"
6
+
7
+ dependencies:
8
+ - { name: conversation-core, version: ">=1.0.0,<2.0.0" }
9
+ # custom-learning-kb 是可选依赖:装了就会被 scenario_source.py 消费,用于产出场景候选;
10
+ # 不装则纯用内置 data/practice-scenarios.json 题库,行为不受影响。
11
+ - { name: custom-learning-kb, version: ">=1.0.0,<2.0.0", optional: true }
12
+
13
+ extensions:
14
+ - inject_at: agent.system_prompt
15
+ inline_code: |
16
+ # [scenario-roleplay] 组装 in-character system prompt
17
+ from ._capability_loader import try_load_capability
18
+ _sr = try_load_capability("scenario-roleplay", "src/compose.py")
19
+ if _sr is not None:
20
+ system_prompt = _sr.compose(system_prompt, ctx) # ctx: scenario/level/style/role
21
+ - inject_at: server.router_extension
22
+ inline_code: |
23
+ from ._capability_loader import try_load_capability as _try
24
+ _m = _try("scenario-roleplay", "src/router.py")
25
+ if _m is not None and hasattr(_m, "router"):
26
+ app.include_router(_m.router, prefix="/api/v1/scene", tags=["scenario-roleplay"])
27
+
28
+ config:
29
+ scenarios_file: { default: "data/practice-scenarios.json" }
30
+ adapter: { default: "default", env: "SCENE_ADAPTER" } # default=内置 Evaluator
31
+
32
+ endpoints:
33
+ - method: POST
34
+ path: /api/v1/scene/candidates
35
+ description: "Setup 屏具体场景候选:没配 custom-learning-kb → 内置题库;配了 → 查询/提炼外接知识库,失败静默降级回内置题库。"
36
+
37
+ # 评估类能力 —— 共用 Evaluator Port(见 references/evaluator-port.md)
38
+ business_contract:
39
+ port_class: "src.ports.evaluator.Evaluator"
40
+ default_adapter: "src.adapters.default.LLMEvaluator"
41
+ customization_sop: "references/evaluator-port.md#1-evaluator-port"
42
+ external_apis:
43
+ - name: scene.candidates
44
+ direction: inbound # 我们暴露给前端调(非连外部系统;连外部系统的是 custom-learning-kb)
45
+ method: POST
46
+ path: /api/v1/scene/candidates
47
+ request_schema: { scenario: string, level: string }
48
+ response_schema: { candidates: "[{id, topic, hint, opening, aiRole, myRole}]" }
49
+
50
+ acceptance:
51
+ - "选场景/难度/风格后能组出 in-character system prompt"
52
+ - "GetSceneCandidates 未装 custom-learning-kb 时返回内置题库候选"
53
+ - "装了 custom-learning-kb 且配好 key 时返回外接知识库候选;检索/提炼失败静默降级回内置题库"
54
+
@@ -0,0 +1,2 @@
1
+ # -*- coding: utf-8 -*-
2
+ """scenario-roleplay 能力包。"""
@@ -0,0 +1,2 @@
1
+ # -*- coding: utf-8 -*-
2
+ """adapters 子包。"""