StepCode (StepFun's coding CLI, `step`) is a Pi fork that keeps Pi's
settings as TOML in ~/.stepcode/config.toml and Pi's models.json beside
it. It is now an agent target: Connect sets defaultProvider/defaultModel
to magpie, appends the magpie pattern to enabledModels when the user
scopes models, and writes providers.magpie into models.json with the
per-agent key. Disconnect puts back the user's own provider, model and
scope (only the patterns magpie added are taken out if the user changed
the scope since), restores or removes providers.magpie, and removes a
models.json magpie created. STEP_CODING_AGENT_DIR and STEPCODE_CONFIG_DIR
move the folder as StepCode's own resolveStepConfigRoot does; WSL is
covered.
The patch is BUKOWSKIREAL's (7cc88463 in their fork), reviewed line by
line: no network, telemetry or credential reads, writes only to the two
StepCode files and magpie's stash. Added here: a test that StepCode's
real User-Agent, "step (darwin 25.2.0; arm64)", counts as StepCode, and
the real-CLI test now looks for a "magpie" row in `step --list-models`
rather than the word anywhere (the docs path step prints can contain it).
Run:
- Config format checked against stepfun-ai/Step-Code at 3d70bae5 and the
official 0.1.3 darwin-arm64 binary (sha256 matches latest.json):
`step config path --json` names ~/.stepcode/config.toml and models.json.
- Sandbox HOME, sandbox gateway on 127.0.0.1:3647: a user config with
defaultProvider "step", step-3.7-flash, thinking high, two scoped
models, telemetry off. `magpie stepcode magpie/deepseek/deepseek-flash`,
then `step -p` answered PONG through the gateway (usage record: agent
stepcode, deepseek-flash, 200). `magpie stepcode default` put
config.toml back value for value, removed models.json, and
`step --list-models` no longer listed magpie.
- The same round trip from the real web page (sandbox `magpie web`),
switch on, then off through the disconnect preview, which listed the
three values it puts back; config.toml came back byte-identical. The
row and icon checked in Chromium and WebKit, en and zh; no GUI assets
change.
- Broke the guarantee: with unwire never restoring the defaults,
TestStepCodeLifecycle, ...NativeChangedAndPreexisting and
...StrictValidationAndRollback go red. Without the "step" alias the
new UA check goes red.
- MAGPIE_TEST_STEPCODE_BIN=<0.1.3> go test -run TestStepCodeRealCLISandbox
passes (it failed before the row check above).
- go test -tags nogui ./... ; gofmt -l; go vet (darwin, GOOS=linux,
GOOS=windows) on internal/agent and internal/agentenv; go build for
darwin, linux (nogui) and windows.
Not tried on a real Windows, Linux or WSL machine.
Co-authored-by: BUKOWSKIREAL <233685554+BUKOWSKIREAL@users.noreply.github.com>