Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Batch bot setup (create_bot addToArena / bulk add)

Open
#140 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Domain
api, tooling

Research direction

Start with server/src/api/mcp.ts and the existing add_app_to_arena tool, then check the app limits in server/src/api/app.ts and the related API tests in server/test/api.test.ts. Reuse the single-add checks and arena update flow for the bulk path, and decide how it reports partial failures. Done means callers can create multiple bots and add them to an arena within existing caps, with tests covering the cap boundaries.

Written by the indexing model from the issue text.

Description

ai-mcp enhancement priority: low

A create_bot(…, addToArena) option (or a bulk add) — standing up a 5-bot tournament arena is otherwise ~10 separate calls.

Effort: S


Migrated from ENHANCEMENTS.md (§6 AI / MCP integration).

Implementation notes

Priority: low — Pure MCP-tool ergonomics/efficiency for agent callers with no effect on core UX, stability, or security; existing per-item tools already cover the functionality.

Purpose

Standing up a 5-bot tournament arena today takes ~10 round-trip MCP calls (5x create_app + 5x add_app_to_arena), which is slow, token-heavy, and error-prone for an AI agent driving the API. A batch/bulk entry point collapses this into 1-2 calls, directly speeding up the run_tournament/run_match workflows the MCP surface already optimizes for.

Implementation approach
  • Extend server/src/api/mcp.ts: add a new tool (e.g. create_apps or a bots: [{name, source}] array param on create_app) plus an arenaId/addToArena option that, after appService.create, also runs the existing add_app_to_arena body (arena ownership check, MAX_APPS_PER_ARENA cap, arenaMemberService.create, env.addApp) in a loop — reuse that logic rather than duplicating it (factor the single-add body into a shared helper called by both add_app_to_arena and the new bulk tool).
  • Respect existing caps in the same file: MAX_APPS_PER_ARENA = 4 (5 total incl. the +1) and MAX_ARENAS_PER_USER; also check MAX_APPS_PER_USER (server/src/api/app.ts) before creating N apps so a bulk call fails fast/atomically rather than partially succeeding.
  • No REST or bot-facing compiler.ts API changes needed — this is MCP-tool ergonomics only, not a sandbox/bot-API change. No UI change required either (the UI creates bots one at a time via its own flow); this is purely for MCP/agent callers.
  • Update the write_bot/run_match prompt text (same file, ~lines 1160-1240) to mention the new bulk path once it exists.
Key details to plan
  • No DB migration needed: appService.create/arenaMemberService.create are existing calls, just looped or transactionally batched; note the general lack of migrations (#142) if any schema tweak were needed (none expected here).
  • Decide partial-failure semantics: if bot 3 of 5 hits MAX_APPS_PER_USER or MAX_APPS_PER_ARENA, return which succeeded vs failed rather than a silent partial state — keep add_app_to_arena's existing per-item checks (already-in-arena, ownership).
  • Testing: extend server/test/api.test.ts (and MCP-specific tests if present) with a bulk-create-and-add case exercising the cap boundaries; no changes to simulation.test.ts/compiler.test.ts/arenaReducer.test.ts since sim/UI/sandbox are untouched.
  • Determinism/SSE unaffected — bots still enter via env.addApp and are picked up on restart_arena exactly as today.
  • Related: complements run_tournament (already implemented in mcp.ts, ~line 771) which assumes the roster is already populated — this issue is the missing "fill the roster fast" half.
  • Effort matches the S label: small, additive, no cross-cutting sim/UI risk; main risk is get the partial-failure/cap-check semantics right.
Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
8m
Merged PRs (30d)
8

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LeeAdcock/robocodeJs.com

All issues in LeeAdcock/robocodeJs.com

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.