Skip to content

simulate: Node agent support, --view mode, and TUI/start UX fixes#878

Open
u9g wants to merge 1 commit into
brian/agent-session-node-supportfrom
jason/simulate-node-agent-improvements
Open

simulate: Node agent support, --view mode, and TUI/start UX fixes#878
u9g wants to merge 1 commit into
brian/agent-session-node-supportfrom
jason/simulate-node-agent-improvements

Conversation

@u9g

@u9g u9g commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Ports our simulate work onto the Node-support branch (brian/agent-session-node-support). These changes originated on an older fork of the simulate TUI, so they're re-applied as fresh edits rather than cherry-picks.

Agent start / Node support

  • Use normalizeLogLevel for the agent's --log-level.
  • Only pass --log-format colored for Python (the Node CLI rejects it).
  • Default Node entrypoints main.ts / src/main.js (and src/ fallbacks).
  • Refuse entrypoint auto-discovery when package.json defines a build task and no entrypoint was given (build output paths are nontrivial).
  • Drop the Python-only guard so Node agents can be simulated.

lk agent simulate --view <runID>

  • New --view flag / modeView to open a pre-existing simulation.
  • Print the reopen command (lk agent simulate --view <runID>) when the TUI closes.

TUI UX

  • / enter to open a simulation's detail; / esc / backspace to go back (hints updated).
  • Richer agent-exit errors: include the command used to start the agent and its recent output (or "exited with no output").
  • Quit the TUI when the agent fails to register instead of hanging.

Intentionally not ported (already present in a different form on this branch): the exit()/confirmQuit refactor and the s save-scenario key — this branch has its own save overlay and quit handling.

Builds clean with go build and go vet -tags console.

Ports our simulate work onto the Node-support branch:
- Node agent start: normalizeLogLevel, --log-format only for Python,
  main.ts/main.js entrypoints, and refuse entrypoint discovery when
  package.json defines a build task; drop the Python-only guard.
- `lk agent simulate --view <runID>`: open a pre-existing simulation and
  print the reopen command on close.
- TUI: ←/→ arrow navigation in/out of simulation detail, richer
  agent-exit errors (start command + recent output), and quit when the
  agent fails to register.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant