domus-ai 0.4.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.
- domus_ai-0.4.0/MANIFEST.in +6 -0
- domus_ai-0.4.0/PKG-INFO +82 -0
- domus_ai-0.4.0/README.md +56 -0
- domus_ai-0.4.0/install.py +47 -0
- domus_ai-0.4.0/pyproject.toml +67 -0
- domus_ai-0.4.0/scripts/Linux/Add-DomusToPath.sh +44 -0
- domus_ai-0.4.0/scripts/Linux/Build-AI.sh +8 -0
- domus_ai-0.4.0/scripts/Linux/Clean-Domus.sh +10 -0
- domus_ai-0.4.0/scripts/Linux/Janus.sh +11 -0
- domus_ai-0.4.0/scripts/Linux/List-AI.sh +8 -0
- domus_ai-0.4.0/scripts/Linux/Pull-AI.sh +12 -0
- domus_ai-0.4.0/scripts/Linux/Remove-AI.sh +12 -0
- domus_ai-0.4.0/scripts/Linux/Remove-DomusFromPath.sh +17 -0
- domus_ai-0.4.0/scripts/Linux/Run-Tests.sh +10 -0
- domus_ai-0.4.0/scripts/Linux/Start-AI-Mercury.sh +5 -0
- domus_ai-0.4.0/scripts/Linux/Start-AI-Minerva.sh +5 -0
- domus_ai-0.4.0/scripts/Linux/Start-AI-Vulcan.sh +5 -0
- domus_ai-0.4.0/scripts/Linux/Start-AI.sh +8 -0
- domus_ai-0.4.0/scripts/Linux/Status-AI.sh +8 -0
- domus_ai-0.4.0/scripts/Linux/Stop-AI.sh +8 -0
- domus_ai-0.4.0/scripts/Linux/janus +3 -0
- domus_ai-0.4.0/scripts/MacOS/Add-DomusToPath.sh +37 -0
- domus_ai-0.4.0/scripts/MacOS/Build-AI.sh +8 -0
- domus_ai-0.4.0/scripts/MacOS/Clean-Domus.sh +10 -0
- domus_ai-0.4.0/scripts/MacOS/Janus.sh +11 -0
- domus_ai-0.4.0/scripts/MacOS/List-AI.sh +8 -0
- domus_ai-0.4.0/scripts/MacOS/Pull-AI.sh +12 -0
- domus_ai-0.4.0/scripts/MacOS/Remove-AI.sh +12 -0
- domus_ai-0.4.0/scripts/MacOS/Remove-DomusFromPath.sh +17 -0
- domus_ai-0.4.0/scripts/MacOS/Run-Tests.sh +10 -0
- domus_ai-0.4.0/scripts/MacOS/Start-AI-Mercury.sh +5 -0
- domus_ai-0.4.0/scripts/MacOS/Start-AI-Minerva.sh +5 -0
- domus_ai-0.4.0/scripts/MacOS/Start-AI-Vulcan.sh +5 -0
- domus_ai-0.4.0/scripts/MacOS/Start-AI.sh +8 -0
- domus_ai-0.4.0/scripts/MacOS/Status-AI.sh +8 -0
- domus_ai-0.4.0/scripts/MacOS/Stop-AI.sh +8 -0
- domus_ai-0.4.0/scripts/MacOS/janus +3 -0
- domus_ai-0.4.0/scripts/Windows/Add-DomusToPath.bat +4 -0
- domus_ai-0.4.0/scripts/Windows/Build-AI.bat +9 -0
- domus_ai-0.4.0/scripts/Windows/Clean-Domus.bat +7 -0
- domus_ai-0.4.0/scripts/Windows/Janus.bat +13 -0
- domus_ai-0.4.0/scripts/Windows/List-AI.bat +7 -0
- domus_ai-0.4.0/scripts/Windows/Pull-AI.bat +11 -0
- domus_ai-0.4.0/scripts/Windows/Remove-AI.bat +11 -0
- domus_ai-0.4.0/scripts/Windows/Remove-DomusFromPath.bat +8 -0
- domus_ai-0.4.0/scripts/Windows/Run-Tests.bat +8 -0
- domus_ai-0.4.0/scripts/Windows/Start-AI-Mercury.bat +4 -0
- domus_ai-0.4.0/scripts/Windows/Start-AI-Minerva.bat +4 -0
- domus_ai-0.4.0/scripts/Windows/Start-AI-Vulcan.bat +4 -0
- domus_ai-0.4.0/scripts/Windows/Start-AI.bat +9 -0
- domus_ai-0.4.0/scripts/Windows/Status-AI.bat +7 -0
- domus_ai-0.4.0/scripts/Windows/Stop-AI.bat +7 -0
- domus_ai-0.4.0/scripts/clean_domus.py +126 -0
- domus_ai-0.4.0/scripts/run_tests.py +63 -0
- domus_ai-0.4.0/setup.cfg +4 -0
- domus_ai-0.4.0/setup.py +53 -0
- domus_ai-0.4.0/src/Custos/__init__.py +34 -0
- domus_ai-0.4.0/src/Custos/mcp.py +262 -0
- domus_ai-0.4.0/src/Custos/mcp_client.py +273 -0
- domus_ai-0.4.0/src/DomusAPI/__init__.py +237 -0
- domus_ai-0.4.0/src/DomusData/Modelfiles/Analyst/Modelfile.Analyst +33 -0
- domus_ai-0.4.0/src/DomusData/Modelfiles/Mercury/Modelfile.Mercury +60 -0
- domus_ai-0.4.0/src/DomusData/Modelfiles/Minerva/Modelfile.Minerva +60 -0
- domus_ai-0.4.0/src/DomusData/Modelfiles/Vulcan/Modelfile.Vulcan +71 -0
- domus_ai-0.4.0/src/DomusData/__init__.py +5 -0
- domus_ai-0.4.0/src/DomusData/config/claude.json +17 -0
- domus_ai-0.4.0/src/DomusData/config/models.json +26 -0
- domus_ai-0.4.0/src/DomusData/config/ollama.env +4 -0
- domus_ai-0.4.0/src/DomusData/config/runtime.json +12 -0
- domus_ai-0.4.0/src/DomusEvents/__init__.py +87 -0
- domus_ai-0.4.0/src/DomusMCP/__init__.py +7 -0
- domus_ai-0.4.0/src/DomusMCP/confirmation.py +92 -0
- domus_ai-0.4.0/src/DomusMCP/fetch/__init__.py +1 -0
- domus_ai-0.4.0/src/DomusMCP/fetch/__main__.py +6 -0
- domus_ai-0.4.0/src/DomusMCP/fetch/tools/__init__.py +1 -0
- domus_ai-0.4.0/src/DomusMCP/fetch/tools/fetch.py +33 -0
- domus_ai-0.4.0/src/DomusMCP/filesystem/__init__.py +17 -0
- domus_ai-0.4.0/src/DomusMCP/filesystem/__main__.py +6 -0
- domus_ai-0.4.0/src/DomusMCP/filesystem/tools/__init__.py +1 -0
- domus_ai-0.4.0/src/DomusMCP/filesystem/tools/edit_file.py +50 -0
- domus_ai-0.4.0/src/DomusMCP/filesystem/tools/list_directory.py +24 -0
- domus_ai-0.4.0/src/DomusMCP/filesystem/tools/read_external_file.py +46 -0
- domus_ai-0.4.0/src/DomusMCP/filesystem/tools/read_file.py +25 -0
- domus_ai-0.4.0/src/DomusMCP/filesystem/tools/search_files.py +25 -0
- domus_ai-0.4.0/src/DomusMCP/filesystem/tools/write_file.py +21 -0
- domus_ai-0.4.0/src/DomusMCP/git/__init__.py +20 -0
- domus_ai-0.4.0/src/DomusMCP/git/__main__.py +6 -0
- domus_ai-0.4.0/src/DomusMCP/git/tools/__init__.py +1 -0
- domus_ai-0.4.0/src/DomusMCP/git/tools/git_add.py +23 -0
- domus_ai-0.4.0/src/DomusMCP/git/tools/git_commit.py +17 -0
- domus_ai-0.4.0/src/DomusMCP/git/tools/git_diff.py +26 -0
- domus_ai-0.4.0/src/DomusMCP/git/tools/git_log.py +18 -0
- domus_ai-0.4.0/src/DomusMCP/git/tools/git_status.py +11 -0
- domus_ai-0.4.0/src/DomusMCP/profiles/Analyst.json +9 -0
- domus_ai-0.4.0/src/DomusMCP/profiles/Mercury.json +9 -0
- domus_ai-0.4.0/src/DomusMCP/profiles/Minerva.json +8 -0
- domus_ai-0.4.0/src/DomusMCP/profiles/Vulcan.json +10 -0
- domus_ai-0.4.0/src/DomusMCP/server.py +189 -0
- domus_ai-0.4.0/src/DomusMCP/servers.json +25 -0
- domus_ai-0.4.0/src/Faber/__init__.py +92 -0
- domus_ai-0.4.0/src/Faber/claude_service.py +88 -0
- domus_ai-0.4.0/src/Faber/messaging.py +425 -0
- domus_ai-0.4.0/src/Faber/models.py +149 -0
- domus_ai-0.4.0/src/Faber/ollama_service.py +37 -0
- domus_ai-0.4.0/src/Faber/session.py +86 -0
- domus_ai-0.4.0/src/Janus/__init__.py +29 -0
- domus_ai-0.4.0/src/Janus/__main__.py +17 -0
- domus_ai-0.4.0/src/Janus/config.py +176 -0
- domus_ai-0.4.0/src/Janus/doctor.py +228 -0
- domus_ai-0.4.0/src/Janus/installer.py +120 -0
- domus_ai-0.4.0/src/Janus/main.py +1067 -0
- domus_ai-0.4.0/src/Janus/paths.py +334 -0
- domus_ai-0.4.0/src/Janus/requirements.py +30 -0
- domus_ai-0.4.0/src/Lares/__init__.py +49 -0
- domus_ai-0.4.0/src/Lares/agent.py +281 -0
- domus_ai-0.4.0/src/Lares/permissions.py +100 -0
- domus_ai-0.4.0/src/Lares/persistence.py +30 -0
- domus_ai-0.4.0/src/Lares/profiles.py +239 -0
- domus_ai-0.4.0/src/Lares/response_policy.py +183 -0
- domus_ai-0.4.0/src/Lares/roles.py +27 -0
- domus_ai-0.4.0/src/Mentis/__init__.py +34 -0
- domus_ai-0.4.0/src/Mentis/context.py +829 -0
- domus_ai-0.4.0/src/domus_ai.egg-info/PKG-INFO +82 -0
- domus_ai-0.4.0/src/domus_ai.egg-info/SOURCES.txt +161 -0
- domus_ai-0.4.0/src/domus_ai.egg-info/dependency_links.txt +1 -0
- domus_ai-0.4.0/src/domus_ai.egg-info/entry_points.txt +2 -0
- domus_ai-0.4.0/src/domus_ai.egg-info/requires.txt +8 -0
- domus_ai-0.4.0/src/domus_ai.egg-info/top_level.txt +10 -0
- domus_ai-0.4.0/src/utils.py +88 -0
- domus_ai-0.4.0/tests/conftest.py +140 -0
- domus_ai-0.4.0/tests/test_custos/conftest.py +63 -0
- domus_ai-0.4.0/tests/test_custos/test_mcp.py +127 -0
- domus_ai-0.4.0/tests/test_custos/test_mcp_servers.py +563 -0
- domus_ai-0.4.0/tests/test_domusapi/conftest.py +13 -0
- domus_ai-0.4.0/tests/test_domusapi/test_api.py +241 -0
- domus_ai-0.4.0/tests/test_domusevents/test_events.py +93 -0
- domus_ai-0.4.0/tests/test_faber/conftest.py +38 -0
- domus_ai-0.4.0/tests/test_faber/test_claude_service.py +74 -0
- domus_ai-0.4.0/tests/test_faber/test_faber.py +48 -0
- domus_ai-0.4.0/tests/test_faber/test_messaging.py +411 -0
- domus_ai-0.4.0/tests/test_faber/test_models.py +303 -0
- domus_ai-0.4.0/tests/test_faber/test_ollama_service.py +74 -0
- domus_ai-0.4.0/tests/test_faber/test_session.py +137 -0
- domus_ai-0.4.0/tests/test_janus/conftest.py +23 -0
- domus_ai-0.4.0/tests/test_janus/test_config.py +142 -0
- domus_ai-0.4.0/tests/test_janus/test_doctor.py +227 -0
- domus_ai-0.4.0/tests/test_janus/test_installer.py +164 -0
- domus_ai-0.4.0/tests/test_janus/test_main_dispatch.py +449 -0
- domus_ai-0.4.0/tests/test_janus/test_main_handlers.py +1246 -0
- domus_ai-0.4.0/tests/test_janus/test_packaging.py +170 -0
- domus_ai-0.4.0/tests/test_janus/test_paths.py +240 -0
- domus_ai-0.4.0/tests/test_lares/conftest.py +55 -0
- domus_ai-0.4.0/tests/test_lares/test_agent.py +245 -0
- domus_ai-0.4.0/tests/test_lares/test_permissions.py +114 -0
- domus_ai-0.4.0/tests/test_lares/test_profiles.py +109 -0
- domus_ai-0.4.0/tests/test_lares/test_response_policy.py +189 -0
- domus_ai-0.4.0/tests/test_mentis/conftest.py +69 -0
- domus_ai-0.4.0/tests/test_mentis/test_context_dataclasses.py +136 -0
- domus_ai-0.4.0/tests/test_mentis/test_context_lifecycle.py +156 -0
- domus_ai-0.4.0/tests/test_mentis/test_context_operations.py +449 -0
- domus_ai-0.4.0/tests/test_mentis/test_context_persistence.py +84 -0
- domus_ai-0.4.0/tests/test_utils/test_scripts.py +172 -0
- domus_ai-0.4.0/tests/test_utils/test_utils.py +106 -0
domus_ai-0.4.0/PKG-INFO
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: domus-ai
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Local AI runtime with hardware detection, model management, and agent subsystems.
|
|
5
|
+
Home-page: https://github.com/nomadiidamon/Domus-AI
|
|
6
|
+
Author: nomad_ii_damon
|
|
7
|
+
License: Not specified
|
|
8
|
+
Project-URL: Homepage, https://github.com/nomadiidamon/Domus-AI
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
Requires-Dist: packaging>=23.0
|
|
12
|
+
Requires-Dist: nvidia-ml-py>=12.0.0
|
|
13
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
14
|
+
Requires-Dist: mercurius-events>=0.5.1
|
|
15
|
+
Requires-Dist: hestia-system>=0.5.0
|
|
16
|
+
Provides-Extra: dev
|
|
17
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
18
|
+
Dynamic: author
|
|
19
|
+
Dynamic: description
|
|
20
|
+
Dynamic: description-content-type
|
|
21
|
+
Dynamic: home-page
|
|
22
|
+
Dynamic: license
|
|
23
|
+
Dynamic: project-url
|
|
24
|
+
Dynamic: requires-python
|
|
25
|
+
Dynamic: summary
|
|
26
|
+
|
|
27
|
+
@page python_implementation Python README
|
|
28
|
+
|
|
29
|
+
# Domus-AI for Python
|
|
30
|
+
|
|
31
|
+
This directory contains the active Domus-AI implementation: the Janus command-line runtime, installable Python packages, runtime data, tests, and development scripts. Its subsystems cover model/process actions, messaging, runtime context and memory, events, model-agent behavior, and permission-controlled MCP tools. `DomusAPI` provides a package-level facade for common library workflows.
|
|
32
|
+
|
|
33
|
+
Python 3.10 or newer and a local Ollama installation are needed for the main runtime workflows. For project-wide structure and behavior contracts, see [Architecture](https://nomadiidamon.github.io/Domus-AI/architecture.html), [Semantics](https://nomadiidamon.github.io/Domus-AI/semantics.html), and [Concepts](https://nomadiidamon.github.io/Domus-AI/concepts.html). For contribution and coding guidance, see [Contributing](https://nomadiidamon.github.io/Domus-AI/contributing.html).
|
|
34
|
+
|
|
35
|
+
## Install
|
|
36
|
+
|
|
37
|
+
From the repository root:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
python -m pip install ./python
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
For development and tests:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
python -m pip install -e "./python[dev]"
|
|
47
|
+
python -m pytest -ra
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The `janus` command is installed as a console script. The Python package source is under `src/`, the pytest suite is under `tests/`, and implementation-specific scripts are under `scripts/`.
|
|
51
|
+
|
|
52
|
+
## Use
|
|
53
|
+
|
|
54
|
+
After installation, run `janus help` to see available commands. Typical starting points are `janus doctor` for dependency and runtime diagnostics, `janus list` to inspect installed Ollama models, and `janus chat <model>` to start an interactive session. The same CLI is available as `python -m Janus`.
|
|
55
|
+
|
|
56
|
+
For application code, use `DomusAPI` for the combined library lifecycle and common operations; import subsystem packages directly when lower-level control is needed. The subsystem API references are maintained with their packages under `src/` and are included in the generated project documentation.
|
|
57
|
+
|
|
58
|
+
| Submodule | API documentation |
|
|
59
|
+
| --- | --- |
|
|
60
|
+
| DomusAPI | [Package API](https://nomadiidamon.github.io/Domus-AI/domusapi__api.html) |
|
|
61
|
+
| Janus | [CLI and runtime setup](https://nomadiidamon.github.io/Domus-AI/janus__api.html) |
|
|
62
|
+
| Mentis | [Runtime context and memory](https://nomadiidamon.github.io/Domus-AI/mentis__api.html) |
|
|
63
|
+
| Faber | [Process and model actions](https://nomadiidamon.github.io/Domus-AI/faber__api.html) |
|
|
64
|
+
| Lares | [Model agents](https://nomadiidamon.github.io/Domus-AI/lares__api.html) |
|
|
65
|
+
| Custos | [MCP permissions and client](https://nomadiidamon.github.io/Domus-AI/custos__api.html) |
|
|
66
|
+
| DomusMCP | [MCP servers and tools](https://nomadiidamon.github.io/Domus-AI/domusmcp__api.html) |
|
|
67
|
+
| DomusData | [Bundled runtime data](https://nomadiidamon.github.io/Domus-AI/domusdata__api.html) |
|
|
68
|
+
|
|
69
|
+
## Development
|
|
70
|
+
|
|
71
|
+
From the repository root, install the editable package with its development dependencies and run the test suite:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
python -m pip install -e "./python[dev]"
|
|
75
|
+
python -m pytest -ra
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The editable install ensures imports use this checkout. Tests live in `tests/`; platform helpers and the cross-platform test runner live in `scripts/`.
|
|
79
|
+
|
|
80
|
+
## Metadata
|
|
81
|
+
|
|
82
|
+
Package version, description, Python requirement, authorship, and project URLs are read from the repository-level `project.ini` by `setup.py`. The distribution name remains statically declared in `pyproject.toml`, as required by PEP 621.
|
domus_ai-0.4.0/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
@page python_implementation Python README
|
|
2
|
+
|
|
3
|
+
# Domus-AI for Python
|
|
4
|
+
|
|
5
|
+
This directory contains the active Domus-AI implementation: the Janus command-line runtime, installable Python packages, runtime data, tests, and development scripts. Its subsystems cover model/process actions, messaging, runtime context and memory, events, model-agent behavior, and permission-controlled MCP tools. `DomusAPI` provides a package-level facade for common library workflows.
|
|
6
|
+
|
|
7
|
+
Python 3.10 or newer and a local Ollama installation are needed for the main runtime workflows. For project-wide structure and behavior contracts, see [Architecture](https://nomadiidamon.github.io/Domus-AI/architecture.html), [Semantics](https://nomadiidamon.github.io/Domus-AI/semantics.html), and [Concepts](https://nomadiidamon.github.io/Domus-AI/concepts.html). For contribution and coding guidance, see [Contributing](https://nomadiidamon.github.io/Domus-AI/contributing.html).
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
From the repository root:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
python -m pip install ./python
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
For development and tests:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
python -m pip install -e "./python[dev]"
|
|
21
|
+
python -m pytest -ra
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The `janus` command is installed as a console script. The Python package source is under `src/`, the pytest suite is under `tests/`, and implementation-specific scripts are under `scripts/`.
|
|
25
|
+
|
|
26
|
+
## Use
|
|
27
|
+
|
|
28
|
+
After installation, run `janus help` to see available commands. Typical starting points are `janus doctor` for dependency and runtime diagnostics, `janus list` to inspect installed Ollama models, and `janus chat <model>` to start an interactive session. The same CLI is available as `python -m Janus`.
|
|
29
|
+
|
|
30
|
+
For application code, use `DomusAPI` for the combined library lifecycle and common operations; import subsystem packages directly when lower-level control is needed. The subsystem API references are maintained with their packages under `src/` and are included in the generated project documentation.
|
|
31
|
+
|
|
32
|
+
| Submodule | API documentation |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| DomusAPI | [Package API](https://nomadiidamon.github.io/Domus-AI/domusapi__api.html) |
|
|
35
|
+
| Janus | [CLI and runtime setup](https://nomadiidamon.github.io/Domus-AI/janus__api.html) |
|
|
36
|
+
| Mentis | [Runtime context and memory](https://nomadiidamon.github.io/Domus-AI/mentis__api.html) |
|
|
37
|
+
| Faber | [Process and model actions](https://nomadiidamon.github.io/Domus-AI/faber__api.html) |
|
|
38
|
+
| Lares | [Model agents](https://nomadiidamon.github.io/Domus-AI/lares__api.html) |
|
|
39
|
+
| Custos | [MCP permissions and client](https://nomadiidamon.github.io/Domus-AI/custos__api.html) |
|
|
40
|
+
| DomusMCP | [MCP servers and tools](https://nomadiidamon.github.io/Domus-AI/domusmcp__api.html) |
|
|
41
|
+
| DomusData | [Bundled runtime data](https://nomadiidamon.github.io/Domus-AI/domusdata__api.html) |
|
|
42
|
+
|
|
43
|
+
## Development
|
|
44
|
+
|
|
45
|
+
From the repository root, install the editable package with its development dependencies and run the test suite:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
python -m pip install -e "./python[dev]"
|
|
49
|
+
python -m pytest -ra
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The editable install ensures imports use this checkout. Tests live in `tests/`; platform helpers and the cross-platform test runner live in `scripts/`.
|
|
53
|
+
|
|
54
|
+
## Metadata
|
|
55
|
+
|
|
56
|
+
Package version, description, Python requirement, authorship, and project URLs are read from the repository-level `project.ini` by `setup.py`. The distribution name remains statically declared in `pyproject.toml`, as required by PEP 621.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""
|
|
2
|
+
install.py - Entry point for Local AI Runtime installation.
|
|
3
|
+
|
|
4
|
+
Run this once before using the runtime:
|
|
5
|
+
python install.py
|
|
6
|
+
|
|
7
|
+
Optional flags:
|
|
8
|
+
--check-only Check dependencies without attempting auto-repair.
|
|
9
|
+
--no-repair Same as --check-only.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import sys
|
|
13
|
+
import importlib.util
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
|
|
16
|
+
# Ensure src/ (parent of Janus/) is on the path so relative imports work
|
|
17
|
+
_src_dir = Path(__file__).resolve().parent / "src"
|
|
18
|
+
if str(_src_dir) not in sys.path:
|
|
19
|
+
sys.path.insert(0, str(_src_dir))
|
|
20
|
+
|
|
21
|
+
# Load installer.py directly without loading Janus/__init__.py.
|
|
22
|
+
# This avoids importing config.py (which requires dotenv) before we can
|
|
23
|
+
# check if dotenv is installed.
|
|
24
|
+
_installer_path = _src_dir / "Janus" / "installer.py"
|
|
25
|
+
_spec = importlib.util.spec_from_file_location("installer", _installer_path)
|
|
26
|
+
_installer_module = importlib.util.module_from_spec(_spec)
|
|
27
|
+
sys.modules["installer"] = _installer_module
|
|
28
|
+
try:
|
|
29
|
+
_spec.loader.exec_module(_installer_module)
|
|
30
|
+
except ImportError as error:
|
|
31
|
+
print(f"Cannot load the Hestia installer: {error}", file=sys.stderr)
|
|
32
|
+
print('Install its prerequisite with: python -m pip install "hestia-system>=0.5.0"', file=sys.stderr)
|
|
33
|
+
sys.exit(1)
|
|
34
|
+
|
|
35
|
+
run_install = _installer_module.run_install
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def main() -> int:
|
|
39
|
+
args = sys.argv[1:]
|
|
40
|
+
auto_repair = "--check-only" not in args and "--no-repair" not in args
|
|
41
|
+
|
|
42
|
+
success = run_install(auto_repair=auto_repair)
|
|
43
|
+
return 0 if success else 1
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
if __name__ == "__main__":
|
|
47
|
+
sys.exit(main())
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "domus-ai"
|
|
7
|
+
dynamic = ["version", "description", "readme", "authors", "license", "requires-python", "urls"]
|
|
8
|
+
dependencies = [
|
|
9
|
+
"packaging>=23.0",
|
|
10
|
+
"nvidia-ml-py>=12.0.0",
|
|
11
|
+
"python-dotenv>=1.0.0",
|
|
12
|
+
"mercurius-events>=0.5.1",
|
|
13
|
+
"hestia-system>=0.5.0",
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
[project.optional-dependencies]
|
|
17
|
+
dev = [
|
|
18
|
+
"pytest>=7.0",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[project.scripts]
|
|
22
|
+
janus = "Janus.main:main"
|
|
23
|
+
|
|
24
|
+
# Explicit package list rather than find_packages(), since the subsystem
|
|
25
|
+
# packages (Janus, Mentis, Faber, Custos, DomusEvents, Lares,
|
|
26
|
+
# DomusAPI) don't share a common namespace prefix - each is independently
|
|
27
|
+
# top-level under src/.
|
|
28
|
+
|
|
29
|
+
[tool.setuptools]
|
|
30
|
+
package-dir = {"" = "src"}
|
|
31
|
+
py-modules = ["utils"]
|
|
32
|
+
include-package-data = true
|
|
33
|
+
|
|
34
|
+
[tool.setuptools.packages]
|
|
35
|
+
find = { where = ["src"], include = ["Janus*", "Mentis*", "Faber*", "Custos*", "DomusEvents*", "Lares*", "DomusAPI*", "DomusMCP*", "DomusData*"] }
|
|
36
|
+
|
|
37
|
+
# Runtime data read through importlib.resources (see Janus.paths).
|
|
38
|
+
[tool.setuptools.package-data]
|
|
39
|
+
DomusData = ["config/*.json", "config/*.env", "Modelfiles/*/Modelfile*"]
|
|
40
|
+
DomusMCP = ["servers.json", "profiles/*.json"]
|
|
41
|
+
|
|
42
|
+
[tool.pytest.ini_options]
|
|
43
|
+
|
|
44
|
+
# Where pytest looks for tests.
|
|
45
|
+
testpaths = ["tests"]
|
|
46
|
+
|
|
47
|
+
# Standard test discovery patterns.
|
|
48
|
+
python_files = ["test_*.py"]
|
|
49
|
+
python_classes = ["Test*"]
|
|
50
|
+
python_functions = ["test_*"]
|
|
51
|
+
|
|
52
|
+
# Registered markers.
|
|
53
|
+
markers = [
|
|
54
|
+
"janus: tests for the Janus subsystem (CLI, config, paths, dependencies, doctor, installer)",
|
|
55
|
+
"faber: tests for the Faber subsystem (sessions, model/ollama/claude process management)",
|
|
56
|
+
"mentis: tests for the Mentis subsystem (runtime context and state)",
|
|
57
|
+
"custos: tests for the Custos subsystem (security, permissions, MCP)",
|
|
58
|
+
"lares: tests for the Lares subsystem (agents) - currently a stub package",
|
|
59
|
+
"domusevents: tests for the DomusEvents module (event vocabulary and process-wide bus over Mercurius)",
|
|
60
|
+
"domusapi: tests for the DomusAPI subsystem (top-level wrapper) - currently a stub package",
|
|
61
|
+
"utils: tests for the shared utils module",
|
|
62
|
+
"e2e: end-to-end tests requiring a live Ollama server (deselect with '-m \"not e2e\"')",
|
|
63
|
+
"slow: builds a wheel via pip (deselect with '-m \"not slow\"')",
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
# Fail loudly on unknown markers.
|
|
67
|
+
addopts = "--strict-markers -ra"
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Add-DomusToPath - adds this repo's scripts/Linux directory to PATH
|
|
3
|
+
# (persistently via ~/.bashrc) so `janus <command>` works from anywhere.
|
|
4
|
+
# Resolves its own location, so it works no matter where it's invoked from.
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
# Resolve symlinks so the real repo path ends up on PATH, not a link's dir.
|
|
8
|
+
SOURCE="${BASH_SOURCE[0]}"
|
|
9
|
+
while [ -h "$SOURCE" ]; do
|
|
10
|
+
DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
|
|
11
|
+
SOURCE="$(readlink "$SOURCE")"
|
|
12
|
+
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
|
13
|
+
done
|
|
14
|
+
SCRIPT_DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
|
|
15
|
+
RC_FILE="$HOME/.bashrc"
|
|
16
|
+
MARKER="# Domus-AI scripts"
|
|
17
|
+
|
|
18
|
+
if [[ ! -f "$SCRIPT_DIR/Janus.sh" ]]; then
|
|
19
|
+
echo "[X] Cannot locate Janus.sh next to this script ($SCRIPT_DIR) - is the repo intact?"
|
|
20
|
+
exit 1
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
if [[ ":$PATH:" == *":$SCRIPT_DIR:"* ]]; then
|
|
24
|
+
echo "[OK] Already on PATH for this session: $SCRIPT_DIR"
|
|
25
|
+
elif grep -qF "$SCRIPT_DIR" "$RC_FILE" 2>/dev/null; then
|
|
26
|
+
echo "[OK] Already persisted in $RC_FILE"
|
|
27
|
+
else
|
|
28
|
+
{
|
|
29
|
+
echo ""
|
|
30
|
+
echo "$MARKER"
|
|
31
|
+
echo "export PATH=\"\$PATH:$SCRIPT_DIR\""
|
|
32
|
+
} >> "$RC_FILE"
|
|
33
|
+
echo "[OK] Added to $RC_FILE"
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
echo ""
|
|
37
|
+
echo "To use it in this shell right now:"
|
|
38
|
+
echo " export PATH=\"\$PATH:$SCRIPT_DIR\""
|
|
39
|
+
echo "Then: janus list"
|
|
40
|
+
echo "For this shell now: source ~/.bashrc"
|
|
41
|
+
echo ""
|
|
42
|
+
echo "Note: the PATH entry points at this repo's current location."
|
|
43
|
+
echo "If you move the repo, rerun this script from the new location"
|
|
44
|
+
echo "(or run scripts/Linux/Remove-DomusFromPath.sh first)."
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Builds a model from its Modelfile. Usage: Build-AI.sh [model] (default: mercury)
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
cd "$SCRIPT_DIR/../.."
|
|
6
|
+
PYTHON="python3"
|
|
7
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
8
|
+
exec "$PYTHON" -m Janus build "${1:-mercury}"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Uninstalls Domus-AI and removes build/Python artifacts via scripts/clean_domus.py.
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
6
|
+
|
|
7
|
+
PYTHON="python3"
|
|
8
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
9
|
+
|
|
10
|
+
"$PYTHON" "$SCRIPT_DIR/../clean_domus.py" "$@"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Janus - Domus-AI CLI launcher.
|
|
3
|
+
# Add this directory to PATH to run `janus <command>` from anywhere.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
PYTHON_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
8
|
+
PYTHON="python3"
|
|
9
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
10
|
+
|
|
11
|
+
PYTHONPATH="$PYTHON_ROOT/src${PYTHONPATH:+:$PYTHONPATH}" exec "$PYTHON" -m Janus "$@"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Lists models installed in Ollama.
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
cd "$SCRIPT_DIR/../.."
|
|
6
|
+
PYTHON="python3"
|
|
7
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
8
|
+
exec "$PYTHON" -m Janus list
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Downloads a model from the Ollama registry. Usage: Pull-AI.sh <model>
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
if [ $# -lt 1 ]; then
|
|
5
|
+
echo "Usage: Pull-AI.sh <model>" >&2
|
|
6
|
+
exit 1
|
|
7
|
+
fi
|
|
8
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
9
|
+
cd "$SCRIPT_DIR/../.."
|
|
10
|
+
PYTHON="python3"
|
|
11
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
12
|
+
exec "$PYTHON" -m Janus pull "$1"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Removes a model from Ollama. Usage: Remove-AI.sh <model>
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
if [ $# -lt 1 ]; then
|
|
5
|
+
echo "Usage: Remove-AI.sh <model>" >&2
|
|
6
|
+
exit 1
|
|
7
|
+
fi
|
|
8
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
9
|
+
cd "$SCRIPT_DIR/../.."
|
|
10
|
+
PYTHON="python3"
|
|
11
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
12
|
+
exec "$PYTHON" -m Janus remove "$1"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Remove-DomusFromPath - removes the Domus-AI scripts PATH entry from
|
|
3
|
+
# ~/.bashrc (the block added by Add-DomusToPath.sh).
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
RC_FILE="$HOME/.bashrc"
|
|
7
|
+
MARKER="# Domus-AI scripts"
|
|
8
|
+
|
|
9
|
+
if [[ ! -f "$RC_FILE" ]] || ! grep -qF "$MARKER" "$RC_FILE"; then
|
|
10
|
+
echo "[OK] Nothing to remove - no Domus-AI entry found in $RC_FILE"
|
|
11
|
+
exit 0
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
# Delete the marker line and the export line that follows it.
|
|
15
|
+
sed -i "/$(echo "$MARKER" | sed 's/[][\.*^$/]/\\&/g')/,+1d" "$RC_FILE"
|
|
16
|
+
echo "[OK] Removed Domus-AI PATH entry from $RC_FILE"
|
|
17
|
+
echo "Open a new terminal (or 'source ~/.bashrc') for it to take effect."
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Runs the full Domus-AI test suite via the cross-platform scripts/run_tests.py runner.
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
6
|
+
|
|
7
|
+
PYTHON="python3"
|
|
8
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
9
|
+
|
|
10
|
+
"$PYTHON" "$SCRIPT_DIR/../run_tests.py" "$@"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Starts a model (Ollama server first if needed). Usage: Start-AI.sh [model] (default: mercury)
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
cd "$SCRIPT_DIR/../.."
|
|
6
|
+
PYTHON="python3"
|
|
7
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
8
|
+
exec "$PYTHON" -m Janus start "${1:-mercury}"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Shows status of running models and hardware.
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
cd "$SCRIPT_DIR/../.."
|
|
6
|
+
PYTHON="python3"
|
|
7
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
8
|
+
exec "$PYTHON" -m Janus status
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Stops a model, or all models and the Ollama server. Usage: Stop-AI.sh [model]
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
cd "$SCRIPT_DIR/../.."
|
|
6
|
+
PYTHON="python3"
|
|
7
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
8
|
+
exec "$PYTHON" -m Janus stop "$@"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/bin/zsh
|
|
2
|
+
# Add-DomusToPath - adds this repo's scripts/MacOS directory to PATH
|
|
3
|
+
# (persistently via ~/.zshrc) so `janus <command>` works from anywhere.
|
|
4
|
+
# Resolves its own location, so it works no matter where it's invoked from.
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
SCRIPT_DIR="$(cd -P "$(dirname "${0:A}")" && pwd)"
|
|
8
|
+
RC_FILE="$HOME/.zshrc"
|
|
9
|
+
MARKER="# Domus-AI scripts"
|
|
10
|
+
|
|
11
|
+
if [[ ! -f "$SCRIPT_DIR/Janus.sh" ]]; then
|
|
12
|
+
echo "[X] Cannot locate Janus.sh next to this script ($SCRIPT_DIR) - is the repo intact?"
|
|
13
|
+
exit 1
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
if [[ ":$PATH:" == *":$SCRIPT_DIR:"* ]]; then
|
|
17
|
+
echo "[OK] Already on PATH for this session: $SCRIPT_DIR"
|
|
18
|
+
elif grep -qF "$SCRIPT_DIR" "$RC_FILE" 2>/dev/null; then
|
|
19
|
+
echo "[OK] Already persisted in $RC_FILE"
|
|
20
|
+
else
|
|
21
|
+
{
|
|
22
|
+
echo ""
|
|
23
|
+
echo "$MARKER"
|
|
24
|
+
echo "export PATH=\"\$PATH:$SCRIPT_DIR\""
|
|
25
|
+
} >> "$RC_FILE"
|
|
26
|
+
echo "[OK] Added to $RC_FILE"
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
echo ""
|
|
30
|
+
echo "To use it in this shell right now:"
|
|
31
|
+
echo " export PATH=\"\$PATH:$SCRIPT_DIR\""
|
|
32
|
+
echo "Then: janus list"
|
|
33
|
+
echo "For this shell now: source ~/.zshrc"
|
|
34
|
+
echo ""
|
|
35
|
+
echo "Note: the PATH entry points at this repo's current location."
|
|
36
|
+
echo "If you move the repo, rerun this script from the new location"
|
|
37
|
+
echo "(or run scripts/MacOS/Remove-DomusFromPath.sh first)."
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Builds a model from its Modelfile. Usage: Build-AI.sh [model] (default: mercury)
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
cd "$SCRIPT_DIR/../.."
|
|
6
|
+
PYTHON="python3"
|
|
7
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
8
|
+
exec "$PYTHON" -m Janus build "${1:-mercury}"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Uninstalls Domus-AI and removes build/Python artifacts via scripts/clean_domus.py.
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
6
|
+
|
|
7
|
+
PYTHON="python3"
|
|
8
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
9
|
+
|
|
10
|
+
"$PYTHON" "$SCRIPT_DIR/../clean_domus.py" "$@"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/bin/zsh
|
|
2
|
+
# Janus - Domus-AI CLI launcher (macOS).
|
|
3
|
+
# Add this directory to PATH to run `janus <command>` from anywhere.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
SCRIPT_DIR="$(cd -P "$(dirname "$0")" && pwd)"
|
|
7
|
+
PYTHON_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
8
|
+
PYTHON="python3"
|
|
9
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
10
|
+
|
|
11
|
+
PYTHONPATH="$PYTHON_ROOT/src${PYTHONPATH:+:$PYTHONPATH}" exec "$PYTHON" -m Janus "$@"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Lists models installed in Ollama.
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
cd "$SCRIPT_DIR/../.."
|
|
6
|
+
PYTHON="python3"
|
|
7
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
8
|
+
exec "$PYTHON" -m Janus list
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Downloads a model from the Ollama registry. Usage: Pull-AI.sh <model>
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
if [ $# -lt 1 ]; then
|
|
5
|
+
echo "Usage: Pull-AI.sh <model>" >&2
|
|
6
|
+
exit 1
|
|
7
|
+
fi
|
|
8
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
9
|
+
cd "$SCRIPT_DIR/../.."
|
|
10
|
+
PYTHON="python3"
|
|
11
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
12
|
+
exec "$PYTHON" -m Janus pull "$1"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Removes a model from Ollama. Usage: Remove-AI.sh <model>
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
if [ $# -lt 1 ]; then
|
|
5
|
+
echo "Usage: Remove-AI.sh <model>" >&2
|
|
6
|
+
exit 1
|
|
7
|
+
fi
|
|
8
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
9
|
+
cd "$SCRIPT_DIR/../.."
|
|
10
|
+
PYTHON="python3"
|
|
11
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
12
|
+
exec "$PYTHON" -m Janus remove "$1"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/zsh
|
|
2
|
+
# Remove-DomusFromPath - removes the Domus-AI scripts PATH entry from
|
|
3
|
+
# ~/.zshrc (the block added by Add-DomusToPath.sh).
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
RC_FILE="$HOME/.zshrc"
|
|
7
|
+
MARKER="# Domus-AI scripts"
|
|
8
|
+
|
|
9
|
+
if [[ ! -f "$RC_FILE" ]] || ! grep -qF "$MARKER" "$RC_FILE"; then
|
|
10
|
+
echo "[OK] Nothing to remove - no Domus-AI entry found in $RC_FILE"
|
|
11
|
+
exit 0
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
# Delete the marker line and the export line that follows it.
|
|
15
|
+
sed -i '' "/# Domus-AI scripts/,+1d" "$RC_FILE"
|
|
16
|
+
echo "[OK] Removed Domus-AI PATH entry from $RC_FILE"
|
|
17
|
+
echo "Open a new terminal (or 'source ~/.zshrc') for it to take effect."
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Runs the full Domus-AI test suite via the cross-platform scripts/run_tests.py runner.
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
6
|
+
|
|
7
|
+
PYTHON="python3"
|
|
8
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
9
|
+
|
|
10
|
+
"$PYTHON" "$SCRIPT_DIR/../run_tests.py" "$@"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Starts a model (Ollama server first if needed). Usage: Start-AI.sh [model] (default: mercury)
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
cd "$SCRIPT_DIR/../.."
|
|
6
|
+
PYTHON="python3"
|
|
7
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
8
|
+
exec "$PYTHON" -m Janus start "${1:-mercury}"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Shows status of running models and hardware.
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
cd "$SCRIPT_DIR/../.."
|
|
6
|
+
PYTHON="python3"
|
|
7
|
+
command -v "$PYTHON" >/dev/null 2>&1 || PYTHON="python"
|
|
8
|
+
exec "$PYTHON" -m Janus status
|