Reject invalid framework/game combinations and offer a multi-framework bridge

オープン
#58 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
lua, python
領域
tooling

調査の方向性

Start in mcp-server/tools/manifest_common.py at VALID_* and validate_inputs (around lines 21-44) to see how framework, game and language are checked independently. The templates/qbox and templates/vorp fxmanifest.lua headers state the game pinning rule that should become a FRAMEWORK_GAMES map. Run the MCP server per the issue and confirm vorp+gta5 and qbox+rdr3 are rejected while valid combinations still pass. The bridge part (snippets/lua/framework-bridge.lua) is larger design work and can be split out.

索引モデルが issue の本文から書いたものです。

説明

enhancement severity: medium

Summary

validate_inputs checks game, language and framework independently, so the scaffold and manifest tools accept combinations that cannot load, such as framework="vorp", game="gta5" or framework="qbox", game="rdr3". There is also no scaffold option for a multi-framework bridge, which is how many public resources are built.

Where

  • mcp-server/tools/manifest_common.py:21-44 (VALID_*, validate_inputs)
  • templates/qbox/fxmanifest.lua:2 (games { 'gta5' } -- Qbox is FiveM-only), templates/vorp/fxmanifest.lua:2
  • examples/*/server/main.lua:1-15 (hand-written ESX/QB bridge, repeated per example)
  • mcp-server/server.py:45 (framework docstring)

Details

  • The repo's own templates pin ESX/QBCore/Qbox/ox_core to gta5 and VORP/RSG to rdr3, but this rule lives only in template comments.
  • The only multi-framework pattern is a hand-written GetResourceState(...) == 'started' bridge repeated in the examples, covering ESX and QB only. The scaffold can target only one framework.

Impact

The agent can generate resources that depend on a core that does not exist for the chosen game. Authors of publicly released resources, which commonly support several frameworks, get no scaffolding help.

Suggested fix

  • Add a FRAMEWORK_GAMES map (esx, qbcore, qbox, oxcore: gta5; vorp, rsg: rdr3; standalone: any) and return an error (or a clear warning) from validate_inputs for mismatches, including game="both" with a single-game framework.
  • Add framework="bridge" to the scaffold, plus a snippets/lua/framework-bridge.lua, generating a bridge/ module with GetPlayer, AddMoney, RemoveMoney and Notify for the supported frameworks, selected at runtime with GetResourceState.

Acceptance criteria

  • scaffold_resource_tool and generate_manifest_tool reject (or warn on) vorp + gta5 and qbox + rdr3.
  • Valid combinations are unchanged.
  • A bridge scaffold produces a resource that loads under at least ESX, QBCore and standalone.

Getting started

  • Relevant files: mcp-server/tools/manifest_common.py, mcp-server/tools/scaffold.py, snippets/lua/
  • How to run checks: there is no test suite yet; run the MCP server with cd mcp-server && pip install -r requirements.txt && python server.py, and CI checks live in .github/workflows/validate.yml
  • Related docs: skills/framework-detection/SKILL.md, skills/resource-scaffolding/SKILL.md

Filed by repo-audit/full-audit at 701824d. Severity: medium. Effort: S. audit-key: enhancement|mcp-server/tools/manifest_common.py|validate_inputs

主要言語
Python
スター
7
フォーク
4
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TMHSDigital/CFX-Developer-Tools のほかの issue

TMHSDigital/CFX-Developer-Tools の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。