@go-labs-sg/gosh 0.8.2 → 0.9.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/README.md +74 -1
- package/command-manifest.json +89 -0
- package/command-reference.md +72 -0
- package/dist/index.js +1790 -15566
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@ Commands use `--input '<json>'` for the exact validated tRPC input object. This
|
|
|
73
73
|
|
|
74
74
|
`gosh event list-page` returns `{ items, page, pageSize, pageCount, totalCount }`. It defaults to page 1 with 25 results, accepts page sizes from 1 to 100, and supports server-side `search` and `status` filters. Archived events are excluded unless an explicit status is supplied. Request subsequent pages explicitly; the CLI does not automatically fetch every page. The existing `gosh event list` command and its array response remain unchanged.
|
|
75
75
|
|
|
76
|
-
The command registry
|
|
76
|
+
The command registry exposes the supported GOSH tRPC procedures across organizer and global-admin operations, organization invitations and membership, player workflows, public results/login procedures, uploads, and realtime subscriptions. Update the registry alongside API changes, then run `bun run generate:commands` to regenerate the manifest, reference, and typed operations.
|
|
77
77
|
|
|
78
78
|
### Templates and organization scope
|
|
79
79
|
|
|
@@ -154,6 +154,79 @@ value in that template team's `order` field:
|
|
|
154
154
|
}
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
+
### Gameplay progression and routing groups
|
|
158
|
+
|
|
159
|
+
Events default to `OPEN` progression, which keeps the existing open-play flow.
|
|
160
|
+
Sequential progression starts each team or individual on an ordered station
|
|
161
|
+
route. Group routing is available only for `TEAM` play mode. Create teams and
|
|
162
|
+
assign them to routing groups before launching the event; setup freezes when
|
|
163
|
+
play starts. A group shares its ordered station route, while each team keeps
|
|
164
|
+
independent progress through that route.
|
|
165
|
+
|
|
166
|
+
Configure gameplay, then manage the event's routing groups and their complete
|
|
167
|
+
station lists:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
gosh event set-gameplay \
|
|
171
|
+
--input '{"eventId":"event-id","progression":"SEQUENTIAL","groupRoutingEnabled":true,"allowMissionSkipping":true}' \
|
|
172
|
+
--target event-id \
|
|
173
|
+
--allow-state-change
|
|
174
|
+
|
|
175
|
+
gosh routing-group list --input '{"eventId":"event-id"}'
|
|
176
|
+
gosh routing-group create \
|
|
177
|
+
--input '{"eventId":"event-id","name":"North route"}' \
|
|
178
|
+
--target event-id \
|
|
179
|
+
--allow-state-change
|
|
180
|
+
gosh routing-group rename \
|
|
181
|
+
--input '{"eventId":"event-id","groupId":"group-id","name":"East route"}' \
|
|
182
|
+
--target group-id \
|
|
183
|
+
--allow-state-change
|
|
184
|
+
gosh routing-group set-stations \
|
|
185
|
+
--input '{"eventId":"event-id","groupId":"group-id","stationIds":["station-1","station-2"]}' \
|
|
186
|
+
--target group-id \
|
|
187
|
+
--allow-state-change
|
|
188
|
+
gosh routing-group assign-team \
|
|
189
|
+
--input '{"eventId":"event-id","teamId":"team-id","groupId":"group-id"}' \
|
|
190
|
+
--target team-id \
|
|
191
|
+
--allow-state-change
|
|
192
|
+
gosh routing-group delete \
|
|
193
|
+
--input '{"eventId":"event-id","groupId":"group-id"}' \
|
|
194
|
+
--target group-id \
|
|
195
|
+
--allow-state-change \
|
|
196
|
+
--allow-delete
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
`set-stations` replaces the group's entire route, so include every station in
|
|
200
|
+
the desired order. Use `groupId: null` with `assign-team` to unassign a team.
|
|
201
|
+
Group names are trimmed and limited to 80 characters. The delete command
|
|
202
|
+
requires the additional `--allow-delete` effect flag.
|
|
203
|
+
|
|
204
|
+
For sequential player actions, complete any required location check-in with
|
|
205
|
+
`gosh player station-check-in` first. The server checks the signed-in player’s
|
|
206
|
+
current check-in record; a successful check-in also starts the station timer.
|
|
207
|
+
Use `player station start` when check-in is disabled. Skipping is an individual
|
|
208
|
+
mission action available only when enabled in event gameplay settings:
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
gosh player station start \
|
|
212
|
+
--input '{"eventId":"event-id","stationId":"station-1"}' \
|
|
213
|
+
--target station-1 \
|
|
214
|
+
--allow-state-change
|
|
215
|
+
gosh player mission skip \
|
|
216
|
+
--input '{"eventId":"event-id","missionId":"mission-1"}' \
|
|
217
|
+
--target mission-1 \
|
|
218
|
+
--allow-state-change
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Player actions require event enrollment and the configured team submission
|
|
222
|
+
permissions. A skipped mission is irreversible and earns zero points; it resolves only that mission,
|
|
223
|
+
preserves points from the station's other submitted missions, and advances the
|
|
224
|
+
route once all station missions are submitted or skipped. The station timer
|
|
225
|
+
runs from check-in/start through the final mission submission or skip. It
|
|
226
|
+
measures mission work only: travel between stations and staff review time are
|
|
227
|
+
excluded. Existing leaderboard and results commands include the resulting
|
|
228
|
+
timing information.
|
|
229
|
+
|
|
157
230
|
### Local file uploads
|
|
158
231
|
|
|
159
232
|
Upload commands add the local file metadata to the supplied API input, request a permission-scoped signed URL, and upload the bytes directly to storage without sending the GOSH CLI access token to storage:
|
package/command-manifest.json
CHANGED
|
@@ -1154,6 +1154,75 @@
|
|
|
1154
1154
|
"name"
|
|
1155
1155
|
]
|
|
1156
1156
|
},
|
|
1157
|
+
{
|
|
1158
|
+
"effects": ["state-change"],
|
|
1159
|
+
"input": "json",
|
|
1160
|
+
"operation": "mutation",
|
|
1161
|
+
"path": ["event", "set-gameplay"],
|
|
1162
|
+
"procedure": "team.setGameplaySettings",
|
|
1163
|
+
"requiresAuth": true,
|
|
1164
|
+
"summary": "Set open or sequential progression, group routing, and per-mission skipping before play starts.",
|
|
1165
|
+
"targetKeys": ["eventId"]
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
"effects": [],
|
|
1169
|
+
"input": "json",
|
|
1170
|
+
"operation": "query",
|
|
1171
|
+
"path": ["routing-group", "list"],
|
|
1172
|
+
"procedure": "team.listRoutingGroups",
|
|
1173
|
+
"requiresAuth": true,
|
|
1174
|
+
"summary": "List an event's routing groups, ordered stations, and assigned teams."
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
"effects": ["state-change"],
|
|
1178
|
+
"input": "json",
|
|
1179
|
+
"operation": "mutation",
|
|
1180
|
+
"path": ["routing-group", "create"],
|
|
1181
|
+
"procedure": "team.createRoutingGroup",
|
|
1182
|
+
"requiresAuth": true,
|
|
1183
|
+
"summary": "Create a routing group within an event before play starts.",
|
|
1184
|
+
"targetKeys": ["eventId"]
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
"effects": ["state-change"],
|
|
1188
|
+
"input": "json",
|
|
1189
|
+
"operation": "mutation",
|
|
1190
|
+
"path": ["routing-group", "rename"],
|
|
1191
|
+
"procedure": "team.renameRoutingGroup",
|
|
1192
|
+
"requiresAuth": true,
|
|
1193
|
+
"summary": "Rename an event's routing group before play starts.",
|
|
1194
|
+
"targetKeys": ["groupId"]
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
"effects": ["state-change", "delete"],
|
|
1198
|
+
"input": "json",
|
|
1199
|
+
"operation": "mutation",
|
|
1200
|
+
"path": ["routing-group", "delete"],
|
|
1201
|
+
"procedure": "team.deleteRoutingGroup",
|
|
1202
|
+
"requiresAuth": true,
|
|
1203
|
+
"summary": "Delete an unassigned routing group before play starts.",
|
|
1204
|
+
"targetKeys": ["groupId"]
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
"effects": ["state-change"],
|
|
1208
|
+
"input": "json",
|
|
1209
|
+
"operation": "mutation",
|
|
1210
|
+
"path": ["routing-group", "set-stations"],
|
|
1211
|
+
"procedure": "team.setRoutingGroupStations",
|
|
1212
|
+
"requiresAuth": true,
|
|
1213
|
+
"summary": "Replace a group's complete station route in the supplied order before play starts.",
|
|
1214
|
+
"targetKeys": ["groupId"]
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
"effects": ["state-change"],
|
|
1218
|
+
"input": "json",
|
|
1219
|
+
"operation": "mutation",
|
|
1220
|
+
"path": ["routing-group", "assign-team"],
|
|
1221
|
+
"procedure": "team.assignTeamRoutingGroup",
|
|
1222
|
+
"requiresAuth": true,
|
|
1223
|
+
"summary": "Assign a team to a routing group, or clear its assignment with groupId null, before play starts.",
|
|
1224
|
+
"targetKeys": ["teamId"]
|
|
1225
|
+
},
|
|
1157
1226
|
{
|
|
1158
1227
|
"effects": [],
|
|
1159
1228
|
"input": "json",
|
|
@@ -2190,6 +2259,26 @@
|
|
|
2190
2259
|
"name"
|
|
2191
2260
|
]
|
|
2192
2261
|
},
|
|
2262
|
+
{
|
|
2263
|
+
"effects": ["state-change"],
|
|
2264
|
+
"input": "json",
|
|
2265
|
+
"operation": "mutation",
|
|
2266
|
+
"path": ["player", "station", "start"],
|
|
2267
|
+
"procedure": "event.startStation",
|
|
2268
|
+
"requiresAuth": true,
|
|
2269
|
+
"summary": "Start the current sequential station's shared mission timer and reveal its missions; required check-in still applies.",
|
|
2270
|
+
"targetKeys": ["stationId"]
|
|
2271
|
+
},
|
|
2272
|
+
{
|
|
2273
|
+
"effects": ["state-change"],
|
|
2274
|
+
"input": "json",
|
|
2275
|
+
"operation": "mutation",
|
|
2276
|
+
"path": ["player", "mission", "skip"],
|
|
2277
|
+
"procedure": "event.skipMission",
|
|
2278
|
+
"requiresAuth": true,
|
|
2279
|
+
"summary": "Permanently skip one unresolved mission for zero points when enabled; retain other points and elapsed station time.",
|
|
2280
|
+
"targetKeys": ["missionId"]
|
|
2281
|
+
},
|
|
2193
2282
|
{
|
|
2194
2283
|
"effects": ["state-change"],
|
|
2195
2284
|
"input": "json",
|
package/command-reference.md
CHANGED
|
@@ -434,6 +434,62 @@ Replace a team's linked station route and set its order.
|
|
|
434
434
|
- Input: `--input '<json>'` required
|
|
435
435
|
- Effects: state-change
|
|
436
436
|
|
|
437
|
+
## `gosh event set-gameplay`
|
|
438
|
+
|
|
439
|
+
Set open or sequential progression, group routing, and per-mission skipping before play starts.
|
|
440
|
+
|
|
441
|
+
- Authentication: browser-authenticated CLI session required
|
|
442
|
+
- Input: `--input '<json>'` required
|
|
443
|
+
- Effects: state-change
|
|
444
|
+
|
|
445
|
+
## `gosh routing-group list`
|
|
446
|
+
|
|
447
|
+
List an event's routing groups, ordered stations, and assigned teams.
|
|
448
|
+
|
|
449
|
+
- Authentication: browser-authenticated CLI session required
|
|
450
|
+
- Input: `--input '<json>'` required
|
|
451
|
+
- Effects: read-only
|
|
452
|
+
|
|
453
|
+
## `gosh routing-group create`
|
|
454
|
+
|
|
455
|
+
Create a routing group within an event before play starts.
|
|
456
|
+
|
|
457
|
+
- Authentication: browser-authenticated CLI session required
|
|
458
|
+
- Input: `--input '<json>'` required
|
|
459
|
+
- Effects: state-change
|
|
460
|
+
|
|
461
|
+
## `gosh routing-group rename`
|
|
462
|
+
|
|
463
|
+
Rename an event's routing group before play starts.
|
|
464
|
+
|
|
465
|
+
- Authentication: browser-authenticated CLI session required
|
|
466
|
+
- Input: `--input '<json>'` required
|
|
467
|
+
- Effects: state-change
|
|
468
|
+
|
|
469
|
+
## `gosh routing-group delete`
|
|
470
|
+
|
|
471
|
+
Delete an unassigned routing group before play starts.
|
|
472
|
+
|
|
473
|
+
- Authentication: browser-authenticated CLI session required
|
|
474
|
+
- Input: `--input '<json>'` required
|
|
475
|
+
- Effects: state-change, delete
|
|
476
|
+
|
|
477
|
+
## `gosh routing-group set-stations`
|
|
478
|
+
|
|
479
|
+
Replace a group's complete station route in the supplied order before play starts.
|
|
480
|
+
|
|
481
|
+
- Authentication: browser-authenticated CLI session required
|
|
482
|
+
- Input: `--input '<json>'` required
|
|
483
|
+
- Effects: state-change
|
|
484
|
+
|
|
485
|
+
## `gosh routing-group assign-team`
|
|
486
|
+
|
|
487
|
+
Assign a team to a routing group, or clear its assignment with groupId null, before play starts.
|
|
488
|
+
|
|
489
|
+
- Authentication: browser-authenticated CLI session required
|
|
490
|
+
- Input: `--input '<json>'` required
|
|
491
|
+
- Effects: state-change
|
|
492
|
+
|
|
437
493
|
## `gosh template list`
|
|
438
494
|
|
|
439
495
|
List templates visible in an organization; global admins can include every organization.
|
|
@@ -842,6 +898,22 @@ Create an expiring station check-in proof.
|
|
|
842
898
|
- Input: `--input '<json>'` required
|
|
843
899
|
- Effects: state-change
|
|
844
900
|
|
|
901
|
+
## `gosh player station start`
|
|
902
|
+
|
|
903
|
+
Start the current sequential station's shared mission timer and reveal its missions; required check-in still applies.
|
|
904
|
+
|
|
905
|
+
- Authentication: browser-authenticated CLI session required
|
|
906
|
+
- Input: `--input '<json>'` required
|
|
907
|
+
- Effects: state-change
|
|
908
|
+
|
|
909
|
+
## `gosh player mission skip`
|
|
910
|
+
|
|
911
|
+
Permanently skip one unresolved mission for zero points when enabled; retain other points and elapsed station time.
|
|
912
|
+
|
|
913
|
+
- Authentication: browser-authenticated CLI session required
|
|
914
|
+
- Input: `--input '<json>'` required
|
|
915
|
+
- Effects: state-change
|
|
916
|
+
|
|
845
917
|
## `gosh player mission submit`
|
|
846
918
|
|
|
847
919
|
Submit a mission response.
|