Skip to content

feat(tarko-agent-cli): support unknown options passthrough#1574

Merged
ulivz merged 5 commits intomainfrom
feat/agent-cli-unknown-options
Sep 19, 2025
Merged

feat(tarko-agent-cli): support unknown options passthrough#1574
ulivz merged 5 commits intomainfrom
feat/agent-cli-unknown-options

Conversation

@ulivz
Copy link
Member

@ulivz ulivz commented Sep 19, 2025

Summary

Enable unknownOptions passthrough for @tarko/agent-cli to support agent-specific CLI options like --aio-sandbox.

This allows commands like:

tarko run agent-tars --aio-sandbox XXX

Then the Agent Constructor will receive following Agent Options:

{
   aioSandbox: 'XXX',
   // ... rest options
}

Previously:

  • Unknown options like --aio-sandbox would throw CACError: Unknown option
  • Even if CAC allowed them, they were filtered out during config building

Now unknown options are properly passed through to the underlying agent implementation via appConfig.

Checklist

  • Added or updated necessary tests (Optional).
  • Updated documentation to align with changes (Optional).
  • Verified no breaking changes, or prepared solutions for any occurring breaking changes (Optional).
  • My change does not involve the above items.

Enable allowUnknownOptions() for serve and run commands to support
agent-specific CLI options like --aio-sandbox for agent-tars.
@netlify
Copy link

netlify bot commented Sep 19, 2025

Deploy Preview for agent-tars-docs ready!

Name Link
🔨 Latest commit b3432d9
🔍 Latest deploy log https://app.netlify.com/projects/agent-tars-docs/deploys/68ccdb68a19a2a0008b45187
😎 Deploy Preview https://deploy-preview-1574--agent-tars-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Ensure unknown CLI options like --aio-sandbox are properly preserved
and passed through to the agent configuration instead of being
filtered out during destructuring.
…ssthrough

Add test coverage for unknown CLI options preservation in buildAppConfig:
- Basic unknown options preservation
- Filtering of known CLI-only options
- Complex data types support
- Integration with user config and enhancers
- Edge cases and comprehensive option coverage
…bility

Replace hardcoded Set with structured destructuring approach:
- Use single destructuring assignment for better readability
- Group options by purpose (CLI-only, deprecated, filters)
- Eliminate hardcoded option list maintenance burden
- Preserve all functionality while improving code quality
…minimum

- Use single destructuring assignment, no complex logic
- Remove unnecessary Set and forEach loops
- Clean up tests by replacing as any with toHaveProperty
- Keep it simple: extract known options, rest goes to config
- Maintain full functionality with minimal code
@ulivz ulivz merged commit f1f2ccd into main Sep 19, 2025
10 checks passed
@ulivz ulivz deleted the feat/agent-cli-unknown-options branch September 19, 2025 04:50
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.

2 participants

Comments