tesseract-agent 0.10.9 → 0.11.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.
@@ -42,8 +42,18 @@ export declare class MeshEngine {
42
42
  *
43
43
  * MUST already be verified (quorum, mesh binding, rollback, staleness). Handing
44
44
  * this an unverified bundle puts the coordination relay back into the trust path.
45
+ *
46
+ * `nowMs` is NOT optional, and its absence here was a complete outage: the Rust
47
+ * binding is `set_bundle(bundle: Buffer, now_ms: f64)`, this file declared one
48
+ * parameter, so `node.ts` called it with one and TypeScript had no way to know. Every
49
+ * machine that joined a mesh then failed to start with
50
+ * `Failed to convert napi value Undefined into rust type f64` — and since a fresh
51
+ * join ALWAYS carries a bundle, that was every machine, on every platform.
52
+ *
53
+ * It is the freshness clock the bundle is checked against, so a wrong value is a
54
+ * bundle wrongly accepted or wrongly refused. Pass `Date.now()`.
45
55
  */
46
- setBundle(bundle: Buffer): void;
56
+ setBundle(bundle: Buffer, nowMs: number): void;
47
57
 
48
58
  addPeer(staticPub: Buffer, overlayV4: number, overlayV6: Buffer): void;
49
59
  /** A relayed path always ranks below a direct one, regardless of RTT. */
@@ -60,6 +70,27 @@ export declare class MeshEngine {
60
70
 
61
71
  peerCount(): number;
62
72
 
73
+ // ── Declared because the binding has them and this file did not ──────────────
74
+ // Every omission here is a method no TypeScript caller can reach, which is how
75
+ // `setExitNode` stayed unreachable while the engine implemented it — and how
76
+ // `setBundle` was called with the wrong arity for as long as it was.
77
+
78
+ /** This mesh's genesis fingerprint, as the engine parsed it from the certificate. */
79
+ meshId(): Buffer;
80
+ /** Our own X25519 static public key. */
81
+ localStaticPub(): Buffer;
82
+ /** Traffic counters, split by what costs relay bandwidth. */
83
+ meter(): MeshMeter;
84
+ /** The epoch of the installed bundle; 0 when none. */
85
+ policyEpoch(): number;
86
+ /** True once a bundle lists OUR certificate as revoked — fail closed on it. */
87
+ selfRevoked(): boolean;
88
+ /** Whether we forward other members' frames (relay tier 1). */
89
+ setRelayEnabled(on: boolean): void;
90
+ /** Cookie-secret rotation: ask, then supply 32 fresh bytes. */
91
+ needsCookieRotation(nowMs: number): boolean;
92
+ rotateCookieSecret(secret: Buffer, nowMs: number): void;
93
+
63
94
  /**
64
95
  * Route all non-mesh traffic through this peer; `null` restores a split tunnel.
65
96
  *
@@ -76,6 +107,16 @@ export declare class MeshEngine {
76
107
  setExitNode(staticPub: Buffer | null): void;
77
108
  }
78
109
 
110
+ /** Traffic counters, split by what costs relay bandwidth. */
111
+ export interface MeshMeter {
112
+ txDirectBytes: number;
113
+ txRelayedBytes: number;
114
+ rxDirectBytes: number;
115
+ rxRelayedBytes: number;
116
+ forwardedBytes: number;
117
+ forwardedPackets: number;
118
+ }
119
+
79
120
  /** True only when the prebuilt loaded AND its ABI matches. Check before use. */
80
121
  export declare const available: boolean;
81
122
  /** Why it did not load, for diagnostics. */
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fineguide-tesseract/mesh-core",
3
- "version": "0.10.9",
3
+ "version": "0.11.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tesseract-agent",
3
- "version": "0.10.9",
3
+ "version": "0.11.0",
4
4
  "license": "UNLICENSED",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -17,7 +17,7 @@
17
17
  "url": "https://x.com/cmaftuleac"
18
18
  },
19
19
  "contributors": [
20
- "Fineguide.AI (https://fineguide.ai)"
20
+ "Eightcell Labs, Inc. (https://tesseract.dev)"
21
21
  ],
22
22
  "description": "tesseract — install on a headless server to run agents remotely under your account (the GUI-less counterpart to the desktop app's hosting).",
23
23
  "type": "module",