esim-cli 2026.1202.213 → 2026.1202.215
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 +25 -2
- package/dist/esim.js +538 -34
- package/dist/index.js +538 -34
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,9 +41,9 @@ esim market buy --schema
|
|
|
41
41
|
|
|
42
42
|
Root help lists top-level commands by group. Run `esim help <group>` for one-line summaries, and `esim <noun> --help` for the available verbs. A bare noun such as `battle` or `market` opens its default view. Command help and schema describe parameters, defaults, fields, write behavior and the relevant wiki page.
|
|
43
43
|
|
|
44
|
-
Run `esim login` and approve the link in your browser after checking that the verification code matches the terminal. Use `esim login --no-browser` to open the printed link yourself. The CLI saves the credential under `${XDG_CONFIG_HOME:-~/.config}/esim/credentials.json` and uses it when the API
|
|
44
|
+
Run `esim login` and approve the link in your browser after checking that the verification code matches the terminal. Use `esim login --no-browser` to open the printed link yourself. The CLI saves the credential under `${XDG_CONFIG_HOME:-~/.config}/esim/credentials.json` and uses it when the API origin (scheme, host and port) matches. `esim logout` deletes the local file. To revoke the API token, open **API token** on the web account page (`/account`).
|
|
45
45
|
|
|
46
|
-
The executable reads `ESIM_API_URL` and defaults to `https://esim.350124.xyz`. For local development, set `ESIM_API_URL=http://127.0.0.1:8766`. `ESIM_API_TOKEN` overrides both the saved credential and `ESIM_SESSION_COOKIE`. `ESIM_SESSION_COOKIE` accepts a development cookie in the form `citizen=…` and overrides the saved credential.
|
|
46
|
+
The executable reads `ESIM_API_URL` and defaults to `https://esim.350124.xyz`. For local development, set `ESIM_API_URL=http://127.0.0.1:8766`. For player commands, `ESIM_API_TOKEN` overrides both the saved credential and `ESIM_SESSION_COOKIE`. `ESIM_SESSION_COOKIE` accepts a development cookie in the form `citizen=…` and overrides the saved credential.
|
|
47
47
|
|
|
48
48
|
Text is the default output. Use `--json` to get the full structured output. `--fields a,b.c` projects keys before rendering either format, including keys inside arrays. Lists default to 20 entries. Use `--cursor` for the next page or `--all --max N` to bound the result. Errors go to stderr in the selected format. Exit codes are 0 for success, 2 for usage, 3 for business or authentication rejection, and 4 for transport or API failure.
|
|
49
49
|
|
|
@@ -59,6 +59,27 @@ Use `claim <task>` or `claim --chest` to collect one reward. Bare `claim` exits
|
|
|
59
59
|
|
|
60
60
|
`battle fight` returns a `requestId` and round. After an uncertain response, reuse the same parameters with `--request-id` and `--round`. Other uncertain writes return a `next` entry for checking the result.
|
|
61
61
|
|
|
62
|
+
## Administration
|
|
63
|
+
|
|
64
|
+
Run `esim login` and approve the device code in your browser with an administrator account on the target server. The installed CLI uses that saved device credential for `esim admin`. The API checks your current administrator role on every request. If you signed in before the server supported CLI administration, run `esim login` again. Admin uses HTTPS, with HTTP allowed on loopback for local development. API requests reject redirects. Run `esim admin --help` to see the available commands.
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
esim admin feedback list --status open --kind bug
|
|
68
|
+
esim admin feedback show 42 --json
|
|
69
|
+
esim admin feedback fix 42 --reply 'Available in the current release.' --dry-run
|
|
70
|
+
esim admin feedback fix 42 --reply 'Available in the current release.' --yes
|
|
71
|
+
esim admin feedback reject 43 --reply 'The observed result matches the rule.' --yes
|
|
72
|
+
esim admin feedback duplicate 44 42 --reply 'Tracked in report 42.' --yes
|
|
73
|
+
esim admin config show
|
|
74
|
+
esim admin config speed 2 --dry-run
|
|
75
|
+
esim admin config speed 2 --version "$ESIM_CONFIG_VERSION" --yes
|
|
76
|
+
esim admin log --limit 20
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Use `--dry-run` to preview a write or `--yes` to confirm it. When a verified fix is accepted, the server awards the submitter a Tester medal with 5 Gold. For the speed example, set `ESIM_CONFIG_VERSION` to the exact `version` from `config show` or the preview. A stale version returns a conflict. After a failed or interrupted write, read the current state before sending another write. `feedback list` and `log` accept `--limit` and `--cursor` and return the next cursor when another page is available. Add `--json` for structured output.
|
|
80
|
+
|
|
81
|
+
`esim admin account --help`, `esim admin content --help`, and `esim admin reports --help` cover account moderation, content removal, and queues for shout, article comment, citizen, and private-message reports.
|
|
82
|
+
|
|
62
83
|
## In-process use
|
|
63
84
|
|
|
64
85
|
```ts
|
|
@@ -78,6 +99,8 @@ Set `authManaged` when the injected fetch applies authentication. Otherwise supp
|
|
|
78
99
|
|
|
79
100
|
The `agentProject` export contains the in-process command, skills, opening command, timer and event wake defaults. The host can provide stdin and a file reader for message and avatar inputs.
|
|
80
101
|
|
|
102
|
+
The in-process `runCommand` and `agentProject` are for citizen commands. Run administrator commands through the standalone `esim` entry point with an explicit session cookie.
|
|
103
|
+
|
|
81
104
|
## Development
|
|
82
105
|
|
|
83
106
|
Run `bun run generate` in `cli/` after editing the OpenAPI specs or `cli/skills/esim/`; `skills.test.ts` fails when the embedded copy differs from disk. The declarations in `cli/commands/` also drive operation coverage. `cli/coverage.ts` records deferred and excluded operations.
|