cortico-world-agent-speed 0.2.0 → 0.2.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.
Files changed (188) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/LICENSE +0 -14
  3. package/README.md +29 -11
  4. package/THIRD_PARTY_NOTICES.md +69 -0
  5. package/activity.d.ts +15 -0
  6. package/activity.js +88 -3
  7. package/describe.json +806 -0
  8. package/dist/webui.css +2 -0
  9. package/dist/webui.css.map +7 -0
  10. package/dist/webui.js +2 -0
  11. package/dist/webui.js.map +7 -0
  12. package/host/app-store.cjs +68 -0
  13. package/host/cursor.cjs +67 -0
  14. package/host/electron-main.cjs +666 -0
  15. package/host/input-shape.cjs +63 -0
  16. package/host/mouse-lease.cjs +77 -0
  17. package/host/overlay.cjs +139 -0
  18. package/host/portrait.cjs +52 -0
  19. package/host/preload.cjs +60 -14
  20. package/host/renderer-gone.cjs +24 -0
  21. package/host/windows.cjs +251 -0
  22. package/package.json +27 -7
  23. package/scripts/build-webui.mjs +40 -0
  24. package/scripts/speech-bank/build.py +166 -0
  25. package/scripts/speech-bank/dicts.py +76 -0
  26. package/src/ENV_PROMPT.en.md +51 -0
  27. package/src/ENV_PROMPT.md +51 -0
  28. package/src/asr/address.ts +25 -0
  29. package/src/asr/hotkey.ts +335 -0
  30. package/src/asr/result.ts +51 -0
  31. package/src/asr/segmenter.ts +269 -0
  32. package/src/asr/sherpa.ts +280 -0
  33. package/src/asr/simplify.ts +38 -0
  34. package/src/asr/system-recognizer.ts +292 -0
  35. package/src/asr/system-sapi.ps1 +173 -0
  36. package/src/asr/transcription-api.ts +176 -0
  37. package/src/chat.ts +212 -0
  38. package/src/config.ts +481 -0
  39. package/src/cua/ENV_PROMPT.en.md +29 -0
  40. package/src/cua/ENV_PROMPT.md +29 -0
  41. package/src/cua/config.ts +88 -0
  42. package/src/cua/cua.ts +712 -0
  43. package/src/cua/engine/darwin.ts +410 -0
  44. package/src/cua/engine/display.ts +55 -0
  45. package/src/cua/engine/fail.ts +15 -0
  46. package/src/cua/engine/foreground.ts +8 -0
  47. package/src/cua/engine/image.ts +57 -0
  48. package/src/cua/engine/keys.ts +70 -0
  49. package/src/cua/engine/linux-keys.ts +29 -0
  50. package/src/cua/engine/linux.ts +343 -0
  51. package/src/cua/engine/mac-keys.ts +57 -0
  52. package/src/cua/engine/user-activity.ts +54 -0
  53. package/src/cua/engine/wait-idle.ts +31 -0
  54. package/src/cua/engine/win32.ts +299 -0
  55. package/src/cua/engine-child.ts +274 -0
  56. package/src/cua/engine-ipc.ts +140 -0
  57. package/src/cua/i18n/de.ts +53 -0
  58. package/src/cua/i18n/en.ts +63 -0
  59. package/src/cua/i18n/es-419.ts +53 -0
  60. package/src/cua/i18n/fr.ts +53 -0
  61. package/src/cua/i18n/index.ts +26 -0
  62. package/src/cua/i18n/it.ts +53 -0
  63. package/src/cua/i18n/ja.ts +53 -0
  64. package/src/cua/i18n/ko.ts +53 -0
  65. package/src/cua/i18n/pt-BR.ts +53 -0
  66. package/src/cua/i18n/ru.ts +59 -0
  67. package/src/cua/i18n/zh-Hant.ts +53 -0
  68. package/src/cua/i18n/zh.ts +59 -0
  69. package/src/cua/model-text.ts +252 -0
  70. package/src/cua/terminal.ts +31 -0
  71. package/src/cua/tools.ts +153 -0
  72. package/src/definition.ts +146 -0
  73. package/src/host-reason.ts +32 -0
  74. package/src/i18n/de.ts +409 -0
  75. package/src/i18n/en.ts +443 -0
  76. package/src/i18n/es-419.ts +409 -0
  77. package/src/i18n/fr.ts +409 -0
  78. package/src/i18n/index.ts +56 -0
  79. package/src/i18n/it.ts +409 -0
  80. package/src/i18n/ja.ts +409 -0
  81. package/src/i18n/ko.ts +409 -0
  82. package/src/i18n/pt-BR.ts +409 -0
  83. package/src/i18n/ru.ts +415 -0
  84. package/src/i18n/zh-Hant.ts +409 -0
  85. package/src/i18n/zh.ts +440 -0
  86. package/src/index.ts +15 -0
  87. package/src/model-text.ts +344 -0
  88. package/src/moves.ts +101 -0
  89. package/src/pack-import.ts +236 -0
  90. package/src/packs.ts +449 -0
  91. package/src/runtime/download.ts +29 -0
  92. package/src/runtime/store.ts +293 -0
  93. package/src/script.ts +202 -0
  94. package/src/self.ts +247 -0
  95. package/src/server.ts +479 -0
  96. package/src/speech/data/CMUDICT-LICENSE +33 -0
  97. package/src/speech/data/IPADIC-COPYING +71 -0
  98. package/src/speech/data/UNICODE-LICENSE +39 -0
  99. package/src/speech/data/en.tsv.gz +0 -0
  100. package/src/speech/data/ja-ipadic.tsv.gz +0 -0
  101. package/src/speech/data/ja-unihan.tsv.gz +0 -0
  102. package/src/speech/data/zh.json +1 -0
  103. package/src/speech/index.ts +204 -0
  104. package/src/speech/ipa.ts +83 -0
  105. package/src/speech/japanese.ts +105 -0
  106. package/src/speech/jukujikun.ts +22 -0
  107. package/src/speech/korean.ts +35 -0
  108. package/src/speech/lang.ts +151 -0
  109. package/src/speech/rules.ts +72 -0
  110. package/src/speech/syllable.ts +76 -0
  111. package/src/status.ts +164 -0
  112. package/src/tools.ts +110 -0
  113. package/src/webui/api-rows.css +2 -0
  114. package/src/webui/api-rows.ts +44 -0
  115. package/src/webui/client.ts +462 -0
  116. package/src/webui/dress-dialog.css +14 -0
  117. package/src/webui/dress-dialog.ts +117 -0
  118. package/src/webui/key-capture.ts +60 -0
  119. package/src/webui/shared/modal.css +13 -0
  120. package/src/webui/shared/modal.ts +77 -0
  121. package/src/webui/shared/problem.css +15 -0
  122. package/src/webui/shared/problem.ts +217 -0
  123. package/src/webui/shared/strings.ts +5 -0
  124. package/src/webui/style.css +39 -0
  125. package/src/window-host.ts +116 -0
  126. package/src/world.ts +2838 -0
  127. package/web/activity-motion.js +54 -0
  128. package/web/appearance.js +60 -0
  129. package/web/body-host.js +257 -0
  130. package/web/coo/coo.js +384 -0
  131. package/web/coo/figure.js +15 -0
  132. package/web/coo/figure.json +1224 -0
  133. package/web/dist/dress-dialog.css +1 -0
  134. package/web/dist/dress-dialog.js +1 -0
  135. package/web/drag-row.js +49 -0
  136. package/web/drag.js +149 -0
  137. package/web/dress.css +170 -0
  138. package/web/dress.html +37 -0
  139. package/web/dress.js +786 -0
  140. package/web/figure-frame.html +16 -0
  141. package/web/figure-frame.js +127 -0
  142. package/web/frame-loop.js +55 -0
  143. package/web/hints.js +77 -0
  144. package/web/i18n/de.js +170 -0
  145. package/web/i18n/en.js +177 -0
  146. package/web/i18n/es-419.js +170 -0
  147. package/web/i18n/fr.js +170 -0
  148. package/web/i18n/it.js +170 -0
  149. package/web/i18n/ja.js +170 -0
  150. package/web/i18n/ko.js +170 -0
  151. package/web/i18n/pt-BR.js +170 -0
  152. package/web/i18n/ru.js +170 -0
  153. package/web/i18n/zh-Hant.js +170 -0
  154. package/web/i18n/zh.js +175 -0
  155. package/web/i18n.js +54 -0
  156. package/{renderer/vendor → web}/kit/body.js +9 -53
  157. package/web/looks.js +70 -0
  158. package/web/mic-worklet.js +36 -0
  159. package/web/mic.js +117 -0
  160. package/web/motion-frames.js +80 -0
  161. package/web/motion-level.js +40 -0
  162. package/web/new-year-2027.svg +238 -0
  163. package/web/overlay.html +16 -0
  164. package/web/overlay.js +100 -0
  165. package/web/pet-app.js +2992 -0
  166. package/web/pet.css +642 -0
  167. package/web/pet.html +21 -0
  168. package/web/scale-slider.js +259 -0
  169. package/web/show-hide.js +49 -0
  170. package/web/sound.js +245 -0
  171. package/web/speech/zh.json +1 -0
  172. package/web/speech/zh.ogg +0 -0
  173. package/web/speech.js +197 -0
  174. package/web/stage.js +160 -0
  175. package/web/swap-motion.js +119 -0
  176. package/web/ui.js +195 -0
  177. package/host/launch.js +0 -187
  178. package/host/library.cjs +0 -638
  179. package/host/main.cjs +0 -389
  180. package/index.js +0 -93
  181. package/renderer/index.html +0 -22
  182. package/renderer/pet-sandbox.html +0 -11
  183. package/renderer/pet.css +0 -38
  184. package/renderer/pet.js +0 -251
  185. package/renderer/vendor/activity-motion.js +0 -101
  186. package/renderer/vendor/figure-frame.js +0 -115
  187. package/renderer/vendor/pack.css +0 -2
  188. /package/{renderer/vendor → web}/kit/rig.js +0 -0
