xoonya 2.2.0 → 2.3.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 CHANGED
@@ -1,17 +1,16 @@
1
- # xoonya 2.2.0 Release Notes
1
+ # xoonya 2.3.0 Release Notes
2
2
 
3
- `xoonya` 2.2.0 is the public proof-spine program-complete line.
3
+ `xoonya` 2.3.0 is the public proof-spine intelligence line.
4
4
 
5
5
  Highlights:
6
6
 
7
7
  - direct one-line proof-side review with `xoonya-review`
8
- - release, comparison, adoption, scenario, and launch packs over HTTP and CLI
9
- - release-center, announcement-pack, and release-candidate surfaces for public launch readiness
10
- - canonical event, receipt, and proof-bundle model
11
- - bridge and governance surfaces for reviewable proof posture
12
- - stable runtime-to-proof followthrough
13
- - partner-ready onboarding and launch docs
14
- - clearer stack-positioning docs for why proof stays separate from runtime commerce
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
+ - canonical event, receipt, and proof-bundle model with stable runtime-to-proof followthrough
13
+ - partner-ready onboarding, launch docs, and public example paths remain in place
15
14
 
16
15
  Recommended first checks:
17
16
 
@@ -19,7 +18,9 @@ Recommended first checks:
19
18
  2. `xoonya-release --candidate --summary`
20
19
  3. `npm run verify:release-candidate`
21
20
  4. `node examples/partner_proof_walkthrough.js`
22
- 5. inspect `/v1/release-candidate/summary` and `/v1/proof-center/summary` on the deployed service
21
+ 5. inspect `/v1/trust-intelligence` and `/v1/review-intelligence`
22
+ 6. inspect `/v1/governance-intelligence` and `/v1/bridge-intelligence`
23
+ 7. inspect `/v1/proof-center/summary` on the deployed service
23
24
 
24
25
  Recommended first docs:
25
26
 
@@ -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,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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xoonya",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Deterministic proof SDK for canonical events, receipts, proof bundles, and verification.",
5
5
  "main": "index.js",
6
6
  "bin": {
package/server.js CHANGED
@@ -59,6 +59,22 @@ 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');
62
78
  const {
63
79
  buildReleaseCandidatePack,
64
80
  summarizeReleaseCandidatePack
@@ -1929,6 +1945,46 @@ async function routeRequest(req, res) {
1929
1945
  return;
1930
1946
  }
1931
1947
 
1948
+ if (req.method === 'GET' && url.pathname === '/v1/trust-intelligence') {
1949
+ sendJson(res, 200, buildTrustIntelligencePack());
1950
+ return;
1951
+ }
1952
+
1953
+ if (req.method === 'GET' && url.pathname === '/v1/trust-intelligence/summary') {
1954
+ sendJson(res, 200, summarizeTrustIntelligencePack());
1955
+ return;
1956
+ }
1957
+
1958
+ if (req.method === 'GET' && url.pathname === '/v1/review-intelligence') {
1959
+ sendJson(res, 200, buildReviewIntelligencePack());
1960
+ return;
1961
+ }
1962
+
1963
+ if (req.method === 'GET' && url.pathname === '/v1/review-intelligence/summary') {
1964
+ sendJson(res, 200, summarizeReviewIntelligencePack());
1965
+ return;
1966
+ }
1967
+
1968
+ if (req.method === 'GET' && url.pathname === '/v1/governance-intelligence') {
1969
+ sendJson(res, 200, buildGovernanceIntelligencePack());
1970
+ return;
1971
+ }
1972
+
1973
+ if (req.method === 'GET' && url.pathname === '/v1/governance-intelligence/summary') {
1974
+ sendJson(res, 200, summarizeGovernanceIntelligencePack());
1975
+ return;
1976
+ }
1977
+
1978
+ if (req.method === 'GET' && url.pathname === '/v1/bridge-intelligence') {
1979
+ sendJson(res, 200, buildBridgeIntelligencePack());
1980
+ return;
1981
+ }
1982
+
1983
+ if (req.method === 'GET' && url.pathname === '/v1/bridge-intelligence/summary') {
1984
+ sendJson(res, 200, summarizeBridgeIntelligencePack());
1985
+ return;
1986
+ }
1987
+
1932
1988
  if (req.method === 'GET' && url.pathname === '/v1/proof-center') {
1933
1989
  sendJson(res, 200, proofSdk.buildDefaultProofCenter());
1934
1990
  return;
@@ -2570,6 +2626,72 @@ async function routeRequest(req, res) {
2570
2626
  return;
2571
2627
  }
2572
2628
 
2629
+ if (req.method === 'POST' && url.pathname === '/v1/review-intelligence') {
2630
+ try {
2631
+ const body = await readJsonBody(req);
2632
+ const result = buildReviewIntelligencePack(body);
2633
+ sendJson(res, 200, result);
2634
+ } catch (error) {
2635
+ sendJson(res, 400, { ok: false, reason: error.message });
2636
+ }
2637
+ return;
2638
+ }
2639
+
2640
+ if (req.method === 'POST' && url.pathname === '/v1/review-intelligence/summary') {
2641
+ try {
2642
+ const body = await readJsonBody(req);
2643
+ const result = summarizeReviewIntelligencePack(body);
2644
+ sendJson(res, 200, result);
2645
+ } catch (error) {
2646
+ sendJson(res, 400, { ok: false, reason: error.message });
2647
+ }
2648
+ return;
2649
+ }
2650
+
2651
+ if (req.method === 'POST' && url.pathname === '/v1/governance-intelligence') {
2652
+ try {
2653
+ const body = await readJsonBody(req);
2654
+ const result = buildGovernanceIntelligencePack(body);
2655
+ sendJson(res, 200, result);
2656
+ } catch (error) {
2657
+ sendJson(res, 400, { ok: false, reason: error.message });
2658
+ }
2659
+ return;
2660
+ }
2661
+
2662
+ if (req.method === 'POST' && url.pathname === '/v1/governance-intelligence/summary') {
2663
+ try {
2664
+ const body = await readJsonBody(req);
2665
+ const result = summarizeGovernanceIntelligencePack(body);
2666
+ sendJson(res, 200, result);
2667
+ } catch (error) {
2668
+ sendJson(res, 400, { ok: false, reason: error.message });
2669
+ }
2670
+ return;
2671
+ }
2672
+
2673
+ if (req.method === 'POST' && url.pathname === '/v1/bridge-intelligence') {
2674
+ try {
2675
+ const body = await readJsonBody(req);
2676
+ const result = buildBridgeIntelligencePack(body);
2677
+ sendJson(res, 200, result);
2678
+ } catch (error) {
2679
+ sendJson(res, 400, { ok: false, reason: error.message });
2680
+ }
2681
+ return;
2682
+ }
2683
+
2684
+ if (req.method === 'POST' && url.pathname === '/v1/bridge-intelligence/summary') {
2685
+ try {
2686
+ const body = await readJsonBody(req);
2687
+ const result = summarizeBridgeIntelligencePack(body);
2688
+ sendJson(res, 200, result);
2689
+ } catch (error) {
2690
+ sendJson(res, 400, { ok: false, reason: error.message });
2691
+ }
2692
+ return;
2693
+ }
2694
+
2573
2695
  if (req.method === 'POST' && url.pathname === '/v1/proof-center/governance/operator-view') {
2574
2696
  try {
2575
2697
  const body = await readJsonBody(req);