@screenreader-speech-capture/bridge 0.3.0 → 0.4.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.
- package/dist/cli.mjs +4965 -4771
- package/dist/ui/adapter-node.js +1 -1
- package/dist/ui/client/ui/_app/immutable/assets/0.C_wdfB9t.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/0.C_wdfB9t.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/0.C_wdfB9t.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/2.GfBw0twm.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/2.GfBw0twm.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/2.GfBw0twm.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/3.C6Oee9hv.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/3.C6Oee9hv.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/3.C6Oee9hv.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/4.DwCEZqGT.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/4.DwCEZqGT.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/4.DwCEZqGT.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/5.DVcIZgbI.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/5.DVcIZgbI.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/5.DVcIZgbI.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/6.CgsZgeqQ.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/6.CgsZgeqQ.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/6.CgsZgeqQ.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/ActionDialog.DaaxszBK.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/ActionDialog.DaaxszBK.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/ActionDialog.DaaxszBK.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/Pane.DsGQzOhZ.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/Pane.DsGQzOhZ.css.br +4 -0
- package/dist/ui/client/ui/_app/immutable/assets/Pane.DsGQzOhZ.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/{Cb63XE4v.js → DbGQpjFg.js} +1 -1
- package/dist/ui/client/ui/_app/immutable/chunks/DbGQpjFg.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DbGQpjFg.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/{OAsMjdHF.js → cBM7TtzK.js} +13 -13
- package/dist/ui/client/ui/_app/immutable/chunks/cBM7TtzK.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/cBM7TtzK.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.sg1O-aaT.js +2 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.sg1O-aaT.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.sg1O-aaT.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.ChTQinKu.js +1 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.ChTQinKu.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.ChTQinKu.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/{2.4VpydhMh.js → 2.Bmw_bms2.js} +1 -1
- package/dist/ui/client/ui/_app/immutable/nodes/2.Bmw_bms2.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.Bmw_bms2.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.D1KLwmTV.js +5 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.D1KLwmTV.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.D1KLwmTV.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/{4.B9Ke6ZBV.js → 4.DxLsBVbm.js} +4 -4
- package/dist/ui/client/ui/_app/immutable/nodes/4.DxLsBVbm.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.DxLsBVbm.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/5.mJKxiKw-.js +6 -0
- package/dist/ui/client/ui/_app/immutable/nodes/5.mJKxiKw-.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/5.mJKxiKw-.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/6.BH9jsHQr.js +7 -0
- package/dist/ui/client/ui/_app/immutable/nodes/6.BH9jsHQr.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/6.BH9jsHQr.js.gz +0 -0
- package/dist/ui/client/ui/_app/version.json +1 -1
- package/dist/ui/client/ui/_app/version.json.br +0 -0
- package/dist/ui/client/ui/_app/version.json.gz +0 -0
- package/dist/ui/server/.vite/manifest.json +37 -28
- package/dist/ui/server/_app/immutable/assets/ActionDialog.DaaxszBK.css +1 -0
- package/dist/ui/server/_app/immutable/assets/Pane.DsGQzOhZ.css +1 -0
- package/dist/ui/server/_app/immutable/assets/_layout.C_wdfB9t.css +1 -0
- package/dist/ui/server/_app/immutable/assets/_layout.GfBw0twm.css +1 -0
- package/dist/ui/server/_app/immutable/assets/_page.C6Oee9hv.css +1 -0
- package/dist/ui/server/_app/immutable/assets/_page.CgsZgeqQ.css +1 -0
- package/dist/ui/server/_app/immutable/assets/_page.DVcIZgbI.css +1 -0
- package/dist/ui/server/_app/immutable/assets/_page.DwCEZqGT.css +1 -0
- package/dist/ui/server/chunks/{dialog.js → ActionDialog.js} +16 -2
- package/dist/ui/server/chunks/ActionDialog.js.map +1 -0
- package/dist/ui/server/chunks/Pane.js.map +1 -1
- package/dist/ui/server/chunks/instance.js +3 -3
- package/dist/ui/server/chunks/internal.js +1 -1
- package/dist/ui/server/chunks/sessions.js.map +1 -1
- package/dist/ui/server/chunks/setup.js.map +1 -1
- package/dist/ui/server/chunks/speech.js.map +1 -1
- package/dist/ui/server/chunks/src.js +43 -34
- package/dist/ui/server/chunks/src.js.map +1 -1
- package/dist/ui/server/chunks/validate.js.map +1 -1
- package/dist/ui/server/entries/endpoints/api/sessions/_id_id_/end/_server.ts.js +9 -0
- package/dist/ui/server/entries/endpoints/api/sessions/_id_id_/end/_server.ts.js.map +1 -0
- package/dist/ui/server/entries/hooks.server.js +3 -6
- package/dist/ui/server/entries/hooks.server.js.map +1 -1
- package/dist/ui/server/entries/pages/_layout.svelte.js +94 -78
- package/dist/ui/server/entries/pages/_layout.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/_page.server.ts.js.map +1 -1
- package/dist/ui/server/entries/pages/_page.svelte.js +121 -78
- package/dist/ui/server/entries/pages/_page.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/settings/_page.server.ts.js.map +1 -1
- package/dist/ui/server/entries/pages/settings/_page.svelte.js +15 -16
- package/dist/ui/server/entries/pages/settings/_page.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/setup/_layout.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/setup/_page.svelte.js +24 -13
- package/dist/ui/server/entries/pages/setup/_page.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/setup/instructions/_page.svelte.js +83 -59
- package/dist/ui/server/entries/pages/setup/instructions/_page.svelte.js.map +1 -1
- package/dist/ui/server/manifest-full.js +8 -8
- package/dist/ui/server/manifest.js +8 -8
- package/dist/ui/server/nodes/0.js +2 -2
- package/dist/ui/server/nodes/2.js +2 -2
- package/dist/ui/server/nodes/3.js +2 -2
- package/dist/ui/server/nodes/4.js +2 -2
- package/dist/ui/server/nodes/5.js +2 -2
- package/dist/ui/server/nodes/6.js +2 -2
- package/dist/ui/server/server.js +8 -8
- package/package.json +1 -1
- package/dist/ui/client/ui/_app/immutable/assets/0.ONZWQgDA.css +0 -1
- package/dist/ui/client/ui/_app/immutable/assets/0.ONZWQgDA.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/0.ONZWQgDA.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/2.DSVNnDlO.css +0 -1
- package/dist/ui/client/ui/_app/immutable/assets/2.DSVNnDlO.css.br +0 -3
- package/dist/ui/client/ui/_app/immutable/assets/2.DSVNnDlO.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/3.WduKm4aT.css +0 -1
- package/dist/ui/client/ui/_app/immutable/assets/3.WduKm4aT.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/3.WduKm4aT.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/4.DEk4yqpA.css +0 -1
- package/dist/ui/client/ui/_app/immutable/assets/4.DEk4yqpA.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/4.DEk4yqpA.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/5.YyxFzHED.css +0 -1
- package/dist/ui/client/ui/_app/immutable/assets/5.YyxFzHED.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/5.YyxFzHED.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/6.C0Nhvs_m.css +0 -1
- package/dist/ui/client/ui/_app/immutable/assets/6.C0Nhvs_m.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/6.C0Nhvs_m.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/Pane.Dgdg5KMw.css +0 -1
- package/dist/ui/client/ui/_app/immutable/assets/Pane.Dgdg5KMw.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/Pane.Dgdg5KMw.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Cb63XE4v.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Cb63XE4v.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/OAsMjdHF.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/OAsMjdHF.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.B2MXuPeH.js +0 -2
- package/dist/ui/client/ui/_app/immutable/entry/app.B2MXuPeH.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.B2MXuPeH.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.CEfoZ0Mb.js +0 -1
- package/dist/ui/client/ui/_app/immutable/nodes/0.CEfoZ0Mb.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.CEfoZ0Mb.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.4VpydhMh.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.4VpydhMh.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.BzIz3rja.js +0 -5
- package/dist/ui/client/ui/_app/immutable/nodes/3.BzIz3rja.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.BzIz3rja.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.B9Ke6ZBV.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.B9Ke6ZBV.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/5.Cm6I95kb.js +0 -6
- package/dist/ui/client/ui/_app/immutable/nodes/5.Cm6I95kb.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/5.Cm6I95kb.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/6.B_1Pts2e.js +0 -6
- package/dist/ui/client/ui/_app/immutable/nodes/6.B_1Pts2e.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/6.B_1Pts2e.js.gz +0 -0
- package/dist/ui/server/_app/immutable/assets/Pane.Dgdg5KMw.css +0 -1
- package/dist/ui/server/_app/immutable/assets/_layout.DSVNnDlO.css +0 -1
- package/dist/ui/server/_app/immutable/assets/_layout.ONZWQgDA.css +0 -1
- package/dist/ui/server/_app/immutable/assets/_page.C0Nhvs_m.css +0 -1
- package/dist/ui/server/_app/immutable/assets/_page.DEk4yqpA.css +0 -1
- package/dist/ui/server/_app/immutable/assets/_page.WduKm4aT.css +0 -1
- package/dist/ui/server/_app/immutable/assets/_page.YyxFzHED.css +0 -1
- package/dist/ui/server/chunks/dialog.js.map +0 -1
- package/dist/ui/server/entries/endpoints/api/sessions/end/_server.ts.js +0 -9
- package/dist/ui/server/entries/endpoints/api/sessions/end/_server.ts.js.map +0 -1
- /package/dist/ui/client/ui/_app/immutable/chunks/{BlC5mir6.js → D-UxlRn_.js} +0 -0
- /package/dist/ui/client/ui/_app/immutable/chunks/{BlC5mir6.js.br → D-UxlRn_.js.br} +0 -0
- /package/dist/ui/client/ui/_app/immutable/chunks/{BlC5mir6.js.gz → D-UxlRn_.js.gz} +0 -0
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { i as HOST_NAME_PATTERN, n as CONFIG_LIMITS, r as EXACT_VERSION_PATTERN, t as API_LIMITS } from "./rules.js";
|
|
2
2
|
import { n as LOG_LEVELS, t as FOCUS_TARGETS } from "./vocabulary.js";
|
|
3
|
+
// ../shared/src/api-version.ts
|
|
4
|
+
/**
|
|
5
|
+
* `<major>.<minor>` of the HTTP API. Minor versions only add things, with the exceptions in
|
|
6
|
+
* docs/usage/http-api.md#versioning. Within a major version the enums of the answers never grow
|
|
7
|
+
* (`openapi/freeze.test.ts`).
|
|
8
|
+
*/
|
|
9
|
+
var API_VERSION = "1.36";
|
|
10
|
+
/** Path prefix of every API route. */
|
|
11
|
+
var API_PREFIX = "/api/v1";
|
|
3
12
|
var DEFAULT_CONFIG = {
|
|
4
13
|
lang: void 0,
|
|
5
14
|
message: void 0,
|
|
@@ -194,11 +203,11 @@ function examples(examples_) {
|
|
|
194
203
|
};
|
|
195
204
|
}
|
|
196
205
|
/* @__NO_SIDE_EFFECTS__ */
|
|
197
|
-
function integer$
|
|
206
|
+
function integer$1(message$1) {
|
|
198
207
|
return {
|
|
199
208
|
kind: "validation",
|
|
200
209
|
type: "integer",
|
|
201
|
-
reference: integer$
|
|
210
|
+
reference: integer$1,
|
|
202
211
|
async: false,
|
|
203
212
|
expects: null,
|
|
204
213
|
requirement: Number.isInteger,
|
|
@@ -821,7 +830,7 @@ function isSupportedEncoding(label) {
|
|
|
821
830
|
return false;
|
|
822
831
|
}
|
|
823
832
|
}
|
|
824
|
-
var range = ({ min, max }) => /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$
|
|
833
|
+
var range = ({ min, max }) => /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$1(), /* @__PURE__ */ minValue(min), /* @__PURE__ */ maxValue(max));
|
|
825
834
|
var port = range(CONFIG_LIMITS.port);
|
|
826
835
|
/** Port of a child service: `0` ("any free port") would leave the bridge no port to proxy to. */
|
|
827
836
|
var childPort = range({
|
|
@@ -891,6 +900,9 @@ var AnyErrorBodySchema = /* @__PURE__ */ object({ error: /* @__PURE__ */ object(
|
|
|
891
900
|
message: /* @__PURE__ */ string(),
|
|
892
901
|
details: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ unknown()))
|
|
893
902
|
}) });
|
|
903
|
+
// ../shared/src/schema-helpers.ts
|
|
904
|
+
var integer = (min) => /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$1(), /* @__PURE__ */ minValue(min));
|
|
905
|
+
var timestamp = /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoTimestamp());
|
|
894
906
|
// ../shared/src/rules/labels.ts
|
|
895
907
|
/** Whether `text` is a usable label: not empty after trimming, at most `max` characters trimmed. */
|
|
896
908
|
var isTrimmedLabel = (text, max) => {
|
|
@@ -898,17 +910,15 @@ var isTrimmedLabel = (text, max) => {
|
|
|
898
910
|
return trimmed !== "" && trimmed.length <= max;
|
|
899
911
|
};
|
|
900
912
|
// ../shared/src/speech.ts
|
|
901
|
-
var integer$2 = (min) => /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$3(), /* @__PURE__ */ minValue(min));
|
|
902
|
-
var timestamp$2 = /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoTimestamp());
|
|
903
913
|
var SpeechEntrySchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
904
|
-
seq: /* @__PURE__ */ pipe(integer
|
|
914
|
+
seq: /* @__PURE__ */ pipe(integer(1), /* @__PURE__ */ description("Increasing sequence number. Survives clear and keeps rising across restarts: the first entry of a bridge run gets the run's start time in milliseconds.")),
|
|
905
915
|
kind: /* @__PURE__ */ picklist(["speech", "marker"]),
|
|
906
916
|
text: /* @__PURE__ */ string(),
|
|
907
|
-
receivedAt: /* @__PURE__ */ pipe(timestamp
|
|
917
|
+
receivedAt: /* @__PURE__ */ pipe(timestamp, /* @__PURE__ */ description("When the bridge received the line (UTC).")),
|
|
908
918
|
source: /* @__PURE__ */ pipe(/* @__PURE__ */ picklist(["tcp", "api"]), /* @__PURE__ */ description("`tcp` for speech, `api` for markers.")),
|
|
909
919
|
voice: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ string()), /* @__PURE__ */ description("Header (`voice=<id>`) of the sending voice, `null` if not set or for markers.")),
|
|
910
|
-
connectionId: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(integer
|
|
911
|
-
sessionId: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ nullable(integer
|
|
920
|
+
connectionId: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(integer(1)), /* @__PURE__ */ description("TCP connection that delivered it, `null` for markers.")),
|
|
921
|
+
sessionId: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ nullable(integer(1))), /* @__PURE__ */ description("The session that was current, `null` outside any session. Added in API 1.3."))
|
|
912
922
|
}), /* @__PURE__ */ description("One recorded speech line or a marker."), /* @__PURE__ */ examples([{
|
|
913
923
|
seq: 42,
|
|
914
924
|
kind: "speech",
|
|
@@ -929,7 +939,7 @@ var MarkerRequestSchema = /* @__PURE__ */ strictObject({ label: /* @__PURE__ */
|
|
|
929
939
|
// ../shared/src/input.ts
|
|
930
940
|
var { coordinate, delayMs, maxKeys } = API_LIMITS.input;
|
|
931
941
|
var CAPTURE = API_LIMITS.capture;
|
|
932
|
-
var ms = (min, max, description$1) => /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$
|
|
942
|
+
var ms = (min, max, description$1) => /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$1(), /* @__PURE__ */ minValue(min), /* @__PURE__ */ maxValue(max))), /* @__PURE__ */ description(description$1));
|
|
933
943
|
var capture = /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ strictObject({
|
|
934
944
|
quietForMs: ms(CAPTURE.quietForMs.min, CAPTURE.quietForMs.max, `The capture ends when nothing was spoken for this long, ${CAPTURE.quietForMs.default} if omitted.`),
|
|
935
945
|
firstWithinMs: ms(0, CAPTURE.firstWithinMs.max, `How long the first speech may take after the input; none in that time is \`no-speech\`. ${CAPTURE.firstWithinMs.default} if omitted.`),
|
|
@@ -937,47 +947,48 @@ var capture = /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ stri
|
|
|
937
947
|
settleMs: ms(0, CAPTURE.settleMs.max, "Before the input, wait until nothing was spoken for this long (at most `timeoutMs`), so speech still trailing from an earlier step is not captured. The input is sent after `timeoutMs` even if the speech did not pause. 0 (no wait) if omitted.")
|
|
938
948
|
}), /* @__PURE__ */ description("Records the speech the input causes and answers with it (`InputCapture` instead of `InputResult`). Times are in milliseconds and measured on the bridge, from when it received the speech. Added in API 1.19.")));
|
|
939
949
|
var mark = /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Put a marker into the speech log right before the input is sent (`keys: Tab`, `click: left 640,12`), `true` if omitted (docs/usage/native-input.md#markers-in-the-speech-log). Added in API 1.34."));
|
|
950
|
+
/** The fields of a window in an answer; the title's description differs. */
|
|
951
|
+
var windowEntries = (title) => ({
|
|
952
|
+
title: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ description(title)),
|
|
953
|
+
pid: /* @__PURE__ */ pipe(integer(1), /* @__PURE__ */ description("The process that owns the window."))
|
|
954
|
+
});
|
|
940
955
|
/** `window` of the answers of `POST /input/click` and `POST /input/keys`. */
|
|
941
|
-
var inputWindow = /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ pipe(/* @__PURE__ */ object(
|
|
942
|
-
title: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ description("The window title, empty for a window without one.")),
|
|
943
|
-
pid: /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$3(), /* @__PURE__ */ minValue(1), /* @__PURE__ */ description("The process that owns the window."))
|
|
944
|
-
}), /* @__PURE__ */ description("The foreground window on the machine the bridge runs on. Added in API 1.31.")))), /* @__PURE__ */ description("The window that was in front right before the input was sent (after `settleMs`, before the first chord), so the one that got the keys unless it changed since. `null`: no window was in front. Missing: the bridge cannot tell (not Windows, `koffi` not loaded, or reading it failed). Added in API 1.31."));
|
|
956
|
+
var inputWindow = /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ pipe(/* @__PURE__ */ object(windowEntries("The window title, empty for a window without one.")), /* @__PURE__ */ description("The foreground window on the machine the bridge runs on. Added in API 1.31.")))), /* @__PURE__ */ description("The window that was in front right before the input was sent (after `settleMs`, before the first chord), so the one that got the keys unless it changed since. `null`: no window was in front. Missing: the bridge cannot tell (not Windows, `koffi` not loaded, or reading it failed). Added in API 1.31."));
|
|
945
957
|
var InputCaptureSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
946
958
|
status: /* @__PURE__ */ pipe(/* @__PURE__ */ picklist([
|
|
947
959
|
"silent",
|
|
948
960
|
"no-speech",
|
|
949
961
|
"timeout"
|
|
950
962
|
]), /* @__PURE__ */ description("`silent`: speech came and paused for `quietForMs`. `no-speech`: nothing was spoken within `firstWithinMs`. `timeout`: the speech went on until `timeoutMs`; `entries` holds what was said until then. The input was sent in every case.")),
|
|
951
|
-
startSeq: /* @__PURE__ */ pipe(/* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$
|
|
963
|
+
startSeq: /* @__PURE__ */ pipe(/* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$1(), /* @__PURE__ */ minValue(0)), /* @__PURE__ */ description("The `seq` of the newest entry right before the input was sent, since API 1.34 the input's own marker unless it said `mark: false`: the capture holds the speech after it.")),
|
|
952
964
|
entries: /* @__PURE__ */ pipe(/* @__PURE__ */ array(SpeechEntrySchema), /* @__PURE__ */ maxLength(CAPTURE.entries), /* @__PURE__ */ description(`The speech entries (no markers) after \`startSeq\`, oldest first, at most the first ${CAPTURE.entries}.`)),
|
|
953
|
-
omitted: /* @__PURE__ */ pipe(/* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$
|
|
965
|
+
omitted: /* @__PURE__ */ pipe(/* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$1(), /* @__PURE__ */ minValue(0)), /* @__PURE__ */ description("How many later speech entries were left out.")),
|
|
954
966
|
truncated: /* @__PURE__ */ pipe(/* @__PURE__ */ boolean(), /* @__PURE__ */ description("`true` when entries after `startSeq` were dropped because the buffer was full.")),
|
|
955
967
|
window: inputWindow
|
|
956
968
|
}), /* @__PURE__ */ description("The answer of `POST /input/click` and `POST /input/keys` with `capture`. Added in API 1.19."));
|
|
957
969
|
-coordinate, -coordinate;
|
|
958
970
|
var KeysRequestSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ strictObject({
|
|
959
971
|
keys: /* @__PURE__ */ pipe(/* @__PURE__ */ union([/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ nonEmpty()), /* @__PURE__ */ pipe(/* @__PURE__ */ array(/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ nonEmpty())), /* @__PURE__ */ minLength(1), /* @__PURE__ */ maxLength(maxKeys))]), /* @__PURE__ */ description(`One chord (\`Insert+T\`) or a sequence of chords (\`["h", "h", "Insert+Down"]\`). Chords join modifiers (\`Control\`, \`Shift\`, \`Alt\`, \`Win\`, \`Insert\`, \`CapsLock\`) and one key with \`+\`. Names are case-insensitive (docs/usage/native-input.md#key-names); the numpad keys (\`numpad7\`, \`numpadEnter\`, …) since API 1.30. At most ${maxKeys} chords.`), /* @__PURE__ */ examples(["Insert+T"])),
|
|
960
|
-
delayMs: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$
|
|
972
|
+
delayMs: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$1(), /* @__PURE__ */ minValue(0), /* @__PURE__ */ maxValue(delayMs.max))), /* @__PURE__ */ description(`Pause between the chords of a sequence in milliseconds, ${delayMs.default} if omitted.`)),
|
|
961
973
|
expectedTarget: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ picklist(FOCUS_TARGETS)), /* @__PURE__ */ description("Only send the keys while a window of this browser is in front: `mcp` (Playwright MCP) or `playwright` (the Playwright server). Checked before every chord; otherwise, and where the bridge cannot tell, `409 WRONG_WINDOW` and no further chord is sent (docs/usage/native-input.md#requiring-a-target-window). Added in API 1.32.")),
|
|
962
974
|
mark,
|
|
963
975
|
capture
|
|
964
976
|
}), /* @__PURE__ */ description("`POST /input/keys`: send key presses to the focused window. Added in API 1.14."));
|
|
965
977
|
API_LIMITS.input.focusTitleLength;
|
|
978
|
+
windowEntries("The window title.");
|
|
966
979
|
// ../shared/src/session.ts
|
|
967
|
-
var integer$1 = (min) => /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$3(), /* @__PURE__ */ minValue(min));
|
|
968
|
-
var timestamp$1 = /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoTimestamp());
|
|
969
980
|
var label = (text) => /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ check((text) => isTrimmedLabel(text, API_LIMITS.sessionLabelLength)), /* @__PURE__ */ description(`${text} Trimmed, must not be empty, at most ${API_LIMITS.sessionLabelLength} characters.`));
|
|
970
981
|
var sessionEntries = {
|
|
971
|
-
id: /* @__PURE__ */ pipe(integer
|
|
982
|
+
id: /* @__PURE__ */ pipe(integer(1), /* @__PURE__ */ description("Increasing, also across restarts (since API 1.29): the first session of a bridge run gets the run's start time in milliseconds, so an id is never given out twice.")),
|
|
972
983
|
name: /* @__PURE__ */ string(),
|
|
973
984
|
run: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ string()), /* @__PURE__ */ description("Optional label that groups sessions.")),
|
|
974
985
|
client: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ string()), /* @__PURE__ */ description("Who started it: the `X-SR-Speech-Client` header, `null` if it wasn't sent. Added in API 1.10.")),
|
|
975
|
-
startedAt: timestamp
|
|
976
|
-
endedAt: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(timestamp
|
|
977
|
-
startSeq: /* @__PURE__ */ pipe(integer
|
|
978
|
-
firstSeq: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(integer
|
|
979
|
-
lastSeq: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(integer
|
|
980
|
-
entries: /* @__PURE__ */ pipe(integer
|
|
986
|
+
startedAt: timestamp,
|
|
987
|
+
endedAt: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(timestamp), /* @__PURE__ */ description("`null` while the session is current.")),
|
|
988
|
+
startSeq: /* @__PURE__ */ pipe(integer(0), /* @__PURE__ */ description("The last `seq` given out before the session started: `since=startSeq` reads the session from its start. Added in API 1.9.")),
|
|
989
|
+
firstSeq: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(integer(1)), /* @__PURE__ */ description("First entry still in the buffer, `null` if none.")),
|
|
990
|
+
lastSeq: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(integer(1)), /* @__PURE__ */ description("Last entry still in the buffer, `null` if none.")),
|
|
991
|
+
entries: /* @__PURE__ */ pipe(integer(0), /* @__PURE__ */ description("Entries of this session still in the buffer."))
|
|
981
992
|
};
|
|
982
993
|
var SessionSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object(sessionEntries), /* @__PURE__ */ description("A session (docs/usage/speech-capture.md#sessions). Added in API 1.3."), /* @__PURE__ */ examples([{
|
|
983
994
|
id: 7,
|
|
@@ -1006,12 +1017,10 @@ var StartSessionResponseSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
|
1006
1017
|
var CLIENT_HEADER = "x-sr-speech-client";
|
|
1007
1018
|
var SessionListSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
1008
1019
|
sessions: /* @__PURE__ */ array(SessionSchema),
|
|
1009
|
-
currentId: /* @__PURE__ */ nullable(integer
|
|
1010
|
-
outsideEntries: /* @__PURE__ */ pipe(integer
|
|
1020
|
+
currentId: /* @__PURE__ */ nullable(integer(1)),
|
|
1021
|
+
outsideEntries: /* @__PURE__ */ pipe(integer(0), /* @__PURE__ */ description("Entries in the buffer that were recorded outside any session (`session=none`). Added in API 1.15."))
|
|
1011
1022
|
}), /* @__PURE__ */ description("`GET /sessions`: the current session and the ended ones with entries in the buffer, newest first, and how many entries lie outside any session."));
|
|
1012
1023
|
// ../shared/src/status.ts
|
|
1013
|
-
var integer = (min) => /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$3(), /* @__PURE__ */ minValue(min));
|
|
1014
|
-
var timestamp = /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoTimestamp());
|
|
1015
1024
|
var BRIDGE_STATES = [
|
|
1016
1025
|
"starting",
|
|
1017
1026
|
"ready",
|
|
@@ -1027,8 +1036,8 @@ var ServiceStatusSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
|
1027
1036
|
]), /* @__PURE__ */ description("`starting` includes the install. `crashed`: it exited and restarts after a delay. `failed`: 5 crashes in a row; restart the bridge (or change the service's settings).")),
|
|
1028
1037
|
version: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ description("The version that runs (configured or bundled)."), /* @__PURE__ */ examples(["1.65.1"])),
|
|
1029
1038
|
port: integer(0),
|
|
1030
|
-
restarts: /* @__PURE__ */ pipe(integer(0), /* @__PURE__ */ description("Restarts after crashes since the service was last started
|
|
1031
|
-
exitCode: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$
|
|
1039
|
+
restarts: /* @__PURE__ */ pipe(integer(0), /* @__PURE__ */ description("Restarts after crashes since the service was last started.")),
|
|
1040
|
+
exitCode: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$1())), /* @__PURE__ */ description("Exit code of the last unexpected exit. `null` if none, or killed by a signal.")),
|
|
1032
1041
|
lastError: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ string())), /* @__PURE__ */ description("Why the last start failed or the service exited unexpectedly, as text for people. It stays after a successful restart. `null` if there was none since the service was last started. Added in API 1.33."), /* @__PURE__ */ examples(["exited with code 1"]))
|
|
1033
1042
|
}), /* @__PURE__ */ description("A child service (docs/usage/operations.md#child-service-crashes)."));
|
|
1034
1043
|
var ConnectionSchema = /* @__PURE__ */ object({
|
|
@@ -1044,7 +1053,7 @@ var InputAvailabilitySchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
|
1044
1053
|
var StatusSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
1045
1054
|
bridge: /* @__PURE__ */ object({
|
|
1046
1055
|
version: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ description("Package version of the bridge."), /* @__PURE__ */ examples(["0.3.0"])),
|
|
1047
|
-
apiVersion: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ description("`<major>.<minor>` of this API."), /* @__PURE__ */ examples([
|
|
1056
|
+
apiVersion: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ description("`<major>.<minor>` of this API."), /* @__PURE__ */ examples([API_VERSION])),
|
|
1048
1057
|
state: /* @__PURE__ */ pipe(/* @__PURE__ */ picklist(BRIDGE_STATES), /* @__PURE__ */ description("`ready`: startup finished, each enabled child service is running or has failed. It doesn't say that anything works: check the services' `state` and, for the screen reader, `tcp`.")),
|
|
1049
1058
|
startedAt: /* @__PURE__ */ pipe(timestamp, /* @__PURE__ */ description("When this bridge run started. Added in API 1.4."))
|
|
1050
1059
|
}),
|
|
@@ -1073,6 +1082,6 @@ var StatusSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
|
|
|
1073
1082
|
focus: /* @__PURE__ */ pipe(InputAvailabilitySchema, /* @__PURE__ */ description("`POST /input/focus` (koffi, Windows only)."))
|
|
1074
1083
|
}), /* @__PURE__ */ description("Native input (docs/usage/native-input.md). When a feature is not available, its endpoints answer `409 INPUT_DISABLED`. Added in API 1.24."))
|
|
1075
1084
|
}), /* @__PURE__ */ description("`GET /status`. `playwright` since API 1.1, `mcp` since 1.2, `session` since 1.3, `input` since 1.24, `tcp.lastSpeechAt` and the services’ `lastError` since 1.33."));
|
|
1076
|
-
export { StartSessionResponseSchema as a, MarkerRequestSchema as c, AnyErrorBodySchema as d, ConfigOverridesSchema as f, safeParse as g, getDotPath as h, StartSessionRequestSchema as i, SpeechEntrySchema as l, ConfigSchema as m, CLIENT_HEADER as n, InputCaptureSchema as o, ConfigPatchSchema as p, SessionListSchema as r, KeysRequestSchema as s, StatusSchema as t, SpeechListSchema as u };
|
|
1085
|
+
export { API_PREFIX as _, StartSessionResponseSchema as a, MarkerRequestSchema as c, AnyErrorBodySchema as d, ConfigOverridesSchema as f, safeParse as g, getDotPath as h, StartSessionRequestSchema as i, SpeechEntrySchema as l, ConfigSchema as m, CLIENT_HEADER as n, InputCaptureSchema as o, ConfigPatchSchema as p, SessionListSchema as r, KeysRequestSchema as s, StatusSchema as t, SpeechListSchema as u };
|
|
1077
1086
|
|
|
1078
1087
|
//# sourceMappingURL=src.js.map
|