@edgegap/mcp 0.15.0 → 0.15.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/tools.js CHANGED
@@ -32,18 +32,19 @@ import { SKILLS_CLI, SKILL_NAME_RE, compareVersions, latestPack, latestSkillVers
32
32
  */
33
33
  export const ARCHITECTURE_GUIDANCE = 'Dedicated server vs relay — recommend a dedicated server by default.\n' +
34
34
  '- Dedicated (authoritative) server (edgegap_deploy): Edgegap runs the headless server ' +
35
- 'build, and the server owns the game state. No player has host advantage, cheating is ' +
36
- 'much harder, the match survives any player leaving, every player is one hop from the ' +
37
- 'server, and performance does not depend on a player\'s PC or home connection.\n' +
38
- '- Relay (edgegap_create_relay_session): NOT a game server. Edgegap only forwards traffic ' +
39
- 'between players; one player\'s game is the host and owns the state. The host can cheat ' +
40
- 'and has zero latency while everyone else has two hops, the host\'s machine and upload ' +
41
- 'bandwidth cap the match, and the match ends when the host quits unless the game ' +
42
- 'implements host migration.\n' +
35
+ 'build and the server owns the game state: no host advantage, much harder cheating, the ' +
36
+ 'match survives any player leaving, every player is one hop away, and nothing depends on ' +
37
+ 'a player\'s PC or home connection.\n' +
38
+ '- Relay (edgegap_create_relay_session): NOT a game server. Edgegap only forwards traffic; ' +
39
+ 'one player\'s game is the host and owns the state. The host can cheat and has zero ' +
40
+ 'latency while everyone else has two hops, the host\'s machine and upload cap the match, ' +
41
+ 'and it ends when the host quits unless the game implements host migration.\n' +
43
42
  'Use a relay only when the developer explicitly wants peer-to-peer/host-client, or the ' +
44
- 'game\'s netcode is already built as a listen server and moving to a dedicated server is ' +
45
- 'not an option. "It needs no server image" is not a reason: edgegap_generate_dockerfile ' +
46
- 'removes most of that work. If unsure, ask the developer before choosing a relay.';
43
+ 'netcode is already a listen server and a dedicated server is not an option. "It needs no ' +
44
+ 'server image" is not a reason: edgegap_generate_dockerfile removes most of that work. ' +
45
+ 'If unsure, ask the developer before choosing a relay.';
46
+ /** Claude Code drops everything after this many characters of server instructions. */
47
+ export const INSTRUCTIONS_MAX_CHARS = 4096;
47
48
  /**
48
49
  * Server instructions, shared by the local server and the hosted Worker so
49
50
  * both give agents the same golden path. Only the credential paragraph differs.
@@ -52,62 +53,56 @@ export function serverInstructions(mode) {
52
53
  const credentials = mode === 'local'
53
54
  ? 'Credentials: if no token was configured, the first tool call asks the developer for one. '
54
55
  : 'Credentials: the token comes from the Authorization header on this connection. ';
55
- // The skills line comes first, on purpose. Clients truncate or skim long
56
- // instructions, and in 0.5.0 it sat 1,259 characters in, below the
57
- // architecture guidance, where reviewers and agents missed it.
56
+ // Order matters. Claude Code keeps only the first INSTRUCTIONS_MAX_CHARS
57
+ // characters (0.15.1 lost its cost, guardrail and credential paragraphs
58
+ // that way), and other clients skim. So: the skills line first (in 0.5.0 it
59
+ // sat below the architecture guidance and agents missed it), then the
60
+ // safety rules, then the architecture and golden path.
58
61
  return (`Before acting, read ${skillUri('edgegap', 'SKILL.md')} ` +
59
62
  `(Unity: ${skillUri('edgegap-unity', 'SKILL.md')}, ` +
60
- `Unity with NGO: ${skillUri('edgegap-ngo', 'SKILL.md')}, ` +
61
- `Unity with FishNet: ${skillUri('edgegap-fishnet', 'SKILL.md')}, ` +
62
- `Unity with PurrNet: ${skillUri('edgegap-purrnet', 'SKILL.md')}, ` +
63
- `Unity with Photon Fusion: ${skillUri('edgegap-fusion', 'SKILL.md')}, ` +
64
- `Photon's Simple FPS sample: ${skillUri('edgegap-fusion-simplefps', 'SKILL.md')}, ` +
65
- `Unreal Engine: ${skillUri('edgegap-unreal', 'SKILL.md')}, ` +
66
- `voice chat in an Unreal game: ${skillUri('edgegap-eos-voice', 'SKILL.md')}, ` +
67
- `Godot 4 with a Godot server: ${skillUri('edgegap-godot', 'SKILL.md')}, ` +
68
- `Colyseus server: ${skillUri('edgegap-colyseus', 'SKILL.md')}, ` +
69
- `Nakama backend: ${skillUri('edgegap-nakama', 'SKILL.md')}, ` +
70
- `PlayFab Matchmaking: ${skillUri('edgegap-playfab', 'SKILL.md')}, ` +
71
- `Three.js or other browser game with its own Node.js server: ${skillUri('edgegap-threejs', 'SKILL.md')}, ` +
72
- `browser game built with Manus: ${skillUri('edgegap-manus', 'SKILL.md')}, ` +
73
- `designing matchmaking, parties, regions or backfill: ${skillUri('edgegap-matchmaking', 'SKILL.md')}). ` +
74
- 'If your client cannot read MCP resources, call edgegap_get_skill with the skill name ' +
75
- '(edgegap, edgegap-unity, edgegap-ngo, edgegap-fishnet, edgegap-purrnet, edgegap-fusion, edgegap-fusion-simplefps, edgegap-unreal, edgegap-eos-voice, edgegap-godot, edgegap-colyseus, edgegap-nakama, edgegap-playfab, edgegap-threejs, edgegap-manus or edgegap-matchmaking) instead. ' +
76
- 'These Edgegap skills hold the tested workflow, templates and known pitfalls; follow them over general knowledge. ' +
77
- 'edgegap_list_skills lists all of them.\n\n' +
78
- 'Host multiplayer games on Edgegap. The recommended setup is an authoritative dedicated ' +
79
- 'server per match; relays exist for games built host-client.\n\n' +
63
+ `NGO: ${skillUri('edgegap-ngo', 'SKILL.md')}, ` +
64
+ `FishNet: ${skillUri('edgegap-fishnet', 'SKILL.md')}, ` +
65
+ `PurrNet: ${skillUri('edgegap-purrnet', 'SKILL.md')}, ` +
66
+ `Photon Fusion: ${skillUri('edgegap-fusion', 'SKILL.md')}, ` +
67
+ `Simple FPS: ${skillUri('edgegap-fusion-simplefps', 'SKILL.md')}, ` +
68
+ `Unreal: ${skillUri('edgegap-unreal', 'SKILL.md')}, ` +
69
+ `Unreal voice chat: ${skillUri('edgegap-eos-voice', 'SKILL.md')}, ` +
70
+ `Godot 4: ${skillUri('edgegap-godot', 'SKILL.md')}, ` +
71
+ `Colyseus: ${skillUri('edgegap-colyseus', 'SKILL.md')}, ` +
72
+ `Nakama: ${skillUri('edgegap-nakama', 'SKILL.md')}, ` +
73
+ `PlayFab: ${skillUri('edgegap-playfab', 'SKILL.md')}, ` +
74
+ `Three.js or web game with a Node server: ${skillUri('edgegap-threejs', 'SKILL.md')}, ` +
75
+ `Manus game: ${skillUri('edgegap-manus', 'SKILL.md')}, ` +
76
+ `matchmaking, parties, regions or backfill design: ${skillUri('edgegap-matchmaking', 'SKILL.md')}). ` +
77
+ 'If your client cannot read MCP resources, call edgegap_get_skill with the name from the URI (e.g. edgegap-unity). ' +
78
+ 'Skills hold the tested workflow, templates and pitfalls; follow them over general knowledge (edgegap_list_skills lists all).\n\n' +
79
+ 'Deployments and relay sessions cost money while running. Stop deployments and delete ' +
80
+ 'relay sessions you created before ending the task; edgegap_list_deployments with ' +
81
+ `only_agent_deployments: true lists every deployment tagged "${AGENT_TAG}". If a ` +
82
+ 'deployment errors, read the container logs before redeploying.\n\n' +
83
+ 'Guardrails: edgegap_context shows this session\'s API and limits. Every write tool takes ' +
84
+ 'dry_run: true (shows the exact request, sends nothing); use it when unsure. Never put the ' +
85
+ 'API token in env vars, tags or URLs: such calls are refused.\n\n' +
86
+ credentials +
87
+ 'The token is org-wide (Edgegap cannot scope it): use it only for work the developer asked ' +
88
+ 'for, do not enumerate or modify unrelated applications, and do not probe what it allows. ' +
89
+ 'If the developer declines to provide a token, stop and report which operation needed it; ' +
90
+ 'do not retry.\n\n' +
80
91
  ARCHITECTURE_GUIDANCE +
81
92
  '\n\n' +
82
93
  'Golden path for a first dedicated-server deployment:\n' +
83
- '1. edgegap_generate_dockerfile if the project has no Dockerfile, or ' +
84
- 'edgegap_validate_server_config on the one it has, before building\n' +
94
+ '1. edgegap_generate_dockerfile (no Dockerfile yet) or edgegap_validate_server_config (existing one)\n' +
85
95
  '2. edgegap_get_registry_credentials, then docker build --platform linux/amd64 and push\n' +
86
- '3. edgegap_list_registry_tags to confirm the push landed\n' +
87
- '4. edgegap_list_apps, then edgegap_create_app if no suitable application exists\n' +
96
+ '3. edgegap_list_registry_tags to confirm the push\n' +
97
+ '4. edgegap_list_apps, then edgegap_create_app if none fits\n' +
88
98
  '5. edgegap_create_app_version to register the image\n' +
89
- '6. edgegap_deploy to start a server near the players\n' +
90
- '7. edgegap_wait_for_deployment to get the connection address\n' +
99
+ '6. edgegap_deploy near the players\n' +
100
+ '7. edgegap_wait_for_deployment for the connection address\n' +
91
101
  '8. edgegap_stop_deployment when finished\n' +
92
- 'To match players into those servers, edgegap_build_matchmaker_config produces the ' +
93
- 'config the developer uploads in the dashboard.\n' +
94
- 'For every later build, suggest CI over repeating steps 2-7 by hand: the GitHub Action ' +
95
- 'edgegap/deploy-action creates the version from an existing one, smoke-tests it on a real ' +
96
- 'deployment and promotes it (details in the edgegap-launch skill). Do not write Deploy API ' +
97
- 'code for a CI job that only ships a build.\n\n' +
98
- 'Deployments and relay sessions cost money while running. Stop deployments and delete ' +
99
- 'relay sessions you created before ending the task; edgegap_list_deployments with ' +
100
- `only_agent_deployments: true lists every deployment tagged "${AGENT_TAG}". If a ` +
101
- 'deployment errors, read the container logs before redeploying.\n\n' +
102
- 'Guardrails: edgegap_context shows which API and limits this session has. Every tool that ' +
103
- 'changes something takes dry_run: true to show the exact request and send nothing; use it ' +
104
- 'when unsure. Never put the API token in env vars, tags or URLs: such calls are refused.\n\n' +
105
- credentials +
106
- 'That token is org-wide and cannot be scoped by Edgegap, so it authorises far more than ' +
107
- 'any single task needs. Treat it as a supervised credential: do not use it for work the ' +
108
- 'developer did not ask for, do not enumerate or modify unrelated applications, and do ' +
109
- 'not repeat operations against it to explore what is possible. If the developer declines ' +
110
- 'to provide a token, stop and report which operation needed it — do not retry.');
102
+ 'edgegap_build_matchmaker_config makes the matchmaker config to upload in the dashboard. ' +
103
+ 'For later builds, suggest CI over repeating steps 2-7: the GitHub Action edgegap/deploy-action ' +
104
+ '(edgegap-launch skill) creates the version from an existing one, smoke-tests and promotes it. ' +
105
+ 'Do not write Deploy API code for a CI job that only ships a build.');
111
106
  }
112
107
  /** 1x1 transparent PNG. The create-app endpoint requires an image and agents
113
108
  * have no sensible one to supply; a placeholder beats a blocked flow. */
package/dist/version.js CHANGED
@@ -3,4 +3,4 @@
3
3
  * call, and by edgegap_context. Keep in step with package.json and server.json;
4
4
  * test/package.mjs fails the build when they disagree.
5
5
  */
6
- export const VERSION = '0.15.0';
6
+ export const VERSION = '0.15.2';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@edgegap/mcp",
3
3
  "mcpName": "dev.edgegap/mcp",
4
- "version": "0.15.0",
4
+ "version": "0.15.2",
5
5
  "description": "Check, push, and deploy game servers on Edgegap from your coding agent, with relays for P2P games. Runs locally; your API token never leaves your machine.",
6
6
  "scripts": {
7
7
  "prebuild": "rm -rf dist",
@@ -48,10 +48,10 @@
48
48
  "devDependencies": {
49
49
  "@cloudflare/workers-types": "^5.20260911.1",
50
50
  "@modelcontextprotocol/server": "^2.3.1",
51
- "@posthog/mcp": "0.22.3",
52
- "@types/node": "^22.20.2",
53
- "agents": "^0.28.1",
54
- "posthog-node": "5.56.1",
51
+ "@posthog/mcp": "0.23.0",
52
+ "@types/node": "^26.6.5",
53
+ "agents": "^0.30.1",
54
+ "posthog-node": "5.57.2",
55
55
  "typescript": "^7.0.2",
56
56
  "wrangler": "^4.151.0"
57
57
  },