feat(rust): Run console commands and Reward by console command (PLAN_REDESIGNS §16) #50
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/command-steps"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Two event steps in
server/eventCommands.json a new budget,rust.commands(D382–D385). There is no core change: the commands are core'smultiplestring field (MODULE_API 1.14.0), used as a free text box with no allowlist (D384). Each step has a required "I am sure" toggle.rust.command.run, Run console commands. It isirreversible/ledger, with up to 10 commands once on one server and optional teardown commands.<key>:teardown.rust.command.reward, Reward by console command. It isirreversible/none.linkedincluded, by Steam id, so no website account is needed. The bridge fills{steamid}and{name}, never the site.{steamid}/{name}in a run step.unknown-command,malformed,interrupted,failedandevents-disabledare permanent, and the error says how many commands ran before it.sidecarClient.commandsRun→POST /commands/run.ci/bundle.jsonlists the new file, andentry.test.jspins the new ids. README updated.Tested
npm test: 664 pass, including 21 new tests intest/commandSteps.test.js.check:imports,check:bundle,check:swaggerandcheck:engagementare clean.Pairs with Rust-Plugins (
command.run), Rust-Link (the forward) and docs (PROTOCOL §20.11, PLAN_REDESIGNS §16.10).🤖 Generated with Claude Code
https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
Two event steps in server/eventCommands.js, on one new budget, `rust.commands` (D382-D385): - rust.command.run: up to 10 typed commands once on one server, with optional teardown commands. irreversible / ledger: the ledger row keeps the teardown as it was, and core reverts it when the run ends or is cancelled. Priced one unit per command, teardown included. - rust.command.reward: the kit reward's recipient picker (tally modes and linked), by Steam id, so no website account is needed. The bridge fills {steamid} and {name}; offline recipients are skipped and named (D383). irreversible / none. Priced commands x people, the bound for a mode that is not a count. Both take core's `multiple` string field as a free text box (no allowlist, D384) and a required "I am sure" toggle. {steamid}/{name} in a run step are refused. unknown-command, malformed, events-disabled, interrupted are permanent; the error says how many ran before it. D385: the run also hands its teardown to the bridge, which keeps it with the key. A revert with only the key (the step failed, or its answer was lost, so core recorded nothing) asks every enabled server to run what it kept; a server the step never reached runs nothing. sidecarClient.commandsRun -> POST /commands/run; ci/bundle.json lists the new file; entry.test.js pins the new ids; 21 tests in test/commandSteps.test.js. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY