Skip to content

feat: add Kode-Agent provider support#391

Closed
CrazyBoyM wants to merge 2 commits intoNVIDIA:mainfrom
CrazyBoyM:add-kode-agent-provider
Closed

feat: add Kode-Agent provider support#391
CrazyBoyM wants to merge 2 commits intoNVIDIA:mainfrom
CrazyBoyM:add-kode-agent-provider

Conversation

@CrazyBoyM
Copy link

Summary

Add Kode as a first-class provider in OpenShell. Kode is an open-source, multi-model AI coding agent that supports both Anthropic and OpenAI APIs through a unified terminal interface.

Changes

Provider plugin (crates/openshell-providers/)

  • New kode.rs provider with ANTHROPIC_API_KEY and OPENAI_API_KEY credential discovery
  • Registered in the provider registry and normalize_provider_type

CLI (crates/openshell-cli/)

  • Added Kode variant to CliProviderType enum

Network policy (crates/openshell-sandbox/testdata/)

  • Added kode_agent policy allowing api.anthropic.com and api.openai.com (port 443)
  • Binary paths: /usr/local/bin/kode and /usr/bin/node

Documentation (docs/)

  • Added Kode to supported agents table
  • Added Kode to default policy compatibility matrix

Usage

# Auto-detected provider from command
openshell sandbox create -- kode

# Explicit provider
openshell provider create --name kode --type kode --from-existing

About Kode

  • Package: @shareai-lab/kode (Apache 2.0)
  • Command: kode
  • Multi-model: Supports Anthropic (Claude) and OpenAI models simultaneously
  • CLI compatible: Shares a similar CLI interface with Claude Code (--print, --model, --system-prompt, --permission-mode, etc.)
  • Repository: https://github.com/shareAI-lab/Kode-Agent

Test plan

  • Unit tests pass for kode.rs credential discovery (ANTHROPIC_API_KEY and OPENAI_API_KEY)
  • normalize_provider_type("kode") returns Some("kode")
  • detect_provider_from_command(&["kode"]) returns Some("kode")
  • openshell sandbox create -- kode auto-detects the kode provider type
  • Network policy allows kode binary to reach api.anthropic.com and api.openai.com

Add support for Kode (https://github.com/shareAI-lab/Kode-Agent), an
open-source AI-powered terminal assistant for intelligent code
development. Kode is a multi-model coding agent that supports both
Anthropic and OpenAI APIs.

Changes:
- New provider plugin (kode.rs) with ANTHROPIC_API_KEY and
  OPENAI_API_KEY credential discovery
- CLI enum variant for --type kode
- Provider type normalization with aliases: kode, kwa, kd
- Network policy for kode_agent allowing api.anthropic.com and
  api.openai.com access
- Unit tests for credential discovery and alias normalization
- Remove kwa/kd aliases, register only the kode command
- Simplify network policy binaries to kode and node only
- Add Kode to supported-agents and default-policy docs
@github-actions
Copy link

Thank you for your interest in contributing to OpenShell, @CrazyBoyM.

This project uses a vouch system for first-time contributors. Before submitting a pull request, you need to be vouched by a maintainer.

To get vouched:

  1. Open a Vouch Request discussion.
  2. Describe what you want to change and why.
  3. Write in your own words — do not have an AI generate the request.
  4. A maintainer will comment /vouch if approved.
  5. Once vouched, open a new PR (preferred) or reopen this one after a few minutes.

See CONTRIBUTING.md for details.

@github-actions
Copy link

Thank you for your submission! We ask that you sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by adding a comment below using this text:


I have read the DCO document and I hereby sign the DCO.


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the DCO Assistant Lite bot.

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