#6039: fix: improve type safety in gateway registration
cli
improvement : Added types for the methods calls
runDaemonInstall,
runDaemonRestart,
runDaemonStart,
runDaemonStatus,
runDaemonStop,
runDaemonUninstall,
in register.ts
from daemon-cli/types.js
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds explicit TypeScript option types to the gateway CLI command registrations (daemon lifecycle commands and the gateway RPC/health/probe commands) to improve type safety.
Most changes are local to `src/cli/gateway-cli/register.ts` and tighten the `.action()` handler signatures so downstream helpers like `runDaemon*` and `callGatewayCli` receive more precise option shapes.
<h3>Confidence Score: 3/5</h3>
- Likely safe, but there’s at least one import/type issue that may break type-checking in some setups.
- Changes are mostly type annotations and import reordering, but `DaemonInstallOptions`/`DaemonStatusOptions` are imported from `../daemon-cli.js` (a JS module) which is likely not exporting those types, and could cause build/typecheck failures depending on TS module resolution and how types are emitted/declared.
- src/cli/gateway-cli/register.ts
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
**Context used:**
- Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
- Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13))
<!-- /greptile_comment -->
Most Similar PRs
#8713: feat: gateway memory monitor, install linger, docs and failover
by quratus · 2026-02-04
77.0%
#6466: fix(gateway): add handshake timeout and connection error handling
by jarvis-raven · 2026-02-01
77.0%
#4653: fix(gateway): improve crash resilience for mDNS and network errors
by AyedAlmudarra · 2026-01-30
77.0%
#4243: fix: resolve Node.js punycode deprecation warning
by dylanneve1 · 2026-01-29
76.5%
#11147: fix(daemon): stop gateway by port when no daemon service is active
by jasonthewhale · 2026-02-07
75.2%
#8876: Confirmaciones para equipo de IT
by m4xjunior · 2026-02-04
75.2%
#13884: feat: Replace any types with proper TypeScript interfaces for bette...
by trevorgordon981 · 2026-02-11
75.0%
#6113: support ipv6
by DingProg · 2026-02-01
74.6%
#6064: fix(daemon): prefer bundled node from install-cli.sh over system node
by joyshmitz · 2026-02-01
74.6%
#21027: fix(tests): resolve TypeScript type errors in CLI test files
by kittipond2365 · 2026-02-19
74.6%