optio-kimicode 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- optio_kimicode/__init__.py +60 -0
- optio_kimicode/conversation.py +658 -0
- optio_kimicode/conversation_listener.py +318 -0
- optio_kimicode/cred_watcher.py +156 -0
- optio_kimicode/fs_allowlist.py +81 -0
- optio_kimicode/host_actions.py +837 -0
- optio_kimicode/models.py +223 -0
- optio_kimicode/prompt.py +186 -0
- optio_kimicode/seed_manifest.py +95 -0
- optio_kimicode/session.py +1156 -0
- optio_kimicode/snapshots.py +323 -0
- optio_kimicode/types.py +370 -0
- optio_kimicode/verify.py +286 -0
- optio_kimicode-0.1.0.dist-info/METADATA +46 -0
- optio_kimicode-0.1.0.dist-info/RECORD +17 -0
- optio_kimicode-0.1.0.dist-info/WHEEL +5 -0
- optio_kimicode-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""optio-kimicode — run Kimi Code CLI as an optio task."""
|
|
2
|
+
|
|
3
|
+
import logging as _logging
|
|
4
|
+
|
|
5
|
+
from optio_agents import HookContext, HookContextProtocol
|
|
6
|
+
from optio_host import (
|
|
7
|
+
HostCommandError,
|
|
8
|
+
RunResult,
|
|
9
|
+
SSHConfig,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
from optio_kimicode.seed_manifest import (
|
|
13
|
+
KIMI_CRED_MANIFEST,
|
|
14
|
+
KIMI_SEED_MANIFEST,
|
|
15
|
+
KIMI_SEED_SUFFIX,
|
|
16
|
+
delete_seed,
|
|
17
|
+
list_seeds,
|
|
18
|
+
purge_seed,
|
|
19
|
+
)
|
|
20
|
+
from optio_kimicode.session import create_kimicode_task, run_kimicode_session
|
|
21
|
+
from optio_kimicode.types import (
|
|
22
|
+
AllowedDir,
|
|
23
|
+
DeliverableCallback,
|
|
24
|
+
HookCallback,
|
|
25
|
+
KimiCodeTaskConfig,
|
|
26
|
+
PermissionMode,
|
|
27
|
+
SeedProvider,
|
|
28
|
+
SeedUnavailableError,
|
|
29
|
+
)
|
|
30
|
+
from optio_kimicode.verify import verify_and_refresh_seed
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# asyncssh emits per-connection INFO lines that flood worker stdout once an
|
|
34
|
+
# SSH-backed session starts. Quiet by default.
|
|
35
|
+
_logging.getLogger("asyncssh").setLevel(_logging.WARNING)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
__all__ = [
|
|
39
|
+
"create_kimicode_task",
|
|
40
|
+
"run_kimicode_session",
|
|
41
|
+
"KimiCodeTaskConfig",
|
|
42
|
+
"DeliverableCallback",
|
|
43
|
+
"HookCallback",
|
|
44
|
+
"PermissionMode",
|
|
45
|
+
"SSHConfig",
|
|
46
|
+
"HookContext",
|
|
47
|
+
"HookContextProtocol",
|
|
48
|
+
"HostCommandError",
|
|
49
|
+
"RunResult",
|
|
50
|
+
"SeedProvider",
|
|
51
|
+
"SeedUnavailableError",
|
|
52
|
+
"AllowedDir",
|
|
53
|
+
"KIMI_SEED_MANIFEST",
|
|
54
|
+
"KIMI_CRED_MANIFEST",
|
|
55
|
+
"KIMI_SEED_SUFFIX",
|
|
56
|
+
"delete_seed",
|
|
57
|
+
"list_seeds",
|
|
58
|
+
"purge_seed",
|
|
59
|
+
"verify_and_refresh_seed",
|
|
60
|
+
]
|