@hediet/linkrpc 0.0.2 → 0.0.3
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 +141 -3
- package/dist/chunks/{hub.interfaces-Bf4VfWNX.js → hub.interfaces-BWqqhgtT.js} +2 -2
- package/dist/chunks/{hub.interfaces-Bf4VfWNX.js.map → hub.interfaces-BWqqhgtT.js.map} +1 -1
- package/dist/chunks/{hubAccess-C06qAKao.d.ts → hubAccess-DKl7hDrh.d.ts} +2 -2
- package/dist/chunks/{hubAccess-C06qAKao.d.ts.map → hubAccess-DKl7hDrh.d.ts.map} +1 -1
- package/dist/chunks/{hubFacade-DtQpGpUy.d.ts → hubFacade-CLgLIvBa.d.ts} +2 -2
- package/dist/chunks/{hubFacade-DtQpGpUy.d.ts.map → hubFacade-CLgLIvBa.d.ts.map} +1 -1
- package/dist/chunks/{hubFacade-BIB9CoAv.js → hubFacade-rlsBq0ZU.js} +2 -2
- package/dist/chunks/{hubFacade-BIB9CoAv.js.map → hubFacade-rlsBq0ZU.js.map} +1 -1
- package/dist/chunks/{boundedTrafficSubscription-XZ1KwXZC.js → inspectionHost-BA08eF6h.js} +766 -4
- package/dist/chunks/inspectionHost-BA08eF6h.js.map +1 -0
- package/dist/chunks/{linkRpcConnection-BadD37ok.d.ts → linkRpcConnection-C_Gs4nZ9.d.ts} +2061 -1682
- package/dist/chunks/linkRpcConnection-C_Gs4nZ9.d.ts.map +1 -0
- package/dist/chunks/{src-CAhXne71.js → src-BaCs8mWd.js} +2512 -2657
- package/dist/chunks/src-BaCs8mWd.js.map +1 -0
- package/dist/hub/client/index.d.ts +3 -3
- package/dist/hub/client/index.js +3 -3
- package/dist/hub/common/index.d.ts +2 -325
- package/dist/hub/common/index.d.ts.map +1 -1
- package/dist/hub/common/index.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/inspection/index.d.ts +87 -2
- package/dist/inspection/index.d.ts.map +1 -1
- package/dist/inspection/index.js +2 -2
- package/dist/node.d.ts +3 -3
- package/dist/node.js +4 -4
- package/dist/web.d.ts +2 -2
- package/dist/web.js +3 -3
- package/package.json +7 -2
- package/dist/chunks/boundedTrafficSubscription-XZ1KwXZC.js.map +0 -1
- package/dist/chunks/linkRpcConnection-BadD37ok.d.ts.map +0 -1
- package/dist/chunks/src-CAhXne71.js.map +0 -1
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import {
|
|
6
|
-
import { i as hubFromConnection, n as SlotPrerequest, r as SlotReservation, t as Hub } from "../../chunks/hubFacade-
|
|
7
|
-
import { a as HubAccessResult, i as HubAccessRequest } from "../../chunks/hubAccess-
|
|
5
|
+
import { Fr as SignedCapability, Mi as StreamSendOpts, Ni as IMessageTransport, Oi as RawStreamingCall, Sr as PublicSigningIdentity, To as JsonValue, Wn as SigningCallCtx, Yn as Principal, ji as SendOpts, wi as IRequestSender } from "../../chunks/linkRpcConnection-C_Gs4nZ9.js";
|
|
6
|
+
import { i as hubFromConnection, n as SlotPrerequest, r as SlotReservation, t as Hub } from "../../chunks/hubFacade-CLgLIvBa.js";
|
|
7
|
+
import { a as HubAccessResult, i as HubAccessRequest } from "../../chunks/hubAccess-DKl7hDrh.js";
|
|
8
8
|
//#region src/hub/client/hubSigningSender.d.ts
|
|
9
9
|
/**
|
|
10
10
|
* The single connection handle a hub client consumes: a signing request
|
package/dist/hub/client/index.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import {
|
|
6
|
-
import { t as hubAccessInterface } from "../../chunks/hub.interfaces-
|
|
7
|
-
import { n as hubFromConnection, t as Hub } from "../../chunks/hubFacade-
|
|
5
|
+
import { m as SigningSender, tt as JsonRpcChannel } from "../../chunks/src-BaCs8mWd.js";
|
|
6
|
+
import { t as hubAccessInterface } from "../../chunks/hub.interfaces-BWqqhgtT.js";
|
|
7
|
+
import { n as hubFromConnection, t as Hub } from "../../chunks/hubFacade-rlsBq0ZU.js";
|
|
8
8
|
//#region src/hub/client/hubSigningSender.ts
|
|
9
9
|
/**
|
|
10
10
|
* The single connection handle a hub client consumes: a signing request
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import {
|
|
6
|
-
import { a as HubAccessResult, i as HubAccessRequest, n as HubAccessPattern, o as findCoveringCapabilities, r as HubAccessPermission, t as HubAccessDuration } from "../../chunks/hubAccess-
|
|
5
|
+
import { Aa as ApplicationErrorDescriptorBase, An as WalkHubResult, Ba as RequestType, Bn as CapProvider, Cn as HubDirectoryNodeState, Dn as ReflectionChannel, En as ListOptions, Fn as normalizeServiceIdScopes, Hn as ManagedSigningChannel, In as serviceIdMatchesPattern, Ln as serviceIdMatchesScopes, Mn as fetchSchema, Ni as IMessageTransport, Nn as findMethodInSchema, On as ServiceListing, Pn as intersectServiceIdScopes, Rn as walkHub, Sn as HubDirectoryNodeReport, Tn as InaccessibleDirectory, Wn as SigningCallCtx, Wt as TopologyTransportInfo, Yn as Principal, _n as HubDirectoryChange, bn as HubDirectoryGraphSnapshot, gn as DiscoveredListing, ha as InterfaceDefinition, hn as DEFAULT_WALK_DEPTH, jn as fetchDirectory, kn as WalkHubOptions, ma as InterfaceClient, vn as HubDirectoryExplorer, wi as IRequestSender, wn as HubDirectoryParentReport, xi as Channel, xn as HubDirectoryGraphTarget, yn as HubDirectoryGraphEvent, zn as walkHubDetailed } from "../../chunks/linkRpcConnection-C_Gs4nZ9.js";
|
|
6
|
+
import { a as HubAccessResult, i as HubAccessRequest, n as HubAccessPattern, o as findCoveringCapabilities, r as HubAccessPermission, t as HubAccessDuration } from "../../chunks/hubAccess-DKl7hDrh.js";
|
|
7
7
|
//#region src/hub/common/serviceId.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* A **ServiceId** is a `'/'`-segmented address naming a routing destination
|
|
@@ -862,328 +862,5 @@ declare function createAutoNegotiatingCapProvider(opts: {
|
|
|
862
862
|
readonly consumer: AutoNegotiateConsumer;
|
|
863
863
|
}): CapProvider;
|
|
864
864
|
//#endregion
|
|
865
|
-
//#region src/hub/common/directoryWalk.d.ts
|
|
866
|
-
/**
|
|
867
|
-
* Portable reflection walk over the `hubrpc.directory` referral tree.
|
|
868
|
-
*
|
|
869
|
-
* A directory may explicitly list other `hubrpc.directory` services as
|
|
870
|
-
* referrals. Flattening that graph into an interface inventory is the
|
|
871
|
-
* consumer's job. Routing state is deliberately not part of this contract.
|
|
872
|
-
*/
|
|
873
|
-
/**
|
|
874
|
-
* The sender reflection helpers speak over: the signing decorator that wraps
|
|
875
|
-
* the live channel. Decoupled from the concrete `JsonRpcChannel` so reconnect
|
|
876
|
-
* can swap the underlying channel transparently.
|
|
877
|
-
*/
|
|
878
|
-
type ReflectionChannel = IRequestSender<SigningCallCtx>;
|
|
879
|
-
interface ServiceListing {
|
|
880
|
-
readonly serviceId: string;
|
|
881
|
-
readonly interfaceId: string;
|
|
882
|
-
readonly hash: string;
|
|
883
|
-
readonly path?: string;
|
|
884
|
-
/** Optional non-normative description of the owning service. */
|
|
885
|
-
readonly serviceDescription?: string;
|
|
886
|
-
/**
|
|
887
|
-
* Root node ids required to access the owning service, in CNF. Surfaced by
|
|
888
|
-
* the directory; {@link walkHubDetailed} additionally folds transitive
|
|
889
|
-
* requirements from ancestor directories onto descendants.
|
|
890
|
-
*/
|
|
891
|
-
readonly rootPrincipalSets?: readonly RootPrincipalSet[];
|
|
892
|
-
/** Scope carried by a directory referral; omitted means its service-id subtree. */
|
|
893
|
-
readonly reachableServiceIds?: readonly ServiceIdPattern[];
|
|
894
|
-
}
|
|
895
|
-
/**
|
|
896
|
-
* A {@link ServiceListing} enriched with the service id of the directory that
|
|
897
|
-
* reported it. This is provenance only: every listing is asserted reachable by
|
|
898
|
-
* sending to the endpoint that answered the directory.
|
|
899
|
-
*/
|
|
900
|
-
interface DiscoveredListing extends ServiceListing {
|
|
901
|
-
readonly discoveredFrom: string;
|
|
902
|
-
}
|
|
903
|
-
interface ListOptions {
|
|
904
|
-
readonly interfaceId?: string;
|
|
905
|
-
readonly interfaceIdPrefix?: string;
|
|
906
|
-
readonly serviceId?: string;
|
|
907
|
-
readonly serviceIdScopes?: readonly ServiceIdPattern[];
|
|
908
|
-
readonly limit?: number;
|
|
909
|
-
readonly timeoutMs?: number;
|
|
910
|
-
/**
|
|
911
|
-
* When set, send the reflection call to that service via form-3
|
|
912
|
-
* (`<target>::hubrpc.directory::list`) instead of the implicit root
|
|
913
|
-
* directory. Used when talking to a hub: the root directory is the hub
|
|
914
|
-
* itself, but per-service reflection lives on each participant.
|
|
915
|
-
*/
|
|
916
|
-
readonly target?: string;
|
|
917
|
-
}
|
|
918
|
-
declare function fetchDirectory(channel: ReflectionChannel, opts?: ListOptions): Promise<ServiceListing[]>;
|
|
919
|
-
declare function fetchSchema(channel: ReflectionChannel, interfaceId: string, hash: string | undefined,
|
|
920
|
-
/**
|
|
921
|
-
* Optional routing target. When set, the schema request is addressed to
|
|
922
|
-
* `<target>::hubrpc.schemas::get` (form-3) so it reaches the service that
|
|
923
|
-
* actually hosts this interface — needed when talking to a hub and the
|
|
924
|
-
* interface lives behind a participant.
|
|
925
|
-
*/
|
|
926
|
-
target?: string): Promise<LinkRpcInterfaceSchema>;
|
|
927
|
-
declare function findMethodInSchema(schema: LinkRpcInterfaceSchema, methodName: string): MethodSchema | undefined;
|
|
928
|
-
/** Default recursion depth when walking the bus. */
|
|
929
|
-
declare const DEFAULT_WALK_DEPTH = 5;
|
|
930
|
-
/** Segment-aware service-id pattern matching (`foo` includes `foo/bar`, not `foobar`). */
|
|
931
|
-
declare function serviceIdMatchesPattern(serviceId: string, pattern: ServiceIdPattern): boolean;
|
|
932
|
-
/** Whether a service id is included by a union of patterns. `undefined` means unfiltered. */
|
|
933
|
-
declare function serviceIdMatchesScopes(serviceId: string, scopes: readonly ServiceIdPattern[] | undefined): boolean;
|
|
934
|
-
/** Canonicalize a pattern union by removing duplicates and contained patterns. */
|
|
935
|
-
declare function normalizeServiceIdScopes(scopes: readonly ServiceIdPattern[]): ServiceIdPattern[];
|
|
936
|
-
/** Pairwise intersection of two pattern unions. */
|
|
937
|
-
declare function intersectServiceIdScopes(left: readonly ServiceIdPattern[], right: readonly ServiceIdPattern[]): ServiceIdPattern[];
|
|
938
|
-
/**
|
|
939
|
-
* A sub-directory the walk surfaced but could not enumerate — typically because
|
|
940
|
-
* it is capability-gated (e.g. the `hub` directory, reachable only once the
|
|
941
|
-
* connection holds a capability for it). The services it would have listed are
|
|
942
|
-
* therefore absent from the walk; callers can surface `reason` to explain the
|
|
943
|
-
* gap rather than silently dropping the branch.
|
|
944
|
-
*/
|
|
945
|
-
interface InaccessibleDirectory {
|
|
946
|
-
/** The directory target (serviceId) that could not be enumerated. */
|
|
947
|
-
readonly serviceId: string;
|
|
948
|
-
/** The error message from the denied directory lookup. */
|
|
949
|
-
readonly reason: string;
|
|
950
|
-
}
|
|
951
|
-
interface WalkHubResult {
|
|
952
|
-
/** Every interface reachable from the directories the walk could read. */
|
|
953
|
-
readonly listings: DiscoveredListing[];
|
|
954
|
-
/**
|
|
955
|
-
* Sub-directories that were referenced but could not be enumerated (e.g.
|
|
956
|
-
* capability-gated). Their services are not present in `listings`.
|
|
957
|
-
*/
|
|
958
|
-
readonly inaccessible: InaccessibleDirectory[];
|
|
959
|
-
}
|
|
960
|
-
/**
|
|
961
|
-
* Recursive graph walk: list a directory, intersect the accumulated service-id
|
|
962
|
-
* scope with every explicit `hubrpc.directory` referral, and recurse. Bounded
|
|
963
|
-
* by `maxDepth`.
|
|
964
|
-
*
|
|
965
|
-
* Every listing is tagged with `discoveredFrom` — the serviceId of the
|
|
966
|
-
* directory that produced it. When the same `(serviceId, interfaceId, hash)`
|
|
967
|
-
* shows up via several directories (e.g. once forwarded by the hub, once
|
|
968
|
-
* directly from the participant), we keep the one whose `discoveredFrom`
|
|
969
|
-
* matches the item's `serviceId`, since that's the directory that
|
|
970
|
-
* authoritatively knows about it.
|
|
971
|
-
*
|
|
972
|
-
* Transitive root-node-id requirements flow down the tree: when the walk
|
|
973
|
-
* recurses into a directory whose own `rootPrincipalSets` include `transitive`
|
|
974
|
-
* reqs, every interface discovered at or below that directory inherits them (as
|
|
975
|
-
* singleton AND-sets, kept transitive so they keep flowing further down). This
|
|
976
|
-
* replaces the hub-side `applyTransitiveReqs` fold that the v1 aggregating
|
|
977
|
-
* directory performed.
|
|
978
|
-
*
|
|
979
|
-
* A sub-directory the walk cannot read is recorded in
|
|
980
|
-
* {@link WalkHubResult.inaccessible} rather than silently dropped. A failure to
|
|
981
|
-
* read the *root* directory is left silent — there is no sub-tree to explain —
|
|
982
|
-
* and simply yields empty results.
|
|
983
|
-
*
|
|
984
|
-
* When {@link WalkHubOptions.unlockGatedDirectory} is supplied, each gated
|
|
985
|
-
* sub-directory is offered to the hook; if it returns `true` (a capability was
|
|
986
|
-
* granted), that directory is re-queued and the walk continues into it — a
|
|
987
|
-
* fixpoint that keeps unlocking newly-revealed gated branches until nothing
|
|
988
|
-
* more can be opened (still bounded by `maxDepth`).
|
|
989
|
-
*/
|
|
990
|
-
interface WalkHubOptions {
|
|
991
|
-
readonly maxDepth?: number;
|
|
992
|
-
/** Hard deadline for each directory page request. Defaults to 5 seconds. */
|
|
993
|
-
readonly timeoutMs?: number;
|
|
994
|
-
/** Return only listings for this exact interface id after traversing directories. */
|
|
995
|
-
readonly interfaceId?: string;
|
|
996
|
-
/** Return only listings whose interface id starts with this prefix after traversal. */
|
|
997
|
-
readonly interfaceIdPrefix?: string;
|
|
998
|
-
/** Return only listings for this exact service id after traversal. */
|
|
999
|
-
readonly serviceId?: string;
|
|
1000
|
-
/** Initial service-id scope. Defaults to the universal `{ prefix: "" }`. */
|
|
1001
|
-
readonly serviceIdScopes?: readonly ServiceIdPattern[];
|
|
1002
|
-
/**
|
|
1003
|
-
* The directory the walk starts from. Defaults to the implicit root
|
|
1004
|
-
* directory (form-2 `hubrpc.directory::list`). Pass a serviceId to start at
|
|
1005
|
-
* `<rootTarget>::hubrpc.directory::list` — e.g. the hub's own global
|
|
1006
|
-
* directory (`'hub'`) when walking from the hub's in-process connection.
|
|
1007
|
-
*/
|
|
1008
|
-
readonly rootTarget?: string;
|
|
1009
|
-
/**
|
|
1010
|
-
* Invoked once per gated sub-directory the walk encounters. Return `true`
|
|
1011
|
-
* if a capability for its `hubrpc.directory::list` was granted and the
|
|
1012
|
-
* directory should be re-listed; `false` (or omitted hook) leaves it in
|
|
1013
|
-
* {@link WalkHubResult.inaccessible}. Called at most once per `serviceId`.
|
|
1014
|
-
*/
|
|
1015
|
-
unlockGatedDirectory?: (serviceId: string) => Promise<boolean>;
|
|
1016
|
-
/** Optional diagnostic sink for inaccessible lists and ended watches. */
|
|
1017
|
-
readonly log?: (message: string) => void;
|
|
1018
|
-
}
|
|
1019
|
-
declare function walkHubDetailed(channel: ReflectionChannel, opts?: WalkHubOptions): Promise<WalkHubResult>;
|
|
1020
|
-
/**
|
|
1021
|
-
* Backward-compatible wrapper over {@link walkHubDetailed} that returns only the
|
|
1022
|
-
* reachable listings, dropping the inaccessible-directory report.
|
|
1023
|
-
*/
|
|
1024
|
-
declare function walkHub(channel: ReflectionChannel, opts?: WalkHubOptions): Promise<DiscoveredListing[]>;
|
|
1025
|
-
interface HubDirectoryChange {
|
|
1026
|
-
/** Directory that emitted the tick. `undefined` denotes the connection root. */
|
|
1027
|
-
readonly target: string | undefined;
|
|
1028
|
-
readonly result: WalkHubResult;
|
|
1029
|
-
}
|
|
1030
|
-
type HubDirectoryGraphTarget = {
|
|
1031
|
-
readonly kind: 'root';
|
|
1032
|
-
readonly serviceId?: string;
|
|
1033
|
-
} | {
|
|
1034
|
-
readonly kind: 'addressed';
|
|
1035
|
-
readonly serviceId: string;
|
|
1036
|
-
};
|
|
1037
|
-
type HubDirectoryNodeState = 'unexplored' | 'loading' | 'loaded' | 'inaccessible';
|
|
1038
|
-
interface HubDirectoryParentReport {
|
|
1039
|
-
readonly target: HubDirectoryGraphTarget;
|
|
1040
|
-
readonly scopes: readonly ServiceIdPattern[];
|
|
1041
|
-
/** Resulting depth for this incoming parent path. */
|
|
1042
|
-
readonly depth: number;
|
|
1043
|
-
}
|
|
1044
|
-
/** Stable public report for one native directory response. */
|
|
1045
|
-
interface HubDirectoryNodeReport {
|
|
1046
|
-
readonly target: HubDirectoryGraphTarget;
|
|
1047
|
-
readonly state: HubDirectoryNodeState;
|
|
1048
|
-
readonly effectiveScopes: readonly ServiceIdPattern[];
|
|
1049
|
-
readonly depth: number;
|
|
1050
|
-
readonly parents: readonly HubDirectoryParentReport[];
|
|
1051
|
-
/** Per-directory listings, normalized to `ServiceListing`, before inherited metadata is folded. */
|
|
1052
|
-
readonly nativeListings: readonly ServiceListing[];
|
|
1053
|
-
readonly inaccessibleReason?: string;
|
|
1054
|
-
readonly watching: boolean;
|
|
1055
|
-
}
|
|
1056
|
-
/**
|
|
1057
|
-
* Complete point-in-time graph document. `root` exists from construction in
|
|
1058
|
-
* the `unexplored` state, so consumers can render before exploration starts.
|
|
1059
|
-
*/
|
|
1060
|
-
interface HubDirectoryGraphSnapshot {
|
|
1061
|
-
readonly revision: number;
|
|
1062
|
-
readonly complete: boolean;
|
|
1063
|
-
readonly root: HubDirectoryNodeReport;
|
|
1064
|
-
readonly directories: readonly HubDirectoryNodeReport[];
|
|
1065
|
-
readonly result: WalkHubResult;
|
|
1066
|
-
}
|
|
1067
|
-
type HubDirectoryGraphEvent = {
|
|
1068
|
-
readonly type: 'snapshot';
|
|
1069
|
-
readonly reason: 'subscribed' | 'reconciliation-started' | 'reset';
|
|
1070
|
-
readonly snapshot: HubDirectoryGraphSnapshot;
|
|
1071
|
-
} | {
|
|
1072
|
-
readonly type: 'node-added';
|
|
1073
|
-
readonly reason: 'referral';
|
|
1074
|
-
readonly node: HubDirectoryNodeReport;
|
|
1075
|
-
readonly snapshot: HubDirectoryGraphSnapshot;
|
|
1076
|
-
} | {
|
|
1077
|
-
readonly type: 'node-updated';
|
|
1078
|
-
readonly reason: 'loading' | 'loaded' | 'inaccessible' | 'referral' | 'watch-started' | 'watch-stopped' | 'watch-ended' | 'reset';
|
|
1079
|
-
readonly previous: HubDirectoryNodeReport;
|
|
1080
|
-
readonly node: HubDirectoryNodeReport;
|
|
1081
|
-
readonly snapshot: HubDirectoryGraphSnapshot;
|
|
1082
|
-
} | {
|
|
1083
|
-
readonly type: 'node-removed';
|
|
1084
|
-
readonly reason: 'unreachable' | 'reset';
|
|
1085
|
-
readonly previous: HubDirectoryNodeReport;
|
|
1086
|
-
readonly snapshot: HubDirectoryGraphSnapshot;
|
|
1087
|
-
} | {
|
|
1088
|
-
readonly type: 'settled';
|
|
1089
|
-
readonly snapshot: HubDirectoryGraphSnapshot;
|
|
1090
|
-
};
|
|
1091
|
-
/**
|
|
1092
|
-
* Reusable directory graph explorer and watcher.
|
|
1093
|
-
*
|
|
1094
|
-
* The class keeps one native snapshot per directory target. A watch tick
|
|
1095
|
-
* re-lists only its source target; outgoing referral changes then propagate
|
|
1096
|
-
* through affected descendants. Unchanged siblings retain both their snapshot
|
|
1097
|
-
* and watch. Multi-parent targets are queried with the normalized union of all
|
|
1098
|
-
* incoming path scopes.
|
|
1099
|
-
*/
|
|
1100
|
-
declare class HubDirectoryExplorer {
|
|
1101
|
-
private readonly _channel;
|
|
1102
|
-
private readonly _options;
|
|
1103
|
-
private readonly _maxDepth;
|
|
1104
|
-
private readonly _initialScopes;
|
|
1105
|
-
private readonly _nodes;
|
|
1106
|
-
private readonly _unlockAttempted;
|
|
1107
|
-
private readonly _listeners;
|
|
1108
|
-
private readonly _graphListeners;
|
|
1109
|
-
private readonly _pendingTicks;
|
|
1110
|
-
private readonly _watchRetryTimers;
|
|
1111
|
-
private readonly _watchRetryDelays;
|
|
1112
|
-
private _initialized;
|
|
1113
|
-
private _disposed;
|
|
1114
|
-
private _watching;
|
|
1115
|
-
private _complete;
|
|
1116
|
-
private _revision;
|
|
1117
|
-
private _work;
|
|
1118
|
-
private _explorePromise;
|
|
1119
|
-
constructor(_channel: ReflectionChannel, _options?: WalkHubOptions);
|
|
1120
|
-
/** Perform a fresh bounded exploration without starting watches. */
|
|
1121
|
-
explore(): Promise<WalkHubResult>;
|
|
1122
|
-
private _explore;
|
|
1123
|
-
/** Current deduplicated graph snapshot. */
|
|
1124
|
-
get result(): WalkHubResult;
|
|
1125
|
-
/** Current complete-or-progressive directory graph report. */
|
|
1126
|
-
get graphSnapshot(): HubDirectoryGraphSnapshot;
|
|
1127
|
-
/**
|
|
1128
|
-
* Subscribe to progressive graph reports. The listener is registered before
|
|
1129
|
-
* receiving a synchronous current snapshot, avoiding the subscribe/explore
|
|
1130
|
-
* race for both idle and already-running explorers.
|
|
1131
|
-
*/
|
|
1132
|
-
subscribe(listener: (event: HubDirectoryGraphEvent) => void): () => void;
|
|
1133
|
-
/**
|
|
1134
|
-
* Explore once, then watch every reachable directory. Resolves after the
|
|
1135
|
-
* initial graph and watches are established.
|
|
1136
|
-
*/
|
|
1137
|
-
watch(listener: (change: HubDirectoryChange) => void): Promise<() => void>;
|
|
1138
|
-
/** Wait until all currently queued watch reconciliation has settled. */
|
|
1139
|
-
whenIdle(): Promise<void>;
|
|
1140
|
-
dispose(): void;
|
|
1141
|
-
private _loadNode;
|
|
1142
|
-
private _tryUnlock;
|
|
1143
|
-
private _reconcileOutgoing;
|
|
1144
|
-
private _outgoingFor;
|
|
1145
|
-
private _createRootNode;
|
|
1146
|
-
private _createNode;
|
|
1147
|
-
private _updateNodeFromParents;
|
|
1148
|
-
private _deriveNodeFromParents;
|
|
1149
|
-
private _derivedNodeState;
|
|
1150
|
-
/**
|
|
1151
|
-
* Rebuild incoming contributions from the root seed. Starting with no
|
|
1152
|
-
* non-root contributions computes the least fixed point, so a disconnected
|
|
1153
|
-
* or narrowed cycle cannot keep scopes contributed by its previous state.
|
|
1154
|
-
*/
|
|
1155
|
-
private _reconcileScopesFromRoot;
|
|
1156
|
-
private _computeScopeFixedPoint;
|
|
1157
|
-
private _pruneUnreachable;
|
|
1158
|
-
/**
|
|
1159
|
-
* Every changed watch scope uses list/watch/list: callers reach this method
|
|
1160
|
-
* only after a list under the current scope, then the replacement watch is
|
|
1161
|
-
* installed before a verification list. Either the verification sees a
|
|
1162
|
-
* handoff mutation or the new watch ticks for it.
|
|
1163
|
-
*/
|
|
1164
|
-
private _synchronizeWatches;
|
|
1165
|
-
private _replaceWatch;
|
|
1166
|
-
private _queueTick;
|
|
1167
|
-
private _stopWatch;
|
|
1168
|
-
private _stopAllWatches;
|
|
1169
|
-
private _scheduleWatchRetry;
|
|
1170
|
-
private _clearWatchRetry;
|
|
1171
|
-
private _clearNodes;
|
|
1172
|
-
private _resetForExplore;
|
|
1173
|
-
private _updateNode;
|
|
1174
|
-
private _nodeReport;
|
|
1175
|
-
private _targetForKey;
|
|
1176
|
-
private _emitNodeAdded;
|
|
1177
|
-
private _emitNodeUpdated;
|
|
1178
|
-
private _emitNodeRemoved;
|
|
1179
|
-
private _startReconciliation;
|
|
1180
|
-
private _settle;
|
|
1181
|
-
private _emitSnapshot;
|
|
1182
|
-
private _emitGraphEvent;
|
|
1183
|
-
private _deliverGraphEvent;
|
|
1184
|
-
private _nodeKeyForTarget;
|
|
1185
|
-
private _throwIfDisposed;
|
|
1186
|
-
}
|
|
1187
|
-
//#endregion
|
|
1188
865
|
export { type AutoNegotiateConsumer, DEFAULT_WALK_DEPTH, type DiscoveredListing, type HubAccessDuration, type HubAccessManifestDecision, type HubAccessManifestRequest, type HubAccessPattern, type HubAccessPermission, type HubAccessRequest, type HubAccessResult, type HubDirectoryChange, HubDirectoryExplorer, type HubDirectoryGraphEvent, type HubDirectoryGraphSnapshot, type HubDirectoryGraphTarget, type HubDirectoryNodeReport, type HubDirectoryNodeState, type HubDirectoryParentReport, type IHubAccessManifest, type ITransportServer, type InaccessibleDirectory, type ListOptions, type ManagedSigningOptions, ROOT_SERVICE_ID, type ReflectionChannel, SERVICE_ID_SEPARATOR, type ServiceId, type ServiceListing, type Transport, type WalkHubOptions, type WalkHubResult, createAutoNegotiatingCapProvider, createManagedSigningChannel, fetchDirectory, fetchSchema, findCoveringCapabilities, findMethodInSchema, hubAccessInterface, hubAccessManifestInterface, hubGrantedServiceIdInterface, hubServiceIdRegistryInterface, intersectServiceIdScopes, isServiceIdUnder, isValidServiceId, mapTransport, normalizeServiceIdScopes, registerGrantedServiceId, serviceIdMatchesPattern, serviceIdMatchesScopes, splitServiceId, walkHub, walkHubDetailed };
|
|
1189
866
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/hub/common/serviceId.ts","../../../src/hub/common/transportServer.ts","../../../src/hub/common/hub.interfaces.ts","../../../src/hub/common/baseCapabilities.ts","../../../src/hub/common/managedSigning.ts"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/hub/common/serviceId.ts","../../../src/hub/common/transportServer.ts","../../../src/hub/common/hub.interfaces.ts","../../../src/hub/common/baseCapabilities.ts","../../../src/hub/common/managedSigning.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;KAmBY;;cAGC,iBAAiB;;cAGjB;;;;;;iBAOG,iBAAiB;;;;;;;;iBAcjB,eAAe,IAAI;;;;;;iBASnB,iBAAiB,WAAW,WAAW,QAAQ;;;;;;;;;;UC7C9C,kBAAkB;;WAEtB,eAAe;;;;;;EAMxB,WAAW;;;;;;;;UASE,iBAAiB,UAAU;;;;;EAKxC,qBAAqB,UAAU,WAAW;EAC1C;;;;;;;;;;iBAWY,aAAa,WAAW,WAAW,WAAW,WAC1D,QAAQ,iBAAiB,KACzB,MAAM,WAAW,OAAO,iBAAiB,QAAQ,kBAClD,iBAAiB;;;;;;;;;;;;;cCoIP;;;;;;;;;;;;;;;;;;;;;;;;cAmCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAwQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4ED,qBAAqB,uBAAuB;;KAG5C,2BACR,QAAQ,WAAW;;KAGX,4BACR,QAAQ,WAAW;;;;;;;;;iBC/mBD,yBAClB,QAAQ,eAAe,iBACvB,oBACD;;;;UCcc;WACJ;WACA;WACA;;;UAII;;;;;;;;;;;;WAYJ;;WAEA,WAAW;;;;;;;;;;;;;iBAcF,4BAClB,SAAS,oBACT,OAAO,wBACR,QAAQ;;;;;;;;;;;;;;iBAkCK,iCAAiC;WACpC,QAAQ,eAAe;WACvB,WAAW;WACX,UAAU;IACnB"}
|
package/dist/hub/common/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import {
|
|
6
|
-
import { i as hubServiceIdRegistryInterface, n as hubAccessManifestInterface, r as hubGrantedServiceIdInterface, t as hubAccessInterface } from "../../chunks/hub.interfaces-
|
|
5
|
+
import { It as methodNameToTarget, K as matchParams, at as HubDirectoryExplorer, ct as findMethodInSchema, dt as serviceIdMatchesPattern, ft as serviceIdMatchesScopes, g as createManagedPrincipal, it as DEFAULT_WALK_DEPTH, lt as intersectServiceIdScopes, m as SigningSender, mt as walkHubDetailed, ot as fetchDirectory, pt as walkHub, q as permissionMatchesTarget, s as capabilityFreshAt, st as fetchSchema, ut as normalizeServiceIdScopes } from "../../chunks/src-BaCs8mWd.js";
|
|
6
|
+
import { i as hubServiceIdRegistryInterface, n as hubAccessManifestInterface, r as hubGrantedServiceIdInterface, t as hubAccessInterface } from "../../chunks/hub.interfaces-BWqqhgtT.js";
|
|
7
7
|
//#region src/hub/common/serviceId.ts
|
|
8
8
|
/** The root service id — the hub's own local services. */
|
|
9
9
|
const ROOT_SERVICE_ID = "";
|
package/dist/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { $ as
|
|
6
|
-
export { Ability, type AcceptedRootIssuer, ApplicationErrorDescriptor, ApplicationErrorDescriptorBase, ApplicationErrorOf, ApplicationErrorValue, ApplicationErrorsOf, ArraySchema, BareGetOptions, type BareInterfaceTarget, Base64Sha256, BooleanSchema, Call, CallBind, CallMeta, CallTarget, type CancellableRequest, CapBag, CapBagOptions, type CapProvider, type CapProviderResult, Capability, Channel, ChannelConnector, type ChannelTransport, CheckedCall, CheckedCallResult, type CmdEnvEndpoint, type CmdStdioEndpoint, Components, type ConnectableChannel, ConstSchema, CreatedApplicationErrorValue, DEFAULT_RPC_TIMEOUT_MS, DeclaredApplicationErrorOf, DiscriminatorSchema, EXTENSION_PREFIX, type EndpointCommand, EnumSchema, ErrorCode, ErrorSchema, type ExpBackoffOptions, type FormatEndpointOptions, GenerateInterfaceOptions, GetOptions, HUBRPC_META_KEY, HUBRPC_SIGNATURE_KEY, HUBRPC_UNSIGNED_KEY, IMessageTransport, type IRequestHandler, type IRequestSender, Identity, InMemoryManagedIdentity, InMemoryManagedIdentityStorage, type IncomingCall, type IncomingStream, InspectionRegistration, IntegerSchema, InterfaceClient, InterfaceDefinition, InterfaceDefinitionOpts, InterfaceHandlers, InterfaceInfo, InterfaceMemberRef, InterfaceMemberRefMap, InterfaceRegistration, type IssueCapabilityOptions, JsonObject, JsonRpcChannel, JsonRpcError, JsonRpcMessage, JsonRpcNotification, JsonRpcRequest, JsonRpcResponse, JsonRpcSuccess, JsonValue, KEY_ID_PREFIX, type KeepConnectedHandle, KeyId, Keypair, KeypairIdentity, KeypairSigningIdentity, LINKRPC_META_KEY, LINKRPC_SIGNATURE_KEY, LINKRPC_UNSIGNED_KEY, LinkRpcConnection, LinkRpcConnectionOptions, LinkRpcInterfaceSchema, LinkRpcJsonRpcMessage, LinkRpcJsonRpcNotification, LinkRpcJsonRpcRequest, LinkRpcJsonSchema, LinkRpcUnsigned, LinkRpcWireMeta, LinkRpcWireParams, LocalRpcError, ManagedIdentity, ManagedIdentityStorage, ManagedIdentityStorageBackend, type ManagedSigningChannel, MaterializedJsonSchema, MemberAnnotations, MemberDocs, MemberMap, MemberType, MessageTransportDirection, MessageTransportTrace, MessageTransportWithContext, MessageWithContext, type MessageWithCtx, MethodSchema, MultiplexedTransport, MuxEnvelope, NodeInfo, NotificationType, NullSchema, NumberSchema, ObjectSchema, type OnChannelConnect, OneOfSchema, OneShotCapStaging, PRINCIPAL_PREFIX, ParamMatcher, type ParamMatcherFor, type ParamMatchers, ParsedMethodName, ParticipantDescriptor, ParticipantDescriptorSource, Pattern, Permission, type PermitResult, Principal, PrincipalId, PrincipalWithStore, PrivateKey, PublicApplicationErrorOf, PublicKey, PublicSigningIdentity, PublicWrappingIdentity, type RawStreamingCall, RefSchema, RegisterOptions, RemoteRpcError, RequestId, RequestType, ResolveSigningKeyArgs, type ResolvedEndpoint, type Result, RootPrincipalReq, RootPrincipalSet, RouteClaim, RpcError, STREAM_METHOD, Schema, SchemaBase, SchemaToZodContext, SeededPrincipalOptions, type SendOpts, SerializedKeypairSigningIdentity, ServiceHandle, ServiceIdPattern, SignDomain, SignParamsOptions, SignRpcCallOptions, Signature, SignatureEnvelope, Signatures, SignedCapability, SignedRpcCall, type SigningCallCtx, SigningIdentity, SigningSender, type SigningSenderConfig, type SocketEndpoint, StreamApi, StreamCallOptions, StreamControlReason, StreamControlType, StreamDir, type StreamSendOpts, StreamSendParams, StreamingCall, StringSchema, TargetPattern, TopologyGraph, TopologyIdGenerator, TopologyLink, TopologyLinkEndpoint, TopologyNode, TopologyPort, TopologyTransportEndpoint, TopologyTransportInfo, TrafficEvent, TrafficOverflowEvent, TrafficTransitEndpoint, TrafficTransitEvent, TrafficWatchResult, TransportPair, TupleSchema, UnionSchema, VerifyCallOptions, VerifyResult, VerifyRpcCallOptions, VerifyRpcCallResult, WrappingIdentity, type WsEndpoint, X25519Keypair, ZodToSvcJsonSchemaOptions, applicationError, assertSchemaReferences, attachCapabilities, bareInterfaceTarget, base64UrlToBytes, bytesToBase64Url, capBagFreshAt, capabilityFreshAt, capabilityPermits, componentSchemaName, componentSchemaRef, computeInterfaceHash, connectTransports, createManagedIdentity, createManagedPrincipal, createMemoryPrincipal, createSchemaToZod, createSeededMemoryPrincipal, createSeededSigningIdentity, crypto_d_exports as crypto, defaultsInterface, defineInterface, directoryInterface, directoryWatchNever, formatEndpointUri, generateTsInterface, getKeyId, hasSignedCapabilityShape, identityInterface, identityStorageInterface, interfaceFromSchema, invoke, isApplicationErrorValue, isAssignable, isHubEndpoint, isNotification, isRequest, isResponse, issueCapability, jcsCanonicalize, jcsCanonicalizeBytes, keyIdForPrincipal, keyIdForPublicKey, matchParams, matchesJsonSchema, materializeJsonSchema, methodNameToTarget, nodeInterface, normalizeJsonSchema, notificationType, parseEndpointUri, parseMethodName, permissionMatchesTarget, permissionPermits, permits, prefix, principalForPublicKey, publicKeyForKeyId, readSignature, registerIdentityOnOverlay, registerLazyIdentityOnOverlay, requestType, requireObjectParams, resolveSigningKey, schemaToZod, schemasInterface, signCapability, signParams, signRpcCall, signedHash, signingDomainValue, signingInput, streamInterface, stripLinkRpcWireMeta, topologyInterface, traceMessageTransport, trafficInterface, verifyCall, verifyRpcCall, withRpcTimeout, withSignature, zParticipantDescriptor, zParticipantDescriptorSource, zRouteClaim, zServiceIdPattern, zTopologyGraph, zTopologyLink, zTopologyLinkEndpoint, zTopologyNode, zTopologyPort, zTopologyTransportEndpoint, zTopologyTransportInfo, zTrafficEvent, zTrafficOverflowEvent, zTrafficTransitEndpoint, zTrafficTransitEvent, zTrafficWatchResult, zodToSvcJsonSchema };
|
|
5
|
+
import { $ as ExpBackoffOptions, $a as BooleanSchema, $i as createSchemaToZod, $n as InMemoryManagedIdentityStorage, $r as readSignature, $t as zParticipantDescriptorSource, A as VerifyRpcCallResult, Aa as ApplicationErrorDescriptorBase, Ai as RpcError, Ar as CallTarget, At as StreamSendParams, B as FormatEndpointOptions, Ba as RequestType, Bi as traceMessageTransport, Bn as CapProvider, Br as permissionMatchesTarget, Bt as TopologyLinkEndpoint, C as VerifyCallOptions, Ca as RemoteRpcError, Ci as IRequestHandler, Co as isRequest, Cr as PublicWrappingIdentity, Ct as parseMethodName, D as SignRpcCallOptions, Da as defineInterface, Di as MessageWithCtx, Dr as Ability, Dt as StreamControlReason, E as verifyCall, Ea as StreamingCall, Ei as IncomingStream, Er as WrappingIdentity, Et as STREAM_METHOD, F as identityStorageInterface, Fa as DeclaredApplicationErrorOf, Fi as MessageTransportTrace, Fr as SignedCapability, Ft as ParticipantDescriptor, G as formatEndpointUri, Ga as notificationType, Gi as StaticHubSchema, Gn as SigningSender, Gr as HUBRPC_UNSIGNED_KEY, Gt as TrafficEvent, H as SocketEndpoint, Ha as ZodToSvcJsonSchemaOptions, Hi as GenerateContractOptions, Hn as ManagedSigningChannel, Hr as Base64Sha256, Ht as TopologyPort, I as crypto_d_exports, Ia as MemberDocs, Ii as MessageTransportWithContext, Ir as TargetPattern, It as ParticipantDescriptorSource, J as CancellableRequest, Ja as ErrorSchema, Ji as StaticService, Jn as createManagedPrincipal, Jr as LINKRPC_UNSIGNED_KEY, Jt as TrafficTransitEvent, K as isHubEndpoint, Ka as requestType, Ki as StaticHubSchemaDocument, Kn as SigningSenderConfig, Kr as LINKRPC_META_KEY, Kt as TrafficOverflowEvent, L as CmdEnvEndpoint, La as MemberType, Li as MessageWithContext, Lr as capabilityPermits, Lt as RouteClaim, M as signRpcCall, Ma as ApplicationErrorValue, Mi as StreamSendOpts, Mr as ParamMatcher, Mt as NodeInfo, N as verifyRpcCall, Na as ApplicationErrorsOf, Ni as IMessageTransport, Nr as Pattern, Nt as TopologyIdGenerator, O as SignedRpcCall, Oa as interfaceFromSchema, Oi as RawStreamingCall, Or as Call, Ot as StreamControlType, P as identityInterface, Pa as CreatedApplicationErrorValue, Pi as MessageTransportDirection, Pr as Permission, Pt as nodeInterface, Q as ConnectableChannel, Qa as ArraySchema, Qi as SchemaToZodContext, Qn as InMemoryManagedIdentity, Qr as getKeyId, Qt as zParticipantDescriptor, R as CmdStdioEndpoint, Ra as NotificationType, Ri as TransportPair, Rr as hasSignedCapabilityShape, Rt as TopologyGraph, S as SignParamsOptions, Sa as MemberMap, Si as ChannelTransport, So as isNotification, Sr as PublicSigningIdentity, St as methodNameToTarget, T as signParams, Ta as StreamCallOptions, Ti as IncomingCall, To as JsonValue, Tr as SigningIdentity, Tt as jcsCanonicalizeBytes, U as WsEndpoint, Ua as applicationError, Ui as generateTsContract, Un as OneShotCapStaging, Ur as HUBRPC_META_KEY, Ut as TopologyTransportEndpoint, V as ResolvedEndpoint, Va as Schema, Vn as CapProviderResult, Vr as permissionPermits, Vt as TopologyNode, Wa as isApplicationErrorValue, Wi as InterfaceRef, Wn as SigningCallCtx, Wr as HUBRPC_SIGNATURE_KEY, Wt as TopologyTransportInfo, X as withRpcTimeout, Xa as MemberAnnotations, Xi as GenerateInterfaceOptions, Xn as CapBag, Xr as SignatureEnvelope, Xt as topologyInterface, Y as DEFAULT_RPC_TIMEOUT_MS, Ya as LinkRpcInterfaceSchema, Yi as parseStaticHubSchema, Yn as Principal, Yr as SignDomain, Yt as TrafficWatchResult, Z as ChannelConnector, Za as MethodSchema, Zi as generateTsInterface, Zn as CapBagOptions, Zr as Signatures, Zt as trafficInterface, _ as SeededPrincipalOptions, _a as InterfaceHandlers, _i as keyIdForPublicKey, _o as JsonRpcNotification, _r as prefix, _t as LinkRpcWireMeta, a as LinkRpcConnection, aa as componentSchemaRef, ai as KeyId, an as zTopologyPort, ao as NullSchema, ar as registerLazyIdentityOnOverlay, at as defaultInterfaceTarget, b as createSeededSigningIdentity, ba as InterfaceMemberRefMap, bi as resolveSigningKey, bo as JsonRpcSuccess, br as KeypairIdentity, bt as stripLinkRpcWireMeta, c as ServiceHandle, ca as matchesJsonSchema, ci as PrincipalId, cn as zTrafficEvent, co as OneOfSchema, cr as IssueCapabilityOptions, ct as BareInterfaceTarget, d as ServiceIdPattern, da as computeInterfaceHash, di as ResolveSigningKeyArgs, dn as zTrafficTransitEvent, do as StringSchema, dr as PermitResult, dt as MuxEnvelope, ea as schemaToZod, ei as signedHash, en as zRouteClaim, eo as ConstSchema, er as ManagedIdentity, et as KeepConnectedHandle, f as defaultsInterface, fa as CheckedCall, fi as Signature, fn as zTrafficWatchResult, fo as TupleSchema, fr as capBagFreshAt, ft as CallMeta, g as zServiceIdPattern, ga as InterfaceDefinitionOpts, gi as keyIdForPrincipal, go as JsonRpcMessage, gr as permits, gt as LinkRpcUnsigned, h as schemasInterface, ha as InterfaceDefinition, hi as bytesToBase64Url, ho as JsonRpcError, hr as issueCapability, ht as LinkRpcJsonRpcRequest, i as InterfaceRegistration, ia as componentSchemaName, ii as KEY_ID_PREFIX, in as zTopologyNode, io as LinkRpcJsonSchema, ir as registerIdentityOnOverlay, it as QualifiedInterfaceTarget, j as attachCapabilities, ja as ApplicationErrorOf, ji as SendOpts, jr as Capability, jt as streamInterface, k as VerifyRpcCallOptions, ka as ApplicationErrorDescriptor, ki as Result, kr as CallBind, kt as StreamDir, l as RootPrincipalReq, la as normalizeJsonSchema, li as PrivateKey, ln as zTrafficOverflowEvent, lo as RefSchema, lr as ParamMatcherFor, lt as bareInterfaceTarget, m as directoryWatchNever, ma as InterfaceClient, mi as base64UrlToBytes, mn as exportStaticHubSchema, mo as ErrorCode, mr as invoke, mt as LinkRpcJsonRpcNotification, n as GetOptions, na as materializeJsonSchema, ni as signingInput, nn as zTopologyLink, no as EnumSchema, nr as ManagedIdentityStorageBackend, nt as DefaultInterfaceTarget, o as LinkRpcConnectionOptions, oa as Components, oi as Keypair, on as zTopologyTransportEndpoint, oo as NumberSchema, or as JsonRpcChannel, ot as interfaceTarget, p as directoryInterface, pa as CheckedCallResult, pi as X25519Keypair, pn as ExportStaticHubSchemaOptions, po as UnionSchema, pr as capabilityFreshAt, pt as LinkRpcJsonRpcMessage, q as parseEndpointUri, qa as zodToSvcJsonSchema, qi as StaticInterfaceReference, qn as PrincipalWithStore, qr as LINKRPC_SIGNATURE_KEY, qt as TrafficTransitEndpoint, r as InspectionRegistration, ra as assertSchemaReferences, ri as withSignature, rn as zTopologyLinkEndpoint, ro as IntegerSchema, rr as createManagedIdentity, rt as InterfaceTarget, s as RegisterOptions, sa as isAssignable, si as PRINCIPAL_PREFIX, sn as zTopologyTransportInfo, so as ObjectSchema, sr as AcceptedRootIssuer, st as isInterfaceTarget, t as BareGetOptions, ta as MaterializedJsonSchema, ti as signingDomainValue, tn as zTopologyGraph, to as DiscriminatorSchema, tr as ManagedIdentityStorage, tt as OnChannelConnect, u as RootPrincipalSet, ua as EXTENSION_PREFIX, ui as PublicKey, un as zTrafficTransitEndpoint, uo as SchemaBase, ur as ParamMatchers, ut as MultiplexedTransport, v as createMemoryPrincipal, va as InterfaceInfo, vi as principalForPublicKey, vo as JsonRpcRequest, vr as signCapability, vt as LinkRpcWireParams, w as VerifyResult, wa as StreamApi, wi as IRequestSender, wo as isResponse, wr as SerializedKeypairSigningIdentity, wt as jcsCanonicalize, x as JsonObject, xa as LocalRpcError, xi as Channel, xo as RequestId, xr as KeypairSigningIdentity, xt as ParsedMethodName, y as createSeededMemoryPrincipal, ya as InterfaceMemberRef, yi as publicKeyForKeyId, yo as JsonRpcResponse, yr as Identity, yt as requireObjectParams, z as EndpointCommand, za as PublicApplicationErrorOf, zi as connectTransports, zr as matchParams, zt as TopologyLink } from "./chunks/linkRpcConnection-C_Gs4nZ9.js";
|
|
6
|
+
export { Ability, type AcceptedRootIssuer, ApplicationErrorDescriptor, ApplicationErrorDescriptorBase, ApplicationErrorOf, ApplicationErrorValue, ApplicationErrorsOf, ArraySchema, BareGetOptions, type BareInterfaceTarget, Base64Sha256, BooleanSchema, Call, CallBind, CallMeta, CallTarget, type CancellableRequest, CapBag, CapBagOptions, type CapProvider, type CapProviderResult, Capability, Channel, ChannelConnector, type ChannelTransport, CheckedCall, CheckedCallResult, type CmdEnvEndpoint, type CmdStdioEndpoint, Components, type ConnectableChannel, ConstSchema, CreatedApplicationErrorValue, DEFAULT_RPC_TIMEOUT_MS, DeclaredApplicationErrorOf, DefaultInterfaceTarget, DiscriminatorSchema, EXTENSION_PREFIX, type EndpointCommand, EnumSchema, ErrorCode, ErrorSchema, type ExpBackoffOptions, ExportStaticHubSchemaOptions, type FormatEndpointOptions, GenerateContractOptions, GenerateInterfaceOptions, GetOptions, HUBRPC_META_KEY, HUBRPC_SIGNATURE_KEY, HUBRPC_UNSIGNED_KEY, IMessageTransport, type IRequestHandler, type IRequestSender, Identity, InMemoryManagedIdentity, InMemoryManagedIdentityStorage, type IncomingCall, type IncomingStream, InspectionRegistration, IntegerSchema, InterfaceClient, InterfaceDefinition, InterfaceDefinitionOpts, InterfaceHandlers, InterfaceInfo, InterfaceMemberRef, InterfaceMemberRefMap, InterfaceRef, InterfaceRegistration, InterfaceTarget, type IssueCapabilityOptions, JsonObject, JsonRpcChannel, JsonRpcError, JsonRpcMessage, JsonRpcNotification, JsonRpcRequest, JsonRpcResponse, JsonRpcSuccess, JsonValue, KEY_ID_PREFIX, type KeepConnectedHandle, KeyId, Keypair, KeypairIdentity, KeypairSigningIdentity, LINKRPC_META_KEY, LINKRPC_SIGNATURE_KEY, LINKRPC_UNSIGNED_KEY, LinkRpcConnection, LinkRpcConnectionOptions, LinkRpcInterfaceSchema, LinkRpcJsonRpcMessage, LinkRpcJsonRpcNotification, LinkRpcJsonRpcRequest, LinkRpcJsonSchema, LinkRpcUnsigned, LinkRpcWireMeta, LinkRpcWireParams, LocalRpcError, ManagedIdentity, ManagedIdentityStorage, ManagedIdentityStorageBackend, type ManagedSigningChannel, MaterializedJsonSchema, MemberAnnotations, MemberDocs, MemberMap, MemberType, MessageTransportDirection, MessageTransportTrace, MessageTransportWithContext, MessageWithContext, type MessageWithCtx, MethodSchema, MultiplexedTransport, MuxEnvelope, NodeInfo, NotificationType, NullSchema, NumberSchema, ObjectSchema, type OnChannelConnect, OneOfSchema, OneShotCapStaging, PRINCIPAL_PREFIX, ParamMatcher, type ParamMatcherFor, type ParamMatchers, ParsedMethodName, ParticipantDescriptor, ParticipantDescriptorSource, Pattern, Permission, type PermitResult, Principal, PrincipalId, PrincipalWithStore, PrivateKey, PublicApplicationErrorOf, PublicKey, PublicSigningIdentity, PublicWrappingIdentity, QualifiedInterfaceTarget, type RawStreamingCall, RefSchema, RegisterOptions, RemoteRpcError, RequestId, RequestType, ResolveSigningKeyArgs, type ResolvedEndpoint, type Result, RootPrincipalReq, RootPrincipalSet, RouteClaim, RpcError, STREAM_METHOD, Schema, SchemaBase, SchemaToZodContext, SeededPrincipalOptions, type SendOpts, SerializedKeypairSigningIdentity, ServiceHandle, ServiceIdPattern, SignDomain, SignParamsOptions, SignRpcCallOptions, Signature, SignatureEnvelope, Signatures, SignedCapability, SignedRpcCall, type SigningCallCtx, SigningIdentity, SigningSender, type SigningSenderConfig, type SocketEndpoint, StaticHubSchema, StaticHubSchemaDocument, StaticInterfaceReference, StaticService, StreamApi, StreamCallOptions, StreamControlReason, StreamControlType, StreamDir, type StreamSendOpts, StreamSendParams, StreamingCall, StringSchema, TargetPattern, TopologyGraph, TopologyIdGenerator, TopologyLink, TopologyLinkEndpoint, TopologyNode, TopologyPort, TopologyTransportEndpoint, TopologyTransportInfo, TrafficEvent, TrafficOverflowEvent, TrafficTransitEndpoint, TrafficTransitEvent, TrafficWatchResult, TransportPair, TupleSchema, UnionSchema, VerifyCallOptions, VerifyResult, VerifyRpcCallOptions, VerifyRpcCallResult, WrappingIdentity, type WsEndpoint, X25519Keypair, ZodToSvcJsonSchemaOptions, applicationError, assertSchemaReferences, attachCapabilities, bareInterfaceTarget, base64UrlToBytes, bytesToBase64Url, capBagFreshAt, capabilityFreshAt, capabilityPermits, componentSchemaName, componentSchemaRef, computeInterfaceHash, connectTransports, createManagedIdentity, createManagedPrincipal, createMemoryPrincipal, createSchemaToZod, createSeededMemoryPrincipal, createSeededSigningIdentity, crypto_d_exports as crypto, defaultInterfaceTarget, defaultsInterface, defineInterface, directoryInterface, directoryWatchNever, exportStaticHubSchema, formatEndpointUri, generateTsContract, generateTsInterface, getKeyId, hasSignedCapabilityShape, identityInterface, identityStorageInterface, interfaceFromSchema, interfaceTarget, invoke, isApplicationErrorValue, isAssignable, isHubEndpoint, isInterfaceTarget, isNotification, isRequest, isResponse, issueCapability, jcsCanonicalize, jcsCanonicalizeBytes, keyIdForPrincipal, keyIdForPublicKey, matchParams, matchesJsonSchema, materializeJsonSchema, methodNameToTarget, nodeInterface, normalizeJsonSchema, notificationType, parseEndpointUri, parseMethodName, parseStaticHubSchema, permissionMatchesTarget, permissionPermits, permits, prefix, principalForPublicKey, publicKeyForKeyId, readSignature, registerIdentityOnOverlay, registerLazyIdentityOnOverlay, requestType, requireObjectParams, resolveSigningKey, schemaToZod, schemasInterface, signCapability, signParams, signRpcCall, signedHash, signingDomainValue, signingInput, streamInterface, stripLinkRpcWireMeta, topologyInterface, traceMessageTransport, trafficInterface, verifyCall, verifyRpcCall, withRpcTimeout, withSignature, zParticipantDescriptor, zParticipantDescriptorSource, zRouteClaim, zServiceIdPattern, zTopologyGraph, zTopologyLink, zTopologyLinkEndpoint, zTopologyNode, zTopologyPort, zTopologyTransportEndpoint, zTopologyTransportInfo, zTrafficEvent, zTrafficOverflowEvent, zTrafficTransitEndpoint, zTrafficTransitEvent, zTrafficWatchResult, zodToSvcJsonSchema };
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { A as
|
|
6
|
-
import { $
|
|
7
|
-
export { CapBag, Channel, ChannelConnector, DEFAULT_RPC_TIMEOUT_MS, EXTENSION_PREFIX, ErrorCode, HUBRPC_META_KEY, HUBRPC_SIGNATURE_KEY, HUBRPC_UNSIGNED_KEY, InMemoryManagedIdentity, InMemoryManagedIdentityStorage, InterfaceDefinition, JsonRpcChannel, KEY_ID_PREFIX, KeypairIdentity, KeypairSigningIdentity, LINKRPC_META_KEY, LINKRPC_SIGNATURE_KEY, LINKRPC_UNSIGNED_KEY, LinkRpcConnection, MultiplexedTransport, NotificationType, OneShotCapStaging, PRINCIPAL_PREFIX, Principal, PrincipalWithStore, PublicSigningIdentity, PublicWrappingIdentity, RequestType, RpcError, STREAM_METHOD, ServiceHandle, SigningSender, StreamControlReason, StreamControlType, StreamDir, TransportPair, applicationError, assertSchemaReferences, attachCapabilities, bareInterfaceTarget, base64UrlToBytes, bytesToBase64Url, capBagFreshAt, capabilityFreshAt, capabilityPermits, componentSchemaName, componentSchemaRef, computeInterfaceHash, connectTransports, createManagedIdentity, createManagedPrincipal, createMemoryPrincipal, createSchemaToZod, createSeededMemoryPrincipal, createSeededSigningIdentity, crypto_exports as crypto, defaultsInterface, defineInterface, directoryInterface, directoryWatchNever, formatEndpointUri, generateTsInterface, getKeyId, hasSignedCapabilityShape, identityInterface, identityStorageInterface, interfaceFromSchema, invoke, isApplicationErrorValue, isAssignable, isHubEndpoint, isNotification, isRequest, isResponse, issueCapability, jcsCanonicalize, jcsCanonicalizeBytes, keyIdForPrincipal, keyIdForPublicKey, matchParams, matchesJsonSchema, materializeJsonSchema, methodNameToTarget, nodeInterface, normalizeJsonSchema, notificationType, parseEndpointUri, parseMethodName, permissionMatchesTarget, permissionPermits, permits, prefix, principalForPublicKey, publicKeyForKeyId, readSignature, registerIdentityOnOverlay, registerLazyIdentityOnOverlay, requestType, requireObjectParams, resolveSigningKey, schemaToZod, schemasInterface, signCapability, signParams, signRpcCall, signedHash, signingDomainValue, signingInput, streamInterface, stripLinkRpcWireMeta, topologyInterface, traceMessageTransport, trafficInterface, verifyCall, verifyRpcCall, withRpcTimeout, withSignature, zParticipantDescriptor, zParticipantDescriptorSource, zRouteClaim, zServiceIdPattern, zTopologyGraph, zTopologyLink, zTopologyLinkEndpoint, zTopologyNode, zTopologyPort, zTopologyTransportEndpoint, zTopologyTransportInfo, zTrafficEvent, zTrafficOverflowEvent, zTrafficTransitEndpoint, zTrafficTransitEvent, zTrafficWatchResult, zodToSvcJsonSchema };
|
|
5
|
+
import { $ as jcsCanonicalize, A as PRINCIPAL_PREFIX, B as isRequest, C as zTopologyTransportInfo, D as zTrafficTransitEvent, E as zTrafficTransitEndpoint, F as principalForPublicKey, G as createSchemaToZod, H as InterfaceDefinition, I as publicKeyForKeyId, J as componentSchemaName, K as schemaToZod, L as resolveSigningKey, M as bytesToBase64Url, N as keyIdForPrincipal, O as zTrafficWatchResult, P as keyIdForPublicKey, R as ErrorCode, S as zTopologyTransportEndpoint, T as zTrafficOverflowEvent, U as defineInterface, V as isResponse, W as interfaceFromSchema, X as EXTENSION_PREFIX, Y as componentSchemaRef, Z as computeInterfaceHash, _ as zTopologyGraph, at as notificationType, b as zTopologyNode, c as StreamControlType, ct as normalizeJsonSchema, d as nodeInterface, et as jcsCanonicalizeBytes, f as topologyInterface, g as zRouteClaim, h as zParticipantDescriptorSource, it as isApplicationErrorValue, j as base64UrlToBytes, k as KEY_ID_PREFIX, l as StreamDir, m as zParticipantDescriptor, nt as RequestType, o as STREAM_METHOD, ot as requestType, p as trafficInterface, q as assertSchemaReferences, rt as applicationError, s as StreamControlReason, st as zodToSvcJsonSchema, tt as NotificationType, u as streamInterface, v as zTopologyLink, w as zTrafficEvent, x as zTopologyPort, y as zTopologyLinkEndpoint, z as isNotification } from "./chunks/inspectionHost-BA08eF6h.js";
|
|
6
|
+
import { $ as interfaceTarget, A as attachCapabilities, At as getKeyId, B as MultiplexedTransport, Bt as generateTsInterface, C as identityStorageInterface, Ct as stripLinkRpcWireMeta, D as PublicWrappingIdentity, Dt as LINKRPC_META_KEY, E as PublicSigningIdentity, Et as HUBRPC_UNSIGNED_KEY, Ft as withSignature, G as hasSignedCapabilityShape, H as connectTransports, Ht as materializeJsonSchema, I as formatEndpointUri, It as methodNameToTarget, J as permissionPermits, K as matchParams, L as isHubEndpoint, Lt as parseMethodName, M as verifyRpcCall, Mt as signedHash, N as crypto_exports, Nt as signingDomainValue, O as Principal, Ot as LINKRPC_SIGNATURE_KEY, Pt as signingInput, Q as defaultInterfaceTarget, R as parseEndpointUri, Rt as generateTsContract, S as identityInterface, St as requireObjectParams, T as KeypairSigningIdentity, Tt as HUBRPC_SIGNATURE_KEY, U as traceMessageTransport, Ut as isAssignable, V as TransportPair, Vt as bareInterfaceTarget, W as capabilityPermits, Wt as matchesJsonSchema, X as LinkRpcConnection, Y as exportStaticHubSchema, Z as ServiceHandle, _ as InMemoryManagedIdentity, _t as defaultsInterface, a as verifyCall, b as registerIdentityOnOverlay, bt as schemasInterface, c as invoke, d as prefix, et as isInterfaceTarget, f as signCapability, g as createManagedPrincipal, gt as withRpcTimeout, h as PrincipalWithStore, ht as DEFAULT_RPC_TIMEOUT_MS, i as signParams, j as signRpcCall, jt as readSignature, k as CapBag, kt as LINKRPC_UNSIGNED_KEY, l as issueCapability, m as SigningSender, n as createSeededMemoryPrincipal, nt as Channel, o as capBagFreshAt, p as OneShotCapStaging, q as permissionMatchesTarget, r as createSeededSigningIdentity, rt as RpcError, s as capabilityFreshAt, t as createMemoryPrincipal, tt as JsonRpcChannel, u as permits, v as InMemoryManagedIdentityStorage, vt as directoryInterface, w as KeypairIdentity, wt as HUBRPC_META_KEY, x as registerLazyIdentityOnOverlay, xt as zServiceIdPattern, y as createManagedIdentity, yt as directoryWatchNever, z as ChannelConnector, zt as parseStaticHubSchema } from "./chunks/src-BaCs8mWd.js";
|
|
7
|
+
export { CapBag, Channel, ChannelConnector, DEFAULT_RPC_TIMEOUT_MS, EXTENSION_PREFIX, ErrorCode, HUBRPC_META_KEY, HUBRPC_SIGNATURE_KEY, HUBRPC_UNSIGNED_KEY, InMemoryManagedIdentity, InMemoryManagedIdentityStorage, InterfaceDefinition, JsonRpcChannel, KEY_ID_PREFIX, KeypairIdentity, KeypairSigningIdentity, LINKRPC_META_KEY, LINKRPC_SIGNATURE_KEY, LINKRPC_UNSIGNED_KEY, LinkRpcConnection, MultiplexedTransport, NotificationType, OneShotCapStaging, PRINCIPAL_PREFIX, Principal, PrincipalWithStore, PublicSigningIdentity, PublicWrappingIdentity, RequestType, RpcError, STREAM_METHOD, ServiceHandle, SigningSender, StreamControlReason, StreamControlType, StreamDir, TransportPair, applicationError, assertSchemaReferences, attachCapabilities, bareInterfaceTarget, base64UrlToBytes, bytesToBase64Url, capBagFreshAt, capabilityFreshAt, capabilityPermits, componentSchemaName, componentSchemaRef, computeInterfaceHash, connectTransports, createManagedIdentity, createManagedPrincipal, createMemoryPrincipal, createSchemaToZod, createSeededMemoryPrincipal, createSeededSigningIdentity, crypto_exports as crypto, defaultInterfaceTarget, defaultsInterface, defineInterface, directoryInterface, directoryWatchNever, exportStaticHubSchema, formatEndpointUri, generateTsContract, generateTsInterface, getKeyId, hasSignedCapabilityShape, identityInterface, identityStorageInterface, interfaceFromSchema, interfaceTarget, invoke, isApplicationErrorValue, isAssignable, isHubEndpoint, isInterfaceTarget, isNotification, isRequest, isResponse, issueCapability, jcsCanonicalize, jcsCanonicalizeBytes, keyIdForPrincipal, keyIdForPublicKey, matchParams, matchesJsonSchema, materializeJsonSchema, methodNameToTarget, nodeInterface, normalizeJsonSchema, notificationType, parseEndpointUri, parseMethodName, parseStaticHubSchema, permissionMatchesTarget, permissionPermits, permits, prefix, principalForPublicKey, publicKeyForKeyId, readSignature, registerIdentityOnOverlay, registerLazyIdentityOnOverlay, requestType, requireObjectParams, resolveSigningKey, schemaToZod, schemasInterface, signCapability, signParams, signRpcCall, signedHash, signingDomainValue, signingInput, streamInterface, stripLinkRpcWireMeta, topologyInterface, traceMessageTransport, trafficInterface, verifyCall, verifyRpcCall, withRpcTimeout, withSignature, zParticipantDescriptor, zParticipantDescriptorSource, zRouteClaim, zServiceIdPattern, zTopologyGraph, zTopologyLink, zTopologyLinkEndpoint, zTopologyNode, zTopologyPort, zTopologyTransportEndpoint, zTopologyTransportInfo, zTrafficEvent, zTrafficOverflowEvent, zTrafficTransitEndpoint, zTrafficTransitEvent, zTrafficWatchResult, zodToSvcJsonSchema };
|