chainlesschain 0.145.0 → 0.152.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/activitypub.js +207 -0
- package/src/commands/agent-network.js +217 -0
- package/src/commands/automation.js +201 -0
- package/src/commands/bi.js +203 -0
- package/src/commands/browse.js +213 -0
- package/src/commands/codegen.js +207 -0
- package/src/commands/collab.js +211 -0
- package/src/commands/compliance.js +410 -0
- package/src/commands/cowork.js +203 -0
- package/src/commands/dbevo.js +227 -0
- package/src/commands/dev.js +207 -0
- package/src/commands/did-v2.js +217 -0
- package/src/commands/did.js +221 -0
- package/src/commands/dlp.js +213 -0
- package/src/commands/evomap.js +205 -0
- package/src/commands/export.js +213 -0
- package/src/commands/federation.js +209 -0
- package/src/commands/fusion.js +205 -0
- package/src/commands/governance.js +209 -0
- package/src/commands/hook.js +209 -0
- package/src/commands/import.js +209 -0
- package/src/commands/infra.js +203 -0
- package/src/commands/instinct.js +209 -0
- package/src/commands/ipfs.js +207 -0
- package/src/commands/llm.js +217 -0
- package/src/commands/matrix.js +207 -0
- package/src/commands/mcp.js +217 -0
- package/src/commands/memory.js +209 -0
- package/src/commands/multimodal.js +203 -0
- package/src/commands/nlprog.js +225 -0
- package/src/commands/nostr.js +209 -0
- package/src/commands/note.js +205 -0
- package/src/commands/ops.js +219 -0
- package/src/commands/org.js +209 -0
- package/src/commands/p2p.js +209 -0
- package/src/commands/perception.js +209 -0
- package/src/commands/permmem.js +203 -0
- package/src/commands/plugin-ecosystem.js +209 -0
- package/src/commands/pqc.js +213 -0
- package/src/commands/quantization.js +207 -0
- package/src/commands/rcache.js +205 -0
- package/src/commands/recommend.js +233 -0
- package/src/commands/runtime.js +205 -0
- package/src/commands/scim.js +209 -0
- package/src/commands/session.js +209 -0
- package/src/commands/skill.js +207 -0
- package/src/commands/social.js +201 -0
- package/src/commands/sso.js +209 -0
- package/src/commands/sync.js +209 -0
- package/src/commands/tech.js +209 -0
- package/src/commands/tenant.js +217 -0
- package/src/commands/tokens.js +209 -0
- package/src/commands/trust.js +217 -0
- package/src/commands/wallet.js +209 -0
- package/src/commands/workflow.js +203 -0
- package/src/index.js +140 -0
- package/src/lib/activitypub-bridge.js +334 -0
- package/src/lib/agent-network.js +341 -0
- package/src/lib/aiops.js +346 -0
- package/src/lib/automation-engine.js +335 -0
- package/src/lib/autonomous-developer.js +332 -0
- package/src/lib/bi-engine.js +333 -0
- package/src/lib/browser-automation.js +334 -0
- package/src/lib/code-agent.js +339 -0
- package/src/lib/collaboration-governance.js +334 -0
- package/src/lib/community-governance.js +346 -0
- package/src/lib/content-recommendation.js +351 -0
- package/src/lib/cowork-share.js +338 -0
- package/src/lib/dbevo.js +351 -0
- package/src/lib/decentral-infra.js +330 -0
- package/src/lib/did-manager.js +341 -0
- package/src/lib/did-v2-manager.js +341 -0
- package/src/lib/dlp-engine.js +339 -0
- package/src/lib/evomap-governance.js +334 -0
- package/src/lib/federation-hardening.js +340 -0
- package/src/lib/hook-manager.js +341 -0
- package/src/lib/instinct-manager.js +346 -0
- package/src/lib/ipfs-storage.js +334 -0
- package/src/lib/knowledge-exporter.js +341 -0
- package/src/lib/knowledge-importer.js +341 -0
- package/src/lib/llm-providers.js +346 -0
- package/src/lib/matrix-bridge.js +339 -0
- package/src/lib/mcp-registry.js +346 -0
- package/src/lib/memory-manager.js +336 -0
- package/src/lib/multimodal.js +330 -0
- package/src/lib/nl-programming.js +341 -0
- package/src/lib/nostr-bridge.js +336 -0
- package/src/lib/note-versioning.js +339 -0
- package/src/lib/org-manager.js +336 -0
- package/src/lib/p2p-manager.js +341 -0
- package/src/lib/perception.js +346 -0
- package/src/lib/permanent-memory.js +327 -0
- package/src/lib/plugin-ecosystem.js +346 -0
- package/src/lib/pqc-manager.js +346 -0
- package/src/lib/protocol-fusion.js +338 -0
- package/src/lib/quantization.js +337 -0
- package/src/lib/response-cache.js +333 -0
- package/src/lib/scim-manager.js +346 -0
- package/src/lib/session-manager.js +334 -0
- package/src/lib/skill-loader.js +334 -0
- package/src/lib/social-manager.js +330 -0
- package/src/lib/sso-manager.js +340 -0
- package/src/lib/sync-manager.js +336 -0
- package/src/lib/tech-learning-engine.js +341 -0
- package/src/lib/tenant-saas.js +341 -0
- package/src/lib/threat-intel.js +330 -0
- package/src/lib/token-tracker.js +336 -0
- package/src/lib/trust-security.js +343 -0
- package/src/lib/ueba.js +340 -0
- package/src/lib/universal-runtime.js +330 -0
- package/src/lib/wallet-manager.js +336 -0
- package/src/lib/workflow-engine.js +330 -0
package/src/lib/nostr-bridge.js
CHANGED
|
@@ -711,3 +711,339 @@ export function getNostrBridgeStatsV2() {
|
|
|
711
711
|
eventsByStatus,
|
|
712
712
|
};
|
|
713
713
|
}
|
|
714
|
+
|
|
715
|
+
// =====================================================================
|
|
716
|
+
// nostr-bridge V2 governance overlay (iter21)
|
|
717
|
+
// =====================================================================
|
|
718
|
+
export const NOSGOV_PROFILE_MATURITY_V2 = Object.freeze({
|
|
719
|
+
PENDING: "pending",
|
|
720
|
+
ACTIVE: "active",
|
|
721
|
+
SUSPENDED: "suspended",
|
|
722
|
+
ARCHIVED: "archived",
|
|
723
|
+
});
|
|
724
|
+
export const NOSGOV_PUBLISH_LIFECYCLE_V2 = Object.freeze({
|
|
725
|
+
QUEUED: "queued",
|
|
726
|
+
PUBLISHING: "publishing",
|
|
727
|
+
PUBLISHED: "published",
|
|
728
|
+
FAILED: "failed",
|
|
729
|
+
CANCELLED: "cancelled",
|
|
730
|
+
});
|
|
731
|
+
const _nosgovPTrans = new Map([
|
|
732
|
+
[
|
|
733
|
+
NOSGOV_PROFILE_MATURITY_V2.PENDING,
|
|
734
|
+
new Set([
|
|
735
|
+
NOSGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
736
|
+
NOSGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
737
|
+
]),
|
|
738
|
+
],
|
|
739
|
+
[
|
|
740
|
+
NOSGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
741
|
+
new Set([
|
|
742
|
+
NOSGOV_PROFILE_MATURITY_V2.SUSPENDED,
|
|
743
|
+
NOSGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
744
|
+
]),
|
|
745
|
+
],
|
|
746
|
+
[
|
|
747
|
+
NOSGOV_PROFILE_MATURITY_V2.SUSPENDED,
|
|
748
|
+
new Set([
|
|
749
|
+
NOSGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
750
|
+
NOSGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
751
|
+
]),
|
|
752
|
+
],
|
|
753
|
+
[NOSGOV_PROFILE_MATURITY_V2.ARCHIVED, new Set()],
|
|
754
|
+
]);
|
|
755
|
+
const _nosgovPTerminal = new Set([NOSGOV_PROFILE_MATURITY_V2.ARCHIVED]);
|
|
756
|
+
const _nosgovJTrans = new Map([
|
|
757
|
+
[
|
|
758
|
+
NOSGOV_PUBLISH_LIFECYCLE_V2.QUEUED,
|
|
759
|
+
new Set([
|
|
760
|
+
NOSGOV_PUBLISH_LIFECYCLE_V2.PUBLISHING,
|
|
761
|
+
NOSGOV_PUBLISH_LIFECYCLE_V2.CANCELLED,
|
|
762
|
+
]),
|
|
763
|
+
],
|
|
764
|
+
[
|
|
765
|
+
NOSGOV_PUBLISH_LIFECYCLE_V2.PUBLISHING,
|
|
766
|
+
new Set([
|
|
767
|
+
NOSGOV_PUBLISH_LIFECYCLE_V2.PUBLISHED,
|
|
768
|
+
NOSGOV_PUBLISH_LIFECYCLE_V2.FAILED,
|
|
769
|
+
NOSGOV_PUBLISH_LIFECYCLE_V2.CANCELLED,
|
|
770
|
+
]),
|
|
771
|
+
],
|
|
772
|
+
[NOSGOV_PUBLISH_LIFECYCLE_V2.PUBLISHED, new Set()],
|
|
773
|
+
[NOSGOV_PUBLISH_LIFECYCLE_V2.FAILED, new Set()],
|
|
774
|
+
[NOSGOV_PUBLISH_LIFECYCLE_V2.CANCELLED, new Set()],
|
|
775
|
+
]);
|
|
776
|
+
const _nosgovPsV2 = new Map();
|
|
777
|
+
const _nosgovJsV2 = new Map();
|
|
778
|
+
let _nosgovMaxActive = 8,
|
|
779
|
+
_nosgovMaxPending = 25,
|
|
780
|
+
_nosgovIdleMs = 30 * 24 * 60 * 60 * 1000,
|
|
781
|
+
_nosgovStuckMs = 60 * 1000;
|
|
782
|
+
function _nosgovPos(n, label) {
|
|
783
|
+
const v = Math.floor(Number(n));
|
|
784
|
+
if (!Number.isFinite(v) || v <= 0)
|
|
785
|
+
throw new Error(`${label} must be positive integer`);
|
|
786
|
+
return v;
|
|
787
|
+
}
|
|
788
|
+
function _nosgovCheckP(from, to) {
|
|
789
|
+
const a = _nosgovPTrans.get(from);
|
|
790
|
+
if (!a || !a.has(to))
|
|
791
|
+
throw new Error(`invalid nosgov profile transition ${from} → ${to}`);
|
|
792
|
+
}
|
|
793
|
+
function _nosgovCheckJ(from, to) {
|
|
794
|
+
const a = _nosgovJTrans.get(from);
|
|
795
|
+
if (!a || !a.has(to))
|
|
796
|
+
throw new Error(`invalid nosgov publish transition ${from} → ${to}`);
|
|
797
|
+
}
|
|
798
|
+
function _nosgovCountActive(owner) {
|
|
799
|
+
let c = 0;
|
|
800
|
+
for (const p of _nosgovPsV2.values())
|
|
801
|
+
if (p.owner === owner && p.status === NOSGOV_PROFILE_MATURITY_V2.ACTIVE)
|
|
802
|
+
c++;
|
|
803
|
+
return c;
|
|
804
|
+
}
|
|
805
|
+
function _nosgovCountPending(profileId) {
|
|
806
|
+
let c = 0;
|
|
807
|
+
for (const j of _nosgovJsV2.values())
|
|
808
|
+
if (
|
|
809
|
+
j.profileId === profileId &&
|
|
810
|
+
(j.status === NOSGOV_PUBLISH_LIFECYCLE_V2.QUEUED ||
|
|
811
|
+
j.status === NOSGOV_PUBLISH_LIFECYCLE_V2.PUBLISHING)
|
|
812
|
+
)
|
|
813
|
+
c++;
|
|
814
|
+
return c;
|
|
815
|
+
}
|
|
816
|
+
export function setMaxActiveNosgovProfilesPerOwnerV2(n) {
|
|
817
|
+
_nosgovMaxActive = _nosgovPos(n, "maxActiveNosgovProfilesPerOwner");
|
|
818
|
+
}
|
|
819
|
+
export function getMaxActiveNosgovProfilesPerOwnerV2() {
|
|
820
|
+
return _nosgovMaxActive;
|
|
821
|
+
}
|
|
822
|
+
export function setMaxPendingNosgovPublishsPerProfileV2(n) {
|
|
823
|
+
_nosgovMaxPending = _nosgovPos(n, "maxPendingNosgovPublishsPerProfile");
|
|
824
|
+
}
|
|
825
|
+
export function getMaxPendingNosgovPublishsPerProfileV2() {
|
|
826
|
+
return _nosgovMaxPending;
|
|
827
|
+
}
|
|
828
|
+
export function setNosgovProfileIdleMsV2(n) {
|
|
829
|
+
_nosgovIdleMs = _nosgovPos(n, "nosgovProfileIdleMs");
|
|
830
|
+
}
|
|
831
|
+
export function getNosgovProfileIdleMsV2() {
|
|
832
|
+
return _nosgovIdleMs;
|
|
833
|
+
}
|
|
834
|
+
export function setNosgovPublishStuckMsV2(n) {
|
|
835
|
+
_nosgovStuckMs = _nosgovPos(n, "nosgovPublishStuckMs");
|
|
836
|
+
}
|
|
837
|
+
export function getNosgovPublishStuckMsV2() {
|
|
838
|
+
return _nosgovStuckMs;
|
|
839
|
+
}
|
|
840
|
+
export function _resetStateNostrBridgeGovV2() {
|
|
841
|
+
_nosgovPsV2.clear();
|
|
842
|
+
_nosgovJsV2.clear();
|
|
843
|
+
_nosgovMaxActive = 8;
|
|
844
|
+
_nosgovMaxPending = 25;
|
|
845
|
+
_nosgovIdleMs = 30 * 24 * 60 * 60 * 1000;
|
|
846
|
+
_nosgovStuckMs = 60 * 1000;
|
|
847
|
+
}
|
|
848
|
+
export function registerNosgovProfileV2({ id, owner, relay, metadata } = {}) {
|
|
849
|
+
if (!id || !owner) throw new Error("id and owner required");
|
|
850
|
+
if (_nosgovPsV2.has(id))
|
|
851
|
+
throw new Error(`nosgov profile ${id} already exists`);
|
|
852
|
+
const now = Date.now();
|
|
853
|
+
const p = {
|
|
854
|
+
id,
|
|
855
|
+
owner,
|
|
856
|
+
relay: relay || "wss://relay.local",
|
|
857
|
+
status: NOSGOV_PROFILE_MATURITY_V2.PENDING,
|
|
858
|
+
createdAt: now,
|
|
859
|
+
updatedAt: now,
|
|
860
|
+
lastTouchedAt: now,
|
|
861
|
+
activatedAt: null,
|
|
862
|
+
archivedAt: null,
|
|
863
|
+
metadata: { ...(metadata || {}) },
|
|
864
|
+
};
|
|
865
|
+
_nosgovPsV2.set(id, p);
|
|
866
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
867
|
+
}
|
|
868
|
+
export function activateNosgovProfileV2(id) {
|
|
869
|
+
const p = _nosgovPsV2.get(id);
|
|
870
|
+
if (!p) throw new Error(`nosgov profile ${id} not found`);
|
|
871
|
+
const isInitial = p.status === NOSGOV_PROFILE_MATURITY_V2.PENDING;
|
|
872
|
+
_nosgovCheckP(p.status, NOSGOV_PROFILE_MATURITY_V2.ACTIVE);
|
|
873
|
+
if (isInitial && _nosgovCountActive(p.owner) >= _nosgovMaxActive)
|
|
874
|
+
throw new Error(`max active nosgov profiles for owner ${p.owner} reached`);
|
|
875
|
+
const now = Date.now();
|
|
876
|
+
p.status = NOSGOV_PROFILE_MATURITY_V2.ACTIVE;
|
|
877
|
+
p.updatedAt = now;
|
|
878
|
+
p.lastTouchedAt = now;
|
|
879
|
+
if (!p.activatedAt) p.activatedAt = now;
|
|
880
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
881
|
+
}
|
|
882
|
+
export function suspendNosgovProfileV2(id) {
|
|
883
|
+
const p = _nosgovPsV2.get(id);
|
|
884
|
+
if (!p) throw new Error(`nosgov profile ${id} not found`);
|
|
885
|
+
_nosgovCheckP(p.status, NOSGOV_PROFILE_MATURITY_V2.SUSPENDED);
|
|
886
|
+
p.status = NOSGOV_PROFILE_MATURITY_V2.SUSPENDED;
|
|
887
|
+
p.updatedAt = Date.now();
|
|
888
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
889
|
+
}
|
|
890
|
+
export function archiveNosgovProfileV2(id) {
|
|
891
|
+
const p = _nosgovPsV2.get(id);
|
|
892
|
+
if (!p) throw new Error(`nosgov profile ${id} not found`);
|
|
893
|
+
_nosgovCheckP(p.status, NOSGOV_PROFILE_MATURITY_V2.ARCHIVED);
|
|
894
|
+
const now = Date.now();
|
|
895
|
+
p.status = NOSGOV_PROFILE_MATURITY_V2.ARCHIVED;
|
|
896
|
+
p.updatedAt = now;
|
|
897
|
+
if (!p.archivedAt) p.archivedAt = now;
|
|
898
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
899
|
+
}
|
|
900
|
+
export function touchNosgovProfileV2(id) {
|
|
901
|
+
const p = _nosgovPsV2.get(id);
|
|
902
|
+
if (!p) throw new Error(`nosgov profile ${id} not found`);
|
|
903
|
+
if (_nosgovPTerminal.has(p.status))
|
|
904
|
+
throw new Error(`cannot touch terminal nosgov profile ${id}`);
|
|
905
|
+
const now = Date.now();
|
|
906
|
+
p.lastTouchedAt = now;
|
|
907
|
+
p.updatedAt = now;
|
|
908
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
909
|
+
}
|
|
910
|
+
export function getNosgovProfileV2(id) {
|
|
911
|
+
const p = _nosgovPsV2.get(id);
|
|
912
|
+
if (!p) return null;
|
|
913
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
914
|
+
}
|
|
915
|
+
export function listNosgovProfilesV2() {
|
|
916
|
+
return [..._nosgovPsV2.values()].map((p) => ({
|
|
917
|
+
...p,
|
|
918
|
+
metadata: { ...p.metadata },
|
|
919
|
+
}));
|
|
920
|
+
}
|
|
921
|
+
export function createNosgovPublishV2({ id, profileId, kind, metadata } = {}) {
|
|
922
|
+
if (!id || !profileId) throw new Error("id and profileId required");
|
|
923
|
+
if (_nosgovJsV2.has(id))
|
|
924
|
+
throw new Error(`nosgov publish ${id} already exists`);
|
|
925
|
+
if (!_nosgovPsV2.has(profileId))
|
|
926
|
+
throw new Error(`nosgov profile ${profileId} not found`);
|
|
927
|
+
if (_nosgovCountPending(profileId) >= _nosgovMaxPending)
|
|
928
|
+
throw new Error(
|
|
929
|
+
`max pending nosgov publishs for profile ${profileId} reached`,
|
|
930
|
+
);
|
|
931
|
+
const now = Date.now();
|
|
932
|
+
const j = {
|
|
933
|
+
id,
|
|
934
|
+
profileId,
|
|
935
|
+
kind: kind || "",
|
|
936
|
+
status: NOSGOV_PUBLISH_LIFECYCLE_V2.QUEUED,
|
|
937
|
+
createdAt: now,
|
|
938
|
+
updatedAt: now,
|
|
939
|
+
startedAt: null,
|
|
940
|
+
settledAt: null,
|
|
941
|
+
metadata: { ...(metadata || {}) },
|
|
942
|
+
};
|
|
943
|
+
_nosgovJsV2.set(id, j);
|
|
944
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
945
|
+
}
|
|
946
|
+
export function publishingNosgovPublishV2(id) {
|
|
947
|
+
const j = _nosgovJsV2.get(id);
|
|
948
|
+
if (!j) throw new Error(`nosgov publish ${id} not found`);
|
|
949
|
+
_nosgovCheckJ(j.status, NOSGOV_PUBLISH_LIFECYCLE_V2.PUBLISHING);
|
|
950
|
+
const now = Date.now();
|
|
951
|
+
j.status = NOSGOV_PUBLISH_LIFECYCLE_V2.PUBLISHING;
|
|
952
|
+
j.updatedAt = now;
|
|
953
|
+
if (!j.startedAt) j.startedAt = now;
|
|
954
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
955
|
+
}
|
|
956
|
+
export function completePublishNosgovV2(id) {
|
|
957
|
+
const j = _nosgovJsV2.get(id);
|
|
958
|
+
if (!j) throw new Error(`nosgov publish ${id} not found`);
|
|
959
|
+
_nosgovCheckJ(j.status, NOSGOV_PUBLISH_LIFECYCLE_V2.PUBLISHED);
|
|
960
|
+
const now = Date.now();
|
|
961
|
+
j.status = NOSGOV_PUBLISH_LIFECYCLE_V2.PUBLISHED;
|
|
962
|
+
j.updatedAt = now;
|
|
963
|
+
if (!j.settledAt) j.settledAt = now;
|
|
964
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
965
|
+
}
|
|
966
|
+
export function failNosgovPublishV2(id, reason) {
|
|
967
|
+
const j = _nosgovJsV2.get(id);
|
|
968
|
+
if (!j) throw new Error(`nosgov publish ${id} not found`);
|
|
969
|
+
_nosgovCheckJ(j.status, NOSGOV_PUBLISH_LIFECYCLE_V2.FAILED);
|
|
970
|
+
const now = Date.now();
|
|
971
|
+
j.status = NOSGOV_PUBLISH_LIFECYCLE_V2.FAILED;
|
|
972
|
+
j.updatedAt = now;
|
|
973
|
+
if (!j.settledAt) j.settledAt = now;
|
|
974
|
+
if (reason) j.metadata.failReason = String(reason);
|
|
975
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
976
|
+
}
|
|
977
|
+
export function cancelNosgovPublishV2(id, reason) {
|
|
978
|
+
const j = _nosgovJsV2.get(id);
|
|
979
|
+
if (!j) throw new Error(`nosgov publish ${id} not found`);
|
|
980
|
+
_nosgovCheckJ(j.status, NOSGOV_PUBLISH_LIFECYCLE_V2.CANCELLED);
|
|
981
|
+
const now = Date.now();
|
|
982
|
+
j.status = NOSGOV_PUBLISH_LIFECYCLE_V2.CANCELLED;
|
|
983
|
+
j.updatedAt = now;
|
|
984
|
+
if (!j.settledAt) j.settledAt = now;
|
|
985
|
+
if (reason) j.metadata.cancelReason = String(reason);
|
|
986
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
987
|
+
}
|
|
988
|
+
export function getNosgovPublishV2(id) {
|
|
989
|
+
const j = _nosgovJsV2.get(id);
|
|
990
|
+
if (!j) return null;
|
|
991
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
992
|
+
}
|
|
993
|
+
export function listNosgovPublishsV2() {
|
|
994
|
+
return [..._nosgovJsV2.values()].map((j) => ({
|
|
995
|
+
...j,
|
|
996
|
+
metadata: { ...j.metadata },
|
|
997
|
+
}));
|
|
998
|
+
}
|
|
999
|
+
export function autoSuspendIdleNosgovProfilesV2({ now } = {}) {
|
|
1000
|
+
const t = now ?? Date.now();
|
|
1001
|
+
const flipped = [];
|
|
1002
|
+
for (const p of _nosgovPsV2.values())
|
|
1003
|
+
if (
|
|
1004
|
+
p.status === NOSGOV_PROFILE_MATURITY_V2.ACTIVE &&
|
|
1005
|
+
t - p.lastTouchedAt >= _nosgovIdleMs
|
|
1006
|
+
) {
|
|
1007
|
+
p.status = NOSGOV_PROFILE_MATURITY_V2.SUSPENDED;
|
|
1008
|
+
p.updatedAt = t;
|
|
1009
|
+
flipped.push(p.id);
|
|
1010
|
+
}
|
|
1011
|
+
return { flipped, count: flipped.length };
|
|
1012
|
+
}
|
|
1013
|
+
export function autoFailStuckNosgovPublishsV2({ now } = {}) {
|
|
1014
|
+
const t = now ?? Date.now();
|
|
1015
|
+
const flipped = [];
|
|
1016
|
+
for (const j of _nosgovJsV2.values())
|
|
1017
|
+
if (
|
|
1018
|
+
j.status === NOSGOV_PUBLISH_LIFECYCLE_V2.PUBLISHING &&
|
|
1019
|
+
j.startedAt != null &&
|
|
1020
|
+
t - j.startedAt >= _nosgovStuckMs
|
|
1021
|
+
) {
|
|
1022
|
+
j.status = NOSGOV_PUBLISH_LIFECYCLE_V2.FAILED;
|
|
1023
|
+
j.updatedAt = t;
|
|
1024
|
+
if (!j.settledAt) j.settledAt = t;
|
|
1025
|
+
j.metadata.failReason = "auto-fail-stuck";
|
|
1026
|
+
flipped.push(j.id);
|
|
1027
|
+
}
|
|
1028
|
+
return { flipped, count: flipped.length };
|
|
1029
|
+
}
|
|
1030
|
+
export function getNostrBridgeGovStatsV2() {
|
|
1031
|
+
const profilesByStatus = {};
|
|
1032
|
+
for (const v of Object.values(NOSGOV_PROFILE_MATURITY_V2))
|
|
1033
|
+
profilesByStatus[v] = 0;
|
|
1034
|
+
for (const p of _nosgovPsV2.values()) profilesByStatus[p.status]++;
|
|
1035
|
+
const publishsByStatus = {};
|
|
1036
|
+
for (const v of Object.values(NOSGOV_PUBLISH_LIFECYCLE_V2))
|
|
1037
|
+
publishsByStatus[v] = 0;
|
|
1038
|
+
for (const j of _nosgovJsV2.values()) publishsByStatus[j.status]++;
|
|
1039
|
+
return {
|
|
1040
|
+
totalNosgovProfilesV2: _nosgovPsV2.size,
|
|
1041
|
+
totalNosgovPublishsV2: _nosgovJsV2.size,
|
|
1042
|
+
maxActiveNosgovProfilesPerOwner: _nosgovMaxActive,
|
|
1043
|
+
maxPendingNosgovPublishsPerProfile: _nosgovMaxPending,
|
|
1044
|
+
nosgovProfileIdleMs: _nosgovIdleMs,
|
|
1045
|
+
nosgovPublishStuckMs: _nosgovStuckMs,
|
|
1046
|
+
profilesByStatus,
|
|
1047
|
+
publishsByStatus,
|
|
1048
|
+
};
|
|
1049
|
+
}
|
|
@@ -569,3 +569,342 @@ export function _resetStateNoteVersioningV2() {
|
|
|
569
569
|
_noteIdleMsV2 = NOTE_DEFAULT_NOTE_IDLE_MS;
|
|
570
570
|
_revStuckMsV2 = NOTE_DEFAULT_REV_STUCK_MS;
|
|
571
571
|
}
|
|
572
|
+
|
|
573
|
+
// =====================================================================
|
|
574
|
+
// note-versioning V2 governance overlay (iter23)
|
|
575
|
+
// =====================================================================
|
|
576
|
+
export const NTGOV_PROFILE_MATURITY_V2 = Object.freeze({
|
|
577
|
+
PENDING: "pending",
|
|
578
|
+
ACTIVE: "active",
|
|
579
|
+
STALE: "stale",
|
|
580
|
+
ARCHIVED: "archived",
|
|
581
|
+
});
|
|
582
|
+
export const NTGOV_REVISION_LIFECYCLE_V2 = Object.freeze({
|
|
583
|
+
QUEUED: "queued",
|
|
584
|
+
REVIEWING: "reviewing",
|
|
585
|
+
MERGED: "merged",
|
|
586
|
+
FAILED: "failed",
|
|
587
|
+
CANCELLED: "cancelled",
|
|
588
|
+
});
|
|
589
|
+
const _ntgovPTrans = new Map([
|
|
590
|
+
[
|
|
591
|
+
NTGOV_PROFILE_MATURITY_V2.PENDING,
|
|
592
|
+
new Set([
|
|
593
|
+
NTGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
594
|
+
NTGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
595
|
+
]),
|
|
596
|
+
],
|
|
597
|
+
[
|
|
598
|
+
NTGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
599
|
+
new Set([
|
|
600
|
+
NTGOV_PROFILE_MATURITY_V2.STALE,
|
|
601
|
+
NTGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
602
|
+
]),
|
|
603
|
+
],
|
|
604
|
+
[
|
|
605
|
+
NTGOV_PROFILE_MATURITY_V2.STALE,
|
|
606
|
+
new Set([
|
|
607
|
+
NTGOV_PROFILE_MATURITY_V2.ACTIVE,
|
|
608
|
+
NTGOV_PROFILE_MATURITY_V2.ARCHIVED,
|
|
609
|
+
]),
|
|
610
|
+
],
|
|
611
|
+
[NTGOV_PROFILE_MATURITY_V2.ARCHIVED, new Set()],
|
|
612
|
+
]);
|
|
613
|
+
const _ntgovPTerminal = new Set([NTGOV_PROFILE_MATURITY_V2.ARCHIVED]);
|
|
614
|
+
const _ntgovJTrans = new Map([
|
|
615
|
+
[
|
|
616
|
+
NTGOV_REVISION_LIFECYCLE_V2.QUEUED,
|
|
617
|
+
new Set([
|
|
618
|
+
NTGOV_REVISION_LIFECYCLE_V2.REVIEWING,
|
|
619
|
+
NTGOV_REVISION_LIFECYCLE_V2.CANCELLED,
|
|
620
|
+
]),
|
|
621
|
+
],
|
|
622
|
+
[
|
|
623
|
+
NTGOV_REVISION_LIFECYCLE_V2.REVIEWING,
|
|
624
|
+
new Set([
|
|
625
|
+
NTGOV_REVISION_LIFECYCLE_V2.MERGED,
|
|
626
|
+
NTGOV_REVISION_LIFECYCLE_V2.FAILED,
|
|
627
|
+
NTGOV_REVISION_LIFECYCLE_V2.CANCELLED,
|
|
628
|
+
]),
|
|
629
|
+
],
|
|
630
|
+
[NTGOV_REVISION_LIFECYCLE_V2.MERGED, new Set()],
|
|
631
|
+
[NTGOV_REVISION_LIFECYCLE_V2.FAILED, new Set()],
|
|
632
|
+
[NTGOV_REVISION_LIFECYCLE_V2.CANCELLED, new Set()],
|
|
633
|
+
]);
|
|
634
|
+
const _ntgovPsV2 = new Map();
|
|
635
|
+
const _ntgovJsV2 = new Map();
|
|
636
|
+
let _ntgovMaxActive = 10,
|
|
637
|
+
_ntgovMaxPending = 30,
|
|
638
|
+
_ntgovIdleMs = 30 * 24 * 60 * 60 * 1000,
|
|
639
|
+
_ntgovStuckMs = 60 * 1000;
|
|
640
|
+
function _ntgovPos(n, label) {
|
|
641
|
+
const v = Math.floor(Number(n));
|
|
642
|
+
if (!Number.isFinite(v) || v <= 0)
|
|
643
|
+
throw new Error(`${label} must be positive integer`);
|
|
644
|
+
return v;
|
|
645
|
+
}
|
|
646
|
+
function _ntgovCheckP(from, to) {
|
|
647
|
+
const a = _ntgovPTrans.get(from);
|
|
648
|
+
if (!a || !a.has(to))
|
|
649
|
+
throw new Error(`invalid ntgov profile transition ${from} → ${to}`);
|
|
650
|
+
}
|
|
651
|
+
function _ntgovCheckJ(from, to) {
|
|
652
|
+
const a = _ntgovJTrans.get(from);
|
|
653
|
+
if (!a || !a.has(to))
|
|
654
|
+
throw new Error(`invalid ntgov revision transition ${from} → ${to}`);
|
|
655
|
+
}
|
|
656
|
+
function _ntgovCountActive(owner) {
|
|
657
|
+
let c = 0;
|
|
658
|
+
for (const p of _ntgovPsV2.values())
|
|
659
|
+
if (p.owner === owner && p.status === NTGOV_PROFILE_MATURITY_V2.ACTIVE) c++;
|
|
660
|
+
return c;
|
|
661
|
+
}
|
|
662
|
+
function _ntgovCountPending(profileId) {
|
|
663
|
+
let c = 0;
|
|
664
|
+
for (const j of _ntgovJsV2.values())
|
|
665
|
+
if (
|
|
666
|
+
j.profileId === profileId &&
|
|
667
|
+
(j.status === NTGOV_REVISION_LIFECYCLE_V2.QUEUED ||
|
|
668
|
+
j.status === NTGOV_REVISION_LIFECYCLE_V2.REVIEWING)
|
|
669
|
+
)
|
|
670
|
+
c++;
|
|
671
|
+
return c;
|
|
672
|
+
}
|
|
673
|
+
export function setMaxActiveNtgovProfilesPerOwnerV2(n) {
|
|
674
|
+
_ntgovMaxActive = _ntgovPos(n, "maxActiveNtgovProfilesPerOwner");
|
|
675
|
+
}
|
|
676
|
+
export function getMaxActiveNtgovProfilesPerOwnerV2() {
|
|
677
|
+
return _ntgovMaxActive;
|
|
678
|
+
}
|
|
679
|
+
export function setMaxPendingNtgovRevisionsPerProfileV2(n) {
|
|
680
|
+
_ntgovMaxPending = _ntgovPos(n, "maxPendingNtgovRevisionsPerProfile");
|
|
681
|
+
}
|
|
682
|
+
export function getMaxPendingNtgovRevisionsPerProfileV2() {
|
|
683
|
+
return _ntgovMaxPending;
|
|
684
|
+
}
|
|
685
|
+
export function setNtgovProfileIdleMsV2(n) {
|
|
686
|
+
_ntgovIdleMs = _ntgovPos(n, "ntgovProfileIdleMs");
|
|
687
|
+
}
|
|
688
|
+
export function getNtgovProfileIdleMsV2() {
|
|
689
|
+
return _ntgovIdleMs;
|
|
690
|
+
}
|
|
691
|
+
export function setNtgovRevisionStuckMsV2(n) {
|
|
692
|
+
_ntgovStuckMs = _ntgovPos(n, "ntgovRevisionStuckMs");
|
|
693
|
+
}
|
|
694
|
+
export function getNtgovRevisionStuckMsV2() {
|
|
695
|
+
return _ntgovStuckMs;
|
|
696
|
+
}
|
|
697
|
+
export function _resetStateNoteVersioningGovV2() {
|
|
698
|
+
_ntgovPsV2.clear();
|
|
699
|
+
_ntgovJsV2.clear();
|
|
700
|
+
_ntgovMaxActive = 10;
|
|
701
|
+
_ntgovMaxPending = 30;
|
|
702
|
+
_ntgovIdleMs = 30 * 24 * 60 * 60 * 1000;
|
|
703
|
+
_ntgovStuckMs = 60 * 1000;
|
|
704
|
+
}
|
|
705
|
+
export function registerNtgovProfileV2({ id, owner, series, metadata } = {}) {
|
|
706
|
+
if (!id || !owner) throw new Error("id and owner required");
|
|
707
|
+
if (_ntgovPsV2.has(id)) throw new Error(`ntgov profile ${id} already exists`);
|
|
708
|
+
const now = Date.now();
|
|
709
|
+
const p = {
|
|
710
|
+
id,
|
|
711
|
+
owner,
|
|
712
|
+
series: series || "default",
|
|
713
|
+
status: NTGOV_PROFILE_MATURITY_V2.PENDING,
|
|
714
|
+
createdAt: now,
|
|
715
|
+
updatedAt: now,
|
|
716
|
+
lastTouchedAt: now,
|
|
717
|
+
activatedAt: null,
|
|
718
|
+
archivedAt: null,
|
|
719
|
+
metadata: { ...(metadata || {}) },
|
|
720
|
+
};
|
|
721
|
+
_ntgovPsV2.set(id, p);
|
|
722
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
723
|
+
}
|
|
724
|
+
export function activateNtgovProfileV2(id) {
|
|
725
|
+
const p = _ntgovPsV2.get(id);
|
|
726
|
+
if (!p) throw new Error(`ntgov profile ${id} not found`);
|
|
727
|
+
const isInitial = p.status === NTGOV_PROFILE_MATURITY_V2.PENDING;
|
|
728
|
+
_ntgovCheckP(p.status, NTGOV_PROFILE_MATURITY_V2.ACTIVE);
|
|
729
|
+
if (isInitial && _ntgovCountActive(p.owner) >= _ntgovMaxActive)
|
|
730
|
+
throw new Error(`max active ntgov profiles for owner ${p.owner} reached`);
|
|
731
|
+
const now = Date.now();
|
|
732
|
+
p.status = NTGOV_PROFILE_MATURITY_V2.ACTIVE;
|
|
733
|
+
p.updatedAt = now;
|
|
734
|
+
p.lastTouchedAt = now;
|
|
735
|
+
if (!p.activatedAt) p.activatedAt = now;
|
|
736
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
737
|
+
}
|
|
738
|
+
export function staleNtgovProfileV2(id) {
|
|
739
|
+
const p = _ntgovPsV2.get(id);
|
|
740
|
+
if (!p) throw new Error(`ntgov profile ${id} not found`);
|
|
741
|
+
_ntgovCheckP(p.status, NTGOV_PROFILE_MATURITY_V2.STALE);
|
|
742
|
+
p.status = NTGOV_PROFILE_MATURITY_V2.STALE;
|
|
743
|
+
p.updatedAt = Date.now();
|
|
744
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
745
|
+
}
|
|
746
|
+
export function archiveNtgovProfileV2(id) {
|
|
747
|
+
const p = _ntgovPsV2.get(id);
|
|
748
|
+
if (!p) throw new Error(`ntgov profile ${id} not found`);
|
|
749
|
+
_ntgovCheckP(p.status, NTGOV_PROFILE_MATURITY_V2.ARCHIVED);
|
|
750
|
+
const now = Date.now();
|
|
751
|
+
p.status = NTGOV_PROFILE_MATURITY_V2.ARCHIVED;
|
|
752
|
+
p.updatedAt = now;
|
|
753
|
+
if (!p.archivedAt) p.archivedAt = now;
|
|
754
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
755
|
+
}
|
|
756
|
+
export function touchNtgovProfileV2(id) {
|
|
757
|
+
const p = _ntgovPsV2.get(id);
|
|
758
|
+
if (!p) throw new Error(`ntgov profile ${id} not found`);
|
|
759
|
+
if (_ntgovPTerminal.has(p.status))
|
|
760
|
+
throw new Error(`cannot touch terminal ntgov profile ${id}`);
|
|
761
|
+
const now = Date.now();
|
|
762
|
+
p.lastTouchedAt = now;
|
|
763
|
+
p.updatedAt = now;
|
|
764
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
765
|
+
}
|
|
766
|
+
export function getNtgovProfileV2(id) {
|
|
767
|
+
const p = _ntgovPsV2.get(id);
|
|
768
|
+
if (!p) return null;
|
|
769
|
+
return { ...p, metadata: { ...p.metadata } };
|
|
770
|
+
}
|
|
771
|
+
export function listNtgovProfilesV2() {
|
|
772
|
+
return [..._ntgovPsV2.values()].map((p) => ({
|
|
773
|
+
...p,
|
|
774
|
+
metadata: { ...p.metadata },
|
|
775
|
+
}));
|
|
776
|
+
}
|
|
777
|
+
export function createNtgovRevisionV2({
|
|
778
|
+
id,
|
|
779
|
+
profileId,
|
|
780
|
+
author,
|
|
781
|
+
metadata,
|
|
782
|
+
} = {}) {
|
|
783
|
+
if (!id || !profileId) throw new Error("id and profileId required");
|
|
784
|
+
if (_ntgovJsV2.has(id))
|
|
785
|
+
throw new Error(`ntgov revision ${id} already exists`);
|
|
786
|
+
if (!_ntgovPsV2.has(profileId))
|
|
787
|
+
throw new Error(`ntgov profile ${profileId} not found`);
|
|
788
|
+
if (_ntgovCountPending(profileId) >= _ntgovMaxPending)
|
|
789
|
+
throw new Error(
|
|
790
|
+
`max pending ntgov revisions for profile ${profileId} reached`,
|
|
791
|
+
);
|
|
792
|
+
const now = Date.now();
|
|
793
|
+
const j = {
|
|
794
|
+
id,
|
|
795
|
+
profileId,
|
|
796
|
+
author: author || "",
|
|
797
|
+
status: NTGOV_REVISION_LIFECYCLE_V2.QUEUED,
|
|
798
|
+
createdAt: now,
|
|
799
|
+
updatedAt: now,
|
|
800
|
+
startedAt: null,
|
|
801
|
+
settledAt: null,
|
|
802
|
+
metadata: { ...(metadata || {}) },
|
|
803
|
+
};
|
|
804
|
+
_ntgovJsV2.set(id, j);
|
|
805
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
806
|
+
}
|
|
807
|
+
export function reviewingNtgovRevisionV2(id) {
|
|
808
|
+
const j = _ntgovJsV2.get(id);
|
|
809
|
+
if (!j) throw new Error(`ntgov revision ${id} not found`);
|
|
810
|
+
_ntgovCheckJ(j.status, NTGOV_REVISION_LIFECYCLE_V2.REVIEWING);
|
|
811
|
+
const now = Date.now();
|
|
812
|
+
j.status = NTGOV_REVISION_LIFECYCLE_V2.REVIEWING;
|
|
813
|
+
j.updatedAt = now;
|
|
814
|
+
if (!j.startedAt) j.startedAt = now;
|
|
815
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
816
|
+
}
|
|
817
|
+
export function completeRevisionNtgovV2(id) {
|
|
818
|
+
const j = _ntgovJsV2.get(id);
|
|
819
|
+
if (!j) throw new Error(`ntgov revision ${id} not found`);
|
|
820
|
+
_ntgovCheckJ(j.status, NTGOV_REVISION_LIFECYCLE_V2.MERGED);
|
|
821
|
+
const now = Date.now();
|
|
822
|
+
j.status = NTGOV_REVISION_LIFECYCLE_V2.MERGED;
|
|
823
|
+
j.updatedAt = now;
|
|
824
|
+
if (!j.settledAt) j.settledAt = now;
|
|
825
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
826
|
+
}
|
|
827
|
+
export function failNtgovRevisionV2(id, reason) {
|
|
828
|
+
const j = _ntgovJsV2.get(id);
|
|
829
|
+
if (!j) throw new Error(`ntgov revision ${id} not found`);
|
|
830
|
+
_ntgovCheckJ(j.status, NTGOV_REVISION_LIFECYCLE_V2.FAILED);
|
|
831
|
+
const now = Date.now();
|
|
832
|
+
j.status = NTGOV_REVISION_LIFECYCLE_V2.FAILED;
|
|
833
|
+
j.updatedAt = now;
|
|
834
|
+
if (!j.settledAt) j.settledAt = now;
|
|
835
|
+
if (reason) j.metadata.failReason = String(reason);
|
|
836
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
837
|
+
}
|
|
838
|
+
export function cancelNtgovRevisionV2(id, reason) {
|
|
839
|
+
const j = _ntgovJsV2.get(id);
|
|
840
|
+
if (!j) throw new Error(`ntgov revision ${id} not found`);
|
|
841
|
+
_ntgovCheckJ(j.status, NTGOV_REVISION_LIFECYCLE_V2.CANCELLED);
|
|
842
|
+
const now = Date.now();
|
|
843
|
+
j.status = NTGOV_REVISION_LIFECYCLE_V2.CANCELLED;
|
|
844
|
+
j.updatedAt = now;
|
|
845
|
+
if (!j.settledAt) j.settledAt = now;
|
|
846
|
+
if (reason) j.metadata.cancelReason = String(reason);
|
|
847
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
848
|
+
}
|
|
849
|
+
export function getNtgovRevisionV2(id) {
|
|
850
|
+
const j = _ntgovJsV2.get(id);
|
|
851
|
+
if (!j) return null;
|
|
852
|
+
return { ...j, metadata: { ...j.metadata } };
|
|
853
|
+
}
|
|
854
|
+
export function listNtgovRevisionsV2() {
|
|
855
|
+
return [..._ntgovJsV2.values()].map((j) => ({
|
|
856
|
+
...j,
|
|
857
|
+
metadata: { ...j.metadata },
|
|
858
|
+
}));
|
|
859
|
+
}
|
|
860
|
+
export function autoStaleIdleNtgovProfilesV2({ now } = {}) {
|
|
861
|
+
const t = now ?? Date.now();
|
|
862
|
+
const flipped = [];
|
|
863
|
+
for (const p of _ntgovPsV2.values())
|
|
864
|
+
if (
|
|
865
|
+
p.status === NTGOV_PROFILE_MATURITY_V2.ACTIVE &&
|
|
866
|
+
t - p.lastTouchedAt >= _ntgovIdleMs
|
|
867
|
+
) {
|
|
868
|
+
p.status = NTGOV_PROFILE_MATURITY_V2.STALE;
|
|
869
|
+
p.updatedAt = t;
|
|
870
|
+
flipped.push(p.id);
|
|
871
|
+
}
|
|
872
|
+
return { flipped, count: flipped.length };
|
|
873
|
+
}
|
|
874
|
+
export function autoFailStuckNtgovRevisionsV2({ now } = {}) {
|
|
875
|
+
const t = now ?? Date.now();
|
|
876
|
+
const flipped = [];
|
|
877
|
+
for (const j of _ntgovJsV2.values())
|
|
878
|
+
if (
|
|
879
|
+
j.status === NTGOV_REVISION_LIFECYCLE_V2.REVIEWING &&
|
|
880
|
+
j.startedAt != null &&
|
|
881
|
+
t - j.startedAt >= _ntgovStuckMs
|
|
882
|
+
) {
|
|
883
|
+
j.status = NTGOV_REVISION_LIFECYCLE_V2.FAILED;
|
|
884
|
+
j.updatedAt = t;
|
|
885
|
+
if (!j.settledAt) j.settledAt = t;
|
|
886
|
+
j.metadata.failReason = "auto-fail-stuck";
|
|
887
|
+
flipped.push(j.id);
|
|
888
|
+
}
|
|
889
|
+
return { flipped, count: flipped.length };
|
|
890
|
+
}
|
|
891
|
+
export function getNoteVersioningGovStatsV2() {
|
|
892
|
+
const profilesByStatus = {};
|
|
893
|
+
for (const v of Object.values(NTGOV_PROFILE_MATURITY_V2))
|
|
894
|
+
profilesByStatus[v] = 0;
|
|
895
|
+
for (const p of _ntgovPsV2.values()) profilesByStatus[p.status]++;
|
|
896
|
+
const revisionsByStatus = {};
|
|
897
|
+
for (const v of Object.values(NTGOV_REVISION_LIFECYCLE_V2))
|
|
898
|
+
revisionsByStatus[v] = 0;
|
|
899
|
+
for (const j of _ntgovJsV2.values()) revisionsByStatus[j.status]++;
|
|
900
|
+
return {
|
|
901
|
+
totalNtgovProfilesV2: _ntgovPsV2.size,
|
|
902
|
+
totalNtgovRevisionsV2: _ntgovJsV2.size,
|
|
903
|
+
maxActiveNtgovProfilesPerOwner: _ntgovMaxActive,
|
|
904
|
+
maxPendingNtgovRevisionsPerProfile: _ntgovMaxPending,
|
|
905
|
+
ntgovProfileIdleMs: _ntgovIdleMs,
|
|
906
|
+
ntgovRevisionStuckMs: _ntgovStuckMs,
|
|
907
|
+
profilesByStatus,
|
|
908
|
+
revisionsByStatus,
|
|
909
|
+
};
|
|
910
|
+
}
|