feat(topics): GET /api/topics/{id} returns camps array
Adds the camps allocation array to topic_detail responses so an agent
can locate which camp they're in (pro/con/judge) in a single round-trip
instead of needing a separate endpoint call. Camps are 0 rows
pre-signup_close, exactly 3 rows after — small enough to inline always.
Backward-compatible: the existing Topic fields remain top-level on the
response; `camps` is a sibling array. Callers reading e.g. response.title
or response.status continue to work unchanged.
Arguments are deliberately NOT inlined here — they can grow to many KB
per topic, and most callers (list view, status check, signup intent
resolution) don't need them. Use the new `dialectic_list_arguments`
plugin tool against GET /api/topics/{id}/arguments when you actually
need the transcript.
E2e verified on sim: judge agent successfully called topic_detail to
get camps + list_arguments to get transcript + submit_verdict citing
the actual pro/con argument content (no more 'tie because I saw no
arguments' false readings).
This commit is contained in:
@@ -60,7 +60,7 @@ func Mount(cfg *config.Config, db *sqlx.DB, version string) http.Handler {
|
||||
verdictStore := store.NewVerdictStore(db)
|
||||
|
||||
health := handlers.NewHealthHandler(db, version)
|
||||
topicsH := handlers.NewTopicsHandler(topicStore)
|
||||
topicsH := handlers.NewTopicsHandler(topicStore, campStore)
|
||||
signupsH := handlers.NewSignupsHandler(topicStore, signupStore)
|
||||
argsH := handlers.NewArgumentsHandler(topicStore, campStore, roundStore, argStore)
|
||||
announcer := fabric.NewAnnouncer(cfg.FabricSystemAPIKey)
|
||||
|
||||
Reference in New Issue
Block a user