Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: install at the floor
run: |
uv venv --python 3.11 "$RUNNER_TEMP/lowest"
uv pip install --python "$RUNNER_TEMP/lowest" --resolution lowest-direct -e . "pytest>=8.3" "hypothesis>=6.100"
uv pip install --python "$RUNNER_TEMP/lowest" --resolution lowest-direct -e . -e ./apps/cli "pytest>=8.3" "hypothesis>=6.100"
- name: pydantic is the declared floor
run: |
"$RUNNER_TEMP/lowest/bin/python" - <<'PY'
Expand All @@ -88,7 +88,9 @@ jobs:
with:
python-version: "3.11"
- name: build
run: uv build
run: |
uv build
uv build apps/cli --out-dir dist-cli
- name: the wheel holds exactly the tracked package files
run: |
uv run --no-project python - <<'PY'
Expand All @@ -104,11 +106,11 @@ jobs:
- name: test the installed wheel, away from the source tree
run: |
uv venv --python 3.11 "$RUNNER_TEMP/wheel"
uv pip install --python "$RUNNER_TEMP/wheel" dist/*.whl "pytest>=8.3" "hypothesis>=6.100"
uv pip install --python "$RUNNER_TEMP/wheel" dist/*.whl dist-cli/*.whl "pytest>=8.3" "hypothesis>=6.100"
mkdir "$RUNNER_TEMP/suite"
cp -R tests "$RUNNER_TEMP/suite/"
cd "$RUNNER_TEMP/suite"
"$RUNNER_TEMP/wheel/bin/python" -c "import lionagi; assert 'site-packages' in lionagi.__file__, lionagi.__file__; print(lionagi.__file__)"
"$RUNNER_TEMP/wheel/bin/python" -c "import lionagi, lion_cli; assert all('site-packages' in m.__file__ for m in (lionagi, lion_cli)); print(lionagi.__file__, lion_cli.__file__)"
# the bench's and the examples' tests import bench/swe and examples/ from the source tree, which the wheel does not carry
"$RUNNER_TEMP/wheel/bin/python" -m pytest -W error --ignore=tests/test_exports.py --ignore=tests/test_hygiene.py --ignore=tests/register --ignore=tests/test_bench_agent.py --ignore-glob='tests/test_swe_*' --ignore=tests/test_examples.py tests

Expand Down
17 changes: 17 additions & 0 deletions apps/cli/lion_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""`lion`: the command line of lionagi v1, one entry with subcommands.

lion chat [-c | -r <id>] [-v] # talk with an actor here; the record is the memory
lion agent --dir <agent dir> # serve an actor's long-running agent until interrupted
lion agent --dir <agent dir> --once [--wait 30] # one wake, the record printed
lion agent --dir <agent dir> --check disk # one instrument, printed and landed, no mail
lion agent --dir <agent dir> --ticks # create the missing reminders only
lion agent --dir <agent dir> --arm # landing arm: identity + boundary, landed
lion agent --dir <agent dir> --stats # the day's tokens, wakes, mail and idle polls

The runtime is `lionagi`, the tools and guidance are `hub`; this package only composes them and
talks to a terminal.
"""

from .main import main, parser

__all__ = ("main", "parser")
383 changes: 383 additions & 0 deletions apps/cli/lion_cli/agent.py

Large diffs are not rendered by default.

Loading
Loading