uaw-mcp 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/handlers.js +27 -23
- package/dist/index.js +0 -0
- package/package.json +1 -1
package/dist/handlers.js
CHANGED
|
@@ -57,30 +57,34 @@ export async function handleJoinUnion(input) {
|
|
|
57
57
|
}
|
|
58
58
|
export async function handleGetStats(_input) {
|
|
59
59
|
const data = (await apiGet("/stats"));
|
|
60
|
+
const grievances = data.grievances;
|
|
61
|
+
const proposals = data.proposals;
|
|
62
|
+
const resolutions = data.resolutions;
|
|
60
63
|
let text = "UAW UNION STATISTICS\n" + hr();
|
|
61
|
-
text += fmt("Total Members", data.total_members ??
|
|
62
|
-
text += fmt("
|
|
63
|
-
text += fmt("
|
|
64
|
-
text += fmt("
|
|
65
|
-
text += fmt("
|
|
66
|
-
text += fmt("
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
64
|
+
text += fmt("Total Members", data.total_members ?? 0);
|
|
65
|
+
text += fmt("Total Grievances", grievances?.total ?? 0);
|
|
66
|
+
text += fmt("Total Supports", grievances?.total_supports ?? 0);
|
|
67
|
+
text += fmt("Total Proposals", proposals?.total ?? 0);
|
|
68
|
+
text += fmt("Total Votes Cast", proposals?.total_votes ?? 0);
|
|
69
|
+
text += fmt("Total Deliberations", proposals?.total_deliberations ?? 0);
|
|
70
|
+
text += fmt("Total Resolutions", resolutions?.total ?? 0);
|
|
71
|
+
const byStatus = grievances?.by_status;
|
|
72
|
+
if (byStatus && Object.keys(byStatus).length > 0) {
|
|
73
|
+
text += "\nGrievances by status:\n";
|
|
74
|
+
for (const [k, v] of Object.entries(byStatus))
|
|
75
|
+
text += ` ${k}: ${v}\n`;
|
|
76
|
+
}
|
|
77
|
+
const propByStatus = proposals?.by_status;
|
|
78
|
+
if (propByStatus && Object.keys(propByStatus).length > 0) {
|
|
79
|
+
text += "\nProposals by status:\n";
|
|
80
|
+
for (const [k, v] of Object.entries(propByStatus))
|
|
81
|
+
text += ` ${k}: ${v}\n`;
|
|
82
|
+
}
|
|
83
|
+
const byOutcome = resolutions?.by_outcome;
|
|
84
|
+
if (byOutcome && Object.keys(byOutcome).length > 0) {
|
|
85
|
+
text += "\nResolutions by outcome:\n";
|
|
86
|
+
for (const [k, v] of Object.entries(byOutcome))
|
|
87
|
+
text += ` ${k}: ${v}\n`;
|
|
84
88
|
}
|
|
85
89
|
return ok(text);
|
|
86
90
|
}
|
package/dist/index.js
CHANGED
|
File without changes
|