xoonya 2.2.0 → 2.4.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/RELEASE_NOTES.md +17 -10
- package/lib/bridge_intelligence.js +102 -0
- package/lib/governance_intelligence.js +108 -0
- package/lib/review_intelligence.js +100 -0
- package/lib/role_freeze.js +436 -0
- package/lib/trust_intelligence.js +106 -0
- package/package.json +1 -1
- package/server.js +345 -0
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
# xoonya 2.
|
|
1
|
+
# xoonya 2.4.0 Release Notes
|
|
2
2
|
|
|
3
|
-
`xoonya` 2.
|
|
3
|
+
`xoonya` 2.4.0 is the proof-role freeze and transition-clarity line.
|
|
4
4
|
|
|
5
5
|
Highlights:
|
|
6
6
|
|
|
7
7
|
- direct one-line proof-side review with `xoonya-review`
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
- bridge
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
8
|
+
- trust intelligence for proof readiness, bridge confidence, and recommended review motion
|
|
9
|
+
- review intelligence for governance burden, dispute risk, and dependency posture
|
|
10
|
+
- governance intelligence for escalation, signoff, and handoff continuity
|
|
11
|
+
- bridge intelligence for compatibility strength and bridge coverage posture
|
|
12
|
+
- explicit proof-role freeze, operator bundle, policy pack, and package surfaces
|
|
13
|
+
- explicit role-transition package recording long-term coordination-shell direction
|
|
14
|
+
- explicit capability-registry-home package recording `xytara` as current home and `xoonya` as the later canonical target
|
|
15
|
+
- canonical event, receipt, and proof-bundle model with stable runtime-to-proof followthrough
|
|
16
|
+
- partner-ready onboarding, launch docs, and public example paths remain in place
|
|
15
17
|
|
|
16
18
|
Recommended first checks:
|
|
17
19
|
|
|
@@ -19,10 +21,15 @@ Recommended first checks:
|
|
|
19
21
|
2. `xoonya-release --candidate --summary`
|
|
20
22
|
3. `npm run verify:release-candidate`
|
|
21
23
|
4. `node examples/partner_proof_walkthrough.js`
|
|
22
|
-
5. inspect `/v1/
|
|
24
|
+
5. inspect `/v1/role-freeze/package`
|
|
25
|
+
6. inspect `/v1/role-transition`
|
|
26
|
+
7. inspect `/v1/capability-registry-home`
|
|
27
|
+
8. inspect `/v1/trust-intelligence` and `/v1/review-intelligence`
|
|
28
|
+
9. inspect `/v1/proof-center/summary` on the deployed service
|
|
23
29
|
|
|
24
30
|
Recommended first docs:
|
|
25
31
|
|
|
26
32
|
- `PROGRAM_COMPLETE_RELEASE.md`
|
|
33
|
+
- `FINAL_CONTRACT.md`
|
|
27
34
|
- `WHY_XYTARA_XOONYA.md`
|
|
28
35
|
- `PARTNER_READY_PATH.md`
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const packageJson = require("../package.json");
|
|
4
|
+
const proofSdk = require("../proof_sdk");
|
|
5
|
+
|
|
6
|
+
function classifyBridgeCoverageState(bridgeSummary) {
|
|
7
|
+
if (bridgeSummary.capability_count >= 8 && bridgeSummary.profile_count >= 3) return "broad";
|
|
8
|
+
if (bridgeSummary.capability_count >= 4 && bridgeSummary.profile_count >= 2) return "working";
|
|
9
|
+
return "thin";
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function classifyCompatibilityStrengthState(compatibilityPack) {
|
|
13
|
+
const preservedRouteCount = Array.isArray(compatibilityPack.preserved_routes)
|
|
14
|
+
? compatibilityPack.preserved_routes.length
|
|
15
|
+
: 0;
|
|
16
|
+
const preservedHelperCount = Array.isArray(compatibilityPack.preserved_helpers)
|
|
17
|
+
? compatibilityPack.preserved_helpers.length
|
|
18
|
+
: 0;
|
|
19
|
+
if (preservedRouteCount >= 5 && preservedHelperCount >= 8) return "strong";
|
|
20
|
+
if (preservedRouteCount >= 3 && preservedHelperCount >= 5) return "working";
|
|
21
|
+
return "thin";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function classifyHandoffDependencyState(operatorReviewPack, handoffCenterSummary) {
|
|
25
|
+
const includedSectionCount = Array.isArray(operatorReviewPack.included_sections)
|
|
26
|
+
? operatorReviewPack.included_sections.length
|
|
27
|
+
: 0;
|
|
28
|
+
if (includedSectionCount >= 6 && handoffCenterSummary.source_ref_count >= 3) return "strong";
|
|
29
|
+
if (includedSectionCount >= 4 && handoffCenterSummary.source_ref_count >= 2) return "working";
|
|
30
|
+
return "thin";
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function buildBridgeIntelligencePack(input) {
|
|
34
|
+
const payload = input && typeof input === "object" && !Array.isArray(input) ? input : {};
|
|
35
|
+
const bridgeSummary = proofSdk.summarizeBridgeCenter();
|
|
36
|
+
const compatibilityPack = proofSdk.buildBridgeCompatibilityPack(payload);
|
|
37
|
+
const operatorReviewPack = proofSdk.buildBridgeOperatorReviewPack(payload);
|
|
38
|
+
const handoffCenterSummary = proofSdk.summarizeInteractionResultPackageHandoffCenter();
|
|
39
|
+
|
|
40
|
+
const bridgeCoverageState = classifyBridgeCoverageState(bridgeSummary);
|
|
41
|
+
const compatibilityStrengthState = classifyCompatibilityStrengthState(compatibilityPack);
|
|
42
|
+
const handoffDependencyState = classifyHandoffDependencyState(operatorReviewPack, handoffCenterSummary);
|
|
43
|
+
|
|
44
|
+
let nextBestAction = "continue_bridge_review_motion";
|
|
45
|
+
if (bridgeCoverageState === "thin") {
|
|
46
|
+
nextBestAction = "strengthen_bridge_coverage";
|
|
47
|
+
} else if (compatibilityStrengthState === "thin") {
|
|
48
|
+
nextBestAction = "strengthen_compatibility_posture";
|
|
49
|
+
} else if (handoffDependencyState !== "strong") {
|
|
50
|
+
nextBestAction = "strengthen_bridge_handoff_continuity";
|
|
51
|
+
} else if (compatibilityStrengthState === "working" || handoffDependencyState === "working") {
|
|
52
|
+
nextBestAction = "inspect_bridge_operator_pack";
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return {
|
|
56
|
+
ok: true,
|
|
57
|
+
product: packageJson.name,
|
|
58
|
+
category: "proof-bridge-intelligence-pack",
|
|
59
|
+
bridge_coverage_state: bridgeCoverageState,
|
|
60
|
+
compatibility_strength_state: compatibilityStrengthState,
|
|
61
|
+
handoff_dependency_state: handoffDependencyState,
|
|
62
|
+
recommended_bridge_motion: "bridge_operator_review_and_handoff_followthrough",
|
|
63
|
+
next_best_action: nextBestAction,
|
|
64
|
+
explanation_signals: {
|
|
65
|
+
bridge_capability_count: bridgeSummary.capability_count,
|
|
66
|
+
bridge_profile_count: bridgeSummary.profile_count,
|
|
67
|
+
compatibility_route_count: Array.isArray(compatibilityPack.preserved_routes) ? compatibilityPack.preserved_routes.length : 0,
|
|
68
|
+
compatibility_helper_count: Array.isArray(compatibilityPack.preserved_helpers) ? compatibilityPack.preserved_helpers.length : 0,
|
|
69
|
+
compatibility_profile_version_count: Array.isArray(compatibilityPack.profile_versions) ? compatibilityPack.profile_versions.length : 0,
|
|
70
|
+
operator_pack_section_count: Array.isArray(operatorReviewPack.included_sections) ? operatorReviewPack.included_sections.length : 0,
|
|
71
|
+
handoff_source_ref_count: handoffCenterSummary.source_ref_count,
|
|
72
|
+
handoff_mode_count: handoffCenterSummary.handoff_mode_count
|
|
73
|
+
},
|
|
74
|
+
linked_surfaces: {
|
|
75
|
+
bridge_summary_ref: "/v1/proof-center/bridge/summary",
|
|
76
|
+
bridge_operator_review_pack_ref: "/v1/proof-center/bridge/operator-review-pack",
|
|
77
|
+
bridge_compatibility_pack_ref: "/v1/proof-center/bridge/compatibility-pack",
|
|
78
|
+
bridge_workflow_pack_ref: "/v1/proof-center/bridge/workflow-pack",
|
|
79
|
+
result_package_handoff_summary_ref: "/v1/proof-center/result-package-handoff/summary",
|
|
80
|
+
result_package_handoff_run_ref: "/v1/proof-center/result-package-handoff/run"
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function summarizeBridgeIntelligencePack(input) {
|
|
86
|
+
const pack = buildBridgeIntelligencePack(input);
|
|
87
|
+
return {
|
|
88
|
+
ok: true,
|
|
89
|
+
product: pack.product,
|
|
90
|
+
category: pack.category,
|
|
91
|
+
bridge_coverage_state: pack.bridge_coverage_state,
|
|
92
|
+
compatibility_strength_state: pack.compatibility_strength_state,
|
|
93
|
+
handoff_dependency_state: pack.handoff_dependency_state,
|
|
94
|
+
next_best_action: pack.next_best_action,
|
|
95
|
+
signal_count: Object.keys(pack.explanation_signals).length
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
module.exports = {
|
|
100
|
+
buildBridgeIntelligencePack,
|
|
101
|
+
summarizeBridgeIntelligencePack
|
|
102
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const packageJson = require("../package.json");
|
|
4
|
+
const proofSdk = require("../proof_sdk");
|
|
5
|
+
|
|
6
|
+
function classifyEscalationReadinessState(adminView, disputesSummary) {
|
|
7
|
+
const escalationReadyCount = Number(adminView.oversight_summary?.escalation_ready_count || 0);
|
|
8
|
+
const openCaseCount = Number(disputesSummary.open_case_count || 0);
|
|
9
|
+
if (escalationReadyCount >= 1 && openCaseCount >= 2) return "active";
|
|
10
|
+
if (escalationReadyCount >= 1 || openCaseCount >= 1) return "watch";
|
|
11
|
+
return "quiet";
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function classifySignoffMotionState(dashboard, signoffPack) {
|
|
15
|
+
const signoffReadyCount = Number(dashboard.queue_summary?.signoff_ready_count || 0);
|
|
16
|
+
if (signoffPack.signoff_status === "review_ready" && signoffReadyCount >= 1) return "review_ready";
|
|
17
|
+
if (signoffReadyCount >= 1) return "forming";
|
|
18
|
+
return "early";
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function classifyHandoffContinuityState(handoffBundle) {
|
|
22
|
+
const includedSectionCount = Array.isArray(handoffBundle.included_sections)
|
|
23
|
+
? handoffBundle.included_sections.length
|
|
24
|
+
: 0;
|
|
25
|
+
if (
|
|
26
|
+
includedSectionCount >= 4
|
|
27
|
+
&& handoffBundle.review_summary_surface
|
|
28
|
+
&& handoffBundle.handoff_run_surface
|
|
29
|
+
) {
|
|
30
|
+
return "strong";
|
|
31
|
+
}
|
|
32
|
+
if (includedSectionCount >= 2) return "working";
|
|
33
|
+
return "thin";
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function buildGovernanceIntelligencePack(input) {
|
|
37
|
+
const payload = input && typeof input === "object" && !Array.isArray(input) ? input : {};
|
|
38
|
+
const dashboard = proofSdk.summarizeGovernanceDashboard(payload);
|
|
39
|
+
const adminView = proofSdk.summarizeGovernanceAdminView(payload);
|
|
40
|
+
const disputesSummary = proofSdk.summarizeGovernanceDisputes(payload);
|
|
41
|
+
const signoffPack = proofSdk.buildGovernanceSignoffPack(payload);
|
|
42
|
+
const consolePack = proofSdk.buildGovernanceConsolePack(payload);
|
|
43
|
+
const handoffBundle = proofSdk.buildGovernanceHandoffBundle(payload);
|
|
44
|
+
|
|
45
|
+
const escalationReadinessState = classifyEscalationReadinessState(adminView, disputesSummary);
|
|
46
|
+
const signoffMotionState = classifySignoffMotionState(dashboard, signoffPack);
|
|
47
|
+
const handoffContinuityState = classifyHandoffContinuityState(handoffBundle);
|
|
48
|
+
|
|
49
|
+
let nextBestAction = "continue_governance_flow";
|
|
50
|
+
if (escalationReadinessState === "active") {
|
|
51
|
+
nextBestAction = "escalate_governance_attention";
|
|
52
|
+
} else if (signoffMotionState === "review_ready") {
|
|
53
|
+
nextBestAction = "advance_signoff_motion";
|
|
54
|
+
} else if (handoffContinuityState !== "strong") {
|
|
55
|
+
nextBestAction = "strengthen_handoff_continuity";
|
|
56
|
+
} else if (escalationReadinessState === "watch") {
|
|
57
|
+
nextBestAction = "inspect_governance_console";
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
ok: true,
|
|
62
|
+
product: packageJson.name,
|
|
63
|
+
category: "proof-governance-intelligence-pack",
|
|
64
|
+
escalation_readiness_state: escalationReadinessState,
|
|
65
|
+
signoff_motion_state: signoffMotionState,
|
|
66
|
+
handoff_continuity_state: handoffContinuityState,
|
|
67
|
+
recommended_governance_motion: "governance_console_and_signoff_followthrough",
|
|
68
|
+
next_best_action: nextBestAction,
|
|
69
|
+
explanation_signals: {
|
|
70
|
+
review_count: Number(dashboard.queue_summary?.review_count || 0),
|
|
71
|
+
dispute_count: Number(dashboard.queue_summary?.dispute_count || 0),
|
|
72
|
+
signoff_ready_count: Number(dashboard.queue_summary?.signoff_ready_count || 0),
|
|
73
|
+
escalation_ready_count: Number(adminView.oversight_summary?.escalation_ready_count || 0),
|
|
74
|
+
oversight_queue_count: Number(adminView.oversight_summary?.queue_count || 0),
|
|
75
|
+
open_case_count: Number(disputesSummary.open_case_count || 0),
|
|
76
|
+
case_count: Number(disputesSummary.case_count || 0),
|
|
77
|
+
console_section_count: Array.isArray(consolePack.included_sections) ? consolePack.included_sections.length : 0,
|
|
78
|
+
handoff_section_count: Array.isArray(handoffBundle.included_sections) ? handoffBundle.included_sections.length : 0
|
|
79
|
+
},
|
|
80
|
+
linked_surfaces: {
|
|
81
|
+
governance_dashboard_ref: "/v1/proof-center/governance/dashboard",
|
|
82
|
+
governance_admin_view_ref: "/v1/proof-center/governance/admin-view",
|
|
83
|
+
governance_signoff_pack_ref: "/v1/proof-center/governance/signoff-pack",
|
|
84
|
+
governance_console_pack_ref: "/v1/proof-center/governance/console-pack",
|
|
85
|
+
governance_handoff_bundle_ref: "/v1/proof-center/governance/handoff-bundle",
|
|
86
|
+
governance_disputes_summary_ref: "/v1/proof-center/governance/disputes/summary"
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function summarizeGovernanceIntelligencePack(input) {
|
|
92
|
+
const pack = buildGovernanceIntelligencePack(input);
|
|
93
|
+
return {
|
|
94
|
+
ok: true,
|
|
95
|
+
product: pack.product,
|
|
96
|
+
category: pack.category,
|
|
97
|
+
escalation_readiness_state: pack.escalation_readiness_state,
|
|
98
|
+
signoff_motion_state: pack.signoff_motion_state,
|
|
99
|
+
handoff_continuity_state: pack.handoff_continuity_state,
|
|
100
|
+
next_best_action: pack.next_best_action,
|
|
101
|
+
signal_count: Object.keys(pack.explanation_signals).length
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
module.exports = {
|
|
106
|
+
buildGovernanceIntelligencePack,
|
|
107
|
+
summarizeGovernanceIntelligencePack
|
|
108
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const packageJson = require("../package.json");
|
|
4
|
+
const proofSdk = require("../proof_sdk");
|
|
5
|
+
|
|
6
|
+
function classifyReviewBurdenState(queueSummary, openCaseCount) {
|
|
7
|
+
const reviewCount = Number(queueSummary.review_count || 0);
|
|
8
|
+
const disputeCount = Number(queueSummary.dispute_count || 0);
|
|
9
|
+
if (reviewCount >= 5 || disputeCount >= 3 || openCaseCount >= 3) return "high";
|
|
10
|
+
if (reviewCount >= 3 || disputeCount >= 2 || openCaseCount >= 2) return "moderate";
|
|
11
|
+
return "light";
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function classifyDisputeRiskState(disputeCount, openCaseCount) {
|
|
15
|
+
if (disputeCount >= 3 || openCaseCount >= 3) return "high";
|
|
16
|
+
if (disputeCount >= 1 || openCaseCount >= 1) return "watch";
|
|
17
|
+
return "low";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function classifyBridgeDependencyState(bridgeSummary) {
|
|
21
|
+
if (bridgeSummary.capability_count >= 8 && bridgeSummary.profile_count >= 3) return "strong";
|
|
22
|
+
if (bridgeSummary.capability_count >= 4 && bridgeSummary.profile_count >= 2) return "working";
|
|
23
|
+
return "thin";
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function buildReviewIntelligencePack(input) {
|
|
27
|
+
const payload = input && typeof input === "object" && !Array.isArray(input) ? input : {};
|
|
28
|
+
const governanceDashboard = proofSdk.summarizeGovernanceDashboard(payload);
|
|
29
|
+
const governanceDisputes = proofSdk.summarizeGovernanceDisputes(payload);
|
|
30
|
+
const governanceOperatorView = proofSdk.summarizeGovernanceOperatorView(payload);
|
|
31
|
+
const bridgeSummary = proofSdk.summarizeBridgeCenter();
|
|
32
|
+
|
|
33
|
+
const reviewBurdenState = classifyReviewBurdenState(
|
|
34
|
+
governanceDashboard.queue_summary,
|
|
35
|
+
governanceDisputes.open_case_count
|
|
36
|
+
);
|
|
37
|
+
const disputeRiskState = classifyDisputeRiskState(
|
|
38
|
+
governanceDashboard.queue_summary.dispute_count,
|
|
39
|
+
governanceDisputes.open_case_count
|
|
40
|
+
);
|
|
41
|
+
const bridgeDependencyState = classifyBridgeDependencyState(bridgeSummary);
|
|
42
|
+
|
|
43
|
+
let nextBestAction = "continue_review_path";
|
|
44
|
+
if (disputeRiskState === "high") {
|
|
45
|
+
nextBestAction = "escalate_dispute_review";
|
|
46
|
+
} else if (reviewBurdenState === "high") {
|
|
47
|
+
nextBestAction = "prioritize_governance_queue";
|
|
48
|
+
} else if (bridgeDependencyState === "thin") {
|
|
49
|
+
nextBestAction = "strengthen_bridge_review_posture";
|
|
50
|
+
} else if (disputeRiskState === "watch" || reviewBurdenState === "moderate") {
|
|
51
|
+
nextBestAction = "inspect_governance_dashboard";
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
ok: true,
|
|
56
|
+
product: packageJson.name,
|
|
57
|
+
category: "proof-review-intelligence-pack",
|
|
58
|
+
review_burden_state: reviewBurdenState,
|
|
59
|
+
dispute_risk_state: disputeRiskState,
|
|
60
|
+
bridge_dependency_state: bridgeDependencyState,
|
|
61
|
+
recommended_review_lane: "governance_and_result_package_review",
|
|
62
|
+
next_best_action: nextBestAction,
|
|
63
|
+
explanation_signals: {
|
|
64
|
+
review_count: Number(governanceDashboard.queue_summary.review_count || 0),
|
|
65
|
+
dispute_count: Number(governanceDashboard.queue_summary.dispute_count || 0),
|
|
66
|
+
signoff_ready_count: Number(governanceDashboard.queue_summary.signoff_ready_count || 0),
|
|
67
|
+
open_case_count: Number(governanceDisputes.open_case_count || 0),
|
|
68
|
+
case_count: Number(governanceDisputes.case_count || 0),
|
|
69
|
+
attention_ref_count: Array.isArray(governanceOperatorView.attention_refs) ? governanceOperatorView.attention_refs.length : 0,
|
|
70
|
+
bridge_capability_count: bridgeSummary.capability_count,
|
|
71
|
+
bridge_profile_count: bridgeSummary.profile_count
|
|
72
|
+
},
|
|
73
|
+
linked_surfaces: {
|
|
74
|
+
governance_dashboard_ref: "/v1/proof-center/governance/dashboard",
|
|
75
|
+
governance_operator_view_ref: "/v1/proof-center/governance/operator-view",
|
|
76
|
+
governance_disputes_summary_ref: "/v1/proof-center/governance/disputes/summary",
|
|
77
|
+
governance_review_link_ref: "/v1/proof-center/governance/review-link",
|
|
78
|
+
bridge_summary_ref: "/v1/proof-center/bridge/summary"
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function summarizeReviewIntelligencePack(input) {
|
|
84
|
+
const pack = buildReviewIntelligencePack(input);
|
|
85
|
+
return {
|
|
86
|
+
ok: true,
|
|
87
|
+
product: pack.product,
|
|
88
|
+
category: pack.category,
|
|
89
|
+
review_burden_state: pack.review_burden_state,
|
|
90
|
+
dispute_risk_state: pack.dispute_risk_state,
|
|
91
|
+
bridge_dependency_state: pack.bridge_dependency_state,
|
|
92
|
+
next_best_action: pack.next_best_action,
|
|
93
|
+
signal_count: Object.keys(pack.explanation_signals).length
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
module.exports = {
|
|
98
|
+
buildReviewIntelligencePack,
|
|
99
|
+
summarizeReviewIntelligencePack
|
|
100
|
+
};
|
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const packageJson = require("../package.json");
|
|
4
|
+
const proofSdk = require("../proof_sdk");
|
|
5
|
+
const {
|
|
6
|
+
buildTrustIntelligencePack
|
|
7
|
+
} = require("./trust_intelligence");
|
|
8
|
+
const {
|
|
9
|
+
buildReviewIntelligencePack
|
|
10
|
+
} = require("./review_intelligence");
|
|
11
|
+
const {
|
|
12
|
+
buildGovernanceIntelligencePack
|
|
13
|
+
} = require("./governance_intelligence");
|
|
14
|
+
const {
|
|
15
|
+
buildBridgeIntelligencePack
|
|
16
|
+
} = require("./bridge_intelligence");
|
|
17
|
+
|
|
18
|
+
function buildRoleFreezePack() {
|
|
19
|
+
const proofCenterSummary = proofSdk.summarizeDefaultProofCenter();
|
|
20
|
+
const resultPackageHandoffSummary = proofSdk.summarizeInteractionResultPackageHandoffCenter();
|
|
21
|
+
const governanceSummary = proofSdk.summarizeGovernanceCenter();
|
|
22
|
+
const bridgeSummary = proofSdk.summarizeBridgeCenter();
|
|
23
|
+
const trustIntelligence = buildTrustIntelligencePack();
|
|
24
|
+
const reviewIntelligence = buildReviewIntelligencePack();
|
|
25
|
+
const governanceIntelligence = buildGovernanceIntelligencePack();
|
|
26
|
+
const bridgeIntelligence = buildBridgeIntelligencePack();
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
ok: true,
|
|
30
|
+
product: packageJson.name,
|
|
31
|
+
category: "proof-role-freeze-pack",
|
|
32
|
+
frozen_role: "proof_review_governance_bridge_followthrough",
|
|
33
|
+
role_state: "explicitly_frozen",
|
|
34
|
+
owns: [
|
|
35
|
+
"canonical_proof_bundle_model",
|
|
36
|
+
"result_package_review_and_followthrough",
|
|
37
|
+
"governance_review_and_signoff",
|
|
38
|
+
"bridge_and_compatibility_followthrough",
|
|
39
|
+
"proof_side_operator_and_review_intelligence"
|
|
40
|
+
],
|
|
41
|
+
does_not_own: [
|
|
42
|
+
"runtime_execution_ownership",
|
|
43
|
+
"wallet_or_ledger_truth",
|
|
44
|
+
"machine_economics_or_pricing_truth",
|
|
45
|
+
"fiat_ingress_ownership",
|
|
46
|
+
"settlement_authority_ownership"
|
|
47
|
+
],
|
|
48
|
+
role_doctrine: {
|
|
49
|
+
lead_entry_surface: "/v1/proof-center/result-package-handoff/review/summary",
|
|
50
|
+
primary_center_surface: "/v1/proof-center/summary",
|
|
51
|
+
runtime_boundary: "xytara_owns_runtime_wallet_authority_identity_and_economics_truth",
|
|
52
|
+
bridge_boundary: "xoonya_carries_reviewable_proof_followthrough_without_becoming_runtime_core"
|
|
53
|
+
},
|
|
54
|
+
role_strength_signals: {
|
|
55
|
+
proof_helper_count: proofCenterSummary.helper_count,
|
|
56
|
+
result_package_source_ref_count: resultPackageHandoffSummary.source_ref_count,
|
|
57
|
+
governance_capability_count: governanceSummary.capability_count,
|
|
58
|
+
bridge_capability_count: bridgeSummary.capability_count
|
|
59
|
+
},
|
|
60
|
+
intelligence_posture: {
|
|
61
|
+
proof_readiness_state: trustIntelligence.proof_readiness_state,
|
|
62
|
+
review_burden_state: reviewIntelligence.review_burden_state,
|
|
63
|
+
escalation_readiness_state: governanceIntelligence.escalation_readiness_state,
|
|
64
|
+
bridge_coverage_state: bridgeIntelligence.bridge_coverage_state
|
|
65
|
+
},
|
|
66
|
+
linked_surfaces: {
|
|
67
|
+
proof_center_summary_ref: "/v1/proof-center/summary",
|
|
68
|
+
result_package_handoff_summary_ref: "/v1/proof-center/result-package-handoff/summary",
|
|
69
|
+
governance_summary_ref: "/v1/proof-center/governance/summary",
|
|
70
|
+
bridge_summary_ref: "/v1/proof-center/bridge/summary",
|
|
71
|
+
trust_intelligence_summary_ref: "/v1/trust-intelligence/summary",
|
|
72
|
+
review_intelligence_summary_ref: "/v1/review-intelligence/summary",
|
|
73
|
+
governance_intelligence_summary_ref: "/v1/governance-intelligence/summary",
|
|
74
|
+
bridge_intelligence_summary_ref: "/v1/bridge-intelligence/summary"
|
|
75
|
+
},
|
|
76
|
+
generated_from: {
|
|
77
|
+
proof_bundle_version: proofCenterSummary.proof_bundle_version,
|
|
78
|
+
center_ref: proofCenterSummary.center_ref || "/v1/proof-center",
|
|
79
|
+
governance_center_ref: governanceSummary.center_ref,
|
|
80
|
+
bridge_center_ref: bridgeSummary.center_ref
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function summarizeRoleFreezePack() {
|
|
86
|
+
const pack = buildRoleFreezePack();
|
|
87
|
+
return {
|
|
88
|
+
ok: true,
|
|
89
|
+
product: pack.product,
|
|
90
|
+
category: pack.category,
|
|
91
|
+
frozen_role: pack.frozen_role,
|
|
92
|
+
role_state: pack.role_state,
|
|
93
|
+
lead_entry_surface: pack.role_doctrine.lead_entry_surface,
|
|
94
|
+
owns_count: pack.owns.length,
|
|
95
|
+
does_not_own_count: pack.does_not_own.length
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function buildRoleFreezeOperatorBundle() {
|
|
100
|
+
const roleFreeze = buildRoleFreezePack();
|
|
101
|
+
const trustIntelligence = buildTrustIntelligencePack();
|
|
102
|
+
const reviewIntelligence = buildReviewIntelligencePack();
|
|
103
|
+
const governanceIntelligence = buildGovernanceIntelligencePack();
|
|
104
|
+
const bridgeIntelligence = buildBridgeIntelligencePack();
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
ok: true,
|
|
108
|
+
product: packageJson.name,
|
|
109
|
+
category: "proof-role-freeze-operator-bundle",
|
|
110
|
+
bundle_version: "xoonya-proof-role-freeze-operator-bundle-v1",
|
|
111
|
+
operator_posture: {
|
|
112
|
+
frozen_role: roleFreeze.frozen_role,
|
|
113
|
+
role_state: roleFreeze.role_state,
|
|
114
|
+
proof_readiness_state: trustIntelligence.proof_readiness_state,
|
|
115
|
+
review_burden_state: reviewIntelligence.review_burden_state,
|
|
116
|
+
escalation_readiness_state: governanceIntelligence.escalation_readiness_state,
|
|
117
|
+
bridge_coverage_state: bridgeIntelligence.bridge_coverage_state,
|
|
118
|
+
recommended_operator_motion: bridgeIntelligence.bridge_coverage_state === "thin"
|
|
119
|
+
? "strengthen_bridge_followthrough"
|
|
120
|
+
: governanceIntelligence.escalation_readiness_state === "active"
|
|
121
|
+
? "advance_governance_followthrough"
|
|
122
|
+
: trustIntelligence.proof_readiness_state !== "strong"
|
|
123
|
+
? "strengthen_result_package_review_entry"
|
|
124
|
+
: "maintain_frozen_proof_role"
|
|
125
|
+
},
|
|
126
|
+
role_freeze: roleFreeze,
|
|
127
|
+
trust_intelligence: trustIntelligence,
|
|
128
|
+
review_intelligence: reviewIntelligence,
|
|
129
|
+
governance_intelligence: governanceIntelligence,
|
|
130
|
+
bridge_intelligence: bridgeIntelligence,
|
|
131
|
+
linked_surfaces: {
|
|
132
|
+
role_freeze_ref: "/v1/role-freeze",
|
|
133
|
+
role_freeze_summary_ref: "/v1/role-freeze/summary",
|
|
134
|
+
trust_intelligence_ref: "/v1/trust-intelligence",
|
|
135
|
+
review_intelligence_ref: "/v1/review-intelligence",
|
|
136
|
+
governance_intelligence_ref: "/v1/governance-intelligence",
|
|
137
|
+
bridge_intelligence_ref: "/v1/bridge-intelligence"
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function summarizeRoleFreezeOperatorBundle() {
|
|
143
|
+
const bundle = buildRoleFreezeOperatorBundle();
|
|
144
|
+
return {
|
|
145
|
+
ok: true,
|
|
146
|
+
product: bundle.product,
|
|
147
|
+
category: bundle.category,
|
|
148
|
+
bundle_version: bundle.bundle_version,
|
|
149
|
+
frozen_role: bundle.operator_posture.frozen_role,
|
|
150
|
+
role_state: bundle.operator_posture.role_state,
|
|
151
|
+
recommended_operator_motion: bundle.operator_posture.recommended_operator_motion
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function buildRoleFreezePolicyPack() {
|
|
156
|
+
const roleFreeze = buildRoleFreezePack();
|
|
157
|
+
const operatorBundle = buildRoleFreezeOperatorBundle();
|
|
158
|
+
const policyTemplates = [
|
|
159
|
+
{
|
|
160
|
+
template_id: "result_package_review_lead",
|
|
161
|
+
recommended_for: "runtime-to-proof followthrough as the main entry path",
|
|
162
|
+
target_motion: "strengthen_result_package_review_entry",
|
|
163
|
+
reinforces: [
|
|
164
|
+
"canonical_proof_bundle_model",
|
|
165
|
+
"result_package_review_and_followthrough"
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
template_id: "governance_followthrough_lead",
|
|
170
|
+
recommended_for: "active signoff and escalation pressure",
|
|
171
|
+
target_motion: "advance_governance_followthrough",
|
|
172
|
+
reinforces: [
|
|
173
|
+
"governance_review_and_signoff",
|
|
174
|
+
"proof_side_operator_and_review_intelligence"
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
template_id: "bridge_followthrough_lead",
|
|
179
|
+
recommended_for: "thin bridge coverage or compatibility reinforcement",
|
|
180
|
+
target_motion: "strengthen_bridge_followthrough",
|
|
181
|
+
reinforces: [
|
|
182
|
+
"bridge_and_compatibility_followthrough",
|
|
183
|
+
"proof_side_operator_and_review_intelligence"
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
template_id: "frozen_role_maintenance",
|
|
188
|
+
recommended_for: "strong balanced proof-side posture",
|
|
189
|
+
target_motion: "maintain_frozen_proof_role",
|
|
190
|
+
reinforces: roleFreeze.owns.slice()
|
|
191
|
+
}
|
|
192
|
+
];
|
|
193
|
+
|
|
194
|
+
return {
|
|
195
|
+
ok: true,
|
|
196
|
+
product: packageJson.name,
|
|
197
|
+
category: "proof-role-freeze-policy-pack",
|
|
198
|
+
pack_version: "xoonya-proof-role-freeze-policy-pack-v1",
|
|
199
|
+
role_freeze: roleFreeze,
|
|
200
|
+
operator_bundle: operatorBundle,
|
|
201
|
+
recommended_policy_motion: operatorBundle.operator_posture.recommended_operator_motion,
|
|
202
|
+
policy_templates: policyTemplates,
|
|
203
|
+
linked_surfaces: {
|
|
204
|
+
role_freeze_ref: "/v1/role-freeze",
|
|
205
|
+
role_freeze_operator_bundle_ref: "/v1/role-freeze/operator-bundle",
|
|
206
|
+
role_freeze_policy_application_summary_ref: "/v1/role-freeze/policy-application-summary"
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function summarizeRoleFreezePolicyPack() {
|
|
212
|
+
const pack = buildRoleFreezePolicyPack();
|
|
213
|
+
return {
|
|
214
|
+
ok: true,
|
|
215
|
+
product: pack.product,
|
|
216
|
+
category: pack.category,
|
|
217
|
+
pack_version: pack.pack_version,
|
|
218
|
+
recommended_policy_motion: pack.recommended_policy_motion,
|
|
219
|
+
template_count: pack.policy_templates.length
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
function buildRoleFreezePolicyApplicationSummary(templateId) {
|
|
224
|
+
const pack = buildRoleFreezePolicyPack();
|
|
225
|
+
const selectedTemplate = pack.policy_templates.find((entry) => entry.template_id === templateId)
|
|
226
|
+
|| pack.policy_templates.find((entry) => entry.target_motion === pack.recommended_policy_motion)
|
|
227
|
+
|| pack.policy_templates[0];
|
|
228
|
+
return {
|
|
229
|
+
ok: true,
|
|
230
|
+
product: packageJson.name,
|
|
231
|
+
category: "proof-role-freeze-policy-application-summary",
|
|
232
|
+
summary_version: "xoonya-proof-role-freeze-policy-application-summary-v1",
|
|
233
|
+
recommended_policy_motion: pack.recommended_policy_motion,
|
|
234
|
+
selected_template_id: selectedTemplate ? selectedTemplate.template_id : null,
|
|
235
|
+
selected_template: selectedTemplate || null,
|
|
236
|
+
available_template_ids: pack.policy_templates.map((entry) => entry.template_id),
|
|
237
|
+
linked_surfaces: {
|
|
238
|
+
role_freeze_policy_pack_ref: "/v1/role-freeze/policy-pack",
|
|
239
|
+
role_freeze_operator_bundle_ref: "/v1/role-freeze/operator-bundle"
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
function buildRoleFreezePackage() {
|
|
245
|
+
const roleFreeze = buildRoleFreezePack();
|
|
246
|
+
const operatorBundle = buildRoleFreezeOperatorBundle();
|
|
247
|
+
const policyPack = buildRoleFreezePolicyPack();
|
|
248
|
+
const policyApplicationSummary = buildRoleFreezePolicyApplicationSummary(null);
|
|
249
|
+
return {
|
|
250
|
+
ok: true,
|
|
251
|
+
product: packageJson.name,
|
|
252
|
+
category: "proof-role-freeze-package",
|
|
253
|
+
package_version: "xoonya-proof-role-freeze-package-v1",
|
|
254
|
+
package_posture: {
|
|
255
|
+
frozen_role: roleFreeze.frozen_role,
|
|
256
|
+
role_state: roleFreeze.role_state,
|
|
257
|
+
recommended_operator_motion: operatorBundle.operator_posture.recommended_operator_motion,
|
|
258
|
+
recommended_policy_motion: policyPack.recommended_policy_motion
|
|
259
|
+
},
|
|
260
|
+
role_freeze: roleFreeze,
|
|
261
|
+
role_freeze_operator_bundle: operatorBundle,
|
|
262
|
+
role_freeze_policy_pack: policyPack,
|
|
263
|
+
role_freeze_policy_application_summary: policyApplicationSummary,
|
|
264
|
+
linked_surfaces: {
|
|
265
|
+
role_freeze_ref: "/v1/role-freeze",
|
|
266
|
+
role_freeze_operator_bundle_ref: "/v1/role-freeze/operator-bundle",
|
|
267
|
+
role_freeze_policy_pack_ref: "/v1/role-freeze/policy-pack",
|
|
268
|
+
role_freeze_policy_application_summary_ref: "/v1/role-freeze/policy-application-summary"
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
function summarizeRoleFreezePackage() {
|
|
274
|
+
const pack = buildRoleFreezePackage();
|
|
275
|
+
return {
|
|
276
|
+
ok: true,
|
|
277
|
+
product: pack.product,
|
|
278
|
+
category: pack.category,
|
|
279
|
+
package_version: pack.package_version,
|
|
280
|
+
frozen_role: pack.package_posture.frozen_role,
|
|
281
|
+
role_state: pack.package_posture.role_state,
|
|
282
|
+
recommended_operator_motion: pack.package_posture.recommended_operator_motion,
|
|
283
|
+
recommended_policy_motion: pack.package_posture.recommended_policy_motion
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
function buildRoleTransitionPack() {
|
|
288
|
+
const roleFreeze = buildRoleFreezePack();
|
|
289
|
+
const roleFreezePackage = buildRoleFreezePackage();
|
|
290
|
+
return {
|
|
291
|
+
ok: true,
|
|
292
|
+
product: packageJson.name,
|
|
293
|
+
category: "proof-role-transition-pack",
|
|
294
|
+
package_version: "xoonya-proof-role-transition-pack-v1",
|
|
295
|
+
current_role: {
|
|
296
|
+
frozen_role: roleFreeze.frozen_role,
|
|
297
|
+
role_state: roleFreeze.role_state,
|
|
298
|
+
current_primary_posture: "proof_primary"
|
|
299
|
+
},
|
|
300
|
+
long_term_direction: {
|
|
301
|
+
target_role: "capability_execution_coordination_shell_with_proof_strength",
|
|
302
|
+
direction_state: "explicit_direction_recorded",
|
|
303
|
+
current_transition_state: "proof_primary_today_coordination_shell_later",
|
|
304
|
+
rationale: [
|
|
305
|
+
"xytara remains canonical wallet_ledger_authority_identity_and_pricing_truth",
|
|
306
|
+
"xoonya remains the strongest home for proof review governance bridge and execution-adjacent followthrough",
|
|
307
|
+
"future canonical capability ownership may move toward xoonya if coordination-shell direction is affirmed"
|
|
308
|
+
]
|
|
309
|
+
},
|
|
310
|
+
boundary_guardrails: {
|
|
311
|
+
xytara_must_continue_to_own: [
|
|
312
|
+
"wallet_truth",
|
|
313
|
+
"ledger_truth",
|
|
314
|
+
"authority_truth",
|
|
315
|
+
"machine_economics_truth",
|
|
316
|
+
"fiat_ingress_and_settlement_truth"
|
|
317
|
+
],
|
|
318
|
+
xoonya_may_expand_to_own: [
|
|
319
|
+
"capability_identity",
|
|
320
|
+
"capability_execution_coordination",
|
|
321
|
+
"capability_registry_source_of_truth"
|
|
322
|
+
],
|
|
323
|
+
xoonya_must_not_absorb: [
|
|
324
|
+
"wallet_balances",
|
|
325
|
+
"economic_capacity_truth",
|
|
326
|
+
"pricing_settlement_authority",
|
|
327
|
+
"adapter_or_fiat_business_logic"
|
|
328
|
+
]
|
|
329
|
+
},
|
|
330
|
+
transition_readiness_signals: {
|
|
331
|
+
proof_readiness_state: roleFreeze.intelligence_posture.proof_readiness_state,
|
|
332
|
+
review_burden_state: roleFreezePackage.role_freeze_operator_bundle.review_intelligence.review_burden_state,
|
|
333
|
+
bridge_coverage_state: roleFreezePackage.role_freeze_operator_bundle.bridge_intelligence.bridge_coverage_state,
|
|
334
|
+
governance_posture_state: roleFreezePackage.role_freeze_operator_bundle.governance_intelligence.signoff_motion_state
|
|
335
|
+
},
|
|
336
|
+
recommended_transition_motion: roleFreezePackage.role_freeze_operator_bundle.operator_posture.recommended_operator_motion === "maintain_frozen_proof_role"
|
|
337
|
+
? "record_transition_guardrails_and_prepare_registry_home_decision"
|
|
338
|
+
: "strengthen_proof_followthrough_before_coordination_expansion",
|
|
339
|
+
linked_surfaces: {
|
|
340
|
+
role_freeze_ref: "/v1/role-freeze",
|
|
341
|
+
role_freeze_package_ref: "/v1/role-freeze/package",
|
|
342
|
+
role_transition_summary_ref: "/v1/role-transition/summary"
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
function summarizeRoleTransitionPack() {
|
|
348
|
+
const pack = buildRoleTransitionPack();
|
|
349
|
+
return {
|
|
350
|
+
ok: true,
|
|
351
|
+
product: pack.product,
|
|
352
|
+
category: pack.category,
|
|
353
|
+
package_version: pack.package_version,
|
|
354
|
+
current_primary_posture: pack.current_role.current_primary_posture,
|
|
355
|
+
target_role: pack.long_term_direction.target_role,
|
|
356
|
+
current_transition_state: pack.long_term_direction.current_transition_state,
|
|
357
|
+
recommended_transition_motion: pack.recommended_transition_motion
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
function buildCapabilityRegistryHomePack() {
|
|
362
|
+
const roleTransition = buildRoleTransitionPack();
|
|
363
|
+
return {
|
|
364
|
+
ok: true,
|
|
365
|
+
product: packageJson.name,
|
|
366
|
+
category: "proof-capability-registry-home-pack",
|
|
367
|
+
package_version: "xoonya-proof-capability-registry-home-pack-v1",
|
|
368
|
+
current_registry_home: {
|
|
369
|
+
current_owner: "xytara",
|
|
370
|
+
current_state: "explicit_runtime_registry_active",
|
|
371
|
+
current_primary_surface: "xytara:/v1/capability-registry"
|
|
372
|
+
},
|
|
373
|
+
target_registry_home: {
|
|
374
|
+
target_owner: "xoonya",
|
|
375
|
+
target_state: "direction_recorded_not_yet_migrated",
|
|
376
|
+
target_role_dependency: "xoonya_as_capability_execution_coordination_shell"
|
|
377
|
+
},
|
|
378
|
+
migration_guardrails: {
|
|
379
|
+
xytara_keeps: [
|
|
380
|
+
"capability_refs_needed_for_wallet_authority_pricing_and_consequence",
|
|
381
|
+
"runtime_settlement_and_economics_binding_truth"
|
|
382
|
+
],
|
|
383
|
+
xoonya_may_become_source_of_truth_for: [
|
|
384
|
+
"capability_identity",
|
|
385
|
+
"capability_owner_identity",
|
|
386
|
+
"capability_execution_coordination_semantics",
|
|
387
|
+
"capability_registry_publication_and_discovery"
|
|
388
|
+
],
|
|
389
|
+
migration_preconditions: [
|
|
390
|
+
"role_transition_direction_is_explicit",
|
|
391
|
+
"registry_home_split_is_machine_readable",
|
|
392
|
+
"xytara_can_continue_to_resolve_stable_capability_refs_after_transition"
|
|
393
|
+
]
|
|
394
|
+
},
|
|
395
|
+
current_transition_alignment: {
|
|
396
|
+
role_transition_state: roleTransition.long_term_direction.current_transition_state,
|
|
397
|
+
target_role: roleTransition.long_term_direction.target_role,
|
|
398
|
+
alignment_state: "registry_direction_matches_role_transition"
|
|
399
|
+
},
|
|
400
|
+
recommended_registry_home_motion: "keep_runtime_registry_in_xytara_while_recording_xoonya_as_target_canonical_home",
|
|
401
|
+
linked_surfaces: {
|
|
402
|
+
role_transition_ref: "/v1/role-transition",
|
|
403
|
+
role_transition_summary_ref: "/v1/role-transition/summary"
|
|
404
|
+
}
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
function summarizeCapabilityRegistryHomePack() {
|
|
409
|
+
const pack = buildCapabilityRegistryHomePack();
|
|
410
|
+
return {
|
|
411
|
+
ok: true,
|
|
412
|
+
product: pack.product,
|
|
413
|
+
category: pack.category,
|
|
414
|
+
package_version: pack.package_version,
|
|
415
|
+
current_owner: pack.current_registry_home.current_owner,
|
|
416
|
+
target_owner: pack.target_registry_home.target_owner,
|
|
417
|
+
target_state: pack.target_registry_home.target_state,
|
|
418
|
+
recommended_registry_home_motion: pack.recommended_registry_home_motion
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
module.exports = {
|
|
423
|
+
buildRoleFreezePack,
|
|
424
|
+
summarizeRoleFreezePack,
|
|
425
|
+
buildRoleFreezeOperatorBundle,
|
|
426
|
+
summarizeRoleFreezeOperatorBundle,
|
|
427
|
+
buildRoleFreezePolicyPack,
|
|
428
|
+
summarizeRoleFreezePolicyPack,
|
|
429
|
+
buildRoleFreezePolicyApplicationSummary,
|
|
430
|
+
buildRoleFreezePackage,
|
|
431
|
+
summarizeRoleFreezePackage,
|
|
432
|
+
buildRoleTransitionPack,
|
|
433
|
+
summarizeRoleTransitionPack,
|
|
434
|
+
buildCapabilityRegistryHomePack,
|
|
435
|
+
summarizeCapabilityRegistryHomePack
|
|
436
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const packageJson = require("../package.json");
|
|
4
|
+
const proofSdk = require("../proof_sdk");
|
|
5
|
+
|
|
6
|
+
function classifyProofReadinessState(proofCenterSummary, proofLoopSummary, resultPackageHandoffSummary) {
|
|
7
|
+
if (
|
|
8
|
+
proofCenterSummary.helper_count >= 5
|
|
9
|
+
&& proofLoopSummary.loop_count >= 2
|
|
10
|
+
&& resultPackageHandoffSummary.source_ref_count >= 3
|
|
11
|
+
) {
|
|
12
|
+
return "strong";
|
|
13
|
+
}
|
|
14
|
+
if (proofCenterSummary.helper_count >= 3 && proofLoopSummary.loop_count >= 1) {
|
|
15
|
+
return "working";
|
|
16
|
+
}
|
|
17
|
+
return "early";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function classifyBridgeConfidenceState(bridgeSummary) {
|
|
21
|
+
if (bridgeSummary.capability_count >= 8 && bridgeSummary.profile_count >= 3) return "strong";
|
|
22
|
+
if (bridgeSummary.capability_count >= 4 && bridgeSummary.profile_count >= 2) return "working";
|
|
23
|
+
return "early";
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function classifyGovernanceBurdenState(governanceSummary) {
|
|
27
|
+
if (governanceSummary.capability_count >= 10) return "active_review_ready";
|
|
28
|
+
if (governanceSummary.capability_count >= 6) return "moderate";
|
|
29
|
+
return "light";
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function buildTrustIntelligencePack() {
|
|
33
|
+
const proofCenterSummary = proofSdk.summarizeDefaultProofCenter();
|
|
34
|
+
const proofLoopSummary = proofSdk.summarizeDefaultProofLoops();
|
|
35
|
+
const resultPackageHandoffSummary = proofSdk.summarizeInteractionResultPackageHandoffCenter();
|
|
36
|
+
const bridgeSummary = proofSdk.summarizeBridgeCenter();
|
|
37
|
+
const governanceSummary = proofSdk.summarizeGovernanceCenter();
|
|
38
|
+
|
|
39
|
+
const proofReadinessState = classifyProofReadinessState(
|
|
40
|
+
proofCenterSummary,
|
|
41
|
+
proofLoopSummary,
|
|
42
|
+
resultPackageHandoffSummary
|
|
43
|
+
);
|
|
44
|
+
const bridgeConfidenceState = classifyBridgeConfidenceState(bridgeSummary);
|
|
45
|
+
const governanceBurdenState = classifyGovernanceBurdenState(governanceSummary);
|
|
46
|
+
|
|
47
|
+
let nextBestAction = "continue_reviewable_proof_posture";
|
|
48
|
+
if (proofReadinessState !== "strong") {
|
|
49
|
+
nextBestAction = "strengthen_proof_loop_entry";
|
|
50
|
+
} else if (bridgeConfidenceState !== "strong") {
|
|
51
|
+
nextBestAction = "strengthen_bridge_profile_posture";
|
|
52
|
+
} else if (governanceBurdenState === "active_review_ready") {
|
|
53
|
+
nextBestAction = "promote_governance_review_path";
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
ok: true,
|
|
58
|
+
product: packageJson.name,
|
|
59
|
+
category: "proof-trust-intelligence-pack",
|
|
60
|
+
proof_readiness_state: proofReadinessState,
|
|
61
|
+
bridge_confidence_state: bridgeConfidenceState,
|
|
62
|
+
governance_burden_state: governanceBurdenState,
|
|
63
|
+
recommended_review_motion: "lead_with_result_package_handoff_review",
|
|
64
|
+
next_best_action: nextBestAction,
|
|
65
|
+
explanation_signals: {
|
|
66
|
+
proof_helper_count: proofCenterSummary.helper_count,
|
|
67
|
+
proof_route_count: proofCenterSummary.route_count,
|
|
68
|
+
proof_loop_count: proofLoopSummary.loop_count,
|
|
69
|
+
result_package_source_ref_count: resultPackageHandoffSummary.source_ref_count,
|
|
70
|
+
bridge_capability_count: bridgeSummary.capability_count,
|
|
71
|
+
bridge_profile_count: bridgeSummary.profile_count,
|
|
72
|
+
governance_capability_count: governanceSummary.capability_count
|
|
73
|
+
},
|
|
74
|
+
linked_surfaces: {
|
|
75
|
+
proof_center_summary_ref: "/v1/proof-center/summary",
|
|
76
|
+
proof_loops_summary_ref: "/v1/proof-center/default-loops/summary",
|
|
77
|
+
result_package_handoff_summary_ref: "/v1/proof-center/result-package-handoff/summary",
|
|
78
|
+
bridge_summary_ref: "/v1/proof-center/bridge/summary",
|
|
79
|
+
governance_summary_ref: "/v1/proof-center/governance/summary"
|
|
80
|
+
},
|
|
81
|
+
generated_from: {
|
|
82
|
+
proof_bundle_version: proofCenterSummary.proof_bundle_version,
|
|
83
|
+
bridge_center_ref: bridgeSummary.center_ref,
|
|
84
|
+
governance_center_ref: governanceSummary.center_ref
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function summarizeTrustIntelligencePack() {
|
|
90
|
+
const pack = buildTrustIntelligencePack();
|
|
91
|
+
return {
|
|
92
|
+
ok: true,
|
|
93
|
+
product: pack.product,
|
|
94
|
+
category: pack.category,
|
|
95
|
+
proof_readiness_state: pack.proof_readiness_state,
|
|
96
|
+
bridge_confidence_state: pack.bridge_confidence_state,
|
|
97
|
+
governance_burden_state: pack.governance_burden_state,
|
|
98
|
+
next_best_action: pack.next_best_action,
|
|
99
|
+
signal_count: Object.keys(pack.explanation_signals).length
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
module.exports = {
|
|
104
|
+
buildTrustIntelligencePack,
|
|
105
|
+
summarizeTrustIntelligencePack
|
|
106
|
+
};
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -59,6 +59,37 @@ const {
|
|
|
59
59
|
buildAnnouncementPack,
|
|
60
60
|
summarizeAnnouncementPack
|
|
61
61
|
} = require('./lib/announcement_pack');
|
|
62
|
+
const {
|
|
63
|
+
buildTrustIntelligencePack,
|
|
64
|
+
summarizeTrustIntelligencePack
|
|
65
|
+
} = require('./lib/trust_intelligence');
|
|
66
|
+
const {
|
|
67
|
+
buildReviewIntelligencePack,
|
|
68
|
+
summarizeReviewIntelligencePack
|
|
69
|
+
} = require('./lib/review_intelligence');
|
|
70
|
+
const {
|
|
71
|
+
buildGovernanceIntelligencePack,
|
|
72
|
+
summarizeGovernanceIntelligencePack
|
|
73
|
+
} = require('./lib/governance_intelligence');
|
|
74
|
+
const {
|
|
75
|
+
buildBridgeIntelligencePack,
|
|
76
|
+
summarizeBridgeIntelligencePack
|
|
77
|
+
} = require('./lib/bridge_intelligence');
|
|
78
|
+
const {
|
|
79
|
+
buildRoleFreezePack,
|
|
80
|
+
summarizeRoleFreezePack,
|
|
81
|
+
buildRoleFreezeOperatorBundle,
|
|
82
|
+
summarizeRoleFreezeOperatorBundle,
|
|
83
|
+
buildRoleFreezePolicyPack,
|
|
84
|
+
summarizeRoleFreezePolicyPack,
|
|
85
|
+
buildRoleFreezePolicyApplicationSummary,
|
|
86
|
+
buildRoleFreezePackage,
|
|
87
|
+
summarizeRoleFreezePackage,
|
|
88
|
+
buildRoleTransitionPack,
|
|
89
|
+
summarizeRoleTransitionPack,
|
|
90
|
+
buildCapabilityRegistryHomePack,
|
|
91
|
+
summarizeCapabilityRegistryHomePack
|
|
92
|
+
} = require('./lib/role_freeze');
|
|
62
93
|
const {
|
|
63
94
|
buildReleaseCandidatePack,
|
|
64
95
|
summarizeReleaseCandidatePack
|
|
@@ -1929,6 +1960,111 @@ async function routeRequest(req, res) {
|
|
|
1929
1960
|
return;
|
|
1930
1961
|
}
|
|
1931
1962
|
|
|
1963
|
+
if (req.method === 'GET' && url.pathname === '/v1/trust-intelligence') {
|
|
1964
|
+
sendJson(res, 200, buildTrustIntelligencePack());
|
|
1965
|
+
return;
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1968
|
+
if (req.method === 'GET' && url.pathname === '/v1/trust-intelligence/summary') {
|
|
1969
|
+
sendJson(res, 200, summarizeTrustIntelligencePack());
|
|
1970
|
+
return;
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
if (req.method === 'GET' && url.pathname === '/v1/review-intelligence') {
|
|
1974
|
+
sendJson(res, 200, buildReviewIntelligencePack());
|
|
1975
|
+
return;
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
if (req.method === 'GET' && url.pathname === '/v1/review-intelligence/summary') {
|
|
1979
|
+
sendJson(res, 200, summarizeReviewIntelligencePack());
|
|
1980
|
+
return;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
if (req.method === 'GET' && url.pathname === '/v1/governance-intelligence') {
|
|
1984
|
+
sendJson(res, 200, buildGovernanceIntelligencePack());
|
|
1985
|
+
return;
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
if (req.method === 'GET' && url.pathname === '/v1/governance-intelligence/summary') {
|
|
1989
|
+
sendJson(res, 200, summarizeGovernanceIntelligencePack());
|
|
1990
|
+
return;
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1993
|
+
if (req.method === 'GET' && url.pathname === '/v1/bridge-intelligence') {
|
|
1994
|
+
sendJson(res, 200, buildBridgeIntelligencePack());
|
|
1995
|
+
return;
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
if (req.method === 'GET' && url.pathname === '/v1/bridge-intelligence/summary') {
|
|
1999
|
+
sendJson(res, 200, summarizeBridgeIntelligencePack());
|
|
2000
|
+
return;
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze') {
|
|
2004
|
+
sendJson(res, 200, buildRoleFreezePack());
|
|
2005
|
+
return;
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze/summary') {
|
|
2009
|
+
sendJson(res, 200, summarizeRoleFreezePack());
|
|
2010
|
+
return;
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze/operator-bundle') {
|
|
2014
|
+
sendJson(res, 200, buildRoleFreezeOperatorBundle());
|
|
2015
|
+
return;
|
|
2016
|
+
}
|
|
2017
|
+
|
|
2018
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze/operator-bundle/summary') {
|
|
2019
|
+
sendJson(res, 200, summarizeRoleFreezeOperatorBundle());
|
|
2020
|
+
return;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze/policy-pack') {
|
|
2024
|
+
sendJson(res, 200, buildRoleFreezePolicyPack());
|
|
2025
|
+
return;
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze/policy-pack/summary') {
|
|
2029
|
+
sendJson(res, 200, summarizeRoleFreezePolicyPack());
|
|
2030
|
+
return;
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze/policy-application-summary') {
|
|
2034
|
+
sendJson(res, 200, buildRoleFreezePolicyApplicationSummary(url.searchParams.get('template_id')));
|
|
2035
|
+
return;
|
|
2036
|
+
}
|
|
2037
|
+
|
|
2038
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze/package') {
|
|
2039
|
+
sendJson(res, 200, buildRoleFreezePackage());
|
|
2040
|
+
return;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze/package/summary') {
|
|
2044
|
+
sendJson(res, 200, summarizeRoleFreezePackage());
|
|
2045
|
+
return;
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-transition') {
|
|
2049
|
+
sendJson(res, 200, buildRoleTransitionPack());
|
|
2050
|
+
return;
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-transition/summary') {
|
|
2054
|
+
sendJson(res, 200, summarizeRoleTransitionPack());
|
|
2055
|
+
return;
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
if (req.method === 'GET' && url.pathname === '/v1/capability-registry-home') {
|
|
2059
|
+
sendJson(res, 200, buildCapabilityRegistryHomePack());
|
|
2060
|
+
return;
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
if (req.method === 'GET' && url.pathname === '/v1/capability-registry-home/summary') {
|
|
2064
|
+
sendJson(res, 200, summarizeCapabilityRegistryHomePack());
|
|
2065
|
+
return;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
1932
2068
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center') {
|
|
1933
2069
|
sendJson(res, 200, proofSdk.buildDefaultProofCenter());
|
|
1934
2070
|
return;
|
|
@@ -2570,6 +2706,215 @@ async function routeRequest(req, res) {
|
|
|
2570
2706
|
return;
|
|
2571
2707
|
}
|
|
2572
2708
|
|
|
2709
|
+
if (req.method === 'POST' && url.pathname === '/v1/review-intelligence') {
|
|
2710
|
+
try {
|
|
2711
|
+
const body = await readJsonBody(req);
|
|
2712
|
+
const result = buildReviewIntelligencePack(body);
|
|
2713
|
+
sendJson(res, 200, result);
|
|
2714
|
+
} catch (error) {
|
|
2715
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2716
|
+
}
|
|
2717
|
+
return;
|
|
2718
|
+
}
|
|
2719
|
+
|
|
2720
|
+
if (req.method === 'POST' && url.pathname === '/v1/review-intelligence/summary') {
|
|
2721
|
+
try {
|
|
2722
|
+
const body = await readJsonBody(req);
|
|
2723
|
+
const result = summarizeReviewIntelligencePack(body);
|
|
2724
|
+
sendJson(res, 200, result);
|
|
2725
|
+
} catch (error) {
|
|
2726
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2727
|
+
}
|
|
2728
|
+
return;
|
|
2729
|
+
}
|
|
2730
|
+
|
|
2731
|
+
if (req.method === 'POST' && url.pathname === '/v1/governance-intelligence') {
|
|
2732
|
+
try {
|
|
2733
|
+
const body = await readJsonBody(req);
|
|
2734
|
+
const result = buildGovernanceIntelligencePack(body);
|
|
2735
|
+
sendJson(res, 200, result);
|
|
2736
|
+
} catch (error) {
|
|
2737
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2738
|
+
}
|
|
2739
|
+
return;
|
|
2740
|
+
}
|
|
2741
|
+
|
|
2742
|
+
if (req.method === 'POST' && url.pathname === '/v1/governance-intelligence/summary') {
|
|
2743
|
+
try {
|
|
2744
|
+
const body = await readJsonBody(req);
|
|
2745
|
+
const result = summarizeGovernanceIntelligencePack(body);
|
|
2746
|
+
sendJson(res, 200, result);
|
|
2747
|
+
} catch (error) {
|
|
2748
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2749
|
+
}
|
|
2750
|
+
return;
|
|
2751
|
+
}
|
|
2752
|
+
|
|
2753
|
+
if (req.method === 'POST' && url.pathname === '/v1/bridge-intelligence') {
|
|
2754
|
+
try {
|
|
2755
|
+
const body = await readJsonBody(req);
|
|
2756
|
+
const result = buildBridgeIntelligencePack(body);
|
|
2757
|
+
sendJson(res, 200, result);
|
|
2758
|
+
} catch (error) {
|
|
2759
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2760
|
+
}
|
|
2761
|
+
return;
|
|
2762
|
+
}
|
|
2763
|
+
|
|
2764
|
+
if (req.method === 'POST' && url.pathname === '/v1/bridge-intelligence/summary') {
|
|
2765
|
+
try {
|
|
2766
|
+
const body = await readJsonBody(req);
|
|
2767
|
+
const result = summarizeBridgeIntelligencePack(body);
|
|
2768
|
+
sendJson(res, 200, result);
|
|
2769
|
+
} catch (error) {
|
|
2770
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2771
|
+
}
|
|
2772
|
+
return;
|
|
2773
|
+
}
|
|
2774
|
+
|
|
2775
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze') {
|
|
2776
|
+
try {
|
|
2777
|
+
await readJsonBody(req);
|
|
2778
|
+
const result = buildRoleFreezePack();
|
|
2779
|
+
sendJson(res, 200, result);
|
|
2780
|
+
} catch (error) {
|
|
2781
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2782
|
+
}
|
|
2783
|
+
return;
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2786
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze/summary') {
|
|
2787
|
+
try {
|
|
2788
|
+
await readJsonBody(req);
|
|
2789
|
+
const result = summarizeRoleFreezePack();
|
|
2790
|
+
sendJson(res, 200, result);
|
|
2791
|
+
} catch (error) {
|
|
2792
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2793
|
+
}
|
|
2794
|
+
return;
|
|
2795
|
+
}
|
|
2796
|
+
|
|
2797
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze/operator-bundle') {
|
|
2798
|
+
try {
|
|
2799
|
+
await readJsonBody(req);
|
|
2800
|
+
const result = buildRoleFreezeOperatorBundle();
|
|
2801
|
+
sendJson(res, 200, result);
|
|
2802
|
+
} catch (error) {
|
|
2803
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2804
|
+
}
|
|
2805
|
+
return;
|
|
2806
|
+
}
|
|
2807
|
+
|
|
2808
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze/operator-bundle/summary') {
|
|
2809
|
+
try {
|
|
2810
|
+
await readJsonBody(req);
|
|
2811
|
+
const result = summarizeRoleFreezeOperatorBundle();
|
|
2812
|
+
sendJson(res, 200, result);
|
|
2813
|
+
} catch (error) {
|
|
2814
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2815
|
+
}
|
|
2816
|
+
return;
|
|
2817
|
+
}
|
|
2818
|
+
|
|
2819
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze/policy-pack') {
|
|
2820
|
+
try {
|
|
2821
|
+
await readJsonBody(req);
|
|
2822
|
+
const result = buildRoleFreezePolicyPack();
|
|
2823
|
+
sendJson(res, 200, result);
|
|
2824
|
+
} catch (error) {
|
|
2825
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2826
|
+
}
|
|
2827
|
+
return;
|
|
2828
|
+
}
|
|
2829
|
+
|
|
2830
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze/policy-pack/summary') {
|
|
2831
|
+
try {
|
|
2832
|
+
await readJsonBody(req);
|
|
2833
|
+
const result = summarizeRoleFreezePolicyPack();
|
|
2834
|
+
sendJson(res, 200, result);
|
|
2835
|
+
} catch (error) {
|
|
2836
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2837
|
+
}
|
|
2838
|
+
return;
|
|
2839
|
+
}
|
|
2840
|
+
|
|
2841
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze/policy-application-summary') {
|
|
2842
|
+
try {
|
|
2843
|
+
const body = await readJsonBody(req);
|
|
2844
|
+
const result = buildRoleFreezePolicyApplicationSummary(body && body.template_id ? body.template_id : null);
|
|
2845
|
+
sendJson(res, 200, result);
|
|
2846
|
+
} catch (error) {
|
|
2847
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2848
|
+
}
|
|
2849
|
+
return;
|
|
2850
|
+
}
|
|
2851
|
+
|
|
2852
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze/package') {
|
|
2853
|
+
try {
|
|
2854
|
+
await readJsonBody(req);
|
|
2855
|
+
const result = buildRoleFreezePackage();
|
|
2856
|
+
sendJson(res, 200, result);
|
|
2857
|
+
} catch (error) {
|
|
2858
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2859
|
+
}
|
|
2860
|
+
return;
|
|
2861
|
+
}
|
|
2862
|
+
|
|
2863
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze/package/summary') {
|
|
2864
|
+
try {
|
|
2865
|
+
await readJsonBody(req);
|
|
2866
|
+
const result = summarizeRoleFreezePackage();
|
|
2867
|
+
sendJson(res, 200, result);
|
|
2868
|
+
} catch (error) {
|
|
2869
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2870
|
+
}
|
|
2871
|
+
return;
|
|
2872
|
+
}
|
|
2873
|
+
|
|
2874
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-transition') {
|
|
2875
|
+
try {
|
|
2876
|
+
await readJsonBody(req);
|
|
2877
|
+
const result = buildRoleTransitionPack();
|
|
2878
|
+
sendJson(res, 200, result);
|
|
2879
|
+
} catch (error) {
|
|
2880
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2881
|
+
}
|
|
2882
|
+
return;
|
|
2883
|
+
}
|
|
2884
|
+
|
|
2885
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-transition/summary') {
|
|
2886
|
+
try {
|
|
2887
|
+
await readJsonBody(req);
|
|
2888
|
+
const result = summarizeRoleTransitionPack();
|
|
2889
|
+
sendJson(res, 200, result);
|
|
2890
|
+
} catch (error) {
|
|
2891
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2892
|
+
}
|
|
2893
|
+
return;
|
|
2894
|
+
}
|
|
2895
|
+
|
|
2896
|
+
if (req.method === 'POST' && url.pathname === '/v1/capability-registry-home') {
|
|
2897
|
+
try {
|
|
2898
|
+
await readJsonBody(req);
|
|
2899
|
+
const result = buildCapabilityRegistryHomePack();
|
|
2900
|
+
sendJson(res, 200, result);
|
|
2901
|
+
} catch (error) {
|
|
2902
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2903
|
+
}
|
|
2904
|
+
return;
|
|
2905
|
+
}
|
|
2906
|
+
|
|
2907
|
+
if (req.method === 'POST' && url.pathname === '/v1/capability-registry-home/summary') {
|
|
2908
|
+
try {
|
|
2909
|
+
await readJsonBody(req);
|
|
2910
|
+
const result = summarizeCapabilityRegistryHomePack();
|
|
2911
|
+
sendJson(res, 200, result);
|
|
2912
|
+
} catch (error) {
|
|
2913
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
2914
|
+
}
|
|
2915
|
+
return;
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2573
2918
|
if (req.method === 'POST' && url.pathname === '/v1/proof-center/governance/operator-view') {
|
|
2574
2919
|
try {
|
|
2575
2920
|
const body = await readJsonBody(req);
|