@nekzus/liop-studio 1.0.0-alpha.2 → 1.0.0-alpha.4

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.
@@ -85,7 +85,8 @@ var DEFAULT_PRESET_PROFILES = [
85
85
  role: "Clinical Healthcare & EHR Patient Records",
86
86
  isolation: "pnet Swarm Key (PSK) + HIPAA Strict Mode",
87
87
  dataset: "2,500 clinical EHR patient records",
88
- defaultTool: "Analyze_Synthetic_Medical_Records"
88
+ defaultTool: "Analyze_Synthetic_Medical_Records",
89
+ defaultTools: ["Analyze_Synthetic_Medical_Records"]
89
90
  },
90
91
  {
91
92
  id: "bank",
@@ -97,7 +98,8 @@ var DEFAULT_PRESET_PROFILES = [
97
98
  role: "Core Banking & Financial Settlement",
98
99
  isolation: "pnet Swarm Key (PSK) + Differential Privacy",
99
100
  dataset: "1,500 synthetic accounts ($148M balance)",
100
- defaultTool: "Analyze_Synthetic_Bank_Transactions"
101
+ defaultTool: "Analyze_Synthetic_Bank_Transactions",
102
+ defaultTools: ["Analyze_Synthetic_Bank_Transactions"]
101
103
  },
102
104
  {
103
105
  id: "blg",
@@ -108,7 +110,12 @@ var DEFAULT_PRESET_PROFILES = [
108
110
  tierLabel: "Tier 1: Sovereign Enclaves (In-Situ Origin)",
109
111
  role: "Dual-NIC Perimeter Security Bridge (Tier 1 <-> Tier 2)",
110
112
  isolation: "6-Layer Zero-Trust + AST Guardian + Egress Shield",
111
- defaultTool: "BLG_Inspect_Enclave_Perimeter"
113
+ defaultTool: "BLG_Inspect_Enclave_Perimeter",
114
+ defaultTools: [
115
+ "BLG_Inspect_Enclave_Perimeter",
116
+ "BLG_Execute_Healthcare_Analytics",
117
+ "BLG_Execute_Banking_Analytics"
118
+ ]
112
119
  },
113
120
  {
114
121
  id: "oracle",
@@ -120,7 +127,8 @@ var DEFAULT_PRESET_PROFILES = [
120
127
  role: "Real-time High Frequency Trading Market Simulator",
121
128
  isolation: "Consortium Node + 50ms Tick Streaming Buffer",
122
129
  dataset: "8 Instruments + L2 Orderbook",
123
- defaultTool: "Analyze_HFT_Market_Data"
130
+ defaultTool: "Analyze_HFT_Market_Data",
131
+ defaultTools: ["Analyze_HFT_Market_Data", "LiopMeshStatus"]
124
132
  },
125
133
  {
126
134
  id: "relay",
@@ -130,7 +138,8 @@ var DEFAULT_PRESET_PROFILES = [
130
138
  tierLabel: "Tier 2: Consortium Routing & Gateways",
131
139
  role: "Kademlia DHT & libp2p Circuit Relay v2 Node",
132
140
  isolation: "Public Swarm Mesh Relay",
133
- defaultTool: "LiopMeshStatus"
141
+ defaultTool: "LiopMeshStatus",
142
+ defaultTools: ["LiopMeshStatus"]
134
143
  },
135
144
  {
136
145
  id: "nexus",
@@ -140,7 +149,8 @@ var DEFAULT_PRESET_PROFILES = [
140
149
  tierLabel: "Tier 2: Consortium Routing & Gateways",
141
150
  role: "OAuth 2.1 RFC 8707 Auth Server & Mesh Authority",
142
151
  isolation: "Zero-Trust Identity Provider",
143
- defaultTool: "Authenticate_Client"
152
+ defaultTool: "Authenticate_Client",
153
+ defaultTools: ["Authenticate_Client"]
144
154
  },
145
155
  {
146
156
  id: "edge",
@@ -152,7 +162,8 @@ var DEFAULT_PRESET_PROFILES = [
152
162
  role: "Edge Telemetry & Hostile 3G WAN Industrial Node",
153
163
  isolation: "WAN Jitter/Loss Resistant Client",
154
164
  dataset: "Edge Telemetry Sensors (Pressure, RPM, Temp)",
155
- defaultTool: "Analyze_IoT_Sensor_Data"
165
+ defaultTool: "Analyze_IoT_Sensor_Data",
166
+ defaultTools: ["Analyze_IoT_Sensor_Data"]
156
167
  }
157
168
  ];
158
169
  var NetworkDiscoveryEngine = class _NetworkDiscoveryEngine {
@@ -185,7 +196,7 @@ var NetworkDiscoveryEngine = class _NetworkDiscoveryEngine {
185
196
  /**
186
197
  * Probe a specific HTTP/Health endpoint dynamically.
187
198
  */
188
- async probeHttpNode(host, port, timeoutMs = 1200) {
199
+ async probeHttpNode(host, port, timeoutMs = 3500) {
189
200
  const url = `http://${host}:${port}`;
190
201
  const t0 = performance.now();
191
202
  const controller = new AbortController();
@@ -272,7 +283,7 @@ var NetworkDiscoveryEngine = class _NetworkDiscoveryEngine {
272
283
  peerId: probe.peerId || `peer-${profile.id}`,
273
284
  multiaddrs: probe.multiaddrs || [],
274
285
  version: probe.version || "2.5.0",
275
- tools: probe.tools && probe.tools.length > 0 ? probe.tools : [],
286
+ tools: probe.tools && probe.tools.length > 0 ? probe.tools : profile.defaultTools || (profile.defaultTool ? [profile.defaultTool] : []),
276
287
  role: profile.role,
277
288
  isolation: profile.isolation,
278
289
  dataset: profile.dataset,
@@ -294,7 +305,7 @@ var NetworkDiscoveryEngine = class _NetworkDiscoveryEngine {
294
305
  peerId: `peer-${profile.id}`,
295
306
  multiaddrs: [],
296
307
  version: "2.5.0",
297
- tools: [],
308
+ tools: profile.defaultTools || (profile.defaultTool ? [profile.defaultTool] : []),
298
309
  role: profile.role,
299
310
  isolation: profile.isolation,
300
311
  dataset: profile.dataset,
@@ -332,7 +343,7 @@ var NetworkDiscoveryEngine = class _NetworkDiscoveryEngine {
332
343
  const probe = await this.probeHttpNode(host, matchedProfile.httpPort);
333
344
  const isOnline = status === "online" || Boolean(probe?.tools) && (probe?.tools?.length ?? 0) > 0;
334
345
  const nodeName = probe?.name?.replace("PRODUCTION-", "").replace(/-/g, " ") || matchedProfile.defaultName;
335
- const defaultTools = matchedProfile.defaultTool ? [matchedProfile.defaultTool] : ["Execute_WASI_Logic"];
346
+ const defaultTools = matchedProfile.defaultTools || (matchedProfile.defaultTool ? [matchedProfile.defaultTool] : ["Execute_WASI_Logic"]);
336
347
  const tools = isOnline ? probe?.tools && probe.tools.length > 0 ? probe.tools : defaultTools : [];
337
348
  const enriched = isOnline && probe?.enrichedTools && probe.enrichedTools.length > 0 ? probe.enrichedTools : tools.map((t) => ({
338
349
  name: t,
@@ -1886,7 +1897,7 @@ function createStudioServer(options = {}) {
1886
1897
  app.use(
1887
1898
  "/*",
1888
1899
  serveStatic({
1889
- root: path.relative(process3.cwd(), distPath).replace(/\\/g, "/"),
1900
+ root: distPath,
1890
1901
  rewriteRequestPath: (pathStr) => {
1891
1902
  if (!pathStr.includes(".") && !pathStr.startsWith("/api") && pathStr !== "/health") {
1892
1903
  return "/index.html";