@go-labs-sg/gosh 1.1.0 → 1.2.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 +47 -0
- package/command-manifest.json +3 -3
- package/command-reference.md +3 -3
- package/dist/index.js +3 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -110,6 +110,53 @@ Commands use `--input '<json>'` for the exact validated tRPC input object. This
|
|
|
110
110
|
|
|
111
111
|
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 --filter @go-labs-sg/gosh generate:commands` from the repository root to regenerate the manifest, reference, and typed operations.
|
|
112
112
|
|
|
113
|
+
### Messages after submitting
|
|
114
|
+
|
|
115
|
+
`gosh mission create` and `gosh mission update` accept optional `revealMessage`
|
|
116
|
+
plain text (up to 2,000 characters, with line breaks) in `--input`. It is hidden
|
|
117
|
+
from players until their team/player has a submission, regardless of review
|
|
118
|
+
status. Skipping a mission does not reveal it. The player submit response includes
|
|
119
|
+
`revealMessage`, including already-completed submissions; station and map reads
|
|
120
|
+
include it only on submitted missions.
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
gosh mission create \
|
|
124
|
+
--input '{"stationId":"station-id","name":"Pavilion materials","type":"FILL_IN_THE_BLANK","points":10,"correctAnswer":"grocery bags","revealMessage":"The pavilion is clad with grocery bags.\nNotice how everyday materials are reused."}' \
|
|
125
|
+
--target station-id \
|
|
126
|
+
--allow-state-change
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
For updates, send the existing mission editor fields (including option IDs and
|
|
130
|
+
answer keys) together with `missionId` and `revealMessage`. Omitting
|
|
131
|
+
`revealMessage` preserves it; `"revealMessage":""` clears it. The message is
|
|
132
|
+
display-only and can change during a live event without changing grading or
|
|
133
|
+
saved playthroughs. Templates, station clones and event versions preserve it.
|
|
134
|
+
|
|
135
|
+
### Multiple accepted text answers
|
|
136
|
+
|
|
137
|
+
Fill-in-the-blank missions accept the primary `correctAnswer` or any of up to 50
|
|
138
|
+
`acceptedAnswers` (each trimmed, non-empty and at most 200 characters). Case and
|
|
139
|
+
repeated whitespace are ignored; no fuzzy or partial matching is used. Duplicate
|
|
140
|
+
alternatives are removed after normalization. Alternatives require a primary
|
|
141
|
+
answer and cannot be used for other mission types.
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
gosh mission create --input '{"stationId":"station-id","name":"Climbing plants","type":"FILL_IN_THE_BLANK","correctAnswer":"Mesh","acceptedAnswers":["Trellis","Scaffolding"]}'
|
|
145
|
+
gosh mission update --input '{"missionId":"mission-id","name":"Climbing plants","type":"FILL_IN_THE_BLANK","correctAnswer":"Mesh","acceptedAnswers":["Trellis","Frame","Scaffolding"]}'
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
When updating, omit `acceptedAnswers` to preserve the saved list or pass `[]` to
|
|
149
|
+
clear it. Alternative-answer changes affect future submissions only: stored
|
|
150
|
+
answers and awarded points are never re-graded. Existing restrictions on changing
|
|
151
|
+
the primary answer, mission type and choice options after submissions still apply.
|
|
152
|
+
Templates, station clones and saved event versions preserve alternatives. Answer
|
|
153
|
+
keys are visible to authorized admins/reviewers, never in player mission reads.
|
|
154
|
+
|
|
155
|
+
Deploy prerequisite: apply the additive GOSH database schema changes for both
|
|
156
|
+
`Mission.acceptedAnswers` and `GoshTemplateMission.acceptedAnswers`, each defaulting
|
|
157
|
+
to `[]`, before deploying the updated server. Older event snapshots restore an
|
|
158
|
+
empty list. Client generation alone does not apply these database changes.
|
|
159
|
+
|
|
113
160
|
### Templates and organization scope
|
|
114
161
|
|
|
115
162
|
Template commands use the selected organization as their scope. Provide its ID in
|
package/command-manifest.json
CHANGED
|
@@ -791,7 +791,7 @@
|
|
|
791
791
|
"path": ["mission", "create"],
|
|
792
792
|
"procedure": "event.createMission",
|
|
793
793
|
"requiresAuth": true,
|
|
794
|
-
"summary": "Create a mission in a station.",
|
|
794
|
+
"summary": "Create a mission in a station. Fill-in-the-blank inputs support correctAnswer and acceptedAnswers (up to 50 alternatives). Optional revealMessage (up to 2,000 characters) is shown only after submitting.",
|
|
795
795
|
"targetKeys": [
|
|
796
796
|
"id",
|
|
797
797
|
"memberId",
|
|
@@ -823,7 +823,7 @@
|
|
|
823
823
|
"path": ["mission", "update"],
|
|
824
824
|
"procedure": "event.updateMission",
|
|
825
825
|
"requiresAuth": true,
|
|
826
|
-
"summary": "Update a mission.",
|
|
826
|
+
"summary": "Update a mission. Fill-in-the-blank inputs support acceptedAnswers; omit to preserve or pass [] to clear. Existing submissions are not re-graded. Edit revealMessage during live play; omit it to preserve or use an empty string to clear.",
|
|
827
827
|
"targetKeys": [
|
|
828
828
|
"id",
|
|
829
829
|
"memberId",
|
|
@@ -2315,7 +2315,7 @@
|
|
|
2315
2315
|
"path": ["player", "mission", "submit"],
|
|
2316
2316
|
"procedure": "event.submitMission",
|
|
2317
2317
|
"requiresAuth": true,
|
|
2318
|
-
"summary": "Submit a mission response.",
|
|
2318
|
+
"summary": "Submit a mission response and return revealMessage, including already-completed submissions.",
|
|
2319
2319
|
"targetKeys": [
|
|
2320
2320
|
"id",
|
|
2321
2321
|
"memberId",
|
package/command-reference.md
CHANGED
|
@@ -332,7 +332,7 @@ Reorder shared stations, or a selected team's station route when scopeTeamId is
|
|
|
332
332
|
|
|
333
333
|
## `gosh mission create`
|
|
334
334
|
|
|
335
|
-
Create a mission in a station.
|
|
335
|
+
Create a mission in a station. Fill-in-the-blank inputs support correctAnswer and acceptedAnswers (up to 50 alternatives). Optional revealMessage (up to 2,000 characters) is shown only after submitting.
|
|
336
336
|
|
|
337
337
|
- Authentication: browser-authenticated CLI session required
|
|
338
338
|
- Input: `--input '<json>'` required
|
|
@@ -340,7 +340,7 @@ Create a mission in a station.
|
|
|
340
340
|
|
|
341
341
|
## `gosh mission update`
|
|
342
342
|
|
|
343
|
-
Update a mission.
|
|
343
|
+
Update a mission. Fill-in-the-blank inputs support acceptedAnswers; omit to preserve or pass [] to clear. Existing submissions are not re-graded. Edit revealMessage during live play; omit it to preserve or use an empty string to clear.
|
|
344
344
|
|
|
345
345
|
- Authentication: browser-authenticated CLI session required
|
|
346
346
|
- Input: `--input '<json>'` required
|
|
@@ -940,7 +940,7 @@ Permanently skip one unresolved mission for zero points when enabled; retain oth
|
|
|
940
940
|
|
|
941
941
|
## `gosh player mission submit`
|
|
942
942
|
|
|
943
|
-
Submit a mission response.
|
|
943
|
+
Submit a mission response and return revealMessage, including already-completed submissions.
|
|
944
944
|
|
|
945
945
|
- Authentication: browser-authenticated CLI session required
|
|
946
946
|
- Input: `--input '<json>'` required
|
package/dist/index.js
CHANGED
|
@@ -8017,10 +8017,8 @@ var commands = [
|
|
|
8017
8017
|
mutation(["station", "clone"], "event.cloneStation", "Clone a station and its missions.", ["state-change"]),
|
|
8018
8018
|
mutation(["station", "archive"], "event.archiveStation", "Archive a station.", ["state-change", "delete"]),
|
|
8019
8019
|
mutation(["station", "reorder"], "event.reorderStations", "Reorder shared stations, or a selected team's station route when scopeTeamId is supplied.", ["state-change"]),
|
|
8020
|
-
mutation(["mission", "create"], "event.createMission", "Create a mission in a station.", ["state-change"]),
|
|
8021
|
-
mutation(["mission", "update"], "event.updateMission", "Update a mission.", [
|
|
8022
|
-
"state-change"
|
|
8023
|
-
]),
|
|
8020
|
+
mutation(["mission", "create"], "event.createMission", "Create a mission in a station. Fill-in-the-blank inputs support correctAnswer and acceptedAnswers (up to 50 alternatives). Optional revealMessage (up to 2,000 characters) is shown only after submitting.", ["state-change"]),
|
|
8021
|
+
mutation(["mission", "update"], "event.updateMission", "Update a mission. Fill-in-the-blank inputs support acceptedAnswers; omit to preserve or pass [] to clear. Existing submissions are not re-graded. Edit revealMessage during live play; omit it to preserve or use an empty string to clear.", ["state-change"]),
|
|
8024
8022
|
mutation(["mission", "archive"], "event.archiveMission", "Archive a mission.", ["state-change", "delete"]),
|
|
8025
8023
|
mutation(["mission", "reorder"], "event.reorderMissions", "Reorder missions within a station.", ["state-change"]),
|
|
8026
8024
|
query(["team", "list"], "team.list", "List teams and their current members."),
|
|
@@ -8104,7 +8102,7 @@ var commands = [
|
|
|
8104
8102
|
mutation(["player", "station-check-in"], "event.createStationCheckInProof", "Create an expiring station check-in proof.", ["state-change"]),
|
|
8105
8103
|
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"]),
|
|
8106
8104
|
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"]),
|
|
8107
|
-
mutation(["player", "mission", "submit"], "event.submitMission", "Submit a mission response.", ["state-change"]),
|
|
8105
|
+
mutation(["player", "mission", "submit"], "event.submitMission", "Submit a mission response and return revealMessage, including already-completed submissions.", ["state-change"]),
|
|
8108
8106
|
query(["public", "event-login"], "event.getPublicLoginDetails", "Get public event login details.", { requiresAuth: false }),
|
|
8109
8107
|
query(["public", "results"], "event.getResultsPortal", "Get a shared public results portal.", { requiresAuth: false }),
|
|
8110
8108
|
mutation(["public", "request-login-code"], "event.requestLoginEmailOtp", "Send an event login email code.", ["email", "external-write"], { requiresAuth: false }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@go-labs-sg/gosh",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.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",
|