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
|
@@ -203,3 +203,343 @@ export async function publishTemplate(template, meta = {}) {
|
|
|
203
203
|
const gene = buildTemplateGene(template, meta);
|
|
204
204
|
return client.publish(gene);
|
|
205
205
|
}
|
|
206
|
+
|
|
207
|
+
// =====================================================================
|
|
208
|
+
// cowork-template-marketplace V2 governance overlay (iter25)
|
|
209
|
+
// =====================================================================
|
|
210
|
+
export const CTMGOV_PROFILE_MATURITY_V2 = Object.freeze({
|
|
211
|
+
PENDING: "pending",
|
|
212
|
+
ACTIVE: "active",
|
|
213
|
+
SUSPENDED: "suspended",
|
|
214
|
+
ARCHIVED: "archived",
|
|
215
|
+
});
|
|
216
|
+
export const CTMGOV_ORDER_LIFECYCLE_V2 = Object.freeze({
|
|
217
|
+
QUEUED: "queued",
|
|
218
|
+
FULFILLING: "fulfilling",
|
|
219
|
+
FULFILLED: "fulfilled",
|
|
220
|
+
FAILED: "failed",
|
|
221
|
+
CANCELLED: "cancelled",
|
|
222
|
+
});
|
|
223
|
+
const _ctmgovPTrans = new Map([
|
|
224
|
+
[
|
|
225
|
+
CTMGOV_PROFILE_MATURITY_V2.PENDING,
|
|
226
|
+
new Set([
|
|
227
|
+
CTMGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
228
|
+
CTMGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
229
|
+
]),
|
|
230
|
+
],
|
|
231
|
+
[
|
|
232
|
+
CTMGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
233
|
+
new Set([
|
|
234
|
+
CTMGOV_PROFILE_MATURITY_V2.SUSPENDED,
|
|
235
|
+
CTMGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
236
|
+
]),
|
|
237
|
+
],
|
|
238
|
+
[
|
|
239
|
+
CTMGOV_PROFILE_MATURITY_V2.SUSPENDED,
|
|
240
|
+
new Set([
|
|
241
|
+
CTMGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
242
|
+
CTMGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
243
|
+
]),
|
|
244
|
+
],
|
|
245
|
+
[CTMGOV_PROFILE_MATURITY_V2.ARCHIVED, new Set()],
|
|
246
|
+
]);
|
|
247
|
+
const _ctmgovPTerminal = new Set([CTMGOV_PROFILE_MATURITY_V2.ARCHIVED]);
|
|
248
|
+
const _ctmgovJTrans = new Map([
|
|
249
|
+
[
|
|
250
|
+
CTMGOV_ORDER_LIFECYCLE_V2.QUEUED,
|
|
251
|
+
new Set([
|
|
252
|
+
CTMGOV_ORDER_LIFECYCLE_V2.FULFILLING,
|
|
253
|
+
CTMGOV_ORDER_LIFECYCLE_V2.CANCELLED,
|
|
254
|
+
]),
|
|
255
|
+
],
|
|
256
|
+
[
|
|
257
|
+
CTMGOV_ORDER_LIFECYCLE_V2.FULFILLING,
|
|
258
|
+
new Set([
|
|
259
|
+
CTMGOV_ORDER_LIFECYCLE_V2.FULFILLED,
|
|
260
|
+
CTMGOV_ORDER_LIFECYCLE_V2.FAILED,
|
|
261
|
+
CTMGOV_ORDER_LIFECYCLE_V2.CANCELLED,
|
|
262
|
+
]),
|
|
263
|
+
],
|
|
264
|
+
[CTMGOV_ORDER_LIFECYCLE_V2.FULFILLED, new Set()],
|
|
265
|
+
[CTMGOV_ORDER_LIFECYCLE_V2.FAILED, new Set()],
|
|
266
|
+
[CTMGOV_ORDER_LIFECYCLE_V2.CANCELLED, new Set()],
|
|
267
|
+
]);
|
|
268
|
+
const _ctmgovPsV2 = new Map();
|
|
269
|
+
const _ctmgovJsV2 = new Map();
|
|
270
|
+
let _ctmgovMaxActive = 6,
|
|
271
|
+
_ctmgovMaxPending = 15,
|
|
272
|
+
_ctmgovIdleMs = 30 * 24 * 60 * 60 * 1000,
|
|
273
|
+
_ctmgovStuckMs = 60 * 1000;
|
|
274
|
+
function _ctmgovPos(n, label) {
|
|
275
|
+
const v = Math.floor(Number(n));
|
|
276
|
+
if (!Number.isFinite(v) || v <= 0)
|
|
277
|
+
throw new Error(`${label} must be positive integer`);
|
|
278
|
+
return v;
|
|
279
|
+
}
|
|
280
|
+
function _ctmgovCheckP(from, to) {
|
|
281
|
+
const a = _ctmgovPTrans.get(from);
|
|
282
|
+
if (!a || !a.has(to))
|
|
283
|
+
throw new Error(`invalid ctmgov profile transition ${from} → ${to}`);
|
|
284
|
+
}
|
|
285
|
+
function _ctmgovCheckJ(from, to) {
|
|
286
|
+
const a = _ctmgovJTrans.get(from);
|
|
287
|
+
if (!a || !a.has(to))
|
|
288
|
+
throw new Error(`invalid ctmgov order transition ${from} → ${to}`);
|
|
289
|
+
}
|
|
290
|
+
function _ctmgovCountActive(owner) {
|
|
291
|
+
let c = 0;
|
|
292
|
+
for (const p of _ctmgovPsV2.values())
|
|
293
|
+
if (p.owner === owner && p.status === CTMGOV_PROFILE_MATURITY_V2.ACTIVE)
|
|
294
|
+
c++;
|
|
295
|
+
return c;
|
|
296
|
+
}
|
|
297
|
+
function _ctmgovCountPending(profileId) {
|
|
298
|
+
let c = 0;
|
|
299
|
+
for (const j of _ctmgovJsV2.values())
|
|
300
|
+
if (
|
|
301
|
+
j.profileId === profileId &&
|
|
302
|
+
(j.status === CTMGOV_ORDER_LIFECYCLE_V2.QUEUED ||
|
|
303
|
+
j.status === CTMGOV_ORDER_LIFECYCLE_V2.FULFILLING)
|
|
304
|
+
)
|
|
305
|
+
c++;
|
|
306
|
+
return c;
|
|
307
|
+
}
|
|
308
|
+
export function setMaxActiveCtmgovProfilesPerOwnerV2(n) {
|
|
309
|
+
_ctmgovMaxActive = _ctmgovPos(n, "maxActiveCtmgovProfilesPerOwner");
|
|
310
|
+
}
|
|
311
|
+
export function getMaxActiveCtmgovProfilesPerOwnerV2() {
|
|
312
|
+
return _ctmgovMaxActive;
|
|
313
|
+
}
|
|
314
|
+
export function setMaxPendingCtmgovOrdersPerProfileV2(n) {
|
|
315
|
+
_ctmgovMaxPending = _ctmgovPos(n, "maxPendingCtmgovOrdersPerProfile");
|
|
316
|
+
}
|
|
317
|
+
export function getMaxPendingCtmgovOrdersPerProfileV2() {
|
|
318
|
+
return _ctmgovMaxPending;
|
|
319
|
+
}
|
|
320
|
+
export function setCtmgovProfileIdleMsV2(n) {
|
|
321
|
+
_ctmgovIdleMs = _ctmgovPos(n, "ctmgovProfileIdleMs");
|
|
322
|
+
}
|
|
323
|
+
export function getCtmgovProfileIdleMsV2() {
|
|
324
|
+
return _ctmgovIdleMs;
|
|
325
|
+
}
|
|
326
|
+
export function setCtmgovOrderStuckMsV2(n) {
|
|
327
|
+
_ctmgovStuckMs = _ctmgovPos(n, "ctmgovOrderStuckMs");
|
|
328
|
+
}
|
|
329
|
+
export function getCtmgovOrderStuckMsV2() {
|
|
330
|
+
return _ctmgovStuckMs;
|
|
331
|
+
}
|
|
332
|
+
export function _resetStateCoworkTemplateMarketplaceGovV2() {
|
|
333
|
+
_ctmgovPsV2.clear();
|
|
334
|
+
_ctmgovJsV2.clear();
|
|
335
|
+
_ctmgovMaxActive = 6;
|
|
336
|
+
_ctmgovMaxPending = 15;
|
|
337
|
+
_ctmgovIdleMs = 30 * 24 * 60 * 60 * 1000;
|
|
338
|
+
_ctmgovStuckMs = 60 * 1000;
|
|
339
|
+
}
|
|
340
|
+
export function registerCtmgovProfileV2({ id, owner, vendor, metadata } = {}) {
|
|
341
|
+
if (!id || !owner) throw new Error("id and owner required");
|
|
342
|
+
if (_ctmgovPsV2.has(id))
|
|
343
|
+
throw new Error(`ctmgov profile ${id} already exists`);
|
|
344
|
+
const now = Date.now();
|
|
345
|
+
const p = {
|
|
346
|
+
id,
|
|
347
|
+
owner,
|
|
348
|
+
vendor: vendor || "default",
|
|
349
|
+
status: CTMGOV_PROFILE_MATURITY_V2.PENDING,
|
|
350
|
+
createdAt: now,
|
|
351
|
+
updatedAt: now,
|
|
352
|
+
lastTouchedAt: now,
|
|
353
|
+
activatedAt: null,
|
|
354
|
+
archivedAt: null,
|
|
355
|
+
metadata: { ...(metadata || {}) },
|
|
356
|
+
};
|
|
357
|
+
_ctmgovPsV2.set(id, p);
|
|
358
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
359
|
+
}
|
|
360
|
+
export function activateCtmgovProfileV2(id) {
|
|
361
|
+
const p = _ctmgovPsV2.get(id);
|
|
362
|
+
if (!p) throw new Error(`ctmgov profile ${id} not found`);
|
|
363
|
+
const isInitial = p.status === CTMGOV_PROFILE_MATURITY_V2.PENDING;
|
|
364
|
+
_ctmgovCheckP(p.status, CTMGOV_PROFILE_MATURITY_V2.ACTIVE);
|
|
365
|
+
if (isInitial && _ctmgovCountActive(p.owner) >= _ctmgovMaxActive)
|
|
366
|
+
throw new Error(`max active ctmgov profiles for owner ${p.owner} reached`);
|
|
367
|
+
const now = Date.now();
|
|
368
|
+
p.status = CTMGOV_PROFILE_MATURITY_V2.ACTIVE;
|
|
369
|
+
p.updatedAt = now;
|
|
370
|
+
p.lastTouchedAt = now;
|
|
371
|
+
if (!p.activatedAt) p.activatedAt = now;
|
|
372
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
373
|
+
}
|
|
374
|
+
export function suspendCtmgovProfileV2(id) {
|
|
375
|
+
const p = _ctmgovPsV2.get(id);
|
|
376
|
+
if (!p) throw new Error(`ctmgov profile ${id} not found`);
|
|
377
|
+
_ctmgovCheckP(p.status, CTMGOV_PROFILE_MATURITY_V2.SUSPENDED);
|
|
378
|
+
p.status = CTMGOV_PROFILE_MATURITY_V2.SUSPENDED;
|
|
379
|
+
p.updatedAt = Date.now();
|
|
380
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
381
|
+
}
|
|
382
|
+
export function archiveCtmgovProfileV2(id) {
|
|
383
|
+
const p = _ctmgovPsV2.get(id);
|
|
384
|
+
if (!p) throw new Error(`ctmgov profile ${id} not found`);
|
|
385
|
+
_ctmgovCheckP(p.status, CTMGOV_PROFILE_MATURITY_V2.ARCHIVED);
|
|
386
|
+
const now = Date.now();
|
|
387
|
+
p.status = CTMGOV_PROFILE_MATURITY_V2.ARCHIVED;
|
|
388
|
+
p.updatedAt = now;
|
|
389
|
+
if (!p.archivedAt) p.archivedAt = now;
|
|
390
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
391
|
+
}
|
|
392
|
+
export function touchCtmgovProfileV2(id) {
|
|
393
|
+
const p = _ctmgovPsV2.get(id);
|
|
394
|
+
if (!p) throw new Error(`ctmgov profile ${id} not found`);
|
|
395
|
+
if (_ctmgovPTerminal.has(p.status))
|
|
396
|
+
throw new Error(`cannot touch terminal ctmgov profile ${id}`);
|
|
397
|
+
const now = Date.now();
|
|
398
|
+
p.lastTouchedAt = now;
|
|
399
|
+
p.updatedAt = now;
|
|
400
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
401
|
+
}
|
|
402
|
+
export function getCtmgovProfileV2(id) {
|
|
403
|
+
const p = _ctmgovPsV2.get(id);
|
|
404
|
+
if (!p) return null;
|
|
405
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
406
|
+
}
|
|
407
|
+
export function listCtmgovProfilesV2() {
|
|
408
|
+
return [..._ctmgovPsV2.values()].map((p) => ({
|
|
409
|
+
...p,
|
|
410
|
+
metadata: { ...p.metadata },
|
|
411
|
+
}));
|
|
412
|
+
}
|
|
413
|
+
export function createCtmgovOrderV2({
|
|
414
|
+
id,
|
|
415
|
+
profileId,
|
|
416
|
+
templateId,
|
|
417
|
+
metadata,
|
|
418
|
+
} = {}) {
|
|
419
|
+
if (!id || !profileId) throw new Error("id and profileId required");
|
|
420
|
+
if (_ctmgovJsV2.has(id)) throw new Error(`ctmgov order ${id} already exists`);
|
|
421
|
+
if (!_ctmgovPsV2.has(profileId))
|
|
422
|
+
throw new Error(`ctmgov profile ${profileId} not found`);
|
|
423
|
+
if (_ctmgovCountPending(profileId) >= _ctmgovMaxPending)
|
|
424
|
+
throw new Error(
|
|
425
|
+
`max pending ctmgov orders for profile ${profileId} reached`,
|
|
426
|
+
);
|
|
427
|
+
const now = Date.now();
|
|
428
|
+
const j = {
|
|
429
|
+
id,
|
|
430
|
+
profileId,
|
|
431
|
+
templateId: templateId || "",
|
|
432
|
+
status: CTMGOV_ORDER_LIFECYCLE_V2.QUEUED,
|
|
433
|
+
createdAt: now,
|
|
434
|
+
updatedAt: now,
|
|
435
|
+
startedAt: null,
|
|
436
|
+
settledAt: null,
|
|
437
|
+
metadata: { ...(metadata || {}) },
|
|
438
|
+
};
|
|
439
|
+
_ctmgovJsV2.set(id, j);
|
|
440
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
441
|
+
}
|
|
442
|
+
export function fulfillingCtmgovOrderV2(id) {
|
|
443
|
+
const j = _ctmgovJsV2.get(id);
|
|
444
|
+
if (!j) throw new Error(`ctmgov order ${id} not found`);
|
|
445
|
+
_ctmgovCheckJ(j.status, CTMGOV_ORDER_LIFECYCLE_V2.FULFILLING);
|
|
446
|
+
const now = Date.now();
|
|
447
|
+
j.status = CTMGOV_ORDER_LIFECYCLE_V2.FULFILLING;
|
|
448
|
+
j.updatedAt = now;
|
|
449
|
+
if (!j.startedAt) j.startedAt = now;
|
|
450
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
451
|
+
}
|
|
452
|
+
export function completeOrderCtmgovV2(id) {
|
|
453
|
+
const j = _ctmgovJsV2.get(id);
|
|
454
|
+
if (!j) throw new Error(`ctmgov order ${id} not found`);
|
|
455
|
+
_ctmgovCheckJ(j.status, CTMGOV_ORDER_LIFECYCLE_V2.FULFILLED);
|
|
456
|
+
const now = Date.now();
|
|
457
|
+
j.status = CTMGOV_ORDER_LIFECYCLE_V2.FULFILLED;
|
|
458
|
+
j.updatedAt = now;
|
|
459
|
+
if (!j.settledAt) j.settledAt = now;
|
|
460
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
461
|
+
}
|
|
462
|
+
export function failCtmgovOrderV2(id, reason) {
|
|
463
|
+
const j = _ctmgovJsV2.get(id);
|
|
464
|
+
if (!j) throw new Error(`ctmgov order ${id} not found`);
|
|
465
|
+
_ctmgovCheckJ(j.status, CTMGOV_ORDER_LIFECYCLE_V2.FAILED);
|
|
466
|
+
const now = Date.now();
|
|
467
|
+
j.status = CTMGOV_ORDER_LIFECYCLE_V2.FAILED;
|
|
468
|
+
j.updatedAt = now;
|
|
469
|
+
if (!j.settledAt) j.settledAt = now;
|
|
470
|
+
if (reason) j.metadata.failReason = String(reason);
|
|
471
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
472
|
+
}
|
|
473
|
+
export function cancelCtmgovOrderV2(id, reason) {
|
|
474
|
+
const j = _ctmgovJsV2.get(id);
|
|
475
|
+
if (!j) throw new Error(`ctmgov order ${id} not found`);
|
|
476
|
+
_ctmgovCheckJ(j.status, CTMGOV_ORDER_LIFECYCLE_V2.CANCELLED);
|
|
477
|
+
const now = Date.now();
|
|
478
|
+
j.status = CTMGOV_ORDER_LIFECYCLE_V2.CANCELLED;
|
|
479
|
+
j.updatedAt = now;
|
|
480
|
+
if (!j.settledAt) j.settledAt = now;
|
|
481
|
+
if (reason) j.metadata.cancelReason = String(reason);
|
|
482
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
483
|
+
}
|
|
484
|
+
export function getCtmgovOrderV2(id) {
|
|
485
|
+
const j = _ctmgovJsV2.get(id);
|
|
486
|
+
if (!j) return null;
|
|
487
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
488
|
+
}
|
|
489
|
+
export function listCtmgovOrdersV2() {
|
|
490
|
+
return [..._ctmgovJsV2.values()].map((j) => ({
|
|
491
|
+
...j,
|
|
492
|
+
metadata: { ...j.metadata },
|
|
493
|
+
}));
|
|
494
|
+
}
|
|
495
|
+
export function autoSuspendIdleCtmgovProfilesV2({ now } = {}) {
|
|
496
|
+
const t = now ?? Date.now();
|
|
497
|
+
const flipped = [];
|
|
498
|
+
for (const p of _ctmgovPsV2.values())
|
|
499
|
+
if (
|
|
500
|
+
p.status === CTMGOV_PROFILE_MATURITY_V2.ACTIVE &&
|
|
501
|
+
t - p.lastTouchedAt >= _ctmgovIdleMs
|
|
502
|
+
) {
|
|
503
|
+
p.status = CTMGOV_PROFILE_MATURITY_V2.SUSPENDED;
|
|
504
|
+
p.updatedAt = t;
|
|
505
|
+
flipped.push(p.id);
|
|
506
|
+
}
|
|
507
|
+
return { flipped, count: flipped.length };
|
|
508
|
+
}
|
|
509
|
+
export function autoFailStuckCtmgovOrdersV2({ now } = {}) {
|
|
510
|
+
const t = now ?? Date.now();
|
|
511
|
+
const flipped = [];
|
|
512
|
+
for (const j of _ctmgovJsV2.values())
|
|
513
|
+
if (
|
|
514
|
+
j.status === CTMGOV_ORDER_LIFECYCLE_V2.FULFILLING &&
|
|
515
|
+
j.startedAt != null &&
|
|
516
|
+
t - j.startedAt >= _ctmgovStuckMs
|
|
517
|
+
) {
|
|
518
|
+
j.status = CTMGOV_ORDER_LIFECYCLE_V2.FAILED;
|
|
519
|
+
j.updatedAt = t;
|
|
520
|
+
if (!j.settledAt) j.settledAt = t;
|
|
521
|
+
j.metadata.failReason = "auto-fail-stuck";
|
|
522
|
+
flipped.push(j.id);
|
|
523
|
+
}
|
|
524
|
+
return { flipped, count: flipped.length };
|
|
525
|
+
}
|
|
526
|
+
export function getCoworkTemplateMarketplaceGovStatsV2() {
|
|
527
|
+
const profilesByStatus = {};
|
|
528
|
+
for (const v of Object.values(CTMGOV_PROFILE_MATURITY_V2))
|
|
529
|
+
profilesByStatus[v] = 0;
|
|
530
|
+
for (const p of _ctmgovPsV2.values()) profilesByStatus[p.status]++;
|
|
531
|
+
const ordersByStatus = {};
|
|
532
|
+
for (const v of Object.values(CTMGOV_ORDER_LIFECYCLE_V2))
|
|
533
|
+
ordersByStatus[v] = 0;
|
|
534
|
+
for (const j of _ctmgovJsV2.values()) ordersByStatus[j.status]++;
|
|
535
|
+
return {
|
|
536
|
+
totalCtmgovProfilesV2: _ctmgovPsV2.size,
|
|
537
|
+
totalCtmgovOrdersV2: _ctmgovJsV2.size,
|
|
538
|
+
maxActiveCtmgovProfilesPerOwner: _ctmgovMaxActive,
|
|
539
|
+
maxPendingCtmgovOrdersPerProfile: _ctmgovMaxPending,
|
|
540
|
+
ctmgovProfileIdleMs: _ctmgovIdleMs,
|
|
541
|
+
ctmgovOrderStuckMs: _ctmgovStuckMs,
|
|
542
|
+
profilesByStatus,
|
|
543
|
+
ordersByStatus,
|
|
544
|
+
};
|
|
545
|
+
}
|
package/src/lib/cross-chain.js
CHANGED
|
@@ -1377,3 +1377,342 @@ export function getCrossChainGovStatsV2() {
|
|
|
1377
1377
|
transfersByStatus,
|
|
1378
1378
|
};
|
|
1379
1379
|
}
|
|
1380
|
+
|
|
1381
|
+
// === Iter28 V2 governance overlay: Crchgov ===
|
|
1382
|
+
export const CRCHGOV_PROFILE_MATURITY_V2 = Object.freeze({
|
|
1383
|
+
PENDING: "pending",
|
|
1384
|
+
ACTIVE: "active",
|
|
1385
|
+
STALE: "stale",
|
|
1386
|
+
ARCHIVED: "archived",
|
|
1387
|
+
});
|
|
1388
|
+
export const CRCHGOV_TRANSFER_LIFECYCLE_V2 = Object.freeze({
|
|
1389
|
+
QUEUED: "queued",
|
|
1390
|
+
TRANSFERRING: "transferring",
|
|
1391
|
+
TRANSFERRED: "transferred",
|
|
1392
|
+
FAILED: "failed",
|
|
1393
|
+
CANCELLED: "cancelled",
|
|
1394
|
+
});
|
|
1395
|
+
const _crchgovPTrans = new Map([
|
|
1396
|
+
[
|
|
1397
|
+
CRCHGOV_PROFILE_MATURITY_V2.PENDING,
|
|
1398
|
+
new Set([
|
|
1399
|
+
CRCHGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
1400
|
+
CRCHGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
1401
|
+
]),
|
|
1402
|
+
],
|
|
1403
|
+
[
|
|
1404
|
+
CRCHGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
1405
|
+
new Set([
|
|
1406
|
+
CRCHGOV_PROFILE_MATURITY_V2.STALE,
|
|
1407
|
+
CRCHGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
1408
|
+
]),
|
|
1409
|
+
],
|
|
1410
|
+
[
|
|
1411
|
+
CRCHGOV_PROFILE_MATURITY_V2.STALE,
|
|
1412
|
+
new Set([
|
|
1413
|
+
CRCHGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
1414
|
+
CRCHGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
1415
|
+
]),
|
|
1416
|
+
],
|
|
1417
|
+
[CRCHGOV_PROFILE_MATURITY_V2.ARCHIVED, new Set()],
|
|
1418
|
+
]);
|
|
1419
|
+
const _crchgovPTerminal = new Set([CRCHGOV_PROFILE_MATURITY_V2.ARCHIVED]);
|
|
1420
|
+
const _crchgovJTrans = new Map([
|
|
1421
|
+
[
|
|
1422
|
+
CRCHGOV_TRANSFER_LIFECYCLE_V2.QUEUED,
|
|
1423
|
+
new Set([
|
|
1424
|
+
CRCHGOV_TRANSFER_LIFECYCLE_V2.TRANSFERRING,
|
|
1425
|
+
CRCHGOV_TRANSFER_LIFECYCLE_V2.CANCELLED,
|
|
1426
|
+
]),
|
|
1427
|
+
],
|
|
1428
|
+
[
|
|
1429
|
+
CRCHGOV_TRANSFER_LIFECYCLE_V2.TRANSFERRING,
|
|
1430
|
+
new Set([
|
|
1431
|
+
CRCHGOV_TRANSFER_LIFECYCLE_V2.TRANSFERRED,
|
|
1432
|
+
CRCHGOV_TRANSFER_LIFECYCLE_V2.FAILED,
|
|
1433
|
+
CRCHGOV_TRANSFER_LIFECYCLE_V2.CANCELLED,
|
|
1434
|
+
]),
|
|
1435
|
+
],
|
|
1436
|
+
[CRCHGOV_TRANSFER_LIFECYCLE_V2.TRANSFERRED, new Set()],
|
|
1437
|
+
[CRCHGOV_TRANSFER_LIFECYCLE_V2.FAILED, new Set()],
|
|
1438
|
+
[CRCHGOV_TRANSFER_LIFECYCLE_V2.CANCELLED, new Set()],
|
|
1439
|
+
]);
|
|
1440
|
+
const _crchgovPsV2 = new Map();
|
|
1441
|
+
const _crchgovJsV2 = new Map();
|
|
1442
|
+
let _crchgovMaxActive = 6,
|
|
1443
|
+
_crchgovMaxPending = 15,
|
|
1444
|
+
_crchgovIdleMs = 2592000000,
|
|
1445
|
+
_crchgovStuckMs = 60 * 1000;
|
|
1446
|
+
function _crchgovPos(n, label) {
|
|
1447
|
+
const v = Math.floor(Number(n));
|
|
1448
|
+
if (!Number.isFinite(v) || v <= 0)
|
|
1449
|
+
throw new Error(`${label} must be positive integer`);
|
|
1450
|
+
return v;
|
|
1451
|
+
}
|
|
1452
|
+
function _crchgovCheckP(from, to) {
|
|
1453
|
+
const a = _crchgovPTrans.get(from);
|
|
1454
|
+
if (!a || !a.has(to))
|
|
1455
|
+
throw new Error(`invalid crchgov profile transition ${from} → ${to}`);
|
|
1456
|
+
}
|
|
1457
|
+
function _crchgovCheckJ(from, to) {
|
|
1458
|
+
const a = _crchgovJTrans.get(from);
|
|
1459
|
+
if (!a || !a.has(to))
|
|
1460
|
+
throw new Error(`invalid crchgov transfer transition ${from} → ${to}`);
|
|
1461
|
+
}
|
|
1462
|
+
function _crchgovCountActive(owner) {
|
|
1463
|
+
let c = 0;
|
|
1464
|
+
for (const p of _crchgovPsV2.values())
|
|
1465
|
+
if (p.owner === owner && p.status === CRCHGOV_PROFILE_MATURITY_V2.ACTIVE)
|
|
1466
|
+
c++;
|
|
1467
|
+
return c;
|
|
1468
|
+
}
|
|
1469
|
+
function _crchgovCountPending(profileId) {
|
|
1470
|
+
let c = 0;
|
|
1471
|
+
for (const j of _crchgovJsV2.values())
|
|
1472
|
+
if (
|
|
1473
|
+
j.profileId === profileId &&
|
|
1474
|
+
(j.status === CRCHGOV_TRANSFER_LIFECYCLE_V2.QUEUED ||
|
|
1475
|
+
j.status === CRCHGOV_TRANSFER_LIFECYCLE_V2.TRANSFERRING)
|
|
1476
|
+
)
|
|
1477
|
+
c++;
|
|
1478
|
+
return c;
|
|
1479
|
+
}
|
|
1480
|
+
export function setMaxActiveCrchProfilesPerOwnerV2(n) {
|
|
1481
|
+
_crchgovMaxActive = _crchgovPos(n, "maxActiveCrchProfilesPerOwner");
|
|
1482
|
+
}
|
|
1483
|
+
export function getMaxActiveCrchProfilesPerOwnerV2() {
|
|
1484
|
+
return _crchgovMaxActive;
|
|
1485
|
+
}
|
|
1486
|
+
export function setMaxPendingCrchTransfersPerProfileV2(n) {
|
|
1487
|
+
_crchgovMaxPending = _crchgovPos(n, "maxPendingCrchTransfersPerProfile");
|
|
1488
|
+
}
|
|
1489
|
+
export function getMaxPendingCrchTransfersPerProfileV2() {
|
|
1490
|
+
return _crchgovMaxPending;
|
|
1491
|
+
}
|
|
1492
|
+
export function setCrchProfileIdleMsV2(n) {
|
|
1493
|
+
_crchgovIdleMs = _crchgovPos(n, "crchgovProfileIdleMs");
|
|
1494
|
+
}
|
|
1495
|
+
export function getCrchProfileIdleMsV2() {
|
|
1496
|
+
return _crchgovIdleMs;
|
|
1497
|
+
}
|
|
1498
|
+
export function setCrchTransferStuckMsV2(n) {
|
|
1499
|
+
_crchgovStuckMs = _crchgovPos(n, "crchgovTransferStuckMs");
|
|
1500
|
+
}
|
|
1501
|
+
export function getCrchTransferStuckMsV2() {
|
|
1502
|
+
return _crchgovStuckMs;
|
|
1503
|
+
}
|
|
1504
|
+
export function _resetStateCrchgovV2() {
|
|
1505
|
+
_crchgovPsV2.clear();
|
|
1506
|
+
_crchgovJsV2.clear();
|
|
1507
|
+
_crchgovMaxActive = 6;
|
|
1508
|
+
_crchgovMaxPending = 15;
|
|
1509
|
+
_crchgovIdleMs = 2592000000;
|
|
1510
|
+
_crchgovStuckMs = 60 * 1000;
|
|
1511
|
+
}
|
|
1512
|
+
export function registerCrchProfileV2({ id, owner, bridge, metadata } = {}) {
|
|
1513
|
+
if (!id || !owner) throw new Error("id and owner required");
|
|
1514
|
+
if (_crchgovPsV2.has(id))
|
|
1515
|
+
throw new Error(`crchgov profile ${id} already exists`);
|
|
1516
|
+
const now = Date.now();
|
|
1517
|
+
const p = {
|
|
1518
|
+
id,
|
|
1519
|
+
owner,
|
|
1520
|
+
bridge: bridge || "default",
|
|
1521
|
+
status: CRCHGOV_PROFILE_MATURITY_V2.PENDING,
|
|
1522
|
+
createdAt: now,
|
|
1523
|
+
updatedAt: now,
|
|
1524
|
+
lastTouchedAt: now,
|
|
1525
|
+
activatedAt: null,
|
|
1526
|
+
archivedAt: null,
|
|
1527
|
+
metadata: { ...(metadata || {}) },
|
|
1528
|
+
};
|
|
1529
|
+
_crchgovPsV2.set(id, p);
|
|
1530
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
1531
|
+
}
|
|
1532
|
+
export function activateCrchProfileV2(id) {
|
|
1533
|
+
const p = _crchgovPsV2.get(id);
|
|
1534
|
+
if (!p) throw new Error(`crchgov profile ${id} not found`);
|
|
1535
|
+
const isInitial = p.status === CRCHGOV_PROFILE_MATURITY_V2.PENDING;
|
|
1536
|
+
_crchgovCheckP(p.status, CRCHGOV_PROFILE_MATURITY_V2.ACTIVE);
|
|
1537
|
+
if (isInitial && _crchgovCountActive(p.owner) >= _crchgovMaxActive)
|
|
1538
|
+
throw new Error(`max active crchgov profiles for owner ${p.owner} reached`);
|
|
1539
|
+
const now = Date.now();
|
|
1540
|
+
p.status = CRCHGOV_PROFILE_MATURITY_V2.ACTIVE;
|
|
1541
|
+
p.updatedAt = now;
|
|
1542
|
+
p.lastTouchedAt = now;
|
|
1543
|
+
if (!p.activatedAt) p.activatedAt = now;
|
|
1544
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
1545
|
+
}
|
|
1546
|
+
export function staleCrchProfileV2(id) {
|
|
1547
|
+
const p = _crchgovPsV2.get(id);
|
|
1548
|
+
if (!p) throw new Error(`crchgov profile ${id} not found`);
|
|
1549
|
+
_crchgovCheckP(p.status, CRCHGOV_PROFILE_MATURITY_V2.STALE);
|
|
1550
|
+
p.status = CRCHGOV_PROFILE_MATURITY_V2.STALE;
|
|
1551
|
+
p.updatedAt = Date.now();
|
|
1552
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
1553
|
+
}
|
|
1554
|
+
export function archiveCrchProfileV2(id) {
|
|
1555
|
+
const p = _crchgovPsV2.get(id);
|
|
1556
|
+
if (!p) throw new Error(`crchgov profile ${id} not found`);
|
|
1557
|
+
_crchgovCheckP(p.status, CRCHGOV_PROFILE_MATURITY_V2.ARCHIVED);
|
|
1558
|
+
const now = Date.now();
|
|
1559
|
+
p.status = CRCHGOV_PROFILE_MATURITY_V2.ARCHIVED;
|
|
1560
|
+
p.updatedAt = now;
|
|
1561
|
+
if (!p.archivedAt) p.archivedAt = now;
|
|
1562
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
1563
|
+
}
|
|
1564
|
+
export function touchCrchProfileV2(id) {
|
|
1565
|
+
const p = _crchgovPsV2.get(id);
|
|
1566
|
+
if (!p) throw new Error(`crchgov profile ${id} not found`);
|
|
1567
|
+
if (_crchgovPTerminal.has(p.status))
|
|
1568
|
+
throw new Error(`cannot touch terminal crchgov profile ${id}`);
|
|
1569
|
+
const now = Date.now();
|
|
1570
|
+
p.lastTouchedAt = now;
|
|
1571
|
+
p.updatedAt = now;
|
|
1572
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
1573
|
+
}
|
|
1574
|
+
export function getCrchProfileV2(id) {
|
|
1575
|
+
const p = _crchgovPsV2.get(id);
|
|
1576
|
+
if (!p) return null;
|
|
1577
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
1578
|
+
}
|
|
1579
|
+
export function listCrchProfilesV2() {
|
|
1580
|
+
return [..._crchgovPsV2.values()].map((p) => ({
|
|
1581
|
+
...p,
|
|
1582
|
+
metadata: { ...p.metadata },
|
|
1583
|
+
}));
|
|
1584
|
+
}
|
|
1585
|
+
export function createCrchTransferV2({
|
|
1586
|
+
id,
|
|
1587
|
+
profileId,
|
|
1588
|
+
transferId,
|
|
1589
|
+
metadata,
|
|
1590
|
+
} = {}) {
|
|
1591
|
+
if (!id || !profileId) throw new Error("id and profileId required");
|
|
1592
|
+
if (_crchgovJsV2.has(id))
|
|
1593
|
+
throw new Error(`crchgov transfer ${id} already exists`);
|
|
1594
|
+
if (!_crchgovPsV2.has(profileId))
|
|
1595
|
+
throw new Error(`crchgov profile ${profileId} not found`);
|
|
1596
|
+
if (_crchgovCountPending(profileId) >= _crchgovMaxPending)
|
|
1597
|
+
throw new Error(
|
|
1598
|
+
`max pending crchgov transfers for profile ${profileId} reached`,
|
|
1599
|
+
);
|
|
1600
|
+
const now = Date.now();
|
|
1601
|
+
const j = {
|
|
1602
|
+
id,
|
|
1603
|
+
profileId,
|
|
1604
|
+
transferId: transferId || "",
|
|
1605
|
+
status: CRCHGOV_TRANSFER_LIFECYCLE_V2.QUEUED,
|
|
1606
|
+
createdAt: now,
|
|
1607
|
+
updatedAt: now,
|
|
1608
|
+
startedAt: null,
|
|
1609
|
+
settledAt: null,
|
|
1610
|
+
metadata: { ...(metadata || {}) },
|
|
1611
|
+
};
|
|
1612
|
+
_crchgovJsV2.set(id, j);
|
|
1613
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
1614
|
+
}
|
|
1615
|
+
export function transferringCrchTransferV2(id) {
|
|
1616
|
+
const j = _crchgovJsV2.get(id);
|
|
1617
|
+
if (!j) throw new Error(`crchgov transfer ${id} not found`);
|
|
1618
|
+
_crchgovCheckJ(j.status, CRCHGOV_TRANSFER_LIFECYCLE_V2.TRANSFERRING);
|
|
1619
|
+
const now = Date.now();
|
|
1620
|
+
j.status = CRCHGOV_TRANSFER_LIFECYCLE_V2.TRANSFERRING;
|
|
1621
|
+
j.updatedAt = now;
|
|
1622
|
+
if (!j.startedAt) j.startedAt = now;
|
|
1623
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
1624
|
+
}
|
|
1625
|
+
export function completeTransferCrchV2(id) {
|
|
1626
|
+
const j = _crchgovJsV2.get(id);
|
|
1627
|
+
if (!j) throw new Error(`crchgov transfer ${id} not found`);
|
|
1628
|
+
_crchgovCheckJ(j.status, CRCHGOV_TRANSFER_LIFECYCLE_V2.TRANSFERRED);
|
|
1629
|
+
const now = Date.now();
|
|
1630
|
+
j.status = CRCHGOV_TRANSFER_LIFECYCLE_V2.TRANSFERRED;
|
|
1631
|
+
j.updatedAt = now;
|
|
1632
|
+
if (!j.settledAt) j.settledAt = now;
|
|
1633
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
1634
|
+
}
|
|
1635
|
+
export function failCrchTransferV2(id, reason) {
|
|
1636
|
+
const j = _crchgovJsV2.get(id);
|
|
1637
|
+
if (!j) throw new Error(`crchgov transfer ${id} not found`);
|
|
1638
|
+
_crchgovCheckJ(j.status, CRCHGOV_TRANSFER_LIFECYCLE_V2.FAILED);
|
|
1639
|
+
const now = Date.now();
|
|
1640
|
+
j.status = CRCHGOV_TRANSFER_LIFECYCLE_V2.FAILED;
|
|
1641
|
+
j.updatedAt = now;
|
|
1642
|
+
if (!j.settledAt) j.settledAt = now;
|
|
1643
|
+
if (reason) j.metadata.failReason = String(reason);
|
|
1644
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
1645
|
+
}
|
|
1646
|
+
export function cancelCrchTransferV2(id, reason) {
|
|
1647
|
+
const j = _crchgovJsV2.get(id);
|
|
1648
|
+
if (!j) throw new Error(`crchgov transfer ${id} not found`);
|
|
1649
|
+
_crchgovCheckJ(j.status, CRCHGOV_TRANSFER_LIFECYCLE_V2.CANCELLED);
|
|
1650
|
+
const now = Date.now();
|
|
1651
|
+
j.status = CRCHGOV_TRANSFER_LIFECYCLE_V2.CANCELLED;
|
|
1652
|
+
j.updatedAt = now;
|
|
1653
|
+
if (!j.settledAt) j.settledAt = now;
|
|
1654
|
+
if (reason) j.metadata.cancelReason = String(reason);
|
|
1655
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
1656
|
+
}
|
|
1657
|
+
export function getCrchTransferV2(id) {
|
|
1658
|
+
const j = _crchgovJsV2.get(id);
|
|
1659
|
+
if (!j) return null;
|
|
1660
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
1661
|
+
}
|
|
1662
|
+
export function listCrchTransfersV2() {
|
|
1663
|
+
return [..._crchgovJsV2.values()].map((j) => ({
|
|
1664
|
+
...j,
|
|
1665
|
+
metadata: { ...j.metadata },
|
|
1666
|
+
}));
|
|
1667
|
+
}
|
|
1668
|
+
export function autoStaleIdleCrchProfilesV2({ now } = {}) {
|
|
1669
|
+
const t = now ?? Date.now();
|
|
1670
|
+
const flipped = [];
|
|
1671
|
+
for (const p of _crchgovPsV2.values())
|
|
1672
|
+
if (
|
|
1673
|
+
p.status === CRCHGOV_PROFILE_MATURITY_V2.ACTIVE &&
|
|
1674
|
+
t - p.lastTouchedAt >= _crchgovIdleMs
|
|
1675
|
+
) {
|
|
1676
|
+
p.status = CRCHGOV_PROFILE_MATURITY_V2.STALE;
|
|
1677
|
+
p.updatedAt = t;
|
|
1678
|
+
flipped.push(p.id);
|
|
1679
|
+
}
|
|
1680
|
+
return { flipped, count: flipped.length };
|
|
1681
|
+
}
|
|
1682
|
+
export function autoFailStuckCrchTransfersV2({ now } = {}) {
|
|
1683
|
+
const t = now ?? Date.now();
|
|
1684
|
+
const flipped = [];
|
|
1685
|
+
for (const j of _crchgovJsV2.values())
|
|
1686
|
+
if (
|
|
1687
|
+
j.status === CRCHGOV_TRANSFER_LIFECYCLE_V2.TRANSFERRING &&
|
|
1688
|
+
j.startedAt != null &&
|
|
1689
|
+
t - j.startedAt >= _crchgovStuckMs
|
|
1690
|
+
) {
|
|
1691
|
+
j.status = CRCHGOV_TRANSFER_LIFECYCLE_V2.FAILED;
|
|
1692
|
+
j.updatedAt = t;
|
|
1693
|
+
if (!j.settledAt) j.settledAt = t;
|
|
1694
|
+
j.metadata.failReason = "auto-fail-stuck";
|
|
1695
|
+
flipped.push(j.id);
|
|
1696
|
+
}
|
|
1697
|
+
return { flipped, count: flipped.length };
|
|
1698
|
+
}
|
|
1699
|
+
export function getCrchgovStatsV2() {
|
|
1700
|
+
const profilesByStatus = {};
|
|
1701
|
+
for (const v of Object.values(CRCHGOV_PROFILE_MATURITY_V2))
|
|
1702
|
+
profilesByStatus[v] = 0;
|
|
1703
|
+
for (const p of _crchgovPsV2.values()) profilesByStatus[p.status]++;
|
|
1704
|
+
const transfersByStatus = {};
|
|
1705
|
+
for (const v of Object.values(CRCHGOV_TRANSFER_LIFECYCLE_V2))
|
|
1706
|
+
transfersByStatus[v] = 0;
|
|
1707
|
+
for (const j of _crchgovJsV2.values()) transfersByStatus[j.status]++;
|
|
1708
|
+
return {
|
|
1709
|
+
totalCrchProfilesV2: _crchgovPsV2.size,
|
|
1710
|
+
totalCrchTransfersV2: _crchgovJsV2.size,
|
|
1711
|
+
maxActiveCrchProfilesPerOwner: _crchgovMaxActive,
|
|
1712
|
+
maxPendingCrchTransfersPerProfile: _crchgovMaxPending,
|
|
1713
|
+
crchgovProfileIdleMs: _crchgovIdleMs,
|
|
1714
|
+
crchgovTransferStuckMs: _crchgovStuckMs,
|
|
1715
|
+
profilesByStatus,
|
|
1716
|
+
transfersByStatus,
|
|
1717
|
+
};
|
|
1718
|
+
}
|