@edgegap/mcp 0.15.9 → 0.16.1
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 +1 -1
- package/dist/client.js +62 -5
- package/dist/skills.generated.js +158 -37
- package/dist/tools.js +28 -3
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/tools.js
CHANGED
|
@@ -89,13 +89,16 @@ export function serverInstructions(mode) {
|
|
|
89
89
|
`Unreal voice chat: ${skillUri('edgegap-eos-voice', 'SKILL.md')}, ` +
|
|
90
90
|
`Godot 4: ${skillUri('edgegap-godot', 'SKILL.md')}, ` +
|
|
91
91
|
`Colyseus: ${skillUri('edgegap-colyseus', 'SKILL.md')}, ` +
|
|
92
|
+
`Cocos Creator: ${skillUri('edgegap-cocos', 'SKILL.md')}, ` +
|
|
93
|
+
`Unity Matchmaker (UGS): ${skillUri('edgegap-ugs-matchmaker', 'SKILL.md')}, ` +
|
|
92
94
|
`Nakama: ${skillUri('edgegap-nakama', 'SKILL.md')}, ` +
|
|
93
95
|
`PlayFab: ${skillUri('edgegap-playfab', 'SKILL.md')}, ` +
|
|
94
96
|
`Supabase backend: ${skillUri('edgegap-supabase', 'SKILL.md')}, ` +
|
|
95
97
|
`Three.js or web game with a Node server: ${skillUri('edgegap-threejs', 'SKILL.md')}, ` +
|
|
96
98
|
`Manus game: ${skillUri('edgegap-manus', 'SKILL.md')}, ` +
|
|
97
99
|
`matchmaking, parties, regions or backfill design: ${skillUri('edgegap-matchmaking', 'SKILL.md')}, ` +
|
|
98
|
-
`host/client games on Edgegap relays: ${skillUri('edgegap-relays', 'SKILL.md')}
|
|
100
|
+
`host/client games on Edgegap relays: ${skillUri('edgegap-relays', 'SKILL.md')}, ` +
|
|
101
|
+
`sample projects: ${skillUri('edgegap-samples', 'SKILL.md')}). ` +
|
|
99
102
|
'If your client cannot read MCP resources, call edgegap_get_skill with the name from the URI (e.g. edgegap-unity). ' +
|
|
100
103
|
'Skills hold the tested workflow, templates and pitfalls; follow them over general knowledge (edgegap_list_skills lists all).\n\n' +
|
|
101
104
|
'Deployments and relay sessions cost money while running. Stop deployments and delete ' +
|
|
@@ -441,6 +444,7 @@ function compactVersion(v) {
|
|
|
441
444
|
cpu_units: v.req_cpu,
|
|
442
445
|
memory_mb: v.req_memory,
|
|
443
446
|
max_duration_minutes: v.max_duration,
|
|
447
|
+
restart_policy: v.restart_policy,
|
|
444
448
|
ports: v.ports?.map((p) => ({
|
|
445
449
|
name: p.name,
|
|
446
450
|
port: p.port,
|
|
@@ -1038,6 +1042,13 @@ export function registerTools(server, client, config, auth, options = {}) {
|
|
|
1038
1042
|
.int()
|
|
1039
1043
|
.optional()
|
|
1040
1044
|
.describe('Auto-stop after this many minutes. Keeps test deployments from running up cost.'),
|
|
1045
|
+
restart_policy: z
|
|
1046
|
+
.enum(['never', 'on_failure', 'always'])
|
|
1047
|
+
.optional()
|
|
1048
|
+
.describe('What Edgegap does when the server process exits. "never" for match servers that stop ' +
|
|
1049
|
+
'themselves (an exit or crash ends the deployment instead of restarting a half-played ' +
|
|
1050
|
+
'match); "on_failure" restarts only after a crash (persistent servers); "always" (the API default) ' +
|
|
1051
|
+
'restarts after any exit.'),
|
|
1041
1052
|
verify_image: z
|
|
1042
1053
|
.boolean()
|
|
1043
1054
|
.optional()
|
|
@@ -1104,6 +1115,7 @@ export function registerTools(server, client, config, auth, options = {}) {
|
|
|
1104
1115
|
private_username: args.registry_username,
|
|
1105
1116
|
private_token: args.registry_token,
|
|
1106
1117
|
verify_image: args.verify_image ?? false,
|
|
1118
|
+
...(args.restart_policy ? { restart_policy: args.restart_policy } : {}),
|
|
1107
1119
|
...(args.endpoint_storage ? { endpoint_storage: args.endpoint_storage } : {}),
|
|
1108
1120
|
max_duration: capped,
|
|
1109
1121
|
ports: args.ports.map((p) => ({
|
|
@@ -1140,6 +1152,10 @@ export function registerTools(server, client, config, auth, options = {}) {
|
|
|
1140
1152
|
'likely fail to pull (424) until the developer adds the Container Registry username ' +
|
|
1141
1153
|
'and token to this version in the dashboard.');
|
|
1142
1154
|
}
|
|
1155
|
+
if (!args.restart_policy) {
|
|
1156
|
+
notes.push('restart_policy was not set, so Edgegap restarts the server whenever its process exits ("always"). ' +
|
|
1157
|
+
'For a match server that stops itself, set restart_policy "never" with edgegap_update_app_version.');
|
|
1158
|
+
}
|
|
1143
1159
|
for (const p of args.ports) {
|
|
1144
1160
|
if (WS_PROTOCOLS.has(p.protocol.toUpperCase()) && !p.tls_upgrade) {
|
|
1145
1161
|
notes.push(`Port ${p.port} is WebSocket without tls_upgrade. If clients run in a browser (WebGL), ` +
|
|
@@ -1162,8 +1178,8 @@ export function registerTools(server, client, config, auth, options = {}) {
|
|
|
1162
1178
|
title: 'Update an application version',
|
|
1163
1179
|
description: 'Change settings on an existing version instead of creating a new one: point it at a new ' +
|
|
1164
1180
|
'image tag, turn it on or off, change max_duration, set the registry login, turn on image ' +
|
|
1165
|
-
'caching (force_cache: Edgegap pre-loads the image so deployments start faster),
|
|
1166
|
-
'the shutdown grace period. Only the fields you pass change. Deployments already running ' +
|
|
1181
|
+
'caching (force_cache: Edgegap pre-loads the image so deployments start faster), set ' +
|
|
1182
|
+
'the restart policy, or set the shutdown grace period. Only the fields you pass change. Deployments already running ' +
|
|
1167
1183
|
'keep their old settings; new deployments get the new ones. Same refusals as ' +
|
|
1168
1184
|
'edgegap_create_app_version: "latest" or empty tags, a docker_image holding a host or ' +
|
|
1169
1185
|
'tag, and the API token in the registry login or env vars. ports and env REPLACE the ' +
|
|
@@ -1206,6 +1222,13 @@ export function registerTools(server, client, config, auth, options = {}) {
|
|
|
1206
1222
|
.min(1)
|
|
1207
1223
|
.optional()
|
|
1208
1224
|
.describe('Endpoint Storage name (edgegap_list_endpoint_storage) to export container logs to when deployments end.'),
|
|
1225
|
+
restart_policy: z
|
|
1226
|
+
.enum(['never', 'on_failure', 'always'])
|
|
1227
|
+
.optional()
|
|
1228
|
+
.describe('What Edgegap does when the server process exits. "never" for match servers that stop ' +
|
|
1229
|
+
'themselves (an exit or crash ends the deployment instead of restarting a half-played ' +
|
|
1230
|
+
'match); "on_failure" restarts only after a crash (persistent servers); "always" (the API default) ' +
|
|
1231
|
+
'restarts after any exit.'),
|
|
1209
1232
|
termination_grace_period_seconds: z
|
|
1210
1233
|
.number()
|
|
1211
1234
|
.int()
|
|
@@ -1292,6 +1315,7 @@ export function registerTools(server, client, config, auth, options = {}) {
|
|
|
1292
1315
|
verify_image: args.verify_image,
|
|
1293
1316
|
endpoint_storage: args.endpoint_storage,
|
|
1294
1317
|
termination_grace_period_seconds: args.termination_grace_period_seconds,
|
|
1318
|
+
restart_policy: args.restart_policy,
|
|
1295
1319
|
ports: args.ports?.map((p) => ({
|
|
1296
1320
|
port: p.port,
|
|
1297
1321
|
protocol: p.protocol,
|
|
@@ -3070,6 +3094,7 @@ export function registerTools(server, client, config, auth, options = {}) {
|
|
|
3070
3094
|
'DELETE {api_url}/tickets/{id} cancels a search.',
|
|
3071
3095
|
'Parties that must land in the same match use the group API instead (POST {api_url}/groups, then memberships for the other players; see the matchmaker API docs on the dashboard). ' +
|
|
3072
3096
|
'/memberships endpoints belong to groups only: a plain ticket is polled at /tickets/{id}.',
|
|
3097
|
+
'Browser and Node.js clients can use the Edgegap JS SDK (npm @edgegap/sdk, GroupAgent: a group of one per player) instead of these calls: it polls, retries 429/5xx and cancels, and getConnectionUrl() gives the wss:// URL. The engine skills (edgegap-threejs, edgegap-colyseus, edgegap-unity...) have ready Find Match clients and a headless e2e test.',
|
|
3073
3098
|
'That auth token is safe to ship in game clients: it grants no access to the Edgegap API.',
|
|
3074
3099
|
args.allowed_cors_origins?.length
|
|
3075
3100
|
? `Browser clients are allowed from: ${args.allowed_cors_origins.join(', ')}. Add any other origin the game is served from (each staging or production URL) before uploading.`
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edgegap/mcp",
|
|
3
3
|
"mcpName": "dev.edgegap/mcp",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.16.1",
|
|
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",
|
|
8
8
|
"build": "tsc && node scripts/chmod-bin.mjs",
|
|
9
9
|
"typecheck": "tsc --noEmit",
|
|
10
10
|
"typecheck:worker": "tsc -p worker/tsconfig.json --noEmit",
|
|
11
|
-
"test": "node --test test/unit.test.mjs && node test/package.mjs && node test/skills.mjs && node test/updateskills.mjs && node test/smoke.mjs && node test/guards.mjs && node test/elicit.mjs && node test/newtools.mjs && node test/emptystates.mjs && node test/reports.mjs && node test/http.mjs && node test/spec.mjs && node test/snapshot.mjs",
|
|
11
|
+
"test": "node --test test/unit.test.mjs && node test/package.mjs && node test/skills.mjs && node test/updateskills.mjs && node test/smoke.mjs && node test/guards.mjs && node test/elicit.mjs && node test/newtools.mjs && node test/emptystates.mjs && node test/reports.mjs && node test/http.mjs && node test/retries.mjs && node test/spec.mjs && node test/snapshot.mjs",
|
|
12
12
|
"test:unit": "node --test test/unit.test.mjs",
|
|
13
13
|
"snapshot:update": "node test/snapshot.mjs --update",
|
|
14
14
|
"scan": "node scripts/scan-repo.mjs",
|