@go-labs-sg/gosh 0.8.3 → 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 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 covers every callable GOSH tRPC procedure: organizer and global-admin operations, organization invitations and membership, player workflows, public results/login procedures, uploads, and realtime subscriptions. The compile-time registry test fails whenever a new API procedure is added without a CLI command.
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:
@@ -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",
@@ -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.
package/dist/index.js CHANGED
@@ -7056,6 +7056,34 @@ var typedOperations = {
7056
7056
  kind: "mutation",
7057
7057
  invoke: (client, input) => client.team.setStationRoutes.mutate(input)
7058
7058
  },
7059
+ "team.setGameplaySettings": {
7060
+ kind: "mutation",
7061
+ invoke: (client, input) => client.team.setGameplaySettings.mutate(input)
7062
+ },
7063
+ "team.listRoutingGroups": {
7064
+ kind: "query",
7065
+ invoke: (client, input) => client.team.listRoutingGroups.query(input)
7066
+ },
7067
+ "team.createRoutingGroup": {
7068
+ kind: "mutation",
7069
+ invoke: (client, input) => client.team.createRoutingGroup.mutate(input)
7070
+ },
7071
+ "team.renameRoutingGroup": {
7072
+ kind: "mutation",
7073
+ invoke: (client, input) => client.team.renameRoutingGroup.mutate(input)
7074
+ },
7075
+ "team.deleteRoutingGroup": {
7076
+ kind: "mutation",
7077
+ invoke: (client, input) => client.team.deleteRoutingGroup.mutate(input)
7078
+ },
7079
+ "team.setRoutingGroupStations": {
7080
+ kind: "mutation",
7081
+ invoke: (client, input) => client.team.setRoutingGroupStations.mutate(input)
7082
+ },
7083
+ "team.assignTeamRoutingGroup": {
7084
+ kind: "mutation",
7085
+ invoke: (client, input) => client.team.assignTeamRoutingGroup.mutate(input)
7086
+ },
7059
7087
  "template.list": {
7060
7088
  kind: "query",
7061
7089
  invoke: (client, input) => client.template.list.query(input)
@@ -7260,6 +7288,14 @@ var typedOperations = {
7260
7288
  kind: "mutation",
7261
7289
  invoke: (client, input) => client.event.createStationCheckInProof.mutate(input)
7262
7290
  },
7291
+ "event.startStation": {
7292
+ kind: "mutation",
7293
+ invoke: (client, input) => client.event.startStation.mutate(input)
7294
+ },
7295
+ "event.skipMission": {
7296
+ kind: "mutation",
7297
+ invoke: (client, input) => client.event.skipMission.mutate(input)
7298
+ },
7263
7299
  "event.submitMission": {
7264
7300
  kind: "mutation",
7265
7301
  invoke: (client, input) => client.event.submitMission.mutate(input)
@@ -7440,6 +7476,14 @@ var defaultMutationTargetKeys = [
7440
7476
  "name"
7441
7477
  ];
7442
7478
  var mutationTargetKeys = {
7479
+ "team.setGameplaySettings": ["eventId"],
7480
+ "team.createRoutingGroup": ["eventId"],
7481
+ "team.renameRoutingGroup": ["groupId"],
7482
+ "team.deleteRoutingGroup": ["groupId"],
7483
+ "team.setRoutingGroupStations": ["groupId"],
7484
+ "team.assignTeamRoutingGroup": ["teamId"],
7485
+ "event.startStation": ["stationId"],
7486
+ "event.skipMission": ["missionId"],
7443
7487
  "event.create": ["organizationId", "name"],
7444
7488
  "event.createFromTemplate": ["organizationId", "templateId"],
7445
7489
  "event.requestLoginEmailOtp": ["eventId", "email"],
@@ -7550,6 +7594,13 @@ var commands = [
7550
7594
  mutation(["team", "set-play-mode"], "team.setPlayMode", "Change an event between individual and team play.", ["state-change"]),
7551
7595
  mutation(["team", "set-submission-access"], "team.setSubmissionAccess", "Change who can submit missions in team play.", ["state-change"]),
7552
7596
  mutation(["team", "set-station-routes"], "team.setStationRoutes", "Replace a team's linked station route and set its order.", ["state-change"]),
7597
+ mutation(["event", "set-gameplay"], "team.setGameplaySettings", "Set open or sequential progression, group routing, and per-mission skipping before play starts.", ["state-change"]),
7598
+ query(["routing-group", "list"], "team.listRoutingGroups", "List an event's routing groups, ordered stations, and assigned teams."),
7599
+ mutation(["routing-group", "create"], "team.createRoutingGroup", "Create a routing group within an event before play starts.", ["state-change"]),
7600
+ mutation(["routing-group", "rename"], "team.renameRoutingGroup", "Rename an event's routing group before play starts.", ["state-change"]),
7601
+ mutation(["routing-group", "delete"], "team.deleteRoutingGroup", "Delete an unassigned routing group before play starts.", ["state-change", "delete"]),
7602
+ mutation(["routing-group", "set-stations"], "team.setRoutingGroupStations", "Replace a group's complete station route in the supplied order before play starts.", ["state-change"]),
7603
+ mutation(["routing-group", "assign-team"], "team.assignTeamRoutingGroup", "Assign a team to a routing group, or clear its assignment with groupId null, before play starts.", ["state-change"]),
7553
7604
  query(["template", "list"], "template.list", "List templates visible in an organization; global admins can include every organization."),
7554
7605
  query(["template", "get"], "template.getById", "Get a template visible in the requested organization; global admins can get any template."),
7555
7606
  mutation(["template", "create"], "template.create", "Create an organization template, including shared stations with optional per-team route order.", ["state-change"]),
@@ -7606,6 +7657,8 @@ var commands = [
7606
7657
  mutation(["player", "display-name", "update"], "event.updatePlayerDisplayName", "Update the player's display name.", ["state-change"]),
7607
7658
  mutation(["player", "resolve-join-code"], "event.resolveJoinCode", "Resolve an event or team join code.", []),
7608
7659
  mutation(["player", "station-check-in"], "event.createStationCheckInProof", "Create an expiring station check-in proof.", ["state-change"]),
7660
+ mutation(["player", "station", "start"], "event.startStation", "Start the current sequential station's shared mission timer and reveal its missions; required check-in still applies.", ["state-change"]),
7661
+ mutation(["player", "mission", "skip"], "event.skipMission", "Permanently skip one unresolved mission for zero points when enabled; retain other points and elapsed station time.", ["state-change"]),
7609
7662
  mutation(["player", "mission", "submit"], "event.submitMission", "Submit a mission response.", ["state-change"]),
7610
7663
  query(["public", "event-login"], "event.getPublicLoginDetails", "Get public event login details.", { requiresAuth: false }),
7611
7664
  query(["public", "results"], "event.getResultsPortal", "Get a shared public results portal.", { requiresAuth: false }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-labs-sg/gosh",
3
- "version": "0.8.3",
3
+ "version": "0.9.0",
4
4
  "description": "GOSH CLI for organizers and AI agents — manage organizations, events, teams, stations, missions, templates, and live operations through the GOSH API.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",