Skip to content

Conversation

@xxchan
Copy link
Contributor

@xxchan xxchan commented Dec 19, 2025

According to astral-sh/ty#2080, this usage seems to be not wel-defined, and not supported by ty

Signed-off-by: tianxiao shentianxiao@moonshot.cn

According to astral-sh/ty#2080, this usage seems to be not wel-defined, and not supported by `ty`

Signed-off-by: tianxiao <shentianxiao@moonshot.cn>
Copilot AI review requested due to automatic review settings December 19, 2025 14:47
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the KaosProcess protocol by moving it from a nested class Kaos.Process to a top-level protocol KaosProcess. This change addresses compatibility issues with the ty type checker tool that doesn't properly support nested Protocol classes. The refactoring reverses a previous design decision from v0.5.0 where KaosProcess was originally moved into Kaos.Process.

Key changes:

  • Extract KaosProcess as a standalone Protocol at the module level in __init__.py
  • Update all type annotations from Kaos.Process to KaosProcess across the codebase
  • Add KaosProcess to imports in ssh.py and local.py

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/kaos/init.py Moves KaosProcess protocol from nested Kaos.Process to top-level and updates the Kaos.exec return type annotation
src/kaos/ssh.py Adds KaosProcess to imports and updates exec method return type from Kaos.Process to KaosProcess
src/kaos/local.py Adds KaosProcess to imports and updates exec method return type from Kaos.Process to KaosProcess

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@xxchan
Copy link
Contributor Author

xxchan commented Dec 22, 2025

cc @stdrc @powerfooI

@powerfooI
Copy link
Collaborator

LGTM

@stdrc stdrc merged commit 5bf4c38 into MoonshotAI:main Dec 25, 2025
21 checks passed
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.

3 participants