screenreader-speech-capture-client 0.0.1-preview.0 → 0.2.0

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.
@@ -0,0 +1,322 @@
1
+ /** The speech of one test or agent task (docs/usage/speech-capture.md#sessions). */
2
+ interface Session {
3
+ /** Increasing, restarts at 1 with the bridge. */
4
+ id: number;
5
+ name: string;
6
+ /** Optional label that groups sessions (for example one test run), `null` if not set. */
7
+ run: string | null;
8
+ /** The client that started it (its `clientName`), `null` if unknown. */
9
+ client: string | null;
10
+ /** ISO 8601, UTC, on the bridge's clock. */
11
+ startedAt: string;
12
+ /** ISO 8601, UTC. `null` while the session is current. */
13
+ endedAt: string | null;
14
+ /** The last `seq` before the session started: `since: startSeq` reads it from its start. */
15
+ startSeq: number;
16
+ /** First and last entry still in the buffer, `null` if none. */
17
+ firstSeq: number | null;
18
+ lastSeq: number | null;
19
+ /** Entries of this session still in the buffer. */
20
+ entries: number;
21
+ }
22
+ /** A session just started, with the session of another client it replaced, if any. */
23
+ interface StartedSession extends Session {
24
+ /**
25
+ * The session this start ended, if another client had started it: two clients (for example
26
+ * two test workers) are sharing one screen reader. `null` otherwise.
27
+ */
28
+ replaced: Session | null;
29
+ }
30
+ /** A session `id`, or `'current'`: the session that is current when the request arrives. */
31
+ type SessionRef = number | 'current';
32
+ /** The sessions still in the bridge's buffer plus the current one, newest first. */
33
+ interface SessionList {
34
+ sessions: Session[];
35
+ /** `null` when no session is current. */
36
+ currentId: number | null;
37
+ }
38
+ type BridgeState = 'starting' | 'ready' | 'stopping';
39
+ interface ServiceStatus {
40
+ state: 'stopped' | 'starting' | 'running' | 'crashed' | 'failed';
41
+ version: string;
42
+ port: number;
43
+ /** Restarts after crashes since the service was last started (bridge start or config change). */
44
+ restarts: number;
45
+ /** Exit code of the last unexpected exit, `null` if none, or killed by a signal. */
46
+ exitCode: number | null;
47
+ }
48
+ /** Bridge health, as `GET /api/v1/status` reports it (docs/usage/http-api.md). */
49
+ interface BridgeStatus {
50
+ bridge: {
51
+ version: string;
52
+ apiVersion: string;
53
+ state: BridgeState;
54
+ /** ISO 8601, UTC. When this bridge run started. */
55
+ startedAt: string;
56
+ };
57
+ tcp: {
58
+ listening: boolean;
59
+ host: string;
60
+ port: number;
61
+ encoding: string;
62
+ connections: {
63
+ id: number;
64
+ voice: string | null;
65
+ connectedAt: string;
66
+ }[];
67
+ };
68
+ buffer: {
69
+ size: number;
70
+ maxEntries: number;
71
+ firstSeq: number | null;
72
+ lastSeq: number | null;
73
+ };
74
+ playwright: ServiceStatus;
75
+ mcp: ServiceStatus;
76
+ /** The current session and the number of listed sessions. */
77
+ session: {
78
+ current: Session | null;
79
+ count: number;
80
+ };
81
+ }
82
+ /** One recorded speech entry or marker (docs/usage/http-api.md#data-model). */
83
+ interface SpeechEntry {
84
+ /**
85
+ * Increasing sequence number, the entry's ID: survives a clear and keeps rising across bridge
86
+ * restarts.
87
+ * The client's cursor and every `since` are seq values (docs/usage/client.md#the-cursor).
88
+ */
89
+ seq: number;
90
+ kind: 'speech' | 'marker';
91
+ /** What was spoken, or the marker's label. */
92
+ text: string;
93
+ /** ISO 8601, UTC, on the bridge's clock. */
94
+ receivedAt: string;
95
+ source: 'tcp' | 'api';
96
+ /** Header (`voice=<id>`) of the sending voice, `null` if not set or for markers. */
97
+ voice: string | null;
98
+ /** TCP connection that delivered it, `null` for markers. */
99
+ connectionId: number | null;
100
+ /** The session that was current when it was recorded, `null` outside any session. */
101
+ sessionId: number | null;
102
+ }
103
+ /** What a wait looks for: a substring, a regular expression or a predicate. */
104
+ type SpeechMatch = string | RegExp | ((entry: SpeechEntry) => boolean);
105
+ interface GetSpeechOptions {
106
+ /** Only entries with `seq > since`. Default: the cursor. */
107
+ since?: number | undefined;
108
+ /** At most this many entries (the oldest ones). */
109
+ limit?: number | undefined;
110
+ /** Include markers. Default `false`. */
111
+ includeMarkers?: boolean | undefined;
112
+ /**
113
+ * Return what is left when some of the speech was dropped because the bridge's buffer was
114
+ * full. Default `false`: the read throws `SpeechTruncatedError` instead.
115
+ */
116
+ allowTruncated?: boolean | undefined;
117
+ /**
118
+ * Only entries of this session: its `id`, or `'current'` (the session current when the request
119
+ * arrives). Default: all entries.
120
+ */
121
+ session?: SessionRef | undefined;
122
+ }
123
+ interface GetTextOptions {
124
+ /** Only speech with `seq > since`. Default: the cursor. */
125
+ since?: number | undefined;
126
+ /** Between two entries. Default `'\n'`. */
127
+ separator?: string | undefined;
128
+ /** As for `getSpeech`: return what is left instead of throwing `SpeechTruncatedError`. */
129
+ allowTruncated?: boolean | undefined;
130
+ /**
131
+ * Only entries of this session: its `id`, or `'current'` (the session current when the request
132
+ * arrives). Default: all entries.
133
+ */
134
+ session?: SessionRef | undefined;
135
+ }
136
+ interface WaitOptions {
137
+ /** Milliseconds. Default 5000. */
138
+ timeout?: number | undefined;
139
+ /** Search entries with `seq > since`. Default: the cursor. */
140
+ since?: number | undefined;
141
+ /** Ignore case and extra whitespace (strings and regular expressions). */
142
+ normalize?: boolean | undefined;
143
+ /**
144
+ * Only entries of this session: its `id`, or `'current'` (the session current when the wait
145
+ * starts; it stays that one even if another session starts meanwhile). Default: all entries.
146
+ */
147
+ session?: SessionRef | undefined;
148
+ }
149
+ interface StartSessionOptions {
150
+ /** Label that groups sessions, for example one per test run. */
151
+ run?: string | undefined;
152
+ }
153
+ interface SilenceOptions {
154
+ /** Milliseconds without new speech. Default 500. */
155
+ quietFor?: number | undefined;
156
+ /** Milliseconds. Default 10000. */
157
+ timeout?: number | undefined;
158
+ }
159
+ interface ReadyOptions {
160
+ /** Milliseconds. Default 120000. */
161
+ timeout?: number | undefined;
162
+ }
163
+ interface OnSpeechOptions {
164
+ /**
165
+ * First replay the buffered entries with `seq > since`, then go on live. Default: only entries
166
+ * that arrive after subscribing.
167
+ */
168
+ since?: number | undefined;
169
+ /** Also deliver markers. Default `false`. */
170
+ includeMarkers?: boolean | undefined;
171
+ /** A session started or ended (`endedAt` is set when it ended). */
172
+ onSession?: ((session: Session) => void) | undefined;
173
+ /** The bridge's buffer was cleared. */
174
+ onClear?: (() => void) | undefined;
175
+ /** Some entries of a replay were already dropped because the bridge's buffer was full. */
176
+ onTruncated?: (() => void) | undefined;
177
+ /**
178
+ * A problem with the feed. With `retrying: true` the feed goes on: it reconnects by itself
179
+ * (a lost connection) or the error came from one of the callbacks. With `retrying: false` it
180
+ * has stopped for good (`IncompatibleBridgeError`, an HTTP `4xx`, an invalid bridge URL).
181
+ */
182
+ onError?: ((error: Error, info: {
183
+ retrying: boolean;
184
+ }) => void) | undefined;
185
+ }
186
+ interface Recording<T> {
187
+ result: T;
188
+ /** Speech spoken while `fn` ran and until silence, oldest first. */
189
+ entries: SpeechEntry[];
190
+ /**
191
+ * Some of that speech was dropped because the bridge's buffer was full before it could be read:
192
+ * `entries` is incomplete (raise `buffer.maxEntries`).
193
+ */
194
+ truncated: boolean;
195
+ }
196
+ /**
197
+ * The library's functions (docs/usage/client.md#library). The CLI and the Playwright fixture are
198
+ * built on the same interface.
199
+ *
200
+ * Every client keeps a **cursor**: the `seq` of the last entry it consumed, used as the default
201
+ * `since` (docs/usage/client.md#the-cursor). The first call checks the bridge's API version and
202
+ * rejects with `IncompatibleBridgeError` if the major version differs.
203
+ */
204
+ interface SpeechCapture {
205
+ /** Recorded speech after the cursor (or `since`), oldest first. */
206
+ getSpeech(options?: GetSpeechOptions): Promise<SpeechEntry[]>;
207
+ /** All speech after the cursor (or `since`), joined into one string. */
208
+ getText(options?: GetTextOptions): Promise<string>;
209
+ /** Clears the bridge's buffer (all sessions) and resets the cursor. For manual use. */
210
+ clear(): Promise<void>;
211
+ /**
212
+ * Starts a session (docs/usage/speech-capture.md#sessions): it becomes current and the previous
213
+ * one ends. Moves the cursor to the session's start, so the next reads and waits only see its
214
+ * speech. `replaced` is the session of another client it ended, if any: a sign that two clients
215
+ * share the screen reader.
216
+ */
217
+ startSession(name: string, options?: StartSessionOptions): Promise<StartedSession>;
218
+ /** Ends the current session. Speech after this belongs to no session. */
219
+ endSession(): Promise<void>;
220
+ /** The sessions still in the buffer plus the current one, newest first. */
221
+ sessions(): Promise<SessionList>;
222
+ /** Inserts a marker. Its `seq` can be used as `since`. */
223
+ mark(label: string): Promise<SpeechEntry>;
224
+ /** Bridge health and versions. */
225
+ status(): Promise<BridgeStatus>;
226
+ /**
227
+ * Waits until the bridge answers and is `ready`. Rejects with `BridgeNotReadyError` on timeout.
228
+ */
229
+ waitForReady(options?: ReadyOptions): Promise<BridgeStatus>;
230
+ /**
231
+ * Waits until a speech entry after the cursor (or `since`) matches, then moves the cursor to
232
+ * it. Speech that arrived before the call is found too. Rejects with `SpeechTimeoutError`,
233
+ * with `truncated` if speech it should have looked at was dropped from the bridge's full buffer.
234
+ */
235
+ waitForOutput(match: SpeechMatch, options?: WaitOptions): Promise<SpeechEntry>;
236
+ /**
237
+ * Waits until the matches occur in this order (other entries may come in between), then moves
238
+ * the cursor to the last match. Rejects with `SpeechTimeoutError` (`truncated` as for
239
+ * `waitForOutput`).
240
+ */
241
+ waitForSequence(matches: readonly SpeechMatch[], options?: WaitOptions): Promise<SpeechEntry[]>;
242
+ /**
243
+ * Waits until no new speech has arrived for `quietFor` ms, counted from the call. Rejects with
244
+ * `SpeechTimeoutError` if speech goes on until the timeout.
245
+ */
246
+ waitForSilence(options?: SilenceOptions): Promise<void>;
247
+ /**
248
+ * Runs `fn` and returns the speech spoken while it ran (waits for silence at the end), then
249
+ * moves the cursor to the end.
250
+ */
251
+ record<T>(fn: () => T | Promise<T>, options?: SilenceOptions): Promise<Recording<T>>;
252
+ /**
253
+ * Subscribes to the live feed (SSE): `listener` gets every new speech entry as the bridge
254
+ * receives it, until the returned function is called. Reconnects by itself after a lost
255
+ * connection, without losing or repeating entries. Does not move the cursor.
256
+ */
257
+ onSpeech(listener: (entry: SpeechEntry) => void, options?: OnSpeechOptions): () => void;
258
+ /**
259
+ * The cursor: the `seq` of the last entry consumed. Waits and `record` only move it forward, so
260
+ * calls running at the same time can't move it back (docs/usage/client.md#the-cursor).
261
+ */
262
+ cursor(): number;
263
+ /**
264
+ * Sets the cursor, for example to a marker's `seq`. Wins over waits and recordings that were
265
+ * already running: they don't move it when they finish.
266
+ */
267
+ setCursor(seq: number): void;
268
+ }
269
+ /** A point on the screen in physical pixels (what the bridge's native click takes). */
270
+ interface ScreenPoint {
271
+ x: number;
272
+ y: number;
273
+ }
274
+ type MouseButton = 'left' | 'right' | 'middle';
275
+ /** An element's box in CSS pixels, relative to the page's viewport (Playwright's `boundingBox`). */
276
+ interface ElementBox {
277
+ x: number;
278
+ y: number;
279
+ width: number;
280
+ height: number;
281
+ }
282
+ /** The page's window geometry could not be read, or the target element isn't on screen. */
283
+ declare class FocusError extends Error {
284
+ name: string;
285
+ }
286
+ interface ClickOptions {
287
+ /** Default `left`. */
288
+ button?: MouseButton | undefined;
289
+ }
290
+ interface PressKeysOptions {
291
+ /** Pause between the chords of a sequence in milliseconds. Default: the bridge's (50). */
292
+ delayMs?: number | undefined;
293
+ }
294
+ /** The element `setFocus` clicks in the middle of, for example a Playwright `Locator`. */
295
+ interface FocusTarget {
296
+ boundingBox(): Promise<ElementBox | null>;
297
+ }
298
+ /**
299
+ * What `setFocus` needs from a browser page. Structurally a Playwright `Page`, so a page can be
300
+ * passed as it is, without the client depending on Playwright.
301
+ */
302
+ interface FocusablePage {
303
+ evaluate(expression: string): Promise<unknown>;
304
+ }
305
+ interface SetFocusOptions {
306
+ /** Click this element's centre instead of the title bar. */
307
+ target?: FocusTarget | undefined;
308
+ }
309
+ /**
310
+ * Native mouse and keyboard input on the VM through the bridge (docs/usage/native-input.md), for
311
+ * what Playwright can't do: screen reader commands and making a window the foreground window.
312
+ * Rejects with `BridgeHttpError` code `INPUT_DISABLED` when the bridge can't send input.
313
+ */
314
+ interface NativeInput {
315
+ /** A native click at a screen point in physical pixels (`POST /api/v1/input/click`). */
316
+ click(point: ScreenPoint, options?: ClickOptions): Promise<void>;
317
+ /** Presses one chord (`'Insert+T'`) or a sequence (`['h', 'h']`) (`POST /api/v1/input/keys`). */
318
+ pressKeys(keys: string | readonly string[], options?: PressKeysOptions): Promise<void>;
319
+ /** Makes the page's browser window the foreground window with a native click. */
320
+ setFocus(page: FocusablePage, options?: SetFocusOptions): Promise<void>;
321
+ }
322
+ export { BridgeStatus as C, SessionRef as D, SessionList as E, StartedSession as O, BridgeState as S, Session as T, SpeechCapture as _, PressKeysOptions as a, SpeechMatch as b, FocusError as c, GetSpeechOptions as d, GetTextOptions as f, SilenceOptions as g, Recording as h, NativeInput as i, MouseButton as l, ReadyOptions as m, FocusTarget as n, SetFocusOptions as o, OnSpeechOptions as p, FocusablePage as r, ElementBox as s, ClickOptions as t, ScreenPoint as u, StartSessionOptions as v, ServiceStatus as w, SpeechEntry as x, WaitOptions as y };
@@ -0,0 +1,39 @@
1
+ import { _ as SpeechCapture, a as PressKeysOptions, i as NativeInput, t as ClickOptions, u as ScreenPoint } from "./native-input-BpZjLyPk.mjs";
2
+ import { expect } from "@playwright/test";
3
+ /** When the fixture attaches the speech transcript of a test to the Playwright report. */
4
+ type AttachMode = 'always' | 'on-failure' | 'off';
5
+ export interface SpeechCaptureWorkerOptions {
6
+ /** Bridge URL. Default: `SR_SPEECH_URL`, the stored URL, then `http://localhost:5151`. */
7
+ speechCaptureUrl: string | undefined;
8
+ }
9
+ export interface SpeechCaptureOptions {
10
+ /** Attach the speech transcript of a test to the report. Default `'always'`. */
11
+ speechCaptureAttach: AttachMode;
12
+ /**
13
+ * Give the browser window OS-level focus before each test (`setFocus`), so native keys reach
14
+ * the page. Default `true`; turn off where the bridge has no native input.
15
+ */
16
+ speechCaptureFocus: boolean;
17
+ }
18
+ /** The page-bound native input fixtures (docs/usage/native-input.md). */
19
+ export interface NativeInputFixtures {
20
+ /** A native click at a screen point in physical pixels. */
21
+ click: (point: ScreenPoint, options?: ClickOptions) => Promise<void>;
22
+ /** Presses one chord (`'Insert+T'`) or a sequence (`['h', 'h']`) as native keys. */
23
+ pressKeys: (keys: string | readonly string[], options?: PressKeysOptions) => Promise<void>;
24
+ /**
25
+ * Gives the page's browser window OS-level focus: a native click on the top-left corner of the
26
+ * page content, then a reload of the page.
27
+ */
28
+ setFocus: () => Promise<void>;
29
+ }
30
+ interface Workers extends SpeechCaptureWorkerOptions {
31
+ speechBridgeUrl: string;
32
+ }
33
+ interface Fixtures extends NativeInputFixtures, SpeechCaptureOptions {
34
+ speech: SpeechCapture;
35
+ speechClient: SpeechCapture & NativeInput;
36
+ speechFocus: undefined;
37
+ }
38
+ export declare const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & Fixtures, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions & Workers>;
39
+ export { type NativeInput, type SpeechCapture, expect };
@@ -0,0 +1,82 @@
1
+ import { a as READ_GEOMETRY_SCRIPT, n as createClientConfig, o as contentCornerPoint, r as playwrightEndpoint, s as parseWindowGeometry, t as SpeechCaptureClient } from "./main-GSQbmJHV.mjs";
2
+ import { expect, test as test$1 } from "@playwright/test";
3
+ // src/adapters/in/playwright/test-session.ts
4
+ /** Name of a test's session: its title path without the project/file prefix. */
5
+ function sessionName(titlePath) {
6
+ return titlePath.filter((part) => part !== "").join(" › ");
7
+ }
8
+ /**
9
+ * One session per test (docs/usage/client.md#playwright-fixture): starts it, runs the test body
10
+ * (`use`), ends it and attaches the transcript. The buffer is not cleared.
11
+ */
12
+ async function withTestSession(speech, testInfo, options, use) {
13
+ const session = await speech.startSession(sessionName(testInfo.titlePath), { run: options.run });
14
+ try {
15
+ await use();
16
+ } finally {
17
+ const failed = testInfo.status !== void 0 && testInfo.status !== testInfo.expectedStatus;
18
+ const wantsTranscript = options.attach === "always" || options.attach === "on-failure" && failed;
19
+ let transcript;
20
+ if (wantsTranscript) transcript = await speech.getText({
21
+ session: session.id,
22
+ since: session.startSeq
23
+ });
24
+ await speech.endSession();
25
+ if (transcript !== void 0) await testInfo.attach("speech-transcript", {
26
+ body: transcript === "" ? "(no speech)" : transcript,
27
+ contentType: "text/plain"
28
+ });
29
+ }
30
+ }
31
+ // src/adapters/in/playwright/focus.ts
32
+ /**
33
+ * Gives the page's browser window OS-level focus (docs/usage/client.md#playwright-fixture):
34
+ * clicks the top-left corner of the page content with a native click, then reloads the page, so
35
+ * the click leaves no trace in it.
36
+ */
37
+ async function focusPage(input, page) {
38
+ const geometry = parseWindowGeometry(await page.evaluate(READ_GEOMETRY_SCRIPT));
39
+ await input.click(contentCornerPoint(geometry));
40
+ await page.reload();
41
+ }
42
+ // src/playwright.ts
43
+ const runLabel = process.env["SR_SPEECH_RUN"] ?? `playwright pid ${process.ppid}`;
44
+ const test = test$1.extend({
45
+ speechCaptureUrl: [void 0, {
46
+ option: true,
47
+ scope: "worker"
48
+ }],
49
+ speechCaptureAttach: ["always", { option: true }],
50
+ speechCaptureFocus: [true, { option: true }],
51
+ speechBridgeUrl: [async ({ speechCaptureUrl }, use) => {
52
+ const { value } = await createClientConfig().get("url", { url: speechCaptureUrl });
53
+ await use(value);
54
+ }, { scope: "worker" }],
55
+ connectOptions: [async ({ speechBridgeUrl }, use) => {
56
+ await use({ wsEndpoint: playwrightEndpoint(speechBridgeUrl) });
57
+ }, { scope: "worker" }],
58
+ headless: [false, { scope: "worker" }],
59
+ speechClient: async ({ speechBridgeUrl }, use) => {
60
+ await use(new SpeechCaptureClient({ baseUrl: speechBridgeUrl }));
61
+ },
62
+ speech: [async ({ speechClient, speechCaptureAttach }, use, testInfo) => {
63
+ await withTestSession(speechClient, testInfo, {
64
+ run: runLabel,
65
+ attach: speechCaptureAttach
66
+ }, () => use(speechClient));
67
+ }, { auto: true }],
68
+ click: async ({ speechClient }, use) => {
69
+ await use((point, options) => speechClient.click(point, options));
70
+ },
71
+ pressKeys: async ({ speechClient }, use) => {
72
+ await use((keys, options) => speechClient.pressKeys(keys, options));
73
+ },
74
+ setFocus: async ({ speechClient, page }, use) => {
75
+ await use(() => focusPage(speechClient, page));
76
+ },
77
+ speechFocus: [async ({ speech: _speech, setFocus, speechCaptureFocus }, use) => {
78
+ if (speechCaptureFocus) await setFocus();
79
+ await use(void 0);
80
+ }, { auto: true }]
81
+ });
82
+ export { expect, test };
package/package.json CHANGED
@@ -1,14 +1,22 @@
1
1
  {
2
2
  "name": "screenreader-speech-capture-client",
3
- "version": "0.0.1-preview.0",
3
+ "version": "0.2.0",
4
4
  "description": "Test client for the screenreader-speech-capture bridge: library, Playwright fixture and CLI.",
5
- "license": "UNLICENSED",
5
+ "license": "MIT",
6
6
  "type": "module",
7
7
  "engines": {
8
8
  "node": ">=20"
9
9
  },
10
+ "types": "./dist/index.d.mts",
10
11
  "exports": {
11
- ".": "./dist/index.mjs"
12
+ ".": {
13
+ "types": "./dist/index.d.mts",
14
+ "default": "./dist/index.mjs"
15
+ },
16
+ "./playwright": {
17
+ "types": "./dist/playwright.d.mts",
18
+ "default": "./dist/playwright.mjs"
19
+ }
12
20
  },
13
21
  "bin": {
14
22
  "screenreader-speech-capture-client": "./dist/cli.mjs"
@@ -17,8 +25,29 @@
17
25
  "dist"
18
26
  ],
19
27
  "devDependencies": {
28
+ "@arethetypeswrong/core": "0.18.5",
29
+ "@playwright/test": "1.65.0",
20
30
  "@screenreader-speech-capture/shared": "0.0.0",
21
- "tsdown": "0.23.7"
31
+ "publint": "0.3.25",
32
+ "tsdown": "0.23.7",
33
+ "valibot": "1.5.0"
34
+ },
35
+ "homepage": "https://github.com/TimoSto/screenreader-speech-capture/tree/main/packages/client#readme",
36
+ "bugs": {
37
+ "url": "https://github.com/TimoSto/screenreader-speech-capture/issues"
38
+ },
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "git+https://github.com/TimoSto/screenreader-speech-capture.git",
42
+ "directory": "packages/client"
43
+ },
44
+ "peerDependencies": {
45
+ "@playwright/test": "1.65.0"
46
+ },
47
+ "peerDependenciesMeta": {
48
+ "@playwright/test": {
49
+ "optional": true
50
+ }
22
51
  },
23
52
  "scripts": {
24
53
  "build": "tsdown",