@the-open-engine/zeroshot 6.28.0 → 6.29.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/README.md +3 -3
- package/cli/index.js +20 -224
- package/docker/zeroshot-cluster/Dockerfile +2 -3
- package/lib/cluster/client.cjs +30 -7
- package/lib/cluster/client.d.cts +52 -0
- package/lib/cluster/client.d.mts +52 -0
- package/lib/cluster/client.d.ts +4 -6
- package/lib/cluster/client.mjs +32 -9
- package/lib/cluster/connection-state.cjs +25 -0
- package/lib/cluster/connection-state.d.cts +13 -0
- package/lib/cluster/connection-state.d.mts +13 -0
- package/lib/cluster/connection-state.d.ts +13 -0
- package/lib/cluster/connection-state.mjs +21 -0
- package/lib/cluster/connection-types.cjs +2 -0
- package/lib/cluster/connection-types.d.cts +33 -0
- package/lib/cluster/connection-types.d.mts +33 -0
- package/lib/cluster/connection-types.d.ts +33 -0
- package/lib/cluster/connection-types.mjs +1 -0
- package/lib/cluster/connection.cjs +18 -46
- package/lib/cluster/connection.d.cts +26 -0
- package/lib/cluster/connection.d.mts +26 -0
- package/lib/cluster/connection.d.ts +7 -25
- package/lib/cluster/connection.mjs +12 -42
- package/lib/cluster/errors.cjs +9 -1
- package/lib/cluster/errors.d.cts +29 -0
- package/lib/cluster/errors.d.mts +29 -0
- package/lib/cluster/errors.d.ts +4 -0
- package/lib/cluster/errors.mjs +7 -0
- package/lib/cluster/frames.d.cts +12 -0
- package/lib/cluster/frames.d.mts +12 -0
- package/lib/cluster/generated/protocol-schema.d.cts +1 -0
- package/lib/cluster/generated/protocol-schema.d.mts +1 -0
- package/lib/cluster/generated/protocol.d.cts +781 -0
- package/lib/cluster/generated/protocol.d.mts +781 -0
- package/lib/cluster/index.cjs +2 -2
- package/lib/cluster/index.d.cts +13 -0
- package/lib/cluster/index.d.mts +13 -0
- package/lib/cluster/index.d.ts +3 -3
- package/lib/cluster/index.mjs +2 -2
- package/lib/cluster/json-source.cjs +1 -0
- package/lib/cluster/json-source.d.cts +5 -0
- package/lib/cluster/json-source.d.mts +5 -0
- package/lib/cluster/json-source.d.ts +1 -0
- package/lib/cluster/json-source.mjs +1 -0
- package/lib/cluster/payload-value.cjs +1 -0
- package/lib/cluster/payload-value.d.cts +8 -0
- package/lib/cluster/payload-value.d.mts +8 -0
- package/lib/cluster/payload-value.d.ts +1 -0
- package/lib/cluster/payload-value.mjs +1 -0
- package/lib/cluster/queue.d.cts +15 -0
- package/lib/cluster/queue.d.mts +15 -0
- package/lib/cluster/socket.cjs +8 -0
- package/lib/cluster/socket.d.cts +13 -0
- package/lib/cluster/socket.d.mts +13 -0
- package/lib/cluster/socket.d.ts +2 -0
- package/lib/cluster/socket.mjs +7 -0
- package/lib/cluster/subscriptions.d.cts +73 -0
- package/lib/cluster/subscriptions.d.mts +73 -0
- package/lib/cluster/subscriptions.d.ts +5 -1
- package/lib/cluster/validators.cjs +1 -0
- package/lib/cluster/validators.d.cts +7 -0
- package/lib/cluster/validators.d.mts +7 -0
- package/lib/cluster/validators.d.ts +1 -0
- package/lib/cluster/validators.mjs +1 -0
- package/lib/cluster-worker/engine-adapter.js +1 -11
- package/lib/cluster-worker/engine-input.js +14 -0
- package/lib/hosted-session/authority.cjs +61 -0
- package/lib/hosted-session/authority.d.cts +3 -0
- package/lib/hosted-session/authority.d.mts +3 -0
- package/lib/hosted-session/authority.d.ts +3 -0
- package/lib/hosted-session/authority.mjs +57 -0
- package/lib/hosted-session/coordinator.cjs +78 -51
- package/lib/hosted-session/coordinator.d.cts +11 -0
- package/lib/hosted-session/coordinator.d.mts +11 -0
- package/lib/hosted-session/coordinator.d.ts +4 -2
- package/lib/hosted-session/coordinator.mjs +75 -51
- package/lib/hosted-session/errors.cjs +25 -0
- package/lib/hosted-session/errors.d.cts +10 -0
- package/lib/hosted-session/errors.d.mts +10 -0
- package/lib/hosted-session/errors.d.ts +10 -0
- package/lib/hosted-session/errors.mjs +19 -0
- package/lib/hosted-session/index.cjs +4 -1
- package/lib/hosted-session/index.d.cts +2 -0
- package/lib/hosted-session/index.d.mts +2 -0
- package/lib/hosted-session/index.d.ts +2 -2
- package/lib/hosted-session/index.mjs +1 -1
- package/lib/hosted-session/reconnecting-watch.cjs +131 -0
- package/lib/hosted-session/reconnecting-watch.d.cts +13 -0
- package/lib/hosted-session/reconnecting-watch.d.mts +13 -0
- package/lib/hosted-session/reconnecting-watch.d.ts +13 -0
- package/lib/hosted-session/reconnecting-watch.mjs +127 -0
- package/lib/hosted-session/types.d.cts +32 -0
- package/lib/hosted-session/types.d.mts +32 -0
- package/lib/hosted-session/types.d.ts +19 -7
- package/lib/hosted-target/access-url.cjs +44 -0
- package/lib/hosted-target/access-url.d.cts +2 -0
- package/lib/hosted-target/access-url.d.mts +2 -0
- package/lib/hosted-target/access-url.d.ts +2 -0
- package/lib/hosted-target/access-url.mjs +41 -0
- package/lib/hosted-target/adapter-request.cjs +12 -0
- package/lib/hosted-target/adapter-request.d.cts +17 -0
- package/lib/hosted-target/adapter-request.d.mts +17 -0
- package/lib/hosted-target/adapter-request.d.ts +17 -0
- package/lib/hosted-target/adapter-request.mjs +9 -0
- package/lib/hosted-target/adapter-types.cjs +2 -0
- package/lib/hosted-target/adapter-types.d.cts +27 -0
- package/lib/hosted-target/adapter-types.d.mts +27 -0
- package/lib/hosted-target/adapter-types.d.ts +27 -0
- package/lib/hosted-target/adapter-types.mjs +1 -0
- package/lib/hosted-target/bounds.cjs +10 -0
- package/lib/hosted-target/bounds.d.cts +7 -0
- package/lib/hosted-target/bounds.d.mts +7 -0
- package/lib/hosted-target/bounds.d.ts +7 -0
- package/lib/hosted-target/bounds.mjs +7 -0
- package/lib/hosted-target/capsule-error-response.cjs +76 -0
- package/lib/hosted-target/capsule-error-response.d.cts +2 -0
- package/lib/hosted-target/capsule-error-response.d.mts +2 -0
- package/lib/hosted-target/capsule-error-response.d.ts +2 -0
- package/lib/hosted-target/capsule-error-response.mjs +73 -0
- package/lib/hosted-target/errors.cjs +88 -0
- package/lib/hosted-target/errors.d.cts +36 -0
- package/lib/hosted-target/errors.d.mts +36 -0
- package/lib/hosted-target/errors.d.ts +36 -0
- package/lib/hosted-target/errors.mjs +75 -0
- package/lib/hosted-target/index.cjs +16 -0
- package/lib/hosted-target/index.d.cts +3 -0
- package/lib/hosted-target/index.d.mts +3 -0
- package/lib/hosted-target/index.d.ts +3 -0
- package/lib/hosted-target/index.mjs +2 -0
- package/lib/hosted-target/response-validation.cjs +169 -0
- package/lib/hosted-target/response-validation.d.cts +5 -0
- package/lib/hosted-target/response-validation.d.mts +5 -0
- package/lib/hosted-target/response-validation.d.ts +5 -0
- package/lib/hosted-target/response-validation.mjs +163 -0
- package/lib/hosted-target/retry-executor.cjs +51 -0
- package/lib/hosted-target/retry-executor.d.cts +8 -0
- package/lib/hosted-target/retry-executor.d.mts +8 -0
- package/lib/hosted-target/retry-executor.d.ts +8 -0
- package/lib/hosted-target/retry-executor.mjs +48 -0
- package/lib/hosted-target/retry.cjs +78 -0
- package/lib/hosted-target/retry.d.cts +9 -0
- package/lib/hosted-target/retry.d.mts +9 -0
- package/lib/hosted-target/retry.d.ts +9 -0
- package/lib/hosted-target/retry.mjs +73 -0
- package/lib/hosted-target/target-adapter.cjs +10 -0
- package/lib/hosted-target/target-adapter.d.cts +3 -0
- package/lib/hosted-target/target-adapter.d.mts +3 -0
- package/lib/hosted-target/target-adapter.d.ts +3 -0
- package/lib/hosted-target/target-adapter.mjs +7 -0
- package/lib/hosted-target/types.cjs +4 -0
- package/lib/hosted-target/types.d.cts +50 -0
- package/lib/hosted-target/types.d.mts +50 -0
- package/lib/hosted-target/types.d.ts +50 -0
- package/lib/hosted-target/types.mjs +1 -0
- package/lib/hosted-target/zero-cloud-v1-adapter.cjs +185 -0
- package/lib/hosted-target/zero-cloud-v1-adapter.d.cts +13 -0
- package/lib/hosted-target/zero-cloud-v1-adapter.d.mts +13 -0
- package/lib/hosted-target/zero-cloud-v1-adapter.d.ts +13 -0
- package/lib/hosted-target/zero-cloud-v1-adapter.mjs +181 -0
- package/lib/target/bounded-response.cjs +51 -0
- package/lib/target/bounded-response.d.cts +1 -0
- package/lib/target/bounded-response.d.mts +1 -0
- package/lib/target/bounded-response.d.ts +1 -0
- package/lib/target/bounded-response.js +51 -0
- package/lib/target/bounded-response.mjs +48 -0
- package/lib/target/credential-lock.js +1 -3
- package/lib/target/credential-store.js +9 -4
- package/lib/target/device-flow.cjs +213 -0
- package/lib/target/device-flow.d.cts +54 -0
- package/lib/target/device-flow.d.mts +54 -0
- package/lib/target/device-flow.d.ts +26 -10
- package/lib/target/device-flow.js +162 -53
- package/lib/target/device-flow.mjs +203 -0
- package/lib/target/discovery-errors.cjs +10 -0
- package/lib/target/discovery-errors.d.cts +3 -0
- package/lib/target/discovery-errors.d.mts +3 -0
- package/lib/target/discovery-errors.d.ts +3 -0
- package/lib/target/discovery-errors.js +10 -0
- package/lib/target/discovery-errors.mjs +6 -0
- package/lib/target/discovery-sections.cjs +191 -0
- package/lib/target/discovery-sections.d.cts +52 -0
- package/lib/target/discovery-sections.d.mts +52 -0
- package/lib/target/discovery-sections.d.ts +52 -0
- package/lib/target/discovery-sections.js +191 -0
- package/lib/target/discovery-sections.mjs +179 -0
- package/lib/target/discovery-validation.cjs +109 -0
- package/lib/target/discovery-validation.d.cts +28 -0
- package/lib/target/discovery-validation.d.mts +28 -0
- package/lib/target/discovery-validation.d.ts +28 -0
- package/lib/target/discovery-validation.js +109 -0
- package/lib/target/discovery-validation.mjs +99 -0
- package/lib/target/discovery.cjs +112 -0
- package/lib/target/discovery.d.cts +74 -0
- package/lib/target/discovery.d.mts +74 -0
- package/lib/target/discovery.d.ts +68 -5
- package/lib/target/discovery.js +93 -101
- package/lib/target/discovery.mjs +105 -0
- package/lib/target/index.d.ts +6 -6
- package/lib/target/index.js +36 -36
- package/lib/target/oauth-http.d.ts +2 -0
- package/lib/target/oauth-http.js +25 -0
- package/lib/target/refresh-exchange.d.ts +11 -0
- package/lib/target/refresh-exchange.js +24 -0
- package/lib/target/refresh-revocation.d.ts +8 -0
- package/lib/target/refresh-revocation.js +19 -0
- package/lib/target/route-template.cjs +85 -0
- package/lib/target/route-template.d.cts +7 -0
- package/lib/target/route-template.d.mts +7 -0
- package/lib/target/route-template.d.ts +7 -0
- package/lib/target/route-template.js +85 -0
- package/lib/target/route-template.mjs +81 -0
- package/lib/target/session-errors.d.ts +4 -0
- package/lib/target/session-errors.js +12 -0
- package/lib/target/session-verification.d.ts +10 -0
- package/lib/target/session-verification.js +42 -0
- package/lib/target/target-registry.d.ts +7 -3
- package/lib/target/target-registry.js +41 -10
- package/lib/target/target-session-manager.d.ts +48 -0
- package/lib/target/target-session-manager.js +226 -0
- package/lib/target/target-session.d.ts +39 -31
- package/lib/target/target-session.js +63 -150
- package/lib/target/token-response.cjs +51 -0
- package/lib/target/token-response.d.cts +7 -0
- package/lib/target/token-response.d.mts +7 -0
- package/lib/target/token-response.d.ts +7 -0
- package/lib/target/token-response.js +51 -0
- package/lib/target/token-response.mjs +48 -0
- package/package.json +16 -6
- package/scripts/audit-production-dependencies.js +150 -0
- package/scripts/build-cluster.js +23 -3
- package/scripts/opcore-agent-gate.js +159 -0
- package/scripts/opcore-agent-tool-overlays.js +154 -0
- package/scripts/opcore-introduced-check.js +288 -0
- package/src/cluster/client.ts +42 -15
- package/src/cluster/connection-state.ts +33 -0
- package/src/cluster/connection-types.ts +28 -0
- package/src/cluster/connection.ts +37 -68
- package/src/cluster/errors.ts +5 -0
- package/src/cluster/index.ts +3 -1
- package/src/cluster/json-source.ts +1 -0
- package/src/cluster/payload-value.ts +1 -0
- package/src/cluster/socket.ts +13 -0
- package/src/cluster/subscriptions.ts +7 -2
- package/src/cluster/validators.ts +1 -0
- package/src/cluster/ws.d.ts +1 -1
- package/src/hosted-session/authority.ts +77 -0
- package/src/hosted-session/coordinator.ts +113 -56
- package/src/hosted-session/errors.ts +21 -0
- package/src/hosted-session/index.ts +14 -2
- package/src/hosted-session/reconnecting-watch.ts +148 -0
- package/src/hosted-session/types.ts +22 -8
- package/src/hosted-target/access-url.ts +46 -0
- package/src/hosted-target/adapter-request.ts +28 -0
- package/src/hosted-target/adapter-types.ts +39 -0
- package/src/hosted-target/bounds.ts +1 -0
- package/src/hosted-target/capsule-error-response.ts +107 -0
- package/src/hosted-target/errors.ts +36 -35
- package/src/hosted-target/index.ts +10 -23
- package/src/hosted-target/response-validation.ts +170 -62
- package/src/hosted-target/retry-executor.ts +62 -0
- package/src/hosted-target/retry.ts +47 -11
- package/src/hosted-target/target-adapter.ts +12 -8
- package/src/hosted-target/types.ts +19 -18
- package/src/hosted-target/zero-cloud-v1-adapter.ts +229 -316
- package/src/target/bounded-response.ts +68 -0
- package/src/target/credential-lock.ts +1 -3
- package/src/target/credential-store.ts +14 -10
- package/src/target/device-flow.ts +206 -71
- package/src/target/discovery-errors.ts +6 -0
- package/src/target/discovery-sections.ts +251 -0
- package/src/target/discovery-validation.ts +144 -0
- package/src/target/discovery.ts +163 -115
- package/src/target/index.ts +15 -11
- package/src/target/oauth-http.ts +27 -0
- package/src/target/refresh-exchange.ts +36 -0
- package/src/target/refresh-revocation.ts +29 -0
- package/src/target/route-template.ts +105 -0
- package/src/target/session-errors.ts +9 -0
- package/src/target/session-verification.ts +51 -0
- package/src/target/target-registry.ts +60 -27
- package/src/target/target-session-manager.ts +285 -0
- package/src/target/target-session.ts +105 -222
- package/src/target/token-response.ts +62 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ClusterConfigError } from '../cluster/index.mjs';
|
|
2
|
+
const LOOPBACK_HOSTS = Object.freeze({
|
|
3
|
+
'127.0.0.1': true,
|
|
4
|
+
'::1': true,
|
|
5
|
+
'[::1]': true,
|
|
6
|
+
});
|
|
7
|
+
function parseCanonicalUrl(value, message, code) {
|
|
8
|
+
try {
|
|
9
|
+
if (/[\u0000-\u0020\u007f]/.test(value))
|
|
10
|
+
throw new TypeError('unsafe URL code point');
|
|
11
|
+
const url = new URL(value);
|
|
12
|
+
if (url.href !== value && url.origin !== value)
|
|
13
|
+
throw new TypeError('non-canonical URL');
|
|
14
|
+
return url;
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
throw new ClusterConfigError(message, code);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function hasOriginSuffix(url) {
|
|
21
|
+
return Boolean(url.username ||
|
|
22
|
+
url.password ||
|
|
23
|
+
url.pathname !== '/' ||
|
|
24
|
+
url.search ||
|
|
25
|
+
url.hash);
|
|
26
|
+
}
|
|
27
|
+
export function normalizedAuthority(value) {
|
|
28
|
+
const message = 'targetAuthority must be an HTTPS or literal-loopback HTTP origin';
|
|
29
|
+
const url = parseCanonicalUrl(value, message, 'INVALID_TARGET_AUTHORITY');
|
|
30
|
+
const loopbackHttp = url.protocol === 'http:' && LOOPBACK_HOSTS[url.hostname] === true;
|
|
31
|
+
if ((url.protocol !== 'https:' && !loopbackHttp) || hasOriginSuffix(url) ||
|
|
32
|
+
value !== url.origin) {
|
|
33
|
+
throw new ClusterConfigError(message, 'INVALID_TARGET_AUTHORITY');
|
|
34
|
+
}
|
|
35
|
+
return url.origin;
|
|
36
|
+
}
|
|
37
|
+
function accessAuthorityMatches(endpoint, target) {
|
|
38
|
+
const expectedProtocol = target.protocol === 'http:' ? 'ws:' : 'wss:';
|
|
39
|
+
return (endpoint.protocol === expectedProtocol &&
|
|
40
|
+
endpoint.host === target.host &&
|
|
41
|
+
!endpoint.username &&
|
|
42
|
+
!endpoint.password &&
|
|
43
|
+
!endpoint.search &&
|
|
44
|
+
!endpoint.hash);
|
|
45
|
+
}
|
|
46
|
+
export function validateHostedAccess(access, targetAuthority) {
|
|
47
|
+
const endpoint = parseCanonicalUrl(access.websocketUrl, 'access endpoint must be an absolute target WebSocket URL', 'INVALID_ACCESS_ENDPOINT');
|
|
48
|
+
if (endpoint.href !== access.websocketUrl ||
|
|
49
|
+
!accessAuthorityMatches(endpoint, new URL(targetAuthority))) {
|
|
50
|
+
throw new ClusterConfigError('access endpoint must remain on the exact target authority', 'INVALID_ACCESS_ENDPOINT');
|
|
51
|
+
}
|
|
52
|
+
if (access.protocol !== 'openengine.cluster/v1' ||
|
|
53
|
+
access.tokenType !== 'Bearer' ||
|
|
54
|
+
access.accessToken.length === 0) {
|
|
55
|
+
throw new ClusterConfigError('access grant does not match the hosted session contract', 'INVALID_ACCESS_GRANT');
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HostedSessionCoordinator = void 0;
|
|
3
|
+
exports.HostedSessionCoordinator = exports.HostedTransportUncertainError = exports.HostedAuthorizationError = exports.HostedAuthenticationError = void 0;
|
|
4
4
|
const index_js_1 = require("../cluster/index.cjs");
|
|
5
|
+
const authority_js_1 = require("./authority.cjs");
|
|
6
|
+
const errors_js_1 = require("./errors.cjs");
|
|
7
|
+
const reconnecting_watch_js_1 = require("./reconnecting-watch.cjs");
|
|
8
|
+
var errors_js_2 = require("./errors.cjs");
|
|
9
|
+
Object.defineProperty(exports, "HostedAuthenticationError", { enumerable: true, get: function () { return errors_js_2.HostedAuthenticationError; } });
|
|
10
|
+
Object.defineProperty(exports, "HostedAuthorizationError", { enumerable: true, get: function () { return errors_js_2.HostedAuthorizationError; } });
|
|
11
|
+
Object.defineProperty(exports, "HostedTransportUncertainError", { enumerable: true, get: function () { return errors_js_2.HostedTransportUncertainError; } });
|
|
5
12
|
function combineSignals(signals) {
|
|
6
|
-
const defined = signals.filter((
|
|
13
|
+
const defined = signals.filter((signal) => signal !== undefined);
|
|
7
14
|
if (defined.length === 0)
|
|
8
15
|
return undefined;
|
|
9
16
|
if (defined.length === 1)
|
|
@@ -11,15 +18,18 @@ function combineSignals(signals) {
|
|
|
11
18
|
return AbortSignal.any(defined);
|
|
12
19
|
}
|
|
13
20
|
class HostedSessionCoordinator {
|
|
14
|
-
#
|
|
15
|
-
#
|
|
21
|
+
#init;
|
|
22
|
+
#targetAuthority;
|
|
16
23
|
#clock;
|
|
17
24
|
#closeController = new AbortController();
|
|
25
|
+
#sessions = new Set();
|
|
18
26
|
#referenceCapabilities;
|
|
19
27
|
#closed = false;
|
|
20
28
|
constructor(init) {
|
|
21
|
-
|
|
22
|
-
|
|
29
|
+
if (init.capsuleId.length === 0)
|
|
30
|
+
throw new index_js_1.ClusterConfigError('capsuleId must not be empty', 'INVALID_CAPSULE_ID');
|
|
31
|
+
this.#init = init;
|
|
32
|
+
this.#targetAuthority = (0, authority_js_1.normalizedAuthority)(init.targetAuthority);
|
|
23
33
|
this.#clock = init.clock ?? Date;
|
|
24
34
|
}
|
|
25
35
|
async open(signal) {
|
|
@@ -31,66 +41,83 @@ class HostedSessionCoordinator {
|
|
|
31
41
|
async replace(signal) {
|
|
32
42
|
this.#requireNotClosed();
|
|
33
43
|
const session = await this.#createSession(signal);
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
try {
|
|
45
|
+
if (this.#referenceCapabilities !== undefined) {
|
|
46
|
+
this.#verifyCapabilities(this.#referenceCapabilities, session.initializeResult.capabilities);
|
|
47
|
+
}
|
|
48
|
+
return session;
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
await session.connection.close();
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
async watch(options) {
|
|
56
|
+
const session = await this.open(options.signal);
|
|
57
|
+
try {
|
|
58
|
+
const subscription = await session.client.watch(options.params, options.signal === undefined ? {} : { signal: options.signal });
|
|
59
|
+
const hosted = new reconnecting_watch_js_1.ReconnectingHostedWatch((replacementSignal) => this.replace(replacementSignal), session, subscription, options.signal);
|
|
60
|
+
options.signal?.addEventListener('abort', () => {
|
|
61
|
+
void hosted.cancel().catch(() => undefined);
|
|
62
|
+
}, { once: true });
|
|
63
|
+
if (options.signal?.aborted) {
|
|
64
|
+
await hosted.cancel();
|
|
65
|
+
throw options.signal.reason ?? new DOMException('hosted watch aborted', 'AbortError');
|
|
66
|
+
}
|
|
67
|
+
return hosted;
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
await session.connection.close();
|
|
71
|
+
throw error;
|
|
72
|
+
}
|
|
36
73
|
}
|
|
37
74
|
renewalDeadline(access, receivedAt) {
|
|
38
75
|
const expiresAt = Date.parse(access.expiresAt);
|
|
39
|
-
if (Number.
|
|
40
|
-
throw new index_js_1.ClusterConfigError(
|
|
76
|
+
if (!Number.isFinite(expiresAt) || expiresAt <= receivedAt) {
|
|
77
|
+
throw new index_js_1.ClusterConfigError('access expiry must be a future RFC 3339 timestamp', 'INVALID_ACCESS_EXPIRY');
|
|
41
78
|
}
|
|
42
79
|
const lifetime = expiresAt - receivedAt;
|
|
43
|
-
|
|
80
|
+
const lead = Math.max(5_000, Math.min(60_000, Math.floor(lifetime * 0.1)));
|
|
81
|
+
return Math.max(receivedAt, expiresAt - lead);
|
|
44
82
|
}
|
|
45
83
|
async close() {
|
|
84
|
+
if (this.#closed)
|
|
85
|
+
return;
|
|
46
86
|
this.#closed = true;
|
|
47
|
-
this.#closeController.abort();
|
|
87
|
+
this.#closeController.abort(new DOMException('coordinator closed', 'AbortError'));
|
|
88
|
+
const sessions = [...this.#sessions];
|
|
89
|
+
await Promise.all(sessions.map((session) => session.connection.close()));
|
|
90
|
+
this.#sessions.clear();
|
|
48
91
|
}
|
|
49
92
|
async #createSession(signal) {
|
|
50
93
|
const combined = combineSignals([signal, this.#closeController.signal]);
|
|
51
|
-
const access = await this.#
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
if (expiresAt <= this.#clock.now()) {
|
|
57
|
-
throw new index_js_1.ClusterConfigError('access token is already expired', 'ACCESS_EXPIRED');
|
|
58
|
-
}
|
|
59
|
-
let endpoint;
|
|
94
|
+
const access = await this.#init.adapter.access(this.#init.capsuleId, combined);
|
|
95
|
+
(0, authority_js_1.validateHostedAccess)(access, this.#targetAuthority);
|
|
96
|
+
const receivedAt = this.#clock.now();
|
|
97
|
+
this.renewalDeadline(access, receivedAt);
|
|
60
98
|
try {
|
|
61
|
-
|
|
99
|
+
const session = await (0, index_js_1.connectInitialized)(access.websocketUrl, {
|
|
100
|
+
...this.#init.connectOptions,
|
|
101
|
+
headers: { Authorization: `Bearer ${access.accessToken}` },
|
|
102
|
+
...(combined === undefined ? {} : { signal: combined }),
|
|
103
|
+
});
|
|
104
|
+
this.#sessions.add(session);
|
|
105
|
+
void session.connection.closed.then(() => this.#sessions.delete(session));
|
|
106
|
+
return session;
|
|
62
107
|
}
|
|
63
|
-
catch {
|
|
64
|
-
|
|
108
|
+
catch (error) {
|
|
109
|
+
if (error instanceof index_js_1.ClusterUpgradeError && error.status === 401)
|
|
110
|
+
throw new errors_js_1.HostedAuthenticationError();
|
|
111
|
+
throw error;
|
|
65
112
|
}
|
|
66
|
-
if (endpoint.protocol !== 'wss:') {
|
|
67
|
-
throw new index_js_1.ClusterConfigError('hosted access endpoint must use wss', 'INSECURE_ENDPOINT');
|
|
68
|
-
}
|
|
69
|
-
return (0, index_js_1.connectInitialized)(endpoint.href, {
|
|
70
|
-
...this.#connectOptions,
|
|
71
|
-
headers: { Authorization: `Bearer ${access.token}` },
|
|
72
|
-
...(combined !== undefined ? { signal: combined } : {}),
|
|
73
|
-
});
|
|
74
113
|
}
|
|
75
|
-
#verifyCapabilities(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
for (const profile of ref.graphProfiles) {
|
|
83
|
-
if (!incomingProfiles.has(profile))
|
|
84
|
-
mismatches.push(`missing graphProfile: ${profile}`);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
if (ref.logs && !incoming.logs)
|
|
88
|
-
mismatches.push('missing capability: logs');
|
|
89
|
-
if (ref.agentAttach && !incoming.agentAttach)
|
|
90
|
-
mismatches.push('missing capability: agentAttach');
|
|
91
|
-
if (mismatches.length > 0) {
|
|
92
|
-
void session.connection.close();
|
|
93
|
-
throw new index_js_1.ClusterConfigError(`replacement capabilities incompatible: ${mismatches.join(', ')}`, 'INCOMPATIBLE_CAPABILITIES');
|
|
114
|
+
#verifyCapabilities(reference, incoming) {
|
|
115
|
+
const referenceProfiles = new Set(reference.graphProfiles ?? []);
|
|
116
|
+
const incomingProfiles = new Set(incoming.graphProfiles ?? []);
|
|
117
|
+
if ((reference.logs && !incoming.logs) ||
|
|
118
|
+
(reference.agentAttach && !incoming.agentAttach) ||
|
|
119
|
+
[...referenceProfiles].some((profile) => !incomingProfiles.has(profile))) {
|
|
120
|
+
throw new index_js_1.ClusterConfigError('replacement connection removed required server capabilities', 'CAPABILITY_REGRESSION');
|
|
94
121
|
}
|
|
95
122
|
}
|
|
96
123
|
#requireNotClosed() {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HostedAccess, HostedSessionInit, HostedWatch, HostedWatchOptions, InitializedSession } from './types.js';
|
|
2
|
+
export { HostedAuthenticationError, HostedAuthorizationError, HostedTransportUncertainError, } from './errors.js';
|
|
3
|
+
export declare class HostedSessionCoordinator {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(init: HostedSessionInit);
|
|
6
|
+
open(signal?: AbortSignal): Promise<InitializedSession>;
|
|
7
|
+
replace(signal?: AbortSignal): Promise<InitializedSession>;
|
|
8
|
+
watch(options: HostedWatchOptions): Promise<HostedWatch>;
|
|
9
|
+
renewalDeadline(access: HostedAccess, receivedAt: number): number;
|
|
10
|
+
close(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HostedAccess, HostedSessionInit, HostedWatch, HostedWatchOptions, InitializedSession } from './types.js';
|
|
2
|
+
export { HostedAuthenticationError, HostedAuthorizationError, HostedTransportUncertainError, } from './errors.js';
|
|
3
|
+
export declare class HostedSessionCoordinator {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(init: HostedSessionInit);
|
|
6
|
+
open(signal?: AbortSignal): Promise<InitializedSession>;
|
|
7
|
+
replace(signal?: AbortSignal): Promise<InitializedSession>;
|
|
8
|
+
watch(options: HostedWatchOptions): Promise<HostedWatch>;
|
|
9
|
+
renewalDeadline(access: HostedAccess, receivedAt: number): number;
|
|
10
|
+
close(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { HostedAccess, HostedSessionInit, HostedWatch, HostedWatchOptions, InitializedSession } from './types.js';
|
|
2
|
+
export { HostedAuthenticationError, HostedAuthorizationError, HostedTransportUncertainError, } from './errors.js';
|
|
2
3
|
export declare class HostedSessionCoordinator {
|
|
3
4
|
#private;
|
|
4
5
|
constructor(init: HostedSessionInit);
|
|
5
6
|
open(signal?: AbortSignal): Promise<InitializedSession>;
|
|
6
7
|
replace(signal?: AbortSignal): Promise<InitializedSession>;
|
|
7
|
-
|
|
8
|
+
watch(options: HostedWatchOptions): Promise<HostedWatch>;
|
|
9
|
+
renewalDeadline(access: HostedAccess, receivedAt: number): number;
|
|
8
10
|
close(): Promise<void>;
|
|
9
11
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { ClusterConfigError, connectInitialized } from '../cluster/index.mjs';
|
|
1
|
+
import { ClusterConfigError, ClusterUpgradeError, connectInitialized, } from '../cluster/index.mjs';
|
|
2
|
+
import { normalizedAuthority, validateHostedAccess } from './authority.mjs';
|
|
3
|
+
import { HostedAuthenticationError } from './errors.mjs';
|
|
4
|
+
import { ReconnectingHostedWatch } from './reconnecting-watch.mjs';
|
|
5
|
+
export { HostedAuthenticationError, HostedAuthorizationError, HostedTransportUncertainError, } from './errors.mjs';
|
|
2
6
|
function combineSignals(signals) {
|
|
3
|
-
const defined = signals.filter((
|
|
7
|
+
const defined = signals.filter((signal) => signal !== undefined);
|
|
4
8
|
if (defined.length === 0)
|
|
5
9
|
return undefined;
|
|
6
10
|
if (defined.length === 1)
|
|
@@ -8,15 +12,18 @@ function combineSignals(signals) {
|
|
|
8
12
|
return AbortSignal.any(defined);
|
|
9
13
|
}
|
|
10
14
|
export class HostedSessionCoordinator {
|
|
11
|
-
#
|
|
12
|
-
#
|
|
15
|
+
#init;
|
|
16
|
+
#targetAuthority;
|
|
13
17
|
#clock;
|
|
14
18
|
#closeController = new AbortController();
|
|
19
|
+
#sessions = new Set();
|
|
15
20
|
#referenceCapabilities;
|
|
16
21
|
#closed = false;
|
|
17
22
|
constructor(init) {
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
if (init.capsuleId.length === 0)
|
|
24
|
+
throw new ClusterConfigError('capsuleId must not be empty', 'INVALID_CAPSULE_ID');
|
|
25
|
+
this.#init = init;
|
|
26
|
+
this.#targetAuthority = normalizedAuthority(init.targetAuthority);
|
|
20
27
|
this.#clock = init.clock ?? Date;
|
|
21
28
|
}
|
|
22
29
|
async open(signal) {
|
|
@@ -28,66 +35,83 @@ export class HostedSessionCoordinator {
|
|
|
28
35
|
async replace(signal) {
|
|
29
36
|
this.#requireNotClosed();
|
|
30
37
|
const session = await this.#createSession(signal);
|
|
31
|
-
|
|
32
|
-
|
|
38
|
+
try {
|
|
39
|
+
if (this.#referenceCapabilities !== undefined) {
|
|
40
|
+
this.#verifyCapabilities(this.#referenceCapabilities, session.initializeResult.capabilities);
|
|
41
|
+
}
|
|
42
|
+
return session;
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
await session.connection.close();
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async watch(options) {
|
|
50
|
+
const session = await this.open(options.signal);
|
|
51
|
+
try {
|
|
52
|
+
const subscription = await session.client.watch(options.params, options.signal === undefined ? {} : { signal: options.signal });
|
|
53
|
+
const hosted = new ReconnectingHostedWatch((replacementSignal) => this.replace(replacementSignal), session, subscription, options.signal);
|
|
54
|
+
options.signal?.addEventListener('abort', () => {
|
|
55
|
+
void hosted.cancel().catch(() => undefined);
|
|
56
|
+
}, { once: true });
|
|
57
|
+
if (options.signal?.aborted) {
|
|
58
|
+
await hosted.cancel();
|
|
59
|
+
throw options.signal.reason ?? new DOMException('hosted watch aborted', 'AbortError');
|
|
60
|
+
}
|
|
61
|
+
return hosted;
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
await session.connection.close();
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
33
67
|
}
|
|
34
68
|
renewalDeadline(access, receivedAt) {
|
|
35
69
|
const expiresAt = Date.parse(access.expiresAt);
|
|
36
|
-
if (Number.
|
|
37
|
-
throw new ClusterConfigError(
|
|
70
|
+
if (!Number.isFinite(expiresAt) || expiresAt <= receivedAt) {
|
|
71
|
+
throw new ClusterConfigError('access expiry must be a future RFC 3339 timestamp', 'INVALID_ACCESS_EXPIRY');
|
|
38
72
|
}
|
|
39
73
|
const lifetime = expiresAt - receivedAt;
|
|
40
|
-
|
|
74
|
+
const lead = Math.max(5_000, Math.min(60_000, Math.floor(lifetime * 0.1)));
|
|
75
|
+
return Math.max(receivedAt, expiresAt - lead);
|
|
41
76
|
}
|
|
42
77
|
async close() {
|
|
78
|
+
if (this.#closed)
|
|
79
|
+
return;
|
|
43
80
|
this.#closed = true;
|
|
44
|
-
this.#closeController.abort();
|
|
81
|
+
this.#closeController.abort(new DOMException('coordinator closed', 'AbortError'));
|
|
82
|
+
const sessions = [...this.#sessions];
|
|
83
|
+
await Promise.all(sessions.map((session) => session.connection.close()));
|
|
84
|
+
this.#sessions.clear();
|
|
45
85
|
}
|
|
46
86
|
async #createSession(signal) {
|
|
47
87
|
const combined = combineSignals([signal, this.#closeController.signal]);
|
|
48
|
-
const access = await this.#
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
if (expiresAt <= this.#clock.now()) {
|
|
54
|
-
throw new ClusterConfigError('access token is already expired', 'ACCESS_EXPIRED');
|
|
55
|
-
}
|
|
56
|
-
let endpoint;
|
|
88
|
+
const access = await this.#init.adapter.access(this.#init.capsuleId, combined);
|
|
89
|
+
validateHostedAccess(access, this.#targetAuthority);
|
|
90
|
+
const receivedAt = this.#clock.now();
|
|
91
|
+
this.renewalDeadline(access, receivedAt);
|
|
57
92
|
try {
|
|
58
|
-
|
|
93
|
+
const session = await connectInitialized(access.websocketUrl, {
|
|
94
|
+
...this.#init.connectOptions,
|
|
95
|
+
headers: { Authorization: `Bearer ${access.accessToken}` },
|
|
96
|
+
...(combined === undefined ? {} : { signal: combined }),
|
|
97
|
+
});
|
|
98
|
+
this.#sessions.add(session);
|
|
99
|
+
void session.connection.closed.then(() => this.#sessions.delete(session));
|
|
100
|
+
return session;
|
|
59
101
|
}
|
|
60
|
-
catch {
|
|
61
|
-
|
|
102
|
+
catch (error) {
|
|
103
|
+
if (error instanceof ClusterUpgradeError && error.status === 401)
|
|
104
|
+
throw new HostedAuthenticationError();
|
|
105
|
+
throw error;
|
|
62
106
|
}
|
|
63
|
-
if (endpoint.protocol !== 'wss:') {
|
|
64
|
-
throw new ClusterConfigError('hosted access endpoint must use wss', 'INSECURE_ENDPOINT');
|
|
65
|
-
}
|
|
66
|
-
return connectInitialized(endpoint.href, {
|
|
67
|
-
...this.#connectOptions,
|
|
68
|
-
headers: { Authorization: `Bearer ${access.token}` },
|
|
69
|
-
...(combined !== undefined ? { signal: combined } : {}),
|
|
70
|
-
});
|
|
71
107
|
}
|
|
72
|
-
#verifyCapabilities(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
for (const profile of ref.graphProfiles) {
|
|
80
|
-
if (!incomingProfiles.has(profile))
|
|
81
|
-
mismatches.push(`missing graphProfile: ${profile}`);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
if (ref.logs && !incoming.logs)
|
|
85
|
-
mismatches.push('missing capability: logs');
|
|
86
|
-
if (ref.agentAttach && !incoming.agentAttach)
|
|
87
|
-
mismatches.push('missing capability: agentAttach');
|
|
88
|
-
if (mismatches.length > 0) {
|
|
89
|
-
void session.connection.close();
|
|
90
|
-
throw new ClusterConfigError(`replacement capabilities incompatible: ${mismatches.join(', ')}`, 'INCOMPATIBLE_CAPABILITIES');
|
|
108
|
+
#verifyCapabilities(reference, incoming) {
|
|
109
|
+
const referenceProfiles = new Set(reference.graphProfiles ?? []);
|
|
110
|
+
const incomingProfiles = new Set(incoming.graphProfiles ?? []);
|
|
111
|
+
if ((reference.logs && !incoming.logs) ||
|
|
112
|
+
(reference.agentAttach && !incoming.agentAttach) ||
|
|
113
|
+
[...referenceProfiles].some((profile) => !incomingProfiles.has(profile))) {
|
|
114
|
+
throw new ClusterConfigError('replacement connection removed required server capabilities', 'CAPABILITY_REGRESSION');
|
|
91
115
|
}
|
|
92
116
|
}
|
|
93
117
|
#requireNotClosed() {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HostedTransportUncertainError = exports.HostedAuthorizationError = exports.HostedAuthenticationError = void 0;
|
|
4
|
+
class HostedAuthenticationError extends Error {
|
|
5
|
+
constructor() {
|
|
6
|
+
super('Hosted target authentication failed');
|
|
7
|
+
this.name = 'HostedAuthenticationError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.HostedAuthenticationError = HostedAuthenticationError;
|
|
11
|
+
class HostedAuthorizationError extends Error {
|
|
12
|
+
constructor() {
|
|
13
|
+
super('Hosted target authorization was revoked');
|
|
14
|
+
this.name = 'HostedAuthorizationError';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.HostedAuthorizationError = HostedAuthorizationError;
|
|
18
|
+
class HostedTransportUncertainError extends Error {
|
|
19
|
+
executionRetryAuthorized = false;
|
|
20
|
+
constructor() {
|
|
21
|
+
super('Hosted session transport closed with uncertain execution state');
|
|
22
|
+
this.name = 'HostedTransportUncertainError';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.HostedTransportUncertainError = HostedTransportUncertainError;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class HostedAuthenticationError extends Error {
|
|
2
|
+
constructor();
|
|
3
|
+
}
|
|
4
|
+
export declare class HostedAuthorizationError extends Error {
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
7
|
+
export declare class HostedTransportUncertainError extends Error {
|
|
8
|
+
readonly executionRetryAuthorized = false;
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class HostedAuthenticationError extends Error {
|
|
2
|
+
constructor();
|
|
3
|
+
}
|
|
4
|
+
export declare class HostedAuthorizationError extends Error {
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
7
|
+
export declare class HostedTransportUncertainError extends Error {
|
|
8
|
+
readonly executionRetryAuthorized = false;
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class HostedAuthenticationError extends Error {
|
|
2
|
+
constructor();
|
|
3
|
+
}
|
|
4
|
+
export declare class HostedAuthorizationError extends Error {
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
7
|
+
export declare class HostedTransportUncertainError extends Error {
|
|
8
|
+
readonly executionRetryAuthorized = false;
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export class HostedAuthenticationError extends Error {
|
|
2
|
+
constructor() {
|
|
3
|
+
super('Hosted target authentication failed');
|
|
4
|
+
this.name = 'HostedAuthenticationError';
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export class HostedAuthorizationError extends Error {
|
|
8
|
+
constructor() {
|
|
9
|
+
super('Hosted target authorization was revoked');
|
|
10
|
+
this.name = 'HostedAuthorizationError';
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export class HostedTransportUncertainError extends Error {
|
|
14
|
+
executionRetryAuthorized = false;
|
|
15
|
+
constructor() {
|
|
16
|
+
super('Hosted session transport closed with uncertain execution state');
|
|
17
|
+
this.name = 'HostedTransportUncertainError';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HostedSessionCoordinator = void 0;
|
|
3
|
+
exports.HostedTransportUncertainError = exports.HostedAuthorizationError = exports.HostedAuthenticationError = exports.HostedSessionCoordinator = void 0;
|
|
4
4
|
var coordinator_js_1 = require("./coordinator.cjs");
|
|
5
5
|
Object.defineProperty(exports, "HostedSessionCoordinator", { enumerable: true, get: function () { return coordinator_js_1.HostedSessionCoordinator; } });
|
|
6
|
+
Object.defineProperty(exports, "HostedAuthenticationError", { enumerable: true, get: function () { return coordinator_js_1.HostedAuthenticationError; } });
|
|
7
|
+
Object.defineProperty(exports, "HostedAuthorizationError", { enumerable: true, get: function () { return coordinator_js_1.HostedAuthorizationError; } });
|
|
8
|
+
Object.defineProperty(exports, "HostedTransportUncertainError", { enumerable: true, get: function () { return coordinator_js_1.HostedTransportUncertainError; } });
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { HostedSessionCoordinator, HostedAuthenticationError, HostedAuthorizationError, HostedTransportUncertainError, } from './coordinator.js';
|
|
2
|
+
export type { HostedAccess, HostedAccessAdapter, HostedSessionInit, HostedWatch, HostedWatchOptions, InitializedSession, } from './types.js';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { HostedSessionCoordinator, HostedAuthenticationError, HostedAuthorizationError, HostedTransportUncertainError, } from './coordinator.js';
|
|
2
|
+
export type { HostedAccess, HostedAccessAdapter, HostedSessionInit, HostedWatch, HostedWatchOptions, InitializedSession, } from './types.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { HostedSessionCoordinator } from './coordinator.js';
|
|
2
|
-
export type {
|
|
1
|
+
export { HostedSessionCoordinator, HostedAuthenticationError, HostedAuthorizationError, HostedTransportUncertainError, } from './coordinator.js';
|
|
2
|
+
export type { HostedAccess, HostedAccessAdapter, HostedSessionInit, HostedWatch, HostedWatchOptions, InitializedSession, } from './types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { HostedSessionCoordinator } from './coordinator.mjs';
|
|
1
|
+
export { HostedSessionCoordinator, HostedAuthenticationError, HostedAuthorizationError, HostedTransportUncertainError, } from './coordinator.mjs';
|