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
|
@@ -814,3 +814,206 @@ export function registerCrossChainV2Command(cc) {
|
|
|
814
814
|
console.log(JSON.stringify(getCrossChainGovStatsV2(), null, 2));
|
|
815
815
|
});
|
|
816
816
|
}
|
|
817
|
+
|
|
818
|
+
// === Iter28 V2 governance overlay: Crchgov ===
|
|
819
|
+
export function registerCrchV2Commands(program) {
|
|
820
|
+
const parent = program.commands.find((c) => c.name() === "crosschain");
|
|
821
|
+
if (!parent) return;
|
|
822
|
+
const L = async () => await import("../lib/cross-chain.js");
|
|
823
|
+
parent
|
|
824
|
+
.command("crchgov-enums-v2")
|
|
825
|
+
.description("Show V2 enums")
|
|
826
|
+
.action(async () => {
|
|
827
|
+
const m = await L();
|
|
828
|
+
console.log(
|
|
829
|
+
JSON.stringify(
|
|
830
|
+
{
|
|
831
|
+
profileMaturity: m.CRCHGOV_PROFILE_MATURITY_V2,
|
|
832
|
+
transferLifecycle: m.CRCHGOV_TRANSFER_LIFECYCLE_V2,
|
|
833
|
+
},
|
|
834
|
+
null,
|
|
835
|
+
2,
|
|
836
|
+
),
|
|
837
|
+
);
|
|
838
|
+
});
|
|
839
|
+
parent
|
|
840
|
+
.command("crchgov-config-v2")
|
|
841
|
+
.description("Show V2 config")
|
|
842
|
+
.action(async () => {
|
|
843
|
+
const m = await L();
|
|
844
|
+
console.log(
|
|
845
|
+
JSON.stringify(
|
|
846
|
+
{
|
|
847
|
+
maxActive: m.getMaxActiveCrchProfilesPerOwnerV2(),
|
|
848
|
+
maxPending: m.getMaxPendingCrchTransfersPerProfileV2(),
|
|
849
|
+
idleMs: m.getCrchProfileIdleMsV2(),
|
|
850
|
+
stuckMs: m.getCrchTransferStuckMsV2(),
|
|
851
|
+
},
|
|
852
|
+
null,
|
|
853
|
+
2,
|
|
854
|
+
),
|
|
855
|
+
);
|
|
856
|
+
});
|
|
857
|
+
parent
|
|
858
|
+
.command("crchgov-set-max-active-v2 <n>")
|
|
859
|
+
.description("Set max active")
|
|
860
|
+
.action(async (n) => {
|
|
861
|
+
(await L()).setMaxActiveCrchProfilesPerOwnerV2(Number(n));
|
|
862
|
+
console.log("ok");
|
|
863
|
+
});
|
|
864
|
+
parent
|
|
865
|
+
.command("crchgov-set-max-pending-v2 <n>")
|
|
866
|
+
.description("Set max pending")
|
|
867
|
+
.action(async (n) => {
|
|
868
|
+
(await L()).setMaxPendingCrchTransfersPerProfileV2(Number(n));
|
|
869
|
+
console.log("ok");
|
|
870
|
+
});
|
|
871
|
+
parent
|
|
872
|
+
.command("crchgov-set-idle-ms-v2 <n>")
|
|
873
|
+
.description("Set idle threshold ms")
|
|
874
|
+
.action(async (n) => {
|
|
875
|
+
(await L()).setCrchProfileIdleMsV2(Number(n));
|
|
876
|
+
console.log("ok");
|
|
877
|
+
});
|
|
878
|
+
parent
|
|
879
|
+
.command("crchgov-set-stuck-ms-v2 <n>")
|
|
880
|
+
.description("Set stuck threshold ms")
|
|
881
|
+
.action(async (n) => {
|
|
882
|
+
(await L()).setCrchTransferStuckMsV2(Number(n));
|
|
883
|
+
console.log("ok");
|
|
884
|
+
});
|
|
885
|
+
parent
|
|
886
|
+
.command("crchgov-register-v2 <id> <owner>")
|
|
887
|
+
.description("Register V2 profile")
|
|
888
|
+
.option("--bridge <v>", "bridge")
|
|
889
|
+
.action(async (id, owner, o) => {
|
|
890
|
+
const m = await L();
|
|
891
|
+
console.log(
|
|
892
|
+
JSON.stringify(
|
|
893
|
+
m.registerCrchProfileV2({ id, owner, bridge: o.bridge }),
|
|
894
|
+
null,
|
|
895
|
+
2,
|
|
896
|
+
),
|
|
897
|
+
);
|
|
898
|
+
});
|
|
899
|
+
parent
|
|
900
|
+
.command("crchgov-activate-v2 <id>")
|
|
901
|
+
.description("Activate profile")
|
|
902
|
+
.action(async (id) => {
|
|
903
|
+
console.log(
|
|
904
|
+
JSON.stringify((await L()).activateCrchProfileV2(id), null, 2),
|
|
905
|
+
);
|
|
906
|
+
});
|
|
907
|
+
parent
|
|
908
|
+
.command("crchgov-stale-v2 <id>")
|
|
909
|
+
.description("Stale profile")
|
|
910
|
+
.action(async (id) => {
|
|
911
|
+
console.log(JSON.stringify((await L()).staleCrchProfileV2(id), null, 2));
|
|
912
|
+
});
|
|
913
|
+
parent
|
|
914
|
+
.command("crchgov-archive-v2 <id>")
|
|
915
|
+
.description("Archive profile")
|
|
916
|
+
.action(async (id) => {
|
|
917
|
+
console.log(
|
|
918
|
+
JSON.stringify((await L()).archiveCrchProfileV2(id), null, 2),
|
|
919
|
+
);
|
|
920
|
+
});
|
|
921
|
+
parent
|
|
922
|
+
.command("crchgov-touch-v2 <id>")
|
|
923
|
+
.description("Touch profile")
|
|
924
|
+
.action(async (id) => {
|
|
925
|
+
console.log(JSON.stringify((await L()).touchCrchProfileV2(id), null, 2));
|
|
926
|
+
});
|
|
927
|
+
parent
|
|
928
|
+
.command("crchgov-get-v2 <id>")
|
|
929
|
+
.description("Get profile")
|
|
930
|
+
.action(async (id) => {
|
|
931
|
+
console.log(JSON.stringify((await L()).getCrchProfileV2(id), null, 2));
|
|
932
|
+
});
|
|
933
|
+
parent
|
|
934
|
+
.command("crchgov-list-v2")
|
|
935
|
+
.description("List profiles")
|
|
936
|
+
.action(async () => {
|
|
937
|
+
console.log(JSON.stringify((await L()).listCrchProfilesV2(), null, 2));
|
|
938
|
+
});
|
|
939
|
+
parent
|
|
940
|
+
.command("crchgov-create-transfer-v2 <id> <profileId>")
|
|
941
|
+
.description("Create transfer")
|
|
942
|
+
.option("--transferId <v>", "transferId")
|
|
943
|
+
.action(async (id, profileId, o) => {
|
|
944
|
+
const m = await L();
|
|
945
|
+
console.log(
|
|
946
|
+
JSON.stringify(
|
|
947
|
+
m.createCrchTransferV2({ id, profileId, transferId: o.transferId }),
|
|
948
|
+
null,
|
|
949
|
+
2,
|
|
950
|
+
),
|
|
951
|
+
);
|
|
952
|
+
});
|
|
953
|
+
parent
|
|
954
|
+
.command("crchgov-transferring-transfer-v2 <id>")
|
|
955
|
+
.description("Mark transfer as transferring")
|
|
956
|
+
.action(async (id) => {
|
|
957
|
+
console.log(
|
|
958
|
+
JSON.stringify((await L()).transferringCrchTransferV2(id), null, 2),
|
|
959
|
+
);
|
|
960
|
+
});
|
|
961
|
+
parent
|
|
962
|
+
.command("crchgov-complete-transfer-v2 <id>")
|
|
963
|
+
.description("Complete transfer")
|
|
964
|
+
.action(async (id) => {
|
|
965
|
+
console.log(
|
|
966
|
+
JSON.stringify((await L()).completeTransferCrchV2(id), null, 2),
|
|
967
|
+
);
|
|
968
|
+
});
|
|
969
|
+
parent
|
|
970
|
+
.command("crchgov-fail-transfer-v2 <id> [reason]")
|
|
971
|
+
.description("Fail transfer")
|
|
972
|
+
.action(async (id, reason) => {
|
|
973
|
+
console.log(
|
|
974
|
+
JSON.stringify((await L()).failCrchTransferV2(id, reason), null, 2),
|
|
975
|
+
);
|
|
976
|
+
});
|
|
977
|
+
parent
|
|
978
|
+
.command("crchgov-cancel-transfer-v2 <id> [reason]")
|
|
979
|
+
.description("Cancel transfer")
|
|
980
|
+
.action(async (id, reason) => {
|
|
981
|
+
console.log(
|
|
982
|
+
JSON.stringify((await L()).cancelCrchTransferV2(id, reason), null, 2),
|
|
983
|
+
);
|
|
984
|
+
});
|
|
985
|
+
parent
|
|
986
|
+
.command("crchgov-get-transfer-v2 <id>")
|
|
987
|
+
.description("Get transfer")
|
|
988
|
+
.action(async (id) => {
|
|
989
|
+
console.log(JSON.stringify((await L()).getCrchTransferV2(id), null, 2));
|
|
990
|
+
});
|
|
991
|
+
parent
|
|
992
|
+
.command("crchgov-list-transfers-v2")
|
|
993
|
+
.description("List transfers")
|
|
994
|
+
.action(async () => {
|
|
995
|
+
console.log(JSON.stringify((await L()).listCrchTransfersV2(), null, 2));
|
|
996
|
+
});
|
|
997
|
+
parent
|
|
998
|
+
.command("crchgov-auto-stale-idle-v2")
|
|
999
|
+
.description("Auto-stale idle")
|
|
1000
|
+
.action(async () => {
|
|
1001
|
+
console.log(
|
|
1002
|
+
JSON.stringify((await L()).autoStaleIdleCrchProfilesV2(), null, 2),
|
|
1003
|
+
);
|
|
1004
|
+
});
|
|
1005
|
+
parent
|
|
1006
|
+
.command("crchgov-auto-fail-stuck-v2")
|
|
1007
|
+
.description("Auto-fail stuck transfers")
|
|
1008
|
+
.action(async () => {
|
|
1009
|
+
console.log(
|
|
1010
|
+
JSON.stringify((await L()).autoFailStuckCrchTransfersV2(), null, 2),
|
|
1011
|
+
);
|
|
1012
|
+
});
|
|
1013
|
+
parent
|
|
1014
|
+
.command("crchgov-gov-stats-v2")
|
|
1015
|
+
.description("V2 gov stats")
|
|
1016
|
+
.action(async () => {
|
|
1017
|
+
console.log(JSON.stringify((await L()).getCrchgovStatsV2(), null, 2));
|
|
1018
|
+
});
|
|
1019
|
+
}
|
package/src/commands/dao.js
CHANGED
|
@@ -1091,3 +1091,206 @@ export function registerDaoV2Command(dao) {
|
|
|
1091
1091
|
console.log(JSON.stringify(getDaoGovernanceGovStatsV2(), null, 2));
|
|
1092
1092
|
});
|
|
1093
1093
|
}
|
|
1094
|
+
|
|
1095
|
+
// === Iter28 V2 governance overlay: Daomgov ===
|
|
1096
|
+
export function registerDaomV2Commands(program) {
|
|
1097
|
+
const parent = program.commands.find((c) => c.name() === "dao");
|
|
1098
|
+
if (!parent) return;
|
|
1099
|
+
const L = async () => await import("../lib/dao-governance.js");
|
|
1100
|
+
parent
|
|
1101
|
+
.command("daomgov-enums-v2")
|
|
1102
|
+
.description("Show V2 enums")
|
|
1103
|
+
.action(async () => {
|
|
1104
|
+
const m = await L();
|
|
1105
|
+
console.log(
|
|
1106
|
+
JSON.stringify(
|
|
1107
|
+
{
|
|
1108
|
+
profileMaturity: m.DAOMGOV_PROFILE_MATURITY_V2,
|
|
1109
|
+
proposalLifecycle: m.DAOMGOV_PROPOSAL_LIFECYCLE_V2,
|
|
1110
|
+
},
|
|
1111
|
+
null,
|
|
1112
|
+
2,
|
|
1113
|
+
),
|
|
1114
|
+
);
|
|
1115
|
+
});
|
|
1116
|
+
parent
|
|
1117
|
+
.command("daomgov-config-v2")
|
|
1118
|
+
.description("Show V2 config")
|
|
1119
|
+
.action(async () => {
|
|
1120
|
+
const m = await L();
|
|
1121
|
+
console.log(
|
|
1122
|
+
JSON.stringify(
|
|
1123
|
+
{
|
|
1124
|
+
maxActive: m.getMaxActiveDaomProfilesPerOwnerV2(),
|
|
1125
|
+
maxPending: m.getMaxPendingDaomProposalsPerProfileV2(),
|
|
1126
|
+
idleMs: m.getDaomProfileIdleMsV2(),
|
|
1127
|
+
stuckMs: m.getDaomProposalStuckMsV2(),
|
|
1128
|
+
},
|
|
1129
|
+
null,
|
|
1130
|
+
2,
|
|
1131
|
+
),
|
|
1132
|
+
);
|
|
1133
|
+
});
|
|
1134
|
+
parent
|
|
1135
|
+
.command("daomgov-set-max-active-v2 <n>")
|
|
1136
|
+
.description("Set max active")
|
|
1137
|
+
.action(async (n) => {
|
|
1138
|
+
(await L()).setMaxActiveDaomProfilesPerOwnerV2(Number(n));
|
|
1139
|
+
console.log("ok");
|
|
1140
|
+
});
|
|
1141
|
+
parent
|
|
1142
|
+
.command("daomgov-set-max-pending-v2 <n>")
|
|
1143
|
+
.description("Set max pending")
|
|
1144
|
+
.action(async (n) => {
|
|
1145
|
+
(await L()).setMaxPendingDaomProposalsPerProfileV2(Number(n));
|
|
1146
|
+
console.log("ok");
|
|
1147
|
+
});
|
|
1148
|
+
parent
|
|
1149
|
+
.command("daomgov-set-idle-ms-v2 <n>")
|
|
1150
|
+
.description("Set idle threshold ms")
|
|
1151
|
+
.action(async (n) => {
|
|
1152
|
+
(await L()).setDaomProfileIdleMsV2(Number(n));
|
|
1153
|
+
console.log("ok");
|
|
1154
|
+
});
|
|
1155
|
+
parent
|
|
1156
|
+
.command("daomgov-set-stuck-ms-v2 <n>")
|
|
1157
|
+
.description("Set stuck threshold ms")
|
|
1158
|
+
.action(async (n) => {
|
|
1159
|
+
(await L()).setDaomProposalStuckMsV2(Number(n));
|
|
1160
|
+
console.log("ok");
|
|
1161
|
+
});
|
|
1162
|
+
parent
|
|
1163
|
+
.command("daomgov-register-v2 <id> <owner>")
|
|
1164
|
+
.description("Register V2 profile")
|
|
1165
|
+
.option("--realm <v>", "realm")
|
|
1166
|
+
.action(async (id, owner, o) => {
|
|
1167
|
+
const m = await L();
|
|
1168
|
+
console.log(
|
|
1169
|
+
JSON.stringify(
|
|
1170
|
+
m.registerDaomProfileV2({ id, owner, realm: o.realm }),
|
|
1171
|
+
null,
|
|
1172
|
+
2,
|
|
1173
|
+
),
|
|
1174
|
+
);
|
|
1175
|
+
});
|
|
1176
|
+
parent
|
|
1177
|
+
.command("daomgov-activate-v2 <id>")
|
|
1178
|
+
.description("Activate profile")
|
|
1179
|
+
.action(async (id) => {
|
|
1180
|
+
console.log(
|
|
1181
|
+
JSON.stringify((await L()).activateDaomProfileV2(id), null, 2),
|
|
1182
|
+
);
|
|
1183
|
+
});
|
|
1184
|
+
parent
|
|
1185
|
+
.command("daomgov-paused-v2 <id>")
|
|
1186
|
+
.description("Paused profile")
|
|
1187
|
+
.action(async (id) => {
|
|
1188
|
+
console.log(JSON.stringify((await L()).pausedDaomProfileV2(id), null, 2));
|
|
1189
|
+
});
|
|
1190
|
+
parent
|
|
1191
|
+
.command("daomgov-archive-v2 <id>")
|
|
1192
|
+
.description("Archive profile")
|
|
1193
|
+
.action(async (id) => {
|
|
1194
|
+
console.log(
|
|
1195
|
+
JSON.stringify((await L()).archiveDaomProfileV2(id), null, 2),
|
|
1196
|
+
);
|
|
1197
|
+
});
|
|
1198
|
+
parent
|
|
1199
|
+
.command("daomgov-touch-v2 <id>")
|
|
1200
|
+
.description("Touch profile")
|
|
1201
|
+
.action(async (id) => {
|
|
1202
|
+
console.log(JSON.stringify((await L()).touchDaomProfileV2(id), null, 2));
|
|
1203
|
+
});
|
|
1204
|
+
parent
|
|
1205
|
+
.command("daomgov-get-v2 <id>")
|
|
1206
|
+
.description("Get profile")
|
|
1207
|
+
.action(async (id) => {
|
|
1208
|
+
console.log(JSON.stringify((await L()).getDaomProfileV2(id), null, 2));
|
|
1209
|
+
});
|
|
1210
|
+
parent
|
|
1211
|
+
.command("daomgov-list-v2")
|
|
1212
|
+
.description("List profiles")
|
|
1213
|
+
.action(async () => {
|
|
1214
|
+
console.log(JSON.stringify((await L()).listDaomProfilesV2(), null, 2));
|
|
1215
|
+
});
|
|
1216
|
+
parent
|
|
1217
|
+
.command("daomgov-create-proposal-v2 <id> <profileId>")
|
|
1218
|
+
.description("Create proposal")
|
|
1219
|
+
.option("--proposalId <v>", "proposalId")
|
|
1220
|
+
.action(async (id, profileId, o) => {
|
|
1221
|
+
const m = await L();
|
|
1222
|
+
console.log(
|
|
1223
|
+
JSON.stringify(
|
|
1224
|
+
m.createDaomProposalV2({ id, profileId, proposalId: o.proposalId }),
|
|
1225
|
+
null,
|
|
1226
|
+
2,
|
|
1227
|
+
),
|
|
1228
|
+
);
|
|
1229
|
+
});
|
|
1230
|
+
parent
|
|
1231
|
+
.command("daomgov-voting-proposal-v2 <id>")
|
|
1232
|
+
.description("Mark proposal as voting")
|
|
1233
|
+
.action(async (id) => {
|
|
1234
|
+
console.log(
|
|
1235
|
+
JSON.stringify((await L()).votingDaomProposalV2(id), null, 2),
|
|
1236
|
+
);
|
|
1237
|
+
});
|
|
1238
|
+
parent
|
|
1239
|
+
.command("daomgov-complete-proposal-v2 <id>")
|
|
1240
|
+
.description("Complete proposal")
|
|
1241
|
+
.action(async (id) => {
|
|
1242
|
+
console.log(
|
|
1243
|
+
JSON.stringify((await L()).completeProposalDaomV2(id), null, 2),
|
|
1244
|
+
);
|
|
1245
|
+
});
|
|
1246
|
+
parent
|
|
1247
|
+
.command("daomgov-fail-proposal-v2 <id> [reason]")
|
|
1248
|
+
.description("Fail proposal")
|
|
1249
|
+
.action(async (id, reason) => {
|
|
1250
|
+
console.log(
|
|
1251
|
+
JSON.stringify((await L()).failDaomProposalV2(id, reason), null, 2),
|
|
1252
|
+
);
|
|
1253
|
+
});
|
|
1254
|
+
parent
|
|
1255
|
+
.command("daomgov-cancel-proposal-v2 <id> [reason]")
|
|
1256
|
+
.description("Cancel proposal")
|
|
1257
|
+
.action(async (id, reason) => {
|
|
1258
|
+
console.log(
|
|
1259
|
+
JSON.stringify((await L()).cancelDaomProposalV2(id, reason), null, 2),
|
|
1260
|
+
);
|
|
1261
|
+
});
|
|
1262
|
+
parent
|
|
1263
|
+
.command("daomgov-get-proposal-v2 <id>")
|
|
1264
|
+
.description("Get proposal")
|
|
1265
|
+
.action(async (id) => {
|
|
1266
|
+
console.log(JSON.stringify((await L()).getDaomProposalV2(id), null, 2));
|
|
1267
|
+
});
|
|
1268
|
+
parent
|
|
1269
|
+
.command("daomgov-list-proposals-v2")
|
|
1270
|
+
.description("List proposals")
|
|
1271
|
+
.action(async () => {
|
|
1272
|
+
console.log(JSON.stringify((await L()).listDaomProposalsV2(), null, 2));
|
|
1273
|
+
});
|
|
1274
|
+
parent
|
|
1275
|
+
.command("daomgov-auto-paused-idle-v2")
|
|
1276
|
+
.description("Auto-paused idle")
|
|
1277
|
+
.action(async () => {
|
|
1278
|
+
console.log(
|
|
1279
|
+
JSON.stringify((await L()).autoPausedIdleDaomProfilesV2(), null, 2),
|
|
1280
|
+
);
|
|
1281
|
+
});
|
|
1282
|
+
parent
|
|
1283
|
+
.command("daomgov-auto-fail-stuck-v2")
|
|
1284
|
+
.description("Auto-fail stuck proposals")
|
|
1285
|
+
.action(async () => {
|
|
1286
|
+
console.log(
|
|
1287
|
+
JSON.stringify((await L()).autoFailStuckDaomProposalsV2(), null, 2),
|
|
1288
|
+
);
|
|
1289
|
+
});
|
|
1290
|
+
parent
|
|
1291
|
+
.command("daomgov-gov-stats-v2")
|
|
1292
|
+
.description("V2 gov stats")
|
|
1293
|
+
.action(async () => {
|
|
1294
|
+
console.log(JSON.stringify((await L()).getDaomgovStatsV2(), null, 2));
|
|
1295
|
+
});
|
|
1296
|
+
}
|
package/src/commands/economy.js
CHANGED
|
@@ -1162,3 +1162,202 @@ function _registerEconomyV2Commands(parent) {
|
|
|
1162
1162
|
console.log(JSON.stringify(m.getAgentEconomyGovStatsV2(), null, 2));
|
|
1163
1163
|
});
|
|
1164
1164
|
}
|
|
1165
|
+
|
|
1166
|
+
// === Iter28 V2 governance overlay: Aecogov ===
|
|
1167
|
+
export function registerAecoV2Commands(program) {
|
|
1168
|
+
const parent = program.commands.find((c) => c.name() === "economy");
|
|
1169
|
+
if (!parent) return;
|
|
1170
|
+
const L = async () => await import("../lib/agent-economy.js");
|
|
1171
|
+
parent
|
|
1172
|
+
.command("aecogov-enums-v2")
|
|
1173
|
+
.description("Show V2 enums")
|
|
1174
|
+
.action(async () => {
|
|
1175
|
+
const m = await L();
|
|
1176
|
+
console.log(
|
|
1177
|
+
JSON.stringify(
|
|
1178
|
+
{
|
|
1179
|
+
profileMaturity: m.AECOGOV_PROFILE_MATURITY_V2,
|
|
1180
|
+
tradeLifecycle: m.AECOGOV_TRADE_LIFECYCLE_V2,
|
|
1181
|
+
},
|
|
1182
|
+
null,
|
|
1183
|
+
2,
|
|
1184
|
+
),
|
|
1185
|
+
);
|
|
1186
|
+
});
|
|
1187
|
+
parent
|
|
1188
|
+
.command("aecogov-config-v2")
|
|
1189
|
+
.description("Show V2 config")
|
|
1190
|
+
.action(async () => {
|
|
1191
|
+
const m = await L();
|
|
1192
|
+
console.log(
|
|
1193
|
+
JSON.stringify(
|
|
1194
|
+
{
|
|
1195
|
+
maxActive: m.getMaxActiveAecoProfilesPerOwnerV2(),
|
|
1196
|
+
maxPending: m.getMaxPendingAecoTradesPerProfileV2(),
|
|
1197
|
+
idleMs: m.getAecoProfileIdleMsV2(),
|
|
1198
|
+
stuckMs: m.getAecoTradeStuckMsV2(),
|
|
1199
|
+
},
|
|
1200
|
+
null,
|
|
1201
|
+
2,
|
|
1202
|
+
),
|
|
1203
|
+
);
|
|
1204
|
+
});
|
|
1205
|
+
parent
|
|
1206
|
+
.command("aecogov-set-max-active-v2 <n>")
|
|
1207
|
+
.description("Set max active")
|
|
1208
|
+
.action(async (n) => {
|
|
1209
|
+
(await L()).setMaxActiveAecoProfilesPerOwnerV2(Number(n));
|
|
1210
|
+
console.log("ok");
|
|
1211
|
+
});
|
|
1212
|
+
parent
|
|
1213
|
+
.command("aecogov-set-max-pending-v2 <n>")
|
|
1214
|
+
.description("Set max pending")
|
|
1215
|
+
.action(async (n) => {
|
|
1216
|
+
(await L()).setMaxPendingAecoTradesPerProfileV2(Number(n));
|
|
1217
|
+
console.log("ok");
|
|
1218
|
+
});
|
|
1219
|
+
parent
|
|
1220
|
+
.command("aecogov-set-idle-ms-v2 <n>")
|
|
1221
|
+
.description("Set idle threshold ms")
|
|
1222
|
+
.action(async (n) => {
|
|
1223
|
+
(await L()).setAecoProfileIdleMsV2(Number(n));
|
|
1224
|
+
console.log("ok");
|
|
1225
|
+
});
|
|
1226
|
+
parent
|
|
1227
|
+
.command("aecogov-set-stuck-ms-v2 <n>")
|
|
1228
|
+
.description("Set stuck threshold ms")
|
|
1229
|
+
.action(async (n) => {
|
|
1230
|
+
(await L()).setAecoTradeStuckMsV2(Number(n));
|
|
1231
|
+
console.log("ok");
|
|
1232
|
+
});
|
|
1233
|
+
parent
|
|
1234
|
+
.command("aecogov-register-v2 <id> <owner>")
|
|
1235
|
+
.description("Register V2 profile")
|
|
1236
|
+
.option("--market <v>", "market")
|
|
1237
|
+
.action(async (id, owner, o) => {
|
|
1238
|
+
const m = await L();
|
|
1239
|
+
console.log(
|
|
1240
|
+
JSON.stringify(
|
|
1241
|
+
m.registerAecoProfileV2({ id, owner, market: o.market }),
|
|
1242
|
+
null,
|
|
1243
|
+
2,
|
|
1244
|
+
),
|
|
1245
|
+
);
|
|
1246
|
+
});
|
|
1247
|
+
parent
|
|
1248
|
+
.command("aecogov-activate-v2 <id>")
|
|
1249
|
+
.description("Activate profile")
|
|
1250
|
+
.action(async (id) => {
|
|
1251
|
+
console.log(
|
|
1252
|
+
JSON.stringify((await L()).activateAecoProfileV2(id), null, 2),
|
|
1253
|
+
);
|
|
1254
|
+
});
|
|
1255
|
+
parent
|
|
1256
|
+
.command("aecogov-paused-v2 <id>")
|
|
1257
|
+
.description("Paused profile")
|
|
1258
|
+
.action(async (id) => {
|
|
1259
|
+
console.log(JSON.stringify((await L()).pausedAecoProfileV2(id), null, 2));
|
|
1260
|
+
});
|
|
1261
|
+
parent
|
|
1262
|
+
.command("aecogov-archive-v2 <id>")
|
|
1263
|
+
.description("Archive profile")
|
|
1264
|
+
.action(async (id) => {
|
|
1265
|
+
console.log(
|
|
1266
|
+
JSON.stringify((await L()).archiveAecoProfileV2(id), null, 2),
|
|
1267
|
+
);
|
|
1268
|
+
});
|
|
1269
|
+
parent
|
|
1270
|
+
.command("aecogov-touch-v2 <id>")
|
|
1271
|
+
.description("Touch profile")
|
|
1272
|
+
.action(async (id) => {
|
|
1273
|
+
console.log(JSON.stringify((await L()).touchAecoProfileV2(id), null, 2));
|
|
1274
|
+
});
|
|
1275
|
+
parent
|
|
1276
|
+
.command("aecogov-get-v2 <id>")
|
|
1277
|
+
.description("Get profile")
|
|
1278
|
+
.action(async (id) => {
|
|
1279
|
+
console.log(JSON.stringify((await L()).getAecoProfileV2(id), null, 2));
|
|
1280
|
+
});
|
|
1281
|
+
parent
|
|
1282
|
+
.command("aecogov-list-v2")
|
|
1283
|
+
.description("List profiles")
|
|
1284
|
+
.action(async () => {
|
|
1285
|
+
console.log(JSON.stringify((await L()).listAecoProfilesV2(), null, 2));
|
|
1286
|
+
});
|
|
1287
|
+
parent
|
|
1288
|
+
.command("aecogov-create-trade-v2 <id> <profileId>")
|
|
1289
|
+
.description("Create trade")
|
|
1290
|
+
.option("--orderId <v>", "orderId")
|
|
1291
|
+
.action(async (id, profileId, o) => {
|
|
1292
|
+
const m = await L();
|
|
1293
|
+
console.log(
|
|
1294
|
+
JSON.stringify(
|
|
1295
|
+
m.createAecoTradeV2({ id, profileId, orderId: o.orderId }),
|
|
1296
|
+
null,
|
|
1297
|
+
2,
|
|
1298
|
+
),
|
|
1299
|
+
);
|
|
1300
|
+
});
|
|
1301
|
+
parent
|
|
1302
|
+
.command("aecogov-trading-trade-v2 <id>")
|
|
1303
|
+
.description("Mark trade as trading")
|
|
1304
|
+
.action(async (id) => {
|
|
1305
|
+
console.log(JSON.stringify((await L()).tradingAecoTradeV2(id), null, 2));
|
|
1306
|
+
});
|
|
1307
|
+
parent
|
|
1308
|
+
.command("aecogov-complete-trade-v2 <id>")
|
|
1309
|
+
.description("Complete trade")
|
|
1310
|
+
.action(async (id) => {
|
|
1311
|
+
console.log(JSON.stringify((await L()).completeTradeAecoV2(id), null, 2));
|
|
1312
|
+
});
|
|
1313
|
+
parent
|
|
1314
|
+
.command("aecogov-fail-trade-v2 <id> [reason]")
|
|
1315
|
+
.description("Fail trade")
|
|
1316
|
+
.action(async (id, reason) => {
|
|
1317
|
+
console.log(
|
|
1318
|
+
JSON.stringify((await L()).failAecoTradeV2(id, reason), null, 2),
|
|
1319
|
+
);
|
|
1320
|
+
});
|
|
1321
|
+
parent
|
|
1322
|
+
.command("aecogov-cancel-trade-v2 <id> [reason]")
|
|
1323
|
+
.description("Cancel trade")
|
|
1324
|
+
.action(async (id, reason) => {
|
|
1325
|
+
console.log(
|
|
1326
|
+
JSON.stringify((await L()).cancelAecoTradeV2(id, reason), null, 2),
|
|
1327
|
+
);
|
|
1328
|
+
});
|
|
1329
|
+
parent
|
|
1330
|
+
.command("aecogov-get-trade-v2 <id>")
|
|
1331
|
+
.description("Get trade")
|
|
1332
|
+
.action(async (id) => {
|
|
1333
|
+
console.log(JSON.stringify((await L()).getAecoTradeV2(id), null, 2));
|
|
1334
|
+
});
|
|
1335
|
+
parent
|
|
1336
|
+
.command("aecogov-list-trades-v2")
|
|
1337
|
+
.description("List trades")
|
|
1338
|
+
.action(async () => {
|
|
1339
|
+
console.log(JSON.stringify((await L()).listAecoTradesV2(), null, 2));
|
|
1340
|
+
});
|
|
1341
|
+
parent
|
|
1342
|
+
.command("aecogov-auto-paused-idle-v2")
|
|
1343
|
+
.description("Auto-paused idle")
|
|
1344
|
+
.action(async () => {
|
|
1345
|
+
console.log(
|
|
1346
|
+
JSON.stringify((await L()).autoPausedIdleAecoProfilesV2(), null, 2),
|
|
1347
|
+
);
|
|
1348
|
+
});
|
|
1349
|
+
parent
|
|
1350
|
+
.command("aecogov-auto-fail-stuck-v2")
|
|
1351
|
+
.description("Auto-fail stuck trades")
|
|
1352
|
+
.action(async () => {
|
|
1353
|
+
console.log(
|
|
1354
|
+
JSON.stringify((await L()).autoFailStuckAecoTradesV2(), null, 2),
|
|
1355
|
+
);
|
|
1356
|
+
});
|
|
1357
|
+
parent
|
|
1358
|
+
.command("aecogov-gov-stats-v2")
|
|
1359
|
+
.description("V2 gov stats")
|
|
1360
|
+
.action(async () => {
|
|
1361
|
+
console.log(JSON.stringify((await L()).getAecogovStatsV2(), null, 2));
|
|
1362
|
+
});
|
|
1363
|
+
}
|