@opengamehq/cli 0.9.1 → 0.9.4
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/AGENTS.md +2 -2
- package/CHANGELOG.md +45 -0
- package/README.md +1 -1
- package/dist/cli.mjs +149 -149
- package/dist/preflight-worker.mjs +14 -14
- package/dist/runtime-builder.mjs +1 -1
- package/dist/safe-fs.py +14 -2
- package/dist/skills/manifest.json +15 -15
- package/dist/skills/opengame-api/SKILL.md +8 -8
- package/dist/skills/opengame-cli/SKILL.md +8 -7
- package/dist/skills/opengame-deploy/SKILL.md +7 -7
- package/dist/skills/opengame-jam/SKILL.md +5 -5
- package/dist/skills/opengame-router/SKILL.md +5 -6
- package/package.json +1 -1
package/dist/safe-fs.py
CHANGED
|
@@ -96,9 +96,21 @@ def execute(job, stream=None):
|
|
|
96
96
|
total += before.st_size
|
|
97
97
|
if total > job["maximum"]:
|
|
98
98
|
raise OverLimit("file limit")
|
|
99
|
-
|
|
99
|
+
span = job.get("range") if job["operation"] == "read-binary" else None
|
|
100
|
+
if span is None:
|
|
101
|
+
data = source.read(before.st_size + 1)
|
|
102
|
+
wanted = before.st_size
|
|
103
|
+
else:
|
|
104
|
+
# One part of a large asset: only these bytes reach memory, so a
|
|
105
|
+
# gigabyte goes up in parts without being held whole.
|
|
106
|
+
offset, wanted = span.get("offset"), span.get("length")
|
|
107
|
+
if (type(offset) is not int or type(wanted) is not int or offset < 0 or wanted < 0
|
|
108
|
+
or offset + wanted > before.st_size):
|
|
109
|
+
raise ValueError("invalid range")
|
|
110
|
+
source.seek(offset)
|
|
111
|
+
data = source.read(wanted)
|
|
100
112
|
after = os.fstat(source.fileno())
|
|
101
|
-
if len(data) !=
|
|
113
|
+
if len(data) != wanted or (before.st_size, before.st_mtime_ns, before.st_ctime_ns) != (after.st_size, after.st_mtime_ns, after.st_ctime_ns):
|
|
102
114
|
raise ValueError("file changed")
|
|
103
115
|
unchanged()
|
|
104
116
|
# Per-file ancestors are no longer needed once bytes are in memory.
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"family": "platform",
|
|
22
22
|
"default": false,
|
|
23
23
|
"description": "Call the OpenGame creator API directly over HTTPS. Covers the base URL, creator tokens and scopes, the OpenAPI document, the error shape and retry fields, deploying without the CLI, and checking whether OpenGame is open. Use when the person wants to deploy from their own tool or CI without the CLI, asks about the OpenGame REST API, api/v1, openapi.json or a creator token, or an API call returned an error code you need to read.",
|
|
24
|
-
"version": "1.0.
|
|
24
|
+
"version": "1.0.6",
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
27
|
"path": "SKILL.md",
|
|
28
|
-
"sha256": "
|
|
28
|
+
"sha256": "09edb41fd089a36bc0161d1a6c511ab3643ef7c0e2be27db57e11fb4e412f0c8"
|
|
29
29
|
}
|
|
30
30
|
],
|
|
31
|
-
"digest": "
|
|
31
|
+
"digest": "7be3874f8b8866aec5857450638c03f06ed2c0b1a5ca738f9298c0358531b06b"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"name": "opengame-assets",
|
|
@@ -119,25 +119,25 @@
|
|
|
119
119
|
"family": "platform",
|
|
120
120
|
"default": false,
|
|
121
121
|
"description": "Drive the OpenGame command line tool from an agent. Covers installing it, signing in with the person, every command, JSON and JSONL output, exit codes, findings and how to retry. Use when the person mentions the opengame command, the OpenGame CLI, installing @opengamehq/cli, opengame login, check, dev, deploy, status, submit, releases, rollback, unpublish, restore, delete, details, achievements, handle, jam or token, or a command exited with an error you need to read.",
|
|
122
|
-
"version": "1.8.
|
|
122
|
+
"version": "1.8.3",
|
|
123
123
|
"files": [
|
|
124
124
|
{
|
|
125
125
|
"path": "SKILL.md",
|
|
126
|
-
"sha256": "
|
|
126
|
+
"sha256": "1f2f9cdc17a9531a0bb459fee2487870b30d4ce87dce6c84ada18ddabdd8e159"
|
|
127
127
|
}
|
|
128
128
|
],
|
|
129
|
-
"digest": "
|
|
129
|
+
"digest": "48001d9150aa1f755155a4cccfcadf360a50805cd1e63b9eecfdc6dc0f2d41c2"
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
"name": "opengame-deploy",
|
|
133
133
|
"family": "platform",
|
|
134
134
|
"default": true,
|
|
135
135
|
"description": "Put a browser game online with OpenGame, the marketplace and game jam for browser games. Packages the game, checks it locally, uploads it to a private preview only the owner can play, reads and fixes findings, then submits one exact release for review. Use when the person says deploy my game, put it online, host it, share it, upload it, publish it, get me a link, make it playable for friends, or asks where to put a browser game or a Three.js game.",
|
|
136
|
-
"version": "1.1.
|
|
136
|
+
"version": "1.1.2",
|
|
137
137
|
"files": [
|
|
138
138
|
{
|
|
139
139
|
"path": "SKILL.md",
|
|
140
|
-
"sha256": "
|
|
140
|
+
"sha256": "73f777ccba11558eac4e9d1fb216233306414f20c1c46ee8093142562ed293df"
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
143
|
"path": "references/json-events.md",
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"sha256": "82c2ec30ab27d6a08c167e09a4af68134e6ef4207859b9e8655d6213d4bb2114"
|
|
153
153
|
}
|
|
154
154
|
],
|
|
155
|
-
"digest": "
|
|
155
|
+
"digest": "9980073955dd642684fa1cf836fa36468f154b870c46d4acf7170e96b01e487c"
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
"name": "opengame-depth",
|
|
@@ -235,14 +235,14 @@
|
|
|
235
235
|
"family": "platform",
|
|
236
236
|
"default": false,
|
|
237
237
|
"description": "Enter a game in an OpenGame jam. Finds the open jams, their tracks and rules, checks the game against them, and submits one exact release as an entry with the person's own answers, leaving the certification to the person. Use when the person says enter the jam, submit to the jam, which track should I pick, am I eligible, what are the jam rules, or mentions the OpenGame Global AI Game Jam.",
|
|
238
|
-
"version": "1.0.
|
|
238
|
+
"version": "1.0.8",
|
|
239
239
|
"files": [
|
|
240
240
|
{
|
|
241
241
|
"path": "SKILL.md",
|
|
242
|
-
"sha256": "
|
|
242
|
+
"sha256": "59680b4d1d0140cb430932a666d021ff71883160b0a65c2b42d30ca481f7c7f8"
|
|
243
243
|
}
|
|
244
244
|
],
|
|
245
|
-
"digest": "
|
|
245
|
+
"digest": "853336cc455d4e1891ceb4cde16024aad59dff023ca80828a38410662d87922b"
|
|
246
246
|
},
|
|
247
247
|
{
|
|
248
248
|
"name": "opengame-lighting",
|
|
@@ -375,18 +375,18 @@
|
|
|
375
375
|
"family": "platform",
|
|
376
376
|
"default": true,
|
|
377
377
|
"description": "Build, test and submit a browser game on OpenGame. Routes game work to the deploy guide, whole-game review and relevant craft skills. Use when someone asks to make a game, improve a game, check it, deploy it or enter an OpenGame jam.",
|
|
378
|
-
"version": "1.0.
|
|
378
|
+
"version": "1.0.7",
|
|
379
379
|
"files": [
|
|
380
380
|
{
|
|
381
381
|
"path": "SKILL.md",
|
|
382
|
-
"sha256": "
|
|
382
|
+
"sha256": "257dd07173a0afdbbac9f8b0f774e45a6b2f7fe8e0b93364641cf5907eb3d0e1"
|
|
383
383
|
},
|
|
384
384
|
{
|
|
385
385
|
"path": "references/process.md",
|
|
386
386
|
"sha256": "3462bdd5a87f81eee69ffb12ca04519b35404f67c920b182443e81a8904100dd"
|
|
387
387
|
}
|
|
388
388
|
],
|
|
389
|
-
"digest": "
|
|
389
|
+
"digest": "7b818ee9d26f9f1e4266c0356bae0a46ea72ea8dfe22fb888dd60e826cb7c7b8"
|
|
390
390
|
},
|
|
391
391
|
{
|
|
392
392
|
"name": "opengame-scene-audit",
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
name: opengame-api
|
|
3
3
|
description: Call the OpenGame creator API directly over HTTPS. Covers the base URL, creator tokens and scopes, the OpenAPI document, the error shape and retry fields, deploying without the CLI, and checking whether OpenGame is open. Use when the person wants to deploy from their own tool or CI without the CLI, asks about the OpenGame REST API, api/v1, openapi.json or a creator token, or an API call returned an error code you need to read.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "1.0.
|
|
5
|
+
version: "1.0.6"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Call the OpenGame creator API
|
|
9
9
|
|
|
10
|
-
OpenGame opens on 18 November 2026
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
OpenGame opens on 18 November 2026. The creator API takes any signed-in
|
|
11
|
+
account now; until 18 November a request with no account answers 403 `not_launched`,
|
|
12
|
+
and the CLI says "OpenGame opens for creators on 18 November." Check before anything else:
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
15
|
curl -s https://opengame.io/api/v1/status
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
It answers `{ "launched": false, "access": null }` before launch. Sent with
|
|
19
|
-
`access` says whether that account may use OpenGame now
|
|
20
|
-
`not_launched` refusal in a loop; tell the person.
|
|
18
|
+
It answers `{ "launched": false, "access": null }` before launch with no token. Sent with
|
|
19
|
+
a token, `access` says whether that account may use OpenGame now, and is `true` for any
|
|
20
|
+
account. Do not retry a `not_launched` refusal in a loop; sign in, or tell the person.
|
|
21
21
|
|
|
22
22
|
Most integrations should run the CLI (`opengame-cli`), which builds, checks, packages
|
|
23
23
|
and resumes uploads. Use the API when the CLI cannot run.
|
|
@@ -72,7 +72,7 @@ on `error`. Other fields, when present:
|
|
|
72
72
|
|
|
73
73
|
Some answers to know:
|
|
74
74
|
|
|
75
|
-
- `not_launched` (403):
|
|
75
|
+
- `not_launched` (403): the request came with no account before launch. Sign in.
|
|
76
76
|
- `not_member` or `account_inactive` (403): the account has no access, or is suspended.
|
|
77
77
|
- `uploads_closed` (403): new uploads are not open to this account; nothing started.
|
|
78
78
|
- `entries_closed` (403, `retry` is `never`): entries have closed, so no game can be
|
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
name: opengame-cli
|
|
3
3
|
description: Drive the OpenGame command line tool from an agent. Covers installing it, signing in with the person, every command, JSON and JSONL output, exit codes, findings and how to retry. Use when the person mentions the opengame command, the OpenGame CLI, installing @opengamehq/cli, opengame login, check, dev, deploy, status, submit, releases, rollback, unpublish, restore, delete, details, achievements, handle, jam or token, or a command exited with an error you need to read.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "1.8.
|
|
5
|
+
version: "1.8.3"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Use the OpenGame CLI
|
|
9
9
|
|
|
10
|
-
OpenGame opens on 18 November 2026, and
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
OpenGame opens on 18 November 2026, and any signed-in account can use the CLI
|
|
11
|
+
now. Until 18 November, a command run before `opengame login` prints
|
|
12
|
+
"OpenGame opens for creators on 18 November." and exits with the `not_launched` code (7) that
|
|
13
|
+
`opengame help --json` lists. That is not a broken install: run `opengame login`, then the
|
|
14
|
+
command again, and do not reinstall or look for a way round it.
|
|
14
15
|
|
|
15
16
|
For the whole deploy procedure, read `opengame-deploy`. This skill is the reference
|
|
16
17
|
for the tool itself.
|
|
@@ -132,8 +133,8 @@ any of them, as the Details tab does; a field left out stays, and `--clear-tagli
|
|
|
132
133
|
the tagline. On a published game players
|
|
133
134
|
see it at once, so change only what the person asked for. To keep `opengame.json` in step,
|
|
134
135
|
run `opengame pull` afterwards. `opengame handle <name> --yes --json` renames the person's
|
|
135
|
-
handle. Ask first: their old handle
|
|
136
|
-
limited per day. It works only with the `opengame login` token, not a token made in
|
|
136
|
+
handle. Ask first: their old handle becomes free for anyone to claim, their games keep
|
|
137
|
+
their /g links, their profile address changes, and renames are limited per day. It works only with the `opengame login` token, not a token made in
|
|
137
138
|
settings. A refusal's `message` says why, for example the name is taken.
|
|
138
139
|
|
|
139
140
|
## Retire an achievement
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
name: opengame-deploy
|
|
3
3
|
description: Put a browser game online with OpenGame, the marketplace and game jam for browser games. Packages the game, checks it locally, uploads it to a private preview only the owner can play, reads and fixes findings, then submits one exact release for review. Use when the person says deploy my game, put it online, host it, share it, upload it, publish it, get me a link, make it playable for friends, or asks where to put a browser game or a Three.js game.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "1.1.
|
|
5
|
+
version: "1.1.2"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Deploy a browser game to OpenGame
|
|
9
9
|
|
|
10
|
-
OpenGame opens on 18 November 2026.
|
|
11
|
-
Until
|
|
12
|
-
prints "OpenGame opens for creators on 18 November."
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
OpenGame opens on 18 November 2026. Any signed-in account can use the CLI,
|
|
11
|
+
uploads and jam entries now. Until 18 November, a CLI command run before `opengame login`
|
|
12
|
+
prints "OpenGame opens for creators on 18 November." and exits 7 (`not_launched`).
|
|
13
|
+
Nothing is wrong with the game or the install: ask the person to run `opengame login`, then
|
|
14
|
+
run the command again. Do not reinstall or work around it.
|
|
15
15
|
|
|
16
16
|
<!-- generated:procedure -->
|
|
17
17
|
Deploy the creator's game to a private preview, give them its link, and submit it only when they ask. Read each command's result before you run the next one.
|
|
@@ -67,7 +67,7 @@ An error has `"type": "error"`, `"ok": false`, a `code`, a `message`, an `exitCo
|
|
|
67
67
|
| 4 | An allowance is used up | Wait `retryAfterSeconds`, then run the same command. |
|
|
68
68
|
| 5 | Our side or the network | Leave the game as it is. Run `next` when the error has one; otherwise wait and retry, at most a few times. |
|
|
69
69
|
| 6 | The CLI is too old | Run `opengame upgrade --json`, then the npm command in `data.command`. |
|
|
70
|
-
| 7 | OpenGame is not open to creators yet |
|
|
70
|
+
| 7 | OpenGame is not open to creators yet | The CLI has no login. Ask the creator to run `opengame login`, then run the command again. Until 18 November this is what a signed-out CLI hears. |
|
|
71
71
|
|
|
72
72
|
## Sign in with the creator
|
|
73
73
|
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
name: opengame-jam
|
|
3
3
|
description: Enter a game in an OpenGame jam. Finds the open jams, their tracks and rules, checks the game against them, and submits one exact release as an entry with the person's own answers, leaving the certification to the person. Use when the person says enter the jam, submit to the jam, which track should I pick, am I eligible, what are the jam rules, or mentions the OpenGame Global AI Game Jam.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "1.0.
|
|
5
|
+
version: "1.0.8"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Enter an OpenGame jam
|
|
9
9
|
|
|
10
|
-
OpenGame opens on 18 November 2026.
|
|
10
|
+
OpenGame opens on 18 November 2026. The jam kicks off on 18 November, and entries close on
|
|
11
11
|
18 December, 11:59 pm PT; after the close every deploy path answers `entries_closed`.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
"OpenGame opens for creators on 18 November."
|
|
15
|
-
|
|
13
|
+
Any signed-in account can enter the launch jam now, before 18 November as well as
|
|
14
|
+
after it. A CLI with no login hears "OpenGame opens for creators on 18 November." until
|
|
15
|
+
then: run `opengame login` first.
|
|
16
16
|
|
|
17
17
|
A jam is an extra destination for a game already on OpenGame. Games go to the
|
|
18
18
|
marketplace; a jam entry is one exact release submitted with the jam's answers,
|
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
name: opengame-router
|
|
3
3
|
description: Build, test and submit a browser game on OpenGame. Routes game work to the deploy guide, whole-game review and relevant craft skills. Use when someone asks to make a game, improve a game, check it, deploy it or enter an OpenGame jam.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "1.0.
|
|
5
|
+
version: "1.0.7"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Work on an OpenGame game
|
|
9
9
|
|
|
10
|
-
OpenGame opens on 18 November 2026.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
play in a browser.
|
|
10
|
+
OpenGame opens on 18 November 2026. Any signed-in account can use the CLI,
|
|
11
|
+
uploads and jam entries now. Until 18 November, a CLI or API request with no account
|
|
12
|
+
hears "OpenGame opens for creators on 18 November." Sign in with `opengame login` first.
|
|
13
|
+
That is not a fault in the game.
|
|
15
14
|
|
|
16
15
|
Read [the working process](references/process.md) before changing the game. Keep the
|
|
17
16
|
user's scope and budget. Read only the specialists that apply to the next change.
|