@go-labs-sg/gosh 0.5.0 → 0.6.1

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
@@ -72,6 +72,65 @@ Commands use `--input '<json>'` for the exact validated tRPC input object. This
72
72
 
73
73
  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.
74
74
 
75
+ ### Templates and organization scope
76
+
77
+ Template commands use the selected organization as their scope. Provide its ID in
78
+ the input when listing or retrieving a template:
79
+
80
+ ```bash
81
+ gosh template list --input '{"organizationId":"acme"}'
82
+ gosh template get --input '{"organizationId":"acme","templateId":"template-id"}'
83
+ ```
84
+
85
+ Organization members can use only templates from that organization. Global admins
86
+ can inspect templates from all organizations with `allOrganizations: true`, then
87
+ use any returned template when creating an event for a chosen organization:
88
+
89
+ ```bash
90
+ gosh template list --input '{"allOrganizations":true}'
91
+ gosh event create-from-template \
92
+ --input '{"name":"Team challenge","organizationId":"acme","templateId":"template-id"}' \
93
+ --target template-id \
94
+ --allow-state-change
95
+ ```
96
+
97
+ ### Shared stations and team routes
98
+
99
+ Create each station once for an event. In a team event, link the same station to
100
+ each team's route with its own order. `team set-station-routes` replaces one
101
+ team's complete route, so provide every station that team should see in order:
102
+
103
+ ```bash
104
+ gosh team station-routes --input '{"eventId":"event-id"}'
105
+ gosh team set-station-routes \
106
+ --input '{"eventId":"event-id","teamId":"team-red","stationIds":["station-2","station-1"]}' \
107
+ --target team-red \
108
+ --allow-state-change
109
+ ```
110
+
111
+ To update an existing route's ordering without changing its station links, use
112
+ `gosh station reorder` with the team as `scopeTeamId`.
113
+
114
+ `gosh station clone` preserves the source station's team links when
115
+ `targetTeamId` is omitted, appending the clone to each linked team's route.
116
+ Provide a team ID to target only that team, or `null` to add the clone to the
117
+ event catalog without explicit team links.
118
+
119
+ When creating or replacing a template, each station can include `teamOrders` to
120
+ preserve its route order for specific teams. `teamOrder` identifies the matching
121
+ value in that template team's `order` field:
122
+
123
+ ```json
124
+ {
125
+ "stations": [
126
+ {
127
+ "name": "Welcome station",
128
+ "teamOrders": [{ "teamOrder": 0, "order": 2 }]
129
+ }
130
+ ]
131
+ }
132
+ ```
133
+
75
134
  ### Local file uploads
76
135
 
77
136
  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:
@@ -147,3 +206,17 @@ Without the allow flags, an interactive terminal prints a workflow preview and r
147
206
  ## Output
148
207
 
149
208
  One-shot commands write one JSON envelope to stdout. Watch commands write newline-delimited JSON envelopes. Failures and opt-in `--debug` diagnostics go to stderr, and known secrets, payloads, join codes, share tokens, and signed URLs are redacted. `--quiet` or `-q` suppresses diagnostics.
209
+
210
+ ## Release verification
211
+
212
+ The `gosh-cli-v*` release workflow runs
213
+ `bun run packages/scripts/monorepo/verify-cli-release-baseline.ts gosh` to check
214
+ and typecheck the shared credential store, typecheck the retained test setup,
215
+ and check, typecheck, and build the GOSH CLI. It then validates the packed
216
+ artifact and runs both the installed entry point and `gosh version` before
217
+ publishing.
218
+
219
+ Behavior changes are verified with focused temporary tests before the PR,
220
+ following the repository's temporary-test workflow in `AGENTS.md`. Those tests
221
+ are removed before delivery, so the release workflow does not invoke the retired
222
+ credential-store, architecture, or product regression suites.
@@ -750,7 +750,7 @@
750
750
  "path": ["station", "reorder"],
751
751
  "procedure": "event.reorderStations",
752
752
  "requiresAuth": true,
753
- "summary": "Reorder an event's stations.",
753
+ "summary": "Reorder shared stations, or a selected team's station route when scopeTeamId is supplied.",
754
754
  "targetKeys": [
755
755
  "id",
756
756
  "memberId",
@@ -912,6 +912,15 @@
912
912
  "requiresAuth": true,
913
913
  "summary": "List teams and their current members."
914
914
  },
915
+ {
916
+ "effects": [],
917
+ "input": "json",
918
+ "operation": "query",
919
+ "path": ["team", "station-routes"],
920
+ "procedure": "team.getStationRoutes",
921
+ "requiresAuth": true,
922
+ "summary": "List each team's linked stations and team-specific route order."
923
+ },
915
924
  {
916
925
  "effects": ["state-change"],
917
926
  "input": "json",
@@ -1104,6 +1113,38 @@
1104
1113
  "name"
1105
1114
  ]
1106
1115
  },
