@net-mesh/core 0.31.0 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +609 -11
- package/index.js +66 -52
- package/net.darwin-arm64.node +0 -0
- package/net.darwin-x64.node +0 -0
- package/net.linux-arm64-gnu.node +0 -0
- package/net.linux-arm64-musl.node +0 -0
- package/net.linux-x64-gnu.node +0 -0
- package/net.linux-x64-musl.node +0 -0
- package/net.win32-arm64-msvc.node +0 -0
- package/net.win32-x64-msvc.node +0 -0
- package/package.json +12 -12
package/index.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
/* auto-generated by NAPI-RS */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Keeps the served A2A services alive (returned by `NetMesh.serveA2a`).
|
|
5
|
+
* Dropping it or calling [`stop`](Self::stop) unregisters them.
|
|
6
|
+
*/
|
|
7
|
+
export declare class A2aServeHandle {
|
|
8
|
+
/** Stop accepting A2A tasks (unregister the services). Idempotent. */
|
|
9
|
+
stop(): void
|
|
10
|
+
/** Whether the services are still registered. */
|
|
11
|
+
get serving(): boolean
|
|
12
|
+
}
|
|
13
|
+
|
|
3
14
|
/**
|
|
4
15
|
* Typed admin-event surface — one method per `AdminEvent`
|
|
5
16
|
* variant. Each commits via the substrate's admin chain + returns
|
|
@@ -772,6 +783,138 @@ export declare class DeckClient {
|
|
|
772
783
|
subscribeFailures(sinceSeq?: bigint | undefined | null): Promise<FailureStream>
|
|
773
784
|
}
|
|
774
785
|
|
|
786
|
+
/**
|
|
787
|
+
* A `root → … → leaf` delegation chain that attributes a capability
|
|
788
|
+
* invocation to the terminal agent identity.
|
|
789
|
+
*
|
|
790
|
+
* Built with [`Self::derive_gateway`] and extended per-task with
|
|
791
|
+
* [`Self::extend_to_subagent`]. Verify it against a
|
|
792
|
+
* [`RevocationRegistry`] with [`Self::verify`]; serialize with
|
|
793
|
+
* [`Self::to_bytes`] to carry it.
|
|
794
|
+
*/
|
|
795
|
+
export declare class DelegationChain {
|
|
796
|
+
/**
|
|
797
|
+
* Build a `root → machine → gateway` chain from opaque `Identity`
|
|
798
|
+
* handles. `root` and `machine` sign their own delegations; only
|
|
799
|
+
* `gateway`'s public entity-id is used (its keypair stays with the
|
|
800
|
+
* gateway). `ttlSeconds` is the grant lifetime; the whole chain
|
|
801
|
+
* expires together. `maxDepth` (default 4) leaves room for subagent
|
|
802
|
+
* hops.
|
|
803
|
+
*/
|
|
804
|
+
static deriveGateway(root: Identity, machine: Identity, gateway: Identity, ttlSeconds: number, maxDepth?: number | undefined | null): DelegationChain
|
|
805
|
+
/**
|
|
806
|
+
* Parse a serialized chain. Throws `token: invalid_format` on an
|
|
807
|
+
* empty chain, too many links, or trailing garbage.
|
|
808
|
+
*/
|
|
809
|
+
static fromBytes(data: Buffer): DelegationChain
|
|
810
|
+
/**
|
|
811
|
+
* Extend this chain with a `… → subagent` link, signed by the current
|
|
812
|
+
* leaf's owner (`leafSigner`, whose entity-id must equal the chain's
|
|
813
|
+
* current leaf subject — e.g. the gateway extending to a subagent).
|
|
814
|
+
* The subagent link drops the delegate right but keeps invoke
|
|
815
|
+
* authority, so its own calls verify and are individually
|
|
816
|
+
* attributable. Returns a new chain; the original is unchanged.
|
|
817
|
+
*/
|
|
818
|
+
extendToSubagent(leafSigner: Identity, subagent: Buffer): DelegationChain
|
|
819
|
+
/**
|
|
820
|
+
* `true` if the chain still authorizes an invocation by `presenter`,
|
|
821
|
+
* anchored at `root`, honoring `registry`. Returns `false` (never
|
|
822
|
+
* throws) when the chain is expired, revoked, rooted elsewhere, or
|
|
823
|
+
* presented by the wrong identity — so a caller can gate a check on
|
|
824
|
+
* it directly. `skewSeconds` tolerates clock drift (default 0 =
|
|
825
|
+
* strict).
|
|
826
|
+
*/
|
|
827
|
+
verify(presenter: Buffer, root: Buffer, registry: RevocationRegistry, skewSeconds?: number | undefined | null): boolean
|
|
828
|
+
/**
|
|
829
|
+
* The terminal (leaf) subject entity-id — the agent this chain
|
|
830
|
+
* attributes to (the gateway, or a subagent after
|
|
831
|
+
* [`Self::extend_to_subagent`]).
|
|
832
|
+
*/
|
|
833
|
+
get leaf(): Buffer
|
|
834
|
+
/** The root issuer entity-id the chain anchors at. */
|
|
835
|
+
get root(): Buffer
|
|
836
|
+
/** The subject entity-id of each link, root-to-leaf. */
|
|
837
|
+
subjects(): Array<Buffer>
|
|
838
|
+
/**
|
|
839
|
+
* Serialize to wire bytes (a `TokenChain` blob) for carriage on an
|
|
840
|
+
* invoke or hand-off to another process.
|
|
841
|
+
*/
|
|
842
|
+
toBytes(): Buffer
|
|
843
|
+
/**
|
|
844
|
+
* Number of delegation links (2 for a bare gateway chain, +1 per
|
|
845
|
+
* subagent hop).
|
|
846
|
+
*/
|
|
847
|
+
get length(): number
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* A device's **persisted** enrollment — its own key + the
|
|
852
|
+
* `root → device` grant it received — so it survives restarts without
|
|
853
|
+
* re-pairing. The device seed stays in Rust (H8); [`Self::device`] hands
|
|
854
|
+
* back an opaque `Identity`.
|
|
855
|
+
*/
|
|
856
|
+
export declare class DeviceEnrollment {
|
|
857
|
+
/**
|
|
858
|
+
* Bundle a device `Identity` handle with the `root → device` chain it
|
|
859
|
+
* received from `join`, the operator's `rendezvous` locator (from the
|
|
860
|
+
* invite, for renewal), and the unix-seconds it enrolled.
|
|
861
|
+
*/
|
|
862
|
+
constructor(device: Identity, chain: DelegationChain, rendezvous: string, enrolledAt: bigint)
|
|
863
|
+
/**
|
|
864
|
+
* Load a persisted enrollment from `path`. Resolves `null` if none is
|
|
865
|
+
* saved yet; rejects on a corrupt file.
|
|
866
|
+
*/
|
|
867
|
+
static load(path: string): Promise<DeviceEnrollment | null>
|
|
868
|
+
/**
|
|
869
|
+
* Persist to `path` (`0600`, atomic). Overwrites — e.g. after a
|
|
870
|
+
* renewal.
|
|
871
|
+
*/
|
|
872
|
+
save(path: string): Promise<void>
|
|
873
|
+
/**
|
|
874
|
+
* The device's opaque `Identity` handle (its private seed stays in
|
|
875
|
+
* Rust) — use it to extend the grant to a gateway.
|
|
876
|
+
*/
|
|
877
|
+
get device(): Identity
|
|
878
|
+
/** The `root → device` delegation chain. */
|
|
879
|
+
get chain(): DelegationChain
|
|
880
|
+
/**
|
|
881
|
+
* The operator's rendezvous locator — where the device dials to
|
|
882
|
+
* renew.
|
|
883
|
+
*/
|
|
884
|
+
get rendezvous(): string
|
|
885
|
+
/** The mesh root the grant anchors at (32 bytes). */
|
|
886
|
+
get root(): Buffer
|
|
887
|
+
/** Unix-seconds the device enrolled. */
|
|
888
|
+
get enrolledAt(): bigint
|
|
889
|
+
/** Unix-seconds the grant expires. */
|
|
890
|
+
get expiresAt(): bigint
|
|
891
|
+
/**
|
|
892
|
+
* Whether the grant still verifies + is unexpired. Pass a
|
|
893
|
+
* `RevocationRegistry` (an empty one is fine device-side — the
|
|
894
|
+
* provider enforces revocation on invoke). `skewSeconds` tolerates
|
|
895
|
+
* clock drift (default 0 = strict).
|
|
896
|
+
*/
|
|
897
|
+
isValid(revocation: RevocationRegistry, skewSeconds?: number | undefined | null): boolean
|
|
898
|
+
/**
|
|
899
|
+
* Whether the grant is within `windowSeconds` of expiry at `now`
|
|
900
|
+
* (unix secs) — the trigger for silent renewal.
|
|
901
|
+
*/
|
|
902
|
+
needsRenewal(windowSeconds: number, now: bigint): boolean
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
/** One enrolled device in the operator's inventory. */
|
|
906
|
+
export declare class DeviceRecord {
|
|
907
|
+
/** The device entity-id (32 bytes). */
|
|
908
|
+
get device(): Buffer
|
|
909
|
+
get name(): string
|
|
910
|
+
get tags(): Array<string>
|
|
911
|
+
/** Unix-seconds the device enrolled. */
|
|
912
|
+
get enrolledAt(): bigint
|
|
913
|
+
/** Unix-seconds the device was revoked, or `null` while active. */
|
|
914
|
+
get revokedAt(): bigint | null
|
|
915
|
+
get isRevoked(): boolean
|
|
916
|
+
}
|
|
917
|
+
|
|
775
918
|
/**
|
|
776
919
|
* Open duplex RPC call. Combined send + receive surface. Use
|
|
777
920
|
* `intoSplit()` to get independent `DuplexSink` + `DuplexStream`
|
|
@@ -911,6 +1054,18 @@ export declare class Encoding {
|
|
|
911
1054
|
static defaultReedSolomon(): Encoding
|
|
912
1055
|
}
|
|
913
1056
|
|
|
1057
|
+
/**
|
|
1058
|
+
* Keeps the served enrollment services alive (returned by
|
|
1059
|
+
* `NetMesh.serveEnrollmentAuto`). Dropping it or calling
|
|
1060
|
+
* [`stop`](Self::stop) unregisters them.
|
|
1061
|
+
*/
|
|
1062
|
+
export declare class EnrollmentServeHandle {
|
|
1063
|
+
/** Stop serving enrollment (unregister the services). Idempotent. */
|
|
1064
|
+
stop(): void
|
|
1065
|
+
/** Whether the services are still registered. */
|
|
1066
|
+
get serving(): boolean
|
|
1067
|
+
}
|
|
1068
|
+
|
|
914
1069
|
export declare class FailureStream {
|
|
915
1070
|
nextRecord(): Promise<FailureRecordJs | null>
|
|
916
1071
|
close(): Promise<void>
|
|
@@ -1056,6 +1211,87 @@ export declare class InMemoryChainReader {
|
|
|
1056
1211
|
latestSeq(originHash: bigint): bigint | null
|
|
1057
1212
|
}
|
|
1058
1213
|
|
|
1214
|
+
/**
|
|
1215
|
+
* A pre-authorization to *ask* to join a mesh — not a key. Carries the
|
|
1216
|
+
* mesh `root`, a `rendezvous` locator, a single-use nonce, and a short
|
|
1217
|
+
* TTL.
|
|
1218
|
+
*/
|
|
1219
|
+
export declare class InviteToken {
|
|
1220
|
+
/**
|
|
1221
|
+
* Parse an invite string (`net-invite:<base64url>`). Throws on a
|
|
1222
|
+
* missing prefix, bad base64, or malformed bytes.
|
|
1223
|
+
*/
|
|
1224
|
+
static decode(s: string): InviteToken
|
|
1225
|
+
/** Parse canonical wire bytes. */
|
|
1226
|
+
static fromBytes(data: Buffer): InviteToken
|
|
1227
|
+
/** The copy-paste / QR invite string. */
|
|
1228
|
+
encode(): string
|
|
1229
|
+
/** The mesh root entity-id this invite admits into (32 bytes). */
|
|
1230
|
+
get root(): Buffer
|
|
1231
|
+
/** The rendezvous locator the device dials (opaque transport string). */
|
|
1232
|
+
get rendezvous(): string
|
|
1233
|
+
/** Unix-seconds expiry. */
|
|
1234
|
+
get expiresAt(): bigint
|
|
1235
|
+
/** The displayed fingerprint of the mesh root — show it to the joiner. */
|
|
1236
|
+
rootFingerprint(): string
|
|
1237
|
+
/** Whether the invite has expired at `now` (unix secs). */
|
|
1238
|
+
isExpired(now: bigint): boolean
|
|
1239
|
+
/** Canonical wire bytes. */
|
|
1240
|
+
toBytes(): Buffer
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
/**
|
|
1244
|
+
* The operator's response to a join request — the payload the enrollment
|
|
1245
|
+
* RPC returns to the device.
|
|
1246
|
+
*/
|
|
1247
|
+
export declare class JoinOutcome {
|
|
1248
|
+
/** Parse canonical wire bytes. */
|
|
1249
|
+
static fromBytes(data: Buffer): JoinOutcome
|
|
1250
|
+
/** Canonical wire bytes. */
|
|
1251
|
+
toBytes(): Buffer
|
|
1252
|
+
/** `true` if the device was admitted. */
|
|
1253
|
+
get isAdmitted(): boolean
|
|
1254
|
+
/** The stable reject code (`1..=7`) if rejected, else `null`. */
|
|
1255
|
+
get rejectCode(): number | null
|
|
1256
|
+
/** The human reject message if rejected, else `null`. */
|
|
1257
|
+
get rejectMessage(): string | null
|
|
1258
|
+
/**
|
|
1259
|
+
* Device-side: verify the admitted grant anchors at the invited mesh
|
|
1260
|
+
* root (`inviteRoot`) and binds to this `device`, returning the
|
|
1261
|
+
* `DelegationChain`. Throws if the outcome was a rejection, or the
|
|
1262
|
+
* grant is untrusted (wrong root / wrong device) — defending the
|
|
1263
|
+
* joiner against a rogue operator.
|
|
1264
|
+
*
|
|
1265
|
+
* `&self` despite the `into_` name: a `#[napi]` method can't consume
|
|
1266
|
+
* `self` (the object is JS-owned), and the JS-facing name
|
|
1267
|
+
* deliberately mirrors the SDK's `JoinOutcome::into_chain` (pinned by
|
|
1268
|
+
* the Python binding and callers).
|
|
1269
|
+
*/
|
|
1270
|
+
intoChain(device: Buffer, inviteRoot: Buffer): DelegationChain
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
/** A device's request to join, signed by the device's own key. */
|
|
1274
|
+
export declare class JoinRequest {
|
|
1275
|
+
/**
|
|
1276
|
+
* Build + sign a request against `invite`. `device` is the opaque
|
|
1277
|
+
* `Identity` handle whose key is being enrolled (H8: seed stays in
|
|
1278
|
+
* Rust).
|
|
1279
|
+
*/
|
|
1280
|
+
static create(device: Identity, name: string, tags: Array<string>, invite: InviteToken): JoinRequest
|
|
1281
|
+
/** Parse canonical wire bytes (does not verify the signature). */
|
|
1282
|
+
static fromBytes(data: Buffer): JoinRequest
|
|
1283
|
+
/** `true` if the device's self-signature verifies (it holds its key). */
|
|
1284
|
+
verifySelfSignature(): boolean
|
|
1285
|
+
/** The device entity-id (32 bytes). */
|
|
1286
|
+
get device(): Buffer
|
|
1287
|
+
/** The device-chosen name. */
|
|
1288
|
+
get name(): string
|
|
1289
|
+
/** The device-chosen tags. */
|
|
1290
|
+
get tags(): Array<string>
|
|
1291
|
+
/** Canonical wire bytes. */
|
|
1292
|
+
toBytes(): Buffer
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1059
1295
|
/**
|
|
1060
1296
|
* Inbound request-stream handle for client-streaming + duplex
|
|
1061
1297
|
* server handlers. Drain via `await stream.next()` until it
|
|
@@ -2038,6 +2274,84 @@ export declare class NetDb {
|
|
|
2038
2274
|
* ```
|
|
2039
2275
|
*/
|
|
2040
2276
|
export declare class NetMesh {
|
|
2277
|
+
/**
|
|
2278
|
+
* **Executor side.** Serve the A2A task lifecycle on this node, backed
|
|
2279
|
+
* by a JS **async** task executor
|
|
2280
|
+
* `(brief: TaskBriefJs) => Promise<string>` returning the result's
|
|
2281
|
+
* artifact ref, with a fresh task registry. Hold the resolved handle
|
|
2282
|
+
* to keep accepting tasks; call `handle.stop()` before `shutdown()`.
|
|
2283
|
+
* This node must be `start()`ed. (Requires the `a2a` feature.)
|
|
2284
|
+
*
|
|
2285
|
+
* `options.handlerTimeoutMs` bounds how long the executor may take to
|
|
2286
|
+
* settle each task's Promise (default 1 hour; `0` disables) — past the
|
|
2287
|
+
* deadline the task records a `Failed` terminal state instead of
|
|
2288
|
+
* staying `Running` forever behind a wedged event loop.
|
|
2289
|
+
*
|
|
2290
|
+
* Sync setup (the `Function` is `!Send`, so the TSFN is built on the
|
|
2291
|
+
* JS thread), then `spawn_future` for the registration — the SDK's
|
|
2292
|
+
* `serve_rpc` spawns a response-drainer task, which needs the tokio
|
|
2293
|
+
* runtime context only the future has (the `publish.rs` shape).
|
|
2294
|
+
*/
|
|
2295
|
+
serveA2a(executor: (arg: TaskBriefJs) => Promise<string>, options?: ServeA2aOptions | undefined | null): Promise<A2aServeHandle>
|
|
2296
|
+
/**
|
|
2297
|
+
* **Requester side.** Hand `prompt` (+ optional Datafort `contextRefs`
|
|
2298
|
+
* + routing `tags`) to the executor at `targetNodeId`; resolves the
|
|
2299
|
+
* accepted task id. Rejects if the executor refused the brief. The
|
|
2300
|
+
* node must already be connected to `targetNodeId`. (Requires the
|
|
2301
|
+
* `a2a` feature.)
|
|
2302
|
+
*/
|
|
2303
|
+
submitTask(targetNodeId: bigint, prompt: string, contextRefs?: Array<string> | undefined | null, tags?: Array<string> | undefined | null): Promise<string>
|
|
2304
|
+
/**
|
|
2305
|
+
* **Requester side.** The executor's status record for `taskId` as a
|
|
2306
|
+
* JSON string (`{brief, state, updated_at}`), or `null` if the
|
|
2307
|
+
* executor doesn't know it. (Requires the `a2a` feature.)
|
|
2308
|
+
*/
|
|
2309
|
+
taskStatus(targetNodeId: bigint, taskId: string): Promise<string | null>
|
|
2310
|
+
/**
|
|
2311
|
+
* **Requester side.** Cancel `taskId` on the executor; resolves
|
|
2312
|
+
* whether it was in flight. The executor's select observes the token
|
|
2313
|
+
* and the task state flips to `cancelled` — the JS handler's eventual
|
|
2314
|
+
* result is discarded (see the module docs on one-sided
|
|
2315
|
+
* cancellation). (Requires the `a2a` feature.)
|
|
2316
|
+
*/
|
|
2317
|
+
cancelTask(targetNodeId: bigint, taskId: string): Promise<boolean>
|
|
2318
|
+
/**
|
|
2319
|
+
* The invite `rendezvous` locator for this node (addr + Noise pubkey
|
|
2320
|
+
* + node id), to pass to `OperatorEnrollment.invite`. Devices dial it
|
|
2321
|
+
* via `join`. (Requires the `delegation` feature.)
|
|
2322
|
+
*/
|
|
2323
|
+
rendezvousString(): string
|
|
2324
|
+
/**
|
|
2325
|
+
* Device-side enrollment: enroll `device`'s key into the mesh named
|
|
2326
|
+
* by the `invite` string, under `name` + `tags`, returning the
|
|
2327
|
+
* verified `root → device` `DelegationChain`. This node must be
|
|
2328
|
+
* `start()`ed and built with `permissiveChannels: true` (the
|
|
2329
|
+
* enrollment nRPC uses dynamic per-caller reply channels the strict
|
|
2330
|
+
* registry rejects). (Requires the `delegation` feature.)
|
|
2331
|
+
*/
|
|
2332
|
+
join(device: Identity, invite: string, name: string, tags?: Array<string> | undefined | null): Promise<DelegationChain>
|
|
2333
|
+
/**
|
|
2334
|
+
* Operator-side: serve the full device lifecycle on this node (auto —
|
|
2335
|
+
* the invite is the authorization): **enroll** (join) + **renew**.
|
|
2336
|
+
* Hold the resolved handle for as long as enrollment should stay
|
|
2337
|
+
* open; call `handle.stop()` before `shutdown()`. This node must be
|
|
2338
|
+
* `start()`ed and built with `permissiveChannels: true`. (Requires
|
|
2339
|
+
* the `delegation` feature.)
|
|
2340
|
+
*
|
|
2341
|
+
* `async` although the registration itself is synchronous: the SDK's
|
|
2342
|
+
* `serve_rpc` spawns a response-drainer task, which needs the tokio
|
|
2343
|
+
* runtime context napi only provides to `async fn`s — a plain sync
|
|
2344
|
+
* method here panics with "no reactor running" (the same reason the
|
|
2345
|
+
* Python binding wraps this in `runtime.enter()`).
|
|
2346
|
+
*/
|
|
2347
|
+
serveEnrollmentAuto(operator: OperatorEnrollment, grantTtlSeconds: number, maxDepth?: number | undefined | null): Promise<EnrollmentServeHandle>
|
|
2348
|
+
/**
|
|
2349
|
+
* Device-side renewal: refresh the grant carried by `enrollment` over
|
|
2350
|
+
* the mesh, returning the verified **fresh** `root → device`
|
|
2351
|
+
* `DelegationChain`. This node must be `start()`ed and built with
|
|
2352
|
+
* `permissiveChannels: true`. (Requires the `delegation` feature.)
|
|
2353
|
+
*/
|
|
2354
|
+
renew(enrollment: DeviceEnrollment): Promise<DelegationChain>
|
|
2041
2355
|
/**
|
|
2042
2356
|
* Publish this node's island-topology record (host forced to self).
|
|
2043
2357
|
* Self-indexed locally + broadcast to peers; returns the peer
|
|
@@ -2118,6 +2432,12 @@ export declare class NetMesh {
|
|
|
2118
2432
|
* Declared `async` so napi-rs invokes it with an active
|
|
2119
2433
|
* tokio runtime — `MeshNode::start()` spawns background
|
|
2120
2434
|
* tasks via `tokio::spawn` and panics outside a reactor.
|
|
2435
|
+
*
|
|
2436
|
+
* Uses `start_arc` (like the C FFI and the Rust SDK) so
|
|
2437
|
+
* the Arc-scoped lifecycle loops run too: periodic
|
|
2438
|
+
* capability re-announce (with the reflex-diff
|
|
2439
|
+
* re-classify trigger) and — when `autoDirectUpgrade`
|
|
2440
|
+
* is set — the background direct-path upgrade.
|
|
2121
2441
|
*/
|
|
2122
2442
|
start(): Promise<void>
|
|
2123
2443
|
/** Send raw bytes to a direct peer. */
|
|
@@ -2273,7 +2593,23 @@ export declare class NetMesh {
|
|
|
2273
2593
|
* the natural shape for TS; that ships as a follow-up.
|
|
2274
2594
|
*/
|
|
2275
2595
|
capabilityCapacityRanking(queryJson: string, rttEntries?: Array<RttEntryJs> | undefined | null): Array<CapacityRowJs>
|
|
2276
|
-
/**
|
|
2596
|
+
/**
|
|
2597
|
+
* Shutdown the mesh node.
|
|
2598
|
+
*
|
|
2599
|
+
* Requires sole ownership of the `Arc<MeshNode>` (via
|
|
2600
|
+
* `try_unwrap`). SDK serve handles — nRPC `serve_rpc`, the
|
|
2601
|
+
* `PaymentProvider` quote/pay wire — release their node clone
|
|
2602
|
+
* via ASYNC task teardown: dropping a `ServeHandle` closes its
|
|
2603
|
+
* dispatcher channel, and the bridge / response-drain tasks then
|
|
2604
|
+
* exit and drop their `Arc<MeshNode>` clones on the next
|
|
2605
|
+
* scheduler tick (Drop deliberately never aborts them, so
|
|
2606
|
+
* in-flight responses aren't killed). A `shutdown()` invoked
|
|
2607
|
+
* right after such a handle is dropped (e.g. `provider.close()`
|
|
2608
|
+
* then `mesh.shutdown()`) can momentarily still observe those
|
|
2609
|
+
* clones, so we retry `try_unwrap` across a bounded grace window
|
|
2610
|
+
* to let the teardown drain. A GENUINE outstanding reference
|
|
2611
|
+
* still fails — just after the window, never hanging.
|
|
2612
|
+
*/
|
|
2277
2613
|
shutdown(): Promise<void>
|
|
2278
2614
|
/**
|
|
2279
2615
|
* Register a JS placement-filter predicate under `id`.
|
|
@@ -2405,11 +2741,16 @@ export declare class NetMesh {
|
|
|
2405
2741
|
*/
|
|
2406
2742
|
reclassifyNat(): Promise<void>
|
|
2407
2743
|
/**
|
|
2408
|
-
* Cumulative NAT-traversal counters for this mesh
|
|
2409
|
-
*
|
|
2410
|
-
*
|
|
2411
|
-
*
|
|
2412
|
-
*
|
|
2744
|
+
* Cumulative NAT-traversal counters for this mesh — the
|
|
2745
|
+
* full stage-5 snapshot: punch attempt/success/derived-
|
|
2746
|
+
* failure counts, the three failure-cause counters
|
|
2747
|
+
* (timeouts / rejections / no-relay), background-upgrade
|
|
2748
|
+
* activity, and port-mapping state. Base counters are
|
|
2749
|
+
* monotonic and never reset (`punchesFailed` is derived
|
|
2750
|
+
* and can decrease while a punch is in flight;
|
|
2751
|
+
* `portMappingRenewals` resets on a fresh install —
|
|
2752
|
+
* difference only the base counters). Useful for
|
|
2753
|
+
* telemetry on punch success rate and relay load.
|
|
2413
2754
|
*/
|
|
2414
2755
|
traversalStats(): TraversalStats
|
|
2415
2756
|
/**
|
|
@@ -2431,6 +2772,18 @@ export declare class NetMesh {
|
|
|
2431
2772
|
* handshake error.
|
|
2432
2773
|
*/
|
|
2433
2774
|
connectDirect(peerNodeId: bigint, peerPublicKey: Buffer, coordinator: bigint): Promise<void>
|
|
2775
|
+
/**
|
|
2776
|
+
* Like `connectDirect`, but auto-selects the rendezvous
|
|
2777
|
+
* coordinator: the relay currently forwarding to the
|
|
2778
|
+
* peer, then a `relay-capable` mutual peer, then any
|
|
2779
|
+
* mutual peer.
|
|
2780
|
+
*
|
|
2781
|
+
* **Optimization, not correctness.** Punch-needing pairs
|
|
2782
|
+
* with no coordinator candidate reject with
|
|
2783
|
+
* `traversal: rendezvous-no-relay` — the caller simply
|
|
2784
|
+
* stays on the routed path, which is always available.
|
|
2785
|
+
*/
|
|
2786
|
+
connectDirectAuto(peerNodeId: bigint, peerPublicKey: Buffer): Promise<void>
|
|
2434
2787
|
/**
|
|
2435
2788
|
* Install a runtime reflex override. Forces `natType()`
|
|
2436
2789
|
* to `"open"` and `reflexAddr()` to `external`
|
|
@@ -2471,6 +2824,71 @@ export declare class NetStream {
|
|
|
2471
2824
|
get streamId(): bigint
|
|
2472
2825
|
}
|
|
2473
2826
|
|
|
2827
|
+
/**
|
|
2828
|
+
* The operator side: mint invites, approve join requests into
|
|
2829
|
+
* `root → device` delegations, and manage the device inventory —
|
|
2830
|
+
* composing the enrollment authority + device registry + revocation
|
|
2831
|
+
* store for one mesh root.
|
|
2832
|
+
*/
|
|
2833
|
+
export declare class OperatorEnrollment {
|
|
2834
|
+
/**
|
|
2835
|
+
* Build a coordinator for the `root` `Identity` handle, with explicit
|
|
2836
|
+
* device-registry and revocation-store paths.
|
|
2837
|
+
*/
|
|
2838
|
+
constructor(root: Identity, registryPath: string, revocationPath: string)
|
|
2839
|
+
/**
|
|
2840
|
+
* Build using the per-user default store paths (the same
|
|
2841
|
+
* machine-shared files the CLI and a `net wrap` provider converge
|
|
2842
|
+
* on). Throws if neither path resolves.
|
|
2843
|
+
*/
|
|
2844
|
+
static withDefaultPaths(root: Identity): OperatorEnrollment
|
|
2845
|
+
/** The mesh root entity-id (32 bytes). */
|
|
2846
|
+
get rootId(): Buffer
|
|
2847
|
+
/** The displayed fingerprint of the mesh root. */
|
|
2848
|
+
rootFingerprint(): string
|
|
2849
|
+
/**
|
|
2850
|
+
* Mint an invite for this mesh valid for `ttlSeconds`, tracking it so
|
|
2851
|
+
* a later `approve` can match a request to it. `rendezvous` is the
|
|
2852
|
+
* transport locator devices dial (e.g. `NetMesh.rendezvousString()`).
|
|
2853
|
+
*/
|
|
2854
|
+
invite(rendezvous: string, ttlSeconds: number): InviteToken
|
|
2855
|
+
/**
|
|
2856
|
+
* Approve an arriving request (auto — invite-as-authorization),
|
|
2857
|
+
* reading the system clock: run the fail-closed checks, record the
|
|
2858
|
+
* device, retire the single-use invite, and return the
|
|
2859
|
+
* `root → device` `DelegationChain`. Rejects on any refusal
|
|
2860
|
+
* (unknown/expired/wrong invite, bad signature). Runs off the JS
|
|
2861
|
+
* thread (store file IO).
|
|
2862
|
+
*/
|
|
2863
|
+
approve(request: JoinRequest, grantTtlSeconds: number, maxDepth?: number | undefined | null): Promise<DelegationChain>
|
|
2864
|
+
/**
|
|
2865
|
+
* The **server-side** handler: turn serialized `JoinRequest` bytes
|
|
2866
|
+
* into serialized `JoinOutcome` bytes (auto — invite-as-
|
|
2867
|
+
* authorization). This is what the enrollment RPC moves; a JS host
|
|
2868
|
+
* can serve enrollment by feeding it received request bytes and
|
|
2869
|
+
* returning the outcome bytes. Never throws — a malformed request or
|
|
2870
|
+
* a rejection is a coded `JoinOutcome`.
|
|
2871
|
+
*/
|
|
2872
|
+
handleJoinRequest(requestBytes: Buffer, grantTtlSeconds: number, maxDepth?: number | undefined | null): Promise<Buffer>
|
|
2873
|
+
/**
|
|
2874
|
+
* Revoke a device: raise its revocation floor (kills all current
|
|
2875
|
+
* delegations) and stamp the inventory. Reads the system clock.
|
|
2876
|
+
*/
|
|
2877
|
+
revoke(device: Buffer): Promise<void>
|
|
2878
|
+
/** The enrolled devices in the inventory. */
|
|
2879
|
+
devices(): Promise<Array<DeviceRecord>>
|
|
2880
|
+
/**
|
|
2881
|
+
* Prune a device from the inventory entirely (orthogonal to revoking
|
|
2882
|
+
* its floor). Returns whether a record existed.
|
|
2883
|
+
*/
|
|
2884
|
+
forget(device: Buffer): Promise<boolean>
|
|
2885
|
+
/**
|
|
2886
|
+
* Outstanding (minted, unredeemed, unexpired at `now` unix-secs)
|
|
2887
|
+
* invites.
|
|
2888
|
+
*/
|
|
2889
|
+
pendingInvites(now: bigint): Array<InviteToken>
|
|
2890
|
+
}
|
|
2891
|
+
|
|
2474
2892
|
/**
|
|
2475
2893
|
* Operator identity. Operator id is the keypair's 64-bit origin
|
|
2476
2894
|
* hash. Construct via `generate()` (tests) or `fromSeed(buffer)`
|
|
@@ -3034,6 +3452,49 @@ export declare class ReplicaGroup {
|
|
|
3034
3452
|
get healthyCount(): number
|
|
3035
3453
|
}
|
|
3036
3454
|
|
|
3455
|
+
/**
|
|
3456
|
+
* Shared per-issuer revocation floor. Bumping an issuer's floor
|
|
3457
|
+
* invalidates every outstanding delegation from that issuer — including
|
|
3458
|
+
* delegated children — the moment `verify` next runs.
|
|
3459
|
+
*
|
|
3460
|
+
* One registry is shared by a gateway and all its subagents (Arc-backed),
|
|
3461
|
+
* so a revoke is observed by every chain that verifies against it.
|
|
3462
|
+
*/
|
|
3463
|
+
export declare class RevocationRegistry {
|
|
3464
|
+
/** A fresh registry — every issuer's floor is implicitly 0. */
|
|
3465
|
+
constructor()
|
|
3466
|
+
/**
|
|
3467
|
+
* Set `issuer`'s floor to `generation`. Any token from `issuer` with
|
|
3468
|
+
* `issuer_generation < generation` is rejected on the next verify.
|
|
3469
|
+
* Monotonic: a value <= the current floor is a no-op.
|
|
3470
|
+
*/
|
|
3471
|
+
revokeBelow(issuer: Buffer, generation: number): void
|
|
3472
|
+
/**
|
|
3473
|
+
* Convenience: revoke every generation-0 delegation from `issuer`
|
|
3474
|
+
* (bumps the floor to 1). Revoking the *machine* identity kills its
|
|
3475
|
+
* gateway chain and, transitively, that gateway's subagents — while a
|
|
3476
|
+
* different machine's chain is untouched.
|
|
3477
|
+
*/
|
|
3478
|
+
revoke(issuer: Buffer): void
|
|
3479
|
+
/** The current revocation floor for `issuer` (0 if never revoked). */
|
|
3480
|
+
floor(issuer: Buffer): number
|
|
3481
|
+
/**
|
|
3482
|
+
* Reload the machine-shared revocation floors at `path` into this
|
|
3483
|
+
* registry (monotonic — floors only ever rise, so re-loading is
|
|
3484
|
+
* idempotent and composes with any in-process `revoke`). A missing
|
|
3485
|
+
* store file is a no-op (nothing revoked yet); an unreadable or
|
|
3486
|
+
* corrupt store rejects.
|
|
3487
|
+
*
|
|
3488
|
+
* This is what lets a *caller's* self-check observe an operator's
|
|
3489
|
+
* `net identity revoke` — written to the same file a
|
|
3490
|
+
* `net wrap --owner-root` provider honors — so a revoked chain fails
|
|
3491
|
+
* [`DelegationChain::verify`] on the caller side too, not only when
|
|
3492
|
+
* the provider re-verifies. Use [`default_revocation_store_path`]
|
|
3493
|
+
* (or the `NET_MESH_REVOCATION_STORE` override) for `path`.
|
|
3494
|
+
*/
|
|
3495
|
+
loadFromStore(path: string): Promise<void>
|
|
3496
|
+
}
|
|
3497
|
+
|
|
3037
3498
|
/**
|
|
3038
3499
|
* Open streaming RPC call. Yields chunks via `next()` until EOF
|
|
3039
3500
|
* (returns `null`). Drop OR explicit `close()` emits CANCEL to
|
|
@@ -4074,6 +4535,16 @@ export declare function decodeJoined(row: ResultRow): JoinedRow | null
|
|
|
4074
4535
|
*/
|
|
4075
4536
|
export declare function decodeWindow(row: ResultRow): WindowBoundary | null
|
|
4076
4537
|
|
|
4538
|
+
/**
|
|
4539
|
+
* The per-user default revocation-store path — the same file a
|
|
4540
|
+
* `net wrap --owner-root` provider honors and `net identity revoke`
|
|
4541
|
+
* writes — or `null` if neither a data-local nor a home directory
|
|
4542
|
+
* resolves. Pass it (or the `NET_MESH_REVOCATION_STORE` override) to
|
|
4543
|
+
* [`RevocationRegistry::load_from_store`] so a caller-side check
|
|
4544
|
+
* observes an operator revocation.
|
|
4545
|
+
*/
|
|
4546
|
+
export declare function defaultRevocationStorePath(): string | null
|
|
4547
|
+
|
|
4077
4548
|
/**
|
|
4078
4549
|
* Delegate a token to a new subject. The `parent_bytes` token must
|
|
4079
4550
|
* have `delegation_depth > 0` and include the `delegate` scope; the
|
|
@@ -4081,6 +4552,18 @@ export declare function decodeWindow(row: ResultRow): WindowBoundary | null
|
|
|
4081
4552
|
*/
|
|
4082
4553
|
export declare function delegateToken(signer: Identity, parentBytes: Buffer, newSubject: Buffer, restrictedScope: Array<string>): Buffer
|
|
4083
4554
|
|
|
4555
|
+
/**
|
|
4556
|
+
* Derive a stable child `Identity` handle from `parent` under `label`.
|
|
4557
|
+
*
|
|
4558
|
+
* Deterministic (blake3 KDF over the parent seed), so a machine / gateway
|
|
4559
|
+
* identity is reproducible across restarts from the root alone — no extra
|
|
4560
|
+
* persistence, and every process that holds the root derives the same
|
|
4561
|
+
* child. The returned handle owns its keypair; the private seed is never
|
|
4562
|
+
* exposed (H8). `label` namespaces siblings, e.g. `"machine:hostA"` vs
|
|
4563
|
+
* `"gateway:hostA:hermes"`.
|
|
4564
|
+
*/
|
|
4565
|
+
export declare function deriveChildIdentity(parent: Identity, label: string): Identity
|
|
4566
|
+
|
|
4084
4567
|
/**
|
|
4085
4568
|
* One env addition passed to the wrapped server — only the KEY drives
|
|
4086
4569
|
* classification; the value is never inspected beyond presence and never
|
|
@@ -4124,6 +4607,13 @@ export interface FailureRecordJs {
|
|
|
4124
4607
|
recordedAtMs: bigint
|
|
4125
4608
|
}
|
|
4126
4609
|
|
|
4610
|
+
/**
|
|
4611
|
+
* A short, human-comparable fingerprint of an entity-id (the 32-byte
|
|
4612
|
+
* ed25519 public key), shown on both sides of a join so a human can
|
|
4613
|
+
* confirm the mesh identity matches — `A1B2-C3D4-E5F6-0789`.
|
|
4614
|
+
*/
|
|
4615
|
+
export declare function fingerprint(entity: Buffer): string
|
|
4616
|
+
|
|
4127
4617
|
export interface ForkGroupConfigJs {
|
|
4128
4618
|
forkCount: number
|
|
4129
4619
|
lbStrategy: StrategyJs
|
|
@@ -4137,6 +4627,13 @@ export interface ForkRecordJs {
|
|
|
4137
4627
|
fromSnapshotSeq?: bigint
|
|
4138
4628
|
}
|
|
4139
4629
|
|
|
4630
|
+
/**
|
|
4631
|
+
* The well-known channel every gateway delegation binds to (never
|
|
4632
|
+
* actually published to). Exported so JS callers and tests can
|
|
4633
|
+
* reference the exact string.
|
|
4634
|
+
*/
|
|
4635
|
+
export const GATEWAY_DELEGATION_CHANNEL: string
|
|
4636
|
+
|
|
4140
4637
|
/**
|
|
4141
4638
|
* Generate a new Net keypair for encrypted UDP transport.
|
|
4142
4639
|
*
|
|
@@ -4683,6 +5180,22 @@ export interface MeshOptions {
|
|
|
4683
5180
|
* without `--features port-mapping`.
|
|
4684
5181
|
*/
|
|
4685
5182
|
tryPortMapping?: boolean
|
|
5183
|
+
/**
|
|
5184
|
+
* Enable the background direct-path upgrade: once a
|
|
5185
|
+
* session to a peer is established via a relay, the mesh
|
|
5186
|
+
* opportunistically re-handshakes over a direct path and
|
|
5187
|
+
* migrates the session, cutting relay hops out of the
|
|
5188
|
+
* data plane. The swap is guarded by a migration
|
|
5189
|
+
* contract (lower-id initiator, compare-and-swap
|
|
5190
|
+
* install, busy-session deferral) so in-flight work is
|
|
5191
|
+
* never dropped.
|
|
5192
|
+
*
|
|
5193
|
+
* **Optimization, not correctness** — traffic rides the
|
|
5194
|
+
* relay until (and unless) a direct path lands. Default
|
|
5195
|
+
* `false`. Silently ignored when the binding was built
|
|
5196
|
+
* without `--features nat-traversal`.
|
|
5197
|
+
*/
|
|
5198
|
+
autoDirectUpgrade?: boolean
|
|
4686
5199
|
/**
|
|
4687
5200
|
* Opt out of channel authorization: when `true`, no
|
|
4688
5201
|
* `ChannelConfigRegistry` is installed on the node, so
|
|
@@ -5518,6 +6031,20 @@ export interface ScopeFilterJs {
|
|
|
5518
6031
|
regions?: Array<string>
|
|
5519
6032
|
}
|
|
5520
6033
|
|
|
6034
|
+
/** Optional knobs for [`NetMesh::serve_a2a`]. */
|
|
6035
|
+
export interface ServeA2aOptions {
|
|
6036
|
+
/**
|
|
6037
|
+
* Per-task budget in milliseconds for the JS executor to settle its
|
|
6038
|
+
* Promise (the handler returning the Promise + that Promise
|
|
6039
|
+
* resolving, one deadline across both). Default `3600000` (1 hour).
|
|
6040
|
+
* Past it the task records a `Failed` terminal state. Pass `0` to
|
|
6041
|
+
* disable the deadline entirely (Python-binding parity, where
|
|
6042
|
+
* cancellation is the only control) — a wedged event loop then leaves
|
|
6043
|
+
* the task `Running` until a requester cancels it.
|
|
6044
|
+
*/
|
|
6045
|
+
handlerTimeoutMs?: number
|
|
6046
|
+
}
|
|
6047
|
+
|
|
5521
6048
|
/**
|
|
5522
6049
|
* Per-service caller- + server-side nRPC counters at a point
|
|
5523
6050
|
* in time. Element of [`RpcMetricsSnapshotJs::services`].
|
|
@@ -5716,6 +6243,21 @@ export interface Task {
|
|
|
5716
6243
|
updatedNs: bigint
|
|
5717
6244
|
}
|
|
5718
6245
|
|
|
6246
|
+
/** The brief handed to the JS task executor. */
|
|
6247
|
+
export interface TaskBriefJs {
|
|
6248
|
+
/** The registry-assigned task id (poll / cancel by this). */
|
|
6249
|
+
taskId: string
|
|
6250
|
+
/** What to do. */
|
|
6251
|
+
prompt: string
|
|
6252
|
+
/**
|
|
6253
|
+
* Datafort refs carrying the task's context (the executor doesn't
|
|
6254
|
+
* share the requester's memory).
|
|
6255
|
+
*/
|
|
6256
|
+
contextRefs: Array<string>
|
|
6257
|
+
/** Routing / bookkeeping tags. */
|
|
6258
|
+
tags: Array<string>
|
|
6259
|
+
}
|
|
6260
|
+
|
|
5719
6261
|
/**
|
|
5720
6262
|
* Filter for [`TasksAdapter::list_tasks`] and
|
|
5721
6263
|
* [`TasksAdapter::watch_tasks`].
|
|
@@ -5858,9 +6400,14 @@ export declare function transferStreamId(nonce: bigint): bigint
|
|
|
5858
6400
|
|
|
5859
6401
|
/**
|
|
5860
6402
|
* Cumulative NAT-traversal counters surfaced via
|
|
5861
|
-
* `NetMesh.traversalStats()`.
|
|
5862
|
-
* and never reset — subtract snapshots for deltas
|
|
5863
|
-
*
|
|
6403
|
+
* `NetMesh.traversalStats()`. Base counters are monotonic u64s
|
|
6404
|
+
* and never reset — subtract snapshots for deltas — with two
|
|
6405
|
+
* exemptions: `punchesFailed` is derived at snapshot time
|
|
6406
|
+
* (`attempted - succeeded`) and can decrease when an in-flight
|
|
6407
|
+
* punch lands, and `portMappingRenewals` resets to zero on each
|
|
6408
|
+
* fresh mapping install. Difference only the base counters for
|
|
6409
|
+
* rates. Exposed as BigInt because JavaScript numbers can't
|
|
6410
|
+
* round-trip full u64.
|
|
5864
6411
|
*
|
|
5865
6412
|
* Framing reminder (plan §5): NAT traversal is an optimization,
|
|
5866
6413
|
* not a connectivity requirement. `relay_fallbacks` isn't a
|
|
@@ -5870,8 +6417,8 @@ export declare function transferStreamId(nonce: bigint): bigint
|
|
|
5870
6417
|
*/
|
|
5871
6418
|
export interface TraversalStats {
|
|
5872
6419
|
/**
|
|
5873
|
-
* Number of hole-punch attempts
|
|
5874
|
-
*
|
|
6420
|
+
* Number of hole-punch attempts whose coordinator mediation
|
|
6421
|
+
* succeeded. Bumps once per mediated attempt, whether the
|
|
5875
6422
|
* punch eventually succeeds or falls back.
|
|
5876
6423
|
*/
|
|
5877
6424
|
punchesAttempted: bigint
|
|
@@ -5881,6 +6428,12 @@ export interface TraversalStats {
|
|
|
5881
6428
|
* punch-failure rate.
|
|
5882
6429
|
*/
|
|
5883
6430
|
punchesSucceeded: bigint
|
|
6431
|
+
/**
|
|
6432
|
+
* **Derived** at snapshot time: `punchesAttempted -
|
|
6433
|
+
* punchesSucceeded` (a punch in flight counts as failed
|
|
6434
|
+
* until it resolves).
|
|
6435
|
+
*/
|
|
6436
|
+
punchesFailed: bigint
|
|
5884
6437
|
/**
|
|
5885
6438
|
* Number of `connect_direct` resolutions that stayed on
|
|
5886
6439
|
* the routed-handshake path — matrix-skipped pairs plus
|
|
@@ -5889,6 +6442,51 @@ export interface TraversalStats {
|
|
|
5889
6442
|
* this counter.
|
|
5890
6443
|
*/
|
|
5891
6444
|
relayFallbacks: bigint
|
|
6445
|
+
/**
|
|
6446
|
+
* Punch flows that gave up on a deadline. Failure *cause*
|
|
6447
|
+
* counter — includes pre-mediation introduce-wait timeouts,
|
|
6448
|
+
* so not a partition of `punchesFailed`.
|
|
6449
|
+
*/
|
|
6450
|
+
punchTimeouts: bigint
|
|
6451
|
+
/**
|
|
6452
|
+
* Punch flows refused by a typed coordinator reject
|
|
6453
|
+
* (rate-limited / unknown target reflex / no session with
|
|
6454
|
+
* target / reflex mismatch). Cause counter.
|
|
6455
|
+
*/
|
|
6456
|
+
punchRejections: bigint
|
|
6457
|
+
/**
|
|
6458
|
+
* Punch-needing pairs skipped because no rendezvous
|
|
6459
|
+
* coordinator candidate existed. Cause counter; the caller
|
|
6460
|
+
* stayed on the routed path.
|
|
6461
|
+
*/
|
|
6462
|
+
rendezvousNoRelay: bigint
|
|
6463
|
+
/** Background direct-path upgrades started. */
|
|
6464
|
+
upgradesAttempted: bigint
|
|
6465
|
+
/**
|
|
6466
|
+
* Upgrades that replaced a relay-routed session with a
|
|
6467
|
+
* punched direct session.
|
|
6468
|
+
*/
|
|
6469
|
+
upgradesSucceeded: bigint
|
|
6470
|
+
/**
|
|
6471
|
+
* Upgrades deferred because the session was busy (open
|
|
6472
|
+
* streams / unacked data). Retried later; not failures.
|
|
6473
|
+
*/
|
|
6474
|
+
upgradesDeferredBusy: bigint
|
|
6475
|
+
/**
|
|
6476
|
+
* `true` while a UPnP / NAT-PMP / PCP port mapping is
|
|
6477
|
+
* installed on the operator's router.
|
|
6478
|
+
*/
|
|
6479
|
+
portMappingActive: boolean
|
|
6480
|
+
/**
|
|
6481
|
+
* Mapped external `"ip:port"`, or `null` when no mapping is
|
|
6482
|
+
* active.
|
|
6483
|
+
*/
|
|
6484
|
+
portMappingExternal?: string
|
|
6485
|
+
/**
|
|
6486
|
+
* Successful renewal ticks since the current mapping was
|
|
6487
|
+
* installed. Resets on a fresh install.
|
|
6488
|
+
*/
|
|
6489
|
+
portMappingRenewals: bigint
|
|
5892
6490
|
}
|
|
5893
6491
|
|
|
5894
6492
|
/**
|
package/index.js
CHANGED
|
@@ -77,8 +77,8 @@ function requireNative() {
|
|
|
77
77
|
try {
|
|
78
78
|
const binding = require('@net-mesh/core-android-arm64')
|
|
79
79
|
const bindingPackageVersion = require('@net-mesh/core-android-arm64/package.json').version
|
|
80
|
-
if (bindingPackageVersion !== '0.
|
|
81
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
80
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
81
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
82
82
|
}
|
|
83
83
|
return binding
|
|
84
84
|
} catch (e) {
|
|
@@ -93,8 +93,8 @@ function requireNative() {
|
|
|
93
93
|
try {
|
|
94
94
|
const binding = require('@net-mesh/core-android-arm-eabi')
|
|
95
95
|
const bindingPackageVersion = require('@net-mesh/core-android-arm-eabi/package.json').version
|
|
96
|
-
if (bindingPackageVersion !== '0.
|
|
97
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
96
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
97
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
98
98
|
}
|
|
99
99
|
return binding
|
|
100
100
|
} catch (e) {
|
|
@@ -114,8 +114,8 @@ function requireNative() {
|
|
|
114
114
|
try {
|
|
115
115
|
const binding = require('@net-mesh/core-win32-x64-gnu')
|
|
116
116
|
const bindingPackageVersion = require('@net-mesh/core-win32-x64-gnu/package.json').version
|
|
117
|
-
if (bindingPackageVersion !== '0.
|
|
118
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
117
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
118
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
119
119
|
}
|
|
120
120
|
return binding
|
|
121
121
|
} catch (e) {
|
|
@@ -130,8 +130,8 @@ function requireNative() {
|
|
|
130
130
|
try {
|
|
131
131
|
const binding = require('@net-mesh/core-win32-x64-msvc')
|
|
132
132
|
const bindingPackageVersion = require('@net-mesh/core-win32-x64-msvc/package.json').version
|
|
133
|
-
if (bindingPackageVersion !== '0.
|
|
134
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
133
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
134
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
135
135
|
}
|
|
136
136
|
return binding
|
|
137
137
|
} catch (e) {
|
|
@@ -147,8 +147,8 @@ function requireNative() {
|
|
|
147
147
|
try {
|
|
148
148
|
const binding = require('@net-mesh/core-win32-ia32-msvc')
|
|
149
149
|
const bindingPackageVersion = require('@net-mesh/core-win32-ia32-msvc/package.json').version
|
|
150
|
-
if (bindingPackageVersion !== '0.
|
|
151
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
150
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
151
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
152
152
|
}
|
|
153
153
|
return binding
|
|
154
154
|
} catch (e) {
|
|
@@ -163,8 +163,8 @@ function requireNative() {
|
|
|
163
163
|
try {
|
|
164
164
|
const binding = require('@net-mesh/core-win32-arm64-msvc')
|
|
165
165
|
const bindingPackageVersion = require('@net-mesh/core-win32-arm64-msvc/package.json').version
|
|
166
|
-
if (bindingPackageVersion !== '0.
|
|
167
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
166
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
167
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
168
168
|
}
|
|
169
169
|
return binding
|
|
170
170
|
} catch (e) {
|
|
@@ -182,8 +182,8 @@ function requireNative() {
|
|
|
182
182
|
try {
|
|
183
183
|
const binding = require('@net-mesh/core-darwin-universal')
|
|
184
184
|
const bindingPackageVersion = require('@net-mesh/core-darwin-universal/package.json').version
|
|
185
|
-
if (bindingPackageVersion !== '0.
|
|
186
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
185
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
186
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
187
187
|
}
|
|
188
188
|
return binding
|
|
189
189
|
} catch (e) {
|
|
@@ -198,8 +198,8 @@ function requireNative() {
|
|
|
198
198
|
try {
|
|
199
199
|
const binding = require('@net-mesh/core-darwin-x64')
|
|
200
200
|
const bindingPackageVersion = require('@net-mesh/core-darwin-x64/package.json').version
|
|
201
|
-
if (bindingPackageVersion !== '0.
|
|
202
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
201
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
202
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
203
203
|
}
|
|
204
204
|
return binding
|
|
205
205
|
} catch (e) {
|
|
@@ -214,8 +214,8 @@ function requireNative() {
|
|
|
214
214
|
try {
|
|
215
215
|
const binding = require('@net-mesh/core-darwin-arm64')
|
|
216
216
|
const bindingPackageVersion = require('@net-mesh/core-darwin-arm64/package.json').version
|
|
217
|
-
if (bindingPackageVersion !== '0.
|
|
218
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
217
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
218
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
219
219
|
}
|
|
220
220
|
return binding
|
|
221
221
|
} catch (e) {
|
|
@@ -234,8 +234,8 @@ function requireNative() {
|
|
|
234
234
|
try {
|
|
235
235
|
const binding = require('@net-mesh/core-freebsd-x64')
|
|
236
236
|
const bindingPackageVersion = require('@net-mesh/core-freebsd-x64/package.json').version
|
|
237
|
-
if (bindingPackageVersion !== '0.
|
|
238
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
237
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
238
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
239
239
|
}
|
|
240
240
|
return binding
|
|
241
241
|
} catch (e) {
|
|
@@ -250,8 +250,8 @@ function requireNative() {
|
|
|
250
250
|
try {
|
|
251
251
|
const binding = require('@net-mesh/core-freebsd-arm64')
|
|
252
252
|
const bindingPackageVersion = require('@net-mesh/core-freebsd-arm64/package.json').version
|
|
253
|
-
if (bindingPackageVersion !== '0.
|
|
254
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
253
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
254
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
255
255
|
}
|
|
256
256
|
return binding
|
|
257
257
|
} catch (e) {
|
|
@@ -271,8 +271,8 @@ function requireNative() {
|
|
|
271
271
|
try {
|
|
272
272
|
const binding = require('@net-mesh/core-linux-x64-musl')
|
|
273
273
|
const bindingPackageVersion = require('@net-mesh/core-linux-x64-musl/package.json').version
|
|
274
|
-
if (bindingPackageVersion !== '0.
|
|
275
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
274
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
275
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
276
276
|
}
|
|
277
277
|
return binding
|
|
278
278
|
} catch (e) {
|
|
@@ -287,8 +287,8 @@ function requireNative() {
|
|
|
287
287
|
try {
|
|
288
288
|
const binding = require('@net-mesh/core-linux-x64-gnu')
|
|
289
289
|
const bindingPackageVersion = require('@net-mesh/core-linux-x64-gnu/package.json').version
|
|
290
|
-
if (bindingPackageVersion !== '0.
|
|
291
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
290
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
291
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
292
292
|
}
|
|
293
293
|
return binding
|
|
294
294
|
} catch (e) {
|
|
@@ -305,8 +305,8 @@ function requireNative() {
|
|
|
305
305
|
try {
|
|
306
306
|
const binding = require('@net-mesh/core-linux-arm64-musl')
|
|
307
307
|
const bindingPackageVersion = require('@net-mesh/core-linux-arm64-musl/package.json').version
|
|
308
|
-
if (bindingPackageVersion !== '0.
|
|
309
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
308
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
309
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
310
310
|
}
|
|
311
311
|
return binding
|
|
312
312
|
} catch (e) {
|
|
@@ -321,8 +321,8 @@ function requireNative() {
|
|
|
321
321
|
try {
|
|
322
322
|
const binding = require('@net-mesh/core-linux-arm64-gnu')
|
|
323
323
|
const bindingPackageVersion = require('@net-mesh/core-linux-arm64-gnu/package.json').version
|
|
324
|
-
if (bindingPackageVersion !== '0.
|
|
325
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
324
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
325
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
326
326
|
}
|
|
327
327
|
return binding
|
|
328
328
|
} catch (e) {
|
|
@@ -339,8 +339,8 @@ function requireNative() {
|
|
|
339
339
|
try {
|
|
340
340
|
const binding = require('@net-mesh/core-linux-arm-musleabihf')
|
|
341
341
|
const bindingPackageVersion = require('@net-mesh/core-linux-arm-musleabihf/package.json').version
|
|
342
|
-
if (bindingPackageVersion !== '0.
|
|
343
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
342
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
343
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
344
344
|
}
|
|
345
345
|
return binding
|
|
346
346
|
} catch (e) {
|
|
@@ -355,8 +355,8 @@ function requireNative() {
|
|
|
355
355
|
try {
|
|
356
356
|
const binding = require('@net-mesh/core-linux-arm-gnueabihf')
|
|
357
357
|
const bindingPackageVersion = require('@net-mesh/core-linux-arm-gnueabihf/package.json').version
|
|
358
|
-
if (bindingPackageVersion !== '0.
|
|
359
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
358
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
359
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
360
360
|
}
|
|
361
361
|
return binding
|
|
362
362
|
} catch (e) {
|
|
@@ -373,8 +373,8 @@ function requireNative() {
|
|
|
373
373
|
try {
|
|
374
374
|
const binding = require('@net-mesh/core-linux-loong64-musl')
|
|
375
375
|
const bindingPackageVersion = require('@net-mesh/core-linux-loong64-musl/package.json').version
|
|
376
|
-
if (bindingPackageVersion !== '0.
|
|
377
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
376
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
377
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
378
378
|
}
|
|
379
379
|
return binding
|
|
380
380
|
} catch (e) {
|
|
@@ -389,8 +389,8 @@ function requireNative() {
|
|
|
389
389
|
try {
|
|
390
390
|
const binding = require('@net-mesh/core-linux-loong64-gnu')
|
|
391
391
|
const bindingPackageVersion = require('@net-mesh/core-linux-loong64-gnu/package.json').version
|
|
392
|
-
if (bindingPackageVersion !== '0.
|
|
393
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
392
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
393
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
394
394
|
}
|
|
395
395
|
return binding
|
|
396
396
|
} catch (e) {
|
|
@@ -407,8 +407,8 @@ function requireNative() {
|
|
|
407
407
|
try {
|
|
408
408
|
const binding = require('@net-mesh/core-linux-riscv64-musl')
|
|
409
409
|
const bindingPackageVersion = require('@net-mesh/core-linux-riscv64-musl/package.json').version
|
|
410
|
-
if (bindingPackageVersion !== '0.
|
|
411
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
410
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
411
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
412
412
|
}
|
|
413
413
|
return binding
|
|
414
414
|
} catch (e) {
|
|
@@ -423,8 +423,8 @@ function requireNative() {
|
|
|
423
423
|
try {
|
|
424
424
|
const binding = require('@net-mesh/core-linux-riscv64-gnu')
|
|
425
425
|
const bindingPackageVersion = require('@net-mesh/core-linux-riscv64-gnu/package.json').version
|
|
426
|
-
if (bindingPackageVersion !== '0.
|
|
427
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
426
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
427
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
428
428
|
}
|
|
429
429
|
return binding
|
|
430
430
|
} catch (e) {
|
|
@@ -440,8 +440,8 @@ function requireNative() {
|
|
|
440
440
|
try {
|
|
441
441
|
const binding = require('@net-mesh/core-linux-ppc64-gnu')
|
|
442
442
|
const bindingPackageVersion = require('@net-mesh/core-linux-ppc64-gnu/package.json').version
|
|
443
|
-
if (bindingPackageVersion !== '0.
|
|
444
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
443
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
444
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
445
445
|
}
|
|
446
446
|
return binding
|
|
447
447
|
} catch (e) {
|
|
@@ -456,8 +456,8 @@ function requireNative() {
|
|
|
456
456
|
try {
|
|
457
457
|
const binding = require('@net-mesh/core-linux-s390x-gnu')
|
|
458
458
|
const bindingPackageVersion = require('@net-mesh/core-linux-s390x-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '0.
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
459
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
460
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
461
|
}
|
|
462
462
|
return binding
|
|
463
463
|
} catch (e) {
|
|
@@ -476,8 +476,8 @@ function requireNative() {
|
|
|
476
476
|
try {
|
|
477
477
|
const binding = require('@net-mesh/core-openharmony-arm64')
|
|
478
478
|
const bindingPackageVersion = require('@net-mesh/core-openharmony-arm64/package.json').version
|
|
479
|
-
if (bindingPackageVersion !== '0.
|
|
480
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
479
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
480
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
481
481
|
}
|
|
482
482
|
return binding
|
|
483
483
|
} catch (e) {
|
|
@@ -492,8 +492,8 @@ function requireNative() {
|
|
|
492
492
|
try {
|
|
493
493
|
const binding = require('@net-mesh/core-openharmony-x64')
|
|
494
494
|
const bindingPackageVersion = require('@net-mesh/core-openharmony-x64/package.json').version
|
|
495
|
-
if (bindingPackageVersion !== '0.
|
|
496
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
495
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
496
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
497
497
|
}
|
|
498
498
|
return binding
|
|
499
499
|
} catch (e) {
|
|
@@ -508,8 +508,8 @@ function requireNative() {
|
|
|
508
508
|
try {
|
|
509
509
|
const binding = require('@net-mesh/core-openharmony-arm')
|
|
510
510
|
const bindingPackageVersion = require('@net-mesh/core-openharmony-arm/package.json').version
|
|
511
|
-
if (bindingPackageVersion !== '0.
|
|
512
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
511
|
+
if (bindingPackageVersion !== '0.33.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
512
|
+
throw new Error(`Native binding package version mismatch, expected 0.33.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
513
513
|
}
|
|
514
514
|
return binding
|
|
515
515
|
} catch (e) {
|
|
@@ -587,6 +587,7 @@ if (!nativeBinding) {
|
|
|
587
587
|
}
|
|
588
588
|
|
|
589
589
|
module.exports = nativeBinding
|
|
590
|
+
module.exports.A2aServeHandle = nativeBinding.A2aServeHandle
|
|
590
591
|
module.exports.AdminCommands = nativeBinding.AdminCommands
|
|
591
592
|
module.exports.AdminVerifier = nativeBinding.AdminVerifier
|
|
592
593
|
module.exports.AuditQuery = nativeBinding.AuditQuery
|
|
@@ -601,10 +602,14 @@ module.exports.ConsentPolicy = nativeBinding.ConsentPolicy
|
|
|
601
602
|
module.exports.DaemonHandle = nativeBinding.DaemonHandle
|
|
602
603
|
module.exports.DaemonRuntime = nativeBinding.DaemonRuntime
|
|
603
604
|
module.exports.DeckClient = nativeBinding.DeckClient
|
|
605
|
+
module.exports.DelegationChain = nativeBinding.DelegationChain
|
|
606
|
+
module.exports.DeviceEnrollment = nativeBinding.DeviceEnrollment
|
|
607
|
+
module.exports.DeviceRecord = nativeBinding.DeviceRecord
|
|
604
608
|
module.exports.DuplexCall = nativeBinding.DuplexCall
|
|
605
609
|
module.exports.DuplexSink = nativeBinding.DuplexSink
|
|
606
610
|
module.exports.DuplexStream = nativeBinding.DuplexStream
|
|
607
611
|
module.exports.Encoding = nativeBinding.Encoding
|
|
612
|
+
module.exports.EnrollmentServeHandle = nativeBinding.EnrollmentServeHandle
|
|
608
613
|
module.exports.FailureStream = nativeBinding.FailureStream
|
|
609
614
|
module.exports.FoldQueryClient = nativeBinding.FoldQueryClient
|
|
610
615
|
module.exports.ForkGroup = nativeBinding.ForkGroup
|
|
@@ -612,6 +617,9 @@ module.exports.IceCommands = nativeBinding.IceCommands
|
|
|
612
617
|
module.exports.IceProposal = nativeBinding.IceProposal
|
|
613
618
|
module.exports.Identity = nativeBinding.Identity
|
|
614
619
|
module.exports.InMemoryChainReader = nativeBinding.InMemoryChainReader
|
|
620
|
+
module.exports.InviteToken = nativeBinding.InviteToken
|
|
621
|
+
module.exports.JoinOutcome = nativeBinding.JoinOutcome
|
|
622
|
+
module.exports.JoinRequest = nativeBinding.JoinRequest
|
|
615
623
|
module.exports.JsRequestStream = nativeBinding.JsRequestStream
|
|
616
624
|
module.exports.JsResponseSink = nativeBinding.JsResponseSink
|
|
617
625
|
module.exports.LocalPublicationHandle = nativeBinding.LocalPublicationHandle
|
|
@@ -631,6 +639,7 @@ module.exports.Net = nativeBinding.Net
|
|
|
631
639
|
module.exports.NetDb = nativeBinding.NetDb
|
|
632
640
|
module.exports.NetMesh = nativeBinding.NetMesh
|
|
633
641
|
module.exports.NetStream = nativeBinding.NetStream
|
|
642
|
+
module.exports.OperatorEnrollment = nativeBinding.OperatorEnrollment
|
|
634
643
|
module.exports.OperatorIdentity = nativeBinding.OperatorIdentity
|
|
635
644
|
module.exports.OperatorRegistry = nativeBinding.OperatorRegistry
|
|
636
645
|
module.exports.PaymentProvider = nativeBinding.PaymentProvider
|
|
@@ -642,6 +651,7 @@ module.exports.RedexTailIter = nativeBinding.RedexTailIter
|
|
|
642
651
|
module.exports.RedisStreamDedup = nativeBinding.RedisStreamDedup
|
|
643
652
|
module.exports.RegistryClient = nativeBinding.RegistryClient
|
|
644
653
|
module.exports.ReplicaGroup = nativeBinding.ReplicaGroup
|
|
654
|
+
module.exports.RevocationRegistry = nativeBinding.RevocationRegistry
|
|
645
655
|
module.exports.RpcStream = nativeBinding.RpcStream
|
|
646
656
|
module.exports.ServeHandle = nativeBinding.ServeHandle
|
|
647
657
|
module.exports.ShardGroup = nativeBinding.ShardGroup
|
|
@@ -675,7 +685,11 @@ module.exports.DATAFORTS_BLOB_TREE_SUPPORTED = nativeBinding.DATAFORTS_BLOB_TREE
|
|
|
675
685
|
module.exports.decodeAggregate = nativeBinding.decodeAggregate
|
|
676
686
|
module.exports.decodeJoined = nativeBinding.decodeJoined
|
|
677
687
|
module.exports.decodeWindow = nativeBinding.decodeWindow
|
|
688
|
+
module.exports.defaultRevocationStorePath = nativeBinding.defaultRevocationStorePath
|
|
678
689
|
module.exports.delegateToken = nativeBinding.delegateToken
|
|
690
|
+
module.exports.deriveChildIdentity = nativeBinding.deriveChildIdentity
|
|
691
|
+
module.exports.fingerprint = nativeBinding.fingerprint
|
|
692
|
+
module.exports.GATEWAY_DELEGATION_CHANNEL = nativeBinding.GATEWAY_DELEGATION_CHANNEL
|
|
679
693
|
module.exports.generateNetKeypair = nativeBinding.generateNetKeypair
|
|
680
694
|
module.exports.isBlobRef = nativeBinding.isBlobRef
|
|
681
695
|
module.exports.isTransferStreamId = nativeBinding.isTransferStreamId
|
package/net.darwin-arm64.node
CHANGED
|
Binary file
|
package/net.darwin-x64.node
CHANGED
|
Binary file
|
package/net.linux-arm64-gnu.node
CHANGED
|
Binary file
|
|
Binary file
|
package/net.linux-x64-gnu.node
CHANGED
|
Binary file
|
package/net.linux-x64-musl.node
CHANGED
|
Binary file
|
|
Binary file
|
package/net.win32-x64-msvc.node
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@net-mesh/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "High-performance, schema-agnostic event bus for AI runtime workloads",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
},
|
|
81
81
|
"scripts": {
|
|
82
82
|
"artifacts": "napi artifacts",
|
|
83
|
-
"build": "napi build --platform --release --features redis,net,cortex,compute,groups,meshos,deck,meshdb,aggregator",
|
|
84
|
-
"build:debug": "napi build --platform --features redis,net,cortex,compute,groups,meshos,deck,meshdb,aggregator",
|
|
85
|
-
"build:test": "napi build --platform --features redis,net,cortex,compute,groups,meshos,deck,meshdb,aggregator,test-helpers",
|
|
83
|
+
"build": "napi build --platform --release --features redis,net,cortex,compute,groups,meshos,deck,meshdb,aggregator,delegation,a2a",
|
|
84
|
+
"build:debug": "napi build --platform --features redis,net,cortex,compute,groups,meshos,deck,meshdb,aggregator,delegation,a2a",
|
|
85
|
+
"build:test": "napi build --platform --features redis,net,cortex,compute,groups,meshos,deck,meshdb,aggregator,delegation,a2a,test-helpers",
|
|
86
86
|
"build:ts": "tsc -p tsconfig.build.json",
|
|
87
87
|
"prepublishOnly": "npm run build:ts && napi prepublish -t npm",
|
|
88
88
|
"test": "vitest run",
|
|
@@ -97,13 +97,13 @@
|
|
|
97
97
|
"node": ">=20"
|
|
98
98
|
},
|
|
99
99
|
"optionalDependencies": {
|
|
100
|
-
"@net-mesh/core-win32-x64-msvc": "0.
|
|
101
|
-
"@net-mesh/core-win32-arm64-msvc": "0.
|
|
102
|
-
"@net-mesh/core-darwin-x64": "0.
|
|
103
|
-
"@net-mesh/core-darwin-arm64": "0.
|
|
104
|
-
"@net-mesh/core-linux-x64-gnu": "0.
|
|
105
|
-
"@net-mesh/core-linux-x64-musl": "0.
|
|
106
|
-
"@net-mesh/core-linux-arm64-gnu": "0.
|
|
107
|
-
"@net-mesh/core-linux-arm64-musl": "0.
|
|
100
|
+
"@net-mesh/core-win32-x64-msvc": "0.33.0",
|
|
101
|
+
"@net-mesh/core-win32-arm64-msvc": "0.33.0",
|
|
102
|
+
"@net-mesh/core-darwin-x64": "0.33.0",
|
|
103
|
+
"@net-mesh/core-darwin-arm64": "0.33.0",
|
|
104
|
+
"@net-mesh/core-linux-x64-gnu": "0.33.0",
|
|
105
|
+
"@net-mesh/core-linux-x64-musl": "0.33.0",
|
|
106
|
+
"@net-mesh/core-linux-arm64-gnu": "0.33.0",
|
|
107
|
+
"@net-mesh/core-linux-arm64-musl": "0.33.0"
|
|
108
108
|
}
|
|
109
109
|
}
|