chainlesschain 0.152.0 → 0.156.2
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/start.js
CHANGED
|
@@ -66,3 +66,212 @@ export function registerStartCommand(program) {
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
+
|
|
70
|
+
// === Iter27 V2 governance overlay ===
|
|
71
|
+
export function registerPmgrgovV2Commands(program) {
|
|
72
|
+
const parent = program.commands.find((c) => c.name() === "start");
|
|
73
|
+
if (!parent) return;
|
|
74
|
+
const L = async () => await import("../lib/process-manager.js");
|
|
75
|
+
parent
|
|
76
|
+
.command("pmgrgov-enums-v2")
|
|
77
|
+
.description("Show V2 enums")
|
|
78
|
+
.action(async () => {
|
|
79
|
+
const m = await L();
|
|
80
|
+
console.log(
|
|
81
|
+
JSON.stringify(
|
|
82
|
+
{
|
|
83
|
+
profileMaturity: m.PMGRGOV_PROFILE_MATURITY_V2,
|
|
84
|
+
procLifecycle: m.PMGRGOV_PROC_LIFECYCLE_V2,
|
|
85
|
+
},
|
|
86
|
+
null,
|
|
87
|
+
2,
|
|
88
|
+
),
|
|
89
|
+
);
|
|
90
|
+
});
|
|
91
|
+
parent
|
|
92
|
+
.command("pmgrgov-config-v2")
|
|
93
|
+
.description("Show V2 config")
|
|
94
|
+
.action(async () => {
|
|
95
|
+
const m = await L();
|
|
96
|
+
console.log(
|
|
97
|
+
JSON.stringify(
|
|
98
|
+
{
|
|
99
|
+
maxActive: m.getMaxActivePmgrgovProfilesPerOwnerV2(),
|
|
100
|
+
maxPending: m.getMaxPendingPmgrgovProcsPerProfileV2(),
|
|
101
|
+
idleMs: m.getPmgrgovProfileIdleMsV2(),
|
|
102
|
+
stuckMs: m.getPmgrgovProcStuckMsV2(),
|
|
103
|
+
},
|
|
104
|
+
null,
|
|
105
|
+
2,
|
|
106
|
+
),
|
|
107
|
+
);
|
|
108
|
+
});
|
|
109
|
+
parent
|
|
110
|
+
.command("pmgrgov-set-max-active-v2 <n>")
|
|
111
|
+
.description("Set max active")
|
|
112
|
+
.action(async (n) => {
|
|
113
|
+
(await L()).setMaxActivePmgrgovProfilesPerOwnerV2(Number(n));
|
|
114
|
+
console.log("ok");
|
|
115
|
+
});
|
|
116
|
+
parent
|
|
117
|
+
.command("pmgrgov-set-max-pending-v2 <n>")
|
|
118
|
+
.description("Set max pending")
|
|
119
|
+
.action(async (n) => {
|
|
120
|
+
(await L()).setMaxPendingPmgrgovProcsPerProfileV2(Number(n));
|
|
121
|
+
console.log("ok");
|
|
122
|
+
});
|
|
123
|
+
parent
|
|
124
|
+
.command("pmgrgov-set-idle-ms-v2 <n>")
|
|
125
|
+
.description("Set idle threshold ms")
|
|
126
|
+
.action(async (n) => {
|
|
127
|
+
(await L()).setPmgrgovProfileIdleMsV2(Number(n));
|
|
128
|
+
console.log("ok");
|
|
129
|
+
});
|
|
130
|
+
parent
|
|
131
|
+
.command("pmgrgov-set-stuck-ms-v2 <n>")
|
|
132
|
+
.description("Set stuck threshold ms")
|
|
133
|
+
.action(async (n) => {
|
|
134
|
+
(await L()).setPmgrgovProcStuckMsV2(Number(n));
|
|
135
|
+
console.log("ok");
|
|
136
|
+
});
|
|
137
|
+
parent
|
|
138
|
+
.command("pmgrgov-register-v2 <id> <owner>")
|
|
139
|
+
.description("Register V2 profile")
|
|
140
|
+
.option("--kind <v>", "kind")
|
|
141
|
+
.action(async (id, owner, o) => {
|
|
142
|
+
const m = await L();
|
|
143
|
+
console.log(
|
|
144
|
+
JSON.stringify(
|
|
145
|
+
m.registerPmgrgovProfileV2({ id, owner, kind: o.kind }),
|
|
146
|
+
null,
|
|
147
|
+
2,
|
|
148
|
+
),
|
|
149
|
+
);
|
|
150
|
+
});
|
|
151
|
+
parent
|
|
152
|
+
.command("pmgrgov-activate-v2 <id>")
|
|
153
|
+
.description("Activate profile")
|
|
154
|
+
.action(async (id) => {
|
|
155
|
+
console.log(
|
|
156
|
+
JSON.stringify((await L()).activatePmgrgovProfileV2(id), null, 2),
|
|
157
|
+
);
|
|
158
|
+
});
|
|
159
|
+
parent
|
|
160
|
+
.command("pmgrgov-stop-v2 <id>")
|
|
161
|
+
.description("Stop profile")
|
|
162
|
+
.action(async (id) => {
|
|
163
|
+
console.log(
|
|
164
|
+
JSON.stringify((await L()).stopPmgrgovProfileV2(id), null, 2),
|
|
165
|
+
);
|
|
166
|
+
});
|
|
167
|
+
parent
|
|
168
|
+
.command("pmgrgov-archive-v2 <id>")
|
|
169
|
+
.description("Archive profile")
|
|
170
|
+
.action(async (id) => {
|
|
171
|
+
console.log(
|
|
172
|
+
JSON.stringify((await L()).archivePmgrgovProfileV2(id), null, 2),
|
|
173
|
+
);
|
|
174
|
+
});
|
|
175
|
+
parent
|
|
176
|
+
.command("pmgrgov-touch-v2 <id>")
|
|
177
|
+
.description("Touch profile")
|
|
178
|
+
.action(async (id) => {
|
|
179
|
+
console.log(
|
|
180
|
+
JSON.stringify((await L()).touchPmgrgovProfileV2(id), null, 2),
|
|
181
|
+
);
|
|
182
|
+
});
|
|
183
|
+
parent
|
|
184
|
+
.command("pmgrgov-get-v2 <id>")
|
|
185
|
+
.description("Get profile")
|
|
186
|
+
.action(async (id) => {
|
|
187
|
+
console.log(JSON.stringify((await L()).getPmgrgovProfileV2(id), null, 2));
|
|
188
|
+
});
|
|
189
|
+
parent
|
|
190
|
+
.command("pmgrgov-list-v2")
|
|
191
|
+
.description("List profiles")
|
|
192
|
+
.action(async () => {
|
|
193
|
+
console.log(JSON.stringify((await L()).listPmgrgovProfilesV2(), null, 2));
|
|
194
|
+
});
|
|
195
|
+
parent
|
|
196
|
+
.command("pmgrgov-create-proc-v2 <id> <profileId>")
|
|
197
|
+
.description("Create proc")
|
|
198
|
+
.option("--command <v>", "command")
|
|
199
|
+
.action(async (id, profileId, o) => {
|
|
200
|
+
const m = await L();
|
|
201
|
+
console.log(
|
|
202
|
+
JSON.stringify(
|
|
203
|
+
m.createPmgrgovProcV2({ id, profileId, command: o.command }),
|
|
204
|
+
null,
|
|
205
|
+
2,
|
|
206
|
+
),
|
|
207
|
+
);
|
|
208
|
+
});
|
|
209
|
+
parent
|
|
210
|
+
.command("pmgrgov-starting-proc-v2 <id>")
|
|
211
|
+
.description("Mark proc as starting")
|
|
212
|
+
.action(async (id) => {
|
|
213
|
+
console.log(
|
|
214
|
+
JSON.stringify((await L()).startingPmgrgovProcV2(id), null, 2),
|
|
215
|
+
);
|
|
216
|
+
});
|
|
217
|
+
parent
|
|
218
|
+
.command("pmgrgov-complete-proc-v2 <id>")
|
|
219
|
+
.description("Complete proc")
|
|
220
|
+
.action(async (id) => {
|
|
221
|
+
console.log(
|
|
222
|
+
JSON.stringify((await L()).completeProcPmgrgovV2(id), null, 2),
|
|
223
|
+
);
|
|
224
|
+
});
|
|
225
|
+
parent
|
|
226
|
+
.command("pmgrgov-fail-proc-v2 <id> [reason]")
|
|
227
|
+
.description("Fail proc")
|
|
228
|
+
.action(async (id, reason) => {
|
|
229
|
+
console.log(
|
|
230
|
+
JSON.stringify((await L()).failPmgrgovProcV2(id, reason), null, 2),
|
|
231
|
+
);
|
|
232
|
+
});
|
|
233
|
+
parent
|
|
234
|
+
.command("pmgrgov-cancel-proc-v2 <id> [reason]")
|
|
235
|
+
.description("Cancel proc")
|
|
236
|
+
.action(async (id, reason) => {
|
|
237
|
+
console.log(
|
|
238
|
+
JSON.stringify((await L()).cancelPmgrgovProcV2(id, reason), null, 2),
|
|
239
|
+
);
|
|
240
|
+
});
|
|
241
|
+
parent
|
|
242
|
+
.command("pmgrgov-get-proc-v2 <id>")
|
|
243
|
+
.description("Get proc")
|
|
244
|
+
.action(async (id) => {
|
|
245
|
+
console.log(JSON.stringify((await L()).getPmgrgovProcV2(id), null, 2));
|
|
246
|
+
});
|
|
247
|
+
parent
|
|
248
|
+
.command("pmgrgov-list-procs-v2")
|
|
249
|
+
.description("List procs")
|
|
250
|
+
.action(async () => {
|
|
251
|
+
console.log(JSON.stringify((await L()).listPmgrgovProcsV2(), null, 2));
|
|
252
|
+
});
|
|
253
|
+
parent
|
|
254
|
+
.command("pmgrgov-auto-stop-idle-v2")
|
|
255
|
+
.description("Auto-stop idle")
|
|
256
|
+
.action(async () => {
|
|
257
|
+
console.log(
|
|
258
|
+
JSON.stringify((await L()).autoStopIdlePmgrgovProfilesV2(), null, 2),
|
|
259
|
+
);
|
|
260
|
+
});
|
|
261
|
+
parent
|
|
262
|
+
.command("pmgrgov-auto-fail-stuck-v2")
|
|
263
|
+
.description("Auto-fail stuck procs")
|
|
264
|
+
.action(async () => {
|
|
265
|
+
console.log(
|
|
266
|
+
JSON.stringify((await L()).autoFailStuckPmgrgovProcsV2(), null, 2),
|
|
267
|
+
);
|
|
268
|
+
});
|
|
269
|
+
parent
|
|
270
|
+
.command("pmgrgov-gov-stats-v2")
|
|
271
|
+
.description("V2 gov stats")
|
|
272
|
+
.action(async () => {
|
|
273
|
+
console.log(
|
|
274
|
+
JSON.stringify((await L()).getProcessManagerGovStatsV2(), null, 2),
|
|
275
|
+
);
|
|
276
|
+
});
|
|
277
|
+
}
|
package/src/commands/stream.js
CHANGED
|
@@ -73,3 +73,216 @@ export function registerStreamCommand(program) {
|
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
+
|
|
77
|
+
// === Iter27 V2 governance overlay ===
|
|
78
|
+
export function registerPstrmgovV2Commands(program) {
|
|
79
|
+
const parent = program.commands.find((c) => c.name() === "stream");
|
|
80
|
+
if (!parent) return;
|
|
81
|
+
const L = async () => await import("../lib/provider-stream.js");
|
|
82
|
+
parent
|
|
83
|
+
.command("pstrmgov-enums-v2")
|
|
84
|
+
.description("Show V2 enums")
|
|
85
|
+
.action(async () => {
|
|
86
|
+
const m = await L();
|
|
87
|
+
console.log(
|
|
88
|
+
JSON.stringify(
|
|
89
|
+
{
|
|
90
|
+
profileMaturity: m.PSTRMGOV_PROFILE_MATURITY_V2,
|
|
91
|
+
chunkLifecycle: m.PSTRMGOV_CHUNK_LIFECYCLE_V2,
|
|
92
|
+
},
|
|
93
|
+
null,
|
|
94
|
+
2,
|
|
95
|
+
),
|
|
96
|
+
);
|
|
97
|
+
});
|
|
98
|
+
parent
|
|
99
|
+
.command("pstrmgov-config-v2")
|
|
100
|
+
.description("Show V2 config")
|
|
101
|
+
.action(async () => {
|
|
102
|
+
const m = await L();
|
|
103
|
+
console.log(
|
|
104
|
+
JSON.stringify(
|
|
105
|
+
{
|
|
106
|
+
maxActive: m.getMaxActivePstrmgovProfilesPerOwnerV2(),
|
|
107
|
+
maxPending: m.getMaxPendingPstrmgovChunksPerProfileV2(),
|
|
108
|
+
idleMs: m.getPstrmgovProfileIdleMsV2(),
|
|
109
|
+
stuckMs: m.getPstrmgovChunkStuckMsV2(),
|
|
110
|
+
},
|
|
111
|
+
null,
|
|
112
|
+
2,
|
|
113
|
+
),
|
|
114
|
+
);
|
|
115
|
+
});
|
|
116
|
+
parent
|
|
117
|
+
.command("pstrmgov-set-max-active-v2 <n>")
|
|
118
|
+
.description("Set max active")
|
|
119
|
+
.action(async (n) => {
|
|
120
|
+
(await L()).setMaxActivePstrmgovProfilesPerOwnerV2(Number(n));
|
|
121
|
+
console.log("ok");
|
|
122
|
+
});
|
|
123
|
+
parent
|
|
124
|
+
.command("pstrmgov-set-max-pending-v2 <n>")
|
|
125
|
+
.description("Set max pending")
|
|
126
|
+
.action(async (n) => {
|
|
127
|
+
(await L()).setMaxPendingPstrmgovChunksPerProfileV2(Number(n));
|
|
128
|
+
console.log("ok");
|
|
129
|
+
});
|
|
130
|
+
parent
|
|
131
|
+
.command("pstrmgov-set-idle-ms-v2 <n>")
|
|
132
|
+
.description("Set idle threshold ms")
|
|
133
|
+
.action(async (n) => {
|
|
134
|
+
(await L()).setPstrmgovProfileIdleMsV2(Number(n));
|
|
135
|
+
console.log("ok");
|
|
136
|
+
});
|
|
137
|
+
parent
|
|
138
|
+
.command("pstrmgov-set-stuck-ms-v2 <n>")
|
|
139
|
+
.description("Set stuck threshold ms")
|
|
140
|
+
.action(async (n) => {
|
|
141
|
+
(await L()).setPstrmgovChunkStuckMsV2(Number(n));
|
|
142
|
+
console.log("ok");
|
|
143
|
+
});
|
|
144
|
+
parent
|
|
145
|
+
.command("pstrmgov-register-v2 <id> <owner>")
|
|
146
|
+
.description("Register V2 profile")
|
|
147
|
+
.option("--provider <v>", "provider")
|
|
148
|
+
.action(async (id, owner, o) => {
|
|
149
|
+
const m = await L();
|
|
150
|
+
console.log(
|
|
151
|
+
JSON.stringify(
|
|
152
|
+
m.registerPstrmgovProfileV2({ id, owner, provider: o.provider }),
|
|
153
|
+
null,
|
|
154
|
+
2,
|
|
155
|
+
),
|
|
156
|
+
);
|
|
157
|
+
});
|
|
158
|
+
parent
|
|
159
|
+
.command("pstrmgov-activate-v2 <id>")
|
|
160
|
+
.description("Activate profile")
|
|
161
|
+
.action(async (id) => {
|
|
162
|
+
console.log(
|
|
163
|
+
JSON.stringify((await L()).activatePstrmgovProfileV2(id), null, 2),
|
|
164
|
+
);
|
|
165
|
+
});
|
|
166
|
+
parent
|
|
167
|
+
.command("pstrmgov-stale-v2 <id>")
|
|
168
|
+
.description("Stale profile")
|
|
169
|
+
.action(async (id) => {
|
|
170
|
+
console.log(
|
|
171
|
+
JSON.stringify((await L()).stalePstrmgovProfileV2(id), null, 2),
|
|
172
|
+
);
|
|
173
|
+
});
|
|
174
|
+
parent
|
|
175
|
+
.command("pstrmgov-archive-v2 <id>")
|
|
176
|
+
.description("Archive profile")
|
|
177
|
+
.action(async (id) => {
|
|
178
|
+
console.log(
|
|
179
|
+
JSON.stringify((await L()).archivePstrmgovProfileV2(id), null, 2),
|
|
180
|
+
);
|
|
181
|
+
});
|
|
182
|
+
parent
|
|
183
|
+
.command("pstrmgov-touch-v2 <id>")
|
|
184
|
+
.description("Touch profile")
|
|
185
|
+
.action(async (id) => {
|
|
186
|
+
console.log(
|
|
187
|
+
JSON.stringify((await L()).touchPstrmgovProfileV2(id), null, 2),
|
|
188
|
+
);
|
|
189
|
+
});
|
|
190
|
+
parent
|
|
191
|
+
.command("pstrmgov-get-v2 <id>")
|
|
192
|
+
.description("Get profile")
|
|
193
|
+
.action(async (id) => {
|
|
194
|
+
console.log(
|
|
195
|
+
JSON.stringify((await L()).getPstrmgovProfileV2(id), null, 2),
|
|
196
|
+
);
|
|
197
|
+
});
|
|
198
|
+
parent
|
|
199
|
+
.command("pstrmgov-list-v2")
|
|
200
|
+
.description("List profiles")
|
|
201
|
+
.action(async () => {
|
|
202
|
+
console.log(
|
|
203
|
+
JSON.stringify((await L()).listPstrmgovProfilesV2(), null, 2),
|
|
204
|
+
);
|
|
205
|
+
});
|
|
206
|
+
parent
|
|
207
|
+
.command("pstrmgov-create-chunk-v2 <id> <profileId>")
|
|
208
|
+
.description("Create chunk")
|
|
209
|
+
.option("--tokenId <v>", "tokenId")
|
|
210
|
+
.action(async (id, profileId, o) => {
|
|
211
|
+
const m = await L();
|
|
212
|
+
console.log(
|
|
213
|
+
JSON.stringify(
|
|
214
|
+
m.createPstrmgovChunkV2({ id, profileId, tokenId: o.tokenId }),
|
|
215
|
+
null,
|
|
216
|
+
2,
|
|
217
|
+
),
|
|
218
|
+
);
|
|
219
|
+
});
|
|
220
|
+
parent
|
|
221
|
+
.command("pstrmgov-streaming-chunk-v2 <id>")
|
|
222
|
+
.description("Mark chunk as streaming")
|
|
223
|
+
.action(async (id) => {
|
|
224
|
+
console.log(
|
|
225
|
+
JSON.stringify((await L()).streamingPstrmgovChunkV2(id), null, 2),
|
|
226
|
+
);
|
|
227
|
+
});
|
|
228
|
+
parent
|
|
229
|
+
.command("pstrmgov-complete-chunk-v2 <id>")
|
|
230
|
+
.description("Complete chunk")
|
|
231
|
+
.action(async (id) => {
|
|
232
|
+
console.log(
|
|
233
|
+
JSON.stringify((await L()).completeChunkPstrmgovV2(id), null, 2),
|
|
234
|
+
);
|
|
235
|
+
});
|
|
236
|
+
parent
|
|
237
|
+
.command("pstrmgov-fail-chunk-v2 <id> [reason]")
|
|
238
|
+
.description("Fail chunk")
|
|
239
|
+
.action(async (id, reason) => {
|
|
240
|
+
console.log(
|
|
241
|
+
JSON.stringify((await L()).failPstrmgovChunkV2(id, reason), null, 2),
|
|
242
|
+
);
|
|
243
|
+
});
|
|
244
|
+
parent
|
|
245
|
+
.command("pstrmgov-cancel-chunk-v2 <id> [reason]")
|
|
246
|
+
.description("Cancel chunk")
|
|
247
|
+
.action(async (id, reason) => {
|
|
248
|
+
console.log(
|
|
249
|
+
JSON.stringify((await L()).cancelPstrmgovChunkV2(id, reason), null, 2),
|
|
250
|
+
);
|
|
251
|
+
});
|
|
252
|
+
parent
|
|
253
|
+
.command("pstrmgov-get-chunk-v2 <id>")
|
|
254
|
+
.description("Get chunk")
|
|
255
|
+
.action(async (id) => {
|
|
256
|
+
console.log(JSON.stringify((await L()).getPstrmgovChunkV2(id), null, 2));
|
|
257
|
+
});
|
|
258
|
+
parent
|
|
259
|
+
.command("pstrmgov-list-chunks-v2")
|
|
260
|
+
.description("List chunks")
|
|
261
|
+
.action(async () => {
|
|
262
|
+
console.log(JSON.stringify((await L()).listPstrmgovChunksV2(), null, 2));
|
|
263
|
+
});
|
|
264
|
+
parent
|
|
265
|
+
.command("pstrmgov-auto-stale-idle-v2")
|
|
266
|
+
.description("Auto-stale idle")
|
|
267
|
+
.action(async () => {
|
|
268
|
+
console.log(
|
|
269
|
+
JSON.stringify((await L()).autoStaleIdlePstrmgovProfilesV2(), null, 2),
|
|
270
|
+
);
|
|
271
|
+
});
|
|
272
|
+
parent
|
|
273
|
+
.command("pstrmgov-auto-fail-stuck-v2")
|
|
274
|
+
.description("Auto-fail stuck chunks")
|
|
275
|
+
.action(async () => {
|
|
276
|
+
console.log(
|
|
277
|
+
JSON.stringify((await L()).autoFailStuckPstrmgovChunksV2(), null, 2),
|
|
278
|
+
);
|
|
279
|
+
});
|
|
280
|
+
parent
|
|
281
|
+
.command("pstrmgov-gov-stats-v2")
|
|
282
|
+
.description("V2 gov stats")
|
|
283
|
+
.action(async () => {
|
|
284
|
+
console.log(
|
|
285
|
+
JSON.stringify((await L()).getProviderStreamGovStatsV2(), null, 2),
|
|
286
|
+
);
|
|
287
|
+
});
|
|
288
|
+
}
|
package/src/commands/ui.js
CHANGED
|
@@ -34,3 +34,228 @@ export function registerUiCommand(program) {
|
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
+
|
|
38
|
+
// === Iter26 V2 governance overlay ===
|
|
39
|
+
export function registerWebuigovV2Commands(program) {
|
|
40
|
+
const parent = program.commands.find((c) => c.name() === "ui");
|
|
41
|
+
if (!parent) return;
|
|
42
|
+
const L = async () => await import("../lib/web-ui-server.js");
|
|
43
|
+
parent
|
|
44
|
+
.command("webuigov-enums-v2")
|
|
45
|
+
.description("Show V2 enums")
|
|
46
|
+
.action(async () => {
|
|
47
|
+
const m = await L();
|
|
48
|
+
console.log(
|
|
49
|
+
JSON.stringify(
|
|
50
|
+
{
|
|
51
|
+
profileMaturity: m.WEBUIGOV_PROFILE_MATURITY_V2,
|
|
52
|
+
requestLifecycle: m.WEBUIGOV_REQUEST_LIFECYCLE_V2,
|
|
53
|
+
},
|
|
54
|
+
null,
|
|
55
|
+
2,
|
|
56
|
+
),
|
|
57
|
+
);
|
|
58
|
+
});
|
|
59
|
+
parent
|
|
60
|
+
.command("webuigov-config-v2")
|
|
61
|
+
.description("Show V2 config")
|
|
62
|
+
.action(async () => {
|
|
63
|
+
const m = await L();
|
|
64
|
+
console.log(
|
|
65
|
+
JSON.stringify(
|
|
66
|
+
{
|
|
67
|
+
maxActive: m.getMaxActiveWebuigovProfilesPerOwnerV2(),
|
|
68
|
+
maxPending: m.getMaxPendingWebuigovRequestsPerProfileV2(),
|
|
69
|
+
idleMs: m.getWebuigovProfileIdleMsV2(),
|
|
70
|
+
stuckMs: m.getWebuigovRequestStuckMsV2(),
|
|
71
|
+
},
|
|
72
|
+
null,
|
|
73
|
+
2,
|
|
74
|
+
),
|
|
75
|
+
);
|
|
76
|
+
});
|
|
77
|
+
parent
|
|
78
|
+
.command("webuigov-set-max-active-v2 <n>")
|
|
79
|
+
.description("Set max active")
|
|
80
|
+
.action(async (n) => {
|
|
81
|
+
(await L()).setMaxActiveWebuigovProfilesPerOwnerV2(Number(n));
|
|
82
|
+
console.log("ok");
|
|
83
|
+
});
|
|
84
|
+
parent
|
|
85
|
+
.command("webuigov-set-max-pending-v2 <n>")
|
|
86
|
+
.description("Set max pending")
|
|
87
|
+
.action(async (n) => {
|
|
88
|
+
(await L()).setMaxPendingWebuigovRequestsPerProfileV2(Number(n));
|
|
89
|
+
console.log("ok");
|
|
90
|
+
});
|
|
91
|
+
parent
|
|
92
|
+
.command("webuigov-set-idle-ms-v2 <n>")
|
|
93
|
+
.description("Set idle threshold ms")
|
|
94
|
+
.action(async (n) => {
|
|
95
|
+
(await L()).setWebuigovProfileIdleMsV2(Number(n));
|
|
96
|
+
console.log("ok");
|
|
97
|
+
});
|
|
98
|
+
parent
|
|
99
|
+
.command("webuigov-set-stuck-ms-v2 <n>")
|
|
100
|
+
.description("Set stuck threshold ms")
|
|
101
|
+
.action(async (n) => {
|
|
102
|
+
(await L()).setWebuigovRequestStuckMsV2(Number(n));
|
|
103
|
+
console.log("ok");
|
|
104
|
+
});
|
|
105
|
+
parent
|
|
106
|
+
.command("webuigov-register-v2 <id> <owner>")
|
|
107
|
+
.description("Register V2 profile")
|
|
108
|
+
.option("--endpoint <v>", "endpoint")
|
|
109
|
+
.action(async (id, owner, o) => {
|
|
110
|
+
const m = await L();
|
|
111
|
+
console.log(
|
|
112
|
+
JSON.stringify(
|
|
113
|
+
m.registerWebuigovProfileV2({ id, owner, endpoint: o.endpoint }),
|
|
114
|
+
null,
|
|
115
|
+
2,
|
|
116
|
+
),
|
|
117
|
+
);
|
|
118
|
+
});
|
|
119
|
+
parent
|
|
120
|
+
.command("webuigov-activate-v2 <id>")
|
|
121
|
+
.description("Activate profile")
|
|
122
|
+
.action(async (id) => {
|
|
123
|
+
console.log(
|
|
124
|
+
JSON.stringify((await L()).activateWebuigovProfileV2(id), null, 2),
|
|
125
|
+
);
|
|
126
|
+
});
|
|
127
|
+
parent
|
|
128
|
+
.command("webuigov-degrade-v2 <id>")
|
|
129
|
+
.description("Degrade profile")
|
|
130
|
+
.action(async (id) => {
|
|
131
|
+
console.log(
|
|
132
|
+
JSON.stringify((await L()).degradeWebuigovProfileV2(id), null, 2),
|
|
133
|
+
);
|
|
134
|
+
});
|
|
135
|
+
parent
|
|
136
|
+
.command("webuigov-archive-v2 <id>")
|
|
137
|
+
.description("Archive profile")
|
|
138
|
+
.action(async (id) => {
|
|
139
|
+
console.log(
|
|
140
|
+
JSON.stringify((await L()).archiveWebuigovProfileV2(id), null, 2),
|
|
141
|
+
);
|
|
142
|
+
});
|
|
143
|
+
parent
|
|
144
|
+
.command("webuigov-touch-v2 <id>")
|
|
145
|
+
.description("Touch profile")
|
|
146
|
+
.action(async (id) => {
|
|
147
|
+
console.log(
|
|
148
|
+
JSON.stringify((await L()).touchWebuigovProfileV2(id), null, 2),
|
|
149
|
+
);
|
|
150
|
+
});
|
|
151
|
+
parent
|
|
152
|
+
.command("webuigov-get-v2 <id>")
|
|
153
|
+
.description("Get profile")
|
|
154
|
+
.action(async (id) => {
|
|
155
|
+
console.log(
|
|
156
|
+
JSON.stringify((await L()).getWebuigovProfileV2(id), null, 2),
|
|
157
|
+
);
|
|
158
|
+
});
|
|
159
|
+
parent
|
|
160
|
+
.command("webuigov-list-v2")
|
|
161
|
+
.description("List profiles")
|
|
162
|
+
.action(async () => {
|
|
163
|
+
console.log(
|
|
164
|
+
JSON.stringify((await L()).listWebuigovProfilesV2(), null, 2),
|
|
165
|
+
);
|
|
166
|
+
});
|
|
167
|
+
parent
|
|
168
|
+
.command("webuigov-create-request-v2 <id> <profileId>")
|
|
169
|
+
.description("Create request")
|
|
170
|
+
.option("--method <v>", "method")
|
|
171
|
+
.action(async (id, profileId, o) => {
|
|
172
|
+
const m = await L();
|
|
173
|
+
console.log(
|
|
174
|
+
JSON.stringify(
|
|
175
|
+
m.createWebuigovRequestV2({ id, profileId, method: o.method }),
|
|
176
|
+
null,
|
|
177
|
+
2,
|
|
178
|
+
),
|
|
179
|
+
);
|
|
180
|
+
});
|
|
181
|
+
parent
|
|
182
|
+
.command("webuigov-serving-request-v2 <id>")
|
|
183
|
+
.description("Mark request as serving")
|
|
184
|
+
.action(async (id) => {
|
|
185
|
+
console.log(
|
|
186
|
+
JSON.stringify((await L()).servingWebuigovRequestV2(id), null, 2),
|
|
187
|
+
);
|
|
188
|
+
});
|
|
189
|
+
parent
|
|
190
|
+
.command("webuigov-complete-request-v2 <id>")
|
|
191
|
+
.description("Complete request")
|
|
192
|
+
.action(async (id) => {
|
|
193
|
+
console.log(
|
|
194
|
+
JSON.stringify((await L()).completeRequestWebuigovV2(id), null, 2),
|
|
195
|
+
);
|
|
196
|
+
});
|
|
197
|
+
parent
|
|
198
|
+
.command("webuigov-fail-request-v2 <id> [reason]")
|
|
199
|
+
.description("Fail request")
|
|
200
|
+
.action(async (id, reason) => {
|
|
201
|
+
console.log(
|
|
202
|
+
JSON.stringify((await L()).failWebuigovRequestV2(id, reason), null, 2),
|
|
203
|
+
);
|
|
204
|
+
});
|
|
205
|
+
parent
|
|
206
|
+
.command("webuigov-cancel-request-v2 <id> [reason]")
|
|
207
|
+
.description("Cancel request")
|
|
208
|
+
.action(async (id, reason) => {
|
|
209
|
+
console.log(
|
|
210
|
+
JSON.stringify(
|
|
211
|
+
(await L()).cancelWebuigovRequestV2(id, reason),
|
|
212
|
+
null,
|
|
213
|
+
2,
|
|
214
|
+
),
|
|
215
|
+
);
|
|
216
|
+
});
|
|
217
|
+
parent
|
|
218
|
+
.command("webuigov-get-request-v2 <id>")
|
|
219
|
+
.description("Get request")
|
|
220
|
+
.action(async (id) => {
|
|
221
|
+
console.log(
|
|
222
|
+
JSON.stringify((await L()).getWebuigovRequestV2(id), null, 2),
|
|
223
|
+
);
|
|
224
|
+
});
|
|
225
|
+
parent
|
|
226
|
+
.command("webuigov-list-requests-v2")
|
|
227
|
+
.description("List requests")
|
|
228
|
+
.action(async () => {
|
|
229
|
+
console.log(
|
|
230
|
+
JSON.stringify((await L()).listWebuigovRequestsV2(), null, 2),
|
|
231
|
+
);
|
|
232
|
+
});
|
|
233
|
+
parent
|
|
234
|
+
.command("webuigov-auto-degrade-idle-v2")
|
|
235
|
+
.description("Auto-degrade idle")
|
|
236
|
+
.action(async () => {
|
|
237
|
+
console.log(
|
|
238
|
+
JSON.stringify(
|
|
239
|
+
(await L()).autoDegradeIdleWebuigovProfilesV2(),
|
|
240
|
+
null,
|
|
241
|
+
2,
|
|
242
|
+
),
|
|
243
|
+
);
|
|
244
|
+
});
|
|
245
|
+
parent
|
|
246
|
+
.command("webuigov-auto-fail-stuck-v2")
|
|
247
|
+
.description("Auto-fail stuck requests")
|
|
248
|
+
.action(async () => {
|
|
249
|
+
console.log(
|
|
250
|
+
JSON.stringify((await L()).autoFailStuckWebuigovRequestsV2(), null, 2),
|
|
251
|
+
);
|
|
252
|
+
});
|
|
253
|
+
parent
|
|
254
|
+
.command("webuigov-gov-stats-v2")
|
|
255
|
+
.description("V2 gov stats")
|
|
256
|
+
.action(async () => {
|
|
257
|
+
console.log(
|
|
258
|
+
JSON.stringify((await L()).getWebUiServerGovStatsV2(), null, 2),
|
|
259
|
+
);
|
|
260
|
+
});
|
|
261
|
+
}
|