1116
+ {
1117
+ "effects": ["state-change"],
1118
+ "input": "json",
1119
+ "operation": "mutation",
1120
+ "path": ["team", "set-station-routes"],
1121
+ "procedure": "team.setStationRoutes",
1122
+ "requiresAuth": true,
1123
+ "summary": "Replace a team's linked station route and set its order.",
1124
+ "targetKeys": [
1125
+ "id",
1126
+ "memberId",
1127
+ "invitationId",
1128
+ "broadcastId",
1129
+ "rewardId",
1130
+ "submissionId",
1131
+ "participantId",
1132
+ "participantIds",
1133
+ "missionId",
1134
+ "stationId",
1135
+ "teamId",
1136
+ "templateId",
1137
+ "eventId",
1138
+ "organizationId",
1139
+ "userId",
1140
+ "key",
1141
+ "uploadId",
1142
+ "email",
1143
+ "joinCode",
1144
+ "slug",
1145
+ "name"
1146
+ ]
1147
+ },
1107
1148
  {
1108
1149
  "effects": [],
1109
1150
  "input": "json",
@@ -1111,7 +1152,7 @@
1111
1152
  "path": ["template", "list"],
1112
1153
  "procedure": "template.list",
1113
1154
  "requiresAuth": true,
1114
- "summary": "List system and organization templates."
1155
+ "summary": "List templates visible in an organization; global admins can include every organization."
1115
1156
  },
1116
1157
  {
1117
1158
  "effects": [],
@@ -1120,7 +1161,7 @@
1120
1161
  "path": ["template", "get"],
1121
1162
  "procedure": "template.getById",
1122
1163
  "requiresAuth": true,
1123
- "summary": "Get a template by ID."
1164
+ "summary": "Get a template visible in the requested organization; global admins can get any template."
1124
1165
  },
1125
1166
  {
1126
1167
  "effects": ["state-change"],
@@ -1129,7 +1170,7 @@
1129
1170
  "path": ["template", "create"],
1130
1171
  "procedure": "template.create",
1131
1172
  "requiresAuth": true,
1132
- "summary": "Create an organization template.",
1173
+ "summary": "Create an organization template, including shared stations with optional per-team route order.",
1133
1174
  "targetKeys": ["organizationId", "name"]
1134
1175
  },
