Skip to content

refactor(cli): port debug.sh to TypeScript #1296

@cv

Description

@cv

Summary

Port scripts/debug.sh (355 lines) to src/lib/debug.ts as part of the #924 shell consolidation.

This is the diagnostic collection script that gathers system info, Docker state, gateway logs, and sandbox status for nemoclaw debug. Currently implemented as a bash script that bin/nemoclaw.js shells out to.

Approach

  • Write src/lib/debug.ts using execa (not child_process) for subprocess execution
  • Replace bin/nemoclaw.js's spawnSync("bash", ["scripts/debug.sh", ...]) with a direct call to the TS module
  • Secret redaction must be preserved (the script filters API keys from output)
  • Follow the established pattern: TS source in src/lib/, compiled to dist/lib/ via npm run build:cli
  • Co-locate tests in src/lib/debug.test.ts, importing from ../../dist/lib/debug for coverage attribution

Context

Not blocked by

Any of the #924 blocker PRs (#781, #782, #819, #672, #794, #634).

Metadata

Metadata

Assignees

Labels

NemoClaw CLIUse this label to identify issues with the NemoClaw command-line interface (CLI).refactorThis is a refactor of the code and/or architecture.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions