priests 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.
- priests-0.4.0/.claude/settings.local.json +18 -0
- priests-0.4.0/.gitignore +208 -0
- priests-0.4.0/CHANGELOG.md +84 -0
- priests-0.4.0/DEVLOG.md +122 -0
- priests-0.4.0/LICENSE +21 -0
- priests-0.4.0/PKG-INFO +17 -0
- priests-0.4.0/README.md +239 -0
- priests-0.4.0/priests/__init__.py +1 -0
- priests-0.4.0/priests/cli/__init__.py +0 -0
- priests-0.4.0/priests/cli/config_cmd.py +58 -0
- priests-0.4.0/priests/cli/init_cmd.py +193 -0
- priests-0.4.0/priests/cli/main.py +49 -0
- priests-0.4.0/priests/cli/model_cmd.py +125 -0
- priests-0.4.0/priests/cli/profile_cmd.py +103 -0
- priests-0.4.0/priests/cli/providers_cmd.py +86 -0
- priests-0.4.0/priests/cli/run_cmd.py +295 -0
- priests-0.4.0/priests/cli/service_cmd.py +90 -0
- priests-0.4.0/priests/config/__init__.py +0 -0
- priests-0.4.0/priests/config/loader.py +119 -0
- priests-0.4.0/priests/config/model.py +89 -0
- priests-0.4.0/priests/engine_factory.py +158 -0
- priests-0.4.0/priests/memory/__init__.py +0 -0
- priests-0.4.0/priests/memory/extractor.py +118 -0
- priests-0.4.0/priests/profile/__init__.py +0 -0
- priests-0.4.0/priests/profile/config.py +24 -0
- priests-0.4.0/priests/registry.py +157 -0
- priests-0.4.0/priests/service/__init__.py +0 -0
- priests-0.4.0/priests/service/app.py +39 -0
- priests-0.4.0/priests/service/routes/__init__.py +0 -0
- priests-0.4.0/priests/service/routes/health.py +12 -0
- priests-0.4.0/priests/service/routes/run.py +103 -0
- priests-0.4.0/priests/service/routes/sessions.py +54 -0
- priests-0.4.0/priests/service/schemas.py +55 -0
- priests-0.4.0/pyproject.toml +40 -0
- priests-0.4.0/uv.lock +1047 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(wc:*)",
|
|
5
|
+
"Bash(uv run:*)",
|
|
6
|
+
"Bash(uv sync:*)",
|
|
7
|
+
"Bash(uv pip:*)",
|
|
8
|
+
"Bash(curl -s http://127.0.0.1:8777/v1/sessions)",
|
|
9
|
+
"Bash(python3 -m json.tool)",
|
|
10
|
+
"Bash(curl -s -X POST http://127.0.0.1:8777/v1/chat -H 'Content-Type: application/json' -d '{\"prompt\": \"Remember the number 42.\", \"session_id\": \"test-session-1\", \"no_think\": true}')",
|
|
11
|
+
"Bash(curl -s -X POST http://127.0.0.1:8777/v1/chat -H 'Content-Type: application/json' -d '{\"prompt\": \"What number did I ask you to remember?\", \"session_id\": \"test-session-1\", \"no_think\": true}')",
|
|
12
|
+
"Bash(curl -s http://127.0.0.1:8777/v1/sessions/test-session-1)",
|
|
13
|
+
"Bash(python -c ':*)",
|
|
14
|
+
"Bash(kill %1)",
|
|
15
|
+
"Bash(ls:*)"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
priests-0.4.0/.gitignore
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
#.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
# .vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Cursor
|
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
201
|
+
.cursorignore
|
|
202
|
+
.cursorindexingignore
|
|
203
|
+
|
|
204
|
+
# Marimo
|
|
205
|
+
marimo/_static/
|
|
206
|
+
marimo/_lsp/
|
|
207
|
+
__marimo__/
|
|
208
|
+
.DS_Store
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `priests` are documented here.
|
|
4
|
+
|
|
5
|
+
## [0.4.0] — 2026-04-04
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- Streaming output in CLI — `priests run` and interactive chat now print tokens
|
|
9
|
+
as they arrive using `engine.stream()`; time-to-first-token ~215ms vs ~3s wait
|
|
10
|
+
for buffered responses (14× perceived speedup on local models)
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## [0.3.0] — 2026-04-04
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- Provider registry (`priests/registry.py`) — 12 providers with curated model
|
|
18
|
+
lists: Ollama, OpenAI, Anthropic, Gemini, Bailian, Alibaba Cloud, MiniMax,
|
|
19
|
+
DeepSeek, Kimi, Groq, OpenRouter, Custom
|
|
20
|
+
- `priests model list` — list saved provider/model pairs, marks current default
|
|
21
|
+
- `priests model default` — interactive arrow-key selection of default model
|
|
22
|
+
- `priests model add` — guided flow: select provider, enter API key, pick model
|
|
23
|
+
- `priests providers` — table of all providers with configured/unconfigured status
|
|
24
|
+
- `priests providers models <name>` — show curated model list or fetch Ollama
|
|
25
|
+
models dynamically
|
|
26
|
+
- Proxy support — `[proxy] url` in `priests.toml`; `use_proxy = true/false` per
|
|
27
|
+
provider; engine resolves and passes proxy URL to adapter constructors
|
|
28
|
+
- DeepSeek provider (`api.deepseek.com`) — `deepseek-chat`, `deepseek-reasoner`
|
|
29
|
+
- Kimi / Moonshot provider (`api.moonshot.cn`) — K2.5, K2-thinking, moonshot-v1
|
|
30
|
+
- `[models]` section in `priests.toml` — stores `provider/model` pairs
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
- Gemini base URL corrected to `/v1beta/openai/` (was `/openai/v1` → 404)
|
|
34
|
+
- MiniMax base URL corrected to `api.minimax.io/v1` (was `api.minimax.chat/v1` → 401)
|
|
35
|
+
- `think` parameter now only injected for Qwen/Ollama providers; other providers
|
|
36
|
+
(Gemini, OpenAI, etc.) receive empty `provider_options` to avoid HTTP 400
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
- Provider labels updated: `(domestic)` → `(China mainland)`
|
|
40
|
+
- Model lists refreshed: gpt-4.1 family, qwen3.5, kimi-k2.5, MiniMax M2.x,
|
|
41
|
+
Claude 4.x only, Gemini 2.5 series, current Groq production models
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## [0.2.0] — 2026-04-03
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
- Autonomous memory system — model emits `<memory>` tags; tags are extracted
|
|
49
|
+
after each turn and written to the profile's `memories/` directory
|
|
50
|
+
- Three memory categories: `user.md` (stable facts), `notes.md`
|
|
51
|
+
(role-important), `auto_YYYYMMDD.md` (daily observations)
|
|
52
|
+
- `~/.priests/PRIESTS.md` — memory guide bootstrapped automatically on first
|
|
53
|
+
run; teaches the model tag syntax and when to save
|
|
54
|
+
- `priests run --no-memories` — disable memory for a single session
|
|
55
|
+
- `memories = false` in `profile.toml` — disable memory permanently for a profile
|
|
56
|
+
- `memories_limit` in `profile.toml` — override global memory file limit
|
|
57
|
+
- `[memory] limit` in `priests.toml` — global cap on daily auto memory files
|
|
58
|
+
- Per-profile `profile.toml` with `memories`, `memories_limit` settings
|
|
59
|
+
- `/new` slash command in interactive chat — starts a new session
|
|
60
|
+
- Arrow key navigation and Ctrl+J newline in interactive chat (prompt_toolkit)
|
|
61
|
+
|
|
62
|
+
### Fixed
|
|
63
|
+
- Memory tag deduplication — known facts are not re-saved across sessions
|
|
64
|
+
- Placeholder filter — prevents hallucinated `[Unknown]` / `[Name]` values
|
|
65
|
+
from being written to memory files
|
|
66
|
+
- Session tag cleanup — memory tags stripped from last assistant turn in
|
|
67
|
+
SQLite so they don't leak into future conversation context
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## [0.1.0] — 2026-03-31
|
|
72
|
+
|
|
73
|
+
### Added
|
|
74
|
+
- `priests run` — interactive chat (prompt_toolkit) and single-prompt CLI
|
|
75
|
+
- `priests init` — guided setup: provider selection, API key entry, model pick,
|
|
76
|
+
writes `~/.priests/priests.toml`
|
|
77
|
+
- `priests config show / set` — read and update config values
|
|
78
|
+
- `priests profile list / init` — manage behavior profiles
|
|
79
|
+
- `priests service start / status` — FastAPI HTTP service on `127.0.0.1:8777`
|
|
80
|
+
- HTTP API: `POST /v1/run`, `POST /v1/chat`, `GET /v1/sessions`,
|
|
81
|
+
`GET /v1/sessions/{id}`, `GET /health`
|
|
82
|
+
- `/think on` / `/think off` / `/exit` / `/help` slash commands in chat
|
|
83
|
+
- `~/.priests/priests.toml` config with `[default]`, `[paths]`, `[service]`,
|
|
84
|
+
`[providers.*]`, env var overrides via `PRIESTS_` prefix
|
priests-0.4.0/DEVLOG.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# DEVLOG
|
|
2
|
+
|
|
3
|
+
## Future milestones
|
|
4
|
+
|
|
5
|
+
### Other deferred items
|
|
6
|
+
|
|
7
|
+
### Other deferred items
|
|
8
|
+
- `service stop` / `service logs` with background daemon mode (PID file)
|
|
9
|
+
- `priests models add` — add/configure additional providers after init
|
|
10
|
+
- `/new` session command in interactive chat
|
|
11
|
+
- Multi-model dispatch, cron task pool, agent orchestration
|
|
12
|
+
- OpenAI provider (tracked in `priest` Milestone 2)
|
|
13
|
+
- `priest` `SqliteSessionStore.list()` method (priests uses direct aiosqlite query as workaround)
|
|
14
|
+
- schedules/plans memory categories (v0.3)
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 2026-04-04 — Provider fixes + proxy support
|
|
19
|
+
|
|
20
|
+
**Root cause: Python 3.14 breaks httpcore's anyio async TLS backend**
|
|
21
|
+
- `AsyncOpenAI` inside `anyio.run()` fails in chat mode (real TTY + prompt_toolkit) due to `httpcore/_backends/anyio.py start_tls` bug on Python 3.14
|
|
22
|
+
- Fix: switched `OpenAICompatProvider` to use sync `OpenAI` client in `anyio.to_thread.run_sync()` — uses httpcore sync sockets instead of anyio async TLS
|
|
23
|
+
- File: `priest/priest/providers/openai_compat_provider.py`
|
|
24
|
+
|
|
25
|
+
**Proxy support**
|
|
26
|
+
- New `[proxy] url = "..."` section in `priests.toml`
|
|
27
|
+
- `use_proxy = true/false` on each provider config (`OpenAICompatConfig`, `AnthropicConfig`)
|
|
28
|
+
- `engine_factory.py` resolves proxy URL and passes it to adapter constructors
|
|
29
|
+
- `OpenAICompatProvider`, `AnthropicProvider` each accept `proxy: str | None`
|
|
30
|
+
- Proxy passed via `httpx.Client(proxy=...)` / `httpx.AsyncClient(proxy=...)`
|
|
31
|
+
|
|
32
|
+
**`think` parameter scoped to Qwen/Ollama providers only**
|
|
33
|
+
- Previously sent `{"think": False}` to all providers — breaks Gemini (400 unknown field)
|
|
34
|
+
- `_THINK_PROVIDERS = {"ollama", "bailian", "alibaba_cloud"}` in `run_cmd.py`
|
|
35
|
+
- Only those providers get `think` in `provider_options`; all others get `{}`
|
|
36
|
+
|
|
37
|
+
**Gemini base URL corrected**
|
|
38
|
+
- Registry had `/openai/v1`, correct is `/v1beta/openai/`
|
|
39
|
+
- Fixed in `registry.py` and updated existing `priests.toml`
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 2026-04-03 — Milestone 2: Autonomous memory system
|
|
44
|
+
|
|
45
|
+
Implemented model-driven persistent memory for `priests` v0.2.
|
|
46
|
+
|
|
47
|
+
**Memory extraction (`priests/memory/extractor.py`):**
|
|
48
|
+
- Regex-based extraction of `<memory>`, `<memory type="user">`, `<memory type="note">` tags from model responses
|
|
49
|
+
- Three-file routing: `user.md` (stable facts), `notes.md` (role-important), `auto_YYYYMMDD.md` (daily log)
|
|
50
|
+
- Exact-match deduplication (case-insensitive) — no re-saving known facts across sessions
|
|
51
|
+
- Placeholder filter (`[Unknown]`, `[Name]`, etc.) — prevents hallucinated values from being written
|
|
52
|
+
- `trim_memories()` — deletes oldest `auto_YYYYMMDD.md` files beyond configured limit; `user.md` and `notes.md` are never trimmed
|
|
53
|
+
- `clean_last_turn()` — strips memory tags from the last assistant turn in the session store so they don't leak into future context
|
|
54
|
+
|
|
55
|
+
**Global memory guide (`~/.priests/PRIESTS.md`):**
|
|
56
|
+
- Bootstrapped automatically on first run and on v0.1→v0.2 upgrade
|
|
57
|
+
- Teaches the model tag syntax, format rules, and when to save via a concrete example
|
|
58
|
+
- User-editable; deleting or emptying it disables auto-memory without a code change
|
|
59
|
+
|
|
60
|
+
**Per-profile config (`priests/profile/config.py`):**
|
|
61
|
+
- `profile.toml` scaffolded by `priests profile init` alongside PROFILE.md/RULES.md
|
|
62
|
+
- `memories = false` — disables memory loading and saving for tool profiles (formatters, dictionaries, etc.)
|
|
63
|
+
- `memories_limit` — overrides the global `[memory].limit` for a specific profile
|
|
64
|
+
- Precedence: CLI flag > `profile.toml` > global `priests.toml`
|
|
65
|
+
|
|
66
|
+
**CLI (`priests/cli/run_cmd.py`):**
|
|
67
|
+
- `--memories/--no-memories` flag (default on) — disables memory for a single session
|
|
68
|
+
- Chat prompt changed: `you>` → `user >`, `ai>` → `{profile_name} >`
|
|
69
|
+
- `[memory saved]` hint shown after turns where facts were written
|
|
70
|
+
|
|
71
|
+
**HTTP service (`priests/service/routes/run.py`):**
|
|
72
|
+
- `?memories=false` query param on `/v1/run` and `/v1/chat`
|
|
73
|
+
|
|
74
|
+
**Config (`priests/config/model.py`):**
|
|
75
|
+
- `MemoryConfig` with `limit: int = 50` — controls how many daily auto files to retain globally
|
|
76
|
+
|
|
77
|
+
**Verified against:** Ollama + qwen3.5:9b locally. Cross-session recall confirmed (name, preferences, explicit "remember this" requests).
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 2026-04-01 — Milestone 1 complete
|
|
82
|
+
|
|
83
|
+
Initial implementation of `priests` v0.1.0. All planned CLI commands and HTTP service routes are in place and verified against Ollama + qwen3.5:9b.
|
|
84
|
+
|
|
85
|
+
**Package setup:**
|
|
86
|
+
- `pyproject.toml` with `uv`, hatchling, `priest` as local path dep
|
|
87
|
+
- Added `tool.hatch.metadata.allow-direct-references = true` (required for path deps)
|
|
88
|
+
- Entry point: `priests = "priests.cli.main:app"`
|
|
89
|
+
|
|
90
|
+
**Config system (`priests/config/`):**
|
|
91
|
+
- `AppConfig` with `DefaultsConfig`, `PathsConfig`, `ServiceConfig`, `ProvidersConfig` (all Pydantic)
|
|
92
|
+
- Config file: `~/.config/priests/priests.toml` (XDG) or `~/.priests/priests.toml`
|
|
93
|
+
- Env var overrides: `PRIESTS_` prefix, `__` for nesting (e.g. `PRIESTS_DEFAULT__MODEL`)
|
|
94
|
+
- `set_config_value()` mutates a dotted key and writes back via `tomli-w`
|
|
95
|
+
- `None` values stripped before TOML serialization (TOML has no null type)
|
|
96
|
+
|
|
97
|
+
**Engine factory (`priests/engine_factory.py`):**
|
|
98
|
+
- Single function: `build_engine(config) -> (PriestEngine, SqliteSessionStore)`
|
|
99
|
+
- Store returned un-initialized — caller owns lifecycle (`async with store:` for CLI, lifespan for FastAPI)
|
|
100
|
+
|
|
101
|
+
**CLI (`priests/cli/`):**
|
|
102
|
+
- `priests run [PROMPT]` — single prompt or interactive chat (tty detection); `--no-think` default
|
|
103
|
+
- `priests profile list / init NAME` — scans profiles dir, scaffolds PROFILE.md + RULES.md + memories/
|
|
104
|
+
- `priests config show / set KEY VALUE` — rich TOML display, dotted key mutation
|
|
105
|
+
- `priests service start / status / stop / logs` — foreground uvicorn; status hits `/health`
|
|
106
|
+
|
|
107
|
+
**HTTP service (`priests/service/`):**
|
|
108
|
+
- FastAPI app via `create_app(config)` with lifespan-managed engine + store
|
|
109
|
+
- `GET /health`, `POST /v1/run`, `POST /v1/chat`, `GET /v1/sessions`, `GET /v1/sessions/{id}`
|
|
110
|
+
- `/v1/chat` auto-generates session ID if none provided
|
|
111
|
+
- Session listing uses direct `aiosqlite` query (SqliteSessionStore has no `list()` — raise PR to priest for v0.2)
|
|
112
|
+
- `SessionSummary` / `SessionDetail` Pydantic models bridge priest's `Session` dataclass to JSON
|
|
113
|
+
|
|
114
|
+
**Verified against:** Ollama + qwen3.5:9b locally. Session continuity confirmed via `/v1/chat`.
|
|
115
|
+
|
|
116
|
+
### Out of scope for v0.1.0 (deferred)
|
|
117
|
+
|
|
118
|
+
- `service stop` / `service logs` (foreground-only; stubs added)
|
|
119
|
+
- Multi-model dispatch, cron task pool, agent orchestration (v1+)
|
|
120
|
+
- OpenAI provider (tracked in `priest` Milestone 2)
|
|
121
|
+
- `priest` `SqliteSessionStore.list()` method (direct aiosqlite query used as workaround)
|
|
122
|
+
- Background service mode with PID file
|
priests-0.4.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 seesaw game
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
priests-0.4.0/PKG-INFO
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: priests
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: CLI tool and HTTP service for priest AI orchestration
|
|
5
|
+
License-File: LICENSE
|
|
6
|
+
Requires-Python: >=3.11
|
|
7
|
+
Requires-Dist: anyio>=4.0
|
|
8
|
+
Requires-Dist: fastapi>=0.111
|
|
9
|
+
Requires-Dist: httpx>=0.27
|
|
10
|
+
Requires-Dist: openai>=2.30.0
|
|
11
|
+
Requires-Dist: priest-core>=0.2.0
|
|
12
|
+
Requires-Dist: pydantic>=2.0
|
|
13
|
+
Requires-Dist: questionary>=2.0
|
|
14
|
+
Requires-Dist: rich>=13.0
|
|
15
|
+
Requires-Dist: tomli-w>=1.0
|
|
16
|
+
Requires-Dist: typer>=0.12
|
|
17
|
+
Requires-Dist: uvicorn[standard]>=0.30
|