chainlesschain 0.152.0 → 0.156.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/README.md +52 -3
- package/package.json +1 -1
- package/src/commands/a2a.js +201 -0
- package/src/commands/agent.js +1250 -0
- package/src/commands/chat.js +605 -0
- package/src/commands/cli-anything.js +426 -0
- package/src/commands/compliance.js +412 -0
- package/src/commands/config.js +213 -0
- package/src/commands/cowork.js +1463 -0
- package/src/commands/crosschain.js +203 -0
- package/src/commands/dao.js +203 -0
- package/src/commands/economy.js +199 -0
- package/src/commands/encrypt.js +201 -0
- package/src/commands/evolution.js +199 -0
- package/src/commands/evomap.js +625 -0
- package/src/commands/hmemory.js +203 -0
- package/src/commands/inference.js +207 -0
- package/src/commands/kg.js +195 -0
- package/src/commands/llm.js +209 -0
- package/src/commands/memory.js +203 -0
- package/src/commands/orchestrate.js +406 -0
- package/src/commands/pipeline.js +199 -0
- package/src/commands/planmode.js +426 -0
- package/src/commands/plugin.js +209 -0
- package/src/commands/services.js +207 -0
- package/src/commands/setup.js +205 -0
- package/src/commands/skill.js +207 -0
- package/src/commands/start.js +209 -0
- package/src/commands/stream.js +213 -0
- package/src/commands/ui.js +225 -0
- package/src/commands/workflow.js +209 -0
- package/src/index.js +112 -0
- package/src/lib/a2a-protocol.js +332 -0
- package/src/lib/agent-coordinator.js +334 -0
- package/src/lib/agent-economy.js +334 -0
- package/src/lib/agent-router.js +333 -0
- package/src/lib/autonomous-agent.js +332 -0
- package/src/lib/chat-core.js +335 -0
- package/src/lib/cli-anything-bridge.js +341 -0
- package/src/lib/cli-context-engineering.js +351 -0
- package/src/lib/compliance-manager.js +334 -0
- package/src/lib/cowork-adapter.js +336 -0
- package/src/lib/cowork-evomap-adapter.js +341 -0
- package/src/lib/cowork-mcp-tools.js +341 -0
- package/src/lib/cowork-observe-html.js +341 -0
- package/src/lib/cowork-observe.js +341 -0
- package/src/lib/cowork-task-templates.js +342 -1
- package/src/lib/cowork-template-marketplace.js +340 -0
- package/src/lib/cross-chain.js +339 -0
- package/src/lib/crypto-manager.js +334 -0
- package/src/lib/dao-governance.js +339 -0
- package/src/lib/downloader.js +334 -0
- package/src/lib/evolution-system.js +334 -0
- package/src/lib/evomap-client.js +342 -0
- package/src/lib/evomap-federation.js +338 -0
- package/src/lib/evomap-manager.js +330 -0
- package/src/lib/execution-backend.js +330 -0
- package/src/lib/hashline.js +338 -0
- package/src/lib/hierarchical-memory.js +334 -0
- package/src/lib/inference-network.js +341 -0
- package/src/lib/interaction-adapter.js +330 -0
- package/src/lib/interactive-planner.js +354 -0
- package/src/lib/knowledge-graph.js +331 -0
- package/src/lib/pipeline-orchestrator.js +332 -0
- package/src/lib/plan-mode.js +336 -0
- package/src/lib/plugin-autodiscovery.js +334 -0
- package/src/lib/process-manager.js +336 -0
- package/src/lib/provider-options.js +346 -0
- package/src/lib/provider-stream.js +348 -0
- package/src/lib/service-manager.js +337 -0
- package/src/lib/session-core-singletons.js +341 -0
- package/src/lib/skill-mcp.js +336 -0
- package/src/lib/stix-parser.js +346 -0
- package/src/lib/sub-agent-context.js +343 -0
- package/src/lib/sub-agent-profiles.js +335 -0
- package/src/lib/sub-agent-registry.js +336 -0
- package/src/lib/todo-manager.js +336 -0
- package/src/lib/web-ui-server.js +348 -0
- package/src/lib/workflow-expr.js +346 -0
- package/src/lib/ws-chat-handler.js +337 -0
package/src/commands/evomap.js
CHANGED
|
@@ -1371,3 +1371,628 @@ export function registerEvgovV2Commands(program) {
|
|
|
1371
1371
|
);
|
|
1372
1372
|
});
|
|
1373
1373
|
}
|
|
1374
|
+
|
|
1375
|
+
// === Iter25 V2 governance overlay ===
|
|
1376
|
+
export function registerEvfedgovV2Commands(program) {
|
|
1377
|
+
const parent = program.commands.find((c) => c.name() === "evomap");
|
|
1378
|
+
if (!parent) return;
|
|
1379
|
+
const L = async () => await import("../lib/evomap-federation.js");
|
|
1380
|
+
parent
|
|
1381
|
+
.command("evfedgov-enums-v2")
|
|
1382
|
+
.description("Show V2 enums")
|
|
1383
|
+
.action(async () => {
|
|
1384
|
+
const m = await L();
|
|
1385
|
+
console.log(
|
|
1386
|
+
JSON.stringify(
|
|
1387
|
+
{
|
|
1388
|
+
profileMaturity: m.EVFEDGOV_PROFILE_MATURITY_V2,
|
|
1389
|
+
syncLifecycle: m.EVFEDGOV_SYNC_LIFECYCLE_V2,
|
|
1390
|
+
},
|
|
1391
|
+
null,
|
|
1392
|
+
2,
|
|
1393
|
+
),
|
|
1394
|
+
);
|
|
1395
|
+
});
|
|
1396
|
+
parent
|
|
1397
|
+
.command("evfedgov-config-v2")
|
|
1398
|
+
.description("Show V2 config")
|
|
1399
|
+
.action(async () => {
|
|
1400
|
+
const m = await L();
|
|
1401
|
+
console.log(
|
|
1402
|
+
JSON.stringify(
|
|
1403
|
+
{
|
|
1404
|
+
maxActive: m.getMaxActiveEvfedgovProfilesPerOwnerV2(),
|
|
1405
|
+
maxPending: m.getMaxPendingEvfedgovSyncsPerProfileV2(),
|
|
1406
|
+
idleMs: m.getEvfedgovProfileIdleMsV2(),
|
|
1407
|
+
stuckMs: m.getEvfedgovSyncStuckMsV2(),
|
|
1408
|
+
},
|
|
1409
|
+
null,
|
|
1410
|
+
2,
|
|
1411
|
+
),
|
|
1412
|
+
);
|
|
1413
|
+
});
|
|
1414
|
+
parent
|
|
1415
|
+
.command("evfedgov-set-max-active-v2 <n>")
|
|
1416
|
+
.description("Set max active")
|
|
1417
|
+
.action(async (n) => {
|
|
1418
|
+
(await L()).setMaxActiveEvfedgovProfilesPerOwnerV2(Number(n));
|
|
1419
|
+
console.log("ok");
|
|
1420
|
+
});
|
|
1421
|
+
parent
|
|
1422
|
+
.command("evfedgov-set-max-pending-v2 <n>")
|
|
1423
|
+
.description("Set max pending")
|
|
1424
|
+
.action(async (n) => {
|
|
1425
|
+
(await L()).setMaxPendingEvfedgovSyncsPerProfileV2(Number(n));
|
|
1426
|
+
console.log("ok");
|
|
1427
|
+
});
|
|
1428
|
+
parent
|
|
1429
|
+
.command("evfedgov-set-idle-ms-v2 <n>")
|
|
1430
|
+
.description("Set idle threshold ms")
|
|
1431
|
+
.action(async (n) => {
|
|
1432
|
+
(await L()).setEvfedgovProfileIdleMsV2(Number(n));
|
|
1433
|
+
console.log("ok");
|
|
1434
|
+
});
|
|
1435
|
+
parent
|
|
1436
|
+
.command("evfedgov-set-stuck-ms-v2 <n>")
|
|
1437
|
+
.description("Set stuck threshold ms")
|
|
1438
|
+
.action(async (n) => {
|
|
1439
|
+
(await L()).setEvfedgovSyncStuckMsV2(Number(n));
|
|
1440
|
+
console.log("ok");
|
|
1441
|
+
});
|
|
1442
|
+
parent
|
|
1443
|
+
.command("evfedgov-register-v2 <id> <owner>")
|
|
1444
|
+
.description("Register V2 profile")
|
|
1445
|
+
.option("--hub <v>", "hub")
|
|
1446
|
+
.action(async (id, owner, o) => {
|
|
1447
|
+
const m = await L();
|
|
1448
|
+
console.log(
|
|
1449
|
+
JSON.stringify(
|
|
1450
|
+
m.registerEvfedgovProfileV2({ id, owner, hub: o.hub }),
|
|
1451
|
+
null,
|
|
1452
|
+
2,
|
|
1453
|
+
),
|
|
1454
|
+
);
|
|
1455
|
+
});
|
|
1456
|
+
parent
|
|
1457
|
+
.command("evfedgov-activate-v2 <id>")
|
|
1458
|
+
.description("Activate profile")
|
|
1459
|
+
.action(async (id) => {
|
|
1460
|
+
console.log(
|
|
1461
|
+
JSON.stringify((await L()).activateEvfedgovProfileV2(id), null, 2),
|
|
1462
|
+
);
|
|
1463
|
+
});
|
|
1464
|
+
parent
|
|
1465
|
+
.command("evfedgov-stale-v2 <id>")
|
|
1466
|
+
.description("Stale profile")
|
|
1467
|
+
.action(async (id) => {
|
|
1468
|
+
console.log(
|
|
1469
|
+
JSON.stringify((await L()).staleEvfedgovProfileV2(id), null, 2),
|
|
1470
|
+
);
|
|
1471
|
+
});
|
|
1472
|
+
parent
|
|
1473
|
+
.command("evfedgov-archive-v2 <id>")
|
|
1474
|
+
.description("Archive profile")
|
|
1475
|
+
.action(async (id) => {
|
|
1476
|
+
console.log(
|
|
1477
|
+
JSON.stringify((await L()).archiveEvfedgovProfileV2(id), null, 2),
|
|
1478
|
+
);
|
|
1479
|
+
});
|
|
1480
|
+
parent
|
|
1481
|
+
.command("evfedgov-touch-v2 <id>")
|
|
1482
|
+
.description("Touch profile")
|
|
1483
|
+
.action(async (id) => {
|
|
1484
|
+
console.log(
|
|
1485
|
+
JSON.stringify((await L()).touchEvfedgovProfileV2(id), null, 2),
|
|
1486
|
+
);
|
|
1487
|
+
});
|
|
1488
|
+
parent
|
|
1489
|
+
.command("evfedgov-get-v2 <id>")
|
|
1490
|
+
.description("Get profile")
|
|
1491
|
+
.action(async (id) => {
|
|
1492
|
+
console.log(
|
|
1493
|
+
JSON.stringify((await L()).getEvfedgovProfileV2(id), null, 2),
|
|
1494
|
+
);
|
|
1495
|
+
});
|
|
1496
|
+
parent
|
|
1497
|
+
.command("evfedgov-list-v2")
|
|
1498
|
+
.description("List profiles")
|
|
1499
|
+
.action(async () => {
|
|
1500
|
+
console.log(
|
|
1501
|
+
JSON.stringify((await L()).listEvfedgovProfilesV2(), null, 2),
|
|
1502
|
+
);
|
|
1503
|
+
});
|
|
1504
|
+
parent
|
|
1505
|
+
.command("evfedgov-create-sync-v2 <id> <profileId>")
|
|
1506
|
+
.description("Create sync")
|
|
1507
|
+
.option("--geneId <v>", "geneId")
|
|
1508
|
+
.action(async (id, profileId, o) => {
|
|
1509
|
+
const m = await L();
|
|
1510
|
+
console.log(
|
|
1511
|
+
JSON.stringify(
|
|
1512
|
+
m.createEvfedgovSyncV2({ id, profileId, geneId: o.geneId }),
|
|
1513
|
+
null,
|
|
1514
|
+
2,
|
|
1515
|
+
),
|
|
1516
|
+
);
|
|
1517
|
+
});
|
|
1518
|
+
parent
|
|
1519
|
+
.command("evfedgov-syncing-sync-v2 <id>")
|
|
1520
|
+
.description("Mark sync as syncing")
|
|
1521
|
+
.action(async (id) => {
|
|
1522
|
+
console.log(
|
|
1523
|
+
JSON.stringify((await L()).syncingEvfedgovSyncV2(id), null, 2),
|
|
1524
|
+
);
|
|
1525
|
+
});
|
|
1526
|
+
parent
|
|
1527
|
+
.command("evfedgov-complete-sync-v2 <id>")
|
|
1528
|
+
.description("Complete sync")
|
|
1529
|
+
.action(async (id) => {
|
|
1530
|
+
console.log(
|
|
1531
|
+
JSON.stringify((await L()).completeSyncEvfedgovV2(id), null, 2),
|
|
1532
|
+
);
|
|
1533
|
+
});
|
|
1534
|
+
parent
|
|
1535
|
+
.command("evfedgov-fail-sync-v2 <id> [reason]")
|
|
1536
|
+
.description("Fail sync")
|
|
1537
|
+
.action(async (id, reason) => {
|
|
1538
|
+
console.log(
|
|
1539
|
+
JSON.stringify((await L()).failEvfedgovSyncV2(id, reason), null, 2),
|
|
1540
|
+
);
|
|
1541
|
+
});
|
|
1542
|
+
parent
|
|
1543
|
+
.command("evfedgov-cancel-sync-v2 <id> [reason]")
|
|
1544
|
+
.description("Cancel sync")
|
|
1545
|
+
.action(async (id, reason) => {
|
|
1546
|
+
console.log(
|
|
1547
|
+
JSON.stringify((await L()).cancelEvfedgovSyncV2(id, reason), null, 2),
|
|
1548
|
+
);
|
|
1549
|
+
});
|
|
1550
|
+
parent
|
|
1551
|
+
.command("evfedgov-get-sync-v2 <id>")
|
|
1552
|
+
.description("Get sync")
|
|
1553
|
+
.action(async (id) => {
|
|
1554
|
+
console.log(JSON.stringify((await L()).getEvfedgovSyncV2(id), null, 2));
|
|
1555
|
+
});
|
|
1556
|
+
parent
|
|
1557
|
+
.command("evfedgov-list-syncs-v2")
|
|
1558
|
+
.description("List syncs")
|
|
1559
|
+
.action(async () => {
|
|
1560
|
+
console.log(JSON.stringify((await L()).listEvfedgovSyncsV2(), null, 2));
|
|
1561
|
+
});
|
|
1562
|
+
parent
|
|
1563
|
+
.command("evfedgov-auto-stale-idle-v2")
|
|
1564
|
+
.description("Auto-stale idle")
|
|
1565
|
+
.action(async () => {
|
|
1566
|
+
console.log(
|
|
1567
|
+
JSON.stringify((await L()).autoStaleIdleEvfedgovProfilesV2(), null, 2),
|
|
1568
|
+
);
|
|
1569
|
+
});
|
|
1570
|
+
parent
|
|
1571
|
+
.command("evfedgov-auto-fail-stuck-v2")
|
|
1572
|
+
.description("Auto-fail stuck syncs")
|
|
1573
|
+
.action(async () => {
|
|
1574
|
+
console.log(
|
|
1575
|
+
JSON.stringify((await L()).autoFailStuckEvfedgovSyncsV2(), null, 2),
|
|
1576
|
+
);
|
|
1577
|
+
});
|
|
1578
|
+
parent
|
|
1579
|
+
.command("evfedgov-gov-stats-v2")
|
|
1580
|
+
.description("V2 gov stats")
|
|
1581
|
+
.action(async () => {
|
|
1582
|
+
console.log(
|
|
1583
|
+
JSON.stringify((await L()).getEvomapFederationGovStatsV2(), null, 2),
|
|
1584
|
+
);
|
|
1585
|
+
});
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
// === Iter27 V2 governance overlay ===
|
|
1589
|
+
export function registerEvcligovV2Commands(program) {
|
|
1590
|
+
const parent = program.commands.find((c) => c.name() === "evomap");
|
|
1591
|
+
if (!parent) return;
|
|
1592
|
+
const L = async () => await import("../lib/evomap-client.js");
|
|
1593
|
+
parent
|
|
1594
|
+
.command("evcligov-enums-v2")
|
|
1595
|
+
.description("Show V2 enums")
|
|
1596
|
+
.action(async () => {
|
|
1597
|
+
const m = await L();
|
|
1598
|
+
console.log(
|
|
1599
|
+
JSON.stringify(
|
|
1600
|
+
{
|
|
1601
|
+
profileMaturity: m.EVCLIGOV_PROFILE_MATURITY_V2,
|
|
1602
|
+
rpcLifecycle: m.EVCLIGOV_RPC_LIFECYCLE_V2,
|
|
1603
|
+
},
|
|
1604
|
+
null,
|
|
1605
|
+
2,
|
|
1606
|
+
),
|
|
1607
|
+
);
|
|
1608
|
+
});
|
|
1609
|
+
parent
|
|
1610
|
+
.command("evcligov-config-v2")
|
|
1611
|
+
.description("Show V2 config")
|
|
1612
|
+
.action(async () => {
|
|
1613
|
+
const m = await L();
|
|
1614
|
+
console.log(
|
|
1615
|
+
JSON.stringify(
|
|
1616
|
+
{
|
|
1617
|
+
maxActive: m.getMaxActiveEvcligovProfilesPerOwnerV2(),
|
|
1618
|
+
maxPending: m.getMaxPendingEvcligovRpcsPerProfileV2(),
|
|
1619
|
+
idleMs: m.getEvcligovProfileIdleMsV2(),
|
|
1620
|
+
stuckMs: m.getEvcligovRpcStuckMsV2(),
|
|
1621
|
+
},
|
|
1622
|
+
null,
|
|
1623
|
+
2,
|
|
1624
|
+
),
|
|
1625
|
+
);
|
|
1626
|
+
});
|
|
1627
|
+
parent
|
|
1628
|
+
.command("evcligov-set-max-active-v2 <n>")
|
|
1629
|
+
.description("Set max active")
|
|
1630
|
+
.action(async (n) => {
|
|
1631
|
+
(await L()).setMaxActiveEvcligovProfilesPerOwnerV2(Number(n));
|
|
1632
|
+
console.log("ok");
|
|
1633
|
+
});
|
|
1634
|
+
parent
|
|
1635
|
+
.command("evcligov-set-max-pending-v2 <n>")
|
|
1636
|
+
.description("Set max pending")
|
|
1637
|
+
.action(async (n) => {
|
|
1638
|
+
(await L()).setMaxPendingEvcligovRpcsPerProfileV2(Number(n));
|
|
1639
|
+
console.log("ok");
|
|
1640
|
+
});
|
|
1641
|
+
parent
|
|
1642
|
+
.command("evcligov-set-idle-ms-v2 <n>")
|
|
1643
|
+
.description("Set idle threshold ms")
|
|
1644
|
+
.action(async (n) => {
|
|
1645
|
+
(await L()).setEvcligovProfileIdleMsV2(Number(n));
|
|
1646
|
+
console.log("ok");
|
|
1647
|
+
});
|
|
1648
|
+
parent
|
|
1649
|
+
.command("evcligov-set-stuck-ms-v2 <n>")
|
|
1650
|
+
.description("Set stuck threshold ms")
|
|
1651
|
+
.action(async (n) => {
|
|
1652
|
+
(await L()).setEvcligovRpcStuckMsV2(Number(n));
|
|
1653
|
+
console.log("ok");
|
|
1654
|
+
});
|
|
1655
|
+
parent
|
|
1656
|
+
.command("evcligov-register-v2 <id> <owner>")
|
|
1657
|
+
.description("Register V2 profile")
|
|
1658
|
+
.option("--endpoint <v>", "endpoint")
|
|
1659
|
+
.action(async (id, owner, o) => {
|
|
1660
|
+
const m = await L();
|
|
1661
|
+
console.log(
|
|
1662
|
+
JSON.stringify(
|
|
1663
|
+
m.registerEvcligovProfileV2({ id, owner, endpoint: o.endpoint }),
|
|
1664
|
+
null,
|
|
1665
|
+
2,
|
|
1666
|
+
),
|
|
1667
|
+
);
|
|
1668
|
+
});
|
|
1669
|
+
parent
|
|
1670
|
+
.command("evcligov-activate-v2 <id>")
|
|
1671
|
+
.description("Activate profile")
|
|
1672
|
+
.action(async (id) => {
|
|
1673
|
+
console.log(
|
|
1674
|
+
JSON.stringify((await L()).activateEvcligovProfileV2(id), null, 2),
|
|
1675
|
+
);
|
|
1676
|
+
});
|
|
1677
|
+
parent
|
|
1678
|
+
.command("evcligov-stale-v2 <id>")
|
|
1679
|
+
.description("Stale profile")
|
|
1680
|
+
.action(async (id) => {
|
|
1681
|
+
console.log(
|
|
1682
|
+
JSON.stringify((await L()).staleEvcligovProfileV2(id), null, 2),
|
|
1683
|
+
);
|
|
1684
|
+
});
|
|
1685
|
+
parent
|
|
1686
|
+
.command("evcligov-archive-v2 <id>")
|
|
1687
|
+
.description("Archive profile")
|
|
1688
|
+
.action(async (id) => {
|
|
1689
|
+
console.log(
|
|
1690
|
+
JSON.stringify((await L()).archiveEvcligovProfileV2(id), null, 2),
|
|
1691
|
+
);
|
|
1692
|
+
});
|
|
1693
|
+
parent
|
|
1694
|
+
.command("evcligov-touch-v2 <id>")
|
|
1695
|
+
.description("Touch profile")
|
|
1696
|
+
.action(async (id) => {
|
|
1697
|
+
console.log(
|
|
1698
|
+
JSON.stringify((await L()).touchEvcligovProfileV2(id), null, 2),
|
|
1699
|
+
);
|
|
1700
|
+
});
|
|
1701
|
+
parent
|
|
1702
|
+
.command("evcligov-get-v2 <id>")
|
|
1703
|
+
.description("Get profile")
|
|
1704
|
+
.action(async (id) => {
|
|
1705
|
+
console.log(
|
|
1706
|
+
JSON.stringify((await L()).getEvcligovProfileV2(id), null, 2),
|
|
1707
|
+
);
|
|
1708
|
+
});
|
|
1709
|
+
parent
|
|
1710
|
+
.command("evcligov-list-v2")
|
|
1711
|
+
.description("List profiles")
|
|
1712
|
+
.action(async () => {
|
|
1713
|
+
console.log(
|
|
1714
|
+
JSON.stringify((await L()).listEvcligovProfilesV2(), null, 2),
|
|
1715
|
+
);
|
|
1716
|
+
});
|
|
1717
|
+
parent
|
|
1718
|
+
.command("evcligov-create-rpc-v2 <id> <profileId>")
|
|
1719
|
+
.description("Create rpc")
|
|
1720
|
+
.option("--method <v>", "method")
|
|
1721
|
+
.action(async (id, profileId, o) => {
|
|
1722
|
+
const m = await L();
|
|
1723
|
+
console.log(
|
|
1724
|
+
JSON.stringify(
|
|
1725
|
+
m.createEvcligovRpcV2({ id, profileId, method: o.method }),
|
|
1726
|
+
null,
|
|
1727
|
+
2,
|
|
1728
|
+
),
|
|
1729
|
+
);
|
|
1730
|
+
});
|
|
1731
|
+
parent
|
|
1732
|
+
.command("evcligov-calling-rpc-v2 <id>")
|
|
1733
|
+
.description("Mark rpc as calling")
|
|
1734
|
+
.action(async (id) => {
|
|
1735
|
+
console.log(
|
|
1736
|
+
JSON.stringify((await L()).callingEvcligovRpcV2(id), null, 2),
|
|
1737
|
+
);
|
|
1738
|
+
});
|
|
1739
|
+
parent
|
|
1740
|
+
.command("evcligov-complete-rpc-v2 <id>")
|
|
1741
|
+
.description("Complete rpc")
|
|
1742
|
+
.action(async (id) => {
|
|
1743
|
+
console.log(
|
|
1744
|
+
JSON.stringify((await L()).completeRpcEvcligovV2(id), null, 2),
|
|
1745
|
+
);
|
|
1746
|
+
});
|
|
1747
|
+
parent
|
|
1748
|
+
.command("evcligov-fail-rpc-v2 <id> [reason]")
|
|
1749
|
+
.description("Fail rpc")
|
|
1750
|
+
.action(async (id, reason) => {
|
|
1751
|
+
console.log(
|
|
1752
|
+
JSON.stringify((await L()).failEvcligovRpcV2(id, reason), null, 2),
|
|
1753
|
+
);
|
|
1754
|
+
});
|
|
1755
|
+
parent
|
|
1756
|
+
.command("evcligov-cancel-rpc-v2 <id> [reason]")
|
|
1757
|
+
.description("Cancel rpc")
|
|
1758
|
+
.action(async (id, reason) => {
|
|
1759
|
+
console.log(
|
|
1760
|
+
JSON.stringify((await L()).cancelEvcligovRpcV2(id, reason), null, 2),
|
|
1761
|
+
);
|
|
1762
|
+
});
|
|
1763
|
+
parent
|
|
1764
|
+
.command("evcligov-get-rpc-v2 <id>")
|
|
1765
|
+
.description("Get rpc")
|
|
1766
|
+
.action(async (id) => {
|
|
1767
|
+
console.log(JSON.stringify((await L()).getEvcligovRpcV2(id), null, 2));
|
|
1768
|
+
});
|
|
1769
|
+
parent
|
|
1770
|
+
.command("evcligov-list-rpcs-v2")
|
|
1771
|
+
.description("List rpcs")
|
|
1772
|
+
.action(async () => {
|
|
1773
|
+
console.log(JSON.stringify((await L()).listEvcligovRpcsV2(), null, 2));
|
|
1774
|
+
});
|
|
1775
|
+
parent
|
|
1776
|
+
.command("evcligov-auto-stale-idle-v2")
|
|
1777
|
+
.description("Auto-stale idle")
|
|
1778
|
+
.action(async () => {
|
|
1779
|
+
console.log(
|
|
1780
|
+
JSON.stringify((await L()).autoStaleIdleEvcligovProfilesV2(), null, 2),
|
|
1781
|
+
);
|
|
1782
|
+
});
|
|
1783
|
+
parent
|
|
1784
|
+
.command("evcligov-auto-fail-stuck-v2")
|
|
1785
|
+
.description("Auto-fail stuck rpcs")
|
|
1786
|
+
.action(async () => {
|
|
1787
|
+
console.log(
|
|
1788
|
+
JSON.stringify((await L()).autoFailStuckEvcligovRpcsV2(), null, 2),
|
|
1789
|
+
);
|
|
1790
|
+
});
|
|
1791
|
+
parent
|
|
1792
|
+
.command("evcligov-gov-stats-v2")
|
|
1793
|
+
.description("V2 gov stats")
|
|
1794
|
+
.action(async () => {
|
|
1795
|
+
console.log(
|
|
1796
|
+
JSON.stringify((await L()).getEvomapClientGovStatsV2(), null, 2),
|
|
1797
|
+
);
|
|
1798
|
+
});
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
// === Iter28 V2 governance overlay: Emgrgov ===
|
|
1802
|
+
export function registerEmgrV2Commands(program) {
|
|
1803
|
+
const parent = program.commands.find((c) => c.name() === "evomap");
|
|
1804
|
+
if (!parent) return;
|
|
1805
|
+
const L = async () => await import("../lib/evomap-manager.js");
|
|
1806
|
+
parent
|
|
1807
|
+
.command("emgrgov-enums-v2")
|
|
1808
|
+
.description("Show V2 enums")
|
|
1809
|
+
.action(async () => {
|
|
1810
|
+
const m = await L();
|
|
1811
|
+
console.log(
|
|
1812
|
+
JSON.stringify(
|
|
1813
|
+
{
|
|
1814
|
+
profileMaturity: m.EMGRGOV_PROFILE_MATURITY_V2,
|
|
1815
|
+
opLifecycle: m.EMGRGOV_OP_LIFECYCLE_V2,
|
|
1816
|
+
},
|
|
1817
|
+
null,
|
|
1818
|
+
2,
|
|
1819
|
+
),
|
|
1820
|
+
);
|
|
1821
|
+
});
|
|
1822
|
+
parent
|
|
1823
|
+
.command("emgrgov-config-v2")
|
|
1824
|
+
.description("Show V2 config")
|
|
1825
|
+
.action(async () => {
|
|
1826
|
+
const m = await L();
|
|
1827
|
+
console.log(
|
|
1828
|
+
JSON.stringify(
|
|
1829
|
+
{
|
|
1830
|
+
maxActive: m.getMaxActiveEmgrProfilesPerOwnerV2(),
|
|
1831
|
+
maxPending: m.getMaxPendingEmgrOpsPerProfileV2(),
|
|
1832
|
+
idleMs: m.getEmgrProfileIdleMsV2(),
|
|
1833
|
+
stuckMs: m.getEmgrOpStuckMsV2(),
|
|
1834
|
+
},
|
|
1835
|
+
null,
|
|
1836
|
+
2,
|
|
1837
|
+
),
|
|
1838
|
+
);
|
|
1839
|
+
});
|
|
1840
|
+
parent
|
|
1841
|
+
.command("emgrgov-set-max-active-v2 <n>")
|
|
1842
|
+
.description("Set max active")
|
|
1843
|
+
.action(async (n) => {
|
|
1844
|
+
(await L()).setMaxActiveEmgrProfilesPerOwnerV2(Number(n));
|
|
1845
|
+
console.log("ok");
|
|
1846
|
+
});
|
|
1847
|
+
parent
|
|
1848
|
+
.command("emgrgov-set-max-pending-v2 <n>")
|
|
1849
|
+
.description("Set max pending")
|
|
1850
|
+
.action(async (n) => {
|
|
1851
|
+
(await L()).setMaxPendingEmgrOpsPerProfileV2(Number(n));
|
|
1852
|
+
console.log("ok");
|
|
1853
|
+
});
|
|
1854
|
+
parent
|
|
1855
|
+
.command("emgrgov-set-idle-ms-v2 <n>")
|
|
1856
|
+
.description("Set idle threshold ms")
|
|
1857
|
+
.action(async (n) => {
|
|
1858
|
+
(await L()).setEmgrProfileIdleMsV2(Number(n));
|
|
1859
|
+
console.log("ok");
|
|
1860
|
+
});
|
|
1861
|
+
parent
|
|
1862
|
+
.command("emgrgov-set-stuck-ms-v2 <n>")
|
|
1863
|
+
.description("Set stuck threshold ms")
|
|
1864
|
+
.action(async (n) => {
|
|
1865
|
+
(await L()).setEmgrOpStuckMsV2(Number(n));
|
|
1866
|
+
console.log("ok");
|
|
1867
|
+
});
|
|
1868
|
+
parent
|
|
1869
|
+
.command("emgrgov-register-v2 <id> <owner>")
|
|
1870
|
+
.description("Register V2 profile")
|
|
1871
|
+
.option("--map <v>", "map")
|
|
1872
|
+
.action(async (id, owner, o) => {
|
|
1873
|
+
const m = await L();
|
|
1874
|
+
console.log(
|
|
1875
|
+
JSON.stringify(
|
|
1876
|
+
m.registerEmgrProfileV2({ id, owner, map: o.map }),
|
|
1877
|
+
null,
|
|
1878
|
+
2,
|
|
1879
|
+
),
|
|
1880
|
+
);
|
|
1881
|
+
});
|
|
1882
|
+
parent
|
|
1883
|
+
.command("emgrgov-activate-v2 <id>")
|
|
1884
|
+
.description("Activate profile")
|
|
1885
|
+
.action(async (id) => {
|
|
1886
|
+
console.log(
|
|
1887
|
+
JSON.stringify((await L()).activateEmgrProfileV2(id), null, 2),
|
|
1888
|
+
);
|
|
1889
|
+
});
|
|
1890
|
+
parent
|
|
1891
|
+
.command("emgrgov-stale-v2 <id>")
|
|
1892
|
+
.description("Stale profile")
|
|
1893
|
+
.action(async (id) => {
|
|
1894
|
+
console.log(JSON.stringify((await L()).staleEmgrProfileV2(id), null, 2));
|
|
1895
|
+
});
|
|
1896
|
+
parent
|
|
1897
|
+
.command("emgrgov-archive-v2 <id>")
|
|
1898
|
+
.description("Archive profile")
|
|
1899
|
+
.action(async (id) => {
|
|
1900
|
+
console.log(
|
|
1901
|
+
JSON.stringify((await L()).archiveEmgrProfileV2(id), null, 2),
|
|
1902
|
+
);
|
|
1903
|
+
});
|
|
1904
|
+
parent
|
|
1905
|
+
.command("emgrgov-touch-v2 <id>")
|
|
1906
|
+
.description("Touch profile")
|
|
1907
|
+
.action(async (id) => {
|
|
1908
|
+
console.log(JSON.stringify((await L()).touchEmgrProfileV2(id), null, 2));
|
|
1909
|
+
});
|
|
1910
|
+
parent
|
|
1911
|
+
.command("emgrgov-get-v2 <id>")
|
|
1912
|
+
.description("Get profile")
|
|
1913
|
+
.action(async (id) => {
|
|
1914
|
+
console.log(JSON.stringify((await L()).getEmgrProfileV2(id), null, 2));
|
|
1915
|
+
});
|
|
1916
|
+
parent
|
|
1917
|
+
.command("emgrgov-list-v2")
|
|
1918
|
+
.description("List profiles")
|
|
1919
|
+
.action(async () => {
|
|
1920
|
+
console.log(JSON.stringify((await L()).listEmgrProfilesV2(), null, 2));
|
|
1921
|
+
});
|
|
1922
|
+
parent
|
|
1923
|
+
.command("emgrgov-create-op-v2 <id> <profileId>")
|
|
1924
|
+
.description("Create op")
|
|
1925
|
+
.option("--opId <v>", "opId")
|
|
1926
|
+
.action(async (id, profileId, o) => {
|
|
1927
|
+
const m = await L();
|
|
1928
|
+
console.log(
|
|
1929
|
+
JSON.stringify(
|
|
1930
|
+
m.createEmgrOpV2({ id, profileId, opId: o.opId }),
|
|
1931
|
+
null,
|
|
1932
|
+
2,
|
|
1933
|
+
),
|
|
1934
|
+
);
|
|
1935
|
+
});
|
|
1936
|
+
parent
|
|
1937
|
+
.command("emgrgov-operating-op-v2 <id>")
|
|
1938
|
+
.description("Mark op as operating")
|
|
1939
|
+
.action(async (id) => {
|
|
1940
|
+
console.log(JSON.stringify((await L()).operatingEmgrOpV2(id), null, 2));
|
|
1941
|
+
});
|
|
1942
|
+
parent
|
|
1943
|
+
.command("emgrgov-complete-op-v2 <id>")
|
|
1944
|
+
.description("Complete op")
|
|
1945
|
+
.action(async (id) => {
|
|
1946
|
+
console.log(JSON.stringify((await L()).completeOpEmgrV2(id), null, 2));
|
|
1947
|
+
});
|
|
1948
|
+
parent
|
|
1949
|
+
.command("emgrgov-fail-op-v2 <id> [reason]")
|
|
1950
|
+
.description("Fail op")
|
|
1951
|
+
.action(async (id, reason) => {
|
|
1952
|
+
console.log(
|
|
1953
|
+
JSON.stringify((await L()).failEmgrOpV2(id, reason), null, 2),
|
|
1954
|
+
);
|
|
1955
|
+
});
|
|
1956
|
+
parent
|
|
1957
|
+
.command("emgrgov-cancel-op-v2 <id> [reason]")
|
|
1958
|
+
.description("Cancel op")
|
|
1959
|
+
.action(async (id, reason) => {
|
|
1960
|
+
console.log(
|
|
1961
|
+
JSON.stringify((await L()).cancelEmgrOpV2(id, reason), null, 2),
|
|
1962
|
+
);
|
|
1963
|
+
});
|
|
1964
|
+
parent
|
|
1965
|
+
.command("emgrgov-get-op-v2 <id>")
|
|
1966
|
+
.description("Get op")
|
|
1967
|
+
.action(async (id) => {
|
|
1968
|
+
console.log(JSON.stringify((await L()).getEmgrOpV2(id), null, 2));
|
|
1969
|
+
});
|
|
1970
|
+
parent
|
|
1971
|
+
.command("emgrgov-list-ops-v2")
|
|
1972
|
+
.description("List ops")
|
|
1973
|
+
.action(async () => {
|
|
1974
|
+
console.log(JSON.stringify((await L()).listEmgrOpsV2(), null, 2));
|
|
1975
|
+
});
|
|
1976
|
+
parent
|
|
1977
|
+
.command("emgrgov-auto-stale-idle-v2")
|
|
1978
|
+
.description("Auto-stale idle")
|
|
1979
|
+
.action(async () => {
|
|
1980
|
+
console.log(
|
|
1981
|
+
JSON.stringify((await L()).autoStaleIdleEmgrProfilesV2(), null, 2),
|
|
1982
|
+
);
|
|
1983
|
+
});
|
|
1984
|
+
parent
|
|
1985
|
+
.command("emgrgov-auto-fail-stuck-v2")
|
|
1986
|
+
.description("Auto-fail stuck ops")
|
|
1987
|
+
.action(async () => {
|
|
1988
|
+
console.log(
|
|
1989
|
+
JSON.stringify((await L()).autoFailStuckEmgrOpsV2(), null, 2),
|
|
1990
|
+
);
|
|
1991
|
+
});
|
|
1992
|
+
parent
|
|
1993
|
+
.command("emgrgov-gov-stats-v2")
|
|
1994
|
+
.description("V2 gov stats")
|
|
1995
|
+
.action(async () => {
|
|
1996
|
+
console.log(JSON.stringify((await L()).getEmgrgovStatsV2(), null, 2));
|
|
1997
|
+
});
|
|
1998
|
+
}
|