#23225: add AgentCommandOpts type
commands
size: XS
Cluster:
UI Enhancements and Fixes
## Summary
- Problem:
type for localOpts is not defined
- Why it matters:
It is important to be type safe
- What changed:
Add the type for localOpts
- What did NOT change (scope boundary):
## Change Type (select all)
- [ ] Bug fix
- [ ] Feature
- [ ] Refactor
- [ ] Docs
- [x] Security hardening
- [ ] Chore/infra
## Scope (select all touched areas)
- [x] Gateway / orchestration
- [ ] Skills / tool execution
- [ ] Auth / tokens
- [ ] Memory / storage
- [ ] Integrations
- [ ] API / contracts
- [ ] UI / DX
- [ ] CI/CD / infra
## Linked Issue/PR
- Closes #
- Related #
## User-visible / Behavior Changes
List user-visible changes (including defaults/config).
If none, write `None`.
## Security Impact (required)
- New permissions/capabilities? (`Yes/No`)
- Secrets/tokens handling changed? (`Yes/No`)
- New/changed network calls? (`Yes/No`)
- Command/tool execution surface changed? (`Yes/No`)
- Data access scope changed? (`Yes/No`)
- If any `Yes`, explain risk + mitigation:
## Repro + Verification
### Environment
- OS:
- Runtime/container:
- Model/provider:
- Integration/channel (if any):
- Relevant config (redacted):
### Steps
1.
2.
3.
### Expected
-
### Actual
-
## Evidence
Attach at least one:
- [ ] Failing test/log before + passing after
- [ ] Trace/log snippets
- [ ] Screenshot/recording
- [ ] Perf numbers (if relevant)
## Human Verification (required)
What you personally verified (not just CI), and how:
- Verified scenarios:
- Edge cases checked:
- What you did **not** verify:
## Compatibility / Migration
- Backward compatible? (`Yes/No`)
- Config/env changes? (`Yes/No`)
- Migration needed? (`Yes/No`)
- If yes, exact upgrade steps:
## Failure Recovery (if this breaks)
- How to disable/revert this change quickly:
- Files/config to restore:
- Known bad symptoms reviewers should watch for:
## Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write `None`.
- Risk:
- Mitigation:
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Added explicit `AgentCommandOpts` type annotation to `localOpts` in `agentCliCommand` function. This improves type safety when transforming CLI options (which use `agent`/`replyAccount` fields) into agent command options (which use `agentId`/`replyAccountId` fields) before passing to `agentCommand()`.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- The change only adds a type annotation without modifying any runtime behavior. The type transformation is correct and the spread operator preserves all existing properties while adding the renamed fields. No logic changes, no new dependencies, no security implications.
- No files require special attention
<sub>Last reviewed commit: 81a9264</sub>
<!-- greptile_other_comments_section -->
<sub>(4/5) You can add custom instructions or style guidelines for the agent [here](https://app.greptile.com/review/github)!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#22977: fix(ui): resolve agent names from config in session dropdown
by NikhilGaddam · 2026-02-21
70.8%
#16362: Update session-pruning.md - updated agents.defaults config std
by elliottb · 2026-02-14
70.5%
#22707: fix: pass agentDir to runEmbeddedPiAgent in cron isolated sessions
by mrlerner · 2026-02-21
69.9%
#19329: feat: add per-agent compaction and context pruning overrides
by curtismercier · 2026-02-17
69.8%
#16685: Fix cli agents/approvals/discord routing edge cases
by craftowen · 2026-02-15
69.6%
#22607: feat(cli): add --omit-system-prompt flag to agent --json
by sleitor · 2026-02-21
69.5%
#7530: feat(agents): add description field for dynamic agent discovery
by gavinbmoore · 2026-02-02
69.1%
#12808: docs(subagents): clarify allowAgents is per-agent only
by JBrady · 2026-02-09
69.0%
#17770: refactor(cli): reuse shared option builders
by iyoda · 2026-02-16
68.9%
#19560: docs: refactor agent workspace default location & bootstrap configu...
by ashinkuniyil · 2026-02-17
68.9%