@mindexec/cli 0.2.399 → 0.2.401

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.
Files changed (18) hide show
  1. package/package.json +1 -1
  2. package/scripts/remote-registry-follower-smoke.mjs +30 -0
  3. package/server.js +23 -3
  4. package/wwwroot/_content/MindExecution.Shared/js/mind-map-css3d-manager.js +2 -2
  5. package/wwwroot/_framework/{MindExecution.Core.y7ffihhajj.dll → MindExecution.Core.v3wmxuk7qp.dll} +0 -0
  6. package/wwwroot/_framework/{MindExecution.Kernel.l5y3qroa7p.dll → MindExecution.Kernel.kx4xhfncsj.dll} +0 -0
  7. package/wwwroot/_framework/{MindExecution.Plugins.Admin.uuf238xa0h.dll → MindExecution.Plugins.Admin.1zm6aw94og.dll} +0 -0
  8. package/wwwroot/_framework/{MindExecution.Plugins.Business.nyr3v25v48.dll → MindExecution.Plugins.Business.aundh2fuh7.dll} +0 -0
  9. package/wwwroot/_framework/{MindExecution.Plugins.Concept.l9z9tx9svt.dll → MindExecution.Plugins.Concept.pp0hp35q6g.dll} +0 -0
  10. package/wwwroot/_framework/{MindExecution.Plugins.Directory.ju87t8h3zs.dll → MindExecution.Plugins.Directory.askhe4ifrt.dll} +0 -0
  11. package/wwwroot/_framework/{MindExecution.Plugins.PlanMaster.krn3jgvjpa.dll → MindExecution.Plugins.PlanMaster.4fq8s1zuht.dll} +0 -0
  12. package/wwwroot/_framework/{MindExecution.Plugins.YouTube.5m53srfud6.dll → MindExecution.Plugins.YouTube.1ekzvomyd2.dll} +0 -0
  13. package/wwwroot/_framework/{MindExecution.Shared.ojp3psugsm.dll → MindExecution.Shared.ndzddktvwm.dll} +0 -0
  14. package/wwwroot/_framework/MindExecution.Web.ptfprazlfv.dll +0 -0
  15. package/wwwroot/_framework/blazor.boot.json +21 -21
  16. package/wwwroot/service-worker-assets.js +23 -23
  17. package/wwwroot/service-worker.js +1 -1
  18. package/wwwroot/_framework/MindExecution.Web.zd2eb9d4hz.dll +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindexec/cli",
3
- "version": "0.2.399",
3
+ "version": "0.2.401",
4
4
  "description": "MindExec local runtime and bridge CLI",
5
5
  "main": "server.js",
6
6
  "type": "module",
