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
|
@@ -131,3 +131,349 @@ export function mergeProviderOptions(provider, modelId, callOverrides = {}) {
|
|
|
131
131
|
const modelLayer = inferModelOverrides(modelId);
|
|
132
132
|
return deepMerge(defaults, modelLayer, callOverrides || {});
|
|
133
133
|
}
|
|
134
|
+
|
|
135
|
+
// =====================================================================
|
|
136
|
+
// provider-options V2 governance overlay (iter27)
|
|
137
|
+
// =====================================================================
|
|
138
|
+
export const POPTGOV_PROFILE_MATURITY_V2 = Object.freeze({
|
|
139
|
+
PENDING: "pending",
|
|
140
|
+
ACTIVE: "active",
|
|
141
|
+
STALE: "stale",
|
|
142
|
+
ARCHIVED: "archived",
|
|
143
|
+
});
|
|
144
|
+
export const POPTGOV_RESOLVE_LIFECYCLE_V2 = Object.freeze({
|
|
145
|
+
QUEUED: "queued",
|
|
146
|
+
RESOLVING: "resolving",
|
|
147
|
+
RESOLVED: "resolved",
|
|
148
|
+
FAILED: "failed",
|
|
149
|
+
CANCELLED: "cancelled",
|
|
150
|
+
});
|
|
151
|
+
const _poptgovPTrans = new Map([
|
|
152
|
+
[
|
|
153
|
+
POPTGOV_PROFILE_MATURITY_V2.PENDING,
|
|
154
|
+
new Set([
|
|
155
|
+
POPTGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
156
|
+
POPTGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
157
|
+
]),
|
|
158
|
+
],
|
|
159
|
+
[
|
|
160
|
+
POPTGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
161
|
+
new Set([
|
|
162
|
+
POPTGOV_PROFILE_MATURITY_V2.STALE,
|
|
163
|
+
POPTGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
164
|
+
]),
|
|
165
|
+
],
|
|
166
|
+
[
|
|
167
|
+
POPTGOV_PROFILE_MATURITY_V2.STALE,
|
|
168
|
+
new Set([
|
|
169
|
+
POPTGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
170
|
+
POPTGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
171
|
+
]),
|
|
172
|
+
],
|
|
173
|
+
[POPTGOV_PROFILE_MATURITY_V2.ARCHIVED, new Set()],
|
|
174
|
+
]);
|
|
175
|
+
const _poptgovPTerminal = new Set([POPTGOV_PROFILE_MATURITY_V2.ARCHIVED]);
|
|
176
|
+
const _poptgovJTrans = new Map([
|
|
177
|
+
[
|
|
178
|
+
POPTGOV_RESOLVE_LIFECYCLE_V2.QUEUED,
|
|
179
|
+
new Set([
|
|
180
|
+
POPTGOV_RESOLVE_LIFECYCLE_V2.RESOLVING,
|
|
181
|
+
POPTGOV_RESOLVE_LIFECYCLE_V2.CANCELLED,
|
|
182
|
+
]),
|
|
183
|
+
],
|
|
184
|
+
[
|
|
185
|
+
POPTGOV_RESOLVE_LIFECYCLE_V2.RESOLVING,
|
|
186
|
+
new Set([
|
|
187
|
+
POPTGOV_RESOLVE_LIFECYCLE_V2.RESOLVED,
|
|
188
|
+
POPTGOV_RESOLVE_LIFECYCLE_V2.FAILED,
|
|
189
|
+
POPTGOV_RESOLVE_LIFECYCLE_V2.CANCELLED,
|
|
190
|
+
]),
|
|
191
|
+
],
|
|
192
|
+
[POPTGOV_RESOLVE_LIFECYCLE_V2.RESOLVED, new Set()],
|
|
193
|
+
[POPTGOV_RESOLVE_LIFECYCLE_V2.FAILED, new Set()],
|
|
194
|
+
[POPTGOV_RESOLVE_LIFECYCLE_V2.CANCELLED, new Set()],
|
|
195
|
+
]);
|
|
196
|
+
const _poptgovPsV2 = new Map();
|
|
197
|
+
const _poptgovJsV2 = new Map();
|
|
198
|
+
let _poptgovMaxActive = 8,
|
|
199
|
+
_poptgovMaxPending = 20,
|
|
200
|
+
_poptgovIdleMs = 30 * 24 * 60 * 60 * 1000,
|
|
201
|
+
_poptgovStuckMs = 60 * 1000;
|
|
202
|
+
function _poptgovPos(n, label) {
|
|
203
|
+
const v = Math.floor(Number(n));
|
|
204
|
+
if (!Number.isFinite(v) || v <= 0)
|
|
205
|
+
throw new Error(`${label} must be positive integer`);
|
|
206
|
+
return v;
|
|
207
|
+
}
|
|
208
|
+
function _poptgovCheckP(from, to) {
|
|
209
|
+
const a = _poptgovPTrans.get(from);
|
|
210
|
+
if (!a || !a.has(to))
|
|
211
|
+
throw new Error(`invalid poptgov profile transition ${from} → ${to}`);
|
|
212
|
+
}
|
|
213
|
+
function _poptgovCheckJ(from, to) {
|
|
214
|
+
const a = _poptgovJTrans.get(from);
|
|
215
|
+
if (!a || !a.has(to))
|
|
216
|
+
throw new Error(`invalid poptgov resolve transition ${from} → ${to}`);
|
|
217
|
+
}
|
|
218
|
+
function _poptgovCountActive(owner) {
|
|
219
|
+
let c = 0;
|
|
220
|
+
for (const p of _poptgovPsV2.values())
|
|
221
|
+
if (p.owner === owner && p.status === POPTGOV_PROFILE_MATURITY_V2.ACTIVE)
|
|
222
|
+
c++;
|
|
223
|
+
return c;
|
|
224
|
+
}
|
|
225
|
+
function _poptgovCountPending(profileId) {
|
|
226
|
+
let c = 0;
|
|
227
|
+
for (const j of _poptgovJsV2.values())
|
|
228
|
+
if (
|
|
229
|
+
j.profileId === profileId &&
|
|
230
|
+
(j.status === POPTGOV_RESOLVE_LIFECYCLE_V2.QUEUED ||
|
|
231
|
+
j.status === POPTGOV_RESOLVE_LIFECYCLE_V2.RESOLVING)
|
|
232
|
+
)
|
|
233
|
+
c++;
|
|
234
|
+
return c;
|
|
235
|
+
}
|
|
236
|
+
export function setMaxActivePoptgovProfilesPerOwnerV2(n) {
|
|
237
|
+
_poptgovMaxActive = _poptgovPos(n, "maxActivePoptgovProfilesPerOwner");
|
|
238
|
+
}
|
|
239
|
+
export function getMaxActivePoptgovProfilesPerOwnerV2() {
|
|
240
|
+
return _poptgovMaxActive;
|
|
241
|
+
}
|
|
242
|
+
export function setMaxPendingPoptgovResolvesPerProfileV2(n) {
|
|
243
|
+
_poptgovMaxPending = _poptgovPos(n, "maxPendingPoptgovResolvesPerProfile");
|
|
244
|
+
}
|
|
245
|
+
export function getMaxPendingPoptgovResolvesPerProfileV2() {
|
|
246
|
+
return _poptgovMaxPending;
|
|
247
|
+
}
|
|
248
|
+
export function setPoptgovProfileIdleMsV2(n) {
|
|
249
|
+
_poptgovIdleMs = _poptgovPos(n, "poptgovProfileIdleMs");
|
|
250
|
+
}
|
|
251
|
+
export function getPoptgovProfileIdleMsV2() {
|
|
252
|
+
return _poptgovIdleMs;
|
|
253
|
+
}
|
|
254
|
+
export function setPoptgovResolveStuckMsV2(n) {
|
|
255
|
+
_poptgovStuckMs = _poptgovPos(n, "poptgovResolveStuckMs");
|
|
256
|
+
}
|
|
257
|
+
export function getPoptgovResolveStuckMsV2() {
|
|
258
|
+
return _poptgovStuckMs;
|
|
259
|
+
}
|
|
260
|
+
export function _resetStateProviderOptionsGovV2() {
|
|
261
|
+
_poptgovPsV2.clear();
|
|
262
|
+
_poptgovJsV2.clear();
|
|
263
|
+
_poptgovMaxActive = 8;
|
|
264
|
+
_poptgovMaxPending = 20;
|
|
265
|
+
_poptgovIdleMs = 30 * 24 * 60 * 60 * 1000;
|
|
266
|
+
_poptgovStuckMs = 60 * 1000;
|
|
267
|
+
}
|
|
268
|
+
export function registerPoptgovProfileV2({
|
|
269
|
+
id,
|
|
270
|
+
owner,
|
|
271
|
+
provider,
|
|
272
|
+
metadata,
|
|
273
|
+
} = {}) {
|
|
274
|
+
if (!id || !owner) throw new Error("id and owner required");
|
|
275
|
+
if (_poptgovPsV2.has(id))
|
|
276
|
+
throw new Error(`poptgov profile ${id} already exists`);
|
|
277
|
+
const now = Date.now();
|
|
278
|
+
const p = {
|
|
279
|
+
id,
|
|
280
|
+
owner,
|
|
281
|
+
provider: provider || "default",
|
|
282
|
+
status: POPTGOV_PROFILE_MATURITY_V2.PENDING,
|
|
283
|
+
createdAt: now,
|
|
284
|
+
updatedAt: now,
|
|
285
|
+
lastTouchedAt: now,
|
|
286
|
+
activatedAt: null,
|
|
287
|
+
archivedAt: null,
|
|
288
|
+
metadata: { ...(metadata || {}) },
|
|
289
|
+
};
|
|
290
|
+
_poptgovPsV2.set(id, p);
|
|
291
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
292
|
+
}
|
|
293
|
+
export function activatePoptgovProfileV2(id) {
|
|
294
|
+
const p = _poptgovPsV2.get(id);
|
|
295
|
+
if (!p) throw new Error(`poptgov profile ${id} not found`);
|
|
296
|
+
const isInitial = p.status === POPTGOV_PROFILE_MATURITY_V2.PENDING;
|
|
297
|
+
_poptgovCheckP(p.status, POPTGOV_PROFILE_MATURITY_V2.ACTIVE);
|
|
298
|
+
if (isInitial && _poptgovCountActive(p.owner) >= _poptgovMaxActive)
|
|
299
|
+
throw new Error(`max active poptgov profiles for owner ${p.owner} reached`);
|
|
300
|
+
const now = Date.now();
|
|
301
|
+
p.status = POPTGOV_PROFILE_MATURITY_V2.ACTIVE;
|
|
302
|
+
p.updatedAt = now;
|
|
303
|
+
p.lastTouchedAt = now;
|
|
304
|
+
if (!p.activatedAt) p.activatedAt = now;
|
|
305
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
306
|
+
}
|
|
307
|
+
export function stalePoptgovProfileV2(id) {
|
|
308
|
+
const p = _poptgovPsV2.get(id);
|
|
309
|
+
if (!p) throw new Error(`poptgov profile ${id} not found`);
|
|
310
|
+
_poptgovCheckP(p.status, POPTGOV_PROFILE_MATURITY_V2.STALE);
|
|
311
|
+
p.status = POPTGOV_PROFILE_MATURITY_V2.STALE;
|
|
312
|
+
p.updatedAt = Date.now();
|
|
313
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
314
|
+
}
|
|
315
|
+
export function archivePoptgovProfileV2(id) {
|
|
316
|
+
const p = _poptgovPsV2.get(id);
|
|
317
|
+
if (!p) throw new Error(`poptgov profile ${id} not found`);
|
|
318
|
+
_poptgovCheckP(p.status, POPTGOV_PROFILE_MATURITY_V2.ARCHIVED);
|
|
319
|
+
const now = Date.now();
|
|
320
|
+
p.status = POPTGOV_PROFILE_MATURITY_V2.ARCHIVED;
|
|
321
|
+
p.updatedAt = now;
|
|
322
|
+
if (!p.archivedAt) p.archivedAt = now;
|
|
323
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
324
|
+
}
|
|
325
|
+
export function touchPoptgovProfileV2(id) {
|
|
326
|
+
const p = _poptgovPsV2.get(id);
|
|
327
|
+
if (!p) throw new Error(`poptgov profile ${id} not found`);
|
|
328
|
+
if (_poptgovPTerminal.has(p.status))
|
|
329
|
+
throw new Error(`cannot touch terminal poptgov profile ${id}`);
|
|
330
|
+
const now = Date.now();
|
|
331
|
+
p.lastTouchedAt = now;
|
|
332
|
+
p.updatedAt = now;
|
|
333
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
334
|
+
}
|
|
335
|
+
export function getPoptgovProfileV2(id) {
|
|
336
|
+
const p = _poptgovPsV2.get(id);
|
|
337
|
+
if (!p) return null;
|
|
338
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
339
|
+
}
|
|
340
|
+
export function listPoptgovProfilesV2() {
|
|
341
|
+
return [..._poptgovPsV2.values()].map((p) => ({
|
|
342
|
+
...p,
|
|
343
|
+
metadata: { ...p.metadata },
|
|
344
|
+
}));
|
|
345
|
+
}
|
|
346
|
+
export function createPoptgovResolveV2({
|
|
347
|
+
id,
|
|
348
|
+
profileId,
|
|
349
|
+
option,
|
|
350
|
+
metadata,
|
|
351
|
+
} = {}) {
|
|
352
|
+
if (!id || !profileId) throw new Error("id and profileId required");
|
|
353
|
+
if (_poptgovJsV2.has(id))
|
|
354
|
+
throw new Error(`poptgov resolve ${id} already exists`);
|
|
355
|
+
if (!_poptgovPsV2.has(profileId))
|
|
356
|
+
throw new Error(`poptgov profile ${profileId} not found`);
|
|
357
|
+
if (_poptgovCountPending(profileId) >= _poptgovMaxPending)
|
|
358
|
+
throw new Error(
|
|
359
|
+
`max pending poptgov resolves for profile ${profileId} reached`,
|
|
360
|
+
);
|
|
361
|
+
const now = Date.now();
|
|
362
|
+
const j = {
|
|
363
|
+
id,
|
|
364
|
+
profileId,
|
|
365
|
+
option: option || "",
|
|
366
|
+
status: POPTGOV_RESOLVE_LIFECYCLE_V2.QUEUED,
|
|
367
|
+
createdAt: now,
|
|
368
|
+
updatedAt: now,
|
|
369
|
+
startedAt: null,
|
|
370
|
+
settledAt: null,
|
|
371
|
+
metadata: { ...(metadata || {}) },
|
|
372
|
+
};
|
|
373
|
+
_poptgovJsV2.set(id, j);
|
|
374
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
375
|
+
}
|
|
376
|
+
export function resolvingPoptgovResolveV2(id) {
|
|
377
|
+
const j = _poptgovJsV2.get(id);
|
|
378
|
+
if (!j) throw new Error(`poptgov resolve ${id} not found`);
|
|
379
|
+
_poptgovCheckJ(j.status, POPTGOV_RESOLVE_LIFECYCLE_V2.RESOLVING);
|
|
380
|
+
const now = Date.now();
|
|
381
|
+
j.status = POPTGOV_RESOLVE_LIFECYCLE_V2.RESOLVING;
|
|
382
|
+
j.updatedAt = now;
|
|
383
|
+
if (!j.startedAt) j.startedAt = now;
|
|
384
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
385
|
+
}
|
|
386
|
+
export function completeResolvePoptgovV2(id) {
|
|
387
|
+
const j = _poptgovJsV2.get(id);
|
|
388
|
+
if (!j) throw new Error(`poptgov resolve ${id} not found`);
|
|
389
|
+
_poptgovCheckJ(j.status, POPTGOV_RESOLVE_LIFECYCLE_V2.RESOLVED);
|
|
390
|
+
const now = Date.now();
|
|
391
|
+
j.status = POPTGOV_RESOLVE_LIFECYCLE_V2.RESOLVED;
|
|
392
|
+
j.updatedAt = now;
|
|
393
|
+
if (!j.settledAt) j.settledAt = now;
|
|
394
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
395
|
+
}
|
|
396
|
+
export function failPoptgovResolveV2(id, reason) {
|
|
397
|
+
const j = _poptgovJsV2.get(id);
|
|
398
|
+
if (!j) throw new Error(`poptgov resolve ${id} not found`);
|
|
399
|
+
_poptgovCheckJ(j.status, POPTGOV_RESOLVE_LIFECYCLE_V2.FAILED);
|
|
400
|
+
const now = Date.now();
|
|
401
|
+
j.status = POPTGOV_RESOLVE_LIFECYCLE_V2.FAILED;
|
|
402
|
+
j.updatedAt = now;
|
|
403
|
+
if (!j.settledAt) j.settledAt = now;
|
|
404
|
+
if (reason) j.metadata.failReason = String(reason);
|
|
405
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
406
|
+
}
|
|
407
|
+
export function cancelPoptgovResolveV2(id, reason) {
|
|
408
|
+
const j = _poptgovJsV2.get(id);
|
|
409
|
+
if (!j) throw new Error(`poptgov resolve ${id} not found`);
|
|
410
|
+
_poptgovCheckJ(j.status, POPTGOV_RESOLVE_LIFECYCLE_V2.CANCELLED);
|
|
411
|
+
const now = Date.now();
|
|
412
|
+
j.status = POPTGOV_RESOLVE_LIFECYCLE_V2.CANCELLED;
|
|
413
|
+
j.updatedAt = now;
|
|
414
|
+
if (!j.settledAt) j.settledAt = now;
|
|
415
|
+
if (reason) j.metadata.cancelReason = String(reason);
|
|
416
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
417
|
+
}
|
|
418
|
+
export function getPoptgovResolveV2(id) {
|
|
419
|
+
const j = _poptgovJsV2.get(id);
|
|
420
|
+
if (!j) return null;
|
|
421
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
422
|
+
}
|
|
423
|
+
export function listPoptgovResolvesV2() {
|
|
424
|
+
return [..._poptgovJsV2.values()].map((j) => ({
|
|
425
|
+
...j,
|
|
426
|
+
metadata: { ...j.metadata },
|
|
427
|
+
}));
|
|
428
|
+
}
|
|
429
|
+
export function autoStaleIdlePoptgovProfilesV2({ now } = {}) {
|
|
430
|
+
const t = now ?? Date.now();
|
|
431
|
+
const flipped = [];
|
|
432
|
+
for (const p of _poptgovPsV2.values())
|
|
433
|
+
if (
|
|
434
|
+
p.status === POPTGOV_PROFILE_MATURITY_V2.ACTIVE &&
|
|
435
|
+
t - p.lastTouchedAt >= _poptgovIdleMs
|
|
436
|
+
) {
|
|
437
|
+
p.status = POPTGOV_PROFILE_MATURITY_V2.STALE;
|
|
438
|
+
p.updatedAt = t;
|
|
439
|
+
flipped.push(p.id);
|
|
440
|
+
}
|
|
441
|
+
return { flipped, count: flipped.length };
|
|
442
|
+
}
|
|
443
|
+
export function autoFailStuckPoptgovResolvesV2({ now } = {}) {
|
|
444
|
+
const t = now ?? Date.now();
|
|
445
|
+
const flipped = [];
|
|
446
|
+
for (const j of _poptgovJsV2.values())
|
|
447
|
+
if (
|
|
448
|
+
j.status === POPTGOV_RESOLVE_LIFECYCLE_V2.RESOLVING &&
|
|
449
|
+
j.startedAt != null &&
|
|
450
|
+
t - j.startedAt >= _poptgovStuckMs
|
|
451
|
+
) {
|
|
452
|
+
j.status = POPTGOV_RESOLVE_LIFECYCLE_V2.FAILED;
|
|
453
|
+
j.updatedAt = t;
|
|
454
|
+
if (!j.settledAt) j.settledAt = t;
|
|
455
|
+
j.metadata.failReason = "auto-fail-stuck";
|
|
456
|
+
flipped.push(j.id);
|
|
457
|
+
}
|
|
458
|
+
return { flipped, count: flipped.length };
|
|
459
|
+
}
|
|
460
|
+
export function getProviderOptionsGovStatsV2() {
|
|
461
|
+
const profilesByStatus = {};
|
|
462
|
+
for (const v of Object.values(POPTGOV_PROFILE_MATURITY_V2))
|
|
463
|
+
profilesByStatus[v] = 0;
|
|
464
|
+
for (const p of _poptgovPsV2.values()) profilesByStatus[p.status]++;
|
|
465
|
+
const resolvesByStatus = {};
|
|
466
|
+
for (const v of Object.values(POPTGOV_RESOLVE_LIFECYCLE_V2))
|
|
467
|
+
resolvesByStatus[v] = 0;
|
|
468
|
+
for (const j of _poptgovJsV2.values()) resolvesByStatus[j.status]++;
|
|
469
|
+
return {
|
|
470
|
+
totalPoptgovProfilesV2: _poptgovPsV2.size,
|
|
471
|
+
totalPoptgovResolvesV2: _poptgovJsV2.size,
|
|
472
|
+
maxActivePoptgovProfilesPerOwner: _poptgovMaxActive,
|
|
473
|
+
maxPendingPoptgovResolvesPerProfile: _poptgovMaxPending,
|
|
474
|
+
poptgovProfileIdleMs: _poptgovIdleMs,
|
|
475
|
+
poptgovResolveStuckMs: _poptgovStuckMs,
|
|
476
|
+
profilesByStatus,
|
|
477
|
+
resolvesByStatus,
|
|
478
|
+
};
|
|
479
|
+
}
|
|
@@ -118,3 +118,351 @@ export function buildProviderSource(provider, opts = {}) {
|
|
|
118
118
|
signal,
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
|
+
|
|
122
|
+
// =====================================================================
|
|
123
|
+
// provider-stream V2 governance overlay (iter27)
|
|
124
|
+
// =====================================================================
|
|
125
|
+
export const PSTRMGOV_PROFILE_MATURITY_V2 = Object.freeze({
|
|
126
|
+
PENDING: "pending",
|
|
127
|
+
ACTIVE: "active",
|
|
128
|
+
STALE: "stale",
|
|
129
|
+
ARCHIVED: "archived",
|
|
130
|
+
});
|
|
131
|
+
export const PSTRMGOV_CHUNK_LIFECYCLE_V2 = Object.freeze({
|
|
132
|
+
QUEUED: "queued",
|
|
133
|
+
STREAMING: "streaming",
|
|
134
|
+
FLUSHED: "flushed",
|
|
135
|
+
FAILED: "failed",
|
|
136
|
+
CANCELLED: "cancelled",
|
|
137
|
+
});
|
|
138
|
+
const _pstrmgovPTrans = new Map([
|
|
139
|
+
[
|
|
140
|
+
PSTRMGOV_PROFILE_MATURITY_V2.PENDING,
|
|
141
|
+
new Set([
|
|
142
|
+
PSTRMGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
143
|
+
PSTRMGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
144
|
+
]),
|
|
145
|
+
],
|
|
146
|
+
[
|
|
147
|
+
PSTRMGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
148
|
+
new Set([
|
|
149
|
+
PSTRMGOV_PROFILE_MATURITY_V2.STALE,
|
|
150
|
+
PSTRMGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
151
|
+
]),
|
|
152
|
+
],
|
|
153
|
+
[
|
|
154
|
+
PSTRMGOV_PROFILE_MATURITY_V2.STALE,
|
|
155
|
+
new Set([
|
|
156
|
+
PSTRMGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
157
|
+
PSTRMGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
158
|
+
]),
|
|
159
|
+
],
|
|
160
|
+
[PSTRMGOV_PROFILE_MATURITY_V2.ARCHIVED, new Set()],
|
|
161
|
+
]);
|
|
162
|
+
const _pstrmgovPTerminal = new Set([PSTRMGOV_PROFILE_MATURITY_V2.ARCHIVED]);
|
|
163
|
+
const _pstrmgovJTrans = new Map([
|
|
164
|
+
[
|
|
165
|
+
PSTRMGOV_CHUNK_LIFECYCLE_V2.QUEUED,
|
|
166
|
+
new Set([
|
|
167
|
+
PSTRMGOV_CHUNK_LIFECYCLE_V2.STREAMING,
|
|
168
|
+
PSTRMGOV_CHUNK_LIFECYCLE_V2.CANCELLED,
|
|
169
|
+
]),
|
|
170
|
+
],
|
|
171
|
+
[
|
|
172
|
+
PSTRMGOV_CHUNK_LIFECYCLE_V2.STREAMING,
|
|
173
|
+
new Set([
|
|
174
|
+
PSTRMGOV_CHUNK_LIFECYCLE_V2.FLUSHED,
|
|
175
|
+
PSTRMGOV_CHUNK_LIFECYCLE_V2.FAILED,
|
|
176
|
+
PSTRMGOV_CHUNK_LIFECYCLE_V2.CANCELLED,
|
|
177
|
+
]),
|
|
178
|
+
],
|
|
179
|
+
[PSTRMGOV_CHUNK_LIFECYCLE_V2.FLUSHED, new Set()],
|
|
180
|
+
[PSTRMGOV_CHUNK_LIFECYCLE_V2.FAILED, new Set()],
|
|
181
|
+
[PSTRMGOV_CHUNK_LIFECYCLE_V2.CANCELLED, new Set()],
|
|
182
|
+
]);
|
|
183
|
+
const _pstrmgovPsV2 = new Map();
|
|
184
|
+
const _pstrmgovJsV2 = new Map();
|
|
185
|
+
let _pstrmgovMaxActive = 8,
|
|
186
|
+
_pstrmgovMaxPending = 25,
|
|
187
|
+
_pstrmgovIdleMs = 30 * 24 * 60 * 60 * 1000,
|
|
188
|
+
_pstrmgovStuckMs = 60 * 1000;
|
|
189
|
+
function _pstrmgovPos(n, label) {
|
|
190
|
+
const v = Math.floor(Number(n));
|
|
191
|
+
if (!Number.isFinite(v) || v <= 0)
|
|
192
|
+
throw new Error(`${label} must be positive integer`);
|
|
193
|
+
return v;
|
|
194
|
+
}
|
|
195
|
+
function _pstrmgovCheckP(from, to) {
|
|
196
|
+
const a = _pstrmgovPTrans.get(from);
|
|
197
|
+
if (!a || !a.has(to))
|
|
198
|
+
throw new Error(`invalid pstrmgov profile transition ${from} → ${to}`);
|
|
199
|
+
}
|
|
200
|
+
function _pstrmgovCheckJ(from, to) {
|
|
201
|
+
const a = _pstrmgovJTrans.get(from);
|
|
202
|
+
if (!a || !a.has(to))
|
|
203
|
+
throw new Error(`invalid pstrmgov chunk transition ${from} → ${to}`);
|
|
204
|
+
}
|
|
205
|
+
function _pstrmgovCountActive(owner) {
|
|
206
|
+
let c = 0;
|
|
207
|
+
for (const p of _pstrmgovPsV2.values())
|
|
208
|
+
if (p.owner === owner && p.status === PSTRMGOV_PROFILE_MATURITY_V2.ACTIVE)
|
|
209
|
+
c++;
|
|
210
|
+
return c;
|
|
211
|
+
}
|
|
212
|
+
function _pstrmgovCountPending(profileId) {
|
|
213
|
+
let c = 0;
|
|
214
|
+
for (const j of _pstrmgovJsV2.values())
|
|
215
|
+
if (
|
|
216
|
+
j.profileId === profileId &&
|
|
217
|
+
(j.status === PSTRMGOV_CHUNK_LIFECYCLE_V2.QUEUED ||
|
|
218
|
+
j.status === PSTRMGOV_CHUNK_LIFECYCLE_V2.STREAMING)
|
|
219
|
+
)
|
|
220
|
+
c++;
|
|
221
|
+
return c;
|
|
222
|
+
}
|
|
223
|
+
export function setMaxActivePstrmgovProfilesPerOwnerV2(n) {
|
|
224
|
+
_pstrmgovMaxActive = _pstrmgovPos(n, "maxActivePstrmgovProfilesPerOwner");
|
|
225
|
+
}
|
|
226
|
+
export function getMaxActivePstrmgovProfilesPerOwnerV2() {
|
|
227
|
+
return _pstrmgovMaxActive;
|
|
228
|
+
}
|
|
229
|
+
export function setMaxPendingPstrmgovChunksPerProfileV2(n) {
|
|
230
|
+
_pstrmgovMaxPending = _pstrmgovPos(n, "maxPendingPstrmgovChunksPerProfile");
|
|
231
|
+
}
|
|
232
|
+
export function getMaxPendingPstrmgovChunksPerProfileV2() {
|
|
233
|
+
return _pstrmgovMaxPending;
|
|
234
|
+
}
|
|
235
|
+
export function setPstrmgovProfileIdleMsV2(n) {
|
|
236
|
+
_pstrmgovIdleMs = _pstrmgovPos(n, "pstrmgovProfileIdleMs");
|
|
237
|
+
}
|
|
238
|
+
export function getPstrmgovProfileIdleMsV2() {
|
|
239
|
+
return _pstrmgovIdleMs;
|
|
240
|
+
}
|
|
241
|
+
export function setPstrmgovChunkStuckMsV2(n) {
|
|
242
|
+
_pstrmgovStuckMs = _pstrmgovPos(n, "pstrmgovChunkStuckMs");
|
|
243
|
+
}
|
|
244
|
+
export function getPstrmgovChunkStuckMsV2() {
|
|
245
|
+
return _pstrmgovStuckMs;
|
|
246
|
+
}
|
|
247
|
+
export function _resetStateProviderStreamGovV2() {
|
|
248
|
+
_pstrmgovPsV2.clear();
|
|
249
|
+
_pstrmgovJsV2.clear();
|
|
250
|
+
_pstrmgovMaxActive = 8;
|
|
251
|
+
_pstrmgovMaxPending = 25;
|
|
252
|
+
_pstrmgovIdleMs = 30 * 24 * 60 * 60 * 1000;
|
|
253
|
+
_pstrmgovStuckMs = 60 * 1000;
|
|
254
|
+
}
|
|
255
|
+
export function registerPstrmgovProfileV2({
|
|
256
|
+
id,
|
|
257
|
+
owner,
|
|
258
|
+
provider,
|
|
259
|
+
metadata,
|
|
260
|
+
} = {}) {
|
|
261
|
+
if (!id || !owner) throw new Error("id and owner required");
|
|
262
|
+
if (_pstrmgovPsV2.has(id))
|
|
263
|
+
throw new Error(`pstrmgov profile ${id} already exists`);
|
|
264
|
+
const now = Date.now();
|
|
265
|
+
const p = {
|
|
266
|
+
id,
|
|
267
|
+
owner,
|
|
268
|
+
provider: provider || "default",
|
|
269
|
+
status: PSTRMGOV_PROFILE_MATURITY_V2.PENDING,
|
|
270
|
+
createdAt: now,
|
|
271
|
+
updatedAt: now,
|
|
272
|
+
lastTouchedAt: now,
|
|
273
|
+
activatedAt: null,
|
|
274
|
+
archivedAt: null,
|
|
275
|
+
metadata: { ...(metadata || {}) },
|
|
276
|
+
};
|
|
277
|
+
_pstrmgovPsV2.set(id, p);
|
|
278
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
279
|
+
}
|
|
280
|
+
export function activatePstrmgovProfileV2(id) {
|
|
281
|
+
const p = _pstrmgovPsV2.get(id);
|
|
282
|
+
if (!p) throw new Error(`pstrmgov profile ${id} not found`);
|
|
283
|
+
const isInitial = p.status === PSTRMGOV_PROFILE_MATURITY_V2.PENDING;
|
|
284
|
+
_pstrmgovCheckP(p.status, PSTRMGOV_PROFILE_MATURITY_V2.ACTIVE);
|
|
285
|
+
if (isInitial && _pstrmgovCountActive(p.owner) >= _pstrmgovMaxActive)
|
|
286
|
+
throw new Error(
|
|
287
|
+
`max active pstrmgov profiles for owner ${p.owner} reached`,
|
|
288
|
+
);
|
|
289
|
+
const now = Date.now();
|
|
290
|
+
p.status = PSTRMGOV_PROFILE_MATURITY_V2.ACTIVE;
|
|
291
|
+
p.updatedAt = now;
|
|
292
|
+
p.lastTouchedAt = now;
|
|
293
|
+
if (!p.activatedAt) p.activatedAt = now;
|
|
294
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
295
|
+
}
|
|
296
|
+
export function stalePstrmgovProfileV2(id) {
|
|
297
|
+
const p = _pstrmgovPsV2.get(id);
|
|
298
|
+
if (!p) throw new Error(`pstrmgov profile ${id} not found`);
|
|
299
|
+
_pstrmgovCheckP(p.status, PSTRMGOV_PROFILE_MATURITY_V2.STALE);
|
|
300
|
+
p.status = PSTRMGOV_PROFILE_MATURITY_V2.STALE;
|
|
301
|
+
p.updatedAt = Date.now();
|
|
302
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
303
|
+
}
|
|
304
|
+
export function archivePstrmgovProfileV2(id) {
|
|
305
|
+
const p = _pstrmgovPsV2.get(id);
|
|
306
|
+
if (!p) throw new Error(`pstrmgov profile ${id} not found`);
|
|
307
|
+
_pstrmgovCheckP(p.status, PSTRMGOV_PROFILE_MATURITY_V2.ARCHIVED);
|
|
308
|
+
const now = Date.now();
|
|
309
|
+
p.status = PSTRMGOV_PROFILE_MATURITY_V2.ARCHIVED;
|
|
310
|
+
p.updatedAt = now;
|
|
311
|
+
if (!p.archivedAt) p.archivedAt = now;
|
|
312
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
313
|
+
}
|
|
314
|
+
export function touchPstrmgovProfileV2(id) {
|
|
315
|
+
const p = _pstrmgovPsV2.get(id);
|
|
316
|
+
if (!p) throw new Error(`pstrmgov profile ${id} not found`);
|
|
317
|
+
if (_pstrmgovPTerminal.has(p.status))
|
|
318
|
+
throw new Error(`cannot touch terminal pstrmgov profile ${id}`);
|
|
319
|
+
const now = Date.now();
|
|
320
|
+
p.lastTouchedAt = now;
|
|
321
|
+
p.updatedAt = now;
|
|
322
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
323
|
+
}
|
|
324
|
+
export function getPstrmgovProfileV2(id) {
|
|
325
|
+
const p = _pstrmgovPsV2.get(id);
|
|
326
|
+
if (!p) return null;
|
|
327
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
328
|
+
}
|
|
329
|
+
export function listPstrmgovProfilesV2() {
|
|
330
|
+
return [..._pstrmgovPsV2.values()].map((p) => ({
|
|
331
|
+
...p,
|
|
332
|
+
metadata: { ...p.metadata },
|
|
333
|
+
}));
|
|
334
|
+
}
|
|
335
|
+
export function createPstrmgovChunkV2({
|
|
336
|
+
id,
|
|
337
|
+
profileId,
|
|
338
|
+
tokenId,
|
|
339
|
+
metadata,
|
|
340
|
+
} = {}) {
|
|
341
|
+
if (!id || !profileId) throw new Error("id and profileId required");
|
|
342
|
+
if (_pstrmgovJsV2.has(id))
|
|
343
|
+
throw new Error(`pstrmgov chunk ${id} already exists`);
|
|
344
|
+
if (!_pstrmgovPsV2.has(profileId))
|
|
345
|
+
throw new Error(`pstrmgov profile ${profileId} not found`);
|
|
346
|
+
if (_pstrmgovCountPending(profileId) >= _pstrmgovMaxPending)
|
|
347
|
+
throw new Error(
|
|
348
|
+
`max pending pstrmgov chunks for profile ${profileId} reached`,
|
|
349
|
+
);
|
|
350
|
+
const now = Date.now();
|
|
351
|
+
const j = {
|
|
352
|
+
id,
|
|
353
|
+
profileId,
|
|
354
|
+
tokenId: tokenId || "",
|
|
355
|
+
status: PSTRMGOV_CHUNK_LIFECYCLE_V2.QUEUED,
|
|
356
|
+
createdAt: now,
|
|
357
|
+
updatedAt: now,
|
|
358
|
+
startedAt: null,
|
|
359
|
+
settledAt: null,
|
|
360
|
+
metadata: { ...(metadata || {}) },
|
|
361
|
+
};
|
|
362
|
+
_pstrmgovJsV2.set(id, j);
|
|
363
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
364
|
+
}
|
|
365
|
+
export function streamingPstrmgovChunkV2(id) {
|
|
366
|
+
const j = _pstrmgovJsV2.get(id);
|
|
367
|
+
if (!j) throw new Error(`pstrmgov chunk ${id} not found`);
|
|
368
|
+
_pstrmgovCheckJ(j.status, PSTRMGOV_CHUNK_LIFECYCLE_V2.STREAMING);
|
|
369
|
+
const now = Date.now();
|
|
370
|
+
j.status = PSTRMGOV_CHUNK_LIFECYCLE_V2.STREAMING;
|
|
371
|
+
j.updatedAt = now;
|
|
372
|
+
if (!j.startedAt) j.startedAt = now;
|
|
373
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
374
|
+
}
|
|
375
|
+
export function completeChunkPstrmgovV2(id) {
|
|
376
|
+
const j = _pstrmgovJsV2.get(id);
|
|
377
|
+
if (!j) throw new Error(`pstrmgov chunk ${id} not found`);
|
|
378
|
+
_pstrmgovCheckJ(j.status, PSTRMGOV_CHUNK_LIFECYCLE_V2.FLUSHED);
|
|
379
|
+
const now = Date.now();
|
|
380
|
+
j.status = PSTRMGOV_CHUNK_LIFECYCLE_V2.FLUSHED;
|
|
381
|
+
j.updatedAt = now;
|
|
382
|
+
if (!j.settledAt) j.settledAt = now;
|
|
383
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
384
|
+
}
|
|
385
|
+
export function failPstrmgovChunkV2(id, reason) {
|
|
386
|
+
const j = _pstrmgovJsV2.get(id);
|
|
387
|
+
if (!j) throw new Error(`pstrmgov chunk ${id} not found`);
|
|
388
|
+
_pstrmgovCheckJ(j.status, PSTRMGOV_CHUNK_LIFECYCLE_V2.FAILED);
|
|
389
|
+
const now = Date.now();
|
|
390
|
+
j.status = PSTRMGOV_CHUNK_LIFECYCLE_V2.FAILED;
|
|
391
|
+
j.updatedAt = now;
|
|
392
|
+
if (!j.settledAt) j.settledAt = now;
|
|
393
|
+
if (reason) j.metadata.failReason = String(reason);
|
|
394
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
395
|
+
}
|
|
396
|
+
export function cancelPstrmgovChunkV2(id, reason) {
|
|
397
|
+
const j = _pstrmgovJsV2.get(id);
|
|
398
|
+
if (!j) throw new Error(`pstrmgov chunk ${id} not found`);
|
|
399
|
+
_pstrmgovCheckJ(j.status, PSTRMGOV_CHUNK_LIFECYCLE_V2.CANCELLED);
|
|
400
|
+
const now = Date.now();
|
|
401
|
+
j.status = PSTRMGOV_CHUNK_LIFECYCLE_V2.CANCELLED;
|
|
402
|
+
j.updatedAt = now;
|
|
403
|
+
if (!j.settledAt) j.settledAt = now;
|
|
404
|
+
if (reason) j.metadata.cancelReason = String(reason);
|
|
405
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
406
|
+
}
|
|
407
|
+
export function getPstrmgovChunkV2(id) {
|
|
408
|
+
const j = _pstrmgovJsV2.get(id);
|
|
409
|
+
if (!j) return null;
|
|
410
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
411
|
+
}
|
|
412
|
+
export function listPstrmgovChunksV2() {
|
|
413
|
+
return [..._pstrmgovJsV2.values()].map((j) => ({
|
|
414
|
+
...j,
|
|
415
|
+
metadata: { ...j.metadata },
|
|
416
|
+
}));
|
|
417
|
+
}
|
|
418
|
+
export function autoStaleIdlePstrmgovProfilesV2({ now } = {}) {
|
|
419
|
+
const t = now ?? Date.now();
|
|
420
|
+
const flipped = [];
|
|
421
|
+
for (const p of _pstrmgovPsV2.values())
|
|
422
|
+
if (
|
|
423
|
+
p.status === PSTRMGOV_PROFILE_MATURITY_V2.ACTIVE &&
|
|
424
|
+
t - p.lastTouchedAt >= _pstrmgovIdleMs
|
|
425
|
+
) {
|
|
426
|
+
p.status = PSTRMGOV_PROFILE_MATURITY_V2.STALE;
|
|
427
|
+
p.updatedAt = t;
|
|
428
|
+
flipped.push(p.id);
|
|
429
|
+
}
|
|
430
|
+
return { flipped, count: flipped.length };
|
|
431
|
+
}
|
|
432
|
+
export function autoFailStuckPstrmgovChunksV2({ now } = {}) {
|
|
433
|
+
const t = now ?? Date.now();
|
|
434
|
+
const flipped = [];
|
|
435
|
+
for (const j of _pstrmgovJsV2.values())
|
|
436
|
+
if (
|
|
437
|
+
j.status === PSTRMGOV_CHUNK_LIFECYCLE_V2.STREAMING &&
|
|
438
|
+
j.startedAt != null &&
|
|
439
|
+
t - j.startedAt >= _pstrmgovStuckMs
|
|
440
|
+
) {
|
|
441
|
+
j.status = PSTRMGOV_CHUNK_LIFECYCLE_V2.FAILED;
|
|
442
|
+
j.updatedAt = t;
|
|
443
|
+
if (!j.settledAt) j.settledAt = t;
|
|
444
|
+
j.metadata.failReason = "auto-fail-stuck";
|
|
445
|
+
flipped.push(j.id);
|
|
446
|
+
}
|
|
447
|
+
return { flipped, count: flipped.length };
|
|
448
|
+
}
|
|
449
|
+
export function getProviderStreamGovStatsV2() {
|
|
450
|
+
const profilesByStatus = {};
|
|
451
|
+
for (const v of Object.values(PSTRMGOV_PROFILE_MATURITY_V2))
|
|
452
|
+
profilesByStatus[v] = 0;
|
|
453
|
+
for (const p of _pstrmgovPsV2.values()) profilesByStatus[p.status]++;
|
|
454
|
+
const chunksByStatus = {};
|
|
455
|
+
for (const v of Object.values(PSTRMGOV_CHUNK_LIFECYCLE_V2))
|
|
456
|
+
chunksByStatus[v] = 0;
|
|
457
|
+
for (const j of _pstrmgovJsV2.values()) chunksByStatus[j.status]++;
|
|
458
|
+
return {
|
|
459
|
+
totalPstrmgovProfilesV2: _pstrmgovPsV2.size,
|
|
460
|
+
totalPstrmgovChunksV2: _pstrmgovJsV2.size,
|
|
461
|
+
maxActivePstrmgovProfilesPerOwner: _pstrmgovMaxActive,
|
|
462
|
+
maxPendingPstrmgovChunksPerProfile: _pstrmgovMaxPending,
|
|
463
|
+
pstrmgovProfileIdleMs: _pstrmgovIdleMs,
|
|
464
|
+
pstrmgovChunkStuckMs: _pstrmgovStuckMs,
|
|
465
|
+
profilesByStatus,
|
|
466
|
+
chunksByStatus,
|
|
467
|
+
};
|
|
468
|
+
}
|