Summary
Extract basilisk.os (canister-side OS layer) and the client-side shell tools (exec, shell, sshd, sftp) into a new standalone PyPI package: ic-basilisk-os.
This continues the modularization started in #31 and follows the same pattern as ic-python-db and ic-python-logging.
Motivation
ic-basilisk should be a minimal CDK (@query, @update, ic.*, build, new). The OS layer (entities, wallet, tasks, crypto, FX, vetkeys) and client tools (shell, SFTP, SSHD) are optional and should be a separate package that users install only if needed.
What moves to ic-basilisk-os
Source modules
basilisk/os/ → ic_basilisk_os/ (entities, wallet, task_manager, execution, crypto, vetkeys, fx, tokens, status)
basilisk/shell.py → ic_basilisk_os/shell.py
basilisk/sftp.py → ic_basilisk_os/sftp.py
basilisk/sshd.py → ic_basilisk_os/sshd.py
CLI commands
basilisk exec, basilisk shell, basilisk sshd move to ic-basilisk-os
basilisk CLI keeps new and build only
- Backward compat:
basilisk shell etc. still work by forwarding to ic_basilisk_os (with helpful error if not installed)
Tests (~390K+ of test code)
test_shell.py, test_sftp.py, test_tasks.py, test_wallet.py, test_wallet_hook.py, test_wallet_shell.py, test_crypto.py, test_vetkeys.py, test_fx.py, test_filesystem.py, test_db_shell.py, test_guards.py
conftest.py (shared fixtures)
test_canister/ and fixtures/
Stays in ic-basilisk
basilisk/__init__.py (CDK types, decorators, ic class)
basilisk/cli.py (new, build commands + thin forwarding)
basilisk/__main__.py (WASM compiler)
basilisk/compiler/, basilisk/canisters/, basilisk/templates/
test_bundle.py, integration/ tests
Import changes in moved files
from basilisk.db import ... → from ic_python_db import ...
from basilisk.logging import ... → from ic_python_logging import ...
from basilisk.shell import ... → from .shell import ...
from basilisk import Async, Principal, ic → stays (CDK)
Dependencies
ic-basilisk: install_requires=[] (no required deps)
ic-basilisk-os: install_requires=["ic-basilisk", "ic-python-db", "ic-python-logging"], extras_require={"shell": ["asyncssh"]}
Backward compatibility
basilisk/os/__init__.py becomes thin re-export: from ic_basilisk_os import *
basilisk CLI forwards exec/shell/sshd to ic_basilisk_os with error if not installed
Relates to #31
Summary
Extract
basilisk.os(canister-side OS layer) and the client-side shell tools (exec,shell,sshd,sftp) into a new standalone PyPI package:ic-basilisk-os.This continues the modularization started in #31 and follows the same pattern as
ic-python-dbandic-python-logging.Motivation
ic-basiliskshould be a minimal CDK (@query,@update,ic.*,build,new). The OS layer (entities, wallet, tasks, crypto, FX, vetkeys) and client tools (shell, SFTP, SSHD) are optional and should be a separate package that users install only if needed.What moves to
ic-basilisk-osSource modules
basilisk/os/→ic_basilisk_os/(entities, wallet, task_manager, execution, crypto, vetkeys, fx, tokens, status)basilisk/shell.py→ic_basilisk_os/shell.pybasilisk/sftp.py→ic_basilisk_os/sftp.pybasilisk/sshd.py→ic_basilisk_os/sshd.pyCLI commands
basilisk exec,basilisk shell,basilisk sshdmove toic-basilisk-osbasiliskCLI keepsnewandbuildonlybasilisk shelletc. still work by forwarding toic_basilisk_os(with helpful error if not installed)Tests (~390K+ of test code)
test_shell.py,test_sftp.py,test_tasks.py,test_wallet.py,test_wallet_hook.py,test_wallet_shell.py,test_crypto.py,test_vetkeys.py,test_fx.py,test_filesystem.py,test_db_shell.py,test_guards.pyconftest.py(shared fixtures)test_canister/andfixtures/Stays in
ic-basiliskbasilisk/__init__.py(CDK types, decorators,icclass)basilisk/cli.py(new,buildcommands + thin forwarding)basilisk/__main__.py(WASM compiler)basilisk/compiler/,basilisk/canisters/,basilisk/templates/test_bundle.py,integration/testsImport changes in moved files
from basilisk.db import ...→from ic_python_db import ...from basilisk.logging import ...→from ic_python_logging import ...from basilisk.shell import ...→from .shell import ...from basilisk import Async, Principal, ic→ stays (CDK)Dependencies
ic-basilisk:install_requires=[](no required deps)ic-basilisk-os:install_requires=["ic-basilisk", "ic-python-db", "ic-python-logging"],extras_require={"shell": ["asyncssh"]}Backward compatibility
basilisk/os/__init__.pybecomes thin re-export:from ic_basilisk_os import *basiliskCLI forwardsexec/shell/sshdtoic_basilisk_oswith error if not installedRelates to #31