chainlesschain 0.143.0 → 0.145.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/package.json +1 -1
- package/src/commands/a2a.js +196 -28
- package/src/commands/activitypub.js +157 -27
- package/src/commands/agent.js +587 -103
- package/src/commands/audit.js +206 -0
- package/src/commands/bi.js +152 -27
- package/src/commands/bm25.js +111 -27
- package/src/commands/browse.js +190 -29
- package/src/commands/ccron.js +128 -28
- package/src/commands/chat.js +207 -0
- package/src/commands/compliance.js +414 -34
- package/src/commands/compt.js +127 -29
- package/src/commands/consol.js +8 -2
- package/src/commands/cowork.js +580 -34
- package/src/commands/crosschain.js +182 -28
- package/src/commands/dao.js +182 -28
- package/src/commands/dlp.js +172 -27
- package/src/commands/economy.js +205 -50
- package/src/commands/evolution.js +203 -50
- package/src/commands/evomap.js +182 -27
- package/src/commands/fflag.js +74 -22
- package/src/commands/git.js +177 -37
- package/src/commands/hardening.js +209 -0
- package/src/commands/hmemory.js +204 -50
- package/src/commands/incentive.js +209 -0
- package/src/commands/inference.js +170 -34
- package/src/commands/itbudget.js +149 -33
- package/src/commands/kg.js +206 -0
- package/src/commands/lowcode.js +195 -38
- package/src/commands/marketplace.js +206 -0
- package/src/commands/matrix.js +179 -27
- package/src/commands/mcpscaf.js +145 -33
- package/src/commands/meminj.js +145 -33
- package/src/commands/nostr.js +178 -27
- package/src/commands/orchestrate.js +217 -0
- package/src/commands/orchgov.js +144 -33
- package/src/commands/pdfp.js +109 -27
- package/src/commands/perf.js +169 -32
- package/src/commands/perm.js +144 -33
- package/src/commands/pipeline.js +207 -52
- package/src/commands/planmode.js +141 -32
- package/src/commands/privacy.js +203 -0
- package/src/commands/promcomp.js +111 -27
- package/src/commands/recommend.js +177 -34
- package/src/commands/reputation.js +208 -0
- package/src/commands/sandbox.js +206 -0
- package/src/commands/seshhook.js +145 -33
- package/src/commands/seshsearch.js +141 -33
- package/src/commands/seshtail.js +144 -33
- package/src/commands/seshu.js +152 -33
- package/src/commands/sganal.js +123 -29
- package/src/commands/siem.js +201 -34
- package/src/commands/sla.js +212 -0
- package/src/commands/slotfill.js +146 -33
- package/src/commands/social.js +157 -32
- package/src/commands/stress.js +206 -0
- package/src/commands/svccont.js +145 -33
- package/src/commands/terraform.js +206 -0
- package/src/commands/tms.js +171 -33
- package/src/commands/topiccls.js +146 -33
- package/src/commands/uprof.js +141 -32
- package/src/commands/vcheck.js +122 -28
- package/src/commands/webfetch.js +141 -32
- package/src/commands/zkp.js +184 -28
- package/src/index.js +40 -0
- package/src/lib/a2a-protocol.js +319 -51
- package/src/lib/activitypub-bridge.js +288 -50
- package/src/lib/agent-economy.js +304 -51
- package/src/lib/app-builder.js +279 -46
- package/src/lib/audit-logger.js +321 -0
- package/src/lib/autonomous-agent.js +284 -48
- package/src/lib/bi-engine.js +283 -49
- package/src/lib/bm25-search.js +301 -49
- package/src/lib/browser-automation.js +296 -49
- package/src/lib/chat-core.js +336 -0
- package/src/lib/claude-code-bridge.js +341 -0
- package/src/lib/compliance-framework-reporter.js +305 -51
- package/src/lib/compliance-manager.js +330 -0
- package/src/lib/compression-telemetry.js +301 -49
- package/src/lib/content-recommender.js +317 -52
- package/src/lib/cowork-cron.js +298 -49
- package/src/lib/cowork-learning.js +333 -0
- package/src/lib/cowork-task-runner.js +308 -51
- package/src/lib/cowork-workflow.js +327 -0
- package/src/lib/cross-chain.js +311 -51
- package/src/lib/dao-governance.js +280 -46
- package/src/lib/dlp-engine.js +287 -49
- package/src/lib/evolution-system.js +278 -47
- package/src/lib/evomap-manager.js +280 -46
- package/src/lib/execution-backend.js +294 -48
- package/src/lib/feature-flags.js +294 -49
- package/src/lib/git-integration.js +285 -47
- package/src/lib/hardening-manager.js +341 -0
- package/src/lib/hierarchical-memory.js +284 -48
- package/src/lib/inference-network.js +308 -51
- package/src/lib/iteration-budget.js +302 -50
- package/src/lib/knowledge-graph.js +333 -0
- package/src/lib/matrix-bridge.js +281 -47
- package/src/lib/mcp-scaffold.js +318 -54
- package/src/lib/memory-injection.js +288 -49
- package/src/lib/nostr-bridge.js +286 -49
- package/src/lib/orchestrator.js +293 -48
- package/src/lib/pdf-parser.js +298 -49
- package/src/lib/perf-tuning.js +309 -50
- package/src/lib/permission-engine.js +287 -49
- package/src/lib/pipeline-orchestrator.js +289 -49
- package/src/lib/plan-mode.js +298 -51
- package/src/lib/privacy-computing.js +335 -0
- package/src/lib/reputation-optimizer.js +340 -0
- package/src/lib/sandbox-v2.js +327 -0
- package/src/lib/service-container.js +313 -52
- package/src/lib/session-consolidator.js +296 -49
- package/src/lib/session-hooks.js +312 -53
- package/src/lib/session-search.js +304 -51
- package/src/lib/session-tail.js +288 -49
- package/src/lib/session-usage.js +298 -52
- package/src/lib/siem-exporter.js +298 -51
- package/src/lib/skill-marketplace.js +345 -0
- package/src/lib/sla-manager.js +341 -0
- package/src/lib/slot-filler.js +303 -51
- package/src/lib/social-graph-analytics.js +295 -49
- package/src/lib/social-graph.js +272 -49
- package/src/lib/stress-tester.js +342 -0
- package/src/lib/sub-agent-registry.js +302 -53
- package/src/lib/task-model-selector.js +302 -50
- package/src/lib/terraform-manager.js +333 -0
- package/src/lib/todo-manager.js +281 -47
- package/src/lib/token-incentive.js +341 -0
- package/src/lib/topic-classifier.js +297 -49
- package/src/lib/user-profile.js +294 -50
- package/src/lib/version-checker.js +304 -50
- package/src/lib/web-fetch.js +292 -51
- package/src/lib/zkp-engine.js +286 -49
package/src/commands/evomap.js
CHANGED
|
@@ -952,7 +952,6 @@ export function registerEvoMapCommand(program) {
|
|
|
952
952
|
registerEvoMapV2Command(evomap);
|
|
953
953
|
}
|
|
954
954
|
|
|
955
|
-
|
|
956
955
|
import {
|
|
957
956
|
EVOMAP_MAP_MATURITY_V2,
|
|
958
957
|
EVOMAP_EVOLUTION_LIFECYCLE_V2,
|
|
@@ -984,30 +983,186 @@ import {
|
|
|
984
983
|
} from "../lib/evomap-manager.js";
|
|
985
984
|
|
|
986
985
|
export function registerEvoMapV2Command(evomap) {
|
|
987
|
-
evomap
|
|
988
|
-
|
|
989
|
-
.
|
|
990
|
-
.action((
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
evomap
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
986
|
+
evomap
|
|
987
|
+
.command("enums-v2")
|
|
988
|
+
.description("Show V2 governance enums")
|
|
989
|
+
.action(() => {
|
|
990
|
+
console.log(
|
|
991
|
+
JSON.stringify(
|
|
992
|
+
{ EVOMAP_MAP_MATURITY_V2, EVOMAP_EVOLUTION_LIFECYCLE_V2 },
|
|
993
|
+
null,
|
|
994
|
+
2,
|
|
995
|
+
),
|
|
996
|
+
);
|
|
997
|
+
});
|
|
998
|
+
evomap
|
|
999
|
+
.command("register-map-v2")
|
|
1000
|
+
.description("Register an evomap profile (pending)")
|
|
1001
|
+
.requiredOption("--id <id>")
|
|
1002
|
+
.requiredOption("--owner <owner>")
|
|
1003
|
+
.option("--name <name>")
|
|
1004
|
+
.action((o) => {
|
|
1005
|
+
console.log(JSON.stringify(registerEvoMapV2(o), null, 2));
|
|
1006
|
+
});
|
|
1007
|
+
evomap
|
|
1008
|
+
.command("activate-map-v2 <id>")
|
|
1009
|
+
.description("Activate map")
|
|
1010
|
+
.action((id) => {
|
|
1011
|
+
console.log(JSON.stringify(activateEvoMapV2(id), null, 2));
|
|
1012
|
+
});
|
|
1013
|
+
evomap
|
|
1014
|
+
.command("stale-map-v2 <id>")
|
|
1015
|
+
.description("Mark map stale")
|
|
1016
|
+
.action((id) => {
|
|
1017
|
+
console.log(JSON.stringify(staleEvoMapV2(id), null, 2));
|
|
1018
|
+
});
|
|
1019
|
+
evomap
|
|
1020
|
+
.command("archive-map-v2 <id>")
|
|
1021
|
+
.description("Archive map (terminal)")
|
|
1022
|
+
.action((id) => {
|
|
1023
|
+
console.log(JSON.stringify(archiveEvoMapV2(id), null, 2));
|
|
1024
|
+
});
|
|
1025
|
+
evomap
|
|
1026
|
+
.command("touch-map-v2 <id>")
|
|
1027
|
+
.description("Refresh lastTouchedAt")
|
|
1028
|
+
.action((id) => {
|
|
1029
|
+
console.log(JSON.stringify(touchEvoMapV2(id), null, 2));
|
|
1030
|
+
});
|
|
1031
|
+
evomap
|
|
1032
|
+
.command("get-map-v2 <id>")
|
|
1033
|
+
.description("Get map")
|
|
1034
|
+
.action((id) => {
|
|
1035
|
+
console.log(JSON.stringify(getEvoMapV2(id), null, 2));
|
|
1036
|
+
});
|
|
1037
|
+
evomap
|
|
1038
|
+
.command("list-maps-v2")
|
|
1039
|
+
.description("List maps")
|
|
1040
|
+
.action(() => {
|
|
1041
|
+
console.log(JSON.stringify(listEvoMapsV2(), null, 2));
|
|
1042
|
+
});
|
|
1043
|
+
evomap
|
|
1044
|
+
.command("create-evolution-v2")
|
|
1045
|
+
.description("Create an evolution (queued)")
|
|
1046
|
+
.requiredOption("--id <id>")
|
|
1047
|
+
.requiredOption("--map-id <mapId>")
|
|
1048
|
+
.option("--strategy <strategy>")
|
|
1049
|
+
.action((o) => {
|
|
1050
|
+
console.log(
|
|
1051
|
+
JSON.stringify(
|
|
1052
|
+
createEvoEvolutionV2({
|
|
1053
|
+
id: o.id,
|
|
1054
|
+
mapId: o.mapId,
|
|
1055
|
+
strategy: o.strategy,
|
|
1056
|
+
}),
|
|
1057
|
+
null,
|
|
1058
|
+
2,
|
|
1059
|
+
),
|
|
1060
|
+
);
|
|
1061
|
+
});
|
|
1062
|
+
evomap
|
|
1063
|
+
.command("start-evolution-v2 <id>")
|
|
1064
|
+
.description("Transition evolution to running")
|
|
1065
|
+
.action((id) => {
|
|
1066
|
+
console.log(JSON.stringify(startEvoEvolutionV2(id), null, 2));
|
|
1067
|
+
});
|
|
1068
|
+
evomap
|
|
1069
|
+
.command("complete-evolution-v2 <id>")
|
|
1070
|
+
.description("Transition evolution to completed")
|
|
1071
|
+
.action((id) => {
|
|
1072
|
+
console.log(JSON.stringify(completeEvoEvolutionV2(id), null, 2));
|
|
1073
|
+
});
|
|
1074
|
+
evomap
|
|
1075
|
+
.command("fail-evolution-v2 <id>")
|
|
1076
|
+
.description("Fail evolution")
|
|
1077
|
+
.option("--reason <r>")
|
|
1078
|
+
.action((id, o) => {
|
|
1079
|
+
console.log(JSON.stringify(failEvoEvolutionV2(id, o.reason), null, 2));
|
|
1080
|
+
});
|
|
1081
|
+
evomap
|
|
1082
|
+
.command("cancel-evolution-v2 <id>")
|
|
1083
|
+
.description("Cancel evolution")
|
|
1084
|
+
.option("--reason <r>")
|
|
1085
|
+
.action((id, o) => {
|
|
1086
|
+
console.log(JSON.stringify(cancelEvoEvolutionV2(id, o.reason), null, 2));
|
|
1087
|
+
});
|
|
1088
|
+
evomap
|
|
1089
|
+
.command("get-evolution-v2 <id>")
|
|
1090
|
+
.description("Get evolution")
|
|
1091
|
+
.action((id) => {
|
|
1092
|
+
console.log(JSON.stringify(getEvoEvolutionV2(id), null, 2));
|
|
1093
|
+
});
|
|
1094
|
+
evomap
|
|
1095
|
+
.command("list-evolutions-v2")
|
|
1096
|
+
.description("List evolutions")
|
|
1097
|
+
.action(() => {
|
|
1098
|
+
console.log(JSON.stringify(listEvoEvolutionsV2(), null, 2));
|
|
1099
|
+
});
|
|
1100
|
+
evomap
|
|
1101
|
+
.command("set-max-active-maps-v2 <n>")
|
|
1102
|
+
.description("Set per-owner active cap")
|
|
1103
|
+
.action((n) => {
|
|
1104
|
+
setMaxActiveEvoMapsPerOwnerV2(Number(n));
|
|
1105
|
+
console.log(
|
|
1106
|
+
JSON.stringify(
|
|
1107
|
+
{ maxActiveEvoMapsPerOwner: getMaxActiveEvoMapsPerOwnerV2() },
|
|
1108
|
+
null,
|
|
1109
|
+
2,
|
|
1110
|
+
),
|
|
1111
|
+
);
|
|
1112
|
+
});
|
|
1113
|
+
evomap
|
|
1114
|
+
.command("set-max-pending-evolutions-v2 <n>")
|
|
1115
|
+
.description("Set per-map pending cap")
|
|
1116
|
+
.action((n) => {
|
|
1117
|
+
setMaxPendingEvoEvolutionsPerMapV2(Number(n));
|
|
1118
|
+
console.log(
|
|
1119
|
+
JSON.stringify(
|
|
1120
|
+
{
|
|
1121
|
+
maxPendingEvoEvolutionsPerMap: getMaxPendingEvoEvolutionsPerMapV2(),
|
|
1122
|
+
},
|
|
1123
|
+
null,
|
|
1124
|
+
2,
|
|
1125
|
+
),
|
|
1126
|
+
);
|
|
1127
|
+
});
|
|
1128
|
+
evomap
|
|
1129
|
+
.command("set-map-idle-ms-v2 <n>")
|
|
1130
|
+
.description("Set idle threshold")
|
|
1131
|
+
.action((n) => {
|
|
1132
|
+
setEvoMapIdleMsV2(Number(n));
|
|
1133
|
+
console.log(
|
|
1134
|
+
JSON.stringify({ evoMapIdleMs: getEvoMapIdleMsV2() }, null, 2),
|
|
1135
|
+
);
|
|
1136
|
+
});
|
|
1137
|
+
evomap
|
|
1138
|
+
.command("set-evolution-stuck-ms-v2 <n>")
|
|
1139
|
+
.description("Set stuck threshold")
|
|
1140
|
+
.action((n) => {
|
|
1141
|
+
setEvoEvolutionStuckMsV2(Number(n));
|
|
1142
|
+
console.log(
|
|
1143
|
+
JSON.stringify(
|
|
1144
|
+
{ evoEvolutionStuckMs: getEvoEvolutionStuckMsV2() },
|
|
1145
|
+
null,
|
|
1146
|
+
2,
|
|
1147
|
+
),
|
|
1148
|
+
);
|
|
1149
|
+
});
|
|
1150
|
+
evomap
|
|
1151
|
+
.command("auto-stale-idle-maps-v2")
|
|
1152
|
+
.description("Auto-stale idle maps")
|
|
1153
|
+
.action(() => {
|
|
1154
|
+
console.log(JSON.stringify(autoStaleIdleEvoMapsV2(), null, 2));
|
|
1155
|
+
});
|
|
1156
|
+
evomap
|
|
1157
|
+
.command("auto-fail-stuck-evolutions-v2")
|
|
1158
|
+
.description("Auto-fail stuck running evolutions")
|
|
1159
|
+
.action(() => {
|
|
1160
|
+
console.log(JSON.stringify(autoFailStuckEvoEvolutionsV2(), null, 2));
|
|
1161
|
+
});
|
|
1162
|
+
evomap
|
|
1163
|
+
.command("gov-stats-v2")
|
|
1164
|
+
.description("V2 governance aggregate stats")
|
|
1165
|
+
.action(() => {
|
|
1166
|
+
console.log(JSON.stringify(getEvoMapManagerStatsV2(), null, 2));
|
|
1167
|
+
});
|
|
1013
1168
|
}
|
package/src/commands/fflag.js
CHANGED
|
@@ -56,27 +56,39 @@ export function registerFflagCommand(program) {
|
|
|
56
56
|
.requiredOption("--id <id>")
|
|
57
57
|
.requiredOption("--owner <owner>")
|
|
58
58
|
.option("--scope <scope>", "scope tag", "*")
|
|
59
|
-
.action((o) =>
|
|
59
|
+
.action((o) =>
|
|
60
|
+
console.log(JSON.stringify(registerFflagProfileV2(o), null, 2)),
|
|
61
|
+
);
|
|
60
62
|
fflag
|
|
61
63
|
.command("activate-profile-v2 <id>")
|
|
62
64
|
.description("Transition profile to active")
|
|
63
|
-
.action((id) =>
|
|
65
|
+
.action((id) =>
|
|
66
|
+
console.log(JSON.stringify(activateFflagProfileV2(id), null, 2)),
|
|
67
|
+
);
|
|
64
68
|
fflag
|
|
65
69
|
.command("pause-profile-v2 <id>")
|
|
66
70
|
.description("Transition profile to paused")
|
|
67
|
-
.action((id) =>
|
|
71
|
+
.action((id) =>
|
|
72
|
+
console.log(JSON.stringify(pauseFflagProfileV2(id), null, 2)),
|
|
73
|
+
);
|
|
68
74
|
fflag
|
|
69
75
|
.command("archive-profile-v2 <id>")
|
|
70
76
|
.description("Transition profile to archived (terminal)")
|
|
71
|
-
.action((id) =>
|
|
77
|
+
.action((id) =>
|
|
78
|
+
console.log(JSON.stringify(archiveFflagProfileV2(id), null, 2)),
|
|
79
|
+
);
|
|
72
80
|
fflag
|
|
73
81
|
.command("touch-profile-v2 <id>")
|
|
74
82
|
.description("Refresh lastTouchedAt")
|
|
75
|
-
.action((id) =>
|
|
83
|
+
.action((id) =>
|
|
84
|
+
console.log(JSON.stringify(touchFflagProfileV2(id), null, 2)),
|
|
85
|
+
);
|
|
76
86
|
fflag
|
|
77
87
|
.command("get-profile-v2 <id>")
|
|
78
88
|
.description("Get a profile by id")
|
|
79
|
-
.action((id) =>
|
|
89
|
+
.action((id) =>
|
|
90
|
+
console.log(JSON.stringify(getFflagProfileV2(id), null, 2)),
|
|
91
|
+
);
|
|
80
92
|
fflag
|
|
81
93
|
.command("list-profiles-v2")
|
|
82
94
|
.description("List all profiles")
|
|
@@ -88,27 +100,33 @@ export function registerFflagCommand(program) {
|
|
|
88
100
|
.requiredOption("--id <id>")
|
|
89
101
|
.requiredOption("--profile-id <profileId>")
|
|
90
102
|
.option("--key <key>", "flag key", "")
|
|
91
|
-
.action((o) =>
|
|
92
|
-
console.log(JSON.stringify(createFflagEvalV2(o), null, 2)),
|
|
93
|
-
);
|
|
103
|
+
.action((o) => console.log(JSON.stringify(createFflagEvalV2(o), null, 2)));
|
|
94
104
|
fflag
|
|
95
105
|
.command("evaluating-eval-v2 <id>")
|
|
96
106
|
.description("Mark eval as evaluating")
|
|
97
|
-
.action((id) =>
|
|
107
|
+
.action((id) =>
|
|
108
|
+
console.log(JSON.stringify(evaluatingFflagEvalV2(id), null, 2)),
|
|
109
|
+
);
|
|
98
110
|
fflag
|
|
99
111
|
.command("evaluate-eval-v2 <id>")
|
|
100
112
|
.description("Mark eval as evaluated (terminal)")
|
|
101
|
-
.action((id) =>
|
|
113
|
+
.action((id) =>
|
|
114
|
+
console.log(JSON.stringify(evaluateFflagEvalV2(id), null, 2)),
|
|
115
|
+
);
|
|
102
116
|
fflag
|
|
103
117
|
.command("fail-eval-v2 <id>")
|
|
104
118
|
.description("Mark eval as failed (terminal)")
|
|
105
119
|
.option("--reason <reason>")
|
|
106
|
-
.action((id, o) =>
|
|
120
|
+
.action((id, o) =>
|
|
121
|
+
console.log(JSON.stringify(failFflagEvalV2(id, o.reason), null, 2)),
|
|
122
|
+
);
|
|
107
123
|
fflag
|
|
108
124
|
.command("cancel-eval-v2 <id>")
|
|
109
125
|
.description("Mark eval as cancelled (terminal)")
|
|
110
126
|
.option("--reason <reason>")
|
|
111
|
-
.action((id, o) =>
|
|
127
|
+
.action((id, o) =>
|
|
128
|
+
console.log(JSON.stringify(cancelFflagEvalV2(id, o.reason), null, 2)),
|
|
129
|
+
);
|
|
112
130
|
fflag
|
|
113
131
|
.command("get-eval-v2 <id>")
|
|
114
132
|
.description("Get an eval by id")
|
|
@@ -125,8 +143,10 @@ export function registerFflagCommand(program) {
|
|
|
125
143
|
console.log(
|
|
126
144
|
JSON.stringify(
|
|
127
145
|
{
|
|
128
|
-
maxActiveFflagProfilesPerOwner:
|
|
129
|
-
|
|
146
|
+
maxActiveFflagProfilesPerOwner:
|
|
147
|
+
getMaxActiveFflagProfilesPerOwnerV2(),
|
|
148
|
+
maxPendingFflagEvalsPerProfile:
|
|
149
|
+
getMaxPendingFflagEvalsPerProfileV2(),
|
|
130
150
|
fflagProfileIdleMs: getFflagProfileIdleMsV2(),
|
|
131
151
|
fflagEvalStuckMs: getFflagEvalStuckMsV2(),
|
|
132
152
|
},
|
|
@@ -140,39 +160,71 @@ export function registerFflagCommand(program) {
|
|
|
140
160
|
.description("Set max active profiles per owner")
|
|
141
161
|
.action((n) => {
|
|
142
162
|
setMaxActiveFflagProfilesPerOwnerV2(Number(n));
|
|
143
|
-
console.log(
|
|
163
|
+
console.log(
|
|
164
|
+
JSON.stringify(
|
|
165
|
+
{
|
|
166
|
+
maxActiveFflagProfilesPerOwner:
|
|
167
|
+
getMaxActiveFflagProfilesPerOwnerV2(),
|
|
168
|
+
},
|
|
169
|
+
null,
|
|
170
|
+
2,
|
|
171
|
+
),
|
|
172
|
+
);
|
|
144
173
|
});
|
|
145
174
|
fflag
|
|
146
175
|
.command("set-max-pending-evals-v2 <n>")
|
|
147
176
|
.description("Set max pending evals per profile")
|
|
148
177
|
.action((n) => {
|
|
149
178
|
setMaxPendingFflagEvalsPerProfileV2(Number(n));
|
|
150
|
-
console.log(
|
|
179
|
+
console.log(
|
|
180
|
+
JSON.stringify(
|
|
181
|
+
{
|
|
182
|
+
maxPendingFflagEvalsPerProfile:
|
|
183
|
+
getMaxPendingFflagEvalsPerProfileV2(),
|
|
184
|
+
},
|
|
185
|
+
null,
|
|
186
|
+
2,
|
|
187
|
+
),
|
|
188
|
+
);
|
|
151
189
|
});
|
|
152
190
|
fflag
|
|
153
191
|
.command("set-profile-idle-ms-v2 <ms>")
|
|
154
192
|
.description("Set profile idle window")
|
|
155
193
|
.action((ms) => {
|
|
156
194
|
setFflagProfileIdleMsV2(Number(ms));
|
|
157
|
-
console.log(
|
|
195
|
+
console.log(
|
|
196
|
+
JSON.stringify(
|
|
197
|
+
{ fflagProfileIdleMs: getFflagProfileIdleMsV2() },
|
|
198
|
+
null,
|
|
199
|
+
2,
|
|
200
|
+
),
|
|
201
|
+
);
|
|
158
202
|
});
|
|
159
203
|
fflag
|
|
160
204
|
.command("set-eval-stuck-ms-v2 <ms>")
|
|
161
205
|
.description("Set eval stuck window")
|
|
162
206
|
.action((ms) => {
|
|
163
207
|
setFflagEvalStuckMsV2(Number(ms));
|
|
164
|
-
console.log(
|
|
208
|
+
console.log(
|
|
209
|
+
JSON.stringify({ fflagEvalStuckMs: getFflagEvalStuckMsV2() }, null, 2),
|
|
210
|
+
);
|
|
165
211
|
});
|
|
166
212
|
fflag
|
|
167
213
|
.command("auto-pause-idle-v2")
|
|
168
214
|
.description("Auto-pause idle active profiles")
|
|
169
|
-
.action(() =>
|
|
215
|
+
.action(() =>
|
|
216
|
+
console.log(JSON.stringify(autoPauseIdleFflagProfilesV2(), null, 2)),
|
|
217
|
+
);
|
|
170
218
|
fflag
|
|
171
219
|
.command("auto-fail-stuck-v2")
|
|
172
220
|
.description("Auto-fail stuck evaluating evals")
|
|
173
|
-
.action(() =>
|
|
221
|
+
.action(() =>
|
|
222
|
+
console.log(JSON.stringify(autoFailStuckFflagEvalsV2(), null, 2)),
|
|
223
|
+
);
|
|
174
224
|
fflag
|
|
175
225
|
.command("gov-stats-v2")
|
|
176
226
|
.description("Show V2 governance stats")
|
|
177
|
-
.action(() =>
|
|
227
|
+
.action(() =>
|
|
228
|
+
console.log(JSON.stringify(getFeatureFlagsGovStatsV2(), null, 2)),
|
|
229
|
+
);
|
|
178
230
|
}
|
package/src/commands/git.js
CHANGED
|
@@ -216,45 +216,185 @@ export function registerGitCommand(program) {
|
|
|
216
216
|
_registerGitV2(git);
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
|
|
220
219
|
import {
|
|
221
|
-
GIT_REPO_MATURITY_V2,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
220
|
+
GIT_REPO_MATURITY_V2,
|
|
221
|
+
GIT_COMMIT_LIFECYCLE_V2,
|
|
222
|
+
setMaxActiveGitReposPerOwnerV2,
|
|
223
|
+
setMaxPendingGitCommitsPerRepoV2,
|
|
224
|
+
setGitRepoIdleMsV2,
|
|
225
|
+
setGitCommitStuckMsV2,
|
|
226
|
+
registerGitRepoV2,
|
|
227
|
+
activateGitRepoV2,
|
|
228
|
+
archiveGitRepoV2,
|
|
229
|
+
decommissionGitRepoV2,
|
|
230
|
+
touchGitRepoV2,
|
|
231
|
+
getGitRepoV2,
|
|
232
|
+
listGitReposV2,
|
|
233
|
+
createGitCommitV2,
|
|
234
|
+
startGitCommitV2,
|
|
235
|
+
commitGitCommitV2,
|
|
236
|
+
failGitCommitV2,
|
|
237
|
+
cancelGitCommitV2,
|
|
238
|
+
getGitCommitV2,
|
|
239
|
+
listGitCommitsV2,
|
|
240
|
+
autoArchiveIdleGitReposV2,
|
|
241
|
+
autoFailStuckGitCommitsV2,
|
|
242
|
+
getGitIntegrationGovStatsV2,
|
|
226
243
|
} from "../lib/git-integration.js";
|
|
227
244
|
|
|
228
245
|
function _registerGitV2(parent) {
|
|
229
|
-
parent
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
parent
|
|
258
|
-
|
|
259
|
-
|
|
246
|
+
parent
|
|
247
|
+
.command("enums-v2")
|
|
248
|
+
.description("List Git V2 enums")
|
|
249
|
+
.option("--json", "JSON")
|
|
250
|
+
.action((opts) => {
|
|
251
|
+
const out = {
|
|
252
|
+
repoMaturity: GIT_REPO_MATURITY_V2,
|
|
253
|
+
commitLifecycle: GIT_COMMIT_LIFECYCLE_V2,
|
|
254
|
+
};
|
|
255
|
+
if (opts.json) console.log(JSON.stringify(out, null, 2));
|
|
256
|
+
else console.log(out);
|
|
257
|
+
});
|
|
258
|
+
parent
|
|
259
|
+
.command("config-set-v2")
|
|
260
|
+
.description("Set Git V2 caps/thresholds")
|
|
261
|
+
.option("--max-active <n>", "max active repos per owner")
|
|
262
|
+
.option("--max-pending <n>", "max pending commits per repo")
|
|
263
|
+
.option("--idle-ms <n>", "repo idle ms")
|
|
264
|
+
.option("--stuck-ms <n>", "commit stuck ms")
|
|
265
|
+
.action((opts) => {
|
|
266
|
+
if (opts.maxActive)
|
|
267
|
+
setMaxActiveGitReposPerOwnerV2(parseInt(opts.maxActive, 10));
|
|
268
|
+
if (opts.maxPending)
|
|
269
|
+
setMaxPendingGitCommitsPerRepoV2(parseInt(opts.maxPending, 10));
|
|
270
|
+
if (opts.idleMs) setGitRepoIdleMsV2(parseInt(opts.idleMs, 10));
|
|
271
|
+
if (opts.stuckMs) setGitCommitStuckMsV2(parseInt(opts.stuckMs, 10));
|
|
272
|
+
console.log("ok");
|
|
273
|
+
});
|
|
274
|
+
parent
|
|
275
|
+
.command("register-repo-v2 <id>")
|
|
276
|
+
.description("Register Git V2 repo")
|
|
277
|
+
.requiredOption("--owner <owner>", "owner")
|
|
278
|
+
.option("--branch <branch>", "branch")
|
|
279
|
+
.option("--json", "JSON")
|
|
280
|
+
.action((id, opts) => {
|
|
281
|
+
const r = registerGitRepoV2({
|
|
282
|
+
id,
|
|
283
|
+
owner: opts.owner,
|
|
284
|
+
branch: opts.branch,
|
|
285
|
+
});
|
|
286
|
+
if (opts.json) console.log(JSON.stringify(r, null, 2));
|
|
287
|
+
else console.log(r);
|
|
288
|
+
});
|
|
289
|
+
parent
|
|
290
|
+
.command("activate-repo-v2 <id>")
|
|
291
|
+
.description("Activate Git V2 repo")
|
|
292
|
+
.action((id) => {
|
|
293
|
+
console.log(activateGitRepoV2(id));
|
|
294
|
+
});
|
|
295
|
+
parent
|
|
296
|
+
.command("archive-repo-v2 <id>")
|
|
297
|
+
.description("Archive Git V2 repo")
|
|
298
|
+
.action((id) => {
|
|
299
|
+
console.log(archiveGitRepoV2(id));
|
|
300
|
+
});
|
|
301
|
+
parent
|
|
302
|
+
.command("decommission-repo-v2 <id>")
|
|
303
|
+
.description("Decommission Git V2 repo")
|
|
304
|
+
.action((id) => {
|
|
305
|
+
console.log(decommissionGitRepoV2(id));
|
|
306
|
+
});
|
|
307
|
+
parent
|
|
308
|
+
.command("touch-repo-v2 <id>")
|
|
309
|
+
.description("Touch Git V2 repo")
|
|
310
|
+
.action((id) => {
|
|
311
|
+
console.log(touchGitRepoV2(id));
|
|
312
|
+
});
|
|
313
|
+
parent
|
|
314
|
+
.command("get-repo-v2 <id>")
|
|
315
|
+
.description("Get Git V2 repo")
|
|
316
|
+
.option("--json", "JSON")
|
|
317
|
+
.action((id, opts) => {
|
|
318
|
+
const r = getGitRepoV2(id);
|
|
319
|
+
if (opts.json) console.log(JSON.stringify(r, null, 2));
|
|
320
|
+
else console.log(r);
|
|
321
|
+
});
|
|
322
|
+
parent
|
|
323
|
+
.command("list-repos-v2")
|
|
324
|
+
.description("List Git V2 repos")
|
|
325
|
+
.option("--json", "JSON")
|
|
326
|
+
.action((opts) => {
|
|
327
|
+
const r = listGitReposV2();
|
|
328
|
+
if (opts.json) console.log(JSON.stringify(r, null, 2));
|
|
329
|
+
else console.log(r);
|
|
330
|
+
});
|
|
331
|
+
parent
|
|
332
|
+
.command("create-commit-v2 <id>")
|
|
333
|
+
.description("Create Git V2 commit")
|
|
334
|
+
.requiredOption("--repo-id <repoId>", "repo id")
|
|
335
|
+
.option("--message <msg>", "commit message")
|
|
336
|
+
.action((id, opts) => {
|
|
337
|
+
console.log(
|
|
338
|
+
createGitCommitV2({ id, repoId: opts.repoId, message: opts.message }),
|
|
339
|
+
);
|
|
340
|
+
});
|
|
341
|
+
parent
|
|
342
|
+
.command("start-commit-v2 <id>")
|
|
343
|
+
.description("Start Git V2 commit")
|
|
344
|
+
.action((id) => {
|
|
345
|
+
console.log(startGitCommitV2(id));
|
|
346
|
+
});
|
|
347
|
+
parent
|
|
348
|
+
.command("commit-commit-v2 <id>")
|
|
349
|
+
.description("Commit Git V2 commit")
|
|
350
|
+
.action((id) => {
|
|
351
|
+
console.log(commitGitCommitV2(id));
|
|
352
|
+
});
|
|
353
|
+
parent
|
|
354
|
+
.command("fail-commit-v2 <id>")
|
|
355
|
+
.description("Fail Git V2 commit")
|
|
356
|
+
.option("--reason <r>", "reason")
|
|
357
|
+
.action((id, opts) => {
|
|
358
|
+
console.log(failGitCommitV2(id, opts.reason));
|
|
359
|
+
});
|
|
360
|
+
parent
|
|
361
|
+
.command("cancel-commit-v2 <id>")
|
|
362
|
+
.description("Cancel Git V2 commit")
|
|
363
|
+
.option("--reason <r>", "reason")
|
|
364
|
+
.action((id, opts) => {
|
|
365
|
+
console.log(cancelGitCommitV2(id, opts.reason));
|
|
366
|
+
});
|
|
367
|
+
parent
|
|
368
|
+
.command("get-commit-v2 <id>")
|
|
369
|
+
.description("Get Git V2 commit")
|
|
370
|
+
.action((id) => {
|
|
371
|
+
console.log(getGitCommitV2(id));
|
|
372
|
+
});
|
|
373
|
+
parent
|
|
374
|
+
.command("list-commits-v2")
|
|
375
|
+
.description("List Git V2 commits")
|
|
376
|
+
.action(() => {
|
|
377
|
+
console.log(listGitCommitsV2());
|
|
378
|
+
});
|
|
379
|
+
parent
|
|
380
|
+
.command("auto-archive-repos-v2")
|
|
381
|
+
.description("Auto-archive idle Git V2 repos")
|
|
382
|
+
.action(() => {
|
|
383
|
+
console.log(autoArchiveIdleGitReposV2());
|
|
384
|
+
});
|
|
385
|
+
parent
|
|
386
|
+
.command("auto-fail-commits-v2")
|
|
387
|
+
.description("Auto-fail stuck Git V2 commits")
|
|
388
|
+
.action(() => {
|
|
389
|
+
console.log(autoFailStuckGitCommitsV2());
|
|
390
|
+
});
|
|
391
|
+
parent
|
|
392
|
+
.command("gov-stats-v2")
|
|
393
|
+
.description("Git V2 governance stats")
|
|
394
|
+
.option("--json", "JSON")
|
|
395
|
+
.action((opts) => {
|
|
396
|
+
const s = getGitIntegrationGovStatsV2();
|
|
397
|
+
if (opts.json) console.log(JSON.stringify(s, null, 2));
|
|
398
|
+
else console.log(s);
|
|
399
|
+
});
|
|
260
400
|
}
|