@mindexec/cli 0.2.400 → 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.
- package/package.json +1 -1
- package/scripts/remote-registry-follower-smoke.mjs +30 -0
- package/server.js +23 -3
- package/wwwroot/_framework/{MindExecution.Core.y7ffihhajj.dll → MindExecution.Core.v3wmxuk7qp.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Kernel.l5y3qroa7p.dll → MindExecution.Kernel.kx4xhfncsj.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.Admin.uuf238xa0h.dll → MindExecution.Plugins.Admin.1zm6aw94og.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.Business.nyr3v25v48.dll → MindExecution.Plugins.Business.aundh2fuh7.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.Concept.l9z9tx9svt.dll → MindExecution.Plugins.Concept.pp0hp35q6g.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.Directory.ju87t8h3zs.dll → MindExecution.Plugins.Directory.askhe4ifrt.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.PlanMaster.krn3jgvjpa.dll → MindExecution.Plugins.PlanMaster.4fq8s1zuht.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.YouTube.5m53srfud6.dll → MindExecution.Plugins.YouTube.1ekzvomyd2.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Shared.ojp3psugsm.dll → MindExecution.Shared.ndzddktvwm.dll} +0 -0
- package/wwwroot/_framework/MindExecution.Web.ptfprazlfv.dll +0 -0
- package/wwwroot/_framework/blazor.boot.json +21 -21
- package/wwwroot/service-worker-assets.js +22 -22
- package/wwwroot/service-worker.js +1 -1
- package/wwwroot/_framework/MindExecution.Web.zd2eb9d4hz.dll +0 -0
package/package.json
CHANGED
|
@@ -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
|
|
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
|
-
...
|
|
12456
|
+
...responseResult,
|
|
12438
12457
|
agent: serializeRemoteAgentState(),
|
|
12439
|
-
hostTargetRenew
|
|
12458
|
+
hostTargetRenew,
|
|
12459
|
+
hostTargetTakeover: takeover
|
|
12440
12460
|
});
|
|
12441
12461
|
} catch (err) {
|
|
12442
12462
|
logError('remote', 'remote host target update failed.', err);
|
package/wwwroot/_framework/{MindExecution.Core.y7ffihhajj.dll → MindExecution.Core.v3wmxuk7qp.dll}
RENAMED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mainAssemblyName": "MindExecution.Web",
|
|
3
3
|
"resources": {
|
|
4
|
-
"hash": "sha256-
|
|
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.
|
|
127
|
-
"MindExecution.Kernel.
|
|
128
|
-
"MindExecution.Plugins.Admin.
|
|
129
|
-
"MindExecution.Plugins.Business.
|
|
130
|
-
"MindExecution.Plugins.Concept.
|
|
131
|
-
"MindExecution.Plugins.Directory.
|
|
132
|
-
"MindExecution.Plugins.PlanMaster.
|
|
133
|
-
"MindExecution.Plugins.YouTube.
|
|
134
|
-
"MindExecution.Shared.
|
|
135
|
-
"MindExecution.Web.
|
|
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.
|
|
282
|
-
"MindExecution.Kernel.
|
|
283
|
-
"MindExecution.Plugins.Business.
|
|
284
|
-
"MindExecution.Plugins.Concept.
|
|
285
|
-
"MindExecution.Plugins.PlanMaster.
|
|
286
|
-
"MindExecution.Shared.
|
|
287
|
-
"MindExecution.Web.
|
|
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.
|
|
291
|
-
"MindExecution.Plugins.Directory.
|
|
292
|
-
"MindExecution.Plugins.YouTube.
|
|
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": "
|
|
2
|
+
"version": "GIgxXFFU",
|
|
3
3
|
"assets": [
|
|
4
4
|
{
|
|
5
5
|
"hash": "sha256-+CSYMcqLNTsq3VnH11jgYyOCCdxvHzL74CBmo4sCmMU=",
|
|
@@ -406,44 +406,44 @@
|
|
|
406
406
|
"url": "_framework/MimeMapping.og9ys58ylm.dll"
|
|
407
407
|
},
|
|
408
408
|
{
|
|
409
|
-
"hash": "sha256-
|
|
410
|
-
"url": "_framework/MindExecution.Core.
|
|
409
|
+
"hash": "sha256-9bpD6izq4bzR75iSm2e4S9uPoshwUG7pHxvskKk0mTo=",
|
|
410
|
+
"url": "_framework/MindExecution.Core.v3wmxuk7qp.dll"
|
|
411
411
|
},
|
|
412
412
|
{
|
|
413
|
-
"hash": "sha256-
|
|
414
|
-
"url": "_framework/MindExecution.Kernel.
|
|
413
|
+
"hash": "sha256-yKtHx9Ehc/GwTtP4a5pZ8K5B790qL7GrNsxlbIZ54Zo=",
|
|
414
|
+
"url": "_framework/MindExecution.Kernel.kx4xhfncsj.dll"
|
|
415
415
|
},
|
|
416
416
|
{
|
|
417
|
-
"hash": "sha256-
|
|
418
|
-
"url": "_framework/MindExecution.Plugins.Admin.
|
|
417
|
+
"hash": "sha256-zRNSRurJPrU8J2jP5eOpu7KKyPtYdJqrPS/D8L2CvGY=",
|
|
418
|
+
"url": "_framework/MindExecution.Plugins.Admin.1zm6aw94og.dll"
|
|
419
419
|
},
|
|
420
420
|
{
|
|
421
|
-
"hash": "sha256-
|
|
422
|
-
"url": "_framework/MindExecution.Plugins.Business.
|
|
421
|
+
"hash": "sha256-Dt3CeEVDlPitVDi6wPH3cw6HGYWOzPVcyLPTlzeKry8=",
|
|
422
|
+
"url": "_framework/MindExecution.Plugins.Business.aundh2fuh7.dll"
|
|
423
423
|
},
|
|
424
424
|
{
|
|
425
|
-
"hash": "sha256-
|
|
426
|
-
"url": "_framework/MindExecution.Plugins.Concept.
|
|
425
|
+
"hash": "sha256-3ZIA9yNyUVpgcu9l83PS/HxU+CMwdPhzFgIdMZRuJgw=",
|
|
426
|
+
"url": "_framework/MindExecution.Plugins.Concept.pp0hp35q6g.dll"
|
|
427
427
|
},
|
|
428
428
|
{
|
|
429
|
-
"hash": "sha256-
|
|
430
|
-
"url": "_framework/MindExecution.Plugins.Directory.
|
|
429
|
+
"hash": "sha256-hj7+jZS7zce5h57jwBzZUdCmVmjwQaVrzA7k/rCasFk=",
|
|
430
|
+
"url": "_framework/MindExecution.Plugins.Directory.askhe4ifrt.dll"
|
|
431
431
|
},
|
|
432
432
|
{
|
|
433
|
-
"hash": "sha256-
|
|
434
|
-
"url": "_framework/MindExecution.Plugins.PlanMaster.
|
|
433
|
+
"hash": "sha256-wCd+pFIrUTxI5yFCZQ1FXEZhJGHo6UukdoLmmPMgOQg=",
|
|
434
|
+
"url": "_framework/MindExecution.Plugins.PlanMaster.4fq8s1zuht.dll"
|
|
435
435
|
},
|
|
436
436
|
{
|
|
437
|
-
"hash": "sha256-
|
|
438
|
-
"url": "_framework/MindExecution.Plugins.YouTube.
|
|
437
|
+
"hash": "sha256-B+8XLMrj3cjfgNBevIDPtyuDyTjM8j5zYPKxTBIYwEI=",
|
|
438
|
+
"url": "_framework/MindExecution.Plugins.YouTube.1ekzvomyd2.dll"
|
|
439
439
|
},
|
|
440
440
|
{
|
|
441
|
-
"hash": "sha256-
|
|
442
|
-
"url": "_framework/MindExecution.Shared.
|
|
441
|
+
"hash": "sha256-pX4Nlp3A+zDcMt/1DiByz3mdy94yPTbONL5bNvhRKIc=",
|
|
442
|
+
"url": "_framework/MindExecution.Shared.ndzddktvwm.dll"
|
|
443
443
|
},
|
|
444
444
|
{
|
|
445
|
-
"hash": "sha256-
|
|
446
|
-
"url": "_framework/MindExecution.Web.
|
|
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-
|
|
769
|
+
"hash": "sha256-lMTZnmctAhsMUucbhNCVu7o1rOZqIUUjDlSFE4nDlyg=",
|
|
770
770
|
"url": "_framework/blazor.boot.json"
|
|
771
771
|
},
|
|
772
772
|
{
|
|
Binary file
|