cortico-world-agent-speed 0.2.0 → 0.2.2

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 (189) hide show
  1. package/CHANGELOG.md +64 -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 +361 -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 +451 -0
  116. package/src/webui/dress-dialog.css +14 -0
  117. package/src/webui/dress-dialog.ts +117 -0
  118. package/src/webui/dress-panel.ts +160 -0
  119. package/src/webui/key-capture.ts +60 -0
  120. package/src/webui/shared/modal.css +13 -0
  121. package/src/webui/shared/modal.ts +77 -0
  122. package/src/webui/shared/problem.css +15 -0
  123. package/src/webui/shared/problem.ts +217 -0
  124. package/src/webui/shared/strings.ts +5 -0
  125. package/src/webui/style.css +50 -0
  126. package/src/window-host.ts +116 -0
  127. package/src/world.ts +2926 -0
  128. package/web/activity-motion.js +117 -0
  129. package/web/appearance.js +60 -0
  130. package/web/body-host.js +257 -0
  131. package/web/coo/coo.js +384 -0
  132. package/web/coo/figure.js +15 -0
  133. package/web/coo/figure.json +1224 -0
  134. package/web/dist/dress-dialog.css +1 -0
  135. package/web/dist/dress-dialog.js +1 -0
  136. package/web/drag-row.js +49 -0
  137. package/web/drag.js +149 -0
  138. package/web/dress.css +170 -0
  139. package/web/dress.html +37 -0
  140. package/web/dress.js +786 -0
  141. package/web/figure-frame.html +16 -0
  142. package/web/figure-frame.js +128 -0
  143. package/web/frame-loop.js +55 -0
  144. package/web/hints.js +77 -0
  145. package/web/i18n/de.js +170 -0
  146. package/web/i18n/en.js +177 -0
  147. package/web/i18n/es-419.js +170 -0
  148. package/web/i18n/fr.js +170 -0
  149. package/web/i18n/it.js +170 -0
  150. package/web/i18n/ja.js +170 -0
  151. package/web/i18n/ko.js +170 -0
  152. package/web/i18n/pt-BR.js +170 -0
  153. package/web/i18n/ru.js +170 -0
  154. package/web/i18n/zh-Hant.js +170 -0
  155. package/web/i18n/zh.js +175 -0
  156. package/web/i18n.js +54 -0
  157. package/{renderer/vendor → web}/kit/body.js +31 -58
  158. package/web/looks.js +70 -0
  159. package/web/mic-worklet.js +36 -0
  160. package/web/mic.js +117 -0
  161. package/web/motion-frames.js +80 -0
  162. package/web/motion-level.js +40 -0
  163. package/web/new-year-2027.svg +238 -0
  164. package/web/overlay.html +16 -0
  165. package/web/overlay.js +100 -0
  166. package/web/pet-app.js +3000 -0
  167. package/web/pet.css +642 -0
  168. package/web/pet.html +21 -0
  169. package/web/scale-slider.js +259 -0
  170. package/web/show-hide.js +49 -0
  171. package/web/sound.js +245 -0
  172. package/web/speech/zh.json +1 -0
  173. package/web/speech/zh.ogg +0 -0
  174. package/web/speech.js +197 -0
  175. package/web/stage.js +160 -0
  176. package/web/swap-motion.js +119 -0
  177. package/web/ui.js +195 -0
  178. package/host/launch.js +0 -187
  179. package/host/library.cjs +0 -638
  180. package/host/main.cjs +0 -389
  181. package/index.js +0 -93
  182. package/renderer/index.html +0 -22
  183. package/renderer/pet-sandbox.html +0 -11
  184. package/renderer/pet.css +0 -38
  185. package/renderer/pet.js +0 -251
  186. package/renderer/vendor/activity-motion.js +0 -101
  187. package/renderer/vendor/figure-frame.js +0 -115
  188. package/renderer/vendor/pack.css +0 -2
  189. /package/{renderer/vendor → web}/kit/rig.js +0 -0
