towns-agent 2.0.4 → 2.0.6
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 +28 -8
- package/dist/index.js +214 -207
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +205 -199
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -8
- package/templates/quickstart/.env.sample +4 -0
- package/templates/quickstart/.turbo/turbo-build.log +2 -0
- package/templates/quickstart/AGENTS.md +267 -0
- package/templates/quickstart/README.md +95 -0
- package/templates/quickstart/_gitignore +33 -0
- package/templates/quickstart/package.json +35 -0
- package/templates/quickstart/src/commands.ts +12 -0
- package/templates/quickstart/src/index.ts +56 -0
- package/templates/quickstart/tsconfig.json +25 -0
package/README.md
CHANGED
|
@@ -51,16 +51,21 @@ Options:
|
|
|
51
51
|
|
|
52
52
|
Outputs `APP_ADDRESS`, `APP_PRIVATE_KEY`, `APP_PRIVATE_DATA`, and `JWT_SECRET`.
|
|
53
53
|
|
|
54
|
-
### `setup
|
|
54
|
+
### `setup [appAddress]`
|
|
55
55
|
|
|
56
56
|
Register a webhook URL and configure notification settings for an app.
|
|
57
57
|
|
|
58
|
+
The `appAddress` argument is optional when running inside a project that has a `.env` file containing `APP_ADDRESS` or `APP_PRIVATE_DATA`.
|
|
59
|
+
|
|
58
60
|
```bash
|
|
59
|
-
#
|
|
61
|
+
# From a project with .env — no appAddress needed
|
|
62
|
+
bun run cli setup --ownerPrivateKey 0xac09...
|
|
63
|
+
|
|
64
|
+
# Or provide appAddress explicitly
|
|
60
65
|
bun run cli setup 0xAPP_ADDRESS --ownerPrivateKey 0xac09...
|
|
61
66
|
|
|
62
67
|
# Non-interactive
|
|
63
|
-
bun run cli setup
|
|
68
|
+
bun run cli setup \
|
|
64
69
|
--ownerPrivateKey 0xac09... \
|
|
65
70
|
--webhookUrl https://example.com/webhook \
|
|
66
71
|
--notify ALL
|
|
@@ -76,19 +81,23 @@ Options:
|
|
|
76
81
|
- `MENTION_REPLY_REACTION` — Forward mentions, replies, and reactions only
|
|
77
82
|
- `NONE` — Forward no messages
|
|
78
83
|
|
|
79
|
-
### `metadata <view|update>
|
|
84
|
+
### `metadata <view|update> [appAddress]`
|
|
80
85
|
|
|
81
86
|
View or update app metadata.
|
|
82
87
|
|
|
88
|
+
The `appAddress` argument is optional when running inside a project that has a `.env` file containing `APP_ADDRESS` or `APP_PRIVATE_DATA`.
|
|
89
|
+
|
|
83
90
|
```bash
|
|
84
|
-
#
|
|
85
|
-
bun run cli metadata view
|
|
91
|
+
# From a project with .env — no appAddress needed
|
|
92
|
+
bun run cli metadata view
|
|
93
|
+
bun run cli metadata update --ownerPrivateKey 0xac09...
|
|
86
94
|
|
|
87
|
-
#
|
|
95
|
+
# Or provide appAddress explicitly
|
|
96
|
+
bun run cli metadata view 0xAPP_ADDRESS
|
|
88
97
|
bun run cli metadata update 0xAPP_ADDRESS --ownerPrivateKey 0xac09...
|
|
89
98
|
|
|
90
99
|
# Update non-interactively
|
|
91
|
-
bun run cli metadata update
|
|
100
|
+
bun run cli metadata update \
|
|
92
101
|
--ownerPrivateKey 0xac09... \
|
|
93
102
|
--displayName "New Name" \
|
|
94
103
|
--description "Updated description"
|
|
@@ -135,6 +144,17 @@ Commands that modify app state (`create`, `setup`, `metadata update`) require au
|
|
|
135
144
|
|
|
136
145
|
If neither flag is provided, the CLI will prompt for a bearer token interactively.
|
|
137
146
|
|
|
147
|
+
## Environment Resolution
|
|
148
|
+
|
|
149
|
+
Commands that need an environment (`create`, `setup`, `metadata`) resolve it in this order:
|
|
150
|
+
|
|
151
|
+
1. `--env` flag (e.g. `--env prod`)
|
|
152
|
+
2. `RIVER_ENV` environment variable
|
|
153
|
+
3. `RIVER_ENV` in `.env` file
|
|
154
|
+
4. `env` field decoded from `APP_PRIVATE_DATA` in `.env` file
|
|
155
|
+
|
|
156
|
+
If none are found, the CLI exits with an error.
|
|
157
|
+
|
|
138
158
|
## Global Options
|
|
139
159
|
|
|
140
160
|
- `-h, --help` — Show help message
|