@go-labs-sg/gosh 0.5.0 → 0.7.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 +76 -0
- package/command-manifest.json +55 -5
- package/command-reference.md +29 -5
- package/dist/index.js +20 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,13 +65,75 @@ gosh help event list
|
|
|
65
65
|
gosh health status
|
|
66
66
|
gosh organization list
|
|
67
67
|
gosh event list --input '{"organizationId":"acme"}'
|
|
68
|
+
gosh event list-page --input '{"organizationId":"acme","page":1,"pageSize":25,"search":"race","status":"LIVE"}'
|
|
68
69
|
gosh event get --input '{"organizationId":"acme","eventId":"event-id"}'
|
|
69
70
|
```
|
|
70
71
|
|
|
71
72
|
Commands use `--input '<json>'` for the exact validated tRPC input object. This preserves the GOSH API's typed validation without maintaining a second set of lossy CLI flags. See [command-reference.md](./command-reference.md) or import `@go-labs-sg/gosh/command-manifest` for the generated catalogue.
|
|
72
73
|
|
|
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
|
+
|
|
73
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.
|
|
74
77
|
|
|
78
|
+
### Templates and organization scope
|
|
79
|
+
|
|
80
|
+
Template commands use the selected organization as their scope. Provide its ID in
|
|
81
|
+
the input when listing or retrieving a template:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
gosh template list --input '{"organizationId":"acme"}'
|
|
85
|
+
gosh template get --input '{"organizationId":"acme","templateId":"template-id"}'
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Organization members can use only templates from that organization. Global admins
|
|
89
|
+
can inspect templates from all organizations with `allOrganizations: true`, then
|
|
90
|
+
use any returned template when creating an event for a chosen organization:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
gosh template list --input '{"allOrganizations":true}'
|
|
94
|
+
gosh event create-from-template \
|
|
95
|
+
--input '{"name":"Team challenge","organizationId":"acme","templateId":"template-id"}' \
|
|
96
|
+
--target template-id \
|
|
97
|
+
--allow-state-change
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Shared stations and team routes
|
|
101
|
+
|
|
102
|
+
Create each station once for an event. In a team event, link the same station to
|
|
103
|
+
each team's route with its own order. `team set-station-routes` replaces one
|
|
104
|
+
team's complete route, so provide every station that team should see in order:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
gosh team station-routes --input '{"eventId":"event-id"}'
|
|
108
|
+
gosh team set-station-routes \
|
|
109
|
+
--input '{"eventId":"event-id","teamId":"team-red","stationIds":["station-2","station-1"]}' \
|
|
110
|
+
--target team-red \
|
|
111
|
+
--allow-state-change
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
To update an existing route's ordering without changing its station links, use
|
|
115
|
+
`gosh station reorder` with the team as `scopeTeamId`.
|
|
116
|
+
|
|
117
|
+
`gosh station clone` preserves the source station's team links when
|
|
118
|
+
`targetTeamId` is omitted, appending the clone to each linked team's route.
|
|
119
|
+
Provide a team ID to target only that team, or `null` to add the clone to the
|
|
120
|
+
event catalog without explicit team links.
|
|
121
|
+
|
|
122
|
+
When creating or replacing a template, each station can include `teamOrders` to
|
|
123
|
+
preserve its route order for specific teams. `teamOrder` identifies the matching
|
|
124
|
+
value in that template team's `order` field:
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"stations": [
|
|
129
|
+
{
|
|
130
|
+
"name": "Welcome station",
|
|
131
|
+
"teamOrders": [{ "teamOrder": 0, "order": 2 }]
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
75
137
|
### Local file uploads
|
|
76
138
|
|
|
77
139
|
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 +209,17 @@ Without the allow flags, an interactive terminal prints a workflow preview and r
|
|
|
147
209
|
## Output
|
|
148
210
|
|
|
149
211
|
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.
|
|
212
|
+
|
|
213
|
+
## Release verification
|
|
214
|
+
|
|
215
|
+
The `gosh-cli-v*` release workflow runs
|
|
216
|
+
`bun run packages/scripts/monorepo/verify-cli-release-baseline.ts gosh` to check
|
|
217
|
+
and typecheck the shared credential store, typecheck the retained test setup,
|
|
218
|
+
and check, typecheck, and build the GOSH CLI. It then validates the packed
|
|
219
|
+
artifact and runs both the installed entry point and `gosh version` before
|
|
220
|
+
publishing.
|
|
221
|
+
|
|
222
|
+
Behavior changes are verified with focused temporary tests before the PR,
|
|
223
|
+
following the repository's temporary-test workflow in `AGENTS.md`. Those tests
|
|
224
|
+
are removed before delivery, so the release workflow does not invoke the retired
|
|
225
|
+
credential-store, architecture, or product regression suites.
|
package/command-manifest.json
CHANGED
|
@@ -53,6 +53,15 @@
|
|
|
53
53
|
"requiresAuth": true,
|
|
54
54
|
"summary": "List active events in an organization."
|
|
55
55
|
},
|
|
56
|
+
{
|
|
57
|
+
"effects": [],
|
|
58
|
+
"input": "json",
|
|
59
|
+
"operation": "query",
|
|
60
|
+
"path": ["event", "list-page"],
|
|
61
|
+
"procedure": "event.listPage",
|
|
62
|
+
"requiresAuth": true,
|
|
63
|
+
"summary": "List a filtered page of organization events using page, pageSize, search, and status."
|
|
64
|
+
},
|
|
56
65
|
{
|
|
57
66
|
"effects": [],
|
|
58
67
|
"input": "json",
|
|
@@ -750,7 +759,7 @@
|
|
|
750
759
|
"path": ["station", "reorder"],
|
|
751
760
|
"procedure": "event.reorderStations",
|
|
752
761
|
"requiresAuth": true,
|
|
753
|
-
"summary": "Reorder
|
|
762
|
+
"summary": "Reorder shared stations, or a selected team's station route when scopeTeamId is supplied.",
|
|
754
763
|
"targetKeys": [
|
|
755
764
|
"id",
|
|
756
765
|
"memberId",
|
|
@@ -912,6 +921,15 @@
|
|
|
912
921
|
"requiresAuth": true,
|
|
913
922
|
"summary": "List teams and their current members."
|
|
914
923
|
},
|
|
924
|
+
{
|
|
925
|
+
"effects": [],
|
|
926
|
+
"input": "json",
|
|
927
|
+
"operation": "query",
|
|
928
|
+
"path": ["team", "station-routes"],
|
|
929
|
+
"procedure": "team.getStationRoutes",
|
|
930
|
+
"requiresAuth": true,
|
|
931
|
+
"summary": "List each team's linked stations and team-specific route order."
|
|
932
|
+
},
|
|
915
933
|
{
|
|
916
934
|
"effects": ["state-change"],
|
|
917
935
|
"input": "json",
|
|
@@ -1104,6 +1122,38 @@
|
|
|
1104
1122
|
"name"
|
|
1105
1123
|
]
|
|
1106
1124
|
},
|
|
1125
|
+
{
|
|
1126
|
+
"effects": ["state-change"],
|
|
1127
|
+
"input": "json",
|
|
1128
|
+
"operation": "mutation",
|
|
1129
|
+
"path": ["team", "set-station-routes"],
|
|
1130
|
+
"procedure": "team.setStationRoutes",
|
|
1131
|
+
"requiresAuth": true,
|
|
1132
|
+
"summary": "Replace a team's linked station route and set its order.",
|
|
1133
|
+
"targetKeys": [
|
|
1134
|
+
"id",
|
|
1135
|
+
"memberId",
|
|
1136
|
+
"invitationId",
|
|
1137
|
+
"broadcastId",
|
|
1138
|
+
"rewardId",
|
|
1139
|
+
"submissionId",
|
|
1140
|
+
"participantId",
|
|
1141
|
+
"participantIds",
|
|
1142
|
+
"missionId",
|
|
1143
|
+
"stationId",
|
|
1144
|
+
"teamId",
|
|
1145
|
+
"templateId",
|
|
1146
|
+
"eventId",
|
|
1147
|
+
"organizationId",
|
|
1148
|
+
"userId",
|
|
1149
|
+
"key",
|
|
1150
|
+
"uploadId",
|
|
1151
|
+
"email",
|
|
1152
|
+
"joinCode",
|
|
1153
|
+
"slug",
|
|
1154
|
+
"name"
|
|
1155
|
+
]
|
|
1156
|
+
},
|
|
1107
1157
|
{
|
|
1108
1158
|
"effects": [],
|
|
1109
1159
|
"input": "json",
|
|
@@ -1111,7 +1161,7 @@
|
|
|
1111
1161
|
"path": ["template", "list"],
|
|
1112
1162
|
"procedure": "template.list",
|
|
1113
1163
|
"requiresAuth": true,
|
|
1114
|
-
"summary": "List
|
|
1164
|
+
"summary": "List templates visible in an organization; global admins can include every organization."
|
|
1115
1165
|
},
|
|
1116
1166
|
{
|
|
1117
1167
|
"effects": [],
|
|
@@ -1120,7 +1170,7 @@
|
|
|
1120
1170
|
"path": ["template", "get"],
|
|
1121
1171
|
"procedure": "template.getById",
|
|
1122
1172
|
"requiresAuth": true,
|
|
1123
|
-
"summary": "Get a template
|
|
1173
|
+
"summary": "Get a template visible in the requested organization; global admins can get any template."
|
|
1124
1174
|
},
|
|
1125
1175
|
{
|
|
1126
1176
|
"effects": ["state-change"],
|
|
@@ -1129,7 +1179,7 @@
|
|
|
1129
1179
|
"path": ["template", "create"],
|
|
1130
1180
|
"procedure": "template.create",
|
|
1131
1181
|
"requiresAuth": true,
|
|
1132
|
-
"summary": "Create an organization template.",
|
|
1182
|
+
"summary": "Create an organization template, including shared stations with optional per-team route order.",
|
|
1133
1183
|
"targetKeys": ["organizationId", "name"]
|
|
1134
1184
|
},
|
|
1135
1185
|
{
|
|
@@ -1139,7 +1189,7 @@
|
|
|
1139
1189
|
"path": ["template", "update"],
|
|
1140
1190
|
"procedure": "template.update",
|
|
1141
1191
|
"requiresAuth": true,
|
|
1142
|
-
"summary": "Replace a template's setup.",
|
|
1192
|
+
"summary": "Replace a template's setup, including shared stations with optional per-team route order.",
|
|
1143
1193
|
"targetKeys": [
|
|
1144
1194
|
"id",
|
|
1145
1195
|
"memberId",
|
package/command-reference.md
CHANGED
|
@@ -50,6 +50,14 @@ List active events in an organization.
|
|
|
50
50
|
- Input: `--input '<json>'` required
|
|
51
51
|
- Effects: read-only
|
|
52
52
|
|
|
53
|
+
## `gosh event list-page`
|
|
54
|
+
|
|
55
|
+
List a filtered page of organization events using page, pageSize, search, and status.
|
|
56
|
+
|
|
57
|
+
- Authentication: browser-authenticated CLI session required
|
|
58
|
+
- Input: `--input '<json>'` required
|
|
59
|
+
- Effects: read-only
|
|
60
|
+
|
|
53
61
|
## `gosh event get`
|
|
54
62
|
|
|
55
63
|
Get an event by ID or slug.
|
|
@@ -316,7 +324,7 @@ Archive a station.
|
|
|
316
324
|
|
|
317
325
|
## `gosh station reorder`
|
|
318
326
|
|
|
319
|
-
Reorder
|
|
327
|
+
Reorder shared stations, or a selected team's station route when scopeTeamId is supplied.
|
|
320
328
|
|
|
321
329
|
- Authentication: browser-authenticated CLI session required
|
|
322
330
|
- Input: `--input '<json>'` required
|
|
@@ -362,6 +370,14 @@ List teams and their current members.
|
|
|
362
370
|
- Input: `--input '<json>'` required
|
|
363
371
|
- Effects: read-only
|
|
364
372
|
|
|
373
|
+
## `gosh team station-routes`
|
|
374
|
+
|
|
375
|
+
List each team's linked stations and team-specific route order.
|
|
376
|
+
|
|
377
|
+
- Authentication: browser-authenticated CLI session required
|
|
378
|
+
- Input: `--input '<json>'` required
|
|
379
|
+
- Effects: read-only
|
|
380
|
+
|
|
365
381
|
## `gosh team create`
|
|
366
382
|
|
|
367
383
|
Create a team.
|
|
@@ -410,9 +426,17 @@ Change who can submit missions in team play.
|
|
|
410
426
|
- Input: `--input '<json>'` required
|
|
411
427
|
- Effects: state-change
|
|
412
428
|
|
|
429
|
+
## `gosh team set-station-routes`
|
|
430
|
+
|
|
431
|
+
Replace a team's linked station route and set its order.
|
|
432
|
+
|
|
433
|
+
- Authentication: browser-authenticated CLI session required
|
|
434
|
+
- Input: `--input '<json>'` required
|
|
435
|
+
- Effects: state-change
|
|
436
|
+
|
|
413
437
|
## `gosh template list`
|
|
414
438
|
|
|
415
|
-
List
|
|
439
|
+
List templates visible in an organization; global admins can include every organization.
|
|
416
440
|
|
|
417
441
|
- Authentication: browser-authenticated CLI session required
|
|
418
442
|
- Input: `--input '<json>'` required
|
|
@@ -420,7 +444,7 @@ List system and organization templates.
|
|
|
420
444
|
|
|
421
445
|
## `gosh template get`
|
|
422
446
|
|
|
423
|
-
Get a template
|
|
447
|
+
Get a template visible in the requested organization; global admins can get any template.
|
|
424
448
|
|
|
425
449
|
- Authentication: browser-authenticated CLI session required
|
|
426
450
|
- Input: `--input '<json>'` required
|
|
@@ -428,7 +452,7 @@ Get a template by ID.
|
|
|
428
452
|
|
|
429
453
|
## `gosh template create`
|
|
430
454
|
|
|
431
|
-
Create an organization template.
|
|
455
|
+
Create an organization template, including shared stations with optional per-team route order.
|
|
432
456
|
|
|
433
457
|
- Authentication: browser-authenticated CLI session required
|
|
434
458
|
- Input: `--input '<json>'` required
|
|
@@ -436,7 +460,7 @@ Create an organization template.
|
|
|
436
460
|
|
|
437
461
|
## `gosh template update`
|
|
438
462
|
|
|
439
|
-
Replace a template's setup.
|
|
463
|
+
Replace a template's setup, including shared stations with optional per-team route order.
|
|
440
464
|
|
|
441
465
|
- Authentication: browser-authenticated CLI session required
|
|
442
466
|
- Input: `--input '<json>'` required
|
package/dist/index.js
CHANGED
|
@@ -19912,6 +19912,10 @@ var typedOperations = {
|
|
|
19912
19912
|
kind: "query",
|
|
19913
19913
|
invoke: (client, input2) => client.event.list.query(input2)
|
|
19914
19914
|
},
|
|
19915
|
+
"event.listPage": {
|
|
19916
|
+
kind: "query",
|
|
19917
|
+
invoke: (client, input2) => client.event.listPage.query(input2)
|
|
19918
|
+
},
|
|
19915
19919
|
"event.getById": {
|
|
19916
19920
|
kind: "query",
|
|
19917
19921
|
invoke: (client, input2) => client.event.getById.query(input2)
|
|
@@ -20068,6 +20072,10 @@ var typedOperations = {
|
|
|
20068
20072
|
kind: "query",
|
|
20069
20073
|
invoke: (client, input2) => client.team.list.query(input2)
|
|
20070
20074
|
},
|
|
20075
|
+
"team.getStationRoutes": {
|
|
20076
|
+
kind: "query",
|
|
20077
|
+
invoke: (client, input2) => client.team.getStationRoutes.query(input2)
|
|
20078
|
+
},
|
|
20071
20079
|
"team.create": {
|
|
20072
20080
|
kind: "mutation",
|
|
20073
20081
|
invoke: (client, input2) => client.team.create.mutate(input2)
|
|
@@ -20092,6 +20100,10 @@ var typedOperations = {
|
|
|
20092
20100
|
kind: "mutation",
|
|
20093
20101
|
invoke: (client, input2) => client.team.setSubmissionAccess.mutate(input2)
|
|
20094
20102
|
},
|
|
20103
|
+
"team.setStationRoutes": {
|
|
20104
|
+
kind: "mutation",
|
|
20105
|
+
invoke: (client, input2) => client.team.setStationRoutes.mutate(input2)
|
|
20106
|
+
},
|
|
20095
20107
|
"template.list": {
|
|
20096
20108
|
kind: "query",
|
|
20097
20109
|
invoke: (client, input2) => client.template.list.query(input2)
|
|
@@ -20526,6 +20538,7 @@ var commands = [
|
|
|
20526
20538
|
query(["organization", "get"], "organization.getById", "Get one organization by ID or slug."),
|
|
20527
20539
|
query(["organization", "members"], "organization.listMembers", "List an organization's members and pending invitations."),
|
|
20528
20540
|
query(["event", "list"], "event.list", "List active events in an organization."),
|
|
20541
|
+
query(["event", "list-page"], "event.listPage", "List a filtered page of organization events using page, pageSize, search, and status."),
|
|
20529
20542
|
query(["event", "get"], "event.getById", "Get an event by ID or slug."),
|
|
20530
20543
|
query(["event", "setup"], "event.getAdminSetup", "Get the organizer setup view for an event."),
|
|
20531
20544
|
query(["event", "participants"], "event.getAdminParticipants", "Get the organizer participant view for an event."),
|
|
@@ -20565,7 +20578,7 @@ var commands = [
|
|
|
20565
20578
|
]),
|
|
20566
20579
|
mutation(["station", "clone"], "event.cloneStation", "Clone a station and its missions.", ["state-change"]),
|
|
20567
20580
|
mutation(["station", "archive"], "event.archiveStation", "Archive a station.", ["state-change", "delete"]),
|
|
20568
|
-
mutation(["station", "reorder"], "event.reorderStations", "Reorder
|
|
20581
|
+
mutation(["station", "reorder"], "event.reorderStations", "Reorder shared stations, or a selected team's station route when scopeTeamId is supplied.", ["state-change"]),
|
|
20569
20582
|
mutation(["mission", "create"], "event.createMission", "Create a mission in a station.", ["state-change"]),
|
|
20570
20583
|
mutation(["mission", "update"], "event.updateMission", "Update a mission.", [
|
|
20571
20584
|
"state-change"
|
|
@@ -20573,6 +20586,7 @@ var commands = [
|
|
|
20573
20586
|
mutation(["mission", "archive"], "event.archiveMission", "Archive a mission.", ["state-change", "delete"]),
|
|
20574
20587
|
mutation(["mission", "reorder"], "event.reorderMissions", "Reorder missions within a station.", ["state-change"]),
|
|
20575
20588
|
query(["team", "list"], "team.list", "List teams and their current members."),
|
|
20589
|
+
query(["team", "station-routes"], "team.getStationRoutes", "List each team's linked stations and team-specific route order."),
|
|
20576
20590
|
mutation(["team", "create"], "team.create", "Create a team.", [
|
|
20577
20591
|
"state-change"
|
|
20578
20592
|
]),
|
|
@@ -20583,10 +20597,11 @@ var commands = [
|
|
|
20583
20597
|
mutation(["team", "remove-member"], "team.removeMember", "Remove a member from a team.", ["state-change", "delete"]),
|
|
20584
20598
|
mutation(["team", "set-play-mode"], "team.setPlayMode", "Change an event between individual and team play.", ["state-change"]),
|
|
20585
20599
|
mutation(["team", "set-submission-access"], "team.setSubmissionAccess", "Change who can submit missions in team play.", ["state-change"]),
|
|
20586
|
-
|
|
20587
|
-
query(["template", "
|
|
20588
|
-
|
|
20589
|
-
mutation(["template", "
|
|
20600
|
+
mutation(["team", "set-station-routes"], "team.setStationRoutes", "Replace a team's linked station route and set its order.", ["state-change"]),
|
|
20601
|
+
query(["template", "list"], "template.list", "List templates visible in an organization; global admins can include every organization."),
|
|
20602
|
+
query(["template", "get"], "template.getById", "Get a template visible in the requested organization; global admins can get any template."),
|
|
20603
|
+
mutation(["template", "create"], "template.create", "Create an organization template, including shared stations with optional per-team route order.", ["state-change"]),
|
|
20604
|
+
mutation(["template", "update"], "template.update", "Replace a template's setup, including shared stations with optional per-team route order.", ["state-change"]),
|
|
20590
20605
|
mutation(["template", "update-metadata"], "template.updateMetadata", "Update template metadata.", ["state-change"]),
|
|
20591
20606
|
mutation(["template", "delete"], "template.delete", "Delete a template.", [
|
|
20592
20607
|
"state-change",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@go-labs-sg/gosh",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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",
|