@parcha/agentrun-computer 0.1.0-beta.42 → 0.1.0-beta.43

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.
@@ -119,8 +119,10 @@ class CloudflareHost {
119
119
  // check() refused a size past the largest, so one instance holds it.
120
120
  const instance = instanceOf(req.cpus, req.memoryMb) ?? LARGEST;
121
121
  const body = { name: nameOf(req.name), image: req.image, env: req.boot.env, labels: req.labels, instance: instance.name, backstopAt: req.backstopAt };
122
- // Only a 429, a refusal that made nothing, is sent again: a create that got no answer may have made a container.
123
- const made = (await this.#call("POST", "/v1/computers", { json: body, named: true, retry: (status) => status === 429 }, ctx));
122
+ // A 429 made nothing. A 500, 502 or 503 may have made the container, and sending it again is still safe: the relay's
123
+ // Computer object of this name answers a second create with the first's row and starts nothing twice. A create that
124
+ // got no answer is not sent again: the adapter deletes the name it asked for.
125
+ const made = (await this.#call("POST", "/v1/computers", { json: body, named: true, retry: (status) => [429, 500, 502, 503].includes(status) }, ctx));
124
126
  if (made?.name !== req.name)
125
127
  throw new HostError("vendor", `POST /v1/computers answered another computer: ${show(made?.name)}`);
126
128
  return { id: made.name };
Binary file
Binary file
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "0.1.0-beta.42",
3
- "source": "sha256:8969b1d46b7c70a2e5010f2913157491a58ee403cccc3d31cd70f73bf3524a6c"
2
+ "version": "0.1.0-beta.43",
3
+ "source": "sha256:96b115595d791aedf7d7ecc3f81fdfd3ab1d3795f0b68ffac7a51f1ebeaec716"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcha/agentrun-computer",
3
- "version": "0.1.0-beta.42",
3
+ "version": "0.1.0-beta.43",
4
4
  "description": "The open platform's computer protocol: a daemon in every computer, and one provisioner per vendor, starting with Docker.",
5
5
  "keywords": [
6
6
  "agentrun",