1135
1176
  {
@@ -1139,7 +1180,7 @@
1139
1180
  "path": ["template", "update"],
1140
1181
  "procedure": "template.update",
1141
1182
  "requiresAuth": true,
1142
- "summary": "Replace a template's setup.",
1183
+ "summary": "Replace a template's setup, including shared stations with optional per-team route order.",
1143
1184
  "targetKeys": [
1144
1185
  "id",
1145
1186
  "memberId",
@@ -316,7 +316,7 @@ Archive a station.
316
316
 
317
317
  ## `gosh station reorder`
318
318
 
319
- Reorder an event's stations.
319
+ Reorder shared stations, or a selected team's station route when scopeTeamId is supplied.
320
320
 
321
321
  - Authentication: browser-authenticated CLI session required
322
322
  - Input: `--input '<json>'` required
@@ -362,6 +362,14 @@ List teams and their current members.
362
362
  - Input: `--input '<json>'` required
363
363
  - Effects: read-only
364
364
 
365
+ ## `gosh team station-routes`
366
+
367
+ List each team's linked stations and team-specific route order.
368
+
369
+ - Authentication: browser-authenticated CLI session required
370
+ - Input: `--input '<json>'` required
371
+ - Effects: read-only
372
+
365
373
  ## `gosh team create`
366
374
 
367
375
  Create a team.
@@ -410,9 +418,17 @@ Change who can submit missions in team play.
410
418
  - Input: `--input '<json>'` required
411
419
  - Effects: state-change
412
420
 
421
+ ## `gosh team set-station-routes`
422
+
423
+ Replace a team's linked station route and set its order.
424
+
425
+ - Authentication: browser-authenticated CLI session required
426
+ - Input: `--input '<json>'` required
427
+ - Effects: state-change
428
+
413
429
  ## `gosh template list`
414
430
 
415
- List system and organization templates.
431
+ List templates visible in an organization; global admins can include every organization.
416
432
 
417
433
  - Authentication: browser-authenticated CLI session required
418
434
  - Input: `--input '<json>'` required
@@ -420,7 +436,7 @@ List system and organization templates.
420
436
 
421
437
  ## `gosh template get`
422
438
 
423
- Get a template by ID.
439
+ Get a template visible in the requested organization; global admins can get any template.
424
440
 
425
441
  - Authentication: browser-authenticated CLI session required
426
442
  - Input: `--input '<json>'` required
@@ -428,7 +444,7 @@ Get a template by ID.
428
444
 
429
445
  ## `gosh template create`
430
446
 
431
- Create an organization template.
447
+ Create an organization template, including shared stations with optional per-team route order.
432
448
 
433
449
  - Authentication: browser-authenticated CLI session required
434
450
  - Input: `--input '<json>'` required
@@ -436,7 +452,7 @@ Create an organization template.
436
452
 
437
453
  ## `gosh template update`
438
454
 
439
- Replace a template's setup.
455
+ Replace a template's setup, including shared stations with optional per-team route order.
440
456
 
441
457
  - Authentication: browser-authenticated CLI session required
442
458
  - Input: `--input '<json>'` required
package/dist/index.js CHANGED
@@ -20068,6 +20068,10 @@ var typedOperations = {
20068
20068
  kind: "query",
20069
20069
  invoke: (client, input2) => client.team.list.query(input2)
20070
20070
  },
20071
+ "team.getStationRoutes": {
20072
+ kind: "query",
20073
+ invoke: (client, input2) => client.team.getStationRoutes.query(input2)
20074
+ },
20071
20075
  "team.create": {
20072
20076
  kind: "mutation",
20073
20077
  invoke: (client, input2) => client.team.create.mutate(input2)
@@ -20092,6 +20096,10 @@ var typedOperations = {
20092
20096
  kind: "mutation",
20093
20097
  invoke: (client, input2) => client.team.setSubmissionAccess.mutate(input2)
20094
20098
  },
20099
+ "team.setStationRoutes": {
20100
+ kind: "mutation",
20101
+ invoke: (client, input2) => client.team.setStationRoutes.mutate(input2)
20102
+ },
20095
20103
  "template.list": {
20096
20104
  kind: "query",
20097
20105
  invoke: (client, input2) => client.template.list.query(input2)
@@ -20565,7 +20573,7 @@ var commands = [
20565
20573
  ]),
20566
20574
  mutation(["station", "clone"], "event.cloneStation", "Clone a station and its missions.", ["state-change"]),
20567
20575
  mutation(["station", "archive"], "event.archiveStation", "Archive a station.", ["state-change", "delete"]),
20568
- mutation(["station", "reorder"], "event.reorderStations", "Reorder an event's stations.", ["state-change"]),
20576
+ mutation(["station", "reorder"], "event.reorderStations", "Reorder shared stations, or a selected team's station route when scopeTeamId is supplied.", ["state-change"]),
20569
20577
  mutation(["mission", "create"], "event.createMission", "Create a mission in a station.", ["state-change"]),
20570
20578
  mutation(["mission", "update"], "event.updateMission", "Update a mission.", [
20571
20579
  "state-change"
@@ -20573,6 +20581,7 @@ var commands = [
20573
20581
  mutation(["mission", "archive"], "event.archiveMission", "Archive a mission.", ["state-change", "delete"]),
20574
20582
  mutation(["mission", "reorder"], "event.reorderMissions", "Reorder missions within a station.", ["state-change"]),
20575
20583
  query(["team", "list"], "team.list", "List teams and their current members."),
20584
+ query(["team", "station-routes"], "team.getStationRoutes", "List each team's linked stations and team-specific route order."),
20576
20585
  mutation(["team", "create"], "team.create", "Create a team.", [
20577
20586
  "state-change"
20578
20587
  ]),
@@ -20583,10 +20592,11 @@ var commands = [
20583
20592
  mutation(["team", "remove-member"], "team.removeMember", "Remove a member from a team.", ["state-change", "delete"]),
20584
20593
  mutation(["team", "set-play-mode"], "team.setPlayMode", "Change an event between individual and team play.", ["state-change"]),
20585
20594
  mutation(["team", "set-submission-access"], "team.setSubmissionAccess", "Change who can submit missions in team play.", ["state-change"]),
20586
- query(["template", "list"], "template.list", "List system and organization templates."),
20587
- query(["template", "get"], "template.getById", "Get a template by ID."),
20588
- mutation(["template", "create"], "template.create", "Create an organization template.", ["state-change"]),
20589
- mutation(["template", "update"], "template.update", "Replace a template's setup.", ["state-change"]),
20595
+ mutation(["team", "set-station-routes"], "team.setStationRoutes", "Replace a team's linked station route and set its order.", ["state-change"]),
20596
+ query(["template", "list"], "template.list", "List templates visible in an organization; global admins can include every organization."),
20597
+ query(["template", "get"], "template.getById", "Get a template visible in the requested organization; global admins can get any template."),
20598
+ mutation(["template", "create"], "template.create", "Create an organization template, including shared stations with optional per-team route order.", ["state-change"]),
20599
+ mutation(["template", "update"], "template.update", "Replace a template's setup, including shared stations with optional per-team route order.", ["state-change"]),
20590
20600
  mutation(["template", "update-metadata"], "template.updateMetadata", "Update template metadata.", ["state-change"]),
20591
20601
  mutation(["template", "delete"], "template.delete", "Delete a template.", [
20592
20602
  "state-change",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-labs-sg/gosh",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
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",