astra-cli-agent 0.1.0__tar.gz
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.
- astra_cli_agent-0.1.0/.env.example +28 -0
- astra_cli_agent-0.1.0/.github/workflows/ci.yml +37 -0
- astra_cli_agent-0.1.0/.github/workflows/release.yml +49 -0
- astra_cli_agent-0.1.0/.gitignore +15 -0
- astra_cli_agent-0.1.0/HANDOFF.md +1752 -0
- astra_cli_agent-0.1.0/PKG-INFO +130 -0
- astra_cli_agent-0.1.0/README.md +96 -0
- astra_cli_agent-0.1.0/docs/ARCHITECTURE.md +224 -0
- astra_cli_agent-0.1.0/pyproject.toml +61 -0
- astra_cli_agent-0.1.0/src/astra/__init__.py +1 -0
- astra_cli_agent-0.1.0/src/astra/agents/__init__.py +0 -0
- astra_cli_agent-0.1.0/src/astra/agents/base.py +44 -0
- astra_cli_agent-0.1.0/src/astra/agents/coder_agent.py +39 -0
- astra_cli_agent-0.1.0/src/astra/agents/debug_agent.py +41 -0
- astra_cli_agent-0.1.0/src/astra/agents/docker_agent.py +139 -0
- astra_cli_agent-0.1.0/src/astra/agents/documentation_agent.py +41 -0
- astra_cli_agent-0.1.0/src/astra/agents/file_agent.py +176 -0
- astra_cli_agent-0.1.0/src/astra/agents/git_agent.py +163 -0
- astra_cli_agent-0.1.0/src/astra/agents/kubernetes_agent.py +150 -0
- astra_cli_agent-0.1.0/src/astra/agents/mcp_agent.py +135 -0
- astra_cli_agent-0.1.0/src/astra/agents/memory_agent.py +35 -0
- astra_cli_agent-0.1.0/src/astra/agents/planner_agent.py +149 -0
- astra_cli_agent-0.1.0/src/astra/agents/research_agent.py +121 -0
- astra_cli_agent-0.1.0/src/astra/agents/retrieve_agent.py +52 -0
- astra_cli_agent-0.1.0/src/astra/agents/reviewer_agent.py +133 -0
- astra_cli_agent-0.1.0/src/astra/cli/__init__.py +0 -0
- astra_cli_agent-0.1.0/src/astra/cli/app.py +175 -0
- astra_cli_agent-0.1.0/src/astra/cli/chat.py +145 -0
- astra_cli_agent-0.1.0/src/astra/cli/ingest.py +57 -0
- astra_cli_agent-0.1.0/src/astra/cli/mcp.py +65 -0
- astra_cli_agent-0.1.0/src/astra/cli/memory.py +197 -0
- astra_cli_agent-0.1.0/src/astra/cli/rendering.py +50 -0
- astra_cli_agent-0.1.0/src/astra/cli/setup.py +206 -0
- astra_cli_agent-0.1.0/src/astra/cli/single.py +35 -0
- astra_cli_agent-0.1.0/src/astra/config/__init__.py +0 -0
- astra_cli_agent-0.1.0/src/astra/config/defaults.yaml +37 -0
- astra_cli_agent-0.1.0/src/astra/config/profiles/.gitkeep +0 -0
- astra_cli_agent-0.1.0/src/astra/core/__init__.py +0 -0
- astra_cli_agent-0.1.0/src/astra/core/confirm.py +18 -0
- astra_cli_agent-0.1.0/src/astra/core/events.py +18 -0
- astra_cli_agent-0.1.0/src/astra/core/exceptions.py +15 -0
- astra_cli_agent-0.1.0/src/astra/core/graph.py +141 -0
- astra_cli_agent-0.1.0/src/astra/core/json_stream.py +101 -0
- astra_cli_agent-0.1.0/src/astra/core/onboarding.py +37 -0
- astra_cli_agent-0.1.0/src/astra/core/settings.py +139 -0
- astra_cli_agent-0.1.0/src/astra/core/state.py +32 -0
- astra_cli_agent-0.1.0/src/astra/llm/__init__.py +0 -0
- astra_cli_agent-0.1.0/src/astra/llm/cost.py +27 -0
- astra_cli_agent-0.1.0/src/astra/llm/litellm_client.py +138 -0
- astra_cli_agent-0.1.0/src/astra/llm/ollama_client.py +139 -0
- astra_cli_agent-0.1.0/src/astra/llm/provider.py +88 -0
- astra_cli_agent-0.1.0/src/astra/llm/router.py +201 -0
- astra_cli_agent-0.1.0/src/astra/memory/__init__.py +0 -0
- astra_cli_agent-0.1.0/src/astra/memory/chunking.py +77 -0
- astra_cli_agent-0.1.0/src/astra/memory/embeddings.py +42 -0
- astra_cli_agent-0.1.0/src/astra/memory/models.py +48 -0
- astra_cli_agent-0.1.0/src/astra/memory/retriever.py +16 -0
- astra_cli_agent-0.1.0/src/astra/memory/store.py +219 -0
- astra_cli_agent-0.1.0/src/astra/memory/vector_store.py +102 -0
- astra_cli_agent-0.1.0/src/astra/models/__init__.py +0 -0
- astra_cli_agent-0.1.0/src/astra/models/tool_result.py +11 -0
- astra_cli_agent-0.1.0/src/astra/prompts/.gitkeep +0 -0
- astra_cli_agent-0.1.0/src/astra/tools/__init__.py +0 -0
- astra_cli_agent-0.1.0/src/astra/tools/code/__init__.py +0 -0
- astra_cli_agent-0.1.0/src/astra/tools/code/backend.py +76 -0
- astra_cli_agent-0.1.0/src/astra/tools/code/tools.py +38 -0
- astra_cli_agent-0.1.0/src/astra/tools/docker/__init__.py +0 -0
- astra_cli_agent-0.1.0/src/astra/tools/docker/backend.py +122 -0
- astra_cli_agent-0.1.0/src/astra/tools/docker/tools.py +53 -0
- astra_cli_agent-0.1.0/src/astra/tools/filesystem/__init__.py +0 -0
- astra_cli_agent-0.1.0/src/astra/tools/filesystem/backend.py +121 -0
- astra_cli_agent-0.1.0/src/astra/tools/filesystem/tools.py +46 -0
- astra_cli_agent-0.1.0/src/astra/tools/git/__init__.py +0 -0
- astra_cli_agent-0.1.0/src/astra/tools/git/backend.py +110 -0
- astra_cli_agent-0.1.0/src/astra/tools/git/tools.py +55 -0
- astra_cli_agent-0.1.0/src/astra/tools/kubernetes/__init__.py +0 -0
- astra_cli_agent-0.1.0/src/astra/tools/kubernetes/backend.py +101 -0
- astra_cli_agent-0.1.0/src/astra/tools/kubernetes/tools.py +47 -0
- astra_cli_agent-0.1.0/src/astra/tools/mcp/__init__.py +0 -0
- astra_cli_agent-0.1.0/src/astra/tools/mcp/backend.py +103 -0
- astra_cli_agent-0.1.0/src/astra/tools/mcp/client.py +249 -0
- astra_cli_agent-0.1.0/src/astra/tools/mcp/discovery.py +137 -0
- astra_cli_agent-0.1.0/src/astra/tools/registry.py +48 -0
- astra_cli_agent-0.1.0/src/astra/tools/shell/__init__.py +0 -0
- astra_cli_agent-0.1.0/src/astra/tools/shell/backend.py +116 -0
- astra_cli_agent-0.1.0/src/astra/tools/shell/tools.py +32 -0
- astra_cli_agent-0.1.0/src/astra/tools/web/__init__.py +0 -0
- astra_cli_agent-0.1.0/src/astra/tools/web/backend.py +186 -0
- astra_cli_agent-0.1.0/src/astra/tools/web/tools.py +58 -0
- astra_cli_agent-0.1.0/src/astra/utils/__init__.py +0 -0
- astra_cli_agent-0.1.0/src/astra/utils/logging.py +43 -0
- astra_cli_agent-0.1.0/tests/e2e/.gitkeep +0 -0
- astra_cli_agent-0.1.0/tests/e2e/test_e2e_live_groq.py +100 -0
- astra_cli_agent-0.1.0/tests/fixtures/mcp_fixture_server.py +50 -0
- astra_cli_agent-0.1.0/tests/integration/.gitkeep +0 -0
- astra_cli_agent-0.1.0/tests/integration/_helpers.py +37 -0
- astra_cli_agent-0.1.0/tests/integration/conftest.py +112 -0
- astra_cli_agent-0.1.0/tests/integration/test_cli_ask.py +25 -0
- astra_cli_agent-0.1.0/tests/integration/test_cli_confirm_gate.py +82 -0
- astra_cli_agent-0.1.0/tests/integration/test_cli_ingest_and_retrieval.py +86 -0
- astra_cli_agent-0.1.0/tests/integration/test_cli_mcp.py +82 -0
- astra_cli_agent-0.1.0/tests/integration/test_cli_run_pipeline.py +106 -0
- astra_cli_agent-0.1.0/tests/unit/.gitkeep +0 -0
- astra_cli_agent-0.1.0/tests/unit/conftest.py +104 -0
- astra_cli_agent-0.1.0/tests/unit/test_agents.py +261 -0
- astra_cli_agent-0.1.0/tests/unit/test_chat.py +219 -0
- astra_cli_agent-0.1.0/tests/unit/test_chunking.py +50 -0
- astra_cli_agent-0.1.0/tests/unit/test_cli.py +40 -0
- astra_cli_agent-0.1.0/tests/unit/test_code_backend.py +79 -0
- astra_cli_agent-0.1.0/tests/unit/test_code_tools.py +29 -0
- astra_cli_agent-0.1.0/tests/unit/test_docker_agent.py +171 -0
- astra_cli_agent-0.1.0/tests/unit/test_docker_backend.py +125 -0
- astra_cli_agent-0.1.0/tests/unit/test_docker_tools.py +67 -0
- astra_cli_agent-0.1.0/tests/unit/test_file_agent.py +188 -0
- astra_cli_agent-0.1.0/tests/unit/test_filesystem_backend.py +141 -0
- astra_cli_agent-0.1.0/tests/unit/test_filesystem_tools.py +41 -0
- astra_cli_agent-0.1.0/tests/unit/test_git_agent.py +162 -0
- astra_cli_agent-0.1.0/tests/unit/test_git_backend.py +136 -0
- astra_cli_agent-0.1.0/tests/unit/test_git_tools.py +67 -0
- astra_cli_agent-0.1.0/tests/unit/test_graph.py +138 -0
- astra_cli_agent-0.1.0/tests/unit/test_json_stream.py +75 -0
- astra_cli_agent-0.1.0/tests/unit/test_kubernetes_agent.py +181 -0
- astra_cli_agent-0.1.0/tests/unit/test_kubernetes_backend.py +122 -0
- astra_cli_agent-0.1.0/tests/unit/test_kubernetes_tools.py +72 -0
- astra_cli_agent-0.1.0/tests/unit/test_llm_adapters.py +137 -0
- astra_cli_agent-0.1.0/tests/unit/test_llm_cost.py +14 -0
- astra_cli_agent-0.1.0/tests/unit/test_llm_router.py +143 -0
- astra_cli_agent-0.1.0/tests/unit/test_llm_router_streaming.py +153 -0
- astra_cli_agent-0.1.0/tests/unit/test_mcp_agent.py +149 -0
- astra_cli_agent-0.1.0/tests/unit/test_mcp_backend.py +58 -0
- astra_cli_agent-0.1.0/tests/unit/test_mcp_client.py +95 -0
- astra_cli_agent-0.1.0/tests/unit/test_mcp_discovery.py +94 -0
- astra_cli_agent-0.1.0/tests/unit/test_mcp_http_transport.py +90 -0
- astra_cli_agent-0.1.0/tests/unit/test_memory_agent.py +57 -0
- astra_cli_agent-0.1.0/tests/unit/test_memory_store.py +138 -0
- astra_cli_agent-0.1.0/tests/unit/test_onboarding.py +44 -0
- astra_cli_agent-0.1.0/tests/unit/test_rag_e2e.py +103 -0
- astra_cli_agent-0.1.0/tests/unit/test_research_agent.py +106 -0
- astra_cli_agent-0.1.0/tests/unit/test_setup.py +154 -0
- astra_cli_agent-0.1.0/tests/unit/test_shell_backend.py +145 -0
- astra_cli_agent-0.1.0/tests/unit/test_shell_tools.py +17 -0
- astra_cli_agent-0.1.0/tests/unit/test_vector_store.py +61 -0
- astra_cli_agent-0.1.0/tests/unit/test_web_backend.py +109 -0
- astra_cli_agent-0.1.0/tests/unit/test_web_tools.py +59 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Copy to .env and fill in the providers you have keys for — or just run `astra setup`,
|
|
2
|
+
# which walks you through picking a provider and tests the key before saving it.
|
|
3
|
+
# Astra never reads these into logs or memory; they're loaded as env vars only.
|
|
4
|
+
|
|
5
|
+
ANTHROPIC_API_KEY=
|
|
6
|
+
OPENAI_API_KEY=
|
|
7
|
+
GROQ_API_KEY=
|
|
8
|
+
|
|
9
|
+
# Local Ollama server (optional last-resort fallback)
|
|
10
|
+
OLLAMA_HOST=http://localhost:11434
|
|
11
|
+
|
|
12
|
+
# Optional general web search (the research agent's `web_search_general` tool). Uses SerpApi
|
|
13
|
+
# (https://serpapi.com) to run a real Google search. Leaving SERPAPI_KEY unset simply disables
|
|
14
|
+
# `web_search_general`; the GitHub/StackOverflow/fetch tools work without it.
|
|
15
|
+
SERPAPI_KEY=
|
|
16
|
+
|
|
17
|
+
# Optional observability: set LANGCHAIN_TRACING_V2=true and provide a LangSmith API key to
|
|
18
|
+
# get a full trace (every graph node + every LLM call, with tokens/cost/latency) exported to
|
|
19
|
+
# https://smith.langchain.com for each `astra` request. LANGCHAIN_PROJECT groups traces under
|
|
20
|
+
# one project name in the LangSmith UI (defaults to "default" if unset). Leaving
|
|
21
|
+
# LANGCHAIN_TRACING_V2 unset/false costs nothing — Astra's own cost/token tracking
|
|
22
|
+
# (`astra memory costs`) works independently of this and needs no key at all.
|
|
23
|
+
LANGCHAIN_API_KEY=
|
|
24
|
+
LANGCHAIN_TRACING_V2=false
|
|
25
|
+
LANGCHAIN_PROJECT=astra-cli
|
|
26
|
+
|
|
27
|
+
# Nested settings overrides, e.g.:
|
|
28
|
+
# ASTRA_APP__LOG_LEVEL=DEBUG
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Set up Python
|
|
16
|
+
uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.12"
|
|
19
|
+
|
|
20
|
+
- name: Install uv
|
|
21
|
+
uses: astral-sh/setup-uv@v3
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: uv pip install --system -e ".[dev]"
|
|
25
|
+
|
|
26
|
+
- name: Ruff
|
|
27
|
+
run: ruff check .
|
|
28
|
+
|
|
29
|
+
- name: Mypy
|
|
30
|
+
run: mypy src
|
|
31
|
+
|
|
32
|
+
- name: Pytest
|
|
33
|
+
# No GROQ_API_KEY is configured in CI, so tests/e2e/test_e2e_live_groq.py
|
|
34
|
+
# skips cleanly (see HANDOFF.md Phase 17) rather than failing or spending
|
|
35
|
+
# real money. Docker/kubernetes-backed tests skip the same way when the
|
|
36
|
+
# runner has no reachable daemon/cluster.
|
|
37
|
+
run: pytest -q
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Fires when a GitHub Release is published (create the release from a tag,
|
|
4
|
+
# e.g. v0.1.0, once CI is green on main). Uses PyPI's trusted-publishing
|
|
5
|
+
# (OIDC) flow, so no API token is stored as a repo secret.
|
|
6
|
+
on:
|
|
7
|
+
release:
|
|
8
|
+
types: [published]
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Set up Python
|
|
20
|
+
uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.12"
|
|
23
|
+
|
|
24
|
+
- name: Build sdist and wheel
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade build
|
|
27
|
+
python -m build
|
|
28
|
+
|
|
29
|
+
- name: Upload build artifacts
|
|
30
|
+
uses: actions/upload-artifact@v4
|
|
31
|
+
with:
|
|
32
|
+
name: dist
|
|
33
|
+
path: dist/
|
|
34
|
+
|
|
35
|
+
publish:
|
|
36
|
+
needs: build
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
environment: pypi
|
|
39
|
+
permissions:
|
|
40
|
+
id-token: write # required for PyPI trusted publishing
|
|
41
|
+
steps:
|
|
42
|
+
- name: Download build artifacts
|
|
43
|
+
uses: actions/download-artifact@v4
|
|
44
|
+
with:
|
|
45
|
+
name: dist
|
|
46
|
+
path: dist/
|
|
47
|
+
|
|
48
|
+
- name: Publish to PyPI
|
|
49
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|