@@ -127,6 +127,7 @@ function startFakeSupabase(getTarget, setTarget = null) {
127
127
  if (req.method === 'POST' && parsed.pathname === '/rest/v1/rpc/set_remote_host_target') {
128
128
  assertRegistryAuth(req);
129
129
  const body = JSON.parse(await readBody() || '{}');
130
+ requests[requests.length - 1].body = body;
130
131
  const now = Date.now();
131
132
  const existing = getTarget();
132
133
  const sameLease = existing
@@ -505,6 +506,35 @@ async function main() {
505
506
  assert.equal(renewSetHost.payload?.hostTargetRenew?.status, 'active', JSON.stringify(renewSetHost.payload?.hostTargetRenew));
506
507
  assert.equal(currentTarget?.endpoint, renewPublicEndpoint, JSON.stringify(currentTarget));
507
508
  assert.equal(currentTarget?.node_id, 'remote-registry-renew-node', JSON.stringify(currentTarget));
509
+ const explicitSetHostPublish = fakeSupabase.requests.find(request =>
510
+ request.method === 'POST'
511
+ && request.pathname === '/rest/v1/rpc/set_remote_host_target'
512
+ && request.body?.p_node_id === 'remote-registry-renew-node');
513
+ assert.equal(explicitSetHostPublish?.body?.p_takeover, true, JSON.stringify(explicitSetHostPublish?.body));
514
+ const beforeQuietRenewPublishCount = fakeSupabase.requests.filter(request =>
515
+ request.method === 'POST'
516
+ && request.pathname === '/rest/v1/rpc/set_remote_host_target').length;
517
+ const quietRenewSetHost = await fetchJson(`${renewHost.baseUrl}/api/remote/host-target`, {
518
+ method: 'POST',
519
+ token: BRIDGE_TOKEN,
520
+ body: JSON.stringify({
521
+ nodeId: 'remote-registry-renew-node',
522
+ enabled: true,
523
+ leaseMs: 60000,
524
+ renew: true
525
+ })
526
+ });
527
+ assert.equal(quietRenewSetHost.ok, true, JSON.stringify(quietRenewSetHost.payload));
528
+ assert.equal(quietRenewSetHost.payload?.ok, true, JSON.stringify(quietRenewSetHost.payload));
529
+ assert.equal(quietRenewSetHost.payload?.active, true, JSON.stringify(quietRenewSetHost.payload));
530
+ assert.equal(quietRenewSetHost.payload?.hostTargetTakeover, false, JSON.stringify(quietRenewSetHost.payload));
531
+ const quietRenewPublish = fakeSupabase.requests
532
+ .filter(request =>
533
+ request.method === 'POST'
534
+ && request.pathname === '/rest/v1/rpc/set_remote_host_target')
535
+ .slice(beforeQuietRenewPublishCount)
536
+ .find(request => request.body?.p_node_id === 'remote-registry-renew-node');
537
+ assert.equal(quietRenewPublish?.body?.p_takeover, false, JSON.stringify(quietRenewPublish?.body));
508
538
  await waitFor(() => {
509
539
  const publishCount = fakeSupabase.requests.filter(request =>
510
540
  request.method === 'POST'
package/server.js CHANGED
@@ -12417,6 +12417,11 @@ app.post('/api/remote/host-target', async (req, res) => {
12417
12417
  res.setHeader('Cache-Control', 'no-store');
12418
12418
  try {
12419
12419
  const requestedLeaseMs = Number(req.body?.leaseMs);
12420
+ const requestedRenew = req.body?.renew === true;
12421
+ const requestedTakeover = req.body?.takeover;
12422
+ const takeover = req.body?.enabled === false
12423
+ ? false
12424
+ : requestedTakeover === true || (requestedTakeover !== false && !requestedRenew);
12420
12425
  const result = remoteHub.setHostTarget({
12421
12426
  enabled: req.body?.enabled !== false,
12422
12427
  nodeId: req.body?.nodeId,
@@ -12424,19 +12429,34 @@ app.post('/api/remote/host-target', async (req, res) => {
12424
12429
  REMOTE_HOST_TARGET_LEASE_MS,
12425
12430
  Number.isFinite(requestedLeaseMs) && requestedLeaseMs > 0 ? requestedLeaseMs : 0)
12426
12431
  });
12432
+ let responseResult = result;
12433
+ let hostTargetRenew = serializeRemoteHostTargetRenewState();
12427
12434
  if (result?.ok === true && result?.active === true && isLocalRemoteHostTargetActive()) {
12428
12435
  if (isRemoteAgentProcessRunning()) {
12429
12436
  await stopRemoteAgentConnection('local-host-target-active');
12430
12437
  logEvent('remote', 'managed RemoteAgent held stopped while local host target is active', 'remote');
12431
12438
  }
12432
- await runRemoteHostTargetRenewOnce('set-host', { takeover: true });
12439
+ hostTargetRenew = await runRemoteHostTargetRenewOnce('set-host', { takeover });
12440
+ const currentHub = remoteHub.getStatus({ includeSecrets: true });
12441
+ if (currentHub?.hostTargetActive !== true
12442
+ || currentHub.hostTargetNodeId !== result.hostTarget?.nodeId
12443
+ || currentHub.hostTargetLeaseId !== result.hostTarget?.leaseId) {
12444
+ responseResult = {
12445
+ ok: false,
12446
+ active: false,
12447
+ error: hostTargetRenew?.reason || 'host-target-superseded',
12448
+ hostTarget: null
12449
+ };
12450
+ }
12433
12451
  } else if (result?.active !== true) {
12434
12452
  stopRemoteHostTargetRenew('host-target-inactive');
12453
+ hostTargetRenew = serializeRemoteHostTargetRenewState();
12435
12454
  }
12436
12455
  res.json({
12437
- ...result,
12456
+ ...responseResult,
12438
12457
  agent: serializeRemoteAgentState(),
12439
- hostTargetRenew: serializeRemoteHostTargetRenewState()
12458
+ hostTargetRenew,
12459
+ hostTargetTakeover: takeover
12440
12460
  });
12441
12461
  } catch (err) {
12442
12462
  logError('remote', 'remote host target update failed.', err);
@@ -19353,7 +19353,7 @@
19353
19353
  overflow: hidden;
19354
19354
  border-radius: 0;
19355
19355
  background: ${hasPreviewSource ? 'linear-gradient(135deg, #0f172a 0%, #1e293b 100%)' : '#ffffff'};
19356
- border: 0;
19356
+ border: 1px solid rgba(203, 213, 225, 0.66);
19357
19357
  outline: 0;
19358
19358
  outline-offset: 0;
19359
19359
  box-shadow: none;
@@ -19973,7 +19973,7 @@
19973
19973
  if (preview?.style) {
19974
19974
  preview.style.border = isSelected
19975
19975
  ? '2px solid rgba(37, 99, 235, 0.86)'
19976
- : '0';
19976
+ : '1px solid rgba(203, 213, 225, 0.66)';
19977
19977
  preview.style.outline = '0';
19978
19978
  preview.style.outlineOffset = '0';
19979
19979
  preview.style.boxShadow = 'none';
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "mainAssemblyName": "MindExecution.Web",
3
3
  "resources": {
4
- "hash": "sha256-RIIvuKuhAJlhrdGsDtU19Ym/qvsLZfYIl9SVIV+zsx8=",
4
+ "hash": "sha256-MlyoxZqdnYrP34av6RxINQa6Xh6R94zwjpBdIk4I9WA=",
5
5
  "fingerprinting": {
6
6
  "Google.Protobuf.9h59ukbel7.dll": "Google.Protobuf.dll",
7
7
  "Markdig.d1j7v41cl1.dll": "Markdig.dll",
@@ -123,16 +123,16 @@
123
123
  "System.brmz7yk5qh.dll": "System.dll",
124
124
  "netstandard.yvr3prsx0x.dll": "netstandard.dll",
125
125
  "System.Private.CoreLib.c1dbswx1b2.dll": "System.Private.CoreLib.dll",
126
- "MindExecution.Core.y7ffihhajj.dll": "MindExecution.Core.dll",
127
- "MindExecution.Kernel.l5y3qroa7p.dll": "MindExecution.Kernel.dll",
128
- "MindExecution.Plugins.Admin.uuf238xa0h.dll": "MindExecution.Plugins.Admin.dll",
129
- "MindExecution.Plugins.Business.nyr3v25v48.dll": "MindExecution.Plugins.Business.dll",
130
- "MindExecution.Plugins.Concept.l9z9tx9svt.dll": "MindExecution.Plugins.Concept.dll",
131
- "MindExecution.Plugins.Directory.ju87t8h3zs.dll": "MindExecution.Plugins.Directory.dll",
132
- "MindExecution.Plugins.PlanMaster.krn3jgvjpa.dll": "MindExecution.Plugins.PlanMaster.dll",
133
- "MindExecution.Plugins.YouTube.5m53srfud6.dll": "MindExecution.Plugins.YouTube.dll",
134
- "MindExecution.Shared.ojp3psugsm.dll": "MindExecution.Shared.dll",
135
- "MindExecution.Web.zd2eb9d4hz.dll": "MindExecution.Web.dll",
126
+ "MindExecution.Core.v3wmxuk7qp.dll": "MindExecution.Core.dll",
127
+ "MindExecution.Kernel.kx4xhfncsj.dll": "MindExecution.Kernel.dll",
128
+ "MindExecution.Plugins.Admin.1zm6aw94og.dll": "MindExecution.Plugins.Admin.dll",
129
+ "MindExecution.Plugins.Business.aundh2fuh7.dll": "MindExecution.Plugins.Business.dll",
130
+ "MindExecution.Plugins.Concept.pp0hp35q6g.dll": "MindExecution.Plugins.Concept.dll",
131
+ "MindExecution.Plugins.Directory.askhe4ifrt.dll": "MindExecution.Plugins.Directory.dll",
132
+ "MindExecution.Plugins.PlanMaster.4fq8s1zuht.dll": "MindExecution.Plugins.PlanMaster.dll",
133
+ "MindExecution.Plugins.YouTube.1ekzvomyd2.dll": "MindExecution.Plugins.YouTube.dll",
134
+ "MindExecution.Shared.ndzddktvwm.dll": "MindExecution.Shared.dll",
135
+ "MindExecution.Web.ptfprazlfv.dll": "MindExecution.Web.dll",
136
136
  "dotnet.js": "dotnet.js",
137
137
  "dotnet.native.qc8g39g30v.js": "dotnet.native.js",
138
138
  "dotnet.native.boem75ye5i.wasm": "dotnet.native.wasm",
@@ -278,18 +278,18 @@
278
278
  "System.Xml.XDocument.sn51jas17n.dll": "sha256-GNI2kFgFmPTwzuzwUn8gxK+AzGLUWRJFdg9JzIbrybQ=",
279
279
  "System.brmz7yk5qh.dll": "sha256-CfM2miyj1KHApFmqMdLYWio3S/jrdON2pW9Xr2nTwlo=",
280
280
  "netstandard.yvr3prsx0x.dll": "sha256-EksNn8Luo4bOWqJ6X7dIe9qG9oOqwOVzjH2xYyMNi+E=",
281
- "MindExecution.Core.y7ffihhajj.dll": "sha256-zsCKUWBWzDly1h5/vMtqVRb7PeG4lgfIZbQuJFyY1QU=",
282
- "MindExecution.Kernel.l5y3qroa7p.dll": "sha256-V4pQTxua0lGWpdsFpo7bHr6rPFWZeofry7e9On+OJmo=",
283
- "MindExecution.Plugins.Business.nyr3v25v48.dll": "sha256-T4c7+fDE4TQAXAoFmHnYM+tT7RSvAM7W0VinLPoD+6U=",
284
- "MindExecution.Plugins.Concept.l9z9tx9svt.dll": "sha256-N/QoILmTilvX5Zo4SCy7ENTCqMzSC6RIEQlEwtxkGPo=",
285
- "MindExecution.Plugins.PlanMaster.krn3jgvjpa.dll": "sha256-8IFpm/2fpsWD3syyl58LTSWSGC8PfcrsLdmmSKR1Sq0=",
286
- "MindExecution.Shared.ojp3psugsm.dll": "sha256-FC0pE2bsyE9i7GNSXCghKULaYYZXUEdepb2VxPfcYaA=",
287
- "MindExecution.Web.zd2eb9d4hz.dll": "sha256-l4L9FFeaEkMfR5tjzxg1v/KgOuCHBkaQbxiwSHGxkNk="
281
+ "MindExecution.Core.v3wmxuk7qp.dll": "sha256-9bpD6izq4bzR75iSm2e4S9uPoshwUG7pHxvskKk0mTo=",
282
+ "MindExecution.Kernel.kx4xhfncsj.dll": "sha256-yKtHx9Ehc/GwTtP4a5pZ8K5B790qL7GrNsxlbIZ54Zo=",
283
+ "MindExecution.Plugins.Business.aundh2fuh7.dll": "sha256-Dt3CeEVDlPitVDi6wPH3cw6HGYWOzPVcyLPTlzeKry8=",
284
+ "MindExecution.Plugins.Concept.pp0hp35q6g.dll": "sha256-3ZIA9yNyUVpgcu9l83PS/HxU+CMwdPhzFgIdMZRuJgw=",
285
+ "MindExecution.Plugins.PlanMaster.4fq8s1zuht.dll": "sha256-wCd+pFIrUTxI5yFCZQ1FXEZhJGHo6UukdoLmmPMgOQg=",
286
+ "MindExecution.Shared.ndzddktvwm.dll": "sha256-pX4Nlp3A+zDcMt/1DiByz3mdy94yPTbONL5bNvhRKIc=",
287
+ "MindExecution.Web.ptfprazlfv.dll": "sha256-Xe/l7y1++MwnCKB/q2u31O8UyHha84nFgXZgpD+pEBU="
288
288
  },
289
289
  "lazyAssembly": {
290
- "MindExecution.Plugins.Admin.uuf238xa0h.dll": "sha256-OrCIUack8nSWBBiZK65DlJ3YGM677RAA8cX/oJjhm5c=",
291
- "MindExecution.Plugins.Directory.ju87t8h3zs.dll": "sha256-dapAkel5qj7fK6BiDDmvkzZL96frl8k/3yP8SDr3rMw=",
292
- "MindExecution.Plugins.YouTube.5m53srfud6.dll": "sha256-02hOpWFNogHEBktxD4XUnDN/oKFJnO0g8n4bYCP0tAY="
290
+ "MindExecution.Plugins.Admin.1zm6aw94og.dll": "sha256-zRNSRurJPrU8J2jP5eOpu7KKyPtYdJqrPS/D8L2CvGY=",
291
+ "MindExecution.Plugins.Directory.askhe4ifrt.dll": "sha256-hj7+jZS7zce5h57jwBzZUdCmVmjwQaVrzA7k/rCasFk=",
292
+ "MindExecution.Plugins.YouTube.1ekzvomyd2.dll": "sha256-B+8XLMrj3cjfgNBevIDPtyuDyTjM8j5zYPKxTBIYwEI="
293
293
  }
294
294
  },
295
295
  "cacheBootResources": true,
@@ -1,5 +1,5 @@
1
1
  self.assetsManifest = {
2
- "version": "FbVowZRL",
2
+ "version": "GIgxXFFU",
3
3
  "assets": [
4
4
  {
5
5
  "hash": "sha256-+CSYMcqLNTsq3VnH11jgYyOCCdxvHzL74CBmo4sCmMU=",
@@ -86,7 +86,7 @@
86
86
  "url": "_content/MindExecution.Shared/js/mind-map-core.js.backup"
87
87
  },
88
88
  {
89
- "hash": "sha256-a8da/gCQmnmyAg7a/c9n5VHeQccZcXwCjHd50TfNoKw=",
89
+ "hash": "sha256-dRYLpssQrmZ563S7AA01FTez4s1wShbXXGHzyEMgyZU=",
90
90
  "url": "_content/MindExecution.Shared/js/mind-map-css3d-manager.js"
91
91
  },
92
92
  {
@@ -406,44 +406,44 @@
406
406
  "url": "_framework/MimeMapping.og9ys58ylm.dll"
407
407
  },
408
408
  {
409
- "hash": "sha256-zsCKUWBWzDly1h5/vMtqVRb7PeG4lgfIZbQuJFyY1QU=",
410
- "url": "_framework/MindExecution.Core.y7ffihhajj.dll"
409
+ "hash": "sha256-9bpD6izq4bzR75iSm2e4S9uPoshwUG7pHxvskKk0mTo=",
410
+ "url": "_framework/MindExecution.Core.v3wmxuk7qp.dll"
411
411
  },
412
412
  {
413
- "hash": "sha256-V4pQTxua0lGWpdsFpo7bHr6rPFWZeofry7e9On+OJmo=",
414
- "url": "_framework/MindExecution.Kernel.l5y3qroa7p.dll"
413
+ "hash": "sha256-yKtHx9Ehc/GwTtP4a5pZ8K5B790qL7GrNsxlbIZ54Zo=",
414
+ "url": "_framework/MindExecution.Kernel.kx4xhfncsj.dll"
415
415
  },
416
416
  {
417
- "hash": "sha256-OrCIUack8nSWBBiZK65DlJ3YGM677RAA8cX/oJjhm5c=",
418
- "url": "_framework/MindExecution.Plugins.Admin.uuf238xa0h.dll"
417
+ "hash": "sha256-zRNSRurJPrU8J2jP5eOpu7KKyPtYdJqrPS/D8L2CvGY=",
418
+ "url": "_framework/MindExecution.Plugins.Admin.1zm6aw94og.dll"
419
419
  },
420
420
  {
421
- "hash": "sha256-T4c7+fDE4TQAXAoFmHnYM+tT7RSvAM7W0VinLPoD+6U=",
422
- "url": "_framework/MindExecution.Plugins.Business.nyr3v25v48.dll"
421
+ "hash": "sha256-Dt3CeEVDlPitVDi6wPH3cw6HGYWOzPVcyLPTlzeKry8=",
422
+ "url": "_framework/MindExecution.Plugins.Business.aundh2fuh7.dll"
423
423
  },
424
424
  {
425
- "hash": "sha256-N/QoILmTilvX5Zo4SCy7ENTCqMzSC6RIEQlEwtxkGPo=",
426
- "url": "_framework/MindExecution.Plugins.Concept.l9z9tx9svt.dll"
425
+ "hash": "sha256-3ZIA9yNyUVpgcu9l83PS/HxU+CMwdPhzFgIdMZRuJgw=",
426
+ "url": "_framework/MindExecution.Plugins.Concept.pp0hp35q6g.dll"
427
427
  },
428
428
  {
429
- "hash": "sha256-dapAkel5qj7fK6BiDDmvkzZL96frl8k/3yP8SDr3rMw=",
430
- "url": "_framework/MindExecution.Plugins.Directory.ju87t8h3zs.dll"
429
+ "hash": "sha256-hj7+jZS7zce5h57jwBzZUdCmVmjwQaVrzA7k/rCasFk=",
430
+ "url": "_framework/MindExecution.Plugins.Directory.askhe4ifrt.dll"
431
431
  },
432
432
  {
433
- "hash": "sha256-8IFpm/2fpsWD3syyl58LTSWSGC8PfcrsLdmmSKR1Sq0=",
434
- "url": "_framework/MindExecution.Plugins.PlanMaster.krn3jgvjpa.dll"
433
+ "hash": "sha256-wCd+pFIrUTxI5yFCZQ1FXEZhJGHo6UukdoLmmPMgOQg=",
434
+ "url": "_framework/MindExecution.Plugins.PlanMaster.4fq8s1zuht.dll"
435
435
  },
436
436
  {
437
- "hash": "sha256-02hOpWFNogHEBktxD4XUnDN/oKFJnO0g8n4bYCP0tAY=",
438
- "url": "_framework/MindExecution.Plugins.YouTube.5m53srfud6.dll"
437
+ "hash": "sha256-B+8XLMrj3cjfgNBevIDPtyuDyTjM8j5zYPKxTBIYwEI=",
438
+ "url": "_framework/MindExecution.Plugins.YouTube.1ekzvomyd2.dll"
439
439
  },
440
440
  {
441
- "hash": "sha256-FC0pE2bsyE9i7GNSXCghKULaYYZXUEdepb2VxPfcYaA=",
442
- "url": "_framework/MindExecution.Shared.ojp3psugsm.dll"
441
+ "hash": "sha256-pX4Nlp3A+zDcMt/1DiByz3mdy94yPTbONL5bNvhRKIc=",
442
+ "url": "_framework/MindExecution.Shared.ndzddktvwm.dll"
443
443
  },
444
444
  {
445
- "hash": "sha256-l4L9FFeaEkMfR5tjzxg1v/KgOuCHBkaQbxiwSHGxkNk=",
446
- "url": "_framework/MindExecution.Web.zd2eb9d4hz.dll"
445
+ "hash": "sha256-Xe/l7y1++MwnCKB/q2u31O8UyHha84nFgXZgpD+pEBU=",
446
+ "url": "_framework/MindExecution.Web.ptfprazlfv.dll"
447
447
  },
448
448
  {
449
449
  "hash": "sha256-IsZJ91/OW+fHzNqIgEc7Y072ns8z9dGritiSyvR9Wgc=",
@@ -766,7 +766,7 @@
766
766
  "url": "_framework/Websocket.Client.vapounvmnl.dll"
767
767
  },
768
768
  {
769
- "hash": "sha256-jl4mwfB/SA/7tIuyu1Qztx7K9dHprdtvvHgZSeQDYec=",
769
+ "hash": "sha256-lMTZnmctAhsMUucbhNCVu7o1rOZqIUUjDlSFE4nDlyg=",
770
770
  "url": "_framework/blazor.boot.json"
771
771
  },
772
772
  {
@@ -1,4 +1,4 @@
1
- /* Manifest version: FbVowZRL */
1
+ /* Manifest version: GIgxXFFU */
2
2
  // Hosted deployments should prefer the network over stale offline caches.
3
3
  // This service worker immediately clears old Blazor offline caches and unregisters itself.
4
4