@edgegap/mcp 0.13.2 β 0.14.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 +49 -20
- package/dist/client.js +50 -1
- package/dist/config.js +3 -0
- package/dist/matchmaker.js +7 -0
- package/dist/skills.generated.js +52 -52
- package/dist/skillsinstall.js +19 -4
- package/dist/skillsversion.js +2 -0
- package/dist/tools.js +538 -15
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -12,15 +12,14 @@ Connect AI coding agents to Edgegap through our MCP server. Your agent can take
|
|
|
12
12
|
|
|
13
13
|
Use our MCP server when:
|
|
14
14
|
|
|
15
|
-
* **Containerizing your game server** - your agent writes a Dockerfile for your build (or
|
|
16
|
-
* **Deploying a dedicated server** - create
|
|
17
|
-
* **Setting up matchmaking** - generate a matchmaker configuration that points at your deployed version, ready to upload in the dashboard.
|
|
18
|
-
* **Running a host-client game** - create a relay session if your game is built with one player as host. See [Dedicated Servers or Relays?](#dedicated-servers-or-relays) first.
|
|
15
|
+
* **Containerizing your game server** - your agent writes a Dockerfile for your build (or reviews the one you have) against best practices, pushes the image to our private container registry, and removes unused old image tags to reclaim registry capacity.
|
|
16
|
+
* **Deploying a dedicated server** - create and update app versions, review available locations, deploy close to your players, and get server IP with ports to test client connection.
|
|
19
17
|
* **Building a CI/CD pipeline** - test your deployments and teardown from a build system.
|
|
20
|
-
* **Troubleshooting a game server issue** - inspect app versions and deployment status, read container logs, or reproduce a failed deployment.
|
|
18
|
+
* **Troubleshooting a game server issue** - inspect app versions and deployment status, read container logs and CPU/memory utilization, or reproduce a failed deployment.
|
|
19
|
+
* **Running client-host and peer-to-peer games** - create relay sessions providing NAT punchthrough and avoid connection blocking. Review [Orchestration Models](https://docs.edgegap.com/learn/orchestration/deployments#orchestration) and [Dedicated Servers or Relays?](#dedicated-servers-or-relays) before deciding.
|
|
21
20
|
|
|
22
21
|
> [!WARNING]
|
|
23
|
-
> Out of scope / not supported by MCP: creating or
|
|
22
|
+
> Out of scope / not supported by MCP: building Linux server executable; creating, starting or stopping a matchmaker (upload the generated configuration in the dashboard); server browser; lobbies; managed clusters; private fleets; or billing.
|
|
24
23
|
|
|
25
24
|
> [!NOTE]
|
|
26
25
|
> If you need help, [please reach out to us over Discord](https://discord.gg/MmJf8fWjnt). For live games support see our [ticketing system](https://edgegap.atlassian.net/servicedesk/customer/portal/3).
|
|
@@ -214,7 +213,7 @@ To keep your API token on your own machine, run the server locally instead. Leav
|
|
|
214
213
|
}
|
|
215
214
|
```
|
|
216
215
|
|
|
217
|
-
Needs Node 18+. Pin a version in production (`@edgegap/mcp@0.
|
|
216
|
+
Needs Node 18+. Pin a version in production (`@edgegap/mcp@0.14.0`) rather than floating on latest. Registered in the official MCP registry as `dev.edgegap/mcp`.
|
|
218
217
|
|
|
219
218
|
The local server can also limit what an agent can do. These variables have no effect on the hosted endpoint at `mcp.edgegap.dev`:
|
|
220
219
|
|
|
@@ -223,11 +222,23 @@ The local server can also limit what an agent can do. These variables have no ef
|
|
|
223
222
|
| `EDGEGAP_API_TOKEN` | *(prompted)* | API token. Optional: omit it and you're asked at first use. The `token ` prefix is added for you. Never pass it as a command-line argument. |
|
|
224
223
|
| `EDGEGAP_READ_ONLY` | `0` | Set to `1` and the tools that change something (marked β in [Tools](#-tools)) are never registered, so the agent cannot be talked into calling them. |
|
|
225
224
|
| `EDGEGAP_APP_ALLOWLIST` | *(empty)* | Comma-separated application names. Limits what the agent can create and deploy into. Reading (listing apps and versions) is not limited, and neither is touching deployments once running. See [DESIGN.md](DESIGN.md#scope-of-the-allowlist). |
|
|
226
|
-
| `EDGEGAP_MAX_DURATION_MINUTES` | `60` | Ceiling on `max_duration` the agent may set on a version. |
|
|
225
|
+
| `EDGEGAP_MAX_DURATION_MINUTES` | `60` | Ceiling on `max_duration` the agent may set on a version. `edgegap_deploy` also refuses a version whose `max_duration` is above it, or unlimited, unless the agent passes `allow_long_running: true` after asking you. |
|
|
227
226
|
| `EDGEGAP_MAX_AGENT_DEPLOYMENTS` | `5` | `edgegap_deploy` refuses while this many deployments tagged `edgegap-mcp` are running. `0` turns the cap off. |
|
|
227
|
+
| `EDGEGAP_MAX_DEPLOYS_PER_RUN` | `20` | Deploys one server process may send, failed ones included. Restart the server to reset it. `0` turns it off. |
|
|
228
|
+
| `EDGEGAP_STOP_OWN_ONLY` | `0` | Set to `1` and `edgegap_stop_deployment` only stops deployments tagged `edgegap-mcp`, so an agent cannot stop servers it did not start. |
|
|
229
|
+
| `EDGEGAP_ENABLE_SKILLS_UPDATE` | `0` | Set to `1` to let `edgegap_update_skills` run `npx skills@1.7.4 update` or `claude plugin update` with `apply: true`. Without it, it lists those commands for you to run. Hand-copied skills are rewritten from the bundle either way. The updaters get only path, home, temp, locale, proxy and npm settings, never `EDGEGAP_*` variables or anything named like a token, secret, password or key. |
|
|
228
230
|
| `EDGEGAP_TIMEOUT_MS` | `30000` | Per-request HTTP timeout. |
|
|
229
231
|
| `EDGEGAP_SKILLS_CHECK` | `on` | Set to `off` and the skill tools never read the latest skills version from GitHub. |
|
|
230
232
|
|
|
233
|
+
#### Windows
|
|
234
|
+
|
|
235
|
+
The local server runs on Windows with Node.js 18 or newer, and CI runs the build and the stdio tests on Windows.
|
|
236
|
+
|
|
237
|
+
- Many Windows MCP clients cannot start `npx` directly, because it is a `.cmd` script. Start it through `cmd /c`: `"command": "cmd", "args": ["/c", "npx", "-y", "@edgegap/mcp"]`. In Claude Code: `claude mcp add Edgegap --env EDGEGAP_API_TOKEN=<token> -- cmd /c npx -y @edgegap/mcp`.
|
|
238
|
+
- In PowerShell, type `npx.cmd` instead of `npx` to run it by hand: a new Windows install blocks the `npx` PowerShell script ("running scripts is disabled on this system").
|
|
239
|
+
- The first start downloads the package and can take a while; later starts are fast.
|
|
240
|
+
- `edgegap_update_skills` finds skills installed in `%USERPROFILE%`, the same way as on macOS and Linux.
|
|
241
|
+
|
|
231
242
|
## π Skills
|
|
232
243
|
|
|
233
244
|
The server includes the [Edgegap agent skills](https://github.com/edgegap/llm-agent-skills): tested, step-by-step workflows for getting a multiplayer game online, with templates (Dockerfiles, matchmaker configs, Unity C# and Unreal C++ drop-ins) and known pitfalls. Any agent connected to Edgegap MCP gets them, with no separate install and no token needed, and is told to load the matching skill before working on a game project.
|
|
@@ -295,24 +306,32 @@ Your agent picks the right tool from your request. You don't need to name them,
|
|
|
295
306
|
| `edgegap_list_app_versions` | Lists versions with their image, resources, ports (with TLS Upgrade), and whether a registry login is set. |
|
|
296
307
|
| `edgegap_get_app_version` | Reads one version in full: image, resources, ports, max duration, image caching, restart policy, and env var names (never values). |
|
|
297
308
|
| `edgegap_create_app_version` β | Registers a container image as a deployable version. Supports TLS Upgrade on WS and HTTP ports, which browser (WebGL) clients need for `wss://`. |
|
|
298
|
-
| `edgegap_update_app_version` β | Changes an existing version: a new image tag, on/off, max duration, registry login, image caching (`force_cache`), shutdown grace period, ports, env vars. Only the fields passed change, but `ports` and `env` replace the whole list. Running deployments keep the old settings. |
|
|
309
|
+
| `edgegap_update_app_version` β | Changes an existing version: a new image tag, on/off, CPU and memory (both together), max duration, registry login, image caching (`force_cache`), shutdown grace period, ports, env vars, and the Endpoint Storage its logs go to. Only the fields passed change, but `ports` and `env` replace the whole list. Running deployments keep the old settings. |
|
|
310
|
+
| `edgegap_delete_app_version` β | Deletes one version, to clean up test versions. Refused while a deployment of it runs. The registry image is kept. |
|
|
311
|
+
| `edgegap_delete_app` β | Deletes an application and its versions. Refused while any of its deployments runs, and while it has more versions than `max_versions` (default 0). |
|
|
299
312
|
| `edgegap_list_locations` | Lists the cities Edgegap deploys to, or, for one version, only those with capacity right now. |
|
|
300
|
-
| `edgegap_list_ping_beacons` | Lists the ping beacons game clients measure latency
|
|
301
|
-
| `edgegap_deploy` β | Deploys an authoritative dedicated server close to your players. Always tagged `edgegap-mcp`, and reports when Edgegap will stop it. |
|
|
313
|
+
| `edgegap_list_ping_beacons` | Lists the ping beacons game clients measure their latency to each region against. |
|
|
314
|
+
| `edgegap_deploy` β | Deploys an authoritative dedicated server close to your players. Always tagged `edgegap-mcp`, and reports when Edgegap will stop it. Optional: CPU and memory for this deployment only, webhooks Edgegap calls when the server is ready, fails or ends, `require_cached_locations` for faster starts, and `private_host_ids` to place it on your private fleet first. |
|
|
315
|
+
| `edgegap_list_fleet_hosts` | Lists the hosts of one of your private fleets, with status and location, to deploy onto them. |
|
|
302
316
|
| `edgegap_wait_for_deployment` | Waits until the server is ready and returns the connection address. |
|
|
303
317
|
| `edgegap_get_deployment` | Reads a deployment's status. |
|
|
304
318
|
| `edgegap_list_deployments` | Lists running deployments, filtered by application, version, status, tags and more, and sorted by age. Finds servers left running; `only_agent_deployments: true` lists every one an agent started. See [Filter Deployments](https://docs.edgegap.com/learn/orchestration/deployments#filter-deployments). |
|
|
305
319
|
| `edgegap_get_deployment_logs` | Reads container logs and crash details while the deployment runs. After it stops, logs are only kept if Endpoint Storage was set up. |
|
|
306
320
|
| `edgegap_get_deployment_metrics` | Summarises CPU, CPU throttling, memory and network use (latest, average, peak), to size a version or check a crash. |
|
|
307
321
|
| `edgegap_stop_deployment` β | Stops one deployment, by its exact request ID. No bulk stop. |
|
|
322
|
+
| `edgegap_tag_deployment` β | Adds or removes tags on a running deployment, e.g. to mark a match. The `edgegap-mcp` tag stays. |
|
|
323
|
+
| `edgegap_report_deployment` β | Reports a deployment to Edgegap with a reason, for a studio's moderation backend. It keeps running. |
|
|
308
324
|
|
|
309
|
-
###
|
|
325
|
+
### Logs and Files (Endpoint Storage)
|
|
326
|
+
|
|
327
|
+
Container logs disappear with the deployment unless they are exported to your own S3-compatible bucket.
|
|
310
328
|
|
|
311
329
|
| Tool | What it does |
|
|
312
330
|
| --- | --- |
|
|
313
|
-
| `
|
|
314
|
-
|
|
315
|
-
|
|
331
|
+
| `edgegap_list_endpoint_storage` | Lists your Endpoint Storage buckets and their pull profiles. Secret keys are never returned. |
|
|
332
|
+
| `edgegap_create_endpoint_storage` β | Registers a bucket (AWS S3, Cloudflare R2, DigitalOcean Spacesβ¦) for log export. Set `endpoint_storage` on a version to turn export on. The secret key is never echoed back. |
|
|
333
|
+
| `edgegap_create_pull_profile` β | Copies a file or folder from the bucket into the container at boot (maps, configs, large assets). |
|
|
334
|
+
| `edgegap_link_pull_profile` β | Links a pull profile to a version, or unlinks it. |
|
|
316
335
|
|
|
317
336
|
### Relays (Host-Client Games Only)
|
|
318
337
|
|
|
@@ -334,8 +353,8 @@ A relay is not a game server: it forwards traffic while one player's game hosts
|
|
|
334
353
|
|
|
335
354
|
* *"Write a Dockerfile for my Unity server build, then push it and deploy a server near me."*
|
|
336
355
|
* *"Check my Dockerfile for Edgegap and fix any problems."*
|
|
337
|
-
* *"Create a matchmaker config for 2v2 matches on my latest version."*
|
|
338
356
|
* *"My deployment failed. Read the logs and tell me why."*
|
|
357
|
+
* *"How much CPU and memory did my last match use? Size my version for it."*
|
|
339
358
|
* *"My game uses host-client networking. Set up an Edgegap relay for two players."*
|
|
340
359
|
|
|
341
360
|
## π‘οΈ Guardrails
|
|
@@ -347,12 +366,15 @@ Your API token can do anything in your organization, so the server adds its own
|
|
|
347
366
|
| Dry run | Every tool that changes something takes `dry_run: true`: it returns the exact method, host, path and body, with the token, registry tokens and env values masked, and sends nothing. Local checks still run. |
|
|
348
367
|
| No token in containers | A deploy or version is refused, with nothing sent, if your API token appears in an env var name or value, a tag, or a webhook URL. Env values are never echoed back. |
|
|
349
368
|
| Agent tag | Every deployment gets the `edgegap-mcp` tag, even when the agent passes its own tags. `edgegap_list_deployments` with `only_agent_deployments: true` finds them all. |
|
|
350
|
-
| Auto-stop | Every deploy reports when Edgegap will stop it: the version's `max_duration`, capped at `EDGEGAP_MAX_DURATION_MINUTES` (default 60) for versions the agent creates. Edgegap has no per-deployment time limit, so a version
|
|
369
|
+
| Auto-stop | Every deploy reports when Edgegap will stop it: the version's `max_duration`, capped at `EDGEGAP_MAX_DURATION_MINUTES` (default 60) for versions the agent creates. Edgegap has no per-deployment time limit, so deploying a version whose `max_duration` is above that ceiling or unlimited (a version made elsewhere defaults to 1440 minutes) is refused unless the agent passes `allow_long_running: true`, which it is told to do only after asking you. |
|
|
370
|
+
| Deploys per run | The local server sends at most `EDGEGAP_MAX_DEPLOYS_PER_RUN` (default 20) deploys per process, failed ones included, since a refused deploy can still create a deployment. When the API refuses a deploy but created one anyway, the error names it so the agent can stop it. |
|
|
351
371
|
| No moving image tags | `edgegap_create_app_version` refuses `latest` (any case), an empty tag, or a tag Docker would reject, with nothing sent: Edgegap caches images by tag, so a re-pushed tag can deploy a stale build. Deploying an existing version on `latest` is refused too, and so is asking for registry push commands for `latest`. |
|
|
352
372
|
| Image reference check | A `docker_image` that also holds a registry host, tag or digest (e.g. `registry.edgegap.com/proj/server:v2`) is refused, and the error gives the right `docker_repository` / `docker_image` / `docker_tag` split. `edgegap_validate_server_config` flags the same things. |
|
|
353
373
|
| Deployment cap | `edgegap_deploy` is refused while `EDGEGAP_MAX_AGENT_DEPLOYMENTS` (default 5) deployments tagged `edgegap-mcp` are already running, so a looping agent cannot pile up billing servers. The refusal says how to list and stop them. |
|
|
354
374
|
| Hidden secret env vars | Env vars whose names look like secrets (`TOKEN`, `SECRET`, `PASSWORD`, `API_KEY`, `CREDENTIAL`, `AUTH`β¦) are sent with `is_hidden`, so the dashboard does not show their values in plain text. |
|
|
355
|
-
| Strict stop | `edgegap_stop_deployment` stops one deployment by its exact request ID. Empty IDs, wildcards and lists are refused. There is no bulk stop. |
|
|
375
|
+
| Strict stop | `edgegap_stop_deployment` stops one deployment by its exact request ID. Empty IDs, wildcards and lists are refused. There is no bulk stop. With `EDGEGAP_STOP_OWN_ONLY=1`, it only stops deployments tagged `edgegap-mcp`. |
|
|
376
|
+
| Careful deletes | `edgegap_delete_app_version` and `edgegap_delete_app` take one exact name, and are refused while a deployment of it is running. An application with versions is only deleted when `max_versions` covers them. |
|
|
377
|
+
| Webhook and bucket URLs | Deploy webhooks and Endpoint Storage endpoints must be `https` URLs without credentials, and are refused if they contain your API token. |
|
|
356
378
|
| Host on every result | Every result starts with the API host, e.g. `[api.edgegap.com]`, or `[custom Β· host]` when `EDGEGAP_BASE_URL` points elsewhere. A base URL naming `api.edgegap.com` must be exactly `https://api.edgegap.com`, or the server refuses to start. |
|
|
357
379
|
| Redaction | The token is stripped from every error before it reaches the agent. |
|
|
358
380
|
|
|
@@ -368,6 +390,13 @@ Review common error codes and learn how to unlock your integration.
|
|
|
368
390
|
|
|
369
391
|
Your MCP integration is most likely not including the Authorization header correctly.
|
|
370
392
|
|
|
393
|
+
### Tool Call Failed
|
|
394
|
+
|
|
395
|
+
Your client is missing an Edgegap token. This happens with claude.ai and Claude Desktop custom connectors, which can't send an `Authorization` header. See [Claude Desktop and claude.ai](#claude-desktop-and-claudeai) for the alternative.
|
|
396
|
+
|
|
397
|
+
> [!WARNING]
|
|
398
|
+
> This is a known limitation which will be resolved in the near term, stay tuned for updates!
|
|
399
|
+
|
|
371
400
|
### 403 Forbidden
|
|
372
401
|
|
|
373
402
|
Your MCP integration is likely using the template token or a deleted token. Please validate that the token value used by your integration matches exactly the token displayed in dashboard.
|
|
@@ -388,7 +417,7 @@ Not an error. A list with nothing in it (no applications yet, no deployments run
|
|
|
388
417
|
|
|
389
418
|
The skills (`edgegap_list_skills`, `edgegap_get_skill`), `edgegap_context`, `edgegap_generate_dockerfile` and `edgegap_validate_server_config` work without a token, so an agent can prepare the server build first. Create an account at [app.edgegap.com](https://app.edgegap.com) and a token under [User Settings β Tokens](https://app.edgegap.com/user-settings?tab=tokens). `edgegap_context` with `check_token: true` says whether the session's token is present and accepted, and shows its last four characters so you can find it on that page.
|
|
390
419
|
|
|
391
|
-
###
|
|
420
|
+
### Starts Locally but Not on Edgegap
|
|
392
421
|
|
|
393
422
|
Ask your agent to validate your server configuration, or to generate a new Dockerfile. The most common causes are an image built on Apple Silicon without `docker build --platform linux/amd64`, a server listening on a different port than the version exposes, or a UDP transport configured as TCP.
|
|
394
423
|
|
|
@@ -408,7 +437,7 @@ docker build -t edgegap-mcp .
|
|
|
408
437
|
docker run --rm -p 8080:8080 edgegap-mcp
|
|
409
438
|
```
|
|
410
439
|
|
|
411
|
-
Clients connect to `http://<host>:8080/mcp` with their own `Authorization` header, the same way they connect to the hosted endpoint. The image holds no credential, and `/health` answers without one. `PORT`, `HOST`, `EDGEGAP_READ_ONLY`, `EDGEGAP_APP_ALLOWLIST`, `EDGEGAP_MAX_DURATION_MINUTES` and `
|
|
440
|
+
Clients connect to `http://<host>:8080/mcp` with their own `Authorization` header, the same way they connect to the hosted endpoint. The image holds no credential, and `/health` answers without one. `PORT`, `HOST`, `EDGEGAP_READ_ONLY`, `EDGEGAP_APP_ALLOWLIST`, `EDGEGAP_MAX_DURATION_MINUTES`, `EDGEGAP_MAX_AGENT_DEPLOYMENTS` and `EDGEGAP_STOP_OWN_ONLY` apply; pass each with `-e NAME=value`. Never pass an API token to the container: each client sends its own on every request. Read [worker/DECISION.md](worker/DECISION.md) before exposing it beyond a private network.
|
|
412
441
|
|
|
413
442
|
Prebuilt images for `linux/amd64` and `linux/arm64` are published to `ghcr.io/edgegap/llm-mcp-server` (and, for existing setups, the old name `ghcr.io/edgegap/edgegap-mcp`), tagged `main` and `sha-<commit>` on every push to `main`, plus the version on `v*` tags:
|
|
414
443
|
|
package/dist/client.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { redact } from './config.js';
|
|
9
9
|
import { VERSION } from './version.js';
|
|
10
|
-
const SECRET_KEYS = /^(private_token|registry_token|token|password|secret|api_key)$/i;
|
|
10
|
+
const SECRET_KEYS = /^(private_token|registry_token|token|password|secret|api_key|secret_access_key)$/i;
|
|
11
11
|
/**
|
|
12
12
|
* Deep copy of a request body with secrets masked: registry tokens and the
|
|
13
13
|
* like by key name, every environment variable value (we never echo those),
|
|
@@ -169,11 +169,60 @@ export class EdgegapClient {
|
|
|
169
169
|
createAppVersion(appName, body) {
|
|
170
170
|
return this.request('POST', 'v1', `/v1/app/${encodeURIComponent(appName)}/version`, { body });
|
|
171
171
|
}
|
|
172
|
+
/** Deletes one version. The API refuses nothing here, so callers check first. */
|
|
173
|
+
deleteAppVersion(appName, versionName) {
|
|
174
|
+
return this.request('DELETE', 'v1', `/v1/app/${encodeURIComponent(appName)}/version/${encodeURIComponent(versionName)}`);
|
|
175
|
+
}
|
|
176
|
+
/** Deletes an application and every version under it. */
|
|
177
|
+
deleteApp(appName) {
|
|
178
|
+
return this.request('DELETE', 'v1', `/v1/app/${encodeURIComponent(appName)}`);
|
|
179
|
+
}
|
|
172
180
|
// --- Deployments --------------------------------------------------------
|
|
173
181
|
/** v2 deploy. Returns only a request_id; the deployment is still starting. */
|
|
174
182
|
deploy(body) {
|
|
175
183
|
return this.request('POST', 'v2', '/deployments', { body });
|
|
176
184
|
}
|
|
185
|
+
/** v2 deploy onto a private fleet: the same body plus private_host_ids. */
|
|
186
|
+
deployToFleet(body) {
|
|
187
|
+
return this.request('POST', 'v2', '/private-fleets/deployments', { body });
|
|
188
|
+
}
|
|
189
|
+
listFleetHosts(fleetName) {
|
|
190
|
+
return this.request('GET', 'v2', `/private-fleets/${encodeURIComponent(fleetName)}/hosts`);
|
|
191
|
+
}
|
|
192
|
+
listDeploymentTags(requestId) {
|
|
193
|
+
return this.request('GET', 'v1', `/v1/deployments/${encodeURIComponent(requestId)}/tags`, { query: { limit: 100 } });
|
|
194
|
+
}
|
|
195
|
+
addDeploymentTag(requestId, name) {
|
|
196
|
+
return this.request('POST', 'v1', `/v1/deployments/${encodeURIComponent(requestId)}/tags`, {
|
|
197
|
+
body: { name },
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
removeDeploymentTag(requestId, name) {
|
|
201
|
+
return this.request('DELETE', 'v1', `/v1/deployments/${encodeURIComponent(requestId)}/tags/${encodeURIComponent(name)}`);
|
|
202
|
+
}
|
|
203
|
+
reportDeployment(requestId, body) {
|
|
204
|
+
return this.request('POST', 'v1', `/v1/deployments/${encodeURIComponent(requestId)}:report`, { body });
|
|
205
|
+
}
|
|
206
|
+
// --- Endpoint storage (S3 log export and pull profiles, v1) -------------
|
|
207
|
+
listEndpointStorage() {
|
|
208
|
+
return this.request('GET', 'v1', '/v1/storage/endpoints', {
|
|
209
|
+
query: { limit: 100 },
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
createEndpointStorage(body) {
|
|
213
|
+
return this.request('POST', 'v1', '/v1/storage/endpoint', { body });
|
|
214
|
+
}
|
|
215
|
+
listPullProfiles(endpointName) {
|
|
216
|
+
return this.request('GET', 'v1', `/v1/storage/endpoint/${encodeURIComponent(endpointName)}/pull-profiles`, { query: { limit: 100 } });
|
|
217
|
+
}
|
|
218
|
+
createPullProfile(endpointName, body) {
|
|
219
|
+
return this.request('POST', 'v1', `/v1/storage/endpoint/${encodeURIComponent(endpointName)}/pull-profile`, { body });
|
|
220
|
+
}
|
|
221
|
+
/** PUT links, DELETE unlinks; the path is the same. */
|
|
222
|
+
linkPullProfile(method, endpointName, profileName, appName, versionName) {
|
|
223
|
+
return this.request(method, 'v1', `/v1/storage/endpoint/${encodeURIComponent(endpointName)}/pull-profile/${encodeURIComponent(profileName)}` +
|
|
224
|
+
`/app/${encodeURIComponent(appName)}/version/${encodeURIComponent(versionName)}`);
|
|
225
|
+
}
|
|
177
226
|
getDeployment(requestId) {
|
|
178
227
|
return this.request('GET', 'v1', `/v1/status/${encodeURIComponent(requestId)}`);
|
|
179
228
|
}
|
package/dist/config.js
CHANGED
|
@@ -76,6 +76,9 @@ export function loadConfig(env = process.env) {
|
|
|
76
76
|
appAllowlist: parseList(env.EDGEGAP_APP_ALLOWLIST),
|
|
77
77
|
maxDurationCeiling: parseIntEnv(env.EDGEGAP_MAX_DURATION_MINUTES, 60),
|
|
78
78
|
maxAgentDeployments: parseIntEnv(env.EDGEGAP_MAX_AGENT_DEPLOYMENTS, 5),
|
|
79
|
+
maxDeploysPerRun: parseIntEnv(env.EDGEGAP_MAX_DEPLOYS_PER_RUN, 20),
|
|
80
|
+
stopOwnOnly: env.EDGEGAP_STOP_OWN_ONLY === '1' || env.EDGEGAP_STOP_OWN_ONLY === 'true',
|
|
81
|
+
enableSkillsUpdate: env.EDGEGAP_ENABLE_SKILLS_UPDATE === '1' || env.EDGEGAP_ENABLE_SKILLS_UPDATE === 'true',
|
|
79
82
|
requestTimeoutMs: parseIntEnv(env.EDGEGAP_TIMEOUT_MS, 30_000),
|
|
80
83
|
};
|
|
81
84
|
}
|
package/dist/matchmaker.js
CHANGED
|
@@ -63,6 +63,13 @@ export function buildMatchmakerConfig(input) {
|
|
|
63
63
|
let lastAfter = 0;
|
|
64
64
|
for (const e of [...(input.expansions ?? [])].sort((a, b) => a.after_seconds - b.after_seconds)) {
|
|
65
65
|
const step = {};
|
|
66
|
+
// A stage that only repeats the initial min_team_size changes nothing: partial
|
|
67
|
+
// matches already come from min < max and form by ticket expiry, and every
|
|
68
|
+
// expansion costs the matchmaker performance. Drop it rather than emit it.
|
|
69
|
+
if (e.min_team_size === input.min_team_size && e.max_latency_ms === undefined) {
|
|
70
|
+
cautions.push(`expansion at ${e.after_seconds}s only repeats min_team_size ${e.min_team_size}, so it was left out. Partial matches need no expansion: min_team_size below max_team_size allows them, and a short ticket_expiration (30s) keeps the wait short.`);
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
66
73
|
if (e.min_team_size !== undefined) {
|
|
67
74
|
if (e.min_team_size > input.max_team_size) {
|
|
68
75
|
problems.push(`expansion at ${e.after_seconds}s sets min_team_size ${e.min_team_size} above max_team_size ${input.max_team_size}.`);
|