@opengamehq/cli 0.4.0 → 0.5.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/AGENTS.md CHANGED
@@ -56,7 +56,7 @@ An error has `"type": "error"`, `"ok": false`, a `code`, a `message`, an `exitCo
56
56
  | 4 | An allowance is used up | Wait `retryAfterSeconds`, then run the same command. |
57
57
  | 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. |
58
58
  | 6 | The CLI is too old | Run `opengame upgrade --json`, then the npm command in `data.command`. |
59
- | 7 | OpenGame is not launched | Stop. Tell the creator their account cannot use OpenGame until launch. |
59
+ | 7 | OpenGame is not open to creators yet | Stop. Tell the creator the CLI and uploads open on 18 November. |
60
60
 
61
61
  ## Sign in with the creator
62
62
 
@@ -121,6 +121,7 @@ opengame deploy . --json
121
121
  | `data.done` | `true` once the server has finished. |
122
122
  | `data.releaseId` | The release. Keep it for `submit`. |
123
123
  | `data.previewUrl` | The private preview link, once `state` is `ready`. It can be `null` on a ready release the server will not play; the deploy's page says why. |
124
+ | `data.gameOrigin` | The origin the published game runs at, such as `https://k3v9q2m7x4ab.opengame.gg`. Give it to the creator when the game talks to their own servers. `null` when the server sent none, or sent one this CLI cannot read. |
124
125
 
125
126
  To follow the checks, run `status --watch`, which follows the deploy for up to 5 minutes. Set `--timeout <seconds>` for a short tool call; when it runs out the command exits 5 with `checks_pending` and the checks carry on.
126
127
 
@@ -179,6 +180,8 @@ OpenGame hosts static browser exports. The build needs `index.html` at the root
179
180
 
180
181
  At runtime the game may call its own origin, `https://api.opengame.gg`, and any other `https:` or `wss:` host. Each call comes from the player's browser, so that host sees the player's IP address. Keep API keys on the creator's server, never in the bundle: players can read every file in it. The review sandbox has no internet, so the game must draw its first frame without its server.
181
182
 
183
+ The published game runs at `https://<label>.opengame.gg`, one origin per game, and `opengame deploy` returns it as `data.gameOrigin`. While an experiment runs, players load each version taking part from a `v-` origin instead. If the creator's servers check `Origin` (WebSocket) or send CORS headers (HTTP), they reject the game's requests until that exact origin is on their list, and online play fails with a closed socket, a 401 or 403 on the upgrade, or a CORS error in the console. Tell the creator to add it, and to add a version's `v-` origin before starting an experiment with it. Never suggest allowing `*.opengame.gg`, `null` or any pattern on `opengame.gg`, because other people's games are served there too and a pattern lets them call the creator's server. Use a token in a header or the first socket message, not a cookie. A private preview runs on a temporary `p-` origin, not the game's. That address is a private link, so keep it out of committed config and logs. [Games that talk to your own servers](https://docs.opengame.io/guides/packaging#games-that-talk-to-your-own-servers) has server examples.
184
+
182
185
  A game may not take payments, use crypto, make players create an account or give an email address, show ads, or carry ad pixels or session recording. [Packaging](https://docs.opengame.io/guides/packaging) has every rule and every check.
183
186
 
184
187
  ## Engines
@@ -231,5 +234,5 @@ Play the private preview before you tell the creator the game works.
231
234
  | 4 | `rateLimited` | An allowance is used. Wait retryAfterSeconds when the error has it, then run the same command. |
232
235
  | 5 | `server` | Our side or the network, and the game is fine. Run the error's next command when it has one. With retry after-fix or never, waiting will not help; read the message. Otherwise wait (retryAfterSeconds when given) and run the same command. |
233
236
  | 6 | `upgrade` | This CLI is too old. Run opengame upgrade. |
234
- | 7 | `notLaunched` | OpenGame is not launched yet, so nothing ran. Nothing about the game, the command or the login is wrong. Retrying will not help before launch. |
237
+ | 7 | `notLaunched` | OpenGame is not open to creators yet, so nothing ran. The message names the day the CLI and uploads open. Nothing about the game, the command or the login is wrong. Retrying will not help before then. |
235
238
  <!-- /generated:commands -->
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.0
4
+
5
+ - Before OpenGame opens for creators, a refused command names the day it opens ("OpenGame
6
+ opens for creators on 18 November") rather than saying it is not launched.
7
+ - `opengame deploy` returns `gameOrigin`, the origin the published game runs at, and says
8
+ to allow that exact origin when the game's own servers check `Origin` or send CORS
9
+ headers.
10
+ - `opengame pull` names the website setting opengame.json cannot hold, such as a player
11
+ count it has no room for, and the way past it, rather than a general manifest error.
12
+ - `--help --json` no longer carries `internal: true`, and the local checker's failure no
13
+ longer tells you to reinstall an internal CLI.
14
+ - Ships the skills from `@opengamehq/skills` 1.1.0.
15
+
3
16
  ## 0.4.0
4
17
 
5
18
  - First release on npm. This version is published by hand and has no npm provenance
package/README.md CHANGED
@@ -24,8 +24,9 @@ Allow access. The CLI keeps the token in the macOS Keychain, and elsewhere in a
24
24
  file under `~/.config/opengame`. In CI, pass a token through `OPENGAME_TOKEN` or
25
25
  `--token-stdin`, never as a command argument.
26
26
 
27
- When OpenGame has not opened for your account, a command that needs the platform prints
28
- `OpenGame is not launched.` and exits with code 7. Signing in works either way.
27
+ When OpenGame has not opened to creators for your account, a command that needs the
28
+ platform prints `OpenGame opens for creators on` the day the CLI and uploads open, and exits
29
+ with code 7. Signing in works either way.
29
30
 
30
31
  ## Deploy a game
31
32
 
@@ -114,7 +115,7 @@ OpenCode, so a coding agent can do all of the above for you.
114
115
  | 4 | `rateLimited` | An allowance is used. Wait retryAfterSeconds when the error has it, then run the same command. |
115
116
  | 5 | `server` | Our side or the network, and the game is fine. Run the error's next command when it has one. With retry after-fix or never, waiting will not help; read the message. Otherwise wait (retryAfterSeconds when given) and run the same command. |
116
117
  | 6 | `upgrade` | This CLI is too old. Run opengame upgrade. |
117
- | 7 | `notLaunched` | OpenGame is not launched yet, so nothing ran. Nothing about the game, the command or the login is wrong. Retrying will not help before launch. |
118
+ | 7 | `notLaunched` | OpenGame is not open to creators yet, so nothing ran. The message names the day the CLI and uploads open. Nothing about the game, the command or the login is wrong. Retrying will not help before then. |
118
119
  <!-- /generated:commands -->
119
120
 
120
121
  `opengame <command> --help` prints that command's flags and examples.