@@ -0,0 +1,140 @@
1
+ /** Messages between Cua (cua.ts) and the engine child process (fork IPC, advanced serialization). */
2
+ import type { EngineErrorCode } from './engine/fail.ts';
3
+ import type { KeyCode } from './engine/keys.ts';
4
+
5
+ export type Button = 'left' | 'right' | 'middle';
6
+
7
+ /** How long to stay out of the user's way before an input action. */
8
+ export interface Yield {
9
+ /** The user must have been idle this long. */
10
+ idleMs: number;
11
+ /** Give up after waiting this long. */
12
+ maxWaitMs: number;
13
+ }
14
+
15
+ /**
16
+ * Where an input lands: physical pixels of display `display` (its index in `ScreenInfo.displays`), as the
17
+ * arrangement `layout` stood. The engine refuses a target whose `layout` is no longer the current one.
18
+ */
19
+ export interface Target { display: number; layout: string }
20
+
21
+ export type EngineRequest =
22
+ | { op: 'info' }
23
+ /** `display` null: the display holding the foreground window, or the primary one. */
24
+ | { op: 'screenshot'; display: number | null; maxWidth: number; maxHeight: number; quality: number }
25
+ /** A region of the display in physical pixels, captured fresh and scaled down only to fit. */
26
+ | { op: 'zoom'; at: Target; x: number; y: number; width: number; height: number; maxWidth: number; maxHeight: number; quality: number }
27
+ | { op: 'click'; at: Target; x: number; y: number; button: Button; count: number; yield: Yield }
28
+ | { op: 'move'; at: Target; x: number; y: number; yield: Yield }
29
+ | { op: 'drag'; at: Target; x1: number; y1: number; x2: number; y2: number; yield: Yield }
30
+ | { op: 'scroll'; at: Target; x: number; y: number; down: number; right: number; yield: Yield }
31
+ | { op: 'type'; text: string; chunkDelayMs: number; yield: Yield }
32
+ | { op: 'key'; chords: KeyCode[][]; yield: Yield }
33
+ /** Presses `keys` in order, keeps them down for `holdMs` or until a cancel, then releases them in reverse. */
34
+ | { op: 'hold'; keys: KeyCode[]; holdMs: number; yield: Yield }
35
+ /** Moves to the point and presses `button`, leaving it down. */
36
+ | { op: 'mouseDown'; at: Target; x: number; y: number; button: Button; yield: Yield }
37
+ | { op: 'mouseUp'; button: Button; yield: Yield }
38
+ /** Releases every key and button the engine pressed and has not released; no wait for the user. */
39
+ | { op: 'release' }
40
+ | { op: 'windows' }
41
+ | { op: 'focus'; handle: string; yield: Yield }
42
+ /** `yes` and `no` label the dialog's buttons where the system lets them be named. */
43
+ | { op: 'confirm'; text: string; caption: string; yes: string; no: string; timeoutMs: number };
44
+
45
+ /** How a yes/no question to the person ended. */
46
+ export type Answer = 'yes' | 'no' | 'timeout';
47
+
48
+ /** A display: `index` is its place in the list, 1-based, left to right and then top to bottom; sizes are physical pixels. */
49
+ export interface DisplayInfo {
50
+ index: number;
51
+ primary: boolean;
52
+ width: number;
53
+ height: number;
54
+ }
55
+
56
+ export interface ScreenInfo {
57
+ displays: DisplayInfo[];
58
+ /** Names the arrangement of the displays; it changes when one is added, removed, moved or rescaled. */
59
+ layout: string;
60
+ /** Physical pixels of the display it is on; null while it is on none. */
61
+ cursor: { display: number; x: number; y: number } | null;
62
+ /** null when there is no foreground target; empty when its title is unavailable. */
63
+ foreground: string | null;
64
+ /** The program the foreground window belongs to: the executable's file name on Windows and Linux, the app's name on macOS. */
65
+ foregroundApp: string | null;
66
+ /** The display holding the middle of the foreground window. */
67
+ foregroundDisplay: number | null;
68
+ }
69
+
70
+ export interface ScreenshotResult extends ScreenInfo {
71
+ display: number;
72
+ jpeg: Uint8Array;
73
+ width: number;
74
+ height: number;
75
+ /** Screenshot pixels per physical pixel of the display. */
76
+ scale: number;
77
+ }
78
+
79
+ export interface ZoomResult {
80
+ jpeg: Uint8Array;
81
+ width: number;
82
+ height: number;
83
+ }
84
+
85
+ /** Counts blocking checks, not input events: several checks can see the same input tick. */
86
+ export interface YieldSignal {
87
+ count: number;
88
+ lastTick: number | null;
89
+ }
90
+
91
+ export interface YieldDiagnostics {
92
+ /** Signals still inside the idle threshold at the last check. */
93
+ blockedBy: Array<'systemInput' | 'pointerMovement'>;
94
+ systemInput: YieldSignal;
95
+ pointerMovement: YieldSignal;
96
+ /** Raw ticks wrap at 2^32; absent before the first check. lastInputTick is null when the system cannot report input. */
97
+ lastSample: { now: number; lastInputTick: number | null; ownInputTick: number | null; pointerMoved: boolean } | null;
98
+ }
99
+
100
+ /** Every input op reports how long it waited for the user and where the pointer ended up. */
101
+ export interface InputResult extends ScreenInfo {
102
+ /** The user was not idle within `maxWaitMs`; nothing was sent. */
103
+ yielded: boolean;
104
+ /** A cancel arrived while waiting for the user; nothing was sent. */
105
+ cancelled: boolean;
106
+ waitedMs: number;
107
+ /** Checks while waiting, plus the stopping check if typing yields between chunks. */
108
+ activity: YieldDiagnostics;
109
+ }
110
+
111
+ /** `typed` counts code points sent; `stoppedBy` is null when the whole text went out. */
112
+ export interface TypeResult extends InputResult {
113
+ typed: number;
114
+ stoppedBy: 'user' | 'cancel' | null;
115
+ }
116
+
117
+ /** `heldMs` is how long the keys stayed down, less than the `holdMs` asked for when a cancel ended the hold. */
118
+ export interface HoldResult extends InputResult {
119
+ heldMs: number;
120
+ }
121
+
122
+ export interface WindowEntry {
123
+ handle: string;
124
+ title: string;
125
+ pid: number;
126
+ /** The display holding the window's middle, null when none does; the rectangle is in that display's physical pixels. */
127
+ display: number | null;
128
+ rect: { x: number; y: number; width: number; height: number };
129
+ minimized: boolean;
130
+ foreground: boolean;
131
+ }
132
+
133
+ /**
134
+ * `cancel` stops request `id` at its next safe point: during the wait for the user, between
135
+ * typed chunks, or while a hold keeps its keys down (they are released). Every other step of an op
136
+ * runs to its end; a cancel for a finished request is dropped.
137
+ */
138
+ export type MainToChild = { id: number; req: EngineRequest } | { cancel: number };
139
+ /** A failure the World words itself carries `code` and `args` (engine/fail.ts); `error` is the message as thrown. */
140
+ export type ChildToMain = { id: number; ok: true; value: unknown } | { id: number; ok: false; error: string; code?: EngineErrorCode; args?: Array<string | number> };
@@ -0,0 +1,53 @@
1
+ import type { Translation } from 'cortico/core/language.ts';
2
+ import type { CuaText } from './index.ts';
3
+
4
+ const de: Translation<CuaText> = {
5
+ ask: {
6
+ eachTurn: (who: string) => `${who} möchte deinen Computer benutzen: auf den Bildschirm schauen und Maus und Tastatur verwenden. Ist das diesmal okay?`,
7
+ once: (who: string, minutes: number) => `${who} möchte deine Maus und Tastatur benutzen. Okay für die nächsten ${minutes} Minuten?`,
8
+ acting: (who: string) => `${who} möchte deine Maus und Tastatur benutzen. Ist das diesmal okay?`,
9
+ caption: 'Computersteuerung',
10
+ yes: 'Ja',
11
+ no: 'Diesmal nicht',
12
+ terminal: {
13
+ type: (who: string, window: string, text: string, minutes: number) => `${who} möchte im Terminalfenster „${window}“ eingeben:\n${text}\nDie Eingabe kann als Befehl ausgeführt werden. Nach einem Ja wird bei Eingaben und Tasten in Terminalfenstern und bei win+r ${minutes} Min. lang nicht mehr gefragt. Ist das okay?`,
14
+ key: (who: string, window: string, keys: string, minutes: number) => `${who} möchte im Terminalfenster „${window}“ ${keys} drücken. Nach einem Ja wird bei Eingaben und Tasten in Terminalfenstern und bei win+r ${minutes} Min. lang nicht mehr gefragt. Ist das okay?`,
15
+ runBox: (who: string, keys: string, minutes: number) => `${who} möchte ${keys} drücken, um das Ausführen-Fenster zu öffnen; es kann Programme starten oder Befehle ausführen. Nach einem Ja wird bei Eingaben und Tasten in Terminalfenstern und bei win+r ${minutes} Min. lang nicht mehr gefragt. Ist das okay?`,
16
+ },
17
+ },
18
+
19
+ preflight: {
20
+ noDisplay: 'Die Computersteuerung braucht unter Linux X11 (oder XWayland unter Wayland): DISPLAY ist nicht gesetzt.',
21
+ unsupported: 'Die Computersteuerung läuft nur unter Windows, macOS und Linux.',
22
+ },
23
+
24
+ console: {
25
+ engine: 'Eingabe-Engine',
26
+ screen: (w: number, h: number) => `Bildschirm ${w}×${h}`,
27
+ onDemand: 'Startet bei Bedarf',
28
+ exited: (code: number | null) => `Der Engine-Prozess wurde beendet (Exit-Code ${code})`,
29
+ allowed: 'Erlaubt',
30
+ viewOnly: 'Nur schauen',
31
+ asking: 'Fragt',
32
+ levels: { 'ask-each-turn': 'Jede Runde', 'ask-before-acting': 'Vor dem Handeln', 'ask-once': (minutes: number) => `Einmal pro ${minutes} Min.`, 'never-ask': 'Nie' },
33
+ },
34
+
35
+ config: {
36
+ group: 'Computersteuerung',
37
+ enabled: { title: 'Computersteuerung einschalten' },
38
+ risksConfirmed: { title: "Risiken bestätigt", description: "Die Risiken wurden beim Einschalten der Computersteuerung oder beim Hinzufügen als Hover-Schaltfläche bestätigt; wenn an, schaltet die Hover-Schaltfläche die Computersteuerung direkt ein." },
39
+ control: { title: 'Maus und Tastatur erlauben', description: 'Wenn aus, nur Screenshots und die Fensterliste.' },
40
+ permission: { title: 'Wann du gefragt wirst', description: 'ask-each-turn: fragt jede Runde, bevor Coo auf den Bildschirm schaut oder handelt; ask-before-acting: Schauen ist frei, fragt jede Runde, bevor Coo Maus und Tastatur benutzt; ask-once: Schauen ist frei, fragt einmal, bevor Coo Maus und Tastatur benutzt, und ein Ja gilt so lange wie bei „Ein Ja gilt“ eingestellt; never-ask: fragt nie. Solange „Rückfrage vor Terminal und Ausführen abschalten“ aus ist, wird unabhängig von der Einstellung vor Eingaben oder Tasten in einem Terminalfenster und vor win+r einmal gesondert gefragt; ein Ja gilt so lange wie bei „Ein Ja gilt“ eingestellt.' },
41
+ grantMinutes: { title: 'Ein Ja gilt', suffix: 'Min.', description: 'Für ask-once und für die gesonderte Frage zu Terminalfenstern.' },
42
+ skipTerminalAsk: { title: 'Rückfrage vor Terminal und Ausführen abschalten', description: 'Wenn an, wird vor Eingaben oder Tasten in einem Terminalfenster und vor win+r nicht mehr gesondert gefragt; es gilt „Wann du gefragt wirst“ wie für jede andere Eingabe. Mit never-ask kann Coo dann Befehle ausführen, ohne dich zu fragen.' },
43
+ userIdleMs: { title: 'Dir den Vortritt lassen für', description: 'Nachdem du Maus oder Tastatur benutzt hast, wartet Coo, bis sie so lange unberührt waren.' },
44
+ maxYieldWaitMs: { title: 'Längste Wartezeit auf dich', description: 'Benutzt du Maus oder Tastatur nach dieser Zeit noch, wird die Aktion nicht ausgeführt. Bei 0 wird nicht gewartet.' },
45
+ maxWidth: { title: 'Maximale Screenshot-Breite' },
46
+ maxHeight: { title: 'Maximale Screenshot-Höhe' },
47
+ quality: { title: 'Screenshot-Qualität' },
48
+ afterAction: { title: 'Screenshot nach jeder Aktion' },
49
+ settleMs: { title: 'Wartezeit vor dem Screenshot' },
50
+ },
51
+ };
52
+
53
+ export default de;
@@ -0,0 +1,63 @@
1
+ /**
2
+ * English: the text computer use shows people. The keys are zh.ts's; a language other than zh-Hant
3
+ * reads the top-level keys its file leaves out from here. The permission question and the system dialog follow
4
+ * the app language; the console's settings and lamp follow the console request's
5
+ * language. Text the bot reads, the engine's errors included, is not here (model-text.ts).
6
+ */
7
+ import type { CuaText } from './index.ts';
8
+
9
+ const en: CuaText = {
10
+ /** Asking before using the computer; `who` is the bot's name. */
11
+ ask: {
12
+ eachTurn: (who: string) => `${who} wants to use your computer: look at the screen and use the mouse and keyboard. OK this time?`,
13
+ once: (who: string, minutes: number) => `${who} wants to use your mouse and keyboard. OK for the next ${minutes} minutes?`,
14
+ acting: (who: string) => `${who} wants to use your mouse and keyboard. OK this time?`,
15
+ /** The two buttons, of the pet's bubble and of the system dialog; `caption` is the system dialog's title (shown while no pet page is there). */
16
+ caption: 'Computer use',
17
+ yes: 'Yes',
18
+ no: 'Not this time',
19
+ terminal: {
20
+ type: (who: string, window: string, text: string, minutes: number) => `${who} wants to type into the terminal window "${window}":\n${text}\nWhat is typed may run as a command. After a yes, typing and keys in terminal windows and win+r are not asked about again for ${minutes} min. OK?`,
21
+ key: (who: string, window: string, keys: string, minutes: number) => `${who} wants to press ${keys} in the terminal window "${window}". After a yes, typing and keys in terminal windows and win+r are not asked about again for ${minutes} min. OK?`,
22
+ runBox: (who: string, keys: string, minutes: number) => `${who} wants to press ${keys} to open the Run box, which can start programs or run commands. After a yes, typing and keys in terminal windows and win+r are not asked about again for ${minutes} min. OK?`,
23
+ },
24
+ },
25
+
26
+ /** Whether this system runs computer use. */
27
+ preflight: {
28
+ noDisplay: 'Computer use needs X11 on Linux (or XWayland under Wayland): DISPLAY is not set.',
29
+ unsupported: 'Computer use runs on Windows, macOS and Linux only.',
30
+ },
31
+
32
+ /** The console: the input engine's lamp on the desktop-pet World page. */
33
+ console: {
34
+ engine: 'Input engine',
35
+ screen: (w: number, h: number) => `Screen ${w}×${h}`,
36
+ onDemand: 'Starts when needed',
37
+ exited: (code: number | null) => `The engine process exited (exit code ${code})`,
38
+ allowed: 'Allowed',
39
+ viewOnly: 'Look only',
40
+ asking: 'Asks',
41
+ levels: { 'ask-each-turn': 'Every turn', 'ask-before-acting': 'Before acting', 'ask-once': (minutes: number) => `Once per ${minutes} min`, 'never-ask': 'Never' },
42
+ },
43
+
44
+ /** The console's settings. */
45
+ config: {
46
+ group: 'Computer use',
47
+ enabled: { title: 'Turn on computer use' },
48
+ risksConfirmed: { title: "Risks confirmed", description: "The risks were confirmed when computer use was turned on or added as a hover button; while this is on, the hover button turns computer use on directly." },
49
+ control: { title: 'Allow the mouse and keyboard', description: 'When off, only screenshots and the window list.' },
50
+ permission: { title: 'When to ask you', description: 'ask-each-turn: before looking at the screen or acting, every turn; ask-before-acting: looking is free, asks before using the mouse and keyboard every turn; ask-once: looking is free, asks once before using the mouse and keyboard, and a yes holds for "A yes lasts"; never-ask: never asks. Unless "Turn off asking before terminals and the Run box" is on, whatever the setting, typing or pressing keys in a terminal window and pressing win+r are asked about once on their own, and a yes holds for "A yes lasts".' },
51
+ grantMinutes: { title: 'A yes lasts', suffix: 'min', description: 'For ask-once and for the separate question about terminal windows.' },
52
+ skipTerminalAsk: { title: 'Turn off asking before terminals and the Run box', description: 'When on, typing or pressing keys in a terminal window and pressing win+r get no question of their own and are asked about as "When to ask you" says, like any other input. With never-ask, Coo can then run commands without asking you.' },
53
+ userIdleMs: { title: 'Stay out of the way for', description: 'After you use the mouse or keyboard, Coo waits until they have been still this long.' },
54
+ maxYieldWaitMs: { title: 'Longest wait for you', description: 'If you are still using the mouse or keyboard after this long, the action is not carried out. At 0 there is no wait.' },
55
+ maxWidth: { title: 'Screenshot max width' },
56
+ maxHeight: { title: 'Screenshot max height' },
57
+ quality: { title: 'Screenshot quality' },
58
+ afterAction: { title: 'Screenshot after each action' },
59
+ settleMs: { title: 'Wait before the screenshot' },
60
+ },
61
+ };
62
+
63
+ export default en;
@@ -0,0 +1,53 @@
1
+ import type { Translation } from 'cortico/core/language.ts';
2
+ import type { CuaText } from './index.ts';
3
+
4
+ const es419: Translation<CuaText> = {
5
+ ask: {
6
+ eachTurn: (who: string) => `${who} quiere usar tu computadora: ver la pantalla y usar el mouse y el teclado. ¿Está bien esta vez?`,
7
+ once: (who: string, minutes: number) => `${who} quiere usar tu mouse y tu teclado. ¿Está bien durante los próximos ${minutes} minutos?`,
8
+ acting: (who: string) => `${who} quiere usar tu mouse y tu teclado. ¿Está bien esta vez?`,
9
+ caption: 'Uso de la computadora',
10
+ yes: 'Sí',
11
+ no: 'Esta vez no',
12
+ terminal: {
13
+ type: (who: string, window: string, text: string, minutes: number) => `${who} quiere escribir en la ventana de terminal “${window}”:\n${text}\nLo que se escriba puede ejecutarse como un comando. Si dices que sí, durante ${minutes} min no se vuelve a preguntar por escribir o presionar teclas en una terminal ni por win+r. ¿Está bien?`,
14
+ key: (who: string, window: string, keys: string, minutes: number) => `${who} quiere presionar ${keys} en la ventana de terminal “${window}”. Si dices que sí, durante ${minutes} min no se vuelve a preguntar por escribir o presionar teclas en una terminal ni por win+r. ¿Está bien?`,
15
+ runBox: (who: string, keys: string, minutes: number) => `${who} quiere presionar ${keys} para abrir el cuadro Ejecutar, que puede iniciar programas o ejecutar comandos. Si dices que sí, durante ${minutes} min no se vuelve a preguntar por escribir o presionar teclas en una terminal ni por win+r. ¿Está bien?`,
16
+ },
17
+ },
18
+
19
+ preflight: {
20
+ noDisplay: 'El uso de la computadora necesita X11 en Linux (o XWayland en Wayland): DISPLAY no está definido.',
21
+ unsupported: 'El uso de la computadora solo funciona en Windows, macOS y Linux.',
22
+ },
23
+
24
+ console: {
25
+ engine: 'Motor de entrada',
26
+ screen: (w: number, h: number) => `Pantalla ${w}×${h}`,
27
+ onDemand: 'Se inicia cuando hace falta',
28
+ exited: (code: number | null) => `El proceso del motor terminó (código de salida ${code})`,
29
+ allowed: 'Permitido',
30
+ viewOnly: 'Solo mirar',
31
+ asking: 'Pregunta',
32
+ levels: { 'ask-each-turn': 'Cada turno', 'ask-before-acting': 'Antes de actuar', 'ask-once': (minutes: number) => `Una vez cada ${minutes} min`, 'never-ask': 'Nunca' },
33
+ },
34
+
35
+ config: {
36
+ group: 'Uso de la computadora',
37
+ enabled: { title: 'Activar el uso de la computadora' },
38
+ risksConfirmed: { title: "Riesgos confirmados", description: "Los riesgos se confirmaron al activar el uso de la computadora o al agregarlo como botón al pasar el cursor; si está activado, ese botón activa el uso de la computadora directamente." },
39
+ control: { title: 'Permitir el mouse y el teclado', description: 'Si está desactivado, solo capturas de pantalla y la lista de ventanas.' },
40
+ permission: { title: 'Cuándo preguntarte', description: 'ask-each-turn: antes de mirar la pantalla o actuar, en cada turno; ask-before-acting: mirar es libre, pregunta antes de usar el mouse y el teclado en cada turno; ask-once: mirar es libre, pregunta una vez antes de usar el mouse y el teclado, y un sí vale durante “Un sí dura”; never-ask: nunca pregunta. Si “Desactivar la pregunta antes de la terminal y Ejecutar” está apagado, con cualquier opción, antes de escribir o presionar teclas en una terminal y antes de win+r pregunta una vez aparte, y un sí vale durante “Un sí dura”.' },
41
+ grantMinutes: { title: 'Un sí dura', suffix: 'min', description: 'Para ask-once y para la pregunta aparte sobre las terminales.' },
42
+ skipTerminalAsk: { title: 'Desactivar la pregunta antes de la terminal y Ejecutar', description: 'Si está encendido, escribir o presionar teclas en una terminal y win+r ya no tienen pregunta aparte y siguen “Cuándo preguntarte” como cualquier otra acción. Con never-ask, Coo puede ejecutar comandos sin preguntarte.' },
43
+ userIdleMs: { title: 'No estorbar durante', description: 'Después de que usas el mouse o el teclado, espera hasta que hayan estado quietos este tiempo.' },
44
+ maxYieldWaitMs: { title: 'Espera máxima por ti', description: 'Si sigues usando el mouse o el teclado después de este tiempo, la acción no se realiza. Con 0 no hay espera.' },
45
+ maxWidth: { title: 'Ancho máximo de la captura' },
46
+ maxHeight: { title: 'Alto máximo de la captura' },
47
+ quality: { title: 'Calidad de la captura' },
48
+ afterAction: { title: 'Captura después de cada acción' },
49
+ settleMs: { title: 'Espera antes de la captura' },
50
+ },
51
+ };
52
+
53
+ export default es419;
@@ -0,0 +1,53 @@
1
+ import type { Translation } from 'cortico/core/language.ts';
2
+ import type { CuaText } from './index.ts';
3
+
4
+ const fr: Translation<CuaText> = {
5
+ ask: {
6
+ eachTurn: (who: string) => `${who} veut utiliser votre ordinateur : regarder l'écran et utiliser la souris et le clavier. D'accord pour cette fois ?`,
7
+ once: (who: string, minutes: number) => `${who} veut utiliser votre souris et votre clavier. D'accord pour les ${minutes} prochaines minutes ?`,
8
+ acting: (who: string) => `${who} veut utiliser votre souris et votre clavier. D'accord pour cette fois ?`,
9
+ caption: "Contrôle de l'ordinateur",
10
+ yes: 'Oui',
11
+ no: 'Pas cette fois',
12
+ terminal: {
13
+ type: (who: string, window: string, text: string, minutes: number) => `${who} veut saisir dans la fenêtre de terminal « ${window} » :\n${text}\nCe texte peut être exécuté comme une commande. Après un oui, la saisie et les touches dans un terminal ainsi que win+r ne sont plus demandées pendant ${minutes} min. D'accord ?`,
14
+ key: (who: string, window: string, keys: string, minutes: number) => `${who} veut appuyer sur ${keys} dans la fenêtre de terminal « ${window} ». Après un oui, la saisie et les touches dans un terminal ainsi que win+r ne sont plus demandées pendant ${minutes} min. D'accord ?`,
15
+ runBox: (who: string, keys: string, minutes: number) => `${who} veut appuyer sur ${keys} pour ouvrir la boîte Exécuter, qui peut lancer des programmes ou des commandes. Après un oui, la saisie et les touches dans un terminal ainsi que win+r ne sont plus demandées pendant ${minutes} min. D'accord ?`,
16
+ },
17
+ },
18
+
19
+ preflight: {
20
+ noDisplay: "Le contrôle de l'ordinateur nécessite X11 sous Linux (ou XWayland sous Wayland) : DISPLAY n'est pas défini.",
21
+ unsupported: "Le contrôle de l'ordinateur ne fonctionne que sous Windows, macOS et Linux.",
22
+ },
23
+
24
+ console: {
25
+ engine: "Moteur d'entrée",
26
+ screen: (w: number, h: number) => `Écran ${w}×${h}`,
27
+ onDemand: 'Démarre au besoin',
28
+ exited: (code: number | null) => `Le processus du moteur s'est arrêté (code de sortie ${code})`,
29
+ allowed: 'Autorisé',
30
+ viewOnly: 'Regarder seulement',
31
+ asking: 'Demande',
32
+ levels: { 'ask-each-turn': 'À chaque tour', 'ask-before-acting': "Avant d'agir", 'ask-once': (minutes: number) => `Une fois par ${minutes} min`, 'never-ask': 'Jamais' },
33
+ },
34
+
35
+ config: {
36
+ group: "Contrôle de l'ordinateur",
37
+ enabled: { title: "Activer le contrôle de l'ordinateur" },
38
+ risksConfirmed: { title: "Risques confirmés", description: "Les risques ont été confirmés en activant le contrôle de l'ordinateur ou en l'ajoutant aux boutons au survol ; activé, le bouton au survol active directement le contrôle de l'ordinateur." },
39
+ control: { title: 'Autoriser la souris et le clavier', description: "Désactivé : seulement les captures d'écran et la liste des fenêtres." },
40
+ permission: { title: 'Quand vous demander', description: "ask-each-turn : demande avant de regarder l'écran ou d'agir, à chaque tour ; ask-before-acting : regarder est libre, demande avant d'utiliser la souris et le clavier à chaque tour ; ask-once : regarder est libre, demande une fois avant d'utiliser la souris et le clavier, et un oui vaut pendant « Un oui vaut » ; never-ask : ne demande jamais. Sauf si « Désactiver la question avant le terminal et Exécuter » est activé, quel que soit le réglage, une saisie ou une touche dans un terminal et win+r sont demandées une fois à part, et un oui vaut pendant « Un oui vaut »." },
41
+ grantMinutes: { title: 'Un oui vaut', suffix: 'min', description: 'Pour ask-once et pour la question à part sur les terminaux.' },
42
+ skipTerminalAsk: { title: 'Désactiver la question avant le terminal et Exécuter', description: "Activé, la saisie ou les touches dans un terminal et win+r n'ont plus de question à part et suivent « Quand vous demander » comme toute autre action. Avec never-ask, Coo peut alors lancer des commandes sans vous demander." },
43
+ userIdleMs: { title: 'Vous laisser la main pendant', description: "Après que vous avez utilisé la souris ou le clavier, attend qu'ils soient restés immobiles aussi longtemps." },
44
+ maxYieldWaitMs: { title: 'Attente maximale pour vous', description: "Si vous utilisez encore la souris ou le clavier après ce délai, l'action n'est pas effectuée. À 0, pas d'attente." },
45
+ maxWidth: { title: 'Largeur max. des captures' },
46
+ maxHeight: { title: 'Hauteur max. des captures' },
47
+ quality: { title: 'Qualité des captures' },
48
+ afterAction: { title: 'Capture après chaque action' },
49
+ settleMs: { title: 'Attente avant la capture' },
50
+ },
51
+ };
52
+
53
+ export default fr;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The text computer use shows people, one file per language named for its code. `zh.ts` and `en.ts`
3
+ * have every key; another language's file has the top-level keys translated so far, each group in it
4
+ * whole, and the keys it leaves out read `zh.ts` for `zh-Hant` and `en.ts` for the rest (Cortico's `pick`).
5
+ */
6
+ import { pick, type Language, type LanguageTable } from 'cortico/core/language.ts';
7
+ import zh from './zh.ts';
8
+ import en from './en.ts';
9
+ import zhHant from './zh-Hant.ts';
10
+ import ja from './ja.ts';
11
+ import ko from './ko.ts';
12
+ import fr from './fr.ts';
13
+ import de from './de.ts';
14
+ import es419 from './es-419.ts';
15
+ import ptBR from './pt-BR.ts';
16
+ import it from './it.ts';
17
+ import ru from './ru.ts';
18
+
19
+ export type CuaText = typeof zh;
20
+
21
+ const CUA_TEXT: LanguageTable<CuaText> = { zh, en, 'zh-Hant': zhHant, ja, ko, fr, de, 'es-419': es419, 'pt-BR': ptBR, it, ru };
22
+
23
+ /** The table of `language`, the app's or the console request's; `zh` when absent. */
24
+ export function cuaText(language: Language = 'zh'): CuaText {
25
+ return pick(language, CUA_TEXT);
26
+ }
@@ -0,0 +1,53 @@
1
+ import type { Translation } from 'cortico/core/language.ts';
2
+ import type { CuaText } from './index.ts';
3
+
4
+ const it: Translation<CuaText> = {
5
+ ask: {
6
+ eachTurn: (who: string) => `${who} vuole usare il tuo computer: guardare lo schermo e usare mouse e tastiera. Va bene per questa volta?`,
7
+ once: (who: string, minutes: number) => `${who} vuole usare il tuo mouse e la tua tastiera. Va bene per i prossimi ${minutes} minuti?`,
8
+ acting: (who: string) => `${who} vuole usare il tuo mouse e la tua tastiera. Va bene per questa volta?`,
9
+ caption: 'Controllo del computer',
10
+ yes: 'Sì',
11
+ no: 'Non stavolta',
12
+ terminal: {
13
+ type: (who: string, window: string, text: string, minutes: number) => `${who} vuole scrivere nella finestra del terminale «${window}»:\n${text}\nCiò che viene scritto può essere eseguito come comando. Dopo un sì, per ${minutes} min non chiede più per scrivere o premere tasti in un terminale né per win+r. Va bene?`,
14
+ key: (who: string, window: string, keys: string, minutes: number) => `${who} vuole premere ${keys} nella finestra del terminale «${window}». Dopo un sì, per ${minutes} min non chiede più per scrivere o premere tasti in un terminale né per win+r. Va bene?`,
15
+ runBox: (who: string, keys: string, minutes: number) => `${who} vuole premere ${keys} per aprire la finestra Esegui, che può avviare programmi o eseguire comandi. Dopo un sì, per ${minutes} min non chiede più per scrivere o premere tasti in un terminale né per win+r. Va bene?`,
16
+ },
17
+ },
18
+
19
+ preflight: {
20
+ noDisplay: 'Il controllo del computer richiede X11 su Linux (o XWayland sotto Wayland): DISPLAY non è impostato.',
21
+ unsupported: 'Il controllo del computer funziona solo su Windows, macOS e Linux.',
22
+ },
23
+
24
+ console: {
25
+ engine: 'Motore di input',
26
+ screen: (w: number, h: number) => `Schermo ${w}×${h}`,
27
+ onDemand: 'Si avvia quando serve',
28
+ exited: (code: number | null) => `Il processo del motore è terminato (codice di uscita ${code})`,
29
+ allowed: 'Consentito',
30
+ viewOnly: 'Solo guardare',
31
+ asking: 'Chiede',
32
+ levels: { 'ask-each-turn': 'Ogni turno', 'ask-before-acting': 'Prima di agire', 'ask-once': (minutes: number) => `Una volta ogni ${minutes} min`, 'never-ask': 'Mai' },
33
+ },
34
+
35
+ config: {
36
+ group: 'Controllo del computer',
37
+ enabled: { title: 'Attiva il controllo del computer' },
38
+ risksConfirmed: { title: "Rischi confermati", description: "I rischi sono stati confermati attivando il controllo del computer o aggiungendolo ai pulsanti al passaggio; se attivo, quel pulsante attiva direttamente il controllo del computer." },
39
+ control: { title: 'Consenti mouse e tastiera', description: "Se disattivato, solo screenshot ed elenco delle finestre." },
40
+ permission: { title: 'Quando chiederti', description: 'ask-each-turn: chiede ogni turno prima di guardare lo schermo o agire; ask-before-acting: guardare è libero, chiede ogni turno prima di usare mouse e tastiera; ask-once: guardare è libero, chiede una volta prima di usare mouse e tastiera, e un sì dura quanto indicato in «Un sì vale»; never-ask: non chiede mai. Se «Disattiva la domanda prima del terminale e di Esegui» è spento, con qualsiasi impostazione, prima di scrivere o premere tasti in un terminale e prima di win+r chiede una volta a parte, e un sì dura quanto indicato in «Un sì vale».' },
41
+ grantMinutes: { title: 'Un sì vale', suffix: 'min', description: 'Per ask-once e per la domanda a parte sui terminali.' },
42
+ skipTerminalAsk: { title: 'Disattiva la domanda prima del terminale e di Esegui', description: 'Se attivo, scrivere o premere tasti in un terminale e win+r non hanno più una domanda a parte e seguono «Quando chiederti» come ogni altra azione. Con never-ask, Coo può eseguire comandi senza chiederti.' },
43
+ userIdleMs: { title: 'Lasciarti il passo per', description: 'Dopo che hai usato mouse o tastiera, aspetta che restino inattivi per questo tempo.' },
44
+ maxYieldWaitMs: { title: 'Attesa massima per te', description: "Se dopo questo tempo stai ancora usando mouse o tastiera, l'azione non viene eseguita. Con 0 non c'è attesa." },
45
+ maxWidth: { title: 'Larghezza massima screenshot' },
46
+ maxHeight: { title: 'Altezza massima screenshot' },
47
+ quality: { title: 'Qualità screenshot' },
48
+ afterAction: { title: 'Screenshot dopo ogni azione' },
49
+ settleMs: { title: 'Attesa prima dello screenshot' },
50
+ },
51
+ };
52
+
53
+ export default it;
@@ -0,0 +1,53 @@
1
+ import type { Translation } from 'cortico/core/language.ts';
2
+ import type { CuaText } from './index.ts';
3
+
4
+ const ja: Translation<CuaText> = {
5
+ ask: {
6
+ eachTurn: (who: string) => `${who} がこのコンピューターを使いたがっています:画面を見て、マウスとキーボードを操作します。今回は許可しますか?`,
7
+ once: (who: string, minutes: number) => `${who} がマウスとキーボードを使いたがっています。これから ${minutes} 分間許可しますか?`,
8
+ acting: (who: string) => `${who} がマウスとキーボードを使いたがっています。今回は許可しますか?`,
9
+ caption: 'コンピューター操作',
10
+ yes: 'はい',
11
+ no: '今回は許可しない',
12
+ terminal: {
13
+ type: (who: string, window: string, text: string, minutes: number) => `${who} がターミナルウィンドウ「${window}」に次の内容を入力しようとしています:\n${text}\n入力した内容はコマンドとして実行される可能性があります。許可すると ${minutes} 分間は、ターミナルウィンドウでの入力・キー操作と win+r を確認しません。許可しますか?`,
14
+ key: (who: string, window: string, keys: string, minutes: number) => `${who} がターミナルウィンドウ「${window}」で ${keys} を押そうとしています。許可すると ${minutes} 分間は、ターミナルウィンドウでの入力・キー操作と win+r を確認しません。許可しますか?`,
15
+ runBox: (who: string, keys: string, minutes: number) => `${who} が ${keys} を押して「ファイル名を指定して実行」を開こうとしています。プログラムの起動やコマンドの実行ができます。許可すると ${minutes} 分間は、ターミナルウィンドウでの入力・キー操作と win+r を確認しません。許可しますか?`,
16
+ },
17
+ },
18
+
19
+ preflight: {
20
+ noDisplay: 'コンピューター操作は Linux では X11(Wayland では XWayland)が必要です:DISPLAY が設定されていません。',
21
+ unsupported: 'コンピューター操作は Windows、macOS、Linux でのみ動作します。',
22
+ },
23
+
24
+ console: {
25
+ engine: '入力エンジン',
26
+ screen: (w: number, h: number) => `画面 ${w}×${h}`,
27
+ onDemand: '必要なときに起動',
28
+ exited: (code: number | null) => `エンジンのプロセスが終了しました(終了コード ${code})`,
29
+ allowed: '許可',
30
+ viewOnly: '見るだけ',
31
+ asking: '確認',
32
+ levels: { 'ask-each-turn': '毎ターン', 'ask-before-acting': '操作の前', 'ask-once': (minutes: number) => `${minutes} 分ごとに 1 回`, 'never-ask': '確認しない' },
33
+ },
34
+
35
+ config: {
36
+ group: 'コンピューター操作',
37
+ enabled: { title: 'コンピューター操作を使う' },
38
+ risksConfirmed: { title: "リスクの説明を確認済み", description: "コンピューター操作をオンにしたとき、またはホバーボタンに加えたときにリスクの説明を確認済みです。オンのあいだは、ホバーボタンから直接コンピューター操作をオンにできます。" },
39
+ control: { title: 'マウスとキーボードを許可', description: 'オフのときは、スクリーンショットとウィンドウ一覧だけです。' },
40
+ permission: { title: 'いつ確認するか', description: 'ask-each-turn:毎ターン、画面を見る前や操作の前に確認します。ask-before-acting:画面を見るのは確認なし、毎ターンマウスとキーボードを使う前に確認します。ask-once:画面を見るのは確認なし、マウスとキーボードを使う前に一度だけ確認し、許可は「許可の有効時間」のあいだ続きます。never-ask:確認しません。「ターミナルと『ファイル名を指定して実行』の前の確認をオフにする」がオフのときは、どの設定でも、ターミナルウィンドウでの入力・キー操作と win+r の前に一度だけ別に確認し、許可は「許可の有効時間」のあいだ続きます。' },
41
+ grantMinutes: { title: '許可の有効時間', suffix: '分', description: 'ask-once と、ターミナルウィンドウについての個別の確認に使われます。' },
42
+ skipTerminalAsk: { title: 'ターミナルと「ファイル名を指定して実行」の前の確認をオフにする', description: 'オンにすると、ターミナルウィンドウでの入力・キー操作と win+r の前に個別の確認をせず、ほかの操作と同じく「いつ確認するか」に従います。never-ask のときは、Coo が確認なしでコマンドを実行できます。' },
43
+ userIdleMs: { title: 'ユーザーに譲る時間', description: 'あなたがマウスやキーボードを使ったあと、操作がこの時間止まるまで待ちます。' },
44
+ maxYieldWaitMs: { title: 'ユーザーを待つ最長時間', description: 'この時間待ってもマウスやキーボードの操作が止まらなければ、今回の操作は実行しません。0 にすると待ちません。' },
45
+ maxWidth: { title: 'スクリーンショットの最大幅' },
46
+ maxHeight: { title: 'スクリーンショットの最大高さ' },
47
+ quality: { title: 'スクリーンショットの画質' },
48
+ afterAction: { title: '操作のたびにスクリーンショット' },
49
+ settleMs: { title: 'スクリーンショット前の待ち時間' },
50
+ },
51
+ };
52
+
53
+ export default ja;
@@ -0,0 +1,53 @@
1
+ import type { Translation } from 'cortico/core/language.ts';
2
+ import type { CuaText } from './index.ts';
3
+
4
+ const ko: Translation<CuaText> = {
5
+ ask: {
6
+ eachTurn: (who: string) => `${who}에서 컴퓨터를 사용하려고 합니다. 화면을 보고 마우스와 키보드를 조작합니다. 이번에 허용하시겠습니까?`,
7
+ once: (who: string, minutes: number) => `${who}에서 마우스와 키보드를 사용하려고 합니다. 앞으로 ${minutes}분 동안 허용하시겠습니까?`,
8
+ acting: (who: string) => `${who}에서 마우스와 키보드를 사용하려고 합니다. 이번에 허용하시겠습니까?`,
9
+ caption: '컴퓨터 사용',
10
+ yes: '예',
11
+ no: '이번에는 아니요',
12
+ terminal: {
13
+ type: (who: string, window: string, text: string, minutes: number) => `${who}에서 터미널 창 "${window}"에 입력하려고 합니다:\n${text}\n입력한 내용은 명령으로 실행될 수 있습니다. 허용하면 ${minutes}분 동안 터미널 창에서의 입력·키 누르기와 win+r은 다시 묻지 않습니다. 허용하시겠습니까?`,
14
+ key: (who: string, window: string, keys: string, minutes: number) => `${who}에서 터미널 창 "${window}"에서 ${keys}을(를) 누르려고 합니다. 허용하면 ${minutes}분 동안 터미널 창에서의 입력·키 누르기와 win+r은 다시 묻지 않습니다. 허용하시겠습니까?`,
15
+ runBox: (who: string, keys: string, minutes: number) => `${who}에서 ${keys}을(를) 눌러 실행 창을 열려고 합니다. 실행 창은 프로그램이나 명령을 실행할 수 있습니다. 허용하면 ${minutes}분 동안 터미널 창에서의 입력·키 누르기와 win+r은 다시 묻지 않습니다. 허용하시겠습니까?`,
16
+ },
17
+ },
18
+
19
+ preflight: {
20
+ noDisplay: '컴퓨터 사용은 Linux에서 X11(Wayland에서는 XWayland)이 필요합니다. DISPLAY가 설정되어 있지 않습니다.',
21
+ unsupported: '컴퓨터 사용은 Windows, macOS, Linux에서만 실행됩니다.',
22
+ },
23
+
24
+ console: {
25
+ engine: '입력 엔진',
26
+ screen: (w: number, h: number) => `화면 ${w}×${h}`,
27
+ onDemand: '필요할 때 시작',
28
+ exited: (code: number | null) => `엔진 프로세스가 종료되었습니다(종료 코드 ${code})`,
29
+ allowed: '허용',
30
+ viewOnly: '보기만',
31
+ asking: '묻기',
32
+ levels: { 'ask-each-turn': '매 턴', 'ask-before-acting': '조작 전', 'ask-once': (minutes: number) => `${minutes}분에 한 번`, 'never-ask': '묻지 않음' },
33
+ },
34
+
35
+ config: {
36
+ group: '컴퓨터 사용',
37
+ enabled: { title: '컴퓨터 사용 켜기' },
38
+ risksConfirmed: { title: "위험 안내 확인함", description: "컴퓨터 사용을 켜거나 호버 버튼에 추가할 때 위험 안내를 확인했습니다. 켜져 있으면 호버 버튼으로 컴퓨터 사용을 바로 켤 수 있습니다." },
39
+ control: { title: '마우스와 키보드 허용', description: '끄면 스크린샷과 창 목록만 쓸 수 있습니다.' },
40
+ permission: { title: '먼저 물어볼 때', description: 'ask-each-turn: 매 턴 화면을 보거나 조작하기 전에 묻습니다. ask-before-acting: 화면 보기는 묻지 않고, 매 턴 마우스와 키보드를 쓰기 전에 묻습니다. ask-once: 화면 보기는 묻지 않고, 마우스와 키보드를 쓰기 전에 한 번 묻습니다. 허용하면 "허용 유지 시간" 동안 유지됩니다. never-ask: 묻지 않습니다. "터미널과 실행 창 사용 전 질문 끄기"가 꺼져 있으면 어떤 설정이든 터미널 창에서 입력하거나 키를 누르기 전, win+r을 누르기 전에는 따로 한 번 묻고, 허용하면 "허용 유지 시간" 동안 유지됩니다.' },
41
+ grantMinutes: { title: '허용 유지 시간', suffix: '분', description: 'ask-once와 터미널 창에 대한 별도 질문에 적용됩니다.' },
42
+ skipTerminalAsk: { title: '터미널과 실행 창 사용 전 질문 끄기', description: '켜면 터미널 창에서 입력하거나 키를 누르기 전, win+r을 누르기 전에 따로 묻지 않고 다른 조작처럼 "먼저 물어볼 때" 설정을 따릅니다. never-ask이면 Coo가 묻지 않고 명령을 실행할 수 있습니다.' },
43
+ userIdleMs: { title: '비켜 주는 시간', description: '마우스나 키보드를 사용한 뒤 이만큼 움직임이 없을 때까지 기다립니다.' },
44
+ maxYieldWaitMs: { title: '최대 대기 시간', description: '이만큼 기다려도 마우스나 키보드 사용이 멈추지 않으면 이번 작업은 실행하지 않습니다. 0으로 두면 기다리지 않습니다.' },
45
+ maxWidth: { title: '스크린샷 최대 너비' },
46
+ maxHeight: { title: '스크린샷 최대 높이' },
47
+ quality: { title: '스크린샷 품질' },
48
+ afterAction: { title: '조작 후 스크린샷' },
49
+ settleMs: { title: '스크린샷 전 대기' },
50
+ },
51
+ };
52
+
53
+ export default ko;
@@ -0,0 +1,53 @@
1
+ import type { Translation } from 'cortico/core/language.ts';
2
+ import type { CuaText } from './index.ts';
3
+
4
+ const ptBR: Translation<CuaText> = {
5
+ ask: {
6
+ eachTurn: (who: string) => `${who} quer usar seu computador: ver a tela e usar o mouse e o teclado. Pode desta vez?`,
7
+ once: (who: string, minutes: number) => `${who} quer usar seu mouse e seu teclado. Pode pelos próximos ${minutes} minutos?`,
8
+ acting: (who: string) => `${who} quer usar seu mouse e seu teclado. Pode desta vez?`,
9
+ caption: 'Uso do computador',
10
+ yes: 'Sim',
11
+ no: 'Desta vez não',
12
+ terminal: {
13
+ type: (who: string, window: string, text: string, minutes: number) => `${who} quer digitar na janela de terminal “${window}”:\n${text}\nO que for digitado pode ser executado como comando. Depois de um sim, digitar ou pressionar teclas em um terminal e win+r não são perguntados de novo por ${minutes} min. Pode?`,
14
+ key: (who: string, window: string, keys: string, minutes: number) => `${who} quer pressionar ${keys} na janela de terminal “${window}”. Depois de um sim, digitar ou pressionar teclas em um terminal e win+r não são perguntados de novo por ${minutes} min. Pode?`,
15
+ runBox: (who: string, keys: string, minutes: number) => `${who} quer pressionar ${keys} para abrir a caixa Executar, que pode iniciar programas ou executar comandos. Depois de um sim, digitar ou pressionar teclas em um terminal e win+r não são perguntados de novo por ${minutes} min. Pode?`,
16
+ },
17
+ },
18
+
19
+ preflight: {
20
+ noDisplay: 'O uso do computador precisa do X11 no Linux (ou XWayland no Wayland): DISPLAY não está definido.',
21
+ unsupported: 'O uso do computador só funciona no Windows, macOS e Linux.',
22
+ },
23
+
24
+ console: {
25
+ engine: 'Motor de entrada',
26
+ screen: (w: number, h: number) => `Tela ${w}×${h}`,
27
+ onDemand: 'Inicia quando necessário',
28
+ exited: (code: number | null) => `O processo do motor foi encerrado (código de saída ${code})`,
29
+ allowed: 'Permitido',
30
+ viewOnly: 'Só olhar',
31
+ asking: 'Pergunta',
32
+ levels: { 'ask-each-turn': 'Todo turno', 'ask-before-acting': 'Antes de agir', 'ask-once': (minutes: number) => `Uma vez a cada ${minutes} min`, 'never-ask': 'Nunca' },
33
+ },
34
+
35
+ config: {
36
+ group: 'Uso do computador',
37
+ enabled: { title: 'Ativar o uso do computador' },
38
+ risksConfirmed: { title: "Riscos confirmados", description: "Os riscos foram confirmados ao ligar o uso do computador ou ao adicioná-lo como botão ao passar o mouse; ligado, esse botão liga o uso do computador diretamente." },
39
+ control: { title: 'Permitir o mouse e o teclado', description: 'Desligado, só capturas de tela e a lista de janelas.' },
40
+ permission: { title: 'Quando perguntar a você', description: 'ask-each-turn: antes de olhar a tela ou agir, a cada turno; ask-before-acting: olhar é livre, pergunta antes de usar o mouse e o teclado a cada turno; ask-once: olhar é livre, pergunta uma vez antes de usar o mouse e o teclado, e um sim vale por “Um sim dura”; never-ask: nunca pergunta. Com “Desativar a pergunta antes do terminal e do Executar” desligado, em qualquer opção, antes de digitar ou pressionar teclas em um terminal e antes de win+r, pergunta uma vez à parte, e um sim vale por “Um sim dura”.' },
41
+ grantMinutes: { title: 'Um sim dura', suffix: 'min', description: 'Para ask-once e para a pergunta à parte sobre terminais.' },
42
+ skipTerminalAsk: { title: 'Desativar a pergunta antes do terminal e do Executar', description: 'Ligado, digitar ou pressionar teclas em um terminal e win+r não têm mais pergunta à parte e seguem “Quando perguntar a você” como qualquer outra ação. Com never-ask, Coo pode executar comandos sem perguntar a você.' },
43
+ userIdleMs: { title: 'Não atrapalhar por', description: 'Depois que você usa o mouse ou o teclado, espera até que fiquem parados por esse tempo.' },
44
+ maxYieldWaitMs: { title: 'Espera máxima por você', description: 'Se você ainda estiver usando o mouse ou o teclado depois desse tempo, a ação não é feita. Com 0 não há espera.' },
45
+ maxWidth: { title: 'Largura máxima da captura' },
46
+ maxHeight: { title: 'Altura máxima da captura' },
47
+ quality: { title: 'Qualidade da captura' },
48
+ afterAction: { title: 'Captura após cada ação' },
49
+ settleMs: { title: 'Espera antes da captura' },
50
+ },
51
+ };
52
+
53
+ export default ptBR;