Skip to content

Update API with KIMI_CLI#139

Open
MaxwellGengYF wants to merge 5 commits intoMoonshotAI:mainfrom
MaxwellGengYF:main
Open

Update API with KIMI_CLI#139
MaxwellGengYF wants to merge 5 commits intoMoonshotAI:mainfrom
MaxwellGengYF:main

Conversation

@MaxwellGengYF
Copy link
Copy Markdown

Details

  1. New Helper Function (_ensure_skill_dirs):

    • Normalizes input to a list[KaosPath]
    • Handles None[], single value → [value], or preserves list/iterable
  2. Updated Methods:

    • Both Session.create() and Session.resume() now: - Accept single or multiple skill directories - Validate each directory is a KaosPath - Pass a normalized list to KimiCLI.create()
  3. Documentation:

    • Docstrings updated: "Skills directories (KaosPath or list of KaosPath)"

Impact

This aligns the Python SDK with Kimi CLI signatures, allowing users to specify multiple skill directories instead of just one.

MaxwellGengYF and others added 5 commits April 2, 2026 12:00
### Details

1. **New Helper Function** (`_ensure_skill_dirs`):
   - Normalizes input to a `list[KaosPath]`
   - Handles `None` → `[]`, single value → `[value]`, or preserves list/iterable

2. **Updated Methods**:
   - Both `Session.create()` and `Session.resume()` now:
     - Accept single or multiple skill directories
     - Validate each directory is a `KaosPath`
     - Pass a normalized list to `KimiCLI.create()`

3. **Documentation**:
   - Docstrings updated: "Skills directories (KaosPath or list of KaosPath)"

### Impact
This aligns the Python SDK with Kimi CLI signatures, allowing users to specify multiple skill directories instead of just one.
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