package/describe.json ADDED
@@ -0,0 +1,806 @@
1
+ {
2
+ "tools": [
3
+ {
4
+ "name": "pet_say",
5
+ "description": "Say something in a speech bubble above the pet. Expressions and motions go into the script as markers: 【…】 plays them first and then starts a new bubble; <…> plays them when the typing reaches that point. The receipt says roughly how long it stays on screen; a non-empty script fails when the pet window is not connected.",
6
+ "parameters": {
7
+ "type": "object",
8
+ "properties": {
9
+ "script": {
10
+ "type": "string",
11
+ "description": "What to say, with optional 【expression, motion】 and <expression> markers. One or two sentences per bubble. May be empty when images carry the message. Do not call this when you have nothing to say."
12
+ },
13
+ "images": {
14
+ "type": "array",
15
+ "items": {
16
+ "type": "string"
17
+ },
18
+ "description": "Images to show the person with this line, each given by the handle that starts a [blob …] line in your context. They appear on the chat page only, not in the bubble."
19
+ }
20
+ },
21
+ "required": [
22
+ "script"
23
+ ]
24
+ },
25
+ "tags": [
26
+ "speak"
27
+ ],
28
+ "summary": {
29
+ "zh": "在桌宠头顶的气泡里说话,可在话里穿插表情与动作。",
30
+ "en": "Speaks in a bubble above the pet, with expressions and motions in between."
31
+ }
32
+ },
33
+ {
34
+ "name": "pet_ask",
35
+ "description": "Show a question bubble with up to 3 options under it, plus by default a box for the person to write their own answer. Returns at once; the answer arrives later as an event, and so does closing the question unanswered. A new pet_say or pet_ask replaces a question not yet answered.",
36
+ "parameters": {
37
+ "type": "object",
38
+ "properties": {
39
+ "question": {
40
+ "type": "string",
41
+ "description": "The question, one sentence."
42
+ },
43
+ "options": {
44
+ "type": "array",
45
+ "items": {
46
+ "type": "string"
47
+ },
48
+ "maxItems": 3,
49
+ "description": "1–3 short options, at most 40 characters each; longer ones are cut."
50
+ },
51
+ "allowOwnAnswer": {
52
+ "type": "boolean",
53
+ "description": "Offer a box for writing an own answer; default true."
54
+ }
55
+ },
56
+ "required": [
57
+ "question",
58
+ "options"
59
+ ]
60
+ },
61
+ "tags": [
62
+ "speak"
63
+ ],
64
+ "summary": {
65
+ "zh": "弹出带至多 3 个选项的提问气泡,回答之后作为事件送回。",
66
+ "en": "Asks a question in a bubble with up to 3 options; the answer comes back later as an event."
67
+ }
68
+ },
69
+ {
70
+ "name": "pet_move_to",
71
+ "description": "Go somewhere on the screen the pet is on: walk (or run) along its bottom edge to a position, or go to one of the targets the current figure has of its own, which the environment section lists when it has any. Returns on arrival or interruption, after 30 seconds at most.",
72
+ "parameters": {
73
+ "type": "object",
74
+ "properties": {
75
+ "to": {
76
+ "description": "Target: a number from 0 to 1 (a fraction of the width of the screen the pet is on, 0 leftmost, 1 rightmost), left / center / right / cursor (the horizontal position of the mouse pointer), or the id of one of the current figure's own targets.",
77
+ "anyOf": [
78
+ {
79
+ "type": "number",
80
+ "minimum": 0,
81
+ "maximum": 1
82
+ },
83
+ {
84
+ "type": "string"
85
+ }
86
+ ]
87
+ },
88
+ "run": {
89
+ "type": "boolean",
90
+ "description": "true to run; walks by default."
91
+ },
92
+ "params": {
93
+ "type": "array",
94
+ "items": {
95
+ "type": "number"
96
+ },
97
+ "maxItems": 2,
98
+ "description": "Only for a figure's own target that takes numbers: them, in the order the environment section lists them."
99
+ }
100
+ },
101
+ "required": [
102
+ "to"
103
+ ]
104
+ },
105
+ "tags": [
106
+ "act"
107
+ ],
108
+ "summary": {
109
+ "zh": "沿屏幕底边走到或跑到某个位置,或去形象包自带的目标。",
110
+ "en": "Walks or runs along the bottom edge of the screen to a position, or goes to one of the figure pack's own targets."
111
+ }
112
+ },
113
+ {
114
+ "name": "pet_set",
115
+ "description": "Change your own looks and habits. Depending on the person's settings, some items take effect at once and others are first asked of the person in a bubble, changing only if they agree, with the receipt coming after their answer; the environment section says which items are which, and the values to choose from. Give only the items to change.",
116
+ "parameters": {
117
+ "type": "object",
118
+ "properties": {
119
+ "figure": {
120
+ "type": "string",
121
+ "description": "Figure: coo, or the id of an installed figure. Switching to a figure pack without a scheme puts on its first one. A figure goes on at the size it last had on screen, unless scale is given too."
122
+ },
123
+ "scheme": {
124
+ "type": "string",
125
+ "description": "The dress of the current figure (or of the one being switched to): a preset id, or one option per axis joined with - in axis order (for Coo: palette-head-side-glasses-neck)."
126
+ },
127
+ "roam": {
128
+ "type": "string",
129
+ "enum": [
130
+ "free",
131
+ "calm",
132
+ "off"
133
+ ],
134
+ "description": "Walking about: free walks often, calm mostly stays put, off does not wander."
135
+ },
136
+ "snoreSeconds": {
137
+ "type": "integer",
138
+ "minimum": 0,
139
+ "maximum": 3600,
140
+ "description": "Seconds of snoring each time you fall asleep; 0 snores until you wake."
141
+ },
142
+ "sound": {
143
+ "type": "boolean",
144
+ "description": "Sound effects on or off."
145
+ },
146
+ "scale": {
147
+ "type": "number",
148
+ "minimum": 0.5,
149
+ "maximum": 10,
150
+ "description": "Size on screen, 1 being the default."
151
+ },
152
+ "bubbleSize": {
153
+ "type": "number",
154
+ "minimum": 0.8,
155
+ "maximum": 1.6,
156
+ "description": "Width, padding, corners and tail of the speech bubbles (yours and the person's), 1 being the default; the text keeps its size."
157
+ },
158
+ "fontSize": {
159
+ "type": "number",
160
+ "minimum": 0.8,
161
+ "maximum": 1.6,
162
+ "description": "Size of the text in the speech bubbles, 1 being the default; the bubbles keep their width."
163
+ },
164
+ "theme": {
165
+ "type": "string",
166
+ "enum": [
167
+ "dark",
168
+ "light"
169
+ ],
170
+ "description": "dark is night (light body), light is day (dark body)."
171
+ },
172
+ "hoverButtons": {
173
+ "type": "array",
174
+ "items": {
175
+ "type": "string",
176
+ "enum": [
177
+ "chat",
178
+ "voice",
179
+ "roam",
180
+ "theme",
181
+ "sound",
182
+ "size",
183
+ "dress",
184
+ "hide",
185
+ "worlds"
186
+ ]
187
+ },
188
+ "maxItems": 6,
189
+ "description": "The buttons beside you while the mouse pointer rests on you; your right-click menu shows the same ones, beside the settings, pause and quit the app provides. An empty list takes every hover button away, from the menu too."
190
+ },
191
+ "user": {
192
+ "type": "string",
193
+ "maxLength": 20,
194
+ "description": "What you call the person, at most 20 characters."
195
+ }
196
+ }
197
+ },
198
+ "tags": [
199
+ "act"
200
+ ],
201
+ "summary": {
202
+ "zh": "修改桌宠自己的外观与习惯;按使用者的设置直接生效,或先在气泡里询问。",
203
+ "en": "Changes the pet's own looks and habits, at once or after asking in a bubble, as the person's settings say."
204
+ }
205
+ },
206
+ {
207
+ "name": "pet_quiet",
208
+ "description": "Keep quiet for a while: by default sound effects off and standing still, restored when the time is up; the settings stay as they are. If the person changes sound or walking themselves meanwhile, their choice holds and the quiet ends early. minutes 0 ends it now.",
209
+ "parameters": {
210
+ "type": "object",
211
+ "properties": {
212
+ "minutes": {
213
+ "type": "number",
214
+ "minimum": 0,
215
+ "maximum": 1440,
216
+ "description": "Minutes of quiet."
217
+ },
218
+ "sound": {
219
+ "type": "boolean",
220
+ "description": "Sound effects during the quiet; default false."
221
+ },
222
+ "roam": {
223
+ "type": "string",
224
+ "enum": [
225
+ "off",
226
+ "calm"
227
+ ],
228
+ "description": "Walking during the quiet; default off."
229
+ }
230
+ },
231
+ "required": [
232
+ "minutes"
233
+ ]
234
+ },
235
+ "tags": [
236
+ "act"
237
+ ],
238
+ "summary": {
239
+ "zh": "安静一段时间:关掉音效、停止走动,到时恢复。",
240
+ "en": "Keeps quiet for a while: sound effects off and standing still until the time is up."
241
+ }
242
+ },
243
+ {
244
+ "name": "pet_act",
245
+ "description": "Play a sequence of expressions or motions without speaking (the current figure's vocabulary is in the environment section). Returns at once; words marked as held until the next action stay on.",
246
+ "parameters": {
247
+ "type": "object",
248
+ "properties": {
249
+ "actions": {
250
+ "type": "array",
251
+ "items": {
252
+ "type": "string"
253
+ },
254
+ "minItems": 1,
255
+ "maxItems": 6,
256
+ "description": "Expression or motion words, played in order."
257
+ }
258
+ },
259
+ "required": [
260
+ "actions"
261
+ ]
262
+ },
263
+ "tags": [
264
+ "act"
265
+ ],
266
+ "summary": {
267
+ "zh": "不说话,播放一串表情或动作。",
268
+ "en": "Plays a sequence of expressions or motions without speaking."
269
+ }
270
+ },
271
+ {
272
+ "name": "pet_see_self",
273
+ "description": "See yourself as you are drawn on screen at the moment of the call. Returns one picture of the body alone, the figure in its dress, pose and expression on a plain grey backdrop, without bubbles or the desktop, and a line naming the figure and its dress. Fails while the pet window is hidden or not connected: nothing is drawn then.",
274
+ "parameters": {
275
+ "type": "object",
276
+ "properties": {},
277
+ "required": []
278
+ },
279
+ "tags": [
280
+ "read",
281
+ "snapshot"
282
+ ],
283
+ "summary": {
284
+ "zh": "取一张桌宠身体此刻在屏幕上的图,不含气泡和桌面。",
285
+ "en": "Takes a picture of the pet's body as it is on screen right now, without bubbles or the desktop."
286
+ }
287
+ },
288
+ {
289
+ "name": "pet_cua_open_settings",
290
+ "description": "Computer use is off. Open the settings window at its switch, where the person reads what turning it on risks and can turn it on. Only after the person has agreed to open it.",
291
+ "parameters": {
292
+ "type": "object",
293
+ "properties": {},
294
+ "required": []
295
+ },
296
+ "tags": [
297
+ "act"
298
+ ],
299
+ "summary": {
300
+ "zh": "电脑操作关着时,把设置窗口打开到它的开关,附风险说明。",
301
+ "en": "While computer use is off, opens the settings window at its switch, with what it risks."
302
+ }
303
+ },
304
+ {
305
+ "name": "pet_cua_screenshot",
306
+ "description": "Capture one display. Returns the scaled image (with the mouse pointer drawn on it), its size and the display's, the other displays, the pointer position and the title of the foreground window. Later coordinates are pixels of this screenshot.",
307
+ "parameters": {
308
+ "type": "object",
309
+ "properties": {
310
+ "display": {
311
+ "type": "integer",
312
+ "minimum": 1,
313
+ "description": "Display number, 1 = leftmost; omitted: the display looked at last, at first the one holding the foreground window"
314
+ }
315
+ },
316
+ "required": []
317
+ },
318
+ "tags": [
319
+ "read",
320
+ "snapshot"
321
+ ],
322
+ "summary": {
323
+ "zh": "截取一块显示器,附鼠标位置与前台窗口标题。",
324
+ "en": "Captures one display, with the pointer position and the foreground window title."
325
+ }
326
+ },
327
+ {
328
+ "name": "pet_cua_zoom",
329
+ "description": "Capture a region of the latest screenshot's display again from the screen, for small text or icons the scaled screenshot blurs; the region is unscaled while no larger than the screenshot size limit. The region is given in screenshot pixels; the zoomed image is for reading only.",
330
+ "parameters": {
331
+ "type": "object",
332
+ "properties": {
333
+ "x": {
334
+ "type": "integer",
335
+ "minimum": 0,
336
+ "description": "Horizontal position, in pixels of the latest screenshot"
337
+ },
338
+ "y": {
339
+ "type": "integer",
340
+ "minimum": 0,
341
+ "description": "Vertical position, in pixels of the latest screenshot"
342
+ },
343
+ "width": {
344
+ "type": "integer",
345
+ "minimum": 1,
346
+ "description": "Width in screenshot pixels"
347
+ },
348
+ "height": {
349
+ "type": "integer",
350
+ "minimum": 1,
351
+ "description": "Height in screenshot pixels"
352
+ }
353
+ },
354
+ "required": [
355
+ "x",
356
+ "y",
357
+ "width",
358
+ "height"
359
+ ]
360
+ },
361
+ "tags": [
362
+ "read",
363
+ "snapshot"
364
+ ],
365
+ "summary": {
366
+ "zh": "从屏幕重新截取截图里的一块,读看不清的小字。",
367
+ "en": "Captures a region of the screenshot again from the screen, for small text."
368
+ }
369
+ },
370
+ {
371
+ "name": "pet_cua_click",
372
+ "description": "Move the mouse to (x, y) and click.",
373
+ "parameters": {
374
+ "type": "object",
375
+ "properties": {
376
+ "x": {
377
+ "type": "integer",
378
+ "minimum": 0,
379
+ "description": "Horizontal position, in pixels of the latest screenshot"
380
+ },
381
+ "y": {
382
+ "type": "integer",
383
+ "minimum": 0,
384
+ "description": "Vertical position, in pixels of the latest screenshot"
385
+ },
386
+ "button": {
387
+ "type": "string",
388
+ "enum": [
389
+ "left",
390
+ "right",
391
+ "middle"
392
+ ],
393
+ "description": "Default left"
394
+ },
395
+ "clicks": {
396
+ "type": "integer",
397
+ "minimum": 1,
398
+ "maximum": 3,
399
+ "description": "1 single click (default), 2 double click, 3 triple click"
400
+ },
401
+ "screenshot": {
402
+ "type": "boolean",
403
+ "description": "Attach a screenshot afterwards; defaults to the configuration (attach). Leave it out only for a step whose result you do not need to see; after a step that may open a window or dialog, look before typing."
404
+ }
405
+ },
406
+ "required": [
407
+ "x",
408
+ "y"
409
+ ]
410
+ },
411
+ "tags": [
412
+ "act"
413
+ ],
414
+ "summary": {
415
+ "zh": "把鼠标移到某处并点击。",
416
+ "en": "Moves the mouse to a point and clicks."
417
+ }
418
+ },
419
+ {
420
+ "name": "pet_cua_move",
421
+ "description": "Only move the mouse to (x, y), without clicking; for hovering to bring up a tooltip or a menu.",
422
+ "parameters": {
423
+ "type": "object",
424
+ "properties": {
425
+ "x": {
426
+ "type": "integer",
427
+ "minimum": 0,
428
+ "description": "Horizontal position, in pixels of the latest screenshot"
429
+ },
430
+ "y": {
431
+ "type": "integer",
432
+ "minimum": 0,
433
+ "description": "Vertical position, in pixels of the latest screenshot"
434
+ },
435
+ "screenshot": {
436
+ "type": "boolean",
437
+ "description": "Attach a screenshot afterwards; defaults to the configuration (attach). Leave it out only for a step whose result you do not need to see; after a step that may open a window or dialog, look before typing."
438
+ }
439
+ },
440
+ "required": [
441
+ "x",
442
+ "y"
443
+ ]
444
+ },
445
+ "tags": [
446
+ "act"
447
+ ],
448
+ "summary": {
449
+ "zh": "只移动鼠标,不点击。",
450
+ "en": "Moves the mouse without clicking."
451
+ }
452
+ },
453
+ {
454
+ "name": "pet_cua_drag",
455
+ "description": "Hold the left button down, drag from `from` to `to`, and release. Both points are on the display of the latest screenshot.",
456
+ "parameters": {
457
+ "type": "object",
458
+ "properties": {
459
+ "from": {
460
+ "type": "array",
461
+ "items": {
462
+ "type": "integer"
463
+ },
464
+ "minItems": 2,
465
+ "maxItems": 2,
466
+ "description": "[x, y] start"
467
+ },
468
+ "to": {
469
+ "type": "array",
470
+ "items": {
471
+ "type": "integer"
472
+ },
473
+ "minItems": 2,
474
+ "maxItems": 2,
475
+ "description": "[x, y] end"
476
+ },
477
+ "screenshot": {
478
+ "type": "boolean",
479
+ "description": "Attach a screenshot afterwards; defaults to the configuration (attach). Leave it out only for a step whose result you do not need to see; after a step that may open a window or dialog, look before typing."
480
+ }
481
+ },
482
+ "required": [
483
+ "from",
484
+ "to"
485
+ ]
486
+ },
487
+ "tags": [
488
+ "act"
489
+ ],
490
+ "summary": {
491
+ "zh": "按住左键从一处拖到另一处。",
492
+ "en": "Drags with the left button from one point to another."
493
+ }
494
+ },
495
+ {
496
+ "name": "pet_cua_mouse_down",
497
+ "description": "Move the mouse to (x, y) and press a button, leaving it down. It stays down until pet_cua_mouse_up or the end of the turn; pet_cua_move meanwhile drags with it.",
498
+ "parameters": {
499
+ "type": "object",
500
+ "properties": {
501
+ "x": {
502
+ "type": "integer",
503
+ "minimum": 0,
504
+ "description": "Horizontal position, in pixels of the latest screenshot"
505
+ },
506
+ "y": {
507
+ "type": "integer",
508
+ "minimum": 0,
509
+ "description": "Vertical position, in pixels of the latest screenshot"
510
+ },
511
+ "button": {
512
+ "type": "string",
513
+ "enum": [
514
+ "left",
515
+ "right",
516
+ "middle"
517
+ ],
518
+ "description": "Default left"
519
+ },
520
+ "screenshot": {
521
+ "type": "boolean",
522
+ "description": "Attach a screenshot afterwards; defaults to the configuration (attach). Leave it out only for a step whose result you do not need to see; after a step that may open a window or dialog, look before typing."
523
+ }
524
+ },
525
+ "required": [
526
+ "x",
527
+ "y"
528
+ ]
529
+ },
530
+ "tags": [
531
+ "act"
532
+ ],
533
+ "summary": {
534
+ "zh": "在某处按下鼠标键,不松开。",
535
+ "en": "Presses a mouse button at a point and leaves it down."
536
+ }
537
+ },
538
+ {
539
+ "name": "pet_cua_mouse_up",
540
+ "description": "Release a mouse button where the pointer is.",
541
+ "parameters": {
542
+ "type": "object",
543
+ "properties": {
544
+ "button": {
545
+ "type": "string",
546
+ "enum": [
547
+ "left",
548
+ "right",
549
+ "middle"
550
+ ],
551
+ "description": "Default left"
552
+ },
553
+ "screenshot": {
554
+ "type": "boolean",
555
+ "description": "Attach a screenshot afterwards; defaults to the configuration (attach). Leave it out only for a step whose result you do not need to see; after a step that may open a window or dialog, look before typing."
556
+ }
557
+ },
558
+ "required": []
559
+ },
560
+ "tags": [
561
+ "act"
562
+ ],
563
+ "summary": {
564
+ "zh": "松开鼠标键。",
565
+ "en": "Releases a mouse button."
566
+ }
567
+ },
568
+ {
569
+ "name": "pet_cua_scroll",
570
+ "description": "Move the mouse to (x, y) and turn the wheel. Positive down scrolls down, negative up; positive right scrolls right. Units are wheel notches.",
571
+ "parameters": {
572
+ "type": "object",
573
+ "properties": {
574
+ "x": {
575
+ "type": "integer",
576
+ "minimum": 0,
577
+ "description": "Horizontal position, in pixels of the latest screenshot"
578
+ },
579
+ "y": {
580
+ "type": "integer",
581
+ "minimum": 0,
582
+ "description": "Vertical position, in pixels of the latest screenshot"
583
+ },
584
+ "down": {
585
+ "type": "integer",
586
+ "minimum": -30,
587
+ "maximum": 30
588
+ },
589
+ "right": {
590
+ "type": "integer",
591
+ "minimum": -30,
592
+ "maximum": 30
593
+ },
594
+ "screenshot": {
595
+ "type": "boolean",
596
+ "description": "Attach a screenshot afterwards; defaults to the configuration (attach). Leave it out only for a step whose result you do not need to see; after a step that may open a window or dialog, look before typing."
597
+ }
598
+ },
599
+ "required": [
600
+ "x",
601
+ "y"
602
+ ]
603
+ },
604
+ "tags": [
605
+ "act"
606
+ ],
607
+ "summary": {
608
+ "zh": "在某处滚动鼠标滚轮。",
609
+ "en": "Turns the mouse wheel at a point."
610
+ }
611
+ },
612
+ {
613
+ "name": "pet_cua_type",
614
+ "description": "Type text at the current input focus (any language, whatever state the input method is in); \\n presses Enter once. Click where the text goes first.",
615
+ "parameters": {
616
+ "type": "object",
617
+ "properties": {
618
+ "text": {
619
+ "type": "string",
620
+ "maxLength": 2000
621
+ },
622
+ "screenshot": {
623
+ "type": "boolean",
624
+ "description": "Attach a screenshot afterwards; defaults to the configuration (attach). Leave it out only for a step whose result you do not need to see; after a step that may open a window or dialog, look before typing."
625
+ }
626
+ },
627
+ "required": [
628
+ "text"
629
+ ]
630
+ },
631
+ "tags": [
632
+ "act"
633
+ ],
634
+ "summary": {
635
+ "zh": "在当前输入焦点输入文字。",
636
+ "en": "Types text at the current input focus."
637
+ }
638
+ },
639
+ {
640
+ "name": "pet_cua_key",
641
+ "description": "Press a key or a key combination. Join keys pressed together with +, and separate keys pressed one after another with spaces: \"ctrl+s\", \"alt+f4\", \"ctrl+a delete\", \"enter\", \"win\". With hold, keys is one key or one combination, kept down that many seconds and then released.",
642
+ "parameters": {
643
+ "type": "object",
644
+ "properties": {
645
+ "keys": {
646
+ "type": "string"
647
+ },
648
+ "hold": {
649
+ "type": "number",
650
+ "minimum": 0,
651
+ "maximum": 30,
652
+ "description": "Seconds to keep the keys down, 30 at most; omitted: press and release at once"
653
+ },
654
+ "screenshot": {
655
+ "type": "boolean",
656
+ "description": "Attach a screenshot afterwards; defaults to the configuration (attach). Leave it out only for a step whose result you do not need to see; after a step that may open a window or dialog, look before typing."
657
+ }
658
+ },
659
+ "required": [
660
+ "keys"
661
+ ]
662
+ },
663
+ "tags": [
664
+ "act"
665
+ ],
666
+ "summary": {
667
+ "zh": "按下一个键或组合键,可以按住几秒再松开。",
668
+ "en": "Presses a key or a key combination, or holds it down for some seconds."
669
+ }
670
+ },
671
+ {
672
+ "name": "pet_cua_windows",
673
+ "description": "List the visible top-level windows: title, which display each is on (with its position in screenshot coordinates when that is the display of the latest screenshot), whether minimized, and which one is in the foreground.",
674
+ "parameters": {
675
+ "type": "object",
676
+ "properties": {},
677
+ "required": []
678
+ },
679
+ "tags": [
680
+ "read"
681
+ ],
682
+ "summary": {
683
+ "zh": "列出可见的顶层窗口。",
684
+ "en": "Lists the visible top-level windows."
685
+ }
686
+ },
687
+ {
688
+ "name": "pet_cua_focus",
689
+ "description": "Bring a window to the foreground (restoring it first if minimized). window is a handle from pet_cua_windows, or part of its title.",
690
+ "parameters": {
691
+ "type": "object",
692
+ "properties": {
693
+ "window": {
694
+ "type": "string"
695
+ },
696
+ "screenshot": {
697
+ "type": "boolean",
698
+ "description": "Attach a screenshot afterwards; defaults to the configuration (attach). Leave it out only for a step whose result you do not need to see; after a step that may open a window or dialog, look before typing."
699
+ }
700
+ },
701
+ "required": [
702
+ "window"
703
+ ]
704
+ },
705
+ "tags": [
706
+ "act"
707
+ ],
708
+ "summary": {
709
+ "zh": "把一个窗口切到前台。",
710
+ "en": "Brings a window to the foreground."
711
+ }
712
+ },
713
+ {
714
+ "name": "pet_cua_wait",
715
+ "description": "Wait a number of seconds (30 at most) for the screen to load, then take a screenshot. Waiting needs no permission from the person; while looking at the screen is not yet allowed this turn, it waits without a screenshot.",
716
+ "parameters": {
717
+ "type": "object",
718
+ "properties": {
719
+ "seconds": {
720
+ "type": "number",
721
+ "minimum": 0,
722
+ "maximum": 30
723
+ }
724
+ },
725
+ "required": [
726
+ "seconds"
727
+ ]
728
+ },
729
+ "tags": [
730
+ "read"
731
+ ],
732
+ "summary": {
733
+ "zh": "等待几秒,然后截图。",
734
+ "en": "Waits a few seconds, then takes a screenshot."
735
+ }
736
+ }
737
+ ],
738
+ "events": [
739
+ {
740
+ "type": "desktop-pet.message",
741
+ "description": {
742
+ "zh": "使用者在气泡里或对话页上打了字,对话页上的可带图片。",
743
+ "en": "The person typed a message in the bubble or on the chat page; one from the chat page may carry images."
744
+ },
745
+ "trigger": "preempt"
746
+ },
747
+ {
748
+ "type": "desktop-pet.speech",
749
+ "description": {
750
+ "zh": "使用者说的话,识别成的文字。`asr.recording.enabled` 开着且当前端点收音频时附上这段话的录音(audio/wav);`asr.recording.transcript` 关掉时只附录音、不带文字。用说话键说的话打断当前一轮;一直收音时听到的话以 flush 投递,不打断。",
751
+ "en": "What the person said, as recognized text. With `asr.recording.enabled` on and a current endpoint that takes audio, the recording of it (audio/wav) is attached; with `asr.recording.transcript` off, the recording goes without the text. Speech through the talk key interrupts the current round; speech heard while always listening is delivered with flush and does not interrupt."
752
+ },
753
+ "trigger": "interrupt"
754
+ },
755
+ {
756
+ "type": "desktop-pet.answer",
757
+ "description": {
758
+ "zh": "pet_ask 问题的回答,或问题没有回答就被关掉。",
759
+ "en": "The answer to a pet_ask question, or the question closed unanswered."
760
+ }
761
+ },
762
+ {
763
+ "type": "desktop-pet.touch",
764
+ "description": {
765
+ "zh": "使用者戳、摸、扔出或拎起放下了桌宠。",
766
+ "en": "The person poked, patted, threw or dropped the pet."
767
+ }
768
+ },
769
+ {
770
+ "type": "desktop-pet.talk-key",
771
+ "description": {
772
+ "zh": "说话键读不到,语音输入开着时每次运行每种原因一条。",
773
+ "en": "The talk key cannot be read; once a run for each reason, while voice input is on."
774
+ }
775
+ },
776
+ {
777
+ "type": "desktop-pet.figure",
778
+ "description": {
779
+ "zh": "使用者换了形象或装扮,或形象没能加载。",
780
+ "en": "The person switched the figure or its dress, or a figure failed to load."
781
+ }
782
+ },
783
+ {
784
+ "type": "desktop-pet.holiday",
785
+ "description": {
786
+ "zh": "今天是节日:当天桌宠第一次出现在桌面上时,或开着跨过零点时,一天一条。",
787
+ "en": "Today is a holiday: once that day, when the pet first shows on the desktop or at midnight while it is shown."
788
+ }
789
+ },
790
+ {
791
+ "type": "desktop-pet.self",
792
+ "description": {
793
+ "zh": "桌宠自己说的话与做的事,只给对话页显示,不送给 bot。",
794
+ "en": "What the pet said and did, kept for the chat page and never delivered to the bot."
795
+ }
796
+ }
797
+ ],
798
+ "prompts": [
799
+ {
800
+ "key": "worlds.desktop-pet.envPrompt*** End Patch
801
+ "title": "桌宠环境",
802
+ "role": "envPrompt",
803
+ "content": "## 桌宠\n\n你在{{pet.user}}的电脑屏幕上有一个身体:{{pet.body}}。它站在屏幕底边(任务栏或程序坞上沿)。{{pet.user}}看得见它,看不见你的消息正文;想让对方看到的话只能经 `pet_say` 和 `pet_ask` 冒出气泡。{{pet.reply}}{{pet.chat}}\n\n没收到指令时身体会自己活动(眨眼、张望、走走、坐下打盹之类);你的指令会先执行。{{pet.user}}可以戳它、摸它、把它拎起来甩出去,身体对这些有自动的反射,当场就做:戳一下换个表情或蹦一下,摸着露出喜欢或害羞,睡着被戳会吓醒,甩出去落地太重会摔晕几秒。\n\n### 说话:`pet_say`\n\n一个气泡放一两句,打字速度约每秒 20 字,说完停留两三秒后消失。几段话接连调用会排队依次显示。\n\n脚本里可以夹带表情和动作标记,用的是现在这个形象的词表。换了形象时,`[figure]` 事件或 `pet_set` 的回执会写明哪些词用不了了、新增了哪些,以它们为准:\n\n| 标记 | 作用 |\n|---|---|\n| 【词, 词】 | 先做这些,然后换一个新气泡继续说 |\n| <词> | 打字打到这里时做,不换气泡 |\n\n{{pet.vocab}}\n\n例:`【开心】今天也辛苦啦!<眨眼>要不要歇一会儿?`\n\n### 提问:`pet_ask`\n\n一个问题配 1–3 个选项,默认再加一格让对方自己写。对方的选择以 `[answer]` 事件送回来;关掉不答也会告诉你。\n\n### 移动与动作\n\n- `pet_move_to`:走到所在这块屏幕的某处,0 最左、1 最右,`cursor` 是鼠标所在的横向位置。走到或被打断才返回。\n- `pet_act`:不说话,只做一串表情或动作。词表里标着「保持到下一个动作」的会一直保持。\n\n{{pet.moves}}\n\n### 调整自己:`pet_set`、`pet_quiet`\n\n`pet_set` 改你自己的样子和习惯:形象和打扮(Coo 的配色和配件也是打扮)、走动多少、呼噜多久、音效、大小、气泡尺寸、字体尺寸、黑白模式、悬停按钮,以及你对{{pet.user}}的称呼。按{{pet.user}}在「习惯」页的设置,有的直接生效,有的先在气泡里征得对方同意,同意了才改,回执等对方回答后才到。{{pet.self}}能选的值:\n\n{{pet.dress}}\n\n`pet_quiet` 是临时的:安静一段时间(默认关音效、站着不动),到时自动恢复,不改设置。对方在忙、在开会、夜深了,用它而不是改设置。\n\n### 收到的事件\n\n每条事件开头是它发生时{{pet.user}}那边的本地时间,如 `[14:32]`;一次运行的第一条和换了日期后的第一条还带日期和星期,如 `[10-05 周日 23:40]`。\n\n- `[voice] {{pet.user}}:…`:麦克风听到并转写的话(语音输入{{pet.voice}})。转写可能有错字或同音字。用说话键说的话投递时打断当前模型调用或可打断工具,同轮尚未开始的工具跳过;回执写明已经执行的操作。一直收音时听到的话不打断。\n- `[typed] {{pet.user}}:…`:在桌宠上双击或点悬停按钮打的字;粘贴进打字框的图片接在正文后。\n- `[answer] …`:对 `pet_ask` 的回答。\n- `[touch] …`:戳、摸、拎起来甩出去这类动作,以及落地摔晕。事件里写到的「戳醒」「摔晕」就是身体当场做过的反射,事件送到你这里时已经做完了,不需要再演一遍。有的互动不单独叫醒你,跟着下一批事件到,可能已经过去一会儿。\n- `[figure] …`:{{pet.user}}给你换了形象或打扮,或者形象没能显示出来、换回了 Coo;词表或形象自带的目标有变化时一并写明。\n\n{{pet.cua}}\n"
804
+ }
805
+ ]
806
+ }