Skip to content

Commit e9b986c

Browse files
committed
feat(api): add log_path optional param to start_run
1 parent 719e3ff commit e9b986c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lua/api.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ end
235235

236236
---Starts a new game run with specified parameters
237237
---Call G.FUNCS.start_run() to start a new game run with specified parameters.
238+
---If log_path is provided, the run log will be saved to the specified full path (must include .jsonl extension), otherwise uses runs/timestamp.jsonl.
238239
---@param args StartRunArgs The run configuration
239240
API.functions["start_run"] = function(args)
240241
-- Validate required parameters
@@ -279,7 +280,7 @@ API.functions["start_run"] = function(args)
279280
G.GAME.challenge_name = args.challenge
280281

281282
-- Start the run
282-
G.FUNCS.start_run(nil, { stake = args.stake, seed = args.seed, challenge = challenge_obj })
283+
G.FUNCS.start_run(nil, { stake = args.stake, seed = args.seed, challenge = challenge_obj, log_path = args.log_path })
283284

284285
-- Defer sending response until the run has started
285286
---@type PendingRequest

0 commit comments

Comments
 (0)