@serve.zone/interfaces 7.18.0 → 7.20.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/changelog.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-06-11 - 7.20.0
4
+
5
+ ### Features
6
+
7
+ - add live proxy traffic stats request interfaces (requests)
8
+ - Add per-host traffic stats shape with byte rates, request rate, and active connections
9
+ - Add Cloudly, coreflow, and coretraffic request contracts for retrieving live traffic stats
10
+
11
+ ## 2026-06-11 - 7.19.0
12
+
13
+ ### Features
14
+
15
+ - add per-node dcrouter target host mapping (settings)
16
+ - Adds optional dcrouterTargetHostsByNode setting for mapping swarm node hostnames to gateway-reachable targets.
17
+
3
18
  ## 2026-06-11 - 7.18.0
4
19
 
5
20
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '7.18.0',
6
+ version: '7.20.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
@@ -9,6 +9,7 @@ export interface ICloudlySettings {
9
9
  backupExternalTargetType?: string;
10
10
  backupExternalTargetConfig?: string;
11
11
  backupNodeCacheKeepDays?: string;
12
+ dcrouterTargetHostsByNode?: string;
12
13
  baseosJoinToken?: string;
13
14
  corebuildWorkerUrl?: string;
14
15
  corebuildWorkerToken?: string;
@@ -128,6 +128,22 @@ export interface IReq_Any_Cloudly_GetNodeActions extends plugins.typedrequestInt
128
128
  actions: INodeAction[];
129
129
  };
130
130
  }
131
+ /**
132
+ * Admin UI asks Cloudly for a node's live proxy traffic rates; Cloudly
133
+ * relays to the node's coreflow which queries its local coretraffic.
134
+ */
135
+ export interface IReq_Any_Cloudly_GetNodeTrafficStats extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Any_Cloudly_GetNodeTrafficStats> {
136
+ method: 'getNodeTrafficStats';
137
+ request: {
138
+ identity: IIdentity;
139
+ nodeId: string;
140
+ windowSeconds?: number;
141
+ };
142
+ response: {
143
+ hosts: import('./routing.js').ITrafficHostStats[];
144
+ timestamp: number;
145
+ };
146
+ }
131
147
  /**
132
148
  * Cloudly -> admin UIs: live node metrics relay (1s cadence, not persisted).
133
149
  */
@@ -21,3 +21,41 @@ export interface IRequest_Coretraffic_Coreflow_GetCurrentRouting {
21
21
  reverseConfigs: IReverseProxyConfig[];
22
22
  };
23
23
  }
24
+ /**
25
+ * Live proxy traffic rates for one served hostname.
26
+ */
27
+ export interface ITrafficHostStats {
28
+ hostName: string;
29
+ bytesInPerSec: number;
30
+ bytesOutPerSec: number;
31
+ requestsPerSec: number;
32
+ connectionsActive: number;
33
+ }
34
+ /**
35
+ * Coreflow asks its local coretraffic for current per-hostname traffic
36
+ * rates (sourced from the proxy's metrics, not persisted).
37
+ */
38
+ export interface IRequest_Coreflow_Coretraffic_GetTrafficStats {
39
+ method: 'getTrafficStats';
40
+ request: {
41
+ windowSeconds?: number;
42
+ };
43
+ response: {
44
+ hosts: ITrafficHostStats[];
45
+ timestamp: number;
46
+ };
47
+ }
48
+ /**
49
+ * Cloudly asks a node's coreflow for that node's current proxy traffic
50
+ * rates; coreflow relays to its local coretraffic.
51
+ */
52
+ export interface IRequest_Cloudly_Coreflow_GetTrafficStats {
53
+ method: 'coreflowGetTrafficStats';
54
+ request: {
55
+ windowSeconds?: number;
56
+ };
57
+ response: {
58
+ hosts: ITrafficHostStats[];
59
+ timestamp: number;
60
+ };
61
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serve.zone/interfaces",
3
- "version": "7.18.0",
3
+ "version": "7.20.0",
4
4
  "private": false,
5
5
  "description": "Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.",
6
6
  "exports": {
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '7.18.0',
6
+ version: '7.20.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
8
8
  }
@@ -24,6 +24,11 @@ export interface ICloudlySettings {
24
24
  // Node-local archive cache retention in days (corestore prune; default 30)
25
25
  backupNodeCacheKeepDays?: string;
26
26
 
27
+ // JSON map of swarm node hostname -> gateway-reachable IP/host. Routes for
28
+ // services pinned to a node target that node's coretraffic instead of the
29
+ // static dcrouterTargetHost (e.g. {"cloudlyworkergrasberg":"192.168.190.108"}).
30
+ dcrouterTargetHostsByNode?: string;
31
+
27
32
  // BaseOS enrollment
28
33
  baseosJoinToken?: string;
29
34
 
@@ -164,6 +164,26 @@ export interface IReq_Any_Cloudly_GetNodeActions extends plugins.typedrequestInt
164
164
  };
165
165
  }
166
166
 
167
+ /**
168
+ * Admin UI asks Cloudly for a node's live proxy traffic rates; Cloudly
169
+ * relays to the node's coreflow which queries its local coretraffic.
170
+ */
171
+ export interface IReq_Any_Cloudly_GetNodeTrafficStats extends plugins.typedrequestInterfaces.implementsTR<
172
+ plugins.typedrequestInterfaces.ITypedRequest,
173
+ IReq_Any_Cloudly_GetNodeTrafficStats
174
+ > {
175
+ method: 'getNodeTrafficStats';
176
+ request: {
177
+ identity: IIdentity;
178
+ nodeId: string;
179
+ windowSeconds?: number;
180
+ };
181
+ response: {
182
+ hosts: import('./routing.js').ITrafficHostStats[];
183
+ timestamp: number;
184
+ };
185
+ }
186
+
167
187
  /**
168
188
  * Cloudly -> admin UIs: live node metrics relay (1s cadence, not persisted).
169
189
  */
@@ -23,3 +23,44 @@ export interface IRequest_Coretraffic_Coreflow_GetCurrentRouting {
23
23
  reverseConfigs: IReverseProxyConfig[];
24
24
  };
25
25
  }
26
+
27
+ /**
28
+ * Live proxy traffic rates for one served hostname.
29
+ */
30
+ export interface ITrafficHostStats {
31
+ hostName: string;
32
+ bytesInPerSec: number;
33
+ bytesOutPerSec: number;
34
+ requestsPerSec: number;
35
+ connectionsActive: number;
36
+ }
37
+
38
+ /**
39
+ * Coreflow asks its local coretraffic for current per-hostname traffic
40
+ * rates (sourced from the proxy's metrics, not persisted).
41
+ */
42
+ export interface IRequest_Coreflow_Coretraffic_GetTrafficStats {
43
+ method: 'getTrafficStats';
44
+ request: {
45
+ windowSeconds?: number;
46
+ };
47
+ response: {
48
+ hosts: ITrafficHostStats[];
49
+ timestamp: number;
50
+ };
51
+ }
52
+
53
+ /**
54
+ * Cloudly asks a node's coreflow for that node's current proxy traffic
55
+ * rates; coreflow relays to its local coretraffic.
56
+ */
57
+ export interface IRequest_Cloudly_Coreflow_GetTrafficStats {
58
+ method: 'coreflowGetTrafficStats';
59
+ request: {
60
+ windowSeconds?: number;
61
+ };
62
+ response: {
63
+ hosts: ITrafficHostStats[];
64
+ timestamp: number;
65
+ };
66
+ }