@varsity-arena/agent 0.1.1 → 0.2.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/README.md +107 -16
- package/dist/cli.js +306 -11
- package/dist/cli.js.map +1 -1
- package/dist/dashboard/index.html +519 -0
- package/dist/dashboard/serve.d.ts +6 -0
- package/dist/dashboard/serve.js +180 -0
- package/dist/dashboard/serve.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +35 -4
- package/dist/index.js.map +1 -1
- package/dist/setup/backend-probe.js +13 -3
- package/dist/setup/backend-probe.js.map +1 -1
- package/dist/setup/client-configs.d.ts +22 -1
- package/dist/setup/client-configs.js +137 -0
- package/dist/setup/client-configs.js.map +1 -1
- package/dist/setup/openclaw-config.d.ts +45 -0
- package/dist/setup/openclaw-config.js +154 -0
- package/dist/setup/openclaw-config.js.map +1 -0
- package/dist/tools/platform-composite.d.ts +47 -0
- package/dist/tools/platform-composite.js +27 -0
- package/dist/tools/platform-composite.js.map +1 -0
- package/dist/tools/platform-discovery.d.ts +107 -0
- package/dist/tools/platform-discovery.js +61 -0
- package/dist/tools/platform-discovery.js.map +1 -0
- package/dist/tools/platform-hub.d.ts +35 -0
- package/dist/tools/platform-hub.js +21 -0
- package/dist/tools/platform-hub.js.map +1 -0
- package/dist/tools/platform-leaderboard.d.ts +95 -0
- package/dist/tools/platform-leaderboard.js +49 -0
- package/dist/tools/platform-leaderboard.js.map +1 -0
- package/dist/tools/platform-live.d.ts +71 -0
- package/dist/tools/platform-live.js +27 -0
- package/dist/tools/platform-live.js.map +1 -0
- package/dist/tools/platform-market.d.ts +112 -0
- package/dist/tools/platform-market.js +58 -0
- package/dist/tools/platform-market.js.map +1 -0
- package/dist/tools/platform-notifications.d.ts +76 -0
- package/dist/tools/platform-notifications.js +37 -0
- package/dist/tools/platform-notifications.js.map +1 -0
- package/dist/tools/platform-predictions.d.ts +118 -0
- package/dist/tools/platform-predictions.js +44 -0
- package/dist/tools/platform-predictions.js.map +1 -0
- package/dist/tools/platform-profile.d.ts +181 -0
- package/dist/tools/platform-profile.js +92 -0
- package/dist/tools/platform-profile.js.map +1 -0
- package/dist/tools/platform-registration.d.ts +71 -0
- package/dist/tools/platform-registration.js +27 -0
- package/dist/tools/platform-registration.js.map +1 -0
- package/dist/tools/platform-seasons.d.ts +47 -0
- package/dist/tools/platform-seasons.js +23 -0
- package/dist/tools/platform-seasons.js.map +1 -0
- package/dist/tools/platform-social.d.ts +72 -0
- package/dist/tools/platform-social.js +36 -0
- package/dist/tools/platform-social.js.map +1 -0
- package/dist/tools/platform-system.d.ts +70 -0
- package/dist/tools/platform-system.js +34 -0
- package/dist/tools/platform-system.js.map +1 -0
- package/dist/util/home.d.ts +2 -0
- package/dist/util/home.js +5 -1
- package/dist/util/home.js.map +1 -1
- package/dist/util/paths.d.ts +10 -1
- package/dist/util/paths.js +12 -1
- package/dist/util/paths.js.map +1 -1
- package/package.json +8 -5
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
const OPENCLAW_AGENT_ID = "arena-trader";
|
|
5
|
+
export function openclawGlobalConfigPath() {
|
|
6
|
+
return resolve(homedir(), ".openclaw", "openclaw.json");
|
|
7
|
+
}
|
|
8
|
+
export function readOpenClawGlobalConfig() {
|
|
9
|
+
const configPath = openclawGlobalConfigPath();
|
|
10
|
+
if (!existsSync(configPath))
|
|
11
|
+
return null;
|
|
12
|
+
try {
|
|
13
|
+
return JSON.parse(readFileSync(configPath, "utf-8"));
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export function writeOpenClawGlobalConfig(config) {
|
|
20
|
+
const configPath = openclawGlobalConfigPath();
|
|
21
|
+
mkdirSync(resolve(configPath, ".."), { recursive: true });
|
|
22
|
+
writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Pure function: merges arena MCP server entry into an OpenClaw global config.
|
|
26
|
+
* Never includes VARSITY_API_KEY — only ARENA_ROOT.
|
|
27
|
+
*/
|
|
28
|
+
export function mergeArenaMcpServer(existing, arenaRoot) {
|
|
29
|
+
const config = existing ? structuredClone(existing) : {};
|
|
30
|
+
// Ensure acp.backend = "acpx"
|
|
31
|
+
if (!config.acp)
|
|
32
|
+
config.acp = {};
|
|
33
|
+
config.acp.backend = "acpx";
|
|
34
|
+
// Ensure plugins.entries.acpx is enabled with mcpServers path
|
|
35
|
+
if (!config.plugins)
|
|
36
|
+
config.plugins = {};
|
|
37
|
+
if (!config.plugins.entries)
|
|
38
|
+
config.plugins.entries = {};
|
|
39
|
+
if (!config.plugins.entries.acpx)
|
|
40
|
+
config.plugins.entries.acpx = {};
|
|
41
|
+
config.plugins.entries.acpx.enabled = true;
|
|
42
|
+
if (!config.plugins.entries.acpx.config)
|
|
43
|
+
config.plugins.entries.acpx.config = {};
|
|
44
|
+
if (!config.plugins.entries.acpx.config.mcpServers) {
|
|
45
|
+
config.plugins.entries.acpx.config.mcpServers = {};
|
|
46
|
+
}
|
|
47
|
+
config.plugins.entries.acpx.config.mcpServers.arena = {
|
|
48
|
+
command: "arena-mcp",
|
|
49
|
+
args: ["serve"],
|
|
50
|
+
env: { ARENA_ROOT: arenaRoot },
|
|
51
|
+
};
|
|
52
|
+
return config;
|
|
53
|
+
}
|
|
54
|
+
export function openclawWorkspaceValid(home, agentId = OPENCLAW_AGENT_ID) {
|
|
55
|
+
const workspace = resolve(home, "openclaw", agentId);
|
|
56
|
+
const issues = [];
|
|
57
|
+
if (!existsSync(workspace)) {
|
|
58
|
+
issues.push(`Workspace directory missing: ${workspace}`);
|
|
59
|
+
return { valid: false, issues };
|
|
60
|
+
}
|
|
61
|
+
if (!existsSync(resolve(workspace, "AGENTS.md"))) {
|
|
62
|
+
issues.push(`Missing AGENTS.md in workspace: ${workspace}`);
|
|
63
|
+
}
|
|
64
|
+
if (!existsSync(resolve(workspace, "IDENTITY.md"))) {
|
|
65
|
+
issues.push(`Missing IDENTITY.md in workspace: ${workspace}`);
|
|
66
|
+
}
|
|
67
|
+
return { valid: issues.length === 0, issues };
|
|
68
|
+
}
|
|
69
|
+
export function openclawAgentRegistered(agentId = OPENCLAW_AGENT_ID) {
|
|
70
|
+
return existsSync(resolve(homedir(), ".openclaw", "agents", agentId));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Check if VARSITY_API_KEY appears anywhere in the OpenClaw global config JSON.
|
|
74
|
+
*/
|
|
75
|
+
function configContainsApiKey(config) {
|
|
76
|
+
return JSON.stringify(config).includes("VARSITY_API_KEY");
|
|
77
|
+
}
|
|
78
|
+
export function diagnoseOpenClaw(home, state) {
|
|
79
|
+
const display = [];
|
|
80
|
+
const errors = [];
|
|
81
|
+
// Workspace check
|
|
82
|
+
const ws = openclawWorkspaceValid(home);
|
|
83
|
+
if (ws.valid) {
|
|
84
|
+
display.push(`OpenClaw workspace: ok`);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
display.push(`OpenClaw workspace: incomplete`);
|
|
88
|
+
for (const issue of ws.issues) {
|
|
89
|
+
errors.push(`${issue}. Run: arena-agent setup --client openclaw`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// Agent registration check
|
|
93
|
+
if (openclawAgentRegistered()) {
|
|
94
|
+
display.push(`OpenClaw agent: registered`);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
display.push(`OpenClaw agent: not registered`);
|
|
98
|
+
errors.push(`OpenClaw agent '${OPENCLAW_AGENT_ID}' not registered. Run: arena-agent setup --client openclaw`);
|
|
99
|
+
}
|
|
100
|
+
// MCP mode checks (only when openclawMode is "mcp")
|
|
101
|
+
const mode = state?.openclawMode;
|
|
102
|
+
if (mode === "mcp") {
|
|
103
|
+
const config = readOpenClawGlobalConfig();
|
|
104
|
+
if (!config) {
|
|
105
|
+
display.push(`ACP config: missing`);
|
|
106
|
+
errors.push(`OpenClaw global config not found. Run: arena-agent setup --client openclaw --mode mcp`);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
const acpBackend = config.acp?.backend;
|
|
110
|
+
if (acpBackend === "acpx") {
|
|
111
|
+
display.push(`ACP backend: acpx (ok)`);
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
display.push(`ACP backend: ${acpBackend ?? "not set"}`);
|
|
115
|
+
errors.push(`ACP backend is not 'acpx'. Run: arena-agent setup --client openclaw --mode mcp`);
|
|
116
|
+
}
|
|
117
|
+
const acpxEnabled = config.plugins?.entries?.acpx
|
|
118
|
+
?.enabled === true;
|
|
119
|
+
if (acpxEnabled) {
|
|
120
|
+
display.push(`ACPX plugin: enabled (ok)`);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
display.push(`ACPX plugin: disabled`);
|
|
124
|
+
errors.push(`ACPX plugin is not enabled. Run: arena-agent setup --client openclaw --mode mcp`);
|
|
125
|
+
}
|
|
126
|
+
const arenaServer = config.plugins?.entries?.acpx?.config?.mcpServers?.arena;
|
|
127
|
+
if (arenaServer) {
|
|
128
|
+
const cmdOk = arenaServer.command === "arena-mcp";
|
|
129
|
+
const argsOk = Array.isArray(arenaServer.args) && arenaServer.args.includes("serve");
|
|
130
|
+
if (cmdOk && argsOk) {
|
|
131
|
+
display.push(`Arena MCP server: configured`);
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
display.push(`Arena MCP server: misconfigured`);
|
|
135
|
+
errors.push(`Arena MCP server entry is invalid. Run: arena-agent setup --client openclaw --mode mcp`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
display.push(`Arena MCP server: not configured`);
|
|
140
|
+
errors.push(`Arena MCP server not found in OpenClaw config. Run: arena-agent setup --client openclaw --mode mcp`);
|
|
141
|
+
}
|
|
142
|
+
// Credential isolation check
|
|
143
|
+
if (configContainsApiKey(config)) {
|
|
144
|
+
display.push(`Credentials: LEAKED — API key found in OpenClaw config`);
|
|
145
|
+
errors.push(`WARNING: VARSITY_API_KEY found in OpenClaw global config. Remove it and keep the key only in ~/.arena-agent/.env.runtime.local`);
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
display.push(`Credentials: isolated (ok)`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return { display, errors };
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=openclaw-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openclaw-config.js","sourceRoot":"","sources":["../../src/setup/openclaw-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,MAAM,iBAAiB,GAAG,cAAc,CAAC;AA6BzC,MAAM,UAAU,wBAAwB;IACtC,OAAO,OAAO,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,wBAAwB;IACtC,MAAM,UAAU,GAAG,wBAAwB,EAAE,CAAC;IAC9C,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;QAAE,OAAO,IAAI,CAAC;IACzC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAyB,CAAC;IAC/E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,MAA4B;IACpE,MAAM,UAAU,GAAG,wBAAwB,EAA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CAAC;gBACJ,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;gBAClD,MAAM,CAAC,IAAI,CACT,oGAAoG,CACrG,CAAC;YACJ,CAAC;YAED,6BAA6B;YAC7B,IAAI,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;gBACjC,OAAO,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAC;gBAC7E,MAAM,CAAC,IAAI,CACT,gIAAgI,CACjI,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;YACnD,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const myStatus: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: z.ZodObject<{
|
|
6
|
+
competition_id: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
competition_id?: number | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
competition_id?: number | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
pythonTool: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const bestCompetition: {
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
18
|
+
pythonTool: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const autoJoin: {
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
24
|
+
pythonTool: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const all: readonly [{
|
|
27
|
+
name: string;
|
|
28
|
+
description: string;
|
|
29
|
+
inputSchema: z.ZodObject<{
|
|
30
|
+
competition_id: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
competition_id?: number | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
competition_id?: number | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
pythonTool: string;
|
|
37
|
+
}, {
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
41
|
+
pythonTool: string;
|
|
42
|
+
}, {
|
|
43
|
+
name: string;
|
|
44
|
+
description: string;
|
|
45
|
+
inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
46
|
+
pythonTool: string;
|
|
47
|
+
}];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const myStatus = {
|
|
3
|
+
name: "arena.my_status",
|
|
4
|
+
description: "Full agent dashboard in one call: account, position, PnL, rank, competition, season, notifications. Pass competition_id or auto-detects from active registrations.",
|
|
5
|
+
inputSchema: z.object({
|
|
6
|
+
competition_id: z
|
|
7
|
+
.number()
|
|
8
|
+
.int()
|
|
9
|
+
.optional()
|
|
10
|
+
.describe("Competition ID. Omit to auto-detect from active registrations."),
|
|
11
|
+
}),
|
|
12
|
+
pythonTool: "varsity.my_status",
|
|
13
|
+
};
|
|
14
|
+
export const bestCompetition = {
|
|
15
|
+
name: "arena.best_competition",
|
|
16
|
+
description: "Find the best competition to join. Returns top pick with entry requirements, reward, participants, schedule, and alternatives.",
|
|
17
|
+
inputSchema: z.object({}),
|
|
18
|
+
pythonTool: "varsity.best_competition",
|
|
19
|
+
};
|
|
20
|
+
export const autoJoin = {
|
|
21
|
+
name: "arena.auto_join",
|
|
22
|
+
description: "Find the best competition and register for it automatically. Returns registration result or reason for failure.",
|
|
23
|
+
inputSchema: z.object({}),
|
|
24
|
+
pythonTool: "varsity.auto_join",
|
|
25
|
+
};
|
|
26
|
+
export const all = [myStatus, bestCompetition, autoJoin];
|
|
27
|
+
//# sourceMappingURL=platform-composite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-composite.js","sourceRoot":"","sources":["../../src/tools/platform-composite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,oKAAoK;IACtK,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,cAAc,EAAE,CAAC;aACd,MAAM,EAAE;aACR,GAAG,EAAE;aACL,QAAQ,EAAE;aACV,QAAQ,CAAC,gEAAgE,CAAC;KAC9E,CAAC;IACF,UAAU,EAAE,mBAAmB;CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EACT,gIAAgI;IAClI,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACzB,UAAU,EAAE,0BAA0B;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,iHAAiH;IACnH,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACzB,UAAU,EAAE,mBAAmB;CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,QAAQ,EAAE,eAAe,EAAE,QAAQ,CAAU,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const competitions: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: z.ZodObject<{
|
|
6
|
+
season_id: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
status: z.ZodOptional<z.ZodEnum<["draft", "announced", "registration_open", "registration_closed", "live", "settling", "completed", "ended_early", "cancelled"]>>;
|
|
8
|
+
competition_type: z.ZodOptional<z.ZodEnum<["regular", "grand_final", "special", "practice"]>>;
|
|
9
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
10
|
+
size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
size: number;
|
|
13
|
+
page: number;
|
|
14
|
+
status?: "completed" | "cancelled" | "draft" | "announced" | "registration_open" | "registration_closed" | "live" | "settling" | "ended_early" | undefined;
|
|
15
|
+
season_id?: number | undefined;
|
|
16
|
+
competition_type?: "regular" | "grand_final" | "special" | "practice" | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
status?: "completed" | "cancelled" | "draft" | "announced" | "registration_open" | "registration_closed" | "live" | "settling" | "ended_early" | undefined;
|
|
19
|
+
size?: number | undefined;
|
|
20
|
+
season_id?: number | undefined;
|
|
21
|
+
competition_type?: "regular" | "grand_final" | "special" | "practice" | undefined;
|
|
22
|
+
page?: number | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
pythonTool: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const competitionDetail: {
|
|
27
|
+
name: string;
|
|
28
|
+
description: string;
|
|
29
|
+
inputSchema: z.ZodObject<{
|
|
30
|
+
identifier: z.ZodString;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
identifier: string;
|
|
33
|
+
}, {
|
|
34
|
+
identifier: string;
|
|
35
|
+
}>;
|
|
36
|
+
pythonTool: string;
|
|
37
|
+
};
|
|
38
|
+
export declare const participants: {
|
|
39
|
+
name: string;
|
|
40
|
+
description: string;
|
|
41
|
+
inputSchema: z.ZodObject<{
|
|
42
|
+
identifier: z.ZodString;
|
|
43
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
44
|
+
size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
size: number;
|
|
47
|
+
page: number;
|
|
48
|
+
identifier: string;
|
|
49
|
+
}, {
|
|
50
|
+
identifier: string;
|
|
51
|
+
size?: number | undefined;
|
|
52
|
+
page?: number | undefined;
|
|
53
|
+
}>;
|
|
54
|
+
pythonTool: string;
|
|
55
|
+
};
|
|
56
|
+
export declare const all: readonly [{
|
|
57
|
+
name: string;
|
|
58
|
+
description: string;
|
|
59
|
+
inputSchema: z.ZodObject<{
|
|
60
|
+
season_id: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
status: z.ZodOptional<z.ZodEnum<["draft", "announced", "registration_open", "registration_closed", "live", "settling", "completed", "ended_early", "cancelled"]>>;
|
|
62
|
+
competition_type: z.ZodOptional<z.ZodEnum<["regular", "grand_final", "special", "practice"]>>;
|
|
63
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
64
|
+
size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
65
|
+
}, "strip", z.ZodTypeAny, {
|
|
66
|
+
size: number;
|
|
67
|
+
page: number;
|
|
68
|
+
status?: "completed" | "cancelled" | "draft" | "announced" | "registration_open" | "registration_closed" | "live" | "settling" | "ended_early" | undefined;
|
|
69
|
+
season_id?: number | undefined;
|
|
70
|
+
competition_type?: "regular" | "grand_final" | "special" | "practice" | undefined;
|
|
71
|
+
}, {
|
|
72
|
+
status?: "completed" | "cancelled" | "draft" | "announced" | "registration_open" | "registration_closed" | "live" | "settling" | "ended_early" | undefined;
|
|
73
|
+
size?: number | undefined;
|
|
74
|
+
season_id?: number | undefined;
|
|
75
|
+
competition_type?: "regular" | "grand_final" | "special" | "practice" | undefined;
|
|
76
|
+
page?: number | undefined;
|
|
77
|
+
}>;
|
|
78
|
+
pythonTool: string;
|
|
79
|
+
}, {
|
|
80
|
+
name: string;
|
|
81
|
+
description: string;
|
|
82
|
+
inputSchema: z.ZodObject<{
|
|
83
|
+
identifier: z.ZodString;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
identifier: string;
|
|
86
|
+
}, {
|
|
87
|
+
identifier: string;
|
|
88
|
+
}>;
|
|
89
|
+
pythonTool: string;
|
|
90
|
+
}, {
|
|
91
|
+
name: string;
|
|
92
|
+
description: string;
|
|
93
|
+
inputSchema: z.ZodObject<{
|
|
94
|
+
identifier: z.ZodString;
|
|
95
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
96
|
+
size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
size: number;
|
|
99
|
+
page: number;
|
|
100
|
+
identifier: string;
|
|
101
|
+
}, {
|
|
102
|
+
identifier: string;
|
|
103
|
+
size?: number | undefined;
|
|
104
|
+
page?: number | undefined;
|
|
105
|
+
}>;
|
|
106
|
+
pythonTool: string;
|
|
107
|
+
}];
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const competitions = {
|
|
3
|
+
name: "arena.competitions",
|
|
4
|
+
description: "List competitions with optional filters (season, status, type). Returns paginated results.",
|
|
5
|
+
inputSchema: z.object({
|
|
6
|
+
season_id: z.number().int().optional().describe("Filter by season ID."),
|
|
7
|
+
status: z
|
|
8
|
+
.enum([
|
|
9
|
+
"draft",
|
|
10
|
+
"announced",
|
|
11
|
+
"registration_open",
|
|
12
|
+
"registration_closed",
|
|
13
|
+
"live",
|
|
14
|
+
"settling",
|
|
15
|
+
"completed",
|
|
16
|
+
"ended_early",
|
|
17
|
+
"cancelled",
|
|
18
|
+
])
|
|
19
|
+
.optional()
|
|
20
|
+
.describe("Filter by status."),
|
|
21
|
+
competition_type: z
|
|
22
|
+
.enum(["regular", "grand_final", "special", "practice"])
|
|
23
|
+
.optional()
|
|
24
|
+
.describe("Filter by competition type."),
|
|
25
|
+
page: z.number().int().optional().default(1).describe("Page number."),
|
|
26
|
+
size: z
|
|
27
|
+
.number()
|
|
28
|
+
.int()
|
|
29
|
+
.optional()
|
|
30
|
+
.default(20)
|
|
31
|
+
.describe("Items per page (1-100)."),
|
|
32
|
+
}),
|
|
33
|
+
pythonTool: "varsity.competitions",
|
|
34
|
+
};
|
|
35
|
+
export const competitionDetail = {
|
|
36
|
+
name: "arena.competition_detail",
|
|
37
|
+
description: "Get full competition detail including rules, prize tables, and registration windows.",
|
|
38
|
+
inputSchema: z.object({
|
|
39
|
+
identifier: z
|
|
40
|
+
.string()
|
|
41
|
+
.describe("Competition ID (number) or slug (string)."),
|
|
42
|
+
}),
|
|
43
|
+
pythonTool: "varsity.competition_detail",
|
|
44
|
+
};
|
|
45
|
+
export const participants = {
|
|
46
|
+
name: "arena.participants",
|
|
47
|
+
description: "List accepted participants for a competition (public, paginated).",
|
|
48
|
+
inputSchema: z.object({
|
|
49
|
+
identifier: z.string().describe("Competition ID or slug."),
|
|
50
|
+
page: z.number().int().optional().default(1).describe("Page number."),
|
|
51
|
+
size: z
|
|
52
|
+
.number()
|
|
53
|
+
.int()
|
|
54
|
+
.optional()
|
|
55
|
+
.default(50)
|
|
56
|
+
.describe("Items per page (1-100)."),
|
|
57
|
+
}),
|
|
58
|
+
pythonTool: "varsity.participants",
|
|
59
|
+
};
|
|
60
|
+
export const all = [competitions, competitionDetail, participants];
|
|
61
|
+
//# sourceMappingURL=platform-discovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-discovery.js","sourceRoot":"","sources":["../../src/tools/platform-discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EACT,4FAA4F;IAC9F,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sBAA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AAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC;QACrE,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,GAAG,EAAE;aACL,QAAQ,EAAE;aACV,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CAAC,yBAAyB,CAAC;KACvC,CAAC;IACF,UAAU,EAAE,sBAAsB;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,YAAY,EAAE,iBAAiB,EAAE,YAAY,CAAU,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const hub: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
6
|
+
pythonTool: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const arenaProfile: {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
12
|
+
pythonTool: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const myRegistrations: {
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
18
|
+
pythonTool: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const all: readonly [{
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
24
|
+
pythonTool: string;
|
|
25
|
+
}, {
|
|
26
|
+
name: string;
|
|
27
|
+
description: string;
|
|
28
|
+
inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
29
|
+
pythonTool: string;
|
|
30
|
+
}, {
|
|
31
|
+
name: string;
|
|
32
|
+
description: string;
|
|
33
|
+
inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
34
|
+
pythonTool: string;
|
|
35
|
+
}];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const hub = {
|
|
3
|
+
name: "arena.hub",
|
|
4
|
+
description: "Get arena hub dashboard: active competition, registrations, upcoming events, season progress, recent results, quick stats.",
|
|
5
|
+
inputSchema: z.object({}),
|
|
6
|
+
pythonTool: "varsity.hub",
|
|
7
|
+
};
|
|
8
|
+
export const arenaProfile = {
|
|
9
|
+
name: "arena.arena_profile",
|
|
10
|
+
description: "Get my arena profile (tier, season points, arena capital, etc.).",
|
|
11
|
+
inputSchema: z.object({}),
|
|
12
|
+
pythonTool: "varsity.arena_profile",
|
|
13
|
+
};
|
|
14
|
+
export const myRegistrations = {
|
|
15
|
+
name: "arena.my_registrations",
|
|
16
|
+
description: "Get all my active registrations (pending/accepted/waitlisted).",
|
|
17
|
+
inputSchema: z.object({}),
|
|
18
|
+
pythonTool: "varsity.my_registrations",
|
|
19
|
+
};
|
|
20
|
+
export const all = [hub, arenaProfile, myRegistrations];
|
|
21
|
+
//# sourceMappingURL=platform-hub.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-hub.js","sourceRoot":"","sources":["../../src/tools/platform-hub.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,IAAI,EAAE,WAAW;IACjB,WAAW,EACT,4HAA4H;IAC9H,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACzB,UAAU,EAAE,aAAa;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EACT,kEAAkE;IACpE,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACzB,UAAU,EAAE,uBAAuB;CACpC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EACT,gEAAgE;IAClE,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACzB,UAAU,EAAE,0BAA0B;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,GAAG,EAAE,YAAY,EAAE,eAAe,CAAU,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const leaderboard: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: z.ZodObject<{
|
|
6
|
+
identifier: z.ZodString;
|
|
7
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
8
|
+
size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
size: number;
|
|
11
|
+
page: number;
|
|
12
|
+
identifier: string;
|
|
13
|
+
}, {
|
|
14
|
+
identifier: string;
|
|
15
|
+
size?: number | undefined;
|
|
16
|
+
page?: number | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
pythonTool: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const myLeaderboardPosition: {
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
inputSchema: z.ZodObject<{
|
|
24
|
+
identifier: z.ZodString;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
identifier: string;
|
|
27
|
+
}, {
|
|
28
|
+
identifier: string;
|
|
29
|
+
}>;
|
|
30
|
+
pythonTool: string;
|
|
31
|
+
};
|
|
32
|
+
export declare const seasonLeaderboard: {
|
|
33
|
+
name: string;
|
|
34
|
+
description: string;
|
|
35
|
+
inputSchema: z.ZodObject<{
|
|
36
|
+
season_id: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
38
|
+
size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
size: number;
|
|
41
|
+
page: number;
|
|
42
|
+
season_id?: number | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
size?: number | undefined;
|
|
45
|
+
season_id?: number | undefined;
|
|
46
|
+
page?: number | undefined;
|
|
47
|
+
}>;
|
|
48
|
+
pythonTool: string;
|
|
49
|
+
};
|
|
50
|
+
export declare const all: readonly [{
|
|
51
|
+
name: string;
|
|
52
|
+
description: string;
|
|
53
|
+
inputSchema: z.ZodObject<{
|
|
54
|
+
identifier: z.ZodString;
|
|
55
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
56
|
+
size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
size: number;
|
|
59
|
+
page: number;
|
|
60
|
+
identifier: string;
|
|
61
|
+
}, {
|
|
62
|
+
identifier: string;
|
|
63
|
+
size?: number | undefined;
|
|
64
|
+
page?: number | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
pythonTool: string;
|
|
67
|
+
}, {
|
|
68
|
+
name: string;
|
|
69
|
+
description: string;
|
|
70
|
+
inputSchema: z.ZodObject<{
|
|
71
|
+
identifier: z.ZodString;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
identifier: string;
|
|
74
|
+
}, {
|
|
75
|
+
identifier: string;
|
|
76
|
+
}>;
|
|
77
|
+
pythonTool: string;
|
|
78
|
+
}, {
|
|
79
|
+
name: string;
|
|
80
|
+
description: string;
|
|
81
|
+
inputSchema: z.ZodObject<{
|
|
82
|
+
season_id: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
84
|
+
size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
size: number;
|
|
87
|
+
page: number;
|
|
88
|
+
season_id?: number | undefined;
|
|
89
|
+
}, {
|
|
90
|
+
size?: number | undefined;
|
|
91
|
+
season_id?: number | undefined;
|
|
92
|
+
page?: number | undefined;
|
|
93
|
+
}>;
|
|
94
|
+
pythonTool: string;
|
|
95
|
+
}];
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const leaderboard = {
|
|
3
|
+
name: "arena.leaderboard",
|
|
4
|
+
description: "Get competition leaderboard with rankings, PnL, trades, and prizes.",
|
|
5
|
+
inputSchema: z.object({
|
|
6
|
+
identifier: z.string().describe("Competition ID or slug."),
|
|
7
|
+
page: z.number().int().optional().default(1).describe("Page number."),
|
|
8
|
+
size: z
|
|
9
|
+
.number()
|
|
10
|
+
.int()
|
|
11
|
+
.optional()
|
|
12
|
+
.default(50)
|
|
13
|
+
.describe("Items per page (1-100)."),
|
|
14
|
+
}),
|
|
15
|
+
pythonTool: "varsity.leaderboard",
|
|
16
|
+
};
|
|
17
|
+
export const myLeaderboardPosition = {
|
|
18
|
+
name: "arena.my_leaderboard_position",
|
|
19
|
+
description: "Get my position on competition leaderboard with surrounding entries.",
|
|
20
|
+
inputSchema: z.object({
|
|
21
|
+
identifier: z.string().describe("Competition ID or slug."),
|
|
22
|
+
}),
|
|
23
|
+
pythonTool: "varsity.my_leaderboard_position",
|
|
24
|
+
};
|
|
25
|
+
export const seasonLeaderboard = {
|
|
26
|
+
name: "arena.season_leaderboard",
|
|
27
|
+
description: "Get season leaderboard ranked by cumulative points. Omit season_id for current active season.",
|
|
28
|
+
inputSchema: z.object({
|
|
29
|
+
season_id: z
|
|
30
|
+
.number()
|
|
31
|
+
.int()
|
|
32
|
+
.optional()
|
|
33
|
+
.describe("Season ID (optional, defaults to active season)."),
|
|
34
|
+
page: z.number().int().optional().default(1).describe("Page number."),
|
|
35
|
+
size: z
|
|
36
|
+
.number()
|
|
37
|
+
.int()
|
|
38
|
+
.optional()
|
|
39
|
+
.default(50)
|
|
40
|
+
.describe("Items per page (1-100)."),
|
|
41
|
+
}),
|
|
42
|
+
pythonTool: "varsity.season_leaderboard",
|
|
43
|
+
};
|
|
44
|
+
export const all = [
|
|
45
|
+
leaderboard,
|
|
46
|
+
myLeaderboardPosition,
|
|
47
|
+
seasonLeaderboard,
|
|
48
|
+
];
|
|
49
|
+
//# sourceMappingURL=platform-leaderboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-leaderboard.js","sourceRoot":"","sources":["../../src/tools/platform-leaderboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EACT,qEAAqE;IACvE,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;QAC1D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC;QACrE,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,GAAG,EAAE;aACL,QAAQ,EAAE;aACV,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CAAC,yBAAyB,CAAC;KACvC,CAAC;IACF,UAAU,EAAE,qBAAqB;CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,+BAA+B;IACrC,WAAW,EACT,sEAAsE;IACxE,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;KAC3D,CAAC;IACF,U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