reactor-effect-client 0.2.0 → 0.3.0-rc.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.
- package/README.md +62 -6
- package/dist/FetchHttp.js +1 -1
- package/dist/FetchHttp.js.map +1 -1
- package/dist/PeerFactory.d.ts +13 -2
- package/dist/PeerFactory.d.ts.map +1 -1
- package/dist/PeerFactory.js.map +1 -1
- package/dist/PeerTypes.d.ts +2 -2
- package/dist/PeerTypes.d.ts.map +1 -1
- package/dist/Sequence.d.ts +18 -14
- package/dist/Sequence.d.ts.map +1 -1
- package/dist/Sequence.js +117 -122
- package/dist/Sequence.js.map +1 -1
- package/dist/SessionTypes.d.ts +168 -15
- package/dist/SessionTypes.d.ts.map +1 -1
- package/dist/SessionTypes.js +18 -1
- package/dist/SessionTypes.js.map +1 -1
- package/dist/bytes.js +3 -3
- package/dist/bytes.js.map +1 -1
- package/dist/contract.d.ts +120 -29
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +105 -73
- package/dist/contract.js.map +1 -1
- package/dist/coordinator/_internal/client.d.ts +111 -17
- package/dist/coordinator/_internal/client.d.ts.map +1 -1
- package/dist/coordinator/_internal/client.js +187 -74
- package/dist/coordinator/_internal/client.js.map +1 -1
- package/dist/coordinator/_internal/recording.d.ts +33 -0
- package/dist/coordinator/_internal/recording.d.ts.map +1 -0
- package/dist/coordinator/_internal/recording.js +123 -0
- package/dist/coordinator/_internal/recording.js.map +1 -0
- package/dist/coordinator/_internal/response.d.ts.map +1 -1
- package/dist/coordinator/_internal/response.js +5 -7
- package/dist/coordinator/_internal/response.js.map +1 -1
- package/dist/coordinator/_internal/schemas.d.ts +40 -6
- package/dist/coordinator/_internal/schemas.d.ts.map +1 -1
- package/dist/coordinator/_internal/schemas.js +94 -64
- package/dist/coordinator/_internal/schemas.js.map +1 -1
- package/dist/coordinator/index.d.ts +14 -2
- package/dist/coordinator/index.d.ts.map +1 -1
- package/dist/coordinator/index.js +14 -18
- package/dist/coordinator/index.js.map +1 -1
- package/dist/correlation.d.ts +15 -0
- package/dist/correlation.d.ts.map +1 -1
- package/dist/correlation.js +26 -8
- package/dist/correlation.js.map +1 -1
- package/dist/duration.d.ts +25 -0
- package/dist/duration.d.ts.map +1 -0
- package/dist/duration.js +47 -0
- package/dist/duration.js.map +1 -0
- package/dist/errors.d.ts +1264 -49
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +698 -46
- package/dist/errors.js.map +1 -1
- package/dist/h3/_internal/client.d.ts +2 -2
- package/dist/h3/_internal/client.d.ts.map +1 -1
- package/dist/h3/_internal/client.js +210 -125
- package/dist/h3/_internal/client.js.map +1 -1
- package/dist/h3/_internal/contracts.d.ts.map +1 -1
- package/dist/h3/_internal/contracts.js +2 -2
- package/dist/h3/_internal/contracts.js.map +1 -1
- package/dist/h3/_internal/deployment.d.ts.map +1 -1
- package/dist/h3/_internal/deployment.js +5 -4
- package/dist/h3/_internal/deployment.js.map +1 -1
- package/dist/h3/_internal/evidence.js +1 -1
- package/dist/h3/_internal/evidence.js.map +1 -1
- package/dist/h3/_internal/operations.d.ts +48 -0
- package/dist/h3/_internal/operations.d.ts.map +1 -0
- package/dist/h3/_internal/operations.js +230 -0
- package/dist/h3/_internal/operations.js.map +1 -0
- package/dist/h3/_internal/references.d.ts.map +1 -1
- package/dist/h3/_internal/references.js +3 -8
- package/dist/h3/_internal/references.js.map +1 -1
- package/dist/h3/_internal/request.js +1 -1
- package/dist/h3/_internal/request.js.map +1 -1
- package/dist/h3/_internal/retained.d.ts +22 -0
- package/dist/h3/_internal/retained.d.ts.map +1 -0
- package/dist/h3/_internal/retained.js +89 -0
- package/dist/h3/_internal/retained.js.map +1 -0
- package/dist/h3/_internal/state.d.ts +15 -1
- package/dist/h3/_internal/state.d.ts.map +1 -1
- package/dist/h3/_internal/state.js +69 -29
- package/dist/h3/_internal/state.js.map +1 -1
- package/dist/h3/index.d.ts +1 -1
- package/dist/h3/index.d.ts.map +1 -1
- package/dist/h3/messages.d.ts +118 -109
- package/dist/h3/messages.d.ts.map +1 -1
- package/dist/h3/messages.js +73 -51
- package/dist/h3/messages.js.map +1 -1
- package/dist/h3/types.d.ts +108 -13
- package/dist/h3/types.d.ts.map +1 -1
- package/dist/host.d.ts +6 -6
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +4 -5
- package/dist/host.js.map +1 -1
- package/dist/index.d.ts +11 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/json.d.ts +13 -6
- package/dist/json.d.ts.map +1 -1
- package/dist/json.js +34 -14
- package/dist/json.js.map +1 -1
- package/dist/media-stream.d.ts.map +1 -1
- package/dist/media-stream.js +9 -11
- package/dist/media-stream.js.map +1 -1
- package/dist/observation.d.ts +9 -0
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +20 -18
- package/dist/observation.js.map +1 -1
- package/dist/orchestration/h3-source.d.ts +32 -4
- package/dist/orchestration/h3-source.d.ts.map +1 -1
- package/dist/orchestration/h3-source.js +47 -14
- package/dist/orchestration/h3-source.js.map +1 -1
- package/dist/orchestration/index.d.ts +9 -6
- package/dist/orchestration/index.d.ts.map +1 -1
- package/dist/orchestration/index.js +5 -3
- package/dist/orchestration/index.js.map +1 -1
- package/dist/orchestration/media-buffer.d.ts +12 -4
- package/dist/orchestration/media-buffer.d.ts.map +1 -1
- package/dist/orchestration/media-buffer.js +31 -11
- package/dist/orchestration/media-buffer.js.map +1 -1
- package/dist/orchestration/open-h3.d.ts +65 -0
- package/dist/orchestration/open-h3.d.ts.map +1 -0
- package/dist/orchestration/open-h3.js +65 -0
- package/dist/orchestration/open-h3.js.map +1 -0
- package/dist/orchestration/references.d.ts +5 -1
- package/dist/orchestration/references.d.ts.map +1 -1
- package/dist/orchestration/references.js +37 -34
- package/dist/orchestration/references.js.map +1 -1
- package/dist/orchestration/renewal-state.js +1 -1
- package/dist/orchestration/renewal-state.js.map +1 -1
- package/dist/orchestration/renewal.d.ts +64 -64
- package/dist/orchestration/renewal.d.ts.map +1 -1
- package/dist/orchestration/renewal.js +149 -88
- package/dist/orchestration/renewal.js.map +1 -1
- package/dist/orchestration/request.d.ts +11 -12
- package/dist/orchestration/request.d.ts.map +1 -1
- package/dist/orchestration/request.js +63 -66
- package/dist/orchestration/request.js.map +1 -1
- package/dist/orchestration/routing.d.ts.map +1 -1
- package/dist/orchestration/routing.js +17 -14
- package/dist/orchestration/routing.js.map +1 -1
- package/dist/orchestration/source-slot.d.ts +15 -5
- package/dist/orchestration/source-slot.d.ts.map +1 -1
- package/dist/orchestration/source-slot.js +40 -21
- package/dist/orchestration/source-slot.js.map +1 -1
- package/dist/orchestration/types.d.ts +594 -39
- package/dist/orchestration/types.d.ts.map +1 -1
- package/dist/orchestration/types.js +20 -0
- package/dist/orchestration/types.js.map +1 -1
- package/dist/protobuf.js +2 -2
- package/dist/protobuf.js.map +1 -1
- package/dist/session/_internal/acquire.d.ts +4 -6
- package/dist/session/_internal/acquire.d.ts.map +1 -1
- package/dist/session/_internal/acquire.js +40 -50
- package/dist/session/_internal/acquire.js.map +1 -1
- package/dist/session/_internal/cleanup.d.ts +2 -1
- package/dist/session/_internal/cleanup.d.ts.map +1 -1
- package/dist/session/_internal/cleanup.js +23 -15
- package/dist/session/_internal/cleanup.js.map +1 -1
- package/dist/session/_internal/lifecycle.d.ts +5 -0
- package/dist/session/_internal/lifecycle.d.ts.map +1 -1
- package/dist/session/_internal/lifecycle.js +16 -6
- package/dist/session/_internal/lifecycle.js.map +1 -1
- package/dist/session/_internal/remote.d.ts.map +1 -1
- package/dist/session/_internal/remote.js +16 -7
- package/dist/session/_internal/remote.js.map +1 -1
- package/dist/session/_internal/uploads.d.ts +4 -1
- package/dist/session/_internal/uploads.d.ts.map +1 -1
- package/dist/session/_internal/uploads.js +25 -27
- package/dist/session/_internal/uploads.js.map +1 -1
- package/dist/session/commands.d.ts +1 -21
- package/dist/session/commands.d.ts.map +1 -1
- package/dist/session/commands.js +1 -12
- package/dist/session/commands.js.map +1 -1
- package/dist/session/files.d.ts +10 -2
- package/dist/session/files.d.ts.map +1 -1
- package/dist/session/files.js +11 -16
- package/dist/session/files.js.map +1 -1
- package/dist/session/index.d.ts +6 -6
- package/dist/session/index.d.ts.map +1 -1
- package/dist/session/index.js.map +1 -1
- package/dist/session/media.d.ts +53 -6
- package/dist/session/media.d.ts.map +1 -1
- package/dist/session/recorder.d.ts +24 -0
- package/dist/session/recorder.d.ts.map +1 -0
- package/dist/session/recorder.js +19 -0
- package/dist/session/recorder.js.map +1 -0
- package/dist/session.d.ts +5 -4
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +208 -109
- package/dist/session.js.map +1 -1
- package/dist/simulation/_internal/source.d.ts.map +1 -1
- package/dist/simulation/_internal/source.js +57 -48
- package/dist/simulation/_internal/source.js.map +1 -1
- package/dist/simulation/index.d.ts +4 -5
- package/dist/simulation/index.d.ts.map +1 -1
- package/dist/simulation/index.js +3 -4
- package/dist/simulation/index.js.map +1 -1
- package/dist/simulation/types.d.ts +16 -2
- package/dist/simulation/types.d.ts.map +1 -1
- package/dist/stats.d.ts.map +1 -1
- package/dist/stats.js +4 -5
- package/dist/stats.js.map +1 -1
- package/package.json +5 -4
- package/notices/owned-webrtc/Effect-MIT.txt +0 -21
- package/notices/owned-webrtc/IETF.txt +0 -43
- package/notices/owned-webrtc/LICENSE +0 -21
- package/notices/owned-webrtc/UPSTREAM.md +0 -20
- package/notices/owned-webrtc/VP8-ADAPTATION.md +0 -32
- package/notices/owned-webrtc/VP8-AUTHORS.txt +0 -42
- package/notices/owned-webrtc/VP8-LICENSE.txt +0 -25
- package/notices/owned-webrtc/VP8-PATENTS.txt +0 -21
- package/notices/owned-webrtc/Werift-MIT.txt +0 -21
- package/notices/owned-webrtc/libvpx-v1.12.0-LICENSE.txt +0 -28
- package/notices/owned-webrtc/libvpx-v1.12.0-PATENTS.txt +0 -22
- package/notices/owned-webrtc/rfc3711.txt +0 -3139
- package/notices/owned-webrtc/str0m-MIT.txt +0 -7
package/dist/contract.js
CHANGED
|
@@ -1,87 +1,119 @@
|
|
|
1
|
+
import * as Option from "effect/Option";
|
|
2
|
+
import * as Predicate from "effect/Predicate";
|
|
3
|
+
import * as Result from "effect/Result";
|
|
4
|
+
import * as Schema from "effect/Schema";
|
|
5
|
+
import * as SchemaTransformation from "effect/SchemaTransformation";
|
|
1
6
|
import { ReactorError } from "./errors.js";
|
|
2
|
-
import {
|
|
7
|
+
import { json, jsonObject } from "./json.js";
|
|
3
8
|
export const SDK_PIN = "24f1865b48f03354b15402731f1b92e90ceee92a";
|
|
4
9
|
export const RUNTIME_PIN = "8e98536c6daedca298700dc45cbb5fd9e3676f16";
|
|
5
10
|
export const CLIENT_INFO = Object.freeze({
|
|
6
11
|
sdk_version: "0.1.0",
|
|
7
12
|
sdk_type: "typescript-effect-independent",
|
|
8
13
|
});
|
|
14
|
+
/**
|
|
15
|
+
* A field the provider sends as `null` or omits for the same fact: both decode
|
|
16
|
+
* as absent, so the decoded value omits it.
|
|
17
|
+
*/
|
|
18
|
+
const NullAsAbsent = (schema) => Schema.optionalKey(Schema.NullOr(schema)).pipe(Schema.decodeTo(Schema.optionalKey(Schema.toType(schema)), SchemaTransformation.transformOptional({
|
|
19
|
+
decode: Option.filter(Predicate.isNotNull),
|
|
20
|
+
encode: (value) => value,
|
|
21
|
+
})));
|
|
22
|
+
const Uint32 = Schema.Int.check(Schema.isBetween({ minimum: 0, maximum: 0xffffffff }));
|
|
23
|
+
export const Track = Schema.Struct({
|
|
24
|
+
name: Schema.NonEmptyString,
|
|
25
|
+
kind: Schema.Literals(["audio", "video"]),
|
|
26
|
+
direction: Schema.Literals(["recvonly", "sendonly"]),
|
|
27
|
+
});
|
|
28
|
+
/** A track and the media section a host negotiated for it. */
|
|
29
|
+
export const Mapping = Schema.Struct({ ...Track.fields, mid: Schema.String });
|
|
30
|
+
export const Capabilities = Schema.Struct({
|
|
31
|
+
protocol_version: Schema.NonEmptyString,
|
|
32
|
+
tracks: Schema.Array(Track).check(Schema.isMaxLength(64), Schema.makeFilter((tracks) => new Set(tracks.map((track) => track.name)).size === tracks.length
|
|
33
|
+
? undefined
|
|
34
|
+
: "duplicate track names are ambiguous for named track operations")),
|
|
35
|
+
commands: NullAsAbsent(Schema.Array(Schema.Struct({
|
|
36
|
+
name: Schema.NonEmptyString,
|
|
37
|
+
description: NullAsAbsent(Schema.String),
|
|
38
|
+
schema: Schema.optionalKey(Schema.Json),
|
|
39
|
+
}))),
|
|
40
|
+
emission_fps: NullAsAbsent(Schema.Finite),
|
|
41
|
+
});
|
|
42
|
+
/** A create reply's session id alone, so ownership never depends on the reply's later fields. */
|
|
43
|
+
export const Allocated = Schema.Struct({ session_id: Schema.NonEmptyString });
|
|
44
|
+
/** The decoded fields of a session descriptor. */
|
|
45
|
+
export const SessionDescriptor = Schema.Struct({
|
|
46
|
+
session_id: Schema.NonEmptyString,
|
|
47
|
+
/** Unknown future state values remain available, rather than becoming a made-up known state. */
|
|
48
|
+
state: Schema.NonEmptyString,
|
|
49
|
+
capabilities: NullAsAbsent(Capabilities),
|
|
50
|
+
selected_transport: NullAsAbsent(Schema.Struct({ protocol: Schema.NonEmptyString, version: Schema.NonEmptyString })),
|
|
51
|
+
});
|
|
52
|
+
export const IceServers = Schema.Struct({
|
|
53
|
+
ice_servers: Schema.Array(Schema.Struct({
|
|
54
|
+
uris: Schema.Array(Schema.NonEmptyString),
|
|
55
|
+
credentials: NullAsAbsent(Schema.Struct({ username: Schema.String, password: Schema.String })),
|
|
56
|
+
})).check(Schema.isMaxLength(64)),
|
|
57
|
+
});
|
|
58
|
+
export const Registered = Schema.Struct({ connection_id: Uint32 });
|
|
59
|
+
export const SdpAnswer = Schema.Struct({
|
|
60
|
+
sdp_answer: Schema.NonEmptyString,
|
|
61
|
+
connection_id: NullAsAbsent(Uint32),
|
|
62
|
+
});
|
|
63
|
+
/** A presigned upload slot. */
|
|
64
|
+
export const UploadSlot = Schema.Struct({
|
|
65
|
+
presigned_id: Schema.NonEmptyString,
|
|
66
|
+
presigned_url: Schema.NonEmptyString,
|
|
67
|
+
path: Schema.String,
|
|
68
|
+
});
|
|
69
|
+
/** A key exchange's reply. */
|
|
70
|
+
export const Exchanged = Schema.Struct({ jwt: Schema.NonEmptyString });
|
|
9
71
|
export const terminal = (state) => state === "CLOSED" || state === "INACTIVE";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return
|
|
72
|
+
const deepFreeze = (value) => {
|
|
73
|
+
if (value !== null && typeof value === "object" && !Object.isFrozen(value)) {
|
|
74
|
+
for (const child of Object.values(value))
|
|
75
|
+
deepFreeze(child);
|
|
76
|
+
Object.freeze(value);
|
|
77
|
+
}
|
|
78
|
+
return value;
|
|
17
79
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
? {}
|
|
32
|
-
: { description: string(x.description, "command.description") }),
|
|
33
|
-
...(raw.schema === undefined ? {} : { schema: raw.schema }),
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
return Object.freeze({
|
|
37
|
-
protocol_version: nonempty(c.protocol_version, "capabilities.protocol_version"),
|
|
38
|
-
tracks: Object.freeze(tracks),
|
|
39
|
-
...(commands === undefined ? {} : { commands: Object.freeze(commands) }),
|
|
40
|
-
...(c.emission_fps == null ? {} : { emission_fps: finite(c.emission_fps, "emission_fps") }),
|
|
41
|
-
});
|
|
80
|
+
/**
|
|
81
|
+
* Decode a reply, already copied by the bounded JSON walker, through its
|
|
82
|
+
* Schema. A mismatch is `Protocol`, with a message the library writes and the
|
|
83
|
+
* `SchemaError`, which names the path but no input value, kept in `detail`.
|
|
84
|
+
*/
|
|
85
|
+
const decoder = (schema, what) => {
|
|
86
|
+
const decode = Schema.decodeUnknownResult(schema);
|
|
87
|
+
return (value) => {
|
|
88
|
+
const decoded = decode(value);
|
|
89
|
+
if (Result.isFailure(decoded))
|
|
90
|
+
throw ReactorError.fromCode("Protocol", `invalid ${what}`, { detail: decoded.failure });
|
|
91
|
+
return deepFreeze(decoded.success);
|
|
92
|
+
};
|
|
42
93
|
};
|
|
94
|
+
const decodeAllocated = decoder(Allocated, "create reply");
|
|
95
|
+
const decodeDescriptor = decoder(SessionDescriptor, "session descriptor");
|
|
96
|
+
const decodeCapabilities = decoder(Capabilities, "capabilities");
|
|
97
|
+
const decodeIceServers = decoder(IceServers, "ICE servers reply");
|
|
98
|
+
const decodeRegistered = decoder(Registered, "connection reply");
|
|
99
|
+
const decodeAnswer = decoder(SdpAnswer, "SDP answer");
|
|
100
|
+
const decodeUploadSlot = decoder(UploadSlot, "upload allocation");
|
|
101
|
+
const decodeExchanged = decoder(Exchanged, "key exchange reply");
|
|
102
|
+
export const parseCapabilities = (input) => decodeCapabilities(json(input));
|
|
103
|
+
export const parseSessionId = (input) => decodeAllocated(json(input)).session_id;
|
|
43
104
|
export const parseDescriptor = (input) => {
|
|
44
|
-
const raw = jsonObject(input)
|
|
45
|
-
|
|
46
|
-
return Object.freeze({
|
|
47
|
-
session_id: nonempty(d.session_id, "session_id"),
|
|
48
|
-
state: nonempty(d.state, "session.state"),
|
|
49
|
-
raw,
|
|
50
|
-
...(d.capabilities == null ? {} : { capabilities: parseCapabilities(d.capabilities) }),
|
|
51
|
-
...(transport === undefined
|
|
52
|
-
? {}
|
|
53
|
-
: {
|
|
54
|
-
selected_transport: Object.freeze({
|
|
55
|
-
protocol: nonempty(transport.protocol, "transport.protocol"),
|
|
56
|
-
version: nonempty(transport.version, "transport.version"),
|
|
57
|
-
}),
|
|
58
|
-
}),
|
|
59
|
-
});
|
|
105
|
+
const raw = jsonObject(input);
|
|
106
|
+
return Object.freeze({ ...decodeDescriptor(raw), raw });
|
|
60
107
|
};
|
|
61
|
-
export const parseIce = (input) =>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (server.credentials == null)
|
|
68
|
-
return { urls };
|
|
69
|
-
const auth = record(server.credentials, "ICE credentials");
|
|
70
|
-
return {
|
|
71
|
-
urls,
|
|
72
|
-
username: string(auth.username, "ICE username"),
|
|
73
|
-
credential: string(auth.password, "ICE password"),
|
|
74
|
-
};
|
|
108
|
+
export const parseIce = (input) => decodeIceServers(json(input)).ice_servers.map((server) => server.credentials === undefined
|
|
109
|
+
? { urls: [...server.uris] }
|
|
110
|
+
: {
|
|
111
|
+
urls: [...server.uris],
|
|
112
|
+
username: server.credentials.username,
|
|
113
|
+
credential: server.credentials.password,
|
|
75
114
|
});
|
|
76
|
-
|
|
77
|
-
export const
|
|
78
|
-
export const
|
|
79
|
-
|
|
80
|
-
return {
|
|
81
|
-
sdp_answer: nonempty(answer.sdp_answer, "sdp_answer"),
|
|
82
|
-
...(answer.connection_id == null
|
|
83
|
-
? {}
|
|
84
|
-
: { connection_id: uint32(answer.connection_id, "connection_id") }),
|
|
85
|
-
};
|
|
86
|
-
};
|
|
115
|
+
export const parseConnectionId = (input) => decodeRegistered(json(input)).connection_id;
|
|
116
|
+
export const parseAnswer = (input) => decodeAnswer(json(input));
|
|
117
|
+
export const parseUploadSlot = (input) => decodeUploadSlot(json(input));
|
|
118
|
+
export const parseExchangedToken = (input) => decodeExchanged(json(input)).jwt;
|
|
87
119
|
//# sourceMappingURL=contract.js.map
|
package/dist/contract.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC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CAAC;QACE,IAAI,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC;QACtB,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ;QACrC,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ;KACxC,CACN,CAAC;AAMJ,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAc,EAAU,EAAE,CAC1D,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAc,EAAyB,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAChG,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAc,EAA0B,EAAE,CACxE,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAChC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAc,EAAU,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC"}
|
|
@@ -1,25 +1,51 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
2
|
import * as Redacted from "effect/Redacted";
|
|
3
3
|
import * as CoreHttpClient from "effect/unstable/http/HttpClient";
|
|
4
|
+
import * as Duration from "effect/Duration";
|
|
5
|
+
import * as Schema from "effect/Schema";
|
|
4
6
|
import { ReactorError } from "../../errors.js";
|
|
5
7
|
import type { Json } from "../../json.js";
|
|
6
8
|
import { parseAnswer } from "../../contract.js";
|
|
7
9
|
import type { Descriptor, IceCandidate, IceServer, Mapping } from "../../contract.js";
|
|
8
10
|
import type { HttpReply } from "./response.js";
|
|
9
11
|
import type { TokenOptions } from "./schemas.js";
|
|
12
|
+
import type { DownloadedClip, DownloadOptions } from "./recording.js";
|
|
13
|
+
import type { ClipReady } from "../../wire.generated.js";
|
|
14
|
+
/** A bounded poll: each wait doubles from `initialDelay` up to `maxDelay`. */
|
|
10
15
|
export interface Poll {
|
|
11
16
|
readonly attempts: number;
|
|
12
|
-
|
|
13
|
-
readonly
|
|
17
|
+
/** The first wait, at most 1 minute. A bare number is milliseconds. */
|
|
18
|
+
readonly initialDelay: Duration.Input;
|
|
19
|
+
/** The longest wait, at most 1 minute. A bare number is milliseconds. */
|
|
20
|
+
readonly maxDelay: Duration.Input;
|
|
21
|
+
/** @deprecated Removed in 0.3.0: use `initialDelay` (a bare number is milliseconds). */
|
|
22
|
+
readonly initialMs?: never;
|
|
23
|
+
/** @deprecated Removed in 0.3.0: use `maxDelay` (a bare number is milliseconds). */
|
|
24
|
+
readonly maxMs?: never;
|
|
14
25
|
}
|
|
15
26
|
export declare const SESSION_POLL: Poll;
|
|
16
27
|
export declare const SDP_POLL: Poll;
|
|
28
|
+
/** A validated poll. */
|
|
29
|
+
interface Backoff {
|
|
30
|
+
readonly attempts: number;
|
|
31
|
+
readonly initialDelay: Duration.Duration;
|
|
32
|
+
readonly maxDelay: Duration.Duration;
|
|
33
|
+
}
|
|
17
34
|
export interface HttpOptions {
|
|
18
35
|
readonly apiUrl: string;
|
|
19
36
|
readonly local?: boolean;
|
|
20
37
|
/** Evaluated for each authenticated request, including signaling for local sessions. */
|
|
21
38
|
readonly credential?: Effect.Effect<string | undefined, ReactorError>;
|
|
22
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Bounds each coordinator request, from sending it to reading the whole
|
|
41
|
+
* response, at most 10 minutes. By default each operation has its own budget:
|
|
42
|
+
* 15 seconds, 8 seconds for pricing and tokens, 3 seconds for each
|
|
43
|
+
* termination request and 1 second for an inspection. A bare number is
|
|
44
|
+
* milliseconds.
|
|
45
|
+
*/
|
|
46
|
+
readonly requestTimeout?: Duration.Input | undefined;
|
|
47
|
+
/** @deprecated Removed in 0.3.0: use `requestTimeout` (a bare number is milliseconds). */
|
|
48
|
+
readonly requestTimeoutMs?: never;
|
|
23
49
|
readonly maxResponseBytes?: number;
|
|
24
50
|
readonly maxResponseChunks?: number;
|
|
25
51
|
readonly sessionPoll?: Poll;
|
|
@@ -35,32 +61,95 @@ interface Request {
|
|
|
35
61
|
readonly headers?: Readonly<Record<string, string>>;
|
|
36
62
|
readonly accepted?: readonly number[];
|
|
37
63
|
readonly maxBytes?: number;
|
|
38
|
-
|
|
64
|
+
/** This request's budget when the application configured none. */
|
|
65
|
+
readonly timeout?: Duration.Duration;
|
|
66
|
+
/** Observes the response status once it arrives, even if reading its body then fails. */
|
|
67
|
+
readonly onStatus?: (status: number) => void;
|
|
68
|
+
}
|
|
69
|
+
/** A create reply whose session id is valid; nothing else in it has been checked yet. */
|
|
70
|
+
export interface Allocation {
|
|
71
|
+
readonly sessionId: string;
|
|
72
|
+
readonly reply: unknown;
|
|
39
73
|
}
|
|
40
74
|
export interface UploadAllocation {
|
|
41
75
|
readonly presigned_id: string;
|
|
42
76
|
readonly presigned_url: string;
|
|
43
77
|
readonly path: string;
|
|
44
78
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
79
|
+
/**
|
|
80
|
+
* A remote termination verdict. As a Schema it encodes for persistence; its
|
|
81
|
+
* `error` encodes as diagnostic JSON, without provider text.
|
|
82
|
+
*/
|
|
83
|
+
export declare const Termination: Schema.Struct<{
|
|
84
|
+
readonly attempted: Schema.Boolean;
|
|
85
|
+
readonly responseReceived: Schema.Boolean;
|
|
86
|
+
readonly confirmed: Schema.Boolean;
|
|
87
|
+
readonly evidence: Schema.NullOr<Schema.Literals<readonly ["absent", "terminal"]>>;
|
|
50
88
|
/** DELETE/stop status; null means no response headers were received. */
|
|
51
|
-
readonly deleteStatus:
|
|
89
|
+
readonly deleteStatus: Schema.NullOr<Schema.Int>;
|
|
52
90
|
/** State from the independent confirmation, when it was valid. */
|
|
53
|
-
readonly state:
|
|
54
|
-
readonly error
|
|
91
|
+
readonly state: Schema.NullOr<Schema.String>;
|
|
92
|
+
readonly error: Schema.optionalKey<Schema.decodeTo<Schema.declare<ReactorError, ReactorError>, Schema.Codec<{
|
|
93
|
+
readonly _tag: "ReactorError";
|
|
94
|
+
readonly message: string;
|
|
95
|
+
readonly reason: {
|
|
96
|
+
readonly _tag: "Aborted" | "AlreadyReading" | "ChannelClosed" | "Closed" | "Disconnected" | "Indeterminate" | "InvalidInput" | "InvalidState" | "Overflow" | "Protocol" | "SdpRejected" | "Shutdown" | "TerminalSession" | "Timeout" | "UnexpectedReply" | "UnsupportedCapability" | "UnsupportedHost" | "Upload" | "VersionMismatch";
|
|
97
|
+
readonly message: string;
|
|
98
|
+
} | {
|
|
99
|
+
readonly _tag: "Http";
|
|
100
|
+
readonly message: string;
|
|
101
|
+
readonly status?: number;
|
|
102
|
+
readonly retryAfterMillis?: number;
|
|
103
|
+
} | {
|
|
104
|
+
readonly _tag: "RecorderDisabled" | "Remote";
|
|
105
|
+
readonly message: string;
|
|
106
|
+
readonly remoteCode?: string;
|
|
107
|
+
} | {
|
|
108
|
+
readonly _tag: "Native";
|
|
109
|
+
readonly message: string;
|
|
110
|
+
readonly status?: number;
|
|
111
|
+
} | {
|
|
112
|
+
readonly _tag: "IceFailed";
|
|
113
|
+
readonly message: string;
|
|
114
|
+
readonly pairs: number;
|
|
115
|
+
readonly candidateTypes: readonly string[];
|
|
116
|
+
} | {
|
|
117
|
+
readonly _tag: "TransportFailed";
|
|
118
|
+
readonly message: string;
|
|
119
|
+
readonly pairs: number;
|
|
120
|
+
} | {
|
|
121
|
+
readonly _tag: "ClipEnded";
|
|
122
|
+
readonly message: string;
|
|
123
|
+
readonly clipId: string;
|
|
124
|
+
readonly lifecycle: "clip_failed" | "clip_popped";
|
|
125
|
+
readonly transportGeneration: string;
|
|
126
|
+
};
|
|
127
|
+
readonly context: {
|
|
128
|
+
readonly operation?: string;
|
|
129
|
+
readonly requestId?: string;
|
|
130
|
+
readonly sessionId?: string;
|
|
131
|
+
readonly generation?: string;
|
|
132
|
+
readonly outcome?: "not-submitted" | "replied" | "unknown";
|
|
133
|
+
};
|
|
134
|
+
}, unknown, never, never>, never, never>>;
|
|
135
|
+
}>;
|
|
136
|
+
export interface Termination extends Schema.Schema.Type<typeof Termination> {
|
|
55
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* A termination verdict as span attributes. Terminate returns its verdict
|
|
140
|
+
* rather than failing, so a span that succeeds says nothing about whether a
|
|
141
|
+
* paid session stopped: these attributes do.
|
|
142
|
+
*/
|
|
143
|
+
export declare const terminationAttributes: (termination: Termination) => Record<string, unknown>;
|
|
56
144
|
/** Reactor HTTP protocol over the application-supplied Effect HTTP client. */
|
|
57
145
|
export declare class CoordinatorClient {
|
|
58
146
|
private readonly client;
|
|
59
147
|
readonly apiUrl: string;
|
|
60
148
|
readonly local: boolean;
|
|
61
|
-
readonly sessionPoll:
|
|
62
|
-
readonly sdpPoll:
|
|
63
|
-
|
|
149
|
+
readonly sessionPoll: Backoff;
|
|
150
|
+
readonly sdpPoll: Backoff;
|
|
151
|
+
/** The application's request budget, which replaces every operation's own. */
|
|
152
|
+
private readonly requestTimeout;
|
|
64
153
|
private readonly maxBytes;
|
|
65
154
|
private readonly maxChunks;
|
|
66
155
|
readonly options: HttpOptions;
|
|
@@ -70,10 +159,15 @@ export declare class CoordinatorClient {
|
|
|
70
159
|
transportPath(id: string): string;
|
|
71
160
|
request(request: Request): Effect.Effect<HttpReply, ReactorError>;
|
|
72
161
|
private jsonRequest;
|
|
162
|
+
/** Resolves once the reply names the allocated session; `describe` decodes the rest. */
|
|
73
163
|
create(model: {
|
|
74
164
|
readonly name: string;
|
|
75
165
|
readonly version?: string;
|
|
76
|
-
}, extraArgs?: Json): Effect.Effect<
|
|
166
|
+
}, extraArgs?: Json): Effect.Effect<Allocation, ReactorError>;
|
|
167
|
+
/** A reply that cannot describe its session still names one its owner must terminate. */
|
|
168
|
+
describe(allocation: Allocation): Effect.Effect<Descriptor, ReactorError>;
|
|
169
|
+
/** Assemble a prepared recording's bytes within a caller wall deadline. */
|
|
170
|
+
downloadClip(clip: ClipReady, options?: DownloadOptions): Effect.Effect<DownloadedClip, ReactorError>;
|
|
77
171
|
read(id: string): Effect.Effect<Descriptor, ReactorError>;
|
|
78
172
|
ready(id: string, initial?: Descriptor): Effect.Effect<Descriptor, ReactorError>;
|
|
79
173
|
iceServers(id: string): Effect.Effect<IceServer[], ReactorError>;
|
|
@@ -86,7 +180,7 @@ export declare class CoordinatorClient {
|
|
|
86
180
|
/** Both scoped sessions and external supervisors use this exact evidence algorithm. */
|
|
87
181
|
terminate(id: string): Effect.Effect<Termination>;
|
|
88
182
|
/** Pricing remains provider JSON; modelRate interprets only known rate units. */
|
|
89
|
-
pricing(): Effect.Effect<Json, ReactorError>;
|
|
183
|
+
get pricing(): Effect.Effect<Json, ReactorError>;
|
|
90
184
|
mintToken(input: TokenOptions): Effect.Effect<{
|
|
91
185
|
jwt: Redacted.Redacted<string>;
|
|
92
186
|
expiresAt: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/coordinator/_internal/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,cAAc,MAAM,iCAAiC,CAAC;AAMlE,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/coordinator/_internal/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,cAAc,MAAM,iCAAiC,CAAC;AAMlE,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAA+B,YAAY,EAAwB,MAAM,iBAAiB,CAAC;AAElG,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,O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